BSV.Serializable protocol (BSV v2.1.0) View Source

A protocol module specifying an API for parsing and serializing Binary data into Bitcoin objects.

Link to this section Summary

Functions

Parses the binary value into the specified type.

Parses the struct into a binary value.

Link to this section Types

Link to this section Functions

Specs

parse(t(), binary()) :: {:ok, t(), binary()} | {:error, term()}

Parses the binary value into the specified type.

Returns a tuple containing the parsed term and the remaining binary data.

Specs

serialize(t()) :: binary()

Parses the struct into a binary value.