BSV-ex v0.1.0 BSV.Transaction.Input View Source

Module for parsing and serialising transaction inputs.

Link to this section Summary

Types

t()

Transaction input

Functions

Parse the given binary into a transaction input. Returns a tuple containing the transaction input and the remaining binary data.

Serialises the given transaction input struct into a binary.

Link to this section Types

Link to this type

t()

View Source
t() :: %BSV.Transaction.Input{
  index: integer(),
  script: binary(),
  sequence: integer(),
  txid: String.t()
}

Transaction input

Link to this section Functions

Link to this function

parse(data, options \\ [])

View Source

Parse the given binary into a transaction input. Returns a tuple containing the transaction input 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.Input.parse(data)
{%BSV.Trasaction.Input{}, ""}
Link to this function

serialize(input, options \\ [])

View Source
serialize(BSV.Transaction.Input.t(), keyword()) :: binary()

Serialises the given transaction input 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.Input.serialize(input)
<<binary>>