btcutilw

package
v0.11.0 Latest Latest
Warning

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

Go to latest
Published: Oct 4, 2022 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DecodeAddress

func DecodeAddress(addr string, defaultNet *chaincfg.Params) (btcutil.Address, error)

DecodeAddress uses btcutil.DecodeAddress for all cases except SegWit version 1, which is handled by this wrapper.

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.

Jump to

Keyboard shortcuts

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