#defi #cross-chain #bridge #lifi

lfi

Unofficial Rust client for the Li.Fi API (lfi)

5 releases

0.1.4 Feb 15, 2026
0.1.3 Jan 28, 2026
0.1.2 Jan 27, 2026
0.1.1 Jan 22, 2026
0.1.0 Jan 17, 2026

#1385 in Web programming


Used in ethcli

MIT license

215KB
4K SLoC

yld_fi

lifi

Unofficial Rust client for the LI.FI Cross-Chain Bridge and DEX Aggregator API

crates.io MIT License

Overview

LI.FI is a multi-chain liquidity aggregation protocol that integrates multiple bridges and DEXs to provide optimal cross-chain swap routes across 20+ chains.

Features

  • Cross-chain swaps - Swap tokens across different blockchains in a single transaction
  • Bridge aggregation - Access multiple bridges (Stargate, Hop, Connext, Across, etc.)
  • DEX aggregation - Optimal routing through DEXs on each chain
  • Route optimization - Find the best route by price, speed, or security
  • Transaction tracking - Monitor cross-chain transaction status

Quick Start

use lfi::{Client, QuoteRequest, chains};

#[tokio::main]
async fn main() -> Result<(), lfi::Error> {
    // Create a client with an integrator identifier
    let client = Client::with_integrator("my-app")?;

    // Get a quote for swapping 1 ETH on Ethereum to USDC on Arbitrum
    let request = QuoteRequest::new(
        chains::ETHEREUM,
        chains::ARBITRUM,
        "0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE",
        "0xaf88d065e77c8cC2239327C5EDb3A432268e5831",
        "1000000000000000000",
        "0xYourWalletAddress",
    ).with_slippage(0.5);

    let quote = client.get_quote(&request).await?;
    println!("Estimated output: {}", quote.estimate.to_amount);

    Ok(())
}

Installation

[dependencies]
lfi = "0.1"
tokio = { version = "1", features = ["full"] }

Terms of Service

This is an unofficial client. By using this library, you agree to comply with LI.FI Terms and Conditions.

Disclaimer

This crate is not affiliated with or endorsed by LI.FI.

License

MIT

Dependencies

~6–13MB
~215K SLoC