bch

package
v0.2.6 Latest Latest
Warning

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

Go to latest
Published: Feb 14, 2022 License: BlueOak-1.0.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// 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