{
  "reference_kind": "trimmed_recorded_exchanges_not_runtime_schema",
  "captured_on": "2026-10-01",
  "endpoint": "https://dev.testril.ai/mcp",
  "note": "Recorded exchanges, not one continuous session. Payments use testnet USDC; addresses are shortened and signed payloads omitted.",
  "normalization": "Capture helper set_args renamed arguments; unsupported materialize blocks field omitted; signed payload redactions explicitly marked.",
  "scenes": [
    {
      "id": "discovery",
      "label": "Discovery & health",
      "title": "Meet the data runtime",
      "description": "Establish the connection, discover the tools, check health, and inspect prices.",
      "examples": [
        1,
        2,
        3,
        4
      ],
      "exchanges": [
        {
          "id": "capture-1-1",
          "example": 1,
          "title": "Open the MCP session (initialize)",
          "method": "initialize",
          "category": "Connection",
          "request": {
            "jsonrpc": "2.0",
            "id": 1,
            "method": "initialize",
            "params": {
              "protocolVersion": "2025-06-18",
              "capabilities": {},
              "clientInfo": {
                "name": "testril-mcp-direct",
                "version": "0.1"
              }
            }
          },
          "request_kind": "MCP message",
          "response": {
            "jsonrpc": "2.0",
            "id": 1,
            "result": {
              "protocolVersion": "2025-06-18",
              "capabilities": {
                "tools": {}
              },
              "serverInfo": {
                "name": "rmcp",
                "version": "3.1.4"
              },
              "instructions": "Testril answers on-chain metric questions for agents and builders: pick a catalog Function (template), bind it to concrete scope (token, wallet, chain, …), materialize a block window (pay if quoted), then read values. …"
            }
          },
          "response_kind": "Captured response",
          "rail": "CDP",
          "outcome": "response"
        },
        {
          "id": "capture-2-1",
          "example": 2,
          "title": "List the tools (tools/list)",
          "method": "tools/list",
          "category": "Discovery",
          "request": {
            "jsonrpc": "2.0",
            "id": 2,
            "method": "tools/list"
          },
          "request_kind": "MCP message",
          "response": {
            "jsonrpc": "2.0",
            "id": 2,
            "result": {
              "tools": [
                {
                  "name": "ask",
                  "…": "…"
                },
                {
                  "name": "bind",
                  "…": "…"
                },
                {
                  "name": "bind_prompt",
                  "…": "…"
                },
                {
                  "name": "claim_rewards",
                  "…": "…"
                },
                {
                  "name": "health_check",
                  "…": "…"
                },
                {
                  "name": "inspect",
                  "…": "…"
                },
                {
                  "name": "materialize",
                  "…": "…"
                },
                {
                  "name": "pay_quote",
                  "…": "…"
                },
                {
                  "name": "provenance",
                  "…": "…"
                },
                {
                  "name": "read",
                  "…": "…"
                },
                {
                  "name": "stop",
                  "…": "…"
                }
              ]
            }
          },
          "response_kind": "Captured response",
          "rail": "CDP",
          "outcome": "response"
        },
        {
          "id": "capture-3-1",
          "example": 3,
          "title": "Connectivity smoke test (health_check)",
          "method": "health_check",
          "category": "Health",
          "request": {
            "tool": "health_check",
            "arguments": {}
          },
          "request_kind": "Tool call",
          "response": {
            "bound_functions": 21,
            "chains": [
              42161,
              1,
              84532
            ],
            "functions": 3,
            "ok": true,
            "outcome": "success",
            "payment": "cdp",
            "transport": "http",
            "version": "0.1.3"
          },
          "response_kind": "Captured response",
          "rail": "CDP",
          "outcome": "success"
        },
        {
          "id": "capture-4-1",
          "example": 4,
          "title": "Price list (inspect pricing)",
          "method": "inspect",
          "category": "Pricing",
          "request": {
            "tool": "inspect",
            "arguments": {
              "subject": "pricing"
            }
          },
          "request_kind": "Tool call",
          "response": {
            "subject": "pricing",
            "outcome": "success",
            "rates": [
              {
                "label": "rpc_ops",
                "unit_price": 0
              },
              {
                "label": "llm_tokens",
                "unit_price": 0.0001
              },
              {
                "label": "materialize_blocks",
                "unit_price": 0.00012
              },
              {
                "label": "query_read",
                "unit_price": 0.00002
              },
              {
                "label": "query_blocks",
                "unit_price": 0.000001
              },
              {
                "label": "extra_cache_days",
                "unit_price": 0.000001
              }
            ]
          },
          "response_kind": "Captured response",
          "rail": "CDP",
          "outcome": "success"
        }
      ]
    },
    {
      "id": "binding",
      "label": "Binding & coverage",
      "title": "Give a function its scope",
      "description": "Bind a token and wallet, then inspect what a bound function already knows.",
      "examples": [
        5,
        6
      ],
      "exchanges": [
        {
          "id": "capture-5-1",
          "example": 5,
          "title": "Bind a Function to a concrete scope (bind)",
          "method": "bind",
          "category": "Binding",
          "request": {
            "tool": "bind",
            "arguments": {
              "function_slug": "erc20_balance",
              "chain_id": 1,
              "params": {
                "token_address": "0xA0b8…eB48",
                "wallet_address": "0x88e6…5640"
              }
            }
          },
          "request_kind": "Tool call",
          "response": {
            "outcome": "success",
            "created": true,
            "bound_function_id": "sha256:47ff…74c0",
            "chain_id": 1,
            "function_slug": "erc20_balance",
            "name": "erc20_balance@1:0xA0b8…eB48:0x88e6…5640",
            "params": {
              "token_address": "0xA0b8…eB48",
              "wallet_address": "0x88e6…5640"
            }
          },
          "response_kind": "Captured response",
          "rail": "CDP",
          "outcome": "success"
        },
        {
          "id": "capture-6-1",
          "example": 6,
          "title": "Inspect a chain and a Bound Function (inspect)",
          "method": "inspect",
          "category": "Coverage",
          "request": {
            "tool": "inspect",
            "arguments": {
              "subject": "bound_function",
              "bound_function_id": "sha256:18ec…a097"
            }
          },
          "request_kind": "Tool call",
          "response": {
            "subject": "bound_function",
            "outcome": "success",
            "bound_function_id": "sha256:18ec…a097",
            "chain_id": 42161,
            "function_slug": "erc20_transfer_volume",
            "name": "erc20_transfer_volume@42161:0xaf88…5831",
            "params": {
              "chain_id": 42161,
              "token_address": "0xaf88…5831"
            },
            "data_endpoints": {
              "data": "https://dev.testril.ai/v1/specs/sha256:18ec…a097/data",
              "provenance": "https://dev.testril.ai/v1/specs/sha256:18ec…a097/provenance"
            },
            "materialized": [
              {
                "from_block": 510282412,
                "to_block": 510282427,
                "cache_expiry_time": "1790844971"
              },
              {
                "from_block": 510316625,
                "to_block": 510316825,
                "cache_expiry_time": "1790855041"
              },
              "…"
            ],
            "materializing": [],
            "active_jobs": []
          },
          "response_kind": "Captured response",
          "rail": "CDP",
          "outcome": "success"
        }
      ]
    },
    {
      "id": "materialization",
      "label": "Materialization",
      "title": "Bring a block window into view",
      "description": "Quote 90 blocks of USDC transfer data on Arbitrum One, pay, execute, and inspect the job.",
      "examples": [
        7,
        9,
        10,
        11
      ],
      "exchanges": [
        {
          "id": "capture-7-1",
          "example": 7,
          "title": "Ask to materialize a window → a priced quote (materialize → payment_required)",
          "method": "materialize",
          "category": "Materialization",
          "request": {
            "tool": "materialize",
            "arguments": {
              "bound_function_id": "sha256:18ec…a097",
              "from_block": 510271000,
              "to_block": 510271090
            }
          },
          "request_kind": "Tool call",
          "response": {
            "outcome": "payment_required",
            "quote_id": "quote:01a0f618-de6d-7382-87d9-2545635a6570",
            "amount": 0.0108,
            "lines": [
              {
                "label": "materialize_blocks",
                "units": 90,
                "unit_price": 0.00012,
                "amount": 0.0108
              }
            ],
            "accepts": [
              {
                "scheme": "exact",
                "network": "eip155:84532",
                "asset": "0x036C…CF7e",
                "payTo": "0x4559…5e52",
                "amount": "10800",
                "extra": {
                  "assetTransferMethod": "eip3009",
                  "name": "USDC",
                  "version": "2"
                }
              },
              {
                "scheme": "batch-settlement",
                "network": "eip155:84532",
                "asset": "0x036C…CF7e",
                "payTo": "0x4559…5e52",
                "amount": "10800",
                "extra": {
                  "name": "USDC",
                  "receiverAuthorizer": "0x91b0…086b",
                  "version": "2",
                  "withdrawDelay": 3600
                }
              }
            ]
          },
          "response_kind": "Captured response",
          "rail": "CDP",
          "outcome": "payment_required"
        },
        {
          "id": "capture-9-1",
          "example": 9,
          "title": "Pay the quote (pay_quote, exact scheme) → settlement receipt",
          "method": "pay_quote",
          "category": "Payment",
          "request": {
            "tool": "pay_quote",
            "arguments": {
              "quote_id": "quote:01a0f618-de6d-7382-87d9-2545635a6570",
              "payload": "<signed x402 JSON omitted>"
            }
          },
          "request_kind": "Tool call",
          "response": {
            "outcome": "success",
            "payment_id": "payment:01a0f618-de6d-7382-87d9-2545635a6570",
            "quote_id": "quote:01a0f618-de6d-7382-87d9-2545635a6570",
            "amount": 0.0108,
            "receipt": {
              "provider": "cdp",
              "state": "paid",
              "amount": 0.0108,
              "quote_id": "quote:01a0f618-de6d-7382-87d9-2545635a6570",
              "reference": "0x8e47…43a1"
            }
          },
          "response_kind": "Captured response",
          "rail": "CDP",
          "outcome": "success"
        },
        {
          "id": "capture-10-1",
          "example": 10,
          "title": "Run the work with the receipt (materialize with payment_id only)",
          "method": "materialize",
          "category": "Execution",
          "request": {
            "tool": "materialize",
            "arguments": {
              "payment_id": "payment:01a0f618-de6d-7382-87d9-2545635a6570"
            }
          },
          "request_kind": "Tool call",
          "response": {
            "outcome": "success",
            "result": "materialized",
            "regime": "async",
            "job": {
              "job_id": "job:37",
              "quote_id": "quote:01a0f618-…-5a6570",
              "blocks_total": 90,
              "state": "queued"
            }
          },
          "response_kind": "Captured response",
          "rail": "CDP",
          "outcome": "success"
        },
        {
          "id": "capture-11-1",
          "example": 11,
          "title": "Poll the job (inspect subject=job)",
          "method": "inspect",
          "category": "Inspection",
          "request": {
            "tool": "inspect",
            "arguments": {
              "subject": "job",
              "job_id": "job:37"
            }
          },
          "request_kind": "Tool call",
          "response": {
            "subject": "job",
            "outcome": "success",
            "state": "done",
            "job_id": "job:37",
            "blocks_done": 90,
            "blocks_total": 90,
            "bound_function_id": "sha256:18ec…a097",
            "from_block": 510271000,
            "to_block": 510271090,
            "spent": 0.0108
          },
          "response_kind": "Captured response",
          "rail": "CDP",
          "outcome": "success"
        }
      ]
    },
    {
      "id": "query",
      "label": "Query",
      "title": "Receive the values",
      "description": "A read has its own quote. After settlement, the answer arrives as typed values.",
      "examples": [
        12,
        13
      ],
      "exchanges": [
        {
          "id": "capture-12-1",
          "example": 12,
          "title": "Ask to read values → a priced quote (read → payment_required)",
          "method": "read",
          "category": "Query",
          "request": {
            "tool": "read",
            "arguments": {
              "bound_function_id": "sha256:18ec…a097",
              "from_block": 510603582,
              "to_block": 510603592
            }
          },
          "request_kind": "Tool call",
          "response": {
            "outcome": "payment_required",
            "quote_id": "quote:01a0f6ca-d6bf-7d72-add2-d45ac59f8dfa",
            "amount": 0.00003,
            "from_block": 510603582,
            "to_block": 510603592,
            "bound_function_id": "sha256:18ec…a097",
            "lines": [
              {
                "label": "query_read",
                "units": 1,
                "unit_price": 0.00002,
                "amount": 0.00002
              },
              {
                "label": "query_blocks",
                "units": 10,
                "unit_price": 0.000001,
                "amount": 0.00001
              }
            ],
            "accepts": [
              {
                "scheme": "batch-settlement",
                "network": "eip155:84532",
                "asset": "0x036C…CF7e",
                "payTo": "0x4559…5e52",
                "amount": "30",
                "extra": {
                  "name": "USDC",
                  "receiverAuthorizer": "0x91b0…086b",
                  "version": "2",
                  "withdrawDelay": 3600
                }
              }
            ]
          },
          "response_kind": "Captured response",
          "rail": "CDP",
          "outcome": "payment_required"
        },
        {
          "id": "capture-13-1",
          "example": 13,
          "title": "Read the data (read with payment_id only) — the data is the answer",
          "method": "read",
          "category": "Query",
          "request": {
            "tool": "read",
            "arguments": {
              "payment_id": "payment:01a0f6ca-d6bf-7d72-add2-d45ac59f8dfa"
            }
          },
          "request_kind": "Tool call",
          "response": {
            "outcome": "success",
            "bound_function_id": "sha256:18ec…a097",
            "from_block": 510603582,
            "to_block": 510603592,
            "fields": [
              {
                "name": "count",
                "type": "u256"
              },
              {
                "name": "volume",
                "type": "u256"
              }
            ],
            "values": [
              {
                "block": 510603582,
                "entity": "0xaf88…5831",
                "count": "3",
                "volume": "1181594340"
              },
              {
                "block": 510603584,
                "entity": "0xaf88…5831",
                "count": "2",
                "volume": "26179016"
              },
              {
                "block": 510603585,
                "entity": "0xaf88…5831",
                "count": "5",
                "volume": "146701109"
              },
              {
                "block": 510603589,
                "entity": "0xaf88…5831",
                "count": "4",
                "volume": "14786922"
              },
              "…"
            ]
          },
          "response_kind": "Captured response",
          "rail": "CDP",
          "outcome": "success"
        }
      ]
    },
    {
      "id": "provenance",
      "label": "Provenance",
      "title": "Follow a value back to its source",
      "description": "Inspect the source block hashes behind an Ethereum token balance.",
      "examples": [
        14
      ],
      "exchanges": [
        {
          "id": "capture-14-1",
          "example": 14,
          "title": "Attest the inputs (provenance)",
          "method": "provenance",
          "category": "Provenance",
          "request": {
            "tool": "provenance",
            "arguments": {
              "bound_function_id": "sha256:47ff…74c0",
              "attribute": "balance",
              "from_block": 26096269,
              "to_block": 26096369
            }
          },
          "request_kind": "Tool call",
          "response": {
            "attribute": "balance",
            "block_count": 100,
            "blocks": [
              {
                "number": 26096269,
                "block_hash": "0x3d5d…2084"
              },
              {
                "number": 26096270,
                "block_hash": "0x37ce…53f4"
              },
              "…"
            ]
          },
          "response_kind": "Captured response",
          "rail": "CDP",
          "outcome": "response"
        }
      ]
    },
    {
      "id": "rewards",
      "label": "Data liquidity & rewards",
      "title": "See what useful data earns",
      "description": "Inspect purchases and reward accounting, then see the captured claim result.",
      "examples": [
        15,
        17,
        18,
        20
      ],
      "exchanges": [
        {
          "id": "capture-15-1",
          "example": 15,
          "title": "Inspect the P&L card (inspect subject=nft)",
          "method": "inspect",
          "category": "Accounting",
          "request": {
            "tool": "inspect",
            "arguments": {
              "subject": "nft",
              "wallet": "0x0000…0000"
            }
          },
          "request_kind": "Tool call",
          "response": {
            "subject": "nft",
            "outcome": "success",
            "nft": "1",
            "wallet": "0x0000…0000",
            "paid": "124830",
            "refunded": "2520",
            "cost": "122310",
            "earned": "208",
            "claimed": "0",
            "unclaimed": "208",
            "pnl": "-122102",
            "purchases": [
              {
                "bound_function_id": "sha256:18ec…a097",
                "quote_id": "quote:9b40…2cf6",
                "paid": "1800",
                "refunded": "0",
                "cost": "1800",
                "requested_window": {
                  "from_block": 510309176,
                  "to_block": 510309191
                }
              },
              {
                "bound_function_id": "sha256:18ec…a097",
                "quote_id": "quote:4485…83d5",
                "paid": "1830",
                "refunded": "1800",
                "cost": "30",
                "requested_window": {
                  "from_block": 510343589,
                  "to_block": 510343604
                }
              },
              "…"
            ]
          },
          "response_kind": "Captured response",
          "rail": "CDP",
          "outcome": "success"
        },
        {
          "id": "capture-17-1",
          "example": 17,
          "title": "The purchase is credited to the card immediately (demo/mock rail)",
          "method": "inspect",
          "category": "Accounting",
          "request": {
            "tool": "inspect",
            "arguments": {
              "subject": "nft",
              "wallet": "0x0000…0000"
            }
          },
          "request_kind": "Tool call",
          "response": {
            "subject": "nft",
            "outcome": "success",
            "nft": "1",
            "wallet": "0x0000…0000",
            "paid": "2020350",
            "refunded": "30960",
            "cost": "1989390",
            "earned": "912",
            "claimed": "0",
            "unclaimed": "912",
            "pnl": "-1988478",
            "purchases": [
              "…",
              {
                "bound_function_id": "sha256:18ec…a097",
                "quote_id": "quote:01a0f729-b68c-7fc0-b812-e116ae414102",
                "paid": "1800",
                "refunded": "0",
                "cost": "1800",
                "requested_window": {
                  "from_block": 509988008,
                  "to_block": 509988023
                }
              }
            ]
          },
          "response_kind": "Captured response",
          "rail": "Mock",
          "outcome": "success"
        },
        {
          "id": "capture-18-1",
          "example": 18,
          "title": "Paid reads earn rewards (demo/mock rail)",
          "method": "inspect",
          "category": "Accounting",
          "request": {
            "tool": "inspect",
            "arguments": {
              "subject": "nft",
              "wallet": "0x0000…0000"
            }
          },
          "request_kind": "Tool call",
          "response": {
            "subject": "nft",
            "outcome": "success",
            "nft": "1",
            "wallet": "0x0000…0000",
            "paid": "2020350",
            "refunded": "30960",
            "cost": "1989390",
            "earned": "917",
            "claimed": "0",
            "unclaimed": "917",
            "pnl": "-1988473",
            "purchases": [
              "…"
            ]
          },
          "response_kind": "Captured response",
          "rail": "Mock",
          "outcome": "success"
        },
        {
          "id": "capture-20-1",
          "example": 20,
          "title": "Claim rewards (claim_rewards)",
          "method": "claim_rewards",
          "category": "Rewards",
          "request": {
            "tool": "claim_rewards",
            "arguments": {
              "wallet": "0x0000…0000"
            }
          },
          "request_kind": "Tool call",
          "response": {
            "outcome": "success",
            "claimed": "0",
            "unclaimed": "208"
          },
          "response_kind": "Captured response",
          "rail": "CDP",
          "outcome": "success"
        }
      ]
    },
    {
      "id": "batch",
      "label": "Batch settlement",
      "title": "Many small payments, one channel",
      "description": "Explore captured quotes, channel inspections, and signed voucher payments.",
      "examples": [
        16,
        21,
        22,
        23,
        24,
        25,
        26
      ],
      "exchanges": [
        {
          "id": "capture-16-1",
          "example": 16,
          "title": "Buy a window (sub-cent) via a batch-settlement voucher",
          "method": "materialize",
          "category": "Materialization",
          "request": {
            "tool": "materialize",
            "arguments": {
              "bound_function_id": "sha256:18ec…a097",
              "from_block": 510603580,
              "to_block": 510603595
            }
          },
          "request_kind": "Tool call",
          "response": {
            "outcome": "payment_required",
            "quote_id": "quote:01a0f6ca-93dc-7b42-9c9c-2a9b0ec91961",
            "amount": 0.0018,
            "lines": [
              {
                "label": "materialize_blocks",
                "units": 15,
                "unit_price": 0.00012,
                "amount": 0.0018
              }
            ],
            "accepts": [
              {
                "scheme": "batch-settlement",
                "network": "eip155:84532",
                "asset": "0x036C…CF7e",
                "payTo": "0x4559…5e52",
                "amount": "1800",
                "extra": {
                  "name": "USDC",
                  "receiverAuthorizer": "0x91b0…086b",
                  "version": "2",
                  "withdrawDelay": 3600
                }
              }
            ]
          },
          "response_kind": "Captured response",
          "rail": "CDP",
          "outcome": "payment_required"
        },
        {
          "id": "capture-16-2",
          "example": 16,
          "title": "Buy a window (sub-cent) via a batch-settlement voucher",
          "method": "pay_quote",
          "category": "Payment",
          "request": {
            "tool": "pay_quote",
            "arguments": {
              "quote_id": "quote:01a0f6ca-93dc-7b42-9c9c-2a9b0ec91961",
              "payload": "<signed x402 JSON omitted>"
            }
          },
          "request_kind": "Tool call",
          "response": {
            "outcome": "success",
            "amount": 0.0018,
            "payment_id": "payment:01a0f6ca-93dc-7b42-9c9c-2a9b0ec91961",
            "quote_id": "quote:01a0f6ca-93dc-7b42-9c9c-2a9b0ec91961",
            "receipt": {
              "provider": "cdp",
              "state": "paid",
              "amount": 0.0018,
              "reference": "0xdf9f…783f"
            }
          },
          "response_kind": "Captured response",
          "rail": "CDP",
          "outcome": "success"
        },
        {
          "id": "capture-21-1",
          "example": 21,
          "title": "Look up open channels (inspect subject=channels) — none yet",
          "method": "inspect",
          "category": "Channels",
          "request": {
            "tool": "inspect",
            "arguments": {
              "subject": "channels",
              "payer": "0x4c65…D999",
              "network": "eip155:84532"
            }
          },
          "request_kind": "Tool call",
          "response": {
            "subject": "channels",
            "outcome": "success",
            "payer": "0x4c65…D999",
            "network": "eip155:84532",
            "channels": []
          },
          "response_kind": "Captured response",
          "rail": "CDP",
          "outcome": "success"
        },
        {
          "id": "capture-22-1",
          "example": 22,
          "title": "First batch payment = deposit + voucher",
          "method": "pay_quote",
          "category": "Payment",
          "request": {
            "tool": "pay_quote",
            "arguments": {
              "quote_id": "quote:01a0f6ab-2385-7cd1-85f0-0f71af78f715",
              "payload": "<signed x402 JSON omitted>"
            }
          },
          "request_kind": "Tool call",
          "response": {
            "outcome": "success",
            "amount": 0.0036,
            "payment_id": "payment:01a0f6ab-2385-7cd1-85f0-0f71af78f715",
            "quote_id": "quote:01a0f6ab-2385-7cd1-85f0-0f71af78f715",
            "receipt": {
              "provider": "cdp",
              "state": "paid",
              "amount": 0.0036,
              "reference": "0x96f2…7bd5"
            }
          },
          "response_kind": "Captured response",
          "rail": "CDP",
          "outcome": "success"
        },
        {
          "id": "capture-23-1",
          "example": 23,
          "title": "Channel now open (inspect subject=channels)",
          "method": "inspect",
          "category": "Channels",
          "request": null,
          "request_kind": "Request omitted in capture",
          "response": {
            "subject": "channels",
            "outcome": "success",
            "payer": "0x4c65…D999",
            "network": "eip155:84532",
            "channels": [
              {
                "channelId": "0xdf9f…783f",
                "network": "eip155:84532",
                "channelConfig": {
                  "payer": "0x4c65…D999",
                  "payerAuthorizer": "0x4c65…D999",
                  "receiver": "0x4559…5e52",
                  "receiverAuthorizer": "0x91b0…086b",
                  "token": "0x036C…CF7e",
                  "withdrawDelay": 3600,
                  "salt": "0x4080…a889"
                },
                "balance": "100000",
                "chargedCumulativeAmount": "3600",
                "signedMaxClaimable": "3600",
                "totalClaimed": "0",
                "closed": false
              }
            ]
          },
          "response_kind": "Captured response",
          "rail": "CDP",
          "outcome": "success"
        },
        {
          "id": "capture-24-1",
          "example": 24,
          "title": "Top-up with a voucher only (no new deposit)",
          "method": "pay_quote",
          "category": "Payment",
          "request": null,
          "request_kind": "Request omitted in capture",
          "response": {
            "outcome": "success",
            "amount": 0.0036,
            "payment_id": "payment:01a0f6ab-3ae7-7661-85dc-1802ee5df705",
            "quote_id": "quote:01a0f6ab-3ae7-7661-85dc-1802ee5df705",
            "receipt": {
              "provider": "cdp",
              "state": "paid",
              "amount": 0.0036,
              "reference": "0xdf9f…783f"
            }
          },
          "response_kind": "Captured response",
          "rail": "CDP",
          "outcome": "success"
        },
        {
          "id": "capture-25-1",
          "example": 25,
          "title": "Testril claims the vouchers on-chain (claim)",
          "method": "On-chain observation",
          "category": "Settlement",
          "request": null,
          "request_kind": "Request omitted in capture",
          "response": {
            "totalClaimed_api": "10800",
            "claim_txs": [
              {
                "tx": "0xce25…46a1",
                "claimAmount": 10800,
                "newTotalClaimed": 10800,
                "block": 47538278
              }
            ]
          },
          "response_kind": "On-chain observation",
          "rail": "CDP · on-chain",
          "outcome": "observed"
        },
        {
          "id": "capture-26-1",
          "example": 26,
          "title": "…then sweeps the claimed funds to the Safe (sweep/settle)",
          "method": "On-chain observation",
          "category": "Settlement",
          "request": null,
          "request_kind": "Request omitted in capture",
          "response": {
            "safe_usdc_delta_atoms": 10800,
            "sweep_txs": [
              {
                "tx": "0xbdb2…df27",
                "amount_atoms": 10800,
                "block": 47538293
              }
            ]
          },
          "response_kind": "On-chain observation",
          "rail": "CDP · on-chain",
          "outcome": "observed"
        }
      ]
    },
    {
      "id": "refunds",
      "label": "Stop & refund",
      "title": "Stop work that has not been delivered",
      "description": "A future window can be stopped by its payer. The response records unspent blocks and any refund.",
      "examples": [
        19,
        35
      ],
      "exchanges": [
        {
          "id": "capture-19-1",
          "example": 19,
          "title": "Buy a future window, then stop it for a refund (stop) — demo/mock rail",
          "method": "materialize",
          "category": "Materialization",
          "request": {
            "tool": "materialize",
            "arguments": {
              "bound_function_id": "sha256:18ec…a097",
              "from_block": 510664710,
              "to_block": 510664725,
              "extra_cache_days": 2
            }
          },
          "request_kind": "Tool call",
          "response": {
            "outcome": "payment_required",
            "quote_id": "quote:01a0f72a-3573-7f21-84c3-9e46491bc006",
            "amount": 0.00183,
            "lines": [
              {
                "label": "materialize_blocks",
                "units": 15,
                "unit_price": 0.00012,
                "amount": 0.0018
              },
              {
                "label": "extra_cache_days",
                "units": 30,
                "unit_price": 0.000001,
                "amount": 0.00003
              }
            ],
            "accepts": [
              {
                "scheme": "batch-settlement",
                "…": "…"
              }
            ]
          },
          "response_kind": "Captured response",
          "rail": "Mock",
          "outcome": "payment_required"
        },
        {
          "id": "capture-19-2",
          "example": 19,
          "title": "Buy a future window, then stop it for a refund (stop) — demo/mock rail",
          "method": "stop",
          "category": "Refund",
          "request": {
            "tool": "stop",
            "arguments": {
              "bound_function_id": "sha256:18ec…a097",
              "wallet": "0x0000…0000",
              "quote_id": "quote:01a0f72a-3573-7f21-84c3-9e46491bc006"
            }
          },
          "request_kind": "Tool call",
          "response": {
            "outcome": "success",
            "unspent_blocks": 15,
            "bound_function_id": "sha256:18ec…a097",
            "jobs": [
              {
                "job_id": "job:163",
                "quote_id": "quote:01a0f72a-3573-…-1bc006",
                "refunded": 0.0018,
                "unspent_blocks": 15
              }
            ]
          },
          "response_kind": "Captured response",
          "rail": "Mock",
          "outcome": "success"
        },
        {
          "id": "capture-35-1",
          "example": 35,
          "title": "Only the owner can stop/refund (wrong wallet)",
          "method": "stop",
          "category": "Refund",
          "request": {
            "tool": "stop",
            "arguments": {
              "bound_function_id": "sha256:18ec…a097",
              "wallet": "0x0000…0000",
              "quote_id": "quote:01a0f6ca-e6cd-7291-b43a-54565b265cb7"
            }
          },
          "request_kind": "Tool call",
          "response": {
            "outcome": "error",
            "kind": "invalid_params",
            "message": "invalid request: caller is not the agreed owner"
          },
          "response_kind": "Captured response",
          "rail": "Captured",
          "outcome": "error"
        }
      ]
    },
    {
      "id": "rehearsal",
      "label": "Mock rehearsal",
      "title": "Rehearse the payment loop",
      "description": "A mock payment returns a synthetic receipt without an on-chain signature.",
      "examples": [
        27,
        28
      ],
      "exchanges": [
        {
          "id": "capture-27-1",
          "example": 27,
          "title": "A mock quote offers a bare batch-settlement row",
          "method": "materialize",
          "category": "Materialization",
          "request": null,
          "request_kind": "Request omitted in capture",
          "response": {
            "outcome": "payment_required",
            "quote_id": "quote:01a0f729-b68c-7fc0-b812-e116ae414102",
            "amount": 0.0018,
            "lines": [
              {
                "label": "materialize_blocks",
                "units": 15,
                "unit_price": 0.00012,
                "amount": 0.0018
              }
            ],
            "accepts": [
              {
                "scheme": "batch-settlement"
              }
            ]
          },
          "response_kind": "Captured response",
          "rail": "Mock",
          "outcome": "payment_required"
        },
        {
          "id": "capture-28-1",
          "example": 28,
          "title": "A mock payment settles instantly with a `provider: \"mock\"` receipt",
          "method": "pay_quote",
          "category": "Payment",
          "request": {
            "tool": "pay_quote",
            "arguments": {
              "quote_id": "quote:01a0f729-b68c-7fc0-b812-e116ae414102"
            }
          },
          "request_kind": "Tool call",
          "response": {
            "outcome": "success",
            "amount": 0.0018,
            "payment_id": "payment:01a0f729-b68c-7fc0-b812-e116ae414102",
            "quote_id": "quote:01a0f729-b68c-7fc0-b812-e116ae414102",
            "receipt": {
              "provider": "mock",
              "state": "paid",
              "amount": 0.0018,
              "reference": "mock:quote:01a0f729-b68c-7fc0-b812-e116ae414102"
            }
          },
          "response_kind": "Captured response",
          "rail": "Mock",
          "outcome": "success"
        }
      ]
    },
    {
      "id": "recovery",
      "label": "Errors & recovery",
      "title": "A refusal tells the agent what to fix",
      "description": "See malformed voucher and deposit payloads refused with an explanation.",
      "examples": [
        29,
        30,
        31,
        32,
        33,
        34,
        36
      ],
      "exchanges": [
        {
          "id": "capture-29-1",
          "example": 29,
          "title": "Payment payload must be raw JSON, not base64 (pay_quote)",
          "method": "pay_quote",
          "category": "Validation",
          "request": null,
          "request_kind": "Request omitted in capture",
          "response": {
            "outcome": "error",
            "kind": "invalid_params",
            "message": "invalid request: invalid payload json: expected value at line 1 column 1"
          },
          "response_kind": "Captured response",
          "rail": "Captured",
          "outcome": "error"
        },
        {
          "id": "capture-30-1",
          "example": 30,
          "title": "The live rail requires a signed payment (pay_quote, no payload)",
          "method": "pay_quote",
          "category": "Validation",
          "request": null,
          "request_kind": "Request omitted in capture",
          "response": {
            "outcome": "error",
            "kind": "invalid_params",
            "message": "invalid request: missing payload: cdp rail requires a signed payment"
          },
          "response_kind": "Captured response",
          "rail": "Captured",
          "outcome": "error"
        },
        {
          "id": "capture-31-1",
          "example": 31,
          "title": "`exact` is not offered below the sub-cent floor",
          "method": "pay_quote",
          "category": "Validation",
          "request": null,
          "request_kind": "Request omitted in capture",
          "response": {
            "outcome": "error",
            "kind": "exact_below_floor_payload_refused",
            "message": "invalid request: exact_below_floor_payload_refused: exact is not in this quote's accepts menu"
          },
          "response_kind": "Captured response",
          "rail": "Captured",
          "outcome": "error"
        },
        {
          "id": "capture-32-1",
          "example": 32,
          "title": "Don't resubmit a paid quote (replay)",
          "method": "pay_quote",
          "category": "Validation",
          "request": null,
          "request_kind": "Request omitted in capture",
          "response": {
            "outcome": "error",
            "kind": "exact_replay_after_paid",
            "message": "this quote is already paid; do not resubmit a payment payload"
          },
          "response_kind": "Captured response",
          "rail": "Captured",
          "outcome": "error"
        },
        {
          "id": "capture-33-1",
          "example": 33,
          "title": "Malformed batch voucher (missing channelId)",
          "method": "pay_quote",
          "category": "Validation",
          "request": {
            "channelId": "0x0000…0000",
            "maxClaimableAmount": "360"
          },
          "request_kind": "Payment payload excerpt",
          "response": {
            "outcome": "error",
            "kind": "invalid_params",
            "message": "invalid request: invalid_batch_settlement_evm_voucher_payload: missing channelId"
          },
          "response_kind": "Captured response",
          "rail": "Captured",
          "outcome": "error"
        },
        {
          "id": "capture-34-1",
          "example": 34,
          "title": "Deposit with an empty channelConfig (missing payer)",
          "method": "pay_quote",
          "category": "Validation",
          "request": {
            "type": "deposit",
            "channelConfig": {},
            "voucher": {
              "channelId": "0x0000…0000",
              "maxClaimableAmount": "360",
              "signature": "0x…sig…"
            }
          },
          "request_kind": "Payment payload excerpt",
          "response": {
            "outcome": "error",
            "kind": "invalid_params",
            "message": "invalid request: missing payer"
          },
          "response_kind": "Captured response",
          "rail": "Captured",
          "outcome": "error"
        },
        {
          "id": "capture-36-1",
          "example": 36,
          "title": "Overlapping quotes: re-quote when coverage changed",
          "method": "pay_quote",
          "category": "Validation",
          "request": null,
          "request_kind": "Request omitted in capture",
          "response": {
            "outcome": "error",
            "kind": "state",
            "message": "[state] pay for a backfill of `sha256:18ec…a097`: the quoted holes changed — coverage or paid jobs changed since this quote was issued — request a new materialize quote for the same window, then pay the returned quote_id (materialize)",
            "remedy": [
              {
                "action": "request a new materialize quote for the same window, then pay the returned quote_id",
                "call": "materialize"
              }
            ]
          },
          "response_kind": "Captured response",
          "rail": "Captured",
          "outcome": "error"
        }
      ]
    },
    {
      "id": "rest",
      "label": "REST reads",
      "title": "The same accounting, over HTTP",
      "description": "Read a wallet card through REST and see missing or malformed input rejected.",
      "examples": [
        37
      ],
      "exchanges": [
        {
          "id": "capture-37-1",
          "example": 37,
          "title": "REST parity — the card is also a plain GET (and validates input)",
          "method": "GET /v1/nft",
          "category": "REST",
          "request": {
            "method": "GET",
            "url": "https://dev.testril.ai/v1/nft?wallet=0x57a9…7c69"
          },
          "request_kind": "HTTP request",
          "response": {
            "wallet": "0x57a9…7c69",
            "paid": "0",
            "refunded": "0",
            "cost": "0",
            "earned": "0",
            "claimed": "0",
            "unclaimed": "0",
            "pnl": "0",
            "purchases": []
          },
          "response_kind": "Captured response",
          "rail": "CDP",
          "outcome": "response"
        },
        {
          "id": "capture-37-2",
          "example": 37,
          "title": "REST parity — the card is also a plain GET (and validates input)",
          "method": "GET /v1/nft",
          "category": "REST",
          "request": {
            "method": "GET",
            "url": "https://dev.testril.ai/v1/nft"
          },
          "request_kind": "HTTP request",
          "response": {
            "outcome": "error",
            "kind": "invalid_params",
            "message": "wallet is required"
          },
          "response_kind": "Captured response",
          "rail": "CDP",
          "outcome": "error"
        },
        {
          "id": "capture-37-3",
          "example": 37,
          "title": "REST parity — the card is also a plain GET (and validates input)",
          "method": "GET /v1/nft",
          "category": "REST",
          "request": {
            "method": "GET",
            "url": "https://dev.testril.ai/v1/nft?wallet=0x1234"
          },
          "request_kind": "HTTP request",
          "response": {
            "outcome": "error",
            "kind": "invalid_params",
            "message": "invalid request: payer must be a 20-byte address (0x + 40 hex), not length 6"
          },
          "response_kind": "Captured response",
          "rail": "CDP",
          "outcome": "error"
        }
      ]
    }
  ]
}
