Bitcoin Core  22.99.0
P2P Digital Currency
Public Member Functions | Static Public Member Functions | List of all members
ExternalSignerScriptPubKeyMan Class Reference

#include <external_signer_scriptpubkeyman.h>

Inheritance diagram for ExternalSignerScriptPubKeyMan:
[legend]
Collaboration diagram for ExternalSignerScriptPubKeyMan:
[legend]

Public Member Functions

 ExternalSignerScriptPubKeyMan (WalletStorage &storage, WalletDescriptor &descriptor)
 
 ExternalSignerScriptPubKeyMan (WalletStorage &storage)
 
bool SetupDescriptor (std::unique_ptr< Descriptor >desc)
 Provide a descriptor at setup time Returns false if already setup or setup fails, true if setup is successful. More...
 
bool DisplayAddress (const CScript scriptPubKey, const ExternalSigner &signer) const
 
TransactionError FillPSBT (PartiallySignedTransaction &psbt, const PrecomputedTransactionData &txdata, int sighash_type=1, bool sign=true, bool bip32derivs=false, int *n_signed=nullptr, bool finalize=true) const override
 Adds script and derivation path information to a PSBT, and optionally signs it. More...
 
- Public Member Functions inherited from DescriptorScriptPubKeyMan
 DescriptorScriptPubKeyMan (WalletStorage &storage, WalletDescriptor &descriptor)
 
 DescriptorScriptPubKeyMan (WalletStorage &storage)
 
bool GetNewDestination (const OutputType type, CTxDestination &dest, bilingual_str &error) override
 
isminetype IsMine (const CScript &script) const override
 
bool CheckDecryptionKey (const CKeyingMaterial &master_key, bool accept_no_keys=false) override
 Check that the given decryption key is valid for this ScriptPubKeyMan, i.e. it decrypts all of the keys handled by it. More...
 
bool Encrypt (const CKeyingMaterial &master_key, WalletBatch *batch) override
 
bool GetReservedDestination (const OutputType type, bool internal, CTxDestination &address, int64_t &index, CKeyPool &keypool, bilingual_str &error) override
 
void ReturnDestination (int64_t index, bool internal, const CTxDestination &addr) override
 
bool TopUp (unsigned int size=0) override
 Fills internal address pool. More...
 
std::vector< WalletDestinationMarkUnusedAddresses (const CScript &script) override
 Mark unused addresses as being used Affects all keys up to and including the one determined by provided script. More...
 
bool IsHDEnabled () const override
 
bool SetupDescriptorGeneration (const CExtKey &master_key, OutputType addr_type, bool internal)
 Setup descriptors based on the given CExtkey. More...
 
bool SetupDescriptor (std::unique_ptr< Descriptor >desc)
 Provide a descriptor at setup time Returns false if already setup or setup fails, true if setup is successful. More...
 
bool HavePrivateKeys () const override
 
std::optional< int64_t > GetOldestKeyPoolTime () const override
 
unsigned int GetKeyPoolSize () const override
 
int64_t GetTimeFirstKey () const override
 
std::unique_ptr< CKeyMetadataGetMetadata (const CTxDestination &dest) const override
 
bool CanGetAddresses (bool internal=false) const override
 
std::unique_ptr< SigningProviderGetSolvingProvider (const CScript &script) const override
 
bool CanProvide (const CScript &script, SignatureData &sigdata) override
 Whether this ScriptPubKeyMan can provide a SigningProvider (via GetSolvingProvider) that, combined with sigdata, can produce solving data. More...
 
bool SignTransaction (CMutableTransaction &tx, const std::map< COutPoint, Coin > &coins, int sighash, std::map< int, bilingual_str > &input_errors) const override
 Creates new signatures and adds them to the transaction. More...
 
SigningResult SignMessage (const std::string &message, const PKHash &pkhash, std::string &str_sig) const override
 Sign a message with the given script. More...
 
TransactionError FillPSBT (PartiallySignedTransaction &psbt, const PrecomputedTransactionData &txdata, int sighash_type=1, bool sign=true, bool bip32derivs=false, int *n_signed=nullptr, bool finalize=true) const override
 Adds script and derivation path information to a PSBT, and optionally signs it. More...
 
uint256 GetID () const override
 
void SetCache (const DescriptorCache &cache)
 
bool AddKey (const CKeyID &key_id, const CKey &key)
 
