*Add addRelay interface method
This commit is contained in:
parent
9b4ac8ff93
commit
afc332b75e
|
@ -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 {
|
||||
|
|
Loading…
Reference in New Issue