Schema
Schema — Validates RLP-encoded data.Pure Functions
equals(a, b) — Checks if two RLP Data structures are equal. isData(value) — Type guard for RLP data structure. isBytesData(value) — Type guard for RLP bytes data. isListData(value) — Type guard for RLP list data. isCanonical(bytes) — Validates canonical RLP encoding. toJSON(data) — Converts RLP Data to JSON format. toRaw(data) — Converts RLP Data to raw JavaScript values.Encoding Functions
encode(data) — RLP-encodes bytes or nested arrays.Decoding Functions
decode(bytes, stream?) — RLP-decodes bytes. Returns{ data, remainder }.
Utility Functions
from(value) — Creates RLP data structure from input. fromJSON(json) — Converts JSON back to RLP Data. flatten(data) — Flattens nested RLP to array of bytes. validate(bytes) — Checks if bytes are valid RLP. isList(bytes) — Checks if RLP represents a list. isString(bytes) — Checks if RLP represents a string. getLength(bytes) — Gets total RLP item length. getEncodedLength(data) — Predicts encoded length without encoding.Types
Errors
RlpEncodingError— Encoding failedRlpDecodingError— Invalid prefix, insufficient bytes, non-canonical encoding

