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