/** * Gets the best route from the API * @param amount: Amount to swap, formatted * @param tokenInAddress: Token to swap from * @param tokenOutAddress: Token to swap to * @param options: Optional parameters * @returns Route response * @throws Error if the API returns an error */getBestRoute(amount: BigNumber, tokenInAddress: string, tokenOutAddress: string, options?: Partial<RouteOverrides>): Promise<RouteResponse>;
buildTransaction
Returns calldata with best route to transaction via Fibrous Finance
/** * Builds a Starknet transaction out of the route response * @param amount: Amount to swap, formatted * @param tokenInAddress: Token to swap from * @param tokenOutAddress: Token to swap to * @param slippage: Slippage percentage (0.01 = 1%) * @param receiverAddress: Address to receive the tokens*/buildTransaction( amount: BigNumber, tokenInAddress: string, tokenOutAddress: string, slippage: number, receiverAddress: string): Transaction;