Versions in this module Expand all Collapse all v1 v1.9.25 Mar 25, 2021 v1.9.24 Mar 24, 2021 Changes in this version + var ErrAddressCollision = errors.New("address collision") + var ErrChecksumMismatch = errors.New("checksum mismatch") + var ErrUnknownAddressType = errors.New("unknown address type") + func Hash160(buf []byte) []byte + type Address interface + EncodeAddress func() string + IsForNet func(*chaincfg.Params) bool + ScriptAddress func() []byte + String func() string + func Decode(addr string, defaultNet *chaincfg.Params) (Address, error) + type PubKey struct + func NewPubKey(serializedPubKey []byte, net *chaincfg.Params) (*PubKey, error) + func (a *PubKey) EncodeAddress() string + func (a *PubKey) Format() PubKeyFormat + func (a *PubKey) IsForNet(net *chaincfg.Params) bool + func (a *PubKey) PubKey() *ec.PublicKey + func (a *PubKey) PubKeyHash() *PubKeyHash + func (a *PubKey) ScriptAddress() []byte + func (a *PubKey) SetFormat(pkFormat PubKeyFormat) + func (a *PubKey) String() string + type PubKeyFormat int + const PKFCompressed + const PKFHybrid + const PKFUncompressed + type PubKeyHash struct + func NewPubKeyHash(pkHash []byte, net *chaincfg.Params) (*PubKeyHash, error) + func (a *PubKeyHash) EncodeAddress() string + func (a *PubKeyHash) Hash160() *[ripemd160.Size]byte + func (a *PubKeyHash) IsForNet(net *chaincfg.Params) bool + func (a *PubKeyHash) ScriptAddress() []byte + func (a *PubKeyHash) String() string + type ScriptHash struct + func NewScriptHash(serializedScript []byte, net *chaincfg.Params) (*ScriptHash, error) + func NewScriptHashFromHash(scriptHash []byte, net *chaincfg.Params) (*ScriptHash, error) + func (a *ScriptHash) EncodeAddress() string + func (a *ScriptHash) Hash160() *[ripemd160.Size]byte + func (a *ScriptHash) IsForNet(net *chaincfg.Params) bool + func (a *ScriptHash) ScriptAddress() []byte + func (a *ScriptHash) String() string