Skip to main content

Try it Live

Run RLP examples in the interactive playground

    Return Type

    decodeArray returns a JavaScript array with decoded elements:

    Usage Patterns

    Transaction Decoding

    Decode transaction fields:

    Block Header Decoding

    Decode block header:

    Log Entry Decoding

    Decode event logs:

    Account State Decoding

    Decode account state:

    Merkle Patricia Trie Node

    Decode trie nodes:

    Validation

    decodeArray validates RLP encoding:

    Schema-based Decoding

    Define typed decoders:

    Performance

    Direct Array Access

    decodeArray returns a plain JavaScript array for efficient access:

    vs decode

    decodeArray is more convenient than decode for array access:

    Caching

    Cache decoded results for repeated access:

    See Also