@lifi/sdk
Version:
LI.FI Any-to-Any Cross-Chain-Swap SDK
19 lines • 890 B
TypeScript
import type { LiFiStep, Route } from '@lifi/types';
interface ConvertQuoteToRouteOptions {
/**
* When true, if the quote has zero output values (toAmount, toAmountMin, toAmountUSD),
* use the values from the previous included step that has non-zero output.
*/
adjustZeroOutputFromPreviousStep?: boolean;
}
export declare function formatTokenPrice(amount?: string | bigint, price?: string, decimals?: number): number;
/**
* Converts a quote to Route
* @param quote - Step returned from the quote endpoint.
* @param options - Optional configuration for handling edge cases.
* @returns - The route to be executed.
* @throws {BaseError} Throws a ValidationError if the step has missing values.
*/
export declare const convertQuoteToRoute: (quote: LiFiStep, options?: ConvertQuoteToRouteOptions) => Route;
export {};
//# sourceMappingURL=convertQuoteToRoute.d.ts.map