From 4359c590ba26300439a8cbff5d376b4a37fc0fc6 Mon Sep 17 00:00:00 2001 From: Derrick Hammer Date: Wed, 1 Feb 2023 08:47:19 -0500 Subject: [PATCH] *Add init method --- src/index.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/index.ts b/src/index.ts index 7e196e0..6cc37bb 100644 --- a/src/index.ts +++ b/src/index.ts @@ -28,9 +28,10 @@ export class SwarmClient extends Client { return createSocket(resp.id); } - + async init(): Promise { + return this.callModuleReturn("init", { swarm: this.swarm }); + } async ready(): Promise { - const dht = !this.useDefaultSwarm ? this.id : undefined; return this.callModuleReturn("ready", { swarm: this.swarm }); }