Bitcoin Core  21.99.0
P2P Digital Currency
external_signer_scriptpubkeyman.h
Go to the documentation of this file.
1 // Copyright (c) 2019-2020 The Bitcoin Core developers
2 // Distributed under the MIT software license, see the accompanying
3 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
4 
5 #ifndef BITCOIN_WALLET_EXTERNAL_SIGNER_SCRIPTPUBKEYMAN_H
6 #define BITCOIN_WALLET_EXTERNAL_SIGNER_SCRIPTPUBKEYMAN_H
7 
8 #ifdef ENABLE_EXTERNAL_SIGNER
10 
12 {
13  public:
15  : DescriptorScriptPubKeyMan(storage, descriptor)
16  {}
18  : DescriptorScriptPubKeyMan(storage, internal)
19  {}
20 
24  bool SetupDescriptor(std::unique_ptr<Descriptor>desc);
25 
27 
28  bool DisplayAddress(const CScript scriptPubKey, const ExternalSigner &signer) const;
29 
30  TransactionError FillPSBT(PartiallySignedTransaction& psbt, int sighash_type = 1 /* SIGHASH_ALL */, bool sign = true, bool bip32derivs = false, int* n_signed = nullptr) const override;
31 };
32 #endif
33 
34 #endif // BITCOIN_WALLET_EXTERNAL_SIGNER_SCRIPTPUBKEYMAN_H
ExternalSignerScriptPubKeyMan::DisplayAddress
bool DisplayAddress(const CScript scriptPubKey, const ExternalSigner &signer) const
Definition: external_signer_scriptpubkeyman.cpp:46
ExternalSignerScriptPubKeyMan
Definition: external_signer_scriptpubkeyman.h:11
scriptpubkeyman.h
DescriptorScriptPubKeyMan
Definition: scriptpubkeyman.h:517
TransactionError
TransactionError
Definition: error.h:22
WalletStorage
Definition: scriptpubkeyman.h:32
ExternalSignerScriptPubKeyMan::SetupDescriptor
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 su...
Definition: external_signer_scriptpubkeyman.cpp:11
ExternalSignerScriptPubKeyMan::ExternalSignerScriptPubKeyMan
ExternalSignerScriptPubKeyMan(WalletStorage &storage, bool internal)
Definition: external_signer_scriptpubkeyman.h:17
CScript
Serialized script, used inside transaction inputs and outputs.
Definition: script.h:404
ExternalSigner
Enables interaction with an external signing device or service, such as a hardware wallet.
Definition: external_signer.h:22
PartiallySignedTransaction
A version of CTransaction with the PSBT format.
Definition: psbt.h:391
ExternalSignerScriptPubKeyMan::GetExternalSigner
static ExternalSigner GetExternalSigner()
Definition: external_signer_scriptpubkeyman.cpp:36
WalletDescriptor
Descriptor with some wallet metadata.
Definition: walletutil.h:72
ExternalSignerScriptPubKeyMan::FillPSBT
TransactionError FillPSBT(PartiallySignedTransaction &psbt, int sighash_type=1, bool sign=true, bool bip32derivs=false, int *n_signed=nullptr) const override
Adds script and derivation path information to a PSBT, and optionally signs it.
Definition: external_signer_scriptpubkeyman.cpp:58
ExternalSignerScriptPubKeyMan::ExternalSignerScriptPubKeyMan
ExternalSignerScriptPubKeyMan(WalletStorage &storage, WalletDescriptor &descriptor)
Definition: external_signer_scriptpubkeyman.h:14