Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Address ¶
type Address struct { Network NetworkType Version AddressType Payload []byte }
Address is a generic representation of a Bitcoin Cash address for converting to various string representations.
func NewFromCashAddress ¶
func NewFromCashAddress(addr *cashaddress.Address) (*Address, error)
NewFromCashAddress takes a cashaddress.Address and returns a generic `Address` struct.
func NewFromLegacy ¶
NewFromLegacy takes a cashaddress.Address and returns a generic `Address` struct.
func NewFromString ¶
NewFromString takes a address string in Legacy or CashAddress format and returns an `*Address` or an error.
func (*Address) CashAddress ¶
func (addr *Address) CashAddress() (*cashaddress.Address, error)
CashAddress converts various address fields to create a `*cashaddress.Address`
func (*Address) Copay ¶
Copay returns a legacy address struct with the appropriate fields set to encode to the correct copay address version
type NetworkType ¶
type NetworkType string
const ( RegTest NetworkType = "bchreg" TestNet NetworkType = "bchtest" MainNet NetworkType = "bitcoincash" )
Click to show internal directories.
Click to hide internal directories.