@sats-connect/core 0.4.1-364d53c → 0.4.1-977f9b7
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.d.mts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +12 -1
- package/dist/index.mjs +12 -1
- package/package.json +4 -1
package/dist/index.d.mts
CHANGED
|
@@ -1276,7 +1276,7 @@ declare const stxSignTransactionsParamsSchema: v.ObjectSchema<{
|
|
|
1276
1276
|
/**
|
|
1277
1277
|
* The transactions to sign as hex-encoded strings.
|
|
1278
1278
|
*/
|
|
1279
|
-
readonly transactions: v.ArraySchema<v.StringSchema<undefined>, undefined>;
|
|
1279
|
+
readonly transactions: v.SchemaWithPipe<[v.ArraySchema<v.SchemaWithPipe<[v.StringSchema<undefined>, v.CheckAction<string, "Invalid hex-encoded Stacks transaction.">]>, undefined>, v.MinLengthAction<string[], 1, undefined>]>;
|
|
1280
1280
|
/**
|
|
1281
1281
|
* Whether the signed transactions should be broadcast after signing. Defaults
|
|
1282
1282
|
* to `true`.
|
|
@@ -1298,7 +1298,7 @@ declare const stxSignTransactionsRequestMessageSchema: v.ObjectSchema<{
|
|
|
1298
1298
|
/**
|
|
1299
1299
|
* The transactions to sign as hex-encoded strings.
|
|
1300
1300
|
*/
|
|
1301
|
-
readonly transactions: v.ArraySchema<v.StringSchema<undefined>, undefined>;
|
|
1301
|
+
readonly transactions: v.SchemaWithPipe<[v.ArraySchema<v.SchemaWithPipe<[v.StringSchema<undefined>, v.CheckAction<string, "Invalid hex-encoded Stacks transaction.">]>, undefined>, v.MinLengthAction<string[], 1, undefined>]>;
|
|
1302
1302
|
/**
|
|
1303
1303
|
* Whether the signed transactions should be broadcast after signing. Defaults
|
|
1304
1304
|
* to `true`.
|
package/dist/index.d.ts
CHANGED
|
@@ -1276,7 +1276,7 @@ declare const stxSignTransactionsParamsSchema: v.ObjectSchema<{
|
|
|
1276
1276
|
/**
|
|
1277
1277
|
* The transactions to sign as hex-encoded strings.
|
|
1278
1278
|
*/
|
|
1279
|
-
readonly transactions: v.ArraySchema<v.StringSchema<undefined>, undefined>;
|
|
1279
|
+
readonly transactions: v.SchemaWithPipe<[v.ArraySchema<v.SchemaWithPipe<[v.StringSchema<undefined>, v.CheckAction<string, "Invalid hex-encoded Stacks transaction.">]>, undefined>, v.MinLengthAction<string[], 1, undefined>]>;
|
|
1280
1280
|
/**
|
|
1281
1281
|
* Whether the signed transactions should be broadcast after signing. Defaults
|
|
1282
1282
|
* to `true`.
|
|
@@ -1298,7 +1298,7 @@ declare const stxSignTransactionsRequestMessageSchema: v.ObjectSchema<{
|
|
|
1298
1298
|
/**
|
|
1299
1299
|
* The transactions to sign as hex-encoded strings.
|
|
1300
1300
|
*/
|
|
1301
|
-
readonly transactions: v.ArraySchema<v.StringSchema<undefined>, undefined>;
|
|
1301
|
+
readonly transactions: v.SchemaWithPipe<[v.ArraySchema<v.SchemaWithPipe<[v.StringSchema<undefined>, v.CheckAction<string, "Invalid hex-encoded Stacks transaction.">]>, undefined>, v.MinLengthAction<string[], 1, undefined>]>;
|
|
1302
1302
|
/**
|
|
1303
1303
|
* Whether the signed transactions should be broadcast after signing. Defaults
|
|
1304
1304
|
* to `true`.
|
package/dist/index.js
CHANGED
|
@@ -604,13 +604,24 @@ var stxSignTransactionRequestMessageSchema = v10.object({
|
|
|
604
604
|
});
|
|
605
605
|
|
|
606
606
|
// src/request/types/stxMethods/signTransactions.ts
|
|
607
|
+
var import_transactions = require("@stacks/transactions");
|
|
607
608
|
var v11 = __toESM(require("valibot"));
|
|
608
609
|
var stxSignTransactionsMethodName = "stx_signTransactions";
|
|
609
610
|
var stxSignTransactionsParamsSchema = v11.object({
|
|
610
611
|
/**
|
|
611
612
|
* The transactions to sign as hex-encoded strings.
|
|
612
613
|
*/
|
|
613
|
-
transactions: v11.
|
|
614
|
+
transactions: v11.pipe(
|
|
615
|
+
v11.array(
|
|
616
|
+
v11.pipe(
|
|
617
|
+
v11.string(),
|
|
618
|
+
v11.check((hex) => {
|
|
619
|
+
return Boolean((0, import_transactions.deserializeTransaction)(hex));
|
|
620
|
+
}, "Invalid hex-encoded Stacks transaction.")
|
|
621
|
+
)
|
|
622
|
+
),
|
|
623
|
+
v11.minLength(1)
|
|
624
|
+
),
|
|
614
625
|
/**
|
|
615
626
|
* Whether the signed transactions should be broadcast after signing. Defaults
|
|
616
627
|
* to `true`.
|
package/dist/index.mjs
CHANGED
|
@@ -405,13 +405,24 @@ var stxSignTransactionRequestMessageSchema = v10.object({
|
|
|
405
405
|
});
|
|
406
406
|
|
|
407
407
|
// src/request/types/stxMethods/signTransactions.ts
|
|
408
|
+
import { deserializeTransaction } from "@stacks/transactions";
|
|
408
409
|
import * as v11 from "valibot";
|
|
409
410
|
var stxSignTransactionsMethodName = "stx_signTransactions";
|
|
410
411
|
var stxSignTransactionsParamsSchema = v11.object({
|
|
411
412
|
/**
|
|
412
413
|
* The transactions to sign as hex-encoded strings.
|
|
413
414
|
*/
|
|
414
|
-
transactions: v11.
|
|
415
|
+
transactions: v11.pipe(
|
|
416
|
+
v11.array(
|
|
417
|
+
v11.pipe(
|
|
418
|
+
v11.string(),
|
|
419
|
+
v11.check((hex) => {
|
|
420
|
+
return Boolean(deserializeTransaction(hex));
|
|
421
|
+
}, "Invalid hex-encoded Stacks transaction.")
|
|
422
|
+
)
|
|
423
|
+
),
|
|
424
|
+
v11.minLength(1)
|
|
425
|
+
),
|
|
415
426
|
/**
|
|
416
427
|
* Whether the signed transactions should be broadcast after signing. Defaults
|
|
417
428
|
* to `true`.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sats-connect/core",
|
|
3
|
-
"version": "0.4.1-
|
|
3
|
+
"version": "0.4.1-977f9b7",
|
|
4
4
|
"main": "dist/index.mjs",
|
|
5
5
|
"module": "dist/index.mjs",
|
|
6
6
|
"types": "dist/index.d.mts",
|
|
@@ -32,6 +32,9 @@
|
|
|
32
32
|
"jsontokens": "4.0.1",
|
|
33
33
|
"valibot": "0.42.1"
|
|
34
34
|
},
|
|
35
|
+
"peerDependencies": {
|
|
36
|
+
"@stacks/transactions": "^7.0.2"
|
|
37
|
+
},
|
|
35
38
|
"devDependencies": {
|
|
36
39
|
"@types/jest": "^29.2.6",
|
|
37
40
|
"husky": "^8.0.3",
|