Documentation ¶
Index ¶
- type DescriptorApi
- type DescriptorApiImpl
- func (d *DescriptorApiImpl) GetChecksum(descriptor *types.Descriptor) (descriptorAddedChecksum string, err error)
- func (d *DescriptorApiImpl) GetNetworkTypes() []types.NetworkType
- func (d *DescriptorApiImpl) NewDescriptorFromAddress(address string) *types.Descriptor
- func (d *DescriptorApiImpl) NewDescriptorFromExtPubkey(hashType types.HashType, extPubkey *types.ExtPubkey) (desc *types.Descriptor, err error)
- func (d *DescriptorApiImpl) NewDescriptorFromLockingScript(lockingScript string) *types.Descriptor
- func (d *DescriptorApiImpl) NewDescriptorFromMultisig(hashType types.HashType, pubkeys []string, requireNum int) *types.Descriptor
- func (d *DescriptorApiImpl) NewDescriptorFromPubkey(hashType types.HashType, pubkey *types.Pubkey) *types.Descriptor
- func (d *DescriptorApiImpl) NewDescriptorFromString(descriptor string) *types.Descriptor
- func (d *DescriptorApiImpl) Parse(descriptor *types.Descriptor) (rootData *types.DescriptorRootData, descriptorDataList []types.DescriptorData, ...)
- func (d *DescriptorApiImpl) ParseByFilter(descriptor *types.Descriptor, filter *types.DescriptorParseFilter) (rootData *types.DescriptorRootData, descriptorDataList []types.DescriptorData, ...)
- func (d *DescriptorApiImpl) ParseByFilterWithDerivationPath(descriptor *types.Descriptor, bip32DerivationPath string, ...) (rootData *types.DescriptorRootData, descriptorDataList []types.DescriptorData, ...)
- func (d *DescriptorApiImpl) ParseByString(descriptor string) (rootData *types.DescriptorRootData, descriptorDataList []types.DescriptorData, ...)
- func (d *DescriptorApiImpl) ParseWithDerivationPath(descriptor *types.Descriptor, bip32DerivationPath string) (rootData *types.DescriptorRootData, descriptorDataList []types.DescriptorData, ...)
- func (p *DescriptorApiImpl) WithAddressApi(addressApi address.AddressApi) *DescriptorApiImpl
- func (p *DescriptorApiImpl) WithExtPubkeyApi(extPubkeyApi key.ExtPubkeyApi) *DescriptorApiImpl
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DescriptorApi ¶
type DescriptorApi interface { // GetNetworkTypes returns the available network types. GetNetworkTypes() []types.NetworkType // NewDescriptorFromAddress returns a Descriptor from pubkey. NewDescriptorFromPubkey( hashType types.HashType, pubkey *types.Pubkey) *types.Descriptor // NewDescriptorFromMultisig returns a Descriptor from multisig. NewDescriptorFromMultisig( hashType types.HashType, pubkeys []string, requireNum int, ) *types.Descriptor // NewDescriptor returns a Descriptor. NewDescriptorFromString(descriptor string) *types.Descriptor // NewDescriptorFromLockingScript returns a Descriptor from locking script. NewDescriptorFromLockingScript(lockingScript string) *types.Descriptor // NewDescriptorFromAddress returns a Descriptor from address. NewDescriptorFromAddress(address string) *types.Descriptor // NewDescriptorFromExtPubkey returns a Descriptor. NewDescriptorFromExtPubkey( hashType types.HashType, extPubkey *types.ExtPubkey, ) (*types.Descriptor, error) // ParseByString returns a Descriptor parsing data. ParseByString(descriptor string) ( data *types.DescriptorRootData, descriptorDataList []types.DescriptorData, err error, ) // Parse returns a Descriptor parsing data. Parse(descriptor *types.Descriptor) ( data *types.DescriptorRootData, descriptorDataList []types.DescriptorData, err error, ) // ParseWithDerivationPath returns a Descriptor parsing data. ParseWithDerivationPath( descriptor *types.Descriptor, bip32DerivationPath string, ) ( data *types.DescriptorRootData, descriptorDataList []types.DescriptorData, err error, ) // ParseByFilter returns a Descriptor parsing data by filter. ParseByFilter( descriptor *types.Descriptor, filter *types.DescriptorParseFilter, ) ( rootData *types.DescriptorRootData, descriptorDataList []types.DescriptorData, err error, ) // ParseByFilterWithDerivationPath returns a Descriptor parsing data by filter. ParseByFilterWithDerivationPath( descriptor *types.Descriptor, bip32DerivationPath string, filter *types.DescriptorParseFilter, ) ( rootData *types.DescriptorRootData, descriptorDataList []types.DescriptorData, err error, ) // GetChecksum returns a descriptor adding checksum. GetChecksum( descriptor *types.Descriptor) (descriptorAddedChecksum string, err error) }
type DescriptorApiImpl ¶
type DescriptorApiImpl struct { cfdErrors.HasInitializeError // contains filtered or unexported fields }
Descriptor This struct use for the output descriptor.
func NewDescriptorApi ¶
func NewDescriptorApi(options ...config.CfdConfigOption) *DescriptorApiImpl
NewDescriptorApi returns an object that defines the API for output descriptor.
func (*DescriptorApiImpl) GetChecksum ¶
func (d *DescriptorApiImpl) GetChecksum(descriptor *types.Descriptor) (descriptorAddedChecksum string, err error)
GetChecksum returns a descriptor adding checksum.
func (*DescriptorApiImpl) GetNetworkTypes ¶ added in v0.3.10
func (d *DescriptorApiImpl) GetNetworkTypes() []types.NetworkType
GetNetworkTypes returns the available network types.
func (*DescriptorApiImpl) NewDescriptorFromAddress ¶
func (d *DescriptorApiImpl) NewDescriptorFromAddress(address string) *types.Descriptor
NewDescriptorFromAddress returns a Descriptor from address.
func (*DescriptorApiImpl) NewDescriptorFromExtPubkey ¶ added in v0.3.18
func (d *DescriptorApiImpl) NewDescriptorFromExtPubkey( hashType types.HashType, extPubkey *types.ExtPubkey, ) (desc *types.Descriptor, err error)
NewDescriptorFromExtPubkey returns a Descriptor.
func (*DescriptorApiImpl) NewDescriptorFromLockingScript ¶
func (d *DescriptorApiImpl) NewDescriptorFromLockingScript(lockingScript string) *types.Descriptor
NewDescriptorFromLockingScript returns a Descriptor from locking script.
func (*DescriptorApiImpl) NewDescriptorFromMultisig ¶
func (d *DescriptorApiImpl) NewDescriptorFromMultisig(hashType types.HashType, pubkeys []string, requireNum int) *types.Descriptor
NewDescriptorFromMultisig returns a Descriptor from multisig.
func (*DescriptorApiImpl) NewDescriptorFromPubkey ¶
func (d *DescriptorApiImpl) NewDescriptorFromPubkey(hashType types.HashType, pubkey *types.Pubkey) *types.Descriptor
NewDescriptorFromAddress returns a Descriptor from pubkey.
func (*DescriptorApiImpl) NewDescriptorFromString ¶
func (d *DescriptorApiImpl) NewDescriptorFromString(descriptor string) *types.Descriptor
NewDescriptor returns a Descriptor.
func (*DescriptorApiImpl) Parse ¶
func (d *DescriptorApiImpl) Parse(descriptor *types.Descriptor) (rootData *types.DescriptorRootData, descriptorDataList []types.DescriptorData, err error)
Parse returns a Descriptor parsing data.
func (*DescriptorApiImpl) ParseByFilter ¶ added in v0.3.13
func (d *DescriptorApiImpl) ParseByFilter(descriptor *types.Descriptor, filter *types.DescriptorParseFilter) (rootData *types.DescriptorRootData, descriptorDataList []types.DescriptorData, err error)
ParseByFilter returns a Descriptor parsing data by filter.
func (*DescriptorApiImpl) ParseByFilterWithDerivationPath ¶ added in v0.3.13
func (d *DescriptorApiImpl) ParseByFilterWithDerivationPath(descriptor *types.Descriptor, bip32DerivationPath string, filter *types.DescriptorParseFilter) (rootData *types.DescriptorRootData, descriptorDataList []types.DescriptorData, err error)
ParseByFilterWithDerivationPath returns a Descriptor parsing data by filter.
func (*DescriptorApiImpl) ParseByString ¶ added in v0.3.11
func (d *DescriptorApiImpl) ParseByString(descriptor string) (rootData *types.DescriptorRootData, descriptorDataList []types.DescriptorData, err error)
ParseByString returns a Descriptor parsing data.
func (*DescriptorApiImpl) ParseWithDerivationPath ¶
func (d *DescriptorApiImpl) ParseWithDerivationPath(descriptor *types.Descriptor, bip32DerivationPath string) (rootData *types.DescriptorRootData, descriptorDataList []types.DescriptorData, err error)
ParseWithDerivationPath returns a Descriptor parsing data.
func (*DescriptorApiImpl) WithAddressApi ¶ added in v0.3.11
func (p *DescriptorApiImpl) WithAddressApi(addressApi address.AddressApi) *DescriptorApiImpl
WithAddressApi This function set an address api.
func (*DescriptorApiImpl) WithExtPubkeyApi ¶ added in v0.3.18
func (p *DescriptorApiImpl) WithExtPubkeyApi(extPubkeyApi key.ExtPubkeyApi) *DescriptorApiImpl
WithExtPubkeyApi This function set an extend pubkey api.