@noir-lang/acvm_js 0.30.0-dbb6cf0.nightly → 0.30.0-e89f364.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.js CHANGED
@@ -50,28 +50,6 @@ function addHeapObject(obj) {
50
50
  return idx;
51
51
  }
52
52
 
53
- function isLikeNone(x) {
54
- return x === undefined || x === null;
55
- }
56
-
57
- let cachedFloat64Memory0 = null;
58
-
59
- function getFloat64Memory0() {
60
- if (cachedFloat64Memory0 === null || cachedFloat64Memory0.byteLength === 0) {
61
- cachedFloat64Memory0 = new Float64Array(wasm.memory.buffer);
62
- }
63
- return cachedFloat64Memory0;
64
- }
65
-
66
- let cachedInt32Memory0 = null;
67
-
68
- function getInt32Memory0() {
69
- if (cachedInt32Memory0 === null || cachedInt32Memory0.byteLength === 0) {
70
- cachedInt32Memory0 = new Int32Array(wasm.memory.buffer);
71
- }
72
- return cachedInt32Memory0;
73
- }
74
-
75
53
  let WASM_VECTOR_LEN = 0;
76
54
 
77
55
  let cachedTextEncoder = new TextEncoder('utf-8');
@@ -127,6 +105,28 @@ function passStringToWasm0(arg, malloc, realloc) {
127
105
  return ptr;
128
106
  }
129
107
 
108
+ function isLikeNone(x) {
109
+ return x === undefined || x === null;
110
+ }
111
+
112
+ let cachedInt32Memory0 = null;
113
+
114
+ function getInt32Memory0() {
115
+ if (cachedInt32Memory0 === null || cachedInt32Memory0.byteLength === 0) {
116
+ cachedInt32Memory0 = new Int32Array(wasm.memory.buffer);
117
+ }
118
+ return cachedInt32Memory0;
119
+ }
120
+
121
+ let cachedFloat64Memory0 = null;
122
+
123
+ function getFloat64Memory0() {
124
+ if (cachedFloat64Memory0 === null || cachedFloat64Memory0.byteLength === 0) {
125
+ cachedFloat64Memory0 = new Float64Array(wasm.memory.buffer);
126
+ }
127
+ return cachedFloat64Memory0;
128
+ }
129
+
130
130
  let cachedBigInt64Memory0 = null;
131
131
 
