fix: ensure root and proof are Uint8Array's
This commit is contained in:
parent
0cbb09b247
commit
0c320f992b
|
@ -12,6 +12,13 @@ export async function getVerifiableStream(
|
|||
const reader = new VariableChunkStream(data);
|
||||
let bytesToRead;
|
||||
|
||||
if (root instanceof ArrayBuffer) {
|
||||
root = new Uint8Array(root);
|
||||
}
|
||||
if (proof instanceof ArrayBuffer) {
|
||||
proof = new Uint8Array(proof);
|
||||
}
|
||||
|
||||
const getNextBytes = async () => {
|
||||
bytesToRead = getWasmProperty(wasmId, "write_promise");
|
||||
bytesToRead = await bytesToRead;
|
||||
|
|
Loading…
Reference in New Issue