Import
Signature
Check a requirement against spend controls. Throws before anything is built or signed.

Parameters

PaymentRequirements
required
SpendControls = {}
required

Returns

void

Throws

  • SpendLimitExceededError: If the amount is above the cap (default {@link DEFAULT_MAX_AMOUNT}).
  • PaymentNotAllowedError: If the asset, network or recipient is not on an allow list.
  • InvalidOptionsError: If a control is malformed.
  • InvalidPaymentRequiredError: If the requirement’s amount or asset is not an unsigned integer.
Source: src/index.ts