@sats-connect/core 0.8.0 → 0.8.1-db15ee7

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
@@ -192,7 +192,7 @@ function getSupportedWallets() {
192
192
  }
193
193
 
194
194
  // src/request/index.ts
195
- import * as v25 from "valibot";
195
+ import * as v26 from "valibot";
196
196
 
197
197
  // src/request/types/btcMethods.ts
198
198
  import * as v6 from "valibot";
@@ -864,87 +864,108 @@ var sparkGetBalanceRequestMessageSchema = v13.object({
864
864
  }).entries
865
865
  });
866
866
 
867
- // src/request/types/sparkMethods/transfer.ts
867
+ // src/request/types/sparkMethods/signMessage.ts
868
868
  import * as v14 from "valibot";
869
+ var sparkSignMessageMethodName = "spark_signMessage";
870
+ var sparkSignMessageParamsSchema = v14.object({
871
+ message: v14.string()
872
+ });
873
+ var sparkSignMessageResultSchema = v14.object({
874
+ /**
875
+ * The signature for the message in hex format
876
+ */
877
+ signature: v14.string()
878
+ });
879
+ var sparkSignMessageRequestMessageSchema = v14.object({
880
+ ...rpcRequestMessageSchema.entries,
881
+ ...v14.object({
882
+ method: v14.literal(sparkSignMessageMethodName),
883
+ params: sparkSignMessageParamsSchema,
884
+ id: v14.string()
885
+ }).entries
886
+ });
887
+
888
+ // src/request/types/sparkMethods/transfer.ts
889
+ import * as v15 from "valibot";
869
890
  var sparkTransferMethodName = "spark_transfer";
