@anastasia-labs/cardano-multiplatform-lib-browser 6.0.1-2 → 6.0.2-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.
@@ -189,122 +189,25 @@ export function encode_json_str_to_plutus_datum(json: string, schema: CardanoNod
189
189
  export function decode_plutus_datum_to_json_str(datum: PlutusData, schema: CardanoNodePlutusDatumSchema): string;
190
190
  /**
191
191
  */
192
- export enum ChunkableStringKind {
193
- Single = 0,
194
- Chunked = 1,
195
- }
196
- /**
197
- */
198
- export enum NativeScriptKind {
199
- ScriptPubkey = 0,
200
- ScriptAll = 1,
201
- ScriptAny = 2,
202
- ScriptNOfK = 3,
203
- ScriptInvalidBefore = 4,
204
- ScriptInvalidHereafter = 5,
205
- }
206
- /**
207
- */
208
- export enum NonceKind {
209
- Identity = 0,
210
- Hash = 1,
211
- }
212
- /**
213
- */
214
- export enum DRepKind {
215
- Key = 0,
216
- Script = 1,
217
- AlwaysAbstain = 2,
218
- AlwaysNoConfidence = 3,
219
- }
220
- /**
221
- */
222
- export enum GovActionKind {
223
- ParameterChangeAction = 0,
224
- HardForkInitiationAction = 1,
225
- TreasuryWithdrawalsAction = 2,
226
- NoConfidence = 3,
227
- UpdateCommittee = 4,
228
- NewConstitution = 5,
229
- InfoAction = 6,
230
- }
231
- /**
232
- */
233
- export enum AddressKind {
234
- Base = 0,
235
- Ptr = 1,
236
- Enterprise = 2,
237
- Reward = 3,
238
- Byron = 4,
239
- }
240
- /**
241
- */
242
- export enum ChangeSelectionAlgo {
243
- Default = 0,
244
- }
245
- /**
246
- */
247
- export enum ScriptKind {
248
- Native = 0,
249
- PlutusV1 = 1,
250
- PlutusV2 = 2,
251
- PlutusV3 = 3,
252
- }
253
- /**
254
- */
255
- export enum Language {
256
- PlutusV1 = 0,
257
- PlutusV2 = 1,
258
- PlutusV3 = 2,
259
- }
260
- /**
261
- * Which version of the CIP25 spec to use. See CIP25 for details.
262
- * This will change how things are encoded but for the most part contains
263
- * the same information.
264
- */
265
- export enum CIP25Version {
266
- /**
267
- * Initial version of CIP25 with only string (utf8) asset names allowed.
268
- */
269
- V1 = 0,
270
- /**
271
- * Second version of CIP25. Supports any type of asset names.
272
- */
273
- V2 = 1,
274
- }
275
- /**
276
- * Careful: this enum doesn't include the network ID part of the header
277
- * ex: base address isn't 0b0000_0000 but instead 0b0000
278
- * Use `header_matches_kind` if you don't want to implement the bitwise operators yourself
279
- */
280
- export enum AddressHeaderKind {
281
- BasePaymentKeyStakeKey = 0,
282
- BasePaymentScriptStakeKey = 1,
283
- BasePaymentKeyStakeScript = 2,
284
- BasePaymentScriptStakeScript = 3,
285
- PointerKey = 4,
286
- PointerScript = 5,
287
- EnterpriseKey = 6,
288
- EnterpriseScript = 7,
289
- Byron = 8,
290
- RewardKey = 14,
291
- RewardScript = 15,
192
+ export enum PlutusDataKind {
193
+ ConstrPlutusData = 0,
194
+ Map = 1,
195
+ List = 2,
196
+ Integer = 3,
197
+ Bytes = 4,
292
198
  }
293
199
  /**
294
200
  */
295
- export enum VoterKind {
296
- ConstitutionalCommitteeHotKeyHash = 0,
297
- ConstitutionalCommitteeHotScriptHash = 1,
298
- DRepKeyHash = 2,
299
- DRepScriptHash = 3,
300
- StakingPoolKeyHash = 4,
201
+ export enum MetadataJsonSchema {
202
+ NoConversions = 0,
203
+ BasicConversions = 1,
204
+ DetailedSchema = 2,
301
205
  }
302
206
  /**
303
207
  */
304
- export enum ByronAddrType {
305
- PublicKey = 0,
306
- Script = 1,
307
- Redeem = 2,
208
+ export enum TransactionOutputKind {
209
+ AlonzoFormatTxOut = 0,
210
+ ConwayFormatTxOut = 1,
308
211
  }
309
212
  /**
310
213
  */
@@ -329,54 +232,32 @@ export enum CertificateKind {
329
232
  }
330
233
  /**
331
234
  */
332
- export enum StakeDistributionKind {
333
- SingleKey = 0,
334
- BootstrapEra = 1,
335
- }
336
- /**
337
- */
338
- export enum CoinSelectionStrategyCIP2 {
339
- /**
340
- * Performs CIP2's Largest First ada-only selection. Will error if outputs contain non-ADA assets.
341
- */
342
- LargestFirst = 0,
343
- /**
344
- * Performs CIP2's Random Improve ada-only selection. Will error if outputs contain non-ADA assets.
345
- */
346
- RandomImprove = 1,
347
- /**
348
- * Same as LargestFirst, but before adding ADA, will insert by largest-first for each asset type.
349
- */
350
- LargestFirstMultiAsset = 2,
351
- /**
352
- * Same as RandomImprove, but before adding ADA, will insert by random-improve for each asset type.
353
- */
354
- RandomImproveMultiAsset = 3,
355
- }
356
- /**
357
- */
358
- export enum DelegationDistributionKind {
359
- Weighted = 0,
360
- Legacy = 1,
361
- }
362
- /**
363
- */
364
235
  export enum CredentialKind {
365
236
  PubKey = 0,
366
237
  Script = 1,
367
238
  }
368
239
  /**
369
240
  */
370
- export enum RelayKind {
371
- SingleHostAddr = 0,
372
- SingleHostName = 1,
373
- MultiHostName = 2,
241
+ export enum NonceKind {
242
+ Identity = 0,
243
+ Hash = 1,
374
244
  }
375
245
  /**
376
246
  */
377
- export enum DatumOptionKind {
378
- Hash = 0,
379
- Datum = 1,
247
+ export enum VoterKind {
248
+ ConstitutionalCommitteeHotKeyHash = 0,
249
+ ConstitutionalCommitteeHotScriptHash = 1,
250
+ DRepKeyHash = 2,
251
+ DRepScriptHash = 3,
252
+ StakingPoolKeyHash = 4,
253
+ }
254
+ /**
255
+ */
256
+ export enum ScriptKind {
257
+ Native = 0,
258
+ PlutusV1 = 1,
259
+ PlutusV2 = 2,
260
+ PlutusV3 = 3,
380
261
  }
381
262
  /**
382
263
  * JSON <-> PlutusData conversion schemas.
@@ -432,52 +313,53 @@ export enum CardanoNodePlutusDatumSchema {
432
313
  }
433
314
  /**
434
315
  */
435
- export enum TransactionOutputKind {
436
- AlonzoFormatTxOut = 0,
437
- ConwayFormatTxOut = 1,
316
+ export enum DRepKind {
317
+ Key = 0,
318
+ Script = 1,
319
+ AlwaysAbstain = 2,
320
+ AlwaysNoConfidence = 3,
438
321
  }
439
322
  /**
440
323
  */
441
- export enum RedeemersKind {
442
- ArrLegacyRedeemer = 0,
443
- MapRedeemerKeyToRedeemerVal = 1,
324
+ export enum AuxiliaryDataKind {
325
+ Shelley = 0,
326
+ ShelleyMA = 1,
327
+ Conway = 2,
444
328
  }
445
329
  /**
446
330
  */
447
- export enum MetadataJsonSchema {
448
- NoConversions = 0,
449
- BasicConversions = 1,
450
- DetailedSchema = 2,
331
+ export enum RedeemerTag {
332
+ Spend = 0,
333
+ Mint = 1,
334
+ Cert = 2,
335
+ Reward = 3,
336
+ Voting = 4,
337
+ Proposing = 5,
451
338
  }
452
339
  /**
340
+ * Which version of the CIP25 spec to use. See CIP25 for details.
341
+ * This will change how things are encoded but for the most part contains
342
+ * the same information.
453
343
  */
454
- export enum SpendingDataKind {
455
- SpendingDataPubKey = 0,
456
- SpendingDataScript = 1,
457
- SpendingDataRedeem = 2,
458
- }
344
+ export enum CIP25Version {
459
345
  /**
346
+ * Initial version of CIP25 with only string (utf8) asset names allowed.
460
347
  */
461
- export enum Vote {
462
- No = 0,
463
- Yes = 1,
464
- Abstain = 2,
465
- }
348
+ V1 = 0,
466
349
  /**
350
+ * Second version of CIP25. Supports any type of asset names.
467
351
  */
468
- export enum AuxiliaryDataKind {
469
- Shelley = 0,
470
- ShelleyMA = 1,
471
- Conway = 2,
352
+ V2 = 1,
472
353
  }
473
354
  /**
474
355
  */
475
- export enum PlutusDataKind {
476
- ConstrPlutusData = 0,
477
- Map = 1,
478
- List = 2,
479
- Integer = 3,
480
- Bytes = 4,
356
+ export enum NativeScriptKind {
357
+ ScriptPubkey = 0,
358
+ ScriptAll = 1,
359
+ ScriptAny = 2,
360
+ ScriptNOfK = 3,
361
+ ScriptInvalidBefore = 4,
362
+ ScriptInvalidHereafter = 5,
481
363
  }
482
364
  /**
483
365
  */
@@ -490,13 +372,131 @@ export enum TransactionMetadatumKind {
490
372
  }
491
373
  /**
492
374
  */
493
- export enum RedeemerTag {
494
- Spend = 0,
495
- Mint = 1,
496
- Cert = 2,
375
+ export enum DatumOptionKind {
376
+ Hash = 0,
377
+ Datum = 1,
378
+ }
379
+ /**
380
+ */
381
+ export enum Language {
382
+ PlutusV1 = 0,
383
+ PlutusV2 = 1,
384
+ PlutusV3 = 2,
385
+ }
386
+ /**
387
+ */
388
+ export enum RelayKind {
389
+ SingleHostAddr = 0,
390
+ SingleHostName = 1,
391
+ MultiHostName = 2,
392
+ }
393
+ /**
394
+ */
395
+ export enum DelegationDistributionKind {
396
+ Weighted = 0,
397
+ Legacy = 1,
398
+ }
399
+ /**
400
+ * Careful: this enum doesn't include the network ID part of the header
401
+ * ex: base address isn't 0b0000_0000 but instead 0b0000
402
+ * Use `header_matches_kind` if you don't want to implement the bitwise operators yourself
403
+ */
404
+ export enum AddressHeaderKind {
405
+ BasePaymentKeyStakeKey = 0,
406
+ BasePaymentScriptStakeKey = 1,
407
+ BasePaymentKeyStakeScript = 2,
408
+ BasePaymentScriptStakeScript = 3,
409
+ PointerKey = 4,
410
+ PointerScript = 5,
411
+ EnterpriseKey = 6,
412
+ EnterpriseScript = 7,
413
+ Byron = 8,
414
+ RewardKey = 14,
415
+ RewardScript = 15,
416
+ }
417
+ /**
418
+ */
419
+ export enum ChunkableStringKind {
420
+ Single = 0,
421
+ Chunked = 1,
422
+ }
423
+ /**
424
+ */
425
+ export enum SpendingDataKind {
426
+ SpendingDataPubKey = 0,
427
+ SpendingDataScript = 1,
428
+ SpendingDataRedeem = 2,
429
+ }
430
+ /**
431
+ */
432
+ export enum ByronAddrType {
433
+ PublicKey = 0,
434
+ Script = 1,
435
+ Redeem = 2,
436
+ }
437
+ /**
438
+ */
439
+ export enum RedeemersKind {
440
+ ArrLegacyRedeemer = 0,
441
+ MapRedeemerKeyToRedeemerVal = 1,
442
+ }
443
+ /**
444
+ */
445
+ export enum CoinSelectionStrategyCIP2 {
446
+ /**
447
+ * Performs CIP2's Largest First ada-only selection. Will error if outputs contain non-ADA assets.
448
+ */
449
+ LargestFirst = 0,
450
+ /**
451
+ * Performs CIP2's Random Improve ada-only selection. Will error if outputs contain non-ADA assets.
452
+ */
453
+ RandomImprove = 1,
454
+ /**
455
+ * Same as LargestFirst, but before adding ADA, will insert by largest-first for each asset type.
456
+ */
457
+ LargestFirstMultiAsset = 2,
458
+ /**
459
+ * Same as RandomImprove, but before adding ADA, will insert by random-improve for each asset type.
460
+ */
461
+ RandomImproveMultiAsset = 3,
462
+ }
463
+ /**
464
+ */
465
+ export enum StakeDistributionKind {
466
+ SingleKey = 0,
467
+ BootstrapEra = 1,
468
+ }
469
+ /**
470
+ */
471
+ export enum ChangeSelectionAlgo {
472
+ Default = 0,
473
+ }
474
+ /**
475
+ */
476
+ export enum GovActionKind {
477
+ ParameterChangeAction = 0,
478
+ HardForkInitiationAction = 1,
479
+ TreasuryWithdrawalsAction = 2,
480
+ NoConfidence = 3,
481
+ UpdateCommittee = 4,
482
+ NewConstitution = 5,
483
+ InfoAction = 6,
484
+ }
485
+ /**
486
+ */
487
+ export enum AddressKind {
488
+ Base = 0,
489
+ Ptr = 1,
490
+ Enterprise = 2,
497
491
  Reward = 3,
498
- Voting = 4,
499
- Proposing = 5,
492
+ Byron = 4,
493
+ }
494
+ /**
495
+ */
496
+ export enum Vote {
497
+ No = 0,
498
+ Yes = 1,
499
+ Abstain = 2,
500
500
  }
501
501
  /**
502
502
  */
@@ -7597,6 +7597,25 @@ export class PlutusData {
7597
7597
  free(): void;
7598
7598
  /**
7599
7599
  *
7600
+ * * Convert to a Datum that will serialize equivalent to cardano-node's format
7601
+ * *
7602
+ * * Please VERY STRONGLY consider using PlutusData::from_cbor_bytes() instead wherever possible.
7603
+ * * You should try to never rely on a tool encoding CBOR a certain way as there are many possible,
7604
+ * * and just because it matches with a specific datum, doesn't mean that a different datum won't differ.
7605
+ * * This is critical as that means the datum hash won't match.
7606
+ * * After creation a datum (or other hashable CBOR object) should only be treated as raw CBOR bytes,
7607
+ * * or through a type that respects its specific CBOR format e.g. CML's PlutusData::from_cbor_bytes()
7608
+ * *
7609
+ * * This function is just here in case there's no possible way at all to create from CBOR bytes and
7610
+ * * thus cold only be constructed manually and then had this function called on it.
7611
+ * *
7612
+ * * This is also the format that CSL and Lucid use
7613
+ *
7614
+ * @returns {PlutusData}
7615
+ */
7616
+ to_cardano_node_format(): PlutusData;
7617
+ /**
7618
+ *
7600
7619
  * * Serialize this type to CBOR bytes
7601
7620
  * * This type type supports encoding preservation so this will preserve round-trip CBOR formats.
7602
7621
  * * If created from scratch the CBOR will be canonical.
@@ -773,94 +773,28 @@ function getArrayU64FromWasm0(ptr, len) {
773
773
  }
774
774
  /**
775
775
  */
776
- export const ChunkableStringKind = Object.freeze({ Single:0,"0":"Single",Chunked:1,"1":"Chunked", });
777
- /**
778
- */
779
- export const 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", });
780
- /**
781
- */
782
- export const NonceKind = Object.freeze({ Identity:0,"0":"Identity",Hash:1,"1":"Hash", });
783
- /**
784
- */
785
- export const DRepKind = Object.freeze({ Key:0,"0":"Key",Script:1,"1":"Script",AlwaysAbstain:2,"2":"AlwaysAbstain",AlwaysNoConfidence:3,"3":"AlwaysNoConfidence", });
786
- /**
787
- */
788
- export const 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", });
789
- /**
790
- */
791
- export const AddressKind = Object.freeze({ Base:0,"0":"Base",Ptr:1,"1":"Ptr",Enterprise:2,"2":"Enterprise",Reward:3,"3":"Reward",Byron:4,"4":"Byron", });
792
- /**
793
- */
794
- export const ChangeSelectionAlgo = Object.freeze({ Default:0,"0":"Default", });
795
- /**
796
- */
797
- export const ScriptKind = Object.freeze({ Native:0,"0":"Native",PlutusV1:1,"1":"PlutusV1",PlutusV2:2,"2":"PlutusV2",PlutusV3:3,"3":"PlutusV3", });
798
- /**
799
- */
800
- export const Language = Object.freeze({ PlutusV1:0,"0":"PlutusV1",PlutusV2:1,"1":"PlutusV2",PlutusV3:2,"2":"PlutusV3", });
801
- /**
802
- * Which version of the CIP25 spec to use. See CIP25 for details.
803
- * This will change how things are encoded but for the most part contains
804
- * the same information.
805
- */
806
- export const CIP25Version = Object.freeze({
807
- /**
808
- * Initial version of CIP25 with only string (utf8) asset names allowed.
809
- */
810
- V1:0,"0":"V1",
811
- /**
812
- * Second version of CIP25. Supports any type of asset names.
813
- */
814
- V2:1,"1":"V2", });
815
- /**
816
- * Careful: this enum doesn't include the network ID part of the header
817
- * ex: base address isn't 0b0000_0000 but instead 0b0000
818
- * Use `header_matches_kind` if you don't want to implement the bitwise operators yourself
819
- */
820
- export const 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", });
776
+ export const PlutusDataKind = Object.freeze({ ConstrPlutusData:0,"0":"ConstrPlutusData",Map:1,"1":"Map",List:2,"2":"List",Integer:3,"3":"Integer",Bytes:4,"4":"Bytes", });
821
777
  /**
822
778
  */
823
- export const VoterKind = Object.freeze({ ConstitutionalCommitteeHotKeyHash:0,"0":"ConstitutionalCommitteeHotKeyHash",ConstitutionalCommitteeHotScriptHash:1,"1":"ConstitutionalCommitteeHotScriptHash",DRepKeyHash:2,"2":"DRepKeyHash",DRepScriptHash:3,"3":"DRepScriptHash",StakingPoolKeyHash:4,"4":"StakingPoolKeyHash", });
779
+ export const MetadataJsonSchema = Object.freeze({ NoConversions:0,"0":"NoConversions",BasicConversions:1,"1":"BasicConversions",DetailedSchema:2,"2":"DetailedSchema", });
824
780
  /**
825
781
  */
826
- export const ByronAddrType = Object.freeze({ PublicKey:0,"0":"PublicKey",Script:1,"1":"Script",Redeem:2,"2":"Redeem", });
782
+ export const TransactionOutputKind = Object.freeze({ AlonzoFormatTxOut:0,"0":"AlonzoFormatTxOut",ConwayFormatTxOut:1,"1":"ConwayFormatTxOut", });
827
783
  /**
828
784
  */
829
785
  export const CertificateKind = Object.freeze({ StakeRegistration:0,"0":"StakeRegistration",StakeDeregistration:1,"1":"StakeDeregistration",StakeDelegation:2,"2":"StakeDelegation",PoolRegistration:3,"3":"PoolRegistration",PoolRetirement:4,"4":"PoolRetirement",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", });
830
786
  /**
831
787
  */
832
- export const StakeDistributionKind = Object.freeze({ SingleKey:0,"0":"SingleKey",BootstrapEra:1,"1":"BootstrapEra", });
833
- /**
834
- */
835
- export const CoinSelectionStrategyCIP2 = Object.freeze({
836
- /**
837
- * Performs CIP2's Largest First ada-only selection. Will error if outputs contain non-ADA assets.
838
- */
839
- LargestFirst:0,"0":"LargestFirst",
840
- /**
841
- * Performs CIP2's Random Improve ada-only selection. Will error if outputs contain non-ADA assets.
842
- */
843
- RandomImprove:1,"1":"RandomImprove",
844
- /**
845
- * Same as LargestFirst, but before adding ADA, will insert by largest-first for each asset type.
846
- */
847
- LargestFirstMultiAsset:2,"2":"LargestFirstMultiAsset",
848
- /**
849
- * Same as RandomImprove, but before adding ADA, will insert by random-improve for each asset type.
850
- */
851
- RandomImproveMultiAsset:3,"3":"RandomImproveMultiAsset", });
852
- /**
853
- */
854
- export const DelegationDistributionKind = Object.freeze({ Weighted:0,"0":"Weighted",Legacy:1,"1":"Legacy", });
788
+ export const CredentialKind = Object.freeze({ PubKey:0,"0":"PubKey",Script:1,"1":"Script", });
855
789
  /**
856
790
  */
857
- export const CredentialKind = Object.freeze({ PubKey:0,"0":"PubKey",Script:1,"1":"Script", });
791
+ export const NonceKind = Object.freeze({ Identity:0,"0":"Identity",Hash:1,"1":"Hash", });
858
792
  /**
859
793
  */
860
- export const RelayKind = Object.freeze({ SingleHostAddr:0,"0":"SingleHostAddr",SingleHostName:1,"1":"SingleHostName",MultiHostName:2,"2":"MultiHostName", });
794
+ export const VoterKind = Object.freeze({ ConstitutionalCommitteeHotKeyHash:0,"0":"ConstitutionalCommitteeHotKeyHash",ConstitutionalCommitteeHotScriptHash:1,"1":"ConstitutionalCommitteeHotScriptHash",DRepKeyHash:2,"2":"DRepKeyHash",DRepScriptHash:3,"3":"DRepScriptHash",StakingPoolKeyHash:4,"4":"StakingPoolKeyHash", });
861
795
  /**
862
796
  */
863
- export const DatumOptionKind = Object.freeze({ Hash:0,"0":"Hash",Datum:1,"1":"Datum", });
797
+ export const ScriptKind = Object.freeze({ Native:0,"0":"Native",PlutusV1:1,"1":"PlutusV1",PlutusV2:2,"2":"PlutusV2",PlutusV3:3,"3":"PlutusV3", });
864
798
  /**
865
799
  * JSON <-> PlutusData conversion schemas.
866
800
  * Follows ScriptDataJsonSchema in cardano-cli defined at:
@@ -914,31 +848,97 @@ BasicConversions:0,"0":"BasicConversions",
914
848
  DetailedSchema:1,"1":"DetailedSchema", });
915
849
  /**
916
850
  */
917
- export const TransactionOutputKind = Object.freeze({ AlonzoFormatTxOut:0,"0":"AlonzoFormatTxOut",ConwayFormatTxOut:1,"1":"ConwayFormatTxOut", });
851
+ export const DRepKind = Object.freeze({ Key:0,"0":"Key",Script:1,"1":"Script",AlwaysAbstain:2,"2":"AlwaysAbstain",AlwaysNoConfidence:3,"3":"AlwaysNoConfidence", });
918
852
  /**
919
853
  */
920
- export const RedeemersKind = Object.freeze({ ArrLegacyRedeemer:0,"0":"ArrLegacyRedeemer",MapRedeemerKeyToRedeemerVal:1,"1":"MapRedeemerKeyToRedeemerVal", });
854
+ export const AuxiliaryDataKind = Object.freeze({ Shelley:0,"0":"Shelley",ShelleyMA:1,"1":"ShelleyMA",Conway:2,"2":"Conway", });
921
855
  /**
922
856
  */
923
- export const MetadataJsonSchema = Object.freeze({ NoConversions:0,"0":"NoConversions",BasicConversions:1,"1":"BasicConversions",DetailedSchema:2,"2":"DetailedSchema", });
857
+ export const 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", });
924
858
  /**
859
+ * Which version of the CIP25 spec to use. See CIP25 for details.
860
+ * This will change how things are encoded but for the most part contains
861
+ * the same information.
925
862
  */
926
- export const SpendingDataKind = Object.freeze({ SpendingDataPubKey:0,"0":"SpendingDataPubKey",SpendingDataScript:1,"1":"SpendingDataScript",SpendingDataRedeem:2,"2":"SpendingDataRedeem", });
863
+ export const CIP25Version = Object.freeze({
927
864
  /**
865
+ * Initial version of CIP25 with only string (utf8) asset names allowed.
928
866
  */
929
- export const Vote = Object.freeze({ No:0,"0":"No",Yes:1,"1":"Yes",Abstain:2,"2":"Abstain", });
867
+ V1:0,"0":"V1",
930
868
  /**
869
+ * Second version of CIP25. Supports any type of asset names.
931
870
  */
932
- export const AuxiliaryDataKind = Object.freeze({ Shelley:0,"0":"Shelley",ShelleyMA:1,"1":"ShelleyMA",Conway:2,"2":"Conway", });
871
+ V2:1,"1":"V2", });
933
872
  /**
934
873
  */
935
- export const PlutusDataKind = Object.freeze({ ConstrPlutusData:0,"0":"ConstrPlutusData",Map:1,"1":"Map",List:2,"2":"List",Integer:3,"3":"Integer",Bytes:4,"4":"Bytes", });
874
+ export const 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", });
936
875
  /**
937
876
  */
938
877
  export const TransactionMetadatumKind = Object.freeze({ Map:0,"0":"Map",List:1,"1":"List",Int:2,"2":"Int",Bytes:3,"3":"Bytes",Text:4,"4":"Text", });
939
878
  /**
940
879
  */
941
- export const 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", });
880
+ export const DatumOptionKind = Object.freeze({ Hash:0,"0":"Hash",Datum:1,"1":"Datum", });
881
+ /**
882
+ */
883
+ export const Language = Object.freeze({ PlutusV1:0,"0":"PlutusV1",PlutusV2:1,"1":"PlutusV2",PlutusV3:2,"2":"PlutusV3", });
884
+ /**
885
+ */
886
+ export const RelayKind = Object.freeze({ SingleHostAddr:0,"0":"SingleHostAddr",SingleHostName:1,"1":"SingleHostName",MultiHostName:2,"2":"MultiHostName", });
887
+ /**
888
+ */
889
+ export const DelegationDistributionKind = Object.freeze({ Weighted:0,"0":"Weighted",Legacy:1,"1":"Legacy", });
890
+ /**
891
+ * Careful: this enum doesn't include the network ID part of the header
892
+ * ex: base address isn't 0b0000_0000 but instead 0b0000
893
+ * Use `header_matches_kind` if you don't want to implement the bitwise operators yourself
894
+ */
895
+ export const 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", });
896
+ /**
897
+ */
898
+ export const ChunkableStringKind = Object.freeze({ Single:0,"0":"Single",Chunked:1,"1":"Chunked", });
899
+ /**
900
+ */
901
+ export const SpendingDataKind = Object.freeze({ SpendingDataPubKey:0,"0":"SpendingDataPubKey",SpendingDataScript:1,"1":"SpendingDataScript",SpendingDataRedeem:2,"2":"SpendingDataRedeem", });
902
+ /**
903
+ */
904
+ export const ByronAddrType = Object.freeze({ PublicKey:0,"0":"PublicKey",Script:1,"1":"Script",Redeem:2,"2":"Redeem", });
905
+ /**
906
+ */
907
+ export const RedeemersKind = Object.freeze({ ArrLegacyRedeemer:0,"0":"ArrLegacyRedeemer",MapRedeemerKeyToRedeemerVal:1,"1":"MapRedeemerKeyToRedeemerVal", });
908
+ /**
909
+ */
910
+ export const CoinSelectionStrategyCIP2 = Object.freeze({
911
+ /**
912
+ * Performs CIP2's Largest First ada-only selection. Will error if outputs contain non-ADA assets.
913
+ */
914
+ LargestFirst:0,"0":"LargestFirst",
915
+ /**
916
+ * Performs CIP2's Random Improve ada-only selection. Will error if outputs contain non-ADA assets.
917
+ */
918
+ RandomImprove:1,"1":"RandomImprove",
919
+ /**
920
+ * Same as LargestFirst, but before adding ADA, will insert by largest-first for each asset type.
921
+ */
922
+ LargestFirstMultiAsset:2,"2":"LargestFirstMultiAsset",
923
+ /**
924
+ * Same as RandomImprove, but before adding ADA, will insert by random-improve for each asset type.
925
+ */
926
+ RandomImproveMultiAsset:3,"3":"RandomImproveMultiAsset", });
927
+ /**
928
+ */
929
+ export const StakeDistributionKind = Object.freeze({ SingleKey:0,"0":"SingleKey",BootstrapEra:1,"1":"BootstrapEra", });
930
+ /**
931
+ */
932
+ export const ChangeSelectionAlgo = Object.freeze({ Default:0,"0":"Default", });
933
+ /**
934
+ */
935
+ export const 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", });
936
+ /**
937
+ */
938
+ export const AddressKind = Object.freeze({ Base:0,"0":"Base",Ptr:1,"1":"Ptr",Enterprise:2,"2":"Enterprise",Reward:3,"3":"Reward",Byron:4,"4":"Byron", });
939
+ /**
940
+ */
941
+ export const Vote = Object.freeze({ No:0,"0":"No",Yes:1,"1":"Yes",Abstain:2,"2":"Abstain", });
942
942
 
943
943
  const AddrAttributesFinalization = (typeof FinalizationRegistry === 'undefined')
944
944
  ? { register: () => {}, unregister: () => {} }
@@ -22170,6 +22170,28 @@ export class PlutusData {
22170
22170
  }
22171
22171
  /**
22172
22172
  *
22173
+ * * Convert to a Datum that will serialize equivalent to cardano-node's format
22174
+ * *
22175
+ * * Please VERY STRONGLY consider using PlutusData::from_cbor_bytes() instead wherever possible.
22176
+ * * You should try to never rely on a tool encoding CBOR a certain way as there are many possible,
22177
+ * * and just because it matches with a specific datum, doesn't mean that a different datum won't differ.
22178
+ * * This is critical as that means the datum hash won't match.
22179
+ * * After creation a datum (or other hashable CBOR object) should only be treated as raw CBOR bytes,
22180
+ * * or through a type that respects its specific CBOR format e.g. CML's PlutusData::from_cbor_bytes()
22181
+ * *
22182
+ * * This function is just here in case there's no possible way at all to create from CBOR bytes and
22183
+ * * thus cold only be constructed manually and then had this function called on it.
22184
+ * *
22185
+ * * This is also the format that CSL and Lucid use
22186
+ *
22187
+ * @returns {PlutusData}
22188
+ */
22189
+ to_cardano_node_format() {
22190
+ const ret = wasm.plutusdata_to_cardano_node_format(this.__wbg_ptr);
22191
+ return PlutusData.__wrap(ret);
22192
+ }
22193
+ /**
22194
+ *
22173
22195
  * * Serialize this type to CBOR bytes
22174
22196
  * * This type type supports encoding preservation so this will preserve round-trip CBOR formats.
22175
22197
  * * If created from scratch the CBOR will be canonical.
@@ -44312,11 +44334,6 @@ export function __wbindgen_is_function(arg0) {
44312
44334
  return ret;
44313
44335
  };
44314
44336
 
44315
- export function __wbindgen_object_clone_ref(arg0) {
44316
- const ret = getObject(arg0);
44317
- return addHeapObject(ret);
44318
- };
44319
-
44320
44337
  export function __wbg_buffer_b7b08af79b0b0974(arg0) {
44321
44338
  const ret = getObject(arg0).buffer;
44322
44339
  return addHeapObject(ret);
@@ -44415,6 +44432,11 @@ export function __wbg_set_d1e79e2388520f18(arg0, arg1, arg2) {
44415
44432
  getObject(arg0).set(getObject(arg1), arg2 >>> 0);
44416
44433
  };
44417
44434
 
44435
+ export function __wbindgen_object_clone_ref(arg0) {
44436
+ const ret = getObject(arg0);
44437
+ return addHeapObject(ret);
44438
+ };
44439
+
44418
44440
  export function __wbg_crypto_1d1f22824a6a080c(arg0) {
44419
44441
  const ret = getObject(arg0).crypto;
44420
44442
  return addHeapObject(ret);
Binary file
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@anastasia-labs/cardano-multiplatform-lib-browser",
3
3
  "description": "Multiplatform WASM SDK containing the most common CML crates for Cardano blockchain functionality",
4
- "version": "6.0.1-2",
4
+ "version": "6.0.2-2",
5
5
  "license": "MIT",
6
6
  "repository": {
7
7
  "type": "git",