import { DeepReadonly } from 'ts-essentials'; import { PoolState } from '../types'; export declare const nativeAddonAvailable: boolean; export declare const useNativeMath: boolean; export type RustPoolHandleType = { queryOutputs(amounts: bigint[], zeroForOne: boolean, side: number): { outputs: bigint[]; tickCounts: number[]; }; }; /** * Convert a PoolState to the init format expected by the Rust addon. */ declare function toRustInit(state: DeepReadonly, variant?: string, bitmapRangeOverride?: number): { variant: string; bitmapRange: number; blockTimestamp: bigint; tickSpacing: bigint; fee: bigint; sqrtPriceX96: bigint; tick: bigint; observationIndex: number; observationCardinality: number; observationCardinalityNext: number; feeProtocol: bigint; liquidity: bigint; maxLiquidityPerTick: bigint; startTickBitmap: bigint; lowestKnownTick: bigint; highestKnownTick: bigint; tickBitmap: { key: number; value: bigint; }[]; ticks: { key: number; liquidityGross: bigint; liquidityNet: bigint; }[]; observations: { key: number; blockTimestamp: bigint; tickCumulative: bigint; secondsPerLiquidityCumulativeX128: bigint; initialized: boolean; }[]; }; /** * Create a RustPoolHandle from a PoolState. * Returns null if the native addon is not available. */ export declare function createRustHandle(state: DeepReadonly, variant?: string, bitmapRange?: number): RustPoolHandleType | null; export type RegistryQueryResult = { key: string; outputs: bigint[]; tickCounts: number[]; }; export type RustPoolRegistryType = { setPool(key: string, init: ReturnType): void; removePool(key: string): void; queryMany(keys: string[], amounts: bigint[], zeroForOne: boolean, side: number): RegistryQueryResult[]; poolCount(): number; }; export declare function createRegistry(): RustPoolRegistryType | null; export declare function registrySetPool(registry: RustPoolRegistryType, key: string, state: DeepReadonly, variant?: string, bitmapRange?: number): void; export {};