@sats-connect/core 0.8.2 → 0.9.0

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
@@ -173,6 +173,26 @@ __export(index_exports, {
173
173
  signPsbtRequestMessageSchema: () => signPsbtRequestMessageSchema,
174
174
  signPsbtResultSchema: () => signPsbtResultSchema,
175
175
  signTransaction: () => signTransaction,
176
+ sparkFlashnetAddLiquidityIntentSchema: () => sparkFlashnetAddLiquidityIntentSchema,
177
+ sparkFlashnetClawbackIntentSchema: () => sparkFlashnetClawbackIntentSchema,
178
+ sparkFlashnetConfirmInitialDepositIntentSchema: () => sparkFlashnetConfirmInitialDepositIntentSchema,
179
+ sparkFlashnetCreateConstantProductPoolIntentSchema: () => sparkFlashnetCreateConstantProductPoolIntentSchema,
180
+ sparkFlashnetCreateSingleSidedPoolIntentSchema: () => sparkFlashnetCreateSingleSidedPoolIntentSchema,
181
+ sparkFlashnetGetJwtMethodName: () => sparkFlashnetGetJwtMethodName,
182
+ sparkFlashnetGetJwtParamsSchema: () => sparkFlashnetGetJwtParamsSchema,
183
+ sparkFlashnetGetJwtRequestMessageSchema: () => sparkFlashnetGetJwtRequestMessageSchema,
184
+ sparkFlashnetGetJwtResultSchema: () => sparkFlashnetGetJwtResultSchema,
185
+ sparkFlashnetRemoveLiquidityIntentSchema: () => sparkFlashnetRemoveLiquidityIntentSchema,
186
+ sparkFlashnetRouteSwapIntentSchema: () => sparkFlashnetRouteSwapIntentSchema,
187
+ sparkFlashnetSignIntentMethodName: () => sparkFlashnetSignIntentMethodName,
188
+ sparkFlashnetSignIntentParamsSchema: () => sparkFlashnetSignIntentParamsSchema,
189
+ sparkFlashnetSignIntentRequestMessageSchema: () => sparkFlashnetSignIntentRequestMessageSchema,
190
+ sparkFlashnetSignIntentResultSchema: () => sparkFlashnetSignIntentResultSchema,
191
+ sparkFlashnetSignStructuredMessageMethodName: () => sparkFlashnetSignStructuredMessageMethodName,
192
+ sparkFlashnetSignStructuredMessageParamsSchema: () => sparkFlashnetSignStructuredMessageParamsSchema,
193
+ sparkFlashnetSignStructuredMessageRequestMessageSchema: () => sparkFlashnetSignStructuredMessageRequestMessageSchema,
194
+ sparkFlashnetSignStructuredMessageResultSchema: () => sparkFlashnetSignStructuredMessageResultSchema,
195
+ sparkFlashnetSwapIntentSchema: () => sparkFlashnetSwapIntentSchema,
176
196
  sparkGetAddressesMethodName: () => sparkGetAddressesMethodName,
177
197
  sparkGetAddressesParamsSchema: () => sparkGetAddressesParamsSchema,
178
198
  sparkGetAddressesRequestMessageSchema: () => sparkGetAddressesRequestMessageSchema,
@@ -234,7 +254,7 @@ __export(index_exports, {
234
254
  module.exports = __toCommonJS(index_exports);
235
255
 
236
256
  // src/request/index.ts
237
- var v25 = __toESM(require("valibot"));
257
+ var v36 = __toESM(require("valibot"));
238
258
 
239
259
  // src/provider/types.ts
240
260
  var v4 = __toESM(require("valibot"));
@@ -1097,146 +1117,338 @@ var runesTransferRequestMessageSchema = v11.object({
1097
1117
  }).entries
1098
1118
  });
1099
1119
 
1100
- // src/request/types/sparkMethods/getAddresses.ts
1120
+ // src/request/types/sparkMethods/flashnetMethods/getJwt.ts
1101
1121
  var v12 = __toESM(require("valibot"));
1122
+ var sparkFlashnetGetJwtMethodName = "spark_flashnet_getJwt";
1123
+ var sparkFlashnetGetJwtParamsSchema = v12.null();
1124
+ var sparkFlashnetGetJwtResultSchema = v12.object({
1125
+ /**
1126
+ * The JWT token for authenticated requests to the Flashnet API.
1127
+ */
1128
+ jwt: v12.string()
1129
+ });
1130
+ var sparkFlashnetGetJwtRequestMessageSchema = v12.object({
1131
+ ...rpcRequestMessageSchema.entries,
1132
+ ...v12.object({
1133
+ method: v12.literal(sparkFlashnetGetJwtMethodName),
1134
+ params: sparkFlashnetGetJwtParamsSchema,
1135
+ id: v12.string()
1136
+ }).entries
1137
+ });
1138
+
1139
+ // src/request/types/sparkMethods/flashnetMethods/intents/addLiquidity.ts
1140
+ var v13 = __toESM(require("valibot"));
1141
+ var sparkFlashnetAddLiquidityIntentSchema = v13.object({
1142
+ type: v13.literal("addLiquidity"),
1143
+ data: v13.object({
1144
+ userPublicKey: v13.string(),
1145
+ poolId: v13.string(),
1146
+ assetAAmount: v13.string(),
1147
+ assetBAmount: v13.string(),
1148
+ assetAMinAmountIn: v13.string(),
1149
+ assetBMinAmountIn: v13.string(),
1150
+ assetATransferId: v13.string(),
1151
+ assetBTransferId: v13.string(),
1152
+ nonce: v13.string()
1153
+ })
1154
+ });
1155
+
1156
+ // src/request/types/sparkMethods/flashnetMethods/intents/clawback.ts
1157
+ var v14 = __toESM(require("valibot"));
1158
+ var sparkFlashnetClawbackIntentSchema = v14.object({
1159
+ type: v14.literal("clawback"),
1160
+ data: v14.object({
1161
+ senderPublicKey: v14.string(),
1162
+ sparkTransferId: v14.string(),
1163
+ lpIdentityPublicKey: v14.string(),
1164
+ nonce: v14.string()
1165
+ })
1166
+ });
1167
+
1168
+ // src/request/types/sparkMethods/flashnetMethods/intents/confirmInitialDeposit.ts
1169
+ var v15 = __toESM(require("valibot"));
1170
+ var sparkFlashnetConfirmInitialDepositIntentSchema = v15.object({
1171
+ type: v15.literal("confirmInitialDeposit"),
1172
+ data: v15.object({
1173
+ poolId: v15.string(),
1174
+ assetASparkTransferId: v15.string(),
1175
+ poolOwnerPublicKey: v15.string(),
1176
+ nonce: v15.string()
1177
+ })
1178
+ });
1179
+
1180
+ // src/request/types/sparkMethods/flashnetMethods/intents/createConstantProductPool.ts
1181
+ var v16 = __toESM(require("valibot"));
1182
+ var sparkFlashnetCreateConstantProductPoolIntentSchema = v16.object({
1183
+ type: v16.literal("createConstantProductPool"),
1184
+ data: v16.object({
1185
+ poolOwnerPublicKey: v16.string(),
1186
+ assetAAddress: v16.string(),
1187
+ assetBAddress: v16.string(),
1188
+ lpFeeRateBps: v16.union([v16.number(), v16.string()]),
1189
+ totalHostFeeRateBps: v16.union([v16.number(), v16.string()]),
1190
+ nonce: v16.string()
1191
+ })
1192
+ });
1193
+
1194
+ // src/request/types/sparkMethods/flashnetMethods/intents/createSingleSidedPool.ts
1195
+ var v17 = __toESM(require("valibot"));
1196
+ var sparkFlashnetCreateSingleSidedPoolIntentSchema = v17.object({
1197
+ type: v17.literal("createSingleSidedPool"),
1198
+ data: v17.object({
1199
+ assetAAddress: v17.string(),
1200
+ assetBAddress: v17.string(),
1201
+ assetAInitialReserve: v17.string(),
1202
+ virtualReserveA: v17.union([v17.number(), v17.string()]),
1203
+ virtualReserveB: v17.union([v17.number(), v17.string()]),
1204
+ threshold: v17.union([v17.number(), v17.string()]),
1205
+ lpFeeRateBps: v17.union([v17.number(), v17.string()]),
1206
+ totalHostFeeRateBps: v17.union([v17.number(), v17.string()]),
1207
+ poolOwnerPublicKey: v17.string(),
1208
+ nonce: v17.string()
1209
+ })
1210
+ });
1211
+
1212
+ // src/request/types/sparkMethods/flashnetMethods/intents/removeLiquidity.ts
1213
+ var v18 = __toESM(require("valibot"));
1214
+ var sparkFlashnetRemoveLiquidityIntentSchema = v18.object({
1215
+ type: v18.literal("removeLiquidity"),
1216
+ data: v18.object({
1217
+ userPublicKey: v18.string(),
1218
+ poolId: v18.string(),
1219
+ lpTokensToRemove: v18.string(),
1220
+ nonce: v18.string()
1221
+ })
1222
+ });
1223
+
1224
+ // src/request/types/sparkMethods/flashnetMethods/intents/routeSwap.ts
1225
+ var v19 = __toESM(require("valibot"));
1226
+ var sparkFlashnetRouteSwapIntentSchema = v19.object({
1227
+ type: v19.literal("executeRouteSwap"),
1228
+ data: v19.object({
1229
+ userPublicKey: v19.string(),
1230
+ initialSparkTransferId: v19.string(),
1231
+ hops: v19.array(
1232
+ v19.object({
1233
+ poolId: v19.string(),
1234
+ inputAssetAddress: v19.string(),
1235
+ outputAssetAddress: v19.string(),
1236
+ hopIntegratorFeeRateBps: v19.optional(v19.union([v19.number(), v19.string()]))
1237
+ })
1238
+ ),
1239
+ inputAmount: v19.string(),
1240
+ maxRouteSlippageBps: v19.union([v19.number(), v19.string()]),
1241
+ minAmountOut: v19.string(),
1242
+ defaultIntegratorFeeRateBps: v19.optional(v19.union([v19.number(), v19.string()])),
1243
+ nonce: v19.string()
1244
+ })
1245
+ });
1246
+
1247
+ // src/request/types/sparkMethods/flashnetMethods/intents/swap.ts
1248
+ var v20 = __toESM(require("valibot"));
1249
+ var sparkFlashnetSwapIntentSchema = v20.object({
1250
+ type: v20.literal("executeSwap"),
1251
+ data: v20.object({
1252
+ userPublicKey: v20.string(),
1253
+ poolId: v20.string(),
1254
+ transferId: v20.string(),
1255
+ assetInAddress: v20.string(),
1256
+ assetOutAddress: v20.string(),
1257
+ amountIn: v20.string(),
1258
+ maxSlippageBps: v20.union([v20.number(), v20.string()]),
1259
+ minAmountOut: v20.string(),
1260
+ totalIntegratorFeeRateBps: v20.optional(v20.union([v20.number(), v20.string()])),
1261
+ nonce: v20.string()
1262
+ })
1263
+ });
1264
+
1265
+ // src/request/types/sparkMethods/flashnetMethods/signIntent.ts
1266
+ var v21 = __toESM(require("valibot"));
1267
+ var sparkFlashnetSignIntentMethodName = "spark_flashnet_signIntent";
1268
+ var sparkFlashnetSignIntentParamsSchema = v21.union([
1269
+ sparkFlashnetSwapIntentSchema,
1270
+ sparkFlashnetRouteSwapIntentSchema,
1271
+ sparkFlashnetAddLiquidityIntentSchema,
1272
+ sparkFlashnetClawbackIntentSchema,
1273
+ sparkFlashnetConfirmInitialDepositIntentSchema,
1274
+ sparkFlashnetCreateConstantProductPoolIntentSchema,
1275
+ sparkFlashnetCreateSingleSidedPoolIntentSchema,
1276
+ sparkFlashnetRemoveLiquidityIntentSchema
1277
+ ]);
1278
+ var sparkFlashnetSignIntentResultSchema = v21.object({
1279
+ /**
1280
+ * The signed intent as a hex string.
1281
+ */
1282
+ signature: v21.string()
1283
+ });
1284
+ var sparkFlashnetSignIntentRequestMessageSchema = v21.object({
1285
+ ...rpcRequestMessageSchema.entries,
1286
+ ...v21.object({
1287
+ method: v21.literal(sparkFlashnetSignIntentMethodName),
1288
+ params: sparkFlashnetSignIntentParamsSchema,
1289
+ id: v21.string()
1290
+ }).entries
1291
+ });
1292
+
1293
+ // src/request/types/sparkMethods/flashnetMethods/signStructuredMessage.ts
1294
+ var v22 = __toESM(require("valibot"));
1295
+ var sparkFlashnetSignStructuredMessageMethodName = "spark_flashnet_signStructuredMessage";
1296
+ var sparkFlashnetSignStructuredMessageParamsSchema = v22.object({
1297
+ message: v22.string()
1298
+ });
1299
+ var sparkFlashnetSignStructuredMessageResultSchema = v22.object({
1300
+ message: v22.string(),
1301
+ signature: v22.string()
1302
+ });
1303
+ var sparkFlashnetSignStructuredMessageRequestMessageSchema = v22.object({
1304
+ ...rpcRequestMessageSchema.entries,
1305
+ ...v22.object({
1306
+ method: v22.literal(sparkFlashnetSignStructuredMessageMethodName),
1307
+ params: sparkFlashnetSignStructuredMessageParamsSchema,
1308
+ id: v22.string()
1309
+ }).entries
1310
+ });
1311
+
1312
+ // src/request/types/sparkMethods/getAddresses.ts
1313
+ var v23 = __toESM(require("valibot"));
1102
1314
  var sparkGetAddressesMethodName = "spark_getAddresses";
1103
- var sparkGetAddressesParamsSchema = v12.nullish(
1104
- v12.object({
1315
+ var sparkGetAddressesParamsSchema = v23.nullish(
1316
+ v23.object({
1105
1317
  /**
1106
1318
  * A message to be displayed to the user in the request prompt.
1107
1319
  */
1108
- message: v12.optional(v12.string())
1320
+ message: v23.optional(v23.string())
1109
1321
  })
1110
1322
  );
1111
- var sparkGetAddressesResultSchema = v12.object({
1323
+ var sparkGetAddressesResultSchema = v23.object({
1112
1324
  /**
1113
1325
  * The addresses generated for the given purposes.
1114
1326
  */
1115
- addresses: v12.array(addressSchema),
1327
+ addresses: v23.array(addressSchema),
1116
1328
  network: getNetworkResultSchema
1117
1329
  });
1118
- var sparkGetAddressesRequestMessageSchema = v12.object({
1330
+ var sparkGetAddressesRequestMessageSchema = v23.object({
1119
1331
  ...rpcRequestMessageSchema.entries,
1120
- ...v12.object({
1121
- method: v12.literal(sparkGetAddressesMethodName),
1332
+ ...v23.object({
1333
+ method: v23.literal(sparkGetAddressesMethodName),
1122
1334
  params: sparkGetAddressesParamsSchema,
1123
- id: v12.string()
1335
+ id: v23.string()
1124
1336
  }).entries
1125
1337
  });
1126
1338
 
1127
1339
  // src/request/types/sparkMethods/getBalance.ts
1128
- var v13 = __toESM(require("valibot"));
1340
+ var v24 = __toESM(require("valibot"));
1129
1341
  var sparkGetBalanceMethodName = "spark_getBalance";
1130
- var sparkGetBalanceParamsSchema = v13.nullish(v13.null());
1131
- var sparkGetBalanceResultSchema = v13.object({
1342
+ var sparkGetBalanceParamsSchema = v24.nullish(v24.null());
1343
+ var sparkGetBalanceResultSchema = v24.object({
1132
1344
  /**
1133
1345
  * The Spark Bitcoin address balance in sats in string form.
1134
1346
  */
1135
- balance: v13.string(),
1136
- tokenBalances: v13.array(
1137
- v13.object({
1347
+ balance: v24.string(),
1348
+ tokenBalances: v24.array(
1349
+ v24.object({
1138
1350
  /* The address balance of the token in string form as it can overflow a js number */
1139
- balance: v13.string(),
1140
- tokenMetadata: v13.object({
1141
- tokenIdentifier: v13.string(),
1142
- tokenName: v13.string(),
1143
- tokenTicker: v13.string(),
1144
- decimals: v13.number(),
1145
- maxSupply: v13.string()
1351
+ balance: v24.string(),
1352
+ tokenMetadata: v24.object({
1353
+ tokenIdentifier: v24.string(),
1354
+ tokenName: v24.string(),
1355
+ tokenTicker: v24.string(),
1356
+ decimals: v24.number(),
1357
+ maxSupply: v24.string()
1146
1358
  })
1147
1359
  })
1148
1360
  )
1149
1361
  });
1150
- var sparkGetBalanceRequestMessageSchema = v13.object({
1362
+ var sparkGetBalanceRequestMessageSchema = v24.object({
1151
1363
  ...rpcRequestMessageSchema.entries,
1152
- ...v13.object({
1153
- method: v13.literal(sparkGetBalanceMethodName),
1364
+ ...v24.object({
1365
+ method: v24.literal(sparkGetBalanceMethodName),
1154
1366
  params: sparkGetBalanceParamsSchema,
1155
- id: v13.string()
1367
+ id: v24.string()
1156
1368
  }).entries
1157
1369
  });
1158
1370
 
1159
1371
  // src/request/types/sparkMethods/transfer.ts
1160
- var v14 = __toESM(require("valibot"));
1372
+ var v25 = __toESM(require("valibot"));
1161
1373
  var sparkTransferMethodName = "spark_transfer";
1162
- var sparkTransferParamsSchema = v14.object({
1374
+ var sparkTransferParamsSchema = v25.object({
1163
1375
  /**
1164
1376
  * Amount of SATS to transfer as a string or number.
1165
1377
  */
1166
- amountSats: v14.union([v14.number(), v14.string()]),
1378
+ amountSats: v25.union([v25.number(), v25.string()]),
1167
1379
  /**
1168
1380
  * The recipient's spark address.
1169
1381
  */
1170
- receiverSparkAddress: v14.string()
1382
+ receiverSparkAddress: v25.string()
1171
1383
  });
1172
- var sparkTransferResultSchema = v14.object({
1384
+ var sparkTransferResultSchema = v25.object({
1173
1385
  /**
1174
1386
  * The ID of the transaction.
1175
1387
  */
1176
- id: v14.string()
1388
+ id: v25.string()
1177
1389
  });
1178
- var sparkTransferRequestMessageSchema = v14.object({
1390
+ var sparkTransferRequestMessageSchema = v25.object({
1179
1391
  ...rpcRequestMessageSchema.entries,
1180
- ...v14.object({
1181
- method: v14.literal(sparkTransferMethodName),
1392
+ ...v25.object({
1393
+ method: v25.literal(sparkTransferMethodName),
1182
1394
  params: sparkTransferParamsSchema,
1183
- id: v14.string()
1395
+ id: v25.string()
1184
1396
  }).entries
1185
1397
  });
1186
1398
 
1187
1399
  // src/request/types/sparkMethods/transferToken.ts
1188
- var v15 = __toESM(require("valibot"));
1400
+ var v26 = __toESM(require("valibot"));
1189
1401
  var sparkTransferTokenMethodName = "spark_transferToken";
1190
- var sparkTransferTokenParamsSchema = v15.object({
1402
+ var sparkTransferTokenParamsSchema = v26.object({
1191
1403
  /**
1192
1404
  * Amount of units of the token to transfer as a string or number.
1193
1405
  */
1194
- tokenAmount: v15.union([v15.number(), v15.string()]),
1406
+ tokenAmount: v26.union([v26.number(), v26.string()]),
1195
1407
  /**
1196
1408
  * The Bech32m token identifier.
1197
1409
  */
1198
- tokenIdentifier: v15.string(),
1410
+ tokenIdentifier: v26.string(),
1199
1411
  /**
1200
1412
  * The recipient's spark address.
1201
1413
  */
1202
- receiverSparkAddress: v15.string()
1414
+ receiverSparkAddress: v26.string()
1203
1415
  });
1204
- var sparkTransferTokenResultSchema = v15.object({
1416
+ var sparkTransferTokenResultSchema = v26.object({
1205
1417
  /**
1206
1418
  * The ID of the transaction.
1207
1419
  */
1208
- id: v15.string()
1420
+ id: v26.string()
1209
1421
  });
1210
- var sparkTransferTokenRequestMessageSchema = v15.object({
1422
+ var sparkTransferTokenRequestMessageSchema = v26.object({
1211
1423
  ...rpcRequestMessageSchema.entries,
1212
- ...v15.object({
1213
- method: v15.literal(sparkTransferTokenMethodName),
1424
+ ...v26.object({
1425
+ method: v26.literal(sparkTransferTokenMethodName),
1214
1426
  params: sparkTransferTokenParamsSchema,
1215
- id: v15.string()
1427
+ id: v26.string()
1216
1428
  }).entries
1217
1429
  });
1218
1430
 
1219
1431
  // src/request/types/stxMethods/callContract.ts
1220
- var v16 = __toESM(require("valibot"));
1432
+ var v27 = __toESM(require("valibot"));
1221
1433
  var stxCallContractMethodName = "stx_callContract";
1222
- var stxCallContractParamsSchema = v16.object({
1434
+ var stxCallContractParamsSchema = v27.object({
1223
1435
  /**
1224
1436
  * The contract principal.
1225
1437
  *
1226
1438
  * E.g. `"SPKE...GD5C.my-contract"`
1227
1439
  */
1228
- contract: v16.string(),
1440
+ contract: v27.string(),
1229
1441
  /**
1230
1442
  * The name of the function to call.
1231
1443
  *
1232
1444
  * Note: spec changes ongoing,
1233
1445
  * https://github.com/stacksgov/sips/pull/166#pullrequestreview-1914236999
1234
1446
  */
1235
- functionName: v16.string(),
1447
+ functionName: v27.string(),
1236
1448
  /**
1237
1449
  * @deprecated in favor of `functionArgs` for @stacks/connect compatibility
1238
1450
  */
1239
- arguments: v16.optional(v16.array(v16.string())),
1451
+ arguments: v27.optional(v27.array(v27.string())),
1240
1452
  /**
1241
1453
  * The function's arguments. The arguments are expected to be hex-encoded
1242
1454
  * strings of Clarity values.
@@ -1251,274 +1463,274 @@ var stxCallContractParamsSchema = v16.object({
1251
1463
  * const hexArgs = functionArgs.map(cvToHex);
1252
1464
  * ```
1253
1465
  */
1254
- functionArgs: v16.optional(v16.array(v16.string())),
1466
+ functionArgs: v27.optional(v27.array(v27.string())),
1255
1467
  /**
1256
1468
  * The post conditions to apply to the contract call.
1257
1469
  */
1258
- postConditions: v16.optional(v16.array(v16.string())),
1470
+ postConditions: v27.optional(v27.array(v27.string())),
1259
1471
  /**
1260
1472
  * The mode to apply to the post conditions.
1261
1473
  */
1262
- postConditionMode: v16.optional(v16.union([v16.literal("allow"), v16.literal("deny")]))
1474
+ postConditionMode: v27.optional(v27.union([v27.literal("allow"), v27.literal("deny")]))
1263
1475
  });
1264
- var stxCallContractResultSchema = v16.object({
1476
+ var stxCallContractResultSchema = v27.object({
1265
1477
  /**
1266
1478
  * The ID of the transaction.
1267
1479
  */
1268
- txid: v16.string(),
1480
+ txid: v27.string(),
1269
1481
  /**
1270
1482
  * A Stacks transaction as a hex-encoded string.
1271
1483
  */
1272
- transaction: v16.string()
1484
+ transaction: v27.string()
1273
1485
  });
1274
- var stxCallContractRequestMessageSchema = v16.object({
1486
+ var stxCallContractRequestMessageSchema = v27.object({
1275
1487
  ...rpcRequestMessageSchema.entries,
1276
- ...v16.object({
1277
- method: v16.literal(stxCallContractMethodName),
1488
+ ...v27.object({
1489
+ method: v27.literal(stxCallContractMethodName),
1278
1490
  params: stxCallContractParamsSchema,
1279
- id: v16.string()
1491
+ id: v27.string()
1280
1492
  }).entries
1281
1493
  });
1282
1494
 
1283
1495
  // src/request/types/stxMethods/deployContract.ts
1284
- var v17 = __toESM(require("valibot"));
1496
+ var v28 = __toESM(require("valibot"));
1285
1497
  var stxDeployContractMethodName = "stx_deployContract";
1286
- var stxDeployContractParamsSchema = v17.object({
1498
+ var stxDeployContractParamsSchema = v28.object({
1287
1499
  /**
1288
1500
  * Name of the contract.
1289
1501
  */
1290
- name: v17.string(),
1502
+ name: v28.string(),
1291
1503
  /**
1292
1504
  * The source code of the Clarity contract.
1293
1505
  */
1294
- clarityCode: v17.string(),
1506
+ clarityCode: v28.string(),
1295
1507
  /**
1296
1508
  * The version of the Clarity contract.
1297
1509
  */
1298
- clarityVersion: v17.optional(v17.number()),
1510
+ clarityVersion: v28.optional(v28.number()),
1299
1511
  /**
1300
1512
  * The post conditions to apply to the contract call.
1301
1513
  */
1302
- postConditions: v17.optional(v17.array(v17.string())),
1514
+ postConditions: v28.optional(v28.array(v28.string())),
1303
1515
  /**
1304
1516
  * The mode to apply to the post conditions.
1305
1517
  */
1306
- postConditionMode: v17.optional(v17.union([v17.literal("allow"), v17.literal("deny")]))
1518
+ postConditionMode: v28.optional(v28.union([v28.literal("allow"), v28.literal("deny")]))
1307
1519
  });
1308
- var stxDeployContractResultSchema = v17.object({
1520
+ var stxDeployContractResultSchema = v28.object({
1309
1521
  /**
1310
1522
  * The ID of the transaction.
1311
1523
  */
1312
- txid: v17.string(),
1524
+ txid: v28.string(),
1313
1525
  /**
1314
1526
  * A Stacks transaction as a hex-encoded string.
1315
1527
  */
1316
- transaction: v17.string()
1528
+ transaction: v28.string()
1317
1529
  });
1318
- var stxDeployContractRequestMessageSchema = v17.object({
1530
+ var stxDeployContractRequestMessageSchema = v28.object({
1319
1531
  ...rpcRequestMessageSchema.entries,
1320
- ...v17.object({
1321
- method: v17.literal(stxDeployContractMethodName),
1532
+ ...v28.object({
1533
+ method: v28.literal(stxDeployContractMethodName),
1322
1534
  params: stxDeployContractParamsSchema,
1323
- id: v17.string()
1535
+ id: v28.string()
1324
1536
  }).entries
1325
1537
  });
1326
1538
 
1327
1539
  // src/request/types/stxMethods/getAccounts.ts
1328
- var v18 = __toESM(require("valibot"));
1540
+ var v29 = __toESM(require("valibot"));
1329
1541
  var stxGetAccountsMethodName = "stx_getAccounts";
1330
- var stxGetAccountsParamsSchema = v18.nullish(v18.null());
1331
- var stxGetAccountsResultSchema = v18.object({
1542
+ var stxGetAccountsParamsSchema = v29.nullish(v29.null());
1543
+ var stxGetAccountsResultSchema = v29.object({
1332
1544
  /**
1333
1545
  * The addresses generated for the given purposes.
1334
1546
  */
1335
- addresses: v18.array(
1336
- v18.object({
1337
- address: v18.string(),
1338
- publicKey: v18.string(),
1339
- gaiaHubUrl: v18.string(),
1340
- gaiaAppKey: v18.string()
1547
+ addresses: v29.array(
1548
+ v29.object({
1549
+ address: v29.string(),
1550
+ publicKey: v29.string(),
1551
+ gaiaHubUrl: v29.string(),
1552
+ gaiaAppKey: v29.string()
1341
1553
  })
1342
1554
  ),
1343
1555
  network: getNetworkResultSchema
1344
1556
  });
1345
- var stxGetAccountsRequestMessageSchema = v18.object({
1557
+ var stxGetAccountsRequestMessageSchema = v29.object({
1346
1558
  ...rpcRequestMessageSchema.entries,
1347
- ...v18.object({
1348
- method: v18.literal(stxGetAccountsMethodName),
1559
+ ...v29.object({
1560
+ method: v29.literal(stxGetAccountsMethodName),
1349
1561
  params: stxGetAccountsParamsSchema,
1350
- id: v18.string()
1562
+ id: v29.string()
1351
1563
  }).entries
1352
1564
  });
1353
1565
 
1354
1566
  // src/request/types/stxMethods/getAddresses.ts
1355
- var v19 = __toESM(require("valibot"));
1567
+ var v30 = __toESM(require("valibot"));
1356
1568
  var stxGetAddressesMethodName = "stx_getAddresses";
1357
- var stxGetAddressesParamsSchema = v19.nullish(
1358
- v19.object({
1569
+ var stxGetAddressesParamsSchema = v30.nullish(
1570
+ v30.object({
1359
1571
  /**
1360
1572
  * A message to be displayed to the user in the request prompt.
1361
1573
  */
1362
- message: v19.optional(v19.string())
1574
+ message: v30.optional(v30.string())
1363
1575
  })
1364
1576
  );
1365
- var stxGetAddressesResultSchema = v19.object({
1577
+ var stxGetAddressesResultSchema = v30.object({
1366
1578
  /**
1367
1579
  * The addresses generated for the given purposes.
1368
1580
  */
1369
- addresses: v19.array(addressSchema),
1581
+ addresses: v30.array(addressSchema),
1370
1582
  network: getNetworkResultSchema
1371
1583
  });
1372
- var stxGetAddressesRequestMessageSchema = v19.object({
1584
+ var stxGetAddressesRequestMessageSchema = v30.object({
1373
1585
  ...rpcRequestMessageSchema.entries,
1374
- ...v19.object({
1375
- method: v19.literal(stxGetAddressesMethodName),
1586
+ ...v30.object({
1587
+ method: v30.literal(stxGetAddressesMethodName),
1376
1588
  params: stxGetAddressesParamsSchema,
1377
- id: v19.string()
1589
+ id: v30.string()
1378
1590
  }).entries
1379
1591
  });
1380
1592
 
1381
1593
  // src/request/types/stxMethods/signMessage.ts
1382
- var v20 = __toESM(require("valibot"));
1594
+ var v31 = __toESM(require("valibot"));
1383
1595
  var stxSignMessageMethodName = "stx_signMessage";
1384
- var stxSignMessageParamsSchema = v20.object({
1596
+ var stxSignMessageParamsSchema = v31.object({
1385
1597
  /**
1386
1598
  * The message to sign.
1387
1599
  */
1388
- message: v20.string()
1600
+ message: v31.string()
1389
1601
  });
1390
- var stxSignMessageResultSchema = v20.object({
1602
+ var stxSignMessageResultSchema = v31.object({
1391
1603
  /**
1392
1604
  * The signature of the message.
1393
1605
  */
1394
- signature: v20.string(),
1606
+ signature: v31.string(),
1395
1607
  /**
1396
1608
  * The public key used to sign the message.
1397
1609
  */
1398
- publicKey: v20.string()
1610
+ publicKey: v31.string()
1399
1611
  });
1400
- var stxSignMessageRequestMessageSchema = v20.object({
1612
+ var stxSignMessageRequestMessageSchema = v31.object({
1401
1613
  ...rpcRequestMessageSchema.entries,
1402
- ...v20.object({
1403
- method: v20.literal(stxSignMessageMethodName),
1614
+ ...v31.object({
1615
+ method: v31.literal(stxSignMessageMethodName),
1404
1616
  params: stxSignMessageParamsSchema,
1405
- id: v20.string()
1617
+ id: v31.string()
1406
1618
  }).entries
1407
1619
  });
1408
1620
 
1409
1621
  // src/request/types/stxMethods/signStructuredMessage.ts
1410
- var v21 = __toESM(require("valibot"));
1622
+ var v32 = __toESM(require("valibot"));
1411
1623
  var stxSignStructuredMessageMethodName = "stx_signStructuredMessage";
1412
- var stxSignStructuredMessageParamsSchema = v21.object({
1624
+ var stxSignStructuredMessageParamsSchema = v32.object({
1413
1625
  /**
1414
1626
  * The domain to be signed.
1415
1627
  */
1416
- domain: v21.string(),
1628
+ domain: v32.string(),
1417
1629
  /**
1418
1630
  * Message payload to be signed.
1419
1631
  */
1420
- message: v21.string(),
1632
+ message: v32.string(),
1421
1633
  /**
1422
1634
  * The public key to sign the message with.
1423
1635
  */
1424
- publicKey: v21.optional(v21.string())
1636
+ publicKey: v32.optional(v32.string())
1425
1637
  });
1426
- var stxSignStructuredMessageResultSchema = v21.object({
1638
+ var stxSignStructuredMessageResultSchema = v32.object({
1427
1639
  /**
1428
1640
  * Signature of the message.
1429
1641
  */
1430
- signature: v21.string(),
1642
+ signature: v32.string(),
1431
1643
  /**
1432
1644
  * Public key as hex-encoded string.
1433
1645
  */
1434
- publicKey: v21.string()
1646
+ publicKey: v32.string()
1435
1647
  });
1436
- var stxSignStructuredMessageRequestMessageSchema = v21.object({
1648
+ var stxSignStructuredMessageRequestMessageSchema = v32.object({
1437
1649
  ...rpcRequestMessageSchema.entries,
1438
- ...v21.object({
1439
- method: v21.literal(stxSignStructuredMessageMethodName),
1650
+ ...v32.object({
1651
+ method: v32.literal(stxSignStructuredMessageMethodName),
1440
1652
  params: stxSignStructuredMessageParamsSchema,
1441
- id: v21.string()
1653
+ id: v32.string()
1442
1654
  }).entries
1443
1655
  });
1444
1656
 
1445
1657
  // src/request/types/stxMethods/signTransaction.ts
1446
- var v22 = __toESM(require("valibot"));
1658
+ var v33 = __toESM(require("valibot"));
1447
1659
  var stxSignTransactionMethodName = "stx_signTransaction";
1448
- var stxSignTransactionParamsSchema = v22.object({
1660
+ var stxSignTransactionParamsSchema = v33.object({
1449
1661
  /**
1450
1662
  * The transaction to sign as a hex-encoded string.
1451
1663
  */
1452
- transaction: v22.string(),
1664
+ transaction: v33.string(),
1453
1665
  /**
1454
1666
  * The public key to sign the transaction with. The wallet may use any key
1455
1667
  * when not provided.
1456
1668
  */
1457
- pubkey: v22.optional(v22.string()),
1669
+ pubkey: v33.optional(v33.string()),
1458
1670
  /**
1459
1671
  * Whether to broadcast the transaction after signing. Defaults to `true`.
1460
1672
  */
1461
- broadcast: v22.optional(v22.boolean())
1673
+ broadcast: v33.optional(v33.boolean())
1462
1674
  });
1463
- var stxSignTransactionResultSchema = v22.object({
1675
+ var stxSignTransactionResultSchema = v33.object({
1464
1676
  /**
1465
1677
  * The signed transaction as a hex-encoded string.
1466
1678
  */
1467
- transaction: v22.string()
1679
+ transaction: v33.string()
1468
1680
  });
1469
- var stxSignTransactionRequestMessageSchema = v22.object({
1681
+ var stxSignTransactionRequestMessageSchema = v33.object({
1470
1682
  ...rpcRequestMessageSchema.entries,
1471
- ...v22.object({
1472
- method: v22.literal(stxSignTransactionMethodName),
1683
+ ...v33.object({
1684
+ method: v33.literal(stxSignTransactionMethodName),
1473
1685
  params: stxSignTransactionParamsSchema,
1474
- id: v22.string()
1686
+ id: v33.string()
1475
1687
  }).entries
1476
1688
  });
1477
1689
 
1478
1690
  // src/request/types/stxMethods/signTransactions.ts
1479
- var v23 = __toESM(require("valibot"));
1691
+ var v34 = __toESM(require("valibot"));
1480
1692
  var stxSignTransactionsMethodName = "stx_signTransactions";
1481
- var stxSignTransactionsParamsSchema = v23.object({
1693
+ var stxSignTransactionsParamsSchema = v34.object({
1482
1694
  /**
1483
1695
  * The transactions to sign as hex-encoded strings.
1484
1696
  */
1485
- transactions: v23.pipe(
1486
- v23.array(
1487
- v23.pipe(
1488
- v23.string(),
1489
- v23.check((hex) => {
1697
+ transactions: v34.pipe(
1698
+ v34.array(
1699
+ v34.pipe(
1700
+ v34.string(),
1701
+ v34.check((hex) => {
1490
1702
  return true;
1491
1703
  }, "Invalid hex-encoded Stacks transaction.")
1492
1704
  )
1493
1705
  ),
1494
- v23.minLength(1)
1706
+ v34.minLength(1)
1495
1707
  ),
1496
1708
  /**
1497
1709
  * Whether the signed transactions should be broadcast after signing. Defaults
1498
1710
  * to `true`.
1499
1711
  */
1500
- broadcast: v23.optional(v23.boolean())
1712
+ broadcast: v34.optional(v34.boolean())
1501
1713
  });
1502
- var stxSignTransactionsResultSchema = v23.object({
1714
+ var stxSignTransactionsResultSchema = v34.object({
1503
1715
  /**
1504
1716
  * The signed transactions as hex-encoded strings, in the same order as in the
1505
1717
  * sign request.
1506
1718
  */
1507
- transactions: v23.array(v23.string())
1719
+ transactions: v34.array(v34.string())
1508
1720
  });
1509
- var stxSignTransactionsRequestMessageSchema = v23.object({
1721
+ var stxSignTransactionsRequestMessageSchema = v34.object({
1510
1722
  ...rpcRequestMessageSchema.entries,
1511
- ...v23.object({
1512
- method: v23.literal(stxSignTransactionsMethodName),
1723
+ ...v34.object({
1724
+ method: v34.literal(stxSignTransactionsMethodName),
1513
1725
  params: stxSignTransactionsParamsSchema,
1514
- id: v23.string()
1726
+ id: v34.string()
1515
1727
  }).entries
1516
1728
  });
1517
1729
 
1518
1730
  // src/request/types/stxMethods/transferStx.ts
1519
- var v24 = __toESM(require("valibot"));
1731
+ var v35 = __toESM(require("valibot"));
1520
1732
  var stxTransferStxMethodName = "stx_transferStx";
1521
- var stxTransferStxParamsSchema = v24.object({
1733
+ var stxTransferStxParamsSchema = v35.object({
1522
1734
  /**
1523
1735
  * Amount of STX tokens to transfer in microstacks as a string. Anything
1524
1736
  * parseable by `BigInt` is acceptable.
@@ -1531,23 +1743,23 @@ var stxTransferStxParamsSchema = v24.object({
1531
1743
  * const amount3 = '1234';
1532
1744
  * ```
1533
1745
  */
1534
- amount: v24.union([v24.number(), v24.string()]),
1746
+ amount: v35.union([v35.number(), v35.string()]),
1535
1747
  /**
1536
1748
  * The recipient's principal.
1537
1749
  */
1538
- recipient: v24.string(),
1750
+ recipient: v35.string(),
1539
1751
  /**
1540
1752
  * A string representing the memo.
1541
1753
  */
1542
- memo: v24.optional(v24.string()),
1754
+ memo: v35.optional(v35.string()),
1543
1755
  /**
1544
1756
  * Version of parameter format.
1545
1757
  */
1546
- version: v24.optional(v24.string()),
1758
+ version: v35.optional(v35.string()),
1547
1759
  /**
1548
1760
  * The mode of the post conditions.
1549
1761
  */
1550
- postConditionMode: v24.optional(v24.number()),
1762
+ postConditionMode: v35.optional(v35.number()),
1551
1763
  /**
1552
1764
  * A hex-encoded string representing the post conditions.
1553
1765
  *
@@ -1560,29 +1772,29 @@ var stxTransferStxParamsSchema = v24.object({
1560
1772
  * const hexPostCondition = serializePostCondition(postCondition).toString('hex');
1561
1773
  * ```
1562
1774
  */
1563
- postConditions: v24.optional(v24.array(v24.string())),
1775
+ postConditions: v35.optional(v35.array(v35.string())),
1564
1776
  /**
1565
1777
  * The public key to sign the transaction with. The wallet may use any key
1566
1778
  * when not provided.
1567
1779
  */
1568
- pubkey: v24.optional(v24.string())
1780
+ pubkey: v35.optional(v35.string())
1569
1781
  });
1570
- var stxTransferStxResultSchema = v24.object({
1782
+ var stxTransferStxResultSchema = v35.object({
1571
1783
  /**
1572
1784
  * The ID of the transaction.
1573
1785
  */
1574
- txid: v24.string(),
1786
+ txid: v35.string(),
1575
1787
  /**
1576
1788
  * A Stacks transaction as a hex-encoded string.
1577
1789
  */
1578
- transaction: v24.string()
1790
+ transaction: v35.string()
1579
1791
  });
1580
- var stxTransferStxRequestMessageSchema = v24.object({
1792
+ var stxTransferStxRequestMessageSchema = v35.object({
1581
1793
  ...rpcRequestMessageSchema.entries,
1582
- ...v24.object({
1583
- method: v24.literal(stxTransferStxMethodName),
1794
+ ...v35.object({
1795
+ method: v35.literal(stxTransferStxMethodName),
1584
1796
  params: stxTransferStxParamsSchema,
1585
- id: v24.string()
1797
+ id: v35.string()
1586
1798
  }).entries
1587
1799
  });
1588
1800
 
@@ -1590,13 +1802,13 @@ var stxTransferStxRequestMessageSchema = v24.object({
1590
1802
  var cache = {};
1591
1803
  var requestInternal = async (provider, method, params) => {
1592
1804
  const response = await provider.request(method, params);
1593
- if (v25.is(rpcErrorResponseMessageSchema, response)) {
1805
+ if (v36.is(rpcErrorResponseMessageSchema, response)) {
1594
1806
  return {
1595
1807
  status: "error",
1596
1808
  error: response.error
1597
1809
  };
1598
1810
  }
1599
- if (v25.is(rpcSuccessResponseMessageSchema, response)) {
1811
+ if (v36.is(rpcSuccessResponseMessageSchema, response)) {
1600
1812
  return {
1601
1813
  status: "success",
1602
1814
  result: response.result
@@ -2785,6 +2997,26 @@ var signMultipleTransactions = async (options) => {
2785
2997
  signPsbtRequestMessageSchema,
2786
2998
  signPsbtResultSchema,
2787
2999
  signTransaction,
3000
+ sparkFlashnetAddLiquidityIntentSchema,
3001
+ sparkFlashnetClawbackIntentSchema,
3002
+ sparkFlashnetConfirmInitialDepositIntentSchema,
3003
+ sparkFlashnetCreateConstantProductPoolIntentSchema,
3004
+ sparkFlashnetCreateSingleSidedPoolIntentSchema,
3005
+ sparkFlashnetGetJwtMethodName,
3006
+ sparkFlashnetGetJwtParamsSchema,
3007
+ sparkFlashnetGetJwtRequestMessageSchema,
3008
+ sparkFlashnetGetJwtResultSchema,
3009
+ sparkFlashnetRemoveLiquidityIntentSchema,
3010
+ sparkFlashnetRouteSwapIntentSchema,
3011
+ sparkFlashnetSignIntentMethodName,
3012
+ sparkFlashnetSignIntentParamsSchema,
3013
+ sparkFlashnetSignIntentRequestMessageSchema,
3014
+ sparkFlashnetSignIntentResultSchema,
3015
+ sparkFlashnetSignStructuredMessageMethodName,
3016
+ sparkFlashnetSignStructuredMessageParamsSchema,
3017
+ sparkFlashnetSignStructuredMessageRequestMessageSchema,
3018
+ sparkFlashnetSignStructuredMessageResultSchema,
3019
+ sparkFlashnetSwapIntentSchema,
2788
3020
  sparkGetAddressesMethodName,
2789
3021
  sparkGetAddressesParamsSchema,
2790
3022
  sparkGetAddressesRequestMessageSchema,