Class
PrecomputedTransactionData
Cached per-transaction data that speeds up repeated script verification — most importantly, the BIP-341 sighash components a taproot spend uses (hashPrevouts, hashAmounts, hashScriptPubkeys, hashSequences, hashOutputs) that would otherwise be recomputed for every input.
final class PrecomputedTransactionData
Overview
Construct once per transaction, then reuse across every verify(amount:transaction:precomputedData:inputIndex:flags:) call for that transaction. For non-taproot verification the spentOutputs argument is optional; for taproot it is required.
Wraps the opaque btck_PrecomputedTransactionData type; deinit calls btck_precomputed_transaction_data_destroy when the last Swift reference drops.
Topics
Initializers