UNPKG

evx-sdk

Version:

The Evx SDK is a developer toolkit designed to simplify interaction with the Evx decentralized liquidity protocol. It provides an abstraction layer over the smart contracts, allowing developers to easily build applications, integrate liquidity pools, fetc

17 lines (16 loc) 834 B
/** * @notice Converts a decimal number to a BigInt representation using fixed-point arithmetic. * @dev Useful for on-chain values (e.g., ERC20 with 18 decimals). * @param value The decimal number to convert (as number or string). * @param decimals The number of decimal places (commonly 18). * @return The BigInt representation. */ export declare function decimalToBigInt(value: string | number, decimals?: number): bigint; /** * @notice Converts a BigInt value (like on-chain token amount) to a human-readable decimal string. * @dev Reverts the transformation made by `decimalToBigInt`. * @param value The BigInt value to convert. * @param decimals The number of decimal places (commonly 18). * @return The decimal value as a string. */ export declare function bigIntToDecimal(value: bigint, decimals?: number): string;