|
| DescriptorImpl (std::vector< std::unique_ptr< PubkeyProvider >> pubkeys, std::unique_ptr< DescriptorImpl > script, const std::string &name) |
|
bool | IsSolvable () const override |
|
bool | IsRange () const final |
|
bool | ToStringHelper (const SigningProvider *arg, std::string &out, bool priv) const |
|
std::string | ToString () const final |
|
bool | ToPrivateString (const SigningProvider &arg, std::string &out) const override final |
|
bool | ExpandHelper (int pos, const SigningProvider &arg, Span< const unsigned char > *cache_read, std::vector< CScript > &output_scripts, FlatSigningProvider &out, std::vector< unsigned char > *cache_write) const |
|
bool | Expand (int pos, const SigningProvider &provider, std::vector< CScript > &output_scripts, FlatSigningProvider &out, std::vector< unsigned char > *cache=nullptr) const final |
|
bool | ExpandFromCache (int pos, const std::vector< unsigned char > &cache, std::vector< CScript > &output_scripts, FlatSigningProvider &out) const final |
|
void | ExpandPrivate (int pos, const SigningProvider &provider, FlatSigningProvider &out) const final |
|
virtual | ~Descriptor ()=default |
|
Base class for all Descriptor implementations.
◆ DescriptorImpl()
anonymous_namespace{descriptor.cpp}::DescriptorImpl::DescriptorImpl |
( |
std::vector< std::unique_ptr< PubkeyProvider >> |
pubkeys, |
|
|
std::unique_ptr< DescriptorImpl > |
script, |
|
|
const std::string & |
name |
|
) |
| |
|
inline |
◆ Expand()
bool anonymous_namespace{descriptor.cpp}::DescriptorImpl::Expand |
( |
int |
pos, |
|
|
const SigningProvider & |
provider, |
|
|
std::vector< CScript > & |
output_scripts, |
|
|
FlatSigningProvider & |
out, |
|
|
std::vector< unsigned char > * |
cache = nullptr |
|
) |
| const |
|
inlinefinalvirtual |
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.
Implements Descriptor.
◆ ExpandFromCache()
bool anonymous_namespace{descriptor.cpp}::DescriptorImpl::ExpandFromCache |
( |
int |
pos, |
|
|
const std::vector< unsigned char > & |
cache, |
|
|
std::vector< CScript > & |
output_scripts, |
|
|
FlatSigningProvider & |
out |
|
) |
| const |
|
inlinefinalvirtual |
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).
Implements Descriptor.
◆ ExpandHelper()
bool anonymous_namespace{descriptor.cpp}::DescriptorImpl::ExpandHelper |
( |
int |
pos, |
|
|
const SigningProvider & |
arg, |
|
|
Span< const unsigned char > * |
cache_read, |
|
|
std::vector< CScript > & |
output_scripts, |
|
|
FlatSigningProvider & |
out, |
|
|
std::vector< unsigned char > * |
cache_write |
|
) |
| const |
|
inline |
◆ ExpandPrivate()
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.
Implements Descriptor.
◆ IsRange()
bool anonymous_namespace{descriptor.cpp}::DescriptorImpl::IsRange |
( |
| ) |
const |
|
inlinefinalvirtual |
Whether the expansion of this descriptor depends on the position.
Implements Descriptor.
◆ IsSolvable()
bool anonymous_namespace{descriptor.cpp}::DescriptorImpl::IsSolvable |
( |
| ) |
const |
|
inlineoverridevirtual |
◆ MakeScripts()
A helper function to construct the scripts for this descriptor.
This function is invoked once for every CScript produced by evaluating m_script_arg, or just once in case m_script_arg is nullptr.
- Parameters
-
pubkeys | The evaluations of the m_pubkey_args field. |
script | The evaluation of m_script_arg (or nullptr when m_script_arg is nullptr). |
out | A FlatSigningProvider to put scripts or public keys in that are necessary to the solver. The script arguments to this function are automatically added, as is the origin info of the provided pubkeys. |
- Returns
- A vector with scriptPubKeys for this descriptor.
Implemented in anonymous_namespace{descriptor.cpp}::WSHDescriptor, anonymous_namespace{descriptor.cpp}::SHDescriptor, anonymous_namespace{descriptor.cpp}::MultisigDescriptor, anonymous_namespace{descriptor.cpp}::ComboDescriptor, anonymous_namespace{descriptor.cpp}::WPKHDescriptor, anonymous_namespace{descriptor.cpp}::PKHDescriptor, anonymous_namespace{descriptor.cpp}::PKDescriptor, anonymous_namespace{descriptor.cpp}::RawDescriptor, and anonymous_namespace{descriptor.cpp}::AddressDescriptor.
◆ ToPrivateString()
bool anonymous_namespace{descriptor.cpp}::DescriptorImpl::ToPrivateString |
( |
const SigningProvider & |
provider, |
|
|
std::string & |
out |
|
) |
| const |
|
inlinefinaloverridevirtual |
Convert the descriptor to a private string. This fails if the provided provider does not have the relevant private keys.
Implements Descriptor.
◆ ToString()
std::string anonymous_namespace{descriptor.cpp}::DescriptorImpl::ToString |
( |
| ) |
const |
|
inlinefinalvirtual |
Convert the descriptor back to a string, undoing parsing.
Implements Descriptor.
◆ ToStringExtra()
virtual std::string anonymous_namespace{descriptor.cpp}::DescriptorImpl::ToStringExtra |
( |
| ) |
const |
|
inlineprotectedvirtual |
◆ ToStringHelper()
bool anonymous_namespace{descriptor.cpp}::DescriptorImpl::ToStringHelper |
( |
const SigningProvider * |
arg, |
|
|
std::string & |
out, |
|
|
bool |
priv |
|
) |
| const |
|
inline |
◆ m_name
const std::string anonymous_namespace{descriptor.cpp}::DescriptorImpl::m_name |
|
private |
The string name of the descriptor function.
◆ m_pubkey_args
const std::vector<std::unique_ptr<PubkeyProvider> > anonymous_namespace{descriptor.cpp}::DescriptorImpl::m_pubkey_args |
|
private |
Public key arguments for this descriptor (size 1 for PK, PKH, WPKH; any size of Multisig).
◆ m_script_arg
const std::unique_ptr<DescriptorImpl> anonymous_namespace{descriptor.cpp}::DescriptorImpl::m_script_arg |
|
private |
The sub-descriptor argument (nullptr for everything but SH and WSH).
The documentation for this class was generated from the following file: