@sats-connect/core 0.9.0 → 0.10.0-25de943

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 v37 from "valibot";
3
3
 
4
4
  // src/provider/types.ts
5
5
  import * as v4 from "valibot";
@@ -1113,87 +1113,115 @@ var sparkGetBalanceRequestMessageSchema = v24.object({
1113
1113
  }).entries
1114
1114
  });
1115
1115
 
1116
- // src/request/types/sparkMethods/transfer.ts
1116
+ // src/request/types/sparkMethods/signMessage.ts
1117
1117
  import * as v25 from "valibot";
1118
+ var sparkSignMessageMethodName = "spark_signMessage";
1119
+ var sparkSignMessageParamsSchema = v25.object({
1120
+ /**
1121
+ * The message to sign. The message should only consist of valid UTF-8 characters.
1122
+ */
1123
+ message: v25.string()
1124
+ });
1125
+ var sparkSignMessageResultSchema = v25.object({
1126
+ /**
1127
+ * The signature, encoded in base64, of the message hash.
1128
+ *
1129
+ * Note: When signing, the message is decoded into a byte array,
1130
+ * and the resulting byte array is hashed with SHA256 before signing
1131
+ * with the private key.
1132
+ */
1133
+ signature: v25.string()
1134
+ });
1135
+ var sparkSignMessageRequestMessageSchema = v25.object({
1136
+ ...rpcRequestMessageSchema.entries,
1137
+ ...v25.object({
1138
+ method: v25.literal(sparkSignMessageMethodName),
1139
+ params: sparkSignMessageParamsSchema,
1140
+ id: v25.string()
1141
+ }).entries
1142
+ });
1143
+
1144
+ // src/request/types/sparkMethods/transfer.ts
1145
+ import * as v26 from "valibot";
1118
1146
  var sparkTransferMethodName = "spark_transfer";
