nostr-websocket-utils
Version:
Robust WebSocket utilities for Nostr applications with automatic reconnection, supporting both ESM and CommonJS. Features channel-based messaging, heartbeat monitoring, message queueing, and comprehensive error handling with type-safe handlers.
28 lines • 817 B
TypeScript
import { NostrWSServerOptions } from '../types/websocket.js';
/**
* Represents a Nostr WebSocket server
*/
export declare class NostrWSServer {
/**
* The underlying WebSocket server instance
*/
private server;
/**
* Creates a new Nostr WebSocket server instance
*
* @param {NostrWSServerOptions} options - Server configuration options
*/
constructor(options: NostrWSServerOptions);
/**
* Closes the WebSocket server
*/
stop(): void;
}
/**
* Creates a new Nostr WebSocket server instance
*
* @param {NostrWSServerOptions} options - Server configuration options
* @returns {NostrWSServer} The created server instance
*/
export declare function createWSServer(options: NostrWSServerOptions): NostrWSServer;
//# sourceMappingURL=nostr-server.d.ts.map