@provablehq/wasm 0.10.2-rc.1 → 0.10.3

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.
@@ -304,26 +304,25 @@ function addBorrowedObject(obj) {
304
304
  return stack_pointer;
305
305
  }
306
306
  /**
307
- * Verify a SNARK proof against a verifying key and public inputs.
307
+ * Verify a batch SNARK proof against multiple verifying keys and their corresponding public inputs.
308
308
  *
309
- * This function verifies a proof produced by an Aleo program that may not be deployed on chain.
310
- * It directly invokes the Varuna proof verification from snarkVM.
309
+ * This function verifies a batch proof produced by Aleo programs that may not be deployed on chain.
310
+ * Each verifying key is paired with one or more sets of public inputs (instances).
311
311
  *
312
- * @param {VerifyingKey} verifying_key The verifying key for the circuit
313
- * @param {Array<string>} inputs Array of field element strings representing public inputs (e.g. ["1field", "2field"])
314
- * @param {Proof} proof The proof to verify
315
- * @returns {boolean} True if the proof is valid, false otherwise
316
- * @param {VerifyingKey} verifying_key
312
+ * @param {Array<string>} verifying_keys Array of verifying key strings, one per circuit
313
+ * @param {Array<Array<Array<string>>>} inputs 3D array of field element strings [circuit_idx][instance_idx][field_idx]
314
+ * @param {Proof} proof The batch proof to verify
315
+ * @returns {boolean} True if the batch proof is valid, false otherwise
316
+ * @param {Array<any>} verifying_keys
317
317
  * @param {Array<any>} inputs
318
318
  * @param {Proof} proof
319
319
  * @returns {boolean}
320
320
  */
