PartiallySignedTransaction

A version of CTransaction with the PSBT format

Synopsis

Declared in <psbt.h>

class PartiallySignedTransaction;

Member Functions

NameDescription
PartiallySignedTransaction [constructor]Constructors
AddInput Append a new input to this transaction.
AddOutput Append a new output to this transaction.
ComputeTimeLock Compute the effective locktime from the inputs and fallback.
GetUniqueID Compute a stable identifier for this PSBT's underlying transaction.
GetUnsignedTx Reconstruct the unsigned transaction described by this PSBT.
GetVersion Return the PSBT version of this transaction.
Merge Merge psbt into this. The two psbts must have the same underlying CTransaction (i.e. the same actual Bitcoin transaction.)
MergeGlobalXPubs Merge the global xpubs of psbt into this, keeping the existing origin for an xpub seen again with a different one, as the serialized records are keyed by xpub.
Serialize Serialize this transaction to a stream.
Unserialize Deserialize this transaction from a stream.

Data Members

NameDescription
fallback_locktime The fallback locktime used when no input requires one (PSBTv2).
inputs Per-input PSBT data.
m_proprietary Proprietary global key-value records.
m_tx_modifiable Flags describing which parts of the transaction may still be modified.
m_xpubs Global extended public keys, mapping key origin to the set of extended keys sharing it.
outputs Per-output PSBT data.
tx_version The transaction version (PSBTv2).
unknown Unknown global key-value pairs preserved across round-trips.

Non-Member Functions

NameDescription
CombinePSBTsCombines PSBTs with the same underlying transaction, resulting in a single PSBT with all partial signatures from each input.
CountPSBTUnsignedInputsCounts the unsigned inputs of a PSBT.
DecodeBase64PSBTDecode a base64-encoded PSBT into a PartiallySignedTransaction.
DecodeRawPSBTDecode a raw binary PSBT into a PartiallySignedTransaction.
FinalizeAndExtractPSBTFinalizes a PSBT if possible, and extracts it to a CMutableTransaction if it could be finalized.
FinalizePSBTFinalizes a PSBT if possible, combining partial signatures.
PSBTInputSignedAndVerifiedChecks whether a PSBTInput is already signed by doing script verification using final fields.
PrecomputePSBTDataCompute a PrecomputedTransactionData object from a psbt.
RemoveUnnecessaryTransactionsReduces the size of the PSBT by dropping unnecessary non_witness_utxos (i.e. complete previous transactions) from a psbt when all inputs are segwit v1.
node::AnalyzePSBTProvides helpful miscellaneous information about where a PSBT is in the signing workflow.