/** * The one signal core sends upward when a stored session stops existing. * * `tarobase-core` cannot import `js-sdk` (that would be a cycle), and core has no * event bus, so a session dying inside a session manager used to be invisible to * the SDK: `setCurrentUser(null)` was only ever called by `logout()` and `init()`. * The result was a UI that kept showing a connected wallet long after the session * it was showing had been wiped, which is exactly what let a wallet-review UI * freeze a review against a wallet the server no longer knew about. * * `js-sdk` registers a handler at init; core fires it ONLY when storage was * actually cleared, never on a failed-but-preserved refresh. Firing on a * preserved session would log people out on a transient network blip. */ type SessionClearedHandler = () => void; /** * Register a listener for "the stored session is gone". * Returns an unsubscribe function. */ export declare function onSessionCleared(handler: SessionClearedHandler): () => void; /** * Announce that session storage was cleared. * * Call this ONLY after a removal actually happened. Handlers are best-effort: a * throwing listener must not turn a successful clear into a failed one, because * the storage mutation has already committed by this point. */ export declare function notifySessionCleared(): void; /** Test seam: drop every registered handler. */ export declare function resetSessionClearedHandlers(): void; export {};