View Source BitcoinLib.Transaction.Spec.Input (BitcoinLib v0.3.0)
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 Functions
@spec to_transaction_input(%BitcoinLib.Transaction.Spec.Input{ redeem_script: term(), txid: term(), vout: term() }) :: %BitcoinLib.Transaction.Input{ script_sig: term(), sequence: term(), txid: term(), vout: term() }
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: 4294967295,
script_sig: "76a914c39658833d83f2299416e697af2fb95a998853d388ac"
}