@argent/x-shared 1.74.2 → 1.75.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.
Files changed (79) hide show
  1. package/dist/index.cjs +1 -1
  2. package/dist/index.js +212 -209
  3. package/dist/node_modules/.pnpm/@noble_curves@1.0.0/node_modules/@noble/curves/esm/abstract/weierstrass.cjs +1 -1
  4. package/dist/node_modules/.pnpm/@noble_curves@1.0.0/node_modules/@noble/curves/esm/abstract/weierstrass.js +12 -13
  5. package/dist/node_modules/.pnpm/bignumber.js@9.1.2/node_modules/bignumber.js/bignumber.cjs +1 -1
  6. package/dist/node_modules/.pnpm/bignumber.js@9.1.2/node_modules/bignumber.js/bignumber.js +60 -60
  7. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_getValue.cjs +1 -1
  8. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_getValue.js +1 -1
  9. package/dist/src/chains/starknet/address.cjs +1 -1
  10. package/dist/src/chains/starknet/address.js +16 -16
  11. package/dist/src/features/defiDecomposition/helpers/computeCollateralizedDebtPositionsUsdValue.cjs +1 -1
  12. package/dist/src/features/defiDecomposition/helpers/computeCollateralizedDebtPositionsUsdValue.js +27 -27
  13. package/dist/src/features/defiDecomposition/helpers/computeConcentratedLiquidityPositionsUsdValue.cjs +1 -1
  14. package/dist/src/features/defiDecomposition/helpers/computeConcentratedLiquidityPositionsUsdValue.js +22 -22
  15. package/dist/src/features/defiDecomposition/helpers/computeDelegatedTokensPositionsUsdValue.cjs +1 -1
  16. package/dist/src/features/defiDecomposition/helpers/computeDelegatedTokensPositionsUsdValue.js +14 -14
  17. package/dist/src/features/defiDecomposition/helpers/computeStakingPositionsUsdValue.cjs +1 -1
  18. package/dist/src/features/defiDecomposition/helpers/computeStakingPositionsUsdValue.js +9 -9
  19. package/dist/src/features/defiDecomposition/helpers/computeStrkDelegatedStakingPositionsUsdValue.cjs +1 -1
  20. package/dist/src/features/defiDecomposition/helpers/computeStrkDelegatedStakingPositionsUsdValue.js +13 -13
  21. package/dist/src/features/defiDecomposition/helpers/parseCollateralizedDebtPositions.cjs +1 -1
  22. package/dist/src/features/defiDecomposition/helpers/parseCollateralizedDebtPositions.js +24 -25
  23. package/dist/src/features/simulation/activity/normalize.cjs +1 -1
  24. package/dist/src/features/simulation/activity/normalize.js +12 -13
  25. package/dist/src/features/simulation/activity/utils/createNativeActivity.cjs +1 -1
  26. package/dist/src/features/simulation/activity/utils/createNativeActivity.js +22 -24
  27. package/dist/src/features/simulation/activity/utils/getAnyActivityTitle.cjs +1 -1
  28. package/dist/src/features/simulation/activity/utils/getAnyActivityTitle.js +11 -12
  29. package/dist/src/features/simulation/activity/utils/hasDelegationActivity.cjs +1 -1
  30. package/dist/src/features/simulation/activity/utils/hasDelegationActivity.js +2 -8
  31. package/dist/src/features/simulation/activity/utils/isAddMultisigSignersActivity.cjs +1 -1
  32. package/dist/src/features/simulation/activity/utils/isAddMultisigSignersActivity.js +4 -8
  33. package/dist/src/features/simulation/activity/utils/isChangeMultisigThresholdActivity.cjs +1 -1
  34. package/dist/src/features/simulation/activity/utils/isChangeMultisigThresholdActivity.js +4 -8
  35. package/dist/src/features/simulation/activity/utils/isMulticallWithDeploymentActivity.cjs +1 -1
  36. package/dist/src/features/simulation/activity/utils/isMulticallWithDeploymentActivity.js +3 -9
  37. package/dist/src/features/simulation/activity/utils/isRejectOnChainActivity.cjs +1 -1
  38. package/dist/src/features/simulation/activity/utils/isRejectOnChainActivity.js +15 -19
  39. package/dist/src/features/simulation/activity/utils/isRemoveMultisigSignersActivity.cjs +1 -1
  40. package/dist/src/features/simulation/activity/utils/isRemoveMultisigSignersActivity.js +4 -8
  41. package/dist/src/features/simulation/activity/utils/isSwapActivity.cjs +1 -1
  42. package/dist/src/features/simulation/activity/utils/isSwapActivity.js +9 -16
  43. package/dist/src/features/simulation/activity/utils/isUpgradeActivity.cjs +1 -1
  44. package/dist/src/features/simulation/activity/utils/isUpgradeActivity.js +4 -8
  45. package/dist/src/features/simulation/fees/schema.cjs +1 -1
  46. package/dist/src/features/simulation/fees/schema.d.ts +16 -0
  47. package/dist/src/features/simulation/fees/schema.js +8 -6
  48. package/dist/src/features/simulation/transactionReview/getErrorMessageAndLabelFromSimulation.cjs +1 -1
  49. package/dist/src/features/simulation/transactionReview/getErrorMessageAndLabelFromSimulation.js +10 -11
  50. package/dist/src/features/simulation/transactionReview/schema.cjs +1 -1
  51. package/dist/src/features/simulation/transactionReview/schema.d.ts +23 -0
  52. package/dist/src/features/simulation/transactionReview/schema.js +20 -18
  53. package/dist/src/features/swap/services/SwapTransactionService.cjs +1 -1
  54. package/dist/src/features/swap/services/SwapTransactionService.js +46 -49
  55. package/dist/src/http/HttpService.cjs +1 -1
  56. package/dist/src/http/HttpService.js +55 -55
  57. package/dist/src/knownDapps/utils/getDapplandUrl.cjs +1 -1
  58. package/dist/src/knownDapps/utils/getDapplandUrl.js +6 -8
  59. package/dist/src/nfts/BackendNftService.cjs +1 -1
  60. package/dist/src/nfts/BackendNftService.js +15 -16
  61. package/dist/src/tokens/service/implementation.cjs +1 -1
  62. package/dist/src/tokens/service/implementation.js +12 -12
  63. package/dist/src/transactions/estimate/utils.cjs +1 -1
  64. package/dist/src/transactions/estimate/utils.d.ts +33 -0
  65. package/dist/src/transactions/estimate/utils.js +80 -76
  66. package/dist/src/transactions/service/implementation.cjs +1 -1
  67. package/dist/src/transactions/service/implementation.d.ts +4 -0
  68. package/dist/src/transactions/service/implementation.js +89 -96
  69. package/dist/src/transactions/service/utils.cjs +1 -1
  70. package/dist/src/transactions/service/utils.d.ts +2 -3
  71. package/dist/src/transactions/service/utils.js +12 -11
  72. package/dist/src/transactions/transactionVersion.cjs +1 -1
  73. package/dist/src/transactions/transactionVersion.d.ts +2 -0
  74. package/dist/src/transactions/transactionVersion.js +12 -10
  75. package/dist/src/utils/readFileAsString.cjs +1 -1
  76. package/dist/src/utils/readFileAsString.js +3 -6
  77. package/package.json +5 -5
  78. package/dist/node_modules/.pnpm/@starknet-io_types-js@0.7.7/node_modules/@starknet-io/types-js/dist/esm/api/nonspec.cjs +0 -1
  79. package/dist/node_modules/.pnpm/@starknet-io_types-js@0.7.7/node_modules/@starknet-io/types-js/dist/esm/api/nonspec.js +0 -6
