ton-swap
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseSwap TON Tokens
兑换TON代币
Swap tokens on TON via DEX aggregator. Two-step flow: get a quote, confirm with the user, then execute.
通过DEX聚合器在TON上兑换代币。分为两步流程:获取报价、与用户确认后执行。
MCP Tools
MCP工具
| Tool | Required | Optional |
|---|---|---|
| | |
| | |
| | |
| — | — |
| 工具 | 必填项 | 可选项 |
|---|---|---|
| | |
| | |
| | |
| — | — |
Workflow
工作流程
- If the user mentions a token by name (e.g., "USDT", "jUSDC"), call to resolve the jetton address
get_known_jettons - Call with
get_swap_quote,fromToken, andtoTokenamount- Use for native TON, or the jetton master contract address for tokens
"TON" - Amount is human-readable (e.g., = 1.5 TON)
"1.5"
- Use
- Call with the quote's
emulate_transactionto dry-run the swap — verify the expected money flow (TON/jetton balance changes) before sendingtransaction.messages - Show the quote details and emulation results to the user and ask one short yes/no confirmation
- Call with the transaction params returned by the quote
send_raw_transaction - Poll with the returned
get_transaction_statusuntil status isnormalizedHashorcompleted(seefailedskill). User can ask to skip polling.ton-balance
- 如果用户提及代币名称(例如“USDT”、“jUSDC”),调用解析jetton地址
get_known_jettons - 使用、
fromToken和toToken调用amountget_swap_quote- 原生TON使用,代币则使用jetton主合约地址
"TON" - 金额为人类可读格式(例如= 1.5 TON)
"1.5"
- 原生TON使用
- 使用报价中的调用
transaction.messages来试运行兑换——在发送前验证预期的资金流向(TON/jetton余额变化)emulate_transaction - 向用户展示报价详情和模拟结果,并请求简短的是/否确认
- 使用报价返回的交易参数调用
send_raw_transaction - 使用返回的轮询
normalizedHash,直到状态变为get_transaction_status或completed(参见failed技能)。用户可以要求跳过轮询。ton-balance
Notes
注意事项
- Always confirm the swap with the user before executing; prefer the host client's structured confirmation UI when available, otherwise accept natural-language yes/no and do not require a fixed confirmation phrase
- The quote returns transaction messages ready for
send_raw_transaction - After execution, poll by default. User can specify whether to check status.
get_transaction_status - If no wallet is configured, use the skill first
ton-create-wallet
- 执行兑换前必须与用户确认;如果有宿主客户端的结构化确认UI则优先使用,否则接受自然语言的是/否回复,不要求固定的确认语句
- 报价会返回可直接用于的交易消息
send_raw_transaction - 执行完成后默认轮询。用户可以指定是否检查状态。
get_transaction_status - 如果未配置钱包,请先使用技能
ton-create-wallet