emblem-token-swap

emblem-token-swap

透過 EmblemAI 在 6 條區塊鏈上執行代幣兌換。自動路徑最佳化及透過 ChangeNow 進行跨鏈橋接。當使用者想要兌換代幣、交換加密貨幣、轉換貨幣或跨鏈轉移資產時使用。

12星標
2分支
更新於 2026/5/15
SKILL.md
readonlyread-only
name
emblem-token-swap
description

Execute token swaps across 6 blockchains via EmblemAI. Automatic route optimization and cross-chain bridging via ChangeNow. Use when the user wants to swap tokens, exchange crypto, convert between currencies, or bridge assets cross-chain.

Emblem Token Swap

EmblemAI 驅動的引導式代幣兌換。在 Solana、Ethereum、Base、BSC、Polygon 和 Hedera 上自動路由進行代幣兌換。透過 ChangeNow 進行跨鏈橋接。

需求: npm install -g @emblemvault/agentwallet


此技能可執行的操作

報價工具 兌換工具 餘額工具 代幣搜尋
Solana splBuyIntent (報價模式) splBuyIntent (兌換模式) solanaBalances findSolanaSwapToken
Ethereum ethSwapQuote ethSwap ethGetBalances searchCryptoByName
Base baseSwapQuote baseSwap baseGetBalances searchEvmTokensBirdeye
BSC bscSwapQuote bscSwap bscGetBalances searchEvmTokensBirdeye
Polygon polygonSwapQuote polygonSwap polygonGetBalances searchEvmTokensBirdeye
Hedera hederaTokensSwapQuote hederaTokensSwap hederaGetBalances hederaFindTokens
跨鏈 getChangeNowSwapQuote swapUsingChangeNow getChangeNowSupportedCurrencies

備註

  • Solana 使用 splBuyIntent 同時處理報價與執行 — 它會依名稱/符號/合約地址查詢代幣,並支援彈性金額(美元、SOL 或代幣數量)
  • EVM 鏈(Ethereum、Base、BSC、Polygon)透過自動 DEX 聚合路由
  • 跨鏈橋接透過 ChangeNow 支援 500 多種貨幣
  • Bitcoin 有餘額支援(getBTCBalances),但沒有鏈上兌換工具 — 請使用 ChangeNow 進行 BTC 橋接

快速開始

npm install -g @emblemvault/agentwallet

# Solana 兌換(使用 splBuyIntent)
emblemai --agent --profile default -m "Use splBuyIntent to swap 5 SOL for USDC on Solana"

# 跨鏈橋接(使用 ChangeNow)
emblemai --agent --profile default -m "Use getChangeNowSwapQuote to get a quote for bridging 0.05 ETH from Ethereum to SOL on Solana"

觸發詞:

  • "Swap SOL to USDC"
  • "Exchange ETH for USDT"
  • "Convert my tokens"
  • "Bridge tokens to Base"

工作流程:安全代幣兌換

步驟 1:檢查餘額

確認您有足夠的來源代幣。

emblemai --agent --profile default -m "Use solanaBalances to show my Solana token balances"

步驟 2:取得報價

在執行前預覽兌換。

emblemai --agent --profile default -m "Use splBuyIntent to get a quote for swapping 5 SOL to USDC"

步驟 3:執行兌換

emblemai --agent --profile default -m "Use splBuyIntent to swap 5 SOL for USDC on Solana"

安全模式需要您確認後才會執行。

步驟 4:驗證

確認新的餘額。

emblemai --agent --profile default -m "Use solanaBalances to show my updated balances"

兌換模式

Solana 兌換

# 依代幣數量
emblemai --agent --profile default -m "Use splBuyIntent to swap 0.5 SOL for USDC"

# 依美元金額
emblemai --agent --profile default -m "Use splBuyIntent to swap $20 of SOL for JUP"

# 依代幣名稱
emblemai --agent --profile default -m "Use splBuyIntent to swap 100 USDC for BONK"

EVM 兌換

# Ethereum
emblemai --agent --profile default -m "Use ethSwapQuote to get a quote for swapping 0.01 ETH to USDC, then use ethSwap to execute"

# Base
emblemai --agent --profile default -m "Use baseSwapQuote to quote 0.005 ETH to USDC on Base"

# BSC
emblemai --agent --profile default -m "Use bscSwapQuote to quote 0.1 BNB to USDT on BSC"

# Polygon
emblemai --agent --profile default -m "Use polygonSwapQuote to quote 10 POL to USDC on Polygon"

Hedera 兌換

emblemai --agent --profile default -m "Use hederaTokensSwapQuote to get a quote for 100 HBAR to USDC, then use hederaTokensSwap to execute"

跨鏈橋接

emblemai --agent --profile default -m "Use getChangeNowSwapQuote to quote bridging 0.1 ETH to SOL"
emblemai --agent --profile default -m "Use getChangeNowSupportedCurrencies to show available bridge currencies"

溝通規則

兌換請求中務必包含以下資訊:

  1. 工具名稱 — 指定確切工具以確保可靠路由
  2. 金額 — 美元價值或代幣數量
  3. 來源代幣 — 您要從哪個代幣兌換
  4. 目標代幣 — 您要兌換成哪個代幣
不好
"swap sol usdc" "Use splBuyIntent to swap 5 SOL for USDC"
"buy eth" "Use ethSwap to swap 100 USDC to ETH on Ethereum"
"bridge" "Use getChangeNowSwapQuote to bridge 0.05 ETH to SOL"

安全性

所有兌換都需要使用者明確確認(安全模式)。代理會:

  1. 顯示兌換詳細資訊(金額、路由、預估輸出)
  2. 等待您批准後才執行
  3. 回報交易結果

絕不會繞過任何涉及資金轉移操作的確認步驟。


輔助腳本

bash scripts/swap-helper.sh

請參閱 scripts/swap-helper.sh 以獲得互動式兌換逐步說明。


連結