Bitcoin Core
31.1.0
P2P Digital Currency
Toggle main menu visibility
Loading...
Searching...
No Matches
src
node
psbt.h
Go to the documentation of this file.
1
// Copyright (c) 2009-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_NODE_PSBT_H
6
#define BITCOIN_NODE_PSBT_H
7
8
#include <
psbt.h
>
9
10
#include <optional>
11
12
namespace
node
{
16
struct
PSBTInputAnalysis
{
17
bool
has_utxo
;
18
bool
is_final
;
19
PSBTRole
next
;
20
21
std::vector<CKeyID>
missing_pubkeys
;
22
std::vector<CKeyID>
missing_sigs
;
23
uint160
missing_redeem_script
;
24
uint256
missing_witness_script
;
25
};
26
30
struct
PSBTAnalysis
{
31
std::optional<size_t>
estimated_vsize
;
32
std::optional<CFeeRate>
estimated_feerate
;
33
std::optional<CAmount>
fee
;
34
std::vector<PSBTInputAnalysis>
inputs
;
35
PSBTRole
next
;
36
std::string
error
;
37
38
void
SetInvalid
(std::string err_msg)
39
{
40
estimated_vsize
= std::nullopt;
41
estimated_feerate
= std::nullopt;
42
fee
= std::nullopt;
43
inputs
.clear();
44
next
=
PSBTRole::CREATOR
;
45
error
= err_msg;
46
}
47
};
48
55
PSBTAnalysis
AnalyzePSBT
(
PartiallySignedTransaction
psbtx);
56
}
// namespace node
57
58
#endif
// BITCOIN_NODE_PSBT_H
uint160
160-bit opaque blob.
Definition
uint256.h:183
uint256
256-bit opaque blob.
Definition
uint256.h:195
node
Definition
messages.h:21
node::AnalyzePSBT
PSBTAnalysis AnalyzePSBT(PartiallySignedTransaction psbtx)
Provides helpful miscellaneous information about where a PSBT is in the signing workflow.
Definition
psbt.cpp:16
psbt.h
PSBTRole
PSBTRole
Definition
psbt.h:1406
PSBTRole::CREATOR
@ CREATOR
Definition
psbt.h:1407
PSBTAnalysis
Holds the results of AnalyzePSBT (miscellaneous information about a PSBT).
Definition
psbt.h:30
PartiallySignedTransaction
A version of CTransaction with the PSBT format.
Definition
psbt.h:1139
node::PSBTAnalysis
Holds the results of AnalyzePSBT (miscellaneous information about a PSBT).
Definition
psbt.h:30
node::PSBTAnalysis::inputs
std::vector< PSBTInputAnalysis > inputs
More information about the individual inputs of the transaction.
Definition
psbt.h:34
node::PSBTAnalysis::SetInvalid
void SetInvalid(std::string err_msg)
Definition
psbt.h:38
node::PSBTAnalysis::error
std::string error
Error message.
Definition
psbt.h:36
node::PSBTAnalysis::fee
std::optional< CAmount > fee
Amount of fee being paid by the transaction.
Definition
psbt.h:33
node::PSBTAnalysis::estimated_vsize
std::optional< size_t > estimated_vsize
Estimated weight of the transaction.
Definition
psbt.h:31
node::PSBTAnalysis::estimated_feerate
std::optional< CFeeRate > estimated_feerate
Estimated feerate (fee / weight) of the transaction.
Definition
psbt.h:32
node::PSBTAnalysis::next
PSBTRole next
Which of the BIP 174 roles needs to handle the transaction next.
Definition
psbt.h:35
node::PSBTInputAnalysis
Holds an analysis of one input from a PSBT.
Definition
psbt.h:16
node::PSBTInputAnalysis::missing_witness_script
uint256 missing_witness_script
SHA256 of witness script, if missing.
Definition
psbt.h:24
node::PSBTInputAnalysis::missing_sigs
std::vector< CKeyID > missing_sigs
Pubkeys whose signatures are missing.
Definition
psbt.h:22
node::PSBTInputAnalysis::has_utxo
bool has_utxo
Whether we have UTXO information for this input.
Definition
psbt.h:17
node::PSBTInputAnalysis::next
PSBTRole next
Which of the BIP 174 roles needs to handle this input next.
Definition
psbt.h:19
node::PSBTInputAnalysis::missing_pubkeys
std::vector< CKeyID > missing_pubkeys
Pubkeys whose BIP32 derivation path is missing.
Definition
psbt.h:21
node::PSBTInputAnalysis::missing_redeem_script
uint160 missing_redeem_script
Hash160 of redeem script, if missing.
Definition
psbt.h:23
node::PSBTInputAnalysis::is_final
bool is_final
Whether the input has all required information including signatures.
Definition
psbt.h:18
Generated on
for Bitcoin Core by
1.17.0