export interface HeartbeatClientOptions { /** * Signer window to send and receive heartbeat messages from */ signerWindow: Window; /** * Callback when first heartbeat has been received */ onEstablish: (origin: string, status: 'pending' | 'ready') => void; /** * Reasonable time in milliseconds in which the communication channel needs to be established * @default 10000 */ establishTimeout?: number; /** * Callback when no heartbeats have been received for `establishTimeout` milliseconds */ onEstablishTimeout: () => void; /** * Callback when status response has changed */ onStatusChange: (status: 'pending' | 'ready') => void; /** * Reasonable time in milliseconds in which the communication channel can be pending * @default 300000 */ pendingTimeout?: number; /** * Callback when no heartbeats have been received for `pendingTimeout` milliseconds */ onPendingTimeout: () => void; /** * Time in milliseconds of not receiving heartbeat responses after which the communication channel is disconnected * @default 5000 */ disconnectTimeout?: number; /** * Callback when no heartbeats have been received for `disconnectTimeout` milliseconds */ onDisconnect: () => void; /** * Status polling rate in ms * @default 300 */ statusPollingRate?: number; /** * Relying party window, used to listen for incoming message events * @default globalThis.window */ window?: Window; /** * Get random uuid implementation for status messages * @default globalThis.crypto */ crypto?: Pick; } export declare class HeartbeatClient { #private; constructor(options: HeartbeatClientOptions); }