import { default } from "https://deno.land/x/nostr_deno_client@v0.2.7/lib/relay.ts";
Constructors
new
default(_nostr: Nostr)Properties
private
nostr: Nostrprivate
ws: WebSocketClient | undefinedMethods
connect()
deleteListener(subscribeId: string)
events(filters: NostrFilters)
Usage example: for await (const event of relay.events({ kinds: [NostrKind.META_DATA], authors: [publicKey], limit: 1 })) { console.log(event) }
getListener(subscribeId: string)
handleMessage(message: any)
sendErrorEvent(err: Error)
sendEvent(event: NostrEvent)
subscribe(filters: NostrFilters, listenerFunc: any)
subscribePromise(filters: NostrFilters): Promise<Array<NostrEvent>>
triggerListenerFunc(subscribeId: string, data: any)