ap2_verify_cart_mandate
Verifies AP2 CartMandate and IntentMandate envelopes by validating line-item totals, currency exponents, payee binding, TTL, confirmation thresholds, and Ed25519/JCS signatures.
Instructions
Verify A2A AP2 (Agent Payments Protocol) IntentMandate & CartMandate envelopes: validates line-item integer minor-unit sum == total_amount_minor, ISO-4217 & crypto currency exponents (0 JPY/VND, 2 USD/EUR, 3 KWD, 6 USDC, 8 sBTC, 9 SOL, 18 WEI), payee_id binding, TTL expiry, human_confirmation_threshold_minor, and pure-Python RFC 8032 Ed25519 + RFC 8785 JCS signatures.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"mandate_json": "<mandate_json>"
},
"name": "ap2_verify_cart_mandate"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| jwks_json | No | Optional RFC 8037 `OKP` `Ed25519` JWKS object or JSON string. | |
| public_key | No | Optional 32-byte Ed25519 public key (hex, base64, or base64url) for signature verification. | |
| mandate_json | Yes | AP2 `CartMandate` or `IntentMandate` JSON object, JSON string, or base64url string. | |
| expected_payee_id | No | Optional merchant/agent `payee_id` that must match the mandate. | |
| reference_unix_ts | No | Optional deterministic Unix timestamp for TTL expiry checks. | |
| require_signature | No | Require a verified RFC 8032 Ed25519 + RFC 8785 JCS signature (`True` by default). | |
| intent_mandate_json | No | Optional parent `IntentMandate` object or JSON string to cross-check cap, currency, and payee. | |
| human_confirmation_threshold_minor | No | Optional integer minor-unit threshold requiring `human_confirmed=True` when exceeded. |