PrecomputedTransactionData

Cached transaction data reused across signature-hash computations for a single transaction.

Synopsis

Declared in <script/interpreter.h>

struct PrecomputedTransactionData;

Member Functions

NameDescription
PrecomputedTransactionData [constructor]Constructors
Init Initialize this PrecomputedTransactionData with transaction data.

Data Members

NameDescription
hashOutputs BIP143 double-SHA256 hash of all outputs.
hashPrevouts BIP143 double-SHA256 hash of all input prevouts.
hashSequence BIP143 double-SHA256 hash of all input sequences.
m_bip143_segwit_ready Whether the 3 fields above are initialized.
m_bip341_taproot_ready Whether the 5 fields above are initialized.
m_outputs_single_hash BIP341 single-SHA256 hash of all outputs.
m_prevouts_single_hash BIP341 single-SHA256 hash of all input prevouts.
m_sequences_single_hash BIP341 single-SHA256 hash of all input sequences.
m_spent_amounts_single_hash BIP341 single-SHA256 hash of all spent output amounts.
m_spent_outputs The outputs being spent by this transaction, one per input.
m_spent_outputs_ready Whether m_spent_outputs is initialized.
m_spent_scripts_single_hash BIP341 single-SHA256 hash of all spent output scriptPubKeys.

Non-Member Functions

NameDescription
PrecomputePSBTDataCompute a PrecomputedTransactionData object from a psbt.