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

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.
@@ -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,10 +769,31 @@ function getArrayU64FromWasm0(ptr, len) {
767
769
  }
768
770
  /**
769
771
  */
772
+ module.exports.RedeemersKind = Object.freeze({ ArrLegacyRedeemer:0,"0":"ArrLegacyRedeemer",MapRedeemerKeyToRedeemerVal:1,"1":"MapRedeemerKeyToRedeemerVal", });
773
+ /**
774
+ */
775
+ module.exports.Language = Object.freeze({ PlutusV1:0,"0":"PlutusV1",PlutusV2:1,"1":"PlutusV2",PlutusV3:2,"2":"PlutusV3", });
776
+ /**
777
+ */
770
778
  module.exports.AuxiliaryDataKind = Object.freeze({ Shelley:0,"0":"Shelley",ShelleyMA:1,"1":"ShelleyMA",Conway:2,"2":"Conway", });
771
779
  /**
772
780
  */
773
- module.exports.RedeemersKind = Object.freeze({ ArrLegacyRedeemer:0,"0":"ArrLegacyRedeemer",MapRedeemerKeyToRedeemerVal:1,"1":"MapRedeemerKeyToRedeemerVal", });
781
+ module.exports.MetadataJsonSchema = Object.freeze({ NoConversions:0,"0":"NoConversions",BasicConversions:1,"1":"BasicConversions",DetailedSchema:2,"2":"DetailedSchema", });
782
+ /**
783
+ */
784
+ module.exports.ScriptKind = Object.freeze({ Native:0,"0":"Native",PlutusV1:1,"1":"PlutusV1",PlutusV2:2,"2":"PlutusV2",PlutusV3:3,"3":"PlutusV3", });
785
+ /**
786
+ * Careful: this enum doesn't include the network ID part of the header
787
+ * ex: base address isn't 0b0000_0000 but instead 0b0000
788
+ * Use `header_matches_kind` if you don't want to implement the bitwise operators yourself
789
+ */
790
+ 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", });
791
+ /**
792
+ */
793
+ 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", });
794
+ /**
795
+ */
796
+ module.exports.StakeDistributionKind = Object.freeze({ SingleKey:0,"0":"SingleKey",BootstrapEra:1,"1":"BootstrapEra", });
774
797
  /**
775
798
  */
776
799
  module.exports.Vote = Object.freeze({ No:0,"0":"No",Yes:1,"1":"Yes",Abstain:2,"2":"Abstain", });
@@ -795,28 +818,10 @@ LargestFirstMultiAsset:2,"2":"LargestFirstMultiAsset",
795
818
  RandomImproveMultiAsset:3,"3":"RandomImproveMultiAsset", });
796
819
  /**
797
820
  */
798
- module.exports.MetadataJsonSchema = Object.freeze({ NoConversions:0,"0":"NoConversions",BasicConversions:1,"1":"BasicConversions",DetailedSchema:2,"2":"DetailedSchema", });
799
- /**
800
- */
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", });
802
- /**
803
- */
804
- 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
- /**
806
- */
807
- module.exports.DelegationDistributionKind = Object.freeze({ Weighted:0,"0":"Weighted",Legacy:1,"1":"Legacy", });
808
- /**
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
- */
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", });
814
- /**
815
- */
816
- module.exports.ScriptKind = Object.freeze({ Native:0,"0":"Native",PlutusV1:1,"1":"PlutusV1",PlutusV2:2,"2":"PlutusV2",PlutusV3:3,"3":"PlutusV3", });
821
+ 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", });
817
822
  /**
818
823
  */
819
- module.exports.DRepKind = Object.freeze({ Key:0,"0":"Key",Script:1,"1":"Script",AlwaysAbstain:2,"2":"AlwaysAbstain",AlwaysNoConfidence:3,"3":"AlwaysNoConfidence", });
824
+ 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", });
820
825
  /**
821
826
  * JSON <-> PlutusData conversion schemas.
822
827
  * Follows ScriptDataJsonSchema in cardano-cli defined at:
@@ -870,19 +875,16 @@ BasicConversions:0,"0":"BasicConversions",
870
875
  DetailedSchema:1,"1":"DetailedSchema", });
871
876
  /**
872
877
  */
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", });
878
+ 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", });
877
879
  /**
878
880
  */
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", });
881
+ module.exports.ChunkableStringKind = Object.freeze({ Single:0,"0":"Single",Chunked:1,"1":"Chunked", });
880
882
  /**
881
883
  */
