Bitcoin Core
31.1.0
P2P Digital Currency
Toggle main menu visibility
Loading...
Searching...
No Matches
src
wallet
external_signer_scriptpubkeyman.h
Go to the documentation of this file.
1
// Copyright (c) 2019-present 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
#include <
wallet/scriptpubkeyman.h
>
9
10
#include <memory>
11
#include <
util/result.h
>
12
13
struct
bilingual_str
;
14
15
namespace
wallet
{
16
class
ExternalSignerScriptPubKeyMan
:
public
DescriptorScriptPubKeyMan
17
{
18
public
:
19
ExternalSignerScriptPubKeyMan
(
WalletStorage
& storage,
WalletDescriptor
& descriptor, int64_t keypool_size)
20
:
DescriptorScriptPubKeyMan
(storage, descriptor, keypool_size)
21
{}
22
ExternalSignerScriptPubKeyMan
(
WalletStorage
& storage, int64_t keypool_size)
23
:
DescriptorScriptPubKeyMan
(storage, keypool_size)
24
{}
25
29
bool
SetupDescriptor
(
WalletBatch
& batch, std::unique_ptr<Descriptor>desc);
30
31
static
util::Result<ExternalSigner>
GetExternalSigner
();
32
37
util::Result<void>
DisplayAddress
(
const
CTxDestination
& dest,
const
ExternalSigner
&
signer
)
const
;
38
39
std::optional<common::PSBTError>
FillPSBT
(
PartiallySignedTransaction
& psbt,
const
PrecomputedTransactionData
& txdata, std::optional<int> sighash_type = std::nullopt,
bool
sign
=
true
,
bool
bip32derivs =
false
,
int
* n_signed =
nullptr
,
bool
finalize =
true
)
const override
;
40
};
41
}
// namespace wallet
42
#endif
// BITCOIN_WALLET_EXTERNAL_SIGNER_SCRIPTPUBKEYMAN_H
CTxDestination
std::variant< CNoDestination, PubKeyDestination, PKHash, ScriptHash, WitnessV0ScriptHash, WitnessV0KeyHash, WitnessV1Taproot, PayToAnchor, WitnessUnknown > CTxDestination
A txout script categorized into standard templates.
Definition
addresstype.h:143
ExternalSigner
Definition
external_signer.h:19
util::Result
Definition
result.h:36
wallet::DescriptorScriptPubKeyMan::DescriptorScriptPubKeyMan
DescriptorScriptPubKeyMan(WalletStorage &storage, WalletDescriptor &descriptor, int64_t keypool_size)
Definition
scriptpubkeyman.h:328
wallet::ExternalSignerScriptPubKeyMan::SetupDescriptor
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...
Definition
external_signer_scriptpubkeyman.cpp:24
wallet::ExternalSignerScriptPubKeyMan::ExternalSignerScriptPubKeyMan
ExternalSignerScriptPubKeyMan(WalletStorage &storage, WalletDescriptor &descriptor, int64_t keypool_size)
Definition
external_signer_scriptpubkeyman.h:19
wallet::ExternalSignerScriptPubKeyMan::GetExternalSigner
static util::Result< ExternalSigner > GetExternalSigner()
Definition
external_signer_scriptpubkeyman.cpp:48
wallet::ExternalSignerScriptPubKeyMan::FillPSBT
std::optional< common::PSBTError > FillPSBT(PartiallySignedTransaction &psbt, const PrecomputedTransactionData &txdata, std::optional< int > sighash_type=std::nullopt, 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.
Definition
external_signer_scriptpubkeyman.cpp:82
wallet::ExternalSignerScriptPubKeyMan::DisplayAddress
util::Result< void > DisplayAddress(const CTxDestination &dest, const ExternalSigner &signer) const
Display address on the device and verify that the returned value matches.
Definition
external_signer_scriptpubkeyman.cpp:59
wallet::ExternalSignerScriptPubKeyMan::ExternalSignerScriptPubKeyMan
ExternalSignerScriptPubKeyMan(WalletStorage &storage, int64_t keypool_size)
Definition
external_signer_scriptpubkeyman.h:22
wallet::WalletBatch
Access to the wallet database.
Definition
walletdb.h:193
wallet::WalletDescriptor
Descriptor with some wallet metadata.
Definition
walletutil.h:64
wallet::WalletStorage
Definition
scriptpubkeyman.h:44
sign
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:106
wallet
Definition
wallet_balance.cpp:26
result.h
scriptpubkeyman.h
PartiallySignedTransaction
A version of CTransaction with the PSBT format.
Definition
psbt.h:1139
PrecomputedTransactionData
Definition
interpreter.h:164
bilingual_str
Bilingual messages:
Definition
translation.h:24
signer
Definition
musig.c:31
Generated on
for Bitcoin Core by
1.17.0