@provablehq/wasm 0.6.13 → 0.7.0

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.
@@ -238,7 +238,7 @@ function makeMutClosure(arg0, arg1, dtor, f) {
238
238
  return real;
239
239
  }
240
240
  function __wbg_adapter_34(arg0, arg1, arg2) {
241
- wasm._dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h4428289ce4d5afd9(arg0, arg1, addHeapObject(arg2));
241
+ wasm._dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h35d22bc77031ed81(arg0, arg1, addHeapObject(arg2));
242
242
  }
243
243
 
244
244
  function _assertClass(instance, klass) {
@@ -329,7 +329,7 @@ function handleError(f, args) {
329
329
  }
330
330
  }
331
331
  function __wbg_adapter_281(arg0, arg1, arg2, arg3) {
332
- wasm.wasm_bindgen__convert__closures__invoke2_mut__h2157eed66e6e3fca(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
332
+ wasm.wasm_bindgen__convert__closures__invoke2_mut__h3625646991d7d545(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
333
333
  }
334
334
 
335
335
  const AddressFinalization = (typeof FinalizationRegistry === 'undefined')
@@ -748,7 +748,7 @@ class KeyPair {
748
748
  /**
749
749
  * Get the proving key. This method will remove the proving key from the key pair
750
750
  *
751
- * @returns {ProvingKey | Error}
751
+ * @returns {ProvingKey}
752
752
  * @returns {ProvingKey}
753
753
  */
754
754
  provingKey() {
@@ -769,7 +769,7 @@ class KeyPair {
769
769
  /**
770
770
  * Get the verifying key. This method will remove the verifying key from the key pair
771
771
  *
772
- * @returns {VerifyingKey | Error}
772
+ * @returns {VerifyingKey}
773
773
  * @returns {VerifyingKey}
774
774
  */
775
775
  verifyingKey() {
@@ -1333,7 +1333,7 @@ class PrivateKey {
1333
1333
  * and will be needed to decrypt the private key later, so it should be stored securely
1334
1334
  *
1335
1335
  * @param {string} secret Secret used to encrypt the private key
1336
- * @returns {PrivateKeyCiphertext | Error} Ciphertext representation of the private key
1336
+ * @returns {PrivateKeyCiphertext} Ciphertext representation of the private key
1337
1337
  * @param {string} secret
1338
1338
  * @returns {PrivateKeyCiphertext}
1339
1339
  */
@@ -1359,7 +1359,7 @@ class PrivateKey {
1359
1359
  * decrypt the private key later, so it should be stored securely
1360
1360
  *
1361
1361
  * @param {string} secret Secret used to encrypt the private key
1362
- * @returns {PrivateKeyCiphertext | Error} Ciphertext representation of the private key
1362
+ * @returns {PrivateKeyCiphertext} Ciphertext representation of the private key
1363
1363
  * @param {string} secret
1364
1364
  * @returns {PrivateKeyCiphertext}
1365
1365
  */
@@ -1385,7 +1385,7 @@ class PrivateKey {
1385
1385
  *
1386
1386
  * @param {PrivateKeyCiphertext} ciphertext Ciphertext representation of the private key
1387
1387
  * @param {string} secret Secret originally used to encrypt the private key
1388
- * @returns {PrivateKey | Error} Private key
1388
+ * @returns {PrivateKey} Private key
1389
1389
  * @param {PrivateKeyCiphertext} ciphertext
1390
1390
  * @param {string} secret
1391
1391
  * @returns {PrivateKey}
@@ -1443,7 +1443,7 @@ class PrivateKeyCiphertext {
1443
1443
  *
1444
1444
  * @param {PrivateKey} private_key Private key to encrypt
1445
1445
  * @param {string} secret Secret to encrypt the private key with
1446
- * @returns {PrivateKeyCiphertext | Error} Private key ciphertext
1446
+ * @returns {PrivateKeyCiphertext} Private key ciphertext
1447
1447
  * @param {PrivateKey} private_key
1448
1448
  * @param {string} secret
1449
1449
  * @returns {PrivateKeyCiphertext}
@@ -1471,7 +1471,7 @@ class PrivateKeyCiphertext {
1471
1471
  * encrypt the private key
1472
1472
  *
1473
1473
  * @param {string} secret Secret used to encrypt the private key
1474
- * @returns {PrivateKey | Error} Private key
1474
+ * @returns {PrivateKey} Private key
1475
1475
  * @param {string} secret
1476
1476
  * @returns {PrivateKey}
1477
1477
  */
@@ -1518,7 +1518,7 @@ class PrivateKeyCiphertext {
1518
1518
  * Creates a PrivateKeyCiphertext from a string
1519
1519
  *
1520
1520
  * @param {string} ciphertext Ciphertext string
1521
- * @returns {PrivateKeyCiphertext | Error} Private key ciphertext
1521
+ * @returns {PrivateKeyCiphertext} Private key ciphertext
1522
1522
  * @param {string} ciphertext
1523
1523
  * @returns {PrivateKeyCiphertext}
1524
1524
  */
@@ -1572,7 +1572,7 @@ class Program {
1572
1572
  * Create a program from a program string
1573
1573
  *
1574
1574
  * @param {string} program Aleo program source code
1575
- * @returns {Program | Error} Program object
1575
+ * @returns {Program} Program object
1576
1576
  * @param {string} program
1577
1577
  * @returns {Program}
1578
1578
  */
@@ -1660,7 +1660,7 @@ class Program {
1660
1660
  * to generate a web form to capture user inputs for an execution of a function.
1661
1661
  *
1662
1662
  * @param {string} function_name Name of the function to get inputs for
1663
- * @returns {Array | Error} Array of function inputs
1663
+ * @returns {Array} Array of function inputs
1664
1664
  *
1665
1665
  * @example
1666
1666
  * const expected_inputs = [
@@ -1715,7 +1715,7 @@ class Program {
1715
1715
  /**
1716
1716
  * Get a the list of a program's mappings and the names/types of their keys and values.
1717
1717
  *
1718
- * @returns {Array | Error} - An array of objects representing the mappings in the program
1718
+ * @returns {Array} - An array of objects representing the mappings in the program
1719
1719
  * @example
1720
1720
  * const expected_mappings = [
1721
1721
  * {
@@ -1751,7 +1751,7 @@ class Program {
1751
1751
  * Get a javascript object representation of a program record and its types
1752
1752
  *
1753
1753
  * @param {string} record_name Name of the record to get members for
1754
- * @returns {Object | Error} Object containing the record name, type, and members
1754
+ * @returns {Object} Object containing the record name, type, and members
1755
1755
  *
1756
1756
  * @example
1757
1757
  *
@@ -1799,7 +1799,7 @@ class Program {
1799
1799
  * Get a javascript object representation of a program struct and its types
1800
1800
  *
1801
1801
  * @param {string} struct_name Name of the struct to get members for
1802
- * @returns {Array | Error} Array containing the struct members
1802
+ * @returns {Array} Array containing the struct members
1803
1803
  *
1804
1804
  * @example
1805
1805
  *
@@ -1994,7 +1994,7 @@ class ProgramManager {
1994
1994
  * are a string representing the program source code \{ "hello.aleo": "hello.aleo source code" \}
1995
1995
  * @param fee_proving_key (optional) Provide a proving key to use for the fee execution
1996
1996
  * @param fee_verifying_key (optional) Provide a verifying key to use for the fee execution
1997
- * @returns {Transaction | Error}
1997
+ * @returns {Transaction}
1998
1998
  * @param {PrivateKey} private_key
1999
1999
  * @param {string} program
2000
2000
  * @param {number} fee_credits
@@ -2044,7 +2044,7 @@ class ProgramManager {
2044
2044
  * @param imports (optional) Provide a list of imports to use for the deployment fee estimation
2045
2045
  * in the form of a javascript object where the keys are a string of the program name and the values
2046
2046
  * are a string representing the program source code \{ "hello.aleo": "hello.aleo source code" \}
2047
- * @returns {u64 | Error}
2047
+ * @returns {u64}
2048
2048
  * @param {string} program
2049
2049
  * @param {object | undefined} [imports]
2050
2050
  * @returns {Promise<bigint>}
@@ -2063,7 +2063,7 @@ class ProgramManager {
2063
2063
  * Disclaimer: Fee estimation is experimental and may not represent a correct estimate on any current or future network
2064
2064
  *
2065
2065
  * @param name The name of the program to be deployed
2066
- * @returns {u64 | Error}
2066
+ * @returns {u64}
2067
2067
  * @param {string} name
2068
2068
  * @returns {bigint}
2069
2069
  */
@@ -2163,7 +2163,7 @@ class ProgramManager {
2163
2163
  * @param verifying_key (optional) Provide a verifying key to use for the function execution
2164
2164
  * @param fee_proving_key (optional) Provide a proving key to use for the fee execution
2165
2165
  * @param fee_verifying_key (optional) Provide a verifying key to use for the fee execution
2166
- * @returns {Transaction | Error}
2166
+ * @returns {Transaction}
2167
2167
  * @param {PrivateKey} private_key
2168
2168
  * @param {string} program
2169
2169
  * @param {string} _function
@@ -2237,7 +2237,7 @@ class ProgramManager {
2237
2237
  * are a string representing the program source code \{ "hello.aleo": "hello.aleo source code" \}
2238
2238
  * @param proving_key (optional) Provide a verifying key to use for the fee estimation
2239
2239
  * @param verifying_key (optional) Provide a verifying key to use for the fee estimation
2240
- * @returns {u64 | Error} Fee in microcredits
2240
+ * @returns {u64} Fee in microcredits
2241
2241
  * @param {PrivateKey} private_key
2242
2242
  * @param {string} program
2243
2243
  * @param {string} _function
@@ -2284,7 +2284,7 @@ class ProgramManager {
2284
2284
  *
2285
2285
  * @param program The program containing the function to estimate the finalize fee for
2286
2286
  * @param function The function to estimate the finalize fee for
2287
- * @returns {u64 | Error} Fee in microcredits
2287
+ * @returns {u64} Fee in microcredits
2288
2288
  * @param {string} program
2289
2289
  * @param {string} _function
2290
2290
  * @returns {bigint}
@@ -2322,7 +2322,7 @@ class ProgramManager {
2322
2322
  * @param join_verifying_key (optional) Provide a verifying key to use for the join function
2323
2323
  * @param fee_proving_key (optional) Provide a proving key to use for the fee execution
2324
2324
  * @param fee_verifying_key (optional) Provide a verifying key to use for the fee execution
2325
- * @returns {Transaction | Error} Transaction object
2325
+ * @returns {Transaction} Transaction object
2326
2326
  * @param {PrivateKey} private_key
2327
2327
  * @param {RecordPlaintext} record_1
2328
2328
  * @param {RecordPlaintext} record_2
@@ -2387,7 +2387,7 @@ class ProgramManager {
2387
2387
  * @param url The url of the Aleo network node to send the transaction to
2388
2388
  * @param split_proving_key (optional) Provide a proving key to use for the split function
2389
2389
  * @param split_verifying_key (optional) Provide a verifying key to use for the split function
2390
- * @returns {Transaction | Error} Transaction object
2390
+ * @returns {Transaction} Transaction object
2391
2391
  * @param {PrivateKey} private_key
2392
2392
  * @param {number} split_amount
2393
2393
  * @param {RecordPlaintext} amount_record
@@ -2436,7 +2436,7 @@ class ProgramManager {
2436
2436
  * function
2437
2437
  * @param fee_proving_key (optional) Provide a proving key to use for the fee execution
2438
2438
  * @param fee_verifying_key (optional) Provide a verifying key to use for the fee execution
2439
- * @returns {Transaction | Error}
2439
+ * @returns {Transaction}
2440
2440
  * @param {PrivateKey} private_key
2441
2441
  * @param {number} amount_credits
2442
2442
  * @param {string} recipient
@@ -2796,7 +2796,7 @@ class ProvingKey {
2796
2796
  * Construct a new proving key from a byte array
2797
2797
  *
2798
2798
  * @param {Uint8Array} bytes Byte array representation of a proving key
2799
- * @returns {ProvingKey | Error}
2799
+ * @returns {ProvingKey}
2800
2800
  * @param {Uint8Array} bytes
2801
2801
  * @returns {ProvingKey}
2802
2802
  */
@@ -2820,7 +2820,7 @@ class ProvingKey {
2820
2820
  /**
2821
2821
  * Create a proving key from string
2822
2822
  *
2823
- * @param {string | Error} String representation of the proving key
2823
+ * @param {string} String representation of the proving key
2824
2824
  * @param {string} string
2825
2825
  * @returns {ProvingKey}
2826
2826
  */
@@ -2844,7 +2844,7 @@ class ProvingKey {
2844
2844
  /**
2845
2845
  * Return the byte representation of a proving key
2846
2846
  *
2847
- * @returns {Uint8Array | Error} Byte array representation of a proving key
2847
+ * @returns {Uint8Array} Byte array representation of a proving key
2848
2848
  * @returns {Uint8Array}
2849
2849
  */
2850
2850
  toBytes() {
@@ -2920,7 +2920,7 @@ class RecordCiphertext {
2920
2920
  * Create a record ciphertext from a string
2921
2921
  *
2922
2922
  * @param {string} record String representation of a record ciphertext
2923
- * @returns {RecordCiphertext | Error} Record ciphertext
2923
+ * @returns {RecordCiphertext} Record ciphertext
2924
2924
  * @param {string} record
2925
2925
  * @returns {RecordCiphertext}
2926
2926
  */
@@ -2968,7 +2968,7 @@ class RecordCiphertext {
2968
2968
  * decrypt if the record was encrypted by the account corresponding to the view key
2969
2969
  *
2970
2970
  * @param {ViewKey} view_key View key used to decrypt the ciphertext
2971
- * @returns {RecordPlaintext | Error} Record plaintext object
2971
+ * @returns {RecordPlaintext} Record plaintext object
2972
2972
  * @param {ViewKey} view_key
2973
2973
  * @returns {RecordPlaintext}
2974
2974
  */
@@ -3058,7 +3058,7 @@ class RecordPlaintext {
3058
3058
  * Return a record plaintext from a string.
3059
3059
  *
3060
3060
  * @param {string} record String representation of a plaintext representation of an Aleo record
3061
- * @returns {RecordPlaintext | Error} Record plaintext
3061
+ * @returns {RecordPlaintext} Record plaintext
3062
3062
  * @param {string} record
3063
3063
  * @returns {RecordPlaintext}
3064
3064
  */
@@ -3139,7 +3139,7 @@ class RecordPlaintext {
3139
3139
  * @param {PrivateKey} private_key Private key of the account that owns the record
3140
3140
  * @param {string} program_id Program ID of the program that the record is associated with
3141
3141
  * @param {string} record_name Name of the record
3142
- * @returns {string | Error} Serial number of the record
3142
+ * @returns {string} Serial number of the record
3143
3143
  * @param {PrivateKey} private_key
3144
3144
  * @param {string} program_id
3145
3145
  * @param {string} record_name
@@ -3309,7 +3309,7 @@ class Transaction {
3309
3309
  * Create a transaction from a string
3310
3310
  *
3311
3311
  * @param {string} transaction String representation of a transaction
3312
- * @returns {Transaction | Error}
3312
+ * @returns {Transaction}
3313
3313
  * @param {string} transaction
3314
3314
  * @returns {Transaction}
3315
3315
  */
@@ -3766,7 +3766,7 @@ class VerifyingKey {
3766
3766
  * Construct a new verifying key from a byte array
3767
3767
  *
3768
3768
  * @param {Uint8Array} bytes Byte representation of a verifying key
3769
- * @returns {VerifyingKey | Error}
3769
+ * @returns {VerifyingKey}
3770
3770
  * @param {Uint8Array} bytes
3771
3771
  * @returns {VerifyingKey}
3772
3772
  */
@@ -3791,7 +3791,7 @@ class VerifyingKey {
3791
3791
  * Create a verifying key from string
3792
3792
  *
3793
3793
  * @param {String} string String representation of a verifying key
3794
- * @returns {VerifyingKey | Error}
3794
+ * @returns {VerifyingKey}
3795
3795
  * @param {string} string
3796
3796
  * @returns {VerifyingKey}
3797
3797
  */
@@ -3815,7 +3815,7 @@ class VerifyingKey {
3815
3815
  /**
3816
3816
  * Create a byte array from a verifying key
3817
3817
  *
3818
- * @returns {Uint8Array | Error} Byte representation of a verifying key
3818
+ * @returns {Uint8Array} Byte representation of a verifying key
3819
3819
  * @returns {Uint8Array}
3820
3820
  */
3821
3821
  toBytes() {
@@ -4155,28 +4155,28 @@ function __wbg_get_imports() {
4155
4155
  const ret = getObject(arg0).call(getObject(arg1), getObject(arg2));
4156
4156
  return addHeapObject(ret);
4157
4157
  }, arguments) };
4158
- imports.wbg.__wbg_log_0159ca40cddf5b15 = function(arg0, arg1) {
4159
- console.log(getStringFromWasm0(arg0, arg1));
4160
- };
4161
- imports.wbg.__wbg_newwithlength_66ae46612e7f0234 = function(arg0) {
4162
- const ret = new Array(arg0 >>> 0);
4163
- return addHeapObject(ret);
4164
- };
4165
- imports.wbg.__wbg_set_d4638f722068f043 = function(arg0, arg1, arg2) {
4166
- getObject(arg0)[arg1 >>> 0] = takeObject(arg2);
4167
- };
4168
4158
  imports.wbg.__wbg_transaction_new = function(arg0) {
4169
4159
  const ret = Transaction.__wrap(arg0);
4170
4160
  return addHeapObject(ret);
4171
4161
  };
4162
+ imports.wbg.__wbg_keypair_new = function(arg0) {
4163
+ const ret = KeyPair.__wrap(arg0);
4164
+ return addHeapObject(ret);
4165
+ };
4166
+ imports.wbg.__wbg_log_9388602cb1684929 = function(arg0, arg1) {
4167
+ console.log(getStringFromWasm0(arg0, arg1));
4168
+ };
4172
4169
  imports.wbg.__wbindgen_bigint_from_u64 = function(arg0) {
4173
4170
  const ret = BigInt.asUintN(64, arg0);
4174
4171
  return addHeapObject(ret);
4175
4172
  };
4176
- imports.wbg.__wbg_keypair_new = function(arg0) {
4177
- const ret = KeyPair.__wrap(arg0);
4173
+ imports.wbg.__wbg_newwithlength_66ae46612e7f0234 = function(arg0) {
4174
+ const ret = new Array(arg0 >>> 0);
4178
4175
  return addHeapObject(ret);
4179
4176
  };
4177
+ imports.wbg.__wbg_set_d4638f722068f043 = function(arg0, arg1, arg2) {
4178
+ getObject(arg0)[arg1 >>> 0] = takeObject(arg2);
4179
+ };
4180
4180
  imports.wbg.__wbindgen_module = function() {
4181
4181
  const ret = __wbg_init.__wbindgen_wasm_module;
4182
4182
  return addHeapObject(ret);
@@ -4185,7 +4185,7 @@ function __wbg_get_imports() {
4185
4185
  const ret = wasm.memory;
4186
4186
  return addHeapObject(ret);
4187
4187
  };
4188
- imports.wbg.__wbg_spawnWorker_f6acaddb2e29dc4a = function(arg0, arg1, arg2, arg3) {
4188
+ imports.wbg.__wbg_spawnWorker_df78bbd4c32ac5b6 = function(arg0, arg1, arg2, arg3) {
4189
4189
  const ret = spawnWorker(getObject(arg0), getObject(arg1), getObject(arg2), arg3 >>> 0);
4190
4190
  return addHeapObject(ret);
4191
4191
  };
@@ -4453,12 +4453,12 @@ function __wbg_get_imports() {
4453
4453
  getInt32Memory0()[arg0 / 4 + 1] = len1;
4454
4454
  getInt32Memory0()[arg0 / 4 + 0] = ptr1;
4455
4455
  }, arguments) };
4456
- imports.wbg.__wbindgen_closure_wrapper5837 = function(arg0, arg1, arg2) {
4457
- const ret = makeMutClosure(arg0, arg1, 538, __wbg_adapter_34);
4456
+ imports.wbg.__wbindgen_closure_wrapper5975 = function(arg0, arg1, arg2) {
4457
+ const ret = makeMutClosure(arg0, arg1, 622, __wbg_adapter_34);
4458
4458
  return addHeapObject(ret);
4459
4459
  };
4460
- imports.wbg.__wbindgen_closure_wrapper5862 = function(arg0, arg1, arg2) {
4461
- const ret = makeMutClosure(arg0, arg1, 538, __wbg_adapter_34);
4460
+ imports.wbg.__wbindgen_closure_wrapper6001 = function(arg0, arg1, arg2) {
4461
+ const ret = makeMutClosure(arg0, arg1, 622, __wbg_adapter_34);
4462
4462
  return addHeapObject(ret);
4463
4463
  };
4464
4464
 
@@ -4540,7 +4540,7 @@ var exports = /*#__PURE__*/Object.freeze({
4540
4540
  verifyFunctionExecution: verifyFunctionExecution
4541
4541
  });
4542
4542
 
4543
- const wasm_path = "assets/aleo_wasm.wasm";
4543
+ const wasm_path = "aleo_wasm.wasm";
4544
4544
 
4545
4545
 
4546
4546
  var Cargo = async (opt = {}) => {