Learn how to install and setup Fibrous Router SDK
npm install fibrous-router-sdk
import { Router as FibrousRouter } from "fibrous-router-sdk"; // Initialize the router const router = new FibrousRouter(); // Example: Get supported tokens for Base chain const tokens = await router.supportedTokens("base"); // Example: Get best route for a swap const route = await router.getBestRoute( amount, // BigNumber: Amount to swap tokenInAddress, // string: Input token address tokenOutAddress, // string: Output token address "base", // string: Chain name ); // Example: Build a transaction const tx = await router.buildTransaction( amount, // BigNumber: Amount to swap tokenInAddress, // string: Input token address tokenOutAddress, // string: Output token address 1, // number: Slippage percentage (1 = 1%) receiverAddress, // string: Address to receive tokens "base" // string: Chain name );