882
- module.exports.ChunkableStringKind = Object.freeze({ Single:0,"0":"Single",Chunked:1,"1":"Chunked", });
884
+ module.exports.DRepKind = Object.freeze({ Key:0,"0":"Key",Script:1,"1":"Script",AlwaysAbstain:2,"2":"AlwaysAbstain",AlwaysNoConfidence:3,"3":"AlwaysNoConfidence", });
883
885
  /**
884
886
  */
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", });
887
+ 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", });
886
888
  /**
887
889
  */
888
890
  module.exports.ByronAddrType = Object.freeze({ PublicKey:0,"0":"PublicKey",Script:1,"1":"Script",Redeem:2,"2":"Redeem", });
@@ -891,48 +893,48 @@ module.exports.ByronAddrType = Object.freeze({ PublicKey:0,"0":"PublicKey",Scrip
891
893
  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
894
  /**
893
895
  */
894
- module.exports.CredentialKind = Object.freeze({ PubKey:0,"0":"PubKey",Script:1,"1":"Script", });
896
+ 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", });
895
897
  /**
896
898
  */
897
- module.exports.StakeDistributionKind = Object.freeze({ SingleKey:0,"0":"SingleKey",BootstrapEra:1,"1":"BootstrapEra", });
899
+ module.exports.DelegationDistributionKind = Object.freeze({ Weighted:0,"0":"Weighted",Legacy:1,"1":"Legacy", });
898
900
  /**
899
901
  */
900
- module.exports.ChangeSelectionAlgo = Object.freeze({ Default:0,"0":"Default", });
902
+ module.exports.RelayKind = Object.freeze({ SingleHostAddr:0,"0":"SingleHostAddr",SingleHostName:1,"1":"SingleHostName",MultiHostName:2,"2":"MultiHostName", });
901
903
  /**
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
904
  */
906
- module.exports.CIP25Version = Object.freeze({
905
+ module.exports.CredentialKind = Object.freeze({ PubKey:0,"0":"PubKey",Script:1,"1":"Script", });
907
906
  /**
908
- * Initial version of CIP25 with only string (utf8) asset names allowed.
909
907
  */
910
- V1:0,"0":"V1",
908
+ module.exports.ChangeSelectionAlgo = Object.freeze({ Default:0,"0":"Default", });
911
909
  /**
912
- * Second version of CIP25. Supports any type of asset names.
913
910
  */
914
- V2:1,"1":"V2", });
911
+ module.exports.SpendingDataKind = Object.freeze({ SpendingDataPubKey:0,"0":"SpendingDataPubKey",SpendingDataScript:1,"1":"SpendingDataScript",SpendingDataRedeem:2,"2":"SpendingDataRedeem", });
915
912
  /**
916
913
  */
917
- module.exports.RelayKind = Object.freeze({ SingleHostAddr:0,"0":"SingleHostAddr",SingleHostName:1,"1":"SingleHostName",MultiHostName:2,"2":"MultiHostName", });
914
+ module.exports.TransactionOutputKind = Object.freeze({ AlonzoFormatTxOut:0,"0":"AlonzoFormatTxOut",ConwayFormatTxOut:1,"1":"ConwayFormatTxOut", });
918
915
  /**
919
916
  */
920
917
  module.exports.NonceKind = Object.freeze({ Identity:0,"0":"Identity",Hash:1,"1":"Hash", });
921
918
  /**
919
+ * Which version of the CIP25 spec to use. See CIP25 for details.
920
+ * This will change how things are encoded but for the most part contains
921
+ * the same information.
922
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", });
923
+ module.exports.CIP25Version = Object.freeze({
924
924
  /**
925
+ * Initial version of CIP25 with only string (utf8) asset names allowed.
925
926
  */
926
- module.exports.DatumOptionKind = Object.freeze({ Hash:0,"0":"Hash",Datum:1,"1":"Datum", });
927
+ V1:0,"0":"V1",
927
928
  /**
929
+ * Second version of CIP25. Supports any type of asset names.
928
930
  */
929
- module.exports.Language = Object.freeze({ PlutusV1:0,"0":"PlutusV1",PlutusV2:1,"1":"PlutusV2",PlutusV3:2,"2":"PlutusV3", });
931
+ V2:1,"1":"V2", });
930
932
  /**
931
933
  */
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", });
934
+ 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", });
933
935
  /**
934
936
  */
