Skip to main content

Module transaction_hash

Module transaction_hash 

Source
Expand description

Transaction sighash / txid helpers from consensus.

Structs§

Bip143PrecomputedHashes
Precomputed hash components for BIP143 sighash. These are computed once per transaction and reused for all inputs.
SighashCacheKey
Per-block sighash cache: (prevout, code_hash, sighash_byte) -> hash. Core-style. Uses hash of scriptCode instead of owned Vec to avoid allocation on insert.
SighashType
SIGHASH types for transaction signature verification

Functions§

batch_compute_bip143_sighashes
Spec-locked to Orange Paper Section 11.1.9: BatchComputeBip143Sighashes
batch_compute_legacy_sighashes
Spec-locked to Orange Paper Section 5.1.1: BatchComputeLegacySighashes
batch_compute_sighashes
Spec-locked to Orange Paper Section 5.1.1: BatchComputeSighashes
calculate_bip143_sighash
Spec-locked to Orange Paper Section 11.1.9: CalculateBip143Sighash
calculate_transaction_sighash
Spec-locked to Orange Paper Section 5.1: CalculateTransactionSighash
calculate_transaction_sighash_single_input
Spec-locked to Orange Paper Section 5.1: CalculateTransactionSighashSingleInput
calculate_transaction_sighash_with_script_code
Spec-locked to Orange Paper Section 5.1: CalculateTransactionSighashWithScriptCode
clear_sighash_templates
Clear sighash cache. Useful for benchmarking to ensure consistent results. Clears the thread-local SIGHASH_CACHE on the current thread.
compute_legacy_sighash_buffered
Spec-locked to Orange Paper Section 5.1.1: ComputeLegacySighashBuffered
compute_legacy_sighash_nocache
Spec-locked to Orange Paper Section 5.1.1: ComputeLegacySighashNocache
compute_sighashes_batch
Spec-locked to Orange Paper Section 5.1.1: ComputeSighashesBatch

Type Aliases§

SighashMidstateCache