![]() |
Bitcoin Core 29.99.0
P2P Digital Currency
|
#include <scriptpubkeyman.h>
Public Member Functions | |
ScriptPubKeyMan (WalletStorage &storage) | |
virtual | ~ScriptPubKeyMan ()=default |
virtual util::Result< CTxDestination > | GetNewDestination (const OutputType type) |
virtual bool | IsMine (const CScript &script) const |
virtual bool | CheckDecryptionKey (const CKeyingMaterial &master_key) |
Check that the given decryption key is valid for this ScriptPubKeyMan, i.e. it decrypts all of the keys handled by it. More... | |
virtual bool | Encrypt (const CKeyingMaterial &master_key, WalletBatch *batch) |
virtual util::Result< CTxDestination > | GetReservedDestination (const OutputType type, bool internal, int64_t &index) |
virtual void | KeepDestination (int64_t index, const OutputType &type) |
virtual void | ReturnDestination (int64_t index, bool internal, const CTxDestination &addr) |
virtual bool | TopUp (unsigned int size=0) |
Fills internal address pool. More... | |
virtual std::vector< WalletDestination > | MarkUnusedAddresses (const CScript &script) |
Mark unused addresses as being used Affects all keys up to and including the one determined by provided script. More... | |
virtual bool | IsHDEnabled () const |
virtual bool | CanGetAddresses (bool internal=false) const |
virtual bool | HavePrivateKeys () const |
virtual bool | HaveCryptedKeys () const |
virtual void | RewriteDB () |
The action to do when the DB needs rewrite. More... | |
virtual unsigned int | GetKeyPoolSize () const |
virtual int64_t | GetTimeFirstKey () const |
virtual std::unique_ptr< CKeyMetadata > | GetMetadata (const CTxDestination &dest) const |
virtual std::unique_ptr< SigningProvider > | GetSolvingProvider (const CScript &script) const |
virtual bool | CanProvide (const CScript &script, SignatureData &sigdata) |
Whether this ScriptPubKeyMan can provide a SigningProvider (via GetSolvingProvider) that, combined with sigdata, can produce solving data. More... | |
virtual bool | SignTransaction (CMutableTransaction &tx, const std::map< COutPoint, Coin > &coins, int sighash, std::map< int, bilingual_str > &input_errors) const |
Creates new signatures and adds them to the transaction. More... | |
virtual SigningResult | SignMessage (const std::string &message, const PKHash &pkhash, std::string &str_sig) const |
Sign a message with the given script. More... | |
virtual std::optional< common::PSBTError > | FillPSBT (PartiallySignedTransaction &psbt, const PrecomputedTransactionData &txdata, std::optional< int > sighash_type=std::nullopt, bool sign=true, bool bip32derivs=false, int *n_signed=nullptr, bool finalize=true) const |
Adds script and derivation path information to a PSBT, and optionally signs it. More... | |
virtual uint256 | GetID () const |
virtual std::unordered_set< CScript, SaltedSipHasher > | GetScriptPubKeys () const |
Returns a set of all the scriptPubKeys that this ScriptPubKeyMan watches. More... | |
template<typename... Params> | |
void | WalletLogPrintf (util::ConstevalFormatString< sizeof...(Params)> wallet_fmt, const Params &... params) const |
Prepends the wallet name in logging output to ease debugging in multi-wallet use cases. More... | |
Public Attributes | |
boost::signals2::signal< void()> | NotifyCanGetAddressesChanged |
Keypool has new keys. More... | |
boost::signals2::signal< void(const ScriptPubKeyMan *spkm, int64_t new_birth_time)> | NotifyFirstKeyTimeChanged |
Birth time changed. More... | |
Protected Attributes | |
WalletStorage & | m_storage |
Definition at line 79 of file scriptpubkeyman.h.
|
inlineexplicit |
Definition at line 85 of file scriptpubkeyman.h.
|
virtualdefault |
|
inlinevirtual |
Reimplemented in wallet::DescriptorScriptPubKeyMan.
Definition at line 117 of file scriptpubkeyman.h.
|
inlinevirtual |
Whether this ScriptPubKeyMan can provide a SigningProvider (via GetSolvingProvider) that, combined with sigdata, can produce solving data.
Reimplemented in wallet::LegacyDataSPKM, and wallet::DescriptorScriptPubKeyMan.
Definition at line 136 of file scriptpubkeyman.h.
|
inlinevirtual |
Check that the given decryption key is valid for this ScriptPubKeyMan, i.e. it decrypts all of the keys handled by it.
Reimplemented in wallet::LegacyDataSPKM, and wallet::DescriptorScriptPubKeyMan.
Definition at line 91 of file scriptpubkeyman.h.
|
inlinevirtual |
Reimplemented in wallet::DescriptorScriptPubKeyMan.
Definition at line 92 of file scriptpubkeyman.h.
|
inlinevirtual |
Adds script and derivation path information to a PSBT, and optionally signs it.
Reimplemented in wallet::ExternalSignerScriptPubKeyMan, and wallet::DescriptorScriptPubKeyMan.
Definition at line 143 of file scriptpubkeyman.h.
|
inlinevirtual |
Reimplemented in wallet::LegacyDataSPKM, and wallet::DescriptorScriptPubKeyMan.
Definition at line 145 of file scriptpubkeyman.h.
|
inlinevirtual |
Reimplemented in wallet::DescriptorScriptPubKeyMan.
Definition at line 125 of file scriptpubkeyman.h.
|
inlinevirtual |
Reimplemented in wallet::DescriptorScriptPubKeyMan.
Definition at line 129 of file scriptpubkeyman.h.
|
inlinevirtual |
Reimplemented in wallet::DescriptorScriptPubKeyMan.
Definition at line 87 of file scriptpubkeyman.h.
|
inlinevirtual |
Reimplemented in wallet::DescriptorScriptPubKeyMan.
Definition at line 94 of file scriptpubkeyman.h.
|
inlinevirtual |
Returns a set of all the scriptPubKeys that this ScriptPubKeyMan watches.
Reimplemented in wallet::LegacyDataSPKM, and wallet::DescriptorScriptPubKeyMan.
Definition at line 148 of file scriptpubkeyman.h.
|
inlinevirtual |
Reimplemented in wallet::LegacyDataSPKM, and wallet::DescriptorScriptPubKeyMan.
Definition at line 131 of file scriptpubkeyman.h.
|
inlinevirtual |
Reimplemented in wallet::DescriptorScriptPubKeyMan.
Definition at line 127 of file scriptpubkeyman.h.
|
inlinevirtual |
Reimplemented in wallet::DescriptorScriptPubKeyMan.
Definition at line 120 of file scriptpubkeyman.h.
|
inlinevirtual |
Reimplemented in wallet::DescriptorScriptPubKeyMan.
Definition at line 119 of file scriptpubkeyman.h.
|
inlinevirtual |
Reimplemented in wallet::DescriptorScriptPubKeyMan.
Definition at line 114 of file scriptpubkeyman.h.
|
inlinevirtual |
Reimplemented in wallet::LegacyDataSPKM, and wallet::DescriptorScriptPubKeyMan.
Definition at line 88 of file scriptpubkeyman.h.
|
inlinevirtual |
|
inlinevirtual |
Mark unused addresses as being used Affects all keys up to and including the one determined by provided script.
script | determines the last key to mark as used |
Reimplemented in wallet::DescriptorScriptPubKeyMan.
Definition at line 111 of file scriptpubkeyman.h.
|
inlinevirtual |
Reimplemented in wallet::DescriptorScriptPubKeyMan.
Definition at line 96 of file scriptpubkeyman.h.
|
inlinevirtual |
The action to do when the DB needs rewrite.
Definition at line 123 of file scriptpubkeyman.h.
|
inlinevirtual |
Sign a message with the given script.
Reimplemented in wallet::DescriptorScriptPubKeyMan.
Definition at line 141 of file scriptpubkeyman.h.
|
inlinevirtual |
Creates new signatures and adds them to the transaction.
Returns whether all inputs were signed
Reimplemented in wallet::DescriptorScriptPubKeyMan.
Definition at line 139 of file scriptpubkeyman.h.
|
inlinevirtual |
Fills internal address pool.
Use within ScriptPubKeyMan implementations should be used sparingly and only when something from the address pool is removed, excluding GetNewDestination and GetReservedDestination. External wallet code is primarily responsible for topping up prior to fetching new addresses
Reimplemented in wallet::DescriptorScriptPubKeyMan.
Definition at line 102 of file scriptpubkeyman.h.
|
inline |
Prepends the wallet name in logging output to ease debugging in multi-wallet use cases.
Definition at line 152 of file scriptpubkeyman.h.
|
protected |
Definition at line 82 of file scriptpubkeyman.h.
boost::signals2::signal<void ()> wallet::ScriptPubKeyMan::NotifyCanGetAddressesChanged |
Keypool has new keys.
Definition at line 158 of file scriptpubkeyman.h.
boost::signals2::signal<void (const ScriptPubKeyMan* spkm, int64_t new_birth_time)> wallet::ScriptPubKeyMan::NotifyFirstKeyTimeChanged |
Birth time changed.
Definition at line 161 of file scriptpubkeyman.h.