Module segwit

Expand description

Segregated Witness functionality - useful for enforcing parts of BIP-173 and BIP-350.

Structs§

InvalidWitnessVersionError
Field element does not represent a valid witness version.

Enums§

WitnessLengthError
Witness program invalid because of incorrect length.

Constants§

MAX_STRING_LENGTH
The maximum enforced string length of a segwit address.
VERSION_0
The field element representing segwit version 0.
VERSION_1
The field element representing segwit version 1 (taproot).

Functions§

is_valid_witness_program_length
Returns true if length represents a valid witness program length for witness_version.
is_valid_witness_version
Returns true if given field element represents a valid segwit version.
validate_witness_program_length
Validates the segwit witness program length rules for witness version.
validate_witness_version
Checks that the given field element represents a valid segwit witness version.