@cardananium/cquisitor-lib 0.0.1-beta.1 → 0.1.0-beta.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.
@@ -125,6 +125,15 @@ function getFloat64Memory0() {
125
125
  return cachedFloat64Memory0;
126
126
  }
127
127
 
128
+ let cachedBigInt64Memory0 = null;
129
+
130
+ function getBigInt64Memory0() {
131
+ if (cachedBigInt64Memory0 === null || cachedBigInt64Memory0.byteLength === 0) {
132
+ cachedBigInt64Memory0 = new BigInt64Array(wasm.memory.buffer);
133
+ }
134
+ return cachedBigInt64Memory0;
135
+ }
136
+
128
137
  function debugString(val) {
129
138
  // primitive types
130
139
  const type = typeof val;
@@ -273,15 +282,15 @@ export function get_possible_types_for_input(input) {
273
282
  }
274
283
 
275
284
  /**
276
- * @param {string} cbor_hex
285
+ * @param {string} hex_str
277
286
  * @returns {any}
278
287
  */
279
- export function cbor_to_json(cbor_hex) {
288
+ export function check_block_or_tx_signatures(hex_str) {
280
289
  try {
281
290
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
282
- const ptr0 = passStringToWasm0(cbor_hex, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
291
+ const ptr0 = passStringToWasm0(hex_str, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
283
292
  const len0 = WASM_VECTOR_LEN;
284
- wasm.cbor_to_json(retptr, ptr0, len0);
293
+ wasm.check_block_or_tx_signatures(retptr, ptr0, len0);
285
294
  var r0 = getInt32Memory0()[retptr / 4 + 0];
286
295
  var r1 = getInt32Memory0()[retptr / 4 + 1];
287
296
  var r2 = getInt32Memory0()[retptr / 4 + 2];
@@ -294,271 +303,148 @@ export function cbor_to_json(cbor_hex) {
294
303
  }
295
304
  }
296
305
 
297
- function _assertClass(instance, klass) {
298
- if (!(instance instanceof klass)) {
299
- throw new Error(`expected instance of ${klass.name}`);
300
- }
301
- return instance.ptr;
302
- }
303
-
304
- function getArrayU8FromWasm0(ptr, len) {
305
- ptr = ptr >>> 0;
306
- return getUint8Memory0().subarray(ptr / 1, ptr / 1 + len);
307
- }
308
-
309
- function passArray8ToWasm0(arg, malloc) {
310
- const ptr = malloc(arg.length * 1, 1) >>> 0;
311
- getUint8Memory0().set(arg, ptr / 1);
312
- WASM_VECTOR_LEN = arg.length;
313
- return ptr;
314
- }
315
-
316
- function getArrayU32FromWasm0(ptr, len) {
317
- ptr = ptr >>> 0;
318
- return getUint32Memory0().subarray(ptr / 4, ptr / 4 + len);
319
- }
320
306
  /**
321
- * @param {string} password
322
- * @param {string} salt
323
- * @param {string} nonce
324
- * @param {string} data
325
- * @returns {string}
307
+ * @param {string} tx_hex
308
+ * @returns {(string)[]}
326
309
  */
327
- export function encrypt_with_password(password, salt, nonce, data) {
328
- let deferred6_0;
329
- let deferred6_1;
310
+ export function get_utxo_list_from_tx(tx_hex) {
330
311
  try {
331
312
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
332
- const ptr0 = passStringToWasm0(password, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
313
+ const ptr0 = passStringToWasm0(tx_hex, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
333
314
  const len0 = WASM_VECTOR_LEN;
334
- const ptr1 = passStringToWasm0(salt, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
335
- const len1 = WASM_VECTOR_LEN;
336
- const ptr2 = passStringToWasm0(nonce, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
337
- const len2 = WASM_VECTOR_LEN;
338
- const ptr3 = passStringToWasm0(data, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
339
- const len3 = WASM_VECTOR_LEN;
340
- wasm.encrypt_with_password(retptr, ptr0, len0, ptr1, len1, ptr2, len2, ptr3, len3);
315
+ wasm.get_utxo_list_from_tx(retptr, ptr0, len0);
341
316
  var r0 = getInt32Memory0()[retptr / 4 + 0];
342
317
  var r1 = getInt32Memory0()[retptr / 4 + 1];
343
318
  var r2 = getInt32Memory0()[retptr / 4 + 2];
344
319
  var r3 = getInt32Memory0()[retptr / 4 + 3];
345
- var ptr5 = r0;
346
- var len5 = r1;
347
320
  if (r3) {
348
- ptr5 = 0; len5 = 0;
349
321
  throw takeObject(r2);
350
322
  }
351
- deferred6_0 = ptr5;
352
- deferred6_1 = len5;
353
- return getStringFromWasm0(ptr5, len5);
323
+ var v2 = getArrayJsValueFromWasm0(r0, r1).slice();
324
+ wasm.__wbindgen_free(r0, r1 * 4, 4);
325
+ return v2;
354
326
  } finally {
355
327
  wasm.__wbindgen_add_to_stack_pointer(16);
356
- wasm.__wbindgen_free(deferred6_0, deferred6_1, 1);
357
328
  }
358
329
  }
359
330
 
360
331
  /**
361
- * @param {string} password
362
- * @param {string} data
363
- * @returns {string}
332
+ * @param {string} tx_hex
333
+ * @param {any} utxo_json
334
+ * @param {any} cost_models_json
335
+ * @returns {any}
364
336
  */
365
- export function decrypt_with_password(password, data) {
366
- let deferred4_0;
367
- let deferred4_1;
337
+ export function execute_tx_scripts(tx_hex, utxo_json, cost_models_json) {
368
338
  try {
369
339
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
370
- const ptr0 = passStringToWasm0(password, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
340
+ const ptr0 = passStringToWasm0(tx_hex, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
371
341
  const len0 = WASM_VECTOR_LEN;
372
- const ptr1 = passStringToWasm0(data, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
373
- const len1 = WASM_VECTOR_LEN;
374
- wasm.decrypt_with_password(retptr, ptr0, len0, ptr1, len1);
342
+ wasm.execute_tx_scripts(retptr, ptr0, len0, addHeapObject(utxo_json), addHeapObject(cost_models_json));
375
343
  var r0 = getInt32Memory0()[retptr / 4 + 0];
376
344
  var r1 = getInt32Memory0()[retptr / 4 + 1];
377
345
  var r2 = getInt32Memory0()[retptr / 4 + 2];
378
- var r3 = getInt32Memory0()[retptr / 4 + 3];
379
- var ptr3 = r0;
380
- var len3 = r1;
381
- if (r3) {
382
- ptr3 = 0; len3 = 0;
383
- throw takeObject(r2);
346
+ if (r2) {
347
+ throw takeObject(r1);
384
348
  }
385
- deferred4_0 = ptr3;
386
- deferred4_1 = len3;
387
- return getStringFromWasm0(ptr3, len3);
349
+ return takeObject(r0);
388
350
  } finally {
389
351
  wasm.__wbindgen_add_to_stack_pointer(16);
390
- wasm.__wbindgen_free(deferred4_0, deferred4_1, 1);
391
352
  }
392
353
  }
393
354
 
394
355
  /**
395
- * @param {string} json
396
- * @param {PlutusDatumSchema} schema
397
- * @returns {PlutusData}
356
+ * @param {string} cbor_hex
357
+ * @returns {any}
398
358
  */
399
- export function encode_json_str_to_plutus_datum(json, schema) {
359
+ export function cbor_to_json(cbor_hex) {
400
360
  try {
401
361
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
402
- const ptr0 = passStringToWasm0(json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
362
+ const ptr0 = passStringToWasm0(cbor_hex, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
403
363
  const len0 = WASM_VECTOR_LEN;
404
- wasm.encode_json_str_to_plutus_datum(retptr, ptr0, len0, schema);
364
+ wasm.cbor_to_json(retptr, ptr0, len0);
405
365
  var r0 = getInt32Memory0()[retptr / 4 + 0];
406
366
  var r1 = getInt32Memory0()[retptr / 4 + 1];
407
367
  var r2 = getInt32Memory0()[retptr / 4 + 2];
408
368
  if (r2) {
409
369
  throw takeObject(r1);
410
370
  }
411
- return PlutusData.__wrap(r0);
412
- } finally {
413
- wasm.__wbindgen_add_to_stack_pointer(16);
414
- }
415
- }
416
-
417
- /**
418
- * @param {PlutusData} datum
419
- * @param {PlutusDatumSchema} schema
420
- * @returns {string}
421
- */
422
- export function decode_plutus_datum_to_json_str(datum, schema) {
423
- let deferred2_0;
424
- let deferred2_1;
425
- try {
426
- const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
427
- _assertClass(datum, PlutusData);
428
- wasm.decode_plutus_datum_to_json_str(retptr, datum.__wbg_ptr, schema);
429
- var r0 = getInt32Memory0()[retptr / 4 + 0];
430
- var r1 = getInt32Memory0()[retptr / 4 + 1];
431
- var r2 = getInt32Memory0()[retptr / 4 + 2];
432
- var r3 = getInt32Memory0()[retptr / 4 + 3];
433
- var ptr1 = r0;
434
- var len1 = r1;
435
- if (r3) {
436
- ptr1 = 0; len1 = 0;
437
- throw takeObject(r2);
438
- }
439
- deferred2_0 = ptr1;
440
- deferred2_1 = len1;
441
- return getStringFromWasm0(ptr1, len1);
442
- } finally {
443
- wasm.__wbindgen_add_to_stack_pointer(16);
444
- wasm.__wbindgen_free(deferred2_0, deferred2_1, 1);
445
- }
446
- }
447
-
448
- /**
449
- * @param {Uint8Array} bytes
450
- * @returns {TransactionMetadatum}
451
- */
452
- export function encode_arbitrary_bytes_as_metadatum(bytes) {
453
- const ptr0 = passArray8ToWasm0(bytes, wasm.__wbindgen_malloc);
454
- const len0 = WASM_VECTOR_LEN;
455
- const ret = wasm.encode_arbitrary_bytes_as_metadatum(ptr0, len0);
456
- return TransactionMetadatum.__wrap(ret);
457
- }
458
-
459
- /**
460
- * @param {TransactionMetadatum} metadata
461
- * @returns {Uint8Array}
462
- */
463
- export function decode_arbitrary_bytes_from_metadatum(metadata) {
464
- try {
465
- const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
466
- _assertClass(metadata, TransactionMetadatum);
467
- wasm.decode_arbitrary_bytes_from_metadatum(retptr, metadata.__wbg_ptr);
468
- var r0 = getInt32Memory0()[retptr / 4 + 0];
469
- var r1 = getInt32Memory0()[retptr / 4 + 1];
470
- var r2 = getInt32Memory0()[retptr / 4 + 2];
471
- var r3 = getInt32Memory0()[retptr / 4 + 3];
472
- if (r3) {
473
- throw takeObject(r2);
474
- }
475
- var v1 = getArrayU8FromWasm0(r0, r1).slice();
476
- wasm.__wbindgen_free(r0, r1 * 1, 1);
477
- return v1;
371
+ return takeObject(r0);
478
372
  } finally {
479
373
  wasm.__wbindgen_add_to_stack_pointer(16);
480
374
  }
481
375
  }
482
376
 
483
377
  /**
484
- * @param {string} json
485
- * @param {MetadataJsonSchema} schema
486
- * @returns {TransactionMetadatum}
378
+ * @param {string} hex
379
+ * @returns {any}
487
380
  */
488
- export function encode_json_str_to_metadatum(json, schema) {
381
+ export function decode_plutus_program_uplc_json(hex) {
489
382
  try {
490
383
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
491
- const ptr0 = passStringToWasm0(json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
384
+ const ptr0 = passStringToWasm0(hex, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
492
385
  const len0 = WASM_VECTOR_LEN;
493
- wasm.encode_json_str_to_metadatum(retptr, ptr0, len0, schema);
386
+ wasm.decode_plutus_program_uplc_json(retptr, ptr0, len0);
494
387
  var r0 = getInt32Memory0()[retptr / 4 + 0];
495
388
  var r1 = getInt32Memory0()[retptr / 4 + 1];
496
389
  var r2 = getInt32Memory0()[retptr / 4 + 2];
497
390
  if (r2) {
498
391
  throw takeObject(r1);
499
392
  }
500
- return TransactionMetadatum.__wrap(r0);
393
+ return takeObject(r0);
501
394
  } finally {
502
395
  wasm.__wbindgen_add_to_stack_pointer(16);
503
396
  }
504
397
  }
505
398
 
506
399
  /**
507
- * @param {TransactionMetadatum} metadatum
508
- * @param {MetadataJsonSchema} schema
400
+ * @param {string} hex
509
401
  * @returns {string}
510
402
  */
511
- export function decode_metadatum_to_json_str(metadatum, schema) {
512
- let deferred2_0;
513
- let deferred2_1;
403
+ export function decode_plutus_program_pretty_uplc(hex) {
404
+ let deferred3_0;
405
+ let deferred3_1;
514
406
  try {
515
407
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
516
- _assertClass(metadatum, TransactionMetadatum);
517
- wasm.decode_metadatum_to_json_str(retptr, metadatum.__wbg_ptr, schema);
408
+ const ptr0 = passStringToWasm0(hex, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
409
+ const len0 = WASM_VECTOR_LEN;
410
+ wasm.decode_plutus_program_pretty_uplc(retptr, ptr0, len0);
518
411
  var r0 = getInt32Memory0()[retptr / 4 + 0];
519
412
  var r1 = getInt32Memory0()[retptr / 4 + 1];
520
413
  var r2 = getInt32Memory0()[retptr / 4 + 2];
521
414
  var r3 = getInt32Memory0()[retptr / 4 + 3];
522
- var ptr1 = r0;
523
- var len1 = r1;
415
+ var ptr2 = r0;
416
+ var len2 = r1;
524
417
  if (r3) {
525
- ptr1 = 0; len1 = 0;
418
+ ptr2 = 0; len2 = 0;
526
419
  throw takeObject(r2);
527
420
  }
528
- deferred2_0 = ptr1;
529
- deferred2_1 = len1;
530
- return getStringFromWasm0(ptr1, len1);
421
+ deferred3_0 = ptr2;
422
+ deferred3_1 = len2;
423
+ return getStringFromWasm0(ptr2, len2);
531
424
  } finally {
532
425
  wasm.__wbindgen_add_to_stack_pointer(16);
533
- wasm.__wbindgen_free(deferred2_0, deferred2_1, 1);
426
+ wasm.__wbindgen_free(deferred3_0, deferred3_1, 1);
534
427
  }
535
428
  }
536
429
 
537
- /**
538
- * @param {Address} address
539
- * @param {TransactionUnspentOutputs} utxos
540
- * @param {TransactionBuilderConfig} config
541
- * @returns {TransactionBatchList}
542
- */
543
- export function create_send_all(address, utxos, config) {
544
- try {
545
- const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
546
- _assertClass(address, Address);
547
- _assertClass(utxos, TransactionUnspentOutputs);
548
- _assertClass(config, TransactionBuilderConfig);
549
- wasm.create_send_all(retptr, address.__wbg_ptr, utxos.__wbg_ptr, config.__wbg_ptr);
550
- var r0 = getInt32Memory0()[retptr / 4 + 0];
551
- var r1 = getInt32Memory0()[retptr / 4 + 1];
552
- var r2 = getInt32Memory0()[retptr / 4 + 2];
553
- if (r2) {
554
- throw takeObject(r1);
555
- }
556
- return TransactionBatchList.__wrap(r0);
557
- } finally {
558
- wasm.__wbindgen_add_to_stack_pointer(16);
559
- }
430
+ function getArrayU8FromWasm0(ptr, len) {
431
+ ptr = ptr >>> 0;
432
+ return getUint8Memory0().subarray(ptr / 1, ptr / 1 + len);
433
+ }
434
+
435
+ function passArray8ToWasm0(arg, malloc) {
436
+ const ptr = malloc(arg.length * 1, 1) >>> 0;
437
+ getUint8Memory0().set(arg, ptr / 1);
438
+ WASM_VECTOR_LEN = arg.length;
439
+ return ptr;
560
440
  }
561
441
 
442
+ function _assertClass(instance, klass) {
443
+ if (!(instance instanceof klass)) {
444
+ throw new Error(`expected instance of ${klass.name}`);
445
+ }
446
+ return instance.ptr;
447
+ }
562
448
  /**
563
449
  * @param {Transaction} tx
564
450
  * @param {LinearFee} linear_fee
@@ -650,6 +536,11 @@ export function min_ref_script_fee(total_ref_scripts_size, ref_script_coins_per_
650
536
  }
651
537
  }
652
538
 
539
+ function getArrayU32FromWasm0(ptr, len) {
540
+ ptr = ptr >>> 0;
541
+ return getUint32Memory0().subarray(ptr / 4, ptr / 4 + len);
542
+ }
543
+
653
544
  function passArray32ToWasm0(arg, malloc) {
654
545
  const ptr = malloc(arg.length * 4, 4) >>> 0;
655
546
  getUint32Memory0().set(arg, ptr / 4);
@@ -871,91 +762,274 @@ export function has_transaction_set_tag(tx_bytes) {
871
762
  }
872
763
  }
873
764
 
874
- function handleError(f, args) {
765
+ /**
766
+ * @param {Address} address
767
+ * @param {TransactionUnspentOutputs} utxos
768
+ * @param {TransactionBuilderConfig} config
769
+ * @returns {TransactionBatchList}
770
+ */
771
+ export function create_send_all(address, utxos, config) {
875
772
  try {
876
- return f.apply(this, args);
877
- } catch (e) {
878
- wasm.__wbindgen_exn_store(addHeapObject(e));
773
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
774
+ _assertClass(address, Address);
775
+ _assertClass(utxos, TransactionUnspentOutputs);
776
+ _assertClass(config, TransactionBuilderConfig);
777
+ wasm.create_send_all(retptr, address.__wbg_ptr, utxos.__wbg_ptr, config.__wbg_ptr);
778
+ var r0 = getInt32Memory0()[retptr / 4 + 0];
779
+ var r1 = getInt32Memory0()[retptr / 4 + 1];
780
+ var r2 = getInt32Memory0()[retptr / 4 + 2];
781
+ if (r2) {
782
+ throw takeObject(r1);
783
+ }
784
+ return TransactionBatchList.__wrap(r0);
785
+ } finally {
786
+ wasm.__wbindgen_add_to_stack_pointer(16);
879
787
  }
880
788
  }
789
+
881
790
  /**
791
+ * @param {string} password
792
+ * @param {string} salt
793
+ * @param {string} nonce
794
+ * @param {string} data
795
+ * @returns {string}
882
796
  */
883
- export const AddressKind = Object.freeze({ Base:0,"0":"Base",Pointer:1,"1":"Pointer",Enterprise:2,"2":"Enterprise",Reward:3,"3":"Reward",Byron:4,"4":"Byron",Malformed:5,"5":"Malformed", });
884
- /**
885
- */
886
- export const RelayKind = Object.freeze({ SingleHostAddr:0,"0":"SingleHostAddr",SingleHostName:1,"1":"SingleHostName",MultiHostName:2,"2":"MultiHostName", });
887
- /**
888
- */
889
- export const VoterKind = Object.freeze({ ConstitutionalCommitteeHotKeyHash:0,"0":"ConstitutionalCommitteeHotKeyHash",ConstitutionalCommitteeHotScriptHash:1,"1":"ConstitutionalCommitteeHotScriptHash",DRepKeyHash:2,"2":"DRepKeyHash",DRepScriptHash:3,"3":"DRepScriptHash",StakingPoolKeyHash:4,"4":"StakingPoolKeyHash", });
890
- /**
891
- */
892
- export const TransactionMetadatumKind = Object.freeze({ MetadataMap:0,"0":"MetadataMap",MetadataList:1,"1":"MetadataList",Int:2,"2":"Int",Bytes:3,"3":"Bytes",Text:4,"4":"Text", });
893
- /**
894
- */
895
- export const CborSetType = Object.freeze({ Tagged:0,"0":"Tagged",Untagged:1,"1":"Untagged", });
896
- /**
897
- */
898
- export const NativeScriptKind = Object.freeze({ ScriptPubkey:0,"0":"ScriptPubkey",ScriptAll:1,"1":"ScriptAll",ScriptAny:2,"2":"ScriptAny",ScriptNOfK:3,"3":"ScriptNOfK",TimelockStart:4,"4":"TimelockStart",TimelockExpiry:5,"5":"TimelockExpiry", });
899
- /**
900
- */
901
- export const BlockEra = Object.freeze({ Byron:0,"0":"Byron",Shelley:1,"1":"Shelley",Allegra:2,"2":"Allegra",Mary:3,"3":"Mary",Alonzo:4,"4":"Alonzo",Babbage:5,"5":"Babbage",Conway:6,"6":"Conway",Unknown:7,"7":"Unknown", });
902
- /**
903
- */
904
- export const MetadataJsonSchema = Object.freeze({ NoConversions:0,"0":"NoConversions",BasicConversions:1,"1":"BasicConversions",DetailedSchema:2,"2":"DetailedSchema", });
905
- /**
906
- */
907
- export const NetworkIdKind = Object.freeze({ Testnet:0,"0":"Testnet",Mainnet:1,"1":"Mainnet", });
908
- /**
909
- * Each new language uses a different namespace for hashing its script
910
- * This is because you could have a language where the same bytes have different semantics
911
- * So this avoids scripts in different languages mapping to the same hash
912
- * Note that the enum value here is different than the enum value for deciding the cost model of a script
913
- */
914
- export const ScriptHashNamespace = Object.freeze({ NativeScript:0,"0":"NativeScript",PlutusScript:1,"1":"PlutusScript",PlutusScriptV2:2,"2":"PlutusScriptV2",PlutusScriptV3:3,"3":"PlutusScriptV3", });
915
- /**
916
- */
917
- export const CredKind = Object.freeze({ Key:0,"0":"Key",Script:1,"1":"Script", });
797
+ export function encrypt_with_password(password, salt, nonce, data) {
798
+ let deferred6_0;
799
+ let deferred6_1;
800
+ try {
801
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
802
+ const ptr0 = passStringToWasm0(password, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
803
+ const len0 = WASM_VECTOR_LEN;
804
+ const ptr1 = passStringToWasm0(salt, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
805
+ const len1 = WASM_VECTOR_LEN;
806
+ const ptr2 = passStringToWasm0(nonce, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
807
+ const len2 = WASM_VECTOR_LEN;
808
+ const ptr3 = passStringToWasm0(data, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
809
+ const len3 = WASM_VECTOR_LEN;
810
+ wasm.encrypt_with_password(retptr, ptr0, len0, ptr1, len1, ptr2, len2, ptr3, len3);
811
+ var r0 = getInt32Memory0()[retptr / 4 + 0];
812
+ var r1 = getInt32Memory0()[retptr / 4 + 1];
813
+ var r2 = getInt32Memory0()[retptr / 4 + 2];
814
+ var r3 = getInt32Memory0()[retptr / 4 + 3];
815
+ var ptr5 = r0;
816
+ var len5 = r1;
817
+ if (r3) {
818
+ ptr5 = 0; len5 = 0;
819
+ throw takeObject(r2);
820
+ }
821
+ deferred6_0 = ptr5;
822
+ deferred6_1 = len5;
823
+ return getStringFromWasm0(ptr5, len5);
824
+ } finally {
825
+ wasm.__wbindgen_add_to_stack_pointer(16);
826
+ wasm.__wbindgen_free(deferred6_0, deferred6_1, 1);
827
+ }
828
+ }
829
+
918
830
  /**
831
+ * @param {string} password
832
+ * @param {string} data
833
+ * @returns {string}
919
834
  */
920
- export const PlutusDataKind = Object.freeze({ ConstrPlutusData:0,"0":"ConstrPlutusData",Map:1,"1":"Map",List:2,"2":"List",Integer:3,"3":"Integer",Bytes:4,"4":"Bytes", });
835
+ export function decrypt_with_password(password, data) {
836
+ let deferred4_0;
837
+ let deferred4_1;
838
+ try {
839
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
840
+ const ptr0 = passStringToWasm0(password, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
841
+ const len0 = WASM_VECTOR_LEN;
842
+ const ptr1 = passStringToWasm0(data, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
843
+ const len1 = WASM_VECTOR_LEN;
844
+ wasm.decrypt_with_password(retptr, ptr0, len0, ptr1, len1);
845
+ var r0 = getInt32Memory0()[retptr / 4 + 0];
846
+ var r1 = getInt32Memory0()[retptr / 4 + 1];
847
+ var r2 = getInt32Memory0()[retptr / 4 + 2];
848
+ var r3 = getInt32Memory0()[retptr / 4 + 3];
849
+ var ptr3 = r0;
850
+ var len3 = r1;
851
+ if (r3) {
852
+ ptr3 = 0; len3 = 0;
853
+ throw takeObject(r2);
854
+ }
855
+ deferred4_0 = ptr3;
856
+ deferred4_1 = len3;
857
+ return getStringFromWasm0(ptr3, len3);
858
+ } finally {
859
+ wasm.__wbindgen_add_to_stack_pointer(16);
860
+ wasm.__wbindgen_free(deferred4_0, deferred4_1, 1);
861
+ }
862
+ }
863
+
921
864
  /**
865
+ * @param {string} json
866
+ * @param {PlutusDatumSchema} schema
867
+ * @returns {PlutusData}
922
868
  */
923
- export const LanguageKind = Object.freeze({ PlutusV1:0,"0":"PlutusV1",PlutusV2:1,"1":"PlutusV2",PlutusV3:2,"2":"PlutusV3", });
869
+ export function encode_json_str_to_plutus_datum(json, schema) {
870
+ try {
871
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
872
+ const ptr0 = passStringToWasm0(json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
873
+ const len0 = WASM_VECTOR_LEN;
874
+ wasm.encode_json_str_to_plutus_datum(retptr, ptr0, len0, schema);
875
+ var r0 = getInt32Memory0()[retptr / 4 + 0];
876
+ var r1 = getInt32Memory0()[retptr / 4 + 1];
877
+ var r2 = getInt32Memory0()[retptr / 4 + 2];
878
+ if (r2) {
879
+ throw takeObject(r1);
880
+ }
881
+ return PlutusData.__wrap(r0);
882
+ } finally {
883
+ wasm.__wbindgen_add_to_stack_pointer(16);
884
+ }
885
+ }
886
+
924
887
  /**
888
+ * @param {PlutusData} datum
889
+ * @param {PlutusDatumSchema} schema
890
+ * @returns {string}
925
891
  */
926
- export const CoinSelectionStrategyCIP2 = Object.freeze({
892
+ export function decode_plutus_datum_to_json_str(datum, schema) {
893
+ let deferred2_0;
894
+ let deferred2_1;
895
+ try {
896
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
897
+ _assertClass(datum, PlutusData);
898
+ wasm.decode_plutus_datum_to_json_str(retptr, datum.__wbg_ptr, schema);
899
+ var r0 = getInt32Memory0()[retptr / 4 + 0];
900
+ var r1 = getInt32Memory0()[retptr / 4 + 1];
901
+ var r2 = getInt32Memory0()[retptr / 4 + 2];
902
+ var r3 = getInt32Memory0()[retptr / 4 + 3];
903
+ var ptr1 = r0;
904
+ var len1 = r1;
905
+ if (r3) {
906
+ ptr1 = 0; len1 = 0;
907
+ throw takeObject(r2);
908
+ }
909
+ deferred2_0 = ptr1;
910
+ deferred2_1 = len1;
911
+ return getStringFromWasm0(ptr1, len1);
912
+ } finally {
913
+ wasm.__wbindgen_add_to_stack_pointer(16);
914
+ wasm.__wbindgen_free(deferred2_0, deferred2_1, 1);
915
+ }
916
+ }
917
+
927
918
  /**
928
- * Performs CIP2's Largest First ada-only selection. Will error if outputs contain non-ADA assets.
919
+ * @param {Uint8Array} bytes
920
+ * @returns {TransactionMetadatum}
929
921
  */
930
- LargestFirst:0,"0":"LargestFirst",
922
+ export function encode_arbitrary_bytes_as_metadatum(bytes) {
923
+ const ptr0 = passArray8ToWasm0(bytes, wasm.__wbindgen_malloc);
924
+ const len0 = WASM_VECTOR_LEN;
925
+ const ret = wasm.encode_arbitrary_bytes_as_metadatum(ptr0, len0);
926
+ return TransactionMetadatum.__wrap(ret);
927
+ }
928
+
931
929
  /**
932
- * Performs CIP2's Random Improve ada-only selection. Will error if outputs contain non-ADA assets.
930
+ * @param {TransactionMetadatum} metadata
931
+ * @returns {Uint8Array}
933
932
  */
934
- RandomImprove:1,"1":"RandomImprove",
933
+ export function decode_arbitrary_bytes_from_metadatum(metadata) {
934
+ try {
935
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
936
+ _assertClass(metadata, TransactionMetadatum);
937
+ wasm.decode_arbitrary_bytes_from_metadatum(retptr, metadata.__wbg_ptr);
938
+ var r0 = getInt32Memory0()[retptr / 4 + 0];
939
+ var r1 = getInt32Memory0()[retptr / 4 + 1];
940
+ var r2 = getInt32Memory0()[retptr / 4 + 2];
941
+ var r3 = getInt32Memory0()[retptr / 4 + 3];
942
+ if (r3) {
943
+ throw takeObject(r2);
944
+ }
945
+ var v1 = getArrayU8FromWasm0(r0, r1).slice();
946
+ wasm.__wbindgen_free(r0, r1 * 1, 1);
947
+ return v1;
948
+ } finally {
949
+ wasm.__wbindgen_add_to_stack_pointer(16);
950
+ }
951
+ }
952
+
935
953
  /**
936
- * Same as LargestFirst, but before adding ADA, will insert by largest-first for each asset type.
954
+ * @param {string} json
955
+ * @param {MetadataJsonSchema} schema
956
+ * @returns {TransactionMetadatum}
937
957
  */
938
- LargestFirstMultiAsset:2,"2":"LargestFirstMultiAsset",
958
+ export function encode_json_str_to_metadatum(json, schema) {
959
+ try {
960
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
961
+ const ptr0 = passStringToWasm0(json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
962
+ const len0 = WASM_VECTOR_LEN;
963
+ wasm.encode_json_str_to_metadatum(retptr, ptr0, len0, schema);
964
+ var r0 = getInt32Memory0()[retptr / 4 + 0];
965
+ var r1 = getInt32Memory0()[retptr / 4 + 1];
966
+ var r2 = getInt32Memory0()[retptr / 4 + 2];
967
+ if (r2) {
968
+ throw takeObject(r1);
969
+ }
970
+ return TransactionMetadatum.__wrap(r0);
971
+ } finally {
972
+ wasm.__wbindgen_add_to_stack_pointer(16);
973
+ }
974
+ }
975
+
939
976
  /**
940
- * Same as RandomImprove, but before adding ADA, will insert by random-improve for each asset type.
977
+ * @param {TransactionMetadatum} metadatum
978
+ * @param {MetadataJsonSchema} schema
979
+ * @returns {string}
941
980
  */
942
- RandomImproveMultiAsset:3,"3":"RandomImproveMultiAsset", });
981
+ export function decode_metadatum_to_json_str(metadatum, schema) {
982
+ let deferred2_0;
983
+ let deferred2_1;
984
+ try {
985
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
986
+ _assertClass(metadatum, TransactionMetadatum);
987
+ wasm.decode_metadatum_to_json_str(retptr, metadatum.__wbg_ptr, schema);
988
+ var r0 = getInt32Memory0()[retptr / 4 + 0];
989
+ var r1 = getInt32Memory0()[retptr / 4 + 1];
990
+ var r2 = getInt32Memory0()[retptr / 4 + 2];
991
+ var r3 = getInt32Memory0()[retptr / 4 + 3];
992
+ var ptr1 = r0;
993
+ var len1 = r1;
994
+ if (r3) {
995
+ ptr1 = 0; len1 = 0;
996
+ throw takeObject(r2);
997
+ }
998
+ deferred2_0 = ptr1;
999
+ deferred2_1 = len1;
1000
+ return getStringFromWasm0(ptr1, len1);
1001
+ } finally {
1002
+ wasm.__wbindgen_add_to_stack_pointer(16);
1003
+ wasm.__wbindgen_free(deferred2_0, deferred2_1, 1);
1004
+ }
1005
+ }
1006
+
1007
+ function handleError(f, args) {
1008
+ try {
1009
+ return f.apply(this, args);
1010
+ } catch (e) {
1011
+ wasm.__wbindgen_exn_store(addHeapObject(e));
1012
+ }
1013
+ }
943
1014
  /**
944
1015
  */
945
- export const CborContainerType = Object.freeze({ Array:0,"0":"Array",Map:1,"1":"Map", });
1016
+ export const RelayKind = Object.freeze({ SingleHostAddr:0,"0":"SingleHostAddr",SingleHostName:1,"1":"SingleHostName",MultiHostName:2,"2":"MultiHostName", });
946
1017
  /**
947
1018
  */
948
- export const GovernanceActionKind = Object.freeze({ ParameterChangeAction:0,"0":"ParameterChangeAction",HardForkInitiationAction:1,"1":"HardForkInitiationAction",TreasuryWithdrawalsAction:2,"2":"TreasuryWithdrawalsAction",NoConfidenceAction:3,"3":"NoConfidenceAction",UpdateCommitteeAction:4,"4":"UpdateCommitteeAction",NewConstitutionAction:5,"5":"NewConstitutionAction",InfoAction:6,"6":"InfoAction", });
1019
+ export const NetworkIdKind = Object.freeze({ Testnet:0,"0":"Testnet",Mainnet:1,"1":"Mainnet", });
949
1020
  /**
950
1021
  */
951
- export const MIRKind = Object.freeze({ ToOtherPot:0,"0":"ToOtherPot",ToStakeCredentials:1,"1":"ToStakeCredentials", });
1022
+ export const CertificateKind = Object.freeze({ StakeRegistration:0,"0":"StakeRegistration",StakeDeregistration:1,"1":"StakeDeregistration",StakeDelegation:2,"2":"StakeDelegation",PoolRegistration:3,"3":"PoolRegistration",PoolRetirement:4,"4":"PoolRetirement",GenesisKeyDelegation:5,"5":"GenesisKeyDelegation",MoveInstantaneousRewardsCert:6,"6":"MoveInstantaneousRewardsCert",CommitteeHotAuth:7,"7":"CommitteeHotAuth",CommitteeColdResign:8,"8":"CommitteeColdResign",DRepDeregistration:9,"9":"DRepDeregistration",DRepRegistration:10,"10":"DRepRegistration",DRepUpdate:11,"11":"DRepUpdate",StakeAndVoteDelegation:12,"12":"StakeAndVoteDelegation",StakeRegistrationAndDelegation:13,"13":"StakeRegistrationAndDelegation",StakeVoteRegistrationAndDelegation:14,"14":"StakeVoteRegistrationAndDelegation",VoteDelegation:15,"15":"VoteDelegation",VoteRegistrationAndDelegation:16,"16":"VoteRegistrationAndDelegation", });
952
1023
  /**
953
1024
  * Used to choosed the schema for a script JSON string
954
1025
  */
955
1026
  export const ScriptSchema = Object.freeze({ Wallet:0,"0":"Wallet",Node:1,"1":"Node", });
956
1027
  /**
957
1028
  */
958
- export const TransactionSetsState = Object.freeze({ AllSetsHaveTag:0,"0":"AllSetsHaveTag",AllSetsHaveNoTag:1,"1":"AllSetsHaveNoTag",MixedSets:2,"2":"MixedSets", });
1029
+ export const DRepKind = Object.freeze({ KeyHash:0,"0":"KeyHash",ScriptHash:1,"1":"ScriptHash",AlwaysAbstain:2,"2":"AlwaysAbstain",AlwaysNoConfidence:3,"3":"AlwaysNoConfidence", });
1030
+ /**
1031
+ */
1032
+ export const NativeScriptKind = Object.freeze({ ScriptPubkey:0,"0":"ScriptPubkey",ScriptAll:1,"1":"ScriptAll",ScriptAny:2,"2":"ScriptAny",ScriptNOfK:3,"3":"ScriptNOfK",TimelockStart:4,"4":"TimelockStart",TimelockExpiry:5,"5":"TimelockExpiry", });
959
1033
  /**
960
1034
  * JSON <-> PlutusData conversion schemas.
961
1035
  * Follows ScriptDataJsonSchema in cardano-cli defined at:
@@ -1009,19 +1083,78 @@ BasicConversions:0,"0":"BasicConversions",
1009
1083
  DetailedSchema:1,"1":"DetailedSchema", });
1010
1084
  /**
1011
1085
  */
1086
+ export const MIRKind = Object.freeze({ ToOtherPot:0,"0":"ToOtherPot",ToStakeCredentials:1,"1":"ToStakeCredentials", });
1087
+ /**
1088
+ */
1089
+ export const VoterKind = Object.freeze({ ConstitutionalCommitteeHotKeyHash:0,"0":"ConstitutionalCommitteeHotKeyHash",ConstitutionalCommitteeHotScriptHash:1,"1":"ConstitutionalCommitteeHotScriptHash",DRepKeyHash:2,"2":"DRepKeyHash",DRepScriptHash:3,"3":"DRepScriptHash",StakingPoolKeyHash:4,"4":"StakingPoolKeyHash", });
1090
+ /**
1091
+ */
1092
+ export const CborContainerType = Object.freeze({ Array:0,"0":"Array",Map:1,"1":"Map", });
1093
+ /**
1094
+ */
1095
+ export const TransactionMetadatumKind = Object.freeze({ MetadataMap:0,"0":"MetadataMap",MetadataList:1,"1":"MetadataList",Int:2,"2":"Int",Bytes:3,"3":"Bytes",Text:4,"4":"Text", });
1096
+ /**
1097
+ */
1098
+ export const AddressKind = Object.freeze({ Base:0,"0":"Base",Pointer:1,"1":"Pointer",Enterprise:2,"2":"Enterprise",Reward:3,"3":"Reward",Byron:4,"4":"Byron",Malformed:5,"5":"Malformed", });
1099
+ /**
1100
+ */
1101
+ export const CoinSelectionStrategyCIP2 = Object.freeze({
1102
+ /**
1103
+ * Performs CIP2's Largest First ada-only selection. Will error if outputs contain non-ADA assets.
1104
+ */
1105
+ LargestFirst:0,"0":"LargestFirst",
1106
+ /**
1107
+ * Performs CIP2's Random Improve ada-only selection. Will error if outputs contain non-ADA assets.
1108
+ */
1109
+ RandomImprove:1,"1":"RandomImprove",
1110
+ /**
1111
+ * Same as LargestFirst, but before adding ADA, will insert by largest-first for each asset type.
1112
+ */
1113
+ LargestFirstMultiAsset:2,"2":"LargestFirstMultiAsset",
1114
+ /**
1115
+ * Same as RandomImprove, but before adding ADA, will insert by random-improve for each asset type.
1116
+ */
1117
+ RandomImproveMultiAsset:3,"3":"RandomImproveMultiAsset", });
1118
+ /**
1119
+ * Each new language uses a different namespace for hashing its script
1120
+ * This is because you could have a language where the same bytes have different semantics
1121
+ * So this avoids scripts in different languages mapping to the same hash
1122
+ * Note that the enum value here is different than the enum value for deciding the cost model of a script
1123
+ */
1124
+ export const ScriptHashNamespace = Object.freeze({ NativeScript:0,"0":"NativeScript",PlutusScript:1,"1":"PlutusScript",PlutusScriptV2:2,"2":"PlutusScriptV2",PlutusScriptV3:3,"3":"PlutusScriptV3", });
1125
+ /**
1126
+ */
1127
+ export const GovernanceActionKind = Object.freeze({ ParameterChangeAction:0,"0":"ParameterChangeAction",HardForkInitiationAction:1,"1":"HardForkInitiationAction",TreasuryWithdrawalsAction:2,"2":"TreasuryWithdrawalsAction",NoConfidenceAction:3,"3":"NoConfidenceAction",UpdateCommitteeAction:4,"4":"UpdateCommitteeAction",NewConstitutionAction:5,"5":"NewConstitutionAction",InfoAction:6,"6":"InfoAction", });
1128
+ /**
1129
+ */
1130
+ export const BlockEra = Object.freeze({ Byron:0,"0":"Byron",Shelley:1,"1":"Shelley",Allegra:2,"2":"Allegra",Mary:3,"3":"Mary",Alonzo:4,"4":"Alonzo",Babbage:5,"5":"Babbage",Conway:6,"6":"Conway",Unknown:7,"7":"Unknown", });
1131
+ /**
1132
+ */
1133
+ export const CborSetType = Object.freeze({ Tagged:0,"0":"Tagged",Untagged:1,"1":"Untagged", });
1134
+ /**
1135
+ */
1136
+ export const PlutusDataKind = Object.freeze({ ConstrPlutusData:0,"0":"ConstrPlutusData",Map:1,"1":"Map",List:2,"2":"List",Integer:3,"3":"Integer",Bytes:4,"4":"Bytes", });
1137
+ /**
1138
+ */
1012
1139
  export const VoteKind = Object.freeze({ No:0,"0":"No",Yes:1,"1":"Yes",Abstain:2,"2":"Abstain", });
1013
1140
  /**
1014
1141
  */
1015
- export const MIRPot = Object.freeze({ Reserves:0,"0":"Reserves",Treasury:1,"1":"Treasury", });
1142
+ export const LanguageKind = Object.freeze({ PlutusV1:0,"0":"PlutusV1",PlutusV2:1,"1":"PlutusV2",PlutusV3:2,"2":"PlutusV3", });
1016
1143
  /**
1017
1144
  */
1018
- export const DRepKind = Object.freeze({ KeyHash:0,"0":"KeyHash",ScriptHash:1,"1":"ScriptHash",AlwaysAbstain:2,"2":"AlwaysAbstain",AlwaysNoConfidence:3,"3":"AlwaysNoConfidence", });
1145
+ export const CredKind = Object.freeze({ Key:0,"0":"Key",Script:1,"1":"Script", });
1146
+ /**
1147
+ */
1148
+ export const TransactionSetsState = Object.freeze({ AllSetsHaveTag:0,"0":"AllSetsHaveTag",AllSetsHaveNoTag:1,"1":"AllSetsHaveNoTag",MixedSets:2,"2":"MixedSets", });
1149
+ /**
1150
+ */
1151
+ export const MIRPot = Object.freeze({ Reserves:0,"0":"Reserves",Treasury:1,"1":"Treasury", });
1019
1152
  /**
1020
1153
  */
1021
1154
  export const RedeemerTagKind = Object.freeze({ Spend:0,"0":"Spend",Mint:1,"1":"Mint",Cert:2,"2":"Cert",Reward:3,"3":"Reward",Vote:4,"4":"Vote",VotingProposal:5,"5":"VotingProposal", });
1022
1155
  /**
1023
1156
  */
1024
- export const CertificateKind = Object.freeze({ StakeRegistration:0,"0":"StakeRegistration",StakeDeregistration:1,"1":"StakeDeregistration",StakeDelegation:2,"2":"StakeDelegation",PoolRegistration:3,"3":"PoolRegistration",PoolRetirement:4,"4":"PoolRetirement",GenesisKeyDelegation:5,"5":"GenesisKeyDelegation",MoveInstantaneousRewardsCert:6,"6":"MoveInstantaneousRewardsCert",CommitteeHotAuth:7,"7":"CommitteeHotAuth",CommitteeColdResign:8,"8":"CommitteeColdResign",DRepDeregistration:9,"9":"DRepDeregistration",DRepRegistration:10,"10":"DRepRegistration",DRepUpdate:11,"11":"DRepUpdate",StakeAndVoteDelegation:12,"12":"StakeAndVoteDelegation",StakeRegistrationAndDelegation:13,"13":"StakeRegistrationAndDelegation",StakeVoteRegistrationAndDelegation:14,"14":"StakeVoteRegistrationAndDelegation",VoteDelegation:15,"15":"VoteDelegation",VoteRegistrationAndDelegation:16,"16":"VoteRegistrationAndDelegation", });
1157
+ export const MetadataJsonSchema = Object.freeze({ NoConversions:0,"0":"NoConversions",BasicConversions:1,"1":"BasicConversions",DetailedSchema:2,"2":"DetailedSchema", });
1025
1158
 
1026
1159
  const AddressFinalization = (typeof FinalizationRegistry === 'undefined')
1027
1160
  ? { register: () => {}, unregister: () => {} }
@@ -7725,14 +7858,14 @@ export class Credentials {
7725
7858
  * @returns {Credentials}
7726
7859
  */
7727
7860
  static new() {
7728
- const ret = wasm.certificates_new();
7861
+ const ret = wasm.credentials_new();
7729
7862
  return Credentials.__wrap(ret);
7730
7863
  }
7731
7864
  /**
7732
7865
  * @returns {number}
7733
7866
  */
7734
7867
  len() {
7735
- const ret = wasm.certificates_len(this.__wbg_ptr);
7868
+ const ret = wasm.credentials_len(this.__wbg_ptr);
7736
7869
  return ret >>> 0;
7737
7870
  }
7738
7871
  /**
@@ -10010,14 +10143,14 @@ export class Ed25519KeyHashes {
10010
10143
  * @returns {Ed25519KeyHashes}
10011
10144
  */
10012
10145
  static new() {
10013
- const ret = wasm.certificates_new();
10146
+ const ret = wasm.credentials_new();
10014
10147
  return Ed25519KeyHashes.__wrap(ret);
10015
10148
  }
10016
10149
  /**
10017
10150
  * @returns {number}
10018
10151
  */
10019
10152
  len() {
10020
- const ret = wasm.certificates_len(this.__wbg_ptr);
10153
+ const ret = wasm.credentials_len(this.__wbg_ptr);
10021
10154
  return ret >>> 0;
10022
10155
  }
10023
10156
  /**
@@ -13092,7 +13225,7 @@ export class GovernanceActionIds {
13092
13225
  * @returns {number}
13093
13226
  */
13094
13227
  len() {
13095
- const ret = wasm.costmdls_len(this.__wbg_ptr);
13228
+ const ret = wasm.governanceactionids_len(this.__wbg_ptr);
13096
13229
  return ret >>> 0;
13097
13230
  }
13098
13231
  }
@@ -16267,7 +16400,7 @@ export class MintBuilder {
16267
16400
  * @returns {MintBuilder}
16268
16401
  */
16269
16402
  static new() {
16270
- const ret = wasm.mintbuilder_new();
16403
+ const ret = wasm.costmdls_new();
16271
16404
  return MintBuilder.__wrap(ret);
16272
16405
  }
16273
16406
  /**
@@ -17802,7 +17935,7 @@ export class NativeScripts {
17802
17935
  * @returns {number}
17803
17936
  */
17804
17937
  len() {
17805
- const ret = wasm.costmodel_len(this.__wbg_ptr);
17938
+ const ret = wasm.costmdls_len(this.__wbg_ptr);
17806
17939
  return ret >>> 0;
17807
17940
  }
17808
17941
  /**
@@ -18402,7 +18535,7 @@ export class NewConstitutionAction {
18402
18535
  * @returns {GovernanceActionId | undefined}
18403
18536
  */
18404
18537
  gov_action_id() {
18405
- const ret = wasm.hardforkinitiationaction_gov_action_id(this.__wbg_ptr);
18538
+ const ret = wasm.newconstitutionaction_gov_action_id(this.__wbg_ptr);
18406
18539
  return ret === 0 ? undefined : GovernanceActionId.__wrap(ret);
18407
18540
  }
18408
18541
  /**
@@ -18614,7 +18747,7 @@ export class NoConfidenceAction {
18614
18747
  * @returns {GovernanceActionId | undefined}
18615
18748
  */
18616
18749
  gov_action_id() {
18617
- const ret = wasm.hardforkinitiationaction_gov_action_id(this.__wbg_ptr);
18750
+ const ret = wasm.noconfidenceaction_gov_action_id(this.__wbg_ptr);
18618
18751
  return ret === 0 ? undefined : GovernanceActionId.__wrap(ret);
18619
18752
  }
18620
18753
  /**
@@ -20562,7 +20695,7 @@ export class PlutusScripts {
20562
20695
  * @returns {number}
20563
20696
  */
20564
20697
  len() {
20565
- const ret = wasm.plutusscripts_len(this.__wbg_ptr);
20698
+ const ret = wasm.certificates_len(this.__wbg_ptr);
20566
20699
  return ret >>> 0;
20567
20700
  }
20568
20701
  /**
@@ -23690,7 +23823,7 @@ export class PublicKeys {
23690
23823
  /**
23691
23824
  */
23692
23825
  constructor() {
23693
- const ret = wasm.languages_new();
23826
+ const ret = wasm.genesishashes_new();
23694
23827
  this.__wbg_ptr = ret >>> 0;
23695
23828
  return this;
23696
23829
  }
@@ -23698,7 +23831,7 @@ export class PublicKeys {
23698
23831
  * @returns {number}
23699
23832
  */
23700
23833
  size() {
23701
- const ret = wasm.languages_len(this.__wbg_ptr);
23834
+ const ret = wasm.assetnames_len(this.__wbg_ptr);
23702
23835
  return ret >>> 0;
23703
23836
  }
23704
23837
  /**
@@ -27368,7 +27501,7 @@ export class StakeDelegation {
27368
27501
  * @returns {Credential}
27369
27502
  */
27370
27503
  stake_credential() {
27371
- const ret = wasm.stakeandvotedelegation_stake_credential(this.__wbg_ptr);
27504
+ const ret = wasm.stakedelegation_stake_credential(this.__wbg_ptr);
27372
27505
  return Credential.__wrap(ret);
27373
27506
  }
27374
27507
  /**
@@ -27393,7 +27526,7 @@ export class StakeDelegation {
27393
27526
  * @returns {boolean}
27394
27527
  */
27395
27528
  has_script_credentials() {
27396
- const ret = wasm.stakeandvotedelegation_has_script_credentials(this.__wbg_ptr);
27529
+ const ret = wasm.stakedelegation_has_script_credentials(this.__wbg_ptr);
27397
27530
  return ret !== 0;
27398
27531
  }
27399
27532
  }
@@ -27783,14 +27916,14 @@ export class StakeRegistration {
27783
27916
  * @returns {Credential}
27784
27917
  */
27785
27918
  stake_credential() {
27786
- const ret = wasm.stakederegistration_stake_credential(this.__wbg_ptr);
27919
+ const ret = wasm.stakeregistration_stake_credential(this.__wbg_ptr);
27787
27920
  return Credential.__wrap(ret);
27788
27921
  }
27789
27922
  /**
27790
27923
  * @returns {BigNum | undefined}
27791
27924
  */
27792
27925
  coin() {
27793
- const ret = wasm.stakederegistration_coin(this.__wbg_ptr);
27926
+ const ret = wasm.stakeregistration_coin(this.__wbg_ptr);
27794
27927
  return ret === 0 ? undefined : BigNum.__wrap(ret);
27795
27928
  }
27796
27929
  /**
@@ -27799,7 +27932,7 @@ export class StakeRegistration {
27799
27932
  */
27800
27933
  static new(stake_credential) {
27801
27934
  _assertClass(stake_credential, Credential);
27802
- const ret = wasm.stakederegistration_new(stake_credential.__wbg_ptr);
27935
+ const ret = wasm.stakeregistration_new(stake_credential.__wbg_ptr);
27803
27936
  return StakeRegistration.__wrap(ret);
27804
27937
  }
27805
27938
  /**
@@ -27810,14 +27943,14 @@ export class StakeRegistration {
27810
27943
  static new_with_explicit_deposit(stake_credential, coin) {
27811
27944
  _assertClass(stake_credential, Credential);
27812
27945
  _assertClass(coin, BigNum);
27813
- const ret = wasm.stakederegistration_new_with_explicit_refund(stake_credential.__wbg_ptr, coin.__wbg_ptr);
27946
+ const ret = wasm.stakeregistration_new_with_explicit_deposit(stake_credential.__wbg_ptr, coin.__wbg_ptr);
27814
27947
  return StakeRegistration.__wrap(ret);
27815
27948
  }
27816
27949
  /**
27817
27950
  * @returns {boolean}
27818
27951
  */
27819
27952
  has_script_credentials() {
27820
- const ret = wasm.stakederegistration_has_script_credentials(this.__wbg_ptr);
27953
+ const ret = wasm.stakeregistration_has_script_credentials(this.__wbg_ptr);
27821
27954
  return ret !== 0;
27822
27955
  }
27823
27956
  }
@@ -28285,14 +28418,14 @@ export class Strings {
28285
28418
  * @returns {Strings}
28286
28419
  */
28287
28420
  static new() {
28288
- const ret = wasm.relays_new();
28421
+ const ret = wasm.strings_new();
28289
28422
  return Strings.__wrap(ret);
28290
28423
  }
28291
28424
  /**
28292
28425
  * @returns {number}
28293
28426
  */
28294
28427
  len() {
28295
- const ret = wasm.relays_len(this.__wbg_ptr);
28428
+ const ret = wasm.costmodel_len(this.__wbg_ptr);
28296
28429
  return ret >>> 0;
28297
28430
  }
28298
28431
  /**
@@ -29013,7 +29146,7 @@ export class TransactionBatch {
29013
29146
  * @returns {number}
29014
29147
  */
29015
29148
  len() {
29016
- const ret = wasm.transactionbatch_len(this.__wbg_ptr);
29149
+ const ret = wasm.costmdls_len(this.__wbg_ptr);
29017
29150
  return ret >>> 0;
29018
29151
  }
29019
29152
  /**
@@ -29056,7 +29189,7 @@ export class TransactionBatchList {
29056
29189
  * @returns {number}
29057
29190
  */
29058
29191
  len() {
29059
- const ret = wasm.transactionbatch_len(this.__wbg_ptr);
29192
+ const ret = wasm.costmdls_len(this.__wbg_ptr);
29060
29193
  return ret >>> 0;
29061
29194
  }
29062
29195
  /**
@@ -31645,7 +31778,7 @@ export class TransactionInputs {
31645
31778
  * @returns {number}
31646
31779
  */
31647
31780
  len() {
31648
- const ret = wasm.languages_len(this.__wbg_ptr);
31781
+ const ret = wasm.costmdls_len(this.__wbg_ptr);
31649
31782
  return ret >>> 0;
31650
31783
  }
31651
31784
  /**
@@ -33263,7 +33396,7 @@ export class TransactionWitnessSet {
33263
33396
  * @returns {NativeScripts | undefined}
33264
33397
  */
33265
33398
  native_scripts() {
33266
- const ret = wasm.auxiliarydata_native_scripts(this.__wbg_ptr);
33399
+ const ret = wasm.transactionwitnessset_native_scripts(this.__wbg_ptr);
33267
33400
  return ret === 0 ? undefined : NativeScripts.__wrap(ret);
33268
33401
  }
33269
33402
  /**
@@ -33511,7 +33644,7 @@ export class TransactionWitnessSets {
33511
33644
  * @returns {number}
33512
33645
  */
33513
33646
  len() {
33514
- const ret = wasm.transactionbatch_len(this.__wbg_ptr);
33647
+ const ret = wasm.costmdls_len(this.__wbg_ptr);
33515
33648
  return ret >>> 0;
33516
33649
  }
33517
33650
  /**
@@ -33659,7 +33792,7 @@ export class TreasuryWithdrawals {
33659
33792
  * @returns {number}
33660
33793
  */
33661
33794
  len() {
33662
- const ret = wasm.costmodel_len(this.__wbg_ptr);
33795
+ const ret = wasm.relays_len(this.__wbg_ptr);
33663
33796
  return ret >>> 0;
33664
33797
  }
33665
33798
  }
@@ -36389,7 +36522,7 @@ export class Vkeywitness {
36389
36522
  * @returns {Ed25519Signature}
36390
36523
  */
36391
36524
  signature() {
36392
- const ret = wasm.vkeywitness_signature(this.__wbg_ptr);
36525
+ const ret = wasm.operationalcert_sigma(this.__wbg_ptr);
36393
36526
  return Ed25519Signature.__wrap(ret);
36394
36527
  }
36395
36528
  }
@@ -36771,14 +36904,14 @@ export class VoteDelegation {
36771
36904
  * @returns {Credential}
36772
36905
  */
36773
36906
  stake_credential() {
36774
- const ret = wasm.committeehotauth_committee_cold_credential(this.__wbg_ptr);
36907
+ const ret = wasm.stakeandvotedelegation_stake_credential(this.__wbg_ptr);
36775
36908
  return Credential.__wrap(ret);
36776
36909
  }
36777
36910
  /**
36778
36911
  * @returns {DRep}
36779
36912
  */
36780
36913
  drep() {
36781
- const ret = wasm.votedelegation_drep(this.__wbg_ptr);
36914
+ const ret = wasm.stakeandvotedelegation_drep(this.__wbg_ptr);
36782
36915
  return DRep.__wrap(ret);
36783
36916
  }
36784
36917
  /**
@@ -36796,7 +36929,7 @@ export class VoteDelegation {
36796
36929
  * @returns {boolean}
36797
36930
  */
36798
36931
  has_script_credentials() {
36799
- const ret = wasm.committeehotauth_has_script_credentials(this.__wbg_ptr);
36932
+ const ret = wasm.stakeandvotedelegation_has_script_credentials(this.__wbg_ptr);
36800
36933
  return ret !== 0;
36801
36934
  }
36802
36935
  }
@@ -37349,7 +37482,7 @@ export class Voters {
37349
37482
  * @returns {Voters}
37350
37483
  */
37351
37484
  static new() {
37352
- const ret = wasm.languages_new();
37485
+ const ret = wasm.voters_new();
37353
37486
  return Voters.__wrap(ret);
37354
37487
  }
37355
37488
  /**
@@ -37371,7 +37504,7 @@ export class Voters {
37371
37504
  * @returns {number}
37372
37505
  */
37373
37506
  len() {
37374
- const ret = wasm.languages_len(this.__wbg_ptr);
37507
+ const ret = wasm.costmdls_len(this.__wbg_ptr);
37375
37508
  return ret >>> 0;
37376
37509
  }
37377
37510
  }
@@ -37406,7 +37539,7 @@ export class VotingBuilder {
37406
37539
  * @returns {VotingBuilder}
37407
37540
  */
37408
37541
  static new() {
37409
- const ret = wasm.treasurywithdrawals_new();
37542
+ const ret = wasm.votingbuilder_new();
37410
37543
  return VotingBuilder.__wrap(ret);
37411
37544
  }
37412
37545
  /**
@@ -38176,7 +38309,7 @@ export class VotingProposalBuilder {
38176
38309
  * @returns {VotingProposalBuilder}
38177
38310
  */
38178
38311
  static new() {
38179
- const ret = wasm.mintbuilder_new();
38312
+ const ret = wasm.costmdls_new();
38180
38313
  return VotingProposalBuilder.__wrap(ret);
38181
38314
  }
38182
38315
  /**
@@ -38418,14 +38551,14 @@ export class VotingProposals {
38418
38551
  * @returns {VotingProposals}
38419
38552
  */
38420
38553
  static new() {
38421
- const ret = wasm.votingproposals_new();
38554
+ const ret = wasm.certificates_new();
38422
38555
  return VotingProposals.__wrap(ret);
38423
38556
  }
38424
38557
  /**
38425
38558
  * @returns {number}
38426
38559
  */
38427
38560
  len() {
38428
- const ret = wasm.votingproposals_len(this.__wbg_ptr);
38561
+ const ret = wasm.certificates_len(this.__wbg_ptr);
38429
38562
  return ret >>> 0;
38430
38563
  }
38431
38564
  /**
@@ -38879,6 +39012,18 @@ function __wbg_get_imports() {
38879
39012
  const ret = getObject(arg0) in getObject(arg1);
38880
39013
  return ret;
38881
39014
  };
39015
+ imports.wbg.__wbindgen_is_bigint = function(arg0) {
39016
+ const ret = typeof(getObject(arg0)) === 'bigint';
39017
+ return ret;
39018
+ };
39019
+ imports.wbg.__wbindgen_bigint_from_i64 = function(arg0) {
39020
+ const ret = arg0;
39021
+ return addHeapObject(ret);
39022
+ };
39023
+ imports.wbg.__wbindgen_jsval_eq = function(arg0, arg1) {
39024
+ const ret = getObject(arg0) === getObject(arg1);
39025
+ return ret;
39026
+ };
38882
39027
  imports.wbg.__wbindgen_is_string = function(arg0) {
38883
39028
  const ret = typeof(getObject(arg0)) === 'string';
38884
39029
  return ret;
@@ -38994,6 +39139,30 @@ function __wbg_get_imports() {
38994
39139
  const ret = new Map();
38995
39140
  return addHeapObject(ret);
38996
39141
  };
39142
+ imports.wbg.__wbg_next_40fc327bfc8770e6 = function(arg0) {
39143
+ const ret = getObject(arg0).next;
39144
+ return addHeapObject(ret);
39145
+ };
39146
+ imports.wbg.__wbg_next_196c84450b364254 = function() { return handleError(function (arg0) {
39147
+ const ret = getObject(arg0).next();
39148
+ return addHeapObject(ret);
39149
+ }, arguments) };
39150
+ imports.wbg.__wbg_done_298b57d23c0fc80c = function(arg0) {
39151
+ const ret = getObject(arg0).done;
39152
+ return ret;
39153
+ };
39154
+ imports.wbg.__wbg_value_d93c65011f51a456 = function(arg0) {
39155
+ const ret = getObject(arg0).value;
39156
+ return addHeapObject(ret);
39157
+ };
39158
+ imports.wbg.__wbg_iterator_2cee6dadfd956dfa = function() {
39159
+ const ret = Symbol.iterator;
39160
+ return addHeapObject(ret);
39161
+ };
39162
+ imports.wbg.__wbg_get_e3c254076557e348 = function() { return handleError(function (arg0, arg1) {
39163
+ const ret = Reflect.get(getObject(arg0), getObject(arg1));
39164
+ return addHeapObject(ret);
39165
+ }, arguments) };
38997
39166
  imports.wbg.__wbg_call_27c0f87801dedf93 = function() { return handleError(function (arg0, arg1) {
38998
39167
  const ret = getObject(arg0).call(getObject(arg1));
38999
39168
  return addHeapObject(ret);
@@ -39021,6 +39190,10 @@ function __wbg_get_imports() {
39021
39190
  imports.wbg.__wbg_set_d4638f722068f043 = function(arg0, arg1, arg2) {
39022
39191
  getObject(arg0)[arg1 >>> 0] = takeObject(arg2);
39023
39192
  };
39193
+ imports.wbg.__wbg_isArray_2ab64d95e09ea0ae = function(arg0) {
39194
+ const ret = Array.isArray(getObject(arg0));
39195
+ return ret;
39196
+ };
39024
39197
  imports.wbg.__wbg_instanceof_ArrayBuffer_836825be07d4c9d2 = function(arg0) {
39025
39198
  let result;
39026
39199
  try {
@@ -39092,10 +39265,6 @@ function __wbg_get_imports() {
39092
39265
  const ret = getObject(arg0).call(getObject(arg1));
39093
39266
  return addHeapObject(ret);
39094
39267
  };
39095
- imports.wbg.__wbindgen_jsval_eq = function(arg0, arg1) {
39096
- const ret = getObject(arg0) === getObject(arg1);
39097
- return ret;
39098
- };
39099
39268
  imports.wbg.__wbg_self_e0b3266d2d9eba1a = function(arg0) {
39100
39269
  const ret = getObject(arg0).self;
39101
39270
  return addHeapObject(ret);
@@ -39118,6 +39287,12 @@ function __wbg_get_imports() {
39118
39287
  imports.wbg.__wbg_getRandomValues_02639197c8166a96 = function(arg0, arg1, arg2) {
39119
39288
  getObject(arg0).getRandomValues(getArrayU8FromWasm0(arg1, arg2));
39120
39289
  };
39290
+ imports.wbg.__wbindgen_bigint_get_as_i64 = function(arg0, arg1) {
39291
+ const v = getObject(arg1);
39292
+ const ret = typeof(v) === 'bigint' ? v : undefined;
39293
+ getBigInt64Memory0()[arg0 / 8 + 1] = isLikeNone(ret) ? BigInt(0) : ret;
39294
+ getInt32Memory0()[arg0 / 4 + 0] = !isLikeNone(ret);
39295
+ };
39121
39296
  imports.wbg.__wbindgen_debug_string = function(arg0, arg1) {
39122
39297
  const ret = debugString(getObject(arg1));
39123
39298
  const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
@@ -39143,6 +39318,7 @@ function __wbg_init_memory(imports, maybe_memory) {
39143
39318
  function __wbg_finalize_init(instance, module) {
39144
39319
  wasm = instance.exports;
39145
39320
  __wbg_init.__wbindgen_wasm_module = module;
39321
+ cachedBigInt64Memory0 = null;
39146
39322
  cachedFloat64Memory0 = null;
39147
39323
  cachedInt32Memory0 = null;
39148
39324
  cachedUint32Memory0 = null;