Skip to main content

Module transparent

Module transparent 

Source
Expand description

Functions for parsing, serialization, and value accounting of the transparent components of a transaction.

Functionsยง

read_outpoint
Reads an [OutPoint] from its transaction encoding: a 32-byte txid followed by the output index as a little-endian u32.
read_script
Reads a CompactSize-prefixed script.
read_txin
Reads a transparent input: an outpoint, a scriptSig, and a little-endian u32 sequence number.
read_txout
Reads a transparent output: an 8-byte little-endian value followed by a scriptPubKey.
script_serialized_size
Returns the length of script as encoded, including its CompactSize length prefix.
value_balance
Returns the amount of value that bundle adds to or removes from the transparent pool.
write_outpoint
Writes outpoint in its transaction encoding: a 32-byte txid followed by the output index as a little-endian u32.
write_script
Writes script with a CompactSize length prefix.
write_txin
Writes a transparent input: an outpoint, a scriptSig, and a little-endian u32 sequence number.
write_txout
Writes a transparent output: an 8-byte little-endian value followed by a scriptPubKey.