@sats-connect/core 0.12.0 → 0.13.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.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  // src/request/index.ts
2
- import * as v40 from "valibot";
2
+ import * as v41 from "valibot";
3
3
 
4
4
  // src/provider/types.ts
5
5
  import * as v4 from "valibot";
@@ -954,155 +954,175 @@ var sparkFlashnetExecuteSwapRequestMessageSchema = v14.object({
954
954
  }).entries
955
955
  });
956
956
 
957
- // src/request/types/sparkMethods/flashnetMethods/getJwt.ts
957
+ // src/request/types/sparkMethods/flashnetMethods/getEligibleClawbackTransactions.ts
958
958
  import * as v15 from "valibot";
959
+ var sparkGetEligibleClawbackTransactionsMethodName = "spark_flashnet_getEligibleClawbackTransactions";
960
+ var sparkGetEligibleClawbackTransactionsParamsSchema = v15.nullish(v15.null());
961
+ var sparkGetEligibleClawbackTransactionsResultSchema = v15.array(
962
+ v15.object({
963
+ txId: v15.string(),
964
+ createdAt: v15.string(),
965
+ lpIdentityPublicKey: v15.string()
966
+ })
967
+ );
968
+ var sparkGetEligibleClawbackTransactionsRequestMessageSchema = v15.object({
969
+ ...rpcRequestMessageSchema.entries,
970
+ ...v15.object({
971
+ method: v15.literal(sparkGetEligibleClawbackTransactionsMethodName),
972
+ params: sparkGetEligibleClawbackTransactionsParamsSchema,
973
+ id: v15.string()
974
+ }).entries
975
+ });
976
+
977
+ // src/request/types/sparkMethods/flashnetMethods/getJwt.ts
978
+ import * as v16 from "valibot";
959
979
  var sparkFlashnetGetJwtMethodName = "spark_flashnet_getJwt";
