Exact fee amount paired with its validated currency.

Constructors

Properties

Methods

Constructors

  • Constructs a monetary amount from an exact fee and currency.

    amount accepts a Fee value object or a DecimalInput. currency uses the same validated asset-string contract as instrument assets.

    Errors

    Throws ParamError on an invalid fee or AssetError on an invalid currency.

    Parameters

    • amount:
          | string
          | number
          | bigint
          | Fee
    • currency: string

    Returns MonetaryAmount

Properties

amount: Fee

The exact fee amount.

currency: string

The currency identifier.

Methods

  • Returns void

  • Returns a fresh monetary amount holding the same amount and currency.

    Returns MonetaryAmount

  • Returns true when both the amount and currency are equal.

    Parameters

    Returns boolean

  • Returns void