132
132
  function getBigInt64Memory0() {
@@ -226,7 +226,7 @@ function makeMutClosure(arg0, arg1, dtor, f) {
226
226
  return real;
227
227
  }
228
228
  function __wbg_adapter_54(arg0, arg1, arg2) {
229
- wasm._dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__heb1f60a5b015b6c5(arg0, arg1, addHeapObject(arg2));
229
+ wasm._dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h52952476ed423c11(arg0, arg1, addHeapObject(arg2));
230
230
  }
231
231
 
232
232
  function passArray8ToWasm0(arg, malloc) {
@@ -236,17 +236,21 @@ function passArray8ToWasm0(arg, malloc) {
236
236
  return ptr;
237
237
  }
238
238
  /**
239
- * Decompresses a compressed witness as outputted by Nargo into a `WitnessMap`.
239
+ * Extracts a `WitnessMap` containing the witness indices corresponding to the circuit's public inputs.
240
240
  *
241
- * @param {Uint8Array} compressed_witness - A compressed witness.
242
- * @returns {WitnessMap} The decompressed witness map.
241
+ * @param {Uint8Array} circuit - A serialized representation of an ACIR circuit
242
+ * @param {WitnessMap} witness_map - The completed witness map after executing the circuit.
243
+ * @returns {WitnessMap} A witness map containing the circuit's public inputs.
244
+ * @param {Uint8Array} circuit
245
+ * @param {WitnessMap} solved_witness
246
+ * @returns {WitnessMap}
243
247
  */
244
- module.exports.decompressWitness = function(compressed_witness) {
248
+ module.exports.getPublicWitness = function(circuit, solved_witness) {
245
249
  try {
246
250
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
247
- const ptr0 = passArray8ToWasm0(compressed_witness, wasm.__wbindgen_malloc);
251
+ const ptr0 = passArray8ToWasm0(circuit, wasm.__wbindgen_malloc);
248
252
  const len0 = WASM_VECTOR_LEN;
249
- wasm.decompressWitness(retptr, ptr0, len0);
253
+ wasm.getPublicWitness(retptr, ptr0, len0, addHeapObject(solved_witness));
250
254
  var r0 = getInt32Memory0()[retptr / 4 + 0];
251
255
  var r1 = getInt32Memory0()[retptr / 4 + 1];
252
256
  var r2 = getInt32Memory0()[retptr / 4 + 2];
@@ -259,35 +263,126 @@ module.exports.decompressWitness = function(compressed_witness) {
259
263
  }
260
264
  };
261
265
 
262
- function getArrayU8FromWasm0(ptr, len) {
263
- ptr = ptr >>> 0;
264
- return getUint8Memory0().subarray(ptr / 1, ptr / 1 + len);
265
- }
266
266
  /**
267
- * Compresses a `WitnessMap` into the binary format outputted by Nargo.
267
+ * Extracts a `WitnessMap` containing the witness indices corresponding to the circuit's public parameters.
268
268
  *
269
- * @param {Uint8Array} compressed_witness - A witness map.
270
- * @returns {WitnessMap} A compressed witness map
269
+ * @param {Uint8Array} circuit - A serialized representation of an ACIR circuit
270
+ * @param {WitnessMap} witness_map - The completed witness map after executing the circuit.
271
+ * @returns {WitnessMap} A witness map containing the circuit's public parameters.
272
+ * @param {Uint8Array} circuit
273
+ * @param {WitnessMap} solved_witness
274
+ * @returns {WitnessMap}
271
275
  */
272
- module.exports.compressWitness = function(witness_map) {
276
+ module.exports.getPublicParametersWitness = function(circuit, solved_witness) {
273
277
  try {
274
278
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
275
- wasm.compressWitness(retptr, addHeapObject(witness_map));
279
+ const ptr0 = passArray8ToWasm0(circuit, wasm.__wbindgen_malloc);
280
+ const len0 = WASM_VECTOR_LEN;
281
+ wasm.getPublicParametersWitness(retptr, ptr0, len0, addHeapObject(solved_witness));
276
282
  var r0 = getInt32Memory0()[retptr / 4 + 0];
277
283
  var r1 = getInt32Memory0()[retptr / 4 + 1];
278
284
  var r2 = getInt32Memory0()[retptr / 4 + 2];
279
- var r3 = getInt32Memory0()[retptr / 4 + 3];
280
- if (r3) {
281
- throw takeObject(r2);
285
+ if (r2) {
286
+ throw takeObject(r1);
282
287
  }
283
- var v1 = getArrayU8FromWasm0(r0, r1).slice();
284
- wasm.__wbindgen_free(r0, r1 * 1);
285
- return v1;
288
+ return takeObject(r0);
289
+ } finally {
290
+ wasm.__wbindgen_add_to_stack_pointer(16);
291
+ }
292
+ };
293
+
294
+ /**
295
+ * Extracts a `WitnessMap` containing the witness indices corresponding to the circuit's return values.
296
+ *
297
+ * @param {Uint8Array} circuit - A serialized representation of an ACIR circuit
298
+ * @param {WitnessMap} witness_map - The completed witness map after executing the circuit.
299
+ * @returns {WitnessMap} A witness map containing the circuit's return values.
300
+ * @param {Uint8Array} circuit
301
+ * @param {WitnessMap} witness_map
302
+ * @returns {WitnessMap}
303
+ */
304
+ module.exports.getReturnWitness = function(circuit, witness_map) {
305
+ try {
306
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
307
+ const ptr0 = passArray8ToWasm0(circuit, wasm.__wbindgen_malloc);
308
+ const len0 = WASM_VECTOR_LEN;
309
+ wasm.getReturnWitness(retptr, ptr0, len0, addHeapObject(witness_map));
310
+ var r0 = getInt32Memory0()[retptr / 4 + 0];
311
+ var r1 = getInt32Memory0()[retptr / 4 + 1];
312
+ var r2 = getInt32Memory0()[retptr / 4 + 2];
313
+ if (r2) {
314
+ throw takeObject(r1);
315
+ }
316
+ return takeObject(r0);
286
317
  } finally {
287
318
  wasm.__wbindgen_add_to_stack_pointer(16);
288
319
  }
289
320
  };
290
321
 
322
+ function _assertClass(instance, klass) {
323
+ if (!(instance instanceof klass)) {
324
+ throw new Error(`expected instance of ${klass.name}`);
325
+ }
326
+ return instance.ptr;
327
+ }
328
+ /**
329
+ * Executes an ACIR circuit to generate the solved witness from the initial witness.
330
+ *
331
+ * @param {&WasmBlackBoxFunctionSolver} solver - A black box solver.
332
+ * @param {Uint8Array} circuit - A serialized representation of an ACIR circuit
333
+ * @param {WitnessMap} initial_witness - The initial witness map defining all of the inputs to `circuit`..
334
+ * @param {ForeignCallHandler} foreign_call_handler - A callback to process any foreign calls from the circuit.
335
+ * @returns {WitnessMap} The solved witness calculated by executing the circuit on the provided inputs.
336
+ */
337
+ module.exports.executeCircuitWithBlackBoxSolver = function(solver, circuit, initial_witness, foreign_call_handler) {
338
+ _assertClass(solver, WasmBlackBoxFunctionSolver);
339
+ const ptr0 = passArray8ToWasm0(circuit, wasm.__wbindgen_malloc);
340
+ const len0 = WASM_VECTOR_LEN;
341
+ const ret = wasm.executeCircuitWithBlackBoxSolver(solver.__wbg_ptr, ptr0, len0, addHeapObject(initial_witness), addHeapObject(foreign_call_handler));
342
+ return takeObject(ret);
343
+ };
344
+
345
+ /**
346
+ * Executes an ACIR circuit to generate the solved witness from the initial witness.
347
+ *
348
+ * @param {Uint8Array} circuit - A serialized representation of an ACIR circuit
349
+ * @param {WitnessMap} initial_witness - The initial witness map defining all of the inputs to `circuit`..
350
+ * @param {ForeignCallHandler} foreign_call_handler - A callback to process any foreign calls from the circuit.
351
+ * @returns {WitnessMap} The solved witness calculated by executing the circuit on the provided inputs.
352
+ */
353
+ module.exports.executeCircuit = function(circuit, initial_witness, foreign_call_handler) {
354
+ const ptr0 = passArray8ToWasm0(circuit, wasm.__wbindgen_malloc);
355
+ const len0 = WASM_VECTOR_LEN;
356
+ const ret = wasm.executeCircuit(ptr0, len0, addHeapObject(initial_witness), addHeapObject(foreign_call_handler));
357
+ return takeObject(ret);
358
+ };
359
+
360
+ /**
361
+ * @returns {Promise<WasmBlackBoxFunctionSolver>}
362
+ */
363
+ module.exports.createBlackBoxSolver = function() {
364
+ const ret = wasm.createBlackBoxSolver();
365
+ return takeObject(ret);
366
+ };
367
+
368
+ /**
369
+ * Sets the package's logging level.
370
+ *
371
+ * @param {LogLevel} level - The maximum level of logging to be emitted.
372
+ */
373
+ module.exports.initLogLevel = function(level) {
374
+ wasm.initLogLevel(addHeapObject(level));
375
+ };
376
+
377
+ /**
378
+ * Returns the `BuildInfo` object containing information about how the installed package was built.
379
+ * @returns {BuildInfo} - Information on how the installed package was built.
380
+ */
381
+ module.exports.buildInfo = function() {
382
+ const ret = wasm.buildInfo();
383
+ return takeObject(ret);
384
+ };
385
+
291
386
  /**
292
387
  * Verifies a ECDSA signature over the secp256r1 curve.
293
388
  * @param {Uint8Array} hashed_msg
@@ -331,6 +426,10 @@ module.exports.ecdsa_secp256k1_verify = function(hashed_msg, public_key_x_bytes,
331
426
  return ret !== 0;
332
427
  };
333
428
 
429
+ function getArrayU8FromWasm0(ptr, len) {
430
+ ptr = ptr >>> 0;
431
+ return getUint8Memory0().subarray(ptr / 1, ptr / 1 + len);
432
+ }
334
433
  /**
335
434
  * Calculates the Keccak256 hash of the input bytes
336
435
  * @param {Uint8Array} inputs
@@ -417,113 +516,17 @@ module.exports.and = function(lhs, rhs) {
417
516
  };
418
517
 
419
518
  /**
420
- * Returns the `BuildInfo` object containing information about how the installed package was built.
421
- * @returns {BuildInfo} - Information on how the installed package was built.
422
- */
423
- module.exports.buildInfo = function() {
424
- const ret = wasm.buildInfo();
425
- return takeObject(ret);
426
- };
427
-
428
- function _assertClass(instance, klass) {
429
- if (!(instance instanceof klass)) {
430
- throw new Error(`expected instance of ${klass.name}`);
431
- }
432
- return instance.ptr;
433
- }
434
- /**
435
- * Executes an ACIR circuit to generate the solved witness from the initial witness.
436
- *
437
- * @param {&WasmBlackBoxFunctionSolver} solver - A black box solver.
438
- * @param {Uint8Array} circuit - A serialized representation of an ACIR circuit
439
- * @param {WitnessMap} initial_witness - The initial witness map defining all of the inputs to `circuit`..
440
- * @param {ForeignCallHandler} foreign_call_handler - A callback to process any foreign calls from the circuit.
441
- * @returns {WitnessMap} The solved witness calculated by executing the circuit on the provided inputs.
442
- */
443
- module.exports.executeCircuitWithBlackBoxSolver = function(solver, circuit, initial_witness, foreign_call_handler) {
444
- _assertClass(solver, WasmBlackBoxFunctionSolver);
445
- const ptr0 = passArray8ToWasm0(circuit, wasm.__wbindgen_malloc);
446
- const len0 = WASM_VECTOR_LEN;
447
- const ret = wasm.executeCircuitWithBlackBoxSolver(solver.__wbg_ptr, ptr0, len0, addHeapObject(initial_witness), addHeapObject(foreign_call_handler));
448
- return takeObject(ret);
449
- };
450
-
451
- /**
452
- * Executes an ACIR circuit to generate the solved witness from the initial witness.
453
- *
454
- * @param {Uint8Array} circuit - A serialized representation of an ACIR circuit
455
- * @param {WitnessMap} initial_witness - The initial witness map defining all of the inputs to `circuit`..
456
- * @param {ForeignCallHandler} foreign_call_handler - A callback to process any foreign calls from the circuit.
457
- * @returns {WitnessMap} The solved witness calculated by executing the circuit on the provided inputs.
458
- */
459
- module.exports.executeCircuit = function(circuit, initial_witness, foreign_call_handler) {
460
- const ptr0 = passArray8ToWasm0(circuit, wasm.__wbindgen_malloc);
461
- const len0 = WASM_VECTOR_LEN;
462
- const ret = wasm.executeCircuit(ptr0, len0, addHeapObject(initial_witness), addHeapObject(foreign_call_handler));
463
- return takeObject(ret);
464
- };
465
-
466
- /**
467
- * @returns {Promise<WasmBlackBoxFunctionSolver>}
468
- */
469
- module.exports.createBlackBoxSolver = function() {
470
- const ret = wasm.createBlackBoxSolver();
471
- return takeObject(ret);
472
- };
473
-
474
- /**
475
- * Sets the package's logging level.
476
- *
477
- * @param {LogLevel} level - The maximum level of logging to be emitted.
478
- */
479
- module.exports.initLogLevel = function(level) {
480
- wasm.initLogLevel(addHeapObject(level));
481
- };
482
-
483
- /**
484
- * Extracts a `WitnessMap` containing the witness indices corresponding to the circuit's public inputs.
485
- *
486
- * @param {Uint8Array} circuit - A serialized representation of an ACIR circuit
487
- * @param {WitnessMap} witness_map - The completed witness map after executing the circuit.
488
- * @returns {WitnessMap} A witness map containing the circuit's public inputs.
489
- * @param {Uint8Array} circuit
490
- * @param {WitnessMap} solved_witness
491
- * @returns {WitnessMap}
492
- */
493
- module.exports.getPublicWitness = function(circuit, solved_witness) {
494
- try {
495
- const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
496
- const ptr0 = passArray8ToWasm0(circuit, wasm.__wbindgen_malloc);
497
- const len0 = WASM_VECTOR_LEN;
498
- wasm.getPublicWitness(retptr, ptr0, len0, addHeapObject(solved_witness));
499
- var r0 = getInt32Memory0()[retptr / 4 + 0];
500
- var r1 = getInt32Memory0()[retptr / 4 + 1];
501
- var r2 = getInt32Memory0()[retptr / 4 + 2];
502
- if (r2) {
503
- throw takeObject(r1);
504
- }
505
- return takeObject(r0);
506
- } finally {
507
- wasm.__wbindgen_add_to_stack_pointer(16);
508
- }
509
- };
510
-
511
- /**
512
- * Extracts a `WitnessMap` containing the witness indices corresponding to the circuit's public parameters.
519
+ * Decompresses a compressed witness as outputted by Nargo into a `WitnessMap`.
513
520
  *
514
- * @param {Uint8Array} circuit - A serialized representation of an ACIR circuit
515
- * @param {WitnessMap} witness_map - The completed witness map after executing the circuit.
516
- * @returns {WitnessMap} A witness map containing the circuit's public parameters.
517
- * @param {Uint8Array} circuit
518
- * @param {WitnessMap} solved_witness
519
- * @returns {WitnessMap}
521
+ * @param {Uint8Array} compressed_witness - A compressed witness.
522
+ * @returns {WitnessMap} The decompressed witness map.
520
523
  */
521
- module.exports.getPublicParametersWitness = function(circuit, solved_witness) {
524
+ module.exports.decompressWitness = function(compressed_witness) {
522
525
  try {
523
526
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
524
- const ptr0 = passArray8ToWasm0(circuit, wasm.__wbindgen_malloc);
527
+ const ptr0 = passArray8ToWasm0(compressed_witness, wasm.__wbindgen_malloc);
525
528
  const len0 = WASM_VECTOR_LEN;
526
- wasm.getPublicParametersWitness(retptr, ptr0, len0, addHeapObject(solved_witness));
529
+ wasm.decompressWitness(retptr, ptr0, len0);
527
530
  var r0 = getInt32Memory0()[retptr / 4 + 0];
528
531
  var r1 = getInt32Memory0()[retptr / 4 + 1];
529
532
  var r2 = getInt32Memory0()[retptr / 4 + 2];
@@ -537,28 +540,25 @@ module.exports.getPublicParametersWitness = function(circuit, solved_witness) {
537
540
  };
538
541
 
539
542
  /**
540
- * Extracts a `WitnessMap` containing the witness indices corresponding to the circuit's return values.
543
+ * Compresses a `WitnessMap` into the binary format outputted by Nargo.
541
544
  *
542
- * @param {Uint8Array} circuit - A serialized representation of an ACIR circuit
543
- * @param {WitnessMap} witness_map - The completed witness map after executing the circuit.
544
- * @returns {WitnessMap} A witness map containing the circuit's return values.
545
- * @param {Uint8Array} circuit
546
- * @param {WitnessMap} witness_map
547
- * @returns {WitnessMap}
545
+ * @param {Uint8Array} compressed_witness - A witness map.
546
+ * @returns {WitnessMap} A compressed witness map
548
547
  */
549
- module.exports.getReturnWitness = function(circuit, witness_map) {
548
+ module.exports.compressWitness = function(witness_map) {
550
549
  try {
551
550
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
552
- const ptr0 = passArray8ToWasm0(circuit, wasm.__wbindgen_malloc);
553
- const len0 = WASM_VECTOR_LEN;
554
- wasm.getReturnWitness(retptr, ptr0, len0, addHeapObject(witness_map));
551
+ wasm.compressWitness(retptr, addHeapObject(witness_map));
555
552
  var r0 = getInt32Memory0()[retptr / 4 + 0];
556
553
  var r1 = getInt32Memory0()[retptr / 4 + 1];
557
554
  var r2 = getInt32Memory0()[retptr / 4 + 2];
558
- if (r2) {
559
- throw takeObject(r1);
555
+ var r3 = getInt32Memory0()[retptr / 4 + 3];
556
+ if (r3) {
557
+ throw takeObject(r2);
560
558
  }
561
- return takeObject(r0);
559
+ var v1 = getArrayU8FromWasm0(r0, r1).slice();
560
+ wasm.__wbindgen_free(r0, r1 * 1);
561
+ return v1;
562
562
  } finally {
563
563
  wasm.__wbindgen_add_to_stack_pointer(16);
564
564
  }
@@ -572,7 +572,7 @@ function handleError(f, args) {
572
572
  }
573
573
  }
574
574
  function __wbg_adapter_155(arg0, arg1, arg2, arg3) {
575
- wasm.wasm_bindgen__convert__closures__invoke2_mut__h72933b4dbc34aade(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
575
+ wasm.wasm_bindgen__convert__closures__invoke2_mut__h59b9f7ecd67d6688(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
576
576
  }
577
577
 
578
578
  /**
@@ -630,6 +630,16 @@ module.exports.__wbindgen_object_drop_ref = function(arg0) {
630
630
  takeObject(arg0);
631
631
  };
632
632
 
633
+ module.exports.__wbg_wasmblackboxfunctionsolver_new = function(arg0) {
634
+ const ret = WasmBlackBoxFunctionSolver.__wrap(arg0);
635
+ return addHeapObject(ret);
636
+ };
637
+
638
+ module.exports.__wbindgen_is_array = function(arg0) {
639
+ const ret = Array.isArray(getObject(arg0));
640
+ return ret;
641
+ };
642
+
633
643
  module.exports.__wbindgen_error_new = function(arg0, arg1) {
634
644
  const ret = new Error(getStringFromWasm0(arg0, arg1));
635
645
  return addHeapObject(ret);
@@ -640,23 +650,27 @@ module.exports.__wbindgen_object_clone_ref = function(arg0) {
640
650
  return addHeapObject(ret);
641
651
  };
642
652
 
643
- module.exports.__wbindgen_is_string = function(arg0) {
644
- const ret = typeof(getObject(arg0)) === 'string';
645
- return ret;
653
+ module.exports.__wbindgen_string_get = function(arg0, arg1) {
654
+ const obj = getObject(arg1);
655
+ const ret = typeof(obj) === 'string' ? obj : undefined;
656
+ var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
657
+ var len1 = WASM_VECTOR_LEN;
658
+ getInt32Memory0()[arg0 / 4 + 1] = len1;
659
+ getInt32Memory0()[arg0 / 4 + 0] = ptr1;
646
660
  };
647
661
 
648
- module.exports.__wbindgen_is_array = function(arg0) {
649
- const ret = Array.isArray(getObject(arg0));
662
+ module.exports.__wbindgen_is_string = function(arg0) {
663
+ const ret = typeof(getObject(arg0)) === 'string';
650
664
  return ret;
651
665
  };
652
666
 
653
- module.exports.__wbindgen_string_new = function(arg0, arg1) {
654
- const ret = getStringFromWasm0(arg0, arg1);
667
+ module.exports.__wbg_new_e290c3c041336f87 = function() {
668
+ const ret = new Map();
655
669
  return addHeapObject(ret);
656
670
  };
657
671
 
658
- module.exports.__wbg_wasmblackboxfunctionsolver_new = function(arg0) {
659
- const ret = WasmBlackBoxFunctionSolver.__wrap(arg0);
672
+ module.exports.__wbindgen_number_new = function(arg0) {
673
+ const ret = arg0;
660
674
  return addHeapObject(ret);
661
675
  };
662
676
 
@@ -667,18 +681,14 @@ module.exports.__wbindgen_number_get = function(arg0, arg1) {
667
681
  getInt32Memory0()[arg0 / 4 + 0] = !isLikeNone(ret);
668
682
  };
669
683
 
670
- module.exports.__wbindgen_is_undefined = function(arg0) {
671
- const ret = getObject(arg0) === undefined;
672
- return ret;
684
+ module.exports.__wbg_constructor_6e18ba778d67e20b = function(arg0) {
685
+ const ret = new Error(takeObject(arg0));
686
+ return addHeapObject(ret);
673
687
  };
674
688
 
675
- module.exports.__wbindgen_string_get = function(arg0, arg1) {
676
- const obj = getObject(arg1);
677
- const ret = typeof(obj) === 'string' ? obj : undefined;
678
- var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
679
- var len1 = WASM_VECTOR_LEN;
680
- getInt32Memory0()[arg0 / 4 + 1] = len1;
681
- getInt32Memory0()[arg0 / 4 + 0] = ptr1;
689
+ module.exports.__wbindgen_string_new = function(arg0, arg1) {
690
+ const ret = getStringFromWasm0(arg0, arg1);
691
+ return addHeapObject(ret);
682
692
  };
683
693
 
684
694
  module.exports.__wbindgen_cb_drop = function(arg0) {
@@ -691,19 +701,9 @@ module.exports.__wbindgen_cb_drop = function(arg0) {
691
701
  return ret;
692
702
  };
693
703
 
694
- module.exports.__wbg_new_e290c3c041336f87 = function() {
695
- const ret = new Map();
696
- return addHeapObject(ret);
697
- };
698
-
699
- module.exports.__wbindgen_number_new = function(arg0) {
700
- const ret = arg0;
701
- return addHeapObject(ret);
702
- };
703
-
704
- module.exports.__wbg_constructor_6e18ba778d67e20b = function(arg0) {
705
- const ret = new Error(takeObject(arg0));
706
- return addHeapObject(ret);
704
+ module.exports.__wbindgen_is_undefined = function(arg0) {
705
+ const ret = getObject(arg0) === undefined;
706
+ return ret;
707
707
  };
708
708
 
709
709
  module.exports.__wbg_new_abda76e883ba8a5f = function() {
@@ -746,16 +746,6 @@ module.exports.__wbindgen_ge = function(arg0, arg1) {
746
746
  return ret;
747
747
  };
748
748
 
749
- module.exports.__wbindgen_is_bigint = function(arg0) {
750
- const ret = typeof(getObject(arg0)) === 'bigint';
751
- return ret;
752
- };
753
-
754
- module.exports.__wbindgen_jsval_eq = function(arg0, arg1) {
755
- const ret = getObject(arg0) === getObject(arg1);
756
- return ret;
757
- };
758
-
759
749
  module.exports.__wbindgen_bigint_from_u64 = function(arg0) {
760
750
  const ret = BigInt.asUintN(64, arg0);
761
751
  return addHeapObject(ret);
@@ -766,9 +756,13 @@ module.exports.__wbindgen_shr = function(arg0, arg1) {
766
756
  return addHeapObject(ret);
767
757
  };
768
758
 
769
- module.exports.__wbindgen_is_object = function(arg0) {
770
- const val = getObject(arg0);
771
- const ret = typeof(val) === 'object' && val !== null;
759
+ module.exports.__wbindgen_jsval_eq = function(arg0, arg1) {
760
+ const ret = getObject(arg0) === getObject(arg1);
761
+ return ret;
762
+ };
763
+
764
+ module.exports.__wbindgen_is_bigint = function(arg0) {
765
+ const ret = typeof(getObject(arg0)) === 'bigint';
772
766
  return ret;
773
767
  };
774
768
 
@@ -777,7 +771,7 @@ module.exports.__wbindgen_is_function = function(arg0) {
777
771
  return ret;
778
772
  };
779
773
 
780
- module.exports.__wbg_instanceof_Global_68951a6a6244ac6e = function(arg0) {
774
+ module.exports.__wbg_instanceof_Global_f190e0e5a44a62df = function(arg0) {
781
775
  let result;
782
776
  try {
783
777
  result = getObject(arg0) instanceof WebAssembly.Global;
@@ -788,6 +782,12 @@ module.exports.__wbg_instanceof_Global_68951a6a6244ac6e = function(arg0) {
788
782
  return ret;
789
783
  };
790
784
 
785
+ module.exports.__wbindgen_is_object = function(arg0) {
786
+ const val = getObject(arg0);
787
+ const ret = typeof(val) === 'object' && val !== null;
788
+ return ret;
789
+ };
790
+
791
791
  module.exports.__wbg_static_accessor_SYMBOL_45d4d15e3c4aeb33 = function() {
792
792
  const ret = Symbol;
793
793
  return addHeapObject(ret);
@@ -1189,8 +1189,8 @@ module.exports.__wbindgen_function_table = function() {
1189
1189
  return addHeapObject(ret);
1190
1190
  };
1191
1191
 
1192
- module.exports.__wbindgen_closure_wrapper631 = function(arg0, arg1, arg2) {
1193
- const ret = makeMutClosure(arg0, arg1, 201, __wbg_adapter_54);
1192
+ module.exports.__wbindgen_closure_wrapper504 = function(arg0, arg1, arg2) {
1193
+ const ret = makeMutClosure(arg0, arg1, 161, __wbg_adapter_54);
1194
1194
  return addHeapObject(ret);
1195
1195
  };
1196
1196
 
Binary file
@@ -1,8 +1,15 @@
1
1
  /* tslint:disable */
2
2
  /* eslint-disable */
3
3
  export const memory: WebAssembly.Memory;
4
- export function decompressWitness(a: number, b: number, c: number): void;
5
- export function compressWitness(a: number, b: number): void;
4
+ export function getPublicWitness(a: number, b: number, c: number, d: number): void;
5
+ export function getPublicParametersWitness(a: number, b: number, c: number, d: number): void;
6
+ export function getReturnWitness(a: number, b: number, c: number, d: number): void;
7
+ export function executeCircuitWithBlackBoxSolver(a: number, b: number, c: number, d: number, e: number): number;
8
+ export function executeCircuit(a: number, b: number, c: number, d: number): number;
9
+ export function createBlackBoxSolver(): number;
10
+ export function __wbg_wasmblackboxfunctionsolver_free(a: number): void;
11
+ export function initLogLevel(a: number): void;
12
+ export function buildInfo(): number;
6
13
  export function ecdsa_secp256r1_verify(a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number): number;
7
14
  export function ecdsa_secp256k1_verify(a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number): number;
8
15
  export function keccak256(a: number, b: number, c: number): void;
@@ -10,22 +17,15 @@ export function blake2s256(a: number, b: number, c: number): void;
10
17
  export function sha256(a: number, b: number, c: number): void;
11
18
  export function xor(a: number, b: number): number;
12
19
  export function and(a: number, b: number): number;
13
- export function buildInfo(): number;
14
- export function executeCircuitWithBlackBoxSolver(a: number, b: number, c: number, d: number, e: number): number;
15
- export function executeCircuit(a: number, b: number, c: number, d: number): number;
16
- export function createBlackBoxSolver(): number;
17
- export function __wbg_wasmblackboxfunctionsolver_free(a: number): void;
18
- export function initLogLevel(a: number): void;
19
- export function getPublicWitness(a: number, b: number, c: number, d: number): void;
20
- export function getPublicParametersWitness(a: number, b: number, c: number, d: number): void;
21
- export function getReturnWitness(a: number, b: number, c: number, d: number): void;
20
+ export function decompressWitness(a: number, b: number, c: number): void;
21
+ export function compressWitness(a: number, b: number): void;
22
22
  export function __wbg_trap_free(a: number): void;
23
23
  export function trap___wbgd_downcast_token(): number;
24
24
  export function __wbindgen_malloc(a: number): number;
25
25
  export function __wbindgen_realloc(a: number, b: number, c: number): number;
26
26
  export const __wbindgen_export_2: WebAssembly.Table;
27
- export function _dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__heb1f60a5b015b6c5(a: number, b: number, c: number): void;
27
+ export function _dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h52952476ed423c11(a: number, b: number, c: number): void;
28
28
  export function __wbindgen_add_to_stack_pointer(a: number): number;
29
29
  export function __wbindgen_free(a: number, b: number): void;
30
30
  export function __wbindgen_exn_store(a: number): void;
31
- export function wasm_bindgen__convert__closures__invoke2_mut__h72933b4dbc34aade(a: number, b: number, c: number, d: number): void;
31
+ export function wasm_bindgen__convert__closures__invoke2_mut__h59b9f7ecd67d6688(a: number, b: number, c: number, d: number): void;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@noir-lang/acvm_js",
3
- "version": "0.30.0-dbb6cf0.nightly",
3
+ "version": "0.30.0-e89f364.nightly",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "https://github.com/noir-lang/acvm.git"