*Add public api methods from hyperswarm

This commit is contained in:
Derrick Hammer 2023-02-01 13:45:21 -05:00
parent 511185e921
commit 5bdbf77971
Signed by: pcfreak30
GPG Key ID: C997C339BE476FF2
1 changed files with 25 additions and 0 deletions

View File

@ -197,4 +197,29 @@ export default class HyperswarmWeb extends EventEmitter {
this._queuedEmActions = []; this._queuedEmActions = [];
} }
public join(topic: Uint8Array, opts = {}) {
return this._activeRelay?.join(topic, opts);
}
public joinPeer(publicKey: Uint8Array) {
return this._activeRelay?.joinPeer(publicKey);
}
public leave(topic: Uint8Array) {
return this._activeRelay?.leave(topic);
}
public leavePeer(publicKey: Uint8Array) {
return this._activeRelay?.leavePeer(publicKey);
}
public status(publicKey: Uint8Array) {
return this._activeRelay?.status(publicKey);
}
public topics(): string[] {
return this._activeRelay?.topics();
}
public async flush(): Promise<any> {
return this._activeRelay?.flush();
}
public async clear(): Promise<any> {
return this._activeRelay?.clear();
}
} }