@openpit/engine
    Preparing search index...

    Class MonetaryAmount

    Exact fee amount paired with its validated currency.

    Index
    • 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

    amount: Fee

    The exact fee amount.

    currency: string

    The currency identifier.

    • 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