Solana USDC → Apple (Ondo Tokenized)
LI.FI Intents on Solana
Buy tokenized Apple.
Choose how much AAPLon you want. LI.FI finds the USDC required.
Solana mainnet · Quotes are free · Signing uses real USDC
How it works
The LI.FI Intents lifecycle
Same intent model, different verification path. This demo settles entirely on Solana.
Step 1 of 4
Quote readyRequest exact-output quote
The user defines the AAPLon outcome. Solvers publish standing quotes to the LI.FI Order Server, which returns the USDC required.
User → LI.FI Order Server ← Solver standing quotesIntegration
Use the standard LI.FI API
Set toAmount and filter for lifiIntentsDex. LI.FI returns the USDC required and an encoded Solana transaction payload. Route availability depends on live solver liquidity.
Register your integrator and manage API credentials in the LI.FI Partner Portal ↗.
getQuote returns the quote payload; executeRoute uses the Wallet Standard provider to prepare, review, sign, submit, and track it.
import {
convertQuoteToRoute,
createClient,
executeRoute,
getQuote,
} from "@lifi/sdk";
import { SolanaProvider } from "@lifi/sdk-provider-solana";
// Wallet Standard wallet (for example, the wallet selected by your app)
const solanaProvider = SolanaProvider({
getWallet: async () => wallet,
});
// The quote API requires an address string, not the wallet object.
const walletAddress = wallet.accounts[0]?.address;
if (!walletAddress) throw new Error("Connect a Solana wallet first.");
const client = createClient({
integrator: "your-app",
providers: [solanaProvider],
});
const quote = await getQuote(client, {
fromChain: 1151111081099710,
toChain: 1151111081099710,
fromToken: "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v", // USDC
toToken: "123mYEnRLM2LLYsJW3K6oyYh8uP1fngj732iG638ondo", // AAPLon
// Exact output: AAPLon has 9 decimals
toAmount: "20000000", // 0.02 AAPLon
fromAddress: walletAddress,
toAddress: walletAddress,
allowExchanges: ["lifiIntentsDex"],
});
// Exact-output quote: USDC required for 0.02 AAPLon
console.log(quote.estimate.fromAmount);
const route = convertQuoteToRoute(quote);
await executeRoute(client, route);
// The provider prepares the transaction, asks the wallet to review & sign,
// submits it, and tracks execution.