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.

interface VeChainDataModel<T> {
    compareTo: ((that: T) => number);
    isEqual: ((that: T) => boolean);
    get bi(): bigint;
    get bytes(): Uint8Array;
    get n(): number;
}

Type Parameters

  • T

Hierarchy (view full)

Implemented by

Properties

Accessors

Properties

compareTo: ((that: T) => number)

Compare this instance with that in a lexicographic meaningful way.

Type declaration

    • (that): number
    • Parameters

      • that: T

        object to compare.

      Returns number

      a negative number if this < that, zero if this = that, a positive number if this > that`.

isEqual: ((that: T) => boolean)

Checks if the given value is equal to the current instance.

Type declaration

    • (that): boolean
    • Parameters

      • that: T

        The value to compare.

      Returns boolean

      • True if the values are equal, false otherwise.

Accessors