@anastasia-labs/cardano-multiplatform-lib-nodejs 6.0.2-1 → 6.0.2-3

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.
@@ -10,20 +10,6 @@ heap.push(undefined, null, true, false);
10
10
 
11
11
  function getObject(idx) { return heap[idx]; }
12
12
 
13
- let heap_next = heap.length;
14
-
15
- function dropObject(idx) {
16
- if (idx < 132) return;
17
- heap[idx] = heap_next;
18
- heap_next = idx;
19
- }
20
-
21
- function takeObject(idx) {
22
- const ret = getObject(idx);
23
- dropObject(idx);
24
- return ret;
25
- }
26
-
27
13
  let cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
28
14
 
29
15
  cachedTextDecoder.decode();
@@ -42,6 +28,8 @@ function getStringFromWasm0(ptr, len) {
42
28
  return cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr, ptr + len));
43
29
  }
44
30
 
31
+ let heap_next = heap.length;
32
+
45
33
  function addHeapObject(obj) {
46
34
  if (heap_next === heap.length) heap.push(heap.length + 1);
47
35
  const idx = heap_next;
@@ -51,6 +39,18 @@ function addHeapObject(obj) {
51
39
  return idx;
52
40
  }
53
41
 
42
+ function dropObject(idx) {
43
+ if (idx < 132) return;
44
+ heap[idx] = heap_next;
45
+ heap_next = idx;
46
+ }
47
+
48
+ function takeObject(idx) {
49
+ const ret = getObject(idx);
50
+ dropObject(idx);
51
+ return ret;
52
+ }
53
+
54
54
  function handleError(f, args) {
55
55
  try {
56
56
  return f.apply(this, args);
@@ -135,6 +135,13 @@ function passArray8ToWasm0(arg, malloc) {
135
135
  WASM_VECTOR_LEN = arg.length;
136
136
  return ptr;
137
137
  }
138
+
139
+ function _assertClass(instance, klass) {
140
+ if (!(instance instanceof klass)) {
141
+ throw new Error(`expected instance of ${klass.name}`);
142
+ }
143
+ return instance.ptr;
144
+ }
138
145
  /**
139
146
  * Encrypt using Emip3: https://github.com/Emurgo/EmIPs/blob/master/specs/emip-003.md
140
147
  * @param {string} password
@@ -211,11 +218,207 @@ module.exports.emip3_decrypt_with_password = function(password, data) {
211
218
  }
212
219
  };
213
220
 
214
- function _assertClass(instance, klass) {
215
- if (!(instance instanceof klass)) {
216
- throw new Error(`expected instance of ${klass.name}`);
221
+ function isLikeNone(x) {
222
+ return x === undefined || x === null;
223
+ }
224
+ /**
225
+ * encodes arbitrary bytes into chunks of 64 bytes (the limit for bytes) as a list to be valid Metadata
226
+ * @param {Uint8Array} bytes
227
+ * @returns {TransactionMetadatum}
228
+ */
229
+ module.exports.encode_arbitrary_bytes_as_metadatum = function(bytes) {
230
+ const ptr0 = passArray8ToWasm0(bytes, wasm.__wbindgen_malloc);
231
+ const len0 = WASM_VECTOR_LEN;
232
+ const ret = wasm.encode_arbitrary_bytes_as_metadatum(ptr0, len0);
233
+ return TransactionMetadatum.__wrap(ret);
234
+ };
235
+
236
+ /**
237
+ * decodes from chunks of bytes in a list to a byte vector if that is the metadata format, otherwise returns None
238
+ * @param {TransactionMetadatum} metadata
239
+ * @returns {Uint8Array | undefined}
240
+ */
241
+ module.exports.decode_arbitrary_bytes_from_metadatum = function(metadata) {
242
+ try {
243
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
244
+ _assertClass(metadata, TransactionMetadatum);
245
+ wasm.decode_arbitrary_bytes_from_metadatum(retptr, metadata.__wbg_ptr);
246
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
247
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
248
+ let v1;
249
+ if (r0 !== 0) {
250
+ v1 = getArrayU8FromWasm0(r0, r1).slice();
251
+ wasm.__wbindgen_free(r0, r1 * 1, 1);
252
+ }
253
+ return v1;
254
+ } finally {
255
+ wasm.__wbindgen_add_to_stack_pointer(16);
217
256
  }
218
- return instance.ptr;
257
+ };
258
+
259
+ /**
260
+ *
261
+ * * Min fee for JUST the script, NOT including ref inputs
262
+ *
263
+ * @param {Transaction} tx
264
+ * @param {ExUnitPrices} ex_unit_prices
265
+ * @returns {bigint}
266
+ */
267
+ module.exports.min_script_fee = function(tx, ex_unit_prices) {
268
+ try {
269
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
270
+ _assertClass(tx, Transaction);
271
+ _assertClass(ex_unit_prices, ExUnitPrices);
272
+ wasm.min_script_fee(retptr, tx.__wbg_ptr, ex_unit_prices.__wbg_ptr);
273
+ var r0 = getDataViewMemory0().getBigInt64(retptr + 8 * 0, true);
274
+ var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
275
+ var r3 = getDataViewMemory0().getInt32(retptr + 4 * 3, true);
276
+ if (r3) {
277
+ throw takeObject(r2);
278
+ }
279
+ return BigInt.asUintN(64, r0);
280
+ } finally {
281
+ wasm.__wbindgen_add_to_stack_pointer(16);
282
+ }
283
+ };
284
+
285
+ /**
286
+ * @param {Transaction} tx
287
+ * @param {LinearFee} linear_fee
288
+ * @returns {bigint}
289
+ */
290
+ module.exports.min_no_script_fee = function(tx, linear_fee) {
291
+ try {
292
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
293
+ _assertClass(tx, Transaction);
294
+ _assertClass(linear_fee, LinearFee);
295
+ wasm.min_no_script_fee(retptr, tx.__wbg_ptr, linear_fee.__wbg_ptr);
296
+ var r0 = getDataViewMemory0().getBigInt64(retptr + 8 * 0, true);
297
+ var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
298
+ var r3 = getDataViewMemory0().getInt32(retptr + 4 * 3, true);
299
+ if (r3) {
300
+ throw takeObject(r2);
301
+ }
302
+ return BigInt.asUintN(64, r0);
303
+ } finally {
304
+ wasm.__wbindgen_add_to_stack_pointer(16);
305
+ }
306
+ };
307
+
308
+ /**
309
+ *
310
+ * * Calculates the cost of all ref scripts
311
+ * * * `total_ref_script_size` - Total size (original, not hashes) of all ref scripts. Duplicate scripts are counted as many times as they occur
312
+ *
313
+ * @param {Transaction} tx
314
+ * @param {LinearFee} linear_fee
315
+ * @param {ExUnitPrices} ex_unit_prices
316
+ * @param {bigint} total_ref_script_size
317
+ * @returns {bigint}
318
+ */
319
+ module.exports.min_fee = function(tx, linear_fee, ex_unit_prices, total_ref_script_size) {
320
+ try {
321
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
322
+ _assertClass(tx, Transaction);
323
+ _assertClass(linear_fee, LinearFee);
324
+ _assertClass(ex_unit_prices, ExUnitPrices);
325
+ wasm.min_fee(retptr, tx.__wbg_ptr, linear_fee.__wbg_ptr, ex_unit_prices.__wbg_ptr, total_ref_script_size);
326
+ var r0 = getDataViewMemory0().getBigInt64(retptr + 8 * 0, true);
327
+ var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
328
+ var r3 = getDataViewMemory0().getInt32(retptr + 4 * 3, true);
329
+ if (r3) {
330
+ throw takeObject(r2);
331
+ }
332
+ return BigInt.asUintN(64, r0);
333
+ } finally {
334
+ wasm.__wbindgen_add_to_stack_pointer(16);
335
+ }
336
+ };
337
+
338
+ /**
339
+ * @param {TransactionHash} tx_body_hash
340
+ * @param {ByronAddress} addr
341
+ * @param {LegacyDaedalusPrivateKey} key
342
+ * @returns {BootstrapWitness}
343
+ */
344
+ module.exports.make_daedalus_bootstrap_witness = function(tx_body_hash, addr, key) {
345
+ _assertClass(tx_body_hash, TransactionHash);
346
+ _assertClass(addr, ByronAddress);
347
+ _assertClass(key, LegacyDaedalusPrivateKey);
348
+ const ret = wasm.make_daedalus_bootstrap_witness(tx_body_hash.__wbg_ptr, addr.__wbg_ptr, key.__wbg_ptr);
349
+ return BootstrapWitness.__wrap(ret);
350
+ };
351
+
352
+ /**
353
+ * @param {TransactionHash} tx_body_hash
354
+ * @param {ByronAddress} addr
355
+ * @param {Bip32PrivateKey} key
356
+ * @returns {BootstrapWitness}
357
+ */
358
+ module.exports.make_icarus_bootstrap_witness = function(tx_body_hash, addr, key) {
359
+ _assertClass(tx_body_hash, TransactionHash);
360
+ var ptr0 = tx_body_hash.__destroy_into_raw();
361
+ _assertClass(addr, ByronAddress);
362
+ var ptr1 = addr.__destroy_into_raw();
363
+ _assertClass(key, Bip32PrivateKey);
364
+ const ret = wasm.make_icarus_bootstrap_witness(ptr0, ptr1, key.__wbg_ptr);
365
+ return BootstrapWitness.__wrap(ret);
366
+ };
367
+
368
+ /**
369
+ * @param {Redeemers} redeemers
370
+ * @returns {ExUnits}
371
+ */
372
+ module.exports.compute_total_ex_units = function(redeemers) {
373
+ try {
374
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
375
+ _assertClass(redeemers, Redeemers);
376
+ wasm.compute_total_ex_units(retptr, redeemers.__wbg_ptr);
377
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
378
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
379
+ var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
380
+ if (r2) {
381
+ throw takeObject(r1);
382
+ }
383
+ return ExUnits.__wrap(r0);
384
+ } finally {
385
+ wasm.__wbindgen_add_to_stack_pointer(16);
386
+ }
387
+ };
388
+
389
+ let cachedUint16ArrayMemory0 = null;
390
+
391
+ function getUint16ArrayMemory0() {
392
+ if (cachedUint16ArrayMemory0 === null || cachedUint16ArrayMemory0.byteLength === 0) {
393
+ cachedUint16ArrayMemory0 = new Uint16Array(wasm.memory.buffer);
394
+ }
395
+ return cachedUint16ArrayMemory0;
396
+ }
397
+
398
+ function getArrayU16FromWasm0(ptr, len) {
399
+ ptr = ptr >>> 0;
400
+ return getUint16ArrayMemory0().subarray(ptr / 2, ptr / 2 + len);
401
+ }
402
+
403
+ function passArray16ToWasm0(arg, malloc) {
404
+ const ptr = malloc(arg.length * 2, 2) >>> 0;
405
+ getUint16ArrayMemory0().set(arg, ptr / 2);
406
+ WASM_VECTOR_LEN = arg.length;
407
+ return ptr;
408
+ }
409
+
410
+ let cachedUint32ArrayMemory0 = null;
411
+
412
+ function getUint32ArrayMemory0() {
413
+ if (cachedUint32ArrayMemory0 === null || cachedUint32ArrayMemory0.byteLength === 0) {
414
+ cachedUint32ArrayMemory0 = new Uint32Array(wasm.memory.buffer);
415
+ }
416
+ return cachedUint32ArrayMemory0;
417
+ }
418
+
419
+ function getArrayU32FromWasm0(ptr, len) {
420
+ ptr = ptr >>> 0;
421
+ return getUint32ArrayMemory0().subarray(ptr / 4, ptr / 4 + len);
219
422
  }
220
423
  /**
221
424
  * @param {AuxiliaryData} auxiliary_data
@@ -247,9 +450,6 @@ module.exports.hash_plutus_data = function(plutus_data) {
247
450
  return DatumHash.__wrap(ret);
248
451
  };
249
452
 
250
- function isLikeNone(x) {
251
- return x === undefined || x === null;
252
- }
253
453
  /**
254
454
  * Calculates the hash for script data (no plutus scripts) if it is necessary.
255
455
  * Returns None if it was not necessary (no datums/redeemers) to include.
@@ -343,6 +543,18 @@ module.exports.calc_script_data_hash_from_witness = function(witnesses, cost_mod
343
543
  }
344
544
  };
345
545
 
546
+ /**
547
+ * @param {TransactionHash} tx_body_hash
548
+ * @param {PrivateKey} sk
549
+ * @returns {Vkeywitness}
550
+ */
551
+ module.exports.make_vkey_witness = function(tx_body_hash, sk) {
552
+ _assertClass(tx_body_hash, TransactionHash);
553
+ _assertClass(sk, PrivateKey);
554
+ const ret = wasm.make_vkey_witness(tx_body_hash.__wbg_ptr, sk.__wbg_ptr);
555
+ return Vkeywitness.__wrap(ret);
556
+ };
557
+
346
558
  /**
347
559
  * @param {TransactionBody} txbody
348
560
  * @param {bigint} pool_deposit
@@ -521,216 +733,6 @@ module.exports.min_ada_required = function(output, coins_per_utxo_byte) {
521
733
  }
522
734
  };
523
735
 
524
- /**
525
- * @param {Redeemers} redeemers
526
- * @returns {ExUnits}
527
- */
528
- module.exports.compute_total_ex_units = function(redeemers) {
529
- try {
530
- const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
531
- _assertClass(redeemers, Redeemers);
532
- wasm.compute_total_ex_units(retptr, redeemers.__wbg_ptr);
533
- var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
534
- var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
535
- var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
536
- if (r2) {
537
- throw takeObject(r1);
538
- }
539
- return ExUnits.__wrap(r0);
540
- } finally {
541
- wasm.__wbindgen_add_to_stack_pointer(16);
542
- }
543
- };
544
-
545
- /**
546
- * encodes arbitrary bytes into chunks of 64 bytes (the limit for bytes) as a list to be valid Metadata
547
- * @param {Uint8Array} bytes
548
- * @returns {TransactionMetadatum}
549
- */
550
- module.exports.encode_arbitrary_bytes_as_metadatum = function(bytes) {
551
- const ptr0 = passArray8ToWasm0(bytes, wasm.__wbindgen_malloc);
552
- const len0 = WASM_VECTOR_LEN;
553
- const ret = wasm.encode_arbitrary_bytes_as_metadatum(ptr0, len0);
554
- return TransactionMetadatum.__wrap(ret);
555
- };
556
-
557
- /**
558
- * decodes from chunks of bytes in a list to a byte vector if that is the metadata format, otherwise returns None
559
- * @param {TransactionMetadatum} metadata
560
- * @returns {Uint8Array | undefined}
561
- */
562
- module.exports.decode_arbitrary_bytes_from_metadatum = function(metadata) {
563
- try {
564
- const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
565
- _assertClass(metadata, TransactionMetadatum);
566
- wasm.decode_arbitrary_bytes_from_metadatum(retptr, metadata.__wbg_ptr);
567
- var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
568
- var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
569
- let v1;
570
- if (r0 !== 0) {
571
- v1 = getArrayU8FromWasm0(r0, r1).slice();
572
- wasm.__wbindgen_free(r0, r1 * 1, 1);
573
- }
574
- return v1;
575
- } finally {
576
- wasm.__wbindgen_add_to_stack_pointer(16);
577
- }
578
- };
579
-
580
- let cachedUint16ArrayMemory0 = null;
581
-
582
- function getUint16ArrayMemory0() {
583
- if (cachedUint16ArrayMemory0 === null || cachedUint16ArrayMemory0.byteLength === 0) {
584
- cachedUint16ArrayMemory0 = new Uint16Array(wasm.memory.buffer);
585
- }
586
- return cachedUint16ArrayMemory0;
587
- }
588
-
589
- function getArrayU16FromWasm0(ptr, len) {
590
- ptr = ptr >>> 0;
591
- return getUint16ArrayMemory0().subarray(ptr / 2, ptr / 2 + len);
592
- }
593
-
594
- function passArray16ToWasm0(arg, malloc) {
595
- const ptr = malloc(arg.length * 2, 2) >>> 0;
596
- getUint16ArrayMemory0().set(arg, ptr / 2);
597
- WASM_VECTOR_LEN = arg.length;
598
- return ptr;
599
- }
600
- /**
601
- * @param {TransactionHash} tx_body_hash
602
- * @param {PrivateKey} sk
603
- * @returns {Vkeywitness}
604
- */
605
- module.exports.make_vkey_witness = function(tx_body_hash, sk) {
606
- _assertClass(tx_body_hash, TransactionHash);
607
- _assertClass(sk, PrivateKey);
608
- const ret = wasm.make_vkey_witness(tx_body_hash.__wbg_ptr, sk.__wbg_ptr);
609
- return Vkeywitness.__wrap(ret);
610
- };
611
-
612
- let cachedUint32ArrayMemory0 = null;
613
-
614
- function getUint32ArrayMemory0() {
615
- if (cachedUint32ArrayMemory0 === null || cachedUint32ArrayMemory0.byteLength === 0) {
616
- cachedUint32ArrayMemory0 = new Uint32Array(wasm.memory.buffer);
617
- }
618
- return cachedUint32ArrayMemory0;
619
- }
620
-
621
- function getArrayU32FromWasm0(ptr, len) {
622
- ptr = ptr >>> 0;
623
- return getUint32ArrayMemory0().subarray(ptr / 4, ptr / 4 + len);
624
- }
625
- /**
626
- * @param {TransactionHash} tx_body_hash
627
- * @param {ByronAddress} addr
628
- * @param {LegacyDaedalusPrivateKey} key
629
- * @returns {BootstrapWitness}
630
- */
631
- module.exports.make_daedalus_bootstrap_witness = function(tx_body_hash, addr, key) {
632
- _assertClass(tx_body_hash, TransactionHash);
633
- _assertClass(addr, ByronAddress);
634
- _assertClass(key, LegacyDaedalusPrivateKey);
635
- const ret = wasm.make_daedalus_bootstrap_witness(tx_body_hash.__wbg_ptr, addr.__wbg_ptr, key.__wbg_ptr);
636
- return BootstrapWitness.__wrap(ret);
637
- };
638
-
639
- /**
640
- * @param {TransactionHash} tx_body_hash
641
- * @param {ByronAddress} addr
642
- * @param {Bip32PrivateKey} key
643
- * @returns {BootstrapWitness}
644
- */
645
- module.exports.make_icarus_bootstrap_witness = function(tx_body_hash, addr, key) {
646
- _assertClass(tx_body_hash, TransactionHash);
647
- var ptr0 = tx_body_hash.__destroy_into_raw();
648
- _assertClass(addr, ByronAddress);
649
- var ptr1 = addr.__destroy_into_raw();
650
- _assertClass(key, Bip32PrivateKey);
651
- const ret = wasm.make_icarus_bootstrap_witness(ptr0, ptr1, key.__wbg_ptr);
652
- return BootstrapWitness.__wrap(ret);
653
- };
654
-
655
- /**
656
- *
657
- * * Min fee for JUST the script, NOT including ref inputs
658
- *
659
- * @param {Transaction} tx
660
- * @param {ExUnitPrices} ex_unit_prices
661
- * @returns {bigint}
662
- */
663
- module.exports.min_script_fee = function(tx, ex_unit_prices) {
664
- try {
665
- const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
666
- _assertClass(tx, Transaction);
667
- _assertClass(ex_unit_prices, ExUnitPrices);
668
- wasm.min_script_fee(retptr, tx.__wbg_ptr, ex_unit_prices.__wbg_ptr);
669
- var r0 = getDataViewMemory0().getBigInt64(retptr + 8 * 0, true);
670
- var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
671
- var r3 = getDataViewMemory0().getInt32(retptr + 4 * 3, true);
672
- if (r3) {
673
- throw takeObject(r2);
674
- }
675
- return BigInt.asUintN(64, r0);
676
- } finally {
677
- wasm.__wbindgen_add_to_stack_pointer(16);
678
- }
679
- };
680
-
681
- /**
682
- * @param {Transaction} tx
683
- * @param {LinearFee} linear_fee
684
- * @returns {bigint}
685
- */
686
- module.exports.min_no_script_fee = function(tx, linear_fee) {
687
- try {
688
- const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
689
- _assertClass(tx, Transaction);
690
- _assertClass(linear_fee, LinearFee);
691
- wasm.min_no_script_fee(retptr, tx.__wbg_ptr, linear_fee.__wbg_ptr);
692
- var r0 = getDataViewMemory0().getBigInt64(retptr + 8 * 0, true);
693
- var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
694
- var r3 = getDataViewMemory0().getInt32(retptr + 4 * 3, true);
695
- if (r3) {
696
- throw takeObject(r2);
697
- }
698
- return BigInt.asUintN(64, r0);
699
- } finally {
700
- wasm.__wbindgen_add_to_stack_pointer(16);
701
- }
702
- };
703
-
704
- /**
705
- *
706
- * * Calculates the cost of all ref scripts
707
- * * * `total_ref_script_size` - Total size (original, not hashes) of all ref scripts. Duplicate scripts are counted as many times as they occur
708
- *
709
- * @param {Transaction} tx
710
- * @param {LinearFee} linear_fee
711
- * @param {ExUnitPrices} ex_unit_prices
712
- * @param {bigint} total_ref_script_size
713
- * @returns {bigint}
714
- */
715
- module.exports.min_fee = function(tx, linear_fee, ex_unit_prices, total_ref_script_size) {
716
- try {
717
- const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
718
- _assertClass(tx, Transaction);
719
- _assertClass(linear_fee, LinearFee);
720
- _assertClass(ex_unit_prices, ExUnitPrices);
721
- wasm.min_fee(retptr, tx.__wbg_ptr, linear_fee.__wbg_ptr, ex_unit_prices.__wbg_ptr, total_ref_script_size);
722
- var r0 = getDataViewMemory0().getBigInt64(retptr + 8 * 0, true);
723
- var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
724
- var r3 = getDataViewMemory0().getInt32(retptr + 4 * 3, true);
725
- if (r3) {
726
- throw takeObject(r2);
727
- }
728
- return BigInt.asUintN(64, r0);
729
- } finally {
730
- wasm.__wbindgen_add_to_stack_pointer(16);
731
- }
732
- };
733
-
734
736
  let cachedBigInt64ArrayMemory0 = null;
735
737
 
736
738
  function getBigInt64ArrayMemory0() {
@@ -766,93 +768,6 @@ function getArrayU64FromWasm0(ptr, len) {
766
768
  return getBigUint64ArrayMemory0().subarray(ptr / 8, ptr / 8 + len);
767
769
  }
768
770
  /**
769
- */
770
- module.exports.DelegationDistributionKind = Object.freeze({ Weighted:0,"0":"Weighted",Legacy:1,"1":"Legacy", });
771
- /**
772
- */
773
- module.exports.AuxiliaryDataKind = Object.freeze({ Shelley:0,"0":"Shelley",ShelleyMA:1,"1":"ShelleyMA",Conway:2,"2":"Conway", });
774
- /**
775
- */
776
- module.exports.ChunkableStringKind = Object.freeze({ Single:0,"0":"Single",Chunked:1,"1":"Chunked", });
777
- /**
778
- */
779
- 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", });
780
- /**
781
- */
782
- module.exports.ScriptKind = Object.freeze({ Native:0,"0":"Native",PlutusV1:1,"1":"PlutusV1",PlutusV2:2,"2":"PlutusV2",PlutusV3:3,"3":"PlutusV3", });
783
- /**
784
- */
785
- 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", });
786
- /**
787
- * Which version of the CIP25 spec to use. See CIP25 for details.
788
- * This will change how things are encoded but for the most part contains
789
- * the same information.
790
- */
791
- module.exports.CIP25Version = Object.freeze({
792
- /**
793
- * Initial version of CIP25 with only string (utf8) asset names allowed.
794
- */
795
- V1:0,"0":"V1",
796
- /**
797
- * Second version of CIP25. Supports any type of asset names.
798
- */
799
- V2:1,"1":"V2", });
800
- /**
801
- */
802
- module.exports.DatumOptionKind = Object.freeze({ Hash:0,"0":"Hash",Datum:1,"1":"Datum", });
803
- /**
804
- */
805
- module.exports.TransactionOutputKind = Object.freeze({ AlonzoFormatTxOut:0,"0":"AlonzoFormatTxOut",ConwayFormatTxOut:1,"1":"ConwayFormatTxOut", });
806
- /**
807
- */
808
- module.exports.MetadataJsonSchema = Object.freeze({ NoConversions:0,"0":"NoConversions",BasicConversions:1,"1":"BasicConversions",DetailedSchema:2,"2":"DetailedSchema", });
809
- /**
810
- */
811
- module.exports.RelayKind = Object.freeze({ SingleHostAddr:0,"0":"SingleHostAddr",SingleHostName:1,"1":"SingleHostName",MultiHostName:2,"2":"MultiHostName", });
812
- /**
813
- */
814
- module.exports.DRepKind = Object.freeze({ Key:0,"0":"Key",Script:1,"1":"Script",AlwaysAbstain:2,"2":"AlwaysAbstain",AlwaysNoConfidence:3,"3":"AlwaysNoConfidence", });
815
- /**
816
- */
817
- module.exports.StakeDistributionKind = Object.freeze({ SingleKey:0,"0":"SingleKey",BootstrapEra:1,"1":"BootstrapEra", });
818
- /**
819
- */
820
- module.exports.ChangeSelectionAlgo = Object.freeze({ Default:0,"0":"Default", });
821
- /**
822
- */
823
- module.exports.CoinSelectionStrategyCIP2 = Object.freeze({
824
- /**
825
- * Performs CIP2's Largest First ada-only selection. Will error if outputs contain non-ADA assets.
826
- */
827
- LargestFirst:0,"0":"LargestFirst",
828
- /**
829
- * Performs CIP2's Random Improve ada-only selection. Will error if outputs contain non-ADA assets.
830
- */
831
- RandomImprove:1,"1":"RandomImprove",
832
- /**
833
- * Same as LargestFirst, but before adding ADA, will insert by largest-first for each asset type.
834
- */
835
- LargestFirstMultiAsset:2,"2":"LargestFirstMultiAsset",
836
- /**
837
- * Same as RandomImprove, but before adding ADA, will insert by random-improve for each asset type.
838
- */
839
- RandomImproveMultiAsset:3,"3":"RandomImproveMultiAsset", });
840
- /**
841
- */
842
- module.exports.ByronAddrType = Object.freeze({ PublicKey:0,"0":"PublicKey",Script:1,"1":"Script",Redeem:2,"2":"Redeem", });
843
- /**
844
- */
845
- 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", });
846
- /**
847
- */
848
- 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", });
849
- /**
850
- */
851
- module.exports.RedeemersKind = Object.freeze({ ArrLegacyRedeemer:0,"0":"ArrLegacyRedeemer",MapRedeemerKeyToRedeemerVal:1,"1":"MapRedeemerKeyToRedeemerVal", });
852
- /**
853
- */
854
- module.exports.SpendingDataKind = Object.freeze({ SpendingDataPubKey:0,"0":"SpendingDataPubKey",SpendingDataScript:1,"1":"SpendingDataScript",SpendingDataRedeem:2,"2":"SpendingDataRedeem", });
855
- /**
856
771
  * JSON <-> PlutusData conversion schemas.
857
772
  * Follows ScriptDataJsonSchema in cardano-cli defined at:
858
773
  * https://github.com/input-output-hk/cardano-node/blob/master/cardano-api/src/Cardano/Api/ScriptData.hs#L254
@@ -905,34 +820,121 @@ BasicConversions:0,"0":"BasicConversions",
905
820
  DetailedSchema:1,"1":"DetailedSchema", });
906
821
  /**
907
822
  */
908
- 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", });
823
+ module.exports.Language = Object.freeze({ PlutusV1:0,"0":"PlutusV1",PlutusV2:1,"1":"PlutusV2",PlutusV3:2,"2":"PlutusV3", });
909
824
  /**
910
- * Careful: this enum doesn't include the network ID part of the header
911
- * ex: base address isn't 0b0000_0000 but instead 0b0000
912
- * Use `header_matches_kind` if you don't want to implement the bitwise operators yourself
913
825
  */
914
- 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", });
826
+ module.exports.DelegationDistributionKind = Object.freeze({ Weighted:0,"0":"Weighted",Legacy:1,"1":"Legacy", });
827
+ /**
828
+ */
829
+ 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", });
830
+ /**
831
+ */
832
+ module.exports.ScriptKind = Object.freeze({ Native:0,"0":"Native",PlutusV1:1,"1":"PlutusV1",PlutusV2:2,"2":"PlutusV2",PlutusV3:3,"3":"PlutusV3", });
915
833
  /**
916
834
  */
917
835
  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", });
918
836
  /**
919
837
  */
920
- module.exports.Language = Object.freeze({ PlutusV1:0,"0":"PlutusV1",PlutusV2:1,"1":"PlutusV2",PlutusV3:2,"2":"PlutusV3", });
838
+ module.exports.AuxiliaryDataKind = Object.freeze({ Shelley:0,"0":"Shelley",ShelleyMA:1,"1":"ShelleyMA",Conway:2,"2":"Conway", });
921
839
  /**
922
840
  */
923
- 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", });
841
+ module.exports.ChunkableStringKind = Object.freeze({ Single:0,"0":"Single",Chunked:1,"1":"Chunked", });
924
842
  /**
925
843
  */
926
- module.exports.CredentialKind = Object.freeze({ PubKey:0,"0":"PubKey",Script:1,"1":"Script", });
844
+ 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", });
927
845
  /**
928
846
  */
929
- module.exports.Vote = Object.freeze({ No:0,"0":"No",Yes:1,"1":"Yes",Abstain:2,"2":"Abstain", });
847
+ 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", });
848
+ /**
849
+ */
850
+ module.exports.ByronAddrType = Object.freeze({ PublicKey:0,"0":"PublicKey",Script:1,"1":"Script",Redeem:2,"2":"Redeem", });
930
851
  /**
931
852
  */
932
853
  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", });
933
854
  /**
934
855
  */
856
+ module.exports.DRepKind = Object.freeze({ Key:0,"0":"Key",Script:1,"1":"Script",AlwaysAbstain:2,"2":"AlwaysAbstain",AlwaysNoConfidence:3,"3":"AlwaysNoConfidence", });
857
+ /**
858
+ */
859
+ module.exports.MetadataJsonSchema = Object.freeze({ NoConversions:0,"0":"NoConversions",BasicConversions:1,"1":"BasicConversions",DetailedSchema:2,"2":"DetailedSchema", });
860
+ /**
861
+ */
862
+ module.exports.DatumOptionKind = Object.freeze({ Hash:0,"0":"Hash",Datum:1,"1":"Datum", });
863
+ /**
864
+ */
865
+ module.exports.CoinSelectionStrategyCIP2 = Object.freeze({
866
+ /**
867
+ * Performs CIP2's Largest First ada-only selection. Will error if outputs contain non-ADA assets.
868
+ */
869
+ LargestFirst:0,"0":"LargestFirst",
870
+ /**
871
+ * Performs CIP2's Random Improve ada-only selection. Will error if outputs contain non-ADA assets.
872
+ */
873
+ RandomImprove:1,"1":"RandomImprove",
874
+ /**
875
+ * Same as LargestFirst, but before adding ADA, will insert by largest-first for each asset type.
876
+ */
877
+ LargestFirstMultiAsset:2,"2":"LargestFirstMultiAsset",
878
+ /**
879
+ * Same as RandomImprove, but before adding ADA, will insert by random-improve for each asset type.
880
+ */
881
+ RandomImproveMultiAsset:3,"3":"RandomImproveMultiAsset", });
882
+ /**
883
+ */
884
+ module.exports.Vote = Object.freeze({ No:0,"0":"No",Yes:1,"1":"Yes",Abstain:2,"2":"Abstain", });
885
+ /**
886
+ */
887
+ module.exports.RelayKind = Object.freeze({ SingleHostAddr:0,"0":"SingleHostAddr",SingleHostName:1,"1":"SingleHostName",MultiHostName:2,"2":"MultiHostName", });
888
+ /**
889
+ */
890
+ module.exports.RedeemersKind = Object.freeze({ ArrLegacyRedeemer:0,"0":"ArrLegacyRedeemer",MapRedeemerKeyToRedeemerVal:1,"1":"MapRedeemerKeyToRedeemerVal", });
891
+ /**
892
+ */
893
+ module.exports.StakeDistributionKind = Object.freeze({ SingleKey:0,"0":"SingleKey",BootstrapEra:1,"1":"BootstrapEra", });
894
+ /**
895
+ */
896
+ 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", });
897
+ /**
898
+ */
899
+ module.exports.SpendingDataKind = Object.freeze({ SpendingDataPubKey:0,"0":"SpendingDataPubKey",SpendingDataScript:1,"1":"SpendingDataScript",SpendingDataRedeem:2,"2":"SpendingDataRedeem", });
900
+ /**
901
+ */
902
+ module.exports.TransactionOutputKind = Object.freeze({ AlonzoFormatTxOut:0,"0":"AlonzoFormatTxOut",ConwayFormatTxOut:1,"1":"ConwayFormatTxOut", });
903
+ /**
904
+ */
905
+ module.exports.ChangeSelectionAlgo = Object.freeze({ Default:0,"0":"Default", });
906
+ /**
907
+ */
908
+ 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", });
909
+ /**
910
+ */
911
+ module.exports.CredentialKind = Object.freeze({ PubKey:0,"0":"PubKey",Script:1,"1":"Script", });
912
+ /**
913
+ * Careful: this enum doesn't include the network ID part of the header
914
+ * ex: base address isn't 0b0000_0000 but instead 0b0000
915
+ * Use `header_matches_kind` if you don't want to implement the bitwise operators yourself
916
+ */
917
+ 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", });
918
+ /**
919
+ */
935
920
  module.exports.NonceKind = Object.freeze({ Identity:0,"0":"Identity",Hash:1,"1":"Hash", });
921
+ /**
922
+ * Which version of the CIP25 spec to use. See CIP25 for details.
923
+ * This will change how things are encoded but for the most part contains
924
+ * the same information.
925
+ */
926
+ module.exports.CIP25Version = Object.freeze({
927
+ /**
928
+ * Initial version of CIP25 with only string (utf8) asset names allowed.
929
+ */
930
+ V1:0,"0":"V1",
931
+ /**
932
+ * Second version of CIP25. Supports any type of asset names.
933
+ */
934
+ V2:1,"1":"V2", });
935
+ /**
936
+ */
937
+ 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", });
936
938
 
937
939
  const AddrAttributesFinalization = (typeof FinalizationRegistry === 'undefined')
938
940
  ? { register: () => {}, unregister: () => {} }
@@ -961,6 +963,43 @@ class AddrAttributes {
961
963
  wasm.__wbg_addrattributes_free(ptr, 0);
962
964
  }
963
965
  /**
966
+ * @param {HDAddressPayload | undefined} [hdap]
967
+ * @param {ProtocolMagic | undefined} [protocol_magic]
968
+ * @returns {AddrAttributes}
969
+ */
970
+ static new_bootstrap_era(hdap, protocol_magic) {
971
+ let ptr0 = 0;
972
+ if (!isLikeNone(hdap)) {
973
+ _assertClass(hdap, HDAddressPayload);
974
+ ptr0 = hdap.__destroy_into_raw();
975
+ }
976
+ let ptr1 = 0;
977
+ if (!isLikeNone(protocol_magic)) {
978
+ _assertClass(protocol_magic, ProtocolMagic);
979
+ ptr1 = protocol_magic.__destroy_into_raw();
980
+ }
981
+ const ret = wasm.addrattributes_new_bootstrap_era(ptr0, ptr1);
982
+ return AddrAttributes.__wrap(ret);
983
+ }
984
+ /**
985
+ * @param {Bip32PublicKey} pubk
986
+ * @param {HDAddressPayload | undefined} hdap
987
+ * @param {ProtocolMagic} protocol_magic
988
+ * @returns {AddrAttributes}
989
+ */
990
+ static new_single_key(pubk, hdap, protocol_magic) {
991
+ _assertClass(pubk, Bip32PublicKey);
992
+ let ptr0 = 0;
993
+ if (!isLikeNone(hdap)) {
994
+ _assertClass(hdap, HDAddressPayload);
995
+ ptr0 = hdap.__destroy_into_raw();
996
+ }
997
+ _assertClass(protocol_magic, ProtocolMagic);
998
+ var ptr1 = protocol_magic.__destroy_into_raw();
999
+ const ret = wasm.addrattributes_new_single_key(pubk.__wbg_ptr, ptr0, ptr1);
1000
+ return AddrAttributes.__wrap(ret);
1001
+ }
1002
+ /**
964
1003
  *
965
1004
  * * Serialize this type to CBOR bytes.
966
1005
  * * This type does NOT support fine-tuned encoding options so this may or may not be
@@ -1103,43 +1142,6 @@ class AddrAttributes {
1103
1142
  const ret = wasm.addrattributes_new();
1104
1143
  return AddrAttributes.__wrap(ret);
1105
1144
  }
1106
- /**
1107
- * @param {HDAddressPayload | undefined} [hdap]
1108
- * @param {ProtocolMagic | undefined} [protocol_magic]
1109
- * @returns {AddrAttributes}
1110
- */
1111
- static new_bootstrap_era(hdap, protocol_magic) {
1112
- let ptr0 = 0;
1113
- if (!isLikeNone(hdap)) {
1114
- _assertClass(hdap, HDAddressPayload);
1115
- ptr0 = hdap.__destroy_into_raw();
1116
- }
1117
- let ptr1 = 0;
1118
- if (!isLikeNone(protocol_magic)) {
1119
- _assertClass(protocol_magic, ProtocolMagic);
1120
- ptr1 = protocol_magic.__destroy_into_raw();
1121
- }
1122
- const ret = wasm.addrattributes_new_bootstrap_era(ptr0, ptr1);
1123
- return AddrAttributes.__wrap(ret);
1124
- }
1125
- /**
1126
- * @param {Bip32PublicKey} pubk
1127
- * @param {HDAddressPayload | undefined} hdap
1128
- * @param {ProtocolMagic} protocol_magic
1129
- * @returns {AddrAttributes}
1130
- */
1131
- static new_single_key(pubk, hdap, protocol_magic) {
1132
- _assertClass(pubk, Bip32PublicKey);
1133
- let ptr0 = 0;
1134
- if (!isLikeNone(hdap)) {
1135
- _assertClass(hdap, HDAddressPayload);
1136
- ptr0 = hdap.__destroy_into_raw();
1137
- }
1138
- _assertClass(protocol_magic, ProtocolMagic);
1139
- var ptr1 = protocol_magic.__destroy_into_raw();
1140
- const ret = wasm.addrattributes_new_single_key(pubk.__wbg_ptr, ptr0, ptr1);
1141
- return AddrAttributes.__wrap(ret);
1142
- }
1143
1145
  }
1144
1146
  module.exports.AddrAttributes = AddrAttributes;
1145
1147
 
@@ -1501,133 +1503,6 @@ class AddressContent {
1501
1503
  wasm.__wbg_addresscontent_free(ptr, 0);
1502
1504
  }
1503
1505
  /**
1504
- *
1505
- * * Serialize this type to CBOR bytes.
1506
- * * This type does NOT support fine-tuned encoding options so this may or may not be
1507
- * * canonical CBOR and may or may not preserve round-trip encodings.
1508
- *
1509
- * @returns {Uint8Array}
1510
- */
1511
- to_cbor_bytes() {
1512
- try {
1513
- const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
1514
- wasm.addresscontent_to_cbor_bytes(retptr, this.__wbg_ptr);
1515
- var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
1516
- var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
1517
- var v1 = getArrayU8FromWasm0(r0, r1).slice();
1518
- wasm.__wbindgen_free(r0, r1 * 1, 1);
1519
- return v1;
1520
- } finally {
1521
- wasm.__wbindgen_add_to_stack_pointer(16);
1522
- }
1523
- }
1524
- /**
1525
- *
1526
- * * Create this type from CBOR bytes
1527
- *
1528
- * @param {Uint8Array} cbor_bytes
1529
- * @returns {AddressContent}
1530
- */
1531
- static from_cbor_bytes(cbor_bytes) {
1532
- try {
1533
- const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
1534
- const ptr0 = passArray8ToWasm0(cbor_bytes, wasm.__wbindgen_malloc);
1535
- const len0 = WASM_VECTOR_LEN;
1536
- wasm.addresscontent_from_cbor_bytes(retptr, ptr0, len0);
1537
- var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
1538
- var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
1539
- var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
1540
- if (r2) {
1541
- throw takeObject(r1);
1542
- }
1543
- return AddressContent.__wrap(r0);
1544
- } finally {
1545
- wasm.__wbindgen_add_to_stack_pointer(16);
1546
- }
1547
- }
1548
- /**
1549
- *
1550
- * * Serialize this type to CBOR bytes encoded as a hex string (useful for working with CIP30).
1551
- * * This type does NOT support fine-tuned encoding options so this may or may not be
1552
- * * canonical CBOR and may or may not preserve round-trip encodings.
1553
- *
1554
- * @returns {string}
1555
- */
1556
- to_cbor_hex() {
1557
- let deferred1_0;
1558
- let deferred1_1;
1559
- try {
1560
- const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
1561
- wasm.addresscontent_to_cbor_hex(retptr, this.__wbg_ptr);
1562
- var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
1563
- var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
1564
- deferred1_0 = r0;
1565
- deferred1_1 = r1;
1566
- return getStringFromWasm0(r0, r1);
1567
- } finally {
1568
- wasm.__wbindgen_add_to_stack_pointer(16);
1569
- wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
1570
- }
1571
- }
1572
- /**
1573
- *
1574
- * * Create this type from the CBOR bytes encoded as a hex string.
1575
- * * This is useful for interfacing with CIP30
1576
- *
1577
- * @param {string} cbor_bytes
1578
- * @returns {AddressContent}
1579
- */
1580
- static from_cbor_hex(cbor_bytes) {
1581
- try {
1582
- const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
1583
- const ptr0 = passStringToWasm0(cbor_bytes, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1584
- const len0 = WASM_VECTOR_LEN;
1585
- wasm.addresscontent_from_cbor_hex(retptr, ptr0, len0);
1586
- var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
1587
- var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
1588
- var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
1589
- if (r2) {
1590
- throw takeObject(r1);
1591
- }
1592
- return AddressContent.__wrap(r0);
1593
- } finally {
1594
- wasm.__wbindgen_add_to_stack_pointer(16);
1595
- }
1596
- }
1597
- /**
1598
- * @returns {AddressId}
1599
- */
1600
- address_id() {
1601
- const ret = wasm.addresscontent_address_id(this.__wbg_ptr);
1602
- return AddressId.__wrap(ret);
1603
- }
1604
- /**
1605
- * @returns {AddrAttributes}
1606
- */
1607
- addr_attributes() {
1608
- const ret = wasm.addresscontent_addr_attributes(this.__wbg_ptr);
1609
- return AddrAttributes.__wrap(ret);
1610
- }
1611
- /**
1612
- * @returns {ByronAddrType}
1613
- */
1614
- addr_type() {
1615
- const ret = wasm.addresscontent_addr_type(this.__wbg_ptr);
1616
- return ret;
1617
- }
1618
- /**
1619
- * @param {AddressId} address_id
1620
- * @param {AddrAttributes} addr_attributes
1621
- * @param {ByronAddrType} addr_type
1622
- * @returns {AddressContent}
1623
- */
1624
- static new(address_id, addr_attributes, addr_type) {
1625
- _assertClass(address_id, AddressId);
1626
- _assertClass(addr_attributes, AddrAttributes);
1627
- const ret = wasm.addresscontent_new(address_id.__wbg_ptr, addr_attributes.__wbg_ptr, addr_type);
1628
- return AddressContent.__wrap(ret);
1629
- }
1630
- /**
1631
1506
  * @param {ByronAddrType} addr_type
1632
1507
  * @param {SpendingData} spending_data
1633
1508
  * @param {AddrAttributes} attributes
@@ -1725,6 +1600,133 @@ class AddressContent {
1725
1600
  const ret = wasm.addresscontent_identical_with_pubkey(this.__wbg_ptr, xpub.__wbg_ptr);
1726
1601
  return ret !== 0;
1727
1602
  }
1603
+ /**
1604
+ *
1605
+ * * Serialize this type to CBOR bytes.
1606
+ * * This type does NOT support fine-tuned encoding options so this may or may not be
1607
+ * * canonical CBOR and may or may not preserve round-trip encodings.
1608
+ *
1609
+ * @returns {Uint8Array}
1610
+ */
1611
+ to_cbor_bytes() {
1612
+ try {
1613
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
1614
+ wasm.addresscontent_to_cbor_bytes(retptr, this.__wbg_ptr);
1615
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
1616
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
1617
+ var v1 = getArrayU8FromWasm0(r0, r1).slice();
1618
+ wasm.__wbindgen_free(r0, r1 * 1, 1);
1619
+ return v1;
1620
+ } finally {
1621
+ wasm.__wbindgen_add_to_stack_pointer(16);
1622
+ }
1623
+ }
1624
+ /**
1625
+ *
1626
+ * * Create this type from CBOR bytes
1627
+ *
1628
+ * @param {Uint8Array} cbor_bytes
1629
+ * @returns {AddressContent}
1630
+ */
1631
+ static from_cbor_bytes(cbor_bytes) {
1632
+ try {
1633
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
1634
+ const ptr0 = passArray8ToWasm0(cbor_bytes, wasm.__wbindgen_malloc);
1635
+ const len0 = WASM_VECTOR_LEN;
1636
+ wasm.addresscontent_from_cbor_bytes(retptr, ptr0, len0);
1637
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
1638
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
1639
+ var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
1640
+ if (r2) {
1641
+ throw takeObject(r1);
1642
+ }
1643
+ return AddressContent.__wrap(r0);
1644
+ } finally {
1645
+ wasm.__wbindgen_add_to_stack_pointer(16);
1646
+ }
1647
+ }
1648
+ /**
1649
+ *
1650
+ * * Serialize this type to CBOR bytes encoded as a hex string (useful for working with CIP30).
1651
+ * * This type does NOT support fine-tuned encoding options so this may or may not be
1652
+ * * canonical CBOR and may or may not preserve round-trip encodings.
1653
+ *
1654
+ * @returns {string}
1655
+ */
1656
+ to_cbor_hex() {
1657
+ let deferred1_0;
1658
+ let deferred1_1;
1659
+ try {
1660
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
1661
+ wasm.addresscontent_to_cbor_hex(retptr, this.__wbg_ptr);
1662
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
1663
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
1664
+ deferred1_0 = r0;
1665
+ deferred1_1 = r1;
1666
+ return getStringFromWasm0(r0, r1);
1667
+ } finally {
1668
+ wasm.__wbindgen_add_to_stack_pointer(16);
1669
+ wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
1670
+ }
1671
+ }
1672
+ /**
1673
+ *
1674
+ * * Create this type from the CBOR bytes encoded as a hex string.
1675
+ * * This is useful for interfacing with CIP30
1676
+ *
1677
+ * @param {string} cbor_bytes
1678
+ * @returns {AddressContent}
1679
+ */
1680
+ static from_cbor_hex(cbor_bytes) {
1681
+ try {
1682
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
1683
+ const ptr0 = passStringToWasm0(cbor_bytes, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1684
+ const len0 = WASM_VECTOR_LEN;
1685
+ wasm.addresscontent_from_cbor_hex(retptr, ptr0, len0);
1686
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
1687
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
1688
+ var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
1689
+ if (r2) {
1690
+ throw takeObject(r1);
1691
+ }
1692
+ return AddressContent.__wrap(r0);
1693
+ } finally {
1694
+ wasm.__wbindgen_add_to_stack_pointer(16);
1695
+ }
1696
+ }
1697
+ /**
1698
+ * @returns {AddressId}
1699
+ */
1700
+ address_id() {
1701
+ const ret = wasm.addresscontent_address_id(this.__wbg_ptr);
1702
+ return AddressId.__wrap(ret);
1703
+ }
1704
+ /**
1705
+ * @returns {AddrAttributes}
1706
+ */
1707
+ addr_attributes() {
1708
+ const ret = wasm.addresscontent_addr_attributes(this.__wbg_ptr);
1709
+ return AddrAttributes.__wrap(ret);
1710
+ }
1711
+ /**
1712
+ * @returns {ByronAddrType}
1713
+ */
1714
+ addr_type() {
1715
+ const ret = wasm.addresscontent_addr_type(this.__wbg_ptr);
1716
+ return ret;
1717
+ }
1718
+ /**
1719
+ * @param {AddressId} address_id
1720
+ * @param {AddrAttributes} addr_attributes
1721
+ * @param {ByronAddrType} addr_type
1722
+ * @returns {AddressContent}
1723
+ */
1724
+ static new(address_id, addr_attributes, addr_type) {
1725
+ _assertClass(address_id, AddressId);
1726
+ _assertClass(addr_attributes, AddrAttributes);
1727
+ const ret = wasm.addresscontent_new(address_id.__wbg_ptr, addr_attributes.__wbg_ptr, addr_type);
1728
+ return AddressContent.__wrap(ret);
1729
+ }
1728
1730
  }
1729
1731
  module.exports.AddressContent = AddressContent;
1730
1732
 
@@ -2630,149 +2632,6 @@ class AssetName {
2630
2632
  }
2631
2633
  /**
2632
2634
  *
2633
- * * Create an AssetName from utf8 string. 64 byte (not char!) maximum.
2634
- *
2635
- * @param {string} utf8_str
2636
- * @returns {AssetName}
2637
- */
2638
- static from_str(utf8_str) {
2639
- try {
2640
- const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
2641
- const ptr0 = passStringToWasm0(utf8_str, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
2642
- const len0 = WASM_VECTOR_LEN;
2643
- wasm.assetname_from_str(retptr, ptr0, len0);
2644
- var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
2645
- var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
2646
- var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
2647
- if (r2) {
2648
- throw takeObject(r1);
2649
- }
2650
- return AssetName.__wrap(r0);
2651
- } finally {
2652
- wasm.__wbindgen_add_to_stack_pointer(16);
2653
- }
2654
- }
2655
- /**
2656
- *
2657
- * * AssetName as a utf8 string if it's possible. Will error if the asset is not utf8
2658
- *
2659
- * @returns {string}
2660
- */
2661
- to_str() {
2662
- let deferred2_0;
2663
- let deferred2_1;
2664
- try {
2665
- const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
2666
- wasm.assetname_to_str(retptr, this.__wbg_ptr);
2667
- var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
2668
- var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
2669
- var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
2670
- var r3 = getDataViewMemory0().getInt32(retptr + 4 * 3, true);
2671
- var ptr1 = r0;
2672
- var len1 = r1;
2673
- if (r3) {
2674
- ptr1 = 0; len1 = 0;
2675
- throw takeObject(r2);
2676
- }
2677
- deferred2_0 = ptr1;
2678
- deferred2_1 = len1;
2679
- return getStringFromWasm0(ptr1, len1);
2680
- } finally {
2681
- wasm.__wbindgen_add_to_stack_pointer(16);
2682
- wasm.__wbindgen_free(deferred2_0, deferred2_1, 1);
2683
- }
2684
- }
2685
- /**
2686
- *
2687
- * * Direct raw bytes without any CBOR structure
2688
- *
2689
- * @returns {Uint8Array}
2690
- */
2691
- to_raw_bytes() {
2692
- try {
2693
- const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
2694
- wasm.assetname_to_raw_bytes(retptr, this.__wbg_ptr);
2695
- var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
2696
- var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
2697
- var v1 = getArrayU8FromWasm0(r0, r1).slice();
2698
- wasm.__wbindgen_free(r0, r1 * 1, 1);
2699
- return v1;
2700
- } finally {
2701
- wasm.__wbindgen_add_to_stack_pointer(16);
2702
- }
2703
- }
2704
- /**
2705
- *
2706
- * * Parse from the direct raw bytes, without any CBOR structure
2707
- *
2708
- * @param {Uint8Array} bytes
2709
- * @returns {AssetName}
2710
- */
2711
- static from_raw_bytes(bytes) {
2712
- try {
2713
- const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
2714
- const ptr0 = passArray8ToWasm0(bytes, wasm.__wbindgen_malloc);
2715
- const len0 = WASM_VECTOR_LEN;
2716
- wasm.assetname_from_raw_bytes(retptr, ptr0, len0);
2717
- var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
2718
- var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
2719
- var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
2720
- if (r2) {
2721
- throw takeObject(r1);
2722
- }
2723
- return AssetName.__wrap(r0);
2724
- } finally {
2725
- wasm.__wbindgen_add_to_stack_pointer(16);
2726
- }
2727
- }
2728
- /**
2729
- *
2730
- * * Direct raw bytes without any CBOR structure, as a hex-encoded string
2731
- *
2732
- * @returns {string}
2733
- */
2734
- to_hex() {
2735
- let deferred1_0;
2736
- let deferred1_1;
2737
- try {
2738
- const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
2739
- wasm.assetname_to_hex(retptr, this.__wbg_ptr);
2740
- var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
2741
- var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
2742
- deferred1_0 = r0;
2743
- deferred1_1 = r1;
2744
- return getStringFromWasm0(r0, r1);
2745
- } finally {
2746
- wasm.__wbindgen_add_to_stack_pointer(16);
2747
- wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
2748
- }
2749
- }
2750
- /**
2751
- *
2752
- * * Parse from a hex string of the direct raw bytes, without any CBOR structure
2753
- *
2754
- * @param {string} input
2755
- * @returns {AssetName}
2756
- */
2757
- static from_hex(input) {
2758
- try {
2759
- const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
2760
- const ptr0 = passStringToWasm0(input, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
2761
- const len0 = WASM_VECTOR_LEN;
2762
- wasm.assetname_from_hex(retptr, ptr0, len0);
2763
- var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
2764
- var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
2765
- var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
2766
- if (r2) {
2767
- throw takeObject(r1);
2768
- }
2769
- return AssetName.__wrap(r0);
2770
- } finally {
2771
- wasm.__wbindgen_add_to_stack_pointer(16);
2772
- }
2773
- }
2774
- /**
2775
- *
2776
2635
  * * Serialize this type to CBOR bytes
2777
2636
  * * This type type supports encoding preservation so this will preserve round-trip CBOR formats.
2778
2637
  * * If created from scratch the CBOR will be canonical.
@@ -2972,6 +2831,149 @@ class AssetName {
2972
2831
  wasm.__wbindgen_add_to_stack_pointer(16);
2973
2832
  }
2974
2833
  }
2834
+ /**
2835
+ *
2836
+ * * Create an AssetName from utf8 string. 64 byte (not char!) maximum.
2837
+ *
2838
+ * @param {string} utf8_str
2839
+ * @returns {AssetName}
2840
+ */
2841
+ static from_str(utf8_str) {
2842
+ try {
2843
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
2844
+ const ptr0 = passStringToWasm0(utf8_str, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
2845
+ const len0 = WASM_VECTOR_LEN;
2846
+ wasm.assetname_from_str(retptr, ptr0, len0);
2847
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
2848
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
2849
+ var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
2850
+ if (r2) {
2851
+ throw takeObject(r1);
2852
+ }
2853
+ return AssetName.__wrap(r0);
2854
+ } finally {
2855
+ wasm.__wbindgen_add_to_stack_pointer(16);
2856
+ }
2857
+ }
2858
+ /**
2859
+ *
2860
+ * * AssetName as a utf8 string if it's possible. Will error if the asset is not utf8
2861
+ *
2862
+ * @returns {string}
2863
+ */
2864
+ to_str() {
2865
+ let deferred2_0;
2866
+ let deferred2_1;
2867
+ try {
2868
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
2869
+ wasm.assetname_to_str(retptr, this.__wbg_ptr);
2870
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
2871
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
2872
+ var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
2873
+ var r3 = getDataViewMemory0().getInt32(retptr + 4 * 3, true);
2874
+ var ptr1 = r0;
2875
+ var len1 = r1;
2876
+ if (r3) {
2877
+ ptr1 = 0; len1 = 0;
2878
+ throw takeObject(r2);
2879
+ }
2880
+ deferred2_0 = ptr1;
2881
+ deferred2_1 = len1;
2882
+ return getStringFromWasm0(ptr1, len1);
2883
+ } finally {
2884
+ wasm.__wbindgen_add_to_stack_pointer(16);
2885
+ wasm.__wbindgen_free(deferred2_0, deferred2_1, 1);
2886
+ }
2887
+ }
2888
+ /**
2889
+ *
2890
+ * * Direct raw bytes without any CBOR structure
2891
+ *
2892
+ * @returns {Uint8Array}
2893
+ */
2894
+ to_raw_bytes() {
2895
+ try {
2896
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
2897
+ wasm.assetname_to_raw_bytes(retptr, this.__wbg_ptr);
2898
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
2899
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
2900
+ var v1 = getArrayU8FromWasm0(r0, r1).slice();
2901
+ wasm.__wbindgen_free(r0, r1 * 1, 1);
2902
+ return v1;
2903
+ } finally {
2904
+ wasm.__wbindgen_add_to_stack_pointer(16);
2905
+ }
2906
+ }
2907
+ /**
2908
+ *
2909
+ * * Parse from the direct raw bytes, without any CBOR structure
2910
+ *
2911
+ * @param {Uint8Array} bytes
2912
+ * @returns {AssetName}
2913
+ */
2914
+ static from_raw_bytes(bytes) {
2915
+ try {
2916
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
2917
+ const ptr0 = passArray8ToWasm0(bytes, wasm.__wbindgen_malloc);
2918
+ const len0 = WASM_VECTOR_LEN;
2919
+ wasm.assetname_from_raw_bytes(retptr, ptr0, len0);
2920
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
2921
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
2922
+ var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
2923
+ if (r2) {
2924
+ throw takeObject(r1);
2925
+ }
2926
+ return AssetName.__wrap(r0);
2927
+ } finally {
2928
+ wasm.__wbindgen_add_to_stack_pointer(16);
2929
+ }
2930
+ }
2931
+ /**
2932
+ *
2933
+ * * Direct raw bytes without any CBOR structure, as a hex-encoded string
2934
+ *
2935
+ * @returns {string}
2936
+ */
2937
+ to_hex() {
2938
+ let deferred1_0;
2939
+ let deferred1_1;
2940
+ try {
2941
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
2942
+ wasm.assetname_to_hex(retptr, this.__wbg_ptr);
2943
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
2944
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
2945
+ deferred1_0 = r0;
2946
+ deferred1_1 = r1;
2947
+ return getStringFromWasm0(r0, r1);
2948
+ } finally {
2949
+ wasm.__wbindgen_add_to_stack_pointer(16);
2950
+ wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
2951
+ }
2952
+ }
2953
+ /**
2954
+ *
2955
+ * * Parse from a hex string of the direct raw bytes, without any CBOR structure
2956
+ *
2957
+ * @param {string} input
2958
+ * @returns {AssetName}
2959
+ */
2960
+ static from_hex(input) {
2961
+ try {
2962
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
2963
+ const ptr0 = passStringToWasm0(input, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
2964
+ const len0 = WASM_VECTOR_LEN;
2965
+ wasm.assetname_from_hex(retptr, ptr0, len0);
2966
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
2967
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
2968
+ var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
2969
+ if (r2) {
2970
+ throw takeObject(r1);
2971
+ }
2972
+ return AssetName.__wrap(r0);
2973
+ } finally {
2974
+ wasm.__wbindgen_add_to_stack_pointer(16);
2975
+ }
2976
+ }
2975
2977
  }
2976
2978
  module.exports.AssetName = AssetName;
2977
2979
 
@@ -5259,24 +5261,6 @@ class BootstrapWitness {
5259
5261
  wasm.__wbg_bootstrapwitness_free(ptr, 0);
5260
5262
  }
5261
5263
  /**
5262
- * @returns {AddressContent}
5263
- */
5264
- to_address() {
5265
- try {
5266
- const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
5267
- wasm.bootstrapwitness_to_address(retptr, this.__wbg_ptr);
5268
- var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
5269
- var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
5270
- var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
5271
- if (r2) {
5272
- throw takeObject(r1);
5273
- }
5274
- return AddressContent.__wrap(r0);
5275
- } finally {
5276
- wasm.__wbindgen_add_to_stack_pointer(16);
5277
- }
5278
- }
5279
- /**
5280
5264
  *
5281
5265
  * * Serialize this type to CBOR bytes
5282
5266
  * * This type type supports encoding preservation so this will preserve round-trip CBOR formats.
@@ -5541,6 +5525,24 @@ class BootstrapWitness {
5541
5525
  wasm.__wbindgen_add_to_stack_pointer(16);
5542
5526
  }
5543
5527
  }
5528
+ /**
5529
+ * @returns {AddressContent}
5530
+ */
5531
+ to_address() {
5532
+ try {
5533
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
5534
+ wasm.bootstrapwitness_to_address(retptr, this.__wbg_ptr);
5535
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
5536
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
5537
+ var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
5538
+ if (r2) {
5539
+ throw takeObject(r1);
5540
+ }
5541
+ return AddressContent.__wrap(r0);
5542
+ } finally {
5543
+ wasm.__wbindgen_add_to_stack_pointer(16);
5544
+ }
5545
+ }
5544
5546
  }
5545
5547
  module.exports.BootstrapWitness = BootstrapWitness;
5546
5548
 
@@ -5629,6 +5631,81 @@ class ByronAddress {
5629
5631
  wasm.__wbg_byronaddress_free(ptr, 0);
5630
5632
  }
5631
5633
  /**
5634
+ * @returns {string}
5635
+ */
5636
+ to_base58() {
5637
+ let deferred1_0;
5638
+ let deferred1_1;
5639
+ try {
5640
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
5641
+ wasm.byronaddress_to_base58(retptr, this.__wbg_ptr);
5642
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
5643
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
5644
+ deferred1_0 = r0;
5645
+ deferred1_1 = r1;
5646
+ return getStringFromWasm0(r0, r1);
5647
+ } finally {
5648
+ wasm.__wbindgen_add_to_stack_pointer(16);
5649
+ wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
5650
+ }
5651
+ }
5652
+ /**
5653
+ * @param {string} s
5654
+ * @returns {ByronAddress}
5655
+ */
5656
+ static from_base58(s) {
5657
+ try {
5658
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
5659
+ const ptr0 = passStringToWasm0(s, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
5660
+ const len0 = WASM_VECTOR_LEN;
5661
+ wasm.byronaddress_from_base58(retptr, ptr0, len0);
5662
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
5663
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
5664
+ var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
5665
+ if (r2) {
5666
+ throw takeObject(r1);
5667
+ }
5668
+ return ByronAddress.__wrap(r0);
5669
+ } finally {
5670
+ wasm.__wbindgen_add_to_stack_pointer(16);
5671
+ }
5672
+ }
5673
+ /**
5674
+ * @param {string} s
5675
+ * @returns {boolean}
5676
+ */
5677
+ static is_valid(s) {
5678
+ const ptr0 = passStringToWasm0(s, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
5679
+ const len0 = WASM_VECTOR_LEN;
5680
+ const ret = wasm.byronaddress_is_valid(ptr0, len0);
5681
+ return ret !== 0;
5682
+ }
5683
+ /**
5684
+ * @returns {Address}
5685
+ */
5686
+ to_address() {
5687
+ const ret = wasm.byronaddress_to_address(this.__wbg_ptr);
5688
+ return Address.__wrap(ret);
5689
+ }
5690
+ /**
5691
+ * @param {Address} addr
5692
+ * @returns {ByronAddress | undefined}
5693
+ */
5694
+ static from_address(addr) {
5695
+ _assertClass(addr, Address);
5696
+ const ret = wasm.byronaddress_from_address(addr.__wbg_ptr);
5697
+ return ret === 0 ? undefined : ByronAddress.__wrap(ret);
5698
+ }
5699
+ /**
5700
+ * @param {AddressContent} address_content
5701
+ * @returns {ByronAddress}
5702
+ */
5703
+ static from_address_content(address_content) {
5704
+ _assertClass(address_content, AddressContent);
5705
+ const ret = wasm.byronaddress_from_address_content(address_content.__wbg_ptr);
5706
+ return ByronAddress.__wrap(ret);
5707
+ }
5708
+ /**
5632
5709
  *
5633
5710
  * * Serialize this type to CBOR bytes.
5634
5711
  * * This type does NOT support fine-tuned encoding options so this may or may not be
@@ -5747,81 +5824,6 @@ class ByronAddress {
5747
5824
  const ret = wasm.byronaddress_new(content.__wbg_ptr, crc.__wbg_ptr);
5748
5825
  return ByronAddress.__wrap(ret);
5749
5826
  }
5750
- /**
5751
- * @returns {string}
5752
- */
5753
- to_base58() {
5754
- let deferred1_0;
5755
- let deferred1_1;
5756
- try {
5757
- const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
5758
- wasm.byronaddress_to_base58(retptr, this.__wbg_ptr);
5759
- var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
5760
- var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
5761
- deferred1_0 = r0;
5762
- deferred1_1 = r1;
5763
- return getStringFromWasm0(r0, r1);
5764
- } finally {
5765
- wasm.__wbindgen_add_to_stack_pointer(16);
5766
- wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
5767
- }
5768
- }
5769
- /**
5770
- * @param {string} s
5771
- * @returns {ByronAddress}
5772
- */
5773
- static from_base58(s) {
5774
- try {
5775
- const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
5776
- const ptr0 = passStringToWasm0(s, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
5777
- const len0 = WASM_VECTOR_LEN;
5778
- wasm.byronaddress_from_base58(retptr, ptr0, len0);
5779
- var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
5780
- var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
5781
- var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
5782
- if (r2) {
5783
- throw takeObject(r1);
5784
- }
5785
- return ByronAddress.__wrap(r0);
5786
- } finally {
5787
- wasm.__wbindgen_add_to_stack_pointer(16);
5788
- }
5789
- }
5790
- /**
5791
- * @param {string} s
5792
- * @returns {boolean}
5793
- */
5794
- static is_valid(s) {
5795
- const ptr0 = passStringToWasm0(s, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
5796
- const len0 = WASM_VECTOR_LEN;
5797
- const ret = wasm.byronaddress_is_valid(ptr0, len0);
5798
- return ret !== 0;
5799
- }
5800
- /**
5801
- * @returns {Address}
5802
- */
5803
- to_address() {
5804
- const ret = wasm.byronaddress_to_address(this.__wbg_ptr);
5805
- return Address.__wrap(ret);
5806
- }
5807
- /**
5808
- * @param {Address} addr
5809
- * @returns {ByronAddress | undefined}
5810
- */
5811
- static from_address(addr) {
5812
- _assertClass(addr, Address);
5813
- const ret = wasm.byronaddress_from_address(addr.__wbg_ptr);
5814
- return ret === 0 ? undefined : ByronAddress.__wrap(ret);
5815
- }
5816
- /**
5817
- * @param {AddressContent} address_content
5818
- * @returns {ByronAddress}
5819
- */
5820
- static from_address_content(address_content) {
5821
- _assertClass(address_content, AddressContent);
5822
- const ret = wasm.byronaddress_from_address_content(address_content.__wbg_ptr);
5823
- return ByronAddress.__wrap(ret);
5824
- }
5825
5827
  }
5826
5828
  module.exports.ByronAddress = ByronAddress;
5827
5829
 
@@ -44534,15 +44536,15 @@ module.exports.__wbindgen_is_object = function(arg0) {
44534
44536
  return ret;
44535
44537
  };
44536
44538
 
44537
- module.exports.__wbindgen_object_drop_ref = function(arg0) {
44538
- takeObject(arg0);
44539
- };
44540
-
44541
44539
  module.exports.__wbindgen_string_new = function(arg0, arg1) {
44542
44540
  const ret = getStringFromWasm0(arg0, arg1);
44543
44541
  return addHeapObject(ret);
44544
44542
  };
44545
44543
 
44544
+ module.exports.__wbindgen_object_drop_ref = function(arg0) {
44545
+ takeObject(arg0);
44546
+ };
44547
+
44546
44548
  module.exports.__wbindgen_throw = function(arg0, arg1) {
44547
44549
  throw new Error(getStringFromWasm0(arg0, arg1));
44548
44550
  };
@@ -44552,13 +44554,13 @@ module.exports.__wbindgen_memory = function() {
44552
44554
  return addHeapObject(ret);
44553
44555
  };
44554
44556
 
44555
- module.exports.__wbindgen_is_string = function(arg0) {
44556
- const ret = typeof(getObject(arg0)) === 'string';
44557
+ module.exports.__wbindgen_is_function = function(arg0) {
44558
+ const ret = typeof(getObject(arg0)) === 'function';
44557
44559
  return ret;
44558
44560
  };
44559
44561
 
44560
- module.exports.__wbindgen_is_function = function(arg0) {
44561
- const ret = typeof(getObject(arg0)) === 'function';
44562
+ module.exports.__wbindgen_is_string = function(arg0) {
44563
+ const ret = typeof(getObject(arg0)) === 'string';
44562
44564
  return ret;
44563
44565
  };
44564
44566