Returns the list of Tokens supported by Fibrous Finance
Copy
/** * Supported token list * @param chainName Chain ID to get the supported tokens for * @returns Promise<Record<string, Token>> */async supportedTokens(chainName: string): Promise<Record<string, Token>>;
Returns the list of Protocols supported by Fibrous Finance
Copy
/** * Supported protocol list * @param chainName Chain ID to get the supported protocols for * @returns Promise<Record<string, ProtocolId>> */async supportedProtocols(chainName: string): Promise<Record<string, ProtocolId>>;
/** * 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 chainName: Chain name where the transaction will take place * @param options: Optional parameters such as slippage and excluded protocols * @returns Promise<RouteResponse> * @throws Error if the API returns an error */async getBestRoute( amount: BigNumber, tokenInAddress: string, tokenOutAddress: string, chainName: string, options?: Partial<RouteOverrides>): Promise<RouteResponse>;