View Source Bitcoinex.Transaction (bitcoinex v0.1.8)

Bitcoin on-chain transaction structure. Supports serialization of transactions.

Link to this section Summary

Functions

Decodes a transaction in a hex encoded string into binary.

Returns the TxID of the given tranasction.

Link to this section Types

@type t() :: %Bitcoinex.Transaction{
  inputs: [Bitcoinex.Transaction.In.t()],
  lock_time: non_neg_integer(),
  outputs: [Bitcoinex.Transaction.Out.t()],
  version: non_neg_integer(),
  witnesses: [Bitcoinex.Transaction.Witness.t()]
}

Link to this section Functions

Decodes a transaction in a hex encoded string into binary.

Returns the TxID of the given tranasction.

TxID is sha256(sha256(nVersion | txins | txouts | nLockTime))