*add ready api method

This commit is contained in:
Derrick Hammer 2023-03-27 08:17:36 -04:00
parent 246ed98628
commit af1c52d5b4
Signed by: pcfreak30
GPG Key ID: C997C339BE476FF2
1 changed files with 7 additions and 0 deletions

View File

@ -21,6 +21,7 @@ let client: Client;
let rpc: RpcNetwork; let rpc: RpcNetwork;
addHandler("presentSeed", handlePresentSeed); addHandler("presentSeed", handlePresentSeed);
addHandler("ready", handleReady);
[ [
"eth_getBalance", "eth_getBalance",
@ -205,6 +206,12 @@ async function setup() {
await client.sync(); await client.sync();
} }
async function handleReady(aq:ActiveQuery){
await moduleReady;
aq.respond();
}
function mapToObj(map: Map<any, any> | undefined): Object | undefined { function mapToObj(map: Map<any, any> | undefined): Object | undefined {
if (!map) return undefined; if (!map) return undefined;