Root interface for all the classes part of the VeChain Data Model to provide a coherent API to represent, encode, and cast data among data types.

Hierarchy (view full)

Implements

Constructors

Properties

decoded: Input
encoded: Uint8Array

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.