@anastasia-labs/cardano-multiplatform-lib-nodejs 6.0.1-2 → 6.0.1
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.
- package/cardano_multiplatform_lib.d.ts +304 -285
- package/cardano_multiplatform_lib.js +463 -443
- package/cardano_multiplatform_lib_bg.wasm +0 -0
- package/package.json +1 -1
|
@@ -4,6 +4,26 @@ imports['__wbindgen_placeholder__'] = module.exports;
|
|
|
4
4
|
let wasm;
|
|
5
5
|
const { TextDecoder, TextEncoder } = require(`util`);
|
|
6
6
|
|
|
7
|
+
const heap = new Array(128).fill(undefined);
|
|
8
|
+
|
|
9
|
+
heap.push(undefined, null, true, false);
|
|
10
|
+
|
|
11
|
+
function getObject(idx) { return heap[idx]; }
|
|
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
|
+
|
|
7
27
|
let cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
|
|
8
28
|
|
|
9
29
|
cachedTextDecoder.decode();
|
|
@@ -22,12 +42,6 @@ function getStringFromWasm0(ptr, len) {
|
|
|
22
42
|
return cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr, ptr + len));
|
|
23
43
|
}
|
|
24
44
|
|
|
25
|
-
const heap = new Array(128).fill(undefined);
|
|
26
|
-
|
|
27
|
-
heap.push(undefined, null, true, false);
|
|
28
|
-
|
|
29
|
-
let heap_next = heap.length;
|
|
30
|
-
|
|
31
45
|
function addHeapObject(obj) {
|
|
32
46
|
if (heap_next === heap.length) heap.push(heap.length + 1);
|
|
33
47
|
const idx = heap_next;
|
|
@@ -37,20 +51,6 @@ function addHeapObject(obj) {
|
|
|
37
51
|
return idx;
|
|
38
52
|
}
|
|
39
53
|
|
|
40
|
-
function getObject(idx) { return heap[idx]; }
|
|
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);
|
|
@@ -217,66 +217,6 @@ function _assertClass(instance, klass) {
|
|
|
217
217
|
}
|
|
218
218
|
return instance.ptr;
|
|
219
219
|
}
|
|
220
|
-
|
|
221
|
-
let cachedUint16ArrayMemory0 = null;
|
|
222
|
-
|
|
223
|
-
function getUint16ArrayMemory0() {
|
|
224
|
-
if (cachedUint16ArrayMemory0 === null || cachedUint16ArrayMemory0.byteLength === 0) {
|
|
225
|
-
cachedUint16ArrayMemory0 = new Uint16Array(wasm.memory.buffer);
|
|
226
|
-
}
|
|
227
|
-
return cachedUint16ArrayMemory0;
|
|
228
|
-
}
|
|
229
|
-
|
|
230
|
-
function getArrayU16FromWasm0(ptr, len) {
|
|
231
|
-
ptr = ptr >>> 0;
|
|
232
|
-
return getUint16ArrayMemory0().subarray(ptr / 2, ptr / 2 + len);
|
|
233
|
-
}
|
|
234
|
-
|
|
235
|
-
function passArray16ToWasm0(arg, malloc) {
|
|
236
|
-
const ptr = malloc(arg.length * 2, 2) >>> 0;
|
|
237
|
-
getUint16ArrayMemory0().set(arg, ptr / 2);
|
|
238
|
-
WASM_VECTOR_LEN = arg.length;
|
|
239
|
-
return ptr;
|
|
240
|
-
}
|
|
241
|
-
|
|
242
|
-
function isLikeNone(x) {
|
|
243
|
-
return x === undefined || x === null;
|
|
244
|
-
}
|
|
245
|
-
/**
|
|
246
|
-
* encodes arbitrary bytes into chunks of 64 bytes (the limit for bytes) as a list to be valid Metadata
|
|
247
|
-
* @param {Uint8Array} bytes
|
|
248
|
-
* @returns {TransactionMetadatum}
|
|
249
|
-
*/
|
|
250
|
-
module.exports.encode_arbitrary_bytes_as_metadatum = function(bytes) {
|
|
251
|
-
const ptr0 = passArray8ToWasm0(bytes, wasm.__wbindgen_malloc);
|
|
252
|
-
const len0 = WASM_VECTOR_LEN;
|
|
253
|
-
const ret = wasm.encode_arbitrary_bytes_as_metadatum(ptr0, len0);
|
|
254
|
-
return TransactionMetadatum.__wrap(ret);
|
|
255
|
-
};
|
|
256
|
-
|
|
257
|
-
/**
|
|
258
|
-
* decodes from chunks of bytes in a list to a byte vector if that is the metadata format, otherwise returns None
|
|
259
|
-
* @param {TransactionMetadatum} metadata
|
|
260
|
-
* @returns {Uint8Array | undefined}
|
|
261
|
-
*/
|
|
262
|
-
module.exports.decode_arbitrary_bytes_from_metadatum = function(metadata) {
|
|
263
|
-
try {
|
|
264
|
-
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
265
|
-
_assertClass(metadata, TransactionMetadatum);
|
|
266
|
-
wasm.decode_arbitrary_bytes_from_metadatum(retptr, metadata.__wbg_ptr);
|
|
267
|
-
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
268
|
-
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
269
|
-
let v1;
|
|
270
|
-
if (r0 !== 0) {
|
|
271
|
-
v1 = getArrayU8FromWasm0(r0, r1).slice();
|
|
272
|
-
wasm.__wbindgen_free(r0, r1 * 1, 1);
|
|
273
|
-
}
|
|
274
|
-
return v1;
|
|
275
|
-
} finally {
|
|
276
|
-
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
277
|
-
}
|
|
278
|
-
};
|
|
279
|
-
|
|
280
220
|
/**
|
|
281
221
|
* @param {AuxiliaryData} auxiliary_data
|
|
282
222
|
* @returns {AuxiliaryDataHash}
|
|
@@ -307,6 +247,9 @@ module.exports.hash_plutus_data = function(plutus_data) {
|
|
|
307
247
|
return DatumHash.__wrap(ret);
|
|
308
248
|
};
|
|
309
249
|
|
|
250
|
+
function isLikeNone(x) {
|
|
251
|
+
return x === undefined || x === null;
|
|
252
|
+
}
|
|
310
253
|
/**
|
|
311
254
|
* Calculates the hash for script data (no plutus scripts) if it is necessary.
|
|
312
255
|
* Returns None if it was not necessary (no datums/redeemers) to include.
|
|
@@ -447,121 +390,96 @@ module.exports.get_deposit = function(txbody, pool_deposit, key_deposit) {
|
|
|
447
390
|
};
|
|
448
391
|
|
|
449
392
|
/**
|
|
450
|
-
*
|
|
451
|
-
*
|
|
452
|
-
*
|
|
453
|
-
* @
|
|
454
|
-
* @param {ExUnitPrices} ex_unit_prices
|
|
455
|
-
* @returns {bigint}
|
|
456
|
-
*/
|
|
457
|
-
module.exports.min_script_fee = function(tx, ex_unit_prices) {
|
|
458
|
-
try {
|
|
459
|
-
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
460
|
-
_assertClass(tx, Transaction);
|
|
461
|
-
_assertClass(ex_unit_prices, ExUnitPrices);
|
|
462
|
-
wasm.min_script_fee(retptr, tx.__wbg_ptr, ex_unit_prices.__wbg_ptr);
|
|
463
|
-
var r0 = getDataViewMemory0().getBigInt64(retptr + 8 * 0, true);
|
|
464
|
-
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
465
|
-
var r3 = getDataViewMemory0().getInt32(retptr + 4 * 3, true);
|
|
466
|
-
if (r3) {
|
|
467
|
-
throw takeObject(r2);
|
|
468
|
-
}
|
|
469
|
-
return BigInt.asUintN(64, r0);
|
|
470
|
-
} finally {
|
|
471
|
-
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
472
|
-
}
|
|
473
|
-
};
|
|
474
|
-
|
|
475
|
-
/**
|
|
476
|
-
* @param {Transaction} tx
|
|
477
|
-
* @param {LinearFee} linear_fee
|
|
478
|
-
* @returns {bigint}
|
|
393
|
+
* Converts JSON to Metadata according to MetadataJsonSchema
|
|
394
|
+
* @param {string} json
|
|
395
|
+
* @param {MetadataJsonSchema} schema
|
|
396
|
+
* @returns {TransactionMetadatum}
|
|
479
397
|
*/
|
|
480
|
-
module.exports.
|
|
398
|
+
module.exports.encode_json_str_to_metadatum = function(json, schema) {
|
|
481
399
|
try {
|
|
482
400
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
wasm.
|
|
486
|
-
var r0 = getDataViewMemory0().
|
|
401
|
+
const ptr0 = passStringToWasm0(json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
402
|
+
const len0 = WASM_VECTOR_LEN;
|
|
403
|
+
wasm.encode_json_str_to_metadatum(retptr, ptr0, len0, schema);
|
|
404
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
405
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
487
406
|
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
throw takeObject(r2);
|
|
407
|
+
if (r2) {
|
|
408
|
+
throw takeObject(r1);
|
|
491
409
|
}
|
|
492
|
-
return
|
|
410
|
+
return TransactionMetadatum.__wrap(r0);
|
|
493
411
|
} finally {
|
|
494
412
|
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
495
413
|
}
|
|
496
414
|
};
|
|
497
415
|
|
|
498
416
|
/**
|
|
499
|
-
*
|
|
500
|
-
*
|
|
501
|
-
*
|
|
502
|
-
*
|
|
503
|
-
* @param {Transaction} tx
|
|
504
|
-
* @param {LinearFee} linear_fee
|
|
505
|
-
* @param {ExUnitPrices} ex_unit_prices
|
|
506
|
-
* @param {bigint} total_ref_script_size
|
|
507
|
-
* @returns {bigint}
|
|
417
|
+
* Converts Metadata to JSON according to MetadataJsonSchema
|
|
418
|
+
* @param {TransactionMetadatum} metadatum
|
|
419
|
+
* @param {MetadataJsonSchema} schema
|
|
420
|
+
* @returns {string}
|
|
508
421
|
*/
|
|
509
|
-
module.exports.
|
|
422
|
+
module.exports.decode_metadatum_to_json_str = function(metadatum, schema) {
|
|
423
|
+
let deferred2_0;
|
|
424
|
+
let deferred2_1;
|
|
510
425
|
try {
|
|
511
426
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
512
|
-
_assertClass(
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
var r0 = getDataViewMemory0().getBigInt64(retptr + 8 * 0, true);
|
|
427
|
+
_assertClass(metadatum, TransactionMetadatum);
|
|
428
|
+
wasm.decode_metadatum_to_json_str(retptr, metadatum.__wbg_ptr, schema);
|
|
429
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
430
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
517
431
|
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
518
432
|
var r3 = getDataViewMemory0().getInt32(retptr + 4 * 3, true);
|
|
433
|
+
var ptr1 = r0;
|
|
434
|
+
var len1 = r1;
|
|
519
435
|
if (r3) {
|
|
436
|
+
ptr1 = 0; len1 = 0;
|
|
520
437
|
throw takeObject(r2);
|
|
521
438
|
}
|
|
522
|
-
|
|
439
|
+
deferred2_0 = ptr1;
|
|
440
|
+
deferred2_1 = len1;
|
|
441
|
+
return getStringFromWasm0(ptr1, len1);
|
|
523
442
|
} finally {
|
|
524
443
|
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
444
|
+
wasm.__wbindgen_free(deferred2_0, deferred2_1, 1);
|
|
525
445
|
}
|
|
526
446
|
};
|
|
527
447
|
|
|
528
448
|
/**
|
|
529
|
-
* Converts JSON to Metadata according to MetadataJsonSchema
|
|
530
449
|
* @param {string} json
|
|
531
|
-
* @param {
|
|
532
|
-
* @returns {
|
|
450
|
+
* @param {CardanoNodePlutusDatumSchema} schema
|
|
451
|
+
* @returns {PlutusData}
|
|
533
452
|
*/
|
|
534
|
-
module.exports.
|
|
453
|
+
module.exports.encode_json_str_to_plutus_datum = function(json, schema) {
|
|
535
454
|
try {
|
|
536
455
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
537
456
|
const ptr0 = passStringToWasm0(json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
538
457
|
const len0 = WASM_VECTOR_LEN;
|
|
539
|
-
wasm.
|
|
458
|
+
wasm.encode_json_str_to_plutus_datum(retptr, ptr0, len0, schema);
|
|
540
459
|
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
541
460
|
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
542
461
|
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
543
462
|
if (r2) {
|
|
544
463
|
throw takeObject(r1);
|
|
545
464
|
}
|
|
546
|
-
return
|
|
465
|
+
return PlutusData.__wrap(r0);
|
|
547
466
|
} finally {
|
|
548
467
|
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
549
468
|
}
|
|
550
469
|
};
|
|
551
470
|
|
|
552
471
|
/**
|
|
553
|
-
*
|
|
554
|
-
* @param {
|
|
555
|
-
* @param {MetadataJsonSchema} schema
|
|
472
|
+
* @param {PlutusData} datum
|
|
473
|
+
* @param {CardanoNodePlutusDatumSchema} schema
|
|
556
474
|
* @returns {string}
|
|
557
475
|
*/
|
|
558
|
-
module.exports.
|
|
476
|
+
module.exports.decode_plutus_datum_to_json_str = function(datum, schema) {
|
|
559
477
|
let deferred2_0;
|
|
560
478
|
let deferred2_1;
|
|
561
479
|
try {
|
|
562
480
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
563
|
-
_assertClass(
|
|
564
|
-
wasm.
|
|
481
|
+
_assertClass(datum, PlutusData);
|
|
482
|
+
wasm.decode_plutus_datum_to_json_str(retptr, datum.__wbg_ptr, schema);
|
|
565
483
|
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
566
484
|
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
567
485
|
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
@@ -581,6 +499,28 @@ module.exports.decode_metadatum_to_json_str = function(metadatum, schema) {
|
|
|
581
499
|
}
|
|
582
500
|
};
|
|
583
501
|
|
|
502
|
+
/**
|
|
503
|
+
* @param {TransactionOutput} output
|
|
504
|
+
* @param {bigint} coins_per_utxo_byte
|
|
505
|
+
* @returns {bigint}
|
|
506
|
+
*/
|
|
507
|
+
module.exports.min_ada_required = function(output, coins_per_utxo_byte) {
|
|
508
|
+
try {
|
|
509
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
510
|
+
_assertClass(output, TransactionOutput);
|
|
511
|
+
wasm.min_ada_required(retptr, output.__wbg_ptr, coins_per_utxo_byte);
|
|
512
|
+
var r0 = getDataViewMemory0().getBigInt64(retptr + 8 * 0, true);
|
|
513
|
+
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
514
|
+
var r3 = getDataViewMemory0().getInt32(retptr + 4 * 3, true);
|
|
515
|
+
if (r3) {
|
|
516
|
+
throw takeObject(r2);
|
|
517
|
+
}
|
|
518
|
+
return BigInt.asUintN(64, r0);
|
|
519
|
+
} finally {
|
|
520
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
521
|
+
}
|
|
522
|
+
};
|
|
523
|
+
|
|
584
524
|
/**
|
|
585
525
|
* @param {Redeemers} redeemers
|
|
586
526
|
* @returns {ExUnits}
|
|
@@ -602,6 +542,86 @@ module.exports.compute_total_ex_units = function(redeemers) {
|
|
|
602
542
|
}
|
|
603
543
|
};
|
|
604
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
|
+
}
|
|
605
625
|
/**
|
|
606
626
|
* @param {TransactionHash} tx_body_hash
|
|
607
627
|
* @param {ByronAddress} addr
|
|
@@ -633,27 +653,19 @@ module.exports.make_icarus_bootstrap_witness = function(tx_body_hash, addr, key)
|
|
|
633
653
|
};
|
|
634
654
|
|
|
635
655
|
/**
|
|
636
|
-
*
|
|
637
|
-
*
|
|
638
|
-
*
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
_assertClass(tx_body_hash, TransactionHash);
|
|
642
|
-
_assertClass(sk, PrivateKey);
|
|
643
|
-
const ret = wasm.make_vkey_witness(tx_body_hash.__wbg_ptr, sk.__wbg_ptr);
|
|
644
|
-
return Vkeywitness.__wrap(ret);
|
|
645
|
-
};
|
|
646
|
-
|
|
647
|
-
/**
|
|
648
|
-
* @param {TransactionOutput} output
|
|
649
|
-
* @param {bigint} coins_per_utxo_byte
|
|
656
|
+
*
|
|
657
|
+
* * Min fee for JUST the script, NOT including ref inputs
|
|
658
|
+
*
|
|
659
|
+
* @param {Transaction} tx
|
|
660
|
+
* @param {ExUnitPrices} ex_unit_prices
|
|
650
661
|
* @returns {bigint}
|
|
651
662
|
*/
|
|
652
|
-
module.exports.
|
|
663
|
+
module.exports.min_script_fee = function(tx, ex_unit_prices) {
|
|
653
664
|
try {
|
|
654
665
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
655
|
-
_assertClass(
|
|
656
|
-
|
|
666
|
+
_assertClass(tx, Transaction);
|
|
667
|
+
_assertClass(ex_unit_prices, ExUnitPrices);
|
|
668
|
+
wasm.min_script_fee(retptr, tx.__wbg_ptr, ex_unit_prices.__wbg_ptr);
|
|
657
669
|
var r0 = getDataViewMemory0().getBigInt64(retptr + 8 * 0, true);
|
|
658
670
|
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
659
671
|
var r3 = getDataViewMemory0().getInt32(retptr + 4 * 3, true);
|
|
@@ -666,70 +678,56 @@ module.exports.min_ada_required = function(output, coins_per_utxo_byte) {
|
|
|
666
678
|
}
|
|
667
679
|
};
|
|
668
680
|
|
|
669
|
-
let cachedUint32ArrayMemory0 = null;
|
|
670
|
-
|
|
671
|
-
function getUint32ArrayMemory0() {
|
|
672
|
-
if (cachedUint32ArrayMemory0 === null || cachedUint32ArrayMemory0.byteLength === 0) {
|
|
673
|
-
cachedUint32ArrayMemory0 = new Uint32Array(wasm.memory.buffer);
|
|
674
|
-
}
|
|
675
|
-
return cachedUint32ArrayMemory0;
|
|
676
|
-
}
|
|
677
|
-
|
|
678
|
-
function getArrayU32FromWasm0(ptr, len) {
|
|
679
|
-
ptr = ptr >>> 0;
|
|
680
|
-
return getUint32ArrayMemory0().subarray(ptr / 4, ptr / 4 + len);
|
|
681
|
-
}
|
|
682
681
|
/**
|
|
683
|
-
* @param {
|
|
684
|
-
* @param {
|
|
685
|
-
* @returns {
|
|
682
|
+
* @param {Transaction} tx
|
|
683
|
+
* @param {LinearFee} linear_fee
|
|
684
|
+
* @returns {bigint}
|
|
686
685
|
*/
|
|
687
|
-
module.exports.
|
|
686
|
+
module.exports.min_no_script_fee = function(tx, linear_fee) {
|
|
688
687
|
try {
|
|
689
688
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
wasm.
|
|
693
|
-
var r0 = getDataViewMemory0().
|
|
694
|
-
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
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);
|
|
695
693
|
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
696
|
-
|
|
697
|
-
|
|
694
|
+
var r3 = getDataViewMemory0().getInt32(retptr + 4 * 3, true);
|
|
695
|
+
if (r3) {
|
|
696
|
+
throw takeObject(r2);
|
|
698
697
|
}
|
|
699
|
-
return
|
|
698
|
+
return BigInt.asUintN(64, r0);
|
|
700
699
|
} finally {
|
|
701
700
|
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
702
701
|
}
|
|
703
702
|
};
|
|
704
703
|
|
|
705
704
|
/**
|
|
706
|
-
*
|
|
707
|
-
*
|
|
708
|
-
*
|
|
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}
|
|
709
714
|
*/
|
|
710
|
-
module.exports.
|
|
711
|
-
let deferred2_0;
|
|
712
|
-
let deferred2_1;
|
|
715
|
+
module.exports.min_fee = function(tx, linear_fee, ex_unit_prices, total_ref_script_size) {
|
|
713
716
|
try {
|
|
714
717
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
715
|
-
_assertClass(
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
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);
|
|
719
723
|
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
720
724
|
var r3 = getDataViewMemory0().getInt32(retptr + 4 * 3, true);
|
|
721
|
-
var ptr1 = r0;
|
|
722
|
-
var len1 = r1;
|
|
723
725
|
if (r3) {
|
|
724
|
-
ptr1 = 0; len1 = 0;
|
|
725
726
|
throw takeObject(r2);
|
|
726
727
|
}
|
|
727
|
-
|
|
728
|
-
deferred2_1 = len1;
|
|
729
|
-
return getStringFromWasm0(ptr1, len1);
|
|
728
|
+
return BigInt.asUintN(64, r0);
|
|
730
729
|
} finally {
|
|
731
730
|
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
732
|
-
wasm.__wbindgen_free(deferred2_0, deferred2_1, 1);
|
|
733
731
|
}
|
|
734
732
|
};
|
|
735
733
|
|
|
@@ -769,28 +767,13 @@ function getArrayU64FromWasm0(ptr, len) {
|
|
|
769
767
|
}
|
|
770
768
|
/**
|
|
771
769
|
*/
|
|
772
|
-
module.exports.
|
|
773
|
-
/**
|
|
774
|
-
*/
|
|
775
|
-
module.exports.ScriptKind = Object.freeze({ Native:0,"0":"Native",PlutusV1:1,"1":"PlutusV1",PlutusV2:2,"2":"PlutusV2",PlutusV3:3,"3":"PlutusV3", });
|
|
776
|
-
/**
|
|
777
|
-
* Careful: this enum doesn't include the network ID part of the header
|
|
778
|
-
* ex: base address isn't 0b0000_0000 but instead 0b0000
|
|
779
|
-
* Use `header_matches_kind` if you don't want to implement the bitwise operators yourself
|
|
780
|
-
*/
|
|
781
|
-
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", });
|
|
782
|
-
/**
|
|
783
|
-
*/
|
|
784
|
-
module.exports.RelayKind = Object.freeze({ SingleHostAddr:0,"0":"SingleHostAddr",SingleHostName:1,"1":"SingleHostName",MultiHostName:2,"2":"MultiHostName", });
|
|
785
|
-
/**
|
|
786
|
-
*/
|
|
787
|
-
module.exports.DRepKind = Object.freeze({ Key:0,"0":"Key",Script:1,"1":"Script",AlwaysAbstain:2,"2":"AlwaysAbstain",AlwaysNoConfidence:3,"3":"AlwaysNoConfidence", });
|
|
770
|
+
module.exports.MetadataJsonSchema = Object.freeze({ NoConversions:0,"0":"NoConversions",BasicConversions:1,"1":"BasicConversions",DetailedSchema:2,"2":"DetailedSchema", });
|
|
788
771
|
/**
|
|
789
772
|
*/
|
|
790
|
-
module.exports.
|
|
773
|
+
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", });
|
|
791
774
|
/**
|
|
792
775
|
*/
|
|
793
|
-
module.exports.
|
|
776
|
+
module.exports.CredentialKind = Object.freeze({ PubKey:0,"0":"PubKey",Script:1,"1":"Script", });
|
|
794
777
|
/**
|
|
795
778
|
* Which version of the CIP25 spec to use. See CIP25 for details.
|
|
796
779
|
* This will change how things are encoded but for the most part contains
|
|
@@ -807,83 +790,19 @@ V1:0,"0":"V1",
|
|
|
807
790
|
V2:1,"1":"V2", });
|
|
808
791
|
/**
|
|
809
792
|
*/
|
|
810
|
-
module.exports.
|
|
811
|
-
/**
|
|
812
|
-
*/
|
|
813
|
-
module.exports.MetadataJsonSchema = Object.freeze({ NoConversions:0,"0":"NoConversions",BasicConversions:1,"1":"BasicConversions",DetailedSchema:2,"2":"DetailedSchema", });
|
|
814
|
-
/**
|
|
815
|
-
*/
|
|
816
|
-
module.exports.AuxiliaryDataKind = Object.freeze({ Shelley:0,"0":"Shelley",ShelleyMA:1,"1":"ShelleyMA",Conway:2,"2":"Conway", });
|
|
817
|
-
/**
|
|
818
|
-
*/
|
|
819
|
-
module.exports.CredentialKind = Object.freeze({ PubKey:0,"0":"PubKey",Script:1,"1":"Script", });
|
|
793
|
+
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", });
|
|
820
794
|
/**
|
|
821
795
|
*/
|
|
822
|
-
module.exports.
|
|
796
|
+
module.exports.ScriptKind = Object.freeze({ Native:0,"0":"Native",PlutusV1:1,"1":"PlutusV1",PlutusV2:2,"2":"PlutusV2",PlutusV3:3,"3":"PlutusV3", });
|
|
823
797
|
/**
|
|
824
798
|
*/
|
|
825
799
|
module.exports.Vote = Object.freeze({ No:0,"0":"No",Yes:1,"1":"Yes",Abstain:2,"2":"Abstain", });
|
|
826
800
|
/**
|
|
827
801
|
*/
|
|
828
|
-
module.exports.
|
|
829
|
-
/**
|
|
830
|
-
*/
|
|
831
|
-
module.exports.DelegationDistributionKind = Object.freeze({ Weighted:0,"0":"Weighted",Legacy:1,"1":"Legacy", });
|
|
832
|
-
/**
|
|
833
|
-
*/
|
|
834
|
-
module.exports.TransactionOutputKind = Object.freeze({ AlonzoFormatTxOut:0,"0":"AlonzoFormatTxOut",ConwayFormatTxOut:1,"1":"ConwayFormatTxOut", });
|
|
835
|
-
/**
|
|
836
|
-
*/
|
|
837
|
-
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", });
|
|
838
|
-
/**
|
|
839
|
-
*/
|
|
840
|
-
module.exports.Language = Object.freeze({ PlutusV1:0,"0":"PlutusV1",PlutusV2:1,"1":"PlutusV2",PlutusV3:2,"2":"PlutusV3", });
|
|
841
|
-
/**
|
|
842
|
-
*/
|
|
843
|
-
module.exports.SpendingDataKind = Object.freeze({ SpendingDataPubKey:0,"0":"SpendingDataPubKey",SpendingDataScript:1,"1":"SpendingDataScript",SpendingDataRedeem:2,"2":"SpendingDataRedeem", });
|
|
844
|
-
/**
|
|
845
|
-
*/
|
|
846
|
-
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", });
|
|
847
|
-
/**
|
|
848
|
-
*/
|
|
849
|
-
module.exports.RedeemersKind = Object.freeze({ ArrLegacyRedeemer:0,"0":"ArrLegacyRedeemer",MapRedeemerKeyToRedeemerVal:1,"1":"MapRedeemerKeyToRedeemerVal", });
|
|
850
|
-
/**
|
|
851
|
-
*/
|
|
852
|
-
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", });
|
|
853
|
-
/**
|
|
854
|
-
*/
|
|
855
|
-
module.exports.ByronAddrType = Object.freeze({ PublicKey:0,"0":"PublicKey",Script:1,"1":"Script",Redeem:2,"2":"Redeem", });
|
|
856
|
-
/**
|
|
857
|
-
*/
|
|
858
|
-
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", });
|
|
859
|
-
/**
|
|
860
|
-
*/
|
|
861
|
-
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", });
|
|
862
|
-
/**
|
|
863
|
-
*/
|
|
864
|
-
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", });
|
|
865
|
-
/**
|
|
866
|
-
*/
|
|
867
|
-
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", });
|
|
868
|
-
/**
|
|
869
|
-
*/
|
|
870
|
-
module.exports.CoinSelectionStrategyCIP2 = Object.freeze({
|
|
871
|
-
/**
|
|
872
|
-
* Performs CIP2's Largest First ada-only selection. Will error if outputs contain non-ADA assets.
|
|
873
|
-
*/
|
|
874
|
-
LargestFirst:0,"0":"LargestFirst",
|
|
875
|
-
/**
|
|
876
|
-
* Performs CIP2's Random Improve ada-only selection. Will error if outputs contain non-ADA assets.
|
|
877
|
-
*/
|
|
878
|
-
RandomImprove:1,"1":"RandomImprove",
|
|
879
|
-
/**
|
|
880
|
-
* Same as LargestFirst, but before adding ADA, will insert by largest-first for each asset type.
|
|
881
|
-
*/
|
|
882
|
-
LargestFirstMultiAsset:2,"2":"LargestFirstMultiAsset",
|
|
802
|
+
module.exports.NonceKind = Object.freeze({ Identity:0,"0":"Identity",Hash:1,"1":"Hash", });
|
|
883
803
|
/**
|
|
884
|
-
* Same as RandomImprove, but before adding ADA, will insert by random-improve for each asset type.
|
|
885
804
|
*/
|
|
886
|
-
|
|
805
|
+
module.exports.RelayKind = Object.freeze({ SingleHostAddr:0,"0":"SingleHostAddr",SingleHostName:1,"1":"SingleHostName",MultiHostName:2,"2":"MultiHostName", });
|
|
887
806
|
/**
|
|
888
807
|
* JSON <-> PlutusData conversion schemas.
|
|
889
808
|
* Follows ScriptDataJsonSchema in cardano-cli defined at:
|
|
@@ -935,6 +854,85 @@ BasicConversions:0,"0":"BasicConversions",
|
|
|
935
854
|
* * all Plutus datums should be fully supported outside of the integer range limitations outlined above.
|
|
936
855
|
*/
|
|
937
856
|
DetailedSchema:1,"1":"DetailedSchema", });
|
|
857
|
+
/**
|
|
858
|
+
*/
|
|
859
|
+
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", });
|
|
860
|
+
/**
|
|
861
|
+
*/
|
|
862
|
+
module.exports.CoinSelectionStrategyCIP2 = Object.freeze({
|
|
863
|
+
/**
|
|
864
|
+
* Performs CIP2's Largest First ada-only selection. Will error if outputs contain non-ADA assets.
|
|
865
|
+
*/
|
|
866
|
+
LargestFirst:0,"0":"LargestFirst",
|
|
867
|
+
/**
|
|
868
|
+
* Performs CIP2's Random Improve ada-only selection. Will error if outputs contain non-ADA assets.
|
|
869
|
+
*/
|
|
870
|
+
RandomImprove:1,"1":"RandomImprove",
|
|
871
|
+
/**
|
|
872
|
+
* Same as LargestFirst, but before adding ADA, will insert by largest-first for each asset type.
|
|
873
|
+
*/
|
|
874
|
+
LargestFirstMultiAsset:2,"2":"LargestFirstMultiAsset",
|
|
875
|
+
/**
|
|
876
|
+
* Same as RandomImprove, but before adding ADA, will insert by random-improve for each asset type.
|
|
877
|
+
*/
|
|
878
|
+
RandomImproveMultiAsset:3,"3":"RandomImproveMultiAsset", });
|
|
879
|
+
/**
|
|
880
|
+
*/
|
|
881
|
+
module.exports.DRepKind = Object.freeze({ Key:0,"0":"Key",Script:1,"1":"Script",AlwaysAbstain:2,"2":"AlwaysAbstain",AlwaysNoConfidence:3,"3":"AlwaysNoConfidence", });
|
|
882
|
+
/**
|
|
883
|
+
*/
|
|
884
|
+
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", });
|
|
885
|
+
/**
|
|
886
|
+
*/
|
|
887
|
+
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", });
|
|
888
|
+
/**
|
|
889
|
+
*/
|
|
890
|
+
module.exports.DelegationDistributionKind = Object.freeze({ Weighted:0,"0":"Weighted",Legacy:1,"1":"Legacy", });
|
|
891
|
+
/**
|
|
892
|
+
*/
|
|
893
|
+
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", });
|
|
894
|
+
/**
|
|
895
|
+
*/
|
|
896
|
+
module.exports.Language = Object.freeze({ PlutusV1:0,"0":"PlutusV1",PlutusV2:1,"1":"PlutusV2",PlutusV3:2,"2":"PlutusV3", });
|
|
897
|
+
/**
|
|
898
|
+
*/
|
|
899
|
+
module.exports.StakeDistributionKind = Object.freeze({ SingleKey:0,"0":"SingleKey",BootstrapEra:1,"1":"BootstrapEra", });
|
|
900
|
+
/**
|
|
901
|
+
*/
|
|
902
|
+
module.exports.ChunkableStringKind = Object.freeze({ Single:0,"0":"Single",Chunked:1,"1":"Chunked", });
|
|
903
|
+
/**
|
|
904
|
+
*/
|
|
905
|
+
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", });
|
|
906
|
+
/**
|
|
907
|
+
*/
|
|
908
|
+
module.exports.DatumOptionKind = Object.freeze({ Hash:0,"0":"Hash",Datum:1,"1":"Datum", });
|
|
909
|
+
/**
|
|
910
|
+
*/
|
|
911
|
+
module.exports.SpendingDataKind = Object.freeze({ SpendingDataPubKey:0,"0":"SpendingDataPubKey",SpendingDataScript:1,"1":"SpendingDataScript",SpendingDataRedeem:2,"2":"SpendingDataRedeem", });
|
|
912
|
+
/**
|
|
913
|
+
*/
|
|
914
|
+
module.exports.RedeemersKind = Object.freeze({ ArrLegacyRedeemer:0,"0":"ArrLegacyRedeemer",MapRedeemerKeyToRedeemerVal:1,"1":"MapRedeemerKeyToRedeemerVal", });
|
|
915
|
+
/**
|
|
916
|
+
* Careful: this enum doesn't include the network ID part of the header
|
|
917
|
+
* ex: base address isn't 0b0000_0000 but instead 0b0000
|
|
918
|
+
* Use `header_matches_kind` if you don't want to implement the bitwise operators yourself
|
|
919
|
+
*/
|
|
920
|
+
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", });
|
|
921
|
+
/**
|
|
922
|
+
*/
|
|
923
|
+
module.exports.TransactionOutputKind = Object.freeze({ AlonzoFormatTxOut:0,"0":"AlonzoFormatTxOut",ConwayFormatTxOut:1,"1":"ConwayFormatTxOut", });
|
|
924
|
+
/**
|
|
925
|
+
*/
|
|
926
|
+
module.exports.ByronAddrType = Object.freeze({ PublicKey:0,"0":"PublicKey",Script:1,"1":"Script",Redeem:2,"2":"Redeem", });
|
|
927
|
+
/**
|
|
928
|
+
*/
|
|
929
|
+
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", });
|
|
930
|
+
/**
|
|
931
|
+
*/
|
|
932
|
+
module.exports.AuxiliaryDataKind = Object.freeze({ Shelley:0,"0":"Shelley",ShelleyMA:1,"1":"ShelleyMA",Conway:2,"2":"Conway", });
|
|
933
|
+
/**
|
|
934
|
+
*/
|
|
935
|
+
module.exports.ChangeSelectionAlgo = Object.freeze({ Default:0,"0":"Default", });
|
|
938
936
|
|
|
939
937
|
const AddrAttributesFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
940
938
|
? { register: () => {}, unregister: () => {} }
|
|
@@ -2632,6 +2630,149 @@ class AssetName {
|
|
|
2632
2630
|
}
|
|
2633
2631
|
/**
|
|
2634
2632
|
*
|
|
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
|
+
*
|
|
2635
2776
|
* * Serialize this type to CBOR bytes
|
|
2636
2777
|
* * This type type supports encoding preservation so this will preserve round-trip CBOR formats.
|
|
2637
2778
|
* * If created from scratch the CBOR will be canonical.
|
|
@@ -2831,149 +2972,6 @@ class AssetName {
|
|
|
2831
2972
|
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
2832
2973
|
}
|
|
2833
2974
|
}
|
|
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
|
-
}
|
|
2977
2975
|
}
|
|
2978
2976
|
module.exports.AssetName = AssetName;
|
|
2979
2977
|
|
|
@@ -22283,6 +22281,28 @@ class PlutusData {
|
|
|
22283
22281
|
}
|
|
22284
22282
|
/**
|
|
22285
22283
|
*
|
|
22284
|
+
* * Convert to a Datum that will serialize equivalent to cardano-node's format
|
|
22285
|
+
* *
|
|
22286
|
+
* * Please VERY STRONGLY consider using PlutusData::from_cbor_bytes() instead wherever possible.
|
|
22287
|
+
* * You should try to never rely on a tool encoding CBOR a certain way as there are many possible,
|
|
22288
|
+
* * and just because it matches with a specific datum, doesn't mean that a different datum won't differ.
|
|
22289
|
+
* * This is critical as that means the datum hash won't match.
|
|
22290
|
+
* * After creation a datum (or other hashable CBOR object) should only be treated as raw CBOR bytes,
|
|
22291
|
+
* * or through a type that respects its specific CBOR format e.g. CML's PlutusData::from_cbor_bytes()
|
|
22292
|
+
* *
|
|
22293
|
+
* * This function is just here in case there's no possible way at all to create from CBOR bytes and
|
|
22294
|
+
* * thus cold only be constructed manually and then had this function called on it.
|
|
22295
|
+
* *
|
|
22296
|
+
* * This is also the format that CSL and Lucid use
|
|
22297
|
+
*
|
|
22298
|
+
* @returns {PlutusData}
|
|
22299
|
+
*/
|
|
22300
|
+
to_cardano_node_format() {
|
|
22301
|
+
const ret = wasm.plutusdata_to_cardano_node_format(this.__wbg_ptr);
|
|
22302
|
+
return PlutusData.__wrap(ret);
|
|
22303
|
+
}
|
|
22304
|
+
/**
|
|
22305
|
+
*
|
|
22286
22306
|
* * Serialize this type to CBOR bytes
|
|
22287
22307
|
* * This type type supports encoding preservation so this will preserve round-trip CBOR formats.
|
|
22288
22308
|
* * If created from scratch the CBOR will be canonical.
|
|
@@ -44508,15 +44528,21 @@ class WithdrawalBuilderResult {
|
|
|
44508
44528
|
}
|
|
44509
44529
|
module.exports.WithdrawalBuilderResult = WithdrawalBuilderResult;
|
|
44510
44530
|
|
|
44511
|
-
module.exports.
|
|
44512
|
-
const
|
|
44513
|
-
|
|
44531
|
+
module.exports.__wbindgen_is_object = function(arg0) {
|
|
44532
|
+
const val = getObject(arg0);
|
|
44533
|
+
const ret = typeof(val) === 'object' && val !== null;
|
|
44534
|
+
return ret;
|
|
44514
44535
|
};
|
|
44515
44536
|
|
|
44516
44537
|
module.exports.__wbindgen_object_drop_ref = function(arg0) {
|
|
44517
44538
|
takeObject(arg0);
|
|
44518
44539
|
};
|
|
44519
44540
|
|
|
44541
|
+
module.exports.__wbindgen_string_new = function(arg0, arg1) {
|
|
44542
|
+
const ret = getStringFromWasm0(arg0, arg1);
|
|
44543
|
+
return addHeapObject(ret);
|
|
44544
|
+
};
|
|
44545
|
+
|
|
44520
44546
|
module.exports.__wbindgen_throw = function(arg0, arg1) {
|
|
44521
44547
|
throw new Error(getStringFromWasm0(arg0, arg1));
|
|
44522
44548
|
};
|
|
@@ -44526,12 +44552,6 @@ module.exports.__wbindgen_memory = function() {
|
|
|
44526
44552
|
return addHeapObject(ret);
|
|
44527
44553
|
};
|
|
44528
44554
|
|
|
44529
|
-
module.exports.__wbindgen_is_object = function(arg0) {
|
|
44530
|
-
const val = getObject(arg0);
|
|
44531
|
-
const ret = typeof(val) === 'object' && val !== null;
|
|
44532
|
-
return ret;
|
|
44533
|
-
};
|
|
44534
|
-
|
|
44535
44555
|
module.exports.__wbindgen_is_string = function(arg0) {
|
|
44536
44556
|
const ret = typeof(getObject(arg0)) === 'string';
|
|
44537
44557
|
return ret;
|