/**
 * Protocol-wide event types for getAllEvents.
 * Position-scoped events are also available via getLoanEvents.
 */
export type ProtocolEvent = {
    kind: 'position';
    subkind: 'created' | 'status' | 'renewed' | 'closed';
    positionId: string;
    timestamp: string;
    blockNumber: string;
    transactionHash: string;
    [k: string]: unknown;
} | {
    kind: 'payment';
    positionId: string;
    timestamp: string;
    blockNumber: string;
    transactionHash: string;
    [k: string]: unknown;
} | {
    kind: 'liquidation';
    positionId: string;
    timestamp: string;
    blockNumber: string;
    transactionHash: string;
    [k: string]: unknown;
} | {
    kind: 'collateral';
    positionId: string;
    timestamp: string;
    blockNumber: string;
    transactionHash: string;
    [k: string]: unknown;
} | {
    kind: 'mint';
    positionId: string;
    timestamp: string;
    blockNumber: string;
    transactionHash: string;
    [k: string]: unknown;
} | {
    kind: 'withdrawal';
    positionId: string;
    timestamp: string;
    blockNumber: string;
    transactionHash: string;
    [k: string]: unknown;
} | {
    kind: 'psm';
    subkind: 'swap' | 'redeem';
    timestamp: string;
    blockNumber: string;
    transactionHash: string;
    [k: string]: unknown;
} | {
    kind: 'admin';
    subkind: 'circuitBreaker' | 'termFee' | 'loanParams' | 'maxLoanValue' | 'btcBounds' | 'mintLimit';
    timestamp: string;
    blockNumber: string;
    transactionHash: string;
    [k: string]: unknown;
} | {
    kind: 'mintingFee';
    positionId: string;
    feeAmount: string;
    mintAmount: string;
    timestamp: string;
    blockNumber: string;
    transactionHash: string;
    [k: string]: unknown;
} | {
    kind: 'renewalFee';
    positionId: string;
    feeAmount: string;
    extensionTerm: string;
    timestamp: string;
    blockNumber: string;
    transactionHash: string;
    [k: string]: unknown;
};
export interface ProtocolEventsFilter {
    /** Narrow all position-linked events to a single position */
    positionId?: string;
    /** Include only these event kinds (omit to include all) */
    kinds?: ProtocolEvent['kind'][];
    fromTimestamp?: string;
    toTimestamp?: string;
    fromBlock?: string;
    toBlock?: string;
    /** Per-entity query limit (default 1000) */
    limit?: number;
    orderDirection?: 'asc' | 'desc';
}
export interface ProtocolEventsResult {
    events: ProtocolEvent[];
    totalEvents: number;
    /** Count of events per kind for UI filter badges */
    byKind: Record<string, number>;
}
