@hyperionxyz/sdk
Version:
This SDK allows you to interact with the Hyperion API. You can use it to request data, create pools/positions and more.
48 lines • 1.8 kB
TypeScript
import { default as BigNumber } from 'bignumber.js';
export declare const tickComplement: (tick: number | string) => number;
export declare const BASE = 1.0001;
export declare const logBase: (number: number | string | BigNumber) => number;
export declare const poolDeadline: () => number;
export declare const LOWEST_TICK = "-443636";
export declare const HIGHEST_TICK = "443636";
export declare enum FeeTierIndex {
"PER_0.01_SPACING_1" = 0,
"PER_0.05_SPACING_5" = 1,
"PER_0.3_SPACING_60" = 2,
"PER_1_SPACING_200" = 3,
"PER_0.1_SPACING_20" = 4,
"PER_0.25_SPACING_50" = 5
}
export declare const FeeTierItems: string[];
export declare const FeeTierStep: number[];
export declare const LowestTickByStep: number[];
export declare const HighestTickByStep: number[];
export declare const u64Max = 184467440737095520;
export declare const roundTickBySpacing: (tick: number | string, feeTierIndex: number) => string;
/**
*
* @param price
* @param feeTierIndex
* @param decimalsRatio Math.pow(10, currencyADecimals - currencyBDecimals)
*
* @returns
*/
export declare const priceToTick: ({ price, feeTierIndex, decimalsRatio, }: {
price: string | number | BigNumber;
feeTierIndex: FeeTierIndex;
decimalsRatio: number;
}) => BigNumber | null;
export declare const tickToPrice: ({ tick, decimalsRatio, }: {
tick: number | string | BigNumber;
decimalsRatio: number;
}) => string;
export declare const POOL_STABLE_TYPE = false;
export declare const currencyCheck: (args: {
currencyA: string;
currencyB: string;
}) => void;
export declare const slippageCheck: (args: {
slippage: number | string;
}) => void;
export declare const slippageCalculator: (amount: number | string, slippage: number | string) => number;
//# sourceMappingURL=index.d.ts.map