$npx -y skills add gate/gate-skills --skill gate-dex-walletManages Gate DEX wallet accounts, identity, assets, and connectivity. Use when the user asks to 'log in with Google' or Gate, 'check my balance', 'show my wallet address', 'view tx history', 'send USDT', 'withdraw to Gate', 'pay an x402 URL', 'connect wallet', or 'use gate-wallet
| 1 | # Gate DEX Wallet |
| 2 | |
| 3 | > **Pure Routing Layer** — This SKILL.md is a lightweight router. All sub-module details live in `references/`. |
| 4 | |
| 5 | ## General Rules |
| 6 | |
| 7 | ⚠️ STOP — You MUST read and strictly follow the shared runtime rules before proceeding. |
| 8 | Do NOT select or call any tool until all rules are read. These rules have the highest priority. |
| 9 | → Read [gate-runtime-rules.md](https://github.com/gate/gate-skills/blob/master/skills/gate-runtime-rules.md) |
| 10 | - **Only call MCP tools explicitly listed in this skill.** Tools not documented here must NOT be called, even if they |
| 11 | exist in the MCP server. |
| 12 | |
| 13 | ## Signing gate — Gate Verify MCP (mandatory) |
| 14 | |
| 15 | Before **any** MCP call to `dex_wallet_sign_transaction`, `dex_wallet_sign_message`, or **`dex_tx_x402_fetch`** (signing tools only — **`dex_tx_x402_checkin_preview`** is not a signing call and does **not** require prior `tx_checkin`): |
| 16 | |
| 17 | 1. User must pass the existing confirmation gates (preview / message text / payment intent) for that operation. |
| 18 | 2. Agent **MUST** call the **Gate Verify** HTTP MCP server (see **Gate Verify MCP** under [MCP Server Connection Detection](#mcp-server-connection-detection)) tool **`/v1/tx/checkin`** or **`tx_checkin`** per `references/tx-checkin.md` and treat success as a **hard prerequisite**. **Do not** run the legacy **`tx-checkin`** shell binary or require the user to execute local check-in commands. Discover the verify server by scanning configured MCP servers until **`tools/list`** includes the check-in tool. **Auth:** pass **`authorization`** in the check-in tool **`arguments`** with the **same `mcp_token`** as wallet MCP calls — **not** by copying the wallet server’s HTTP **`headers`** onto the Verify MCP entry — see `references/tx-checkin.md`. |
| 19 | 3. After **`dex_tx_transfer_preview`**, the check-in **`message`** argument **must** be the preview field **`txBundle`** string **only** — **do not** assemble txbundle JSON from `unsigned_tx_hex` or other fields (see `references/tx-checkin.md`). |
| 20 | 4. **x402 (`dex_tx_x402_fetch`)**: **Do not** call `dex_tx_x402_fetch` first to probe 402. For **EVM exact / EIP-3009** (e.g. CoinGecko Pro x402 on Base), **first** call wallet MCP **`dex_tx_x402_checkin_preview`** — it returns the **`tx_checkin`** payload (including the correct 64-hex **`message`**) and **`x402_payment_required_b64`** so the agent never hand-builds the EIP-3009 digest. **Then** complete Gate Verify **`/v1/tx/checkin`** / **`tx_checkin`** using **`authorization`** (same **`mcp_token`**) together with the **`tx_checkin`** fields returned by preview. **Then** call **`dex_tx_x402_fetch`** with the same `url` / `method` / `body` / `headers` as preview, **`checkin_token`** from Verify, and the **same** **`x402_payment_required_b64`** from the preview result. For **POST JSON**, include **`Content-Type: application/json`** in the `headers` JSON on **both** preview and fetch (avoids common **415**). Full ordering and Solana / upto exceptions: `references/x402.md`, `references/tx-checkin.md`. |
| 21 | 5. Other single-step MCP tools that sign internally: same **`/v1/tx/checkin`** call **immediately before** the wallet MCP tool when the gateway requires it; follow backend docs for `checkin_token` / intent payload. |
| 22 | |
| 23 | ## Applicable Scenarios |
| 24 | |
| 25 | Use this skill when the user wants to **manage their on-chain wallet account, identity, or assets**: |
| 26 | |
| 27 | - Authenticate or manage sessions (login via Google or Gate OAuth, logout) |
| 28 | - Query token balances, total portfolio value, or wallet addresses |
| 29 | - View transaction history or past swap records |
| 30 | - Transfer or send tokens to an address (single or batch); **mandatory Gate Verify MCP check-in** (`/v1/tx/checkin`) before any signing (`references/tx-checkin.md`) |
| 31 | - Withdraw or cash out **on-chain** to their Gate Exchange account (deposit address resolved for their UID; not CEX-internal balance moves from this skill) |
| 32 | - Pay for HTTP 402 resources via x402 protocol (EVM exact/upto, Solana exact/upto); **`dex_tx_x402_checkin_preview`** (EVM EIP-3009) then **Gate Verify MCP check-in** then **`dex_tx_x402_fetch`** (`references/x402.md`, `references/tx-checkin.md`) |
| 33 | - Interact with DApps (connect wallet, sign messages, approve tokens, call contracts) |
| 34 | - Use the gate-wallet CLI tool for any of the above |
| 35 | - Detect or configure MCP Server connectivity |
| 36 | |
| 37 | --- |
| 38 | |
| 39 | ## Capability Boundaries |
| 40 | |
| 41 | | Supported | Not Supported (route elsewhere) | |
| 42 | |-----------|---------------------------------| |
| 43 | | |