bool AddCryptedKey (const CKeyID &key_id, const CPubKey &pubkey, const std::vector< unsigned char > &crypted_key)
 
bool HasWalletDescriptor (const WalletDescriptor &desc) const
 
void UpdateWalletDescriptor (WalletDescriptor &descriptor)
 
bool CanUpdateToWalletDescriptor (const WalletDescriptor &descriptor, std::string &error)
 
void AddDescriptorKey (const CKey &key, const CPubKey &pubkey)
 
void WriteDescriptor ()
 
const WalletDescriptor GetWalletDescriptor () const EXCLUSIVE_LOCKS_REQUIRED(cs_desc_man)
 
const std::vector< CScriptGetScriptPubKeys () const
 
bool GetDescriptorString (std::string &out, const bool priv) const
 
void UpgradeDescriptorCache ()
 
- Public Member Functions inherited from ScriptPubKeyMan
 ScriptPubKeyMan (WalletStorage &storage)
 
virtual ~ScriptPubKeyMan ()
 
virtual void KeepDestination (int64_t index, const OutputType &type)
 
virtual bool SetupGeneration (bool force=false)
 Sets up the key generation stuff, i.e. More...
 
virtual bool Upgrade (int prev_version, int new_version, bilingual_str &error)
 Upgrades the wallet to the specified version. More...
 
virtual void RewriteDB ()
 The action to do when the DB needs rewrite. More...
 
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...
 

Static Public Member Functions

static ExternalSigner GetExternalSigner ()
 

Additional Inherited Members

- Public Attributes inherited from DescriptorScriptPubKeyMan
RecursiveMutex cs_desc_man
 
- Public Attributes inherited from ScriptPubKeyMan
boost::signals2::signal< void(bool fHaveWatchOnly)> NotifyWatchonlyChanged
 Watch-only address added. More...
 
boost::signals2::signal< void()> NotifyCanGetAddressesChanged
 Keypool has new keys. More...
 
- Protected Member Functions inherited from DescriptorScriptPubKeyMan
WalletDescriptor m_wallet_descriptor GUARDED_BY (cs_desc_man)
 
- Protected Attributes inherited from ScriptPubKeyMan
WalletStoragem_storage
 

Detailed Description

Definition at line 12 of file external_signer_scriptpubkeyman.h.

Constructor & Destructor Documentation

◆ ExternalSignerScriptPubKeyMan() [1/2]

ExternalSignerScriptPubKeyMan::ExternalSignerScriptPubKeyMan ( WalletStorage storage,
WalletDescriptor descriptor 
)
inline

Definition at line 15 of file external_signer_scriptpubkeyman.h.

◆ ExternalSignerScriptPubKeyMan() [2/2]

ExternalSignerScriptPubKeyMan::ExternalSignerScriptPubKeyMan ( WalletStorage storage)
inline

Definition at line 18 of file external_signer_scriptpubkeyman.h.

Member Function Documentation

◆ DisplayAddress()

bool ExternalSignerScriptPubKeyMan::DisplayAddress ( const CScript  scriptPubKey,
const ExternalSigner signer 
) const

Definition at line 51 of file external_signer_scriptpubkeyman.cpp.

Here is the call graph for this function:

◆ FillPSBT()

TransactionError ExternalSignerScriptPubKeyMan::FillPSBT ( PartiallySignedTransaction psbt,
const PrecomputedTransactionData txdata,
int  sighash_type = 1,
bool  sign = true,
bool  bip32derivs = false,
int *  n_signed = nullptr,
bool  finalize = true 
) const
overridevirtual

Adds script and derivation path information to a PSBT, and optionally signs it.

Reimplemented from ScriptPubKeyMan.

Definition at line 63 of file external_signer_scriptpubkeyman.cpp.

Here is the call graph for this function:

◆ GetExternalSigner()

ExternalSigner ExternalSignerScriptPubKeyMan::GetExternalSigner ( )
static

Definition at line 41 of file external_signer_scriptpubkeyman.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ SetupDescriptor()

bool ExternalSignerScriptPubKeyMan::SetupDescriptor ( std::unique_ptr< Descriptor desc)

Provide a descriptor at setup time Returns false if already setup or setup fails, true if setup is successful.

Definition at line 16 of file external_signer_scriptpubkeyman.cpp.

Here is the call graph for this function:

The documentation for this class was generated from the following files: