View Source BitcoinLib.Transaction.Spec.Input (BitcoinLib v0.4.7)

A simplified version of a %BitcoinLib.Transaction.Input that can be filled with human readable formats

Link to this section Summary

Functions

Converts a human readable input into a %Transaction.Input{}

Link to this section Types

@type t() :: BitcoinLib.Transaction.Spec.Input

Link to this section Functions

Link to this function

to_transaction_input(input)

View Source
@spec to_transaction_input(t()) :: BitcoinLib.Transaction.Input.t()

Converts a human readable input into a %Transaction.Input{}

examples

Examples

iex> %BitcoinLib.Transaction.Spec.Input{
...>   txid: "6925062befcf8aafae78de879fec2535ec016e251c19b1c0792993258a6fda26",
...>   vout: 1,
...>   redeem_script: "76a914c39658833d83f2299416e697af2fb95a998853d388ac"
...> }
...> |> BitcoinLib.Transaction.Spec.Input.to_transaction_input()
%BitcoinLib.Transaction.Input{
  txid: "6925062befcf8aafae78de879fec2535ec016e251c19b1c0792993258a6fda26",
  vout: 1,
  sequence: 4294967293,
  script_sig: "76a914c39658833d83f2299416e697af2fb95a998853d388ac"
}