@provablehq/wasm 0.8.7 → 0.8.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.
@@ -263,7 +263,7 @@ function __wbg_adapter_40(arg0, arg1, arg2) {
263
263
  wasm.__wbindgen_export_6(arg0, arg1, addHeapObject(arg2));
264
264
  }
265
265
 
266
- function __wbg_adapter_491(arg0, arg1, arg2, arg3) {
266
+ function __wbg_adapter_524(arg0, arg1, arg2, arg3) {
267
267
  wasm.__wbindgen_export_7(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
268
268
  }
269
269
 
@@ -336,6 +336,147 @@ class Address {
336
336
  const ret = wasm.address_from_compute_key(compute_key.__wbg_ptr);
337
337
  return Address.__wrap(ret);
338
338
  }
339
+ /**
340
+ * Get an address from a series of bytes.
341
+ *
342
+ * @param {Uint8Array} bytes A left endian byte array representing the address.
343
+ *
344
+ * @returns {Address} The address object.
345
+ * @param {Uint8Array} bytes
346
+ * @returns {Address}
347
+ */
348
+ static fromBytesLe(bytes) {
349
+ try {
350
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
351
+ wasm.address_fromBytesLe(retptr, addHeapObject(bytes));
352
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
353
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
354
+ var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
355
+ if (r2) {
356
+ throw takeObject(r1);
357
+ }
358
+ return Address.__wrap(r0);
359
+ } finally {
360
+ wasm.__wbindgen_add_to_stack_pointer(16);
361
+ }
362
+ }
363
+ /**
364
+ * Get the left endian byte array representation of the address.
365
+ * @returns {Uint8Array}
366
+ */
367
+ toBytesLe() {
368
+ try {
369
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
370
+ wasm.address_toBytesLe(retptr, this.__wbg_ptr);
371
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
372
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
373
+ var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
374
+ if (r2) {
375
+ throw takeObject(r1);
376
+ }
377
+ return takeObject(r0);
378
+ } finally {
379
+ wasm.__wbindgen_add_to_stack_pointer(16);
380
+ }
381
+ }
382
+ /**
383
+ * Get an address from a series of bits represented as a boolean array.
384
+ *
385
+ * @param {Array} bits A left endian boolean array representing the bits of the address.
386
+ *
387
+ * @returns {Address} The address object.
388
+ * @param {Array<any>} bits
389
+ * @returns {Address}
390
+ */
391
+ static fromBitsLe(bits) {
392
+ try {
393
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
394
+ wasm.address_fromBitsLe(retptr, addHeapObject(bits));
395
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
396
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
397
+ var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
398
+ if (r2) {
399
+ throw takeObject(r1);
400
+ }
401
+ return Address.__wrap(r0);
402
+ } finally {
403
+ wasm.__wbindgen_add_to_stack_pointer(16);
404
+ }
405
+ }
406
+ /**
407
+ * Get the left endian boolean array representation of the bits of the address.
408
+ * @returns {Array<any>}
409
+ */
410
+ toBitsLe() {
411
+ const ret = wasm.address_toBitsLe(this.__wbg_ptr);
412
+ return takeObject(ret);
413
+ }
414
+ /**
415
+ * Get an address object from an array of fields.
416
+ *
417
+ * @param {Array} fields An array of fields.
418
+ *
419
+ * @returns {Plaintext} The address object.
420
+ * @param {Array<any>} fields
421
+ * @returns {Address}
422
+ */
423
+ static fromFields(fields) {
424
+ try {
425
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
426
+ wasm.address_fromFields(retptr, addHeapObject(fields));
427
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
428
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
429
+ var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
430
+ if (r2) {
431
+ throw takeObject(r1);
432
+ }
433
+ return Address.__wrap(r0);
434
+ } finally {
435
+ wasm.__wbindgen_add_to_stack_pointer(16);
436
+ }
437
+ }
438
+ /**
439
+ * Get the field array representation of the address.
440
+ * @returns {Array<any>}
441
+ */
442
+ toFields() {
443
+ try {
444
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
445
+ wasm.address_toFields(retptr, this.__wbg_ptr);
446
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
447
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
448
+ var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
449
+ if (r2) {
450
+ throw takeObject(r1);
451
+ }
452
+ return takeObject(r0);
453
+ } finally {
454
+ wasm.__wbindgen_add_to_stack_pointer(16);
455
+ }
456
+ }
457
+ /**
458
+ * Get an address object from a group.
459
+ *
460
+ * @param {Group} group The group object.
461
+ *
462
+ * @returns {Address} The address object.
463
+ * @param {Group} group
464
+ * @returns {Address}
465
+ */
466
+ static fromGroup(group) {
467
+ _assertClass(group, Group);
468
+ var ptr0 = group.__destroy_into_raw();
469
+ const ret = wasm.address_fromGroup(ptr0);
470
+ return Address.__wrap(ret);
471
+ }
472
+ /**
473
+ * Get the group representation of the address object.
474
+ * @returns {Group}
475
+ */
476
+ toGroup() {
477
+ const ret = wasm.address_toGroup(this.__wbg_ptr);
478
+ return Group.__wrap(ret);
479
+ }
339
480
  /**
340
481
  * Create an aleo address object from a string representation of an address
341
482
  *
@@ -373,6 +514,14 @@ class Address {
373
514
  wasm.__wbindgen_export_2(deferred1_0, deferred1_1, 1);
374
515
  }
375
516
  }
517
+ /**
518
+ * Get the plaintext representation of the address.
519
+ * @returns {Plaintext}
520
+ */
521
+ toPlaintext() {
522
+ const ret = wasm.address_toPlaintext(this.__wbg_ptr);
523
+ return Plaintext.__wrap(ret);
524
+ }
376
525
  /**
377
526
  * Verify a signature for a message signed by the address
378
527
  *
@@ -1140,6 +1289,100 @@ class Ciphertext {
1140
1289
  wasm.__wbindgen_add_to_stack_pointer(16);
1141
1290
  }
1142
1291
  }
1292
+ /**
1293
+ * Get the left endian byte array representation of the ciphertext.
1294
+ * @returns {Uint8Array}
1295
+ */
1296
+ toBytesLe() {
1297
+ try {
1298
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
1299
+ wasm.ciphertext_toBytes(retptr, this.__wbg_ptr);
1300
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
1301
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
1302
+ var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
1303
+ if (r2) {
1304
+ throw takeObject(r1);
1305
+ }
1306
+ return takeObject(r0);
1307
+ } finally {
1308
+ wasm.__wbindgen_add_to_stack_pointer(16);
1309
+ }
1310
+ }
1311
+ /**
1312
+ * Get a ciphertext object from a series of bits represented as a boolean array.
1313
+ *
1314
+ * @param {Array} bits A left endian boolean array representing the bits of the ciphertext.
1315
+ *
1316
+ * @returns {Ciphertext} The ciphertext object.
1317
+ * @param {Array<any>} bits
1318
+ * @returns {Ciphertext}
1319
+ */
1320
+ static fromBitsLe(bits) {
1321
+ try {
1322
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
1323
+ wasm.ciphertext_fromBitsLe(retptr, addHeapObject(bits));
1324
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
1325
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
1326
+ var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
1327
+ if (r2) {
1328
+ throw takeObject(r1);
1329
+ }
1330
+ return Ciphertext.__wrap(r0);
1331
+ } finally {
1332
+ wasm.__wbindgen_add_to_stack_pointer(16);
1333
+ }
1334
+ }
1335
+ /**
1336
+ * Get the left endian boolean array representation of the bits of the ciphertext.
1337
+ * @returns {Array<any>}
1338
+ */
1339
+ toBitsLe() {
1340
+ const ret = wasm.ciphertext_toBitsLe(this.__wbg_ptr);
1341
+ return takeObject(ret);
1342
+ }
1343
+ /**
1344
+ * Get a ciphertext object from an array of fields.
1345
+ *
1346
+ * @param {Array} fields An array of fields.
1347
+ *
1348
+ * @returns {Ciphertext} The ciphertext object.
1349
+ * @param {Array<any>} fields
1350
+ * @returns {Ciphertext}
1351
+ */
1352
+ static fromFields(fields) {
1353
+ try {
1354
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
1355
+ wasm.ciphertext_fromFields(retptr, addHeapObject(fields));
1356
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
1357
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
1358
+ var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
1359
+ if (r2) {
1360
+ throw takeObject(r1);
1361
+ }
1362
+ return Ciphertext.__wrap(r0);
1363
+ } finally {
1364
+ wasm.__wbindgen_add_to_stack_pointer(16);
1365
+ }
1366
+ }
1367
+ /**
1368
+ * Get the field array representation of the ciphertext.
1369
+ * @returns {Array<any>}
1370
+ */
1371
+ toFields() {
1372
+ try {
1373
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
1374
+ wasm.ciphertext_toFields(retptr, this.__wbg_ptr);
1375
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
1376
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
1377
+ var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
1378
+ if (r2) {
1379
+ throw takeObject(r1);
1380
+ }
1381
+ return takeObject(r0);
1382
+ } finally {
1383
+ wasm.__wbindgen_add_to_stack_pointer(16);
1384
+ }
1385
+ }
1143
1386
  /**
1144
1387
  * Deserialize a Ciphertext string into a Ciphertext object.
1145
1388
  *
@@ -1277,7 +1520,7 @@ class ComputeKey {
1277
1520
  * @returns {Group}
1278
1521
  */
1279
1522
  pk_sig() {
1280
- const ret = wasm.computekey_pk_sig(this.__wbg_ptr);
1523
+ const ret = wasm.address_toGroup(this.__wbg_ptr);
1281
1524
  return Group.__wrap(ret);
1282
1525
  }
1283
1526
  /**
@@ -2024,9 +2267,28 @@ class Group {
2024
2267
  * @returns {Array<any>}
2025
2268
  */
2026
2269
  toBitsLe() {
2027
- const ret = wasm.group_toBitsLe(this.__wbg_ptr);
2270
+ const ret = wasm.address_toBitsLe(this.__wbg_ptr);
2028
2271
  return takeObject(ret);
2029
2272
  }
2273
+ /**
2274
+ * Get the field array representation of the group.
2275
+ * @returns {Array<any>}
2276
+ */
2277
+ toFields() {
2278
+ try {
2279
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
2280
+ wasm.group_toFields(retptr, this.__wbg_ptr);
2281
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
2282
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
2283
+ var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
2284
+ if (r2) {
2285
+ throw takeObject(r1);
2286
+ }
2287
+ return takeObject(r0);
2288
+ } finally {
2289
+ wasm.__wbindgen_add_to_stack_pointer(16);
2290
+ }
2291
+ }
2030
2292
  /**
2031
2293
  * Get the x-coordinate of the group element.
2032
2294
  * @returns {Field}
@@ -3030,9 +3292,7 @@ class Plaintext {
3030
3292
  }
3031
3293
  }
3032
3294
  /**
3033
- * Generate a random plaintext element from a series of bytes.
3034
- *
3035
- * @param {Uint8Array} bytes A left endian byte array representing the plaintext.
3295
+ * Get the left endian byte array representation of the plaintext.
3036
3296
  * @returns {Uint8Array}
3037
3297
  */
3038
3298
  toBytesLe() {
@@ -3050,6 +3310,81 @@ class Plaintext {
3050
3310
  wasm.__wbindgen_add_to_stack_pointer(16);
3051
3311
  }
3052
3312
  }
3313
+ /**
3314
+ * Get a plaintext object from a series of bits represented as a boolean array.
3315
+ *
3316
+ * @param {Array} bits A left endian boolean array representing the bits plaintext.
3317
+ *
3318
+ * @returns {Plaintext} The plaintext object.
3319
+ * @param {Array<any>} bits
3320
+ * @returns {Plaintext}
3321
+ */
3322
+ static fromBitsLe(bits) {
3323
+ try {
3324
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
3325
+ wasm.plaintext_fromBitsLe(retptr, addHeapObject(bits));
3326
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
3327
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
3328
+ var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
3329
+ if (r2) {
3330
+ throw takeObject(r1);
3331
+ }
3332
+ return Plaintext.__wrap(r0);
3333
+ } finally {
3334
+ wasm.__wbindgen_add_to_stack_pointer(16);
3335
+ }
3336
+ }
3337
+ /**
3338
+ * Get the left endian boolean array representation of the bits of the plaintext.
3339
+ * @returns {Array<any>}
3340
+ */
3341
+ toBitsLe() {
3342
+ const ret = wasm.plaintext_toBitsLe(this.__wbg_ptr);
3343
+ return takeObject(ret);
3344
+ }
3345
+ /**
3346
+ * Get a plaintext object from an array of fields.
3347
+ *
3348
+ * @param {Array} fields An array of fields.
3349
+ *
3350
+ * @returns {Plaintext} The plaintext object.
3351
+ * @param {Array<any>} fields
3352
+ * @returns {Plaintext}
3353
+ */
3354
+ static fromFields(fields) {
3355
+ try {
3356
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
3357
+ wasm.plaintext_fromFields(retptr, addHeapObject(fields));
3358
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
3359
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
3360
+ var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
3361
+ if (r2) {
3362
+ throw takeObject(r1);
3363
+ }
3364
+ return Plaintext.__wrap(r0);
3365
+ } finally {
3366
+ wasm.__wbindgen_add_to_stack_pointer(16);
3367
+ }
3368
+ }
3369
+ /**
3370
+ * Get the field array representation of the plaintext.
3371
+ * @returns {Array<any>}
3372
+ */
3373
+ toFields() {
3374
+ try {
3375
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
3376
+ wasm.plaintext_toFields(retptr, this.__wbg_ptr);
3377
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
3378
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
3379
+ var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
3380
+ if (r2) {
3381
+ throw takeObject(r1);
3382
+ }
3383
+ return takeObject(r0);
3384
+ } finally {
3385
+ wasm.__wbindgen_add_to_stack_pointer(16);
3386
+ }
3387
+ }
3053
3388
  /**
3054
3389
  * Returns the string representation of the plaintext.
3055
3390
  *
@@ -4325,7 +4660,7 @@ class ProgramManager {
4325
4660
  * form \{"program_name1": "program_source_code", "program_name2": "program_source_code", ..\}.
4326
4661
  * Note that all imported programs must be deployed on chain before the main program in order
4327
4662
  * for the deployment to succeed
4328
- * @param fee_credits The amount of credits to pay as a fee
4663
+ * @param priority_fee_credits The optional priority fee to be paid for the transaction
4329
4664
  * @param fee_record The record to spend the fee from
4330
4665
  * @param url The url of the Aleo network node to send the transaction to
4331
4666
  * @param imports (optional) Provide a list of imports to use for the program deployment in the
@@ -4336,7 +4671,7 @@ class ProgramManager {
4336
4671
  * @returns {Transaction}
4337
4672
  * @param {PrivateKey} private_key
4338
4673
  * @param {string} program
4339
- * @param {number} fee_credits
4674
+ * @param {number} priority_fee_credits
4340
4675
  * @param {RecordPlaintext | null} [fee_record]
4341
4676
  * @param {string | null} [url]
4342
4677
  * @param {object | null} [imports]
@@ -4345,7 +4680,7 @@ class ProgramManager {
4345
4680
  * @param {OfflineQuery | null} [offline_query]
4346
4681
  * @returns {Promise<Transaction>}
4347
4682
  */
4348
- static buildDeploymentTransaction(private_key, program, fee_credits, fee_record, url, imports, fee_proving_key, fee_verifying_key, offline_query) {
4683
+ static buildDeploymentTransaction(private_key, program, priority_fee_credits, fee_record, url, imports, fee_proving_key, fee_verifying_key, offline_query) {
4349
4684
  _assertClass(private_key, PrivateKey);
4350
4685
  const ptr0 = passStringToWasm0(program, wasm.__wbindgen_export_3, wasm.__wbindgen_export_4);
4351
4686
  const len0 = WASM_VECTOR_LEN;
@@ -4371,7 +4706,7 @@ class ProgramManager {
4371
4706
  _assertClass(offline_query, OfflineQuery);
4372
4707
  ptr5 = offline_query.__destroy_into_raw();
4373
4708
  }
4374
- const ret = wasm.programmanager_buildDeploymentTransaction(private_key.__wbg_ptr, ptr0, len0, fee_credits, ptr1, ptr2, len2, isLikeNone(imports) ? 0 : addHeapObject(imports), ptr3, ptr4, ptr5);
4709
+ const ret = wasm.programmanager_buildDeploymentTransaction(private_key.__wbg_ptr, ptr0, len0, priority_fee_credits, ptr1, ptr2, len2, isLikeNone(imports) ? 0 : addHeapObject(imports), ptr3, ptr4, ptr5);
4375
4710
  return takeObject(ret);
4376
4711
  }
4377
4712
  /**
@@ -4488,7 +4823,7 @@ class ProgramManager {
4488
4823
  * @param program The source code of the program being executed
4489
4824
  * @param function The name of the function to execute
4490
4825
  * @param inputs A javascript array of inputs to the function
4491
- * @param fee_credits The amount of credits to pay as a fee
4826
+ * @param priority_fee_credits The optional priority fee to be paid for the transaction
4492
4827
  * @param fee_record The record to spend the fee from
4493
4828
  * @param url The url of the Aleo network node to send the transaction to
4494
4829
  * If this is set to 'true' the keys synthesized (or passed in as optional parameters via the
@@ -4507,7 +4842,7 @@ class ProgramManager {
4507
4842
  * @param {string} program
4508
4843
  * @param {string} _function
4509
4844
  * @param {Array<any>} inputs
4510
- * @param {number} fee_credits
4845
+ * @param {number} priority_fee_credits
4511
4846
  * @param {RecordPlaintext | null} [fee_record]
4512
4847
  * @param {string | null} [url]
4513
4848
  * @param {object | null} [imports]
@@ -4518,7 +4853,7 @@ class ProgramManager {
4518
4853
  * @param {OfflineQuery | null} [offline_query]
4519
4854
  * @returns {Promise<Transaction>}
4520
4855
  */
4521
- static buildExecutionTransaction(private_key, program, _function, inputs, fee_credits, fee_record, url, imports, proving_key, verifying_key, fee_proving_key, fee_verifying_key, offline_query) {
4856
+ static buildExecutionTransaction(private_key, program, _function, inputs, priority_fee_credits, fee_record, url, imports, proving_key, verifying_key, fee_proving_key, fee_verifying_key, offline_query) {
4522
4857
  _assertClass(private_key, PrivateKey);
4523
4858
  const ptr0 = passStringToWasm0(program, wasm.__wbindgen_export_3, wasm.__wbindgen_export_4);
4524
4859
  const len0 = WASM_VECTOR_LEN;
@@ -4556,7 +4891,7 @@ class ProgramManager {
4556
4891
  _assertClass(offline_query, OfflineQuery);
4557
4892
  ptr8 = offline_query.__destroy_into_raw();
4558
4893
  }
4559
- const ret = wasm.programmanager_buildExecutionTransaction(private_key.__wbg_ptr, ptr0, len0, ptr1, len1, addHeapObject(inputs), fee_credits, ptr2, ptr3, len3, isLikeNone(imports) ? 0 : addHeapObject(imports), ptr4, ptr5, ptr6, ptr7, ptr8);
4894
+ const ret = wasm.programmanager_buildExecutionTransaction(private_key.__wbg_ptr, ptr0, len0, ptr1, len1, addHeapObject(inputs), priority_fee_credits, ptr2, ptr3, len3, isLikeNone(imports) ? 0 : addHeapObject(imports), ptr4, ptr5, ptr6, ptr7, ptr8);
4560
4895
  return takeObject(ret);
4561
4896
  }
4562
4897
  /**
@@ -4654,7 +4989,7 @@ class ProgramManager {
4654
4989
  * @param private_key The private key of the sender
4655
4990
  * @param record_1 The first record to combine
4656
4991
  * @param record_2 The second record to combine
4657
- * @param fee_credits The amount of credits to pay as a fee
4992
+ * @param priority_fee_credits The opptional priority fee to be paid for the transaction
4658
4993
  * @param fee_record The record to spend the fee from
4659
4994
  * @param url The url of the Aleo network node to send the transaction to
4660
4995
  * @param join_proving_key (optional) Provide a proving key to use for the join function
@@ -4665,7 +5000,7 @@ class ProgramManager {
4665
5000
  * @param {PrivateKey} private_key
4666
5001
  * @param {RecordPlaintext} record_1
4667
5002
  * @param {RecordPlaintext} record_2
4668
- * @param {number} fee_credits
5003
+ * @param {number} priority_fee_credits
4669
5004
  * @param {RecordPlaintext | null} [fee_record]
4670
5005
  * @param {string | null} [url]
4671
5006
  * @param {ProvingKey | null} [join_proving_key]
@@ -4675,7 +5010,7 @@ class ProgramManager {
4675
5010
  * @param {OfflineQuery | null} [offline_query]
4676
5011
  * @returns {Promise<Transaction>}
4677
5012
  */
4678
- static buildJoinTransaction(private_key, record_1, record_2, fee_credits, fee_record, url, join_proving_key, join_verifying_key, fee_proving_key, fee_verifying_key, offline_query) {
5013
+ static buildJoinTransaction(private_key, record_1, record_2, priority_fee_credits, fee_record, url, join_proving_key, join_verifying_key, fee_proving_key, fee_verifying_key, offline_query) {
4679
5014
  _assertClass(private_key, PrivateKey);
4680
5015
  _assertClass(record_1, RecordPlaintext);
4681
5016
  var ptr0 = record_1.__destroy_into_raw();
@@ -4713,7 +5048,7 @@ class ProgramManager {
4713
5048
  _assertClass(offline_query, OfflineQuery);
4714
5049
  ptr8 = offline_query.__destroy_into_raw();
4715
5050
  }
4716
- const ret = wasm.programmanager_buildJoinTransaction(private_key.__wbg_ptr, ptr0, ptr1, fee_credits, ptr2, ptr3, len3, ptr4, ptr5, ptr6, ptr7, ptr8);
5051
+ const ret = wasm.programmanager_buildJoinTransaction(private_key.__wbg_ptr, ptr0, ptr1, priority_fee_credits, ptr2, ptr3, len3, ptr4, ptr5, ptr6, ptr7, ptr8);
4717
5052
  return takeObject(ret);
4718
5053
  }
4719
5054
  /**
@@ -4768,7 +5103,7 @@ class ProgramManager {
4768
5103
  * @param recipient The recipient of the transaction
4769
5104
  * @param transfer_type The type of the transfer (options: "private", "public", "private_to_public", "public_to_private")
4770
5105
  * @param amount_record The record to fund the amount from
4771
- * @param fee_credits The amount of credits to pay as a fee
5106
+ * @param priority_fee_credits The optional priority fee to be paid for the transaction
4772
5107
  * @param fee_record The record to spend the fee from
4773
5108
  * @param url The url of the Aleo network node to send the transaction to
4774
5109
  * @param transfer_verifying_key (optional) Provide a verifying key to use for the transfer
@@ -4781,7 +5116,7 @@ class ProgramManager {
4781
5116
  * @param {string} recipient
4782
5117
  * @param {string} transfer_type
4783
5118
  * @param {RecordPlaintext | null | undefined} amount_record
4784
- * @param {number} fee_credits
5119
+ * @param {number} priority_fee_credits
4785
5120
  * @param {RecordPlaintext | null} [fee_record]
4786
5121
  * @param {string | null} [url]
4787
5122
  * @param {ProvingKey | null} [transfer_proving_key]
@@ -4791,7 +5126,7 @@ class ProgramManager {
4791
5126
  * @param {OfflineQuery | null} [offline_query]
4792
5127
  * @returns {Promise<Transaction>}
4793
5128
  */
4794
- static buildTransferTransaction(private_key, amount_credits, recipient, transfer_type, amount_record, fee_credits, fee_record, url, transfer_proving_key, transfer_verifying_key, fee_proving_key, fee_verifying_key, offline_query) {
5129
+ static buildTransferTransaction(private_key, amount_credits, recipient, transfer_type, amount_record, priority_fee_credits, fee_record, url, transfer_proving_key, transfer_verifying_key, fee_proving_key, fee_verifying_key, offline_query) {
4795
5130
  _assertClass(private_key, PrivateKey);
4796
5131
  const ptr0 = passStringToWasm0(recipient, wasm.__wbindgen_export_3, wasm.__wbindgen_export_4);
4797
5132
  const len0 = WASM_VECTOR_LEN;
@@ -4834,7 +5169,7 @@ class ProgramManager {
4834
5169
  _assertClass(offline_query, OfflineQuery);
4835
5170
  ptr9 = offline_query.__destroy_into_raw();
4836
5171
  }
4837
- const ret = wasm.programmanager_buildTransferTransaction(private_key.__wbg_ptr, amount_credits, ptr0, len0, ptr1, len1, ptr2, fee_credits, ptr3, ptr4, len4, ptr5, ptr6, ptr7, ptr8, ptr9);
5172
+ const ret = wasm.programmanager_buildTransferTransaction(private_key.__wbg_ptr, amount_credits, ptr0, len0, ptr1, len1, ptr2, priority_fee_credits, ptr3, ptr4, len4, ptr5, ptr6, ptr7, ptr8, ptr9);
4838
5173
  return takeObject(ret);
4839
5174
  }
4840
5175
  /**
@@ -5369,6 +5704,76 @@ class RecordCiphertext {
5369
5704
  wasm.__wbindgen_add_to_stack_pointer(16);
5370
5705
  }
5371
5706
  }
5707
+ /**
5708
+ * Get a record ciphertext object from a series of bytes.
5709
+ *
5710
+ * @param {Uint8Array} bytes A left endian byte array representing the record ciphertext.
5711
+ *
5712
+ * @returns {RecordCiphertext}
5713
+ * @param {Uint8Array} bytes
5714
+ * @returns {RecordCiphertext}
5715
+ */
5716
+ static fromBytesLe(bytes) {
5717
+ try {
5718
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
5719
+ wasm.recordciphertext_fromBytesLe(retptr, addHeapObject(bytes));
5720
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
5721
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
5722
+ var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
5723
+ if (r2) {
5724
+ throw takeObject(r1);
5725
+ }
5726
+ return RecordCiphertext.__wrap(r0);
5727
+ } finally {
5728
+ wasm.__wbindgen_add_to_stack_pointer(16);
5729
+ }
5730
+ }
5731
+ /**
5732
+ * Get the left endian byte array representation of the record ciphertext.
5733
+ * @returns {Uint8Array}
5734
+ */
5735
+ toBytesLe() {
5736
+ try {
5737
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
5738
+ wasm.recordciphertext_toBytesLe(retptr, this.__wbg_ptr);
5739
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
5740
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
5741
+ var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
5742
+ if (r2) {
5743
+ throw takeObject(r1);
5744
+ }
5745
+ return takeObject(r0);
5746
+ } finally {
5747
+ wasm.__wbindgen_add_to_stack_pointer(16);
5748
+ }
5749
+ }
5750
+ /**
5751
+ * Get the left endian boolean array representation of the record ciphertext bits.
5752
+ * @returns {Array<any>}
5753
+ */
5754
+ toBitsLe() {
5755
+ const ret = wasm.recordciphertext_toBitsLe(this.__wbg_ptr);
5756
+ return takeObject(ret);
5757
+ }
5758
+ /**
5759
+ * Get the field array representation of the record ciphertext.
5760
+ * @returns {Array<any>}
5761
+ */
5762
+ toFields() {
5763
+ try {
5764
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
5765
+ wasm.recordciphertext_toFields(retptr, this.__wbg_ptr);
5766
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
5767
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
5768
+ var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
5769
+ if (r2) {
5770
+ throw takeObject(r1);
5771
+ }
5772
+ return takeObject(r0);
5773
+ } finally {
5774
+ wasm.__wbindgen_add_to_stack_pointer(16);
5775
+ }
5776
+ }
5372
5777
  }
5373
5778
 
5374
5779
  const RecordPlaintextFinalization = (typeof FinalizationRegistry === 'undefined')
@@ -5576,6 +5981,80 @@ class RecordPlaintext {
5576
5981
  wasm.__wbindgen_export_2(deferred1_0, deferred1_1, 1);
5577
5982
  }
5578
5983
  }
5984
+ /**
5985
+ * Get a record plaintext object from a series of bytes.
5986
+ *
5987
+ * @param {Uint8Array} bytes A left endian byte array representing the record plaintext.
5988
+ *
5989
+ * @returns {RecordPlaintext} The record plaintext.
5990
+ * @param {Uint8Array} bytes
5991
+ * @returns {RecordPlaintext}
5992
+ */
5993
+ static fromBytesLe(bytes) {
5994
+ try {
5995
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
5996
+ wasm.recordplaintext_fromBytesLe(retptr, addHeapObject(bytes));
5997
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
5998
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
5999
+ var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
6000
+ if (r2) {
6001
+ throw takeObject(r1);
6002
+ }
6003
+ return RecordPlaintext.__wrap(r0);
6004
+ } finally {
6005
+ wasm.__wbindgen_add_to_stack_pointer(16);
6006
+ }
6007
+ }
6008
+ /**
6009
+ * Returns the left endian byte array representation of the record plaintext.
6010
+ *
6011
+ * @returns {Uint8Array} Byte array representation of the record plaintext.
6012
+ * @returns {Uint8Array}
6013
+ */
6014
+ toBytesLe() {
6015
+ try {
6016
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
6017
+ wasm.recordplaintext_toBytesLe(retptr, this.__wbg_ptr);
6018
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
6019
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
6020
+ var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
6021
+ if (r2) {
6022
+ throw takeObject(r1);
6023
+ }
6024
+ return takeObject(r0);
6025
+ } finally {
6026
+ wasm.__wbindgen_add_to_stack_pointer(16);
6027
+ }
6028
+ }
6029
+ /**
6030
+ * Returns the left endian boolean array representation of the record plaintext bits.
6031
+ *
6032
+ * @returns {Array} Boolean array representation of the record plaintext bits.
6033
+ * @returns {Array<any>}
6034
+ */
6035
+ toBitsLe() {
6036
+ const ret = wasm.recordplaintext_toBitsLe(this.__wbg_ptr);
6037
+ return takeObject(ret);
6038
+ }
6039
+ /**
6040
+ * Get the field array representation of the record plaintext.
6041
+ * @returns {Array<any>}
6042
+ */
6043
+ toFields() {
6044
+ try {
6045
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
6046
+ wasm.recordplaintext_toFields(retptr, this.__wbg_ptr);
6047
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
6048
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
6049
+ var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
6050
+ if (r2) {
6051
+ throw takeObject(r1);
6052
+ }
6053
+ return takeObject(r0);
6054
+ } finally {
6055
+ wasm.__wbindgen_add_to_stack_pointer(16);
6056
+ }
6057
+ }
5579
6058
  /**
5580
6059
  * Returns the amount of microcredits in the record
5581
6060
  *
@@ -6019,6 +6498,100 @@ class Signature {
6019
6498
  const ret = wasm.signature_verify(this.__wbg_ptr, address.__wbg_ptr, ptr0, len0);
6020
6499
  return ret !== 0;
6021
6500
  }
6501
+ /**
6502
+ * Get a signature from a series of bytes.
6503
+ *
6504
+ * @param {Uint8Array} bytes A left endian byte array representing the signature.
6505
+ *
6506
+ * @returns {Signature} The signature object.
6507
+ * @param {Uint8Array} bytes
6508
+ * @returns {Signature}
6509
+ */
6510
+ static fromBytesLe(bytes) {
6511
+ try {
6512
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
6513
+ wasm.signature_fromBytesLe(retptr, addHeapObject(bytes));
6514
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
6515
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
6516
+ var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
6517
+ if (r2) {
6518
+ throw takeObject(r1);
6519
+ }
6520
+ return Signature.__wrap(r0);
6521
+ } finally {
6522
+ wasm.__wbindgen_add_to_stack_pointer(16);
6523
+ }
6524
+ }
6525
+ /**
6526
+ * Get the left endian byte array representation of the signature.
6527
+ * @returns {Uint8Array}
6528
+ */
6529
+ toBytesLe() {
6530
+ try {
6531
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
6532
+ wasm.signature_toBytesLe(retptr, this.__wbg_ptr);
6533
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
6534
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
6535
+ var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
6536
+ if (r2) {
6537
+ throw takeObject(r1);
6538
+ }
6539
+ return takeObject(r0);
6540
+ } finally {
6541
+ wasm.__wbindgen_add_to_stack_pointer(16);
6542
+ }
6543
+ }
6544
+ /**
6545
+ * Get a signature from a series of bits represented as a boolean array.
6546
+ *
6547
+ * @param {Array} bits A left endian boolean array representing the bits of the signature.
6548
+ *
6549
+ * @returns {Signature} The signature object.
6550
+ * @param {Array<any>} bits
6551
+ * @returns {Signature}
6552
+ */
6553
+ static fromBitsLe(bits) {
6554
+ try {
6555
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
6556
+ wasm.signature_fromBitsLe(retptr, addHeapObject(bits));
6557
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
6558
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
6559
+ var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
6560
+ if (r2) {
6561
+ throw takeObject(r1);
6562
+ }
6563
+ return Signature.__wrap(r0);
6564
+ } finally {
6565
+ wasm.__wbindgen_add_to_stack_pointer(16);
6566
+ }
6567
+ }
6568
+ /**
6569
+ * Get the left endian boolean array representation of the bits of the signature.
6570
+ * @returns {Array<any>}
6571
+ */
6572
+ toBitsLe() {
6573
+ const ret = wasm.signature_toBitsLe(this.__wbg_ptr);
6574
+ return takeObject(ret);
6575
+ }
6576
+ /**
6577
+ * Get the field array representation of the signature.
6578
+ * @returns {Array<any>}
6579
+ */
6580
+ toFields() {
6581
+ try {
6582
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
6583
+ wasm.signature_toFields(retptr, this.__wbg_ptr);
6584
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
6585
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
6586
+ var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
6587
+ if (r2) {
6588
+ throw takeObject(r1);
6589
+ }
6590
+ return takeObject(r0);
6591
+ } finally {
6592
+ wasm.__wbindgen_add_to_stack_pointer(16);
6593
+ }
6594
+ }
6022
6595
  /**
6023
6596
  * Get a signature from a string representation of a signature
6024
6597
  *
@@ -6055,6 +6628,14 @@ class Signature {
6055
6628
  wasm.__wbindgen_export_2(deferred1_0, deferred1_1, 1);
6056
6629
  }
6057
6630
  }
6631
+ /**
6632
+ * Get the plaintext representation of the signature.
6633
+ * @returns {Plaintext}
6634
+ */
6635
+ toPlaintext() {
6636
+ const ret = wasm.signature_toPlaintext(this.__wbg_ptr);
6637
+ return Plaintext.__wrap(ret);
6638
+ }
6058
6639
  }
6059
6640
 
6060
6641
  const TransactionFinalization = (typeof FinalizationRegistry === 'undefined')
@@ -6677,7 +7258,7 @@ class Transition {
6677
7258
  * @returns {Group}
6678
7259
  */
6679
7260
  tpk() {
6680
- const ret = wasm.computekey_pk_sig(this.__wbg_ptr);
7261
+ const ret = wasm.address_toGroup(this.__wbg_ptr);
6681
7262
  return Group.__wrap(ret);
6682
7263
  }
6683
7264
  /**
@@ -7453,7 +8034,7 @@ function __wbg_get_imports() {
7453
8034
  const ret = getObject(arg0).length;
7454
8035
  return ret;
7455
8036
  };
7456
- imports.wbg.__wbg_log_0e4cc02ccd760d45 = function(arg0, arg1) {
8037
+ imports.wbg.__wbg_log_4a8c9f48971e8bbe = function(arg0, arg1) {
7457
8038
  console.log(getStringFromWasm0(arg0, arg1));
7458
8039
  };
7459
8040
  imports.wbg.__wbg_msCrypto_0a36e2ec3a343d26 = function(arg0) {
@@ -7471,7 +8052,7 @@ function __wbg_get_imports() {
7471
8052
  const a = state0.a;
7472
8053
  state0.a = 0;
7473
8054
  try {
7474
- return __wbg_adapter_491(a, state0.b, arg0, arg1);
8055
+ return __wbg_adapter_524(a, state0.b, arg0, arg1);
7475
8056
  } finally {
7476
8057
  state0.a = a;
7477
8058
  }
@@ -7650,7 +8231,7 @@ function __wbg_get_imports() {
7650
8231
  const ret = Signature.__wrap(arg0);
7651
8232
  return addHeapObject(ret);
7652
8233
  };
7653
- imports.wbg.__wbg_spawnWorker_d283a0e4c0e316c8 = function(arg0, arg1, arg2, arg3) {
8234
+ imports.wbg.__wbg_spawnWorker_ea0d99567d890697 = function(arg0, arg1, arg2, arg3) {
7654
8235
  const ret = spawnWorker(getObject(arg0), getObject(arg1), getObject(arg2), arg3 >>> 0);
7655
8236
  return addHeapObject(ret);
7656
8237
  };
@@ -7770,12 +8351,12 @@ function __wbg_get_imports() {
7770
8351
  const ret = false;
7771
8352
  return ret;
7772
8353
  };
7773
- imports.wbg.__wbindgen_closure_wrapper6073 = function(arg0, arg1, arg2) {
7774
- const ret = makeMutClosure(arg0, arg1, 525, __wbg_adapter_40);
8354
+ imports.wbg.__wbindgen_closure_wrapper6080 = function(arg0, arg1, arg2) {
8355
+ const ret = makeMutClosure(arg0, arg1, 519, __wbg_adapter_40);
7775
8356
  return addHeapObject(ret);
7776
8357
  };
7777
- imports.wbg.__wbindgen_closure_wrapper6079 = function(arg0, arg1, arg2) {
7778
- const ret = makeMutClosure(arg0, arg1, 525, __wbg_adapter_40);
8358
+ imports.wbg.__wbindgen_closure_wrapper6086 = function(arg0, arg1, arg2) {
8359
+ const ret = makeMutClosure(arg0, arg1, 519, __wbg_adapter_40);
7779
8360
  return addHeapObject(ret);
7780
8361
  };
7781
8362
  imports.wbg.__wbindgen_is_function = function(arg0) {