gate-dex-wallet
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseGate DEX Wallet
Gate DEX 钱包
Comprehensive Wallet Skill — Unified entry point for authentication, assets, transfers, DApp interactions, and CLI command-line. 5 major modules through sub-function routing distribution.
Trigger Scenarios: Use this Skill when users mention "login", "check balance", "transfer", "DApp", "sign", "wallet", "assets", "gate-wallet", "CLI", "command-line", "openapi-swap" and other wallet-related operations.
综合钱包Skill — 认证、资产、转账、DApp交互、CLI命令行的统一入口,通过子功能路由分发5大模块。
触发场景:当用户提及「登录」、「查余额」、「转账」、「DApp」、「签名」、「钱包」、「资产」、「gate-wallet」、「CLI」、「命令行」、「openapi-swap」等钱包相关操作时使用该Skill。
Core Modules
核心模块
| Module | Description | Typical Scenarios |
|---|---|---|
| 🔐 Authentication | Google OAuth login, Token management | "login", "logout", "token expired" |
| 💰 Assets | Balance queries, address retrieval, transaction history | "check balance", "total assets", "transaction history" |
| 💸 Transfer | Gas estimation, transaction building, signature broadcast | "transfer", "send tokens", "batch transfer" |
| 🎯 DApp | Wallet connection, message signing, contract interaction | "connect DApp", "sign message", "Approve" |
| 🖥️ CLI | gate-wallet CLI dual-channel (MCP custodial signing + OpenAPI hybrid mode) | "gate-wallet", "CLI", "command-line", "openapi-swap", "hybrid swap" |
| 模块 | 描述 | 典型场景 |
|---|---|---|
| 🔐 认证模块 | Google OAuth登录、Token管理 | 「登录」、「登出」、「token过期」 |
| 💰 资产模块 | 余额查询、地址获取、交易历史 | 「查余额」、「总资产」、「交易记录」 |
| 💸 转账模块 | Gas预估、交易构建、签名广播 | 「转账」、「发代币」、「批量转账」 |
| 🎯 DApp模块 | 钱包连接、消息签名、合约交互 | 「连接DApp」、「签名消息」、「Approve」 |
| 🖥️ CLI模块 | gate-wallet CLI双通道(MCP托管签名 + OpenAPI混合模式) | 「gate-wallet」、「CLI」、「命令行」、「openapi-swap」、「混合模式兑换」 |
Routing Rules
路由规则
Route to corresponding sub-function reference files based on user intent:
| User Intent | Example Keywords | Reference File |
|---|---|---|
| Authentication login | "login", "login", "auth", "token expired", "session" | references/auth.md |
| Asset queries | "check balance", "total assets", "wallet address", "transaction history", "Swap history" | Keep current SKILL.md main flow |
| Transfer operations | "transfer", "send", "transfer", "batch transfer", "Gas fee" | references/transfer.md |
| DApp interactions | "DApp", "sign message", "Approve", "connect wallet", "contract call" | references/dapp.md |
| CLI operations | "gate-wallet", "CLI", "command-line", "openapi-swap", "hybrid swap", "hybrid mode swap" | references/cli.md |
根据用户意图路由到对应的子功能参考文件:
| 用户意图 | 示例关键词 | 参考文件 |
|---|---|---|
| 认证登录 | 「登录」、「login」、「auth」、「token过期」、「session」 | references/auth.md |
| 资产查询 | 「查余额」、「总资产」、「钱包地址」、「交易记录」、「兑换历史」 | 保留当前SKILL.md主流程 |
| 转账操作 | 「转账」、「发送」、「transfer」、「批量转账」、「Gas费」 | references/transfer.md |
| DApp交互 | 「DApp」、「签名消息」、「Approve」、「连接钱包」、「合约调用」 | references/dapp.md |
| CLI操作 | 「gate-wallet」、「CLI」、「命令行」、「openapi-swap」、「混合模式兑换」、「混合模式Swap」 | references/cli.md |
MCP Server Connection Detection
MCP Server连接检测
Initial Session Detection
会话初始检测
Execute connection probe once before first MCP tool call in session to confirm Gate Wallet MCP Server availability. No need to repeat detection for subsequent operations.
text
CallMcpTool(server="gate-wallet", toolName="chain.config", arguments={chain: "eth"})| Result | Handling |
|---|---|
| Success | MCP Server available, continue executing user-requested specific operations |
| Failure | Show configuration guidance based on error type (see error handling below) |
会话中首次调用MCP工具前执行一次连接探测,确认Gate Wallet MCP Server可用性,后续操作无需重复检测。
text
CallMcpTool(server="gate-wallet", toolName="chain.config", arguments={chain: "eth"})| 结果 | 处理方式 |
|---|---|
| 成功 | MCP Server可用,继续执行用户请求的具体操作 |
| 失败 | 根据错误类型展示配置指引(见下方错误处理) |
Runtime Error Fallback
运行时错误兜底
For subsequent operations, if business tool calls fail (connection error, timeout, etc.), handle according to the following rules:
| Error Type | Keywords | Handling |
|---|---|---|
| MCP Server not configured | | Show MCP Server configuration guidance |
| Remote service unreachable | | Suggest checking server status and network connection |
| Authentication failure | | Suggest contacting administrator for API Key |
后续操作中如果业务工具调用失败(连接错误、超时等),按照以下规则处理:
| 错误类型 | 关键词 | 处理方式 |
|---|---|---|
| MCP Server未配置 | | 展示MCP Server配置指引 |
| 远程服务不可达 | | 建议检查服务状态和网络连接 |
| 认证失败 | | 建议联系管理员获取API Key |
Authentication State Management
认证状态管理
All operations requiring authentication (asset queries, transfers, DApp interactions) need valid :
mcp_token- If currently no → Guide to
mcp_tokento complete login then returnreferences/auth.md - If expired (MCP Server returns token expired error) → First try
mcp_tokensilent refresh, guide to re-login if failedauth.refresh_token
所有需要认证的操作(资产查询、转账、DApp交互)都需要有效的:
mcp_token- 如果当前无→ 引导到
mcp_token完成登录后再返回references/auth.md - 如果过期(MCP Server返回token过期错误) → 先尝试
mcp_token静默刷新,失败则引导重新登录auth.refresh_token
MCP Tool Call Specifications (Asset Query Module)
MCP工具调用规范(资产查询模块)
1. wallet.get_token_list
— Query Token Balances
wallet.get_token_list1. wallet.get_token_list
— 查询代币余额
wallet.get_token_listQuery token balance list for specified chain or all chains.
| Field | Description |
|---|---|
| Tool Name | |
| Parameters | |
| Return Value | Token array, each item contains |
Call example:
text
CallMcpTool(
server="gate-wallet",
toolName="wallet.get_token_list",
arguments={ chain: "ETH", mcp_token: "<mcp_token>" }
)查询指定链或所有链的代币余额列表。
| 字段 | 描述 |
|---|---|
| 工具名称 | |
| 参数 | |
| 返回值 | 代币数组,每一项包含 |
调用示例:
text
CallMcpTool(
server="gate-wallet",
toolName="wallet.get_token_list",
arguments={ chain: "ETH", mcp_token: "<mcp_token>" }
)2. wallet.get_total_asset
— Query Total Asset Value
wallet.get_total_asset2. wallet.get_total_asset
— 查询总资产价值
wallet.get_total_asset| Field | Description |
|---|---|
| Tool Name | |
| Parameters | |
| Return Value | |
| 字段 | 描述 |
|---|---|
| 工具名称 | |
| 参数 | |
| 返回值 | |
3. wallet.get_addresses
— Get Wallet Addresses
wallet.get_addresses3. wallet.get_addresses
— 获取钱包地址
wallet.get_addresses| Field | Description |
|---|---|
| Tool Name | |
| Parameters | |
| Return Value | Wallet address objects for each chain |
| 字段 | 描述 |
|---|---|
| 工具名称 | |
| 参数 | |
| 返回值 | 各链对应的钱包地址对象 |
4. chain.config
— Chain Configuration Info
chain.config4. chain.config
— 链配置信息
chain.config| Field | Description |
|---|---|
| Tool Name | |
| Parameters | |
| Return Value | Chain configuration info (RPC, block explorer, etc.) |
| 字段 | 描述 |
|---|---|
| 工具名称 | |
| 参数 | |
| 返回值 | 链配置信息(RPC、区块浏览器等) |
5. tx.list
— Wallet comprehensive (auth, assets, transfer, DApp) transaction list
tx.list5. tx.list
— 钱包全业务(认证、资产、转账、DApp)交易列表
tx.list| Field | Description |
|---|---|
| Tool Name | |
| Parameters | |
| Return Value | Transaction history array |
| 字段 | 描述 |
|---|---|
| 工具名称 | |
| 参数 | |
| 返回值 | 交易历史数组 |
6. tx.detail
— Transaction Details
tx.detail6. tx.detail
— 交易详情
tx.detail| Field | Description |
|---|---|
| Tool Name | |
| Parameters | |
| Return Value | Detailed transaction information |
| 字段 | 描述 |
|---|---|
| 工具名称 | |
| 参数 | |
| 返回值 | 交易详细信息 |
7. tx.history_list
— Swap History Records
tx.history_list7. tx.history_list
— 兑换历史记录
tx.history_list| Field | Description |
|---|---|
| Tool Name | |
| Parameters | |
| Return Value | Swap history array |
| 字段 | 描述 |
|---|---|
| 工具名称 | |
| 参数 | |
| 返回值 | 兑换历史数组 |
Operation Flows
操作流程
Flow A: Query Token Balances
流程A:查询代币余额
text
Step 0: MCP Server connection detection
↓ Success
Step 1: Authentication check
Confirm holding valid mcp_token and account_id
No token → Route to references/auth.md
↓
Step 2: Execute query
Call wallet.get_token_list({ chain?, network_keys?, mcp_token })
↓
Step 3: Format display
Group by chain, sort by value, filter zero balancestext
Step 0: MCP Server连接检测
↓ 成功
Step 1: 认证校验
确认持有有效的mcp_token和account_id
无token → 路由到references/auth.md
↓
Step 2: 执行查询
调用wallet.get_token_list({ chain?, network_keys?, mcp_token })
↓
Step 3: 格式化展示
按链分组、按价值排序、过滤零余额资产Flow B: Query Total Asset Value
流程B:查询总资产价值
text
Step 0-1: Same as Flow A
↓
Step 2: Execute query
Call wallet.get_total_asset({ account_id, mcp_token })
↓
Step 3: Format display
Total value + distribution by chaintext
Step 0-1: 和流程A一致
↓
Step 2: 执行查询
调用wallet.get_total_asset({ account_id, mcp_token })
↓
Step 3: 格式化展示
总价值 + 按链分布情况Flow C-G: Other Asset Query Flows
流程C-G:其他资产查询流程
Similar to above flows, detailed specifications see original SKILL.md content.
和上述流程类似,详细规范见原SKILL.md内容。
Skill Routing
Skill路由
Post-asset viewing follow-up operation guidance:
| User Intent | Target |
|---|---|
| View token prices, K-line charts | |
| View token security audits | |
| Transfer, send tokens | This Skill |
| Swap/Exchange tokens | |
| Interact with DApps | This Skill |
| Login/Auth expired | This Skill |
| Use CLI / command-line operations / hybrid mode Swap | This Skill |
查看资产后后续操作指引:
| 用户意图 | 目标路由 |
|---|---|
| 查看代币价格、K线图 | |
| 查看代币安全审计 | |
| 转账、发代币 | 当前Skill |
| 兑换/交易代币 | |
| 与DApp交互 | 当前Skill |
| 登录/认证过期 | 当前Skill |
| 使用CLI / 命令行操作 / 混合模式Swap | 当前Skill |
Cross-Skill Collaboration
跨Skill协作
This Skill serves as wallet data center, called by other Skills:
| Caller | Scenario | Used Tools |
|---|---|---|
| Pre-swap balance validation, token address resolution | |
| Get chain-specific wallet address | |
| Guide to view holdings after market data query | |
| CLI sub-module | CLI dual-channel operations (MCP custodial signing / OpenAPI hybrid Swap) | |
本Skill作为钱包数据中心,供其他Skill调用:
| 调用方 | 场景 | 使用工具 |
|---|---|---|
| 兑换前余额校验、代币地址解析 | |
| 获取对应链的钱包地址 | |
| 行情查询后引导查看持仓 | |
| CLI子模块 | CLI双通道操作(MCP托管签名 / OpenAPI混合Swap) | |
Supported Chains
支持的链
| Chain ID | Network Name | Type |
|---|---|---|
| Ethereum | EVM |
| BNB Smart Chain | EVM |
| Polygon | EVM |
| Arbitrum One | EVM |
| Optimism | EVM |
| Avalanche C-Chain | EVM |
| Base | EVM |
| Solana | Non-EVM |
| 链ID | 网络名称 | 类型 |
|---|---|---|
| Ethereum | EVM |
| BNB Smart Chain | EVM |
| Polygon | EVM |
| Arbitrum One | EVM |
| Optimism | EVM |
| Avalanche C-Chain | EVM |
| Base | EVM |
| Solana | 非EVM |
Security Rules
安全规则
- Authentication check: Check validity before all operations
mcp_token - Sensitive information: must not be displayed in plain text in conversations
mcp_token - Auto refresh: Prioritize silent refresh when token expires
- Guidance mechanism: Guide to when authentication fails
references/auth.md - Cross-Skill security: Provide secure balance validation and address retrieval for other Skills
- 认证校验:所有操作前先检查有效性
mcp_token - 敏感信息:禁止在会话中明文展示
mcp_token - 自动刷新:token过期时优先走静默刷新
- 引导机制:认证失败时引导到
references/auth.md - 跨Skill安全:为其他Skill提供安全的余额校验和地址获取能力