870
- var sparkTransferParamsSchema = v14.object({
891
+ var sparkTransferParamsSchema = v15.object({
871
892
  /**
872
893
  * Amount of SATS to transfer as a string or number.
873
894
  */
874
- amountSats: v14.union([v14.number(), v14.string()]),
895
+ amountSats: v15.union([v15.number(), v15.string()]),
875
896
  /**
876
897
  * The recipient's spark address.
877
898
  */
878
- receiverSparkAddress: v14.string()
899
+ receiverSparkAddress: v15.string()
879
900
  });
880
- var sparkTransferResultSchema = v14.object({
901
+ var sparkTransferResultSchema = v15.object({
881
902
  /**
882
903
  * The ID of the transaction.
883
904
  */
884
- id: v14.string()
905
+ id: v15.string()
885
906
  });
886
- var sparkTransferRequestMessageSchema = v14.object({
907
+ var sparkTransferRequestMessageSchema = v15.object({
887
908
  ...rpcRequestMessageSchema.entries,
888
- ...v14.object({
889
- method: v14.literal(sparkTransferMethodName),
909
+ ...v15.object({
910
+ method: v15.literal(sparkTransferMethodName),
890
911
  params: sparkTransferParamsSchema,
891
- id: v14.string()
912
+ id: v15.string()
892
913
  }).entries
893
914
  });
894
915
 
895
916
  // src/request/types/sparkMethods/transferToken.ts
896
- import * as v15 from "valibot";
917
+ import * as v16 from "valibot";
897
918
  var sparkTransferTokenMethodName = "spark_transferToken";
898
- var sparkTransferTokenParamsSchema = v15.object({
919
+ var sparkTransferTokenParamsSchema = v16.object({
899
920
  /**
900
921
  * Amount of units of the token to transfer as a string or number.
901
922
  */
902
- tokenAmount: v15.union([v15.number(), v15.string()]),
923
+ tokenAmount: v16.union([v16.number(), v16.string()]),
903
924
  /**
904
925
  * The Bech32m token identifier.
905
926
  */
906
- tokenIdentifier: v15.string(),
927
+ tokenIdentifier: v16.string(),
907
928
  /**
908
929
  * The recipient's spark address.
909
930
  */
910
- receiverSparkAddress: v15.string()
931
+ receiverSparkAddress: v16.string()
911
932
  });
912
- var sparkTransferTokenResultSchema = v15.object({
933
+ var sparkTransferTokenResultSchema = v16.object({
913
934
  /**
914
935
  * The ID of the transaction.
915
936
  */
916
- id: v15.string()
937
+ id: v16.string()
917
938
  });
918
- var sparkTransferTokenRequestMessageSchema = v15.object({
939
+ var sparkTransferTokenRequestMessageSchema = v16.object({
919
940
  ...rpcRequestMessageSchema.entries,
920
- ...v15.object({
921
- method: v15.literal(sparkTransferTokenMethodName),
941
+ ...v16.object({
942
+ method: v16.literal(sparkTransferTokenMethodName),
922
943
  params: sparkTransferTokenParamsSchema,
923
- id: v15.string()
944
+ id: v16.string()
924
945
  }).entries
925
946
  });
926
947
 
927
948
  // src/request/types/stxMethods/callContract.ts
928
- import * as v16 from "valibot";
949
+ import * as v17 from "valibot";
929
950
  var stxCallContractMethodName = "stx_callContract";
930
- var stxCallContractParamsSchema = v16.object({
951
+ var stxCallContractParamsSchema = v17.object({
931
952
  /**
932
953
  * The contract principal.
933
954
  *
934
955
  * E.g. `"SPKE...GD5C.my-contract"`
935
956
  */
936
- contract: v16.string(),
957
+ contract: v17.string(),
937
958
  /**
938
959
  * The name of the function to call.
939
960
  *
940
961
  * Note: spec changes ongoing,
941
962
  * https://github.com/stacksgov/sips/pull/166#pullrequestreview-1914236999
942
963
  */
943
- functionName: v16.string(),
964
+ functionName: v17.string(),
944
965
  /**
945
966
  * @deprecated in favor of `functionArgs` for @stacks/connect compatibility
946
967
  */
947
- arguments: v16.optional(v16.array(v16.string())),
968
+ arguments: v17.optional(v17.array(v17.string())),
948
969
  /**
949
970
  * The function's arguments. The arguments are expected to be hex-encoded
950
971
  * strings of Clarity values.
@@ -959,274 +980,274 @@ var stxCallContractParamsSchema = v16.object({
959
980
  * const hexArgs = functionArgs.map(cvToHex);
960
981
  * ```
961
982
  */
962
- functionArgs: v16.optional(v16.array(v16.string())),
983
+ functionArgs: v17.optional(v17.array(v17.string())),
963
984
  /**
964
985
  * The post conditions to apply to the contract call.
965
986
  */
966
- postConditions: v16.optional(v16.array(v16.string())),
987
+ postConditions: v17.optional(v17.array(v17.string())),
967
988
  /**
968
989
  * The mode to apply to the post conditions.
969
990
  */
970
- postConditionMode: v16.optional(v16.union([v16.literal("allow"), v16.literal("deny")]))
991
+ postConditionMode: v17.optional(v17.union([v17.literal("allow"), v17.literal("deny")]))
971
992
  });
972
- var stxCallContractResultSchema = v16.object({
993
+ var stxCallContractResultSchema = v17.object({
973
994
  /**
974
995
  * The ID of the transaction.
975
996
  */
976
- txid: v16.string(),
997
+ txid: v17.string(),
977
998
  /**
978
999
  * A Stacks transaction as a hex-encoded string.
979
1000
  */
980
- transaction: v16.string()
1001
+ transaction: v17.string()
981
1002
  });
982
- var stxCallContractRequestMessageSchema = v16.object({
1003
+ var stxCallContractRequestMessageSchema = v17.object({
983
1004
  ...rpcRequestMessageSchema.entries,
984
- ...v16.object({
985
- method: v16.literal(stxCallContractMethodName),
1005
+ ...v17.object({
1006
+ method: v17.literal(stxCallContractMethodName),
986
1007
  params: stxCallContractParamsSchema,
987
- id: v16.string()
1008
+ id: v17.string()
988
1009
  }).entries
989
1010
  });
990
1011
 
991
1012
  // src/request/types/stxMethods/deployContract.ts
992
- import * as v17 from "valibot";
1013
+ import * as v18 from "valibot";
993
1014
  var stxDeployContractMethodName = "stx_deployContract";
994
- var stxDeployContractParamsSchema = v17.object({
1015
+ var stxDeployContractParamsSchema = v18.object({
995
1016
  /**
996
1017
  * Name of the contract.
997
1018
  */
998
- name: v17.string(),
1019
+ name: v18.string(),
999
1020
  /**
1000
1021
  * The source code of the Clarity contract.
1001
1022
  */
1002
- clarityCode: v17.string(),
1023
+ clarityCode: v18.string(),
1003
1024
  /**
1004
1025
  * The version of the Clarity contract.
1005
1026
  */
1006
- clarityVersion: v17.optional(v17.number()),
1027
+ clarityVersion: v18.optional(v18.number()),
1007
1028
  /**
1008
1029
  * The post conditions to apply to the contract call.
1009
1030
  */
1010
- postConditions: v17.optional(v17.array(v17.string())),
1031
+ postConditions: v18.optional(v18.array(v18.string())),
1011
1032
  /**
1012
1033
  * The mode to apply to the post conditions.
1013
1034
  */
1014
- postConditionMode: v17.optional(v17.union([v17.literal("allow"), v17.literal("deny")]))
1035
+ postConditionMode: v18.optional(v18.union([v18.literal("allow"), v18.literal("deny")]))
1015
1036
  });
1016
- var stxDeployContractResultSchema = v17.object({
1037
+ var stxDeployContractResultSchema = v18.object({
1017
1038
  /**
1018
1039
  * The ID of the transaction.
1019
1040
  */
1020
- txid: v17.string(),
1041
+ txid: v18.string(),
1021
1042
  /**
1022
1043
  * A Stacks transaction as a hex-encoded string.
1023
1044
  */
1024
- transaction: v17.string()
1045
+ transaction: v18.string()
1025
1046
  });
1026
- var stxDeployContractRequestMessageSchema = v17.object({
1047
+ var stxDeployContractRequestMessageSchema = v18.object({
1027
1048
  ...rpcRequestMessageSchema.entries,
1028
- ...v17.object({
1029
- method: v17.literal(stxDeployContractMethodName),
1049
+ ...v18.object({
1050
+ method: v18.literal(stxDeployContractMethodName),
1030
1051
  params: stxDeployContractParamsSchema,
1031
- id: v17.string()
1052
+ id: v18.string()
1032
1053
  }).entries
1033
1054
  });
1034
1055
 
1035
1056
  // src/request/types/stxMethods/getAccounts.ts
1036
- import * as v18 from "valibot";
1057
+ import * as v19 from "valibot";
1037
1058
  var stxGetAccountsMethodName = "stx_getAccounts";
1038
- var stxGetAccountsParamsSchema = v18.nullish(v18.null());
1039
- var stxGetAccountsResultSchema = v18.object({
1059
+ var stxGetAccountsParamsSchema = v19.nullish(v19.null());
1060
+ var stxGetAccountsResultSchema = v19.object({
1040
1061
  /**
1041
1062
  * The addresses generated for the given purposes.
1042
1063
  */
1043
- addresses: v18.array(
1044
- v18.object({
1045
- address: v18.string(),
1046
- publicKey: v18.string(),
1047
- gaiaHubUrl: v18.string(),
1048
- gaiaAppKey: v18.string()
1064
+ addresses: v19.array(
1065
+ v19.object({
1066
+ address: v19.string(),
1067
+ publicKey: v19.string(),
1068
+ gaiaHubUrl: v19.string(),
1069
+ gaiaAppKey: v19.string()
1049
1070
  })
1050
1071
  ),
1051
1072
  network: getNetworkResultSchema
1052
1073
  });
1053
- var stxGetAccountsRequestMessageSchema = v18.object({
1074
+ var stxGetAccountsRequestMessageSchema = v19.object({
1054
1075
  ...rpcRequestMessageSchema.entries,
1055
- ...v18.object({
1056
- method: v18.literal(stxGetAccountsMethodName),
1076
+ ...v19.object({
1077
+ method: v19.literal(stxGetAccountsMethodName),
1057
1078
  params: stxGetAccountsParamsSchema,
1058
- id: v18.string()
1079
+ id: v19.string()
1059
1080
  }).entries
1060
1081
  });
1061
1082
 
1062
1083
  // src/request/types/stxMethods/getAddresses.ts
1063
- import * as v19 from "valibot";
1084
+ import * as v20 from "valibot";
1064
1085
  var stxGetAddressesMethodName = "stx_getAddresses";
1065
- var stxGetAddressesParamsSchema = v19.nullish(
1066
- v19.object({
1086
+ var stxGetAddressesParamsSchema = v20.nullish(
1087
+ v20.object({
1067
1088
  /**
1068
1089
  * A message to be displayed to the user in the request prompt.
1069
1090
  */
1070
- message: v19.optional(v19.string())
1091
+ message: v20.optional(v20.string())
1071
1092
  })
1072
1093
  );
1073
- var stxGetAddressesResultSchema = v19.object({
1094
+ var stxGetAddressesResultSchema = v20.object({
1074
1095
  /**
1075
1096
  * The addresses generated for the given purposes.
1076
1097
  */
1077
- addresses: v19.array(addressSchema),
1098
+ addresses: v20.array(addressSchema),
1078
1099
  network: getNetworkResultSchema
1079
1100
  });
1080
- var stxGetAddressesRequestMessageSchema = v19.object({
1101
+ var stxGetAddressesRequestMessageSchema = v20.object({
1081
1102
  ...rpcRequestMessageSchema.entries,
1082
- ...v19.object({
1083
- method: v19.literal(stxGetAddressesMethodName),
1103
+ ...v20.object({
1104
+ method: v20.literal(stxGetAddressesMethodName),
1084
1105
  params: stxGetAddressesParamsSchema,
1085
- id: v19.string()
1106
+ id: v20.string()
1086
1107
  }).entries
1087
1108
  });
1088
1109
 
1089
1110
  // src/request/types/stxMethods/signMessage.ts
1090
- import * as v20 from "valibot";
1111
+ import * as v21 from "valibot";
1091
1112
  var stxSignMessageMethodName = "stx_signMessage";
1092
- var stxSignMessageParamsSchema = v20.object({
1113
+ var stxSignMessageParamsSchema = v21.object({
1093
1114
  /**
1094
1115
  * The message to sign.
1095
1116
  */
1096
- message: v20.string()
1117
+ message: v21.string()
1097
1118
  });
1098
- var stxSignMessageResultSchema = v20.object({
1119
+ var stxSignMessageResultSchema = v21.object({
1099
1120
  /**
1100
1121
  * The signature of the message.
1101
1122
  */
1102
- signature: v20.string(),
1123
+ signature: v21.string(),
1103
1124
  /**
1104
1125
  * The public key used to sign the message.
1105
1126
  */
1106
- publicKey: v20.string()
1127
+ publicKey: v21.string()
1107
1128
  });
1108
- var stxSignMessageRequestMessageSchema = v20.object({
1129
+ var stxSignMessageRequestMessageSchema = v21.object({
1109
1130
  ...rpcRequestMessageSchema.entries,
1110
- ...v20.object({
1111
- method: v20.literal(stxSignMessageMethodName),
1131
+ ...v21.object({
1132
+ method: v21.literal(stxSignMessageMethodName),
1112
1133
  params: stxSignMessageParamsSchema,
1113
- id: v20.string()
1134
+ id: v21.string()
1114
1135
  }).entries
1115
1136
  });
1116
1137
 
1117
1138
  // src/request/types/stxMethods/signStructuredMessage.ts
1118
- import * as v21 from "valibot";
1139
+ import * as v22 from "valibot";
1119
1140
  var stxSignStructuredMessageMethodName = "stx_signStructuredMessage";
1120
- var stxSignStructuredMessageParamsSchema = v21.object({
1141
+ var stxSignStructuredMessageParamsSchema = v22.object({
1121
1142
  /**
1122
1143
  * The domain to be signed.
1123
1144
  */
1124
- domain: v21.string(),
1145
+ domain: v22.string(),
1125
1146
  /**
1126
1147
  * Message payload to be signed.
1127
1148
  */
1128
- message: v21.string(),
1149
+ message: v22.string(),
1129
1150
  /**
1130
1151
  * The public key to sign the message with.
1131
1152
  */
1132
- publicKey: v21.optional(v21.string())
1153
+ publicKey: v22.optional(v22.string())
1133
1154
  });
1134
- var stxSignStructuredMessageResultSchema = v21.object({
1155
+ var stxSignStructuredMessageResultSchema = v22.object({
1135
1156
  /**
1136
1157
  * Signature of the message.
1137
1158
  */
1138
- signature: v21.string(),
1159
+ signature: v22.string(),
1139
1160
  /**
1140
1161
  * Public key as hex-encoded string.
1141
1162
  */
1142
- publicKey: v21.string()
1163
+ publicKey: v22.string()
1143
1164
  });
1144
- var stxSignStructuredMessageRequestMessageSchema = v21.object({
1165
+ var stxSignStructuredMessageRequestMessageSchema = v22.object({
1145
1166
  ...rpcRequestMessageSchema.entries,
1146
- ...v21.object({
1147
- method: v21.literal(stxSignStructuredMessageMethodName),
1167
+ ...v22.object({
1168
+ method: v22.literal(stxSignStructuredMessageMethodName),
1148
1169
  params: stxSignStructuredMessageParamsSchema,
1149
- id: v21.string()
1170
+ id: v22.string()
1150
1171
  }).entries
1151
1172
  });
1152
1173
 
1153
1174
  // src/request/types/stxMethods/signTransaction.ts
1154
- import * as v22 from "valibot";
1175
+ import * as v23 from "valibot";
1155
1176
  var stxSignTransactionMethodName = "stx_signTransaction";
1156
- var stxSignTransactionParamsSchema = v22.object({
1177
+ var stxSignTransactionParamsSchema = v23.object({
1157
1178
  /**
1158
1179
  * The transaction to sign as a hex-encoded string.
1159
1180
  */
1160
- transaction: v22.string(),
1181
+ transaction: v23.string(),
1161
1182
  /**
1162
1183
  * The public key to sign the transaction with. The wallet may use any key
1163
1184
  * when not provided.
1164
1185
  */
1165
- pubkey: v22.optional(v22.string()),
1186
+ pubkey: v23.optional(v23.string()),
1166
1187
  /**
1167
1188
  * Whether to broadcast the transaction after signing. Defaults to `true`.
1168
1189
  */
1169
- broadcast: v22.optional(v22.boolean())
1190
+ broadcast: v23.optional(v23.boolean())
1170
1191
  });
1171
- var stxSignTransactionResultSchema = v22.object({
1192
+ var stxSignTransactionResultSchema = v23.object({
1172
1193
  /**
1173
1194
  * The signed transaction as a hex-encoded string.
1174
1195
  */
1175
- transaction: v22.string()
1196
+ transaction: v23.string()
1176
1197
  });
1177
- var stxSignTransactionRequestMessageSchema = v22.object({
1198
+ var stxSignTransactionRequestMessageSchema = v23.object({
1178
1199
  ...rpcRequestMessageSchema.entries,
1179
- ...v22.object({
1180
- method: v22.literal(stxSignTransactionMethodName),
1200
+ ...v23.object({
1201
+ method: v23.literal(stxSignTransactionMethodName),
1181
1202
  params: stxSignTransactionParamsSchema,
1182
- id: v22.string()
1203
+ id: v23.string()
1183
1204
  }).entries
1184
1205
  });
1185
1206
 
1186
1207
  // src/request/types/stxMethods/signTransactions.ts
1187
- import * as v23 from "valibot";
1208
+ import * as v24 from "valibot";
1188
1209
  var stxSignTransactionsMethodName = "stx_signTransactions";
1189
- var stxSignTransactionsParamsSchema = v23.object({
1210
+ var stxSignTransactionsParamsSchema = v24.object({
1190
1211
  /**
1191
1212
  * The transactions to sign as hex-encoded strings.
1192
1213
  */
1193
- transactions: v23.pipe(
1194
- v23.array(
1195
- v23.pipe(
1196
- v23.string(),
1197
- v23.check((hex) => {
1214
+ transactions: v24.pipe(
1215
+ v24.array(
1216
+ v24.pipe(
1217
+ v24.string(),
1218
+ v24.check((hex) => {
1198
1219
  return true;
1199
1220
  }, "Invalid hex-encoded Stacks transaction.")
1200
1221
  )
1201
1222
  ),
1202
- v23.minLength(1)
1223
+ v24.minLength(1)
1203
1224
  ),
1204
1225
  /**
1205
1226
  * Whether the signed transactions should be broadcast after signing. Defaults
1206
1227
  * to `true`.
1207
1228
  */
1208
- broadcast: v23.optional(v23.boolean())
1229
+ broadcast: v24.optional(v24.boolean())
1209
1230
  });
1210
- var stxSignTransactionsResultSchema = v23.object({
1231
+ var stxSignTransactionsResultSchema = v24.object({
1211
1232
  /**
1212
1233
  * The signed transactions as hex-encoded strings, in the same order as in the
1213
1234
  * sign request.
1214
1235
  */
1215
- transactions: v23.array(v23.string())
1236
+ transactions: v24.array(v24.string())
1216
1237
  });
1217
- var stxSignTransactionsRequestMessageSchema = v23.object({
1238
+ var stxSignTransactionsRequestMessageSchema = v24.object({
1218
1239
  ...rpcRequestMessageSchema.entries,
1219
- ...v23.object({
1220
- method: v23.literal(stxSignTransactionsMethodName),
1240
+ ...v24.object({
1241
+ method: v24.literal(stxSignTransactionsMethodName),
1221
1242
  params: stxSignTransactionsParamsSchema,
1222
- id: v23.string()
1243
+ id: v24.string()
1223
1244
  }).entries
1224
1245
  });
1225
1246
 
1226
1247
  // src/request/types/stxMethods/transferStx.ts
1227
- import * as v24 from "valibot";
1248
+ import * as v25 from "valibot";
1228
1249
  var stxTransferStxMethodName = "stx_transferStx";
1229
- var stxTransferStxParamsSchema = v24.object({
1250
+ var stxTransferStxParamsSchema = v25.object({
1230
1251
  /**
1231
1252
  * Amount of STX tokens to transfer in microstacks as a string. Anything
1232
1253
  * parseable by `BigInt` is acceptable.
@@ -1239,23 +1260,23 @@ var stxTransferStxParamsSchema = v24.object({
1239
1260
  * const amount3 = '1234';
1240
1261
  * ```
1241
1262
  */
1242
- amount: v24.union([v24.number(), v24.string()]),
1263
+ amount: v25.union([v25.number(), v25.string()]),
1243
1264
  /**
1244
1265
  * The recipient's principal.
1245
1266
  */
1246
- recipient: v24.string(),
1267
+ recipient: v25.string(),
1247
1268
  /**
1248
1269
  * A string representing the memo.
1249
1270
  */
1250
- memo: v24.optional(v24.string()),
1271
+ memo: v25.optional(v25.string()),
1251
1272
  /**
1252
1273
  * Version of parameter format.
1253
1274
  */
1254
- version: v24.optional(v24.string()),
1275
+ version: v25.optional(v25.string()),
1255
1276
  /**
1256
1277
  * The mode of the post conditions.
1257
1278
  */
1258
- postConditionMode: v24.optional(v24.number()),
1279
+ postConditionMode: v25.optional(v25.number()),
1259
1280
  /**
1260
1281
  * A hex-encoded string representing the post conditions.
1261
1282
  *
@@ -1268,29 +1289,29 @@ var stxTransferStxParamsSchema = v24.object({
1268
1289
  * const hexPostCondition = serializePostCondition(postCondition).toString('hex');
1269
1290
  * ```
1270
1291
  */
1271
- postConditions: v24.optional(v24.array(v24.string())),
1292
+ postConditions: v25.optional(v25.array(v25.string())),
1272
1293
  /**
1273
1294
  * The public key to sign the transaction with. The wallet may use any key
1274
1295
  * when not provided.
1275
1296
  */
1276
- pubkey: v24.optional(v24.string())
1297
+ pubkey: v25.optional(v25.string())
1277
1298
  });
1278
- var stxTransferStxResultSchema = v24.object({
1299
+ var stxTransferStxResultSchema = v25.object({
1279
1300
  /**
1280
1301
  * The ID of the transaction.
1281
1302
  */
1282
- txid: v24.string(),
1303
+ txid: v25.string(),
1283
1304
  /**
1284
1305
  * A Stacks transaction as a hex-encoded string.
1285
1306
  */
1286
- transaction: v24.string()
1307
+ transaction: v25.string()
1287
1308
  });
1288
- var stxTransferStxRequestMessageSchema = v24.object({
1309
+ var stxTransferStxRequestMessageSchema = v25.object({
1289
1310
  ...rpcRequestMessageSchema.entries,
1290
- ...v24.object({
1291
- method: v24.literal(stxTransferStxMethodName),
1311
+ ...v25.object({
1312
+ method: v25.literal(stxTransferStxMethodName),
1292
1313
  params: stxTransferStxParamsSchema,
1293
- id: v24.string()
1314
+ id: v25.string()
1294
1315
  }).entries
1295
1316
  });
1296
1317
 
@@ -1307,13 +1328,13 @@ var request = async (method, params, providerId) => {
1307
1328
  throw new Error("A wallet method is required");
1308
1329
  }
1309
1330
  const response = await provider.request(method, params);
1310
- if (v25.is(rpcErrorResponseMessageSchema, response)) {
1331
+ if (v26.is(rpcErrorResponseMessageSchema, response)) {
1311
1332
  return {
1312
1333
  status: "error",
1313
1334
  error: response.error
1314
1335
  };
1315
1336
  }
1316
- if (v25.is(rpcSuccessResponseMessageSchema, response)) {
1337
+ if (v26.is(rpcSuccessResponseMessageSchema, response)) {
1317
1338
  return {
1318
1339
  status: "success",
1319
1340
  result: response.result
@@ -2475,6 +2496,10 @@ export {
2475
2496
  sparkGetBalanceParamsSchema,
2476
2497
  sparkGetBalanceRequestMessageSchema,
2477
2498
  sparkGetBalanceResultSchema,
2499
+ sparkSignMessageMethodName,
2500
+ sparkSignMessageParamsSchema,
2501
+ sparkSignMessageRequestMessageSchema,
2502
+ sparkSignMessageResultSchema,
2478
2503
  sparkTransferMethodName,
2479
2504
  sparkTransferParamsSchema,
2480
2505
  sparkTransferRequestMessageSchema,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sats-connect/core",
3
- "version": "0.8.0",
3
+ "version": "0.8.1-db15ee7",
4
4
  "main": "dist/index.mjs",
5
5
  "module": "dist/index.mjs",
6
6
  "types": "dist/index.d.mts",
@@ -14,7 +14,7 @@
14
14
  "check-format": "prettier --check .",
15
15
  "format": "prettier --write .",
16
16
  "ci": "npm run check-types && npm run check-format && npm run build",
17
- "prepare": "husky install"
17
+ "prepare": "husky"
18
18
  },
19
19
  "lint-staged": {
20
20
  "*.{ts,tsx}": [
@@ -25,7 +25,7 @@
25
25
  ]
26
26
  },
27
27
  "dependencies": {
28
- "axios": "1.11.0",
28
+ "axios": "1.12.0",
29
29
  "bitcoin-address-validation": "3.0.0",
30
30
  "buffer": "6.0.3",
31
31
  "jsontokens": "4.0.1"