bch

package
v0.4.0-rc2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 11, 2022 License: BlueOak-1.0.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	UnitInfo = dex.UnitInfo{
		AtomicUnit: "Sats",
		Conventional: dex.Denomination{
			Unit:             "BCH",
			ConversionFactor: 1e8,
		},
	}
	// MainNetParams are the clone parameters for mainnet.
	MainNetParams = btc.ReadCloneParams(&btc.CloneParams{
		PubKeyHashAddrID: 0x00,
		ScriptHashAddrID: 0x05,
		Bech32HRPSegwit:  "bitcoincash",
		CoinbaseMaturity: 100,
		Net:              0xe8f3e1e3,
	})
	// TestNet3Params are the clone parameters for testnet.
	TestNet3Params = btc.ReadCloneParams(&btc.CloneParams{
		PubKeyHashAddrID: 0x6f,
		ScriptHashAddrID: 0xc4,
		Bech32HRPSegwit:  "bchtest",
		CoinbaseMaturity: 100,
		Net:              0xf4f3e5f4,
	})
	// RegressionNetParams are the clone parameters for simnet.
	RegressionNetParams = btc.ReadCloneParams(&btc.CloneParams{
		PubKeyHashAddrID: 0x6f,
		ScriptHashAddrID: 0xc4,
		Bech32HRPSegwit:  "bchreg",
		CoinbaseMaturity: 100,

		Net: 0xee87f733,
	})
)

Functions

func DecodeCashAddress

func DecodeCashAddress(addr string, net *chaincfg.Params) (btcutil.Address, error)

DecodeCashAddress decodes a Cash Address string into a btcutil.Address that the BTC backend can use internally.

func RecodeCashAddress

func RecodeCashAddress(addr string, net *chaincfg.Params) (string, error)

RecodeCashAddress takes a BTC base-58 encoded address and converts it into a Cash Address.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL