@cardananium/cquisitor-lib 0.0.1-beta.1 → 0.1.0-beta.11
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/browser/cquisitor_lib.d.ts +311 -3
- package/browser/cquisitor_lib.js +4 -39191
- package/browser/cquisitor_lib_bg.js +39386 -0
- package/browser/cquisitor_lib_bg.wasm +0 -0
- package/browser/cquisitor_lib_bg.wasm.d.ts +1735 -1730
- package/node/cquisitor_lib.d.ts +311 -3
- package/node/cquisitor_lib.js +868 -655
- package/node/cquisitor_lib_bg.wasm +0 -0
- package/node/cquisitor_lib_bg.wasm.d.ts +1735 -1730
- package/package.json +3 -2
package/node/cquisitor_lib.js
CHANGED
|
@@ -128,6 +128,15 @@ function getFloat64Memory0() {
|
|
|
128
128
|
return cachedFloat64Memory0;
|
|
129
129
|
}
|
|
130
130
|
|
|
131
|
+
let cachedBigInt64Memory0 = null;
|
|
132
|
+
|
|
133
|
+
function getBigInt64Memory0() {
|
|
134
|
+
if (cachedBigInt64Memory0 === null || cachedBigInt64Memory0.byteLength === 0) {
|
|
135
|
+
cachedBigInt64Memory0 = new BigInt64Array(wasm.memory.buffer);
|
|
136
|
+
}
|
|
137
|
+
return cachedBigInt64Memory0;
|
|
138
|
+
}
|
|
139
|
+
|
|
131
140
|
function debugString(val) {
|
|
132
141
|
// primitive types
|
|
133
142
|
const type = typeof val;
|
|
@@ -275,6 +284,77 @@ module.exports.get_possible_types_for_input = function(input) {
|
|
|
275
284
|
}
|
|
276
285
|
};
|
|
277
286
|
|
|
287
|
+
/**
|
|
288
|
+
* @param {string} hex_str
|
|
289
|
+
* @returns {any}
|
|
290
|
+
*/
|
|
291
|
+
module.exports.check_block_or_tx_signatures = function(hex_str) {
|
|
292
|
+
try {
|
|
293
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
294
|
+
const ptr0 = passStringToWasm0(hex_str, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
295
|
+
const len0 = WASM_VECTOR_LEN;
|
|
296
|
+
wasm.check_block_or_tx_signatures(retptr, ptr0, len0);
|
|
297
|
+
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
298
|
+
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
299
|
+
var r2 = getInt32Memory0()[retptr / 4 + 2];
|
|
300
|
+
if (r2) {
|
|
301
|
+
throw takeObject(r1);
|
|
302
|
+
}
|
|
303
|
+
return takeObject(r0);
|
|
304
|
+
} finally {
|
|
305
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
306
|
+
}
|
|
307
|
+
};
|
|
308
|
+
|
|
309
|
+
/**
|
|
310
|
+
* @param {string} tx_hex
|
|
311
|
+
* @returns {(string)[]}
|
|
312
|
+
*/
|
|
313
|
+
module.exports.get_utxo_list_from_tx = function(tx_hex) {
|
|
314
|
+
try {
|
|
315
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
316
|
+
const ptr0 = passStringToWasm0(tx_hex, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
317
|
+
const len0 = WASM_VECTOR_LEN;
|
|
318
|
+
wasm.get_utxo_list_from_tx(retptr, ptr0, len0);
|
|
319
|
+
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
320
|
+
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
321
|
+
var r2 = getInt32Memory0()[retptr / 4 + 2];
|
|
322
|
+
var r3 = getInt32Memory0()[retptr / 4 + 3];
|
|
323
|
+
if (r3) {
|
|
324
|
+
throw takeObject(r2);
|
|
325
|
+
}
|
|
326
|
+
var v2 = getArrayJsValueFromWasm0(r0, r1).slice();
|
|
327
|
+
wasm.__wbindgen_free(r0, r1 * 4, 4);
|
|
328
|
+
return v2;
|
|
329
|
+
} finally {
|
|
330
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
331
|
+
}
|
|
332
|
+
};
|
|
333
|
+
|
|
334
|
+
/**
|
|
335
|
+
* @param {string} tx_hex
|
|
336
|
+
* @param {any} utxo_json
|
|
337
|
+
* @param {any} cost_models_json
|
|
338
|
+
* @returns {any}
|
|
339
|
+
*/
|
|
340
|
+
module.exports.execute_tx_scripts = function(tx_hex, utxo_json, cost_models_json) {
|
|
341
|
+
try {
|
|
342
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
343
|
+
const ptr0 = passStringToWasm0(tx_hex, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
344
|
+
const len0 = WASM_VECTOR_LEN;
|
|
345
|
+
wasm.execute_tx_scripts(retptr, ptr0, len0, addHeapObject(utxo_json), addHeapObject(cost_models_json));
|
|
346
|
+
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
347
|
+
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
348
|
+
var r2 = getInt32Memory0()[retptr / 4 + 2];
|
|
349
|
+
if (r2) {
|
|
350
|
+
throw takeObject(r1);
|
|
351
|
+
}
|
|
352
|
+
return takeObject(r0);
|
|
353
|
+
} finally {
|
|
354
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
355
|
+
}
|
|
356
|
+
};
|
|
357
|
+
|
|
278
358
|
/**
|
|
279
359
|
* @param {string} cbor_hex
|
|
280
360
|
* @returns {any}
|
|
@@ -297,12 +377,58 @@ module.exports.cbor_to_json = function(cbor_hex) {
|
|
|
297
377
|
}
|
|
298
378
|
};
|
|
299
379
|
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
380
|
+
/**
|
|
381
|
+
* @param {string} hex
|
|
382
|
+
* @returns {any}
|
|
383
|
+
*/
|
|
384
|
+
module.exports.decode_plutus_program_uplc_json = function(hex) {
|
|
385
|
+
try {
|
|
386
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
387
|
+
const ptr0 = passStringToWasm0(hex, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
388
|
+
const len0 = WASM_VECTOR_LEN;
|
|
389
|
+
wasm.decode_plutus_program_uplc_json(retptr, ptr0, len0);
|
|
390
|
+
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
391
|
+
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
392
|
+
var r2 = getInt32Memory0()[retptr / 4 + 2];
|
|
393
|
+
if (r2) {
|
|
394
|
+
throw takeObject(r1);
|
|
395
|
+
}
|
|
396
|
+
return takeObject(r0);
|
|
397
|
+
} finally {
|
|
398
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
303
399
|
}
|
|
304
|
-
|
|
305
|
-
|
|
400
|
+
};
|
|
401
|
+
|
|
402
|
+
/**
|
|
403
|
+
* @param {string} hex
|
|
404
|
+
* @returns {string}
|
|
405
|
+
*/
|
|
406
|
+
module.exports.decode_plutus_program_pretty_uplc = function(hex) {
|
|
407
|
+
let deferred3_0;
|
|
408
|
+
let deferred3_1;
|
|
409
|
+
try {
|
|
410
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
411
|
+
const ptr0 = passStringToWasm0(hex, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
412
|
+
const len0 = WASM_VECTOR_LEN;
|
|
413
|
+
wasm.decode_plutus_program_pretty_uplc(retptr, ptr0, len0);
|
|
414
|
+
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
415
|
+
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
416
|
+
var r2 = getInt32Memory0()[retptr / 4 + 2];
|
|
417
|
+
var r3 = getInt32Memory0()[retptr / 4 + 3];
|
|
418
|
+
var ptr2 = r0;
|
|
419
|
+
var len2 = r1;
|
|
420
|
+
if (r3) {
|
|
421
|
+
ptr2 = 0; len2 = 0;
|
|
422
|
+
throw takeObject(r2);
|
|
423
|
+
}
|
|
424
|
+
deferred3_0 = ptr2;
|
|
425
|
+
deferred3_1 = len2;
|
|
426
|
+
return getStringFromWasm0(ptr2, len2);
|
|
427
|
+
} finally {
|
|
428
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
429
|
+
wasm.__wbindgen_free(deferred3_0, deferred3_1, 1);
|
|
430
|
+
}
|
|
431
|
+
};
|
|
306
432
|
|
|
307
433
|
function getArrayU8FromWasm0(ptr, len) {
|
|
308
434
|
ptr = ptr >>> 0;
|
|
@@ -316,224 +442,303 @@ function passArray8ToWasm0(arg, malloc) {
|
|
|
316
442
|
return ptr;
|
|
317
443
|
}
|
|
318
444
|
|
|
445
|
+
function _assertClass(instance, klass) {
|
|
446
|
+
if (!(instance instanceof klass)) {
|
|
447
|
+
throw new Error(`expected instance of ${klass.name}`);
|
|
448
|
+
}
|
|
449
|
+
return instance.ptr;
|
|
450
|
+
}
|
|
451
|
+
|
|
319
452
|
function getArrayU32FromWasm0(ptr, len) {
|
|
320
453
|
ptr = ptr >>> 0;
|
|
321
454
|
return getUint32Memory0().subarray(ptr / 4, ptr / 4 + len);
|
|
322
455
|
}
|
|
323
456
|
/**
|
|
324
|
-
* @param {
|
|
325
|
-
* @param {
|
|
326
|
-
* @param {
|
|
327
|
-
* @
|
|
328
|
-
* @returns {string}
|
|
457
|
+
* @param {TransactionHash} tx_body_hash
|
|
458
|
+
* @param {ByronAddress} addr
|
|
459
|
+
* @param {LegacyDaedalusPrivateKey} key
|
|
460
|
+
* @returns {BootstrapWitness}
|
|
329
461
|
*/
|
|
330
|
-
module.exports.
|
|
331
|
-
|
|
332
|
-
|
|
462
|
+
module.exports.make_daedalus_bootstrap_witness = function(tx_body_hash, addr, key) {
|
|
463
|
+
_assertClass(tx_body_hash, TransactionHash);
|
|
464
|
+
_assertClass(addr, ByronAddress);
|
|
465
|
+
_assertClass(key, LegacyDaedalusPrivateKey);
|
|
466
|
+
const ret = wasm.make_daedalus_bootstrap_witness(tx_body_hash.__wbg_ptr, addr.__wbg_ptr, key.__wbg_ptr);
|
|
467
|
+
return BootstrapWitness.__wrap(ret);
|
|
468
|
+
};
|
|
469
|
+
|
|
470
|
+
/**
|
|
471
|
+
* @param {TransactionHash} tx_body_hash
|
|
472
|
+
* @param {ByronAddress} addr
|
|
473
|
+
* @param {Bip32PrivateKey} key
|
|
474
|
+
* @returns {BootstrapWitness}
|
|
475
|
+
*/
|
|
476
|
+
module.exports.make_icarus_bootstrap_witness = function(tx_body_hash, addr, key) {
|
|
477
|
+
_assertClass(tx_body_hash, TransactionHash);
|
|
478
|
+
_assertClass(addr, ByronAddress);
|
|
479
|
+
_assertClass(key, Bip32PrivateKey);
|
|
480
|
+
const ret = wasm.make_icarus_bootstrap_witness(tx_body_hash.__wbg_ptr, addr.__wbg_ptr, key.__wbg_ptr);
|
|
481
|
+
return BootstrapWitness.__wrap(ret);
|
|
482
|
+
};
|
|
483
|
+
|
|
484
|
+
/**
|
|
485
|
+
* @param {TransactionHash} tx_body_hash
|
|
486
|
+
* @param {PrivateKey} sk
|
|
487
|
+
* @returns {Vkeywitness}
|
|
488
|
+
*/
|
|
489
|
+
module.exports.make_vkey_witness = function(tx_body_hash, sk) {
|
|
490
|
+
_assertClass(tx_body_hash, TransactionHash);
|
|
491
|
+
_assertClass(sk, PrivateKey);
|
|
492
|
+
const ret = wasm.make_vkey_witness(tx_body_hash.__wbg_ptr, sk.__wbg_ptr);
|
|
493
|
+
return Vkeywitness.__wrap(ret);
|
|
494
|
+
};
|
|
495
|
+
|
|
496
|
+
/**
|
|
497
|
+
* @param {AuxiliaryData} auxiliary_data
|
|
498
|
+
* @returns {AuxiliaryDataHash}
|
|
499
|
+
*/
|
|
500
|
+
module.exports.hash_auxiliary_data = function(auxiliary_data) {
|
|
501
|
+
_assertClass(auxiliary_data, AuxiliaryData);
|
|
502
|
+
const ret = wasm.hash_auxiliary_data(auxiliary_data.__wbg_ptr);
|
|
503
|
+
return AuxiliaryDataHash.__wrap(ret);
|
|
504
|
+
};
|
|
505
|
+
|
|
506
|
+
/**
|
|
507
|
+
* @param {PlutusData} plutus_data
|
|
508
|
+
* @returns {DataHash}
|
|
509
|
+
*/
|
|
510
|
+
module.exports.hash_plutus_data = function(plutus_data) {
|
|
511
|
+
_assertClass(plutus_data, PlutusData);
|
|
512
|
+
const ret = wasm.hash_plutus_data(plutus_data.__wbg_ptr);
|
|
513
|
+
return DataHash.__wrap(ret);
|
|
514
|
+
};
|
|
515
|
+
|
|
516
|
+
/**
|
|
517
|
+
* @param {Redeemers} redeemers
|
|
518
|
+
* @param {Costmdls} cost_models
|
|
519
|
+
* @param {PlutusList | undefined} [datums]
|
|
520
|
+
* @returns {ScriptDataHash}
|
|
521
|
+
*/
|
|
522
|
+
module.exports.hash_script_data = function(redeemers, cost_models, datums) {
|
|
523
|
+
_assertClass(redeemers, Redeemers);
|
|
524
|
+
_assertClass(cost_models, Costmdls);
|
|
525
|
+
let ptr0 = 0;
|
|
526
|
+
if (!isLikeNone(datums)) {
|
|
527
|
+
_assertClass(datums, PlutusList);
|
|
528
|
+
ptr0 = datums.__destroy_into_raw();
|
|
529
|
+
}
|
|
530
|
+
const ret = wasm.hash_script_data(redeemers.__wbg_ptr, cost_models.__wbg_ptr, ptr0);
|
|
531
|
+
return ScriptDataHash.__wrap(ret);
|
|
532
|
+
};
|
|
533
|
+
|
|
534
|
+
/**
|
|
535
|
+
* @param {TransactionBody} txbody
|
|
536
|
+
* @param {BigNum} pool_deposit
|
|
537
|
+
* @param {BigNum} key_deposit
|
|
538
|
+
* @returns {Value}
|
|
539
|
+
*/
|
|
540
|
+
module.exports.get_implicit_input = function(txbody, pool_deposit, key_deposit) {
|
|
333
541
|
try {
|
|
334
542
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
const ptr2 = passStringToWasm0(nonce, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
340
|
-
const len2 = WASM_VECTOR_LEN;
|
|
341
|
-
const ptr3 = passStringToWasm0(data, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
342
|
-
const len3 = WASM_VECTOR_LEN;
|
|
343
|
-
wasm.encrypt_with_password(retptr, ptr0, len0, ptr1, len1, ptr2, len2, ptr3, len3);
|
|
543
|
+
_assertClass(txbody, TransactionBody);
|
|
544
|
+
_assertClass(pool_deposit, BigNum);
|
|
545
|
+
_assertClass(key_deposit, BigNum);
|
|
546
|
+
wasm.get_implicit_input(retptr, txbody.__wbg_ptr, pool_deposit.__wbg_ptr, key_deposit.__wbg_ptr);
|
|
344
547
|
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
345
548
|
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
346
549
|
var r2 = getInt32Memory0()[retptr / 4 + 2];
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
var len5 = r1;
|
|
350
|
-
if (r3) {
|
|
351
|
-
ptr5 = 0; len5 = 0;
|
|
352
|
-
throw takeObject(r2);
|
|
550
|
+
if (r2) {
|
|
551
|
+
throw takeObject(r1);
|
|
353
552
|
}
|
|
354
|
-
|
|
355
|
-
deferred6_1 = len5;
|
|
356
|
-
return getStringFromWasm0(ptr5, len5);
|
|
553
|
+
return Value.__wrap(r0);
|
|
357
554
|
} finally {
|
|
358
555
|
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
359
|
-
wasm.__wbindgen_free(deferred6_0, deferred6_1, 1);
|
|
360
556
|
}
|
|
361
557
|
};
|
|
362
558
|
|
|
363
559
|
/**
|
|
364
|
-
* @param {
|
|
365
|
-
* @param {
|
|
366
|
-
* @
|
|
560
|
+
* @param {TransactionBody} txbody
|
|
561
|
+
* @param {BigNum} pool_deposit
|
|
562
|
+
* @param {BigNum} key_deposit
|
|
563
|
+
* @returns {BigNum}
|
|
367
564
|
*/
|
|
368
|
-
module.exports.
|
|
369
|
-
let deferred4_0;
|
|
370
|
-
let deferred4_1;
|
|
565
|
+
module.exports.get_deposit = function(txbody, pool_deposit, key_deposit) {
|
|
371
566
|
try {
|
|
372
567
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
wasm.decrypt_with_password(retptr, ptr0, len0, ptr1, len1);
|
|
568
|
+
_assertClass(txbody, TransactionBody);
|
|
569
|
+
_assertClass(pool_deposit, BigNum);
|
|
570
|
+
_assertClass(key_deposit, BigNum);
|
|
571
|
+
wasm.get_deposit(retptr, txbody.__wbg_ptr, pool_deposit.__wbg_ptr, key_deposit.__wbg_ptr);
|
|
378
572
|
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
379
573
|
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
380
574
|
var r2 = getInt32Memory0()[retptr / 4 + 2];
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
var len3 = r1;
|
|
384
|
-
if (r3) {
|
|
385
|
-
ptr3 = 0; len3 = 0;
|
|
386
|
-
throw takeObject(r2);
|
|
575
|
+
if (r2) {
|
|
576
|
+
throw takeObject(r1);
|
|
387
577
|
}
|
|
388
|
-
|
|
389
|
-
deferred4_1 = len3;
|
|
390
|
-
return getStringFromWasm0(ptr3, len3);
|
|
578
|
+
return BigNum.__wrap(r0);
|
|
391
579
|
} finally {
|
|
392
580
|
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
393
|
-
wasm.__wbindgen_free(deferred4_0, deferred4_1, 1);
|
|
394
581
|
}
|
|
395
582
|
};
|
|
396
583
|
|
|
397
584
|
/**
|
|
398
|
-
*
|
|
399
|
-
* @param {
|
|
400
|
-
* @
|
|
585
|
+
*returns minimal amount of ada for the output for case when the amount is included to the output
|
|
586
|
+
* @param {TransactionOutput} output
|
|
587
|
+
* @param {DataCost} data_cost
|
|
588
|
+
* @returns {BigNum}
|
|
401
589
|
*/
|
|
402
|
-
module.exports.
|
|
590
|
+
module.exports.min_ada_for_output = function(output, data_cost) {
|
|
403
591
|
try {
|
|
404
592
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
wasm.
|
|
593
|
+
_assertClass(output, TransactionOutput);
|
|
594
|
+
_assertClass(data_cost, DataCost);
|
|
595
|
+
wasm.min_ada_for_output(retptr, output.__wbg_ptr, data_cost.__wbg_ptr);
|
|
408
596
|
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
409
597
|
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
410
598
|
var r2 = getInt32Memory0()[retptr / 4 + 2];
|
|
411
599
|
if (r2) {
|
|
412
600
|
throw takeObject(r1);
|
|
413
601
|
}
|
|
414
|
-
return
|
|
602
|
+
return BigNum.__wrap(r0);
|
|
415
603
|
} finally {
|
|
416
604
|
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
417
605
|
}
|
|
418
606
|
};
|
|
419
607
|
|
|
420
608
|
/**
|
|
421
|
-
*
|
|
422
|
-
*
|
|
423
|
-
*
|
|
609
|
+
* Receives a script JSON string
|
|
610
|
+
* and returns a NativeScript.
|
|
611
|
+
* Cardano Wallet and Node styles are supported.
|
|
612
|
+
*
|
|
613
|
+
* * wallet: https://github.com/input-output-hk/cardano-wallet/blob/master/specifications/api/swagger.yaml
|
|
614
|
+
* * node: https://github.com/input-output-hk/cardano-node/blob/master/doc/reference/simple-scripts.md
|
|
615
|
+
*
|
|
616
|
+
* self_xpub is expected to be a Bip32PublicKey as hex-encoded bytes
|
|
617
|
+
* @param {string} json
|
|
618
|
+
* @param {string} self_xpub
|
|
619
|
+
* @param {ScriptSchema} schema
|
|
620
|
+
* @returns {NativeScript}
|
|
424
621
|
*/
|
|
425
|
-
module.exports.
|
|
426
|
-
let deferred2_0;
|
|
427
|
-
let deferred2_1;
|
|
622
|
+
module.exports.encode_json_str_to_native_script = function(json, self_xpub, schema) {
|
|
428
623
|
try {
|
|
429
624
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
430
|
-
|
|
431
|
-
|
|
625
|
+
const ptr0 = passStringToWasm0(json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
626
|
+
const len0 = WASM_VECTOR_LEN;
|
|
627
|
+
const ptr1 = passStringToWasm0(self_xpub, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
628
|
+
const len1 = WASM_VECTOR_LEN;
|
|
629
|
+
wasm.encode_json_str_to_native_script(retptr, ptr0, len0, ptr1, len1, schema);
|
|
432
630
|
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
433
631
|
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
434
632
|
var r2 = getInt32Memory0()[retptr / 4 + 2];
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
var len1 = r1;
|
|
438
|
-
if (r3) {
|
|
439
|
-
ptr1 = 0; len1 = 0;
|
|
440
|
-
throw takeObject(r2);
|
|
633
|
+
if (r2) {
|
|
634
|
+
throw takeObject(r1);
|
|
441
635
|
}
|
|
442
|
-
|
|
443
|
-
deferred2_1 = len1;
|
|
444
|
-
return getStringFromWasm0(ptr1, len1);
|
|
636
|
+
return NativeScript.__wrap(r0);
|
|
445
637
|
} finally {
|
|
446
638
|
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
447
|
-
wasm.__wbindgen_free(deferred2_0, deferred2_1, 1);
|
|
448
639
|
}
|
|
449
640
|
};
|
|
450
641
|
|
|
451
642
|
/**
|
|
452
|
-
*
|
|
453
|
-
*
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
}
|
|
461
|
-
|
|
462
|
-
/**
|
|
463
|
-
* @param {TransactionMetadatum} metadata
|
|
464
|
-
* @returns {Uint8Array}
|
|
643
|
+
* Returns the state of the transaction sets.
|
|
644
|
+
* If all sets have a tag, it returns AllSetsHaveTag.
|
|
645
|
+
* If all sets have no tag, it returns AllSetsHaveNoTag.
|
|
646
|
+
* If there is a mix of tagged and untagged sets, it returns MixedSets.
|
|
647
|
+
* This function is useful for checking if a transaction might be signed by a hardware wallet.
|
|
648
|
+
* And for checking which parameter should be used in a hardware wallet api.
|
|
649
|
+
* WARNING this function will be deleted after all tags for set types will be mandatory. Approx after next hf
|
|
650
|
+
* @param {Uint8Array} tx_bytes
|
|
651
|
+
* @returns {TransactionSetsState}
|
|
465
652
|
*/
|
|
466
|
-
module.exports.
|
|
653
|
+
module.exports.has_transaction_set_tag = function(tx_bytes) {
|
|
467
654
|
try {
|
|
468
655
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
469
|
-
|
|
470
|
-
|
|
656
|
+
const ptr0 = passArray8ToWasm0(tx_bytes, wasm.__wbindgen_malloc);
|
|
657
|
+
const len0 = WASM_VECTOR_LEN;
|
|
658
|
+
wasm.has_transaction_set_tag(retptr, ptr0, len0);
|
|
471
659
|
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
472
660
|
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
473
661
|
var r2 = getInt32Memory0()[retptr / 4 + 2];
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
throw takeObject(r2);
|
|
662
|
+
if (r2) {
|
|
663
|
+
throw takeObject(r1);
|
|
477
664
|
}
|
|
478
|
-
|
|
479
|
-
wasm.__wbindgen_free(r0, r1 * 1, 1);
|
|
480
|
-
return v1;
|
|
665
|
+
return r0;
|
|
481
666
|
} finally {
|
|
482
667
|
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
483
668
|
}
|
|
484
669
|
};
|
|
485
670
|
|
|
486
671
|
/**
|
|
487
|
-
* @param {string}
|
|
488
|
-
* @param {
|
|
489
|
-
* @
|
|
672
|
+
* @param {string} password
|
|
673
|
+
* @param {string} salt
|
|
674
|
+
* @param {string} nonce
|
|
675
|
+
* @param {string} data
|
|
676
|
+
* @returns {string}
|
|
490
677
|
*/
|
|
491
|
-
module.exports.
|
|
678
|
+
module.exports.encrypt_with_password = function(password, salt, nonce, data) {
|
|
679
|
+
let deferred6_0;
|
|
680
|
+
let deferred6_1;
|
|
492
681
|
try {
|
|
493
682
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
494
|
-
const ptr0 = passStringToWasm0(
|
|
683
|
+
const ptr0 = passStringToWasm0(password, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
495
684
|
const len0 = WASM_VECTOR_LEN;
|
|
496
|
-
|
|
685
|
+
const ptr1 = passStringToWasm0(salt, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
686
|
+
const len1 = WASM_VECTOR_LEN;
|
|
687
|
+
const ptr2 = passStringToWasm0(nonce, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
688
|
+
const len2 = WASM_VECTOR_LEN;
|
|
689
|
+
const ptr3 = passStringToWasm0(data, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
690
|
+
const len3 = WASM_VECTOR_LEN;
|
|
691
|
+
wasm.encrypt_with_password(retptr, ptr0, len0, ptr1, len1, ptr2, len2, ptr3, len3);
|
|
497
692
|
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
498
693
|
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
499
694
|
var r2 = getInt32Memory0()[retptr / 4 + 2];
|
|
500
|
-
|
|
501
|
-
|
|
695
|
+
var r3 = getInt32Memory0()[retptr / 4 + 3];
|
|
696
|
+
var ptr5 = r0;
|
|
697
|
+
var len5 = r1;
|
|
698
|
+
if (r3) {
|
|
699
|
+
ptr5 = 0; len5 = 0;
|
|
700
|
+
throw takeObject(r2);
|
|
502
701
|
}
|
|
503
|
-
|
|
702
|
+
deferred6_0 = ptr5;
|
|
703
|
+
deferred6_1 = len5;
|
|
704
|
+
return getStringFromWasm0(ptr5, len5);
|
|
504
705
|
} finally {
|
|
505
706
|
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
707
|
+
wasm.__wbindgen_free(deferred6_0, deferred6_1, 1);
|
|
506
708
|
}
|
|
507
709
|
};
|
|
508
710
|
|
|
509
711
|
/**
|
|
510
|
-
* @param {
|
|
511
|
-
* @param {
|
|
712
|
+
* @param {string} password
|
|
713
|
+
* @param {string} data
|
|
512
714
|
* @returns {string}
|
|
513
715
|
*/
|
|
514
|
-
module.exports.
|
|
515
|
-
let
|
|
516
|
-
let
|
|
716
|
+
module.exports.decrypt_with_password = function(password, data) {
|
|
717
|
+
let deferred4_0;
|
|
718
|
+
let deferred4_1;
|
|
517
719
|
try {
|
|
518
720
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
519
|
-
|
|
520
|
-
|
|
721
|
+
const ptr0 = passStringToWasm0(password, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
722
|
+
const len0 = WASM_VECTOR_LEN;
|
|
723
|
+
const ptr1 = passStringToWasm0(data, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
724
|
+
const len1 = WASM_VECTOR_LEN;
|
|
725
|
+
wasm.decrypt_with_password(retptr, ptr0, len0, ptr1, len1);
|
|
521
726
|
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
522
727
|
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
523
728
|
var r2 = getInt32Memory0()[retptr / 4 + 2];
|
|
524
729
|
var r3 = getInt32Memory0()[retptr / 4 + 3];
|
|
525
|
-
var
|
|
526
|
-
var
|
|
730
|
+
var ptr3 = r0;
|
|
731
|
+
var len3 = r1;
|
|
527
732
|
if (r3) {
|
|
528
|
-
|
|
733
|
+
ptr3 = 0; len3 = 0;
|
|
529
734
|
throw takeObject(r2);
|
|
530
735
|
}
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
return getStringFromWasm0(
|
|
736
|
+
deferred4_0 = ptr3;
|
|
737
|
+
deferred4_1 = len3;
|
|
738
|
+
return getStringFromWasm0(ptr3, len3);
|
|
534
739
|
} finally {
|
|
535
740
|
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
536
|
-
wasm.__wbindgen_free(
|
|
741
|
+
wasm.__wbindgen_free(deferred4_0, deferred4_1, 1);
|
|
537
742
|
}
|
|
538
743
|
};
|
|
539
744
|
|
|
@@ -653,227 +858,156 @@ module.exports.min_ref_script_fee = function(total_ref_scripts_size, ref_script_
|
|
|
653
858
|
}
|
|
654
859
|
};
|
|
655
860
|
|
|
656
|
-
function passArray32ToWasm0(arg, malloc) {
|
|
657
|
-
const ptr = malloc(arg.length * 4, 4) >>> 0;
|
|
658
|
-
getUint32Memory0().set(arg, ptr / 4);
|
|
659
|
-
WASM_VECTOR_LEN = arg.length;
|
|
660
|
-
return ptr;
|
|
661
|
-
}
|
|
662
|
-
/**
|
|
663
|
-
* @param {TransactionHash} tx_body_hash
|
|
664
|
-
* @param {ByronAddress} addr
|
|
665
|
-
* @param {LegacyDaedalusPrivateKey} key
|
|
666
|
-
* @returns {BootstrapWitness}
|
|
667
|
-
*/
|
|
668
|
-
module.exports.make_daedalus_bootstrap_witness = function(tx_body_hash, addr, key) {
|
|
669
|
-
_assertClass(tx_body_hash, TransactionHash);
|
|
670
|
-
_assertClass(addr, ByronAddress);
|
|
671
|
-
_assertClass(key, LegacyDaedalusPrivateKey);
|
|
672
|
-
const ret = wasm.make_daedalus_bootstrap_witness(tx_body_hash.__wbg_ptr, addr.__wbg_ptr, key.__wbg_ptr);
|
|
673
|
-
return BootstrapWitness.__wrap(ret);
|
|
674
|
-
};
|
|
675
|
-
|
|
676
861
|
/**
|
|
677
|
-
* @param {
|
|
678
|
-
* @param {
|
|
679
|
-
* @
|
|
680
|
-
* @returns {BootstrapWitness}
|
|
681
|
-
*/
|
|
682
|
-
module.exports.make_icarus_bootstrap_witness = function(tx_body_hash, addr, key) {
|
|
683
|
-
_assertClass(tx_body_hash, TransactionHash);
|
|
684
|
-
_assertClass(addr, ByronAddress);
|
|
685
|
-
_assertClass(key, Bip32PrivateKey);
|
|
686
|
-
const ret = wasm.make_icarus_bootstrap_witness(tx_body_hash.__wbg_ptr, addr.__wbg_ptr, key.__wbg_ptr);
|
|
687
|
-
return BootstrapWitness.__wrap(ret);
|
|
688
|
-
};
|
|
689
|
-
|
|
690
|
-
/**
|
|
691
|
-
* @param {TransactionHash} tx_body_hash
|
|
692
|
-
* @param {PrivateKey} sk
|
|
693
|
-
* @returns {Vkeywitness}
|
|
694
|
-
*/
|
|
695
|
-
module.exports.make_vkey_witness = function(tx_body_hash, sk) {
|
|
696
|
-
_assertClass(tx_body_hash, TransactionHash);
|
|
697
|
-
_assertClass(sk, PrivateKey);
|
|
698
|
-
const ret = wasm.make_vkey_witness(tx_body_hash.__wbg_ptr, sk.__wbg_ptr);
|
|
699
|
-
return Vkeywitness.__wrap(ret);
|
|
700
|
-
};
|
|
701
|
-
|
|
702
|
-
/**
|
|
703
|
-
* @param {AuxiliaryData} auxiliary_data
|
|
704
|
-
* @returns {AuxiliaryDataHash}
|
|
705
|
-
*/
|
|
706
|
-
module.exports.hash_auxiliary_data = function(auxiliary_data) {
|
|
707
|
-
_assertClass(auxiliary_data, AuxiliaryData);
|
|
708
|
-
const ret = wasm.hash_auxiliary_data(auxiliary_data.__wbg_ptr);
|
|
709
|
-
return AuxiliaryDataHash.__wrap(ret);
|
|
710
|
-
};
|
|
711
|
-
|
|
712
|
-
/**
|
|
713
|
-
* @param {PlutusData} plutus_data
|
|
714
|
-
* @returns {DataHash}
|
|
715
|
-
*/
|
|
716
|
-
module.exports.hash_plutus_data = function(plutus_data) {
|
|
717
|
-
_assertClass(plutus_data, PlutusData);
|
|
718
|
-
const ret = wasm.hash_plutus_data(plutus_data.__wbg_ptr);
|
|
719
|
-
return DataHash.__wrap(ret);
|
|
720
|
-
};
|
|
721
|
-
|
|
722
|
-
/**
|
|
723
|
-
* @param {Redeemers} redeemers
|
|
724
|
-
* @param {Costmdls} cost_models
|
|
725
|
-
* @param {PlutusList | undefined} [datums]
|
|
726
|
-
* @returns {ScriptDataHash}
|
|
727
|
-
*/
|
|
728
|
-
module.exports.hash_script_data = function(redeemers, cost_models, datums) {
|
|
729
|
-
_assertClass(redeemers, Redeemers);
|
|
730
|
-
_assertClass(cost_models, Costmdls);
|
|
731
|
-
let ptr0 = 0;
|
|
732
|
-
if (!isLikeNone(datums)) {
|
|
733
|
-
_assertClass(datums, PlutusList);
|
|
734
|
-
ptr0 = datums.__destroy_into_raw();
|
|
735
|
-
}
|
|
736
|
-
const ret = wasm.hash_script_data(redeemers.__wbg_ptr, cost_models.__wbg_ptr, ptr0);
|
|
737
|
-
return ScriptDataHash.__wrap(ret);
|
|
738
|
-
};
|
|
739
|
-
|
|
740
|
-
/**
|
|
741
|
-
* @param {TransactionBody} txbody
|
|
742
|
-
* @param {BigNum} pool_deposit
|
|
743
|
-
* @param {BigNum} key_deposit
|
|
744
|
-
* @returns {Value}
|
|
862
|
+
* @param {string} json
|
|
863
|
+
* @param {PlutusDatumSchema} schema
|
|
864
|
+
* @returns {PlutusData}
|
|
745
865
|
*/
|
|
746
|
-
module.exports.
|
|
866
|
+
module.exports.encode_json_str_to_plutus_datum = function(json, schema) {
|
|
747
867
|
try {
|
|
748
868
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
wasm.get_implicit_input(retptr, txbody.__wbg_ptr, pool_deposit.__wbg_ptr, key_deposit.__wbg_ptr);
|
|
869
|
+
const ptr0 = passStringToWasm0(json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
870
|
+
const len0 = WASM_VECTOR_LEN;
|
|
871
|
+
wasm.encode_json_str_to_plutus_datum(retptr, ptr0, len0, schema);
|
|
753
872
|
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
754
873
|
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
755
874
|
var r2 = getInt32Memory0()[retptr / 4 + 2];
|
|
756
875
|
if (r2) {
|
|
757
876
|
throw takeObject(r1);
|
|
758
877
|
}
|
|
759
|
-
return
|
|
878
|
+
return PlutusData.__wrap(r0);
|
|
760
879
|
} finally {
|
|
761
880
|
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
762
881
|
}
|
|
763
882
|
};
|
|
764
883
|
|
|
765
884
|
/**
|
|
766
|
-
* @param {
|
|
767
|
-
* @param {
|
|
768
|
-
* @
|
|
769
|
-
* @returns {BigNum}
|
|
885
|
+
* @param {PlutusData} datum
|
|
886
|
+
* @param {PlutusDatumSchema} schema
|
|
887
|
+
* @returns {string}
|
|
770
888
|
*/
|
|
771
|
-
module.exports.
|
|
889
|
+
module.exports.decode_plutus_datum_to_json_str = function(datum, schema) {
|
|
890
|
+
let deferred2_0;
|
|
891
|
+
let deferred2_1;
|
|
772
892
|
try {
|
|
773
893
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
774
|
-
_assertClass(
|
|
775
|
-
|
|
776
|
-
_assertClass(key_deposit, BigNum);
|
|
777
|
-
wasm.get_deposit(retptr, txbody.__wbg_ptr, pool_deposit.__wbg_ptr, key_deposit.__wbg_ptr);
|
|
894
|
+
_assertClass(datum, PlutusData);
|
|
895
|
+
wasm.decode_plutus_datum_to_json_str(retptr, datum.__wbg_ptr, schema);
|
|
778
896
|
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
779
897
|
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
780
898
|
var r2 = getInt32Memory0()[retptr / 4 + 2];
|
|
781
|
-
|
|
782
|
-
|
|
899
|
+
var r3 = getInt32Memory0()[retptr / 4 + 3];
|
|
900
|
+
var ptr1 = r0;
|
|
901
|
+
var len1 = r1;
|
|
902
|
+
if (r3) {
|
|
903
|
+
ptr1 = 0; len1 = 0;
|
|
904
|
+
throw takeObject(r2);
|
|
783
905
|
}
|
|
784
|
-
|
|
906
|
+
deferred2_0 = ptr1;
|
|
907
|
+
deferred2_1 = len1;
|
|
908
|
+
return getStringFromWasm0(ptr1, len1);
|
|
785
909
|
} finally {
|
|
786
910
|
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
911
|
+
wasm.__wbindgen_free(deferred2_0, deferred2_1, 1);
|
|
787
912
|
}
|
|
788
913
|
};
|
|
789
914
|
|
|
790
915
|
/**
|
|
791
|
-
*
|
|
792
|
-
* @
|
|
793
|
-
* @param {DataCost} data_cost
|
|
794
|
-
* @returns {BigNum}
|
|
916
|
+
* @param {Uint8Array} bytes
|
|
917
|
+
* @returns {TransactionMetadatum}
|
|
795
918
|
*/
|
|
796
|
-
module.exports.
|
|
919
|
+
module.exports.encode_arbitrary_bytes_as_metadatum = function(bytes) {
|
|
920
|
+
const ptr0 = passArray8ToWasm0(bytes, wasm.__wbindgen_malloc);
|
|
921
|
+
const len0 = WASM_VECTOR_LEN;
|
|
922
|
+
const ret = wasm.encode_arbitrary_bytes_as_metadatum(ptr0, len0);
|
|
923
|
+
return TransactionMetadatum.__wrap(ret);
|
|
924
|
+
};
|
|
925
|
+
|
|
926
|
+
/**
|
|
927
|
+
* @param {TransactionMetadatum} metadata
|
|
928
|
+
* @returns {Uint8Array}
|
|
929
|
+
*/
|
|
930
|
+
module.exports.decode_arbitrary_bytes_from_metadatum = function(metadata) {
|
|
797
931
|
try {
|
|
798
932
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
799
|
-
_assertClass(
|
|
800
|
-
|
|
801
|
-
wasm.min_ada_for_output(retptr, output.__wbg_ptr, data_cost.__wbg_ptr);
|
|
933
|
+
_assertClass(metadata, TransactionMetadatum);
|
|
934
|
+
wasm.decode_arbitrary_bytes_from_metadatum(retptr, metadata.__wbg_ptr);
|
|
802
935
|
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
803
936
|
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
804
937
|
var r2 = getInt32Memory0()[retptr / 4 + 2];
|
|
805
|
-
|
|
806
|
-
|
|
938
|
+
var r3 = getInt32Memory0()[retptr / 4 + 3];
|
|
939
|
+
if (r3) {
|
|
940
|
+
throw takeObject(r2);
|
|
807
941
|
}
|
|
808
|
-
|
|
942
|
+
var v1 = getArrayU8FromWasm0(r0, r1).slice();
|
|
943
|
+
wasm.__wbindgen_free(r0, r1 * 1, 1);
|
|
944
|
+
return v1;
|
|
809
945
|
} finally {
|
|
810
946
|
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
811
947
|
}
|
|
812
948
|
};
|
|
813
949
|
|
|
814
950
|
/**
|
|
815
|
-
* Receives a script JSON string
|
|
816
|
-
* and returns a NativeScript.
|
|
817
|
-
* Cardano Wallet and Node styles are supported.
|
|
818
|
-
*
|
|
819
|
-
* * wallet: https://github.com/input-output-hk/cardano-wallet/blob/master/specifications/api/swagger.yaml
|
|
820
|
-
* * node: https://github.com/input-output-hk/cardano-node/blob/master/doc/reference/simple-scripts.md
|
|
821
|
-
*
|
|
822
|
-
* self_xpub is expected to be a Bip32PublicKey as hex-encoded bytes
|
|
823
951
|
* @param {string} json
|
|
824
|
-
* @param {
|
|
825
|
-
* @
|
|
826
|
-
* @returns {NativeScript}
|
|
952
|
+
* @param {MetadataJsonSchema} schema
|
|
953
|
+
* @returns {TransactionMetadatum}
|
|
827
954
|
*/
|
|
828
|
-
module.exports.
|
|
955
|
+
module.exports.encode_json_str_to_metadatum = function(json, schema) {
|
|
829
956
|
try {
|
|
830
957
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
831
958
|
const ptr0 = passStringToWasm0(json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
832
959
|
const len0 = WASM_VECTOR_LEN;
|
|
833
|
-
|
|
834
|
-
const len1 = WASM_VECTOR_LEN;
|
|
835
|
-
wasm.encode_json_str_to_native_script(retptr, ptr0, len0, ptr1, len1, schema);
|
|
960
|
+
wasm.encode_json_str_to_metadatum(retptr, ptr0, len0, schema);
|
|
836
961
|
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
837
962
|
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
838
963
|
var r2 = getInt32Memory0()[retptr / 4 + 2];
|
|
839
964
|
if (r2) {
|
|
840
965
|
throw takeObject(r1);
|
|
841
966
|
}
|
|
842
|
-
return
|
|
967
|
+
return TransactionMetadatum.__wrap(r0);
|
|
843
968
|
} finally {
|
|
844
969
|
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
845
970
|
}
|
|
846
971
|
};
|
|
847
972
|
|
|
848
973
|
/**
|
|
849
|
-
*
|
|
850
|
-
*
|
|
851
|
-
*
|
|
852
|
-
* If there is a mix of tagged and untagged sets, it returns MixedSets.
|
|
853
|
-
* This function is useful for checking if a transaction might be signed by a hardware wallet.
|
|
854
|
-
* And for checking which parameter should be used in a hardware wallet api.
|
|
855
|
-
* WARNING this function will be deleted after all tags for set types will be mandatory. Approx after next hf
|
|
856
|
-
* @param {Uint8Array} tx_bytes
|
|
857
|
-
* @returns {TransactionSetsState}
|
|
974
|
+
* @param {TransactionMetadatum} metadatum
|
|
975
|
+
* @param {MetadataJsonSchema} schema
|
|
976
|
+
* @returns {string}
|
|
858
977
|
*/
|
|
859
|
-
module.exports.
|
|
978
|
+
module.exports.decode_metadatum_to_json_str = function(metadatum, schema) {
|
|
979
|
+
let deferred2_0;
|
|
980
|
+
let deferred2_1;
|
|
860
981
|
try {
|
|
861
982
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
wasm.has_transaction_set_tag(retptr, ptr0, len0);
|
|
983
|
+
_assertClass(metadatum, TransactionMetadatum);
|
|
984
|
+
wasm.decode_metadatum_to_json_str(retptr, metadatum.__wbg_ptr, schema);
|
|
865
985
|
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
866
986
|
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
867
987
|
var r2 = getInt32Memory0()[retptr / 4 + 2];
|
|
868
|
-
|
|
869
|
-
|
|
988
|
+
var r3 = getInt32Memory0()[retptr / 4 + 3];
|
|
989
|
+
var ptr1 = r0;
|
|
990
|
+
var len1 = r1;
|
|
991
|
+
if (r3) {
|
|
992
|
+
ptr1 = 0; len1 = 0;
|
|
993
|
+
throw takeObject(r2);
|
|
870
994
|
}
|
|
871
|
-
|
|
995
|
+
deferred2_0 = ptr1;
|
|
996
|
+
deferred2_1 = len1;
|
|
997
|
+
return getStringFromWasm0(ptr1, len1);
|
|
872
998
|
} finally {
|
|
873
999
|
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
1000
|
+
wasm.__wbindgen_free(deferred2_0, deferred2_1, 1);
|
|
874
1001
|
}
|
|
875
1002
|
};
|
|
876
1003
|
|
|
1004
|
+
function passArray32ToWasm0(arg, malloc) {
|
|
1005
|
+
const ptr = malloc(arg.length * 4, 4) >>> 0;
|
|
1006
|
+
getUint32Memory0().set(arg, ptr / 4);
|
|
1007
|
+
WASM_VECTOR_LEN = arg.length;
|
|
1008
|
+
return ptr;
|
|
1009
|
+
}
|
|
1010
|
+
|
|
877
1011
|
function handleError(f, args) {
|
|
878
1012
|
try {
|
|
879
1013
|
return f.apply(this, args);
|
|
@@ -883,31 +1017,85 @@ function handleError(f, args) {
|
|
|
883
1017
|
}
|
|
884
1018
|
/**
|
|
885
1019
|
*/
|
|
886
|
-
module.exports.
|
|
1020
|
+
module.exports.MIRKind = Object.freeze({ ToOtherPot:0,"0":"ToOtherPot",ToStakeCredentials:1,"1":"ToStakeCredentials", });
|
|
887
1021
|
/**
|
|
888
1022
|
*/
|
|
889
|
-
module.exports.
|
|
1023
|
+
module.exports.ByronAddressType = Object.freeze({ ATPubKey:0,"0":"ATPubKey",ATScript:1,"1":"ATScript",ATRedeem:2,"2":"ATRedeem", });
|
|
890
1024
|
/**
|
|
891
1025
|
*/
|
|
892
|
-
module.exports.
|
|
1026
|
+
module.exports.DRepKind = Object.freeze({ KeyHash:0,"0":"KeyHash",ScriptHash:1,"1":"ScriptHash",AlwaysAbstain:2,"2":"AlwaysAbstain",AlwaysNoConfidence:3,"3":"AlwaysNoConfidence", });
|
|
893
1027
|
/**
|
|
894
1028
|
*/
|
|
895
1029
|
module.exports.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", });
|
|
896
1030
|
/**
|
|
897
1031
|
*/
|
|
1032
|
+
module.exports.CborContainerType = Object.freeze({ Array:0,"0":"Array",Map:1,"1":"Map", });
|
|
1033
|
+
/**
|
|
1034
|
+
*/
|
|
1035
|
+
module.exports.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", });
|
|
1036
|
+
/**
|
|
1037
|
+
*/
|
|
1038
|
+
module.exports.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", });
|
|
1039
|
+
/**
|
|
1040
|
+
*/
|
|
1041
|
+
module.exports.RelayKind = Object.freeze({ SingleHostAddr:0,"0":"SingleHostAddr",SingleHostName:1,"1":"SingleHostName",MultiHostName:2,"2":"MultiHostName", });
|
|
1042
|
+
/**
|
|
1043
|
+
* Used to choosed the schema for a script JSON string
|
|
1044
|
+
*/
|
|
1045
|
+
module.exports.ScriptSchema = Object.freeze({ Wallet:0,"0":"Wallet",Node:1,"1":"Node", });
|
|
1046
|
+
/**
|
|
1047
|
+
*/
|
|
1048
|
+
module.exports.MetadataJsonSchema = Object.freeze({ NoConversions:0,"0":"NoConversions",BasicConversions:1,"1":"BasicConversions",DetailedSchema:2,"2":"DetailedSchema", });
|
|
1049
|
+
/**
|
|
1050
|
+
* Each new language uses a different namespace for hashing its script
|
|
1051
|
+
* This is because you could have a language where the same bytes have different semantics
|
|
1052
|
+
* So this avoids scripts in different languages mapping to the same hash
|
|
1053
|
+
* Note that the enum value here is different than the enum value for deciding the cost model of a script
|
|
1054
|
+
*/
|
|
1055
|
+
module.exports.ScriptHashNamespace = Object.freeze({ NativeScript:0,"0":"NativeScript",PlutusScript:1,"1":"PlutusScript",PlutusScriptV2:2,"2":"PlutusScriptV2",PlutusScriptV3:3,"3":"PlutusScriptV3", });
|
|
1056
|
+
/**
|
|
1057
|
+
*/
|
|
898
1058
|
module.exports.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", });
|
|
899
1059
|
/**
|
|
900
1060
|
*/
|
|
1061
|
+
module.exports.LanguageKind = Object.freeze({ PlutusV1:0,"0":"PlutusV1",PlutusV2:1,"1":"PlutusV2",PlutusV3:2,"2":"PlutusV3", });
|
|
1062
|
+
/**
|
|
1063
|
+
*/
|
|
1064
|
+
module.exports.MIRPot = Object.freeze({ Reserves:0,"0":"Reserves",Treasury:1,"1":"Treasury", });
|
|
1065
|
+
/**
|
|
1066
|
+
*/
|
|
1067
|
+
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", });
|
|
1068
|
+
/**
|
|
1069
|
+
*/
|
|
1070
|
+
module.exports.CoinSelectionStrategyCIP2 = Object.freeze({
|
|
1071
|
+
/**
|
|
1072
|
+
* Performs CIP2's Largest First ada-only selection. Will error if outputs contain non-ADA assets.
|
|
1073
|
+
*/
|
|
1074
|
+
LargestFirst:0,"0":"LargestFirst",
|
|
1075
|
+
/**
|
|
1076
|
+
* Performs CIP2's Random Improve ada-only selection. Will error if outputs contain non-ADA assets.
|
|
1077
|
+
*/
|
|
1078
|
+
RandomImprove:1,"1":"RandomImprove",
|
|
1079
|
+
/**
|
|
1080
|
+
* Same as LargestFirst, but before adding ADA, will insert by largest-first for each asset type.
|
|
1081
|
+
*/
|
|
1082
|
+
LargestFirstMultiAsset:2,"2":"LargestFirstMultiAsset",
|
|
1083
|
+
/**
|
|
1084
|
+
* Same as RandomImprove, but before adding ADA, will insert by random-improve for each asset type.
|
|
1085
|
+
*/
|
|
1086
|
+
RandomImproveMultiAsset:3,"3":"RandomImproveMultiAsset", });
|
|
1087
|
+
/**
|
|
1088
|
+
*/
|
|
901
1089
|
module.exports.CredKind = Object.freeze({ Key:0,"0":"Key",Script:1,"1":"Script", });
|
|
902
1090
|
/**
|
|
903
1091
|
*/
|
|
904
|
-
module.exports.
|
|
1092
|
+
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",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", });
|
|
905
1093
|
/**
|
|
906
1094
|
*/
|
|
907
|
-
module.exports.
|
|
1095
|
+
module.exports.CborSetType = Object.freeze({ Tagged:0,"0":"Tagged",Untagged:1,"1":"Untagged", });
|
|
908
1096
|
/**
|
|
909
1097
|
*/
|
|
910
|
-
module.exports.
|
|
1098
|
+
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", });
|
|
911
1099
|
/**
|
|
912
1100
|
* JSON <-> PlutusData conversion schemas.
|
|
913
1101
|
* Follows ScriptDataJsonSchema in cardano-cli defined at:
|
|
@@ -961,70 +1149,19 @@ BasicConversions:0,"0":"BasicConversions",
|
|
|
961
1149
|
DetailedSchema:1,"1":"DetailedSchema", });
|
|
962
1150
|
/**
|
|
963
1151
|
*/
|
|
964
|
-
module.exports.RelayKind = Object.freeze({ SingleHostAddr:0,"0":"SingleHostAddr",SingleHostName:1,"1":"SingleHostName",MultiHostName:2,"2":"MultiHostName", });
|
|
965
|
-
/**
|
|
966
|
-
*/
|
|
967
|
-
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", });
|
|
968
|
-
/**
|
|
969
|
-
*/
|
|
970
|
-
module.exports.MIRKind = Object.freeze({ ToOtherPot:0,"0":"ToOtherPot",ToStakeCredentials:1,"1":"ToStakeCredentials", });
|
|
971
|
-
/**
|
|
972
|
-
*/
|
|
973
1152
|
module.exports.VoteKind = Object.freeze({ No:0,"0":"No",Yes:1,"1":"Yes",Abstain:2,"2":"Abstain", });
|
|
974
1153
|
/**
|
|
975
1154
|
*/
|
|
976
|
-
module.exports.
|
|
977
|
-
/**
|
|
978
|
-
* Each new language uses a different namespace for hashing its script
|
|
979
|
-
* This is because you could have a language where the same bytes have different semantics
|
|
980
|
-
* So this avoids scripts in different languages mapping to the same hash
|
|
981
|
-
* Note that the enum value here is different than the enum value for deciding the cost model of a script
|
|
982
|
-
*/
|
|
983
|
-
module.exports.ScriptHashNamespace = Object.freeze({ NativeScript:0,"0":"NativeScript",PlutusScript:1,"1":"PlutusScript",PlutusScriptV2:2,"2":"PlutusScriptV2",PlutusScriptV3:3,"3":"PlutusScriptV3", });
|
|
984
|
-
/**
|
|
985
|
-
*/
|
|
986
|
-
module.exports.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", });
|
|
987
|
-
/**
|
|
988
|
-
*/
|
|
989
|
-
module.exports.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", });
|
|
990
|
-
/**
|
|
991
|
-
*/
|
|
992
|
-
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",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", });
|
|
993
|
-
/**
|
|
994
|
-
*/
|
|
995
|
-
module.exports.CborSetType = Object.freeze({ Tagged:0,"0":"Tagged",Untagged:1,"1":"Untagged", });
|
|
996
|
-
/**
|
|
997
|
-
*/
|
|
998
|
-
module.exports.DRepKind = Object.freeze({ KeyHash:0,"0":"KeyHash",ScriptHash:1,"1":"ScriptHash",AlwaysAbstain:2,"2":"AlwaysAbstain",AlwaysNoConfidence:3,"3":"AlwaysNoConfidence", });
|
|
999
|
-
/**
|
|
1000
|
-
* Used to choosed the schema for a script JSON string
|
|
1001
|
-
*/
|
|
1002
|
-
module.exports.ScriptSchema = Object.freeze({ Wallet:0,"0":"Wallet",Node:1,"1":"Node", });
|
|
1003
|
-
/**
|
|
1004
|
-
*/
|
|
1005
|
-
module.exports.CborContainerType = Object.freeze({ Array:0,"0":"Array",Map:1,"1":"Map", });
|
|
1155
|
+
module.exports.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", });
|
|
1006
1156
|
/**
|
|
1007
1157
|
*/
|
|
1008
1158
|
module.exports.TransactionSetsState = Object.freeze({ AllSetsHaveTag:0,"0":"AllSetsHaveTag",AllSetsHaveNoTag:1,"1":"AllSetsHaveNoTag",MixedSets:2,"2":"MixedSets", });
|
|
1009
1159
|
/**
|
|
1010
1160
|
*/
|
|
1011
|
-
module.exports.
|
|
1012
|
-
/**
|
|
1013
|
-
* Performs CIP2's Largest First ada-only selection. Will error if outputs contain non-ADA assets.
|
|
1014
|
-
*/
|
|
1015
|
-
LargestFirst:0,"0":"LargestFirst",
|
|
1016
|
-
/**
|
|
1017
|
-
* Performs CIP2's Random Improve ada-only selection. Will error if outputs contain non-ADA assets.
|
|
1018
|
-
*/
|
|
1019
|
-
RandomImprove:1,"1":"RandomImprove",
|
|
1020
|
-
/**
|
|
1021
|
-
* Same as LargestFirst, but before adding ADA, will insert by largest-first for each asset type.
|
|
1022
|
-
*/
|
|
1023
|
-
LargestFirstMultiAsset:2,"2":"LargestFirstMultiAsset",
|
|
1161
|
+
module.exports.TransactionMetadatumKind = Object.freeze({ MetadataMap:0,"0":"MetadataMap",MetadataList:1,"1":"MetadataList",Int:2,"2":"Int",Bytes:3,"3":"Bytes",Text:4,"4":"Text", });
|
|
1024
1162
|
/**
|
|
1025
|
-
* Same as RandomImprove, but before adding ADA, will insert by random-improve for each asset type.
|
|
1026
1163
|
*/
|
|
1027
|
-
|
|
1164
|
+
module.exports.NetworkIdKind = Object.freeze({ Testnet:0,"0":"Testnet",Mainnet:1,"1":"Mainnet", });
|
|
1028
1165
|
|
|
1029
1166
|
const AddressFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
1030
1167
|
? { register: () => {}, unregister: () => {} }
|
|
@@ -4886,6 +5023,13 @@ class ByronAddress {
|
|
|
4886
5023
|
return ret >>> 0;
|
|
4887
5024
|
}
|
|
4888
5025
|
/**
|
|
5026
|
+
* @returns {ByronAddressType}
|
|
5027
|
+
*/
|
|
5028
|
+
byron_address_kind() {
|
|
5029
|
+
const ret = wasm.byronaddress_byron_address_kind(this.__wbg_ptr);
|
|
5030
|
+
return ret;
|
|
5031
|
+
}
|
|
5032
|
+
/**
|
|
4889
5033
|
* @returns {Uint8Array}
|
|
4890
5034
|
*/
|
|
4891
5035
|
attributes() {
|
|
@@ -7759,14 +7903,14 @@ class Credentials {
|
|
|
7759
7903
|
* @returns {Credentials}
|
|
7760
7904
|
*/
|
|
7761
7905
|
static new() {
|
|
7762
|
-
const ret = wasm.
|
|
7906
|
+
const ret = wasm.credentials_new();
|
|
7763
7907
|
return Credentials.__wrap(ret);
|
|
7764
7908
|
}
|
|
7765
7909
|
/**
|
|
7766
7910
|
* @returns {number}
|
|
7767
7911
|
*/
|
|
7768
7912
|
len() {
|
|
7769
|
-
const ret = wasm.
|
|
7913
|
+
const ret = wasm.credentials_len(this.__wbg_ptr);
|
|
7770
7914
|
return ret >>> 0;
|
|
7771
7915
|
}
|
|
7772
7916
|
/**
|
|
@@ -8390,7 +8534,7 @@ class DRep {
|
|
|
8390
8534
|
*/
|
|
8391
8535
|
static new_key_hash(key_hash) {
|
|
8392
8536
|
_assertClass(key_hash, Ed25519KeyHash);
|
|
8393
|
-
const ret = wasm.
|
|
8537
|
+
const ret = wasm.drep_new_key_hash(key_hash.__wbg_ptr);
|
|
8394
8538
|
return DRep.__wrap(ret);
|
|
8395
8539
|
}
|
|
8396
8540
|
/**
|
|
@@ -8399,7 +8543,7 @@ class DRep {
|
|
|
8399
8543
|
*/
|
|
8400
8544
|
static new_script_hash(script_hash) {
|
|
8401
8545
|
_assertClass(script_hash, ScriptHash);
|
|
8402
|
-
const ret = wasm.
|
|
8546
|
+
const ret = wasm.drep_new_script_hash(script_hash.__wbg_ptr);
|
|
8403
8547
|
return DRep.__wrap(ret);
|
|
8404
8548
|
}
|
|
8405
8549
|
/**
|
|
@@ -8447,14 +8591,15 @@ class DRep {
|
|
|
8447
8591
|
return ret === 0 ? undefined : ScriptHash.__wrap(ret);
|
|
8448
8592
|
}
|
|
8449
8593
|
/**
|
|
8594
|
+
* @param {boolean} cip_129_format
|
|
8450
8595
|
* @returns {string}
|
|
8451
8596
|
*/
|
|
8452
|
-
to_bech32() {
|
|
8597
|
+
to_bech32(cip_129_format) {
|
|
8453
8598
|
let deferred2_0;
|
|
8454
8599
|
let deferred2_1;
|
|
8455
8600
|
try {
|
|
8456
8601
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
8457
|
-
wasm.drep_to_bech32(retptr, this.__wbg_ptr);
|
|
8602
|
+
wasm.drep_to_bech32(retptr, this.__wbg_ptr, cip_129_format);
|
|
8458
8603
|
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
8459
8604
|
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
8460
8605
|
var r2 = getInt32Memory0()[retptr / 4 + 2];
|
|
@@ -8881,7 +9026,7 @@ class DRepRegistration {
|
|
|
8881
9026
|
* @returns {BigNum}
|
|
8882
9027
|
*/
|
|
8883
9028
|
coin() {
|
|
8884
|
-
const ret = wasm.
|
|
9029
|
+
const ret = wasm.drepregistration_coin(this.__wbg_ptr);
|
|
8885
9030
|
return BigNum.__wrap(ret);
|
|
8886
9031
|
}
|
|
8887
9032
|
/**
|
|
@@ -9098,14 +9243,14 @@ class DRepUpdate {
|
|
|
9098
9243
|
* @returns {Credential}
|
|
9099
9244
|
*/
|
|
9100
9245
|
voting_credential() {
|
|
9101
|
-
const ret = wasm.
|
|
9246
|
+
const ret = wasm.drepupdate_voting_credential(this.__wbg_ptr);
|
|
9102
9247
|
return Credential.__wrap(ret);
|
|
9103
9248
|
}
|
|
9104
9249
|
/**
|
|
9105
9250
|
* @returns {Anchor | undefined}
|
|
9106
9251
|
*/
|
|
9107
9252
|
anchor() {
|
|
9108
|
-
const ret = wasm.
|
|
9253
|
+
const ret = wasm.drepupdate_anchor(this.__wbg_ptr);
|
|
9109
9254
|
return ret === 0 ? undefined : Anchor.__wrap(ret);
|
|
9110
9255
|
}
|
|
9111
9256
|
/**
|
|
@@ -9114,7 +9259,7 @@ class DRepUpdate {
|
|
|
9114
9259
|
*/
|
|
9115
9260
|
static new(voting_credential) {
|
|
9116
9261
|
_assertClass(voting_credential, Credential);
|
|
9117
|
-
const ret = wasm.
|
|
9262
|
+
const ret = wasm.drepupdate_new(voting_credential.__wbg_ptr);
|
|
9118
9263
|
return DRepUpdate.__wrap(ret);
|
|
9119
9264
|
}
|
|
9120
9265
|
/**
|
|
@@ -9125,14 +9270,14 @@ class DRepUpdate {
|
|
|
9125
9270
|
static new_with_anchor(voting_credential, anchor) {
|
|
9126
9271
|
_assertClass(voting_credential, Credential);
|
|
9127
9272
|
_assertClass(anchor, Anchor);
|
|
9128
|
-
const ret = wasm.
|
|
9273
|
+
const ret = wasm.drepupdate_new_with_anchor(voting_credential.__wbg_ptr, anchor.__wbg_ptr);
|
|
9129
9274
|
return DRepUpdate.__wrap(ret);
|
|
9130
9275
|
}
|
|
9131
9276
|
/**
|
|
9132
9277
|
* @returns {boolean}
|
|
9133
9278
|
*/
|
|
9134
9279
|
has_script_credentials() {
|
|
9135
|
-
const ret = wasm.
|
|
9280
|
+
const ret = wasm.drepupdate_has_script_credentials(this.__wbg_ptr);
|
|
9136
9281
|
return ret !== 0;
|
|
9137
9282
|
}
|
|
9138
9283
|
}
|
|
@@ -9408,7 +9553,7 @@ class DRepVotingThresholds {
|
|
|
9408
9553
|
* @returns {UnitInterval}
|
|
9409
9554
|
*/
|
|
9410
9555
|
motion_no_confidence() {
|
|
9411
|
-
const ret = wasm.
|
|
9556
|
+
const ret = wasm.drepvotingthresholds_motion_no_confidence(this.__wbg_ptr);
|
|
9412
9557
|
return UnitInterval.__wrap(ret);
|
|
9413
9558
|
}
|
|
9414
9559
|
/**
|
|
@@ -9509,7 +9654,7 @@ class DataCost {
|
|
|
9509
9654
|
*/
|
|
9510
9655
|
static new_coins_per_byte(coins_per_byte) {
|
|
9511
9656
|
_assertClass(coins_per_byte, BigNum);
|
|
9512
|
-
const ret = wasm.
|
|
9657
|
+
const ret = wasm.datacost_coins_per_byte(coins_per_byte.__wbg_ptr);
|
|
9513
9658
|
return DataCost.__wrap(ret);
|
|
9514
9659
|
}
|
|
9515
9660
|
/**
|
|
@@ -10056,14 +10201,14 @@ class Ed25519KeyHashes {
|
|
|
10056
10201
|
* @returns {Ed25519KeyHashes}
|
|
10057
10202
|
*/
|
|
10058
10203
|
static new() {
|
|
10059
|
-
const ret = wasm.
|
|
10204
|
+
const ret = wasm.credentials_new();
|
|
10060
10205
|
return Ed25519KeyHashes.__wrap(ret);
|
|
10061
10206
|
}
|
|
10062
10207
|
/**
|
|
10063
10208
|
* @returns {number}
|
|
10064
10209
|
*/
|
|
10065
10210
|
len() {
|
|
10066
|
-
const ret = wasm.
|
|
10211
|
+
const ret = wasm.credentials_len(this.__wbg_ptr);
|
|
10067
10212
|
return ret >>> 0;
|
|
10068
10213
|
}
|
|
10069
10214
|
/**
|
|
@@ -10492,14 +10637,14 @@ class ExUnitPrices {
|
|
|
10492
10637
|
* @returns {UnitInterval}
|
|
10493
10638
|
*/
|
|
10494
10639
|
mem_price() {
|
|
10495
|
-
const ret = wasm.
|
|
10640
|
+
const ret = wasm.drepvotingthresholds_motion_no_confidence(this.__wbg_ptr);
|
|
10496
10641
|
return UnitInterval.__wrap(ret);
|
|
10497
10642
|
}
|
|
10498
10643
|
/**
|
|
10499
10644
|
* @returns {UnitInterval}
|
|
10500
10645
|
*/
|
|
10501
10646
|
step_price() {
|
|
10502
|
-
const ret = wasm.
|
|
10647
|
+
const ret = wasm.drepvotingthresholds_committee_normal(this.__wbg_ptr);
|
|
10503
10648
|
return UnitInterval.__wrap(ret);
|
|
10504
10649
|
}
|
|
10505
10650
|
/**
|
|
@@ -10689,7 +10834,7 @@ class ExUnits {
|
|
|
10689
10834
|
* @returns {BigNum}
|
|
10690
10835
|
*/
|
|
10691
10836
|
mem() {
|
|
10692
|
-
const ret = wasm.
|
|
10837
|
+
const ret = wasm.exunits_mem(this.__wbg_ptr);
|
|
10693
10838
|
return BigNum.__wrap(ret);
|
|
10694
10839
|
}
|
|
10695
10840
|
/**
|
|
@@ -13156,7 +13301,7 @@ class GovernanceActionIds {
|
|
|
13156
13301
|
* @returns {number}
|
|
13157
13302
|
*/
|
|
13158
13303
|
len() {
|
|
13159
|
-
const ret = wasm.
|
|
13304
|
+
const ret = wasm.governanceactionids_len(this.__wbg_ptr);
|
|
13160
13305
|
return ret >>> 0;
|
|
13161
13306
|
}
|
|
13162
13307
|
}
|
|
@@ -15717,7 +15862,7 @@ class MetadataList {
|
|
|
15717
15862
|
* @returns {number}
|
|
15718
15863
|
*/
|
|
15719
15864
|
len() {
|
|
15720
|
-
const ret = wasm.
|
|
15865
|
+
const ret = wasm.languages_len(this.__wbg_ptr);
|
|
15721
15866
|
return ret >>> 0;
|
|
15722
15867
|
}
|
|
15723
15868
|
/**
|
|
@@ -19894,7 +20039,7 @@ class PlutusList {
|
|
|
19894
20039
|
* @returns {number}
|
|
19895
20040
|
*/
|
|
19896
20041
|
len() {
|
|
19897
|
-
const ret = wasm.
|
|
20042
|
+
const ret = wasm.languages_len(this.__wbg_ptr);
|
|
19898
20043
|
return ret >>> 0;
|
|
19899
20044
|
}
|
|
19900
20045
|
/**
|
|
@@ -20102,7 +20247,7 @@ class PlutusMapValues {
|
|
|
20102
20247
|
* @returns {number}
|
|
20103
20248
|
*/
|
|
20104
20249
|
len() {
|
|
20105
|
-
const ret = wasm.
|
|
20250
|
+
const ret = wasm.languages_len(this.__wbg_ptr);
|
|
20106
20251
|
return ret >>> 0;
|
|
20107
20252
|
}
|
|
20108
20253
|
/**
|
|
@@ -20670,7 +20815,7 @@ class PlutusScripts {
|
|
|
20670
20815
|
* @returns {number}
|
|
20671
20816
|
*/
|
|
20672
20817
|
len() {
|
|
20673
|
-
const ret = wasm.
|
|
20818
|
+
const ret = wasm.credentials_len(this.__wbg_ptr);
|
|
20674
20819
|
return ret >>> 0;
|
|
20675
20820
|
}
|
|
20676
20821
|
/**
|
|
@@ -20819,14 +20964,14 @@ class PlutusWitnesses {
|
|
|
20819
20964
|
* @returns {PlutusWitnesses}
|
|
20820
20965
|
*/
|
|
20821
20966
|
static new() {
|
|
20822
|
-
const ret = wasm.
|
|
20967
|
+
const ret = wasm.costmodel_new();
|
|
20823
20968
|
return PlutusWitnesses.__wrap(ret);
|
|
20824
20969
|
}
|
|
20825
20970
|
/**
|
|
20826
20971
|
* @returns {number}
|
|
20827
20972
|
*/
|
|
20828
20973
|
len() {
|
|
20829
|
-
const ret = wasm.
|
|
20974
|
+
const ret = wasm.costmodel_len(this.__wbg_ptr);
|
|
20830
20975
|
return ret >>> 0;
|
|
20831
20976
|
}
|
|
20832
20977
|
/**
|
|
@@ -20971,7 +21116,7 @@ class Pointer {
|
|
|
20971
21116
|
* @returns {BigNum}
|
|
20972
21117
|
*/
|
|
20973
21118
|
cert_index_bignum() {
|
|
20974
|
-
const ret = wasm.
|
|
21119
|
+
const ret = wasm.pointer_cert_index_bignum(this.__wbg_ptr);
|
|
20975
21120
|
return BigNum.__wrap(ret);
|
|
20976
21121
|
}
|
|
20977
21122
|
}
|
|
@@ -22247,7 +22392,7 @@ class PoolVotingThresholds {
|
|
|
22247
22392
|
* @returns {UnitInterval}
|
|
22248
22393
|
*/
|
|
22249
22394
|
motion_no_confidence() {
|
|
22250
|
-
const ret = wasm.
|
|
22395
|
+
const ret = wasm.drepvotingthresholds_motion_no_confidence(this.__wbg_ptr);
|
|
22251
22396
|
return UnitInterval.__wrap(ret);
|
|
22252
22397
|
}
|
|
22253
22398
|
/**
|
|
@@ -23814,7 +23959,7 @@ class PublicKeys {
|
|
|
23814
23959
|
/**
|
|
23815
23960
|
*/
|
|
23816
23961
|
constructor() {
|
|
23817
|
-
const ret = wasm.
|
|
23962
|
+
const ret = wasm.publickeys_new();
|
|
23818
23963
|
this.__wbg_ptr = ret >>> 0;
|
|
23819
23964
|
return this;
|
|
23820
23965
|
}
|
|
@@ -23822,7 +23967,7 @@ class PublicKeys {
|
|
|
23822
23967
|
* @returns {number}
|
|
23823
23968
|
*/
|
|
23824
23969
|
size() {
|
|
23825
|
-
const ret = wasm.
|
|
23970
|
+
const ret = wasm.governanceactionids_len(this.__wbg_ptr);
|
|
23826
23971
|
return ret >>> 0;
|
|
23827
23972
|
}
|
|
23828
23973
|
/**
|
|
@@ -27928,14 +28073,14 @@ class StakeRegistration {
|
|
|
27928
28073
|
* @returns {Credential}
|
|
27929
28074
|
*/
|
|
27930
28075
|
stake_credential() {
|
|
27931
|
-
const ret = wasm.
|
|
28076
|
+
const ret = wasm.stakeregistration_stake_credential(this.__wbg_ptr);
|
|
27932
28077
|
return Credential.__wrap(ret);
|
|
27933
28078
|
}
|
|
27934
28079
|
/**
|
|
27935
28080
|
* @returns {BigNum | undefined}
|
|
27936
28081
|
*/
|
|
27937
28082
|
coin() {
|
|
27938
|
-
const ret = wasm.
|
|
28083
|
+
const ret = wasm.stakeregistration_coin(this.__wbg_ptr);
|
|
27939
28084
|
return ret === 0 ? undefined : BigNum.__wrap(ret);
|
|
27940
28085
|
}
|
|
27941
28086
|
/**
|
|
@@ -27944,7 +28089,7 @@ class StakeRegistration {
|
|
|
27944
28089
|
*/
|
|
27945
28090
|
static new(stake_credential) {
|
|
27946
28091
|
_assertClass(stake_credential, Credential);
|
|
27947
|
-
const ret = wasm.
|
|
28092
|
+
const ret = wasm.stakeregistration_new(stake_credential.__wbg_ptr);
|
|
27948
28093
|
return StakeRegistration.__wrap(ret);
|
|
27949
28094
|
}
|
|
27950
28095
|
/**
|
|
@@ -27955,14 +28100,14 @@ class StakeRegistration {
|
|
|
27955
28100
|
static new_with_explicit_deposit(stake_credential, coin) {
|
|
27956
28101
|
_assertClass(stake_credential, Credential);
|
|
27957
28102
|
_assertClass(coin, BigNum);
|
|
27958
|
-
const ret = wasm.
|
|
28103
|
+
const ret = wasm.stakeregistration_new_with_explicit_deposit(stake_credential.__wbg_ptr, coin.__wbg_ptr);
|
|
27959
28104
|
return StakeRegistration.__wrap(ret);
|
|
27960
28105
|
}
|
|
27961
28106
|
/**
|
|
27962
28107
|
* @returns {boolean}
|
|
27963
28108
|
*/
|
|
27964
28109
|
has_script_credentials() {
|
|
27965
|
-
const ret = wasm.
|
|
28110
|
+
const ret = wasm.stakeregistration_has_script_credentials(this.__wbg_ptr);
|
|
27966
28111
|
return ret !== 0;
|
|
27967
28112
|
}
|
|
27968
28113
|
}
|
|
@@ -28155,7 +28300,7 @@ class StakeRegistrationAndDelegation {
|
|
|
28155
28300
|
* @returns {BigNum}
|
|
28156
28301
|
*/
|
|
28157
28302
|
coin() {
|
|
28158
|
-
const ret = wasm.
|
|
28303
|
+
const ret = wasm.drepderegistration_coin(this.__wbg_ptr);
|
|
28159
28304
|
return BigNum.__wrap(ret);
|
|
28160
28305
|
}
|
|
28161
28306
|
/**
|
|
@@ -28375,7 +28520,7 @@ class StakeVoteRegistrationAndDelegation {
|
|
|
28375
28520
|
* @returns {BigNum}
|
|
28376
28521
|
*/
|
|
28377
28522
|
coin() {
|
|
28378
|
-
const ret = wasm.
|
|
28523
|
+
const ret = wasm.drepderegistration_coin(this.__wbg_ptr);
|
|
28379
28524
|
return BigNum.__wrap(ret);
|
|
28380
28525
|
}
|
|
28381
28526
|
/**
|
|
@@ -28433,14 +28578,14 @@ class Strings {
|
|
|
28433
28578
|
* @returns {Strings}
|
|
28434
28579
|
*/
|
|
28435
28580
|
static new() {
|
|
28436
|
-
const ret = wasm.
|
|
28581
|
+
const ret = wasm.strings_new();
|
|
28437
28582
|
return Strings.__wrap(ret);
|
|
28438
28583
|
}
|
|
28439
28584
|
/**
|
|
28440
28585
|
* @returns {number}
|
|
28441
28586
|
*/
|
|
28442
28587
|
len() {
|
|
28443
|
-
const ret = wasm.
|
|
28588
|
+
const ret = wasm.costmdls_len(this.__wbg_ptr);
|
|
28444
28589
|
return ret >>> 0;
|
|
28445
28590
|
}
|
|
28446
28591
|
/**
|
|
@@ -29165,7 +29310,7 @@ class TransactionBatch {
|
|
|
29165
29310
|
* @returns {number}
|
|
29166
29311
|
*/
|
|
29167
29312
|
len() {
|
|
29168
|
-
const ret = wasm.
|
|
29313
|
+
const ret = wasm.governanceactionids_len(this.__wbg_ptr);
|
|
29169
29314
|
return ret >>> 0;
|
|
29170
29315
|
}
|
|
29171
29316
|
/**
|
|
@@ -29209,7 +29354,7 @@ class TransactionBatchList {
|
|
|
29209
29354
|
* @returns {number}
|
|
29210
29355
|
*/
|
|
29211
29356
|
len() {
|
|
29212
|
-
const ret = wasm.
|
|
29357
|
+
const ret = wasm.governanceactionids_len(this.__wbg_ptr);
|
|
29213
29358
|
return ret >>> 0;
|
|
29214
29359
|
}
|
|
29215
29360
|
/**
|
|
@@ -31253,6 +31398,16 @@ class TransactionBuilderConfigBuilder {
|
|
|
31253
31398
|
return TransactionBuilderConfigBuilder.__wrap(ret);
|
|
31254
31399
|
}
|
|
31255
31400
|
/**
|
|
31401
|
+
*If set to true, the transaction builder will not burn extra change if it's impossible to crate change output
|
|
31402
|
+
*due to the value being too small to cover min ada for change output. Instead, tx builder will throw an error.
|
|
31403
|
+
* @param {boolean} do_not_burn_extra_change
|
|
31404
|
+
* @returns {TransactionBuilderConfigBuilder}
|
|
31405
|
+
*/
|
|
31406
|
+
do_not_burn_extra_change(do_not_burn_extra_change) {
|
|
31407
|
+
const ret = wasm.transactionbuilderconfigbuilder_do_not_burn_extra_change(this.__wbg_ptr, do_not_burn_extra_change);
|
|
31408
|
+
return TransactionBuilderConfigBuilder.__wrap(ret);
|
|
31409
|
+
}
|
|
31410
|
+
/**
|
|
31256
31411
|
* @returns {TransactionBuilderConfig}
|
|
31257
31412
|
*/
|
|
31258
31413
|
build() {
|
|
@@ -31806,7 +31961,7 @@ class TransactionInputs {
|
|
|
31806
31961
|
* @returns {number}
|
|
31807
31962
|
*/
|
|
31808
31963
|
len() {
|
|
31809
|
-
const ret = wasm.
|
|
31964
|
+
const ret = wasm.governanceactionids_len(this.__wbg_ptr);
|
|
31810
31965
|
return ret >>> 0;
|
|
31811
31966
|
}
|
|
31812
31967
|
/**
|
|
@@ -32236,7 +32391,7 @@ class TransactionMetadatumLabels {
|
|
|
32236
32391
|
* @returns {number}
|
|
32237
32392
|
*/
|
|
32238
32393
|
len() {
|
|
32239
|
-
const ret = wasm.
|
|
32394
|
+
const ret = wasm.languages_len(this.__wbg_ptr);
|
|
32240
32395
|
return ret >>> 0;
|
|
32241
32396
|
}
|
|
32242
32397
|
/**
|
|
@@ -33682,7 +33837,7 @@ class TransactionWitnessSets {
|
|
|
33682
33837
|
* @returns {number}
|
|
33683
33838
|
*/
|
|
33684
33839
|
len() {
|
|
33685
|
-
const ret = wasm.
|
|
33840
|
+
const ret = wasm.governanceactionids_len(this.__wbg_ptr);
|
|
33686
33841
|
return ret >>> 0;
|
|
33687
33842
|
}
|
|
33688
33843
|
/**
|
|
@@ -33762,218 +33917,7 @@ class TreasuryWithdrawals {
|
|
|
33762
33917
|
to_js_value() {
|
|
33763
33918
|
try {
|
|
33764
33919
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
33765
|
-
wasm.treasurywithdrawals_to_js_value(retptr, this.__wbg_ptr);
|
|
33766
|
-
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
33767
|
-
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
33768
|
-
var r2 = getInt32Memory0()[retptr / 4 + 2];
|
|
33769
|
-
if (r2) {
|
|
33770
|
-
throw takeObject(r1);
|
|
33771
|
-
}
|
|
33772
|
-
return takeObject(r0);
|
|
33773
|
-
} finally {
|
|
33774
|
-
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
33775
|
-
}
|
|
33776
|
-
}
|
|
33777
|
-
/**
|
|
33778
|
-
* @param {string} json
|
|
33779
|
-
* @returns {TreasuryWithdrawals}
|
|
33780
|
-
*/
|
|
33781
|
-
static from_json(json) {
|
|
33782
|
-
try {
|
|
33783
|
-
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
33784
|
-
const ptr0 = passStringToWasm0(json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
33785
|
-
const len0 = WASM_VECTOR_LEN;
|
|
33786
|
-
wasm.treasurywithdrawals_from_json(retptr, ptr0, len0);
|
|
33787
|
-
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
33788
|
-
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
33789
|
-
var r2 = getInt32Memory0()[retptr / 4 + 2];
|
|
33790
|
-
if (r2) {
|
|
33791
|
-
throw takeObject(r1);
|
|
33792
|
-
}
|
|
33793
|
-
return TreasuryWithdrawals.__wrap(r0);
|
|
33794
|
-
} finally {
|
|
33795
|
-
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
33796
|
-
}
|
|
33797
|
-
}
|
|
33798
|
-
/**
|
|
33799
|
-
* @returns {TreasuryWithdrawals}
|
|
33800
|
-
*/
|
|
33801
|
-
static new() {
|
|
33802
|
-
const ret = wasm.treasurywithdrawals_new();
|
|
33803
|
-
return TreasuryWithdrawals.__wrap(ret);
|
|
33804
|
-
}
|
|
33805
|
-
/**
|
|
33806
|
-
* @param {RewardAddress} key
|
|
33807
|
-
* @returns {BigNum | undefined}
|
|
33808
|
-
*/
|
|
33809
|
-
get(key) {
|
|
33810
|
-
_assertClass(key, RewardAddress);
|
|
33811
|
-
const ret = wasm.treasurywithdrawals_get(this.__wbg_ptr, key.__wbg_ptr);
|
|
33812
|
-
return ret === 0 ? undefined : BigNum.__wrap(ret);
|
|
33813
|
-
}
|
|
33814
|
-
/**
|
|
33815
|
-
* @param {RewardAddress} key
|
|
33816
|
-
* @param {BigNum} value
|
|
33817
|
-
*/
|
|
33818
|
-
insert(key, value) {
|
|
33819
|
-
_assertClass(key, RewardAddress);
|
|
33820
|
-
_assertClass(value, BigNum);
|
|
33821
|
-
wasm.treasurywithdrawals_insert(this.__wbg_ptr, key.__wbg_ptr, value.__wbg_ptr);
|
|
33822
|
-
}
|
|
33823
|
-
/**
|
|
33824
|
-
* @returns {RewardAddresses}
|
|
33825
|
-
*/
|
|
33826
|
-
keys() {
|
|
33827
|
-
const ret = wasm.treasurywithdrawals_keys(this.__wbg_ptr);
|
|
33828
|
-
return RewardAddresses.__wrap(ret);
|
|
33829
|
-
}
|
|
33830
|
-
/**
|
|
33831
|
-
* @returns {number}
|
|
33832
|
-
*/
|
|
33833
|
-
len() {
|
|
33834
|
-
const ret = wasm.costmodel_len(this.__wbg_ptr);
|
|
33835
|
-
return ret >>> 0;
|
|
33836
|
-
}
|
|
33837
|
-
}
|
|
33838
|
-
module.exports.TreasuryWithdrawals = TreasuryWithdrawals;
|
|
33839
|
-
|
|
33840
|
-
const TreasuryWithdrawalsActionFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
33841
|
-
? { register: () => {}, unregister: () => {} }
|
|
33842
|
-
: new FinalizationRegistry(ptr => wasm.__wbg_treasurywithdrawalsaction_free(ptr >>> 0));
|
|
33843
|
-
/**
|
|
33844
|
-
*/
|
|
33845
|
-
class TreasuryWithdrawalsAction {
|
|
33846
|
-
|
|
33847
|
-
static __wrap(ptr) {
|
|
33848
|
-
ptr = ptr >>> 0;
|
|
33849
|
-
const obj = Object.create(TreasuryWithdrawalsAction.prototype);
|
|
33850
|
-
obj.__wbg_ptr = ptr;
|
|
33851
|
-
TreasuryWithdrawalsActionFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
33852
|
-
return obj;
|
|
33853
|
-
}
|
|
33854
|
-
|
|
33855
|
-
__destroy_into_raw() {
|
|
33856
|
-
const ptr = this.__wbg_ptr;
|
|
33857
|
-
this.__wbg_ptr = 0;
|
|
33858
|
-
TreasuryWithdrawalsActionFinalization.unregister(this);
|
|
33859
|
-
return ptr;
|
|
33860
|
-
}
|
|
33861
|
-
|
|
33862
|
-
free() {
|
|
33863
|
-
const ptr = this.__destroy_into_raw();
|
|
33864
|
-
wasm.__wbg_treasurywithdrawalsaction_free(ptr);
|
|
33865
|
-
}
|
|
33866
|
-
/**
|
|
33867
|
-
* @returns {Uint8Array}
|
|
33868
|
-
*/
|
|
33869
|
-
to_bytes() {
|
|
33870
|
-
try {
|
|
33871
|
-
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
33872
|
-
wasm.treasurywithdrawalsaction_to_bytes(retptr, this.__wbg_ptr);
|
|
33873
|
-
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
33874
|
-
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
33875
|
-
var v1 = getArrayU8FromWasm0(r0, r1).slice();
|
|
33876
|
-
wasm.__wbindgen_free(r0, r1 * 1, 1);
|
|
33877
|
-
return v1;
|
|
33878
|
-
} finally {
|
|
33879
|
-
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
33880
|
-
}
|
|
33881
|
-
}
|
|
33882
|
-
/**
|
|
33883
|
-
* @param {Uint8Array} bytes
|
|
33884
|
-
* @returns {TreasuryWithdrawalsAction}
|
|
33885
|
-
*/
|
|
33886
|
-
static from_bytes(bytes) {
|
|
33887
|
-
try {
|
|
33888
|
-
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
33889
|
-
const ptr0 = passArray8ToWasm0(bytes, wasm.__wbindgen_malloc);
|
|
33890
|
-
const len0 = WASM_VECTOR_LEN;
|
|
33891
|
-
wasm.treasurywithdrawalsaction_from_bytes(retptr, ptr0, len0);
|
|
33892
|
-
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
33893
|
-
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
33894
|
-
var r2 = getInt32Memory0()[retptr / 4 + 2];
|
|
33895
|
-
if (r2) {
|
|
33896
|
-
throw takeObject(r1);
|
|
33897
|
-
}
|
|
33898
|
-
return TreasuryWithdrawalsAction.__wrap(r0);
|
|
33899
|
-
} finally {
|
|
33900
|
-
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
33901
|
-
}
|
|
33902
|
-
}
|
|
33903
|
-
/**
|
|
33904
|
-
* @returns {string}
|
|
33905
|
-
*/
|
|
33906
|
-
to_hex() {
|
|
33907
|
-
let deferred1_0;
|
|
33908
|
-
let deferred1_1;
|
|
33909
|
-
try {
|
|
33910
|
-
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
33911
|
-
wasm.treasurywithdrawalsaction_to_hex(retptr, this.__wbg_ptr);
|
|
33912
|
-
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
33913
|
-
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
33914
|
-
deferred1_0 = r0;
|
|
33915
|
-
deferred1_1 = r1;
|
|
33916
|
-
return getStringFromWasm0(r0, r1);
|
|
33917
|
-
} finally {
|
|
33918
|
-
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
33919
|
-
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
33920
|
-
}
|
|
33921
|
-
}
|
|
33922
|
-
/**
|
|
33923
|
-
* @param {string} hex_str
|
|
33924
|
-
* @returns {TreasuryWithdrawalsAction}
|
|
33925
|
-
*/
|
|
33926
|
-
static from_hex(hex_str) {
|
|
33927
|
-
try {
|
|
33928
|
-
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
33929
|
-
const ptr0 = passStringToWasm0(hex_str, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
33930
|
-
const len0 = WASM_VECTOR_LEN;
|
|
33931
|
-
wasm.treasurywithdrawalsaction_from_hex(retptr, ptr0, len0);
|
|
33932
|
-
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
33933
|
-
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
33934
|
-
var r2 = getInt32Memory0()[retptr / 4 + 2];
|
|
33935
|
-
if (r2) {
|
|
33936
|
-
throw takeObject(r1);
|
|
33937
|
-
}
|
|
33938
|
-
return TreasuryWithdrawalsAction.__wrap(r0);
|
|
33939
|
-
} finally {
|
|
33940
|
-
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
33941
|
-
}
|
|
33942
|
-
}
|
|
33943
|
-
/**
|
|
33944
|
-
* @returns {string}
|
|
33945
|
-
*/
|
|
33946
|
-
to_json() {
|
|
33947
|
-
let deferred2_0;
|
|
33948
|
-
let deferred2_1;
|
|
33949
|
-
try {
|
|
33950
|
-
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
33951
|
-
wasm.treasurywithdrawalsaction_to_json(retptr, this.__wbg_ptr);
|
|
33952
|
-
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
33953
|
-
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
33954
|
-
var r2 = getInt32Memory0()[retptr / 4 + 2];
|
|
33955
|
-
var r3 = getInt32Memory0()[retptr / 4 + 3];
|
|
33956
|
-
var ptr1 = r0;
|
|
33957
|
-
var len1 = r1;
|
|
33958
|
-
if (r3) {
|
|
33959
|
-
ptr1 = 0; len1 = 0;
|
|
33960
|
-
throw takeObject(r2);
|
|
33961
|
-
}
|
|
33962
|
-
deferred2_0 = ptr1;
|
|
33963
|
-
deferred2_1 = len1;
|
|
33964
|
-
return getStringFromWasm0(ptr1, len1);
|
|
33965
|
-
} finally {
|
|
33966
|
-
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
33967
|
-
wasm.__wbindgen_free(deferred2_0, deferred2_1, 1);
|
|
33968
|
-
}
|
|
33969
|
-
}
|
|
33970
|
-
/**
|
|
33971
|
-
* @returns {any}
|
|
33972
|
-
*/
|
|
33973
|
-
to_js_value() {
|
|
33974
|
-
try {
|
|
33975
|
-
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
33976
|
-
wasm.treasurywithdrawalsaction_to_js_value(retptr, this.__wbg_ptr);
|
|
33920
|
+
wasm.treasurywithdrawals_to_js_value(retptr, this.__wbg_ptr);
|
|
33977
33921
|
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
33978
33922
|
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
33979
33923
|
var r2 = getInt32Memory0()[retptr / 4 + 2];
|
|
@@ -33987,21 +33931,21 @@ class TreasuryWithdrawalsAction {
|
|
|
33987
33931
|
}
|
|
33988
33932
|
/**
|
|
33989
33933
|
* @param {string} json
|
|
33990
|
-
* @returns {
|
|
33934
|
+
* @returns {TreasuryWithdrawals}
|
|
33991
33935
|
*/
|
|
33992
33936
|
static from_json(json) {
|
|
33993
33937
|
try {
|
|
33994
33938
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
33995
33939
|
const ptr0 = passStringToWasm0(json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
33996
33940
|
const len0 = WASM_VECTOR_LEN;
|
|
33997
|
-
wasm.
|
|
33941
|
+
wasm.treasurywithdrawals_from_json(retptr, ptr0, len0);
|
|
33998
33942
|
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
33999
33943
|
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
34000
33944
|
var r2 = getInt32Memory0()[retptr / 4 + 2];
|
|
34001
33945
|
if (r2) {
|
|
34002
33946
|
throw takeObject(r1);
|
|
34003
33947
|
}
|
|
34004
|
-
return
|
|
33948
|
+
return TreasuryWithdrawals.__wrap(r0);
|
|
34005
33949
|
} finally {
|
|
34006
33950
|
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
34007
33951
|
}
|
|
@@ -34009,88 +33953,250 @@ class TreasuryWithdrawalsAction {
|
|
|
34009
33953
|
/**
|
|
34010
33954
|
* @returns {TreasuryWithdrawals}
|
|
34011
33955
|
*/
|
|
34012
|
-
|
|
34013
|
-
const ret = wasm.
|
|
33956
|
+
static new() {
|
|
33957
|
+
const ret = wasm.treasurywithdrawals_new();
|
|
34014
33958
|
return TreasuryWithdrawals.__wrap(ret);
|
|
34015
33959
|
}
|
|
34016
33960
|
/**
|
|
34017
|
-
* @
|
|
33961
|
+
* @param {RewardAddress} key
|
|
33962
|
+
* @returns {BigNum | undefined}
|
|
34018
33963
|
*/
|
|
34019
|
-
|
|
34020
|
-
|
|
34021
|
-
|
|
33964
|
+
get(key) {
|
|
33965
|
+
_assertClass(key, RewardAddress);
|
|
33966
|
+
const ret = wasm.treasurywithdrawals_get(this.__wbg_ptr, key.__wbg_ptr);
|
|
33967
|
+
return ret === 0 ? undefined : BigNum.__wrap(ret);
|
|
34022
33968
|
}
|
|
34023
33969
|
/**
|
|
34024
|
-
* @param {
|
|
34025
|
-
* @
|
|
33970
|
+
* @param {RewardAddress} key
|
|
33971
|
+
* @param {BigNum} value
|
|
34026
33972
|
*/
|
|
34027
|
-
|
|
34028
|
-
_assertClass(
|
|
34029
|
-
|
|
34030
|
-
|
|
33973
|
+
insert(key, value) {
|
|
33974
|
+
_assertClass(key, RewardAddress);
|
|
33975
|
+
_assertClass(value, BigNum);
|
|
33976
|
+
wasm.treasurywithdrawals_insert(this.__wbg_ptr, key.__wbg_ptr, value.__wbg_ptr);
|
|
34031
33977
|
}
|
|
34032
33978
|
/**
|
|
34033
|
-
* @
|
|
34034
|
-
* @param {ScriptHash} policy_hash
|
|
34035
|
-
* @returns {TreasuryWithdrawalsAction}
|
|
33979
|
+
* @returns {RewardAddresses}
|
|
34036
33980
|
*/
|
|
34037
|
-
|
|
34038
|
-
|
|
34039
|
-
|
|
34040
|
-
|
|
34041
|
-
|
|
33981
|
+
keys() {
|
|
33982
|
+
const ret = wasm.treasurywithdrawals_keys(this.__wbg_ptr);
|
|
33983
|
+
return RewardAddresses.__wrap(ret);
|
|
33984
|
+
}
|
|
33985
|
+
/**
|
|
33986
|
+
* @returns {number}
|
|
33987
|
+
*/
|
|
33988
|
+
len() {
|
|
33989
|
+
const ret = wasm.costmodel_len(this.__wbg_ptr);
|
|
33990
|
+
return ret >>> 0;
|
|
34042
33991
|
}
|
|
34043
33992
|
}
|
|
34044
|
-
module.exports.
|
|
33993
|
+
module.exports.TreasuryWithdrawals = TreasuryWithdrawals;
|
|
34045
33994
|
|
|
34046
|
-
const
|
|
33995
|
+
const TreasuryWithdrawalsActionFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
34047
33996
|
? { register: () => {}, unregister: () => {} }
|
|
34048
|
-
: new FinalizationRegistry(ptr => wasm.
|
|
33997
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_treasurywithdrawalsaction_free(ptr >>> 0));
|
|
34049
33998
|
/**
|
|
34050
33999
|
*/
|
|
34051
|
-
class
|
|
34000
|
+
class TreasuryWithdrawalsAction {
|
|
34001
|
+
|
|
34002
|
+
static __wrap(ptr) {
|
|
34003
|
+
ptr = ptr >>> 0;
|
|
34004
|
+
const obj = Object.create(TreasuryWithdrawalsAction.prototype);
|
|
34005
|
+
obj.__wbg_ptr = ptr;
|
|
34006
|
+
TreasuryWithdrawalsActionFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
34007
|
+
return obj;
|
|
34008
|
+
}
|
|
34052
34009
|
|
|
34053
34010
|
__destroy_into_raw() {
|
|
34054
34011
|
const ptr = this.__wbg_ptr;
|
|
34055
34012
|
this.__wbg_ptr = 0;
|
|
34056
|
-
|
|
34013
|
+
TreasuryWithdrawalsActionFinalization.unregister(this);
|
|
34057
34014
|
return ptr;
|
|
34058
34015
|
}
|
|
34059
34016
|
|
|
34060
34017
|
free() {
|
|
34061
34018
|
const ptr = this.__destroy_into_raw();
|
|
34062
|
-
wasm.
|
|
34019
|
+
wasm.__wbg_treasurywithdrawalsaction_free(ptr);
|
|
34063
34020
|
}
|
|
34064
34021
|
/**
|
|
34065
|
-
* @returns {
|
|
34022
|
+
* @returns {Uint8Array}
|
|
34066
34023
|
*/
|
|
34067
|
-
|
|
34068
|
-
|
|
34069
|
-
|
|
34024
|
+
to_bytes() {
|
|
34025
|
+
try {
|
|
34026
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
34027
|
+
wasm.treasurywithdrawalsaction_to_bytes(retptr, this.__wbg_ptr);
|
|
34028
|
+
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
34029
|
+
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
34030
|
+
var v1 = getArrayU8FromWasm0(r0, r1).slice();
|
|
34031
|
+
wasm.__wbindgen_free(r0, r1 * 1, 1);
|
|
34032
|
+
return v1;
|
|
34033
|
+
} finally {
|
|
34034
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
34035
|
+
}
|
|
34070
34036
|
}
|
|
34071
34037
|
/**
|
|
34072
|
-
* @
|
|
34038
|
+
* @param {Uint8Array} bytes
|
|
34039
|
+
* @returns {TreasuryWithdrawalsAction}
|
|
34073
34040
|
*/
|
|
34074
|
-
static
|
|
34075
|
-
|
|
34076
|
-
|
|
34041
|
+
static from_bytes(bytes) {
|
|
34042
|
+
try {
|
|
34043
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
34044
|
+
const ptr0 = passArray8ToWasm0(bytes, wasm.__wbindgen_malloc);
|
|
34045
|
+
const len0 = WASM_VECTOR_LEN;
|
|
34046
|
+
wasm.treasurywithdrawalsaction_from_bytes(retptr, ptr0, len0);
|
|
34047
|
+
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
34048
|
+
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
34049
|
+
var r2 = getInt32Memory0()[retptr / 4 + 2];
|
|
34050
|
+
if (r2) {
|
|
34051
|
+
throw takeObject(r1);
|
|
34052
|
+
}
|
|
34053
|
+
return TreasuryWithdrawalsAction.__wrap(r0);
|
|
34054
|
+
} finally {
|
|
34055
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
34056
|
+
}
|
|
34077
34057
|
}
|
|
34078
34058
|
/**
|
|
34079
|
-
* @returns {
|
|
34059
|
+
* @returns {string}
|
|
34080
34060
|
*/
|
|
34081
|
-
|
|
34082
|
-
|
|
34083
|
-
|
|
34061
|
+
to_hex() {
|
|
34062
|
+
let deferred1_0;
|
|
34063
|
+
let deferred1_1;
|
|
34064
|
+
try {
|
|
34065
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
34066
|
+
wasm.treasurywithdrawalsaction_to_hex(retptr, this.__wbg_ptr);
|
|
34067
|
+
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
34068
|
+
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
34069
|
+
deferred1_0 = r0;
|
|
34070
|
+
deferred1_1 = r1;
|
|
34071
|
+
return getStringFromWasm0(r0, r1);
|
|
34072
|
+
} finally {
|
|
34073
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
34074
|
+
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
34075
|
+
}
|
|
34084
34076
|
}
|
|
34085
34077
|
/**
|
|
34086
|
-
* @
|
|
34078
|
+
* @param {string} hex_str
|
|
34079
|
+
* @returns {TreasuryWithdrawalsAction}
|
|
34087
34080
|
*/
|
|
34088
|
-
static
|
|
34089
|
-
|
|
34090
|
-
|
|
34081
|
+
static from_hex(hex_str) {
|
|
34082
|
+
try {
|
|
34083
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
34084
|
+
const ptr0 = passStringToWasm0(hex_str, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
34085
|
+
const len0 = WASM_VECTOR_LEN;
|
|
34086
|
+
wasm.treasurywithdrawalsaction_from_hex(retptr, ptr0, len0);
|
|
34087
|
+
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
34088
|
+
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
34089
|
+
var r2 = getInt32Memory0()[retptr / 4 + 2];
|
|
34090
|
+
if (r2) {
|
|
34091
|
+
throw takeObject(r1);
|
|
34092
|
+
}
|
|
34093
|
+
return TreasuryWithdrawalsAction.__wrap(r0);
|
|
34094
|
+
} finally {
|
|
34095
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
34096
|
+
}
|
|
34097
|
+
}
|
|
34098
|
+
/**
|
|
34099
|
+
* @returns {string}
|
|
34100
|
+
*/
|
|
34101
|
+
to_json() {
|
|
34102
|
+
let deferred2_0;
|
|
34103
|
+
let deferred2_1;
|
|
34104
|
+
try {
|
|
34105
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
34106
|
+
wasm.treasurywithdrawalsaction_to_json(retptr, this.__wbg_ptr);
|
|
34107
|
+
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
34108
|
+
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
34109
|
+
var r2 = getInt32Memory0()[retptr / 4 + 2];
|
|
34110
|
+
var r3 = getInt32Memory0()[retptr / 4 + 3];
|
|
34111
|
+
var ptr1 = r0;
|
|
34112
|
+
var len1 = r1;
|
|
34113
|
+
if (r3) {
|
|
34114
|
+
ptr1 = 0; len1 = 0;
|
|
34115
|
+
throw takeObject(r2);
|
|
34116
|
+
}
|
|
34117
|
+
deferred2_0 = ptr1;
|
|
34118
|
+
deferred2_1 = len1;
|
|
34119
|
+
return getStringFromWasm0(ptr1, len1);
|
|
34120
|
+
} finally {
|
|
34121
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
34122
|
+
wasm.__wbindgen_free(deferred2_0, deferred2_1, 1);
|
|
34123
|
+
}
|
|
34124
|
+
}
|
|
34125
|
+
/**
|
|
34126
|
+
* @returns {any}
|
|
34127
|
+
*/
|
|
34128
|
+
to_js_value() {
|
|
34129
|
+
try {
|
|
34130
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
34131
|
+
wasm.treasurywithdrawalsaction_to_js_value(retptr, this.__wbg_ptr);
|
|
34132
|
+
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
34133
|
+
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
34134
|
+
var r2 = getInt32Memory0()[retptr / 4 + 2];
|
|
34135
|
+
if (r2) {
|
|
34136
|
+
throw takeObject(r1);
|
|
34137
|
+
}
|
|
34138
|
+
return takeObject(r0);
|
|
34139
|
+
} finally {
|
|
34140
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
34141
|
+
}
|
|
34142
|
+
}
|
|
34143
|
+
/**
|
|
34144
|
+
* @param {string} json
|
|
34145
|
+
* @returns {TreasuryWithdrawalsAction}
|
|
34146
|
+
*/
|
|
34147
|
+
static from_json(json) {
|
|
34148
|
+
try {
|
|
34149
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
34150
|
+
const ptr0 = passStringToWasm0(json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
34151
|
+
const len0 = WASM_VECTOR_LEN;
|
|
34152
|
+
wasm.treasurywithdrawalsaction_from_json(retptr, ptr0, len0);
|
|
34153
|
+
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
34154
|
+
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
34155
|
+
var r2 = getInt32Memory0()[retptr / 4 + 2];
|
|
34156
|
+
if (r2) {
|
|
34157
|
+
throw takeObject(r1);
|
|
34158
|
+
}
|
|
34159
|
+
return TreasuryWithdrawalsAction.__wrap(r0);
|
|
34160
|
+
} finally {
|
|
34161
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
34162
|
+
}
|
|
34163
|
+
}
|
|
34164
|
+
/**
|
|
34165
|
+
* @returns {TreasuryWithdrawals}
|
|
34166
|
+
*/
|
|
34167
|
+
withdrawals() {
|
|
34168
|
+
const ret = wasm.treasurywithdrawalsaction_withdrawals(this.__wbg_ptr);
|
|
34169
|
+
return TreasuryWithdrawals.__wrap(ret);
|
|
34170
|
+
}
|
|
34171
|
+
/**
|
|
34172
|
+
* @returns {ScriptHash | undefined}
|
|
34173
|
+
*/
|
|
34174
|
+
policy_hash() {
|
|
34175
|
+
const ret = wasm.treasurywithdrawalsaction_policy_hash(this.__wbg_ptr);
|
|
34176
|
+
return ret === 0 ? undefined : ScriptHash.__wrap(ret);
|
|
34177
|
+
}
|
|
34178
|
+
/**
|
|
34179
|
+
* @param {TreasuryWithdrawals} withdrawals
|
|
34180
|
+
* @returns {TreasuryWithdrawalsAction}
|
|
34181
|
+
*/
|
|
34182
|
+
static new(withdrawals) {
|
|
34183
|
+
_assertClass(withdrawals, TreasuryWithdrawals);
|
|
34184
|
+
const ret = wasm.treasurywithdrawalsaction_new(withdrawals.__wbg_ptr);
|
|
34185
|
+
return TreasuryWithdrawalsAction.__wrap(ret);
|
|
34186
|
+
}
|
|
34187
|
+
/**
|
|
34188
|
+
* @param {TreasuryWithdrawals} withdrawals
|
|
34189
|
+
* @param {ScriptHash} policy_hash
|
|
34190
|
+
* @returns {TreasuryWithdrawalsAction}
|
|
34191
|
+
*/
|
|
34192
|
+
static new_with_policy_hash(withdrawals, policy_hash) {
|
|
34193
|
+
_assertClass(withdrawals, TreasuryWithdrawals);
|
|
34194
|
+
_assertClass(policy_hash, ScriptHash);
|
|
34195
|
+
const ret = wasm.treasurywithdrawalsaction_new_with_policy_hash(withdrawals.__wbg_ptr, policy_hash.__wbg_ptr);
|
|
34196
|
+
return TreasuryWithdrawalsAction.__wrap(ret);
|
|
34091
34197
|
}
|
|
34092
34198
|
}
|
|
34093
|
-
module.exports.
|
|
34199
|
+
module.exports.TreasuryWithdrawalsAction = TreasuryWithdrawalsAction;
|
|
34094
34200
|
|
|
34095
34201
|
const TxInputsBuilderFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
34096
34202
|
? { register: () => {}, unregister: () => {} }
|
|
@@ -34126,6 +34232,61 @@ class TxInputsBuilder {
|
|
|
34126
34232
|
return TxInputsBuilder.__wrap(ret);
|
|
34127
34233
|
}
|
|
34128
34234
|
/**
|
|
34235
|
+
* @param {TransactionUnspentOutput} utxo
|
|
34236
|
+
*/
|
|
34237
|
+
add_regular_utxo(utxo) {
|
|
34238
|
+
try {
|
|
34239
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
34240
|
+
_assertClass(utxo, TransactionUnspentOutput);
|
|
34241
|
+
wasm.txinputsbuilder_add_regular_utxo(retptr, this.__wbg_ptr, utxo.__wbg_ptr);
|
|
34242
|
+
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
34243
|
+
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
34244
|
+
if (r1) {
|
|
34245
|
+
throw takeObject(r0);
|
|
34246
|
+
}
|
|
34247
|
+
} finally {
|
|
34248
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
34249
|
+
}
|
|
34250
|
+
}
|
|
34251
|
+
/**
|
|
34252
|
+
* @param {TransactionUnspentOutput} utxo
|
|
34253
|
+
* @param {PlutusWitness} witness
|
|
34254
|
+
*/
|
|
34255
|
+
add_plutus_script_utxo(utxo, witness) {
|
|
34256
|
+
try {
|
|
34257
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
34258
|
+
_assertClass(utxo, TransactionUnspentOutput);
|
|
34259
|
+
_assertClass(witness, PlutusWitness);
|
|
34260
|
+
wasm.txinputsbuilder_add_plutus_script_utxo(retptr, this.__wbg_ptr, utxo.__wbg_ptr, witness.__wbg_ptr);
|
|
34261
|
+
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
34262
|
+
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
34263
|
+
if (r1) {
|
|
34264
|
+
throw takeObject(r0);
|
|
34265
|
+
}
|
|
34266
|
+
} finally {
|
|
34267
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
34268
|
+
}
|
|
34269
|
+
}
|
|
34270
|
+
/**
|
|
34271
|
+
* @param {TransactionUnspentOutput} utxo
|
|
34272
|
+
* @param {NativeScriptSource} witness
|
|
34273
|
+
*/
|
|
34274
|
+
add_native_script_utxo(utxo, witness) {
|
|
34275
|
+
try {
|
|
34276
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
34277
|
+
_assertClass(utxo, TransactionUnspentOutput);
|
|
34278
|
+
_assertClass(witness, NativeScriptSource);
|
|
34279
|
+
wasm.txinputsbuilder_add_native_script_utxo(retptr, this.__wbg_ptr, utxo.__wbg_ptr, witness.__wbg_ptr);
|
|
34280
|
+
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
34281
|
+
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
34282
|
+
if (r1) {
|
|
34283
|
+
throw takeObject(r0);
|
|
34284
|
+
}
|
|
34285
|
+
} finally {
|
|
34286
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
34287
|
+
}
|
|
34288
|
+
}
|
|
34289
|
+
/**
|
|
34129
34290
|
* We have to know what kind of inputs these are to know what kind of mock witnesses to create since
|
|
34130
34291
|
* 1) mock witnesses have different lengths depending on the type which changes the expecting fee
|
|
34131
34292
|
* 2) Witnesses are a set so we need to get rid of duplicates to avoid over-estimating the fee
|
|
@@ -34668,7 +34829,7 @@ class UnitInterval {
|
|
|
34668
34829
|
* @returns {BigNum}
|
|
34669
34830
|
*/
|
|
34670
34831
|
denominator() {
|
|
34671
|
-
const ret = wasm.
|
|
34832
|
+
const ret = wasm.unitinterval_denominator(this.__wbg_ptr);
|
|
34672
34833
|
return BigNum.__wrap(ret);
|
|
34673
34834
|
}
|
|
34674
34835
|
/**
|
|
@@ -34679,7 +34840,7 @@ class UnitInterval {
|
|
|
34679
34840
|
static new(numerator, denominator) {
|
|
34680
34841
|
_assertClass(numerator, BigNum);
|
|
34681
34842
|
_assertClass(denominator, BigNum);
|
|
34682
|
-
const ret = wasm.
|
|
34843
|
+
const ret = wasm.unitinterval_new(numerator.__wbg_ptr, denominator.__wbg_ptr);
|
|
34683
34844
|
return UnitInterval.__wrap(ret);
|
|
34684
34845
|
}
|
|
34685
34846
|
}
|
|
@@ -36364,7 +36525,7 @@ class Vkeys {
|
|
|
36364
36525
|
* @returns {number}
|
|
36365
36526
|
*/
|
|
36366
36527
|
len() {
|
|
36367
|
-
const ret = wasm.
|
|
36528
|
+
const ret = wasm.costmodel_len(this.__wbg_ptr);
|
|
36368
36529
|
return ret >>> 0;
|
|
36369
36530
|
}
|
|
36370
36531
|
/**
|
|
@@ -36960,14 +37121,14 @@ class VoteDelegation {
|
|
|
36960
37121
|
* @returns {Credential}
|
|
36961
37122
|
*/
|
|
36962
37123
|
stake_credential() {
|
|
36963
|
-
const ret = wasm.
|
|
37124
|
+
const ret = wasm.stakeandvotedelegation_stake_credential(this.__wbg_ptr);
|
|
36964
37125
|
return Credential.__wrap(ret);
|
|
36965
37126
|
}
|
|
36966
37127
|
/**
|
|
36967
37128
|
* @returns {DRep}
|
|
36968
37129
|
*/
|
|
36969
37130
|
drep() {
|
|
36970
|
-
const ret = wasm.
|
|
37131
|
+
const ret = wasm.stakeandvotedelegation_drep(this.__wbg_ptr);
|
|
36971
37132
|
return DRep.__wrap(ret);
|
|
36972
37133
|
}
|
|
36973
37134
|
/**
|
|
@@ -36985,7 +37146,7 @@ class VoteDelegation {
|
|
|
36985
37146
|
* @returns {boolean}
|
|
36986
37147
|
*/
|
|
36987
37148
|
has_script_credentials() {
|
|
36988
|
-
const ret = wasm.
|
|
37149
|
+
const ret = wasm.stakeandvotedelegation_has_script_credentials(this.__wbg_ptr);
|
|
36989
37150
|
return ret !== 0;
|
|
36990
37151
|
}
|
|
36991
37152
|
}
|
|
@@ -37164,7 +37325,7 @@ class VoteRegistrationAndDelegation {
|
|
|
37164
37325
|
* @returns {Credential}
|
|
37165
37326
|
*/
|
|
37166
37327
|
stake_credential() {
|
|
37167
|
-
const ret = wasm.
|
|
37328
|
+
const ret = wasm.drepderegistration_voting_credential(this.__wbg_ptr);
|
|
37168
37329
|
return Credential.__wrap(ret);
|
|
37169
37330
|
}
|
|
37170
37331
|
/**
|
|
@@ -37178,7 +37339,7 @@ class VoteRegistrationAndDelegation {
|
|
|
37178
37339
|
* @returns {BigNum}
|
|
37179
37340
|
*/
|
|
37180
37341
|
coin() {
|
|
37181
|
-
const ret = wasm.
|
|
37342
|
+
const ret = wasm.drepderegistration_coin(this.__wbg_ptr);
|
|
37182
37343
|
return BigNum.__wrap(ret);
|
|
37183
37344
|
}
|
|
37184
37345
|
/**
|
|
@@ -37198,7 +37359,7 @@ class VoteRegistrationAndDelegation {
|
|
|
37198
37359
|
* @returns {boolean}
|
|
37199
37360
|
*/
|
|
37200
37361
|
has_script_credentials() {
|
|
37201
|
-
const ret = wasm.
|
|
37362
|
+
const ret = wasm.drepderegistration_has_script_credentials(this.__wbg_ptr);
|
|
37202
37363
|
return ret !== 0;
|
|
37203
37364
|
}
|
|
37204
37365
|
}
|
|
@@ -37541,7 +37702,7 @@ class Voters {
|
|
|
37541
37702
|
* @returns {Voters}
|
|
37542
37703
|
*/
|
|
37543
37704
|
static new() {
|
|
37544
|
-
const ret = wasm.
|
|
37705
|
+
const ret = wasm.voters_new();
|
|
37545
37706
|
return Voters.__wrap(ret);
|
|
37546
37707
|
}
|
|
37547
37708
|
/**
|
|
@@ -37563,7 +37724,7 @@ class Voters {
|
|
|
37563
37724
|
* @returns {number}
|
|
37564
37725
|
*/
|
|
37565
37726
|
len() {
|
|
37566
|
-
const ret = wasm.
|
|
37727
|
+
const ret = wasm.relays_len(this.__wbg_ptr);
|
|
37567
37728
|
return ret >>> 0;
|
|
37568
37729
|
}
|
|
37569
37730
|
}
|
|
@@ -37599,7 +37760,7 @@ class VotingBuilder {
|
|
|
37599
37760
|
* @returns {VotingBuilder}
|
|
37600
37761
|
*/
|
|
37601
37762
|
static new() {
|
|
37602
|
-
const ret = wasm.
|
|
37763
|
+
const ret = wasm.votingbuilder_new();
|
|
37603
37764
|
return VotingBuilder.__wrap(ret);
|
|
37604
37765
|
}
|
|
37605
37766
|
/**
|
|
@@ -38084,7 +38245,7 @@ class VotingProcedures {
|
|
|
38084
38245
|
* @returns {VotingProcedures}
|
|
38085
38246
|
*/
|
|
38086
38247
|
static new() {
|
|
38087
|
-
const ret = wasm.
|
|
38248
|
+
const ret = wasm.costmdls_new();
|
|
38088
38249
|
return VotingProcedures.__wrap(ret);
|
|
38089
38250
|
}
|
|
38090
38251
|
/**
|
|
@@ -38616,14 +38777,14 @@ class VotingProposals {
|
|
|
38616
38777
|
* @returns {VotingProposals}
|
|
38617
38778
|
*/
|
|
38618
38779
|
static new() {
|
|
38619
|
-
const ret = wasm.
|
|
38780
|
+
const ret = wasm.credentials_new();
|
|
38620
38781
|
return VotingProposals.__wrap(ret);
|
|
38621
38782
|
}
|
|
38622
38783
|
/**
|
|
38623
38784
|
* @returns {number}
|
|
38624
38785
|
*/
|
|
38625
38786
|
len() {
|
|
38626
|
-
const ret = wasm.
|
|
38787
|
+
const ret = wasm.credentials_len(this.__wbg_ptr);
|
|
38627
38788
|
return ret >>> 0;
|
|
38628
38789
|
}
|
|
38629
38790
|
/**
|
|
@@ -39051,6 +39212,21 @@ module.exports.__wbindgen_in = function(arg0, arg1) {
|
|
|
39051
39212
|
return ret;
|
|
39052
39213
|
};
|
|
39053
39214
|
|
|
39215
|
+
module.exports.__wbindgen_is_bigint = function(arg0) {
|
|
39216
|
+
const ret = typeof(getObject(arg0)) === 'bigint';
|
|
39217
|
+
return ret;
|
|
39218
|
+
};
|
|
39219
|
+
|
|
39220
|
+
module.exports.__wbindgen_bigint_from_i64 = function(arg0) {
|
|
39221
|
+
const ret = arg0;
|
|
39222
|
+
return addHeapObject(ret);
|
|
39223
|
+
};
|
|
39224
|
+
|
|
39225
|
+
module.exports.__wbindgen_jsval_eq = function(arg0, arg1) {
|
|
39226
|
+
const ret = getObject(arg0) === getObject(arg1);
|
|
39227
|
+
return ret;
|
|
39228
|
+
};
|
|
39229
|
+
|
|
39054
39230
|
module.exports.__wbindgen_is_string = function(arg0) {
|
|
39055
39231
|
const ret = typeof(getObject(arg0)) === 'string';
|
|
39056
39232
|
return ret;
|
|
@@ -39193,6 +39369,36 @@ module.exports.__wbg_new_d9bc3a0147634640 = function() {
|
|
|
39193
39369
|
return addHeapObject(ret);
|
|
39194
39370
|
};
|
|
39195
39371
|
|
|
39372
|
+
module.exports.__wbg_next_40fc327bfc8770e6 = function(arg0) {
|
|
39373
|
+
const ret = getObject(arg0).next;
|
|
39374
|
+
return addHeapObject(ret);
|
|
39375
|
+
};
|
|
39376
|
+
|
|
39377
|
+
module.exports.__wbg_next_196c84450b364254 = function() { return handleError(function (arg0) {
|
|
39378
|
+
const ret = getObject(arg0).next();
|
|
39379
|
+
return addHeapObject(ret);
|
|
39380
|
+
}, arguments) };
|
|
39381
|
+
|
|
39382
|
+
module.exports.__wbg_done_298b57d23c0fc80c = function(arg0) {
|
|
39383
|
+
const ret = getObject(arg0).done;
|
|
39384
|
+
return ret;
|
|
39385
|
+
};
|
|
39386
|
+
|
|
39387
|
+
module.exports.__wbg_value_d93c65011f51a456 = function(arg0) {
|
|
39388
|
+
const ret = getObject(arg0).value;
|
|
39389
|
+
return addHeapObject(ret);
|
|
39390
|
+
};
|
|
39391
|
+
|
|
39392
|
+
module.exports.__wbg_iterator_2cee6dadfd956dfa = function() {
|
|
39393
|
+
const ret = Symbol.iterator;
|
|
39394
|
+
return addHeapObject(ret);
|
|
39395
|
+
};
|
|
39396
|
+
|
|
39397
|
+
module.exports.__wbg_get_e3c254076557e348 = function() { return handleError(function (arg0, arg1) {
|
|
39398
|
+
const ret = Reflect.get(getObject(arg0), getObject(arg1));
|
|
39399
|
+
return addHeapObject(ret);
|
|
39400
|
+
}, arguments) };
|
|
39401
|
+
|
|
39196
39402
|
module.exports.__wbg_call_27c0f87801dedf93 = function() { return handleError(function (arg0, arg1) {
|
|
39197
39403
|
const ret = getObject(arg0).call(getObject(arg1));
|
|
39198
39404
|
return addHeapObject(ret);
|
|
@@ -39227,6 +39433,11 @@ module.exports.__wbg_set_d4638f722068f043 = function(arg0, arg1, arg2) {
|
|
|
39227
39433
|
getObject(arg0)[arg1 >>> 0] = takeObject(arg2);
|
|
39228
39434
|
};
|
|
39229
39435
|
|
|
39436
|
+
module.exports.__wbg_isArray_2ab64d95e09ea0ae = function(arg0) {
|
|
39437
|
+
const ret = Array.isArray(getObject(arg0));
|
|
39438
|
+
return ret;
|
|
39439
|
+
};
|
|
39440
|
+
|
|
39230
39441
|
module.exports.__wbg_instanceof_ArrayBuffer_836825be07d4c9d2 = function(arg0) {
|
|
39231
39442
|
let result;
|
|
39232
39443
|
try {
|
|
@@ -39313,11 +39524,6 @@ module.exports.__wbg_call_eae29933372a39be = function(arg0, arg1) {
|
|
|
39313
39524
|
return addHeapObject(ret);
|
|
39314
39525
|
};
|
|
39315
39526
|
|
|
39316
|
-
module.exports.__wbindgen_jsval_eq = function(arg0, arg1) {
|
|
39317
|
-
const ret = getObject(arg0) === getObject(arg1);
|
|
39318
|
-
return ret;
|
|
39319
|
-
};
|
|
39320
|
-
|
|
39321
39527
|
module.exports.__wbg_self_e0b3266d2d9eba1a = function(arg0) {
|
|
39322
39528
|
const ret = getObject(arg0).self;
|
|
39323
39529
|
return addHeapObject(ret);
|
|
@@ -39346,6 +39552,13 @@ module.exports.__wbg_getRandomValues_02639197c8166a96 = function(arg0, arg1, arg
|
|
|
39346
39552
|
getObject(arg0).getRandomValues(getArrayU8FromWasm0(arg1, arg2));
|
|
39347
39553
|
};
|
|
39348
39554
|
|
|
39555
|
+
module.exports.__wbindgen_bigint_get_as_i64 = function(arg0, arg1) {
|
|
39556
|
+
const v = getObject(arg1);
|
|
39557
|
+
const ret = typeof(v) === 'bigint' ? v : undefined;
|
|
39558
|
+
getBigInt64Memory0()[arg0 / 8 + 1] = isLikeNone(ret) ? BigInt(0) : ret;
|
|
39559
|
+
getInt32Memory0()[arg0 / 4 + 0] = !isLikeNone(ret);
|
|
39560
|
+
};
|
|
39561
|
+
|
|
39349
39562
|
module.exports.__wbindgen_debug_string = function(arg0, arg1) {
|
|
39350
39563
|
const ret = debugString(getObject(arg1));
|
|
39351
39564
|
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|