*Add addRelay interface method

This commit is contained in:
Derrick Hammer 2022-07-19 22:58:40 -04:00
parent 9b4ac8ff93
commit afc332b75e
1 changed files with 70 additions and 63 deletions

View File

@ -35,6 +35,13 @@ export class DHT {
async ready(): Promise<ErrTuple> {
return callModule(DHT_MODULE, "ready");
}
public async addRelay(pubkey: string): Promise<void> {
const [, err] = await callModule(DHT_MODULE, "addRelay", { pubkey });
if (err) {
throw err;
}
}
}
export class Socket extends EventEmitter {