@provablehq/wasm 0.9.14 → 0.9.15-enc

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.
@@ -384,12 +384,16 @@ function getArrayJsValueFromWasm0(ptr, len) {
384
384
  }
385
385
  return result;
386
386
  }
387
- function __wasm_bindgen_func_elem_7859(arg0, arg1, arg2) {
388
- wasm.__wasm_bindgen_func_elem_7859(arg0, arg1, addHeapObject(arg2));
387
+ function __wasm_bindgen_func_elem_7853(arg0, arg1, arg2) {
388
+ wasm.__wasm_bindgen_func_elem_7853(arg0, arg1, addHeapObject(arg2));
389
389
  }
390
390
 
391
- function __wasm_bindgen_func_elem_6807(arg0, arg1, arg2, arg3) {
392
- wasm.__wasm_bindgen_func_elem_6807(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
391
+ function __wasm_bindgen_func_elem_6531(arg0, arg1) {
392
+ wasm.__wasm_bindgen_func_elem_6531(arg0, arg1);
393
+ }
394
+
395
+ function __wasm_bindgen_func_elem_6804(arg0, arg1, arg2, arg3) {
396
+ wasm.__wasm_bindgen_func_elem_6804(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
393
397
  }
394
398
 
395
399
  const __wbindgen_enum_RequestCredentials = ["omit", "same-origin", "include"];
@@ -638,6 +642,19 @@ class Address {
638
642
  const ret = wasm.address_verify(this.__wbg_ptr, ptr0, len0, signature.__wbg_ptr);
639
643
  return ret !== 0;
640
644
  }
645
+ /**
646
+ * Check if the input is a valid Aleo address.
647
+ *
648
+ * @param {string | Uint8Array} address - Either a string representation of an address
649
+ * or a Uint8Array of bytes in little-endian format.
650
+ * @returns {boolean} True if the input is a valid address, false otherwise.
651
+ * @param {any} address
652
+ * @returns {boolean}
653
+ */
654
+ static isValid(address) {
655
+ const ret = wasm.address_isValid(addHeapObject(address));
656
+ return ret !== 0;
657
+ }
641
658
  /**
642
659
  * Get the group representation of the address object.
643
660
  * @returns {Group}
@@ -13330,6 +13347,56 @@ class ViewKey {
13330
13347
  const ret = wasm.viewkey_from_string(ptr0, len0);
13331
13348
  return ViewKey.__wrap(ret);
13332
13349
  }
13350
+ /**
13351
+ * Get the underlying bytes of a view key.
13352
+ *
13353
+ * @returns {Uint8Array} Left endian byte array representation of the view key.
13354
+ * @returns {Uint8Array}
13355
+ */
13356
+ toBytesLe() {
13357
+ try {
13358
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
13359
+ wasm.viewkey_toBytesLe(retptr, this.__wbg_ptr);
13360
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
13361
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
13362
+ var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
13363
+ var r3 = getDataViewMemory0().getInt32(retptr + 4 * 3, true);
13364
+ if (r3) {
13365
+ throw takeObject(r2);
13366
+ }
13367
+ var v1 = getArrayU8FromWasm0(r0, r1).slice();
13368
+ wasm.__wbindgen_export4(r0, r1 * 1, 1);
13369
+ return v1;
13370
+ } finally {
13371
+ wasm.__wbindgen_add_to_stack_pointer(16);
13372
+ }
13373
+ }
13374
+ /**
13375
+ * Get a ViewKey from a series of bytes.
13376
+ *
13377
+ * @param {Uint8Array} bytes A left endian byte array representing the view key.
13378
+ *
13379
+ * @returns {ViewKey} The view key object.
13380
+ * @param {Uint8Array} bytes
13381
+ * @returns {ViewKey}
13382
+ */
13383
+ static fromBytesLe(bytes) {
13384
+ try {
13385
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
13386
+ const ptr0 = passArray8ToWasm0(bytes, wasm.__wbindgen_export);
13387
+ const len0 = WASM_VECTOR_LEN;
13388
+ wasm.viewkey_fromBytesLe(retptr, ptr0, len0);
13389
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
13390
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
13391
+ var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
13392
+ if (r2) {
13393
+ throw takeObject(r1);
13394
+ }
13395
+ return ViewKey.__wrap(r0);
13396
+ } finally {
13397
+ wasm.__wbindgen_add_to_stack_pointer(16);
13398
+ }
13399
+ }
13333
13400
  /**
13334
13401
  * Create a new view key from a private key
13335
13402
  *
@@ -13559,6 +13626,10 @@ function __wbg_get_imports(memory) {
13559
13626
  const ret = Ciphertext.__wrap(arg0);
13560
13627
  return addHeapObject(ret);
13561
13628
  };
13629
+ imports.wbg.__wbg_clearTimeout_5a54f8841c30079a = function(arg0) {
13630
+ const ret = clearTimeout(takeObject(arg0));
13631
+ return addHeapObject(ret);
13632
+ };
13562
13633
  imports.wbg.__wbg_crypto_574e78ad8b13b65f = function(arg0) {
13563
13634
  const ret = getObject(arg0).crypto;
13564
13635
  return addHeapObject(ret);
@@ -13635,6 +13706,16 @@ function __wbg_get_imports(memory) {
13635
13706
  const ret = result;
13636
13707
  return ret;
13637
13708
  };
13709
+ imports.wbg.__wbg_instanceof_Uint8Array_20c8e73002f7af98 = function(arg0) {
13710
+ let result;
13711
+ try {
13712
+ result = getObject(arg0) instanceof Uint8Array;
13713
+ } catch (_) {
13714
+ result = false;
13715
+ }
13716
+ const ret = result;
13717
+ return ret;
13718
+ };
13638
13719
  imports.wbg.__wbg_iterator_e5822695327a3c39 = function() {
13639
13720
  const ret = Symbol.iterator;
13640
13721
  return addHeapObject(ret);
@@ -13655,7 +13736,7 @@ function __wbg_get_imports(memory) {
13655
13736
  const ret = getObject(arg0).length;
13656
13737
  return ret;
13657
13738
  };
13658
- imports.wbg.__wbg_log_0abfb47eeb8fef6e = function(arg0, arg1) {
13739
+ imports.wbg.__wbg_log_387db517f7628e41 = function(arg0, arg1) {
13659
13740
  console.log(getStringFromWasm0(arg0, arg1));
13660
13741
  };
13661
13742
  imports.wbg.__wbg_msCrypto_a61aeb35a24c1329 = function(arg0) {
@@ -13677,7 +13758,7 @@ function __wbg_get_imports(memory) {
13677
13758
  const a = state0.a;
13678
13759
  state0.a = 0;
13679
13760
  try {
13680
- return __wasm_bindgen_func_elem_6807(a, state0.b, arg0, arg1);
13761
+ return __wasm_bindgen_func_elem_6804(a, state0.b, arg0, arg1);
13681
13762
  } finally {
13682
13763
  state0.a = a;
13683
13764
  }
@@ -13824,6 +13905,10 @@ function __wbg_get_imports(memory) {
13824
13905
  imports.wbg.__wbg_send_2e90b7c1fa1cdaf6 = function() { return handleError(function (arg0) {
13825
13906
  getObject(arg0).send();
13826
13907
  }, arguments) };
13908
+ imports.wbg.__wbg_setTimeout_db2dbaeefb6f39c7 = function() { return handleError(function (arg0, arg1) {
13909
+ const ret = setTimeout(getObject(arg0), arg1);
13910
+ return addHeapObject(ret);
13911
+ }, arguments) };
13827
13912
  imports.wbg.__wbg_set_body_3c365989753d61f4 = function(arg0, arg1) {
13828
13913
  getObject(arg0).body = getObject(arg1);
13829
13914
  };
@@ -13860,7 +13945,7 @@ function __wbg_get_imports(memory) {
13860
13945
  const ret = Signature.__wrap(arg0);
13861
13946
  return addHeapObject(ret);
13862
13947
  };
13863
- imports.wbg.__wbg_spawnWorker_c15d64587eb95ecb = function(arg0, arg1, arg2, arg3) {
13948
+ imports.wbg.__wbg_spawnWorker_5840ef60c6d1ea5b = function(arg0, arg1, arg2, arg3) {
13864
13949
  const ret = spawnWorker(getObject(arg0), getObject(arg1), getObject(arg2), arg3 >>> 0);
13865
13950
  return addHeapObject(ret);
13866
13951
  };
@@ -13952,7 +14037,7 @@ function __wbg_get_imports(memory) {
13952
14037
  };
13953
14038
  imports.wbg.__wbindgen_cast_1a9efde13cb124c3 = function(arg0, arg1) {
13954
14039
  // Cast intrinsic for `Closure(Closure { dtor_idx: 420, function: Function { arguments: [NamedExternref("MessageEvent")], shim_idx: 421, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
13955
- const ret = makeMutClosure(arg0, arg1, wasm.__wasm_bindgen_func_elem_7858, __wasm_bindgen_func_elem_7859);
14040
+ const ret = makeMutClosure(arg0, arg1, wasm.__wasm_bindgen_func_elem_6530, __wasm_bindgen_func_elem_7853);
13956
14041
  return addHeapObject(ret);
13957
14042
  };
13958
14043
  imports.wbg.__wbindgen_cast_2241b6af4c4b2941 = function(arg0, arg1) {
@@ -13982,7 +14067,7 @@ function __wbg_get_imports(memory) {
13982
14067
  };
13983
14068
  imports.wbg.__wbindgen_cast_d1bed93805c7dbcd = function(arg0, arg1) {
13984
14069
  // Cast intrinsic for `Closure(Closure { dtor_idx: 420, function: Function { arguments: [Externref], shim_idx: 421, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
13985
- const ret = makeMutClosure(arg0, arg1, wasm.__wasm_bindgen_func_elem_7858, __wasm_bindgen_func_elem_7859);
14070
+ const ret = makeMutClosure(arg0, arg1, wasm.__wasm_bindgen_func_elem_6530, __wasm_bindgen_func_elem_7853);
13986
14071
  return addHeapObject(ret);
13987
14072
  };
13988
14073
  imports.wbg.__wbindgen_cast_d6cd19b81560fd6e = function(arg0) {
@@ -13990,6 +14075,11 @@ function __wbg_get_imports(memory) {
13990
14075
  const ret = arg0;
13991
14076
  return addHeapObject(ret);
13992
14077
  };
14078
+ imports.wbg.__wbindgen_cast_d8633d04b5af1781 = function(arg0, arg1) {
14079
+ // Cast intrinsic for `Closure(Closure { dtor_idx: 420, function: Function { arguments: [], shim_idx: 507, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
14080
+ const ret = makeMutClosure(arg0, arg1, wasm.__wasm_bindgen_func_elem_6530, __wasm_bindgen_func_elem_6531);
14081
+ return addHeapObject(ret);
14082
+ };
13993
14083
  imports.wbg.__wbindgen_cast_e7b45dd881f38ce3 = function(arg0, arg1) {
13994
14084
  // Cast intrinsic for `U128 -> Externref`.
13995
14085
  const ret = (BigInt.asUintN(64, arg0) | (BigInt.asUintN(64, arg1) << BigInt(64)));
@@ -14016,7 +14106,7 @@ function __wbg_get_imports(memory) {
14016
14106
  imports.wbg.__wbindgen_object_drop_ref = function(arg0) {
14017
14107
  takeObject(arg0);
14018
14108
  };
14019
- imports.wbg.memory = memory || new WebAssembly.Memory({initial:167,maximum:16384,shared:true});
14109
+ imports.wbg.memory = memory || new WebAssembly.Memory({initial:167,maximum:65536,shared:true});
14020
14110
 
14021
14111
  return imports;
14022
14112
  }