Expose relay funcs (#31)

This commit is contained in:
Íñigo Aréjula Aísa
2022-11-26 03:21:33 +01:00
committed by GitHub
parent ae717a1a4a
commit 1b798b2eee
3 changed files with 27 additions and 3 deletions

3
index.d.ts vendored
View File

@@ -92,6 +92,9 @@ declare type PoolPublishCallback = (status: number, relay: string) => void;
declare type RelayPool = {
setPrivateKey(key: string): void,
addRelay(url: string, opts?: RelayPolicy): Relay,
removeRelay(url:string):void,
getRelayList():Relay[],
relayChangePolicy():Relay,
sub(opts: SubscriptionOptions, id?: string): Subscription,
publish(event: Event, cb: PoolPublishCallback): Promise<Event>,
close: () => void,