Interface representing the properties for currency implementation that extends from VeChainDataModel.

Currency

interface Currency {
    compareTo: ((that: Currency) => number);
    isEqual: ((that: Currency) => boolean);
    get bi(): bigint;
    get bytes(): Uint8Array;
    get code(): Txt;
    get n(): number;
    get value(): FixedPointNumber;
}

Hierarchy (view full)

Implemented by

Properties

Accessors

Properties

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

Compare this instance with that in a lexicographic meaningful way.

Type declaration

    • (that): number
    • Parameters

      Returns number

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

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

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

Type declaration

    • (that): boolean
    • Parameters

      Returns boolean

      • True if the values are equal, false otherwise.

Accessors

  • get bi(): bigint
  • Return this instance cast to a big integer value

    Returns bigint

    InvalidOperation if this object can't cast to a big integer.