@sats-connect/core 0.14.0-8ca2d84 → 0.14.0-dcc11ec
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 +48 -2
- package/dist/index.d.ts +48 -2
- package/dist/index.js +636 -587
- package/dist/index.mjs +628 -587
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -121,6 +121,14 @@ __export(index_exports, {
|
|
|
121
121
|
isProviderInstalled: () => isProviderInstalled,
|
|
122
122
|
networkChangeEventName: () => networkChangeEventName,
|
|
123
123
|
networkChangeSchema: () => networkChangeSchema,
|
|
124
|
+
openBridgeMethodName: () => openBridgeMethodName,
|
|
125
|
+
openBridgeParamsSchema: () => openBridgeParamsSchema,
|
|
126
|
+
openBridgeRequestMessageSchema: () => openBridgeRequestMessageSchema,
|
|
127
|
+
openBridgeResultSchema: () => openBridgeResultSchema,
|
|
128
|
+
openBuyMethodName: () => openBuyMethodName,
|
|
129
|
+
openBuyParamsSchema: () => openBuyParamsSchema,
|
|
130
|
+
openBuyRequestMessageSchema: () => openBuyRequestMessageSchema,
|
|
131
|
+
openBuyResultSchema: () => openBuyResultSchema,
|
|
124
132
|
openReceiveMethodName: () => openReceiveMethodName,
|
|
125
133
|
openReceiveParamsSchema: () => openReceiveParamsSchema,
|
|
126
134
|
openReceiveRequestMessageSchema: () => openReceiveRequestMessageSchema,
|
|
@@ -278,7 +286,7 @@ __export(index_exports, {
|
|
|
278
286
|
module.exports = __toCommonJS(index_exports);
|
|
279
287
|
|
|
280
288
|
// src/request/index.ts
|
|
281
|
-
var
|
|
289
|
+
var v55 = __toESM(require("valibot"));
|
|
282
290
|
|
|
283
291
|
// src/provider/types.ts
|
|
284
292
|
var v4 = __toESM(require("valibot"));
|
|
@@ -522,7 +530,7 @@ var sanitizeAddressPurposeRequest = (method, params) => {
|
|
|
522
530
|
};
|
|
523
531
|
|
|
524
532
|
// src/request/types/btcMethods.ts
|
|
525
|
-
var
|
|
533
|
+
var v20 = __toESM(require("valibot"));
|
|
526
534
|
|
|
527
535
|
// src/request/types/walletMethods/addNetwork.ts
|
|
528
536
|
var v5 = __toESM(require("valibot"));
|
|
@@ -744,50 +752,83 @@ var getWalletTypeRequestMessageSchema = v14.object({
|
|
|
744
752
|
}).entries
|
|
745
753
|
});
|
|
746
754
|
|
|
747
|
-
// src/request/types/walletMethods/
|
|
755
|
+
// src/request/types/walletMethods/openBridge.ts
|
|
748
756
|
var v15 = __toESM(require("valibot"));
|
|
749
|
-
var
|
|
750
|
-
var
|
|
751
|
-
|
|
757
|
+
var openBridgeMethodName = "wallet_openBridge";
|
|
758
|
+
var openBridgeParamsSchema = v15.object({
|
|
759
|
+
fromAsset: v15.string(),
|
|
760
|
+
toAsset: v15.string()
|
|
752
761
|
});
|
|
753
|
-
var
|
|
754
|
-
var
|
|
762
|
+
var openBridgeResultSchema = v15.nullish(v15.null());
|
|
763
|
+
var openBridgeRequestMessageSchema = v15.object({
|
|
755
764
|
...rpcRequestMessageSchema.entries,
|
|
756
765
|
...v15.object({
|
|
757
|
-
method: v15.literal(
|
|
758
|
-
params:
|
|
766
|
+
method: v15.literal(openBridgeMethodName),
|
|
767
|
+
params: openBridgeParamsSchema,
|
|
759
768
|
id: v15.string()
|
|
760
769
|
}).entries
|
|
761
770
|
});
|
|
762
771
|
|
|
763
|
-
// src/request/types/walletMethods/
|
|
772
|
+
// src/request/types/walletMethods/openBuy.ts
|
|
764
773
|
var v16 = __toESM(require("valibot"));
|
|
765
|
-
var
|
|
766
|
-
var
|
|
767
|
-
|
|
768
|
-
|
|
774
|
+
var openBuyMethodName = "wallet_openBuy";
|
|
775
|
+
var openBuyParamsSchema = v16.object({
|
|
776
|
+
asset: v16.string()
|
|
777
|
+
});
|
|
778
|
+
var openBuyResultSchema = v16.nullish(v16.null());
|
|
779
|
+
var openBuyRequestMessageSchema = v16.object({
|
|
769
780
|
...rpcRequestMessageSchema.entries,
|
|
770
781
|
...v16.object({
|
|
771
|
-
method: v16.literal(
|
|
772
|
-
params:
|
|
782
|
+
method: v16.literal(openBuyMethodName),
|
|
783
|
+
params: openBuyParamsSchema,
|
|
773
784
|
id: v16.string()
|
|
774
785
|
}).entries
|
|
775
786
|
});
|
|
776
787
|
|
|
777
|
-
// src/request/types/walletMethods/
|
|
788
|
+
// src/request/types/walletMethods/openReceive.ts
|
|
778
789
|
var v17 = __toESM(require("valibot"));
|
|
779
|
-
var
|
|
780
|
-
var
|
|
781
|
-
|
|
782
|
-
|
|
790
|
+
var openReceiveMethodName = "wallet_openReceive";
|
|
791
|
+
var openReceiveParamsSchema = v17.object({
|
|
792
|
+
address: v17.string()
|
|
793
|
+
});
|
|
794
|
+
var openReceiveResultSchema = addressSchema;
|
|
795
|
+
var openReceiveRequestMessageSchema = v17.object({
|
|
783
796
|
...rpcRequestMessageSchema.entries,
|
|
784
797
|
...v17.object({
|
|
785
|
-
method: v17.literal(
|
|
786
|
-
params:
|
|
798
|
+
method: v17.literal(openReceiveMethodName),
|
|
799
|
+
params: openReceiveParamsSchema,
|
|
787
800
|
id: v17.string()
|
|
788
801
|
}).entries
|
|
789
802
|
});
|
|
790
803
|
|
|
804
|
+
// src/request/types/walletMethods/renouncePermissions.ts
|
|
805
|
+
var v18 = __toESM(require("valibot"));
|
|
806
|
+
var renouncePermissionsMethodName = "wallet_renouncePermissions";
|
|
807
|
+
var renouncePermissionsParamsSchema = v18.nullish(v18.null());
|
|
808
|
+
var renouncePermissionsResultSchema = v18.nullish(v18.null());
|
|
809
|
+
var renouncePermissionsRequestMessageSchema = v18.object({
|
|
810
|
+
...rpcRequestMessageSchema.entries,
|
|
811
|
+
...v18.object({
|
|
812
|
+
method: v18.literal(renouncePermissionsMethodName),
|
|
813
|
+
params: renouncePermissionsParamsSchema,
|
|
814
|
+
id: v18.string()
|
|
815
|
+
}).entries
|
|
816
|
+
});
|
|
817
|
+
|
|
818
|
+
// src/request/types/walletMethods/requestPermissions.ts
|
|
819
|
+
var v19 = __toESM(require("valibot"));
|
|
820
|
+
var requestPermissionsMethodName = "wallet_requestPermissions";
|
|
821
|
+
var requestPermissionsParamsSchema = v19.nullish(v19.array(PermissionRequestParams));
|
|
822
|
+
var requestPermissionsResultSchema = v19.literal(true);
|
|
823
|
+
var requestPermissionsRequestMessageSchema = v19.object({
|
|
824
|
+
...rpcRequestMessageSchema.entries,
|
|
825
|
+
...v19.object({
|
|
826
|
+
method: v19.literal(requestPermissionsMethodName),
|
|
827
|
+
params: requestPermissionsParamsSchema,
|
|
828
|
+
id: v19.string()
|
|
829
|
+
}).entries
|
|
830
|
+
});
|
|
831
|
+
|
|
791
832
|
// src/request/types/btcMethods.ts
|
|
792
833
|
var ProviderPlatform = /* @__PURE__ */ ((ProviderPlatform2) => {
|
|
793
834
|
ProviderPlatform2["Web"] = "web";
|
|
@@ -795,58 +836,58 @@ var ProviderPlatform = /* @__PURE__ */ ((ProviderPlatform2) => {
|
|
|
795
836
|
return ProviderPlatform2;
|
|
796
837
|
})(ProviderPlatform || {});
|
|
797
838
|
var getInfoMethodName = "getInfo";
|
|
798
|
-
var getInfoParamsSchema =
|
|
799
|
-
var getInfoResultSchema =
|
|
839
|
+
var getInfoParamsSchema = v20.nullish(v20.null());
|
|
840
|
+
var getInfoResultSchema = v20.object({
|
|
800
841
|
/**
|
|
801
842
|
* Version of the wallet.
|
|
802
843
|
*/
|
|
803
|
-
version:
|
|
844
|
+
version: v20.string(),
|
|
804
845
|
/**
|
|
805
846
|
* The platform the wallet is running on (web or mobile).
|
|
806
847
|
*/
|
|
807
|
-
platform:
|
|
848
|
+
platform: v20.optional(v20.enum(ProviderPlatform)),
|
|
808
849
|
/**
|
|
809
850
|
* [WBIP](https://wbips.netlify.app/wbips/WBIP002) methods supported by the wallet.
|
|
810
851
|
*/
|
|
811
|
-
methods:
|
|
852
|
+
methods: v20.optional(v20.array(v20.string())),
|
|
812
853
|
/**
|
|
813
854
|
* List of WBIP standards supported by the wallet. Not currently used.
|
|
814
855
|
*/
|
|
815
|
-
supports:
|
|
856
|
+
supports: v20.array(v20.string())
|
|
816
857
|
});
|
|
817
|
-
var getInfoRequestMessageSchema =
|
|
858
|
+
var getInfoRequestMessageSchema = v20.object({
|
|
818
859
|
...rpcRequestMessageSchema.entries,
|
|
819
|
-
...
|
|
820
|
-
method:
|
|
860
|
+
...v20.object({
|
|
861
|
+
method: v20.literal(getInfoMethodName),
|
|
821
862
|
params: getInfoParamsSchema,
|
|
822
|
-
id:
|
|
863
|
+
id: v20.string()
|
|
823
864
|
}).entries
|
|
824
865
|
});
|
|
825
866
|
var getAddressesMethodName = "getAddresses";
|
|
826
|
-
var getAddressesParamsSchema =
|
|
867
|
+
var getAddressesParamsSchema = v20.object({
|
|
827
868
|
/**
|
|
828
869
|
* The purposes for which to generate addresses. See
|
|
829
870
|
* {@linkcode AddressPurpose} for available purposes.
|
|
830
871
|
*/
|
|
831
|
-
purposes:
|
|
872
|
+
purposes: v20.array(v20.enum(AddressPurpose)),
|
|
832
873
|
/**
|
|
833
874
|
* A message to be displayed to the user in the request prompt.
|
|
834
875
|
*/
|
|
835
|
-
message:
|
|
876
|
+
message: v20.optional(v20.string())
|
|
836
877
|
});
|
|
837
|
-
var getAddressesResultSchema =
|
|
878
|
+
var getAddressesResultSchema = v20.object({
|
|
838
879
|
/**
|
|
839
880
|
* The addresses generated for the given purposes.
|
|
840
881
|
*/
|
|
841
|
-
addresses:
|
|
882
|
+
addresses: v20.array(addressSchema),
|
|
842
883
|
network: getNetworkResultSchema
|
|
843
884
|
});
|
|
844
|
-
var getAddressesRequestMessageSchema =
|
|
885
|
+
var getAddressesRequestMessageSchema = v20.object({
|
|
845
886
|
...rpcRequestMessageSchema.entries,
|
|
846
|
-
...
|
|
847
|
-
method:
|
|
887
|
+
...v20.object({
|
|
888
|
+
method: v20.literal(getAddressesMethodName),
|
|
848
889
|
params: getAddressesParamsSchema,
|
|
849
|
-
id:
|
|
890
|
+
id: v20.string()
|
|
850
891
|
}).entries
|
|
851
892
|
});
|
|
852
893
|
var signMessageMethodName = "signMessage";
|
|
@@ -855,606 +896,606 @@ var MessageSigningProtocols = /* @__PURE__ */ ((MessageSigningProtocols2) => {
|
|
|
855
896
|
MessageSigningProtocols2["BIP322"] = "BIP322";
|
|
856
897
|
return MessageSigningProtocols2;
|
|
857
898
|
})(MessageSigningProtocols || {});
|
|
858
|
-
var signMessageParamsSchema =
|
|
899
|
+
var signMessageParamsSchema = v20.object({
|
|
859
900
|
/**
|
|
860
901
|
* The address used for signing.
|
|
861
902
|
**/
|
|
862
|
-
address:
|
|
903
|
+
address: v20.string(),
|
|
863
904
|
/**
|
|
864
905
|
* The message to sign.
|
|
865
906
|
**/
|
|
866
|
-
message:
|
|
907
|
+
message: v20.string(),
|
|
867
908
|
/**
|
|
868
909
|
* The protocol to use for signing the message.
|
|
869
910
|
*/
|
|
870
|
-
protocol:
|
|
911
|
+
protocol: v20.optional(v20.enum(MessageSigningProtocols))
|
|
871
912
|
});
|
|
872
|
-
var signMessageResultSchema =
|
|
913
|
+
var signMessageResultSchema = v20.object({
|
|
873
914
|
/**
|
|
874
915
|
* The signature of the message.
|
|
875
916
|
*/
|
|
876
|
-
signature:
|
|
917
|
+
signature: v20.string(),
|
|
877
918
|
/**
|
|
878
919
|
* hash of the message.
|
|
879
920
|
*/
|
|
880
|
-
messageHash:
|
|
921
|
+
messageHash: v20.string(),
|
|
881
922
|
/**
|
|
882
923
|
* The address used for signing.
|
|
883
924
|
*/
|
|
884
|
-
address:
|
|
925
|
+
address: v20.string(),
|
|
885
926
|
/**
|
|
886
927
|
* The protocol to use for signing the message.
|
|
887
928
|
*/
|
|
888
|
-
protocol:
|
|
929
|
+
protocol: v20.enum(MessageSigningProtocols)
|
|
889
930
|
});
|
|
890
|
-
var signMessageRequestMessageSchema =
|
|
931
|
+
var signMessageRequestMessageSchema = v20.object({
|
|
891
932
|
...rpcRequestMessageSchema.entries,
|
|
892
|
-
...
|
|
893
|
-
method:
|
|
933
|
+
...v20.object({
|
|
934
|
+
method: v20.literal(signMessageMethodName),
|
|
894
935
|
params: signMessageParamsSchema,
|
|
895
|
-
id:
|
|
936
|
+
id: v20.string()
|
|
896
937
|
}).entries
|
|
897
938
|
});
|
|
898
939
|
var sendTransferMethodName = "sendTransfer";
|
|
899
|
-
var sendTransferParamsSchema =
|
|
940
|
+
var sendTransferParamsSchema = v20.object({
|
|
900
941
|
/**
|
|
901
942
|
* Array of recipients to send to.
|
|
902
943
|
* The amount to send to each recipient is in satoshis.
|
|
903
944
|
*/
|
|
904
|
-
recipients:
|
|
905
|
-
|
|
906
|
-
address:
|
|
907
|
-
amount:
|
|
945
|
+
recipients: v20.array(
|
|
946
|
+
v20.object({
|
|
947
|
+
address: v20.string(),
|
|
948
|
+
amount: v20.number()
|
|
908
949
|
})
|
|
909
950
|
)
|
|
910
951
|
});
|
|
911
|
-
var sendTransferResultSchema =
|
|
952
|
+
var sendTransferResultSchema = v20.object({
|
|
912
953
|
/**
|
|
913
954
|
* The transaction id as a hex-encoded string.
|
|
914
955
|
*/
|
|
915
|
-
txid:
|
|
956
|
+
txid: v20.string()
|
|
916
957
|
});
|
|
917
|
-
var sendTransferRequestMessageSchema =
|
|
958
|
+
var sendTransferRequestMessageSchema = v20.object({
|
|
918
959
|
...rpcRequestMessageSchema.entries,
|
|
919
|
-
...
|
|
920
|
-
method:
|
|
960
|
+
...v20.object({
|
|
961
|
+
method: v20.literal(sendTransferMethodName),
|
|
921
962
|
params: sendTransferParamsSchema,
|
|
922
|
-
id:
|
|
963
|
+
id: v20.string()
|
|
923
964
|
}).entries
|
|
924
965
|
});
|
|
925
966
|
var signPsbtMethodName = "signPsbt";
|
|
926
|
-
var signPsbtParamsSchema =
|
|
967
|
+
var signPsbtParamsSchema = v20.object({
|
|
927
968
|
/**
|
|
928
969
|
* The base64 encoded PSBT to sign.
|
|
929
970
|
*/
|
|
930
|
-
psbt:
|
|
971
|
+
psbt: v20.string(),
|
|
931
972
|
/**
|
|
932
973
|
* The inputs to sign.
|
|
933
974
|
* The key is the address and the value is an array of indexes of the inputs to sign.
|
|
934
975
|
*/
|
|
935
|
-
signInputs:
|
|
976
|
+
signInputs: v20.optional(v20.record(v20.string(), v20.array(v20.number()))),
|
|
936
977
|
/**
|
|
937
978
|
* Whether to broadcast the transaction after signing.
|
|
938
979
|
**/
|
|
939
|
-
broadcast:
|
|
980
|
+
broadcast: v20.optional(v20.boolean())
|
|
940
981
|
});
|
|
941
|
-
var signPsbtResultSchema =
|
|
982
|
+
var signPsbtResultSchema = v20.object({
|
|
942
983
|
/**
|
|
943
984
|
* The base64 encoded PSBT after signing.
|
|
944
985
|
*/
|
|
945
|
-
psbt:
|
|
986
|
+
psbt: v20.string(),
|
|
946
987
|
/**
|
|
947
988
|
* The transaction id as a hex-encoded string.
|
|
948
989
|
* This is only returned if the transaction was broadcast.
|
|
949
990
|
**/
|
|
950
|
-
txid:
|
|
991
|
+
txid: v20.optional(v20.string())
|
|
951
992
|
});
|
|
952
|
-
var signPsbtRequestMessageSchema =
|
|
993
|
+
var signPsbtRequestMessageSchema = v20.object({
|
|
953
994
|
...rpcRequestMessageSchema.entries,
|
|
954
|
-
...
|
|
955
|
-
method:
|
|
995
|
+
...v20.object({
|
|
996
|
+
method: v20.literal(signPsbtMethodName),
|
|
956
997
|
params: signPsbtParamsSchema,
|
|
957
|
-
id:
|
|
998
|
+
id: v20.string()
|
|
958
999
|
}).entries
|
|
959
1000
|
});
|
|
960
1001
|
var getAccountsMethodName = "getAccounts";
|
|
961
|
-
var getAccountsParamsSchema =
|
|
1002
|
+
var getAccountsParamsSchema = v20.object({
|
|
962
1003
|
/**
|
|
963
1004
|
* The purposes for which to generate addresses. See
|
|
964
1005
|
* {@linkcode AddressPurpose} for available purposes.
|
|
965
1006
|
*/
|
|
966
|
-
purposes:
|
|
1007
|
+
purposes: v20.array(v20.enum(AddressPurpose)),
|
|
967
1008
|
/**
|
|
968
1009
|
* A message to be displayed to the user in the request prompt.
|
|
969
1010
|
*/
|
|
970
|
-
message:
|
|
1011
|
+
message: v20.optional(v20.string())
|
|
971
1012
|
});
|
|
972
|
-
var getAccountsResultSchema =
|
|
973
|
-
|
|
1013
|
+
var getAccountsResultSchema = v20.array(
|
|
1014
|
+
v20.object({
|
|
974
1015
|
...addressSchema.entries,
|
|
975
|
-
...
|
|
1016
|
+
...v20.object({
|
|
976
1017
|
walletType: walletTypeSchema
|
|
977
1018
|
}).entries
|
|
978
1019
|
})
|
|
979
1020
|
);
|
|
980
|
-
var getAccountsRequestMessageSchema =
|
|
1021
|
+
var getAccountsRequestMessageSchema = v20.object({
|
|
981
1022
|
...rpcRequestMessageSchema.entries,
|
|
982
|
-
...
|
|
983
|
-
method:
|
|
1023
|
+
...v20.object({
|
|
1024
|
+
method: v20.literal(getAccountsMethodName),
|
|
984
1025
|
params: getAccountsParamsSchema,
|
|
985
|
-
id:
|
|
1026
|
+
id: v20.string()
|
|
986
1027
|
}).entries
|
|
987
1028
|
});
|
|
988
1029
|
var getBalanceMethodName = "getBalance";
|
|
989
|
-
var getBalanceParamsSchema =
|
|
990
|
-
var getBalanceResultSchema =
|
|
1030
|
+
var getBalanceParamsSchema = v20.nullish(v20.null());
|
|
1031
|
+
var getBalanceResultSchema = v20.object({
|
|
991
1032
|
/**
|
|
992
1033
|
* The confirmed balance of the wallet in sats. Using a string due to chrome
|
|
993
1034
|
* messages not supporting bigint
|
|
994
1035
|
* (https://issues.chromium.org/issues/40116184).
|
|
995
1036
|
*/
|
|
996
|
-
confirmed:
|
|
1037
|
+
confirmed: v20.string(),
|
|
997
1038
|
/**
|
|
998
1039
|
* The unconfirmed balance of the wallet in sats. Using a string due to chrome
|
|
999
1040
|
* messages not supporting bigint
|
|
1000
1041
|
* (https://issues.chromium.org/issues/40116184).
|
|
1001
1042
|
*/
|
|
1002
|
-
unconfirmed:
|
|
1043
|
+
unconfirmed: v20.string(),
|
|
1003
1044
|
/**
|
|
1004
1045
|
* The total balance (both confirmed and unconfrimed UTXOs) of the wallet in
|
|
1005
1046
|
* sats. Using a string due to chrome messages not supporting bigint
|
|
1006
1047
|
* (https://issues.chromium.org/issues/40116184).
|
|
1007
1048
|
*/
|
|
1008
|
-
total:
|
|
1049
|
+
total: v20.string()
|
|
1009
1050
|
});
|
|
1010
|
-
var getBalanceRequestMessageSchema =
|
|
1051
|
+
var getBalanceRequestMessageSchema = v20.object({
|
|
1011
1052
|
...rpcRequestMessageSchema.entries,
|
|
1012
|
-
...
|
|
1013
|
-
method:
|
|
1014
|
-
id:
|
|
1053
|
+
...v20.object({
|
|
1054
|
+
method: v20.literal(getBalanceMethodName),
|
|
1055
|
+
id: v20.string()
|
|
1015
1056
|
}).entries
|
|
1016
1057
|
});
|
|
1017
1058
|
|
|
1018
1059
|
// src/request/types/ordinalsMethods.ts
|
|
1019
|
-
var
|
|
1060
|
+
var v21 = __toESM(require("valibot"));
|
|
1020
1061
|
var getInscriptionsMethodName = "ord_getInscriptions";
|
|
1021
|
-
var getInscriptionsParamsSchema =
|
|
1022
|
-
offset:
|
|
1023
|
-
limit:
|
|
1024
|
-
});
|
|
1025
|
-
var getInscriptionsResultSchema =
|
|
1026
|
-
total:
|
|
1027
|
-
limit:
|
|
1028
|
-
offset:
|
|
1029
|
-
inscriptions:
|
|
1030
|
-
|
|
1031
|
-
inscriptionId:
|
|
1032
|
-
inscriptionNumber:
|
|
1033
|
-
address:
|
|
1034
|
-
collectionName:
|
|
1035
|
-
postage:
|
|
1036
|
-
contentLength:
|
|
1037
|
-
contentType:
|
|
1038
|
-
timestamp:
|
|
1039
|
-
offset:
|
|
1040
|
-
genesisTransaction:
|
|
1041
|
-
output:
|
|
1062
|
+
var getInscriptionsParamsSchema = v21.object({
|
|
1063
|
+
offset: v21.number(),
|
|
1064
|
+
limit: v21.number()
|
|
1065
|
+
});
|
|
1066
|
+
var getInscriptionsResultSchema = v21.object({
|
|
1067
|
+
total: v21.number(),
|
|
1068
|
+
limit: v21.number(),
|
|
1069
|
+
offset: v21.number(),
|
|
1070
|
+
inscriptions: v21.array(
|
|
1071
|
+
v21.object({
|
|
1072
|
+
inscriptionId: v21.string(),
|
|
1073
|
+
inscriptionNumber: v21.string(),
|
|
1074
|
+
address: v21.string(),
|
|
1075
|
+
collectionName: v21.optional(v21.string()),
|
|
1076
|
+
postage: v21.string(),
|
|
1077
|
+
contentLength: v21.string(),
|
|
1078
|
+
contentType: v21.string(),
|
|
1079
|
+
timestamp: v21.number(),
|
|
1080
|
+
offset: v21.number(),
|
|
1081
|
+
genesisTransaction: v21.string(),
|
|
1082
|
+
output: v21.string()
|
|
1042
1083
|
})
|
|
1043
1084
|
)
|
|
1044
1085
|
});
|
|
1045
|
-
var getInscriptionsRequestMessageSchema =
|
|
1086
|
+
var getInscriptionsRequestMessageSchema = v21.object({
|
|
1046
1087
|
...rpcRequestMessageSchema.entries,
|
|
1047
|
-
...
|
|
1048
|
-
method:
|
|
1088
|
+
...v21.object({
|
|
1089
|
+
method: v21.literal(getInscriptionsMethodName),
|
|
1049
1090
|
params: getInscriptionsParamsSchema,
|
|
1050
|
-
id:
|
|
1091
|
+
id: v21.string()
|
|
1051
1092
|
}).entries
|
|
1052
1093
|
});
|
|
1053
1094
|
var sendInscriptionsMethodName = "ord_sendInscriptions";
|
|
1054
|
-
var sendInscriptionsParamsSchema =
|
|
1055
|
-
transfers:
|
|
1056
|
-
|
|
1057
|
-
address:
|
|
1058
|
-
inscriptionId:
|
|
1095
|
+
var sendInscriptionsParamsSchema = v21.object({
|
|
1096
|
+
transfers: v21.array(
|
|
1097
|
+
v21.object({
|
|
1098
|
+
address: v21.string(),
|
|
1099
|
+
inscriptionId: v21.string()
|
|
1059
1100
|
})
|
|
1060
1101
|
)
|
|
1061
1102
|
});
|
|
1062
|
-
var sendInscriptionsResultSchema =
|
|
1063
|
-
txid:
|
|
1103
|
+
var sendInscriptionsResultSchema = v21.object({
|
|
1104
|
+
txid: v21.string()
|
|
1064
1105
|
});
|
|
1065
|
-
var sendInscriptionsRequestMessageSchema =
|
|
1106
|
+
var sendInscriptionsRequestMessageSchema = v21.object({
|
|
1066
1107
|
...rpcRequestMessageSchema.entries,
|
|
1067
|
-
...
|
|
1068
|
-
method:
|
|
1108
|
+
...v21.object({
|
|
1109
|
+
method: v21.literal(sendInscriptionsMethodName),
|
|
1069
1110
|
params: sendInscriptionsParamsSchema,
|
|
1070
|
-
id:
|
|
1111
|
+
id: v21.string()
|
|
1071
1112
|
}).entries
|
|
1072
1113
|
});
|
|
1073
1114
|
|
|
1074
1115
|
// src/request/types/runesMethods/etch.ts
|
|
1075
|
-
var
|
|
1116
|
+
var v22 = __toESM(require("valibot"));
|
|
1076
1117
|
var runesEtchMethodName = "runes_etch";
|
|
1077
|
-
var etchTermsSchema =
|
|
1078
|
-
amount:
|
|
1079
|
-
cap:
|
|
1080
|
-
heightStart:
|
|
1081
|
-
heightEnd:
|
|
1082
|
-
offsetStart:
|
|
1083
|
-
offsetEnd:
|
|
1084
|
-
});
|
|
1085
|
-
var inscriptionDetailsSchema =
|
|
1086
|
-
contentType:
|
|
1087
|
-
contentBase64:
|
|
1088
|
-
});
|
|
1089
|
-
var runesEtchParamsSchema =
|
|
1090
|
-
runeName:
|
|
1091
|
-
divisibility:
|
|
1092
|
-
symbol:
|
|
1093
|
-
premine:
|
|
1094
|
-
isMintable:
|
|
1095
|
-
delegateInscriptionId:
|
|
1096
|
-
destinationAddress:
|
|
1097
|
-
refundAddress:
|
|
1098
|
-
feeRate:
|
|
1099
|
-
appServiceFee:
|
|
1100
|
-
appServiceFeeAddress:
|
|
1101
|
-
terms:
|
|
1102
|
-
inscriptionDetails:
|
|
1103
|
-
network:
|
|
1104
|
-
});
|
|
1105
|
-
var runesEtchResultSchema =
|
|
1106
|
-
orderId:
|
|
1107
|
-
fundTransactionId:
|
|
1108
|
-
fundingAddress:
|
|
1109
|
-
});
|
|
1110
|
-
var runesEtchRequestMessageSchema =
|
|
1118
|
+
var etchTermsSchema = v22.object({
|
|
1119
|
+
amount: v22.string(),
|
|
1120
|
+
cap: v22.string(),
|
|
1121
|
+
heightStart: v22.optional(v22.string()),
|
|
1122
|
+
heightEnd: v22.optional(v22.string()),
|
|
1123
|
+
offsetStart: v22.optional(v22.string()),
|
|
1124
|
+
offsetEnd: v22.optional(v22.string())
|
|
1125
|
+
});
|
|
1126
|
+
var inscriptionDetailsSchema = v22.object({
|
|
1127
|
+
contentType: v22.string(),
|
|
1128
|
+
contentBase64: v22.string()
|
|
1129
|
+
});
|
|
1130
|
+
var runesEtchParamsSchema = v22.object({
|
|
1131
|
+
runeName: v22.string(),
|
|
1132
|
+
divisibility: v22.optional(v22.number()),
|
|
1133
|
+
symbol: v22.optional(v22.string()),
|
|
1134
|
+
premine: v22.optional(v22.string()),
|
|
1135
|
+
isMintable: v22.boolean(),
|
|
1136
|
+
delegateInscriptionId: v22.optional(v22.string()),
|
|
1137
|
+
destinationAddress: v22.string(),
|
|
1138
|
+
refundAddress: v22.string(),
|
|
1139
|
+
feeRate: v22.number(),
|
|
1140
|
+
appServiceFee: v22.optional(v22.number()),
|
|
1141
|
+
appServiceFeeAddress: v22.optional(v22.string()),
|
|
1142
|
+
terms: v22.optional(etchTermsSchema),
|
|
1143
|
+
inscriptionDetails: v22.optional(inscriptionDetailsSchema),
|
|
1144
|
+
network: v22.optional(v22.enum(BitcoinNetworkType))
|
|
1145
|
+
});
|
|
1146
|
+
var runesEtchResultSchema = v22.object({
|
|
1147
|
+
orderId: v22.string(),
|
|
1148
|
+
fundTransactionId: v22.string(),
|
|
1149
|
+
fundingAddress: v22.string()
|
|
1150
|
+
});
|
|
1151
|
+
var runesEtchRequestMessageSchema = v22.object({
|
|
1111
1152
|
...rpcRequestMessageSchema.entries,
|
|
1112
|
-
...
|
|
1113
|
-
method:
|
|
1153
|
+
...v22.object({
|
|
1154
|
+
method: v22.literal(runesEtchMethodName),
|
|
1114
1155
|
params: runesEtchParamsSchema,
|
|
1115
|
-
id:
|
|
1156
|
+
id: v22.string()
|
|
1116
1157
|
}).entries
|
|
1117
1158
|
});
|
|
1118
1159
|
|
|
1119
1160
|
// src/request/types/runesMethods/getBalance.ts
|
|
1120
|
-
var
|
|
1161
|
+
var v23 = __toESM(require("valibot"));
|
|
1121
1162
|
var runesGetBalanceMethodName = "runes_getBalance";
|
|
1122
|
-
var runesGetBalanceParamsSchema =
|
|
1123
|
-
var runesGetBalanceResultSchema =
|
|
1124
|
-
balances:
|
|
1125
|
-
|
|
1126
|
-
runeName:
|
|
1127
|
-
amount:
|
|
1128
|
-
divisibility:
|
|
1129
|
-
symbol:
|
|
1130
|
-
inscriptionId:
|
|
1131
|
-
spendableBalance:
|
|
1163
|
+
var runesGetBalanceParamsSchema = v23.nullish(v23.null());
|
|
1164
|
+
var runesGetBalanceResultSchema = v23.object({
|
|
1165
|
+
balances: v23.array(
|
|
1166
|
+
v23.object({
|
|
1167
|
+
runeName: v23.string(),
|
|
1168
|
+
amount: v23.string(),
|
|
1169
|
+
divisibility: v23.number(),
|
|
1170
|
+
symbol: v23.string(),
|
|
1171
|
+
inscriptionId: v23.nullish(v23.string()),
|
|
1172
|
+
spendableBalance: v23.string()
|
|
1132
1173
|
})
|
|
1133
1174
|
)
|
|
1134
1175
|
});
|
|
1135
|
-
var runesGetBalanceRequestMessageSchema =
|
|
1176
|
+
var runesGetBalanceRequestMessageSchema = v23.object({
|
|
1136
1177
|
...rpcRequestMessageSchema.entries,
|
|
1137
|
-
...
|
|
1138
|
-
method:
|
|
1178
|
+
...v23.object({
|
|
1179
|
+
method: v23.literal(runesGetBalanceMethodName),
|
|
1139
1180
|
params: runesGetBalanceParamsSchema,
|
|
1140
|
-
id:
|
|
1181
|
+
id: v23.string()
|
|
1141
1182
|
}).entries
|
|
1142
1183
|
});
|
|
1143
1184
|
|
|
1144
1185
|
// src/request/types/runesMethods/mint.ts
|
|
1145
|
-
var
|
|
1186
|
+
var v24 = __toESM(require("valibot"));
|
|
1146
1187
|
var runesMintMethodName = "runes_mint";
|
|
1147
|
-
var runesMintParamsSchema =
|
|
1148
|
-
appServiceFee:
|
|
1149
|
-
appServiceFeeAddress:
|
|
1150
|
-
destinationAddress:
|
|
1151
|
-
feeRate:
|
|
1152
|
-
refundAddress:
|
|
1153
|
-
repeats:
|
|
1154
|
-
runeName:
|
|
1155
|
-
network:
|
|
1156
|
-
});
|
|
1157
|
-
var runesMintResultSchema =
|
|
1158
|
-
orderId:
|
|
1159
|
-
fundTransactionId:
|
|
1160
|
-
fundingAddress:
|
|
1161
|
-
});
|
|
1162
|
-
var runesMintRequestMessageSchema =
|
|
1188
|
+
var runesMintParamsSchema = v24.object({
|
|
1189
|
+
appServiceFee: v24.optional(v24.number()),
|
|
1190
|
+
appServiceFeeAddress: v24.optional(v24.string()),
|
|
1191
|
+
destinationAddress: v24.string(),
|
|
1192
|
+
feeRate: v24.number(),
|
|
1193
|
+
refundAddress: v24.string(),
|
|
1194
|
+
repeats: v24.number(),
|
|
1195
|
+
runeName: v24.string(),
|
|
1196
|
+
network: v24.optional(v24.enum(BitcoinNetworkType))
|
|
1197
|
+
});
|
|
1198
|
+
var runesMintResultSchema = v24.object({
|
|
1199
|
+
orderId: v24.string(),
|
|
1200
|
+
fundTransactionId: v24.string(),
|
|
1201
|
+
fundingAddress: v24.string()
|
|
1202
|
+
});
|
|
1203
|
+
var runesMintRequestMessageSchema = v24.object({
|
|
1163
1204
|
...rpcRequestMessageSchema.entries,
|
|
1164
|
-
...
|
|
1165
|
-
method:
|
|
1205
|
+
...v24.object({
|
|
1206
|
+
method: v24.literal(runesMintMethodName),
|
|
1166
1207
|
params: runesMintParamsSchema,
|
|
1167
|
-
id:
|
|
1208
|
+
id: v24.string()
|
|
1168
1209
|
}).entries
|
|
1169
1210
|
});
|
|
1170
1211
|
|
|
1171
1212
|
// src/request/types/runesMethods/transfer.ts
|
|
1172
|
-
var
|
|
1213
|
+
var v25 = __toESM(require("valibot"));
|
|
1173
1214
|
var runesTransferMethodName = "runes_transfer";
|
|
1174
|
-
var runesTransferParamsSchema =
|
|
1175
|
-
recipients:
|
|
1176
|
-
|
|
1177
|
-
runeName:
|
|
1178
|
-
amount:
|
|
1179
|
-
address:
|
|
1215
|
+
var runesTransferParamsSchema = v25.object({
|
|
1216
|
+
recipients: v25.array(
|
|
1217
|
+
v25.object({
|
|
1218
|
+
runeName: v25.string(),
|
|
1219
|
+
amount: v25.string(),
|
|
1220
|
+
address: v25.string()
|
|
1180
1221
|
})
|
|
1181
1222
|
)
|
|
1182
1223
|
});
|
|
1183
|
-
var runesTransferResultSchema =
|
|
1184
|
-
txid:
|
|
1224
|
+
var runesTransferResultSchema = v25.object({
|
|
1225
|
+
txid: v25.string()
|
|
1185
1226
|
});
|
|
1186
|
-
var runesTransferRequestMessageSchema =
|
|
1227
|
+
var runesTransferRequestMessageSchema = v25.object({
|
|
1187
1228
|
...rpcRequestMessageSchema.entries,
|
|
1188
|
-
...
|
|
1189
|
-
method:
|
|
1229
|
+
...v25.object({
|
|
1230
|
+
method: v25.literal(runesTransferMethodName),
|
|
1190
1231
|
params: runesTransferParamsSchema,
|
|
1191
|
-
id:
|
|
1232
|
+
id: v25.string()
|
|
1192
1233
|
}).entries
|
|
1193
1234
|
});
|
|
1194
1235
|
|
|
1195
1236
|
// src/request/types/sparkMethods/flashnetMethods/clawbackFunds.ts
|
|
1196
|
-
var
|
|
1237
|
+
var v26 = __toESM(require("valibot"));
|
|
1197
1238
|
var sparkFlashnetClawbackFundsMethodName = "spark_flashnet_clawbackFunds";
|
|
1198
|
-
var sparkFlashnetClawbackFundsParamsSchema =
|
|
1199
|
-
sparkTransferId:
|
|
1200
|
-
lpIdentityPublicKey:
|
|
1201
|
-
});
|
|
1202
|
-
var sparkFlashnetClawbackFundsResultSchema =
|
|
1203
|
-
requestId:
|
|
1204
|
-
accepted:
|
|
1205
|
-
internalRequestId:
|
|
1206
|
-
sparkStatusTrackingId:
|
|
1207
|
-
error:
|
|
1208
|
-
});
|
|
1209
|
-
var sparkFlashnetClawbackFundsRequestMessageSchema =
|
|
1239
|
+
var sparkFlashnetClawbackFundsParamsSchema = v26.object({
|
|
1240
|
+
sparkTransferId: v26.string(),
|
|
1241
|
+
lpIdentityPublicKey: v26.string()
|
|
1242
|
+
});
|
|
1243
|
+
var sparkFlashnetClawbackFundsResultSchema = v26.object({
|
|
1244
|
+
requestId: v26.string(),
|
|
1245
|
+
accepted: v26.boolean(),
|
|
1246
|
+
internalRequestId: v26.optional(v26.string()),
|
|
1247
|
+
sparkStatusTrackingId: v26.optional(v26.string()),
|
|
1248
|
+
error: v26.optional(v26.string())
|
|
1249
|
+
});
|
|
1250
|
+
var sparkFlashnetClawbackFundsRequestMessageSchema = v26.object({
|
|
1210
1251
|
...rpcRequestMessageSchema.entries,
|
|
1211
|
-
...
|
|
1212
|
-
method:
|
|
1252
|
+
...v26.object({
|
|
1253
|
+
method: v26.literal(sparkFlashnetClawbackFundsMethodName),
|
|
1213
1254
|
params: sparkFlashnetClawbackFundsParamsSchema,
|
|
1214
|
-
id:
|
|
1255
|
+
id: v26.string()
|
|
1215
1256
|
}).entries
|
|
1216
1257
|
});
|
|
1217
1258
|
|
|
1218
1259
|
// src/request/types/sparkMethods/flashnetMethods/executeRouteSwap.ts
|
|
1219
|
-
var
|
|
1260
|
+
var v27 = __toESM(require("valibot"));
|
|
1220
1261
|
var sparkFlashnetExecuteRouteSwapMethodName = "spark_flashnet_executeRouteSwap";
|
|
1221
|
-
var sparkFlashnetExecuteRouteSwapParamsSchema =
|
|
1222
|
-
hops:
|
|
1223
|
-
|
|
1224
|
-
poolId:
|
|
1225
|
-
assetInAddress:
|
|
1226
|
-
assetOutAddress:
|
|
1227
|
-
hopIntegratorFeeRateBps:
|
|
1262
|
+
var sparkFlashnetExecuteRouteSwapParamsSchema = v27.object({
|
|
1263
|
+
hops: v27.array(
|
|
1264
|
+
v27.object({
|
|
1265
|
+
poolId: v27.string(),
|
|
1266
|
+
assetInAddress: v27.string(),
|
|
1267
|
+
assetOutAddress: v27.string(),
|
|
1268
|
+
hopIntegratorFeeRateBps: v27.optional(v27.number())
|
|
1228
1269
|
})
|
|
1229
1270
|
),
|
|
1230
|
-
initialAssetAddress:
|
|
1231
|
-
inputAmount:
|
|
1232
|
-
maxRouteSlippageBps:
|
|
1233
|
-
minAmountOut:
|
|
1234
|
-
integratorFeeRateBps:
|
|
1235
|
-
integratorPublicKey:
|
|
1236
|
-
});
|
|
1237
|
-
var sparkFlashnetExecuteRouteSwapResultSchema =
|
|
1238
|
-
requestId:
|
|
1239
|
-
accepted:
|
|
1240
|
-
outputAmount:
|
|
1241
|
-
executionPrice:
|
|
1242
|
-
finalOutboundTransferId:
|
|
1243
|
-
error:
|
|
1244
|
-
});
|
|
1245
|
-
var sparkFlashnetExecuteRouteSwapRequestMessageSchema =
|
|
1271
|
+
initialAssetAddress: v27.string(),
|
|
1272
|
+
inputAmount: v27.string(),
|
|
1273
|
+
maxRouteSlippageBps: v27.string(),
|
|
1274
|
+
minAmountOut: v27.optional(v27.string()),
|
|
1275
|
+
integratorFeeRateBps: v27.optional(v27.number()),
|
|
1276
|
+
integratorPublicKey: v27.optional(v27.string())
|
|
1277
|
+
});
|
|
1278
|
+
var sparkFlashnetExecuteRouteSwapResultSchema = v27.object({
|
|
1279
|
+
requestId: v27.string(),
|
|
1280
|
+
accepted: v27.boolean(),
|
|
1281
|
+
outputAmount: v27.string(),
|
|
1282
|
+
executionPrice: v27.string(),
|
|
1283
|
+
finalOutboundTransferId: v27.string(),
|
|
1284
|
+
error: v27.optional(v27.string())
|
|
1285
|
+
});
|
|
1286
|
+
var sparkFlashnetExecuteRouteSwapRequestMessageSchema = v27.object({
|
|
1246
1287
|
...rpcRequestMessageSchema.entries,
|
|
1247
|
-
...
|
|
1248
|
-
method:
|
|
1288
|
+
...v27.object({
|
|
1289
|
+
method: v27.literal(sparkFlashnetExecuteRouteSwapMethodName),
|
|
1249
1290
|
params: sparkFlashnetExecuteRouteSwapParamsSchema,
|
|
1250
|
-
id:
|
|
1291
|
+
id: v27.string()
|
|
1251
1292
|
}).entries
|
|
1252
1293
|
});
|
|
1253
1294
|
|
|
1254
1295
|
// src/request/types/sparkMethods/flashnetMethods/executeSwap.ts
|
|
1255
|
-
var
|
|
1296
|
+
var v28 = __toESM(require("valibot"));
|
|
1256
1297
|
var sparkFlashnetExecuteSwapMethodName = "spark_flashnet_executeSwap";
|
|
1257
|
-
var sparkFlashnetExecuteSwapParamsSchema =
|
|
1258
|
-
poolId:
|
|
1259
|
-
assetInAddress:
|
|
1260
|
-
assetOutAddress:
|
|
1261
|
-
amountIn:
|
|
1262
|
-
maxSlippageBps:
|
|
1263
|
-
minAmountOut:
|
|
1264
|
-
integratorFeeRateBps:
|
|
1265
|
-
integratorPublicKey:
|
|
1266
|
-
});
|
|
1267
|
-
var sparkFlashnetExecuteSwapResultSchema =
|
|
1268
|
-
requestId:
|
|
1269
|
-
accepted:
|
|
1270
|
-
amountOut:
|
|
1271
|
-
feeAmount:
|
|
1272
|
-
executionPrice:
|
|
1273
|
-
assetOutAddress:
|
|
1274
|
-
assetInAddress:
|
|
1275
|
-
outboundTransferId:
|
|
1276
|
-
error:
|
|
1277
|
-
});
|
|
1278
|
-
var sparkFlashnetExecuteSwapRequestMessageSchema =
|
|
1298
|
+
var sparkFlashnetExecuteSwapParamsSchema = v28.object({
|
|
1299
|
+
poolId: v28.string(),
|
|
1300
|
+
assetInAddress: v28.string(),
|
|
1301
|
+
assetOutAddress: v28.string(),
|
|
1302
|
+
amountIn: v28.string(),
|
|
1303
|
+
maxSlippageBps: v28.number(),
|
|
1304
|
+
minAmountOut: v28.optional(v28.string()),
|
|
1305
|
+
integratorFeeRateBps: v28.optional(v28.number()),
|
|
1306
|
+
integratorPublicKey: v28.optional(v28.string())
|
|
1307
|
+
});
|
|
1308
|
+
var sparkFlashnetExecuteSwapResultSchema = v28.object({
|
|
1309
|
+
requestId: v28.string(),
|
|
1310
|
+
accepted: v28.boolean(),
|
|
1311
|
+
amountOut: v28.optional(v28.string()),
|
|
1312
|
+
feeAmount: v28.optional(v28.string()),
|
|
1313
|
+
executionPrice: v28.optional(v28.string()),
|
|
1314
|
+
assetOutAddress: v28.optional(v28.string()),
|
|
1315
|
+
assetInAddress: v28.optional(v28.string()),
|
|
1316
|
+
outboundTransferId: v28.optional(v28.string()),
|
|
1317
|
+
error: v28.optional(v28.string())
|
|
1318
|
+
});
|
|
1319
|
+
var sparkFlashnetExecuteSwapRequestMessageSchema = v28.object({
|
|
1279
1320
|
...rpcRequestMessageSchema.entries,
|
|
1280
|
-
...
|
|
1281
|
-
method:
|
|
1321
|
+
...v28.object({
|
|
1322
|
+
method: v28.literal(sparkFlashnetExecuteSwapMethodName),
|
|
1282
1323
|
params: sparkFlashnetExecuteSwapParamsSchema,
|
|
1283
|
-
id:
|
|
1324
|
+
id: v28.string()
|
|
1284
1325
|
}).entries
|
|
1285
1326
|
});
|
|
1286
1327
|
|
|
1287
1328
|
// src/request/types/sparkMethods/flashnetMethods/getClawbackEligibleTransfers.ts
|
|
1288
|
-
var
|
|
1329
|
+
var v29 = __toESM(require("valibot"));
|
|
1289
1330
|
var sparkGetClawbackEligibleTransfersMethodName = "spark_flashnet_getClawbackEligibleTransfers";
|
|
1290
|
-
var sparkGetClawbackEligibleTransfersParamsSchema =
|
|
1291
|
-
var sparkGetClawbackEligibleTransfersResultSchema =
|
|
1292
|
-
eligibleTransfers:
|
|
1293
|
-
|
|
1294
|
-
txId:
|
|
1295
|
-
createdAt:
|
|
1296
|
-
lpIdentityPublicKey:
|
|
1331
|
+
var sparkGetClawbackEligibleTransfersParamsSchema = v29.nullish(v29.null());
|
|
1332
|
+
var sparkGetClawbackEligibleTransfersResultSchema = v29.object({
|
|
1333
|
+
eligibleTransfers: v29.array(
|
|
1334
|
+
v29.object({
|
|
1335
|
+
txId: v29.string(),
|
|
1336
|
+
createdAt: v29.string(),
|
|
1337
|
+
lpIdentityPublicKey: v29.string()
|
|
1297
1338
|
})
|
|
1298
1339
|
)
|
|
1299
1340
|
});
|
|
1300
|
-
var sparkGetClawbackEligibleTransfersRequestMessageSchema =
|
|
1341
|
+
var sparkGetClawbackEligibleTransfersRequestMessageSchema = v29.object({
|
|
1301
1342
|
...rpcRequestMessageSchema.entries,
|
|
1302
|
-
...
|
|
1303
|
-
method:
|
|
1343
|
+
...v29.object({
|
|
1344
|
+
method: v29.literal(sparkGetClawbackEligibleTransfersMethodName),
|
|
1304
1345
|
params: sparkGetClawbackEligibleTransfersParamsSchema,
|
|
1305
|
-
id:
|
|
1346
|
+
id: v29.string()
|
|
1306
1347
|
}).entries
|
|
1307
1348
|
});
|
|
1308
1349
|
|
|
1309
1350
|
// src/request/types/sparkMethods/flashnetMethods/getJwt.ts
|
|
1310
|
-
var
|
|
1351
|
+
var v30 = __toESM(require("valibot"));
|
|
1311
1352
|
var sparkFlashnetGetJwtMethodName = "spark_flashnet_getJwt";
|
|
1312
|
-
var sparkFlashnetGetJwtParamsSchema =
|
|
1313
|
-
var sparkFlashnetGetJwtResultSchema =
|
|
1353
|
+
var sparkFlashnetGetJwtParamsSchema = v30.null();
|
|
1354
|
+
var sparkFlashnetGetJwtResultSchema = v30.object({
|
|
1314
1355
|
/**
|
|
1315
1356
|
* The JWT token for authenticated requests to the Flashnet API.
|
|
1316
1357
|
*/
|
|
1317
|
-
jwt:
|
|
1358
|
+
jwt: v30.string()
|
|
1318
1359
|
});
|
|
1319
|
-
var sparkFlashnetGetJwtRequestMessageSchema =
|
|
1360
|
+
var sparkFlashnetGetJwtRequestMessageSchema = v30.object({
|
|
1320
1361
|
...rpcRequestMessageSchema.entries,
|
|
1321
|
-
...
|
|
1322
|
-
method:
|
|
1362
|
+
...v30.object({
|
|
1363
|
+
method: v30.literal(sparkFlashnetGetJwtMethodName),
|
|
1323
1364
|
params: sparkFlashnetGetJwtParamsSchema,
|
|
1324
|
-
id:
|
|
1365
|
+
id: v30.string()
|
|
1325
1366
|
}).entries
|
|
1326
1367
|
});
|
|
1327
1368
|
|
|
1328
1369
|
// src/request/types/sparkMethods/flashnetMethods/intents/addLiquidity.ts
|
|
1329
|
-
var v29 = __toESM(require("valibot"));
|
|
1330
|
-
var sparkFlashnetAddLiquidityIntentSchema = v29.object({
|
|
1331
|
-
type: v29.literal("addLiquidity"),
|
|
1332
|
-
data: v29.object({
|
|
1333
|
-
userPublicKey: v29.string(),
|
|
1334
|
-
poolId: v29.string(),
|
|
1335
|
-
assetAAmount: v29.string(),
|
|
1336
|
-
assetBAmount: v29.string(),
|
|
1337
|
-
assetAMinAmountIn: v29.string(),
|
|
1338
|
-
assetBMinAmountIn: v29.string(),
|
|
1339
|
-
assetATransferId: v29.string(),
|
|
1340
|
-
assetBTransferId: v29.string(),
|
|
1341
|
-
nonce: v29.string()
|
|
1342
|
-
})
|
|
1343
|
-
});
|
|
1344
|
-
|
|
1345
|
-
// src/request/types/sparkMethods/flashnetMethods/intents/clawback.ts
|
|
1346
|
-
var v30 = __toESM(require("valibot"));
|
|
1347
|
-
var sparkFlashnetClawbackIntentSchema = v30.object({
|
|
1348
|
-
type: v30.literal("clawback"),
|
|
1349
|
-
data: v30.object({
|
|
1350
|
-
senderPublicKey: v30.string(),
|
|
1351
|
-
sparkTransferId: v30.string(),
|
|
1352
|
-
lpIdentityPublicKey: v30.string(),
|
|
1353
|
-
nonce: v30.string()
|
|
1354
|
-
})
|
|
1355
|
-
});
|
|
1356
|
-
|
|
1357
|
-
// src/request/types/sparkMethods/flashnetMethods/intents/confirmInitialDeposit.ts
|
|
1358
1370
|
var v31 = __toESM(require("valibot"));
|
|
1359
|
-
var
|
|
1360
|
-
type: v31.literal("
|
|
1371
|
+
var sparkFlashnetAddLiquidityIntentSchema = v31.object({
|
|
1372
|
+
type: v31.literal("addLiquidity"),
|
|
1361
1373
|
data: v31.object({
|
|
1374
|
+
userPublicKey: v31.string(),
|
|
1362
1375
|
poolId: v31.string(),
|
|
1363
|
-
|
|
1364
|
-
|
|
1376
|
+
assetAAmount: v31.string(),
|
|
1377
|
+
assetBAmount: v31.string(),
|
|
1378
|
+
assetAMinAmountIn: v31.string(),
|
|
1379
|
+
assetBMinAmountIn: v31.string(),
|
|
1380
|
+
assetATransferId: v31.string(),
|
|
1381
|
+
assetBTransferId: v31.string(),
|
|
1365
1382
|
nonce: v31.string()
|
|
1366
1383
|
})
|
|
1367
1384
|
});
|
|
1368
1385
|
|
|
1369
|
-
// src/request/types/sparkMethods/flashnetMethods/intents/
|
|
1386
|
+
// src/request/types/sparkMethods/flashnetMethods/intents/clawback.ts
|
|
1370
1387
|
var v32 = __toESM(require("valibot"));
|
|
1371
|
-
var
|
|
1372
|
-
type: v32.literal("
|
|
1388
|
+
var sparkFlashnetClawbackIntentSchema = v32.object({
|
|
1389
|
+
type: v32.literal("clawback"),
|
|
1373
1390
|
data: v32.object({
|
|
1374
|
-
|
|
1375
|
-
|
|
1376
|
-
|
|
1377
|
-
lpFeeRateBps: v32.union([v32.number(), v32.string()]),
|
|
1378
|
-
totalHostFeeRateBps: v32.union([v32.number(), v32.string()]),
|
|
1391
|
+
senderPublicKey: v32.string(),
|
|
1392
|
+
sparkTransferId: v32.string(),
|
|
1393
|
+
lpIdentityPublicKey: v32.string(),
|
|
1379
1394
|
nonce: v32.string()
|
|
1380
1395
|
})
|
|
1381
1396
|
});
|
|
1382
1397
|
|
|
1383
|
-
// src/request/types/sparkMethods/flashnetMethods/intents/
|
|
1398
|
+
// src/request/types/sparkMethods/flashnetMethods/intents/confirmInitialDeposit.ts
|
|
1384
1399
|
var v33 = __toESM(require("valibot"));
|
|
1385
|
-
var
|
|
1386
|
-
type: v33.literal("
|
|
1400
|
+
var sparkFlashnetConfirmInitialDepositIntentSchema = v33.object({
|
|
1401
|
+
type: v33.literal("confirmInitialDeposit"),
|
|
1387
1402
|
data: v33.object({
|
|
1388
|
-
|
|
1389
|
-
|
|
1390
|
-
assetAInitialReserve: v33.string(),
|
|
1391
|
-
virtualReserveA: v33.union([v33.number(), v33.string()]),
|
|
1392
|
-
virtualReserveB: v33.union([v33.number(), v33.string()]),
|
|
1393
|
-
threshold: v33.union([v33.number(), v33.string()]),
|
|
1394
|
-
lpFeeRateBps: v33.union([v33.number(), v33.string()]),
|
|
1395
|
-
totalHostFeeRateBps: v33.union([v33.number(), v33.string()]),
|
|
1403
|
+
poolId: v33.string(),
|
|
1404
|
+
assetASparkTransferId: v33.string(),
|
|
1396
1405
|
poolOwnerPublicKey: v33.string(),
|
|
1397
1406
|
nonce: v33.string()
|
|
1398
1407
|
})
|
|
1399
1408
|
});
|
|
1400
1409
|
|
|
1401
|
-
// src/request/types/sparkMethods/flashnetMethods/intents/
|
|
1410
|
+
// src/request/types/sparkMethods/flashnetMethods/intents/createConstantProductPool.ts
|
|
1402
1411
|
var v34 = __toESM(require("valibot"));
|
|
1403
|
-
var
|
|
1404
|
-
type: v34.literal("
|
|
1412
|
+
var sparkFlashnetCreateConstantProductPoolIntentSchema = v34.object({
|
|
1413
|
+
type: v34.literal("createConstantProductPool"),
|
|
1405
1414
|
data: v34.object({
|
|
1406
|
-
|
|
1407
|
-
|
|
1408
|
-
|
|
1415
|
+
poolOwnerPublicKey: v34.string(),
|
|
1416
|
+
assetAAddress: v34.string(),
|
|
1417
|
+
assetBAddress: v34.string(),
|
|
1418
|
+
lpFeeRateBps: v34.union([v34.number(), v34.string()]),
|
|
1419
|
+
totalHostFeeRateBps: v34.union([v34.number(), v34.string()]),
|
|
1409
1420
|
nonce: v34.string()
|
|
1410
1421
|
})
|
|
1411
1422
|
});
|
|
1412
1423
|
|
|
1413
|
-
// src/request/types/sparkMethods/flashnetMethods/intents/
|
|
1424
|
+
// src/request/types/sparkMethods/flashnetMethods/intents/createSingleSidedPool.ts
|
|
1414
1425
|
var v35 = __toESM(require("valibot"));
|
|
1415
|
-
var
|
|
1416
|
-
type: v35.literal("
|
|
1426
|
+
var sparkFlashnetCreateSingleSidedPoolIntentSchema = v35.object({
|
|
1427
|
+
type: v35.literal("createSingleSidedPool"),
|
|
1417
1428
|
data: v35.object({
|
|
1418
|
-
|
|
1419
|
-
|
|
1420
|
-
|
|
1421
|
-
|
|
1422
|
-
|
|
1423
|
-
|
|
1424
|
-
|
|
1425
|
-
|
|
1426
|
-
|
|
1427
|
-
),
|
|
1428
|
-
inputAmount: v35.string(),
|
|
1429
|
-
maxRouteSlippageBps: v35.union([v35.number(), v35.string()]),
|
|
1430
|
-
minAmountOut: v35.string(),
|
|
1431
|
-
defaultIntegratorFeeRateBps: v35.optional(v35.union([v35.number(), v35.string()])),
|
|
1429
|
+
assetAAddress: v35.string(),
|
|
1430
|
+
assetBAddress: v35.string(),
|
|
1431
|
+
assetAInitialReserve: v35.string(),
|
|
1432
|
+
virtualReserveA: v35.union([v35.number(), v35.string()]),
|
|
1433
|
+
virtualReserveB: v35.union([v35.number(), v35.string()]),
|
|
1434
|
+
threshold: v35.union([v35.number(), v35.string()]),
|
|
1435
|
+
lpFeeRateBps: v35.union([v35.number(), v35.string()]),
|
|
1436
|
+
totalHostFeeRateBps: v35.union([v35.number(), v35.string()]),
|
|
1437
|
+
poolOwnerPublicKey: v35.string(),
|
|
1432
1438
|
nonce: v35.string()
|
|
1433
1439
|
})
|
|
1434
1440
|
});
|
|
1435
1441
|
|
|
1436
|
-
// src/request/types/sparkMethods/flashnetMethods/intents/
|
|
1442
|
+
// src/request/types/sparkMethods/flashnetMethods/intents/removeLiquidity.ts
|
|
1437
1443
|
var v36 = __toESM(require("valibot"));
|
|
1438
|
-
var
|
|
1439
|
-
type: v36.literal("
|
|
1444
|
+
var sparkFlashnetRemoveLiquidityIntentSchema = v36.object({
|
|
1445
|
+
type: v36.literal("removeLiquidity"),
|
|
1440
1446
|
data: v36.object({
|
|
1441
1447
|
userPublicKey: v36.string(),
|
|
1442
1448
|
poolId: v36.string(),
|
|
1443
|
-
|
|
1444
|
-
assetInAddress: v36.string(),
|
|
1445
|
-
assetOutAddress: v36.string(),
|
|
1446
|
-
amountIn: v36.string(),
|
|
1447
|
-
maxSlippageBps: v36.union([v36.number(), v36.string()]),
|
|
1448
|
-
minAmountOut: v36.string(),
|
|
1449
|
-
totalIntegratorFeeRateBps: v36.optional(v36.union([v36.number(), v36.string()])),
|
|
1449
|
+
lpTokensToRemove: v36.string(),
|
|
1450
1450
|
nonce: v36.string()
|
|
1451
1451
|
})
|
|
1452
1452
|
});
|
|
1453
1453
|
|
|
1454
|
-
// src/request/types/sparkMethods/flashnetMethods/
|
|
1454
|
+
// src/request/types/sparkMethods/flashnetMethods/intents/routeSwap.ts
|
|
1455
1455
|
var v37 = __toESM(require("valibot"));
|
|
1456
|
+
var sparkFlashnetRouteSwapIntentSchema = v37.object({
|
|
1457
|
+
type: v37.literal("executeRouteSwap"),
|
|
1458
|
+
data: v37.object({
|
|
1459
|
+
userPublicKey: v37.string(),
|
|
1460
|
+
initialSparkTransferId: v37.string(),
|
|
1461
|
+
hops: v37.array(
|
|
1462
|
+
v37.object({
|
|
1463
|
+
poolId: v37.string(),
|
|
1464
|
+
inputAssetAddress: v37.string(),
|
|
1465
|
+
outputAssetAddress: v37.string(),
|
|
1466
|
+
hopIntegratorFeeRateBps: v37.optional(v37.union([v37.number(), v37.string()]))
|
|
1467
|
+
})
|
|
1468
|
+
),
|
|
1469
|
+
inputAmount: v37.string(),
|
|
1470
|
+
maxRouteSlippageBps: v37.union([v37.number(), v37.string()]),
|
|
1471
|
+
minAmountOut: v37.string(),
|
|
1472
|
+
defaultIntegratorFeeRateBps: v37.optional(v37.union([v37.number(), v37.string()])),
|
|
1473
|
+
nonce: v37.string()
|
|
1474
|
+
})
|
|
1475
|
+
});
|
|
1476
|
+
|
|
1477
|
+
// src/request/types/sparkMethods/flashnetMethods/intents/swap.ts
|
|
1478
|
+
var v38 = __toESM(require("valibot"));
|
|
1479
|
+
var sparkFlashnetSwapIntentSchema = v38.object({
|
|
1480
|
+
type: v38.literal("executeSwap"),
|
|
1481
|
+
data: v38.object({
|
|
1482
|
+
userPublicKey: v38.string(),
|
|
1483
|
+
poolId: v38.string(),
|
|
1484
|
+
transferId: v38.string(),
|
|
1485
|
+
assetInAddress: v38.string(),
|
|
1486
|
+
assetOutAddress: v38.string(),
|
|
1487
|
+
amountIn: v38.string(),
|
|
1488
|
+
maxSlippageBps: v38.union([v38.number(), v38.string()]),
|
|
1489
|
+
minAmountOut: v38.string(),
|
|
1490
|
+
totalIntegratorFeeRateBps: v38.optional(v38.union([v38.number(), v38.string()])),
|
|
1491
|
+
nonce: v38.string()
|
|
1492
|
+
})
|
|
1493
|
+
});
|
|
1494
|
+
|
|
1495
|
+
// src/request/types/sparkMethods/flashnetMethods/signIntent.ts
|
|
1496
|
+
var v39 = __toESM(require("valibot"));
|
|
1456
1497
|
var sparkFlashnetSignIntentMethodName = "spark_flashnet_signIntent";
|
|
1457
|
-
var sparkFlashnetSignIntentParamsSchema =
|
|
1498
|
+
var sparkFlashnetSignIntentParamsSchema = v39.union([
|
|
1458
1499
|
sparkFlashnetSwapIntentSchema,
|
|
1459
1500
|
sparkFlashnetRouteSwapIntentSchema,
|
|
1460
1501
|
sparkFlashnetAddLiquidityIntentSchema,
|
|
@@ -1464,109 +1505,109 @@ var sparkFlashnetSignIntentParamsSchema = v37.union([
|
|
|
1464
1505
|
sparkFlashnetCreateSingleSidedPoolIntentSchema,
|
|
1465
1506
|
sparkFlashnetRemoveLiquidityIntentSchema
|
|
1466
1507
|
]);
|
|
1467
|
-
var sparkFlashnetSignIntentResultSchema =
|
|
1508
|
+
var sparkFlashnetSignIntentResultSchema = v39.object({
|
|
1468
1509
|
/**
|
|
1469
1510
|
* The signed intent as a hex string.
|
|
1470
1511
|
*/
|
|
1471
|
-
signature:
|
|
1512
|
+
signature: v39.string()
|
|
1472
1513
|
});
|
|
1473
|
-
var sparkFlashnetSignIntentRequestMessageSchema =
|
|
1514
|
+
var sparkFlashnetSignIntentRequestMessageSchema = v39.object({
|
|
1474
1515
|
...rpcRequestMessageSchema.entries,
|
|
1475
|
-
...
|
|
1476
|
-
method:
|
|
1516
|
+
...v39.object({
|
|
1517
|
+
method: v39.literal(sparkFlashnetSignIntentMethodName),
|
|
1477
1518
|
params: sparkFlashnetSignIntentParamsSchema,
|
|
1478
|
-
id:
|
|
1519
|
+
id: v39.string()
|
|
1479
1520
|
}).entries
|
|
1480
1521
|
});
|
|
1481
1522
|
|
|
1482
1523
|
// src/request/types/sparkMethods/flashnetMethods/signStructuredMessage.ts
|
|
1483
|
-
var
|
|
1524
|
+
var v40 = __toESM(require("valibot"));
|
|
1484
1525
|
var sparkFlashnetSignStructuredMessageMethodName = "spark_flashnet_signStructuredMessage";
|
|
1485
|
-
var sparkFlashnetSignStructuredMessageParamsSchema =
|
|
1486
|
-
message:
|
|
1526
|
+
var sparkFlashnetSignStructuredMessageParamsSchema = v40.object({
|
|
1527
|
+
message: v40.string()
|
|
1487
1528
|
});
|
|
1488
|
-
var sparkFlashnetSignStructuredMessageResultSchema =
|
|
1489
|
-
message:
|
|
1490
|
-
signature:
|
|
1529
|
+
var sparkFlashnetSignStructuredMessageResultSchema = v40.object({
|
|
1530
|
+
message: v40.string(),
|
|
1531
|
+
signature: v40.string()
|
|
1491
1532
|
});
|
|
1492
|
-
var sparkFlashnetSignStructuredMessageRequestMessageSchema =
|
|
1533
|
+
var sparkFlashnetSignStructuredMessageRequestMessageSchema = v40.object({
|
|
1493
1534
|
...rpcRequestMessageSchema.entries,
|
|
1494
|
-
...
|
|
1495
|
-
method:
|
|
1535
|
+
...v40.object({
|
|
1536
|
+
method: v40.literal(sparkFlashnetSignStructuredMessageMethodName),
|
|
1496
1537
|
params: sparkFlashnetSignStructuredMessageParamsSchema,
|
|
1497
|
-
id:
|
|
1538
|
+
id: v40.string()
|
|
1498
1539
|
}).entries
|
|
1499
1540
|
});
|
|
1500
1541
|
|
|
1501
1542
|
// src/request/types/sparkMethods/getAddresses.ts
|
|
1502
|
-
var
|
|
1543
|
+
var v41 = __toESM(require("valibot"));
|
|
1503
1544
|
var sparkGetAddressesMethodName = "spark_getAddresses";
|
|
1504
|
-
var sparkGetAddressesParamsSchema =
|
|
1505
|
-
|
|
1545
|
+
var sparkGetAddressesParamsSchema = v41.nullish(
|
|
1546
|
+
v41.object({
|
|
1506
1547
|
/**
|
|
1507
1548
|
* A message to be displayed to the user in the request prompt.
|
|
1508
1549
|
*/
|
|
1509
|
-
message:
|
|
1550
|
+
message: v41.optional(v41.string())
|
|
1510
1551
|
})
|
|
1511
1552
|
);
|
|
1512
|
-
var sparkGetAddressesResultSchema =
|
|
1553
|
+
var sparkGetAddressesResultSchema = v41.object({
|
|
1513
1554
|
/**
|
|
1514
1555
|
* The addresses generated for the given purposes.
|
|
1515
1556
|
*/
|
|
1516
|
-
addresses:
|
|
1557
|
+
addresses: v41.array(addressSchema),
|
|
1517
1558
|
network: getNetworkResultSchema
|
|
1518
1559
|
});
|
|
1519
|
-
var sparkGetAddressesRequestMessageSchema =
|
|
1560
|
+
var sparkGetAddressesRequestMessageSchema = v41.object({
|
|
1520
1561
|
...rpcRequestMessageSchema.entries,
|
|
1521
|
-
...
|
|
1522
|
-
method:
|
|
1562
|
+
...v41.object({
|
|
1563
|
+
method: v41.literal(sparkGetAddressesMethodName),
|
|
1523
1564
|
params: sparkGetAddressesParamsSchema,
|
|
1524
|
-
id:
|
|
1565
|
+
id: v41.string()
|
|
1525
1566
|
}).entries
|
|
1526
1567
|
});
|
|
1527
1568
|
|
|
1528
1569
|
// src/request/types/sparkMethods/getBalance.ts
|
|
1529
|
-
var
|
|
1570
|
+
var v42 = __toESM(require("valibot"));
|
|
1530
1571
|
var sparkGetBalanceMethodName = "spark_getBalance";
|
|
1531
|
-
var sparkGetBalanceParamsSchema =
|
|
1532
|
-
var sparkGetBalanceResultSchema =
|
|
1572
|
+
var sparkGetBalanceParamsSchema = v42.nullish(v42.null());
|
|
1573
|
+
var sparkGetBalanceResultSchema = v42.object({
|
|
1533
1574
|
/**
|
|
1534
1575
|
* The Spark Bitcoin address balance in sats in string form.
|
|
1535
1576
|
*/
|
|
1536
|
-
balance:
|
|
1537
|
-
tokenBalances:
|
|
1538
|
-
|
|
1577
|
+
balance: v42.string(),
|
|
1578
|
+
tokenBalances: v42.array(
|
|
1579
|
+
v42.object({
|
|
1539
1580
|
/* The address balance of the token in string form as it can overflow a js number */
|
|
1540
|
-
balance:
|
|
1541
|
-
tokenMetadata:
|
|
1542
|
-
tokenIdentifier:
|
|
1543
|
-
tokenName:
|
|
1544
|
-
tokenTicker:
|
|
1545
|
-
decimals:
|
|
1546
|
-
maxSupply:
|
|
1581
|
+
balance: v42.string(),
|
|
1582
|
+
tokenMetadata: v42.object({
|
|
1583
|
+
tokenIdentifier: v42.string(),
|
|
1584
|
+
tokenName: v42.string(),
|
|
1585
|
+
tokenTicker: v42.string(),
|
|
1586
|
+
decimals: v42.number(),
|
|
1587
|
+
maxSupply: v42.string()
|
|
1547
1588
|
})
|
|
1548
1589
|
})
|
|
1549
1590
|
)
|
|
1550
1591
|
});
|
|
1551
|
-
var sparkGetBalanceRequestMessageSchema =
|
|
1592
|
+
var sparkGetBalanceRequestMessageSchema = v42.object({
|
|
1552
1593
|
...rpcRequestMessageSchema.entries,
|
|
1553
|
-
...
|
|
1554
|
-
method:
|
|
1594
|
+
...v42.object({
|
|
1595
|
+
method: v42.literal(sparkGetBalanceMethodName),
|
|
1555
1596
|
params: sparkGetBalanceParamsSchema,
|
|
1556
|
-
id:
|
|
1597
|
+
id: v42.string()
|
|
1557
1598
|
}).entries
|
|
1558
1599
|
});
|
|
1559
1600
|
|
|
1560
1601
|
// src/request/types/sparkMethods/signMessage.ts
|
|
1561
|
-
var
|
|
1602
|
+
var v43 = __toESM(require("valibot"));
|
|
1562
1603
|
var sparkSignMessageMethodName = "spark_signMessage";
|
|
1563
|
-
var sparkSignMessageParamsSchema =
|
|
1604
|
+
var sparkSignMessageParamsSchema = v43.object({
|
|
1564
1605
|
/**
|
|
1565
1606
|
* The message to sign. The message should only consist of valid UTF-8 characters.
|
|
1566
1607
|
*/
|
|
1567
|
-
message:
|
|
1608
|
+
message: v43.string()
|
|
1568
1609
|
});
|
|
1569
|
-
var sparkSignMessageResultSchema =
|
|
1610
|
+
var sparkSignMessageResultSchema = v43.object({
|
|
1570
1611
|
/**
|
|
1571
1612
|
* The signature, encoded in base64, of the message hash.
|
|
1572
1613
|
*
|
|
@@ -1574,98 +1615,98 @@ var sparkSignMessageResultSchema = v41.object({
|
|
|
1574
1615
|
* and the resulting byte array is hashed with SHA256 before signing
|
|
1575
1616
|
* with the private key.
|
|
1576
1617
|
*/
|
|
1577
|
-
signature:
|
|
1618
|
+
signature: v43.string()
|
|
1578
1619
|
});
|
|
1579
|
-
var sparkSignMessageRequestMessageSchema =
|
|
1620
|
+
var sparkSignMessageRequestMessageSchema = v43.object({
|
|
1580
1621
|
...rpcRequestMessageSchema.entries,
|
|
1581
|
-
...
|
|
1582
|
-
method:
|
|
1622
|
+
...v43.object({
|
|
1623
|
+
method: v43.literal(sparkSignMessageMethodName),
|
|
1583
1624
|
params: sparkSignMessageParamsSchema,
|
|
1584
|
-
id:
|
|
1625
|
+
id: v43.string()
|
|
1585
1626
|
}).entries
|
|
1586
1627
|
});
|
|
1587
1628
|
|
|
1588
1629
|
// src/request/types/sparkMethods/transfer.ts
|
|
1589
|
-
var
|
|
1630
|
+
var v44 = __toESM(require("valibot"));
|
|
1590
1631
|
var sparkTransferMethodName = "spark_transfer";
|
|
1591
|
-
var sparkTransferParamsSchema =
|
|
1632
|
+
var sparkTransferParamsSchema = v44.object({
|
|
1592
1633
|
/**
|
|
1593
1634
|
* Amount of SATS to transfer as a string or number.
|
|
1594
1635
|
*/
|
|
1595
|
-
amountSats:
|
|
1636
|
+
amountSats: v44.union([v44.number(), v44.string()]),
|
|
1596
1637
|
/**
|
|
1597
1638
|
* The recipient's spark address.
|
|
1598
1639
|
*/
|
|
1599
|
-
receiverSparkAddress:
|
|
1640
|
+
receiverSparkAddress: v44.string()
|
|
1600
1641
|
});
|
|
1601
|
-
var sparkTransferResultSchema =
|
|
1642
|
+
var sparkTransferResultSchema = v44.object({
|
|
1602
1643
|
/**
|
|
1603
1644
|
* The ID of the transaction.
|
|
1604
1645
|
*/
|
|
1605
|
-
id:
|
|
1646
|
+
id: v44.string()
|
|
1606
1647
|
});
|
|
1607
|
-
var sparkTransferRequestMessageSchema =
|
|
1648
|
+
var sparkTransferRequestMessageSchema = v44.object({
|
|
1608
1649
|
...rpcRequestMessageSchema.entries,
|
|
1609
|
-
...
|
|
1610
|
-
method:
|
|
1650
|
+
...v44.object({
|
|
1651
|
+
method: v44.literal(sparkTransferMethodName),
|
|
1611
1652
|
params: sparkTransferParamsSchema,
|
|
1612
|
-
id:
|
|
1653
|
+
id: v44.string()
|
|
1613
1654
|
}).entries
|
|
1614
1655
|
});
|
|
1615
1656
|
|
|
1616
1657
|
// src/request/types/sparkMethods/transferToken.ts
|
|
1617
|
-
var
|
|
1658
|
+
var v45 = __toESM(require("valibot"));
|
|
1618
1659
|
var sparkTransferTokenMethodName = "spark_transferToken";
|
|
1619
|
-
var sparkTransferTokenParamsSchema =
|
|
1660
|
+
var sparkTransferTokenParamsSchema = v45.object({
|
|
1620
1661
|
/**
|
|
1621
1662
|
* Amount of units of the token to transfer as a string or number.
|
|
1622
1663
|
*/
|
|
1623
|
-
tokenAmount:
|
|
1664
|
+
tokenAmount: v45.union([v45.number(), v45.string()]),
|
|
1624
1665
|
/**
|
|
1625
1666
|
* The Bech32m token identifier.
|
|
1626
1667
|
*/
|
|
1627
|
-
tokenIdentifier:
|
|
1668
|
+
tokenIdentifier: v45.string(),
|
|
1628
1669
|
/**
|
|
1629
1670
|
* The recipient's spark address.
|
|
1630
1671
|
*/
|
|
1631
|
-
receiverSparkAddress:
|
|
1672
|
+
receiverSparkAddress: v45.string()
|
|
1632
1673
|
});
|
|
1633
|
-
var sparkTransferTokenResultSchema =
|
|
1674
|
+
var sparkTransferTokenResultSchema = v45.object({
|
|
1634
1675
|
/**
|
|
1635
1676
|
* The ID of the transaction.
|
|
1636
1677
|
*/
|
|
1637
|
-
id:
|
|
1678
|
+
id: v45.string()
|
|
1638
1679
|
});
|
|
1639
|
-
var sparkTransferTokenRequestMessageSchema =
|
|
1680
|
+
var sparkTransferTokenRequestMessageSchema = v45.object({
|
|
1640
1681
|
...rpcRequestMessageSchema.entries,
|
|
1641
|
-
...
|
|
1642
|
-
method:
|
|
1682
|
+
...v45.object({
|
|
1683
|
+
method: v45.literal(sparkTransferTokenMethodName),
|
|
1643
1684
|
params: sparkTransferTokenParamsSchema,
|
|
1644
|
-
id:
|
|
1685
|
+
id: v45.string()
|
|
1645
1686
|
}).entries
|
|
1646
1687
|
});
|
|
1647
1688
|
|
|
1648
1689
|
// src/request/types/stxMethods/callContract.ts
|
|
1649
|
-
var
|
|
1690
|
+
var v46 = __toESM(require("valibot"));
|
|
1650
1691
|
var stxCallContractMethodName = "stx_callContract";
|
|
1651
|
-
var stxCallContractParamsSchema =
|
|
1692
|
+
var stxCallContractParamsSchema = v46.object({
|
|
1652
1693
|
/**
|
|
1653
1694
|
* The contract principal.
|
|
1654
1695
|
*
|
|
1655
1696
|
* E.g. `"SPKE...GD5C.my-contract"`
|
|
1656
1697
|
*/
|
|
1657
|
-
contract:
|
|
1698
|
+
contract: v46.string(),
|
|
1658
1699
|
/**
|
|
1659
1700
|
* The name of the function to call.
|
|
1660
1701
|
*
|
|
1661
1702
|
* Note: spec changes ongoing,
|
|
1662
1703
|
* https://github.com/stacksgov/sips/pull/166#pullrequestreview-1914236999
|
|
1663
1704
|
*/
|
|
1664
|
-
functionName:
|
|
1705
|
+
functionName: v46.string(),
|
|
1665
1706
|
/**
|
|
1666
1707
|
* @deprecated in favor of `functionArgs` for @stacks/connect compatibility
|
|
1667
1708
|
*/
|
|
1668
|
-
arguments:
|
|
1709
|
+
arguments: v46.optional(v46.array(v46.string())),
|
|
1669
1710
|
/**
|
|
1670
1711
|
* The function's arguments. The arguments are expected to be hex-encoded
|
|
1671
1712
|
* strings of Clarity values.
|
|
@@ -1680,274 +1721,274 @@ var stxCallContractParamsSchema = v44.object({
|
|
|
1680
1721
|
* const hexArgs = functionArgs.map(cvToHex);
|
|
1681
1722
|
* ```
|
|
1682
1723
|
*/
|
|
1683
|
-
functionArgs:
|
|
1724
|
+
functionArgs: v46.optional(v46.array(v46.string())),
|
|
1684
1725
|
/**
|
|
1685
1726
|
* The post conditions to apply to the contract call.
|
|
1686
1727
|
*/
|
|
1687
|
-
postConditions:
|
|
1728
|
+
postConditions: v46.optional(v46.array(v46.string())),
|
|
1688
1729
|
/**
|
|
1689
1730
|
* The mode to apply to the post conditions.
|
|
1690
1731
|
*/
|
|
1691
|
-
postConditionMode:
|
|
1732
|
+
postConditionMode: v46.optional(v46.union([v46.literal("allow"), v46.literal("deny")]))
|
|
1692
1733
|
});
|
|
1693
|
-
var stxCallContractResultSchema =
|
|
1734
|
+
var stxCallContractResultSchema = v46.object({
|
|
1694
1735
|
/**
|
|
1695
1736
|
* The ID of the transaction.
|
|
1696
1737
|
*/
|
|
1697
|
-
txid:
|
|
1738
|
+
txid: v46.string(),
|
|
1698
1739
|
/**
|
|
1699
1740
|
* A Stacks transaction as a hex-encoded string.
|
|
1700
1741
|
*/
|
|
1701
|
-
transaction:
|
|
1742
|
+
transaction: v46.string()
|
|
1702
1743
|
});
|
|
1703
|
-
var stxCallContractRequestMessageSchema =
|
|
1744
|
+
var stxCallContractRequestMessageSchema = v46.object({
|
|
1704
1745
|
...rpcRequestMessageSchema.entries,
|
|
1705
|
-
...
|
|
1706
|
-
method:
|
|
1746
|
+
...v46.object({
|
|
1747
|
+
method: v46.literal(stxCallContractMethodName),
|
|
1707
1748
|
params: stxCallContractParamsSchema,
|
|
1708
|
-
id:
|
|
1749
|
+
id: v46.string()
|
|
1709
1750
|
}).entries
|
|
1710
1751
|
});
|
|
1711
1752
|
|
|
1712
1753
|
// src/request/types/stxMethods/deployContract.ts
|
|
1713
|
-
var
|
|
1754
|
+
var v47 = __toESM(require("valibot"));
|
|
1714
1755
|
var stxDeployContractMethodName = "stx_deployContract";
|
|
1715
|
-
var stxDeployContractParamsSchema =
|
|
1756
|
+
var stxDeployContractParamsSchema = v47.object({
|
|
1716
1757
|
/**
|
|
1717
1758
|
* Name of the contract.
|
|
1718
1759
|
*/
|
|
1719
|
-
name:
|
|
1760
|
+
name: v47.string(),
|
|
1720
1761
|
/**
|
|
1721
1762
|
* The source code of the Clarity contract.
|
|
1722
1763
|
*/
|
|
1723
|
-
clarityCode:
|
|
1764
|
+
clarityCode: v47.string(),
|
|
1724
1765
|
/**
|
|
1725
1766
|
* The version of the Clarity contract.
|
|
1726
1767
|
*/
|
|
1727
|
-
clarityVersion:
|
|
1768
|
+
clarityVersion: v47.optional(v47.number()),
|
|
1728
1769
|
/**
|
|
1729
1770
|
* The post conditions to apply to the contract call.
|
|
1730
1771
|
*/
|
|
1731
|
-
postConditions:
|
|
1772
|
+
postConditions: v47.optional(v47.array(v47.string())),
|
|
1732
1773
|
/**
|
|
1733
1774
|
* The mode to apply to the post conditions.
|
|
1734
1775
|
*/
|
|
1735
|
-
postConditionMode:
|
|
1776
|
+
postConditionMode: v47.optional(v47.union([v47.literal("allow"), v47.literal("deny")]))
|
|
1736
1777
|
});
|
|
1737
|
-
var stxDeployContractResultSchema =
|
|
1778
|
+
var stxDeployContractResultSchema = v47.object({
|
|
1738
1779
|
/**
|
|
1739
1780
|
* The ID of the transaction.
|
|
1740
1781
|
*/
|
|
1741
|
-
txid:
|
|
1782
|
+
txid: v47.string(),
|
|
1742
1783
|
/**
|
|
1743
1784
|
* A Stacks transaction as a hex-encoded string.
|
|
1744
1785
|
*/
|
|
1745
|
-
transaction:
|
|
1786
|
+
transaction: v47.string()
|
|
1746
1787
|
});
|
|
1747
|
-
var stxDeployContractRequestMessageSchema =
|
|
1788
|
+
var stxDeployContractRequestMessageSchema = v47.object({
|
|
1748
1789
|
...rpcRequestMessageSchema.entries,
|
|
1749
|
-
...
|
|
1750
|
-
method:
|
|
1790
|
+
...v47.object({
|
|
1791
|
+
method: v47.literal(stxDeployContractMethodName),
|
|
1751
1792
|
params: stxDeployContractParamsSchema,
|
|
1752
|
-
id:
|
|
1793
|
+
id: v47.string()
|
|
1753
1794
|
}).entries
|
|
1754
1795
|
});
|
|
1755
1796
|
|
|
1756
1797
|
// src/request/types/stxMethods/getAccounts.ts
|
|
1757
|
-
var
|
|
1798
|
+
var v48 = __toESM(require("valibot"));
|
|
1758
1799
|
var stxGetAccountsMethodName = "stx_getAccounts";
|
|
1759
|
-
var stxGetAccountsParamsSchema =
|
|
1760
|
-
var stxGetAccountsResultSchema =
|
|
1800
|
+
var stxGetAccountsParamsSchema = v48.nullish(v48.null());
|
|
1801
|
+
var stxGetAccountsResultSchema = v48.object({
|
|
1761
1802
|
/**
|
|
1762
1803
|
* The addresses generated for the given purposes.
|
|
1763
1804
|
*/
|
|
1764
|
-
addresses:
|
|
1765
|
-
|
|
1766
|
-
address:
|
|
1767
|
-
publicKey:
|
|
1768
|
-
gaiaHubUrl:
|
|
1769
|
-
gaiaAppKey:
|
|
1805
|
+
addresses: v48.array(
|
|
1806
|
+
v48.object({
|
|
1807
|
+
address: v48.string(),
|
|
1808
|
+
publicKey: v48.string(),
|
|
1809
|
+
gaiaHubUrl: v48.string(),
|
|
1810
|
+
gaiaAppKey: v48.string()
|
|
1770
1811
|
})
|
|
1771
1812
|
),
|
|
1772
1813
|
network: getNetworkResultSchema
|
|
1773
1814
|
});
|
|
1774
|
-
var stxGetAccountsRequestMessageSchema =
|
|
1815
|
+
var stxGetAccountsRequestMessageSchema = v48.object({
|
|
1775
1816
|
...rpcRequestMessageSchema.entries,
|
|
1776
|
-
...
|
|
1777
|
-
method:
|
|
1817
|
+
...v48.object({
|
|
1818
|
+
method: v48.literal(stxGetAccountsMethodName),
|
|
1778
1819
|
params: stxGetAccountsParamsSchema,
|
|
1779
|
-
id:
|
|
1820
|
+
id: v48.string()
|
|
1780
1821
|
}).entries
|
|
1781
1822
|
});
|
|
1782
1823
|
|
|
1783
1824
|
// src/request/types/stxMethods/getAddresses.ts
|
|
1784
|
-
var
|
|
1825
|
+
var v49 = __toESM(require("valibot"));
|
|
1785
1826
|
var stxGetAddressesMethodName = "stx_getAddresses";
|
|
1786
|
-
var stxGetAddressesParamsSchema =
|
|
1787
|
-
|
|
1827
|
+
var stxGetAddressesParamsSchema = v49.nullish(
|
|
1828
|
+
v49.object({
|
|
1788
1829
|
/**
|
|
1789
1830
|
* A message to be displayed to the user in the request prompt.
|
|
1790
1831
|
*/
|
|
1791
|
-
message:
|
|
1832
|
+
message: v49.optional(v49.string())
|
|
1792
1833
|
})
|
|
1793
1834
|
);
|
|
1794
|
-
var stxGetAddressesResultSchema =
|
|
1835
|
+
var stxGetAddressesResultSchema = v49.object({
|
|
1795
1836
|
/**
|
|
1796
1837
|
* The addresses generated for the given purposes.
|
|
1797
1838
|
*/
|
|
1798
|
-
addresses:
|
|
1839
|
+
addresses: v49.array(addressSchema),
|
|
1799
1840
|
network: getNetworkResultSchema
|
|
1800
1841
|
});
|
|
1801
|
-
var stxGetAddressesRequestMessageSchema =
|
|
1842
|
+
var stxGetAddressesRequestMessageSchema = v49.object({
|
|
1802
1843
|
...rpcRequestMessageSchema.entries,
|
|
1803
|
-
...
|
|
1804
|
-
method:
|
|
1844
|
+
...v49.object({
|
|
1845
|
+
method: v49.literal(stxGetAddressesMethodName),
|
|
1805
1846
|
params: stxGetAddressesParamsSchema,
|
|
1806
|
-
id:
|
|
1847
|
+
id: v49.string()
|
|
1807
1848
|
}).entries
|
|
1808
1849
|
});
|
|
1809
1850
|
|
|
1810
1851
|
// src/request/types/stxMethods/signMessage.ts
|
|
1811
|
-
var
|
|
1852
|
+
var v50 = __toESM(require("valibot"));
|
|
1812
1853
|
var stxSignMessageMethodName = "stx_signMessage";
|
|
1813
|
-
var stxSignMessageParamsSchema =
|
|
1854
|
+
var stxSignMessageParamsSchema = v50.object({
|
|
1814
1855
|
/**
|
|
1815
1856
|
* The message to sign.
|
|
1816
1857
|
*/
|
|
1817
|
-
message:
|
|
1858
|
+
message: v50.string()
|
|
1818
1859
|
});
|
|
1819
|
-
var stxSignMessageResultSchema =
|
|
1860
|
+
var stxSignMessageResultSchema = v50.object({
|
|
1820
1861
|
/**
|
|
1821
1862
|
* The signature of the message.
|
|
1822
1863
|
*/
|
|
1823
|
-
signature:
|
|
1864
|
+
signature: v50.string(),
|
|
1824
1865
|
/**
|
|
1825
1866
|
* The public key used to sign the message.
|
|
1826
1867
|
*/
|
|
1827
|
-
publicKey:
|
|
1868
|
+
publicKey: v50.string()
|
|
1828
1869
|
});
|
|
1829
|
-
var stxSignMessageRequestMessageSchema =
|
|
1870
|
+
var stxSignMessageRequestMessageSchema = v50.object({
|
|
1830
1871
|
...rpcRequestMessageSchema.entries,
|
|
1831
|
-
...
|
|
1832
|
-
method:
|
|
1872
|
+
...v50.object({
|
|
1873
|
+
method: v50.literal(stxSignMessageMethodName),
|
|
1833
1874
|
params: stxSignMessageParamsSchema,
|
|
1834
|
-
id:
|
|
1875
|
+
id: v50.string()
|
|
1835
1876
|
}).entries
|
|
1836
1877
|
});
|
|
1837
1878
|
|
|
1838
1879
|
// src/request/types/stxMethods/signStructuredMessage.ts
|
|
1839
|
-
var
|
|
1880
|
+
var v51 = __toESM(require("valibot"));
|
|
1840
1881
|
var stxSignStructuredMessageMethodName = "stx_signStructuredMessage";
|
|
1841
|
-
var stxSignStructuredMessageParamsSchema =
|
|
1882
|
+
var stxSignStructuredMessageParamsSchema = v51.object({
|
|
1842
1883
|
/**
|
|
1843
1884
|
* The domain to be signed.
|
|
1844
1885
|
*/
|
|
1845
|
-
domain:
|
|
1886
|
+
domain: v51.string(),
|
|
1846
1887
|
/**
|
|
1847
1888
|
* Message payload to be signed.
|
|
1848
1889
|
*/
|
|
1849
|
-
message:
|
|
1890
|
+
message: v51.string(),
|
|
1850
1891
|
/**
|
|
1851
1892
|
* The public key to sign the message with.
|
|
1852
1893
|
*/
|
|
1853
|
-
publicKey:
|
|
1894
|
+
publicKey: v51.optional(v51.string())
|
|
1854
1895
|
});
|
|
1855
|
-
var stxSignStructuredMessageResultSchema =
|
|
1896
|
+
var stxSignStructuredMessageResultSchema = v51.object({
|
|
1856
1897
|
/**
|
|
1857
1898
|
* Signature of the message.
|
|
1858
1899
|
*/
|
|
1859
|
-
signature:
|
|
1900
|
+
signature: v51.string(),
|
|
1860
1901
|
/**
|
|
1861
1902
|
* Public key as hex-encoded string.
|
|
1862
1903
|
*/
|
|
1863
|
-
publicKey:
|
|
1904
|
+
publicKey: v51.string()
|
|
1864
1905
|
});
|
|
1865
|
-
var stxSignStructuredMessageRequestMessageSchema =
|
|
1906
|
+
var stxSignStructuredMessageRequestMessageSchema = v51.object({
|
|
1866
1907
|
...rpcRequestMessageSchema.entries,
|
|
1867
|
-
...
|
|
1868
|
-
method:
|
|
1908
|
+
...v51.object({
|
|
1909
|
+
method: v51.literal(stxSignStructuredMessageMethodName),
|
|
1869
1910
|
params: stxSignStructuredMessageParamsSchema,
|
|
1870
|
-
id:
|
|
1911
|
+
id: v51.string()
|
|
1871
1912
|
}).entries
|
|
1872
1913
|
});
|
|
1873
1914
|
|
|
1874
1915
|
// src/request/types/stxMethods/signTransaction.ts
|
|
1875
|
-
var
|
|
1916
|
+
var v52 = __toESM(require("valibot"));
|
|
1876
1917
|
var stxSignTransactionMethodName = "stx_signTransaction";
|
|
1877
|
-
var stxSignTransactionParamsSchema =
|
|
1918
|
+
var stxSignTransactionParamsSchema = v52.object({
|
|
1878
1919
|
/**
|
|
1879
1920
|
* The transaction to sign as a hex-encoded string.
|
|
1880
1921
|
*/
|
|
1881
|
-
transaction:
|
|
1922
|
+
transaction: v52.string(),
|
|
1882
1923
|
/**
|
|
1883
1924
|
* The public key to sign the transaction with. The wallet may use any key
|
|
1884
1925
|
* when not provided.
|
|
1885
1926
|
*/
|
|
1886
|
-
pubkey:
|
|
1927
|
+
pubkey: v52.optional(v52.string()),
|
|
1887
1928
|
/**
|
|
1888
1929
|
* Whether to broadcast the transaction after signing. Defaults to `true`.
|
|
1889
1930
|
*/
|
|
1890
|
-
broadcast:
|
|
1931
|
+
broadcast: v52.optional(v52.boolean())
|
|
1891
1932
|
});
|
|
1892
|
-
var stxSignTransactionResultSchema =
|
|
1933
|
+
var stxSignTransactionResultSchema = v52.object({
|
|
1893
1934
|
/**
|
|
1894
1935
|
* The signed transaction as a hex-encoded string.
|
|
1895
1936
|
*/
|
|
1896
|
-
transaction:
|
|
1937
|
+
transaction: v52.string()
|
|
1897
1938
|
});
|
|
1898
|
-
var stxSignTransactionRequestMessageSchema =
|
|
1939
|
+
var stxSignTransactionRequestMessageSchema = v52.object({
|
|
1899
1940
|
...rpcRequestMessageSchema.entries,
|
|
1900
|
-
...
|
|
1901
|
-
method:
|
|
1941
|
+
...v52.object({
|
|
1942
|
+
method: v52.literal(stxSignTransactionMethodName),
|
|
1902
1943
|
params: stxSignTransactionParamsSchema,
|
|
1903
|
-
id:
|
|
1944
|
+
id: v52.string()
|
|
1904
1945
|
}).entries
|
|
1905
1946
|
});
|
|
1906
1947
|
|
|
1907
1948
|
// src/request/types/stxMethods/signTransactions.ts
|
|
1908
|
-
var
|
|
1949
|
+
var v53 = __toESM(require("valibot"));
|
|
1909
1950
|
var stxSignTransactionsMethodName = "stx_signTransactions";
|
|
1910
|
-
var stxSignTransactionsParamsSchema =
|
|
1951
|
+
var stxSignTransactionsParamsSchema = v53.object({
|
|
1911
1952
|
/**
|
|
1912
1953
|
* The transactions to sign as hex-encoded strings.
|
|
1913
1954
|
*/
|
|
1914
|
-
transactions:
|
|
1915
|
-
|
|
1916
|
-
|
|
1917
|
-
|
|
1918
|
-
|
|
1955
|
+
transactions: v53.pipe(
|
|
1956
|
+
v53.array(
|
|
1957
|
+
v53.pipe(
|
|
1958
|
+
v53.string(),
|
|
1959
|
+
v53.check((hex) => {
|
|
1919
1960
|
return true;
|
|
1920
1961
|
}, "Invalid hex-encoded Stacks transaction.")
|
|
1921
1962
|
)
|
|
1922
1963
|
),
|
|
1923
|
-
|
|
1964
|
+
v53.minLength(1)
|
|
1924
1965
|
),
|
|
1925
1966
|
/**
|
|
1926
1967
|
* Whether the signed transactions should be broadcast after signing. Defaults
|
|
1927
1968
|
* to `true`.
|
|
1928
1969
|
*/
|
|
1929
|
-
broadcast:
|
|
1970
|
+
broadcast: v53.optional(v53.boolean())
|
|
1930
1971
|
});
|
|
1931
|
-
var stxSignTransactionsResultSchema =
|
|
1972
|
+
var stxSignTransactionsResultSchema = v53.object({
|
|
1932
1973
|
/**
|
|
1933
1974
|
* The signed transactions as hex-encoded strings, in the same order as in the
|
|
1934
1975
|
* sign request.
|
|
1935
1976
|
*/
|
|
1936
|
-
transactions:
|
|
1977
|
+
transactions: v53.array(v53.string())
|
|
1937
1978
|
});
|
|
1938
|
-
var stxSignTransactionsRequestMessageSchema =
|
|
1979
|
+
var stxSignTransactionsRequestMessageSchema = v53.object({
|
|
1939
1980
|
...rpcRequestMessageSchema.entries,
|
|
1940
|
-
...
|
|
1941
|
-
method:
|
|
1981
|
+
...v53.object({
|
|
1982
|
+
method: v53.literal(stxSignTransactionsMethodName),
|
|
1942
1983
|
params: stxSignTransactionsParamsSchema,
|
|
1943
|
-
id:
|
|
1984
|
+
id: v53.string()
|
|
1944
1985
|
}).entries
|
|
1945
1986
|
});
|
|
1946
1987
|
|
|
1947
1988
|
// src/request/types/stxMethods/transferStx.ts
|
|
1948
|
-
var
|
|
1989
|
+
var v54 = __toESM(require("valibot"));
|
|
1949
1990
|
var stxTransferStxMethodName = "stx_transferStx";
|
|
1950
|
-
var stxTransferStxParamsSchema =
|
|
1991
|
+
var stxTransferStxParamsSchema = v54.object({
|
|
1951
1992
|
/**
|
|
1952
1993
|
* Amount of STX tokens to transfer in microstacks as a string. Anything
|
|
1953
1994
|
* parseable by `BigInt` is acceptable.
|
|
@@ -1960,23 +2001,23 @@ var stxTransferStxParamsSchema = v52.object({
|
|
|
1960
2001
|
* const amount3 = '1234';
|
|
1961
2002
|
* ```
|
|
1962
2003
|
*/
|
|
1963
|
-
amount:
|
|
2004
|
+
amount: v54.union([v54.number(), v54.string()]),
|
|
1964
2005
|
/**
|
|
1965
2006
|
* The recipient's principal.
|
|
1966
2007
|
*/
|
|
1967
|
-
recipient:
|
|
2008
|
+
recipient: v54.string(),
|
|
1968
2009
|
/**
|
|
1969
2010
|
* A string representing the memo.
|
|
1970
2011
|
*/
|
|
1971
|
-
memo:
|
|
2012
|
+
memo: v54.optional(v54.string()),
|
|
1972
2013
|
/**
|
|
1973
2014
|
* Version of parameter format.
|
|
1974
2015
|
*/
|
|
1975
|
-
version:
|
|
2016
|
+
version: v54.optional(v54.string()),
|
|
1976
2017
|
/**
|
|
1977
2018
|
* The mode of the post conditions.
|
|
1978
2019
|
*/
|
|
1979
|
-
postConditionMode:
|
|
2020
|
+
postConditionMode: v54.optional(v54.number()),
|
|
1980
2021
|
/**
|
|
1981
2022
|
* A hex-encoded string representing the post conditions.
|
|
1982
2023
|
*
|
|
@@ -1989,29 +2030,29 @@ var stxTransferStxParamsSchema = v52.object({
|
|
|
1989
2030
|
* const hexPostCondition = serializePostCondition(postCondition).toString('hex');
|
|
1990
2031
|
* ```
|
|
1991
2032
|
*/
|
|
1992
|
-
postConditions:
|
|
2033
|
+
postConditions: v54.optional(v54.array(v54.string())),
|
|
1993
2034
|
/**
|
|
1994
2035
|
* The public key to sign the transaction with. The wallet may use any key
|
|
1995
2036
|
* when not provided.
|
|
1996
2037
|
*/
|
|
1997
|
-
pubkey:
|
|
2038
|
+
pubkey: v54.optional(v54.string())
|
|
1998
2039
|
});
|
|
1999
|
-
var stxTransferStxResultSchema =
|
|
2040
|
+
var stxTransferStxResultSchema = v54.object({
|
|
2000
2041
|
/**
|
|
2001
2042
|
* The ID of the transaction.
|
|
2002
2043
|
*/
|
|
2003
|
-
txid:
|
|
2044
|
+
txid: v54.string(),
|
|
2004
2045
|
/**
|
|
2005
2046
|
* A Stacks transaction as a hex-encoded string.
|
|
2006
2047
|
*/
|
|
2007
|
-
transaction:
|
|
2048
|
+
transaction: v54.string()
|
|
2008
2049
|
});
|
|
2009
|
-
var stxTransferStxRequestMessageSchema =
|
|
2050
|
+
var stxTransferStxRequestMessageSchema = v54.object({
|
|
2010
2051
|
...rpcRequestMessageSchema.entries,
|
|
2011
|
-
...
|
|
2012
|
-
method:
|
|
2052
|
+
...v54.object({
|
|
2053
|
+
method: v54.literal(stxTransferStxMethodName),
|
|
2013
2054
|
params: stxTransferStxParamsSchema,
|
|
2014
|
-
id:
|
|
2055
|
+
id: v54.string()
|
|
2015
2056
|
}).entries
|
|
2016
2057
|
});
|
|
2017
2058
|
|
|
@@ -2019,13 +2060,13 @@ var stxTransferStxRequestMessageSchema = v52.object({
|
|
|
2019
2060
|
var cache = {};
|
|
2020
2061
|
var requestInternal = async (provider, method, params) => {
|
|
2021
2062
|
const response = await provider.request(method, params);
|
|
2022
|
-
if (
|
|
2063
|
+
if (v55.is(rpcErrorResponseMessageSchema, response)) {
|
|
2023
2064
|
return {
|
|
2024
2065
|
status: "error",
|
|
2025
2066
|
error: response.error
|
|
2026
2067
|
};
|
|
2027
2068
|
}
|
|
2028
|
-
if (
|
|
2069
|
+
if (v55.is(rpcSuccessResponseMessageSchema, response)) {
|
|
2029
2070
|
return {
|
|
2030
2071
|
status: "success",
|
|
2031
2072
|
result: response.result
|
|
@@ -3162,6 +3203,14 @@ var signMultipleTransactions = async (options) => {
|
|
|
3162
3203
|
isProviderInstalled,
|
|
3163
3204
|
networkChangeEventName,
|
|
3164
3205
|
networkChangeSchema,
|
|
3206
|
+
openBridgeMethodName,
|
|
3207
|
+
openBridgeParamsSchema,
|
|
3208
|
+
openBridgeRequestMessageSchema,
|
|
3209
|
+
openBridgeResultSchema,
|
|
3210
|
+
openBuyMethodName,
|
|
3211
|
+
openBuyParamsSchema,
|
|
3212
|
+
openBuyRequestMessageSchema,
|
|
3213
|
+
openBuyResultSchema,
|
|
3165
3214
|
openReceiveMethodName,
|
|
3166
3215
|
openReceiveParamsSchema,
|
|
3167
3216
|
openReceiveRequestMessageSchema,
|