@sats-connect/core 0.8.2 → 0.9.0-6f299e4

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
@@ -1,5 +1,5 @@
1
1
  // src/request/index.ts
2
- import * as v25 from "valibot";
2
+ import * as v37 from "valibot";
3
3
 
4
4
  // src/provider/types.ts
5
5
  import * as v4 from "valibot";
@@ -862,146 +862,366 @@ var runesTransferRequestMessageSchema = v11.object({
862
862
  }).entries
863
863
  });
864
864
 
865
- // src/request/types/sparkMethods/getAddresses.ts
865
+ // src/request/types/sparkMethods/flashnetMethods/getJwt.ts
866
866
  import * as v12 from "valibot";
867
+ var sparkFlashnetGetJwtMethodName = "spark_flashnet_getJwt";
868
+ var sparkFlashnetGetJwtParamsSchema = v12.null();
869
+ var sparkFlashnetGetJwtResultSchema = v12.object({
870
+ /**
871
+ * The JWT token for authenticated requests to the Flashnet API.
872
+ */
873
+ jwt: v12.string()
874
+ });
875
+ var sparkFlashnetGetJwtRequestMessageSchema = v12.object({
876
+ ...rpcRequestMessageSchema.entries,
877
+ ...v12.object({
878
+ method: v12.literal(sparkFlashnetGetJwtMethodName),
879
+ params: sparkFlashnetGetJwtParamsSchema,
880
+ id: v12.string()
881
+ }).entries
882
+ });
883
+
884
+ // src/request/types/sparkMethods/flashnetMethods/intents/addLiquidity.ts
885
+ import * as v13 from "valibot";
886
+ var sparkFlashnetAddLiquidityIntentSchema = v13.object({
887
+ type: v13.literal("addLiquidity"),
888
+ data: v13.object({
889
+ userPublicKey: v13.string(),
890
+ poolId: v13.string(),
891
+ assetAAmount: v13.string(),
892
+ assetBAmount: v13.string(),
893
+ assetAMinAmountIn: v13.string(),
894
+ assetBMinAmountIn: v13.string(),
895
+ assetATransferId: v13.string(),
896
+ assetBTransferId: v13.string(),
897
+ nonce: v13.string()
898
+ })
899
+ });
900
+
901
+ // src/request/types/sparkMethods/flashnetMethods/intents/clawback.ts
902
+ import * as v14 from "valibot";
903
+ var sparkFlashnetClawbackIntentSchema = v14.object({
904
+ type: v14.literal("clawback"),
905
+ data: v14.object({
906
+ senderPublicKey: v14.string(),
907
+ sparkTransferId: v14.string(),
908
+ lpIdentityPublicKey: v14.string(),
909
+ nonce: v14.string()
910
+ })
911
+ });
912
+
913
+ // src/request/types/sparkMethods/flashnetMethods/intents/confirmInitialDeposit.ts
914
+ import * as v15 from "valibot";
915
+ var sparkFlashnetConfirmInitialDepositIntentSchema = v15.object({
916
+ type: v15.literal("confirmInitialDeposit"),
917
+ data: v15.object({
918
+ poolId: v15.string(),
919
+ assetASparkTransferId: v15.string(),
920
+ poolOwnerPublicKey: v15.string(),
921
+ nonce: v15.string()
922
+ })
923
+ });
924
+
925
+ // src/request/types/sparkMethods/flashnetMethods/intents/createConstantProductPool.ts
926
+ import * as v16 from "valibot";
927
+ var sparkFlashnetCreateConstantProductPoolIntentSchema = v16.object({
928
+ type: v16.literal("createConstantProductPool"),
929
+ data: v16.object({
930
+ poolOwnerPublicKey: v16.string(),
931
+ assetAAddress: v16.string(),
932
+ assetBAddress: v16.string(),
933
+ lpFeeRateBps: v16.union([v16.number(), v16.string()]),
934
+ totalHostFeeRateBps: v16.union([v16.number(), v16.string()]),
935
+ nonce: v16.string()
936
+ })
937
+ });
938
+
939
+ // src/request/types/sparkMethods/flashnetMethods/intents/createSingleSidedPool.ts
940
+ import * as v17 from "valibot";
941
+ var sparkFlashnetCreateSingleSidedPoolIntentSchema = v17.object({
942
+ type: v17.literal("createSingleSidedPool"),
943
+ data: v17.object({
944
+ assetAAddress: v17.string(),
945
+ assetBAddress: v17.string(),
946
+ assetAInitialReserve: v17.string(),
947
+ virtualReserveA: v17.union([v17.number(), v17.string()]),
948
+ virtualReserveB: v17.union([v17.number(), v17.string()]),
949
+ threshold: v17.union([v17.number(), v17.string()]),
950
+ lpFeeRateBps: v17.union([v17.number(), v17.string()]),
951
+ totalHostFeeRateBps: v17.union([v17.number(), v17.string()]),
952
+ poolOwnerPublicKey: v17.string(),
953
+ nonce: v17.string()
954
+ })
955
+ });
956
+
957
+ // src/request/types/sparkMethods/flashnetMethods/intents/removeLiquidity.ts
958
+ import * as v18 from "valibot";
959
+ var sparkFlashnetRemoveLiquidityIntentSchema = v18.object({
960
+ type: v18.literal("removeLiquidity"),
961
+ data: v18.object({
962
+ userPublicKey: v18.string(),
963
+ poolId: v18.string(),
964
+ lpTokensToRemove: v18.string(),
965
+ nonce: v18.string()
966
+ })
967
+ });
968
+
969
+ // src/request/types/sparkMethods/flashnetMethods/intents/routeSwap.ts
970
+ import * as v19 from "valibot";
971
+ var sparkFlashnetRouteSwapIntentSchema = v19.object({
972
+ type: v19.literal("executeRouteSwap"),
973
+ data: v19.object({
974
+ userPublicKey: v19.string(),
975
+ initialSparkTransferId: v19.string(),
976
+ hops: v19.array(
977
+ v19.object({
978
+ poolId: v19.string(),
979
+ inputAssetAddress: v19.string(),
980
+ outputAssetAddress: v19.string(),
981
+ hopIntegratorFeeRateBps: v19.optional(v19.union([v19.number(), v19.string()]))
982
+ })
983
+ ),
984
+ inputAmount: v19.string(),
985
+ maxRouteSlippageBps: v19.union([v19.number(), v19.string()]),
986
+ minAmountOut: v19.string(),
987
+ defaultIntegratorFeeRateBps: v19.optional(v19.union([v19.number(), v19.string()])),
988
+ nonce: v19.string()
989
+ })
990
+ });
991
+
992
+ // src/request/types/sparkMethods/flashnetMethods/intents/swap.ts
993
+ import * as v20 from "valibot";
994
+ var sparkFlashnetSwapIntentSchema = v20.object({
995
+ type: v20.literal("executeSwap"),
996
+ data: v20.object({
997
+ userPublicKey: v20.string(),
998
+ poolId: v20.string(),
999
+ transferId: v20.string(),
1000
+ assetInAddress: v20.string(),
1001
+ assetOutAddress: v20.string(),
1002
+ amountIn: v20.string(),
1003
+ maxSlippageBps: v20.union([v20.number(), v20.string()]),
1004
+ minAmountOut: v20.string(),
1005
+ totalIntegratorFeeRateBps: v20.optional(v20.union([v20.number(), v20.string()])),
1006
+ nonce: v20.string()
1007
+ })
1008
+ });
1009
+
1010
+ // src/request/types/sparkMethods/flashnetMethods/signIntent.ts
1011
+ import * as v21 from "valibot";
1012
+ var sparkFlashnetSignIntentMethodName = "spark_flashnet_signIntent";
1013
+ var sparkFlashnetSignIntentParamsSchema = v21.union([
1014
+ sparkFlashnetSwapIntentSchema,
1015
+ sparkFlashnetRouteSwapIntentSchema,
1016
+ sparkFlashnetAddLiquidityIntentSchema,
1017
+ sparkFlashnetClawbackIntentSchema,
1018
+ sparkFlashnetConfirmInitialDepositIntentSchema,
1019
+ sparkFlashnetCreateConstantProductPoolIntentSchema,
1020
+ sparkFlashnetCreateSingleSidedPoolIntentSchema,
1021
+ sparkFlashnetRemoveLiquidityIntentSchema
1022
+ ]);
1023
+ var sparkFlashnetSignIntentResultSchema = v21.object({
1024
+ /**
1025
+ * The signed intent as a hex string.
1026
+ */
1027
+ signature: v21.string()
1028
+ });
1029
+ var sparkFlashnetSignIntentRequestMessageSchema = v21.object({
1030
+ ...rpcRequestMessageSchema.entries,
1031
+ ...v21.object({
1032
+ method: v21.literal(sparkFlashnetSignIntentMethodName),
1033
+ params: sparkFlashnetSignIntentParamsSchema,
1034
+ id: v21.string()
1035
+ }).entries
1036
+ });
1037
+
1038
+ // src/request/types/sparkMethods/flashnetMethods/signStructuredMessage.ts
1039
+ import * as v22 from "valibot";
1040
+ var sparkFlashnetSignStructuredMessageMethodName = "spark_flashnet_signStructuredMessage";
1041
+ var sparkFlashnetSignStructuredMessageParamsSchema = v22.object({
1042
+ message: v22.string()
1043
+ });
1044
+ var sparkFlashnetSignStructuredMessageResultSchema = v22.object({
1045
+ message: v22.string(),
1046
+ signature: v22.string()
1047
+ });
1048
+ var sparkFlashnetSignStructuredMessageRequestMessageSchema = v22.object({
1049
+ ...rpcRequestMessageSchema.entries,
1050
+ ...v22.object({
1051
+ method: v22.literal(sparkFlashnetSignStructuredMessageMethodName),
1052
+ params: sparkFlashnetSignStructuredMessageParamsSchema,
1053
+ id: v22.string()
1054
+ }).entries
1055
+ });
1056
+
1057
+ // src/request/types/sparkMethods/getAddresses.ts
1058
+ import * as v23 from "valibot";
867
1059
  var sparkGetAddressesMethodName = "spark_getAddresses";