321
- function snarkVerify(verifying_key, inputs, proof) {
321
+ function snarkVerifyBatch(verifying_keys, inputs, proof) {
322
322
  try {
323
323
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
324
- _assertClass(verifying_key, VerifyingKey);
325
324
  _assertClass(proof, Proof);
326
- wasm.snarkVerify(retptr, verifying_key.__wbg_ptr, addHeapObject(inputs), proof.__wbg_ptr);
325
+ wasm.snarkVerifyBatch(retptr, addHeapObject(verifying_keys), addHeapObject(inputs), proof.__wbg_ptr);
327
326
  var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
328
327
  var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
329
328
  var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
@@ -355,10 +354,9 @@ function snarkVerify(verifying_key, inputs, proof) {
355
354
  * @param {object | null | undefined} imports
356
355
  * @param {object | null | undefined} imported_verifying_keys
357
356
  * @param {number} block_height
358
- * @param {ProgramImports | null} [program_imports]
359
357
  * @returns {boolean}
360
358
  */
361
- function verifyFunctionExecution(execution, verifying_key, program, function_id, imports, imported_verifying_keys, block_height, program_imports) {
359
+ function verifyFunctionExecution(execution, verifying_key, program, function_id, imports, imported_verifying_keys, block_height) {
362
360
  try {
363
361
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
364
362
  _assertClass(execution, Execution);
@@ -366,12 +364,7 @@ function verifyFunctionExecution(execution, verifying_key, program, function_id,
366
364
  _assertClass(program, Program);
367
365
  const ptr0 = passStringToWasm0(function_id, wasm.__wbindgen_export, wasm.__wbindgen_export2);
368
366
  const len0 = WASM_VECTOR_LEN;
369
- let ptr1 = 0;
370
- if (!isLikeNone(program_imports)) {
371
- _assertClass(program_imports, ProgramImports);
372
- ptr1 = program_imports.__destroy_into_raw();
373
- }
374
- wasm.verifyFunctionExecution(retptr, execution.__wbg_ptr, verifying_key.__wbg_ptr, program.__wbg_ptr, ptr0, len0, isLikeNone(imports) ? 0 : addHeapObject(imports), isLikeNone(imported_verifying_keys) ? 0 : addHeapObject(imported_verifying_keys), block_height, ptr1);
367
+ wasm.verifyFunctionExecution(retptr, execution.__wbg_ptr, verifying_key.__wbg_ptr, program.__wbg_ptr, ptr0, len0, isLikeNone(imports) ? 0 : addHeapObject(imports), isLikeNone(imported_verifying_keys) ? 0 : addHeapObject(imported_verifying_keys), block_height);
375
368
  var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
376
369
  var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
377
370
  var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
@@ -385,25 +378,26 @@ function verifyFunctionExecution(execution, verifying_key, program, function_id,
385
378
  }
386
379
 
387
380
  /**
388
- * Verify a batch SNARK proof against multiple verifying keys and their corresponding public inputs.
381
+ * Verify a SNARK proof against a verifying key and public inputs.
389
382
  *
390
- * This function verifies a batch proof produced by Aleo programs that may not be deployed on chain.
391
- * Each verifying key is paired with one or more sets of public inputs (instances).
383
+ * This function verifies a proof produced by an Aleo program that may not be deployed on chain.
384
+ * It directly invokes the Varuna proof verification from snarkVM.
392
385
  *
393
- * @param {Array<string>} verifying_keys Array of verifying key strings, one per circuit
394
- * @param {Array<Array<Array<string>>>} inputs 3D array of field element strings [circuit_idx][instance_idx][field_idx]
395
- * @param {Proof} proof The batch proof to verify
396
- * @returns {boolean} True if the batch proof is valid, false otherwise
397
- * @param {Array<any>} verifying_keys
386
+ * @param {VerifyingKey} verifying_key The verifying key for the circuit
387
+ * @param {Array<string>} inputs Array of field element strings representing public inputs (e.g. ["1field", "2field"])
388
+ * @param {Proof} proof The proof to verify
389
+ * @returns {boolean} True if the proof is valid, false otherwise
390
+ * @param {VerifyingKey} verifying_key
398
391
  * @param {Array<any>} inputs
399
392
  * @param {Proof} proof
400
393
  * @returns {boolean}
401
394
  */
402
- function snarkVerifyBatch(verifying_keys, inputs, proof) {
395
+ function snarkVerify(verifying_key, inputs, proof) {
403
396
  try {
404
397
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
398
+ _assertClass(verifying_key, VerifyingKey);
405
399
  _assertClass(proof, Proof);
406
- wasm.snarkVerifyBatch(retptr, addHeapObject(verifying_keys), addHeapObject(inputs), proof.__wbg_ptr);
400
+ wasm.snarkVerify(retptr, verifying_key.__wbg_ptr, addHeapObject(inputs), proof.__wbg_ptr);
407
401
  var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
408
402
  var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
409
403
  var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
@@ -477,16 +471,16 @@ function getArrayJsValueFromWasm0(ptr, len) {
477
471
  }
478
472
  return result;
479
473
  }
480
- function __wasm_bindgen_func_elem_8576(arg0, arg1, arg2) {
481
- wasm.__wasm_bindgen_func_elem_8576(arg0, arg1, addHeapObject(arg2));
474
+ function __wasm_bindgen_func_elem_8534(arg0, arg1, arg2) {
475
+ wasm.__wasm_bindgen_func_elem_8534(arg0, arg1, addHeapObject(arg2));
482
476
  }
483
477
 
484
- function __wasm_bindgen_func_elem_7209(arg0, arg1) {
485
- wasm.__wasm_bindgen_func_elem_7209(arg0, arg1);
478
+ function __wasm_bindgen_func_elem_7173(arg0, arg1) {
479
+ wasm.__wasm_bindgen_func_elem_7173(arg0, arg1);
486
480
  }
487
481
 
488
- function __wasm_bindgen_func_elem_7482(arg0, arg1, arg2, arg3) {
489
- wasm.__wasm_bindgen_func_elem_7482(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
482
+ function __wasm_bindgen_func_elem_7446(arg0, arg1, arg2, arg3) {
483
+ wasm.__wasm_bindgen_func_elem_7446(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
490
484
  }
491
485
 
492
486
  const __wbindgen_enum_RequestCredentials = ["omit", "same-origin", "include"];
@@ -10214,436 +10208,6 @@ class Program {
10214
10208
  }
10215
10209
  if (Symbol.dispose) Program.prototype[Symbol.dispose] = Program.prototype.free;
10216
10210
 
10217
- const ProgramImportsFinalization = (typeof FinalizationRegistry === 'undefined')
10218
- ? { register: () => {}, unregister: () => {} }
10219
- : new FinalizationRegistry(ptr => wasm.__wbg_programimports_free(ptr >>> 0, 1));
10220
- /**
10221
- * Backed by `Rc<RefCell<>>` for interior mutability — cloning produces a cheap
10222
- * reference-counted copy that shares the same underlying data. This allows
10223
- * execution functions to clone the builder internally while the caller's
10224
- * original reference automatically sees any mutations (e.g. synthesized keys).
10225
- */
10226
- class ProgramImports {
10227
-
10228
- static __wrap(ptr) {
10229
- ptr = ptr >>> 0;
10230
- const obj = Object.create(ProgramImports.prototype);
10231
- obj.__wbg_ptr = ptr;
10232
- ProgramImportsFinalization.register(obj, obj.__wbg_ptr, obj);
10233
- return obj;
10234
- }
10235
-
10236
- __destroy_into_raw() {
10237
- const ptr = this.__wbg_ptr;
10238
- this.__wbg_ptr = 0;
10239
- ProgramImportsFinalization.unregister(this);
10240
- return ptr;
10241
- }
10242
-
10243
- free() {
10244
- const ptr = this.__destroy_into_raw();
10245
- wasm.__wbg_programimports_free(ptr, 0);
10246
- }
10247
- /**
10248
- * Add a program's source code to the imports.
10249
- *
10250
- * The source is parsed, validated, and added to the internal Process.
10251
- * Static imports of the program are resolved depth-first from programs
10252
- * already present in this builder.
10253
- *
10254
- * @param {string} name The program name (e.g., "my_program.aleo").
10255
- * @param {string} source The program source code.
10256
- * @param {number | undefined} edition The program edition (defaults to 1).
10257
- * @param {string} name
10258
- * @param {string} source
10259
- * @param {number | null} [edition]
10260
- */
10261
- addProgram(name, source, edition) {
10262
- try {
10263
- const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
10264
- const ptr0 = passStringToWasm0(name, wasm.__wbindgen_export, wasm.__wbindgen_export2);
10265
- const len0 = WASM_VECTOR_LEN;
10266
- const ptr1 = passStringToWasm0(source, wasm.__wbindgen_export, wasm.__wbindgen_export2);
10267
- const len1 = WASM_VECTOR_LEN;
10268
- wasm.programimports_addProgram(retptr, this.__wbg_ptr, ptr0, len0, ptr1, len1, isLikeNone(edition) ? 0xFFFFFF : edition);
10269
- var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
10270
- var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
10271
- if (r1) {
10272
- throw takeObject(r0);
10273
- }
10274
- } finally {
10275
- wasm.__wbindgen_add_to_stack_pointer(16);
10276
- }
10277
- }
10278
- /**
10279
- * Create a ProgramImports from a plain JavaScript object.
10280
- *
10281
- * Accepts three formats:
10282
- * ```js
10283
- * // 1. Plain string — source code only.
10284
- * { "my_program.aleo": "program source..." }
10285
- *
10286
- * // 2. Structured — program source with optional edition.
10287
- * { "my_program.aleo": { program: "program source..." } }
10288
- *
10289
- * // 3. Structured with keys — program source plus proving/verifying keys per function.
10290
- * {
10291
- * "my_program.aleo": {
10292
- * program: "program source...",
10293
- * keys: {
10294
- * "my_function": {
10295
- * provingKey: Uint8Array,
10296
- * verifyingKey: Uint8Array
10297
- * }
10298
- * }
10299
- * }
10300
- * }
10301
- * ```
10302
- *
10303
- * Programs created via this method default to edition 1.
10304
- *
10305
- * @param {Object} object A plain JavaScript object mapping program names to source code
10306
- * and optional keys.
10307
- * @returns {ProgramImports}
10308
- * @param {object} object
10309
- * @returns {ProgramImports}
10310
- */
10311
- static fromObject(object) {
10312
- try {
10313
- const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
10314
- wasm.programimports_fromObject(retptr, addHeapObject(object));
10315
- var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
10316
- var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
10317
- var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
10318
- if (r2) {
10319
- throw takeObject(r1);
10320
- }
10321
- return ProgramImports.__wrap(r0);
10322
- } finally {
10323
- wasm.__wbindgen_add_to_stack_pointer(16);
10324
- }
10325
- }
10326
- /**
10327
- * Return the source code of a program by name, without serializing keys.
10328
- *
10329
- * @param {string} name The program name (e.g., "my_program.aleo").
10330
- * @returns {string | undefined}
10331
- * @param {string} name
10332
- * @returns {string | undefined}
10333
- */
10334
- getProgram(name) {
10335
- try {
10336
- const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
10337
- const ptr0 = passStringToWasm0(name, wasm.__wbindgen_export, wasm.__wbindgen_export2);
10338
- const len0 = WASM_VECTOR_LEN;
10339
- wasm.programimports_getProgram(retptr, this.__wbg_ptr, ptr0, len0);
10340
- var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
10341
- var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
10342
- let v2;
10343
- if (r0 !== 0) {
10344
- v2 = getStringFromWasm0(r0, r1).slice();
10345
- wasm.__wbindgen_export4(r0, r1 * 1, 1);
10346
- }
10347
- return v2;
10348
- } finally {
10349
- wasm.__wbindgen_add_to_stack_pointer(16);
10350
- }
10351
- }
10352
- /**
10353
- * Return the names of all programs in this builder as a JS `Array<string>`.
10354
- *
10355
- * This is a lightweight alternative to `toObject()` when you only need to
10356
- * enumerate program names without serializing keys.
10357
- *
10358
- * @returns {Array<string>}
10359
- * @returns {Array<any>}
10360
- */
10361
- programNames() {
10362
- const ret = wasm.programimports_programNames(this.__wbg_ptr);
10363
- return takeObject(ret);
10364
- }
10365
- /**
10366
- * Add a proving key for a function or record within an imported program.
10367
- *
10368
- * The key is transferred directly from the WASM `ProvingKey` type with no
10369
- * serialization overhead.
10370
- *
10371
- * @param {string} program_name The program name (e.g., "my_program.aleo").
10372
- * @param {string} identifier The function name or record name the key belongs to.
10373
- * @param {ProvingKey} key The proving key.
10374
- * @param {string} program_name
10375
- * @param {string} identifier
10376
- * @param {ProvingKey} key
10377
- */
10378
- addProvingKey(program_name, identifier, key) {
10379
- try {
10380
- const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
10381
- const ptr0 = passStringToWasm0(program_name, wasm.__wbindgen_export, wasm.__wbindgen_export2);
10382
- const len0 = WASM_VECTOR_LEN;
10383
- const ptr1 = passStringToWasm0(identifier, wasm.__wbindgen_export, wasm.__wbindgen_export2);
10384
- const len1 = WASM_VECTOR_LEN;
10385
- _assertClass(key, ProvingKey);
10386
- var ptr2 = key.__destroy_into_raw();
10387
- wasm.programimports_addProvingKey(retptr, this.__wbg_ptr, ptr0, len0, ptr1, len1, ptr2);
10388
- var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
10389
- var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
10390
- if (r1) {
10391
- throw takeObject(r0);
10392
- }
10393
- } finally {
10394
- wasm.__wbindgen_add_to_stack_pointer(16);
10395
- }
10396
- }
10397
- /**
10398
- * Get a proving key for a specific program and identifier (function or record name).
10399
- * Returns a clone of the key from the internal Process. Non-destructive — the key
10400
- * remains available for future calls.
10401
- *
10402
- * @param {string} program_name The program name (e.g., "my_program.aleo").
10403
- * @param {string} identifier The function or record name.
10404
- * @returns {ProvingKey | undefined}
10405
- * @param {string} program_name
10406
- * @param {string} identifier
10407
- * @returns {ProvingKey | undefined}
10408
- */
10409
- getProvingKey(program_name, identifier) {
10410
- const ptr0 = passStringToWasm0(program_name, wasm.__wbindgen_export, wasm.__wbindgen_export2);
10411
- const len0 = WASM_VECTOR_LEN;
10412
- const ptr1 = passStringToWasm0(identifier, wasm.__wbindgen_export, wasm.__wbindgen_export2);
10413
- const len1 = WASM_VECTOR_LEN;
10414
- const ret = wasm.programimports_getProvingKey(this.__wbg_ptr, ptr0, len0, ptr1, len1);
10415
- return ret === 0 ? undefined : ProvingKey.__wrap(ret);
10416
- }
10417
- /**
10418
- * Add a verifying key for a function or record within an imported program.
10419
- *
10420
- * The key is transferred directly from the WASM `VerifyingKey` type with no
10421
- * serialization overhead.
10422
- *
10423
- * @param {string} program_name The program name (e.g., "my_program.aleo").
10424
- * @param {string} identifier The function name or record name the key belongs to.
10425
- * @param {VerifyingKey} key The verifying key.
10426
- * @param {string} program_name
10427
- * @param {string} identifier
10428
- * @param {VerifyingKey} key
10429
- */
10430
- addVerifyingKey(program_name, identifier, key) {
10431
- try {
10432
- const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
10433
- const ptr0 = passStringToWasm0(program_name, wasm.__wbindgen_export, wasm.__wbindgen_export2);
10434
- const len0 = WASM_VECTOR_LEN;
10435
- const ptr1 = passStringToWasm0(identifier, wasm.__wbindgen_export, wasm.__wbindgen_export2);
10436
- const len1 = WASM_VECTOR_LEN;
10437
- _assertClass(key, VerifyingKey);
10438
- var ptr2 = key.__destroy_into_raw();
10439
- wasm.programimports_addVerifyingKey(retptr, this.__wbg_ptr, ptr0, len0, ptr1, len1, ptr2);
10440
- var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
10441
- var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
10442
- if (r1) {
10443
- throw takeObject(r0);
10444
- }
10445
- } finally {
10446
- wasm.__wbindgen_add_to_stack_pointer(16);
10447
- }
10448
- }
10449
- /**
10450
- * Get a verifying key for a specific program and identifier (function or record name).
10451
- * Returns a clone of the key from the internal Process. Non-destructive — the key
10452
- * remains available for future calls.
10453
- *
10454
- * @param {string} program_name The program name (e.g., "my_program.aleo").
10455
- * @param {string} identifier The function or record name.
10456
- * @returns {VerifyingKey | undefined}
10457
- * @param {string} program_name
10458
- * @param {string} identifier
10459
- * @returns {VerifyingKey | undefined}
10460
- */
10461
- getVerifyingKey(program_name, identifier) {
10462
- const ptr0 = passStringToWasm0(program_name, wasm.__wbindgen_export, wasm.__wbindgen_export2);
10463
- const len0 = WASM_VECTOR_LEN;
10464
- const ptr1 = passStringToWasm0(identifier, wasm.__wbindgen_export, wasm.__wbindgen_export2);
10465
- const len1 = WASM_VECTOR_LEN;
10466
- const ret = wasm.programimports_getVerifyingKey(this.__wbg_ptr, ptr0, len0, ptr1, len1);
10467
- return ret === 0 ? undefined : VerifyingKey.__wrap(ret);
10468
- }
10469
- /**
10470
- * Add a proving key from its byte representation.
10471
- *
10472
- * Deserializes the bytes into a native proving key and stores it. The program
10473
- * must already have been added via `addProgram`.
10474
- *
10475
- * @param {string} program_name The program name (e.g., "my_program.aleo").
10476
- * @param {string} identifier The function name or record name the key belongs to.
10477
- * @param {Uint8Array} bytes The proving key bytes.
10478
- * @param {string} program_name
10479
- * @param {string} identifier
10480
- * @param {Uint8Array} bytes
10481
- */
10482
- addProvingKeyBytes(program_name, identifier, bytes) {
10483
- try {
10484
- const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
10485
- const ptr0 = passStringToWasm0(program_name, wasm.__wbindgen_export, wasm.__wbindgen_export2);
10486
- const len0 = WASM_VECTOR_LEN;
10487
- const ptr1 = passStringToWasm0(identifier, wasm.__wbindgen_export, wasm.__wbindgen_export2);
10488
- const len1 = WASM_VECTOR_LEN;
10489
- const ptr2 = passArray8ToWasm0(bytes, wasm.__wbindgen_export);
10490
- const len2 = WASM_VECTOR_LEN;
10491
- wasm.programimports_addProvingKeyBytes(retptr, this.__wbg_ptr, ptr0, len0, ptr1, len1, ptr2, len2);
10492
- var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
10493
- var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
10494
- if (r1) {
10495
- throw takeObject(r0);
10496
- }
10497
- } finally {
10498
- wasm.__wbindgen_add_to_stack_pointer(16);
10499
- }
10500
- }
10501
- /**
10502
- * Add a verifying key from its byte representation.
10503
- *
10504
- * Deserializes the bytes into a native verifying key and stores it. The program
10505
- * must already have been added via `addProgram`.
10506
- *
10507
- * @param {string} program_name The program name (e.g., "my_program.aleo").
10508
- * @param {string} identifier The function name or record name the key belongs to.
10509
- * @param {Uint8Array} bytes The verifying key bytes.
10510
- * @param {string} program_name
10511
- * @param {string} identifier
10512
- * @param {Uint8Array} bytes
10513
- */
10514
- addVerifyingKeyBytes(program_name, identifier, bytes) {
10515
- try {
10516
- const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
10517
- const ptr0 = passStringToWasm0(program_name, wasm.__wbindgen_export, wasm.__wbindgen_export2);
10518
- const len0 = WASM_VECTOR_LEN;
10519
- const ptr1 = passStringToWasm0(identifier, wasm.__wbindgen_export, wasm.__wbindgen_export2);
10520
- const len1 = WASM_VECTOR_LEN;
10521
- const ptr2 = passArray8ToWasm0(bytes, wasm.__wbindgen_export);
10522
- const len2 = WASM_VECTOR_LEN;
10523
- wasm.programimports_addVerifyingKeyBytes(retptr, this.__wbg_ptr, ptr0, len0, ptr1, len1, ptr2, len2);
10524
- var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
10525
- var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
10526
- if (r1) {
10527
- throw takeObject(r0);
10528
- }
10529
- } finally {
10530
- wasm.__wbindgen_add_to_stack_pointer(16);
10531
- }
10532
- }
10533
- /**
10534
- * Return the names of functions that have both a proving key and a verifying key
10535
- * stored for the given program.
10536
- *
10537
- * @param {string} program_name The program name (e.g., "my_program.aleo").
10538
- * @returns {Array<string>}
10539
- * @param {string} program_name
10540
- * @returns {Array<any>}
10541
- */
10542
- functionKeysAvailable(program_name) {
10543
- try {
10544
- const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
10545
- const ptr0 = passStringToWasm0(program_name, wasm.__wbindgen_export, wasm.__wbindgen_export2);
10546
- const len0 = WASM_VECTOR_LEN;
10547
- wasm.programimports_functionKeysAvailable(retptr, this.__wbg_ptr, ptr0, len0);
10548
- var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
10549
- var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
10550
- var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
10551
- if (r2) {
10552
- throw takeObject(r1);
10553
- }
10554
- return takeObject(r0);
10555
- } finally {
10556
- wasm.__wbindgen_add_to_stack_pointer(16);
10557
- }
10558
- }
10559
- /**
10560
- * Create a new empty ProgramImports builder.
10561
- *
10562
- * Initializes an internal snarkVM Process. This is the same cost as a
10563
- * single execution call, but is paid once and reused across all operations.
10564
- */
10565
- constructor() {
10566
- try {
10567
- const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
10568
- wasm.programimports_new(retptr);
10569
- var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
10570
- var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
10571
- var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
10572
- if (r2) {
10573
- throw takeObject(r1);
10574
- }
10575
- this.__wbg_ptr = r0 >>> 0;
10576
- ProgramImportsFinalization.register(this, this.__wbg_ptr, this);
10577
- return this;
10578
- } finally {
10579
- wasm.__wbindgen_add_to_stack_pointer(16);
10580
- }
10581
- }
10582
- /**
10583
- * Create a cheap clone that shares the same underlying data.
10584
- *
10585
- * Useful for passing to WASM execution functions which consume ownership:
10586
- * the caller keeps the original, and both copies see any mutations
10587
- * (e.g. synthesized keys) through the shared interior state.
10588
- * @returns {ProgramImports}
10589
- */
10590
- clone() {
10591
- const ret = wasm.programimports_clone(this.__wbg_ptr);
10592
- return ProgramImports.__wrap(ret);
10593
- }
10594
- /**
10595
- * Check whether a specific program has been added.
10596
- *
10597
- * @param {string} name The program name.
10598
- * @returns {boolean}
10599
- * @param {string} name
10600
- * @returns {boolean}
10601
- */
10602
- contains(name) {
10603
- const ptr0 = passStringToWasm0(name, wasm.__wbindgen_export, wasm.__wbindgen_export2);
10604
- const len0 = WASM_VECTOR_LEN;
10605
- const ret = wasm.programimports_contains(this.__wbg_ptr, ptr0, len0);
10606
- return ret !== 0;
10607
- }
10608
- /**
10609
- * Check whether any programs have been added to this builder.
10610
- *
10611
- * @returns {boolean}
10612
- * @returns {boolean}
10613
- */
10614
- isEmpty() {
10615
- const ret = wasm.programimports_isEmpty(this.__wbg_ptr);
10616
- return ret !== 0;
10617
- }
10618
- /**
10619
- * Convert this ProgramImports to a plain JavaScript object.
10620
- *
10621
- * Entries without keys use the simple `{ "name.aleo": "source" }` format.
10622
- * Entries with keys use the structured format:
10623
- * ```js
10624
- * {
10625
- * "name.aleo": {
10626
- * program: "program source...",
10627
- * keys: {
10628
- * "function_name": {
10629
- * provingKey: Uint8Array,
10630
- * verifyingKey: Uint8Array
10631
- * }
10632
- * }
10633
- * }
10634
- * }
10635
- * ```
10636
- *
10637
- * @returns {Object}
10638
- * @returns {object}
10639
- */
10640
- toObject() {
10641
- const ret = wasm.programimports_toObject(this.__wbg_ptr);
10642
- return takeObject(ret);
10643
- }
10644
- }
10645
- if (Symbol.dispose) ProgramImports.prototype[Symbol.dispose] = ProgramImports.prototype.free;
10646
-
10647
10211
  const ProgramManagerFinalization = (typeof FinalizationRegistry === 'undefined')
10648
10212
  ? { register: () => {}, unregister: () => {} }
10649
10213
  : new FinalizationRegistry(ptr => wasm.__wbg_programmanager_free(ptr >>> 0, 1));
@@ -10674,21 +10238,15 @@ class ProgramManager {
10674
10238
  * @param {Array<any>} inputs
10675
10239
  * @param {object | null} [imports]
10676
10240
  * @param {number | null} [edition]
10677
- * @param {ProgramImports | null} [program_imports]
10678
10241
  * @returns {Promise<KeyPair>}
10679
10242
  */
10680
- static synthesizeKeyPair(private_key, program, function_id, inputs, imports, edition, program_imports) {
10243
+ static synthesizeKeyPair(private_key, program, function_id, inputs, imports, edition) {
10681
10244
  _assertClass(private_key, PrivateKey);
10682
10245
  const ptr0 = passStringToWasm0(program, wasm.__wbindgen_export, wasm.__wbindgen_export2);
10683
10246
  const len0 = WASM_VECTOR_LEN;
10684
10247
  const ptr1 = passStringToWasm0(function_id, wasm.__wbindgen_export, wasm.__wbindgen_export2);
10685
10248
  const len1 = WASM_VECTOR_LEN;
10686
- let ptr2 = 0;
10687
- if (!isLikeNone(program_imports)) {
10688
- _assertClass(program_imports, ProgramImports);
10689
- ptr2 = program_imports.__destroy_into_raw();
10690
- }
10691
- const ret = wasm.programmanager_synthesizeKeyPair(private_key.__wbg_ptr, ptr0, len0, ptr1, len1, addHeapObject(inputs), isLikeNone(imports) ? 0 : addHeapObject(imports), isLikeNone(edition) ? 0xFFFFFF : edition, ptr2);
10249
+ const ret = wasm.programmanager_synthesizeKeyPair(private_key.__wbg_ptr, ptr0, len0, ptr1, len1, addHeapObject(inputs), isLikeNone(imports) ? 0 : addHeapObject(imports), isLikeNone(edition) ? 0xFFFFFF : edition);
10692
10250
  return takeObject(ret);
10693
10251
  }
10694
10252
  /**
@@ -10727,10 +10285,9 @@ class ProgramManager {
10727
10285
  * @param {boolean} unchecked
10728
10286
  * @param {number | null | undefined} edition
10729
10287
  * @param {boolean} use_fee_master
10730
- * @param {ProgramImports | null} [program_imports]
10731
10288
  * @returns {Promise<ProvingRequest>}
10732
10289
  */
10733
- static buildProvingRequest(private_key, program, function_name, inputs, base_fee_credits, priority_fee_credits, fee_record, imports, broadcast, unchecked, edition, use_fee_master, program_imports) {
10290
+ static buildProvingRequest(private_key, program, function_name, inputs, base_fee_credits, priority_fee_credits, fee_record, imports, broadcast, unchecked, edition, use_fee_master) {
10734
10291
  _assertClass(private_key, PrivateKey);
10735
10292
  const ptr0 = passStringToWasm0(program, wasm.__wbindgen_export, wasm.__wbindgen_export2);
10736
10293
  const len0 = WASM_VECTOR_LEN;
@@ -10741,12 +10298,7 @@ class ProgramManager {
10741
10298
  _assertClass(fee_record, RecordPlaintext);
10742
10299
  ptr2 = fee_record.__destroy_into_raw();
10743
10300
  }
10744
- let ptr3 = 0;
10745
- if (!isLikeNone(program_imports)) {
10746
- _assertClass(program_imports, ProgramImports);
10747
- ptr3 = program_imports.__destroy_into_raw();
10748
- }
10749
- const ret = wasm.programmanager_buildProvingRequest(private_key.__wbg_ptr, ptr0, len0, ptr1, len1, addHeapObject(inputs), base_fee_credits, priority_fee_credits, ptr2, isLikeNone(imports) ? 0 : addHeapObject(imports), broadcast, unchecked, isLikeNone(edition) ? 0xFFFFFF : edition, use_fee_master, ptr3);
10301
+ const ret = wasm.programmanager_buildProvingRequest(private_key.__wbg_ptr, ptr0, len0, ptr1, len1, addHeapObject(inputs), base_fee_credits, priority_fee_credits, ptr2, isLikeNone(imports) ? 0 : addHeapObject(imports), broadcast, unchecked, isLikeNone(edition) ? 0xFFFFFF : edition, use_fee_master);
10750
10302
  return takeObject(ret);
10751
10303
  }
10752
10304
  /**
@@ -10766,10 +10318,9 @@ class ProgramManager {
10766
10318
  * @param {number | null} [edition]
10767
10319
  * @param {object | null} [imports]
10768
10320
  * @param {PrivateKey | null} [private_key]
10769
- * @param {ProgramImports | null} [program_imports]
10770
10321
  * @returns {Promise<ProvingRequest>}
10771
10322
  */
10772
- static buildProvingRequestFromExecutionRequest(request, program, unchecked, broadcast, edition, imports, private_key, program_imports) {
10323
+ static buildProvingRequestFromExecutionRequest(request, program, unchecked, broadcast, edition, imports, private_key) {
10773
10324
  _assertClass(request, ExecutionRequest);
10774
10325
  const ptr0 = passStringToWasm0(program, wasm.__wbindgen_export, wasm.__wbindgen_export2);
10775
10326
  const len0 = WASM_VECTOR_LEN;
@@ -10778,12 +10329,7 @@ class ProgramManager {
10778
10329
  _assertClass(private_key, PrivateKey);
10779
10330
  ptr1 = private_key.__destroy_into_raw();
10780
10331
  }
10781
- let ptr2 = 0;
10782
- if (!isLikeNone(program_imports)) {
10783
- _assertClass(program_imports, ProgramImports);
10784
- ptr2 = program_imports.__destroy_into_raw();
10785
- }
10786
- const ret = wasm.programmanager_buildProvingRequestFromExecutionRequest(request.__wbg_ptr, ptr0, len0, unchecked, broadcast, isLikeNone(edition) ? 0xFFFFFF : edition, isLikeNone(imports) ? 0 : addHeapObject(imports), ptr1, ptr2);
10332
+ const ret = wasm.programmanager_buildProvingRequestFromExecutionRequest(request.__wbg_ptr, ptr0, len0, unchecked, broadcast, isLikeNone(edition) ? 0xFFFFFF : edition, isLikeNone(imports) ? 0 : addHeapObject(imports), ptr1);
10787
10333
  return takeObject(ret);
10788
10334
  }
10789
10335
  /**
@@ -10924,10 +10470,9 @@ class ProgramManager {
10924
10470
  * @param {RecordPlaintext | null} [fee_record]
10925
10471
  * @param {string | null} [url]
10926
10472
  * @param {object | null} [imports]
10927
- * @param {ProgramImports | null} [program_imports]
10928
10473
  * @returns {Promise<Transaction>}
10929
10474
  */
10930
- static buildDevnodeDeploymentTransaction(private_key, program, priority_fee_credits, fee_record, url, imports, program_imports) {
10475
+ static buildDevnodeDeploymentTransaction(private_key, program, priority_fee_credits, fee_record, url, imports) {
10931
10476
  _assertClass(private_key, PrivateKey);
10932
10477
  const ptr0 = passStringToWasm0(program, wasm.__wbindgen_export, wasm.__wbindgen_export2);
10933
10478
  const len0 = WASM_VECTOR_LEN;
@@ -10938,12 +10483,7 @@ class ProgramManager {
10938
10483
  }
10939
10484
  var ptr2 = isLikeNone(url) ? 0 : passStringToWasm0(url, wasm.__wbindgen_export, wasm.__wbindgen_export2);
10940
10485
  var len2 = WASM_VECTOR_LEN;
10941
- let ptr3 = 0;
10942
- if (!isLikeNone(program_imports)) {
10943
- _assertClass(program_imports, ProgramImports);
10944
- ptr3 = program_imports.__destroy_into_raw();
10945
- }
10946
- const ret = wasm.programmanager_buildDevnodeDeploymentTransaction(private_key.__wbg_ptr, ptr0, len0, priority_fee_credits, ptr1, ptr2, len2, isLikeNone(imports) ? 0 : addHeapObject(imports), ptr3);
10486
+ const ret = wasm.programmanager_buildDevnodeDeploymentTransaction(private_key.__wbg_ptr, ptr0, len0, priority_fee_credits, ptr1, ptr2, len2, isLikeNone(imports) ? 0 : addHeapObject(imports));
10947
10487
  return takeObject(ret);
10948
10488
  }
10949
10489
  /**
@@ -10971,10 +10511,9 @@ class ProgramManager {
10971
10511
  * @param {RecordPlaintext | null} [fee_record]
10972
10512
  * @param {string | null} [url]
10973
10513
  * @param {object | null} [imports]
10974
- * @param {ProgramImports | null} [program_imports]
10975
10514
  * @returns {Promise<Transaction>}
10976
10515
  */
10977
- static buildDevnodeUpgradeTransaction(private_key, program, priority_fee_credits, fee_record, url, imports, program_imports) {
10516
+ static buildDevnodeUpgradeTransaction(private_key, program, priority_fee_credits, fee_record, url, imports) {
10978
10517
  _assertClass(private_key, PrivateKey);
10979
10518
  const ptr0 = passStringToWasm0(program, wasm.__wbindgen_export, wasm.__wbindgen_export2);
10980
10519
  const len0 = WASM_VECTOR_LEN;
@@ -10985,12 +10524,7 @@ class ProgramManager {
10985
10524
  }
10986
10525
  var ptr2 = isLikeNone(url) ? 0 : passStringToWasm0(url, wasm.__wbindgen_export, wasm.__wbindgen_export2);
10987
10526
  var len2 = WASM_VECTOR_LEN;
10988
- let ptr3 = 0;
10989
- if (!isLikeNone(program_imports)) {
10990
- _assertClass(program_imports, ProgramImports);
10991
- ptr3 = program_imports.__destroy_into_raw();
10992
- }
10993
- const ret = wasm.programmanager_buildDevnodeUpgradeTransaction(private_key.__wbg_ptr, ptr0, len0, priority_fee_credits, ptr1, ptr2, len2, isLikeNone(imports) ? 0 : addHeapObject(imports), ptr3);
10527
+ const ret = wasm.programmanager_buildDevnodeUpgradeTransaction(private_key.__wbg_ptr, ptr0, len0, priority_fee_credits, ptr1, ptr2, len2, isLikeNone(imports) ? 0 : addHeapObject(imports));
10994
10528
  return takeObject(ret);
10995
10529
  }
10996
10530
  /**
@@ -11034,18 +10568,12 @@ class ProgramManager {
11034
10568
  * @returns {u64}
11035
10569
  * @param {string} program
11036
10570
  * @param {object | null} [imports]
11037
- * @param {ProgramImports | null} [program_imports]
11038
10571
  * @returns {Promise<bigint>}
11039
10572
  */
11040
- static estimateDeploymentFee(program, imports, program_imports) {
10573
+ static estimateDeploymentFee(program, imports) {
11041
10574
  const ptr0 = passStringToWasm0(program, wasm.__wbindgen_export, wasm.__wbindgen_export2);
11042
10575
  const len0 = WASM_VECTOR_LEN;
11043
- let ptr1 = 0;
11044
- if (!isLikeNone(program_imports)) {
11045
- _assertClass(program_imports, ProgramImports);
11046
- ptr1 = program_imports.__destroy_into_raw();
11047
- }
11048
- const ret = wasm.programmanager_estimateDeploymentFee(ptr0, len0, isLikeNone(imports) ? 0 : addHeapObject(imports), ptr1);
10576
+ const ret = wasm.programmanager_estimateDeploymentFee(ptr0, len0, isLikeNone(imports) ? 0 : addHeapObject(imports));
11049
10577
  return takeObject(ret);
11050
10578
  }
11051
10579
  /**
@@ -11075,10 +10603,9 @@ class ProgramManager {
11075
10603
  * @param {ProvingKey | null} [fee_proving_key]
11076
10604
  * @param {VerifyingKey | null} [fee_verifying_key]
11077
10605
  * @param {OfflineQuery | null} [offline_query]
11078
- * @param {ProgramImports | null} [program_imports]
11079
10606
  * @returns {Promise<Transaction>}
11080
10607
  */
11081
- static buildDeploymentTransaction(private_key, program, priority_fee_credits, fee_record, url, imports, fee_proving_key, fee_verifying_key, offline_query, program_imports) {
10608
+ static buildDeploymentTransaction(private_key, program, priority_fee_credits, fee_record, url, imports, fee_proving_key, fee_verifying_key, offline_query) {
11082
10609
  _assertClass(private_key, PrivateKey);
11083
10610
  const ptr0 = passStringToWasm0(program, wasm.__wbindgen_export, wasm.__wbindgen_export2);
11084
10611
  const len0 = WASM_VECTOR_LEN;
@@ -11104,12 +10631,7 @@ class ProgramManager {
11104
10631
  _assertClass(offline_query, OfflineQuery);
11105
10632
  ptr5 = offline_query.__destroy_into_raw();
11106
10633
  }
11107
- let ptr6 = 0;
11108
- if (!isLikeNone(program_imports)) {
11109
- _assertClass(program_imports, ProgramImports);
11110
- ptr6 = program_imports.__destroy_into_raw();
11111
- }
11112
- 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, ptr6);
10634
+ 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);
11113
10635
  return takeObject(ret);
11114
10636
  }
11115
10637
  /**
@@ -11137,10 +10659,9 @@ class ProgramManager {
11137
10659
  * @param {ProvingKey | null} [fee_proving_key]
11138
10660
  * @param {VerifyingKey | null} [fee_verifying_key]
11139
10661
  * @param {OfflineQuery | null} [offline_query]
11140
- * @param {ProgramImports | null} [program_imports]
11141
10662
  * @returns {Promise<Transaction>}
11142
10663
  */
11143
- static buildUpgradeTransaction(private_key, program, priority_fee_credits, fee_record, url, imports, fee_proving_key, fee_verifying_key, offline_query, program_imports) {
10664
+ static buildUpgradeTransaction(private_key, program, priority_fee_credits, fee_record, url, imports, fee_proving_key, fee_verifying_key, offline_query) {
11144
10665
  _assertClass(private_key, PrivateKey);
11145
10666
  const ptr0 = passStringToWasm0(program, wasm.__wbindgen_export, wasm.__wbindgen_export2);
11146
10667
  const len0 = WASM_VECTOR_LEN;
@@ -11166,12 +10687,7 @@ class ProgramManager {
11166
10687
  _assertClass(offline_query, OfflineQuery);
11167
10688
  ptr5 = offline_query.__destroy_into_raw();
11168
10689
  }
11169
- let ptr6 = 0;
11170
- if (!isLikeNone(program_imports)) {
11171
- _assertClass(program_imports, ProgramImports);
11172
- ptr6 = program_imports.__destroy_into_raw();
11173
- }
11174
- const ret = wasm.programmanager_buildUpgradeTransaction(private_key.__wbg_ptr, ptr0, len0, priority_fee_credits, ptr1, ptr2, len2, isLikeNone(imports) ? 0 : addHeapObject(imports), ptr3, ptr4, ptr5, ptr6);
10690
+ const ret = wasm.programmanager_buildUpgradeTransaction(private_key.__wbg_ptr, ptr0, len0, priority_fee_credits, ptr1, ptr2, len2, isLikeNone(imports) ? 0 : addHeapObject(imports), ptr3, ptr4, ptr5);
11175
10691
  return takeObject(ret);
11176
10692
  }
11177
10693
  /**
@@ -11185,10 +10701,19 @@ class ProgramManager {
11185
10701
  * @param priority_fee_credits The optional priority fee to be paid for the transaction
11186
10702
  * @param fee_record The record to spend the fee from
11187
10703
  * @param url The url of the Aleo network node to send the transaction to
10704
+ * If this is set to 'true' the keys synthesized (or passed in as optional parameters via the
10705
+ * `proving_key` and `verifying_key` arguments) will be stored in the ProgramManager's memory
10706
+ * and used for subsequent transactions. If this is set to 'false' the proving and verifying
10707
+ * keys will be deallocated from memory after the transaction is executed.
11188
10708
  * @param imports (optional) Provide a list of imports to use for the function execution in the
11189
10709
  * form of a javascript object where the keys are a string of the program name and the values
11190
10710
  * are a string representing the program source code \{ "hello.aleo": "hello.aleo source code" \}
11191
- * @param edition The edition of the program to execute. Defaults to 1.
10711
+ * @param proving_key (optional) Provide a verifying key to use for the function execution
10712
+ * @param verifying_key (optional) Provide a verifying key to use for the function execution
10713
+ * @param fee_proving_key (optional) Provide a proving key to use for the fee execution
10714
+ * @param fee_verifying_key (optional) Provide a verifying key to use for the fee execution
10715
+ * @param offline_query An offline query object to use if building a transaction without an internet connection.
10716
+ * @param edition The edition of the program to execute. Defaults to the latest found on the network, or 1 if the program does not exist on the network.
11192
10717
  * @returns {Transaction}
11193
10718
  * @param {PrivateKey} private_key
11194
10719
  * @param {string} program
@@ -11199,10 +10724,9 @@ class ProgramManager {
11199
10724
  * @param {string | null} [url]
11200
10725
  * @param {object | null} [imports]
11201
10726
  * @param {number | null} [edition]
11202
- * @param {ProgramImports | null} [program_imports]
11203
10727
  * @returns {Promise<Transaction>}
11204
10728
  */
11205
- static buildDevnodeExecutionTransaction(private_key, program, _function, inputs, priority_fee_credits, fee_record, url, imports, edition, program_imports) {
10729
+ static buildDevnodeExecutionTransaction(private_key, program, _function, inputs, priority_fee_credits, fee_record, url, imports, edition) {
11206
10730
  _assertClass(private_key, PrivateKey);
11207
10731
  const ptr0 = passStringToWasm0(program, wasm.__wbindgen_export, wasm.__wbindgen_export2);
11208
10732
  const len0 = WASM_VECTOR_LEN;
@@ -11215,12 +10739,7 @@ class ProgramManager {
11215
10739
  }
11216
10740
  var ptr3 = isLikeNone(url) ? 0 : passStringToWasm0(url, wasm.__wbindgen_export, wasm.__wbindgen_export2);
11217
10741
  var len3 = WASM_VECTOR_LEN;
11218
- let ptr4 = 0;
11219
- if (!isLikeNone(program_imports)) {
11220
- _assertClass(program_imports, ProgramImports);
11221
- ptr4 = program_imports.__destroy_into_raw();
11222
- }
11223
- const ret = wasm.programmanager_buildDevnodeExecutionTransaction(private_key.__wbg_ptr, ptr0, len0, ptr1, len1, addHeapObject(inputs), priority_fee_credits, ptr2, ptr3, len3, isLikeNone(imports) ? 0 : addHeapObject(imports), isLikeNone(edition) ? 0xFFFFFF : edition, ptr4);
10742
+ const ret = wasm.programmanager_buildDevnodeExecutionTransaction(private_key.__wbg_ptr, ptr0, len0, ptr1, len1, addHeapObject(inputs), priority_fee_credits, ptr2, ptr3, len3, isLikeNone(imports) ? 0 : addHeapObject(imports), isLikeNone(edition) ? 0xFFFFFF : edition);
11224
10743
  return takeObject(ret);
11225
10744
  }
11226
10745
  /**
@@ -11265,7 +10784,6 @@ class ProgramManager {
11265
10784
  * @param imports The imports of the program being executed.
11266
10785
  * @param url The url to get the inclusion proving information from.
11267
10786
  * @param offline_query Optional offline query object if building a Transaction offline.
11268
- * @param edition The program edition (defaults to 1).
11269
10787
  * @param {Authorization} authorization
11270
10788
  * @param {Authorization | null | undefined} fee_authorization
11271
10789
  * @param {string} program
@@ -11276,11 +10794,9 @@ class ProgramManager {
11276
10794
  * @param {object | null} [imports]
11277
10795
  * @param {string | null} [url]
11278
10796
  * @param {OfflineQuery | null} [offline_query]
11279
- * @param {ProgramImports | null} [program_imports]
11280
- * @param {number | null} [edition]
11281
10797
  * @returns {Promise<Transaction>}
11282
10798
  */
11283
- static executeAuthorization(authorization, fee_authorization, program, proving_key, verifying_key, fee_proving_key, fee_verifying_key, imports, url, offline_query, program_imports, edition) {
10799
+ static executeAuthorization(authorization, fee_authorization, program, proving_key, verifying_key, fee_proving_key, fee_verifying_key, imports, url, offline_query) {
11284
10800
  _assertClass(authorization, Authorization);
11285
10801
  var ptr0 = authorization.__destroy_into_raw();
11286
10802
  let ptr1 = 0;
@@ -11317,44 +10833,35 @@ class ProgramManager {
11317
10833
  _assertClass(offline_query, OfflineQuery);
11318
10834
  ptr8 = offline_query.__destroy_into_raw();
11319
10835
  }
11320
- let ptr9 = 0;
11321
- if (!isLikeNone(program_imports)) {
11322
- _assertClass(program_imports, ProgramImports);
11323
- ptr9 = program_imports.__destroy_into_raw();
11324
- }
11325
- const ret = wasm.programmanager_executeAuthorization(ptr0, ptr1, ptr2, len2, ptr3, ptr4, ptr5, ptr6, isLikeNone(imports) ? 0 : addHeapObject(imports), ptr7, len7, ptr8, ptr9, isLikeNone(edition) ? 0xFFFFFF : edition);
10836
+ const ret = wasm.programmanager_executeAuthorization(ptr0, ptr1, ptr2, len2, ptr3, ptr4, ptr5, ptr6, isLikeNone(imports) ? 0 : addHeapObject(imports), ptr7, len7, ptr8);
11326
10837
  return takeObject(ret);
11327
10838
  }
11328
10839
  /**
11329
- * Estimate Fee for Aleo function execution.
10840
+ * Estimate Fee for Aleo function execution. Note if "cache" is set to true, the proving and
10841
+ * verifying keys will be stored in the ProgramManager's memory and used for subsequent
10842
+ * program executions.
11330
10843
  *
11331
10844
  * @param program The source code of the program to estimate the execution fee for.
11332
10845
  * @param function The name of the function to estimate the execution fee for.
11333
10846
  * @param imports (optional) Provide a list of imports to use for the fee estimation in the
11334
10847
  * form of a javascript object where the keys are a string of the program name and the values
11335
10848
  * are a string representing the program source code \{ "hello.aleo": "hello.aleo source code" \}
11336
- * @param edition The edition of the program. Defaults to 1.
10849
+ * @param edition {
11337
10850
  * @returns {u64} Fee in microcredits
11338
10851
  * @param {string} program
11339
10852
  * @param {string} _function
11340
10853
  * @param {object | null} [imports]
11341
10854
  * @param {number | null} [edition]
11342
- * @param {ProgramImports | null} [program_imports]
11343
10855
  * @returns {bigint}
11344
10856
  */
11345
- static estimateExecutionFee(program, _function, imports, edition, program_imports) {
10857
+ static estimateExecutionFee(program, _function, imports, edition) {
11346
10858
  try {
11347
10859
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
11348
10860
  const ptr0 = passStringToWasm0(program, wasm.__wbindgen_export, wasm.__wbindgen_export2);
11349
10861
  const len0 = WASM_VECTOR_LEN;
11350
10862
  const ptr1 = passStringToWasm0(_function, wasm.__wbindgen_export, wasm.__wbindgen_export2);
11351
10863
  const len1 = WASM_VECTOR_LEN;
11352
- let ptr2 = 0;
11353
- if (!isLikeNone(program_imports)) {
11354
- _assertClass(program_imports, ProgramImports);
11355
- ptr2 = program_imports.__destroy_into_raw();
11356
- }
11357
- wasm.programmanager_estimateExecutionFee(retptr, ptr0, len0, ptr1, len1, isLikeNone(imports) ? 0 : addHeapObject(imports), isLikeNone(edition) ? 0xFFFFFF : edition, ptr2);
10864
+ wasm.programmanager_estimateExecutionFee(retptr, ptr0, len0, ptr1, len1, isLikeNone(imports) ? 0 : addHeapObject(imports), isLikeNone(edition) ? 0xFFFFFF : edition);
11358
10865
  var r0 = getDataViewMemory0().getBigInt64(retptr + 8 * 0, true);
11359
10866
  var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
11360
10867
  var r3 = getDataViewMemory0().getInt32(retptr + 4 * 3, true);
@@ -11383,7 +10890,7 @@ class ProgramManager {
11383
10890
  * @param {Object | undefined} imports (optional) Provide a list of imports to use for the function execution in the
11384
10891
  * form of a javascript object where the keys are a string of the program name and the values
11385
10892
  * are a string representing the program source code \{ "hello.aleo": "hello.aleo source code" \}
11386
- * @param {ProvingKey | undefined} proving_key (optional) Provide a proving key to use for the function execution
10893
+ * @param {ProvingKey | undefined} proving_key (optional) Provide a verifying key to use for the function execution
11387
10894
  * @param {VerifyingKey | undefined} verifying_key (optional) Provide a verifying key to use for the function execution
11388
10895
  * @param {PrivateKey} private_key
11389
10896
  * @param {string} program
@@ -11397,10 +10904,9 @@ class ProgramManager {
11397
10904
  * @param {string | null} [url]
11398
10905
  * @param {OfflineQuery | null} [offline_query]
11399
10906
  * @param {number | null} [edition]
11400
- * @param {ProgramImports | null} [program_imports]
11401
10907
  * @returns {Promise<ExecutionResponse>}
11402
10908
  */
11403
- static executeFunctionOffline(private_key, program, _function, inputs, prove_execution, cache, imports, proving_key, verifying_key, url, offline_query, edition, program_imports) {
10909
+ static executeFunctionOffline(private_key, program, _function, inputs, prove_execution, cache, imports, proving_key, verifying_key, url, offline_query, edition) {
11404
10910
  _assertClass(private_key, PrivateKey);
11405
10911
  const ptr0 = passStringToWasm0(program, wasm.__wbindgen_export, wasm.__wbindgen_export2);
11406
10912
  const len0 = WASM_VECTOR_LEN;
@@ -11423,12 +10929,7 @@ class ProgramManager {
11423
10929
  _assertClass(offline_query, OfflineQuery);
11424
10930
  ptr5 = offline_query.__destroy_into_raw();
11425
10931
  }
11426
- let ptr6 = 0;
11427
- if (!isLikeNone(program_imports)) {
11428
- _assertClass(program_imports, ProgramImports);
11429
- ptr6 = program_imports.__destroy_into_raw();
11430
- }
11431
- const ret = wasm.programmanager_executeFunctionOffline(private_key.__wbg_ptr, ptr0, len0, ptr1, len1, addHeapObject(inputs), prove_execution, cache, isLikeNone(imports) ? 0 : addHeapObject(imports), ptr2, ptr3, ptr4, len4, ptr5, isLikeNone(edition) ? 0xFFFFFF : edition, ptr6);
10932
+ const ret = wasm.programmanager_executeFunctionOffline(private_key.__wbg_ptr, ptr0, len0, ptr1, len1, addHeapObject(inputs), prove_execution, cache, isLikeNone(imports) ? 0 : addHeapObject(imports), ptr2, ptr3, ptr4, len4, ptr5, isLikeNone(edition) ? 0xFFFFFF : edition);
11432
10933
  return takeObject(ret);
11433
10934
  }
11434
10935
  /**
@@ -11447,21 +10948,15 @@ class ProgramManager {
11447
10948
  * @param {string} program
11448
10949
  * @param {object | null} [imports]
11449
10950
  * @param {number | null} [edition]
11450
- * @param {ProgramImports | null} [program_imports]
11451
10951
  * @returns {bigint}
11452
10952
  */
11453
- static estimateFeeForAuthorization(authorization, program, imports, edition, program_imports) {
10953
+ static estimateFeeForAuthorization(authorization, program, imports, edition) {
11454
10954
  try {
11455
10955
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
11456
10956
  _assertClass(authorization, Authorization);
11457
10957
  const ptr0 = passStringToWasm0(program, wasm.__wbindgen_export, wasm.__wbindgen_export2);
11458
10958
  const len0 = WASM_VECTOR_LEN;
11459
- let ptr1 = 0;
11460
- if (!isLikeNone(program_imports)) {
11461
- _assertClass(program_imports, ProgramImports);
11462
- ptr1 = program_imports.__destroy_into_raw();
11463
- }
11464
- wasm.programmanager_estimateFeeForAuthorization(retptr, authorization.__wbg_ptr, ptr0, len0, isLikeNone(imports) ? 0 : addHeapObject(imports), isLikeNone(edition) ? 0xFFFFFF : edition, ptr1);
10959
+ wasm.programmanager_estimateFeeForAuthorization(retptr, authorization.__wbg_ptr, ptr0, len0, isLikeNone(imports) ? 0 : addHeapObject(imports), isLikeNone(edition) ? 0xFFFFFF : edition);
11465
10960
  var r0 = getDataViewMemory0().getBigInt64(retptr + 8 * 0, true);
11466
10961
  var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
11467
10962
  var r3 = getDataViewMemory0().getInt32(retptr + 4 * 3, true);
@@ -11483,15 +10978,19 @@ class ProgramManager {
11483
10978
  * @param priority_fee_credits The optional priority fee to be paid for the transaction
11484
10979
  * @param fee_record The record to spend the fee from
11485
10980
  * @param url The url of the Aleo network node to send the transaction to
10981
+ * If this is set to 'true' the keys synthesized (or passed in as optional parameters via the
10982
+ * `proving_key` and `verifying_key` arguments) will be stored in the ProgramManager's memory
10983
+ * and used for subsequent transactions. If this is set to 'false' the proving and verifying
10984
+ * keys will be deallocated from memory after the transaction is executed.
11486
10985
  * @param imports (optional) Provide a list of imports to use for the function execution in the
11487
10986
  * form of a javascript object where the keys are a string of the program name and the values
11488
10987
  * are a string representing the program source code \{ "hello.aleo": "hello.aleo source code" \}
11489
- * @param proving_key (optional) Provide a proving key to use for the function execution
10988
+ * @param proving_key (optional) Provide a verifying key to use for the function execution
11490
10989
  * @param verifying_key (optional) Provide a verifying key to use for the function execution
11491
10990
  * @param fee_proving_key (optional) Provide a proving key to use for the fee execution
11492
10991
  * @param fee_verifying_key (optional) Provide a verifying key to use for the fee execution
11493
10992
  * @param offline_query An offline query object to use if building a transaction without an internet connection.
11494
- * @param edition The edition of the program to execute. Defaults to 1.
10993
+ * @param edition The edition of the program to execute. Defaults to the latest found on the network, or 1 if the program does not exist on the network.
11495
10994
  * @returns {Transaction}
11496
10995
  * @param {PrivateKey} private_key
11497
10996
  * @param {string} program
@@ -11507,10 +11006,9 @@ class ProgramManager {
11507
11006
  * @param {VerifyingKey | null} [fee_verifying_key]
11508
11007
  * @param {OfflineQuery | null} [offline_query]
11509
11008
  * @param {number | null} [edition]
11510
- * @param {ProgramImports | null} [program_imports]
11511
11009
  * @returns {Promise<Transaction>}
11512
11010
  */
11513
- 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, edition, program_imports) {
11011
+ 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, edition) {
11514
11012
  _assertClass(private_key, PrivateKey);
11515
11013
  const ptr0 = passStringToWasm0(program, wasm.__wbindgen_export, wasm.__wbindgen_export2);
11516
11014
  const len0 = WASM_VECTOR_LEN;
@@ -11548,12 +11046,7 @@ class ProgramManager {
11548
11046
  _assertClass(offline_query, OfflineQuery);
11549
11047
  ptr8 = offline_query.__destroy_into_raw();
11550
11048
  }
11551
- let ptr9 = 0;
11552
- if (!isLikeNone(program_imports)) {
11553
- _assertClass(program_imports, ProgramImports);
11554
- ptr9 = program_imports.__destroy_into_raw();
11555
- }
11556
- 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, isLikeNone(edition) ? 0xFFFFFF : edition, ptr9);
11049
+ 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, isLikeNone(edition) ? 0xFFFFFF : edition);
11557
11050
  return takeObject(ret);
11558
11051
  }
11559
11052
  /**
@@ -11678,10 +11171,9 @@ class ProgramManager {
11678
11171
  * @param {number | null} [edition]
11679
11172
  * @param {object | null} [imports]
11680
11173
  * @param {PrivateKey | null} [private_key]
11681
- * @param {ProgramImports | null} [program_imports]
11682
11174
  * @returns {Promise<Authorization>}
11683
11175
  */
11684
- static buildAuthorizationFromExecutionRequest(request, program, unchecked, edition, imports, private_key, program_imports) {
11176
+ static buildAuthorizationFromExecutionRequest(request, program, unchecked, edition, imports, private_key) {
11685
11177
  _assertClass(request, ExecutionRequest);
11686
11178
  const ptr0 = passStringToWasm0(program, wasm.__wbindgen_export, wasm.__wbindgen_export2);
11687
11179
  const len0 = WASM_VECTOR_LEN;
@@ -11690,12 +11182,7 @@ class ProgramManager {
11690
11182
  _assertClass(private_key, PrivateKey);
11691
11183
  ptr1 = private_key.__destroy_into_raw();
11692
11184
  }
11693
- let ptr2 = 0;
11694
- if (!isLikeNone(program_imports)) {
11695
- _assertClass(program_imports, ProgramImports);
11696
- ptr2 = program_imports.__destroy_into_raw();
11697
- }
11698
- const ret = wasm.programmanager_buildAuthorizationFromExecutionRequest(request.__wbg_ptr, ptr0, len0, unchecked, isLikeNone(edition) ? 0xFFFFFF : edition, isLikeNone(imports) ? 0 : addHeapObject(imports), ptr1, ptr2);
11185
+ const ret = wasm.programmanager_buildAuthorizationFromExecutionRequest(request.__wbg_ptr, ptr0, len0, unchecked, isLikeNone(edition) ? 0xFFFFFF : edition, isLikeNone(imports) ? 0 : addHeapObject(imports), ptr1);
11699
11186
  return takeObject(ret);
11700
11187
  }
11701
11188
  /**
@@ -11713,21 +11200,15 @@ class ProgramManager {
11713
11200
  * @param {Array<any>} inputs
11714
11201
  * @param {object | null} [imports]
11715
11202
  * @param {number | null} [edition]
11716
- * @param {ProgramImports | null} [program_imports]
11717
11203
  * @returns {Promise<Authorization>}
11718
11204
  */
11719
- static buildAuthorizationUnchecked(private_key, program, function_name, inputs, imports, edition, program_imports) {
11205
+ static buildAuthorizationUnchecked(private_key, program, function_name, inputs, imports, edition) {
11720
11206
  _assertClass(private_key, PrivateKey);
11721
11207
  const ptr0 = passStringToWasm0(program, wasm.__wbindgen_export, wasm.__wbindgen_export2);
11722
11208
  const len0 = WASM_VECTOR_LEN;
11723
11209
  const ptr1 = passStringToWasm0(function_name, wasm.__wbindgen_export, wasm.__wbindgen_export2);
11724
11210
  const len1 = WASM_VECTOR_LEN;
11725
- let ptr2 = 0;
11726
- if (!isLikeNone(program_imports)) {
11727
- _assertClass(program_imports, ProgramImports);
11728
- ptr2 = program_imports.__destroy_into_raw();
11729
- }
11730
- const ret = wasm.programmanager_buildAuthorizationUnchecked(private_key.__wbg_ptr, ptr0, len0, ptr1, len1, addHeapObject(inputs), isLikeNone(imports) ? 0 : addHeapObject(imports), isLikeNone(edition) ? 0xFFFFFF : edition, ptr2);
11211
+ const ret = wasm.programmanager_buildAuthorizationUnchecked(private_key.__wbg_ptr, ptr0, len0, ptr1, len1, addHeapObject(inputs), isLikeNone(imports) ? 0 : addHeapObject(imports), isLikeNone(edition) ? 0xFFFFFF : edition);
11731
11212
  return takeObject(ret);
11732
11213
  }
11733
11214
  /**
@@ -11744,21 +11225,15 @@ class ProgramManager {
11744
11225
  * @param {Array<any>} inputs
11745
11226
  * @param {object | null} [imports]
11746
11227
  * @param {number | null} [edition]
11747
- * @param {ProgramImports | null} [program_imports]
11748
11228
  * @returns {Promise<Authorization>}
11749
11229
  */
11750
- static authorize(private_key, program, function_name, inputs, imports, edition, program_imports) {
11230
+ static authorize(private_key, program, function_name, inputs, imports, edition) {
11751
11231
  _assertClass(private_key, PrivateKey);
11752
11232
  const ptr0 = passStringToWasm0(program, wasm.__wbindgen_export, wasm.__wbindgen_export2);
11753
11233
  const len0 = WASM_VECTOR_LEN;
11754
11234
  const ptr1 = passStringToWasm0(function_name, wasm.__wbindgen_export, wasm.__wbindgen_export2);
11755
11235
  const len1 = WASM_VECTOR_LEN;
11756
- let ptr2 = 0;
11757
- if (!isLikeNone(program_imports)) {
11758
- _assertClass(program_imports, ProgramImports);
11759
- ptr2 = program_imports.__destroy_into_raw();
11760
- }
11761
- const ret = wasm.programmanager_authorize(private_key.__wbg_ptr, ptr0, len0, ptr1, len1, addHeapObject(inputs), isLikeNone(imports) ? 0 : addHeapObject(imports), isLikeNone(edition) ? 0xFFFFFF : edition, ptr2);
11236
+ const ret = wasm.programmanager_authorize(private_key.__wbg_ptr, ptr0, len0, ptr1, len1, addHeapObject(inputs), isLikeNone(imports) ? 0 : addHeapObject(imports), isLikeNone(edition) ? 0xFFFFFF : edition);
11762
11237
  return takeObject(ret);
11763
11238
  }
11764
11239
  }
@@ -18663,10 +18138,6 @@ function __wbg_get_imports(memory) {
18663
18138
  const ret = typeof(getObject(arg0)) === 'function';
18664
18139
  return ret;
18665
18140
  };
18666
- imports.wbg.__wbg___wbindgen_is_null_5e69f72e906cc57c = function(arg0) {
18667
- const ret = getObject(arg0) === null;
18668
- return ret;
18669
- };
18670
18141
  imports.wbg.__wbg___wbindgen_is_object_c818261d21f283a4 = function(arg0) {
18671
18142
  const val = getObject(arg0);
18672
18143
  const ret = typeof(val) === 'object' && val !== null;
@@ -18821,16 +18292,6 @@ function __wbg_get_imports(memory) {
18821
18292
  const ret = getObject(arg0).headers;
18822
18293
  return addHeapObject(ret);
18823
18294
  };
18824
- imports.wbg.__wbg_instanceof_Object_10bb762262230c68 = function(arg0) {
18825
- let result;
18826
- try {
18827
- result = getObject(arg0) instanceof Object;
18828
- } catch (_) {
18829
- result = false;
18830
- }
18831
- const ret = result;
18832
- return ret;
18833
- };
18834
18295
  imports.wbg.__wbg_instanceof_Response_f4f3e87e07f3135c = function(arg0) {
18835
18296
  let result;
18836
18297
  try {
@@ -18875,7 +18336,7 @@ function __wbg_get_imports(memory) {
18875
18336
  const ret = getObject(arg0).length;
18876
18337
  return ret;
18877
18338
  };
18878
- imports.wbg.__wbg_log_4d31b727737133f0 = function(arg0, arg1) {
18339
+ imports.wbg.__wbg_log_0b9e82a3d425c505 = function(arg0, arg1) {
18879
18340
  console.log(getStringFromWasm0(arg0, arg1));
18880
18341
  };
18881
18342
  imports.wbg.__wbg_msCrypto_a61aeb35a24c1329 = function(arg0) {
@@ -18897,7 +18358,7 @@ function __wbg_get_imports(memory) {
18897
18358
  const a = state0.a;
18898
18359
  state0.a = 0;
18899
18360
  try {
18900
- return __wasm_bindgen_func_elem_7482(a, state0.b, arg0, arg1);
18361
+ return __wasm_bindgen_func_elem_7446(a, state0.b, arg0, arg1);
18901
18362
  } finally {
18902
18363
  state0.a = a;
18903
18364
  }
@@ -19084,7 +18545,7 @@ function __wbg_get_imports(memory) {
19084
18545
  const ret = Signature.__wrap(arg0);
19085
18546
  return addHeapObject(ret);
19086
18547
  };
19087
- imports.wbg.__wbg_spawnWorker_b2ee94a34e338350 = function(arg0, arg1, arg2, arg3) {
18548
+ imports.wbg.__wbg_spawnWorker_fd8a412decad8341 = function(arg0, arg1, arg2, arg3) {
19088
18549
  const ret = spawnWorker(getObject(arg0), getObject(arg1), getObject(arg2), arg3 >>> 0);
19089
18550
  return addHeapObject(ret);
19090
18551
  };
@@ -19176,7 +18637,7 @@ function __wbg_get_imports(memory) {
19176
18637
  };
19177
18638
  imports.wbg.__wbindgen_cast_0eb37dec5f5def71 = function(arg0, arg1) {
19178
18639
  // Cast intrinsic for `Closure(Closure { dtor_idx: 358, function: Function { arguments: [], shim_idx: 465, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
19179
- const ret = makeMutClosure(arg0, arg1, wasm.__wasm_bindgen_func_elem_7208, __wasm_bindgen_func_elem_7209);
18640
+ const ret = makeMutClosure(arg0, arg1, wasm.__wasm_bindgen_func_elem_7172, __wasm_bindgen_func_elem_7173);
19180
18641
  return addHeapObject(ret);
19181
18642
  };
19182
18643
  imports.wbg.__wbindgen_cast_2241b6af4c4b2941 = function(arg0, arg1) {
@@ -19196,12 +18657,12 @@ function __wbg_get_imports(memory) {
19196
18657
  };
19197
18658
  imports.wbg.__wbindgen_cast_4a64cbb5b17898c9 = function(arg0, arg1) {
19198
18659
  // Cast intrinsic for `Closure(Closure { dtor_idx: 358, function: Function { arguments: [Externref], shim_idx: 359, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
19199
- const ret = makeMutClosure(arg0, arg1, wasm.__wasm_bindgen_func_elem_7208, __wasm_bindgen_func_elem_8576);
18660
+ const ret = makeMutClosure(arg0, arg1, wasm.__wasm_bindgen_func_elem_7172, __wasm_bindgen_func_elem_8534);
19200
18661
  return addHeapObject(ret);
19201
18662
  };
19202
18663
  imports.wbg.__wbindgen_cast_65bbaf572cb463ed = function(arg0, arg1) {
19203
18664
  // Cast intrinsic for `Closure(Closure { dtor_idx: 358, function: Function { arguments: [NamedExternref("MessageEvent")], shim_idx: 359, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
19204
- const ret = makeMutClosure(arg0, arg1, wasm.__wasm_bindgen_func_elem_7208, __wasm_bindgen_func_elem_8576);
18665
+ const ret = makeMutClosure(arg0, arg1, wasm.__wasm_bindgen_func_elem_7172, __wasm_bindgen_func_elem_8534);
19205
18666
  return addHeapObject(ret);
19206
18667
  };
19207
18668
  imports.wbg.__wbindgen_cast_9ae0607507abb057 = function(arg0) {
@@ -19344,7 +18805,6 @@ var exports$1 = /*#__PURE__*/Object.freeze({
19344
18805
  PrivateKey: PrivateKey,
19345
18806
  PrivateKeyCiphertext: PrivateKeyCiphertext,
19346
18807
  Program: Program,
19347
- ProgramImports: ProgramImports,
19348
18808
  ProgramManager: ProgramManager,
19349
18809
  Proof: Proof,
19350
18810
  ProvingKey: ProvingKey,