@agorio/sdk • Docs
Function: verifyMandateShape()
verifyMandateShape(
signed,options):object|object
Shape-validate a SignedMandate received from an external agent.
This is a structural sanity check — it confirms required fields exist,
the mandate hasn’t expired, and (for CartMandate) line-item totals match
the declared amount. It does not verify the signature; pair this with
a real signature verifier (WebAuthn assertion, JWS verify, etc.) keyed
off signed.keyId and signed.algorithm.
Returns { ok: true } on success, { ok: false, reason } on failure.
Parameters
• signed: unknown
• options = {}
• options.now?: number
Returns
object | object
Defined in
src/client/ap2-client.ts:459