@anastasia-labs/cardano-multiplatform-lib-nodejs 6.0.0 → 6.0.1-2

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.
@@ -4,26 +4,6 @@ imports['__wbindgen_placeholder__'] = module.exports;
4
4
  let wasm;
5
5
  const { TextDecoder, TextEncoder } = require(`util`);
6
6
 
7
- const heap = new Array(128).fill(undefined);
8
-
9
- heap.push(undefined, null, true, false);
10
-
11
- function getObject(idx) { return heap[idx]; }
12
-
13
- let heap_next = heap.length;
14
-
15
- function dropObject(idx) {
16
- if (idx < 132) return;
17
- heap[idx] = heap_next;
18
- heap_next = idx;
19
- }
20
-
21
- function takeObject(idx) {
22
- const ret = getObject(idx);
23
- dropObject(idx);
24
- return ret;
25
- }
26
-
27
7
  let cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
28
8
 
29
9
  cachedTextDecoder.decode();
@@ -42,6 +22,12 @@ function getStringFromWasm0(ptr, len) {
42
22
  return cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr, ptr + len));
43
23
  }
44
24
 
25
+ const heap = new Array(128).fill(undefined);
26
+
27
+ heap.push(undefined, null, true, false);
28
+
29
+ let heap_next = heap.length;
30
+
45
31
  function addHeapObject(obj) {
46
32
  if (heap_next === heap.length) heap.push(heap.length + 1);
47
33
  const idx = heap_next;
@@ -51,6 +37,20 @@ function addHeapObject(obj) {
51
37
  return idx;
52
38
  }
53
39
 
40
+ function getObject(idx) { return heap[idx]; }
41
+
42
+ function dropObject(idx) {
43
+ if (idx < 132) return;
44
+ heap[idx] = heap_next;
45
+ heap_next = idx;
46
+ }
47
+
48
+ function takeObject(idx) {
49
+ const ret = getObject(idx);
50
+ dropObject(idx);
51
+ return ret;
52
+ }
53
+
54
54
  function handleError(f, args) {
55
55
  try {
56
56
  return f.apply(this, args);
@@ -217,30 +217,66 @@ function _assertClass(instance, klass) {
217
217
  }
218
218
  return instance.ptr;
219
219
  }
220
+
221
+ let cachedUint16ArrayMemory0 = null;
222
+
223
+ function getUint16ArrayMemory0() {
224
+ if (cachedUint16ArrayMemory0 === null || cachedUint16ArrayMemory0.byteLength === 0) {
225
+ cachedUint16ArrayMemory0 = new Uint16Array(wasm.memory.buffer);
226
+ }
227
+ return cachedUint16ArrayMemory0;
228
+ }
229
+
230
+ function getArrayU16FromWasm0(ptr, len) {
231
+ ptr = ptr >>> 0;
232
+ return getUint16ArrayMemory0().subarray(ptr / 2, ptr / 2 + len);
233
+ }
234
+
235
+ function passArray16ToWasm0(arg, malloc) {
236
+ const ptr = malloc(arg.length * 2, 2) >>> 0;
237
+ getUint16ArrayMemory0().set(arg, ptr / 2);
238
+ WASM_VECTOR_LEN = arg.length;
239
+ return ptr;
240
+ }
241
+
242
+ function isLikeNone(x) {
243
+ return x === undefined || x === null;
244
+ }
220
245
  /**
221
- * @param {Redeemers} redeemers
222
- * @returns {ExUnits}
246
+ * encodes arbitrary bytes into chunks of 64 bytes (the limit for bytes) as a list to be valid Metadata
247
+ * @param {Uint8Array} bytes
248
+ * @returns {TransactionMetadatum}
223
249
  */
224
- module.exports.compute_total_ex_units = function(redeemers) {
250
+ module.exports.encode_arbitrary_bytes_as_metadatum = function(bytes) {
251
+ const ptr0 = passArray8ToWasm0(bytes, wasm.__wbindgen_malloc);
252
+ const len0 = WASM_VECTOR_LEN;
253
+ const ret = wasm.encode_arbitrary_bytes_as_metadatum(ptr0, len0);
254
+ return TransactionMetadatum.__wrap(ret);
255
+ };
256
+
257
+ /**
258
+ * decodes from chunks of bytes in a list to a byte vector if that is the metadata format, otherwise returns None
259
+ * @param {TransactionMetadatum} metadata
260
+ * @returns {Uint8Array | undefined}
261
+ */
262
+ module.exports.decode_arbitrary_bytes_from_metadatum = function(metadata) {
225
263
  try {
226
264
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
227
- _assertClass(redeemers, Redeemers);
228
- wasm.compute_total_ex_units(retptr, redeemers.__wbg_ptr);
265
+ _assertClass(metadata, TransactionMetadatum);
266
+ wasm.decode_arbitrary_bytes_from_metadatum(retptr, metadata.__wbg_ptr);
229
267
  var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
230
268
  var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
231
- var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
232
- if (r2) {
233
- throw takeObject(r1);
269
+ let v1;
270
+ if (r0 !== 0) {
271
+ v1 = getArrayU8FromWasm0(r0, r1).slice();
272
+ wasm.__wbindgen_free(r0, r1 * 1, 1);
234
273
  }
235
- return ExUnits.__wrap(r0);
274
+ return v1;
236
275
  } finally {
237
276
  wasm.__wbindgen_add_to_stack_pointer(16);
238
277
  }
239
278
  };
240
279
 
241
- function isLikeNone(x) {
242
- return x === undefined || x === null;
243
- }
244
280
  /**
245
281
  * @param {AuxiliaryData} auxiliary_data
246
282
  * @returns {AuxiliaryDataHash}
@@ -489,95 +525,6 @@ module.exports.min_fee = function(tx, linear_fee, ex_unit_prices, total_ref_scri
489
525
  }
490
526
  };
491
527
 
492
- /**
493
- * @param {TransactionOutput} output
494
- * @param {bigint} coins_per_utxo_byte
495
- * @returns {bigint}
496
- */
497
- module.exports.min_ada_required = function(output, coins_per_utxo_byte) {
498
- try {
499
- const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
500
- _assertClass(output, TransactionOutput);
501
- wasm.min_ada_required(retptr, output.__wbg_ptr, coins_per_utxo_byte);
502
- var r0 = getDataViewMemory0().getBigInt64(retptr + 8 * 0, true);
503
- var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
504
- var r3 = getDataViewMemory0().getInt32(retptr + 4 * 3, true);
505
- if (r3) {
506
- throw takeObject(r2);
507
- }
508
- return BigInt.asUintN(64, r0);
509
- } finally {
510
- wasm.__wbindgen_add_to_stack_pointer(16);
511
- }
512
- };
513
-
514
- /**
515
- * encodes arbitrary bytes into chunks of 64 bytes (the limit for bytes) as a list to be valid Metadata
516
- * @param {Uint8Array} bytes
517
- * @returns {TransactionMetadatum}
518
- */
519
- module.exports.encode_arbitrary_bytes_as_metadatum = function(bytes) {
520
- const ptr0 = passArray8ToWasm0(bytes, wasm.__wbindgen_malloc);
521
- const len0 = WASM_VECTOR_LEN;
522
- const ret = wasm.encode_arbitrary_bytes_as_metadatum(ptr0, len0);
523
- return TransactionMetadatum.__wrap(ret);
524
- };
525
-
526
- /**
527
- * decodes from chunks of bytes in a list to a byte vector if that is the metadata format, otherwise returns None
528
- * @param {TransactionMetadatum} metadata
529
- * @returns {Uint8Array | undefined}
530
- */
531
- module.exports.decode_arbitrary_bytes_from_metadatum = function(metadata) {
532
- try {
533
- const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
534
- _assertClass(metadata, TransactionMetadatum);
535
- wasm.decode_arbitrary_bytes_from_metadatum(retptr, metadata.__wbg_ptr);
536
- var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
537
- var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
538
- let v1;
539
- if (r0 !== 0) {
540
- v1 = getArrayU8FromWasm0(r0, r1).slice();
541
- wasm.__wbindgen_free(r0, r1 * 1, 1);
542
- }
543
- return v1;
544
- } finally {
545
- wasm.__wbindgen_add_to_stack_pointer(16);
546
- }
547
- };
548
-
549
- let cachedUint16ArrayMemory0 = null;
550
-
551
- function getUint16ArrayMemory0() {
552
- if (cachedUint16ArrayMemory0 === null || cachedUint16ArrayMemory0.byteLength === 0) {
553
- cachedUint16ArrayMemory0 = new Uint16Array(wasm.memory.buffer);
554
- }
555
- return cachedUint16ArrayMemory0;
556
- }
557
-
558
- function getArrayU16FromWasm0(ptr, len) {
559
- ptr = ptr >>> 0;
560
- return getUint16ArrayMemory0().subarray(ptr / 2, ptr / 2 + len);
561
- }
562
-
563
- function passArray16ToWasm0(arg, malloc) {
564
- const ptr = malloc(arg.length * 2, 2) >>> 0;
565
- getUint16ArrayMemory0().set(arg, ptr / 2);
566
- WASM_VECTOR_LEN = arg.length;
567
- return ptr;
568
- }
569
- /**
570
- * @param {TransactionHash} tx_body_hash
571
- * @param {PrivateKey} sk
572
- * @returns {Vkeywitness}
573
- */
574
- module.exports.make_vkey_witness = function(tx_body_hash, sk) {
575
- _assertClass(tx_body_hash, TransactionHash);
576
- _assertClass(sk, PrivateKey);
577
- const ret = wasm.make_vkey_witness(tx_body_hash.__wbg_ptr, sk.__wbg_ptr);
578
- return Vkeywitness.__wrap(ret);
579
- };
580
-
581
528
  /**
582
529
  * Converts JSON to Metadata according to MetadataJsonSchema
583
530
  * @param {string} json
@@ -634,6 +581,27 @@ module.exports.decode_metadatum_to_json_str = function(metadatum, schema) {
634
581
  }
635
582
  };
636
583
 
584
+ /**
585
+ * @param {Redeemers} redeemers
586
+ * @returns {ExUnits}
587
+ */
588
+ module.exports.compute_total_ex_units = function(redeemers) {
589
+ try {
590
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
591
+ _assertClass(redeemers, Redeemers);
592
+ wasm.compute_total_ex_units(retptr, redeemers.__wbg_ptr);
593
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
594
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
595
+ var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
596
+ if (r2) {
597
+ throw takeObject(r1);
598
+ }
599
+ return ExUnits.__wrap(r0);
600
+ } finally {
601
+ wasm.__wbindgen_add_to_stack_pointer(16);
602
+ }
603
+ };
604
+
637
605
  /**
638
606
  * @param {TransactionHash} tx_body_hash
639
607
  * @param {ByronAddress} addr
@@ -664,6 +632,40 @@ module.exports.make_icarus_bootstrap_witness = function(tx_body_hash, addr, key)
664
632
  return BootstrapWitness.__wrap(ret);
665
633
  };
666
634
 
635
+ /**
636
+ * @param {TransactionHash} tx_body_hash
637
+ * @param {PrivateKey} sk
638
+ * @returns {Vkeywitness}
639
+ */
640
+ module.exports.make_vkey_witness = function(tx_body_hash, sk) {
641
+ _assertClass(tx_body_hash, TransactionHash);
642
+ _assertClass(sk, PrivateKey);
643
+ const ret = wasm.make_vkey_witness(tx_body_hash.__wbg_ptr, sk.__wbg_ptr);
644
+ return Vkeywitness.__wrap(ret);
645
+ };
646
+
647
+ /**
648
+ * @param {TransactionOutput} output
649
+ * @param {bigint} coins_per_utxo_byte
650
+ * @returns {bigint}
651
+ */
652
+ module.exports.min_ada_required = function(output, coins_per_utxo_byte) {
653
+ try {
654
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
655
+ _assertClass(output, TransactionOutput);
656
+ wasm.min_ada_required(retptr, output.__wbg_ptr, coins_per_utxo_byte);
657
+ var r0 = getDataViewMemory0().getBigInt64(retptr + 8 * 0, true);
658
+ var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
659
+ var r3 = getDataViewMemory0().getInt32(retptr + 4 * 3, true);
660
+ if (r3) {
661
+ throw takeObject(r2);
662
+ }
663
+ return BigInt.asUintN(64, r0);
664
+ } finally {
665
+ wasm.__wbindgen_add_to_stack_pointer(16);
666
+ }
667
+ };
668
+
667
669
  let cachedUint32ArrayMemory0 = null;
668
670
 
669
671
  function getUint32ArrayMemory0() {
@@ -767,56 +769,121 @@ function getArrayU64FromWasm0(ptr, len) {
767
769
  }
768
770
  /**
769
771
  */
772
+ module.exports.ChunkableStringKind = Object.freeze({ Single:0,"0":"Single",Chunked:1,"1":"Chunked", });
773
+ /**
774
+ */
775
+ module.exports.ScriptKind = Object.freeze({ Native:0,"0":"Native",PlutusV1:1,"1":"PlutusV1",PlutusV2:2,"2":"PlutusV2",PlutusV3:3,"3":"PlutusV3", });
776
+ /**
777
+ * Careful: this enum doesn't include the network ID part of the header
778
+ * ex: base address isn't 0b0000_0000 but instead 0b0000
779
+ * Use `header_matches_kind` if you don't want to implement the bitwise operators yourself
780
+ */
781
+ module.exports.AddressHeaderKind = Object.freeze({ BasePaymentKeyStakeKey:0,"0":"BasePaymentKeyStakeKey",BasePaymentScriptStakeKey:1,"1":"BasePaymentScriptStakeKey",BasePaymentKeyStakeScript:2,"2":"BasePaymentKeyStakeScript",BasePaymentScriptStakeScript:3,"3":"BasePaymentScriptStakeScript",PointerKey:4,"4":"PointerKey",PointerScript:5,"5":"PointerScript",EnterpriseKey:6,"6":"EnterpriseKey",EnterpriseScript:7,"7":"EnterpriseScript",Byron:8,"8":"Byron",RewardKey:14,"14":"RewardKey",RewardScript:15,"15":"RewardScript", });
782
+ /**
783
+ */
784
+ module.exports.RelayKind = Object.freeze({ SingleHostAddr:0,"0":"SingleHostAddr",SingleHostName:1,"1":"SingleHostName",MultiHostName:2,"2":"MultiHostName", });
785
+ /**
786
+ */
787
+ module.exports.DRepKind = Object.freeze({ Key:0,"0":"Key",Script:1,"1":"Script",AlwaysAbstain:2,"2":"AlwaysAbstain",AlwaysNoConfidence:3,"3":"AlwaysNoConfidence", });
788
+ /**
789
+ */
790
+ module.exports.StakeDistributionKind = Object.freeze({ SingleKey:0,"0":"SingleKey",BootstrapEra:1,"1":"BootstrapEra", });
791
+ /**
792
+ */
793
+ module.exports.VoterKind = Object.freeze({ ConstitutionalCommitteeHotKeyHash:0,"0":"ConstitutionalCommitteeHotKeyHash",ConstitutionalCommitteeHotScriptHash:1,"1":"ConstitutionalCommitteeHotScriptHash",DRepKeyHash:2,"2":"DRepKeyHash",DRepScriptHash:3,"3":"DRepScriptHash",StakingPoolKeyHash:4,"4":"StakingPoolKeyHash", });
794
+ /**
795
+ * Which version of the CIP25 spec to use. See CIP25 for details.
796
+ * This will change how things are encoded but for the most part contains
797
+ * the same information.
798
+ */
799
+ module.exports.CIP25Version = Object.freeze({
800
+ /**
801
+ * Initial version of CIP25 with only string (utf8) asset names allowed.
802
+ */
803
+ V1:0,"0":"V1",
804
+ /**
805
+ * Second version of CIP25. Supports any type of asset names.
806
+ */
807
+ V2:1,"1":"V2", });
808
+ /**
809
+ */
810
+ module.exports.NonceKind = Object.freeze({ Identity:0,"0":"Identity",Hash:1,"1":"Hash", });
811
+ /**
812
+ */
813
+ module.exports.MetadataJsonSchema = Object.freeze({ NoConversions:0,"0":"NoConversions",BasicConversions:1,"1":"BasicConversions",DetailedSchema:2,"2":"DetailedSchema", });
814
+ /**
815
+ */
770
816
  module.exports.AuxiliaryDataKind = Object.freeze({ Shelley:0,"0":"Shelley",ShelleyMA:1,"1":"ShelleyMA",Conway:2,"2":"Conway", });
771
817
  /**
772
818
  */
773
- module.exports.RedeemersKind = Object.freeze({ ArrLegacyRedeemer:0,"0":"ArrLegacyRedeemer",MapRedeemerKeyToRedeemerVal:1,"1":"MapRedeemerKeyToRedeemerVal", });
819
+ module.exports.CredentialKind = Object.freeze({ PubKey:0,"0":"PubKey",Script:1,"1":"Script", });
820
+ /**
821
+ */
822
+ module.exports.ChangeSelectionAlgo = Object.freeze({ Default:0,"0":"Default", });
774
823
  /**
775
824
  */
776
825
  module.exports.Vote = Object.freeze({ No:0,"0":"No",Yes:1,"1":"Yes",Abstain:2,"2":"Abstain", });
777
826
  /**
778
827
  */
779
- module.exports.CoinSelectionStrategyCIP2 = Object.freeze({
828
+ module.exports.DatumOptionKind = Object.freeze({ Hash:0,"0":"Hash",Datum:1,"1":"Datum", });
780
829
  /**
781
- * Performs CIP2's Largest First ada-only selection. Will error if outputs contain non-ADA assets.
782
830
  */
783
- LargestFirst:0,"0":"LargestFirst",
831
+ module.exports.DelegationDistributionKind = Object.freeze({ Weighted:0,"0":"Weighted",Legacy:1,"1":"Legacy", });
784
832
  /**
785
- * Performs CIP2's Random Improve ada-only selection. Will error if outputs contain non-ADA assets.
786
833
  */
787
- RandomImprove:1,"1":"RandomImprove",
834
+ module.exports.TransactionOutputKind = Object.freeze({ AlonzoFormatTxOut:0,"0":"AlonzoFormatTxOut",ConwayFormatTxOut:1,"1":"ConwayFormatTxOut", });
788
835
  /**
789
- * Same as LargestFirst, but before adding ADA, will insert by largest-first for each asset type.
790
836
  */
791
- LargestFirstMultiAsset:2,"2":"LargestFirstMultiAsset",
837
+ module.exports.RedeemerTag = Object.freeze({ Spend:0,"0":"Spend",Mint:1,"1":"Mint",Cert:2,"2":"Cert",Reward:3,"3":"Reward",Voting:4,"4":"Voting",Proposing:5,"5":"Proposing", });
792
838
  /**
793
- * Same as RandomImprove, but before adding ADA, will insert by random-improve for each asset type.
794
839
  */
795
- RandomImproveMultiAsset:3,"3":"RandomImproveMultiAsset", });
840
+ module.exports.Language = Object.freeze({ PlutusV1:0,"0":"PlutusV1",PlutusV2:1,"1":"PlutusV2",PlutusV3:2,"2":"PlutusV3", });
796
841
  /**
797
842
  */
798
- module.exports.MetadataJsonSchema = Object.freeze({ NoConversions:0,"0":"NoConversions",BasicConversions:1,"1":"BasicConversions",DetailedSchema:2,"2":"DetailedSchema", });
843
+ module.exports.SpendingDataKind = Object.freeze({ SpendingDataPubKey:0,"0":"SpendingDataPubKey",SpendingDataScript:1,"1":"SpendingDataScript",SpendingDataRedeem:2,"2":"SpendingDataRedeem", });
799
844
  /**
800
845
  */
801
- module.exports.PlutusDataKind = Object.freeze({ ConstrPlutusData:0,"0":"ConstrPlutusData",Map:1,"1":"Map",List:2,"2":"List",Integer:3,"3":"Integer",Bytes:4,"4":"Bytes", });
846
+ module.exports.GovActionKind = Object.freeze({ ParameterChangeAction:0,"0":"ParameterChangeAction",HardForkInitiationAction:1,"1":"HardForkInitiationAction",TreasuryWithdrawalsAction:2,"2":"TreasuryWithdrawalsAction",NoConfidence:3,"3":"NoConfidence",UpdateCommittee:4,"4":"UpdateCommittee",NewConstitution:5,"5":"NewConstitution",InfoAction:6,"6":"InfoAction", });
847
+ /**
848
+ */
849
+ module.exports.RedeemersKind = Object.freeze({ ArrLegacyRedeemer:0,"0":"ArrLegacyRedeemer",MapRedeemerKeyToRedeemerVal:1,"1":"MapRedeemerKeyToRedeemerVal", });
850
+ /**
851
+ */
852
+ module.exports.AddressKind = Object.freeze({ Base:0,"0":"Base",Ptr:1,"1":"Ptr",Enterprise:2,"2":"Enterprise",Reward:3,"3":"Reward",Byron:4,"4":"Byron", });
853
+ /**
854
+ */
855
+ module.exports.ByronAddrType = Object.freeze({ PublicKey:0,"0":"PublicKey",Script:1,"1":"Script",Redeem:2,"2":"Redeem", });
802
856
  /**
803
857
  */
804
858
  module.exports.NativeScriptKind = Object.freeze({ ScriptPubkey:0,"0":"ScriptPubkey",ScriptAll:1,"1":"ScriptAll",ScriptAny:2,"2":"ScriptAny",ScriptNOfK:3,"3":"ScriptNOfK",ScriptInvalidBefore:4,"4":"ScriptInvalidBefore",ScriptInvalidHereafter:5,"5":"ScriptInvalidHereafter", });
805
859
  /**
806
860
  */
807
- module.exports.DelegationDistributionKind = Object.freeze({ Weighted:0,"0":"Weighted",Legacy:1,"1":"Legacy", });
861
+ module.exports.CertificateKind = Object.freeze({ StakeRegistration:0,"0":"StakeRegistration",StakeDeregistration:1,"1":"StakeDeregistration",StakeDelegation:2,"2":"StakeDelegation",PoolRegistration:3,"3":"PoolRegistration",PoolRetirement:4,"4":"PoolRetirement",RegCert:5,"5":"RegCert",UnregCert:6,"6":"UnregCert",VoteDelegCert:7,"7":"VoteDelegCert",StakeVoteDelegCert:8,"8":"StakeVoteDelegCert",StakeRegDelegCert:9,"9":"StakeRegDelegCert",VoteRegDelegCert:10,"10":"VoteRegDelegCert",StakeVoteRegDelegCert:11,"11":"StakeVoteRegDelegCert",AuthCommitteeHotCert:12,"12":"AuthCommitteeHotCert",ResignCommitteeColdCert:13,"13":"ResignCommitteeColdCert",RegDrepCert:14,"14":"RegDrepCert",UnregDrepCert:15,"15":"UnregDrepCert",UpdateDrepCert:16,"16":"UpdateDrepCert", });
808
862
  /**
809
- * Careful: this enum doesn't include the network ID part of the header
810
- * ex: base address isn't 0b0000_0000 but instead 0b0000
811
- * Use `header_matches_kind` if you don't want to implement the bitwise operators yourself
812
863
  */
813
- module.exports.AddressHeaderKind = Object.freeze({ BasePaymentKeyStakeKey:0,"0":"BasePaymentKeyStakeKey",BasePaymentScriptStakeKey:1,"1":"BasePaymentScriptStakeKey",BasePaymentKeyStakeScript:2,"2":"BasePaymentKeyStakeScript",BasePaymentScriptStakeScript:3,"3":"BasePaymentScriptStakeScript",PointerKey:4,"4":"PointerKey",PointerScript:5,"5":"PointerScript",EnterpriseKey:6,"6":"EnterpriseKey",EnterpriseScript:7,"7":"EnterpriseScript",Byron:8,"8":"Byron",RewardKey:14,"14":"RewardKey",RewardScript:15,"15":"RewardScript", });
864
+ module.exports.PlutusDataKind = Object.freeze({ ConstrPlutusData:0,"0":"ConstrPlutusData",Map:1,"1":"Map",List:2,"2":"List",Integer:3,"3":"Integer",Bytes:4,"4":"Bytes", });
814
865
  /**
815
866
  */
816
- module.exports.ScriptKind = Object.freeze({ Native:0,"0":"Native",PlutusV1:1,"1":"PlutusV1",PlutusV2:2,"2":"PlutusV2",PlutusV3:3,"3":"PlutusV3", });
867
+ module.exports.TransactionMetadatumKind = Object.freeze({ Map:0,"0":"Map",List:1,"1":"List",Int:2,"2":"Int",Bytes:3,"3":"Bytes",Text:4,"4":"Text", });
817
868
  /**
818
869
  */
819
- module.exports.DRepKind = Object.freeze({ Key:0,"0":"Key",Script:1,"1":"Script",AlwaysAbstain:2,"2":"AlwaysAbstain",AlwaysNoConfidence:3,"3":"AlwaysNoConfidence", });
870
+ module.exports.CoinSelectionStrategyCIP2 = Object.freeze({
871
+ /**
872
+ * Performs CIP2's Largest First ada-only selection. Will error if outputs contain non-ADA assets.
873
+ */
874
+ LargestFirst:0,"0":"LargestFirst",
875
+ /**
876
+ * Performs CIP2's Random Improve ada-only selection. Will error if outputs contain non-ADA assets.
877
+ */
878
+ RandomImprove:1,"1":"RandomImprove",
879
+ /**
880
+ * Same as LargestFirst, but before adding ADA, will insert by largest-first for each asset type.
881
+ */
882
+ LargestFirstMultiAsset:2,"2":"LargestFirstMultiAsset",
883
+ /**
884
+ * Same as RandomImprove, but before adding ADA, will insert by random-improve for each asset type.
885
+ */
886
+ RandomImproveMultiAsset:3,"3":"RandomImproveMultiAsset", });
820
887
  /**
821
888
  * JSON <-> PlutusData conversion schemas.
822
889
  * Follows ScriptDataJsonSchema in cardano-cli defined at:
@@ -868,71 +935,6 @@ BasicConversions:0,"0":"BasicConversions",
868
935
  * * all Plutus datums should be fully supported outside of the integer range limitations outlined above.
869
936
  */
870
937
  DetailedSchema:1,"1":"DetailedSchema", });
871
- /**
872
- */
873
- module.exports.RedeemerTag = Object.freeze({ Spend:0,"0":"Spend",Mint:1,"1":"Mint",Cert:2,"2":"Cert",Reward:3,"3":"Reward",Voting:4,"4":"Voting",Proposing:5,"5":"Proposing", });
874
- /**
875
- */
876
- module.exports.TransactionOutputKind = Object.freeze({ AlonzoFormatTxOut:0,"0":"AlonzoFormatTxOut",ConwayFormatTxOut:1,"1":"ConwayFormatTxOut", });
877
- /**
878
- */
879
- module.exports.TransactionMetadatumKind = Object.freeze({ Map:0,"0":"Map",List:1,"1":"List",Int:2,"2":"Int",Bytes:3,"3":"Bytes",Text:4,"4":"Text", });
880
- /**
881
- */
882
- module.exports.ChunkableStringKind = Object.freeze({ Single:0,"0":"Single",Chunked:1,"1":"Chunked", });
883
- /**
884
- */
885
- module.exports.AddressKind = Object.freeze({ Base:0,"0":"Base",Ptr:1,"1":"Ptr",Enterprise:2,"2":"Enterprise",Reward:3,"3":"Reward",Byron:4,"4":"Byron", });
886
- /**
887
- */
888
- module.exports.ByronAddrType = Object.freeze({ PublicKey:0,"0":"PublicKey",Script:1,"1":"Script",Redeem:2,"2":"Redeem", });
889
- /**
890
- */
891
- module.exports.CertificateKind = Object.freeze({ StakeRegistration:0,"0":"StakeRegistration",StakeDeregistration:1,"1":"StakeDeregistration",StakeDelegation:2,"2":"StakeDelegation",PoolRegistration:3,"3":"PoolRegistration",PoolRetirement:4,"4":"PoolRetirement",RegCert:5,"5":"RegCert",UnregCert:6,"6":"UnregCert",VoteDelegCert:7,"7":"VoteDelegCert",StakeVoteDelegCert:8,"8":"StakeVoteDelegCert",StakeRegDelegCert:9,"9":"StakeRegDelegCert",VoteRegDelegCert:10,"10":"VoteRegDelegCert",StakeVoteRegDelegCert:11,"11":"StakeVoteRegDelegCert",AuthCommitteeHotCert:12,"12":"AuthCommitteeHotCert",ResignCommitteeColdCert:13,"13":"ResignCommitteeColdCert",RegDrepCert:14,"14":"RegDrepCert",UnregDrepCert:15,"15":"UnregDrepCert",UpdateDrepCert:16,"16":"UpdateDrepCert", });
892
- /**
893
- */
894
- module.exports.CredentialKind = Object.freeze({ PubKey:0,"0":"PubKey",Script:1,"1":"Script", });
895
- /**
896
- */
897
- module.exports.StakeDistributionKind = Object.freeze({ SingleKey:0,"0":"SingleKey",BootstrapEra:1,"1":"BootstrapEra", });
898
- /**
899
- */
900
- module.exports.ChangeSelectionAlgo = Object.freeze({ Default:0,"0":"Default", });
901
- /**
902
- * Which version of the CIP25 spec to use. See CIP25 for details.
903
- * This will change how things are encoded but for the most part contains
904
- * the same information.
905
- */
906
- module.exports.CIP25Version = Object.freeze({
907
- /**
908
- * Initial version of CIP25 with only string (utf8) asset names allowed.
909
- */
910
- V1:0,"0":"V1",
911
- /**
912
- * Second version of CIP25. Supports any type of asset names.
913
- */
914
- V2:1,"1":"V2", });
915
- /**
916
- */
917
- module.exports.RelayKind = Object.freeze({ SingleHostAddr:0,"0":"SingleHostAddr",SingleHostName:1,"1":"SingleHostName",MultiHostName:2,"2":"MultiHostName", });
918
- /**
919
- */
920
- module.exports.NonceKind = Object.freeze({ Identity:0,"0":"Identity",Hash:1,"1":"Hash", });
921
- /**
922
- */
923
- module.exports.GovActionKind = Object.freeze({ ParameterChangeAction:0,"0":"ParameterChangeAction",HardForkInitiationAction:1,"1":"HardForkInitiationAction",TreasuryWithdrawalsAction:2,"2":"TreasuryWithdrawalsAction",NoConfidence:3,"3":"NoConfidence",UpdateCommittee:4,"4":"UpdateCommittee",NewConstitution:5,"5":"NewConstitution",InfoAction:6,"6":"InfoAction", });
924
- /**
925
- */
926
- module.exports.DatumOptionKind = Object.freeze({ Hash:0,"0":"Hash",Datum:1,"1":"Datum", });
927
- /**
928
- */
929
- module.exports.Language = Object.freeze({ PlutusV1:0,"0":"PlutusV1",PlutusV2:1,"1":"PlutusV2",PlutusV3:2,"2":"PlutusV3", });
930
- /**
931
- */
932
- module.exports.VoterKind = Object.freeze({ ConstitutionalCommitteeHotKeyHash:0,"0":"ConstitutionalCommitteeHotKeyHash",ConstitutionalCommitteeHotScriptHash:1,"1":"ConstitutionalCommitteeHotScriptHash",DRepKeyHash:2,"2":"DRepKeyHash",DRepScriptHash:3,"3":"DRepScriptHash",StakingPoolKeyHash:4,"4":"StakingPoolKeyHash", });
933
- /**
934
- */
935
- module.exports.SpendingDataKind = Object.freeze({ SpendingDataPubKey:0,"0":"SpendingDataPubKey",SpendingDataScript:1,"1":"SpendingDataScript",SpendingDataRedeem:2,"2":"SpendingDataRedeem", });
936
938
 
937
939
  const AddrAttributesFinalization = (typeof FinalizationRegistry === 'undefined')
938
940
  ? { register: () => {}, unregister: () => {} }
@@ -2630,6 +2632,207 @@ class AssetName {
2630
2632
  }
2631
2633
  /**
2632
2634
  *
2635
+ * * Serialize this type to CBOR bytes
2636
+ * * This type type supports encoding preservation so this will preserve round-trip CBOR formats.
2637
+ * * If created from scratch the CBOR will be canonical.
2638
+ *
2639
+ * @returns {Uint8Array}
2640
+ */
2641
+ to_cbor_bytes() {
2642
+ try {
2643
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
2644
+ wasm.assetname_to_cbor_bytes(retptr, this.__wbg_ptr);
2645
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
2646
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
2647
+ var v1 = getArrayU8FromWasm0(r0, r1).slice();
2648
+ wasm.__wbindgen_free(r0, r1 * 1, 1);
2649
+ return v1;
2650
+ } finally {
2651
+ wasm.__wbindgen_add_to_stack_pointer(16);
2652
+ }
2653
+ }
2654
+ /**
2655
+ *
2656
+ * * Serialize this type to CBOR bytes using canonical CBOR encodings
2657
+ *
2658
+ * @returns {Uint8Array}
2659
+ */
2660
+ to_canonical_cbor_bytes() {
2661
+ try {
2662
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
2663
+ wasm.assetname_to_canonical_cbor_bytes(retptr, this.__wbg_ptr);
2664
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
2665
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
2666
+ var v1 = getArrayU8FromWasm0(r0, r1).slice();
2667
+ wasm.__wbindgen_free(r0, r1 * 1, 1);
2668
+ return v1;
2669
+ } finally {
2670
+ wasm.__wbindgen_add_to_stack_pointer(16);
2671
+ }
2672
+ }
2673
+ /**
2674
+ *
2675
+ * * Create this type from CBOR bytes
2676
+ *
2677
+ * @param {Uint8Array} cbor_bytes
2678
+ * @returns {AssetName}
2679
+ */
2680
+ static from_cbor_bytes(cbor_bytes) {
2681
+ try {
2682
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
2683
+ const ptr0 = passArray8ToWasm0(cbor_bytes, wasm.__wbindgen_malloc);
2684
+ const len0 = WASM_VECTOR_LEN;
2685
+ wasm.assetname_from_cbor_bytes(retptr, ptr0, len0);
2686
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
2687
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
2688
+ var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
2689
+ if (r2) {
2690
+ throw takeObject(r1);
2691
+ }
2692
+ return AssetName.__wrap(r0);
2693
+ } finally {
2694
+ wasm.__wbindgen_add_to_stack_pointer(16);
2695
+ }
2696
+ }
2697
+ /**
2698
+ *
2699
+ * * Serialize this type to CBOR bytes encoded as a hex string (useful for working with CIP30).
2700
+ * * This type type supports encoding preservation so this will preserve round-trip CBOR formats.
2701
+ * * If created from scratch the CBOR will be canonical.
2702
+ *
2703
+ * @returns {string}
2704
+ */
2705
+ to_cbor_hex() {
2706
+ let deferred1_0;
2707
+ let deferred1_1;
2708
+ try {
2709
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
2710
+ wasm.assetname_to_cbor_hex(retptr, this.__wbg_ptr);
2711
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
2712
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
2713
+ deferred1_0 = r0;
2714
+ deferred1_1 = r1;
2715
+ return getStringFromWasm0(r0, r1);
2716
+ } finally {
2717
+ wasm.__wbindgen_add_to_stack_pointer(16);
2718
+ wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
2719
+ }
2720
+ }
2721
+ /**
2722
+ *
2723
+ * * Serialize this type to CBOR bytes using canonical CBOR encodings as hex bytes
2724
+ *
2725
+ * @returns {string}
2726
+ */
2727
+ to_canonical_cbor_hex() {
2728
+ let deferred1_0;
2729
+ let deferred1_1;
2730
+ try {
2731
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
2732
+ wasm.assetname_to_canonical_cbor_hex(retptr, this.__wbg_ptr);
2733
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
2734
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
2735
+ deferred1_0 = r0;
2736
+ deferred1_1 = r1;
2737
+ return getStringFromWasm0(r0, r1);
2738
+ } finally {
2739
+ wasm.__wbindgen_add_to_stack_pointer(16);
2740
+ wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
2741
+ }
2742
+ }
2743
+ /**
2744
+ *
2745
+ * * Create this type from the CBOR bytes encoded as a hex string.
2746
+ * * This is useful for interfacing with CIP30
2747
+ *
2748
+ * @param {string} cbor_bytes
2749
+ * @returns {AssetName}
2750
+ */
2751
+ static from_cbor_hex(cbor_bytes) {
2752
+ try {
2753
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
2754
+ const ptr0 = passStringToWasm0(cbor_bytes, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
2755
+ const len0 = WASM_VECTOR_LEN;
2756
+ wasm.assetname_from_cbor_hex(retptr, ptr0, len0);
2757
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
2758
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
2759
+ var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
2760
+ if (r2) {
2761
+ throw takeObject(r1);
2762
+ }
2763
+ return AssetName.__wrap(r0);
2764
+ } finally {
2765
+ wasm.__wbindgen_add_to_stack_pointer(16);
2766
+ }
2767
+ }
2768
+ /**
2769
+ * @returns {string}
2770
+ */
2771
+ to_json() {
2772
+ let deferred2_0;
2773
+ let deferred2_1;
2774
+ try {
2775
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
2776
+ wasm.assetname_to_json(retptr, this.__wbg_ptr);
2777
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
2778
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
2779
+ var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
2780
+ var r3 = getDataViewMemory0().getInt32(retptr + 4 * 3, true);
2781
+ var ptr1 = r0;
2782
+ var len1 = r1;
2783
+ if (r3) {
2784
+ ptr1 = 0; len1 = 0;
2785
+ throw takeObject(r2);
2786
+ }
2787
+ deferred2_0 = ptr1;
2788
+ deferred2_1 = len1;
2789
+ return getStringFromWasm0(ptr1, len1);
2790
+ } finally {
2791
+ wasm.__wbindgen_add_to_stack_pointer(16);
2792
+ wasm.__wbindgen_free(deferred2_0, deferred2_1, 1);
2793
+ }
2794
+ }
2795
+ /**
2796
+ * @returns {any}
2797
+ */
2798
+ to_js_value() {
2799
+ try {
2800
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
2801
+ wasm.assetname_to_js_value(retptr, this.__wbg_ptr);
2802
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
2803
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
2804
+ var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
2805
+ if (r2) {
2806
+ throw takeObject(r1);
2807
+ }
2808
+ return takeObject(r0);
2809
+ } finally {
2810
+ wasm.__wbindgen_add_to_stack_pointer(16);
2811
+ }
2812
+ }
2813
+ /**
2814
+ * @param {string} json
2815
+ * @returns {AssetName}
2816
+ */
2817
+ static from_json(json) {
2818
+ try {
2819
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
2820
+ const ptr0 = passStringToWasm0(json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
2821
+ const len0 = WASM_VECTOR_LEN;
2822
+ wasm.assetname_from_json(retptr, ptr0, len0);
2823
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
2824
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
2825
+ var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
2826
+ if (r2) {
2827
+ throw takeObject(r1);
2828
+ }
2829
+ return AssetName.__wrap(r0);
2830
+ } finally {
2831
+ wasm.__wbindgen_add_to_stack_pointer(16);
2832
+ }
2833
+ }
2834
+ /**
2835
+ *
2633
2836
  * * Create an AssetName from utf8 string. 64 byte (not char!) maximum.
2634
2837
  *
2635
2838
  * @param {string} utf8_str
@@ -2771,207 +2974,6 @@ class AssetName {
2771
2974
  wasm.__wbindgen_add_to_stack_pointer(16);
2772
2975
  }
2773
2976
  }
2774
- /**
2775
- *
2776
- * * Serialize this type to CBOR bytes
2777
- * * This type type supports encoding preservation so this will preserve round-trip CBOR formats.
2778
- * * If created from scratch the CBOR will be canonical.
2779
- *
2780
- * @returns {Uint8Array}
2781
- */
2782
- to_cbor_bytes() {
2783
- try {
2784
- const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
2785
- wasm.assetname_to_cbor_bytes(retptr, this.__wbg_ptr);
2786
- var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
2787
- var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
2788
- var v1 = getArrayU8FromWasm0(r0, r1).slice();
2789
- wasm.__wbindgen_free(r0, r1 * 1, 1);
2790
- return v1;
2791
- } finally {
2792
- wasm.__wbindgen_add_to_stack_pointer(16);
2793
- }
2794
- }
2795
- /**
2796
- *
2797
- * * Serialize this type to CBOR bytes using canonical CBOR encodings
2798
- *
2799
- * @returns {Uint8Array}
2800
- */
2801
- to_canonical_cbor_bytes() {
2802
- try {
2803
- const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
2804
- wasm.assetname_to_canonical_cbor_bytes(retptr, this.__wbg_ptr);
2805
- var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
2806
- var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
2807
- var v1 = getArrayU8FromWasm0(r0, r1).slice();
2808
- wasm.__wbindgen_free(r0, r1 * 1, 1);
2809
- return v1;
2810
- } finally {
2811
- wasm.__wbindgen_add_to_stack_pointer(16);
2812
- }
2813
- }
2814
- /**
2815
- *
2816
- * * Create this type from CBOR bytes
2817
- *
2818
- * @param {Uint8Array} cbor_bytes
2819
- * @returns {AssetName}
2820
- */
2821
- static from_cbor_bytes(cbor_bytes) {
2822
- try {
2823
- const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
2824
- const ptr0 = passArray8ToWasm0(cbor_bytes, wasm.__wbindgen_malloc);
2825
- const len0 = WASM_VECTOR_LEN;
2826
- wasm.assetname_from_cbor_bytes(retptr, ptr0, len0);
2827
- var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
2828
- var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
2829
- var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
2830
- if (r2) {
2831
- throw takeObject(r1);
2832
- }
2833
- return AssetName.__wrap(r0);
2834
- } finally {
2835
- wasm.__wbindgen_add_to_stack_pointer(16);
2836
- }
2837
- }
2838
- /**
2839
- *
2840
- * * Serialize this type to CBOR bytes encoded as a hex string (useful for working with CIP30).
2841
- * * This type type supports encoding preservation so this will preserve round-trip CBOR formats.
2842
- * * If created from scratch the CBOR will be canonical.
2843
- *
2844
- * @returns {string}
2845
- */
2846
- to_cbor_hex() {
2847
- let deferred1_0;
2848
- let deferred1_1;
2849
- try {
2850
- const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
2851
- wasm.assetname_to_cbor_hex(retptr, this.__wbg_ptr);
2852
- var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
2853
- var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
2854
- deferred1_0 = r0;
2855
- deferred1_1 = r1;
2856
- return getStringFromWasm0(r0, r1);
2857
- } finally {
2858
- wasm.__wbindgen_add_to_stack_pointer(16);
2859
- wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
2860
- }
2861
- }
2862
- /**
2863
- *
2864
- * * Serialize this type to CBOR bytes using canonical CBOR encodings as hex bytes
2865
- *
2866
- * @returns {string}
2867
- */
2868
- to_canonical_cbor_hex() {
2869
- let deferred1_0;
2870
- let deferred1_1;
2871
- try {
2872
- const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
2873
- wasm.assetname_to_canonical_cbor_hex(retptr, this.__wbg_ptr);
2874
- var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
2875
- var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
2876
- deferred1_0 = r0;
2877
- deferred1_1 = r1;
2878
- return getStringFromWasm0(r0, r1);
2879
- } finally {
2880
- wasm.__wbindgen_add_to_stack_pointer(16);
2881
- wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
2882
- }
2883
- }
2884
- /**
2885
- *
2886
- * * Create this type from the CBOR bytes encoded as a hex string.
2887
- * * This is useful for interfacing with CIP30
2888
- *
2889
- * @param {string} cbor_bytes
2890
- * @returns {AssetName}
2891
- */
2892
- static from_cbor_hex(cbor_bytes) {
2893
- try {
2894
- const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
2895
- const ptr0 = passStringToWasm0(cbor_bytes, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
2896
- const len0 = WASM_VECTOR_LEN;
2897
- wasm.assetname_from_cbor_hex(retptr, ptr0, len0);
2898
- var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
2899
- var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
2900
- var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
2901
- if (r2) {
2902
- throw takeObject(r1);
2903
- }
2904
- return AssetName.__wrap(r0);
2905
- } finally {
2906
- wasm.__wbindgen_add_to_stack_pointer(16);
2907
- }
2908
- }
2909
- /**
2910
- * @returns {string}
2911
- */
2912
- to_json() {
2913
- let deferred2_0;
2914
- let deferred2_1;
2915
- try {
2916
- const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
2917
- wasm.assetname_to_json(retptr, this.__wbg_ptr);
2918
- var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
2919
- var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
2920
- var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
2921
- var r3 = getDataViewMemory0().getInt32(retptr + 4 * 3, true);
2922
- var ptr1 = r0;
2923
- var len1 = r1;
2924
- if (r3) {
2925
- ptr1 = 0; len1 = 0;
2926
- throw takeObject(r2);
2927
- }
2928
- deferred2_0 = ptr1;
2929
- deferred2_1 = len1;
2930
- return getStringFromWasm0(ptr1, len1);
2931
- } finally {
2932
- wasm.__wbindgen_add_to_stack_pointer(16);
2933
- wasm.__wbindgen_free(deferred2_0, deferred2_1, 1);
2934
- }
2935
- }
2936
- /**
2937
- * @returns {any}
2938
- */
2939
- to_js_value() {
2940
- try {
2941
- const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
2942
- wasm.assetname_to_js_value(retptr, this.__wbg_ptr);
2943
- var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
2944
- var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
2945
- var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
2946
- if (r2) {
2947
- throw takeObject(r1);
2948
- }
2949
- return takeObject(r0);
2950
- } finally {
2951
- wasm.__wbindgen_add_to_stack_pointer(16);
2952
- }
2953
- }
2954
- /**
2955
- * @param {string} json
2956
- * @returns {AssetName}
2957
- */
2958
- static from_json(json) {
2959
- try {
2960
- const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
2961
- const ptr0 = passStringToWasm0(json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
2962
- const len0 = WASM_VECTOR_LEN;
2963
- wasm.assetname_from_json(retptr, ptr0, len0);
2964
- var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
2965
- var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
2966
- var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
2967
- if (r2) {
2968
- throw takeObject(r1);
2969
- }
2970
- return AssetName.__wrap(r0);
2971
- } finally {
2972
- wasm.__wbindgen_add_to_stack_pointer(16);
2973
- }
2974
- }
2975
2977
  }
2976
2978
  module.exports.AssetName = AssetName;
2977
2979
 
@@ -3315,262 +3317,6 @@ class AuxiliaryData {
3315
3317
  wasm.__wbg_auxiliarydata_free(ptr, 0);
3316
3318
  }
3317
3319
  /**
3318
- *
3319
- * * Serialize this type to CBOR bytes
3320
- * * This type type supports encoding preservation so this will preserve round-trip CBOR formats.
3321
- * * If created from scratch the CBOR will be canonical.
3322
- *
3323
- * @returns {Uint8Array}
3324
- */
3325
- to_cbor_bytes() {
3326
- try {
3327
- const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
3328
- wasm.auxiliarydata_to_cbor_bytes(retptr, this.__wbg_ptr);
3329
- var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
3330
- var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
3331
- var v1 = getArrayU8FromWasm0(r0, r1).slice();
3332
- wasm.__wbindgen_free(r0, r1 * 1, 1);
3333
- return v1;
3334
- } finally {
3335
- wasm.__wbindgen_add_to_stack_pointer(16);
3336
- }
3337
- }
3338
- /**
3339
- *
3340
- * * Serialize this type to CBOR bytes using canonical CBOR encodings
3341
- *
3342
- * @returns {Uint8Array}
3343
- */
3344
- to_canonical_cbor_bytes() {
3345
- try {
3346
- const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
3347
- wasm.auxiliarydata_to_canonical_cbor_bytes(retptr, this.__wbg_ptr);
3348
- var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
3349
- var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
3350
- var v1 = getArrayU8FromWasm0(r0, r1).slice();
3351
- wasm.__wbindgen_free(r0, r1 * 1, 1);
3352
- return v1;
3353
- } finally {
3354
- wasm.__wbindgen_add_to_stack_pointer(16);
3355
- }
3356
- }
3357
- /**
3358
- *
3359
- * * Create this type from CBOR bytes
3360
- *
3361
- * @param {Uint8Array} cbor_bytes
3362
- * @returns {AuxiliaryData}
3363
- */
3364
- static from_cbor_bytes(cbor_bytes) {
3365
- try {
3366
- const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
3367
- const ptr0 = passArray8ToWasm0(cbor_bytes, wasm.__wbindgen_malloc);
3368
- const len0 = WASM_VECTOR_LEN;
3369
- wasm.auxiliarydata_from_cbor_bytes(retptr, ptr0, len0);
3370
- var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
3371
- var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
3372
- var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
3373
- if (r2) {
3374
- throw takeObject(r1);
3375
- }
3376
- return AuxiliaryData.__wrap(r0);
3377
- } finally {
3378
- wasm.__wbindgen_add_to_stack_pointer(16);
3379
- }
3380
- }
3381
- /**
3382
- *
3383
- * * Serialize this type to CBOR bytes encoded as a hex string (useful for working with CIP30).
3384
- * * This type type supports encoding preservation so this will preserve round-trip CBOR formats.
3385
- * * If created from scratch the CBOR will be canonical.
3386
- *
3387
- * @returns {string}
3388
- */
3389
- to_cbor_hex() {
3390
- let deferred1_0;
3391
- let deferred1_1;
3392
- try {
3393
- const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
3394
- wasm.auxiliarydata_to_cbor_hex(retptr, this.__wbg_ptr);
3395
- var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
3396
- var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
3397
- deferred1_0 = r0;
3398
- deferred1_1 = r1;
3399
- return getStringFromWasm0(r0, r1);
3400
- } finally {
3401
- wasm.__wbindgen_add_to_stack_pointer(16);
3402
- wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
3403
- }
3404
- }
3405
- /**
3406
- *
3407
- * * Serialize this type to CBOR bytes using canonical CBOR encodings as hex bytes
3408
- *
3409
- * @returns {string}
3410
- */
3411
- to_canonical_cbor_hex() {
3412
- let deferred1_0;
3413
- let deferred1_1;
3414
- try {
3415
- const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
3416
- wasm.auxiliarydata_to_canonical_cbor_hex(retptr, this.__wbg_ptr);
3417
- var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
3418
- var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
3419
- deferred1_0 = r0;
3420
- deferred1_1 = r1;
3421
- return getStringFromWasm0(r0, r1);
3422
- } finally {
3423
- wasm.__wbindgen_add_to_stack_pointer(16);
3424
- wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
3425
- }
3426
- }
3427
- /**
3428
- *
3429
- * * Create this type from the CBOR bytes encoded as a hex string.
3430
- * * This is useful for interfacing with CIP30
3431
- *
3432
- * @param {string} cbor_bytes
3433
- * @returns {AuxiliaryData}
3434
- */
3435
- static from_cbor_hex(cbor_bytes) {
3436
- try {
3437
- const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
3438
- const ptr0 = passStringToWasm0(cbor_bytes, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
3439
- const len0 = WASM_VECTOR_LEN;
3440
- wasm.auxiliarydata_from_cbor_hex(retptr, ptr0, len0);
3441
- var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
3442
- var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
3443
- var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
3444
- if (r2) {
3445
- throw takeObject(r1);
3446
- }
3447
- return AuxiliaryData.__wrap(r0);
3448
- } finally {
3449
- wasm.__wbindgen_add_to_stack_pointer(16);
3450
- }
3451
- }
3452
- /**
3453
- * @returns {string}
3454
- */
3455
- to_json() {
3456
- let deferred2_0;
3457
- let deferred2_1;
3458
- try {
3459
- const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
3460
- wasm.auxiliarydata_to_json(retptr, this.__wbg_ptr);
3461
- var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
3462
- var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
3463
- var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
3464
- var r3 = getDataViewMemory0().getInt32(retptr + 4 * 3, true);
3465
- var ptr1 = r0;
3466
- var len1 = r1;
3467
- if (r3) {
3468
- ptr1 = 0; len1 = 0;
3469
- throw takeObject(r2);
3470
- }
3471
- deferred2_0 = ptr1;
3472
- deferred2_1 = len1;
3473
- return getStringFromWasm0(ptr1, len1);
3474
- } finally {
3475
- wasm.__wbindgen_add_to_stack_pointer(16);
3476
- wasm.__wbindgen_free(deferred2_0, deferred2_1, 1);
3477
- }
3478
- }
3479
- /**
3480
- * @returns {any}
3481
- */
3482
- to_js_value() {
3483
- try {
3484
- const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
3485
- wasm.auxiliarydata_to_js_value(retptr, this.__wbg_ptr);
3486
- var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
3487
- var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
3488
- var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
3489
- if (r2) {
3490
- throw takeObject(r1);
3491
- }
3492
- return takeObject(r0);
3493
- } finally {
3494
- wasm.__wbindgen_add_to_stack_pointer(16);
3495
- }
3496
- }
3497
- /**
3498
- * @param {string} json
3499
- * @returns {AuxiliaryData}
3500
- */
3501
- static from_json(json) {
3502
- try {
3503
- const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
3504
- const ptr0 = passStringToWasm0(json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
3505
- const len0 = WASM_VECTOR_LEN;
3506
- wasm.auxiliarydata_from_json(retptr, ptr0, len0);
3507
- var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
3508
- var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
3509
- var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
3510
- if (r2) {
3511
- throw takeObject(r1);
3512
- }
3513
- return AuxiliaryData.__wrap(r0);
3514
- } finally {
3515
- wasm.__wbindgen_add_to_stack_pointer(16);
3516
- }
3517
- }
3518
- /**
3519
- * @param {Metadata} shelley
3520
- * @returns {AuxiliaryData}
3521
- */
3522
- static new_shelley(shelley) {
3523
- _assertClass(shelley, Metadata);
3524
- const ret = wasm.auxiliarydata_new_shelley(shelley.__wbg_ptr);
3525
- return AuxiliaryData.__wrap(ret);
3526
- }
3527
- /**
3528
- * @param {ShelleyMAFormatAuxData} shelley_ma
3529
- * @returns {AuxiliaryData}
3530
- */
3531
- static new_shelley_ma(shelley_ma) {
3532
- _assertClass(shelley_ma, ShelleyMAFormatAuxData);
3533
- const ret = wasm.auxiliarydata_new_shelley_ma(shelley_ma.__wbg_ptr);
3534
- return AuxiliaryData.__wrap(ret);
3535
- }
3536
- /**
3537
- * @param {ConwayFormatAuxData} conway
3538
- * @returns {AuxiliaryData}
3539
- */
3540
- static new_conway(conway) {
3541
- _assertClass(conway, ConwayFormatAuxData);
3542
- const ret = wasm.auxiliarydata_new_conway(conway.__wbg_ptr);
3543
- return AuxiliaryData.__wrap(ret);
3544
- }
3545
- /**
3546
- * @returns {AuxiliaryDataKind}
3547
- */
3548
- kind() {
3549
- const ret = wasm.auxiliarydata_kind(this.__wbg_ptr);
3550
- return ret;
3551
- }
3552
- /**
3553
- * @returns {Metadata | undefined}
3554
- */
3555
- as_shelley() {
3556
- const ret = wasm.auxiliarydata_as_shelley(this.__wbg_ptr);
3557
- return ret === 0 ? undefined : Metadata.__wrap(ret);
3558
- }
3559
- /**
3560
- * @returns {ShelleyMAFormatAuxData | undefined}
3561
- */
3562
- as_shelley_ma() {
3563
- const ret = wasm.auxiliarydata_as_shelley_ma(this.__wbg_ptr);
3564
- return ret === 0 ? undefined : ShelleyMAFormatAuxData.__wrap(ret);
3565
- }
3566
- /**
3567
- * @returns {ConwayFormatAuxData | undefined}
3568
- */
3569
- as_conway() {
3570
- const ret = wasm.auxiliarydata_as_conway(this.__wbg_ptr);
3571
- return ret === 0 ? undefined : ConwayFormatAuxData.__wrap(ret);
3572
- }
3573
- /**
3574
3320
  * @returns {AuxiliaryData}
3575
3321
  */
3576
3322
  static new() {
@@ -3648,6 +3394,262 @@ class AuxiliaryData {
3648
3394
  _assertClass(other, AuxiliaryData);
3649
3395
  wasm.auxiliarydata_add(this.__wbg_ptr, other.__wbg_ptr);
3650
3396
  }
3397
+ /**
3398
+ *
3399
+ * * Serialize this type to CBOR bytes
3400
+ * * This type type supports encoding preservation so this will preserve round-trip CBOR formats.
3401
+ * * If created from scratch the CBOR will be canonical.
3402
+ *
3403
+ * @returns {Uint8Array}
3404
+ */
3405
+ to_cbor_bytes() {
3406
+ try {
3407
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
3408
+ wasm.auxiliarydata_to_cbor_bytes(retptr, this.__wbg_ptr);
3409
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
3410
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
3411
+ var v1 = getArrayU8FromWasm0(r0, r1).slice();
3412
+ wasm.__wbindgen_free(r0, r1 * 1, 1);
3413
+ return v1;
3414
+ } finally {
3415
+ wasm.__wbindgen_add_to_stack_pointer(16);
3416
+ }
3417
+ }
3418
+ /**
3419
+ *
3420
+ * * Serialize this type to CBOR bytes using canonical CBOR encodings
3421
+ *
3422
+ * @returns {Uint8Array}
3423
+ */
3424
+ to_canonical_cbor_bytes() {
3425
+ try {
3426
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
3427
+ wasm.auxiliarydata_to_canonical_cbor_bytes(retptr, this.__wbg_ptr);
3428
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
3429
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
3430
+ var v1 = getArrayU8FromWasm0(r0, r1).slice();
3431
+ wasm.__wbindgen_free(r0, r1 * 1, 1);
3432
+ return v1;
3433
+ } finally {
3434
+ wasm.__wbindgen_add_to_stack_pointer(16);
3435
+ }
3436
+ }
3437
+ /**
3438
+ *
3439
+ * * Create this type from CBOR bytes
3440
+ *
3441
+ * @param {Uint8Array} cbor_bytes
3442
+ * @returns {AuxiliaryData}
3443
+ */
3444
+ static from_cbor_bytes(cbor_bytes) {
3445
+ try {
3446
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
3447
+ const ptr0 = passArray8ToWasm0(cbor_bytes, wasm.__wbindgen_malloc);
3448
+ const len0 = WASM_VECTOR_LEN;
3449
+ wasm.auxiliarydata_from_cbor_bytes(retptr, ptr0, len0);
3450
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
3451
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
3452
+ var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
3453
+ if (r2) {
3454
+ throw takeObject(r1);
3455
+ }
3456
+ return AuxiliaryData.__wrap(r0);
3457
+ } finally {
3458
+ wasm.__wbindgen_add_to_stack_pointer(16);
3459
+ }
3460
+ }
3461
+ /**
3462
+ *
3463
+ * * Serialize this type to CBOR bytes encoded as a hex string (useful for working with CIP30).
3464
+ * * This type type supports encoding preservation so this will preserve round-trip CBOR formats.
3465
+ * * If created from scratch the CBOR will be canonical.
3466
+ *
3467
+ * @returns {string}
3468
+ */
3469
+ to_cbor_hex() {
3470
+ let deferred1_0;
3471
+ let deferred1_1;
3472
+ try {
3473
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
3474
+ wasm.auxiliarydata_to_cbor_hex(retptr, this.__wbg_ptr);
3475
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
3476
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
3477
+ deferred1_0 = r0;
3478
+ deferred1_1 = r1;
3479
+ return getStringFromWasm0(r0, r1);
3480
+ } finally {
3481
+ wasm.__wbindgen_add_to_stack_pointer(16);
3482
+ wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
3483
+ }
3484
+ }
3485
+ /**
3486
+ *
3487
+ * * Serialize this type to CBOR bytes using canonical CBOR encodings as hex bytes
3488
+ *
3489
+ * @returns {string}
3490
+ */
3491
+ to_canonical_cbor_hex() {
3492
+ let deferred1_0;
3493
+ let deferred1_1;
3494
+ try {
3495
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
3496
+ wasm.auxiliarydata_to_canonical_cbor_hex(retptr, this.__wbg_ptr);
3497
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
3498
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
3499
+ deferred1_0 = r0;
3500
+ deferred1_1 = r1;
3501
+ return getStringFromWasm0(r0, r1);
3502
+ } finally {
3503
+ wasm.__wbindgen_add_to_stack_pointer(16);
3504
+ wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
3505
+ }
3506
+ }
3507
+ /**
3508
+ *
3509
+ * * Create this type from the CBOR bytes encoded as a hex string.
3510
+ * * This is useful for interfacing with CIP30
3511
+ *
3512
+ * @param {string} cbor_bytes
3513
+ * @returns {AuxiliaryData}
3514
+ */
3515
+ static from_cbor_hex(cbor_bytes) {
3516
+ try {
3517
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
3518
+ const ptr0 = passStringToWasm0(cbor_bytes, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
3519
+ const len0 = WASM_VECTOR_LEN;
3520
+ wasm.auxiliarydata_from_cbor_hex(retptr, ptr0, len0);
3521
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
3522
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
3523
+ var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
3524
+ if (r2) {
3525
+ throw takeObject(r1);
3526
+ }
3527
+ return AuxiliaryData.__wrap(r0);
3528
+ } finally {
3529
+ wasm.__wbindgen_add_to_stack_pointer(16);
3530
+ }
3531
+ }
3532
+ /**
3533
+ * @returns {string}
3534
+ */
3535
+ to_json() {
3536
+ let deferred2_0;
3537
+ let deferred2_1;
3538
+ try {
3539
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
3540
+ wasm.auxiliarydata_to_json(retptr, this.__wbg_ptr);
3541
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
3542
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
3543
+ var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
3544
+ var r3 = getDataViewMemory0().getInt32(retptr + 4 * 3, true);
3545
+ var ptr1 = r0;
3546
+ var len1 = r1;
3547
+ if (r3) {
3548
+ ptr1 = 0; len1 = 0;
3549
+ throw takeObject(r2);
3550
+ }
3551
+ deferred2_0 = ptr1;
3552
+ deferred2_1 = len1;
3553
+ return getStringFromWasm0(ptr1, len1);
3554
+ } finally {
3555
+ wasm.__wbindgen_add_to_stack_pointer(16);
3556
+ wasm.__wbindgen_free(deferred2_0, deferred2_1, 1);
3557
+ }
3558
+ }
3559
+ /**
3560
+ * @returns {any}
3561
+ */
3562
+ to_js_value() {
3563
+ try {
3564
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
3565
+ wasm.auxiliarydata_to_js_value(retptr, this.__wbg_ptr);
3566
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
3567
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
3568
+ var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
3569
+ if (r2) {
3570
+ throw takeObject(r1);
3571
+ }
3572
+ return takeObject(r0);
3573
+ } finally {
3574
+ wasm.__wbindgen_add_to_stack_pointer(16);
3575
+ }
3576
+ }
3577
+ /**
3578
+ * @param {string} json
3579
+ * @returns {AuxiliaryData}
3580
+ */
3581
+ static from_json(json) {
3582
+ try {
3583
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
3584
+ const ptr0 = passStringToWasm0(json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
3585
+ const len0 = WASM_VECTOR_LEN;
3586
+ wasm.auxiliarydata_from_json(retptr, ptr0, len0);
3587
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
3588
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
3589
+ var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
3590
+ if (r2) {
3591
+ throw takeObject(r1);
3592
+ }
3593
+ return AuxiliaryData.__wrap(r0);
3594
+ } finally {
3595
+ wasm.__wbindgen_add_to_stack_pointer(16);
3596
+ }
3597
+ }
3598
+ /**
3599
+ * @param {Metadata} shelley
3600
+ * @returns {AuxiliaryData}
3601
+ */
3602
+ static new_shelley(shelley) {
3603
+ _assertClass(shelley, Metadata);
3604
+ const ret = wasm.auxiliarydata_new_shelley(shelley.__wbg_ptr);
3605
+ return AuxiliaryData.__wrap(ret);
3606
+ }
3607
+ /**
3608
+ * @param {ShelleyMAFormatAuxData} shelley_ma
3609
+ * @returns {AuxiliaryData}
3610
+ */
3611
+ static new_shelley_ma(shelley_ma) {
3612
+ _assertClass(shelley_ma, ShelleyMAFormatAuxData);
3613
+ const ret = wasm.auxiliarydata_new_shelley_ma(shelley_ma.__wbg_ptr);
3614
+ return AuxiliaryData.__wrap(ret);
3615
+ }
3616
+ /**
3617
+ * @param {ConwayFormatAuxData} conway
3618
+ * @returns {AuxiliaryData}
3619
+ */
3620
+ static new_conway(conway) {
3621
+ _assertClass(conway, ConwayFormatAuxData);
3622
+ const ret = wasm.auxiliarydata_new_conway(conway.__wbg_ptr);
3623
+ return AuxiliaryData.__wrap(ret);
3624
+ }
3625
+ /**
3626
+ * @returns {AuxiliaryDataKind}
3627
+ */
3628
+ kind() {
3629
+ const ret = wasm.auxiliarydata_kind(this.__wbg_ptr);
3630
+ return ret;
3631
+ }
3632
+ /**
3633
+ * @returns {Metadata | undefined}
3634
+ */
3635
+ as_shelley() {
3636
+ const ret = wasm.auxiliarydata_as_shelley(this.__wbg_ptr);
3637
+ return ret === 0 ? undefined : Metadata.__wrap(ret);
3638
+ }
3639
+ /**
3640
+ * @returns {ShelleyMAFormatAuxData | undefined}
3641
+ */
3642
+ as_shelley_ma() {
3643
+ const ret = wasm.auxiliarydata_as_shelley_ma(this.__wbg_ptr);
3644
+ return ret === 0 ? undefined : ShelleyMAFormatAuxData.__wrap(ret);
3645
+ }
3646
+ /**
3647
+ * @returns {ConwayFormatAuxData | undefined}
3648
+ */
3649
+ as_conway() {
3650
+ const ret = wasm.auxiliarydata_as_conway(this.__wbg_ptr);
3651
+ return ret === 0 ? undefined : ConwayFormatAuxData.__wrap(ret);
3652
+ }
3651
3653
  }
3652
3654
  module.exports.AuxiliaryData = AuxiliaryData;
3653
3655
 
@@ -19917,6 +19919,34 @@ class NativeScript {
19917
19919
  wasm.__wbg_nativescript_free(ptr, 0);
19918
19920
  }
19919
19921
  /**
19922
+ * Returns an array of unique Ed25519KeyHashes
19923
+ * contained within this script recursively on any depth level.
19924
+ * The order of the keys in the result is not determined in any way.
19925
+ * @returns {Ed25519KeyHashList}
19926
+ */
19927
+ get_required_signers() {
19928
+ const ret = wasm.nativescript_get_required_signers(this.__wbg_ptr);
19929
+ return Ed25519KeyHashList.__wrap(ret);
19930
+ }
19931
+ /**
19932
+ * @returns {ScriptHash}
19933
+ */
19934
+ hash() {
19935
+ const ret = wasm.nativescript_hash(this.__wbg_ptr);
19936
+ return ScriptHash.__wrap(ret);
19937
+ }
19938
+ /**
19939
+ * @param {bigint | undefined} lower_bound
19940
+ * @param {bigint | undefined} upper_bound
19941
+ * @param {Ed25519KeyHashList} key_hashes
19942
+ * @returns {boolean}
19943
+ */
19944
+ verify(lower_bound, upper_bound, key_hashes) {
19945
+ _assertClass(key_hashes, Ed25519KeyHashList);
19946
+ const ret = wasm.nativescript_verify(this.__wbg_ptr, !isLikeNone(lower_bound), isLikeNone(lower_bound) ? BigInt(0) : lower_bound, !isLikeNone(upper_bound), isLikeNone(upper_bound) ? BigInt(0) : upper_bound, key_hashes.__wbg_ptr);
19947
+ return ret !== 0;
19948
+ }
19949
+ /**
19920
19950
  *
19921
19951
  * * Serialize this type to CBOR bytes
19922
19952
  * * This type type supports encoding preservation so this will preserve round-trip CBOR formats.
@@ -20221,34 +20251,6 @@ class NativeScript {
20221
20251
  const ret = wasm.nativescript_as_script_invalid_hereafter(this.__wbg_ptr);
20222
20252
  return ret === 0 ? undefined : ScriptInvalidHereafter.__wrap(ret);
20223
20253
  }
20224
- /**
20225
- * Returns an array of unique Ed25519KeyHashes
20226
- * contained within this script recursively on any depth level.
20227
- * The order of the keys in the result is not determined in any way.
20228
- * @returns {Ed25519KeyHashList}
20229
- */
20230
- get_required_signers() {
20231
- const ret = wasm.nativescript_get_required_signers(this.__wbg_ptr);
20232
- return Ed25519KeyHashList.__wrap(ret);
20233
- }
20234
- /**
20235
- * @returns {ScriptHash}
20236
- */
20237
- hash() {
20238
- const ret = wasm.nativescript_hash(this.__wbg_ptr);
20239
- return ScriptHash.__wrap(ret);
20240
- }
20241
- /**
20242
- * @param {bigint | undefined} lower_bound
20243
- * @param {bigint | undefined} upper_bound
20244
- * @param {Ed25519KeyHashList} key_hashes
20245
- * @returns {boolean}
20246
- */
20247
- verify(lower_bound, upper_bound, key_hashes) {
20248
- _assertClass(key_hashes, Ed25519KeyHashList);
20249
- const ret = wasm.nativescript_verify(this.__wbg_ptr, !isLikeNone(lower_bound), isLikeNone(lower_bound) ? BigInt(0) : lower_bound, !isLikeNone(upper_bound), isLikeNone(upper_bound) ? BigInt(0) : upper_bound, key_hashes.__wbg_ptr);
20250
- return ret !== 0;
20251
- }
20252
20254
  }
20253
20255
  module.exports.NativeScript = NativeScript;
20254
20256
 
@@ -38566,246 +38568,6 @@ class TransactionOutput {
38566
38568
  wasm.__wbg_transactionoutput_free(ptr, 0);
38567
38569
  }
38568
38570
  /**
38569
- *
38570
- * * Serialize this type to CBOR bytes
38571
- * * This type type supports encoding preservation so this will preserve round-trip CBOR formats.
38572
- * * If created from scratch the CBOR will be canonical.
38573
- *
38574
- * @returns {Uint8Array}
38575
- */
38576
- to_cbor_bytes() {
38577
- try {
38578
- const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
38579
- wasm.transactionoutput_to_cbor_bytes(retptr, this.__wbg_ptr);
38580
- var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
38581
- var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
38582
- var v1 = getArrayU8FromWasm0(r0, r1).slice();
38583
- wasm.__wbindgen_free(r0, r1 * 1, 1);
38584
- return v1;
38585
- } finally {
38586
- wasm.__wbindgen_add_to_stack_pointer(16);
38587
- }
38588
- }
38589
- /**
38590
- *
38591
- * * Serialize this type to CBOR bytes using canonical CBOR encodings
38592
- *
38593
- * @returns {Uint8Array}
38594
- */
38595
- to_canonical_cbor_bytes() {
38596
- try {
38597
- const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
38598
- wasm.transactionoutput_to_canonical_cbor_bytes(retptr, this.__wbg_ptr);
38599
- var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
38600
- var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
38601
- var v1 = getArrayU8FromWasm0(r0, r1).slice();
38602
- wasm.__wbindgen_free(r0, r1 * 1, 1);
38603
- return v1;
38604
- } finally {
38605
- wasm.__wbindgen_add_to_stack_pointer(16);
38606
- }
38607
- }
38608
- /**
38609
- *
38610
- * * Create this type from CBOR bytes
38611
- *
38612
- * @param {Uint8Array} cbor_bytes
38613
- * @returns {TransactionOutput}
38614
- */
38615
- static from_cbor_bytes(cbor_bytes) {
38616
- try {
38617
- const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
38618
- const ptr0 = passArray8ToWasm0(cbor_bytes, wasm.__wbindgen_malloc);
38619
- const len0 = WASM_VECTOR_LEN;
38620
- wasm.transactionoutput_from_cbor_bytes(retptr, ptr0, len0);
38621
- var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
38622
- var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
38623
- var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
38624
- if (r2) {
38625
- throw takeObject(r1);
38626
- }
38627
- return TransactionOutput.__wrap(r0);
38628
- } finally {
38629
- wasm.__wbindgen_add_to_stack_pointer(16);
38630
- }
38631
- }
38632
- /**
38633
- *
38634
- * * Serialize this type to CBOR bytes encoded as a hex string (useful for working with CIP30).
38635
- * * This type type supports encoding preservation so this will preserve round-trip CBOR formats.
38636
- * * If created from scratch the CBOR will be canonical.
38637
- *
38638
- * @returns {string}
38639
- */
38640
- to_cbor_hex() {
38641
- let deferred1_0;
38642
- let deferred1_1;
38643
- try {
38644
- const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
38645
- wasm.transactionoutput_to_cbor_hex(retptr, this.__wbg_ptr);
38646
- var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
38647
- var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
38648
- deferred1_0 = r0;
38649
- deferred1_1 = r1;
38650
- return getStringFromWasm0(r0, r1);
38651
- } finally {
38652
- wasm.__wbindgen_add_to_stack_pointer(16);
38653
- wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
38654
- }
38655
- }
38656
- /**
38657
- *
38658
- * * Serialize this type to CBOR bytes using canonical CBOR encodings as hex bytes
38659
- *
38660
- * @returns {string}
38661
- */
38662
- to_canonical_cbor_hex() {
38663
- let deferred1_0;
38664
- let deferred1_1;
38665
- try {
38666
- const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
38667
- wasm.transactionoutput_to_canonical_cbor_hex(retptr, this.__wbg_ptr);
38668
- var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
38669
- var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
38670
- deferred1_0 = r0;
38671
- deferred1_1 = r1;
38672
- return getStringFromWasm0(r0, r1);
38673
- } finally {
38674
- wasm.__wbindgen_add_to_stack_pointer(16);
38675
- wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
38676
- }
38677
- }
38678
- /**
38679
- *
38680
- * * Create this type from the CBOR bytes encoded as a hex string.
38681
- * * This is useful for interfacing with CIP30
38682
- *
38683
- * @param {string} cbor_bytes
38684
- * @returns {TransactionOutput}
38685
- */
38686
- static from_cbor_hex(cbor_bytes) {
38687
- try {
38688
- const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
38689
- const ptr0 = passStringToWasm0(cbor_bytes, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
38690
- const len0 = WASM_VECTOR_LEN;
38691
- wasm.transactionoutput_from_cbor_hex(retptr, ptr0, len0);
38692
- var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
38693
- var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
38694
- var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
38695
- if (r2) {
38696
- throw takeObject(r1);
38697
- }
38698
- return TransactionOutput.__wrap(r0);
38699
- } finally {
38700
- wasm.__wbindgen_add_to_stack_pointer(16);
38701
- }
38702
- }
38703
- /**
38704
- * @returns {string}
38705
- */
38706
- to_json() {
38707
- let deferred2_0;
38708
- let deferred2_1;
38709
- try {
38710
- const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
38711
- wasm.transactionoutput_to_json(retptr, this.__wbg_ptr);
38712
- var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
38713
- var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
38714
- var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
38715
- var r3 = getDataViewMemory0().getInt32(retptr + 4 * 3, true);
38716
- var ptr1 = r0;
38717
- var len1 = r1;
38718
- if (r3) {
38719
- ptr1 = 0; len1 = 0;
38720
- throw takeObject(r2);
38721
- }
38722
- deferred2_0 = ptr1;
38723
- deferred2_1 = len1;
38724
- return getStringFromWasm0(ptr1, len1);
38725
- } finally {
38726
- wasm.__wbindgen_add_to_stack_pointer(16);
38727
- wasm.__wbindgen_free(deferred2_0, deferred2_1, 1);
38728
- }
38729
- }
38730
- /**
38731
- * @returns {any}
38732
- */
38733
- to_js_value() {
38734
- try {
38735
- const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
38736
- wasm.transactionoutput_to_js_value(retptr, this.__wbg_ptr);
38737
- var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
38738
- var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
38739
- var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
38740
- if (r2) {
38741
- throw takeObject(r1);
38742
- }
38743
- return takeObject(r0);
38744
- } finally {
38745
- wasm.__wbindgen_add_to_stack_pointer(16);
38746
- }
38747
- }
38748
- /**
38749
- * @param {string} json
38750
- * @returns {TransactionOutput}
38751
- */
38752
- static from_json(json) {
38753
- try {
38754
- const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
38755
- const ptr0 = passStringToWasm0(json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
38756
- const len0 = WASM_VECTOR_LEN;
38757
- wasm.transactionoutput_from_json(retptr, ptr0, len0);
38758
- var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
38759
- var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
38760
- var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
38761
- if (r2) {
38762
- throw takeObject(r1);
38763
- }
38764
- return TransactionOutput.__wrap(r0);
38765
- } finally {
38766
- wasm.__wbindgen_add_to_stack_pointer(16);
38767
- }
38768
- }
38769
- /**
38770
- * @param {AlonzoFormatTxOut} alonzo_format_tx_out
38771
- * @returns {TransactionOutput}
38772
- */
38773
- static new_alonzo_format_tx_out(alonzo_format_tx_out) {
38774
- _assertClass(alonzo_format_tx_out, AlonzoFormatTxOut);
38775
- const ret = wasm.transactionoutput_new_alonzo_format_tx_out(alonzo_format_tx_out.__wbg_ptr);
38776
- return TransactionOutput.__wrap(ret);
38777
- }
38778
- /**
38779
- * @param {ConwayFormatTxOut} conway_format_tx_out
38780
- * @returns {TransactionOutput}
38781
- */
38782
- static new_conway_format_tx_out(conway_format_tx_out) {
38783
- _assertClass(conway_format_tx_out, ConwayFormatTxOut);
38784
- const ret = wasm.transactionoutput_new_conway_format_tx_out(conway_format_tx_out.__wbg_ptr);
38785
- return TransactionOutput.__wrap(ret);
38786
- }
38787
- /**
38788
- * @returns {TransactionOutputKind}
38789
- */
38790
- kind() {
38791
- const ret = wasm.transactionoutput_kind(this.__wbg_ptr);
38792
- return ret;
38793
- }
38794
- /**
38795
- * @returns {AlonzoFormatTxOut | undefined}
38796
- */
38797
- as_alonzo_format_tx_out() {
38798
- const ret = wasm.transactionoutput_as_alonzo_format_tx_out(this.__wbg_ptr);
38799
- return ret === 0 ? undefined : AlonzoFormatTxOut.__wrap(ret);
38800
- }
38801
- /**
38802
- * @returns {ConwayFormatTxOut | undefined}
38803
- */
38804
- as_conway_format_tx_out() {
38805
- const ret = wasm.transactionoutput_as_conway_format_tx_out(this.__wbg_ptr);
38806
- return ret === 0 ? undefined : ConwayFormatTxOut.__wrap(ret);
38807
- }
38808
- /**
38809
38571
  * @param {Address} address
38810
38572
  * @param {Value} amount
38811
38573
  * @param {DatumOption | undefined} [datum_option]
@@ -38873,6 +38635,246 @@ class TransactionOutput {
38873
38635
  const ret = wasm.transactionoutput_script_ref(this.__wbg_ptr);
38874
38636
  return ret === 0 ? undefined : Script.__wrap(ret);
38875
38637
  }
38638
+ /**
38639
+ *
38640
+ * * Serialize this type to CBOR bytes
38641
+ * * This type type supports encoding preservation so this will preserve round-trip CBOR formats.
38642
+ * * If created from scratch the CBOR will be canonical.
38643
+ *
38644
+ * @returns {Uint8Array}
38645
+ */
38646
+ to_cbor_bytes() {
38647
+ try {
38648
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
38649
+ wasm.transactionoutput_to_cbor_bytes(retptr, this.__wbg_ptr);
38650
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
38651
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
38652
+ var v1 = getArrayU8FromWasm0(r0, r1).slice();
38653
+ wasm.__wbindgen_free(r0, r1 * 1, 1);
38654
+ return v1;
38655
+ } finally {
38656
+ wasm.__wbindgen_add_to_stack_pointer(16);
38657
+ }
38658
+ }
38659
+ /**
38660
+ *
38661
+ * * Serialize this type to CBOR bytes using canonical CBOR encodings
38662
+ *
38663
+ * @returns {Uint8Array}
38664
+ */
38665
+ to_canonical_cbor_bytes() {
38666
+ try {
38667
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
38668
+ wasm.transactionoutput_to_canonical_cbor_bytes(retptr, this.__wbg_ptr);
38669
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
38670
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
38671
+ var v1 = getArrayU8FromWasm0(r0, r1).slice();
38672
+ wasm.__wbindgen_free(r0, r1 * 1, 1);
38673
+ return v1;
38674
+ } finally {
38675
+ wasm.__wbindgen_add_to_stack_pointer(16);
38676
+ }
38677
+ }
38678
+ /**
38679
+ *
38680
+ * * Create this type from CBOR bytes
38681
+ *
38682
+ * @param {Uint8Array} cbor_bytes
38683
+ * @returns {TransactionOutput}
38684
+ */
38685
+ static from_cbor_bytes(cbor_bytes) {
38686
+ try {
38687
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
38688
+ const ptr0 = passArray8ToWasm0(cbor_bytes, wasm.__wbindgen_malloc);
38689
+ const len0 = WASM_VECTOR_LEN;
38690
+ wasm.transactionoutput_from_cbor_bytes(retptr, ptr0, len0);
38691
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
38692
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
38693
+ var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
38694
+ if (r2) {
38695
+ throw takeObject(r1);
38696
+ }
38697
+ return TransactionOutput.__wrap(r0);
38698
+ } finally {
38699
+ wasm.__wbindgen_add_to_stack_pointer(16);
38700
+ }
38701
+ }
38702
+ /**
38703
+ *
38704
+ * * Serialize this type to CBOR bytes encoded as a hex string (useful for working with CIP30).
38705
+ * * This type type supports encoding preservation so this will preserve round-trip CBOR formats.
38706
+ * * If created from scratch the CBOR will be canonical.
38707
+ *
38708
+ * @returns {string}
38709
+ */
38710
+ to_cbor_hex() {
38711
+ let deferred1_0;
38712
+ let deferred1_1;
38713
+ try {
38714
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
38715
+ wasm.transactionoutput_to_cbor_hex(retptr, this.__wbg_ptr);
38716
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
38717
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
38718
+ deferred1_0 = r0;
38719
+ deferred1_1 = r1;
38720
+ return getStringFromWasm0(r0, r1);
38721
+ } finally {
38722
+ wasm.__wbindgen_add_to_stack_pointer(16);
38723
+ wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
38724
+ }
38725
+ }
38726
+ /**
38727
+ *
38728
+ * * Serialize this type to CBOR bytes using canonical CBOR encodings as hex bytes
38729
+ *
38730
+ * @returns {string}
38731
+ */
38732
+ to_canonical_cbor_hex() {
38733
+ let deferred1_0;
38734
+ let deferred1_1;
38735
+ try {
38736
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
38737
+ wasm.transactionoutput_to_canonical_cbor_hex(retptr, this.__wbg_ptr);
38738
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
38739
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
38740
+ deferred1_0 = r0;
38741
+ deferred1_1 = r1;
38742
+ return getStringFromWasm0(r0, r1);
38743
+ } finally {
38744
+ wasm.__wbindgen_add_to_stack_pointer(16);
38745
+ wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
38746
+ }
38747
+ }
38748
+ /**
38749
+ *
38750
+ * * Create this type from the CBOR bytes encoded as a hex string.
38751
+ * * This is useful for interfacing with CIP30
38752
+ *
38753
+ * @param {string} cbor_bytes
38754
+ * @returns {TransactionOutput}
38755
+ */
38756
+ static from_cbor_hex(cbor_bytes) {
38757
+ try {
38758
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
38759
+ const ptr0 = passStringToWasm0(cbor_bytes, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
38760
+ const len0 = WASM_VECTOR_LEN;
38761
+ wasm.transactionoutput_from_cbor_hex(retptr, ptr0, len0);
38762
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
38763
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
38764
+ var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
38765
+ if (r2) {
38766
+ throw takeObject(r1);
38767
+ }
38768
+ return TransactionOutput.__wrap(r0);
38769
+ } finally {
38770
+ wasm.__wbindgen_add_to_stack_pointer(16);
38771
+ }
38772
+ }
38773
+ /**
38774
+ * @returns {string}
38775
+ */
38776
+ to_json() {
38777
+ let deferred2_0;
38778
+ let deferred2_1;
38779
+ try {
38780
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
38781
+ wasm.transactionoutput_to_json(retptr, this.__wbg_ptr);
38782
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
38783
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
38784
+ var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
38785
+ var r3 = getDataViewMemory0().getInt32(retptr + 4 * 3, true);
38786
+ var ptr1 = r0;
38787
+ var len1 = r1;
38788
+ if (r3) {
38789
+ ptr1 = 0; len1 = 0;
38790
+ throw takeObject(r2);
38791
+ }
38792
+ deferred2_0 = ptr1;
38793
+ deferred2_1 = len1;
38794
+ return getStringFromWasm0(ptr1, len1);
38795
+ } finally {
38796
+ wasm.__wbindgen_add_to_stack_pointer(16);
38797
+ wasm.__wbindgen_free(deferred2_0, deferred2_1, 1);
38798
+ }
38799
+ }
38800
+ /**
38801
+ * @returns {any}
38802
+ */
38803
+ to_js_value() {
38804
+ try {
38805
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
38806
+ wasm.transactionoutput_to_js_value(retptr, this.__wbg_ptr);
38807
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
38808
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
38809
+ var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
38810
+ if (r2) {
38811
+ throw takeObject(r1);
38812
+ }
38813
+ return takeObject(r0);
38814
+ } finally {
38815
+ wasm.__wbindgen_add_to_stack_pointer(16);
38816
+ }
38817
+ }
38818
+ /**
38819
+ * @param {string} json
38820
+ * @returns {TransactionOutput}
38821
+ */
38822
+ static from_json(json) {
38823
+ try {
38824
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
38825
+ const ptr0 = passStringToWasm0(json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
38826
+ const len0 = WASM_VECTOR_LEN;
38827
+ wasm.transactionoutput_from_json(retptr, ptr0, len0);
38828
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
38829
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
38830
+ var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
38831
+ if (r2) {
38832
+ throw takeObject(r1);
38833
+ }
38834
+ return TransactionOutput.__wrap(r0);
38835
+ } finally {
38836
+ wasm.__wbindgen_add_to_stack_pointer(16);
38837
+ }
38838
+ }
38839
+ /**
38840
+ * @param {AlonzoFormatTxOut} alonzo_format_tx_out
38841
+ * @returns {TransactionOutput}
38842
+ */
38843
+ static new_alonzo_format_tx_out(alonzo_format_tx_out) {
38844
+ _assertClass(alonzo_format_tx_out, AlonzoFormatTxOut);
38845
+ const ret = wasm.transactionoutput_new_alonzo_format_tx_out(alonzo_format_tx_out.__wbg_ptr);
38846
+ return TransactionOutput.__wrap(ret);
38847
+ }
38848
+ /**
38849
+ * @param {ConwayFormatTxOut} conway_format_tx_out
38850
+ * @returns {TransactionOutput}
38851
+ */
38852
+ static new_conway_format_tx_out(conway_format_tx_out) {
38853
+ _assertClass(conway_format_tx_out, ConwayFormatTxOut);
38854
+ const ret = wasm.transactionoutput_new_conway_format_tx_out(conway_format_tx_out.__wbg_ptr);
38855
+ return TransactionOutput.__wrap(ret);
38856
+ }
38857
+ /**
38858
+ * @returns {TransactionOutputKind}
38859
+ */
38860
+ kind() {
38861
+ const ret = wasm.transactionoutput_kind(this.__wbg_ptr);
38862
+ return ret;
38863
+ }
38864
+ /**
38865
+ * @returns {AlonzoFormatTxOut | undefined}
38866
+ */
38867
+ as_alonzo_format_tx_out() {
38868
+ const ret = wasm.transactionoutput_as_alonzo_format_tx_out(this.__wbg_ptr);
38869
+ return ret === 0 ? undefined : AlonzoFormatTxOut.__wrap(ret);
38870
+ }
38871
+ /**
38872
+ * @returns {ConwayFormatTxOut | undefined}
38873
+ */
38874
+ as_conway_format_tx_out() {
38875
+ const ret = wasm.transactionoutput_as_conway_format_tx_out(this.__wbg_ptr);
38876
+ return ret === 0 ? undefined : ConwayFormatTxOut.__wrap(ret);
38877
+ }
38876
38878
  }
38877
38879
  module.exports.TransactionOutput = TransactionOutput;
38878
38880
 
@@ -39283,6 +39285,20 @@ class TransactionWitnessSet {
39283
39285
  wasm.__wbg_transactionwitnessset_free(ptr, 0);
39284
39286
  }
39285
39287
  /**
39288
+ * @param {TransactionWitnessSet} other
39289
+ */
39290
+ add_all_witnesses(other) {
39291
+ _assertClass(other, TransactionWitnessSet);
39292
+ wasm.transactionwitnessset_add_all_witnesses(this.__wbg_ptr, other.__wbg_ptr);
39293
+ }
39294
+ /**
39295
+ * @returns {LanguageList}
39296
+ */
39297
+ languages() {
39298
+ const ret = wasm.transactionwitnessset_languages(this.__wbg_ptr);
39299
+ return LanguageList.__wrap(ret);
39300
+ }
39301
+ /**
39286
39302
  *
39287
39303
  * * Serialize this type to CBOR bytes
39288
39304
  * * This type type supports encoding preservation so this will preserve round-trip CBOR formats.
@@ -39602,20 +39618,6 @@ class TransactionWitnessSet {
39602
39618
  const ret = wasm.transactionwitnessset_new();
39603
39619
  return TransactionWitnessSet.__wrap(ret);
39604
39620
  }
39605
- /**
39606
- * @param {TransactionWitnessSet} other
39607
- */
39608
- add_all_witnesses(other) {
39609
- _assertClass(other, TransactionWitnessSet);
39610
- wasm.transactionwitnessset_add_all_witnesses(this.__wbg_ptr, other.__wbg_ptr);
39611
- }
39612
- /**
39613
- * @returns {LanguageList}
39614
- */
39615
- languages() {
39616
- const ret = wasm.transactionwitnessset_languages(this.__wbg_ptr);
39617
- return LanguageList.__wrap(ret);
39618
- }
39619
39621
  }
39620
39622
  module.exports.TransactionWitnessSet = TransactionWitnessSet;
39621
39623
 
@@ -44506,21 +44508,15 @@ class WithdrawalBuilderResult {
44506
44508
  }
44507
44509
  module.exports.WithdrawalBuilderResult = WithdrawalBuilderResult;
44508
44510
 
44509
- module.exports.__wbindgen_is_object = function(arg0) {
44510
- const val = getObject(arg0);
44511
- const ret = typeof(val) === 'object' && val !== null;
44512
- return ret;
44511
+ module.exports.__wbindgen_string_new = function(arg0, arg1) {
44512
+ const ret = getStringFromWasm0(arg0, arg1);
44513
+ return addHeapObject(ret);
44513
44514
  };
44514
44515
 
44515
44516
  module.exports.__wbindgen_object_drop_ref = function(arg0) {
44516
44517
  takeObject(arg0);
44517
44518
  };
44518
44519
 
44519
- module.exports.__wbindgen_string_new = function(arg0, arg1) {
44520
- const ret = getStringFromWasm0(arg0, arg1);
44521
- return addHeapObject(ret);
44522
- };
44523
-
44524
44520
  module.exports.__wbindgen_throw = function(arg0, arg1) {
44525
44521
  throw new Error(getStringFromWasm0(arg0, arg1));
44526
44522
  };
@@ -44530,14 +44526,10 @@ module.exports.__wbindgen_memory = function() {
44530
44526
  return addHeapObject(ret);
44531
44527
  };
44532
44528
 
44533
- module.exports.__wbg_new_a220cf903aa02ca2 = function() {
44534
- const ret = new Array();
44535
- return addHeapObject(ret);
44536
- };
44537
-
44538
- module.exports.__wbindgen_number_new = function(arg0) {
44539
- const ret = arg0;
44540
- return addHeapObject(ret);
44529
+ module.exports.__wbindgen_is_object = function(arg0) {
44530
+ const val = getObject(arg0);
44531
+ const ret = typeof(val) === 'object' && val !== null;
44532
+ return ret;
44541
44533
  };
44542
44534
 
44543
44535
  module.exports.__wbindgen_is_string = function(arg0) {
@@ -44560,6 +44552,16 @@ module.exports.__wbg_buffer_b7b08af79b0b0974 = function(arg0) {
44560
44552
  return addHeapObject(ret);
44561
44553
  };
44562
44554
 
44555
+ module.exports.__wbg_new_a220cf903aa02ca2 = function() {
44556
+ const ret = new Array();
44557
+ return addHeapObject(ret);
44558
+ };
44559
+
44560
+ module.exports.__wbindgen_number_new = function(arg0) {
44561
+ const ret = arg0;
44562
+ return addHeapObject(ret);
44563
+ };
44564
+
44563
44565
  module.exports.__wbg_newnoargs_76313bd6ff35d0f2 = function(arg0, arg1) {
44564
44566
  const ret = new Function(getStringFromWasm0(arg0, arg1));
44565
44567
  return addHeapObject(ret);