Build with Fusion
Quickstart
The fastest way to integrate Fusion — via the upcoming SDK.
What integration will look like
When the SDK lands, submitting a testnet swap from Arbitrum Sepolia to Base Sepolia will look like this:
import { createFusionClient } from '@fusion-protocol/sdk';
const fusion = createFusionClient({ apiUrl: process.env.FUSION_API_URL });
const { intentId } = await fusion.signAndSubmit(walletClient, {
fromChain: 421614,
toChain: 84532,
fromToken,
toToken,
amount,
minAmountOut,
recipient,
});
for await (const update of fusion.watchIntent(intentId)) {
console.log(update.status);
if (update.status === 'completed' || update.status === 'failed') break;
}
The same pipeline that currently takes ~80 lines of REST, Socket.IO, and typed-data plumbing collapses to a few idiomatic calls.
What the SDK will cover
- Core client —
getNonce,getSigningDomain,submitIntent,getIntent signAndSubmit(walletClient, intent)— fetch nonce, fetch domain, sign EIP-712 typed data, and submit in one callwatchIntent(intentId)— a typed Socket.IO wrapper that yields status transitions as an async iterable- React add-on (
@fusion-protocol/sdk/react) — auseFusionSwap()hook returning{ submit, status, txHashes, error }for drop-in integration into apps - Permit2 helpers — for gasless ERC20 source locks on EVM
- Cross-family helpers — for non-EVM source-lock session flows
While you wait
The underlying REST and Socket.IO surfaces are stable and documented. If you need to start building before the SDK ships, the endpoint-level references below are the integration surface the SDK itself will wrap:
- API and WebSocket Overview — every current REST endpoint and Socket.IO event
- Intent Schema — the signing payload, EIP-712 struct, and address rules per chain family
- Wallet App Integration — wallet-side patterns for EVM wallets, non-EVM wallets, and cross-family routes
Anything you hand-roll against those surfaces today will map one-to-one onto the SDK once it lands.
Next: