A structure for PSBTs which contain per‐input information

Synopsis

Declared in <psbt.h>

class PSBTInput;

Member Functions

Name

Description

PSBTInput [constructor]

Constructors

FillSignatureData

Populate signature data from this input's fields.

FromSignatureData

Copy relevant fields from the given signature data into this input.

GetOutPoint

Return the outpoint this input spends.

GetUTXO

Retrieves the UTXO for this input

GetVersion

Return the PSBT version of this input.

HasSignatures

Report whether this input carries any signatures.

Merge

Merge another input's fields into this one.

Serialize

Serialize this input to a stream.

Unserialize

Deserialize this input from a stream.

operator==

Compare two inputs for equality field by field.

Data Members

Name

Description

final_script_sig

The finalized scriptSig for this input.

final_script_witness

The finalized script witness for this input.

hash160_preimages

HASH160 preimages keyed by their hash.

hash256_preimages

HASH256 preimages keyed by their hash.

hd_keypaths

BIP32 derivation paths keyed by public key.

height_locktime

The required height‐based locktime for this input (PSBTv2).

m_musig2_partial_sigs

MuSig2 partial signatures; keyed by aggregate pubkey and script leaf hash, valued by participant pubkey to partial signature.

m_musig2_participants

MuSig2 participant public keys keyed by aggregate public key.

m_musig2_pubnonces

MuSig2 public nonces; keyed by aggregate pubkey and script leaf hash, valued by participant pubkey to pubnonce.

m_proprietary

Proprietary key‐value records.

m_tap_bip32_paths

Taproot BIP32 derivation paths keyed by x‐only public key.

m_tap_internal_key

Taproot internal key.

m_tap_key_sig

Taproot key‐path signature.

m_tap_merkle_root

Taproot merkle root.

m_tap_script_sigs

Taproot script‐path signatures keyed by output key and leaf hash.

m_tap_scripts

Taproot leaf scripts keyed by control block and leaf version.

non_witness_utxo

The full previous transaction for a non‐witness UTXO.

partial_sigs

Partial signatures keyed by key id.

prev_out

The previous output index spent by this input (PSBTv2).

prev_txid

The previous transaction id spent by this input (PSBTv2).

redeem_script

The redeem script for a P2SH input.

ripemd160_preimages

RIPEMD160 preimages keyed by their hash.

sequence

The input sequence number (PSBTv2).

sha256_preimages

SHA256 preimages keyed by their hash.

sighash_type

The sighash type requested for this input.

time_locktime

The required time‐based locktime for this input (PSBTv2).

unknown

Unknown key‐value pairs preserved across round‐trips.

witness_script

The witness script for a P2WSH input.

witness_utxo

The spent output for a witness UTXO.

Non-Member Functions

Name

Description

PSBTInputSigned

Checks whether a PSBTInput is already signed by checking for non‐null finalized fields.

Created with MrDocs