From af1c52d5b418290373a4eb656b7f56263e198def Mon Sep 17 00:00:00 2001 From: Derrick Hammer Date: Mon, 27 Mar 2023 08:17:36 -0400 Subject: [PATCH] *add ready api method --- src/index.ts | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/index.ts b/src/index.ts index fdcd32b..7ff725e 100644 --- a/src/index.ts +++ b/src/index.ts @@ -21,6 +21,7 @@ let client: Client; let rpc: RpcNetwork; addHandler("presentSeed", handlePresentSeed); +addHandler("ready", handleReady); [ "eth_getBalance", @@ -205,6 +206,12 @@ async function setup() { await client.sync(); } +async function handleReady(aq:ActiveQuery){ + await moduleReady; + + aq.respond(); +} + function mapToObj(map: Map | undefined): Object | undefined { if (!map) return undefined;