Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrInvalidChecksumLength = errors.New("invalid checksum length")
)
Functions ¶
This section is empty.
Types ¶
type ScriptOpts ¶
type ScriptOpts struct {
// contains filtered or unexported fields
}
ScriptOpts defines options for range type of descriptor wallet
func WithIndex ¶
func WithIndex(index uint32) *ScriptOpts
WithIndex defines exact child index for which script should be generated for range wallet descriptor
func WithRange ¶
func WithRange(numOfScrips int) *ScriptOpts
WithRange defines how many scripts should be generated for range wallet descriptor
type ScriptResponse ¶
ScriptResponse defines response for Script func
type Wallet ¶
type Wallet interface { // Type returns type of descriptor wallet (e.g. wpkh, wsh etc.) Type() string // IsRange returns true if wallet description is of type range which means //that key expression provides master key and requires more scripts to be generated IsRange() bool // Script generates new script, or range of scripts depending on wallet description //it returns ScriptResponse which holds script and its derivation path in case wallet descriptor is range //if it isn't derivation path will be nil //wits ScriptOpts pkg user can specify how many scripts should be generated in case of //range wallet descriptor, it also can specify exact index Script(opts *ScriptOpts) ([]ScriptResponse, error) }
Wallet is interface to be implemented by various descriptor wallets
type WpkhWallet ¶
type WpkhWallet struct {
// contains filtered or unexported fields
}
func (WpkhWallet) IsRange ¶
func (w WpkhWallet) IsRange() bool
func (WpkhWallet) Script ¶
func (w WpkhWallet) Script(opts *ScriptOpts) ([]ScriptResponse, error)
func (WpkhWallet) Type ¶
func (w WpkhWallet) Type() string
Click to show internal directories.
Click to hide internal directories.