Rlp
Utility functions for encoding and decoding Recursive Length Prefix structures.
Examples
import { Hex, Rlp } from 'ox'
const data = Rlp.fromHex([Hex.fromString('hello'), Hex.fromString('world')])
'0xcc8568656c6c6f85776f726c64' const values = Rlp.toHex(data)
[Hex.fromString('hello'), Hex.fromString('world')]
Functions
Name | Description |
---|---|
Rlp.from | Encodes a Bytes.Bytes or Hex.Hex value into a Recursive-Length Prefix (RLP) value. |
Rlp.fromBytes | Encodes a Bytes.Bytes value into a Recursive-Length Prefix (RLP) value. |
Rlp.fromHex | Encodes a Hex.Hex value into a Recursive-Length Prefix (RLP) value. |
Rlp.toBytes | Decodes a Recursive-Length Prefix (RLP) value into a Bytes.Bytes value. |
Rlp.toHex | Decodes a Recursive-Length Prefix (RLP) value into a Hex.Hex value. |