import { getRoutes, RouteResponse, executeRoute } from '@keygate/sdk'
import { createWalletClient, http } from 'viem'
import { mainnet } from 'viem/chains'
const client = createWalletClient({
chain: mainnet,
transport: http()
})
const routes: RouteResponse[] = await getRoutes({
inputAmount: '10000000', // 10 USDC
fromChainId: 10, // Optimism
fromToken: '0x0b2c639c533813f4aa9d7837caf62653d097ff85', // USDC on Optimism
toChainId: 121171651099711, // Internet Computer Protocol
toToken: '5okwm-giaaa-aaaar-qbn6a-cai' // osUSDC
})
const chosenRoute = routes[0]
await executeRoute(chosenRoute, {
walletClient: client
})