lifi
БесплатноБез исполняемых скриптовНе проверенIntegrate LI.FI for cross-chain swaps, bridging, payments, route discovery, and transfer status tracking across Solana, EVM, Bitcoin, and Sui. Use when…
от sendaifun★ 129 звёзд на GitHubОб этом скилле
LI.FI Cross-Chain Integration Guide
Use LI.FI when a Solana app, wallet, backend, or AI agent needs cross-chain token transfers, bridge aggregation, same-chain swaps, payment flows, or transfer status tracking. LI.FI exposes the same routing engine through REST API, SDK, MCP server, CLI, and Widget surfaces.
Overview
LI.FI is a multi-chain liquidity aggregation platform for swaps and bridging. For agent and backend integrations, the REST API is the lowest-dependency default. For frontend apps, prefer the SDK because it handles wallets, signing, execution tracking, and ecosystem-specific transaction handling. For MCP-compatible AI hosts, prefer the LI.FI MCP server for typed tool discovery.
Core capabilities:
- Quotes: Get a ready-to-sign transaction for the best route.
- Routes: Compare multiple route options and execute step-by-step.
- Status tracking: Track source and destination chain transfer progress.
- Discovery: Query supported chains, tokens, bridges, and exchanges at runtime.
- Solana support: Request Solana-specific chain/token data via
chainTypes=SVMand useSOLas the Solana chain key in API examples.
Product Surface Selection
Choose the smallest surface that matches the task:
- REST API: Backend services, scripts, and general AI agents. Simple HTTP calls, no runtime dependency.
- SDK (
@lifi/sdk): Frontend or full execution flows. Handles wallet connectors, signing, route execution, and update hooks. - MCP Server: MCP-compatible AI hosts such as Claude, Cursor, or Windsurf. Use when typed tool discovery is available.
- CLI: Token-efficient agent workflows where compact human-readable output is preferable to raw JSON.
- Widget: Ready-made UI when the user wants embedded swap/bridge UX rather than custom integration.
Do not force every integration through the SDK. For quote lookup, route comparison, or status checks, the API is often simpler and easier to audit.
Base URLs and Authentication
Production API: https://li.quest/v1
Staging API: https://staging.li.quest/v1
Docs: https://docs.li.fi
OpenAPI: https://docs.li.fi/openapi.yaml
LLM overview: https://docs.li.fi/llms.txt
LI.FI APIs can be used without an API key. Use an API key for higher rate limits or authenticated partner usage. Register an integration in the LI.FI Partner Portal to get an API key: https://portal.li.fi/
For direct REST calls, pass the key in the x-lifi-api-key header:
curl 'https://li.quest/v1/chains?chainTypes=EVM,SVM' \
--header 'accept: application/json' \
--header 'x-lifi-api-key: YOUR_API_KEY_IF_AVAILABLE'
Test a key server-side before using it in production:
curl 'https://li.quest/v1/keys/test' \
--header 'x-lifi-api-key: YOUR_API_KEY'
Never expose x-lifi-api-key in browser code, public repositories, or direct Widget configuration. If using the SDK from a backend or trusted runtime, pass the key through createConfig({ apiKey: '...' }); if using the Widget in a frontend, do not pass an API key.
Integration Workflow
Clarify the transfer intent
- Source chain, destination chain, source token, destination token.
- Amount in the token's smallest unit.
- Sender address and, when different, recipient address.
- Whether the user wants a single best route or route comparison.
Discover support instead of hardcoding
- Use
/chainsto verify chains. - Use
/tokensor/tokento verify token addresses and decimals. - Use
/toolsto list current bridges and exchanges. - Do not assume every token, bridge, or chain pair is available.
- Use
Choose quote vs routes
- Use
GET /quotefor a simple transfer where the best executable route is enough. - Use
POST /advanced/routeswhen comparing alternatives or when the user asks for route choice, cost, speed, tool allowlists, or multiple steps. - Use
POST /advanced/stepTransactionto populate transaction data for individual route steps when executing advanced routes.
- Use
Show the user what they will sign
- Summarize from-chain, to-chain, from-token, to-token, amount, estimated output, tool/bridge, fees, recipient, and slippage.
- Never ask a user to sign opaque transaction data without a human-readable summary.
Execute through the appropriate wallet path
- If using
GET /quote, the response already includestransactionRequest; after allowance/permit handling, submit that transaction with the source-chain wallet. - If using
POST /advanced/routes, first choose a route, then populate each step withPOST /advanced/stepTransactionbefore execution. - EVM transaction requests usually include fields such as
to,data,value, and gas fields. - Solana-originating transfers return Solana transaction data as base64 in
transactionRequest.data; deserialize, sign, and send through the user's Solana wallet or SDK path. - Prefer SDK
executeRoutefor productio
- If using
Установить lifi в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл lifi?
Integrate LI.FI for cross-chain swaps, bridging, payments, route discovery, and transfer status tracking across Solana, EVM, Bitcoin, and Sui. Use when building Solana applications or AI agents that need quotes, routes, executable transactions, supported chains/tokens/tools, or cross-chain transfer monitoring.
Как установить скилл lifi?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл lifi запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
theme-factory
Toolkit for styling artifacts with a theme. These artifacts can be slides, docs, reportings, HTML landing pages, etc. There are 10 pre-set themes with…
от Anthropicaccess
Manage Discord channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropicconfigure
Set up the Discord channel — save the bot token and review access policy. Use when the user pastes a Discord bot token, asks to configure Discord, asks "how…
от Anthropicaccess
Manage iMessage channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropic