@sats-connect/core 0.5.8 → 0.6.0

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>;
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>;
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
  /**
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
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sats-connect/core",
3
- "version": "0.5.8",
3
+ "version": "0.6.0",
4
4
  "main": "dist/index.mjs",
5
5
  "module": "dist/index.mjs",
6
6
  "types": "dist/index.d.mts",