UNPKG

@alcorexchange/alcor-swap-sdk

Version:

​​ **npm** ``` npm i @alcorexchange/alcor-swap-sdk ``` **yarn** ``` yarn add @alcorexchange/alcor-swap-sdk ``` ## Usage ### Import:

13 lines (12 loc) 723 B
export declare abstract class SqrtPriceMath { /** * Cannot be constructed. */ private constructor(); static getAmountADelta(sqrtRatioLX64: bigint, sqrtRatioUX64: bigint, liquidity: bigint, roundUp: boolean): bigint; static getAmountBDelta(sqrtRatioLX64: bigint, sqrtRatioUX64: bigint, liquidity: bigint, roundUp: boolean): bigint; static getNextSqrtPriceFromInput(sqrtPX64: bigint, liquidity: bigint, amountIn: bigint, zeroForOne: boolean): bigint; static getNextSqrtPriceFromOutput(sqrtPX64: bigint, liquidity: bigint, amountOut: bigint, zeroForOne: boolean): bigint; private static getNextSqrtPriceFromAmountARoundingUp; private static getNextSqrtPriceFromAmountBRoundingDown; }