@kryptogo/kryptogokit-sdk-react
Version:
KryptogoKit offers a comprehensive web3 wallet solution with seamless KryptoGO Auth integration and multi-wallet connection support. Designed for users. Built for developers.
33 lines (32 loc) • 1.08 kB
TypeScript
import BigNumber from 'bignumber.js';
type BigNumberFormat = {
/** The string to prepend. */
prefix?: string;
/** The decimal separator. */
decimalSeparator?: string;
/** The grouping separator of the integer part. */
groupSeparator?: string;
/** The primary grouping size of the integer part. */
groupSize?: number;
/** The secondary grouping size of the integer part. */
secondaryGroupSize?: number;
/** The grouping separator of the fraction part. */
fractionGroupSeparator?: string;
/** The grouping size of the fraction part. */
fractionGroupSize?: number;
/** The string to append. */
suffix?: string;
};
declare enum DECIMAL_DISPLAY_MODE {
FIAT = 3,
PRICE = 2,
TOKEN = 8
}
interface FormatCurrencyProps {
amount: string | number | BigNumber;
decimals?: number;
roundingMode?: 'ceil' | 'floor' | 'round';
fmt?: BigNumberFormat;
}
declare const formatCurrency: ({ amount, decimals, roundingMode, fmt, }: FormatCurrencyProps) => string;
export { DECIMAL_DISPLAY_MODE, formatCurrency };