868
- var sparkGetAddressesParamsSchema = v12.nullish(
869
- v12.object({
1060
+ var sparkGetAddressesParamsSchema = v23.nullish(
1061
+ v23.object({
870
1062
  /**
871
1063
  * A message to be displayed to the user in the request prompt.
872
1064
  */
873
- message: v12.optional(v12.string())
1065
+ message: v23.optional(v23.string())
874
1066
  })
875
1067
  );
876
- var sparkGetAddressesResultSchema = v12.object({
1068
+ var sparkGetAddressesResultSchema = v23.object({
877
1069
  /**
878
1070
  * The addresses generated for the given purposes.
879
1071
  */
880
- addresses: v12.array(addressSchema),
1072
+ addresses: v23.array(addressSchema),
881
1073
  network: getNetworkResultSchema
882
1074
  });
883
- var sparkGetAddressesRequestMessageSchema = v12.object({
1075
+ var sparkGetAddressesRequestMessageSchema = v23.object({
884
1076
  ...rpcRequestMessageSchema.entries,
885
- ...v12.object({
886
- method: v12.literal(sparkGetAddressesMethodName),
1077
+ ...v23.object({
1078
+ method: v23.literal(sparkGetAddressesMethodName),
887
1079
  params: sparkGetAddressesParamsSchema,
888
- id: v12.string()
1080
+ id: v23.string()
889
1081
  }).entries
890
1082
  });
891
1083
 
892
1084
  // src/request/types/sparkMethods/getBalance.ts
893
- import * as v13 from "valibot";
1085
+ import * as v24 from "valibot";
894
1086
  var sparkGetBalanceMethodName = "spark_getBalance";
895
- var sparkGetBalanceParamsSchema = v13.nullish(v13.null());
896
- var sparkGetBalanceResultSchema = v13.object({
1087
+ var sparkGetBalanceParamsSchema = v24.nullish(v24.null());
1088
+ var sparkGetBalanceResultSchema = v24.object({
897
1089
  /**
898
1090
  * The Spark Bitcoin address balance in sats in string form.
899
1091
  */
900
- balance: v13.string(),
901
- tokenBalances: v13.array(
902
- v13.object({
1092
+ balance: v24.string(),
1093
+ tokenBalances: v24.array(
1094
+ v24.object({
903
1095
  /* The address balance of the token in string form as it can overflow a js number */
904
- balance: v13.string(),
905
- tokenMetadata: v13.object({
906
- tokenIdentifier: v13.string(),
907
- tokenName: v13.string(),
908
- tokenTicker: v13.string(),
909
- decimals: v13.number(),
910
- maxSupply: v13.string()
1096
+ balance: v24.string(),
1097
+ tokenMetadata: v24.object({
1098
+ tokenIdentifier: v24.string(),
1099
+ tokenName: v24.string(),
1100
+ tokenTicker: v24.string(),
1101
+ decimals: v24.number(),
1102
+ maxSupply: v24.string()
911
1103
  })
912
1104
  })
913
1105
  )
914
1106
  });
915
- var sparkGetBalanceRequestMessageSchema = v13.object({
1107
+ var sparkGetBalanceRequestMessageSchema = v24.object({
916
1108
  ...rpcRequestMessageSchema.entries,
917
- ...v13.object({
918
- method: v13.literal(sparkGetBalanceMethodName),
1109
+ ...v24.object({
1110
+ method: v24.literal(sparkGetBalanceMethodName),
919
1111
  params: sparkGetBalanceParamsSchema,
920
- id: v13.string()
1112
+ id: v24.string()
1113
+ }).entries
1114
+ });
1115
+
1116
+ // src/request/types/sparkMethods/signMessage.ts
1117
+ import * as v25 from "valibot";
1118
+ var sparkSignMessageMethodName = "spark_signMessage";
1119
+ var sparkSignMessageParamsSchema = v25.object({
1120
+ /**
1121
+ * The message to sign. The message should only consist of valid UTF-8 characters.
1122
+ */
1123
+ message: v25.string()
1124
+ });
1125
+ var sparkSignMessageResultSchema = v25.object({
1126
+ /**
1127
+ * The signature, encoded in base64, of the message hash.
1128
+ *
1129
+ * Note: When signing, the message is decoded into a byte array,
1130
+ * and the resulting byte array is hashed with SHA256 before signing
1131
+ * with the private key.
1132
+ */
1133
+ signature: v25.string()
1134
+ });
1135
+ var sparkSignMessageRequestMessageSchema = v25.object({
1136
+ ...rpcRequestMessageSchema.entries,
1137
+ ...v25.object({
1138
+ method: v25.literal(sparkSignMessageMethodName),
1139
+ params: sparkSignMessageParamsSchema,
1140
+ id: v25.string()
921
1141
  }).entries
922
1142
  });
923
1143
 
924
1144
  // src/request/types/sparkMethods/transfer.ts
925
- import * as v14 from "valibot";
1145
+ import * as v26 from "valibot";
926
1146
  var sparkTransferMethodName = "spark_transfer";
927
- var sparkTransferParamsSchema = v14.object({
1147
+ var sparkTransferParamsSchema = v26.object({
928
1148
  /**
929
1149
  * Amount of SATS to transfer as a string or number.
930
1150
  */
931
- amountSats: v14.union([v14.number(), v14.string()]),
1151
+ amountSats: v26.union([v26.number(), v26.string()]),
932
1152
  /**
933
1153
  * The recipient's spark address.
934
1154
  */
935
- receiverSparkAddress: v14.string()
1155
+ receiverSparkAddress: v26.string()
936
1156
  });
937
- var sparkTransferResultSchema = v14.object({
1157
+ var sparkTransferResultSchema = v26.object({
938
1158
  /**
939
1159
  * The ID of the transaction.
940
1160
  */
941
- id: v14.string()
1161
+ id: v26.string()
942
1162
  });
943
- var sparkTransferRequestMessageSchema = v14.object({
1163
+ var sparkTransferRequestMessageSchema = v26.object({
944
1164
  ...rpcRequestMessageSchema.entries,
945
- ...v14.object({
946
- method: v14.literal(sparkTransferMethodName),
1165
+ ...v26.object({
1166
+ method: v26.literal(sparkTransferMethodName),
947
1167
  params: sparkTransferParamsSchema,
948
- id: v14.string()
1168
+ id: v26.string()
949
1169
  }).entries
950
1170
  });
951
1171
 
952
1172
  // src/request/types/sparkMethods/transferToken.ts
953
- import * as v15 from "valibot";
1173
+ import * as v27 from "valibot";
954
1174
  var sparkTransferTokenMethodName = "spark_transferToken";
955
- var sparkTransferTokenParamsSchema = v15.object({
1175
+ var sparkTransferTokenParamsSchema = v27.object({
956
1176
  /**
957
1177
  * Amount of units of the token to transfer as a string or number.
958
1178
  */
959
- tokenAmount: v15.union([v15.number(), v15.string()]),
1179
+ tokenAmount: v27.union([v27.number(), v27.string()]),
960
1180
  /**
961
1181
  * The Bech32m token identifier.
962
1182
  */
963
- tokenIdentifier: v15.string(),
1183
+ tokenIdentifier: v27.string(),
964
1184
  /**
965
1185
  * The recipient's spark address.
966
1186
  */
967
- receiverSparkAddress: v15.string()
1187
+ receiverSparkAddress: v27.string()
968
1188
  });
969
- var sparkTransferTokenResultSchema = v15.object({
1189
+ var sparkTransferTokenResultSchema = v27.object({
970
1190
  /**
971
1191
  * The ID of the transaction.
972
1192
  */
973
- id: v15.string()
1193
+ id: v27.string()
974
1194
  });
975
- var sparkTransferTokenRequestMessageSchema = v15.object({
1195
+ var sparkTransferTokenRequestMessageSchema = v27.object({
976
1196
  ...rpcRequestMessageSchema.entries,
977
- ...v15.object({
978
- method: v15.literal(sparkTransferTokenMethodName),
1197
+ ...v27.object({
1198
+ method: v27.literal(sparkTransferTokenMethodName),
979
1199
  params: sparkTransferTokenParamsSchema,
980
- id: v15.string()
1200
+ id: v27.string()
981
1201
  }).entries
982
1202
  });
983
1203
 
984
1204
  // src/request/types/stxMethods/callContract.ts
985
- import * as v16 from "valibot";
1205
+ import * as v28 from "valibot";
986
1206
  var stxCallContractMethodName = "stx_callContract";
987
- var stxCallContractParamsSchema = v16.object({
1207
+ var stxCallContractParamsSchema = v28.object({
988
1208
  /**
989
1209
  * The contract principal.
990
1210
  *
991
1211
  * E.g. `"SPKE...GD5C.my-contract"`
992
1212
  */
993
- contract: v16.string(),
1213
+ contract: v28.string(),
994
1214
  /**
995
1215
  * The name of the function to call.
996
1216
  *
997
1217
  * Note: spec changes ongoing,
998
1218
  * https://github.com/stacksgov/sips/pull/166#pullrequestreview-1914236999
999
1219
  */
1000
- functionName: v16.string(),
1220
+ functionName: v28.string(),
1001
1221
  /**
1002
1222
  * @deprecated in favor of `functionArgs` for @stacks/connect compatibility
1003
1223
  */
1004
- arguments: v16.optional(v16.array(v16.string())),
1224
+ arguments: v28.optional(v28.array(v28.string())),
1005
1225
  /**
1006
1226
  * The function's arguments. The arguments are expected to be hex-encoded
1007
1227
  * strings of Clarity values.
@@ -1016,274 +1236,274 @@ var stxCallContractParamsSchema = v16.object({
1016
1236
  * const hexArgs = functionArgs.map(cvToHex);
1017
1237
  * ```
1018
1238
  */
1019
- functionArgs: v16.optional(v16.array(v16.string())),
1239
+ functionArgs: v28.optional(v28.array(v28.string())),
1020
1240
  /**
1021
1241
  * The post conditions to apply to the contract call.
1022
1242
  */
1023
- postConditions: v16.optional(v16.array(v16.string())),
1243
+ postConditions: v28.optional(v28.array(v28.string())),
1024
1244
  /**
1025
1245
  * The mode to apply to the post conditions.
1026
1246
  */
1027
- postConditionMode: v16.optional(v16.union([v16.literal("allow"), v16.literal("deny")]))
1247
+ postConditionMode: v28.optional(v28.union([v28.literal("allow"), v28.literal("deny")]))
1028
1248
  });
1029
- var stxCallContractResultSchema = v16.object({
1249
+ var stxCallContractResultSchema = v28.object({
1030
1250
  /**
1031
1251
  * The ID of the transaction.
1032
1252
  */
1033
- txid: v16.string(),
1253
+ txid: v28.string(),
1034
1254
  /**
1035
1255
  * A Stacks transaction as a hex-encoded string.
1036
1256
  */
1037
- transaction: v16.string()
1257
+ transaction: v28.string()
1038
1258
  });
1039
- var stxCallContractRequestMessageSchema = v16.object({
1259
+ var stxCallContractRequestMessageSchema = v28.object({
1040
1260
  ...rpcRequestMessageSchema.entries,
1041
- ...v16.object({
1042
- method: v16.literal(stxCallContractMethodName),
1261
+ ...v28.object({
1262
+ method: v28.literal(stxCallContractMethodName),
1043
1263
  params: stxCallContractParamsSchema,
1044
- id: v16.string()
1264
+ id: v28.string()
1045
1265
  }).entries
1046
1266
  });
1047
1267
 
1048
1268
  // src/request/types/stxMethods/deployContract.ts
1049
- import * as v17 from "valibot";
1269
+ import * as v29 from "valibot";
1050
1270
  var stxDeployContractMethodName = "stx_deployContract";
1051
- var stxDeployContractParamsSchema = v17.object({
1271
+ var stxDeployContractParamsSchema = v29.object({
1052
1272
  /**
1053
1273
  * Name of the contract.
1054
1274
  */
1055
- name: v17.string(),
1275
+ name: v29.string(),
1056
1276
  /**
1057
1277
  * The source code of the Clarity contract.
1058
1278
  */
1059
- clarityCode: v17.string(),
1279
+ clarityCode: v29.string(),
1060
1280
  /**
1061
1281
  * The version of the Clarity contract.
1062
1282
  */
1063
- clarityVersion: v17.optional(v17.number()),
1283
+ clarityVersion: v29.optional(v29.number()),
1064
1284
  /**
1065
1285
  * The post conditions to apply to the contract call.
1066
1286
  */
1067
- postConditions: v17.optional(v17.array(v17.string())),
1287
+ postConditions: v29.optional(v29.array(v29.string())),
1068
1288
  /**
1069
1289
  * The mode to apply to the post conditions.
1070
1290
  */
1071
- postConditionMode: v17.optional(v17.union([v17.literal("allow"), v17.literal("deny")]))
1291
+ postConditionMode: v29.optional(v29.union([v29.literal("allow"), v29.literal("deny")]))
1072
1292
  });
1073
- var stxDeployContractResultSchema = v17.object({
1293
+ var stxDeployContractResultSchema = v29.object({
1074
1294
  /**
1075
1295
  * The ID of the transaction.
1076
1296
  */
1077
- txid: v17.string(),
1297
+ txid: v29.string(),
1078
1298
  /**
1079
1299
  * A Stacks transaction as a hex-encoded string.
1080
1300
  */
1081
- transaction: v17.string()
1301
+ transaction: v29.string()
1082
1302
  });
1083
- var stxDeployContractRequestMessageSchema = v17.object({
1303
+ var stxDeployContractRequestMessageSchema = v29.object({
1084
1304
  ...rpcRequestMessageSchema.entries,
1085
- ...v17.object({
1086
- method: v17.literal(stxDeployContractMethodName),
1305
+ ...v29.object({
1306
+ method: v29.literal(stxDeployContractMethodName),
1087
1307
  params: stxDeployContractParamsSchema,
1088
- id: v17.string()
1308
+ id: v29.string()
1089
1309
  }).entries
1090
1310
  });
1091
1311
 
1092
1312
  // src/request/types/stxMethods/getAccounts.ts
1093
- import * as v18 from "valibot";
1313
+ import * as v30 from "valibot";
1094
1314
  var stxGetAccountsMethodName = "stx_getAccounts";
1095
- var stxGetAccountsParamsSchema = v18.nullish(v18.null());
1096
- var stxGetAccountsResultSchema = v18.object({
1315
+ var stxGetAccountsParamsSchema = v30.nullish(v30.null());
1316
+ var stxGetAccountsResultSchema = v30.object({
1097
1317
  /**
1098
1318
  * The addresses generated for the given purposes.
1099
1319
  */
1100
- addresses: v18.array(
1101
- v18.object({
1102
- address: v18.string(),
1103
- publicKey: v18.string(),
1104
- gaiaHubUrl: v18.string(),
1105
- gaiaAppKey: v18.string()
1320
+ addresses: v30.array(
1321
+ v30.object({
1322
+ address: v30.string(),
1323
+ publicKey: v30.string(),
1324
+ gaiaHubUrl: v30.string(),
1325
+ gaiaAppKey: v30.string()
1106
1326
  })
1107
1327
  ),
1108
1328
  network: getNetworkResultSchema
1109
1329
  });
1110
- var stxGetAccountsRequestMessageSchema = v18.object({
1330
+ var stxGetAccountsRequestMessageSchema = v30.object({
1111
1331
  ...rpcRequestMessageSchema.entries,
1112
- ...v18.object({
1113
- method: v18.literal(stxGetAccountsMethodName),
1332
+ ...v30.object({
1333
+ method: v30.literal(stxGetAccountsMethodName),
1114
1334
  params: stxGetAccountsParamsSchema,
1115
- id: v18.string()
1335
+ id: v30.string()
1116
1336
  }).entries
1117
1337
  });
1118
1338
 
1119
1339
  // src/request/types/stxMethods/getAddresses.ts
1120
- import * as v19 from "valibot";
1340
+ import * as v31 from "valibot";
1121
1341
  var stxGetAddressesMethodName = "stx_getAddresses";
1122
- var stxGetAddressesParamsSchema = v19.nullish(
1123
- v19.object({
1342
+ var stxGetAddressesParamsSchema = v31.nullish(
1343
+ v31.object({
1124
1344
  /**
1125
1345
  * A message to be displayed to the user in the request prompt.
1126
1346
  */
1127
- message: v19.optional(v19.string())
1347
+ message: v31.optional(v31.string())
1128
1348
  })
1129
1349
  );
1130
- var stxGetAddressesResultSchema = v19.object({
1350
+ var stxGetAddressesResultSchema = v31.object({
1131
1351
  /**
1132
1352
  * The addresses generated for the given purposes.
1133
1353
  */
1134
- addresses: v19.array(addressSchema),
1354
+ addresses: v31.array(addressSchema),
1135
1355
  network: getNetworkResultSchema
1136
1356
  });
1137
- var stxGetAddressesRequestMessageSchema = v19.object({
1357
+ var stxGetAddressesRequestMessageSchema = v31.object({
1138
1358
  ...rpcRequestMessageSchema.entries,
1139
- ...v19.object({
1140
- method: v19.literal(stxGetAddressesMethodName),
1359
+ ...v31.object({
1360
+ method: v31.literal(stxGetAddressesMethodName),
1141
1361
  params: stxGetAddressesParamsSchema,
1142
- id: v19.string()
1362
+ id: v31.string()
1143
1363
  }).entries
1144
1364
  });
1145
1365
 
1146
1366
  // src/request/types/stxMethods/signMessage.ts
1147
- import * as v20 from "valibot";
1367
+ import * as v32 from "valibot";
1148
1368
  var stxSignMessageMethodName = "stx_signMessage";
1149
- var stxSignMessageParamsSchema = v20.object({
1369
+ var stxSignMessageParamsSchema = v32.object({
1150
1370
  /**
1151
1371
  * The message to sign.
1152
1372
  */
1153
- message: v20.string()
1373
+ message: v32.string()
1154
1374
  });
1155
- var stxSignMessageResultSchema = v20.object({
1375
+ var stxSignMessageResultSchema = v32.object({
1156
1376
  /**
1157
1377
  * The signature of the message.
1158
1378
  */
1159
- signature: v20.string(),
1379
+ signature: v32.string(),
1160
1380
  /**
1161
1381
  * The public key used to sign the message.
1162
1382
  */
1163
- publicKey: v20.string()
1383
+ publicKey: v32.string()
1164
1384
  });
1165
- var stxSignMessageRequestMessageSchema = v20.object({
1385
+ var stxSignMessageRequestMessageSchema = v32.object({
1166
1386
  ...rpcRequestMessageSchema.entries,
1167
- ...v20.object({
1168
- method: v20.literal(stxSignMessageMethodName),
1387
+ ...v32.object({
1388
+ method: v32.literal(stxSignMessageMethodName),
1169
1389
  params: stxSignMessageParamsSchema,
1170
- id: v20.string()
1390
+ id: v32.string()
1171
1391
  }).entries
1172
1392
  });
1173
1393
 
1174
1394
  // src/request/types/stxMethods/signStructuredMessage.ts
1175
- import * as v21 from "valibot";
1395
+ import * as v33 from "valibot";
1176
1396
  var stxSignStructuredMessageMethodName = "stx_signStructuredMessage";
1177
- var stxSignStructuredMessageParamsSchema = v21.object({
1397
+ var stxSignStructuredMessageParamsSchema = v33.object({
1178
1398
  /**
1179
1399
  * The domain to be signed.
1180
1400
  */
1181
- domain: v21.string(),
1401
+ domain: v33.string(),
1182
1402
  /**
1183
1403
  * Message payload to be signed.
1184
1404
  */
1185
- message: v21.string(),
1405
+ message: v33.string(),
1186
1406
  /**
1187
1407
  * The public key to sign the message with.
1188
1408
  */
1189
- publicKey: v21.optional(v21.string())
1409
+ publicKey: v33.optional(v33.string())
1190
1410
  });
1191
- var stxSignStructuredMessageResultSchema = v21.object({
1411
+ var stxSignStructuredMessageResultSchema = v33.object({
1192
1412
  /**
1193
1413
  * Signature of the message.
1194
1414
  */
1195
- signature: v21.string(),
1415
+ signature: v33.string(),
1196
1416
  /**
1197
1417
  * Public key as hex-encoded string.
1198
1418
  */
1199
- publicKey: v21.string()
1419
+ publicKey: v33.string()
1200
1420
  });
1201
- var stxSignStructuredMessageRequestMessageSchema = v21.object({
1421
+ var stxSignStructuredMessageRequestMessageSchema = v33.object({
1202
1422
  ...rpcRequestMessageSchema.entries,
1203
- ...v21.object({
1204
- method: v21.literal(stxSignStructuredMessageMethodName),
1423
+ ...v33.object({
1424
+ method: v33.literal(stxSignStructuredMessageMethodName),
1205
1425
  params: stxSignStructuredMessageParamsSchema,
1206
- id: v21.string()
1426
+ id: v33.string()
1207
1427
  }).entries
1208
1428
  });
1209
1429
 
1210
1430
  // src/request/types/stxMethods/signTransaction.ts
1211
- import * as v22 from "valibot";
1431
+ import * as v34 from "valibot";
1212
1432
  var stxSignTransactionMethodName = "stx_signTransaction";
1213
- var stxSignTransactionParamsSchema = v22.object({
1433
+ var stxSignTransactionParamsSchema = v34.object({
1214
1434
  /**
1215
1435
  * The transaction to sign as a hex-encoded string.
1216
1436
  */
1217
- transaction: v22.string(),
1437
+ transaction: v34.string(),
1218
1438
  /**
1219
1439
  * The public key to sign the transaction with. The wallet may use any key
1220
1440
  * when not provided.
1221
1441
  */
1222
- pubkey: v22.optional(v22.string()),
1442
+ pubkey: v34.optional(v34.string()),
1223
1443
  /**
1224
1444
  * Whether to broadcast the transaction after signing. Defaults to `true`.
1225
1445
  */
1226
- broadcast: v22.optional(v22.boolean())
1446
+ broadcast: v34.optional(v34.boolean())
1227
1447
  });
1228
- var stxSignTransactionResultSchema = v22.object({
1448
+ var stxSignTransactionResultSchema = v34.object({
1229
1449
  /**
1230
1450
  * The signed transaction as a hex-encoded string.
1231
1451
  */
1232
- transaction: v22.string()
1452
+ transaction: v34.string()
1233
1453
  });
1234
- var stxSignTransactionRequestMessageSchema = v22.object({
1454
+ var stxSignTransactionRequestMessageSchema = v34.object({
1235
1455
  ...rpcRequestMessageSchema.entries,
1236
- ...v22.object({
1237
- method: v22.literal(stxSignTransactionMethodName),
1456
+ ...v34.object({
1457
+ method: v34.literal(stxSignTransactionMethodName),
1238
1458
  params: stxSignTransactionParamsSchema,
1239
- id: v22.string()
1459
+ id: v34.string()
1240
1460
  }).entries
1241
1461
  });
1242
1462
 
1243
1463
  // src/request/types/stxMethods/signTransactions.ts
1244
- import * as v23 from "valibot";
1464
+ import * as v35 from "valibot";
1245
1465
  var stxSignTransactionsMethodName = "stx_signTransactions";
1246
- var stxSignTransactionsParamsSchema = v23.object({
1466
+ var stxSignTransactionsParamsSchema = v35.object({
1247
1467
  /**
1248
1468
  * The transactions to sign as hex-encoded strings.
1249
1469
  */
1250
- transactions: v23.pipe(
1251
- v23.array(
1252
- v23.pipe(
1253
- v23.string(),
1254
- v23.check((hex) => {
1470
+ transactions: v35.pipe(
1471
+ v35.array(
1472
+ v35.pipe(
1473
+ v35.string(),
1474
+ v35.check((hex) => {
1255
1475
  return true;
1256
1476
  }, "Invalid hex-encoded Stacks transaction.")
1257
1477
  )
1258
1478
  ),
1259
- v23.minLength(1)
1479
+ v35.minLength(1)
1260
1480
  ),
1261
1481
  /**
1262
1482
  * Whether the signed transactions should be broadcast after signing. Defaults
1263
1483
  * to `true`.
1264
1484
  */
1265
- broadcast: v23.optional(v23.boolean())
1485
+ broadcast: v35.optional(v35.boolean())
1266
1486
  });
1267
- var stxSignTransactionsResultSchema = v23.object({
1487
+ var stxSignTransactionsResultSchema = v35.object({
1268
1488
  /**
1269
1489
  * The signed transactions as hex-encoded strings, in the same order as in the
1270
1490
  * sign request.
1271
1491
  */
1272
- transactions: v23.array(v23.string())
1492
+ transactions: v35.array(v35.string())
1273
1493
  });
1274
- var stxSignTransactionsRequestMessageSchema = v23.object({
1494
+ var stxSignTransactionsRequestMessageSchema = v35.object({
1275
1495
  ...rpcRequestMessageSchema.entries,
1276
- ...v23.object({
1277
- method: v23.literal(stxSignTransactionsMethodName),
1496
+ ...v35.object({
1497
+ method: v35.literal(stxSignTransactionsMethodName),
1278
1498
  params: stxSignTransactionsParamsSchema,
1279
- id: v23.string()
1499
+ id: v35.string()
1280
1500
  }).entries
1281
1501
  });
1282
1502
 
1283
1503
  // src/request/types/stxMethods/transferStx.ts
1284
- import * as v24 from "valibot";
1504
+ import * as v36 from "valibot";
1285
1505
  var stxTransferStxMethodName = "stx_transferStx";
1286
- var stxTransferStxParamsSchema = v24.object({
1506
+ var stxTransferStxParamsSchema = v36.object({
1287
1507
  /**
1288
1508
  * Amount of STX tokens to transfer in microstacks as a string. Anything
1289
1509
  * parseable by `BigInt` is acceptable.
@@ -1296,23 +1516,23 @@ var stxTransferStxParamsSchema = v24.object({
1296
1516
  * const amount3 = '1234';
1297
1517
  * ```
1298
1518
  */
1299
- amount: v24.union([v24.number(), v24.string()]),
1519
+ amount: v36.union([v36.number(), v36.string()]),
1300
1520
  /**
1301
1521
  * The recipient's principal.
1302
1522
  */
1303
- recipient: v24.string(),
1523
+ recipient: v36.string(),
1304
1524
  /**
1305
1525
  * A string representing the memo.
1306
1526
  */
1307
- memo: v24.optional(v24.string()),
1527
+ memo: v36.optional(v36.string()),
1308
1528
  /**
1309
1529
  * Version of parameter format.
1310
1530
  */
1311
- version: v24.optional(v24.string()),
1531
+ version: v36.optional(v36.string()),
1312
1532
  /**
1313
1533
  * The mode of the post conditions.
1314
1534
  */
1315
- postConditionMode: v24.optional(v24.number()),
1535
+ postConditionMode: v36.optional(v36.number()),
1316
1536
  /**
1317
1537
  * A hex-encoded string representing the post conditions.
1318
1538
  *
@@ -1325,29 +1545,29 @@ var stxTransferStxParamsSchema = v24.object({
1325
1545
  * const hexPostCondition = serializePostCondition(postCondition).toString('hex');
1326
1546
  * ```
1327
1547
  */
1328
- postConditions: v24.optional(v24.array(v24.string())),
1548
+ postConditions: v36.optional(v36.array(v36.string())),
1329
1549
  /**
1330
1550
  * The public key to sign the transaction with. The wallet may use any key
1331
1551
  * when not provided.
1332
1552
  */
1333
- pubkey: v24.optional(v24.string())
1553
+ pubkey: v36.optional(v36.string())
1334
1554
  });
1335
- var stxTransferStxResultSchema = v24.object({
1555
+ var stxTransferStxResultSchema = v36.object({
1336
1556
  /**
1337
1557
  * The ID of the transaction.
1338
1558
  */
1339
- txid: v24.string(),
1559
+ txid: v36.string(),
1340
1560
  /**
1341
1561
  * A Stacks transaction as a hex-encoded string.
1342
1562
  */
1343
- transaction: v24.string()
1563
+ transaction: v36.string()
1344
1564
  });
1345
- var stxTransferStxRequestMessageSchema = v24.object({
1565
+ var stxTransferStxRequestMessageSchema = v36.object({
1346
1566
  ...rpcRequestMessageSchema.entries,
1347
- ...v24.object({
1348
- method: v24.literal(stxTransferStxMethodName),
1567
+ ...v36.object({
1568
+ method: v36.literal(stxTransferStxMethodName),
1349
1569
  params: stxTransferStxParamsSchema,
1350
- id: v24.string()
1570
+ id: v36.string()
1351
1571
  }).entries
1352
1572
  });
1353
1573
 
@@ -1355,13 +1575,13 @@ var stxTransferStxRequestMessageSchema = v24.object({
1355
1575
  var cache = {};
1356
1576
  var requestInternal = async (provider, method, params) => {
1357
1577
  const response = await provider.request(method, params);
1358
- if (v25.is(rpcErrorResponseMessageSchema, response)) {
1578
+ if (v37.is(rpcErrorResponseMessageSchema, response)) {
1359
1579
  return {
1360
1580
  status: "error",
1361
1581
  error: response.error
1362
1582
  };
1363
1583
  }
1364
- if (v25.is(rpcSuccessResponseMessageSchema, response)) {
1584
+ if (v37.is(rpcSuccessResponseMessageSchema, response)) {
1365
1585
  return {
1366
1586
  status: "success",
1367
1587
  result: response.result
@@ -2549,6 +2769,26 @@ export {
2549
2769
  signPsbtRequestMessageSchema,
2550
2770
  signPsbtResultSchema,
2551
2771
  signTransaction,
2772
+ sparkFlashnetAddLiquidityIntentSchema,
2773
+ sparkFlashnetClawbackIntentSchema,
2774
+ sparkFlashnetConfirmInitialDepositIntentSchema,
2775
+ sparkFlashnetCreateConstantProductPoolIntentSchema,
2776
+ sparkFlashnetCreateSingleSidedPoolIntentSchema,
2777
+ sparkFlashnetGetJwtMethodName,
2778
+ sparkFlashnetGetJwtParamsSchema,
2779
+ sparkFlashnetGetJwtRequestMessageSchema,
2780
+ sparkFlashnetGetJwtResultSchema,
2781
+ sparkFlashnetRemoveLiquidityIntentSchema,
2782
+ sparkFlashnetRouteSwapIntentSchema,
2783
+ sparkFlashnetSignIntentMethodName,
2784
+ sparkFlashnetSignIntentParamsSchema,
2785
+ sparkFlashnetSignIntentRequestMessageSchema,
2786
+ sparkFlashnetSignIntentResultSchema,
2787
+ sparkFlashnetSignStructuredMessageMethodName,
2788
+ sparkFlashnetSignStructuredMessageParamsSchema,
2789
+ sparkFlashnetSignStructuredMessageRequestMessageSchema,
2790
+ sparkFlashnetSignStructuredMessageResultSchema,
2791
+ sparkFlashnetSwapIntentSchema,
2552
2792
  sparkGetAddressesMethodName,
2553
2793
  sparkGetAddressesParamsSchema,
2554
2794
  sparkGetAddressesRequestMessageSchema,
@@ -2557,6 +2797,10 @@ export {
2557
2797
  sparkGetBalanceParamsSchema,
2558
2798
  sparkGetBalanceRequestMessageSchema,
2559
2799
  sparkGetBalanceResultSchema,
2800
+ sparkSignMessageMethodName,
2801
+ sparkSignMessageParamsSchema,
2802
+ sparkSignMessageRequestMessageSchema,
2803
+ sparkSignMessageResultSchema,
2560
2804
  sparkTransferMethodName,
2561
2805
  sparkTransferParamsSchema,
2562
2806
  sparkTransferRequestMessageSchema,