*Add removeRelay and clearRelays API methods
This commit is contained in:
parent
2c41826632
commit
179bef1f9f
11
src/index.ts
11
src/index.ts
|
@ -42,6 +42,17 @@ export class DHT {
|
|||
throw new Error(err);
|
||||
}
|
||||
}
|
||||
|
||||
public async removeRelay(pubkey: string): Promise<void> {
|
||||
const [, err] = await callModule(DHT_MODULE, "removeRelay", {pubkey});
|
||||
if (err) {
|
||||
throw new Error(err);
|
||||
}
|
||||
}
|
||||
|
||||
public async clearRelays(): Promise<void> {
|
||||
await callModule(DHT_MODULE, "clearRelays");
|
||||
}
|
||||
}
|
||||
|
||||
export class Socket extends EventEmitter {
|
||||
|
|
Loading…
Reference in New Issue