Emblem Token Swap

作者 emblemcompany9a68a35c4d61MIT12 個星標收錄於 2026年10月8日更新於 2026年10月8日儲存庫4 個月前更新

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.

包含腳本Business & Finance
AI 產生的概覽

透過 EmblemAI 代理錢包 CLI 在六條區塊鏈上進行代幣兌換與跨鏈橋接的引導式技能。

功能
此技能引導代理在 Solana、Ethereum、Base、BSC、Polygon 與 Hedera 上取得報價並執行加密貨幣代幣兌換,同時透過 ChangeNow 進行跨鏈橋接。它記載了各鏈的報價、兌換、餘額查詢與代幣搜尋工具,並規定四步工作流程:查詢餘額、取得報價、執行兌換、核對新餘額。它另附一個互動式演練指令碼 scripts/swap-helper.sh,並要求任何轉移資產的操作都必須取得使用者明確確認。
適用情境
當使用者想要兌換或交換代幣、在加密貨幣之間轉換,或跨鏈橋接資產時使用。適用於例如將 SOL 兌換為 USDC、在 Base 上取得 ETH 兌 USDC 的報價,或將 ETH 橋接為 SOL 等請求。
執行需求
需要 Node.js 18.0.0 或更新版本、透過 npm 全域安裝的 @emblemvault/agentwallet CLI,以及網際網路存取。它附帶一個可執行輔助指令碼(scripts/swap-helper.sh),並適用於遵循 Agent Skills 規範的代理。

Emblem Token Swap

Guided token swapping powered by EmblemAI. Swap tokens on Solana, Ethereum, Base, BSC, Polygon, and Hedera with automatic routing. Cross-chain bridging via ChangeNow.

Requires: npm install -g @emblemvault/agentwallet


What This Skill Can Do

ChainQuote ToolSwap ToolBalance ToolToken Search
SolanasplBuyIntent (quote mode)splBuyIntent (swap mode)solanaBalancesfindSolanaSwapToken
EthereumethSwapQuoteethSwapethGetBalancessearchCryptoByName
BasebaseSwapQuotebaseSwapbaseGetBalancessearchEvmTokensBirdeye
BSCbscSwapQuotebscSwapbscGetBalancessearchEvmTokensBirdeye
PolygonpolygonSwapQuotepolygonSwappolygonGetBalancessearchEvmTokensBirdeye
HederahederaTokensSwapQuotehederaTokensSwaphederaGetBalanceshederaFindTokens
Cross-chaingetChangeNowSwapQuoteswapUsingChangeNow—getChangeNowSupportedCurrencies

Notes

  • Solana uses splBuyIntent for both quotes and execution — it handles token lookup by name/symbol/CA and flexible amounts ($USD, SOL, or token quantity)
  • EVM chains (Ethereum, Base, BSC, Polygon) route through automatic DEX aggregation
  • Cross-chain bridges via ChangeNow support 500+ currencies
  • Bitcoin has balance support (getBTCBalances) but no on-chain swap tools — use ChangeNow for BTC bridges

Quick Start

bash
npm install -g @emblemvault/agentwallet
# Solana swap (uses splBuyIntent)emblemai --agent --profile default -m "Use splBuyIntent to swap 5 SOL for USDC on Solana"
# Cross-chain bridge (uses ChangeNow)emblemai --agent --profile default -m "Use getChangeNowSwapQuote to get a quote for bridging 0.05 ETH from Ethereum to SOL on Solana"

Trigger phrases:

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

Workflow: Safe Token Swap

Step 1: Check Balance

Confirm you have enough of the source token.

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

Step 2: Get a Quote

Preview the swap before executing.

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

Step 3: Execute the Swap

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

Safe mode requires your confirmation before executing.

Step 4: Verify

Confirm the new balance.

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

Swap Patterns

Solana Swaps

bash
# By token amountemblemai --agent --profile default -m "Use splBuyIntent to swap 0.5 SOL for USDC"
# By dollar amountemblemai --agent --profile default -m "Use splBuyIntent to swap $20 of SOL for JUP"
# By token nameemblemai --agent --profile default -m "Use splBuyIntent to swap 100 USDC for BONK"

EVM Swaps

bash
# Ethereumemblemai --agent --profile default -m "Use ethSwapQuote to get a quote for swapping 0.01 ETH to USDC, then use ethSwap to execute"
# Baseemblemai --agent --profile default -m "Use baseSwapQuote to quote 0.005 ETH to USDC on Base"
# BSCemblemai --agent --profile default -m "Use bscSwapQuote to quote 0.1 BNB to USDT on BSC"
# Polygonemblemai --agent --profile default -m "Use polygonSwapQuote to quote 10 POL to USDC on Polygon"

Hedera Swaps

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

Cross-Chain Bridge

bash
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"

Communication Rules

Always include these in swap requests:

  1. Tool name — specify the exact tool for reliable routing
  2. Amount — dollar value or token quantity
  3. Source token — what you're swapping from
  4. Target token — what you're swapping to
BadGood
"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"

Safety

All swaps require explicit user confirmation (safe mode). The agent will:

  1. Show you the swap details (amount, route, estimated output)
  2. Wait for your approval before executing
  3. Report the transaction result

Never bypasses confirmation for any value-moving operation.


Helper Script

bash
bash scripts/swap-helper.sh

See scripts/swap-helper.sh [blocked] for an interactive swap walkthrough.


Links

來源與署名

來源:emblemcompany/agent-skills位於skills/emblem-token-swap提交9a68a35

授權條款: MIT

內容歸原作者所有。SourceWeft 從公開儲存庫中收錄這些內容。

檢舉或申請下架