feat: add subscribeToUpdates method

This commit is contained in:
Derrick Hammer 2023-10-08 23:39:12 -04:00
parent 3564a0f7b9
commit dc51de20a7
Signed by: pcfreak30
GPG Key ID: C997C339BE476FF2
1 changed files with 5 additions and 0 deletions

View File

@ -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<NetworkRegistryClient>(