跳转到主要内容
通过 Composer 质押到支持的流性质押和再质押协议的复制粘贴配方。
所有配方都使用 GET /quote 端点。相同的 toToken 地址适用于 POST /advanced/routes 和 LI.FI SDK。完整集成指南请参见 API 集成SDK 集成

Lido wstETH

Lido 是最大的流性质押协议。Composer 支持将 ETH 包装为 wstETH(存款和取款)。

同链:ETH → Ethereum 上的 wstETH

curl -X GET 'https://li.quest/v1/quote?\
fromChain=1&\
toChain=1&\
fromToken=0x0000000000000000000000000000000000000000&\
toToken=0x7f39C581F595B53c5cb19bD0b3f8dA6c935E2Ca0&\
fromAddress=0xYOUR_WALLET_ADDRESS&\
toAddress=0xYOUR_WALLET_ADDRESS&\
fromAmount=100000000000000000'
参数说明
fromChain1Ethereum
toChain1Ethereum (同链)
fromToken0x0000000000000000000000000000000000000000ETH (原生代币)
toToken0x7f39C581F595B53c5cb19bD0b3f8dA6c935E2Ca0Ethereum 上的 wstETH
fromAmount1000000000000000000.1 ETH (18 位小数)

跨链:Arbitrum 上的 USDC → Ethereum 上的 wstETH

curl -X GET 'https://li.quest/v1/quote?\
fromChain=42161&\
toChain=1&\
fromToken=0xaf88d065e77c8cC2239327C5EDb3A432268e5831&\
toToken=0x7f39C581F595B53c5cb19bD0b3f8dA6c935E2Ca0&\
fromAddress=0xYOUR_WALLET_ADDRESS&\
toAddress=0xYOUR_WALLET_ADDRESS&\
fromAmount=1000000000'
LI.FI 的路由引擎确定最优路径,可能包括跨链、兑换和质押,全部来自单次 API 调用。确切的执行步骤在路由响应中可见。
跨链流程需要通过 GET /status 进行状态轮询。完整执行流程请参见 跨链 Composer 模式

EtherFi

EtherFi 是一个流动性再质押协议。Composer 支持存款和取款。

同链:ETH → Ethereum 上的 EtherFi

curl -X GET 'https://li.quest/v1/quote?\
fromChain=1&\
toChain=1&\
fromToken=0x0000000000000000000000000000000000000000&\
toToken=ETHERFI_TOKEN_ADDRESS&\
fromAddress=0xYOUR_WALLET_ADDRESS&\
toAddress=0xYOUR_WALLET_ADDRESS&\
fromAmount=100000000000000000'

Kinetiq

Kinetiq 是一个质押协议。Composer 支持存款操作。

同链:存入 Kinetiq

curl -X GET 'https://li.quest/v1/quote?\
fromChain=CHAIN_ID&\
toChain=CHAIN_ID&\
fromToken=SOURCE_TOKEN_ADDRESS&\
toToken=KINETIQ_TOKEN_ADDRESS&\
fromAddress=0xYOUR_WALLET_ADDRESS&\
toAddress=0xYOUR_WALLET_ADDRESS&\
fromAmount=AMOUNT_IN_SMALLEST_UNIT'

Kinetiq Earn (vkHYPE)

Kinetiq Earn 是一个收益协议。Composer 支持存款操作。

同链:存入 Kinetiq Earn

curl -X GET 'https://li.quest/v1/quote?\
fromChain=CHAIN_ID&\
toChain=CHAIN_ID&\
fromToken=SOURCE_TOKEN_ADDRESS&\
toToken=VKHYPE_TOKEN_ADDRESS&\
fromAddress=0xYOUR_WALLET_ADDRESS&\
toAddress=0xYOUR_WALLET_ADDRESS&\
fromAmount=AMOUNT_IN_SMALLEST_UNIT'

通用模式

所有质押配方都遵循相同的模式:
GET /quote
  fromChain  = 源链 ID
  toChain    = 目标链 ID(相同或不同)
  fromToken  = 您起始的代币
  toToken    = 质押/LST 代币地址(这会触发 Composer)
  fromAmount = 最小单位的金额
  fromAddress = 您的钱包
  toAddress   = 您的钱包(接收质押代币)
唯一的 Composer 特定细节toToken 必须是支持的质押协议的代币地址。

下一步