Bitcoin Core 22.99.0
P2P Digital Currency
psbt.h
Go to the documentation of this file.
1// Copyright (c) 2009-2019 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
16 bool has_utxo;
17 bool is_final;
19
20 std::vector<CKeyID> missing_pubkeys;
21 std::vector<CKeyID> missing_sigs;
24};
25
30 std::optional<size_t> estimated_vsize;
31 std::optional<CFeeRate> estimated_feerate;
32 std::optional<CAmount> fee;
33 std::vector<PSBTInputAnalysis> inputs;
35 std::string error;
36
37 void SetInvalid(std::string err_msg)
38 {
39 estimated_vsize = std::nullopt;
40 estimated_feerate = std::nullopt;
41 fee = std::nullopt;
42 inputs.clear();
44 error = err_msg;
45 }
46};
47
55
56#endif // BITCOIN_NODE_PSBT_H
160-bit opaque blob.
Definition: uint256.h:113
256-bit opaque blob.
Definition: uint256.h:124
PSBTAnalysis AnalyzePSBT(PartiallySignedTransaction psbtx)
Provides helpful miscellaneous information about where a PSBT is in the signing workflow.
Definition: psbt.cpp:15
PSBTRole
Definition: psbt.h:560
Holds the results of AnalyzePSBT (miscellaneous information about a PSBT)
Definition: psbt.h:29
std::optional< size_t > estimated_vsize
Estimated weight of the transaction.
Definition: psbt.h:30
std::optional< CAmount > fee
Amount of fee being paid by the transaction.
Definition: psbt.h:32
std::vector< PSBTInputAnalysis > inputs
More information about the individual inputs of the transaction.
Definition: psbt.h:33
std::string error
Error message.
Definition: psbt.h:35
std::optional< CFeeRate > estimated_feerate
Estimated feerate (fee / weight) of the transaction.
Definition: psbt.h:31
void SetInvalid(std::string err_msg)
Definition: psbt.h:37
PSBTRole next
Which of the BIP 174 roles needs to handle the transaction next.
Definition: psbt.h:34
Holds an analysis of one input from a PSBT.
Definition: psbt.h:15
std::vector< CKeyID > missing_sigs
Pubkeys whose signatures are missing.
Definition: psbt.h:21
std::vector< CKeyID > missing_pubkeys
Pubkeys whose BIP32 derivation path is missing.
Definition: psbt.h:20
bool is_final
Whether the input has all required information including signatures.
Definition: psbt.h:17
PSBTRole next
Which of the BIP 174 roles needs to handle this input next.
Definition: psbt.h:18
uint160 missing_redeem_script
Hash160 of redeem script, if missing.
Definition: psbt.h:22
uint256 missing_witness_script
SHA256 of witness script, if missing.
Definition: psbt.h:23
bool has_utxo
Whether we have UTXO information for this input.
Definition: psbt.h:16
A version of CTransaction with the PSBT format.
Definition: psbt.h:392