import { bignum } from '@convergence-rfq/beet'; import BN from 'bn.js'; /** * Take bignum and convert it to a UI number while taking into account * token mint decimals. * * ``` * const value = 9_500_000_000 * const decimals = 9 * removeDecimals(value, decimals) // 9.5 * ``` * * @param value {number} BN number * @param decimals {number} amount of decimals to remove * @returns {number} UI representation of the number */ export declare const removeDecimals: (value: bignum, decimals?: number) => number; /** * Take UI number and convert it to a BN while taking into account * token mint decimals. * * ``` * const value = 9.5 * const decimals = 9 * addDecimals(value, decimals) // 9_500_000_000 * ``` * * @param value {number} UI number * @param decimals {number} amount of decimals to add * @returns {BN} BN representation of the number */ export declare const addDecimals: (value: number, decimals?: number) => BN; /** * Used to convert timestamps from CPL to numbers in milliseconds. * * @param timestamp {bignum} Solita timestamp * @returns {number} timestamp in milliseconds */ export declare function convertTimestampToMilliSeconds(timestamp: bignum | number): number; export declare function convertTimestampToSeconds(timestamp: bignum | number): number; /** * Used to roundUp values to a certain amount of decimals. * * @param amount {number} amount to round Up * @param decimals {number} amount of decimals to round Up to * @returns {number} rounded up amount */ export declare const roundUp: (amount: number, decimals: number) => number; /** * Used to roundDown values to a certain amount of decimals. * * @param amount {number} amount to round down * @param decimals {number} amount of decimals to round down to * @returns {number} rounded down amount */ export declare const roundDown: (amount: number, decimals: number) => number;