@noir-lang/acvm_js 0.26.1 → 0.28.0-10eae15.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/web/acvm_js.js CHANGED
@@ -1,27 +1,11 @@
1
1
  let wasm;
2
2
 
3
- const cachedTextDecoder = (typeof TextDecoder !== 'undefined' ? new TextDecoder('utf-8', { ignoreBOM: true, fatal: true }) : { decode: () => { throw Error('TextDecoder not available') } } );
4
-
5
- if (typeof TextDecoder !== 'undefined') { cachedTextDecoder.decode(); };
6
-
7
- let cachedUint8Memory0 = null;
8
-
9
- function getUint8Memory0() {
10
- if (cachedUint8Memory0 === null || cachedUint8Memory0.byteLength === 0) {
11
- cachedUint8Memory0 = new Uint8Array(wasm.memory.buffer);
12
- }
13
- return cachedUint8Memory0;
14
- }
15
-
16
- function getStringFromWasm0(ptr, len) {
17
- ptr = ptr >>> 0;
18
- return cachedTextDecoder.decode(getUint8Memory0().subarray(ptr, ptr + len));
19
- }
20
-
21
3
  const heap = new Array(128).fill(undefined);
22
4
 
23
5
  heap.push(undefined, null, true, false);
24
6
 
7
+ function getObject(idx) { return heap[idx]; }
8
+
25
9
  let heap_next = heap.length;
26
10
 
