Rlp.fromHex
Encodes a Hex.Hex
value into a Recursive-Length Prefix (RLP) value.
Imports
Named
import { Rlp } from 'ox'
Examples
import { Rlp } from 'ox'
Rlp.fromHex('0x68656c6c6f20776f726c64')
0x8b68656c6c6f20776f726c64
Definition
function fromHex<as>(
hex: RecursiveArray<Hex.Hex>,
options?: fromHex.Options<as>,
): fromHex.ReturnType<as>
Source: src/Rlp.ts
Parameters
hex
- Type:
RecursiveArray<Hex.Hex>
The Hex.Hex
value to encode.
options
- Type:
fromHex.Options<as>
- Optional
Options.
options.as
- Type:
"Bytes" | "Hex" | as
The type to convert the RLP value to.
Return Type
The RLP value.
fromHex.ReturnType<as>