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);
|
const reader = new VariableChunkStream(data);
|
||||||
let bytesToRead;
|
let bytesToRead;
|
||||||
|
|
||||||
|
if (root instanceof ArrayBuffer) {
|
||||||
|
root = new Uint8Array(root);
|
||||||
|
}
|
||||||
|
if (proof instanceof ArrayBuffer) {
|
||||||
|
proof = new Uint8Array(proof);
|
||||||
|
}
|
||||||
|
|
||||||
const getNextBytes = async () => {
|
const getNextBytes = async () => {
|
||||||
bytesToRead = getWasmProperty(wasmId, "write_promise");
|
bytesToRead = getWasmProperty(wasmId, "write_promise");
|
||||||
bytesToRead = await bytesToRead;
|
bytesToRead = await bytesToRead;
|
||||||
|
|
Loading…
Reference in New Issue