BSV.TxOut (BSV v2.1.0) View Source
A TxOut is a data structure representing a single output in a BSV.Tx.t/0
.
A TxOut consists of the number of satoshis being locked in the output, and a
BSV.Script.t/0
, otherwise known as the locking script. The output can
later be spent by creating an input in a new transaction with a corresponding
unlocking script.
The index of the output within it's containing BSV.Tx.t/0
, denotes it's
BSV.TxOut.vout/0
.
Link to this section Summary
Functions
Parses the given binary into a BSV.TxOut.t/0
.
Parses the given binary into a BSV.TxOut.t/0
.
Returns the number of bytes of the given BSV.TxOut.t/0
.
Serialises the given BSV.TxOut.t/0
into a binary.
Link to this section Types
Specs
t() :: %BSV.TxOut{satoshis: non_neg_integer(), script: BSV.Script.t()}
TxOut struct
Specs
vout() :: non_neg_integer()
Vout - Vector of an output in a Bitcoin transaction
In integer representing the index of a TxOut.
Link to this section Functions
Specs
Parses the given binary into a BSV.TxOut.t/0
.
Returns the result in an :ok
/ :error
tuple pair.
Options
The accepted options are:
:encoding
- Optionally decode the binary with either the:base64
or:hex
encoding scheme.
Specs
Parses the given binary into a BSV.TxOut.t/0
.
As from_binary/2
but returns the result or raises an exception.
Specs
get_size(t()) :: non_neg_integer()
Returns the number of bytes of the given BSV.TxOut.t/0
.
Serialises the given BSV.TxOut.t/0
into a binary.
Options
The accepted options are:
:encoding
- Optionally encode the binary with either the:base64
or:hex
encoding scheme.