@sats-connect/core 0.8.0 → 0.8.1-17b18cb

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.js CHANGED
@@ -172,6 +172,22 @@ __export(index_exports, {
172
172
  signPsbtRequestMessageSchema: () => signPsbtRequestMessageSchema,
173
173
  signPsbtResultSchema: () => signPsbtResultSchema,
174
174
  signTransaction: () => signTransaction,
175
+ sparkFlashnetAddLiquidityIntentSchema: () => sparkFlashnetAddLiquidityIntentSchema,
176
+ sparkFlashnetClawbackIntentSchema: () => sparkFlashnetClawbackIntentSchema,
177
+ sparkFlashnetConfirmInitialDepositIntentSchema: () => sparkFlashnetConfirmInitialDepositIntentSchema,
178
+ sparkFlashnetCreateConstantProductPoolIntentSchema: () => sparkFlashnetCreateConstantProductPoolIntentSchema,
179
+ sparkFlashnetCreateSingleSidedPoolIntentSchema: () => sparkFlashnetCreateSingleSidedPoolIntentSchema,
180
+ sparkFlashnetGetJwtMethodName: () => sparkFlashnetGetJwtMethodName,
181
+ sparkFlashnetGetJwtParamsSchema: () => sparkFlashnetGetJwtParamsSchema,
182
+ sparkFlashnetGetJwtRequestMessageSchema: () => sparkFlashnetGetJwtRequestMessageSchema,
183
+ sparkFlashnetGetJwtResultSchema: () => sparkFlashnetGetJwtResultSchema,
184
+ sparkFlashnetRemoveLiquidityIntentSchema: () => sparkFlashnetRemoveLiquidityIntentSchema,
185
+ sparkFlashnetRouteSwapIntentSchema: () => sparkFlashnetRouteSwapIntentSchema,
186
+ sparkFlashnetSignIntentMethodName: () => sparkFlashnetSignIntentMethodName,
187
+ sparkFlashnetSignIntentParamsSchema: () => sparkFlashnetSignIntentParamsSchema,
188
+ sparkFlashnetSignIntentRequestMessageSchema: () => sparkFlashnetSignIntentRequestMessageSchema,
189
+ sparkFlashnetSignIntentResultSchema: () => sparkFlashnetSignIntentResultSchema,
190
+ sparkFlashnetSwapIntentSchema: () => sparkFlashnetSwapIntentSchema,
175
191
  sparkGetAddressesMethodName: () => sparkGetAddressesMethodName,
176
192
  sparkGetAddressesParamsSchema: () => sparkGetAddressesParamsSchema,
177
193
  sparkGetAddressesRequestMessageSchema: () => sparkGetAddressesRequestMessageSchema,
@@ -426,7 +442,7 @@ function getSupportedWallets() {
426
442
  }
427
443
 
428
444
  // src/request/index.ts
429
- var v25 = __toESM(require("valibot"));
445
+ var v35 = __toESM(require("valibot"));
430
446
 
431
447
  // src/request/types/btcMethods.ts
432
448
  var v6 = __toESM(require("valibot"));
@@ -1039,146 +1055,319 @@ var runesTransferRequestMessageSchema = v11.object({
1039
1055
  }).entries
1040
1056
  });
1041
1057
 
1042
- // src/request/types/sparkMethods/getAddresses.ts
1058
+ // src/request/types/sparkMethods/flashnetMethods/getJwt.ts
1043
1059
  var v12 = __toESM(require("valibot"));
