![]() |
Bitcoin ABC 0.32.4
P2P Digital Currency
|
A class implementing ScriptPubKeyMan manages some (or all) scriptPubKeys used in a wallet. More...
#include <scriptpubkeyman.h>
Public Member Functions | |
| ScriptPubKeyMan (WalletStorage &storage) | |
| virtual | ~ScriptPubKeyMan () |
| virtual util::Result< CTxDestination > | GetNewDestination (const OutputType type) |
| virtual isminetype | IsMine (const CScript &script) const |
| virtual bool | CheckDecryptionKey (const CKeyingMaterial &master_key, bool accept_no_keys=false) |
| Check that the given decryption key is valid for this ScriptPubKeyMan, i.e. More... | |
| virtual bool | Encrypt (const CKeyingMaterial &master_key, WalletBatch *batch) |
| virtual bool | GetReservedDestination (const OutputType type, bool internal, CTxDestination &address, int64_t &index, CKeyPool &keypool) |
| 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 void | MarkUnusedAddresses (const CScript &script) |
| Mark unused addresses as being used. More... | |
| virtual bool | SetupGeneration (bool force=false) |
| Sets up the key generation stuff, i.e. More... | |
| virtual bool | IsHDEnabled () const |
| virtual bool | CanGetAddresses (bool internal=false) const |
| Returns true if the wallet can give out new addresses. More... | |
| virtual bool | Upgrade (int prev_version, bilingual_str &error) |
| Upgrades the wallet to the specified version. More... | |
| virtual bool | HavePrivateKeys () const |
| virtual void | RewriteDB () |
| The action to do when the DB needs rewrite. More... | |
| virtual int64_t | GetOldestKeyPoolTime () const |
| virtual size_t | KeypoolCountExternalKeys () const |
| 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, SigHashType sighash, std::map< int, std::string > &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 TransactionError | FillPSBT (PartiallySignedTransaction &psbt, SigHashType sighash_type=SigHashType().withForkId(), bool sign=true, bool bip32derivs=false) const |
| Adds script and derivation path information to a PSBT, and optionally signs it. More... | |
| virtual uint256 | GetID () const |
| virtual void | SetInternal (bool internal) |
| template<typename... Params> | |
| void | WalletLogPrintf (std::string fmt, Params... parameters) const |
| Prepends the wallet name in logging output to ease debugging in multi-wallet use cases. More... | |
Public Attributes | |
| boost::signals2::signal< void(bool fHaveWatchOnly)> | NotifyWatchonlyChanged |
| Watch-only address added. More... | |
| boost::signals2::signal< void()> | NotifyCanGetAddressesChanged |
| Keypool has new keys. More... | |
Protected Attributes | |
| WalletStorage & | m_storage |
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.
Definition at line 172 of file scriptpubkeyman.h.
|
inlineexplicit |
Definition at line 177 of file scriptpubkeyman.h.
|
inlinevirtual |
Definition at line 178 of file scriptpubkeyman.h.
|
inlinevirtual |
Returns true if the wallet can give out new addresses.
This means it has keys in the keypool or can generate new keys.
Reimplemented in LegacyScriptPubKeyMan, and DescriptorScriptPubKeyMan.
Definition at line 232 of file scriptpubkeyman.h.
|
inlinevirtual |
Whether this ScriptPubKeyMan can provide a SigningProvider (via GetSolvingProvider) that, combined with sigdata, can produce solving data.
Reimplemented in LegacyScriptPubKeyMan, and DescriptorScriptPubKeyMan.
Definition at line 266 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 LegacyScriptPubKeyMan, and DescriptorScriptPubKeyMan.
Definition at line 187 of file scriptpubkeyman.h.
|
inlinevirtual |
Reimplemented in LegacyScriptPubKeyMan, and DescriptorScriptPubKeyMan.
Definition at line 191 of file scriptpubkeyman.h.
|
inlinevirtual |
Adds script and derivation path information to a PSBT, and optionally signs it.
Reimplemented in LegacyScriptPubKeyMan, and DescriptorScriptPubKeyMan.
Definition at line 291 of file scriptpubkeyman.h.
|
inlinevirtual |
Reimplemented in LegacyScriptPubKeyMan, and DescriptorScriptPubKeyMan.
Definition at line 297 of file scriptpubkeyman.h.
|
inlinevirtual |
Reimplemented in LegacyScriptPubKeyMan, and DescriptorScriptPubKeyMan.
Definition at line 247 of file scriptpubkeyman.h.
|
inlinevirtual |
Reimplemented in LegacyScriptPubKeyMan, and DescriptorScriptPubKeyMan.
Definition at line 252 of file scriptpubkeyman.h.
|
inlinevirtual |
Reimplemented in LegacyScriptPubKeyMan, and DescriptorScriptPubKeyMan.
Definition at line 180 of file scriptpubkeyman.h.
|
inlinevirtual |
Reimplemented in LegacyScriptPubKeyMan, and DescriptorScriptPubKeyMan.
Definition at line 244 of file scriptpubkeyman.h.
|
inlinevirtual |
Reimplemented in LegacyScriptPubKeyMan, and DescriptorScriptPubKeyMan.
Definition at line 196 of file scriptpubkeyman.h.
|
inlinevirtual |
Reimplemented in LegacyScriptPubKeyMan, and DescriptorScriptPubKeyMan.
Definition at line 257 of file scriptpubkeyman.h.
|
inlinevirtual |
Reimplemented in LegacyScriptPubKeyMan, and DescriptorScriptPubKeyMan.
Definition at line 249 of file scriptpubkeyman.h.
|
inlinevirtual |
Reimplemented in LegacyScriptPubKeyMan, and DescriptorScriptPubKeyMan.
Definition at line 239 of file scriptpubkeyman.h.
|
inlinevirtual |
Reimplemented in LegacyScriptPubKeyMan, and DescriptorScriptPubKeyMan.
Definition at line 226 of file scriptpubkeyman.h.
|
inlinevirtual |
Reimplemented in LegacyScriptPubKeyMan, and DescriptorScriptPubKeyMan.
Definition at line 183 of file scriptpubkeyman.h.
|
inlinevirtual |
Reimplemented in LegacyScriptPubKeyMan.
Definition at line 201 of file scriptpubkeyman.h.
|
inlinevirtual |
Reimplemented in LegacyScriptPubKeyMan, and DescriptorScriptPubKeyMan.
Definition at line 246 of file scriptpubkeyman.h.
|
inlinevirtual |
Mark unused addresses as being used.
Reimplemented in LegacyScriptPubKeyMan, and DescriptorScriptPubKeyMan.
Definition at line 215 of file scriptpubkeyman.h.
|
inlinevirtual |
Reimplemented in LegacyScriptPubKeyMan, and DescriptorScriptPubKeyMan.
Definition at line 202 of file scriptpubkeyman.h.
|
inlinevirtual |
The action to do when the DB needs rewrite.
Reimplemented in LegacyScriptPubKeyMan.
Definition at line 242 of file scriptpubkeyman.h.
|
inlinevirtual |
Reimplemented in LegacyScriptPubKeyMan, and DescriptorScriptPubKeyMan.
Definition at line 299 of file scriptpubkeyman.h.
|
inlinevirtual |
Sets up the key generation stuff, i.e.
generates new HD seeds and sets them as active. Returns false if already setup or setup fails, true if setup is successful Set force=true to make it re-setup if already setup, used for upgrades
Reimplemented in LegacyScriptPubKeyMan.
Definition at line 223 of file scriptpubkeyman.h.
|
inlinevirtual |
Sign a message with the given script.
Reimplemented in LegacyScriptPubKeyMan, and DescriptorScriptPubKeyMan.
Definition at line 281 of file scriptpubkeyman.h.
|
inlinevirtual |
Creates new signatures and adds them to the transaction.
Returns whether all inputs were signed
Reimplemented in LegacyScriptPubKeyMan, and DescriptorScriptPubKeyMan.
Definition at line 275 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 LegacyScriptPubKeyMan, and DescriptorScriptPubKeyMan.
Definition at line 212 of file scriptpubkeyman.h.
|
inlinevirtual |
Upgrades the wallet to the specified version.
Reimplemented in LegacyScriptPubKeyMan.
Definition at line 235 of file scriptpubkeyman.h.
|
inline |
Prepends the wallet name in logging output to ease debugging in multi-wallet use cases.
Definition at line 306 of file scriptpubkeyman.h.
|
protected |
Definition at line 174 of file scriptpubkeyman.h.
| boost::signals2::signal<void()> ScriptPubKeyMan::NotifyCanGetAddressesChanged |
Keypool has new keys.
Definition at line 315 of file scriptpubkeyman.h.
| boost::signals2::signal<void(bool fHaveWatchOnly)> ScriptPubKeyMan::NotifyWatchonlyChanged |
Watch-only address added.
Definition at line 312 of file scriptpubkeyman.h.