@anastasia-labs/cardano-multiplatform-lib-nodejs 5.3.1-1 → 5.3.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.
@@ -17,6 +17,60 @@ export function emip3_encrypt_with_password(password: string, salt: string, nonc
17
17
  */
18
18
  export function emip3_decrypt_with_password(password: string, data: string): string;
19
19
  /**
20
+ *
21
+ * * Min fee for JUST the script
22
+ *
23
+ * @param {Transaction} tx
24
+ * @param {ExUnitPrices} ex_unit_prices
25
+ * @returns {bigint}
26
+ */
27
+ export function min_script_fee(tx: Transaction, ex_unit_prices: ExUnitPrices): bigint;
28
+ /**
29
+ * @param {Transaction} tx
30
+ * @param {LinearFee} linear_fee
31
+ * @returns {bigint}
32
+ */
33
+ export function min_no_script_fee(tx: Transaction, linear_fee: LinearFee): bigint;
34
+ /**
35
+ * @param {Transaction} tx
36
+ * @param {LinearFee} linear_fee
37
+ * @param {ExUnitPrices} ex_unit_prices
38
+ * @returns {bigint}
39
+ */
40
+ export function min_fee(tx: Transaction, linear_fee: LinearFee, ex_unit_prices: ExUnitPrices): bigint;
41
+ /**
42
+ * encodes arbitrary bytes into chunks of 64 bytes (the limit for bytes) as a list to be valid Metadata
43
+ * @param {Uint8Array} bytes
44
+ * @returns {TransactionMetadatum}
45
+ */
46
+ export function encode_arbitrary_bytes_as_metadatum(bytes: Uint8Array): TransactionMetadatum;
47
+ /**
48
+ * decodes from chunks of bytes in a list to a byte vector if that is the metadata format, otherwise returns None
49
+ * @param {TransactionMetadatum} metadata
50
+ * @returns {Uint8Array | undefined}
51
+ */
52
+ export function decode_arbitrary_bytes_from_metadatum(metadata: TransactionMetadatum): Uint8Array | undefined;
53
+ /**
54
+ * @param {TransactionHash} tx_body_hash
55
+ * @param {PrivateKey} sk
56
+ * @returns {Vkeywitness}
57
+ */
58
+ export function make_vkey_witness(tx_body_hash: TransactionHash, sk: PrivateKey): Vkeywitness;
59
+ /**
60
+ * Converts JSON to Metadata according to MetadataJsonSchema
61
+ * @param {string} json
62
+ * @param {MetadataJsonSchema} schema
63
+ * @returns {TransactionMetadatum}
64
+ */
65
+ export function encode_json_str_to_metadatum(json: string, schema: MetadataJsonSchema): TransactionMetadatum;
66
+ /**
67
+ * Converts Metadata to JSON according to MetadataJsonSchema
68
+ * @param {TransactionMetadatum} metadatum
69
+ * @param {MetadataJsonSchema} schema
70
+ * @returns {string}
71
+ */
72
+ export function decode_metadatum_to_json_str(metadatum: TransactionMetadatum, schema: MetadataJsonSchema): string;
73
+ /**
20
74
  * @param {TransactionHash} tx_body_hash
21
75
  * @param {ByronAddress} addr
22
76
  * @param {LegacyDaedalusPrivateKey} key
@@ -92,64 +146,17 @@ export function calc_script_data_hash(redeemers: Redeemers, datums: PlutusDataLi
92
146
  */
93
147
  export function calc_script_data_hash_from_witness(witnesses: TransactionWitnessSet, cost_models: CostModels): ScriptDataHash | undefined;
94
148
  /**
95
- * @param {Redeemers} redeemers
96
- * @returns {ExUnits}
97
- */
98
- export function compute_total_ex_units(redeemers: Redeemers): ExUnits;
99
- /**
100
- * encodes arbitrary bytes into chunks of 64 bytes (the limit for bytes) as a list to be valid Metadata
101
- * @param {Uint8Array} bytes
102
- * @returns {TransactionMetadatum}
103
- */
104
- export function encode_arbitrary_bytes_as_metadatum(bytes: Uint8Array): TransactionMetadatum;
105
- /**
106
- * decodes from chunks of bytes in a list to a byte vector if that is the metadata format, otherwise returns None
107
- * @param {TransactionMetadatum} metadata
108
- * @returns {Uint8Array | undefined}
109
- */
110
- export function decode_arbitrary_bytes_from_metadatum(metadata: TransactionMetadatum): Uint8Array | undefined;
111
- /**
112
- *
113
- * * Min fee for JUST the script
114
- *
115
- * @param {Transaction} tx
116
- * @param {ExUnitPrices} ex_unit_prices
117
- * @returns {bigint}
118
- */
119
- export function min_script_fee(tx: Transaction, ex_unit_prices: ExUnitPrices): bigint;
120
- /**
121
- * @param {Transaction} tx
122
- * @param {LinearFee} linear_fee
123
- * @returns {bigint}
124
- */
125
- export function min_no_script_fee(tx: Transaction, linear_fee: LinearFee): bigint;
126
- /**
127
- * @param {Transaction} tx
128
- * @param {LinearFee} linear_fee
129
- * @param {ExUnitPrices} ex_unit_prices
130
- * @returns {bigint}
131
- */
132
- export function min_fee(tx: Transaction, linear_fee: LinearFee, ex_unit_prices: ExUnitPrices): bigint;
133
- /**
134
- * Converts JSON to Metadata according to MetadataJsonSchema
135
149
  * @param {string} json
136
- * @param {MetadataJsonSchema} schema
137
- * @returns {TransactionMetadatum}
150
+ * @param {CardanoNodePlutusDatumSchema} schema
151
+ * @returns {PlutusData}
138
152
  */
139
- export function encode_json_str_to_metadatum(json: string, schema: MetadataJsonSchema): TransactionMetadatum;
153
+ export function encode_json_str_to_plutus_datum(json: string, schema: CardanoNodePlutusDatumSchema): PlutusData;
140
154
  /**
141
- * Converts Metadata to JSON according to MetadataJsonSchema
142
- * @param {TransactionMetadatum} metadatum
143
- * @param {MetadataJsonSchema} schema
155
+ * @param {PlutusData} datum
156
+ * @param {CardanoNodePlutusDatumSchema} schema
144
157
  * @returns {string}
145
158
  */
146
- export function decode_metadatum_to_json_str(metadatum: TransactionMetadatum, schema: MetadataJsonSchema): string;
147
- /**
148
- * @param {TransactionHash} tx_body_hash
149
- * @param {PrivateKey} sk
150
- * @returns {Vkeywitness}
151
- */
152
- export function make_vkey_witness(tx_body_hash: TransactionHash, sk: PrivateKey): Vkeywitness;
159
+ export function decode_plutus_datum_to_json_str(datum: PlutusData, schema: CardanoNodePlutusDatumSchema): string;
153
160
  /**
154
161
  * @param {TransactionBody} txbody
155
162
  * @param {bigint} pool_deposit
@@ -171,62 +178,31 @@ export function get_deposit(txbody: TransactionBody, pool_deposit: bigint, key_d
171
178
  */
172
179
  export function min_ada_required(output: TransactionOutput, coins_per_utxo_byte: bigint): bigint;
173
180
  /**
174
- * @param {string} json
175
- * @param {CardanoNodePlutusDatumSchema} schema
176
- * @returns {PlutusData}
177
- */
178
- export function encode_json_str_to_plutus_datum(json: string, schema: CardanoNodePlutusDatumSchema): PlutusData;
179
- /**
180
- * @param {PlutusData} datum
181
- * @param {CardanoNodePlutusDatumSchema} schema
182
- * @returns {string}
183
- */
184
- export function decode_plutus_datum_to_json_str(datum: PlutusData, schema: CardanoNodePlutusDatumSchema): string;
185
- /**
186
- */
187
- export enum NativeScriptKind {
188
- ScriptPubkey = 0,
189
- ScriptAll = 1,
190
- ScriptAny = 2,
191
- ScriptNOfK = 3,
192
- ScriptInvalidBefore = 4,
193
- ScriptInvalidHereafter = 5,
194
- }
195
- /**
181
+ * @param {Redeemers} redeemers
182
+ * @returns {ExUnits}
196
183
  */
197
- export enum DelegationDistributionKind {
198
- Weighted = 0,
199
- Legacy = 1,
200
- }
184
+ export function compute_total_ex_units(redeemers: Redeemers): ExUnits;
201
185
  /**
202
186
  */
203
- export enum TransactionMetadatumKind {
204
- Map = 0,
205
- List = 1,
206
- Int = 2,
207
- Bytes = 3,
208
- Text = 4,
187
+ export enum MetadataJsonSchema {
188
+ NoConversions = 0,
189
+ BasicConversions = 1,
190
+ DetailedSchema = 2,
209
191
  }
210
192
  /**
193
+ * Which version of the CIP25 spec to use. See CIP25 for details.
194
+ * This will change how things are encoded but for the most part contains
195
+ * the same information.
211
196
  */
212
- export enum PlutusDataKind {
213
- ConstrPlutusData = 0,
214
- Map = 1,
215
- List = 2,
216
- Integer = 3,
217
- Bytes = 4,
218
- }
197
+ export enum CIP25Version {
219
198
  /**
199
+ * Initial version of CIP25 with only string (utf8) asset names allowed.
220
200
  */
221
- export enum NonceKind {
222
- Identity = 0,
223
- Hash = 1,
224
- }
201
+ V1 = 0,
225
202
  /**
203
+ * Second version of CIP25. Supports any type of asset names.
226
204
  */
227
- export enum ChunkableStringKind {
228
- Single = 0,
229
- Chunked = 1,
205
+ V2 = 1,
230
206
  }
231
207
  /**
232
208
  * JSON <-> PlutusData conversion schemas.
@@ -282,49 +258,32 @@ export enum CardanoNodePlutusDatumSchema {
282
258
  }
283
259
  /**
284
260
  */
285
- export enum RedeemerTag {
286
- Spend = 0,
287
- Mint = 1,
288
- Cert = 2,
289
- Reward = 3,
290
- Voting = 4,
291
- Proposing = 5,
292
- }
293
- /**
294
- */
295
- export enum RedeemersKind {
296
- ArrLegacyRedeemer = 0,
297
- MapRedeemerKeyToRedeemerVal = 1,
261
+ export enum ByronAddrType {
262
+ PublicKey = 0,
263
+ Script = 1,
264
+ Redeem = 2,
298
265
  }
299
266
  /**
300
- * Careful: this enum doesn't include the network ID part of the header
301
- * ex: base address isn't 0b0000_0000 but instead 0b0000
302
- * Use `header_matches_kind` if you don't want to implement the bitwise operators yourself
303
267
  */
304
- export enum AddressHeaderKind {
305
- BasePaymentKeyStakeKey = 0,
306
- BasePaymentScriptStakeKey = 1,
307
- BasePaymentKeyStakeScript = 2,
308
- BasePaymentScriptStakeScript = 3,
309
- PointerKey = 4,
310
- PointerScript = 5,
311
- EnterpriseKey = 6,
312
- EnterpriseScript = 7,
313
- Byron = 8,
314
- RewardKey = 14,
315
- RewardScript = 15,
268
+ export enum DRepKind {
269
+ Key = 0,
270
+ Script = 1,
271
+ AlwaysAbstain = 2,
272
+ AlwaysNoConfidence = 3,
316
273
  }
317
274
  /**
318
275
  */
319
- export enum RelayKind {
320
- SingleHostAddr = 0,
321
- SingleHostName = 1,
322
- MultiHostName = 2,
276
+ export enum ChangeSelectionAlgo {
277
+ Default = 0,
323
278
  }
324
279
  /**
325
280
  */
326
- export enum ChangeSelectionAlgo {
327
- Default = 0,
281
+ export enum AddressKind {
282
+ Base = 0,
283
+ Ptr = 1,
284
+ Enterprise = 2,
285
+ Reward = 3,
286
+ Byron = 4,
328
287
  }
329
288
  /**
330
289
  */
@@ -333,58 +292,74 @@ export enum DatumOptionKind {
333
292
  Datum = 1,
334
293
  }
335
294
  /**
336
- * Which version of the CIP25 spec to use. See CIP25 for details.
337
- * This will change how things are encoded but for the most part contains
338
- * the same information.
339
- */
340
- export enum CIP25Version {
341
- /**
342
- * Initial version of CIP25 with only string (utf8) asset names allowed.
343
295
  */
344
- V1 = 0,
296
+ export enum ChunkableStringKind {
297
+ Single = 0,
298
+ Chunked = 1,
299
+ }
345
300
  /**
346
- * Second version of CIP25. Supports any type of asset names.
347
301
  */
348
- V2 = 1,
302
+ export enum DelegationDistributionKind {
303
+ Weighted = 0,
304
+ Legacy = 1,
349
305
  }
350
306
  /**
351
307
  */
352
- export enum TransactionOutputKind {
353
- AlonzoFormatTxOut = 0,
354
- ConwayFormatTxOut = 1,
308
+ export enum GovActionKind {
309
+ ParameterChangeAction = 0,
310
+ HardForkInitiationAction = 1,
311
+ TreasuryWithdrawalsAction = 2,
312
+ NoConfidence = 3,
313
+ UpdateCommittee = 4,
314
+ NewConstitution = 5,
315
+ InfoAction = 6,
355
316
  }
356
317
  /**
357
318
  */
358
- export enum CoinSelectionStrategyCIP2 {
319
+ export enum ScriptKind {
320
+ Native = 0,
321
+ PlutusV1 = 1,
322
+ PlutusV2 = 2,
323
+ PlutusV3 = 3,
324
+ }
359
325
  /**
360
- * Performs CIP2's Largest First ada-only selection. Will error if outputs contain non-ADA assets.
361
326
  */
362
- LargestFirst = 0,
327
+ export enum AuxiliaryDataKind {
328
+ Shelley = 0,
329
+ ShelleyMA = 1,
330
+ Conway = 2,
331
+ }
363
332
  /**
364
- * Performs CIP2's Random Improve ada-only selection. Will error if outputs contain non-ADA assets.
365
333
  */
366
- RandomImprove = 1,
334
+ export enum NonceKind {
335
+ Identity = 0,
336
+ Hash = 1,
337
+ }
367
338
  /**
368
- * Same as LargestFirst, but before adding ADA, will insert by largest-first for each asset type.
369
339
  */
370
- LargestFirstMultiAsset = 2,
340
+ export enum SpendingDataKind {
341
+ SpendingDataPubKey = 0,
342
+ SpendingDataScript = 1,
343
+ SpendingDataRedeem = 2,
344
+ }
371
345
  /**
372
- * Same as RandomImprove, but before adding ADA, will insert by random-improve for each asset type.
373
346
  */
374
- RandomImproveMultiAsset = 3,
347
+ export enum RedeemersKind {
348
+ ArrLegacyRedeemer = 0,
349
+ MapRedeemerKeyToRedeemerVal = 1,
375
350
  }
376
351
  /**
377
352
  */
378
- export enum Vote {
379
- No = 0,
380
- Yes = 1,
381
- Abstain = 2,
353
+ export enum Language {
354
+ PlutusV1 = 0,
355
+ PlutusV2 = 1,
356
+ PlutusV3 = 2,
382
357
  }
383
358
  /**
384
359
  */
385
- export enum StakeDistributionKind {
386
- SingleKey = 0,
387
- BootstrapEra = 1,
360
+ export enum CredentialKind {
361
+ PubKey = 0,
362
+ Script = 1,
388
363
  }
389
364
  /**
390
365
  */
@@ -409,107 +384,119 @@ export enum CertificateKind {
409
384
  }
410
385
  /**
411
386
  */
412
- export enum MetadataJsonSchema {
413
- NoConversions = 0,
414
- BasicConversions = 1,
415
- DetailedSchema = 2,
387
+ export enum TransactionOutputKind {
388
+ AlonzoFormatTxOut = 0,
389
+ ConwayFormatTxOut = 1,
416
390
  }
417
391
  /**
418
392
  */
419
- export enum AddressKind {
420
- Base = 0,
421
- Ptr = 1,
422
- Enterprise = 2,
423
- Reward = 3,
424
- Byron = 4,
425
- }
393
+ export enum CoinSelectionStrategyCIP2 {
426
394
  /**
395
+ * Performs CIP2's Largest First ada-only selection. Will error if outputs contain non-ADA assets.
427
396
  */
428
- export enum DRepKind {
429
- Key = 0,
430
- Script = 1,
431
- AlwaysAbstain = 2,
432
- AlwaysNoConfidence = 3,
433
- }
397
+ LargestFirst = 0,
434
398
  /**
399
+ * Performs CIP2's Random Improve ada-only selection. Will error if outputs contain non-ADA assets.
435
400
  */
436
- export enum ByronAddrType {
437
- PublicKey = 0,
438
- Script = 1,
439
- Redeem = 2,
401
+ RandomImprove = 1,
402
+ /**
403
+ * Same as LargestFirst, but before adding ADA, will insert by largest-first for each asset type.
404
+ */
405
+ LargestFirstMultiAsset = 2,
406
+ /**
407
+ * Same as RandomImprove, but before adding ADA, will insert by random-improve for each asset type.
408
+ */
409
+ RandomImproveMultiAsset = 3,
440
410
  }
441
411
  /**
442
412
  */
443
- export enum AuxiliaryDataKind {
444
- Shelley = 0,
445
- ShelleyMA = 1,
446
- Conway = 2,
413
+ export enum VoterKind {
414
+ ConstitutionalCommitteeHotKeyHash = 0,
415
+ ConstitutionalCommitteeHotScriptHash = 1,
416
+ DRepKeyHash = 2,
417
+ DRepScriptHash = 3,
418
+ StakingPoolKeyHash = 4,
447
419
  }
448
420
  /**
421
+ * Careful: this enum doesn't include the network ID part of the header
422
+ * ex: base address isn't 0b0000_0000 but instead 0b0000
423
+ * Use `header_matches_kind` if you don't want to implement the bitwise operators yourself
449
424
  */
450
- export enum Language {
451
- PlutusV1 = 0,
452
- PlutusV2 = 1,
453
- PlutusV3 = 2,
425
+ export enum AddressHeaderKind {
426
+ BasePaymentKeyStakeKey = 0,
427
+ BasePaymentScriptStakeKey = 1,
428
+ BasePaymentKeyStakeScript = 2,
429
+ BasePaymentScriptStakeScript = 3,
430
+ PointerKey = 4,
431
+ PointerScript = 5,
432
+ EnterpriseKey = 6,
433
+ EnterpriseScript = 7,
434
+ Byron = 8,
435
+ RewardKey = 14,
436
+ RewardScript = 15,
454
437
  }
455
438
  /**
456
439
  */
457
- export enum SpendingDataKind {
458
- SpendingDataPubKey = 0,
459
- SpendingDataScript = 1,
460
- SpendingDataRedeem = 2,
440
+ export enum RedeemerTag {
441
+ Spend = 0,
442
+ Mint = 1,
443
+ Cert = 2,
444
+ Reward = 3,
445
+ Voting = 4,
446
+ Proposing = 5,
461
447
  }
462
448
  /**
463
449
  */
464
- export enum ScriptKind {
465
- Native = 0,
466
- PlutusV1 = 1,
467
- PlutusV2 = 2,
468
- PlutusV3 = 3,
450
+ export enum PlutusDataKind {
451
+ ConstrPlutusData = 0,
452
+ Map = 1,
453
+ List = 2,
454
+ Integer = 3,
455
+ Bytes = 4,
469
456
  }
470
457
  /**
471
458
  */
472
- export enum CredentialKind {
473
- PubKey = 0,
474
- Script = 1,
459
+ export enum TransactionMetadatumKind {
460
+ Map = 0,
461
+ List = 1,
462
+ Int = 2,
463
+ Bytes = 3,
464
+ Text = 4,
475
465
  }
476
466
  /**
477
467
  */
478
- export enum GovActionKind {
479
- ParameterChangeAction = 0,
480
- HardForkInitiationAction = 1,
481
- TreasuryWithdrawalsAction = 2,
482
- NoConfidence = 3,
483
- UpdateCommittee = 4,
484
- NewConstitution = 5,
485
- InfoAction = 6,
468
+ export enum RelayKind {
469
+ SingleHostAddr = 0,
470
+ SingleHostName = 1,
471
+ MultiHostName = 2,
486
472
  }
487
473
  /**
488
474
  */
489
- export enum VoterKind {
490
- ConstitutionalCommitteeHotKeyHash = 0,
491
- ConstitutionalCommitteeHotScriptHash = 1,
492
- DRepKeyHash = 2,
493
- DRepScriptHash = 3,
494
- StakingPoolKeyHash = 4,
475
+ export enum StakeDistributionKind {
476
+ SingleKey = 0,
477
+ BootstrapEra = 1,
495
478
  }
496
479
  /**
497
480
  */
498
- export class AddrAttributes {
499
- free(): void;
481
+ export enum Vote {
482
+ No = 0,
483
+ Yes = 1,
484
+ Abstain = 2,
485
+ }
500
486
  /**
501
- * @param {HDAddressPayload | undefined} [hdap]
502
- * @param {ProtocolMagic | undefined} [protocol_magic]
503
- * @returns {AddrAttributes}
504
487
  */
505
- static new_bootstrap_era(hdap?: HDAddressPayload, protocol_magic?: ProtocolMagic): AddrAttributes;
488
+ export enum NativeScriptKind {
489
+ ScriptPubkey = 0,
490
+ ScriptAll = 1,
491
+ ScriptAny = 2,
492
+ ScriptNOfK = 3,
493
+ ScriptInvalidBefore = 4,
494
+ ScriptInvalidHereafter = 5,
495
+ }
506
496
  /**
507
- * @param {Bip32PublicKey} pubk
508
- * @param {HDAddressPayload | undefined} hdap
509
- * @param {ProtocolMagic} protocol_magic
510
- * @returns {AddrAttributes}
511
497
  */
512
- static new_single_key(pubk: Bip32PublicKey, hdap: HDAddressPayload | undefined, protocol_magic: ProtocolMagic): AddrAttributes;
498
+ export class AddrAttributes {
499
+ free(): void;
513
500
  /**
514
501
  *
515
502
  * * Serialize this type to CBOR bytes.
@@ -573,6 +560,19 @@ export class AddrAttributes {
573
560
  * @returns {AddrAttributes}
574
561
  */
575
562
  static new(): AddrAttributes;
563
+ /**
564
+ * @param {HDAddressPayload | undefined} [hdap]
565
+ * @param {ProtocolMagic | undefined} [protocol_magic]
566
+ * @returns {AddrAttributes}
567
+ */
568
+ static new_bootstrap_era(hdap?: HDAddressPayload, protocol_magic?: ProtocolMagic): AddrAttributes;
569
+ /**
570
+ * @param {Bip32PublicKey} pubk
571
+ * @param {HDAddressPayload | undefined} hdap
572
+ * @param {ProtocolMagic} protocol_magic
573
+ * @returns {AddrAttributes}
574
+ */
575
+ static new_single_key(pubk: Bip32PublicKey, hdap: HDAddressPayload | undefined, protocol_magic: ProtocolMagic): AddrAttributes;
576
576
  }
577
577
  /**
578
578
  */
@@ -663,82 +663,36 @@ export class Address {
663
663
  /**
664
664
  * Note: by convention, the key inside reward addresses are NOT considered staking credentials
665
665
  * Note: None is returned pointer addresses as the chain history is required to resolve its associated cred
666
- * @returns {Credential | undefined}
667
- */
668
- staking_cred(): Credential | undefined;
669
- /**
670
- * @returns {AddressKind}
671
- */
672
- kind(): AddressKind;
673
- /**
674
- * @returns {Uint8Array}
675
- */
676
- to_raw_bytes(): Uint8Array;
677
- /**
678
- * @param {Uint8Array} data
679
- * @returns {Address}
680
- */
681
- static from_raw_bytes(data: Uint8Array): Address;
682
- /**
683
- * @returns {string}
684
- */
685
- to_hex(): string;
686
- /**
687
- * @param {string} hex
688
- * @returns {Address}
689
- */
690
- static from_hex(hex: string): Address;
691
- }
692
- /**
693
- */
694
- export class AddressContent {
695
- free(): void;
696
- /**
697
- * @param {ByronAddrType} addr_type
698
- * @param {SpendingData} spending_data
699
- * @param {AddrAttributes} attributes
700
- * @returns {AddressContent}
701
- */
702
- static hash_and_create(addr_type: ByronAddrType, spending_data: SpendingData, attributes: AddrAttributes): AddressContent;
703
- /**
704
- * @param {PublicKey} pubkey
705
- * @param {ProtocolMagic | undefined} [protocol_magic]
706
- * @returns {AddressContent}
666
+ * @returns {Credential | undefined}
707
667
  */
708
- static new_redeem(pubkey: PublicKey, protocol_magic?: ProtocolMagic): AddressContent;
668
+ staking_cred(): Credential | undefined;
709
669
  /**
710
- * @param {Bip32PublicKey} xpub
711
- * @param {ProtocolMagic | undefined} [protocol_magic]
712
- * @returns {AddressContent}
670
+ * @returns {AddressKind}
713
671
  */
714
- static new_simple(xpub: Bip32PublicKey, protocol_magic?: ProtocolMagic): AddressContent;
672
+ kind(): AddressKind;
715
673
  /**
716
- * Do we want to remove this or keep it for people who were using old Byron code?
717
- * @returns {ByronAddress}
674
+ * @returns {Uint8Array}
718
675
  */
719
- to_address(): ByronAddress;
676
+ to_raw_bytes(): Uint8Array;
720
677
  /**
721
- * returns the byron protocol magic embedded in the address, or mainnet id if none is present
722
- * note: for bech32 addresses, you need to use network_id instead
723
- * @returns {ProtocolMagic}
678
+ * @param {Uint8Array} data
679
+ * @returns {Address}
724
680
  */
725
- byron_protocol_magic(): ProtocolMagic;
681
+ static from_raw_bytes(data: Uint8Array): Address;
726
682
  /**
727
- * @returns {number}
683
+ * @returns {string}
728
684
  */
729
- network_id(): number;
685
+ to_hex(): string;
730
686
  /**
731
- * @param {Bip32PublicKey} key
732
- * @param {ProtocolMagic} protocol_magic
733
- * @returns {AddressContent}
687
+ * @param {string} hex
688
+ * @returns {Address}
734
689
  */
735
- static icarus_from_key(key: Bip32PublicKey, protocol_magic: ProtocolMagic): AddressContent;
690
+ static from_hex(hex: string): Address;
691
+ }
736
692
  /**
737
- * Check if the Addr can be reconstructed with a specific xpub
738
- * @param {Bip32PublicKey} xpub
739
- * @returns {boolean}
740
693
  */
741
- identical_with_pubkey(xpub: Bip32PublicKey): boolean;
694
+ export class AddressContent {
695
+ free(): void;
742
696
  /**
743
697
  *
744
698
  * * Serialize this type to CBOR bytes.
@@ -793,6 +747,52 @@ export class AddressContent {
793
747
  * @returns {AddressContent}
794
748
  */
795
749
  static new(address_id: AddressId, addr_attributes: AddrAttributes, addr_type: ByronAddrType): AddressContent;
750
+ /**
751
+ * @param {ByronAddrType} addr_type
752
+ * @param {SpendingData} spending_data
753
+ * @param {AddrAttributes} attributes
754
+ * @returns {AddressContent}
755
+ */
756
+ static hash_and_create(addr_type: ByronAddrType, spending_data: SpendingData, attributes: AddrAttributes): AddressContent;
757
+ /**
758
+ * @param {PublicKey} pubkey
759
+ * @param {ProtocolMagic | undefined} [protocol_magic]
760
+ * @returns {AddressContent}
761
+ */
762
+ static new_redeem(pubkey: PublicKey, protocol_magic?: ProtocolMagic): AddressContent;
763
+ /**
764
+ * @param {Bip32PublicKey} xpub
765
+ * @param {ProtocolMagic | undefined} [protocol_magic]
766
+ * @returns {AddressContent}
767
+ */
768
+ static new_simple(xpub: Bip32PublicKey, protocol_magic?: ProtocolMagic): AddressContent;
769
+ /**
770
+ * Do we want to remove this or keep it for people who were using old Byron code?
771
+ * @returns {ByronAddress}
772
+ */
773
+ to_address(): ByronAddress;
774
+ /**
775
+ * returns the byron protocol magic embedded in the address, or mainnet id if none is present
776
+ * note: for bech32 addresses, you need to use network_id instead
777
+ * @returns {ProtocolMagic}
778
+ */
779
+ byron_protocol_magic(): ProtocolMagic;
780
+ /**
781
+ * @returns {number}
782
+ */
783
+ network_id(): number;
784
+ /**
785
+ * @param {Bip32PublicKey} key
786
+ * @param {ProtocolMagic} protocol_magic
787
+ * @returns {AddressContent}
788
+ */
789
+ static icarus_from_key(key: Bip32PublicKey, protocol_magic: ProtocolMagic): AddressContent;
790
+ /**
791
+ * Check if the Addr can be reconstructed with a specific xpub
792
+ * @param {Bip32PublicKey} xpub
793
+ * @returns {boolean}
794
+ */
795
+ identical_with_pubkey(xpub: Bip32PublicKey): boolean;
796
796
  }
797
797
  /**
798
798
  */
@@ -1015,29 +1015,6 @@ export class AssetName {
1015
1015
  free(): void;
1016
1016
  /**
1017
1017
  *
1018
- * * Create an AssetName from raw bytes. 64 byte maximum.
1019
- *
1020
- * @param {Uint8Array} bytes
1021
- * @returns {AssetName}
1022
- */
1023
- static from_bytes(bytes: Uint8Array): AssetName;
1024
- /**
1025
- *
1026
- * * Create an AssetName from utf8 string. 64 byte (not char!) maximum.
1027
- *
1028
- * @param {string} utf8_str
1029
- * @returns {AssetName}
1030
- */
1031
- static from_str(utf8_str: string): AssetName;
1032
- /**
1033
- *
1034
- * * AssetName as a utf8 string if it's possible. Will error if the asset is not utf8
1035
- *
1036
- * @returns {string}
1037
- */
1038
- to_str(): string;
1039
- /**
1040
- *
1041
1018
  * * Serialize this type to CBOR bytes
1042
1019
  * * This type type supports encoding preservation so this will preserve round-trip CBOR formats.
1043
1020
  * * If created from scratch the CBOR will be canonical.
@@ -1088,6 +1065,29 @@ export class AssetName {
1088
1065
  * @returns {Uint8Array}
1089
1066
  */
1090
1067
  get(): Uint8Array;
1068
+ /**
1069
+ *
1070
+ * * Create an AssetName from raw bytes. 64 byte maximum.
1071
+ *
1072
+ * @param {Uint8Array} bytes
1073
+ * @returns {AssetName}
1074
+ */
1075
+ static from_bytes(bytes: Uint8Array): AssetName;
1076
+ /**
1077
+ *
1078
+ * * Create an AssetName from utf8 string. 64 byte (not char!) maximum.
1079
+ *
1080
+ * @param {string} utf8_str
1081
+ * @returns {AssetName}
1082
+ */
1083
+ static from_str(utf8_str: string): AssetName;
1084
+ /**
1085
+ *
1086
+ * * AssetName as a utf8 string if it's possible. Will error if the asset is not utf8
1087
+ *
1088
+ * @returns {string}
1089
+ */
1090
+ to_str(): string;
1091
1091
  }
1092
1092
  /**
1093
1093
  */
@@ -1857,34 +1857,6 @@ export class BootstrapWitnessList {
1857
1857
  export class ByronAddress {
1858
1858
  free(): void;
1859
1859
  /**
1860
- * @returns {string}
1861
- */
1862
- to_base58(): string;
1863
- /**
1864
- * @param {string} s
1865
- * @returns {ByronAddress}
1866
- */
1867
- static from_base58(s: string): ByronAddress;
1868
- /**
1869
- * @param {string} s
1870
- * @returns {boolean}
1871
- */
1872
- static is_valid(s: string): boolean;
1873
- /**
1874
- * @returns {Address}
1875
- */
1876
- to_address(): Address;
1877
- /**
1878
- * @param {Address} addr
1879
- * @returns {ByronAddress | undefined}
1880
- */
1881
- static from_address(addr: Address): ByronAddress | undefined;
1882
- /**
1883
- * @param {AddressContent} address_content
1884
- * @returns {ByronAddress}
1885
- */
1886
- static from_address_content(address_content: AddressContent): ByronAddress;
1887
- /**
1888
1860
  *
1889
1861
  * * Serialize this type to CBOR bytes.
1890
1862
  * * This type does NOT support fine-tuned encoding options so this may or may not be
@@ -1933,6 +1905,34 @@ export class ByronAddress {
1933
1905
  * @returns {ByronAddress}
1934
1906
  */
1935
1907
  static new(content: AddressContent, crc: Crc32): ByronAddress;
1908
+ /**
1909
+ * @returns {string}
1910
+ */
1911
+ to_base58(): string;
1912
+ /**
1913
+ * @param {string} s
1914
+ * @returns {ByronAddress}
1915
+ */
1916
+ static from_base58(s: string): ByronAddress;
1917
+ /**
1918
+ * @param {string} s
1919
+ * @returns {boolean}
1920
+ */
1921
+ static is_valid(s: string): boolean;
1922
+ /**
1923
+ * @returns {Address}
1924
+ */
1925
+ to_address(): Address;
1926
+ /**
1927
+ * @param {Address} addr
1928
+ * @returns {ByronAddress | undefined}
1929
+ */
1930
+ static from_address(addr: Address): ByronAddress | undefined;
1931
+ /**
1932
+ * @param {AddressContent} address_content
1933
+ * @returns {ByronAddress}
1934
+ */
1935
+ static from_address_content(address_content: AddressContent): ByronAddress;
1936
1936
  }
1937
1937
  /**
1938
1938
  */
@@ -3705,9 +3705,33 @@ export class CostModels {
3705
3705
  */
3706
3706
  static from_json(json: string): CostModels;
3707
3707
  /**
3708
- * @returns {MapU64ToArrI64}
3708
+ * @param {IntList} plutus_v1
3709
+ */
3710
+ set_plutus_v1(plutus_v1: IntList): void;
3711
+ /**
3712
+ * @returns {IntList | undefined}
3713
+ */
3714
+ plutus_v1(): IntList | undefined;
3715
+ /**
3716
+ * @param {IntList} plutus_v2
3717
+ */
3718
+ set_plutus_v2(plutus_v2: IntList): void;
3719
+ /**
3720
+ * @returns {IntList | undefined}
3721
+ */
3722
+ plutus_v2(): IntList | undefined;
3723
+ /**
3724
+ * @param {IntList} plutus_v3
3725
+ */
3726
+ set_plutus_v3(plutus_v3: IntList): void;
3727
+ /**
3728
+ * @returns {IntList | undefined}
3729
+ */
3730
+ plutus_v3(): IntList | undefined;
3731
+ /**
3732
+ * @returns {CostModels}
3709
3733
  */
3710
- inner(): MapU64ToArrI64;
3734
+ static new(): CostModels;
3711
3735
  }
3712
3736
  /**
3713
3737
  */
@@ -4349,11 +4373,6 @@ export class ExUnitPrices {
4349
4373
  export class ExUnits {
4350
4374
  free(): void;
4351
4375
  /**
4352
- * @param {ExUnits} other
4353
- * @returns {ExUnits}
4354
- */
4355
- checked_add(other: ExUnits): ExUnits;
4356
- /**
4357
4376
  *
4358
4377
  * * Serialize this type to CBOR bytes
4359
4378
  * * This type type supports encoding preservation so this will preserve round-trip CBOR formats.
@@ -4415,6 +4434,11 @@ export class ExUnits {
4415
4434
  * @returns {ExUnits}
4416
4435
  */
4417
4436
  static new(mem: bigint, steps: bigint): ExUnits;
4437
+ /**
4438
+ * @param {ExUnits} other
4439
+ * @returns {ExUnits}
4440
+ */
4441
+ checked_add(other: ExUnits): ExUnits;
4418
4442
  }
4419
4443
  /**
4420
4444
  */
@@ -5747,38 +5771,6 @@ export class MapTransactionMetadatumToTransactionMetadatum {
5747
5771
  }
5748
5772
  /**
5749
5773
  */
5750
- export class MapU64ToArrI64 {
5751
- free(): void;
5752
- /**
5753
- * @param {bigint} key
5754
- * @returns {BigInt64Array | undefined}
5755
- */
5756
- get(key: bigint): BigInt64Array | undefined;
5757
- /**
5758
- * @param {bigint} key
5759
- * @param {BigInt64Array} value
5760
- * @returns {BigInt64Array | undefined}
5761
- */
5762
- insert(key: bigint, value: BigInt64Array): BigInt64Array | undefined;
5763
- /**
5764
- * @returns {MapU64ToArrI64}
5765
- */
5766
- static new(): MapU64ToArrI64;
5767
- /**
5768
- * @returns {number}
5769
- */
5770
- len(): number;
5771
- /**
5772
- * @returns {boolean}
5773
- */
5774
- is_empty(): boolean;
5775
- /**
5776
- * @returns {BigUint64Array}
5777
- */
5778
- keys(): BigUint64Array;
5779
- }
5780
- /**
5781
- */
5782
5774
  export class Metadata {
5783
5775
  free(): void;
5784
5776
  /**
@@ -7032,10 +7024,6 @@ export class PlutusScriptWitness {
7032
7024
  export class PlutusV1Script {
7033
7025
  free(): void;
7034
7026
  /**
7035
- * @returns {ScriptHash}
7036
- */
7037
- hash(): ScriptHash;
7038
- /**
7039
7027
  *
7040
7028
  * * Serialize this type to CBOR bytes
7041
7029
  * * This type type supports encoding preservation so this will preserve round-trip CBOR formats.
@@ -7087,6 +7075,10 @@ export class PlutusV1Script {
7087
7075
  * @returns {Uint8Array}
7088
7076
  */
7089
7077
  get(): Uint8Array;
7078
+ /**
7079
+ * @returns {ScriptHash}
7080
+ */
7081
+ hash(): ScriptHash;
7090
7082
  }
7091
7083
  /**
7092
7084
  */
@@ -7115,10 +7107,6 @@ export class PlutusV1ScriptList {
7115
7107
  export class PlutusV2Script {
7116
7108
  free(): void;
7117
7109
  /**
7118
- * @returns {ScriptHash}
7119
- */
7120
- hash(): ScriptHash;
7121
- /**
7122
7110
  *
7123
7111
  * * Serialize this type to CBOR bytes
7124
7112
  * * This type type supports encoding preservation so this will preserve round-trip CBOR formats.
@@ -7170,6 +7158,10 @@ export class PlutusV2Script {
7170
7158
  * @returns {Uint8Array}
7171
7159
  */
7172
7160
  get(): Uint8Array;
7161
+ /**
7162
+ * @returns {ScriptHash}
7163
+ */
7164
+ hash(): ScriptHash;
7173
7165
  }
7174
7166
  /**
7175
7167
  */
@@ -8600,10 +8592,6 @@ export class RedeemerWitnessKey {
8600
8592
  export class Redeemers {
8601
8593
  free(): void;
8602
8594
  /**
8603
- * @returns {LegacyRedeemerList}
8604
- */
8605
- to_flat_format(): LegacyRedeemerList;
8606
- /**
8607
8595
  *
8608
8596
  * * Serialize this type to CBOR bytes
8609
8597
  * * This type type supports encoding preservation so this will preserve round-trip CBOR formats.
@@ -8673,6 +8661,10 @@ export class Redeemers {
8673
8661
  * @returns {MapRedeemerKeyToRedeemerVal | undefined}
8674
8662
  */
8675
8663
  as_map_redeemer_key_to_redeemer_val(): MapRedeemerKeyToRedeemerVal | undefined;
8664
+ /**
8665
+ * @returns {LegacyRedeemerList}
8666
+ */
8667
+ to_flat_format(): LegacyRedeemerList;
8676
8668
  }
8677
8669
  /**
8678
8670
  */