@sats-connect/core 0.5.7-dfae3ce → 0.5.8-2731ce5

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 CHANGED
@@ -965,6 +965,10 @@ declare const stxCallContractParamsSchema: v.ObjectSchema<{
965
965
  * https://github.com/stacksgov/sips/pull/166#pullrequestreview-1914236999
966
966
  */
967
967
  readonly functionName: v.StringSchema<undefined>;
968
+ /**
969
+ * @deprecated in favor of `functionArgs` for @stacks/connect compatibility
970
+ */
971
+ readonly arguments: v.OptionalSchema<v.ArraySchema<v.StringSchema<undefined>, undefined>, never>;
968
972
  /**
969
973
  * The function's arguments. The arguments are expected to be hex-encoded
970
974
  * strings of Clarity values.
@@ -979,7 +983,15 @@ declare const stxCallContractParamsSchema: v.ObjectSchema<{
979
983
  * const hexArgs = functionArgs.map(cvToHex);
980
984
  * ```
981
985
  */
982
- readonly arguments: v.OptionalSchema<v.ArraySchema<v.StringSchema<undefined>, undefined>, never>;
986
+ readonly functionArgs: v.OptionalSchema<v.ArraySchema<v.StringSchema<undefined>, undefined>, never>;
987
+ /**
988
+ * The post conditions to apply to the contract call.
989
+ */
990
+ readonly postConditions: v.OptionalSchema<v.ArraySchema<v.StringSchema<undefined>, undefined>, never>;
991
+ /**
992
+ * The mode to apply to the post conditions.
993
+ */
994
+ readonly postConditionMode: v.OptionalSchema<v.UnionSchema<[v.LiteralSchema<"allow", undefined>, v.LiteralSchema<"deny", undefined>], undefined>, never>;
983
995
  }, undefined>;
984
996
  type StxCallContractParams = v.InferOutput<typeof stxCallContractParamsSchema>;
