Bitcoin Core 28.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
12struct bilingual_str;
13
14namespace wallet {
16{
17 public:
18 ExternalSignerScriptPubKeyMan(WalletStorage& storage, WalletDescriptor& descriptor, int64_t keypool_size)
19 : DescriptorScriptPubKeyMan(storage, descriptor, keypool_size)
20 {}
21 ExternalSignerScriptPubKeyMan(WalletStorage& storage, int64_t keypool_size)
22 : DescriptorScriptPubKeyMan(storage, keypool_size)
23 {}
24
28 bool SetupDescriptor(WalletBatch& batch, std::unique_ptr<Descriptor>desc);
29
31
37
38 std::optional<common::PSBTError> 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;
39};
40} // namespace wallet
41#endif // BITCOIN_WALLET_EXTERNAL_SIGNER_SCRIPTPUBKEYMAN_H
std::variant< CNoDestination, PubKeyDestination, PKHash, ScriptHash, WitnessV0ScriptHash, WitnessV0KeyHash, WitnessV1Taproot, PayToAnchor, WitnessUnknown > CTxDestination
A txout script categorized into standard templates.
Definition: addresstype.h:140
Enables interaction with an external signing device or service, such as a hardware wallet.
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)
std::optional< common::PSBTError > 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.
util::Result< void > DisplayAddress(const CTxDestination &dest, const ExternalSigner &signer) const
Display address on the device and verify that the returned value matches.
ExternalSignerScriptPubKeyMan(WalletStorage &storage, int64_t keypool_size)
Access to the wallet database.
Definition: walletdb.h:196
Descriptor with some wallet metadata.
Definition: walletutil.h:85
static int sign(const secp256k1_context *ctx, struct signer_secrets *signer_secrets, struct signer *signer, const secp256k1_musig_keyagg_cache *cache, const unsigned char *msg32, unsigned char *sig64)
Definition: musig.c:105
A version of CTransaction with the PSBT format.
Definition: psbt.h:951
Bilingual messages:
Definition: translation.h:21
Definition: musig.c:30