bulk-keychain-wasm 0.1.22 → 0.1.25
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/bulk_keychain_wasm.d.ts +51 -51
- package/bulk_keychain_wasm.js +216 -138
- package/bulk_keychain_wasm_bg.wasm +0 -0
- package/package.json +2 -2
package/bulk_keychain_wasm.js
CHANGED
|
@@ -243,11 +243,19 @@ export class WasmPreparedMessage {
|
|
|
243
243
|
}
|
|
244
244
|
/**
|
|
245
245
|
* Get the nonce
|
|
246
|
-
* @returns {
|
|
246
|
+
* @returns {string}
|
|
247
247
|
*/
|
|
248
248
|
get nonce() {
|
|
249
|
-
|
|
250
|
-
|
|
249
|
+
let deferred1_0;
|
|
250
|
+
let deferred1_1;
|
|
251
|
+
try {
|
|
252
|
+
const ret = wasm.wasmpreparedmessage_nonce(this.__wbg_ptr);
|
|
253
|
+
deferred1_0 = ret[0];
|
|
254
|
+
deferred1_1 = ret[1];
|
|
255
|
+
return getStringFromWasm0(ret[0], ret[1]);
|
|
256
|
+
} finally {
|
|
257
|
+
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
258
|
+
}
|
|
251
259
|
}
|
|
252
260
|
/**
|
|
253
261
|
* Get the pre-computed order ID (single-order tx only)
|
|
@@ -257,7 +265,7 @@ export class WasmPreparedMessage {
|
|
|
257
265
|
const ret = wasm.wasmpreparedmessage_orderId(this.__wbg_ptr);
|
|
258
266
|
let v1;
|
|
259
267
|
if (ret[0] !== 0) {
|
|
260
|
-
v1 = getStringFromWasm0(ret[0], ret[1])
|
|
268
|
+
v1 = getStringFromWasm0(ret[0], ret[1]);
|
|
261
269
|
wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
|
|
262
270
|
}
|
|
263
271
|
return v1;
|
|
@@ -270,7 +278,7 @@ export class WasmPreparedMessage {
|
|
|
270
278
|
const ret = wasm.wasmpreparedmessage_orderIds(this.__wbg_ptr);
|
|
271
279
|
let v1;
|
|
272
280
|
if (ret[0] !== 0) {
|
|
273
|
-
v1 = getArrayJsValueFromWasm0(ret[0], ret[1])
|
|
281
|
+
v1 = getArrayJsValueFromWasm0(ret[0], ret[1]);
|
|
274
282
|
wasm.__wbindgen_free(ret[0], ret[1] * 4, 4);
|
|
275
283
|
}
|
|
276
284
|
return v1;
|
|
@@ -397,11 +405,13 @@ export class WasmSigner {
|
|
|
397
405
|
/**
|
|
398
406
|
* Sign a single order/cancel/cancelAll
|
|
399
407
|
* @param {any} order
|
|
400
|
-
* @param {
|
|
408
|
+
* @param {string | null} [nonce]
|
|
401
409
|
* @returns {any}
|
|
402
410
|
*/
|
|
403
411
|
sign(order, nonce) {
|
|
404
|
-
|
|
412
|
+
var ptr0 = isLikeNone(nonce) ? 0 : passStringToWasm0(nonce, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
413
|
+
var len0 = WASM_VECTOR_LEN;
|
|
414
|
+
const ret = wasm.wasmsigner_sign(this.__wbg_ptr, order, ptr0, len0);
|
|
405
415
|
if (ret[2]) {
|
|
406
416
|
throw takeFromExternrefTable0(ret[1]);
|
|
407
417
|
}
|
|
@@ -411,13 +421,15 @@ export class WasmSigner {
|
|
|
411
421
|
* Sign agent wallet creation/deletion
|
|
412
422
|
* @param {string} agent_pubkey
|
|
413
423
|
* @param {boolean} _delete
|
|
414
|
-
* @param {
|
|
424
|
+
* @param {string | null} [nonce]
|
|
415
425
|
* @returns {any}
|
|
416
426
|
*/
|
|
417
427
|
signAgentWallet(agent_pubkey, _delete, nonce) {
|
|
418
428
|
const ptr0 = passStringToWasm0(agent_pubkey, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
419
429
|
const len0 = WASM_VECTOR_LEN;
|
|
420
|
-
|
|
430
|
+
var ptr1 = isLikeNone(nonce) ? 0 : passStringToWasm0(nonce, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
431
|
+
var len1 = WASM_VECTOR_LEN;
|
|
432
|
+
const ret = wasm.wasmsigner_signAgentWallet(this.__wbg_ptr, ptr0, len0, _delete, ptr1, len1);
|
|
421
433
|
if (ret[2]) {
|
|
422
434
|
throw takeFromExternrefTable0(ret[1]);
|
|
423
435
|
}
|
|
@@ -426,11 +438,13 @@ export class WasmSigner {
|
|
|
426
438
|
/**
|
|
427
439
|
* Sign multiple orders - each becomes its own transaction (parallel)
|
|
428
440
|
* @param {any} orders
|
|
429
|
-
* @param {
|
|
441
|
+
* @param {string | null} [base_nonce]
|
|
430
442
|
* @returns {any}
|
|
431
443
|
*/
|
|
432
444
|
signAll(orders, base_nonce) {
|
|
433
|
-
|
|
445
|
+
var ptr0 = isLikeNone(base_nonce) ? 0 : passStringToWasm0(base_nonce, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
446
|
+
var len0 = WASM_VECTOR_LEN;
|
|
447
|
+
const ret = wasm.wasmsigner_signAll(this.__wbg_ptr, orders, ptr0, len0);
|
|
434
448
|
if (ret[2]) {
|
|
435
449
|
throw takeFromExternrefTable0(ret[1]);
|
|
436
450
|
}
|
|
@@ -440,13 +454,15 @@ export class WasmSigner {
|
|
|
440
454
|
* Sign builder-code recipient approval (`abc`)
|
|
441
455
|
* @param {string} to_pubkey
|
|
442
456
|
* @param {number} fee
|
|
443
|
-
* @param {
|
|
457
|
+
* @param {string | null} [nonce]
|
|
444
458
|
* @returns {any}
|
|
445
459
|
*/
|
|
446
460
|
signApproveBuilderCode(to_pubkey, fee, nonce) {
|
|
447
461
|
const ptr0 = passStringToWasm0(to_pubkey, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
448
462
|
const len0 = WASM_VECTOR_LEN;
|
|
449
|
-
|
|
463
|
+
var ptr1 = isLikeNone(nonce) ? 0 : passStringToWasm0(nonce, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
464
|
+
var len1 = WASM_VECTOR_LEN;
|
|
465
|
+
const ret = wasm.wasmsigner_signApproveBuilderCode(this.__wbg_ptr, ptr0, len0, fee, ptr1, len1);
|
|
450
466
|
if (ret[2]) {
|
|
451
467
|
throw takeFromExternrefTable0(ret[1]);
|
|
452
468
|
}
|
|
@@ -456,13 +472,15 @@ export class WasmSigner {
|
|
|
456
472
|
* Sign builder-code recipient approval (`abc`)
|
|
457
473
|
* @param {string} to_pubkey
|
|
458
474
|
* @param {number} fee
|
|
459
|
-
* @param {
|
|
475
|
+
* @param {string | null} [nonce]
|
|
460
476
|
* @returns {any}
|
|
461
477
|
*/
|
|
462
478
|
signApproveCommissionFee(to_pubkey, fee, nonce) {
|
|
463
479
|
const ptr0 = passStringToWasm0(to_pubkey, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
464
480
|
const len0 = WASM_VECTOR_LEN;
|
|
465
|
-
|
|
481
|
+
var ptr1 = isLikeNone(nonce) ? 0 : passStringToWasm0(nonce, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
482
|
+
var len1 = WASM_VECTOR_LEN;
|
|
483
|
+
const ret = wasm.wasmsigner_signApproveCommissionFee(this.__wbg_ptr, ptr0, len0, fee, ptr1, len1);
|
|
466
484
|
if (ret[2]) {
|
|
467
485
|
throw takeFromExternrefTable0(ret[1]);
|
|
468
486
|
}
|
|
@@ -493,11 +511,13 @@ export class WasmSigner {
|
|
|
493
511
|
* @param {number} threshold
|
|
494
512
|
* @param {number | null} [time_lock_secs]
|
|
495
513
|
* @param {number | null} [proposal_lifetime_secs]
|
|
496
|
-
* @param {
|
|
514
|
+
* @param {string | null} [nonce]
|
|
497
515
|
* @returns {any}
|
|
498
516
|
*/
|
|
499
517
|
signCreateMultisig(signers, threshold, time_lock_secs, proposal_lifetime_secs, nonce) {
|
|
500
|
-
|
|
518
|
+
var ptr0 = isLikeNone(nonce) ? 0 : passStringToWasm0(nonce, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
519
|
+
var len0 = WASM_VECTOR_LEN;
|
|
520
|
+
const ret = wasm.wasmsigner_signCreateMultisig(this.__wbg_ptr, signers, threshold, isLikeNone(time_lock_secs) ? Number.MAX_SAFE_INTEGER : (time_lock_secs) >>> 0, isLikeNone(proposal_lifetime_secs) ? Number.MAX_SAFE_INTEGER : (proposal_lifetime_secs) >>> 0, ptr0, len0);
|
|
501
521
|
if (ret[2]) {
|
|
502
522
|
throw takeFromExternrefTable0(ret[1]);
|
|
503
523
|
}
|
|
@@ -507,13 +527,15 @@ export class WasmSigner {
|
|
|
507
527
|
* Sign a sub-account creation (optional initial margin transfer)
|
|
508
528
|
* @param {string} name
|
|
509
529
|
* @param {number | null} [margin_amount]
|
|
510
|
-
* @param {
|
|
530
|
+
* @param {string | null} [nonce]
|
|
511
531
|
* @returns {any}
|
|
512
532
|
*/
|
|
513
533
|
signCreateSubAccount(name, margin_amount, nonce) {
|
|
514
534
|
const ptr0 = passStringToWasm0(name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
515
535
|
const len0 = WASM_VECTOR_LEN;
|
|
516
|
-
|
|
536
|
+
var ptr1 = isLikeNone(nonce) ? 0 : passStringToWasm0(nonce, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
537
|
+
var len1 = WASM_VECTOR_LEN;
|
|
538
|
+
const ret = wasm.wasmsigner_signCreateSubAccount(this.__wbg_ptr, ptr0, len0, !isLikeNone(margin_amount), isLikeNone(margin_amount) ? 0 : margin_amount, ptr1, len1);
|
|
517
539
|
if (ret[2]) {
|
|
518
540
|
throw takeFromExternrefTable0(ret[1]);
|
|
519
541
|
}
|
|
@@ -521,11 +543,13 @@ export class WasmSigner {
|
|
|
521
543
|
}
|
|
522
544
|
/**
|
|
523
545
|
* Sign a faucet request (testnet only)
|
|
524
|
-
* @param {
|
|
546
|
+
* @param {string | null} [nonce]
|
|
525
547
|
* @returns {any}
|
|
526
548
|
*/
|
|
527
549
|
signFaucet(nonce) {
|
|
528
|
-
|
|
550
|
+
var ptr0 = isLikeNone(nonce) ? 0 : passStringToWasm0(nonce, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
551
|
+
var len0 = WASM_VECTOR_LEN;
|
|
552
|
+
const ret = wasm.wasmsigner_signFaucet(this.__wbg_ptr, ptr0, len0);
|
|
529
553
|
if (ret[2]) {
|
|
530
554
|
throw takeFromExternrefTable0(ret[1]);
|
|
531
555
|
}
|
|
@@ -534,11 +558,13 @@ export class WasmSigner {
|
|
|
534
558
|
/**
|
|
535
559
|
* Sign multiple orders atomically in ONE transaction
|
|
536
560
|
* @param {any} orders
|
|
537
|
-
* @param {
|
|
561
|
+
* @param {string | null} [nonce]
|
|
538
562
|
* @returns {any}
|
|
539
563
|
*/
|
|
540
564
|
signGroup(orders, nonce) {
|
|
541
|
-
|
|
565
|
+
var ptr0 = isLikeNone(nonce) ? 0 : passStringToWasm0(nonce, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
566
|
+
var len0 = WASM_VECTOR_LEN;
|
|
567
|
+
const ret = wasm.wasmsigner_signGroup(this.__wbg_ptr, orders, ptr0, len0);
|
|
542
568
|
if (ret[2]) {
|
|
543
569
|
throw takeFromExternrefTable0(ret[1]);
|
|
544
570
|
}
|
|
@@ -548,13 +574,15 @@ export class WasmSigner {
|
|
|
548
574
|
* Sign a multisig approval
|
|
549
575
|
* @param {string} multisig
|
|
550
576
|
* @param {number} proposal_id
|
|
551
|
-
* @param {
|
|
577
|
+
* @param {string | null} [nonce]
|
|
552
578
|
* @returns {any}
|
|
553
579
|
*/
|
|
554
580
|
signMultisigApprove(multisig, proposal_id, nonce) {
|
|
555
581
|
const ptr0 = passStringToWasm0(multisig, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
556
582
|
const len0 = WASM_VECTOR_LEN;
|
|
557
|
-
|
|
583
|
+
var ptr1 = isLikeNone(nonce) ? 0 : passStringToWasm0(nonce, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
584
|
+
var len1 = WASM_VECTOR_LEN;
|
|
585
|
+
const ret = wasm.wasmsigner_signMultisigApprove(this.__wbg_ptr, ptr0, len0, proposal_id, ptr1, len1);
|
|
558
586
|
if (ret[2]) {
|
|
559
587
|
throw takeFromExternrefTable0(ret[1]);
|
|
560
588
|
}
|
|
@@ -564,13 +592,15 @@ export class WasmSigner {
|
|
|
564
592
|
* Sign a multisig cancellation
|
|
565
593
|
* @param {string} multisig
|
|
566
594
|
* @param {number} proposal_id
|
|
567
|
-
* @param {
|
|
595
|
+
* @param {string | null} [nonce]
|
|
568
596
|
* @returns {any}
|
|
569
597
|
*/
|
|
570
598
|
signMultisigCancel(multisig, proposal_id, nonce) {
|
|
571
599
|
const ptr0 = passStringToWasm0(multisig, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
572
600
|
const len0 = WASM_VECTOR_LEN;
|
|
573
|
-
|
|
601
|
+
var ptr1 = isLikeNone(nonce) ? 0 : passStringToWasm0(nonce, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
602
|
+
var len1 = WASM_VECTOR_LEN;
|
|
603
|
+
const ret = wasm.wasmsigner_signMultisigCancel(this.__wbg_ptr, ptr0, len0, proposal_id, ptr1, len1);
|
|
574
604
|
if (ret[2]) {
|
|
575
605
|
throw takeFromExternrefTable0(ret[1]);
|
|
576
606
|
}
|
|
@@ -580,13 +610,15 @@ export class WasmSigner {
|
|
|
580
610
|
* Sign a multisig execution
|
|
581
611
|
* @param {string} multisig
|
|
582
612
|
* @param {number} proposal_id
|
|
583
|
-
* @param {
|
|
613
|
+
* @param {string | null} [nonce]
|
|
584
614
|
* @returns {any}
|
|
585
615
|
*/
|
|
586
616
|
signMultisigExecute(multisig, proposal_id, nonce) {
|
|
587
617
|
const ptr0 = passStringToWasm0(multisig, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
588
618
|
const len0 = WASM_VECTOR_LEN;
|
|
589
|
-
|
|
619
|
+
var ptr1 = isLikeNone(nonce) ? 0 : passStringToWasm0(nonce, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
620
|
+
var len1 = WASM_VECTOR_LEN;
|
|
621
|
+
const ret = wasm.wasmsigner_signMultisigExecute(this.__wbg_ptr, ptr0, len0, proposal_id, ptr1, len1);
|
|
590
622
|
if (ret[2]) {
|
|
591
623
|
throw takeFromExternrefTable0(ret[1]);
|
|
592
624
|
}
|
|
@@ -596,13 +628,15 @@ export class WasmSigner {
|
|
|
596
628
|
* Sign a multisig proposal
|
|
597
629
|
* @param {string} multisig
|
|
598
630
|
* @param {any} actions
|
|
599
|
-
* @param {
|
|
631
|
+
* @param {string | null} [nonce]
|
|
600
632
|
* @returns {any}
|
|
601
633
|
*/
|
|
602
634
|
signMultisigPropose(multisig, actions, nonce) {
|
|
603
635
|
const ptr0 = passStringToWasm0(multisig, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
604
636
|
const len0 = WASM_VECTOR_LEN;
|
|
605
|
-
|
|
637
|
+
var ptr1 = isLikeNone(nonce) ? 0 : passStringToWasm0(nonce, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
638
|
+
var len1 = WASM_VECTOR_LEN;
|
|
639
|
+
const ret = wasm.wasmsigner_signMultisigPropose(this.__wbg_ptr, ptr0, len0, actions, ptr1, len1);
|
|
606
640
|
if (ret[2]) {
|
|
607
641
|
throw takeFromExternrefTable0(ret[1]);
|
|
608
642
|
}
|
|
@@ -612,13 +646,15 @@ export class WasmSigner {
|
|
|
612
646
|
* Sign a multisig rejection
|
|
613
647
|
* @param {string} multisig
|
|
614
648
|
* @param {number} proposal_id
|
|
615
|
-
* @param {
|
|
649
|
+
* @param {string | null} [nonce]
|
|
616
650
|
* @returns {any}
|
|
617
651
|
*/
|
|
618
652
|
signMultisigReject(multisig, proposal_id, nonce) {
|
|
619
653
|
const ptr0 = passStringToWasm0(multisig, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
620
654
|
const len0 = WASM_VECTOR_LEN;
|
|
621
|
-
|
|
655
|
+
var ptr1 = isLikeNone(nonce) ? 0 : passStringToWasm0(nonce, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
656
|
+
var len1 = WASM_VECTOR_LEN;
|
|
657
|
+
const ret = wasm.wasmsigner_signMultisigReject(this.__wbg_ptr, ptr0, len0, proposal_id, ptr1, len1);
|
|
622
658
|
if (ret[2]) {
|
|
623
659
|
throw takeFromExternrefTable0(ret[1]);
|
|
624
660
|
}
|
|
@@ -627,11 +663,13 @@ export class WasmSigner {
|
|
|
627
663
|
/**
|
|
628
664
|
* Sign one or more oracle price updates (`px`)
|
|
629
665
|
* @param {any} oracles
|
|
630
|
-
* @param {
|
|
666
|
+
* @param {string | null} [nonce]
|
|
631
667
|
* @returns {any}
|
|
632
668
|
*/
|
|
633
669
|
signOraclePrices(oracles, nonce) {
|
|
634
|
-
|
|
670
|
+
var ptr0 = isLikeNone(nonce) ? 0 : passStringToWasm0(nonce, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
671
|
+
var len0 = WASM_VECTOR_LEN;
|
|
672
|
+
const ret = wasm.wasmsigner_signOraclePrices(this.__wbg_ptr, oracles, ptr0, len0);
|
|
635
673
|
if (ret[2]) {
|
|
636
674
|
throw takeFromExternrefTable0(ret[1]);
|
|
637
675
|
}
|
|
@@ -640,11 +678,13 @@ export class WasmSigner {
|
|
|
640
678
|
/**
|
|
641
679
|
* @deprecated Use sign(), signAll(), or signGroup() instead
|
|
642
680
|
* @param {any} orders
|
|
643
|
-
* @param {
|
|
681
|
+
* @param {string | null} [nonce]
|
|
644
682
|
* @returns {any}
|
|
645
683
|
*/
|
|
646
684
|
signOrder(orders, nonce) {
|
|
647
|
-
|
|
685
|
+
var ptr0 = isLikeNone(nonce) ? 0 : passStringToWasm0(nonce, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
686
|
+
var len0 = WASM_VECTOR_LEN;
|
|
687
|
+
const ret = wasm.wasmsigner_signOrder(this.__wbg_ptr, orders, ptr0, len0);
|
|
648
688
|
if (ret[2]) {
|
|
649
689
|
throw takeFromExternrefTable0(ret[1]);
|
|
650
690
|
}
|
|
@@ -653,11 +693,13 @@ export class WasmSigner {
|
|
|
653
693
|
/**
|
|
654
694
|
* @deprecated Use signAll() instead
|
|
655
695
|
* @param {any} batches
|
|
656
|
-
* @param {
|
|
696
|
+
* @param {string | null} [base_nonce]
|
|
657
697
|
* @returns {any}
|
|
658
698
|
*/
|
|
659
699
|
signOrdersBatch(batches, base_nonce) {
|
|
660
|
-
|
|
700
|
+
var ptr0 = isLikeNone(base_nonce) ? 0 : passStringToWasm0(base_nonce, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
701
|
+
var len0 = WASM_VECTOR_LEN;
|
|
702
|
+
const ret = wasm.wasmsigner_signOrdersBatch(this.__wbg_ptr, batches, ptr0, len0);
|
|
661
703
|
if (ret[2]) {
|
|
662
704
|
throw takeFromExternrefTable0(ret[1]);
|
|
663
705
|
}
|
|
@@ -682,11 +724,13 @@ export class WasmSigner {
|
|
|
682
724
|
/**
|
|
683
725
|
* Sign a batch Pyth oracle update (`o`)
|
|
684
726
|
* @param {any} oracles
|
|
685
|
-
* @param {
|
|
727
|
+
* @param {string | null} [nonce]
|
|
686
728
|
* @returns {any}
|
|
687
729
|
*/
|
|
688
730
|
signPythOracle(oracles, nonce) {
|
|
689
|
-
|
|
731
|
+
var ptr0 = isLikeNone(nonce) ? 0 : passStringToWasm0(nonce, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
732
|
+
var len0 = WASM_VECTOR_LEN;
|
|
733
|
+
const ret = wasm.wasmsigner_signPythOracle(this.__wbg_ptr, oracles, ptr0, len0);
|
|
690
734
|
if (ret[2]) {
|
|
691
735
|
throw takeFromExternrefTable0(ret[1]);
|
|
692
736
|
}
|
|
@@ -698,13 +742,15 @@ export class WasmSigner {
|
|
|
698
742
|
* @param toRemove - sub-account pubkey to remove (base58)
|
|
699
743
|
* @param nonce - optional nonce
|
|
700
744
|
* @param {string} to_remove
|
|
701
|
-
* @param {
|
|
745
|
+
* @param {string | null} [nonce]
|
|
702
746
|
* @returns {any}
|
|
703
747
|
*/
|
|
704
748
|
signRemoveSubAccount(to_remove, nonce) {
|
|
705
749
|
const ptr0 = passStringToWasm0(to_remove, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
706
750
|
const len0 = WASM_VECTOR_LEN;
|
|
707
|
-
|
|
751
|
+
var ptr1 = isLikeNone(nonce) ? 0 : passStringToWasm0(nonce, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
752
|
+
var len1 = WASM_VECTOR_LEN;
|
|
753
|
+
const ret = wasm.wasmsigner_signRemoveSubAccount(this.__wbg_ptr, ptr0, len0, ptr1, len1);
|
|
708
754
|
if (ret[2]) {
|
|
709
755
|
throw takeFromExternrefTable0(ret[1]);
|
|
710
756
|
}
|
|
@@ -718,7 +764,7 @@ export class WasmSigner {
|
|
|
718
764
|
* @param nonce - optional nonce
|
|
719
765
|
* @param {string} subaccount
|
|
720
766
|
* @param {string} name
|
|
721
|
-
* @param {
|
|
767
|
+
* @param {string | null} [nonce]
|
|
722
768
|
* @returns {any}
|
|
723
769
|
*/
|
|
724
770
|
signRenameSubAccount(subaccount, name, nonce) {
|
|
@@ -726,7 +772,9 @@ export class WasmSigner {
|
|
|
726
772
|
const len0 = WASM_VECTOR_LEN;
|
|
727
773
|
const ptr1 = passStringToWasm0(name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
728
774
|
const len1 = WASM_VECTOR_LEN;
|
|
729
|
-
|
|
775
|
+
var ptr2 = isLikeNone(nonce) ? 0 : passStringToWasm0(nonce, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
776
|
+
var len2 = WASM_VECTOR_LEN;
|
|
777
|
+
const ret = wasm.wasmsigner_signRenameSubAccount(this.__wbg_ptr, ptr0, len0, ptr1, len1, ptr2, len2);
|
|
730
778
|
if (ret[2]) {
|
|
731
779
|
throw takeFromExternrefTable0(ret[1]);
|
|
732
780
|
}
|
|
@@ -735,13 +783,15 @@ export class WasmSigner {
|
|
|
735
783
|
/**
|
|
736
784
|
* Sign builder-code recipient revocation (`rbc`)
|
|
737
785
|
* @param {string} to_pubkey
|
|
738
|
-
* @param {
|
|
786
|
+
* @param {string | null} [nonce]
|
|
739
787
|
* @returns {any}
|
|
740
788
|
*/
|
|
741
789
|
signRevokeBuilderCode(to_pubkey, nonce) {
|
|
742
790
|
const ptr0 = passStringToWasm0(to_pubkey, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
743
791
|
const len0 = WASM_VECTOR_LEN;
|
|
744
|
-
|
|
792
|
+
var ptr1 = isLikeNone(nonce) ? 0 : passStringToWasm0(nonce, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
793
|
+
var len1 = WASM_VECTOR_LEN;
|
|
794
|
+
const ret = wasm.wasmsigner_signRevokeBuilderCode(this.__wbg_ptr, ptr0, len0, ptr1, len1);
|
|
745
795
|
if (ret[2]) {
|
|
746
796
|
throw takeFromExternrefTable0(ret[1]);
|
|
747
797
|
}
|
|
@@ -750,13 +800,15 @@ export class WasmSigner {
|
|
|
750
800
|
/**
|
|
751
801
|
* Sign builder-code recipient revocation (`rbc`)
|
|
752
802
|
* @param {string} to_pubkey
|
|
753
|
-
* @param {
|
|
803
|
+
* @param {string | null} [nonce]
|
|
754
804
|
* @returns {any}
|
|
755
805
|
*/
|
|
756
806
|
signRevokeCommissionFee(to_pubkey, nonce) {
|
|
757
807
|
const ptr0 = passStringToWasm0(to_pubkey, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
758
808
|
const len0 = WASM_VECTOR_LEN;
|
|
759
|
-
|
|
809
|
+
var ptr1 = isLikeNone(nonce) ? 0 : passStringToWasm0(nonce, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
810
|
+
var len1 = WASM_VECTOR_LEN;
|
|
811
|
+
const ret = wasm.wasmsigner_signRevokeCommissionFee(this.__wbg_ptr, ptr0, len0, ptr1, len1);
|
|
760
812
|
if (ret[2]) {
|
|
761
813
|
throw takeFromExternrefTable0(ret[1]);
|
|
762
814
|
}
|
|
@@ -774,7 +826,7 @@ export class WasmSigner {
|
|
|
774
826
|
* @param {string} from_pubkey
|
|
775
827
|
* @param {string} to_pubkey
|
|
776
828
|
* @param {number} margin_amount
|
|
777
|
-
* @param {
|
|
829
|
+
* @param {string | null} [nonce]
|
|
778
830
|
* @returns {any}
|
|
779
831
|
*/
|
|
780
832
|
signTransfer(kind, from_pubkey, to_pubkey, margin_amount, nonce) {
|
|
@@ -784,7 +836,9 @@ export class WasmSigner {
|
|
|
784
836
|
const len1 = WASM_VECTOR_LEN;
|
|
785
837
|
const ptr2 = passStringToWasm0(to_pubkey, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
786
838
|
const len2 = WASM_VECTOR_LEN;
|
|
787
|
-
|
|
839
|
+
var ptr3 = isLikeNone(nonce) ? 0 : passStringToWasm0(nonce, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
840
|
+
var len3 = WASM_VECTOR_LEN;
|
|
841
|
+
const ret = wasm.wasmsigner_signTransfer(this.__wbg_ptr, ptr0, len0, ptr1, len1, ptr2, len2, margin_amount, ptr3, len3);
|
|
788
842
|
if (ret[2]) {
|
|
789
843
|
throw takeFromExternrefTable0(ret[1]);
|
|
790
844
|
}
|
|
@@ -793,11 +847,13 @@ export class WasmSigner {
|
|
|
793
847
|
/**
|
|
794
848
|
* Sign a liquidator config update (`liq`)
|
|
795
849
|
* @param {any} config
|
|
796
|
-
* @param {
|
|
850
|
+
* @param {string | null} [nonce]
|
|
797
851
|
* @returns {any}
|
|
798
852
|
*/
|
|
799
853
|
signUpdateLiquidatorConfig(config, nonce) {
|
|
800
|
-
|
|
854
|
+
var ptr0 = isLikeNone(nonce) ? 0 : passStringToWasm0(nonce, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
855
|
+
var len0 = WASM_VECTOR_LEN;
|
|
856
|
+
const ret = wasm.wasmsigner_signUpdateLiquidatorConfig(this.__wbg_ptr, config, ptr0, len0);
|
|
801
857
|
if (ret[2]) {
|
|
802
858
|
throw takeFromExternrefTable0(ret[1]);
|
|
803
859
|
}
|
|
@@ -810,13 +866,15 @@ export class WasmSigner {
|
|
|
810
866
|
* @param {number} threshold
|
|
811
867
|
* @param {number | null} [time_lock_secs]
|
|
812
868
|
* @param {number | null} [proposal_lifetime_secs]
|
|
813
|
-
* @param {
|
|
869
|
+
* @param {string | null} [nonce]
|
|
814
870
|
* @returns {any}
|
|
815
871
|
*/
|
|
816
872
|
signUpdateMultisigPolicy(multisig, signers, threshold, time_lock_secs, proposal_lifetime_secs, nonce) {
|
|
817
873
|
const ptr0 = passStringToWasm0(multisig, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
818
874
|
const len0 = WASM_VECTOR_LEN;
|
|
819
|
-
|
|
875
|
+
var ptr1 = isLikeNone(nonce) ? 0 : passStringToWasm0(nonce, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
876
|
+
var len1 = WASM_VECTOR_LEN;
|
|
877
|
+
const ret = wasm.wasmsigner_signUpdateMultisigPolicy(this.__wbg_ptr, ptr0, len0, signers, threshold, isLikeNone(time_lock_secs) ? Number.MAX_SAFE_INTEGER : (time_lock_secs) >>> 0, isLikeNone(proposal_lifetime_secs) ? Number.MAX_SAFE_INTEGER : (proposal_lifetime_secs) >>> 0, ptr1, len1);
|
|
820
878
|
if (ret[2]) {
|
|
821
879
|
throw takeFromExternrefTable0(ret[1]);
|
|
822
880
|
}
|
|
@@ -825,11 +883,13 @@ export class WasmSigner {
|
|
|
825
883
|
/**
|
|
826
884
|
* Sign user settings update
|
|
827
885
|
* @param {any} settings
|
|
828
|
-
* @param {
|
|
886
|
+
* @param {string | null} [nonce]
|
|
829
887
|
* @returns {any}
|
|
830
888
|
*/
|
|
831
889
|
signUserSettings(settings, nonce) {
|
|
832
|
-
|
|
890
|
+
var ptr0 = isLikeNone(nonce) ? 0 : passStringToWasm0(nonce, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
891
|
+
var len0 = WASM_VECTOR_LEN;
|
|
892
|
+
const ret = wasm.wasmsigner_signUserSettings(this.__wbg_ptr, settings, ptr0, len0);
|
|
833
893
|
if (ret[2]) {
|
|
834
894
|
throw takeFromExternrefTable0(ret[1]);
|
|
835
895
|
}
|
|
@@ -839,13 +899,15 @@ export class WasmSigner {
|
|
|
839
899
|
* Sign whitelist/un-whitelist faucet access (`whitelistFaucet`)
|
|
840
900
|
* @param {string} target_pubkey
|
|
841
901
|
* @param {boolean} whitelist
|
|
842
|
-
* @param {
|
|
902
|
+
* @param {string | null} [nonce]
|
|
843
903
|
* @returns {any}
|
|
844
904
|
*/
|
|
845
905
|
signWhitelistFaucet(target_pubkey, whitelist, nonce) {
|
|
846
906
|
const ptr0 = passStringToWasm0(target_pubkey, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
847
907
|
const len0 = WASM_VECTOR_LEN;
|
|
848
|
-
|
|
908
|
+
var ptr1 = isLikeNone(nonce) ? 0 : passStringToWasm0(nonce, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
909
|
+
var len1 = WASM_VECTOR_LEN;
|
|
910
|
+
const ret = wasm.wasmsigner_signWhitelistFaucet(this.__wbg_ptr, ptr0, len0, whitelist, ptr1, len1);
|
|
849
911
|
if (ret[2]) {
|
|
850
912
|
throw takeFromExternrefTable0(ret[1]);
|
|
851
913
|
}
|
|
@@ -896,12 +958,20 @@ export function computeOrderId(wincode_bytes) {
|
|
|
896
958
|
}
|
|
897
959
|
|
|
898
960
|
/**
|
|
899
|
-
* Get current timestamp in
|
|
900
|
-
* @returns {
|
|
961
|
+
* Get the current Unix timestamp in nanoseconds as a decimal string.
|
|
962
|
+
* @returns {string}
|
|
901
963
|
*/
|
|
902
964
|
export function currentTimestamp() {
|
|
903
|
-
|
|
904
|
-
|
|
965
|
+
let deferred1_0;
|
|
966
|
+
let deferred1_1;
|
|
967
|
+
try {
|
|
968
|
+
const ret = wasm.currentTimestamp();
|
|
969
|
+
deferred1_0 = ret[0];
|
|
970
|
+
deferred1_1 = ret[1];
|
|
971
|
+
return getStringFromWasm0(ret[0], ret[1]);
|
|
972
|
+
} finally {
|
|
973
|
+
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
974
|
+
}
|
|
905
975
|
}
|
|
906
976
|
|
|
907
977
|
/**
|
|
@@ -935,7 +1005,7 @@ export function init() {
|
|
|
935
1005
|
*
|
|
936
1006
|
* @param agentPubkey - The agent wallet public key to authorize
|
|
937
1007
|
* @param delete - Whether to delete (true) or add (false) the agent
|
|
938
|
-
* @param options - { account: string, signer?: string, nonce?:
|
|
1008
|
+
* @param options - { account: string, signer?: string, nonce?: string }
|
|
939
1009
|
* @param {string} agent_pubkey
|
|
940
1010
|
* @param {boolean} _delete
|
|
941
1011
|
* @param {any} options
|
|
@@ -955,7 +1025,7 @@ export function prepareAgentWallet(agent_pubkey, _delete, options) {
|
|
|
955
1025
|
* Prepare multiple orders - each becomes its own transaction (parallel)
|
|
956
1026
|
*
|
|
957
1027
|
* @param orders - Array of orders to prepare
|
|
958
|
-
* @param options - { account: string, signer?: string, nonce?:
|
|
1028
|
+
* @param options - { account: string, signer?: string, nonce?: string }
|
|
959
1029
|
* @returns Array of PreparedMessage
|
|
960
1030
|
* @param {any} orders
|
|
961
1031
|
* @param {any} options
|
|
@@ -966,7 +1036,7 @@ export function prepareAll(orders, options) {
|
|
|
966
1036
|
if (ret[3]) {
|
|
967
1037
|
throw takeFromExternrefTable0(ret[2]);
|
|
968
1038
|
}
|
|
969
|
-
var v1 = getArrayJsValueFromWasm0(ret[0], ret[1])
|
|
1039
|
+
var v1 = getArrayJsValueFromWasm0(ret[0], ret[1]);
|
|
970
1040
|
wasm.__wbindgen_free(ret[0], ret[1] * 4, 4);
|
|
971
1041
|
return v1;
|
|
972
1042
|
}
|
|
@@ -993,7 +1063,7 @@ export function prepareApproveBuilderCode(to_pubkey, fee, options) {
|
|
|
993
1063
|
*
|
|
994
1064
|
* @param toPubkey - Builder-code recipient public key
|
|
995
1065
|
* @param fee - Maximum builder-code fee in bps
|
|
996
|
-
* @param options - { account: string, signer?: string, nonce?:
|
|
1066
|
+
* @param options - { account: string, signer?: string, nonce?: string }
|
|
997
1067
|
* @param {string} to_pubkey
|
|
998
1068
|
* @param {number} fee
|
|
999
1069
|
* @param {any} options
|
|
@@ -1014,7 +1084,7 @@ export function prepareApproveCommissionFee(to_pubkey, fee, options) {
|
|
|
1014
1084
|
*
|
|
1015
1085
|
* @param signers - signer pubkeys (base58)
|
|
1016
1086
|
* @param threshold - approvals required
|
|
1017
|
-
* @param options - { account: string, signer?: string, nonce?:
|
|
1087
|
+
* @param options - { account: string, signer?: string, nonce?: string, timeLockSecs?: number, proposalLifetimeSecs?: number }
|
|
1018
1088
|
* @param {any} signers
|
|
1019
1089
|
* @param {number} threshold
|
|
1020
1090
|
* @param {any} options
|
|
@@ -1032,7 +1102,7 @@ export function prepareCreateMultisig(signers, threshold, options) {
|
|
|
1032
1102
|
* Prepare a sub-account creation for external signing
|
|
1033
1103
|
*
|
|
1034
1104
|
* @param name - Sub-account display name
|
|
1035
|
-
* @param options - { account: string, signer?: string, nonce?:
|
|
1105
|
+
* @param options - { account: string, signer?: string, nonce?: string, marginAmount?: number }
|
|
1036
1106
|
* @param {string} name
|
|
1037
1107
|
* @param {any} options
|
|
1038
1108
|
* @returns {WasmPreparedMessage}
|
|
@@ -1050,7 +1120,7 @@ export function prepareCreateSubAccount(name, options) {
|
|
|
1050
1120
|
/**
|
|
1051
1121
|
* Prepare faucet request for external signing
|
|
1052
1122
|
*
|
|
1053
|
-
* @param options - { account: string, signer?: string, nonce?:
|
|
1123
|
+
* @param options - { account: string, signer?: string, nonce?: string }
|
|
1054
1124
|
* @param {any} options
|
|
1055
1125
|
* @returns {WasmPreparedMessage}
|
|
1056
1126
|
*/
|
|
@@ -1068,7 +1138,7 @@ export function prepareFaucet(options) {
|
|
|
1068
1138
|
* Use for bracket orders (entry + stop loss + take profit).
|
|
1069
1139
|
*
|
|
1070
1140
|
* @param orders - Array of orders for the atomic transaction
|
|
1071
|
-
* @param options - { account: string, signer?: string, nonce?:
|
|
1141
|
+
* @param options - { account: string, signer?: string, nonce?: string }
|
|
1072
1142
|
* @returns Single PreparedMessage containing all orders
|
|
1073
1143
|
* @param {any} orders
|
|
1074
1144
|
* @param {any} options
|
|
@@ -1174,7 +1244,7 @@ export function prepareMultisigReject(multisig, proposal_id, options) {
|
|
|
1174
1244
|
* to sign with an external wallet (like Phantom, Privy, etc).
|
|
1175
1245
|
*
|
|
1176
1246
|
* @param order - The order to prepare
|
|
1177
|
-
* @param options - { account: string, signer?: string, nonce?:
|
|
1247
|
+
* @param options - { account: string, signer?: string, nonce?: string }
|
|
1178
1248
|
* @returns PreparedMessage with messageBytes to sign
|
|
1179
1249
|
*
|
|
1180
1250
|
* @example
|
|
@@ -1199,7 +1269,7 @@ export function prepareOrder(order, options) {
|
|
|
1199
1269
|
* Prepare a sub-account removal for external signing
|
|
1200
1270
|
*
|
|
1201
1271
|
* @param toRemove - sub-account pubkey to remove (base58)
|
|
1202
|
-
* @param options - { account: string, signer?: string, nonce?:
|
|
1272
|
+
* @param options - { account: string, signer?: string, nonce?: string }
|
|
1203
1273
|
* @param {string} to_remove
|
|
1204
1274
|
* @param {any} options
|
|
1205
1275
|
* @returns {WasmPreparedMessage}
|
|
@@ -1219,7 +1289,7 @@ export function prepareRemoveSubAccount(to_remove, options) {
|
|
|
1219
1289
|
*
|
|
1220
1290
|
* @param subaccount - sub-account pubkey to rename (base58)
|
|
1221
1291
|
* @param name - new display name
|
|
1222
|
-
* @param options - { account: string, signer?: string, nonce?:
|
|
1292
|
+
* @param options - { account: string, signer?: string, nonce?: string }
|
|
1223
1293
|
* @param {string} subaccount
|
|
1224
1294
|
* @param {string} name
|
|
1225
1295
|
* @param {any} options
|
|
@@ -1257,7 +1327,7 @@ export function prepareRevokeBuilderCode(to_pubkey, options) {
|
|
|
1257
1327
|
* Prepare builder-code recipient revocation for external signing
|
|
1258
1328
|
*
|
|
1259
1329
|
* @param toPubkey - Builder-code recipient public key
|
|
1260
|
-
* @param options - { account: string, signer?: string, nonce?:
|
|
1330
|
+
* @param options - { account: string, signer?: string, nonce?: string }
|
|
1261
1331
|
* @param {string} to_pubkey
|
|
1262
1332
|
* @param {any} options
|
|
1263
1333
|
* @returns {WasmPreparedMessage}
|
|
@@ -1278,7 +1348,7 @@ export function prepareRevokeCommissionFee(to_pubkey, options) {
|
|
|
1278
1348
|
* @param fromPubkey - source account pubkey (base58)
|
|
1279
1349
|
* @param toPubkey - destination account pubkey (base58)
|
|
1280
1350
|
* @param marginAmount - amount to transfer
|
|
1281
|
-
* @param options - { account: string, signer?: string, nonce?:
|
|
1351
|
+
* @param options - { account: string, signer?: string, nonce?: string, kind?: "internal" | "external" }
|
|
1282
1352
|
* @param {string} from_pubkey
|
|
1283
1353
|
* @param {string} to_pubkey
|
|
1284
1354
|
* @param {number} margin_amount
|
|
@@ -1301,7 +1371,7 @@ export function prepareTransfer(from_pubkey, to_pubkey, margin_amount, options)
|
|
|
1301
1371
|
* Prepare a liquidator config update for external signing
|
|
1302
1372
|
*
|
|
1303
1373
|
* @param config - { crossExposure, scoringSkew, toxicity, instruments: [...] }
|
|
1304
|
-
* @param options - { account: string, signer?: string, nonce?:
|
|
1374
|
+
* @param options - { account: string, signer?: string, nonce?: string }
|
|
1305
1375
|
* @param {any} config
|
|
1306
1376
|
* @param {any} options
|
|
1307
1377
|
* @returns {WasmPreparedMessage}
|
|
@@ -1336,7 +1406,7 @@ export function prepareUpdateMultisigPolicy(multisig, signers, threshold, option
|
|
|
1336
1406
|
* Prepare user settings update for external signing
|
|
1337
1407
|
*
|
|
1338
1408
|
* @param settings - { max_leverage: [[symbol, leverage], ...] }
|
|
1339
|
-
* @param options - { account: string, signer?: string, nonce?:
|
|
1409
|
+
* @param options - { account: string, signer?: string, nonce?: string }
|
|
1340
1410
|
* @param {any} settings
|
|
1341
1411
|
* @param {any} options
|
|
1342
1412
|
* @returns {WasmPreparedMessage}
|
|
@@ -1357,7 +1427,7 @@ export function prepareUpdateUserSettings(settings, options) {
|
|
|
1357
1427
|
* @param user - user wallet pubkey (base58)
|
|
1358
1428
|
* @param vault - vault pubkey (base58)
|
|
1359
1429
|
* @param recipientTokenAccount - recipient token account pubkey (base58)
|
|
1360
|
-
* @param options - { account: string, signer?: string, nonce?:
|
|
1430
|
+
* @param options - { account: string, signer?: string, nonce?: string }
|
|
1361
1431
|
* @param {number} amount
|
|
1362
1432
|
* @param {string} blockhash
|
|
1363
1433
|
* @param {string} user
|
|
@@ -1387,7 +1457,7 @@ export function prepareWithdraw(amount, blockhash, user, vault, recipient_token_
|
|
|
1387
1457
|
*
|
|
1388
1458
|
* @param user - user wallet pubkey (base58)
|
|
1389
1459
|
* @param hash - withdrawal lock hash (base58)
|
|
1390
|
-
* @param options - { account: string, signer?: string, nonce?:
|
|
1460
|
+
* @param options - { account: string, signer?: string, nonce?: string }
|
|
1391
1461
|
* @param {string} user
|
|
1392
1462
|
* @param {string} hash
|
|
1393
1463
|
* @param {any} options
|
|
@@ -1448,11 +1518,11 @@ export function validatePubkey(s) {
|
|
|
1448
1518
|
function __wbg_get_imports() {
|
|
1449
1519
|
const import0 = {
|
|
1450
1520
|
__proto__: null,
|
|
1451
|
-
|
|
1521
|
+
__wbg_Error_408e67f47ca7b58b: function(arg0, arg1) {
|
|
1452
1522
|
const ret = Error(getStringFromWasm0(arg0, arg1));
|
|
1453
1523
|
return ret;
|
|
1454
1524
|
},
|
|
1455
|
-
|
|
1525
|
+
__wbg_Number_3890faa6d3ff057d: function(arg0) {
|
|
1456
1526
|
const ret = Number(arg0);
|
|
1457
1527
|
return ret;
|
|
1458
1528
|
},
|
|
@@ -1463,64 +1533,64 @@ function __wbg_get_imports() {
|
|
|
1463
1533
|
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
1464
1534
|
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
1465
1535
|
},
|
|
1466
|
-
|
|
1536
|
+
__wbg___wbindgen_bigint_get_as_i64_c4ecf48528083721: function(arg0, arg1) {
|
|
1467
1537
|
const v = arg1;
|
|
1468
1538
|
const ret = typeof(v) === 'bigint' ? v : undefined;
|
|
1469
1539
|
getDataViewMemory0().setBigInt64(arg0 + 8 * 1, isLikeNone(ret) ? BigInt(0) : ret, true);
|
|
1470
1540
|
getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);
|
|
1471
1541
|
},
|
|
1472
|
-
|
|
1542
|
+
__wbg___wbindgen_boolean_get_c9c83ebd41b34df3: function(arg0) {
|
|
1473
1543
|
const v = arg0;
|
|
1474
1544
|
const ret = typeof(v) === 'boolean' ? v : undefined;
|
|
1475
1545
|
return isLikeNone(ret) ? 0xFFFFFF : ret ? 1 : 0;
|
|
1476
1546
|
},
|
|
1477
|
-
|
|
1547
|
+
__wbg___wbindgen_debug_string_a57024b9c6e4a48b: function(arg0, arg1) {
|
|
1478
1548
|
const ret = debugString(arg1);
|
|
1479
1549
|
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1480
1550
|
const len1 = WASM_VECTOR_LEN;
|
|
1481
1551
|
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
1482
1552
|
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
1483
1553
|
},
|
|
1484
|
-
|
|
1554
|
+
__wbg___wbindgen_in_ac983077f137f2e6: function(arg0, arg1) {
|
|
1485
1555
|
const ret = arg0 in arg1;
|
|
1486
1556
|
return ret;
|
|
1487
1557
|
},
|
|
1488
|
-
|
|
1558
|
+
__wbg___wbindgen_is_bigint_8ffbbef442139384: function(arg0) {
|
|
1489
1559
|
const ret = typeof(arg0) === 'bigint';
|
|
1490
1560
|
return ret;
|
|
1491
1561
|
},
|
|
1492
|
-
|
|
1562
|
+
__wbg___wbindgen_is_function_5e4570eb24ffa122: function(arg0) {
|
|
1493
1563
|
const ret = typeof(arg0) === 'function';
|
|
1494
1564
|
return ret;
|
|
1495
1565
|
},
|
|
1496
|
-
|
|
1566
|
+
__wbg___wbindgen_is_object_a2790eb24c211ea0: function(arg0) {
|
|
1497
1567
|
const val = arg0;
|
|
1498
1568
|
const ret = typeof(val) === 'object' && val !== null;
|
|
1499
1569
|
return ret;
|
|
1500
1570
|
},
|
|
1501
|
-
|
|
1571
|
+
__wbg___wbindgen_is_string_e6f02f0ea5f20a32: function(arg0) {
|
|
1502
1572
|
const ret = typeof(arg0) === 'string';
|
|
1503
1573
|
return ret;
|
|
1504
1574
|
},
|
|
1505
|
-
|
|
1575
|
+
__wbg___wbindgen_is_undefined_6cff064c44e0d823: function(arg0) {
|
|
1506
1576
|
const ret = arg0 === undefined;
|
|
1507
1577
|
return ret;
|
|
1508
1578
|
},
|
|
1509
|
-
|
|
1579
|
+
__wbg___wbindgen_jsval_eq_0a18949a61670320: function(arg0, arg1) {
|
|
1510
1580
|
const ret = arg0 === arg1;
|
|
1511
1581
|
return ret;
|
|
1512
1582
|
},
|
|
1513
|
-
|
|
1583
|
+
__wbg___wbindgen_jsval_loose_eq_acf2776254a8d832: function(arg0, arg1) {
|
|
1514
1584
|
const ret = arg0 == arg1;
|
|
1515
1585
|
return ret;
|
|
1516
1586
|
},
|
|
1517
|
-
|
|
1587
|
+
__wbg___wbindgen_number_get_136b9679cab35cfb: function(arg0, arg1) {
|
|
1518
1588
|
const obj = arg1;
|
|
1519
1589
|
const ret = typeof(obj) === 'number' ? obj : undefined;
|
|
1520
1590
|
getDataViewMemory0().setFloat64(arg0 + 8 * 1, isLikeNone(ret) ? 0 : ret, true);
|
|
1521
1591
|
getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);
|
|
1522
1592
|
},
|
|
1523
|
-
|
|
1593
|
+
__wbg___wbindgen_string_get_d154f1e671052120: function(arg0, arg1) {
|
|
1524
1594
|
const obj = arg1;
|
|
1525
1595
|
const ret = typeof(obj) === 'string' ? obj : undefined;
|
|
1526
1596
|
var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
@@ -1528,14 +1598,14 @@ function __wbg_get_imports() {
|
|
|
1528
1598
|
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
1529
1599
|
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
1530
1600
|
},
|
|
1531
|
-
|
|
1601
|
+
__wbg___wbindgen_throw_bb96b2010945f0bc: function(arg0, arg1) {
|
|
1532
1602
|
throw new Error(getStringFromWasm0(arg0, arg1));
|
|
1533
1603
|
},
|
|
1534
|
-
|
|
1604
|
+
__wbg_call_1c5886ab9c57d1c7: function() { return handleError(function (arg0, arg1) {
|
|
1535
1605
|
const ret = arg0.call(arg1);
|
|
1536
1606
|
return ret;
|
|
1537
1607
|
}, arguments); },
|
|
1538
|
-
|
|
1608
|
+
__wbg_call_35dba3c747ad7521: function() { return handleError(function (arg0, arg1, arg2) {
|
|
1539
1609
|
const ret = arg0.call(arg1, arg2);
|
|
1540
1610
|
return ret;
|
|
1541
1611
|
}, arguments); },
|
|
@@ -1543,15 +1613,15 @@ function __wbg_get_imports() {
|
|
|
1543
1613
|
const ret = arg0.crypto;
|
|
1544
1614
|
return ret;
|
|
1545
1615
|
},
|
|
1546
|
-
|
|
1616
|
+
__wbg_done_669171204c3dcae2: function(arg0) {
|
|
1547
1617
|
const ret = arg0.done;
|
|
1548
1618
|
return ret;
|
|
1549
1619
|
},
|
|
1550
|
-
|
|
1620
|
+
__wbg_entries_7774d489e1da5f4f: function(arg0) {
|
|
1551
1621
|
const ret = Object.entries(arg0);
|
|
1552
1622
|
return ret;
|
|
1553
1623
|
},
|
|
1554
|
-
|
|
1624
|
+
__wbg_error_757e9472f8410341: function(arg0, arg1) {
|
|
1555
1625
|
let deferred0_0;
|
|
1556
1626
|
let deferred0_1;
|
|
1557
1627
|
try {
|
|
@@ -1565,15 +1635,15 @@ function __wbg_get_imports() {
|
|
|
1565
1635
|
__wbg_getRandomValues_c44a50d8cfdaebeb: function() { return handleError(function (arg0, arg1) {
|
|
1566
1636
|
arg0.getRandomValues(arg1);
|
|
1567
1637
|
}, arguments); },
|
|
1568
|
-
|
|
1638
|
+
__wbg_get_c0c8f8d7da0c03dd: function(arg0, arg1) {
|
|
1569
1639
|
const ret = arg0[arg1 >>> 0];
|
|
1570
1640
|
return ret;
|
|
1571
1641
|
},
|
|
1572
|
-
|
|
1642
|
+
__wbg_get_d173c0308df22d37: function() { return handleError(function (arg0, arg1) {
|
|
1573
1643
|
const ret = Reflect.get(arg0, arg1);
|
|
1574
1644
|
return ret;
|
|
1575
1645
|
}, arguments); },
|
|
1576
|
-
|
|
1646
|
+
__wbg_get_unchecked_e20b893aeafc3fca: function(arg0, arg1) {
|
|
1577
1647
|
const ret = arg0[arg1 >>> 0];
|
|
1578
1648
|
return ret;
|
|
1579
1649
|
},
|
|
@@ -1581,7 +1651,7 @@ function __wbg_get_imports() {
|
|
|
1581
1651
|
const ret = arg0[arg1];
|
|
1582
1652
|
return ret;
|
|
1583
1653
|
},
|
|
1584
|
-
|
|
1654
|
+
__wbg_instanceof_ArrayBuffer_993d02d2d254cad1: function(arg0) {
|
|
1585
1655
|
let result;
|
|
1586
1656
|
try {
|
|
1587
1657
|
result = arg0 instanceof ArrayBuffer;
|
|
@@ -1591,7 +1661,7 @@ function __wbg_get_imports() {
|
|
|
1591
1661
|
const ret = result;
|
|
1592
1662
|
return ret;
|
|
1593
1663
|
},
|
|
1594
|
-
|
|
1664
|
+
__wbg_instanceof_Map_9a4d6ead180ae3a9: function(arg0) {
|
|
1595
1665
|
let result;
|
|
1596
1666
|
try {
|
|
1597
1667
|
result = arg0 instanceof Map;
|
|
@@ -1601,7 +1671,7 @@ function __wbg_get_imports() {
|
|
|
1601
1671
|
const ret = result;
|
|
1602
1672
|
return ret;
|
|
1603
1673
|
},
|
|
1604
|
-
|
|
1674
|
+
__wbg_instanceof_Uint8Array_f935dbb0aa7cdeed: function(arg0) {
|
|
1605
1675
|
let result;
|
|
1606
1676
|
try {
|
|
1607
1677
|
result = arg0 instanceof Uint8Array;
|
|
@@ -1611,23 +1681,23 @@ function __wbg_get_imports() {
|
|
|
1611
1681
|
const ret = result;
|
|
1612
1682
|
return ret;
|
|
1613
1683
|
},
|
|
1614
|
-
|
|
1684
|
+
__wbg_isArray_6339f732981044bf: function(arg0) {
|
|
1615
1685
|
const ret = Array.isArray(arg0);
|
|
1616
1686
|
return ret;
|
|
1617
1687
|
},
|
|
1618
|
-
|
|
1688
|
+
__wbg_isSafeInteger_f3d6cd19ccfe4512: function(arg0) {
|
|
1619
1689
|
const ret = Number.isSafeInteger(arg0);
|
|
1620
1690
|
return ret;
|
|
1621
1691
|
},
|
|
1622
|
-
|
|
1692
|
+
__wbg_iterator_5cebbb86e33c6dd6: function() {
|
|
1623
1693
|
const ret = Symbol.iterator;
|
|
1624
1694
|
return ret;
|
|
1625
1695
|
},
|
|
1626
|
-
|
|
1696
|
+
__wbg_length_36bd29c6848c2144: function(arg0) {
|
|
1627
1697
|
const ret = arg0.length;
|
|
1628
1698
|
return ret;
|
|
1629
1699
|
},
|
|
1630
|
-
|
|
1700
|
+
__wbg_length_ecfa2c63d3d0d82c: function(arg0) {
|
|
1631
1701
|
const ret = arg0.length;
|
|
1632
1702
|
return ret;
|
|
1633
1703
|
},
|
|
@@ -1635,47 +1705,51 @@ function __wbg_get_imports() {
|
|
|
1635
1705
|
const ret = arg0.msCrypto;
|
|
1636
1706
|
return ret;
|
|
1637
1707
|
},
|
|
1708
|
+
__wbg_new_116be93542d39019: function() {
|
|
1709
|
+
const ret = new Array();
|
|
1710
|
+
return ret;
|
|
1711
|
+
},
|
|
1638
1712
|
__wbg_new_227d7c05414eb861: function() {
|
|
1639
1713
|
const ret = new Error();
|
|
1640
1714
|
return ret;
|
|
1641
1715
|
},
|
|
1642
|
-
|
|
1643
|
-
const ret = new
|
|
1716
|
+
__wbg_new_77cc4f4f472aeb81: function(arg0) {
|
|
1717
|
+
const ret = new Uint8Array(arg0);
|
|
1644
1718
|
return ret;
|
|
1645
1719
|
},
|
|
1646
|
-
|
|
1720
|
+
__wbg_new_cdf041679ded4c5f: function() {
|
|
1647
1721
|
const ret = new Map();
|
|
1648
1722
|
return ret;
|
|
1649
1723
|
},
|
|
1650
|
-
|
|
1651
|
-
const ret = new Uint8Array(arg0);
|
|
1652
|
-
return ret;
|
|
1653
|
-
},
|
|
1654
|
-
__wbg_new_da52cf8fe3429cb2: function() {
|
|
1724
|
+
__wbg_new_ebe3e0f6837f0879: function() {
|
|
1655
1725
|
const ret = new Object();
|
|
1656
1726
|
return ret;
|
|
1657
1727
|
},
|
|
1658
|
-
|
|
1728
|
+
__wbg_new_with_length_3ffc1c56427c525c: function(arg0) {
|
|
1659
1729
|
const ret = new Uint8Array(arg0 >>> 0);
|
|
1660
1730
|
return ret;
|
|
1661
1731
|
},
|
|
1662
|
-
|
|
1663
|
-
const ret = arg0.next;
|
|
1664
|
-
return ret;
|
|
1665
|
-
},
|
|
1666
|
-
__wbg_next_71f2aa1cb3d1e37e: function() { return handleError(function (arg0) {
|
|
1732
|
+
__wbg_next_42cf16ee0dafc9e2: function() { return handleError(function (arg0) {
|
|
1667
1733
|
const ret = arg0.next();
|
|
1668
1734
|
return ret;
|
|
1669
1735
|
}, arguments); },
|
|
1736
|
+
__wbg_next_8f26b64fa5e9f64b: function(arg0) {
|
|
1737
|
+
const ret = arg0.next;
|
|
1738
|
+
return ret;
|
|
1739
|
+
},
|
|
1670
1740
|
__wbg_node_84ea875411254db1: function(arg0) {
|
|
1671
1741
|
const ret = arg0.node;
|
|
1672
1742
|
return ret;
|
|
1673
1743
|
},
|
|
1744
|
+
__wbg_now_8b265300afd5f2b9: function() {
|
|
1745
|
+
const ret = Date.now();
|
|
1746
|
+
return ret;
|
|
1747
|
+
},
|
|
1674
1748
|
__wbg_process_44c7a14e11e9f69e: function(arg0) {
|
|
1675
1749
|
const ret = arg0.process;
|
|
1676
1750
|
return ret;
|
|
1677
1751
|
},
|
|
1678
|
-
|
|
1752
|
+
__wbg_prototypesetcall_de8e0d9553586985: function(arg0, arg1, arg2) {
|
|
1679
1753
|
Uint8Array.prototype.set.call(getArrayU8FromWasm0(arg0, arg1), arg2);
|
|
1680
1754
|
},
|
|
1681
1755
|
__wbg_randomFillSync_6c25eac9869eb53c: function() { return handleError(function (arg0, arg1) {
|
|
@@ -1685,14 +1759,14 @@ function __wbg_get_imports() {
|
|
|
1685
1759
|
const ret = module.require;
|
|
1686
1760
|
return ret;
|
|
1687
1761
|
}, arguments); },
|
|
1688
|
-
|
|
1762
|
+
__wbg_set_014226dfeca53178: function(arg0, arg1, arg2) {
|
|
1689
1763
|
const ret = arg0.set(arg1, arg2);
|
|
1690
1764
|
return ret;
|
|
1691
1765
|
},
|
|
1692
1766
|
__wbg_set_6be42768c690e380: function(arg0, arg1, arg2) {
|
|
1693
1767
|
arg0[arg1] = arg2;
|
|
1694
1768
|
},
|
|
1695
|
-
|
|
1769
|
+
__wbg_set_a80955eb93b145c6: function(arg0, arg1, arg2) {
|
|
1696
1770
|
arg0[arg1 >>> 0] = arg2;
|
|
1697
1771
|
},
|
|
1698
1772
|
__wbg_stack_3b0d974bbf31e44f: function(arg0, arg1) {
|
|
@@ -1702,27 +1776,27 @@ function __wbg_get_imports() {
|
|
|
1702
1776
|
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
1703
1777
|
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
1704
1778
|
},
|
|
1705
|
-
|
|
1706
|
-
const ret = typeof
|
|
1779
|
+
__wbg_static_accessor_GLOBAL_THIS_466428f93b4eaa76: function() {
|
|
1780
|
+
const ret = typeof globalThis === 'undefined' ? null : globalThis;
|
|
1707
1781
|
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
|
|
1708
1782
|
},
|
|
1709
|
-
|
|
1710
|
-
const ret = typeof
|
|
1783
|
+
__wbg_static_accessor_GLOBAL_c7aea38d4de089bc: function() {
|
|
1784
|
+
const ret = typeof global === 'undefined' ? null : global;
|
|
1711
1785
|
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
|
|
1712
1786
|
},
|
|
1713
|
-
|
|
1787
|
+
__wbg_static_accessor_SELF_42d4fae05e59267a: function() {
|
|
1714
1788
|
const ret = typeof self === 'undefined' ? null : self;
|
|
1715
1789
|
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
|
|
1716
1790
|
},
|
|
1717
|
-
|
|
1791
|
+
__wbg_static_accessor_WINDOW_e0db14a0eba6a812: function() {
|
|
1718
1792
|
const ret = typeof window === 'undefined' ? null : window;
|
|
1719
1793
|
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
|
|
1720
1794
|
},
|
|
1721
|
-
|
|
1795
|
+
__wbg_subarray_a4cc58201c7359fd: function(arg0, arg1, arg2) {
|
|
1722
1796
|
const ret = arg0.subarray(arg1 >>> 0, arg2 >>> 0);
|
|
1723
1797
|
return ret;
|
|
1724
1798
|
},
|
|
1725
|
-
|
|
1799
|
+
__wbg_value_1e2369fab29b420e: function(arg0) {
|
|
1726
1800
|
const ret = arg0.value;
|
|
1727
1801
|
return ret;
|
|
1728
1802
|
},
|
|
@@ -2003,11 +2077,15 @@ function __wbg_finalize_init(instance, module) {
|
|
|
2003
2077
|
|
|
2004
2078
|
async function __wbg_load(module, imports) {
|
|
2005
2079
|
if (typeof Response === 'function' && module instanceof Response) {
|
|
2080
|
+
if (!module.ok) {
|
|
2081
|
+
throw new Error(`failed to fetch Wasm: ${module.status} ${module.statusText} fetching '${module.url}'`);
|
|
2082
|
+
}
|
|
2083
|
+
|
|
2006
2084
|
if (typeof WebAssembly.instantiateStreaming === 'function') {
|
|
2007
2085
|
try {
|
|
2008
2086
|
return await WebAssembly.instantiateStreaming(module, imports);
|
|
2009
2087
|
} catch (e) {
|
|
2010
|
-
const validResponse =
|
|
2088
|
+
const validResponse = expectedResponseType(module.type);
|
|
2011
2089
|
|
|
2012
2090
|
if (validResponse && module.headers.get('Content-Type') !== 'application/wasm') {
|
|
2013
2091
|
console.warn("`WebAssembly.instantiateStreaming` failed because your server does not serve Wasm with `application/wasm` MIME type. Falling back to `WebAssembly.instantiate` which is slower. Original error:\n", e);
|