> ## Documentation Index
> Fetch the complete documentation index at: https://docs.li.fi/llms.txt
> Use this file to discover all available pages before exploring further.

# Overview

> Canonical Composer Flows you can copy, plus a pointer to the SDK examples for everything else.

这些 recipe 是常见 Composer flow 的一个样本，取自 [`composer-sdk-examples`](https://github.com/lifinance/composer-sdk-examples/tree/main/examples) 仓库中经过测试的示例。每个页面都展示了完整的 SDK 代码以及最终生成的 Flow 结构。

<CardGroup cols={2}>
  <Card title="Dust Sweep" href="/composer/composer-api/recipes/dust-sweep">
    有意保留一部分输入不被使用；`sweepTo` 会将这些残余（dust）回收给发送方。这是钱包清理模式。
  </Card>

  <Card title="Swap and Deposit" href="/composer/composer-api/recipes/swap-and-zap">
    将输入代币交换为某个 vault 资产，然后将结果 zap 存入该 vault。这是标准的链式存入结构；为 LI.FI Earn 提供支撑。
  </Card>

  <Card title="Split Deposits" href="/composer/composer-api/recipes/split-and-zap">
    在一笔已签名的交易中将单个输入拆分到多个 vault。实现多策略收益，且无需对每一步单独锁定资金。
  </Card>

  <Card title="Debt Migration" href="/composer/composer-api/recipes/debt-migration">
    使用两笔并发的闪电贷，在协议之间（Aave → Morpho）原子地迁移借款头寸。这是高级闪电贷模式。尚未公开，如需提前体验请联系我们。
  </Card>
</CardGroup>

## More patterns in the SDK

SDK 附带 **30 多个完整示例**，涵盖从最简的 `lifi.swap` 到高级多步 flow 的方方面面：跨代币整合、接收方侧交付、使用算术与断言 op（`core.add`、`core.subtract`、`core.assertEqual` 等）进行拆分校验、allow-revert 模拟、余额前置条件检查、直接以 `core.call` 调用任意合约、完整的 Aave 与 Morpho Blue 借贷生命周期（supply、borrow、repay、领取奖励），以及闪电贷债务迁移。请在 [`composer-sdk-examples`](https://github.com/lifinance/composer-sdk-examples/tree/main/examples) 仓库中浏览这些示例。