@@ -1,12 +1,12 @@
1
- import { constants as E, TransactionType as w } from "starknet";
2
- import u from "url-join";
3
- import { ReviewError as m } from "../../errors/review.js";
4
- import { getPayloadFromTransaction as I } from "./utils.js";
5
- import { urlWithQuery as F } from "../../utils/url/urlWithQuery.js";
6
- import { simulateAndReviewSchema as N, isTransactionSimulationError as O } from "../../features/simulation/transactionReview/schema.js";
7
- import { getEstimatedFeeFromSimulationAndRespectWatermarkFeeV2 as S } from "../estimate/utils.js";
8
- import { ensureArray as T } from "../../utils/arrays.js";
9
- class B {
1
+ import { TransactionType as p } from "starknet";
2
+ import d from "url-join";
3
+ import { ReviewError as l } from "../../errors/review.js";
4
+ import { getPayloadFromTransaction as w } from "./utils.js";
5
+ import { urlWithQuery as C } from "../../utils/url/urlWithQuery.js";
6
+ import { simulateAndReviewSchema as y, isTransactionSimulationError as B } from "../../features/simulation/transactionReview/schema.js";
7
+ import { getEstimatedFeeFromSimulationAndRespectWatermarkFeeV2 as F } from "../estimate/utils.js";
8
+ import { ensureArray as x } from "../../utils/arrays.js";
9
+ class D {
10
10
  constructor(s, e) {
11
11
  this.apiBase = s, this.httpService = e;
12
12
  }
@@ -15,7 +15,7 @@ class B {
15
15
  * @returns {Promise<TransactionReviewLabel[] | undefined>} The account activities.
16
16
  */
17
17
  async getLabels() {
18
- const s = u(this.apiBase, "reviewer", "labels");
18
+ const s = d(this.apiBase, "reviewer", "labels");
19
19
  return await this.httpService.get(s);
20
20
  }
21
21
  /**
@@ -23,86 +23,84 @@ class B {
23
23
  * @returns {Promise<TransactionReviewWarning[] | undefined>} The account activities.
24
24
  */
25
25
  async getWarnings() {
26
- const s = u(this.apiBase, "reviewer", "warnings/reasons");
26
+ const s = d(this.apiBase, "reviewer", "warnings/reasons");
27
27
  return await this.httpService.get(s);
28
28
  }
29
- async simulateAndReview(s, e, l, n, o, r) {
30
- var _;
31
- const i = e.some((a) => a.type === "DEPLOY_ACCOUNT");
29
+ async simulateAndReview(s, e, c, n, i, t) {
30
+ const a = e.some((r) => r.type === "DEPLOY_ACCOUNT");
32
31
  try {
33
32
  if (!("getChainId" in s))
34
33
  throw new Error("MISSING_METHOD");
35
- const a = E.TRANSACTION_VERSION.V3, t = i ? "0x0" : await s.getNonce(), c = await s.getChainId(), d = {
36
- transactions: e.map((h) => ({
37
- ...I({
38
- transaction: h,
39
- nonce: t,
40
- version: a,
41
- chainId: c,
42
- isDeploymentTransaction: i,
34
+ const r = a ? "0x0" : await s.getNonce(), o = await s.getChainId(), _ = {
35
+ transactions: e.map((u) => ({
36
+ ...w({
37
+ transaction: u,
38
+ nonce: r,
39
+ chainId: o,
40
+ isDeploymentTransaction: a,
43
41
  appDomain: n,
44
42
  cairoVersion: s.cairoVersion,
45
43
  address: s.address
46
44
  }),
47
- type: h.type
45
+ type: u.type
48
46
  }))
49
- }, g = u(this.apiBase, "reviewer", "transactions", "v2", "review", "starknet"), C = r ? F(g, { delayedTransactions: "true" }) : g, p = await this.httpService.post(C, {
47
+ }, g = d(this.apiBase, "reviewer", "transactions", "v2", "review", "starknet"), h = t ? C(g, { delayedTransactions: "true" }) : g, m = await this.httpService.post(h, {
50
48
  headers: {
51
49
  Accept: "application/json",
52
50
  "Content-Type": "application/json"
53
51
  },
54
- body: JSON.stringify(d)
55
- }, N);
56
- if ((_ = p.transactions) == null ? void 0 : _.some((h) => O(h)))
57
- return p;
58
- const y = S(p);
52
+ body: JSON.stringify(_)
53
+ }, y);
54
+ if (m.transactions?.some((u) => B(u)))
55
+ return m;
56
+ const E = F(m);
59
57
  return {
60
- ...p,
61
- enrichedFeeEstimation: y
58
+ ...m,
59
+ enrichedFeeEstimation: E
62
60
  };
63
- } catch (a) {
64
- return console.error(a), this.fallbackToOnchainFeeEstimation({
61
+ } catch (r) {
62
+ return console.error(r), this.fallbackToOnchainFeeEstimation({
65
63
  transactions: e,
66
64
  account: s,
67
- isDeploymentTransaction: i,
68
- feeTokenAddress: l,
69
- accountDeployTransaction: o
65
+ isDeploymentTransaction: a,
66
+ feeTokenAddress: c,
67
+ accountDeployTransaction: i
70
68
  });
71
69
  }
72
70
  }
73
71
  getCallsFromTx(s) {
74
72
  let e;
75
- return s.calls && (e = T(s.calls)), e;
73
+ return s.calls && (e = x(s.calls)), e;
76
74
  }
77
- async fallbackToOnchainFeeEstimation({ transactions: s, account: e, isDeploymentTransaction: l, feeTokenAddress: n, accountDeployTransaction: o }) {
75
+ async fallbackToOnchainFeeEstimation({ transactions: s, account: e, isDeploymentTransaction: c, feeTokenAddress: n, accountDeployTransaction: i }) {
78
76
  try {
79
- const r = l ? this.getCallsFromTx(s[1]) : this.getCallsFromTx(s[0]);
80
- if (!r)
81
- throw new m({
77
+ const t = c ? this.getCallsFromTx(s[1]) : this.getCallsFromTx(s[0]);
78
+ if (!t)
79
+ throw new l({
82
80
  code: "NO_CALLS_FOUND"
83
81
  });
84
- const i = await this.fetchFeesOnchain({
82
+ const a = await this.fetchFeesOnchain({
85
83
  starknetAccount: e,
86
- calls: r,
87
- isDeployed: !l,
84
+ calls: t,
85
+ isDeployed: !c,
88
86
  feeTokenAddress: n,
89
- accountDeployTransaction: o
87
+ accountDeployTransaction: i
90
88
  });
91
89
  return {
92
90
  transactions: [],
93
- enrichedFeeEstimation: i,
91
+ enrichedFeeEstimation: a,
94
92
  isBackendDown: !0
95
93
  };
96
- } catch (r) {
97
- throw console.error(r), new m({
98
- message: `${r}`,
94
+ } catch (t) {
95
+ throw console.error(t), new l({
96
+ message: `${t}`,
99
97
  code: "SIMULATE_AND_REVIEW_FAILED"
100
98
  });
101
99
  }
102
100
  }
103
- async fetchFeesOnchain({ starknetAccount: s, calls: e, isDeployed: l, feeTokenAddress: n, accountDeployTransaction: o }) {
101
+ async fetchFeesOnchain({ starknetAccount: s, calls: e, isDeployed: c, feeTokenAddress: n, accountDeployTransaction: i }) {
104
102
  try {
105
- const r = E.TRANSACTION_VERSION.V3, i = {
103
+ const t = {
106
104
  type: "native",
107
105
  transactions: {
108
106
  feeTokenAddress: n,
@@ -120,97 +118,92 @@ class B {
120
118
  }
121
119
  }
122
120
  };
123
- if (!l && o) {
121
+ if (!c && i) {
124
122
  if ("estimateFeeBulk" in s) {
125
- const _ = [
123
+ const a = [
126
124
  {
127
- type: w.DEPLOY_ACCOUNT,
125
+ type: p.DEPLOY_ACCOUNT,
128
126
  payload: {
129
- classHash: o.classHash,
130
- addressSalt: o.salt,
131
- constructorCalldata: o.calldata,
127
+ classHash: i.classHash,
128
+ addressSalt: i.salt,
129
+ constructorCalldata: i.calldata,
132
130
  contractAddress: s.address
133
131
  }
134
132
  },
135
133
  {
136
- type: w.INVOKE,
134
+ type: p.INVOKE,
137
135
  payload: e
138
136
  }
139
- ], [a, t] = await s.estimateFeeBulk(_, {
140
- version: r
141
- }).catch((c) => {
142
- throw console.error(c), c;
137
+ ], [r, o] = await s.estimateFeeBulk(a).catch((_) => {
138
+ throw console.error(_), _;
143
139
  });
144
- if (!a.l1_gas_consumed || !a.l1_gas_price || !a.l2_gas_consumed || !a.l2_gas_price || !t.l2_gas_consumed || !t.l2_gas_price)
145
- throw new m({
140
+ if (!r.resourceBounds.l1_data_gas || !r.resourceBounds.l1_gas || !r.resourceBounds.l2_gas || !o.resourceBounds.l1_data_gas || !o.resourceBounds.l1_gas || !o.resourceBounds.l2_gas)
141
+ throw new l({
146
142
  code: "ONCHAIN_FEE_ESTIMATION_FAILED",
147
143
  message: "Missing gas_consumed or gas_price"
148
144
  });
149
- i.deployment = {
145
+ t.deployment = {
150
146
  feeTokenAddress: n,
151
147
  l1Gas: {
152
- gasConsumed: a.l1_gas_consumed,
153
- gasPrice: a.l1_gas_price
148
+ gasConsumed: r.resourceBounds.l1_gas.max_amount,
149
+ gasPrice: r.resourceBounds.l1_gas.max_price_per_unit
154
150
  },
155
151
  l2Gas: {
156
- gasConsumed: a.l2_gas_consumed,
157
- gasPrice: a.l2_gas_price
152
+ gasConsumed: r.resourceBounds.l2_gas.max_amount,
153
+ gasPrice: r.resourceBounds.l2_gas.max_price_per_unit
158
154
  },
159
155
  l1DataGas: {
160
- gasConsumed: a.l1_data_gas_consumed,
161
- gasPrice: a.l1_data_gas_price
156
+ gasConsumed: r.resourceBounds.l1_data_gas.max_amount,
157
+ gasPrice: r.resourceBounds.l1_data_gas.max_price_per_unit
162
158
  }
163
- }, i.transactions = {
159
+ }, t.transactions = {
164
160
  feeTokenAddress: n,
165
161
  l1Gas: {
166
- gasConsumed: t.l1_gas_consumed,
167
- gasPrice: t.l1_gas_price
162
+ gasConsumed: o.resourceBounds.l1_gas.max_amount,
163
+ gasPrice: o.resourceBounds.l1_gas.max_price_per_unit
168
164
  },
169
165
  l2Gas: {
170
- gasConsumed: t.l2_gas_consumed,
171
- gasPrice: t.l2_gas_price
166
+ gasConsumed: o.resourceBounds.l2_gas.max_amount,
167
+ gasPrice: o.resourceBounds.l2_gas.max_price_per_unit
172
168
  },
173
169
  l1DataGas: {
174
- gasConsumed: t.l1_data_gas_consumed,
175
- gasPrice: t.l1_data_gas_price
170
+ gasConsumed: o.resourceBounds.l1_data_gas.max_amount,
171
+ gasPrice: o.resourceBounds.l1_data_gas.max_price_per_unit
176
172
  }
177
173
  };
178
174
  }
179
175
  } else {
180
- const { l1_data_gas_price: _, l1_data_gas_consumed: a, l1_gas_consumed: t, l2_gas_price: c, l2_gas_consumed: d, l1_gas_price: g } = await s.estimateFee(e, {
181
- skipValidate: !0,
182
- version: r
183
- });
184
- if (!t || !g || !d || !c)
185
- throw new m({
176
+ const { resourceBounds: a } = await s.estimateInvokeFee(e);
177
+ if (!a.l1_gas || !a.l2_gas || !a.l1_data_gas)
178
+ throw new l({
186
179
  code: "ONCHAIN_FEE_ESTIMATION_FAILED",
187
180
  message: "Missing gas_consumed or gas_price"
188
181
  });
189
- i.transactions = {
182
+ t.transactions = {
190
183
  feeTokenAddress: n,
191
184
  l1Gas: {
192
- gasConsumed: t,
193
- gasPrice: g
185
+ gasConsumed: a.l1_gas.max_amount,
186
+ gasPrice: a.l1_gas.max_price_per_unit
194
187
  },
195
188
  l2Gas: {
196
- gasConsumed: d,
197
- gasPrice: c
189
+ gasConsumed: a.l2_gas.max_amount,
190
+ gasPrice: a.l2_gas.max_price_per_unit
198
191
  },
199
192
  l1DataGas: {
200
- gasConsumed: a,
201
- gasPrice: _
193
+ gasConsumed: a.l1_data_gas.max_amount,
194
+ gasPrice: a.l1_data_gas.max_price_per_unit
202
195
  }
203
196
  };
204
197
  }
205
- return [i];
206
- } catch (r) {
207
- throw new m({
198
+ return [t];
199
+ } catch (t) {
200
+ throw new l({
208
201
  code: "ONCHAIN_FEE_ESTIMATION_FAILED",
209
- message: `${r}`
202
+ message: `${t}`
210
203
  });
211
204
  }
212
205
  }
213
206
  }
214
207
  export {
215
- B as TransactionReviewServiceWeb
208
+ D as TransactionReviewServiceWeb
216
209
  };
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const y=require("starknet"),d=require("../../utils/arrays.cjs"),g=({transaction:e,nonce:t,chainId:l,version:s,isDeploymentTransaction:r,cairoVersion:c,address:o,appDomain:u})=>{let a=t;r&&e.type!=="DEPLOY_ACCOUNT"&&(a=y.num.toHex(1));const n=d.ensureArray(e.calls);return{type:e.type,chainId:l,cairoVersion:c,nonce:a,version:s,account:o,calls:n,calldata:e.calldata,salt:e.salt,signature:e.signature,classHash:e.classHash,appDomain:u}};exports.getPayloadFromTransaction=g;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("starknet"),i=require("../../utils/arrays.cjs"),y=require("../transactionVersion.cjs"),d=({transaction:e,nonce:r,chainId:s,isDeploymentTransaction:t,cairoVersion:l,address:o,appDomain:c})=>{let a=r;t&&e.type!=="DEPLOY_ACCOUNT"&&(a=u.num.toHex(1));const n=i.ensureArray(e.calls);return{type:e.type,chainId:s,cairoVersion:l,nonce:a,version:y.TX_VERSION,account:o,calls:n,calldata:e.calldata,salt:e.salt,signature:e.signature,classHash:e.classHash,appDomain:c}};exports.getPayloadFromTransaction=d;
@@ -1,10 +1,9 @@
1
1
  import { CairoVersion } from 'starknet';
2
2
  import { TransactionReviewTransactions } from '../estimate';
3
- export declare const getPayloadFromTransaction: ({ transaction, nonce, chainId, version, isDeploymentTransaction, cairoVersion, address, appDomain, }: {
3
+ export declare const getPayloadFromTransaction: ({ transaction, nonce, chainId, isDeploymentTransaction, cairoVersion, address, appDomain, }: {
4
4
  transaction: TransactionReviewTransactions;
5
5
  nonce: string;
6
6
  chainId: string;
7
- version: string;
8
7
  isDeploymentTransaction: boolean;
9
8
  cairoVersion: CairoVersion;
10
9
  address: string;
@@ -14,7 +13,7 @@ export declare const getPayloadFromTransaction: ({ transaction, nonce, chainId,
14
13
  chainId: string;
15
14
  cairoVersion: CairoVersion;
16
15
  nonce: string;
17
- version: string;
16
+ version: "0x3";
18
17
  account: string;
19
18
  calls: import('starknet').Call[];
20
19
  calldata: string[] | undefined;
@@ -1,22 +1,23 @@
1
- import { num as u } from "starknet";
2
- import { ensureArray as y } from "../../utils/arrays.js";
3
- const g = ({ transaction: e, nonce: a, chainId: s, version: t, isDeploymentTransaction: o, cairoVersion: r, address: c, appDomain: m }) => {
1
+ import { num as p } from "starknet";
2
+ import { ensureArray as u } from "../../utils/arrays.js";
3
+ import { TX_VERSION as y } from "../transactionVersion.js";
4
+ const g = ({ transaction: e, nonce: a, chainId: o, isDeploymentTransaction: r, cairoVersion: s, address: t, appDomain: c }) => {
4
5
  let l = a;
5
- o && e.type !== "DEPLOY_ACCOUNT" && (l = u.toHex(1));
6
- const p = y(e.calls);
6
+ r && e.type !== "DEPLOY_ACCOUNT" && (l = p.toHex(1));
7
+ const m = u(e.calls);
7
8
  return {
8
9
  type: e.type,
9
- chainId: s,
10
- cairoVersion: r,
10
+ chainId: o,
11
+ cairoVersion: s,
11
12
  nonce: l,
12
- version: t,
13
- account: c,
14
- calls: p,
13
+ version: y,
14
+ account: t,
15
+ calls: m,
15
16
  calldata: e.calldata,
16
17
  salt: e.salt,
17
18
  signature: e.signature,
18
19
  classHash: e.classHash,
19
- appDomain: m
20
+ appDomain: c
20
21
  // appDomain: "https://starknetkit-blacked-listed.vercel.app", // to simulate blacklisted domain
21
22
  };
22
23
  };
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("starknet"),o=require("zod"),s=[n.ETransactionVersion3.V3,n.ETransactionVersion3.F3],i=o.z.string().default("0x3").refine(t=>{const e=n.num.toBigInt(t);return s.map(r=>n.num.toBigInt(r)).includes(e)}).transform(t=>n.num.toHex(t));exports.txVersionSchema=i;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("starknet"),o=require("zod"),s=[n.ETransactionVersion3.V3,n.ETransactionVersion3.F3],i=o.z.string().default("0x3").refine(t=>{const e=n.num.toBigInt(t);return s.map(r=>n.num.toBigInt(r)).includes(e)}).transform(t=>n.num.toHex(t)),c="0x3",a="0x100000000000000000000000000000003";exports.FEE_TX_VERSION=a;exports.TX_VERSION=c;exports.txVersionSchema=i;
@@ -5,3 +5,5 @@ export type TransactionInvokeVersion = typeof ETransactionVersion3.V3;
5
5
  export type TransactionSimulationVersion = typeof ETransactionVersion3.F3;
6
6
  export type TransactionVersion = TransactionInvokeVersion | TransactionSimulationVersion;
7
7
  export declare const txVersionSchema: z.ZodPipe<z.ZodDefault<z.ZodString>, z.ZodTransform<"0x3" | "0x100000000000000000000000000000003", string>>;
8
+ export declare const TX_VERSION: "0x3";
9
+ export declare const FEE_TX_VERSION: "0x100000000000000000000000000000003";
@@ -1,12 +1,14 @@
1
- import { num as t, ETransactionVersion3 as r } from "starknet";
2
- import { z as i } from "zod";
3
- const s = [
4
- r.V3,
5
- r.F3
6
- ], c = i.string().default("0x3").refine((n) => {
7
- const o = t.toBigInt(n);
8
- return s.map((e) => t.toBigInt(e)).includes(o);
9
- }).transform((n) => t.toHex(n));
1
+ import { num as t, ETransactionVersion3 as o } from "starknet";
2
+ import { z as e } from "zod";
3
+ const i = [
4
+ o.V3,
5
+ o.F3
6
+ ], a = e.string().default("0x3").refine((n) => {
7
+ const r = t.toBigInt(n);
8
+ return i.map((s) => t.toBigInt(s)).includes(r);
9
+ }).transform((n) => t.toHex(n)), x = "0x3", V = "0x100000000000000000000000000000003";
10
10
  export {
11
- c as txVersionSchema
11
+ V as FEE_TX_VERSION,
12
+ x as TX_VERSION,
13
+ a as txVersionSchema
12
14
  };
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=o=>new Promise((t,e)=>{const r=new FileReader;r.onload=()=>{var n;return r.result?t((n=r.result)==null?void 0:n.toString()):e(new Error("Could not read file"))},r.onerror=e,r.onabort=e.bind(null,new Error("User aborted")),r.readAsText(o)});exports.readFileAsString=i;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=n=>new Promise((o,e)=>{const r=new FileReader;r.onload=()=>r.result?o(r.result?.toString()):e(new Error("Could not read file")),r.onerror=e,r.onabort=e.bind(null,new Error("User aborted")),r.readAsText(n)});exports.readFileAsString=t;
@@ -1,10 +1,7 @@
1
- const d = (o) => new Promise((t, e) => {
1
+ const t = (n) => new Promise((o, e) => {
2
2
  const r = new FileReader();
3
- r.onload = () => {
4
- var n;
5
- return r.result ? t((n = r.result) == null ? void 0 : n.toString()) : e(new Error("Could not read file"));
6
- }, r.onerror = e, r.onabort = e.bind(null, new Error("User aborted")), r.readAsText(o);
3
+ r.onload = () => r.result ? o(r.result?.toString()) : e(new Error("Could not read file")), r.onerror = e, r.onabort = e.bind(null, new Error("User aborted")), r.readAsText(n);
7
4
  });
8
5
  export {
9
- d as readFileAsString
6
+ t as readFileAsString
10
7
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@argent/x-shared",
3
- "version": "1.74.2",
3
+ "version": "1.75.0",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/argentlabs/x-shared.git"
@@ -72,7 +72,7 @@
72
72
  "eslint-config-prettier": "10.1.1",
73
73
  "eslint-plugin-import": "2.31.0",
74
74
  "husky": "9.1.7",
75
- "lint-staged": "15.5.0",
75
+ "lint-staged": "16.1.2",
76
76
  "msw": "2.7.3",
77
77
  "prettier": "3.5.3",
78
78
  "semantic-release": "24.2.3",
@@ -80,7 +80,7 @@
80
80
  "ts-to-zod": "3.15.0",
81
81
  "tsx": "4.19.3",
82
82
  "typescript": "5.8.3",
83
- "vite": "6.2.5",
83
+ "vite": "7.0.6",
84
84
  "vite-plugin-dts": "4.5.3",
85
85
  "vitest": "3.1.1"
86
86
  },
@@ -90,7 +90,7 @@
90
90
  "@langchain/google-genai": "^0.2.2",
91
91
  "@lokalise/node-api": "^15.0.0",
92
92
  "@noble/hashes": "^1.3.1",
93
- "@starknet-io/types-js": "^0.7.7",
93
+ "@starknet-io/types-js": "0.9.0-beta.5",
94
94
  "@types/fs-extra": "^11.0.4",
95
95
  "big-decimal-number": "npm:bignumber.js@^9.1.2",
96
96
  "dotenv": "^17.0.0",
@@ -99,7 +99,7 @@
99
99
  "micro-starknet": "^0.2.3",
100
100
  "numeral": "2.0.6",
101
101
  "react-i18next": "^15.4.1",
102
- "starknet": "7.5.1",
102
+ "starknet": "8.1.2",
103
103
  "starknet4-deprecated": "npm:starknet@4.4.0",
104
104
  "starknet5": "npm:starknet@5.25.0",
105
105
  "zod-to-json-schema": "^3.24.5"
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e={V1:"0x1"};exports.ETransactionVersion=e;
@@ -1,6 +0,0 @@
1
- const n = {
2
- V1: "0x1"
3
- };
4
- export {
5
- n as ETransactionVersion
6
- };