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

21 lines (20 loc) 977 B
/** * @title Decimal to SqrtX96 Price * @notice Converts a decimal price to sqrt price in X96 format * @dev Used for Nebular price calculations * @param decimalPrice The price in decimal format * @param decimalsToken0 Number of decimals for token0 * @param decimalsToken1 Number of decimals for token1 * @returns The sqrt price in X96 format as a bigint */ export declare function decimalToSqrtX96Price(decimalPrice: number, decimalsToken0: number, decimalsToken1: number): bigint; /** * @title SqrtX96 to Decimal Price * @notice Converts a sqrt price in X96 format to decimal price * @dev Used for Nebular price calculations * @param sqrtPriceX96 The sqrt price in X96 format * @param decimalsToken0 Number of decimals for token0 * @param decimalsToken1 Number of decimals for token1 * @returns The price in decimal format */ export declare function sqrtX96ToDecimalPrice(sqrtPriceX96: bigint | number, decimalsToken0: number, decimalsToken1: number): number;