NiceRelaySub
import type { NiceRelaySub } from "https://gitlab.com/soapbox-pub/nostr-machina/-/raw/main/mod.ts";
Relay subscription interface. Loop over it to get events.
@example
for await (const event of sub) {
console.log(event);
}
interface NiceRelaySub <K extends number> {
[[Symbol.asyncIterator]]: () => AsyncGenerator<Event<K>>;
close: () => void;
eoseSignal: AbortSignal;
id: string;
}