Bitcoin Core  27.99.0
P2P Digital Currency
external_signer_scriptpubkeyman.h
Go to the documentation of this file.
1 // Copyright (c) 2019-2021 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 
9 
10 #include <memory>
11 
12 namespace wallet {
14 {
15  public:
16  ExternalSignerScriptPubKeyMan(WalletStorage& storage, WalletDescriptor& descriptor, int64_t keypool_size)
17  : DescriptorScriptPubKeyMan(storage, descriptor, keypool_size)
18  {}
19  ExternalSignerScriptPubKeyMan(WalletStorage& storage, int64_t keypool_size)
20  : DescriptorScriptPubKeyMan(storage, keypool_size)
21  {}
22 
26  bool SetupDescriptor(WalletBatch& batch, std::unique_ptr<Descriptor>desc);
27 
29 
30  bool DisplayAddress(const CScript scriptPubKey, const ExternalSigner &signer) const;
31 
32  TransactionError FillPSBT(PartiallySignedTransaction& psbt, const PrecomputedTransactionData& txdata, int sighash_type = 1 /* SIGHASH_ALL */, bool sign = true, bool bip32derivs = false, int* n_signed = nullptr, bool finalize = true) const override;
33 };
34 } // namespace wallet
35 #endif // BITCOIN_WALLET_EXTERNAL_SIGNER_SCRIPTPUBKEYMAN_H
Serialized script, used inside transaction inputs and outputs.
Definition: script.h:414
Enables interaction with an external signing device or service, such as a hardware wallet.
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.
bool SetupDescriptor(WalletBatch &batch, std::unique_ptr< Descriptor >desc)
Provide a descriptor at setup time Returns false if already setup or setup fails, true if setup is su...
ExternalSignerScriptPubKeyMan(WalletStorage &storage, WalletDescriptor &descriptor, int64_t keypool_size)
bool DisplayAddress(const CScript scriptPubKey, const ExternalSigner &signer) const
ExternalSignerScriptPubKeyMan(WalletStorage &storage, int64_t keypool_size)
Access to the wallet database.
Definition: walletdb.h:191
Descriptor with some wallet metadata.
Definition: walletutil.h:85
TransactionError
Definition: error.h:22
A version of CTransaction with the PSBT format.
Definition: psbt.h:947