1060
+ var sparkFlashnetGetJwtMethodName = "spark_flashnet_getJwt";
1061
+ var sparkFlashnetGetJwtParamsSchema = v12.null();
1062
+ var sparkFlashnetGetJwtResultSchema = v12.object({
1063
+ /**
1064
+ * The JWT token for authenticated requests to the Flashnet API.
1065
+ */
1066
+ jwt: v12.string()
1067
+ });
1068
+ var sparkFlashnetGetJwtRequestMessageSchema = v12.object({
1069
+ ...rpcRequestMessageSchema.entries,
1070
+ ...v12.object({
1071
+ method: v12.literal(sparkFlashnetGetJwtMethodName),
1072
+ params: sparkFlashnetGetJwtParamsSchema,
1073
+ id: v12.string()
1074
+ }).entries
1075
+ });
1076
+
1077
+ // src/request/types/sparkMethods/flashnetMethods/intents/addLiquidity.ts
1078
+ var v13 = __toESM(require("valibot"));
1079
+ var sparkFlashnetAddLiquidityIntentSchema = v13.object({
1080
+ type: v13.literal("addLiquidity"),
1081
+ data: v13.object({
1082
+ userPublicKey: v13.string(),
1083
+ poolId: v13.string(),
1084
+ assetAAmount: v13.string(),
1085
+ assetBAmount: v13.string(),
1086
+ assetAMinAmountIn: v13.string(),
1087
+ assetBMinAmountIn: v13.string(),
1088
+ assetATransferId: v13.string(),
1089
+ assetBTransferId: v13.string(),
1090
+ nonce: v13.string()
1091
+ })
1092
+ });
1093
+
1094
+ // src/request/types/sparkMethods/flashnetMethods/intents/clawback.ts
1095
+ var v14 = __toESM(require("valibot"));
1096
+ var sparkFlashnetClawbackIntentSchema = v14.object({
1097
+ type: v14.literal("clawback"),
1098
+ data: v14.object({
1099
+ senderPublicKey: v14.string(),
1100
+ sparkTransferId: v14.string(),
1101
+ lpIdentityPublicKey: v14.string(),
1102
+ nonce: v14.string()
1103
+ })
1104
+ });
1105
+
1106
+ // src/request/types/sparkMethods/flashnetMethods/intents/confirmInitialDeposit.ts
1107
+ var v15 = __toESM(require("valibot"));
1108
+ var sparkFlashnetConfirmInitialDepositIntentSchema = v15.object({
1109
+ type: v15.literal("confirmInitialDeposit"),
1110
+ data: v15.object({
1111
+ poolId: v15.string(),
1112
+ assetASparkTransferId: v15.string(),
1113
+ poolOwnerPublicKey: v15.string(),
1114
+ nonce: v15.string()
1115
+ })
1116
+ });
1117
+
1118
+ // src/request/types/sparkMethods/flashnetMethods/intents/createConstantProductPool.ts
1119
+ var v16 = __toESM(require("valibot"));
1120
+ var sparkFlashnetCreateConstantProductPoolIntentSchema = v16.object({
1121
+ type: v16.literal("createConstantProductPool"),
1122
+ data: v16.object({
1123
+ poolOwnerPublicKey: v16.string(),
1124
+ assetAAddress: v16.string(),
1125
+ assetBAddress: v16.string(),
1126
+ lpFeeRateBps: v16.number(),
1127
+ totalHostFeeRateBps: v16.number(),
1128
+ nonce: v16.string()
1129
+ })
1130
+ });
1131
+
1132
+ // src/request/types/sparkMethods/flashnetMethods/intents/createSingleSidedPool.ts
1133
+ var v17 = __toESM(require("valibot"));
1134
+ var sparkFlashnetCreateSingleSidedPoolIntentSchema = v17.object({
1135
+ type: v17.literal("createSingleSidedPool"),
1136
+ data: v17.object({
1137
+ assetAAddress: v17.string(),
1138
+ assetBAddress: v17.string(),
1139
+ assetAInitialReserve: v17.string(),
1140
+ virtualReserveA: v17.union([v17.number(), v17.string()]),
1141
+ virtualReserveB: v17.union([v17.number(), v17.string()]),
1142
+ threshold: v17.union([v17.number(), v17.string()]),
1143
+ lpFeeRateBps: v17.number(),
1144
+ totalHostFeeRateBps: v17.number(),
1145
+ poolOwnerPublicKey: v17.string(),
1146
+ nonce: v17.string()
1147
+ })
1148
+ });
1149
+
1150
+ // src/request/types/sparkMethods/flashnetMethods/intents/removeLiquidity.ts
1151
+ var v18 = __toESM(require("valibot"));
1152
+ var sparkFlashnetRemoveLiquidityIntentSchema = v18.object({
1153
+ type: v18.literal("removeLiquidity"),
1154
+ data: v18.object({
1155
+ userPublicKey: v18.string(),
1156
+ poolId: v18.string(),
1157
+ lpTokensToRemove: v18.string(),
1158
+ nonce: v18.string()
1159
+ })
1160
+ });
1161
+
1162
+ // src/request/types/sparkMethods/flashnetMethods/intents/routeSwap.ts
1163
+ var v19 = __toESM(require("valibot"));
1164
+ var sparkFlashnetRouteSwapIntentSchema = v19.object({
1165
+ type: v19.literal("executeRouteSwap"),
1166
+ data: v19.object({
1167
+ userPublicKey: v19.string(),
1168
+ initialSparkTransferId: v19.string(),
1169
+ hops: v19.array(
1170
+ v19.object({
1171
+ poolId: v19.string(),
1172
+ inputAssetAddress: v19.string(),
1173
+ outputAssetAddress: v19.string(),
1174
+ hopIntegratorFeeRateBps: v19.optional(v19.number())
1175
+ })
1176
+ ),
1177
+ inputAmount: v19.string(),
1178
+ maxRouteSlippageBps: v19.number(),
1179
+ minAmountOut: v19.string(),
1180
+ defaultIntegratorFeeRateBps: v19.optional(v19.number()),
1181
+ nonce: v19.string()
1182
+ })
1183
+ });
1184
+
1185
+ // src/request/types/sparkMethods/flashnetMethods/intents/swap.ts
1186
+ var v20 = __toESM(require("valibot"));
1187
+ var sparkFlashnetSwapIntentSchema = v20.object({
1188
+ type: v20.literal("executeSwap"),
1189
+ data: v20.object({
1190
+ userPublicKey: v20.string(),
1191
+ poolId: v20.string(),
1192
+ transferId: v20.string(),
1193
+ assetInAddress: v20.string(),
1194
+ assetOutAddress: v20.string(),
1195
+ amountIn: v20.string(),
1196
+ maxSlippageBps: v20.number(),
1197
+ minAmountOut: v20.string(),
1198
+ totalIntegratorFeeRateBps: v20.optional(v20.number()),
1199
+ nonce: v20.string()
1200
+ })
1201
+ });
1202
+
1203
+ // src/request/types/sparkMethods/flashnetMethods/signIntent.ts
1204
+ var v21 = __toESM(require("valibot"));
1205
+ var sparkFlashnetSignIntentMethodName = "spark_flashnet_signIntent";
1206
+ var sparkFlashnetSignIntentParamsSchema = v21.union([
1207
+ sparkFlashnetSwapIntentSchema,
1208
+ sparkFlashnetRouteSwapIntentSchema,
1209
+ sparkFlashnetAddLiquidityIntentSchema,
1210
+ sparkFlashnetClawbackIntentSchema,
1211
+ sparkFlashnetConfirmInitialDepositIntentSchema,
1212
+ sparkFlashnetCreateConstantProductPoolIntentSchema,
1213
+ sparkFlashnetCreateSingleSidedPoolIntentSchema,
1214
+ sparkFlashnetRemoveLiquidityIntentSchema
1215
+ ]);
1216
+ var sparkFlashnetSignIntentResultSchema = v21.object({
1217
+ /**
1218
+ * The signed intent as a hex string.
1219
+ */
1220
+ signature: v21.string()
1221
+ });
1222
+ var sparkFlashnetSignIntentRequestMessageSchema = v21.object({
1223
+ ...rpcRequestMessageSchema.entries,
1224
+ ...v21.object({
1225
+ method: v21.literal(sparkFlashnetSignIntentMethodName),
1226
+ params: sparkFlashnetSignIntentParamsSchema,
1227
+ id: v21.string()
1228
+ }).entries
1229
+ });
1230
+
1231
+ // src/request/types/sparkMethods/getAddresses.ts
1232
+ var v22 = __toESM(require("valibot"));
1044
1233
  var sparkGetAddressesMethodName = "spark_getAddresses";
