import { UserAlias } from "@gala-chain/api"; import { GalaChainContext } from "@gala-chain/chaincode"; import { DexPositionData, Pool } from "../../api/"; /** * Fetches an existing DEX position for a user based on tick range and pool hash, * or creates a new one if it doesn't exist. * * @param ctx - The GalaChain context containing blockchain state and utilities * @param pool - The liquidity pool in which this position exists * @param tickUpper - The upper bound of the tick range * @param tickLower - The lower bound of the tick range * @param uniqueKey - A unique key used to deterministically generate a position ID if none exists * @param liquidityProvider - The user address or alias of the liquidity provider * @param positionId - (Optional) The explicit position ID to fetch; if not provided, one is derived from the tick range * @returns The DexPositionData object representing the user's position * @throws NotFoundError - If the provided positionId does not match the given tick range * @throws ValidationError - If the user’s position record fails validation */ export declare function fetchOrCreateDexPosition(ctx: GalaChainContext, pool: Pool, tickUpper: number, tickLower: number, uniqueKey: string, liquidityProvider: UserAlias, positionId?: string): Promise; /** * Fetches a user's position within a specific tick range in a Dex pool. * * @param ctx - GalaChain context object. * @param poolHash - Identifier for the pool. * @param tickUpper - Upper bound of the tick range. * @param tickLower - Lower bound of the tick range. * @param owner - (Optional) Explicit user address to query; defaults to the calling user. * @returns DexPositionData - The position data for the specified tick range. * @throws NotFoundError - If the user has no position in the given tick range. */ export declare function fetchUserPositionInTickRange(ctx: GalaChainContext, poolHash: string, tickUpper: number, tickLower: number, positionId?: string, owner?: string): Promise; /** * Retrieves a DexPositionData object from the ledger. * * @param ctx - The chaincode stub context. * @param poolHash - Unique identifier for the pool. * @param tickUpper - Upper tick boundary for the position. * @param tickLower - Lower tick boundary for the position. * @param positionId - Unique identifier for the position. * @returns The deserialized DexPositionData object. */ export declare function getDexPosition(ctx: GalaChainContext, poolHash: string, tickUpper: number, tickLower: number, positionId: string): Promise; //# sourceMappingURL=position.helper.d.ts.map