@argent/x-shared 1.56.1 → 1.57.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.
@@ -1,8 +1,8 @@
1
1
  import { z as t } from "zod";
2
2
  import { estimatedFeesSchema as b } from "../fees/schema.js";
3
3
  import { severitySchema as u, reasonsSchema as S } from "../warning/schema.js";
4
- import { addressSchemaArgentBackend as o, addressSchema as f } from "../../../chains/starknet/address.js";
5
- const h = t.object({
4
+ import { addressSchemaArgentBackend as o, addressSchema as h } from "../../../chains/starknet/address.js";
5
+ const j = t.object({
6
6
  name: t.string(),
7
7
  url: t.string(),
8
8
  position: t.number()
@@ -47,6 +47,11 @@ const h = t.object({
47
47
  entrypoint: t.string(),
48
48
  calldata: t.array(t.string())
49
49
  }),
50
+ t.object({
51
+ type: t.literal("class_hash"),
52
+ label: t.string(),
53
+ classHash: t.string()
54
+ }),
50
55
  t.object({
51
56
  type: t.literal("text"),
52
57
  label: t.string(),
@@ -57,11 +62,11 @@ const h = t.object({
57
62
  label: t.string(),
58
63
  token: e
59
64
  })
60
- ]), j = t.object({
65
+ ]), y = t.object({
61
66
  name: t.string(),
62
67
  properties: t.array(r),
63
68
  defaultProperties: t.array(r).optional()
64
- }), y = t.union([
69
+ }), f = t.union([
65
70
  t.literal("verified"),
66
71
  t.literal("neutral"),
67
72
  t.literal("partial"),
@@ -69,7 +74,7 @@ const h = t.object({
69
74
  ]), k = t.object({
70
75
  unknown_token: t.unknown().optional(),
71
76
  date_of_addition: t.string().optional(),
72
- contract_address: f.optional(),
77
+ contract_address: h.optional(),
73
78
  reason: t.string().optional(),
74
79
  value: t.string().or(t.number()).optional()
75
80
  }), l = t.object({
@@ -77,20 +82,20 @@ const h = t.object({
77
82
  details: k.optional(),
78
83
  severity: u
79
84
  }), v = t.object({
80
- assessment: y,
85
+ assessment: f,
81
86
  warnings: t.array(l).optional(),
82
87
  assessmentReasons: t.array(t.string()).optional(),
83
88
  assessmentDetails: t.object({
84
89
  contract_address: t.string()
85
90
  }).optional(),
86
- action: j
91
+ action: y
87
92
  }), w = t.object({
88
93
  name: t.string(),
89
94
  description: t.string(),
90
95
  logoUrl: t.string(),
91
96
  iconUrl: t.string(),
92
97
  argentVerified: t.boolean(),
93
- links: t.array(h)
98
+ links: t.array(j)
94
99
  }), c = t.object({
95
100
  assessment: t.union([
96
101
  t.literal("verified"),
@@ -154,7 +159,7 @@ const h = t.object({
154
159
  unit: t.string().transform((n) => n.toUpperCase()).pipe(t.literal("FRI")),
155
160
  maxAmount: a,
156
161
  maxPricePerUnit: a
157
- })), x = t.object({
162
+ })), _ = t.object({
158
163
  type: t.string(),
159
164
  label: t.string(),
160
165
  tokenId: t.string().optional(),
@@ -167,25 +172,25 @@ const h = t.object({
167
172
  description: t.string().optional(),
168
173
  imageUrls: p.optional()
169
174
  }).optional()
170
- }), F = t.object({
175
+ }), x = t.object({
171
176
  approvals: t.array(E).optional(),
172
177
  transfers: t.array(A).optional(),
173
178
  calculatedNonce: t.string().optional(),
174
179
  feeEstimation: D,
175
- summary: t.array(x).optional()
176
- }), P = t.object({
180
+ summary: t.array(_).optional()
181
+ }), F = t.object({
177
182
  label: t.string().optional(),
178
183
  code: t.number().optional(),
179
184
  message: t.string().optional(),
180
185
  error: t.string().optional()
181
186
  }), m = t.object({
182
187
  reviewOfTransaction: c,
183
- simulation: F,
188
+ simulation: x,
184
189
  simulationError: t.undefined()
185
190
  }), g = t.object({
186
191
  reviewOfTransaction: c,
187
192
  simulation: t.undefined(),
188
- simulationError: P
193
+ simulationError: F
189
194
  }), d = m.or(g), C = t.object({
190
195
  transactions: t.array(d).optional()
191
196
  }), O = t.object({
@@ -200,8 +205,8 @@ function V(n) {
200
205
  return g.safeParse(n).success;
201
206
  }
202
207
  export {
203
- j as actionSchema,
204
- y as assessmentSchema,
208
+ y as actionSchema,
209
+ f as assessmentSchema,
205
210
  O as enrichedSimulateAndReviewSchema,
206
211
  D as feeEstimationSchema,
207
212
  R as isNotTransactionSimulationError,
@@ -5,15 +5,15 @@ import { AllowArray, Call, DeclareContractPayload, DeployAccountContractPayload,
5
5
  * Same as EstimateFeeAction from starknet.js
6
6
  */
7
7
  export type TransactionAction = {
8
- type: TransactionType.INVOKE;
8
+ type: typeof TransactionType.INVOKE;
9
9
  payload: AllowArray<Call>;
10
10
  } | {
11
- type: TransactionType.DECLARE;
11
+ type: typeof TransactionType.DECLARE;
12
12
  payload: DeclareContractPayload;
13
13
  } | {
14
- type: TransactionType.DEPLOY_ACCOUNT;
14
+ type: typeof TransactionType.DEPLOY_ACCOUNT;
15
15
  payload: DeployAccountContractPayload;
16
16
  } | {
17
- type: TransactionType.DEPLOY;
17
+ type: typeof TransactionType.DEPLOY;
18
18
  payload: UniversalDeployerContractPayload;
19
19
  };
@@ -14,7 +14,7 @@ export interface SimulationError extends Error {
14
14
  url: string;
15
15
  }
16
16
  export interface SimulateDeployAccountRequest {
17
- type: TransactionType.DEPLOY_ACCOUNT;
17
+ type: typeof TransactionType.DEPLOY_ACCOUNT;
18
18
  classHash: string;
19
19
  calldata: Calldata;
20
20
  salt: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@argent/x-shared",
3
- "version": "1.56.1",
3
+ "version": "1.57.0",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/argentlabs/x-shared.git"
@@ -73,7 +73,7 @@
73
73
  "@starknet-io/types-js": "^0.7.7",
74
74
  "big-decimal-number": "npm:bignumber.js@^9.1.2",
75
75
  "micro-starknet": "^0.2.3",
76
- "starknet": "6.11.0",
76
+ "starknet": "6.21.1",
77
77
  "starknet4-deprecated": "npm:starknet@4.4.0",
78
78
  "starknet5": "npm:starknet@5.25.0"
79
79
  },