gate-dex-wallet

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Gate 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

核心模块

ModuleDescriptionTypical Scenarios
🔐 AuthenticationGoogle OAuth login, Token management"login", "logout", "token expired"
💰 AssetsBalance queries, address retrieval, transaction history"check balance", "total assets", "transaction history"
💸 TransferGas estimation, transaction building, signature broadcast"transfer", "send tokens", "batch transfer"
🎯 DAppWallet connection, message signing, contract interaction"connect DApp", "sign message", "Approve"
🖥️ CLIgate-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 IntentExample KeywordsReference 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"})
ResultHandling
SuccessMCP Server available, continue executing user-requested specific operations
FailureShow 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 TypeKeywordsHandling
MCP Server not configured
server not found
,
unknown server
Show MCP Server configuration guidance
Remote service unreachable
connection refused
,
timeout
,
DNS error
Suggest checking server status and network connection
Authentication failure
401
,
unauthorized
,
x-api-key
Suggest contacting administrator for API Key

后续操作中如果业务工具调用失败(连接错误、超时等),按照以下规则处理:
错误类型关键词处理方式
MCP Server未配置
server not found
,
unknown server
展示MCP Server配置指引
远程服务不可达
connection refused
,
timeout
,
DNS error
建议检查服务状态和网络连接
认证失败
401
,
unauthorized
,
x-api-key
建议联系管理员获取API Key

Authentication State Management

认证状态管理

All operations requiring authentication (asset queries, transfers, DApp interactions) need valid
mcp_token
:
  • If currently no
    mcp_token
    → Guide to
    references/auth.md
    to complete login then return
  • If
    mcp_token
    expired (MCP Server returns token expired error) → First try
    auth.refresh_token
    silent refresh, guide to re-login if failed

所有需要认证的操作(资产查询、转账、DApp交互)都需要有效的
mcp_token
  • 如果当前无
    mcp_token
    → 引导到
    references/auth.md
    完成登录后再返回
  • 如果
    mcp_token
    过期(MCP Server返回token过期错误) → 先尝试
    auth.refresh_token
    静默刷新,失败则引导重新登录

MCP Tool Call Specifications (Asset Query Module)

MCP工具调用规范(资产查询模块)

1.
wallet.get_token_list
— Query Token Balances

1.
wallet.get_token_list
— 查询代币余额

Query token balance list for specified chain or all chains.
FieldDescription
Tool Name
wallet.get_token_list
Parameters
{ chain?: string, network_keys?: string, account_id?: string, mcp_token: string, page?: number, page_size?: number }
Return ValueToken array, each item contains
symbol
,
balance
,
price
,
value
,
chain
,
contract_address
, etc.
Call example:
text
CallMcpTool(
  server="gate-wallet",
  toolName="wallet.get_token_list",
  arguments={ chain: "ETH", mcp_token: "<mcp_token>" }
)
查询指定链或所有链的代币余额列表。
字段描述
工具名称
wallet.get_token_list
参数
{ chain?: string, network_keys?: string, account_id?: string, mcp_token: string, page?: number, page_size?: number }
返回值代币数组,每一项包含
symbol
balance
price
value
chain
contract_address
等字段
调用示例:
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

2.
wallet.get_total_asset
— 查询总资产价值

FieldDescription
Tool Name
wallet.get_total_asset
Parameters
{ account_id: string, mcp_token: string }
Return Value
{ total_value_usd: number, chains: Array<{chain: string, value_usd: number}> }
字段描述
工具名称
wallet.get_total_asset
参数
{ account_id: string, mcp_token: string }
返回值
{ total_value_usd: number, chains: Array<{chain: string, value_usd: number}> }

3.
wallet.get_addresses
— Get Wallet Addresses

3.
wallet.get_addresses
— 获取钱包地址

FieldDescription
Tool Name
wallet.get_addresses
Parameters
{ account_id: string, mcp_token: string }
Return ValueWallet address objects for each chain
字段描述
工具名称
wallet.get_addresses
参数
{ account_id: string, mcp_token: string }
返回值各链对应的钱包地址对象

4.
chain.config
— Chain Configuration Info

4.
chain.config
— 链配置信息

FieldDescription
Tool Name
chain.config
Parameters
{ chain: string, mcp_token: string }
Return ValueChain configuration info (RPC, block explorer, etc.)
字段描述
工具名称
chain.config
参数
{ chain: string, mcp_token: string }
返回值链配置信息(RPC、区块浏览器等)

