Represents a VeChain VeThor monetary amount.

Hierarchy (view full)

Constructors

Properties

Accessors

Methods

Constructors

Properties

wei: bigint = ...

Represents this monetary amount in terms of Units.wei.

CODE: Txt = ...

The code for VET is the sequence of Unicode

  • U+1D64D - mathematical double strike capital letter 'V',
  • U+0054 - Latin capital letter 'T',
  • U+0048 - Latin capital letter 'H',
  • U+004F - Latin capital letter 'O'.

Accessors

  • get code(): Txt
  • Return the code as a Txt object.

    Returns Txt

    The code object

    Since currency codes likely use Unicode composite symbols, Txt type enforce the representation of the code is normalized.

Methods

  • Compares this Currency object with another Currency object for order.

    Parameters

    • that: Currency

      The Currency object to be compared.

    Returns number

    A negative integer, zero, or a positive integer as this Currency is less than, equal to, or greater than the specified Currency.

    If the currency codes do not match.

  • Determines if this Currency object is equal to another Currency object.

    Parameters

    • that: Currency

      The Currency object to compare with the current instance.

    Returns boolean

    • true if the objects are considered equal, otherwise false.
  • Return a new VTHO instance with the specified value and unit.

    Parameters

    • value:
          | string
          | number
          | bigint
          | FixedPointNumber

      The numerical value for the VTHO instance.

    • unit: Units = Units.ether

      The unit for the value. Defaults to Units.ether if not provided.

    Returns VTHO

    A new VTHO instance with the provided value and unit.

    If value is not a numeric expression.