Import
Signature
Validate untrusted input (for example a decoded PAYMENT-REQUIRED header) and return it as a {@link PaymentRequired}. Every accepts entry must have string scheme, network, asset, amount (a non-negative integer), payTo, and a numeric maxTimeoutSeconds.

Parameters

unknown
required
Parsed JSON of unknown shape.

Returns

PaymentRequired

Throws

  • InvalidPaymentRequiredError: If the shape is wrong.
Source: src/index.ts