A ScriptPubKeyMan backed by a single output descriptor.
Synopsis
Declared in <wallet/scriptpubkeyman.h>
class DescriptorScriptPubKeyMan
: public ScriptPubKeyMan
Base Classes
Name |
Description |
A class implementing ScriptPubKeyMan manages some (or all) scriptPubKeys used in a wallet. It contains the scripts and keys related to the scriptPubKeys it manages. A ScriptPubKeyMan will be able to give out scriptPubKeys to be used, as well as marking when a scriptPubKey has been used. It also handles when and how to store a scriptPubKey and its related scripts and keys, including encryption. |
Member Functions
Name |
Description |
|
Returns whether this spkm can hand out new addresses. |
|
Returns whether this spkm can contribute solving data for the given script. |
Returns whether this spkm can be updated to the given descriptor. |
|
|
Checks whether the given master key decrypts this spkm's keys. |
|
Encrypts this spkm's keys with the given master key. |
|
Adds descriptor and derivation information to a PSBT and optionally signs it. |
Serializes the descriptor to a string, optionally including private keys. |
|
Returns the end of the descriptor's derivation range. |
|
|
Returns a stable identifier for this spkm derived from its descriptor. |
Retrieve the particular key if it is available. Returns nullopt if the key is not in the wallet, or if the wallet is locked. |
|
|
Returns the number of pre‐generated keys/scripts in the cache. |
|
Returns the key metadata for the given destination, or nullptr if none is known. |
|
|
|
|
|
|
Fetch the SigningProvider for the given pubkey and always include private keys. This should only be called by signing code. |
|
|
Returns a SigningProvider able to solve the given script. |
|
Returns the creation time of the descriptor, used as the wallet's birth time. |
Returns a copy of this spkm's wallet descriptor. |
|
Returns whether the private key for the given key id is present. |
|
Returns whether this spkm holds the given wallet descriptor. |
|
|
Returns whether this spkm holds any encrypted private keys. |
|
Returns whether this spkm holds any unencrypted private keys. |
|
Returns whether this descriptor uses HD derivation. |
|
Returns whether the given script is derived from this descriptor. |
|
Marks a previously reserved destination as used so it is not handed out again. |
|
Marks addresses up to and including the one for the given script as used. |
|
Returns a previously reserved destination to the cache for reuse. |
|
Signs a message with the key for the given script. |
|
Creates signatures for this spkm's inputs and adds them to the transaction. |
|
Tops up the descriptor cache and m_map_script_pub_keys. The cache is stored in the wallet file and is used to expand the descriptor in GetNewDestination. Descriptor wallets rely more on ephemeral data than legacy wallets. For wallets using unhardened derivation (with or without private keys), the "keypool" is a single xpub. |
Updates this spkm's descriptor, e.g. to add private keys or cache data. |
|
Upgrades the on‐disk descriptor cache to the current format. |
|
Prepends the wallet name in logging output to ease debugging in multi‐wallet use cases |
|
Writes this spkm's descriptor to the wallet database. |
Static Member Functions
Name |
Description |
Creates a DescriptorScriptPubKeyMan from an imported descriptor and signing provider. |
|
Creates a DescriptorScriptPubKeyMan while migrating a legacy wallet. |
|
Generates a new single‐signature DescriptorScriptPubKeyMan from a master key. |
|
Loads a DescriptorScriptPubKeyMan from stored wallet data. |
Data Members
Name |
Description |
Keypool has new keys |
|
Birth time changed |
|
Guards this spkm's descriptor, key, and cache state. |
Protected Member Functions
Name |
Description |
|
Constructors |
Rewinds the descriptor's next‐index counter by one. |
|
Advances the descriptor's next‐index counter by one. |
|
Sets the end of the descriptor's derivation range. |
|
Same as 'TopUp' but designed for use within a batch transaction context |
Protected Data Members
Name |
Description |
The wallet storage this ScriptPubKeyMan uses to persist and query wallet‐wide state. |
|
The wallet descriptor backing this spkm. |
Created with MrDocs