1045
- var sparkGetAddressesParamsSchema = v12.nullish(
1046
- v12.object({
1234
+ var sparkGetAddressesParamsSchema = v22.nullish(
1235
+ v22.object({
1047
1236
  /**
1048
1237
  * A message to be displayed to the user in the request prompt.
1049
1238
  */
1050
- message: v12.optional(v12.string())
1239
+ message: v22.optional(v22.string())
1051
1240
  })
1052
1241
  );
1053
- var sparkGetAddressesResultSchema = v12.object({
1242
+ var sparkGetAddressesResultSchema = v22.object({
1054
1243
  /**
1055
1244
  * The addresses generated for the given purposes.
1056
1245
  */
1057
- addresses: v12.array(addressSchema),
1246
+ addresses: v22.array(addressSchema),
1058
1247
  network: getNetworkResultSchema
1059
1248
  });
1060
- var sparkGetAddressesRequestMessageSchema = v12.object({
1249
+ var sparkGetAddressesRequestMessageSchema = v22.object({
1061
1250
  ...rpcRequestMessageSchema.entries,
1062
- ...v12.object({
1063
- method: v12.literal(sparkGetAddressesMethodName),
1251
+ ...v22.object({
1252
+ method: v22.literal(sparkGetAddressesMethodName),
1064
1253
  params: sparkGetAddressesParamsSchema,
1065
- id: v12.string()
1254
+ id: v22.string()
1066
1255
  }).entries
1067
1256
  });
1068
1257
 
1069
1258
  // src/request/types/sparkMethods/getBalance.ts
1070
- var v13 = __toESM(require("valibot"));
1259
+ var v23 = __toESM(require("valibot"));
1071
1260
  var sparkGetBalanceMethodName = "spark_getBalance";
1072
- var sparkGetBalanceParamsSchema = v13.nullish(v13.null());
1073
- var sparkGetBalanceResultSchema = v13.object({
1261
+ var sparkGetBalanceParamsSchema = v23.nullish(v23.null());
1262
+ var sparkGetBalanceResultSchema = v23.object({
1074
1263
  /**
1075
1264
  * The Spark Bitcoin address balance in sats in string form.
1076
1265
  */
1077
- balance: v13.string(),
1078
- tokenBalances: v13.array(
1079
- v13.object({
1266
+ balance: v23.string(),
1267
+ tokenBalances: v23.array(
1268
+ v23.object({
1080
1269
  /* The address balance of the token in string form as it can overflow a js number */
1081
- balance: v13.string(),
1082
- tokenMetadata: v13.object({
1083
- tokenIdentifier: v13.string(),
1084
- tokenName: v13.string(),
1085
- tokenTicker: v13.string(),
1086
- decimals: v13.number(),
1087
- maxSupply: v13.string()
1270
+ balance: v23.string(),
1271
+ tokenMetadata: v23.object({
1272
+ tokenIdentifier: v23.string(),
1273
+ tokenName: v23.string(),
1274
+ tokenTicker: v23.string(),
1275
+ decimals: v23.number(),
1276
+ maxSupply: v23.string()
1088
1277
  })
1089
1278
  })
1090
1279
  )
1091
1280
  });
1092
- var sparkGetBalanceRequestMessageSchema = v13.object({
1281
+ var sparkGetBalanceRequestMessageSchema = v23.object({
1093
1282
  ...rpcRequestMessageSchema.entries,
1094
- ...v13.object({
1095
- method: v13.literal(sparkGetBalanceMethodName),
1283
+ ...v23.object({
1284
+ method: v23.literal(sparkGetBalanceMethodName),
1096
1285
  params: sparkGetBalanceParamsSchema,
1097
- id: v13.string()
1286
+ id: v23.string()
1098
1287
  }).entries
1099
1288
  });
1100
1289
 
1101
1290
  // src/request/types/sparkMethods/transfer.ts
1102
- var v14 = __toESM(require("valibot"));
1291
+ var v24 = __toESM(require("valibot"));
1103
1292
  var sparkTransferMethodName = "spark_transfer";
1104
- var sparkTransferParamsSchema = v14.object({
1293
+ var sparkTransferParamsSchema = v24.object({
1105
1294
  /**
1106
1295
  * Amount of SATS to transfer as a string or number.
1107
1296
  */
1108
- amountSats: v14.union([v14.number(), v14.string()]),
1297
+ amountSats: v24.union([v24.number(), v24.string()]),
1109
1298
  /**
1110
1299
  * The recipient's spark address.
1111
1300
  */
1112
- receiverSparkAddress: v14.string()
1301
+ receiverSparkAddress: v24.string()
1113
1302
  });
1114
- var sparkTransferResultSchema = v14.object({
1303
+ var sparkTransferResultSchema = v24.object({
1115
1304
  /**
1116
1305
  * The ID of the transaction.
1117
1306
  */
1118
- id: v14.string()
1307
+ id: v24.string()
1119
1308
  });
1120
- var sparkTransferRequestMessageSchema = v14.object({
1309
+ var sparkTransferRequestMessageSchema = v24.object({
1121
1310
  ...rpcRequestMessageSchema.entries,
1122
- ...v14.object({
1123
- method: v14.literal(sparkTransferMethodName),
1311
+ ...v24.object({
1312
+ method: v24.literal(sparkTransferMethodName),
1124
1313
  params: sparkTransferParamsSchema,
1125
- id: v14.string()
1314
+ id: v24.string()
1126
1315
  }).entries
1127
1316
  });
1128
1317
 
1129
1318
  // src/request/types/sparkMethods/transferToken.ts
1130
- var v15 = __toESM(require("valibot"));
1319
+ var v25 = __toESM(require("valibot"));
1131
1320
  var sparkTransferTokenMethodName = "spark_transferToken";
1132
- var sparkTransferTokenParamsSchema = v15.object({
1321
+ var sparkTransferTokenParamsSchema = v25.object({
1133
1322
  /**
1134
1323
  * Amount of units of the token to transfer as a string or number.
1135
1324
  */
1136
- tokenAmount: v15.union([v15.number(), v15.string()]),
1325
+ tokenAmount: v25.union([v25.number(), v25.string()]),
1137
1326
  /**
1138
1327
  * The Bech32m token identifier.
1139
1328
  */
1140
- tokenIdentifier: v15.string(),
1329
+ tokenIdentifier: v25.string(),
1141
1330
  /**
1142
1331
  * The recipient's spark address.
1143
1332
  */
1144
- receiverSparkAddress: v15.string()
1333
+ receiverSparkAddress: v25.string()
1145
1334
  });
1146
- var sparkTransferTokenResultSchema = v15.object({
1335
+ var sparkTransferTokenResultSchema = v25.object({
1147
1336
  /**
1148
1337
  * The ID of the transaction.
1149
1338
  */
1150
- id: v15.string()
1339
+ id: v25.string()
1151
1340
  });
1152
- var sparkTransferTokenRequestMessageSchema = v15.object({
1341
+ var sparkTransferTokenRequestMessageSchema = v25.object({
1153
1342
  ...rpcRequestMessageSchema.entries,
1154
- ...v15.object({
1155
- method: v15.literal(sparkTransferTokenMethodName),
1343
+ ...v25.object({
1344
+ method: v25.literal(sparkTransferTokenMethodName),
1156
1345
  params: sparkTransferTokenParamsSchema,
1157
- id: v15.string()
1346
+ id: v25.string()
1158
1347
  }).entries
1159
1348
  });
1160
1349
 
1161
1350
  // src/request/types/stxMethods/callContract.ts
1162
- var v16 = __toESM(require("valibot"));
1351
+ var v26 = __toESM(require("valibot"));
1163
1352
  var stxCallContractMethodName = "stx_callContract";
1164
- var stxCallContractParamsSchema = v16.object({
1353
+ var stxCallContractParamsSchema = v26.object({
1165
1354
  /**
1166
1355
  * The contract principal.
1167
1356
  *
1168
1357
  * E.g. `"SPKE...GD5C.my-contract"`
1169
1358
  */
1170
- contract: v16.string(),
1359
+ contract: v26.string(),
1171
1360
  /**
1172
1361
  * The name of the function to call.
1173
1362
  *
1174
1363
  * Note: spec changes ongoing,
1175
1364
  * https://github.com/stacksgov/sips/pull/166#pullrequestreview-1914236999
1176
1365
  */
1177
- functionName: v16.string(),
1366
+ functionName: v26.string(),
1178
1367
  /**
1179
1368
  * @deprecated in favor of `functionArgs` for @stacks/connect compatibility
1180
1369
  */
1181
- arguments: v16.optional(v16.array(v16.string())),
1370
+ arguments: v26.optional(v26.array(v26.string())),
1182
1371
  /**
1183
1372
  * The function's arguments. The arguments are expected to be hex-encoded
1184
1373
  * strings of Clarity values.
@@ -1193,274 +1382,274 @@ var stxCallContractParamsSchema = v16.object({
1193
1382
  * const hexArgs = functionArgs.map(cvToHex);
1194
1383
  * ```
1195
1384
  */
1196
- functionArgs: v16.optional(v16.array(v16.string())),
1385
+ functionArgs: v26.optional(v26.array(v26.string())),
1197
1386
  /**
1198
1387
  * The post conditions to apply to the contract call.
1199
1388
  */
1200
- postConditions: v16.optional(v16.array(v16.string())),
1389
+ postConditions: v26.optional(v26.array(v26.string())),
1201
1390
  /**
1202
1391
  * The mode to apply to the post conditions.
1203
1392
  */
1204
- postConditionMode: v16.optional(v16.union([v16.literal("allow"), v16.literal("deny")]))
1393
+ postConditionMode: v26.optional(v26.union([v26.literal("allow"), v26.literal("deny")]))
1205
1394
  });
1206
- var stxCallContractResultSchema = v16.object({
1395
+ var stxCallContractResultSchema = v26.object({
1207
1396
  /**
1208
1397
  * The ID of the transaction.
1209
1398
  */
1210
- txid: v16.string(),
1399
+ txid: v26.string(),
1211
1400
  /**
1212
1401
  * A Stacks transaction as a hex-encoded string.
1213
1402
  */
1214
- transaction: v16.string()
1403
+ transaction: v26.string()
1215
1404
  });
1216
- var stxCallContractRequestMessageSchema = v16.object({
1405
+ var stxCallContractRequestMessageSchema = v26.object({
1217
1406
  ...rpcRequestMessageSchema.entries,
1218
- ...v16.object({
1219
- method: v16.literal(stxCallContractMethodName),
1407
+ ...v26.object({
1408
+ method: v26.literal(stxCallContractMethodName),
1220
1409
  params: stxCallContractParamsSchema,
1221
- id: v16.string()
1410
+ id: v26.string()
1222
1411
  }).entries
1223
1412
  });
1224
1413
 
1225
1414
  // src/request/types/stxMethods/deployContract.ts
1226
- var v17 = __toESM(require("valibot"));
1415
+ var v27 = __toESM(require("valibot"));
1227
1416
  var stxDeployContractMethodName = "stx_deployContract";
1228
- var stxDeployContractParamsSchema = v17.object({
1417
+ var stxDeployContractParamsSchema = v27.object({
1229
1418
  /**
1230
1419
  * Name of the contract.
1231
1420
  */
1232
- name: v17.string(),
1421
+ name: v27.string(),
1233
1422
  /**
1234
1423
  * The source code of the Clarity contract.
1235
1424
  */
1236
- clarityCode: v17.string(),
1425
+ clarityCode: v27.string(),
1237
1426
  /**
1238
1427
  * The version of the Clarity contract.
1239
1428
  */
1240
- clarityVersion: v17.optional(v17.number()),
1429
+ clarityVersion: v27.optional(v27.number()),
1241
1430
  /**
1242
1431
  * The post conditions to apply to the contract call.
1243
1432
  */
1244
- postConditions: v17.optional(v17.array(v17.string())),
1433
+ postConditions: v27.optional(v27.array(v27.string())),
1245
1434
  /**
1246
1435
  * The mode to apply to the post conditions.
1247
1436
  */
1248
- postConditionMode: v17.optional(v17.union([v17.literal("allow"), v17.literal("deny")]))
1437
+ postConditionMode: v27.optional(v27.union([v27.literal("allow"), v27.literal("deny")]))
1249
1438
  });
1250
- var stxDeployContractResultSchema = v17.object({
1439
+ var stxDeployContractResultSchema = v27.object({
1251
1440
  /**
1252
1441
  * The ID of the transaction.
1253
1442
  */
1254
- txid: v17.string(),
1443
+ txid: v27.string(),
1255
1444
  /**
1256
1445
  * A Stacks transaction as a hex-encoded string.
1257
1446
  */
1258
- transaction: v17.string()
1447
+ transaction: v27.string()
1259
1448
  });
1260
- var stxDeployContractRequestMessageSchema = v17.object({
1449
+ var stxDeployContractRequestMessageSchema = v27.object({
1261
1450
  ...rpcRequestMessageSchema.entries,
1262
- ...v17.object({
1263
- method: v17.literal(stxDeployContractMethodName),
1451
+ ...v27.object({
1452
+ method: v27.literal(stxDeployContractMethodName),
1264
1453
  params: stxDeployContractParamsSchema,
1265
- id: v17.string()
1454
+ id: v27.string()
1266
1455
  }).entries
1267
1456
  });
1268
1457
 
1269
1458
  // src/request/types/stxMethods/getAccounts.ts
1270
- var v18 = __toESM(require("valibot"));
1459
+ var v28 = __toESM(require("valibot"));
1271
1460
  var stxGetAccountsMethodName = "stx_getAccounts";
1272
- var stxGetAccountsParamsSchema = v18.nullish(v18.null());
1273
- var stxGetAccountsResultSchema = v18.object({
1461
+ var stxGetAccountsParamsSchema = v28.nullish(v28.null());
1462
+ var stxGetAccountsResultSchema = v28.object({
1274
1463
  /**
1275
1464
  * The addresses generated for the given purposes.
1276
1465
  */
1277
- addresses: v18.array(
1278
- v18.object({
1279
- address: v18.string(),
1280
- publicKey: v18.string(),
1281
- gaiaHubUrl: v18.string(),
1282
- gaiaAppKey: v18.string()
1466
+ addresses: v28.array(
1467
+ v28.object({
1468
+ address: v28.string(),
1469
+ publicKey: v28.string(),
1470
+ gaiaHubUrl: v28.string(),
1471
+ gaiaAppKey: v28.string()
1283
1472
  })
1284
1473
  ),
1285
1474
  network: getNetworkResultSchema
1286
1475
  });
1287
- var stxGetAccountsRequestMessageSchema = v18.object({
1476
+ var stxGetAccountsRequestMessageSchema = v28.object({
1288
1477
  ...rpcRequestMessageSchema.entries,
1289
- ...v18.object({
1290
- method: v18.literal(stxGetAccountsMethodName),
1478
+ ...v28.object({
1479
+ method: v28.literal(stxGetAccountsMethodName),
1291
1480
  params: stxGetAccountsParamsSchema,
1292
- id: v18.string()
1481
+ id: v28.string()
1293
1482
  }).entries
1294
1483
  });
1295
1484
 
1296
1485
  // src/request/types/stxMethods/getAddresses.ts
1297
- var v19 = __toESM(require("valibot"));
1486
+ var v29 = __toESM(require("valibot"));
1298
1487
  var stxGetAddressesMethodName = "stx_getAddresses";
1299
- var stxGetAddressesParamsSchema = v19.nullish(
1300
- v19.object({
1488
+ var stxGetAddressesParamsSchema = v29.nullish(
1489
+ v29.object({
1301
1490
  /**
1302
1491
  * A message to be displayed to the user in the request prompt.
1303
1492
  */
1304
- message: v19.optional(v19.string())
1493
+ message: v29.optional(v29.string())
1305
1494
  })
1306
1495
  );
1307
- var stxGetAddressesResultSchema = v19.object({
1496
+ var stxGetAddressesResultSchema = v29.object({
1308
1497
  /**
1309
1498
  * The addresses generated for the given purposes.
1310
1499
  */
1311
- addresses: v19.array(addressSchema),
1500
+ addresses: v29.array(addressSchema),
1312
1501
  network: getNetworkResultSchema
1313
1502
  });
1314
- var stxGetAddressesRequestMessageSchema = v19.object({
1503
+ var stxGetAddressesRequestMessageSchema = v29.object({
1315
1504
  ...rpcRequestMessageSchema.entries,
1316
- ...v19.object({
1317
- method: v19.literal(stxGetAddressesMethodName),
1505
+ ...v29.object({
1506
+ method: v29.literal(stxGetAddressesMethodName),
1318
1507
  params: stxGetAddressesParamsSchema,
1319
- id: v19.string()
1508
+ id: v29.string()
1320
1509
  }).entries
1321
1510
  });
1322
1511
 
1323
1512
  // src/request/types/stxMethods/signMessage.ts
1324
- var v20 = __toESM(require("valibot"));
1513
+ var v30 = __toESM(require("valibot"));
1325
1514
  var stxSignMessageMethodName = "stx_signMessage";
1326
- var stxSignMessageParamsSchema = v20.object({
1515
+ var stxSignMessageParamsSchema = v30.object({
1327
1516
  /**
1328
1517
  * The message to sign.
1329
1518
  */
1330
- message: v20.string()
1519
+ message: v30.string()
1331
1520
  });
1332
- var stxSignMessageResultSchema = v20.object({
1521
+ var stxSignMessageResultSchema = v30.object({
1333
1522
  /**
1334
1523
  * The signature of the message.
1335
1524
  */
1336
- signature: v20.string(),
1525
+ signature: v30.string(),
1337
1526
  /**
1338
1527
  * The public key used to sign the message.
1339
1528
  */
1340
- publicKey: v20.string()
1529
+ publicKey: v30.string()
1341
1530
  });
1342
- var stxSignMessageRequestMessageSchema = v20.object({
1531
+ var stxSignMessageRequestMessageSchema = v30.object({
1343
1532
  ...rpcRequestMessageSchema.entries,
1344
- ...v20.object({
1345
- method: v20.literal(stxSignMessageMethodName),
1533
+ ...v30.object({
1534
+ method: v30.literal(stxSignMessageMethodName),
1346
1535
  params: stxSignMessageParamsSchema,
1347
- id: v20.string()
1536
+ id: v30.string()
1348
1537
  }).entries
1349
1538
  });
1350
1539
 
1351
1540
  // src/request/types/stxMethods/signStructuredMessage.ts
1352
- var v21 = __toESM(require("valibot"));
1541
+ var v31 = __toESM(require("valibot"));
1353
1542
  var stxSignStructuredMessageMethodName = "stx_signStructuredMessage";
1354
- var stxSignStructuredMessageParamsSchema = v21.object({
1543
+ var stxSignStructuredMessageParamsSchema = v31.object({
1355
1544
  /**
1356
1545
  * The domain to be signed.
1357
1546
  */
1358
- domain: v21.string(),
1547
+ domain: v31.string(),
1359
1548
  /**
1360
1549
  * Message payload to be signed.
1361
1550
  */
1362
- message: v21.string(),
1551
+ message: v31.string(),
1363
1552
  /**
1364
1553
  * The public key to sign the message with.
1365
1554
  */
1366
- publicKey: v21.optional(v21.string())
1555
+ publicKey: v31.optional(v31.string())
1367
1556
  });
1368
- var stxSignStructuredMessageResultSchema = v21.object({
1557
+ var stxSignStructuredMessageResultSchema = v31.object({
1369
1558
  /**
1370
1559
  * Signature of the message.
1371
1560
  */
1372
- signature: v21.string(),
1561
+ signature: v31.string(),
1373
1562
  /**
1374
1563
  * Public key as hex-encoded string.
1375
1564
  */
1376
- publicKey: v21.string()
1565
+ publicKey: v31.string()
1377
1566
  });
1378
- var stxSignStructuredMessageRequestMessageSchema = v21.object({
1567
+ var stxSignStructuredMessageRequestMessageSchema = v31.object({
1379
1568
  ...rpcRequestMessageSchema.entries,
1380
- ...v21.object({
1381
- method: v21.literal(stxSignStructuredMessageMethodName),
1569
+ ...v31.object({
1570
+ method: v31.literal(stxSignStructuredMessageMethodName),
1382
1571
  params: stxSignStructuredMessageParamsSchema,
1383
- id: v21.string()
1572
+ id: v31.string()
1384
1573
  }).entries
1385
1574
  });
1386
1575
 
1387
1576
  // src/request/types/stxMethods/signTransaction.ts
1388
- var v22 = __toESM(require("valibot"));
1577
+ var v32 = __toESM(require("valibot"));
1389
1578
  var stxSignTransactionMethodName = "stx_signTransaction";
1390
- var stxSignTransactionParamsSchema = v22.object({
1579
+ var stxSignTransactionParamsSchema = v32.object({
1391
1580
  /**
1392
1581
  * The transaction to sign as a hex-encoded string.
1393
1582
  */
1394
- transaction: v22.string(),
1583
+ transaction: v32.string(),
1395
1584
  /**
1396
1585
  * The public key to sign the transaction with. The wallet may use any key
1397
1586
  * when not provided.
1398
1587
  */
1399
- pubkey: v22.optional(v22.string()),
1588
+ pubkey: v32.optional(v32.string()),
1400
1589
  /**
1401
1590
  * Whether to broadcast the transaction after signing. Defaults to `true`.
1402
1591
  */
1403
- broadcast: v22.optional(v22.boolean())
1592
+ broadcast: v32.optional(v32.boolean())
1404
1593
  });
1405
- var stxSignTransactionResultSchema = v22.object({
1594
+ var stxSignTransactionResultSchema = v32.object({
1406
1595
  /**
1407
1596
  * The signed transaction as a hex-encoded string.
1408
1597
  */
1409
- transaction: v22.string()
1598
+ transaction: v32.string()
1410
1599
  });
1411
- var stxSignTransactionRequestMessageSchema = v22.object({
1600
+ var stxSignTransactionRequestMessageSchema = v32.object({
1412
1601
  ...rpcRequestMessageSchema.entries,
1413
- ...v22.object({
1414
- method: v22.literal(stxSignTransactionMethodName),
1602
+ ...v32.object({
1603
+ method: v32.literal(stxSignTransactionMethodName),
1415
1604
  params: stxSignTransactionParamsSchema,
1416
- id: v22.string()
1605
+ id: v32.string()
1417
1606
  }).entries
1418
1607
  });
1419
1608
 
1420
1609
  // src/request/types/stxMethods/signTransactions.ts
1421
- var v23 = __toESM(require("valibot"));
1610
+ var v33 = __toESM(require("valibot"));
1422
1611
  var stxSignTransactionsMethodName = "stx_signTransactions";
1423
- var stxSignTransactionsParamsSchema = v23.object({
1612
+ var stxSignTransactionsParamsSchema = v33.object({
1424
1613
  /**
1425
1614
  * The transactions to sign as hex-encoded strings.
1426
1615
  */
1427
- transactions: v23.pipe(
1428
- v23.array(
1429
- v23.pipe(
1430
- v23.string(),
1431
- v23.check((hex) => {
1616
+ transactions: v33.pipe(
1617
+ v33.array(
1618
+ v33.pipe(
1619
+ v33.string(),
1620
+ v33.check((hex) => {
1432
1621
  return true;
1433
1622
  }, "Invalid hex-encoded Stacks transaction.")
1434
1623
  )
1435
1624
  ),
1436
- v23.minLength(1)
1625
+ v33.minLength(1)
1437
1626
  ),
1438
1627
  /**
1439
1628
  * Whether the signed transactions should be broadcast after signing. Defaults
1440
1629
  * to `true`.
1441
1630
  */
1442
- broadcast: v23.optional(v23.boolean())
1631
+ broadcast: v33.optional(v33.boolean())
1443
1632
  });
1444
- var stxSignTransactionsResultSchema = v23.object({
1633
+ var stxSignTransactionsResultSchema = v33.object({
1445
1634
  /**
1446
1635
  * The signed transactions as hex-encoded strings, in the same order as in the
1447
1636
  * sign request.
1448
1637
  */
1449
- transactions: v23.array(v23.string())
1638
+ transactions: v33.array(v33.string())
1450
1639
  });
1451
- var stxSignTransactionsRequestMessageSchema = v23.object({
1640
+ var stxSignTransactionsRequestMessageSchema = v33.object({
1452
1641
  ...rpcRequestMessageSchema.entries,
1453
- ...v23.object({
1454
- method: v23.literal(stxSignTransactionsMethodName),
1642
+ ...v33.object({
1643
+ method: v33.literal(stxSignTransactionsMethodName),
1455
1644
  params: stxSignTransactionsParamsSchema,
1456
- id: v23.string()
1645
+ id: v33.string()
1457
1646
  }).entries
1458
1647
  });
1459
1648
 
1460
1649
  // src/request/types/stxMethods/transferStx.ts
1461
- var v24 = __toESM(require("valibot"));
1650
+ var v34 = __toESM(require("valibot"));
1462
1651
  var stxTransferStxMethodName = "stx_transferStx";
1463
- var stxTransferStxParamsSchema = v24.object({
1652
+ var stxTransferStxParamsSchema = v34.object({
1464
1653
  /**
1465
1654
  * Amount of STX tokens to transfer in microstacks as a string. Anything
1466
1655
  * parseable by `BigInt` is acceptable.
@@ -1473,23 +1662,23 @@ var stxTransferStxParamsSchema = v24.object({
1473
1662
  * const amount3 = '1234';
1474
1663
  * ```
1475
1664
  */
1476
- amount: v24.union([v24.number(), v24.string()]),
1665
+ amount: v34.union([v34.number(), v34.string()]),
1477
1666
  /**
1478
1667
  * The recipient's principal.
1479
1668
  */
1480
- recipient: v24.string(),
1669
+ recipient: v34.string(),
1481
1670
  /**
1482
1671
  * A string representing the memo.
1483
1672
  */
1484
- memo: v24.optional(v24.string()),
1673
+ memo: v34.optional(v34.string()),
1485
1674
  /**
1486
1675
  * Version of parameter format.
1487
1676
  */
1488
- version: v24.optional(v24.string()),
1677
+ version: v34.optional(v34.string()),
1489
1678
  /**
1490
1679
  * The mode of the post conditions.
1491
1680
  */
1492
- postConditionMode: v24.optional(v24.number()),
1681
+ postConditionMode: v34.optional(v34.number()),
1493
1682
  /**
1494
1683
  * A hex-encoded string representing the post conditions.
1495
1684
  *
@@ -1502,29 +1691,29 @@ var stxTransferStxParamsSchema = v24.object({
1502
1691
  * const hexPostCondition = serializePostCondition(postCondition).toString('hex');
1503
1692
  * ```
1504
1693
  */
1505
- postConditions: v24.optional(v24.array(v24.string())),
1694
+ postConditions: v34.optional(v34.array(v34.string())),
1506
1695
  /**
1507
1696
  * The public key to sign the transaction with. The wallet may use any key
1508
1697
  * when not provided.
1509
1698
  */
1510
- pubkey: v24.optional(v24.string())
1699
+ pubkey: v34.optional(v34.string())
1511
1700
  });
1512
- var stxTransferStxResultSchema = v24.object({
1701
+ var stxTransferStxResultSchema = v34.object({
1513
1702
  /**
1514
1703
  * The ID of the transaction.
1515
1704
  */
1516
- txid: v24.string(),
1705
+ txid: v34.string(),
1517
1706
  /**
1518
1707
  * A Stacks transaction as a hex-encoded string.
1519
1708
  */
1520
- transaction: v24.string()
1709
+ transaction: v34.string()
1521
1710
  });
1522
- var stxTransferStxRequestMessageSchema = v24.object({
1711
+ var stxTransferStxRequestMessageSchema = v34.object({
1523
1712
  ...rpcRequestMessageSchema.entries,
1524
- ...v24.object({
1525
- method: v24.literal(stxTransferStxMethodName),
1713
+ ...v34.object({
1714
+ method: v34.literal(stxTransferStxMethodName),
1526
1715
  params: stxTransferStxParamsSchema,
1527
- id: v24.string()
1716
+ id: v34.string()
1528
1717
  }).entries
1529
1718
  });
1530
1719
 
@@ -1541,13 +1730,13 @@ var request = async (method, params, providerId) => {
1541
1730
  throw new Error("A wallet method is required");
1542
1731
  }
1543
1732
  const response = await provider.request(method, params);
1544
- if (v25.is(rpcErrorResponseMessageSchema, response)) {
1733
+ if (v35.is(rpcErrorResponseMessageSchema, response)) {
1545
1734
  return {
1546
1735
  status: "error",
1547
1736
  error: response.error
1548
1737
  };
1549
1738
  }
1550
- if (v25.is(rpcSuccessResponseMessageSchema, response)) {
1739
+ if (v35.is(rpcSuccessResponseMessageSchema, response)) {
1551
1740
  return {
1552
1741
  status: "success",
1553
1742
  result: response.result
@@ -2702,6 +2891,22 @@ var signMultipleTransactions = async (options) => {
2702
2891
  signPsbtRequestMessageSchema,
2703
2892
  signPsbtResultSchema,
2704
2893
  signTransaction,
2894
+ sparkFlashnetAddLiquidityIntentSchema,
2895
+ sparkFlashnetClawbackIntentSchema,
2896
+ sparkFlashnetConfirmInitialDepositIntentSchema,
2897
+ sparkFlashnetCreateConstantProductPoolIntentSchema,
2898
+ sparkFlashnetCreateSingleSidedPoolIntentSchema,
2899
+ sparkFlashnetGetJwtMethodName,
2900
+ sparkFlashnetGetJwtParamsSchema,
2901
+ sparkFlashnetGetJwtRequestMessageSchema,
2902
+ sparkFlashnetGetJwtResultSchema,
2903
+ sparkFlashnetRemoveLiquidityIntentSchema,
2904
+ sparkFlashnetRouteSwapIntentSchema,
2905
+ sparkFlashnetSignIntentMethodName,
2906
+ sparkFlashnetSignIntentParamsSchema,
2907
+ sparkFlashnetSignIntentRequestMessageSchema,
2908
+ sparkFlashnetSignIntentResultSchema,
2909
+ sparkFlashnetSwapIntentSchema,
2705
2910
  sparkGetAddressesMethodName,
2706
2911
  sparkGetAddressesParamsSchema,
2707
2912
  sparkGetAddressesRequestMessageSchema,