import { Address, PublicClient } from "viem"; import { AutomatedMarketMakerEnum } from "./amm"; /** * Get the position details in a single call by deploying an ephemeral contract via `eth_call` * @param npm Nonfungible position manager address. * @param positionId Position id. * @param publicClient Viem public client. * @param blockNumber Optional block number to query. * @returns The position details. */ export declare function getPositionDetails(amm: AutomatedMarketMakerEnum, npm: Address, positionId: bigint, publicClient: PublicClient, blockNumber?: bigint): Promise<{ tokenId: bigint; owner: `0x${string}`; position: { nonce: bigint; operator: `0x${string}`; token0: `0x${string}`; token1: `0x${string}`; feeOrTickSpacing: number; tickLower: number; tickUpper: number; liquidity: bigint; feeGrowthInside0LastX128: bigint; feeGrowthInside1LastX128: bigint; tokensOwed0: bigint; tokensOwed1: bigint; salt: `0x${string}`; }; pool: `0x${string}`; poolFee: number; poolTickSpacing: number; slot0: { sqrtPriceX96: bigint; tick: number; observationIndex: number; observationCardinality: number; observationCardinalityNext: number; feeProtocol: number; unlocked: boolean; }; activeLiquidity: bigint; decimals0: number; decimals1: number; }>; /** * Get the position details in a single call by deploying an ephemeral contract via `eth_call` * @param positionManager Position manager address. * @param positionId Position id. * @param publicClient Viem public client. * @param blockNumber Optional block number to query. * @returns The position details. */ export declare function getPositionDetailsV4(positionManager: Address, positionId: bigint, publicClient: PublicClient, blockNumber?: bigint): Promise<{ tokenId: bigint; owner: `0x${string}`; position: { nonce: bigint; operator: `0x${string}`; token0: `0x${string}`; token1: `0x${string}`; feeOrTickSpacing: number; tickLower: number; tickUpper: number; liquidity: bigint; feeGrowthInside0LastX128: bigint; feeGrowthInside1LastX128: bigint; tokensOwed0: bigint; tokensOwed1: bigint; salt: `0x${string}`; }; poolKey: { currency0: `0x${string}`; currency1: `0x${string}`; fee: number; tickSpacing: number; hooks: `0x${string}`; }; poolFee: number; poolTickSpacing: number; slot0: { sqrtPriceX96: bigint; tick: number; protocolFee: number; lpFee: number; }; activeLiquidity: bigint; decimals0: number; decimals1: number; }>; /** * Get the position details in a single call by deploying an ephemeral contract via `eth_call` * @param positionManager Position manager address. * @param positionId Position id. * @param publicClient Viem public client. * @param blockNumber Optional block number to query. * @returns The position details. */ export declare function getPositionDetailsPCSV4(positionManager: Address, positionId: bigint, publicClient: PublicClient, blockNumber?: bigint): Promise<{ tokenId: bigint; owner: `0x${string}`; position: { nonce: bigint; operator: `0x${string}`; token0: `0x${string}`; token1: `0x${string}`; feeOrTickSpacing: number; tickLower: number; tickUpper: number; liquidity: bigint; feeGrowthInside0LastX128: bigint; feeGrowthInside1LastX128: bigint; tokensOwed0: bigint; tokensOwed1: bigint; salt: `0x${string}`; }; poolKey: { currency0: `0x${string}`; currency1: `0x${string}`; hooks: `0x${string}`; poolManager: `0x${string}`; fee: number; parameters: `0x${string}`; }; poolFee: number; poolTickSpacing: number; slot0: { sqrtPriceX96: bigint; tick: number; protocolFee: number; lpFee: number; }; activeLiquidity: bigint; decimals0: number; decimals1: number; }>; /** * */ export declare function getMostRecentPositionsPCSV4(positionManager: Address, owner: Address, limit: bigint, publicClient: PublicClient, blockNumber?: bigint): Promise; /** * Get the state and pool for all positions in a single call by deploying an ephemeral contract via `eth_call`. * @param npm Nonfungible position manager address. * @param positionIds Position ids. * @param publicClient Viem public client. * @param blockNumber Optional block number to query. * @returns The position details for all positions. */ export declare function getPositions(amm: AutomatedMarketMakerEnum, npm: Address, positionIds: bigint[], publicClient: PublicClient, blockNumber?: bigint): Promise; /** * Get the state and pool for all positions in a single call by deploying an ephemeral contract via `eth_call`. * @param positionManager Position manager address. * @param positionIds Position ids. * @param publicClient Viem public client. * @param blockNumber Optional block number to query. * @returns The position details for all positions. */ export declare function getPositionsV4(positionManager: Address, positionIds: bigint[], publicClient: PublicClient, blockNumber?: bigint): Promise; /** * Get the state and pool for all positions in a single call by deploying an ephemeral contract via `eth_call`. * @param positionManager Position manager address. * @param positionIds Position ids. * @param publicClient Viem public client. * @param blockNumber Optional block number to query. * @returns The position details for all positions. */ export declare function getPositionsPCSV4(positionManager: Address, positionIds: bigint[], publicClient: PublicClient, blockNumber?: bigint): Promise; /** * Get the state and pool for all positions of the specified owner by deploying an ephemeral contract via `eth_call`. * Each position consumes about 200k gas, so this method may fail if the number of positions exceeds 1500 assuming the * provider gas limit is 300m. * @param npm Nonfungible position manager address. * @param owner The owner of the positions. * @param publicClient Viem public client. * @param blockNumber Optional block number to query. * @returns The position details for all positions of the specified owner. */ export declare function getAllPositionsByOwner(amm: AutomatedMarketMakerEnum, npm: Address, owner: Address, publicClient: PublicClient, blockNumber?: bigint): Promise;