Bitcoin
|
#include <descriptor.h>
Public Member Functions | |
virtual | ~Descriptor ()=default |
virtual bool | IsRange () const =0 |
virtual bool | IsSolvable () const =0 |
virtual std::string | ToString () const =0 |
virtual bool | ToPrivateString (const SigningProvider &provider, std::string &out) const =0 |
virtual bool | Expand (int pos, const SigningProvider &provider, std::vector< CScript > &output_scripts, FlatSigningProvider &out, std::vector< unsigned char > *cache=nullptr) const =0 |
virtual bool | ExpandFromCache (int pos, const std::vector< unsigned char > &cache, std::vector< CScript > &output_scripts, FlatSigningProvider &out) const =0 |
virtual void | ExpandPrivate (int pos, const SigningProvider &provider, FlatSigningProvider &out) const =0 |
Interface for parsed descriptor objects.
|
virtualdefault |
|
pure virtual |
Expand a descriptor at a specified position.
pos: the position at which to expand the descriptor. If IsRange() is false, this is ignored. provider: the provider to query for private keys in case of hardened derivation. output_script: the expanded scriptPubKeys will be put here. out: scripts and public keys necessary for solving the expanded scriptPubKeys will be put here (may be equal to provider). cache: vector which will be overwritten with cache data necessary to-evaluate the descriptor at this point without access to private keys.
Implemented in anonymous_namespace{descriptor.cpp}::DescriptorImpl.
|
pure virtual |
Expand a descriptor at a specified position using cached expansion data.
pos: the position at which to expand the descriptor. If IsRange() is false, this is ignored. cache: vector from which cached expansion data will be read. output_script: the expanded scriptPubKeys will be put here. out: scripts and public keys necessary for solving the expanded scriptPubKeys will be put here (may be equal to provider).
Implemented in anonymous_namespace{descriptor.cpp}::DescriptorImpl.
|
pure virtual |
Expand the private key for a descriptor at a specified position, if possible.
pos: the position at which to expand the descriptor. If IsRange() is false, this is ignored. provider: the provider to query for the private keys. out: any private keys available for the specified pos will be placed here.
Implemented in anonymous_namespace{descriptor.cpp}::DescriptorImpl.
|
pure virtual |
Whether the expansion of this descriptor depends on the position.
Implemented in anonymous_namespace{descriptor.cpp}::DescriptorImpl.
|
pure virtual |
Whether this descriptor has all information about signing ignoring lack of private keys. This is true for all descriptors except ones that use raw
or addr
constructions.
Implemented in anonymous_namespace{descriptor.cpp}::RawDescriptor, anonymous_namespace{descriptor.cpp}::AddressDescriptor, and anonymous_namespace{descriptor.cpp}::DescriptorImpl.
|
pure virtual |
Convert the descriptor to a private string. This fails if the provided provider does not have the relevant private keys.
Implemented in anonymous_namespace{descriptor.cpp}::DescriptorImpl.
|
pure virtual |
Convert the descriptor back to a string, undoing parsing.
Implemented in anonymous_namespace{descriptor.cpp}::DescriptorImpl.