ton-org/kit

ton-swap

Swap or trade tokens on the TON blockchain via DEX.

ソースを見る

使い方

  1. インストールコマンドをコピーし、自分の環境へ導入する前にソースを確認します。
  2. 必要なツール、認証情報、対応環境を原文で確認します。
  3. 入力と成果物を指定し、出力を資料と照合します。
npx skills add https://github.com/ton-org/kit --skill ton-swap

開始前の確認

  • 導入にはモデル契約、API枠、ファイルへのアクセス許可は含まれません。
  • スター数や導入数は活動の指標であり、独立した品質・安全性試験ではありません。
リポジトリの原文

見出し、例、コード、表、リンク、参照画像を含む原文を表示しています。

Swap TON Tokens

Swap tokens on TON via DEX aggregator. Two-step flow: get a quote, confirm with the user, then execute.

MCP Tools

ToolRequiredOptional
get_swap_quotefromToken, toToken, amountwalletSelector
emulate_transactionmessagesvalidUntil
send_raw_transactionmessageswalletSelector
get_known_jettons——

Workflow

  1. If the user mentions a token by name (e.g., "USDT", "jUSDC"), call get_known_jettons to resolve the jetton address
  2. Call get_swap_quote with fromToken, toToken, and amount
  • Use "TON" for native GRAM (ex. TON), or the jetton master contract address for tokens
  • Amount is human-readable (e.g., "1.5" = 1.5 GRAM (ex. TON))
  1. Call emulate_transaction with the quote's transaction.messages to dry-run the swap — verify the expected money flow (GRAM (ex. TON)/jetton balance changes) before sending
  2. Show the quote details and emulation results to the user and ask one short yes/no confirmation
  3. Call send_raw_transaction with the transaction params returned by the quote
  4. Poll get_transaction_status with the returned normalizedHash until status is completed or failed (see ton-balance skill). User can ask to skip polling.

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 get_transaction_status by default. User can specify whether to check status.
  • If no wallet is configured, use the ton-create-wallet skill first
同じリポジトリから

関連する Skills

すべての Skills
ton-org
コミュニティ

ton-balance

Check TON wallet balances, token holdings, and transaction history. Use when the user wants to check their balance, see how much GRAM (ex. TON) they have, list tokens, view jettons, check transaction history, look up a token, or verify a transaction status.

1時間の導入数
1
GitHub Stars
55
更新日
7月11日
ton-org
コミュニティ

ton-cli

Call TON MCP tools directly from the command line. Use when you want to query wallet info, check balances, send transactions, or run any TON wallet tool without starting an MCP server session. Works via npx @ton/mcp@alpha [--arg value ...].

1時間の導入数
1
GitHub Stars
55
更新日
7月11日
ton-org
コミュニティ

ton-create-wallet

Create and deploy a TON agentic wallet. Use when the user wants to create a wallet, set up an agent wallet, deploy an agentic wallet, onboard a new wallet, or when any wallet operation fails because no wallet is configured. This skill is a prerequisite before sending, swapping, or managing assets.

1時間の導入数
1
GitHub Stars
55
更新日
7月11日
ton-org
コミュニティ

ton-nfts

View and transfer NFTs on the TON blockchain. Use when the user wants to see their NFTs, list collectibles, check NFT details, send an NFT, or transfer an NFT to someone.

1時間の導入数
1
GitHub Stars
55
更新日
7月11日