From dc51de20a7b6003085b97ff72d5a1c9e868210ba Mon Sep 17 00:00:00 2001 From: Derrick Hammer Date: Sun, 8 Oct 2023 23:39:12 -0400 Subject: [PATCH] feat: add subscribeToUpdates method --- src/index.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/index.ts b/src/index.ts index e2e6507..e0a3740 100644 --- a/src/index.ts +++ b/src/index.ts @@ -22,6 +22,11 @@ export class NetworkRegistryClient extends Client { public async getNetworksByType(type: string) { return this.callModuleReturn("getNetworksByType", { type }); } + public subscribeToUpdates(cb: () => void) { + const [stop] = this.connectModule("subscribeToUpdates", undefined, cb); + + return stop; + } } export const createClient = factory(