@provablehq/wasm 0.11.6 → 0.11.8

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.
@@ -286,6 +286,16 @@ function runRayonThread(receiver) {
286
286
  wasm.runRayonThread(receiver);
287
287
  }
288
288
 
289
+ /**
290
+ * @param {URL} url
291
+ * @param {number} num_threads
292
+ * @returns {Promise<void>}
293
+ */
294
+ function initThreadPool(url, num_threads) {
295
+ const ret = wasm.initThreadPool(addHeapObject(url), num_threads);
296
+ return takeObject(ret);
297
+ }
298
+
289
299
  /**
290
300
  * Set the WASM log level from JS. Called automatically by the SDK's
291
301
  * `setLogLevel(level)` to keep TS and WASM logging in sync.
@@ -297,16 +307,6 @@ function setWasmLogLevel(level) {
297
307
  wasm.setWasmLogLevel(level);
298
308
  }
299
309
 
300
- /**
301
- * @param {URL} url
302
- * @param {number} num_threads
303
- * @returns {Promise<void>}
304
- */
305
- function initThreadPool(url, num_threads) {
306
- const ret = wasm.initThreadPool(addHeapObject(url), num_threads);
307
- return takeObject(ret);
308
- }
309
-
310
310
  let stack_pointer = 128;
311
311
 
312
312
  function addBorrowedObject(obj) {
@@ -427,6 +427,23 @@ function snarkVerifyBatch(verifying_keys, inputs, proof) {
427
427
  }
428
428
  }
429
429
 
430
+ /**
431
+ * Returns the maximum number of imports allowed in a program by the
432
+ * snarkVM network implementation this SDK was built against.
433
+ *
434
+ * @returns {number} The maximum number of program imports.
435
+ *
436
+ * @example
437
+ * import { getMaxProgramImports } from '@provablehq/sdk';
438
+ *
439
+ * const maxImports = getMaxProgramImports();
440
+ * @returns {number}
441
+ */
442
+ function getMaxProgramImports() {
443
+ const ret = wasm.getMaxProgramImports();
444
+ return ret >>> 0;
445
+ }
446
+
430
447
  /**
431
448
  * Set test consensus version heights for testing.
432
449
  *
@@ -436,7 +453,7 @@ function snarkVerifyBatch(verifying_keys, inputs, proof) {
436
453
  * import { getOrInitConsensusVersionTestHeights } from '@provablehq/sdk';
437
454
  *
438
455
  * Set the consensus version heights.
439
- * getOrInitConsensusVersionTestHeights("0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17");
456
+ * getOrInitConsensusVersionTestHeights("0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18");
440
457
  * @param {string | null} [heights]
441
458
  * @returns {Array<any>}
442
459
  */
@@ -447,23 +464,6 @@ function getOrInitConsensusVersionTestHeights(heights) {
447
464
  return takeObject(ret);
448
465
  }
449
466
 
