UNPKG

@lifi/widget

Version:

LI.FI Widget for cross-chain bridging and swapping. It will drive your multi-chain strategy and attract new users from everywhere.

16 lines (15 loc) 841 B
/** * Format token amount to at least 6 decimals. * @param amount amount to format. * @returns formatted amount. */ export declare function formatTokenAmount(amount: bigint | undefined, decimals: number): string; export declare function formatSlippage(slippage?: string, defaultValue?: string, returnInitial?: boolean): string; export declare function formatInputAmount(amount: string, decimals?: number | null, returnInitial?: boolean): string; export declare function formatTokenPrice(amount?: string | bigint, price?: string, decimals?: number): number; /** * Convert price value to token amount */ export declare function priceToTokenAmount(priceValue: string, priceUSD?: string): string; export declare function formatDuration(seconds: number, locale: string): string; export declare function wrapLongWords(text: string): string;