5.
tx.list
— Wallet comprehensive (auth, assets, transfer, DApp) transaction list

5.
tx.list
— 钱包全业务(认证、资产、转账、DApp)交易列表

FieldDescription
Tool Name
tx.list
Parameters
{ account_id: string, chain?: string, page?: number, limit?: number, mcp_token: string }
Return ValueTransaction history array
字段描述
工具名称
tx.list
参数
{ account_id: string, chain?: string, page?: number, limit?: number, mcp_token: string }
返回值交易历史数组

6.
tx.detail
— Transaction Details

6.
tx.detail
— 交易详情

FieldDescription
Tool Name
tx.detail
Parameters
{ hash_id: string, chain: string, mcp_token: string }
Return ValueDetailed transaction information
字段描述
工具名称
tx.detail
参数
{ hash_id: string, chain: string, mcp_token: string }
返回值交易详细信息

7.
tx.history_list
— Swap History Records

7.
tx.history_list
— 兑换历史记录

FieldDescription
Tool Name
tx.history_list
Parameters
{ account_id: string, chain?: string, page?: number, limit?: number, mcp_token: string }
Return ValueSwap history array

字段描述
工具名称
tx.history_list
参数
{ account_id: string, chain?: string, page?: number, limit?: number, mcp_token: string }
返回值兑换历史数组

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 balances
text
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 chain
text
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 IntentTarget
View token prices, K-line charts
gate-dex-market
View token security audits
gate-dex-market
Transfer, send tokensThis Skill
references/transfer.md
Swap/Exchange tokens
gate-dex-trade
Interact with DAppsThis Skill
references/dapp.md
Login/Auth expiredThis Skill
references/auth.md
Use CLI / command-line operations / hybrid mode SwapThis Skill
references/cli.md

查看资产后后续操作指引:
用户意图目标路由
查看代币价格、K线图
gate-dex-market
查看代币安全审计
gate-dex-market
转账、发代币当前Skill
references/transfer.md
兑换/交易代币
gate-dex-trade
与DApp交互当前Skill
references/dapp.md
登录/认证过期当前Skill
references/auth.md
使用CLI / 命令行操作 / 混合模式Swap当前Skill
references/cli.md

Cross-Skill Collaboration

跨Skill协作

This Skill serves as wallet data center, called by other Skills:
CallerScenarioUsed Tools
gate-dex-trade
Pre-swap balance validation, token address resolution
wallet.get_token_list
gate-dex-trade
Get chain-specific wallet address
wallet.get_addresses
gate-dex-market
Guide to view holdings after market data query
wallet.get_token_list
CLI sub-moduleCLI dual-channel operations (MCP custodial signing / OpenAPI hybrid Swap)
references/cli.md

本Skill作为钱包数据中心,供其他Skill调用:
调用方场景使用工具
gate-dex-trade
兑换前余额校验、代币地址解析
wallet.get_token_list
gate-dex-trade
获取对应链的钱包地址
wallet.get_addresses
gate-dex-market
行情查询后引导查看持仓
wallet.get_token_list
CLI子模块CLI双通道操作(MCP托管签名 / OpenAPI混合Swap)
references/cli.md

Supported Chains

支持的链

Chain IDNetwork NameType
eth
EthereumEVM
bsc
BNB Smart ChainEVM
polygon
PolygonEVM
arbitrum
Arbitrum OneEVM
optimism
OptimismEVM
avax
Avalanche C-ChainEVM
base
BaseEVM
sol
SolanaNon-EVM

链ID网络名称类型
eth
EthereumEVM
bsc
BNB Smart ChainEVM
polygon
PolygonEVM
arbitrum
Arbitrum OneEVM
optimism
OptimismEVM
avax
Avalanche C-ChainEVM
base
BaseEVM
sol
Solana非EVM

Security Rules

安全规则

  1. Authentication check: Check
    mcp_token
    validity before all operations
  2. Sensitive information:
    mcp_token
    must not be displayed in plain text in conversations
  3. Auto refresh: Prioritize silent refresh when token expires
  4. Guidance mechanism: Guide to
    references/auth.md
    when authentication fails
  5. Cross-Skill security: Provide secure balance validation and address retrieval for other Skills
  1. 认证校验:所有操作前先检查
    mcp_token
    有效性
  2. 敏感信息
    mcp_token
    禁止在会话中明文展示
  3. 自动刷新:token过期时优先走静默刷新
  4. 引导机制:认证失败时引导到
    references/auth.md
  5. 跨Skill安全:为其他Skill提供安全的余额校验和地址获取能力