@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.
@@ -60,27 +60,6 @@ function handleError(f, args) {
60
60
 
61
61
  let WASM_VECTOR_LEN = 0;
62
62
 
63
- function passArray8ToWasm0(arg, malloc) {
64
- const ptr = malloc(arg.length * 1, 1) >>> 0;
65
- getUint8Memory0().set(arg, ptr / 1);
66
- WASM_VECTOR_LEN = arg.length;
67
- return ptr;
68
- }
69
-
70
- let cachedInt32Memory0 = null;
71
-
72
- function getInt32Memory0() {
73
- if (cachedInt32Memory0 === null || cachedInt32Memory0.byteLength === 0) {
74
- cachedInt32Memory0 = new Int32Array(wasm.memory.buffer);
75
- }
76
- return cachedInt32Memory0;
77
- }
78
-
79
- function getArrayU8FromWasm0(ptr, len) {
80
- ptr = ptr >>> 0;
81
- return getUint8Memory0().subarray(ptr / 1, ptr / 1 + len);
82
- }
83
-
84
63
  let cachedTextEncoder = new TextEncoder('utf-8');
85
64
 
86
65
  const encodeString = (typeof cachedTextEncoder.encodeInto === 'function'
@@ -135,11 +114,25 @@ function passStringToWasm0(arg, malloc, realloc) {
135
114
  return ptr;
136
115
  }
137
116
 
138
- function _assertClass(instance, klass) {
139
- if (!(instance instanceof klass)) {
140
- throw new Error(`expected instance of ${klass.name}`);
117
+ let cachedInt32Memory0 = null;
118
+
119
+ function getInt32Memory0() {
120
+ if (cachedInt32Memory0 === null || cachedInt32Memory0.byteLength === 0) {
121
+ cachedInt32Memory0 = new Int32Array(wasm.memory.buffer);
141
122
  }
142
- return instance.ptr;
123
+ return cachedInt32Memory0;
124
+ }
125
+
126
+ function getArrayU8FromWasm0(ptr, len) {
127
+ ptr = ptr >>> 0;
128
+ return getUint8Memory0().subarray(ptr / 1, ptr / 1 + len);
129
+ }
130
+
131
+ function passArray8ToWasm0(arg, malloc) {
132
+ const ptr = malloc(arg.length * 1, 1) >>> 0;
133
+ getUint8Memory0().set(arg, ptr / 1);
134
+ WASM_VECTOR_LEN = arg.length;
135
+ return ptr;
143
136
  }
144
137
  /**
145
138
  * Encrypt using Emip3: https://github.com/Emurgo/EmIPs/blob/master/specs/emip-003.md
@@ -217,6 +210,17 @@ module.exports.emip3_decrypt_with_password = function(password, data) {
217
210
  }
218
211
  };
219
212
 
213
+ function _assertClass(instance, klass) {
214
+ if (!(instance instanceof klass)) {
215
+ throw new Error(`expected instance of ${klass.name}`);
216
+ }
217
+ return instance.ptr;
218
+ }
219
+
220
+ function isLikeNone(x) {
221
+ return x === undefined || x === null;
222
+ }
223
+
220
224
  let cachedUint16Memory0 = null;
221
225
 
222
226
  function getUint16Memory0() {
@@ -238,10 +242,6 @@ function passArray16ToWasm0(arg, malloc) {
238
242
  return ptr;
239
243
  }
240
244
 
241
- function isLikeNone(x) {
242
- return x === undefined || x === null;
243
- }
244
-
245
245
  let cachedBigInt64Memory0 = null;
246
246
 
247
247
  function getBigInt64Memory0() {
@@ -250,6 +250,183 @@ function getBigInt64Memory0() {
250
250
  }
251
251
  return cachedBigInt64Memory0;
252
252
  }
253
+ /**
254
+ *
255
+ * * Min fee for JUST the script
256
+ *
257
+ * @param {Transaction} tx
258
+ * @param {ExUnitPrices} ex_unit_prices
259
+ * @returns {bigint}
260
+ */
261
+ module.exports.min_script_fee = function(tx, ex_unit_prices) {
262
+ try {
263
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
264
+ _assertClass(tx, Transaction);
265
+ _assertClass(ex_unit_prices, ExUnitPrices);
266
+ wasm.min_script_fee(retptr, tx.__wbg_ptr, ex_unit_prices.__wbg_ptr);
267
+ var r0 = getBigInt64Memory0()[retptr / 8 + 0];
268
+ var r2 = getInt32Memory0()[retptr / 4 + 2];
269
+ var r3 = getInt32Memory0()[retptr / 4 + 3];
270
+ if (r3) {
271
+ throw takeObject(r2);
272
+ }
273
+ return BigInt.asUintN(64, r0);
274
+ } finally {
275
+ wasm.__wbindgen_add_to_stack_pointer(16);
276
+ }
277
+ };
278
+
279
+ /**
280
+ * @param {Transaction} tx
281
+ * @param {LinearFee} linear_fee
282
+ * @returns {bigint}
283
+ */
284
+ module.exports.min_no_script_fee = function(tx, linear_fee) {
285
+ try {
286
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
287
+ _assertClass(tx, Transaction);
288
+ _assertClass(linear_fee, LinearFee);
289
+ wasm.min_no_script_fee(retptr, tx.__wbg_ptr, linear_fee.__wbg_ptr);
290
+ var r0 = getBigInt64Memory0()[retptr / 8 + 0];
291
+ var r2 = getInt32Memory0()[retptr / 4 + 2];
292
+ var r3 = getInt32Memory0()[retptr / 4 + 3];
293
+ if (r3) {
294
+ throw takeObject(r2);
295
+ }
296
+ return BigInt.asUintN(64, r0);
297
+ } finally {
298
+ wasm.__wbindgen_add_to_stack_pointer(16);
299
+ }
300
+ };
301
+
302
+ /**
303
+ * @param {Transaction} tx
304
+ * @param {LinearFee} linear_fee
305
+ * @param {ExUnitPrices} ex_unit_prices
306
+ * @returns {bigint}
307
+ */
308
+ module.exports.min_fee = function(tx, linear_fee, ex_unit_prices) {
309
+ try {
310
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
311
+ _assertClass(tx, Transaction);
312
+ _assertClass(linear_fee, LinearFee);
313
+ _assertClass(ex_unit_prices, ExUnitPrices);
314
+ wasm.min_fee(retptr, tx.__wbg_ptr, linear_fee.__wbg_ptr, ex_unit_prices.__wbg_ptr);
315
+ var r0 = getBigInt64Memory0()[retptr / 8 + 0];
316
+ var r2 = getInt32Memory0()[retptr / 4 + 2];
317
+ var r3 = getInt32Memory0()[retptr / 4 + 3];
318
+ if (r3) {
319
+ throw takeObject(r2);
320
+ }
321
+ return BigInt.asUintN(64, r0);
322
+ } finally {
323
+ wasm.__wbindgen_add_to_stack_pointer(16);
324
+ }
325
+ };
326
+
327
+ /**
328
+ * encodes arbitrary bytes into chunks of 64 bytes (the limit for bytes) as a list to be valid Metadata
329
+ * @param {Uint8Array} bytes
330
+ * @returns {TransactionMetadatum}
331
+ */
332
+ module.exports.encode_arbitrary_bytes_as_metadatum = function(bytes) {
333
+ const ptr0 = passArray8ToWasm0(bytes, wasm.__wbindgen_malloc);
334
+ const len0 = WASM_VECTOR_LEN;
335
+ const ret = wasm.encode_arbitrary_bytes_as_metadatum(ptr0, len0);
336
+ return TransactionMetadatum.__wrap(ret);
337
+ };
338
+
339
+ /**
340
+ * decodes from chunks of bytes in a list to a byte vector if that is the metadata format, otherwise returns None
341
+ * @param {TransactionMetadatum} metadata
342
+ * @returns {Uint8Array | undefined}
343
+ */
344
+ module.exports.decode_arbitrary_bytes_from_metadatum = function(metadata) {
345
+ try {
346
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
347
+ _assertClass(metadata, TransactionMetadatum);
348
+ wasm.decode_arbitrary_bytes_from_metadatum(retptr, metadata.__wbg_ptr);
349
+ var r0 = getInt32Memory0()[retptr / 4 + 0];
350
+ var r1 = getInt32Memory0()[retptr / 4 + 1];
351
+ let v1;
352
+ if (r0 !== 0) {
353
+ v1 = getArrayU8FromWasm0(r0, r1).slice();
354
+ wasm.__wbindgen_free(r0, r1 * 1, 1);
355
+ }
356
+ return v1;
357
+ } finally {
358
+ wasm.__wbindgen_add_to_stack_pointer(16);
359
+ }
360
+ };
361
+
362
+ /**
363
+ * @param {TransactionHash} tx_body_hash
364
+ * @param {PrivateKey} sk
365
+ * @returns {Vkeywitness}
366
+ */
367
+ module.exports.make_vkey_witness = function(tx_body_hash, sk) {
368
+ _assertClass(tx_body_hash, TransactionHash);
369
+ _assertClass(sk, PrivateKey);
370
+ const ret = wasm.make_vkey_witness(tx_body_hash.__wbg_ptr, sk.__wbg_ptr);
371
+ return Vkeywitness.__wrap(ret);
372
+ };
373
+
374
+ /**
375
+ * Converts JSON to Metadata according to MetadataJsonSchema
376
+ * @param {string} json
377
+ * @param {MetadataJsonSchema} schema
378
+ * @returns {TransactionMetadatum}
379
+ */
380
+ module.exports.encode_json_str_to_metadatum = function(json, schema) {
381
+ try {
382
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
383
+ const ptr0 = passStringToWasm0(json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
384
+ const len0 = WASM_VECTOR_LEN;
385
+ wasm.encode_json_str_to_metadatum(retptr, ptr0, len0, schema);
386
+ var r0 = getInt32Memory0()[retptr / 4 + 0];
387
+ var r1 = getInt32Memory0()[retptr / 4 + 1];
388
+ var r2 = getInt32Memory0()[retptr / 4 + 2];
389
+ if (r2) {
390
+ throw takeObject(r1);
391
+ }
392
+ return TransactionMetadatum.__wrap(r0);
393
+ } finally {
394
+ wasm.__wbindgen_add_to_stack_pointer(16);
395
+ }
396
+ };
397
+
398
+ /**
399
+ * Converts Metadata to JSON according to MetadataJsonSchema
400
+ * @param {TransactionMetadatum} metadatum
401
+ * @param {MetadataJsonSchema} schema
402
+ * @returns {string}
403
+ */
404
+ module.exports.decode_metadatum_to_json_str = function(metadatum, schema) {
405
+ let deferred2_0;
406
+ let deferred2_1;
407
+ try {
408
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
409
+ _assertClass(metadatum, TransactionMetadatum);
410
+ wasm.decode_metadatum_to_json_str(retptr, metadatum.__wbg_ptr, schema);
411
+ var r0 = getInt32Memory0()[retptr / 4 + 0];
412
+ var r1 = getInt32Memory0()[retptr / 4 + 1];
413
+ var r2 = getInt32Memory0()[retptr / 4 + 2];
414
+ var r3 = getInt32Memory0()[retptr / 4 + 3];
415
+ var ptr1 = r0;
416
+ var len1 = r1;
417
+ if (r3) {
418
+ ptr1 = 0; len1 = 0;
419
+ throw takeObject(r2);
420
+ }
421
+ deferred2_0 = ptr1;
422
+ deferred2_1 = len1;
423
+ return getStringFromWasm0(ptr1, len1);
424
+ } finally {
425
+ wasm.__wbindgen_add_to_stack_pointer(16);
426
+ wasm.__wbindgen_free(deferred2_0, deferred2_1, 1);
427
+ }
428
+ };
429
+
253
430
  /**
254
431
  * @param {TransactionHash} tx_body_hash
255
432
  * @param {ByronAddress} addr
@@ -404,172 +581,40 @@ module.exports.calc_script_data_hash_from_witness = function(witnesses, cost_mod
404
581
  };
405
582
 
406
583
  /**
407
- * @param {Redeemers} redeemers
408
- * @returns {ExUnits}
409
- */
410
- module.exports.compute_total_ex_units = function(redeemers) {
411
- try {
412
- const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
413
- _assertClass(redeemers, Redeemers);
414
- wasm.compute_total_ex_units(retptr, redeemers.__wbg_ptr);
415
- var r0 = getInt32Memory0()[retptr / 4 + 0];
416
- var r1 = getInt32Memory0()[retptr / 4 + 1];
417
- var r2 = getInt32Memory0()[retptr / 4 + 2];
418
- if (r2) {
419
- throw takeObject(r1);
420
- }
421
- return ExUnits.__wrap(r0);
422
- } finally {
423
- wasm.__wbindgen_add_to_stack_pointer(16);
424
- }
425
- };
426
-
427
- /**
428
- * encodes arbitrary bytes into chunks of 64 bytes (the limit for bytes) as a list to be valid Metadata
429
- * @param {Uint8Array} bytes
430
- * @returns {TransactionMetadatum}
431
- */
432
- module.exports.encode_arbitrary_bytes_as_metadatum = function(bytes) {
433
- const ptr0 = passArray8ToWasm0(bytes, wasm.__wbindgen_malloc);
434
- const len0 = WASM_VECTOR_LEN;
435
- const ret = wasm.encode_arbitrary_bytes_as_metadatum(ptr0, len0);
436
- return TransactionMetadatum.__wrap(ret);
437
- };
438
-
439
- /**
440
- * decodes from chunks of bytes in a list to a byte vector if that is the metadata format, otherwise returns None
441
- * @param {TransactionMetadatum} metadata
442
- * @returns {Uint8Array | undefined}
443
- */
444
- module.exports.decode_arbitrary_bytes_from_metadatum = function(metadata) {
445
- try {
446
- const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
447
- _assertClass(metadata, TransactionMetadatum);
448
- wasm.decode_arbitrary_bytes_from_metadatum(retptr, metadata.__wbg_ptr);
449
- var r0 = getInt32Memory0()[retptr / 4 + 0];
450
- var r1 = getInt32Memory0()[retptr / 4 + 1];
451
- let v1;
452
- if (r0 !== 0) {
453
- v1 = getArrayU8FromWasm0(r0, r1).slice();
454
- wasm.__wbindgen_free(r0, r1 * 1, 1);
455
- }
456
- return v1;
457
- } finally {
458
- wasm.__wbindgen_add_to_stack_pointer(16);
459
- }
460
- };
461
-
462
- /**
463
- *
464
- * * Min fee for JUST the script
465
- *
466
- * @param {Transaction} tx
467
- * @param {ExUnitPrices} ex_unit_prices
468
- * @returns {bigint}
469
- */
470
- module.exports.min_script_fee = function(tx, ex_unit_prices) {
471
- try {
472
- const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
473
- _assertClass(tx, Transaction);
474
- _assertClass(ex_unit_prices, ExUnitPrices);
475
- wasm.min_script_fee(retptr, tx.__wbg_ptr, ex_unit_prices.__wbg_ptr);
476
- var r0 = getBigInt64Memory0()[retptr / 8 + 0];
477
- var r2 = getInt32Memory0()[retptr / 4 + 2];
478
- var r3 = getInt32Memory0()[retptr / 4 + 3];
479
- if (r3) {
480
- throw takeObject(r2);
481
- }
482
- return BigInt.asUintN(64, r0);
483
- } finally {
484
- wasm.__wbindgen_add_to_stack_pointer(16);
485
- }
486
- };
487
-
488
- /**
489
- * @param {Transaction} tx
490
- * @param {LinearFee} linear_fee
491
- * @returns {bigint}
492
- */
493
- module.exports.min_no_script_fee = function(tx, linear_fee) {
494
- try {
495
- const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
496
- _assertClass(tx, Transaction);
497
- _assertClass(linear_fee, LinearFee);
498
- wasm.min_no_script_fee(retptr, tx.__wbg_ptr, linear_fee.__wbg_ptr);
499
- var r0 = getBigInt64Memory0()[retptr / 8 + 0];
500
- var r2 = getInt32Memory0()[retptr / 4 + 2];
501
- var r3 = getInt32Memory0()[retptr / 4 + 3];
502
- if (r3) {
503
- throw takeObject(r2);
504
- }
505
- return BigInt.asUintN(64, r0);
506
- } finally {
507
- wasm.__wbindgen_add_to_stack_pointer(16);
508
- }
509
- };
510
-
511
- /**
512
- * @param {Transaction} tx
513
- * @param {LinearFee} linear_fee
514
- * @param {ExUnitPrices} ex_unit_prices
515
- * @returns {bigint}
516
- */
517
- module.exports.min_fee = function(tx, linear_fee, ex_unit_prices) {
518
- try {
519
- const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
520
- _assertClass(tx, Transaction);
521
- _assertClass(linear_fee, LinearFee);
522
- _assertClass(ex_unit_prices, ExUnitPrices);
523
- wasm.min_fee(retptr, tx.__wbg_ptr, linear_fee.__wbg_ptr, ex_unit_prices.__wbg_ptr);
524
- var r0 = getBigInt64Memory0()[retptr / 8 + 0];
525
- var r2 = getInt32Memory0()[retptr / 4 + 2];
526
- var r3 = getInt32Memory0()[retptr / 4 + 3];
527
- if (r3) {
528
- throw takeObject(r2);
529
- }
530
- return BigInt.asUintN(64, r0);
531
- } finally {
532
- wasm.__wbindgen_add_to_stack_pointer(16);
533
- }
534
- };
535
-
536
- /**
537
- * Converts JSON to Metadata according to MetadataJsonSchema
538
584
  * @param {string} json
539
- * @param {MetadataJsonSchema} schema
540
- * @returns {TransactionMetadatum}
585
+ * @param {CardanoNodePlutusDatumSchema} schema
586
+ * @returns {PlutusData}
541
587
  */
542
- module.exports.encode_json_str_to_metadatum = function(json, schema) {
588
+ module.exports.encode_json_str_to_plutus_datum = function(json, schema) {
543
589
  try {
544
590
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
545
591
  const ptr0 = passStringToWasm0(json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
546
592
  const len0 = WASM_VECTOR_LEN;
547
- wasm.encode_json_str_to_metadatum(retptr, ptr0, len0, schema);
593
+ wasm.encode_json_str_to_plutus_datum(retptr, ptr0, len0, schema);
548
594
  var r0 = getInt32Memory0()[retptr / 4 + 0];
549
595
  var r1 = getInt32Memory0()[retptr / 4 + 1];
550
596
  var r2 = getInt32Memory0()[retptr / 4 + 2];
551
597
  if (r2) {
552
598
  throw takeObject(r1);
553
599
  }
554
- return TransactionMetadatum.__wrap(r0);
600
+ return PlutusData.__wrap(r0);
555
601
  } finally {
556
602
  wasm.__wbindgen_add_to_stack_pointer(16);
557
603
  }
558
604
  };
559
605
 
560
606
  /**
561
- * Converts Metadata to JSON according to MetadataJsonSchema
562
- * @param {TransactionMetadatum} metadatum
563
- * @param {MetadataJsonSchema} schema
607
+ * @param {PlutusData} datum
608
+ * @param {CardanoNodePlutusDatumSchema} schema
564
609
  * @returns {string}
565
610
  */
566
- module.exports.decode_metadatum_to_json_str = function(metadatum, schema) {
611
+ module.exports.decode_plutus_datum_to_json_str = function(datum, schema) {
567
612
  let deferred2_0;
568
613
  let deferred2_1;
569
614
  try {
570
615
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
571
- _assertClass(metadatum, TransactionMetadatum);
572
- wasm.decode_metadatum_to_json_str(retptr, metadatum.__wbg_ptr, schema);
616
+ _assertClass(datum, PlutusData);
617
+ wasm.decode_plutus_datum_to_json_str(retptr, datum.__wbg_ptr, schema);
573
618
  var r0 = getInt32Memory0()[retptr / 4 + 0];
574
619
  var r1 = getInt32Memory0()[retptr / 4 + 1];
575
620
  var r2 = getInt32Memory0()[retptr / 4 + 2];
@@ -589,18 +634,6 @@ module.exports.decode_metadatum_to_json_str = function(metadatum, schema) {
589
634
  }
590
635
  };
591
636
 
592
- /**
593
- * @param {TransactionHash} tx_body_hash
594
- * @param {PrivateKey} sk
595
- * @returns {Vkeywitness}
596
- */
597
- module.exports.make_vkey_witness = function(tx_body_hash, sk) {
598
- _assertClass(tx_body_hash, TransactionHash);
599
- _assertClass(sk, PrivateKey);
600
- const ret = wasm.make_vkey_witness(tx_body_hash.__wbg_ptr, sk.__wbg_ptr);
601
- return Vkeywitness.__wrap(ret);
602
- };
603
-
604
637
  /**
605
638
  * @param {TransactionBody} txbody
606
639
  * @param {bigint} pool_deposit
@@ -683,102 +716,43 @@ function getArrayU32FromWasm0(ptr, len) {
683
716
  return getUint32Memory0().subarray(ptr / 4, ptr / 4 + len);
684
717
  }
685
718
  /**
686
- * @param {string} json
687
- * @param {CardanoNodePlutusDatumSchema} schema
688
- * @returns {PlutusData}
719
+ * @param {Redeemers} redeemers
720
+ * @returns {ExUnits}
689
721
  */
690
- module.exports.encode_json_str_to_plutus_datum = function(json, schema) {
722
+ module.exports.compute_total_ex_units = function(redeemers) {
691
723
  try {
692
724
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
693
- const ptr0 = passStringToWasm0(json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
694
- const len0 = WASM_VECTOR_LEN;
695
- wasm.encode_json_str_to_plutus_datum(retptr, ptr0, len0, schema);
725
+ _assertClass(redeemers, Redeemers);
726
+ wasm.compute_total_ex_units(retptr, redeemers.__wbg_ptr);
696
727
  var r0 = getInt32Memory0()[retptr / 4 + 0];
697
728
  var r1 = getInt32Memory0()[retptr / 4 + 1];
698
729
  var r2 = getInt32Memory0()[retptr / 4 + 2];
699
730
  if (r2) {
700
731
  throw takeObject(r1);
701
732
  }
702
- return PlutusData.__wrap(r0);
703
- } finally {
704
- wasm.__wbindgen_add_to_stack_pointer(16);
705
- }
706
- };
707
-
708
- /**
709
- * @param {PlutusData} datum
710
- * @param {CardanoNodePlutusDatumSchema} schema
711
- * @returns {string}
712
- */
713
- module.exports.decode_plutus_datum_to_json_str = function(datum, schema) {
714
- let deferred2_0;
715
- let deferred2_1;
716
- try {
717
- const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
718
- _assertClass(datum, PlutusData);
719
- wasm.decode_plutus_datum_to_json_str(retptr, datum.__wbg_ptr, schema);
720
- var r0 = getInt32Memory0()[retptr / 4 + 0];
721
- var r1 = getInt32Memory0()[retptr / 4 + 1];
722
- var r2 = getInt32Memory0()[retptr / 4 + 2];
723
- var r3 = getInt32Memory0()[retptr / 4 + 3];
724
- var ptr1 = r0;
725
- var len1 = r1;
726
- if (r3) {
727
- ptr1 = 0; len1 = 0;
728
- throw takeObject(r2);
729
- }
730
- deferred2_0 = ptr1;
731
- deferred2_1 = len1;
732
- return getStringFromWasm0(ptr1, len1);
733
+ return ExUnits.__wrap(r0);
733
734
  } finally {
734
735
  wasm.__wbindgen_add_to_stack_pointer(16);
735
- wasm.__wbindgen_free(deferred2_0, deferred2_1, 1);
736
736
  }
737
737
  };
738
738
 
739
- function getArrayI64FromWasm0(ptr, len) {
740
- ptr = ptr >>> 0;
741
- return getBigInt64Memory0().subarray(ptr / 8, ptr / 8 + len);
742
- }
743
-
744
- let cachedBigUint64Memory0 = null;
745
-
746
- function getBigUint64Memory0() {
747
- if (cachedBigUint64Memory0 === null || cachedBigUint64Memory0.byteLength === 0) {
748
- cachedBigUint64Memory0 = new BigUint64Array(wasm.memory.buffer);
749
- }
750
- return cachedBigUint64Memory0;
751
- }
752
-
753
- function passArray64ToWasm0(arg, malloc) {
754
- const ptr = malloc(arg.length * 8, 8) >>> 0;
755
- getBigUint64Memory0().set(arg, ptr / 8);
756
- WASM_VECTOR_LEN = arg.length;
757
- return ptr;
758
- }
759
-
760
- function getArrayU64FromWasm0(ptr, len) {
761
- ptr = ptr >>> 0;
762
- return getBigUint64Memory0().subarray(ptr / 8, ptr / 8 + len);
763
- }
764
739
  /**
765
740
  */
766
- module.exports.NativeScriptKind = Object.freeze({ ScriptPubkey:0,"0":"ScriptPubkey",ScriptAll:1,"1":"ScriptAll",ScriptAny:2,"2":"ScriptAny",ScriptNOfK:3,"3":"ScriptNOfK",ScriptInvalidBefore:4,"4":"ScriptInvalidBefore",ScriptInvalidHereafter:5,"5":"ScriptInvalidHereafter", });
767
- /**
768
- */
769
- module.exports.DelegationDistributionKind = Object.freeze({ Weighted:0,"0":"Weighted",Legacy:1,"1":"Legacy", });
770
- /**
771
- */
772
- module.exports.TransactionMetadatumKind = Object.freeze({ Map:0,"0":"Map",List:1,"1":"List",Int:2,"2":"Int",Bytes:3,"3":"Bytes",Text:4,"4":"Text", });
741
+ module.exports.MetadataJsonSchema = Object.freeze({ NoConversions:0,"0":"NoConversions",BasicConversions:1,"1":"BasicConversions",DetailedSchema:2,"2":"DetailedSchema", });
773
742
  /**
743
+ * Which version of the CIP25 spec to use. See CIP25 for details.
744
+ * This will change how things are encoded but for the most part contains
745
+ * the same information.
774
746
  */
775
- module.exports.PlutusDataKind = Object.freeze({ ConstrPlutusData:0,"0":"ConstrPlutusData",Map:1,"1":"Map",List:2,"2":"List",Integer:3,"3":"Integer",Bytes:4,"4":"Bytes", });
747
+ module.exports.CIP25Version = Object.freeze({
776
748
  /**
749
+ * Initial version of CIP25 with only string (utf8) asset names allowed.
777
750
  */
778
- module.exports.NonceKind = Object.freeze({ Identity:0,"0":"Identity",Hash:1,"1":"Hash", });
751
+ V1:0,"0":"V1",
779
752
  /**
753
+ * Second version of CIP25. Supports any type of asset names.
780
754
  */
781
- module.exports.ChunkableStringKind = Object.freeze({ Single:0,"0":"Single",Chunked:1,"1":"Chunked", });
755
+ V2:1,"1":"V2", });
782
756
  /**
783
757
  * JSON <-> PlutusData conversion schemas.
784
758
  * Follows ScriptDataJsonSchema in cardano-cli defined at:
@@ -832,103 +806,104 @@ BasicConversions:0,"0":"BasicConversions",
832
806
  DetailedSchema:1,"1":"DetailedSchema", });
833
807
  /**
834
808
  */
835
- module.exports.RedeemerTag = Object.freeze({ Spend:0,"0":"Spend",Mint:1,"1":"Mint",Cert:2,"2":"Cert",Reward:3,"3":"Reward",Voting:4,"4":"Voting",Proposing:5,"5":"Proposing", });
809
+ module.exports.ByronAddrType = Object.freeze({ PublicKey:0,"0":"PublicKey",Script:1,"1":"Script",Redeem:2,"2":"Redeem", });
836
810
  /**
837
811
  */
838
- module.exports.RedeemersKind = Object.freeze({ ArrLegacyRedeemer:0,"0":"ArrLegacyRedeemer",MapRedeemerKeyToRedeemerVal:1,"1":"MapRedeemerKeyToRedeemerVal", });
812
+ module.exports.DRepKind = Object.freeze({ Key:0,"0":"Key",Script:1,"1":"Script",AlwaysAbstain:2,"2":"AlwaysAbstain",AlwaysNoConfidence:3,"3":"AlwaysNoConfidence", });
839
813
  /**
840
- * Careful: this enum doesn't include the network ID part of the header
841
- * ex: base address isn't 0b0000_0000 but instead 0b0000
842
- * Use `header_matches_kind` if you don't want to implement the bitwise operators yourself
843
814
  */
844
- module.exports.AddressHeaderKind = Object.freeze({ BasePaymentKeyStakeKey:0,"0":"BasePaymentKeyStakeKey",BasePaymentScriptStakeKey:1,"1":"BasePaymentScriptStakeKey",BasePaymentKeyStakeScript:2,"2":"BasePaymentKeyStakeScript",BasePaymentScriptStakeScript:3,"3":"BasePaymentScriptStakeScript",PointerKey:4,"4":"PointerKey",PointerScript:5,"5":"PointerScript",EnterpriseKey:6,"6":"EnterpriseKey",EnterpriseScript:7,"7":"EnterpriseScript",Byron:8,"8":"Byron",RewardKey:14,"14":"RewardKey",RewardScript:15,"15":"RewardScript", });
815
+ module.exports.ChangeSelectionAlgo = Object.freeze({ Default:0,"0":"Default", });
845
816
  /**
846
817
  */
847
- module.exports.RelayKind = Object.freeze({ SingleHostAddr:0,"0":"SingleHostAddr",SingleHostName:1,"1":"SingleHostName",MultiHostName:2,"2":"MultiHostName", });
818
+ module.exports.AddressKind = Object.freeze({ Base:0,"0":"Base",Ptr:1,"1":"Ptr",Enterprise:2,"2":"Enterprise",Reward:3,"3":"Reward",Byron:4,"4":"Byron", });
848
819
  /**
849
820
  */
850
- module.exports.ChangeSelectionAlgo = Object.freeze({ Default:0,"0":"Default", });
821
+ module.exports.DatumOptionKind = Object.freeze({ Hash:0,"0":"Hash",Datum:1,"1":"Datum", });
851
822
  /**
852
823
  */
853
- module.exports.DatumOptionKind = Object.freeze({ Hash:0,"0":"Hash",Datum:1,"1":"Datum", });
824
+ module.exports.ChunkableStringKind = Object.freeze({ Single:0,"0":"Single",Chunked:1,"1":"Chunked", });
854
825
  /**
855
- * Which version of the CIP25 spec to use. See CIP25 for details.
856
- * This will change how things are encoded but for the most part contains
857
- * the same information.
858
826
  */
859
- module.exports.CIP25Version = Object.freeze({
827
+ module.exports.DelegationDistributionKind = Object.freeze({ Weighted:0,"0":"Weighted",Legacy:1,"1":"Legacy", });
860
828
  /**
861
- * Initial version of CIP25 with only string (utf8) asset names allowed.
862
829
  */
863
- V1:0,"0":"V1",
830
+ module.exports.GovActionKind = Object.freeze({ ParameterChangeAction:0,"0":"ParameterChangeAction",HardForkInitiationAction:1,"1":"HardForkInitiationAction",TreasuryWithdrawalsAction:2,"2":"TreasuryWithdrawalsAction",NoConfidence:3,"3":"NoConfidence",UpdateCommittee:4,"4":"UpdateCommittee",NewConstitution:5,"5":"NewConstitution",InfoAction:6,"6":"InfoAction", });
864
831
  /**
865
- * Second version of CIP25. Supports any type of asset names.
866
832
  */
867
- V2:1,"1":"V2", });
833
+ module.exports.ScriptKind = Object.freeze({ Native:0,"0":"Native",PlutusV1:1,"1":"PlutusV1",PlutusV2:2,"2":"PlutusV2",PlutusV3:3,"3":"PlutusV3", });
868
834
  /**
869
835
  */
870
- module.exports.TransactionOutputKind = Object.freeze({ AlonzoFormatTxOut:0,"0":"AlonzoFormatTxOut",ConwayFormatTxOut:1,"1":"ConwayFormatTxOut", });
836
+ module.exports.AuxiliaryDataKind = Object.freeze({ Shelley:0,"0":"Shelley",ShelleyMA:1,"1":"ShelleyMA",Conway:2,"2":"Conway", });
871
837
  /**
872
838
  */
873
- module.exports.CoinSelectionStrategyCIP2 = Object.freeze({
839
+ module.exports.NonceKind = Object.freeze({ Identity:0,"0":"Identity",Hash:1,"1":"Hash", });
874
840
  /**
875
- * Performs CIP2's Largest First ada-only selection. Will error if outputs contain non-ADA assets.
876
841
  */
877
- LargestFirst:0,"0":"LargestFirst",
842
+ module.exports.SpendingDataKind = Object.freeze({ SpendingDataPubKey:0,"0":"SpendingDataPubKey",SpendingDataScript:1,"1":"SpendingDataScript",SpendingDataRedeem:2,"2":"SpendingDataRedeem", });
878
843
  /**
879
- * Performs CIP2's Random Improve ada-only selection. Will error if outputs contain non-ADA assets.
880
844
  */
881
- RandomImprove:1,"1":"RandomImprove",
845
+ module.exports.RedeemersKind = Object.freeze({ ArrLegacyRedeemer:0,"0":"ArrLegacyRedeemer",MapRedeemerKeyToRedeemerVal:1,"1":"MapRedeemerKeyToRedeemerVal", });
882
846
  /**
883
- * Same as LargestFirst, but before adding ADA, will insert by largest-first for each asset type.
884
847
  */
885
- LargestFirstMultiAsset:2,"2":"LargestFirstMultiAsset",
848
+ module.exports.Language = Object.freeze({ PlutusV1:0,"0":"PlutusV1",PlutusV2:1,"1":"PlutusV2",PlutusV3:2,"2":"PlutusV3", });
886
849
  /**
887
- * Same as RandomImprove, but before adding ADA, will insert by random-improve for each asset type.
888
850
  */
889
- RandomImproveMultiAsset:3,"3":"RandomImproveMultiAsset", });
851
+ module.exports.CredentialKind = Object.freeze({ PubKey:0,"0":"PubKey",Script:1,"1":"Script", });
890
852
  /**
891
853
  */
892
- module.exports.Vote = Object.freeze({ No:0,"0":"No",Yes:1,"1":"Yes",Abstain:2,"2":"Abstain", });
854
+ module.exports.CertificateKind = Object.freeze({ StakeRegistration:0,"0":"StakeRegistration",StakeDeregistration:1,"1":"StakeDeregistration",StakeDelegation:2,"2":"StakeDelegation",PoolRegistration:3,"3":"PoolRegistration",PoolRetirement:4,"4":"PoolRetirement",RegCert:5,"5":"RegCert",UnregCert:6,"6":"UnregCert",VoteDelegCert:7,"7":"VoteDelegCert",StakeVoteDelegCert:8,"8":"StakeVoteDelegCert",StakeRegDelegCert:9,"9":"StakeRegDelegCert",VoteRegDelegCert:10,"10":"VoteRegDelegCert",StakeVoteRegDelegCert:11,"11":"StakeVoteRegDelegCert",AuthCommitteeHotCert:12,"12":"AuthCommitteeHotCert",ResignCommitteeColdCert:13,"13":"ResignCommitteeColdCert",RegDrepCert:14,"14":"RegDrepCert",UnregDrepCert:15,"15":"UnregDrepCert",UpdateDrepCert:16,"16":"UpdateDrepCert", });
893
855
  /**
894
856
  */
895
- module.exports.StakeDistributionKind = Object.freeze({ SingleKey:0,"0":"SingleKey",BootstrapEra:1,"1":"BootstrapEra", });
857
+ module.exports.TransactionOutputKind = Object.freeze({ AlonzoFormatTxOut:0,"0":"AlonzoFormatTxOut",ConwayFormatTxOut:1,"1":"ConwayFormatTxOut", });
896
858
  /**
897
859
  */
898
- module.exports.CertificateKind = Object.freeze({ StakeRegistration:0,"0":"StakeRegistration",StakeDeregistration:1,"1":"StakeDeregistration",StakeDelegation:2,"2":"StakeDelegation",PoolRegistration:3,"3":"PoolRegistration",PoolRetirement:4,"4":"PoolRetirement",RegCert:5,"5":"RegCert",UnregCert:6,"6":"UnregCert",VoteDelegCert:7,"7":"VoteDelegCert",StakeVoteDelegCert:8,"8":"StakeVoteDelegCert",StakeRegDelegCert:9,"9":"StakeRegDelegCert",VoteRegDelegCert:10,"10":"VoteRegDelegCert",StakeVoteRegDelegCert:11,"11":"StakeVoteRegDelegCert",AuthCommitteeHotCert:12,"12":"AuthCommitteeHotCert",ResignCommitteeColdCert:13,"13":"ResignCommitteeColdCert",RegDrepCert:14,"14":"RegDrepCert",UnregDrepCert:15,"15":"UnregDrepCert",UpdateDrepCert:16,"16":"UpdateDrepCert", });
860
+ module.exports.CoinSelectionStrategyCIP2 = Object.freeze({
899
861
  /**
862
+ * Performs CIP2's Largest First ada-only selection. Will error if outputs contain non-ADA assets.
900
863
  */
901
- module.exports.MetadataJsonSchema = Object.freeze({ NoConversions:0,"0":"NoConversions",BasicConversions:1,"1":"BasicConversions",DetailedSchema:2,"2":"DetailedSchema", });
864
+ LargestFirst:0,"0":"LargestFirst",
902
865
  /**
866
+ * Performs CIP2's Random Improve ada-only selection. Will error if outputs contain non-ADA assets.
903
867
  */
904
- module.exports.AddressKind = Object.freeze({ Base:0,"0":"Base",Ptr:1,"1":"Ptr",Enterprise:2,"2":"Enterprise",Reward:3,"3":"Reward",Byron:4,"4":"Byron", });
868
+ RandomImprove:1,"1":"RandomImprove",
905
869
  /**
870
+ * Same as LargestFirst, but before adding ADA, will insert by largest-first for each asset type.
906
871
  */
907
- module.exports.DRepKind = Object.freeze({ Key:0,"0":"Key",Script:1,"1":"Script",AlwaysAbstain:2,"2":"AlwaysAbstain",AlwaysNoConfidence:3,"3":"AlwaysNoConfidence", });
872
+ LargestFirstMultiAsset:2,"2":"LargestFirstMultiAsset",
908
873
  /**
874
+ * Same as RandomImprove, but before adding ADA, will insert by random-improve for each asset type.
909
875
  */
910
- module.exports.ByronAddrType = Object.freeze({ PublicKey:0,"0":"PublicKey",Script:1,"1":"Script",Redeem:2,"2":"Redeem", });
876
+ RandomImproveMultiAsset:3,"3":"RandomImproveMultiAsset", });
911
877
  /**
912
878
  */
913
- module.exports.AuxiliaryDataKind = Object.freeze({ Shelley:0,"0":"Shelley",ShelleyMA:1,"1":"ShelleyMA",Conway:2,"2":"Conway", });
879
+ module.exports.VoterKind = Object.freeze({ ConstitutionalCommitteeHotKeyHash:0,"0":"ConstitutionalCommitteeHotKeyHash",ConstitutionalCommitteeHotScriptHash:1,"1":"ConstitutionalCommitteeHotScriptHash",DRepKeyHash:2,"2":"DRepKeyHash",DRepScriptHash:3,"3":"DRepScriptHash",StakingPoolKeyHash:4,"4":"StakingPoolKeyHash", });
914
880
  /**
881
+ * Careful: this enum doesn't include the network ID part of the header
882
+ * ex: base address isn't 0b0000_0000 but instead 0b0000
883
+ * Use `header_matches_kind` if you don't want to implement the bitwise operators yourself
915
884
  */
916
- module.exports.Language = Object.freeze({ PlutusV1:0,"0":"PlutusV1",PlutusV2:1,"1":"PlutusV2",PlutusV3:2,"2":"PlutusV3", });
885
+ module.exports.AddressHeaderKind = Object.freeze({ BasePaymentKeyStakeKey:0,"0":"BasePaymentKeyStakeKey",BasePaymentScriptStakeKey:1,"1":"BasePaymentScriptStakeKey",BasePaymentKeyStakeScript:2,"2":"BasePaymentKeyStakeScript",BasePaymentScriptStakeScript:3,"3":"BasePaymentScriptStakeScript",PointerKey:4,"4":"PointerKey",PointerScript:5,"5":"PointerScript",EnterpriseKey:6,"6":"EnterpriseKey",EnterpriseScript:7,"7":"EnterpriseScript",Byron:8,"8":"Byron",RewardKey:14,"14":"RewardKey",RewardScript:15,"15":"RewardScript", });
917
886
  /**
918
887
  */
919
- module.exports.SpendingDataKind = Object.freeze({ SpendingDataPubKey:0,"0":"SpendingDataPubKey",SpendingDataScript:1,"1":"SpendingDataScript",SpendingDataRedeem:2,"2":"SpendingDataRedeem", });
888
+ module.exports.RedeemerTag = Object.freeze({ Spend:0,"0":"Spend",Mint:1,"1":"Mint",Cert:2,"2":"Cert",Reward:3,"3":"Reward",Voting:4,"4":"Voting",Proposing:5,"5":"Proposing", });
920
889
  /**
921
890
  */
922
- module.exports.ScriptKind = Object.freeze({ Native:0,"0":"Native",PlutusV1:1,"1":"PlutusV1",PlutusV2:2,"2":"PlutusV2",PlutusV3:3,"3":"PlutusV3", });
891
+ module.exports.PlutusDataKind = Object.freeze({ ConstrPlutusData:0,"0":"ConstrPlutusData",Map:1,"1":"Map",List:2,"2":"List",Integer:3,"3":"Integer",Bytes:4,"4":"Bytes", });
923
892
  /**
924
893
  */
925
- module.exports.CredentialKind = Object.freeze({ PubKey:0,"0":"PubKey",Script:1,"1":"Script", });
894
+ module.exports.TransactionMetadatumKind = Object.freeze({ Map:0,"0":"Map",List:1,"1":"List",Int:2,"2":"Int",Bytes:3,"3":"Bytes",Text:4,"4":"Text", });
926
895
  /**
927
896
  */
928
- module.exports.GovActionKind = Object.freeze({ ParameterChangeAction:0,"0":"ParameterChangeAction",HardForkInitiationAction:1,"1":"HardForkInitiationAction",TreasuryWithdrawalsAction:2,"2":"TreasuryWithdrawalsAction",NoConfidence:3,"3":"NoConfidence",UpdateCommittee:4,"4":"UpdateCommittee",NewConstitution:5,"5":"NewConstitution",InfoAction:6,"6":"InfoAction", });
897
+ module.exports.RelayKind = Object.freeze({ SingleHostAddr:0,"0":"SingleHostAddr",SingleHostName:1,"1":"SingleHostName",MultiHostName:2,"2":"MultiHostName", });
929
898
  /**
930
899
  */
931
- module.exports.VoterKind = Object.freeze({ ConstitutionalCommitteeHotKeyHash:0,"0":"ConstitutionalCommitteeHotKeyHash",ConstitutionalCommitteeHotScriptHash:1,"1":"ConstitutionalCommitteeHotScriptHash",DRepKeyHash:2,"2":"DRepKeyHash",DRepScriptHash:3,"3":"DRepScriptHash",StakingPoolKeyHash:4,"4":"StakingPoolKeyHash", });
900
+ module.exports.StakeDistributionKind = Object.freeze({ SingleKey:0,"0":"SingleKey",BootstrapEra:1,"1":"BootstrapEra", });
901
+ /**
902
+ */
903
+ module.exports.Vote = Object.freeze({ No:0,"0":"No",Yes:1,"1":"Yes",Abstain:2,"2":"Abstain", });
904
+ /**
905
+ */
906
+ module.exports.NativeScriptKind = Object.freeze({ ScriptPubkey:0,"0":"ScriptPubkey",ScriptAll:1,"1":"ScriptAll",ScriptAny:2,"2":"ScriptAny",ScriptNOfK:3,"3":"ScriptNOfK",ScriptInvalidBefore:4,"4":"ScriptInvalidBefore",ScriptInvalidHereafter:5,"5":"ScriptInvalidHereafter", });
932
907
 
933
908
  const AddrAttributesFinalization = (typeof FinalizationRegistry === 'undefined')
934
909
  ? { register: () => {}, unregister: () => {} }
@@ -957,43 +932,6 @@ class AddrAttributes {
957
932
  wasm.__wbg_addrattributes_free(ptr);
958
933
  }
959
934
  /**
960
- * @param {HDAddressPayload | undefined} [hdap]
961
- * @param {ProtocolMagic | undefined} [protocol_magic]
962
- * @returns {AddrAttributes}
963
- */
964
- static new_bootstrap_era(hdap, protocol_magic) {
965
- let ptr0 = 0;
966
- if (!isLikeNone(hdap)) {
967
- _assertClass(hdap, HDAddressPayload);
968
- ptr0 = hdap.__destroy_into_raw();
969
- }
970
- let ptr1 = 0;
971
- if (!isLikeNone(protocol_magic)) {
972
- _assertClass(protocol_magic, ProtocolMagic);
973
- ptr1 = protocol_magic.__destroy_into_raw();
974
- }
975
- const ret = wasm.addrattributes_new_bootstrap_era(ptr0, ptr1);
976
- return AddrAttributes.__wrap(ret);
977
- }
978
- /**
979
- * @param {Bip32PublicKey} pubk
980
- * @param {HDAddressPayload | undefined} hdap
981
- * @param {ProtocolMagic} protocol_magic
982
- * @returns {AddrAttributes}
983
- */
984
- static new_single_key(pubk, hdap, protocol_magic) {
985
- _assertClass(pubk, Bip32PublicKey);
986
- let ptr0 = 0;
987
- if (!isLikeNone(hdap)) {
988
- _assertClass(hdap, HDAddressPayload);
989
- ptr0 = hdap.__destroy_into_raw();
990
- }
991
- _assertClass(protocol_magic, ProtocolMagic);
992
- var ptr1 = protocol_magic.__destroy_into_raw();
993
- const ret = wasm.addrattributes_new_single_key(pubk.__wbg_ptr, ptr0, ptr1);
994
- return AddrAttributes.__wrap(ret);
995
- }
996
- /**
997
935
  *
998
936
  * * Serialize this type to CBOR bytes.
999
937
  * * This type does NOT support fine-tuned encoding options so this may or may not be
@@ -1136,6 +1074,43 @@ class AddrAttributes {
1136
1074
  const ret = wasm.addrattributes_new();
1137
1075
  return AddrAttributes.__wrap(ret);
1138
1076
  }
1077
+ /**
1078
+ * @param {HDAddressPayload | undefined} [hdap]
1079
+ * @param {ProtocolMagic | undefined} [protocol_magic]
1080
+ * @returns {AddrAttributes}
1081
+ */
1082
+ static new_bootstrap_era(hdap, protocol_magic) {
1083
+ let ptr0 = 0;
1084
+ if (!isLikeNone(hdap)) {
1085
+ _assertClass(hdap, HDAddressPayload);
1086
+ ptr0 = hdap.__destroy_into_raw();
1087
+ }
1088
+ let ptr1 = 0;
1089
+ if (!isLikeNone(protocol_magic)) {
1090
+ _assertClass(protocol_magic, ProtocolMagic);
1091
+ ptr1 = protocol_magic.__destroy_into_raw();
1092
+ }
1093
+ const ret = wasm.addrattributes_new_bootstrap_era(ptr0, ptr1);
1094
+ return AddrAttributes.__wrap(ret);
1095
+ }
1096
+ /**
1097
+ * @param {Bip32PublicKey} pubk
1098
+ * @param {HDAddressPayload | undefined} hdap
1099
+ * @param {ProtocolMagic} protocol_magic
1100
+ * @returns {AddrAttributes}
1101
+ */
1102
+ static new_single_key(pubk, hdap, protocol_magic) {
1103
+ _assertClass(pubk, Bip32PublicKey);
1104
+ let ptr0 = 0;
1105
+ if (!isLikeNone(hdap)) {
1106
+ _assertClass(hdap, HDAddressPayload);
1107
+ ptr0 = hdap.__destroy_into_raw();
1108
+ }
1109
+ _assertClass(protocol_magic, ProtocolMagic);
1110
+ var ptr1 = protocol_magic.__destroy_into_raw();
1111
+ const ret = wasm.addrattributes_new_single_key(pubk.__wbg_ptr, ptr0, ptr1);
1112
+ return AddrAttributes.__wrap(ret);
1113
+ }
1139
1114
  }
1140
1115
  module.exports.AddrAttributes = AddrAttributes;
1141
1116
 
@@ -1497,104 +1472,6 @@ class AddressContent {
1497
1472
  wasm.__wbg_addresscontent_free(ptr);
1498
1473
  }
1499
1474
  /**
1500
- * @param {ByronAddrType} addr_type
1501
- * @param {SpendingData} spending_data
1502
- * @param {AddrAttributes} attributes
1503
- * @returns {AddressContent}
1504
- */
1505
- static hash_and_create(addr_type, spending_data, attributes) {
1506
- _assertClass(spending_data, SpendingData);
1507
- _assertClass(attributes, AddrAttributes);
1508
- const ret = wasm.addresscontent_hash_and_create(addr_type, spending_data.__wbg_ptr, attributes.__wbg_ptr);
1509
- return AddressContent.__wrap(ret);
1510
- }
1511
- /**
1512
- * @param {PublicKey} pubkey
1513
- * @param {ProtocolMagic | undefined} [protocol_magic]
1514
- * @returns {AddressContent}
1515
- */
1516
- static new_redeem(pubkey, protocol_magic) {
1517
- _assertClass(pubkey, PublicKey);
1518
- let ptr0 = 0;
1519
- if (!isLikeNone(protocol_magic)) {
1520
- _assertClass(protocol_magic, ProtocolMagic);
1521
- ptr0 = protocol_magic.__destroy_into_raw();
1522
- }
1523
- const ret = wasm.addresscontent_new_redeem(pubkey.__wbg_ptr, ptr0);
1524
- return AddressContent.__wrap(ret);
1525
- }
1526
- /**
1527
- * @param {Bip32PublicKey} xpub
1528
- * @param {ProtocolMagic | undefined} [protocol_magic]
1529
- * @returns {AddressContent}
1530
- */
1531
- static new_simple(xpub, protocol_magic) {
1532
- _assertClass(xpub, Bip32PublicKey);
1533
- let ptr0 = 0;
1534
- if (!isLikeNone(protocol_magic)) {
1535
- _assertClass(protocol_magic, ProtocolMagic);
1536
- ptr0 = protocol_magic.__destroy_into_raw();
1537
- }
1538
- const ret = wasm.addresscontent_new_simple(xpub.__wbg_ptr, ptr0);
1539
- return AddressContent.__wrap(ret);
1540
- }
1541
- /**
1542
- * Do we want to remove this or keep it for people who were using old Byron code?
1543
- * @returns {ByronAddress}
1544
- */
1545
- to_address() {
1546
- const ret = wasm.addresscontent_to_address(this.__wbg_ptr);
1547
- return ByronAddress.__wrap(ret);
1548
- }
1549
- /**
1550
- * returns the byron protocol magic embedded in the address, or mainnet id if none is present
1551
- * note: for bech32 addresses, you need to use network_id instead
1552
- * @returns {ProtocolMagic}
1553
- */
1554
- byron_protocol_magic() {
1555
- const ret = wasm.addresscontent_byron_protocol_magic(this.__wbg_ptr);
1556
- return ProtocolMagic.__wrap(ret);
1557
- }
1558
- /**
1559
- * @returns {number}
1560
- */
1561
- network_id() {
1562
- try {
1563
- const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
1564
- wasm.addresscontent_network_id(retptr, this.__wbg_ptr);
1565
- var r0 = getInt32Memory0()[retptr / 4 + 0];
1566
- var r1 = getInt32Memory0()[retptr / 4 + 1];
1567
- var r2 = getInt32Memory0()[retptr / 4 + 2];
1568
- if (r2) {
1569
- throw takeObject(r1);
1570
- }
1571
- return r0;
1572
- } finally {
1573
- wasm.__wbindgen_add_to_stack_pointer(16);
1574
- }
1575
- }
1576
- /**
1577
- * @param {Bip32PublicKey} key
1578
- * @param {ProtocolMagic} protocol_magic
1579
- * @returns {AddressContent}
1580
- */
1581
- static icarus_from_key(key, protocol_magic) {
1582
- _assertClass(key, Bip32PublicKey);
1583
- _assertClass(protocol_magic, ProtocolMagic);
1584
- const ret = wasm.addresscontent_icarus_from_key(key.__wbg_ptr, protocol_magic.__wbg_ptr);
1585
- return AddressContent.__wrap(ret);
1586
- }
1587
- /**
1588
- * Check if the Addr can be reconstructed with a specific xpub
1589
- * @param {Bip32PublicKey} xpub
1590
- * @returns {boolean}
1591
- */
1592
- identical_with_pubkey(xpub) {
1593
- _assertClass(xpub, Bip32PublicKey);
1594
- const ret = wasm.addresscontent_identical_with_pubkey(this.__wbg_ptr, xpub.__wbg_ptr);
1595
- return ret !== 0;
1596
- }
1597
- /**
1598
1475
  *
1599
1476
  * * Serialize this type to CBOR bytes.
1600
1477
  * * This type does NOT support fine-tuned encoding options so this may or may not be
@@ -1721,6 +1598,104 @@ class AddressContent {
1721
1598
  const ret = wasm.addresscontent_new(address_id.__wbg_ptr, addr_attributes.__wbg_ptr, addr_type);
1722
1599
  return AddressContent.__wrap(ret);
1723
1600
  }
1601
+ /**
1602
+ * @param {ByronAddrType} addr_type
1603
+ * @param {SpendingData} spending_data
1604
+ * @param {AddrAttributes} attributes
1605
+ * @returns {AddressContent}
1606
+ */
1607
+ static hash_and_create(addr_type, spending_data, attributes) {
1608
+ _assertClass(spending_data, SpendingData);
1609
+ _assertClass(attributes, AddrAttributes);
1610
+ const ret = wasm.addresscontent_hash_and_create(addr_type, spending_data.__wbg_ptr, attributes.__wbg_ptr);
1611
+ return AddressContent.__wrap(ret);
1612
+ }
1613
+ /**
1614
+ * @param {PublicKey} pubkey
1615
+ * @param {ProtocolMagic | undefined} [protocol_magic]
1616
+ * @returns {AddressContent}
1617
+ */
1618
+ static new_redeem(pubkey, protocol_magic) {
1619
+ _assertClass(pubkey, PublicKey);
1620
+ let ptr0 = 0;
1621
+ if (!isLikeNone(protocol_magic)) {
1622
+ _assertClass(protocol_magic, ProtocolMagic);
1623
+ ptr0 = protocol_magic.__destroy_into_raw();
1624
+ }
1625
+ const ret = wasm.addresscontent_new_redeem(pubkey.__wbg_ptr, ptr0);
1626
+ return AddressContent.__wrap(ret);
1627
+ }
1628
+ /**
1629
+ * @param {Bip32PublicKey} xpub
1630
+ * @param {ProtocolMagic | undefined} [protocol_magic]
1631
+ * @returns {AddressContent}
1632
+ */
1633
+ static new_simple(xpub, protocol_magic) {
1634
+ _assertClass(xpub, Bip32PublicKey);
1635
+ let ptr0 = 0;
1636
+ if (!isLikeNone(protocol_magic)) {
1637
+ _assertClass(protocol_magic, ProtocolMagic);
1638
+ ptr0 = protocol_magic.__destroy_into_raw();
1639
+ }
1640
+ const ret = wasm.addresscontent_new_simple(xpub.__wbg_ptr, ptr0);
1641
+ return AddressContent.__wrap(ret);
1642
+ }
1643
+ /**
1644
+ * Do we want to remove this or keep it for people who were using old Byron code?
1645
+ * @returns {ByronAddress}
1646
+ */
1647
+ to_address() {
1648
+ const ret = wasm.addresscontent_to_address(this.__wbg_ptr);
1649
+ return ByronAddress.__wrap(ret);
1650
+ }
1651
+ /**
1652
+ * returns the byron protocol magic embedded in the address, or mainnet id if none is present
1653
+ * note: for bech32 addresses, you need to use network_id instead
1654
+ * @returns {ProtocolMagic}
1655
+ */
1656
+ byron_protocol_magic() {
1657
+ const ret = wasm.addresscontent_byron_protocol_magic(this.__wbg_ptr);
1658
+ return ProtocolMagic.__wrap(ret);
1659
+ }
1660
+ /**
1661
+ * @returns {number}
1662
+ */
1663
+ network_id() {
1664
+ try {
1665
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
1666
+ wasm.addresscontent_network_id(retptr, this.__wbg_ptr);
1667
+ var r0 = getInt32Memory0()[retptr / 4 + 0];
1668
+ var r1 = getInt32Memory0()[retptr / 4 + 1];
1669
+ var r2 = getInt32Memory0()[retptr / 4 + 2];
1670
+ if (r2) {
1671
+ throw takeObject(r1);
1672
+ }
1673
+ return r0;
1674
+ } finally {
1675
+ wasm.__wbindgen_add_to_stack_pointer(16);
1676
+ }
1677
+ }
1678
+ /**
1679
+ * @param {Bip32PublicKey} key
1680
+ * @param {ProtocolMagic} protocol_magic
1681
+ * @returns {AddressContent}
1682
+ */
1683
+ static icarus_from_key(key, protocol_magic) {
1684
+ _assertClass(key, Bip32PublicKey);
1685
+ _assertClass(protocol_magic, ProtocolMagic);
1686
+ const ret = wasm.addresscontent_icarus_from_key(key.__wbg_ptr, protocol_magic.__wbg_ptr);
1687
+ return AddressContent.__wrap(ret);
1688
+ }
1689
+ /**
1690
+ * Check if the Addr can be reconstructed with a specific xpub
1691
+ * @param {Bip32PublicKey} xpub
1692
+ * @returns {boolean}
1693
+ */
1694
+ identical_with_pubkey(xpub) {
1695
+ _assertClass(xpub, Bip32PublicKey);
1696
+ const ret = wasm.addresscontent_identical_with_pubkey(this.__wbg_ptr, xpub.__wbg_ptr);
1697
+ return ret !== 0;
1698
+ }
1724
1699
  }
1725
1700
  module.exports.AddressContent = AddressContent;
1726
1701
 
@@ -2520,84 +2495,6 @@ class AssetName {
2520
2495
  }
2521
2496
  /**
2522
2497
  *
2523
- * * Create an AssetName from raw bytes. 64 byte maximum.
2524
- *
2525
- * @param {Uint8Array} bytes
2526
- * @returns {AssetName}
2527
- */
2528
- static from_bytes(bytes) {
2529
- try {
2530
- const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
2531
- const ptr0 = passArray8ToWasm0(bytes, wasm.__wbindgen_malloc);
2532
- const len0 = WASM_VECTOR_LEN;
2533
- wasm.assetname_from_bytes(retptr, ptr0, len0);
2534
- var r0 = getInt32Memory0()[retptr / 4 + 0];
2535
- var r1 = getInt32Memory0()[retptr / 4 + 1];
2536
- var r2 = getInt32Memory0()[retptr / 4 + 2];
2537
- if (r2) {
2538
- throw takeObject(r1);
2539
- }
2540
- return AssetName.__wrap(r0);
2541
- } finally {
2542
- wasm.__wbindgen_add_to_stack_pointer(16);
2543
- }
2544
- }
2545
- /**
2546
- *
2547
- * * Create an AssetName from utf8 string. 64 byte (not char!) maximum.
2548
- *
2549
- * @param {string} utf8_str
2550
- * @returns {AssetName}
2551
- */
2552
- static from_str(utf8_str) {
2553
- try {
2554
- const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
2555
- const ptr0 = passStringToWasm0(utf8_str, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
2556
- const len0 = WASM_VECTOR_LEN;
2557
- wasm.assetname_from_str(retptr, ptr0, len0);
2558
- var r0 = getInt32Memory0()[retptr / 4 + 0];
2559
- var r1 = getInt32Memory0()[retptr / 4 + 1];
2560
- var r2 = getInt32Memory0()[retptr / 4 + 2];
2561
- if (r2) {
2562
- throw takeObject(r1);
2563
- }
2564
- return AssetName.__wrap(r0);
2565
- } finally {
2566
- wasm.__wbindgen_add_to_stack_pointer(16);
2567
- }
2568
- }
2569
- /**
2570
- *
2571
- * * AssetName as a utf8 string if it's possible. Will error if the asset is not utf8
2572
- *
2573
- * @returns {string}
2574
- */
2575
- to_str() {
2576
- let deferred2_0;
2577
- let deferred2_1;
2578
- try {
2579
- const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
2580
- wasm.assetname_to_str(retptr, this.__wbg_ptr);
2581
- var r0 = getInt32Memory0()[retptr / 4 + 0];
2582
- var r1 = getInt32Memory0()[retptr / 4 + 1];
2583
- var r2 = getInt32Memory0()[retptr / 4 + 2];
2584
- var r3 = getInt32Memory0()[retptr / 4 + 3];
2585
- var ptr1 = r0;
2586
- var len1 = r1;
2587
- if (r3) {
2588
- ptr1 = 0; len1 = 0;
2589
- throw takeObject(r2);
2590
- }
2591
- deferred2_0 = ptr1;
2592
- deferred2_1 = len1;
2593
- return getStringFromWasm0(ptr1, len1);
2594
- } finally {
2595
- wasm.__wbindgen_add_to_stack_pointer(16);
2596
- wasm.__wbindgen_free(deferred2_0, deferred2_1, 1);
2597
- }
2598
- }
2599
- /**
2600
- *
2601
2498
  * * Serialize this type to CBOR bytes
2602
2499
  * * This type type supports encoding preservation so this will preserve round-trip CBOR formats.
2603
2500
  * * If created from scratch the CBOR will be canonical.
@@ -2772,6 +2669,84 @@ class AssetName {
2772
2669
  wasm.__wbindgen_add_to_stack_pointer(16);
2773
2670
  }
2774
2671
  }
2672
+ /**
2673
+ *
2674
+ * * Create an AssetName from raw bytes. 64 byte maximum.
2675
+ *
2676
+ * @param {Uint8Array} bytes
2677
+ * @returns {AssetName}
2678
+ */
2679
+ static from_bytes(bytes) {
2680
+ try {
2681
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
2682
+ const ptr0 = passArray8ToWasm0(bytes, wasm.__wbindgen_malloc);
2683
+ const len0 = WASM_VECTOR_LEN;
2684
+ wasm.assetname_from_bytes(retptr, ptr0, len0);
2685
+ var r0 = getInt32Memory0()[retptr / 4 + 0];
2686
+ var r1 = getInt32Memory0()[retptr / 4 + 1];
2687
+ var r2 = getInt32Memory0()[retptr / 4 + 2];
2688
+ if (r2) {
2689
+ throw takeObject(r1);
2690
+ }
2691
+ return AssetName.__wrap(r0);
2692
+ } finally {
2693
+ wasm.__wbindgen_add_to_stack_pointer(16);
2694
+ }
2695
+ }
2696
+ /**
2697
+ *
2698
+ * * Create an AssetName from utf8 string. 64 byte (not char!) maximum.
2699
+ *
2700
+ * @param {string} utf8_str
2701
+ * @returns {AssetName}
2702
+ */
2703
+ static from_str(utf8_str) {
2704
+ try {
2705
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
2706
+ const ptr0 = passStringToWasm0(utf8_str, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
2707
+ const len0 = WASM_VECTOR_LEN;
2708
+ wasm.assetname_from_str(retptr, ptr0, len0);
2709
+ var r0 = getInt32Memory0()[retptr / 4 + 0];
2710
+ var r1 = getInt32Memory0()[retptr / 4 + 1];
2711
+ var r2 = getInt32Memory0()[retptr / 4 + 2];
2712
+ if (r2) {
2713
+ throw takeObject(r1);
2714
+ }
2715
+ return AssetName.__wrap(r0);
2716
+ } finally {
2717
+ wasm.__wbindgen_add_to_stack_pointer(16);
2718
+ }
2719
+ }
2720
+ /**
2721
+ *
2722
+ * * AssetName as a utf8 string if it's possible. Will error if the asset is not utf8
2723
+ *
2724
+ * @returns {string}
2725
+ */
2726
+ to_str() {
2727
+ let deferred2_0;
2728
+ let deferred2_1;
2729
+ try {
2730
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
2731
+ wasm.assetname_to_str(retptr, this.__wbg_ptr);
2732
+ var r0 = getInt32Memory0()[retptr / 4 + 0];
2733
+ var r1 = getInt32Memory0()[retptr / 4 + 1];
2734
+ var r2 = getInt32Memory0()[retptr / 4 + 2];
2735
+ var r3 = getInt32Memory0()[retptr / 4 + 3];
2736
+ var ptr1 = r0;
2737
+ var len1 = r1;
2738
+ if (r3) {
2739
+ ptr1 = 0; len1 = 0;
2740
+ throw takeObject(r2);
2741
+ }
2742
+ deferred2_0 = ptr1;
2743
+ deferred2_1 = len1;
2744
+ return getStringFromWasm0(ptr1, len1);
2745
+ } finally {
2746
+ wasm.__wbindgen_add_to_stack_pointer(16);
2747
+ wasm.__wbindgen_free(deferred2_0, deferred2_1, 1);
2748
+ }
2749
+ }
2775
2750
  }
2776
2751
  module.exports.AssetName = AssetName;
2777
2752
 
@@ -5188,81 +5163,6 @@ class ByronAddress {
5188
5163
  wasm.__wbg_byronaddress_free(ptr);
5189
5164
  }
5190
5165
  /**
5191
- * @returns {string}
5192
- */
5193
- to_base58() {
5194
- let deferred1_0;
5195
- let deferred1_1;
5196
- try {
5197
- const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
5198
- wasm.byronaddress_to_base58(retptr, this.__wbg_ptr);
5199
- var r0 = getInt32Memory0()[retptr / 4 + 0];
5200
- var r1 = getInt32Memory0()[retptr / 4 + 1];
5201
- deferred1_0 = r0;
5202
- deferred1_1 = r1;
5203
- return getStringFromWasm0(r0, r1);
5204
- } finally {
5205
- wasm.__wbindgen_add_to_stack_pointer(16);
5206
- wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
5207
- }
5208
- }
5209
- /**
5210
- * @param {string} s
5211
- * @returns {ByronAddress}
5212
- */
5213
- static from_base58(s) {
5214
- try {
5215
- const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
5216
- const ptr0 = passStringToWasm0(s, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
5217
- const len0 = WASM_VECTOR_LEN;
5218
- wasm.byronaddress_from_base58(retptr, ptr0, len0);
5219
- var r0 = getInt32Memory0()[retptr / 4 + 0];
5220
- var r1 = getInt32Memory0()[retptr / 4 + 1];
5221
- var r2 = getInt32Memory0()[retptr / 4 + 2];
5222
- if (r2) {
5223
- throw takeObject(r1);
5224
- }
5225
- return ByronAddress.__wrap(r0);
5226
- } finally {
5227
- wasm.__wbindgen_add_to_stack_pointer(16);
5228
- }
5229
- }
5230
- /**
5231
- * @param {string} s
5232
- * @returns {boolean}
5233
- */
5234
- static is_valid(s) {
5235
- const ptr0 = passStringToWasm0(s, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
5236
- const len0 = WASM_VECTOR_LEN;
5237
- const ret = wasm.byronaddress_is_valid(ptr0, len0);
5238
- return ret !== 0;
5239
- }
5240
- /**
5241
- * @returns {Address}
5242
- */
5243
- to_address() {
5244
- const ret = wasm.byronaddress_to_address(this.__wbg_ptr);
5245
- return Address.__wrap(ret);
5246
- }
5247
- /**
5248
- * @param {Address} addr
5249
- * @returns {ByronAddress | undefined}
5250
- */
5251
- static from_address(addr) {
5252
- _assertClass(addr, Address);
5253
- const ret = wasm.byronaddress_from_address(addr.__wbg_ptr);
5254
- return ret === 0 ? undefined : ByronAddress.__wrap(ret);
5255
- }
5256
- /**
5257
- * @param {AddressContent} address_content
5258
- * @returns {ByronAddress}
5259
- */
5260
- static from_address_content(address_content) {
5261
- _assertClass(address_content, AddressContent);
5262
- const ret = wasm.byronaddress_from_address_content(address_content.__wbg_ptr);
5263
- return ByronAddress.__wrap(ret);
5264
- }
5265
- /**
5266
5166
  *
5267
5167
  * * Serialize this type to CBOR bytes.
5268
5168
  * * This type does NOT support fine-tuned encoding options so this may or may not be
@@ -5381,6 +5281,81 @@ class ByronAddress {
5381
5281
  const ret = wasm.byronaddress_new(content.__wbg_ptr, crc.__wbg_ptr);
5382
5282
  return ByronAddress.__wrap(ret);
5383
5283
  }
5284
+ /**
5285
+ * @returns {string}
5286
+ */
5287
+ to_base58() {
5288
+ let deferred1_0;
5289
+ let deferred1_1;
5290
+ try {
5291
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
5292
+ wasm.byronaddress_to_base58(retptr, this.__wbg_ptr);
5293
+ var r0 = getInt32Memory0()[retptr / 4 + 0];
5294
+ var r1 = getInt32Memory0()[retptr / 4 + 1];
5295
+ deferred1_0 = r0;
5296
+ deferred1_1 = r1;
5297
+ return getStringFromWasm0(r0, r1);
5298
+ } finally {
5299
+ wasm.__wbindgen_add_to_stack_pointer(16);
5300
+ wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
5301
+ }
5302
+ }
5303
+ /**
5304
+ * @param {string} s
5305
+ * @returns {ByronAddress}
5306
+ */
5307
+ static from_base58(s) {
5308
+ try {
5309
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
5310
+ const ptr0 = passStringToWasm0(s, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
5311
+ const len0 = WASM_VECTOR_LEN;
5312
+ wasm.byronaddress_from_base58(retptr, ptr0, len0);
5313
+ var r0 = getInt32Memory0()[retptr / 4 + 0];
5314
+ var r1 = getInt32Memory0()[retptr / 4 + 1];
5315
+ var r2 = getInt32Memory0()[retptr / 4 + 2];
5316
+ if (r2) {
5317
+ throw takeObject(r1);
5318
+ }
5319
+ return ByronAddress.__wrap(r0);
5320
+ } finally {
5321
+ wasm.__wbindgen_add_to_stack_pointer(16);
5322
+ }
5323
+ }
5324
+ /**
5325
+ * @param {string} s
5326
+ * @returns {boolean}
5327
+ */
5328
+ static is_valid(s) {
5329
+ const ptr0 = passStringToWasm0(s, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
5330
+ const len0 = WASM_VECTOR_LEN;
5331
+ const ret = wasm.byronaddress_is_valid(ptr0, len0);
5332
+ return ret !== 0;
5333
+ }
5334
+ /**
5335
+ * @returns {Address}
5336
+ */
5337
+ to_address() {
5338
+ const ret = wasm.byronaddress_to_address(this.__wbg_ptr);
5339
+ return Address.__wrap(ret);
5340
+ }
5341
+ /**
5342
+ * @param {Address} addr
5343
+ * @returns {ByronAddress | undefined}
5344
+ */
5345
+ static from_address(addr) {
5346
+ _assertClass(addr, Address);
5347
+ const ret = wasm.byronaddress_from_address(addr.__wbg_ptr);
5348
+ return ret === 0 ? undefined : ByronAddress.__wrap(ret);
5349
+ }
5350
+ /**
5351
+ * @param {AddressContent} address_content
5352
+ * @returns {ByronAddress}
5353
+ */
5354
+ static from_address_content(address_content) {
5355
+ _assertClass(address_content, AddressContent);
5356
+ const ret = wasm.byronaddress_from_address_content(address_content.__wbg_ptr);
5357
+ return ByronAddress.__wrap(ret);
5358
+ }
5384
5359
  }
5385
5360
  module.exports.ByronAddress = ByronAddress;
5386
5361
 
@@ -10753,11 +10728,53 @@ class CostModels {
10753
10728
  }
10754
10729
  }
10755
10730
  /**
10756
- * @returns {MapU64ToArrI64}
10731
+ * @param {IntList} plutus_v1
10732
+ */
10733
+ set_plutus_v1(plutus_v1) {
10734
+ _assertClass(plutus_v1, IntList);
10735
+ wasm.costmodels_set_plutus_v1(this.__wbg_ptr, plutus_v1.__wbg_ptr);
10736
+ }
10737
+ /**
10738
+ * @returns {IntList | undefined}
10739
+ */
10740
+ plutus_v1() {
10741
+ const ret = wasm.costmodels_plutus_v1(this.__wbg_ptr);
10742
+ return ret === 0 ? undefined : IntList.__wrap(ret);
10743
+ }
10744
+ /**
10745
+ * @param {IntList} plutus_v2
10746
+ */
10747
+ set_plutus_v2(plutus_v2) {
10748
+ _assertClass(plutus_v2, IntList);
10749
+ wasm.costmodels_set_plutus_v2(this.__wbg_ptr, plutus_v2.__wbg_ptr);
10750
+ }
10751
+ /**
10752
+ * @returns {IntList | undefined}
10757
10753
  */
10758
- inner() {
10759
- const ret = wasm.costmodels_inner(this.__wbg_ptr);
10760
- return MapU64ToArrI64.__wrap(ret);
10754
+ plutus_v2() {
10755
+ const ret = wasm.costmodels_plutus_v2(this.__wbg_ptr);
10756
+ return ret === 0 ? undefined : IntList.__wrap(ret);
10757
+ }
10758
+ /**
10759
+ * @param {IntList} plutus_v3
10760
+ */
10761
+ set_plutus_v3(plutus_v3) {
10762
+ _assertClass(plutus_v3, IntList);
10763
+ wasm.costmodels_set_plutus_v3(this.__wbg_ptr, plutus_v3.__wbg_ptr);
10764
+ }
10765
+ /**
10766
+ * @returns {IntList | undefined}
10767
+ */
10768
+ plutus_v3() {
10769
+ const ret = wasm.costmodels_plutus_v3(this.__wbg_ptr);
10770
+ return ret === 0 ? undefined : IntList.__wrap(ret);
10771
+ }
10772
+ /**
10773
+ * @returns {CostModels}
10774
+ */
10775
+ static new() {
10776
+ const ret = wasm.costmodels_new();
10777
+ return CostModels.__wrap(ret);
10761
10778
  }
10762
10779
  }
10763
10780
  module.exports.CostModels = CostModels;
@@ -12839,26 +12856,6 @@ class ExUnits {
12839
12856
  wasm.__wbg_exunits_free(ptr);
12840
12857
  }
12841
12858
  /**
12842
- * @param {ExUnits} other
12843
- * @returns {ExUnits}
12844
- */
12845
- checked_add(other) {
12846
- try {
12847
- const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
12848
- _assertClass(other, ExUnits);
12849
- wasm.exunits_checked_add(retptr, this.__wbg_ptr, other.__wbg_ptr);
12850
- var r0 = getInt32Memory0()[retptr / 4 + 0];
12851
- var r1 = getInt32Memory0()[retptr / 4 + 1];
12852
- var r2 = getInt32Memory0()[retptr / 4 + 2];
12853
- if (r2) {
12854
- throw takeObject(r1);
12855
- }
12856
- return ExUnits.__wrap(r0);
12857
- } finally {
12858
- wasm.__wbindgen_add_to_stack_pointer(16);
12859
- }
12860
- }
12861
- /**
12862
12859
  *
12863
12860
  * * Serialize this type to CBOR bytes
12864
12861
  * * This type type supports encoding preservation so this will preserve round-trip CBOR formats.
@@ -13041,6 +13038,26 @@ class ExUnits {
13041
13038
  const ret = wasm.exunits_new(mem, steps);
13042
13039
  return ExUnits.__wrap(ret);
13043
13040
  }
13041
+ /**
13042
+ * @param {ExUnits} other
13043
+ * @returns {ExUnits}
13044
+ */
13045
+ checked_add(other) {
13046
+ try {
13047
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
13048
+ _assertClass(other, ExUnits);
13049
+ wasm.exunits_checked_add(retptr, this.__wbg_ptr, other.__wbg_ptr);
13050
+ var r0 = getInt32Memory0()[retptr / 4 + 0];
13051
+ var r1 = getInt32Memory0()[retptr / 4 + 1];
13052
+ var r2 = getInt32Memory0()[retptr / 4 + 2];
13053
+ if (r2) {
13054
+ throw takeObject(r1);
13055
+ }
13056
+ return ExUnits.__wrap(r0);
13057
+ } finally {
13058
+ wasm.__wbindgen_add_to_stack_pointer(16);
13059
+ }
13060
+ }
13044
13061
  }
13045
13062
  module.exports.ExUnits = ExUnits;
13046
13063
 
@@ -17240,115 +17257,6 @@ class MapTransactionMetadatumToTransactionMetadatum {
17240
17257
  }
17241
17258
  module.exports.MapTransactionMetadatumToTransactionMetadatum = MapTransactionMetadatumToTransactionMetadatum;
17242
17259
 
17243
- const MapU64ToArrI64Finalization = (typeof FinalizationRegistry === 'undefined')
17244
- ? { register: () => {}, unregister: () => {} }
17245
- : new FinalizationRegistry(ptr => wasm.__wbg_mapu64toarri64_free(ptr >>> 0));
17246
- /**
17247
- */
17248
- class MapU64ToArrI64 {
17249
-
17250
- static __wrap(ptr) {
17251
- ptr = ptr >>> 0;
17252
- const obj = Object.create(MapU64ToArrI64.prototype);
17253
- obj.__wbg_ptr = ptr;
17254
- MapU64ToArrI64Finalization.register(obj, obj.__wbg_ptr, obj);
17255
- return obj;
17256
- }
17257
-
17258
- __destroy_into_raw() {
17259
- const ptr = this.__wbg_ptr;
17260
- this.__wbg_ptr = 0;
17261
- MapU64ToArrI64Finalization.unregister(this);
17262
- return ptr;
17263
- }
17264
-
17265
- free() {
17266
- const ptr = this.__destroy_into_raw();
17267
- wasm.__wbg_mapu64toarri64_free(ptr);
17268
- }
17269
- /**
17270
- * @param {bigint} key
17271
- * @returns {BigInt64Array | undefined}
17272
- */
17273
- get(key) {
17274
- try {
17275
- const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
17276
- wasm.mapu64toarri64_get(retptr, this.__wbg_ptr, key);
17277
- var r0 = getInt32Memory0()[retptr / 4 + 0];
17278
- var r1 = getInt32Memory0()[retptr / 4 + 1];
17279
- let v1;
17280
- if (r0 !== 0) {
17281
- v1 = getArrayI64FromWasm0(r0, r1).slice();
17282
- wasm.__wbindgen_free(r0, r1 * 8, 8);
17283
- }
17284
- return v1;
17285
- } finally {
17286
- wasm.__wbindgen_add_to_stack_pointer(16);
17287
- }
17288
- }
17289
- /**
17290
- * @param {bigint} key
17291
- * @param {BigInt64Array} value
17292
- * @returns {BigInt64Array | undefined}
17293
- */
17294
- insert(key, value) {
17295
- try {
17296
- const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
17297
- const ptr0 = passArray64ToWasm0(value, wasm.__wbindgen_malloc);
17298
- const len0 = WASM_VECTOR_LEN;
17299
- wasm.mapu64toarri64_insert(retptr, this.__wbg_ptr, key, ptr0, len0);
17300
- var r0 = getInt32Memory0()[retptr / 4 + 0];
17301
- var r1 = getInt32Memory0()[retptr / 4 + 1];
17302
- let v2;
17303
- if (r0 !== 0) {
17304
- v2 = getArrayI64FromWasm0(r0, r1).slice();
17305
- wasm.__wbindgen_free(r0, r1 * 8, 8);
17306
- }
17307
- return v2;
17308
- } finally {
17309
- wasm.__wbindgen_add_to_stack_pointer(16);
17310
- }
17311
- }
17312
- /**
17313
- * @returns {MapU64ToArrI64}
17314
- */
17315
- static new() {
17316
- const ret = wasm.mapu64toarri64_new();
17317
- return MapU64ToArrI64.__wrap(ret);
17318
- }
17319
- /**
17320
- * @returns {number}
17321
- */
17322
- len() {
17323
- const ret = wasm.mapu64toarri64_len(this.__wbg_ptr);
17324
- return ret >>> 0;
17325
- }
17326
- /**
17327
- * @returns {boolean}
17328
- */
17329
- is_empty() {
17330
- const ret = wasm.mapu64toarri64_is_empty(this.__wbg_ptr);
17331
- return ret !== 0;
17332
- }
17333
- /**
17334
- * @returns {BigUint64Array}
17335
- */
17336
- keys() {
17337
- try {
17338
- const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
17339
- wasm.mapu64toarri64_keys(retptr, this.__wbg_ptr);
17340
- var r0 = getInt32Memory0()[retptr / 4 + 0];
17341
- var r1 = getInt32Memory0()[retptr / 4 + 1];
17342
- var v1 = getArrayU64FromWasm0(r0, r1).slice();
17343
- wasm.__wbindgen_free(r0, r1 * 8, 8);
17344
- return v1;
17345
- } finally {
17346
- wasm.__wbindgen_add_to_stack_pointer(16);
17347
- }
17348
- }
17349
- }
17350
- module.exports.MapU64ToArrI64 = MapU64ToArrI64;
17351
-
17352
17260
  const MetadataFinalization = (typeof FinalizationRegistry === 'undefined')
17353
17261
  ? { register: () => {}, unregister: () => {} }
17354
17262
  : new FinalizationRegistry(ptr => wasm.__wbg_metadata_free(ptr >>> 0));
@@ -20908,13 +20816,6 @@ class PlutusV1Script {
20908
20816
  wasm.__wbg_plutusv1script_free(ptr);
20909
20817
  }
20910
20818
  /**
20911
- * @returns {ScriptHash}
20912
- */
20913
- hash() {
20914
- const ret = wasm.plutusv1script_hash(this.__wbg_ptr);
20915
- return ScriptHash.__wrap(ret);
20916
- }
20917
- /**
20918
20819
  *
20919
20820
  * * Serialize this type to CBOR bytes
20920
20821
  * * This type type supports encoding preservation so this will preserve round-trip CBOR formats.
@@ -21090,6 +20991,13 @@ class PlutusV1Script {
21090
20991
  wasm.__wbindgen_add_to_stack_pointer(16);
21091
20992
  }
21092
20993
  }
20994
+ /**
20995
+ * @returns {ScriptHash}
20996
+ */
20997
+ hash() {
20998
+ const ret = wasm.plutusv1script_hash(this.__wbg_ptr);
20999
+ return ScriptHash.__wrap(ret);
21000
+ }
21093
21001
  }
21094
21002
  module.exports.PlutusV1Script = PlutusV1Script;
21095
21003
 
@@ -21178,13 +21086,6 @@ class PlutusV2Script {
21178
21086
  wasm.__wbg_plutusv2script_free(ptr);
21179
21087
  }
21180
21088
  /**
21181
- * @returns {ScriptHash}
21182
- */
21183
- hash() {
21184
- const ret = wasm.plutusv2script_hash(this.__wbg_ptr);
21185
- return ScriptHash.__wrap(ret);
21186
- }
21187
- /**
21188
21089
  *
21189
21090
  * * Serialize this type to CBOR bytes
21190
21091
  * * This type type supports encoding preservation so this will preserve round-trip CBOR formats.
@@ -21360,6 +21261,13 @@ class PlutusV2Script {
21360
21261
  wasm.__wbindgen_add_to_stack_pointer(16);
21361
21262
  }
21362
21263
  }
21264
+ /**
21265
+ * @returns {ScriptHash}
21266
+ */
21267
+ hash() {
21268
+ const ret = wasm.plutusv2script_hash(this.__wbg_ptr);
21269
+ return ScriptHash.__wrap(ret);
21270
+ }
21363
21271
  }
21364
21272
  module.exports.PlutusV2Script = PlutusV2Script;
21365
21273
 
@@ -25608,13 +25516,6 @@ class Redeemers {
25608
25516
  wasm.__wbg_redeemers_free(ptr);
25609
25517
  }
25610
25518
  /**
25611
- * @returns {LegacyRedeemerList}
25612
- */
25613
- to_flat_format() {
25614
- const ret = wasm.redeemers_to_flat_format(this.__wbg_ptr);
25615
- return LegacyRedeemerList.__wrap(ret);
25616
- }
25617
- /**
25618
25519
  *
25619
25520
  * * Serialize this type to CBOR bytes
25620
25521
  * * This type type supports encoding preservation so this will preserve round-trip CBOR formats.
@@ -25813,6 +25714,13 @@ class Redeemers {
25813
25714
  const ret = wasm.redeemers_as_map_redeemer_key_to_redeemer_val(this.__wbg_ptr);
25814
25715
  return ret === 0 ? undefined : MapRedeemerKeyToRedeemerVal.__wrap(ret);
25815
25716
  }
25717
+ /**
25718
+ * @returns {LegacyRedeemerList}
25719
+ */
25720
+ to_flat_format() {
25721
+ const ret = wasm.redeemers_to_flat_format(this.__wbg_ptr);
25722
+ return LegacyRedeemerList.__wrap(ret);
25723
+ }
25816
25724
  }
25817
25725
  module.exports.Redeemers = Redeemers;
25818
25726
 
@@ -39576,11 +39484,6 @@ module.exports.__wbg_getRandomValues_3aa56aa6edec874c = function() { return hand
39576
39484
  getObject(arg0).getRandomValues(getObject(arg1));
39577
39485
  }, arguments) };
39578
39486
 
39579
- module.exports.__wbindgen_error_new = function(arg0, arg1) {
39580
- const ret = new Error(getStringFromWasm0(arg0, arg1));
39581
- return addHeapObject(ret);
39582
- };
39583
-
39584
39487
  module.exports.__wbg_String_91fba7ded13ba54c = function(arg0, arg1) {
39585
39488
  const ret = String(getObject(arg1));
39586
39489
  const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
@@ -39589,6 +39492,11 @@ module.exports.__wbg_String_91fba7ded13ba54c = function(arg0, arg1) {
39589
39492
  getInt32Memory0()[arg0 / 4 + 0] = ptr1;
39590
39493
  };
39591
39494
 
39495
+ module.exports.__wbindgen_error_new = function(arg0, arg1) {
39496
+ const ret = new Error(getStringFromWasm0(arg0, arg1));
39497
+ return addHeapObject(ret);
39498
+ };
39499
+
39592
39500
  module.exports.__wbindgen_bigint_from_i64 = function(arg0) {
39593
39501
  const ret = arg0;
39594
39502
  return addHeapObject(ret);