@sats-connect/core 0.8.1-db15ee7 → 0.8.1-f2a77fa

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.mjs CHANGED
@@ -192,7 +192,7 @@ function getSupportedWallets() {
192
192
  }
193
193
 
194
194
  // src/request/index.ts
195
- import * as v26 from "valibot";
195
+ import * as v29 from "valibot";
196
196
 
197
197
  // src/request/types/btcMethods.ts
198
198
  import * as v6 from "valibot";
@@ -805,10 +805,10 @@ var runesTransferRequestMessageSchema = v11.object({
805
805
  }).entries
806
806
  });
807
807
 
808
- // src/request/types/sparkMethods/getAddresses.ts
808
+ // src/request/types/sparkMethods/flashnetMethods/getJwt.ts
809
809
  import * as v12 from "valibot";
810
- var sparkGetAddressesMethodName = "spark_getAddresses";
811
- var sparkGetAddressesParamsSchema = v12.nullish(
810
+ var sparkFlashnetGetJwtMethodName = "spark_flashnet_getJwt";
811
+ var sparkFlashnetGetJwtParamsSchema = v12.nullish(
812
812
  v12.object({
813
813
  /**
814
814
  * A message to be displayed to the user in the request prompt.
@@ -816,156 +816,224 @@ var sparkGetAddressesParamsSchema = v12.nullish(
816
816
  message: v12.optional(v12.string())
817
817
  })
818
818
  );
819
- var sparkGetAddressesResultSchema = v12.object({
819
+ var sparkFlashnetGetJwtResultSchema = v12.object({
820
820
  /**
821
- * The addresses generated for the given purposes.
821
+ * The JWT token for authenticated requests to the Flashnet API.
822
822
  */
823
- addresses: v12.array(addressSchema),
824
- network: getNetworkResultSchema
823
+ jwt: v12.string()
825
824
  });
826
- var sparkGetAddressesRequestMessageSchema = v12.object({
825
+ var sparkFlashnetGetJwtRequestMessageSchema = v12.object({
827
826
  ...rpcRequestMessageSchema.entries,
828
827
  ...v12.object({
829
- method: v12.literal(sparkGetAddressesMethodName),
830
- params: sparkGetAddressesParamsSchema,
828
+ method: v12.literal(sparkFlashnetGetJwtMethodName),
829
+ params: sparkFlashnetGetJwtParamsSchema,
831
830
  id: v12.string()
832
831
  }).entries
833
832
  });
834
833
 
835
- // src/request/types/sparkMethods/getBalance.ts
834
+ // src/request/types/sparkMethods/flashnetMethods/intents/routeSwap.ts
836
835
  import * as v13 from "valibot";
837
- var sparkGetBalanceMethodName = "spark_getBalance";
838
- var sparkGetBalanceParamsSchema = v13.nullish(v13.null());
839
- var sparkGetBalanceResultSchema = v13.object({
836
+ var sparkFlashnetRouteSwapIntentSchema = v13.object({
837
+ type: v13.literal("executeRouteSwap"),
838
+ data: v13.object({
839
+ userPublicKey: v13.string(),
840
+ initialSparkTransferId: v13.string(),
841
+ hops: v13.array(
842
+ v13.object({
843
+ poolId: v13.string(),
844
+ assetInAddress: v13.string(),
845
+ assetOutAddress: v13.string(),
846
+ hopIntegratorFeeRateBps: v13.optional(v13.number())
847
+ })
848
+ ),
849
+ inputAmount: v13.string(),
850
+ maxRouteSlippageBps: v13.number(),
851
+ minAmountOut: v13.string(),
852
+ defaultIntegratorFeeRateBps: v13.optional(v13.number()),
853
+ nonce: v13.string()
854
+ })
855
+ });
856
+
857
+ // src/request/types/sparkMethods/flashnetMethods/intents/swap.ts
858
+ import * as v14 from "valibot";
859
+ var sparkFlashnetSwapIntentSchema = v14.object({
860
+ type: v14.literal("executeSwap"),
861
+ data: v14.object({
862
+ userPublicKey: v14.string(),
863
+ poolId: v14.string(),
864
+ transferId: v14.string(),
865
+ assetInAddress: v14.string(),
866
+ assetOutAddress: v14.string(),
867
+ amountIn: v14.string(),
868
+ maxSlippageBps: v14.number(),
869
+ minAmountOut: v14.string(),
870
+ totalIntegratorFeeRateBps: v14.optional(v14.number()),
871
+ nonce: v14.string()
872
+ })
873
+ });
874
+
875
+ // src/request/types/sparkMethods/flashnetMethods/signIntent.ts
876
+ import * as v15 from "valibot";
877
+ var sparkFlashnetSignIntentMethodName = "spark_flashnet_signIntent";
878
+ var sparkFlashnetSignIntentParamsSchema = v15.union([
879
+ sparkFlashnetSwapIntentSchema,
880
+ sparkFlashnetRouteSwapIntentSchema
881
+ ]);
882
+ var sparkFlashnetSignIntentResultSchema = v15.object({
840
883
  /**
841
- * The Spark Bitcoin address balance in sats in string form.
884
+ * The signed intent as a hex string.
842
885
  */
843
- balance: v13.string(),
844
- tokenBalances: v13.array(
845
- v13.object({
846
- /* The address balance of the token in string form as it can overflow a js number */
847
- balance: v13.string(),
848
- tokenMetadata: v13.object({
849
- tokenIdentifier: v13.string(),
850
- tokenName: v13.string(),
851
- tokenTicker: v13.string(),
852
- decimals: v13.number(),
853
- maxSupply: v13.string()
854
- })
855
- })
856
- )
886
+ signature: v15.string()
857
887
  });
858
- var sparkGetBalanceRequestMessageSchema = v13.object({
888
+ var sparkFlashnetSignIntentRequestMessageSchema = v15.object({
859
889
  ...rpcRequestMessageSchema.entries,
860
- ...v13.object({
861
- method: v13.literal(sparkGetBalanceMethodName),
862
- params: sparkGetBalanceParamsSchema,
863
- id: v13.string()
890
+ ...v15.object({
891
+ method: v15.literal(sparkFlashnetSignIntentMethodName),
892
+ params: sparkFlashnetSignIntentParamsSchema,
893
+ id: v15.string()
864
894
  }).entries
865
895
  });
866
896
 
867
- // src/request/types/sparkMethods/signMessage.ts
868
- import * as v14 from "valibot";
869
- var sparkSignMessageMethodName = "spark_signMessage";
870
- var sparkSignMessageParamsSchema = v14.object({
871
- message: v14.string()
897
+ // src/request/types/sparkMethods/getAddresses.ts
898
+ import * as v16 from "valibot";
899
+ var sparkGetAddressesMethodName = "spark_getAddresses";
900
+ var sparkGetAddressesParamsSchema = v16.nullish(
901
+ v16.object({
902
+ /**
903
+ * A message to be displayed to the user in the request prompt.
904
+ */
905
+ message: v16.optional(v16.string())
906
+ })
907
+ );
908
+ var sparkGetAddressesResultSchema = v16.object({
909
+ /**
910
+ * The addresses generated for the given purposes.
911
+ */
912
+ addresses: v16.array(addressSchema),
913
+ network: getNetworkResultSchema
872
914
  });
873
- var sparkSignMessageResultSchema = v14.object({
915
+ var sparkGetAddressesRequestMessageSchema = v16.object({
916
+ ...rpcRequestMessageSchema.entries,
917
+ ...v16.object({
918
+ method: v16.literal(sparkGetAddressesMethodName),
919
+ params: sparkGetAddressesParamsSchema,
920
+ id: v16.string()
921
+ }).entries
922
+ });
923
+
924
+ // src/request/types/sparkMethods/getBalance.ts
925
+ import * as v17 from "valibot";
926
+ var sparkGetBalanceMethodName = "spark_getBalance";
927
+ var sparkGetBalanceParamsSchema = v17.nullish(v17.null());
928
+ var sparkGetBalanceResultSchema = v17.object({
874
929
  /**
875
- * The signature for the message in hex format
930
+ * The Spark Bitcoin address balance in sats in string form.
876
931
  */
877
- signature: v14.string()
932
+ balance: v17.string(),
933
+ tokenBalances: v17.array(
934
+ v17.object({
935
+ /* The address balance of the token in string form as it can overflow a js number */
936
+ balance: v17.string(),
937
+ tokenMetadata: v17.object({
938
+ tokenIdentifier: v17.string(),
939
+ tokenName: v17.string(),
940
+ tokenTicker: v17.string(),
941
+ decimals: v17.number(),
942
+ maxSupply: v17.string()
943
+ })
944
+ })
945
+ )
878
946
  });
879
- var sparkSignMessageRequestMessageSchema = v14.object({
947
+ var sparkGetBalanceRequestMessageSchema = v17.object({
880
948
  ...rpcRequestMessageSchema.entries,
881
- ...v14.object({
882
- method: v14.literal(sparkSignMessageMethodName),
883
- params: sparkSignMessageParamsSchema,
884
- id: v14.string()
949
+ ...v17.object({
950
+ method: v17.literal(sparkGetBalanceMethodName),
951
+ params: sparkGetBalanceParamsSchema,
952
+ id: v17.string()
885
953
  }).entries
886
954
  });
887
955
 
888
956
  // src/request/types/sparkMethods/transfer.ts
889
- import * as v15 from "valibot";
957
+ import * as v18 from "valibot";
890
958
  var sparkTransferMethodName = "spark_transfer";
891
- var sparkTransferParamsSchema = v15.object({
959
+ var sparkTransferParamsSchema = v18.object({
892
960
  /**
893
961
  * Amount of SATS to transfer as a string or number.
894
962
  */
895
- amountSats: v15.union([v15.number(), v15.string()]),
963
+ amountSats: v18.union([v18.number(), v18.string()]),
896
964
  /**
897
965
  * The recipient's spark address.
898
966
  */
899
- receiverSparkAddress: v15.string()
967
+ receiverSparkAddress: v18.string()
900
968
  });
901
- var sparkTransferResultSchema = v15.object({
969
+ var sparkTransferResultSchema = v18.object({
902
970
  /**
903
971
  * The ID of the transaction.
904
972
  */
905
- id: v15.string()
973
+ id: v18.string()
906
974
  });
907
- var sparkTransferRequestMessageSchema = v15.object({
975
+ var sparkTransferRequestMessageSchema = v18.object({
908
976
  ...rpcRequestMessageSchema.entries,
909
- ...v15.object({
910
- method: v15.literal(sparkTransferMethodName),
977
+ ...v18.object({
978
+ method: v18.literal(sparkTransferMethodName),
911
979
  params: sparkTransferParamsSchema,
912
- id: v15.string()
980
+ id: v18.string()
913
981
  }).entries
914
982
  });
915
983
 
916
984
  // src/request/types/sparkMethods/transferToken.ts
917
- import * as v16 from "valibot";
985
+ import * as v19 from "valibot";
918
986
  var sparkTransferTokenMethodName = "spark_transferToken";
919
- var sparkTransferTokenParamsSchema = v16.object({
987
+ var sparkTransferTokenParamsSchema = v19.object({
920
988
  /**
921
989
  * Amount of units of the token to transfer as a string or number.
922
990
  */
923
- tokenAmount: v16.union([v16.number(), v16.string()]),
991
+ tokenAmount: v19.union([v19.number(), v19.string()]),
924
992
  /**
925
993
  * The Bech32m token identifier.
926
994
  */
927
- tokenIdentifier: v16.string(),
995
+ tokenIdentifier: v19.string(),
928
996
  /**
929
997
  * The recipient's spark address.
930
998
  */
931
- receiverSparkAddress: v16.string()
999
+ receiverSparkAddress: v19.string()
932
1000
  });
933
- var sparkTransferTokenResultSchema = v16.object({
1001
+ var sparkTransferTokenResultSchema = v19.object({
934
1002
  /**
935
1003
  * The ID of the transaction.
936
1004
  */
937
- id: v16.string()
1005
+ id: v19.string()
938
1006
  });
939
- var sparkTransferTokenRequestMessageSchema = v16.object({
1007
+ var sparkTransferTokenRequestMessageSchema = v19.object({
940
1008
  ...rpcRequestMessageSchema.entries,
941
- ...v16.object({
942
- method: v16.literal(sparkTransferTokenMethodName),
1009
+ ...v19.object({
1010
+ method: v19.literal(sparkTransferTokenMethodName),
943
1011
  params: sparkTransferTokenParamsSchema,
944
- id: v16.string()
1012
+ id: v19.string()
945
1013
  }).entries
946
1014
  });
947
1015
 
948
1016
  // src/request/types/stxMethods/callContract.ts
949
- import * as v17 from "valibot";
1017
+ import * as v20 from "valibot";
950
1018
  var stxCallContractMethodName = "stx_callContract";
951
- var stxCallContractParamsSchema = v17.object({
1019
+ var stxCallContractParamsSchema = v20.object({
952
1020
  /**
953
1021
  * The contract principal.
954
1022
  *
955
1023
  * E.g. `"SPKE...GD5C.my-contract"`
956
1024
  */
957
- contract: v17.string(),
1025
+ contract: v20.string(),
958
1026
  /**
959
1027
  * The name of the function to call.
960
1028
  *
961
1029
  * Note: spec changes ongoing,
962
1030
  * https://github.com/stacksgov/sips/pull/166#pullrequestreview-1914236999
963
1031
  */
964
- functionName: v17.string(),
1032
+ functionName: v20.string(),
965
1033
  /**
966
1034
  * @deprecated in favor of `functionArgs` for @stacks/connect compatibility
967
1035
  */
968
- arguments: v17.optional(v17.array(v17.string())),
1036
+ arguments: v20.optional(v20.array(v20.string())),
969
1037
  /**
970
1038
  * The function's arguments. The arguments are expected to be hex-encoded
971
1039
  * strings of Clarity values.
@@ -980,274 +1048,274 @@ var stxCallContractParamsSchema = v17.object({
980
1048
  * const hexArgs = functionArgs.map(cvToHex);
981
1049
  * ```
982
1050
  */
983
- functionArgs: v17.optional(v17.array(v17.string())),
1051
+ functionArgs: v20.optional(v20.array(v20.string())),
984
1052
  /**
985
1053
  * The post conditions to apply to the contract call.
986
1054
  */
987
- postConditions: v17.optional(v17.array(v17.string())),
1055
+ postConditions: v20.optional(v20.array(v20.string())),
988
1056
  /**
989
1057
  * The mode to apply to the post conditions.
990
1058
  */
991
- postConditionMode: v17.optional(v17.union([v17.literal("allow"), v17.literal("deny")]))
1059
+ postConditionMode: v20.optional(v20.union([v20.literal("allow"), v20.literal("deny")]))
992
1060
  });
993
- var stxCallContractResultSchema = v17.object({
1061
+ var stxCallContractResultSchema = v20.object({
994
1062
  /**
995
1063
  * The ID of the transaction.
996
1064
  */
997
- txid: v17.string(),
1065
+ txid: v20.string(),
998
1066
  /**
999
1067
  * A Stacks transaction as a hex-encoded string.
1000
1068
  */
1001
- transaction: v17.string()
1069
+ transaction: v20.string()
1002
1070
  });
1003
- var stxCallContractRequestMessageSchema = v17.object({
1071
+ var stxCallContractRequestMessageSchema = v20.object({
1004
1072
  ...rpcRequestMessageSchema.entries,
1005
- ...v17.object({
1006
- method: v17.literal(stxCallContractMethodName),
1073
+ ...v20.object({
1074
+ method: v20.literal(stxCallContractMethodName),
1007
1075
  params: stxCallContractParamsSchema,
1008
- id: v17.string()
1076
+ id: v20.string()
1009
1077
  }).entries
1010
1078
  });
1011
1079
 
1012
1080
  // src/request/types/stxMethods/deployContract.ts
1013
- import * as v18 from "valibot";
1081
+ import * as v21 from "valibot";
1014
1082
  var stxDeployContractMethodName = "stx_deployContract";
1015
- var stxDeployContractParamsSchema = v18.object({
1083
+ var stxDeployContractParamsSchema = v21.object({
1016
1084
  /**
1017
1085
  * Name of the contract.
1018
1086
  */
1019
- name: v18.string(),
1087
+ name: v21.string(),
1020
1088
  /**
1021
1089
  * The source code of the Clarity contract.
1022
1090
  */
1023
- clarityCode: v18.string(),
1091
+ clarityCode: v21.string(),
1024
1092
  /**
1025
1093
  * The version of the Clarity contract.
1026
1094
  */
1027
- clarityVersion: v18.optional(v18.number()),
1095
+ clarityVersion: v21.optional(v21.number()),
1028
1096
  /**
1029
1097
  * The post conditions to apply to the contract call.
1030
1098
  */
1031
- postConditions: v18.optional(v18.array(v18.string())),
1099
+ postConditions: v21.optional(v21.array(v21.string())),
1032
1100
  /**
1033
1101
  * The mode to apply to the post conditions.
1034
1102
  */
1035
- postConditionMode: v18.optional(v18.union([v18.literal("allow"), v18.literal("deny")]))
1103
+ postConditionMode: v21.optional(v21.union([v21.literal("allow"), v21.literal("deny")]))
1036
1104
  });
1037
- var stxDeployContractResultSchema = v18.object({
1105
+ var stxDeployContractResultSchema = v21.object({
1038
1106
  /**
1039
1107
  * The ID of the transaction.
1040
1108
  */
1041
- txid: v18.string(),
1109
+ txid: v21.string(),
1042
1110
  /**
1043
1111
  * A Stacks transaction as a hex-encoded string.
1044
1112
  */
1045
- transaction: v18.string()
1113
+ transaction: v21.string()
1046
1114
  });
1047
- var stxDeployContractRequestMessageSchema = v18.object({
1115
+ var stxDeployContractRequestMessageSchema = v21.object({
1048
1116
  ...rpcRequestMessageSchema.entries,
1049
- ...v18.object({
1050
- method: v18.literal(stxDeployContractMethodName),
1117
+ ...v21.object({
1118
+ method: v21.literal(stxDeployContractMethodName),
1051
1119
  params: stxDeployContractParamsSchema,
1052
- id: v18.string()
1120
+ id: v21.string()
1053
1121
  }).entries
1054
1122
  });
1055
1123
 
1056
1124
  // src/request/types/stxMethods/getAccounts.ts
1057
- import * as v19 from "valibot";
1125
+ import * as v22 from "valibot";
1058
1126
  var stxGetAccountsMethodName = "stx_getAccounts";
1059
- var stxGetAccountsParamsSchema = v19.nullish(v19.null());
1060
- var stxGetAccountsResultSchema = v19.object({
1127
+ var stxGetAccountsParamsSchema = v22.nullish(v22.null());
1128
+ var stxGetAccountsResultSchema = v22.object({
1061
1129
  /**
1062
1130
  * The addresses generated for the given purposes.
1063
1131
  */
1064
- addresses: v19.array(
1065
- v19.object({
1066
- address: v19.string(),
1067
- publicKey: v19.string(),
1068
- gaiaHubUrl: v19.string(),
1069
- gaiaAppKey: v19.string()
1132
+ addresses: v22.array(
1133
+ v22.object({
1134
+ address: v22.string(),
1135
+ publicKey: v22.string(),
1136
+ gaiaHubUrl: v22.string(),
1137
+ gaiaAppKey: v22.string()
1070
1138
  })
1071
1139
  ),
1072
1140
  network: getNetworkResultSchema
1073
1141
  });
1074
- var stxGetAccountsRequestMessageSchema = v19.object({
1142
+ var stxGetAccountsRequestMessageSchema = v22.object({
1075
1143
  ...rpcRequestMessageSchema.entries,
1076
- ...v19.object({
1077
- method: v19.literal(stxGetAccountsMethodName),
1144
+ ...v22.object({
1145
+ method: v22.literal(stxGetAccountsMethodName),
1078
1146
  params: stxGetAccountsParamsSchema,
1079
- id: v19.string()
1147
+ id: v22.string()
1080
1148
  }).entries
1081
1149
  });
1082
1150
 
1083
1151
  // src/request/types/stxMethods/getAddresses.ts
1084
- import * as v20 from "valibot";
1152
+ import * as v23 from "valibot";
1085
1153
  var stxGetAddressesMethodName = "stx_getAddresses";
1086
- var stxGetAddressesParamsSchema = v20.nullish(
1087
- v20.object({
1154
+ var stxGetAddressesParamsSchema = v23.nullish(
1155
+ v23.object({
1088
1156
  /**
1089
1157
  * A message to be displayed to the user in the request prompt.
1090
1158
  */
1091
- message: v20.optional(v20.string())
1159
+ message: v23.optional(v23.string())
1092
1160
  })
1093
1161
  );
1094
- var stxGetAddressesResultSchema = v20.object({
1162
+ var stxGetAddressesResultSchema = v23.object({
1095
1163
  /**
1096
1164
  * The addresses generated for the given purposes.
1097
1165
  */
1098
- addresses: v20.array(addressSchema),
1166
+ addresses: v23.array(addressSchema),
1099
1167
  network: getNetworkResultSchema
1100
1168
  });
1101
- var stxGetAddressesRequestMessageSchema = v20.object({
1169
+ var stxGetAddressesRequestMessageSchema = v23.object({
1102
1170
  ...rpcRequestMessageSchema.entries,
1103
- ...v20.object({
1104
- method: v20.literal(stxGetAddressesMethodName),
1171
+ ...v23.object({
1172
+ method: v23.literal(stxGetAddressesMethodName),
1105
1173
  params: stxGetAddressesParamsSchema,
1106
- id: v20.string()
1174
+ id: v23.string()
1107
1175
  }).entries
1108
1176
  });
1109
1177
 
1110
1178
  // src/request/types/stxMethods/signMessage.ts
1111
- import * as v21 from "valibot";
1179
+ import * as v24 from "valibot";
1112
1180
  var stxSignMessageMethodName = "stx_signMessage";
1113
- var stxSignMessageParamsSchema = v21.object({
1181
+ var stxSignMessageParamsSchema = v24.object({
1114
1182
  /**
1115
1183
  * The message to sign.
1116
1184
  */
1117
- message: v21.string()
1185
+ message: v24.string()
1118
1186
  });
1119
- var stxSignMessageResultSchema = v21.object({
1187
+ var stxSignMessageResultSchema = v24.object({
1120
1188
  /**
1121
1189
  * The signature of the message.
1122
1190
  */
1123
- signature: v21.string(),
1191
+ signature: v24.string(),
1124
1192
  /**
1125
1193
  * The public key used to sign the message.
1126
1194
  */
1127
- publicKey: v21.string()
1195
+ publicKey: v24.string()
1128
1196
  });
1129
- var stxSignMessageRequestMessageSchema = v21.object({
1197
+ var stxSignMessageRequestMessageSchema = v24.object({
1130
1198
  ...rpcRequestMessageSchema.entries,
1131
- ...v21.object({
1132
- method: v21.literal(stxSignMessageMethodName),
1199
+ ...v24.object({
1200
+ method: v24.literal(stxSignMessageMethodName),
1133
1201
  params: stxSignMessageParamsSchema,
1134
- id: v21.string()
1202
+ id: v24.string()
1135
1203
  }).entries
1136
1204
  });
1137
1205
 
1138
1206
  // src/request/types/stxMethods/signStructuredMessage.ts
1139
- import * as v22 from "valibot";
1207
+ import * as v25 from "valibot";
1140
1208
  var stxSignStructuredMessageMethodName = "stx_signStructuredMessage";
1141
- var stxSignStructuredMessageParamsSchema = v22.object({
1209
+ var stxSignStructuredMessageParamsSchema = v25.object({
1142
1210
  /**
1143
1211
  * The domain to be signed.
1144
1212
  */
1145
- domain: v22.string(),
1213
+ domain: v25.string(),
1146
1214
  /**
1147
1215
  * Message payload to be signed.
1148
1216
  */
1149
- message: v22.string(),
1217
+ message: v25.string(),
1150
1218
  /**
1151
1219
  * The public key to sign the message with.
1152
1220
  */
1153
- publicKey: v22.optional(v22.string())
1221
+ publicKey: v25.optional(v25.string())
1154
1222
  });
1155
- var stxSignStructuredMessageResultSchema = v22.object({
1223
+ var stxSignStructuredMessageResultSchema = v25.object({
1156
1224
  /**
1157
1225
  * Signature of the message.
1158
1226
  */
1159
- signature: v22.string(),
1227
+ signature: v25.string(),
1160
1228
  /**
1161
1229
  * Public key as hex-encoded string.
1162
1230
  */
1163
- publicKey: v22.string()
1231
+ publicKey: v25.string()
1164
1232
  });
1165
- var stxSignStructuredMessageRequestMessageSchema = v22.object({
1233
+ var stxSignStructuredMessageRequestMessageSchema = v25.object({
1166
1234
  ...rpcRequestMessageSchema.entries,
1167
- ...v22.object({
1168
- method: v22.literal(stxSignStructuredMessageMethodName),
1235
+ ...v25.object({
1236
+ method: v25.literal(stxSignStructuredMessageMethodName),
1169
1237
  params: stxSignStructuredMessageParamsSchema,
1170
- id: v22.string()
1238
+ id: v25.string()
1171
1239
  }).entries
1172
1240
  });
1173
1241
 
1174
1242
  // src/request/types/stxMethods/signTransaction.ts
1175
- import * as v23 from "valibot";
1243
+ import * as v26 from "valibot";
1176
1244
  var stxSignTransactionMethodName = "stx_signTransaction";
1177
- var stxSignTransactionParamsSchema = v23.object({
1245
+ var stxSignTransactionParamsSchema = v26.object({
1178
1246
  /**
1179
1247
  * The transaction to sign as a hex-encoded string.
1180
1248
  */
1181
- transaction: v23.string(),
1249
+ transaction: v26.string(),
1182
1250
  /**
1183
1251
  * The public key to sign the transaction with. The wallet may use any key
1184
1252
  * when not provided.
1185
1253
  */
1186
- pubkey: v23.optional(v23.string()),
1254
+ pubkey: v26.optional(v26.string()),
1187
1255
  /**
1188
1256
  * Whether to broadcast the transaction after signing. Defaults to `true`.
1189
1257
  */
1190
- broadcast: v23.optional(v23.boolean())
1258
+ broadcast: v26.optional(v26.boolean())
1191
1259
  });
1192
- var stxSignTransactionResultSchema = v23.object({
1260
+ var stxSignTransactionResultSchema = v26.object({
1193
1261
  /**
1194
1262
  * The signed transaction as a hex-encoded string.
1195
1263
  */
1196
- transaction: v23.string()
1264
+ transaction: v26.string()
1197
1265
  });
1198
- var stxSignTransactionRequestMessageSchema = v23.object({
1266
+ var stxSignTransactionRequestMessageSchema = v26.object({
1199
1267
  ...rpcRequestMessageSchema.entries,
1200
- ...v23.object({
1201
- method: v23.literal(stxSignTransactionMethodName),
1268
+ ...v26.object({
1269
+ method: v26.literal(stxSignTransactionMethodName),
1202
1270
  params: stxSignTransactionParamsSchema,
1203
- id: v23.string()
1271
+ id: v26.string()
1204
1272
  }).entries
1205
1273
  });
1206
1274
 
1207
1275
  // src/request/types/stxMethods/signTransactions.ts
1208
- import * as v24 from "valibot";
1276
+ import * as v27 from "valibot";
1209
1277
  var stxSignTransactionsMethodName = "stx_signTransactions";
1210
- var stxSignTransactionsParamsSchema = v24.object({
1278
+ var stxSignTransactionsParamsSchema = v27.object({
1211
1279
  /**
1212
1280
  * The transactions to sign as hex-encoded strings.
1213
1281
  */
1214
- transactions: v24.pipe(
1215
- v24.array(
1216
- v24.pipe(
1217
- v24.string(),
1218
- v24.check((hex) => {
1282
+ transactions: v27.pipe(
1283
+ v27.array(
1284
+ v27.pipe(
1285
+ v27.string(),
1286
+ v27.check((hex) => {
1219
1287
  return true;
1220
1288
  }, "Invalid hex-encoded Stacks transaction.")
1221
1289
  )
1222
1290
  ),
1223
- v24.minLength(1)
1291
+ v27.minLength(1)
1224
1292
  ),
1225
1293
  /**
1226
1294
  * Whether the signed transactions should be broadcast after signing. Defaults
1227
1295
  * to `true`.
1228
1296
  */
1229
- broadcast: v24.optional(v24.boolean())
1297
+ broadcast: v27.optional(v27.boolean())
1230
1298
  });
1231
- var stxSignTransactionsResultSchema = v24.object({
1299
+ var stxSignTransactionsResultSchema = v27.object({
1232
1300
  /**
1233
1301
  * The signed transactions as hex-encoded strings, in the same order as in the
1234
1302
  * sign request.
1235
1303
  */
1236
- transactions: v24.array(v24.string())
1304
+ transactions: v27.array(v27.string())
1237
1305
  });
1238
- var stxSignTransactionsRequestMessageSchema = v24.object({
1306
+ var stxSignTransactionsRequestMessageSchema = v27.object({
1239
1307
  ...rpcRequestMessageSchema.entries,
1240
- ...v24.object({
1241
- method: v24.literal(stxSignTransactionsMethodName),
1308
+ ...v27.object({
1309
+ method: v27.literal(stxSignTransactionsMethodName),
1242
1310
  params: stxSignTransactionsParamsSchema,
1243
- id: v24.string()
1311
+ id: v27.string()
1244
1312
  }).entries
1245
1313
  });
1246
1314
 
1247
1315
  // src/request/types/stxMethods/transferStx.ts
1248
- import * as v25 from "valibot";
1316
+ import * as v28 from "valibot";
1249
1317
  var stxTransferStxMethodName = "stx_transferStx";
1250
- var stxTransferStxParamsSchema = v25.object({
1318
+ var stxTransferStxParamsSchema = v28.object({
1251
1319
  /**
1252
1320
  * Amount of STX tokens to transfer in microstacks as a string. Anything
1253
1321
  * parseable by `BigInt` is acceptable.
@@ -1260,23 +1328,23 @@ var stxTransferStxParamsSchema = v25.object({
1260
1328
  * const amount3 = '1234';
1261
1329
  * ```
1262
1330
  */
1263
- amount: v25.union([v25.number(), v25.string()]),
1331
+ amount: v28.union([v28.number(), v28.string()]),
1264
1332
  /**
1265
1333
  * The recipient's principal.
1266
1334
  */
1267
- recipient: v25.string(),
1335
+ recipient: v28.string(),
1268
1336
  /**
1269
1337
  * A string representing the memo.
1270
1338
  */
1271
- memo: v25.optional(v25.string()),
1339
+ memo: v28.optional(v28.string()),
1272
1340
  /**
1273
1341
  * Version of parameter format.
1274
1342
  */
1275
- version: v25.optional(v25.string()),
1343
+ version: v28.optional(v28.string()),
1276
1344
  /**
1277
1345
  * The mode of the post conditions.
1278
1346
  */
1279
- postConditionMode: v25.optional(v25.number()),
1347
+ postConditionMode: v28.optional(v28.number()),
1280
1348
  /**
1281
1349
  * A hex-encoded string representing the post conditions.
1282
1350
  *
@@ -1289,29 +1357,29 @@ var stxTransferStxParamsSchema = v25.object({
1289
1357
  * const hexPostCondition = serializePostCondition(postCondition).toString('hex');
1290
1358
  * ```
1291
1359
  */
1292
- postConditions: v25.optional(v25.array(v25.string())),
1360
+ postConditions: v28.optional(v28.array(v28.string())),
1293
1361
  /**
1294
1362
  * The public key to sign the transaction with. The wallet may use any key
1295
1363
  * when not provided.
1296
1364
  */
1297
- pubkey: v25.optional(v25.string())
1365
+ pubkey: v28.optional(v28.string())
1298
1366
  });
1299
- var stxTransferStxResultSchema = v25.object({
1367
+ var stxTransferStxResultSchema = v28.object({
1300
1368
  /**
1301
1369
  * The ID of the transaction.
1302
1370
  */
1303
- txid: v25.string(),
1371
+ txid: v28.string(),
1304
1372
  /**
1305
1373
  * A Stacks transaction as a hex-encoded string.
1306
1374
  */
1307
- transaction: v25.string()
1375
+ transaction: v28.string()
1308
1376
  });
1309
- var stxTransferStxRequestMessageSchema = v25.object({
1377
+ var stxTransferStxRequestMessageSchema = v28.object({
1310
1378
  ...rpcRequestMessageSchema.entries,
1311
- ...v25.object({
1312
- method: v25.literal(stxTransferStxMethodName),
1379
+ ...v28.object({
1380
+ method: v28.literal(stxTransferStxMethodName),
1313
1381
  params: stxTransferStxParamsSchema,
1314
- id: v25.string()
1382
+ id: v28.string()
1315
1383
  }).entries
1316
1384
  });
1317
1385
 
@@ -1328,13 +1396,13 @@ var request = async (method, params, providerId) => {
1328
1396
  throw new Error("A wallet method is required");
1329
1397
  }
1330
1398
  const response = await provider.request(method, params);
1331
- if (v26.is(rpcErrorResponseMessageSchema, response)) {
1399
+ if (v29.is(rpcErrorResponseMessageSchema, response)) {
1332
1400
  return {
1333
1401
  status: "error",
1334
1402
  error: response.error
1335
1403
  };
1336
1404
  }
1337
- if (v26.is(rpcSuccessResponseMessageSchema, response)) {
1405
+ if (v29.is(rpcSuccessResponseMessageSchema, response)) {
1338
1406
  return {
1339
1407
  status: "success",
1340
1408
  result: response.result
@@ -2488,6 +2556,16 @@ export {
2488
2556
  signPsbtRequestMessageSchema,
2489
2557
  signPsbtResultSchema,
2490
2558
  signTransaction,
2559
+ sparkFlashnetGetJwtMethodName,
2560
+ sparkFlashnetGetJwtParamsSchema,
2561
+ sparkFlashnetGetJwtRequestMessageSchema,
2562
+ sparkFlashnetGetJwtResultSchema,
2563
+ sparkFlashnetRouteSwapIntentSchema,
2564
+ sparkFlashnetSignIntentMethodName,
2565
+ sparkFlashnetSignIntentParamsSchema,
2566
+ sparkFlashnetSignIntentRequestMessageSchema,
2567
+ sparkFlashnetSignIntentResultSchema,
2568
+ sparkFlashnetSwapIntentSchema,
2491
2569
  sparkGetAddressesMethodName,
2492
2570
  sparkGetAddressesParamsSchema,
2493
2571
  sparkGetAddressesRequestMessageSchema,
@@ -2496,10 +2574,6 @@ export {
2496
2574
  sparkGetBalanceParamsSchema,
2497
2575
  sparkGetBalanceRequestMessageSchema,
2498
2576
  sparkGetBalanceResultSchema,
2499
- sparkSignMessageMethodName,
2500
- sparkSignMessageParamsSchema,
2501
- sparkSignMessageRequestMessageSchema,
2502
- sparkSignMessageResultSchema,
2503
2577
  sparkTransferMethodName,
2504
2578
  sparkTransferParamsSchema,
2505
2579
  sparkTransferRequestMessageSchema,