985
997
  declare const stxCallContractResultSchema: v.ObjectSchema<{
@@ -1009,6 +1021,10 @@ declare const stxCallContractRequestMessageSchema: v.ObjectSchema<{
1009
1021
  * https://github.com/stacksgov/sips/pull/166#pullrequestreview-1914236999
1010
1022
  */
1011
1023
  readonly functionName: v.StringSchema<undefined>;
1024
+ /**
1025
+ * @deprecated in favor of `functionArgs` for @stacks/connect compatibility
1026
+ */
1027
+ readonly arguments: v.OptionalSchema<v.ArraySchema<v.StringSchema<undefined>, undefined>, never>;
1012
1028
  /**
1013
1029
  * The function's arguments. The arguments are expected to be hex-encoded
1014
1030
  * strings of Clarity values.
@@ -1023,7 +1039,15 @@ declare const stxCallContractRequestMessageSchema: v.ObjectSchema<{
1023
1039
  * const hexArgs = functionArgs.map(cvToHex);
1024
1040
  * ```
1025
1041
  */
1026
- readonly arguments: v.OptionalSchema<v.ArraySchema<v.StringSchema<undefined>, undefined>, never>;
1042
+ readonly functionArgs: v.OptionalSchema<v.ArraySchema<v.StringSchema<undefined>, undefined>, never>;
1043
+ /**
1044
+ * The post conditions to apply to the contract call.
1045
+ */
1046
+ readonly postConditions: v.OptionalSchema<v.ArraySchema<v.StringSchema<undefined>, undefined>, never>;
1047
+ /**
1048
+ * The mode to apply to the post conditions.
1049
+ */
1050
+ readonly postConditionMode: v.OptionalSchema<v.UnionSchema<[v.LiteralSchema<"allow", undefined>, v.LiteralSchema<"deny", undefined>], undefined>, never>;
1027
1051
  }, undefined>;
1028
1052
  readonly id: v.StringSchema<undefined>;
1029
1053
  readonly jsonrpc: v.LiteralSchema<"2.0", undefined>;
@@ -1045,6 +1069,14 @@ declare const stxDeployContractParamsSchema: v.ObjectSchema<{
1045
1069
  * The version of the Clarity contract.
1046
1070
  */
1047
1071
  readonly clarityVersion: v.OptionalSchema<v.StringSchema<undefined>, never>;
1072
+ /**
1073
+ * The post conditions to apply to the contract call.
1074
+ */
1075
+ readonly postConditions: v.OptionalSchema<v.ArraySchema<v.StringSchema<undefined>, undefined>, never>;
1076
+ /**
1077
+ * The mode to apply to the post conditions.
1078
+ */
1079
+ readonly postConditionMode: v.OptionalSchema<v.UnionSchema<[v.LiteralSchema<"allow", undefined>, v.LiteralSchema<"deny", undefined>], undefined>, never>;
1048
1080
  }, undefined>;
1049
1081
  type StxDeployContractParams = v.InferOutput<typeof stxDeployContractParamsSchema>;
1050
1082
  declare const stxDeployContractResultSchema: v.ObjectSchema<{
@@ -1073,6 +1105,14 @@ declare const stxDeployContractRequestMessageSchema: v.ObjectSchema<{
1073
1105
  * The version of the Clarity contract.
1074
1106
  */
1075
1107
  readonly clarityVersion: v.OptionalSchema<v.StringSchema<undefined>, never>;
1108
+ /**
1109
+ * The post conditions to apply to the contract call.
1110
+ */
1111
+ readonly postConditions: v.OptionalSchema<v.ArraySchema<v.StringSchema<undefined>, undefined>, never>;
1112
+ /**
1113
+ * The mode to apply to the post conditions.
1114
+ */
1115
+ readonly postConditionMode: v.OptionalSchema<v.UnionSchema<[v.LiteralSchema<"allow", undefined>, v.LiteralSchema<"deny", undefined>], undefined>, never>;
1076
1116
  }, undefined>;
1077
1117
  readonly id: v.StringSchema<undefined>;
1078
1118
  readonly jsonrpc: v.LiteralSchema<"2.0", undefined>;
@@ -1648,17 +1688,17 @@ declare const getNetworkRequestMessageSchema: v.ObjectSchema<{
1648
1688
  type GetNetworkRequestMessage = v.InferOutput<typeof getNetworkRequestMessageSchema>;
1649
1689
  type GetNetwork = MethodParamsAndResult<GetNetworkParams, GetNetworkResult>;
1650
1690
  declare const changeNetworkMethodName = "wallet_changeNetwork";
1651
- declare const changeNetworkParamsSchema: v.NullishSchema<v.ObjectSchema<{
1691
+ declare const changeNetworkParamsSchema: v.ObjectSchema<{
1652
1692
  readonly name: v.EnumSchema<typeof BitcoinNetworkType, undefined>;
1653
- }, undefined>, never>;
1693
+ }, undefined>;
1654
1694
  type ChangeNetworkParams = v.InferOutput<typeof changeNetworkParamsSchema>;
1655
1695
  declare const changeNetworkResultSchema: v.NullishSchema<v.NullSchema<undefined>, never>;
1656
1696
  type ChangeNetworkResult = v.InferOutput<typeof changeNetworkResultSchema>;
1657
1697
  declare const changeNetworkRequestMessageSchema: v.ObjectSchema<{
1658
1698
  readonly method: v.LiteralSchema<"wallet_changeNetwork", undefined>;
1659
- readonly params: v.NullishSchema<v.ObjectSchema<{
1699
+ readonly params: v.ObjectSchema<{
1660
1700
  readonly name: v.EnumSchema<typeof BitcoinNetworkType, undefined>;
1661
- }, undefined>, never>;
1701
+ }, undefined>;
1662
1702
  readonly id: v.StringSchema<undefined>;
1663
1703
  readonly jsonrpc: v.LiteralSchema<"2.0", undefined>;
1664
1704
  }, undefined>;
package/dist/index.d.ts CHANGED
@@ -965,6 +965,10 @@ declare const stxCallContractParamsSchema: v.ObjectSchema<{
965
965
  * https://github.com/stacksgov/sips/pull/166#pullrequestreview-1914236999
966
966
  */
967
967
  readonly functionName: v.StringSchema<undefined>;
968
+ /**
969
+ * @deprecated in favor of `functionArgs` for @stacks/connect compatibility
970
+ */
971
+ readonly arguments: v.OptionalSchema<v.ArraySchema<v.StringSchema<undefined>, undefined>, never>;
968
972
  /**
969
973
  * The function's arguments. The arguments are expected to be hex-encoded
970
974
  * strings of Clarity values.
@@ -979,7 +983,15 @@ declare const stxCallContractParamsSchema: v.ObjectSchema<{
979
983
  * const hexArgs = functionArgs.map(cvToHex);
980
984
  * ```
981
985
  */
982
- readonly arguments: v.OptionalSchema<v.ArraySchema<v.StringSchema<undefined>, undefined>, never>;
986
+ readonly functionArgs: v.OptionalSchema<v.ArraySchema<v.StringSchema<undefined>, undefined>, never>;
987
+ /**
988
+ * The post conditions to apply to the contract call.
989
+ */
990
+ readonly postConditions: v.OptionalSchema<v.ArraySchema<v.StringSchema<undefined>, undefined>, never>;
991
+ /**
992
+ * The mode to apply to the post conditions.
993
+ */
994
+ readonly postConditionMode: v.OptionalSchema<v.UnionSchema<[v.LiteralSchema<"allow", undefined>, v.LiteralSchema<"deny", undefined>], undefined>, never>;
983
995
  }, undefined>;
984
996
  type StxCallContractParams = v.InferOutput<typeof stxCallContractParamsSchema>;
985
997
  declare const stxCallContractResultSchema: v.ObjectSchema<{
@@ -1009,6 +1021,10 @@ declare const stxCallContractRequestMessageSchema: v.ObjectSchema<{
1009
1021
  * https://github.com/stacksgov/sips/pull/166#pullrequestreview-1914236999
1010
1022
  */
1011
1023
  readonly functionName: v.StringSchema<undefined>;
1024
+ /**
1025
+ * @deprecated in favor of `functionArgs` for @stacks/connect compatibility
1026
+ */
1027
+ readonly arguments: v.OptionalSchema<v.ArraySchema<v.StringSchema<undefined>, undefined>, never>;
1012
1028
  /**
1013
1029
  * The function's arguments. The arguments are expected to be hex-encoded
1014
1030
  * strings of Clarity values.
@@ -1023,7 +1039,15 @@ declare const stxCallContractRequestMessageSchema: v.ObjectSchema<{
1023
1039
  * const hexArgs = functionArgs.map(cvToHex);
1024
1040
  * ```
1025
1041
  */
1026
- readonly arguments: v.OptionalSchema<v.ArraySchema<v.StringSchema<undefined>, undefined>, never>;
1042
+ readonly functionArgs: v.OptionalSchema<v.ArraySchema<v.StringSchema<undefined>, undefined>, never>;
1043
+ /**
1044
+ * The post conditions to apply to the contract call.
1045
+ */
1046
+ readonly postConditions: v.OptionalSchema<v.ArraySchema<v.StringSchema<undefined>, undefined>, never>;
1047
+ /**
1048
+ * The mode to apply to the post conditions.
1049
+ */
1050
+ readonly postConditionMode: v.OptionalSchema<v.UnionSchema<[v.LiteralSchema<"allow", undefined>, v.LiteralSchema<"deny", undefined>], undefined>, never>;
1027
1051
  }, undefined>;
1028
1052
  readonly id: v.StringSchema<undefined>;
1029
1053
  readonly jsonrpc: v.LiteralSchema<"2.0", undefined>;
@@ -1045,6 +1069,14 @@ declare const stxDeployContractParamsSchema: v.ObjectSchema<{
1045
1069
  * The version of the Clarity contract.
1046
1070
  */
1047
1071
  readonly clarityVersion: v.OptionalSchema<v.StringSchema<undefined>, never>;
1072
+ /**
1073
+ * The post conditions to apply to the contract call.
1074
+ */
1075
+ readonly postConditions: v.OptionalSchema<v.ArraySchema<v.StringSchema<undefined>, undefined>, never>;
1076
+ /**
1077
+ * The mode to apply to the post conditions.
1078
+ */
1079
+ readonly postConditionMode: v.OptionalSchema<v.UnionSchema<[v.LiteralSchema<"allow", undefined>, v.LiteralSchema<"deny", undefined>], undefined>, never>;
1048
1080
  }, undefined>;
1049
1081
  type StxDeployContractParams = v.InferOutput<typeof stxDeployContractParamsSchema>;
1050
1082
  declare const stxDeployContractResultSchema: v.ObjectSchema<{
@@ -1073,6 +1105,14 @@ declare const stxDeployContractRequestMessageSchema: v.ObjectSchema<{
1073
1105
  * The version of the Clarity contract.
1074
1106
  */
1075
1107
  readonly clarityVersion: v.OptionalSchema<v.StringSchema<undefined>, never>;
1108
+ /**
1109
+ * The post conditions to apply to the contract call.
1110
+ */
1111
+ readonly postConditions: v.OptionalSchema<v.ArraySchema<v.StringSchema<undefined>, undefined>, never>;
1112
+ /**
1113
+ * The mode to apply to the post conditions.
1114
+ */
1115
+ readonly postConditionMode: v.OptionalSchema<v.UnionSchema<[v.LiteralSchema<"allow", undefined>, v.LiteralSchema<"deny", undefined>], undefined>, never>;
1076
1116
  }, undefined>;
1077
1117
  readonly id: v.StringSchema<undefined>;
1078
1118
  readonly jsonrpc: v.LiteralSchema<"2.0", undefined>;
@@ -1648,17 +1688,17 @@ declare const getNetworkRequestMessageSchema: v.ObjectSchema<{
1648
1688
  type GetNetworkRequestMessage = v.InferOutput<typeof getNetworkRequestMessageSchema>;
1649
1689
  type GetNetwork = MethodParamsAndResult<GetNetworkParams, GetNetworkResult>;
1650
1690
  declare const changeNetworkMethodName = "wallet_changeNetwork";
1651
- declare const changeNetworkParamsSchema: v.NullishSchema<v.ObjectSchema<{
1691
+ declare const changeNetworkParamsSchema: v.ObjectSchema<{
1652
1692
  readonly name: v.EnumSchema<typeof BitcoinNetworkType, undefined>;
1653
- }, undefined>, never>;
1693
+ }, undefined>;
1654
1694
  type ChangeNetworkParams = v.InferOutput<typeof changeNetworkParamsSchema>;
1655
1695
  declare const changeNetworkResultSchema: v.NullishSchema<v.NullSchema<undefined>, never>;
1656
1696
  type ChangeNetworkResult = v.InferOutput<typeof changeNetworkResultSchema>;
1657
1697
  declare const changeNetworkRequestMessageSchema: v.ObjectSchema<{
1658
1698
  readonly method: v.LiteralSchema<"wallet_changeNetwork", undefined>;
1659
- readonly params: v.NullishSchema<v.ObjectSchema<{
1699
+ readonly params: v.ObjectSchema<{
1660
1700
  readonly name: v.EnumSchema<typeof BitcoinNetworkType, undefined>;
1661
- }, undefined>, never>;
1701
+ }, undefined>;
1662
1702
  readonly id: v.StringSchema<undefined>;
1663
1703
  readonly jsonrpc: v.LiteralSchema<"2.0", undefined>;
1664
1704
  }, undefined>;
package/dist/index.js CHANGED
@@ -343,6 +343,10 @@ var stxCallContractParamsSchema = v3.object({
343
343
  * https://github.com/stacksgov/sips/pull/166#pullrequestreview-1914236999
344
344
  */
345
345
  functionName: v3.string(),
346
+ /**
347
+ * @deprecated in favor of `functionArgs` for @stacks/connect compatibility
348
+ */
349
+ arguments: v3.optional(v3.array(v3.string())),
346
350
  /**
347
351
  * The function's arguments. The arguments are expected to be hex-encoded
348
352
  * strings of Clarity values.
@@ -357,7 +361,15 @@ var stxCallContractParamsSchema = v3.object({
357
361
  * const hexArgs = functionArgs.map(cvToHex);
358
362
  * ```
359
363
  */
360
- arguments: v3.optional(v3.array(v3.string()))
364
+ functionArgs: v3.optional(v3.array(v3.string())),
365
+ /**
366
+ * The post conditions to apply to the contract call.
367
+ */
368
+ postConditions: v3.optional(v3.array(v3.string())),
369
+ /**
370
+ * The mode to apply to the post conditions.
371
+ */
372
+ postConditionMode: v3.optional(v3.union([v3.literal("allow"), v3.literal("deny")]))
361
373
  });
362
374
  var stxCallContractResultSchema = v3.object({
363
375
  /**
@@ -393,7 +405,15 @@ var stxDeployContractParamsSchema = v4.object({
393
405
  /**
394
406
  * The version of the Clarity contract.
395
407
  */
396
- clarityVersion: v4.optional(v4.string())
408
+ clarityVersion: v4.optional(v4.string()),
409
+ /**
410
+ * The post conditions to apply to the contract call.
411
+ */
412
+ postConditions: v4.optional(v4.array(v4.string())),
413
+ /**
414
+ * The mode to apply to the post conditions.
415
+ */
416
+ postConditionMode: v4.optional(v4.union([v4.literal("allow"), v4.literal("deny")]))
397
417
  });
398
418
  var stxDeployContractResultSchema = v4.object({
399
419
  /**
@@ -572,11 +592,9 @@ var getNetworkRequestMessageSchema = v7.object({
572
592
  }).entries
573
593
  });
574
594
  var changeNetworkMethodName = "wallet_changeNetwork";
575
- var changeNetworkParamsSchema = v7.nullish(
576
- v7.object({
577
- name: v7.enum(BitcoinNetworkType)
578
- })
579
- );
595
+ var changeNetworkParamsSchema = v7.object({
596
+ name: v7.enum(BitcoinNetworkType)
597
+ });
580
598
  var changeNetworkResultSchema = v7.nullish(v7.null());
581
599
  var changeNetworkRequestMessageSchema = v7.object({
582
600
  ...rpcRequestMessageSchema.entries,
package/dist/index.mjs CHANGED
@@ -136,6 +136,10 @@ var stxCallContractParamsSchema = v3.object({
136
136
  * https://github.com/stacksgov/sips/pull/166#pullrequestreview-1914236999
137
137
  */
138
138
  functionName: v3.string(),
139
+ /**
140
+ * @deprecated in favor of `functionArgs` for @stacks/connect compatibility
141
+ */
142
+ arguments: v3.optional(v3.array(v3.string())),
139
143
  /**
140
144
  * The function's arguments. The arguments are expected to be hex-encoded
141
145
  * strings of Clarity values.
@@ -150,7 +154,15 @@ var stxCallContractParamsSchema = v3.object({
150
154
  * const hexArgs = functionArgs.map(cvToHex);
151
155
  * ```
152
156
  */
153
- arguments: v3.optional(v3.array(v3.string()))
157
+ functionArgs: v3.optional(v3.array(v3.string())),
158
+ /**
159
+ * The post conditions to apply to the contract call.
160
+ */
161
+ postConditions: v3.optional(v3.array(v3.string())),
162
+ /**
163
+ * The mode to apply to the post conditions.
164
+ */
165
+ postConditionMode: v3.optional(v3.union([v3.literal("allow"), v3.literal("deny")]))
154
166
  });
155
167
  var stxCallContractResultSchema = v3.object({
156
168
  /**
@@ -186,7 +198,15 @@ var stxDeployContractParamsSchema = v4.object({
186
198
  /**
187
199
  * The version of the Clarity contract.
188
200
  */
189
- clarityVersion: v4.optional(v4.string())
201
+ clarityVersion: v4.optional(v4.string()),
202
+ /**
203
+ * The post conditions to apply to the contract call.
204
+ */
205
+ postConditions: v4.optional(v4.array(v4.string())),
206
+ /**
207
+ * The mode to apply to the post conditions.
208
+ */
209
+ postConditionMode: v4.optional(v4.union([v4.literal("allow"), v4.literal("deny")]))
190
210
  });
191
211
  var stxDeployContractResultSchema = v4.object({
192
212
  /**
@@ -365,11 +385,9 @@ var getNetworkRequestMessageSchema = v7.object({
365
385
  }).entries
366
386
  });
367
387
  var changeNetworkMethodName = "wallet_changeNetwork";
368
- var changeNetworkParamsSchema = v7.nullish(
369
- v7.object({
370
- name: v7.enum(BitcoinNetworkType)
371
- })
372
- );
388
+ var changeNetworkParamsSchema = v7.object({
389
+ name: v7.enum(BitcoinNetworkType)
390
+ });
373
391
  var changeNetworkResultSchema = v7.nullish(v7.null());
374
392
  var changeNetworkRequestMessageSchema = v7.object({
375
393
  ...rpcRequestMessageSchema.entries,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sats-connect/core",
3
- "version": "0.5.7-dfae3ce",
3
+ "version": "0.5.8-2731ce5",
4
4
  "main": "dist/index.mjs",
5
5
  "module": "dist/index.mjs",
6
6
  "types": "dist/index.d.mts",