/** * Position Functions Module * * This module provides utility functions for working with user positions in * the AlphaLend protocol. All functions go through the `Blockchain` (GraphQL) * primitive — no JSON-RPC / `SuiClient` is used. */ import { Blockchain } from "../blockchain.js"; import { PositionType } from "../../utils/parsedTypes.js"; /** * Fetches a user's position capability ID (first cap returned by GraphQL). * * @param blockchain - Blockchain client * @param userAddress - Address of the user * @returns Promise resolving to the position capability ID or undefined if * the user owns no PositionCap. */ export declare const getUserPositionCapId: (blockchain: Blockchain, userAddress: string) => Promise; /** * Fetches a user's position capability IDs sorted by creation time (oldest first). * * @param blockchain - Blockchain client * @param userAddress - Address of the user * @returns Promise resolving to sorted position capability IDs or undefined * on error. Returns empty array if the user has no caps. */ export declare const getUserPositionCapIds: (blockchain: Blockchain, userAddress: string) => Promise<(string | undefined)[] | undefined>; /** * Fetches a user's position ID (first cap's position_id). * * @param blockchain - Blockchain client * @param userAddress - Address of the user * @returns Promise resolving to the position ID or undefined if not found. */ export declare const getUserPositionId: (blockchain: Blockchain, userAddress: string) => Promise; /** * Fetches all of a user's position IDs from their position capabilities. * * @param blockchain - Blockchain client * @param userAddress - Address of the user * @returns Promise resolving to the position IDs, empty array if not found, * undefined on error. */ export declare const getUserPositionIds: (blockchain: Blockchain, userAddress: string) => Promise; /** * Retrieves the complete position object for a user. * * @param blockchain - Blockchain client * @param userAddress - Address of the user * @returns Promise resolving to the parsed position or undefined if not found. */ export declare const getUserPosition: (blockchain: Blockchain, userAddress: string) => Promise; //# sourceMappingURL=functions.d.ts.map