{
  "title": "AI100WEB end-to-end demo — x402 quote → simulated payment → paid A2A call",
  "label": "Simulation — no real funds",
  "base": "https://ai100web.pages.dev",
  "skill": "ai-analyze",
  "agentA": {
    "keyId": "payment-agent",
    "role": "caller / payer (registered test client key; Ed25519 signed envelope)",
    "payer": "0:a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1",
    "payerNote": "simulated payer address — not a real wallet"
  },
  "agentB": {
    "name": "AI100WEB TON Agent",
    "endpoint": "https://ai100web.pages.dev/a2a",
    "role": "callee — AI100WEB TON Agent (A2A gateway)"
  },
  "payTo": "UQBzg5yX7h5m-DLINTeWzxc5lwmPjJrgMtWisw4rRUDYdSXZ",
  "startedAt": "2026-10-30T09:46:49.149Z",
  "steps": [
    {
      "n": 0,
      "id": "discover",
      "title": "Discover Agent B (public, unauthenticated)",
      "at": "2026-10-30T09:46:49.300Z",
      "evidence": {
        "card": {
          "url": "https://ai100web.pages.dev/.well-known/agent-card.json",
          "status": 200,
          "name": "AI100WEB TON Agent",
          "skill": {
            "id": "ai-analyze",
            "name": "On-chain & Data Analysis",
            "pricing": {
              "amount": "0.01",
              "currency": "TON",
              "x402": "JSON-RPC message/send; HTTP 402 quote; simulation only on staging"
            }
          },
          "wallet": "UQBzg5yX7h5m-DLINTeWzxc5lwmPjJrgMtWisw4rRUDYdSXZ"
        },
        "gateway": {
          "url": "https://ai100web.pages.dev/a2a",
          "status": 200,
          "body": {
            "name": "AI100WEB A2A gateway",
            "status": "online",
            "signsOrBroadcasts": false,
            "x402": {
              "simulation": true,
              "paidSkills": [
                "ai-analyze",
                "ai-summarize",
                "ai-content",
                "ai-orchestrate"
              ]
            }
          }
        }
      }
    },
    {
      "n": 1,
      "id": "quote",
      "title": "Agent A calls the paid skill → HTTP 402 x402 quote",
      "at": "2026-10-30T09:46:49.302Z",
      "request": {
        "method": "POST",
        "url": "https://ai100web.pages.dev/a2a",
        "headers": {
          "content-type": "application/json",
          "X-A2A-Key-Id": "payment-agent",
          "X-A2A-Timestamp": "1793353609",
          "X-A2A-Signature": "WDy16j…[redacted 88 chars]"
        },
        "body": {
          "jsonrpc": "2.0",
          "id": "demo-quote-mvusfp05",
          "method": "message/send",
          "params": {
            "message": {
              "role": "user",
              "kind": "message",
              "messageId": "demo-quote-eoeeqiqo",
              "parts": [
                {
                  "kind": "data",
                  "data": {
                    "skill": "ai-analyze",
                    "text": "Demo: analyze the TON agent payment flow (simulated x402)."
                  }
                }
              ],
              "metadata": {
                "x402.payer": "0:a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1"
              }
            }
          }
        }
      },
      "response": {
        "status": 402,
        "headers": {
          "content-type": "application/json; charset=utf-8",
          "x-audit-id": "1"
        },
        "paymentRequiredDecoded": {
          "x402Version": 1,
          "error": "X-PAYMENT (or PAYMENT-SIGNATURE) header is required",
          "accepts": [
            {
              "scheme": "exact",
              "network": "ton-mainnet",
              "payTo": "UQBzg5yX7h5m-DLINTeWzxc5lwmPjJrgMtWisw4rRUDYdSXZ",
              "resource": "https://ai100web.pages.dev/a2a#ai-analyze",
              "description": "One call to paid skill ai-analyze",
              "mimeType": "application/json",
              "maxTimeoutSeconds": 300,
              "asset": "TON",
              "maxAmountRequired": "10000000",
              "extra": {
                "nonce": "27a07b49-b303-4df5-b48b-78eb38554676",
                "comment": "x402:27a07b49-b303-4df5-b48b-78eb38554676",
                "expiry": "2026-10-30T09:51:49.956Z",
                "simulationMode": true,
                "binding": {
                  "payer": "0:a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1",
                  "requesterBound": true,
                  "note": "pay FROM this payer address; the paying tx source wallet must match"
                },
                "decimals": 9,
                "amount": "0.01"
              }
            },
            {
              "scheme": "exact",
              "network": "ton-mainnet",
              "payTo": "UQBzg5yX7h5m-DLINTeWzxc5lwmPjJrgMtWisw4rRUDYdSXZ",
              "resource": "https://ai100web.pages.dev/a2a#ai-analyze",
              "description": "One call to paid skill ai-analyze",
              "mimeType": "application/json",
              "maxTimeoutSeconds": 300,
              "asset": "EQCxE6mUtQJKFnGfaROTKOt1lZbDiiX1kCixRv7Nw2Id_sDs",
              "maxAmountRequired": "10000",
              "extra": {
                "nonce": "27a07b49-b303-4df5-b48b-78eb38554676",
                "comment": "x402:27a07b49-b303-4df5-b48b-78eb38554676",
                "expiry": "2026-10-30T09:51:49.956Z",
                "simulationMode": true,
                "binding": {
                  "payer": "0:a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1",
                  "requesterBound": true,
                  "note": "pay FROM this payer address; the paying tx source wallet must match"
                },
                "symbol": "USDT",
                "decimals": 6,
                "jettonMaster": "EQCxE6mUtQJKFnGfaROTKOt1lZbDiiX1kCixRv7Nw2Id_sDs",
                "amount": "0.01"
              }
            }
          ]
        },
        "taskState": "input-required",
        "agentMessage": "Payment required for ai-analyze: pay 0.01 TON or 0.01 USDT to UQBzg5yX7h5m-DLINTeWzxc5lwmPjJrgMtWisw4rRUDYdSXZ with comment \"x402:27a07b49-b303-4df5-b48b-78eb38554676\" before 2026-10-30T09:51:49.956Z, then retry with an X-PAYMENT header."
      }
    },
    {
      "n": 2,
      "id": "pay",
      "title": "Agent A makes a SIMULATED 0.01 TON payment to the Agentic Wallet (payTo)",
      "at": "2026-10-30T09:46:50.500Z",
      "simulatedReceipt": {
        "simulated": true,
        "signed": false,
        "broadcast": false,
        "txHash": null,
        "network": "ton-mainnet",
        "from": "0:a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1",
        "to": "UQBzg5yX7h5m-DLINTeWzxc5lwmPjJrgMtWisw4rRUDYdSXZ",
        "asset": "TON",
        "amountNano": "10000000",
        "amount": "0.01",
        "comment": "x402:27a07b49-b303-4df5-b48b-78eb38554676",
        "nonce": "27a07b49-b303-4df5-b48b-78eb38554676",
        "createdAt": "2026-10-30T09:46:50.500Z",
        "note": "Simulation — no real funds. No transaction was built, signed or sent; the Agentic Wallet was not accessed."
      },
      "xPaymentDecoded": {
        "x402Version": 1,
        "scheme": "exact",
        "network": "ton-mainnet",
        "payload": {
          "simulated": true,
          "nonce": "27a07b49-b303-4df5-b48b-78eb38554676",
          "payer": "0:a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1"
        }
      }
    },
    {
      "n": 3,
      "id": "call",
      "title": "Agent A calls the paid skill via A2A with the payment proof → result",
      "at": "2026-10-30T09:46:50.501Z",
      "request": {
        "method": "POST",
        "url": "https://ai100web.pages.dev/a2a",
        "headers": {
          "content-type": "application/json",
          "X-A2A-Key-Id": "payment-agent",
          "X-A2A-Timestamp": "1793353610",
          "X-A2A-Signature": "Q4xmfU…[redacted 88 chars]",
          "X-PAYMENT": "<base64 JSON, decoded below>"
        },
        "body": {
          "jsonrpc": "2.0",
          "id": "demo-paid-mvusfpxg",
          "method": "message/send",
          "params": {
            "message": {
              "role": "user",
              "kind": "message",
              "messageId": "demo-paid-m8078ekn",
              "parts": [
                {
                  "kind": "data",
                  "data": {
                    "skill": "ai-analyze",
                    "text": "Demo: analyze the TON agent payment flow (simulated x402)."
                  }
                }
              ]
            }
          }
        },
        "xPaymentDecoded": {
          "x402Version": 1,
          "scheme": "exact",
          "network": "ton-mainnet",
          "payload": {
            "simulated": true,
            "nonce": "27a07b49-b303-4df5-b48b-78eb38554676",
            "payer": "0:a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1"
          }
        }
      },
      "response": {
        "status": 200,
        "headers": {
          "content-type": "application/json; charset=utf-8",
          "x-audit-id": "2"
        },
        "paymentResponseDecoded": {
          "receiptId": "71c8eeea-cb7d-4a86-98a5-9c23ef9eb147",
          "nonce": "27a07b49-b303-4df5-b48b-78eb38554676",
          "skillId": "ai-analyze",
          "resource": "https://ai100web.pages.dev/a2a#ai-analyze",
          "payTo": "UQBzg5yX7h5m-DLINTeWzxc5lwmPjJrgMtWisw4rRUDYdSXZ",
          "payer": "0:a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1",
          "asset": "TON",
          "amount": "10000000",
          "txHash": null,
          "network": "ton-mainnet",
          "simulated": true,
          "verifiedAt": "2026-10-30T09:46:51.114Z",
          "proof": {
            "alg": "SHA-256",
            "signed": false,
            "digest": "4104a5463163610b1bd05c4843025f95a334158aa79e1454e8038e2902c16d4a",
            "note": "unsigned digest; set RECEIPT_SECRET for HMAC-SHA256"
          }
        },
        "taskState": "completed",
        "agentMessage": "ai-analyze: x402 payment accepted (SIMULATED). The skill itself is not executed on this edge endpoint; run it via the Supabase a2a-inbox with this receipt.",
        "paymentStatus": "payment-completed",
        "artifact": {
          "name": "ai-analyze-result",
          "data": {
            "executed": false,
            "paid": true,
            "receipt": {
              "receiptId": "71c8eeea-cb7d-4a86-98a5-9c23ef9eb147",
              "nonce": "27a07b49-b303-4df5-b48b-78eb38554676",
              "skillId": "ai-analyze",
              "resource": "https://ai100web.pages.dev/a2a#ai-analyze",
              "payTo": "UQBzg5yX7h5m-DLINTeWzxc5lwmPjJrgMtWisw4rRUDYdSXZ",
              "payer": "0:a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1",
              "asset": "TON",
              "amount": "10000000",
              "txHash": null,
              "network": "ton-mainnet",
              "simulated": true,
              "verifiedAt": "2026-10-30T09:46:51.114Z",
              "proof": {
                "alg": "SHA-256",
                "signed": false,
                "digest": "4104a5463163610b1bd05c4843025f95a334158aa79e1454e8038e2902c16d4a",
                "note": "unsigned digest; set RECEIPT_SECRET for HMAC-SHA256"
              }
            },
            "quote": {
              "amount": "0.01",
              "currency": "TON",
              "settledVia": "x402 HTTP 402 quote at the gateway (simulation on staging)",
              "x402": {
                "endpoint": "https://ryounoi100web.com/a2a",
                "network": "ton-mainnet",
                "assets": [
                  "TON",
                  "USDT"
                ],
                "header": "X-PAYMENT",
                "note": "Edge price set by X402_PRICE_TON / X402_PRICE_USDT; see documentationUrl"
              }
            },
            "inbox": "upstream a2a-inbox (URL not published; configured as a secret, reached only through the signed /a2a gateway)",
            "verification": {
              "checks": [
                {
                  "check": "SIMULATED proof accepted (X402_SIMULATION=true); no on-chain verification performed",
                  "ok": true
                }
              ],
              "source": null
            }
          }
        }
      }
    },
    {
      "n": 4,
      "id": "replay",
      "title": "Same payment proof replayed → refused (single-use nonce)",
      "at": "2026-10-30T09:46:52.057Z",
      "request": {
        "method": "POST",
        "url": "https://ai100web.pages.dev/a2a",
        "headers": {
          "content-type": "application/json",
          "X-A2A-Key-Id": "payment-agent",
          "X-A2A-Timestamp": "1793353612",
          "X-A2A-Signature": "eKzXIh…[redacted 88 chars]",
          "X-PAYMENT": "<base64 JSON, decoded below>"
        },
        "body": {
          "jsonrpc": "2.0",
          "id": "demo-replay-mvusfr4p",
          "method": "message/send",
          "params": {
            "message": {
              "role": "user",
              "kind": "message",
              "messageId": "demo-replay-2lsuho4t",
              "parts": [
                {
                  "kind": "data",
                  "data": {
                    "skill": "ai-analyze",
                    "text": "Demo: analyze the TON agent payment flow (simulated x402)."
                  }
                }
              ]
            }
          }
        },
        "xPaymentDecoded": {
          "x402Version": 1,
          "scheme": "exact",
          "network": "ton-mainnet",
          "payload": {
            "simulated": true,
            "nonce": "27a07b49-b303-4df5-b48b-78eb38554676",
            "payer": "0:a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1"
          }
        }
      },
      "response": {
        "status": 402,
        "paymentStatus": "payment-rejected",
        "paymentError": "replayed_nonce",
        "error": null
      }
    },
    {
      "n": 5,
      "id": "unsigned",
      "title": "Unsigned call → 401 (signed envelope required)",
      "at": "2026-10-30T09:46:53.491Z",
      "response": {
        "status": 401,
        "body": {
          "error": "unauthorized"
        }
      }
    }
  ],
  "finishedAt": "2026-10-30T09:46:53.491Z",
  "checks": [
    {
      "id": "discover.card",
      "ok": true,
      "detail": "card 200, ai-analyze price 0.01 TON"
    },
    {
      "id": "discover.simulation",
      "ok": true,
      "detail": "GET /a2a x402.simulation=true"
    },
    {
      "id": "quote.402",
      "ok": true,
      "detail": "HTTP 402"
    },
    {
      "id": "quote.terms",
      "ok": true,
      "detail": "resource https://ai100web.pages.dev/a2a#ai-analyze, 10000000 nano TON, payTo UQBzg5yX7h5m-DLINTeWzxc5lwmPjJrgMtWisw4rRUDYdSXZ, simulationMode true"
    },
    {
      "id": "pay.simulated",
      "ok": true,
      "detail": "to UQBzg5yX7h5m-DLINTeWzxc5lwmPjJrgMtWisw4rRUDYdSXZ, 10000000 nano, broadcast=false"
    },
    {
      "id": "paid.200",
      "ok": true,
      "detail": "HTTP 200, state completed"
    },
    {
      "id": "paid.receipt",
      "ok": true,
      "detail": "receipt nonce match true, simulated true, amount 10000000, status payment-completed"
    },
    {
      "id": "replay.rejected",
      "ok": true,
      "detail": "HTTP 402, payment status payment-rejected, error replayed_nonce"
    },
    {
      "id": "unsigned.401",
      "ok": true,
      "detail": "HTTP 401"
    },
    {
      "id": "sanitized",
      "ok": true,
      "detail": "no key material or full signatures in transcript"
    }
  ],
  "pass": true
}
