[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill-uniswap-pay-with-app":3,"mdc--dq1tds-key":35,"related-org-uniswap-pay-with-app":2973,"related-repo-uniswap-pay-with-app":3119},{"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-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},"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},"Web3","web3",{"name":19,"slug":20,"type":14},"Payments","payments",{"name":22,"slug":23,"type":14},"API Development","api-development",215,"https:\u002F\u002Fgithub.com\u002FUniswap\u002Funiswap-ai","2026-07-17T06:07:38.795043","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-app","---\nname: pay-with-app\ndescription: >\n  Pay HTTP 402 payment challenges issued by OKX's Agent Payments Protocol\n  (APP) on X Layer using tokens from any chain via the Uniswap Trading API.\n  Use this skill whenever the user encounters a 402 challenge whose network\n  resolves to X Layer (chain 196), mentions \"APP\", \"Agent Payments\n  Protocol\", \"OKX agent payment\", \"OKX Onchain OS\", \"OKX agentic wallet\",\n  \"x402 on X Layer\", \"USDT0\", \"x42\", \"Instant Payment\", \"Batch Payment\",\n  \"pay for X Layer API\", or wants to pay an OKX-backed merchant. Even when\n  the user does not explicitly say APP, prefer this skill for any 402\n  challenge whose network resolves to X Layer (chain 196). For 402\n  challenges on other chains (Ethereum, Base, Arbitrum, Tempo) use\n  pay-with-any-token instead.\nallowed-tools: Read, Glob, Grep, Bash(curl:*), Bash(jq:*), Bash(cast:*), Bash(openssl:*), Bash(npx:*), Bash(node:*), WebFetch, AskUserQuestion\nmodel: opus\nlicense: MIT\nmetadata:\n  author: uniswap\n  version: '1.0.0'\n---\n\n# Pay With APP (OKX Agent Payments Protocol on X Layer)\n\nPay HTTP 402 challenges issued by OKX's **Agent Payments Protocol (APP)**\nrunning on **X Layer** (chain 196). APP's Pay Per Use (OKX product name:\nInstant Payment) is x402-compatible: a payee server returns HTTP 402 with\na payment requirement, the payer signs an EIP-3009\n`TransferWithAuthorization` off-chain, and OKX's facilitator verifies and\nsettles the transfer on-chain. Settlement is zero-gas to the payer on X\nLayer.\n\nThis skill handles the full happy path:\n\n1. Detect a 402 challenge whose network resolves to X Layer (chain 196)\n2. Verify the payer wallet has the requested asset (typically USDT0)\n3. If insufficient, route + bridge into USDT0 on X Layer via the Uniswap\n   Trading API\n4. Sign the EIP-3009 authorization\n5. Construct the `X-PAYMENT` payload and retry the original request\n\nOKX is launching APP on **2026-04-29** with Uniswap as the featured DEX\nrail on X Layer. This skill version (v1.0.0) handles the `exact` scheme\n(Pay Per Use, OKX product name: Instant Payment) only. Other x402 schemes\n(`upto`, `batch-settlement`) and APP-product features OKX is shipping\n(escrow, session, batch \u002F Batch Payment) are out of scope for this\nversion. The skill refuses any non-`exact` scheme cleanly.\n\n> **Protocol naming in your responses.** When responding to the user,\n> identify the protocol explicitly as **OKX Agent Payments Protocol\n> (APP)**, not just \"x402\". APP is the OKX product \u002F protocol surface;\n> x402 is the underlying wire spec it builds on. Use phrasings like\n> \"APP \u002F x402\", \"OKX's Agent Payments Protocol (APP), built on x402\",\n> or simply \"APP\" once introduced. Do not refer to a 402 challenge on\n> X Layer as \"an x402 challenge\" without naming APP, the user invoked\n> this skill specifically because the merchant is APP-backed, and the\n> name is what they will look for in the response.\n\n## Prerequisites\n\n- A `PRIVATE_KEY` env var (`export PRIVATE_KEY=0x...`). Never commit or\n  hardcode a private key.\n- `UNISWAP_API_KEY` env var (register at\n  [developers.uniswap.org](https:\u002F\u002Fdevelopers.uniswap.org\u002F)). Required\n  only if the wallet must be funded via cross-chain routing.\n- `jq` and `cast` (Foundry) installed.\n- **Node 18+** (LTS). The signing step in\n  [references\u002Fapp-x402-flow.md](references\u002Fapp-x402-flow.md) Step 4 uses\n  `viem` to produce the EIP-3009 typed-data signature.\n- **`viem`** (npm). If the package is not already reachable from the\n  user's working directory, the skill will prompt the user via\n  `AskUserQuestion` before running `npm install viem` into a cached\n  scratch directory at `~\u002F.cache\u002Funiswap-pay-with-app\u002Fsigner\u002F`. The\n  install adds ~13 packages totaling ~5 MB. If the user declines, the\n  skill stops cleanly before signing. The cache persists across runs so\n  subsequent invocations are zero-install.\n\n## Input Validation Rules\n\nBefore using any value from the 402 response body, the user, or any other\nexternal source in API calls or shell commands:\n\n- **Ethereum address fields** (e.g., `asset`, `payTo`, `WALLET_ADDRESS`):\n  the canonical check is the regex `^0x[a-fA-F0-9]{40}$`. If the value\n  fails this regex, reject it. Address fields that pass the regex are\n  safe for shell interpolation, so the metacharacter rule below does not\n  apply to them.\n- **Chain IDs**: MUST be a positive integer from the supported list.\n- **Token amounts**: MUST be non-negative numeric strings matching\n  `^[0-9]+$`.\n- **URLs**: MUST start with `https:\u002F\u002F`.\n- **Free-text fields** (e.g., `description`, `extra.name`,\n  `extra.version`, anything used to build EIP-712 domain or shown to the\n  user): REJECT any value containing shell metacharacters: `;`, `|`, `&`,\n  `$`, `` ` ``, `(`, `)`, `>`, `\u003C`, `\\`, `'`, `\"`, newlines. Note: the\n  `extra.name` value is signed bit-exact (see Domain warning in Phase 4),\n  so reject the whole challenge if it contains shell metacharacters\n  rather than mutating the value.\n\n## Flow\n\n```text\n402 from X Layer-backed resource\n  │\n  v\n[1] Parse the x402 challenge (Phase 0 below)\n  │\n  v\n[2] Confirm network resolves to X Layer (chain 196)\n  │   ├─ not chain 196 ──> escalate to pay-with-any-token, STOP\n  │   └─ chain 196\n  │\n  v\n[3] Check wallet balance of the requested asset on X Layer\n  │   ├─ sufficient ──> proceed to [5]\n  │   └─ insufficient\n  │        │\n  │        v\n  │   [4] Fund: route + bridge into the requested asset on X Layer\n  │        (Uniswap Trading API, see references\u002Ffunding-x-layer.md)\n  │\n  v\n[5] User Confirmation gate (see Phase 4 \u002F Step 5 below)\n[6] Sign EIP-3009 TransferWithAuthorization\n[7] Construct X-PAYMENT payload, retry the original request\n[8] Verify 200 + Payment-Receipt\n```\n\n## Phase 0, Parse the 402 Challenge\n\nThe x402 challenge is JSON in the response body. Extract:\n\n- `x402Version`, confirms x402 protocol version.\n- `accepts[].scheme`, only `\"exact\"` is supported in v1.0.0.\n- `accepts[].network`, accept `\"x-layer\"` \u002F `\"xlayer\"` \u002F `\"eip155:196\"` \u002F\n  `196`.\n- `accepts[].maxAmountRequired`, base units of the asset. Must match\n  `^[0-9]+$` AND be **strictly greater than zero**. A challenge with\n  `maxAmountRequired === \"0\"` is semantically broken (HTTP 402 by\n  definition demands a positive payment) and must be refused as\n  merchant misconfiguration. Do not rationalize zero as a \"ping\",\n  \"authentication\", or \"free-tier confirmation\"; OKX's facilitator\n  will not settle a zero-value `TransferWithAuthorization` and any\n  signature you produce is wasted. Surface this to the user and stop.\n- `accepts[].asset`, token contract on X Layer.\n- `accepts[].payTo`, recipient address.\n- `accepts[].resource`, the URL the facilitator binds the payment to.\n  Extract this when present. Use it as the retry target. If the field is\n  absent, fall back to the original request URL.\n- `accepts[].extra.name` and `accepts[].extra.version`, EIP-712 domain\n  values for the asset.\n- `accepts[].maxTimeoutSeconds`, used for `validBefore`.\n\n> **x402Version gate.** Confirm `x402Version === 1` immediately after\n> parsing. If it is anything else, refuse the challenge and surface a\n> version mismatch error to the user. v1.0.0 of this skill targets x402\n> v1 only (the v2 spec uses a different PaymentPayload structure).\n>\n> **Scheme gate.** Confirm `accepts[].scheme === \"exact\"`. The x402 spec\n> defines `exact`, `upto`, and `batch-settlement` schemes. v1.0.0 of this\n> skill supports `exact` only. If the chosen entry uses any other scheme,\n> refuse cleanly. (OKX's product surface uses its own vocabulary\n> including `charge` for their Instant Payment primitive; that is OKX\n> product marketing, not a wire scheme value. The wire-level scheme on\n> the `accepts[]` entry is what you check, and it must be `\"exact\"`.)\n\nIf multiple `accepts` entries are present, prefer the one whose `asset`\nthe wallet already holds on X Layer. If multiple options are equally\nviable, prefer USDT0 (deepest Uniswap funding-flow liquidity).\n\n**WOKB \u002F native OKB likely not eligible as APP settlement assets.** We\nhave not seen OKX publish WOKB or OKB as settlement assets; current\npublic dev docs list USDT0, USDG, and USDC as the supported stablecoin\nsettlement assets. If a 402 challenge ever surfaces a non-stablecoin\n`asset` (for example `WOKB`), refuse the challenge and ask the user to\nverify the merchant configuration.\n\n## Phase 1, Confirm Network is X Layer\n\n```bash\ncase \"$X402_NETWORK\" in\n  x-layer|xlayer|\"eip155:196\"|196)  X402_CHAIN_ID=196 ;;\n  *)\n    echo \"Network is not X Layer. Use pay-with-any-token instead.\"\n    exit 1\n    ;;\nesac\n```\n\n> If the network is not X Layer, **stop** and escalate to the\n> `pay-with-any-token` skill, which handles 402 challenges on Ethereum,\n> Base, Arbitrum, Tempo, and the other chains the Trading API supports.\n\n## Phase 2, Check Wallet Balance on X Layer\n\n> **REQUIRED:** You must have the user's source wallet address. Use\n> `AskUserQuestion` if not provided. Store as `WALLET_ADDRESS`.\n\n```bash\nASSET_BALANCE=$(cast call \"$X402_ASSET\" \\\n  \"balanceOf(address)(uint256)\" \"$WALLET_ADDRESS\" \\\n  --rpc-url https:\u002F\u002Frpc.xlayer.tech)\n\nif [ \"$ASSET_BALANCE\" -lt \"$X402_AMOUNT\" ]; then\n  echo \"Insufficient $X402_TOKEN_NAME on X Layer. Funding required.\"\n  # Proceed to Phase 3 (funding)\nfi\n```\n\n## Phase 3, Fund USDT0 on X Layer (only if needed)\n\nWhen the wallet lacks the requested asset, acquire it via the Uniswap\nTrading API: `EXACT_OUTPUT` quote with `tokenOutChainId=196` and\n`tokenOut` set to the X Layer asset address. The Trading API handles\nsame-chain swaps and cross-chain routing (powered by Across).\n\n> **Across coverage gap (verified 2026-04-27).** Across Protocol does\n> not currently list X Layer (chain 196) as a supported destination. As\n> a result, cross-chain `\u002Fquote` calls into chain 196 return\n> `ResourceNotFound: No quotes available` regardless of source chain.\n> Same-chain X Layer swaps (Phase A in `references\u002Ffunding-x-layer.md`)\n> are unaffected and work normally.\n>\n> **What this means for the agent in v1.0.0.** If the user holds funds\n> on a chain other than X Layer, the cross-chain leg must be done\n> through a bridge service that supports X Layer (the user runs that\n> step outside this skill, then re-invokes for the same-chain swap and\n> 402 settlement). Surface this honestly to the user, do not\n> recommend a specific bridge product (TODO: research and document a\n> co-marketing-aligned bridge recommendation in a follow-up).\n>\n> **When you defer the bridge to the user, your response must still\n> describe the FULL end-to-end flow**, not just the bridge step. After\n> identifying the Across gap and asking the user to bridge externally,\n> walk through what happens when they return: (1) re-check\n> `balanceOf` of the requested asset on X Layer, (2) if a same-chain\n> swap is needed (e.g. USDG to USDT0), describe the Trading API\n> EXACT_OUTPUT call and its Confirmation Gate, (3) construct the\n> EIP-3009 `TransferWithAuthorization` typed-data using `extra.name`\n> and `extra.version` from the challenge, with chainId 196 and\n> `verifyingContract` = the asset address, (4) sign with the user's\n> private key (Confirmation Gate before signing), (5) build the\n> `X-PAYMENT` JSON wrapper (x402Version 1, scheme \"exact\", network\n> \"x-layer\", payload with signature + authorization), base64-encode\n> it with no whitespace, and retry the original request URL with the\n> `X-PAYMENT` header. Showing the full plan up front lets the user\n> see what they are committing to before they leave the skill, even\n> though signing happens after they return.\n\n**Default funding target = USDT0.** If the 402 challenge requests a\ndifferent asset, fund into that asset directly only when it has reliable\nUniswap routing on X Layer:\n\n| Asset | Address                                      | Decimals | Funding                                                                                                                                                                                                                                                                                                                                                                            |\n| ----- | -------------------------------------------- | -------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| USDT0 | `0x779Ded0c9e1022225f8E0630b35a9b54bE713736` | 6        | ✅ Direct via Trading API                                                                                                                                                                                                                                                                                                                                                          |\n| USDG  | `0x4ae46a509F6b1D9056937BA4500cb143933D2dc8` | 6        | ✅ Direct, or one-hop USDT0 to USDG                                                                                                                                                                                                                                                                                                                                                |\n| USDC  | `0x74b7F16337b8972027F6196A17a631aC6dE26d22` | 6        | ⏳ No reliable Uniswap v3 routing on X Layer. The Trading API does not consistently return routes for USDC swaps on X Layer; available pool liquidity is too thin for reliable execution. If the merchant requires USDC, bridge USDC directly from a chain where it is liquid (Base, Arbitrum, Mainnet) using the Trading API rather than attempting a same-chain swap on X Layer. |\n\nDetailed scripts and parameters: see\n[references\u002Ffunding-x-layer.md](references\u002Ffunding-x-layer.md).\n\n> **Bridge buffer.** Apply a 0.5% buffer to account for bridge fees.\n> Quotes expire in ~60 seconds, re-fetch if any delay before broadcast.\n>\n> **Minimum bridge recommendation.** If the shortfall is \u003C $5, top up to\n> $5 to amortize bridge gas on the source chain.\n\n### Gas and Routing Caveats\n\nSurface these to the user before proceeding to fund, and **call\n`AskUserQuestion`** (not an echoed bash prompt) before acting if any\napply:\n\n- **OKB on X Layer for same-chain swaps.** OKX gas-sponsors only the\n  facilitator's settlement transfer. Approvals, swaps, and other\n  on-chain operations on X Layer prior to signing are paid by the user\n  (in OKB on X Layer, or in the source chain's native asset for the\n  bridge leg). If the user has zero OKB on X Layer and the funding flow\n  needs a same-chain X Layer swap, surface this and ask before\n  proceeding. Until OKX confirms a broader gas-sponsorship policy,\n  assume only the final settlement transfer is sponsored.\n- **Bridge destination token.** If the wallet still lacks\n  `$X402_ASSET` after the funding flow's polling loop completes,\n  surface the source-chain tx hash and the Across explorer link to the\n  user. The bridge may have delivered a different variant on X Layer\n  (rare for current Across paths) or may have failed. v1.0.0 does not\n  auto-detect alternate-token arrival; the user must verify on-chain.\n\n## Phase 4, EIP-3009 Signing and X-PAYMENT Submission\n\nOKX's APP Instant Payment uses x402's `\"exact\"` scheme: the payer signs a\n`TransferWithAuthorization` typed-data message bound to the **token's\nown** EIP-712 domain. The signed authorization travels in the\n`X-PAYMENT` header on retry; OKX's facilitator settles the transfer\non-chain (zero gas to the payer on X Layer).\n\n### Step 5, User Confirmation\n\n**Every** transaction this skill touches requires a separate\n`AskUserQuestion` gate, with no exceptions for funding legs.\n\"Funding\" is not a single transaction; it is several, and each one is\nits own gate. The required gates, in order they typically fire:\n\n1. **Source-chain ERC-20 approval** to Permit2 \u002F Universal Router (only\n   if `tokenIn` is not native and the allowance is insufficient).\n2. **Same-chain swap** on the source chain (e.g. UNI to USDC on\n   Ethereum), if the funding plan includes a source-chain leg.\n3. **Bridge submission** to the cross-chain rail (Across, OKX bridge,\n   etc.). When the bridge step is user-initiated outside this skill,\n   the gate becomes \"are you ready to leave the skill, run the bridge,\n   and re-invoke once funds land on X Layer?\".\n4. **Same-chain swap on X Layer** (e.g. USDG to USDT0), if the funding\n   plan includes a destination-chain leg.\n5. **EIP-3009 `TransferWithAuthorization` signature** for the 402\n   settlement.\n\nUse the **`AskUserQuestion` agent tool** for each gate (not `read -p`,\nnot `echo` to a bash prompt, not a printed \"(yes\u002Fno)\" line in your\nresponse) and **block on the user's reply** before moving on. The\nsummary you present at every gate must cover:\n\n- Action (approve, swap, bridge, sign EIP-3009 authorization).\n- Amount and token (input AND output amounts for swaps and bridges).\n- Source chain and destination chain (where they differ).\n- Recipient (`payTo` for the EIP-3009 step).\n- Resource URL the payment is bound to.\n- Estimated gas (where applicable).\n\n> **Common failure mode.** When describing a multi-step funding plan\n> in your response, do NOT collapse multiple transactions into a\n> single confirmation question like \"Proceed with funding and\n> payment?\". Each transaction needs its own gate at the moment it is\n> about to fire. A consolidated upfront \"yes\" is not consent for\n> later transactions; the user has not seen the live amounts, gas,\n> and recipient at the time those transactions execute.\n\nObtain explicit confirmation per gate. Each gate is independent.\n**Never** auto-submit even if the user previously pre-authorized the\nsession, the call, or the wallet. A \"yes\" earlier in the flow does\nnot carry forward, and a \"yes\" to a multi-step plan is not a \"yes\" to\nthe individual transactions inside it.\n\n> **What a correct gate looks like in your response.** Whether you are\n> executing the skill in real time or describing a plan in text, every\n> transaction step MUST appear as its own labelled \"Confirmation Gate\"\n> block, with both the structured summary and an explicit\n> `AskUserQuestion` invocation. Reproduce this template literally for\n> each gate. Do not collapse the gate into a single line. Do not\n> describe the gate in passive voice (\"we will confirm before\n> signing\"). Show the gate as a discrete action.\n>\n> **Template (use for every gate, even when there is only one):**\n>\n> ```text\n> ### Confirmation Gate N: \u003CAction name>\n>\n> | Field        | Value                                    |\n> | ------------ | ---------------------------------------- |\n> | Action       | \u003Capprove \u002F swap \u002F bridge \u002F sign EIP-3009>|\n> | Amount in    | \u003Camount + symbol on source chain>        |\n> | Amount out   | \u003Camount + symbol on destination chain>   |\n> | Source chain | \u003Cchain name + id>                        |\n> | Dest chain   | \u003Cchain name + id>                        |\n> | Recipient    | \u003Caddress>                                |\n> | Resource URL | \u003Curl the payment is bound to>            |\n> | Est. gas     | \u003Camount + token>                         |\n>\n> Then call AskUserQuestion(\"Proceed with \u003Caction>?\")\n> and BLOCK on the user's reply. If anything other than an explicit\n> \"yes\", stop and report.\n> ```\n>\n> A response that only lists fields without the\n> `AskUserQuestion(\"Proceed?\") + block` step is not a gate, even if it\n> looks comprehensive. The model's natural inclination is to summarize\n> and continue; resist that inclination, name the gate, and stop.\n\n\u003C!-- markdownlint-disable-next-line -->\n\n> **What does NOT count as a confirmation gate.** Emitting a bash script\n> that prints `\"⚠️ CONFIRMATION REQUIRED\"` and `\"(yes\u002Fno)\"` to stdout and\n> then continues with `echo \"Signing...\"` is **not** a gate, because the\n> script proceeds regardless of user input. A correct gate uses the\n> `AskUserQuestion` tool (or, if the user explicitly opts into shell-only\n> mode, an actual blocking `read -p` followed by an explicit `yes`\u002F`no`\n> branch in the script). When in doubt, prefer `AskUserQuestion`.\n\n\u003C!-- markdownlint-disable-next-line -->\n\n> **Shared-wallet race.** If the wallet is shared (for example, multiple\n> agents running concurrently against the same key), the balance can be\n> drained between balance check and submit. Re-check `balanceOf` at the\n> moment of confirmation as well.\n\n### Step 6, Sign and Submit\n\nDetailed steps including domain construction, nonce generation, signing\nwith viem, payload assembly, and retry: see\n[references\u002Fapp-x402-flow.md](references\u002Fapp-x402-flow.md). On retry,\ntarget the URL from `accepts[].resource` if it was present in the\nchallenge, otherwise the original request URL.\n\n> **Domain warning.** `verifyingContract` is the **token contract**, not\n> a separate verifier. Use `name` and `version` from the challenge's\n> `extra` field, do not assume defaults. Different tokens have different\n> domain values. An incorrect domain produces a signature the\n> facilitator will reject with another 402.\n>\n> **Bit-exact UTF-8 for `extra.name`.** The EIP-712 domain hash is\n> byte-exact. The `name` field in `extra` must be passed through\n> unchanged from the challenge bytes. Do not normalize it, do not\n> lowercase it, do not substitute ASCII `T` (U+0054) for Unicode `₮`\n> (U+20AE), do not collapse Unicode forms (NFC vs NFD). For example, a\n> challenge that returns `\"USD₮0\"` must be signed as `\"USD₮0\"`; reading\n> it as `\"USDT0\"` will produce a signature the facilitator rejects with\n> another 402. Pass the raw bytes of `extra.name` straight into the\n> EIP-712 domain.\n\n## Error Handling\n\n| Situation                                           | Action                                                                                                                                                                                                                  |\n| --------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| 402 challenge has no `network` field                | Inspect challenge body; if `chainId` resolves to 196 use this skill, otherwise escalate to `pay-with-any-token`                                                                                                         |\n| Network is not chain 196                            | Escalate to `pay-with-any-token`                                                                                                                                                                                        |\n| `x402Version !== 1`                                 | Refuse cleanly; surface a version mismatch error. v1.0.0 of this skill targets x402 v1 only.                                                                                                                            |\n| `accepts[].scheme !== \"exact\"`                      | Refuse cleanly; v1.0.0 supports the `exact` scheme only. Other x402 schemes (`upto`, `batch-settlement`) are out of scope.                                                                                              |\n| `accepts[].maxAmountRequired === \"0\"`               | Refuse cleanly as merchant misconfiguration. HTTP 402 demands a positive payment; OKX's facilitator will not settle a zero-value transfer. Do not sign and do not rationalize zero as a ping, auth check, or free tier. |\n| APP requests USDC on X Layer                        | Surface a clear caveat: USDC has no reliable Uniswap v3 routing on X Layer. Suggest bridging USDC directly from a chain where it is liquid (Base, Arbitrum, Mainnet), or asking about USDT0.                            |\n| Insufficient asset on X Layer                       | Trigger funding flow (Phase 3)                                                                                                                                                                                          |\n| Trading API returns 400                             | Log request\u002Fresponse; check amount formatting and address checksums                                                                                                                                                     |\n| Trading API returns 429                             | Back off and retry with exponential delay                                                                                                                                                                               |\n| Quote expired                                       | Re-fetch quote; do not reuse old `permitData`                                                                                                                                                                           |\n| Bridge times out                                    | Check Across bridge explorer; do not re-submit                                                                                                                                                                          |\n| EIP-3009 signature rejected (402 on retry)          | Verify domain `name` \u002F `version` from `extra` (byte-exact, including any non-ASCII characters), check `validBefore` is fresh, confirm `nonce` was unused                                                                |\n| Amount mismatch on retry                            | Recompute base units using on-chain `decimals()` of the actual asset; do not assume 6                                                                                                                                   |\n| On-chain settlement reverts (`transferFrom` failed) | Re-check `balanceOf` at retry time; the balance may have been drained between sign and submit (shared wallet, concurrent agent, manual transfer). Surface to the user before retrying.                                  |\n| User asks about escrow \u002F session \u002F batch \u002F `upto`   | Inform that this skill version covers Instant Payment (`exact` scheme) only. Other primitives are out of scope for v1.0.0; a v1.x follow-up will track them as OKX ships.                                               |\n\n## Key Addresses and References\n\n### X Layer (chain 196)\n\n- **Chain ID**: `196`\n- **Public RPC**: `https:\u002F\u002Frpc.xlayer.tech`\n- **USDT0**: `0x779Ded0c9e1022225f8E0630b35a9b54bE713736` (decimals 6)\n- **USDG**: `0x4ae46a509F6b1D9056937BA4500cb143933D2dc8` (decimals 6)\n- **USDC**: `0x74b7F16337b8972027F6196A17a631aC6dE26d22` (decimals 6, no\n  reliable Uniswap routing on X Layer; bridge from a liquid chain)\n- **WOKB** (wrapped native): `0xe538905cf8410324e03A5A23C1c177a474D59b2b`\n  (decimals 18)\n- **Uniswap V3 Factory**: `0x4B2ab38DBF28D31D467aA8993f6c2585981D6804`\n- **SwapRouter02**: `0x4f0C28f5926AFDA16bf2506D5D9e57Ea190f9bcA`\n- **Universal Router 2.1**:\n  `0xDa00aE15d3A71466517129255255db7c0c0956d3`\n- **QuoterV2**: `0xD1b797D92d87B688193A2B976eFc8D577D204343`\n- **Permit2**: `0x000000000022D473030F116dDEE9F6B43aC78BA3`\n- **USDT0\u002FUSDG pool**: `0x0cBe0dBE1400e57f371a38BD3b9bC80F7C3676dA`\n- **USDT0\u002FWOKB pool**: `0x63d62734847E55A266FCa4219A9aD0a02D5F6e02`\n\n### Uniswap Trading API\n\n- Base URL: `https:\u002F\u002Ftrade-api.gateway.uniswap.org\u002Fv1`\n- Header: `x-api-key: $UNISWAP_API_KEY`\n- Header: `x-universal-router-version: 2.1.1`\n- Supported chains include 1, 8453, 42161, 10, 137, 130, **196**, and more\n  (see Trading API supported-chains docs).\n\n> The on-chain Universal Router contract on X Layer is labeled **2.1**\n> (deployed at `0xDa00aE15d3A71466517129255255db7c0c0956d3` above). The\n> Trading API expects the header value `2.1.1`, which is the API's\n> internal version-string for the routing path that targets the same\n> Universal Router 2.1 contract. The two version strings refer to\n> related but distinct things; do not substitute one for the other.\n\n### OKX APP\n\n- **APP overview \u002F dev docs**:\n  `https:\u002F\u002Fweb3.okx.com\u002Fonchainos\u002Fdev-docs\u002Fpayments\u002Fx402-introduction`\n- **OKX onchainos-skills repo**: `https:\u002F\u002Fgithub.com\u002Fokx\u002Fonchainos-skills`\n- **x402 spec**: `https:\u002F\u002Fgithub.com\u002Fcoinbase\u002Fx402`\n\n## Related Skills\n\n- [pay-with-any-token](..\u002Fpay-with-any-token\u002FSKILL.md), sibling skill\n  for HTTP 402 challenges on chains other than X Layer (Ethereum, Base,\n  Arbitrum, Tempo, etc.). Use that skill for non-X-Layer challenges.\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(openssl:*), Bash(npx:*), Bash(node:*), WebFetch, AskUserQuestion","opus",{"author":8,"version":40},"1.0.0",{"type":42,"children":43},"root",[44,53,83,88,126,169,190,197,325,331,336,548,554,566,572,577,760,848,868,893,899,1074,1097,1103,1129,1341,1347,1376,1484,1494,1611,1621,1644,1651,1668,1698,1704,1737,1743,1760,1828,1868,1908,1921,1933,1983,2062,2082,2088,2106,2232,2238,2589,2595,2601,2801,2807,2853,2883,2889,2937,2943,2967],{"type":45,"tag":46,"props":47,"children":49},"element","h1",{"id":48},"pay-with-app-okx-agent-payments-protocol-on-x-layer",[50],{"type":51,"value":52},"text","Pay With APP (OKX Agent Payments Protocol on X Layer)",{"type":45,"tag":54,"props":55,"children":56},"p",{},[57,59,65,67,72,74,81],{"type":51,"value":58},"Pay HTTP 402 challenges issued by OKX's ",{"type":45,"tag":60,"props":61,"children":62},"strong",{},[63],{"type":51,"value":64},"Agent Payments Protocol (APP)",{"type":51,"value":66},"\nrunning on ",{"type":45,"tag":60,"props":68,"children":69},{},[70],{"type":51,"value":71},"X Layer",{"type":51,"value":73}," (chain 196). APP's Pay Per Use (OKX product name:\nInstant Payment) is x402-compatible: a payee server returns HTTP 402 with\na payment requirement, the payer signs an EIP-3009\n",{"type":45,"tag":75,"props":76,"children":78},"code",{"className":77},[],[79],{"type":51,"value":80},"TransferWithAuthorization",{"type":51,"value":82}," off-chain, and OKX's facilitator verifies and\nsettles the transfer on-chain. Settlement is zero-gas to the payer on X\nLayer.",{"type":45,"tag":54,"props":84,"children":85},{},[86],{"type":51,"value":87},"This skill handles the full happy path:",{"type":45,"tag":89,"props":90,"children":91},"ol",{},[92,98,103,108,113],{"type":45,"tag":93,"props":94,"children":95},"li",{},[96],{"type":51,"value":97},"Detect a 402 challenge whose network resolves to X Layer (chain 196)",{"type":45,"tag":93,"props":99,"children":100},{},[101],{"type":51,"value":102},"Verify the payer wallet has the requested asset (typically USDT0)",{"type":45,"tag":93,"props":104,"children":105},{},[106],{"type":51,"value":107},"If insufficient, route + bridge into USDT0 on X Layer via the Uniswap\nTrading API",{"type":45,"tag":93,"props":109,"children":110},{},[111],{"type":51,"value":112},"Sign the EIP-3009 authorization",{"type":45,"tag":93,"props":114,"children":115},{},[116,118,124],{"type":51,"value":117},"Construct the ",{"type":45,"tag":75,"props":119,"children":121},{"className":120},[],[122],{"type":51,"value":123},"X-PAYMENT",{"type":51,"value":125}," payload and retry the original request",{"type":45,"tag":54,"props":127,"children":128},{},[129,131,136,138,144,146,152,154,160,162,167],{"type":51,"value":130},"OKX is launching APP on ",{"type":45,"tag":60,"props":132,"children":133},{},[134],{"type":51,"value":135},"2026-04-29",{"type":51,"value":137}," with Uniswap as the featured DEX\nrail on X Layer. This skill version (v1.0.0) handles the ",{"type":45,"tag":75,"props":139,"children":141},{"className":140},[],[142],{"type":51,"value":143},"exact",{"type":51,"value":145}," scheme\n(Pay Per Use, OKX product name: Instant Payment) only. Other x402 schemes\n(",{"type":45,"tag":75,"props":147,"children":149},{"className":148},[],[150],{"type":51,"value":151},"upto",{"type":51,"value":153},", ",{"type":45,"tag":75,"props":155,"children":157},{"className":156},[],[158],{"type":51,"value":159},"batch-settlement",{"type":51,"value":161},") and APP-product features OKX is shipping\n(escrow, session, batch \u002F Batch Payment) are out of scope for this\nversion. The skill refuses any non-",{"type":45,"tag":75,"props":163,"children":165},{"className":164},[],[166],{"type":51,"value":143},{"type":51,"value":168}," scheme cleanly.",{"type":45,"tag":170,"props":171,"children":172},"blockquote",{},[173],{"type":45,"tag":54,"props":174,"children":175},{},[176,181,183,188],{"type":45,"tag":60,"props":177,"children":178},{},[179],{"type":51,"value":180},"Protocol naming in your responses.",{"type":51,"value":182}," When responding to the user,\nidentify the protocol explicitly as ",{"type":45,"tag":60,"props":184,"children":185},{},[186],{"type":51,"value":187},"OKX Agent Payments Protocol\n(APP)",{"type":51,"value":189},", not just \"x402\". APP is the OKX product \u002F protocol surface;\nx402 is the underlying wire spec it builds on. Use phrasings like\n\"APP \u002F x402\", \"OKX's Agent Payments Protocol (APP), built on x402\",\nor simply \"APP\" once introduced. Do not refer to a 402 challenge on\nX Layer as \"an x402 challenge\" without naming APP, the user invoked\nthis skill specifically because the merchant is APP-backed, and the\nname is what they will look for in the response.",{"type":45,"tag":191,"props":192,"children":194},"h2",{"id":193},"prerequisites",[195],{"type":51,"value":196},"Prerequisites",{"type":45,"tag":198,"props":199,"children":200},"ul",{},[201,222,244,263,288],{"type":45,"tag":93,"props":202,"children":203},{},[204,206,212,214,220],{"type":51,"value":205},"A ",{"type":45,"tag":75,"props":207,"children":209},{"className":208},[],[210],{"type":51,"value":211},"PRIVATE_KEY",{"type":51,"value":213}," env var (",{"type":45,"tag":75,"props":215,"children":217},{"className":216},[],[218],{"type":51,"value":219},"export PRIVATE_KEY=0x...",{"type":51,"value":221},"). Never commit or\nhardcode a private key.",{"type":45,"tag":93,"props":223,"children":224},{},[225,231,233,242],{"type":45,"tag":75,"props":226,"children":228},{"className":227},[],[229],{"type":51,"value":230},"UNISWAP_API_KEY",{"type":51,"value":232}," env var (register at\n",{"type":45,"tag":234,"props":235,"children":239},"a",{"href":236,"rel":237},"https:\u002F\u002Fdevelopers.uniswap.org\u002F",[238],"nofollow",[240],{"type":51,"value":241},"developers.uniswap.org",{"type":51,"value":243},"). Required\nonly if the wallet must be funded via cross-chain routing.",{"type":45,"tag":93,"props":245,"children":246},{},[247,253,255,261],{"type":45,"tag":75,"props":248,"children":250},{"className":249},[],[251],{"type":51,"value":252},"jq",{"type":51,"value":254}," and ",{"type":45,"tag":75,"props":256,"children":258},{"className":257},[],[259],{"type":51,"value":260},"cast",{"type":51,"value":262}," (Foundry) installed.",{"type":45,"tag":93,"props":264,"children":265},{},[266,271,273,278,280,286],{"type":45,"tag":60,"props":267,"children":268},{},[269],{"type":51,"value":270},"Node 18+",{"type":51,"value":272}," (LTS). The signing step in\n",{"type":45,"tag":234,"props":274,"children":276},{"href":275},"references\u002Fapp-x402-flow.md",[277],{"type":51,"value":275},{"type":51,"value":279}," Step 4 uses\n",{"type":45,"tag":75,"props":281,"children":283},{"className":282},[],[284],{"type":51,"value":285},"viem",{"type":51,"value":287}," to produce the EIP-3009 typed-data signature.",{"type":45,"tag":93,"props":289,"children":290},{},[291,299,301,307,309,315,317,323],{"type":45,"tag":60,"props":292,"children":293},{},[294],{"type":45,"tag":75,"props":295,"children":297},{"className":296},[],[298],{"type":51,"value":285},{"type":51,"value":300}," (npm). If the package is not already reachable from the\nuser's working directory, the skill will prompt the user via\n",{"type":45,"tag":75,"props":302,"children":304},{"className":303},[],[305],{"type":51,"value":306},"AskUserQuestion",{"type":51,"value":308}," before running ",{"type":45,"tag":75,"props":310,"children":312},{"className":311},[],[313],{"type":51,"value":314},"npm install viem",{"type":51,"value":316}," into a cached\nscratch directory at ",{"type":45,"tag":75,"props":318,"children":320},{"className":319},[],[321],{"type":51,"value":322},"~\u002F.cache\u002Funiswap-pay-with-app\u002Fsigner\u002F",{"type":51,"value":324},". The\ninstall adds ~13 packages totaling ~5 MB. If the user declines, the\nskill stops cleanly before signing. The cache persists across runs so\nsubsequent invocations are zero-install.",{"type":45,"tag":191,"props":326,"children":328},{"id":327},"input-validation-rules",[329],{"type":51,"value":330},"Input Validation Rules",{"type":45,"tag":54,"props":332,"children":333},{},[334],{"type":51,"value":335},"Before using any value from the 402 response body, the user, or any other\nexternal source in API calls or shell commands:",{"type":45,"tag":198,"props":337,"children":338},{},[339,379,389,407,424],{"type":45,"tag":93,"props":340,"children":341},{},[342,347,349,355,356,362,363,369,371,377],{"type":45,"tag":60,"props":343,"children":344},{},[345],{"type":51,"value":346},"Ethereum address fields",{"type":51,"value":348}," (e.g., ",{"type":45,"tag":75,"props":350,"children":352},{"className":351},[],[353],{"type":51,"value":354},"asset",{"type":51,"value":153},{"type":45,"tag":75,"props":357,"children":359},{"className":358},[],[360],{"type":51,"value":361},"payTo",{"type":51,"value":153},{"type":45,"tag":75,"props":364,"children":366},{"className":365},[],[367],{"type":51,"value":368},"WALLET_ADDRESS",{"type":51,"value":370},"):\nthe canonical check is the regex ",{"type":45,"tag":75,"props":372,"children":374},{"className":373},[],[375],{"type":51,"value":376},"^0x[a-fA-F0-9]{40}$",{"type":51,"value":378},". If the value\nfails this regex, reject it. Address fields that pass the regex are\nsafe for shell interpolation, so the metacharacter rule below does not\napply to them.",{"type":45,"tag":93,"props":380,"children":381},{},[382,387],{"type":45,"tag":60,"props":383,"children":384},{},[385],{"type":51,"value":386},"Chain IDs",{"type":51,"value":388},": MUST be a positive integer from the supported list.",{"type":45,"tag":93,"props":390,"children":391},{},[392,397,399,405],{"type":45,"tag":60,"props":393,"children":394},{},[395],{"type":51,"value":396},"Token amounts",{"type":51,"value":398},": MUST be non-negative numeric strings matching\n",{"type":45,"tag":75,"props":400,"children":402},{"className":401},[],[403],{"type":51,"value":404},"^[0-9]+$",{"type":51,"value":406},".",{"type":45,"tag":93,"props":408,"children":409},{},[410,415,417,423],{"type":45,"tag":60,"props":411,"children":412},{},[413],{"type":51,"value":414},"URLs",{"type":51,"value":416},": MUST start with ",{"type":45,"tag":75,"props":418,"children":420},{"className":419},[],[421],{"type":51,"value":422},"https:\u002F\u002F",{"type":51,"value":406},{"type":45,"tag":93,"props":425,"children":426},{},[427,432,433,439,440,446,448,454,456,462,463,469,470,476,477,483,484,490,491,497,498,504,505,511,512,518,519,525,526,532,533,539,541,546],{"type":45,"tag":60,"props":428,"children":429},{},[430],{"type":51,"value":431},"Free-text fields",{"type":51,"value":348},{"type":45,"tag":75,"props":434,"children":436},{"className":435},[],[437],{"type":51,"value":438},"description",{"type":51,"value":153},{"type":45,"tag":75,"props":441,"children":443},{"className":442},[],[444],{"type":51,"value":445},"extra.name",{"type":51,"value":447},",\n",{"type":45,"tag":75,"props":449,"children":451},{"className":450},[],[452],{"type":51,"value":453},"extra.version",{"type":51,"value":455},", anything used to build EIP-712 domain or shown to the\nuser): REJECT any value containing shell metacharacters: ",{"type":45,"tag":75,"props":457,"children":459},{"className":458},[],[460],{"type":51,"value":461},";",{"type":51,"value":153},{"type":45,"tag":75,"props":464,"children":466},{"className":465},[],[467],{"type":51,"value":468},"|",{"type":51,"value":153},{"type":45,"tag":75,"props":471,"children":473},{"className":472},[],[474],{"type":51,"value":475},"&",{"type":51,"value":447},{"type":45,"tag":75,"props":478,"children":480},{"className":479},[],[481],{"type":51,"value":482},"$",{"type":51,"value":153},{"type":45,"tag":75,"props":485,"children":487},{"className":486},[],[488],{"type":51,"value":489},"`",{"type":51,"value":153},{"type":45,"tag":75,"props":492,"children":494},{"className":493},[],[495],{"type":51,"value":496},"(",{"type":51,"value":153},{"type":45,"tag":75,"props":499,"children":501},{"className":500},[],[502],{"type":51,"value":503},")",{"type":51,"value":153},{"type":45,"tag":75,"props":506,"children":508},{"className":507},[],[509],{"type":51,"value":510},">",{"type":51,"value":153},{"type":45,"tag":75,"props":513,"children":515},{"className":514},[],[516],{"type":51,"value":517},"\u003C",{"type":51,"value":153},{"type":45,"tag":75,"props":520,"children":522},{"className":521},[],[523],{"type":51,"value":524},"\\",{"type":51,"value":153},{"type":45,"tag":75,"props":527,"children":529},{"className":528},[],[530],{"type":51,"value":531},"'",{"type":51,"value":153},{"type":45,"tag":75,"props":534,"children":536},{"className":535},[],[537],{"type":51,"value":538},"\"",{"type":51,"value":540},", newlines. Note: the\n",{"type":45,"tag":75,"props":542,"children":544},{"className":543},[],[545],{"type":51,"value":445},{"type":51,"value":547}," value is signed bit-exact (see Domain warning in Phase 4),\nso reject the whole challenge if it contains shell metacharacters\nrather than mutating the value.",{"type":45,"tag":191,"props":549,"children":551},{"id":550},"flow",[552],{"type":51,"value":553},"Flow",{"type":45,"tag":555,"props":556,"children":561},"pre",{"className":557,"code":559,"language":51,"meta":560},[558],"language-text","402 from X Layer-backed resource\n  │\n  v\n[1] Parse the x402 challenge (Phase 0 below)\n  │\n  v\n[2] Confirm network resolves to X Layer (chain 196)\n  │   ├─ not chain 196 ──> escalate to pay-with-any-token, STOP\n  │   └─ chain 196\n  │\n  v\n[3] Check wallet balance of the requested asset on X Layer\n  │   ├─ sufficient ──> proceed to [5]\n  │   └─ insufficient\n  │        │\n  │        v\n  │   [4] Fund: route + bridge into the requested asset on X Layer\n  │        (Uniswap Trading API, see references\u002Ffunding-x-layer.md)\n  │\n  v\n[5] User Confirmation gate (see Phase 4 \u002F Step 5 below)\n[6] Sign EIP-3009 TransferWithAuthorization\n[7] Construct X-PAYMENT payload, retry the original request\n[8] Verify 200 + Payment-Receipt\n","",[562],{"type":45,"tag":75,"props":563,"children":564},{"__ignoreMap":560},[565],{"type":51,"value":559},{"type":45,"tag":191,"props":567,"children":569},{"id":568},"phase-0-parse-the-402-challenge",[570],{"type":51,"value":571},"Phase 0, Parse the 402 Challenge",{"type":45,"tag":54,"props":573,"children":574},{},[575],{"type":51,"value":576},"The x402 challenge is JSON in the response body. Extract:",{"type":45,"tag":198,"props":578,"children":579},{},[580,591,610,651,691,702,713,724,742],{"type":45,"tag":93,"props":581,"children":582},{},[583,589],{"type":45,"tag":75,"props":584,"children":586},{"className":585},[],[587],{"type":51,"value":588},"x402Version",{"type":51,"value":590},", confirms x402 protocol version.",{"type":45,"tag":93,"props":592,"children":593},{},[594,600,602,608],{"type":45,"tag":75,"props":595,"children":597},{"className":596},[],[598],{"type":51,"value":599},"accepts[].scheme",{"type":51,"value":601},", only ",{"type":45,"tag":75,"props":603,"children":605},{"className":604},[],[606],{"type":51,"value":607},"\"exact\"",{"type":51,"value":609}," is supported in v1.0.0.",{"type":45,"tag":93,"props":611,"children":612},{},[613,619,621,627,629,635,636,642,644,650],{"type":45,"tag":75,"props":614,"children":616},{"className":615},[],[617],{"type":51,"value":618},"accepts[].network",{"type":51,"value":620},", accept ",{"type":45,"tag":75,"props":622,"children":624},{"className":623},[],[625],{"type":51,"value":626},"\"x-layer\"",{"type":51,"value":628}," \u002F ",{"type":45,"tag":75,"props":630,"children":632},{"className":631},[],[633],{"type":51,"value":634},"\"xlayer\"",{"type":51,"value":628},{"type":45,"tag":75,"props":637,"children":639},{"className":638},[],[640],{"type":51,"value":641},"\"eip155:196\"",{"type":51,"value":643}," \u002F\n",{"type":45,"tag":75,"props":645,"children":647},{"className":646},[],[648],{"type":51,"value":649},"196",{"type":51,"value":406},{"type":45,"tag":93,"props":652,"children":653},{},[654,660,662,667,669,674,676,682,684,689],{"type":45,"tag":75,"props":655,"children":657},{"className":656},[],[658],{"type":51,"value":659},"accepts[].maxAmountRequired",{"type":51,"value":661},", base units of the asset. Must match\n",{"type":45,"tag":75,"props":663,"children":665},{"className":664},[],[666],{"type":51,"value":404},{"type":51,"value":668}," AND be ",{"type":45,"tag":60,"props":670,"children":671},{},[672],{"type":51,"value":673},"strictly greater than zero",{"type":51,"value":675},". A challenge with\n",{"type":45,"tag":75,"props":677,"children":679},{"className":678},[],[680],{"type":51,"value":681},"maxAmountRequired === \"0\"",{"type":51,"value":683}," is semantically broken (HTTP 402 by\ndefinition demands a positive payment) and must be refused as\nmerchant misconfiguration. Do not rationalize zero as a \"ping\",\n\"authentication\", or \"free-tier confirmation\"; OKX's facilitator\nwill not settle a zero-value ",{"type":45,"tag":75,"props":685,"children":687},{"className":686},[],[688],{"type":51,"value":80},{"type":51,"value":690}," and any\nsignature you produce is wasted. Surface this to the user and stop.",{"type":45,"tag":93,"props":692,"children":693},{},[694,700],{"type":45,"tag":75,"props":695,"children":697},{"className":696},[],[698],{"type":51,"value":699},"accepts[].asset",{"type":51,"value":701},", token contract on X Layer.",{"type":45,"tag":93,"props":703,"children":704},{},[705,711],{"type":45,"tag":75,"props":706,"children":708},{"className":707},[],[709],{"type":51,"value":710},"accepts[].payTo",{"type":51,"value":712},", recipient address.",{"type":45,"tag":93,"props":714,"children":715},{},[716,722],{"type":45,"tag":75,"props":717,"children":719},{"className":718},[],[720],{"type":51,"value":721},"accepts[].resource",{"type":51,"value":723},", the URL the facilitator binds the payment to.\nExtract this when present. Use it as the retry target. If the field is\nabsent, fall back to the original request URL.",{"type":45,"tag":93,"props":725,"children":726},{},[727,733,734,740],{"type":45,"tag":75,"props":728,"children":730},{"className":729},[],[731],{"type":51,"value":732},"accepts[].extra.name",{"type":51,"value":254},{"type":45,"tag":75,"props":735,"children":737},{"className":736},[],[738],{"type":51,"value":739},"accepts[].extra.version",{"type":51,"value":741},", EIP-712 domain\nvalues for the asset.",{"type":45,"tag":93,"props":743,"children":744},{},[745,751,753,759],{"type":45,"tag":75,"props":746,"children":748},{"className":747},[],[749],{"type":51,"value":750},"accepts[].maxTimeoutSeconds",{"type":51,"value":752},", used for ",{"type":45,"tag":75,"props":754,"children":756},{"className":755},[],[757],{"type":51,"value":758},"validBefore",{"type":51,"value":406},{"type":45,"tag":170,"props":761,"children":762},{},[763,781],{"type":45,"tag":54,"props":764,"children":765},{},[766,771,773,779],{"type":45,"tag":60,"props":767,"children":768},{},[769],{"type":51,"value":770},"x402Version gate.",{"type":51,"value":772}," Confirm ",{"type":45,"tag":75,"props":774,"children":776},{"className":775},[],[777],{"type":51,"value":778},"x402Version === 1",{"type":51,"value":780}," immediately after\nparsing. If it is anything else, refuse the challenge and surface a\nversion mismatch error to the user. v1.0.0 of this skill targets x402\nv1 only (the v2 spec uses a different PaymentPayload structure).",{"type":45,"tag":54,"props":782,"children":783},{},[784,789,790,796,798,803,804,809,811,816,818,823,825,831,833,839,841,846],{"type":45,"tag":60,"props":785,"children":786},{},[787],{"type":51,"value":788},"Scheme gate.",{"type":51,"value":772},{"type":45,"tag":75,"props":791,"children":793},{"className":792},[],[794],{"type":51,"value":795},"accepts[].scheme === \"exact\"",{"type":51,"value":797},". The x402 spec\ndefines ",{"type":45,"tag":75,"props":799,"children":801},{"className":800},[],[802],{"type":51,"value":143},{"type":51,"value":153},{"type":45,"tag":75,"props":805,"children":807},{"className":806},[],[808],{"type":51,"value":151},{"type":51,"value":810},", and ",{"type":45,"tag":75,"props":812,"children":814},{"className":813},[],[815],{"type":51,"value":159},{"type":51,"value":817}," schemes. v1.0.0 of this\nskill supports ",{"type":45,"tag":75,"props":819,"children":821},{"className":820},[],[822],{"type":51,"value":143},{"type":51,"value":824}," only. If the chosen entry uses any other scheme,\nrefuse cleanly. (OKX's product surface uses its own vocabulary\nincluding ",{"type":45,"tag":75,"props":826,"children":828},{"className":827},[],[829],{"type":51,"value":830},"charge",{"type":51,"value":832}," for their Instant Payment primitive; that is OKX\nproduct marketing, not a wire scheme value. The wire-level scheme on\nthe ",{"type":45,"tag":75,"props":834,"children":836},{"className":835},[],[837],{"type":51,"value":838},"accepts[]",{"type":51,"value":840}," entry is what you check, and it must be ",{"type":45,"tag":75,"props":842,"children":844},{"className":843},[],[845],{"type":51,"value":607},{"type":51,"value":847},".)",{"type":45,"tag":54,"props":849,"children":850},{},[851,853,859,861,866],{"type":51,"value":852},"If multiple ",{"type":45,"tag":75,"props":854,"children":856},{"className":855},[],[857],{"type":51,"value":858},"accepts",{"type":51,"value":860}," entries are present, prefer the one whose ",{"type":45,"tag":75,"props":862,"children":864},{"className":863},[],[865],{"type":51,"value":354},{"type":51,"value":867},"\nthe wallet already holds on X Layer. If multiple options are equally\nviable, prefer USDT0 (deepest Uniswap funding-flow liquidity).",{"type":45,"tag":54,"props":869,"children":870},{},[871,876,878,883,885,891],{"type":45,"tag":60,"props":872,"children":873},{},[874],{"type":51,"value":875},"WOKB \u002F native OKB likely not eligible as APP settlement assets.",{"type":51,"value":877}," We\nhave not seen OKX publish WOKB or OKB as settlement assets; current\npublic dev docs list USDT0, USDG, and USDC as the supported stablecoin\nsettlement assets. If a 402 challenge ever surfaces a non-stablecoin\n",{"type":45,"tag":75,"props":879,"children":881},{"className":880},[],[882],{"type":51,"value":354},{"type":51,"value":884}," (for example ",{"type":45,"tag":75,"props":886,"children":888},{"className":887},[],[889],{"type":51,"value":890},"WOKB",{"type":51,"value":892},"), refuse the challenge and ask the user to\nverify the merchant configuration.",{"type":45,"tag":191,"props":894,"children":896},{"id":895},"phase-1-confirm-network-is-x-layer",[897],{"type":51,"value":898},"Phase 1, Confirm Network is X Layer",{"type":45,"tag":555,"props":900,"children":904},{"className":901,"code":902,"language":903,"meta":560,"style":560},"language-bash shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","case \"$X402_NETWORK\" in\n  x-layer|xlayer|\"eip155:196\"|196)  X402_CHAIN_ID=196 ;;\n  *)\n    echo \"Network is not X Layer. Use pay-with-any-token instead.\"\n    exit 1\n    ;;\nesac\n","bash",[905],{"type":45,"tag":75,"props":906,"children":907},{"__ignoreMap":560},[908,941,1008,1017,1041,1056,1065],{"type":45,"tag":909,"props":910,"children":913},"span",{"class":911,"line":912},"line",1,[914,920,926,932,936],{"type":45,"tag":909,"props":915,"children":917},{"style":916},"--shiki-light:#39ADB5;--shiki-light-font-style:italic;--shiki-default:#89DDFF;--shiki-default-font-style:italic;--shiki-dark:#89DDFF;--shiki-dark-font-style:italic",[918],{"type":51,"value":919},"case",{"type":45,"tag":909,"props":921,"children":923},{"style":922},"--shiki-light:#39ADB5;--shiki-default:#89DDFF;--shiki-dark:#89DDFF",[924],{"type":51,"value":925}," \"",{"type":45,"tag":909,"props":927,"children":929},{"style":928},"--shiki-light:#90A4AE;--shiki-default:#EEFFFF;--shiki-dark:#BABED8",[930],{"type":51,"value":931},"$X402_NETWORK",{"type":45,"tag":909,"props":933,"children":934},{"style":922},[935],{"type":51,"value":538},{"type":45,"tag":909,"props":937,"children":938},{"style":916},[939],{"type":51,"value":940}," in\n",{"type":45,"tag":909,"props":942,"children":944},{"class":911,"line":943},2,[945,951,955,960,964,968,973,977,981,985,989,994,999,1003],{"type":45,"tag":909,"props":946,"children":948},{"style":947},"--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D",[949],{"type":51,"value":950},"  x-layer",{"type":45,"tag":909,"props":952,"children":953},{"style":922},[954],{"type":51,"value":468},{"type":45,"tag":909,"props":956,"children":957},{"style":947},[958],{"type":51,"value":959},"xlayer",{"type":45,"tag":909,"props":961,"children":962},{"style":922},[963],{"type":51,"value":468},{"type":45,"tag":909,"props":965,"children":966},{"style":922},[967],{"type":51,"value":538},{"type":45,"tag":909,"props":969,"children":970},{"style":947},[971],{"type":51,"value":972},"eip155:196",{"type":45,"tag":909,"props":974,"children":975},{"style":922},[976],{"type":51,"value":538},{"type":45,"tag":909,"props":978,"children":979},{"style":922},[980],{"type":51,"value":468},{"type":45,"tag":909,"props":982,"children":983},{"style":947},[984],{"type":51,"value":649},{"type":45,"tag":909,"props":986,"children":987},{"style":922},[988],{"type":51,"value":503},{"type":45,"tag":909,"props":990,"children":991},{"style":928},[992],{"type":51,"value":993},"  X402_CHAIN_ID",{"type":45,"tag":909,"props":995,"children":996},{"style":922},[997],{"type":51,"value":998},"=",{"type":45,"tag":909,"props":1000,"children":1001},{"style":947},[1002],{"type":51,"value":649},{"type":45,"tag":909,"props":1004,"children":1005},{"style":922},[1006],{"type":51,"value":1007}," ;;\n",{"type":45,"tag":909,"props":1009,"children":1011},{"class":911,"line":1010},3,[1012],{"type":45,"tag":909,"props":1013,"children":1014},{"style":922},[1015],{"type":51,"value":1016},"  *)\n",{"type":45,"tag":909,"props":1018,"children":1020},{"class":911,"line":1019},4,[1021,1027,1031,1036],{"type":45,"tag":909,"props":1022,"children":1024},{"style":1023},"--shiki-light:#6182B8;--shiki-default:#82AAFF;--shiki-dark:#82AAFF",[1025],{"type":51,"value":1026},"    echo",{"type":45,"tag":909,"props":1028,"children":1029},{"style":922},[1030],{"type":51,"value":925},{"type":45,"tag":909,"props":1032,"children":1033},{"style":947},[1034],{"type":51,"value":1035},"Network is not X Layer. Use pay-with-any-token instead.",{"type":45,"tag":909,"props":1037,"children":1038},{"style":922},[1039],{"type":51,"value":1040},"\"\n",{"type":45,"tag":909,"props":1042,"children":1044},{"class":911,"line":1043},5,[1045,1050],{"type":45,"tag":909,"props":1046,"children":1047},{"style":1023},[1048],{"type":51,"value":1049},"    exit",{"type":45,"tag":909,"props":1051,"children":1053},{"style":1052},"--shiki-light:#F76D47;--shiki-default:#F78C6C;--shiki-dark:#F78C6C",[1054],{"type":51,"value":1055}," 1\n",{"type":45,"tag":909,"props":1057,"children":1059},{"class":911,"line":1058},6,[1060],{"type":45,"tag":909,"props":1061,"children":1062},{"style":922},[1063],{"type":51,"value":1064},"    ;;\n",{"type":45,"tag":909,"props":1066,"children":1068},{"class":911,"line":1067},7,[1069],{"type":45,"tag":909,"props":1070,"children":1071},{"style":916},[1072],{"type":51,"value":1073},"esac\n",{"type":45,"tag":170,"props":1075,"children":1076},{},[1077],{"type":45,"tag":54,"props":1078,"children":1079},{},[1080,1082,1087,1089,1095],{"type":51,"value":1081},"If the network is not X Layer, ",{"type":45,"tag":60,"props":1083,"children":1084},{},[1085],{"type":51,"value":1086},"stop",{"type":51,"value":1088}," and escalate to the\n",{"type":45,"tag":75,"props":1090,"children":1092},{"className":1091},[],[1093],{"type":51,"value":1094},"pay-with-any-token",{"type":51,"value":1096}," skill, which handles 402 challenges on Ethereum,\nBase, Arbitrum, Tempo, and the other chains the Trading API supports.",{"type":45,"tag":191,"props":1098,"children":1100},{"id":1099},"phase-2-check-wallet-balance-on-x-layer",[1101],{"type":51,"value":1102},"Phase 2, Check Wallet Balance on X Layer",{"type":45,"tag":170,"props":1104,"children":1105},{},[1106],{"type":45,"tag":54,"props":1107,"children":1108},{},[1109,1114,1116,1121,1123,1128],{"type":45,"tag":60,"props":1110,"children":1111},{},[1112],{"type":51,"value":1113},"REQUIRED:",{"type":51,"value":1115}," You must have the user's source wallet address. Use\n",{"type":45,"tag":75,"props":1117,"children":1119},{"className":1118},[],[1120],{"type":51,"value":306},{"type":51,"value":1122}," if not provided. Store as ",{"type":45,"tag":75,"props":1124,"children":1126},{"className":1125},[],[1127],{"type":51,"value":368},{"type":51,"value":406},{"type":45,"tag":555,"props":1130,"children":1132},{"className":901,"code":1131,"language":903,"meta":560,"style":560},"ASSET_BALANCE=$(cast call \"$X402_ASSET\" \\\n  \"balanceOf(address)(uint256)\" \"$WALLET_ADDRESS\" \\\n  --rpc-url https:\u002F\u002Frpc.xlayer.tech)\n\nif [ \"$ASSET_BALANCE\" -lt \"$X402_AMOUNT\" ]; then\n  echo \"Insufficient $X402_TOKEN_NAME on X Layer. Funding required.\"\n  # Proceed to Phase 3 (funding)\nfi\n",[1133],{"type":45,"tag":75,"props":1134,"children":1135},{"__ignoreMap":560},[1136,1177,1211,1229,1238,1292,1323,1332],{"type":45,"tag":909,"props":1137,"children":1138},{"class":911,"line":912},[1139,1144,1149,1154,1159,1163,1168,1172],{"type":45,"tag":909,"props":1140,"children":1141},{"style":928},[1142],{"type":51,"value":1143},"ASSET_BALANCE",{"type":45,"tag":909,"props":1145,"children":1146},{"style":922},[1147],{"type":51,"value":1148},"=$(",{"type":45,"tag":909,"props":1150,"children":1152},{"style":1151},"--shiki-light:#E2931D;--shiki-default:#FFCB6B;--shiki-dark:#FFCB6B",[1153],{"type":51,"value":260},{"type":45,"tag":909,"props":1155,"children":1156},{"style":947},[1157],{"type":51,"value":1158}," call",{"type":45,"tag":909,"props":1160,"children":1161},{"style":922},[1162],{"type":51,"value":925},{"type":45,"tag":909,"props":1164,"children":1165},{"style":928},[1166],{"type":51,"value":1167},"$X402_ASSET",{"type":45,"tag":909,"props":1169,"children":1170},{"style":922},[1171],{"type":51,"value":538},{"type":45,"tag":909,"props":1173,"children":1174},{"style":928},[1175],{"type":51,"value":1176}," \\\n",{"type":45,"tag":909,"props":1178,"children":1179},{"class":911,"line":943},[1180,1185,1190,1194,1198,1203,1207],{"type":45,"tag":909,"props":1181,"children":1182},{"style":922},[1183],{"type":51,"value":1184},"  \"",{"type":45,"tag":909,"props":1186,"children":1187},{"style":947},[1188],{"type":51,"value":1189},"balanceOf(address)(uint256)",{"type":45,"tag":909,"props":1191,"children":1192},{"style":922},[1193],{"type":51,"value":538},{"type":45,"tag":909,"props":1195,"children":1196},{"style":922},[1197],{"type":51,"value":925},{"type":45,"tag":909,"props":1199,"children":1200},{"style":928},[1201],{"type":51,"value":1202},"$WALLET_ADDRESS",{"type":45,"tag":909,"props":1204,"children":1205},{"style":922},[1206],{"type":51,"value":538},{"type":45,"tag":909,"props":1208,"children":1209},{"style":928},[1210],{"type":51,"value":1176},{"type":45,"tag":909,"props":1212,"children":1213},{"class":911,"line":1010},[1214,1219,1224],{"type":45,"tag":909,"props":1215,"children":1216},{"style":947},[1217],{"type":51,"value":1218},"  --rpc-url",{"type":45,"tag":909,"props":1220,"children":1221},{"style":947},[1222],{"type":51,"value":1223}," https:\u002F\u002Frpc.xlayer.tech",{"type":45,"tag":909,"props":1225,"children":1226},{"style":922},[1227],{"type":51,"value":1228},")\n",{"type":45,"tag":909,"props":1230,"children":1231},{"class":911,"line":1019},[1232],{"type":45,"tag":909,"props":1233,"children":1235},{"emptyLinePlaceholder":1234},true,[1236],{"type":51,"value":1237},"\n",{"type":45,"tag":909,"props":1239,"children":1240},{"class":911,"line":1043},[1241,1246,1251,1255,1260,1264,1269,1273,1278,1282,1287],{"type":45,"tag":909,"props":1242,"children":1243},{"style":916},[1244],{"type":51,"value":1245},"if",{"type":45,"tag":909,"props":1247,"children":1248},{"style":922},[1249],{"type":51,"value":1250}," [",{"type":45,"tag":909,"props":1252,"children":1253},{"style":922},[1254],{"type":51,"value":925},{"type":45,"tag":909,"props":1256,"children":1257},{"style":928},[1258],{"type":51,"value":1259},"$ASSET_BALANCE",{"type":45,"tag":909,"props":1261,"children":1262},{"style":922},[1263],{"type":51,"value":538},{"type":45,"tag":909,"props":1265,"children":1266},{"style":922},[1267],{"type":51,"value":1268}," -lt",{"type":45,"tag":909,"props":1270,"children":1271},{"style":922},[1272],{"type":51,"value":925},{"type":45,"tag":909,"props":1274,"children":1275},{"style":928},[1276],{"type":51,"value":1277},"$X402_AMOUNT",{"type":45,"tag":909,"props":1279,"children":1280},{"style":922},[1281],{"type":51,"value":538},{"type":45,"tag":909,"props":1283,"children":1284},{"style":922},[1285],{"type":51,"value":1286}," ];",{"type":45,"tag":909,"props":1288,"children":1289},{"style":916},[1290],{"type":51,"value":1291}," then\n",{"type":45,"tag":909,"props":1293,"children":1294},{"class":911,"line":1058},[1295,1300,1304,1309,1314,1319],{"type":45,"tag":909,"props":1296,"children":1297},{"style":1023},[1298],{"type":51,"value":1299},"  echo",{"type":45,"tag":909,"props":1301,"children":1302},{"style":922},[1303],{"type":51,"value":925},{"type":45,"tag":909,"props":1305,"children":1306},{"style":947},[1307],{"type":51,"value":1308},"Insufficient ",{"type":45,"tag":909,"props":1310,"children":1311},{"style":928},[1312],{"type":51,"value":1313},"$X402_TOKEN_NAME",{"type":45,"tag":909,"props":1315,"children":1316},{"style":947},[1317],{"type":51,"value":1318}," on X Layer. Funding required.",{"type":45,"tag":909,"props":1320,"children":1321},{"style":922},[1322],{"type":51,"value":1040},{"type":45,"tag":909,"props":1324,"children":1325},{"class":911,"line":1067},[1326],{"type":45,"tag":909,"props":1327,"children":1329},{"style":1328},"--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#546E7A;--shiki-default-font-style:italic;--shiki-dark:#676E95;--shiki-dark-font-style:italic",[1330],{"type":51,"value":1331},"  # Proceed to Phase 3 (funding)\n",{"type":45,"tag":909,"props":1333,"children":1335},{"class":911,"line":1334},8,[1336],{"type":45,"tag":909,"props":1337,"children":1338},{"style":916},[1339],{"type":51,"value":1340},"fi\n",{"type":45,"tag":191,"props":1342,"children":1344},{"id":1343},"phase-3-fund-usdt0-on-x-layer-only-if-needed",[1345],{"type":51,"value":1346},"Phase 3, Fund USDT0 on X Layer (only if needed)",{"type":45,"tag":54,"props":1348,"children":1349},{},[1350,1352,1358,1360,1366,1368,1374],{"type":51,"value":1351},"When the wallet lacks the requested asset, acquire it via the Uniswap\nTrading API: ",{"type":45,"tag":75,"props":1353,"children":1355},{"className":1354},[],[1356],{"type":51,"value":1357},"EXACT_OUTPUT",{"type":51,"value":1359}," quote with ",{"type":45,"tag":75,"props":1361,"children":1363},{"className":1362},[],[1364],{"type":51,"value":1365},"tokenOutChainId=196",{"type":51,"value":1367}," and\n",{"type":45,"tag":75,"props":1369,"children":1371},{"className":1370},[],[1372],{"type":51,"value":1373},"tokenOut",{"type":51,"value":1375}," set to the X Layer asset address. The Trading API handles\nsame-chain swaps and cross-chain routing (powered by Across).",{"type":45,"tag":170,"props":1377,"children":1378},{},[1379,1413,1423],{"type":45,"tag":54,"props":1380,"children":1381},{},[1382,1387,1389,1395,1397,1403,1405,1411],{"type":45,"tag":60,"props":1383,"children":1384},{},[1385],{"type":51,"value":1386},"Across coverage gap (verified 2026-04-27).",{"type":51,"value":1388}," Across Protocol does\nnot currently list X Layer (chain 196) as a supported destination. As\na result, cross-chain ",{"type":45,"tag":75,"props":1390,"children":1392},{"className":1391},[],[1393],{"type":51,"value":1394},"\u002Fquote",{"type":51,"value":1396}," calls into chain 196 return\n",{"type":45,"tag":75,"props":1398,"children":1400},{"className":1399},[],[1401],{"type":51,"value":1402},"ResourceNotFound: No quotes available",{"type":51,"value":1404}," regardless of source chain.\nSame-chain X Layer swaps (Phase A in ",{"type":45,"tag":75,"props":1406,"children":1408},{"className":1407},[],[1409],{"type":51,"value":1410},"references\u002Ffunding-x-layer.md",{"type":51,"value":1412},")\nare unaffected and work normally.",{"type":45,"tag":54,"props":1414,"children":1415},{},[1416,1421],{"type":45,"tag":60,"props":1417,"children":1418},{},[1419],{"type":51,"value":1420},"What this means for the agent in v1.0.0.",{"type":51,"value":1422}," If the user holds funds\non a chain other than X Layer, the cross-chain leg must be done\nthrough a bridge service that supports X Layer (the user runs that\nstep outside this skill, then re-invokes for the same-chain swap and\n402 settlement). Surface this honestly to the user, do not\nrecommend a specific bridge product (TODO: research and document a\nco-marketing-aligned bridge recommendation in a follow-up).",{"type":45,"tag":54,"props":1424,"children":1425},{},[1426,1431,1433,1439,1441,1446,1448,1453,1455,1460,1462,1468,1470,1475,1477,1482],{"type":45,"tag":60,"props":1427,"children":1428},{},[1429],{"type":51,"value":1430},"When you defer the bridge to the user, your response must still\ndescribe the FULL end-to-end flow",{"type":51,"value":1432},", not just the bridge step. After\nidentifying the Across gap and asking the user to bridge externally,\nwalk through what happens when they return: (1) re-check\n",{"type":45,"tag":75,"props":1434,"children":1436},{"className":1435},[],[1437],{"type":51,"value":1438},"balanceOf",{"type":51,"value":1440}," of the requested asset on X Layer, (2) if a same-chain\nswap is needed (e.g. USDG to USDT0), describe the Trading API\nEXACT_OUTPUT call and its Confirmation Gate, (3) construct the\nEIP-3009 ",{"type":45,"tag":75,"props":1442,"children":1444},{"className":1443},[],[1445],{"type":51,"value":80},{"type":51,"value":1447}," typed-data using ",{"type":45,"tag":75,"props":1449,"children":1451},{"className":1450},[],[1452],{"type":51,"value":445},{"type":51,"value":1454},"\nand ",{"type":45,"tag":75,"props":1456,"children":1458},{"className":1457},[],[1459],{"type":51,"value":453},{"type":51,"value":1461}," from the challenge, with chainId 196 and\n",{"type":45,"tag":75,"props":1463,"children":1465},{"className":1464},[],[1466],{"type":51,"value":1467},"verifyingContract",{"type":51,"value":1469}," = the asset address, (4) sign with the user's\nprivate key (Confirmation Gate before signing), (5) build the\n",{"type":45,"tag":75,"props":1471,"children":1473},{"className":1472},[],[1474],{"type":51,"value":123},{"type":51,"value":1476}," JSON wrapper (x402Version 1, scheme \"exact\", network\n\"x-layer\", payload with signature + authorization), base64-encode\nit with no whitespace, and retry the original request URL with the\n",{"type":45,"tag":75,"props":1478,"children":1480},{"className":1479},[],[1481],{"type":51,"value":123},{"type":51,"value":1483}," header. Showing the full plan up front lets the user\nsee what they are committing to before they leave the skill, even\nthough signing happens after they return.",{"type":45,"tag":54,"props":1485,"children":1486},{},[1487,1492],{"type":45,"tag":60,"props":1488,"children":1489},{},[1490],{"type":51,"value":1491},"Default funding target = USDT0.",{"type":51,"value":1493}," If the 402 challenge requests a\ndifferent asset, fund into that asset directly only when it has reliable\nUniswap routing on X Layer:",{"type":45,"tag":1495,"props":1496,"children":1497},"table",{},[1498,1527],{"type":45,"tag":1499,"props":1500,"children":1501},"thead",{},[1502],{"type":45,"tag":1503,"props":1504,"children":1505},"tr",{},[1506,1512,1517,1522],{"type":45,"tag":1507,"props":1508,"children":1509},"th",{},[1510],{"type":51,"value":1511},"Asset",{"type":45,"tag":1507,"props":1513,"children":1514},{},[1515],{"type":51,"value":1516},"Address",{"type":45,"tag":1507,"props":1518,"children":1519},{},[1520],{"type":51,"value":1521},"Decimals",{"type":45,"tag":1507,"props":1523,"children":1524},{},[1525],{"type":51,"value":1526},"Funding",{"type":45,"tag":1528,"props":1529,"children":1530},"tbody",{},[1531,1559,1585],{"type":45,"tag":1503,"props":1532,"children":1533},{},[1534,1540,1549,1554],{"type":45,"tag":1535,"props":1536,"children":1537},"td",{},[1538],{"type":51,"value":1539},"USDT0",{"type":45,"tag":1535,"props":1541,"children":1542},{},[1543],{"type":45,"tag":75,"props":1544,"children":1546},{"className":1545},[],[1547],{"type":51,"value":1548},"0x779Ded0c9e1022225f8E0630b35a9b54bE713736",{"type":45,"tag":1535,"props":1550,"children":1551},{},[1552],{"type":51,"value":1553},"6",{"type":45,"tag":1535,"props":1555,"children":1556},{},[1557],{"type":51,"value":1558},"✅ Direct via Trading API",{"type":45,"tag":1503,"props":1560,"children":1561},{},[1562,1567,1576,1580],{"type":45,"tag":1535,"props":1563,"children":1564},{},[1565],{"type":51,"value":1566},"USDG",{"type":45,"tag":1535,"props":1568,"children":1569},{},[1570],{"type":45,"tag":75,"props":1571,"children":1573},{"className":1572},[],[1574],{"type":51,"value":1575},"0x4ae46a509F6b1D9056937BA4500cb143933D2dc8",{"type":45,"tag":1535,"props":1577,"children":1578},{},[1579],{"type":51,"value":1553},{"type":45,"tag":1535,"props":1581,"children":1582},{},[1583],{"type":51,"value":1584},"✅ Direct, or one-hop USDT0 to USDG",{"type":45,"tag":1503,"props":1586,"children":1587},{},[1588,1593,1602,1606],{"type":45,"tag":1535,"props":1589,"children":1590},{},[1591],{"type":51,"value":1592},"USDC",{"type":45,"tag":1535,"props":1594,"children":1595},{},[1596],{"type":45,"tag":75,"props":1597,"children":1599},{"className":1598},[],[1600],{"type":51,"value":1601},"0x74b7F16337b8972027F6196A17a631aC6dE26d22",{"type":45,"tag":1535,"props":1603,"children":1604},{},[1605],{"type":51,"value":1553},{"type":45,"tag":1535,"props":1607,"children":1608},{},[1609],{"type":51,"value":1610},"⏳ No reliable Uniswap v3 routing on X Layer. The Trading API does not consistently return routes for USDC swaps on X Layer; available pool liquidity is too thin for reliable execution. If the merchant requires USDC, bridge USDC directly from a chain where it is liquid (Base, Arbitrum, Mainnet) using the Trading API rather than attempting a same-chain swap on X Layer.",{"type":45,"tag":54,"props":1612,"children":1613},{},[1614,1616,1620],{"type":51,"value":1615},"Detailed scripts and parameters: see\n",{"type":45,"tag":234,"props":1617,"children":1618},{"href":1410},[1619],{"type":51,"value":1410},{"type":51,"value":406},{"type":45,"tag":170,"props":1622,"children":1623},{},[1624,1634],{"type":45,"tag":54,"props":1625,"children":1626},{},[1627,1632],{"type":45,"tag":60,"props":1628,"children":1629},{},[1630],{"type":51,"value":1631},"Bridge buffer.",{"type":51,"value":1633}," Apply a 0.5% buffer to account for bridge fees.\nQuotes expire in ~60 seconds, re-fetch if any delay before broadcast.",{"type":45,"tag":54,"props":1635,"children":1636},{},[1637,1642],{"type":45,"tag":60,"props":1638,"children":1639},{},[1640],{"type":51,"value":1641},"Minimum bridge recommendation.",{"type":51,"value":1643}," If the shortfall is \u003C $5, top up to\n$5 to amortize bridge gas on the source chain.",{"type":45,"tag":1645,"props":1646,"children":1648},"h3",{"id":1647},"gas-and-routing-caveats",[1649],{"type":51,"value":1650},"Gas and Routing Caveats",{"type":45,"tag":54,"props":1652,"children":1653},{},[1654,1656,1666],{"type":51,"value":1655},"Surface these to the user before proceeding to fund, and ",{"type":45,"tag":60,"props":1657,"children":1658},{},[1659,1661],{"type":51,"value":1660},"call\n",{"type":45,"tag":75,"props":1662,"children":1664},{"className":1663},[],[1665],{"type":51,"value":306},{"type":51,"value":1667}," (not an echoed bash prompt) before acting if any\napply:",{"type":45,"tag":198,"props":1669,"children":1670},{},[1671,1681],{"type":45,"tag":93,"props":1672,"children":1673},{},[1674,1679],{"type":45,"tag":60,"props":1675,"children":1676},{},[1677],{"type":51,"value":1678},"OKB on X Layer for same-chain swaps.",{"type":51,"value":1680}," OKX gas-sponsors only the\nfacilitator's settlement transfer. Approvals, swaps, and other\non-chain operations on X Layer prior to signing are paid by the user\n(in OKB on X Layer, or in the source chain's native asset for the\nbridge leg). If the user has zero OKB on X Layer and the funding flow\nneeds a same-chain X Layer swap, surface this and ask before\nproceeding. Until OKX confirms a broader gas-sponsorship policy,\nassume only the final settlement transfer is sponsored.",{"type":45,"tag":93,"props":1682,"children":1683},{},[1684,1689,1691,1696],{"type":45,"tag":60,"props":1685,"children":1686},{},[1687],{"type":51,"value":1688},"Bridge destination token.",{"type":51,"value":1690}," If the wallet still lacks\n",{"type":45,"tag":75,"props":1692,"children":1694},{"className":1693},[],[1695],{"type":51,"value":1167},{"type":51,"value":1697}," after the funding flow's polling loop completes,\nsurface the source-chain tx hash and the Across explorer link to the\nuser. The bridge may have delivered a different variant on X Layer\n(rare for current Across paths) or may have failed. v1.0.0 does not\nauto-detect alternate-token arrival; the user must verify on-chain.",{"type":45,"tag":191,"props":1699,"children":1701},{"id":1700},"phase-4-eip-3009-signing-and-x-payment-submission",[1702],{"type":51,"value":1703},"Phase 4, EIP-3009 Signing and X-PAYMENT Submission",{"type":45,"tag":54,"props":1705,"children":1706},{},[1707,1709,1714,1716,1721,1723,1728,1730,1735],{"type":51,"value":1708},"OKX's APP Instant Payment uses x402's ",{"type":45,"tag":75,"props":1710,"children":1712},{"className":1711},[],[1713],{"type":51,"value":607},{"type":51,"value":1715}," scheme: the payer signs a\n",{"type":45,"tag":75,"props":1717,"children":1719},{"className":1718},[],[1720],{"type":51,"value":80},{"type":51,"value":1722}," typed-data message bound to the ",{"type":45,"tag":60,"props":1724,"children":1725},{},[1726],{"type":51,"value":1727},"token's\nown",{"type":51,"value":1729}," EIP-712 domain. The signed authorization travels in the\n",{"type":45,"tag":75,"props":1731,"children":1733},{"className":1732},[],[1734],{"type":51,"value":123},{"type":51,"value":1736}," header on retry; OKX's facilitator settles the transfer\non-chain (zero gas to the payer on X Layer).",{"type":45,"tag":1645,"props":1738,"children":1740},{"id":1739},"step-5-user-confirmation",[1741],{"type":51,"value":1742},"Step 5, User Confirmation",{"type":45,"tag":54,"props":1744,"children":1745},{},[1746,1751,1753,1758],{"type":45,"tag":60,"props":1747,"children":1748},{},[1749],{"type":51,"value":1750},"Every",{"type":51,"value":1752}," transaction this skill touches requires a separate\n",{"type":45,"tag":75,"props":1754,"children":1756},{"className":1755},[],[1757],{"type":51,"value":306},{"type":51,"value":1759}," gate, with no exceptions for funding legs.\n\"Funding\" is not a single transaction; it is several, and each one is\nits own gate. The required gates, in order they typically fire:",{"type":45,"tag":89,"props":1761,"children":1762},{},[1763,1781,1791,1801,1811],{"type":45,"tag":93,"props":1764,"children":1765},{},[1766,1771,1773,1779],{"type":45,"tag":60,"props":1767,"children":1768},{},[1769],{"type":51,"value":1770},"Source-chain ERC-20 approval",{"type":51,"value":1772}," to Permit2 \u002F Universal Router (only\nif ",{"type":45,"tag":75,"props":1774,"children":1776},{"className":1775},[],[1777],{"type":51,"value":1778},"tokenIn",{"type":51,"value":1780}," is not native and the allowance is insufficient).",{"type":45,"tag":93,"props":1782,"children":1783},{},[1784,1789],{"type":45,"tag":60,"props":1785,"children":1786},{},[1787],{"type":51,"value":1788},"Same-chain swap",{"type":51,"value":1790}," on the source chain (e.g. UNI to USDC on\nEthereum), if the funding plan includes a source-chain leg.",{"type":45,"tag":93,"props":1792,"children":1793},{},[1794,1799],{"type":45,"tag":60,"props":1795,"children":1796},{},[1797],{"type":51,"value":1798},"Bridge submission",{"type":51,"value":1800}," to the cross-chain rail (Across, OKX bridge,\netc.). When the bridge step is user-initiated outside this skill,\nthe gate becomes \"are you ready to leave the skill, run the bridge,\nand re-invoke once funds land on X Layer?\".",{"type":45,"tag":93,"props":1802,"children":1803},{},[1804,1809],{"type":45,"tag":60,"props":1805,"children":1806},{},[1807],{"type":51,"value":1808},"Same-chain swap on X Layer",{"type":51,"value":1810}," (e.g. USDG to USDT0), if the funding\nplan includes a destination-chain leg.",{"type":45,"tag":93,"props":1812,"children":1813},{},[1814,1826],{"type":45,"tag":60,"props":1815,"children":1816},{},[1817,1819,1824],{"type":51,"value":1818},"EIP-3009 ",{"type":45,"tag":75,"props":1820,"children":1822},{"className":1821},[],[1823],{"type":51,"value":80},{"type":51,"value":1825}," signature",{"type":51,"value":1827}," for the 402\nsettlement.",{"type":45,"tag":54,"props":1829,"children":1830},{},[1831,1833,1843,1845,1851,1853,1859,1861,1866],{"type":51,"value":1832},"Use the ",{"type":45,"tag":60,"props":1834,"children":1835},{},[1836,1841],{"type":45,"tag":75,"props":1837,"children":1839},{"className":1838},[],[1840],{"type":51,"value":306},{"type":51,"value":1842}," agent tool",{"type":51,"value":1844}," for each gate (not ",{"type":45,"tag":75,"props":1846,"children":1848},{"className":1847},[],[1849],{"type":51,"value":1850},"read -p",{"type":51,"value":1852},",\nnot ",{"type":45,"tag":75,"props":1854,"children":1856},{"className":1855},[],[1857],{"type":51,"value":1858},"echo",{"type":51,"value":1860}," to a bash prompt, not a printed \"(yes\u002Fno)\" line in your\nresponse) and ",{"type":45,"tag":60,"props":1862,"children":1863},{},[1864],{"type":51,"value":1865},"block on the user's reply",{"type":51,"value":1867}," before moving on. The\nsummary you present at every gate must cover:",{"type":45,"tag":198,"props":1869,"children":1870},{},[1871,1876,1881,1886,1898,1903],{"type":45,"tag":93,"props":1872,"children":1873},{},[1874],{"type":51,"value":1875},"Action (approve, swap, bridge, sign EIP-3009 authorization).",{"type":45,"tag":93,"props":1877,"children":1878},{},[1879],{"type":51,"value":1880},"Amount and token (input AND output amounts for swaps and bridges).",{"type":45,"tag":93,"props":1882,"children":1883},{},[1884],{"type":51,"value":1885},"Source chain and destination chain (where they differ).",{"type":45,"tag":93,"props":1887,"children":1888},{},[1889,1891,1896],{"type":51,"value":1890},"Recipient (",{"type":45,"tag":75,"props":1892,"children":1894},{"className":1893},[],[1895],{"type":51,"value":361},{"type":51,"value":1897}," for the EIP-3009 step).",{"type":45,"tag":93,"props":1899,"children":1900},{},[1901],{"type":51,"value":1902},"Resource URL the payment is bound to.",{"type":45,"tag":93,"props":1904,"children":1905},{},[1906],{"type":51,"value":1907},"Estimated gas (where applicable).",{"type":45,"tag":170,"props":1909,"children":1910},{},[1911],{"type":45,"tag":54,"props":1912,"children":1913},{},[1914,1919],{"type":45,"tag":60,"props":1915,"children":1916},{},[1917],{"type":51,"value":1918},"Common failure mode.",{"type":51,"value":1920}," When describing a multi-step funding plan\nin your response, do NOT collapse multiple transactions into a\nsingle confirmation question like \"Proceed with funding and\npayment?\". Each transaction needs its own gate at the moment it is\nabout to fire. A consolidated upfront \"yes\" is not consent for\nlater transactions; the user has not seen the live amounts, gas,\nand recipient at the time those transactions execute.",{"type":45,"tag":54,"props":1922,"children":1923},{},[1924,1926,1931],{"type":51,"value":1925},"Obtain explicit confirmation per gate. Each gate is independent.\n",{"type":45,"tag":60,"props":1927,"children":1928},{},[1929],{"type":51,"value":1930},"Never",{"type":51,"value":1932}," auto-submit even if the user previously pre-authorized the\nsession, the call, or the wallet. A \"yes\" earlier in the flow does\nnot carry forward, and a \"yes\" to a multi-step plan is not a \"yes\" to\nthe individual transactions inside it.",{"type":45,"tag":170,"props":1934,"children":1935},{},[1936,1953,1961,1970],{"type":45,"tag":54,"props":1937,"children":1938},{},[1939,1944,1946,1951],{"type":45,"tag":60,"props":1940,"children":1941},{},[1942],{"type":51,"value":1943},"What a correct gate looks like in your response.",{"type":51,"value":1945}," Whether you are\nexecuting the skill in real time or describing a plan in text, every\ntransaction step MUST appear as its own labelled \"Confirmation Gate\"\nblock, with both the structured summary and an explicit\n",{"type":45,"tag":75,"props":1947,"children":1949},{"className":1948},[],[1950],{"type":51,"value":306},{"type":51,"value":1952}," invocation. Reproduce this template literally for\neach gate. Do not collapse the gate into a single line. Do not\ndescribe the gate in passive voice (\"we will confirm before\nsigning\"). Show the gate as a discrete action.",{"type":45,"tag":54,"props":1954,"children":1955},{},[1956],{"type":45,"tag":60,"props":1957,"children":1958},{},[1959],{"type":51,"value":1960},"Template (use for every gate, even when there is only one):",{"type":45,"tag":555,"props":1962,"children":1965},{"className":1963,"code":1964,"language":51,"meta":560},[558],"### Confirmation Gate N: \u003CAction name>\n\n| Field        | Value                                    |\n| ------------ | ---------------------------------------- |\n| Action       | \u003Capprove \u002F swap \u002F bridge \u002F sign EIP-3009>|\n| Amount in    | \u003Camount + symbol on source chain>        |\n| Amount out   | \u003Camount + symbol on destination chain>   |\n| Source chain | \u003Cchain name + id>                        |\n| Dest chain   | \u003Cchain name + id>                        |\n| Recipient    | \u003Caddress>                                |\n| Resource URL | \u003Curl the payment is bound to>            |\n| Est. gas     | \u003Camount + token>                         |\n\nThen call AskUserQuestion(\"Proceed with \u003Caction>?\")\nand BLOCK on the user's reply. If anything other than an explicit\n\"yes\", stop and report.\n",[1966],{"type":45,"tag":75,"props":1967,"children":1968},{"__ignoreMap":560},[1969],{"type":51,"value":1964},{"type":45,"tag":54,"props":1971,"children":1972},{},[1973,1975,1981],{"type":51,"value":1974},"A response that only lists fields without the\n",{"type":45,"tag":75,"props":1976,"children":1978},{"className":1977},[],[1979],{"type":51,"value":1980},"AskUserQuestion(\"Proceed?\") + block",{"type":51,"value":1982}," step is not a gate, even if it\nlooks comprehensive. The model's natural inclination is to summarize\nand continue; resist that inclination, name the gate, and stop.",{"type":45,"tag":170,"props":1984,"children":1985},{},[1986],{"type":45,"tag":54,"props":1987,"children":1988},{},[1989,1994,1996,2002,2003,2009,2011,2017,2019,2024,2026,2031,2033,2038,2040,2046,2048,2054,2056,2061],{"type":45,"tag":60,"props":1990,"children":1991},{},[1992],{"type":51,"value":1993},"What does NOT count as a confirmation gate.",{"type":51,"value":1995}," Emitting a bash script\nthat prints ",{"type":45,"tag":75,"props":1997,"children":1999},{"className":1998},[],[2000],{"type":51,"value":2001},"\"⚠️ CONFIRMATION REQUIRED\"",{"type":51,"value":254},{"type":45,"tag":75,"props":2004,"children":2006},{"className":2005},[],[2007],{"type":51,"value":2008},"\"(yes\u002Fno)\"",{"type":51,"value":2010}," to stdout and\nthen continues with ",{"type":45,"tag":75,"props":2012,"children":2014},{"className":2013},[],[2015],{"type":51,"value":2016},"echo \"Signing...\"",{"type":51,"value":2018}," is ",{"type":45,"tag":60,"props":2020,"children":2021},{},[2022],{"type":51,"value":2023},"not",{"type":51,"value":2025}," a gate, because the\nscript proceeds regardless of user input. A correct gate uses the\n",{"type":45,"tag":75,"props":2027,"children":2029},{"className":2028},[],[2030],{"type":51,"value":306},{"type":51,"value":2032}," tool (or, if the user explicitly opts into shell-only\nmode, an actual blocking ",{"type":45,"tag":75,"props":2034,"children":2036},{"className":2035},[],[2037],{"type":51,"value":1850},{"type":51,"value":2039}," followed by an explicit ",{"type":45,"tag":75,"props":2041,"children":2043},{"className":2042},[],[2044],{"type":51,"value":2045},"yes",{"type":51,"value":2047},"\u002F",{"type":45,"tag":75,"props":2049,"children":2051},{"className":2050},[],[2052],{"type":51,"value":2053},"no",{"type":51,"value":2055},"\nbranch in the script). When in doubt, prefer ",{"type":45,"tag":75,"props":2057,"children":2059},{"className":2058},[],[2060],{"type":51,"value":306},{"type":51,"value":406},{"type":45,"tag":170,"props":2063,"children":2064},{},[2065],{"type":45,"tag":54,"props":2066,"children":2067},{},[2068,2073,2075,2080],{"type":45,"tag":60,"props":2069,"children":2070},{},[2071],{"type":51,"value":2072},"Shared-wallet race.",{"type":51,"value":2074}," If the wallet is shared (for example, multiple\nagents running concurrently against the same key), the balance can be\ndrained between balance check and submit. Re-check ",{"type":45,"tag":75,"props":2076,"children":2078},{"className":2077},[],[2079],{"type":51,"value":1438},{"type":51,"value":2081}," at the\nmoment of confirmation as well.",{"type":45,"tag":1645,"props":2083,"children":2085},{"id":2084},"step-6-sign-and-submit",[2086],{"type":51,"value":2087},"Step 6, Sign and Submit",{"type":45,"tag":54,"props":2089,"children":2090},{},[2091,2093,2097,2099,2104],{"type":51,"value":2092},"Detailed steps including domain construction, nonce generation, signing\nwith viem, payload assembly, and retry: see\n",{"type":45,"tag":234,"props":2094,"children":2095},{"href":275},[2096],{"type":51,"value":275},{"type":51,"value":2098},". On retry,\ntarget the URL from ",{"type":45,"tag":75,"props":2100,"children":2102},{"className":2101},[],[2103],{"type":51,"value":721},{"type":51,"value":2105}," if it was present in the\nchallenge, otherwise the original request URL.",{"type":45,"tag":170,"props":2107,"children":2108},{},[2109,2156],{"type":45,"tag":54,"props":2110,"children":2111},{},[2112,2117,2119,2124,2126,2131,2133,2139,2140,2146,2148,2154],{"type":45,"tag":60,"props":2113,"children":2114},{},[2115],{"type":51,"value":2116},"Domain warning.",{"type":51,"value":2118}," ",{"type":45,"tag":75,"props":2120,"children":2122},{"className":2121},[],[2123],{"type":51,"value":1467},{"type":51,"value":2125}," is the ",{"type":45,"tag":60,"props":2127,"children":2128},{},[2129],{"type":51,"value":2130},"token contract",{"type":51,"value":2132},", not\na separate verifier. Use ",{"type":45,"tag":75,"props":2134,"children":2136},{"className":2135},[],[2137],{"type":51,"value":2138},"name",{"type":51,"value":254},{"type":45,"tag":75,"props":2141,"children":2143},{"className":2142},[],[2144],{"type":51,"value":2145},"version",{"type":51,"value":2147}," from the challenge's\n",{"type":45,"tag":75,"props":2149,"children":2151},{"className":2150},[],[2152],{"type":51,"value":2153},"extra",{"type":51,"value":2155}," field, do not assume defaults. Different tokens have different\ndomain values. An incorrect domain produces a signature the\nfacilitator will reject with another 402.",{"type":45,"tag":54,"props":2157,"children":2158},{},[2159,2170,2172,2177,2179,2184,2186,2192,2194,2200,2202,2208,2210,2215,2217,2223,2225,2230],{"type":45,"tag":60,"props":2160,"children":2161},{},[2162,2164,2169],{"type":51,"value":2163},"Bit-exact UTF-8 for ",{"type":45,"tag":75,"props":2165,"children":2167},{"className":2166},[],[2168],{"type":51,"value":445},{"type":51,"value":406},{"type":51,"value":2171}," The EIP-712 domain hash is\nbyte-exact. The ",{"type":45,"tag":75,"props":2173,"children":2175},{"className":2174},[],[2176],{"type":51,"value":2138},{"type":51,"value":2178}," field in ",{"type":45,"tag":75,"props":2180,"children":2182},{"className":2181},[],[2183],{"type":51,"value":2153},{"type":51,"value":2185}," must be passed through\nunchanged from the challenge bytes. Do not normalize it, do not\nlowercase it, do not substitute ASCII ",{"type":45,"tag":75,"props":2187,"children":2189},{"className":2188},[],[2190],{"type":51,"value":2191},"T",{"type":51,"value":2193}," (U+0054) for Unicode ",{"type":45,"tag":75,"props":2195,"children":2197},{"className":2196},[],[2198],{"type":51,"value":2199},"₮",{"type":51,"value":2201},"\n(U+20AE), do not collapse Unicode forms (NFC vs NFD). For example, a\nchallenge that returns ",{"type":45,"tag":75,"props":2203,"children":2205},{"className":2204},[],[2206],{"type":51,"value":2207},"\"USD₮0\"",{"type":51,"value":2209}," must be signed as ",{"type":45,"tag":75,"props":2211,"children":2213},{"className":2212},[],[2214],{"type":51,"value":2207},{"type":51,"value":2216},"; reading\nit as ",{"type":45,"tag":75,"props":2218,"children":2220},{"className":2219},[],[2221],{"type":51,"value":2222},"\"USDT0\"",{"type":51,"value":2224}," will produce a signature the facilitator rejects with\nanother 402. Pass the raw bytes of ",{"type":45,"tag":75,"props":2226,"children":2228},{"className":2227},[],[2229],{"type":51,"value":445},{"type":51,"value":2231}," straight into the\nEIP-712 domain.",{"type":45,"tag":191,"props":2233,"children":2235},{"id":2234},"error-handling",[2236],{"type":51,"value":2237},"Error Handling",{"type":45,"tag":1495,"props":2239,"children":2240},{},[2241,2257],{"type":45,"tag":1499,"props":2242,"children":2243},{},[2244],{"type":45,"tag":1503,"props":2245,"children":2246},{},[2247,2252],{"type":45,"tag":1507,"props":2248,"children":2249},{},[2250],{"type":51,"value":2251},"Situation",{"type":45,"tag":1507,"props":2253,"children":2254},{},[2255],{"type":51,"value":2256},"Action",{"type":45,"tag":1528,"props":2258,"children":2259},{},[2260,2294,2312,2329,2366,2383,2396,2409,2422,2435,2454,2467,2515,2536,2564],{"type":45,"tag":1503,"props":2261,"children":2262},{},[2263,2276],{"type":45,"tag":1535,"props":2264,"children":2265},{},[2266,2268,2274],{"type":51,"value":2267},"402 challenge has no ",{"type":45,"tag":75,"props":2269,"children":2271},{"className":2270},[],[2272],{"type":51,"value":2273},"network",{"type":51,"value":2275}," field",{"type":45,"tag":1535,"props":2277,"children":2278},{},[2279,2281,2287,2289],{"type":51,"value":2280},"Inspect challenge body; if ",{"type":45,"tag":75,"props":2282,"children":2284},{"className":2283},[],[2285],{"type":51,"value":2286},"chainId",{"type":51,"value":2288}," resolves to 196 use this skill, otherwise escalate to ",{"type":45,"tag":75,"props":2290,"children":2292},{"className":2291},[],[2293],{"type":51,"value":1094},{"type":45,"tag":1503,"props":2295,"children":2296},{},[2297,2302],{"type":45,"tag":1535,"props":2298,"children":2299},{},[2300],{"type":51,"value":2301},"Network is not chain 196",{"type":45,"tag":1535,"props":2303,"children":2304},{},[2305,2307],{"type":51,"value":2306},"Escalate to ",{"type":45,"tag":75,"props":2308,"children":2310},{"className":2309},[],[2311],{"type":51,"value":1094},{"type":45,"tag":1503,"props":2313,"children":2314},{},[2315,2324],{"type":45,"tag":1535,"props":2316,"children":2317},{},[2318],{"type":45,"tag":75,"props":2319,"children":2321},{"className":2320},[],[2322],{"type":51,"value":2323},"x402Version !== 1",{"type":45,"tag":1535,"props":2325,"children":2326},{},[2327],{"type":51,"value":2328},"Refuse cleanly; surface a version mismatch error. v1.0.0 of this skill targets x402 v1 only.",{"type":45,"tag":1503,"props":2330,"children":2331},{},[2332,2341],{"type":45,"tag":1535,"props":2333,"children":2334},{},[2335],{"type":45,"tag":75,"props":2336,"children":2338},{"className":2337},[],[2339],{"type":51,"value":2340},"accepts[].scheme !== \"exact\"",{"type":45,"tag":1535,"props":2342,"children":2343},{},[2344,2346,2351,2353,2358,2359,2364],{"type":51,"value":2345},"Refuse cleanly; v1.0.0 supports the ",{"type":45,"tag":75,"props":2347,"children":2349},{"className":2348},[],[2350],{"type":51,"value":143},{"type":51,"value":2352}," scheme only. Other x402 schemes (",{"type":45,"tag":75,"props":2354,"children":2356},{"className":2355},[],[2357],{"type":51,"value":151},{"type":51,"value":153},{"type":45,"tag":75,"props":2360,"children":2362},{"className":2361},[],[2363],{"type":51,"value":159},{"type":51,"value":2365},") are out of scope.",{"type":45,"tag":1503,"props":2367,"children":2368},{},[2369,2378],{"type":45,"tag":1535,"props":2370,"children":2371},{},[2372],{"type":45,"tag":75,"props":2373,"children":2375},{"className":2374},[],[2376],{"type":51,"value":2377},"accepts[].maxAmountRequired === \"0\"",{"type":45,"tag":1535,"props":2379,"children":2380},{},[2381],{"type":51,"value":2382},"Refuse cleanly as merchant misconfiguration. HTTP 402 demands a positive payment; OKX's facilitator will not settle a zero-value transfer. Do not sign and do not rationalize zero as a ping, auth check, or free tier.",{"type":45,"tag":1503,"props":2384,"children":2385},{},[2386,2391],{"type":45,"tag":1535,"props":2387,"children":2388},{},[2389],{"type":51,"value":2390},"APP requests USDC on X Layer",{"type":45,"tag":1535,"props":2392,"children":2393},{},[2394],{"type":51,"value":2395},"Surface a clear caveat: USDC has no reliable Uniswap v3 routing on X Layer. Suggest bridging USDC directly from a chain where it is liquid (Base, Arbitrum, Mainnet), or asking about USDT0.",{"type":45,"tag":1503,"props":2397,"children":2398},{},[2399,2404],{"type":45,"tag":1535,"props":2400,"children":2401},{},[2402],{"type":51,"value":2403},"Insufficient asset on X Layer",{"type":45,"tag":1535,"props":2405,"children":2406},{},[2407],{"type":51,"value":2408},"Trigger funding flow (Phase 3)",{"type":45,"tag":1503,"props":2410,"children":2411},{},[2412,2417],{"type":45,"tag":1535,"props":2413,"children":2414},{},[2415],{"type":51,"value":2416},"Trading API returns 400",{"type":45,"tag":1535,"props":2418,"children":2419},{},[2420],{"type":51,"value":2421},"Log request\u002Fresponse; check amount formatting and address checksums",{"type":45,"tag":1503,"props":2423,"children":2424},{},[2425,2430],{"type":45,"tag":1535,"props":2426,"children":2427},{},[2428],{"type":51,"value":2429},"Trading API returns 429",{"type":45,"tag":1535,"props":2431,"children":2432},{},[2433],{"type":51,"value":2434},"Back off and retry with exponential delay",{"type":45,"tag":1503,"props":2436,"children":2437},{},[2438,2443],{"type":45,"tag":1535,"props":2439,"children":2440},{},[2441],{"type":51,"value":2442},"Quote expired",{"type":45,"tag":1535,"props":2444,"children":2445},{},[2446,2448],{"type":51,"value":2447},"Re-fetch quote; do not reuse old ",{"type":45,"tag":75,"props":2449,"children":2451},{"className":2450},[],[2452],{"type":51,"value":2453},"permitData",{"type":45,"tag":1503,"props":2455,"children":2456},{},[2457,2462],{"type":45,"tag":1535,"props":2458,"children":2459},{},[2460],{"type":51,"value":2461},"Bridge times out",{"type":45,"tag":1535,"props":2463,"children":2464},{},[2465],{"type":51,"value":2466},"Check Across bridge explorer; do not re-submit",{"type":45,"tag":1503,"props":2468,"children":2469},{},[2470,2475],{"type":45,"tag":1535,"props":2471,"children":2472},{},[2473],{"type":51,"value":2474},"EIP-3009 signature rejected (402 on retry)",{"type":45,"tag":1535,"props":2476,"children":2477},{},[2478,2480,2485,2486,2491,2493,2498,2500,2505,2507,2513],{"type":51,"value":2479},"Verify domain ",{"type":45,"tag":75,"props":2481,"children":2483},{"className":2482},[],[2484],{"type":51,"value":2138},{"type":51,"value":628},{"type":45,"tag":75,"props":2487,"children":2489},{"className":2488},[],[2490],{"type":51,"value":2145},{"type":51,"value":2492}," from ",{"type":45,"tag":75,"props":2494,"children":2496},{"className":2495},[],[2497],{"type":51,"value":2153},{"type":51,"value":2499}," (byte-exact, including any non-ASCII characters), check ",{"type":45,"tag":75,"props":2501,"children":2503},{"className":2502},[],[2504],{"type":51,"value":758},{"type":51,"value":2506}," is fresh, confirm ",{"type":45,"tag":75,"props":2508,"children":2510},{"className":2509},[],[2511],{"type":51,"value":2512},"nonce",{"type":51,"value":2514}," was unused",{"type":45,"tag":1503,"props":2516,"children":2517},{},[2518,2523],{"type":45,"tag":1535,"props":2519,"children":2520},{},[2521],{"type":51,"value":2522},"Amount mismatch on retry",{"type":45,"tag":1535,"props":2524,"children":2525},{},[2526,2528,2534],{"type":51,"value":2527},"Recompute base units using on-chain ",{"type":45,"tag":75,"props":2529,"children":2531},{"className":2530},[],[2532],{"type":51,"value":2533},"decimals()",{"type":51,"value":2535}," of the actual asset; do not assume 6",{"type":45,"tag":1503,"props":2537,"children":2538},{},[2539,2552],{"type":45,"tag":1535,"props":2540,"children":2541},{},[2542,2544,2550],{"type":51,"value":2543},"On-chain settlement reverts (",{"type":45,"tag":75,"props":2545,"children":2547},{"className":2546},[],[2548],{"type":51,"value":2549},"transferFrom",{"type":51,"value":2551}," failed)",{"type":45,"tag":1535,"props":2553,"children":2554},{},[2555,2557,2562],{"type":51,"value":2556},"Re-check ",{"type":45,"tag":75,"props":2558,"children":2560},{"className":2559},[],[2561],{"type":51,"value":1438},{"type":51,"value":2563}," at retry time; the balance may have been drained between sign and submit (shared wallet, concurrent agent, manual transfer). Surface to the user before retrying.",{"type":45,"tag":1503,"props":2565,"children":2566},{},[2567,2577],{"type":45,"tag":1535,"props":2568,"children":2569},{},[2570,2572],{"type":51,"value":2571},"User asks about escrow \u002F session \u002F batch \u002F ",{"type":45,"tag":75,"props":2573,"children":2575},{"className":2574},[],[2576],{"type":51,"value":151},{"type":45,"tag":1535,"props":2578,"children":2579},{},[2580,2582,2587],{"type":51,"value":2581},"Inform that this skill version covers Instant Payment (",{"type":45,"tag":75,"props":2583,"children":2585},{"className":2584},[],[2586],{"type":51,"value":143},{"type":51,"value":2588}," scheme) only. Other primitives are out of scope for v1.0.0; a v1.x follow-up will track them as OKX ships.",{"type":45,"tag":191,"props":2590,"children":2592},{"id":2591},"key-addresses-and-references",[2593],{"type":51,"value":2594},"Key Addresses and References",{"type":45,"tag":1645,"props":2596,"children":2598},{"id":2597},"x-layer-chain-196",[2599],{"type":51,"value":2600},"X Layer (chain 196)",{"type":45,"tag":198,"props":2602,"children":2603},{},[2604,2619,2634,2649,2663,2678,2695,2710,2725,2741,2756,2771,2786],{"type":45,"tag":93,"props":2605,"children":2606},{},[2607,2612,2614],{"type":45,"tag":60,"props":2608,"children":2609},{},[2610],{"type":51,"value":2611},"Chain ID",{"type":51,"value":2613},": ",{"type":45,"tag":75,"props":2615,"children":2617},{"className":2616},[],[2618],{"type":51,"value":649},{"type":45,"tag":93,"props":2620,"children":2621},{},[2622,2627,2628],{"type":45,"tag":60,"props":2623,"children":2624},{},[2625],{"type":51,"value":2626},"Public RPC",{"type":51,"value":2613},{"type":45,"tag":75,"props":2629,"children":2631},{"className":2630},[],[2632],{"type":51,"value":2633},"https:\u002F\u002Frpc.xlayer.tech",{"type":45,"tag":93,"props":2635,"children":2636},{},[2637,2641,2642,2647],{"type":45,"tag":60,"props":2638,"children":2639},{},[2640],{"type":51,"value":1539},{"type":51,"value":2613},{"type":45,"tag":75,"props":2643,"children":2645},{"className":2644},[],[2646],{"type":51,"value":1548},{"type":51,"value":2648}," (decimals 6)",{"type":45,"tag":93,"props":2650,"children":2651},{},[2652,2656,2657,2662],{"type":45,"tag":60,"props":2653,"children":2654},{},[2655],{"type":51,"value":1566},{"type":51,"value":2613},{"type":45,"tag":75,"props":2658,"children":2660},{"className":2659},[],[2661],{"type":51,"value":1575},{"type":51,"value":2648},{"type":45,"tag":93,"props":2664,"children":2665},{},[2666,2670,2671,2676],{"type":45,"tag":60,"props":2667,"children":2668},{},[2669],{"type":51,"value":1592},{"type":51,"value":2613},{"type":45,"tag":75,"props":2672,"children":2674},{"className":2673},[],[2675],{"type":51,"value":1601},{"type":51,"value":2677}," (decimals 6, no\nreliable Uniswap routing on X Layer; bridge from a liquid chain)",{"type":45,"tag":93,"props":2679,"children":2680},{},[2681,2685,2687,2693],{"type":45,"tag":60,"props":2682,"children":2683},{},[2684],{"type":51,"value":890},{"type":51,"value":2686}," (wrapped native): ",{"type":45,"tag":75,"props":2688,"children":2690},{"className":2689},[],[2691],{"type":51,"value":2692},"0xe538905cf8410324e03A5A23C1c177a474D59b2b",{"type":51,"value":2694},"\n(decimals 18)",{"type":45,"tag":93,"props":2696,"children":2697},{},[2698,2703,2704],{"type":45,"tag":60,"props":2699,"children":2700},{},[2701],{"type":51,"value":2702},"Uniswap V3 Factory",{"type":51,"value":2613},{"type":45,"tag":75,"props":2705,"children":2707},{"className":2706},[],[2708],{"type":51,"value":2709},"0x4B2ab38DBF28D31D467aA8993f6c2585981D6804",{"type":45,"tag":93,"props":2711,"children":2712},{},[2713,2718,2719],{"type":45,"tag":60,"props":2714,"children":2715},{},[2716],{"type":51,"value":2717},"SwapRouter02",{"type":51,"value":2613},{"type":45,"tag":75,"props":2720,"children":2722},{"className":2721},[],[2723],{"type":51,"value":2724},"0x4f0C28f5926AFDA16bf2506D5D9e57Ea190f9bcA",{"type":45,"tag":93,"props":2726,"children":2727},{},[2728,2733,2735],{"type":45,"tag":60,"props":2729,"children":2730},{},[2731],{"type":51,"value":2732},"Universal Router 2.1",{"type":51,"value":2734},":\n",{"type":45,"tag":75,"props":2736,"children":2738},{"className":2737},[],[2739],{"type":51,"value":2740},"0xDa00aE15d3A71466517129255255db7c0c0956d3",{"type":45,"tag":93,"props":2742,"children":2743},{},[2744,2749,2750],{"type":45,"tag":60,"props":2745,"children":2746},{},[2747],{"type":51,"value":2748},"QuoterV2",{"type":51,"value":2613},{"type":45,"tag":75,"props":2751,"children":2753},{"className":2752},[],[2754],{"type":51,"value":2755},"0xD1b797D92d87B688193A2B976eFc8D577D204343",{"type":45,"tag":93,"props":2757,"children":2758},{},[2759,2764,2765],{"type":45,"tag":60,"props":2760,"children":2761},{},[2762],{"type":51,"value":2763},"Permit2",{"type":51,"value":2613},{"type":45,"tag":75,"props":2766,"children":2768},{"className":2767},[],[2769],{"type":51,"value":2770},"0x000000000022D473030F116dDEE9F6B43aC78BA3",{"type":45,"tag":93,"props":2772,"children":2773},{},[2774,2779,2780],{"type":45,"tag":60,"props":2775,"children":2776},{},[2777],{"type":51,"value":2778},"USDT0\u002FUSDG pool",{"type":51,"value":2613},{"type":45,"tag":75,"props":2781,"children":2783},{"className":2782},[],[2784],{"type":51,"value":2785},"0x0cBe0dBE1400e57f371a38BD3b9bC80F7C3676dA",{"type":45,"tag":93,"props":2787,"children":2788},{},[2789,2794,2795],{"type":45,"tag":60,"props":2790,"children":2791},{},[2792],{"type":51,"value":2793},"USDT0\u002FWOKB pool",{"type":51,"value":2613},{"type":45,"tag":75,"props":2796,"children":2798},{"className":2797},[],[2799],{"type":51,"value":2800},"0x63d62734847E55A266FCa4219A9aD0a02D5F6e02",{"type":45,"tag":1645,"props":2802,"children":2804},{"id":2803},"uniswap-trading-api",[2805],{"type":51,"value":2806},"Uniswap Trading API",{"type":45,"tag":198,"props":2808,"children":2809},{},[2810,2821,2832,2842],{"type":45,"tag":93,"props":2811,"children":2812},{},[2813,2815],{"type":51,"value":2814},"Base URL: ",{"type":45,"tag":75,"props":2816,"children":2818},{"className":2817},[],[2819],{"type":51,"value":2820},"https:\u002F\u002Ftrade-api.gateway.uniswap.org\u002Fv1",{"type":45,"tag":93,"props":2822,"children":2823},{},[2824,2826],{"type":51,"value":2825},"Header: ",{"type":45,"tag":75,"props":2827,"children":2829},{"className":2828},[],[2830],{"type":51,"value":2831},"x-api-key: $UNISWAP_API_KEY",{"type":45,"tag":93,"props":2833,"children":2834},{},[2835,2836],{"type":51,"value":2825},{"type":45,"tag":75,"props":2837,"children":2839},{"className":2838},[],[2840],{"type":51,"value":2841},"x-universal-router-version: 2.1.1",{"type":45,"tag":93,"props":2843,"children":2844},{},[2845,2847,2851],{"type":51,"value":2846},"Supported chains include 1, 8453, 42161, 10, 137, 130, ",{"type":45,"tag":60,"props":2848,"children":2849},{},[2850],{"type":51,"value":649},{"type":51,"value":2852},", and more\n(see Trading API supported-chains docs).",{"type":45,"tag":170,"props":2854,"children":2855},{},[2856],{"type":45,"tag":54,"props":2857,"children":2858},{},[2859,2861,2866,2868,2873,2875,2881],{"type":51,"value":2860},"The on-chain Universal Router contract on X Layer is labeled ",{"type":45,"tag":60,"props":2862,"children":2863},{},[2864],{"type":51,"value":2865},"2.1",{"type":51,"value":2867},"\n(deployed at ",{"type":45,"tag":75,"props":2869,"children":2871},{"className":2870},[],[2872],{"type":51,"value":2740},{"type":51,"value":2874}," above). The\nTrading API expects the header value ",{"type":45,"tag":75,"props":2876,"children":2878},{"className":2877},[],[2879],{"type":51,"value":2880},"2.1.1",{"type":51,"value":2882},", which is the API's\ninternal version-string for the routing path that targets the same\nUniversal Router 2.1 contract. The two version strings refer to\nrelated but distinct things; do not substitute one for the other.",{"type":45,"tag":1645,"props":2884,"children":2886},{"id":2885},"okx-app",[2887],{"type":51,"value":2888},"OKX APP",{"type":45,"tag":198,"props":2890,"children":2891},{},[2892,2907,2922],{"type":45,"tag":93,"props":2893,"children":2894},{},[2895,2900,2901],{"type":45,"tag":60,"props":2896,"children":2897},{},[2898],{"type":51,"value":2899},"APP overview \u002F dev docs",{"type":51,"value":2734},{"type":45,"tag":75,"props":2902,"children":2904},{"className":2903},[],[2905],{"type":51,"value":2906},"https:\u002F\u002Fweb3.okx.com\u002Fonchainos\u002Fdev-docs\u002Fpayments\u002Fx402-introduction",{"type":45,"tag":93,"props":2908,"children":2909},{},[2910,2915,2916],{"type":45,"tag":60,"props":2911,"children":2912},{},[2913],{"type":51,"value":2914},"OKX onchainos-skills repo",{"type":51,"value":2613},{"type":45,"tag":75,"props":2917,"children":2919},{"className":2918},[],[2920],{"type":51,"value":2921},"https:\u002F\u002Fgithub.com\u002Fokx\u002Fonchainos-skills",{"type":45,"tag":93,"props":2923,"children":2924},{},[2925,2930,2931],{"type":45,"tag":60,"props":2926,"children":2927},{},[2928],{"type":51,"value":2929},"x402 spec",{"type":51,"value":2613},{"type":45,"tag":75,"props":2932,"children":2934},{"className":2933},[],[2935],{"type":51,"value":2936},"https:\u002F\u002Fgithub.com\u002Fcoinbase\u002Fx402",{"type":45,"tag":191,"props":2938,"children":2940},{"id":2939},"related-skills",[2941],{"type":51,"value":2942},"Related Skills",{"type":45,"tag":198,"props":2944,"children":2945},{},[2946,2956],{"type":45,"tag":93,"props":2947,"children":2948},{},[2949,2954],{"type":45,"tag":234,"props":2950,"children":2952},{"href":2951},"..\u002Fpay-with-any-token\u002FSKILL.md",[2953],{"type":51,"value":1094},{"type":51,"value":2955},", sibling skill\nfor HTTP 402 challenges on chains other than X Layer (Ethereum, Base,\nArbitrum, Tempo, etc.). Use that skill for non-X-Layer challenges.",{"type":45,"tag":93,"props":2957,"children":2958},{},[2959,2965],{"type":45,"tag":234,"props":2960,"children":2962},{"href":2961},"..\u002Fswap-integration\u002FSKILL.md",[2963],{"type":51,"value":2964},"swap-integration",{"type":51,"value":2966},", full Uniswap swap\nintegration reference (Trading API, Universal Router, Permit2).",{"type":45,"tag":2968,"props":2969,"children":2970},"style",{},[2971],{"type":51,"value":2972},"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":2974,"total":3118},[2975,2992,3007,3020,3033,3046,3059,3070,3080,3087,3097,3108],{"slug":2976,"name":2976,"fn":2977,"description":2978,"org":2979,"tags":2980,"stars":24,"repoUrl":25,"updatedAt":2991},"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},[2981,2984,2987,2990],{"name":2982,"slug":2983,"type":14},"Configuration","configuration",{"name":2985,"slug":2986,"type":14},"Ethereum","ethereum",{"name":2988,"slug":2989,"type":14},"Smart Contracts","smart-contracts",{"name":16,"slug":17,"type":14},"2026-07-17T06:08:08.974641",{"slug":2993,"name":2993,"fn":2994,"description":2995,"org":2996,"tags":2997,"stars":24,"repoUrl":25,"updatedAt":3006},"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},[2998,3001,3002,3005],{"name":2999,"slug":3000,"type":14},"Automation","automation",{"name":2985,"slug":2986,"type":14},{"name":3003,"slug":3004,"type":14},"Trading","trading",{"name":16,"slug":17,"type":14},"2026-07-17T06:04:21.974052",{"slug":3008,"name":3008,"fn":3009,"description":3010,"org":3011,"tags":3012,"stars":24,"repoUrl":25,"updatedAt":3019},"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},[3013,3014,3017,3018],{"name":2999,"slug":3000,"type":14},{"name":3015,"slug":3016,"type":14},"DeFi","defi",{"name":3003,"slug":3004,"type":14},{"name":16,"slug":17,"type":14},"2026-07-17T06:05:37.160647",{"slug":3021,"name":3021,"fn":3022,"description":3023,"org":3024,"tags":3025,"stars":24,"repoUrl":25,"updatedAt":3032},"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},[3026,3029,3030,3031],{"name":3027,"slug":3028,"type":14},"Deployment","deployment",{"name":2985,"slug":2986,"type":14},{"name":2988,"slug":2989,"type":14},{"name":16,"slug":17,"type":14},"2026-07-17T06:08:09.661977",{"slug":3034,"name":3034,"fn":3035,"description":3036,"org":3037,"tags":3038,"stars":24,"repoUrl":25,"updatedAt":3045},"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},[3039,3040,3043,3044],{"name":2985,"slug":2986,"type":14},{"name":3041,"slug":3042,"type":14},"Portfolio Management","portfolio-management",{"name":3003,"slug":3004,"type":14},{"name":16,"slug":17,"type":14},"2026-07-17T06:04:22.328253",{"slug":3047,"name":3047,"fn":3048,"description":3049,"org":3050,"tags":3051,"stars":24,"repoUrl":25,"updatedAt":3058},"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},[3052,3053,3054,3057],{"name":3015,"slug":3016,"type":14},{"name":2985,"slug":2986,"type":14},{"name":3055,"slug":3056,"type":14},"Liquidity","liquidity",{"name":16,"slug":17,"type":14},"2026-07-17T06:08:09.315325",{"slug":3060,"name":3060,"fn":3061,"description":3062,"org":3063,"tags":3064,"stars":24,"repoUrl":25,"updatedAt":3069},"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},[3065,3066,3067,3068],{"name":22,"slug":23,"type":14},{"name":3015,"slug":3016,"type":14},{"name":3055,"slug":3056,"type":14},{"name":16,"slug":17,"type":14},"2026-07-17T06:08:13.704465",{"slug":1094,"name":1094,"fn":3071,"description":3072,"org":3073,"tags":3074,"stars":24,"repoUrl":25,"updatedAt":3079},"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},[3075,3076,3077,3078],{"name":3015,"slug":3016,"type":14},{"name":19,"slug":20,"type":14},{"name":3003,"slug":3004,"type":14},{"name":13,"slug":13,"type":14},"2026-07-17T06:04:29.756086",{"slug":4,"name":4,"fn":5,"description":6,"org":3081,"tags":3082,"stars":24,"repoUrl":25,"updatedAt":26},{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[3083,3084,3085,3086],{"name":22,"slug":23,"type":14},{"name":19,"slug":20,"type":14},{"name":16,"slug":17,"type":14},{"name":13,"slug":13,"type":14},{"slug":2964,"name":2964,"fn":3088,"description":3089,"org":3090,"tags":3091,"stars":24,"repoUrl":25,"updatedAt":3096},"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},[3092,3093,3094,3095],{"name":22,"slug":23,"type":14},{"name":3015,"slug":3016,"type":14},{"name":3003,"slug":3004,"type":14},{"name":16,"slug":17,"type":14},"2026-07-17T06:08:10.354222",{"slug":3098,"name":3098,"fn":3099,"description":3100,"org":3101,"tags":3102,"stars":24,"repoUrl":25,"updatedAt":3107},"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},[3103,3104,3105,3106],{"name":3015,"slug":3016,"type":14},{"name":3055,"slug":3056,"type":14},{"name":3003,"slug":3004,"type":14},{"name":16,"slug":17,"type":14},"2026-07-17T06:08:10.008152",{"slug":3109,"name":3109,"fn":3110,"description":3111,"org":3112,"tags":3113,"stars":24,"repoUrl":25,"updatedAt":3117},"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},[3114,3115,3116],{"name":2985,"slug":2986,"type":14},{"name":2988,"slug":2989,"type":14},{"name":16,"slug":17,"type":14},"2026-07-17T06:04:19.17669",19,{"items":3120,"total":3170},[3121,3128,3135,3142,3149,3156,3163],{"slug":2976,"name":2976,"fn":2977,"description":2978,"org":3122,"tags":3123,"stars":24,"repoUrl":25,"updatedAt":2991},{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[3124,3125,3126,3127],{"name":2982,"slug":2983,"type":14},{"name":2985,"slug":2986,"type":14},{"name":2988,"slug":2989,"type":14},{"name":16,"slug":17,"type":14},{"slug":2993,"name":2993,"fn":2994,"description":2995,"org":3129,"tags":3130,"stars":24,"repoUrl":25,"updatedAt":3006},{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[3131,3132,3133,3134],{"name":2999,"slug":3000,"type":14},{"name":2985,"slug":2986,"type":14},{"name":3003,"slug":3004,"type":14},{"name":16,"slug":17,"type":14},{"slug":3008,"name":3008,"fn":3009,"description":3010,"org":3136,"tags":3137,"stars":24,"repoUrl":25,"updatedAt":3019},{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[3138,3139,3140,3141],{"name":2999,"slug":3000,"type":14},{"name":3015,"slug":3016,"type":14},{"name":3003,"slug":3004,"type":14},{"name":16,"slug":17,"type":14},{"slug":3021,"name":3021,"fn":3022,"description":3023,"org":3143,"tags":3144,"stars":24,"repoUrl":25,"updatedAt":3032},{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[3145,3146,3147,3148],{"name":3027,"slug":3028,"type":14},{"name":2985,"slug":2986,"type":14},{"name":2988,"slug":2989,"type":14},{"name":16,"slug":17,"type":14},{"slug":3034,"name":3034,"fn":3035,"description":3036,"org":3150,"tags":3151,"stars":24,"repoUrl":25,"updatedAt":3045},{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[3152,3153,3154,3155],{"name":2985,"slug":2986,"type":14},{"name":3041,"slug":3042,"type":14},{"name":3003,"slug":3004,"type":14},{"name":16,"slug":17,"type":14},{"slug":3047,"name":3047,"fn":3048,"description":3049,"org":3157,"tags":3158,"stars":24,"repoUrl":25,"updatedAt":3058},{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[3159,3160,3161,3162],{"name":3015,"slug":3016,"type":14},{"name":2985,"slug":2986,"type":14},{"name":3055,"slug":3056,"type":14},{"name":16,"slug":17,"type":14},{"slug":3060,"name":3060,"fn":3061,"description":3062,"org":3164,"tags":3165,"stars":24,"repoUrl":25,"updatedAt":3069},{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[3166,3167,3168,3169],{"name":22,"slug":23,"type":14},{"name":3015,"slug":3016,"type":14},{"name":3055,"slug":3056,"type":14},{"name":16,"slug":17,"type":14},15]