1119
- var sparkTransferParamsSchema = v25.object({
1147
+ var sparkTransferParamsSchema = v26.object({
1120
1148
  /**
1121
1149
  * Amount of SATS to transfer as a string or number.
1122
1150
  */
1123
- amountSats: v25.union([v25.number(), v25.string()]),
1151
+ amountSats: v26.union([v26.number(), v26.string()]),
1124
1152
  /**
1125
1153
  * The recipient's spark address.
1126
1154
  */
1127
- receiverSparkAddress: v25.string()
1155
+ receiverSparkAddress: v26.string()
1128
1156
  });
1129
- var sparkTransferResultSchema = v25.object({
1157
+ var sparkTransferResultSchema = v26.object({
1130
1158
  /**
1131
1159
  * The ID of the transaction.
1132
1160
  */
1133
- id: v25.string()
1161
+ id: v26.string()
1134
1162
  });
1135
- var sparkTransferRequestMessageSchema = v25.object({
1163
+ var sparkTransferRequestMessageSchema = v26.object({
1136
1164
  ...rpcRequestMessageSchema.entries,
1137
- ...v25.object({
1138
- method: v25.literal(sparkTransferMethodName),
1165
+ ...v26.object({
1166
+ method: v26.literal(sparkTransferMethodName),
1139
1167
  params: sparkTransferParamsSchema,
1140
- id: v25.string()
1168
+ id: v26.string()
1141
1169
  }).entries
1142
1170
  });
1143
1171
 
1144
1172
  // src/request/types/sparkMethods/transferToken.ts
1145
- import * as v26 from "valibot";
1173
+ import * as v27 from "valibot";
1146
1174
  var sparkTransferTokenMethodName = "spark_transferToken";
1147
- var sparkTransferTokenParamsSchema = v26.object({
1175
+ var sparkTransferTokenParamsSchema = v27.object({
1148
1176
  /**
1149
1177
  * Amount of units of the token to transfer as a string or number.
1150
1178
  */
1151
- tokenAmount: v26.union([v26.number(), v26.string()]),
1179
+ tokenAmount: v27.union([v27.number(), v27.string()]),
1152
1180
  /**
1153
1181
  * The Bech32m token identifier.
1154
1182
  */
1155
- tokenIdentifier: v26.string(),
1183
+ tokenIdentifier: v27.string(),
1156
1184
  /**
1157
1185
  * The recipient's spark address.
1158
1186
  */
1159
- receiverSparkAddress: v26.string()
1187
+ receiverSparkAddress: v27.string()
1160
1188
  });
1161
- var sparkTransferTokenResultSchema = v26.object({
1189
+ var sparkTransferTokenResultSchema = v27.object({
1162
1190
  /**
1163
1191
  * The ID of the transaction.
1164
1192
  */
1165
- id: v26.string()
1193
+ id: v27.string()
1166
1194
  });
1167
- var sparkTransferTokenRequestMessageSchema = v26.object({
1195
+ var sparkTransferTokenRequestMessageSchema = v27.object({
1168
1196
  ...rpcRequestMessageSchema.entries,
1169
- ...v26.object({
1170
- method: v26.literal(sparkTransferTokenMethodName),
1197
+ ...v27.object({
1198
+ method: v27.literal(sparkTransferTokenMethodName),
1171
1199
  params: sparkTransferTokenParamsSchema,
1172
- id: v26.string()
1200
+ id: v27.string()
1173
1201
  }).entries
1174
1202
  });
1175
1203
 
1176
1204
  // src/request/types/stxMethods/callContract.ts
1177
- import * as v27 from "valibot";
1205
+ import * as v28 from "valibot";
1178
1206
  var stxCallContractMethodName = "stx_callContract";
1179
- var stxCallContractParamsSchema = v27.object({
1207
+ var stxCallContractParamsSchema = v28.object({
1180
1208
  /**
1181
1209
  * The contract principal.
1182
1210
  *
1183
1211
  * E.g. `"SPKE...GD5C.my-contract"`
1184
1212
  */
1185
- contract: v27.string(),
1213
+ contract: v28.string(),
1186
1214
  /**
1187
1215
  * The name of the function to call.
1188
1216
  *
1189
1217
  * Note: spec changes ongoing,
1190
1218
  * https://github.com/stacksgov/sips/pull/166#pullrequestreview-1914236999
1191
1219
  */
1192
- functionName: v27.string(),
1220
+ functionName: v28.string(),
1193
1221
  /**
1194
1222
  * @deprecated in favor of `functionArgs` for @stacks/connect compatibility
1195
1223
  */
1196
- arguments: v27.optional(v27.array(v27.string())),
1224
+ arguments: v28.optional(v28.array(v28.string())),
1197
1225
  /**
1198
1226
  * The function's arguments. The arguments are expected to be hex-encoded
1199
1227
  * strings of Clarity values.
@@ -1208,274 +1236,274 @@ var stxCallContractParamsSchema = v27.object({
1208
1236
  * const hexArgs = functionArgs.map(cvToHex);
1209
1237
  * ```
1210
1238
  */
1211
- functionArgs: v27.optional(v27.array(v27.string())),
1239
+ functionArgs: v28.optional(v28.array(v28.string())),
1212
1240
  /**
1213
1241
  * The post conditions to apply to the contract call.
1214
1242
  */
1215
- postConditions: v27.optional(v27.array(v27.string())),
1243
+ postConditions: v28.optional(v28.array(v28.string())),
1216
1244
  /**
1217
1245
  * The mode to apply to the post conditions.
1218
1246
  */
1219
- postConditionMode: v27.optional(v27.union([v27.literal("allow"), v27.literal("deny")]))
1247
+ postConditionMode: v28.optional(v28.union([v28.literal("allow"), v28.literal("deny")]))
1220
1248
  });
1221
- var stxCallContractResultSchema = v27.object({
1249
+ var stxCallContractResultSchema = v28.object({
1222
1250
  /**
1223
1251
  * The ID of the transaction.
1224
1252
  */
1225
- txid: v27.string(),
1253
+ txid: v28.string(),
1226
1254
  /**
1227
1255
  * A Stacks transaction as a hex-encoded string.
1228
1256
  */
1229
- transaction: v27.string()
1257
+ transaction: v28.string()
1230
1258
  });
1231
- var stxCallContractRequestMessageSchema = v27.object({
1259
+ var stxCallContractRequestMessageSchema = v28.object({
1232
1260
  ...rpcRequestMessageSchema.entries,
1233
- ...v27.object({
1234
- method: v27.literal(stxCallContractMethodName),
1261
+ ...v28.object({
1262
+ method: v28.literal(stxCallContractMethodName),
1235
1263
  params: stxCallContractParamsSchema,
1236
- id: v27.string()
1264
+ id: v28.string()
1237
1265
  }).entries
1238
1266
  });
1239
1267
 
1240
1268
  // src/request/types/stxMethods/deployContract.ts
1241
- import * as v28 from "valibot";
1269
+ import * as v29 from "valibot";
1242
1270
  var stxDeployContractMethodName = "stx_deployContract";
1243
- var stxDeployContractParamsSchema = v28.object({
1271
+ var stxDeployContractParamsSchema = v29.object({
1244
1272
  /**
1245
1273
  * Name of the contract.
1246
1274
  */
1247
- name: v28.string(),
1275
+ name: v29.string(),
1248
1276
  /**
1249
1277
  * The source code of the Clarity contract.
1250
1278
  */
1251
- clarityCode: v28.string(),
1279
+ clarityCode: v29.string(),
1252
1280
  /**
1253
1281
  * The version of the Clarity contract.
1254
1282
  */
1255
- clarityVersion: v28.optional(v28.number()),
1283
+ clarityVersion: v29.optional(v29.number()),
1256
1284
  /**
1257
1285
  * The post conditions to apply to the contract call.
1258
1286
  */
1259
- postConditions: v28.optional(v28.array(v28.string())),
1287
+ postConditions: v29.optional(v29.array(v29.string())),
1260
1288
  /**
1261
1289
  * The mode to apply to the post conditions.
1262
1290
  */
1263
- postConditionMode: v28.optional(v28.union([v28.literal("allow"), v28.literal("deny")]))
1291
+ postConditionMode: v29.optional(v29.union([v29.literal("allow"), v29.literal("deny")]))
1264
1292
  });
1265
- var stxDeployContractResultSchema = v28.object({
1293
+ var stxDeployContractResultSchema = v29.object({
1266
1294
  /**
1267
1295
  * The ID of the transaction.
1268
1296
  */
1269
- txid: v28.string(),
1297
+ txid: v29.string(),
1270
1298
  /**
1271
1299
  * A Stacks transaction as a hex-encoded string.
1272
1300
  */
1273
- transaction: v28.string()
1301
+ transaction: v29.string()
1274
1302
  });
1275
- var stxDeployContractRequestMessageSchema = v28.object({
1303
+ var stxDeployContractRequestMessageSchema = v29.object({
1276
1304
  ...rpcRequestMessageSchema.entries,
1277
- ...v28.object({
1278
- method: v28.literal(stxDeployContractMethodName),
1305
+ ...v29.object({
1306
+ method: v29.literal(stxDeployContractMethodName),
1279
1307
  params: stxDeployContractParamsSchema,
1280
- id: v28.string()
1308
+ id: v29.string()
1281
1309
  }).entries
1282
1310
  });
1283
1311
 
1284
1312
  // src/request/types/stxMethods/getAccounts.ts
1285
- import * as v29 from "valibot";
1313
+ import * as v30 from "valibot";
1286
1314
  var stxGetAccountsMethodName = "stx_getAccounts";
1287
- var stxGetAccountsParamsSchema = v29.nullish(v29.null());
1288
- var stxGetAccountsResultSchema = v29.object({
1315
+ var stxGetAccountsParamsSchema = v30.nullish(v30.null());
1316
+ var stxGetAccountsResultSchema = v30.object({
1289
1317
  /**
1290
1318
  * The addresses generated for the given purposes.
1291
1319
  */
1292
- addresses: v29.array(
1293
- v29.object({
1294
- address: v29.string(),
1295
- publicKey: v29.string(),
1296
- gaiaHubUrl: v29.string(),
1297
- gaiaAppKey: v29.string()
1320
+ addresses: v30.array(
1321
+ v30.object({
1322
+ address: v30.string(),
1323
+ publicKey: v30.string(),
1324
+ gaiaHubUrl: v30.string(),
1325
+ gaiaAppKey: v30.string()
1298
1326
  })
1299
1327
  ),
1300
1328
  network: getNetworkResultSchema
1301
1329
  });
1302
- var stxGetAccountsRequestMessageSchema = v29.object({
1330
+ var stxGetAccountsRequestMessageSchema = v30.object({
1303
1331
  ...rpcRequestMessageSchema.entries,
1304
- ...v29.object({
1305
- method: v29.literal(stxGetAccountsMethodName),
1332
+ ...v30.object({
1333
+ method: v30.literal(stxGetAccountsMethodName),
1306
1334
  params: stxGetAccountsParamsSchema,
1307
- id: v29.string()
1335
+ id: v30.string()
1308
1336
  }).entries
1309
1337
  });
1310
1338
 
1311
1339
  // src/request/types/stxMethods/getAddresses.ts
1312
- import * as v30 from "valibot";
1340
+ import * as v31 from "valibot";
1313
1341
  var stxGetAddressesMethodName = "stx_getAddresses";
1314
- var stxGetAddressesParamsSchema = v30.nullish(
1315
- v30.object({
1342
+ var stxGetAddressesParamsSchema = v31.nullish(
1343
+ v31.object({
1316
1344
  /**
1317
1345
  * A message to be displayed to the user in the request prompt.
1318
1346
  */
1319
- message: v30.optional(v30.string())
1347
+ message: v31.optional(v31.string())
1320
1348
  })
1321
1349
  );
1322
- var stxGetAddressesResultSchema = v30.object({
1350
+ var stxGetAddressesResultSchema = v31.object({
1323
1351
  /**
1324
1352
  * The addresses generated for the given purposes.
1325
1353
  */
1326
- addresses: v30.array(addressSchema),
1354
+ addresses: v31.array(addressSchema),
1327
1355
  network: getNetworkResultSchema
1328
1356
  });
1329
- var stxGetAddressesRequestMessageSchema = v30.object({
1357
+ var stxGetAddressesRequestMessageSchema = v31.object({
1330
1358
  ...rpcRequestMessageSchema.entries,
1331
- ...v30.object({
1332
- method: v30.literal(stxGetAddressesMethodName),
1359
+ ...v31.object({
1360
+ method: v31.literal(stxGetAddressesMethodName),
1333
1361
  params: stxGetAddressesParamsSchema,
1334
- id: v30.string()
1362
+ id: v31.string()
1335
1363
  }).entries
1336
1364
  });
1337
1365
 
1338
1366
  // src/request/types/stxMethods/signMessage.ts
1339
- import * as v31 from "valibot";
1367
+ import * as v32 from "valibot";
1340
1368
  var stxSignMessageMethodName = "stx_signMessage";
1341
- var stxSignMessageParamsSchema = v31.object({
1369
+ var stxSignMessageParamsSchema = v32.object({
1342
1370
  /**
1343
1371
  * The message to sign.
1344
1372
  */
1345
- message: v31.string()
1373
+ message: v32.string()
1346
1374
  });
1347
- var stxSignMessageResultSchema = v31.object({
1375
+ var stxSignMessageResultSchema = v32.object({
1348
1376
  /**
1349
1377
  * The signature of the message.
1350
1378
  */
1351
- signature: v31.string(),
1379
+ signature: v32.string(),
1352
1380
  /**
1353
1381
  * The public key used to sign the message.
1354
1382
  */
1355
- publicKey: v31.string()
1383
+ publicKey: v32.string()
1356
1384
  });
1357
- var stxSignMessageRequestMessageSchema = v31.object({
1385
+ var stxSignMessageRequestMessageSchema = v32.object({
1358
1386
  ...rpcRequestMessageSchema.entries,
1359
- ...v31.object({
1360
- method: v31.literal(stxSignMessageMethodName),
1387
+ ...v32.object({
1388
+ method: v32.literal(stxSignMessageMethodName),
1361
1389
  params: stxSignMessageParamsSchema,
1362
- id: v31.string()
1390
+ id: v32.string()
1363
1391
  }).entries
1364
1392
  });
1365
1393
 
1366
1394
  // src/request/types/stxMethods/signStructuredMessage.ts
1367
- import * as v32 from "valibot";
1395
+ import * as v33 from "valibot";
1368
1396
  var stxSignStructuredMessageMethodName = "stx_signStructuredMessage";
1369
- var stxSignStructuredMessageParamsSchema = v32.object({
1397
+ var stxSignStructuredMessageParamsSchema = v33.object({
1370
1398
  /**
1371
1399
  * The domain to be signed.
1372
1400
  */
1373
- domain: v32.string(),
1401
+ domain: v33.string(),
1374
1402
  /**
1375
1403
  * Message payload to be signed.
1376
1404
  */
1377
- message: v32.string(),
1405
+ message: v33.string(),
1378
1406
  /**
1379
1407
  * The public key to sign the message with.
1380
1408
  */
1381
- publicKey: v32.optional(v32.string())
1409
+ publicKey: v33.optional(v33.string())
1382
1410
  });
1383
- var stxSignStructuredMessageResultSchema = v32.object({
1411
+ var stxSignStructuredMessageResultSchema = v33.object({
1384
1412
  /**
1385
1413
  * Signature of the message.
1386
1414
  */
1387
- signature: v32.string(),
1415
+ signature: v33.string(),
1388
1416
  /**
1389
1417
  * Public key as hex-encoded string.
1390
1418
  */
1391
- publicKey: v32.string()
1419
+ publicKey: v33.string()
1392
1420
  });
1393
- var stxSignStructuredMessageRequestMessageSchema = v32.object({
1421
+ var stxSignStructuredMessageRequestMessageSchema = v33.object({
1394
1422
  ...rpcRequestMessageSchema.entries,
1395
- ...v32.object({
1396
- method: v32.literal(stxSignStructuredMessageMethodName),
1423
+ ...v33.object({
1424
+ method: v33.literal(stxSignStructuredMessageMethodName),
1397
1425
  params: stxSignStructuredMessageParamsSchema,
1398
- id: v32.string()
1426
+ id: v33.string()
1399
1427
  }).entries
1400
1428
  });
1401
1429
 
1402
1430
  // src/request/types/stxMethods/signTransaction.ts
1403
- import * as v33 from "valibot";
1431
+ import * as v34 from "valibot";
1404
1432
  var stxSignTransactionMethodName = "stx_signTransaction";
1405
- var stxSignTransactionParamsSchema = v33.object({
1433
+ var stxSignTransactionParamsSchema = v34.object({
1406
1434
  /**
1407
1435
  * The transaction to sign as a hex-encoded string.
1408
1436
  */
1409
- transaction: v33.string(),
1437
+ transaction: v34.string(),
1410
1438
  /**
1411
1439
  * The public key to sign the transaction with. The wallet may use any key
1412
1440
  * when not provided.
1413
1441
  */
1414
- pubkey: v33.optional(v33.string()),
1442
+ pubkey: v34.optional(v34.string()),
1415
1443
  /**
1416
1444
  * Whether to broadcast the transaction after signing. Defaults to `true`.
1417
1445
  */
1418
- broadcast: v33.optional(v33.boolean())
1446
+ broadcast: v34.optional(v34.boolean())
1419
1447
  });
1420
- var stxSignTransactionResultSchema = v33.object({
1448
+ var stxSignTransactionResultSchema = v34.object({
1421
1449
  /**
1422
1450
  * The signed transaction as a hex-encoded string.
1423
1451
  */
1424
- transaction: v33.string()
1452
+ transaction: v34.string()
1425
1453
  });
1426
- var stxSignTransactionRequestMessageSchema = v33.object({
1454
+ var stxSignTransactionRequestMessageSchema = v34.object({
1427
1455
  ...rpcRequestMessageSchema.entries,
1428
- ...v33.object({
1429
- method: v33.literal(stxSignTransactionMethodName),
1456
+ ...v34.object({
1457
+ method: v34.literal(stxSignTransactionMethodName),
1430
1458
  params: stxSignTransactionParamsSchema,
1431
- id: v33.string()
1459
+ id: v34.string()
1432
1460
  }).entries
1433
1461
  });
1434
1462
 
1435
1463
  // src/request/types/stxMethods/signTransactions.ts
1436
- import * as v34 from "valibot";
1464
+ import * as v35 from "valibot";
1437
1465
  var stxSignTransactionsMethodName = "stx_signTransactions";
1438
- var stxSignTransactionsParamsSchema = v34.object({
1466
+ var stxSignTransactionsParamsSchema = v35.object({
1439
1467
  /**
1440
1468
  * The transactions to sign as hex-encoded strings.
1441
1469
  */
1442
- transactions: v34.pipe(
1443
- v34.array(
1444
- v34.pipe(
1445
- v34.string(),
1446
- v34.check((hex) => {
1470
+ transactions: v35.pipe(
1471
+ v35.array(
1472
+ v35.pipe(
1473
+ v35.string(),
1474
+ v35.check((hex) => {
1447
1475
  return true;
1448
1476
  }, "Invalid hex-encoded Stacks transaction.")
1449
1477
  )
1450
1478
  ),
1451
- v34.minLength(1)
1479
+ v35.minLength(1)
1452
1480
  ),
1453
1481
  /**
1454
1482
  * Whether the signed transactions should be broadcast after signing. Defaults
1455
1483
  * to `true`.
1456
1484
  */
1457
- broadcast: v34.optional(v34.boolean())
1485
+ broadcast: v35.optional(v35.boolean())
1458
1486
  });
1459
- var stxSignTransactionsResultSchema = v34.object({
1487
+ var stxSignTransactionsResultSchema = v35.object({
1460
1488
  /**
1461
1489
  * The signed transactions as hex-encoded strings, in the same order as in the
1462
1490
  * sign request.
1463
1491
  */
1464
- transactions: v34.array(v34.string())
1492
+ transactions: v35.array(v35.string())
1465
1493
  });
1466
- var stxSignTransactionsRequestMessageSchema = v34.object({
1494
+ var stxSignTransactionsRequestMessageSchema = v35.object({
1467
1495
  ...rpcRequestMessageSchema.entries,
1468
- ...v34.object({
1469
- method: v34.literal(stxSignTransactionsMethodName),
1496
+ ...v35.object({
1497
+ method: v35.literal(stxSignTransactionsMethodName),
1470
1498
  params: stxSignTransactionsParamsSchema,
1471
- id: v34.string()
1499
+ id: v35.string()
1472
1500
  }).entries
1473
1501
  });
1474
1502
 
1475
1503
  // src/request/types/stxMethods/transferStx.ts
1476
- import * as v35 from "valibot";
1504
+ import * as v36 from "valibot";
1477
1505
  var stxTransferStxMethodName = "stx_transferStx";
1478
- var stxTransferStxParamsSchema = v35.object({
1506
+ var stxTransferStxParamsSchema = v36.object({
1479
1507
  /**
1480
1508
  * Amount of STX tokens to transfer in microstacks as a string. Anything
1481
1509
  * parseable by `BigInt` is acceptable.
@@ -1488,23 +1516,23 @@ var stxTransferStxParamsSchema = v35.object({
1488
1516
  * const amount3 = '1234';
1489
1517
  * ```
1490
1518
  */
1491
- amount: v35.union([v35.number(), v35.string()]),
1519
+ amount: v36.union([v36.number(), v36.string()]),
1492
1520
  /**
1493
1521
  * The recipient's principal.
1494
1522
  */
1495
- recipient: v35.string(),
1523
+ recipient: v36.string(),
1496
1524
  /**
1497
1525
  * A string representing the memo.
1498
1526
  */
1499
- memo: v35.optional(v35.string()),
1527
+ memo: v36.optional(v36.string()),
1500
1528
  /**
1501
1529
  * Version of parameter format.
1502
1530
  */
1503
- version: v35.optional(v35.string()),
1531
+ version: v36.optional(v36.string()),
1504
1532
  /**
1505
1533
  * The mode of the post conditions.
1506
1534
  */
1507
- postConditionMode: v35.optional(v35.number()),
1535
+ postConditionMode: v36.optional(v36.number()),
1508
1536
  /**
1509
1537
  * A hex-encoded string representing the post conditions.
1510
1538
  *
@@ -1517,29 +1545,29 @@ var stxTransferStxParamsSchema = v35.object({
1517
1545
  * const hexPostCondition = serializePostCondition(postCondition).toString('hex');
1518
1546
  * ```
1519
1547
  */
1520
- postConditions: v35.optional(v35.array(v35.string())),
1548
+ postConditions: v36.optional(v36.array(v36.string())),
1521
1549
  /**
1522
1550
  * The public key to sign the transaction with. The wallet may use any key
1523
1551
  * when not provided.
1524
1552
  */
1525
- pubkey: v35.optional(v35.string())
1553
+ pubkey: v36.optional(v36.string())
1526
1554
  });
1527
- var stxTransferStxResultSchema = v35.object({
1555
+ var stxTransferStxResultSchema = v36.object({
1528
1556
  /**
1529
1557
  * The ID of the transaction.
1530
1558
  */
1531
- txid: v35.string(),
1559
+ txid: v36.string(),
1532
1560
  /**
1533
1561
  * A Stacks transaction as a hex-encoded string.
1534
1562
  */
1535
- transaction: v35.string()
1563
+ transaction: v36.string()
1536
1564
  });
1537
- var stxTransferStxRequestMessageSchema = v35.object({
1565
+ var stxTransferStxRequestMessageSchema = v36.object({
1538
1566
  ...rpcRequestMessageSchema.entries,
1539
- ...v35.object({
1540
- method: v35.literal(stxTransferStxMethodName),
1567
+ ...v36.object({
1568
+ method: v36.literal(stxTransferStxMethodName),
1541
1569
  params: stxTransferStxParamsSchema,
1542
- id: v35.string()
1570
+ id: v36.string()
1543
1571
  }).entries
1544
1572
  });
1545
1573
 
@@ -1547,13 +1575,13 @@ var stxTransferStxRequestMessageSchema = v35.object({
1547
1575
  var cache = {};
1548
1576
  var requestInternal = async (provider, method, params) => {
1549
1577
  const response = await provider.request(method, params);
1550
- if (v36.is(rpcErrorResponseMessageSchema, response)) {
1578
+ if (v37.is(rpcErrorResponseMessageSchema, response)) {
1551
1579
  return {
1552
1580
  status: "error",
1553
1581
  error: response.error
1554
1582
  };
1555
1583
  }
1556
- if (v36.is(rpcSuccessResponseMessageSchema, response)) {
1584
+ if (v37.is(rpcSuccessResponseMessageSchema, response)) {
1557
1585
  return {
1558
1586
  status: "success",
1559
1587
  result: response.result
@@ -2769,6 +2797,10 @@ export {
2769
2797
  sparkGetBalanceParamsSchema,
2770
2798
  sparkGetBalanceRequestMessageSchema,
2771
2799
  sparkGetBalanceResultSchema,
2800
+ sparkSignMessageMethodName,
2801
+ sparkSignMessageParamsSchema,
2802
+ sparkSignMessageRequestMessageSchema,
2803
+ sparkSignMessageResultSchema,
2772
2804
  sparkTransferMethodName,
2773
2805
  sparkTransferParamsSchema,
2774
2806
  sparkTransferRequestMessageSchema,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sats-connect/core",
3
- "version": "0.9.0",
3
+ "version": "0.10.0-25de943",
4
4
  "main": "dist/index.mjs",
5
5
  "module": "dist/index.mjs",
6
6
  "types": "dist/index.d.mts",