/**
 * Position Query Interfaces
 */
import { LoanStatus } from "../../types/loanStatus";
/**
 * Position data structure (from contract)
 */
export interface Position {
    positionId: string;
    pkpId: string;
    borrower: string;
    vaultAddress: string;
    vaultAddressRegtest?: string;
    ucdDebt: bigint;
    createdAt: number;
    lastUpdated: number;
    expiryAt: number;
    status: LoanStatus;
    collateralRatio?: number;
    requestedCollateralRatio?: number;
    selectedTerm: number;
}
/**
 * Bitcoin UTXO (Unspent Transaction Output)
 */
export interface BitcoinUTXO {
    txId: string;
    vout: number;
    value: number;
    confirmations: number;
    scriptPubKey?: string;
    address?: string;
}
/**
 * Position with Bitcoin status
 */
export interface PositionWithBTCStatus extends Position {
    btcStatus: {
        actualAmount: bigint;
        confirmations: number;
        utxos: BitcoinUTXO[];
        lastCheckedAt: number;
    };
}
/**
 * Position query options
 */
export interface PositionQueryOptions {
    borrower?: string;
    status?: LoanStatus | LoanStatus[];
    verifyBTC?: boolean;
    offset?: number;
    limit?: number;
    sortBy?: 'createdAt' | 'lastUpdated' | 'ucdDebt';
    sortDirection?: 'asc' | 'desc';
}
/**
 * Position query result
 */
export interface PositionQueryResult {
    positions: Position[] | PositionWithBTCStatus[];
    total: number;
    hasMore: boolean;
    executionTimeMs: number;
}
/**
 * Bitcoin balance check result
 */
export interface BitcoinBalanceResult {
    address: string;
    balance: bigint;
    utxos: BitcoinUTXO[];
    confirmations: number;
    provider: string;
    timestamp: number;
}
