BSV-ex v0.2.5 BSV.Transaction.Output View Source
Module for parsing and serialising transaction outputs.
Link to this section Summary
Functions
Returns the size of the given output. If the output has a script, it's actual size is calculated, otherwise a P2PKH output is estimated.
Parse the given binary into a single transaction output. Returns a tuple containing the transaction output and the remaining binary data.
Serialises the given transaction output struct into a binary.
Link to this section Types
Transaction output
Link to this section Functions
Returns the size of the given output. If the output has a script, it's actual size is calculated, otherwise a P2PKH output is estimated.
Parse the given binary into a single transaction output. Returns a tuple containing the transaction output and the remaining binary data.
Options
The accepted options are:
:encoding
- Optionally decode the binary with either the:base64
or:hex
encoding scheme.
Examples
BSV.Transaction.Output.parse(data)
{%BSV.Trasaction.Output{}, ""}
Serialises the given transaction output struct into a binary.
Options
The accepted options are:
:encode
- Optionally encode the returned binary with either the:base64
or:hex
encoding scheme.
Examples
BSV.Transaction.Output.serialize(output)
<<binary>>