View Source Bitcoinex.Transaction.Witness (bitcoinex v0.3.0)

Witness structure part of an on-chain transaction.

Link to this section Summary

Functions

Parses a binary that must contain exactly one serialized witness stack: trailing bytes after the last stack item make it invalid.

Wtiness accepts a binary and deserializes it.

Link to this section Types

@type t() :: %Bitcoinex.Transaction.Witness{txinwitness: [binary()]}

Link to this section Functions

Link to this function

parse_witness(witness_bytes)

View Source
@spec parse_witness(binary()) :: {:ok, t()} | {:error, :invalid_witness}

Parses a binary that must contain exactly one serialized witness stack: trailing bytes after the last stack item make it invalid.

Link to this function

parse_witness(counter, remaining)

View Source
Link to this function

serialize_witness(witnesses)

View Source
@spec serialize_witness([t()]) :: binary()
@spec witness(binary()) :: t()

Wtiness accepts a binary and deserializes it.