Skip to main content

Module witness

Module witness 

Source

Enums§

WitnessVersion
Witness version for SegWit (v0) and Taproot (v1)

Functions§

calculate_transaction_weight_segwit
Calculate transaction weight using SegWit formula
extract_witness_program
Extract witness program from scriptPubKey
extract_witness_version
Validate witness version in scriptPubKey
is_upgradable_witness_program
True when scriptPubKey is a witness program that is not standard v0 (P2WPKH/P2WSH) or v1 P2TR.
is_witness_empty
Check if witness is empty (non-witness transaction)
validate_segwit_witness_structure
Validate witness structure for SegWit
validate_taproot_witness_structure
Validate witness structure for Taproot
validate_witness_program_length
Validate witness program length
weight_to_vsize
Calculate virtual size (vsize) from weight

Type Aliases§

Witness
Witness data: stack of witness elements (SegWit/Taproot)