Shapeshifter.TXO (Shapeshifter v0.2.0) View Source

Module for converting to and from TXO structured maps.

Usually used internally, although can be used directly for specific use cases such as converting single inputs and outputs to and from TXO formatted maps.

Link to this section Summary

Functions

Converts the given input parameters to a TXO formatted input.

Converts the given output parameters to a TXO formatted output.

Creates a new TXO formatted map from the given Shapeshifter struct.

Converts the given TXO formatted transaction back to a BSV Transaction struct.

Converts the given TXO formatted input back to a BSV Input struct.

Converts the given TXO formatted output back to a BSV Output struct.

Link to this section Functions

Specs

cast_input({BSV.TxIn.t() | map(), integer()}) :: map()

Converts the given input parameters to a TXO formatted input.

Accepts either a BSV Input struct or a BOB formatted input.

Specs

cast_output({BSV.TxOut.t() | map(), integer()}) :: map()

Converts the given output parameters to a TXO formatted output.

Accepts either a BSV Output struct or a BOB formatted output.

Specs

Creates a new TXO formatted map from the given Shapeshifter struct.

Specs

to_tx(%Shapeshifter{format: :txo, src: Shapeshifter.txo()} | Shapeshifter.txo()) ::
  BSV.Tx.t()

Converts the given TXO formatted transaction back to a BSV Transaction struct.

Specs

to_tx_input(map()) :: BSV.TxIn.t()

Converts the given TXO formatted input back to a BSV Input struct.

Specs

to_tx_output(map()) :: BSV.TxOut.t()

Converts the given TXO formatted output back to a BSV Output struct.