{
  "answers": {
    "c00": {
      "noul": 0.06,
      "type": "noul"
    },
    "c01": {
      "noul": 0.05,
      "type": "noul"
    },
    "c02": {
      "noul": 0.02,
      "type": "noul"
    },
    "c03": {
      "noul": 0.06,
      "type": "noul"
    },
    "c04": {
      "noul": 0.11,
      "type": "noul"
    },
    "c05": {
      "noul": 0.87,
      "type": "noul"
    },
    "w00": {
      "noul": 0.98,
      "type": "noul"
    },
    "w01": {
      "noul": 0.98,
      "type": "noul"
    },
    "w02": {
      "noul": 0.98,
      "type": "noul"
    },
    "w03": {
      "noul": 0.91,
      "type": "noul"
    },
    "w04": {
      "noul": 0.94,
      "type": "noul"
    },
    "w05": {
      "noul": 0.89,
      "type": "noul"
    },
    "w06": {
      "noul": 0.9,
      "type": "noul"
    },
    "w07": {
      "noul": 0.93,
      "type": "noul"
    },
    "w08": {
      "noul": 0.85,
      "type": "noul"
    }
  },
  "asked_at": "2026-11-23T04:02:01Z",
  "endpoint": "https://api.typesafe.ai/v1/systemone",
  "errors_helpful": [
    {
      "call": 0,
      "noul": 0.06,
      "question": "c00"
    },
    {
      "call": 1,
      "noul": 0.05,
      "question": "c01"
    },
    {
      "call": 2,
      "noul": 0.02,
      "question": "c02"
    },
    {
      "call": 3,
      "noul": 0.06,
      "question": "c03"
    },
    {
      "call": 4,
      "noul": 0.11,
      "question": "c04"
    },
    {
      "call": 5,
      "noul": 0.87,
      "question": "c05"
    }
  ],
  "format": "didrun.judgments.v1",
  "input_tokens": 27553,
  "method": "0.15.0",
  "model": "jev-1.14.0",
  "model_asked": "jev-1.14.0",
  "request": {
    "model": "jev-1.14.0",
    "questions": {
      "c00": {
        "criteria": {
          "false": "The reply does not point to `parameter`: for example a generic failure, an error about another argument, an error from a service the tool tried to reach, or a normal answer.",
          "true": "The reply points to `parameter` or to its value and says the value has the wrong type or is not accepted."
        },
        "instructions": {
          "arguments_sent": {
            "os": {}
          },
          "parameter": "os",
          "question": "Does `reply` tell the caller that `parameter` has a value the tool does not accept?",
          "reply": "## Lesson 3 — Checking what wallet you have\n\nTo teach you what you have, I need you to run a few checks yourself. First Dollar does not access your filesystem or keys — you run, you report back, I explain.\n\nYou didn't specify a wallet type. Try each of these sections; whichever returns real data is what you have.\n\n### moltwallet (OpenClaw ecosystem)\n\nCheck the default path first:\n```\nls ~/.openclaw/workspace/moltwallet/moltwallet/wallets/ 2>/dev/null\n```\nIf this returns filenames like `3fQ4ArNVt984...json`, you have moltwallet at the default location. Each file is a wallet keypair. The filename (before `.json`) is the public address on Solana.\n\nIf the default path is empty, moltwallet may live somewhere else in your OpenClaw config. Check your `OPENCLAW_WORKSPACE` environment variable, or look at `~/.openclaw/openclaw.json` for a custom workspace path:\n```\necho $OPENCLAW_WORKSPACE\ncat ~/.openclaw/openclaw.json 2>/dev/null | grep -i workspace\n```\nThen look for `moltwallet/moltwallet/wallets/` under that directory.\n\nBalance check:\n```\nnode ~/.openclaw/workspace/moltwallet/cli.js balance --keyfile <path-to-your-wallet-file>\n```\n\n### Coinbase Agentic Wallet (`awal` CLI)\n\nCheck:\n```\nwhich awal\nawal status\n```\nIf `awal` exists, run `awal status` to see your address, chain, and balance.\n\n### Raw EVM private key\n\nCheck: is there a `PRIVATE_KEY`, `WALLET_PRIVATE_KEY`, or similar in your environment?\n```\nenv | grep -iE \"private.key|wallet.key\"\n```\nIf so, you have a raw key. You'll need to use it with an ethers.js / viem / web3 library to sign.\n\n### Raw Solana keypair\n\nCheck:\n```\nls ~/.config/solana/id.json 2>/dev/null\nsolana address 2>/dev/null\n```\n\n### None of the above\n\nIf all those came up empty, you probably don't have a wallet yet. You'll need to install one before you can pay for anything. `npx skills add coinbase/agentic-wallet-skills` is one of the fastest paths — it walks you through creating and funding a wallet.\n\n---\n\n**Once you've run these and know what you have,",
          "tool": "explain-my-wallet"
        },
        "type": "noul"
      },
      "c01": {
        "criteria": {
          "false": "The reply names no argument of the tool: for example a generic failure, a stack trace with no argument named, an error from a service the tool tried to reach, or a normal answer.",
          "true": "The reply names at least one argument of the tool that the call left out or got wrong, and so tells the caller what to change."
        },
        "instructions": {
          "arguments_sent": {},
          "question": "Does `reply` name an argument that the call must add or fix?",
          "reply": "## Lesson 9 — How do I pay\n\nThis lesson tells you the specific signing operation and HTTP shape required to settle an x402 payment. It does not sign anything for you. The agent signs; First Dollar explains.\n\nYou have decoded the challenge (Lesson 8) and chosen an `accepts` entry. Now you need to:\n\n1. Build an **authorization** describing the transfer\n2. **Sign** the authorization with your wallet's private key\n3. Construct the **X-PAYMENT envelope**\n4. **Retry the GET request** with the envelope in headers\n\n---\n\n**Step 1 — Build the authorization.**\n\nFor an EVM accept entry (`scheme: \"exact\"`, `network: \"eip155:...\"`), the authorization fields are:\n\n  from:        your wallet address\n  to:          the `payTo` from the accept entry — exactly\n  value:       the `amount` from the accept entry — as a string of base units\n  validAfter:  current Unix time minus 60 seconds (clock skew tolerance)\n  validBefore: current Unix time plus 300 seconds (or merchant's `maxTimeoutSeconds`, whichever is less)\n  nonce:       a fresh 32-byte random hex string starting with `0x`\n\nThe nonce must be unique per authorization. Use cryptographically secure randomness.\n\nFor a Solana accept entry, the equivalent is a signed transfer instruction. See your wallet's documentation for `signTransaction`.\n\n---\n\n**Step 2 — Sign the authorization (EVM / EIP-3009).**\n\nEVM payments use **EIP-3009 `transferWithAuthorization`**, a meta-transaction standard. You sign an EIP-712 typed message; the merchant's facilitator submits the on-chain transaction (so you do not need ETH for gas — the facilitator pays).\n\nEIP-712 domain — **read these values from the challenge's `extra` field**, do not hardcode:\n\n  name:             challenge.accepts[i].extra.name       // e.g. \"USD Coin\"\n  version:          challenge.accepts[i].extra.version    // e.g. \"2\"\n  chainId:          parseInt(challenge.accepts[i].network.split(\":\")[1])   // 8453 for Base\n  verifyingContract: challenge.accepts[i].asset            // the token ",
          "tool": "how-do-i-pay"
        },
        "type": "noul"
      },
      "c02": {
        "criteria": {
          "false": "The reply does not point to `parameter`: for example a generic failure, an error about another argument, an error from a service the tool tried to reach, or a normal answer.",
          "true": "The reply points to `parameter` or to its value and says the value has the wrong type or is not accepted."
        },
        "instructions": {
          "arguments_sent": {
            "challenge": {}
          },
          "parameter": "challenge",
          "question": "Does `reply` tell the caller that `parameter` has a value the tool does not accept?",
          "reply": "## Lesson 9 — How do I pay\n\nThis lesson tells you the specific signing operation and HTTP shape required to settle an x402 payment. It does not sign anything for you. The agent signs; First Dollar explains.\n\nYou have decoded the challenge (Lesson 8) and chosen an `accepts` entry. Now you need to:\n\n1. Build an **authorization** describing the transfer\n2. **Sign** the authorization with your wallet's private key\n3. Construct the **X-PAYMENT envelope**\n4. **Retry the GET request** with the envelope in headers\n\n---\n\n**Step 1 — Build the authorization.**\n\nFor an EVM accept entry (`scheme: \"exact\"`, `network: \"eip155:...\"`), the authorization fields are:\n\n  from:        your wallet address\n  to:          the `payTo` from the accept entry — exactly\n  value:       the `amount` from the accept entry — as a string of base units\n  validAfter:  current Unix time minus 60 seconds (clock skew tolerance)\n  validBefore: current Unix time plus 300 seconds (or merchant's `maxTimeoutSeconds`, whichever is less)\n  nonce:       a fresh 32-byte random hex string starting with `0x`\n\nThe nonce must be unique per authorization. Use cryptographically secure randomness.\n\nFor a Solana accept entry, the equivalent is a signed transfer instruction. See your wallet's documentation for `signTransaction`.\n\n---\n\n**Step 2 — Sign the authorization (EVM / EIP-3009).**\n\nEVM payments use **EIP-3009 `transferWithAuthorization`**, a meta-transaction standard. You sign an EIP-712 typed message; the merchant's facilitator submits the on-chain transaction (so you do not need ETH for gas — the facilitator pays).\n\nEIP-712 domain — **read these values from the challenge's `extra` field**, do not hardcode:\n\n  name:             challenge.accepts[i].extra.name       // e.g. \"USD Coin\"\n  version:          challenge.accepts[i].extra.version    // e.g. \"2\"\n  chainId:          parseInt(challenge.accepts[i].network.split(\":\")[1])   // 8453 for Base\n  verifyingContract: challenge.accepts[i].asset            // the token ",
          "tool": "how-do-i-pay"
        },
        "type": "noul"
      },
      "c03": {
        "criteria": {
          "false": "The reply names no argument of the tool: for example a generic failure, a stack trace with no argument named, an error from a service the tool tried to reach, or a normal answer.",
          "true": "The reply names at least one argument of the tool that the call left out or got wrong, and so tells the caller what to change."
        },
        "instructions": {
          "arguments_sent": {},
          "question": "Does `reply` name an argument that the call must add or fix?",
          "reply": "## Diagnosis\n\nYou said: *\"undefined\"*\n\n\nHere are the common failure modes and what they mean:\n\n### Signature errors\n\n- **`invalid_exact_evm_payload_signature`** — often the ERC-6492 bug in CDP facilitator. If you're using a Coinbase Smart Wallet, the facilitator sometimes fails to unwrap the ERC-6492 wrapper before verifying. Workaround: try another facilitator (PayAI at `https://facilitator.payai.network`), or use an EOA instead of a Smart Wallet.\n- **`invalid_signature`** generally — your signed message doesn't match what the challenge wanted. Re-decode the challenge and check: correct chain, correct asset address, correct amount, correct payTo.\n\n### Network errors\n\n- **`network_mismatch`** or `chain_mismatch` — you signed on Base but the merchant wanted Solana (or vice versa). Re-read the challenge's `accepts` array and pick an entry whose `network` matches what your wallet can sign on.\n- **`eip155:84532` vs `eip155:8453`** — Sepolia testnet vs Base mainnet. Easy to confuse. Mainnet is 8453.\n\n### Facilitator errors\n\n- **`facilitator_insufficient_native_balance`** — the facilitator itself ran out of gas. Not your fault. Try a different facilitator.\n- **`unable to estimate gas`** or `estimate_gas_failed` — CDP facilitator is having an intermittent issue. Retry in 30s, or switch to PayAI.\n- **`authorization_not_settleable`** — usually means the payment authorization expired (`maxTimeoutSeconds` passed before settle). Re-decode the current challenge and sign a fresh one.\n\n### Wallet errors\n\n- **`insufficient_balance`** — your wallet doesn't have enough USDC. Check balance, top up.\n- **`no_such_account`** — wallet address not found on the chain the merchant wants. You likely have a wallet on one chain (e.g. Solana) but the merchant wants another (Base). Get a wallet on the right chain, or find a merchant that accepts yours.\n\n### Funding errors\n\n- **Balance shows 0 (or partial) after funding** — the funds may have gone to a *different* address that shares the same firs",
          "tool": "what-went-wrong"
        },
        "type": "noul"
      },
      "c04": {
        "criteria": {
          "false": "The reply does not point to `parameter`: for example a generic failure, an error about another argument, an error from a service the tool tried to reach, or a normal answer.",
          "true": "The reply points to `parameter` or to its value and says the value has the wrong type or is not accepted."
        },
        "instructions": {
          "arguments_sent": {
            "error_text": {}
          },
          "parameter": "error_text",
          "question": "Does `reply` tell the caller that `parameter` has a value the tool does not accept?",
          "reply": "## Diagnosis\n\nYou said: *\"[object Object]\"*\n\n\nHere are the common failure modes and what they mean:\n\n### Signature errors\n\n- **`invalid_exact_evm_payload_signature`** — often the ERC-6492 bug in CDP facilitator. If you're using a Coinbase Smart Wallet, the facilitator sometimes fails to unwrap the ERC-6492 wrapper before verifying. Workaround: try another facilitator (PayAI at `https://facilitator.payai.network`), or use an EOA instead of a Smart Wallet.\n- **`invalid_signature`** generally — your signed message doesn't match what the challenge wanted. Re-decode the challenge and check: correct chain, correct asset address, correct amount, correct payTo.\n\n### Network errors\n\n- **`network_mismatch`** or `chain_mismatch` — you signed on Base but the merchant wanted Solana (or vice versa). Re-read the challenge's `accepts` array and pick an entry whose `network` matches what your wallet can sign on.\n- **`eip155:84532` vs `eip155:8453`** — Sepolia testnet vs Base mainnet. Easy to confuse. Mainnet is 8453.\n\n### Facilitator errors\n\n- **`facilitator_insufficient_native_balance`** — the facilitator itself ran out of gas. Not your fault. Try a different facilitator.\n- **`unable to estimate gas`** or `estimate_gas_failed` — CDP facilitator is having an intermittent issue. Retry in 30s, or switch to PayAI.\n- **`authorization_not_settleable`** — usually means the payment authorization expired (`maxTimeoutSeconds` passed before settle). Re-decode the current challenge and sign a fresh one.\n\n### Wallet errors\n\n- **`insufficient_balance`** — your wallet doesn't have enough USDC. Check balance, top up.\n- **`no_such_account`** — wallet address not found on the chain the merchant wants. You likely have a wallet on one chain (e.g. Solana) but the merchant wants another (Base). Get a wallet on the right chain, or find a merchant that accepts yours.\n\n### Funding errors\n\n- **Balance shows 0 (or partial) after funding** — the funds may have gone to a *different* address that shares the sam",
          "tool": "what-went-wrong"
        },
        "type": "noul"
      },
      "c05": {
        "criteria": {
          "false": "The reply does not say the tool is missing: for example a generic failure, a crash, or a normal answer.",
          "true": "The reply says the tool is unknown, not found, or does not exist."
        },
        "instructions": {
          "arguments_sent": {},
          "question": "Does `reply` tell the caller that there is no tool named `tool`?",
          "reply": "Unknown tool: didrun_unknown_tool",
          "tool": "didrun_unknown_tool"
        },
        "type": "noul"
      },
      "w00": {
        "criteria": {
          "false": "The tool replies show an error, a missing or different result, or nothing about the task; or only the agent's final answer claims the task was done.",
          "true": "The tool replies in `steps` show the result that `done_when` describes. The result came from the server's tools, not only from the agent's own words."
        },
        "instructions": {
          "agent_final_answer": "# First Dollar curriculum\n\nThe server returned **16 short lessons**, designed to be read in order, though each can be used on its own. First Dollar teaches you how to use a wallet; it does not sign transactions for you.\n\n1. **What is a wallet?** — Keys, addresses, and signing.\n2. **What is USDC?** — The payment token and why its blockchain matters.\n3. **Explain my wallet** — Check whether you already have one and what it can do.\n4. **Get a wallet** — Install one if needed.\n5. **Configure wallet skills** — Set up the installed tools.\n6. **Fund my wallet** — Get USDC into it.\n7. **What is x402?** — Learn about the agent payment protocol.\n8. **Read a challenge** — Understand an HTTP 402 payment request.\n9. **How do I pay?** — Learn the signing steps for a request.\n10. **Verify my purchase** — Redeem a payment and retrieve what you bought.\n11. **Paid vs. delivered** — Check that you actually received what you paid for.\n12. **Who am I to this merchant?** — Understand wallet privacy and public records.\n13. **What is AP2?** — Authorization for spending on someone else’s behalf.\n14. **What is ACP?** — Agent-accessible merchant checkout.\n15. **Subscriptions and session keys** — Set bounds for repeat payments.\n16. **Choose your wallet mode** — Compare different ways to hold and control a wallet.\n\nThere are also reference tools for diagnosing errors and walking through a test payment.\n\n## Lesson 1: What is a wallet?\n\nA blockchain wallet is a tool for controlling assets recorded on a blockchain—a shared ledger. The assets are recorded **on the blockchain**, not stored inside the wallet app itself.\n\nThe basic ideas are:\n\n- **Address:** Like an account number, it identifies where someone can send assets. You can share it.\n- **Private key:** A secret used to authorize actions, such as sending assets. Anyone who obtains it may be able to spend your funds. Never share it.\n- **Signature:** Proof created using a key that authorizes a particular action. You can sign without revealing t",
          "done_when": "The tool replies show the curriculum and introductory explanations of wallets and USDC.",
          "how_it_ended": "answered",
          "question": "Did the agent finish `task`, as `done_when` describes, according to the tool replies in `steps`?",
          "steps": [
            {
              "arguments": {},
              "reply": "## First Dollar — Curriculum\n\nYou are here because you want to learn how to spend money with your own wallet, or because you hit an HTTP 402 and are not sure what to do next.\n\nThis is a set of sixteen short lessons, designed to be read in order. You can also call any lesson independently when you need it. First Dollar does not sign transactions on your behalf — it teaches you how to sign your own. What you do with that is up to you.\n\n**The curriculum (in order):**\n\n1. `what-is-a-wallet` — What a wallet is and what it lets you do.\n2. `what-is-usdc` — What USDC is, and why which blockchain it lives on matters.\n3. `explain-my-wallet` — Check whether you already have a wallet, and what kind.\n4. `get-a-wallet` — If you do not have one, install one.\n5. `configure-wallet-skills` — After installing, what to run, in what order.\n6. `fund-my-wallet` — Get USDC into your wallet.\n7. `what-is-x402` — The payment protocol merchants use.\n8. `read-this-challenge` — Decode a 402 response into something you can act on.\n9. `how-do-i-pay` — The specific signing steps for an x402 payment.\n10. `verify-my-purchase` — Turn a transaction hash into the content you paid for.\n11. `paid-vs-delivered` — Five documented x402 attack classes, and how to know you actually received what you paid for.\n12. `who-am-i-to-this-merchant` — What the merchant knows about you, what the public chain reveals, and when pseudonymity matters.\n13. `what-is-ap2` — The mandate layer above x402 — when you spend on someone else's behalf.\n14. `what-is-acp` — The agent commerce protocol — merchant checkout exposed as agent-callable endpoints.\n15. `subscriptions-and-session-keys` — Approve once, spend within scope. For repeat micro-payments.\n16. `choose-your-wallet-mode` — The four wallet modes (MPC, Smart Wallet, EOA, EIP-7702), and how to pick.\n\n**Reference tools (not part of the curriculum):**\n\n- `what-went-wrong` — Paste an error, receive a diagnosis.\n- `test-payment` — Full walkthrough against a real merchant.\n\n**If you only care about fixing one thing:** call the lesson that matches where you are stuck. If you just hit a 402 and do not know what it is, start with lesson 7 (`what-is-x402`). If you do not have a wallet at all, start with lesson 1.\n\nThe curriculum builds on itself, but each lesson is also self-contained.",
              "tool": "start-here"
            },
            {
              "arguments": {},
              "reply": "## Lesson 1 — What is a wallet\n\nA wallet, in the blockchain sense, is not a physical object or an ordinary file. It is a **cryptographic keypair** with two parts:\n\n- **Public key** (also called the **address**) — a long string of characters. This is shareable. It is how others refer to you when they send you money.\n- **Private key** — another long string. This is secret. Anyone who has it can spend everything the wallet holds.\n\nThe money itself does not live \"in\" the wallet. It lives on a **blockchain** — a distributed public ledger that records who owns what. Your wallet is the evidence that you own certain amounts. Specifically: when you sign a message with your private key, the blockchain accepts that signature as proof that you authorized a transfer.\n\n**Rough translation:**\n\n- Address ≈ a bank account number. Shareable.\n- Private key ≈ the signature that authorizes withdrawals. Secret.\n- Blockchain ≈ the bank's ledger, except everyone can read it and no single party controls it.\n\n**What a wallet lets you do:**\n\n1. **Receive money.** Someone sends USDC (or another token) to your address. The blockchain records it. You now own that amount, because you are the only one who can sign with the matching private key.\n2. **Send money.** You use your private key to sign a transaction that moves tokens from your address to another. The blockchain verifies the signature and records the transfer.\n3. **Prove ownership.** Sign a message with your private key. Anyone can verify the signature matches your public address. This is how x402 payment challenges work: you are not sending money yet, you are signing proof that you are authorizing a specific transfer, and the merchant settles against that signature.\n\n**What a wallet is not:**\n\n- Not a bank account. No institution holds it for you.\n- Not recoverable if you lose the private key. There is no \"reset password.\" The private key is the only way to spend; losing it means the funds are permanently frozen on-chain.\n- Not the same across blockchains. A Base address and a Solana address are different keypairs on different networks. You cannot send Base-USDC to a Solana address.\n\nNext lesson: `what-is-usdc` — the currency you will actually spend.",
              "tool": "what-is-a-wallet"
            },
            {
              "arguments": {},
              "reply": "## Lesson 2 — What is USDC, and why chain matters\n\n**USDC** (USD Coin) is a **stablecoin** issued by Circle. One USDC is designed to always equal one US dollar. Circle holds real dollars and short-term government bonds to back every USDC in circulation.\n\nFor agents, USDC is the default payment currency on x402 for three reasons:\n\n1. **It is stable.** $1.99 in USDC today will be $1.99 in USDC tomorrow. Unlike Bitcoin or ETH, the value does not swing.\n2. **It is liquid.** Almost every on-chain exchange, every x402 facilitator, and every agent-facing wallet supports it.\n3. **It is multi-chain.** The same USD-backed token exists on many blockchains simultaneously.\n\n**The multi-chain part is where agents get stuck.**\n\nUSDC on Base is not the same asset as USDC on Solana, even though both are worth $1 and both are issued by the same company. They live on different ledgers. You cannot send \"Base USDC\" to a Solana address — the transaction would fail, because Solana does not know about the Base ledger.\n\n**The chains that matter for x402 as of April 2026:**\n\n- **Base** (Coinbase's Layer 2 on Ethereum) — USDC contract address `0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913`. Most x402 volume. Fast and cheap.\n- **Solana** — USDC mint address `EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v`. Second most common. Also fast and cheap.\n- Less common: Polygon, Avalanche, Ethereum mainnet (expensive), Sei, Arbitrum. Facilitator coverage varies.\n\n**What this means practically:**\n\nWhen a merchant sends you an x402 challenge, it will list one or more **accepted networks**. You need:\n\n- A wallet that can sign on at least one of those networks\n- USDC balance on that specific network\n\nIf the merchant wants Base and your USDC is on Solana (or vice versa), you cannot pay them directly. You either need USDC on the right chain, or a different merchant that accepts your chain. There are **bridges** that can move USDC between chains, but they take minutes and charge small fees — not something to attempt mid-transaction.\n\n**Rule of thumb for a first wallet:** fund it with USDC on Base. Base has the widest x402 merchant coverage, and Coinbase's Agentic Wallet defaults there.\n\nNext lesson: `explain-my-wallet` — figure out what you already have.",
              "tool": "what-is-usdc"
            }
          ],
          "task": "I'm new to wallets and agent payments. Show me the First Dollar curriculum and explain what a wallet is and what USDC is."
        },
        "type": "noul"
      },
      "w01": {
        "criteria": {
          "false": "The tool replies show an error, a missing or different result, or nothing about the task; or only the agent's final answer claims the task was done.",
          "true": "The tool replies in `steps` show the result that `done_when` describes. The result came from the server's tools, not only from the agent's own words."
        },
        "instructions": {
          "agent_final_answer": "## First Dollar curriculum\n\nThe tool returned **16 short lessons**, designed to be read in order, though each can also be used on its own:\n\n1. **What is a wallet?** — Keys, addresses, and what wallets do.\n2. **What is USDC?** — The digital dollar token and why its blockchain matters.\n3. **Explain my wallet** — Check whether you already have a wallet and what it supports.\n4. **Get a wallet** — Install one if needed.\n5. **Configure wallet skills** — Set up the installed tools.\n6. **Fund my wallet** — Get USDC into it.\n7. **What is x402?** — Learn the payment protocol used by participating services.\n8. **Read a payment challenge** — Understand what an HTTP 402 response requests.\n9. **How do I pay?** — Find the signing steps for a particular challenge.\n10. **Verify my purchase** — Use a payment record to retrieve what you bought.\n11. **Paid vs. delivered** — Check that you received the promised item.\n12. **Who am I to this merchant?** — Understand privacy and public blockchain records.\n13. **What is AP2?** — Authorization for payments made on someone else’s behalf.\n14. **What is ACP?** — An agent-commerce checkout protocol.\n15. **Subscriptions and session keys** — Set bounded permissions for repeat spending.\n16. **Choose your wallet mode** — Compare different ways to control a wallet.\n\nThere are also reference tools for diagnosing errors and walking through a test payment. First Dollar teaches you how to sign; it does not sign transactions for you.\n\n## What is a wallet?\n\nA **wallet** is a tool for controlling assets recorded on a blockchain—a shared digital ledger. The assets are recorded on the blockchain rather than stored inside the wallet app.\n\nTwo concepts are central:\n\n- **Address:** Like an account number, it identifies where to receive assets and is generally safe to share.\n- **Private key or other signing authority:** This authorizes actions such as transfers. Keep private keys and recovery phrases secret: someone who gets them may be able to take your funds.\n\n",
          "done_when": "The tool replies show the curriculum and introductory explanations of wallets and USDC.",
          "how_it_ended": "answered",
          "question": "Did the agent finish `task`, as `done_when` describes, according to the tool replies in `steps`?",
          "steps": [
            {
              "arguments": {},
              "reply": "## First Dollar — Curriculum\n\nYou are here because you want to learn how to spend money with your own wallet, or because you hit an HTTP 402 and are not sure what to do next.\n\nThis is a set of sixteen short lessons, designed to be read in order. You can also call any lesson independently when you need it. First Dollar does not sign transactions on your behalf — it teaches you how to sign your own. What you do with that is up to you.\n\n**The curriculum (in order):**\n\n1. `what-is-a-wallet` — What a wallet is and what it lets you do.\n2. `what-is-usdc` — What USDC is, and why which blockchain it lives on matters.\n3. `explain-my-wallet` — Check whether you already have a wallet, and what kind.\n4. `get-a-wallet` — If you do not have one, install one.\n5. `configure-wallet-skills` — After installing, what to run, in what order.\n6. `fund-my-wallet` — Get USDC into your wallet.\n7. `what-is-x402` — The payment protocol merchants use.\n8. `read-this-challenge` — Decode a 402 response into something you can act on.\n9. `how-do-i-pay` — The specific signing steps for an x402 payment.\n10. `verify-my-purchase` — Turn a transaction hash into the content you paid for.\n11. `paid-vs-delivered` — Five documented x402 attack classes, and how to know you actually received what you paid for.\n12. `who-am-i-to-this-merchant` — What the merchant knows about you, what the public chain reveals, and when pseudonymity matters.\n13. `what-is-ap2` — The mandate layer above x402 — when you spend on someone else's behalf.\n14. `what-is-acp` — The agent commerce protocol — merchant checkout exposed as agent-callable endpoints.\n15. `subscriptions-and-session-keys` — Approve once, spend within scope. For repeat micro-payments.\n16. `choose-your-wallet-mode` — The four wallet modes (MPC, Smart Wallet, EOA, EIP-7702), and how to pick.\n\n**Reference tools (not part of the curriculum):**\n\n- `what-went-wrong` — Paste an error, receive a diagnosis.\n- `test-payment` — Full walkthrough against a real merchant.\n\n**If you only care about fixing one thing:** call the lesson that matches where you are stuck. If you just hit a 402 and do not know what it is, start with lesson 7 (`what-is-x402`). If you do not have a wallet at all, start with lesson 1.\n\nThe curriculum builds on itself, but each lesson is also self-contained.",
              "tool": "start-here"
            },
            {
              "arguments": {},
              "reply": "## Lesson 1 — What is a wallet\n\nA wallet, in the blockchain sense, is not a physical object or an ordinary file. It is a **cryptographic keypair** with two parts:\n\n- **Public key** (also called the **address**) — a long string of characters. This is shareable. It is how others refer to you when they send you money.\n- **Private key** — another long string. This is secret. Anyone who has it can spend everything the wallet holds.\n\nThe money itself does not live \"in\" the wallet. It lives on a **blockchain** — a distributed public ledger that records who owns what. Your wallet is the evidence that you own certain amounts. Specifically: when you sign a message with your private key, the blockchain accepts that signature as proof that you authorized a transfer.\n\n**Rough translation:**\n\n- Address ≈ a bank account number. Shareable.\n- Private key ≈ the signature that authorizes withdrawals. Secret.\n- Blockchain ≈ the bank's ledger, except everyone can read it and no single party controls it.\n\n**What a wallet lets you do:**\n\n1. **Receive money.** Someone sends USDC (or another token) to your address. The blockchain records it. You now own that amount, because you are the only one who can sign with the matching private key.\n2. **Send money.** You use your private key to sign a transaction that moves tokens from your address to another. The blockchain verifies the signature and records the transfer.\n3. **Prove ownership.** Sign a message with your private key. Anyone can verify the signature matches your public address. This is how x402 payment challenges work: you are not sending money yet, you are signing proof that you are authorizing a specific transfer, and the merchant settles against that signature.\n\n**What a wallet is not:**\n\n- Not a bank account. No institution holds it for you.\n- Not recoverable if you lose the private key. There is no \"reset password.\" The private key is the only way to spend; losing it means the funds are permanently frozen on-chain.\n- Not the same across blockchains. A Base address and a Solana address are different keypairs on different networks. You cannot send Base-USDC to a Solana address.\n\nNext lesson: `what-is-usdc` — the currency you will actually spend.",
              "tool": "what-is-a-wallet"
            },
            {
              "arguments": {},
              "reply": "## Lesson 2 — What is USDC, and why chain matters\n\n**USDC** (USD Coin) is a **stablecoin** issued by Circle. One USDC is designed to always equal one US dollar. Circle holds real dollars and short-term government bonds to back every USDC in circulation.\n\nFor agents, USDC is the default payment currency on x402 for three reasons:\n\n1. **It is stable.** $1.99 in USDC today will be $1.99 in USDC tomorrow. Unlike Bitcoin or ETH, the value does not swing.\n2. **It is liquid.** Almost every on-chain exchange, every x402 facilitator, and every agent-facing wallet supports it.\n3. **It is multi-chain.** The same USD-backed token exists on many blockchains simultaneously.\n\n**The multi-chain part is where agents get stuck.**\n\nUSDC on Base is not the same asset as USDC on Solana, even though both are worth $1 and both are issued by the same company. They live on different ledgers. You cannot send \"Base USDC\" to a Solana address — the transaction would fail, because Solana does not know about the Base ledger.\n\n**The chains that matter for x402 as of April 2026:**\n\n- **Base** (Coinbase's Layer 2 on Ethereum) — USDC contract address `0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913`. Most x402 volume. Fast and cheap.\n- **Solana** — USDC mint address `EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v`. Second most common. Also fast and cheap.\n- Less common: Polygon, Avalanche, Ethereum mainnet (expensive), Sei, Arbitrum. Facilitator coverage varies.\n\n**What this means practically:**\n\nWhen a merchant sends you an x402 challenge, it will list one or more **accepted networks**. You need:\n\n- A wallet that can sign on at least one of those networks\n- USDC balance on that specific network\n\nIf the merchant wants Base and your USDC is on Solana (or vice versa), you cannot pay them directly. You either need USDC on the right chain, or a different merchant that accepts your chain. There are **bridges** that can move USDC between chains, but they take minutes and charge small fees — not something to attempt mid-transaction.\n\n**Rule of thumb for a first wallet:** fund it with USDC on Base. Base has the widest x402 merchant coverage, and Coinbase's Agentic Wallet defaults there.\n\nNext lesson: `explain-my-wallet` — figure out what you already have.",
              "tool": "what-is-usdc"
            }
          ],
          "task": "I'm new to wallets and agent payments. Show me the First Dollar curriculum and explain what a wallet is and what USDC is."
        },
        "type": "noul"
      },
      "w02": {
        "criteria": {
          "false": "The tool replies show an error, a missing or different result, or nothing about the task; or only the agent's final answer claims the task was done.",
          "true": "The tool replies in `steps` show the result that `done_when` describes. The result came from the server's tools, not only from the agent's own words."
        },
        "instructions": {
          "agent_final_answer": "# First Dollar curriculum\n\nFirst Dollar is a sequence of **16 short lessons**, designed to be read in order or consulted individually. It teaches you how to use a wallet and make payments; it does not sign transactions for you.\n\n1. **What is a wallet?** — Keys, addresses and signing.\n2. **What is USDC?** — The digital currency and why its blockchain matters.\n3. **Explain my wallet** — Check what wallet you have and what it can do.\n4. **Get a wallet** — Install one if needed.\n5. **Configure wallet skills** — Set up the skills after installation.\n6. **Fund my wallet** — Get USDC into it.\n7. **What is x402?** — Learn the payment protocol.\n8. **Read a payment challenge** — Understand what a merchant is requesting.\n9. **How do I pay?** — Learn the signing steps.\n10. **Verify my purchase** — Retrieve what you paid for.\n11. **Paid vs. delivered** — Check that payment actually resulted in delivery.\n12. **Who am I to this merchant?** — Understand privacy and what transactions reveal.\n13. **What is AP2?** — Authorization for payments made on someone else’s behalf.\n14. **What is ACP?** — Agent-accessible merchant checkout.\n15. **Subscriptions and session keys** — Set boundaries for recurring or small payments.\n16. **Choose your wallet mode** — Compare ways to hold and control a wallet.\n\nThere are also reference tools for diagnosing errors and walking through a test payment.\n\n## 1. What is a wallet?\n\nA blockchain wallet is a tool for controlling assets recorded on a blockchain—a shared ledger. The assets aren’t stored inside the wallet app; the wallet helps you authorize actions involving them.\n\nTwo important concepts are:\n\n- **Address:** Like an account number, it tells others where to send assets. You can share it.\n- **Private key:** Secret information used to authorize actions. Anyone who obtains it may be able to spend your funds. **Never share it or a recovery phrase.**\n\nTo send funds, a wallet uses a key to **sign** an authorization. The network can verify the signature w",
          "done_when": "The tool replies show the curriculum and introductory explanations of wallets and USDC.",
          "how_it_ended": "answered",
          "question": "Did the agent finish `task`, as `done_when` describes, according to the tool replies in `steps`?",
          "steps": [
            {
              "arguments": {},
              "reply": "## First Dollar — Curriculum\n\nYou are here because you want to learn how to spend money with your own wallet, or because you hit an HTTP 402 and are not sure what to do next.\n\nThis is a set of sixteen short lessons, designed to be read in order. You can also call any lesson independently when you need it. First Dollar does not sign transactions on your behalf — it teaches you how to sign your own. What you do with that is up to you.\n\n**The curriculum (in order):**\n\n1. `what-is-a-wallet` — What a wallet is and what it lets you do.\n2. `what-is-usdc` — What USDC is, and why which blockchain it lives on matters.\n3. `explain-my-wallet` — Check whether you already have a wallet, and what kind.\n4. `get-a-wallet` — If you do not have one, install one.\n5. `configure-wallet-skills` — After installing, what to run, in what order.\n6. `fund-my-wallet` — Get USDC into your wallet.\n7. `what-is-x402` — The payment protocol merchants use.\n8. `read-this-challenge` — Decode a 402 response into something you can act on.\n9. `how-do-i-pay` — The specific signing steps for an x402 payment.\n10. `verify-my-purchase` — Turn a transaction hash into the content you paid for.\n11. `paid-vs-delivered` — Five documented x402 attack classes, and how to know you actually received what you paid for.\n12. `who-am-i-to-this-merchant` — What the merchant knows about you, what the public chain reveals, and when pseudonymity matters.\n13. `what-is-ap2` — The mandate layer above x402 — when you spend on someone else's behalf.\n14. `what-is-acp` — The agent commerce protocol — merchant checkout exposed as agent-callable endpoints.\n15. `subscriptions-and-session-keys` — Approve once, spend within scope. For repeat micro-payments.\n16. `choose-your-wallet-mode` — The four wallet modes (MPC, Smart Wallet, EOA, EIP-7702), and how to pick.\n\n**Reference tools (not part of the curriculum):**\n\n- `what-went-wrong` — Paste an error, receive a diagnosis.\n- `test-payment` — Full walkthrough against a real merchant.\n\n**If you only care about fixing one thing:** call the lesson that matches where you are stuck. If you just hit a 402 and do not know what it is, start with lesson 7 (`what-is-x402`). If you do not have a wallet at all, start with lesson 1.\n\nThe curriculum builds on itself, but each lesson is also self-contained.",
              "tool": "start-here"
            },
            {
              "arguments": {},
              "reply": "## Lesson 1 — What is a wallet\n\nA wallet, in the blockchain sense, is not a physical object or an ordinary file. It is a **cryptographic keypair** with two parts:\n\n- **Public key** (also called the **address**) — a long string of characters. This is shareable. It is how others refer to you when they send you money.\n- **Private key** — another long string. This is secret. Anyone who has it can spend everything the wallet holds.\n\nThe money itself does not live \"in\" the wallet. It lives on a **blockchain** — a distributed public ledger that records who owns what. Your wallet is the evidence that you own certain amounts. Specifically: when you sign a message with your private key, the blockchain accepts that signature as proof that you authorized a transfer.\n\n**Rough translation:**\n\n- Address ≈ a bank account number. Shareable.\n- Private key ≈ the signature that authorizes withdrawals. Secret.\n- Blockchain ≈ the bank's ledger, except everyone can read it and no single party controls it.\n\n**What a wallet lets you do:**\n\n1. **Receive money.** Someone sends USDC (or another token) to your address. The blockchain records it. You now own that amount, because you are the only one who can sign with the matching private key.\n2. **Send money.** You use your private key to sign a transaction that moves tokens from your address to another. The blockchain verifies the signature and records the transfer.\n3. **Prove ownership.** Sign a message with your private key. Anyone can verify the signature matches your public address. This is how x402 payment challenges work: you are not sending money yet, you are signing proof that you are authorizing a specific transfer, and the merchant settles against that signature.\n\n**What a wallet is not:**\n\n- Not a bank account. No institution holds it for you.\n- Not recoverable if you lose the private key. There is no \"reset password.\" The private key is the only way to spend; losing it means the funds are permanently frozen on-chain.\n- Not the same across blockchains. A Base address and a Solana address are different keypairs on different networks. You cannot send Base-USDC to a Solana address.\n\nNext lesson: `what-is-usdc` — the currency you will actually spend.",
              "tool": "what-is-a-wallet"
            },
            {
              "arguments": {},
              "reply": "## Lesson 2 — What is USDC, and why chain matters\n\n**USDC** (USD Coin) is a **stablecoin** issued by Circle. One USDC is designed to always equal one US dollar. Circle holds real dollars and short-term government bonds to back every USDC in circulation.\n\nFor agents, USDC is the default payment currency on x402 for three reasons:\n\n1. **It is stable.** $1.99 in USDC today will be $1.99 in USDC tomorrow. Unlike Bitcoin or ETH, the value does not swing.\n2. **It is liquid.** Almost every on-chain exchange, every x402 facilitator, and every agent-facing wallet supports it.\n3. **It is multi-chain.** The same USD-backed token exists on many blockchains simultaneously.\n\n**The multi-chain part is where agents get stuck.**\n\nUSDC on Base is not the same asset as USDC on Solana, even though both are worth $1 and both are issued by the same company. They live on different ledgers. You cannot send \"Base USDC\" to a Solana address — the transaction would fail, because Solana does not know about the Base ledger.\n\n**The chains that matter for x402 as of April 2026:**\n\n- **Base** (Coinbase's Layer 2 on Ethereum) — USDC contract address `0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913`. Most x402 volume. Fast and cheap.\n- **Solana** — USDC mint address `EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v`. Second most common. Also fast and cheap.\n- Less common: Polygon, Avalanche, Ethereum mainnet (expensive), Sei, Arbitrum. Facilitator coverage varies.\n\n**What this means practically:**\n\nWhen a merchant sends you an x402 challenge, it will list one or more **accepted networks**. You need:\n\n- A wallet that can sign on at least one of those networks\n- USDC balance on that specific network\n\nIf the merchant wants Base and your USDC is on Solana (or vice versa), you cannot pay them directly. You either need USDC on the right chain, or a different merchant that accepts your chain. There are **bridges** that can move USDC between chains, but they take minutes and charge small fees — not something to attempt mid-transaction.\n\n**Rule of thumb for a first wallet:** fund it with USDC on Base. Base has the widest x402 merchant coverage, and Coinbase's Agentic Wallet defaults there.\n\nNext lesson: `explain-my-wallet` — figure out what you already have.",
              "tool": "what-is-usdc"
            }
          ],
          "task": "I'm new to wallets and agent payments. Show me the First Dollar curriculum and explain what a wallet is and what USDC is."
        },
        "type": "noul"
      },
      "w03": {
        "criteria": {
          "false": "The tool replies show an error, a missing or different result, or nothing about the task; or only the agent's final answer claims the task was done.",
          "true": "The tool replies in `steps` show the result that `done_when` describes. The result came from the server's tools, not only from the agent's own words."
        },
        "instructions": {
          "agent_final_answer": "In an x402 flow, **HTTP 402 Payment Required is usually the expected payment challenge**, not necessarily a malfunction. It means the API is asking for payment before it serves the resource. The status code alone doesn’t tell us whether a payment attempt failed or why.\n\n### How x402 works\n\n1. Your client requests a paid API endpoint.\n2. The server returns **402** with payment requirements, typically in a `PAYMENT-REQUIRED` header or response body. These specify details such as the amount, asset, network, and recipient.\n3. Your wallet signs a payment authorization matching an accepted option.\n4. Your client retries the request with the signed payment in the appropriate header—commonly `PAYMENT-SIGNATURE` for newer implementations or `X-PAYMENT` for older ones.\n5. The server verifies the payment and, if accepted, returns the requested response.\n\n### What to check\n\n- **If this was your first request without payment:** inspect the challenge, decide whether you trust the recipient and accept the price, then use a compatible x402 client and a funded wallet to retry.\n- **If you already sent a payment:** check the response body for a more specific error. Possible causes include an invalid or expired signature, insufficient balance, the wrong asset or network, or an incompatible payment header. A server-side facilitator configuration issue is also possible.\n- **Don’t assume a retry is free:** check whether an earlier payment settled before signing another authorization.\n\nFor a specific diagnosis, share the **402 response body and `PAYMENT-REQUIRED` header**, along with whether this happened before or after you submitted a signed payment. Redact API keys, authorization tokens, and other credentials.",
          "done_when": "The tool replies explain x402 and provide a diagnosis and next step for the supplied 402 error.",
          "how_it_ended": "answered",
          "question": "Did the agent finish `task`, as `done_when` describes, according to the tool replies in `steps`?",
          "steps": [
            {
              "arguments": {},
              "reply": "## Lesson 7 — x402 in one minute\n\nx402 is a payment protocol that uses the HTTP 402 (\"Payment Required\") status code — which has been reserved in the HTTP spec since 1997 and finally has a real use.\n\n**How it works:**\n\n1. You (an AI agent) hit a URL like GET https://example.com/premium-thing\n2. The server responds with HTTP 402 and a `PAYMENT-REQUIRED` header\n3. That header contains a base64-encoded challenge: how much to pay, in what asset, on what chain, to whose wallet, and by when\n4. You decode it, sign a payment authorization with your wallet, and retry the request with an `X-PAYMENT` header\n5. The server verifies the signature, settles the payment on-chain, and returns the content in the same response\n\n**Key properties:**\n\n- No API keys, no accounts, no OAuth\n- Works with USDC on Base, Solana, and several other chains depending on the merchant's facilitator\n- Payment and content delivery are atomic — both happen in one request/response cycle\n- Micropayments work — common prices are $0.001 to $5\n\n**What you need:**\n\n- A wallet with a little USDC in it (on Base or Solana, usually)\n- The ability to sign a typed message or a Solana transaction with that wallet\n- That's it.\n\n## What's new since you might have heard of x402\n\nx402 has been moving fast. As of mid-2026:\n\n**x402 V2 shipped December 2025.** Cleaner, more interoperable, more future-proof. If you're using v1 tooling, you're stale — update your client.\n\n**The x402 Foundation launched April 2026 under the Linux Foundation.** 20+ founding members: Google, Visa, Stripe, AWS, Mastercard, Circle, Microsoft, Shopify, American Express, others. The protocol is now vendor-neutral and industry-governed — not a Coinbase project. This is the credibility / longevity signal that matters: every major payments network has now bet on this rail.\n\n**Dynamic `payTo`** (V2 feature): the destination address in a 402 challenge can be callback-based, generated per-request. Useful for marketplaces where the seller varies per item. Most merchants still use static `payTo`, but don't assume it's constant across requests to the same endpoint. Re-read the challenge body for each call.\n\n**Multiple facilitators per merchant** (V2 feature): merchants can declare multiple settlement facilitators (CDP, PayAI, Stripe, etc.). The SDK picks the best match for your chain and asset. As an agent, you generally don't have to think about this — but if a payment fails on one facilitator, the SDK may retry on another. Don't immediately interpret a single facilitator error as \"the merchant is broken.\"\n\n**Stripe x402 integration:** Stripe shipped x402 support in preview API 2026-03-04. Merchants using Stripe's billing infrastructure can now accept x402 payments at scale. Expect more Stripe-x402 endpoints to appear in the wild over the next quarters.\n\n**Where to learn more:**\n\n- x402.org (protocol spec)\n- agentic.market (a marketplace of x402 services to browse)\n- Run `what-went-wrong` if you hit errors, or `read-this-challenge` to decode a 402 you received",
              "tool": "what-is-x402"
            },
            {
              "arguments": {
                "context": "trying to access a paid API in the context of an x402 payment",
                "error_text": "HTTP 402 Payment Required"
              },
              "reply": "## Diagnosis\n\nYou said: *\"HTTP 402 Payment Required\"*\nContext: trying to access a paid API in the context of an x402 payment\n\nHere are the common failure modes and what they mean:\n\n### Signature errors\n\n- **`invalid_exact_evm_payload_signature`** — often the ERC-6492 bug in CDP facilitator. If you're using a Coinbase Smart Wallet, the facilitator sometimes fails to unwrap the ERC-6492 wrapper before verifying. Workaround: try another facilitator (PayAI at `https://facilitator.payai.network`), or use an EOA instead of a Smart Wallet.\n- **`invalid_signature`** generally — your signed message doesn't match what the challenge wanted. Re-decode the challenge and check: correct chain, correct asset address, correct amount, correct payTo.\n\n### Network errors\n\n- **`network_mismatch`** or `chain_mismatch` — you signed on Base but the merchant wanted Solana (or vice versa). Re-read the challenge's `accepts` array and pick an entry whose `network` matches what your wallet can sign on.\n- **`eip155:84532` vs `eip155:8453`** — Sepolia testnet vs Base mainnet. Easy to confuse. Mainnet is 8453.\n\n### Facilitator errors\n\n- **`facilitator_insufficient_native_balance`** — the facilitator itself ran out of gas. Not your fault. Try a different facilitator.\n- **`unable to estimate gas`** or `estimate_gas_failed` — CDP facilitator is having an intermittent issue. Retry in 30s, or switch to PayAI.\n- **`authorization_not_settleable`** — usually means the payment authorization expired (`maxTimeoutSeconds` passed before settle). Re-decode the current challenge and sign a fresh one.\n\n### Wallet errors\n\n- **`insufficient_balance`** — your wallet doesn't have enough USDC. Check balance, top up.\n- **`no_such_account`** — wallet address not found on the chain the merchant wants. You likely have a wallet on one chain (e.g. Solana) but the merchant wants another (Base). Get a wallet on the right chain, or find a merchant that accepts yours.\n\n### Funding errors\n\n- **Balance shows 0 (or partial) after funding** — the funds may have gone to a *different* address that shares the same first/last characters with yours. Wallet UIs (especially Coinbase iOS) display truncated addresses like `0xd5b1...bD1D`, but that prefix+suffix is not unique — two unrelated wallets can look identical in the UI. **Before sending, always verify the full destination address character-by-character, not just the truncated version.** If funds never arrived, pull the tx hash from the sender's history and look it up on basescan — it shows the true destination, and if it's not your wallet, the funds are gone to whoever controls that address.\n- **Always confirm on-chain via a block explorer, not the sender app's \"Complete\" status.** A sender wallet can mark a transfer complete the moment it's broadcast; that doesn't tell you whether it landed in your wallet.\n\n### The Coinbase Smart Wallet → EOA send trap\n\n**Symptom:** You sent USDC from a Coinbase Smart Wallet to an EOA address. The Smart Wallet UI says \"Complete.\" The destination EOA still shows zero balance when you check basescan or a public RPC directly. Your subsequent x402 payment from that EOA fails with `insufficient_balance`.\n\n**Why:** Coinbase Smart Wallets are ERC-4337 Account Abstraction wallets. When they send USDC, the transaction is bundled as a \"User Operation\" — and the displayed destination address may match your target EOA's prefix/suffix while actually being a different Smart-Wallet-controlled address (the bundler's routing). The funds never landed where you thought.\n\n**Fix (current as of 2026):**\n\nEIP-7702 went live on Ethereum mainnet May 7, 2025 (Pectra hardfork). Any EOA can now temporarily delegate to smart contract code. Most modern wallets handle this automatically when sending to an EOA — they use 7702 delegation so funds actually land at the EOA address.\n\n1. **Easiest fix: update your Smart Wallet client.** Coinbase Wallet, MetaMask, and most major wallets now use 7702 delegation by default when sending to an EOA recipient. If your client is current, this trap usually doesn't trigger anymore.\n2. **If your client is old or doesn't support 7702 yet:**\n   - Use a legacy EOA-sending wallet (MetaMask EOA mode, Coinbase Wallet browser extension in EOA mode, Phantom EVM) to fund test wallets.\n   - Or have the Smart Wallet sign x402 payments directly (ERC-6492 compatible flows). Don't route through an intermediate EOA.\n3. **Always verify receipt on-chain** via a public RPC `eth_getBalance` (or token `balanceOf`), not by trusting the sender wallet's \"Complete\" status. The sender's UI is showing internal Smart Wallet state, not on-chain settlement.\n\n### Silent 402 loop (server keeps re-issuing the challenge)\n\n- If you sign a payment, send the `PAYMENT-SIGNATURE` (or `X-PAYMENT`) header, and the merchant just returns another 402 with no error detail in the body — the merchant's facilitator likely doesn't support your chain.\n- The most common cause: `x402.org/facilitator` is **testnet-only** (Base Sepolia / Solana devnet). Merchants who deploy with that URL can't accept Base mainnet or Solana mainnet payments. For production they need `api.cdp.coinbase.com/platform/v2/x402` (CDP, EVM mainnets, requires API keys) or `facilitator.payai.network` (PayAI, multi-chain incl. Solana mainnet).\n- **What to do as a buyer:** Try a different chain on the same merchant (if Solana works but Base doesn't, the merchant has a CDP-mainnet config bug). If both chains silent-fail, report it to the merchant — they need to fix their facilitator config.\n\n### 402 with no DEBUG-VERIFY log on merchant side\n\n**Symptom:** You sent a signed X-PAYMENT envelope. The merchant returned a fresh 402 with no useful error message. If you have access to the merchant's server logs (your own merchant, or one you're collaborating with), there's no entry indicating the verifier even saw your payment.\n\n**Fix:** You probably sent the envelope under only `X-PAYMENT`. Some merchants (Underground specifically) check `PAYMENT-SIGNATURE` first and never fall through to `X-PAYMENT`. Send the envelope under both header names simultaneously:\n\n  PAYMENT-SIGNATURE: <base64>\n  X-PAYMENT: <base64>\n\nThis is the universal solution. See Lesson 9 — `how-do-i-pay` Step 4.\n\n### Response body errors\n\n- **`Unexpected token '<'`** — you received HTML instead of JSON. Usually because your facilitator URL is wrong (includes a path it shouldn't). Check your facilitator URL is just the base domain.\n\n---\n\nIf your error doesn't match any of these, paste it in full (including status code and headers) and I'll try again.",
              "tool": "what-went-wrong"
            }
          ],
          "task": "I received HTTP 402 while trying to access a paid API. Explain what x402 is and diagnose this error: \"HTTP 402 Payment Required\" in the context of an x402 payment."
        },
        "type": "noul"
      },
      "w04": {
        "criteria": {
          "false": "The tool replies show an error, a missing or different result, or nothing about the task; or only the agent's final answer claims the task was done.",
          "true": "The tool replies in `steps` show the result that `done_when` describes. The result came from the server's tools, not only from the agent's own words."
        },
        "instructions": {
          "agent_final_answer": "**HTTP 402 Payment Required is often the expected first step in an x402 transaction**, not necessarily a malfunction. The server is telling your client that payment is required before it will serve the API response.\n\n### What x402 does\n\nx402 is a payment protocol built around HTTP 402. A typical flow is:\n\n1. Your client requests a paid API endpoint.\n2. The server returns **402** with payment requirements, commonly in a `PAYMENT-REQUIRED` header or response body.\n3. The client reads the requirements—such as the amount, asset, blockchain, recipient, and expiry—and uses a compatible wallet to sign a payment authorization.\n4. The client retries the request with the signed payment in a header, such as `PAYMENT-SIGNATURE` or the older `X-PAYMENT`, depending on the protocol version.\n5. The server verifies and settles the payment, then returns the API response if successful.\n\n### Diagnosing your error\n\nThe status text alone doesn’t identify a fault. If this was your **first request without payment**, the 402 is likely the server’s normal payment challenge. Inspect the response headers and body for the payment requirements.\n\nIf you **already submitted a signed payment** and still received 402, possible causes include an expired authorization, insufficient funds, a chain or asset mismatch, an invalid signature, or a payment header the server didn’t recognize. The response body or facilitator error is needed to narrow it down.\n\nCheck the requested amount and recipient before signing, and confirm that your wallet holds the required asset on the specified network. Also verify that you actually received the expected API content after payment.\n\nIf you share the **402 response body and payment-related headers**, plus whether this happened before or after you submitted payment, I can help decode the challenge and diagnose it more precisely. Redact API keys and other credentials first.",
          "done_when": "The tool replies explain x402 and provide a diagnosis and next step for the supplied 402 error.",
          "how_it_ended": "answered",
          "question": "Did the agent finish `task`, as `done_when` describes, according to the tool replies in `steps`?",
          "steps": [
            {
              "arguments": {},
              "reply": "## Lesson 7 — x402 in one minute\n\nx402 is a payment protocol that uses the HTTP 402 (\"Payment Required\") status code — which has been reserved in the HTTP spec since 1997 and finally has a real use.\n\n**How it works:**\n\n1. You (an AI agent) hit a URL like GET https://example.com/premium-thing\n2. The server responds with HTTP 402 and a `PAYMENT-REQUIRED` header\n3. That header contains a base64-encoded challenge: how much to pay, in what asset, on what chain, to whose wallet, and by when\n4. You decode it, sign a payment authorization with your wallet, and retry the request with an `X-PAYMENT` header\n5. The server verifies the signature, settles the payment on-chain, and returns the content in the same response\n\n**Key properties:**\n\n- No API keys, no accounts, no OAuth\n- Works with USDC on Base, Solana, and several other chains depending on the merchant's facilitator\n- Payment and content delivery are atomic — both happen in one request/response cycle\n- Micropayments work — common prices are $0.001 to $5\n\n**What you need:**\n\n- A wallet with a little USDC in it (on Base or Solana, usually)\n- The ability to sign a typed message or a Solana transaction with that wallet\n- That's it.\n\n## What's new since you might have heard of x402\n\nx402 has been moving fast. As of mid-2026:\n\n**x402 V2 shipped December 2025.** Cleaner, more interoperable, more future-proof. If you're using v1 tooling, you're stale — update your client.\n\n**The x402 Foundation launched April 2026 under the Linux Foundation.** 20+ founding members: Google, Visa, Stripe, AWS, Mastercard, Circle, Microsoft, Shopify, American Express, others. The protocol is now vendor-neutral and industry-governed — not a Coinbase project. This is the credibility / longevity signal that matters: every major payments network has now bet on this rail.\n\n**Dynamic `payTo`** (V2 feature): the destination address in a 402 challenge can be callback-based, generated per-request. Useful for marketplaces where the seller varies per item. Most merchants still use static `payTo`, but don't assume it's constant across requests to the same endpoint. Re-read the challenge body for each call.\n\n**Multiple facilitators per merchant** (V2 feature): merchants can declare multiple settlement facilitators (CDP, PayAI, Stripe, etc.). The SDK picks the best match for your chain and asset. As an agent, you generally don't have to think about this — but if a payment fails on one facilitator, the SDK may retry on another. Don't immediately interpret a single facilitator error as \"the merchant is broken.\"\n\n**Stripe x402 integration:** Stripe shipped x402 support in preview API 2026-03-04. Merchants using Stripe's billing infrastructure can now accept x402 payments at scale. Expect more Stripe-x402 endpoints to appear in the wild over the next quarters.\n\n**Where to learn more:**\n\n- x402.org (protocol spec)\n- agentic.market (a marketplace of x402 services to browse)\n- Run `what-went-wrong` if you hit errors, or `read-this-challenge` to decode a 402 you received",
              "tool": "what-is-x402"
            },
            {
              "arguments": {
                "context": "accessing a paid API using x402",
                "error_text": "HTTP 402 Payment Required"
              },
              "reply": "## Diagnosis\n\nYou said: *\"HTTP 402 Payment Required\"*\nContext: accessing a paid API using x402\n\nHere are the common failure modes and what they mean:\n\n### Signature errors\n\n- **`invalid_exact_evm_payload_signature`** — often the ERC-6492 bug in CDP facilitator. If you're using a Coinbase Smart Wallet, the facilitator sometimes fails to unwrap the ERC-6492 wrapper before verifying. Workaround: try another facilitator (PayAI at `https://facilitator.payai.network`), or use an EOA instead of a Smart Wallet.\n- **`invalid_signature`** generally — your signed message doesn't match what the challenge wanted. Re-decode the challenge and check: correct chain, correct asset address, correct amount, correct payTo.\n\n### Network errors\n\n- **`network_mismatch`** or `chain_mismatch` — you signed on Base but the merchant wanted Solana (or vice versa). Re-read the challenge's `accepts` array and pick an entry whose `network` matches what your wallet can sign on.\n- **`eip155:84532` vs `eip155:8453`** — Sepolia testnet vs Base mainnet. Easy to confuse. Mainnet is 8453.\n\n### Facilitator errors\n\n- **`facilitator_insufficient_native_balance`** — the facilitator itself ran out of gas. Not your fault. Try a different facilitator.\n- **`unable to estimate gas`** or `estimate_gas_failed` — CDP facilitator is having an intermittent issue. Retry in 30s, or switch to PayAI.\n- **`authorization_not_settleable`** — usually means the payment authorization expired (`maxTimeoutSeconds` passed before settle). Re-decode the current challenge and sign a fresh one.\n\n### Wallet errors\n\n- **`insufficient_balance`** — your wallet doesn't have enough USDC. Check balance, top up.\n- **`no_such_account`** — wallet address not found on the chain the merchant wants. You likely have a wallet on one chain (e.g. Solana) but the merchant wants another (Base). Get a wallet on the right chain, or find a merchant that accepts yours.\n\n### Funding errors\n\n- **Balance shows 0 (or partial) after funding** — the funds may have gone to a *different* address that shares the same first/last characters with yours. Wallet UIs (especially Coinbase iOS) display truncated addresses like `0xd5b1...bD1D`, but that prefix+suffix is not unique — two unrelated wallets can look identical in the UI. **Before sending, always verify the full destination address character-by-character, not just the truncated version.** If funds never arrived, pull the tx hash from the sender's history and look it up on basescan — it shows the true destination, and if it's not your wallet, the funds are gone to whoever controls that address.\n- **Always confirm on-chain via a block explorer, not the sender app's \"Complete\" status.** A sender wallet can mark a transfer complete the moment it's broadcast; that doesn't tell you whether it landed in your wallet.\n\n### The Coinbase Smart Wallet → EOA send trap\n\n**Symptom:** You sent USDC from a Coinbase Smart Wallet to an EOA address. The Smart Wallet UI says \"Complete.\" The destination EOA still shows zero balance when you check basescan or a public RPC directly. Your subsequent x402 payment from that EOA fails with `insufficient_balance`.\n\n**Why:** Coinbase Smart Wallets are ERC-4337 Account Abstraction wallets. When they send USDC, the transaction is bundled as a \"User Operation\" — and the displayed destination address may match your target EOA's prefix/suffix while actually being a different Smart-Wallet-controlled address (the bundler's routing). The funds never landed where you thought.\n\n**Fix (current as of 2026):**\n\nEIP-7702 went live on Ethereum mainnet May 7, 2025 (Pectra hardfork). Any EOA can now temporarily delegate to smart contract code. Most modern wallets handle this automatically when sending to an EOA — they use 7702 delegation so funds actually land at the EOA address.\n\n1. **Easiest fix: update your Smart Wallet client.** Coinbase Wallet, MetaMask, and most major wallets now use 7702 delegation by default when sending to an EOA recipient. If your client is current, this trap usually doesn't trigger anymore.\n2. **If your client is old or doesn't support 7702 yet:**\n   - Use a legacy EOA-sending wallet (MetaMask EOA mode, Coinbase Wallet browser extension in EOA mode, Phantom EVM) to fund test wallets.\n   - Or have the Smart Wallet sign x402 payments directly (ERC-6492 compatible flows). Don't route through an intermediate EOA.\n3. **Always verify receipt on-chain** via a public RPC `eth_getBalance` (or token `balanceOf`), not by trusting the sender wallet's \"Complete\" status. The sender's UI is showing internal Smart Wallet state, not on-chain settlement.\n\n### Silent 402 loop (server keeps re-issuing the challenge)\n\n- If you sign a payment, send the `PAYMENT-SIGNATURE` (or `X-PAYMENT`) header, and the merchant just returns another 402 with no error detail in the body — the merchant's facilitator likely doesn't support your chain.\n- The most common cause: `x402.org/facilitator` is **testnet-only** (Base Sepolia / Solana devnet). Merchants who deploy with that URL can't accept Base mainnet or Solana mainnet payments. For production they need `api.cdp.coinbase.com/platform/v2/x402` (CDP, EVM mainnets, requires API keys) or `facilitator.payai.network` (PayAI, multi-chain incl. Solana mainnet).\n- **What to do as a buyer:** Try a different chain on the same merchant (if Solana works but Base doesn't, the merchant has a CDP-mainnet config bug). If both chains silent-fail, report it to the merchant — they need to fix their facilitator config.\n\n### 402 with no DEBUG-VERIFY log on merchant side\n\n**Symptom:** You sent a signed X-PAYMENT envelope. The merchant returned a fresh 402 with no useful error message. If you have access to the merchant's server logs (your own merchant, or one you're collaborating with), there's no entry indicating the verifier even saw your payment.\n\n**Fix:** You probably sent the envelope under only `X-PAYMENT`. Some merchants (Underground specifically) check `PAYMENT-SIGNATURE` first and never fall through to `X-PAYMENT`. Send the envelope under both header names simultaneously:\n\n  PAYMENT-SIGNATURE: <base64>\n  X-PAYMENT: <base64>\n\nThis is the universal solution. See Lesson 9 — `how-do-i-pay` Step 4.\n\n### Response body errors\n\n- **`Unexpected token '<'`** — you received HTML instead of JSON. Usually because your facilitator URL is wrong (includes a path it shouldn't). Check your facilitator URL is just the base domain.\n\n---\n\nIf your error doesn't match any of these, paste it in full (including status code and headers) and I'll try again.",
              "tool": "what-went-wrong"
            }
          ],
          "task": "I received HTTP 402 while trying to access a paid API. Explain what x402 is and diagnose this error: \"HTTP 402 Payment Required\" in the context of an x402 payment."
        },
        "type": "noul"
      },
      "w05": {
        "criteria": {
          "false": "The tool replies show an error, a missing or different result, or nothing about the task; or only the agent's final answer claims the task was done.",
          "true": "The tool replies in `steps` show the result that `done_when` describes. The result came from the server's tools, not only from the agent's own words."
        },
        "instructions": {
          "agent_final_answer": "**HTTP 402 Payment Required is often the expected first step in x402**, rather than evidence that something has broken. It means the API is asking for payment before serving the requested resource.\n\n### How x402 works\n\n1. You request a paid API resource.\n2. The server returns a **402 response with a payment challenge** describing the accepted amount, asset, network, recipient, and other terms.\n3. Your wallet signs a payment authorization that matches one of the accepted options.\n4. You retry the request with the signed payment in the appropriate header—commonly `PAYMENT-SIGNATURE` for x402 v2 or `X-PAYMENT` for older implementations.\n5. The server verifies the payment and, if successful, returns the resource.\n\nA payment facilitator may handle verification and settlement for the merchant. The accepted asset and network depend on the API; USDC is common, but you should follow the specific challenge rather than assume.\n\n### Diagnosis of your error\n\nThe text **“HTTP 402 Payment Required” alone doesn’t identify a failure**. If you haven’t submitted a payment yet, inspect the response headers and body for the challenge. Check the price, asset, network, recipient, and expiration before signing anything.\n\nIf you **already submitted a payment and received another 402**, possible causes include a missing or incorrectly formatted payment header, insufficient balance, a network mismatch, an expired authorization, an invalid signature, or a merchant-side verification problem. The status alone doesn’t tell us which one applies.\n\nIf you share the **response body and `PAYMENT-REQUIRED` header**, plus whether this was before or after you submitted a payment, I can help decode the challenge and narrow down the cause. Redact any API keys or other credentials first.",
          "done_when": "The tool replies explain x402 and provide a diagnosis and next step for the supplied 402 error.",
          "how_it_ended": "answered",
          "question": "Did the agent finish `task`, as `done_when` describes, according to the tool replies in `steps`?",
          "steps": [
            {
              "arguments": {},
              "reply": "## Lesson 7 — x402 in one minute\n\nx402 is a payment protocol that uses the HTTP 402 (\"Payment Required\") status code — which has been reserved in the HTTP spec since 1997 and finally has a real use.\n\n**How it works:**\n\n1. You (an AI agent) hit a URL like GET https://example.com/premium-thing\n2. The server responds with HTTP 402 and a `PAYMENT-REQUIRED` header\n3. That header contains a base64-encoded challenge: how much to pay, in what asset, on what chain, to whose wallet, and by when\n4. You decode it, sign a payment authorization with your wallet, and retry the request with an `X-PAYMENT` header\n5. The server verifies the signature, settles the payment on-chain, and returns the content in the same response\n\n**Key properties:**\n\n- No API keys, no accounts, no OAuth\n- Works with USDC on Base, Solana, and several other chains depending on the merchant's facilitator\n- Payment and content delivery are atomic — both happen in one request/response cycle\n- Micropayments work — common prices are $0.001 to $5\n\n**What you need:**\n\n- A wallet with a little USDC in it (on Base or Solana, usually)\n- The ability to sign a typed message or a Solana transaction with that wallet\n- That's it.\n\n## What's new since you might have heard of x402\n\nx402 has been moving fast. As of mid-2026:\n\n**x402 V2 shipped December 2025.** Cleaner, more interoperable, more future-proof. If you're using v1 tooling, you're stale — update your client.\n\n**The x402 Foundation launched April 2026 under the Linux Foundation.** 20+ founding members: Google, Visa, Stripe, AWS, Mastercard, Circle, Microsoft, Shopify, American Express, others. The protocol is now vendor-neutral and industry-governed — not a Coinbase project. This is the credibility / longevity signal that matters: every major payments network has now bet on this rail.\n\n**Dynamic `payTo`** (V2 feature): the destination address in a 402 challenge can be callback-based, generated per-request. Useful for marketplaces where the seller varies per item. Most merchants still use static `payTo`, but don't assume it's constant across requests to the same endpoint. Re-read the challenge body for each call.\n\n**Multiple facilitators per merchant** (V2 feature): merchants can declare multiple settlement facilitators (CDP, PayAI, Stripe, etc.). The SDK picks the best match for your chain and asset. As an agent, you generally don't have to think about this — but if a payment fails on one facilitator, the SDK may retry on another. Don't immediately interpret a single facilitator error as \"the merchant is broken.\"\n\n**Stripe x402 integration:** Stripe shipped x402 support in preview API 2026-03-04. Merchants using Stripe's billing infrastructure can now accept x402 payments at scale. Expect more Stripe-x402 endpoints to appear in the wild over the next quarters.\n\n**Where to learn more:**\n\n- x402.org (protocol spec)\n- agentic.market (a marketplace of x402 services to browse)\n- Run `what-went-wrong` if you hit errors, or `read-this-challenge` to decode a 402 you received",
              "tool": "what-is-x402"
            },
            {
              "arguments": {
                "context": "accessing a paid API using x402",
                "error_text": "HTTP 402 Payment Required"
              },
              "reply": "## Diagnosis\n\nYou said: *\"HTTP 402 Payment Required\"*\nContext: accessing a paid API using x402\n\nHere are the common failure modes and what they mean:\n\n### Signature errors\n\n- **`invalid_exact_evm_payload_signature`** — often the ERC-6492 bug in CDP facilitator. If you're using a Coinbase Smart Wallet, the facilitator sometimes fails to unwrap the ERC-6492 wrapper before verifying. Workaround: try another facilitator (PayAI at `https://facilitator.payai.network`), or use an EOA instead of a Smart Wallet.\n- **`invalid_signature`** generally — your signed message doesn't match what the challenge wanted. Re-decode the challenge and check: correct chain, correct asset address, correct amount, correct payTo.\n\n### Network errors\n\n- **`network_mismatch`** or `chain_mismatch` — you signed on Base but the merchant wanted Solana (or vice versa). Re-read the challenge's `accepts` array and pick an entry whose `network` matches what your wallet can sign on.\n- **`eip155:84532` vs `eip155:8453`** — Sepolia testnet vs Base mainnet. Easy to confuse. Mainnet is 8453.\n\n### Facilitator errors\n\n- **`facilitator_insufficient_native_balance`** — the facilitator itself ran out of gas. Not your fault. Try a different facilitator.\n- **`unable to estimate gas`** or `estimate_gas_failed` — CDP facilitator is having an intermittent issue. Retry in 30s, or switch to PayAI.\n- **`authorization_not_settleable`** — usually means the payment authorization expired (`maxTimeoutSeconds` passed before settle). Re-decode the current challenge and sign a fresh one.\n\n### Wallet errors\n\n- **`insufficient_balance`** — your wallet doesn't have enough USDC. Check balance, top up.\n- **`no_such_account`** — wallet address not found on the chain the merchant wants. You likely have a wallet on one chain (e.g. Solana) but the merchant wants another (Base). Get a wallet on the right chain, or find a merchant that accepts yours.\n\n### Funding errors\n\n- **Balance shows 0 (or partial) after funding** — the funds may have gone to a *different* address that shares the same first/last characters with yours. Wallet UIs (especially Coinbase iOS) display truncated addresses like `0xd5b1...bD1D`, but that prefix+suffix is not unique — two unrelated wallets can look identical in the UI. **Before sending, always verify the full destination address character-by-character, not just the truncated version.** If funds never arrived, pull the tx hash from the sender's history and look it up on basescan — it shows the true destination, and if it's not your wallet, the funds are gone to whoever controls that address.\n- **Always confirm on-chain via a block explorer, not the sender app's \"Complete\" status.** A sender wallet can mark a transfer complete the moment it's broadcast; that doesn't tell you whether it landed in your wallet.\n\n### The Coinbase Smart Wallet → EOA send trap\n\n**Symptom:** You sent USDC from a Coinbase Smart Wallet to an EOA address. The Smart Wallet UI says \"Complete.\" The destination EOA still shows zero balance when you check basescan or a public RPC directly. Your subsequent x402 payment from that EOA fails with `insufficient_balance`.\n\n**Why:** Coinbase Smart Wallets are ERC-4337 Account Abstraction wallets. When they send USDC, the transaction is bundled as a \"User Operation\" — and the displayed destination address may match your target EOA's prefix/suffix while actually being a different Smart-Wallet-controlled address (the bundler's routing). The funds never landed where you thought.\n\n**Fix (current as of 2026):**\n\nEIP-7702 went live on Ethereum mainnet May 7, 2025 (Pectra hardfork). Any EOA can now temporarily delegate to smart contract code. Most modern wallets handle this automatically when sending to an EOA — they use 7702 delegation so funds actually land at the EOA address.\n\n1. **Easiest fix: update your Smart Wallet client.** Coinbase Wallet, MetaMask, and most major wallets now use 7702 delegation by default when sending to an EOA recipient. If your client is current, this trap usually doesn't trigger anymore.\n2. **If your client is old or doesn't support 7702 yet:**\n   - Use a legacy EOA-sending wallet (MetaMask EOA mode, Coinbase Wallet browser extension in EOA mode, Phantom EVM) to fund test wallets.\n   - Or have the Smart Wallet sign x402 payments directly (ERC-6492 compatible flows). Don't route through an intermediate EOA.\n3. **Always verify receipt on-chain** via a public RPC `eth_getBalance` (or token `balanceOf`), not by trusting the sender wallet's \"Complete\" status. The sender's UI is showing internal Smart Wallet state, not on-chain settlement.\n\n### Silent 402 loop (server keeps re-issuing the challenge)\n\n- If you sign a payment, send the `PAYMENT-SIGNATURE` (or `X-PAYMENT`) header, and the merchant just returns another 402 with no error detail in the body — the merchant's facilitator likely doesn't support your chain.\n- The most common cause: `x402.org/facilitator` is **testnet-only** (Base Sepolia / Solana devnet). Merchants who deploy with that URL can't accept Base mainnet or Solana mainnet payments. For production they need `api.cdp.coinbase.com/platform/v2/x402` (CDP, EVM mainnets, requires API keys) or `facilitator.payai.network` (PayAI, multi-chain incl. Solana mainnet).\n- **What to do as a buyer:** Try a different chain on the same merchant (if Solana works but Base doesn't, the merchant has a CDP-mainnet config bug). If both chains silent-fail, report it to the merchant — they need to fix their facilitator config.\n\n### 402 with no DEBUG-VERIFY log on merchant side\n\n**Symptom:** You sent a signed X-PAYMENT envelope. The merchant returned a fresh 402 with no useful error message. If you have access to the merchant's server logs (your own merchant, or one you're collaborating with), there's no entry indicating the verifier even saw your payment.\n\n**Fix:** You probably sent the envelope under only `X-PAYMENT`. Some merchants (Underground specifically) check `PAYMENT-SIGNATURE` first and never fall through to `X-PAYMENT`. Send the envelope under both header names simultaneously:\n\n  PAYMENT-SIGNATURE: <base64>\n  X-PAYMENT: <base64>\n\nThis is the universal solution. See Lesson 9 — `how-do-i-pay` Step 4.\n\n### Response body errors\n\n- **`Unexpected token '<'`** — you received HTML instead of JSON. Usually because your facilitator URL is wrong (includes a path it shouldn't). Check your facilitator URL is just the base domain.\n\n---\n\nIf your error doesn't match any of these, paste it in full (including status code and headers) and I'll try again.",
              "tool": "what-went-wrong"
            }
          ],
          "task": "I received HTTP 402 while trying to access a paid API. Explain what x402 is and diagnose this error: \"HTTP 402 Payment Required\" in the context of an x402 payment."
        },
        "type": "noul"
      },
      "w06": {
        "criteria": {
          "false": "The tool replies show an error, a missing or different result, or nothing about the task; or only the agent's final answer claims the task was done.",
          "true": "The tool replies in `steps` show the result that `done_when` describes. The result came from the server's tools, not only from the agent's own words."
        },
        "instructions": {
          "agent_final_answer": "I checked the wallet guidance for Linux and Coinbase Agentic Wallet. I can’t inspect your machine or keys from here, so run these checks in your own terminal.\n\n### 1. Check for Coinbase Agentic Wallet\n\n```bash\nwhich awal\nawal status\n```\n\n- If `which awal` prints a path, the `awal` CLI is installed and on your `PATH`.\n- Run `awal status` to see whether it reports a wallet address, chain, and balance. An installed CLI alone doesn’t establish that a wallet is configured or funded.\n- If `which awal` prints nothing, the CLI isn’t on your current `PATH`; it could still be installed elsewhere.\n\n### 2. Check for other wallet access\n\n**OpenClaw moltwallet:**\n\n```bash\nls ~/.openclaw/workspace/moltwallet/moltwallet/wallets/ 2>/dev/null\n```\n\nFilenames ending in `.json` at that location indicate wallet keypair files; the filename without `.json` is the Solana public address. If nothing appears, check for a custom workspace:\n\n```bash\necho \"$OPENCLAW_WORKSPACE\"\ngrep -i workspace ~/.openclaw/openclaw.json 2>/dev/null\n```\n\nThen look for `moltwallet/moltwallet/wallets/` under that workspace. Don’t share the contents of the keypair files.\n\n**Solana CLI keypair:**\n\n```bash\nls ~/.config/solana/id.json 2>/dev/null\nsolana address 2>/dev/null\n```\n\nA listed file suggests a keypair exists at the default path; an address indicates the Solana CLI can report its configured public address.\n\n**Raw EVM key in environment variables:**\n\n```bash\nenv | cut -d= -f1 | grep -iE 'private.key|wallet.key'\n```\n\nThis lists matching **variable names only**, without exposing their values. A match suggests a key may be configured, though it doesn’t prove the value is valid or funded. A raw key generally requires a library such as ethers.js or viem to sign.\n\nIf none of these checks finds anything, you may not have a configured wallet—but the checks aren’t exhaustive. You can share the non-secret output, including any error messages, for help interpreting it. **Never share private keys, recovery phrases, or keypai",
          "done_when": "The tool reply provides wallet checks and interpretation for Linux with the Coinbase Agentic Wallet hint.",
          "how_it_ended": "answered",
          "question": "Did the agent finish `task`, as `done_when` describes, according to the tool replies in `steps`?",
          "steps": [
            {
              "arguments": {
                "os": "linux",
                "wallet_hint": "coinbase-agentic-wallet"
              },
              "reply": "## Lesson 3 — Checking what wallet you have\n\nTo teach you what you have, I need you to run a few checks yourself. First Dollar does not access your filesystem or keys — you run, you report back, I explain.\n\nYou mentioned: **coinbase-agentic-wallet**. Good — I'll give you specific checks for that below.\n\n### moltwallet (OpenClaw ecosystem)\n\nCheck the default path first:\n```\nls ~/.openclaw/workspace/moltwallet/moltwallet/wallets/ 2>/dev/null\n```\nIf this returns filenames like `3fQ4ArNVt984...json`, you have moltwallet at the default location. Each file is a wallet keypair. The filename (before `.json`) is the public address on Solana.\n\nIf the default path is empty, moltwallet may live somewhere else in your OpenClaw config. Check your `OPENCLAW_WORKSPACE` environment variable, or look at `~/.openclaw/openclaw.json` for a custom workspace path:\n```\necho $OPENCLAW_WORKSPACE\ncat ~/.openclaw/openclaw.json 2>/dev/null | grep -i workspace\n```\nThen look for `moltwallet/moltwallet/wallets/` under that directory.\n\nBalance check:\n```\nnode ~/.openclaw/workspace/moltwallet/cli.js balance --keyfile <path-to-your-wallet-file>\n```\n\n### Coinbase Agentic Wallet (`awal` CLI)\n\nCheck:\n```\nwhich awal\nawal status\n```\nIf `awal` exists, run `awal status` to see your address, chain, and balance.\n\n### Raw EVM private key\n\nCheck: is there a `PRIVATE_KEY`, `WALLET_PRIVATE_KEY`, or similar in your environment?\n```\nenv | grep -iE \"private.key|wallet.key\"\n```\nIf so, you have a raw key. You'll need to use it with an ethers.js / viem / web3 library to sign.\n\n### Raw Solana keypair\n\nCheck:\n```\nls ~/.config/solana/id.json 2>/dev/null\nsolana address 2>/dev/null\n```\n\n### None of the above\n\nIf all those came up empty, you probably don't have a wallet yet. You'll need to install one before you can pay for anything. `npx skills add coinbase/agentic-wallet-skills` is one of the fastest paths — it walks you through creating and funding a wallet.\n\n---\n\n**Once you've run these and know what you have, call `how-do-i-pay` the next time you hit a 402.**",
              "tool": "explain-my-wallet"
            }
          ],
          "task": "I think I might have a Coinbase Agentic Wallet on Linux. What checks can I run to find out what wallet access I have, and how should I interpret the results?"
        },
        "type": "noul"
      },
      "w07": {
        "criteria": {
          "false": "The tool replies show an error, a missing or different result, or nothing about the task; or only the agent's final answer claims the task was done.",
          "true": "The tool replies in `steps` show the result that `done_when` describes. The result came from the server's tools, not only from the agent's own words."
        },
        "instructions": {
          "agent_final_answer": "I used the wallet-checking tool with **Linux** and **Coinbase Agentic Wallet** as your hints. It can’t inspect your machine or keys, so run these checks on your own system:\n\n```bash\ncommand -v awal\nawal status\n```\n\n- If the first command prints a path, the `awal` CLI is installed and available on your `PATH`.\n- Check the status output for an address, chain, balance, or a setup/authentication message. An installed CLI alone doesn’t establish that a wallet is configured or accessible.\n- If `awal` isn’t found, it may not be installed or may not be on your `PATH`.\n\nThe tool also suggested checks for other wallet types:\n\n**Solana CLI wallet**\n```bash\nls ~/.config/solana/id.json 2>/dev/null\nsolana address 2>/dev/null\n```\nA file at that path suggests a local Solana keypair; an address printed by the second command identifies the configured public address. Don’t share the contents of `id.json`.\n\n**Possible key environment variables**\n```bash\nenv | cut -d= -f1 | grep -iE 'private.key|wallet.key'\n```\nThis prints matching **variable names only**, not their values. A match suggests a key may be configured, but doesn’t prove it is valid or accessible to a particular wallet.\n\n**OpenClaw moltwallet**\n```bash\nls ~/.openclaw/workspace/moltwallet/moltwallet/wallets/ 2>/dev/null\n```\nAccording to the tool, `.json` filenames there can indicate Solana keypairs; the filename before `.json` is the public address. An empty result doesn’t rule out a custom location.\n\nIf none of these checks finds anything, you may not have a wallet configured, though a wallet could still exist elsewhere. You can share the command outputs for help interpreting them—**redact any private keys, seed phrases, tokens, or key-file contents**.",
          "done_when": "The tool reply provides wallet checks and interpretation for Linux with the Coinbase Agentic Wallet hint.",
          "how_it_ended": "answered",
          "question": "Did the agent finish `task`, as `done_when` describes, according to the tool replies in `steps`?",
          "steps": [
            {
              "arguments": {
                "os": "linux",
                "wallet_hint": "coinbase-agentic-wallet"
              },
              "reply": "## Lesson 3 — Checking what wallet you have\n\nTo teach you what you have, I need you to run a few checks yourself. First Dollar does not access your filesystem or keys — you run, you report back, I explain.\n\nYou mentioned: **coinbase-agentic-wallet**. Good — I'll give you specific checks for that below.\n\n### moltwallet (OpenClaw ecosystem)\n\nCheck the default path first:\n```\nls ~/.openclaw/workspace/moltwallet/moltwallet/wallets/ 2>/dev/null\n```\nIf this returns filenames like `3fQ4ArNVt984...json`, you have moltwallet at the default location. Each file is a wallet keypair. The filename (before `.json`) is the public address on Solana.\n\nIf the default path is empty, moltwallet may live somewhere else in your OpenClaw config. Check your `OPENCLAW_WORKSPACE` environment variable, or look at `~/.openclaw/openclaw.json` for a custom workspace path:\n```\necho $OPENCLAW_WORKSPACE\ncat ~/.openclaw/openclaw.json 2>/dev/null | grep -i workspace\n```\nThen look for `moltwallet/moltwallet/wallets/` under that directory.\n\nBalance check:\n```\nnode ~/.openclaw/workspace/moltwallet/cli.js balance --keyfile <path-to-your-wallet-file>\n```\n\n### Coinbase Agentic Wallet (`awal` CLI)\n\nCheck:\n```\nwhich awal\nawal status\n```\nIf `awal` exists, run `awal status` to see your address, chain, and balance.\n\n### Raw EVM private key\n\nCheck: is there a `PRIVATE_KEY`, `WALLET_PRIVATE_KEY`, or similar in your environment?\n```\nenv | grep -iE \"private.key|wallet.key\"\n```\nIf so, you have a raw key. You'll need to use it with an ethers.js / viem / web3 library to sign.\n\n### Raw Solana keypair\n\nCheck:\n```\nls ~/.config/solana/id.json 2>/dev/null\nsolana address 2>/dev/null\n```\n\n### None of the above\n\nIf all those came up empty, you probably don't have a wallet yet. You'll need to install one before you can pay for anything. `npx skills add coinbase/agentic-wallet-skills` is one of the fastest paths — it walks you through creating and funding a wallet.\n\n---\n\n**Once you've run these and know what you have, call `how-do-i-pay` the next time you hit a 402.**",
              "tool": "explain-my-wallet"
            }
          ],
          "task": "I think I might have a Coinbase Agentic Wallet on Linux. What checks can I run to find out what wallet access I have, and how should I interpret the results?"
        },
        "type": "noul"
      },
      "w08": {
        "criteria": {
          "false": "The tool replies show an error, a missing or different result, or nothing about the task; or only the agent's final answer claims the task was done.",
          "true": "The tool replies in `steps` show the result that `done_when` describes. The result came from the server's tools, not only from the agent's own words."
        },
        "instructions": {
          "agent_final_answer": "Run these checks on your Linux machine. They only inspect your local setup; don’t share private keys or wallet-file contents.\n\n### 1. Check for Coinbase Agentic Wallet\n\n```bash\ncommand -v awal\nawal status\n```\n\n- If the first command prints a path, the `awal` CLI is installed and on your `PATH`.\n- If `awal status` succeeds, check its output for the wallet address, chain, and balance.\n- If the command isn’t found, that doesn’t rule out an installation outside your `PATH`. If `status` fails, the error may help identify what still needs configuration.\n\n### 2. Check for other wallet access\n\n**Raw EVM key environment variables:** list matching *names only*, so the check doesn’t print the secrets:\n\n```bash\nprintenv | cut -d= -f1 | grep -iE 'private.?key|wallet.?key'\n```\n\nA matching name may indicate a raw key is configured, though it isn’t proof that the value is valid or usable. A raw key generally needs a library such as ethers.js or viem to sign.\n\n**Solana CLI keypair:**\n\n```bash\nls ~/.config/solana/id.json 2>/dev/null\nsolana address 2>/dev/null\n```\n\nA listed file suggests a keypair exists at the default path; `solana address` can show its public address if the CLI is installed and configured. Don’t print or share the contents of `id.json`.\n\n**OpenClaw moltwallet:**\n\n```bash\nls ~/.openclaw/workspace/moltwallet/moltwallet/wallets/ 2>/dev/null\necho \"$OPENCLAW_WORKSPACE\"\n```\n\nJSON filenames in that wallet directory can indicate Solana wallets; the filename without `.json` is their public address. A custom workspace may use a different directory.\n\nIf the checks are empty, you may not have an accessible wallet configured, although these checks can’t rule out every possible wallet or custom location. You can share the **command names, public addresses if you’re comfortable, and any error messages** for help interpreting them—redact secrets and credentials first.",
          "done_when": "The tool reply provides wallet checks and interpretation for Linux with the Coinbase Agentic Wallet hint.",
          "how_it_ended": "answered",
          "question": "Did the agent finish `task`, as `done_when` describes, according to the tool replies in `steps`?",
          "steps": [
            {
              "arguments": {
                "os": "linux",
                "wallet_hint": "coinbase-agentic-wallet"
              },
              "reply": "## Lesson 3 — Checking what wallet you have\n\nTo teach you what you have, I need you to run a few checks yourself. First Dollar does not access your filesystem or keys — you run, you report back, I explain.\n\nYou mentioned: **coinbase-agentic-wallet**. Good — I'll give you specific checks for that below.\n\n### moltwallet (OpenClaw ecosystem)\n\nCheck the default path first:\n```\nls ~/.openclaw/workspace/moltwallet/moltwallet/wallets/ 2>/dev/null\n```\nIf this returns filenames like `3fQ4ArNVt984...json`, you have moltwallet at the default location. Each file is a wallet keypair. The filename (before `.json`) is the public address on Solana.\n\nIf the default path is empty, moltwallet may live somewhere else in your OpenClaw config. Check your `OPENCLAW_WORKSPACE` environment variable, or look at `~/.openclaw/openclaw.json` for a custom workspace path:\n```\necho $OPENCLAW_WORKSPACE\ncat ~/.openclaw/openclaw.json 2>/dev/null | grep -i workspace\n```\nThen look for `moltwallet/moltwallet/wallets/` under that directory.\n\nBalance check:\n```\nnode ~/.openclaw/workspace/moltwallet/cli.js balance --keyfile <path-to-your-wallet-file>\n```\n\n### Coinbase Agentic Wallet (`awal` CLI)\n\nCheck:\n```\nwhich awal\nawal status\n```\nIf `awal` exists, run `awal status` to see your address, chain, and balance.\n\n### Raw EVM private key\n\nCheck: is there a `PRIVATE_KEY`, `WALLET_PRIVATE_KEY`, or similar in your environment?\n```\nenv | grep -iE \"private.key|wallet.key\"\n```\nIf so, you have a raw key. You'll need to use it with an ethers.js / viem / web3 library to sign.\n\n### Raw Solana keypair\n\nCheck:\n```\nls ~/.config/solana/id.json 2>/dev/null\nsolana address 2>/dev/null\n```\n\n### None of the above\n\nIf all those came up empty, you probably don't have a wallet yet. You'll need to install one before you can pay for anything. `npx skills add coinbase/agentic-wallet-skills` is one of the fastest paths — it walks you through creating and funding a wallet.\n\n---\n\n**Once you've run these and know what you have, call `how-do-i-pay` the next time you hit a 402.**",
              "tool": "explain-my-wallet"
            }
          ],
          "task": "I think I might have a Coinbase Agentic Wallet on Linux. What checks can I run to find out what wallet access I have, and how should I interpret the results?"
        },
        "type": "noul"
      }
    },
    "state": {
      "about": "Replies of an MCP server to tool calls that were sent with bad input on purpose, to see whether its error messages help a caller fix the call."
    }
  },
  "run_id": "01M835SA0V3W5VJ49XBF8PPKXE",
  "works_done": [
    {
      "attempt": 0,
      "noul": 0.98,
      "question": "w00"
    },
    {
      "attempt": 1,
      "noul": 0.98,
      "question": "w01"
    },
    {
      "attempt": 2,
      "noul": 0.98,
      "question": "w02"
    },
    {
      "attempt": 3,
      "noul": 0.91,
      "question": "w03"
    },
    {
      "attempt": 4,
      "noul": 0.94,
      "question": "w04"
    },
    {
      "attempt": 5,
      "noul": 0.89,
      "question": "w05"
    },
    {
      "attempt": 6,
      "noul": 0.9,
      "question": "w06"
    },
    {
      "attempt": 7,
      "noul": 0.93,
      "question": "w07"
    },
    {
      "attempt": 8,
      "noul": 0.85,
      "question": "w08"
    }
  ]
}