935
- module.exports.SpendingDataKind = Object.freeze({ SpendingDataPubKey:0,"0":"SpendingDataPubKey",SpendingDataScript:1,"1":"SpendingDataScript",SpendingDataRedeem:2,"2":"SpendingDataRedeem", });
937
+ module.exports.DatumOptionKind = Object.freeze({ Hash:0,"0":"Hash",Datum:1,"1":"Datum", });
936
938
 
937
939
  const AddrAttributesFinalization = (typeof FinalizationRegistry === 'undefined')
938
940
  ? { register: () => {}, unregister: () => {} }
@@ -2630,149 +2632,6 @@ class AssetName {
2630
2632
  }
2631
2633
  /**
2632
2634
  *
2633
- * * Create an AssetName from utf8 string. 64 byte (not char!) maximum.
2634
- *
2635
- * @param {string} utf8_str
2636
- * @returns {AssetName}
2637
- */
2638
- static from_str(utf8_str) {
2639
- try {
2640
- const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
2641
- const ptr0 = passStringToWasm0(utf8_str, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
2642
- const len0 = WASM_VECTOR_LEN;
2643
- wasm.assetname_from_str(retptr, ptr0, len0);
2644
- var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
2645
- var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
2646
- var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
2647
- if (r2) {
2648
- throw takeObject(r1);
2649
- }
2650
- return AssetName.__wrap(r0);
2651
- } finally {
2652
- wasm.__wbindgen_add_to_stack_pointer(16);
2653
- }
2654
- }
2655
- /**
2656
- *
2657
- * * AssetName as a utf8 string if it's possible. Will error if the asset is not utf8
2658
- *
2659
- * @returns {string}
2660
- */
2661
- to_str() {
2662
- let deferred2_0;
2663
- let deferred2_1;
2664
- try {
2665
- const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
2666
- wasm.assetname_to_str(retptr, this.__wbg_ptr);
2667
- var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
2668
- var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
2669
- var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
2670
- var r3 = getDataViewMemory0().getInt32(retptr + 4 * 3, true);
2671
- var ptr1 = r0;
2672
- var len1 = r1;
2673
- if (r3) {
2674
- ptr1 = 0; len1 = 0;
2675
- throw takeObject(r2);
2676
- }
2677
- deferred2_0 = ptr1;
2678
- deferred2_1 = len1;
2679
- return getStringFromWasm0(ptr1, len1);
2680
- } finally {
2681
- wasm.__wbindgen_add_to_stack_pointer(16);
2682
- wasm.__wbindgen_free(deferred2_0, deferred2_1, 1);
2683
- }
2684
- }
2685
- /**
2686
- *
2687
- * * Direct raw bytes without any CBOR structure
2688
- *
2689
- * @returns {Uint8Array}
2690
- */
2691
- to_raw_bytes() {
2692
- try {
2693
- const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
2694
- wasm.assetname_to_raw_bytes(retptr, this.__wbg_ptr);
2695
- var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
2696
- var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
2697
- var v1 = getArrayU8FromWasm0(r0, r1).slice();
2698
- wasm.__wbindgen_free(r0, r1 * 1, 1);
2699
- return v1;
2700
- } finally {
2701
- wasm.__wbindgen_add_to_stack_pointer(16);
2702
- }
2703
- }
2704
- /**
2705
- *
2706
- * * Parse from the direct raw bytes, without any CBOR structure
2707
- *
2708
- * @param {Uint8Array} bytes
2709
- * @returns {AssetName}
2710
- */
2711
- static from_raw_bytes(bytes) {
2712
- try {
2713
- const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
2714
- const ptr0 = passArray8ToWasm0(bytes, wasm.__wbindgen_malloc);
2715
- const len0 = WASM_VECTOR_LEN;
2716
- wasm.assetname_from_raw_bytes(retptr, ptr0, len0);
2717
- var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
2718
- var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
2719
- var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
2720
- if (r2) {
2721
- throw takeObject(r1);
2722
- }
2723
- return AssetName.__wrap(r0);
2724
- } finally {
2725
- wasm.__wbindgen_add_to_stack_pointer(16);
2726
- }
2727
- }
2728
- /**
2729
- *
2730
- * * Direct raw bytes without any CBOR structure, as a hex-encoded string
2731
- *
2732
- * @returns {string}
2733
- */
2734
- to_hex() {
2735
- let deferred1_0;
2736
- let deferred1_1;
2737
- try {
2738
- const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
2739
- wasm.assetname_to_hex(retptr, this.__wbg_ptr);
2740
- var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
2741
- var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
2742
- deferred1_0 = r0;
2743
- deferred1_1 = r1;
2744
- return getStringFromWasm0(r0, r1);
2745
- } finally {
2746
- wasm.__wbindgen_add_to_stack_pointer(16);
2747
- wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
2748
- }
2749
- }
2750
- /**
2751
- *
2752
- * * Parse from a hex string of the direct raw bytes, without any CBOR structure
2753
- *
2754
- * @param {string} input
2755
- * @returns {AssetName}
2756
- */
2757
- static from_hex(input) {
2758
- try {
2759
- const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
2760
- const ptr0 = passStringToWasm0(input, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
2761
- const len0 = WASM_VECTOR_LEN;
2762
- wasm.assetname_from_hex(retptr, ptr0, len0);
2763
- var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
2764
- var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
2765
- var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
2766
- if (r2) {
2767
- throw takeObject(r1);
2768
- }
2769
- return AssetName.__wrap(r0);
2770
- } finally {
2771
- wasm.__wbindgen_add_to_stack_pointer(16);
2772
- }
2773
- }
2774
- /**
2775
- *
2776
2635
  * * Serialize this type to CBOR bytes
2777
2636
  * * This type type supports encoding preservation so this will preserve round-trip CBOR formats.
2778
2637
  * * If created from scratch the CBOR will be canonical.
@@ -2972,6 +2831,149 @@ class AssetName {
2972
2831
  wasm.__wbindgen_add_to_stack_pointer(16);
2973
2832
  }
2974
2833
  }
2834
+ /**
2835
+ *
2836
+ * * Create an AssetName from utf8 string. 64 byte (not char!) maximum.
2837
+ *
2838
+ * @param {string} utf8_str
2839
+ * @returns {AssetName}
2840
+ */
2841
+ static from_str(utf8_str) {
2842
+ try {
2843
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
2844
+ const ptr0 = passStringToWasm0(utf8_str, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
2845
+ const len0 = WASM_VECTOR_LEN;
2846
+ wasm.assetname_from_str(retptr, ptr0, len0);
2847
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
2848
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
2849
+ var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
2850
+ if (r2) {
2851
+ throw takeObject(r1);
2852
+ }
2853
+ return AssetName.__wrap(r0);
2854
+ } finally {
2855
+ wasm.__wbindgen_add_to_stack_pointer(16);
2856
+ }
2857
+ }
2858
+ /**
2859
+ *
2860
+ * * AssetName as a utf8 string if it's possible. Will error if the asset is not utf8
2861
+ *
2862
+ * @returns {string}
2863
+ */
2864
+ to_str() {
2865
+ let deferred2_0;
2866
+ let deferred2_1;
2867
+ try {
2868
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
2869
+ wasm.assetname_to_str(retptr, this.__wbg_ptr);
2870
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
2871
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
2872
+ var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
2873
+ var r3 = getDataViewMemory0().getInt32(retptr + 4 * 3, true);
2874
+ var ptr1 = r0;
2875
+ var len1 = r1;
2876
+ if (r3) {
2877
+ ptr1 = 0; len1 = 0;
2878
+ throw takeObject(r2);
2879
+ }
2880
+ deferred2_0 = ptr1;
2881
+ deferred2_1 = len1;
2882
+ return getStringFromWasm0(ptr1, len1);
2883
+ } finally {
2884
+ wasm.__wbindgen_add_to_stack_pointer(16);
2885
+ wasm.__wbindgen_free(deferred2_0, deferred2_1, 1);
2886
+ }
2887
+ }
2888
+ /**
2889
+ *
2890
+ * * Direct raw bytes without any CBOR structure
2891
+ *
2892
+ * @returns {Uint8Array}
2893
+ */
2894
+ to_raw_bytes() {
2895
+ try {
2896
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
2897
+ wasm.assetname_to_raw_bytes(retptr, this.__wbg_ptr);
2898
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
2899
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
2900
+ var v1 = getArrayU8FromWasm0(r0, r1).slice();
2901
+ wasm.__wbindgen_free(r0, r1 * 1, 1);
2902
+ return v1;
2903
+ } finally {
2904
+ wasm.__wbindgen_add_to_stack_pointer(16);
2905
+ }
2906
+ }
2907
+ /**
2908
+ *
2909
+ * * Parse from the direct raw bytes, without any CBOR structure
2910
+ *
2911
+ * @param {Uint8Array} bytes
2912
+ * @returns {AssetName}
2913
+ */
2914
+ static from_raw_bytes(bytes) {
2915
+ try {
2916
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
2917
+ const ptr0 = passArray8ToWasm0(bytes, wasm.__wbindgen_malloc);
2918
+ const len0 = WASM_VECTOR_LEN;
2919
+ wasm.assetname_from_raw_bytes(retptr, ptr0, len0);
2920
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
2921
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
2922
+ var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
2923
+ if (r2) {
2924
+ throw takeObject(r1);
2925
+ }
2926
+ return AssetName.__wrap(r0);
2927
+ } finally {
2928
+ wasm.__wbindgen_add_to_stack_pointer(16);
2929
+ }
2930
+ }
2931
+ /**
2932
+ *
2933
+ * * Direct raw bytes without any CBOR structure, as a hex-encoded string
2934
+ *
2935
+ * @returns {string}
2936
+ */
2937
+ to_hex() {
2938
+ let deferred1_0;
2939
+ let deferred1_1;
2940
+ try {
2941
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
2942
+ wasm.assetname_to_hex(retptr, this.__wbg_ptr);
2943
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
2944
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
2945
+ deferred1_0 = r0;
2946
+ deferred1_1 = r1;
2947
+ return getStringFromWasm0(r0, r1);
2948
+ } finally {
2949
+ wasm.__wbindgen_add_to_stack_pointer(16);
2950
+ wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
2951
+ }
2952
+ }
2953
+ /**
2954
+ *
2955
+ * * Parse from a hex string of the direct raw bytes, without any CBOR structure
2956
+ *
2957
+ * @param {string} input
2958
+ * @returns {AssetName}
2959
+ */
2960
+ static from_hex(input) {
2961
+ try {
2962
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
2963
+ const ptr0 = passStringToWasm0(input, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
2964
+ const len0 = WASM_VECTOR_LEN;
2965
+ wasm.assetname_from_hex(retptr, ptr0, len0);
2966
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
2967
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
2968
+ var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
2969
+ if (r2) {
2970
+ throw takeObject(r1);
2971
+ }
2972
+ return AssetName.__wrap(r0);
2973
+ } finally {
2974
+ wasm.__wbindgen_add_to_stack_pointer(16);
2975
+ }
2976
+ }
2975
2977
  }
2976
2978
  module.exports.AssetName = AssetName;
2977
2979
 
@@ -3315,6 +3317,84 @@ class AuxiliaryData {
3315
3317
  wasm.__wbg_auxiliarydata_free(ptr, 0);
3316
3318
  }
3317
3319
  /**
3320
+ * @returns {AuxiliaryData}
3321
+ */
3322
+ static new() {
3323
+ const ret = wasm.auxiliarydata_new();
3324
+ return AuxiliaryData.__wrap(ret);
3325
+ }
3326
+ /**
3327
+ * @returns {Metadata | undefined}
3328
+ */
3329
+ metadata() {
3330
+ const ret = wasm.auxiliarydata_metadata(this.__wbg_ptr);
3331
+ return ret === 0 ? undefined : Metadata.__wrap(ret);
3332
+ }
3333
+ /**
3334
+ * @returns {NativeScriptList | undefined}
3335
+ */
3336
+ native_scripts() {
3337
+ const ret = wasm.auxiliarydata_native_scripts(this.__wbg_ptr);
3338
+ return ret === 0 ? undefined : NativeScriptList.__wrap(ret);
3339
+ }
3340
+ /**
3341
+ * @returns {PlutusV1ScriptList | undefined}
3342
+ */
3343
+ plutus_v1_scripts() {
3344
+ const ret = wasm.auxiliarydata_plutus_v1_scripts(this.__wbg_ptr);
3345
+ return ret === 0 ? undefined : PlutusV1ScriptList.__wrap(ret);
3346
+ }
3347
+ /**
3348
+ * @returns {PlutusV2ScriptList | undefined}
3349
+ */
3350
+ plutus_v2_scripts() {
3351
+ const ret = wasm.auxiliarydata_plutus_v2_scripts(this.__wbg_ptr);
3352
+ return ret === 0 ? undefined : PlutusV2ScriptList.__wrap(ret);
3353
+ }
3354
+ /**
3355
+ * Warning: overwrites any conflicting metadatum labels present
3356
+ * @param {Metadata} other
3357
+ */
3358
+ add_metadata(other) {
3359
+ _assertClass(other, Metadata);
3360
+ wasm.auxiliarydata_add_metadata(this.__wbg_ptr, other.__wbg_ptr);
3361
+ }
3362
+ /**
3363
+ * Warning: does not check for duplicates and may migrate eras
3364
+ * @param {NativeScriptList} scripts
3365
+ */
3366
+ add_native_scripts(scripts) {
3367
+ _assertClass(scripts, NativeScriptList);
3368
+ wasm.auxiliarydata_add_native_scripts(this.__wbg_ptr, scripts.__wbg_ptr);
3369
+ }
3370
+ /**
3371
+ * Warning: does not check for duplicates and may migrate eras
3372
+ * @param {PlutusV1ScriptList} scripts
3373
+ */
3374
+ add_plutus_v1_scripts(scripts) {
3375
+ _assertClass(scripts, PlutusV1ScriptList);
3376
+ wasm.auxiliarydata_add_plutus_v1_scripts(this.__wbg_ptr, scripts.__wbg_ptr);
3377
+ }
3378
+ /**
3379
+ * Warning: does not check for duplicates and may migrate eras
3380
+ * @param {PlutusV2ScriptList} scripts
3381
+ */
3382
+ add_plutus_v2_scripts(scripts) {
3383
+ _assertClass(scripts, PlutusV2ScriptList);
3384
+ wasm.auxiliarydata_add_plutus_v2_scripts(this.__wbg_ptr, scripts.__wbg_ptr);
3385
+ }
3386
+ /**
3387
+ * Adds everything present in other to self
3388
+ * May change the era the aux data is in if necessary
3389
+ * Warning: overwrites any metadatum labels present
3390
+ * also does not check for duplicates in scripts
3391
+ * @param {AuxiliaryData} other
3392
+ */
3393
+ add(other) {
3394
+ _assertClass(other, AuxiliaryData);
3395
+ wasm.auxiliarydata_add(this.__wbg_ptr, other.__wbg_ptr);
3396
+ }
3397
+ /**
3318
3398
  *
3319
3399
  * * Serialize this type to CBOR bytes
3320
3400
  * * This type type supports encoding preservation so this will preserve round-trip CBOR formats.
@@ -3570,84 +3650,6 @@ class AuxiliaryData {
3570
3650
  const ret = wasm.auxiliarydata_as_conway(this.__wbg_ptr);
3571
3651
  return ret === 0 ? undefined : ConwayFormatAuxData.__wrap(ret);
3572
3652
  }
3573
- /**
3574
- * @returns {AuxiliaryData}
3575
- */
3576
- static new() {
3577
- const ret = wasm.auxiliarydata_new();
3578
- return AuxiliaryData.__wrap(ret);
3579
- }
3580
- /**
3581
- * @returns {Metadata | undefined}
3582
- */
3583
- metadata() {
3584
- const ret = wasm.auxiliarydata_metadata(this.__wbg_ptr);
3585
- return ret === 0 ? undefined : Metadata.__wrap(ret);
3586
- }
3587
- /**
3588
- * @returns {NativeScriptList | undefined}
3589
- */
3590
- native_scripts() {
3591
- const ret = wasm.auxiliarydata_native_scripts(this.__wbg_ptr);
3592
- return ret === 0 ? undefined : NativeScriptList.__wrap(ret);
3593
- }
3594
- /**
3595
- * @returns {PlutusV1ScriptList | undefined}
3596
- */
3597
- plutus_v1_scripts() {
3598
- const ret = wasm.auxiliarydata_plutus_v1_scripts(this.__wbg_ptr);
3599
- return ret === 0 ? undefined : PlutusV1ScriptList.__wrap(ret);
3600
- }
3601
- /**
3602
- * @returns {PlutusV2ScriptList | undefined}
3603
- */
3604
- plutus_v2_scripts() {
3605
- const ret = wasm.auxiliarydata_plutus_v2_scripts(this.__wbg_ptr);
3606
- return ret === 0 ? undefined : PlutusV2ScriptList.__wrap(ret);
3607
- }
3608
- /**
3609
- * Warning: overwrites any conflicting metadatum labels present
3610
- * @param {Metadata} other
3611
- */
3612
- add_metadata(other) {
3613
- _assertClass(other, Metadata);
3614
- wasm.auxiliarydata_add_metadata(this.__wbg_ptr, other.__wbg_ptr);
3615
- }
3616
- /**
3617
- * Warning: does not check for duplicates and may migrate eras
3618
- * @param {NativeScriptList} scripts
3619
- */
3620
- add_native_scripts(scripts) {
3621
- _assertClass(scripts, NativeScriptList);
3622
- wasm.auxiliarydata_add_native_scripts(this.__wbg_ptr, scripts.__wbg_ptr);
3623
- }
3624
- /**
3625
- * Warning: does not check for duplicates and may migrate eras
3626
- * @param {PlutusV1ScriptList} scripts
3627
- */
3628
- add_plutus_v1_scripts(scripts) {
3629
- _assertClass(scripts, PlutusV1ScriptList);
3630
- wasm.auxiliarydata_add_plutus_v1_scripts(this.__wbg_ptr, scripts.__wbg_ptr);
3631
- }
3632
- /**
3633
- * Warning: does not check for duplicates and may migrate eras
3634
- * @param {PlutusV2ScriptList} scripts
3635
- */
3636
- add_plutus_v2_scripts(scripts) {
3637
- _assertClass(scripts, PlutusV2ScriptList);
3638
- wasm.auxiliarydata_add_plutus_v2_scripts(this.__wbg_ptr, scripts.__wbg_ptr);
3639
- }
3640
- /**
3641
- * Adds everything present in other to self
3642
- * May change the era the aux data is in if necessary
3643
- * Warning: overwrites any metadatum labels present
3644
- * also does not check for duplicates in scripts
3645
- * @param {AuxiliaryData} other
3646
- */
3647
- add(other) {
3648
- _assertClass(other, AuxiliaryData);
3649
- wasm.auxiliarydata_add(this.__wbg_ptr, other.__wbg_ptr);
3650
- }
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,6 +38568,74 @@ class TransactionOutput {
38566
38568
  wasm.__wbg_transactionoutput_free(ptr, 0);
38567
38569
  }
38568
38570
  /**
38571
+ * @param {Address} address
38572
+ * @param {Value} amount
38573
+ * @param {DatumOption | undefined} [datum_option]
38574
+ * @param {Script | undefined} [script_reference]
38575
+ * @returns {TransactionOutput}
38576
+ */
38577
+ static new(address, amount, datum_option, script_reference) {
38578
+ _assertClass(address, Address);
38579
+ _assertClass(amount, Value);
38580
+ let ptr0 = 0;
38581
+ if (!isLikeNone(datum_option)) {
38582
+ _assertClass(datum_option, DatumOption);
38583
+ ptr0 = datum_option.__destroy_into_raw();
38584
+ }
38585
+ let ptr1 = 0;
38586
+ if (!isLikeNone(script_reference)) {
38587
+ _assertClass(script_reference, Script);
38588
+ ptr1 = script_reference.__destroy_into_raw();
38589
+ }
38590
+ const ret = wasm.transactionoutput_new(address.__wbg_ptr, amount.__wbg_ptr, ptr0, ptr1);
38591
+ return TransactionOutput.__wrap(ret);
38592
+ }
38593
+ /**
38594
+ * @returns {Address}
38595
+ */
38596
+ address() {
38597
+ const ret = wasm.transactionoutput_address(this.__wbg_ptr);
38598
+ return Address.__wrap(ret);
38599
+ }
38600
+ /**
38601
+ * @returns {Value}
38602
+ */
38603
+ amount() {
38604
+ const ret = wasm.transactionoutput_amount(this.__wbg_ptr);
38605
+ return Value.__wrap(ret);
38606
+ }
38607
+ /**
38608
+ * @param {Value} amount
38609
+ */
38610
+ set_amount(amount) {
38611
+ _assertClass(amount, Value);
38612
+ wasm.transactionoutput_set_amount(this.__wbg_ptr, amount.__wbg_ptr);
38613
+ }
38614
+ /**
38615
+ * @returns {DatumOption | undefined}
38616
+ */
38617
+ datum() {
38618
+ const ret = wasm.transactionoutput_datum(this.__wbg_ptr);
38619
+ return ret === 0 ? undefined : DatumOption.__wrap(ret);
38620
+ }
38621
+ /**
38622
+ * Get the datum hash from a tx output if present as a hash.
38623
+ * Returns None if there is no datum, or the datum is inlined.
38624
+ * Use TransactionOutput::datum() for inlined datums.
38625
+ * @returns {DatumHash | undefined}
38626
+ */
38627
+ datum_hash() {
38628
+ const ret = wasm.transactionoutput_datum_hash(this.__wbg_ptr);
38629
+ return ret === 0 ? undefined : DatumHash.__wrap(ret);
38630
+ }
38631
+ /**
38632
+ * @returns {Script | undefined}
38633
+ */
38634
+ script_ref() {
38635
+ const ret = wasm.transactionoutput_script_ref(this.__wbg_ptr);
38636
+ return ret === 0 ? undefined : Script.__wrap(ret);
38637
+ }
38638
+ /**
38569
38639
  *
38570
38640
  * * Serialize this type to CBOR bytes
38571
38641
  * * This type type supports encoding preservation so this will preserve round-trip CBOR formats.
@@ -38805,74 +38875,6 @@ class TransactionOutput {
38805
38875
  const ret = wasm.transactionoutput_as_conway_format_tx_out(this.__wbg_ptr);
38806
38876
  return ret === 0 ? undefined : ConwayFormatTxOut.__wrap(ret);
38807
38877
  }
38808
- /**
38809
- * @param {Address} address
38810
- * @param {Value} amount
38811
- * @param {DatumOption | undefined} [datum_option]
38812
- * @param {Script | undefined} [script_reference]
38813
- * @returns {TransactionOutput}
38814
- */
38815
- static new(address, amount, datum_option, script_reference) {
38816
- _assertClass(address, Address);
38817
- _assertClass(amount, Value);
38818
- let ptr0 = 0;
38819
- if (!isLikeNone(datum_option)) {
38820
- _assertClass(datum_option, DatumOption);
38821
- ptr0 = datum_option.__destroy_into_raw();
38822
- }
38823
- let ptr1 = 0;
38824
- if (!isLikeNone(script_reference)) {
38825
- _assertClass(script_reference, Script);
38826
- ptr1 = script_reference.__destroy_into_raw();
38827
- }
38828
- const ret = wasm.transactionoutput_new(address.__wbg_ptr, amount.__wbg_ptr, ptr0, ptr1);
38829
- return TransactionOutput.__wrap(ret);
38830
- }
38831
- /**
38832
- * @returns {Address}
38833
- */
38834
- address() {
38835
- const ret = wasm.transactionoutput_address(this.__wbg_ptr);
38836
- return Address.__wrap(ret);
38837
- }
38838
- /**
38839
- * @returns {Value}
38840
- */
38841
- amount() {
38842
- const ret = wasm.transactionoutput_amount(this.__wbg_ptr);
38843
- return Value.__wrap(ret);
38844
- }
38845
- /**
38846
- * @param {Value} amount
38847
- */
38848
- set_amount(amount) {
38849
- _assertClass(amount, Value);
38850
- wasm.transactionoutput_set_amount(this.__wbg_ptr, amount.__wbg_ptr);
38851
- }
38852
- /**
38853
- * @returns {DatumOption | undefined}
38854
- */
38855
- datum() {
38856
- const ret = wasm.transactionoutput_datum(this.__wbg_ptr);
38857
- return ret === 0 ? undefined : DatumOption.__wrap(ret);
38858
- }
38859
- /**
38860
- * Get the datum hash from a tx output if present as a hash.
38861
- * Returns None if there is no datum, or the datum is inlined.
38862
- * Use TransactionOutput::datum() for inlined datums.
38863
- * @returns {DatumHash | undefined}
38864
- */
38865
- datum_hash() {
38866
- const ret = wasm.transactionoutput_datum_hash(this.__wbg_ptr);
38867
- return ret === 0 ? undefined : DatumHash.__wrap(ret);
38868
- }
38869
- /**
38870
- * @returns {Script | undefined}
38871
- */
38872
- script_ref() {
38873
- const ret = wasm.transactionoutput_script_ref(this.__wbg_ptr);
38874
- return ret === 0 ? undefined : Script.__wrap(ret);
38875
- }
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,12 +44508,6 @@ 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;
44513
- };
44514
-
44515
44511
  module.exports.__wbindgen_object_drop_ref = function(arg0) {
44516
44512
  takeObject(arg0);
44517
44513
  };
@@ -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);