@cardananium/cquisitor-lib 0.1.0-beta.2 → 0.1.0-beta.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.
@@ -125,6 +125,15 @@ function getFloat64Memory0() {
125
125
  return cachedFloat64Memory0;
126
126
  }
127
127
 
128
+ let cachedBigInt64Memory0 = null;
129
+
130
+ function getBigInt64Memory0() {
131
+ if (cachedBigInt64Memory0 === null || cachedBigInt64Memory0.byteLength === 0) {
132
+ cachedBigInt64Memory0 = new BigInt64Array(wasm.memory.buffer);
133
+ }
134
+ return cachedBigInt64Memory0;
135
+ }
136
+
128
137
  function debugString(val) {
129
138
  // primitive types
130
139
  const type = typeof val;
@@ -295,292 +304,147 @@ export function check_block_or_tx_signatures(hex_str) {
295
304
  }
296
305
 
297
306
  /**
298
- * @param {string} cbor_hex
299
- * @returns {any}
300
- */
301
- export function cbor_to_json(cbor_hex) {
302
- try {
303
- const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
304
- const ptr0 = passStringToWasm0(cbor_hex, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
305
- const len0 = WASM_VECTOR_LEN;
306
- wasm.cbor_to_json(retptr, ptr0, len0);
307
- var r0 = getInt32Memory0()[retptr / 4 + 0];
308
- var r1 = getInt32Memory0()[retptr / 4 + 1];
309
- var r2 = getInt32Memory0()[retptr / 4 + 2];
310
- if (r2) {
311
- throw takeObject(r1);
312
- }
313
- return takeObject(r0);
314
- } finally {
315
- wasm.__wbindgen_add_to_stack_pointer(16);
316
- }
317
- }
318
-
319
- function _assertClass(instance, klass) {
320
- if (!(instance instanceof klass)) {
321
- throw new Error(`expected instance of ${klass.name}`);
322
- }
323
- return instance.ptr;
324
- }
325
-
326
- function getArrayU8FromWasm0(ptr, len) {
327
- ptr = ptr >>> 0;
328
- return getUint8Memory0().subarray(ptr / 1, ptr / 1 + len);
329
- }
330
-
331
- function passArray8ToWasm0(arg, malloc) {
332
- const ptr = malloc(arg.length * 1, 1) >>> 0;
333
- getUint8Memory0().set(arg, ptr / 1);
334
- WASM_VECTOR_LEN = arg.length;
335
- return ptr;
336
- }
337
-
338
- function getArrayU32FromWasm0(ptr, len) {
339
- ptr = ptr >>> 0;
340
- return getUint32Memory0().subarray(ptr / 4, ptr / 4 + len);
341
- }
342
- /**
343
- * @param {string} password
344
- * @param {string} salt
345
- * @param {string} nonce
346
- * @param {string} data
347
- * @returns {string}
307
+ * @param {string} tx_hex
308
+ * @returns {(string)[]}
348
309
  */
349
- export function encrypt_with_password(password, salt, nonce, data) {
350
- let deferred6_0;
351
- let deferred6_1;
310
+ export function get_utxo_list_from_tx(tx_hex) {
352
311
  try {
353
312
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
354
- const ptr0 = passStringToWasm0(password, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
313
+ const ptr0 = passStringToWasm0(tx_hex, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
355
314
  const len0 = WASM_VECTOR_LEN;
356
- const ptr1 = passStringToWasm0(salt, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
357
- const len1 = WASM_VECTOR_LEN;
358
- const ptr2 = passStringToWasm0(nonce, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
359
- const len2 = WASM_VECTOR_LEN;
360
- const ptr3 = passStringToWasm0(data, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
361
- const len3 = WASM_VECTOR_LEN;
362
- wasm.encrypt_with_password(retptr, ptr0, len0, ptr1, len1, ptr2, len2, ptr3, len3);
315
+ wasm.get_utxo_list_from_tx(retptr, ptr0, len0);
363
316
  var r0 = getInt32Memory0()[retptr / 4 + 0];
364
317
  var r1 = getInt32Memory0()[retptr / 4 + 1];
365
318
  var r2 = getInt32Memory0()[retptr / 4 + 2];
366
319
  var r3 = getInt32Memory0()[retptr / 4 + 3];
367
- var ptr5 = r0;
368
- var len5 = r1;
369
320
  if (r3) {
370
- ptr5 = 0; len5 = 0;
371
321
  throw takeObject(r2);
372
322
  }
373
- deferred6_0 = ptr5;
374
- deferred6_1 = len5;
375
- return getStringFromWasm0(ptr5, len5);
323
+ var v2 = getArrayJsValueFromWasm0(r0, r1).slice();
324
+ wasm.__wbindgen_free(r0, r1 * 4, 4);
325
+ return v2;
376
326
  } finally {
377
327
  wasm.__wbindgen_add_to_stack_pointer(16);
378
- wasm.__wbindgen_free(deferred6_0, deferred6_1, 1);
379
328
  }
380
329
  }
381
330
 
382
331
  /**
383
- * @param {string} password
384
- * @param {string} data
385
- * @returns {string}
332
+ * @param {string} tx_hex
333
+ * @param {any} utxo_json
334
+ * @param {any} cost_models_json
335
+ * @returns {any}
386
336
  */
387
- export function decrypt_with_password(password, data) {
388
- let deferred4_0;
389
- let deferred4_1;
337
+ export function execute_tx_scripts(tx_hex, utxo_json, cost_models_json) {
390
338
  try {
391
339
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
392
- const ptr0 = passStringToWasm0(password, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
340
+ const ptr0 = passStringToWasm0(tx_hex, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
393
341
  const len0 = WASM_VECTOR_LEN;
394
- const ptr1 = passStringToWasm0(data, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
395
- const len1 = WASM_VECTOR_LEN;
396
- wasm.decrypt_with_password(retptr, ptr0, len0, ptr1, len1);
342
+ wasm.execute_tx_scripts(retptr, ptr0, len0, addHeapObject(utxo_json), addHeapObject(cost_models_json));
397
343
  var r0 = getInt32Memory0()[retptr / 4 + 0];
398
344
  var r1 = getInt32Memory0()[retptr / 4 + 1];
399
345
  var r2 = getInt32Memory0()[retptr / 4 + 2];
400
- var r3 = getInt32Memory0()[retptr / 4 + 3];
401
- var ptr3 = r0;
402
- var len3 = r1;
403
- if (r3) {
404
- ptr3 = 0; len3 = 0;
405
- throw takeObject(r2);
346
+ if (r2) {
347
+ throw takeObject(r1);
406
348
  }
407
- deferred4_0 = ptr3;
408
- deferred4_1 = len3;
409
- return getStringFromWasm0(ptr3, len3);
349
+ return takeObject(r0);
410
350
  } finally {
411
351
  wasm.__wbindgen_add_to_stack_pointer(16);
412
- wasm.__wbindgen_free(deferred4_0, deferred4_1, 1);
413
352
  }
414
353
  }
415
354
 
416
355
  /**
417
- * @param {string} json
418
- * @param {PlutusDatumSchema} schema
419
- * @returns {PlutusData}
356
+ * @param {string} cbor_hex
357
+ * @returns {any}
420
358
  */
421
- export function encode_json_str_to_plutus_datum(json, schema) {
359
+ export function cbor_to_json(cbor_hex) {
422
360
  try {
423
361
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
424
- const ptr0 = passStringToWasm0(json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
362
+ const ptr0 = passStringToWasm0(cbor_hex, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
425
363
  const len0 = WASM_VECTOR_LEN;
426
- wasm.encode_json_str_to_plutus_datum(retptr, ptr0, len0, schema);
364
+ wasm.cbor_to_json(retptr, ptr0, len0);
427
365
  var r0 = getInt32Memory0()[retptr / 4 + 0];
428
366
  var r1 = getInt32Memory0()[retptr / 4 + 1];
429
367
  var r2 = getInt32Memory0()[retptr / 4 + 2];
430
368
  if (r2) {
431
369
  throw takeObject(r1);
432
370
  }
433
- return PlutusData.__wrap(r0);
434
- } finally {
435
- wasm.__wbindgen_add_to_stack_pointer(16);
436
- }
437
- }
438
-
439
- /**
440
- * @param {PlutusData} datum
441
- * @param {PlutusDatumSchema} schema
442
- * @returns {string}
443
- */
444
- export function decode_plutus_datum_to_json_str(datum, schema) {
445
- let deferred2_0;
446
- let deferred2_1;
447
- try {
448
- const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
449
- _assertClass(datum, PlutusData);
450
- wasm.decode_plutus_datum_to_json_str(retptr, datum.__wbg_ptr, schema);
451
- var r0 = getInt32Memory0()[retptr / 4 + 0];
452
- var r1 = getInt32Memory0()[retptr / 4 + 1];
453
- var r2 = getInt32Memory0()[retptr / 4 + 2];
454
- var r3 = getInt32Memory0()[retptr / 4 + 3];
455
- var ptr1 = r0;
456
- var len1 = r1;
457
- if (r3) {
458
- ptr1 = 0; len1 = 0;
459
- throw takeObject(r2);
460
- }
461
- deferred2_0 = ptr1;
462
- deferred2_1 = len1;
463
- return getStringFromWasm0(ptr1, len1);
464
- } finally {
465
- wasm.__wbindgen_add_to_stack_pointer(16);
466
- wasm.__wbindgen_free(deferred2_0, deferred2_1, 1);
467
- }
468
- }
469
-
470
- /**
471
- * @param {Uint8Array} bytes
472
- * @returns {TransactionMetadatum}
473
- */
474
- export function encode_arbitrary_bytes_as_metadatum(bytes) {
475
- const ptr0 = passArray8ToWasm0(bytes, wasm.__wbindgen_malloc);
476
- const len0 = WASM_VECTOR_LEN;
477
- const ret = wasm.encode_arbitrary_bytes_as_metadatum(ptr0, len0);
478
- return TransactionMetadatum.__wrap(ret);
479
- }
480
-
481
- /**
482
- * @param {TransactionMetadatum} metadata
483
- * @returns {Uint8Array}
484
- */
485
- export function decode_arbitrary_bytes_from_metadatum(metadata) {
486
- try {
487
- const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
488
- _assertClass(metadata, TransactionMetadatum);
489
- wasm.decode_arbitrary_bytes_from_metadatum(retptr, metadata.__wbg_ptr);
490
- var r0 = getInt32Memory0()[retptr / 4 + 0];
491
- var r1 = getInt32Memory0()[retptr / 4 + 1];
492
- var r2 = getInt32Memory0()[retptr / 4 + 2];
493
- var r3 = getInt32Memory0()[retptr / 4 + 3];
494
- if (r3) {
495
- throw takeObject(r2);
496
- }
497
- var v1 = getArrayU8FromWasm0(r0, r1).slice();
498
- wasm.__wbindgen_free(r0, r1 * 1, 1);
499
- return v1;
371
+ return takeObject(r0);
500
372
  } finally {
501
373
  wasm.__wbindgen_add_to_stack_pointer(16);
502
374
  }
503
375
  }
504
376
 
505
377
  /**
506
- * @param {string} json
507
- * @param {MetadataJsonSchema} schema
508
- * @returns {TransactionMetadatum}
378
+ * @param {string} hex
379
+ * @returns {any}
509
380
  */
510
- export function encode_json_str_to_metadatum(json, schema) {
381
+ export function decode_plutus_program_uplc_json(hex) {
511
382
  try {
512
383
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
513
- const ptr0 = passStringToWasm0(json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
384
+ const ptr0 = passStringToWasm0(hex, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
514
385
  const len0 = WASM_VECTOR_LEN;
515
- wasm.encode_json_str_to_metadatum(retptr, ptr0, len0, schema);
386
+ wasm.decode_plutus_program_uplc_json(retptr, ptr0, len0);
516
387
  var r0 = getInt32Memory0()[retptr / 4 + 0];
517
388
  var r1 = getInt32Memory0()[retptr / 4 + 1];
518
389
  var r2 = getInt32Memory0()[retptr / 4 + 2];
519
390
  if (r2) {
520
391
  throw takeObject(r1);
521
392
  }
522
- return TransactionMetadatum.__wrap(r0);
393
+ return takeObject(r0);
523
394
  } finally {
524
395
  wasm.__wbindgen_add_to_stack_pointer(16);
525
396
  }
526
397
  }
527
398
 
528
399
  /**
529
- * @param {TransactionMetadatum} metadatum
530
- * @param {MetadataJsonSchema} schema
400
+ * @param {string} hex
531
401
  * @returns {string}
532
402
  */
533
- export function decode_metadatum_to_json_str(metadatum, schema) {
534
- let deferred2_0;
535
- let deferred2_1;
403
+ export function decode_plutus_program_pretty_uplc(hex) {
404
+ let deferred3_0;
405
+ let deferred3_1;
536
406
  try {
537
407
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
538
- _assertClass(metadatum, TransactionMetadatum);
539
- wasm.decode_metadatum_to_json_str(retptr, metadatum.__wbg_ptr, schema);
408
+ const ptr0 = passStringToWasm0(hex, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
409
+ const len0 = WASM_VECTOR_LEN;
410
+ wasm.decode_plutus_program_pretty_uplc(retptr, ptr0, len0);
540
411
  var r0 = getInt32Memory0()[retptr / 4 + 0];
541
412
  var r1 = getInt32Memory0()[retptr / 4 + 1];
542
413
  var r2 = getInt32Memory0()[retptr / 4 + 2];
543
414
  var r3 = getInt32Memory0()[retptr / 4 + 3];
544
- var ptr1 = r0;
545
- var len1 = r1;
415
+ var ptr2 = r0;
416
+ var len2 = r1;
546
417
  if (r3) {
547
- ptr1 = 0; len1 = 0;
418
+ ptr2 = 0; len2 = 0;
548
419
  throw takeObject(r2);
549
420
  }
550
- deferred2_0 = ptr1;
551
- deferred2_1 = len1;
552
- return getStringFromWasm0(ptr1, len1);
421
+ deferred3_0 = ptr2;
422
+ deferred3_1 = len2;
423
+ return getStringFromWasm0(ptr2, len2);
553
424
  } finally {
554
425
  wasm.__wbindgen_add_to_stack_pointer(16);
555
- wasm.__wbindgen_free(deferred2_0, deferred2_1, 1);
426
+ wasm.__wbindgen_free(deferred3_0, deferred3_1, 1);
556
427
  }
557
428
  }
558
429
 
559
- /**
560
- * @param {Address} address
561
- * @param {TransactionUnspentOutputs} utxos
562
- * @param {TransactionBuilderConfig} config
563
- * @returns {TransactionBatchList}
564
- */
565
- export function create_send_all(address, utxos, config) {
566
- try {
567
- const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
568
- _assertClass(address, Address);
569
- _assertClass(utxos, TransactionUnspentOutputs);
570
- _assertClass(config, TransactionBuilderConfig);
571
- wasm.create_send_all(retptr, address.__wbg_ptr, utxos.__wbg_ptr, config.__wbg_ptr);
572
- var r0 = getInt32Memory0()[retptr / 4 + 0];
573
- var r1 = getInt32Memory0()[retptr / 4 + 1];
574
- var r2 = getInt32Memory0()[retptr / 4 + 2];
575
- if (r2) {
576
- throw takeObject(r1);
577
- }
578
- return TransactionBatchList.__wrap(r0);
579
- } finally {
580
- wasm.__wbindgen_add_to_stack_pointer(16);
581
- }
430
+ function getArrayU8FromWasm0(ptr, len) {
431
+ ptr = ptr >>> 0;
432
+ return getUint8Memory0().subarray(ptr / 1, ptr / 1 + len);
582
433
  }
583
434
 
435
+ function passArray8ToWasm0(arg, malloc) {
436
+ const ptr = malloc(arg.length * 1, 1) >>> 0;
437
+ getUint8Memory0().set(arg, ptr / 1);
438
+ WASM_VECTOR_LEN = arg.length;
439
+ return ptr;
440
+ }
441
+
442
+ function _assertClass(instance, klass) {
443
+ if (!(instance instanceof klass)) {
444
+ throw new Error(`expected instance of ${klass.name}`);
445
+ }
446
+ return instance.ptr;
447
+ }
584
448
  /**
585
449
  * @param {Transaction} tx
586
450
  * @param {LinearFee} linear_fee
@@ -672,6 +536,11 @@ export function min_ref_script_fee(total_ref_scripts_size, ref_script_coins_per_
672
536
  }
673
537
  }
674
538
 
539
+ function getArrayU32FromWasm0(ptr, len) {
540
+ ptr = ptr >>> 0;
541
+ return getUint32Memory0().subarray(ptr / 4, ptr / 4 + len);
542
+ }
543
+
675
544
  function passArray32ToWasm0(arg, malloc) {
676
545
  const ptr = malloc(arg.length * 4, 4) >>> 0;
677
546
  getUint32Memory0().set(arg, ptr / 4);
@@ -893,59 +762,274 @@ export function has_transaction_set_tag(tx_bytes) {
893
762
  }
894
763
  }
895
764
 
896
- function handleError(f, args) {
765
+ /**
766
+ * @param {Address} address
767
+ * @param {TransactionUnspentOutputs} utxos
768
+ * @param {TransactionBuilderConfig} config
769
+ * @returns {TransactionBatchList}
770
+ */
771
+ export function create_send_all(address, utxos, config) {
897
772
  try {
898
- return f.apply(this, args);
899
- } catch (e) {
900
- wasm.__wbindgen_exn_store(addHeapObject(e));
773
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
774
+ _assertClass(address, Address);
775
+ _assertClass(utxos, TransactionUnspentOutputs);
776
+ _assertClass(config, TransactionBuilderConfig);
777
+ wasm.create_send_all(retptr, address.__wbg_ptr, utxos.__wbg_ptr, config.__wbg_ptr);
778
+ var r0 = getInt32Memory0()[retptr / 4 + 0];
779
+ var r1 = getInt32Memory0()[retptr / 4 + 1];
780
+ var r2 = getInt32Memory0()[retptr / 4 + 2];
781
+ if (r2) {
782
+ throw takeObject(r1);
783
+ }
784
+ return TransactionBatchList.__wrap(r0);
785
+ } finally {
786
+ wasm.__wbindgen_add_to_stack_pointer(16);
901
787
  }
902
788
  }
789
+
903
790
  /**
791
+ * @param {string} password
792
+ * @param {string} salt
793
+ * @param {string} nonce
794
+ * @param {string} data
795
+ * @returns {string}
904
796
  */
905
- export const CborContainerType = Object.freeze({ Array:0,"0":"Array",Map:1,"1":"Map", });
797
+ export function encrypt_with_password(password, salt, nonce, data) {
798
+ let deferred6_0;
799
+ let deferred6_1;
800
+ try {
801
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
802
+ const ptr0 = passStringToWasm0(password, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
803
+ const len0 = WASM_VECTOR_LEN;
804
+ const ptr1 = passStringToWasm0(salt, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
805
+ const len1 = WASM_VECTOR_LEN;
806
+ const ptr2 = passStringToWasm0(nonce, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
807
+ const len2 = WASM_VECTOR_LEN;
808
+ const ptr3 = passStringToWasm0(data, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
809
+ const len3 = WASM_VECTOR_LEN;
810
+ wasm.encrypt_with_password(retptr, ptr0, len0, ptr1, len1, ptr2, len2, ptr3, len3);
811
+ var r0 = getInt32Memory0()[retptr / 4 + 0];
812
+ var r1 = getInt32Memory0()[retptr / 4 + 1];
813
+ var r2 = getInt32Memory0()[retptr / 4 + 2];
814
+ var r3 = getInt32Memory0()[retptr / 4 + 3];
815
+ var ptr5 = r0;
816
+ var len5 = r1;
817
+ if (r3) {
818
+ ptr5 = 0; len5 = 0;
819
+ throw takeObject(r2);
820
+ }
821
+ deferred6_0 = ptr5;
822
+ deferred6_1 = len5;
823
+ return getStringFromWasm0(ptr5, len5);
824
+ } finally {
825
+ wasm.__wbindgen_add_to_stack_pointer(16);
826
+ wasm.__wbindgen_free(deferred6_0, deferred6_1, 1);
827
+ }
828
+ }
829
+
906
830
  /**
831
+ * @param {string} password
832
+ * @param {string} data
833
+ * @returns {string}
907
834
  */
908
- export const CredKind = Object.freeze({ Key:0,"0":"Key",Script:1,"1":"Script", });
835
+ export function decrypt_with_password(password, data) {
836
+ let deferred4_0;
837
+ let deferred4_1;
838
+ try {
839
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
840
+ const ptr0 = passStringToWasm0(password, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
841
+ const len0 = WASM_VECTOR_LEN;
842
+ const ptr1 = passStringToWasm0(data, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
843
+ const len1 = WASM_VECTOR_LEN;
844
+ wasm.decrypt_with_password(retptr, ptr0, len0, ptr1, len1);
845
+ var r0 = getInt32Memory0()[retptr / 4 + 0];
846
+ var r1 = getInt32Memory0()[retptr / 4 + 1];
847
+ var r2 = getInt32Memory0()[retptr / 4 + 2];
848
+ var r3 = getInt32Memory0()[retptr / 4 + 3];
849
+ var ptr3 = r0;
850
+ var len3 = r1;
851
+ if (r3) {
852
+ ptr3 = 0; len3 = 0;
853
+ throw takeObject(r2);
854
+ }
855
+ deferred4_0 = ptr3;
856
+ deferred4_1 = len3;
857
+ return getStringFromWasm0(ptr3, len3);
858
+ } finally {
859
+ wasm.__wbindgen_add_to_stack_pointer(16);
860
+ wasm.__wbindgen_free(deferred4_0, deferred4_1, 1);
861
+ }
862
+ }
863
+
909
864
  /**
865
+ * @param {string} json
866
+ * @param {PlutusDatumSchema} schema
867
+ * @returns {PlutusData}
910
868
  */
911
- export const BlockEra = Object.freeze({ Byron:0,"0":"Byron",Shelley:1,"1":"Shelley",Allegra:2,"2":"Allegra",Mary:3,"3":"Mary",Alonzo:4,"4":"Alonzo",Babbage:5,"5":"Babbage",Conway:6,"6":"Conway",Unknown:7,"7":"Unknown", });
869
+ export function encode_json_str_to_plutus_datum(json, schema) {
870
+ try {
871
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
872
+ const ptr0 = passStringToWasm0(json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
873
+ const len0 = WASM_VECTOR_LEN;
874
+ wasm.encode_json_str_to_plutus_datum(retptr, ptr0, len0, schema);
875
+ var r0 = getInt32Memory0()[retptr / 4 + 0];
876
+ var r1 = getInt32Memory0()[retptr / 4 + 1];
877
+ var r2 = getInt32Memory0()[retptr / 4 + 2];
878
+ if (r2) {
879
+ throw takeObject(r1);
880
+ }
881
+ return PlutusData.__wrap(r0);
882
+ } finally {
883
+ wasm.__wbindgen_add_to_stack_pointer(16);
884
+ }
885
+ }
886
+
912
887
  /**
888
+ * @param {PlutusData} datum
889
+ * @param {PlutusDatumSchema} schema
890
+ * @returns {string}
913
891
  */
914
- export const CertificateKind = Object.freeze({ StakeRegistration:0,"0":"StakeRegistration",StakeDeregistration:1,"1":"StakeDeregistration",StakeDelegation:2,"2":"StakeDelegation",PoolRegistration:3,"3":"PoolRegistration",PoolRetirement:4,"4":"PoolRetirement",GenesisKeyDelegation:5,"5":"GenesisKeyDelegation",MoveInstantaneousRewardsCert:6,"6":"MoveInstantaneousRewardsCert",CommitteeHotAuth:7,"7":"CommitteeHotAuth",CommitteeColdResign:8,"8":"CommitteeColdResign",DRepDeregistration:9,"9":"DRepDeregistration",DRepRegistration:10,"10":"DRepRegistration",DRepUpdate:11,"11":"DRepUpdate",StakeAndVoteDelegation:12,"12":"StakeAndVoteDelegation",StakeRegistrationAndDelegation:13,"13":"StakeRegistrationAndDelegation",StakeVoteRegistrationAndDelegation:14,"14":"StakeVoteRegistrationAndDelegation",VoteDelegation:15,"15":"VoteDelegation",VoteRegistrationAndDelegation:16,"16":"VoteRegistrationAndDelegation", });
892
+ export function decode_plutus_datum_to_json_str(datum, schema) {
893
+ let deferred2_0;
894
+ let deferred2_1;
895
+ try {
896
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
897
+ _assertClass(datum, PlutusData);
898
+ wasm.decode_plutus_datum_to_json_str(retptr, datum.__wbg_ptr, schema);
899
+ var r0 = getInt32Memory0()[retptr / 4 + 0];
900
+ var r1 = getInt32Memory0()[retptr / 4 + 1];
901
+ var r2 = getInt32Memory0()[retptr / 4 + 2];
902
+ var r3 = getInt32Memory0()[retptr / 4 + 3];
903
+ var ptr1 = r0;
904
+ var len1 = r1;
905
+ if (r3) {
906
+ ptr1 = 0; len1 = 0;
907
+ throw takeObject(r2);
908
+ }
909
+ deferred2_0 = ptr1;
910
+ deferred2_1 = len1;
911
+ return getStringFromWasm0(ptr1, len1);
912
+ } finally {
913
+ wasm.__wbindgen_add_to_stack_pointer(16);
914
+ wasm.__wbindgen_free(deferred2_0, deferred2_1, 1);
915
+ }
916
+ }
917
+
915
918
  /**
919
+ * @param {Uint8Array} bytes
920
+ * @returns {TransactionMetadatum}
916
921
  */
917
- export const CoinSelectionStrategyCIP2 = Object.freeze({
922
+ export function encode_arbitrary_bytes_as_metadatum(bytes) {
923
+ const ptr0 = passArray8ToWasm0(bytes, wasm.__wbindgen_malloc);
924
+ const len0 = WASM_VECTOR_LEN;
925
+ const ret = wasm.encode_arbitrary_bytes_as_metadatum(ptr0, len0);
926
+ return TransactionMetadatum.__wrap(ret);
927
+ }
928
+
918
929
  /**
919
- * Performs CIP2's Largest First ada-only selection. Will error if outputs contain non-ADA assets.
930
+ * @param {TransactionMetadatum} metadata
931
+ * @returns {Uint8Array}
920
932
  */
921
- LargestFirst:0,"0":"LargestFirst",
933
+ export function decode_arbitrary_bytes_from_metadatum(metadata) {
934
+ try {
935
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
936
+ _assertClass(metadata, TransactionMetadatum);
937
+ wasm.decode_arbitrary_bytes_from_metadatum(retptr, metadata.__wbg_ptr);
938
+ var r0 = getInt32Memory0()[retptr / 4 + 0];
939
+ var r1 = getInt32Memory0()[retptr / 4 + 1];
940
+ var r2 = getInt32Memory0()[retptr / 4 + 2];
941
+ var r3 = getInt32Memory0()[retptr / 4 + 3];
942
+ if (r3) {
943
+ throw takeObject(r2);
944
+ }
945
+ var v1 = getArrayU8FromWasm0(r0, r1).slice();
946
+ wasm.__wbindgen_free(r0, r1 * 1, 1);
947
+ return v1;
948
+ } finally {
949
+ wasm.__wbindgen_add_to_stack_pointer(16);
950
+ }
951
+ }
952
+
922
953
  /**
923
- * Performs CIP2's Random Improve ada-only selection. Will error if outputs contain non-ADA assets.
954
+ * @param {string} json
955
+ * @param {MetadataJsonSchema} schema
956
+ * @returns {TransactionMetadatum}
924
957
  */
925
- RandomImprove:1,"1":"RandomImprove",
958
+ export function encode_json_str_to_metadatum(json, schema) {
959
+ try {
960
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
961
+ const ptr0 = passStringToWasm0(json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
962
+ const len0 = WASM_VECTOR_LEN;
963
+ wasm.encode_json_str_to_metadatum(retptr, ptr0, len0, schema);
964
+ var r0 = getInt32Memory0()[retptr / 4 + 0];
965
+ var r1 = getInt32Memory0()[retptr / 4 + 1];
966
+ var r2 = getInt32Memory0()[retptr / 4 + 2];
967
+ if (r2) {
968
+ throw takeObject(r1);
969
+ }
970
+ return TransactionMetadatum.__wrap(r0);
971
+ } finally {
972
+ wasm.__wbindgen_add_to_stack_pointer(16);
973
+ }
974
+ }
975
+
926
976
  /**
927
- * Same as LargestFirst, but before adding ADA, will insert by largest-first for each asset type.
977
+ * @param {TransactionMetadatum} metadatum
978
+ * @param {MetadataJsonSchema} schema
979
+ * @returns {string}
928
980
  */
929
- LargestFirstMultiAsset:2,"2":"LargestFirstMultiAsset",
981
+ export function decode_metadatum_to_json_str(metadatum, schema) {
982
+ let deferred2_0;
983
+ let deferred2_1;
984
+ try {
985
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
986
+ _assertClass(metadatum, TransactionMetadatum);
987
+ wasm.decode_metadatum_to_json_str(retptr, metadatum.__wbg_ptr, schema);
988
+ var r0 = getInt32Memory0()[retptr / 4 + 0];
989
+ var r1 = getInt32Memory0()[retptr / 4 + 1];
990
+ var r2 = getInt32Memory0()[retptr / 4 + 2];
991
+ var r3 = getInt32Memory0()[retptr / 4 + 3];
992
+ var ptr1 = r0;
993
+ var len1 = r1;
994
+ if (r3) {
995
+ ptr1 = 0; len1 = 0;
996
+ throw takeObject(r2);
997
+ }
998
+ deferred2_0 = ptr1;
999
+ deferred2_1 = len1;
1000
+ return getStringFromWasm0(ptr1, len1);
1001
+ } finally {
1002
+ wasm.__wbindgen_add_to_stack_pointer(16);
1003
+ wasm.__wbindgen_free(deferred2_0, deferred2_1, 1);
1004
+ }
1005
+ }
1006
+
1007
+ function handleError(f, args) {
1008
+ try {
1009
+ return f.apply(this, args);
1010
+ } catch (e) {
1011
+ wasm.__wbindgen_exn_store(addHeapObject(e));
1012
+ }
1013
+ }
930
1014
  /**
931
- * Same as RandomImprove, but before adding ADA, will insert by random-improve for each asset type.
932
1015
  */
933
- RandomImproveMultiAsset:3,"3":"RandomImproveMultiAsset", });
1016
+ export const RelayKind = Object.freeze({ SingleHostAddr:0,"0":"SingleHostAddr",SingleHostName:1,"1":"SingleHostName",MultiHostName:2,"2":"MultiHostName", });
934
1017
  /**
935
1018
  */
936
- export const VoteKind = Object.freeze({ No:0,"0":"No",Yes:1,"1":"Yes",Abstain:2,"2":"Abstain", });
1019
+ export const NetworkIdKind = Object.freeze({ Testnet:0,"0":"Testnet",Mainnet:1,"1":"Mainnet", });
937
1020
  /**
938
1021
  */
939
- export const DRepKind = Object.freeze({ KeyHash:0,"0":"KeyHash",ScriptHash:1,"1":"ScriptHash",AlwaysAbstain:2,"2":"AlwaysAbstain",AlwaysNoConfidence:3,"3":"AlwaysNoConfidence", });
1022
+ export const CertificateKind = Object.freeze({ StakeRegistration:0,"0":"StakeRegistration",StakeDeregistration:1,"1":"StakeDeregistration",StakeDelegation:2,"2":"StakeDelegation",PoolRegistration:3,"3":"PoolRegistration",PoolRetirement:4,"4":"PoolRetirement",GenesisKeyDelegation:5,"5":"GenesisKeyDelegation",MoveInstantaneousRewardsCert:6,"6":"MoveInstantaneousRewardsCert",CommitteeHotAuth:7,"7":"CommitteeHotAuth",CommitteeColdResign:8,"8":"CommitteeColdResign",DRepDeregistration:9,"9":"DRepDeregistration",DRepRegistration:10,"10":"DRepRegistration",DRepUpdate:11,"11":"DRepUpdate",StakeAndVoteDelegation:12,"12":"StakeAndVoteDelegation",StakeRegistrationAndDelegation:13,"13":"StakeRegistrationAndDelegation",StakeVoteRegistrationAndDelegation:14,"14":"StakeVoteRegistrationAndDelegation",VoteDelegation:15,"15":"VoteDelegation",VoteRegistrationAndDelegation:16,"16":"VoteRegistrationAndDelegation", });
940
1023
  /**
1024
+ * Used to choosed the schema for a script JSON string
941
1025
  */
942
- export const VoterKind = Object.freeze({ ConstitutionalCommitteeHotKeyHash:0,"0":"ConstitutionalCommitteeHotKeyHash",ConstitutionalCommitteeHotScriptHash:1,"1":"ConstitutionalCommitteeHotScriptHash",DRepKeyHash:2,"2":"DRepKeyHash",DRepScriptHash:3,"3":"DRepScriptHash",StakingPoolKeyHash:4,"4":"StakingPoolKeyHash", });
1026
+ export const ScriptSchema = Object.freeze({ Wallet:0,"0":"Wallet",Node:1,"1":"Node", });
943
1027
  /**
944
1028
  */
945
- export const LanguageKind = Object.freeze({ PlutusV1:0,"0":"PlutusV1",PlutusV2:1,"1":"PlutusV2",PlutusV3:2,"2":"PlutusV3", });
1029
+ export const DRepKind = Object.freeze({ KeyHash:0,"0":"KeyHash",ScriptHash:1,"1":"ScriptHash",AlwaysAbstain:2,"2":"AlwaysAbstain",AlwaysNoConfidence:3,"3":"AlwaysNoConfidence", });
946
1030
  /**
947
1031
  */
948
- export const MIRPot = Object.freeze({ Reserves:0,"0":"Reserves",Treasury:1,"1":"Treasury", });
1032
+ export const NativeScriptKind = Object.freeze({ ScriptPubkey:0,"0":"ScriptPubkey",ScriptAll:1,"1":"ScriptAll",ScriptAny:2,"2":"ScriptAny",ScriptNOfK:3,"3":"ScriptNOfK",TimelockStart:4,"4":"TimelockStart",TimelockExpiry:5,"5":"TimelockExpiry", });
949
1033
  /**
950
1034
  * JSON <-> PlutusData conversion schemas.
951
1035
  * Follows ScriptDataJsonSchema in cardano-cli defined at:
@@ -999,22 +1083,38 @@ BasicConversions:0,"0":"BasicConversions",
999
1083
  DetailedSchema:1,"1":"DetailedSchema", });
1000
1084
  /**
1001
1085
  */
1086
+ export const MIRKind = Object.freeze({ ToOtherPot:0,"0":"ToOtherPot",ToStakeCredentials:1,"1":"ToStakeCredentials", });
1087
+ /**
1088
+ */
1089
+ export const VoterKind = Object.freeze({ ConstitutionalCommitteeHotKeyHash:0,"0":"ConstitutionalCommitteeHotKeyHash",ConstitutionalCommitteeHotScriptHash:1,"1":"ConstitutionalCommitteeHotScriptHash",DRepKeyHash:2,"2":"DRepKeyHash",DRepScriptHash:3,"3":"DRepScriptHash",StakingPoolKeyHash:4,"4":"StakingPoolKeyHash", });
1090
+ /**
1091
+ */
1092
+ export const CborContainerType = Object.freeze({ Array:0,"0":"Array",Map:1,"1":"Map", });
1093
+ /**
1094
+ */
1095
+ export const TransactionMetadatumKind = Object.freeze({ MetadataMap:0,"0":"MetadataMap",MetadataList:1,"1":"MetadataList",Int:2,"2":"Int",Bytes:3,"3":"Bytes",Text:4,"4":"Text", });
1096
+ /**
1097
+ */
1002
1098
  export const AddressKind = Object.freeze({ Base:0,"0":"Base",Pointer:1,"1":"Pointer",Enterprise:2,"2":"Enterprise",Reward:3,"3":"Reward",Byron:4,"4":"Byron",Malformed:5,"5":"Malformed", });
1003
1099
  /**
1004
1100
  */
1005
- export const GovernanceActionKind = Object.freeze({ ParameterChangeAction:0,"0":"ParameterChangeAction",HardForkInitiationAction:1,"1":"HardForkInitiationAction",TreasuryWithdrawalsAction:2,"2":"TreasuryWithdrawalsAction",NoConfidenceAction:3,"3":"NoConfidenceAction",UpdateCommitteeAction:4,"4":"UpdateCommitteeAction",NewConstitutionAction:5,"5":"NewConstitutionAction",InfoAction:6,"6":"InfoAction", });
1101
+ export const CoinSelectionStrategyCIP2 = Object.freeze({
1006
1102
  /**
1103
+ * Performs CIP2's Largest First ada-only selection. Will error if outputs contain non-ADA assets.
1007
1104
  */
1008
- export const NativeScriptKind = Object.freeze({ ScriptPubkey:0,"0":"ScriptPubkey",ScriptAll:1,"1":"ScriptAll",ScriptAny:2,"2":"ScriptAny",ScriptNOfK:3,"3":"ScriptNOfK",TimelockStart:4,"4":"TimelockStart",TimelockExpiry:5,"5":"TimelockExpiry", });
1105
+ LargestFirst:0,"0":"LargestFirst",
1009
1106
  /**
1107
+ * Performs CIP2's Random Improve ada-only selection. Will error if outputs contain non-ADA assets.
1010
1108
  */
1011
- export const TransactionSetsState = Object.freeze({ AllSetsHaveTag:0,"0":"AllSetsHaveTag",AllSetsHaveNoTag:1,"1":"AllSetsHaveNoTag",MixedSets:2,"2":"MixedSets", });
1109
+ RandomImprove:1,"1":"RandomImprove",
1012
1110
  /**
1111
+ * Same as LargestFirst, but before adding ADA, will insert by largest-first for each asset type.
1013
1112
  */
1014
- export const CborSetType = Object.freeze({ Tagged:0,"0":"Tagged",Untagged:1,"1":"Untagged", });
1113
+ LargestFirstMultiAsset:2,"2":"LargestFirstMultiAsset",
1015
1114
  /**
1115
+ * Same as RandomImprove, but before adding ADA, will insert by random-improve for each asset type.
1016
1116
  */
1017
- export const MIRKind = Object.freeze({ ToOtherPot:0,"0":"ToOtherPot",ToStakeCredentials:1,"1":"ToStakeCredentials", });
1117
+ RandomImproveMultiAsset:3,"3":"RandomImproveMultiAsset", });
1018
1118
  /**
1019
1119
  * Each new language uses a different namespace for hashing its script
1020
1120
  * This is because you could have a language where the same bytes have different semantics
@@ -1024,26 +1124,37 @@ export const MIRKind = Object.freeze({ ToOtherPot:0,"0":"ToOtherPot",ToStakeCred
1024
1124
  export const ScriptHashNamespace = Object.freeze({ NativeScript:0,"0":"NativeScript",PlutusScript:1,"1":"PlutusScript",PlutusScriptV2:2,"2":"PlutusScriptV2",PlutusScriptV3:3,"3":"PlutusScriptV3", });
1025
1125
  /**
1026
1126
  */
1027
- export const TransactionMetadatumKind = Object.freeze({ MetadataMap:0,"0":"MetadataMap",MetadataList:1,"1":"MetadataList",Int:2,"2":"Int",Bytes:3,"3":"Bytes",Text:4,"4":"Text", });
1127
+ export const GovernanceActionKind = Object.freeze({ ParameterChangeAction:0,"0":"ParameterChangeAction",HardForkInitiationAction:1,"1":"HardForkInitiationAction",TreasuryWithdrawalsAction:2,"2":"TreasuryWithdrawalsAction",NoConfidenceAction:3,"3":"NoConfidenceAction",UpdateCommitteeAction:4,"4":"UpdateCommitteeAction",NewConstitutionAction:5,"5":"NewConstitutionAction",InfoAction:6,"6":"InfoAction", });
1028
1128
  /**
1029
1129
  */
1030
- export const MetadataJsonSchema = Object.freeze({ NoConversions:0,"0":"NoConversions",BasicConversions:1,"1":"BasicConversions",DetailedSchema:2,"2":"DetailedSchema", });
1130
+ export const BlockEra = Object.freeze({ Byron:0,"0":"Byron",Shelley:1,"1":"Shelley",Allegra:2,"2":"Allegra",Mary:3,"3":"Mary",Alonzo:4,"4":"Alonzo",Babbage:5,"5":"Babbage",Conway:6,"6":"Conway",Unknown:7,"7":"Unknown", });
1131
+ /**
1132
+ */
1133
+ export const CborSetType = Object.freeze({ Tagged:0,"0":"Tagged",Untagged:1,"1":"Untagged", });
1031
1134
  /**
1032
1135
  */
1033
1136
  export const PlutusDataKind = Object.freeze({ ConstrPlutusData:0,"0":"ConstrPlutusData",Map:1,"1":"Map",List:2,"2":"List",Integer:3,"3":"Integer",Bytes:4,"4":"Bytes", });
1034
1137
  /**
1035
- * Used to choosed the schema for a script JSON string
1036
1138
  */
1037
- export const ScriptSchema = Object.freeze({ Wallet:0,"0":"Wallet",Node:1,"1":"Node", });
1139
+ export const VoteKind = Object.freeze({ No:0,"0":"No",Yes:1,"1":"Yes",Abstain:2,"2":"Abstain", });
1038
1140
  /**
1039
1141
  */
1040
- export const RedeemerTagKind = Object.freeze({ Spend:0,"0":"Spend",Mint:1,"1":"Mint",Cert:2,"2":"Cert",Reward:3,"3":"Reward",Vote:4,"4":"Vote",VotingProposal:5,"5":"VotingProposal", });
1142
+ export const LanguageKind = Object.freeze({ PlutusV1:0,"0":"PlutusV1",PlutusV2:1,"1":"PlutusV2",PlutusV3:2,"2":"PlutusV3", });
1041
1143
  /**
1042
1144
  */
1043
- export const NetworkIdKind = Object.freeze({ Testnet:0,"0":"Testnet",Mainnet:1,"1":"Mainnet", });
1145
+ export const CredKind = Object.freeze({ Key:0,"0":"Key",Script:1,"1":"Script", });
1044
1146
  /**
1045
1147
  */
1046
- export const RelayKind = Object.freeze({ SingleHostAddr:0,"0":"SingleHostAddr",SingleHostName:1,"1":"SingleHostName",MultiHostName:2,"2":"MultiHostName", });
1148
+ export const TransactionSetsState = Object.freeze({ AllSetsHaveTag:0,"0":"AllSetsHaveTag",AllSetsHaveNoTag:1,"1":"AllSetsHaveNoTag",MixedSets:2,"2":"MixedSets", });
1149
+ /**
1150
+ */
1151
+ export const MIRPot = Object.freeze({ Reserves:0,"0":"Reserves",Treasury:1,"1":"Treasury", });
1152
+ /**
1153
+ */
1154
+ export const RedeemerTagKind = Object.freeze({ Spend:0,"0":"Spend",Mint:1,"1":"Mint",Cert:2,"2":"Cert",Reward:3,"3":"Reward",Vote:4,"4":"Vote",VotingProposal:5,"5":"VotingProposal", });
1155
+ /**
1156
+ */
1157
+ export const MetadataJsonSchema = Object.freeze({ NoConversions:0,"0":"NoConversions",BasicConversions:1,"1":"BasicConversions",DetailedSchema:2,"2":"DetailedSchema", });
1047
1158
 
1048
1159
  const AddressFinalization = (typeof FinalizationRegistry === 'undefined')
1049
1160
  ? { register: () => {}, unregister: () => {} }
@@ -7747,14 +7858,14 @@ export class Credentials {
7747
7858
  * @returns {Credentials}
7748
7859
  */
7749
7860
  static new() {
7750
- const ret = wasm.certificates_new();
7861
+ const ret = wasm.credentials_new();
7751
7862
  return Credentials.__wrap(ret);
7752
7863
  }
7753
7864
  /**
7754
7865
  * @returns {number}
7755
7866
  */
7756
7867
  len() {
7757
- const ret = wasm.certificates_len(this.__wbg_ptr);
7868
+ const ret = wasm.credentials_len(this.__wbg_ptr);
7758
7869
  return ret >>> 0;
7759
7870
  }
7760
7871
  /**
@@ -10032,14 +10143,14 @@ export class Ed25519KeyHashes {
10032
10143
  * @returns {Ed25519KeyHashes}
10033
10144
  */
10034
10145
  static new() {
10035
- const ret = wasm.certificates_new();
10146
+ const ret = wasm.credentials_new();
10036
10147
  return Ed25519KeyHashes.__wrap(ret);
10037
10148
  }
10038
10149
  /**
10039
10150
  * @returns {number}
10040
10151
  */
10041
10152
  len() {
10042
- const ret = wasm.certificates_len(this.__wbg_ptr);
10153
+ const ret = wasm.credentials_len(this.__wbg_ptr);
10043
10154
  return ret >>> 0;
10044
10155
  }
10045
10156
  /**
@@ -13114,7 +13225,7 @@ export class GovernanceActionIds {
13114
13225
  * @returns {number}
13115
13226
  */
13116
13227
  len() {
13117
- const ret = wasm.costmdls_len(this.__wbg_ptr);
13228
+ const ret = wasm.governanceactionids_len(this.__wbg_ptr);
13118
13229
  return ret >>> 0;
13119
13230
  }
13120
13231
  }
@@ -16289,7 +16400,7 @@ export class MintBuilder {
16289
16400
  * @returns {MintBuilder}
16290
16401
  */
16291
16402
  static new() {
16292
- const ret = wasm.mintbuilder_new();
16403
+ const ret = wasm.costmdls_new();
16293
16404
  return MintBuilder.__wrap(ret);
16294
16405
  }
16295
16406
  /**
@@ -17824,7 +17935,7 @@ export class NativeScripts {
17824
17935
  * @returns {number}
17825
17936
  */
17826
17937
  len() {
17827
- const ret = wasm.costmodel_len(this.__wbg_ptr);
17938
+ const ret = wasm.costmdls_len(this.__wbg_ptr);
17828
17939
  return ret >>> 0;
17829
17940
  }
17830
17941
  /**
@@ -18424,7 +18535,7 @@ export class NewConstitutionAction {
18424
18535
  * @returns {GovernanceActionId | undefined}
18425
18536
  */
18426
18537
  gov_action_id() {
18427
- const ret = wasm.hardforkinitiationaction_gov_action_id(this.__wbg_ptr);
18538
+ const ret = wasm.newconstitutionaction_gov_action_id(this.__wbg_ptr);
18428
18539
  return ret === 0 ? undefined : GovernanceActionId.__wrap(ret);
18429
18540
  }
18430
18541
  /**
@@ -18636,7 +18747,7 @@ export class NoConfidenceAction {
18636
18747
  * @returns {GovernanceActionId | undefined}
18637
18748
  */
18638
18749
  gov_action_id() {
18639
- const ret = wasm.hardforkinitiationaction_gov_action_id(this.__wbg_ptr);
18750
+ const ret = wasm.noconfidenceaction_gov_action_id(this.__wbg_ptr);
18640
18751
  return ret === 0 ? undefined : GovernanceActionId.__wrap(ret);
18641
18752
  }
18642
18753
  /**
@@ -20584,7 +20695,7 @@ export class PlutusScripts {
20584
20695
  * @returns {number}
20585
20696
  */
20586
20697
  len() {
20587
- const ret = wasm.plutusscripts_len(this.__wbg_ptr);
20698
+ const ret = wasm.certificates_len(this.__wbg_ptr);
20588
20699
  return ret >>> 0;
20589
20700
  }
20590
20701
  /**
@@ -23712,7 +23823,7 @@ export class PublicKeys {
23712
23823
  /**
23713
23824
  */
23714
23825
  constructor() {
23715
- const ret = wasm.languages_new();
23826
+ const ret = wasm.genesishashes_new();
23716
23827
  this.__wbg_ptr = ret >>> 0;
23717
23828
  return this;
23718
23829
  }
@@ -23720,7 +23831,7 @@ export class PublicKeys {
23720
23831
  * @returns {number}
23721
23832
  */
23722
23833
  size() {
23723
- const ret = wasm.languages_len(this.__wbg_ptr);
23834
+ const ret = wasm.assetnames_len(this.__wbg_ptr);
23724
23835
  return ret >>> 0;
23725
23836
  }
23726
23837
  /**
@@ -27390,7 +27501,7 @@ export class StakeDelegation {
27390
27501
  * @returns {Credential}
27391
27502
  */
27392
27503
  stake_credential() {
27393
- const ret = wasm.stakeandvotedelegation_stake_credential(this.__wbg_ptr);
27504
+ const ret = wasm.stakedelegation_stake_credential(this.__wbg_ptr);
27394
27505
  return Credential.__wrap(ret);
27395
27506
  }
27396
27507
  /**
@@ -27415,7 +27526,7 @@ export class StakeDelegation {
27415
27526
  * @returns {boolean}
27416
27527
  */
27417
27528
  has_script_credentials() {
27418
- const ret = wasm.stakeandvotedelegation_has_script_credentials(this.__wbg_ptr);
27529
+ const ret = wasm.stakedelegation_has_script_credentials(this.__wbg_ptr);
27419
27530
  return ret !== 0;
27420
27531
  }
27421
27532
  }
@@ -27805,14 +27916,14 @@ export class StakeRegistration {
27805
27916
  * @returns {Credential}
27806
27917
  */
27807
27918
  stake_credential() {
27808
- const ret = wasm.stakederegistration_stake_credential(this.__wbg_ptr);
27919
+ const ret = wasm.stakeregistration_stake_credential(this.__wbg_ptr);
27809
27920
  return Credential.__wrap(ret);
27810
27921
  }
27811
27922
  /**
27812
27923
  * @returns {BigNum | undefined}
27813
27924
  */
27814
27925
  coin() {
27815
- const ret = wasm.stakederegistration_coin(this.__wbg_ptr);
27926
+ const ret = wasm.stakeregistration_coin(this.__wbg_ptr);
27816
27927
  return ret === 0 ? undefined : BigNum.__wrap(ret);
27817
27928
  }
27818
27929
  /**
@@ -27821,7 +27932,7 @@ export class StakeRegistration {
27821
27932
  */
27822
27933
  static new(stake_credential) {
27823
27934
  _assertClass(stake_credential, Credential);
27824
- const ret = wasm.stakederegistration_new(stake_credential.__wbg_ptr);
27935
+ const ret = wasm.stakeregistration_new(stake_credential.__wbg_ptr);
27825
27936
  return StakeRegistration.__wrap(ret);
27826
27937
  }
27827
27938
  /**
@@ -27832,14 +27943,14 @@ export class StakeRegistration {
27832
27943
  static new_with_explicit_deposit(stake_credential, coin) {
27833
27944
  _assertClass(stake_credential, Credential);
27834
27945
  _assertClass(coin, BigNum);
27835
- const ret = wasm.stakederegistration_new_with_explicit_refund(stake_credential.__wbg_ptr, coin.__wbg_ptr);
27946
+ const ret = wasm.stakeregistration_new_with_explicit_deposit(stake_credential.__wbg_ptr, coin.__wbg_ptr);
27836
27947
  return StakeRegistration.__wrap(ret);
27837
27948
  }
27838
27949
  /**
27839
27950
  * @returns {boolean}
27840
27951
  */
27841
27952
  has_script_credentials() {
27842
- const ret = wasm.stakederegistration_has_script_credentials(this.__wbg_ptr);
27953
+ const ret = wasm.stakeregistration_has_script_credentials(this.__wbg_ptr);
27843
27954
  return ret !== 0;
27844
27955
  }
27845
27956
  }
@@ -28307,14 +28418,14 @@ export class Strings {
28307
28418
  * @returns {Strings}
28308
28419
  */
28309
28420
  static new() {
28310
- const ret = wasm.relays_new();
28421
+ const ret = wasm.strings_new();
28311
28422
  return Strings.__wrap(ret);
28312
28423
  }
28313
28424
  /**
28314
28425
  * @returns {number}
28315
28426
  */
28316
28427
  len() {
28317
- const ret = wasm.relays_len(this.__wbg_ptr);
28428
+ const ret = wasm.costmodel_len(this.__wbg_ptr);
28318
28429
  return ret >>> 0;
28319
28430
  }
28320
28431
  /**
@@ -29035,7 +29146,7 @@ export class TransactionBatch {
29035
29146
  * @returns {number}
29036
29147
  */
29037
29148
  len() {
29038
- const ret = wasm.transactionbatch_len(this.__wbg_ptr);
29149
+ const ret = wasm.costmdls_len(this.__wbg_ptr);
29039
29150
  return ret >>> 0;
29040
29151
  }
29041
29152
  /**
@@ -29078,7 +29189,7 @@ export class TransactionBatchList {
29078
29189
  * @returns {number}
29079
29190
  */
29080
29191
  len() {
29081
- const ret = wasm.transactionbatch_len(this.__wbg_ptr);
29192
+ const ret = wasm.costmdls_len(this.__wbg_ptr);
29082
29193
  return ret >>> 0;
29083
29194
  }
29084
29195
  /**
@@ -31667,7 +31778,7 @@ export class TransactionInputs {
31667
31778
  * @returns {number}
31668
31779
  */
31669
31780
  len() {
31670
- const ret = wasm.languages_len(this.__wbg_ptr);
31781
+ const ret = wasm.costmdls_len(this.__wbg_ptr);
31671
31782
  return ret >>> 0;
31672
31783
  }
31673
31784
  /**
@@ -33285,7 +33396,7 @@ export class TransactionWitnessSet {
33285
33396
  * @returns {NativeScripts | undefined}
33286
33397
  */
33287
33398
  native_scripts() {
33288
- const ret = wasm.auxiliarydata_native_scripts(this.__wbg_ptr);
33399
+ const ret = wasm.transactionwitnessset_native_scripts(this.__wbg_ptr);
33289
33400
  return ret === 0 ? undefined : NativeScripts.__wrap(ret);
33290
33401
  }
33291
33402
  /**
@@ -33533,7 +33644,7 @@ export class TransactionWitnessSets {
33533
33644
  * @returns {number}
33534
33645
  */
33535
33646
  len() {
33536
- const ret = wasm.transactionbatch_len(this.__wbg_ptr);
33647
+ const ret = wasm.costmdls_len(this.__wbg_ptr);
33537
33648
  return ret >>> 0;
33538
33649
  }
33539
33650
  /**
@@ -33681,7 +33792,7 @@ export class TreasuryWithdrawals {
33681
33792
  * @returns {number}
33682
33793
  */
33683
33794
  len() {
33684
- const ret = wasm.costmodel_len(this.__wbg_ptr);
33795
+ const ret = wasm.relays_len(this.__wbg_ptr);
33685
33796
  return ret >>> 0;
33686
33797
  }
33687
33798
  }
@@ -36411,7 +36522,7 @@ export class Vkeywitness {
36411
36522
  * @returns {Ed25519Signature}
36412
36523
  */
36413
36524
  signature() {
36414
- const ret = wasm.vkeywitness_signature(this.__wbg_ptr);
36525
+ const ret = wasm.operationalcert_sigma(this.__wbg_ptr);
36415
36526
  return Ed25519Signature.__wrap(ret);
36416
36527
  }
36417
36528
  }
@@ -36793,14 +36904,14 @@ export class VoteDelegation {
36793
36904
  * @returns {Credential}
36794
36905
  */
36795
36906
  stake_credential() {
36796
- const ret = wasm.committeehotauth_committee_cold_credential(this.__wbg_ptr);
36907
+ const ret = wasm.stakeandvotedelegation_stake_credential(this.__wbg_ptr);
36797
36908
  return Credential.__wrap(ret);
36798
36909
  }
36799
36910
  /**
36800
36911
  * @returns {DRep}
36801
36912
  */
36802
36913
  drep() {
36803
- const ret = wasm.votedelegation_drep(this.__wbg_ptr);
36914
+ const ret = wasm.stakeandvotedelegation_drep(this.__wbg_ptr);
36804
36915
  return DRep.__wrap(ret);
36805
36916
  }
36806
36917
  /**
@@ -36818,7 +36929,7 @@ export class VoteDelegation {
36818
36929
  * @returns {boolean}
36819
36930
  */
36820
36931
  has_script_credentials() {
36821
- const ret = wasm.committeehotauth_has_script_credentials(this.__wbg_ptr);
36932
+ const ret = wasm.stakeandvotedelegation_has_script_credentials(this.__wbg_ptr);
36822
36933
  return ret !== 0;
36823
36934
  }
36824
36935
  }
@@ -37371,7 +37482,7 @@ export class Voters {
37371
37482
  * @returns {Voters}
37372
37483
  */
37373
37484
  static new() {
37374
- const ret = wasm.languages_new();
37485
+ const ret = wasm.voters_new();
37375
37486
  return Voters.__wrap(ret);
37376
37487
  }
37377
37488
  /**
@@ -37393,7 +37504,7 @@ export class Voters {
37393
37504
  * @returns {number}
37394
37505
  */
37395
37506
  len() {
37396
- const ret = wasm.languages_len(this.__wbg_ptr);
37507
+ const ret = wasm.costmdls_len(this.__wbg_ptr);
37397
37508
  return ret >>> 0;
37398
37509
  }
37399
37510
  }
@@ -37428,7 +37539,7 @@ export class VotingBuilder {
37428
37539
  * @returns {VotingBuilder}
37429
37540
  */
37430
37541
  static new() {
37431
- const ret = wasm.treasurywithdrawals_new();
37542
+ const ret = wasm.votingbuilder_new();
37432
37543
  return VotingBuilder.__wrap(ret);
37433
37544
  }
37434
37545
  /**
@@ -38198,7 +38309,7 @@ export class VotingProposalBuilder {
38198
38309
  * @returns {VotingProposalBuilder}
38199
38310
  */
38200
38311
  static new() {
38201
- const ret = wasm.mintbuilder_new();
38312
+ const ret = wasm.costmdls_new();
38202
38313
  return VotingProposalBuilder.__wrap(ret);
38203
38314
  }
38204
38315
  /**
@@ -38440,14 +38551,14 @@ export class VotingProposals {
38440
38551
  * @returns {VotingProposals}
38441
38552
  */
38442
38553
  static new() {
38443
- const ret = wasm.votingproposals_new();
38554
+ const ret = wasm.certificates_new();
38444
38555
  return VotingProposals.__wrap(ret);
38445
38556
  }
38446
38557
  /**
38447
38558
  * @returns {number}
38448
38559
  */
38449
38560
  len() {
38450
- const ret = wasm.votingproposals_len(this.__wbg_ptr);
38561
+ const ret = wasm.certificates_len(this.__wbg_ptr);
38451
38562
  return ret >>> 0;
38452
38563
  }
38453
38564
  /**
@@ -38901,6 +39012,18 @@ function __wbg_get_imports() {
38901
39012
  const ret = getObject(arg0) in getObject(arg1);
38902
39013
  return ret;
38903
39014
  };
39015
+ imports.wbg.__wbindgen_is_bigint = function(arg0) {
39016
+ const ret = typeof(getObject(arg0)) === 'bigint';
39017
+ return ret;
39018
+ };
39019
+ imports.wbg.__wbindgen_bigint_from_i64 = function(arg0) {
39020
+ const ret = arg0;
39021
+ return addHeapObject(ret);
39022
+ };
39023
+ imports.wbg.__wbindgen_jsval_eq = function(arg0, arg1) {
39024
+ const ret = getObject(arg0) === getObject(arg1);
39025
+ return ret;
39026
+ };
38904
39027
  imports.wbg.__wbindgen_is_string = function(arg0) {
38905
39028
  const ret = typeof(getObject(arg0)) === 'string';
38906
39029
  return ret;
@@ -39016,6 +39139,30 @@ function __wbg_get_imports() {
39016
39139
  const ret = new Map();
39017
39140
  return addHeapObject(ret);
39018
39141
  };
39142
+ imports.wbg.__wbg_next_40fc327bfc8770e6 = function(arg0) {
39143
+ const ret = getObject(arg0).next;
39144
+ return addHeapObject(ret);
39145
+ };
39146
+ imports.wbg.__wbg_next_196c84450b364254 = function() { return handleError(function (arg0) {
39147
+ const ret = getObject(arg0).next();
39148
+ return addHeapObject(ret);
39149
+ }, arguments) };
39150
+ imports.wbg.__wbg_done_298b57d23c0fc80c = function(arg0) {
39151
+ const ret = getObject(arg0).done;
39152
+ return ret;
39153
+ };
39154
+ imports.wbg.__wbg_value_d93c65011f51a456 = function(arg0) {
39155
+ const ret = getObject(arg0).value;
39156
+ return addHeapObject(ret);
39157
+ };
39158
+ imports.wbg.__wbg_iterator_2cee6dadfd956dfa = function() {
39159
+ const ret = Symbol.iterator;
39160
+ return addHeapObject(ret);
39161
+ };
39162
+ imports.wbg.__wbg_get_e3c254076557e348 = function() { return handleError(function (arg0, arg1) {
39163
+ const ret = Reflect.get(getObject(arg0), getObject(arg1));
39164
+ return addHeapObject(ret);
39165
+ }, arguments) };
39019
39166
  imports.wbg.__wbg_call_27c0f87801dedf93 = function() { return handleError(function (arg0, arg1) {
39020
39167
  const ret = getObject(arg0).call(getObject(arg1));
39021
39168
  return addHeapObject(ret);
@@ -39043,6 +39190,10 @@ function __wbg_get_imports() {
39043
39190
  imports.wbg.__wbg_set_d4638f722068f043 = function(arg0, arg1, arg2) {
39044
39191
  getObject(arg0)[arg1 >>> 0] = takeObject(arg2);
39045
39192
  };
39193
+ imports.wbg.__wbg_isArray_2ab64d95e09ea0ae = function(arg0) {
39194
+ const ret = Array.isArray(getObject(arg0));
39195
+ return ret;
39196
+ };
39046
39197
  imports.wbg.__wbg_instanceof_ArrayBuffer_836825be07d4c9d2 = function(arg0) {
39047
39198
  let result;
39048
39199
  try {
@@ -39114,10 +39265,6 @@ function __wbg_get_imports() {
39114
39265
  const ret = getObject(arg0).call(getObject(arg1));
39115
39266
  return addHeapObject(ret);
39116
39267
  };
39117
- imports.wbg.__wbindgen_jsval_eq = function(arg0, arg1) {
39118
- const ret = getObject(arg0) === getObject(arg1);
39119
- return ret;
39120
- };
39121
39268
  imports.wbg.__wbg_self_e0b3266d2d9eba1a = function(arg0) {
39122
39269
  const ret = getObject(arg0).self;
39123
39270
  return addHeapObject(ret);
@@ -39140,6 +39287,12 @@ function __wbg_get_imports() {
39140
39287
  imports.wbg.__wbg_getRandomValues_02639197c8166a96 = function(arg0, arg1, arg2) {
39141
39288
  getObject(arg0).getRandomValues(getArrayU8FromWasm0(arg1, arg2));
39142
39289
  };
39290
+ imports.wbg.__wbindgen_bigint_get_as_i64 = function(arg0, arg1) {
39291
+ const v = getObject(arg1);
39292
+ const ret = typeof(v) === 'bigint' ? v : undefined;
39293
+ getBigInt64Memory0()[arg0 / 8 + 1] = isLikeNone(ret) ? BigInt(0) : ret;
39294
+ getInt32Memory0()[arg0 / 4 + 0] = !isLikeNone(ret);
39295
+ };
39143
39296
  imports.wbg.__wbindgen_debug_string = function(arg0, arg1) {
39144
39297
  const ret = debugString(getObject(arg1));
39145
39298
  const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
@@ -39165,6 +39318,7 @@ function __wbg_init_memory(imports, maybe_memory) {
39165
39318
  function __wbg_finalize_init(instance, module) {
39166
39319
  wasm = instance.exports;
39167
39320
  __wbg_init.__wbindgen_wasm_module = module;
39321
+ cachedBigInt64Memory0 = null;
39168
39322
  cachedFloat64Memory0 = null;
39169
39323
  cachedInt32Memory0 = null;
39170
39324
  cachedUint32Memory0 = null;