> ## 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.

# Usage

> How to use Fluton SDK

### Create Client

```js theme={null}
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

```js theme={null}
const quote = await fluton.bridge.quote({
  fromChain: "ethereum",
  toChain: "arbirum",
  token: "USDC",
  amount: "100",
});
```

### Execute Quote & Track Status

```js theme={null}
const res = await fluton.bridge.execute(quote);
fluton.bridge.track(res.intentId, (s) => console.log(s.status));
```

### Custom Intents

```js theme={null}
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);
```
