Bitcoin transaction input.
Summary
Functions
Parse an input from raw binary. Returns {:ok, input, remaining_bytes} on success.
Create a new empty input with default values.
Get the locking script of the source output, or nil if not set.
Get the satoshi value of the source output, or nil if not set.
Serialize the input to raw binary (wire format).
Serialize the input with an empty unlocking script (for sighash computation).
Types
@type t() :: %BSV.Transaction.Input{ sequence_number: non_neg_integer(), source_output: BSV.Transaction.Output.t() | nil, source_tx_out_index: non_neg_integer(), source_txid: binary(), unlocking_script: BSV.Script.t() | nil }
Functions
Parse an input from raw binary. Returns {:ok, input, remaining_bytes} on success.
@spec new() :: t()
Create a new empty input with default values.
@spec source_locking_script(t()) :: BSV.Script.t() | nil
Get the locking script of the source output, or nil if not set.
@spec source_satoshis(t()) :: non_neg_integer() | nil
Get the satoshi value of the source output, or nil if not set.
Serialize the input to raw binary (wire format).
Serialize the input with an empty unlocking script (for sighash computation).