Skip to main content

Module script

Module script 

Source
Expand description

Tidecoin scripts.

Structs§

Builder
Script builder.
InstructionIndices
Iterator over script instructions with byte offsets.
Instructions
Iterator over parsed script instructions.
ParsedWitnessProgram
Parsed witness-program view over a scriptPubKey byte slice.
PushBytes
Byte slices that can be pushed into script.
PushBytesBuf
Owned script-push bytes.
PushBytesError
Error constructing script push bytes.
RedeemScriptSizeError
Error while hashing a redeem script.
Script
Tidecoin script slice.
ScriptBuf
An owned, growable script.
ScriptBufDecoder
The decoder for the ScriptBuf type.
ScriptBufDecoderError
An error consensus decoding a ScriptBuf<T>.
ScriptEncoder
The encoder for the Script<T> type.
ScriptHash
A 160-bit hash of Tidecoin script bytecode.
WScriptHash
SegWit (256-bit) version of a Tidecoin script bytecode hash.
WitnessScriptSizeError
Error while hashing a witness script.

Enums§

Error
Basic script decoding/building errors.
Instruction
Parsed script instruction.
RedeemScriptTag
A P2SH redeem script.
ScriptIntError
Possible errors that can arise from reading a script integer.
ScriptPubKeyTag
A script public key (scriptPubKey).
ScriptSigTag
A script signature (scriptSig).
WitnessProgramClass
Primitive witness-program class independent of consensus activation flags.
WitnessProgramError
Witness-program shape error.
WitnessScriptTag
A Segwit v0 witness script.

Constants§

MAX_REDEEM_SCRIPT_SIZE
The maximum allowed redeem script size for a P2SH output.
MAX_WITNESS_SCRIPT_SIZE
The maximum allowed redeem script size of the witness script.
P2A_PROGRAM
The Tidecoin pay-to-anchor witness-v1 program.
SCRIPTNUM_CLTV_MAX_LEN
Extended script-number byte limit used by lock-time related opcodes.
SCRIPTNUM_STANDARD_MAX_LEN
Standard script-number byte limit used by arithmetic and most script opcodes.
WITNESS_PROGRAM_MAX_SIZE
Maximum byte size of a witness program.
WITNESS_PROGRAM_MIN_SIZE
Minimum byte size of a witness program.

Traits§

ScriptHashableTag
Either a redeem script or a Segwit version 0 scriptpubkey.
Tag
Sealed trait representing a type of script.

Functions§

encode_scriptnum
Encodes an integer in script number format into a freshly allocated buffer.
is_minimally_encoded_scriptnum
Returns whether a script-number byte slice uses minimal encoding for the provided bound.
read_scriptbool
Decodes a script truth value.
read_scriptint_non_minimal
Decodes a script integer without enforcing minimal encoding.
read_scriptnum
Decodes a script number with caller-selected minimal-encoding and length rules.
validate_witness_program
Validates address/output-level witness-program length rules.
write_scriptint
Encodes an integer in script number format.

Type Aliases§

RedeemScript
A reference to a P2SH redeem script.
RedeemScriptBuf
A P2SH redeem script.
ScriptPubKey
A reference to a scriptPubKey (locking script).
ScriptPubKeyBuf
A scriptPubKey (locking script).
ScriptPubKeyBufDecoder
A scriptPubKey decoder.
ScriptSig
A reference to a script signature (scriptSig).
ScriptSigBuf
A script signature (scriptSig).
ScriptSigBufDecoder
A scriptSig decoder.
WitnessScript
A reference to a Segwit v0 witness script.
WitnessScriptBuf
A Segwit v0 witness script.