Class handling the profiling of RLP encoded/decoded objects. Provides methods to encode and decode objects based on a provided RLP profile.

Hierarchy (view full)

Properties

decoded: Input
encoded: Uint8Array
profile: RLPProfile

Profile for encoding/decoding structures.

Accessors

  • get bi(): bigint
  • Returns the bigint representation of the encoded data in the RLP instance.

    Returns bigint

    The bigint representation of the encoded data.

  • get n(): number
  • Returns the number representation of the encoded data in the RLP instance.

    Returns number

    The number representation of the encoded data.

Methods

  • Handles the RLP packing of data. Recursively processes through object properties or array elements to prepare data for RLP encoding.

    Parameters

    • obj: RLPValidObject

      The object data to be packed.

    • profile: RLPProfile

      Profile for encoding structures.

    • context: string

      Encoding context for error tracing.

    Returns Input

    Packed data as RLPInput.

  • Handles the RLP unpacking of data. Recursively processes through packed properties or elements to prepare data post RLP decoding.

    Parameters

    • packed: Input

      The packed data to be unpacked.

    • profile: RLPProfile

      Profile for decoding structures.

    • context: string

      Decoding context for error tracing.

    Returns RLPValueType

    Unpacked data as RLPValueType.