27
11
  function addHeapObject(obj) {
@@ -33,8 +17,6 @@ function addHeapObject(obj) {
33
17
  return idx;
34
18
  }
35
19
 
36
- function getObject(idx) { return heap[idx]; }
37
-
38
20
  function dropObject(idx) {
39
21
  if (idx < 132) return;
40
22
  heap[idx] = heap_next;
@@ -47,6 +29,24 @@ function takeObject(idx) {
47
29
  return ret;
48
30
  }
49
31
 
32
+ const cachedTextDecoder = (typeof TextDecoder !== 'undefined' ? new TextDecoder('utf-8', { ignoreBOM: true, fatal: true }) : { decode: () => { throw Error('TextDecoder not available') } } );
33
+
34
+ if (typeof TextDecoder !== 'undefined') { cachedTextDecoder.decode(); };
35
+
36
+ let cachedUint8Memory0 = null;
37
+
38
+ function getUint8Memory0() {
39
+ if (cachedUint8Memory0 === null || cachedUint8Memory0.byteLength === 0) {
40
+ cachedUint8Memory0 = new Uint8Array(wasm.memory.buffer);
41
+ }
42
+ return cachedUint8Memory0;
43
+ }
44
+
45
+ function getStringFromWasm0(ptr, len) {
46
+ ptr = ptr >>> 0;
47
+ return cachedTextDecoder.decode(getUint8Memory0().subarray(ptr, ptr + len));
48
+ }
49
+
50
50
  function isLikeNone(x) {
51
51
  return x === undefined || x === null;
52
52
  }
@@ -90,14 +90,14 @@ function passStringToWasm0(arg, malloc, realloc) {
90
90
 
91
91
  if (realloc === undefined) {
92
92
  const buf = cachedTextEncoder.encode(arg);
93
- const ptr = malloc(buf.length, 1) >>> 0;
93
+ const ptr = malloc(buf.length) >>> 0;
94
94
  getUint8Memory0().subarray(ptr, ptr + buf.length).set(buf);
95
95
  WASM_VECTOR_LEN = buf.length;
96
96
  return ptr;
97
97
  }
98
98
 
99
99
  let len = arg.length;
100
- let ptr = malloc(len, 1) >>> 0;
100
+ let ptr = malloc(len) >>> 0;
101
101
 
102
102
  const mem = getUint8Memory0();
103
103
 
@@ -113,7 +113,7 @@ function passStringToWasm0(arg, malloc, realloc) {
113
113
  if (offset !== 0) {
114
114
  arg = arg.slice(offset);
115
115
  }
116
- ptr = realloc(ptr, len, len = offset + arg.length * 3, 1) >>> 0;
116
+ ptr = realloc(ptr, len, len = offset + arg.length * 3) >>> 0;
117
117
  const view = getUint8Memory0().subarray(ptr + offset, ptr + len);
118
118
  const ret = encodeString(arg, view);
119
119
 
@@ -223,71 +223,15 @@ function makeMutClosure(arg0, arg1, dtor, f) {
223
223
  return real;
224
224
  }
225
225
  function __wbg_adapter_54(arg0, arg1, arg2) {
226
- wasm._dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h8fdacd768a9ff6b4(arg0, arg1, addHeapObject(arg2));
227
- }
228
-
229
- /**
230
- * Returns the `BuildInfo` object containing information about how the installed package was built.
231
- * @returns {BuildInfo} - Information on how the installed package was built.
232
- */
233
- export function buildInfo() {
234
- const ret = wasm.buildInfo();
235
- return takeObject(ret);
236
- }
237
-
238
- function _assertClass(instance, klass) {
239
- if (!(instance instanceof klass)) {
240
- throw new Error(`expected instance of ${klass.name}`);
241
- }
242
- return instance.ptr;
226
+ wasm._dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__heb1f60a5b015b6c5(arg0, arg1, addHeapObject(arg2));
243
227
  }
244
228
 
245
229
  function passArray8ToWasm0(arg, malloc) {
246
- const ptr = malloc(arg.length * 1, 1) >>> 0;
230
+ const ptr = malloc(arg.length * 1) >>> 0;
247
231
  getUint8Memory0().set(arg, ptr / 1);
248
232
  WASM_VECTOR_LEN = arg.length;
249
233
  return ptr;
250
234
  }
251
- /**
252
- * Executes an ACIR circuit to generate the solved witness from the initial witness.
253
- *
254
- * @param {&WasmBlackBoxFunctionSolver} solver - A black box solver.
255
- * @param {Uint8Array} circuit - A serialized representation of an ACIR circuit
256
- * @param {WitnessMap} initial_witness - The initial witness map defining all of the inputs to `circuit`..
257
- * @param {ForeignCallHandler} foreign_call_handler - A callback to process any foreign calls from the circuit.
258
- * @returns {WitnessMap} The solved witness calculated by executing the circuit on the provided inputs.
259
- */
260
- export function executeCircuitWithBlackBoxSolver(solver, circuit, initial_witness, foreign_call_handler) {
261
- _assertClass(solver, WasmBlackBoxFunctionSolver);
262
- const ptr0 = passArray8ToWasm0(circuit, wasm.__wbindgen_malloc);
263
- const len0 = WASM_VECTOR_LEN;
264
- const ret = wasm.executeCircuitWithBlackBoxSolver(solver.__wbg_ptr, ptr0, len0, addHeapObject(initial_witness), addHeapObject(foreign_call_handler));
265
- return takeObject(ret);
266
- }
267
-
268
- /**
269
- * Executes an ACIR circuit to generate the solved witness from the initial witness.
270
- *
271
- * @param {Uint8Array} circuit - A serialized representation of an ACIR circuit
272
- * @param {WitnessMap} initial_witness - The initial witness map defining all of the inputs to `circuit`..
273
- * @param {ForeignCallHandler} foreign_call_handler - A callback to process any foreign calls from the circuit.
274
- * @returns {WitnessMap} The solved witness calculated by executing the circuit on the provided inputs.
275
- */
276
- export function executeCircuit(circuit, initial_witness, foreign_call_handler) {
277
- const ptr0 = passArray8ToWasm0(circuit, wasm.__wbindgen_malloc);
278
- const len0 = WASM_VECTOR_LEN;
279
- const ret = wasm.executeCircuit(ptr0, len0, addHeapObject(initial_witness), addHeapObject(foreign_call_handler));
280
- return takeObject(ret);
281
- }
282
-
283
- /**
284
- * @returns {Promise<WasmBlackBoxFunctionSolver>}
285
- */
286
- export function createBlackBoxSolver() {
287
- const ret = wasm.createBlackBoxSolver();
288
- return takeObject(ret);
289
- }
290
-
291
235
  /**
292
236
  * Decompresses a compressed witness as outputted by Nargo into a `WitnessMap`.
293
237
  *
@@ -341,6 +285,189 @@ export function compressWitness(witness_map) {
341
285
  }
342
286
  }
343
287
 
288
+ /**
289
+ * Returns the `BuildInfo` object containing information about how the installed package was built.
290
+ * @returns {BuildInfo} - Information on how the installed package was built.
291
+ */
292
+ export function buildInfo() {
293
+ const ret = wasm.buildInfo();
294
+ return takeObject(ret);
295
+ }
296
+
297
+ /**
298
+ * Verifies a ECDSA signature over the secp256r1 curve.
299
+ * @param {Uint8Array} hashed_msg
300
+ * @param {Uint8Array} public_key_x_bytes
301
+ * @param {Uint8Array} public_key_y_bytes
302
+ * @param {Uint8Array} signature
303
+ * @returns {boolean}
304
+ */
305
+ export function ecdsa_secp256r1_verify(hashed_msg, public_key_x_bytes, public_key_y_bytes, signature) {
306
+ const ptr0 = passArray8ToWasm0(hashed_msg, wasm.__wbindgen_malloc);
307
+ const len0 = WASM_VECTOR_LEN;
308
+ const ptr1 = passArray8ToWasm0(public_key_x_bytes, wasm.__wbindgen_malloc);
309
+ const len1 = WASM_VECTOR_LEN;
310
+ const ptr2 = passArray8ToWasm0(public_key_y_bytes, wasm.__wbindgen_malloc);
311
+ const len2 = WASM_VECTOR_LEN;
312
+ const ptr3 = passArray8ToWasm0(signature, wasm.__wbindgen_malloc);
313
+ const len3 = WASM_VECTOR_LEN;
314
+ const ret = wasm.ecdsa_secp256r1_verify(ptr0, len0, ptr1, len1, ptr2, len2, ptr3, len3);
315
+ return ret !== 0;
316
+ }
317
+
318
+ /**
319
+ * Calculates the Blake2s256 hash of the input bytes and represents these as a single field element.
320
+ * Verifies a ECDSA signature over the secp256k1 curve.
321
+ * @param {Uint8Array} hashed_msg
322
+ * @param {Uint8Array} public_key_x_bytes
323
+ * @param {Uint8Array} public_key_y_bytes
324
+ * @param {Uint8Array} signature
325
+ * @returns {boolean}
326
+ */
327
+ export function ecdsa_secp256k1_verify(hashed_msg, public_key_x_bytes, public_key_y_bytes, signature) {
328
+ const ptr0 = passArray8ToWasm0(hashed_msg, wasm.__wbindgen_malloc);
329
+ const len0 = WASM_VECTOR_LEN;
330
+ const ptr1 = passArray8ToWasm0(public_key_x_bytes, wasm.__wbindgen_malloc);
331
+ const len1 = WASM_VECTOR_LEN;
332
+ const ptr2 = passArray8ToWasm0(public_key_y_bytes, wasm.__wbindgen_malloc);
333
+ const len2 = WASM_VECTOR_LEN;
334
+ const ptr3 = passArray8ToWasm0(signature, wasm.__wbindgen_malloc);
335
+ const len3 = WASM_VECTOR_LEN;
336
+ const ret = wasm.ecdsa_secp256k1_verify(ptr0, len0, ptr1, len1, ptr2, len2, ptr3, len3);
337
+ return ret !== 0;
338
+ }
339
+
340
+ /**
341
+ * Calculates the Keccak256 hash of the input bytes
342
+ * @param {Uint8Array} inputs
343
+ * @returns {Uint8Array}
344
+ */
345
+ export function keccak256(inputs) {
346
+ try {
347
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
348
+ const ptr0 = passArray8ToWasm0(inputs, wasm.__wbindgen_malloc);
349
+ const len0 = WASM_VECTOR_LEN;
350
+ wasm.keccak256(retptr, ptr0, len0);
351
+ var r0 = getInt32Memory0()[retptr / 4 + 0];
352
+ var r1 = getInt32Memory0()[retptr / 4 + 1];
353
+ var v2 = getArrayU8FromWasm0(r0, r1).slice();
354
+ wasm.__wbindgen_free(r0, r1 * 1);
355
+ return v2;
356
+ } finally {
357
+ wasm.__wbindgen_add_to_stack_pointer(16);
358
+ }
359
+ }
360
+
361
+ /**
362
+ * Calculates the Blake2s256 hash of the input bytes
363
+ * @param {Uint8Array} inputs
364
+ * @returns {Uint8Array}
365
+ */
366
+ export function blake2s256(inputs) {
367
+ try {
368
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
369
+ const ptr0 = passArray8ToWasm0(inputs, wasm.__wbindgen_malloc);
370
+ const len0 = WASM_VECTOR_LEN;
371
+ wasm.blake2s256(retptr, ptr0, len0);
372
+ var r0 = getInt32Memory0()[retptr / 4 + 0];
373
+ var r1 = getInt32Memory0()[retptr / 4 + 1];
374
+ var v2 = getArrayU8FromWasm0(r0, r1).slice();
375
+ wasm.__wbindgen_free(r0, r1 * 1);
376
+ return v2;
377
+ } finally {
378
+ wasm.__wbindgen_add_to_stack_pointer(16);
379
+ }
380
+ }
381
+
382
+ /**
383
+ * Calculates the SHA256 hash of the input bytes
384
+ * @param {Uint8Array} inputs
385
+ * @returns {Uint8Array}
386
+ */
387
+ export function sha256(inputs) {
388
+ try {
389
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
390
+ const ptr0 = passArray8ToWasm0(inputs, wasm.__wbindgen_malloc);
391
+ const len0 = WASM_VECTOR_LEN;
392
+ wasm.sha256(retptr, ptr0, len0);
393
+ var r0 = getInt32Memory0()[retptr / 4 + 0];
394
+ var r1 = getInt32Memory0()[retptr / 4 + 1];
395
+ var v2 = getArrayU8FromWasm0(r0, r1).slice();
396
+ wasm.__wbindgen_free(r0, r1 * 1);
397
+ return v2;
398
+ } finally {
399
+ wasm.__wbindgen_add_to_stack_pointer(16);
400
+ }
401
+ }
402
+
403
+ /**
404
+ * Performs a bitwise XOR operation between `lhs` and `rhs`
405
+ * @param {string} lhs
406
+ * @param {string} rhs
407
+ * @returns {string}
408
+ */
409
+ export function xor(lhs, rhs) {
410
+ const ret = wasm.xor(addHeapObject(lhs), addHeapObject(rhs));
411
+ return takeObject(ret);
412
+ }
413
+
414
+ /**
415
+ * Performs a bitwise AND operation between `lhs` and `rhs`
416
+ * @param {string} lhs
417
+ * @param {string} rhs
418
+ * @returns {string}
419
+ */
420
+ export function and(lhs, rhs) {
421
+ const ret = wasm.and(addHeapObject(lhs), addHeapObject(rhs));
422
+ return takeObject(ret);
423
+ }
424
+
425
+ function _assertClass(instance, klass) {
426
+ if (!(instance instanceof klass)) {
427
+ throw new Error(`expected instance of ${klass.name}`);
428
+ }
429
+ return instance.ptr;
430
+ }
431
+ /**
432
+ * Executes an ACIR circuit to generate the solved witness from the initial witness.
433
+ *
434
+ * @param {&WasmBlackBoxFunctionSolver} solver - A black box solver.
435
+ * @param {Uint8Array} circuit - A serialized representation of an ACIR circuit
436
+ * @param {WitnessMap} initial_witness - The initial witness map defining all of the inputs to `circuit`..
437
+ * @param {ForeignCallHandler} foreign_call_handler - A callback to process any foreign calls from the circuit.
438
+ * @returns {WitnessMap} The solved witness calculated by executing the circuit on the provided inputs.
439
+ */
440
+ export function executeCircuitWithBlackBoxSolver(solver, circuit, initial_witness, foreign_call_handler) {
441
+ _assertClass(solver, WasmBlackBoxFunctionSolver);
442
+ const ptr0 = passArray8ToWasm0(circuit, wasm.__wbindgen_malloc);
443
+ const len0 = WASM_VECTOR_LEN;
444
+ const ret = wasm.executeCircuitWithBlackBoxSolver(solver.__wbg_ptr, ptr0, len0, addHeapObject(initial_witness), addHeapObject(foreign_call_handler));
445
+ return takeObject(ret);
446
+ }
447
+
448
+ /**
449
+ * Executes an ACIR circuit to generate the solved witness from the initial witness.
450
+ *
451
+ * @param {Uint8Array} circuit - A serialized representation of an ACIR circuit
452
+ * @param {WitnessMap} initial_witness - The initial witness map defining all of the inputs to `circuit`..
453
+ * @param {ForeignCallHandler} foreign_call_handler - A callback to process any foreign calls from the circuit.
454
+ * @returns {WitnessMap} The solved witness calculated by executing the circuit on the provided inputs.
455
+ */
456
+ export function executeCircuit(circuit, initial_witness, foreign_call_handler) {
457
+ const ptr0 = passArray8ToWasm0(circuit, wasm.__wbindgen_malloc);
458
+ const len0 = WASM_VECTOR_LEN;
459
+ const ret = wasm.executeCircuit(ptr0, len0, addHeapObject(initial_witness), addHeapObject(foreign_call_handler));
460
+ return takeObject(ret);
461
+ }
462
+
463
+ /**
464
+ * @returns {Promise<WasmBlackBoxFunctionSolver>}
465
+ */
466
+ export function createBlackBoxSolver() {
467
+ const ret = wasm.createBlackBoxSolver();
468
+ return takeObject(ret);
469
+ }
470
+
344
471
  /**
345
472
  * Sets the package's logging level.
346
473
  *
@@ -441,8 +568,8 @@ function handleError(f, args) {
441
568
  wasm.__wbindgen_exn_store(addHeapObject(e));
442
569
  }
443
570
  }
444
- function __wbg_adapter_148(arg0, arg1, arg2, arg3) {
445
- wasm.wasm_bindgen__convert__closures__invoke2_mut__h2def3b115f9d10e4(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
571
+ function __wbg_adapter_155(arg0, arg1, arg2, arg3) {
572
+ wasm.wasm_bindgen__convert__closures__invoke2_mut__h72933b4dbc34aade(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
446
573
  }
447
574
 
448
575
  /**
@@ -528,8 +655,8 @@ async function __wbg_load(module, imports) {
528
655
  function __wbg_get_imports() {
529
656
  const imports = {};
530
657
  imports.wbg = {};
531
- imports.wbg.__wbindgen_string_new = function(arg0, arg1) {
532
- const ret = getStringFromWasm0(arg0, arg1);
658
+ imports.wbg.__wbindgen_object_clone_ref = function(arg0) {
659
+ const ret = getObject(arg0);
533
660
  return addHeapObject(ret);
534
661
  };
535
662
  imports.wbg.__wbindgen_object_drop_ref = function(arg0) {
@@ -539,38 +666,33 @@ function __wbg_get_imports() {
539
666
  const ret = new Error(getStringFromWasm0(arg0, arg1));
540
667
  return addHeapObject(ret);
541
668
  };
542
- imports.wbg.__wbindgen_object_clone_ref = function(arg0) {
543
- const ret = getObject(arg0);
544
- return addHeapObject(ret);
669
+ imports.wbg.__wbindgen_is_string = function(arg0) {
670
+ const ret = typeof(getObject(arg0)) === 'string';
671
+ return ret;
672
+ };
673
+ imports.wbg.__wbindgen_is_array = function(arg0) {
674
+ const ret = Array.isArray(getObject(arg0));
675
+ return ret;
545
676
  };
546
677
  imports.wbg.__wbg_wasmblackboxfunctionsolver_new = function(arg0) {
547
678
  const ret = WasmBlackBoxFunctionSolver.__wrap(arg0);
548
679
  return addHeapObject(ret);
549
680
  };
681
+ imports.wbg.__wbindgen_string_new = function(arg0, arg1) {
682
+ const ret = getStringFromWasm0(arg0, arg1);
683
+ return addHeapObject(ret);
684
+ };
550
685
  imports.wbg.__wbindgen_is_undefined = function(arg0) {
551
686
  const ret = getObject(arg0) === undefined;
552
687
  return ret;
553
688
  };
554
- imports.wbg.__wbindgen_is_array = function(arg0) {
555
- const ret = Array.isArray(getObject(arg0));
556
- return ret;
557
- };
558
689
  imports.wbg.__wbindgen_number_get = function(arg0, arg1) {
559
690
  const obj = getObject(arg1);
560
691
  const ret = typeof(obj) === 'number' ? obj : undefined;
561
692
  getFloat64Memory0()[arg0 / 8 + 1] = isLikeNone(ret) ? 0 : ret;
562
693
  getInt32Memory0()[arg0 / 4 + 0] = !isLikeNone(ret);
563
694
  };
564
- imports.wbg.__wbindgen_cb_drop = function(arg0) {
565
- const obj = takeObject(arg0).original;
566
- if (obj.cnt-- == 1) {
567
- obj.a = 0;
568
- return true;
569
- }
570
- const ret = false;
571
- return ret;
572
- };
573
- imports.wbg.__wbg_constructor_0f1be29bba11a757 = function(arg0) {
695
+ imports.wbg.__wbg_constructor_bd5b3ba6619fce81 = function(arg0) {
574
696
  const ret = new Error(takeObject(arg0));
575
697
  return addHeapObject(ret);
576
698
  };
@@ -582,7 +704,16 @@ function __wbg_get_imports() {
582
704
  getInt32Memory0()[arg0 / 4 + 1] = len1;
583
705
  getInt32Memory0()[arg0 / 4 + 0] = ptr1;
584
706
  };
585
- imports.wbg.__wbg_new_b1b225905e158eb4 = function() {
707
+ imports.wbg.__wbindgen_cb_drop = function(arg0) {
708
+ const obj = takeObject(arg0).original;
709
+ if (obj.cnt-- == 1) {
710
+ obj.a = 0;
711
+ return true;
712
+ }
713
+ const ret = false;
714
+ return ret;
715
+ };
716
+ imports.wbg.__wbg_new_d6cb182577c81490 = function() {
586
717
  const ret = new Map();
587
718
  return addHeapObject(ret);
588
719
  };
@@ -590,10 +721,6 @@ function __wbg_get_imports() {
590
721
  const ret = arg0;
591
722
  return addHeapObject(ret);
592
723
  };
593
- imports.wbg.__wbindgen_is_string = function(arg0) {
594
- const ret = typeof(getObject(arg0)) === 'string';
595
- return ret;
596
- };
597
724
  imports.wbg.__wbg_new_abda76e883ba8a5f = function() {
598
725
  const ret = new Error();
599
726
  return addHeapObject(ret);
@@ -613,21 +740,9 @@ function __wbg_get_imports() {
613
740
  deferred0_1 = arg1;
614
741
  console.error(getStringFromWasm0(arg0, arg1));
615
742
  } finally {
616
- wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
743
+ wasm.__wbindgen_free(deferred0_0, deferred0_1);
617
744
  }
618
745
  };
619
- imports.wbg.__wbindgen_bigint_from_u64 = function(arg0) {
620
- const ret = BigInt.asUintN(64, arg0);
621
- return addHeapObject(ret);
622
- };
623
- imports.wbg.__wbindgen_shr = function(arg0, arg1) {
624
- const ret = getObject(arg0) >> getObject(arg1);
625
- return addHeapObject(ret);
626
- };
627
- imports.wbg.__wbindgen_jsval_eq = function(arg0, arg1) {
628
- const ret = getObject(arg0) === getObject(arg1);
629
- return ret;
630
- };
631
746
  imports.wbg.__wbindgen_bigint_from_i64 = function(arg0) {
632
747
  const ret = arg0;
633
748
  return addHeapObject(ret);
@@ -644,6 +759,18 @@ function __wbg_get_imports() {
644
759
  const ret = typeof(getObject(arg0)) === 'bigint';
645
760
  return ret;
646
761
  };
762
+ imports.wbg.__wbindgen_jsval_eq = function(arg0, arg1) {
763
+ const ret = getObject(arg0) === getObject(arg1);
764
+ return ret;
765
+ };
766
+ imports.wbg.__wbindgen_bigint_from_u64 = function(arg0) {
767
+ const ret = BigInt.asUintN(64, arg0);
768
+ return addHeapObject(ret);
769
+ };
770
+ imports.wbg.__wbindgen_shr = function(arg0, arg1) {
771
+ const ret = getObject(arg0) >> getObject(arg1);
772
+ return addHeapObject(ret);
773
+ };
647
774
  imports.wbg.__wbindgen_is_object = function(arg0) {
648
775
  const val = getObject(arg0);
649
776
  const ret = typeof(val) === 'object' && val !== null;
@@ -701,106 +828,106 @@ function __wbg_get_imports() {
701
828
  const ret = module.require;
702
829
  return addHeapObject(ret);
703
830
  }, arguments) };
704
- imports.wbg.__wbg_debug_9b8701f894da9929 = function(arg0, arg1, arg2, arg3) {
831
+ imports.wbg.__wbg_debug_efabe4eb183aa5d4 = function(arg0, arg1, arg2, arg3) {
705
832
  console.debug(getObject(arg0), getObject(arg1), getObject(arg2), getObject(arg3));
706
833
  };
707
- imports.wbg.__wbg_error_788ae33f81d3b84b = function(arg0) {
834
+ imports.wbg.__wbg_error_a7e23606158b68b9 = function(arg0) {
708
835
  console.error(getObject(arg0));
709
836
  };
710
- imports.wbg.__wbg_error_d9bce418caafb712 = function(arg0, arg1, arg2, arg3) {
837
+ imports.wbg.__wbg_error_50f42b952a595a23 = function(arg0, arg1, arg2, arg3) {
711
838
  console.error(getObject(arg0), getObject(arg1), getObject(arg2), getObject(arg3));
712
839
  };
713
- imports.wbg.__wbg_info_bb52f40b06f679de = function(arg0, arg1, arg2, arg3) {
840
+ imports.wbg.__wbg_info_24d8f53d98f12b95 = function(arg0, arg1, arg2, arg3) {
714
841
  console.info(getObject(arg0), getObject(arg1), getObject(arg2), getObject(arg3));
715
842
  };
716
- imports.wbg.__wbg_log_ea7093e35e3efd07 = function(arg0, arg1, arg2, arg3) {
843
+ imports.wbg.__wbg_log_9b164efbe6db702f = function(arg0, arg1, arg2, arg3) {
717
844
  console.log(getObject(arg0), getObject(arg1), getObject(arg2), getObject(arg3));
718
845
  };
719
- imports.wbg.__wbg_warn_dfc0e0cf544a13bd = function(arg0, arg1, arg2, arg3) {
846
+ imports.wbg.__wbg_warn_8342bfbc6028193a = function(arg0, arg1, arg2, arg3) {
720
847
  console.warn(getObject(arg0), getObject(arg1), getObject(arg2), getObject(arg3));
721
848
  };
722
- imports.wbg.__wbg_get_44be0491f933a435 = function(arg0, arg1) {
849
+ imports.wbg.__wbg_get_7303ed2ef026b2f5 = function(arg0, arg1) {
723
850
  const ret = getObject(arg0)[arg1 >>> 0];
724
851
  return addHeapObject(ret);
725
852
  };
726
- imports.wbg.__wbg_length_fff51ee6522a1a18 = function(arg0) {
853
+ imports.wbg.__wbg_length_820c786973abdd8a = function(arg0) {
727
854
  const ret = getObject(arg0).length;
728
855
  return ret;
729
856
  };
730
- imports.wbg.__wbg_new_898a68150f225f2e = function() {
857
+ imports.wbg.__wbg_new_0394642eae39db16 = function() {
731
858
  const ret = new Array();
732
859
  return addHeapObject(ret);
733
860
  };
734
- imports.wbg.__wbg_BigInt_025925c4804d8575 = function(arg0) {
861
+ imports.wbg.__wbg_BigInt_9523742cb675bb6f = function(arg0) {
735
862
  const ret = BigInt(getObject(arg0));
736
863
  return addHeapObject(ret);
737
864
  };
738
- imports.wbg.__wbg_newnoargs_581967eacc0e2604 = function(arg0, arg1) {
865
+ imports.wbg.__wbg_newnoargs_c9e6043b8ad84109 = function(arg0, arg1) {
739
866
  const ret = new Function(getStringFromWasm0(arg0, arg1));
740
867
  return addHeapObject(ret);
741
868
  };
742
- imports.wbg.__wbg_get_97b561fb56f034b5 = function() { return handleError(function (arg0, arg1) {
869
+ imports.wbg.__wbg_get_f53c921291c381bd = function() { return handleError(function (arg0, arg1) {
743
870
  const ret = Reflect.get(getObject(arg0), getObject(arg1));
744
871
  return addHeapObject(ret);
745
872
  }, arguments) };
746
- imports.wbg.__wbg_call_cb65541d95d71282 = function() { return handleError(function (arg0, arg1) {
873
+ imports.wbg.__wbg_call_557a2f2deacc4912 = function() { return handleError(function (arg0, arg1) {
747
874
  const ret = getObject(arg0).call(getObject(arg1));
748
875
  return addHeapObject(ret);
749
876
  }, arguments) };
750
- imports.wbg.__wbg_new_b51585de1b234aff = function() {
877
+ imports.wbg.__wbg_new_2b6fea4ea03b1b95 = function() {
751
878
  const ret = new Object();
752
879
  return addHeapObject(ret);
753
880
  };
754
- imports.wbg.__wbg_self_1ff1d729e9aae938 = function() { return handleError(function () {
881
+ imports.wbg.__wbg_self_742dd6eab3e9211e = function() { return handleError(function () {
755
882
  const ret = self.self;
756
883
  return addHeapObject(ret);
757
884
  }, arguments) };
758
- imports.wbg.__wbg_window_5f4faef6c12b79ec = function() { return handleError(function () {
885
+ imports.wbg.__wbg_window_c409e731db53a0e2 = function() { return handleError(function () {
759
886
  const ret = window.window;
760
887
  return addHeapObject(ret);
761
888
  }, arguments) };
762
- imports.wbg.__wbg_globalThis_1d39714405582d3c = function() { return handleError(function () {
889
+ imports.wbg.__wbg_globalThis_b70c095388441f2d = function() { return handleError(function () {
763
890
  const ret = globalThis.globalThis;
764
891
  return addHeapObject(ret);
765
892
  }, arguments) };
766
- imports.wbg.__wbg_global_651f05c6a0944d1c = function() { return handleError(function () {
893
+ imports.wbg.__wbg_global_1c72617491ed7194 = function() { return handleError(function () {
767
894
  const ret = global.global;
768
895
  return addHeapObject(ret);
769
896
  }, arguments) };
770
- imports.wbg.__wbg_newwithlength_3ec098a360da1909 = function(arg0) {
897
+ imports.wbg.__wbg_newwithlength_cd1db47a173e3944 = function(arg0) {
771
898
  const ret = new Array(arg0 >>> 0);
772
899
  return addHeapObject(ret);
773
900
  };
774
- imports.wbg.__wbg_set_502d29070ea18557 = function(arg0, arg1, arg2) {
901
+ imports.wbg.__wbg_set_b4da98d504ac6091 = function(arg0, arg1, arg2) {
775
902
  getObject(arg0)[arg1 >>> 0] = takeObject(arg2);
776
903
  };
777
- imports.wbg.__wbg_from_d7c216d4616bb368 = function(arg0) {
904
+ imports.wbg.__wbg_from_6bc98a09a0b58bb1 = function(arg0) {
778
905
  const ret = Array.from(getObject(arg0));
779
906
  return addHeapObject(ret);
780
907
  };
781
- imports.wbg.__wbg_push_ca1c26067ef907ac = function(arg0, arg1) {
908
+ imports.wbg.__wbg_push_109cfc26d02582dd = function(arg0, arg1) {
782
909
  const ret = getObject(arg0).push(getObject(arg1));
783
910
  return ret;
784
911
  };
785
- imports.wbg.__wbg_byteLength_0488a7a303dccf40 = function(arg0) {
912
+ imports.wbg.__wbg_byteLength_1a59a59856fc656a = function(arg0) {
786
913
  const ret = getObject(arg0).byteLength;
787
914
  return ret;
788
915
  };
789
- imports.wbg.__wbg_toString_26c114c5f3052ff5 = function(arg0, arg1, arg2) {
916
+ imports.wbg.__wbg_toString_68dcf9fa017bbb08 = function(arg0, arg1, arg2) {
790
917
  const ret = getObject(arg1).toString(arg2);
791
918
  const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
792
919
  const len1 = WASM_VECTOR_LEN;
793
920
  getInt32Memory0()[arg0 / 4 + 1] = len1;
794
921
  getInt32Memory0()[arg0 / 4 + 0] = ptr1;
795
922
  };
796
- imports.wbg.__wbg_new_d258248ed531ff54 = function(arg0, arg1) {
923
+ imports.wbg.__wbg_new_87297f22973157c8 = function(arg0, arg1) {
797
924
  const ret = new Error(getStringFromWasm0(arg0, arg1));
798
925
  return addHeapObject(ret);
799
926
  };
800
- imports.wbg.__wbg_setcause_a60925f08b71876d = function(arg0, arg1) {
927
+ imports.wbg.__wbg_setcause_394738aae0ce9341 = function(arg0, arg1) {
801
928
  getObject(arg0).cause = getObject(arg1);
802
929
  };
803
- imports.wbg.__wbg_instanceof_Function_3021b2be9300e7a7 = function(arg0) {
930
+ imports.wbg.__wbg_instanceof_Function_8e1bcaacb89c4438 = function(arg0) {
804
931
  let result;
805
932
  try {
806
933
  result = getObject(arg0) instanceof Function;
@@ -810,30 +937,30 @@ function __wbg_get_imports() {
810
937
  const ret = result;
811
938
  return ret;
812
939
  };
813
- imports.wbg.__wbg_call_01734de55d61e11d = function() { return handleError(function (arg0, arg1, arg2) {
940
+ imports.wbg.__wbg_call_587b30eea3e09332 = function() { return handleError(function (arg0, arg1, arg2) {
814
941
  const ret = getObject(arg0).call(getObject(arg1), getObject(arg2));
815
942
  return addHeapObject(ret);
816
943
  }, arguments) };
817
- imports.wbg.__wbg_call_4c92f6aec1e1d6e6 = function() { return handleError(function (arg0, arg1, arg2, arg3) {
944
+ imports.wbg.__wbg_call_4c73e4aecced6a7d = function() { return handleError(function (arg0, arg1, arg2, arg3) {
818
945
  const ret = getObject(arg0).call(getObject(arg1), getObject(arg2), getObject(arg3));
819
946
  return addHeapObject(ret);
820
947
  }, arguments) };
821
- imports.wbg.__wbg_bind_f9d2c8ec337bbbe7 = function(arg0, arg1, arg2) {
948
+ imports.wbg.__wbg_bind_7d5ce7224bedd5b8 = function(arg0, arg1, arg2) {
822
949
  const ret = getObject(arg0).bind(getObject(arg1), getObject(arg2));
823
950
  return addHeapObject(ret);
824
951
  };
825
- imports.wbg.__wbg_bind_60a9a80cada2f33c = function(arg0, arg1, arg2, arg3) {
952
+ imports.wbg.__wbg_bind_f5218b29220675c3 = function(arg0, arg1, arg2, arg3) {
826
953
  const ret = getObject(arg0).bind(getObject(arg1), getObject(arg2), getObject(arg3));
827
954
  return addHeapObject(ret);
828
955
  };
829
- imports.wbg.__wbg_forEach_d3ffcb118358250b = function(arg0, arg1, arg2) {
956
+ imports.wbg.__wbg_forEach_942772130a8d06a6 = function(arg0, arg1, arg2) {
830
957
  try {
831
958
  var state0 = {a: arg1, b: arg2};
832
959
  var cb0 = (arg0, arg1) => {
833
960
  const a = state0.a;
834
961
  state0.a = 0;
835
962
  try {
836
- return __wbg_adapter_148(a, state0.b, arg0, arg1);
963
+ return __wbg_adapter_155(a, state0.b, arg0, arg1);
837
964
  } finally {
838
965
  state0.a = a;
839
966
  }
@@ -843,22 +970,22 @@ function __wbg_get_imports() {
843
970
  state0.a = state0.b = 0;
844
971
  }
845
972
  };
846
- imports.wbg.__wbg_set_bedc3d02d0f05eb0 = function(arg0, arg1, arg2) {
973
+ imports.wbg.__wbg_set_da7be7bf0e037b14 = function(arg0, arg1, arg2) {
847
974
  const ret = getObject(arg0).set(getObject(arg1), getObject(arg2));
848
975
  return addHeapObject(ret);
849
976
  };
850
- imports.wbg.__wbg_constructor_47e9bb352faf1649 = function(arg0) {
977
+ imports.wbg.__wbg_constructor_f2623999a1f453eb = function(arg0) {
851
978
  const ret = getObject(arg0).constructor;
852
979
  return addHeapObject(ret);
853
980
  };
854
- imports.wbg.__wbg_new_43f1b47c28813cbd = function(arg0, arg1) {
981
+ imports.wbg.__wbg_new_2b55e405e4af4986 = function(arg0, arg1) {
855
982
  try {
856
983
  var state0 = {a: arg0, b: arg1};
857
984
  var cb0 = (arg0, arg1) => {
858
985
  const a = state0.a;
859
986
  state0.a = 0;
860
987
  try {
861
- return __wbg_adapter_148(a, state0.b, arg0, arg1);
988
+ return __wbg_adapter_155(a, state0.b, arg0, arg1);
862
989
  } finally {
863
990
  state0.a = a;
864
991
  }
@@ -869,62 +996,62 @@ function __wbg_get_imports() {
869
996
  state0.a = state0.b = 0;
870
997
  }
871
998
  };
872
- imports.wbg.__wbg_resolve_53698b95aaf7fcf8 = function(arg0) {
999
+ imports.wbg.__wbg_resolve_ae38ad63c43ff98b = function(arg0) {
873
1000
  const ret = Promise.resolve(getObject(arg0));
874
1001
  return addHeapObject(ret);
875
1002
  };
876
- imports.wbg.__wbg_then_f7e06ee3c11698eb = function(arg0, arg1) {
1003
+ imports.wbg.__wbg_then_8df675b8bb5d5e3c = function(arg0, arg1) {
877
1004
  const ret = getObject(arg0).then(getObject(arg1));
878
1005
  return addHeapObject(ret);
879
1006
  };
880
- imports.wbg.__wbg_then_b2267541e2a73865 = function(arg0, arg1, arg2) {
1007
+ imports.wbg.__wbg_then_835b073a479138e5 = function(arg0, arg1, arg2) {
881
1008
  const ret = getObject(arg0).then(getObject(arg1), getObject(arg2));
882
1009
  return addHeapObject(ret);
883
1010
  };
884
- imports.wbg.__wbg_buffer_085ec1f694018c4f = function(arg0) {
1011
+ imports.wbg.__wbg_buffer_55ba7a6b1b92e2ac = function(arg0) {
885
1012
  const ret = getObject(arg0).buffer;
886
1013
  return addHeapObject(ret);
887
1014
  };
888
- imports.wbg.__wbg_newwithbyteoffsetandlength_6da8e527659b86aa = function(arg0, arg1, arg2) {
1015
+ imports.wbg.__wbg_newwithbyteoffsetandlength_88d1d8be5df94b9b = function(arg0, arg1, arg2) {
889
1016
  const ret = new Uint8Array(getObject(arg0), arg1 >>> 0, arg2 >>> 0);
890
1017
  return addHeapObject(ret);
891
1018
  };
892
- imports.wbg.__wbg_new_8125e318e6245eed = function(arg0) {
1019
+ imports.wbg.__wbg_new_09938a7d020f049b = function(arg0) {
893
1020
  const ret = new Uint8Array(getObject(arg0));
894
1021
  return addHeapObject(ret);
895
1022
  };
896
- imports.wbg.__wbg_set_5cf90238115182c3 = function(arg0, arg1, arg2) {
1023
+ imports.wbg.__wbg_set_3698e3ca519b3c3c = function(arg0, arg1, arg2) {
897
1024
  getObject(arg0).set(getObject(arg1), arg2 >>> 0);
898
1025
  };
899
- imports.wbg.__wbg_length_72e2208bbc0efc61 = function(arg0) {
1026
+ imports.wbg.__wbg_length_0aab7ffd65ad19ed = function(arg0) {
900
1027
  const ret = getObject(arg0).length;
901
1028
  return ret;
902
1029
  };
903
- imports.wbg.__wbg_newwithlength_e5d69174d6984cd7 = function(arg0) {
1030
+ imports.wbg.__wbg_newwithlength_89eeca401d8918c2 = function(arg0) {
904
1031
  const ret = new Uint8Array(arg0 >>> 0);
905
1032
  return addHeapObject(ret);
906
1033
  };
907
- imports.wbg.__wbg_subarray_13db269f57aa838d = function(arg0, arg1, arg2) {
1034
+ imports.wbg.__wbg_subarray_d82be056deb4ad27 = function(arg0, arg1, arg2) {
908
1035
  const ret = getObject(arg0).subarray(arg1 >>> 0, arg2 >>> 0);
909
1036
  return addHeapObject(ret);
910
1037
  };
911
- imports.wbg.__wbg_compile_0ef211355a4ebea3 = function(arg0) {
1038
+ imports.wbg.__wbg_compile_eefe73dfb19bff3d = function(arg0) {
912
1039
  const ret = WebAssembly.compile(getObject(arg0));
913
1040
  return addHeapObject(ret);
914
1041
  };
915
- imports.wbg.__wbg_instantiate_8900c71988551df8 = function(arg0, arg1) {
1042
+ imports.wbg.__wbg_instantiate_e61ee50cd947cd36 = function(arg0, arg1) {
916
1043
  const ret = WebAssembly.instantiate(getObject(arg0), getObject(arg1));
917
1044
  return addHeapObject(ret);
918
1045
  };
919
- imports.wbg.__wbg_exports_9484b00cdfd311fc = function(arg0) {
1046
+ imports.wbg.__wbg_exports_311291a1333429a3 = function(arg0) {
920
1047
  const ret = getObject(arg0).exports;
921
1048
  return addHeapObject(ret);
922
1049
  };
923
- imports.wbg.__wbg_exports_b7984a3120d6aba2 = function(arg0) {
1050
+ imports.wbg.__wbg_exports_12505982ae149cb0 = function(arg0) {
924
1051
  const ret = WebAssembly.Module.exports(getObject(arg0));
925
1052
  return addHeapObject(ret);
926
1053
  };
927
- imports.wbg.__wbg_instanceof_Table_ba74319dfec929b1 = function(arg0) {
1054
+ imports.wbg.__wbg_instanceof_Table_b0af5234a12a19f9 = function(arg0) {
928
1055
  let result;
929
1056
  try {
930
1057
  result = getObject(arg0) instanceof WebAssembly.Table;
@@ -934,11 +1061,11 @@ function __wbg_get_imports() {
934
1061
  const ret = result;
935
1062
  return ret;
936
1063
  };
937
- imports.wbg.__wbg_get_9bb402f6a9f0b436 = function() { return handleError(function (arg0, arg1) {
1064
+ imports.wbg.__wbg_get_b5def15f90c3e295 = function() { return handleError(function (arg0, arg1) {
938
1065
  const ret = getObject(arg0).get(arg1 >>> 0);
939
1066
  return addHeapObject(ret);
940
1067
  }, arguments) };
941
- imports.wbg.__wbg_instanceof_Memory_6b2a8e33c4176794 = function(arg0) {
1068
+ imports.wbg.__wbg_instanceof_Memory_331618ccd3fa615d = function(arg0) {
942
1069
  let result;
943
1070
  try {
944
1071
  result = getObject(arg0) instanceof WebAssembly.Memory;
@@ -948,23 +1075,23 @@ function __wbg_get_imports() {
948
1075
  const ret = result;
949
1076
  return ret;
950
1077
  };
951
- imports.wbg.__wbg_new_5514c0d576222fc2 = function() { return handleError(function (arg0) {
1078
+ imports.wbg.__wbg_new_e40873b83efb2dcd = function() { return handleError(function (arg0) {
952
1079
  const ret = new WebAssembly.Memory(getObject(arg0));
953
1080
  return addHeapObject(ret);
954
1081
  }, arguments) };
955
- imports.wbg.__wbg_apply_f9ecfcbfefaf7349 = function() { return handleError(function (arg0, arg1, arg2) {
1082
+ imports.wbg.__wbg_apply_46ea2bb0ad750196 = function() { return handleError(function (arg0, arg1, arg2) {
956
1083
  const ret = Reflect.apply(getObject(arg0), getObject(arg1), getObject(arg2));
957
1084
  return addHeapObject(ret);
958
1085
  }, arguments) };
959
- imports.wbg.__wbg_getPrototypeOf_2782f7ac7c421741 = function() { return handleError(function (arg0) {
1086
+ imports.wbg.__wbg_getPrototypeOf_7dc7a2328db2bc0e = function() { return handleError(function (arg0) {
960
1087
  const ret = Reflect.getPrototypeOf(getObject(arg0));
961
1088
  return addHeapObject(ret);
962
1089
  }, arguments) };
963
- imports.wbg.__wbg_set_092e06b0f9d71865 = function() { return handleError(function (arg0, arg1, arg2) {
1090
+ imports.wbg.__wbg_set_07da13cc24b69217 = function() { return handleError(function (arg0, arg1, arg2) {
964
1091
  const ret = Reflect.set(getObject(arg0), getObject(arg1), getObject(arg2));
965
1092
  return ret;
966
1093
  }, arguments) };
967
- imports.wbg.__wbg_parse_670c19d4e984792e = function() { return handleError(function (arg0, arg1) {
1094
+ imports.wbg.__wbg_parse_76a8a18ca3f8730b = function() { return handleError(function (arg0, arg1) {
968
1095
  const ret = JSON.parse(getStringFromWasm0(arg0, arg1));
969
1096
  return addHeapObject(ret);
970
1097
  }, arguments) };
@@ -992,8 +1119,8 @@ function __wbg_get_imports() {
992
1119
  const ret = wasm.__wbindgen_export_2;
993
1120
  return addHeapObject(ret);
994
1121
  };
995
- imports.wbg.__wbindgen_closure_wrapper773 = function(arg0, arg1, arg2) {
996
- const ret = makeMutClosure(arg0, arg1, 230, __wbg_adapter_54);
1122
+ imports.wbg.__wbindgen_closure_wrapper618 = function(arg0, arg1, arg2) {
1123
+ const ret = makeMutClosure(arg0, arg1, 196, __wbg_adapter_54);
997
1124
  return addHeapObject(ret);
998
1125
  };
999
1126