From 0cbb09b247cd5e12bd196ee16eb18f0b44e8e520 Mon Sep 17 00:00:00 2001 From: Derrick Hammer Date: Sat, 24 Jun 2023 03:34:53 -0400 Subject: [PATCH] fix: need to setup wasm state before calling getNextBytes --- src/verify.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/verify.ts b/src/verify.ts index 17e2a3e..ddc7a72 100644 --- a/src/verify.ts +++ b/src/verify.ts @@ -44,11 +44,11 @@ export async function getVerifiableStream( }); }; - await getNextBytes(); // @ts-ignore const wasmId = callExports("start"); getWasmProperty(wasmId, "set_root")(root); getWasmProperty(wasmId, "set_proof")(proof); + await getNextBytes(); return new ReadableStream({ async pull(controller) {