Documentation ¶
Index ¶
- func DecodeAddress(addr string, defaultNet *chaincfg.Params) (btcutil.Address, error)
- type AddressTaprootKey
- func (a *AddressTaprootKey) EncodeAddress() string
- func (a *AddressTaprootKey) Hrp() string
- func (a *AddressTaprootKey) IsForNet(net *chaincfg.Params) bool
- func (a *AddressTaprootKey) ScriptAddress() []byte
- func (a *AddressTaprootKey) String() string
- func (a *AddressTaprootKey) WitnessProgram() []byte
- func (a *AddressTaprootKey) WitnessVersion() byte
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type AddressTaprootKey ¶
type AddressTaprootKey struct {
// contains filtered or unexported fields
}
AddressTaprootKey is an Address for a keyspend-only P2TR output.
func NewAddressTaprootKey ¶
func NewAddressTaprootKey(xOnlyPubKey []byte, net *chaincfg.Params) (*AddressTaprootKey, error)
NewAddressTaprootKey returns a new AddressTaprootKey.
func (*AddressTaprootKey) EncodeAddress ¶
func (a *AddressTaprootKey) EncodeAddress() string
EncodeAddress returns the bech32m string encoding of an AddressTaprootKey. Part of the Address interface.
func (*AddressTaprootKey) Hrp ¶
func (a *AddressTaprootKey) Hrp() string
Hrp returns the human-readable part of the bech32 encoded AddressTaprootKey.
func (*AddressTaprootKey) IsForNet ¶
func (a *AddressTaprootKey) IsForNet(net *chaincfg.Params) bool
IsForNet returns whether or not the AddressTaprootKey is associated with a network. Part of the Address interface.
func (*AddressTaprootKey) ScriptAddress ¶
func (a *AddressTaprootKey) ScriptAddress() []byte
ScriptAddress returns the witness program for this address. Part of the Address interface.
func (*AddressTaprootKey) String ¶
func (a *AddressTaprootKey) String() string
String returns a human-readable string for the AddressTaprootKey. This is equivalent to calling EncodeAddress, but allows use of fmt.Stringer. Part of the Address interface.
func (*AddressTaprootKey) WitnessProgram ¶
func (a *AddressTaprootKey) WitnessProgram() []byte
WitnessProgram returns the witness program of the AddressTaprootKey.
func (*AddressTaprootKey) WitnessVersion ¶
func (a *AddressTaprootKey) WitnessVersion() byte
WitnessVersion returns the witness version of the AddressTaprootKey.