/**
 * Listen to real-time obligation changes via WebSocket.
 *
 * Uses AccountSubscriptionManager for the WS plumbing and
 * KaminoObligation.fromAccountData for decoding + hydration.
 */
import { type Address, type Commitment, type Slot } from '@solana/kit';
import { type AccountSubscriptionManager, type ProgramFilter } from './accountSubscriptionManager';
import type { KaminoMarket } from './market';
import { KaminoObligation } from './obligation';
export interface ObligationChangeEvent {
    obligation: KaminoObligation;
    address: Address;
    slot: Slot;
}
export type ObligationChangeCallback = (event: ObligationChangeEvent) => void;
export interface ObligationListenerParams {
    manager: AccountSubscriptionManager;
    /** Map of market address → KaminoMarket, or a getter for lazy access */
    markets: Map<Address, KaminoMarket> | (() => Map<Address, KaminoMarket>);
    owner: Address;
    onChange: ObligationChangeCallback;
    onError?: (error: unknown) => void;
    programId?: Address;
    commitment?: Commitment;
}
export declare function buildObligationFilters(owner: Address): ProgramFilter[];
/**
 * Subscribe to all obligation account changes for a given owner.
 * Returns an unsubscribe function.
 */
export declare function listenToObligationChanges(params: ObligationListenerParams): () => void;
//# sourceMappingURL=obligationListener.d.ts.map