diff --git a/src/index.ts b/src/index.ts index fe247b2..db3c46f 100644 --- a/src/index.ts +++ b/src/index.ts @@ -49,6 +49,10 @@ export class SwarmClient extends Client { public async getRelays(): Promise { return this.callModuleReturn("getRelays", { swarm: this.swarm }); } + + join(topic: Buffer): void { + this.callModule("join", { id: this.id, topic }); + } } export class Socket extends Client { @@ -100,10 +104,6 @@ export class Socket extends Client { ); } - join(topic: Buffer): void { - this.callModule("join", { id: this.id, topic }); - } - private ensureEvent(event: string): void { if (!(event in this.eventUpdates)) { this.eventUpdates[event] = [];