Module wallet::script[][src]

Structs

LockScript

Script whose knowledge is required for spending some specific transaction output. This is the deepest nested version of Bitcoin script containing no hashes of other scripts, including P2SH redeemScript hashes or witnessProgram (hash or witness script), or public key hashes

PubkeyScript

A content of scriptPubkey from a transaction output

RedeemScript

redeemScript as part of the witness or sigScript structure; it is hashed for P2(W)SH output

ScriptSet

Scripting data for both transaction output and spending transaction input parts that can be generated from some complete bitcoin Script (LockScript) or public key using particular [ConversionStrategy]

SigScript

A content of sigScript from a transaction input

TapScript

Any valid branch of Tapscript (BIP-342)

Witness

A content of the witness field from a transaction input according to BIP-141

WitnessProgram
WitnessScript

A content of the script from witness structure; en equivalent of redeemScript for witness-based transaction inputs. However, unlike RedeemScript, WitnessScript produce SHA256-based hashes of WScriptHash type

Enums

PubkeyParseError

Errors that may happen during LockScript parsing process

WitnessVersion

Version of the WitnessProgram: first byte of scriptPubkey in transaction output for transactions starting with opcodes ranging from 0 to 16 (inclusive).

WitnessVersionError

A error covering only one possible failure in WitnessVersion creation: when the provided version > 16

Traits

ToLockScript

Conversion to LockScript, which later may be used for creating different end-point scripts, like PubkeyScript, SigScript, Witness etc.

ToP2pkh
ToPubkeyScript

Conversion for data types (public keys, different types of script) into a pubkeyScript (using PubkeyScript type) using particular conversion [Strategy]

ToScripts

Script set generation from public keys or a given LockScript (with TapScript support planned for the future).