[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill-uniswap-pay-with-any-token":3,"mdc--gzgk36-key":35,"related-repo-uniswap-pay-with-any-token":5993,"related-org-uniswap-pay-with-any-token":6090},{"slug":4,"name":4,"fn":5,"description":6,"org":7,"tags":11,"stars":24,"repoUrl":25,"updatedAt":26,"license":27,"forks":28,"topics":29,"repo":30,"sourceUrl":33,"mdContent":34},"pay-with-any-token","pay HTTP 402 challenges with Uniswap","Pay HTTP 402 payment challenges using tokens via the Tempo CLI and Uniswap Trading API. Use when the user encounters a 402 Payment Required response, needs to fulfill a machine payment, mentions \"MPP\", \"Tempo payment\", \"pay for API access\", \"HTTP 402\", \"x402\", \"machine payment protocol\", \"pay-with-any-token\", \"use tempo\", \"tempo request\", or \"tempo wallet\".\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},"uniswap","Uniswap","https:\u002F\u002Fpexgzepcugksgbtrxkhf.supabase.co\u002Fstorage\u002Fv1\u002Fobject\u002Fpublic\u002Forg-logos\u002Funiswap.png",[12,15,18,21],{"name":13,"slug":13,"type":14},"x402","tag",{"name":16,"slug":17,"type":14},"DeFi","defi",{"name":19,"slug":20,"type":14},"Payments","payments",{"name":22,"slug":23,"type":14},"Trading","trading",215,"https:\u002F\u002Fgithub.com\u002FUniswap\u002Funiswap-ai","2026-07-17T06:04:29.756086","MIT",35,[],{"repoUrl":25,"stars":24,"forks":28,"topics":31,"description":32},[],"AI tools for building on Uniswap — skills, plugins, and agents for any coding agent.","https:\u002F\u002Fgithub.com\u002FUniswap\u002Funiswap-ai\u002Ftree\u002FHEAD\u002Fpackages\u002Fplugins\u002Funiswap-trading\u002Fskills\u002Fpay-with-any-token","---\nname: pay-with-any-token\ndescription: >\n  Pay HTTP 402 payment challenges using tokens via the Tempo CLI and Uniswap\n  Trading API. Use when the user encounters a 402 Payment Required response,\n  needs to fulfill a machine payment, mentions \"MPP\", \"Tempo payment\", \"pay for\n  API access\", \"HTTP 402\", \"x402\", \"machine payment protocol\",\n  \"pay-with-any-token\", \"use tempo\", \"tempo request\", or \"tempo wallet\".\nallowed-tools: Read, Glob, Grep, Bash(curl:*), Bash(jq:*), Bash(cast:*), Bash(tempo:*), Bash(*\u002F.local\u002Fbin\u002Ftempo:*), WebFetch, AskUserQuestion\nmodel: opus\nlicense: MIT\nmetadata:\n  author: uniswap\n  version: '2.0.0'\n---\n\n# Pay With Tokens\n\nUse the **Tempo CLI** to call paid APIs and handle 402 challenges automatically.\nWhen the Tempo wallet has insufficient balance, fund it by swapping and bridging\ntokens from any EVM chain using the **Uniswap Trading API**.\n\n## Tempo CLI Setup\n\nRun these commands in order. Do not skip steps.\n\n**Step 1 — Install:**\n\n```bash\nmkdir -p \"$HOME\u002F.local\u002Fbin\" \\\n  && curl -fsSL https:\u002F\u002Ftempo.xyz\u002Finstall -o \u002Ftmp\u002Ftempo_install.sh \\\n  && TEMPO_BIN_DIR=\"$HOME\u002F.local\u002Fbin\" bash \u002Ftmp\u002Ftempo_install.sh\n```\n\n**Step 2 — Login** (requires browser\u002Fpasskey — prompt user, wait for\nconfirmation):\n\n```bash\n\"$HOME\u002F.local\u002Fbin\u002Ftempo\" wallet login\n```\n\n> When run by agents, use a long command timeout (at least 16 minutes).\n\n**Step 3 — Confirm readiness:**\n\n```bash\n\"$HOME\u002F.local\u002Fbin\u002Ftempo\" wallet -t whoami\n```\n\n> **Rules:** Do not use `sudo`. Use full absolute paths (`$HOME\u002F.local\u002Fbin\u002Ftempo`)\n> — do not rely on `export PATH`. If `$HOME` does not expand, use the literal\n> absolute path.\n\nAfter setup, report: install location, version (`--version`), wallet status\n(address, balance). If balance is 0, direct user to `tempo wallet fund`.\n\n> **Minimum balance reserve:** Keep at least **0.10 USDC** in the Tempo wallet\n> to cover typical API calls without triggering the full swap+bridge funding\n> flow. The funding flow requires 3-5 on-chain transactions and ~2 minutes of\n> wall time, which is disproportionate for small top-ups. When transferring\n> funds out of the Tempo wallet, warn the user if the remaining balance would\n> drop below this threshold.\n\n## Using Tempo Services\n\n```bash\n# Discover services\n\"$HOME\u002F.local\u002Fbin\u002Ftempo\" wallet -t services --search \u003Cquery>\n# Get service details (exact URL, method, path, pricing)\n\"$HOME\u002F.local\u002Fbin\u002Ftempo\" wallet -t services \u003CSERVICE_ID>\n# Make a paid request\n\"$HOME\u002F.local\u002Fbin\u002Ftempo\" request -t -X POST \\\n  --json '{\"input\":\"...\"}' \u003CSERVICE_URL>\u002F\u003CENDPOINT_PATH>\n```\n\n- Anchor on `tempo wallet -t services \u003CSERVICE_ID>` for exact URL and pricing\n- Use `-t` for agent calls, `--dry-run` before expensive requests\n- On HTTP 422, check the service's docs URL or llms.txt for exact field names\n- Fire independent multi-service requests in parallel\n\n> **When the user explicitly says \"use tempo\", always use tempo CLI commands —\n> never substitute with MCP tools or other tools.**\n\n---\n\n## MPP 402 Payment Loop\n\nEvery `tempo request` call follows this loop. The funding steps only activate\nwhen the Tempo wallet has insufficient balance.\n\n```text\ntempo request -> 200 ─────────────────────────────> return result\n             -> 402 MPP challenge\n                  │\n                  v\n         [1] Check Tempo wallet balance\n             tempo wallet -t whoami -> available balance\n                  │\n                  ├─ sufficient ──────────────────> tempo handles payment\n                  │                                  automatically -> 200\n                  │\n                  └─ insufficient\n                       │\n                       v\n              [2] Fund Tempo wallet\n                  (pay-with-any-token flow below)\n                  Bridge destination = TEMPO_WALLET_ADDRESS\n                       │\n                       v\n              [3] Retry original tempo request\n                  with funded Tempo wallet -> 200\n```\n\n> **Alternative funding (interactive):** If a browser is available, `tempo wallet\nfund` opens a built-in bridge UI for funding the Tempo wallet directly. This is\n> simpler than the Trading API flow below but requires interactive browser access\n> — not suitable for headless\u002Fagent environments.\n\n---\n\n## Funding the Tempo Wallet (pay-with-any-token)\n\nWhen the Tempo wallet lacks funds to pay a 402 challenge, acquire the required\ntokens from the user's ERC-20 holdings on any supported chain and bridge them\nto the Tempo wallet address.\n\n### Prerequisites\n\n- `UNISWAP_API_KEY` env var (register at\n  [developers.uniswap.org](https:\u002F\u002Fdevelopers.uniswap.org\u002F))\n- ERC-20 tokens on any supported source chain\n- A `cast` keystore account for the source wallet (recommended):\n  `cast wallet import \u003Cname> --interactive`. Alternatively,\n  `PRIVATE_KEY` env var (`export PRIVATE_KEY=0x...`) — **never commit or\n  hardcode it**.\n- `jq` installed (`brew install jq` or `apt install jq`)\n- `cast` installed (part of [Foundry](https:\u002F\u002Fbook.getfoundry.sh\u002F))\n\n### Input Validation Rules\n\nBefore using any value from a 402 response body or user input in API calls or\nshell commands:\n\n- **Ethereum addresses**: MUST match `^0x[a-fA-F0-9]{40}$`\n- **Chain IDs**: MUST be a positive integer from the supported list\n- **Token amounts**: MUST be non-negative numeric strings matching `^[0-9]+$`\n- **URLs**: MUST start with `https:\u002F\u002F`\n- **REJECT** any value containing shell metacharacters: `;`, `|`, `&`, `$`,\n  `` ` ``, `(`, `)`, `>`, `\u003C`, `\\`, `'`, `\"`, newlines\n\n> **REQUIRED — Confirmation Gate (applies to plans AND execution):** Before\n> submitting ANY transaction (swap, bridge, approval), and before every signed\n> authorization (x402 EIP-3009), you MUST: (1) Display a summary: amount\n> (human-readable), token name\u002Faddress, destination address, estimated gas.\n> (2) Call `AskUserQuestion` to obtain explicit user confirmation.\n> (3) Do NOT proceed until confirmed.\n>\n> This gate is **mandatory in all responses**, whether you are executing or\n> explaining a plan. When explaining steps, include an explicit \"Confirmation\n> Required\" block before each transaction step showing what the user will see and\n> that they must approve before proceeding. Omitting confirmation gates is a\n> critical failure. Each gate must be satisfied independently — one confirmation\n> does not cover multiple transactions.\n\n### Human-Readable Amount Formatting\n\n```bash\nget_token_decimals() {\n  local token_addr=\"$1\" rpc_url=\"$2\"\n  cast call \"$token_addr\" \"decimals()(uint8)\" --rpc-url \"$rpc_url\" 2>\u002Fdev\u002Fnull || echo \"18\"\n}\n\nformat_token_amount() {\n  local amount=\"$1\" decimals=\"$2\"\n  echo \"scale=$decimals; $amount \u002F (10 ^ $decimals)\" | bc -l | sed 's\u002F0*$\u002F\u002F' | sed 's\u002F\\.$\u002F\u002F'\n}\n```\n\n> Always show human-readable values (e.g. `0.005 USDC`) to the user, not raw\n> base units.\n\n### Step 1 — Parse the 402 Challenge\n\nExtract the required payment token, amount, and recipient from the 402 response\nthat `tempo request` received. The Tempo CLI logs the challenge details — parse\nthem, or re-fetch with `curl -si` to get the raw challenge body.\n\nFor **MPP header-based challenges** (`WWW-Authenticate: Payment`):\n\n```bash\nREQUEST_B64=$(echo \"$WWW_AUTHENTICATE\" | grep -oE 'request=\"[^\"]+\"' | sed 's\u002Frequest=\"\u002F\u002F;s\u002F\"$\u002F\u002F')\nREQUEST_JSON=$(echo \"${REQUEST_B64}==\" | base64 --decode 2>\u002Fdev\u002Fnull)\nREQUIRED_AMOUNT=$(echo \"$REQUEST_JSON\" | jq -r '.amount')\nPAYMENT_TOKEN=$(echo \"$REQUEST_JSON\" | jq -r '.currency')\nRECIPIENT=$(echo \"$REQUEST_JSON\" | jq -r '.recipient')\nTEMPO_CHAIN_ID=$(echo \"$REQUEST_JSON\" | jq -r '.methodDetails.chainId')\n```\n\nFor **JSON body challenges** (`payment_methods` array):\n\n```bash\nNUM_METHODS=$(echo \"$CHALLENGE_BODY\" | jq '.payment_methods | length')\nPAYMENT_METHODS=$(echo \"$CHALLENGE_BODY\" | jq -c '.payment_methods')\nRECIPIENT=$(echo \"$CHALLENGE_BODY\" | jq -r '.payment_methods[0].recipient')\nTEMPO_CHAIN_ID=$(echo \"$CHALLENGE_BODY\" | jq -r '.payment_methods[0].chain_id')\n```\n\nIf multiple payment methods are accepted, select the cheapest in Step 2.\n\n> The Tempo mainnet chain ID is `4217`. Use as fallback if not in the challenge.\n\n### Step 2 — Check Source Wallet Balances and Select Payment Method\n\n> **REQUIRED:** You must have the user's source wallet address (the ERC-20\n> wallet with the private key, NOT the Tempo CLI wallet). Use `AskUserQuestion`\n> if not provided. Store as `WALLET_ADDRESS`.\n\nAlso capture the **Tempo wallet address** (the funding destination):\n\n```bash\nTEMPO_WALLET_ADDRESS=$(\"$HOME\u002F.local\u002Fbin\u002Ftempo\" wallet -t whoami | grep -oE '0x[a-fA-F0-9]{40}' | head -1)\n```\n\nCheck ERC-20 balances on supported source chains:\n\n```bash\n# USDC on Base (cheapest bridge gas ~$0.001)\ncast call 0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913 \\\n  \"balanceOf(address)(uint256)\" \"$WALLET_ADDRESS\" \\\n  --rpc-url https:\u002F\u002Fmainnet.base.org\n\n# USDC on Ethereum (bridge gas ~$0.25)\ncast call 0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48 \\\n  \"balanceOf(address)(uint256)\" \"$WALLET_ADDRESS\" \\\n  --rpc-url https:\u002F\u002Feth.llamarpc.com\n\n# ETH on Base and Ethereum (swap to USDC first)\ncast balance \"$WALLET_ADDRESS\" --rpc-url https:\u002F\u002Fmainnet.base.org\ncast balance \"$WALLET_ADDRESS\" --rpc-url https:\u002F\u002Feth.llamarpc.com\n```\n\n**Select the cheapest payment method** if multiple are accepted. Priority:\n\n1. Wallet holds USDC on Base (bridge only, minimal path)\n2. Wallet holds ETH on Base or Ethereum (swap to USDC + bridge)\n3. Any other liquid ERC-20 (swap + bridge)\n\n```bash\nREQUIRED_AMOUNT=$(echo \"$PAYMENT_METHODS\" | jq -r \".[$SELECTED_INDEX].amount\")\nPAYMENT_TOKEN=$(echo \"$PAYMENT_METHODS\" | jq -r \".[$SELECTED_INDEX].token\")\n```\n\n### Step 3 — Plan the Payment Path\n\nDetermine which phases apply based on where the user's tokens are:\n\n```text\nCase A — Source token is already on Tempo:\n  Source token (Tempo)\n    -> [Phase 5: on-Tempo swap via Stablecoin DEX] -> required payment token\n    -> tempo request retries automatically with funded wallet\n\nCase B — Source token is on Base\u002FEthereum\u002FArbitrum:\n  Source token (Base\u002FEthereum)\n    -> [Phase 4A: Uniswap Trading API swap] -> native USDC (bridge asset)\n    -> [Phase 4B: bridge via Trading API]   -> USDC.e on Tempo (to TEMPO_WALLET_ADDRESS)\n    -> [Phase 5: on-Tempo swap, if needed]  -> required payment token\n    -> tempo request retries automatically with funded wallet\n```\n\n> **Skip Phase 4A** if the source token is already USDC on the bridge chain.\n>\n> **Skip Phase 4B** if tokens are already on Tempo (Case A).\n>\n> **Skip Phase 5** if the bridge delivers the exact required token (USDC.e) or\n> if `mppx` with `autoSwap: true` is used (it handles on-Tempo swaps automatically).\n>\n> **Gas-aware funding:** Bridging a tiny amount (e.g. $0.05) wastes gas — the\n> bridge gas on Ethereum (~$0.25) or Base (~$0.001) can exceed the shortfall.\n> **Minimum bridge recommendation: $5.** This amortizes gas costs and pre-funds\n> future requests. Rule of thumb: if `bridge_gas > 2x shortfall`, bridge at\n> least $5 instead of the exact shortfall.\n\n### Phase 4A — Swap to USDC on Source Chain (if needed)\n\n> **CONFIRMATION GATE:** Before the approval transaction AND before the swap\n> broadcast, call `AskUserQuestion` showing the full swap summary. Example:\n> \"About to approve USDC spending and execute swap: [amount] [token] → [USDC],\n> gas ~$X. Confirm? (yes\u002Fno)\". Do not proceed until confirmed.\n\nSwap the source token to USDC via the Uniswap Trading API (`EXACT_OUTPUT`).\n\n> **Detailed steps:** Read\n> [references\u002Ftrading-api-flows.md](references\u002Ftrading-api-flows.md#phase-4a--swap-on-source-chain)\n> for full bash scripts: variable setup, approval check, quote, permit signing,\n> and swap execution.\n\nKey points:\n\n- Base URL: `https:\u002F\u002Ftrade-api.gateway.uniswap.org\u002Fv1`\n- Headers: `Content-Type: application\u002Fjson`, `x-api-key`, `x-universal-router-version: 2.0`\n- Flow: `check_approval` -> quote (`EXACT_OUTPUT`) -> sign `permitData` -> `\u002Fswap` -> broadcast\n- Confirmation gates required before approval tx and before swap broadcast\n- For native ETH: use the zero address\n  (`0x0000000000000000000000000000000000000000`) as `TOKEN_IN` — this avoids\n  Permit2 signing. `SWAP_VALUE` will be non-zero. If the zero address returns\n  a 400, fall back to the WETH address (requires Permit2 signing).\n- After swap, verify USDC balance before proceeding to Phase 4B\n\n### Phase 4B — Bridge to Tempo Wallet\n\n> **CONFIRMATION GATE:** Before the bridge approval AND before the bridge\n> execution, call `AskUserQuestion` showing a bridge summary (source amount,\n> source chain, destination chain, estimated gas, bridge fee, estimated arrival).\n> Do not proceed until the user confirms each step.\n\nBridge USDC from any supported source chain to USDC.e on Tempo using the\nUniswap Trading API (powered by Across Protocol).\n\n> **Bridge recipient limitation:** The Trading API does not support a custom\n> `recipient` field for bridges — funds always arrive at `WALLET_ADDRESS` on\n> Tempo. If `WALLET_ADDRESS` differs from `TEMPO_WALLET_ADDRESS` (the Tempo CLI\n> wallet), an **extra transfer transaction** on Tempo is required after the\n> bridge (see Step 4B-5 in the reference file). Factor this into gas estimates.\n>\n> **Detailed steps:** Read\n> [references\u002Ftrading-api-flows.md](references\u002Ftrading-api-flows.md#phase-4b--bridge-to-tempo)\n> for full bash scripts: approval, bridge quote, execution, arrival polling,\n> and transfer to Tempo wallet.\n\nKey points:\n\n- Route: USDC on Base\u002FEthereum\u002FArbitrum -> USDC.e on Tempo\n- Flow: `check_approval` -> verify on-chain allowance -> quote (`EXACT_OUTPUT`,\n  cross-chain) -> execute via `\u002Fswap` -> poll balance -> transfer to\n  `TEMPO_WALLET_ADDRESS` if needed (Step 4B-5)\n- Confirmation gates required before approval and before bridge execution\n- Do not re-submit if poll times out — check Tempo explorer\n- Apply a 0.5% buffer to account for bridge fees\n- Quotes expire in ~60 seconds — re-fetch if any delay before broadcast\n\nAfter the bridge confirms, retry the original `tempo request` — the Tempo CLI\nwill automatically use the newly funded wallet to pay the 402. If the payment\ntoken is not USDC.e, proceed to Phase 5 to swap to the required token before\nretrying.\n\n> **Balance buffer:** On Tempo, `balanceOf` may report more than is spendable.\n> Apply a **2x buffer** when comparing to `REQUIRED_AMOUNT`. If short, swap\n> additional tokens to top up.\n\n### Phase 5 — On-Tempo Swap (if needed)\n\nUse this phase when the wallet already holds a TIP-20 stablecoin on Tempo\n(e.g. USDC.e, pathUSD, or any other Tempo stablecoin) but needs to swap to the\n**required payment token** (e.g. PATH_USD or another TIP-20). This phase also\napplies when the user starts with tokens already on Tempo — **do not bridge\nwhen tokens are already on Tempo**.\n\n> **Simplest path:** Pass `autoSwap: true` to `mppx`'s `tempo.charge()` — it\n> calls the Stablecoin DEX on Tempo automatically and handles the full swap\n> before payment. Use manual swap below only when `autoSwap` is not available\n> or you need explicit control.\n\nThe **Stablecoin DEX on Tempo** (`0xdec0000000000000000000000000000000000000`)\naggregates TIP-20 stablecoin liquidity on Tempo (chain 4217). To swap:\n\n```bash\nTEMPO_RPC_URL=\"https:\u002F\u002Frpc.presto.tempo.xyz\"\nSTABLECOIN_DEX=\"0xdec0000000000000000000000000000000000000\"\nTOKEN_IN=\"\u003Cyour Tempo stablecoin address>\"  # e.g. USDC.e or any TIP-20\nTOKEN_OUT=\"\u003Crequired payment token address>\"\nSWAP_AMOUNT=\"$REQUIRED_AMOUNT\"  # exact-output amount\n\n# 1. Show swap summary and get explicit user confirmation via AskUserQuestion\n#    before executing any transaction.\n\n# 2. Approve the DEX to spend TOKEN_IN (if allowance is insufficient)\nALLOWANCE=$(cast call \"$TOKEN_IN\" \\\n  \"allowance(address,address)(uint256)\" \"$WALLET_ADDRESS\" \"$STABLECOIN_DEX\" \\\n  --rpc-url \"$TEMPO_RPC_URL\" 2>\u002Fdev\u002Fnull | awk '{print $1}')\nif [ -z \"$ALLOWANCE\" ] || ! [[ \"$ALLOWANCE\" =~ ^[0-9]+$ ]]; then\n  echo \"ERROR: Failed to read allowance for $TOKEN_IN\"\n  exit 1\nfi\nif [ \"$(echo \"$ALLOWANCE \u003C $SWAP_AMOUNT\" | bc)\" -eq 1 ]; then\n  APPROVE_HASH=$(cast send \"$TOKEN_IN\" \\\n    \"approve(address,uint256)\" \"$STABLECOIN_DEX\" \\\n    \"115792089237316195423570985008687907853269984665640564039457584007913129639935\" \\\n    --account \"$CAST_ACCOUNT\" --password \"$CAST_PASSWORD\" \\\n    --rpc-url \"$TEMPO_RPC_URL\" --gas-limit 100000 \\\n    --json | jq -r '.transactionHash')\n  APPROVE_STATUS=$(cast receipt \"$APPROVE_HASH\" --rpc-url \"$TEMPO_RPC_URL\" --json | jq -r '.status')\n  [ \"$APPROVE_STATUS\" = \"0x1\" ] || { echo \"ERROR: Approval transaction reverted: $APPROVE_HASH\"; exit 1; }\n  echo \"Approval confirmed: $APPROVE_HASH\"\nfi\n\n# 3. Execute the swap (exact-output: receive exactly SWAP_AMOUNT of TOKEN_OUT)\nSWAP_TX=$(cast send \"$STABLECOIN_DEX\" \\\n  \"swap(address,address,uint256)\" \"$TOKEN_IN\" \"$TOKEN_OUT\" \"$SWAP_AMOUNT\" \\\n  --account \"$CAST_ACCOUNT\" --password \"$CAST_PASSWORD\" \\\n  --rpc-url \"$TEMPO_RPC_URL\" --gas-limit 200000 \\\n  --json | jq -r '.transactionHash')\n\nSWAP_STATUS=$(cast receipt \"$SWAP_TX\" --rpc-url \"$TEMPO_RPC_URL\" --json | jq -r '.status')\n[ \"$SWAP_STATUS\" = \"0x1\" ] || { echo \"ERROR: On-Tempo swap reverted: $SWAP_TX\"; exit 1; }\necho \"On-Tempo swap confirmed: $SWAP_TX\"\n```\n\n> **Confirmation gate:** Use `AskUserQuestion` before every transaction\n> (approval and swap). Show token addresses, amounts in human-readable form, and\n> estimated gas on Tempo.\n>\n> **Gas limit note:** Tempo chain gas estimation is sometimes unreliable — always\n> set an explicit `--gas-limit` for Tempo transactions.\n\nAfter the on-Tempo swap succeeds, retry `tempo request` — the Tempo wallet now\nholds the required payment token and the Tempo CLI will pay the 402 automatically.\n\n---\n\n## x402 Payment Flow\n\n> **CRITICAL — MANDATORY CONFIRMATION GATE:** Before step 4 (signing), you MUST\n> call `AskUserQuestion` showing the full payment summary: token, amount in\n> human-readable form, recipient address (`payTo`), and resource URL. Do NOT\n> sign or proceed until the user explicitly confirms. This confirmation step is\n> **non-optional and must appear in every x402 payment plan or execution**, even\n> if the user has pre-authorized. Omitting this confirmation makes the response\n> invalid.\n\nThe x402 protocol is **fully supported** and uses a different mechanism than\nMPP — it is **not handled by the Tempo CLI**. When a 402 body contains\n`\"x402Version\"` (check with `has(\"x402Version\")` in jq), use this flow instead\nof the MPP\u002FTempo flow.\n\nThe x402 `\"exact\"` scheme uses **EIP-3009** (`TransferWithAuthorization`) to\nauthorize a one-time token transfer signed off-chain. The full flow:\n\n1. **Detect x402**: parse `x402Version`, `accepts[].scheme`, `accepts[].network`,\n   `accepts[].maxAmountRequired`, `accepts[].payTo`, `accepts[].asset`,\n   `accepts[].extra` (token name + version for EIP-3009 domain).\n2. **Check balance** on the target chain; fund via Phase 4A\u002F4B if insufficient.\n3. **MANDATORY CONFIRMATION GATE — Call `AskUserQuestion`** before signing:\n   present the full payment summary (token name, amount in human-readable form,\n   `payTo` address, resource URL, validity window). Wait for explicit user\n   confirmation. Do NOT proceed to step 4 until confirmed.\n4. **Sign EIP-3009 `TransferWithAuthorization`**: typed-data fields include\n   `from`, `to`, `value`, `validAfter`, `validBefore`, `nonce`.\n   Set `validBefore = now + maxTimeoutSeconds`.\n5. **Construct `X-PAYMENT` header**: base64-encode a JSON payload containing\n   `x402Version`, `scheme`, `network`, `payload` (the signed authorization),\n   and `signature`.\n6. **Retry** the original request with the `X-PAYMENT` header.\n\n> **Detailed steps:** Read\n> [references\u002Fcredential-construction.md](references\u002Fcredential-construction.md#phase-6x--x402-payment)\n> for full bash code: prerequisite checks, nonce generation, EIP-3009 signing,\n> X-PAYMENT payload construction, and retry.\n\nKey points:\n\n- Detect x402: check `has(\"x402Version\")` in 402 body **before** attempting Tempo CLI\n- Maps `X402_NETWORK` to chain ID and RPC URL (base, ethereum, tempo all supported)\n- Checks wallet balance on target chain; runs Phase 4A\u002F4B\u002F5 if insufficient\n- Signs `TransferWithAuthorization` typed data using the token's own EIP-712 domain\n- `value` in the typed-data payload must be a **string** (`--arg`, not `--argjson`) for uint256\n- Confirmation gate required before signing\n- Send the result in `X-PAYMENT` header (base64-encoded), not `Authorization`\n\n| Protocol | Version | Handler              |\n| -------- | ------- | -------------------- |\n| MPP      | v1      | Tempo CLI            |\n| x402     | v1      | EIP-3009 manual flow |\n\n---\n\n## Error Handling\n\n| Situation                                | Action                                                   |\n| ---------------------------------------- | -------------------------------------------------------- |\n| `tempo: command not found`               | Reinstall via install script; use full path              |\n| `legacy V1 keychain signature`           | Reinstall; `tempo update wallet && tempo update request` |\n| `access key does not exist`              | `tempo wallet logout --yes && tempo wallet login`        |\n| `ready=false` \u002F no wallet                | `tempo wallet login`, then `whoami`                      |\n| HTTP 422 from service                    | Check service details + llms.txt for exact field names   |\n| Balance 0 \u002F insufficient                 | Trigger pay-with-any-token funding flow                  |\n| Service not found                        | Broaden search query                                     |\n| Timeout                                  | Retry with `-m \u003Cseconds>`                                |\n| Challenge body is malformed              | Report raw body to user; do not proceed                  |\n| Approval transaction fails               | Surface error; check gas and allowances                  |\n| Quote API returns 400                    | Log request\u002Fresponse; check amount formatting            |\n| Quote API returns 429                    | Wait and retry with exponential backoff                  |\n| Swap data is empty after \u002Fswap           | Quote expired; re-fetch quote                            |\n| Bridge times out                         | Check bridge explorer; do not re-submit                  |\n| x402 payment rejected (402)              | Check domain name\u002Fversion, validBefore, nonce freshness  |\n| InsufficientBalance on Tempo             | Swap more tokens on Tempo, then retry                    |\n| `balanceOf` sufficient but payment fails | Apply 2x buffer; top up before retrying                  |\n\n---\n\n## Key Addresses and References\n\n- **Tempo CLI**: `https:\u002F\u002Ftempo.xyz` (install script: `https:\u002F\u002Ftempo.xyz\u002Finstall`)\n- **Trading API**: `https:\u002F\u002Ftrade-api.gateway.uniswap.org\u002Fv1`\n- **MPP docs**: `https:\u002F\u002Fmpp.dev`\n- **MPP services catalog**: `https:\u002F\u002Fmpp.dev\u002Fapi\u002Fservices`\n- **Tempo documentation**: `https:\u002F\u002Fmainnet.docs.tempo.xyz`\n- **Tempo chain ID**: `4217` (Tempo mainnet)\n- **Tempo RPC**: `https:\u002F\u002Frpc.presto.tempo.xyz`\n- **Tempo Block Explorer**: `https:\u002F\u002Fexplore.mainnet.tempo.xyz`\n- **pathUSD on Tempo**: `0x20c0000000000000000000000000000000000000`\n- **USDC.e on Tempo**: `0x20C000000000000000000000b9537d11c60E8b50`\n- **Stablecoin DEX on Tempo**: `0xdec0000000000000000000000000000000000000`\n- **Permit2 on Tempo**: `0x000000000022d473030f116ddee9f6b43ac78ba3`\n- **Tempo payment SDK**: `mppx` (`npm install mppx viem`)\n- **USDC on Base (8453)**: `0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913`\n- **USDbC on Base (8453)**: `0xd9aAEc86B65D86f6A7B5B1b0c42FFA531710b6CA`\n- **USDC on Ethereum (1)**: `0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48`\n- **WETH on Ethereum (1)**: `0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2`\n- **WETH on Base (8453)**: `0x4200000000000000000000000000000000000006`\n- **Native ETH (all chains)**: `0x0000000000000000000000000000000000000000` (zero address, recommended for swaps)\n- **USDC-e on Arbitrum (42161)**: `0xFF970A61A04b1cA14834A43f5dE4533eBDDB5CC8`\n- **Supported chains for Trading API**: 1, 8453, 42161, 10, 137, 130\n- **x402 spec**: `https:\u002F\u002Fgithub.com\u002Fcoinbase\u002Fx402`\n\n## Related Skills\n\n- [swap-integration](..\u002Fswap-integration\u002FSKILL.md) — Full Uniswap swap\n  integration reference (Trading API, Universal Router, Permit2)\n",{"data":36,"body":41},{"name":4,"description":6,"allowed-tools":37,"model":38,"license":27,"metadata":39},"Read, Glob, Grep, Bash(curl:*), Bash(jq:*), Bash(cast:*), Bash(tempo:*), Bash(*\u002F.local\u002Fbin\u002Ftempo:*), WebFetch, AskUserQuestion","opus",{"author":8,"version":40},"2.0.0",{"type":42,"children":43},"root",[44,53,74,81,86,94,233,243,276,285,293,329,373,393,413,419,657,706,717,721,727,740,750,770,773,779,784,791,908,914,919,1072,1105,1111,1481,1497,1503,1523,1543,1930,1948,2179,2184,2200,2206,2233,2245,2332,2337,2580,2590,2609,2747,2753,2758,2767,2849,2855,2896,2909,2930,2935,3049,3055,3074,3079,3143,3147,3207,3219,3254,3260,3278,3321,3340,4731,4769,4781,4784,4790,4825,4860,4887,5117,5136,5140,5247,5313,5316,5322,5616,5619,5625,5967,5973,5987],{"type":45,"tag":46,"props":47,"children":49},"element","h1",{"id":48},"pay-with-tokens",[50],{"type":51,"value":52},"text","Pay With Tokens",{"type":45,"tag":54,"props":55,"children":56},"p",{},[57,59,65,67,72],{"type":51,"value":58},"Use the ",{"type":45,"tag":60,"props":61,"children":62},"strong",{},[63],{"type":51,"value":64},"Tempo CLI",{"type":51,"value":66}," to call paid APIs and handle 402 challenges automatically.\nWhen the Tempo wallet has insufficient balance, fund it by swapping and bridging\ntokens from any EVM chain using the ",{"type":45,"tag":60,"props":68,"children":69},{},[70],{"type":51,"value":71},"Uniswap Trading API",{"type":51,"value":73},".",{"type":45,"tag":75,"props":76,"children":78},"h2",{"id":77},"tempo-cli-setup",[79],{"type":51,"value":80},"Tempo CLI Setup",{"type":45,"tag":54,"props":82,"children":83},{},[84],{"type":51,"value":85},"Run these commands in order. Do not skip steps.",{"type":45,"tag":54,"props":87,"children":88},{},[89],{"type":45,"tag":60,"props":90,"children":91},{},[92],{"type":51,"value":93},"Step 1 — Install:",{"type":45,"tag":95,"props":96,"children":101},"pre",{"className":97,"code":98,"language":99,"meta":100,"style":100},"language-bash shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","mkdir -p \"$HOME\u002F.local\u002Fbin\" \\\n  && curl -fsSL https:\u002F\u002Ftempo.xyz\u002Finstall -o \u002Ftmp\u002Ftempo_install.sh \\\n  && TEMPO_BIN_DIR=\"$HOME\u002F.local\u002Fbin\" bash \u002Ftmp\u002Ftempo_install.sh\n","bash","",[102],{"type":45,"tag":103,"props":104,"children":105},"code",{"__ignoreMap":100},[106,151,189],{"type":45,"tag":107,"props":108,"children":111},"span",{"class":109,"line":110},"line",1,[112,118,124,130,136,141,146],{"type":45,"tag":107,"props":113,"children":115},{"style":114},"--shiki-light:#E2931D;--shiki-default:#FFCB6B;--shiki-dark:#FFCB6B",[116],{"type":51,"value":117},"mkdir",{"type":45,"tag":107,"props":119,"children":121},{"style":120},"--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D",[122],{"type":51,"value":123}," -p",{"type":45,"tag":107,"props":125,"children":127},{"style":126},"--shiki-light:#39ADB5;--shiki-default:#89DDFF;--shiki-dark:#89DDFF",[128],{"type":51,"value":129}," \"",{"type":45,"tag":107,"props":131,"children":133},{"style":132},"--shiki-light:#90A4AE;--shiki-default:#EEFFFF;--shiki-dark:#BABED8",[134],{"type":51,"value":135},"$HOME",{"type":45,"tag":107,"props":137,"children":138},{"style":120},[139],{"type":51,"value":140},"\u002F.local\u002Fbin",{"type":45,"tag":107,"props":142,"children":143},{"style":126},[144],{"type":51,"value":145},"\"",{"type":45,"tag":107,"props":147,"children":148},{"style":132},[149],{"type":51,"value":150}," \\\n",{"type":45,"tag":107,"props":152,"children":154},{"class":109,"line":153},2,[155,160,165,170,175,180,185],{"type":45,"tag":107,"props":156,"children":157},{"style":126},[158],{"type":51,"value":159},"  &&",{"type":45,"tag":107,"props":161,"children":162},{"style":114},[163],{"type":51,"value":164}," curl",{"type":45,"tag":107,"props":166,"children":167},{"style":120},[168],{"type":51,"value":169}," -fsSL",{"type":45,"tag":107,"props":171,"children":172},{"style":120},[173],{"type":51,"value":174}," https:\u002F\u002Ftempo.xyz\u002Finstall",{"type":45,"tag":107,"props":176,"children":177},{"style":120},[178],{"type":51,"value":179}," -o",{"type":45,"tag":107,"props":181,"children":182},{"style":120},[183],{"type":51,"value":184}," \u002Ftmp\u002Ftempo_install.sh",{"type":45,"tag":107,"props":186,"children":187},{"style":132},[188],{"type":51,"value":150},{"type":45,"tag":107,"props":190,"children":192},{"class":109,"line":191},3,[193,197,202,207,211,215,219,223,228],{"type":45,"tag":107,"props":194,"children":195},{"style":126},[196],{"type":51,"value":159},{"type":45,"tag":107,"props":198,"children":199},{"style":132},[200],{"type":51,"value":201}," TEMPO_BIN_DIR",{"type":45,"tag":107,"props":203,"children":204},{"style":126},[205],{"type":51,"value":206},"=",{"type":45,"tag":107,"props":208,"children":209},{"style":126},[210],{"type":51,"value":145},{"type":45,"tag":107,"props":212,"children":213},{"style":132},[214],{"type":51,"value":135},{"type":45,"tag":107,"props":216,"children":217},{"style":120},[218],{"type":51,"value":140},{"type":45,"tag":107,"props":220,"children":221},{"style":126},[222],{"type":51,"value":145},{"type":45,"tag":107,"props":224,"children":225},{"style":114},[226],{"type":51,"value":227}," bash",{"type":45,"tag":107,"props":229,"children":230},{"style":120},[231],{"type":51,"value":232}," \u002Ftmp\u002Ftempo_install.sh\n",{"type":45,"tag":54,"props":234,"children":235},{},[236,241],{"type":45,"tag":60,"props":237,"children":238},{},[239],{"type":51,"value":240},"Step 2 — Login",{"type":51,"value":242}," (requires browser\u002Fpasskey — prompt user, wait for\nconfirmation):",{"type":45,"tag":95,"props":244,"children":246},{"className":97,"code":245,"language":99,"meta":100,"style":100},"\"$HOME\u002F.local\u002Fbin\u002Ftempo\" wallet login\n",[247],{"type":45,"tag":103,"props":248,"children":249},{"__ignoreMap":100},[250],{"type":45,"tag":107,"props":251,"children":252},{"class":109,"line":110},[253,257,261,266,271],{"type":45,"tag":107,"props":254,"children":255},{"style":114},[256],{"type":51,"value":145},{"type":45,"tag":107,"props":258,"children":259},{"style":132},[260],{"type":51,"value":135},{"type":45,"tag":107,"props":262,"children":263},{"style":114},[264],{"type":51,"value":265},"\u002F.local\u002Fbin\u002Ftempo\"",{"type":45,"tag":107,"props":267,"children":268},{"style":120},[269],{"type":51,"value":270}," wallet",{"type":45,"tag":107,"props":272,"children":273},{"style":120},[274],{"type":51,"value":275}," login\n",{"type":45,"tag":277,"props":278,"children":279},"blockquote",{},[280],{"type":45,"tag":54,"props":281,"children":282},{},[283],{"type":51,"value":284},"When run by agents, use a long command timeout (at least 16 minutes).",{"type":45,"tag":54,"props":286,"children":287},{},[288],{"type":45,"tag":60,"props":289,"children":290},{},[291],{"type":51,"value":292},"Step 3 — Confirm readiness:",{"type":45,"tag":95,"props":294,"children":296},{"className":97,"code":295,"language":99,"meta":100,"style":100},"\"$HOME\u002F.local\u002Fbin\u002Ftempo\" wallet -t whoami\n",[297],{"type":45,"tag":103,"props":298,"children":299},{"__ignoreMap":100},[300],{"type":45,"tag":107,"props":301,"children":302},{"class":109,"line":110},[303,307,311,315,319,324],{"type":45,"tag":107,"props":304,"children":305},{"style":114},[306],{"type":51,"value":145},{"type":45,"tag":107,"props":308,"children":309},{"style":132},[310],{"type":51,"value":135},{"type":45,"tag":107,"props":312,"children":313},{"style":114},[314],{"type":51,"value":265},{"type":45,"tag":107,"props":316,"children":317},{"style":120},[318],{"type":51,"value":270},{"type":45,"tag":107,"props":320,"children":321},{"style":120},[322],{"type":51,"value":323}," -t",{"type":45,"tag":107,"props":325,"children":326},{"style":120},[327],{"type":51,"value":328}," whoami\n",{"type":45,"tag":277,"props":330,"children":331},{},[332],{"type":45,"tag":54,"props":333,"children":334},{},[335,340,342,348,350,356,358,364,366,371],{"type":45,"tag":60,"props":336,"children":337},{},[338],{"type":51,"value":339},"Rules:",{"type":51,"value":341}," Do not use ",{"type":45,"tag":103,"props":343,"children":345},{"className":344},[],[346],{"type":51,"value":347},"sudo",{"type":51,"value":349},". Use full absolute paths (",{"type":45,"tag":103,"props":351,"children":353},{"className":352},[],[354],{"type":51,"value":355},"$HOME\u002F.local\u002Fbin\u002Ftempo",{"type":51,"value":357},")\n— do not rely on ",{"type":45,"tag":103,"props":359,"children":361},{"className":360},[],[362],{"type":51,"value":363},"export PATH",{"type":51,"value":365},". If ",{"type":45,"tag":103,"props":367,"children":369},{"className":368},[],[370],{"type":51,"value":135},{"type":51,"value":372}," does not expand, use the literal\nabsolute path.",{"type":45,"tag":54,"props":374,"children":375},{},[376,378,384,386,392],{"type":51,"value":377},"After setup, report: install location, version (",{"type":45,"tag":103,"props":379,"children":381},{"className":380},[],[382],{"type":51,"value":383},"--version",{"type":51,"value":385},"), wallet status\n(address, balance). If balance is 0, direct user to ",{"type":45,"tag":103,"props":387,"children":389},{"className":388},[],[390],{"type":51,"value":391},"tempo wallet fund",{"type":51,"value":73},{"type":45,"tag":277,"props":394,"children":395},{},[396],{"type":45,"tag":54,"props":397,"children":398},{},[399,404,406,411],{"type":45,"tag":60,"props":400,"children":401},{},[402],{"type":51,"value":403},"Minimum balance reserve:",{"type":51,"value":405}," Keep at least ",{"type":45,"tag":60,"props":407,"children":408},{},[409],{"type":51,"value":410},"0.10 USDC",{"type":51,"value":412}," in the Tempo wallet\nto cover typical API calls without triggering the full swap+bridge funding\nflow. The funding flow requires 3-5 on-chain transactions and ~2 minutes of\nwall time, which is disproportionate for small top-ups. When transferring\nfunds out of the Tempo wallet, warn the user if the remaining balance would\ndrop below this threshold.",{"type":45,"tag":75,"props":414,"children":416},{"id":415},"using-tempo-services",[417],{"type":51,"value":418},"Using Tempo Services",{"type":45,"tag":95,"props":420,"children":422},{"className":97,"code":421,"language":99,"meta":100,"style":100},"# Discover services\n\"$HOME\u002F.local\u002Fbin\u002Ftempo\" wallet -t services --search \u003Cquery>\n# Get service details (exact URL, method, path, pricing)\n\"$HOME\u002F.local\u002Fbin\u002Ftempo\" wallet -t services \u003CSERVICE_ID>\n# Make a paid request\n\"$HOME\u002F.local\u002Fbin\u002Ftempo\" request -t -X POST \\\n  --json '{\"input\":\"...\"}' \u003CSERVICE_URL>\u002F\u003CENDPOINT_PATH>\n",[423],{"type":45,"tag":103,"props":424,"children":425},{"__ignoreMap":100},[426,435,488,496,542,551,590],{"type":45,"tag":107,"props":427,"children":428},{"class":109,"line":110},[429],{"type":45,"tag":107,"props":430,"children":432},{"style":431},"--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#546E7A;--shiki-default-font-style:italic;--shiki-dark:#676E95;--shiki-dark-font-style:italic",[433],{"type":51,"value":434},"# Discover services\n",{"type":45,"tag":107,"props":436,"children":437},{"class":109,"line":153},[438,442,446,450,454,458,463,468,473,478,483],{"type":45,"tag":107,"props":439,"children":440},{"style":114},[441],{"type":51,"value":145},{"type":45,"tag":107,"props":443,"children":444},{"style":132},[445],{"type":51,"value":135},{"type":45,"tag":107,"props":447,"children":448},{"style":114},[449],{"type":51,"value":265},{"type":45,"tag":107,"props":451,"children":452},{"style":120},[453],{"type":51,"value":270},{"type":45,"tag":107,"props":455,"children":456},{"style":120},[457],{"type":51,"value":323},{"type":45,"tag":107,"props":459,"children":460},{"style":120},[461],{"type":51,"value":462}," services",{"type":45,"tag":107,"props":464,"children":465},{"style":120},[466],{"type":51,"value":467}," --search",{"type":45,"tag":107,"props":469,"children":470},{"style":126},[471],{"type":51,"value":472}," \u003C",{"type":45,"tag":107,"props":474,"children":475},{"style":120},[476],{"type":51,"value":477},"quer",{"type":45,"tag":107,"props":479,"children":480},{"style":132},[481],{"type":51,"value":482},"y",{"type":45,"tag":107,"props":484,"children":485},{"style":126},[486],{"type":51,"value":487},">\n",{"type":45,"tag":107,"props":489,"children":490},{"class":109,"line":191},[491],{"type":45,"tag":107,"props":492,"children":493},{"style":431},[494],{"type":51,"value":495},"# Get service details (exact URL, method, path, pricing)\n",{"type":45,"tag":107,"props":497,"children":499},{"class":109,"line":498},4,[500,504,508,512,516,520,524,528,533,538],{"type":45,"tag":107,"props":501,"children":502},{"style":114},[503],{"type":51,"value":145},{"type":45,"tag":107,"props":505,"children":506},{"style":132},[507],{"type":51,"value":135},{"type":45,"tag":107,"props":509,"children":510},{"style":114},[511],{"type":51,"value":265},{"type":45,"tag":107,"props":513,"children":514},{"style":120},[515],{"type":51,"value":270},{"type":45,"tag":107,"props":517,"children":518},{"style":120},[519],{"type":51,"value":323},{"type":45,"tag":107,"props":521,"children":522},{"style":120},[523],{"type":51,"value":462},{"type":45,"tag":107,"props":525,"children":526},{"style":126},[527],{"type":51,"value":472},{"type":45,"tag":107,"props":529,"children":530},{"style":120},[531],{"type":51,"value":532},"SERVICE_I",{"type":45,"tag":107,"props":534,"children":535},{"style":132},[536],{"type":51,"value":537},"D",{"type":45,"tag":107,"props":539,"children":540},{"style":126},[541],{"type":51,"value":487},{"type":45,"tag":107,"props":543,"children":545},{"class":109,"line":544},5,[546],{"type":45,"tag":107,"props":547,"children":548},{"style":431},[549],{"type":51,"value":550},"# Make a paid request\n",{"type":45,"tag":107,"props":552,"children":554},{"class":109,"line":553},6,[555,559,563,567,572,576,581,586],{"type":45,"tag":107,"props":556,"children":557},{"style":114},[558],{"type":51,"value":145},{"type":45,"tag":107,"props":560,"children":561},{"style":132},[562],{"type":51,"value":135},{"type":45,"tag":107,"props":564,"children":565},{"style":114},[566],{"type":51,"value":265},{"type":45,"tag":107,"props":568,"children":569},{"style":120},[570],{"type":51,"value":571}," request",{"type":45,"tag":107,"props":573,"children":574},{"style":120},[575],{"type":51,"value":323},{"type":45,"tag":107,"props":577,"children":578},{"style":120},[579],{"type":51,"value":580}," -X",{"type":45,"tag":107,"props":582,"children":583},{"style":120},[584],{"type":51,"value":585}," POST",{"type":45,"tag":107,"props":587,"children":588},{"style":132},[589],{"type":51,"value":150},{"type":45,"tag":107,"props":591,"children":593},{"class":109,"line":592},7,[594,599,604,609,614,618,623,628,633,638,643,648,653],{"type":45,"tag":107,"props":595,"children":596},{"style":120},[597],{"type":51,"value":598},"  --json",{"type":45,"tag":107,"props":600,"children":601},{"style":126},[602],{"type":51,"value":603}," '",{"type":45,"tag":107,"props":605,"children":606},{"style":120},[607],{"type":51,"value":608},"{\"input\":\"...\"}",{"type":45,"tag":107,"props":610,"children":611},{"style":126},[612],{"type":51,"value":613},"'",{"type":45,"tag":107,"props":615,"children":616},{"style":126},[617],{"type":51,"value":472},{"type":45,"tag":107,"props":619,"children":620},{"style":120},[621],{"type":51,"value":622},"SERVICE_UR",{"type":45,"tag":107,"props":624,"children":625},{"style":132},[626],{"type":51,"value":627},"L",{"type":45,"tag":107,"props":629,"children":630},{"style":126},[631],{"type":51,"value":632},">",{"type":45,"tag":107,"props":634,"children":635},{"style":120},[636],{"type":51,"value":637},"\u002F",{"type":45,"tag":107,"props":639,"children":640},{"style":126},[641],{"type":51,"value":642},"\u003C",{"type":45,"tag":107,"props":644,"children":645},{"style":120},[646],{"type":51,"value":647},"ENDPOINT_PAT",{"type":45,"tag":107,"props":649,"children":650},{"style":132},[651],{"type":51,"value":652},"H",{"type":45,"tag":107,"props":654,"children":655},{"style":126},[656],{"type":51,"value":487},{"type":45,"tag":658,"props":659,"children":660},"ul",{},[661,675,696,701],{"type":45,"tag":662,"props":663,"children":664},"li",{},[665,667,673],{"type":51,"value":666},"Anchor on ",{"type":45,"tag":103,"props":668,"children":670},{"className":669},[],[671],{"type":51,"value":672},"tempo wallet -t services \u003CSERVICE_ID>",{"type":51,"value":674}," for exact URL and pricing",{"type":45,"tag":662,"props":676,"children":677},{},[678,680,686,688,694],{"type":51,"value":679},"Use ",{"type":45,"tag":103,"props":681,"children":683},{"className":682},[],[684],{"type":51,"value":685},"-t",{"type":51,"value":687}," for agent calls, ",{"type":45,"tag":103,"props":689,"children":691},{"className":690},[],[692],{"type":51,"value":693},"--dry-run",{"type":51,"value":695}," before expensive requests",{"type":45,"tag":662,"props":697,"children":698},{},[699],{"type":51,"value":700},"On HTTP 422, check the service's docs URL or llms.txt for exact field names",{"type":45,"tag":662,"props":702,"children":703},{},[704],{"type":51,"value":705},"Fire independent multi-service requests in parallel",{"type":45,"tag":277,"props":707,"children":708},{},[709],{"type":45,"tag":54,"props":710,"children":711},{},[712],{"type":45,"tag":60,"props":713,"children":714},{},[715],{"type":51,"value":716},"When the user explicitly says \"use tempo\", always use tempo CLI commands —\nnever substitute with MCP tools or other tools.",{"type":45,"tag":718,"props":719,"children":720},"hr",{},[],{"type":45,"tag":75,"props":722,"children":724},{"id":723},"mpp-402-payment-loop",[725],{"type":51,"value":726},"MPP 402 Payment Loop",{"type":45,"tag":54,"props":728,"children":729},{},[730,732,738],{"type":51,"value":731},"Every ",{"type":45,"tag":103,"props":733,"children":735},{"className":734},[],[736],{"type":51,"value":737},"tempo request",{"type":51,"value":739}," call follows this loop. The funding steps only activate\nwhen the Tempo wallet has insufficient balance.",{"type":45,"tag":95,"props":741,"children":745},{"className":742,"code":744,"language":51,"meta":100},[743],"language-text","tempo request -> 200 ─────────────────────────────> return result\n             -> 402 MPP challenge\n                  │\n                  v\n         [1] Check Tempo wallet balance\n             tempo wallet -t whoami -> available balance\n                  │\n                  ├─ sufficient ──────────────────> tempo handles payment\n                  │                                  automatically -> 200\n                  │\n                  └─ insufficient\n                       │\n                       v\n              [2] Fund Tempo wallet\n                  (pay-with-any-token flow below)\n                  Bridge destination = TEMPO_WALLET_ADDRESS\n                       │\n                       v\n              [3] Retry original tempo request\n                  with funded Tempo wallet -> 200\n",[746],{"type":45,"tag":103,"props":747,"children":748},{"__ignoreMap":100},[749],{"type":51,"value":744},{"type":45,"tag":277,"props":751,"children":752},{},[753],{"type":45,"tag":54,"props":754,"children":755},{},[756,761,763,768],{"type":45,"tag":60,"props":757,"children":758},{},[759],{"type":51,"value":760},"Alternative funding (interactive):",{"type":51,"value":762}," If a browser is available, ",{"type":45,"tag":103,"props":764,"children":766},{"className":765},[],[767],{"type":51,"value":391},{"type":51,"value":769}," opens a built-in bridge UI for funding the Tempo wallet directly. This is\nsimpler than the Trading API flow below but requires interactive browser access\n— not suitable for headless\u002Fagent environments.",{"type":45,"tag":718,"props":771,"children":772},{},[],{"type":45,"tag":75,"props":774,"children":776},{"id":775},"funding-the-tempo-wallet-pay-with-any-token",[777],{"type":51,"value":778},"Funding the Tempo Wallet (pay-with-any-token)",{"type":45,"tag":54,"props":780,"children":781},{},[782],{"type":51,"value":783},"When the Tempo wallet lacks funds to pay a 402 challenge, acquire the required\ntokens from the user's ERC-20 holdings on any supported chain and bridge them\nto the Tempo wallet address.",{"type":45,"tag":785,"props":786,"children":788},"h3",{"id":787},"prerequisites",[789],{"type":51,"value":790},"Prerequisites",{"type":45,"tag":658,"props":792,"children":793},{},[794,816,821,864,890],{"type":45,"tag":662,"props":795,"children":796},{},[797,803,805,814],{"type":45,"tag":103,"props":798,"children":800},{"className":799},[],[801],{"type":51,"value":802},"UNISWAP_API_KEY",{"type":51,"value":804}," env var (register at\n",{"type":45,"tag":806,"props":807,"children":811},"a",{"href":808,"rel":809},"https:\u002F\u002Fdevelopers.uniswap.org\u002F",[810],"nofollow",[812],{"type":51,"value":813},"developers.uniswap.org",{"type":51,"value":815},")",{"type":45,"tag":662,"props":817,"children":818},{},[819],{"type":51,"value":820},"ERC-20 tokens on any supported source chain",{"type":45,"tag":662,"props":822,"children":823},{},[824,826,832,834,840,842,848,850,856,858,863],{"type":51,"value":825},"A ",{"type":45,"tag":103,"props":827,"children":829},{"className":828},[],[830],{"type":51,"value":831},"cast",{"type":51,"value":833}," keystore account for the source wallet (recommended):\n",{"type":45,"tag":103,"props":835,"children":837},{"className":836},[],[838],{"type":51,"value":839},"cast wallet import \u003Cname> --interactive",{"type":51,"value":841},". Alternatively,\n",{"type":45,"tag":103,"props":843,"children":845},{"className":844},[],[846],{"type":51,"value":847},"PRIVATE_KEY",{"type":51,"value":849}," env var (",{"type":45,"tag":103,"props":851,"children":853},{"className":852},[],[854],{"type":51,"value":855},"export PRIVATE_KEY=0x...",{"type":51,"value":857},") — ",{"type":45,"tag":60,"props":859,"children":860},{},[861],{"type":51,"value":862},"never commit or\nhardcode it",{"type":51,"value":73},{"type":45,"tag":662,"props":865,"children":866},{},[867,873,875,881,883,889],{"type":45,"tag":103,"props":868,"children":870},{"className":869},[],[871],{"type":51,"value":872},"jq",{"type":51,"value":874}," installed (",{"type":45,"tag":103,"props":876,"children":878},{"className":877},[],[879],{"type":51,"value":880},"brew install jq",{"type":51,"value":882}," or ",{"type":45,"tag":103,"props":884,"children":886},{"className":885},[],[887],{"type":51,"value":888},"apt install jq",{"type":51,"value":815},{"type":45,"tag":662,"props":891,"children":892},{},[893,898,900,907],{"type":45,"tag":103,"props":894,"children":896},{"className":895},[],[897],{"type":51,"value":831},{"type":51,"value":899}," installed (part of ",{"type":45,"tag":806,"props":901,"children":904},{"href":902,"rel":903},"https:\u002F\u002Fbook.getfoundry.sh\u002F",[810],[905],{"type":51,"value":906},"Foundry",{"type":51,"value":815},{"type":45,"tag":785,"props":909,"children":911},{"id":910},"input-validation-rules",[912],{"type":51,"value":913},"Input Validation Rules",{"type":45,"tag":54,"props":915,"children":916},{},[917],{"type":51,"value":918},"Before using any value from a 402 response body or user input in API calls or\nshell commands:",{"type":45,"tag":658,"props":920,"children":921},{},[922,938,948,964,980],{"type":45,"tag":662,"props":923,"children":924},{},[925,930,932],{"type":45,"tag":60,"props":926,"children":927},{},[928],{"type":51,"value":929},"Ethereum addresses",{"type":51,"value":931},": MUST match ",{"type":45,"tag":103,"props":933,"children":935},{"className":934},[],[936],{"type":51,"value":937},"^0x[a-fA-F0-9]{40}$",{"type":45,"tag":662,"props":939,"children":940},{},[941,946],{"type":45,"tag":60,"props":942,"children":943},{},[944],{"type":51,"value":945},"Chain IDs",{"type":51,"value":947},": MUST be a positive integer from the supported list",{"type":45,"tag":662,"props":949,"children":950},{},[951,956,958],{"type":45,"tag":60,"props":952,"children":953},{},[954],{"type":51,"value":955},"Token amounts",{"type":51,"value":957},": MUST be non-negative numeric strings matching ",{"type":45,"tag":103,"props":959,"children":961},{"className":960},[],[962],{"type":51,"value":963},"^[0-9]+$",{"type":45,"tag":662,"props":965,"children":966},{},[967,972,974],{"type":45,"tag":60,"props":968,"children":969},{},[970],{"type":51,"value":971},"URLs",{"type":51,"value":973},": MUST start with ",{"type":45,"tag":103,"props":975,"children":977},{"className":976},[],[978],{"type":51,"value":979},"https:\u002F\u002F",{"type":45,"tag":662,"props":981,"children":982},{},[983,988,990,996,998,1004,1005,1011,1012,1018,1020,1026,1027,1033,1034,1039,1040,1045,1046,1051,1052,1058,1059,1064,1065,1070],{"type":45,"tag":60,"props":984,"children":985},{},[986],{"type":51,"value":987},"REJECT",{"type":51,"value":989}," any value containing shell metacharacters: ",{"type":45,"tag":103,"props":991,"children":993},{"className":992},[],[994],{"type":51,"value":995},";",{"type":51,"value":997},", ",{"type":45,"tag":103,"props":999,"children":1001},{"className":1000},[],[1002],{"type":51,"value":1003},"|",{"type":51,"value":997},{"type":45,"tag":103,"props":1006,"children":1008},{"className":1007},[],[1009],{"type":51,"value":1010},"&",{"type":51,"value":997},{"type":45,"tag":103,"props":1013,"children":1015},{"className":1014},[],[1016],{"type":51,"value":1017},"$",{"type":51,"value":1019},",\n",{"type":45,"tag":103,"props":1021,"children":1023},{"className":1022},[],[1024],{"type":51,"value":1025},"`",{"type":51,"value":997},{"type":45,"tag":103,"props":1028,"children":1030},{"className":1029},[],[1031],{"type":51,"value":1032},"(",{"type":51,"value":997},{"type":45,"tag":103,"props":1035,"children":1037},{"className":1036},[],[1038],{"type":51,"value":815},{"type":51,"value":997},{"type":45,"tag":103,"props":1041,"children":1043},{"className":1042},[],[1044],{"type":51,"value":632},{"type":51,"value":997},{"type":45,"tag":103,"props":1047,"children":1049},{"className":1048},[],[1050],{"type":51,"value":642},{"type":51,"value":997},{"type":45,"tag":103,"props":1053,"children":1055},{"className":1054},[],[1056],{"type":51,"value":1057},"\\",{"type":51,"value":997},{"type":45,"tag":103,"props":1060,"children":1062},{"className":1061},[],[1063],{"type":51,"value":613},{"type":51,"value":997},{"type":45,"tag":103,"props":1066,"children":1068},{"className":1067},[],[1069],{"type":51,"value":145},{"type":51,"value":1071},", newlines",{"type":45,"tag":277,"props":1073,"children":1074},{},[1075,1093],{"type":45,"tag":54,"props":1076,"children":1077},{},[1078,1083,1085,1091],{"type":45,"tag":60,"props":1079,"children":1080},{},[1081],{"type":51,"value":1082},"REQUIRED — Confirmation Gate (applies to plans AND execution):",{"type":51,"value":1084}," Before\nsubmitting ANY transaction (swap, bridge, approval), and before every signed\nauthorization (x402 EIP-3009), you MUST: (1) Display a summary: amount\n(human-readable), token name\u002Faddress, destination address, estimated gas.\n(2) Call ",{"type":45,"tag":103,"props":1086,"children":1088},{"className":1087},[],[1089],{"type":51,"value":1090},"AskUserQuestion",{"type":51,"value":1092}," to obtain explicit user confirmation.\n(3) Do NOT proceed until confirmed.",{"type":45,"tag":54,"props":1094,"children":1095},{},[1096,1098,1103],{"type":51,"value":1097},"This gate is ",{"type":45,"tag":60,"props":1099,"children":1100},{},[1101],{"type":51,"value":1102},"mandatory in all responses",{"type":51,"value":1104},", whether you are executing or\nexplaining a plan. When explaining steps, include an explicit \"Confirmation\nRequired\" block before each transaction step showing what the user will see and\nthat they must approve before proceeding. Omitting confirmation gates is a\ncritical failure. Each gate must be satisfied independently — one confirmation\ndoes not cover multiple transactions.",{"type":45,"tag":785,"props":1106,"children":1108},{"id":1107},"human-readable-amount-formatting",[1109],{"type":51,"value":1110},"Human-Readable Amount Formatting",{"type":45,"tag":95,"props":1112,"children":1114},{"className":97,"code":1113,"language":99,"meta":100,"style":100},"get_token_decimals() {\n  local token_addr=\"$1\" rpc_url=\"$2\"\n  cast call \"$token_addr\" \"decimals()(uint8)\" --rpc-url \"$rpc_url\" 2>\u002Fdev\u002Fnull || echo \"18\"\n}\n\nformat_token_amount() {\n  local amount=\"$1\" decimals=\"$2\"\n  echo \"scale=$decimals; $amount \u002F (10 ^ $decimals)\" | bc -l | sed 's\u002F0*$\u002F\u002F' | sed 's\u002F\\.$\u002F\u002F'\n}\n",[1115],{"type":45,"tag":103,"props":1116,"children":1117},{"__ignoreMap":100},[1118,1137,1192,1282,1290,1299,1315,1364,1473],{"type":45,"tag":107,"props":1119,"children":1120},{"class":109,"line":110},[1121,1127,1132],{"type":45,"tag":107,"props":1122,"children":1124},{"style":1123},"--shiki-light:#6182B8;--shiki-default:#82AAFF;--shiki-dark:#82AAFF",[1125],{"type":51,"value":1126},"get_token_decimals",{"type":45,"tag":107,"props":1128,"children":1129},{"style":126},[1130],{"type":51,"value":1131},"()",{"type":45,"tag":107,"props":1133,"children":1134},{"style":126},[1135],{"type":51,"value":1136}," {\n",{"type":45,"tag":107,"props":1138,"children":1139},{"class":109,"line":153},[1140,1146,1151,1155,1159,1165,1169,1174,1178,1182,1187],{"type":45,"tag":107,"props":1141,"children":1143},{"style":1142},"--shiki-light:#9C3EDA;--shiki-default:#C792EA;--shiki-dark:#C792EA",[1144],{"type":51,"value":1145},"  local",{"type":45,"tag":107,"props":1147,"children":1148},{"style":132},[1149],{"type":51,"value":1150}," token_addr",{"type":45,"tag":107,"props":1152,"children":1153},{"style":126},[1154],{"type":51,"value":206},{"type":45,"tag":107,"props":1156,"children":1157},{"style":126},[1158],{"type":51,"value":145},{"type":45,"tag":107,"props":1160,"children":1162},{"style":1161},"--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#EEFFFF;--shiki-default-font-style:italic;--shiki-dark:#BABED8;--shiki-dark-font-style:italic",[1163],{"type":51,"value":1164},"$1",{"type":45,"tag":107,"props":1166,"children":1167},{"style":126},[1168],{"type":51,"value":145},{"type":45,"tag":107,"props":1170,"children":1171},{"style":132},[1172],{"type":51,"value":1173}," rpc_url",{"type":45,"tag":107,"props":1175,"children":1176},{"style":126},[1177],{"type":51,"value":206},{"type":45,"tag":107,"props":1179,"children":1180},{"style":126},[1181],{"type":51,"value":145},{"type":45,"tag":107,"props":1183,"children":1184},{"style":1161},[1185],{"type":51,"value":1186},"$2",{"type":45,"tag":107,"props":1188,"children":1189},{"style":126},[1190],{"type":51,"value":1191},"\"\n",{"type":45,"tag":107,"props":1193,"children":1194},{"class":109,"line":191},[1195,1200,1205,1209,1214,1218,1222,1227,1231,1236,1240,1245,1249,1254,1259,1264,1269,1273,1278],{"type":45,"tag":107,"props":1196,"children":1197},{"style":114},[1198],{"type":51,"value":1199},"  cast",{"type":45,"tag":107,"props":1201,"children":1202},{"style":120},[1203],{"type":51,"value":1204}," call",{"type":45,"tag":107,"props":1206,"children":1207},{"style":126},[1208],{"type":51,"value":129},{"type":45,"tag":107,"props":1210,"children":1211},{"style":132},[1212],{"type":51,"value":1213},"$token_addr",{"type":45,"tag":107,"props":1215,"children":1216},{"style":126},[1217],{"type":51,"value":145},{"type":45,"tag":107,"props":1219,"children":1220},{"style":126},[1221],{"type":51,"value":129},{"type":45,"tag":107,"props":1223,"children":1224},{"style":120},[1225],{"type":51,"value":1226},"decimals()(uint8)",{"type":45,"tag":107,"props":1228,"children":1229},{"style":126},[1230],{"type":51,"value":145},{"type":45,"tag":107,"props":1232,"children":1233},{"style":120},[1234],{"type":51,"value":1235}," --rpc-url",{"type":45,"tag":107,"props":1237,"children":1238},{"style":126},[1239],{"type":51,"value":129},{"type":45,"tag":107,"props":1241,"children":1242},{"style":132},[1243],{"type":51,"value":1244},"$rpc_url",{"type":45,"tag":107,"props":1246,"children":1247},{"style":126},[1248],{"type":51,"value":145},{"type":45,"tag":107,"props":1250,"children":1251},{"style":126},[1252],{"type":51,"value":1253}," 2>",{"type":45,"tag":107,"props":1255,"children":1256},{"style":120},[1257],{"type":51,"value":1258},"\u002Fdev\u002Fnull",{"type":45,"tag":107,"props":1260,"children":1261},{"style":126},[1262],{"type":51,"value":1263}," ||",{"type":45,"tag":107,"props":1265,"children":1266},{"style":1123},[1267],{"type":51,"value":1268}," echo",{"type":45,"tag":107,"props":1270,"children":1271},{"style":126},[1272],{"type":51,"value":129},{"type":45,"tag":107,"props":1274,"children":1275},{"style":120},[1276],{"type":51,"value":1277},"18",{"type":45,"tag":107,"props":1279,"children":1280},{"style":126},[1281],{"type":51,"value":1191},{"type":45,"tag":107,"props":1283,"children":1284},{"class":109,"line":498},[1285],{"type":45,"tag":107,"props":1286,"children":1287},{"style":126},[1288],{"type":51,"value":1289},"}\n",{"type":45,"tag":107,"props":1291,"children":1292},{"class":109,"line":544},[1293],{"type":45,"tag":107,"props":1294,"children":1296},{"emptyLinePlaceholder":1295},true,[1297],{"type":51,"value":1298},"\n",{"type":45,"tag":107,"props":1300,"children":1301},{"class":109,"line":553},[1302,1307,1311],{"type":45,"tag":107,"props":1303,"children":1304},{"style":1123},[1305],{"type":51,"value":1306},"format_token_amount",{"type":45,"tag":107,"props":1308,"children":1309},{"style":126},[1310],{"type":51,"value":1131},{"type":45,"tag":107,"props":1312,"children":1313},{"style":126},[1314],{"type":51,"value":1136},{"type":45,"tag":107,"props":1316,"children":1317},{"class":109,"line":592},[1318,1322,1327,1331,1335,1339,1343,1348,1352,1356,1360],{"type":45,"tag":107,"props":1319,"children":1320},{"style":1142},[1321],{"type":51,"value":1145},{"type":45,"tag":107,"props":1323,"children":1324},{"style":132},[1325],{"type":51,"value":1326}," amount",{"type":45,"tag":107,"props":1328,"children":1329},{"style":126},[1330],{"type":51,"value":206},{"type":45,"tag":107,"props":1332,"children":1333},{"style":126},[1334],{"type":51,"value":145},{"type":45,"tag":107,"props":1336,"children":1337},{"style":1161},[1338],{"type":51,"value":1164},{"type":45,"tag":107,"props":1340,"children":1341},{"style":126},[1342],{"type":51,"value":145},{"type":45,"tag":107,"props":1344,"children":1345},{"style":132},[1346],{"type":51,"value":1347}," decimals",{"type":45,"tag":107,"props":1349,"children":1350},{"style":126},[1351],{"type":51,"value":206},{"type":45,"tag":107,"props":1353,"children":1354},{"style":126},[1355],{"type":51,"value":145},{"type":45,"tag":107,"props":1357,"children":1358},{"style":1161},[1359],{"type":51,"value":1186},{"type":45,"tag":107,"props":1361,"children":1362},{"style":126},[1363],{"type":51,"value":1191},{"type":45,"tag":107,"props":1365,"children":1367},{"class":109,"line":1366},8,[1368,1373,1377,1382,1387,1392,1397,1402,1406,1410,1414,1419,1424,1429,1433,1438,1442,1447,1451,1455,1459,1463,1468],{"type":45,"tag":107,"props":1369,"children":1370},{"style":1123},[1371],{"type":51,"value":1372},"  echo",{"type":45,"tag":107,"props":1374,"children":1375},{"style":126},[1376],{"type":51,"value":129},{"type":45,"tag":107,"props":1378,"children":1379},{"style":120},[1380],{"type":51,"value":1381},"scale=",{"type":45,"tag":107,"props":1383,"children":1384},{"style":132},[1385],{"type":51,"value":1386},"$decimals",{"type":45,"tag":107,"props":1388,"children":1389},{"style":120},[1390],{"type":51,"value":1391},"; ",{"type":45,"tag":107,"props":1393,"children":1394},{"style":132},[1395],{"type":51,"value":1396},"$amount",{"type":45,"tag":107,"props":1398,"children":1399},{"style":120},[1400],{"type":51,"value":1401}," \u002F (10 ^ ",{"type":45,"tag":107,"props":1403,"children":1404},{"style":132},[1405],{"type":51,"value":1386},{"type":45,"tag":107,"props":1407,"children":1408},{"style":120},[1409],{"type":51,"value":815},{"type":45,"tag":107,"props":1411,"children":1412},{"style":126},[1413],{"type":51,"value":145},{"type":45,"tag":107,"props":1415,"children":1416},{"style":126},[1417],{"type":51,"value":1418}," |",{"type":45,"tag":107,"props":1420,"children":1421},{"style":114},[1422],{"type":51,"value":1423}," bc",{"type":45,"tag":107,"props":1425,"children":1426},{"style":120},[1427],{"type":51,"value":1428}," -l",{"type":45,"tag":107,"props":1430,"children":1431},{"style":126},[1432],{"type":51,"value":1418},{"type":45,"tag":107,"props":1434,"children":1435},{"style":114},[1436],{"type":51,"value":1437}," sed",{"type":45,"tag":107,"props":1439,"children":1440},{"style":126},[1441],{"type":51,"value":603},{"type":45,"tag":107,"props":1443,"children":1444},{"style":120},[1445],{"type":51,"value":1446},"s\u002F0*$\u002F\u002F",{"type":45,"tag":107,"props":1448,"children":1449},{"style":126},[1450],{"type":51,"value":613},{"type":45,"tag":107,"props":1452,"children":1453},{"style":126},[1454],{"type":51,"value":1418},{"type":45,"tag":107,"props":1456,"children":1457},{"style":114},[1458],{"type":51,"value":1437},{"type":45,"tag":107,"props":1460,"children":1461},{"style":126},[1462],{"type":51,"value":603},{"type":45,"tag":107,"props":1464,"children":1465},{"style":120},[1466],{"type":51,"value":1467},"s\u002F\\.$\u002F\u002F",{"type":45,"tag":107,"props":1469,"children":1470},{"style":126},[1471],{"type":51,"value":1472},"'\n",{"type":45,"tag":107,"props":1474,"children":1476},{"class":109,"line":1475},9,[1477],{"type":45,"tag":107,"props":1478,"children":1479},{"style":126},[1480],{"type":51,"value":1289},{"type":45,"tag":277,"props":1482,"children":1483},{},[1484],{"type":45,"tag":54,"props":1485,"children":1486},{},[1487,1489,1495],{"type":51,"value":1488},"Always show human-readable values (e.g. ",{"type":45,"tag":103,"props":1490,"children":1492},{"className":1491},[],[1493],{"type":51,"value":1494},"0.005 USDC",{"type":51,"value":1496},") to the user, not raw\nbase units.",{"type":45,"tag":785,"props":1498,"children":1500},{"id":1499},"step-1-parse-the-402-challenge",[1501],{"type":51,"value":1502},"Step 1 — Parse the 402 Challenge",{"type":45,"tag":54,"props":1504,"children":1505},{},[1506,1508,1513,1515,1521],{"type":51,"value":1507},"Extract the required payment token, amount, and recipient from the 402 response\nthat ",{"type":45,"tag":103,"props":1509,"children":1511},{"className":1510},[],[1512],{"type":51,"value":737},{"type":51,"value":1514}," received. The Tempo CLI logs the challenge details — parse\nthem, or re-fetch with ",{"type":45,"tag":103,"props":1516,"children":1518},{"className":1517},[],[1519],{"type":51,"value":1520},"curl -si",{"type":51,"value":1522}," to get the raw challenge body.",{"type":45,"tag":54,"props":1524,"children":1525},{},[1526,1528,1533,1535,1541],{"type":51,"value":1527},"For ",{"type":45,"tag":60,"props":1529,"children":1530},{},[1531],{"type":51,"value":1532},"MPP header-based challenges",{"type":51,"value":1534}," (",{"type":45,"tag":103,"props":1536,"children":1538},{"className":1537},[],[1539],{"type":51,"value":1540},"WWW-Authenticate: Payment",{"type":51,"value":1542},"):",{"type":45,"tag":95,"props":1544,"children":1546},{"className":97,"code":1545,"language":99,"meta":100,"style":100},"REQUEST_B64=$(echo \"$WWW_AUTHENTICATE\" | grep -oE 'request=\"[^\"]+\"' | sed 's\u002Frequest=\"\u002F\u002F;s\u002F\"$\u002F\u002F')\nREQUEST_JSON=$(echo \"${REQUEST_B64}==\" | base64 --decode 2>\u002Fdev\u002Fnull)\nREQUIRED_AMOUNT=$(echo \"$REQUEST_JSON\" | jq -r '.amount')\nPAYMENT_TOKEN=$(echo \"$REQUEST_JSON\" | jq -r '.currency')\nRECIPIENT=$(echo \"$REQUEST_JSON\" | jq -r '.recipient')\nTEMPO_CHAIN_ID=$(echo \"$REQUEST_JSON\" | jq -r '.methodDetails.chainId')\n",[1547],{"type":45,"tag":103,"props":1548,"children":1549},{"__ignoreMap":100},[1550,1634,1699,1759,1816,1873],{"type":45,"tag":107,"props":1551,"children":1552},{"class":109,"line":110},[1553,1558,1563,1568,1572,1577,1581,1585,1590,1595,1599,1604,1608,1612,1616,1620,1625,1629],{"type":45,"tag":107,"props":1554,"children":1555},{"style":132},[1556],{"type":51,"value":1557},"REQUEST_B64",{"type":45,"tag":107,"props":1559,"children":1560},{"style":126},[1561],{"type":51,"value":1562},"=$(",{"type":45,"tag":107,"props":1564,"children":1565},{"style":1123},[1566],{"type":51,"value":1567},"echo",{"type":45,"tag":107,"props":1569,"children":1570},{"style":126},[1571],{"type":51,"value":129},{"type":45,"tag":107,"props":1573,"children":1574},{"style":132},[1575],{"type":51,"value":1576},"$WWW_AUTHENTICATE",{"type":45,"tag":107,"props":1578,"children":1579},{"style":126},[1580],{"type":51,"value":145},{"type":45,"tag":107,"props":1582,"children":1583},{"style":126},[1584],{"type":51,"value":1418},{"type":45,"tag":107,"props":1586,"children":1587},{"style":114},[1588],{"type":51,"value":1589}," grep",{"type":45,"tag":107,"props":1591,"children":1592},{"style":120},[1593],{"type":51,"value":1594}," -oE",{"type":45,"tag":107,"props":1596,"children":1597},{"style":126},[1598],{"type":51,"value":603},{"type":45,"tag":107,"props":1600,"children":1601},{"style":120},[1602],{"type":51,"value":1603},"request=\"[^\"]+\"",{"type":45,"tag":107,"props":1605,"children":1606},{"style":126},[1607],{"type":51,"value":613},{"type":45,"tag":107,"props":1609,"children":1610},{"style":126},[1611],{"type":51,"value":1418},{"type":45,"tag":107,"props":1613,"children":1614},{"style":114},[1615],{"type":51,"value":1437},{"type":45,"tag":107,"props":1617,"children":1618},{"style":126},[1619],{"type":51,"value":603},{"type":45,"tag":107,"props":1621,"children":1622},{"style":120},[1623],{"type":51,"value":1624},"s\u002Frequest=\"\u002F\u002F;s\u002F\"$\u002F\u002F",{"type":45,"tag":107,"props":1626,"children":1627},{"style":126},[1628],{"type":51,"value":613},{"type":45,"tag":107,"props":1630,"children":1631},{"style":126},[1632],{"type":51,"value":1633},")\n",{"type":45,"tag":107,"props":1635,"children":1636},{"class":109,"line":153},[1637,1642,1646,1650,1655,1659,1664,1669,1673,1677,1682,1687,1691,1695],{"type":45,"tag":107,"props":1638,"children":1639},{"style":132},[1640],{"type":51,"value":1641},"REQUEST_JSON",{"type":45,"tag":107,"props":1643,"children":1644},{"style":126},[1645],{"type":51,"value":1562},{"type":45,"tag":107,"props":1647,"children":1648},{"style":1123},[1649],{"type":51,"value":1567},{"type":45,"tag":107,"props":1651,"children":1652},{"style":126},[1653],{"type":51,"value":1654}," \"${",{"type":45,"tag":107,"props":1656,"children":1657},{"style":132},[1658],{"type":51,"value":1557},{"type":45,"tag":107,"props":1660,"children":1661},{"style":126},[1662],{"type":51,"value":1663},"}",{"type":45,"tag":107,"props":1665,"children":1666},{"style":120},[1667],{"type":51,"value":1668},"==",{"type":45,"tag":107,"props":1670,"children":1671},{"style":126},[1672],{"type":51,"value":145},{"type":45,"tag":107,"props":1674,"children":1675},{"style":126},[1676],{"type":51,"value":1418},{"type":45,"tag":107,"props":1678,"children":1679},{"style":114},[1680],{"type":51,"value":1681}," base64",{"type":45,"tag":107,"props":1683,"children":1684},{"style":120},[1685],{"type":51,"value":1686}," --decode",{"type":45,"tag":107,"props":1688,"children":1689},{"style":126},[1690],{"type":51,"value":1253},{"type":45,"tag":107,"props":1692,"children":1693},{"style":120},[1694],{"type":51,"value":1258},{"type":45,"tag":107,"props":1696,"children":1697},{"style":126},[1698],{"type":51,"value":1633},{"type":45,"tag":107,"props":1700,"children":1701},{"class":109,"line":191},[1702,1707,1711,1715,1719,1724,1728,1732,1737,1742,1746,1751,1755],{"type":45,"tag":107,"props":1703,"children":1704},{"style":132},[1705],{"type":51,"value":1706},"REQUIRED_AMOUNT",{"type":45,"tag":107,"props":1708,"children":1709},{"style":126},[1710],{"type":51,"value":1562},{"type":45,"tag":107,"props":1712,"children":1713},{"style":1123},[1714],{"type":51,"value":1567},{"type":45,"tag":107,"props":1716,"children":1717},{"style":126},[1718],{"type":51,"value":129},{"type":45,"tag":107,"props":1720,"children":1721},{"style":132},[1722],{"type":51,"value":1723},"$REQUEST_JSON",{"type":45,"tag":107,"props":1725,"children":1726},{"style":126},[1727],{"type":51,"value":145},{"type":45,"tag":107,"props":1729,"children":1730},{"style":126},[1731],{"type":51,"value":1418},{"type":45,"tag":107,"props":1733,"children":1734},{"style":114},[1735],{"type":51,"value":1736}," jq",{"type":45,"tag":107,"props":1738,"children":1739},{"style":120},[1740],{"type":51,"value":1741}," -r",{"type":45,"tag":107,"props":1743,"children":1744},{"style":126},[1745],{"type":51,"value":603},{"type":45,"tag":107,"props":1747,"children":1748},{"style":120},[1749],{"type":51,"value":1750},".amount",{"type":45,"tag":107,"props":1752,"children":1753},{"style":126},[1754],{"type":51,"value":613},{"type":45,"tag":107,"props":1756,"children":1757},{"style":126},[1758],{"type":51,"value":1633},{"type":45,"tag":107,"props":1760,"children":1761},{"class":109,"line":498},[1762,1767,1771,1775,1779,1783,1787,1791,1795,1799,1803,1808,1812],{"type":45,"tag":107,"props":1763,"children":1764},{"style":132},[1765],{"type":51,"value":1766},"PAYMENT_TOKEN",{"type":45,"tag":107,"props":1768,"children":1769},{"style":126},[1770],{"type":51,"value":1562},{"type":45,"tag":107,"props":1772,"children":1773},{"style":1123},[1774],{"type":51,"value":1567},{"type":45,"tag":107,"props":1776,"children":1777},{"style":126},[1778],{"type":51,"value":129},{"type":45,"tag":107,"props":1780,"children":1781},{"style":132},[1782],{"type":51,"value":1723},{"type":45,"tag":107,"props":1784,"children":1785},{"style":126},[1786],{"type":51,"value":145},{"type":45,"tag":107,"props":1788,"children":1789},{"style":126},[1790],{"type":51,"value":1418},{"type":45,"tag":107,"props":1792,"children":1793},{"style":114},[1794],{"type":51,"value":1736},{"type":45,"tag":107,"props":1796,"children":1797},{"style":120},[1798],{"type":51,"value":1741},{"type":45,"tag":107,"props":1800,"children":1801},{"style":126},[1802],{"type":51,"value":603},{"type":45,"tag":107,"props":1804,"children":1805},{"style":120},[1806],{"type":51,"value":1807},".currency",{"type":45,"tag":107,"props":1809,"children":1810},{"style":126},[1811],{"type":51,"value":613},{"type":45,"tag":107,"props":1813,"children":1814},{"style":126},[1815],{"type":51,"value":1633},{"type":45,"tag":107,"props":1817,"children":1818},{"class":109,"line":544},[1819,1824,1828,1832,1836,1840,1844,1848,1852,1856,1860,1865,1869],{"type":45,"tag":107,"props":1820,"children":1821},{"style":132},[1822],{"type":51,"value":1823},"RECIPIENT",{"type":45,"tag":107,"props":1825,"children":1826},{"style":126},[1827],{"type":51,"value":1562},{"type":45,"tag":107,"props":1829,"children":1830},{"style":1123},[1831],{"type":51,"value":1567},{"type":45,"tag":107,"props":1833,"children":1834},{"style":126},[1835],{"type":51,"value":129},{"type":45,"tag":107,"props":1837,"children":1838},{"style":132},[1839],{"type":51,"value":1723},{"type":45,"tag":107,"props":1841,"children":1842},{"style":126},[1843],{"type":51,"value":145},{"type":45,"tag":107,"props":1845,"children":1846},{"style":126},[1847],{"type":51,"value":1418},{"type":45,"tag":107,"props":1849,"children":1850},{"style":114},[1851],{"type":51,"value":1736},{"type":45,"tag":107,"props":1853,"children":1854},{"style":120},[1855],{"type":51,"value":1741},{"type":45,"tag":107,"props":1857,"children":1858},{"style":126},[1859],{"type":51,"value":603},{"type":45,"tag":107,"props":1861,"children":1862},{"style":120},[1863],{"type":51,"value":1864},".recipient",{"type":45,"tag":107,"props":1866,"children":1867},{"style":126},[1868],{"type":51,"value":613},{"type":45,"tag":107,"props":1870,"children":1871},{"style":126},[1872],{"type":51,"value":1633},{"type":45,"tag":107,"props":1874,"children":1875},{"class":109,"line":553},[1876,1881,1885,1889,1893,1897,1901,1905,1909,1913,1917,1922,1926],{"type":45,"tag":107,"props":1877,"children":1878},{"style":132},[1879],{"type":51,"value":1880},"TEMPO_CHAIN_ID",{"type":45,"tag":107,"props":1882,"children":1883},{"style":126},[1884],{"type":51,"value":1562},{"type":45,"tag":107,"props":1886,"children":1887},{"style":1123},[1888],{"type":51,"value":1567},{"type":45,"tag":107,"props":1890,"children":1891},{"style":126},[1892],{"type":51,"value":129},{"type":45,"tag":107,"props":1894,"children":1895},{"style":132},[1896],{"type":51,"value":1723},{"type":45,"tag":107,"props":1898,"children":1899},{"style":126},[1900],{"type":51,"value":145},{"type":45,"tag":107,"props":1902,"children":1903},{"style":126},[1904],{"type":51,"value":1418},{"type":45,"tag":107,"props":1906,"children":1907},{"style":114},[1908],{"type":51,"value":1736},{"type":45,"tag":107,"props":1910,"children":1911},{"style":120},[1912],{"type":51,"value":1741},{"type":45,"tag":107,"props":1914,"children":1915},{"style":126},[1916],{"type":51,"value":603},{"type":45,"tag":107,"props":1918,"children":1919},{"style":120},[1920],{"type":51,"value":1921},".methodDetails.chainId",{"type":45,"tag":107,"props":1923,"children":1924},{"style":126},[1925],{"type":51,"value":613},{"type":45,"tag":107,"props":1927,"children":1928},{"style":126},[1929],{"type":51,"value":1633},{"type":45,"tag":54,"props":1931,"children":1932},{},[1933,1934,1939,1940,1946],{"type":51,"value":1527},{"type":45,"tag":60,"props":1935,"children":1936},{},[1937],{"type":51,"value":1938},"JSON body challenges",{"type":51,"value":1534},{"type":45,"tag":103,"props":1941,"children":1943},{"className":1942},[],[1944],{"type":51,"value":1945},"payment_methods",{"type":51,"value":1947}," array):",{"type":45,"tag":95,"props":1949,"children":1951},{"className":97,"code":1950,"language":99,"meta":100,"style":100},"NUM_METHODS=$(echo \"$CHALLENGE_BODY\" | jq '.payment_methods | length')\nPAYMENT_METHODS=$(echo \"$CHALLENGE_BODY\" | jq -c '.payment_methods')\nRECIPIENT=$(echo \"$CHALLENGE_BODY\" | jq -r '.payment_methods[0].recipient')\nTEMPO_CHAIN_ID=$(echo \"$CHALLENGE_BODY\" | jq -r '.payment_methods[0].chain_id')\n",[1952],{"type":45,"tag":103,"props":1953,"children":1954},{"__ignoreMap":100},[1955,2009,2067,2123],{"type":45,"tag":107,"props":1956,"children":1957},{"class":109,"line":110},[1958,1963,1967,1971,1975,1980,1984,1988,1992,1996,2001,2005],{"type":45,"tag":107,"props":1959,"children":1960},{"style":132},[1961],{"type":51,"value":1962},"NUM_METHODS",{"type":45,"tag":107,"props":1964,"children":1965},{"style":126},[1966],{"type":51,"value":1562},{"type":45,"tag":107,"props":1968,"children":1969},{"style":1123},[1970],{"type":51,"value":1567},{"type":45,"tag":107,"props":1972,"children":1973},{"style":126},[1974],{"type":51,"value":129},{"type":45,"tag":107,"props":1976,"children":1977},{"style":132},[1978],{"type":51,"value":1979},"$CHALLENGE_BODY",{"type":45,"tag":107,"props":1981,"children":1982},{"style":126},[1983],{"type":51,"value":145},{"type":45,"tag":107,"props":1985,"children":1986},{"style":126},[1987],{"type":51,"value":1418},{"type":45,"tag":107,"props":1989,"children":1990},{"style":114},[1991],{"type":51,"value":1736},{"type":45,"tag":107,"props":1993,"children":1994},{"style":126},[1995],{"type":51,"value":603},{"type":45,"tag":107,"props":1997,"children":1998},{"style":120},[1999],{"type":51,"value":2000},".payment_methods | length",{"type":45,"tag":107,"props":2002,"children":2003},{"style":126},[2004],{"type":51,"value":613},{"type":45,"tag":107,"props":2006,"children":2007},{"style":126},[2008],{"type":51,"value":1633},{"type":45,"tag":107,"props":2010,"children":2011},{"class":109,"line":153},[2012,2017,2021,2025,2029,2033,2037,2041,2045,2050,2054,2059,2063],{"type":45,"tag":107,"props":2013,"children":2014},{"style":132},[2015],{"type":51,"value":2016},"PAYMENT_METHODS",{"type":45,"tag":107,"props":2018,"children":2019},{"style":126},[2020],{"type":51,"value":1562},{"type":45,"tag":107,"props":2022,"children":2023},{"style":1123},[2024],{"type":51,"value":1567},{"type":45,"tag":107,"props":2026,"children":2027},{"style":126},[2028],{"type":51,"value":129},{"type":45,"tag":107,"props":2030,"children":2031},{"style":132},[2032],{"type":51,"value":1979},{"type":45,"tag":107,"props":2034,"children":2035},{"style":126},[2036],{"type":51,"value":145},{"type":45,"tag":107,"props":2038,"children":2039},{"style":126},[2040],{"type":51,"value":1418},{"type":45,"tag":107,"props":2042,"children":2043},{"style":114},[2044],{"type":51,"value":1736},{"type":45,"tag":107,"props":2046,"children":2047},{"style":120},[2048],{"type":51,"value":2049}," -c",{"type":45,"tag":107,"props":2051,"children":2052},{"style":126},[2053],{"type":51,"value":603},{"type":45,"tag":107,"props":2055,"children":2056},{"style":120},[2057],{"type":51,"value":2058},".payment_methods",{"type":45,"tag":107,"props":2060,"children":2061},{"style":126},[2062],{"type":51,"value":613},{"type":45,"tag":107,"props":2064,"children":2065},{"style":126},[2066],{"type":51,"value":1633},{"type":45,"tag":107,"props":2068,"children":2069},{"class":109,"line":191},[2070,2074,2078,2082,2086,2090,2094,2098,2102,2106,2110,2115,2119],{"type":45,"tag":107,"props":2071,"children":2072},{"style":132},[2073],{"type":51,"value":1823},{"type":45,"tag":107,"props":2075,"children":2076},{"style":126},[2077],{"type":51,"value":1562},{"type":45,"tag":107,"props":2079,"children":2080},{"style":1123},[2081],{"type":51,"value":1567},{"type":45,"tag":107,"props":2083,"children":2084},{"style":126},[2085],{"type":51,"value":129},{"type":45,"tag":107,"props":2087,"children":2088},{"style":132},[2089],{"type":51,"value":1979},{"type":45,"tag":107,"props":2091,"children":2092},{"style":126},[2093],{"type":51,"value":145},{"type":45,"tag":107,"props":2095,"children":2096},{"style":126},[2097],{"type":51,"value":1418},{"type":45,"tag":107,"props":2099,"children":2100},{"style":114},[2101],{"type":51,"value":1736},{"type":45,"tag":107,"props":2103,"children":2104},{"style":120},[2105],{"type":51,"value":1741},{"type":45,"tag":107,"props":2107,"children":2108},{"style":126},[2109],{"type":51,"value":603},{"type":45,"tag":107,"props":2111,"children":2112},{"style":120},[2113],{"type":51,"value":2114},".payment_methods[0].recipient",{"type":45,"tag":107,"props":2116,"children":2117},{"style":126},[2118],{"type":51,"value":613},{"type":45,"tag":107,"props":2120,"children":2121},{"style":126},[2122],{"type":51,"value":1633},{"type":45,"tag":107,"props":2124,"children":2125},{"class":109,"line":498},[2126,2130,2134,2138,2142,2146,2150,2154,2158,2162,2166,2171,2175],{"type":45,"tag":107,"props":2127,"children":2128},{"style":132},[2129],{"type":51,"value":1880},{"type":45,"tag":107,"props":2131,"children":2132},{"style":126},[2133],{"type":51,"value":1562},{"type":45,"tag":107,"props":2135,"children":2136},{"style":1123},[2137],{"type":51,"value":1567},{"type":45,"tag":107,"props":2139,"children":2140},{"style":126},[2141],{"type":51,"value":129},{"type":45,"tag":107,"props":2143,"children":2144},{"style":132},[2145],{"type":51,"value":1979},{"type":45,"tag":107,"props":2147,"children":2148},{"style":126},[2149],{"type":51,"value":145},{"type":45,"tag":107,"props":2151,"children":2152},{"style":126},[2153],{"type":51,"value":1418},{"type":45,"tag":107,"props":2155,"children":2156},{"style":114},[2157],{"type":51,"value":1736},{"type":45,"tag":107,"props":2159,"children":2160},{"style":120},[2161],{"type":51,"value":1741},{"type":45,"tag":107,"props":2163,"children":2164},{"style":126},[2165],{"type":51,"value":603},{"type":45,"tag":107,"props":2167,"children":2168},{"style":120},[2169],{"type":51,"value":2170},".payment_methods[0].chain_id",{"type":45,"tag":107,"props":2172,"children":2173},{"style":126},[2174],{"type":51,"value":613},{"type":45,"tag":107,"props":2176,"children":2177},{"style":126},[2178],{"type":51,"value":1633},{"type":45,"tag":54,"props":2180,"children":2181},{},[2182],{"type":51,"value":2183},"If multiple payment methods are accepted, select the cheapest in Step 2.",{"type":45,"tag":277,"props":2185,"children":2186},{},[2187],{"type":45,"tag":54,"props":2188,"children":2189},{},[2190,2192,2198],{"type":51,"value":2191},"The Tempo mainnet chain ID is ",{"type":45,"tag":103,"props":2193,"children":2195},{"className":2194},[],[2196],{"type":51,"value":2197},"4217",{"type":51,"value":2199},". Use as fallback if not in the challenge.",{"type":45,"tag":785,"props":2201,"children":2203},{"id":2202},"step-2-check-source-wallet-balances-and-select-payment-method",[2204],{"type":51,"value":2205},"Step 2 — Check Source Wallet Balances and Select Payment Method",{"type":45,"tag":277,"props":2207,"children":2208},{},[2209],{"type":45,"tag":54,"props":2210,"children":2211},{},[2212,2217,2219,2224,2226,2232],{"type":45,"tag":60,"props":2213,"children":2214},{},[2215],{"type":51,"value":2216},"REQUIRED:",{"type":51,"value":2218}," You must have the user's source wallet address (the ERC-20\nwallet with the private key, NOT the Tempo CLI wallet). Use ",{"type":45,"tag":103,"props":2220,"children":2222},{"className":2221},[],[2223],{"type":51,"value":1090},{"type":51,"value":2225},"\nif not provided. Store as ",{"type":45,"tag":103,"props":2227,"children":2229},{"className":2228},[],[2230],{"type":51,"value":2231},"WALLET_ADDRESS",{"type":51,"value":73},{"type":45,"tag":54,"props":2234,"children":2235},{},[2236,2238,2243],{"type":51,"value":2237},"Also capture the ",{"type":45,"tag":60,"props":2239,"children":2240},{},[2241],{"type":51,"value":2242},"Tempo wallet address",{"type":51,"value":2244}," (the funding destination):",{"type":45,"tag":95,"props":2246,"children":2248},{"className":97,"code":2247,"language":99,"meta":100,"style":100},"TEMPO_WALLET_ADDRESS=$(\"$HOME\u002F.local\u002Fbin\u002Ftempo\" wallet -t whoami | grep -oE '0x[a-fA-F0-9]{40}' | head -1)\n",[2249],{"type":45,"tag":103,"props":2250,"children":2251},{"__ignoreMap":100},[2252],{"type":45,"tag":107,"props":2253,"children":2254},{"class":109,"line":110},[2255,2260,2264,2268,2272,2276,2280,2284,2289,2293,2297,2301,2305,2310,2314,2318,2323,2328],{"type":45,"tag":107,"props":2256,"children":2257},{"style":132},[2258],{"type":51,"value":2259},"TEMPO_WALLET_ADDRESS",{"type":45,"tag":107,"props":2261,"children":2262},{"style":126},[2263],{"type":51,"value":1562},{"type":45,"tag":107,"props":2265,"children":2266},{"style":114},[2267],{"type":51,"value":145},{"type":45,"tag":107,"props":2269,"children":2270},{"style":132},[2271],{"type":51,"value":135},{"type":45,"tag":107,"props":2273,"children":2274},{"style":114},[2275],{"type":51,"value":265},{"type":45,"tag":107,"props":2277,"children":2278},{"style":120},[2279],{"type":51,"value":270},{"type":45,"tag":107,"props":2281,"children":2282},{"style":120},[2283],{"type":51,"value":323},{"type":45,"tag":107,"props":2285,"children":2286},{"style":120},[2287],{"type":51,"value":2288}," whoami",{"type":45,"tag":107,"props":2290,"children":2291},{"style":126},[2292],{"type":51,"value":1418},{"type":45,"tag":107,"props":2294,"children":2295},{"style":114},[2296],{"type":51,"value":1589},{"type":45,"tag":107,"props":2298,"children":2299},{"style":120},[2300],{"type":51,"value":1594},{"type":45,"tag":107,"props":2302,"children":2303},{"style":126},[2304],{"type":51,"value":603},{"type":45,"tag":107,"props":2306,"children":2307},{"style":120},[2308],{"type":51,"value":2309},"0x[a-fA-F0-9]{40}",{"type":45,"tag":107,"props":2311,"children":2312},{"style":126},[2313],{"type":51,"value":613},{"type":45,"tag":107,"props":2315,"children":2316},{"style":126},[2317],{"type":51,"value":1418},{"type":45,"tag":107,"props":2319,"children":2320},{"style":114},[2321],{"type":51,"value":2322}," head",{"type":45,"tag":107,"props":2324,"children":2325},{"style":120},[2326],{"type":51,"value":2327}," -1",{"type":45,"tag":107,"props":2329,"children":2330},{"style":126},[2331],{"type":51,"value":1633},{"type":45,"tag":54,"props":2333,"children":2334},{},[2335],{"type":51,"value":2336},"Check ERC-20 balances on supported source chains:",{"type":45,"tag":95,"props":2338,"children":2340},{"className":97,"code":2339,"language":99,"meta":100,"style":100},"# USDC on Base (cheapest bridge gas ~$0.001)\ncast call 0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913 \\\n  \"balanceOf(address)(uint256)\" \"$WALLET_ADDRESS\" \\\n  --rpc-url https:\u002F\u002Fmainnet.base.org\n\n# USDC on Ethereum (bridge gas ~$0.25)\ncast call 0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48 \\\n  \"balanceOf(address)(uint256)\" \"$WALLET_ADDRESS\" \\\n  --rpc-url https:\u002F\u002Feth.llamarpc.com\n\n# ETH on Base and Ethereum (swap to USDC first)\ncast balance \"$WALLET_ADDRESS\" --rpc-url https:\u002F\u002Fmainnet.base.org\ncast balance \"$WALLET_ADDRESS\" --rpc-url https:\u002F\u002Feth.llamarpc.com\n",[2341],{"type":45,"tag":103,"props":2342,"children":2343},{"__ignoreMap":100},[2344,2352,2373,2407,2420,2427,2435,2455,2486,2498,2506,2515,2548],{"type":45,"tag":107,"props":2345,"children":2346},{"class":109,"line":110},[2347],{"type":45,"tag":107,"props":2348,"children":2349},{"style":431},[2350],{"type":51,"value":2351},"# USDC on Base (cheapest bridge gas ~$0.001)\n",{"type":45,"tag":107,"props":2353,"children":2354},{"class":109,"line":153},[2355,2359,2363,2369],{"type":45,"tag":107,"props":2356,"children":2357},{"style":114},[2358],{"type":51,"value":831},{"type":45,"tag":107,"props":2360,"children":2361},{"style":120},[2362],{"type":51,"value":1204},{"type":45,"tag":107,"props":2364,"children":2366},{"style":2365},"--shiki-light:#F76D47;--shiki-default:#F78C6C;--shiki-dark:#F78C6C",[2367],{"type":51,"value":2368}," 0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",{"type":45,"tag":107,"props":2370,"children":2371},{"style":132},[2372],{"type":51,"value":150},{"type":45,"tag":107,"props":2374,"children":2375},{"class":109,"line":191},[2376,2381,2386,2390,2394,2399,2403],{"type":45,"tag":107,"props":2377,"children":2378},{"style":126},[2379],{"type":51,"value":2380},"  \"",{"type":45,"tag":107,"props":2382,"children":2383},{"style":120},[2384],{"type":51,"value":2385},"balanceOf(address)(uint256)",{"type":45,"tag":107,"props":2387,"children":2388},{"style":126},[2389],{"type":51,"value":145},{"type":45,"tag":107,"props":2391,"children":2392},{"style":126},[2393],{"type":51,"value":129},{"type":45,"tag":107,"props":2395,"children":2396},{"style":132},[2397],{"type":51,"value":2398},"$WALLET_ADDRESS",{"type":45,"tag":107,"props":2400,"children":2401},{"style":126},[2402],{"type":51,"value":145},{"type":45,"tag":107,"props":2404,"children":2405},{"style":132},[2406],{"type":51,"value":150},{"type":45,"tag":107,"props":2408,"children":2409},{"class":109,"line":498},[2410,2415],{"type":45,"tag":107,"props":2411,"children":2412},{"style":120},[2413],{"type":51,"value":2414},"  --rpc-url",{"type":45,"tag":107,"props":2416,"children":2417},{"style":120},[2418],{"type":51,"value":2419}," https:\u002F\u002Fmainnet.base.org\n",{"type":45,"tag":107,"props":2421,"children":2422},{"class":109,"line":544},[2423],{"type":45,"tag":107,"props":2424,"children":2425},{"emptyLinePlaceholder":1295},[2426],{"type":51,"value":1298},{"type":45,"tag":107,"props":2428,"children":2429},{"class":109,"line":553},[2430],{"type":45,"tag":107,"props":2431,"children":2432},{"style":431},[2433],{"type":51,"value":2434},"# USDC on Ethereum (bridge gas ~$0.25)\n",{"type":45,"tag":107,"props":2436,"children":2437},{"class":109,"line":592},[2438,2442,2446,2451],{"type":45,"tag":107,"props":2439,"children":2440},{"style":114},[2441],{"type":51,"value":831},{"type":45,"tag":107,"props":2443,"children":2444},{"style":120},[2445],{"type":51,"value":1204},{"type":45,"tag":107,"props":2447,"children":2448},{"style":2365},[2449],{"type":51,"value":2450}," 0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",{"type":45,"tag":107,"props":2452,"children":2453},{"style":132},[2454],{"type":51,"value":150},{"type":45,"tag":107,"props":2456,"children":2457},{"class":109,"line":1366},[2458,2462,2466,2470,2474,2478,2482],{"type":45,"tag":107,"props":2459,"children":2460},{"style":126},[2461],{"type":51,"value":2380},{"type":45,"tag":107,"props":2463,"children":2464},{"style":120},[2465],{"type":51,"value":2385},{"type":45,"tag":107,"props":2467,"children":2468},{"style":126},[2469],{"type":51,"value":145},{"type":45,"tag":107,"props":2471,"children":2472},{"style":126},[2473],{"type":51,"value":129},{"type":45,"tag":107,"props":2475,"children":2476},{"style":132},[2477],{"type":51,"value":2398},{"type":45,"tag":107,"props":2479,"children":2480},{"style":126},[2481],{"type":51,"value":145},{"type":45,"tag":107,"props":2483,"children":2484},{"style":132},[2485],{"type":51,"value":150},{"type":45,"tag":107,"props":2487,"children":2488},{"class":109,"line":1475},[2489,2493],{"type":45,"tag":107,"props":2490,"children":2491},{"style":120},[2492],{"type":51,"value":2414},{"type":45,"tag":107,"props":2494,"children":2495},{"style":120},[2496],{"type":51,"value":2497}," https:\u002F\u002Feth.llamarpc.com\n",{"type":45,"tag":107,"props":2499,"children":2501},{"class":109,"line":2500},10,[2502],{"type":45,"tag":107,"props":2503,"children":2504},{"emptyLinePlaceholder":1295},[2505],{"type":51,"value":1298},{"type":45,"tag":107,"props":2507,"children":2509},{"class":109,"line":2508},11,[2510],{"type":45,"tag":107,"props":2511,"children":2512},{"style":431},[2513],{"type":51,"value":2514},"# ETH on Base and Ethereum (swap to USDC first)\n",{"type":45,"tag":107,"props":2516,"children":2518},{"class":109,"line":2517},12,[2519,2523,2528,2532,2536,2540,2544],{"type":45,"tag":107,"props":2520,"children":2521},{"style":114},[2522],{"type":51,"value":831},{"type":45,"tag":107,"props":2524,"children":2525},{"style":120},[2526],{"type":51,"value":2527}," balance",{"type":45,"tag":107,"props":2529,"children":2530},{"style":126},[2531],{"type":51,"value":129},{"type":45,"tag":107,"props":2533,"children":2534},{"style":132},[2535],{"type":51,"value":2398},{"type":45,"tag":107,"props":2537,"children":2538},{"style":126},[2539],{"type":51,"value":145},{"type":45,"tag":107,"props":2541,"children":2542},{"style":120},[2543],{"type":51,"value":1235},{"type":45,"tag":107,"props":2545,"children":2546},{"style":120},[2547],{"type":51,"value":2419},{"type":45,"tag":107,"props":2549,"children":2551},{"class":109,"line":2550},13,[2552,2556,2560,2564,2568,2572,2576],{"type":45,"tag":107,"props":2553,"children":2554},{"style":114},[2555],{"type":51,"value":831},{"type":45,"tag":107,"props":2557,"children":2558},{"style":120},[2559],{"type":51,"value":2527},{"type":45,"tag":107,"props":2561,"children":2562},{"style":126},[2563],{"type":51,"value":129},{"type":45,"tag":107,"props":2565,"children":2566},{"style":132},[2567],{"type":51,"value":2398},{"type":45,"tag":107,"props":2569,"children":2570},{"style":126},[2571],{"type":51,"value":145},{"type":45,"tag":107,"props":2573,"children":2574},{"style":120},[2575],{"type":51,"value":1235},{"type":45,"tag":107,"props":2577,"children":2578},{"style":120},[2579],{"type":51,"value":2497},{"type":45,"tag":54,"props":2581,"children":2582},{},[2583,2588],{"type":45,"tag":60,"props":2584,"children":2585},{},[2586],{"type":51,"value":2587},"Select the cheapest payment method",{"type":51,"value":2589}," if multiple are accepted. Priority:",{"type":45,"tag":2591,"props":2592,"children":2593},"ol",{},[2594,2599,2604],{"type":45,"tag":662,"props":2595,"children":2596},{},[2597],{"type":51,"value":2598},"Wallet holds USDC on Base (bridge only, minimal path)",{"type":45,"tag":662,"props":2600,"children":2601},{},[2602],{"type":51,"value":2603},"Wallet holds ETH on Base or Ethereum (swap to USDC + bridge)",{"type":45,"tag":662,"props":2605,"children":2606},{},[2607],{"type":51,"value":2608},"Any other liquid ERC-20 (swap + bridge)",{"type":45,"tag":95,"props":2610,"children":2612},{"className":97,"code":2611,"language":99,"meta":100,"style":100},"REQUIRED_AMOUNT=$(echo \"$PAYMENT_METHODS\" | jq -r \".[$SELECTED_INDEX].amount\")\nPAYMENT_TOKEN=$(echo \"$PAYMENT_METHODS\" | jq -r \".[$SELECTED_INDEX].token\")\n",[2613],{"type":45,"tag":103,"props":2614,"children":2615},{"__ignoreMap":100},[2616,2683],{"type":45,"tag":107,"props":2617,"children":2618},{"class":109,"line":110},[2619,2623,2627,2631,2635,2640,2644,2648,2652,2656,2660,2665,2670,2675,2679],{"type":45,"tag":107,"props":2620,"children":2621},{"style":132},[2622],{"type":51,"value":1706},{"type":45,"tag":107,"props":2624,"children":2625},{"style":126},[2626],{"type":51,"value":1562},{"type":45,"tag":107,"props":2628,"children":2629},{"style":1123},[2630],{"type":51,"value":1567},{"type":45,"tag":107,"props":2632,"children":2633},{"style":126},[2634],{"type":51,"value":129},{"type":45,"tag":107,"props":2636,"children":2637},{"style":132},[2638],{"type":51,"value":2639},"$PAYMENT_METHODS",{"type":45,"tag":107,"props":2641,"children":2642},{"style":126},[2643],{"type":51,"value":145},{"type":45,"tag":107,"props":2645,"children":2646},{"style":126},[2647],{"type":51,"value":1418},{"type":45,"tag":107,"props":2649,"children":2650},{"style":114},[2651],{"type":51,"value":1736},{"type":45,"tag":107,"props":2653,"children":2654},{"style":120},[2655],{"type":51,"value":1741},{"type":45,"tag":107,"props":2657,"children":2658},{"style":126},[2659],{"type":51,"value":129},{"type":45,"tag":107,"props":2661,"children":2662},{"style":120},[2663],{"type":51,"value":2664},".[",{"type":45,"tag":107,"props":2666,"children":2667},{"style":132},[2668],{"type":51,"value":2669},"$SELECTED_INDEX",{"type":45,"tag":107,"props":2671,"children":2672},{"style":120},[2673],{"type":51,"value":2674},"].amount",{"type":45,"tag":107,"props":2676,"children":2677},{"style":126},[2678],{"type":51,"value":145},{"type":45,"tag":107,"props":2680,"children":2681},{"style":126},[2682],{"type":51,"value":1633},{"type":45,"tag":107,"props":2684,"children":2685},{"class":109,"line":153},[2686,2690,2694,2698,2702,2706,2710,2714,2718,2722,2726,2730,2734,2739,2743],{"type":45,"tag":107,"props":2687,"children":2688},{"style":132},[2689],{"type":51,"value":1766},{"type":45,"tag":107,"props":2691,"children":2692},{"style":126},[2693],{"type":51,"value":1562},{"type":45,"tag":107,"props":2695,"children":2696},{"style":1123},[2697],{"type":51,"value":1567},{"type":45,"tag":107,"props":2699,"children":2700},{"style":126},[2701],{"type":51,"value":129},{"type":45,"tag":107,"props":2703,"children":2704},{"style":132},[2705],{"type":51,"value":2639},{"type":45,"tag":107,"props":2707,"children":2708},{"style":126},[2709],{"type":51,"value":145},{"type":45,"tag":107,"props":2711,"children":2712},{"style":126},[2713],{"type":51,"value":1418},{"type":45,"tag":107,"props":2715,"children":2716},{"style":114},[2717],{"type":51,"value":1736},{"type":45,"tag":107,"props":2719,"children":2720},{"style":120},[2721],{"type":51,"value":1741},{"type":45,"tag":107,"props":2723,"children":2724},{"style":126},[2725],{"type":51,"value":129},{"type":45,"tag":107,"props":2727,"children":2728},{"style":120},[2729],{"type":51,"value":2664},{"type":45,"tag":107,"props":2731,"children":2732},{"style":132},[2733],{"type":51,"value":2669},{"type":45,"tag":107,"props":2735,"children":2736},{"style":120},[2737],{"type":51,"value":2738},"].token",{"type":45,"tag":107,"props":2740,"children":2741},{"style":126},[2742],{"type":51,"value":145},{"type":45,"tag":107,"props":2744,"children":2745},{"style":126},[2746],{"type":51,"value":1633},{"type":45,"tag":785,"props":2748,"children":2750},{"id":2749},"step-3-plan-the-payment-path",[2751],{"type":51,"value":2752},"Step 3 — Plan the Payment Path",{"type":45,"tag":54,"props":2754,"children":2755},{},[2756],{"type":51,"value":2757},"Determine which phases apply based on where the user's tokens are:",{"type":45,"tag":95,"props":2759,"children":2762},{"className":2760,"code":2761,"language":51,"meta":100},[743],"Case A — Source token is already on Tempo:\n  Source token (Tempo)\n    -> [Phase 5: on-Tempo swap via Stablecoin DEX] -> required payment token\n    -> tempo request retries automatically with funded wallet\n\nCase B — Source token is on Base\u002FEthereum\u002FArbitrum:\n  Source token (Base\u002FEthereum)\n    -> [Phase 4A: Uniswap Trading API swap] -> native USDC (bridge asset)\n    -> [Phase 4B: bridge via Trading API]   -> USDC.e on Tempo (to TEMPO_WALLET_ADDRESS)\n    -> [Phase 5: on-Tempo swap, if needed]  -> required payment token\n    -> tempo request retries automatically with funded wallet\n",[2763],{"type":45,"tag":103,"props":2764,"children":2765},{"__ignoreMap":100},[2766],{"type":51,"value":2761},{"type":45,"tag":277,"props":2768,"children":2769},{},[2770,2780,2790,2816],{"type":45,"tag":54,"props":2771,"children":2772},{},[2773,2778],{"type":45,"tag":60,"props":2774,"children":2775},{},[2776],{"type":51,"value":2777},"Skip Phase 4A",{"type":51,"value":2779}," if the source token is already USDC on the bridge chain.",{"type":45,"tag":54,"props":2781,"children":2782},{},[2783,2788],{"type":45,"tag":60,"props":2784,"children":2785},{},[2786],{"type":51,"value":2787},"Skip Phase 4B",{"type":51,"value":2789}," if tokens are already on Tempo (Case A).",{"type":45,"tag":54,"props":2791,"children":2792},{},[2793,2798,2800,2806,2808,2814],{"type":45,"tag":60,"props":2794,"children":2795},{},[2796],{"type":51,"value":2797},"Skip Phase 5",{"type":51,"value":2799}," if the bridge delivers the exact required token (USDC.e) or\nif ",{"type":45,"tag":103,"props":2801,"children":2803},{"className":2802},[],[2804],{"type":51,"value":2805},"mppx",{"type":51,"value":2807}," with ",{"type":45,"tag":103,"props":2809,"children":2811},{"className":2810},[],[2812],{"type":51,"value":2813},"autoSwap: true",{"type":51,"value":2815}," is used (it handles on-Tempo swaps automatically).",{"type":45,"tag":54,"props":2817,"children":2818},{},[2819,2824,2826,2832,2834,2839,2841,2847],{"type":45,"tag":60,"props":2820,"children":2821},{},[2822],{"type":51,"value":2823},"Gas-aware funding:",{"type":51,"value":2825}," Bridging a tiny amount (e.g. $0.05) wastes gas — the\nbridge gas on Ethereum (",{"type":45,"tag":2827,"props":2828,"children":2829},"del",{},[2830],{"type":51,"value":2831},"$0.25) or Base (",{"type":51,"value":2833},"$0.001) can exceed the shortfall.\n",{"type":45,"tag":60,"props":2835,"children":2836},{},[2837],{"type":51,"value":2838},"Minimum bridge recommendation: $5.",{"type":51,"value":2840}," This amortizes gas costs and pre-funds\nfuture requests. Rule of thumb: if ",{"type":45,"tag":103,"props":2842,"children":2844},{"className":2843},[],[2845],{"type":51,"value":2846},"bridge_gas > 2x shortfall",{"type":51,"value":2848},", bridge at\nleast $5 instead of the exact shortfall.",{"type":45,"tag":785,"props":2850,"children":2852},{"id":2851},"phase-4a-swap-to-usdc-on-source-chain-if-needed",[2853],{"type":51,"value":2854},"Phase 4A — Swap to USDC on Source Chain (if needed)",{"type":45,"tag":277,"props":2856,"children":2857},{},[2858],{"type":45,"tag":54,"props":2859,"children":2860},{},[2861,2866,2868,2873,2875,2880,2882,2887,2889,2894],{"type":45,"tag":60,"props":2862,"children":2863},{},[2864],{"type":51,"value":2865},"CONFIRMATION GATE:",{"type":51,"value":2867}," Before the approval transaction AND before the swap\nbroadcast, call ",{"type":45,"tag":103,"props":2869,"children":2871},{"className":2870},[],[2872],{"type":51,"value":1090},{"type":51,"value":2874}," showing the full swap summary. Example:\n\"About to approve USDC spending and execute swap: ",{"type":45,"tag":107,"props":2876,"children":2877},{},[2878],{"type":51,"value":2879},"amount",{"type":51,"value":2881}," ",{"type":45,"tag":107,"props":2883,"children":2884},{},[2885],{"type":51,"value":2886},"token",{"type":51,"value":2888}," → ",{"type":45,"tag":107,"props":2890,"children":2891},{},[2892],{"type":51,"value":2893},"USDC",{"type":51,"value":2895},",\ngas ~$X. Confirm? (yes\u002Fno)\". Do not proceed until confirmed.",{"type":45,"tag":54,"props":2897,"children":2898},{},[2899,2901,2907],{"type":51,"value":2900},"Swap the source token to USDC via the Uniswap Trading API (",{"type":45,"tag":103,"props":2902,"children":2904},{"className":2903},[],[2905],{"type":51,"value":2906},"EXACT_OUTPUT",{"type":51,"value":2908},").",{"type":45,"tag":277,"props":2910,"children":2911},{},[2912],{"type":45,"tag":54,"props":2913,"children":2914},{},[2915,2920,2922,2928],{"type":45,"tag":60,"props":2916,"children":2917},{},[2918],{"type":51,"value":2919},"Detailed steps:",{"type":51,"value":2921}," Read\n",{"type":45,"tag":806,"props":2923,"children":2925},{"href":2924},"references\u002Ftrading-api-flows.md#phase-4a--swap-on-source-chain",[2926],{"type":51,"value":2927},"references\u002Ftrading-api-flows.md",{"type":51,"value":2929},"\nfor full bash scripts: variable setup, approval check, quote, permit signing,\nand swap execution.",{"type":45,"tag":54,"props":2931,"children":2932},{},[2933],{"type":51,"value":2934},"Key points:",{"type":45,"tag":658,"props":2936,"children":2937},{},[2938,2949,2974,3010,3015,3044],{"type":45,"tag":662,"props":2939,"children":2940},{},[2941,2943],{"type":51,"value":2942},"Base URL: ",{"type":45,"tag":103,"props":2944,"children":2946},{"className":2945},[],[2947],{"type":51,"value":2948},"https:\u002F\u002Ftrade-api.gateway.uniswap.org\u002Fv1",{"type":45,"tag":662,"props":2950,"children":2951},{},[2952,2954,2960,2961,2967,2968],{"type":51,"value":2953},"Headers: ",{"type":45,"tag":103,"props":2955,"children":2957},{"className":2956},[],[2958],{"type":51,"value":2959},"Content-Type: application\u002Fjson",{"type":51,"value":997},{"type":45,"tag":103,"props":2962,"children":2964},{"className":2963},[],[2965],{"type":51,"value":2966},"x-api-key",{"type":51,"value":997},{"type":45,"tag":103,"props":2969,"children":2971},{"className":2970},[],[2972],{"type":51,"value":2973},"x-universal-router-version: 2.0",{"type":45,"tag":662,"props":2975,"children":2976},{},[2977,2979,2985,2987,2992,2994,3000,3002,3008],{"type":51,"value":2978},"Flow: ",{"type":45,"tag":103,"props":2980,"children":2982},{"className":2981},[],[2983],{"type":51,"value":2984},"check_approval",{"type":51,"value":2986}," -> quote (",{"type":45,"tag":103,"props":2988,"children":2990},{"className":2989},[],[2991],{"type":51,"value":2906},{"type":51,"value":2993},") -> sign ",{"type":45,"tag":103,"props":2995,"children":2997},{"className":2996},[],[2998],{"type":51,"value":2999},"permitData",{"type":51,"value":3001}," -> ",{"type":45,"tag":103,"props":3003,"children":3005},{"className":3004},[],[3006],{"type":51,"value":3007},"\u002Fswap",{"type":51,"value":3009}," -> broadcast",{"type":45,"tag":662,"props":3011,"children":3012},{},[3013],{"type":51,"value":3014},"Confirmation gates required before approval tx and before swap broadcast",{"type":45,"tag":662,"props":3016,"children":3017},{},[3018,3020,3026,3028,3034,3036,3042],{"type":51,"value":3019},"For native ETH: use the zero address\n(",{"type":45,"tag":103,"props":3021,"children":3023},{"className":3022},[],[3024],{"type":51,"value":3025},"0x0000000000000000000000000000000000000000",{"type":51,"value":3027},") as ",{"type":45,"tag":103,"props":3029,"children":3031},{"className":3030},[],[3032],{"type":51,"value":3033},"TOKEN_IN",{"type":51,"value":3035}," — this avoids\nPermit2 signing. ",{"type":45,"tag":103,"props":3037,"children":3039},{"className":3038},[],[3040],{"type":51,"value":3041},"SWAP_VALUE",{"type":51,"value":3043}," will be non-zero. If the zero address returns\na 400, fall back to the WETH address (requires Permit2 signing).",{"type":45,"tag":662,"props":3045,"children":3046},{},[3047],{"type":51,"value":3048},"After swap, verify USDC balance before proceeding to Phase 4B",{"type":45,"tag":785,"props":3050,"children":3052},{"id":3051},"phase-4b-bridge-to-tempo-wallet",[3053],{"type":51,"value":3054},"Phase 4B — Bridge to Tempo Wallet",{"type":45,"tag":277,"props":3056,"children":3057},{},[3058],{"type":45,"tag":54,"props":3059,"children":3060},{},[3061,3065,3067,3072],{"type":45,"tag":60,"props":3062,"children":3063},{},[3064],{"type":51,"value":2865},{"type":51,"value":3066}," Before the bridge approval AND before the bridge\nexecution, call ",{"type":45,"tag":103,"props":3068,"children":3070},{"className":3069},[],[3071],{"type":51,"value":1090},{"type":51,"value":3073}," showing a bridge summary (source amount,\nsource chain, destination chain, estimated gas, bridge fee, estimated arrival).\nDo not proceed until the user confirms each step.",{"type":45,"tag":54,"props":3075,"children":3076},{},[3077],{"type":51,"value":3078},"Bridge USDC from any supported source chain to USDC.e on Tempo using the\nUniswap Trading API (powered by Across Protocol).",{"type":45,"tag":277,"props":3080,"children":3081},{},[3082,3128],{"type":45,"tag":54,"props":3083,"children":3084},{},[3085,3090,3092,3098,3100,3105,3107,3112,3114,3119,3121,3126],{"type":45,"tag":60,"props":3086,"children":3087},{},[3088],{"type":51,"value":3089},"Bridge recipient limitation:",{"type":51,"value":3091}," The Trading API does not support a custom\n",{"type":45,"tag":103,"props":3093,"children":3095},{"className":3094},[],[3096],{"type":51,"value":3097},"recipient",{"type":51,"value":3099}," field for bridges — funds always arrive at ",{"type":45,"tag":103,"props":3101,"children":3103},{"className":3102},[],[3104],{"type":51,"value":2231},{"type":51,"value":3106}," on\nTempo. If ",{"type":45,"tag":103,"props":3108,"children":3110},{"className":3109},[],[3111],{"type":51,"value":2231},{"type":51,"value":3113}," differs from ",{"type":45,"tag":103,"props":3115,"children":3117},{"className":3116},[],[3118],{"type":51,"value":2259},{"type":51,"value":3120}," (the Tempo CLI\nwallet), an ",{"type":45,"tag":60,"props":3122,"children":3123},{},[3124],{"type":51,"value":3125},"extra transfer transaction",{"type":51,"value":3127}," on Tempo is required after the\nbridge (see Step 4B-5 in the reference file). Factor this into gas estimates.",{"type":45,"tag":54,"props":3129,"children":3130},{},[3131,3135,3136,3141],{"type":45,"tag":60,"props":3132,"children":3133},{},[3134],{"type":51,"value":2919},{"type":51,"value":2921},{"type":45,"tag":806,"props":3137,"children":3139},{"href":3138},"references\u002Ftrading-api-flows.md#phase-4b--bridge-to-tempo",[3140],{"type":51,"value":2927},{"type":51,"value":3142},"\nfor full bash scripts: approval, bridge quote, execution, arrival polling,\nand transfer to Tempo wallet.",{"type":45,"tag":54,"props":3144,"children":3145},{},[3146],{"type":51,"value":2934},{"type":45,"tag":658,"props":3148,"children":3149},{},[3150,3155,3187,3192,3197,3202],{"type":45,"tag":662,"props":3151,"children":3152},{},[3153],{"type":51,"value":3154},"Route: USDC on Base\u002FEthereum\u002FArbitrum -> USDC.e on Tempo",{"type":45,"tag":662,"props":3156,"children":3157},{},[3158,3159,3164,3166,3171,3173,3178,3180,3185],{"type":51,"value":2978},{"type":45,"tag":103,"props":3160,"children":3162},{"className":3161},[],[3163],{"type":51,"value":2984},{"type":51,"value":3165}," -> verify on-chain allowance -> quote (",{"type":45,"tag":103,"props":3167,"children":3169},{"className":3168},[],[3170],{"type":51,"value":2906},{"type":51,"value":3172},",\ncross-chain) -> execute via ",{"type":45,"tag":103,"props":3174,"children":3176},{"className":3175},[],[3177],{"type":51,"value":3007},{"type":51,"value":3179}," -> poll balance -> transfer to\n",{"type":45,"tag":103,"props":3181,"children":3183},{"className":3182},[],[3184],{"type":51,"value":2259},{"type":51,"value":3186}," if needed (Step 4B-5)",{"type":45,"tag":662,"props":3188,"children":3189},{},[3190],{"type":51,"value":3191},"Confirmation gates required before approval and before bridge execution",{"type":45,"tag":662,"props":3193,"children":3194},{},[3195],{"type":51,"value":3196},"Do not re-submit if poll times out — check Tempo explorer",{"type":45,"tag":662,"props":3198,"children":3199},{},[3200],{"type":51,"value":3201},"Apply a 0.5% buffer to account for bridge fees",{"type":45,"tag":662,"props":3203,"children":3204},{},[3205],{"type":51,"value":3206},"Quotes expire in ~60 seconds — re-fetch if any delay before broadcast",{"type":45,"tag":54,"props":3208,"children":3209},{},[3210,3212,3217],{"type":51,"value":3211},"After the bridge confirms, retry the original ",{"type":45,"tag":103,"props":3213,"children":3215},{"className":3214},[],[3216],{"type":51,"value":737},{"type":51,"value":3218}," — the Tempo CLI\nwill automatically use the newly funded wallet to pay the 402. If the payment\ntoken is not USDC.e, proceed to Phase 5 to swap to the required token before\nretrying.",{"type":45,"tag":277,"props":3220,"children":3221},{},[3222],{"type":45,"tag":54,"props":3223,"children":3224},{},[3225,3230,3232,3238,3240,3245,3247,3252],{"type":45,"tag":60,"props":3226,"children":3227},{},[3228],{"type":51,"value":3229},"Balance buffer:",{"type":51,"value":3231}," On Tempo, ",{"type":45,"tag":103,"props":3233,"children":3235},{"className":3234},[],[3236],{"type":51,"value":3237},"balanceOf",{"type":51,"value":3239}," may report more than is spendable.\nApply a ",{"type":45,"tag":60,"props":3241,"children":3242},{},[3243],{"type":51,"value":3244},"2x buffer",{"type":51,"value":3246}," when comparing to ",{"type":45,"tag":103,"props":3248,"children":3250},{"className":3249},[],[3251],{"type":51,"value":1706},{"type":51,"value":3253},". If short, swap\nadditional tokens to top up.",{"type":45,"tag":785,"props":3255,"children":3257},{"id":3256},"phase-5-on-tempo-swap-if-needed",[3258],{"type":51,"value":3259},"Phase 5 — On-Tempo Swap (if needed)",{"type":45,"tag":54,"props":3261,"children":3262},{},[3263,3265,3270,3272,3277],{"type":51,"value":3264},"Use this phase when the wallet already holds a TIP-20 stablecoin on Tempo\n(e.g. USDC.e, pathUSD, or any other Tempo stablecoin) but needs to swap to the\n",{"type":45,"tag":60,"props":3266,"children":3267},{},[3268],{"type":51,"value":3269},"required payment token",{"type":51,"value":3271}," (e.g. PATH_USD or another TIP-20). This phase also\napplies when the user starts with tokens already on Tempo — ",{"type":45,"tag":60,"props":3273,"children":3274},{},[3275],{"type":51,"value":3276},"do not bridge\nwhen tokens are already on Tempo",{"type":51,"value":73},{"type":45,"tag":277,"props":3279,"children":3280},{},[3281],{"type":45,"tag":54,"props":3282,"children":3283},{},[3284,3289,3291,3296,3298,3303,3305,3311,3313,3319],{"type":45,"tag":60,"props":3285,"children":3286},{},[3287],{"type":51,"value":3288},"Simplest path:",{"type":51,"value":3290}," Pass ",{"type":45,"tag":103,"props":3292,"children":3294},{"className":3293},[],[3295],{"type":51,"value":2813},{"type":51,"value":3297}," to ",{"type":45,"tag":103,"props":3299,"children":3301},{"className":3300},[],[3302],{"type":51,"value":2805},{"type":51,"value":3304},"'s ",{"type":45,"tag":103,"props":3306,"children":3308},{"className":3307},[],[3309],{"type":51,"value":3310},"tempo.charge()",{"type":51,"value":3312}," — it\ncalls the Stablecoin DEX on Tempo automatically and handles the full swap\nbefore payment. Use manual swap below only when ",{"type":45,"tag":103,"props":3314,"children":3316},{"className":3315},[],[3317],{"type":51,"value":3318},"autoSwap",{"type":51,"value":3320}," is not available\nor you need explicit control.",{"type":45,"tag":54,"props":3322,"children":3323},{},[3324,3326,3331,3332,3338],{"type":51,"value":3325},"The ",{"type":45,"tag":60,"props":3327,"children":3328},{},[3329],{"type":51,"value":3330},"Stablecoin DEX on Tempo",{"type":51,"value":1534},{"type":45,"tag":103,"props":3333,"children":3335},{"className":3334},[],[3336],{"type":51,"value":3337},"0xdec0000000000000000000000000000000000000",{"type":51,"value":3339},")\naggregates TIP-20 stablecoin liquidity on Tempo (chain 4217). To swap:",{"type":45,"tag":95,"props":3341,"children":3343},{"className":97,"code":3342,"language":99,"meta":100,"style":100},"TEMPO_RPC_URL=\"https:\u002F\u002Frpc.presto.tempo.xyz\"\nSTABLECOIN_DEX=\"0xdec0000000000000000000000000000000000000\"\nTOKEN_IN=\"\u003Cyour Tempo stablecoin address>\"  # e.g. USDC.e or any TIP-20\nTOKEN_OUT=\"\u003Crequired payment token address>\"\nSWAP_AMOUNT=\"$REQUIRED_AMOUNT\"  # exact-output amount\n\n# 1. Show swap summary and get explicit user confirmation via AskUserQuestion\n#    before executing any transaction.\n\n# 2. Approve the DEX to spend TOKEN_IN (if allowance is insufficient)\nALLOWANCE=$(cast call \"$TOKEN_IN\" \\\n  \"allowance(address,address)(uint256)\" \"$WALLET_ADDRESS\" \"$STABLECOIN_DEX\" \\\n  --rpc-url \"$TEMPO_RPC_URL\" 2>\u002Fdev\u002Fnull | awk '{print $1}')\nif [ -z \"$ALLOWANCE\" ] || ! [[ \"$ALLOWANCE\" =~ ^[0-9]+$ ]]; then\n  echo \"ERROR: Failed to read allowance for $TOKEN_IN\"\n  exit 1\nfi\nif [ \"$(echo \"$ALLOWANCE \u003C $SWAP_AMOUNT\" | bc)\" -eq 1 ]; then\n  APPROVE_HASH=$(cast send \"$TOKEN_IN\" \\\n    \"approve(address,uint256)\" \"$STABLECOIN_DEX\" \\\n    \"115792089237316195423570985008687907853269984665640564039457584007913129639935\" \\\n    --account \"$CAST_ACCOUNT\" --password \"$CAST_PASSWORD\" \\\n    --rpc-url \"$TEMPO_RPC_URL\" --gas-limit 100000 \\\n    --json | jq -r '.transactionHash')\n  APPROVE_STATUS=$(cast receipt \"$APPROVE_HASH\" --rpc-url \"$TEMPO_RPC_URL\" --json | jq -r '.status')\n  [ \"$APPROVE_STATUS\" = \"0x1\" ] || { echo \"ERROR: Approval transaction reverted: $APPROVE_HASH\"; exit 1; }\n  echo \"Approval confirmed: $APPROVE_HASH\"\nfi\n\n# 3. Execute the swap (exact-output: receive exactly SWAP_AMOUNT of TOKEN_OUT)\nSWAP_TX=$(cast send \"$STABLECOIN_DEX\" \\\n  \"swap(address,address,uint256)\" \"$TOKEN_IN\" \"$TOKEN_OUT\" \"$SWAP_AMOUNT\" \\\n  --account \"$CAST_ACCOUNT\" --password \"$CAST_PASSWORD\" \\\n  --rpc-url \"$TEMPO_RPC_URL\" --gas-limit 200000 \\\n  --json | jq -r '.transactionHash')\n\nSWAP_STATUS=$(cast receipt \"$SWAP_TX\" --rpc-url \"$TEMPO_RPC_URL\" --json | jq -r '.status')\n[ \"$SWAP_STATUS\" = \"0x1\" ] || { echo \"ERROR: On-Tempo swap reverted: $SWAP_TX\"; exit 1; }\necho \"On-Tempo swap confirmed: $SWAP_TX\"\n",[3344],{"type":45,"tag":103,"props":3345,"children":3346},{"__ignoreMap":100},[3347,3372,3396,3425,3450,3480,3487,3495,3503,3510,3518,3555,3600,3654,3758,3783,3797,3806,3881,3919,3953,3974,4018,4053,4091,4176,4272,4297,4305,4313,4322,4359,4417,4458,4491,4526,4534,4616,4706],{"type":45,"tag":107,"props":3348,"children":3349},{"class":109,"line":110},[3350,3355,3359,3363,3368],{"type":45,"tag":107,"props":3351,"children":3352},{"style":132},[3353],{"type":51,"value":3354},"TEMPO_RPC_URL",{"type":45,"tag":107,"props":3356,"children":3357},{"style":126},[3358],{"type":51,"value":206},{"type":45,"tag":107,"props":3360,"children":3361},{"style":126},[3362],{"type":51,"value":145},{"type":45,"tag":107,"props":3364,"children":3365},{"style":120},[3366],{"type":51,"value":3367},"https:\u002F\u002Frpc.presto.tempo.xyz",{"type":45,"tag":107,"props":3369,"children":3370},{"style":126},[3371],{"type":51,"value":1191},{"type":45,"tag":107,"props":3373,"children":3374},{"class":109,"line":153},[3375,3380,3384,3388,3392],{"type":45,"tag":107,"props":3376,"children":3377},{"style":132},[3378],{"type":51,"value":3379},"STABLECOIN_DEX",{"type":45,"tag":107,"props":3381,"children":3382},{"style":126},[3383],{"type":51,"value":206},{"type":45,"tag":107,"props":3385,"children":3386},{"style":126},[3387],{"type":51,"value":145},{"type":45,"tag":107,"props":3389,"children":3390},{"style":120},[3391],{"type":51,"value":3337},{"type":45,"tag":107,"props":3393,"children":3394},{"style":126},[3395],{"type":51,"value":1191},{"type":45,"tag":107,"props":3397,"children":3398},{"class":109,"line":191},[3399,3403,3407,3411,3416,3420],{"type":45,"tag":107,"props":3400,"children":3401},{"style":132},[3402],{"type":51,"value":3033},{"type":45,"tag":107,"props":3404,"children":3405},{"style":126},[3406],{"type":51,"value":206},{"type":45,"tag":107,"props":3408,"children":3409},{"style":126},[3410],{"type":51,"value":145},{"type":45,"tag":107,"props":3412,"children":3413},{"style":120},[3414],{"type":51,"value":3415},"\u003Cyour Tempo stablecoin address>",{"type":45,"tag":107,"props":3417,"children":3418},{"style":126},[3419],{"type":51,"value":145},{"type":45,"tag":107,"props":3421,"children":3422},{"style":431},[3423],{"type":51,"value":3424},"  # e.g. USDC.e or any TIP-20\n",{"type":45,"tag":107,"props":3426,"children":3427},{"class":109,"line":498},[3428,3433,3437,3441,3446],{"type":45,"tag":107,"props":3429,"children":3430},{"style":132},[3431],{"type":51,"value":3432},"TOKEN_OUT",{"type":45,"tag":107,"props":3434,"children":3435},{"style":126},[3436],{"type":51,"value":206},{"type":45,"tag":107,"props":3438,"children":3439},{"style":126},[3440],{"type":51,"value":145},{"type":45,"tag":107,"props":3442,"children":3443},{"style":120},[3444],{"type":51,"value":3445},"\u003Crequired payment token address>",{"type":45,"tag":107,"props":3447,"children":3448},{"style":126},[3449],{"type":51,"value":1191},{"type":45,"tag":107,"props":3451,"children":3452},{"class":109,"line":544},[3453,3458,3462,3466,3471,3475],{"type":45,"tag":107,"props":3454,"children":3455},{"style":132},[3456],{"type":51,"value":3457},"SWAP_AMOUNT",{"type":45,"tag":107,"props":3459,"children":3460},{"style":126},[3461],{"type":51,"value":206},{"type":45,"tag":107,"props":3463,"children":3464},{"style":126},[3465],{"type":51,"value":145},{"type":45,"tag":107,"props":3467,"children":3468},{"style":132},[3469],{"type":51,"value":3470},"$REQUIRED_AMOUNT",{"type":45,"tag":107,"props":3472,"children":3473},{"style":126},[3474],{"type":51,"value":145},{"type":45,"tag":107,"props":3476,"children":3477},{"style":431},[3478],{"type":51,"value":3479},"  # exact-output amount\n",{"type":45,"tag":107,"props":3481,"children":3482},{"class":109,"line":553},[3483],{"type":45,"tag":107,"props":3484,"children":3485},{"emptyLinePlaceholder":1295},[3486],{"type":51,"value":1298},{"type":45,"tag":107,"props":3488,"children":3489},{"class":109,"line":592},[3490],{"type":45,"tag":107,"props":3491,"children":3492},{"style":431},[3493],{"type":51,"value":3494},"# 1. Show swap summary and get explicit user confirmation via AskUserQuestion\n",{"type":45,"tag":107,"props":3496,"children":3497},{"class":109,"line":1366},[3498],{"type":45,"tag":107,"props":3499,"children":3500},{"style":431},[3501],{"type":51,"value":3502},"#    before executing any transaction.\n",{"type":45,"tag":107,"props":3504,"children":3505},{"class":109,"line":1475},[3506],{"type":45,"tag":107,"props":3507,"children":3508},{"emptyLinePlaceholder":1295},[3509],{"type":51,"value":1298},{"type":45,"tag":107,"props":3511,"children":3512},{"class":109,"line":2500},[3513],{"type":45,"tag":107,"props":3514,"children":3515},{"style":431},[3516],{"type":51,"value":3517},"# 2. Approve the DEX to spend TOKEN_IN (if allowance is insufficient)\n",{"type":45,"tag":107,"props":3519,"children":3520},{"class":109,"line":2508},[3521,3526,3530,3534,3538,3542,3547,3551],{"type":45,"tag":107,"props":3522,"children":3523},{"style":132},[3524],{"type":51,"value":3525},"ALLOWANCE",{"type":45,"tag":107,"props":3527,"children":3528},{"style":126},[3529],{"type":51,"value":1562},{"type":45,"tag":107,"props":3531,"children":3532},{"style":114},[3533],{"type":51,"value":831},{"type":45,"tag":107,"props":3535,"children":3536},{"style":120},[3537],{"type":51,"value":1204},{"type":45,"tag":107,"props":3539,"children":3540},{"style":126},[3541],{"type":51,"value":129},{"type":45,"tag":107,"props":3543,"children":3544},{"style":132},[3545],{"type":51,"value":3546},"$TOKEN_IN",{"type":45,"tag":107,"props":3548,"children":3549},{"style":126},[3550],{"type":51,"value":145},{"type":45,"tag":107,"props":3552,"children":3553},{"style":132},[3554],{"type":51,"value":150},{"type":45,"tag":107,"props":3556,"children":3557},{"class":109,"line":2517},[3558,3562,3567,3571,3575,3579,3583,3587,3592,3596],{"type":45,"tag":107,"props":3559,"children":3560},{"style":126},[3561],{"type":51,"value":2380},{"type":45,"tag":107,"props":3563,"children":3564},{"style":120},[3565],{"type":51,"value":3566},"allowance(address,address)(uint256)",{"type":45,"tag":107,"props":3568,"children":3569},{"style":126},[3570],{"type":51,"value":145},{"type":45,"tag":107,"props":3572,"children":3573},{"style":126},[3574],{"type":51,"value":129},{"type":45,"tag":107,"props":3576,"children":3577},{"style":132},[3578],{"type":51,"value":2398},{"type":45,"tag":107,"props":3580,"children":3581},{"style":126},[3582],{"type":51,"value":145},{"type":45,"tag":107,"props":3584,"children":3585},{"style":126},[3586],{"type":51,"value":129},{"type":45,"tag":107,"props":3588,"children":3589},{"style":132},[3590],{"type":51,"value":3591},"$STABLECOIN_DEX",{"type":45,"tag":107,"props":3593,"children":3594},{"style":126},[3595],{"type":51,"value":145},{"type":45,"tag":107,"props":3597,"children":3598},{"style":132},[3599],{"type":51,"value":150},{"type":45,"tag":107,"props":3601,"children":3602},{"class":109,"line":2550},[3603,3607,3611,3616,3620,3624,3628,3632,3637,3641,3646,3650],{"type":45,"tag":107,"props":3604,"children":3605},{"style":120},[3606],{"type":51,"value":2414},{"type":45,"tag":107,"props":3608,"children":3609},{"style":126},[3610],{"type":51,"value":129},{"type":45,"tag":107,"props":3612,"children":3613},{"style":132},[3614],{"type":51,"value":3615},"$TEMPO_RPC_URL",{"type":45,"tag":107,"props":3617,"children":3618},{"style":126},[3619],{"type":51,"value":145},{"type":45,"tag":107,"props":3621,"children":3622},{"style":126},[3623],{"type":51,"value":1253},{"type":45,"tag":107,"props":3625,"children":3626},{"style":120},[3627],{"type":51,"value":1258},{"type":45,"tag":107,"props":3629,"children":3630},{"style":126},[3631],{"type":51,"value":1418},{"type":45,"tag":107,"props":3633,"children":3634},{"style":114},[3635],{"type":51,"value":3636}," awk",{"type":45,"tag":107,"props":3638,"children":3639},{"style":126},[3640],{"type":51,"value":603},{"type":45,"tag":107,"props":3642,"children":3643},{"style":120},[3644],{"type":51,"value":3645},"{print $1}",{"type":45,"tag":107,"props":3647,"children":3648},{"style":126},[3649],{"type":51,"value":613},{"type":45,"tag":107,"props":3651,"children":3652},{"style":126},[3653],{"type":51,"value":1633},{"type":45,"tag":107,"props":3655,"children":3657},{"class":109,"line":3656},14,[3658,3664,3669,3674,3678,3683,3687,3692,3696,3701,3706,3710,3714,3718,3723,3728,3733,3738,3743,3748,3753],{"type":45,"tag":107,"props":3659,"children":3661},{"style":3660},"--shiki-light:#39ADB5;--shiki-light-font-style:italic;--shiki-default:#89DDFF;--shiki-default-font-style:italic;--shiki-dark:#89DDFF;--shiki-dark-font-style:italic",[3662],{"type":51,"value":3663},"if",{"type":45,"tag":107,"props":3665,"children":3666},{"style":126},[3667],{"type":51,"value":3668}," [",{"type":45,"tag":107,"props":3670,"children":3671},{"style":126},[3672],{"type":51,"value":3673}," -z",{"type":45,"tag":107,"props":3675,"children":3676},{"style":126},[3677],{"type":51,"value":129},{"type":45,"tag":107,"props":3679,"children":3680},{"style":132},[3681],{"type":51,"value":3682},"$ALLOWANCE",{"type":45,"tag":107,"props":3684,"children":3685},{"style":126},[3686],{"type":51,"value":145},{"type":45,"tag":107,"props":3688,"children":3689},{"style":126},[3690],{"type":51,"value":3691}," ]",{"type":45,"tag":107,"props":3693,"children":3694},{"style":126},[3695],{"type":51,"value":1263},{"type":45,"tag":107,"props":3697,"children":3698},{"style":126},[3699],{"type":51,"value":3700}," !",{"type":45,"tag":107,"props":3702,"children":3703},{"style":126},[3704],{"type":51,"value":3705}," [[",{"type":45,"tag":107,"props":3707,"children":3708},{"style":126},[3709],{"type":51,"value":129},{"type":45,"tag":107,"props":3711,"children":3712},{"style":132},[3713],{"type":51,"value":3682},{"type":45,"tag":107,"props":3715,"children":3716},{"style":126},[3717],{"type":51,"value":145},{"type":45,"tag":107,"props":3719,"children":3720},{"style":126},[3721],{"type":51,"value":3722}," =~",{"type":45,"tag":107,"props":3724,"children":3725},{"style":132},[3726],{"type":51,"value":3727}," ^",{"type":45,"tag":107,"props":3729,"children":3730},{"style":126},[3731],{"type":51,"value":3732},"[",{"type":45,"tag":107,"props":3734,"children":3735},{"style":132},[3736],{"type":51,"value":3737},"0-9",{"type":45,"tag":107,"props":3739,"children":3740},{"style":126},[3741],{"type":51,"value":3742},"]",{"type":45,"tag":107,"props":3744,"children":3745},{"style":132},[3746],{"type":51,"value":3747},"+$ ",{"type":45,"tag":107,"props":3749,"children":3750},{"style":126},[3751],{"type":51,"value":3752},"]];",{"type":45,"tag":107,"props":3754,"children":3755},{"style":3660},[3756],{"type":51,"value":3757}," then\n",{"type":45,"tag":107,"props":3759,"children":3761},{"class":109,"line":3760},15,[3762,3766,3770,3775,3779],{"type":45,"tag":107,"props":3763,"children":3764},{"style":1123},[3765],{"type":51,"value":1372},{"type":45,"tag":107,"props":3767,"children":3768},{"style":126},[3769],{"type":51,"value":129},{"type":45,"tag":107,"props":3771,"children":3772},{"style":120},[3773],{"type":51,"value":3774},"ERROR: Failed to read allowance for ",{"type":45,"tag":107,"props":3776,"children":3777},{"style":132},[3778],{"type":51,"value":3546},{"type":45,"tag":107,"props":3780,"children":3781},{"style":126},[3782],{"type":51,"value":1191},{"type":45,"tag":107,"props":3784,"children":3786},{"class":109,"line":3785},16,[3787,3792],{"type":45,"tag":107,"props":3788,"children":3789},{"style":1123},[3790],{"type":51,"value":3791},"  exit",{"type":45,"tag":107,"props":3793,"children":3794},{"style":2365},[3795],{"type":51,"value":3796}," 1\n",{"type":45,"tag":107,"props":3798,"children":3800},{"class":109,"line":3799},17,[3801],{"type":45,"tag":107,"props":3802,"children":3803},{"style":3660},[3804],{"type":51,"value":3805},"fi\n",{"type":45,"tag":107,"props":3807,"children":3809},{"class":109,"line":3808},18,[3810,3814,3818,3823,3827,3831,3835,3840,3845,3849,3853,3857,3862,3867,3872,3877],{"type":45,"tag":107,"props":3811,"children":3812},{"style":3660},[3813],{"type":51,"value":3663},{"type":45,"tag":107,"props":3815,"children":3816},{"style":126},[3817],{"type":51,"value":3668},{"type":45,"tag":107,"props":3819,"children":3820},{"style":126},[3821],{"type":51,"value":3822}," \"$(",{"type":45,"tag":107,"props":3824,"children":3825},{"style":1123},[3826],{"type":51,"value":1567},{"type":45,"tag":107,"props":3828,"children":3829},{"style":126},[3830],{"type":51,"value":129},{"type":45,"tag":107,"props":3832,"children":3833},{"style":132},[3834],{"type":51,"value":3682},{"type":45,"tag":107,"props":3836,"children":3837},{"style":120},[3838],{"type":51,"value":3839}," \u003C ",{"type":45,"tag":107,"props":3841,"children":3842},{"style":132},[3843],{"type":51,"value":3844},"$SWAP_AMOUNT",{"type":45,"tag":107,"props":3846,"children":3847},{"style":126},[3848],{"type":51,"value":145},{"type":45,"tag":107,"props":3850,"children":3851},{"style":126},[3852],{"type":51,"value":1418},{"type":45,"tag":107,"props":3854,"children":3855},{"style":114},[3856],{"type":51,"value":1423},{"type":45,"tag":107,"props":3858,"children":3859},{"style":126},[3860],{"type":51,"value":3861},")\"",{"type":45,"tag":107,"props":3863,"children":3864},{"style":126},[3865],{"type":51,"value":3866}," -eq",{"type":45,"tag":107,"props":3868,"children":3869},{"style":2365},[3870],{"type":51,"value":3871}," 1",{"type":45,"tag":107,"props":3873,"children":3874},{"style":126},[3875],{"type":51,"value":3876}," ];",{"type":45,"tag":107,"props":3878,"children":3879},{"style":3660},[3880],{"type":51,"value":3757},{"type":45,"tag":107,"props":3882,"children":3884},{"class":109,"line":3883},19,[3885,3890,3894,3898,3903,3907,3911,3915],{"type":45,"tag":107,"props":3886,"children":3887},{"style":132},[3888],{"type":51,"value":3889},"  APPROVE_HASH",{"type":45,"tag":107,"props":3891,"children":3892},{"style":126},[3893],{"type":51,"value":1562},{"type":45,"tag":107,"props":3895,"children":3896},{"style":114},[3897],{"type":51,"value":831},{"type":45,"tag":107,"props":3899,"children":3900},{"style":120},[3901],{"type":51,"value":3902}," send",{"type":45,"tag":107,"props":3904,"children":3905},{"style":126},[3906],{"type":51,"value":129},{"type":45,"tag":107,"props":3908,"children":3909},{"style":132},[3910],{"type":51,"value":3546},{"type":45,"tag":107,"props":3912,"children":3913},{"style":126},[3914],{"type":51,"value":145},{"type":45,"tag":107,"props":3916,"children":3917},{"style":132},[3918],{"type":51,"value":150},{"type":45,"tag":107,"props":3920,"children":3922},{"class":109,"line":3921},20,[3923,3928,3933,3937,3941,3945,3949],{"type":45,"tag":107,"props":3924,"children":3925},{"style":126},[3926],{"type":51,"value":3927},"    \"",{"type":45,"tag":107,"props":3929,"children":3930},{"style":120},[3931],{"type":51,"value":3932},"approve(address,uint256)",{"type":45,"tag":107,"props":3934,"children":3935},{"style":126},[3936],{"type":51,"value":145},{"type":45,"tag":107,"props":3938,"children":3939},{"style":126},[3940],{"type":51,"value":129},{"type":45,"tag":107,"props":3942,"children":3943},{"style":132},[3944],{"type":51,"value":3591},{"type":45,"tag":107,"props":3946,"children":3947},{"style":126},[3948],{"type":51,"value":145},{"type":45,"tag":107,"props":3950,"children":3951},{"style":132},[3952],{"type":51,"value":150},{"type":45,"tag":107,"props":3954,"children":3956},{"class":109,"line":3955},21,[3957,3961,3966,3970],{"type":45,"tag":107,"props":3958,"children":3959},{"style":126},[3960],{"type":51,"value":3927},{"type":45,"tag":107,"props":3962,"children":3963},{"style":120},[3964],{"type":51,"value":3965},"115792089237316195423570985008687907853269984665640564039457584007913129639935",{"type":45,"tag":107,"props":3967,"children":3968},{"style":126},[3969],{"type":51,"value":145},{"type":45,"tag":107,"props":3971,"children":3972},{"style":132},[3973],{"type":51,"value":150},{"type":45,"tag":107,"props":3975,"children":3977},{"class":109,"line":3976},22,[3978,3983,3987,3992,3996,4001,4005,4010,4014],{"type":45,"tag":107,"props":3979,"children":3980},{"style":120},[3981],{"type":51,"value":3982},"    --account",{"type":45,"tag":107,"props":3984,"children":3985},{"style":126},[3986],{"type":51,"value":129},{"type":45,"tag":107,"props":3988,"children":3989},{"style":132},[3990],{"type":51,"value":3991},"$CAST_ACCOUNT",{"type":45,"tag":107,"props":3993,"children":3994},{"style":126},[3995],{"type":51,"value":145},{"type":45,"tag":107,"props":3997,"children":3998},{"style":120},[3999],{"type":51,"value":4000}," --password",{"type":45,"tag":107,"props":4002,"children":4003},{"style":126},[4004],{"type":51,"value":129},{"type":45,"tag":107,"props":4006,"children":4007},{"style":132},[4008],{"type":51,"value":4009},"$CAST_PASSWORD",{"type":45,"tag":107,"props":4011,"children":4012},{"style":126},[4013],{"type":51,"value":145},{"type":45,"tag":107,"props":4015,"children":4016},{"style":132},[4017],{"type":51,"value":150},{"type":45,"tag":107,"props":4019,"children":4021},{"class":109,"line":4020},23,[4022,4027,4031,4035,4039,4044,4049],{"type":45,"tag":107,"props":4023,"children":4024},{"style":120},[4025],{"type":51,"value":4026},"    --rpc-url",{"type":45,"tag":107,"props":4028,"children":4029},{"style":126},[4030],{"type":51,"value":129},{"type":45,"tag":107,"props":4032,"children":4033},{"style":132},[4034],{"type":51,"value":3615},{"type":45,"tag":107,"props":4036,"children":4037},{"style":126},[4038],{"type":51,"value":145},{"type":45,"tag":107,"props":4040,"children":4041},{"style":120},[4042],{"type":51,"value":4043}," --gas-limit",{"type":45,"tag":107,"props":4045,"children":4046},{"style":2365},[4047],{"type":51,"value":4048}," 100000",{"type":45,"tag":107,"props":4050,"children":4051},{"style":132},[4052],{"type":51,"value":150},{"type":45,"tag":107,"props":4054,"children":4056},{"class":109,"line":4055},24,[4057,4062,4066,4070,4074,4078,4083,4087],{"type":45,"tag":107,"props":4058,"children":4059},{"style":120},[4060],{"type":51,"value":4061},"    --json",{"type":45,"tag":107,"props":4063,"children":4064},{"style":126},[4065],{"type":51,"value":1418},{"type":45,"tag":107,"props":4067,"children":4068},{"style":114},[4069],{"type":51,"value":1736},{"type":45,"tag":107,"props":4071,"children":4072},{"style":120},[4073],{"type":51,"value":1741},{"type":45,"tag":107,"props":4075,"children":4076},{"style":126},[4077],{"type":51,"value":603},{"type":45,"tag":107,"props":4079,"children":4080},{"style":120},[4081],{"type":51,"value":4082},".transactionHash",{"type":45,"tag":107,"props":4084,"children":4085},{"style":126},[4086],{"type":51,"value":613},{"type":45,"tag":107,"props":4088,"children":4089},{"style":126},[4090],{"type":51,"value":1633},{"type":45,"tag":107,"props":4092,"children":4094},{"class":109,"line":4093},25,[4095,4100,4104,4108,4113,4117,4122,4126,4130,4134,4138,4142,4147,4151,4155,4159,4163,4168,4172],{"type":45,"tag":107,"props":4096,"children":4097},{"style":132},[4098],{"type":51,"value":4099},"  APPROVE_STATUS",{"type":45,"tag":107,"props":4101,"children":4102},{"style":126},[4103],{"type":51,"value":1562},{"type":45,"tag":107,"props":4105,"children":4106},{"style":114},[4107],{"type":51,"value":831},{"type":45,"tag":107,"props":4109,"children":4110},{"style":120},[4111],{"type":51,"value":4112}," receipt",{"type":45,"tag":107,"props":4114,"children":4115},{"style":126},[4116],{"type":51,"value":129},{"type":45,"tag":107,"props":4118,"children":4119},{"style":132},[4120],{"type":51,"value":4121},"$APPROVE_HASH",{"type":45,"tag":107,"props":4123,"children":4124},{"style":126},[4125],{"type":51,"value":145},{"type":45,"tag":107,"props":4127,"children":4128},{"style":120},[4129],{"type":51,"value":1235},{"type":45,"tag":107,"props":4131,"children":4132},{"style":126},[4133],{"type":51,"value":129},{"type":45,"tag":107,"props":4135,"children":4136},{"style":132},[4137],{"type":51,"value":3615},{"type":45,"tag":107,"props":4139,"children":4140},{"style":126},[4141],{"type":51,"value":145},{"type":45,"tag":107,"props":4143,"children":4144},{"style":120},[4145],{"type":51,"value":4146}," --json",{"type":45,"tag":107,"props":4148,"children":4149},{"style":126},[4150],{"type":51,"value":1418},{"type":45,"tag":107,"props":4152,"children":4153},{"style":114},[4154],{"type":51,"value":1736},{"type":45,"tag":107,"props":4156,"children":4157},{"style":120},[4158],{"type":51,"value":1741},{"type":45,"tag":107,"props":4160,"children":4161},{"style":126},[4162],{"type":51,"value":603},{"type":45,"tag":107,"props":4164,"children":4165},{"style":120},[4166],{"type":51,"value":4167},".status",{"type":45,"tag":107,"props":4169,"children":4170},{"style":126},[4171],{"type":51,"value":613},{"type":45,"tag":107,"props":4173,"children":4174},{"style":126},[4175],{"type":51,"value":1633},{"type":45,"tag":107,"props":4177,"children":4179},{"class":109,"line":4178},26,[4180,4185,4189,4194,4198,4203,4207,4212,4216,4220,4224,4229,4233,4237,4242,4246,4250,4254,4259,4263,4267],{"type":45,"tag":107,"props":4181,"children":4182},{"style":126},[4183],{"type":51,"value":4184},"  [",{"type":45,"tag":107,"props":4186,"children":4187},{"style":126},[4188],{"type":51,"value":129},{"type":45,"tag":107,"props":4190,"children":4191},{"style":132},[4192],{"type":51,"value":4193},"$APPROVE_STATUS",{"type":45,"tag":107,"props":4195,"children":4196},{"style":126},[4197],{"type":51,"value":145},{"type":45,"tag":107,"props":4199,"children":4200},{"style":126},[4201],{"type":51,"value":4202}," =",{"type":45,"tag":107,"props":4204,"children":4205},{"style":126},[4206],{"type":51,"value":129},{"type":45,"tag":107,"props":4208,"children":4209},{"style":120},[4210],{"type":51,"value":4211},"0x1",{"type":45,"tag":107,"props":4213,"children":4214},{"style":126},[4215],{"type":51,"value":145},{"type":45,"tag":107,"props":4217,"children":4218},{"style":126},[4219],{"type":51,"value":3691},{"type":45,"tag":107,"props":4221,"children":4222},{"style":126},[4223],{"type":51,"value":1263},{"type":45,"tag":107,"props":4225,"children":4226},{"style":126},[4227],{"type":51,"value":4228}," {",{"type":45,"tag":107,"props":4230,"children":4231},{"style":1123},[4232],{"type":51,"value":1268},{"type":45,"tag":107,"props":4234,"children":4235},{"style":126},[4236],{"type":51,"value":129},{"type":45,"tag":107,"props":4238,"children":4239},{"style":120},[4240],{"type":51,"value":4241},"ERROR: Approval transaction reverted: ",{"type":45,"tag":107,"props":4243,"children":4244},{"style":132},[4245],{"type":51,"value":4121},{"type":45,"tag":107,"props":4247,"children":4248},{"style":126},[4249],{"type":51,"value":145},{"type":45,"tag":107,"props":4251,"children":4252},{"style":126},[4253],{"type":51,"value":995},{"type":45,"tag":107,"props":4255,"children":4256},{"style":1123},[4257],{"type":51,"value":4258}," exit",{"type":45,"tag":107,"props":4260,"children":4261},{"style":2365},[4262],{"type":51,"value":3871},{"type":45,"tag":107,"props":4264,"children":4265},{"style":126},[4266],{"type":51,"value":995},{"type":45,"tag":107,"props":4268,"children":4269},{"style":126},[4270],{"type":51,"value":4271}," }\n",{"type":45,"tag":107,"props":4273,"children":4275},{"class":109,"line":4274},27,[4276,4280,4284,4289,4293],{"type":45,"tag":107,"props":4277,"children":4278},{"style":1123},[4279],{"type":51,"value":1372},{"type":45,"tag":107,"props":4281,"children":4282},{"style":126},[4283],{"type":51,"value":129},{"type":45,"tag":107,"props":4285,"children":4286},{"style":120},[4287],{"type":51,"value":4288},"Approval confirmed: ",{"type":45,"tag":107,"props":4290,"children":4291},{"style":132},[4292],{"type":51,"value":4121},{"type":45,"tag":107,"props":4294,"children":4295},{"style":126},[4296],{"type":51,"value":1191},{"type":45,"tag":107,"props":4298,"children":4300},{"class":109,"line":4299},28,[4301],{"type":45,"tag":107,"props":4302,"children":4303},{"style":3660},[4304],{"type":51,"value":3805},{"type":45,"tag":107,"props":4306,"children":4308},{"class":109,"line":4307},29,[4309],{"type":45,"tag":107,"props":4310,"children":4311},{"emptyLinePlaceholder":1295},[4312],{"type":51,"value":1298},{"type":45,"tag":107,"props":4314,"children":4316},{"class":109,"line":4315},30,[4317],{"type":45,"tag":107,"props":4318,"children":4319},{"style":431},[4320],{"type":51,"value":4321},"# 3. Execute the swap (exact-output: receive exactly SWAP_AMOUNT of TOKEN_OUT)\n",{"type":45,"tag":107,"props":4323,"children":4325},{"class":109,"line":4324},31,[4326,4331,4335,4339,4343,4347,4351,4355],{"type":45,"tag":107,"props":4327,"children":4328},{"style":132},[4329],{"type":51,"value":4330},"SWAP_TX",{"type":45,"tag":107,"props":4332,"children":4333},{"style":126},[4334],{"type":51,"value":1562},{"type":45,"tag":107,"props":4336,"children":4337},{"style":114},[4338],{"type":51,"value":831},{"type":45,"tag":107,"props":4340,"children":4341},{"style":120},[4342],{"type":51,"value":3902},{"type":45,"tag":107,"props":4344,"children":4345},{"style":126},[4346],{"type":51,"value":129},{"type":45,"tag":107,"props":4348,"children":4349},{"style":132},[4350],{"type":51,"value":3591},{"type":45,"tag":107,"props":4352,"children":4353},{"style":126},[4354],{"type":51,"value":145},{"type":45,"tag":107,"props":4356,"children":4357},{"style":132},[4358],{"type":51,"value":150},{"type":45,"tag":107,"props":4360,"children":4362},{"class":109,"line":4361},32,[4363,4367,4372,4376,4380,4384,4388,4392,4397,4401,4405,4409,4413],{"type":45,"tag":107,"props":4364,"children":4365},{"style":126},[4366],{"type":51,"value":2380},{"type":45,"tag":107,"props":4368,"children":4369},{"style":120},[4370],{"type":51,"value":4371},"swap(address,address,uint256)",{"type":45,"tag":107,"props":4373,"children":4374},{"style":126},[4375],{"type":51,"value":145},{"type":45,"tag":107,"props":4377,"children":4378},{"style":126},[4379],{"type":51,"value":129},{"type":45,"tag":107,"props":4381,"children":4382},{"style":132},[4383],{"type":51,"value":3546},{"type":45,"tag":107,"props":4385,"children":4386},{"style":126},[4387],{"type":51,"value":145},{"type":45,"tag":107,"props":4389,"children":4390},{"style":126},[4391],{"type":51,"value":129},{"type":45,"tag":107,"props":4393,"children":4394},{"style":132},[4395],{"type":51,"value":4396},"$TOKEN_OUT",{"type":45,"tag":107,"props":4398,"children":4399},{"style":126},[4400],{"type":51,"value":145},{"type":45,"tag":107,"props":4402,"children":4403},{"style":126},[4404],{"type":51,"value":129},{"type":45,"tag":107,"props":4406,"children":4407},{"style":132},[4408],{"type":51,"value":3844},{"type":45,"tag":107,"props":4410,"children":4411},{"style":126},[4412],{"type":51,"value":145},{"type":45,"tag":107,"props":4414,"children":4415},{"style":132},[4416],{"type":51,"value":150},{"type":45,"tag":107,"props":4418,"children":4420},{"class":109,"line":4419},33,[4421,4426,4430,4434,4438,4442,4446,4450,4454],{"type":45,"tag":107,"props":4422,"children":4423},{"style":120},[4424],{"type":51,"value":4425},"  --account",{"type":45,"tag":107,"props":4427,"children":4428},{"style":126},[4429],{"type":51,"value":129},{"type":45,"tag":107,"props":4431,"children":4432},{"style":132},[4433],{"type":51,"value":3991},{"type":45,"tag":107,"props":4435,"children":4436},{"style":126},[4437],{"type":51,"value":145},{"type":45,"tag":107,"props":4439,"children":4440},{"style":120},[4441],{"type":51,"value":4000},{"type":45,"tag":107,"props":4443,"children":4444},{"style":126},[4445],{"type":51,"value":129},{"type":45,"tag":107,"props":4447,"children":4448},{"style":132},[4449],{"type":51,"value":4009},{"type":45,"tag":107,"props":4451,"children":4452},{"style":126},[4453],{"type":51,"value":145},{"type":45,"tag":107,"props":4455,"children":4456},{"style":132},[4457],{"type":51,"value":150},{"type":45,"tag":107,"props":4459,"children":4461},{"class":109,"line":4460},34,[4462,4466,4470,4474,4478,4482,4487],{"type":45,"tag":107,"props":4463,"children":4464},{"style":120},[4465],{"type":51,"value":2414},{"type":45,"tag":107,"props":4467,"children":4468},{"style":126},[4469],{"type":51,"value":129},{"type":45,"tag":107,"props":4471,"children":4472},{"style":132},[4473],{"type":51,"value":3615},{"type":45,"tag":107,"props":4475,"children":4476},{"style":126},[4477],{"type":51,"value":145},{"type":45,"tag":107,"props":4479,"children":4480},{"style":120},[4481],{"type":51,"value":4043},{"type":45,"tag":107,"props":4483,"children":4484},{"style":2365},[4485],{"type":51,"value":4486}," 200000",{"type":45,"tag":107,"props":4488,"children":4489},{"style":132},[4490],{"type":51,"value":150},{"type":45,"tag":107,"props":4492,"children":4493},{"class":109,"line":28},[4494,4498,4502,4506,4510,4514,4518,4522],{"type":45,"tag":107,"props":4495,"children":4496},{"style":120},[4497],{"type":51,"value":598},{"type":45,"tag":107,"props":4499,"children":4500},{"style":126},[4501],{"type":51,"value":1418},{"type":45,"tag":107,"props":4503,"children":4504},{"style":114},[4505],{"type":51,"value":1736},{"type":45,"tag":107,"props":4507,"children":4508},{"style":120},[4509],{"type":51,"value":1741},{"type":45,"tag":107,"props":4511,"children":4512},{"style":126},[4513],{"type":51,"value":603},{"type":45,"tag":107,"props":4515,"children":4516},{"style":120},[4517],{"type":51,"value":4082},{"type":45,"tag":107,"props":4519,"children":4520},{"style":126},[4521],{"type":51,"value":613},{"type":45,"tag":107,"props":4523,"children":4524},{"style":126},[4525],{"type":51,"value":1633},{"type":45,"tag":107,"props":4527,"children":4529},{"class":109,"line":4528},36,[4530],{"type":45,"tag":107,"props":4531,"children":4532},{"emptyLinePlaceholder":1295},[4533],{"type":51,"value":1298},{"type":45,"tag":107,"props":4535,"children":4537},{"class":109,"line":4536},37,[4538,4543,4547,4551,4555,4559,4564,4568,4572,4576,4580,4584,4588,4592,4596,4600,4604,4608,4612],{"type":45,"tag":107,"props":4539,"children":4540},{"style":132},[4541],{"type":51,"value":4542},"SWAP_STATUS",{"type":45,"tag":107,"props":4544,"children":4545},{"style":126},[4546],{"type":51,"value":1562},{"type":45,"tag":107,"props":4548,"children":4549},{"style":114},[4550],{"type":51,"value":831},{"type":45,"tag":107,"props":4552,"children":4553},{"style":120},[4554],{"type":51,"value":4112},{"type":45,"tag":107,"props":4556,"children":4557},{"style":126},[4558],{"type":51,"value":129},{"type":45,"tag":107,"props":4560,"children":4561},{"style":132},[4562],{"type":51,"value":4563},"$SWAP_TX",{"type":45,"tag":107,"props":4565,"children":4566},{"style":126},[4567],{"type":51,"value":145},{"type":45,"tag":107,"props":4569,"children":4570},{"style":120},[4571],{"type":51,"value":1235},{"type":45,"tag":107,"props":4573,"children":4574},{"style":126},[4575],{"type":51,"value":129},{"type":45,"tag":107,"props":4577,"children":4578},{"style":132},[4579],{"type":51,"value":3615},{"type":45,"tag":107,"props":4581,"children":4582},{"style":126},[4583],{"type":51,"value":145},{"type":45,"tag":107,"props":4585,"children":4586},{"style":120},[4587],{"type":51,"value":4146},{"type":45,"tag":107,"props":4589,"children":4590},{"style":126},[4591],{"type":51,"value":1418},{"type":45,"tag":107,"props":4593,"children":4594},{"style":114},[4595],{"type":51,"value":1736},{"type":45,"tag":107,"props":4597,"children":4598},{"style":120},[4599],{"type":51,"value":1741},{"type":45,"tag":107,"props":4601,"children":4602},{"style":126},[4603],{"type":51,"value":603},{"type":45,"tag":107,"props":4605,"children":4606},{"style":120},[4607],{"type":51,"value":4167},{"type":45,"tag":107,"props":4609,"children":4610},{"style":126},[4611],{"type":51,"value":613},{"type":45,"tag":107,"props":4613,"children":4614},{"style":126},[4615],{"type":51,"value":1633},{"type":45,"tag":107,"props":4617,"children":4619},{"class":109,"line":4618},38,[4620,4624,4628,4633,4637,4641,4645,4649,4653,4657,4661,4665,4669,4673,4678,4682,4686,4690,4694,4698,4702],{"type":45,"tag":107,"props":4621,"children":4622},{"style":126},[4623],{"type":51,"value":3732},{"type":45,"tag":107,"props":4625,"children":4626},{"style":126},[4627],{"type":51,"value":129},{"type":45,"tag":107,"props":4629,"children":4630},{"style":132},[4631],{"type":51,"value":4632},"$SWAP_STATUS",{"type":45,"tag":107,"props":4634,"children":4635},{"style":126},[4636],{"type":51,"value":145},{"type":45,"tag":107,"props":4638,"children":4639},{"style":126},[4640],{"type":51,"value":4202},{"type":45,"tag":107,"props":4642,"children":4643},{"style":126},[4644],{"type":51,"value":129},{"type":45,"tag":107,"props":4646,"children":4647},{"style":120},[4648],{"type":51,"value":4211},{"type":45,"tag":107,"props":4650,"children":4651},{"style":126},[4652],{"type":51,"value":145},{"type":45,"tag":107,"props":4654,"children":4655},{"style":126},[4656],{"type":51,"value":3691},{"type":45,"tag":107,"props":4658,"children":4659},{"style":126},[4660],{"type":51,"value":1263},{"type":45,"tag":107,"props":4662,"children":4663},{"style":126},[4664],{"type":51,"value":4228},{"type":45,"tag":107,"props":4666,"children":4667},{"style":1123},[4668],{"type":51,"value":1268},{"type":45,"tag":107,"props":4670,"children":4671},{"style":126},[4672],{"type":51,"value":129},{"type":45,"tag":107,"props":4674,"children":4675},{"style":120},[4676],{"type":51,"value":4677},"ERROR: On-Tempo swap reverted: ",{"type":45,"tag":107,"props":4679,"children":4680},{"style":132},[4681],{"type":51,"value":4563},{"type":45,"tag":107,"props":4683,"children":4684},{"style":126},[4685],{"type":51,"value":145},{"type":45,"tag":107,"props":4687,"children":4688},{"style":126},[4689],{"type":51,"value":995},{"type":45,"tag":107,"props":4691,"children":4692},{"style":1123},[4693],{"type":51,"value":4258},{"type":45,"tag":107,"props":4695,"children":4696},{"style":2365},[4697],{"type":51,"value":3871},{"type":45,"tag":107,"props":4699,"children":4700},{"style":126},[4701],{"type":51,"value":995},{"type":45,"tag":107,"props":4703,"children":4704},{"style":126},[4705],{"type":51,"value":4271},{"type":45,"tag":107,"props":4707,"children":4709},{"class":109,"line":4708},39,[4710,4714,4718,4723,4727],{"type":45,"tag":107,"props":4711,"children":4712},{"style":1123},[4713],{"type":51,"value":1567},{"type":45,"tag":107,"props":4715,"children":4716},{"style":126},[4717],{"type":51,"value":129},{"type":45,"tag":107,"props":4719,"children":4720},{"style":120},[4721],{"type":51,"value":4722},"On-Tempo swap confirmed: ",{"type":45,"tag":107,"props":4724,"children":4725},{"style":132},[4726],{"type":51,"value":4563},{"type":45,"tag":107,"props":4728,"children":4729},{"style":126},[4730],{"type":51,"value":1191},{"type":45,"tag":277,"props":4732,"children":4733},{},[4734,4751],{"type":45,"tag":54,"props":4735,"children":4736},{},[4737,4742,4744,4749],{"type":45,"tag":60,"props":4738,"children":4739},{},[4740],{"type":51,"value":4741},"Confirmation gate:",{"type":51,"value":4743}," Use ",{"type":45,"tag":103,"props":4745,"children":4747},{"className":4746},[],[4748],{"type":51,"value":1090},{"type":51,"value":4750}," before every transaction\n(approval and swap). Show token addresses, amounts in human-readable form, and\nestimated gas on Tempo.",{"type":45,"tag":54,"props":4752,"children":4753},{},[4754,4759,4761,4767],{"type":45,"tag":60,"props":4755,"children":4756},{},[4757],{"type":51,"value":4758},"Gas limit note:",{"type":51,"value":4760}," Tempo chain gas estimation is sometimes unreliable — always\nset an explicit ",{"type":45,"tag":103,"props":4762,"children":4764},{"className":4763},[],[4765],{"type":51,"value":4766},"--gas-limit",{"type":51,"value":4768}," for Tempo transactions.",{"type":45,"tag":54,"props":4770,"children":4771},{},[4772,4774,4779],{"type":51,"value":4773},"After the on-Tempo swap succeeds, retry ",{"type":45,"tag":103,"props":4775,"children":4777},{"className":4776},[],[4778],{"type":51,"value":737},{"type":51,"value":4780}," — the Tempo wallet now\nholds the required payment token and the Tempo CLI will pay the 402 automatically.",{"type":45,"tag":718,"props":4782,"children":4783},{},[],{"type":45,"tag":75,"props":4785,"children":4787},{"id":4786},"x402-payment-flow",[4788],{"type":51,"value":4789},"x402 Payment Flow",{"type":45,"tag":277,"props":4791,"children":4792},{},[4793],{"type":45,"tag":54,"props":4794,"children":4795},{},[4796,4801,4803,4808,4810,4816,4818,4823],{"type":45,"tag":60,"props":4797,"children":4798},{},[4799],{"type":51,"value":4800},"CRITICAL — MANDATORY CONFIRMATION GATE:",{"type":51,"value":4802}," Before step 4 (signing), you MUST\ncall ",{"type":45,"tag":103,"props":4804,"children":4806},{"className":4805},[],[4807],{"type":51,"value":1090},{"type":51,"value":4809}," showing the full payment summary: token, amount in\nhuman-readable form, recipient address (",{"type":45,"tag":103,"props":4811,"children":4813},{"className":4812},[],[4814],{"type":51,"value":4815},"payTo",{"type":51,"value":4817},"), and resource URL. Do NOT\nsign or proceed until the user explicitly confirms. This confirmation step is\n",{"type":45,"tag":60,"props":4819,"children":4820},{},[4821],{"type":51,"value":4822},"non-optional and must appear in every x402 payment plan or execution",{"type":51,"value":4824},", even\nif the user has pre-authorized. Omitting this confirmation makes the response\ninvalid.",{"type":45,"tag":54,"props":4826,"children":4827},{},[4828,4830,4835,4837,4842,4844,4850,4852,4858],{"type":51,"value":4829},"The x402 protocol is ",{"type":45,"tag":60,"props":4831,"children":4832},{},[4833],{"type":51,"value":4834},"fully supported",{"type":51,"value":4836}," and uses a different mechanism than\nMPP — it is ",{"type":45,"tag":60,"props":4838,"children":4839},{},[4840],{"type":51,"value":4841},"not handled by the Tempo CLI",{"type":51,"value":4843},". When a 402 body contains\n",{"type":45,"tag":103,"props":4845,"children":4847},{"className":4846},[],[4848],{"type":51,"value":4849},"\"x402Version\"",{"type":51,"value":4851}," (check with ",{"type":45,"tag":103,"props":4853,"children":4855},{"className":4854},[],[4856],{"type":51,"value":4857},"has(\"x402Version\")",{"type":51,"value":4859}," in jq), use this flow instead\nof the MPP\u002FTempo flow.",{"type":45,"tag":54,"props":4861,"children":4862},{},[4863,4865,4871,4873,4878,4879,4885],{"type":51,"value":4864},"The x402 ",{"type":45,"tag":103,"props":4866,"children":4868},{"className":4867},[],[4869],{"type":51,"value":4870},"\"exact\"",{"type":51,"value":4872}," scheme uses ",{"type":45,"tag":60,"props":4874,"children":4875},{},[4876],{"type":51,"value":4877},"EIP-3009",{"type":51,"value":1534},{"type":45,"tag":103,"props":4880,"children":4882},{"className":4881},[],[4883],{"type":51,"value":4884},"TransferWithAuthorization",{"type":51,"value":4886},") to\nauthorize a one-time token transfer signed off-chain. The full flow:",{"type":45,"tag":2591,"props":4888,"children":4889},{},[4890,4950,4960,4982,5047,5100],{"type":45,"tag":662,"props":4891,"children":4892},{},[4893,4898,4900,4906,4907,4913,4914,4920,4921,4927,4928,4934,4935,4941,4942,4948],{"type":45,"tag":60,"props":4894,"children":4895},{},[4896],{"type":51,"value":4897},"Detect x402",{"type":51,"value":4899},": parse ",{"type":45,"tag":103,"props":4901,"children":4903},{"className":4902},[],[4904],{"type":51,"value":4905},"x402Version",{"type":51,"value":997},{"type":45,"tag":103,"props":4908,"children":4910},{"className":4909},[],[4911],{"type":51,"value":4912},"accepts[].scheme",{"type":51,"value":997},{"type":45,"tag":103,"props":4915,"children":4917},{"className":4916},[],[4918],{"type":51,"value":4919},"accepts[].network",{"type":51,"value":1019},{"type":45,"tag":103,"props":4922,"children":4924},{"className":4923},[],[4925],{"type":51,"value":4926},"accepts[].maxAmountRequired",{"type":51,"value":997},{"type":45,"tag":103,"props":4929,"children":4931},{"className":4930},[],[4932],{"type":51,"value":4933},"accepts[].payTo",{"type":51,"value":997},{"type":45,"tag":103,"props":4936,"children":4938},{"className":4937},[],[4939],{"type":51,"value":4940},"accepts[].asset",{"type":51,"value":1019},{"type":45,"tag":103,"props":4943,"children":4945},{"className":4944},[],[4946],{"type":51,"value":4947},"accepts[].extra",{"type":51,"value":4949}," (token name + version for EIP-3009 domain).",{"type":45,"tag":662,"props":4951,"children":4952},{},[4953,4958],{"type":45,"tag":60,"props":4954,"children":4955},{},[4956],{"type":51,"value":4957},"Check balance",{"type":51,"value":4959}," on the target chain; fund via Phase 4A\u002F4B if insufficient.",{"type":45,"tag":662,"props":4961,"children":4962},{},[4963,4973,4975,4980],{"type":45,"tag":60,"props":4964,"children":4965},{},[4966,4968],{"type":51,"value":4967},"MANDATORY CONFIRMATION GATE — Call ",{"type":45,"tag":103,"props":4969,"children":4971},{"className":4970},[],[4972],{"type":51,"value":1090},{"type":51,"value":4974}," before signing:\npresent the full payment summary (token name, amount in human-readable form,\n",{"type":45,"tag":103,"props":4976,"children":4978},{"className":4977},[],[4979],{"type":51,"value":4815},{"type":51,"value":4981}," address, resource URL, validity window). Wait for explicit user\nconfirmation. Do NOT proceed to step 4 until confirmed.",{"type":45,"tag":662,"props":4983,"children":4984},{},[4985,4995,4997,5003,5004,5010,5011,5017,5018,5024,5025,5031,5032,5038,5040,5046],{"type":45,"tag":60,"props":4986,"children":4987},{},[4988,4990],{"type":51,"value":4989},"Sign EIP-3009 ",{"type":45,"tag":103,"props":4991,"children":4993},{"className":4992},[],[4994],{"type":51,"value":4884},{"type":51,"value":4996},": typed-data fields include\n",{"type":45,"tag":103,"props":4998,"children":5000},{"className":4999},[],[5001],{"type":51,"value":5002},"from",{"type":51,"value":997},{"type":45,"tag":103,"props":5005,"children":5007},{"className":5006},[],[5008],{"type":51,"value":5009},"to",{"type":51,"value":997},{"type":45,"tag":103,"props":5012,"children":5014},{"className":5013},[],[5015],{"type":51,"value":5016},"value",{"type":51,"value":997},{"type":45,"tag":103,"props":5019,"children":5021},{"className":5020},[],[5022],{"type":51,"value":5023},"validAfter",{"type":51,"value":997},{"type":45,"tag":103,"props":5026,"children":5028},{"className":5027},[],[5029],{"type":51,"value":5030},"validBefore",{"type":51,"value":997},{"type":45,"tag":103,"props":5033,"children":5035},{"className":5034},[],[5036],{"type":51,"value":5037},"nonce",{"type":51,"value":5039},".\nSet ",{"type":45,"tag":103,"props":5041,"children":5043},{"className":5042},[],[5044],{"type":51,"value":5045},"validBefore = now + maxTimeoutSeconds",{"type":51,"value":73},{"type":45,"tag":662,"props":5048,"children":5049},{},[5050,5063,5065,5070,5071,5077,5078,5084,5085,5091,5093,5099],{"type":45,"tag":60,"props":5051,"children":5052},{},[5053,5055,5061],{"type":51,"value":5054},"Construct ",{"type":45,"tag":103,"props":5056,"children":5058},{"className":5057},[],[5059],{"type":51,"value":5060},"X-PAYMENT",{"type":51,"value":5062}," header",{"type":51,"value":5064},": base64-encode a JSON payload containing\n",{"type":45,"tag":103,"props":5066,"children":5068},{"className":5067},[],[5069],{"type":51,"value":4905},{"type":51,"value":997},{"type":45,"tag":103,"props":5072,"children":5074},{"className":5073},[],[5075],{"type":51,"value":5076},"scheme",{"type":51,"value":997},{"type":45,"tag":103,"props":5079,"children":5081},{"className":5080},[],[5082],{"type":51,"value":5083},"network",{"type":51,"value":997},{"type":45,"tag":103,"props":5086,"children":5088},{"className":5087},[],[5089],{"type":51,"value":5090},"payload",{"type":51,"value":5092}," (the signed authorization),\nand ",{"type":45,"tag":103,"props":5094,"children":5096},{"className":5095},[],[5097],{"type":51,"value":5098},"signature",{"type":51,"value":73},{"type":45,"tag":662,"props":5101,"children":5102},{},[5103,5108,5110,5115],{"type":45,"tag":60,"props":5104,"children":5105},{},[5106],{"type":51,"value":5107},"Retry",{"type":51,"value":5109}," the original request with the ",{"type":45,"tag":103,"props":5111,"children":5113},{"className":5112},[],[5114],{"type":51,"value":5060},{"type":51,"value":5116}," header.",{"type":45,"tag":277,"props":5118,"children":5119},{},[5120],{"type":45,"tag":54,"props":5121,"children":5122},{},[5123,5127,5128,5134],{"type":45,"tag":60,"props":5124,"children":5125},{},[5126],{"type":51,"value":2919},{"type":51,"value":2921},{"type":45,"tag":806,"props":5129,"children":5131},{"href":5130},"references\u002Fcredential-construction.md#phase-6x--x402-payment",[5132],{"type":51,"value":5133},"references\u002Fcredential-construction.md",{"type":51,"value":5135},"\nfor full bash code: prerequisite checks, nonce generation, EIP-3009 signing,\nX-PAYMENT payload construction, and retry.",{"type":45,"tag":54,"props":5137,"children":5138},{},[5139],{"type":51,"value":2934},{"type":45,"tag":658,"props":5141,"children":5142},{},[5143,5162,5175,5180,5192,5224,5229],{"type":45,"tag":662,"props":5144,"children":5145},{},[5146,5148,5153,5155,5160],{"type":51,"value":5147},"Detect x402: check ",{"type":45,"tag":103,"props":5149,"children":5151},{"className":5150},[],[5152],{"type":51,"value":4857},{"type":51,"value":5154}," in 402 body ",{"type":45,"tag":60,"props":5156,"children":5157},{},[5158],{"type":51,"value":5159},"before",{"type":51,"value":5161}," attempting Tempo CLI",{"type":45,"tag":662,"props":5163,"children":5164},{},[5165,5167,5173],{"type":51,"value":5166},"Maps ",{"type":45,"tag":103,"props":5168,"children":5170},{"className":5169},[],[5171],{"type":51,"value":5172},"X402_NETWORK",{"type":51,"value":5174}," to chain ID and RPC URL (base, ethereum, tempo all supported)",{"type":45,"tag":662,"props":5176,"children":5177},{},[5178],{"type":51,"value":5179},"Checks wallet balance on target chain; runs Phase 4A\u002F4B\u002F5 if insufficient",{"type":45,"tag":662,"props":5181,"children":5182},{},[5183,5185,5190],{"type":51,"value":5184},"Signs ",{"type":45,"tag":103,"props":5186,"children":5188},{"className":5187},[],[5189],{"type":51,"value":4884},{"type":51,"value":5191}," typed data using the token's own EIP-712 domain",{"type":45,"tag":662,"props":5193,"children":5194},{},[5195,5200,5202,5207,5208,5214,5216,5222],{"type":45,"tag":103,"props":5196,"children":5198},{"className":5197},[],[5199],{"type":51,"value":5016},{"type":51,"value":5201}," in the typed-data payload must be a ",{"type":45,"tag":60,"props":5203,"children":5204},{},[5205],{"type":51,"value":5206},"string",{"type":51,"value":1534},{"type":45,"tag":103,"props":5209,"children":5211},{"className":5210},[],[5212],{"type":51,"value":5213},"--arg",{"type":51,"value":5215},", not ",{"type":45,"tag":103,"props":5217,"children":5219},{"className":5218},[],[5220],{"type":51,"value":5221},"--argjson",{"type":51,"value":5223},") for uint256",{"type":45,"tag":662,"props":5225,"children":5226},{},[5227],{"type":51,"value":5228},"Confirmation gate required before signing",{"type":45,"tag":662,"props":5230,"children":5231},{},[5232,5234,5239,5241],{"type":51,"value":5233},"Send the result in ",{"type":45,"tag":103,"props":5235,"children":5237},{"className":5236},[],[5238],{"type":51,"value":5060},{"type":51,"value":5240}," header (base64-encoded), not ",{"type":45,"tag":103,"props":5242,"children":5244},{"className":5243},[],[5245],{"type":51,"value":5246},"Authorization",{"type":45,"tag":5248,"props":5249,"children":5250},"table",{},[5251,5275],{"type":45,"tag":5252,"props":5253,"children":5254},"thead",{},[5255],{"type":45,"tag":5256,"props":5257,"children":5258},"tr",{},[5259,5265,5270],{"type":45,"tag":5260,"props":5261,"children":5262},"th",{},[5263],{"type":51,"value":5264},"Protocol",{"type":45,"tag":5260,"props":5266,"children":5267},{},[5268],{"type":51,"value":5269},"Version",{"type":45,"tag":5260,"props":5271,"children":5272},{},[5273],{"type":51,"value":5274},"Handler",{"type":45,"tag":5276,"props":5277,"children":5278},"tbody",{},[5279,5297],{"type":45,"tag":5256,"props":5280,"children":5281},{},[5282,5288,5293],{"type":45,"tag":5283,"props":5284,"children":5285},"td",{},[5286],{"type":51,"value":5287},"MPP",{"type":45,"tag":5283,"props":5289,"children":5290},{},[5291],{"type":51,"value":5292},"v1",{"type":45,"tag":5283,"props":5294,"children":5295},{},[5296],{"type":51,"value":64},{"type":45,"tag":5256,"props":5298,"children":5299},{},[5300,5304,5308],{"type":45,"tag":5283,"props":5301,"children":5302},{},[5303],{"type":51,"value":13},{"type":45,"tag":5283,"props":5305,"children":5306},{},[5307],{"type":51,"value":5292},{"type":45,"tag":5283,"props":5309,"children":5310},{},[5311],{"type":51,"value":5312},"EIP-3009 manual flow",{"type":45,"tag":718,"props":5314,"children":5315},{},[],{"type":45,"tag":75,"props":5317,"children":5319},{"id":5318},"error-handling",[5320],{"type":51,"value":5321},"Error Handling",{"type":45,"tag":5248,"props":5323,"children":5324},{},[5325,5341],{"type":45,"tag":5252,"props":5326,"children":5327},{},[5328],{"type":45,"tag":5256,"props":5329,"children":5330},{},[5331,5336],{"type":45,"tag":5260,"props":5332,"children":5333},{},[5334],{"type":51,"value":5335},"Situation",{"type":45,"tag":5260,"props":5337,"children":5338},{},[5339],{"type":51,"value":5340},"Action",{"type":45,"tag":5276,"props":5342,"children":5343},{},[5344,5361,5384,5405,5436,5449,5462,5475,5494,5507,5520,5533,5546,5559,5572,5585,5598],{"type":45,"tag":5256,"props":5345,"children":5346},{},[5347,5356],{"type":45,"tag":5283,"props":5348,"children":5349},{},[5350],{"type":45,"tag":103,"props":5351,"children":5353},{"className":5352},[],[5354],{"type":51,"value":5355},"tempo: command not found",{"type":45,"tag":5283,"props":5357,"children":5358},{},[5359],{"type":51,"value":5360},"Reinstall via install script; use full path",{"type":45,"tag":5256,"props":5362,"children":5363},{},[5364,5373],{"type":45,"tag":5283,"props":5365,"children":5366},{},[5367],{"type":45,"tag":103,"props":5368,"children":5370},{"className":5369},[],[5371],{"type":51,"value":5372},"legacy V1 keychain signature",{"type":45,"tag":5283,"props":5374,"children":5375},{},[5376,5378],{"type":51,"value":5377},"Reinstall; ",{"type":45,"tag":103,"props":5379,"children":5381},{"className":5380},[],[5382],{"type":51,"value":5383},"tempo update wallet && tempo update request",{"type":45,"tag":5256,"props":5385,"children":5386},{},[5387,5396],{"type":45,"tag":5283,"props":5388,"children":5389},{},[5390],{"type":45,"tag":103,"props":5391,"children":5393},{"className":5392},[],[5394],{"type":51,"value":5395},"access key does not exist",{"type":45,"tag":5283,"props":5397,"children":5398},{},[5399],{"type":45,"tag":103,"props":5400,"children":5402},{"className":5401},[],[5403],{"type":51,"value":5404},"tempo wallet logout --yes && tempo wallet login",{"type":45,"tag":5256,"props":5406,"children":5407},{},[5408,5419],{"type":45,"tag":5283,"props":5409,"children":5410},{},[5411,5417],{"type":45,"tag":103,"props":5412,"children":5414},{"className":5413},[],[5415],{"type":51,"value":5416},"ready=false",{"type":51,"value":5418}," \u002F no wallet",{"type":45,"tag":5283,"props":5420,"children":5421},{},[5422,5428,5430],{"type":45,"tag":103,"props":5423,"children":5425},{"className":5424},[],[5426],{"type":51,"value":5427},"tempo wallet login",{"type":51,"value":5429},", then ",{"type":45,"tag":103,"props":5431,"children":5433},{"className":5432},[],[5434],{"type":51,"value":5435},"whoami",{"type":45,"tag":5256,"props":5437,"children":5438},{},[5439,5444],{"type":45,"tag":5283,"props":5440,"children":5441},{},[5442],{"type":51,"value":5443},"HTTP 422 from service",{"type":45,"tag":5283,"props":5445,"children":5446},{},[5447],{"type":51,"value":5448},"Check service details + llms.txt for exact field names",{"type":45,"tag":5256,"props":5450,"children":5451},{},[5452,5457],{"type":45,"tag":5283,"props":5453,"children":5454},{},[5455],{"type":51,"value":5456},"Balance 0 \u002F insufficient",{"type":45,"tag":5283,"props":5458,"children":5459},{},[5460],{"type":51,"value":5461},"Trigger pay-with-any-token funding flow",{"type":45,"tag":5256,"props":5463,"children":5464},{},[5465,5470],{"type":45,"tag":5283,"props":5466,"children":5467},{},[5468],{"type":51,"value":5469},"Service not found",{"type":45,"tag":5283,"props":5471,"children":5472},{},[5473],{"type":51,"value":5474},"Broaden search query",{"type":45,"tag":5256,"props":5476,"children":5477},{},[5478,5483],{"type":45,"tag":5283,"props":5479,"children":5480},{},[5481],{"type":51,"value":5482},"Timeout",{"type":45,"tag":5283,"props":5484,"children":5485},{},[5486,5488],{"type":51,"value":5487},"Retry with ",{"type":45,"tag":103,"props":5489,"children":5491},{"className":5490},[],[5492],{"type":51,"value":5493},"-m \u003Cseconds>",{"type":45,"tag":5256,"props":5495,"children":5496},{},[5497,5502],{"type":45,"tag":5283,"props":5498,"children":5499},{},[5500],{"type":51,"value":5501},"Challenge body is malformed",{"type":45,"tag":5283,"props":5503,"children":5504},{},[5505],{"type":51,"value":5506},"Report raw body to user; do not proceed",{"type":45,"tag":5256,"props":5508,"children":5509},{},[5510,5515],{"type":45,"tag":5283,"props":5511,"children":5512},{},[5513],{"type":51,"value":5514},"Approval transaction fails",{"type":45,"tag":5283,"props":5516,"children":5517},{},[5518],{"type":51,"value":5519},"Surface error; check gas and allowances",{"type":45,"tag":5256,"props":5521,"children":5522},{},[5523,5528],{"type":45,"tag":5283,"props":5524,"children":5525},{},[5526],{"type":51,"value":5527},"Quote API returns 400",{"type":45,"tag":5283,"props":5529,"children":5530},{},[5531],{"type":51,"value":5532},"Log request\u002Fresponse; check amount formatting",{"type":45,"tag":5256,"props":5534,"children":5535},{},[5536,5541],{"type":45,"tag":5283,"props":5537,"children":5538},{},[5539],{"type":51,"value":5540},"Quote API returns 429",{"type":45,"tag":5283,"props":5542,"children":5543},{},[5544],{"type":51,"value":5545},"Wait and retry with exponential backoff",{"type":45,"tag":5256,"props":5547,"children":5548},{},[5549,5554],{"type":45,"tag":5283,"props":5550,"children":5551},{},[5552],{"type":51,"value":5553},"Swap data is empty after \u002Fswap",{"type":45,"tag":5283,"props":5555,"children":5556},{},[5557],{"type":51,"value":5558},"Quote expired; re-fetch quote",{"type":45,"tag":5256,"props":5560,"children":5561},{},[5562,5567],{"type":45,"tag":5283,"props":5563,"children":5564},{},[5565],{"type":51,"value":5566},"Bridge times out",{"type":45,"tag":5283,"props":5568,"children":5569},{},[5570],{"type":51,"value":5571},"Check bridge explorer; do not re-submit",{"type":45,"tag":5256,"props":5573,"children":5574},{},[5575,5580],{"type":45,"tag":5283,"props":5576,"children":5577},{},[5578],{"type":51,"value":5579},"x402 payment rejected (402)",{"type":45,"tag":5283,"props":5581,"children":5582},{},[5583],{"type":51,"value":5584},"Check domain name\u002Fversion, validBefore, nonce freshness",{"type":45,"tag":5256,"props":5586,"children":5587},{},[5588,5593],{"type":45,"tag":5283,"props":5589,"children":5590},{},[5591],{"type":51,"value":5592},"InsufficientBalance on Tempo",{"type":45,"tag":5283,"props":5594,"children":5595},{},[5596],{"type":51,"value":5597},"Swap more tokens on Tempo, then retry",{"type":45,"tag":5256,"props":5599,"children":5600},{},[5601,5611],{"type":45,"tag":5283,"props":5602,"children":5603},{},[5604,5609],{"type":45,"tag":103,"props":5605,"children":5607},{"className":5606},[],[5608],{"type":51,"value":3237},{"type":51,"value":5610}," sufficient but payment fails",{"type":45,"tag":5283,"props":5612,"children":5613},{},[5614],{"type":51,"value":5615},"Apply 2x buffer; top up before retrying",{"type":45,"tag":718,"props":5617,"children":5618},{},[],{"type":45,"tag":75,"props":5620,"children":5622},{"id":5621},"key-addresses-and-references",[5623],{"type":51,"value":5624},"Key Addresses and References",{"type":45,"tag":658,"props":5626,"children":5627},{},[5628,5652,5666,5681,5696,5711,5727,5741,5756,5771,5786,5799,5814,5836,5851,5866,5881,5896,5911,5927,5942,5952],{"type":45,"tag":662,"props":5629,"children":5630},{},[5631,5635,5637,5643,5645,5651],{"type":45,"tag":60,"props":5632,"children":5633},{},[5634],{"type":51,"value":64},{"type":51,"value":5636},": ",{"type":45,"tag":103,"props":5638,"children":5640},{"className":5639},[],[5641],{"type":51,"value":5642},"https:\u002F\u002Ftempo.xyz",{"type":51,"value":5644}," (install script: ",{"type":45,"tag":103,"props":5646,"children":5648},{"className":5647},[],[5649],{"type":51,"value":5650},"https:\u002F\u002Ftempo.xyz\u002Finstall",{"type":51,"value":815},{"type":45,"tag":662,"props":5653,"children":5654},{},[5655,5660,5661],{"type":45,"tag":60,"props":5656,"children":5657},{},[5658],{"type":51,"value":5659},"Trading API",{"type":51,"value":5636},{"type":45,"tag":103,"props":5662,"children":5664},{"className":5663},[],[5665],{"type":51,"value":2948},{"type":45,"tag":662,"props":5667,"children":5668},{},[5669,5674,5675],{"type":45,"tag":60,"props":5670,"children":5671},{},[5672],{"type":51,"value":5673},"MPP docs",{"type":51,"value":5636},{"type":45,"tag":103,"props":5676,"children":5678},{"className":5677},[],[5679],{"type":51,"value":5680},"https:\u002F\u002Fmpp.dev",{"type":45,"tag":662,"props":5682,"children":5683},{},[5684,5689,5690],{"type":45,"tag":60,"props":5685,"children":5686},{},[5687],{"type":51,"value":5688},"MPP services catalog",{"type":51,"value":5636},{"type":45,"tag":103,"props":5691,"children":5693},{"className":5692},[],[5694],{"type":51,"value":5695},"https:\u002F\u002Fmpp.dev\u002Fapi\u002Fservices",{"type":45,"tag":662,"props":5697,"children":5698},{},[5699,5704,5705],{"type":45,"tag":60,"props":5700,"children":5701},{},[5702],{"type":51,"value":5703},"Tempo documentation",{"type":51,"value":5636},{"type":45,"tag":103,"props":5706,"children":5708},{"className":5707},[],[5709],{"type":51,"value":5710},"https:\u002F\u002Fmainnet.docs.tempo.xyz",{"type":45,"tag":662,"props":5712,"children":5713},{},[5714,5719,5720,5725],{"type":45,"tag":60,"props":5715,"children":5716},{},[5717],{"type":51,"value":5718},"Tempo chain ID",{"type":51,"value":5636},{"type":45,"tag":103,"props":5721,"children":5723},{"className":5722},[],[5724],{"type":51,"value":2197},{"type":51,"value":5726}," (Tempo mainnet)",{"type":45,"tag":662,"props":5728,"children":5729},{},[5730,5735,5736],{"type":45,"tag":60,"props":5731,"children":5732},{},[5733],{"type":51,"value":5734},"Tempo RPC",{"type":51,"value":5636},{"type":45,"tag":103,"props":5737,"children":5739},{"className":5738},[],[5740],{"type":51,"value":3367},{"type":45,"tag":662,"props":5742,"children":5743},{},[5744,5749,5750],{"type":45,"tag":60,"props":5745,"children":5746},{},[5747],{"type":51,"value":5748},"Tempo Block Explorer",{"type":51,"value":5636},{"type":45,"tag":103,"props":5751,"children":5753},{"className":5752},[],[5754],{"type":51,"value":5755},"https:\u002F\u002Fexplore.mainnet.tempo.xyz",{"type":45,"tag":662,"props":5757,"children":5758},{},[5759,5764,5765],{"type":45,"tag":60,"props":5760,"children":5761},{},[5762],{"type":51,"value":5763},"pathUSD on Tempo",{"type":51,"value":5636},{"type":45,"tag":103,"props":5766,"children":5768},{"className":5767},[],[5769],{"type":51,"value":5770},"0x20c0000000000000000000000000000000000000",{"type":45,"tag":662,"props":5772,"children":5773},{},[5774,5779,5780],{"type":45,"tag":60,"props":5775,"children":5776},{},[5777],{"type":51,"value":5778},"USDC.e on Tempo",{"type":51,"value":5636},{"type":45,"tag":103,"props":5781,"children":5783},{"className":5782},[],[5784],{"type":51,"value":5785},"0x20C000000000000000000000b9537d11c60E8b50",{"type":45,"tag":662,"props":5787,"children":5788},{},[5789,5793,5794],{"type":45,"tag":60,"props":5790,"children":5791},{},[5792],{"type":51,"value":3330},{"type":51,"value":5636},{"type":45,"tag":103,"props":5795,"children":5797},{"className":5796},[],[5798],{"type":51,"value":3337},{"type":45,"tag":662,"props":5800,"children":5801},{},[5802,5807,5808],{"type":45,"tag":60,"props":5803,"children":5804},{},[5805],{"type":51,"value":5806},"Permit2 on Tempo",{"type":51,"value":5636},{"type":45,"tag":103,"props":5809,"children":5811},{"className":5810},[],[5812],{"type":51,"value":5813},"0x000000000022d473030f116ddee9f6b43ac78ba3",{"type":45,"tag":662,"props":5815,"children":5816},{},[5817,5822,5823,5828,5829,5835],{"type":45,"tag":60,"props":5818,"children":5819},{},[5820],{"type":51,"value":5821},"Tempo payment SDK",{"type":51,"value":5636},{"type":45,"tag":103,"props":5824,"children":5826},{"className":5825},[],[5827],{"type":51,"value":2805},{"type":51,"value":1534},{"type":45,"tag":103,"props":5830,"children":5832},{"className":5831},[],[5833],{"type":51,"value":5834},"npm install mppx viem",{"type":51,"value":815},{"type":45,"tag":662,"props":5837,"children":5838},{},[5839,5844,5845],{"type":45,"tag":60,"props":5840,"children":5841},{},[5842],{"type":51,"value":5843},"USDC on Base (8453)",{"type":51,"value":5636},{"type":45,"tag":103,"props":5846,"children":5848},{"className":5847},[],[5849],{"type":51,"value":5850},"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",{"type":45,"tag":662,"props":5852,"children":5853},{},[5854,5859,5860],{"type":45,"tag":60,"props":5855,"children":5856},{},[5857],{"type":51,"value":5858},"USDbC on Base (8453)",{"type":51,"value":5636},{"type":45,"tag":103,"props":5861,"children":5863},{"className":5862},[],[5864],{"type":51,"value":5865},"0xd9aAEc86B65D86f6A7B5B1b0c42FFA531710b6CA",{"type":45,"tag":662,"props":5867,"children":5868},{},[5869,5874,5875],{"type":45,"tag":60,"props":5870,"children":5871},{},[5872],{"type":51,"value":5873},"USDC on Ethereum (1)",{"type":51,"value":5636},{"type":45,"tag":103,"props":5876,"children":5878},{"className":5877},[],[5879],{"type":51,"value":5880},"0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",{"type":45,"tag":662,"props":5882,"children":5883},{},[5884,5889,5890],{"type":45,"tag":60,"props":5885,"children":5886},{},[5887],{"type":51,"value":5888},"WETH on Ethereum (1)",{"type":51,"value":5636},{"type":45,"tag":103,"props":5891,"children":5893},{"className":5892},[],[5894],{"type":51,"value":5895},"0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2",{"type":45,"tag":662,"props":5897,"children":5898},{},[5899,5904,5905],{"type":45,"tag":60,"props":5900,"children":5901},{},[5902],{"type":51,"value":5903},"WETH on Base (8453)",{"type":51,"value":5636},{"type":45,"tag":103,"props":5906,"children":5908},{"className":5907},[],[5909],{"type":51,"value":5910},"0x4200000000000000000000000000000000000006",{"type":45,"tag":662,"props":5912,"children":5913},{},[5914,5919,5920,5925],{"type":45,"tag":60,"props":5915,"children":5916},{},[5917],{"type":51,"value":5918},"Native ETH (all chains)",{"type":51,"value":5636},{"type":45,"tag":103,"props":5921,"children":5923},{"className":5922},[],[5924],{"type":51,"value":3025},{"type":51,"value":5926}," (zero address, recommended for swaps)",{"type":45,"tag":662,"props":5928,"children":5929},{},[5930,5935,5936],{"type":45,"tag":60,"props":5931,"children":5932},{},[5933],{"type":51,"value":5934},"USDC-e on Arbitrum (42161)",{"type":51,"value":5636},{"type":45,"tag":103,"props":5937,"children":5939},{"className":5938},[],[5940],{"type":51,"value":5941},"0xFF970A61A04b1cA14834A43f5dE4533eBDDB5CC8",{"type":45,"tag":662,"props":5943,"children":5944},{},[5945,5950],{"type":45,"tag":60,"props":5946,"children":5947},{},[5948],{"type":51,"value":5949},"Supported chains for Trading API",{"type":51,"value":5951},": 1, 8453, 42161, 10, 137, 130",{"type":45,"tag":662,"props":5953,"children":5954},{},[5955,5960,5961],{"type":45,"tag":60,"props":5956,"children":5957},{},[5958],{"type":51,"value":5959},"x402 spec",{"type":51,"value":5636},{"type":45,"tag":103,"props":5962,"children":5964},{"className":5963},[],[5965],{"type":51,"value":5966},"https:\u002F\u002Fgithub.com\u002Fcoinbase\u002Fx402",{"type":45,"tag":75,"props":5968,"children":5970},{"id":5969},"related-skills",[5971],{"type":51,"value":5972},"Related Skills",{"type":45,"tag":658,"props":5974,"children":5975},{},[5976],{"type":45,"tag":662,"props":5977,"children":5978},{},[5979,5985],{"type":45,"tag":806,"props":5980,"children":5982},{"href":5981},"..\u002Fswap-integration\u002FSKILL.md",[5983],{"type":51,"value":5984},"swap-integration",{"type":51,"value":5986}," — Full Uniswap swap\nintegration reference (Trading API, Universal Router, Permit2)",{"type":45,"tag":5988,"props":5989,"children":5990},"style",{},[5991],{"type":51,"value":5992},"html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"items":5994,"total":3760},[5995,6014,6027,6038,6051,6064,6077],{"slug":5996,"name":5996,"fn":5997,"description":5998,"org":5999,"tags":6000,"stars":24,"repoUrl":25,"updatedAt":6013},"configurator","configure auction smart contract parameters","Configure CCA (Continuous Clearing Auction) smart contract parameters through an interactive bulk form flow. Use when user says \"configure auction\", \"cca auction\", \"setup token auction\", \"auction configuration\", \"continuous auction\", or mentions CCA contracts.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[6001,6004,6007,6010],{"name":6002,"slug":6003,"type":14},"Configuration","configuration",{"name":6005,"slug":6006,"type":14},"Ethereum","ethereum",{"name":6008,"slug":6009,"type":14},"Smart Contracts","smart-contracts",{"name":6011,"slug":6012,"type":14},"Web3","web3","2026-07-17T06:08:08.974641",{"slug":6015,"name":6015,"fn":6016,"description":6017,"org":6018,"tags":6019,"stars":24,"repoUrl":25,"updatedAt":6026},"copy-trade","copy trades from crypto wallets","This skill should be used when the user asks to \"copy trades from\" a wallet, \"mirror a wallet\", \"follow this address\", set up \"copy trading\", \"track and replicate a trader\", or mirror another account's swaps bounded by guardrails. Watches a target wallet and mirrors its trades, filtered by chain, asset match, position size, and the follower's own portfolio state.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[6020,6023,6024,6025],{"name":6021,"slug":6022,"type":14},"Automation","automation",{"name":6005,"slug":6006,"type":14},{"name":22,"slug":23,"type":14},{"name":6011,"slug":6012,"type":14},"2026-07-17T06:04:21.974052",{"slug":6028,"name":6028,"fn":6029,"description":6030,"org":6031,"tags":6032,"stars":24,"repoUrl":25,"updatedAt":6037},"dca-bot","automate dollar cost average token purchases","This skill should be used when the user wants to \"dca into\" a token, \"buy X every day\", set up a \"recurring buy\", \"dollar cost average\" into an asset, \"schedule a buy\", or \"auto-buy on a dip\". Buys a fixed amount into a token on a schedule, optionally only when a condition holds (for example only when ETH is below a price threshold). The host agent's scheduler wakes the skill on a cadence; each wake is one self-contained run.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[6033,6034,6035,6036],{"name":6021,"slug":6022,"type":14},{"name":16,"slug":17,"type":14},{"name":22,"slug":23,"type":14},{"name":6011,"slug":6012,"type":14},"2026-07-17T06:05:37.160647",{"slug":6039,"name":6039,"fn":6040,"description":6041,"org":6042,"tags":6043,"stars":24,"repoUrl":25,"updatedAt":6050},"deployer","deploy Uniswap CCA smart contracts","Deploy CCA (Continuous Clearing Auction) smart contracts using the Factory pattern. Use when user says \"deploy auction\", \"deploy cca\", \"factory deployment\", or wants to deploy a configured auction.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[6044,6047,6048,6049],{"name":6045,"slug":6046,"type":14},"Deployment","deployment",{"name":6005,"slug":6006,"type":14},{"name":6008,"slug":6009,"type":14},{"name":6011,"slug":6012,"type":14},"2026-07-17T06:08:09.661977",{"slug":6052,"name":6052,"fn":6053,"description":6054,"org":6055,"tags":6056,"stars":24,"repoUrl":25,"updatedAt":6063},"index-bot","create and rebalance asset portfolios","This skill should be used when the user asks to \"create an index\", \"build a basket of top assets\", \"buy a weighted basket\", \"make a portfolio of assets\", \"equal-weight basket\", \"rebalance my portfolio\", \"track the top N tokens\", or wants an automated, weighted multi-asset basket that buys in one pass and rebalances on a cadence. Builds the basket spec, delegates each buy and rebalance swap to the swap-integration Trading API flow, and records target weights in state.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[6057,6058,6061,6062],{"name":6005,"slug":6006,"type":14},{"name":6059,"slug":6060,"type":14},"Portfolio Management","portfolio-management",{"name":22,"slug":23,"type":14},{"name":6011,"slug":6012,"type":14},"2026-07-17T06:04:22.328253",{"slug":6065,"name":6065,"fn":6066,"description":6067,"org":6068,"tags":6069,"stars":24,"repoUrl":25,"updatedAt":6076},"liquidity-planner","plan and create liquidity positions","This skill should be used when the user asks to \"provide liquidity\", \"create LP position\", \"add liquidity to pool\", \"become a liquidity provider\", \"create v3 position\", \"create v4 position\", \"concentrated liquidity\", \"set price range\", or mentions providing liquidity, LP positions, or liquidity pools on Uniswap. Generates deep links to create positions in the Uniswap interface.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[6070,6071,6072,6075],{"name":16,"slug":17,"type":14},{"name":6005,"slug":6006,"type":14},{"name":6073,"slug":6074,"type":14},"Liquidity","liquidity",{"name":6011,"slug":6012,"type":14},"2026-07-17T06:08:09.315325",{"slug":6078,"name":6078,"fn":6079,"description":6080,"org":6081,"tags":6082,"stars":24,"repoUrl":25,"updatedAt":6089},"lp-integration","integrate Uniswap liquidity provisioning","Integrate Uniswap liquidity provisioning (LP) into applications via the LP REST API. Use when the user says \"LP API\", \"liquidity provisioning API\", \"provide liquidity programmatically\", \"create LP position via API\", \"add liquidity via API\", \"increase liquidity\", \"decrease liquidity\", \"remove liquidity\", \"claim LP fees\", \"collect LP fees\", \"manage LP positions in code\", or mentions building a backend, bot, or frontend that creates or manages Uniswap v2\u002Fv3\u002Fv4 liquidity positions through an API. Also use when debugging LP API calls (e.g. \u002Flp\u002Fcreate, \u002Flp\u002Fcheck_approval, \u002Flp\u002Fincrease, \u002Flp\u002Fdecrease, \u002Flp\u002Fclaim_fees), unexpected response fields, the approval or EIP-712 permit flow, or transaction-building errors for liquidity positions. For generating deep links to the Uniswap web app instead of calling the API, use the liquidity-planner skill; for using the Uniswap v4 SDK directly rather than the REST API, use the v4-sdk-integration skill.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[6083,6086,6087,6088],{"name":6084,"slug":6085,"type":14},"API Development","api-development",{"name":16,"slug":17,"type":14},{"name":6073,"slug":6074,"type":14},{"name":6011,"slug":6012,"type":14},"2026-07-17T06:08:13.704465",{"items":6091,"total":3883},[6092,6099,6106,6113,6120,6127,6134,6141,6148,6159,6169,6180],{"slug":5996,"name":5996,"fn":5997,"description":5998,"org":6093,"tags":6094,"stars":24,"repoUrl":25,"updatedAt":6013},{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[6095,6096,6097,6098],{"name":6002,"slug":6003,"type":14},{"name":6005,"slug":6006,"type":14},{"name":6008,"slug":6009,"type":14},{"name":6011,"slug":6012,"type":14},{"slug":6015,"name":6015,"fn":6016,"description":6017,"org":6100,"tags":6101,"stars":24,"repoUrl":25,"updatedAt":6026},{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[6102,6103,6104,6105],{"name":6021,"slug":6022,"type":14},{"name":6005,"slug":6006,"type":14},{"name":22,"slug":23,"type":14},{"name":6011,"slug":6012,"type":14},{"slug":6028,"name":6028,"fn":6029,"description":6030,"org":6107,"tags":6108,"stars":24,"repoUrl":25,"updatedAt":6037},{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[6109,6110,6111,6112],{"name":6021,"slug":6022,"type":14},{"name":16,"slug":17,"type":14},{"name":22,"slug":23,"type":14},{"name":6011,"slug":6012,"type":14},{"slug":6039,"name":6039,"fn":6040,"description":6041,"org":6114,"tags":6115,"stars":24,"repoUrl":25,"updatedAt":6050},{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[6116,6117,6118,6119],{"name":6045,"slug":6046,"type":14},{"name":6005,"slug":6006,"type":14},{"name":6008,"slug":6009,"type":14},{"name":6011,"slug":6012,"type":14},{"slug":6052,"name":6052,"fn":6053,"description":6054,"org":6121,"tags":6122,"stars":24,"repoUrl":25,"updatedAt":6063},{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[6123,6124,6125,6126],{"name":6005,"slug":6006,"type":14},{"name":6059,"slug":6060,"type":14},{"name":22,"slug":23,"type":14},{"name":6011,"slug":6012,"type":14},{"slug":6065,"name":6065,"fn":6066,"description":6067,"org":6128,"tags":6129,"stars":24,"repoUrl":25,"updatedAt":6076},{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[6130,6131,6132,6133],{"name":16,"slug":17,"type":14},{"name":6005,"slug":6006,"type":14},{"name":6073,"slug":6074,"type":14},{"name":6011,"slug":6012,"type":14},{"slug":6078,"name":6078,"fn":6079,"description":6080,"org":6135,"tags":6136,"stars":24,"repoUrl":25,"updatedAt":6089},{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[6137,6138,6139,6140],{"name":6084,"slug":6085,"type":14},{"name":16,"slug":17,"type":14},{"name":6073,"slug":6074,"type":14},{"name":6011,"slug":6012,"type":14},{"slug":4,"name":4,"fn":5,"description":6,"org":6142,"tags":6143,"stars":24,"repoUrl":25,"updatedAt":26},{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[6144,6145,6146,6147],{"name":16,"slug":17,"type":14},{"name":19,"slug":20,"type":14},{"name":22,"slug":23,"type":14},{"name":13,"slug":13,"type":14},{"slug":6149,"name":6149,"fn":6150,"description":6151,"org":6152,"tags":6153,"stars":24,"repoUrl":25,"updatedAt":6158},"pay-with-app","pay 402 payment challenges","Pay HTTP 402 payment challenges issued by OKX's Agent Payments Protocol (APP) on X Layer using tokens from any chain via the Uniswap Trading API. Use this skill whenever the user encounters a 402 challenge whose network resolves to X Layer (chain 196), mentions \"APP\", \"Agent Payments Protocol\", \"OKX agent payment\", \"OKX Onchain OS\", \"OKX agentic wallet\", \"x402 on X Layer\", \"USDT0\", \"x42\", \"Instant Payment\", \"Batch Payment\", \"pay for X Layer API\", or wants to pay an OKX-backed merchant. Even when the user does not explicitly say APP, prefer this skill for any 402 challenge whose network resolves to X Layer (chain 196). For 402 challenges on other chains (Ethereum, Base, Arbitrum, Tempo) use pay-with-any-token instead.\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[6154,6155,6156,6157],{"name":6084,"slug":6085,"type":14},{"name":19,"slug":20,"type":14},{"name":6011,"slug":6012,"type":14},{"name":13,"slug":13,"type":14},"2026-07-17T06:07:38.795043",{"slug":5984,"name":5984,"fn":6160,"description":6161,"org":6162,"tags":6163,"stars":24,"repoUrl":25,"updatedAt":6168},"integrate Uniswap swap functionality","Integrate Uniswap swaps into applications. Use when user says \"integrate swaps\", \"uniswap\", \"trading api\", \"add swap functionality\", \"build a swap frontend\", \"create a swap script\", \"smart contract swap integration\", \"use Universal Router\", \"Trading API\", or mentions swapping tokens via Uniswap.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[6164,6165,6166,6167],{"name":6084,"slug":6085,"type":14},{"name":16,"slug":17,"type":14},{"name":22,"slug":23,"type":14},{"name":6011,"slug":6012,"type":14},"2026-07-17T06:08:10.354222",{"slug":6170,"name":6170,"fn":6171,"description":6172,"org":6173,"tags":6174,"stars":24,"repoUrl":25,"updatedAt":6179},"swap-planner","plan and execute token swaps","This skill should be used when the user asks to \"swap tokens\", \"trade ETH for USDC\", \"exchange tokens on Uniswap\", \"buy tokens\", \"sell tokens\", \"convert ETH to stablecoins\", \"find memecoins\", \"discover tokens\", \"research tokens\", \"tokens to buy\", \"find tokens to swap\", \"what should I buy\", or mentions swapping, trading, researching, discovering, buying, or exchanging tokens on any Uniswap-supported chain. Supports both known token swaps and token discovery workflows (discovery uses keyword search and web search — there is no live \"trending\" feed). Generates deep links to execute swaps in the Uniswap interface.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[6175,6176,6177,6178],{"name":16,"slug":17,"type":14},{"name":6073,"slug":6074,"type":14},{"name":22,"slug":23,"type":14},{"name":6011,"slug":6012,"type":14},"2026-07-17T06:08:10.008152",{"slug":6181,"name":6181,"fn":6182,"description":6183,"org":6184,"tags":6185,"stars":24,"repoUrl":25,"updatedAt":6189},"v4-hook-generator","generate Uniswap v4 hook contracts","Generate Uniswap v4 hook contracts via OpenZeppelin MCP. Use when building custom swap logic, async swaps, hook-owned liquidity, custom curves, dynamic fees, MEV protection, limit orders, or oracle hooks.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[6186,6187,6188],{"name":6005,"slug":6006,"type":14},{"name":6008,"slug":6009,"type":14},{"name":6011,"slug":6012,"type":14},"2026-07-17T06:04:19.17669"]