@sats-connect/core 0.14.0-37f2f13 → 0.14.0-678332e
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/dist/index.d.mts +30 -2
- package/dist/index.d.ts +30 -2
- package/dist/index.js +597 -572
- package/dist/index.mjs +593 -572
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// src/request/index.ts
|
|
2
|
-
import * as
|
|
2
|
+
import * as v54 from "valibot";
|
|
3
3
|
|
|
4
4
|
// src/provider/types.ts
|
|
5
5
|
import * as v4 from "valibot";
|
|
@@ -243,7 +243,7 @@ var sanitizeAddressPurposeRequest = (method, params) => {
|
|
|
243
243
|
};
|
|
244
244
|
|
|
245
245
|
// src/request/types/btcMethods.ts
|
|
246
|
-
import * as
|
|
246
|
+
import * as v19 from "valibot";
|
|
247
247
|
|
|
248
248
|
// src/request/types/walletMethods/addNetwork.ts
|
|
249
249
|
import * as v5 from "valibot";
|
|
@@ -465,50 +465,67 @@ var getWalletTypeRequestMessageSchema = v14.object({
|
|
|
465
465
|
}).entries
|
|
466
466
|
});
|
|
467
467
|
|
|
468
|
-
// src/request/types/walletMethods/
|
|
468
|
+
// src/request/types/walletMethods/openBridge.ts
|
|
469
469
|
import * as v15 from "valibot";
|
|
470
|
-
var
|
|
471
|
-
var
|
|
472
|
-
|
|
470
|
+
var openBridgeMethodName = "wallet_openBridge";
|
|
471
|
+
var openBridgeParamsSchema = v15.object({
|
|
472
|
+
fromAsset: v15.string(),
|
|
473
|
+
toAsset: v15.string()
|
|
473
474
|
});
|
|
474
|
-
var
|
|
475
|
-
var
|
|
475
|
+
var openBridgeResultSchema = v15.nullish(v15.null());
|
|
476
|
+
var openBridgeRequestMessageSchema = v15.object({
|
|
476
477
|
...rpcRequestMessageSchema.entries,
|
|
477
478
|
...v15.object({
|
|
478
|
-
method: v15.literal(
|
|
479
|
-
params:
|
|
479
|
+
method: v15.literal(openBridgeMethodName),
|
|
480
|
+
params: openBridgeParamsSchema,
|
|
480
481
|
id: v15.string()
|
|
481
482
|
}).entries
|
|
482
483
|
});
|
|
483
484
|
|
|
484
|
-
// src/request/types/walletMethods/
|
|
485
|
+
// src/request/types/walletMethods/openReceive.ts
|
|
485
486
|
import * as v16 from "valibot";
|
|
486
|
-
var
|
|
487
|
-
var
|
|
488
|
-
|
|
489
|
-
|
|
487
|
+
var openReceiveMethodName = "wallet_openReceive";
|
|
488
|
+
var openReceiveParamsSchema = v16.object({
|
|
489
|
+
address: v16.string()
|
|
490
|
+
});
|
|
491
|
+
var openReceiveResultSchema = addressSchema;
|
|
492
|
+
var openReceiveRequestMessageSchema = v16.object({
|
|
490
493
|
...rpcRequestMessageSchema.entries,
|
|
491
494
|
...v16.object({
|
|
492
|
-
method: v16.literal(
|
|
493
|
-
params:
|
|
495
|
+
method: v16.literal(openReceiveMethodName),
|
|
496
|
+
params: openReceiveParamsSchema,
|
|
494
497
|
id: v16.string()
|
|
495
498
|
}).entries
|
|
496
499
|
});
|
|
497
500
|
|
|
498
|
-
// src/request/types/walletMethods/
|
|
501
|
+
// src/request/types/walletMethods/renouncePermissions.ts
|
|
499
502
|
import * as v17 from "valibot";
|
|
500
|
-
var
|
|
501
|
-
var
|
|
502
|
-
var
|
|
503
|
-
var
|
|
503
|
+
var renouncePermissionsMethodName = "wallet_renouncePermissions";
|
|
504
|
+
var renouncePermissionsParamsSchema = v17.nullish(v17.null());
|
|
505
|
+
var renouncePermissionsResultSchema = v17.nullish(v17.null());
|
|
506
|
+
var renouncePermissionsRequestMessageSchema = v17.object({
|
|
504
507
|
...rpcRequestMessageSchema.entries,
|
|
505
508
|
...v17.object({
|
|
506
|
-
method: v17.literal(
|
|
507
|
-
params:
|
|
509
|
+
method: v17.literal(renouncePermissionsMethodName),
|
|
510
|
+
params: renouncePermissionsParamsSchema,
|
|
508
511
|
id: v17.string()
|
|
509
512
|
}).entries
|
|
510
513
|
});
|
|
511
514
|
|
|
515
|
+
// src/request/types/walletMethods/requestPermissions.ts
|
|
516
|
+
import * as v18 from "valibot";
|
|
517
|
+
var requestPermissionsMethodName = "wallet_requestPermissions";
|
|
518
|
+
var requestPermissionsParamsSchema = v18.nullish(v18.array(PermissionRequestParams));
|
|
519
|
+
var requestPermissionsResultSchema = v18.literal(true);
|
|
520
|
+
var requestPermissionsRequestMessageSchema = v18.object({
|
|
521
|
+
...rpcRequestMessageSchema.entries,
|
|
522
|
+
...v18.object({
|
|
523
|
+
method: v18.literal(requestPermissionsMethodName),
|
|
524
|
+
params: requestPermissionsParamsSchema,
|
|
525
|
+
id: v18.string()
|
|
526
|
+
}).entries
|
|
527
|
+
});
|
|
528
|
+
|
|
512
529
|
// src/request/types/btcMethods.ts
|
|
513
530
|
var ProviderPlatform = /* @__PURE__ */ ((ProviderPlatform2) => {
|
|
514
531
|
ProviderPlatform2["Web"] = "web";
|
|
@@ -516,58 +533,58 @@ var ProviderPlatform = /* @__PURE__ */ ((ProviderPlatform2) => {
|
|
|
516
533
|
return ProviderPlatform2;
|
|
517
534
|
})(ProviderPlatform || {});
|
|
518
535
|
var getInfoMethodName = "getInfo";
|
|
519
|
-
var getInfoParamsSchema =
|
|
520
|
-
var getInfoResultSchema =
|
|
536
|
+
var getInfoParamsSchema = v19.nullish(v19.null());
|
|
537
|
+
var getInfoResultSchema = v19.object({
|
|
521
538
|
/**
|
|
522
539
|
* Version of the wallet.
|
|
523
540
|
*/
|
|
524
|
-
version:
|
|
541
|
+
version: v19.string(),
|
|
525
542
|
/**
|
|
526
543
|
* The platform the wallet is running on (web or mobile).
|
|
527
544
|
*/
|
|
528
|
-
platform:
|
|
545
|
+
platform: v19.optional(v19.enum(ProviderPlatform)),
|
|
529
546
|
/**
|
|
530
547
|
* [WBIP](https://wbips.netlify.app/wbips/WBIP002) methods supported by the wallet.
|
|
531
548
|
*/
|
|
532
|
-
methods:
|
|
549
|
+
methods: v19.optional(v19.array(v19.string())),
|
|
533
550
|
/**
|
|
534
551
|
* List of WBIP standards supported by the wallet. Not currently used.
|
|
535
552
|
*/
|
|
536
|
-
supports:
|
|
553
|
+
supports: v19.array(v19.string())
|
|
537
554
|
});
|
|
538
|
-
var getInfoRequestMessageSchema =
|
|
555
|
+
var getInfoRequestMessageSchema = v19.object({
|
|
539
556
|
...rpcRequestMessageSchema.entries,
|
|
540
|
-
...
|
|
541
|
-
method:
|
|
557
|
+
...v19.object({
|
|
558
|
+
method: v19.literal(getInfoMethodName),
|
|
542
559
|
params: getInfoParamsSchema,
|
|
543
|
-
id:
|
|
560
|
+
id: v19.string()
|
|
544
561
|
}).entries
|
|
545
562
|
});
|
|
546
563
|
var getAddressesMethodName = "getAddresses";
|
|
547
|
-
var getAddressesParamsSchema =
|
|
564
|
+
var getAddressesParamsSchema = v19.object({
|
|
548
565
|
/**
|
|
549
566
|
* The purposes for which to generate addresses. See
|
|
550
567
|
* {@linkcode AddressPurpose} for available purposes.
|
|
551
568
|
*/
|
|
552
|
-
purposes:
|
|
569
|
+
purposes: v19.array(v19.enum(AddressPurpose)),
|
|
553
570
|
/**
|
|
554
571
|
* A message to be displayed to the user in the request prompt.
|
|
555
572
|
*/
|
|
556
|
-
message:
|
|
573
|
+
message: v19.optional(v19.string())
|
|
557
574
|
});
|
|
558
|
-
var getAddressesResultSchema =
|
|
575
|
+
var getAddressesResultSchema = v19.object({
|
|
559
576
|
/**
|
|
560
577
|
* The addresses generated for the given purposes.
|
|
561
578
|
*/
|
|
562
|
-
addresses:
|
|
579
|
+
addresses: v19.array(addressSchema),
|
|
563
580
|
network: getNetworkResultSchema
|
|
564
581
|
});
|
|
565
|
-
var getAddressesRequestMessageSchema =
|
|
582
|
+
var getAddressesRequestMessageSchema = v19.object({
|
|
566
583
|
...rpcRequestMessageSchema.entries,
|
|
567
|
-
...
|
|
568
|
-
method:
|
|
584
|
+
...v19.object({
|
|
585
|
+
method: v19.literal(getAddressesMethodName),
|
|
569
586
|
params: getAddressesParamsSchema,
|
|
570
|
-
id:
|
|
587
|
+
id: v19.string()
|
|
571
588
|
}).entries
|
|
572
589
|
});
|
|
573
590
|
var signMessageMethodName = "signMessage";
|
|
@@ -576,606 +593,606 @@ var MessageSigningProtocols = /* @__PURE__ */ ((MessageSigningProtocols2) => {
|
|
|
576
593
|
MessageSigningProtocols2["BIP322"] = "BIP322";
|
|
577
594
|
return MessageSigningProtocols2;
|
|
578
595
|
})(MessageSigningProtocols || {});
|
|
579
|
-
var signMessageParamsSchema =
|
|
596
|
+
var signMessageParamsSchema = v19.object({
|
|
580
597
|
/**
|
|
581
598
|
* The address used for signing.
|
|
582
599
|
**/
|
|
583
|
-
address:
|
|
600
|
+
address: v19.string(),
|
|
584
601
|
/**
|
|
585
602
|
* The message to sign.
|
|
586
603
|
**/
|
|
587
|
-
message:
|
|
604
|
+
message: v19.string(),
|
|
588
605
|
/**
|
|
589
606
|
* The protocol to use for signing the message.
|
|
590
607
|
*/
|
|
591
|
-
protocol:
|
|
608
|
+
protocol: v19.optional(v19.enum(MessageSigningProtocols))
|
|
592
609
|
});
|
|
593
|
-
var signMessageResultSchema =
|
|
610
|
+
var signMessageResultSchema = v19.object({
|
|
594
611
|
/**
|
|
595
612
|
* The signature of the message.
|
|
596
613
|
*/
|
|
597
|
-
signature:
|
|
614
|
+
signature: v19.string(),
|
|
598
615
|
/**
|
|
599
616
|
* hash of the message.
|
|
600
617
|
*/
|
|
601
|
-
messageHash:
|
|
618
|
+
messageHash: v19.string(),
|
|
602
619
|
/**
|
|
603
620
|
* The address used for signing.
|
|
604
621
|
*/
|
|
605
|
-
address:
|
|
622
|
+
address: v19.string(),
|
|
606
623
|
/**
|
|
607
624
|
* The protocol to use for signing the message.
|
|
608
625
|
*/
|
|
609
|
-
protocol:
|
|
626
|
+
protocol: v19.enum(MessageSigningProtocols)
|
|
610
627
|
});
|
|
611
|
-
var signMessageRequestMessageSchema =
|
|
628
|
+
var signMessageRequestMessageSchema = v19.object({
|
|
612
629
|
...rpcRequestMessageSchema.entries,
|
|
613
|
-
...
|
|
614
|
-
method:
|
|
630
|
+
...v19.object({
|
|
631
|
+
method: v19.literal(signMessageMethodName),
|
|
615
632
|
params: signMessageParamsSchema,
|
|
616
|
-
id:
|
|
633
|
+
id: v19.string()
|
|
617
634
|
}).entries
|
|
618
635
|
});
|
|
619
636
|
var sendTransferMethodName = "sendTransfer";
|
|
620
|
-
var sendTransferParamsSchema =
|
|
637
|
+
var sendTransferParamsSchema = v19.object({
|
|
621
638
|
/**
|
|
622
639
|
* Array of recipients to send to.
|
|
623
640
|
* The amount to send to each recipient is in satoshis.
|
|
624
641
|
*/
|
|
625
|
-
recipients:
|
|
626
|
-
|
|
627
|
-
address:
|
|
628
|
-
amount:
|
|
642
|
+
recipients: v19.array(
|
|
643
|
+
v19.object({
|
|
644
|
+
address: v19.string(),
|
|
645
|
+
amount: v19.number()
|
|
629
646
|
})
|
|
630
647
|
)
|
|
631
648
|
});
|
|
632
|
-
var sendTransferResultSchema =
|
|
649
|
+
var sendTransferResultSchema = v19.object({
|
|
633
650
|
/**
|
|
634
651
|
* The transaction id as a hex-encoded string.
|
|
635
652
|
*/
|
|
636
|
-
txid:
|
|
653
|
+
txid: v19.string()
|
|
637
654
|
});
|
|
638
|
-
var sendTransferRequestMessageSchema =
|
|
655
|
+
var sendTransferRequestMessageSchema = v19.object({
|
|
639
656
|
...rpcRequestMessageSchema.entries,
|
|
640
|
-
...
|
|
641
|
-
method:
|
|
657
|
+
...v19.object({
|
|
658
|
+
method: v19.literal(sendTransferMethodName),
|
|
642
659
|
params: sendTransferParamsSchema,
|
|
643
|
-
id:
|
|
660
|
+
id: v19.string()
|
|
644
661
|
}).entries
|
|
645
662
|
});
|
|
646
663
|
var signPsbtMethodName = "signPsbt";
|
|
647
|
-
var signPsbtParamsSchema =
|
|
664
|
+
var signPsbtParamsSchema = v19.object({
|
|
648
665
|
/**
|
|
649
666
|
* The base64 encoded PSBT to sign.
|
|
650
667
|
*/
|
|
651
|
-
psbt:
|
|
668
|
+
psbt: v19.string(),
|
|
652
669
|
/**
|
|
653
670
|
* The inputs to sign.
|
|
654
671
|
* The key is the address and the value is an array of indexes of the inputs to sign.
|
|
655
672
|
*/
|
|
656
|
-
signInputs:
|
|
673
|
+
signInputs: v19.optional(v19.record(v19.string(), v19.array(v19.number()))),
|
|
657
674
|
/**
|
|
658
675
|
* Whether to broadcast the transaction after signing.
|
|
659
676
|
**/
|
|
660
|
-
broadcast:
|
|
677
|
+
broadcast: v19.optional(v19.boolean())
|
|
661
678
|
});
|
|
662
|
-
var signPsbtResultSchema =
|
|
679
|
+
var signPsbtResultSchema = v19.object({
|
|
663
680
|
/**
|
|
664
681
|
* The base64 encoded PSBT after signing.
|
|
665
682
|
*/
|
|
666
|
-
psbt:
|
|
683
|
+
psbt: v19.string(),
|
|
667
684
|
/**
|
|
668
685
|
* The transaction id as a hex-encoded string.
|
|
669
686
|
* This is only returned if the transaction was broadcast.
|
|
670
687
|
**/
|
|
671
|
-
txid:
|
|
688
|
+
txid: v19.optional(v19.string())
|
|
672
689
|
});
|
|
673
|
-
var signPsbtRequestMessageSchema =
|
|
690
|
+
var signPsbtRequestMessageSchema = v19.object({
|
|
674
691
|
...rpcRequestMessageSchema.entries,
|
|
675
|
-
...
|
|
676
|
-
method:
|
|
692
|
+
...v19.object({
|
|
693
|
+
method: v19.literal(signPsbtMethodName),
|
|
677
694
|
params: signPsbtParamsSchema,
|
|
678
|
-
id:
|
|
695
|
+
id: v19.string()
|
|
679
696
|
}).entries
|
|
680
697
|
});
|
|
681
698
|
var getAccountsMethodName = "getAccounts";
|
|
682
|
-
var getAccountsParamsSchema =
|
|
699
|
+
var getAccountsParamsSchema = v19.object({
|
|
683
700
|
/**
|
|
684
701
|
* The purposes for which to generate addresses. See
|
|
685
702
|
* {@linkcode AddressPurpose} for available purposes.
|
|
686
703
|
*/
|
|
687
|
-
purposes:
|
|
704
|
+
purposes: v19.array(v19.enum(AddressPurpose)),
|
|
688
705
|
/**
|
|
689
706
|
* A message to be displayed to the user in the request prompt.
|
|
690
707
|
*/
|
|
691
|
-
message:
|
|
708
|
+
message: v19.optional(v19.string())
|
|
692
709
|
});
|
|
693
|
-
var getAccountsResultSchema =
|
|
694
|
-
|
|
710
|
+
var getAccountsResultSchema = v19.array(
|
|
711
|
+
v19.object({
|
|
695
712
|
...addressSchema.entries,
|
|
696
|
-
...
|
|
713
|
+
...v19.object({
|
|
697
714
|
walletType: walletTypeSchema
|
|
698
715
|
}).entries
|
|
699
716
|
})
|
|
700
717
|
);
|
|
701
|
-
var getAccountsRequestMessageSchema =
|
|
718
|
+
var getAccountsRequestMessageSchema = v19.object({
|
|
702
719
|
...rpcRequestMessageSchema.entries,
|
|
703
|
-
...
|
|
704
|
-
method:
|
|
720
|
+
...v19.object({
|
|
721
|
+
method: v19.literal(getAccountsMethodName),
|
|
705
722
|
params: getAccountsParamsSchema,
|
|
706
|
-
id:
|
|
723
|
+
id: v19.string()
|
|
707
724
|
}).entries
|
|
708
725
|
});
|
|
709
726
|
var getBalanceMethodName = "getBalance";
|
|
710
|
-
var getBalanceParamsSchema =
|
|
711
|
-
var getBalanceResultSchema =
|
|
727
|
+
var getBalanceParamsSchema = v19.nullish(v19.null());
|
|
728
|
+
var getBalanceResultSchema = v19.object({
|
|
712
729
|
/**
|
|
713
730
|
* The confirmed balance of the wallet in sats. Using a string due to chrome
|
|
714
731
|
* messages not supporting bigint
|
|
715
732
|
* (https://issues.chromium.org/issues/40116184).
|
|
716
733
|
*/
|
|
717
|
-
confirmed:
|
|
734
|
+
confirmed: v19.string(),
|
|
718
735
|
/**
|
|
719
736
|
* The unconfirmed balance of the wallet in sats. Using a string due to chrome
|
|
720
737
|
* messages not supporting bigint
|
|
721
738
|
* (https://issues.chromium.org/issues/40116184).
|
|
722
739
|
*/
|
|
723
|
-
unconfirmed:
|
|
740
|
+
unconfirmed: v19.string(),
|
|
724
741
|
/**
|
|
725
742
|
* The total balance (both confirmed and unconfrimed UTXOs) of the wallet in
|
|
726
743
|
* sats. Using a string due to chrome messages not supporting bigint
|
|
727
744
|
* (https://issues.chromium.org/issues/40116184).
|
|
728
745
|
*/
|
|
729
|
-
total:
|
|
746
|
+
total: v19.string()
|
|
730
747
|
});
|
|
731
|
-
var getBalanceRequestMessageSchema =
|
|
748
|
+
var getBalanceRequestMessageSchema = v19.object({
|
|
732
749
|
...rpcRequestMessageSchema.entries,
|
|
733
|
-
...
|
|
734
|
-
method:
|
|
735
|
-
id:
|
|
750
|
+
...v19.object({
|
|
751
|
+
method: v19.literal(getBalanceMethodName),
|
|
752
|
+
id: v19.string()
|
|
736
753
|
}).entries
|
|
737
754
|
});
|
|
738
755
|
|
|
739
756
|
// src/request/types/ordinalsMethods.ts
|
|
740
|
-
import * as
|
|
757
|
+
import * as v20 from "valibot";
|
|
741
758
|
var getInscriptionsMethodName = "ord_getInscriptions";
|
|
742
|
-
var getInscriptionsParamsSchema =
|
|
743
|
-
offset:
|
|
744
|
-
limit:
|
|
745
|
-
});
|
|
746
|
-
var getInscriptionsResultSchema =
|
|
747
|
-
total:
|
|
748
|
-
limit:
|
|
749
|
-
offset:
|
|
750
|
-
inscriptions:
|
|
751
|
-
|
|
752
|
-
inscriptionId:
|
|
753
|
-
inscriptionNumber:
|
|
754
|
-
address:
|
|
755
|
-
collectionName:
|
|
756
|
-
postage:
|
|
757
|
-
contentLength:
|
|
758
|
-
contentType:
|
|
759
|
-
timestamp:
|
|
760
|
-
offset:
|
|
761
|
-
genesisTransaction:
|
|
762
|
-
output:
|
|
759
|
+
var getInscriptionsParamsSchema = v20.object({
|
|
760
|
+
offset: v20.number(),
|
|
761
|
+
limit: v20.number()
|
|
762
|
+
});
|
|
763
|
+
var getInscriptionsResultSchema = v20.object({
|
|
764
|
+
total: v20.number(),
|
|
765
|
+
limit: v20.number(),
|
|
766
|
+
offset: v20.number(),
|
|
767
|
+
inscriptions: v20.array(
|
|
768
|
+
v20.object({
|
|
769
|
+
inscriptionId: v20.string(),
|
|
770
|
+
inscriptionNumber: v20.string(),
|
|
771
|
+
address: v20.string(),
|
|
772
|
+
collectionName: v20.optional(v20.string()),
|
|
773
|
+
postage: v20.string(),
|
|
774
|
+
contentLength: v20.string(),
|
|
775
|
+
contentType: v20.string(),
|
|
776
|
+
timestamp: v20.number(),
|
|
777
|
+
offset: v20.number(),
|
|
778
|
+
genesisTransaction: v20.string(),
|
|
779
|
+
output: v20.string()
|
|
763
780
|
})
|
|
764
781
|
)
|
|
765
782
|
});
|
|
766
|
-
var getInscriptionsRequestMessageSchema =
|
|
783
|
+
var getInscriptionsRequestMessageSchema = v20.object({
|
|
767
784
|
...rpcRequestMessageSchema.entries,
|
|
768
|
-
...
|
|
769
|
-
method:
|
|
785
|
+
...v20.object({
|
|
786
|
+
method: v20.literal(getInscriptionsMethodName),
|
|
770
787
|
params: getInscriptionsParamsSchema,
|
|
771
|
-
id:
|
|
788
|
+
id: v20.string()
|
|
772
789
|
}).entries
|
|
773
790
|
});
|
|
774
791
|
var sendInscriptionsMethodName = "ord_sendInscriptions";
|
|
775
|
-
var sendInscriptionsParamsSchema =
|
|
776
|
-
transfers:
|
|
777
|
-
|
|
778
|
-
address:
|
|
779
|
-
inscriptionId:
|
|
792
|
+
var sendInscriptionsParamsSchema = v20.object({
|
|
793
|
+
transfers: v20.array(
|
|
794
|
+
v20.object({
|
|
795
|
+
address: v20.string(),
|
|
796
|
+
inscriptionId: v20.string()
|
|
780
797
|
})
|
|
781
798
|
)
|
|
782
799
|
});
|
|
783
|
-
var sendInscriptionsResultSchema =
|
|
784
|
-
txid:
|
|
800
|
+
var sendInscriptionsResultSchema = v20.object({
|
|
801
|
+
txid: v20.string()
|
|
785
802
|
});
|
|
786
|
-
var sendInscriptionsRequestMessageSchema =
|
|
803
|
+
var sendInscriptionsRequestMessageSchema = v20.object({
|
|
787
804
|
...rpcRequestMessageSchema.entries,
|
|
788
|
-
...
|
|
789
|
-
method:
|
|
805
|
+
...v20.object({
|
|
806
|
+
method: v20.literal(sendInscriptionsMethodName),
|
|
790
807
|
params: sendInscriptionsParamsSchema,
|
|
791
|
-
id:
|
|
808
|
+
id: v20.string()
|
|
792
809
|
}).entries
|
|
793
810
|
});
|
|
794
811
|
|
|
795
812
|
// src/request/types/runesMethods/etch.ts
|
|
796
|
-
import * as
|
|
813
|
+
import * as v21 from "valibot";
|
|
797
814
|
var runesEtchMethodName = "runes_etch";
|
|
798
|
-
var etchTermsSchema =
|
|
799
|
-
amount:
|
|
800
|
-
cap:
|
|
801
|
-
heightStart:
|
|
802
|
-
heightEnd:
|
|
803
|
-
offsetStart:
|
|
804
|
-
offsetEnd:
|
|
805
|
-
});
|
|
806
|
-
var inscriptionDetailsSchema =
|
|
807
|
-
contentType:
|
|
808
|
-
contentBase64:
|
|
809
|
-
});
|
|
810
|
-
var runesEtchParamsSchema =
|
|
811
|
-
runeName:
|
|
812
|
-
divisibility:
|
|
813
|
-
symbol:
|
|
814
|
-
premine:
|
|
815
|
-
isMintable:
|
|
816
|
-
delegateInscriptionId:
|
|
817
|
-
destinationAddress:
|
|
818
|
-
refundAddress:
|
|
819
|
-
feeRate:
|
|
820
|
-
appServiceFee:
|
|
821
|
-
appServiceFeeAddress:
|
|
822
|
-
terms:
|
|
823
|
-
inscriptionDetails:
|
|
824
|
-
network:
|
|
825
|
-
});
|
|
826
|
-
var runesEtchResultSchema =
|
|
827
|
-
orderId:
|
|
828
|
-
fundTransactionId:
|
|
829
|
-
fundingAddress:
|
|
830
|
-
});
|
|
831
|
-
var runesEtchRequestMessageSchema =
|
|
815
|
+
var etchTermsSchema = v21.object({
|
|
816
|
+
amount: v21.string(),
|
|
817
|
+
cap: v21.string(),
|
|
818
|
+
heightStart: v21.optional(v21.string()),
|
|
819
|
+
heightEnd: v21.optional(v21.string()),
|
|
820
|
+
offsetStart: v21.optional(v21.string()),
|
|
821
|
+
offsetEnd: v21.optional(v21.string())
|
|
822
|
+
});
|
|
823
|
+
var inscriptionDetailsSchema = v21.object({
|
|
824
|
+
contentType: v21.string(),
|
|
825
|
+
contentBase64: v21.string()
|
|
826
|
+
});
|
|
827
|
+
var runesEtchParamsSchema = v21.object({
|
|
828
|
+
runeName: v21.string(),
|
|
829
|
+
divisibility: v21.optional(v21.number()),
|
|
830
|
+
symbol: v21.optional(v21.string()),
|
|
831
|
+
premine: v21.optional(v21.string()),
|
|
832
|
+
isMintable: v21.boolean(),
|
|
833
|
+
delegateInscriptionId: v21.optional(v21.string()),
|
|
834
|
+
destinationAddress: v21.string(),
|
|
835
|
+
refundAddress: v21.string(),
|
|
836
|
+
feeRate: v21.number(),
|
|
837
|
+
appServiceFee: v21.optional(v21.number()),
|
|
838
|
+
appServiceFeeAddress: v21.optional(v21.string()),
|
|
839
|
+
terms: v21.optional(etchTermsSchema),
|
|
840
|
+
inscriptionDetails: v21.optional(inscriptionDetailsSchema),
|
|
841
|
+
network: v21.optional(v21.enum(BitcoinNetworkType))
|
|
842
|
+
});
|
|
843
|
+
var runesEtchResultSchema = v21.object({
|
|
844
|
+
orderId: v21.string(),
|
|
845
|
+
fundTransactionId: v21.string(),
|
|
846
|
+
fundingAddress: v21.string()
|
|
847
|
+
});
|
|
848
|
+
var runesEtchRequestMessageSchema = v21.object({
|
|
832
849
|
...rpcRequestMessageSchema.entries,
|
|
833
|
-
...
|
|
834
|
-
method:
|
|
850
|
+
...v21.object({
|
|
851
|
+
method: v21.literal(runesEtchMethodName),
|
|
835
852
|
params: runesEtchParamsSchema,
|
|
836
|
-
id:
|
|
853
|
+
id: v21.string()
|
|
837
854
|
}).entries
|
|
838
855
|
});
|
|
839
856
|
|
|
840
857
|
// src/request/types/runesMethods/getBalance.ts
|
|
841
|
-
import * as
|
|
858
|
+
import * as v22 from "valibot";
|
|
842
859
|
var runesGetBalanceMethodName = "runes_getBalance";
|
|
843
|
-
var runesGetBalanceParamsSchema =
|
|
844
|
-
var runesGetBalanceResultSchema =
|
|
845
|
-
balances:
|
|
846
|
-
|
|
847
|
-
runeName:
|
|
848
|
-
amount:
|
|
849
|
-
divisibility:
|
|
850
|
-
symbol:
|
|
851
|
-
inscriptionId:
|
|
852
|
-
spendableBalance:
|
|
860
|
+
var runesGetBalanceParamsSchema = v22.nullish(v22.null());
|
|
861
|
+
var runesGetBalanceResultSchema = v22.object({
|
|
862
|
+
balances: v22.array(
|
|
863
|
+
v22.object({
|
|
864
|
+
runeName: v22.string(),
|
|
865
|
+
amount: v22.string(),
|
|
866
|
+
divisibility: v22.number(),
|
|
867
|
+
symbol: v22.string(),
|
|
868
|
+
inscriptionId: v22.nullish(v22.string()),
|
|
869
|
+
spendableBalance: v22.string()
|
|
853
870
|
})
|
|
854
871
|
)
|
|
855
872
|
});
|
|
856
|
-
var runesGetBalanceRequestMessageSchema =
|
|
873
|
+
var runesGetBalanceRequestMessageSchema = v22.object({
|
|
857
874
|
...rpcRequestMessageSchema.entries,
|
|
858
|
-
...
|
|
859
|
-
method:
|
|
875
|
+
...v22.object({
|
|
876
|
+
method: v22.literal(runesGetBalanceMethodName),
|
|
860
877
|
params: runesGetBalanceParamsSchema,
|
|
861
|
-
id:
|
|
878
|
+
id: v22.string()
|
|
862
879
|
}).entries
|
|
863
880
|
});
|
|
864
881
|
|
|
865
882
|
// src/request/types/runesMethods/mint.ts
|
|
866
|
-
import * as
|
|
883
|
+
import * as v23 from "valibot";
|
|
867
884
|
var runesMintMethodName = "runes_mint";
|
|
868
|
-
var runesMintParamsSchema =
|
|
869
|
-
appServiceFee:
|
|
870
|
-
appServiceFeeAddress:
|
|
871
|
-
destinationAddress:
|
|
872
|
-
feeRate:
|
|
873
|
-
refundAddress:
|
|
874
|
-
repeats:
|
|
875
|
-
runeName:
|
|
876
|
-
network:
|
|
877
|
-
});
|
|
878
|
-
var runesMintResultSchema =
|
|
879
|
-
orderId:
|
|
880
|
-
fundTransactionId:
|
|
881
|
-
fundingAddress:
|
|
882
|
-
});
|
|
883
|
-
var runesMintRequestMessageSchema =
|
|
885
|
+
var runesMintParamsSchema = v23.object({
|
|
886
|
+
appServiceFee: v23.optional(v23.number()),
|
|
887
|
+
appServiceFeeAddress: v23.optional(v23.string()),
|
|
888
|
+
destinationAddress: v23.string(),
|
|
889
|
+
feeRate: v23.number(),
|
|
890
|
+
refundAddress: v23.string(),
|
|
891
|
+
repeats: v23.number(),
|
|
892
|
+
runeName: v23.string(),
|
|
893
|
+
network: v23.optional(v23.enum(BitcoinNetworkType))
|
|
894
|
+
});
|
|
895
|
+
var runesMintResultSchema = v23.object({
|
|
896
|
+
orderId: v23.string(),
|
|
897
|
+
fundTransactionId: v23.string(),
|
|
898
|
+
fundingAddress: v23.string()
|
|
899
|
+
});
|
|
900
|
+
var runesMintRequestMessageSchema = v23.object({
|
|
884
901
|
...rpcRequestMessageSchema.entries,
|
|
885
|
-
...
|
|
886
|
-
method:
|
|
902
|
+
...v23.object({
|
|
903
|
+
method: v23.literal(runesMintMethodName),
|
|
887
904
|
params: runesMintParamsSchema,
|
|
888
|
-
id:
|
|
905
|
+
id: v23.string()
|
|
889
906
|
}).entries
|
|
890
907
|
});
|
|
891
908
|
|
|
892
909
|
// src/request/types/runesMethods/transfer.ts
|
|
893
|
-
import * as
|
|
910
|
+
import * as v24 from "valibot";
|
|
894
911
|
var runesTransferMethodName = "runes_transfer";
|
|
895
|
-
var runesTransferParamsSchema =
|
|
896
|
-
recipients:
|
|
897
|
-
|
|
898
|
-
runeName:
|
|
899
|
-
amount:
|
|
900
|
-
address:
|
|
912
|
+
var runesTransferParamsSchema = v24.object({
|
|
913
|
+
recipients: v24.array(
|
|
914
|
+
v24.object({
|
|
915
|
+
runeName: v24.string(),
|
|
916
|
+
amount: v24.string(),
|
|
917
|
+
address: v24.string()
|
|
901
918
|
})
|
|
902
919
|
)
|
|
903
920
|
});
|
|
904
|
-
var runesTransferResultSchema =
|
|
905
|
-
txid:
|
|
921
|
+
var runesTransferResultSchema = v24.object({
|
|
922
|
+
txid: v24.string()
|
|
906
923
|
});
|
|
907
|
-
var runesTransferRequestMessageSchema =
|
|
924
|
+
var runesTransferRequestMessageSchema = v24.object({
|
|
908
925
|
...rpcRequestMessageSchema.entries,
|
|
909
|
-
...
|
|
910
|
-
method:
|
|
926
|
+
...v24.object({
|
|
927
|
+
method: v24.literal(runesTransferMethodName),
|
|
911
928
|
params: runesTransferParamsSchema,
|
|
912
|
-
id:
|
|
929
|
+
id: v24.string()
|
|
913
930
|
}).entries
|
|
914
931
|
});
|
|
915
932
|
|
|
916
933
|
// src/request/types/sparkMethods/flashnetMethods/clawbackFunds.ts
|
|
917
|
-
import * as
|
|
934
|
+
import * as v25 from "valibot";
|
|
918
935
|
var sparkFlashnetClawbackFundsMethodName = "spark_flashnet_clawbackFunds";
|
|
919
|
-
var sparkFlashnetClawbackFundsParamsSchema =
|
|
920
|
-
sparkTransferId:
|
|
921
|
-
lpIdentityPublicKey:
|
|
922
|
-
});
|
|
923
|
-
var sparkFlashnetClawbackFundsResultSchema = v24.object({
|
|
924
|
-
requestId: v24.string(),
|
|
925
|
-
accepted: v24.boolean(),
|
|
926
|
-
internalRequestId: v24.optional(v24.string()),
|
|
927
|
-
sparkStatusTrackingId: v24.optional(v24.string()),
|
|
928
|
-
error: v24.optional(v24.string())
|
|
929
|
-
});
|
|
930
|
-
var sparkFlashnetClawbackFundsRequestMessageSchema = v24.object({
|
|
931
|
-
...rpcRequestMessageSchema.entries,
|
|
932
|
-
...v24.object({
|
|
933
|
-
method: v24.literal(sparkFlashnetClawbackFundsMethodName),
|
|
934
|
-
params: sparkFlashnetClawbackFundsParamsSchema,
|
|
935
|
-
id: v24.string()
|
|
936
|
-
}).entries
|
|
936
|
+
var sparkFlashnetClawbackFundsParamsSchema = v25.object({
|
|
937
|
+
sparkTransferId: v25.string(),
|
|
938
|
+
lpIdentityPublicKey: v25.string()
|
|
937
939
|
});
|
|
938
|
-
|
|
939
|
-
// src/request/types/sparkMethods/flashnetMethods/executeRouteSwap.ts
|
|
940
|
-
import * as v25 from "valibot";
|
|
941
|
-
var sparkFlashnetExecuteRouteSwapMethodName = "spark_flashnet_executeRouteSwap";
|
|
942
|
-
var sparkFlashnetExecuteRouteSwapParamsSchema = v25.object({
|
|
943
|
-
hops: v25.array(
|
|
944
|
-
v25.object({
|
|
945
|
-
poolId: v25.string(),
|
|
946
|
-
assetInAddress: v25.string(),
|
|
947
|
-
assetOutAddress: v25.string(),
|
|
948
|
-
hopIntegratorFeeRateBps: v25.optional(v25.number())
|
|
949
|
-
})
|
|
950
|
-
),
|
|
951
|
-
initialAssetAddress: v25.string(),
|
|
952
|
-
inputAmount: v25.string(),
|
|
953
|
-
maxRouteSlippageBps: v25.string(),
|
|
954
|
-
minAmountOut: v25.optional(v25.string()),
|
|
955
|
-
integratorFeeRateBps: v25.optional(v25.number()),
|
|
956
|
-
integratorPublicKey: v25.optional(v25.string())
|
|
957
|
-
});
|
|
958
|
-
var sparkFlashnetExecuteRouteSwapResultSchema = v25.object({
|
|
940
|
+
var sparkFlashnetClawbackFundsResultSchema = v25.object({
|
|
959
941
|
requestId: v25.string(),
|
|
960
942
|
accepted: v25.boolean(),
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
finalOutboundTransferId: v25.string(),
|
|
943
|
+
internalRequestId: v25.optional(v25.string()),
|
|
944
|
+
sparkStatusTrackingId: v25.optional(v25.string()),
|
|
964
945
|
error: v25.optional(v25.string())
|
|
965
946
|
});
|
|
966
|
-
var
|
|
947
|
+
var sparkFlashnetClawbackFundsRequestMessageSchema = v25.object({
|
|
967
948
|
...rpcRequestMessageSchema.entries,
|
|
968
949
|
...v25.object({
|
|
969
|
-
method: v25.literal(
|
|
970
|
-
params:
|
|
950
|
+
method: v25.literal(sparkFlashnetClawbackFundsMethodName),
|
|
951
|
+
params: sparkFlashnetClawbackFundsParamsSchema,
|
|
971
952
|
id: v25.string()
|
|
972
953
|
}).entries
|
|
973
954
|
});
|
|
974
955
|
|
|
975
|
-
// src/request/types/sparkMethods/flashnetMethods/
|
|
956
|
+
// src/request/types/sparkMethods/flashnetMethods/executeRouteSwap.ts
|
|
976
957
|
import * as v26 from "valibot";
|
|
977
|
-
var
|
|
978
|
-
var
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
|
|
958
|
+
var sparkFlashnetExecuteRouteSwapMethodName = "spark_flashnet_executeRouteSwap";
|
|
959
|
+
var sparkFlashnetExecuteRouteSwapParamsSchema = v26.object({
|
|
960
|
+
hops: v26.array(
|
|
961
|
+
v26.object({
|
|
962
|
+
poolId: v26.string(),
|
|
963
|
+
assetInAddress: v26.string(),
|
|
964
|
+
assetOutAddress: v26.string(),
|
|
965
|
+
hopIntegratorFeeRateBps: v26.optional(v26.number())
|
|
966
|
+
})
|
|
967
|
+
),
|
|
968
|
+
initialAssetAddress: v26.string(),
|
|
969
|
+
inputAmount: v26.string(),
|
|
970
|
+
maxRouteSlippageBps: v26.string(),
|
|
984
971
|
minAmountOut: v26.optional(v26.string()),
|
|
985
972
|
integratorFeeRateBps: v26.optional(v26.number()),
|
|
986
973
|
integratorPublicKey: v26.optional(v26.string())
|
|
987
974
|
});
|
|
988
|
-
var
|
|
975
|
+
var sparkFlashnetExecuteRouteSwapResultSchema = v26.object({
|
|
989
976
|
requestId: v26.string(),
|
|
990
977
|
accepted: v26.boolean(),
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
assetOutAddress: v26.optional(v26.string()),
|
|
995
|
-
assetInAddress: v26.optional(v26.string()),
|
|
996
|
-
outboundTransferId: v26.optional(v26.string()),
|
|
978
|
+
outputAmount: v26.string(),
|
|
979
|
+
executionPrice: v26.string(),
|
|
980
|
+
finalOutboundTransferId: v26.string(),
|
|
997
981
|
error: v26.optional(v26.string())
|
|
998
982
|
});
|
|
999
|
-
var
|
|
983
|
+
var sparkFlashnetExecuteRouteSwapRequestMessageSchema = v26.object({
|
|
1000
984
|
...rpcRequestMessageSchema.entries,
|
|
1001
985
|
...v26.object({
|
|
1002
|
-
method: v26.literal(
|
|
1003
|
-
params:
|
|
986
|
+
method: v26.literal(sparkFlashnetExecuteRouteSwapMethodName),
|
|
987
|
+
params: sparkFlashnetExecuteRouteSwapParamsSchema,
|
|
1004
988
|
id: v26.string()
|
|
1005
989
|
}).entries
|
|
1006
990
|
});
|
|
1007
991
|
|
|
1008
|
-
// src/request/types/sparkMethods/flashnetMethods/
|
|
992
|
+
// src/request/types/sparkMethods/flashnetMethods/executeSwap.ts
|
|
1009
993
|
import * as v27 from "valibot";
|
|
994
|
+
var sparkFlashnetExecuteSwapMethodName = "spark_flashnet_executeSwap";
|
|
995
|
+
var sparkFlashnetExecuteSwapParamsSchema = v27.object({
|
|
996
|
+
poolId: v27.string(),
|
|
997
|
+
assetInAddress: v27.string(),
|
|
998
|
+
assetOutAddress: v27.string(),
|
|
999
|
+
amountIn: v27.string(),
|
|
1000
|
+
maxSlippageBps: v27.number(),
|
|
1001
|
+
minAmountOut: v27.optional(v27.string()),
|
|
1002
|
+
integratorFeeRateBps: v27.optional(v27.number()),
|
|
1003
|
+
integratorPublicKey: v27.optional(v27.string())
|
|
1004
|
+
});
|
|
1005
|
+
var sparkFlashnetExecuteSwapResultSchema = v27.object({
|
|
1006
|
+
requestId: v27.string(),
|
|
1007
|
+
accepted: v27.boolean(),
|
|
1008
|
+
amountOut: v27.optional(v27.string()),
|
|
1009
|
+
feeAmount: v27.optional(v27.string()),
|
|
1010
|
+
executionPrice: v27.optional(v27.string()),
|
|
1011
|
+
assetOutAddress: v27.optional(v27.string()),
|
|
1012
|
+
assetInAddress: v27.optional(v27.string()),
|
|
1013
|
+
outboundTransferId: v27.optional(v27.string()),
|
|
1014
|
+
error: v27.optional(v27.string())
|
|
1015
|
+
});
|
|
1016
|
+
var sparkFlashnetExecuteSwapRequestMessageSchema = v27.object({
|
|
1017
|
+
...rpcRequestMessageSchema.entries,
|
|
1018
|
+
...v27.object({
|
|
1019
|
+
method: v27.literal(sparkFlashnetExecuteSwapMethodName),
|
|
1020
|
+
params: sparkFlashnetExecuteSwapParamsSchema,
|
|
1021
|
+
id: v27.string()
|
|
1022
|
+
}).entries
|
|
1023
|
+
});
|
|
1024
|
+
|
|
1025
|
+
// src/request/types/sparkMethods/flashnetMethods/getClawbackEligibleTransfers.ts
|
|
1026
|
+
import * as v28 from "valibot";
|
|
1010
1027
|
var sparkGetClawbackEligibleTransfersMethodName = "spark_flashnet_getClawbackEligibleTransfers";
|
|
1011
|
-
var sparkGetClawbackEligibleTransfersParamsSchema =
|
|
1012
|
-
var sparkGetClawbackEligibleTransfersResultSchema =
|
|
1013
|
-
eligibleTransfers:
|
|
1014
|
-
|
|
1015
|
-
txId:
|
|
1016
|
-
createdAt:
|
|
1017
|
-
lpIdentityPublicKey:
|
|
1028
|
+
var sparkGetClawbackEligibleTransfersParamsSchema = v28.nullish(v28.null());
|
|
1029
|
+
var sparkGetClawbackEligibleTransfersResultSchema = v28.object({
|
|
1030
|
+
eligibleTransfers: v28.array(
|
|
1031
|
+
v28.object({
|
|
1032
|
+
txId: v28.string(),
|
|
1033
|
+
createdAt: v28.string(),
|
|
1034
|
+
lpIdentityPublicKey: v28.string()
|
|
1018
1035
|
})
|
|
1019
1036
|
)
|
|
1020
1037
|
});
|
|
1021
|
-
var sparkGetClawbackEligibleTransfersRequestMessageSchema =
|
|
1038
|
+
var sparkGetClawbackEligibleTransfersRequestMessageSchema = v28.object({
|
|
1022
1039
|
...rpcRequestMessageSchema.entries,
|
|
1023
|
-
...
|
|
1024
|
-
method:
|
|
1040
|
+
...v28.object({
|
|
1041
|
+
method: v28.literal(sparkGetClawbackEligibleTransfersMethodName),
|
|
1025
1042
|
params: sparkGetClawbackEligibleTransfersParamsSchema,
|
|
1026
|
-
id:
|
|
1043
|
+
id: v28.string()
|
|
1027
1044
|
}).entries
|
|
1028
1045
|
});
|
|
1029
1046
|
|
|
1030
1047
|
// src/request/types/sparkMethods/flashnetMethods/getJwt.ts
|
|
1031
|
-
import * as
|
|
1048
|
+
import * as v29 from "valibot";
|
|
1032
1049
|
var sparkFlashnetGetJwtMethodName = "spark_flashnet_getJwt";
|
|
1033
|
-
var sparkFlashnetGetJwtParamsSchema =
|
|
1034
|
-
var sparkFlashnetGetJwtResultSchema =
|
|
1050
|
+
var sparkFlashnetGetJwtParamsSchema = v29.null();
|
|
1051
|
+
var sparkFlashnetGetJwtResultSchema = v29.object({
|
|
1035
1052
|
/**
|
|
1036
1053
|
* The JWT token for authenticated requests to the Flashnet API.
|
|
1037
1054
|
*/
|
|
1038
|
-
jwt:
|
|
1055
|
+
jwt: v29.string()
|
|
1039
1056
|
});
|
|
1040
|
-
var sparkFlashnetGetJwtRequestMessageSchema =
|
|
1057
|
+
var sparkFlashnetGetJwtRequestMessageSchema = v29.object({
|
|
1041
1058
|
...rpcRequestMessageSchema.entries,
|
|
1042
|
-
...
|
|
1043
|
-
method:
|
|
1059
|
+
...v29.object({
|
|
1060
|
+
method: v29.literal(sparkFlashnetGetJwtMethodName),
|
|
1044
1061
|
params: sparkFlashnetGetJwtParamsSchema,
|
|
1045
|
-
id:
|
|
1062
|
+
id: v29.string()
|
|
1046
1063
|
}).entries
|
|
1047
1064
|
});
|
|
1048
1065
|
|
|
1049
1066
|
// src/request/types/sparkMethods/flashnetMethods/intents/addLiquidity.ts
|
|
1050
|
-
import * as v29 from "valibot";
|
|
1051
|
-
var sparkFlashnetAddLiquidityIntentSchema = v29.object({
|
|
1052
|
-
type: v29.literal("addLiquidity"),
|
|
1053
|
-
data: v29.object({
|
|
1054
|
-
userPublicKey: v29.string(),
|
|
1055
|
-
poolId: v29.string(),
|
|
1056
|
-
assetAAmount: v29.string(),
|
|
1057
|
-
assetBAmount: v29.string(),
|
|
1058
|
-
assetAMinAmountIn: v29.string(),
|
|
1059
|
-
assetBMinAmountIn: v29.string(),
|
|
1060
|
-
assetATransferId: v29.string(),
|
|
1061
|
-
assetBTransferId: v29.string(),
|
|
1062
|
-
nonce: v29.string()
|
|
1063
|
-
})
|
|
1064
|
-
});
|
|
1065
|
-
|
|
1066
|
-
// src/request/types/sparkMethods/flashnetMethods/intents/clawback.ts
|
|
1067
1067
|
import * as v30 from "valibot";
|
|
1068
|
-
var
|
|
1069
|
-
type: v30.literal("
|
|
1068
|
+
var sparkFlashnetAddLiquidityIntentSchema = v30.object({
|
|
1069
|
+
type: v30.literal("addLiquidity"),
|
|
1070
1070
|
data: v30.object({
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
|
|
1071
|
+
userPublicKey: v30.string(),
|
|
1072
|
+
poolId: v30.string(),
|
|
1073
|
+
assetAAmount: v30.string(),
|
|
1074
|
+
assetBAmount: v30.string(),
|
|
1075
|
+
assetAMinAmountIn: v30.string(),
|
|
1076
|
+
assetBMinAmountIn: v30.string(),
|
|
1077
|
+
assetATransferId: v30.string(),
|
|
1078
|
+
assetBTransferId: v30.string(),
|
|
1074
1079
|
nonce: v30.string()
|
|
1075
1080
|
})
|
|
1076
1081
|
});
|
|
1077
1082
|
|
|
1078
|
-
// src/request/types/sparkMethods/flashnetMethods/intents/
|
|
1083
|
+
// src/request/types/sparkMethods/flashnetMethods/intents/clawback.ts
|
|
1079
1084
|
import * as v31 from "valibot";
|
|
1080
|
-
var
|
|
1081
|
-
type: v31.literal("
|
|
1085
|
+
var sparkFlashnetClawbackIntentSchema = v31.object({
|
|
1086
|
+
type: v31.literal("clawback"),
|
|
1082
1087
|
data: v31.object({
|
|
1083
|
-
|
|
1084
|
-
|
|
1085
|
-
|
|
1088
|
+
senderPublicKey: v31.string(),
|
|
1089
|
+
sparkTransferId: v31.string(),
|
|
1090
|
+
lpIdentityPublicKey: v31.string(),
|
|
1086
1091
|
nonce: v31.string()
|
|
1087
1092
|
})
|
|
1088
1093
|
});
|
|
1089
1094
|
|
|
1090
|
-
// src/request/types/sparkMethods/flashnetMethods/intents/
|
|
1095
|
+
// src/request/types/sparkMethods/flashnetMethods/intents/confirmInitialDeposit.ts
|
|
1091
1096
|
import * as v32 from "valibot";
|
|
1092
|
-
var
|
|
1093
|
-
type: v32.literal("
|
|
1097
|
+
var sparkFlashnetConfirmInitialDepositIntentSchema = v32.object({
|
|
1098
|
+
type: v32.literal("confirmInitialDeposit"),
|
|
1094
1099
|
data: v32.object({
|
|
1100
|
+
poolId: v32.string(),
|
|
1101
|
+
assetASparkTransferId: v32.string(),
|
|
1095
1102
|
poolOwnerPublicKey: v32.string(),
|
|
1096
|
-
assetAAddress: v32.string(),
|
|
1097
|
-
assetBAddress: v32.string(),
|
|
1098
|
-
lpFeeRateBps: v32.union([v32.number(), v32.string()]),
|
|
1099
|
-
totalHostFeeRateBps: v32.union([v32.number(), v32.string()]),
|
|
1100
1103
|
nonce: v32.string()
|
|
1101
1104
|
})
|
|
1102
1105
|
});
|
|
1103
1106
|
|
|
1104
|
-
// src/request/types/sparkMethods/flashnetMethods/intents/
|
|
1107
|
+
// src/request/types/sparkMethods/flashnetMethods/intents/createConstantProductPool.ts
|
|
1105
1108
|
import * as v33 from "valibot";
|
|
1106
|
-
var
|
|
1107
|
-
type: v33.literal("
|
|
1109
|
+
var sparkFlashnetCreateConstantProductPoolIntentSchema = v33.object({
|
|
1110
|
+
type: v33.literal("createConstantProductPool"),
|
|
1108
1111
|
data: v33.object({
|
|
1112
|
+
poolOwnerPublicKey: v33.string(),
|
|
1109
1113
|
assetAAddress: v33.string(),
|
|
1110
1114
|
assetBAddress: v33.string(),
|
|
1111
|
-
assetAInitialReserve: v33.string(),
|
|
1112
|
-
virtualReserveA: v33.union([v33.number(), v33.string()]),
|
|
1113
|
-
virtualReserveB: v33.union([v33.number(), v33.string()]),
|
|
1114
|
-
threshold: v33.union([v33.number(), v33.string()]),
|
|
1115
1115
|
lpFeeRateBps: v33.union([v33.number(), v33.string()]),
|
|
1116
1116
|
totalHostFeeRateBps: v33.union([v33.number(), v33.string()]),
|
|
1117
|
-
poolOwnerPublicKey: v33.string(),
|
|
1118
1117
|
nonce: v33.string()
|
|
1119
1118
|
})
|
|
1120
1119
|
});
|
|
1121
1120
|
|
|
1122
|
-
// src/request/types/sparkMethods/flashnetMethods/intents/
|
|
1121
|
+
// src/request/types/sparkMethods/flashnetMethods/intents/createSingleSidedPool.ts
|
|
1123
1122
|
import * as v34 from "valibot";
|
|
1124
|
-
var
|
|
1125
|
-
type: v34.literal("
|
|
1123
|
+
var sparkFlashnetCreateSingleSidedPoolIntentSchema = v34.object({
|
|
1124
|
+
type: v34.literal("createSingleSidedPool"),
|
|
1126
1125
|
data: v34.object({
|
|
1127
|
-
|
|
1128
|
-
|
|
1129
|
-
|
|
1126
|
+
assetAAddress: v34.string(),
|
|
1127
|
+
assetBAddress: v34.string(),
|
|
1128
|
+
assetAInitialReserve: v34.string(),
|
|
1129
|
+
virtualReserveA: v34.union([v34.number(), v34.string()]),
|
|
1130
|
+
virtualReserveB: v34.union([v34.number(), v34.string()]),
|
|
1131
|
+
threshold: v34.union([v34.number(), v34.string()]),
|
|
1132
|
+
lpFeeRateBps: v34.union([v34.number(), v34.string()]),
|
|
1133
|
+
totalHostFeeRateBps: v34.union([v34.number(), v34.string()]),
|
|
1134
|
+
poolOwnerPublicKey: v34.string(),
|
|
1130
1135
|
nonce: v34.string()
|
|
1131
1136
|
})
|
|
1132
1137
|
});
|
|
1133
1138
|
|
|
1134
|
-
// src/request/types/sparkMethods/flashnetMethods/intents/
|
|
1139
|
+
// src/request/types/sparkMethods/flashnetMethods/intents/removeLiquidity.ts
|
|
1135
1140
|
import * as v35 from "valibot";
|
|
1136
|
-
var
|
|
1137
|
-
type: v35.literal("
|
|
1141
|
+
var sparkFlashnetRemoveLiquidityIntentSchema = v35.object({
|
|
1142
|
+
type: v35.literal("removeLiquidity"),
|
|
1138
1143
|
data: v35.object({
|
|
1139
1144
|
userPublicKey: v35.string(),
|
|
1140
|
-
|
|
1141
|
-
|
|
1142
|
-
v35.object({
|
|
1143
|
-
poolId: v35.string(),
|
|
1144
|
-
inputAssetAddress: v35.string(),
|
|
1145
|
-
outputAssetAddress: v35.string(),
|
|
1146
|
-
hopIntegratorFeeRateBps: v35.optional(v35.union([v35.number(), v35.string()]))
|
|
1147
|
-
})
|
|
1148
|
-
),
|
|
1149
|
-
inputAmount: v35.string(),
|
|
1150
|
-
maxRouteSlippageBps: v35.union([v35.number(), v35.string()]),
|
|
1151
|
-
minAmountOut: v35.string(),
|
|
1152
|
-
defaultIntegratorFeeRateBps: v35.optional(v35.union([v35.number(), v35.string()])),
|
|
1145
|
+
poolId: v35.string(),
|
|
1146
|
+
lpTokensToRemove: v35.string(),
|
|
1153
1147
|
nonce: v35.string()
|
|
1154
1148
|
})
|
|
1155
1149
|
});
|
|
1156
1150
|
|
|
1157
|
-
// src/request/types/sparkMethods/flashnetMethods/intents/
|
|
1151
|
+
// src/request/types/sparkMethods/flashnetMethods/intents/routeSwap.ts
|
|
1158
1152
|
import * as v36 from "valibot";
|
|
1159
|
-
var
|
|
1160
|
-
type: v36.literal("
|
|
1153
|
+
var sparkFlashnetRouteSwapIntentSchema = v36.object({
|
|
1154
|
+
type: v36.literal("executeRouteSwap"),
|
|
1161
1155
|
data: v36.object({
|
|
1162
1156
|
userPublicKey: v36.string(),
|
|
1163
|
-
|
|
1164
|
-
|
|
1165
|
-
|
|
1166
|
-
|
|
1167
|
-
|
|
1168
|
-
|
|
1157
|
+
initialSparkTransferId: v36.string(),
|
|
1158
|
+
hops: v36.array(
|
|
1159
|
+
v36.object({
|
|
1160
|
+
poolId: v36.string(),
|
|
1161
|
+
inputAssetAddress: v36.string(),
|
|
1162
|
+
outputAssetAddress: v36.string(),
|
|
1163
|
+
hopIntegratorFeeRateBps: v36.optional(v36.union([v36.number(), v36.string()]))
|
|
1164
|
+
})
|
|
1165
|
+
),
|
|
1166
|
+
inputAmount: v36.string(),
|
|
1167
|
+
maxRouteSlippageBps: v36.union([v36.number(), v36.string()]),
|
|
1169
1168
|
minAmountOut: v36.string(),
|
|
1170
|
-
|
|
1169
|
+
defaultIntegratorFeeRateBps: v36.optional(v36.union([v36.number(), v36.string()])),
|
|
1171
1170
|
nonce: v36.string()
|
|
1172
1171
|
})
|
|
1173
1172
|
});
|
|
1174
1173
|
|
|
1175
|
-
// src/request/types/sparkMethods/flashnetMethods/
|
|
1174
|
+
// src/request/types/sparkMethods/flashnetMethods/intents/swap.ts
|
|
1176
1175
|
import * as v37 from "valibot";
|
|
1176
|
+
var sparkFlashnetSwapIntentSchema = v37.object({
|
|
1177
|
+
type: v37.literal("executeSwap"),
|
|
1178
|
+
data: v37.object({
|
|
1179
|
+
userPublicKey: v37.string(),
|
|
1180
|
+
poolId: v37.string(),
|
|
1181
|
+
transferId: v37.string(),
|
|
1182
|
+
assetInAddress: v37.string(),
|
|
1183
|
+
assetOutAddress: v37.string(),
|
|
1184
|
+
amountIn: v37.string(),
|
|
1185
|
+
maxSlippageBps: v37.union([v37.number(), v37.string()]),
|
|
1186
|
+
minAmountOut: v37.string(),
|
|
1187
|
+
totalIntegratorFeeRateBps: v37.optional(v37.union([v37.number(), v37.string()])),
|
|
1188
|
+
nonce: v37.string()
|
|
1189
|
+
})
|
|
1190
|
+
});
|
|
1191
|
+
|
|
1192
|
+
// src/request/types/sparkMethods/flashnetMethods/signIntent.ts
|
|
1193
|
+
import * as v38 from "valibot";
|
|
1177
1194
|
var sparkFlashnetSignIntentMethodName = "spark_flashnet_signIntent";
|
|
1178
|
-
var sparkFlashnetSignIntentParamsSchema =
|
|
1195
|
+
var sparkFlashnetSignIntentParamsSchema = v38.union([
|
|
1179
1196
|
sparkFlashnetSwapIntentSchema,
|
|
1180
1197
|
sparkFlashnetRouteSwapIntentSchema,
|
|
1181
1198
|
sparkFlashnetAddLiquidityIntentSchema,
|
|
@@ -1185,109 +1202,109 @@ var sparkFlashnetSignIntentParamsSchema = v37.union([
|
|
|
1185
1202
|
sparkFlashnetCreateSingleSidedPoolIntentSchema,
|
|
1186
1203
|
sparkFlashnetRemoveLiquidityIntentSchema
|
|
1187
1204
|
]);
|
|
1188
|
-
var sparkFlashnetSignIntentResultSchema =
|
|
1205
|
+
var sparkFlashnetSignIntentResultSchema = v38.object({
|
|
1189
1206
|
/**
|
|
1190
1207
|
* The signed intent as a hex string.
|
|
1191
1208
|
*/
|
|
1192
|
-
signature:
|
|
1209
|
+
signature: v38.string()
|
|
1193
1210
|
});
|
|
1194
|
-
var sparkFlashnetSignIntentRequestMessageSchema =
|
|
1211
|
+
var sparkFlashnetSignIntentRequestMessageSchema = v38.object({
|
|
1195
1212
|
...rpcRequestMessageSchema.entries,
|
|
1196
|
-
...
|
|
1197
|
-
method:
|
|
1213
|
+
...v38.object({
|
|
1214
|
+
method: v38.literal(sparkFlashnetSignIntentMethodName),
|
|
1198
1215
|
params: sparkFlashnetSignIntentParamsSchema,
|
|
1199
|
-
id:
|
|
1216
|
+
id: v38.string()
|
|
1200
1217
|
}).entries
|
|
1201
1218
|
});
|
|
1202
1219
|
|
|
1203
1220
|
// src/request/types/sparkMethods/flashnetMethods/signStructuredMessage.ts
|
|
1204
|
-
import * as
|
|
1221
|
+
import * as v39 from "valibot";
|
|
1205
1222
|
var sparkFlashnetSignStructuredMessageMethodName = "spark_flashnet_signStructuredMessage";
|
|
1206
|
-
var sparkFlashnetSignStructuredMessageParamsSchema =
|
|
1207
|
-
message:
|
|
1223
|
+
var sparkFlashnetSignStructuredMessageParamsSchema = v39.object({
|
|
1224
|
+
message: v39.string()
|
|
1208
1225
|
});
|
|
1209
|
-
var sparkFlashnetSignStructuredMessageResultSchema =
|
|
1210
|
-
message:
|
|
1211
|
-
signature:
|
|
1226
|
+
var sparkFlashnetSignStructuredMessageResultSchema = v39.object({
|
|
1227
|
+
message: v39.string(),
|
|
1228
|
+
signature: v39.string()
|
|
1212
1229
|
});
|
|
1213
|
-
var sparkFlashnetSignStructuredMessageRequestMessageSchema =
|
|
1230
|
+
var sparkFlashnetSignStructuredMessageRequestMessageSchema = v39.object({
|
|
1214
1231
|
...rpcRequestMessageSchema.entries,
|
|
1215
|
-
...
|
|
1216
|
-
method:
|
|
1232
|
+
...v39.object({
|
|
1233
|
+
method: v39.literal(sparkFlashnetSignStructuredMessageMethodName),
|
|
1217
1234
|
params: sparkFlashnetSignStructuredMessageParamsSchema,
|
|
1218
|
-
id:
|
|
1235
|
+
id: v39.string()
|
|
1219
1236
|
}).entries
|
|
1220
1237
|
});
|
|
1221
1238
|
|
|
1222
1239
|
// src/request/types/sparkMethods/getAddresses.ts
|
|
1223
|
-
import * as
|
|
1240
|
+
import * as v40 from "valibot";
|
|
1224
1241
|
var sparkGetAddressesMethodName = "spark_getAddresses";
|
|
1225
|
-
var sparkGetAddressesParamsSchema =
|
|
1226
|
-
|
|
1242
|
+
var sparkGetAddressesParamsSchema = v40.nullish(
|
|
1243
|
+
v40.object({
|
|
1227
1244
|
/**
|
|
1228
1245
|
* A message to be displayed to the user in the request prompt.
|
|
1229
1246
|
*/
|
|
1230
|
-
message:
|
|
1247
|
+
message: v40.optional(v40.string())
|
|
1231
1248
|
})
|
|
1232
1249
|
);
|
|
1233
|
-
var sparkGetAddressesResultSchema =
|
|
1250
|
+
var sparkGetAddressesResultSchema = v40.object({
|
|
1234
1251
|
/**
|
|
1235
1252
|
* The addresses generated for the given purposes.
|
|
1236
1253
|
*/
|
|
1237
|
-
addresses:
|
|
1254
|
+
addresses: v40.array(addressSchema),
|
|
1238
1255
|
network: getNetworkResultSchema
|
|
1239
1256
|
});
|
|
1240
|
-
var sparkGetAddressesRequestMessageSchema =
|
|
1257
|
+
var sparkGetAddressesRequestMessageSchema = v40.object({
|
|
1241
1258
|
...rpcRequestMessageSchema.entries,
|
|
1242
|
-
...
|
|
1243
|
-
method:
|
|
1259
|
+
...v40.object({
|
|
1260
|
+
method: v40.literal(sparkGetAddressesMethodName),
|
|
1244
1261
|
params: sparkGetAddressesParamsSchema,
|
|
1245
|
-
id:
|
|
1262
|
+
id: v40.string()
|
|
1246
1263
|
}).entries
|
|
1247
1264
|
});
|
|
1248
1265
|
|
|
1249
1266
|
// src/request/types/sparkMethods/getBalance.ts
|
|
1250
|
-
import * as
|
|
1267
|
+
import * as v41 from "valibot";
|
|
1251
1268
|
var sparkGetBalanceMethodName = "spark_getBalance";
|
|
1252
|
-
var sparkGetBalanceParamsSchema =
|
|
1253
|
-
var sparkGetBalanceResultSchema =
|
|
1269
|
+
var sparkGetBalanceParamsSchema = v41.nullish(v41.null());
|
|
1270
|
+
var sparkGetBalanceResultSchema = v41.object({
|
|
1254
1271
|
/**
|
|
1255
1272
|
* The Spark Bitcoin address balance in sats in string form.
|
|
1256
1273
|
*/
|
|
1257
|
-
balance:
|
|
1258
|
-
tokenBalances:
|
|
1259
|
-
|
|
1274
|
+
balance: v41.string(),
|
|
1275
|
+
tokenBalances: v41.array(
|
|
1276
|
+
v41.object({
|
|
1260
1277
|
/* The address balance of the token in string form as it can overflow a js number */
|
|
1261
|
-
balance:
|
|
1262
|
-
tokenMetadata:
|
|
1263
|
-
tokenIdentifier:
|
|
1264
|
-
tokenName:
|
|
1265
|
-
tokenTicker:
|
|
1266
|
-
decimals:
|
|
1267
|
-
maxSupply:
|
|
1278
|
+
balance: v41.string(),
|
|
1279
|
+
tokenMetadata: v41.object({
|
|
1280
|
+
tokenIdentifier: v41.string(),
|
|
1281
|
+
tokenName: v41.string(),
|
|
1282
|
+
tokenTicker: v41.string(),
|
|
1283
|
+
decimals: v41.number(),
|
|
1284
|
+
maxSupply: v41.string()
|
|
1268
1285
|
})
|
|
1269
1286
|
})
|
|
1270
1287
|
)
|
|
1271
1288
|
});
|
|
1272
|
-
var sparkGetBalanceRequestMessageSchema =
|
|
1289
|
+
var sparkGetBalanceRequestMessageSchema = v41.object({
|
|
1273
1290
|
...rpcRequestMessageSchema.entries,
|
|
1274
|
-
...
|
|
1275
|
-
method:
|
|
1291
|
+
...v41.object({
|
|
1292
|
+
method: v41.literal(sparkGetBalanceMethodName),
|
|
1276
1293
|
params: sparkGetBalanceParamsSchema,
|
|
1277
|
-
id:
|
|
1294
|
+
id: v41.string()
|
|
1278
1295
|
}).entries
|
|
1279
1296
|
});
|
|
1280
1297
|
|
|
1281
1298
|
// src/request/types/sparkMethods/signMessage.ts
|
|
1282
|
-
import * as
|
|
1299
|
+
import * as v42 from "valibot";
|
|
1283
1300
|
var sparkSignMessageMethodName = "spark_signMessage";
|
|
1284
|
-
var sparkSignMessageParamsSchema =
|
|
1301
|
+
var sparkSignMessageParamsSchema = v42.object({
|
|
1285
1302
|
/**
|
|
1286
1303
|
* The message to sign. The message should only consist of valid UTF-8 characters.
|
|
1287
1304
|
*/
|
|
1288
|
-
message:
|
|
1305
|
+
message: v42.string()
|
|
1289
1306
|
});
|
|
1290
|
-
var sparkSignMessageResultSchema =
|
|
1307
|
+
var sparkSignMessageResultSchema = v42.object({
|
|
1291
1308
|
/**
|
|
1292
1309
|
* The signature, encoded in base64, of the message hash.
|
|
1293
1310
|
*
|
|
@@ -1295,98 +1312,98 @@ var sparkSignMessageResultSchema = v41.object({
|
|
|
1295
1312
|
* and the resulting byte array is hashed with SHA256 before signing
|
|
1296
1313
|
* with the private key.
|
|
1297
1314
|
*/
|
|
1298
|
-
signature:
|
|
1315
|
+
signature: v42.string()
|
|
1299
1316
|
});
|
|
1300
|
-
var sparkSignMessageRequestMessageSchema =
|
|
1317
|
+
var sparkSignMessageRequestMessageSchema = v42.object({
|
|
1301
1318
|
...rpcRequestMessageSchema.entries,
|
|
1302
|
-
...
|
|
1303
|
-
method:
|
|
1319
|
+
...v42.object({
|
|
1320
|
+
method: v42.literal(sparkSignMessageMethodName),
|
|
1304
1321
|
params: sparkSignMessageParamsSchema,
|
|
1305
|
-
id:
|
|
1322
|
+
id: v42.string()
|
|
1306
1323
|
}).entries
|
|
1307
1324
|
});
|
|
1308
1325
|
|
|
1309
1326
|
// src/request/types/sparkMethods/transfer.ts
|
|
1310
|
-
import * as
|
|
1327
|
+
import * as v43 from "valibot";
|
|
1311
1328
|
var sparkTransferMethodName = "spark_transfer";
|
|
1312
|
-
var sparkTransferParamsSchema =
|
|
1329
|
+
var sparkTransferParamsSchema = v43.object({
|
|
1313
1330
|
/**
|
|
1314
1331
|
* Amount of SATS to transfer as a string or number.
|
|
1315
1332
|
*/
|
|
1316
|
-
amountSats:
|
|
1333
|
+
amountSats: v43.union([v43.number(), v43.string()]),
|
|
1317
1334
|
/**
|
|
1318
1335
|
* The recipient's spark address.
|
|
1319
1336
|
*/
|
|
1320
|
-
receiverSparkAddress:
|
|
1337
|
+
receiverSparkAddress: v43.string()
|
|
1321
1338
|
});
|
|
1322
|
-
var sparkTransferResultSchema =
|
|
1339
|
+
var sparkTransferResultSchema = v43.object({
|
|
1323
1340
|
/**
|
|
1324
1341
|
* The ID of the transaction.
|
|
1325
1342
|
*/
|
|
1326
|
-
id:
|
|
1343
|
+
id: v43.string()
|
|
1327
1344
|
});
|
|
1328
|
-
var sparkTransferRequestMessageSchema =
|
|
1345
|
+
var sparkTransferRequestMessageSchema = v43.object({
|
|
1329
1346
|
...rpcRequestMessageSchema.entries,
|
|
1330
|
-
...
|
|
1331
|
-
method:
|
|
1347
|
+
...v43.object({
|
|
1348
|
+
method: v43.literal(sparkTransferMethodName),
|
|
1332
1349
|
params: sparkTransferParamsSchema,
|
|
1333
|
-
id:
|
|
1350
|
+
id: v43.string()
|
|
1334
1351
|
}).entries
|
|
1335
1352
|
});
|
|
1336
1353
|
|
|
1337
1354
|
// src/request/types/sparkMethods/transferToken.ts
|
|
1338
|
-
import * as
|
|
1355
|
+
import * as v44 from "valibot";
|
|
1339
1356
|
var sparkTransferTokenMethodName = "spark_transferToken";
|
|
1340
|
-
var sparkTransferTokenParamsSchema =
|
|
1357
|
+
var sparkTransferTokenParamsSchema = v44.object({
|
|
1341
1358
|
/**
|
|
1342
1359
|
* Amount of units of the token to transfer as a string or number.
|
|
1343
1360
|
*/
|
|
1344
|
-
tokenAmount:
|
|
1361
|
+
tokenAmount: v44.union([v44.number(), v44.string()]),
|
|
1345
1362
|
/**
|
|
1346
1363
|
* The Bech32m token identifier.
|
|
1347
1364
|
*/
|
|
1348
|
-
tokenIdentifier:
|
|
1365
|
+
tokenIdentifier: v44.string(),
|
|
1349
1366
|
/**
|
|
1350
1367
|
* The recipient's spark address.
|
|
1351
1368
|
*/
|
|
1352
|
-
receiverSparkAddress:
|
|
1369
|
+
receiverSparkAddress: v44.string()
|
|
1353
1370
|
});
|
|
1354
|
-
var sparkTransferTokenResultSchema =
|
|
1371
|
+
var sparkTransferTokenResultSchema = v44.object({
|
|
1355
1372
|
/**
|
|
1356
1373
|
* The ID of the transaction.
|
|
1357
1374
|
*/
|
|
1358
|
-
id:
|
|
1375
|
+
id: v44.string()
|
|
1359
1376
|
});
|
|
1360
|
-
var sparkTransferTokenRequestMessageSchema =
|
|
1377
|
+
var sparkTransferTokenRequestMessageSchema = v44.object({
|
|
1361
1378
|
...rpcRequestMessageSchema.entries,
|
|
1362
|
-
...
|
|
1363
|
-
method:
|
|
1379
|
+
...v44.object({
|
|
1380
|
+
method: v44.literal(sparkTransferTokenMethodName),
|
|
1364
1381
|
params: sparkTransferTokenParamsSchema,
|
|
1365
|
-
id:
|
|
1382
|
+
id: v44.string()
|
|
1366
1383
|
}).entries
|
|
1367
1384
|
});
|
|
1368
1385
|
|
|
1369
1386
|
// src/request/types/stxMethods/callContract.ts
|
|
1370
|
-
import * as
|
|
1387
|
+
import * as v45 from "valibot";
|
|
1371
1388
|
var stxCallContractMethodName = "stx_callContract";
|
|
1372
|
-
var stxCallContractParamsSchema =
|
|
1389
|
+
var stxCallContractParamsSchema = v45.object({
|
|
1373
1390
|
/**
|
|
1374
1391
|
* The contract principal.
|
|
1375
1392
|
*
|
|
1376
1393
|
* E.g. `"SPKE...GD5C.my-contract"`
|
|
1377
1394
|
*/
|
|
1378
|
-
contract:
|
|
1395
|
+
contract: v45.string(),
|
|
1379
1396
|
/**
|
|
1380
1397
|
* The name of the function to call.
|
|
1381
1398
|
*
|
|
1382
1399
|
* Note: spec changes ongoing,
|
|
1383
1400
|
* https://github.com/stacksgov/sips/pull/166#pullrequestreview-1914236999
|
|
1384
1401
|
*/
|
|
1385
|
-
functionName:
|
|
1402
|
+
functionName: v45.string(),
|
|
1386
1403
|
/**
|
|
1387
1404
|
* @deprecated in favor of `functionArgs` for @stacks/connect compatibility
|
|
1388
1405
|
*/
|
|
1389
|
-
arguments:
|
|
1406
|
+
arguments: v45.optional(v45.array(v45.string())),
|
|
1390
1407
|
/**
|
|
1391
1408
|
* The function's arguments. The arguments are expected to be hex-encoded
|
|
1392
1409
|
* strings of Clarity values.
|
|
@@ -1401,274 +1418,274 @@ var stxCallContractParamsSchema = v44.object({
|
|
|
1401
1418
|
* const hexArgs = functionArgs.map(cvToHex);
|
|
1402
1419
|
* ```
|
|
1403
1420
|
*/
|
|
1404
|
-
functionArgs:
|
|
1421
|
+
functionArgs: v45.optional(v45.array(v45.string())),
|
|
1405
1422
|
/**
|
|
1406
1423
|
* The post conditions to apply to the contract call.
|
|
1407
1424
|
*/
|
|
1408
|
-
postConditions:
|
|
1425
|
+
postConditions: v45.optional(v45.array(v45.string())),
|
|
1409
1426
|
/**
|
|
1410
1427
|
* The mode to apply to the post conditions.
|
|
1411
1428
|
*/
|
|
1412
|
-
postConditionMode:
|
|
1429
|
+
postConditionMode: v45.optional(v45.union([v45.literal("allow"), v45.literal("deny")]))
|
|
1413
1430
|
});
|
|
1414
|
-
var stxCallContractResultSchema =
|
|
1431
|
+
var stxCallContractResultSchema = v45.object({
|
|
1415
1432
|
/**
|
|
1416
1433
|
* The ID of the transaction.
|
|
1417
1434
|
*/
|
|
1418
|
-
txid:
|
|
1435
|
+
txid: v45.string(),
|
|
1419
1436
|
/**
|
|
1420
1437
|
* A Stacks transaction as a hex-encoded string.
|
|
1421
1438
|
*/
|
|
1422
|
-
transaction:
|
|
1439
|
+
transaction: v45.string()
|
|
1423
1440
|
});
|
|
1424
|
-
var stxCallContractRequestMessageSchema =
|
|
1441
|
+
var stxCallContractRequestMessageSchema = v45.object({
|
|
1425
1442
|
...rpcRequestMessageSchema.entries,
|
|
1426
|
-
...
|
|
1427
|
-
method:
|
|
1443
|
+
...v45.object({
|
|
1444
|
+
method: v45.literal(stxCallContractMethodName),
|
|
1428
1445
|
params: stxCallContractParamsSchema,
|
|
1429
|
-
id:
|
|
1446
|
+
id: v45.string()
|
|
1430
1447
|
}).entries
|
|
1431
1448
|
});
|
|
1432
1449
|
|
|
1433
1450
|
// src/request/types/stxMethods/deployContract.ts
|
|
1434
|
-
import * as
|
|
1451
|
+
import * as v46 from "valibot";
|
|
1435
1452
|
var stxDeployContractMethodName = "stx_deployContract";
|
|
1436
|
-
var stxDeployContractParamsSchema =
|
|
1453
|
+
var stxDeployContractParamsSchema = v46.object({
|
|
1437
1454
|
/**
|
|
1438
1455
|
* Name of the contract.
|
|
1439
1456
|
*/
|
|
1440
|
-
name:
|
|
1457
|
+
name: v46.string(),
|
|
1441
1458
|
/**
|
|
1442
1459
|
* The source code of the Clarity contract.
|
|
1443
1460
|
*/
|
|
1444
|
-
clarityCode:
|
|
1461
|
+
clarityCode: v46.string(),
|
|
1445
1462
|
/**
|
|
1446
1463
|
* The version of the Clarity contract.
|
|
1447
1464
|
*/
|
|
1448
|
-
clarityVersion:
|
|
1465
|
+
clarityVersion: v46.optional(v46.number()),
|
|
1449
1466
|
/**
|
|
1450
1467
|
* The post conditions to apply to the contract call.
|
|
1451
1468
|
*/
|
|
1452
|
-
postConditions:
|
|
1469
|
+
postConditions: v46.optional(v46.array(v46.string())),
|
|
1453
1470
|
/**
|
|
1454
1471
|
* The mode to apply to the post conditions.
|
|
1455
1472
|
*/
|
|
1456
|
-
postConditionMode:
|
|
1473
|
+
postConditionMode: v46.optional(v46.union([v46.literal("allow"), v46.literal("deny")]))
|
|
1457
1474
|
});
|
|
1458
|
-
var stxDeployContractResultSchema =
|
|
1475
|
+
var stxDeployContractResultSchema = v46.object({
|
|
1459
1476
|
/**
|
|
1460
1477
|
* The ID of the transaction.
|
|
1461
1478
|
*/
|
|
1462
|
-
txid:
|
|
1479
|
+
txid: v46.string(),
|
|
1463
1480
|
/**
|
|
1464
1481
|
* A Stacks transaction as a hex-encoded string.
|
|
1465
1482
|
*/
|
|
1466
|
-
transaction:
|
|
1483
|
+
transaction: v46.string()
|
|
1467
1484
|
});
|
|
1468
|
-
var stxDeployContractRequestMessageSchema =
|
|
1485
|
+
var stxDeployContractRequestMessageSchema = v46.object({
|
|
1469
1486
|
...rpcRequestMessageSchema.entries,
|
|
1470
|
-
...
|
|
1471
|
-
method:
|
|
1487
|
+
...v46.object({
|
|
1488
|
+
method: v46.literal(stxDeployContractMethodName),
|
|
1472
1489
|
params: stxDeployContractParamsSchema,
|
|
1473
|
-
id:
|
|
1490
|
+
id: v46.string()
|
|
1474
1491
|
}).entries
|
|
1475
1492
|
});
|
|
1476
1493
|
|
|
1477
1494
|
// src/request/types/stxMethods/getAccounts.ts
|
|
1478
|
-
import * as
|
|
1495
|
+
import * as v47 from "valibot";
|
|
1479
1496
|
var stxGetAccountsMethodName = "stx_getAccounts";
|
|
1480
|
-
var stxGetAccountsParamsSchema =
|
|
1481
|
-
var stxGetAccountsResultSchema =
|
|
1497
|
+
var stxGetAccountsParamsSchema = v47.nullish(v47.null());
|
|
1498
|
+
var stxGetAccountsResultSchema = v47.object({
|
|
1482
1499
|
/**
|
|
1483
1500
|
* The addresses generated for the given purposes.
|
|
1484
1501
|
*/
|
|
1485
|
-
addresses:
|
|
1486
|
-
|
|
1487
|
-
address:
|
|
1488
|
-
publicKey:
|
|
1489
|
-
gaiaHubUrl:
|
|
1490
|
-
gaiaAppKey:
|
|
1502
|
+
addresses: v47.array(
|
|
1503
|
+
v47.object({
|
|
1504
|
+
address: v47.string(),
|
|
1505
|
+
publicKey: v47.string(),
|
|
1506
|
+
gaiaHubUrl: v47.string(),
|
|
1507
|
+
gaiaAppKey: v47.string()
|
|
1491
1508
|
})
|
|
1492
1509
|
),
|
|
1493
1510
|
network: getNetworkResultSchema
|
|
1494
1511
|
});
|
|
1495
|
-
var stxGetAccountsRequestMessageSchema =
|
|
1512
|
+
var stxGetAccountsRequestMessageSchema = v47.object({
|
|
1496
1513
|
...rpcRequestMessageSchema.entries,
|
|
1497
|
-
...
|
|
1498
|
-
method:
|
|
1514
|
+
...v47.object({
|
|
1515
|
+
method: v47.literal(stxGetAccountsMethodName),
|
|
1499
1516
|
params: stxGetAccountsParamsSchema,
|
|
1500
|
-
id:
|
|
1517
|
+
id: v47.string()
|
|
1501
1518
|
}).entries
|
|
1502
1519
|
});
|
|
1503
1520
|
|
|
1504
1521
|
// src/request/types/stxMethods/getAddresses.ts
|
|
1505
|
-
import * as
|
|
1522
|
+
import * as v48 from "valibot";
|
|
1506
1523
|
var stxGetAddressesMethodName = "stx_getAddresses";
|
|
1507
|
-
var stxGetAddressesParamsSchema =
|
|
1508
|
-
|
|
1524
|
+
var stxGetAddressesParamsSchema = v48.nullish(
|
|
1525
|
+
v48.object({
|
|
1509
1526
|
/**
|
|
1510
1527
|
* A message to be displayed to the user in the request prompt.
|
|
1511
1528
|
*/
|
|
1512
|
-
message:
|
|
1529
|
+
message: v48.optional(v48.string())
|
|
1513
1530
|
})
|
|
1514
1531
|
);
|
|
1515
|
-
var stxGetAddressesResultSchema =
|
|
1532
|
+
var stxGetAddressesResultSchema = v48.object({
|
|
1516
1533
|
/**
|
|
1517
1534
|
* The addresses generated for the given purposes.
|
|
1518
1535
|
*/
|
|
1519
|
-
addresses:
|
|
1536
|
+
addresses: v48.array(addressSchema),
|
|
1520
1537
|
network: getNetworkResultSchema
|
|
1521
1538
|
});
|
|
1522
|
-
var stxGetAddressesRequestMessageSchema =
|
|
1539
|
+
var stxGetAddressesRequestMessageSchema = v48.object({
|
|
1523
1540
|
...rpcRequestMessageSchema.entries,
|
|
1524
|
-
...
|
|
1525
|
-
method:
|
|
1541
|
+
...v48.object({
|
|
1542
|
+
method: v48.literal(stxGetAddressesMethodName),
|
|
1526
1543
|
params: stxGetAddressesParamsSchema,
|
|
1527
|
-
id:
|
|
1544
|
+
id: v48.string()
|
|
1528
1545
|
}).entries
|
|
1529
1546
|
});
|
|
1530
1547
|
|
|
1531
1548
|
// src/request/types/stxMethods/signMessage.ts
|
|
1532
|
-
import * as
|
|
1549
|
+
import * as v49 from "valibot";
|
|
1533
1550
|
var stxSignMessageMethodName = "stx_signMessage";
|
|
1534
|
-
var stxSignMessageParamsSchema =
|
|
1551
|
+
var stxSignMessageParamsSchema = v49.object({
|
|
1535
1552
|
/**
|
|
1536
1553
|
* The message to sign.
|
|
1537
1554
|
*/
|
|
1538
|
-
message:
|
|
1555
|
+
message: v49.string()
|
|
1539
1556
|
});
|
|
1540
|
-
var stxSignMessageResultSchema =
|
|
1557
|
+
var stxSignMessageResultSchema = v49.object({
|
|
1541
1558
|
/**
|
|
1542
1559
|
* The signature of the message.
|
|
1543
1560
|
*/
|
|
1544
|
-
signature:
|
|
1561
|
+
signature: v49.string(),
|
|
1545
1562
|
/**
|
|
1546
1563
|
* The public key used to sign the message.
|
|
1547
1564
|
*/
|
|
1548
|
-
publicKey:
|
|
1565
|
+
publicKey: v49.string()
|
|
1549
1566
|
});
|
|
1550
|
-
var stxSignMessageRequestMessageSchema =
|
|
1567
|
+
var stxSignMessageRequestMessageSchema = v49.object({
|
|
1551
1568
|
...rpcRequestMessageSchema.entries,
|
|
1552
|
-
...
|
|
1553
|
-
method:
|
|
1569
|
+
...v49.object({
|
|
1570
|
+
method: v49.literal(stxSignMessageMethodName),
|
|
1554
1571
|
params: stxSignMessageParamsSchema,
|
|
1555
|
-
id:
|
|
1572
|
+
id: v49.string()
|
|
1556
1573
|
}).entries
|
|
1557
1574
|
});
|
|
1558
1575
|
|
|
1559
1576
|
// src/request/types/stxMethods/signStructuredMessage.ts
|
|
1560
|
-
import * as
|
|
1577
|
+
import * as v50 from "valibot";
|
|
1561
1578
|
var stxSignStructuredMessageMethodName = "stx_signStructuredMessage";
|
|
1562
|
-
var stxSignStructuredMessageParamsSchema =
|
|
1579
|
+
var stxSignStructuredMessageParamsSchema = v50.object({
|
|
1563
1580
|
/**
|
|
1564
1581
|
* The domain to be signed.
|
|
1565
1582
|
*/
|
|
1566
|
-
domain:
|
|
1583
|
+
domain: v50.string(),
|
|
1567
1584
|
/**
|
|
1568
1585
|
* Message payload to be signed.
|
|
1569
1586
|
*/
|
|
1570
|
-
message:
|
|
1587
|
+
message: v50.string(),
|
|
1571
1588
|
/**
|
|
1572
1589
|
* The public key to sign the message with.
|
|
1573
1590
|
*/
|
|
1574
|
-
publicKey:
|
|
1591
|
+
publicKey: v50.optional(v50.string())
|
|
1575
1592
|
});
|
|
1576
|
-
var stxSignStructuredMessageResultSchema =
|
|
1593
|
+
var stxSignStructuredMessageResultSchema = v50.object({
|
|
1577
1594
|
/**
|
|
1578
1595
|
* Signature of the message.
|
|
1579
1596
|
*/
|
|
1580
|
-
signature:
|
|
1597
|
+
signature: v50.string(),
|
|
1581
1598
|
/**
|
|
1582
1599
|
* Public key as hex-encoded string.
|
|
1583
1600
|
*/
|
|
1584
|
-
publicKey:
|
|
1601
|
+
publicKey: v50.string()
|
|
1585
1602
|
});
|
|
1586
|
-
var stxSignStructuredMessageRequestMessageSchema =
|
|
1603
|
+
var stxSignStructuredMessageRequestMessageSchema = v50.object({
|
|
1587
1604
|
...rpcRequestMessageSchema.entries,
|
|
1588
|
-
...
|
|
1589
|
-
method:
|
|
1605
|
+
...v50.object({
|
|
1606
|
+
method: v50.literal(stxSignStructuredMessageMethodName),
|
|
1590
1607
|
params: stxSignStructuredMessageParamsSchema,
|
|
1591
|
-
id:
|
|
1608
|
+
id: v50.string()
|
|
1592
1609
|
}).entries
|
|
1593
1610
|
});
|
|
1594
1611
|
|
|
1595
1612
|
// src/request/types/stxMethods/signTransaction.ts
|
|
1596
|
-
import * as
|
|
1613
|
+
import * as v51 from "valibot";
|
|
1597
1614
|
var stxSignTransactionMethodName = "stx_signTransaction";
|
|
1598
|
-
var stxSignTransactionParamsSchema =
|
|
1615
|
+
var stxSignTransactionParamsSchema = v51.object({
|
|
1599
1616
|
/**
|
|
1600
1617
|
* The transaction to sign as a hex-encoded string.
|
|
1601
1618
|
*/
|
|
1602
|
-
transaction:
|
|
1619
|
+
transaction: v51.string(),
|
|
1603
1620
|
/**
|
|
1604
1621
|
* The public key to sign the transaction with. The wallet may use any key
|
|
1605
1622
|
* when not provided.
|
|
1606
1623
|
*/
|
|
1607
|
-
pubkey:
|
|
1624
|
+
pubkey: v51.optional(v51.string()),
|
|
1608
1625
|
/**
|
|
1609
1626
|
* Whether to broadcast the transaction after signing. Defaults to `true`.
|
|
1610
1627
|
*/
|
|
1611
|
-
broadcast:
|
|
1628
|
+
broadcast: v51.optional(v51.boolean())
|
|
1612
1629
|
});
|
|
1613
|
-
var stxSignTransactionResultSchema =
|
|
1630
|
+
var stxSignTransactionResultSchema = v51.object({
|
|
1614
1631
|
/**
|
|
1615
1632
|
* The signed transaction as a hex-encoded string.
|
|
1616
1633
|
*/
|
|
1617
|
-
transaction:
|
|
1634
|
+
transaction: v51.string()
|
|
1618
1635
|
});
|
|
1619
|
-
var stxSignTransactionRequestMessageSchema =
|
|
1636
|
+
var stxSignTransactionRequestMessageSchema = v51.object({
|
|
1620
1637
|
...rpcRequestMessageSchema.entries,
|
|
1621
|
-
...
|
|
1622
|
-
method:
|
|
1638
|
+
...v51.object({
|
|
1639
|
+
method: v51.literal(stxSignTransactionMethodName),
|
|
1623
1640
|
params: stxSignTransactionParamsSchema,
|
|
1624
|
-
id:
|
|
1641
|
+
id: v51.string()
|
|
1625
1642
|
}).entries
|
|
1626
1643
|
});
|
|
1627
1644
|
|
|
1628
1645
|
// src/request/types/stxMethods/signTransactions.ts
|
|
1629
|
-
import * as
|
|
1646
|
+
import * as v52 from "valibot";
|
|
1630
1647
|
var stxSignTransactionsMethodName = "stx_signTransactions";
|
|
1631
|
-
var stxSignTransactionsParamsSchema =
|
|
1648
|
+
var stxSignTransactionsParamsSchema = v52.object({
|
|
1632
1649
|
/**
|
|
1633
1650
|
* The transactions to sign as hex-encoded strings.
|
|
1634
1651
|
*/
|
|
1635
|
-
transactions:
|
|
1636
|
-
|
|
1637
|
-
|
|
1638
|
-
|
|
1639
|
-
|
|
1652
|
+
transactions: v52.pipe(
|
|
1653
|
+
v52.array(
|
|
1654
|
+
v52.pipe(
|
|
1655
|
+
v52.string(),
|
|
1656
|
+
v52.check((hex) => {
|
|
1640
1657
|
return true;
|
|
1641
1658
|
}, "Invalid hex-encoded Stacks transaction.")
|
|
1642
1659
|
)
|
|
1643
1660
|
),
|
|
1644
|
-
|
|
1661
|
+
v52.minLength(1)
|
|
1645
1662
|
),
|
|
1646
1663
|
/**
|
|
1647
1664
|
* Whether the signed transactions should be broadcast after signing. Defaults
|
|
1648
1665
|
* to `true`.
|
|
1649
1666
|
*/
|
|
1650
|
-
broadcast:
|
|
1667
|
+
broadcast: v52.optional(v52.boolean())
|
|
1651
1668
|
});
|
|
1652
|
-
var stxSignTransactionsResultSchema =
|
|
1669
|
+
var stxSignTransactionsResultSchema = v52.object({
|
|
1653
1670
|
/**
|
|
1654
1671
|
* The signed transactions as hex-encoded strings, in the same order as in the
|
|
1655
1672
|
* sign request.
|
|
1656
1673
|
*/
|
|
1657
|
-
transactions:
|
|
1674
|
+
transactions: v52.array(v52.string())
|
|
1658
1675
|
});
|
|
1659
|
-
var stxSignTransactionsRequestMessageSchema =
|
|
1676
|
+
var stxSignTransactionsRequestMessageSchema = v52.object({
|
|
1660
1677
|
...rpcRequestMessageSchema.entries,
|
|
1661
|
-
...
|
|
1662
|
-
method:
|
|
1678
|
+
...v52.object({
|
|
1679
|
+
method: v52.literal(stxSignTransactionsMethodName),
|
|
1663
1680
|
params: stxSignTransactionsParamsSchema,
|
|
1664
|
-
id:
|
|
1681
|
+
id: v52.string()
|
|
1665
1682
|
}).entries
|
|
1666
1683
|
});
|
|
1667
1684
|
|
|
1668
1685
|
// src/request/types/stxMethods/transferStx.ts
|
|
1669
|
-
import * as
|
|
1686
|
+
import * as v53 from "valibot";
|
|
1670
1687
|
var stxTransferStxMethodName = "stx_transferStx";
|
|
1671
|
-
var stxTransferStxParamsSchema =
|
|
1688
|
+
var stxTransferStxParamsSchema = v53.object({
|
|
1672
1689
|
/**
|
|
1673
1690
|
* Amount of STX tokens to transfer in microstacks as a string. Anything
|
|
1674
1691
|
* parseable by `BigInt` is acceptable.
|
|
@@ -1681,23 +1698,23 @@ var stxTransferStxParamsSchema = v52.object({
|
|
|
1681
1698
|
* const amount3 = '1234';
|
|
1682
1699
|
* ```
|
|
1683
1700
|
*/
|
|
1684
|
-
amount:
|
|
1701
|
+
amount: v53.union([v53.number(), v53.string()]),
|
|
1685
1702
|
/**
|
|
1686
1703
|
* The recipient's principal.
|
|
1687
1704
|
*/
|
|
1688
|
-
recipient:
|
|
1705
|
+
recipient: v53.string(),
|
|
1689
1706
|
/**
|
|
1690
1707
|
* A string representing the memo.
|
|
1691
1708
|
*/
|
|
1692
|
-
memo:
|
|
1709
|
+
memo: v53.optional(v53.string()),
|
|
1693
1710
|
/**
|
|
1694
1711
|
* Version of parameter format.
|
|
1695
1712
|
*/
|
|
1696
|
-
version:
|
|
1713
|
+
version: v53.optional(v53.string()),
|
|
1697
1714
|
/**
|
|
1698
1715
|
* The mode of the post conditions.
|
|
1699
1716
|
*/
|
|
1700
|
-
postConditionMode:
|
|
1717
|
+
postConditionMode: v53.optional(v53.number()),
|
|
1701
1718
|
/**
|
|
1702
1719
|
* A hex-encoded string representing the post conditions.
|
|
1703
1720
|
*
|
|
@@ -1710,29 +1727,29 @@ var stxTransferStxParamsSchema = v52.object({
|
|
|
1710
1727
|
* const hexPostCondition = serializePostCondition(postCondition).toString('hex');
|
|
1711
1728
|
* ```
|
|
1712
1729
|
*/
|
|
1713
|
-
postConditions:
|
|
1730
|
+
postConditions: v53.optional(v53.array(v53.string())),
|
|
1714
1731
|
/**
|
|
1715
1732
|
* The public key to sign the transaction with. The wallet may use any key
|
|
1716
1733
|
* when not provided.
|
|
1717
1734
|
*/
|
|
1718
|
-
pubkey:
|
|
1735
|
+
pubkey: v53.optional(v53.string())
|
|
1719
1736
|
});
|
|
1720
|
-
var stxTransferStxResultSchema =
|
|
1737
|
+
var stxTransferStxResultSchema = v53.object({
|
|
1721
1738
|
/**
|
|
1722
1739
|
* The ID of the transaction.
|
|
1723
1740
|
*/
|
|
1724
|
-
txid:
|
|
1741
|
+
txid: v53.string(),
|
|
1725
1742
|
/**
|
|
1726
1743
|
* A Stacks transaction as a hex-encoded string.
|
|
1727
1744
|
*/
|
|
1728
|
-
transaction:
|
|
1745
|
+
transaction: v53.string()
|
|
1729
1746
|
});
|
|
1730
|
-
var stxTransferStxRequestMessageSchema =
|
|
1747
|
+
var stxTransferStxRequestMessageSchema = v53.object({
|
|
1731
1748
|
...rpcRequestMessageSchema.entries,
|
|
1732
|
-
...
|
|
1733
|
-
method:
|
|
1749
|
+
...v53.object({
|
|
1750
|
+
method: v53.literal(stxTransferStxMethodName),
|
|
1734
1751
|
params: stxTransferStxParamsSchema,
|
|
1735
|
-
id:
|
|
1752
|
+
id: v53.string()
|
|
1736
1753
|
}).entries
|
|
1737
1754
|
});
|
|
1738
1755
|
|
|
@@ -1740,13 +1757,13 @@ var stxTransferStxRequestMessageSchema = v52.object({
|
|
|
1740
1757
|
var cache = {};
|
|
1741
1758
|
var requestInternal = async (provider, method, params) => {
|
|
1742
1759
|
const response = await provider.request(method, params);
|
|
1743
|
-
if (
|
|
1760
|
+
if (v54.is(rpcErrorResponseMessageSchema, response)) {
|
|
1744
1761
|
return {
|
|
1745
1762
|
status: "error",
|
|
1746
1763
|
error: response.error
|
|
1747
1764
|
};
|
|
1748
1765
|
}
|
|
1749
|
-
if (
|
|
1766
|
+
if (v54.is(rpcSuccessResponseMessageSchema, response)) {
|
|
1750
1767
|
return {
|
|
1751
1768
|
status: "success",
|
|
1752
1769
|
result: response.result
|
|
@@ -2882,6 +2899,10 @@ export {
|
|
|
2882
2899
|
isProviderInstalled,
|
|
2883
2900
|
networkChangeEventName,
|
|
2884
2901
|
networkChangeSchema,
|
|
2902
|
+
openBridgeMethodName,
|
|
2903
|
+
openBridgeParamsSchema,
|
|
2904
|
+
openBridgeRequestMessageSchema,
|
|
2905
|
+
openBridgeResultSchema,
|
|
2885
2906
|
openReceiveMethodName,
|
|
2886
2907
|
openReceiveParamsSchema,
|
|
2887
2908
|
openReceiveRequestMessageSchema,
|