960
- var sparkFlashnetGetJwtParamsSchema = v15.null();
961
- var sparkFlashnetGetJwtResultSchema = v15.object({
980
+ var sparkFlashnetGetJwtParamsSchema = v16.null();
981
+ var sparkFlashnetGetJwtResultSchema = v16.object({
962
982
  /**
963
983
  * The JWT token for authenticated requests to the Flashnet API.
964
984
  */
965
- jwt: v15.string()
985
+ jwt: v16.string()
966
986
  });
967
- var sparkFlashnetGetJwtRequestMessageSchema = v15.object({
987
+ var sparkFlashnetGetJwtRequestMessageSchema = v16.object({
968
988
  ...rpcRequestMessageSchema.entries,
969
- ...v15.object({
970
- method: v15.literal(sparkFlashnetGetJwtMethodName),
989
+ ...v16.object({
990
+ method: v16.literal(sparkFlashnetGetJwtMethodName),
971
991
  params: sparkFlashnetGetJwtParamsSchema,
972
- id: v15.string()
992
+ id: v16.string()
973
993
  }).entries
974
994
  });
975
995
 
976
996
  // src/request/types/sparkMethods/flashnetMethods/intents/addLiquidity.ts
977
- import * as v16 from "valibot";
978
- var sparkFlashnetAddLiquidityIntentSchema = v16.object({
979
- type: v16.literal("addLiquidity"),
980
- data: v16.object({
981
- userPublicKey: v16.string(),
982
- poolId: v16.string(),
983
- assetAAmount: v16.string(),
984
- assetBAmount: v16.string(),
985
- assetAMinAmountIn: v16.string(),
986
- assetBMinAmountIn: v16.string(),
987
- assetATransferId: v16.string(),
988
- assetBTransferId: v16.string(),
989
- nonce: v16.string()
990
- })
991
- });
992
-
993
- // src/request/types/sparkMethods/flashnetMethods/intents/clawback.ts
994
997
  import * as v17 from "valibot";
995
- var sparkFlashnetClawbackIntentSchema = v17.object({
996
- type: v17.literal("clawback"),
998
+ var sparkFlashnetAddLiquidityIntentSchema = v17.object({
999
+ type: v17.literal("addLiquidity"),
997
1000
  data: v17.object({
998
- senderPublicKey: v17.string(),
999
- sparkTransferId: v17.string(),
1000
- lpIdentityPublicKey: v17.string(),
1001
+ userPublicKey: v17.string(),
1002
+ poolId: v17.string(),
1003
+ assetAAmount: v17.string(),
1004
+ assetBAmount: v17.string(),
1005
+ assetAMinAmountIn: v17.string(),
1006
+ assetBMinAmountIn: v17.string(),
1007
+ assetATransferId: v17.string(),
1008
+ assetBTransferId: v17.string(),
1001
1009
  nonce: v17.string()
1002
1010
  })
1003
1011
  });
1004
1012
 
1005
- // src/request/types/sparkMethods/flashnetMethods/intents/confirmInitialDeposit.ts
1013
+ // src/request/types/sparkMethods/flashnetMethods/intents/clawback.ts
1006
1014
  import * as v18 from "valibot";
1007
- var sparkFlashnetConfirmInitialDepositIntentSchema = v18.object({
1008
- type: v18.literal("confirmInitialDeposit"),
1015
+ var sparkFlashnetClawbackIntentSchema = v18.object({
1016
+ type: v18.literal("clawback"),
1009
1017
  data: v18.object({
1010
- poolId: v18.string(),
1011
- assetASparkTransferId: v18.string(),
1012
- poolOwnerPublicKey: v18.string(),
1018
+ senderPublicKey: v18.string(),
1019
+ sparkTransferId: v18.string(),
1020
+ lpIdentityPublicKey: v18.string(),
1013
1021
  nonce: v18.string()
1014
1022
  })
1015
1023
  });
1016
1024
 
1017
- // src/request/types/sparkMethods/flashnetMethods/intents/createConstantProductPool.ts
1025
+ // src/request/types/sparkMethods/flashnetMethods/intents/confirmInitialDeposit.ts
1018
1026
  import * as v19 from "valibot";
1019
- var sparkFlashnetCreateConstantProductPoolIntentSchema = v19.object({
1020
- type: v19.literal("createConstantProductPool"),
1027
+ var sparkFlashnetConfirmInitialDepositIntentSchema = v19.object({
1028
+ type: v19.literal("confirmInitialDeposit"),
1021
1029
  data: v19.object({
1030
+ poolId: v19.string(),
1031
+ assetASparkTransferId: v19.string(),
1022
1032
  poolOwnerPublicKey: v19.string(),
1023
- assetAAddress: v19.string(),
1024
- assetBAddress: v19.string(),
1025
- lpFeeRateBps: v19.union([v19.number(), v19.string()]),
1026
- totalHostFeeRateBps: v19.union([v19.number(), v19.string()]),
1027
1033
  nonce: v19.string()
1028
1034
  })
1029
1035
  });
1030
1036
 
1031
- // src/request/types/sparkMethods/flashnetMethods/intents/createSingleSidedPool.ts
1037
+ // src/request/types/sparkMethods/flashnetMethods/intents/createConstantProductPool.ts
1032
1038
  import * as v20 from "valibot";
1033
- var sparkFlashnetCreateSingleSidedPoolIntentSchema = v20.object({
1034
- type: v20.literal("createSingleSidedPool"),
1039
+ var sparkFlashnetCreateConstantProductPoolIntentSchema = v20.object({
1040
+ type: v20.literal("createConstantProductPool"),
1035
1041
  data: v20.object({
1042
+ poolOwnerPublicKey: v20.string(),
1036
1043
  assetAAddress: v20.string(),
1037
1044
  assetBAddress: v20.string(),
1038
- assetAInitialReserve: v20.string(),
1039
- virtualReserveA: v20.union([v20.number(), v20.string()]),
1040
- virtualReserveB: v20.union([v20.number(), v20.string()]),
1041
- threshold: v20.union([v20.number(), v20.string()]),
1042
1045
  lpFeeRateBps: v20.union([v20.number(), v20.string()]),
1043
1046
  totalHostFeeRateBps: v20.union([v20.number(), v20.string()]),
1044
- poolOwnerPublicKey: v20.string(),
1045
1047
  nonce: v20.string()
1046
1048
  })
1047
1049
  });
1048
1050
 
1049
- // src/request/types/sparkMethods/flashnetMethods/intents/removeLiquidity.ts
1051
+ // src/request/types/sparkMethods/flashnetMethods/intents/createSingleSidedPool.ts
1050
1052
  import * as v21 from "valibot";
1051
- var sparkFlashnetRemoveLiquidityIntentSchema = v21.object({
1052
- type: v21.literal("removeLiquidity"),
1053
+ var sparkFlashnetCreateSingleSidedPoolIntentSchema = v21.object({
1054
+ type: v21.literal("createSingleSidedPool"),
1053
1055
  data: v21.object({
1054
- userPublicKey: v21.string(),
1055
- poolId: v21.string(),
1056
- lpTokensToRemove: v21.string(),
1056
+ assetAAddress: v21.string(),
1057
+ assetBAddress: v21.string(),
1058
+ assetAInitialReserve: v21.string(),
1059
+ virtualReserveA: v21.union([v21.number(), v21.string()]),
1060
+ virtualReserveB: v21.union([v21.number(), v21.string()]),
1061
+ threshold: v21.union([v21.number(), v21.string()]),
1062
+ lpFeeRateBps: v21.union([v21.number(), v21.string()]),
1063
+ totalHostFeeRateBps: v21.union([v21.number(), v21.string()]),
1064
+ poolOwnerPublicKey: v21.string(),
1057
1065
  nonce: v21.string()
1058
1066
  })
1059
1067
  });
1060
1068
 
1061
- // src/request/types/sparkMethods/flashnetMethods/intents/routeSwap.ts
1069
+ // src/request/types/sparkMethods/flashnetMethods/intents/removeLiquidity.ts
1062
1070
  import * as v22 from "valibot";
1063
- var sparkFlashnetRouteSwapIntentSchema = v22.object({
1064
- type: v22.literal("executeRouteSwap"),
1071
+ var sparkFlashnetRemoveLiquidityIntentSchema = v22.object({
1072
+ type: v22.literal("removeLiquidity"),
1065
1073
  data: v22.object({
1066
1074
  userPublicKey: v22.string(),
1067
- initialSparkTransferId: v22.string(),
1068
- hops: v22.array(
1069
- v22.object({
1070
- poolId: v22.string(),
1071
- inputAssetAddress: v22.string(),
1072
- outputAssetAddress: v22.string(),
1073
- hopIntegratorFeeRateBps: v22.optional(v22.union([v22.number(), v22.string()]))
1074
- })
1075
- ),
1076
- inputAmount: v22.string(),
1077
- maxRouteSlippageBps: v22.union([v22.number(), v22.string()]),
1078
- minAmountOut: v22.string(),
1079
- defaultIntegratorFeeRateBps: v22.optional(v22.union([v22.number(), v22.string()])),
1075
+ poolId: v22.string(),
1076
+ lpTokensToRemove: v22.string(),
1080
1077
  nonce: v22.string()
1081
1078
  })
1082
1079
  });
1083
1080
 
1084
- // src/request/types/sparkMethods/flashnetMethods/intents/swap.ts
1081
+ // src/request/types/sparkMethods/flashnetMethods/intents/routeSwap.ts
1085
1082
  import * as v23 from "valibot";
1086
- var sparkFlashnetSwapIntentSchema = v23.object({
1087
- type: v23.literal("executeSwap"),
1083
+ var sparkFlashnetRouteSwapIntentSchema = v23.object({
1084
+ type: v23.literal("executeRouteSwap"),
1088
1085
  data: v23.object({
1089
1086
  userPublicKey: v23.string(),
1090
- poolId: v23.string(),
1091
- transferId: v23.string(),
1092
- assetInAddress: v23.string(),
1093
- assetOutAddress: v23.string(),
1094
- amountIn: v23.string(),
1095
- maxSlippageBps: v23.union([v23.number(), v23.string()]),
1087
+ initialSparkTransferId: v23.string(),
1088
+ hops: v23.array(
1089
+ v23.object({
1090
+ poolId: v23.string(),
1091
+ inputAssetAddress: v23.string(),
1092
+ outputAssetAddress: v23.string(),
1093
+ hopIntegratorFeeRateBps: v23.optional(v23.union([v23.number(), v23.string()]))
1094
+ })
1095
+ ),
1096
+ inputAmount: v23.string(),
1097
+ maxRouteSlippageBps: v23.union([v23.number(), v23.string()]),
1096
1098
  minAmountOut: v23.string(),
1097
- totalIntegratorFeeRateBps: v23.optional(v23.union([v23.number(), v23.string()])),
1099
+ defaultIntegratorFeeRateBps: v23.optional(v23.union([v23.number(), v23.string()])),
1098
1100
  nonce: v23.string()
1099
1101
  })
1100
1102
  });
1101
1103
 
1102
- // src/request/types/sparkMethods/flashnetMethods/signIntent.ts
1104
+ // src/request/types/sparkMethods/flashnetMethods/intents/swap.ts
1103
1105
  import * as v24 from "valibot";
1106
+ var sparkFlashnetSwapIntentSchema = v24.object({
1107
+ type: v24.literal("executeSwap"),
1108
+ data: v24.object({
1109
+ userPublicKey: v24.string(),
1110
+ poolId: v24.string(),
1111
+ transferId: v24.string(),
1112
+ assetInAddress: v24.string(),
1113
+ assetOutAddress: v24.string(),
1114
+ amountIn: v24.string(),
1115
+ maxSlippageBps: v24.union([v24.number(), v24.string()]),
1116
+ minAmountOut: v24.string(),
1117
+ totalIntegratorFeeRateBps: v24.optional(v24.union([v24.number(), v24.string()])),
1118
+ nonce: v24.string()
1119
+ })
1120
+ });
1121
+
1122
+ // src/request/types/sparkMethods/flashnetMethods/signIntent.ts
1123
+ import * as v25 from "valibot";
1104
1124
  var sparkFlashnetSignIntentMethodName = "spark_flashnet_signIntent";
1105
- var sparkFlashnetSignIntentParamsSchema = v24.union([
1125
+ var sparkFlashnetSignIntentParamsSchema = v25.union([
1106
1126
  sparkFlashnetSwapIntentSchema,
1107
1127
  sparkFlashnetRouteSwapIntentSchema,
1108
1128
  sparkFlashnetAddLiquidityIntentSchema,
@@ -1112,109 +1132,109 @@ var sparkFlashnetSignIntentParamsSchema = v24.union([
1112
1132
  sparkFlashnetCreateSingleSidedPoolIntentSchema,
1113
1133
  sparkFlashnetRemoveLiquidityIntentSchema
1114
1134
  ]);
1115
- var sparkFlashnetSignIntentResultSchema = v24.object({
1135
+ var sparkFlashnetSignIntentResultSchema = v25.object({
1116
1136
  /**
1117
1137
  * The signed intent as a hex string.
1118
1138
  */
1119
- signature: v24.string()
1139
+ signature: v25.string()
1120
1140
  });
1121
- var sparkFlashnetSignIntentRequestMessageSchema = v24.object({
1141
+ var sparkFlashnetSignIntentRequestMessageSchema = v25.object({
1122
1142
  ...rpcRequestMessageSchema.entries,
1123
- ...v24.object({
1124
- method: v24.literal(sparkFlashnetSignIntentMethodName),
1143
+ ...v25.object({
1144
+ method: v25.literal(sparkFlashnetSignIntentMethodName),
1125
1145
  params: sparkFlashnetSignIntentParamsSchema,
1126
- id: v24.string()
1146
+ id: v25.string()
1127
1147
  }).entries
1128
1148
  });
1129
1149
 
1130
1150
  // src/request/types/sparkMethods/flashnetMethods/signStructuredMessage.ts
1131
- import * as v25 from "valibot";
1151
+ import * as v26 from "valibot";
1132
1152
  var sparkFlashnetSignStructuredMessageMethodName = "spark_flashnet_signStructuredMessage";
1133
- var sparkFlashnetSignStructuredMessageParamsSchema = v25.object({
1134
- message: v25.string()
1153
+ var sparkFlashnetSignStructuredMessageParamsSchema = v26.object({
1154
+ message: v26.string()
1135
1155
  });
1136
- var sparkFlashnetSignStructuredMessageResultSchema = v25.object({
1137
- message: v25.string(),
1138
- signature: v25.string()
1156
+ var sparkFlashnetSignStructuredMessageResultSchema = v26.object({
1157
+ message: v26.string(),
1158
+ signature: v26.string()
1139
1159
  });
1140
- var sparkFlashnetSignStructuredMessageRequestMessageSchema = v25.object({
1160
+ var sparkFlashnetSignStructuredMessageRequestMessageSchema = v26.object({
1141
1161
  ...rpcRequestMessageSchema.entries,
1142
- ...v25.object({
1143
- method: v25.literal(sparkFlashnetSignStructuredMessageMethodName),
1162
+ ...v26.object({
1163
+ method: v26.literal(sparkFlashnetSignStructuredMessageMethodName),
1144
1164
  params: sparkFlashnetSignStructuredMessageParamsSchema,
1145
- id: v25.string()
1165
+ id: v26.string()
1146
1166
  }).entries
1147
1167
  });
1148
1168
 
1149
1169
  // src/request/types/sparkMethods/getAddresses.ts
1150
- import * as v26 from "valibot";
1170
+ import * as v27 from "valibot";
1151
1171
  var sparkGetAddressesMethodName = "spark_getAddresses";
1152
- var sparkGetAddressesParamsSchema = v26.nullish(
1153
- v26.object({
1172
+ var sparkGetAddressesParamsSchema = v27.nullish(
1173
+ v27.object({
1154
1174
  /**
1155
1175
  * A message to be displayed to the user in the request prompt.
1156
1176
  */
1157
- message: v26.optional(v26.string())
1177
+ message: v27.optional(v27.string())
1158
1178
  })
1159
1179
  );
1160
- var sparkGetAddressesResultSchema = v26.object({
1180
+ var sparkGetAddressesResultSchema = v27.object({
1161
1181
  /**
1162
1182
  * The addresses generated for the given purposes.
1163
1183
  */
1164
- addresses: v26.array(addressSchema),
1184
+ addresses: v27.array(addressSchema),
1165
1185
  network: getNetworkResultSchema
1166
1186
  });
1167
- var sparkGetAddressesRequestMessageSchema = v26.object({
1187
+ var sparkGetAddressesRequestMessageSchema = v27.object({
1168
1188
  ...rpcRequestMessageSchema.entries,
1169
- ...v26.object({
1170
- method: v26.literal(sparkGetAddressesMethodName),
1189
+ ...v27.object({
1190
+ method: v27.literal(sparkGetAddressesMethodName),
1171
1191
  params: sparkGetAddressesParamsSchema,
1172
- id: v26.string()
1192
+ id: v27.string()
1173
1193
  }).entries
1174
1194
  });
1175
1195
 
1176
1196
  // src/request/types/sparkMethods/getBalance.ts
1177
- import * as v27 from "valibot";
1197
+ import * as v28 from "valibot";
1178
1198
  var sparkGetBalanceMethodName = "spark_getBalance";
1179
- var sparkGetBalanceParamsSchema = v27.nullish(v27.null());
1180
- var sparkGetBalanceResultSchema = v27.object({
1199
+ var sparkGetBalanceParamsSchema = v28.nullish(v28.null());
1200
+ var sparkGetBalanceResultSchema = v28.object({
1181
1201
  /**
1182
1202
  * The Spark Bitcoin address balance in sats in string form.
1183
1203
  */
1184
- balance: v27.string(),
1185
- tokenBalances: v27.array(
1186
- v27.object({
1204
+ balance: v28.string(),
1205
+ tokenBalances: v28.array(
1206
+ v28.object({
1187
1207
  /* The address balance of the token in string form as it can overflow a js number */
1188
- balance: v27.string(),
1189
- tokenMetadata: v27.object({
1190
- tokenIdentifier: v27.string(),
1191
- tokenName: v27.string(),
1192
- tokenTicker: v27.string(),
1193
- decimals: v27.number(),
1194
- maxSupply: v27.string()
1208
+ balance: v28.string(),
1209
+ tokenMetadata: v28.object({
1210
+ tokenIdentifier: v28.string(),
1211
+ tokenName: v28.string(),
1212
+ tokenTicker: v28.string(),
1213
+ decimals: v28.number(),
1214
+ maxSupply: v28.string()
1195
1215
  })
1196
1216
  })
1197
1217
  )
1198
1218
  });
1199
- var sparkGetBalanceRequestMessageSchema = v27.object({
1219
+ var sparkGetBalanceRequestMessageSchema = v28.object({
1200
1220
  ...rpcRequestMessageSchema.entries,
1201
- ...v27.object({
1202
- method: v27.literal(sparkGetBalanceMethodName),
1221
+ ...v28.object({
1222
+ method: v28.literal(sparkGetBalanceMethodName),
1203
1223
  params: sparkGetBalanceParamsSchema,
1204
- id: v27.string()
1224
+ id: v28.string()
1205
1225
  }).entries
1206
1226
  });
1207
1227
 
1208
1228
  // src/request/types/sparkMethods/signMessage.ts
1209
- import * as v28 from "valibot";
1229
+ import * as v29 from "valibot";
1210
1230
  var sparkSignMessageMethodName = "spark_signMessage";
1211
- var sparkSignMessageParamsSchema = v28.object({
1231
+ var sparkSignMessageParamsSchema = v29.object({
1212
1232
  /**
1213
1233
  * The message to sign. The message should only consist of valid UTF-8 characters.
1214
1234
  */
1215
- message: v28.string()
1235
+ message: v29.string()
1216
1236
  });
1217
- var sparkSignMessageResultSchema = v28.object({
1237
+ var sparkSignMessageResultSchema = v29.object({
1218
1238
  /**
1219
1239
  * The signature, encoded in base64, of the message hash.
1220
1240
  *
@@ -1222,98 +1242,98 @@ var sparkSignMessageResultSchema = v28.object({
1222
1242
  * and the resulting byte array is hashed with SHA256 before signing
1223
1243
  * with the private key.
1224
1244
  */
1225
- signature: v28.string()
1245
+ signature: v29.string()
1226
1246
  });
1227
- var sparkSignMessageRequestMessageSchema = v28.object({
1247
+ var sparkSignMessageRequestMessageSchema = v29.object({
1228
1248
  ...rpcRequestMessageSchema.entries,
1229
- ...v28.object({
1230
- method: v28.literal(sparkSignMessageMethodName),
1249
+ ...v29.object({
1250
+ method: v29.literal(sparkSignMessageMethodName),
1231
1251
  params: sparkSignMessageParamsSchema,
1232
- id: v28.string()
1252
+ id: v29.string()
1233
1253
  }).entries
1234
1254
  });
1235
1255
 
1236
1256
  // src/request/types/sparkMethods/transfer.ts
1237
- import * as v29 from "valibot";
1257
+ import * as v30 from "valibot";
1238
1258
  var sparkTransferMethodName = "spark_transfer";
1239
- var sparkTransferParamsSchema = v29.object({
1259
+ var sparkTransferParamsSchema = v30.object({
1240
1260
  /**
1241
1261
  * Amount of SATS to transfer as a string or number.
1242
1262
  */
1243
- amountSats: v29.union([v29.number(), v29.string()]),
1263
+ amountSats: v30.union([v30.number(), v30.string()]),
1244
1264
  /**
1245
1265
  * The recipient's spark address.
1246
1266
  */
1247
- receiverSparkAddress: v29.string()
1267
+ receiverSparkAddress: v30.string()
1248
1268
  });
1249
- var sparkTransferResultSchema = v29.object({
1269
+ var sparkTransferResultSchema = v30.object({
1250
1270
  /**
1251
1271
  * The ID of the transaction.
1252
1272
  */
1253
- id: v29.string()
1273
+ id: v30.string()
1254
1274
  });
1255
- var sparkTransferRequestMessageSchema = v29.object({
1275
+ var sparkTransferRequestMessageSchema = v30.object({
1256
1276
  ...rpcRequestMessageSchema.entries,
1257
- ...v29.object({
1258
- method: v29.literal(sparkTransferMethodName),
1277
+ ...v30.object({
1278
+ method: v30.literal(sparkTransferMethodName),
1259
1279
  params: sparkTransferParamsSchema,
1260
- id: v29.string()
1280
+ id: v30.string()
1261
1281
  }).entries
1262
1282
  });
1263
1283
 
1264
1284
  // src/request/types/sparkMethods/transferToken.ts
1265
- import * as v30 from "valibot";
1285
+ import * as v31 from "valibot";
1266
1286
  var sparkTransferTokenMethodName = "spark_transferToken";
1267
- var sparkTransferTokenParamsSchema = v30.object({
1287
+ var sparkTransferTokenParamsSchema = v31.object({
1268
1288
  /**
1269
1289
  * Amount of units of the token to transfer as a string or number.
1270
1290
  */
1271
- tokenAmount: v30.union([v30.number(), v30.string()]),
1291
+ tokenAmount: v31.union([v31.number(), v31.string()]),
1272
1292
  /**
1273
1293
  * The Bech32m token identifier.
1274
1294
  */
1275
- tokenIdentifier: v30.string(),
1295
+ tokenIdentifier: v31.string(),
1276
1296
  /**
1277
1297
  * The recipient's spark address.
1278
1298
  */
1279
- receiverSparkAddress: v30.string()
1299
+ receiverSparkAddress: v31.string()
1280
1300
  });
1281
- var sparkTransferTokenResultSchema = v30.object({
1301
+ var sparkTransferTokenResultSchema = v31.object({
1282
1302
  /**
1283
1303
  * The ID of the transaction.
1284
1304
  */
1285
- id: v30.string()
1305
+ id: v31.string()
1286
1306
  });
1287
- var sparkTransferTokenRequestMessageSchema = v30.object({
1307
+ var sparkTransferTokenRequestMessageSchema = v31.object({
1288
1308
  ...rpcRequestMessageSchema.entries,
1289
- ...v30.object({
1290
- method: v30.literal(sparkTransferTokenMethodName),
1309
+ ...v31.object({
1310
+ method: v31.literal(sparkTransferTokenMethodName),
1291
1311
  params: sparkTransferTokenParamsSchema,
1292
- id: v30.string()
1312
+ id: v31.string()
1293
1313
  }).entries
1294
1314
  });
1295
1315
 
1296
1316
  // src/request/types/stxMethods/callContract.ts
1297
- import * as v31 from "valibot";
1317
+ import * as v32 from "valibot";
1298
1318
  var stxCallContractMethodName = "stx_callContract";
1299
- var stxCallContractParamsSchema = v31.object({
1319
+ var stxCallContractParamsSchema = v32.object({
1300
1320
  /**
1301
1321
  * The contract principal.
1302
1322
  *
1303
1323
  * E.g. `"SPKE...GD5C.my-contract"`
1304
1324
  */
1305
- contract: v31.string(),
1325
+ contract: v32.string(),
1306
1326
  /**
1307
1327
  * The name of the function to call.
1308
1328
  *
1309
1329
  * Note: spec changes ongoing,
1310
1330
  * https://github.com/stacksgov/sips/pull/166#pullrequestreview-1914236999
1311
1331
  */
1312
- functionName: v31.string(),
1332
+ functionName: v32.string(),
1313
1333
  /**
1314
1334
  * @deprecated in favor of `functionArgs` for @stacks/connect compatibility
1315
1335
  */
1316
- arguments: v31.optional(v31.array(v31.string())),
1336
+ arguments: v32.optional(v32.array(v32.string())),
1317
1337
  /**
1318
1338
  * The function's arguments. The arguments are expected to be hex-encoded
1319
1339
  * strings of Clarity values.
@@ -1328,274 +1348,274 @@ var stxCallContractParamsSchema = v31.object({
1328
1348
  * const hexArgs = functionArgs.map(cvToHex);
1329
1349
  * ```
1330
1350
  */
1331
- functionArgs: v31.optional(v31.array(v31.string())),
1351
+ functionArgs: v32.optional(v32.array(v32.string())),
1332
1352
  /**
1333
1353
  * The post conditions to apply to the contract call.
1334
1354
  */
1335
- postConditions: v31.optional(v31.array(v31.string())),
1355
+ postConditions: v32.optional(v32.array(v32.string())),
1336
1356
  /**
1337
1357
  * The mode to apply to the post conditions.
1338
1358
  */
1339
- postConditionMode: v31.optional(v31.union([v31.literal("allow"), v31.literal("deny")]))
1359
+ postConditionMode: v32.optional(v32.union([v32.literal("allow"), v32.literal("deny")]))
1340
1360
  });
1341
- var stxCallContractResultSchema = v31.object({
1361
+ var stxCallContractResultSchema = v32.object({
1342
1362
  /**
1343
1363
  * The ID of the transaction.
1344
1364
  */
1345
- txid: v31.string(),
1365
+ txid: v32.string(),
1346
1366
  /**
1347
1367
  * A Stacks transaction as a hex-encoded string.
1348
1368
  */
1349
- transaction: v31.string()
1369
+ transaction: v32.string()
1350
1370
  });
1351
- var stxCallContractRequestMessageSchema = v31.object({
1371
+ var stxCallContractRequestMessageSchema = v32.object({
1352
1372
  ...rpcRequestMessageSchema.entries,
1353
- ...v31.object({
1354
- method: v31.literal(stxCallContractMethodName),
1373
+ ...v32.object({
1374
+ method: v32.literal(stxCallContractMethodName),
1355
1375
  params: stxCallContractParamsSchema,
1356
- id: v31.string()
1376
+ id: v32.string()
1357
1377
  }).entries
1358
1378
  });
1359
1379
 
1360
1380
  // src/request/types/stxMethods/deployContract.ts
1361
- import * as v32 from "valibot";
1381
+ import * as v33 from "valibot";
1362
1382
  var stxDeployContractMethodName = "stx_deployContract";
1363
- var stxDeployContractParamsSchema = v32.object({
1383
+ var stxDeployContractParamsSchema = v33.object({
1364
1384
  /**
1365
1385
  * Name of the contract.
1366
1386
  */
1367
- name: v32.string(),
1387
+ name: v33.string(),
1368
1388
  /**
1369
1389
  * The source code of the Clarity contract.
1370
1390
  */
1371
- clarityCode: v32.string(),
1391
+ clarityCode: v33.string(),
1372
1392
  /**
1373
1393
  * The version of the Clarity contract.
1374
1394
  */
1375
- clarityVersion: v32.optional(v32.number()),
1395
+ clarityVersion: v33.optional(v33.number()),
1376
1396
  /**
1377
1397
  * The post conditions to apply to the contract call.
1378
1398
  */
1379
- postConditions: v32.optional(v32.array(v32.string())),
1399
+ postConditions: v33.optional(v33.array(v33.string())),
1380
1400
  /**
1381
1401
  * The mode to apply to the post conditions.
1382
1402
  */
1383
- postConditionMode: v32.optional(v32.union([v32.literal("allow"), v32.literal("deny")]))
1403
+ postConditionMode: v33.optional(v33.union([v33.literal("allow"), v33.literal("deny")]))
1384
1404
  });
1385
- var stxDeployContractResultSchema = v32.object({
1405
+ var stxDeployContractResultSchema = v33.object({
1386
1406
  /**
1387
1407
  * The ID of the transaction.
1388
1408
  */
1389
- txid: v32.string(),
1409
+ txid: v33.string(),
1390
1410
  /**
1391
1411
  * A Stacks transaction as a hex-encoded string.
1392
1412
  */
1393
- transaction: v32.string()
1413
+ transaction: v33.string()
1394
1414
  });
1395
- var stxDeployContractRequestMessageSchema = v32.object({
1415
+ var stxDeployContractRequestMessageSchema = v33.object({
1396
1416
  ...rpcRequestMessageSchema.entries,
1397
- ...v32.object({
1398
- method: v32.literal(stxDeployContractMethodName),
1417
+ ...v33.object({
1418
+ method: v33.literal(stxDeployContractMethodName),
1399
1419
  params: stxDeployContractParamsSchema,
1400
- id: v32.string()
1420
+ id: v33.string()
1401
1421
  }).entries
1402
1422
  });
1403
1423
 
1404
1424
  // src/request/types/stxMethods/getAccounts.ts
1405
- import * as v33 from "valibot";
1425
+ import * as v34 from "valibot";
1406
1426
  var stxGetAccountsMethodName = "stx_getAccounts";
1407
- var stxGetAccountsParamsSchema = v33.nullish(v33.null());
1408
- var stxGetAccountsResultSchema = v33.object({
1427
+ var stxGetAccountsParamsSchema = v34.nullish(v34.null());
1428
+ var stxGetAccountsResultSchema = v34.object({
1409
1429
  /**
1410
1430
  * The addresses generated for the given purposes.
1411
1431
  */
1412
- addresses: v33.array(
1413
- v33.object({
1414
- address: v33.string(),
1415
- publicKey: v33.string(),
1416
- gaiaHubUrl: v33.string(),
1417
- gaiaAppKey: v33.string()
1432
+ addresses: v34.array(
1433
+ v34.object({
1434
+ address: v34.string(),
1435
+ publicKey: v34.string(),
1436
+ gaiaHubUrl: v34.string(),
1437
+ gaiaAppKey: v34.string()
1418
1438
  })
1419
1439
  ),
1420
1440
  network: getNetworkResultSchema
1421
1441
  });
1422
- var stxGetAccountsRequestMessageSchema = v33.object({
1442
+ var stxGetAccountsRequestMessageSchema = v34.object({
1423
1443
  ...rpcRequestMessageSchema.entries,
1424
- ...v33.object({
1425
- method: v33.literal(stxGetAccountsMethodName),
1444
+ ...v34.object({
1445
+ method: v34.literal(stxGetAccountsMethodName),
1426
1446
  params: stxGetAccountsParamsSchema,
1427
- id: v33.string()
1447
+ id: v34.string()
1428
1448
  }).entries
1429
1449
  });
1430
1450
 
1431
1451
  // src/request/types/stxMethods/getAddresses.ts
1432
- import * as v34 from "valibot";
1452
+ import * as v35 from "valibot";
1433
1453
  var stxGetAddressesMethodName = "stx_getAddresses";
1434
- var stxGetAddressesParamsSchema = v34.nullish(
1435
- v34.object({
1454
+ var stxGetAddressesParamsSchema = v35.nullish(
1455
+ v35.object({
1436
1456
  /**
1437
1457
  * A message to be displayed to the user in the request prompt.
1438
1458
  */
1439
- message: v34.optional(v34.string())
1459
+ message: v35.optional(v35.string())
1440
1460
  })
1441
1461
  );
1442
- var stxGetAddressesResultSchema = v34.object({
1462
+ var stxGetAddressesResultSchema = v35.object({
1443
1463
  /**
1444
1464
  * The addresses generated for the given purposes.
1445
1465
  */
1446
- addresses: v34.array(addressSchema),
1466
+ addresses: v35.array(addressSchema),
1447
1467
  network: getNetworkResultSchema
1448
1468
  });
1449
- var stxGetAddressesRequestMessageSchema = v34.object({
1469
+ var stxGetAddressesRequestMessageSchema = v35.object({
1450
1470
  ...rpcRequestMessageSchema.entries,
1451
- ...v34.object({
1452
- method: v34.literal(stxGetAddressesMethodName),
1471
+ ...v35.object({
1472
+ method: v35.literal(stxGetAddressesMethodName),
1453
1473
  params: stxGetAddressesParamsSchema,
1454
- id: v34.string()
1474
+ id: v35.string()
1455
1475
  }).entries
1456
1476
  });
1457
1477
 
1458
1478
  // src/request/types/stxMethods/signMessage.ts
1459
- import * as v35 from "valibot";
1479
+ import * as v36 from "valibot";
1460
1480
  var stxSignMessageMethodName = "stx_signMessage";
1461
- var stxSignMessageParamsSchema = v35.object({
1481
+ var stxSignMessageParamsSchema = v36.object({
1462
1482
  /**
1463
1483
  * The message to sign.
1464
1484
  */
1465
- message: v35.string()
1485
+ message: v36.string()
1466
1486
  });
1467
- var stxSignMessageResultSchema = v35.object({
1487
+ var stxSignMessageResultSchema = v36.object({
1468
1488
  /**
1469
1489
  * The signature of the message.
1470
1490
  */
1471
- signature: v35.string(),
1491
+ signature: v36.string(),
1472
1492
  /**
1473
1493
  * The public key used to sign the message.
1474
1494
  */
1475
- publicKey: v35.string()
1495
+ publicKey: v36.string()
1476
1496
  });
1477
- var stxSignMessageRequestMessageSchema = v35.object({
1497
+ var stxSignMessageRequestMessageSchema = v36.object({
1478
1498
  ...rpcRequestMessageSchema.entries,
1479
- ...v35.object({
1480
- method: v35.literal(stxSignMessageMethodName),
1499
+ ...v36.object({
1500
+ method: v36.literal(stxSignMessageMethodName),
1481
1501
  params: stxSignMessageParamsSchema,
1482
- id: v35.string()
1502
+ id: v36.string()
1483
1503
  }).entries
1484
1504
  });
1485
1505
 
1486
1506
  // src/request/types/stxMethods/signStructuredMessage.ts
1487
- import * as v36 from "valibot";
1507
+ import * as v37 from "valibot";
1488
1508
  var stxSignStructuredMessageMethodName = "stx_signStructuredMessage";
1489
- var stxSignStructuredMessageParamsSchema = v36.object({
1509
+ var stxSignStructuredMessageParamsSchema = v37.object({
1490
1510
  /**
1491
1511
  * The domain to be signed.
1492
1512
  */
1493
- domain: v36.string(),
1513
+ domain: v37.string(),
1494
1514
  /**
1495
1515
  * Message payload to be signed.
1496
1516
  */
1497
- message: v36.string(),
1517
+ message: v37.string(),
1498
1518
  /**
1499
1519
  * The public key to sign the message with.
1500
1520
  */
1501
- publicKey: v36.optional(v36.string())
1521
+ publicKey: v37.optional(v37.string())
1502
1522
  });
1503
- var stxSignStructuredMessageResultSchema = v36.object({
1523
+ var stxSignStructuredMessageResultSchema = v37.object({
1504
1524
  /**
1505
1525
  * Signature of the message.
1506
1526
  */
1507
- signature: v36.string(),
1527
+ signature: v37.string(),
1508
1528
  /**
1509
1529
  * Public key as hex-encoded string.
1510
1530
  */
1511
- publicKey: v36.string()
1531
+ publicKey: v37.string()
1512
1532
  });
1513
- var stxSignStructuredMessageRequestMessageSchema = v36.object({
1533
+ var stxSignStructuredMessageRequestMessageSchema = v37.object({
1514
1534
  ...rpcRequestMessageSchema.entries,
1515
- ...v36.object({
1516
- method: v36.literal(stxSignStructuredMessageMethodName),
1535
+ ...v37.object({
1536
+ method: v37.literal(stxSignStructuredMessageMethodName),
1517
1537
  params: stxSignStructuredMessageParamsSchema,
1518
- id: v36.string()
1538
+ id: v37.string()
1519
1539
  }).entries
1520
1540
  });
1521
1541
 
1522
1542
  // src/request/types/stxMethods/signTransaction.ts
1523
- import * as v37 from "valibot";
1543
+ import * as v38 from "valibot";
1524
1544
  var stxSignTransactionMethodName = "stx_signTransaction";
1525
- var stxSignTransactionParamsSchema = v37.object({
1545
+ var stxSignTransactionParamsSchema = v38.object({
1526
1546
  /**
1527
1547
  * The transaction to sign as a hex-encoded string.
1528
1548
  */
1529
- transaction: v37.string(),
1549
+ transaction: v38.string(),
1530
1550
  /**
1531
1551
  * The public key to sign the transaction with. The wallet may use any key
1532
1552
  * when not provided.
1533
1553
  */
1534
- pubkey: v37.optional(v37.string()),
1554
+ pubkey: v38.optional(v38.string()),
1535
1555
  /**
1536
1556
  * Whether to broadcast the transaction after signing. Defaults to `true`.
1537
1557
  */
1538
- broadcast: v37.optional(v37.boolean())
1558
+ broadcast: v38.optional(v38.boolean())
1539
1559
  });
1540
- var stxSignTransactionResultSchema = v37.object({
1560
+ var stxSignTransactionResultSchema = v38.object({
1541
1561
  /**
1542
1562
  * The signed transaction as a hex-encoded string.
1543
1563
  */
1544
- transaction: v37.string()
1564
+ transaction: v38.string()
1545
1565
  });
1546
- var stxSignTransactionRequestMessageSchema = v37.object({
1566
+ var stxSignTransactionRequestMessageSchema = v38.object({
1547
1567
  ...rpcRequestMessageSchema.entries,
1548
- ...v37.object({
1549
- method: v37.literal(stxSignTransactionMethodName),
1568
+ ...v38.object({
1569
+ method: v38.literal(stxSignTransactionMethodName),
1550
1570
  params: stxSignTransactionParamsSchema,
1551
- id: v37.string()
1571
+ id: v38.string()
1552
1572
  }).entries
1553
1573
  });
1554
1574
 
1555
1575
  // src/request/types/stxMethods/signTransactions.ts
1556
- import * as v38 from "valibot";
1576
+ import * as v39 from "valibot";
1557
1577
  var stxSignTransactionsMethodName = "stx_signTransactions";
1558
- var stxSignTransactionsParamsSchema = v38.object({
1578
+ var stxSignTransactionsParamsSchema = v39.object({
1559
1579
  /**
1560
1580
  * The transactions to sign as hex-encoded strings.
1561
1581
  */
1562
- transactions: v38.pipe(
1563
- v38.array(
1564
- v38.pipe(
1565
- v38.string(),
1566
- v38.check((hex) => {
1582
+ transactions: v39.pipe(
1583
+ v39.array(
1584
+ v39.pipe(
1585
+ v39.string(),
1586
+ v39.check((hex) => {
1567
1587
  return true;
1568
1588
  }, "Invalid hex-encoded Stacks transaction.")
1569
1589
  )
1570
1590
  ),
1571
- v38.minLength(1)
1591
+ v39.minLength(1)
1572
1592
  ),
1573
1593
  /**
1574
1594
  * Whether the signed transactions should be broadcast after signing. Defaults
1575
1595
  * to `true`.
1576
1596
  */
1577
- broadcast: v38.optional(v38.boolean())
1597
+ broadcast: v39.optional(v39.boolean())
1578
1598
  });
1579
- var stxSignTransactionsResultSchema = v38.object({
1599
+ var stxSignTransactionsResultSchema = v39.object({
1580
1600
  /**
1581
1601
  * The signed transactions as hex-encoded strings, in the same order as in the
1582
1602
  * sign request.
1583
1603
  */
1584
- transactions: v38.array(v38.string())
1604
+ transactions: v39.array(v39.string())
1585
1605
  });
1586
- var stxSignTransactionsRequestMessageSchema = v38.object({
1606
+ var stxSignTransactionsRequestMessageSchema = v39.object({
1587
1607
  ...rpcRequestMessageSchema.entries,
1588
- ...v38.object({
1589
- method: v38.literal(stxSignTransactionsMethodName),
1608
+ ...v39.object({
1609
+ method: v39.literal(stxSignTransactionsMethodName),
1590
1610
  params: stxSignTransactionsParamsSchema,
1591
- id: v38.string()
1611
+ id: v39.string()
1592
1612
  }).entries
1593
1613
  });
1594
1614
 
1595
1615
  // src/request/types/stxMethods/transferStx.ts
1596
- import * as v39 from "valibot";
1616
+ import * as v40 from "valibot";
1597
1617
  var stxTransferStxMethodName = "stx_transferStx";
1598
- var stxTransferStxParamsSchema = v39.object({
1618
+ var stxTransferStxParamsSchema = v40.object({
1599
1619
  /**
1600
1620
  * Amount of STX tokens to transfer in microstacks as a string. Anything
1601
1621
  * parseable by `BigInt` is acceptable.
@@ -1608,23 +1628,23 @@ var stxTransferStxParamsSchema = v39.object({
1608
1628
  * const amount3 = '1234';
1609
1629
  * ```
1610
1630
  */
1611
- amount: v39.union([v39.number(), v39.string()]),
1631
+ amount: v40.union([v40.number(), v40.string()]),
1612
1632
  /**
1613
1633
  * The recipient's principal.
1614
1634
  */
1615
- recipient: v39.string(),
1635
+ recipient: v40.string(),
1616
1636
  /**
1617
1637
  * A string representing the memo.
1618
1638
  */
1619
- memo: v39.optional(v39.string()),
1639
+ memo: v40.optional(v40.string()),
1620
1640
  /**
1621
1641
  * Version of parameter format.
1622
1642
  */
1623
- version: v39.optional(v39.string()),
1643
+ version: v40.optional(v40.string()),
1624
1644
  /**
1625
1645
  * The mode of the post conditions.
1626
1646
  */
1627
- postConditionMode: v39.optional(v39.number()),
1647
+ postConditionMode: v40.optional(v40.number()),
1628
1648
  /**
1629
1649
  * A hex-encoded string representing the post conditions.
1630
1650
  *
@@ -1637,29 +1657,29 @@ var stxTransferStxParamsSchema = v39.object({
1637
1657
  * const hexPostCondition = serializePostCondition(postCondition).toString('hex');
1638
1658
  * ```
1639
1659
  */
1640
- postConditions: v39.optional(v39.array(v39.string())),
1660
+ postConditions: v40.optional(v40.array(v40.string())),
1641
1661
  /**
1642
1662
  * The public key to sign the transaction with. The wallet may use any key
1643
1663
  * when not provided.
1644
1664
  */
1645
- pubkey: v39.optional(v39.string())
1665
+ pubkey: v40.optional(v40.string())
1646
1666
  });
1647
- var stxTransferStxResultSchema = v39.object({
1667
+ var stxTransferStxResultSchema = v40.object({
1648
1668
  /**
1649
1669
  * The ID of the transaction.
1650
1670
  */
1651
- txid: v39.string(),
1671
+ txid: v40.string(),
1652
1672
  /**
1653
1673
  * A Stacks transaction as a hex-encoded string.
1654
1674
  */
1655
- transaction: v39.string()
1675
+ transaction: v40.string()
1656
1676
  });
1657
- var stxTransferStxRequestMessageSchema = v39.object({
1677
+ var stxTransferStxRequestMessageSchema = v40.object({
1658
1678
  ...rpcRequestMessageSchema.entries,
1659
- ...v39.object({
1660
- method: v39.literal(stxTransferStxMethodName),
1679
+ ...v40.object({
1680
+ method: v40.literal(stxTransferStxMethodName),
1661
1681
  params: stxTransferStxParamsSchema,
1662
- id: v39.string()
1682
+ id: v40.string()
1663
1683
  }).entries
1664
1684
  });
1665
1685
 
@@ -1667,13 +1687,13 @@ var stxTransferStxRequestMessageSchema = v39.object({
1667
1687
  var cache = {};
1668
1688
  var requestInternal = async (provider, method, params) => {
1669
1689
  const response = await provider.request(method, params);
1670
- if (v40.is(rpcErrorResponseMessageSchema, response)) {
1690
+ if (v41.is(rpcErrorResponseMessageSchema, response)) {
1671
1691
  return {
1672
1692
  status: "error",
1673
1693
  error: response.error
1674
1694
  };
1675
1695
  }
1676
- if (v40.is(rpcSuccessResponseMessageSchema, response)) {
1696
+ if (v41.is(rpcSuccessResponseMessageSchema, response)) {
1677
1697
  return {
1678
1698
  status: "success",
1679
1699
  result: response.result
@@ -2901,6 +2921,10 @@ export {
2901
2921
  sparkGetBalanceParamsSchema,
2902
2922
  sparkGetBalanceRequestMessageSchema,
2903
2923
  sparkGetBalanceResultSchema,
2924
+ sparkGetEligibleClawbackTransactionsMethodName,
2925
+ sparkGetEligibleClawbackTransactionsParamsSchema,
2926
+ sparkGetEligibleClawbackTransactionsRequestMessageSchema,
2927
+ sparkGetEligibleClawbackTransactionsResultSchema,
2904
2928
  sparkSignMessageMethodName,
2905
2929
  sparkSignMessageParamsSchema,
2906
2930
  sparkSignMessageRequestMessageSchema,