@sats-connect/core 0.8.2-b625163 → 0.8.2

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