UNPKG

nostr-fetch

Version:

A utility library that allows JS/TS apps to effortlessly fetch past events from Nostr relays

14 lines 639 B
import type { Relay, RelayOptions } from "./relay"; import { type LogLevel } from "@nostr-fetch/kernel/debugLogger"; import { type WebSocketMinCtor } from "@nostr-fetch/kernel/webSocket"; export interface RelayPool { ensureRelays(relayUrls: string[], relayOpts: RelayOptions): Promise<string[]>; ensureSingleRelay(relayUrl: string, relayOpts: RelayOptions): Promise<Relay | undefined>; shutdown(): void; } export type RelayPoolOptions = { minLogLevel: LogLevel; webSocketConstructor: WebSocketMinCtor; }; export declare const initRelayPool: (opts: RelayPoolOptions) => RelayPool; //# sourceMappingURL=relayPool.d.ts.map