@sats-connect/core 0.4.2 → 0.4.3-0d01f7b
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 +44 -2
- package/dist/index.d.ts +44 -2
- package/dist/index.js +337 -283
- package/dist/index.mjs +333 -283
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -181,6 +181,10 @@ __export(src_exports, {
|
|
|
181
181
|
stxSignTransactionParamsSchema: () => stxSignTransactionParamsSchema,
|
|
182
182
|
stxSignTransactionRequestMessageSchema: () => stxSignTransactionRequestMessageSchema,
|
|
183
183
|
stxSignTransactionResultSchema: () => stxSignTransactionResultSchema,
|
|
184
|
+
stxSignTransactionsMethodName: () => stxSignTransactionsMethodName,
|
|
185
|
+
stxSignTransactionsParamsSchema: () => stxSignTransactionsParamsSchema,
|
|
186
|
+
stxSignTransactionsRequestMessageSchema: () => stxSignTransactionsRequestMessageSchema,
|
|
187
|
+
stxSignTransactionsResultSchema: () => stxSignTransactionsResultSchema,
|
|
184
188
|
stxTransferStxMethodName: () => stxTransferStxMethodName,
|
|
185
189
|
stxTransferStxParamsSchema: () => stxTransferStxParamsSchema,
|
|
186
190
|
stxTransferStxRequestMessageSchema: () => stxTransferStxRequestMessageSchema,
|
|
@@ -258,6 +262,7 @@ var BitcoinNetworkType = /* @__PURE__ */ ((BitcoinNetworkType2) => {
|
|
|
258
262
|
BitcoinNetworkType2["Mainnet"] = "Mainnet";
|
|
259
263
|
BitcoinNetworkType2["Testnet"] = "Testnet";
|
|
260
264
|
BitcoinNetworkType2["Signet"] = "Signet";
|
|
265
|
+
BitcoinNetworkType2["Regtest"] = "Regtest";
|
|
261
266
|
return BitcoinNetworkType2;
|
|
262
267
|
})(BitcoinNetworkType || {});
|
|
263
268
|
var RpcIdSchema = v2.optional(v2.union([v2.string(), v2.number(), v2.null()]));
|
|
@@ -304,7 +309,7 @@ var rpcResponseMessageSchema = v2.union([
|
|
|
304
309
|
]);
|
|
305
310
|
|
|
306
311
|
// src/request/index.ts
|
|
307
|
-
var
|
|
312
|
+
var v21 = __toESM(require("valibot"));
|
|
308
313
|
|
|
309
314
|
// src/request/types/stxMethods/callContract.ts
|
|
310
315
|
var v3 = __toESM(require("valibot"));
|
|
@@ -599,10 +604,50 @@ var stxSignTransactionRequestMessageSchema = v10.object({
|
|
|
599
604
|
}).entries
|
|
600
605
|
});
|
|
601
606
|
|
|
602
|
-
// src/request/types/stxMethods/
|
|
607
|
+
// src/request/types/stxMethods/signTransactions.ts
|
|
603
608
|
var v11 = __toESM(require("valibot"));
|
|
609
|
+
var stxSignTransactionsMethodName = "stx_signTransactions";
|
|
610
|
+
var stxSignTransactionsParamsSchema = v11.object({
|
|
611
|
+
/**
|
|
612
|
+
* The transactions to sign as hex-encoded strings.
|
|
613
|
+
*/
|
|
614
|
+
transactions: v11.pipe(
|
|
615
|
+
v11.array(
|
|
616
|
+
v11.pipe(
|
|
617
|
+
v11.string(),
|
|
618
|
+
v11.check((hex) => {
|
|
619
|
+
return true;
|
|
620
|
+
}, "Invalid hex-encoded Stacks transaction.")
|
|
621
|
+
)
|
|
622
|
+
),
|
|
623
|
+
v11.minLength(1)
|
|
624
|
+
),
|
|
625
|
+
/**
|
|
626
|
+
* Whether the signed transactions should be broadcast after signing. Defaults
|
|
627
|
+
* to `true`.
|
|
628
|
+
*/
|
|
629
|
+
broadcast: v11.optional(v11.boolean())
|
|
630
|
+
});
|
|
631
|
+
var stxSignTransactionsResultSchema = v11.object({
|
|
632
|
+
/**
|
|
633
|
+
* The signed transactions as hex-encoded strings, in the same order as in the
|
|
634
|
+
* sign request.
|
|
635
|
+
*/
|
|
636
|
+
transactions: v11.array(v11.string())
|
|
637
|
+
});
|
|
638
|
+
var stxSignTransactionsRequestMessageSchema = v11.object({
|
|
639
|
+
...rpcRequestMessageSchema.entries,
|
|
640
|
+
...v11.object({
|
|
641
|
+
method: v11.literal(stxSignTransactionsMethodName),
|
|
642
|
+
params: stxSignTransactionsParamsSchema,
|
|
643
|
+
id: v11.string()
|
|
644
|
+
}).entries
|
|
645
|
+
});
|
|
646
|
+
|
|
647
|
+
// src/request/types/stxMethods/transferStx.ts
|
|
648
|
+
var v12 = __toESM(require("valibot"));
|
|
604
649
|
var stxTransferStxMethodName = "stx_transferStx";
|
|
605
|
-
var stxTransferStxParamsSchema =
|
|
650
|
+
var stxTransferStxParamsSchema = v12.object({
|
|
606
651
|
/**
|
|
607
652
|
* Amount of STX tokens to transfer in microstacks as a string. Anything
|
|
608
653
|
* parseable by `BigInt` is acceptable.
|
|
@@ -615,23 +660,23 @@ var stxTransferStxParamsSchema = v11.object({
|
|
|
615
660
|
* const amount3 = '1234';
|
|
616
661
|
* ```
|
|
617
662
|
*/
|
|
618
|
-
amount:
|
|
663
|
+
amount: v12.union([v12.number(), v12.string()]),
|
|
619
664
|
/**
|
|
620
665
|
* The recipeint's principal.
|
|
621
666
|
*/
|
|
622
|
-
recipient:
|
|
667
|
+
recipient: v12.string(),
|
|
623
668
|
/**
|
|
624
669
|
* A string representing the memo.
|
|
625
670
|
*/
|
|
626
|
-
memo:
|
|
671
|
+
memo: v12.optional(v12.string()),
|
|
627
672
|
/**
|
|
628
673
|
* Version of parameter format.
|
|
629
674
|
*/
|
|
630
|
-
version:
|
|
675
|
+
version: v12.optional(v12.string()),
|
|
631
676
|
/**
|
|
632
677
|
* The mode of the post conditions.
|
|
633
678
|
*/
|
|
634
|
-
postConditionMode:
|
|
679
|
+
postConditionMode: v12.optional(v12.number()),
|
|
635
680
|
/**
|
|
636
681
|
* A hex-encoded string representing the post conditions.
|
|
637
682
|
*
|
|
@@ -644,89 +689,89 @@ var stxTransferStxParamsSchema = v11.object({
|
|
|
644
689
|
* const hexPostCondition = serializePostCondition(postCondition).toString('hex');
|
|
645
690
|
* ```
|
|
646
691
|
*/
|
|
647
|
-
postConditions:
|
|
692
|
+
postConditions: v12.optional(v12.array(v12.string())),
|
|
648
693
|
/**
|
|
649
694
|
* The public key to sign the transaction with. The wallet may use any key
|
|
650
695
|
* when not provided.
|
|
651
696
|
*/
|
|
652
|
-
pubkey:
|
|
697
|
+
pubkey: v12.optional(v12.string())
|
|
653
698
|
});
|
|
654
|
-
var stxTransferStxResultSchema =
|
|
699
|
+
var stxTransferStxResultSchema = v12.object({
|
|
655
700
|
/**
|
|
656
701
|
* The ID of the transaction.
|
|
657
702
|
*/
|
|
658
|
-
txid:
|
|
703
|
+
txid: v12.string(),
|
|
659
704
|
/**
|
|
660
705
|
* A Stacks transaction as a hex-encoded string.
|
|
661
706
|
*/
|
|
662
|
-
transaction:
|
|
707
|
+
transaction: v12.string()
|
|
663
708
|
});
|
|
664
|
-
var stxTransferStxRequestMessageSchema =
|
|
709
|
+
var stxTransferStxRequestMessageSchema = v12.object({
|
|
665
710
|
...rpcRequestMessageSchema.entries,
|
|
666
|
-
...
|
|
667
|
-
method:
|
|
711
|
+
...v12.object({
|
|
712
|
+
method: v12.literal(stxTransferStxMethodName),
|
|
668
713
|
params: stxTransferStxParamsSchema,
|
|
669
|
-
id:
|
|
714
|
+
id: v12.string()
|
|
670
715
|
}).entries
|
|
671
716
|
});
|
|
672
717
|
|
|
673
718
|
// src/request/types/btcMethods.ts
|
|
674
|
-
var
|
|
719
|
+
var v14 = __toESM(require("valibot"));
|
|
675
720
|
|
|
676
721
|
// src/request/types/common.ts
|
|
677
|
-
var
|
|
722
|
+
var v13 = __toESM(require("valibot"));
|
|
678
723
|
var walletTypes = ["software", "ledger"];
|
|
679
|
-
var walletTypeSchema =
|
|
724
|
+
var walletTypeSchema = v13.picklist(walletTypes);
|
|
680
725
|
|
|
681
726
|
// src/request/types/btcMethods.ts
|
|
682
727
|
var getInfoMethodName = "getInfo";
|
|
683
|
-
var getInfoParamsSchema =
|
|
684
|
-
var getInfoResultSchema =
|
|
728
|
+
var getInfoParamsSchema = v14.nullish(v14.null());
|
|
729
|
+
var getInfoResultSchema = v14.object({
|
|
685
730
|
/**
|
|
686
731
|
* Version of the wallet.
|
|
687
732
|
*/
|
|
688
|
-
version:
|
|
733
|
+
version: v14.string(),
|
|
689
734
|
/**
|
|
690
735
|
* [WBIP](https://wbips.netlify.app/wbips/WBIP002) methods supported by the wallet.
|
|
691
736
|
*/
|
|
692
|
-
methods:
|
|
737
|
+
methods: v14.optional(v14.array(v14.string())),
|
|
693
738
|
/**
|
|
694
739
|
* List of WBIP standards supported by the wallet. Not currently used.
|
|
695
740
|
*/
|
|
696
|
-
supports:
|
|
741
|
+
supports: v14.array(v14.string())
|
|
697
742
|
});
|
|
698
|
-
var getInfoRequestMessageSchema =
|
|
743
|
+
var getInfoRequestMessageSchema = v14.object({
|
|
699
744
|
...rpcRequestMessageSchema.entries,
|
|
700
|
-
...
|
|
701
|
-
method:
|
|
745
|
+
...v14.object({
|
|
746
|
+
method: v14.literal(getInfoMethodName),
|
|
702
747
|
params: getInfoParamsSchema,
|
|
703
|
-
id:
|
|
748
|
+
id: v14.string()
|
|
704
749
|
}).entries
|
|
705
750
|
});
|
|
706
751
|
var getAddressesMethodName = "getAddresses";
|
|
707
|
-
var getAddressesParamsSchema =
|
|
752
|
+
var getAddressesParamsSchema = v14.object({
|
|
708
753
|
/**
|
|
709
754
|
* The purposes for which to generate addresses. See
|
|
710
755
|
* {@linkcode AddressPurpose} for available purposes.
|
|
711
756
|
*/
|
|
712
|
-
purposes:
|
|
757
|
+
purposes: v14.array(v14.enum(AddressPurpose)),
|
|
713
758
|
/**
|
|
714
759
|
* A message to be displayed to the user in the request prompt.
|
|
715
760
|
*/
|
|
716
|
-
message:
|
|
761
|
+
message: v14.optional(v14.string())
|
|
717
762
|
});
|
|
718
|
-
var getAddressesResultSchema =
|
|
763
|
+
var getAddressesResultSchema = v14.object({
|
|
719
764
|
/**
|
|
720
765
|
* The addresses generated for the given purposes.
|
|
721
766
|
*/
|
|
722
|
-
addresses:
|
|
767
|
+
addresses: v14.array(addressSchema)
|
|
723
768
|
});
|
|
724
|
-
var getAddressesRequestMessageSchema =
|
|
769
|
+
var getAddressesRequestMessageSchema = v14.object({
|
|
725
770
|
...rpcRequestMessageSchema.entries,
|
|
726
|
-
...
|
|
727
|
-
method:
|
|
771
|
+
...v14.object({
|
|
772
|
+
method: v14.literal(getAddressesMethodName),
|
|
728
773
|
params: getAddressesParamsSchema,
|
|
729
|
-
id:
|
|
774
|
+
id: v14.string()
|
|
730
775
|
}).entries
|
|
731
776
|
});
|
|
732
777
|
var signMessageMethodName = "signMessage";
|
|
@@ -735,456 +780,456 @@ var MessageSigningProtocols = /* @__PURE__ */ ((MessageSigningProtocols2) => {
|
|
|
735
780
|
MessageSigningProtocols2["BIP322"] = "BIP322";
|
|
736
781
|
return MessageSigningProtocols2;
|
|
737
782
|
})(MessageSigningProtocols || {});
|
|
738
|
-
var signMessageParamsSchema =
|
|
783
|
+
var signMessageParamsSchema = v14.object({
|
|
739
784
|
/**
|
|
740
785
|
* The address used for signing.
|
|
741
786
|
**/
|
|
742
|
-
address:
|
|
787
|
+
address: v14.string(),
|
|
743
788
|
/**
|
|
744
789
|
* The message to sign.
|
|
745
790
|
**/
|
|
746
|
-
message:
|
|
791
|
+
message: v14.string(),
|
|
747
792
|
/**
|
|
748
793
|
* The protocol to use for signing the message.
|
|
749
794
|
*/
|
|
750
|
-
protocol:
|
|
795
|
+
protocol: v14.optional(v14.enum(MessageSigningProtocols))
|
|
751
796
|
});
|
|
752
|
-
var signMessageResultSchema =
|
|
797
|
+
var signMessageResultSchema = v14.object({
|
|
753
798
|
/**
|
|
754
799
|
* The signature of the message.
|
|
755
800
|
*/
|
|
756
|
-
signature:
|
|
801
|
+
signature: v14.string(),
|
|
757
802
|
/**
|
|
758
803
|
* hash of the message.
|
|
759
804
|
*/
|
|
760
|
-
messageHash:
|
|
805
|
+
messageHash: v14.string(),
|
|
761
806
|
/**
|
|
762
807
|
* The address used for signing.
|
|
763
808
|
*/
|
|
764
|
-
address:
|
|
809
|
+
address: v14.string(),
|
|
765
810
|
/**
|
|
766
811
|
* The protocol to use for signing the message.
|
|
767
812
|
*/
|
|
768
|
-
protocol:
|
|
813
|
+
protocol: v14.enum(MessageSigningProtocols)
|
|
769
814
|
});
|
|
770
|
-
var signMessageRequestMessageSchema =
|
|
815
|
+
var signMessageRequestMessageSchema = v14.object({
|
|
771
816
|
...rpcRequestMessageSchema.entries,
|
|
772
|
-
...
|
|
773
|
-
method:
|
|
817
|
+
...v14.object({
|
|
818
|
+
method: v14.literal(signMessageMethodName),
|
|
774
819
|
params: signMessageParamsSchema,
|
|
775
|
-
id:
|
|
820
|
+
id: v14.string()
|
|
776
821
|
}).entries
|
|
777
822
|
});
|
|
778
823
|
var sendTransferMethodName = "sendTransfer";
|
|
779
|
-
var sendTransferParamsSchema =
|
|
824
|
+
var sendTransferParamsSchema = v14.object({
|
|
780
825
|
/**
|
|
781
826
|
* Array of recipients to send to.
|
|
782
827
|
* The amount to send to each recipient is in satoshis.
|
|
783
828
|
*/
|
|
784
|
-
recipients:
|
|
785
|
-
|
|
786
|
-
address:
|
|
787
|
-
amount:
|
|
829
|
+
recipients: v14.array(
|
|
830
|
+
v14.object({
|
|
831
|
+
address: v14.string(),
|
|
832
|
+
amount: v14.number()
|
|
788
833
|
})
|
|
789
834
|
)
|
|
790
835
|
});
|
|
791
|
-
var sendTransferResultSchema =
|
|
836
|
+
var sendTransferResultSchema = v14.object({
|
|
792
837
|
/**
|
|
793
838
|
* The transaction id as a hex-encoded string.
|
|
794
839
|
*/
|
|
795
|
-
txid:
|
|
840
|
+
txid: v14.string()
|
|
796
841
|
});
|
|
797
|
-
var sendTransferRequestMessageSchema =
|
|
842
|
+
var sendTransferRequestMessageSchema = v14.object({
|
|
798
843
|
...rpcRequestMessageSchema.entries,
|
|
799
|
-
...
|
|
800
|
-
method:
|
|
844
|
+
...v14.object({
|
|
845
|
+
method: v14.literal(sendTransferMethodName),
|
|
801
846
|
params: sendTransferParamsSchema,
|
|
802
|
-
id:
|
|
847
|
+
id: v14.string()
|
|
803
848
|
}).entries
|
|
804
849
|
});
|
|
805
850
|
var signPsbtMethodName = "signPsbt";
|
|
806
|
-
var signPsbtParamsSchema =
|
|
851
|
+
var signPsbtParamsSchema = v14.object({
|
|
807
852
|
/**
|
|
808
853
|
* The base64 encoded PSBT to sign.
|
|
809
854
|
*/
|
|
810
|
-
psbt:
|
|
855
|
+
psbt: v14.string(),
|
|
811
856
|
/**
|
|
812
857
|
* The inputs to sign.
|
|
813
858
|
* The key is the address and the value is an array of indexes of the inputs to sign.
|
|
814
859
|
*/
|
|
815
|
-
signInputs:
|
|
860
|
+
signInputs: v14.record(v14.string(), v14.array(v14.number())),
|
|
816
861
|
/**
|
|
817
862
|
* Whether to broadcast the transaction after signing.
|
|
818
863
|
**/
|
|
819
|
-
broadcast:
|
|
864
|
+
broadcast: v14.optional(v14.boolean())
|
|
820
865
|
});
|
|
821
|
-
var signPsbtResultSchema =
|
|
866
|
+
var signPsbtResultSchema = v14.object({
|
|
822
867
|
/**
|
|
823
868
|
* The base64 encoded PSBT after signing.
|
|
824
869
|
*/
|
|
825
|
-
psbt:
|
|
870
|
+
psbt: v14.string(),
|
|
826
871
|
/**
|
|
827
872
|
* The transaction id as a hex-encoded string.
|
|
828
873
|
* This is only returned if the transaction was broadcast.
|
|
829
874
|
**/
|
|
830
|
-
txid:
|
|
875
|
+
txid: v14.optional(v14.string())
|
|
831
876
|
});
|
|
832
|
-
var signPsbtRequestMessageSchema =
|
|
877
|
+
var signPsbtRequestMessageSchema = v14.object({
|
|
833
878
|
...rpcRequestMessageSchema.entries,
|
|
834
|
-
...
|
|
835
|
-
method:
|
|
879
|
+
...v14.object({
|
|
880
|
+
method: v14.literal(signPsbtMethodName),
|
|
836
881
|
params: signPsbtParamsSchema,
|
|
837
|
-
id:
|
|
882
|
+
id: v14.string()
|
|
838
883
|
}).entries
|
|
839
884
|
});
|
|
840
885
|
var getAccountsMethodName = "getAccounts";
|
|
841
|
-
var getAccountsParamsSchema =
|
|
886
|
+
var getAccountsParamsSchema = v14.object({
|
|
842
887
|
/**
|
|
843
888
|
* The purposes for which to generate addresses. See
|
|
844
889
|
* {@linkcode AddressPurpose} for available purposes.
|
|
845
890
|
*/
|
|
846
|
-
purposes:
|
|
891
|
+
purposes: v14.array(v14.enum(AddressPurpose)),
|
|
847
892
|
/**
|
|
848
893
|
* A message to be displayed to the user in the request prompt.
|
|
849
894
|
*/
|
|
850
|
-
message:
|
|
895
|
+
message: v14.optional(v14.string())
|
|
851
896
|
});
|
|
852
|
-
var getAccountsResultSchema =
|
|
853
|
-
|
|
897
|
+
var getAccountsResultSchema = v14.array(
|
|
898
|
+
v14.object({
|
|
854
899
|
...addressSchema.entries,
|
|
855
|
-
...
|
|
900
|
+
...v14.object({
|
|
856
901
|
walletType: walletTypeSchema
|
|
857
902
|
}).entries
|
|
858
903
|
})
|
|
859
904
|
);
|
|
860
|
-
var getAccountsRequestMessageSchema =
|
|
905
|
+
var getAccountsRequestMessageSchema = v14.object({
|
|
861
906
|
...rpcRequestMessageSchema.entries,
|
|
862
|
-
...
|
|
863
|
-
method:
|
|
907
|
+
...v14.object({
|
|
908
|
+
method: v14.literal(getAccountsMethodName),
|
|
864
909
|
params: getAccountsParamsSchema,
|
|
865
|
-
id:
|
|
910
|
+
id: v14.string()
|
|
866
911
|
}).entries
|
|
867
912
|
});
|
|
868
913
|
var getBalanceMethodName = "getBalance";
|
|
869
|
-
var getBalanceParamsSchema =
|
|
870
|
-
var getBalanceResultSchema =
|
|
914
|
+
var getBalanceParamsSchema = v14.nullish(v14.null());
|
|
915
|
+
var getBalanceResultSchema = v14.object({
|
|
871
916
|
/**
|
|
872
917
|
* The confirmed balance of the wallet in sats. Using a string due to chrome
|
|
873
918
|
* messages not supporting bigint
|
|
874
919
|
* (https://issues.chromium.org/issues/40116184).
|
|
875
920
|
*/
|
|
876
|
-
confirmed:
|
|
921
|
+
confirmed: v14.string(),
|
|
877
922
|
/**
|
|
878
923
|
* The unconfirmed balance of the wallet in sats. Using a string due to chrome
|
|
879
924
|
* messages not supporting bigint
|
|
880
925
|
* (https://issues.chromium.org/issues/40116184).
|
|
881
926
|
*/
|
|
882
|
-
unconfirmed:
|
|
927
|
+
unconfirmed: v14.string(),
|
|
883
928
|
/**
|
|
884
929
|
* The total balance (both confirmed and unconfrimed UTXOs) of the wallet in
|
|
885
930
|
* sats. Using a string due to chrome messages not supporting bigint
|
|
886
931
|
* (https://issues.chromium.org/issues/40116184).
|
|
887
932
|
*/
|
|
888
|
-
total:
|
|
933
|
+
total: v14.string()
|
|
889
934
|
});
|
|
890
|
-
var getBalanceRequestMessageSchema =
|
|
935
|
+
var getBalanceRequestMessageSchema = v14.object({
|
|
891
936
|
...rpcRequestMessageSchema.entries,
|
|
892
|
-
...
|
|
893
|
-
method:
|
|
894
|
-
id:
|
|
937
|
+
...v14.object({
|
|
938
|
+
method: v14.literal(getBalanceMethodName),
|
|
939
|
+
id: v14.string()
|
|
895
940
|
}).entries
|
|
896
941
|
});
|
|
897
942
|
|
|
898
943
|
// src/request/types/walletMethods.ts
|
|
899
|
-
var
|
|
900
|
-
var accountActionsSchema =
|
|
901
|
-
read:
|
|
902
|
-
});
|
|
903
|
-
var walletActionsSchema =
|
|
904
|
-
var accountPermissionSchema =
|
|
905
|
-
type:
|
|
906
|
-
resourceId:
|
|
907
|
-
clientId:
|
|
944
|
+
var v15 = __toESM(require("valibot"));
|
|
945
|
+
var accountActionsSchema = v15.object({
|
|
946
|
+
read: v15.optional(v15.boolean())
|
|
947
|
+
});
|
|
948
|
+
var walletActionsSchema = v15.object({});
|
|
949
|
+
var accountPermissionSchema = v15.object({
|
|
950
|
+
type: v15.literal("account"),
|
|
951
|
+
resourceId: v15.string(),
|
|
952
|
+
clientId: v15.string(),
|
|
908
953
|
actions: accountActionsSchema
|
|
909
954
|
});
|
|
910
|
-
var walletPermissionSchema =
|
|
911
|
-
type:
|
|
912
|
-
resourceId:
|
|
913
|
-
clientId:
|
|
955
|
+
var walletPermissionSchema = v15.object({
|
|
956
|
+
type: v15.literal("wallet"),
|
|
957
|
+
resourceId: v15.string(),
|
|
958
|
+
clientId: v15.string(),
|
|
914
959
|
actions: walletActionsSchema
|
|
915
960
|
});
|
|
916
|
-
var PermissionRequestParams =
|
|
917
|
-
|
|
918
|
-
...
|
|
961
|
+
var PermissionRequestParams = v15.variant("type", [
|
|
962
|
+
v15.object({
|
|
963
|
+
...v15.omit(accountPermissionSchema, ["clientId"]).entries
|
|
919
964
|
}),
|
|
920
|
-
|
|
921
|
-
...
|
|
965
|
+
v15.object({
|
|
966
|
+
...v15.omit(walletPermissionSchema, ["clientId"]).entries
|
|
922
967
|
})
|
|
923
968
|
]);
|
|
924
|
-
var permission =
|
|
969
|
+
var permission = v15.variant("type", [accountPermissionSchema, walletPermissionSchema]);
|
|
925
970
|
var requestPermissionsMethodName = "wallet_requestPermissions";
|
|
926
|
-
var requestPermissionsParamsSchema =
|
|
927
|
-
var requestPermissionsResultSchema =
|
|
928
|
-
var requestPermissionsRequestMessageSchema =
|
|
971
|
+
var requestPermissionsParamsSchema = v15.nullish(v15.array(PermissionRequestParams));
|
|
972
|
+
var requestPermissionsResultSchema = v15.literal(true);
|
|
973
|
+
var requestPermissionsRequestMessageSchema = v15.object({
|
|
929
974
|
...rpcRequestMessageSchema.entries,
|
|
930
|
-
...
|
|
931
|
-
method:
|
|
975
|
+
...v15.object({
|
|
976
|
+
method: v15.literal(requestPermissionsMethodName),
|
|
932
977
|
params: requestPermissionsParamsSchema,
|
|
933
|
-
id:
|
|
978
|
+
id: v15.string()
|
|
934
979
|
}).entries
|
|
935
980
|
});
|
|
936
981
|
var renouncePermissionsMethodName = "wallet_renouncePermissions";
|
|
937
|
-
var renouncePermissionsParamsSchema =
|
|
938
|
-
var renouncePermissionsResultSchema =
|
|
939
|
-
var renouncePermissionsRequestMessageSchema =
|
|
982
|
+
var renouncePermissionsParamsSchema = v15.nullish(v15.null());
|
|
983
|
+
var renouncePermissionsResultSchema = v15.nullish(v15.null());
|
|
984
|
+
var renouncePermissionsRequestMessageSchema = v15.object({
|
|
940
985
|
...rpcRequestMessageSchema.entries,
|
|
941
|
-
...
|
|
942
|
-
method:
|
|
986
|
+
...v15.object({
|
|
987
|
+
method: v15.literal(renouncePermissionsMethodName),
|
|
943
988
|
params: renouncePermissionsParamsSchema,
|
|
944
|
-
id:
|
|
989
|
+
id: v15.string()
|
|
945
990
|
}).entries
|
|
946
991
|
});
|
|
947
992
|
var disconnectMethodName = "wallet_disconnect";
|
|
948
|
-
var disconnectParamsSchema =
|
|
949
|
-
var disconnectResultSchema =
|
|
950
|
-
var disconnectRequestMessageSchema =
|
|
993
|
+
var disconnectParamsSchema = v15.nullish(v15.null());
|
|
994
|
+
var disconnectResultSchema = v15.nullish(v15.null());
|
|
995
|
+
var disconnectRequestMessageSchema = v15.object({
|
|
951
996
|
...rpcRequestMessageSchema.entries,
|
|
952
|
-
...
|
|
953
|
-
method:
|
|
997
|
+
...v15.object({
|
|
998
|
+
method: v15.literal(disconnectMethodName),
|
|
954
999
|
params: disconnectParamsSchema,
|
|
955
|
-
id:
|
|
1000
|
+
id: v15.string()
|
|
956
1001
|
}).entries
|
|
957
1002
|
});
|
|
958
1003
|
var getWalletTypeMethodName = "wallet_getWalletType";
|
|
959
|
-
var getWalletTypeParamsSchema =
|
|
1004
|
+
var getWalletTypeParamsSchema = v15.nullish(v15.null());
|
|
960
1005
|
var getWalletTypeResultSchema = walletTypeSchema;
|
|
961
|
-
var getWalletTypeRequestMessageSchema =
|
|
1006
|
+
var getWalletTypeRequestMessageSchema = v15.object({
|
|
962
1007
|
...rpcRequestMessageSchema.entries,
|
|
963
|
-
...
|
|
964
|
-
method:
|
|
1008
|
+
...v15.object({
|
|
1009
|
+
method: v15.literal(getWalletTypeMethodName),
|
|
965
1010
|
params: getWalletTypeParamsSchema,
|
|
966
|
-
id:
|
|
1011
|
+
id: v15.string()
|
|
967
1012
|
}).entries
|
|
968
1013
|
});
|
|
969
1014
|
var getCurrentPermissionsMethodName = "wallet_getCurrentPermissions";
|
|
970
|
-
var getCurrentPermissionsParamsSchema =
|
|
971
|
-
var getCurrentPermissionsResultSchema =
|
|
972
|
-
var getCurrentPermissionsRequestMessageSchema =
|
|
1015
|
+
var getCurrentPermissionsParamsSchema = v15.nullish(v15.null());
|
|
1016
|
+
var getCurrentPermissionsResultSchema = v15.array(permission);
|
|
1017
|
+
var getCurrentPermissionsRequestMessageSchema = v15.object({
|
|
973
1018
|
...rpcRequestMessageSchema.entries,
|
|
974
|
-
...
|
|
975
|
-
method:
|
|
1019
|
+
...v15.object({
|
|
1020
|
+
method: v15.literal(getCurrentPermissionsMethodName),
|
|
976
1021
|
params: getCurrentPermissionsParamsSchema,
|
|
977
|
-
id:
|
|
1022
|
+
id: v15.string()
|
|
978
1023
|
}).entries
|
|
979
1024
|
});
|
|
980
1025
|
var getAccountMethodName = "wallet_getAccount";
|
|
981
|
-
var getAccountParamsSchema =
|
|
982
|
-
var getAccountResultSchema =
|
|
983
|
-
id:
|
|
984
|
-
addresses:
|
|
1026
|
+
var getAccountParamsSchema = v15.nullish(v15.null());
|
|
1027
|
+
var getAccountResultSchema = v15.object({
|
|
1028
|
+
id: v15.string(),
|
|
1029
|
+
addresses: v15.array(addressSchema),
|
|
985
1030
|
walletType: walletTypeSchema
|
|
986
1031
|
});
|
|
987
|
-
var getAccountRequestMessageSchema =
|
|
1032
|
+
var getAccountRequestMessageSchema = v15.object({
|
|
988
1033
|
...rpcRequestMessageSchema.entries,
|
|
989
|
-
...
|
|
990
|
-
method:
|
|
1034
|
+
...v15.object({
|
|
1035
|
+
method: v15.literal(getAccountMethodName),
|
|
991
1036
|
params: getAccountParamsSchema,
|
|
992
|
-
id:
|
|
1037
|
+
id: v15.string()
|
|
993
1038
|
}).entries
|
|
994
1039
|
});
|
|
995
1040
|
var connectMethodName = "wallet_connect";
|
|
996
|
-
var connectParamsSchema =
|
|
997
|
-
|
|
998
|
-
permissions:
|
|
999
|
-
addresses:
|
|
1000
|
-
message:
|
|
1001
|
-
|
|
1041
|
+
var connectParamsSchema = v15.nullish(
|
|
1042
|
+
v15.object({
|
|
1043
|
+
permissions: v15.optional(v15.array(PermissionRequestParams)),
|
|
1044
|
+
addresses: v15.optional(v15.array(v15.enum(AddressPurpose))),
|
|
1045
|
+
message: v15.optional(
|
|
1046
|
+
v15.pipe(v15.string(), v15.maxLength(80, "The message must not exceed 80 characters."))
|
|
1002
1047
|
)
|
|
1003
1048
|
})
|
|
1004
1049
|
);
|
|
1005
1050
|
var connectResultSchema = getAccountResultSchema;
|
|
1006
|
-
var connectRequestMessageSchema =
|
|
1051
|
+
var connectRequestMessageSchema = v15.object({
|
|
1007
1052
|
...rpcRequestMessageSchema.entries,
|
|
1008
|
-
...
|
|
1009
|
-
method:
|
|
1053
|
+
...v15.object({
|
|
1054
|
+
method: v15.literal(connectMethodName),
|
|
1010
1055
|
params: connectParamsSchema,
|
|
1011
|
-
id:
|
|
1056
|
+
id: v15.string()
|
|
1012
1057
|
}).entries
|
|
1013
1058
|
});
|
|
1014
1059
|
|
|
1015
1060
|
// src/request/types/runesMethods/etch.ts
|
|
1016
|
-
var
|
|
1061
|
+
var v16 = __toESM(require("valibot"));
|
|
1017
1062
|
var runesEtchMethodName = "runes_etch";
|
|
1018
|
-
var etchTermsSchema =
|
|
1019
|
-
amount:
|
|
1020
|
-
cap:
|
|
1021
|
-
heightStart:
|
|
1022
|
-
heightEnd:
|
|
1023
|
-
offsetStart:
|
|
1024
|
-
offsetEnd:
|
|
1025
|
-
});
|
|
1026
|
-
var inscriptionDetailsSchema =
|
|
1027
|
-
contentType:
|
|
1028
|
-
contentBase64:
|
|
1029
|
-
});
|
|
1030
|
-
var runesEtchParamsSchema =
|
|
1031
|
-
runeName:
|
|
1032
|
-
divisibility:
|
|
1033
|
-
symbol:
|
|
1034
|
-
premine:
|
|
1035
|
-
isMintable:
|
|
1036
|
-
delegateInscriptionId:
|
|
1037
|
-
destinationAddress:
|
|
1038
|
-
refundAddress:
|
|
1039
|
-
feeRate:
|
|
1040
|
-
appServiceFee:
|
|
1041
|
-
appServiceFeeAddress:
|
|
1042
|
-
terms:
|
|
1043
|
-
inscriptionDetails:
|
|
1044
|
-
network:
|
|
1045
|
-
});
|
|
1046
|
-
var runesEtchResultSchema =
|
|
1047
|
-
orderId:
|
|
1048
|
-
fundTransactionId:
|
|
1049
|
-
fundingAddress:
|
|
1050
|
-
});
|
|
1051
|
-
var runesEtchRequestMessageSchema =
|
|
1063
|
+
var etchTermsSchema = v16.object({
|
|
1064
|
+
amount: v16.string(),
|
|
1065
|
+
cap: v16.string(),
|
|
1066
|
+
heightStart: v16.optional(v16.string()),
|
|
1067
|
+
heightEnd: v16.optional(v16.string()),
|
|
1068
|
+
offsetStart: v16.optional(v16.string()),
|
|
1069
|
+
offsetEnd: v16.optional(v16.string())
|
|
1070
|
+
});
|
|
1071
|
+
var inscriptionDetailsSchema = v16.object({
|
|
1072
|
+
contentType: v16.string(),
|
|
1073
|
+
contentBase64: v16.string()
|
|
1074
|
+
});
|
|
1075
|
+
var runesEtchParamsSchema = v16.object({
|
|
1076
|
+
runeName: v16.string(),
|
|
1077
|
+
divisibility: v16.optional(v16.number()),
|
|
1078
|
+
symbol: v16.optional(v16.string()),
|
|
1079
|
+
premine: v16.optional(v16.string()),
|
|
1080
|
+
isMintable: v16.boolean(),
|
|
1081
|
+
delegateInscriptionId: v16.optional(v16.string()),
|
|
1082
|
+
destinationAddress: v16.string(),
|
|
1083
|
+
refundAddress: v16.string(),
|
|
1084
|
+
feeRate: v16.number(),
|
|
1085
|
+
appServiceFee: v16.optional(v16.number()),
|
|
1086
|
+
appServiceFeeAddress: v16.optional(v16.string()),
|
|
1087
|
+
terms: v16.optional(etchTermsSchema),
|
|
1088
|
+
inscriptionDetails: v16.optional(inscriptionDetailsSchema),
|
|
1089
|
+
network: v16.optional(v16.enum(BitcoinNetworkType))
|
|
1090
|
+
});
|
|
1091
|
+
var runesEtchResultSchema = v16.object({
|
|
1092
|
+
orderId: v16.string(),
|
|
1093
|
+
fundTransactionId: v16.string(),
|
|
1094
|
+
fundingAddress: v16.string()
|
|
1095
|
+
});
|
|
1096
|
+
var runesEtchRequestMessageSchema = v16.object({
|
|
1052
1097
|
...rpcRequestMessageSchema.entries,
|
|
1053
|
-
...
|
|
1054
|
-
method:
|
|
1098
|
+
...v16.object({
|
|
1099
|
+
method: v16.literal(runesEtchMethodName),
|
|
1055
1100
|
params: runesEtchParamsSchema,
|
|
1056
|
-
id:
|
|
1101
|
+
id: v16.string()
|
|
1057
1102
|
}).entries
|
|
1058
1103
|
});
|
|
1059
1104
|
|
|
1060
1105
|
// src/request/types/runesMethods/getBalance.ts
|
|
1061
|
-
var
|
|
1106
|
+
var v17 = __toESM(require("valibot"));
|
|
1062
1107
|
var runesGetBalanceMethodName = "runes_getBalance";
|
|
1063
|
-
var runesGetBalanceParamsSchema =
|
|
1064
|
-
var runesGetBalanceResultSchema =
|
|
1065
|
-
balances:
|
|
1066
|
-
|
|
1067
|
-
runeName:
|
|
1068
|
-
amount:
|
|
1069
|
-
divisibility:
|
|
1070
|
-
symbol:
|
|
1071
|
-
inscriptionId:
|
|
1108
|
+
var runesGetBalanceParamsSchema = v17.nullish(v17.null());
|
|
1109
|
+
var runesGetBalanceResultSchema = v17.object({
|
|
1110
|
+
balances: v17.array(
|
|
1111
|
+
v17.object({
|
|
1112
|
+
runeName: v17.string(),
|
|
1113
|
+
amount: v17.string(),
|
|
1114
|
+
divisibility: v17.number(),
|
|
1115
|
+
symbol: v17.string(),
|
|
1116
|
+
inscriptionId: v17.nullish(v17.string())
|
|
1072
1117
|
})
|
|
1073
1118
|
)
|
|
1074
1119
|
});
|
|
1075
|
-
var runesGetBalanceRequestMessageSchema =
|
|
1120
|
+
var runesGetBalanceRequestMessageSchema = v17.object({
|
|
1076
1121
|
...rpcRequestMessageSchema.entries,
|
|
1077
|
-
...
|
|
1078
|
-
method:
|
|
1122
|
+
...v17.object({
|
|
1123
|
+
method: v17.literal(runesGetBalanceMethodName),
|
|
1079
1124
|
params: runesGetBalanceParamsSchema,
|
|
1080
|
-
id:
|
|
1125
|
+
id: v17.string()
|
|
1081
1126
|
}).entries
|
|
1082
1127
|
});
|
|
1083
1128
|
|
|
1084
1129
|
// src/request/types/runesMethods/mint.ts
|
|
1085
|
-
var
|
|
1130
|
+
var v18 = __toESM(require("valibot"));
|
|
1086
1131
|
var runesMintMethodName = "runes_mint";
|
|
1087
|
-
var runesMintParamsSchema =
|
|
1088
|
-
appServiceFee:
|
|
1089
|
-
appServiceFeeAddress:
|
|
1090
|
-
destinationAddress:
|
|
1091
|
-
feeRate:
|
|
1092
|
-
refundAddress:
|
|
1093
|
-
repeats:
|
|
1094
|
-
runeName:
|
|
1095
|
-
network:
|
|
1096
|
-
});
|
|
1097
|
-
var runesMintResultSchema =
|
|
1098
|
-
orderId:
|
|
1099
|
-
fundTransactionId:
|
|
1100
|
-
fundingAddress:
|
|
1101
|
-
});
|
|
1102
|
-
var runesMintRequestMessageSchema =
|
|
1132
|
+
var runesMintParamsSchema = v18.object({
|
|
1133
|
+
appServiceFee: v18.optional(v18.number()),
|
|
1134
|
+
appServiceFeeAddress: v18.optional(v18.string()),
|
|
1135
|
+
destinationAddress: v18.string(),
|
|
1136
|
+
feeRate: v18.number(),
|
|
1137
|
+
refundAddress: v18.string(),
|
|
1138
|
+
repeats: v18.number(),
|
|
1139
|
+
runeName: v18.string(),
|
|
1140
|
+
network: v18.optional(v18.enum(BitcoinNetworkType))
|
|
1141
|
+
});
|
|
1142
|
+
var runesMintResultSchema = v18.object({
|
|
1143
|
+
orderId: v18.string(),
|
|
1144
|
+
fundTransactionId: v18.string(),
|
|
1145
|
+
fundingAddress: v18.string()
|
|
1146
|
+
});
|
|
1147
|
+
var runesMintRequestMessageSchema = v18.object({
|
|
1103
1148
|
...rpcRequestMessageSchema.entries,
|
|
1104
|
-
...
|
|
1105
|
-
method:
|
|
1149
|
+
...v18.object({
|
|
1150
|
+
method: v18.literal(runesMintMethodName),
|
|
1106
1151
|
params: runesMintParamsSchema,
|
|
1107
|
-
id:
|
|
1152
|
+
id: v18.string()
|
|
1108
1153
|
}).entries
|
|
1109
1154
|
});
|
|
1110
1155
|
|
|
1111
1156
|
// src/request/types/runesMethods/transfer.ts
|
|
1112
|
-
var
|
|
1157
|
+
var v19 = __toESM(require("valibot"));
|
|
1113
1158
|
var runesTransferMethodName = "runes_transfer";
|
|
1114
|
-
var runesTransferParamsSchema =
|
|
1115
|
-
recipients:
|
|
1116
|
-
|
|
1117
|
-
runeName:
|
|
1118
|
-
amount:
|
|
1119
|
-
address:
|
|
1159
|
+
var runesTransferParamsSchema = v19.object({
|
|
1160
|
+
recipients: v19.array(
|
|
1161
|
+
v19.object({
|
|
1162
|
+
runeName: v19.string(),
|
|
1163
|
+
amount: v19.string(),
|
|
1164
|
+
address: v19.string()
|
|
1120
1165
|
})
|
|
1121
1166
|
)
|
|
1122
1167
|
});
|
|
1123
|
-
var runesTransferResultSchema =
|
|
1124
|
-
txid:
|
|
1168
|
+
var runesTransferResultSchema = v19.object({
|
|
1169
|
+
txid: v19.string()
|
|
1125
1170
|
});
|
|
1126
|
-
var runesTransferRequestMessageSchema =
|
|
1171
|
+
var runesTransferRequestMessageSchema = v19.object({
|
|
1127
1172
|
...rpcRequestMessageSchema.entries,
|
|
1128
|
-
...
|
|
1129
|
-
method:
|
|
1173
|
+
...v19.object({
|
|
1174
|
+
method: v19.literal(runesTransferMethodName),
|
|
1130
1175
|
params: runesTransferParamsSchema,
|
|
1131
|
-
id:
|
|
1176
|
+
id: v19.string()
|
|
1132
1177
|
}).entries
|
|
1133
1178
|
});
|
|
1134
1179
|
|
|
1135
1180
|
// src/request/types/ordinalsMethods.ts
|
|
1136
|
-
var
|
|
1181
|
+
var v20 = __toESM(require("valibot"));
|
|
1137
1182
|
var getInscriptionsMethodName = "ord_getInscriptions";
|
|
1138
|
-
var getInscriptionsParamsSchema =
|
|
1139
|
-
offset:
|
|
1140
|
-
limit:
|
|
1141
|
-
});
|
|
1142
|
-
var getInscriptionsResultSchema =
|
|
1143
|
-
total:
|
|
1144
|
-
limit:
|
|
1145
|
-
offset:
|
|
1146
|
-
inscriptions:
|
|
1147
|
-
|
|
1148
|
-
inscriptionId:
|
|
1149
|
-
inscriptionNumber:
|
|
1150
|
-
address:
|
|
1151
|
-
collectionName:
|
|
1152
|
-
postage:
|
|
1153
|
-
contentLength:
|
|
1154
|
-
contentType:
|
|
1155
|
-
timestamp:
|
|
1156
|
-
offset:
|
|
1157
|
-
genesisTransaction:
|
|
1158
|
-
output:
|
|
1183
|
+
var getInscriptionsParamsSchema = v20.object({
|
|
1184
|
+
offset: v20.number(),
|
|
1185
|
+
limit: v20.number()
|
|
1186
|
+
});
|
|
1187
|
+
var getInscriptionsResultSchema = v20.object({
|
|
1188
|
+
total: v20.number(),
|
|
1189
|
+
limit: v20.number(),
|
|
1190
|
+
offset: v20.number(),
|
|
1191
|
+
inscriptions: v20.array(
|
|
1192
|
+
v20.object({
|
|
1193
|
+
inscriptionId: v20.string(),
|
|
1194
|
+
inscriptionNumber: v20.string(),
|
|
1195
|
+
address: v20.string(),
|
|
1196
|
+
collectionName: v20.optional(v20.string()),
|
|
1197
|
+
postage: v20.string(),
|
|
1198
|
+
contentLength: v20.string(),
|
|
1199
|
+
contentType: v20.string(),
|
|
1200
|
+
timestamp: v20.number(),
|
|
1201
|
+
offset: v20.number(),
|
|
1202
|
+
genesisTransaction: v20.string(),
|
|
1203
|
+
output: v20.string()
|
|
1159
1204
|
})
|
|
1160
1205
|
)
|
|
1161
1206
|
});
|
|
1162
|
-
var getInscriptionsRequestMessageSchema =
|
|
1207
|
+
var getInscriptionsRequestMessageSchema = v20.object({
|
|
1163
1208
|
...rpcRequestMessageSchema.entries,
|
|
1164
|
-
...
|
|
1165
|
-
method:
|
|
1209
|
+
...v20.object({
|
|
1210
|
+
method: v20.literal(getInscriptionsMethodName),
|
|
1166
1211
|
params: getInscriptionsParamsSchema,
|
|
1167
|
-
id:
|
|
1212
|
+
id: v20.string()
|
|
1168
1213
|
}).entries
|
|
1169
1214
|
});
|
|
1170
1215
|
var sendInscriptionsMethodName = "ord_sendInscriptions";
|
|
1171
|
-
var sendInscriptionsParamsSchema =
|
|
1172
|
-
transfers:
|
|
1173
|
-
|
|
1174
|
-
address:
|
|
1175
|
-
inscriptionId:
|
|
1216
|
+
var sendInscriptionsParamsSchema = v20.object({
|
|
1217
|
+
transfers: v20.array(
|
|
1218
|
+
v20.object({
|
|
1219
|
+
address: v20.string(),
|
|
1220
|
+
inscriptionId: v20.string()
|
|
1176
1221
|
})
|
|
1177
1222
|
)
|
|
1178
1223
|
});
|
|
1179
|
-
var sendInscriptionsResultSchema =
|
|
1180
|
-
txid:
|
|
1224
|
+
var sendInscriptionsResultSchema = v20.object({
|
|
1225
|
+
txid: v20.string()
|
|
1181
1226
|
});
|
|
1182
|
-
var sendInscriptionsRequestMessageSchema =
|
|
1227
|
+
var sendInscriptionsRequestMessageSchema = v20.object({
|
|
1183
1228
|
...rpcRequestMessageSchema.entries,
|
|
1184
|
-
...
|
|
1185
|
-
method:
|
|
1229
|
+
...v20.object({
|
|
1230
|
+
method: v20.literal(sendInscriptionsMethodName),
|
|
1186
1231
|
params: sendInscriptionsParamsSchema,
|
|
1187
|
-
id:
|
|
1232
|
+
id: v20.string()
|
|
1188
1233
|
}).entries
|
|
1189
1234
|
});
|
|
1190
1235
|
|
|
@@ -1201,13 +1246,13 @@ var request = async (method, params, providerId) => {
|
|
|
1201
1246
|
throw new Error("A wallet method is required");
|
|
1202
1247
|
}
|
|
1203
1248
|
const response = await provider.request(method, params);
|
|
1204
|
-
if (
|
|
1249
|
+
if (v21.is(rpcErrorResponseMessageSchema, response)) {
|
|
1205
1250
|
return {
|
|
1206
1251
|
status: "error",
|
|
1207
1252
|
error: response.error
|
|
1208
1253
|
};
|
|
1209
1254
|
}
|
|
1210
|
-
if (
|
|
1255
|
+
if (v21.is(rpcSuccessResponseMessageSchema, response)) {
|
|
1211
1256
|
return {
|
|
1212
1257
|
status: "success",
|
|
1213
1258
|
result: response.result
|
|
@@ -1247,7 +1292,12 @@ var urlNetworkSuffix = {
|
|
|
1247
1292
|
["Testnet" /* Testnet */]: "-testnet",
|
|
1248
1293
|
["Signet" /* Signet */]: "-signet"
|
|
1249
1294
|
};
|
|
1250
|
-
var ORDINALS_API_BASE_URL = (network = "Mainnet" /* Mainnet */) =>
|
|
1295
|
+
var ORDINALS_API_BASE_URL = (network = "Mainnet" /* Mainnet */) => {
|
|
1296
|
+
if (network === "Regtest" /* Regtest */) {
|
|
1297
|
+
throw new Error("Ordinals API does not support regtest network");
|
|
1298
|
+
}
|
|
1299
|
+
return `https://ordinals${urlNetworkSuffix[network]}.xverse.app/v1`;
|
|
1300
|
+
};
|
|
1251
1301
|
var RunesApi = class {
|
|
1252
1302
|
client;
|
|
1253
1303
|
constructor(network) {
|
|
@@ -2299,6 +2349,10 @@ var signMultipleTransactions = async (options) => {
|
|
|
2299
2349
|
stxSignTransactionParamsSchema,
|
|
2300
2350
|
stxSignTransactionRequestMessageSchema,
|
|
2301
2351
|
stxSignTransactionResultSchema,
|
|
2352
|
+
stxSignTransactionsMethodName,
|
|
2353
|
+
stxSignTransactionsParamsSchema,
|
|
2354
|
+
stxSignTransactionsRequestMessageSchema,
|
|
2355
|
+
stxSignTransactionsResultSchema,
|
|
2302
2356
|
stxTransferStxMethodName,
|
|
2303
2357
|
stxTransferStxParamsSchema,
|
|
2304
2358
|
stxTransferStxRequestMessageSchema,
|