@noir-lang/acvm_js 0.46.0 → 0.47.0-03e25b4.nightly
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/nodejs/acvm_js.d.ts +95 -112
- package/nodejs/acvm_js.js +194 -645
- package/nodejs/acvm_js_bg.wasm +0 -0
- package/nodejs/acvm_js_bg.wasm.d.ts +10 -16
- package/package.json +1 -1
- package/web/acvm_js.d.ts +105 -128
- package/web/acvm_js.js +214 -601
- package/web/acvm_js_bg.wasm +0 -0
- package/web/acvm_js_bg.wasm.d.ts +10 -16
package/web/acvm_js.js
CHANGED
|
@@ -20,6 +20,15 @@ function takeObject(idx) {
|
|
|
20
20
|
return ret;
|
|
21
21
|
}
|
|
22
22
|
|
|
23
|
+
function addHeapObject(obj) {
|
|
24
|
+
if (heap_next === heap.length) heap.push(heap.length + 1);
|
|
25
|
+
const idx = heap_next;
|
|
26
|
+
heap_next = heap[idx];
|
|
27
|
+
|
|
28
|
+
heap[idx] = obj;
|
|
29
|
+
return idx;
|
|
30
|
+
}
|
|
31
|
+
|
|
23
32
|
const cachedTextDecoder = (typeof TextDecoder !== 'undefined' ? new TextDecoder('utf-8', { ignoreBOM: true, fatal: true }) : { decode: () => { throw Error('TextDecoder not available') } } );
|
|
24
33
|
|
|
25
34
|
if (typeof TextDecoder !== 'undefined') { cachedTextDecoder.decode(); };
|
|
@@ -38,15 +47,6 @@ function getStringFromWasm0(ptr, len) {
|
|
|
38
47
|
return cachedTextDecoder.decode(getUint8Memory0().subarray(ptr, ptr + len));
|
|
39
48
|
}
|
|
40
49
|
|
|
41
|
-
function addHeapObject(obj) {
|
|
42
|
-
if (heap_next === heap.length) heap.push(heap.length + 1);
|
|
43
|
-
const idx = heap_next;
|
|
44
|
-
heap_next = heap[idx];
|
|
45
|
-
|
|
46
|
-
heap[idx] = obj;
|
|
47
|
-
return idx;
|
|
48
|
-
}
|
|
49
|
-
|
|
50
50
|
let WASM_VECTOR_LEN = 0;
|
|
51
51
|
|
|
52
52
|
const cachedTextEncoder = (typeof TextEncoder !== 'undefined' ? new TextEncoder('utf-8') : { encode: () => { throw Error('TextEncoder not available') } } );
|
|
@@ -124,15 +124,6 @@ function getFloat64Memory0() {
|
|
|
124
124
|
return cachedFloat64Memory0;
|
|
125
125
|
}
|
|
126
126
|
|
|
127
|
-
let cachedBigInt64Memory0 = null;
|
|
128
|
-
|
|
129
|
-
function getBigInt64Memory0() {
|
|
130
|
-
if (cachedBigInt64Memory0 === null || cachedBigInt64Memory0.byteLength === 0) {
|
|
131
|
-
cachedBigInt64Memory0 = new BigInt64Array(wasm.memory.buffer);
|
|
132
|
-
}
|
|
133
|
-
return cachedBigInt64Memory0;
|
|
134
|
-
}
|
|
135
|
-
|
|
136
127
|
function debugString(val) {
|
|
137
128
|
// primitive types
|
|
138
129
|
const type = typeof val;
|
|
@@ -222,8 +213,8 @@ function makeMutClosure(arg0, arg1, dtor, f) {
|
|
|
222
213
|
|
|
223
214
|
return real;
|
|
224
215
|
}
|
|
225
|
-
function
|
|
226
|
-
wasm.
|
|
216
|
+
function __wbg_adapter_22(arg0, arg1, arg2) {
|
|
217
|
+
wasm._dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h36bac5ff3ea3c380(arg0, arg1, addHeapObject(arg2));
|
|
227
218
|
}
|
|
228
219
|
|
|
229
220
|
/**
|
|
@@ -247,15 +238,142 @@ export function initLogLevel(filter) {
|
|
|
247
238
|
}
|
|
248
239
|
}
|
|
249
240
|
|
|
241
|
+
function passArray8ToWasm0(arg, malloc) {
|
|
242
|
+
const ptr = malloc(arg.length * 1) >>> 0;
|
|
243
|
+
getUint8Memory0().set(arg, ptr / 1);
|
|
244
|
+
WASM_VECTOR_LEN = arg.length;
|
|
245
|
+
return ptr;
|
|
246
|
+
}
|
|
250
247
|
/**
|
|
251
|
-
*
|
|
252
|
-
*
|
|
248
|
+
* Executes an ACIR circuit to generate the solved witness from the initial witness.
|
|
249
|
+
*
|
|
250
|
+
* @param {Uint8Array} circuit - A serialized representation of an ACIR circuit
|
|
251
|
+
* @param {WitnessMap} initial_witness - The initial witness map defining all of the inputs to `circuit`..
|
|
252
|
+
* @param {ForeignCallHandler} foreign_call_handler - A callback to process any foreign calls from the circuit.
|
|
253
|
+
* @returns {WitnessMap} The solved witness calculated by executing the circuit on the provided inputs.
|
|
253
254
|
*/
|
|
254
|
-
export function
|
|
255
|
-
const
|
|
255
|
+
export function executeCircuit(program, initial_witness, foreign_call_handler) {
|
|
256
|
+
const ptr0 = passArray8ToWasm0(program, wasm.__wbindgen_malloc);
|
|
257
|
+
const len0 = WASM_VECTOR_LEN;
|
|
258
|
+
const ret = wasm.executeCircuit(ptr0, len0, addHeapObject(initial_witness), addHeapObject(foreign_call_handler));
|
|
259
|
+
return takeObject(ret);
|
|
260
|
+
}
|
|
261
|
+
|
|
262
|
+
/**
|
|
263
|
+
* Executes an ACIR circuit to generate the solved witness from the initial witness.
|
|
264
|
+
* This method also extracts the public return values from the solved witness into its own return witness.
|
|
265
|
+
*
|
|
266
|
+
* @param {Uint8Array} circuit - A serialized representation of an ACIR circuit
|
|
267
|
+
* @param {WitnessMap} initial_witness - The initial witness map defining all of the inputs to `circuit`..
|
|
268
|
+
* @param {ForeignCallHandler} foreign_call_handler - A callback to process any foreign calls from the circuit.
|
|
269
|
+
* @returns {SolvedAndReturnWitness} The solved witness calculated by executing the circuit on the provided inputs, as well as the return witness indices as specified by the circuit.
|
|
270
|
+
*/
|
|
271
|
+
export function executeCircuitWithReturnWitness(program, initial_witness, foreign_call_handler) {
|
|
272
|
+
const ptr0 = passArray8ToWasm0(program, wasm.__wbindgen_malloc);
|
|
273
|
+
const len0 = WASM_VECTOR_LEN;
|
|
274
|
+
const ret = wasm.executeCircuitWithReturnWitness(ptr0, len0, addHeapObject(initial_witness), addHeapObject(foreign_call_handler));
|
|
275
|
+
return takeObject(ret);
|
|
276
|
+
}
|
|
277
|
+
|
|
278
|
+
/**
|
|
279
|
+
* Executes an ACIR circuit to generate the solved witness from the initial witness.
|
|
280
|
+
*
|
|
281
|
+
* @param {Uint8Array} program - A serialized representation of an ACIR program
|
|
282
|
+
* @param {WitnessMap} initial_witness - The initial witness map defining all of the inputs to `program`.
|
|
283
|
+
* @param {ForeignCallHandler} foreign_call_handler - A callback to process any foreign calls from the program.
|
|
284
|
+
* @returns {WitnessStack} The solved witness calculated by executing the program on the provided inputs.
|
|
285
|
+
*/
|
|
286
|
+
export function executeProgram(program, initial_witness, foreign_call_handler) {
|
|
287
|
+
const ptr0 = passArray8ToWasm0(program, wasm.__wbindgen_malloc);
|
|
288
|
+
const len0 = WASM_VECTOR_LEN;
|
|
289
|
+
const ret = wasm.executeProgram(ptr0, len0, addHeapObject(initial_witness), addHeapObject(foreign_call_handler));
|
|
256
290
|
return takeObject(ret);
|
|
257
291
|
}
|
|
258
292
|
|
|
293
|
+
/**
|
|
294
|
+
* Extracts a `WitnessMap` containing the witness indices corresponding to the circuit's return values.
|
|
295
|
+
*
|
|
296
|
+
* @param {Uint8Array} circuit - A serialized representation of an ACIR circuit
|
|
297
|
+
* @param {WitnessMap} witness_map - The completed witness map after executing the circuit.
|
|
298
|
+
* @returns {WitnessMap} A witness map containing the circuit's return values.
|
|
299
|
+
* @param {Uint8Array} program
|
|
300
|
+
* @param {WitnessMap} witness_map
|
|
301
|
+
* @returns {WitnessMap}
|
|
302
|
+
*/
|
|
303
|
+
export function getReturnWitness(program, witness_map) {
|
|
304
|
+
try {
|
|
305
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
306
|
+
const ptr0 = passArray8ToWasm0(program, wasm.__wbindgen_malloc);
|
|
307
|
+
const len0 = WASM_VECTOR_LEN;
|
|
308
|
+
wasm.getReturnWitness(retptr, ptr0, len0, addHeapObject(witness_map));
|
|
309
|
+
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
310
|
+
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
311
|
+
var r2 = getInt32Memory0()[retptr / 4 + 2];
|
|
312
|
+
if (r2) {
|
|
313
|
+
throw takeObject(r1);
|
|
314
|
+
}
|
|
315
|
+
return takeObject(r0);
|
|
316
|
+
} finally {
|
|
317
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
318
|
+
}
|
|
319
|
+
}
|
|
320
|
+
|
|
321
|
+
/**
|
|
322
|
+
* Extracts a `WitnessMap` containing the witness indices corresponding to the circuit's public parameters.
|
|
323
|
+
*
|
|
324
|
+
* @param {Uint8Array} circuit - A serialized representation of an ACIR circuit
|
|
325
|
+
* @param {WitnessMap} witness_map - The completed witness map after executing the circuit.
|
|
326
|
+
* @returns {WitnessMap} A witness map containing the circuit's public parameters.
|
|
327
|
+
* @param {Uint8Array} program
|
|
328
|
+
* @param {WitnessMap} solved_witness
|
|
329
|
+
* @returns {WitnessMap}
|
|
330
|
+
*/
|
|
331
|
+
export function getPublicParametersWitness(program, solved_witness) {
|
|
332
|
+
try {
|
|
333
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
334
|
+
const ptr0 = passArray8ToWasm0(program, wasm.__wbindgen_malloc);
|
|
335
|
+
const len0 = WASM_VECTOR_LEN;
|
|
336
|
+
wasm.getPublicParametersWitness(retptr, ptr0, len0, addHeapObject(solved_witness));
|
|
337
|
+
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
338
|
+
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
339
|
+
var r2 = getInt32Memory0()[retptr / 4 + 2];
|
|
340
|
+
if (r2) {
|
|
341
|
+
throw takeObject(r1);
|
|
342
|
+
}
|
|
343
|
+
return takeObject(r0);
|
|
344
|
+
} finally {
|
|
345
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
346
|
+
}
|
|
347
|
+
}
|
|
348
|
+
|
|
349
|
+
/**
|
|
350
|
+
* Extracts a `WitnessMap` containing the witness indices corresponding to the circuit's public inputs.
|
|
351
|
+
*
|
|
352
|
+
* @param {Uint8Array} circuit - A serialized representation of an ACIR circuit
|
|
353
|
+
* @param {WitnessMap} witness_map - The completed witness map after executing the circuit.
|
|
354
|
+
* @returns {WitnessMap} A witness map containing the circuit's public inputs.
|
|
355
|
+
* @param {Uint8Array} program
|
|
356
|
+
* @param {WitnessMap} solved_witness
|
|
357
|
+
* @returns {WitnessMap}
|
|
358
|
+
*/
|
|
359
|
+
export function getPublicWitness(program, solved_witness) {
|
|
360
|
+
try {
|
|
361
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
362
|
+
const ptr0 = passArray8ToWasm0(program, wasm.__wbindgen_malloc);
|
|
363
|
+
const len0 = WASM_VECTOR_LEN;
|
|
364
|
+
wasm.getPublicWitness(retptr, ptr0, len0, addHeapObject(solved_witness));
|
|
365
|
+
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
366
|
+
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
367
|
+
var r2 = getInt32Memory0()[retptr / 4 + 2];
|
|
368
|
+
if (r2) {
|
|
369
|
+
throw takeObject(r1);
|
|
370
|
+
}
|
|
371
|
+
return takeObject(r0);
|
|
372
|
+
} finally {
|
|
373
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
374
|
+
}
|
|
375
|
+
}
|
|
376
|
+
|
|
259
377
|
/**
|
|
260
378
|
* Performs a bitwise AND operation between `lhs` and `rhs`
|
|
261
379
|
* @param {string} lhs
|
|
@@ -278,13 +396,6 @@ export function xor(lhs, rhs) {
|
|
|
278
396
|
return takeObject(ret);
|
|
279
397
|
}
|
|
280
398
|
|
|
281
|
-
function passArray8ToWasm0(arg, malloc) {
|
|
282
|
-
const ptr = malloc(arg.length * 1) >>> 0;
|
|
283
|
-
getUint8Memory0().set(arg, ptr / 1);
|
|
284
|
-
WASM_VECTOR_LEN = arg.length;
|
|
285
|
-
return ptr;
|
|
286
|
-
}
|
|
287
|
-
|
|
288
399
|
function getArrayU8FromWasm0(ptr, len) {
|
|
289
400
|
ptr = ptr >>> 0;
|
|
290
401
|
return getUint8Memory0().subarray(ptr / 1, ptr / 1 + len);
|
|
@@ -394,6 +505,15 @@ export function ecdsa_secp256r1_verify(hashed_msg, public_key_x_bytes, public_ke
|
|
|
394
505
|
return ret !== 0;
|
|
395
506
|
}
|
|
396
507
|
|
|
508
|
+
/**
|
|
509
|
+
* Returns the `BuildInfo` object containing information about how the installed package was built.
|
|
510
|
+
* @returns {BuildInfo} - Information on how the installed package was built.
|
|
511
|
+
*/
|
|
512
|
+
export function buildInfo() {
|
|
513
|
+
const ret = wasm.buildInfo();
|
|
514
|
+
return takeObject(ret);
|
|
515
|
+
}
|
|
516
|
+
|
|
397
517
|
/**
|
|
398
518
|
* Compresses a `WitnessMap` into the binary format outputted by Nargo.
|
|
399
519
|
*
|
|
@@ -493,266 +613,50 @@ export function decompressWitnessStack(compressed_witness) {
|
|
|
493
613
|
}
|
|
494
614
|
}
|
|
495
615
|
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
*/
|
|
499
|
-
export function createBlackBoxSolver() {
|
|
500
|
-
const ret = wasm.createBlackBoxSolver();
|
|
501
|
-
return takeObject(ret);
|
|
502
|
-
}
|
|
503
|
-
|
|
504
|
-
/**
|
|
505
|
-
* Executes an ACIR circuit to generate the solved witness from the initial witness.
|
|
506
|
-
*
|
|
507
|
-
* @param {Uint8Array} circuit - A serialized representation of an ACIR circuit
|
|
508
|
-
* @param {WitnessMap} initial_witness - The initial witness map defining all of the inputs to `circuit`..
|
|
509
|
-
* @param {ForeignCallHandler} foreign_call_handler - A callback to process any foreign calls from the circuit.
|
|
510
|
-
* @returns {WitnessMap} The solved witness calculated by executing the circuit on the provided inputs.
|
|
511
|
-
*/
|
|
512
|
-
export function executeCircuit(program, initial_witness, foreign_call_handler) {
|
|
513
|
-
const ptr0 = passArray8ToWasm0(program, wasm.__wbindgen_malloc);
|
|
514
|
-
const len0 = WASM_VECTOR_LEN;
|
|
515
|
-
const ret = wasm.executeCircuit(ptr0, len0, addHeapObject(initial_witness), addHeapObject(foreign_call_handler));
|
|
516
|
-
return takeObject(ret);
|
|
616
|
+
function __wbg_adapter_76(arg0, arg1, arg2, arg3, arg4) {
|
|
617
|
+
wasm.wasm_bindgen__convert__closures__invoke3_mut__h629417323d5efbaa(arg0, arg1, addHeapObject(arg2), arg3, addHeapObject(arg4));
|
|
517
618
|
}
|
|
518
619
|
|
|
519
|
-
function
|
|
520
|
-
|
|
521
|
-
|
|
620
|
+
function handleError(f, args) {
|
|
621
|
+
try {
|
|
622
|
+
return f.apply(this, args);
|
|
623
|
+
} catch (e) {
|
|
624
|
+
wasm.__wbindgen_exn_store(addHeapObject(e));
|
|
522
625
|
}
|
|
523
|
-
return instance.ptr;
|
|
524
626
|
}
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
* This method also extracts the public return values from the solved witness into its own return witness.
|
|
528
|
-
*
|
|
529
|
-
* @param {&WasmBlackBoxFunctionSolver} solver - A black box solver.
|
|
530
|
-
* @param {Uint8Array} circuit - A serialized representation of an ACIR circuit
|
|
531
|
-
* @param {WitnessMap} initial_witness - The initial witness map defining all of the inputs to `circuit`..
|
|
532
|
-
* @param {ForeignCallHandler} foreign_call_handler - A callback to process any foreign calls from the circuit.
|
|
533
|
-
* @returns {SolvedAndReturnWitness} The solved witness calculated by executing the circuit on the provided inputs, as well as the return witness indices as specified by the circuit.
|
|
534
|
-
*/
|
|
535
|
-
export function executeCircuitWithReturnWitness(solver, program, initial_witness, foreign_call_handler) {
|
|
536
|
-
_assertClass(solver, WasmBlackBoxFunctionSolver);
|
|
537
|
-
const ptr0 = passArray8ToWasm0(program, wasm.__wbindgen_malloc);
|
|
538
|
-
const len0 = WASM_VECTOR_LEN;
|
|
539
|
-
const ret = wasm.executeCircuitWithReturnWitness(solver.__wbg_ptr, ptr0, len0, addHeapObject(initial_witness), addHeapObject(foreign_call_handler));
|
|
540
|
-
return takeObject(ret);
|
|
627
|
+
function __wbg_adapter_93(arg0, arg1, arg2, arg3) {
|
|
628
|
+
wasm.wasm_bindgen__convert__closures__invoke2_mut__h4efdd1050cfb3ea7(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
|
|
541
629
|
}
|
|
542
630
|
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
* @param {WitnessMap} initial_witness - The initial witness map defining all of the inputs to `circuit`..
|
|
549
|
-
* @param {ForeignCallHandler} foreign_call_handler - A callback to process any foreign calls from the circuit.
|
|
550
|
-
* @returns {WitnessMap} The solved witness calculated by executing the circuit on the provided inputs.
|
|
551
|
-
*/
|
|
552
|
-
export function executeCircuitWithBlackBoxSolver(solver, program, initial_witness, foreign_call_handler) {
|
|
553
|
-
_assertClass(solver, WasmBlackBoxFunctionSolver);
|
|
554
|
-
const ptr0 = passArray8ToWasm0(program, wasm.__wbindgen_malloc);
|
|
555
|
-
const len0 = WASM_VECTOR_LEN;
|
|
556
|
-
const ret = wasm.executeCircuitWithBlackBoxSolver(solver.__wbg_ptr, ptr0, len0, addHeapObject(initial_witness), addHeapObject(foreign_call_handler));
|
|
557
|
-
return takeObject(ret);
|
|
558
|
-
}
|
|
631
|
+
async function __wbg_load(module, imports) {
|
|
632
|
+
if (typeof Response === 'function' && module instanceof Response) {
|
|
633
|
+
if (typeof WebAssembly.instantiateStreaming === 'function') {
|
|
634
|
+
try {
|
|
635
|
+
return await WebAssembly.instantiateStreaming(module, imports);
|
|
559
636
|
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
const ptr0 = passArray8ToWasm0(program, wasm.__wbindgen_malloc);
|
|
564
|
-
const len0 = WASM_VECTOR_LEN;
|
|
565
|
-
const ret = wasm.executeProgram(ptr0, len0, addHeapObject(initial_witness), addHeapObject(foreign_call_handler));
|
|
566
|
-
return takeObject(ret);
|
|
567
|
-
}
|
|
637
|
+
} catch (e) {
|
|
638
|
+
if (module.headers.get('Content-Type') != 'application/wasm') {
|
|
639
|
+
console.warn("`WebAssembly.instantiateStreaming` failed because your server does not serve wasm with `application/wasm` MIME type. Falling back to `WebAssembly.instantiate` which is slower. Original error:\n", e);
|
|
568
640
|
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
*/
|
|
589
|
-
export function getReturnWitness(program, witness_map) {
|
|
590
|
-
try {
|
|
591
|
-
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
592
|
-
const ptr0 = passArray8ToWasm0(program, wasm.__wbindgen_malloc);
|
|
593
|
-
const len0 = WASM_VECTOR_LEN;
|
|
594
|
-
wasm.getReturnWitness(retptr, ptr0, len0, addHeapObject(witness_map));
|
|
595
|
-
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
596
|
-
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
597
|
-
var r2 = getInt32Memory0()[retptr / 4 + 2];
|
|
598
|
-
if (r2) {
|
|
599
|
-
throw takeObject(r1);
|
|
600
|
-
}
|
|
601
|
-
return takeObject(r0);
|
|
602
|
-
} finally {
|
|
603
|
-
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
604
|
-
}
|
|
605
|
-
}
|
|
606
|
-
|
|
607
|
-
/**
|
|
608
|
-
* Extracts a `WitnessMap` containing the witness indices corresponding to the circuit's public parameters.
|
|
609
|
-
*
|
|
610
|
-
* @param {Uint8Array} circuit - A serialized representation of an ACIR circuit
|
|
611
|
-
* @param {WitnessMap} witness_map - The completed witness map after executing the circuit.
|
|
612
|
-
* @returns {WitnessMap} A witness map containing the circuit's public parameters.
|
|
613
|
-
* @param {Uint8Array} program
|
|
614
|
-
* @param {WitnessMap} solved_witness
|
|
615
|
-
* @returns {WitnessMap}
|
|
616
|
-
*/
|
|
617
|
-
export function getPublicParametersWitness(program, solved_witness) {
|
|
618
|
-
try {
|
|
619
|
-
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
620
|
-
const ptr0 = passArray8ToWasm0(program, wasm.__wbindgen_malloc);
|
|
621
|
-
const len0 = WASM_VECTOR_LEN;
|
|
622
|
-
wasm.getPublicParametersWitness(retptr, ptr0, len0, addHeapObject(solved_witness));
|
|
623
|
-
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
624
|
-
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
625
|
-
var r2 = getInt32Memory0()[retptr / 4 + 2];
|
|
626
|
-
if (r2) {
|
|
627
|
-
throw takeObject(r1);
|
|
628
|
-
}
|
|
629
|
-
return takeObject(r0);
|
|
630
|
-
} finally {
|
|
631
|
-
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
632
|
-
}
|
|
633
|
-
}
|
|
634
|
-
|
|
635
|
-
/**
|
|
636
|
-
* Extracts a `WitnessMap` containing the witness indices corresponding to the circuit's public inputs.
|
|
637
|
-
*
|
|
638
|
-
* @param {Uint8Array} circuit - A serialized representation of an ACIR circuit
|
|
639
|
-
* @param {WitnessMap} witness_map - The completed witness map after executing the circuit.
|
|
640
|
-
* @returns {WitnessMap} A witness map containing the circuit's public inputs.
|
|
641
|
-
* @param {Uint8Array} program
|
|
642
|
-
* @param {WitnessMap} solved_witness
|
|
643
|
-
* @returns {WitnessMap}
|
|
644
|
-
*/
|
|
645
|
-
export function getPublicWitness(program, solved_witness) {
|
|
646
|
-
try {
|
|
647
|
-
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
648
|
-
const ptr0 = passArray8ToWasm0(program, wasm.__wbindgen_malloc);
|
|
649
|
-
const len0 = WASM_VECTOR_LEN;
|
|
650
|
-
wasm.getPublicWitness(retptr, ptr0, len0, addHeapObject(solved_witness));
|
|
651
|
-
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
652
|
-
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
653
|
-
var r2 = getInt32Memory0()[retptr / 4 + 2];
|
|
654
|
-
if (r2) {
|
|
655
|
-
throw takeObject(r1);
|
|
656
|
-
}
|
|
657
|
-
return takeObject(r0);
|
|
658
|
-
} finally {
|
|
659
|
-
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
660
|
-
}
|
|
661
|
-
}
|
|
662
|
-
|
|
663
|
-
function handleError(f, args) {
|
|
664
|
-
try {
|
|
665
|
-
return f.apply(this, args);
|
|
666
|
-
} catch (e) {
|
|
667
|
-
wasm.__wbindgen_exn_store(addHeapObject(e));
|
|
668
|
-
}
|
|
669
|
-
}
|
|
670
|
-
function __wbg_adapter_134(arg0, arg1, arg2, arg3, arg4) {
|
|
671
|
-
wasm.wasm_bindgen__convert__closures__invoke3_mut__h1e7d8ac96c74bd35(arg0, arg1, addHeapObject(arg2), arg3, addHeapObject(arg4));
|
|
672
|
-
}
|
|
673
|
-
|
|
674
|
-
function __wbg_adapter_171(arg0, arg1, arg2, arg3) {
|
|
675
|
-
wasm.wasm_bindgen__convert__closures__invoke2_mut__h188e918906ff9a40(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
|
|
676
|
-
}
|
|
677
|
-
|
|
678
|
-
/**
|
|
679
|
-
* A struct representing a Trap
|
|
680
|
-
*/
|
|
681
|
-
export class Trap {
|
|
682
|
-
|
|
683
|
-
__destroy_into_raw() {
|
|
684
|
-
const ptr = this.__wbg_ptr;
|
|
685
|
-
this.__wbg_ptr = 0;
|
|
686
|
-
|
|
687
|
-
return ptr;
|
|
688
|
-
}
|
|
689
|
-
|
|
690
|
-
free() {
|
|
691
|
-
const ptr = this.__destroy_into_raw();
|
|
692
|
-
wasm.__wbg_trap_free(ptr);
|
|
693
|
-
}
|
|
694
|
-
/**
|
|
695
|
-
* A marker method to indicate that an object is an instance of the `Trap`
|
|
696
|
-
* class.
|
|
697
|
-
*/
|
|
698
|
-
static __wbg_wasmer_trap() {
|
|
699
|
-
wasm.trap___wbg_wasmer_trap();
|
|
700
|
-
}
|
|
701
|
-
}
|
|
702
|
-
/**
|
|
703
|
-
*/
|
|
704
|
-
export class WasmBlackBoxFunctionSolver {
|
|
705
|
-
|
|
706
|
-
static __wrap(ptr) {
|
|
707
|
-
ptr = ptr >>> 0;
|
|
708
|
-
const obj = Object.create(WasmBlackBoxFunctionSolver.prototype);
|
|
709
|
-
obj.__wbg_ptr = ptr;
|
|
710
|
-
|
|
711
|
-
return obj;
|
|
712
|
-
}
|
|
713
|
-
|
|
714
|
-
__destroy_into_raw() {
|
|
715
|
-
const ptr = this.__wbg_ptr;
|
|
716
|
-
this.__wbg_ptr = 0;
|
|
717
|
-
|
|
718
|
-
return ptr;
|
|
719
|
-
}
|
|
720
|
-
|
|
721
|
-
free() {
|
|
722
|
-
const ptr = this.__destroy_into_raw();
|
|
723
|
-
wasm.__wbg_wasmblackboxfunctionsolver_free(ptr);
|
|
724
|
-
}
|
|
725
|
-
}
|
|
726
|
-
|
|
727
|
-
async function __wbg_load(module, imports) {
|
|
728
|
-
if (typeof Response === 'function' && module instanceof Response) {
|
|
729
|
-
if (typeof WebAssembly.instantiateStreaming === 'function') {
|
|
730
|
-
try {
|
|
731
|
-
return await WebAssembly.instantiateStreaming(module, imports);
|
|
732
|
-
|
|
733
|
-
} catch (e) {
|
|
734
|
-
if (module.headers.get('Content-Type') != 'application/wasm') {
|
|
735
|
-
console.warn("`WebAssembly.instantiateStreaming` failed because your server does not serve wasm with `application/wasm` MIME type. Falling back to `WebAssembly.instantiate` which is slower. Original error:\n", e);
|
|
736
|
-
|
|
737
|
-
} else {
|
|
738
|
-
throw e;
|
|
739
|
-
}
|
|
740
|
-
}
|
|
741
|
-
}
|
|
742
|
-
|
|
743
|
-
const bytes = await module.arrayBuffer();
|
|
744
|
-
return await WebAssembly.instantiate(bytes, imports);
|
|
745
|
-
|
|
746
|
-
} else {
|
|
747
|
-
const instance = await WebAssembly.instantiate(module, imports);
|
|
748
|
-
|
|
749
|
-
if (instance instanceof WebAssembly.Instance) {
|
|
750
|
-
return { instance, module };
|
|
751
|
-
|
|
752
|
-
} else {
|
|
753
|
-
return instance;
|
|
754
|
-
}
|
|
755
|
-
}
|
|
641
|
+
} else {
|
|
642
|
+
throw e;
|
|
643
|
+
}
|
|
644
|
+
}
|
|
645
|
+
}
|
|
646
|
+
|
|
647
|
+
const bytes = await module.arrayBuffer();
|
|
648
|
+
return await WebAssembly.instantiate(bytes, imports);
|
|
649
|
+
|
|
650
|
+
} else {
|
|
651
|
+
const instance = await WebAssembly.instantiate(module, imports);
|
|
652
|
+
|
|
653
|
+
if (instance instanceof WebAssembly.Instance) {
|
|
654
|
+
return { instance, module };
|
|
655
|
+
|
|
656
|
+
} else {
|
|
657
|
+
return instance;
|
|
658
|
+
}
|
|
659
|
+
}
|
|
756
660
|
}
|
|
757
661
|
|
|
758
662
|
function __wbg_get_imports() {
|
|
@@ -761,16 +665,17 @@ function __wbg_get_imports() {
|
|
|
761
665
|
imports.wbg.__wbindgen_object_drop_ref = function(arg0) {
|
|
762
666
|
takeObject(arg0);
|
|
763
667
|
};
|
|
764
|
-
imports.wbg.
|
|
765
|
-
const
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
668
|
+
imports.wbg.__wbindgen_cb_drop = function(arg0) {
|
|
669
|
+
const obj = takeObject(arg0).original;
|
|
670
|
+
if (obj.cnt-- == 1) {
|
|
671
|
+
obj.a = 0;
|
|
672
|
+
return true;
|
|
673
|
+
}
|
|
674
|
+
const ret = false;
|
|
675
|
+
return ret;
|
|
771
676
|
};
|
|
772
|
-
imports.wbg.
|
|
773
|
-
const ret = new
|
|
677
|
+
imports.wbg.__wbg_new_f139361aad331bd0 = function() {
|
|
678
|
+
const ret = new Array();
|
|
774
679
|
return addHeapObject(ret);
|
|
775
680
|
};
|
|
776
681
|
imports.wbg.__wbindgen_number_new = function(arg0) {
|
|
@@ -781,6 +686,18 @@ function __wbg_get_imports() {
|
|
|
781
686
|
const ret = getStringFromWasm0(arg0, arg1);
|
|
782
687
|
return addHeapObject(ret);
|
|
783
688
|
};
|
|
689
|
+
imports.wbg.__wbg_constructor_971e67e66cc5bd6a = function(arg0) {
|
|
690
|
+
const ret = new Error(takeObject(arg0));
|
|
691
|
+
return addHeapObject(ret);
|
|
692
|
+
};
|
|
693
|
+
imports.wbg.__wbindgen_is_array = function(arg0) {
|
|
694
|
+
const ret = Array.isArray(getObject(arg0));
|
|
695
|
+
return ret;
|
|
696
|
+
};
|
|
697
|
+
imports.wbg.__wbg_new_193bac1dd2be232d = function() {
|
|
698
|
+
const ret = new Map();
|
|
699
|
+
return addHeapObject(ret);
|
|
700
|
+
};
|
|
784
701
|
imports.wbg.__wbindgen_string_get = function(arg0, arg1) {
|
|
785
702
|
const obj = getObject(arg1);
|
|
786
703
|
const ret = typeof(obj) === 'string' ? obj : undefined;
|
|
@@ -789,45 +706,16 @@ function __wbg_get_imports() {
|
|
|
789
706
|
getInt32Memory0()[arg0 / 4 + 1] = len1;
|
|
790
707
|
getInt32Memory0()[arg0 / 4 + 0] = ptr1;
|
|
791
708
|
};
|
|
792
|
-
imports.wbg.__wbg_wasmblackboxfunctionsolver_new = function(arg0) {
|
|
793
|
-
const ret = WasmBlackBoxFunctionSolver.__wrap(arg0);
|
|
794
|
-
return addHeapObject(ret);
|
|
795
|
-
};
|
|
796
|
-
imports.wbg.__wbg_constructor_81b34c49dcbdd2af = function(arg0) {
|
|
797
|
-
const ret = new Error(takeObject(arg0));
|
|
798
|
-
return addHeapObject(ret);
|
|
799
|
-
};
|
|
800
|
-
imports.wbg.__wbindgen_cb_drop = function(arg0) {
|
|
801
|
-
const obj = takeObject(arg0).original;
|
|
802
|
-
if (obj.cnt-- == 1) {
|
|
803
|
-
obj.a = 0;
|
|
804
|
-
return true;
|
|
805
|
-
}
|
|
806
|
-
const ret = false;
|
|
807
|
-
return ret;
|
|
808
|
-
};
|
|
809
|
-
imports.wbg.__wbindgen_is_undefined = function(arg0) {
|
|
810
|
-
const ret = getObject(arg0) === undefined;
|
|
811
|
-
return ret;
|
|
812
|
-
};
|
|
813
709
|
imports.wbg.__wbindgen_number_get = function(arg0, arg1) {
|
|
814
710
|
const obj = getObject(arg1);
|
|
815
711
|
const ret = typeof(obj) === 'number' ? obj : undefined;
|
|
816
712
|
getFloat64Memory0()[arg0 / 8 + 1] = isLikeNone(ret) ? 0 : ret;
|
|
817
713
|
getInt32Memory0()[arg0 / 4 + 0] = !isLikeNone(ret);
|
|
818
714
|
};
|
|
819
|
-
imports.wbg.__wbindgen_is_array = function(arg0) {
|
|
820
|
-
const ret = Array.isArray(getObject(arg0));
|
|
821
|
-
return ret;
|
|
822
|
-
};
|
|
823
715
|
imports.wbg.__wbindgen_is_string = function(arg0) {
|
|
824
716
|
const ret = typeof(getObject(arg0)) === 'string';
|
|
825
717
|
return ret;
|
|
826
718
|
};
|
|
827
|
-
imports.wbg.__wbg_new_ee5ac63ff3b0fa4d = function() {
|
|
828
|
-
const ret = new Array();
|
|
829
|
-
return addHeapObject(ret);
|
|
830
|
-
};
|
|
831
719
|
imports.wbg.__wbg_new_abda76e883ba8a5f = function() {
|
|
832
720
|
const ret = new Error();
|
|
833
721
|
return addHeapObject(ret);
|
|
@@ -850,53 +738,6 @@ function __wbg_get_imports() {
|
|
|
850
738
|
wasm.__wbindgen_free(deferred0_0, deferred0_1);
|
|
851
739
|
}
|
|
852
740
|
};
|
|
853
|
-
imports.wbg.__wbindgen_ge = function(arg0, arg1) {
|
|
854
|
-
const ret = getObject(arg0) >= getObject(arg1);
|
|
855
|
-
return ret;
|
|
856
|
-
};
|
|
857
|
-
imports.wbg.__wbindgen_bigint_from_u64 = function(arg0) {
|
|
858
|
-
const ret = BigInt.asUintN(64, arg0);
|
|
859
|
-
return addHeapObject(ret);
|
|
860
|
-
};
|
|
861
|
-
imports.wbg.__wbindgen_shr = function(arg0, arg1) {
|
|
862
|
-
const ret = getObject(arg0) >> getObject(arg1);
|
|
863
|
-
return addHeapObject(ret);
|
|
864
|
-
};
|
|
865
|
-
imports.wbg.__wbindgen_jsval_eq = function(arg0, arg1) {
|
|
866
|
-
const ret = getObject(arg0) === getObject(arg1);
|
|
867
|
-
return ret;
|
|
868
|
-
};
|
|
869
|
-
imports.wbg.__wbindgen_is_bigint = function(arg0) {
|
|
870
|
-
const ret = typeof(getObject(arg0)) === 'bigint';
|
|
871
|
-
return ret;
|
|
872
|
-
};
|
|
873
|
-
imports.wbg.__wbindgen_bigint_from_i64 = function(arg0) {
|
|
874
|
-
const ret = arg0;
|
|
875
|
-
return addHeapObject(ret);
|
|
876
|
-
};
|
|
877
|
-
imports.wbg.__wbindgen_bigint_from_u128 = function(arg0, arg1) {
|
|
878
|
-
const ret = BigInt.asUintN(64, arg0) << BigInt(64) | BigInt.asUintN(64, arg1);
|
|
879
|
-
return addHeapObject(ret);
|
|
880
|
-
};
|
|
881
|
-
imports.wbg.__wbindgen_is_object = function(arg0) {
|
|
882
|
-
const val = getObject(arg0);
|
|
883
|
-
const ret = typeof(val) === 'object' && val !== null;
|
|
884
|
-
return ret;
|
|
885
|
-
};
|
|
886
|
-
imports.wbg.__wbindgen_is_function = function(arg0) {
|
|
887
|
-
const ret = typeof(getObject(arg0)) === 'function';
|
|
888
|
-
return ret;
|
|
889
|
-
};
|
|
890
|
-
imports.wbg.__wbg_instanceof_Global_f4b019d2b45e18ab = function(arg0) {
|
|
891
|
-
let result;
|
|
892
|
-
try {
|
|
893
|
-
result = getObject(arg0) instanceof WebAssembly.Global;
|
|
894
|
-
} catch {
|
|
895
|
-
result = false;
|
|
896
|
-
}
|
|
897
|
-
const ret = result;
|
|
898
|
-
return ret;
|
|
899
|
-
};
|
|
900
741
|
imports.wbg.__wbg_debug_e3f6a1578e6d45ca = function(arg0) {
|
|
901
742
|
console.debug(getObject(arg0));
|
|
902
743
|
};
|
|
@@ -921,36 +762,6 @@ function __wbg_get_imports() {
|
|
|
921
762
|
imports.wbg.__wbg_warn_8342bfbc6028193a = function(arg0, arg1, arg2, arg3) {
|
|
922
763
|
console.warn(getObject(arg0), getObject(arg1), getObject(arg2), getObject(arg3));
|
|
923
764
|
};
|
|
924
|
-
imports.wbg.__wbg_crypto_c48a774b022d20ac = function(arg0) {
|
|
925
|
-
const ret = getObject(arg0).crypto;
|
|
926
|
-
return addHeapObject(ret);
|
|
927
|
-
};
|
|
928
|
-
imports.wbg.__wbg_process_298734cf255a885d = function(arg0) {
|
|
929
|
-
const ret = getObject(arg0).process;
|
|
930
|
-
return addHeapObject(ret);
|
|
931
|
-
};
|
|
932
|
-
imports.wbg.__wbg_versions_e2e78e134e3e5d01 = function(arg0) {
|
|
933
|
-
const ret = getObject(arg0).versions;
|
|
934
|
-
return addHeapObject(ret);
|
|
935
|
-
};
|
|
936
|
-
imports.wbg.__wbg_node_1cd7a5d853dbea79 = function(arg0) {
|
|
937
|
-
const ret = getObject(arg0).node;
|
|
938
|
-
return addHeapObject(ret);
|
|
939
|
-
};
|
|
940
|
-
imports.wbg.__wbg_msCrypto_bcb970640f50a1e8 = function(arg0) {
|
|
941
|
-
const ret = getObject(arg0).msCrypto;
|
|
942
|
-
return addHeapObject(ret);
|
|
943
|
-
};
|
|
944
|
-
imports.wbg.__wbg_require_8f08ceecec0f4fee = function() { return handleError(function () {
|
|
945
|
-
const ret = module.require;
|
|
946
|
-
return addHeapObject(ret);
|
|
947
|
-
}, arguments) };
|
|
948
|
-
imports.wbg.__wbg_randomFillSync_dc1e9a60c158336d = function() { return handleError(function (arg0, arg1) {
|
|
949
|
-
getObject(arg0).randomFillSync(takeObject(arg1));
|
|
950
|
-
}, arguments) };
|
|
951
|
-
imports.wbg.__wbg_getRandomValues_37fa2ca9e4e07fab = function() { return handleError(function (arg0, arg1) {
|
|
952
|
-
getObject(arg0).getRandomValues(getObject(arg1));
|
|
953
|
-
}, arguments) };
|
|
954
765
|
imports.wbg.__wbg_get_7303ed2ef026b2f5 = function(arg0, arg1) {
|
|
955
766
|
const ret = getObject(arg0)[arg1 >>> 0];
|
|
956
767
|
return addHeapObject(ret);
|
|
@@ -963,53 +774,10 @@ function __wbg_get_imports() {
|
|
|
963
774
|
const ret = new Array();
|
|
964
775
|
return addHeapObject(ret);
|
|
965
776
|
};
|
|
966
|
-
imports.wbg.__wbg_BigInt_9523742cb675bb6f = function(arg0) {
|
|
967
|
-
const ret = BigInt(getObject(arg0));
|
|
968
|
-
return addHeapObject(ret);
|
|
969
|
-
};
|
|
970
|
-
imports.wbg.__wbg_newnoargs_c9e6043b8ad84109 = function(arg0, arg1) {
|
|
971
|
-
const ret = new Function(getStringFromWasm0(arg0, arg1));
|
|
972
|
-
return addHeapObject(ret);
|
|
973
|
-
};
|
|
974
777
|
imports.wbg.__wbg_new_0f2b71ca2f2a6029 = function() {
|
|
975
778
|
const ret = new Map();
|
|
976
779
|
return addHeapObject(ret);
|
|
977
780
|
};
|
|
978
|
-
imports.wbg.__wbg_get_f53c921291c381bd = function() { return handleError(function (arg0, arg1) {
|
|
979
|
-
const ret = Reflect.get(getObject(arg0), getObject(arg1));
|
|
980
|
-
return addHeapObject(ret);
|
|
981
|
-
}, arguments) };
|
|
982
|
-
imports.wbg.__wbg_call_557a2f2deacc4912 = function() { return handleError(function (arg0, arg1) {
|
|
983
|
-
const ret = getObject(arg0).call(getObject(arg1));
|
|
984
|
-
return addHeapObject(ret);
|
|
985
|
-
}, arguments) };
|
|
986
|
-
imports.wbg.__wbg_new_2b6fea4ea03b1b95 = function() {
|
|
987
|
-
const ret = new Object();
|
|
988
|
-
return addHeapObject(ret);
|
|
989
|
-
};
|
|
990
|
-
imports.wbg.__wbg_self_742dd6eab3e9211e = function() { return handleError(function () {
|
|
991
|
-
const ret = self.self;
|
|
992
|
-
return addHeapObject(ret);
|
|
993
|
-
}, arguments) };
|
|
994
|
-
imports.wbg.__wbg_window_c409e731db53a0e2 = function() { return handleError(function () {
|
|
995
|
-
const ret = window.window;
|
|
996
|
-
return addHeapObject(ret);
|
|
997
|
-
}, arguments) };
|
|
998
|
-
imports.wbg.__wbg_globalThis_b70c095388441f2d = function() { return handleError(function () {
|
|
999
|
-
const ret = globalThis.globalThis;
|
|
1000
|
-
return addHeapObject(ret);
|
|
1001
|
-
}, arguments) };
|
|
1002
|
-
imports.wbg.__wbg_global_1c72617491ed7194 = function() { return handleError(function () {
|
|
1003
|
-
const ret = global.global;
|
|
1004
|
-
return addHeapObject(ret);
|
|
1005
|
-
}, arguments) };
|
|
1006
|
-
imports.wbg.__wbg_newwithlength_cd1db47a173e3944 = function(arg0) {
|
|
1007
|
-
const ret = new Array(arg0 >>> 0);
|
|
1008
|
-
return addHeapObject(ret);
|
|
1009
|
-
};
|
|
1010
|
-
imports.wbg.__wbg_set_b4da98d504ac6091 = function(arg0, arg1, arg2) {
|
|
1011
|
-
getObject(arg0)[arg1 >>> 0] = takeObject(arg2);
|
|
1012
|
-
};
|
|
1013
781
|
imports.wbg.__wbg_from_6bc98a09a0b58bb1 = function(arg0) {
|
|
1014
782
|
const ret = Array.from(getObject(arg0));
|
|
1015
783
|
return addHeapObject(ret);
|
|
@@ -1021,7 +789,7 @@ function __wbg_get_imports() {
|
|
|
1021
789
|
const a = state0.a;
|
|
1022
790
|
state0.a = 0;
|
|
1023
791
|
try {
|
|
1024
|
-
return
|
|
792
|
+
return __wbg_adapter_76(a, state0.b, arg0, arg1, arg2);
|
|
1025
793
|
} finally {
|
|
1026
794
|
state0.a = a;
|
|
1027
795
|
}
|
|
@@ -1039,27 +807,6 @@ function __wbg_get_imports() {
|
|
|
1039
807
|
const ret = getObject(arg0).reverse();
|
|
1040
808
|
return addHeapObject(ret);
|
|
1041
809
|
};
|
|
1042
|
-
imports.wbg.__wbg_byteLength_1a59a59856fc656a = function(arg0) {
|
|
1043
|
-
const ret = getObject(arg0).byteLength;
|
|
1044
|
-
return ret;
|
|
1045
|
-
};
|
|
1046
|
-
imports.wbg.__wbg_toString_68dcf9fa017bbb08 = function(arg0, arg1, arg2) {
|
|
1047
|
-
const ret = getObject(arg1).toString(arg2);
|
|
1048
|
-
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1049
|
-
const len1 = WASM_VECTOR_LEN;
|
|
1050
|
-
getInt32Memory0()[arg0 / 4 + 1] = len1;
|
|
1051
|
-
getInt32Memory0()[arg0 / 4 + 0] = ptr1;
|
|
1052
|
-
};
|
|
1053
|
-
imports.wbg.__wbg_instanceof_Error_fac23a8832b241da = function(arg0) {
|
|
1054
|
-
let result;
|
|
1055
|
-
try {
|
|
1056
|
-
result = getObject(arg0) instanceof Error;
|
|
1057
|
-
} catch {
|
|
1058
|
-
result = false;
|
|
1059
|
-
}
|
|
1060
|
-
const ret = result;
|
|
1061
|
-
return ret;
|
|
1062
|
-
};
|
|
1063
810
|
imports.wbg.__wbg_new_87297f22973157c8 = function(arg0, arg1) {
|
|
1064
811
|
const ret = new Error(getStringFromWasm0(arg0, arg1));
|
|
1065
812
|
return addHeapObject(ret);
|
|
@@ -1067,20 +814,6 @@ function __wbg_get_imports() {
|
|
|
1067
814
|
imports.wbg.__wbg_setcause_394738aae0ce9341 = function(arg0, arg1) {
|
|
1068
815
|
getObject(arg0).cause = getObject(arg1);
|
|
1069
816
|
};
|
|
1070
|
-
imports.wbg.__wbg_message_eab7d45ec69a2135 = function(arg0) {
|
|
1071
|
-
const ret = getObject(arg0).message;
|
|
1072
|
-
return addHeapObject(ret);
|
|
1073
|
-
};
|
|
1074
|
-
imports.wbg.__wbg_instanceof_Function_8e1bcaacb89c4438 = function(arg0) {
|
|
1075
|
-
let result;
|
|
1076
|
-
try {
|
|
1077
|
-
result = getObject(arg0) instanceof Function;
|
|
1078
|
-
} catch {
|
|
1079
|
-
result = false;
|
|
1080
|
-
}
|
|
1081
|
-
const ret = result;
|
|
1082
|
-
return ret;
|
|
1083
|
-
};
|
|
1084
817
|
imports.wbg.__wbg_call_587b30eea3e09332 = function() { return handleError(function (arg0, arg1, arg2) {
|
|
1085
818
|
const ret = getObject(arg0).call(getObject(arg1), getObject(arg2));
|
|
1086
819
|
return addHeapObject(ret);
|
|
@@ -1089,14 +822,6 @@ function __wbg_get_imports() {
|
|
|
1089
822
|
const ret = getObject(arg0).call(getObject(arg1), getObject(arg2), getObject(arg3));
|
|
1090
823
|
return addHeapObject(ret);
|
|
1091
824
|
}, arguments) };
|
|
1092
|
-
imports.wbg.__wbg_bind_7d5ce7224bedd5b8 = function(arg0, arg1, arg2) {
|
|
1093
|
-
const ret = getObject(arg0).bind(getObject(arg1), getObject(arg2));
|
|
1094
|
-
return addHeapObject(ret);
|
|
1095
|
-
};
|
|
1096
|
-
imports.wbg.__wbg_bind_f5218b29220675c3 = function(arg0, arg1, arg2, arg3) {
|
|
1097
|
-
const ret = getObject(arg0).bind(getObject(arg1), getObject(arg2), getObject(arg3));
|
|
1098
|
-
return addHeapObject(ret);
|
|
1099
|
-
};
|
|
1100
825
|
imports.wbg.__wbg_forEach_942772130a8d06a6 = function(arg0, arg1, arg2) {
|
|
1101
826
|
try {
|
|
1102
827
|
var state0 = {a: arg1, b: arg2};
|
|
@@ -1104,7 +829,7 @@ function __wbg_get_imports() {
|
|
|
1104
829
|
const a = state0.a;
|
|
1105
830
|
state0.a = 0;
|
|
1106
831
|
try {
|
|
1107
|
-
return
|
|
832
|
+
return __wbg_adapter_93(a, state0.b, arg0, arg1);
|
|
1108
833
|
} finally {
|
|
1109
834
|
state0.a = a;
|
|
1110
835
|
}
|
|
@@ -1118,28 +843,10 @@ function __wbg_get_imports() {
|
|
|
1118
843
|
const ret = getObject(arg0).set(getObject(arg1), getObject(arg2));
|
|
1119
844
|
return addHeapObject(ret);
|
|
1120
845
|
};
|
|
1121
|
-
imports.wbg.__wbg_instanceof_Object_a9e9e5766628e8b5 = function(arg0) {
|
|
1122
|
-
let result;
|
|
1123
|
-
try {
|
|
1124
|
-
result = getObject(arg0) instanceof Object;
|
|
1125
|
-
} catch {
|
|
1126
|
-
result = false;
|
|
1127
|
-
}
|
|
1128
|
-
const ret = result;
|
|
1129
|
-
return ret;
|
|
1130
|
-
};
|
|
1131
|
-
imports.wbg.__wbg_constructor_f2623999a1f453eb = function(arg0) {
|
|
1132
|
-
const ret = getObject(arg0).constructor;
|
|
1133
|
-
return addHeapObject(ret);
|
|
1134
|
-
};
|
|
1135
846
|
imports.wbg.__wbg_fromEntries_d1b310956d20d858 = function() { return handleError(function (arg0) {
|
|
1136
847
|
const ret = Object.fromEntries(getObject(arg0));
|
|
1137
848
|
return addHeapObject(ret);
|
|
1138
849
|
}, arguments) };
|
|
1139
|
-
imports.wbg.__wbg_toString_e2b23ac99490a381 = function(arg0) {
|
|
1140
|
-
const ret = getObject(arg0).toString();
|
|
1141
|
-
return addHeapObject(ret);
|
|
1142
|
-
};
|
|
1143
850
|
imports.wbg.__wbg_values_099fd000c271c313 = function(arg0) {
|
|
1144
851
|
const ret = Object.values(getObject(arg0));
|
|
1145
852
|
return addHeapObject(ret);
|
|
@@ -1151,7 +858,7 @@ function __wbg_get_imports() {
|
|
|
1151
858
|
const a = state0.a;
|
|
1152
859
|
state0.a = 0;
|
|
1153
860
|
try {
|
|
1154
|
-
return
|
|
861
|
+
return __wbg_adapter_93(a, state0.b, arg0, arg1);
|
|
1155
862
|
} finally {
|
|
1156
863
|
state0.a = a;
|
|
1157
864
|
}
|
|
@@ -1174,99 +881,14 @@ function __wbg_get_imports() {
|
|
|
1174
881
|
const ret = getObject(arg0).then(getObject(arg1), getObject(arg2));
|
|
1175
882
|
return addHeapObject(ret);
|
|
1176
883
|
};
|
|
1177
|
-
imports.wbg.__wbg_buffer_55ba7a6b1b92e2ac = function(arg0) {
|
|
1178
|
-
const ret = getObject(arg0).buffer;
|
|
1179
|
-
return addHeapObject(ret);
|
|
1180
|
-
};
|
|
1181
|
-
imports.wbg.__wbg_newwithbyteoffsetandlength_88d1d8be5df94b9b = function(arg0, arg1, arg2) {
|
|
1182
|
-
const ret = new Uint8Array(getObject(arg0), arg1 >>> 0, arg2 >>> 0);
|
|
1183
|
-
return addHeapObject(ret);
|
|
1184
|
-
};
|
|
1185
|
-
imports.wbg.__wbg_new_09938a7d020f049b = function(arg0) {
|
|
1186
|
-
const ret = new Uint8Array(getObject(arg0));
|
|
1187
|
-
return addHeapObject(ret);
|
|
1188
|
-
};
|
|
1189
|
-
imports.wbg.__wbg_set_3698e3ca519b3c3c = function(arg0, arg1, arg2) {
|
|
1190
|
-
getObject(arg0).set(getObject(arg1), arg2 >>> 0);
|
|
1191
|
-
};
|
|
1192
|
-
imports.wbg.__wbg_length_0aab7ffd65ad19ed = function(arg0) {
|
|
1193
|
-
const ret = getObject(arg0).length;
|
|
1194
|
-
return ret;
|
|
1195
|
-
};
|
|
1196
|
-
imports.wbg.__wbg_newwithlength_89eeca401d8918c2 = function(arg0) {
|
|
1197
|
-
const ret = new Uint8Array(arg0 >>> 0);
|
|
1198
|
-
return addHeapObject(ret);
|
|
1199
|
-
};
|
|
1200
|
-
imports.wbg.__wbg_subarray_d82be056deb4ad27 = function(arg0, arg1, arg2) {
|
|
1201
|
-
const ret = getObject(arg0).subarray(arg1 >>> 0, arg2 >>> 0);
|
|
1202
|
-
return addHeapObject(ret);
|
|
1203
|
-
};
|
|
1204
884
|
imports.wbg.__wbg_parse_76a8a18ca3f8730b = function() { return handleError(function (arg0, arg1) {
|
|
1205
885
|
const ret = JSON.parse(getStringFromWasm0(arg0, arg1));
|
|
1206
886
|
return addHeapObject(ret);
|
|
1207
887
|
}, arguments) };
|
|
1208
|
-
imports.wbg.__wbg_compile_eefe73dfb19bff3d = function(arg0) {
|
|
1209
|
-
const ret = WebAssembly.compile(getObject(arg0));
|
|
1210
|
-
return addHeapObject(ret);
|
|
1211
|
-
};
|
|
1212
|
-
imports.wbg.__wbg_instantiate_e61ee50cd947cd36 = function(arg0, arg1) {
|
|
1213
|
-
const ret = WebAssembly.instantiate(getObject(arg0), getObject(arg1));
|
|
1214
|
-
return addHeapObject(ret);
|
|
1215
|
-
};
|
|
1216
|
-
imports.wbg.__wbg_exports_311291a1333429a3 = function(arg0) {
|
|
1217
|
-
const ret = getObject(arg0).exports;
|
|
1218
|
-
return addHeapObject(ret);
|
|
1219
|
-
};
|
|
1220
|
-
imports.wbg.__wbg_exports_12505982ae149cb0 = function(arg0) {
|
|
1221
|
-
const ret = WebAssembly.Module.exports(getObject(arg0));
|
|
1222
|
-
return addHeapObject(ret);
|
|
1223
|
-
};
|
|
1224
|
-
imports.wbg.__wbg_instanceof_Table_b0af5234a12a19f9 = function(arg0) {
|
|
1225
|
-
let result;
|
|
1226
|
-
try {
|
|
1227
|
-
result = getObject(arg0) instanceof WebAssembly.Table;
|
|
1228
|
-
} catch {
|
|
1229
|
-
result = false;
|
|
1230
|
-
}
|
|
1231
|
-
const ret = result;
|
|
1232
|
-
return ret;
|
|
1233
|
-
};
|
|
1234
|
-
imports.wbg.__wbg_get_b5def15f90c3e295 = function() { return handleError(function (arg0, arg1) {
|
|
1235
|
-
const ret = getObject(arg0).get(arg1 >>> 0);
|
|
1236
|
-
return addHeapObject(ret);
|
|
1237
|
-
}, arguments) };
|
|
1238
|
-
imports.wbg.__wbg_instanceof_Memory_331618ccd3fa615d = function(arg0) {
|
|
1239
|
-
let result;
|
|
1240
|
-
try {
|
|
1241
|
-
result = getObject(arg0) instanceof WebAssembly.Memory;
|
|
1242
|
-
} catch {
|
|
1243
|
-
result = false;
|
|
1244
|
-
}
|
|
1245
|
-
const ret = result;
|
|
1246
|
-
return ret;
|
|
1247
|
-
};
|
|
1248
|
-
imports.wbg.__wbg_new_e40873b83efb2dcd = function() { return handleError(function (arg0) {
|
|
1249
|
-
const ret = new WebAssembly.Memory(getObject(arg0));
|
|
1250
|
-
return addHeapObject(ret);
|
|
1251
|
-
}, arguments) };
|
|
1252
|
-
imports.wbg.__wbg_apply_46ea2bb0ad750196 = function() { return handleError(function (arg0, arg1, arg2) {
|
|
1253
|
-
const ret = Reflect.apply(getObject(arg0), getObject(arg1), getObject(arg2));
|
|
1254
|
-
return addHeapObject(ret);
|
|
1255
|
-
}, arguments) };
|
|
1256
|
-
imports.wbg.__wbg_getPrototypeOf_7dc7a2328db2bc0e = function() { return handleError(function (arg0) {
|
|
1257
|
-
const ret = Reflect.getPrototypeOf(getObject(arg0));
|
|
1258
|
-
return addHeapObject(ret);
|
|
1259
|
-
}, arguments) };
|
|
1260
888
|
imports.wbg.__wbg_set_07da13cc24b69217 = function() { return handleError(function (arg0, arg1, arg2) {
|
|
1261
889
|
const ret = Reflect.set(getObject(arg0), getObject(arg1), getObject(arg2));
|
|
1262
890
|
return ret;
|
|
1263
891
|
}, arguments) };
|
|
1264
|
-
imports.wbg.__wbindgen_bigint_get_as_i64 = function(arg0, arg1) {
|
|
1265
|
-
const v = getObject(arg1);
|
|
1266
|
-
const ret = typeof(v) === 'bigint' ? v : undefined;
|
|
1267
|
-
getBigInt64Memory0()[arg0 / 8 + 1] = isLikeNone(ret) ? BigInt(0) : ret;
|
|
1268
|
-
getInt32Memory0()[arg0 / 4 + 0] = !isLikeNone(ret);
|
|
1269
|
-
};
|
|
1270
892
|
imports.wbg.__wbindgen_debug_string = function(arg0, arg1) {
|
|
1271
893
|
const ret = debugString(getObject(arg1));
|
|
1272
894
|
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
@@ -1277,16 +899,8 @@ function __wbg_get_imports() {
|
|
|
1277
899
|
imports.wbg.__wbindgen_throw = function(arg0, arg1) {
|
|
1278
900
|
throw new Error(getStringFromWasm0(arg0, arg1));
|
|
1279
901
|
};
|
|
1280
|
-
imports.wbg.
|
|
1281
|
-
const ret =
|
|
1282
|
-
return addHeapObject(ret);
|
|
1283
|
-
};
|
|
1284
|
-
imports.wbg.__wbindgen_function_table = function() {
|
|
1285
|
-
const ret = wasm.__wbindgen_export_2;
|
|
1286
|
-
return addHeapObject(ret);
|
|
1287
|
-
};
|
|
1288
|
-
imports.wbg.__wbindgen_closure_wrapper2147 = function(arg0, arg1, arg2) {
|
|
1289
|
-
const ret = makeMutClosure(arg0, arg1, 720, __wbg_adapter_52);
|
|
902
|
+
imports.wbg.__wbindgen_closure_wrapper743 = function(arg0, arg1, arg2) {
|
|
903
|
+
const ret = makeMutClosure(arg0, arg1, 241, __wbg_adapter_22);
|
|
1290
904
|
return addHeapObject(ret);
|
|
1291
905
|
};
|
|
1292
906
|
|
|
@@ -1300,7 +914,6 @@ function __wbg_init_memory(imports, maybe_memory) {
|
|
|
1300
914
|
function __wbg_finalize_init(instance, module) {
|
|
1301
915
|
wasm = instance.exports;
|
|
1302
916
|
__wbg_init.__wbindgen_wasm_module = module;
|
|
1303
|
-
cachedBigInt64Memory0 = null;
|
|
1304
917
|
cachedFloat64Memory0 = null;
|
|
1305
918
|
cachedInt32Memory0 = null;
|
|
1306
919
|
cachedUint8Memory0 = null;
|