How to use Fluton SDK
import { FlutonClient } from "@fluton/sdk"; const fluton = new FlutonClient({ chains: { ethereum: { chainId: 1, rpcUrl: "…" }, arbitrum: { chainId: 42161, rpcUrl: "…" }, }, signer: /* optional */, });
execute()
const quote = await fluton.bridge.quote({ fromChain: "ethereum", toChain: "arbirum", token: "USDC", amount: "100", });
const res = await fluton.bridge.execute(quote); fluton.bridge.track(res.intentId, (s) => console.log(s.status));
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);