From f60d29b95a15e42539190dd8dd797e24646ab608 Mon Sep 17 00:00:00 2001 From: Derrick Hammer Date: Fri, 19 Aug 2022 11:21:13 -0400 Subject: [PATCH] *Update dist --- dist/index.js | 4 ++++ dist/resolverRegistry.d.ts | 1 + dist/resolverRegistry.js | 7 +++++++ 3 files changed, 12 insertions(+) diff --git a/dist/index.js b/dist/index.js index c67fa5e..de49c4b 100644 --- a/dist/index.js +++ b/dist/index.js @@ -4,6 +4,7 @@ let resolver; export function setup(rm) { addHandler("resolve", handleResolve); addHandler("register", handleRegister); + addHandler("getSupportedTlds", handleGetSupportedTlds); onmessage = handleMessage; resolver = rm; } @@ -30,4 +31,7 @@ async function handleResolve(aq) { } aq.respond(ret); } +function handleGetSupportedTlds(aq) { + aq.respond(resolver.getSupportedTlds()); +} export * from "./resolverRegistry.js"; diff --git a/dist/resolverRegistry.d.ts b/dist/resolverRegistry.d.ts index 5d57b64..dcbc0a9 100644 --- a/dist/resolverRegistry.d.ts +++ b/dist/resolverRegistry.d.ts @@ -20,5 +20,6 @@ export declare class ResolverModule { options: ResolverOptions, bypassCache: boolean ): Promise; + getSupportedTlds(): Promise; } export { RpcNetwork }; diff --git a/dist/resolverRegistry.js b/dist/resolverRegistry.js index 964a0e2..84091ba 100644 --- a/dist/resolverRegistry.js +++ b/dist/resolverRegistry.js @@ -48,5 +48,12 @@ export class ResolverModule { } return ret; } + async getSupportedTlds() { + const [ret, err] = await callModule(this.domain, "getSupportedTlds"); + if (err) { + throw new Error(err); + } + return ret; + } } export { RpcNetwork };