Hedera.Rlp (Hedera v0.7.0)

Copy Markdown View Source

Minimal RLP (Recursive Length Prefix) encoder — Ethereum's serialization, used here to assemble EIP-1559 (type-2) transactions for Hedera's EthereumTransaction.

Items are integers (encoded as their minimal big-endian byte string; 0 → the empty string), binaries (raw byte strings), or (nested) lists of items.

Summary

Functions

RLP-encode an item: an integer, a binary, or a (nested) list.

The minimal big-endian byte string of a non-negative integer (0<<>>).

Functions

encode(item)

@spec encode(integer() | binary() | list()) :: binary()

RLP-encode an item: an integer, a binary, or a (nested) list.

int_to_bin(n)

@spec int_to_bin(non_neg_integer()) :: binary()

The minimal big-endian byte string of a non-negative integer (0<<>>).