450
- /**
451
- * Returns the maximum number of imports allowed in a program by the
452
- * snarkVM network implementation this SDK was built against.
453
- *
454
- * @returns {number} The maximum number of program imports.
455
- *
456
- * @example
457
- * import { getMaxProgramImports } from '@provablehq/sdk';
458
- *
459
- * const maxImports = getMaxProgramImports();
460
- * @returns {number}
461
- */
462
- function getMaxProgramImports() {
463
- const ret = wasm.getMaxProgramImports();
464
- return ret >>> 0;
465
- }
466
-
467
467
  /**
468
468
  * @param {string} string
469
469
  * @returns {Field}
@@ -505,16 +505,16 @@ function getArrayJsValueFromWasm0(ptr, len) {
505
505
  }
506
506
  return result;
507
507
  }
508
- function __wasm_bindgen_func_elem_7463(arg0, arg1) {
509
- wasm.__wasm_bindgen_func_elem_7463(arg0, arg1);
508
+ function __wasm_bindgen_func_elem_7506(arg0, arg1) {
509
+ wasm.__wasm_bindgen_func_elem_7506(arg0, arg1);
510
510
  }
511
511
 
512
- function __wasm_bindgen_func_elem_8910(arg0, arg1, arg2) {
513
- wasm.__wasm_bindgen_func_elem_8910(arg0, arg1, addHeapObject(arg2));
512
+ function __wasm_bindgen_func_elem_8948(arg0, arg1, arg2) {
513
+ wasm.__wasm_bindgen_func_elem_8948(arg0, arg1, addHeapObject(arg2));
514
514
  }
515
515
 
516
- function __wasm_bindgen_func_elem_7736(arg0, arg1, arg2, arg3) {
517
- wasm.__wasm_bindgen_func_elem_7736(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
516
+ function __wasm_bindgen_func_elem_7779(arg0, arg1, arg2, arg3) {
517
+ wasm.__wasm_bindgen_func_elem_7779(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
518
518
  }
519
519
 
520
520
  const __wbindgen_enum_RequestCredentials = ["omit", "same-origin", "include"];
@@ -19319,7 +19319,7 @@ function __wbg_get_imports(memory) {
19319
19319
  const ret = getObject(arg0).length;
19320
19320
  return ret;
19321
19321
  };
19322
- imports.wbg.__wbg_log_27d73c032446232d = function(arg0, arg1) {
19322
+ imports.wbg.__wbg_log_7ab0c7ccba2f0588 = function(arg0, arg1) {
19323
19323
  console.log(getStringFromWasm0(arg0, arg1));
19324
19324
  };
19325
19325
  imports.wbg.__wbg_new_1acc0b6eea89d040 = function() {
@@ -19337,7 +19337,7 @@ function __wbg_get_imports(memory) {
19337
19337
  const a = state0.a;
19338
19338
  state0.a = 0;
19339
19339
  try {
19340
- return __wasm_bindgen_func_elem_7736(a, state0.b, arg0, arg1);
19340
+ return __wasm_bindgen_func_elem_7779(a, state0.b, arg0, arg1);
19341
19341
  } finally {
19342
19342
  state0.a = a;
19343
19343
  }
@@ -19509,7 +19509,7 @@ function __wbg_get_imports(memory) {
19509
19509
  const ret = Signature.__wrap(arg0);
19510
19510
  return addHeapObject(ret);
19511
19511
  };
19512
- imports.wbg.__wbg_spawnWorker_e00cacfddf7ee0c0 = function(arg0, arg1, arg2, arg3) {
19512
+ imports.wbg.__wbg_spawnWorker_69898deb011084cf = function(arg0, arg1, arg2, arg3) {
19513
19513
  const ret = spawnWorker(getObject(arg0), getObject(arg1), getObject(arg2), arg3 >>> 0);
19514
19514
  return addHeapObject(ret);
19515
19515
  };
@@ -19591,6 +19591,11 @@ function __wbg_get_imports(memory) {
19591
19591
  const ret = Atomics.waitAsync(getObject(arg0), arg1 >>> 0, arg2);
19592
19592
  return addHeapObject(ret);
19593
19593
  };
19594
+ imports.wbg.__wbindgen_cast_19cdf6e41653eb6c = function(arg0, arg1) {
19595
+ // Cast intrinsic for `Closure(Closure { dtor_idx: 397, function: Function { arguments: [Externref], shim_idx: 398, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
19596
+ const ret = makeMutClosure(arg0, arg1, wasm.__wasm_bindgen_func_elem_7505, __wasm_bindgen_func_elem_8948);
19597
+ return addHeapObject(ret);
19598
+ };
19594
19599
  imports.wbg.__wbindgen_cast_2241b6af4c4b2941 = function(arg0, arg1) {
19595
19600
  // Cast intrinsic for `Ref(String) -> Externref`.
19596
19601
  const ret = getStringFromWasm0(arg0, arg1);
@@ -19606,9 +19611,9 @@ function __wbg_get_imports(memory) {
19606
19611
  const ret = BigInt.asUintN(64, arg0);
19607
19612
  return addHeapObject(ret);
19608
19613
  };
19609
- imports.wbg.__wbindgen_cast_69588da295a6a0d2 = function(arg0, arg1) {
19610
- // Cast intrinsic for `Closure(Closure { dtor_idx: 390, function: Function { arguments: [], shim_idx: 495, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
19611
- const ret = makeMutClosure(arg0, arg1, wasm.__wasm_bindgen_func_elem_7462, __wasm_bindgen_func_elem_7463);
19614
+ imports.wbg.__wbindgen_cast_601de75c058a35e1 = function(arg0, arg1) {
19615
+ // Cast intrinsic for `Closure(Closure { dtor_idx: 397, function: Function { arguments: [], shim_idx: 528, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
19616
+ const ret = makeMutClosure(arg0, arg1, wasm.__wasm_bindgen_func_elem_7505, __wasm_bindgen_func_elem_7506);
19612
19617
  return addHeapObject(ret);
19613
19618
  };
19614
19619
  imports.wbg.__wbindgen_cast_9ae0607507abb057 = function(arg0) {
@@ -19616,26 +19621,21 @@ function __wbg_get_imports(memory) {
19616
19621
  const ret = arg0;
19617
19622
  return addHeapObject(ret);
19618
19623
  };
19619
- imports.wbg.__wbindgen_cast_b5deba2f813aede2 = function(arg0, arg1) {
19620
- // Cast intrinsic for `Closure(Closure { dtor_idx: 390, function: Function { arguments: [NamedExternref("MessageEvent")], shim_idx: 391, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
19621
- const ret = makeMutClosure(arg0, arg1, wasm.__wasm_bindgen_func_elem_7462, __wasm_bindgen_func_elem_8910);
19622
- return addHeapObject(ret);
19623
- };
19624
19624
  imports.wbg.__wbindgen_cast_d6cd19b81560fd6e = function(arg0) {
19625
19625
  // Cast intrinsic for `F64 -> Externref`.
19626
19626
  const ret = arg0;
19627
19627
  return addHeapObject(ret);
19628
19628
  };
19629
- imports.wbg.__wbindgen_cast_e15614d8168764d1 = function(arg0, arg1) {
19630
- // Cast intrinsic for `Closure(Closure { dtor_idx: 390, function: Function { arguments: [Externref], shim_idx: 391, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
19631
- const ret = makeMutClosure(arg0, arg1, wasm.__wasm_bindgen_func_elem_7462, __wasm_bindgen_func_elem_8910);
19632
- return addHeapObject(ret);
19633
- };
19634
19629
  imports.wbg.__wbindgen_cast_e7b45dd881f38ce3 = function(arg0, arg1) {
19635
19630
  // Cast intrinsic for `U128 -> Externref`.
19636
19631
  const ret = (BigInt.asUintN(64, arg0) | (BigInt.asUintN(64, arg1) << BigInt(64)));
19637
19632
  return addHeapObject(ret);
19638
19633
  };
19634
+ imports.wbg.__wbindgen_cast_eb522c22a7f98ff2 = function(arg0, arg1) {
19635
+ // Cast intrinsic for `Closure(Closure { dtor_idx: 397, function: Function { arguments: [NamedExternref("MessageEvent")], shim_idx: 398, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
19636
+ const ret = makeMutClosure(arg0, arg1, wasm.__wasm_bindgen_func_elem_7505, __wasm_bindgen_func_elem_8948);
19637
+ return addHeapObject(ret);
19638
+ };
19639
19639
  imports.wbg.__wbindgen_link_b9f45ffe079ef2c1 = function(arg0) {
19640
19640
  const val = `onmessage = function (ev) {
19641
19641
  let [ia, index, value] = ev.data;