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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -17,10 +17,17 @@ 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
- * @param {Redeemers} redeemers
21
- * @returns {ExUnits}
20
+ * encodes arbitrary bytes into chunks of 64 bytes (the limit for bytes) as a list to be valid Metadata
21
+ * @param {Uint8Array} bytes
22
+ * @returns {TransactionMetadatum}
22
23
  */
23
- export function compute_total_ex_units(redeemers: Redeemers): ExUnits;
24
+ export function encode_arbitrary_bytes_as_metadatum(bytes: Uint8Array): TransactionMetadatum;
25
+ /**
26
+ * decodes from chunks of bytes in a list to a byte vector if that is the metadata format, otherwise returns None
27
+ * @param {TransactionMetadatum} metadata
28
+ * @returns {Uint8Array | undefined}
29
+ */
30
+ export function decode_arbitrary_bytes_from_metadatum(metadata: TransactionMetadatum): Uint8Array | undefined;
24
31
  /**
25
32
  * @param {AuxiliaryData} auxiliary_data
26
33
  * @returns {AuxiliaryDataHash}
@@ -124,30 +131,6 @@ export function min_no_script_fee(tx: Transaction, linear_fee: LinearFee): bigin
124
131
  */
125
132
  export function min_fee(tx: Transaction, linear_fee: LinearFee, ex_unit_prices: ExUnitPrices, total_ref_script_size: bigint): bigint;
126
133
  /**
127
- * @param {TransactionOutput} output
128
- * @param {bigint} coins_per_utxo_byte
129
- * @returns {bigint}
130
- */
131
- export function min_ada_required(output: TransactionOutput, coins_per_utxo_byte: bigint): bigint;
132
- /**
133
- * encodes arbitrary bytes into chunks of 64 bytes (the limit for bytes) as a list to be valid Metadata
134
- * @param {Uint8Array} bytes
135
- * @returns {TransactionMetadatum}
136
- */
137
- export function encode_arbitrary_bytes_as_metadatum(bytes: Uint8Array): TransactionMetadatum;
138
- /**
139
- * decodes from chunks of bytes in a list to a byte vector if that is the metadata format, otherwise returns None
140
- * @param {TransactionMetadatum} metadata
141
- * @returns {Uint8Array | undefined}
142
- */
143
- export function decode_arbitrary_bytes_from_metadatum(metadata: TransactionMetadatum): Uint8Array | undefined;
144
- /**
145
- * @param {TransactionHash} tx_body_hash
146
- * @param {PrivateKey} sk
147
- * @returns {Vkeywitness}
148
- */
149
- export function make_vkey_witness(tx_body_hash: TransactionHash, sk: PrivateKey): Vkeywitness;
150
- /**
151
134
  * Converts JSON to Metadata according to MetadataJsonSchema
152
135
  * @param {string} json
153
136
  * @param {MetadataJsonSchema} schema
@@ -162,6 +145,11 @@ export function encode_json_str_to_metadatum(json: string, schema: MetadataJsonS
162
145
  */
163
146
  export function decode_metadatum_to_json_str(metadatum: TransactionMetadatum, schema: MetadataJsonSchema): string;
164
147
  /**
148
+ * @param {Redeemers} redeemers
149
+ * @returns {ExUnits}
150
+ */
151
+ export function compute_total_ex_units(redeemers: Redeemers): ExUnits;
152
+ /**
165
153
  * @param {TransactionHash} tx_body_hash
166
154
  * @param {ByronAddress} addr
167
155
  * @param {LegacyDaedalusPrivateKey} key
@@ -176,6 +164,18 @@ export function make_daedalus_bootstrap_witness(tx_body_hash: TransactionHash, a
176
164
  */
177
165
  export function make_icarus_bootstrap_witness(tx_body_hash: TransactionHash, addr: ByronAddress, key: Bip32PrivateKey): BootstrapWitness;
178
166
  /**
167
+ * @param {TransactionHash} tx_body_hash
168
+ * @param {PrivateKey} sk
169
+ * @returns {Vkeywitness}
170
+ */
171
+ export function make_vkey_witness(tx_body_hash: TransactionHash, sk: PrivateKey): Vkeywitness;
172
+ /**
173
+ * @param {TransactionOutput} output
174
+ * @param {bigint} coins_per_utxo_byte
175
+ * @returns {bigint}
176
+ */
177
+ export function min_ada_required(output: TransactionOutput, coins_per_utxo_byte: bigint): bigint;
178
+ /**
179
179
  * @param {string} json
180
180
  * @param {CardanoNodePlutusDatumSchema} schema
181
181
  * @returns {PlutusData}
@@ -189,43 +189,86 @@ 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 AuxiliaryDataKind {
193
- Shelley = 0,
194
- ShelleyMA = 1,
195
- Conway = 2,
192
+ export enum ChunkableStringKind {
193
+ Single = 0,
194
+ Chunked = 1,
196
195
  }
197
196
  /**
198
197
  */
