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.
27 lines • 586 B
TypeScript
/**
* @file Relay type definitions
* @module types/relays
*/
/**
* Relay information interface
*/
export interface NostrRelayInfo {
name?: string;
description?: string;
pubkey?: string;
contact?: string;
supported_nips?: number[];
software?: string;
version?: string;
}
/**
* Relay metadata interface
*/
export interface NostrRelayMetadata extends NostrRelayInfo {
url: string;
status: 'connected' | 'disconnected' | 'error';
error?: string;
lastConnected?: number;
lastDisconnected?: number;
}
//# sourceMappingURL=relays.d.ts.map