@cardananium/cquisitor-lib 0.1.0-beta.16 → 0.1.0-beta.18

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.
@@ -290,49 +290,83 @@ export function get_possible_types_for_input(input) {
290
290
  }
291
291
 
292
292
  /**
293
- * @param {string} tx_hex
294
- * @returns {string}
293
+ * @param {string} cbor_hex
294
+ * @returns {any}
295
295
  */
296
- export function get_necessary_data_list_js(tx_hex) {
297
- let deferred3_0;
298
- let deferred3_1;
296
+ export function cbor_to_json(cbor_hex) {
299
297
  try {
300
298
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
301
- const ptr0 = passStringToWasm0(tx_hex, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
299
+ const ptr0 = passStringToWasm0(cbor_hex, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
302
300
  const len0 = WASM_VECTOR_LEN;
303
- wasm.get_necessary_data_list_js(retptr, ptr0, len0);
301
+ wasm.cbor_to_json(retptr, ptr0, len0);
304
302
  var r0 = getInt32Memory0()[retptr / 4 + 0];
305
303
  var r1 = getInt32Memory0()[retptr / 4 + 1];
306
304
  var r2 = getInt32Memory0()[retptr / 4 + 2];
307
- var r3 = getInt32Memory0()[retptr / 4 + 3];
308
- var ptr2 = r0;
309
- var len2 = r1;
310
- if (r3) {
311
- ptr2 = 0; len2 = 0;
312
- throw takeObject(r2);
305
+ if (r2) {
306
+ throw takeObject(r1);
313
307
  }
314
- deferred3_0 = ptr2;
315
- deferred3_1 = len2;
316
- return getStringFromWasm0(ptr2, len2);
308
+ return takeObject(r0);
317
309
  } finally {
318
310
  wasm.__wbindgen_add_to_stack_pointer(16);
319
- wasm.__wbindgen_free(deferred3_0, deferred3_1, 1);
320
311
  }
321
312
  }
322
313
 
323
314
  /**
324
- * @param {string} tx_hex
325
- * @param {any} validation_context
315
+ * @param {string} hex_str
316
+ * @returns {any}
317
+ */
318
+ export function check_block_or_tx_signatures(hex_str) {
319
+ try {
320
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
321
+ const ptr0 = passStringToWasm0(hex_str, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
322
+ const len0 = WASM_VECTOR_LEN;
323
+ wasm.check_block_or_tx_signatures(retptr, ptr0, len0);
324
+ var r0 = getInt32Memory0()[retptr / 4 + 0];
325
+ var r1 = getInt32Memory0()[retptr / 4 + 1];
326
+ var r2 = getInt32Memory0()[retptr / 4 + 2];
327
+ if (r2) {
328
+ throw takeObject(r1);
329
+ }
330
+ return takeObject(r0);
331
+ } finally {
332
+ wasm.__wbindgen_add_to_stack_pointer(16);
333
+ }
334
+ }
335
+
336
+ /**
337
+ * @param {string} hex
338
+ * @returns {any}
339
+ */
340
+ export function decode_plutus_program_uplc_json(hex) {
341
+ try {
342
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
343
+ const ptr0 = passStringToWasm0(hex, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
344
+ const len0 = WASM_VECTOR_LEN;
345
+ wasm.decode_plutus_program_uplc_json(retptr, ptr0, len0);
346
+ var r0 = getInt32Memory0()[retptr / 4 + 0];
347
+ var r1 = getInt32Memory0()[retptr / 4 + 1];
348
+ var r2 = getInt32Memory0()[retptr / 4 + 2];
349
+ if (r2) {
350
+ throw takeObject(r1);
351
+ }
352
+ return takeObject(r0);
353
+ } finally {
354
+ wasm.__wbindgen_add_to_stack_pointer(16);
355
+ }
356
+ }
357
+
358
+ /**
359
+ * @param {string} hex
326
360
  * @returns {string}
327
361
  */
328
- export function validate_transaction_js(tx_hex, validation_context) {
362
+ export function decode_plutus_program_pretty_uplc(hex) {
329
363
  let deferred3_0;
330
364
  let deferred3_1;
331
365
  try {
332
366
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
333
- const ptr0 = passStringToWasm0(tx_hex, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
367
+ const ptr0 = passStringToWasm0(hex, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
334
368
  const len0 = WASM_VECTOR_LEN;
335
- wasm.validate_transaction_js(retptr, ptr0, len0, addHeapObject(validation_context));
369
+ wasm.decode_plutus_program_pretty_uplc(retptr, ptr0, len0);
336
370
  var r0 = getInt32Memory0()[retptr / 4 + 0];
337
371
  var r1 = getInt32Memory0()[retptr / 4 + 1];
338
372
  var r2 = getInt32Memory0()[retptr / 4 + 2];
@@ -402,125 +436,231 @@ export function execute_tx_scripts(tx_hex, utxo_json, cost_models_json) {
402
436
  }
403
437
 
404
438
  /**
405
- * @param {string} hex_str
406
- * @returns {any}
439
+ * @param {string} tx_hex
440
+ * @returns {string}
407
441
  */
408
- export function check_block_or_tx_signatures(hex_str) {
442
+ export function get_necessary_data_list_js(tx_hex) {
443
+ let deferred3_0;
444
+ let deferred3_1;
409
445
  try {
410
446
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
411
- const ptr0 = passStringToWasm0(hex_str, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
447
+ const ptr0 = passStringToWasm0(tx_hex, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
412
448
  const len0 = WASM_VECTOR_LEN;
413
- wasm.check_block_or_tx_signatures(retptr, ptr0, len0);
449
+ wasm.get_necessary_data_list_js(retptr, ptr0, len0);
414
450
  var r0 = getInt32Memory0()[retptr / 4 + 0];
415
451
  var r1 = getInt32Memory0()[retptr / 4 + 1];
416
452
  var r2 = getInt32Memory0()[retptr / 4 + 2];
417
- if (r2) {
418
- throw takeObject(r1);
453
+ var r3 = getInt32Memory0()[retptr / 4 + 3];
454
+ var ptr2 = r0;
455
+ var len2 = r1;
456
+ if (r3) {
457
+ ptr2 = 0; len2 = 0;
458
+ throw takeObject(r2);
419
459
  }
420
- return takeObject(r0);
460
+ deferred3_0 = ptr2;
461
+ deferred3_1 = len2;
462
+ return getStringFromWasm0(ptr2, len2);
421
463
  } finally {
422
464
  wasm.__wbindgen_add_to_stack_pointer(16);
465
+ wasm.__wbindgen_free(deferred3_0, deferred3_1, 1);
423
466
  }
424
467
  }
425
468
 
426
469
  /**
427
- * @param {string} hex
428
- * @returns {any}
470
+ * @param {string} tx_hex
471
+ * @param {string} validation_context
472
+ * @returns {string}
429
473
  */
430
- export function decode_plutus_program_uplc_json(hex) {
474
+ export function validate_transaction_js(tx_hex, validation_context) {
475
+ let deferred4_0;
476
+ let deferred4_1;
431
477
  try {
432
478
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
433
- const ptr0 = passStringToWasm0(hex, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
479
+ const ptr0 = passStringToWasm0(tx_hex, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
434
480
  const len0 = WASM_VECTOR_LEN;
435
- wasm.decode_plutus_program_uplc_json(retptr, ptr0, len0);
481
+ const ptr1 = passStringToWasm0(validation_context, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
482
+ const len1 = WASM_VECTOR_LEN;
483
+ wasm.validate_transaction_js(retptr, ptr0, len0, ptr1, len1);
484
+ var r0 = getInt32Memory0()[retptr / 4 + 0];
485
+ var r1 = getInt32Memory0()[retptr / 4 + 1];
486
+ var r2 = getInt32Memory0()[retptr / 4 + 2];
487
+ var r3 = getInt32Memory0()[retptr / 4 + 3];
488
+ var ptr3 = r0;
489
+ var len3 = r1;
490
+ if (r3) {
491
+ ptr3 = 0; len3 = 0;
492
+ throw takeObject(r2);
493
+ }
494
+ deferred4_0 = ptr3;
495
+ deferred4_1 = len3;
496
+ return getStringFromWasm0(ptr3, len3);
497
+ } finally {
498
+ wasm.__wbindgen_add_to_stack_pointer(16);
499
+ wasm.__wbindgen_free(deferred4_0, deferred4_1, 1);
500
+ }
501
+ }
502
+
503
+ function getArrayU8FromWasm0(ptr, len) {
504
+ ptr = ptr >>> 0;
505
+ return getUint8Memory0().subarray(ptr / 1, ptr / 1 + len);
506
+ }
507
+
508
+ function passArray8ToWasm0(arg, malloc) {
509
+ const ptr = malloc(arg.length * 1, 1) >>> 0;
510
+ getUint8Memory0().set(arg, ptr / 1);
511
+ WASM_VECTOR_LEN = arg.length;
512
+ return ptr;
513
+ }
514
+
515
+ function _assertClass(instance, klass) {
516
+ if (!(instance instanceof klass)) {
517
+ throw new Error(`expected instance of ${klass.name}`);
518
+ }
519
+ return instance.ptr;
520
+ }
521
+ /**
522
+ * @param {string} json
523
+ * @param {PlutusDatumSchema} schema
524
+ * @returns {PlutusData}
525
+ */
526
+ export function encode_json_str_to_plutus_datum(json, schema) {
527
+ try {
528
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
529
+ const ptr0 = passStringToWasm0(json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
530
+ const len0 = WASM_VECTOR_LEN;
531
+ wasm.encode_json_str_to_plutus_datum(retptr, ptr0, len0, schema);
436
532
  var r0 = getInt32Memory0()[retptr / 4 + 0];
437
533
  var r1 = getInt32Memory0()[retptr / 4 + 1];
438
534
  var r2 = getInt32Memory0()[retptr / 4 + 2];
439
535
  if (r2) {
440
536
  throw takeObject(r1);
441
537
  }
442
- return takeObject(r0);
538
+ return PlutusData.__wrap(r0);
443
539
  } finally {
444
540
  wasm.__wbindgen_add_to_stack_pointer(16);
445
541
  }
446
542
  }
447
543
 
448
544
  /**
449
- * @param {string} hex
545
+ * @param {PlutusData} datum
546
+ * @param {PlutusDatumSchema} schema
450
547
  * @returns {string}
451
548
  */
452
- export function decode_plutus_program_pretty_uplc(hex) {
453
- let deferred3_0;
454
- let deferred3_1;
549
+ export function decode_plutus_datum_to_json_str(datum, schema) {
550
+ let deferred2_0;
551
+ let deferred2_1;
455
552
  try {
456
553
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
457
- const ptr0 = passStringToWasm0(hex, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
458
- const len0 = WASM_VECTOR_LEN;
459
- wasm.decode_plutus_program_pretty_uplc(retptr, ptr0, len0);
554
+ _assertClass(datum, PlutusData);
555
+ wasm.decode_plutus_datum_to_json_str(retptr, datum.__wbg_ptr, schema);
460
556
  var r0 = getInt32Memory0()[retptr / 4 + 0];
461
557
  var r1 = getInt32Memory0()[retptr / 4 + 1];
462
558
  var r2 = getInt32Memory0()[retptr / 4 + 2];
463
559
  var r3 = getInt32Memory0()[retptr / 4 + 3];
464
- var ptr2 = r0;
465
- var len2 = r1;
560
+ var ptr1 = r0;
561
+ var len1 = r1;
466
562
  if (r3) {
467
- ptr2 = 0; len2 = 0;
563
+ ptr1 = 0; len1 = 0;
468
564
  throw takeObject(r2);
469
565
  }
470
- deferred3_0 = ptr2;
471
- deferred3_1 = len2;
472
- return getStringFromWasm0(ptr2, len2);
566
+ deferred2_0 = ptr1;
567
+ deferred2_1 = len1;
568
+ return getStringFromWasm0(ptr1, len1);
473
569
  } finally {
474
570
  wasm.__wbindgen_add_to_stack_pointer(16);
475
- wasm.__wbindgen_free(deferred3_0, deferred3_1, 1);
571
+ wasm.__wbindgen_free(deferred2_0, deferred2_1, 1);
476
572
  }
477
573
  }
478
574
 
479
575
  /**
480
- * @param {string} cbor_hex
481
- * @returns {any}
576
+ * @param {Uint8Array} bytes
577
+ * @returns {TransactionMetadatum}
482
578
  */
483
- export function cbor_to_json(cbor_hex) {
579
+ export function encode_arbitrary_bytes_as_metadatum(bytes) {
580
+ const ptr0 = passArray8ToWasm0(bytes, wasm.__wbindgen_malloc);
581
+ const len0 = WASM_VECTOR_LEN;
582
+ const ret = wasm.encode_arbitrary_bytes_as_metadatum(ptr0, len0);
583
+ return TransactionMetadatum.__wrap(ret);
584
+ }
585
+
586
+ /**
587
+ * @param {TransactionMetadatum} metadata
588
+ * @returns {Uint8Array}
589
+ */
590
+ export function decode_arbitrary_bytes_from_metadatum(metadata) {
484
591
  try {
485
592
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
486
- const ptr0 = passStringToWasm0(cbor_hex, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
593
+ _assertClass(metadata, TransactionMetadatum);
594
+ wasm.decode_arbitrary_bytes_from_metadatum(retptr, metadata.__wbg_ptr);
595
+ var r0 = getInt32Memory0()[retptr / 4 + 0];
596
+ var r1 = getInt32Memory0()[retptr / 4 + 1];
597
+ var r2 = getInt32Memory0()[retptr / 4 + 2];
598
+ var r3 = getInt32Memory0()[retptr / 4 + 3];
599
+ if (r3) {
600
+ throw takeObject(r2);
601
+ }
602
+ var v1 = getArrayU8FromWasm0(r0, r1).slice();
603
+ wasm.__wbindgen_free(r0, r1 * 1, 1);
604
+ return v1;
605
+ } finally {
606
+ wasm.__wbindgen_add_to_stack_pointer(16);
607
+ }
608
+ }
609
+
610
+ /**
611
+ * @param {string} json
612
+ * @param {MetadataJsonSchema} schema
613
+ * @returns {TransactionMetadatum}
614
+ */
615
+ export function encode_json_str_to_metadatum(json, schema) {
616
+ try {
617
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
618
+ const ptr0 = passStringToWasm0(json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
487
619
  const len0 = WASM_VECTOR_LEN;
488
- wasm.cbor_to_json(retptr, ptr0, len0);
620
+ wasm.encode_json_str_to_metadatum(retptr, ptr0, len0, schema);
489
621
  var r0 = getInt32Memory0()[retptr / 4 + 0];
490
622
  var r1 = getInt32Memory0()[retptr / 4 + 1];
491
623
  var r2 = getInt32Memory0()[retptr / 4 + 2];
492
624
  if (r2) {
493
625
  throw takeObject(r1);
494
626
  }
495
- return takeObject(r0);
627
+ return TransactionMetadatum.__wrap(r0);
496
628
  } finally {
497
629
  wasm.__wbindgen_add_to_stack_pointer(16);
498
630
  }
499
631
  }
500
632
 
501
- function _assertClass(instance, klass) {
502
- if (!(instance instanceof klass)) {
503
- throw new Error(`expected instance of ${klass.name}`);
633
+ /**
634
+ * @param {TransactionMetadatum} metadatum
635
+ * @param {MetadataJsonSchema} schema
636
+ * @returns {string}
637
+ */
638
+ export function decode_metadatum_to_json_str(metadatum, schema) {
639
+ let deferred2_0;
640
+ let deferred2_1;
641
+ try {
642
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
643
+ _assertClass(metadatum, TransactionMetadatum);
644
+ wasm.decode_metadatum_to_json_str(retptr, metadatum.__wbg_ptr, schema);
645
+ var r0 = getInt32Memory0()[retptr / 4 + 0];
646
+ var r1 = getInt32Memory0()[retptr / 4 + 1];
647
+ var r2 = getInt32Memory0()[retptr / 4 + 2];
648
+ var r3 = getInt32Memory0()[retptr / 4 + 3];
649
+ var ptr1 = r0;
650
+ var len1 = r1;
651
+ if (r3) {
652
+ ptr1 = 0; len1 = 0;
653
+ throw takeObject(r2);
654
+ }
655
+ deferred2_0 = ptr1;
656
+ deferred2_1 = len1;
657
+ return getStringFromWasm0(ptr1, len1);
658
+ } finally {
659
+ wasm.__wbindgen_add_to_stack_pointer(16);
660
+ wasm.__wbindgen_free(deferred2_0, deferred2_1, 1);
504
661
  }
505
- return instance.ptr;
506
- }
507
-
508
- function getArrayU8FromWasm0(ptr, len) {
509
- ptr = ptr >>> 0;
510
- return getUint8Memory0().subarray(ptr / 1, ptr / 1 + len);
511
- }
512
-
513
- function passArray8ToWasm0(arg, malloc) {
514
- const ptr = malloc(arg.length * 1, 1) >>> 0;
515
- getUint8Memory0().set(arg, ptr / 1);
516
- WASM_VECTOR_LEN = arg.length;
517
- return ptr;
518
662
  }
519
663
 
520
- function getArrayU32FromWasm0(ptr, len) {
521
- ptr = ptr >>> 0;
522
- return getUint32Memory0().subarray(ptr / 4, ptr / 4 + len);
523
- }
524
664
  /**
525
665
  * @param {Transaction} tx
526
666
  * @param {LinearFee} linear_fee
@@ -612,86 +752,17 @@ export function min_ref_script_fee(total_ref_scripts_size, ref_script_coins_per_
612
752
  }
613
753
  }
614
754
 
755
+ function getArrayU32FromWasm0(ptr, len) {
756
+ ptr = ptr >>> 0;
757
+ return getUint32Memory0().subarray(ptr / 4, ptr / 4 + len);
758
+ }
759
+
615
760
  function passArray32ToWasm0(arg, malloc) {
616
761
  const ptr = malloc(arg.length * 4, 4) >>> 0;
617
762
  getUint32Memory0().set(arg, ptr / 4);
618
763
  WASM_VECTOR_LEN = arg.length;
619
764
  return ptr;
620
765
  }
621
- /**
622
- * @param {string} password
623
- * @param {string} salt
624
- * @param {string} nonce
625
- * @param {string} data
626
- * @returns {string}
627
- */
628
- export function encrypt_with_password(password, salt, nonce, data) {
629
- let deferred6_0;
630
- let deferred6_1;
631
- try {
632
- const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
633
- const ptr0 = passStringToWasm0(password, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
634
- const len0 = WASM_VECTOR_LEN;
635
- const ptr1 = passStringToWasm0(salt, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
636
- const len1 = WASM_VECTOR_LEN;
637
- const ptr2 = passStringToWasm0(nonce, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
638
- const len2 = WASM_VECTOR_LEN;
639
- const ptr3 = passStringToWasm0(data, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
640
- const len3 = WASM_VECTOR_LEN;
641
- wasm.encrypt_with_password(retptr, ptr0, len0, ptr1, len1, ptr2, len2, ptr3, len3);
642
- var r0 = getInt32Memory0()[retptr / 4 + 0];
643
- var r1 = getInt32Memory0()[retptr / 4 + 1];
644
- var r2 = getInt32Memory0()[retptr / 4 + 2];
645
- var r3 = getInt32Memory0()[retptr / 4 + 3];
646
- var ptr5 = r0;
647
- var len5 = r1;
648
- if (r3) {
649
- ptr5 = 0; len5 = 0;
650
- throw takeObject(r2);
651
- }
652
- deferred6_0 = ptr5;
653
- deferred6_1 = len5;
654
- return getStringFromWasm0(ptr5, len5);
655
- } finally {
656
- wasm.__wbindgen_add_to_stack_pointer(16);
657
- wasm.__wbindgen_free(deferred6_0, deferred6_1, 1);
658
- }
659
- }
660
-
661
- /**
662
- * @param {string} password
663
- * @param {string} data
664
- * @returns {string}
665
- */
666
- export function decrypt_with_password(password, data) {
667
- let deferred4_0;
668
- let deferred4_1;
669
- try {
670
- const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
671
- const ptr0 = passStringToWasm0(password, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
672
- const len0 = WASM_VECTOR_LEN;
673
- const ptr1 = passStringToWasm0(data, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
674
- const len1 = WASM_VECTOR_LEN;
675
- wasm.decrypt_with_password(retptr, ptr0, len0, ptr1, len1);
676
- var r0 = getInt32Memory0()[retptr / 4 + 0];
677
- var r1 = getInt32Memory0()[retptr / 4 + 1];
678
- var r2 = getInt32Memory0()[retptr / 4 + 2];
679
- var r3 = getInt32Memory0()[retptr / 4 + 3];
680
- var ptr3 = r0;
681
- var len3 = r1;
682
- if (r3) {
683
- ptr3 = 0; len3 = 0;
684
- throw takeObject(r2);
685
- }
686
- deferred4_0 = ptr3;
687
- deferred4_1 = len3;
688
- return getStringFromWasm0(ptr3, len3);
689
- } finally {
690
- wasm.__wbindgen_add_to_stack_pointer(16);
691
- wasm.__wbindgen_free(deferred4_0, deferred4_1, 1);
692
- }
693
- }
694
-
695
766
  /**
696
767
  * @param {TransactionHash} tx_body_hash
697
768
  * @param {ByronAddress} addr
@@ -907,6 +978,80 @@ export function has_transaction_set_tag(tx_bytes) {
907
978
  }
908
979
  }
909
980
 
981
+ /**
982
+ * @param {string} password
983
+ * @param {string} salt
984
+ * @param {string} nonce
985
+ * @param {string} data
986
+ * @returns {string}
987
+ */
988
+ export function encrypt_with_password(password, salt, nonce, data) {
989
+ let deferred6_0;
990
+ let deferred6_1;
991
+ try {
992
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
993
+ const ptr0 = passStringToWasm0(password, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
994
+ const len0 = WASM_VECTOR_LEN;
995
+ const ptr1 = passStringToWasm0(salt, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
996
+ const len1 = WASM_VECTOR_LEN;
997
+ const ptr2 = passStringToWasm0(nonce, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
998
+ const len2 = WASM_VECTOR_LEN;
999
+ const ptr3 = passStringToWasm0(data, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1000
+ const len3 = WASM_VECTOR_LEN;
1001
+ wasm.encrypt_with_password(retptr, ptr0, len0, ptr1, len1, ptr2, len2, ptr3, len3);
1002
+ var r0 = getInt32Memory0()[retptr / 4 + 0];
1003
+ var r1 = getInt32Memory0()[retptr / 4 + 1];
1004
+ var r2 = getInt32Memory0()[retptr / 4 + 2];
1005
+ var r3 = getInt32Memory0()[retptr / 4 + 3];
1006
+ var ptr5 = r0;
1007
+ var len5 = r1;
1008
+ if (r3) {
1009
+ ptr5 = 0; len5 = 0;
1010
+ throw takeObject(r2);
1011
+ }
1012
+ deferred6_0 = ptr5;
1013
+ deferred6_1 = len5;
1014
+ return getStringFromWasm0(ptr5, len5);
1015
+ } finally {
1016
+ wasm.__wbindgen_add_to_stack_pointer(16);
1017
+ wasm.__wbindgen_free(deferred6_0, deferred6_1, 1);
1018
+ }
1019
+ }
1020
+
1021
+ /**
1022
+ * @param {string} password
1023
+ * @param {string} data
1024
+ * @returns {string}
1025
+ */
1026
+ export function decrypt_with_password(password, data) {
1027
+ let deferred4_0;
1028
+ let deferred4_1;
1029
+ try {
1030
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
1031
+ const ptr0 = passStringToWasm0(password, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1032
+ const len0 = WASM_VECTOR_LEN;
1033
+ const ptr1 = passStringToWasm0(data, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1034
+ const len1 = WASM_VECTOR_LEN;
1035
+ wasm.decrypt_with_password(retptr, ptr0, len0, ptr1, len1);
1036
+ var r0 = getInt32Memory0()[retptr / 4 + 0];
1037
+ var r1 = getInt32Memory0()[retptr / 4 + 1];
1038
+ var r2 = getInt32Memory0()[retptr / 4 + 2];
1039
+ var r3 = getInt32Memory0()[retptr / 4 + 3];
1040
+ var ptr3 = r0;
1041
+ var len3 = r1;
1042
+ if (r3) {
1043
+ ptr3 = 0; len3 = 0;
1044
+ throw takeObject(r2);
1045
+ }
1046
+ deferred4_0 = ptr3;
1047
+ deferred4_1 = len3;
1048
+ return getStringFromWasm0(ptr3, len3);
1049
+ } finally {
1050
+ wasm.__wbindgen_add_to_stack_pointer(16);
1051
+ wasm.__wbindgen_free(deferred4_0, deferred4_1, 1);
1052
+ }
1053
+ }
1054
+
910
1055
  /**
911
1056
  * @param {Address} address
912
1057
  * @param {TransactionUnspentOutputs} utxos
@@ -932,218 +1077,87 @@ export function create_send_all(address, utxos, config) {
932
1077
  }
933
1078
  }
934
1079
 
935
- /**
936
- * @param {string} json
937
- * @param {PlutusDatumSchema} schema
938
- * @returns {PlutusData}
939
- */
940
- export function encode_json_str_to_plutus_datum(json, schema) {
1080
+ function handleError(f, args) {
941
1081
  try {
942
- const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
943
- const ptr0 = passStringToWasm0(json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
944
- const len0 = WASM_VECTOR_LEN;
945
- wasm.encode_json_str_to_plutus_datum(retptr, ptr0, len0, schema);
946
- var r0 = getInt32Memory0()[retptr / 4 + 0];
947
- var r1 = getInt32Memory0()[retptr / 4 + 1];
948
- var r2 = getInt32Memory0()[retptr / 4 + 2];
949
- if (r2) {
950
- throw takeObject(r1);
951
- }
952
- return PlutusData.__wrap(r0);
953
- } finally {
954
- wasm.__wbindgen_add_to_stack_pointer(16);
1082
+ return f.apply(this, args);
1083
+ } catch (e) {
1084
+ wasm.__wbindgen_exn_store(addHeapObject(e));
955
1085
  }
956
1086
  }
957
-
958
1087
  /**
959
- * @param {PlutusData} datum
960
- * @param {PlutusDatumSchema} schema
961
- * @returns {string}
962
1088
  */
963
- export function decode_plutus_datum_to_json_str(datum, schema) {
964
- let deferred2_0;
965
- let deferred2_1;
966
- try {
967
- const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
968
- _assertClass(datum, PlutusData);
969
- wasm.decode_plutus_datum_to_json_str(retptr, datum.__wbg_ptr, schema);
970
- var r0 = getInt32Memory0()[retptr / 4 + 0];
971
- var r1 = getInt32Memory0()[retptr / 4 + 1];
972
- var r2 = getInt32Memory0()[retptr / 4 + 2];
973
- var r3 = getInt32Memory0()[retptr / 4 + 3];
974
- var ptr1 = r0;
975
- var len1 = r1;
976
- if (r3) {
977
- ptr1 = 0; len1 = 0;
978
- throw takeObject(r2);
979
- }
980
- deferred2_0 = ptr1;
981
- deferred2_1 = len1;
982
- return getStringFromWasm0(ptr1, len1);
983
- } finally {
984
- wasm.__wbindgen_add_to_stack_pointer(16);
985
- wasm.__wbindgen_free(deferred2_0, deferred2_1, 1);
986
- }
987
- }
988
-
1089
+ export const CborSetType = Object.freeze({ Tagged:0,"0":"Tagged",Untagged:1,"1":"Untagged", });
989
1090
  /**
990
- * @param {Uint8Array} bytes
991
- * @returns {TransactionMetadatum}
992
1091
  */
993
- export function encode_arbitrary_bytes_as_metadatum(bytes) {
994
- const ptr0 = passArray8ToWasm0(bytes, wasm.__wbindgen_malloc);
995
- const len0 = WASM_VECTOR_LEN;
996
- const ret = wasm.encode_arbitrary_bytes_as_metadatum(ptr0, len0);
997
- return TransactionMetadatum.__wrap(ret);
998
- }
999
-
1092
+ 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", });
1000
1093
  /**
1001
- * @param {TransactionMetadatum} metadata
1002
- * @returns {Uint8Array}
1003
1094
  */
1004
- export function decode_arbitrary_bytes_from_metadatum(metadata) {
1005
- try {
1006
- const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
1007
- _assertClass(metadata, TransactionMetadatum);
1008
- wasm.decode_arbitrary_bytes_from_metadatum(retptr, metadata.__wbg_ptr);
1009
- var r0 = getInt32Memory0()[retptr / 4 + 0];
1010
- var r1 = getInt32Memory0()[retptr / 4 + 1];
1011
- var r2 = getInt32Memory0()[retptr / 4 + 2];
1012
- var r3 = getInt32Memory0()[retptr / 4 + 3];
1013
- if (r3) {
1014
- throw takeObject(r2);
1015
- }
1016
- var v1 = getArrayU8FromWasm0(r0, r1).slice();
1017
- wasm.__wbindgen_free(r0, r1 * 1, 1);
1018
- return v1;
1019
- } finally {
1020
- wasm.__wbindgen_add_to_stack_pointer(16);
1021
- }
1022
- }
1023
-
1095
+ export const VoteKind = Object.freeze({ No:0,"0":"No",Yes:1,"1":"Yes",Abstain:2,"2":"Abstain", });
1024
1096
  /**
1025
- * @param {string} json
1026
- * @param {MetadataJsonSchema} schema
1027
- * @returns {TransactionMetadatum}
1028
1097
  */
1029
- export function encode_json_str_to_metadatum(json, schema) {
1030
- try {
1031
- const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
1032
- const ptr0 = passStringToWasm0(json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1033
- const len0 = WASM_VECTOR_LEN;
1034
- wasm.encode_json_str_to_metadatum(retptr, ptr0, len0, schema);
1035
- var r0 = getInt32Memory0()[retptr / 4 + 0];
1036
- var r1 = getInt32Memory0()[retptr / 4 + 1];
1037
- var r2 = getInt32Memory0()[retptr / 4 + 2];
1038
- if (r2) {
1039
- throw takeObject(r1);
1040
- }
1041
- return TransactionMetadatum.__wrap(r0);
1042
- } finally {
1043
- wasm.__wbindgen_add_to_stack_pointer(16);
1044
- }
1045
- }
1046
-
1098
+ 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", });
1047
1099
  /**
1048
- * @param {TransactionMetadatum} metadatum
1049
- * @param {MetadataJsonSchema} schema
1050
- * @returns {string}
1051
1100
  */
1052
- export function decode_metadatum_to_json_str(metadatum, schema) {
1053
- let deferred2_0;
1054
- let deferred2_1;
1055
- try {
1056
- const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
1057
- _assertClass(metadatum, TransactionMetadatum);
1058
- wasm.decode_metadatum_to_json_str(retptr, metadatum.__wbg_ptr, schema);
1059
- var r0 = getInt32Memory0()[retptr / 4 + 0];
1060
- var r1 = getInt32Memory0()[retptr / 4 + 1];
1061
- var r2 = getInt32Memory0()[retptr / 4 + 2];
1062
- var r3 = getInt32Memory0()[retptr / 4 + 3];
1063
- var ptr1 = r0;
1064
- var len1 = r1;
1065
- if (r3) {
1066
- ptr1 = 0; len1 = 0;
1067
- throw takeObject(r2);
1068
- }
1069
- deferred2_0 = ptr1;
1070
- deferred2_1 = len1;
1071
- return getStringFromWasm0(ptr1, len1);
1072
- } finally {
1073
- wasm.__wbindgen_add_to_stack_pointer(16);
1074
- wasm.__wbindgen_free(deferred2_0, deferred2_1, 1);
1075
- }
1076
- }
1077
-
1078
- function handleError(f, args) {
1079
- try {
1080
- return f.apply(this, args);
1081
- } catch (e) {
1082
- wasm.__wbindgen_exn_store(addHeapObject(e));
1083
- }
1084
- }
1101
+ export const CredKind = Object.freeze({ Key:0,"0":"Key",Script:1,"1":"Script", });
1085
1102
  /**
1086
1103
  */
1087
- export const ByronAddressType = Object.freeze({ ATPubKey:0,"0":"ATPubKey",ATScript:1,"1":"ATScript",ATRedeem:2,"2":"ATRedeem", });
1104
+ 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", });
1088
1105
  /**
1089
1106
  */
1090
- 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", });
1107
+ export const MetadataJsonSchema = Object.freeze({ NoConversions:0,"0":"NoConversions",BasicConversions:1,"1":"BasicConversions",DetailedSchema:2,"2":"DetailedSchema", });
1091
1108
  /**
1092
1109
  */
1093
- export const TransactionSetsState = Object.freeze({ AllSetsHaveTag:0,"0":"AllSetsHaveTag",AllSetsHaveNoTag:1,"1":"AllSetsHaveNoTag",MixedSets:2,"2":"MixedSets", });
1110
+ export const CborContainerType = Object.freeze({ Array:0,"0":"Array",Map:1,"1":"Map", });
1094
1111
  /**
1095
1112
  */
1096
- export const CborSetType = Object.freeze({ Tagged:0,"0":"Tagged",Untagged:1,"1":"Untagged", });
1113
+ export const NetworkIdKind = Object.freeze({ Testnet:0,"0":"Testnet",Mainnet:1,"1":"Mainnet", });
1097
1114
  /**
1098
1115
  */
1099
- 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", });
1116
+ export const LanguageKind = Object.freeze({ PlutusV1:0,"0":"PlutusV1",PlutusV2:1,"1":"PlutusV2",PlutusV3:2,"2":"PlutusV3", });
1100
1117
  /**
1118
+ * Each new language uses a different namespace for hashing its script
1119
+ * This is because you could have a language where the same bytes have different semantics
1120
+ * So this avoids scripts in different languages mapping to the same hash
1121
+ * Note that the enum value here is different than the enum value for deciding the cost model of a script
1101
1122
  */
1102
- export const CoinSelectionStrategyCIP2 = Object.freeze({
1123
+ export const ScriptHashNamespace = Object.freeze({ NativeScript:0,"0":"NativeScript",PlutusScript:1,"1":"PlutusScript",PlutusScriptV2:2,"2":"PlutusScriptV2",PlutusScriptV3:3,"3":"PlutusScriptV3", });
1103
1124
  /**
1104
- * Performs CIP2's Largest First ada-only selection. Will error if outputs contain non-ADA assets.
1105
1125
  */
1106
- LargestFirst:0,"0":"LargestFirst",
1126
+ 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", });
1107
1127
  /**
1108
- * Performs CIP2's Random Improve ada-only selection. Will error if outputs contain non-ADA assets.
1128
+ * Used to choosed the schema for a script JSON string
1109
1129
  */
1110
- RandomImprove:1,"1":"RandomImprove",
1130
+ export const ScriptSchema = Object.freeze({ Wallet:0,"0":"Wallet",Node:1,"1":"Node", });
1111
1131
  /**
1112
- * Same as LargestFirst, but before adding ADA, will insert by largest-first for each asset type.
1113
1132
  */
1114
- LargestFirstMultiAsset:2,"2":"LargestFirstMultiAsset",
1133
+ export const TransactionSetsState = Object.freeze({ AllSetsHaveTag:0,"0":"AllSetsHaveTag",AllSetsHaveNoTag:1,"1":"AllSetsHaveNoTag",MixedSets:2,"2":"MixedSets", });
1115
1134
  /**
1116
- * Same as RandomImprove, but before adding ADA, will insert by random-improve for each asset type.
1117
1135
  */
1118
- RandomImproveMultiAsset:3,"3":"RandomImproveMultiAsset", });
1136
+ 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", });
1119
1137
  /**
1120
1138
  */
1121
- 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", });
1139
+ export const RelayKind = Object.freeze({ SingleHostAddr:0,"0":"SingleHostAddr",SingleHostName:1,"1":"SingleHostName",MultiHostName:2,"2":"MultiHostName", });
1122
1140
  /**
1123
1141
  */
1124
- export const MIRPot = Object.freeze({ Reserves:0,"0":"Reserves",Treasury:1,"1":"Treasury", });
1142
+ 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", });
1125
1143
  /**
1126
1144
  */
1127
- 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", });
1145
+ 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", });
1128
1146
  /**
1129
1147
  */
1130
- export const CredKind = Object.freeze({ Key:0,"0":"Key",Script:1,"1":"Script", });
1148
+ export const ByronAddressType = Object.freeze({ ATPubKey:0,"0":"ATPubKey",ATScript:1,"1":"ATScript",ATRedeem:2,"2":"ATRedeem", });
1131
1149
  /**
1132
- * Each new language uses a different namespace for hashing its script
1133
- * This is because you could have a language where the same bytes have different semantics
1134
- * So this avoids scripts in different languages mapping to the same hash
1135
- * Note that the enum value here is different than the enum value for deciding the cost model of a script
1136
1150
  */
1137
- export const ScriptHashNamespace = Object.freeze({ NativeScript:0,"0":"NativeScript",PlutusScript:1,"1":"PlutusScript",PlutusScriptV2:2,"2":"PlutusScriptV2",PlutusScriptV3:3,"3":"PlutusScriptV3", });
1151
+ 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", });
1138
1152
  /**
1139
1153
  */
1140
- 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", });
1154
+ export const MIRKind = Object.freeze({ ToOtherPot:0,"0":"ToOtherPot",ToStakeCredentials:1,"1":"ToStakeCredentials", });
1141
1155
  /**
1142
1156
  */
1143
- 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", });
1157
+ export const MIRPot = Object.freeze({ Reserves:0,"0":"Reserves",Treasury:1,"1":"Treasury", });
1144
1158
  /**
1145
1159
  */
1146
- export const MIRKind = Object.freeze({ ToOtherPot:0,"0":"ToOtherPot",ToStakeCredentials:1,"1":"ToStakeCredentials", });
1160
+ export const DRepKind = Object.freeze({ KeyHash:0,"0":"KeyHash",ScriptHash:1,"1":"ScriptHash",AlwaysAbstain:2,"2":"AlwaysAbstain",AlwaysNoConfidence:3,"3":"AlwaysNoConfidence", });
1147
1161
  /**
1148
1162
  * JSON <-> PlutusData conversion schemas.
1149
1163
  * Follows ScriptDataJsonSchema in cardano-cli defined at:
@@ -1197,38 +1211,26 @@ BasicConversions:0,"0":"BasicConversions",
1197
1211
  DetailedSchema:1,"1":"DetailedSchema", });
1198
1212
  /**
1199
1213
  */
1200
- export const CborContainerType = Object.freeze({ Array:0,"0":"Array",Map:1,"1":"Map", });
1201
- /**
1202
- */
1203
1214
  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", });
1204
1215
  /**
1205
- * Used to choosed the schema for a script JSON string
1206
- */
1207
- export const ScriptSchema = Object.freeze({ Wallet:0,"0":"Wallet",Node:1,"1":"Node", });
1208
- /**
1209
- */
1210
- export const NetworkIdKind = Object.freeze({ Testnet:0,"0":"Testnet",Mainnet:1,"1":"Mainnet", });
1211
- /**
1212
- */
1213
- export const MetadataJsonSchema = Object.freeze({ NoConversions:0,"0":"NoConversions",BasicConversions:1,"1":"BasicConversions",DetailedSchema:2,"2":"DetailedSchema", });
1214
- /**
1215
1216
  */
1216
- export const DRepKind = Object.freeze({ KeyHash:0,"0":"KeyHash",ScriptHash:1,"1":"ScriptHash",AlwaysAbstain:2,"2":"AlwaysAbstain",AlwaysNoConfidence:3,"3":"AlwaysNoConfidence", });
1217
- /**
1218
- */
1219
- export const VoteKind = Object.freeze({ No:0,"0":"No",Yes:1,"1":"Yes",Abstain:2,"2":"Abstain", });
1217
+ export const CoinSelectionStrategyCIP2 = Object.freeze({
1220
1218
  /**
1219
+ * Performs CIP2's Largest First ada-only selection. Will error if outputs contain non-ADA assets.
1221
1220
  */
1222
- export const RelayKind = Object.freeze({ SingleHostAddr:0,"0":"SingleHostAddr",SingleHostName:1,"1":"SingleHostName",MultiHostName:2,"2":"MultiHostName", });
1221
+ LargestFirst:0,"0":"LargestFirst",
1223
1222
  /**
1223
+ * Performs CIP2's Random Improve ada-only selection. Will error if outputs contain non-ADA assets.
1224
1224
  */
1225
- 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", });
1225
+ RandomImprove:1,"1":"RandomImprove",
1226
1226
  /**
1227
+ * Same as LargestFirst, but before adding ADA, will insert by largest-first for each asset type.
1227
1228
  */
1228
- 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", });
1229
+ LargestFirstMultiAsset:2,"2":"LargestFirstMultiAsset",
1229
1230
  /**
1231
+ * Same as RandomImprove, but before adding ADA, will insert by random-improve for each asset type.
1230
1232
  */
1231
- export const LanguageKind = Object.freeze({ PlutusV1:0,"0":"PlutusV1",PlutusV2:1,"1":"PlutusV2",PlutusV3:2,"2":"PlutusV3", });
1233
+ RandomImproveMultiAsset:3,"3":"RandomImproveMultiAsset", });
1232
1234
 
1233
1235
  const AddressFinalization = (typeof FinalizationRegistry === 'undefined')
1234
1236
  ? { register: () => {}, unregister: () => {} }
@@ -8567,7 +8569,7 @@ export class DRep {
8567
8569
  */
8568
8570
  static new_key_hash(key_hash) {
8569
8571
  _assertClass(key_hash, Ed25519KeyHash);
8570
- const ret = wasm.credential_from_keyhash(key_hash.__wbg_ptr);
8572
+ const ret = wasm.drep_new_key_hash(key_hash.__wbg_ptr);
8571
8573
  return DRep.__wrap(ret);
8572
8574
  }
8573
8575
  /**
@@ -8576,7 +8578,7 @@ export class DRep {
8576
8578
  */
8577
8579
  static new_script_hash(script_hash) {
8578
8580
  _assertClass(script_hash, ScriptHash);
8579
- const ret = wasm.credential_from_scripthash(script_hash.__wbg_ptr);
8581
+ const ret = wasm.drep_new_script_hash(script_hash.__wbg_ptr);
8580
8582
  return DRep.__wrap(ret);
8581
8583
  }
8582
8584
  /**
@@ -9057,7 +9059,7 @@ export class DRepRegistration {
9057
9059
  * @returns {BigNum}
9058
9060
  */
9059
9061
  coin() {
9060
- const ret = wasm.drepregistration_coin(this.__wbg_ptr);
9062
+ const ret = wasm.drepderegistration_coin(this.__wbg_ptr);
9061
9063
  return BigNum.__wrap(ret);
9062
9064
  }
9063
9065
  /**
@@ -10225,14 +10227,14 @@ export class Ed25519KeyHashes {
10225
10227
  * @returns {Ed25519KeyHashes}
10226
10228
  */
10227
10229
  static new() {
10228
- const ret = wasm.ed25519keyhashes_new();
10230
+ const ret = wasm.credentials_new();
10229
10231
  return Ed25519KeyHashes.__wrap(ret);
10230
10232
  }
10231
10233
  /**
10232
10234
  * @returns {number}
10233
10235
  */
10234
10236
  len() {
10235
- const ret = wasm.ed25519keyhashes_len(this.__wbg_ptr);
10237
+ const ret = wasm.credentials_len(this.__wbg_ptr);
10236
10238
  return ret >>> 0;
10237
10239
  }
10238
10240
  /**
@@ -10658,14 +10660,14 @@ export class ExUnitPrices {
10658
10660
  * @returns {UnitInterval}
10659
10661
  */
10660
10662
  mem_price() {
10661
- const ret = wasm.drepvotingthresholds_motion_no_confidence(this.__wbg_ptr);
10663
+ const ret = wasm.committee_quorum_threshold(this.__wbg_ptr);
10662
10664
  return UnitInterval.__wrap(ret);
10663
10665
  }
10664
10666
  /**
10665
10667
  * @returns {UnitInterval}
10666
10668
  */
10667
10669
  step_price() {
10668
- const ret = wasm.drepvotingthresholds_committee_normal(this.__wbg_ptr);
10670
+ const ret = wasm.exunitprices_step_price(this.__wbg_ptr);
10669
10671
  return UnitInterval.__wrap(ret);
10670
10672
  }
10671
10673
  /**
@@ -13285,7 +13287,7 @@ export class GovernanceActionIds {
13285
13287
  * @returns {GovernanceActionIds}
13286
13288
  */
13287
13289
  static new() {
13288
- const ret = wasm.assetnames_new();
13290
+ const ret = wasm.governanceactionids_new();
13289
13291
  return GovernanceActionIds.__wrap(ret);
13290
13292
  }
13291
13293
  /**
@@ -15385,7 +15387,7 @@ export class LegacyDaedalusPrivateKey {
15385
15387
  as_bytes() {
15386
15388
  try {
15387
15389
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
15388
- wasm.bip32privatekey_as_bytes(retptr, this.__wbg_ptr);
15390
+ wasm.legacydaedalusprivatekey_as_bytes(retptr, this.__wbg_ptr);
15389
15391
  var r0 = getInt32Memory0()[retptr / 4 + 0];
15390
15392
  var r1 = getInt32Memory0()[retptr / 4 + 1];
15391
15393
  var v1 = getArrayU8FromWasm0(r0, r1).slice();
@@ -15401,7 +15403,7 @@ export class LegacyDaedalusPrivateKey {
15401
15403
  chaincode() {
15402
15404
  try {
15403
15405
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
15404
- wasm.bip32privatekey_chaincode(retptr, this.__wbg_ptr);
15406
+ wasm.legacydaedalusprivatekey_chaincode(retptr, this.__wbg_ptr);
15405
15407
  var r0 = getInt32Memory0()[retptr / 4 + 0];
15406
15408
  var r1 = getInt32Memory0()[retptr / 4 + 1];
15407
15409
  var v1 = getArrayU8FromWasm0(r0, r1).slice();
@@ -18617,7 +18619,7 @@ export class NewConstitutionAction {
18617
18619
  * @returns {GovernanceActionId | undefined}
18618
18620
  */
18619
18621
  gov_action_id() {
18620
- const ret = wasm.hardforkinitiationaction_gov_action_id(this.__wbg_ptr);
18622
+ const ret = wasm.newconstitutionaction_gov_action_id(this.__wbg_ptr);
18621
18623
  return ret === 0 ? undefined : GovernanceActionId.__wrap(ret);
18622
18624
  }
18623
18625
  /**
@@ -18829,7 +18831,7 @@ export class NoConfidenceAction {
18829
18831
  * @returns {GovernanceActionId | undefined}
18830
18832
  */
18831
18833
  gov_action_id() {
18832
- const ret = wasm.hardforkinitiationaction_gov_action_id(this.__wbg_ptr);
18834
+ const ret = wasm.noconfidenceaction_gov_action_id(this.__wbg_ptr);
18833
18835
  return ret === 0 ? undefined : GovernanceActionId.__wrap(ret);
18834
18836
  }
18835
18837
  /**
@@ -20924,7 +20926,7 @@ export class PlutusWitnesses {
20924
20926
  * @returns {PlutusWitnesses}
20925
20927
  */
20926
20928
  static new() {
20927
- const ret = wasm.plutuswitnesses_new();
20929
+ const ret = wasm.fixedtransactionbodies_new();
20928
20930
  return PlutusWitnesses.__wrap(ret);
20929
20931
  }
20930
20932
  /**
@@ -21075,7 +21077,7 @@ export class Pointer {
21075
21077
  * @returns {BigNum}
21076
21078
  */
21077
21079
  cert_index_bignum() {
21078
- const ret = wasm.constrplutusdata_alternative(this.__wbg_ptr);
21080
+ const ret = wasm.pointer_cert_index_bignum(this.__wbg_ptr);
21079
21081
  return BigNum.__wrap(ret);
21080
21082
  }
21081
21083
  }
@@ -23905,7 +23907,7 @@ export class PublicKeys {
23905
23907
  /**
23906
23908
  */
23907
23909
  constructor() {
23908
- const ret = wasm.languages_new();
23910
+ const ret = wasm.publickeys_new();
23909
23911
  this.__wbg_ptr = ret >>> 0;
23910
23912
  return this;
23911
23913
  }
@@ -27998,14 +28000,14 @@ export class StakeRegistration {
27998
28000
  * @returns {Credential}
27999
28001
  */
28000
28002
  stake_credential() {
28001
- const ret = wasm.stakederegistration_stake_credential(this.__wbg_ptr);
28003
+ const ret = wasm.stakeregistration_stake_credential(this.__wbg_ptr);
28002
28004
  return Credential.__wrap(ret);
28003
28005
  }
28004
28006
  /**
28005
28007
  * @returns {BigNum | undefined}
28006
28008
  */
28007
28009
  coin() {
28008
- const ret = wasm.stakederegistration_coin(this.__wbg_ptr);
28010
+ const ret = wasm.stakeregistration_coin(this.__wbg_ptr);
28009
28011
  return ret === 0 ? undefined : BigNum.__wrap(ret);
28010
28012
  }
28011
28013
  /**
@@ -28014,7 +28016,7 @@ export class StakeRegistration {
28014
28016
  */
28015
28017
  static new(stake_credential) {
28016
28018
  _assertClass(stake_credential, Credential);
28017
- const ret = wasm.stakederegistration_new(stake_credential.__wbg_ptr);
28019
+ const ret = wasm.stakeregistration_new(stake_credential.__wbg_ptr);
28018
28020
  return StakeRegistration.__wrap(ret);
28019
28021
  }
28020
28022
  /**
@@ -28025,14 +28027,14 @@ export class StakeRegistration {
28025
28027
  static new_with_explicit_deposit(stake_credential, coin) {
28026
28028
  _assertClass(stake_credential, Credential);
28027
28029
  _assertClass(coin, BigNum);
28028
- const ret = wasm.stakederegistration_new_with_explicit_refund(stake_credential.__wbg_ptr, coin.__wbg_ptr);
28030
+ const ret = wasm.stakeregistration_new_with_explicit_deposit(stake_credential.__wbg_ptr, coin.__wbg_ptr);
28029
28031
  return StakeRegistration.__wrap(ret);
28030
28032
  }
28031
28033
  /**
28032
28034
  * @returns {boolean}
28033
28035
  */
28034
28036
  has_script_credentials() {
28035
- const ret = wasm.stakederegistration_has_script_credentials(this.__wbg_ptr);
28037
+ const ret = wasm.stakeregistration_has_script_credentials(this.__wbg_ptr);
28036
28038
  return ret !== 0;
28037
28039
  }
28038
28040
  }
@@ -28224,7 +28226,7 @@ export class StakeRegistrationAndDelegation {
28224
28226
  * @returns {BigNum}
28225
28227
  */
28226
28228
  coin() {
28227
- const ret = wasm.stakeregistrationanddelegation_coin(this.__wbg_ptr);
28229
+ const ret = wasm.drepderegistration_coin(this.__wbg_ptr);
28228
28230
  return BigNum.__wrap(ret);
28229
28231
  }
28230
28232
  /**
@@ -28429,7 +28431,7 @@ export class StakeVoteRegistrationAndDelegation {
28429
28431
  * @returns {Ed25519KeyHash}
28430
28432
  */
28431
28433
  pool_keyhash() {
28432
- const ret = wasm.stakeregistrationanddelegation_pool_keyhash(this.__wbg_ptr);
28434
+ const ret = wasm.stakevoteregistrationanddelegation_pool_keyhash(this.__wbg_ptr);
28433
28435
  return Ed25519KeyHash.__wrap(ret);
28434
28436
  }
28435
28437
  /**
@@ -28443,7 +28445,7 @@ export class StakeVoteRegistrationAndDelegation {
28443
28445
  * @returns {BigNum}
28444
28446
  */
28445
28447
  coin() {
28446
- const ret = wasm.stakeregistrationanddelegation_coin(this.__wbg_ptr);
28448
+ const ret = wasm.stakevoteregistrationanddelegation_coin(this.__wbg_ptr);
28447
28449
  return BigNum.__wrap(ret);
28448
28450
  }
28449
28451
  /**
@@ -28500,7 +28502,7 @@ export class Strings {
28500
28502
  * @returns {Strings}
28501
28503
  */
28502
28504
  static new() {
28503
- const ret = wasm.strings_new();
28505
+ const ret = wasm.relays_new();
28504
28506
  return Strings.__wrap(ret);
28505
28507
  }
28506
28508
  /**
@@ -28731,7 +28733,7 @@ export class TimelockExpiry {
28731
28733
  * @returns {BigNum}
28732
28734
  */
28733
28735
  slot_bignum() {
28734
- const ret = wasm.timelockexpiry_slot_bignum(this.__wbg_ptr);
28736
+ const ret = wasm.linearfee_constant(this.__wbg_ptr);
28735
28737
  return BigNum.__wrap(ret);
28736
28738
  }
28737
28739
  /**
@@ -28751,7 +28753,7 @@ export class TimelockExpiry {
28751
28753
  */
28752
28754
  static new_timelockexpiry(slot) {
28753
28755
  _assertClass(slot, BigNum);
28754
- const ret = wasm.drepregistration_coin(slot.__wbg_ptr);
28756
+ const ret = wasm.timelockexpiry_new_timelockexpiry(slot.__wbg_ptr);
28755
28757
  return TimelockExpiry.__wrap(ret);
28756
28758
  }
28757
28759
  }
@@ -28951,7 +28953,7 @@ export class TimelockStart {
28951
28953
  * @returns {BigNum}
28952
28954
  */
28953
28955
  slot_bignum() {
28954
- const ret = wasm.timelockexpiry_slot_bignum(this.__wbg_ptr);
28956
+ const ret = wasm.linearfee_constant(this.__wbg_ptr);
28955
28957
  return BigNum.__wrap(ret);
28956
28958
  }
28957
28959
  /**
@@ -28971,7 +28973,7 @@ export class TimelockStart {
28971
28973
  */
28972
28974
  static new_timelockstart(slot) {
28973
28975
  _assertClass(slot, BigNum);
28974
- const ret = wasm.drepregistration_coin(slot.__wbg_ptr);
28976
+ const ret = wasm.timelockexpiry_new_timelockexpiry(slot.__wbg_ptr);
28975
28977
  return TimelockStart.__wrap(ret);
28976
28978
  }
28977
28979
  }
@@ -33488,7 +33490,7 @@ export class TransactionWitnessSet {
33488
33490
  * @returns {NativeScripts | undefined}
33489
33491
  */
33490
33492
  native_scripts() {
33491
- const ret = wasm.auxiliarydata_native_scripts(this.__wbg_ptr);
33493
+ const ret = wasm.transactionwitnessset_native_scripts(this.__wbg_ptr);
33492
33494
  return ret === 0 ? undefined : NativeScripts.__wrap(ret);
33493
33495
  }
33494
33496
  /**
@@ -36403,7 +36405,7 @@ export class Vkeys {
36403
36405
  * @returns {Vkeys}
36404
36406
  */
36405
36407
  static new() {
36406
- const ret = wasm.vkeys_new();
36408
+ const ret = wasm.languages_new();
36407
36409
  return Vkeys.__wrap(ret);
36408
36410
  }
36409
36411
  /**
@@ -36621,7 +36623,7 @@ export class Vkeywitness {
36621
36623
  * @returns {Ed25519Signature}
36622
36624
  */
36623
36625
  signature() {
36624
- const ret = wasm.vkeywitness_signature(this.__wbg_ptr);
36626
+ const ret = wasm.operationalcert_sigma(this.__wbg_ptr);
36625
36627
  return Ed25519Signature.__wrap(ret);
36626
36628
  }
36627
36629
  }
@@ -37220,7 +37222,7 @@ export class VoteRegistrationAndDelegation {
37220
37222
  * @returns {BigNum}
37221
37223
  */
37222
37224
  coin() {
37223
- const ret = wasm.stakeregistrationanddelegation_coin(this.__wbg_ptr);
37225
+ const ret = wasm.stakevoteregistrationanddelegation_coin(this.__wbg_ptr);
37224
37226
  return BigNum.__wrap(ret);
37225
37227
  }
37226
37228
  /**
@@ -37581,7 +37583,7 @@ export class Voters {
37581
37583
  * @returns {Voters}
37582
37584
  */
37583
37585
  static new() {
37584
- const ret = wasm.vkeys_new();
37586
+ const ret = wasm.voters_new();
37585
37587
  return Voters.__wrap(ret);
37586
37588
  }
37587
37589
  /**
@@ -37638,7 +37640,7 @@ export class VotingBuilder {
37638
37640
  * @returns {VotingBuilder}
37639
37641
  */
37640
37642
  static new() {
37641
- const ret = wasm.costmdls_new();
37643
+ const ret = wasm.votingbuilder_new();
37642
37644
  return VotingBuilder.__wrap(ret);
37643
37645
  }
37644
37646
  /**
@@ -37943,7 +37945,7 @@ export class VotingProcedure {
37943
37945
  * @returns {Anchor | undefined}
37944
37946
  */
37945
37947
  anchor() {
37946
- const ret = wasm.votingprocedure_anchor(this.__wbg_ptr);
37948
+ const ret = wasm.committeecoldresign_anchor(this.__wbg_ptr);
37947
37949
  return ret === 0 ? undefined : Anchor.__wrap(ret);
37948
37950
  }
37949
37951
  }
@@ -38121,7 +38123,7 @@ export class VotingProcedures {
38121
38123
  * @returns {VotingProcedures}
38122
38124
  */
38123
38125
  static new() {
38124
- const ret = wasm.votingprocedures_new();
38126
+ const ret = wasm.votingbuilder_new();
38125
38127
  return VotingProcedures.__wrap(ret);
38126
38128
  }
38127
38129
  /**
@@ -38408,7 +38410,7 @@ export class VotingProposalBuilder {
38408
38410
  * @returns {VotingProposalBuilder}
38409
38411
  */
38410
38412
  static new() {
38411
- const ret = wasm.mintbuilder_new();
38413
+ const ret = wasm.votingbuilder_new();
38412
38414
  return VotingProposalBuilder.__wrap(ret);
38413
38415
  }
38414
38416
  /**
@@ -38939,7 +38941,7 @@ export class WithdrawalsBuilder {
38939
38941
  * @returns {WithdrawalsBuilder}
38940
38942
  */
38941
38943
  static new() {
38942
- const ret = wasm.withdrawalsbuilder_new();
38944
+ const ret = wasm.mintbuilder_new();
38943
38945
  return WithdrawalsBuilder.__wrap(ret);
38944
38946
  }
38945
38947
  /**
@@ -39082,24 +39084,13 @@ export function __wbindgen_is_bigint(arg0) {
39082
39084
  return ret;
39083
39085
  };
39084
39086
 
39085
- export function __wbindgen_bigint_from_i64(arg0) {
39086
- const ret = arg0;
39087
- return addHeapObject(ret);
39088
- };
39089
-
39090
- export function __wbindgen_jsval_eq(arg0, arg1) {
39091
- const ret = getObject(arg0) === getObject(arg1);
39092
- return ret;
39093
- };
39094
-
39095
39087
  export function __wbindgen_bigint_from_u64(arg0) {
39096
39088
  const ret = BigInt.asUintN(64, arg0);
39097
39089
  return addHeapObject(ret);
39098
39090
  };
39099
39091
 
39100
- export function __wbindgen_boolean_get(arg0) {
39101
- const v = getObject(arg0);
39102
- const ret = typeof(v) === 'boolean' ? (v ? 1 : 0) : 2;
39092
+ export function __wbindgen_jsval_eq(arg0, arg1) {
39093
+ const ret = getObject(arg0) === getObject(arg1);
39103
39094
  return ret;
39104
39095
  };
39105
39096
 
@@ -39138,6 +39129,12 @@ export function __wbindgen_jsval_loose_eq(arg0, arg1) {
39138
39129
  return ret;
39139
39130
  };
39140
39131
 
39132
+ export function __wbindgen_boolean_get(arg0) {
39133
+ const v = getObject(arg0);
39134
+ const ret = typeof(v) === 'boolean' ? (v ? 1 : 0) : 2;
39135
+ return ret;
39136
+ };
39137
+
39141
39138
  export function __wbindgen_number_get(arg0, arg1) {
39142
39139
  const obj = getObject(arg1);
39143
39140
  const ret = typeof(obj) === 'number' ? obj : undefined;