199
- export enum RedeemersKind {
200
- ArrLegacyRedeemer = 0,
201
- MapRedeemerKeyToRedeemerVal = 1,
198
+ export enum ScriptKind {
199
+ Native = 0,
200
+ PlutusV1 = 1,
201
+ PlutusV2 = 2,
202
+ PlutusV3 = 3,
202
203
  }
203
204
  /**
205
+ * Careful: this enum doesn't include the network ID part of the header
206
+ * ex: base address isn't 0b0000_0000 but instead 0b0000
207
+ * Use `header_matches_kind` if you don't want to implement the bitwise operators yourself
204
208
  */
205
- export enum Vote {
206
- No = 0,
207
- Yes = 1,
208
- Abstain = 2,
209
+ export enum AddressHeaderKind {
210
+ BasePaymentKeyStakeKey = 0,
211
+ BasePaymentScriptStakeKey = 1,
212
+ BasePaymentKeyStakeScript = 2,
213
+ BasePaymentScriptStakeScript = 3,
214
+ PointerKey = 4,
215
+ PointerScript = 5,
216
+ EnterpriseKey = 6,
217
+ EnterpriseScript = 7,
218
+ Byron = 8,
219
+ RewardKey = 14,
220
+ RewardScript = 15,
209
221
  }
210
222
  /**
211
223
  */
212
- export enum CoinSelectionStrategyCIP2 {
224
+ export enum RelayKind {
225
+ SingleHostAddr = 0,
226
+ SingleHostName = 1,
227
+ MultiHostName = 2,
228
+ }
213
229
  /**
214
- * Performs CIP2's Largest First ada-only selection. Will error if outputs contain non-ADA assets.
215
230
  */
216
- LargestFirst = 0,
231
+ export enum DRepKind {
232
+ Key = 0,
233
+ Script = 1,
234
+ AlwaysAbstain = 2,
235
+ AlwaysNoConfidence = 3,
236
+ }
217
237
  /**
218
- * Performs CIP2's Random Improve ada-only selection. Will error if outputs contain non-ADA assets.
219
238
  */
220
- RandomImprove = 1,
239
+ export enum StakeDistributionKind {
240
+ SingleKey = 0,
241
+ BootstrapEra = 1,
242
+ }
221
243
  /**
222
- * Same as LargestFirst, but before adding ADA, will insert by largest-first for each asset type.
223
244
  */
224
- LargestFirstMultiAsset = 2,
245
+ export enum VoterKind {
246
+ ConstitutionalCommitteeHotKeyHash = 0,
247
+ ConstitutionalCommitteeHotScriptHash = 1,
248
+ DRepKeyHash = 2,
249
+ DRepScriptHash = 3,
250
+ StakingPoolKeyHash = 4,
251
+ }
225
252
  /**
226
- * Same as RandomImprove, but before adding ADA, will insert by random-improve for each asset type.
253
+ * Which version of the CIP25 spec to use. See CIP25 for details.
254
+ * This will change how things are encoded but for the most part contains
255
+ * the same information.
227
256
  */
228
- RandomImproveMultiAsset = 3,
257
+ export enum CIP25Version {
258
+ /**
259
+ * Initial version of CIP25 with only string (utf8) asset names allowed.
260
+ */
261
+ V1 = 0,
262
+ /**
263
+ * Second version of CIP25. Supports any type of asset names.
264
+ */
265
+ V2 = 1,
266
+ }
267
+ /**
268
+ */
269
+ export enum NonceKind {
270
+ Identity = 0,
271
+ Hash = 1,
229
272
  }
230
273
  /**
231
274
  */
@@ -236,114 +279,46 @@ export enum MetadataJsonSchema {
236
279
  }
237
280
  /**
238
281
  */
239
- export enum PlutusDataKind {
240
- ConstrPlutusData = 0,
241
- Map = 1,
242
- List = 2,
243
- Integer = 3,
244
- Bytes = 4,
282
+ export enum AuxiliaryDataKind {
283
+ Shelley = 0,
284
+ ShelleyMA = 1,
285
+ Conway = 2,
245
286
  }
246
287
  /**
247
288
  */
248
- export enum NativeScriptKind {
249
- ScriptPubkey = 0,
250
- ScriptAll = 1,
251
- ScriptAny = 2,
252
- ScriptNOfK = 3,
253
- ScriptInvalidBefore = 4,
254
- ScriptInvalidHereafter = 5,
289
+ export enum CredentialKind {
290
+ PubKey = 0,
291
+ Script = 1,
255
292
  }
256
293
  /**
257
294
  */
258
- export enum DelegationDistributionKind {
259
- Weighted = 0,
260
- Legacy = 1,
295
+ export enum ChangeSelectionAlgo {
296
+ Default = 0,
261
297
  }
262
298
  /**
263
- * Careful: this enum doesn't include the network ID part of the header
264
- * ex: base address isn't 0b0000_0000 but instead 0b0000
265
- * Use `header_matches_kind` if you don't want to implement the bitwise operators yourself
266
299
  */
267
- export enum AddressHeaderKind {
268
- BasePaymentKeyStakeKey = 0,
269
- BasePaymentScriptStakeKey = 1,
270
- BasePaymentKeyStakeScript = 2,
271
- BasePaymentScriptStakeScript = 3,
272
- PointerKey = 4,
273
- PointerScript = 5,
274
- EnterpriseKey = 6,
275
- EnterpriseScript = 7,
276
- Byron = 8,
277
- RewardKey = 14,
278
- RewardScript = 15,
300
+ export enum Vote {
301
+ No = 0,
302
+ Yes = 1,
303
+ Abstain = 2,
279
304
  }
280
305
  /**
281
306
  */
282
- export enum ScriptKind {
283
- Native = 0,
284
- PlutusV1 = 1,
285
- PlutusV2 = 2,
286
- PlutusV3 = 3,
307
+ export enum DatumOptionKind {
308
+ Hash = 0,
309
+ Datum = 1,
287
310
  }
288
311
  /**
289
312
  */
290
- export enum DRepKind {
291
- Key = 0,
292
- Script = 1,
293
- AlwaysAbstain = 2,
294
- AlwaysNoConfidence = 3,
313
+ export enum DelegationDistributionKind {
314
+ Weighted = 0,
315
+ Legacy = 1,
295
316
  }
296
317
  /**
297
- * JSON <-> PlutusData conversion schemas.
298
- * Follows ScriptDataJsonSchema in cardano-cli defined at:
299
- * https://github.com/input-output-hk/cardano-node/blob/master/cardano-api/src/Cardano/Api/ScriptData.hs#L254
300
- *
301
- * All methods here have the following restrictions due to limitations on dependencies:
302
- * * JSON numbers above u64::MAX (positive) or below i64::MIN (negative) will throw errors
303
- * * Hex strings for bytes don't accept odd-length (half-byte) strings.
304
- * cardano-cli seems to support these however but it seems to be different than just 0-padding
305
- * on either side when tested so proceed with caution
306
318
  */
307
- export enum CardanoNodePlutusDatumSchema {
308
- /**
309
- * ScriptDataJsonNoSchema in cardano-node.
310
- *
311
- * This is the format used by --script-data-value in cardano-cli
312
- * This tries to accept most JSON but does not support the full spectrum of Plutus datums.
313
- * From JSON:
314
- * * null/true/false/floats NOT supported
315
- * * strings starting with 0x are treated as hex bytes. All other strings are encoded as their utf8 bytes.
316
- * To JSON:
317
- * * ConstrPlutusData not supported in ANY FORM (neither keys nor values)
318
- * * Lists not supported in keys
319
- * * Maps not supported in keys
320
- */
321
- BasicConversions = 0,
322
- /**
323
- * ScriptDataJsonDetailedSchema in cardano-node.
324
- *
325
- * This is the format used by --script-data-file in cardano-cli
326
- * This covers almost all (only minor exceptions) Plutus datums, but the JSON must conform to a strict schema.
327
- * The schema specifies that ALL keys and ALL values must be contained in a JSON map with 2 cases:
328
- * 1. For ConstrPlutusData there must be two fields "constructor" contianing a number and "fields" containing its fields
329
- * e.g. { "constructor": 2, "fields": [{"int": 2}, {"list": [{"bytes": "CAFEF00D"}]}]}
330
- * 2. For all other cases there must be only one field named "int", "bytes", "list" or "map"
331
- * BigInteger's value is a JSON number e.g. {"int": 100}
332
- * Bytes' value is a hex string representing the bytes WITHOUT any prefix e.g. {"bytes": "CAFEF00D"}
333
- * Lists' value is a JSON list of its elements encoded via the same schema e.g. {"list": [{"bytes": "CAFEF00D"}]}
334
- * Maps' value is a JSON list of objects, one for each key-value pair in the map, with keys "k" and "v"
335
- * respectively with their values being the plutus datum encoded via this same schema
336
- * e.g. {"map": [
337
- * {"k": {"int": 2}, "v": {"int": 5}},
338
- * {"k": {"map": [{"k": {"list": [{"int": 1}]}, "v": {"bytes": "FF03"}}]}, "v": {"list": []}}
339
- * ]}
340
- * From JSON:
341
- * * null/true/false/floats NOT supported
342
- * * the JSON must conform to a very specific schema
343
- * To JSON:
344
- * * all Plutus datums should be fully supported outside of the integer range limitations outlined above.
345
- */
346
- DetailedSchema = 1,
319
+ export enum TransactionOutputKind {
320
+ AlonzoFormatTxOut = 0,
321
+ ConwayFormatTxOut = 1,
347
322
  }
348
323
  /**
349
324
  */
@@ -357,24 +332,34 @@ export enum RedeemerTag {
357
332
  }
358
333
  /**
359
334
  */
360
- export enum TransactionOutputKind {
361
- AlonzoFormatTxOut = 0,
362
- ConwayFormatTxOut = 1,
335
+ export enum Language {
336
+ PlutusV1 = 0,
337
+ PlutusV2 = 1,
338
+ PlutusV3 = 2,
363
339
  }
364
340
  /**
365
341
  */
366
- export enum TransactionMetadatumKind {
367
- Map = 0,
368
- List = 1,
369
- Int = 2,
370
- Bytes = 3,
371
- Text = 4,
342
+ export enum SpendingDataKind {
343
+ SpendingDataPubKey = 0,
344
+ SpendingDataScript = 1,
345
+ SpendingDataRedeem = 2,
372
346
  }
373
347
  /**
374
348
  */
375
- export enum ChunkableStringKind {
376
- Single = 0,
377
- Chunked = 1,
349
+ export enum GovActionKind {
350
+ ParameterChangeAction = 0,
351
+ HardForkInitiationAction = 1,
352
+ TreasuryWithdrawalsAction = 2,
353
+ NoConfidence = 3,
354
+ UpdateCommittee = 4,
355
+ NewConstitution = 5,
356
+ InfoAction = 6,
357
+ }
358
+ /**
359
+ */
360
+ export enum RedeemersKind {
361
+ ArrLegacyRedeemer = 0,
362
+ MapRedeemerKeyToRedeemerVal = 1,
378
363
  }
379
364
  /**
380
365
  */
@@ -394,6 +379,16 @@ export enum ByronAddrType {
394
379
  }
395
380
  /**
396
381
  */
382
+ export enum NativeScriptKind {
383
+ ScriptPubkey = 0,
384
+ ScriptAll = 1,
385
+ ScriptAny = 2,
386
+ ScriptNOfK = 3,
387
+ ScriptInvalidBefore = 4,
388
+ ScriptInvalidHereafter = 5,
389
+ }
390
+ /**
391
+ */
397
392
  export enum CertificateKind {
398
393
  StakeRegistration = 0,
399
394
  StakeDeregistration = 1,
@@ -415,88 +410,93 @@ export enum CertificateKind {
415
410
  }
416
411
  /**
417
412
  */
418
- export enum CredentialKind {
419
- PubKey = 0,
420
- Script = 1,
421
- }
422
- /**
423
- */
424
- export enum StakeDistributionKind {
425
- SingleKey = 0,
426
- BootstrapEra = 1,
413
+ export enum PlutusDataKind {
414
+ ConstrPlutusData = 0,
415
+ Map = 1,
416
+ List = 2,
417
+ Integer = 3,
418
+ Bytes = 4,
427
419
  }
428
420
  /**
429
421
  */
430
- export enum ChangeSelectionAlgo {
431
- Default = 0,
422
+ export enum TransactionMetadatumKind {
423
+ Map = 0,
424
+ List = 1,
425
+ Int = 2,
426
+ Bytes = 3,
427
+ Text = 4,
432
428
  }
433
429
  /**
434
- * Which version of the CIP25 spec to use. See CIP25 for details.
435
- * This will change how things are encoded but for the most part contains
436
- * the same information.
437
- */
438
- export enum CIP25Version {
439
- /**
440
- * Initial version of CIP25 with only string (utf8) asset names allowed.
441
430
  */
442
- V1 = 0,
443
- /**
444
- * Second version of CIP25. Supports any type of asset names.
445
- */
446
- V2 = 1,
447
- }
431
+ export enum CoinSelectionStrategyCIP2 {
448
432
  /**
433
+ * Performs CIP2's Largest First ada-only selection. Will error if outputs contain non-ADA assets.
449
434
  */
450
- export enum RelayKind {
451
- SingleHostAddr = 0,
452
- SingleHostName = 1,
453
- MultiHostName = 2,
454
- }
435
+ LargestFirst = 0,
455
436
  /**
437
+ * Performs CIP2's Random Improve ada-only selection. Will error if outputs contain non-ADA assets.
456
438
  */
457
- export enum NonceKind {
458
- Identity = 0,
459
- Hash = 1,
460
- }
439
+ RandomImprove = 1,
461
440
  /**
441
+ * Same as LargestFirst, but before adding ADA, will insert by largest-first for each asset type.
462
442
  */
463
- export enum GovActionKind {
464
- ParameterChangeAction = 0,
465
- HardForkInitiationAction = 1,
466
- TreasuryWithdrawalsAction = 2,
467
- NoConfidence = 3,
468
- UpdateCommittee = 4,
469
- NewConstitution = 5,
470
- InfoAction = 6,
471
- }
443
+ LargestFirstMultiAsset = 2,
472
444
  /**
445
+ * Same as RandomImprove, but before adding ADA, will insert by random-improve for each asset type.
473
446
  */
474
- export enum DatumOptionKind {
475
- Hash = 0,
476
- Datum = 1,
447
+ RandomImproveMultiAsset = 3,
477
448
  }
478
449
  /**
450
+ * JSON <-> PlutusData conversion schemas.
451
+ * Follows ScriptDataJsonSchema in cardano-cli defined at:
452
+ * https://github.com/input-output-hk/cardano-node/blob/master/cardano-api/src/Cardano/Api/ScriptData.hs#L254
453
+ *
454
+ * All methods here have the following restrictions due to limitations on dependencies:
455
+ * * JSON numbers above u64::MAX (positive) or below i64::MIN (negative) will throw errors
456
+ * * Hex strings for bytes don't accept odd-length (half-byte) strings.
457
+ * cardano-cli seems to support these however but it seems to be different than just 0-padding
458
+ * on either side when tested so proceed with caution
479
459
  */
480
- export enum Language {
481
- PlutusV1 = 0,
482
- PlutusV2 = 1,
483
- PlutusV3 = 2,
484
- }
460
+ export enum CardanoNodePlutusDatumSchema {
485
461
  /**
462
+ * ScriptDataJsonNoSchema in cardano-node.
463
+ *
464
+ * This is the format used by --script-data-value in cardano-cli
465
+ * This tries to accept most JSON but does not support the full spectrum of Plutus datums.
466
+ * From JSON:
467
+ * * null/true/false/floats NOT supported
468
+ * * strings starting with 0x are treated as hex bytes. All other strings are encoded as their utf8 bytes.
469
+ * To JSON:
470
+ * * ConstrPlutusData not supported in ANY FORM (neither keys nor values)
471
+ * * Lists not supported in keys
472
+ * * Maps not supported in keys
486
473
  */
487
- export enum VoterKind {
488
- ConstitutionalCommitteeHotKeyHash = 0,
489
- ConstitutionalCommitteeHotScriptHash = 1,
490
- DRepKeyHash = 2,
491
- DRepScriptHash = 3,
492
- StakingPoolKeyHash = 4,
493
- }
474
+ BasicConversions = 0,
494
475
  /**
476
+ * ScriptDataJsonDetailedSchema in cardano-node.
477
+ *
478
+ * This is the format used by --script-data-file in cardano-cli
479
+ * This covers almost all (only minor exceptions) Plutus datums, but the JSON must conform to a strict schema.
480
+ * The schema specifies that ALL keys and ALL values must be contained in a JSON map with 2 cases:
481
+ * 1. For ConstrPlutusData there must be two fields "constructor" contianing a number and "fields" containing its fields
482
+ * e.g. { "constructor": 2, "fields": [{"int": 2}, {"list": [{"bytes": "CAFEF00D"}]}]}
483
+ * 2. For all other cases there must be only one field named "int", "bytes", "list" or "map"
484
+ * BigInteger's value is a JSON number e.g. {"int": 100}
485
+ * Bytes' value is a hex string representing the bytes WITHOUT any prefix e.g. {"bytes": "CAFEF00D"}
486
+ * Lists' value is a JSON list of its elements encoded via the same schema e.g. {"list": [{"bytes": "CAFEF00D"}]}
487
+ * Maps' value is a JSON list of objects, one for each key-value pair in the map, with keys "k" and "v"
488
+ * respectively with their values being the plutus datum encoded via this same schema
489
+ * e.g. {"map": [
490
+ * {"k": {"int": 2}, "v": {"int": 5}},
491
+ * {"k": {"map": [{"k": {"list": [{"int": 1}]}, "v": {"bytes": "FF03"}}]}, "v": {"list": []}}
492
+ * ]}
493
+ * From JSON:
494
+ * * null/true/false/floats NOT supported
495
+ * * the JSON must conform to a very specific schema
496
+ * To JSON:
497
+ * * all Plutus datums should be fully supported outside of the integer range limitations outlined above.
495
498
  */
496
- export enum SpendingDataKind {
497
- SpendingDataPubKey = 0,
498
- SpendingDataScript = 1,
499
- SpendingDataRedeem = 2,
499
+ DetailedSchema = 1,
500
500
  }
501
501
  /**
502
502
  */
@@ -1072,111 +1072,111 @@ export class AssetName {
1072
1072
  free(): void;
1073
1073
  /**
1074
1074
  *
1075
- * * Create an AssetName from utf8 string. 64 byte (not char!) maximum.
1076
- *
1077
- * @param {string} utf8_str
1078
- * @returns {AssetName}
1079
- */
1080
- static from_str(utf8_str: string): AssetName;
1081
- /**
1082
- *
1083
- * * AssetName as a utf8 string if it's possible. Will error if the asset is not utf8
1084
- *
1085
- * @returns {string}
1075
+ * * Serialize this type to CBOR bytes
1076
+ * * This type type supports encoding preservation so this will preserve round-trip CBOR formats.
1077
+ * * If created from scratch the CBOR will be canonical.
1078
+ *
1079
+ * @returns {Uint8Array}
1086
1080
  */
1087
- to_str(): string;
1081
+ to_cbor_bytes(): Uint8Array;
1088
1082
  /**
1089
1083
  *
1090
- * * Direct raw bytes without any CBOR structure
1084
+ * * Serialize this type to CBOR bytes using canonical CBOR encodings
1091
1085
  *
1092
1086
  * @returns {Uint8Array}
1093
1087
  */
1094
- to_raw_bytes(): Uint8Array;
1088
+ to_canonical_cbor_bytes(): Uint8Array;
1095
1089
  /**
1096
1090
  *
1097
- * * Parse from the direct raw bytes, without any CBOR structure
1091
+ * * Create this type from CBOR bytes
1098
1092
  *
1099
- * @param {Uint8Array} bytes
1093
+ * @param {Uint8Array} cbor_bytes
1100
1094
  * @returns {AssetName}
1101
1095
  */
1102
- static from_raw_bytes(bytes: Uint8Array): AssetName;
1096
+ static from_cbor_bytes(cbor_bytes: Uint8Array): AssetName;
1103
1097
  /**
1104
1098
  *
1105
- * * Direct raw bytes without any CBOR structure, as a hex-encoded string
1099
+ * * Serialize this type to CBOR bytes encoded as a hex string (useful for working with CIP30).
1100
+ * * This type type supports encoding preservation so this will preserve round-trip CBOR formats.
1101
+ * * If created from scratch the CBOR will be canonical.
1106
1102
  *
1107
1103
  * @returns {string}
1108
1104
  */
1109
- to_hex(): string;
1105
+ to_cbor_hex(): string;
1110
1106
  /**
1111
1107
  *
1112
- * * Parse from a hex string of the direct raw bytes, without any CBOR structure
1108
+ * * Serialize this type to CBOR bytes using canonical CBOR encodings as hex bytes
1113
1109
  *
1114
- * @param {string} input
1115
- * @returns {AssetName}
1110
+ * @returns {string}
1116
1111
  */
1117
- static from_hex(input: string): AssetName;
1112
+ to_canonical_cbor_hex(): string;
1118
1113
  /**
1119
1114
  *
1120
- * * Serialize this type to CBOR bytes
1121
- * * This type type supports encoding preservation so this will preserve round-trip CBOR formats.
1122
- * * If created from scratch the CBOR will be canonical.
1115
+ * * Create this type from the CBOR bytes encoded as a hex string.
1116
+ * * This is useful for interfacing with CIP30
1123
1117
  *
1124
- * @returns {Uint8Array}
1118
+ * @param {string} cbor_bytes
1119
+ * @returns {AssetName}
1125
1120
  */
1126
- to_cbor_bytes(): Uint8Array;
1121
+ static from_cbor_hex(cbor_bytes: string): AssetName;
1127
1122
  /**
1128
- *
1129
- * * Serialize this type to CBOR bytes using canonical CBOR encodings
1130
- *
1131
- * @returns {Uint8Array}
1123
+ * @returns {string}
1132
1124
  */
1133
- to_canonical_cbor_bytes(): Uint8Array;
1125
+ to_json(): string;
1126
+ /**
1127
+ * @returns {any}
1128
+ */
1129
+ to_js_value(): any;
1130
+ /**
1131
+ * @param {string} json
1132
+ * @returns {AssetName}
1133
+ */
1134
+ static from_json(json: string): AssetName;
1134
1135
  /**
1135
1136
  *
1136
- * * Create this type from CBOR bytes
1137
- *
1138
- * @param {Uint8Array} cbor_bytes
1137
+ * * Create an AssetName from utf8 string. 64 byte (not char!) maximum.
1138
+ *
1139
+ * @param {string} utf8_str
1139
1140
  * @returns {AssetName}
1140
1141
  */
1141
- static from_cbor_bytes(cbor_bytes: Uint8Array): AssetName;
1142
+ static from_str(utf8_str: string): AssetName;
1142
1143
  /**
1143
1144
  *
1144
- * * Serialize this type to CBOR bytes encoded as a hex string (useful for working with CIP30).
1145
- * * This type type supports encoding preservation so this will preserve round-trip CBOR formats.
1146
- * * If created from scratch the CBOR will be canonical.
1147
- *
1145
+ * * AssetName as a utf8 string if it's possible. Will error if the asset is not utf8
1146
+ *
1148
1147
  * @returns {string}
1149
1148
  */
1150
- to_cbor_hex(): string;
1149
+ to_str(): string;
1151
1150
  /**
1152
1151
  *
1153
- * * Serialize this type to CBOR bytes using canonical CBOR encodings as hex bytes
1152
+ * * Direct raw bytes without any CBOR structure
1154
1153
  *
1155
- * @returns {string}
1154
+ * @returns {Uint8Array}
1156
1155
  */
1157
- to_canonical_cbor_hex(): string;
1156
+ to_raw_bytes(): Uint8Array;
1158
1157
  /**
1159
1158
  *
1160
- * * Create this type from the CBOR bytes encoded as a hex string.
1161
- * * This is useful for interfacing with CIP30
1159
+ * * Parse from the direct raw bytes, without any CBOR structure
1162
1160
  *
1163
- * @param {string} cbor_bytes
1161
+ * @param {Uint8Array} bytes
1164
1162
  * @returns {AssetName}
1165
1163
  */
1166
- static from_cbor_hex(cbor_bytes: string): AssetName;
1164
+ static from_raw_bytes(bytes: Uint8Array): AssetName;
1167
1165
  /**
1166
+ *
1167
+ * * Direct raw bytes without any CBOR structure, as a hex-encoded string
1168
+ *
1168
1169
  * @returns {string}
1169
1170
  */
1170
- to_json(): string;
1171
- /**
1172
- * @returns {any}
1173
- */
1174
- to_js_value(): any;
1171
+ to_hex(): string;
1175
1172
  /**
1176
- * @param {string} json
1173
+ *
1174
+ * * Parse from a hex string of the direct raw bytes, without any CBOR structure
1175
+ *
1176
+ * @param {string} input
1177
1177
  * @returns {AssetName}
1178
1178
  */
1179
- static from_json(json: string): AssetName;
1179
+ static from_hex(input: string): AssetName;
1180
1180
  }
1181
1181
  /**
1182
1182
  */
@@ -1286,6 +1286,54 @@ export class AuthCommitteeHotCert {
1286
1286
  export class AuxiliaryData {
1287
1287
  free(): void;
1288
1288
  /**
1289
+ * @returns {AuxiliaryData}
1290
+ */
1291
+ static new(): AuxiliaryData;
1292
+ /**
1293
+ * @returns {Metadata | undefined}
1294
+ */
1295
+ metadata(): Metadata | undefined;
1296
+ /**
1297
+ * @returns {NativeScriptList | undefined}
1298
+ */
1299
+ native_scripts(): NativeScriptList | undefined;
1300
+ /**
1301
+ * @returns {PlutusV1ScriptList | undefined}
1302
+ */
1303
+ plutus_v1_scripts(): PlutusV1ScriptList | undefined;
1304
+ /**
1305
+ * @returns {PlutusV2ScriptList | undefined}
1306
+ */
1307
+ plutus_v2_scripts(): PlutusV2ScriptList | undefined;
1308
+ /**
1309
+ * Warning: overwrites any conflicting metadatum labels present
1310
+ * @param {Metadata} other
1311
+ */
1312
+ add_metadata(other: Metadata): void;
1313
+ /**
1314
+ * Warning: does not check for duplicates and may migrate eras
1315
+ * @param {NativeScriptList} scripts
1316
+ */
1317
+ add_native_scripts(scripts: NativeScriptList): void;
1318
+ /**
1319
+ * Warning: does not check for duplicates and may migrate eras
1320
+ * @param {PlutusV1ScriptList} scripts
1321
+ */
1322
+ add_plutus_v1_scripts(scripts: PlutusV1ScriptList): void;
1323
+ /**
1324
+ * Warning: does not check for duplicates and may migrate eras
1325
+ * @param {PlutusV2ScriptList} scripts
1326
+ */
1327
+ add_plutus_v2_scripts(scripts: PlutusV2ScriptList): void;
1328
+ /**
1329
+ * Adds everything present in other to self
1330
+ * May change the era the aux data is in if necessary
1331
+ * Warning: overwrites any metadatum labels present
1332
+ * also does not check for duplicates in scripts
1333
+ * @param {AuxiliaryData} other
1334
+ */
1335
+ add(other: AuxiliaryData): void;
1336
+ /**
1289
1337
  *
1290
1338
  * * Serialize this type to CBOR bytes
1291
1339
  * * This type type supports encoding preservation so this will preserve round-trip CBOR formats.
@@ -1378,54 +1426,6 @@ export class AuxiliaryData {
1378
1426
  * @returns {ConwayFormatAuxData | undefined}
1379
1427
  */
1380
1428
  as_conway(): ConwayFormatAuxData | undefined;
1381
- /**
1382
- * @returns {AuxiliaryData}
1383
- */
1384
- static new(): AuxiliaryData;
1385
- /**
1386
- * @returns {Metadata | undefined}
1387
- */
1388
- metadata(): Metadata | undefined;
1389
- /**
1390
- * @returns {NativeScriptList | undefined}
1391
- */
1392
- native_scripts(): NativeScriptList | undefined;
1393
- /**
1394
- * @returns {PlutusV1ScriptList | undefined}
1395
- */
1396
- plutus_v1_scripts(): PlutusV1ScriptList | undefined;
1397
- /**
1398
- * @returns {PlutusV2ScriptList | undefined}
1399
- */
1400
- plutus_v2_scripts(): PlutusV2ScriptList | undefined;
1401
- /**
1402
- * Warning: overwrites any conflicting metadatum labels present
1403
- * @param {Metadata} other
1404
- */
1405
- add_metadata(other: Metadata): void;
1406
- /**
1407
- * Warning: does not check for duplicates and may migrate eras
1408
- * @param {NativeScriptList} scripts
1409
- */
1410
- add_native_scripts(scripts: NativeScriptList): void;
1411
- /**
1412
- * Warning: does not check for duplicates and may migrate eras
1413
- * @param {PlutusV1ScriptList} scripts
1414
- */
1415
- add_plutus_v1_scripts(scripts: PlutusV1ScriptList): void;
1416
- /**
1417
- * Warning: does not check for duplicates and may migrate eras
1418
- * @param {PlutusV2ScriptList} scripts
1419
- */
1420
- add_plutus_v2_scripts(scripts: PlutusV2ScriptList): void;
1421
- /**
1422
- * Adds everything present in other to self
1423
- * May change the era the aux data is in if necessary
1424
- * Warning: overwrites any metadatum labels present
1425
- * also does not check for duplicates in scripts
1426
- * @param {AuxiliaryData} other
1427
- */
1428
- add(other: AuxiliaryData): void;
1429
1429
  }
1430
1430
  /**
1431
1431
  */
@@ -6796,6 +6796,24 @@ export class MultiHostName {
6796
6796
  export class NativeScript {
6797
6797
  free(): void;
6798
6798
  /**
6799
+ * Returns an array of unique Ed25519KeyHashes
6800
+ * contained within this script recursively on any depth level.
6801
+ * The order of the keys in the result is not determined in any way.
6802
+ * @returns {Ed25519KeyHashList}
6803
+ */
6804
+ get_required_signers(): Ed25519KeyHashList;
6805
+ /**
6806
+ * @returns {ScriptHash}
6807
+ */
6808
+ hash(): ScriptHash;
6809
+ /**
6810
+ * @param {bigint | undefined} lower_bound
6811
+ * @param {bigint | undefined} upper_bound
6812
+ * @param {Ed25519KeyHashList} key_hashes
6813
+ * @returns {boolean}
6814
+ */
6815
+ verify(lower_bound: bigint | undefined, upper_bound: bigint | undefined, key_hashes: Ed25519KeyHashList): boolean;
6816
+ /**
6799
6817
  *
6800
6818
  * * Serialize this type to CBOR bytes
6801
6819
  * * This type type supports encoding preservation so this will preserve round-trip CBOR formats.
@@ -6918,24 +6936,6 @@ export class NativeScript {
6918
6936
  * @returns {ScriptInvalidHereafter | undefined}
6919
6937
  */
6920
6938
  as_script_invalid_hereafter(): ScriptInvalidHereafter | undefined;
6921
- /**
6922
- * Returns an array of unique Ed25519KeyHashes
6923
- * contained within this script recursively on any depth level.
6924
- * The order of the keys in the result is not determined in any way.
6925
- * @returns {Ed25519KeyHashList}
6926
- */
6927
- get_required_signers(): Ed25519KeyHashList;
6928
- /**
6929
- * @returns {ScriptHash}
6930
- */
6931
- hash(): ScriptHash;
6932
- /**
6933
- * @param {bigint | undefined} lower_bound
6934
- * @param {bigint | undefined} upper_bound
6935
- * @param {Ed25519KeyHashList} key_hashes
6936
- * @returns {boolean}
6937
- */
6938
- verify(lower_bound: bigint | undefined, upper_bound: bigint | undefined, key_hashes: Ed25519KeyHashList): boolean;
6939
6939
  }
6940
6940
  /**
6941
6941
  */
@@ -13062,6 +13062,41 @@ export class TransactionMetadatumList {
13062
13062
  export class TransactionOutput {
13063
13063
  free(): void;
13064
13064
  /**
13065
+ * @param {Address} address
13066
+ * @param {Value} amount
13067
+ * @param {DatumOption | undefined} [datum_option]
13068
+ * @param {Script | undefined} [script_reference]
13069
+ * @returns {TransactionOutput}
13070
+ */
13071
+ static new(address: Address, amount: Value, datum_option?: DatumOption, script_reference?: Script): TransactionOutput;
13072
+ /**
13073
+ * @returns {Address}
13074
+ */
13075
+ address(): Address;
13076
+ /**
13077
+ * @returns {Value}
13078
+ */
13079
+ amount(): Value;
13080
+ /**
13081
+ * @param {Value} amount
13082
+ */
13083
+ set_amount(amount: Value): void;
13084
+ /**
13085
+ * @returns {DatumOption | undefined}
13086
+ */
13087
+ datum(): DatumOption | undefined;
13088
+ /**
13089
+ * Get the datum hash from a tx output if present as a hash.
13090
+ * Returns None if there is no datum, or the datum is inlined.
13091
+ * Use TransactionOutput::datum() for inlined datums.
13092
+ * @returns {DatumHash | undefined}
13093
+ */
13094
+ datum_hash(): DatumHash | undefined;
13095
+ /**
13096
+ * @returns {Script | undefined}
13097
+ */
13098
+ script_ref(): Script | undefined;
13099
+ /**
13065
13100
  *
13066
13101
  * * Serialize this type to CBOR bytes
13067
13102
  * * This type type supports encoding preservation so this will preserve round-trip CBOR formats.
@@ -13145,41 +13180,6 @@ export class TransactionOutput {
13145
13180
  * @returns {ConwayFormatTxOut | undefined}
13146
13181
  */
13147
13182
  as_conway_format_tx_out(): ConwayFormatTxOut | undefined;
13148
- /**
13149
- * @param {Address} address
13150
- * @param {Value} amount
13151
- * @param {DatumOption | undefined} [datum_option]
13152
- * @param {Script | undefined} [script_reference]
13153
- * @returns {TransactionOutput}
13154
- */
13155
- static new(address: Address, amount: Value, datum_option?: DatumOption, script_reference?: Script): TransactionOutput;
13156
- /**
13157
- * @returns {Address}
13158
- */
13159
- address(): Address;
13160
- /**
13161
- * @returns {Value}
13162
- */
13163
- amount(): Value;
13164
- /**
13165
- * @param {Value} amount
13166
- */
13167
- set_amount(amount: Value): void;
13168
- /**
13169
- * @returns {DatumOption | undefined}
13170
- */
13171
- datum(): DatumOption | undefined;
13172
- /**
13173
- * Get the datum hash from a tx output if present as a hash.
13174
- * Returns None if there is no datum, or the datum is inlined.
13175
- * Use TransactionOutput::datum() for inlined datums.
13176
- * @returns {DatumHash | undefined}
13177
- */
13178
- datum_hash(): DatumHash | undefined;
13179
- /**
13180
- * @returns {Script | undefined}
13181
- */
13182
- script_ref(): Script | undefined;
13183
13183
  }
13184
13184
  /**
13185
13185
  */
@@ -13322,6 +13322,14 @@ export class TransactionUnspentOutput {
13322
13322
  export class TransactionWitnessSet {
13323
13323
  free(): void;
13324
13324
  /**
13325
+ * @param {TransactionWitnessSet} other
13326
+ */
13327
+ add_all_witnesses(other: TransactionWitnessSet): void;
13328
+ /**
13329
+ * @returns {LanguageList}
13330
+ */
13331
+ languages(): LanguageList;
13332
+ /**
13325
13333
  *
13326
13334
  * * Serialize this type to CBOR bytes
13327
13335
  * * This type type supports encoding preservation so this will preserve round-trip CBOR formats.
@@ -13451,14 +13459,6 @@ export class TransactionWitnessSet {
13451
13459
  * @returns {TransactionWitnessSet}
13452
13460
  */
13453
13461
  static new(): TransactionWitnessSet;
13454
- /**
13455
- * @param {TransactionWitnessSet} other
13456
- */
13457
- add_all_witnesses(other: TransactionWitnessSet): void;
13458
- /**
13459
- * @returns {LanguageList}
13460
- */
13461
- languages(): LanguageList;
13462
13462
  }
13463
13463
  /**
13464
13464
  * Builder de-duplicates witnesses as they are added