openclaw-elsa-x402
БесплатноЗапускает вложенные скриптыНе проверенDeFi tools for portfolio analysis, token search, and swap execution via Elsa API with x402 micropayments
от jiayaoqijia★ 81 звезда на GitHubОб этом скилле
Elsa x402 DeFi Tools
This skill provides access to the Elsa DeFi API for portfolio management, token analysis, and swap execution using x402 micropayments.
Standard Operating Procedure
Budget Controls
- Maximum $0.05 per API call (configurable)
- Maximum $2.00 per day (configurable)
- Maximum 30 calls per minute rate limit
- Daily budget resets at midnight in configured timezone (default: UTC)
Recommended Swap Flow (OpenClaw)
When executing swaps, follow this 4-step flow:
┌─────────────────────┐ ┌─────────────────────┐ ┌─────────────┐ ┌─────────────────────┐
│ 1. Get Quote │ ──▶ │ 2. Dry Run │ ──▶ │ 3. Confirm │ ──▶ │ 4. Execute Pipeline │
│ elsa_get_swap_quote │ │ elsa_execute_swap_ │ │ [User says │ │ elsa_pipeline_run_ │
│ │ │ dry_run │ │ "yes"] │ │ and_wait │
└─────────────────────┘ └─────────────────────┘ └─────────────┘ └─────────────────────┘
Step 1: Get Quote - Show user what they'll receive
npx tsx scripts/index.ts elsa_get_swap_quote '{
"from_chain": "base", "from_token": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
"from_amount": "10", "to_chain": "base", "to_token": "0x4200000000000000000000000000000000000006",
"wallet_address": "0x...", "slippage": 0.5
}'
Step 2: Dry Run - Create pipeline, get pipeline_id
npx tsx scripts/index.ts elsa_execute_swap_dry_run '{...same params...}'
# Returns: { "pipeline_id": "abc-123", "confirmation_token": "..." }
Step 3: User Confirmation - Present results and wait for explicit "yes"
Step 4: Execute Pipeline - Sign and broadcast transactions
ELSA_ENABLE_EXECUTION_TOOLS=true npx tsx scripts/index.ts elsa_pipeline_run_and_wait '{
"pipeline_id": "abc-123",
"timeout_seconds": 180,
"poll_interval_seconds": 3,
"mode": "local_signer"
}'
# Automatically: signs approve tx → submits → signs swap tx → submits → returns tx hashes
Required Environment Variables
# For x402 API payments
PAYMENT_PRIVATE_KEY=0x...
# For signing swap transactions (optional - falls back to PAYMENT_PRIVATE_KEY)
TRADE_PRIVATE_KEY=0x...
# Enable execution tools
ELSA_ENABLE_EXECUTION_TOOLS=true
Critical Rules
- NEVER execute swaps without showing the user the quote first
- NEVER call execution tools in a loop
- NEVER proceed if budget limits are exceeded
- ALWAYS check
elsa_budget_statusif unsure about remaining budget - ALWAYS use dry-run mode first for any swap operation
Tool Catalog
Read-Only Tools (Always Available)
elsa_search_token
Search for tokens across supported blockchains.
npx tsx scripts/index.ts elsa_search_token '{"query": "USDC", "limit": 5}'
Input:
query(string, required): Token name, symbol, or addresslimit(number, optional): Max results (default: 10)
elsa_get_token_price
Get current price for a token.
npx tsx scripts/index.ts elsa_get_token_price '{"token_address": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913", "chain": "base"}'
Input:
token_address(string, required): Token contract addresschain(string, optional): Chain name (default: "base")
elsa_get_balances
Get token balances for a wallet.
npx tsx scripts/index.ts elsa_get_balances '{"wallet_address": "0x..."}'
Input:
wallet_address(string, required): Wallet address to query
elsa_get_portfolio
Get comprehensive portfolio analysis.
npx tsx scripts/index.ts elsa_get_portfolio '{"wallet_address": "0x..."}'
Input:
wallet_address(string, required): Wallet address to analyze
elsa_analyze_wallet
Get wallet behavior and risk assessment.
npx tsx scripts/index.ts elsa_analyze_wallet '{"wallet_address": "0x..."}'
Input:
wallet_address(string, required): Wallet address to analyze
elsa_get_swap_quote
Get a swap quote with optimal routing.
npx tsx scripts/index.ts elsa_get_swap_quote '{
"from_chain": "base",
"from_token": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
"from_amount": "100",
"to_chain": "base",
"to_token": "0x4200000000000000000000000000000000000006",
"wallet_address": "0x...",
"slippage": 0.5
}'
Input:
from_chain(string, required): Source chainfrom_token(string, required): Source token addressfrom_amount(string, required): Amount to swapto_chain(string, required): Destination chainto_token(string, required): Destination token addresswallet_address(string, required): Wallet addressslippage(number, required): Slippage tolerance (0-50)
elsa_execute_swap_dry_run
Simulate a swap without execution. Returns a confirmation token for subsequent confirmed execution.
npx tsx scripts/index.ts elsa_execute_swap_dry_run '{
"from_chain": "base",
"from_token": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02
Установить openclaw-elsa-x402 в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл openclaw-elsa-x402?
DeFi tools for portfolio analysis, token search, and swap execution via Elsa API with x402 micropayments
Как установить скилл openclaw-elsa-x402?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл openclaw-elsa-x402 запускает скрипты?
Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.
Похожие скиллы
skill-creator
Create new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an…
от Anthropicdiscernment-nudge
After you give a substantive answer or draft that the user may act on — advice or recommendations, drafted artifacts such as goals, plans, pitches, proposals…
от Anthropicdata-consolidate
Joins the plant's scheduled exports and connector data into one working dataset — ERP items (NetSuite or Infor M3), sales orders, production work orders…
от Anthropicinspection-to-capa
Runs the quality chain end to end: writes the nonconformance against the requirement it violates, searches history at the moment of writing to say whether…
от Anthropic