Documentation Index
Fetch the complete documentation index at: https://docs.fluton.io/llms.txt
Use this file to discover all available pages before exploring further.
Create Client
import { FlutonClient } from "@fluton/sdk";
const fluton = new FlutonClient({
chains: {
ethereum: { chainId: 1, rpcUrl: "…" },
arbitrum: { chainId: 42161, rpcUrl: "…" },
},
signer: /* optional */,
});
Signer is optional for server-side quoting/intent creation. Required for execute().
Request a Quote
const quote = await fluton.bridge.quote({
fromChain: "ethereum",
toChain: "arbirum",
token: "USDC",
amount: "100",
});
Execute Quote & Track Status
const res = await fluton.bridge.execute(quote);
fluton.bridge.track(res.intentId, (s) => console.log(s.status));
Custom Intents
const draft = await fluton.intent.create({ ... });
const signed = await fluton.intent.sign(draft);
const { intentId } = await fluton.intent.submit(signed);
const offer = await fluton.offers.selectBest(intentId);
await fluton.intent.execute(intentId, offer);