/** How early before rotation to refresh (30 seconds default) */ export declare const DEFAULT_REFRESH_BEFORE_MS: number; /** Minimum refresh interval (don't refresh more than once per minute) */ export declare const MIN_REFRESH_INTERVAL_MS: number; /** Fallback interval if no rotation time is known (5 minutes) */ export declare const FALLBACK_REFRESH_INTERVAL_MS: number; /** Grace period polling: poll at 50% of remaining grace time if no WS event */ export declare const GRACE_PERIOD_POLL_RATIO = 0.5; /** Minimum grace period poll delay (10 seconds) */ export declare const MIN_GRACE_POLL_DELAY_MS: number; /** Heartbeat freshness monitor interval (60 seconds) */ export declare const HEARTBEAT_INTERVAL_MS: number; /** Connection recovery delay after reconnect (2 seconds) */ export declare const RECONNECT_POLL_DELAY_MS: number; /** Maximum retry attempts for rotation handling */ export declare const MAX_RETRY_ATTEMPTS = 5; /** Rotation tracking state */ export interface RotationTracking { /** When we last received a WS rotation event */ lastWsEventAt: number | null; /** When we last polled for rotation */ lastPollAt: number | null; /** When rotation is expected */ expectedRotationAt: number | null; /** When grace period ends */ graceExpiresAt: number | null; /** Did we receive WS event for current rotation? */ wsEventReceived: boolean; /** Count of rotations detected via polling (WS missed) */ missedRotations: number; } /** Source of key refresh trigger */ export type RefreshSource = 'scheduled' | 'ws_event' | 'grace_poll' | 'reconnect' | 'heartbeat' | 'manual'; /** Managed key service state */ export interface ManagedKeyState { isRunning: boolean; currentKey: string | null; staleKeyDetected: boolean; onKeyChangedCallback: ((newKey: string) => void) | null; } /** Managed key status response */ export interface ManagedKeyStatus { isRunning: boolean; isManagedMode: boolean; staleKeyDetected: boolean; managedKeyName?: string; currentKeyPrefix?: string; nextRotationAt?: string; graceExpiresAt?: string; safetyRails: { lastWsEventAt: string | null; lastPollAt: string | null; wsEventReceived: boolean; missedRotations: number; graceRemainingMs: number | null; }; } /** Create initial rotation tracking state */ export declare function createInitialRotationTracking(): RotationTracking; /** Reset rotation tracking (preserves missedRotations for debugging) */ export declare function resetRotationTracking(tracking: RotationTracking): void; //# sourceMappingURL=types.d.ts.map