@sats-connect/core 0.8.2-0eb31e4 → 0.8.2-6e91f8a

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