@argent/x-shared 1.70.3 → 1.72.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 (64) hide show
  1. package/dist/index.cjs +1 -1
  2. package/dist/index.js +286 -307
  3. package/dist/simulation.cjs +1 -1
  4. package/dist/simulation.js +73 -69
  5. package/dist/src/features/paymaster/types.d.ts +2 -2
  6. package/dist/src/features/simulation/activity/utils/index.d.ts +3 -0
  7. package/dist/src/features/simulation/activity/utils/isAddMultisigSignersActivity.cjs +1 -0
  8. package/dist/src/features/simulation/activity/utils/isAddMultisigSignersActivity.d.ts +3 -0
  9. package/dist/src/features/simulation/activity/utils/isAddMultisigSignersActivity.js +24 -0
  10. package/dist/src/features/simulation/activity/utils/isChangeMultisigThresholdActivity.cjs +1 -0
  11. package/dist/src/features/simulation/activity/utils/isChangeMultisigThresholdActivity.d.ts +3 -0
  12. package/dist/src/features/simulation/activity/utils/isChangeMultisigThresholdActivity.js +24 -0
  13. package/dist/src/features/simulation/activity/utils/isRemoveMultisigSignersActivity.cjs +1 -0
  14. package/dist/src/features/simulation/activity/utils/isRemoveMultisigSignersActivity.d.ts +3 -0
  15. package/dist/src/features/simulation/activity/utils/isRemoveMultisigSignersActivity.js +24 -0
  16. package/dist/src/features/simulation/activity/utils/isReplaceMultisigSignersActivity.d.ts +3 -0
  17. package/dist/src/features/simulation/activity/utils/isSwapActivity.cjs +1 -1
  18. package/dist/src/features/simulation/activity/utils/isSwapActivity.d.ts +2 -1
  19. package/dist/src/features/simulation/activity/utils/isSwapActivity.js +15 -17
  20. package/dist/src/features/simulation/activity/utils/isUpgradeActivity.cjs +1 -1
  21. package/dist/src/features/simulation/activity/utils/isUpgradeActivity.d.ts +2 -1
  22. package/dist/src/features/simulation/activity/utils/isUpgradeActivity.js +16 -14
  23. package/dist/src/features/simulation/fees/schema.cjs +1 -1
  24. package/dist/src/features/simulation/fees/schema.d.ts +665 -705
  25. package/dist/src/features/simulation/fees/schema.js +32 -39
  26. package/dist/src/features/simulation/transactionReview/schema.cjs +1 -1
  27. package/dist/src/features/simulation/transactionReview/schema.d.ts +2117 -7917
  28. package/dist/src/features/simulation/transactionReview/schema.js +103 -112
  29. package/dist/src/features/swap/models/execute.model.d.ts +4 -0
  30. package/dist/src/features/swap/services/SwapTransactionService.cjs +1 -1
  31. package/dist/src/features/swap/services/SwapTransactionService.js +22 -18
  32. package/dist/src/tokens/isUnlimitedAmount.cjs +1 -1
  33. package/dist/src/tokens/isUnlimitedAmount.js +3 -3
  34. package/dist/src/transactions/amount.cjs +1 -1
  35. package/dist/src/transactions/amount.d.ts +2 -2
  36. package/dist/src/transactions/amount.js +9 -9
  37. package/dist/src/transactions/estimate/adjustment.cjs +1 -0
  38. package/dist/src/transactions/estimate/adjustment.d.ts +4 -0
  39. package/dist/src/transactions/estimate/adjustment.js +7 -0
  40. package/dist/src/transactions/estimate/argentMaxFee.d.ts +3 -3
  41. package/dist/src/transactions/estimate/index.d.ts +0 -1
  42. package/dist/src/transactions/estimate/model.d.ts +1 -10
  43. package/dist/src/transactions/estimate/utils.cjs +1 -1
  44. package/dist/src/transactions/estimate/utils.d.ts +31 -61
  45. package/dist/src/transactions/estimate/utils.js +156 -223
  46. package/dist/src/transactions/index.d.ts +0 -1
  47. package/dist/src/transactions/service/implementation.cjs +1 -1
  48. package/dist/src/transactions/service/implementation.d.ts +39 -22
  49. package/dist/src/transactions/service/implementation.js +130 -97
  50. package/dist/src/transactions/service/index.d.ts +1 -0
  51. package/dist/src/transactions/service/utils.cjs +1 -0
  52. package/dist/src/transactions/service/utils.d.ts +25 -0
  53. package/dist/src/transactions/service/utils.js +25 -0
  54. package/dist/src/transactions/transactionSimulationTypes.d.ts +1 -7
  55. package/dist/src/transactions/transactionVersion.cjs +1 -1
  56. package/dist/src/transactions/transactionVersion.d.ts +5 -6
  57. package/dist/src/transactions/transactionVersion.js +10 -12
  58. package/package.json +2 -2
  59. package/dist/src/transactions/estimate/utilsV2.cjs +0 -1
  60. package/dist/src/transactions/estimate/utilsV2.d.ts +0 -26
  61. package/dist/src/transactions/estimate/utilsV2.js +0 -107
  62. package/dist/src/transactions/getTransactionVersion.cjs +0 -1
  63. package/dist/src/transactions/getTransactionVersion.d.ts +0 -12
  64. package/dist/src/transactions/getTransactionVersion.js +0 -21
@@ -1,258 +1,79 @@
1
1
  import { z } from 'zod';
2
- import { UnionEvaluate } from '../../../utils/type.utils';
3
- export declare const estimatedFeeSchema: z.ZodObject<{
4
- feeTokenAddress: z.ZodEffects<z.ZodPipeline<z.ZodString, z.ZodEffects<z.ZodString, string, string>>, `0x${string}`, string>;
5
- amount: z.ZodBigInt;
6
- pricePerUnit: z.ZodBigInt;
7
- max: z.ZodOptional<z.ZodUnion<[z.ZodObject<{
8
- amount: z.ZodBigInt;
9
- pricePerUnit: z.ZodBigInt;
10
- }, "strip", z.ZodTypeAny, {
11
- amount: bigint;
12
- pricePerUnit: bigint;
13
- }, {
14
- amount: bigint;
15
- pricePerUnit: bigint;
16
- }>, z.ZodObject<{
17
- maxFee: z.ZodBigInt;
18
- }, "strip", z.ZodTypeAny, {
19
- maxFee: bigint;
20
- }, {
21
- maxFee: bigint;
22
- }>]>>;
23
- dataGasConsumed: z.ZodOptional<z.ZodBigInt>;
24
- dataGasPrice: z.ZodOptional<z.ZodBigInt>;
2
+ import { StrictOmit, UnionEvaluate } from '../../../utils/type.utils';
3
+ export declare const resourceBoundsSchema: z.ZodObject<{
4
+ gasConsumed: z.ZodBigInt;
5
+ gasPrice: z.ZodBigInt;
25
6
  }, "strip", z.ZodTypeAny, {
26
- amount: bigint;
27
- pricePerUnit: bigint;
28
- feeTokenAddress: `0x${string}`;
29
- max?: {
30
- amount: bigint;
31
- pricePerUnit: bigint;
32
- } | {
33
- maxFee: bigint;
34
- } | undefined;
35
- dataGasConsumed?: bigint | undefined;
36
- dataGasPrice?: bigint | undefined;
7
+ gasConsumed: bigint;
8
+ gasPrice: bigint;
37
9
  }, {
38
- amount: bigint;
39
- pricePerUnit: bigint;
40
- feeTokenAddress: string;
41
- max?: {
42
- amount: bigint;
43
- pricePerUnit: bigint;
44
- } | {
45
- maxFee: bigint;
46
- } | undefined;
47
- dataGasConsumed?: bigint | undefined;
48
- dataGasPrice?: bigint | undefined;
10
+ gasConsumed: bigint;
11
+ gasPrice: bigint;
49
12
  }>;
50
- export type EstimatedFee = z.infer<typeof estimatedFeeSchema>;
51
- export declare const estimatedFeesSchema: z.ZodObject<{
52
- deployment: z.ZodOptional<z.ZodObject<{
53
- feeTokenAddress: z.ZodEffects<z.ZodPipeline<z.ZodString, z.ZodEffects<z.ZodString, string, string>>, `0x${string}`, string>;
54
- amount: z.ZodBigInt;
55
- pricePerUnit: z.ZodBigInt;
56
- max: z.ZodOptional<z.ZodUnion<[z.ZodObject<{
57
- amount: z.ZodBigInt;
58
- pricePerUnit: z.ZodBigInt;
59
- }, "strip", z.ZodTypeAny, {
60
- amount: bigint;
61
- pricePerUnit: bigint;
62
- }, {
63
- amount: bigint;
64
- pricePerUnit: bigint;
65
- }>, z.ZodObject<{
66
- maxFee: z.ZodBigInt;
67
- }, "strip", z.ZodTypeAny, {
68
- maxFee: bigint;
69
- }, {
70
- maxFee: bigint;
71
- }>]>>;
72
- dataGasConsumed: z.ZodOptional<z.ZodBigInt>;
73
- dataGasPrice: z.ZodOptional<z.ZodBigInt>;
74
- }, "strip", z.ZodTypeAny, {
75
- amount: bigint;
76
- pricePerUnit: bigint;
77
- feeTokenAddress: `0x${string}`;
78
- max?: {
79
- amount: bigint;
80
- pricePerUnit: bigint;
81
- } | {
82
- maxFee: bigint;
83
- } | undefined;
84
- dataGasConsumed?: bigint | undefined;
85
- dataGasPrice?: bigint | undefined;
86
- }, {
87
- amount: bigint;
88
- pricePerUnit: bigint;
89
- feeTokenAddress: string;
90
- max?: {
91
- amount: bigint;
92
- pricePerUnit: bigint;
93
- } | {
94
- maxFee: bigint;
95
- } | undefined;
96
- dataGasConsumed?: bigint | undefined;
97
- dataGasPrice?: bigint | undefined;
98
- }>>;
99
- transactions: z.ZodObject<{
100
- feeTokenAddress: z.ZodEffects<z.ZodPipeline<z.ZodString, z.ZodEffects<z.ZodString, string, string>>, `0x${string}`, string>;
101
- amount: z.ZodBigInt;
102
- pricePerUnit: z.ZodBigInt;
103
- max: z.ZodOptional<z.ZodUnion<[z.ZodObject<{
104
- amount: z.ZodBigInt;
105
- pricePerUnit: z.ZodBigInt;
106
- }, "strip", z.ZodTypeAny, {
107
- amount: bigint;
108
- pricePerUnit: bigint;
109
- }, {
110
- amount: bigint;
111
- pricePerUnit: bigint;
112
- }>, z.ZodObject<{
113
- maxFee: z.ZodBigInt;
114
- }, "strip", z.ZodTypeAny, {
115
- maxFee: bigint;
116
- }, {
117
- maxFee: bigint;
118
- }>]>>;
119
- dataGasConsumed: z.ZodOptional<z.ZodBigInt>;
120
- dataGasPrice: z.ZodOptional<z.ZodBigInt>;
13
+ export type ResourceBounds = z.infer<typeof resourceBoundsSchema>;
14
+ export declare const nativeEstimatedFeeSchema: z.ZodObject<{
15
+ type: z.ZodLiteral<"native">;
16
+ feeTokenAddress: z.ZodEffects<z.ZodPipeline<z.ZodString, z.ZodEffects<z.ZodString, string, string>>, `0x${string}`, string>;
17
+ l1Gas: z.ZodObject<{
18
+ gasConsumed: z.ZodBigInt;
19
+ gasPrice: z.ZodBigInt;
121
20
  }, "strip", z.ZodTypeAny, {
122
- amount: bigint;
123
- pricePerUnit: bigint;
124
- feeTokenAddress: `0x${string}`;
125
- max?: {
126
- amount: bigint;
127
- pricePerUnit: bigint;
128
- } | {
129
- maxFee: bigint;
130
- } | undefined;
131
- dataGasConsumed?: bigint | undefined;
132
- dataGasPrice?: bigint | undefined;
21
+ gasConsumed: bigint;
22
+ gasPrice: bigint;
133
23
  }, {
134
- amount: bigint;
135
- pricePerUnit: bigint;
136
- feeTokenAddress: string;
137
- max?: {
138
- amount: bigint;
139
- pricePerUnit: bigint;
140
- } | {
141
- maxFee: bigint;
142
- } | undefined;
143
- dataGasConsumed?: bigint | undefined;
144
- dataGasPrice?: bigint | undefined;
24
+ gasConsumed: bigint;
25
+ gasPrice: bigint;
145
26
  }>;
146
- }, "strip", z.ZodTypeAny, {
147
- transactions: {
148
- amount: bigint;
149
- pricePerUnit: bigint;
150
- feeTokenAddress: `0x${string}`;
151
- max?: {
152
- amount: bigint;
153
- pricePerUnit: bigint;
154
- } | {
155
- maxFee: bigint;
156
- } | undefined;
157
- dataGasConsumed?: bigint | undefined;
158
- dataGasPrice?: bigint | undefined;
159
- };
160
- deployment?: {
161
- amount: bigint;
162
- pricePerUnit: bigint;
163
- feeTokenAddress: `0x${string}`;
164
- max?: {
165
- amount: bigint;
166
- pricePerUnit: bigint;
167
- } | {
168
- maxFee: bigint;
169
- } | undefined;
170
- dataGasConsumed?: bigint | undefined;
171
- dataGasPrice?: bigint | undefined;
172
- } | undefined;
173
- }, {
174
- transactions: {
175
- amount: bigint;
176
- pricePerUnit: bigint;
177
- feeTokenAddress: string;
178
- max?: {
179
- amount: bigint;
180
- pricePerUnit: bigint;
181
- } | {
182
- maxFee: bigint;
183
- } | undefined;
184
- dataGasConsumed?: bigint | undefined;
185
- dataGasPrice?: bigint | undefined;
186
- };
187
- deployment?: {
188
- amount: bigint;
189
- pricePerUnit: bigint;
190
- feeTokenAddress: string;
191
- max?: {
192
- amount: bigint;
193
- pricePerUnit: bigint;
194
- } | {
195
- maxFee: bigint;
196
- } | undefined;
197
- dataGasConsumed?: bigint | undefined;
198
- dataGasPrice?: bigint | undefined;
199
- } | undefined;
200
- }>;
201
- export type EstimatedFees = z.infer<typeof estimatedFeesSchema>;
202
- export interface EstimatedFeesEnriched extends EstimatedFees {
203
- id: string;
204
- timestamp: number;
205
- }
206
- export declare const nativeEstimatedFeeSchema: z.ZodObject<z.objectUtil.extendShape<{
207
- feeTokenAddress: z.ZodEffects<z.ZodPipeline<z.ZodString, z.ZodEffects<z.ZodString, string, string>>, `0x${string}`, string>;
208
- amount: z.ZodBigInt;
209
- pricePerUnit: z.ZodBigInt;
210
- max: z.ZodOptional<z.ZodUnion<[z.ZodObject<{
211
- amount: z.ZodBigInt;
212
- pricePerUnit: z.ZodBigInt;
27
+ l2Gas: z.ZodObject<{
28
+ gasConsumed: z.ZodBigInt;
29
+ gasPrice: z.ZodBigInt;
213
30
  }, "strip", z.ZodTypeAny, {
214
- amount: bigint;
215
- pricePerUnit: bigint;
31
+ gasConsumed: bigint;
32
+ gasPrice: bigint;
216
33
  }, {
217
- amount: bigint;
218
- pricePerUnit: bigint;
219
- }>, z.ZodObject<{
220
- maxFee: z.ZodBigInt;
34
+ gasConsumed: bigint;
35
+ gasPrice: bigint;
36
+ }>;
37
+ l1DataGas: z.ZodObject<{
38
+ gasConsumed: z.ZodBigInt;
39
+ gasPrice: z.ZodBigInt;
221
40
  }, "strip", z.ZodTypeAny, {
222
- maxFee: bigint;
41
+ gasConsumed: bigint;
42
+ gasPrice: bigint;
223
43
  }, {
224
- maxFee: bigint;
225
- }>]>>;
226
- dataGasConsumed: z.ZodOptional<z.ZodBigInt>;
227
- dataGasPrice: z.ZodOptional<z.ZodBigInt>;
228
- }, {
229
- type: z.ZodLiteral<"native">;
230
- }>, "strip", z.ZodTypeAny, {
44
+ gasConsumed: bigint;
45
+ gasPrice: bigint;
46
+ }>;
47
+ }, "strip", z.ZodTypeAny, {
231
48
  type: "native";
232
- amount: bigint;
233
- pricePerUnit: bigint;
234
49
  feeTokenAddress: `0x${string}`;
235
- max?: {
236
- amount: bigint;
237
- pricePerUnit: bigint;
238
- } | {
239
- maxFee: bigint;
240
- } | undefined;
241
- dataGasConsumed?: bigint | undefined;
242
- dataGasPrice?: bigint | undefined;
50
+ l1Gas: {
51
+ gasConsumed: bigint;
52
+ gasPrice: bigint;
53
+ };
54
+ l2Gas: {
55
+ gasConsumed: bigint;
56
+ gasPrice: bigint;
57
+ };
58
+ l1DataGas: {
59
+ gasConsumed: bigint;
60
+ gasPrice: bigint;
61
+ };
243
62
  }, {
244
63
  type: "native";
245
- amount: bigint;
246
- pricePerUnit: bigint;
247
64
  feeTokenAddress: string;
248
- max?: {
249
- amount: bigint;
250
- pricePerUnit: bigint;
251
- } | {
252
- maxFee: bigint;
253
- } | undefined;
254
- dataGasConsumed?: bigint | undefined;
255
- dataGasPrice?: bigint | undefined;
65
+ l1Gas: {
66
+ gasConsumed: bigint;
67
+ gasPrice: bigint;
68
+ };
69
+ l2Gas: {
70
+ gasConsumed: bigint;
71
+ gasPrice: bigint;
72
+ };
73
+ l1DataGas: {
74
+ gasConsumed: bigint;
75
+ gasPrice: bigint;
76
+ };
256
77
  }>;
257
78
  export declare const paymasterEstimatedFeeSchema: z.ZodObject<{
258
79
  type: z.ZodLiteral<"paymaster">;
@@ -261,65 +82,78 @@ export declare const paymasterEstimatedFeeSchema: z.ZodObject<{
261
82
  overallFee: z.ZodBigInt;
262
83
  }, "strip", z.ZodTypeAny, {
263
84
  type: "paymaster";
264
- maxFee: bigint;
265
85
  feeTokenAddress: `0x${string}`;
86
+ maxFee: bigint;
266
87
  overallFee: bigint;
267
88
  }, {
268
89
  type: "paymaster";
269
- maxFee: bigint;
270
90
  feeTokenAddress: string;
91
+ maxFee: bigint;
271
92
  overallFee: bigint;
272
93
  }>;
273
- export declare const estimatedFeeV2Schema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<z.objectUtil.extendShape<{
94
+ export declare const estimatedFeeSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
95
+ type: z.ZodLiteral<"native">;
274
96
  feeTokenAddress: z.ZodEffects<z.ZodPipeline<z.ZodString, z.ZodEffects<z.ZodString, string, string>>, `0x${string}`, string>;
275
- amount: z.ZodBigInt;
276
- pricePerUnit: z.ZodBigInt;
277
- max: z.ZodOptional<z.ZodUnion<[z.ZodObject<{
278
- amount: z.ZodBigInt;
279
- pricePerUnit: z.ZodBigInt;
97
+ l1Gas: z.ZodObject<{
98
+ gasConsumed: z.ZodBigInt;
99
+ gasPrice: z.ZodBigInt;
280
100
  }, "strip", z.ZodTypeAny, {
281
- amount: bigint;
282
- pricePerUnit: bigint;
101
+ gasConsumed: bigint;
102
+ gasPrice: bigint;
283
103
  }, {
284
- amount: bigint;
285
- pricePerUnit: bigint;
286
- }>, z.ZodObject<{
287
- maxFee: z.ZodBigInt;
104
+ gasConsumed: bigint;
105
+ gasPrice: bigint;
106
+ }>;
107
+ l2Gas: z.ZodObject<{
108
+ gasConsumed: z.ZodBigInt;
109
+ gasPrice: z.ZodBigInt;
288
110
  }, "strip", z.ZodTypeAny, {
289
- maxFee: bigint;
111
+ gasConsumed: bigint;
112
+ gasPrice: bigint;
290
113
  }, {
291
- maxFee: bigint;
292
- }>]>>;
293
- dataGasConsumed: z.ZodOptional<z.ZodBigInt>;
294
- dataGasPrice: z.ZodOptional<z.ZodBigInt>;
295
- }, {
296
- type: z.ZodLiteral<"native">;
297
- }>, "strip", z.ZodTypeAny, {
114
+ gasConsumed: bigint;
115
+ gasPrice: bigint;
116
+ }>;
117
+ l1DataGas: z.ZodObject<{
118
+ gasConsumed: z.ZodBigInt;
119
+ gasPrice: z.ZodBigInt;
120
+ }, "strip", z.ZodTypeAny, {
121
+ gasConsumed: bigint;
122
+ gasPrice: bigint;
123
+ }, {
124
+ gasConsumed: bigint;
125
+ gasPrice: bigint;
126
+ }>;
127
+ }, "strip", z.ZodTypeAny, {
298
128
  type: "native";
299
- amount: bigint;
300
- pricePerUnit: bigint;
301
129
  feeTokenAddress: `0x${string}`;
302
- max?: {
303
- amount: bigint;
304
- pricePerUnit: bigint;
305
- } | {
306
- maxFee: bigint;
307
- } | undefined;
308
- dataGasConsumed?: bigint | undefined;
309
- dataGasPrice?: bigint | undefined;
130
+ l1Gas: {
131
+ gasConsumed: bigint;
132
+ gasPrice: bigint;
133
+ };
134
+ l2Gas: {
135
+ gasConsumed: bigint;
136
+ gasPrice: bigint;
137
+ };
138
+ l1DataGas: {
139
+ gasConsumed: bigint;
140
+ gasPrice: bigint;
141
+ };
310
142
  }, {
311
143
  type: "native";
312
- amount: bigint;
313
- pricePerUnit: bigint;
314
144
  feeTokenAddress: string;
315
- max?: {
316
- amount: bigint;
317
- pricePerUnit: bigint;
318
- } | {
319
- maxFee: bigint;
320
- } | undefined;
321
- dataGasConsumed?: bigint | undefined;
322
- dataGasPrice?: bigint | undefined;
145
+ l1Gas: {
146
+ gasConsumed: bigint;
147
+ gasPrice: bigint;
148
+ };
149
+ l2Gas: {
150
+ gasConsumed: bigint;
151
+ gasPrice: bigint;
152
+ };
153
+ l1DataGas: {
154
+ gasConsumed: bigint;
155
+ gasPrice: bigint;
156
+ };
323
157
  }>, z.ZodObject<{
324
158
  type: z.ZodLiteral<"paymaster">;
325
159
  feeTokenAddress: z.ZodEffects<z.ZodPipeline<z.ZodString, z.ZodEffects<z.ZodString, string, string>>, `0x${string}`, string>;
@@ -327,167 +161,205 @@ export declare const estimatedFeeV2Schema: z.ZodDiscriminatedUnion<"type", [z.Zo
327
161
  overallFee: z.ZodBigInt;
328
162
  }, "strip", z.ZodTypeAny, {
329
163
  type: "paymaster";
330
- maxFee: bigint;
331
164
  feeTokenAddress: `0x${string}`;
165
+ maxFee: bigint;
332
166
  overallFee: bigint;
333
167
  }, {
334
168
  type: "paymaster";
335
- maxFee: bigint;
336
169
  feeTokenAddress: string;
170
+ maxFee: bigint;
337
171
  overallFee: bigint;
338
172
  }>]>;
339
- export type EstimatedFeeV2 = z.infer<typeof estimatedFeeV2Schema>;
173
+ export type EstimatedFee = z.infer<typeof estimatedFeeSchema>;
340
174
  export declare const nativeEstimatedFeesSchema: z.ZodObject<{
341
175
  type: z.ZodLiteral<"native">;
342
- transactions: z.ZodObject<{
176
+ transactions: z.ZodObject<Omit<{
177
+ type: z.ZodLiteral<"native">;
343
178
  feeTokenAddress: z.ZodEffects<z.ZodPipeline<z.ZodString, z.ZodEffects<z.ZodString, string, string>>, `0x${string}`, string>;
344
- amount: z.ZodBigInt;
345
- pricePerUnit: z.ZodBigInt;
346
- max: z.ZodOptional<z.ZodUnion<[z.ZodObject<{
347
- amount: z.ZodBigInt;
348
- pricePerUnit: z.ZodBigInt;
179
+ l1Gas: z.ZodObject<{
180
+ gasConsumed: z.ZodBigInt;
181
+ gasPrice: z.ZodBigInt;
349
182
  }, "strip", z.ZodTypeAny, {
350
- amount: bigint;
351
- pricePerUnit: bigint;
183
+ gasConsumed: bigint;
184
+ gasPrice: bigint;
352
185
  }, {
353
- amount: bigint;
354
- pricePerUnit: bigint;
355
- }>, z.ZodObject<{
356
- maxFee: z.ZodBigInt;
186
+ gasConsumed: bigint;
187
+ gasPrice: bigint;
188
+ }>;
189
+ l2Gas: z.ZodObject<{
190
+ gasConsumed: z.ZodBigInt;
191
+ gasPrice: z.ZodBigInt;
357
192
  }, "strip", z.ZodTypeAny, {
358
- maxFee: bigint;
193
+ gasConsumed: bigint;
194
+ gasPrice: bigint;
359
195
  }, {
360
- maxFee: bigint;
361
- }>]>>;
362
- dataGasConsumed: z.ZodOptional<z.ZodBigInt>;
363
- dataGasPrice: z.ZodOptional<z.ZodBigInt>;
364
- }, "strip", z.ZodTypeAny, {
365
- amount: bigint;
366
- pricePerUnit: bigint;
196
+ gasConsumed: bigint;
197
+ gasPrice: bigint;
198
+ }>;
199
+ l1DataGas: z.ZodObject<{
200
+ gasConsumed: z.ZodBigInt;
201
+ gasPrice: z.ZodBigInt;
202
+ }, "strip", z.ZodTypeAny, {
203
+ gasConsumed: bigint;
204
+ gasPrice: bigint;
205
+ }, {
206
+ gasConsumed: bigint;
207
+ gasPrice: bigint;
208
+ }>;
209
+ }, "type">, "strip", z.ZodTypeAny, {
367
210
  feeTokenAddress: `0x${string}`;
368
- max?: {
369
- amount: bigint;
370
- pricePerUnit: bigint;
371
- } | {
372
- maxFee: bigint;
373
- } | undefined;
374
- dataGasConsumed?: bigint | undefined;
375
- dataGasPrice?: bigint | undefined;
211
+ l1Gas: {
212
+ gasConsumed: bigint;
213
+ gasPrice: bigint;
214
+ };
215
+ l2Gas: {
216
+ gasConsumed: bigint;
217
+ gasPrice: bigint;
218
+ };
219
+ l1DataGas: {
220
+ gasConsumed: bigint;
221
+ gasPrice: bigint;
222
+ };
376
223
  }, {
377
- amount: bigint;
378
- pricePerUnit: bigint;
379
224
  feeTokenAddress: string;
380
- max?: {
381
- amount: bigint;
382
- pricePerUnit: bigint;
383
- } | {
384
- maxFee: bigint;
385
- } | undefined;
386
- dataGasConsumed?: bigint | undefined;
387
- dataGasPrice?: bigint | undefined;
225
+ l1Gas: {
226
+ gasConsumed: bigint;
227
+ gasPrice: bigint;
228
+ };
229
+ l2Gas: {
230
+ gasConsumed: bigint;
231
+ gasPrice: bigint;
232
+ };
233
+ l1DataGas: {
234
+ gasConsumed: bigint;
235
+ gasPrice: bigint;
236
+ };
388
237
  }>;
389
- deployment: z.ZodOptional<z.ZodObject<{
238
+ deployment: z.ZodOptional<z.ZodObject<Omit<{
239
+ type: z.ZodLiteral<"native">;
390
240
  feeTokenAddress: z.ZodEffects<z.ZodPipeline<z.ZodString, z.ZodEffects<z.ZodString, string, string>>, `0x${string}`, string>;
391
- amount: z.ZodBigInt;
392
- pricePerUnit: z.ZodBigInt;
393
- max: z.ZodOptional<z.ZodUnion<[z.ZodObject<{
394
- amount: z.ZodBigInt;
395
- pricePerUnit: z.ZodBigInt;
241
+ l1Gas: z.ZodObject<{
242
+ gasConsumed: z.ZodBigInt;
243
+ gasPrice: z.ZodBigInt;
396
244
  }, "strip", z.ZodTypeAny, {
397
- amount: bigint;
398
- pricePerUnit: bigint;
245
+ gasConsumed: bigint;
246
+ gasPrice: bigint;
399
247
  }, {
400
- amount: bigint;
401
- pricePerUnit: bigint;
402
- }>, z.ZodObject<{
403
- maxFee: z.ZodBigInt;
248
+ gasConsumed: bigint;
249
+ gasPrice: bigint;
250
+ }>;
251
+ l2Gas: z.ZodObject<{
252
+ gasConsumed: z.ZodBigInt;
253
+ gasPrice: z.ZodBigInt;
404
254
  }, "strip", z.ZodTypeAny, {
405
- maxFee: bigint;
255
+ gasConsumed: bigint;
256
+ gasPrice: bigint;
406
257
  }, {
407
- maxFee: bigint;
408
- }>]>>;
409
- dataGasConsumed: z.ZodOptional<z.ZodBigInt>;
410
- dataGasPrice: z.ZodOptional<z.ZodBigInt>;
411
- }, "strip", z.ZodTypeAny, {
412
- amount: bigint;
413
- pricePerUnit: bigint;
258
+ gasConsumed: bigint;
259
+ gasPrice: bigint;
260
+ }>;
261
+ l1DataGas: z.ZodObject<{
262
+ gasConsumed: z.ZodBigInt;
263
+ gasPrice: z.ZodBigInt;
264
+ }, "strip", z.ZodTypeAny, {
265
+ gasConsumed: bigint;
266
+ gasPrice: bigint;
267
+ }, {
268
+ gasConsumed: bigint;
269
+ gasPrice: bigint;
270
+ }>;
271
+ }, "type">, "strip", z.ZodTypeAny, {
414
272
  feeTokenAddress: `0x${string}`;
415
- max?: {
416
- amount: bigint;
417
- pricePerUnit: bigint;
418
- } | {
419
- maxFee: bigint;
420
- } | undefined;
421
- dataGasConsumed?: bigint | undefined;
422
- dataGasPrice?: bigint | undefined;
273
+ l1Gas: {
274
+ gasConsumed: bigint;
275
+ gasPrice: bigint;
276
+ };
277
+ l2Gas: {
278
+ gasConsumed: bigint;
279
+ gasPrice: bigint;
280
+ };
281
+ l1DataGas: {
282
+ gasConsumed: bigint;
283
+ gasPrice: bigint;
284
+ };
423
285
  }, {
424
- amount: bigint;
425
- pricePerUnit: bigint;
426
286
  feeTokenAddress: string;
427
- max?: {
428
- amount: bigint;
429
- pricePerUnit: bigint;
430
- } | {
431
- maxFee: bigint;
432
- } | undefined;
433
- dataGasConsumed?: bigint | undefined;
434
- dataGasPrice?: bigint | undefined;
287
+ l1Gas: {
288
+ gasConsumed: bigint;
289
+ gasPrice: bigint;
290
+ };
291
+ l2Gas: {
292
+ gasConsumed: bigint;
293
+ gasPrice: bigint;
294
+ };
295
+ l1DataGas: {
296
+ gasConsumed: bigint;
297
+ gasPrice: bigint;
298
+ };
435
299
  }>>;
436
300
  }, "strip", z.ZodTypeAny, {
437
301
  type: "native";
438
302
  transactions: {
439
- amount: bigint;
440
- pricePerUnit: bigint;
441
303
  feeTokenAddress: `0x${string}`;
442
- max?: {
443
- amount: bigint;
444
- pricePerUnit: bigint;
445
- } | {
446
- maxFee: bigint;
447
- } | undefined;
448
- dataGasConsumed?: bigint | undefined;
449
- dataGasPrice?: bigint | undefined;
304
+ l1Gas: {
305
+ gasConsumed: bigint;
306
+ gasPrice: bigint;
307
+ };
308
+ l2Gas: {
309
+ gasConsumed: bigint;
310
+ gasPrice: bigint;
311
+ };
312
+ l1DataGas: {
313
+ gasConsumed: bigint;
314
+ gasPrice: bigint;
315
+ };
450
316
  };
451
317
  deployment?: {
452
- amount: bigint;
453
- pricePerUnit: bigint;
454
318
  feeTokenAddress: `0x${string}`;
455
- max?: {
456
- amount: bigint;
457
- pricePerUnit: bigint;
458
- } | {
459
- maxFee: bigint;
460
- } | undefined;
461
- dataGasConsumed?: bigint | undefined;
462
- dataGasPrice?: bigint | undefined;
319
+ l1Gas: {
320
+ gasConsumed: bigint;
321
+ gasPrice: bigint;
322
+ };
323
+ l2Gas: {
324
+ gasConsumed: bigint;
325
+ gasPrice: bigint;
326
+ };
327
+ l1DataGas: {
328
+ gasConsumed: bigint;
329
+ gasPrice: bigint;
330
+ };
463
331
  } | undefined;
464
332
  }, {
465
333
  type: "native";
466
334
  transactions: {
467
- amount: bigint;
468
- pricePerUnit: bigint;
469
335
  feeTokenAddress: string;
470
- max?: {
471
- amount: bigint;
472
- pricePerUnit: bigint;
473
- } | {
474
- maxFee: bigint;
475
- } | undefined;
476
- dataGasConsumed?: bigint | undefined;
477
- dataGasPrice?: bigint | undefined;
336
+ l1Gas: {
337
+ gasConsumed: bigint;
338
+ gasPrice: bigint;
339
+ };
340
+ l2Gas: {
341
+ gasConsumed: bigint;
342
+ gasPrice: bigint;
343
+ };
344
+ l1DataGas: {
345
+ gasConsumed: bigint;
346
+ gasPrice: bigint;
347
+ };
478
348
  };
479
349
  deployment?: {
480
- amount: bigint;
481
- pricePerUnit: bigint;
482
350
  feeTokenAddress: string;
483
- max?: {
484
- amount: bigint;
485
- pricePerUnit: bigint;
486
- } | {
487
- maxFee: bigint;
488
- } | undefined;
489
- dataGasConsumed?: bigint | undefined;
490
- dataGasPrice?: bigint | undefined;
351
+ l1Gas: {
352
+ gasConsumed: bigint;
353
+ gasPrice: bigint;
354
+ };
355
+ l2Gas: {
356
+ gasConsumed: bigint;
357
+ gasPrice: bigint;
358
+ };
359
+ l1DataGas: {
360
+ gasConsumed: bigint;
361
+ gasPrice: bigint;
362
+ };
491
363
  } | undefined;
492
364
  }>;
493
365
  export declare const paymasterEstimatedFeesSchema: z.ZodObject<{
@@ -498,12 +370,12 @@ export declare const paymasterEstimatedFeesSchema: z.ZodObject<{
498
370
  maxFee: z.ZodBigInt;
499
371
  overallFee: z.ZodBigInt;
500
372
  }, "type">, "strip", z.ZodTypeAny, {
501
- maxFee: bigint;
502
373
  feeTokenAddress: `0x${string}`;
374
+ maxFee: bigint;
503
375
  overallFee: bigint;
504
376
  }, {
505
- maxFee: bigint;
506
377
  feeTokenAddress: string;
378
+ maxFee: bigint;
507
379
  overallFee: bigint;
508
380
  }>;
509
381
  deployment: z.ZodOptional<z.ZodObject<Omit<{
@@ -512,190 +384,228 @@ export declare const paymasterEstimatedFeesSchema: z.ZodObject<{
512
384
  maxFee: z.ZodBigInt;
513
385
  overallFee: z.ZodBigInt;
514
386
  }, "type">, "strip", z.ZodTypeAny, {
515
- maxFee: bigint;
516
387
  feeTokenAddress: `0x${string}`;
388
+ maxFee: bigint;
517
389
  overallFee: bigint;
518
390
  }, {
519
- maxFee: bigint;
520
391
  feeTokenAddress: string;
392
+ maxFee: bigint;
521
393
  overallFee: bigint;
522
394
  }>>;
523
395
  }, "strip", z.ZodTypeAny, {
524
396
  type: "paymaster";
525
397
  transactions: {
526
- maxFee: bigint;
527
398
  feeTokenAddress: `0x${string}`;
399
+ maxFee: bigint;
528
400
  overallFee: bigint;
529
401
  };
530
402
  deployment?: {
531
- maxFee: bigint;
532
403
  feeTokenAddress: `0x${string}`;
404
+ maxFee: bigint;
533
405
  overallFee: bigint;
534
406
  } | undefined;
535
407
  }, {
536
408
  type: "paymaster";
537
409
  transactions: {
538
- maxFee: bigint;
539
410
  feeTokenAddress: string;
411
+ maxFee: bigint;
540
412
  overallFee: bigint;
541
413
  };
542
414
  deployment?: {
543
- maxFee: bigint;
544
415
  feeTokenAddress: string;
416
+ maxFee: bigint;
545
417
  overallFee: bigint;
546
418
  } | undefined;
547
419
  }>;
548
- export declare const estimatedFeesV2Schema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
420
+ export declare const estimatedFeesSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
549
421
  type: z.ZodLiteral<"native">;
550
- transactions: z.ZodObject<{
422
+ transactions: z.ZodObject<Omit<{
423
+ type: z.ZodLiteral<"native">;
551
424
  feeTokenAddress: z.ZodEffects<z.ZodPipeline<z.ZodString, z.ZodEffects<z.ZodString, string, string>>, `0x${string}`, string>;
552
- amount: z.ZodBigInt;
553
- pricePerUnit: z.ZodBigInt;
554
- max: z.ZodOptional<z.ZodUnion<[z.ZodObject<{
555
- amount: z.ZodBigInt;
556
- pricePerUnit: z.ZodBigInt;
425
+ l1Gas: z.ZodObject<{
426
+ gasConsumed: z.ZodBigInt;
427
+ gasPrice: z.ZodBigInt;
557
428
  }, "strip", z.ZodTypeAny, {
558
- amount: bigint;
559
- pricePerUnit: bigint;
429
+ gasConsumed: bigint;
430
+ gasPrice: bigint;
560
431
  }, {
561
- amount: bigint;
562
- pricePerUnit: bigint;
563
- }>, z.ZodObject<{
564
- maxFee: z.ZodBigInt;
432
+ gasConsumed: bigint;
433
+ gasPrice: bigint;
434
+ }>;
435
+ l2Gas: z.ZodObject<{
436
+ gasConsumed: z.ZodBigInt;
437
+ gasPrice: z.ZodBigInt;
565
438
  }, "strip", z.ZodTypeAny, {
566
- maxFee: bigint;
439
+ gasConsumed: bigint;
440
+ gasPrice: bigint;
567
441
  }, {
568
- maxFee: bigint;
569
- }>]>>;
570
- dataGasConsumed: z.ZodOptional<z.ZodBigInt>;
571
- dataGasPrice: z.ZodOptional<z.ZodBigInt>;
572
- }, "strip", z.ZodTypeAny, {
573
- amount: bigint;
574
- pricePerUnit: bigint;
442
+ gasConsumed: bigint;
443
+ gasPrice: bigint;
444
+ }>;
445
+ l1DataGas: z.ZodObject<{
446
+ gasConsumed: z.ZodBigInt;
447
+ gasPrice: z.ZodBigInt;
448
+ }, "strip", z.ZodTypeAny, {
449
+ gasConsumed: bigint;
450
+ gasPrice: bigint;
451
+ }, {
452
+ gasConsumed: bigint;
453
+ gasPrice: bigint;
454
+ }>;
455
+ }, "type">, "strip", z.ZodTypeAny, {
575
456
  feeTokenAddress: `0x${string}`;
576
- max?: {
577
- amount: bigint;
578
- pricePerUnit: bigint;
579
- } | {
580
- maxFee: bigint;
581
- } | undefined;
582
- dataGasConsumed?: bigint | undefined;
583
- dataGasPrice?: bigint | undefined;
457
+ l1Gas: {
458
+ gasConsumed: bigint;
459
+ gasPrice: bigint;
460
+ };
461
+ l2Gas: {
462
+ gasConsumed: bigint;
463
+ gasPrice: bigint;
464
+ };
465
+ l1DataGas: {
466
+ gasConsumed: bigint;
467
+ gasPrice: bigint;
468
+ };
584
469
  }, {
585
- amount: bigint;
586
- pricePerUnit: bigint;
587
470
  feeTokenAddress: string;
588
- max?: {
589
- amount: bigint;
590
- pricePerUnit: bigint;
591
- } | {
592
- maxFee: bigint;
593
- } | undefined;
594
- dataGasConsumed?: bigint | undefined;
595
- dataGasPrice?: bigint | undefined;
471
+ l1Gas: {
472
+ gasConsumed: bigint;
473
+ gasPrice: bigint;
474
+ };
475
+ l2Gas: {
476
+ gasConsumed: bigint;
477
+ gasPrice: bigint;
478
+ };
479
+ l1DataGas: {
480
+ gasConsumed: bigint;
481
+ gasPrice: bigint;
482
+ };
596
483
  }>;
597
- deployment: z.ZodOptional<z.ZodObject<{
484
+ deployment: z.ZodOptional<z.ZodObject<Omit<{
485
+ type: z.ZodLiteral<"native">;
598
486
  feeTokenAddress: z.ZodEffects<z.ZodPipeline<z.ZodString, z.ZodEffects<z.ZodString, string, string>>, `0x${string}`, string>;
599
- amount: z.ZodBigInt;
600
- pricePerUnit: z.ZodBigInt;
601
- max: z.ZodOptional<z.ZodUnion<[z.ZodObject<{
602
- amount: z.ZodBigInt;
603
- pricePerUnit: z.ZodBigInt;
487
+ l1Gas: z.ZodObject<{
488
+ gasConsumed: z.ZodBigInt;
489
+ gasPrice: z.ZodBigInt;
604
490
  }, "strip", z.ZodTypeAny, {
605
- amount: bigint;
606
- pricePerUnit: bigint;
491
+ gasConsumed: bigint;
492
+ gasPrice: bigint;
607
493
  }, {
608
- amount: bigint;
609
- pricePerUnit: bigint;
610
- }>, z.ZodObject<{
611
- maxFee: z.ZodBigInt;
494
+ gasConsumed: bigint;
495
+ gasPrice: bigint;
496
+ }>;
497
+ l2Gas: z.ZodObject<{
498
+ gasConsumed: z.ZodBigInt;
499
+ gasPrice: z.ZodBigInt;
612
500
  }, "strip", z.ZodTypeAny, {
613
- maxFee: bigint;
501
+ gasConsumed: bigint;
502
+ gasPrice: bigint;
614
503
  }, {
615
- maxFee: bigint;
616
- }>]>>;
617
- dataGasConsumed: z.ZodOptional<z.ZodBigInt>;
618
- dataGasPrice: z.ZodOptional<z.ZodBigInt>;
619
- }, "strip", z.ZodTypeAny, {
620
- amount: bigint;
621
- pricePerUnit: bigint;
504
+ gasConsumed: bigint;
505
+ gasPrice: bigint;
506
+ }>;
507
+ l1DataGas: z.ZodObject<{
508
+ gasConsumed: z.ZodBigInt;
509
+ gasPrice: z.ZodBigInt;
510
+ }, "strip", z.ZodTypeAny, {
511
+ gasConsumed: bigint;
512
+ gasPrice: bigint;
513
+ }, {
514
+ gasConsumed: bigint;
515
+ gasPrice: bigint;
516
+ }>;
517
+ }, "type">, "strip", z.ZodTypeAny, {
622
518
  feeTokenAddress: `0x${string}`;
623
- max?: {
624
- amount: bigint;
625
- pricePerUnit: bigint;
626
- } | {
627
- maxFee: bigint;
628
- } | undefined;
629
- dataGasConsumed?: bigint | undefined;
630
- dataGasPrice?: bigint | undefined;
519
+ l1Gas: {
520
+ gasConsumed: bigint;
521
+ gasPrice: bigint;
522
+ };
523
+ l2Gas: {
524
+ gasConsumed: bigint;
525
+ gasPrice: bigint;
526
+ };
527
+ l1DataGas: {
528
+ gasConsumed: bigint;
529
+ gasPrice: bigint;
530
+ };
631
531
  }, {
632
- amount: bigint;
633
- pricePerUnit: bigint;
634
532
  feeTokenAddress: string;
635
- max?: {
636
- amount: bigint;
637
- pricePerUnit: bigint;
638
- } | {
639
- maxFee: bigint;
640
- } | undefined;
641
- dataGasConsumed?: bigint | undefined;
642
- dataGasPrice?: bigint | undefined;
533
+ l1Gas: {
534
+ gasConsumed: bigint;
535
+ gasPrice: bigint;
536
+ };
537
+ l2Gas: {
538
+ gasConsumed: bigint;
539
+ gasPrice: bigint;
540
+ };
541
+ l1DataGas: {
542
+ gasConsumed: bigint;
543
+ gasPrice: bigint;
544
+ };
643
545
  }>>;
644
546
  }, "strip", z.ZodTypeAny, {
645
547
  type: "native";
646
548
  transactions: {
647
- amount: bigint;
648
- pricePerUnit: bigint;
649
549
  feeTokenAddress: `0x${string}`;
650
- max?: {
651
- amount: bigint;
652
- pricePerUnit: bigint;
653
- } | {
654
- maxFee: bigint;
655
- } | undefined;
656
- dataGasConsumed?: bigint | undefined;
657
- dataGasPrice?: bigint | undefined;
550
+ l1Gas: {
551
+ gasConsumed: bigint;
552
+ gasPrice: bigint;
553
+ };
554
+ l2Gas: {
555
+ gasConsumed: bigint;
556
+ gasPrice: bigint;
557
+ };
558
+ l1DataGas: {
559
+ gasConsumed: bigint;
560
+ gasPrice: bigint;
561
+ };
658
562
  };
659
563
  deployment?: {
660
- amount: bigint;
661
- pricePerUnit: bigint;
662
564
  feeTokenAddress: `0x${string}`;
663
- max?: {
664
- amount: bigint;
665
- pricePerUnit: bigint;
666
- } | {
667
- maxFee: bigint;
668
- } | undefined;
669
- dataGasConsumed?: bigint | undefined;
670
- dataGasPrice?: bigint | undefined;
565
+ l1Gas: {
566
+ gasConsumed: bigint;
567
+ gasPrice: bigint;
568
+ };
569
+ l2Gas: {
570
+ gasConsumed: bigint;
571
+ gasPrice: bigint;
572
+ };
573
+ l1DataGas: {
574
+ gasConsumed: bigint;
575
+ gasPrice: bigint;
576
+ };
671
577
  } | undefined;
672
578
  }, {
673
579
  type: "native";
674
580
  transactions: {
675
- amount: bigint;
676
- pricePerUnit: bigint;
677
581
  feeTokenAddress: string;
678
- max?: {
679
- amount: bigint;
680
- pricePerUnit: bigint;
681
- } | {
682
- maxFee: bigint;
683
- } | undefined;
684
- dataGasConsumed?: bigint | undefined;
685
- dataGasPrice?: bigint | undefined;
582
+ l1Gas: {
583
+ gasConsumed: bigint;
584
+ gasPrice: bigint;
585
+ };
586
+ l2Gas: {
587
+ gasConsumed: bigint;
588
+ gasPrice: bigint;
589
+ };
590
+ l1DataGas: {
591
+ gasConsumed: bigint;
592
+ gasPrice: bigint;
593
+ };
686
594
  };
687
595
  deployment?: {
688
- amount: bigint;
689
- pricePerUnit: bigint;
690
596
  feeTokenAddress: string;
691
- max?: {
692
- amount: bigint;
693
- pricePerUnit: bigint;
694
- } | {
695
- maxFee: bigint;
696
- } | undefined;
697
- dataGasConsumed?: bigint | undefined;
698
- dataGasPrice?: bigint | undefined;
597
+ l1Gas: {
598
+ gasConsumed: bigint;
599
+ gasPrice: bigint;
600
+ };
601
+ l2Gas: {
602
+ gasConsumed: bigint;
603
+ gasPrice: bigint;
604
+ };
605
+ l1DataGas: {
606
+ gasConsumed: bigint;
607
+ gasPrice: bigint;
608
+ };
699
609
  } | undefined;
700
610
  }>, z.ZodObject<{
701
611
  type: z.ZodLiteral<"paymaster">;
@@ -705,12 +615,12 @@ export declare const estimatedFeesV2Schema: z.ZodDiscriminatedUnion<"type", [z.Z
705
615
  maxFee: z.ZodBigInt;
706
616
  overallFee: z.ZodBigInt;
707
617
  }, "type">, "strip", z.ZodTypeAny, {
708
- maxFee: bigint;
709
618
  feeTokenAddress: `0x${string}`;
619
+ maxFee: bigint;
710
620
  overallFee: bigint;
711
621
  }, {
712
- maxFee: bigint;
713
622
  feeTokenAddress: string;
623
+ maxFee: bigint;
714
624
  overallFee: bigint;
715
625
  }>;
716
626
  deployment: z.ZodOptional<z.ZodObject<Omit<{
@@ -719,41 +629,41 @@ export declare const estimatedFeesV2Schema: z.ZodDiscriminatedUnion<"type", [z.Z
719
629
  maxFee: z.ZodBigInt;
720
630
  overallFee: z.ZodBigInt;
721
631
  }, "type">, "strip", z.ZodTypeAny, {
722
- maxFee: bigint;
723
632
  feeTokenAddress: `0x${string}`;
633
+ maxFee: bigint;
724
634
  overallFee: bigint;
725
635
  }, {
726
- maxFee: bigint;
727
636
  feeTokenAddress: string;
637
+ maxFee: bigint;
728
638
  overallFee: bigint;
729
639
  }>>;
730
640
  }, "strip", z.ZodTypeAny, {
731
641
  type: "paymaster";
732
642
  transactions: {
733
- maxFee: bigint;
734
643
  feeTokenAddress: `0x${string}`;
644
+ maxFee: bigint;
735
645
  overallFee: bigint;
736
646
  };
737
647
  deployment?: {
738
- maxFee: bigint;
739
648
  feeTokenAddress: `0x${string}`;
649
+ maxFee: bigint;
740
650
  overallFee: bigint;
741
651
  } | undefined;
742
652
  }, {
743
653
  type: "paymaster";
744
654
  transactions: {
745
- maxFee: bigint;
746
655
  feeTokenAddress: string;
656
+ maxFee: bigint;
747
657
  overallFee: bigint;
748
658
  };
749
659
  deployment?: {
750
- maxFee: bigint;
751
660
  feeTokenAddress: string;
661
+ maxFee: bigint;
752
662
  overallFee: bigint;
753
663
  } | undefined;
754
664
  }>]>;
755
- export type EstimatedFeesV2 = z.infer<typeof estimatedFeesV2Schema>;
756
- export type EstimatedFeesV2Enriched = UnionEvaluate<EstimatedFeesV2 & {
665
+ export type EstimatedFees = z.infer<typeof estimatedFeesSchema>;
666
+ export type EstimatedFeesEnriched = UnionEvaluate<EstimatedFees & {
757
667
  id: string;
758
668
  timestamp: number;
759
669
  isSubsidised?: boolean;
@@ -762,156 +672,194 @@ export type NativeEstimatedFee = z.infer<typeof nativeEstimatedFeeSchema>;
762
672
  export type PaymasterEstimatedFee = z.infer<typeof paymasterEstimatedFeeSchema>;
763
673
  export type NativeEstimatedFees = z.infer<typeof nativeEstimatedFeesSchema>;
764
674
  export type PaymasterEstimatedFees = z.infer<typeof paymasterEstimatedFeesSchema>;
765
- export declare const feeEstimationResultV2Schema: z.ZodObject<{
675
+ export declare const feeEstimationResultSchema: z.ZodObject<{
766
676
  native: z.ZodObject<Omit<{
767
677
  type: z.ZodLiteral<"native">;
768
- transactions: z.ZodObject<{
678
+ transactions: z.ZodObject<Omit<{
679
+ type: z.ZodLiteral<"native">;
769
680
  feeTokenAddress: z.ZodEffects<z.ZodPipeline<z.ZodString, z.ZodEffects<z.ZodString, string, string>>, `0x${string}`, string>;
770
- amount: z.ZodBigInt;
771
- pricePerUnit: z.ZodBigInt;
772
- max: z.ZodOptional<z.ZodUnion<[z.ZodObject<{
773
- amount: z.ZodBigInt;
774
- pricePerUnit: z.ZodBigInt;
681
+ l1Gas: z.ZodObject<{
682
+ gasConsumed: z.ZodBigInt;
683
+ gasPrice: z.ZodBigInt;
775
684
  }, "strip", z.ZodTypeAny, {
776
- amount: bigint;
777
- pricePerUnit: bigint;
685
+ gasConsumed: bigint;
686
+ gasPrice: bigint;
778
687
  }, {
779
- amount: bigint;
780
- pricePerUnit: bigint;
781
- }>, z.ZodObject<{
782
- maxFee: z.ZodBigInt;
688
+ gasConsumed: bigint;
689
+ gasPrice: bigint;
690
+ }>;
691
+ l2Gas: z.ZodObject<{
692
+ gasConsumed: z.ZodBigInt;
693
+ gasPrice: z.ZodBigInt;
783
694
  }, "strip", z.ZodTypeAny, {
784
- maxFee: bigint;
695
+ gasConsumed: bigint;
696
+ gasPrice: bigint;
785
697
  }, {
786
- maxFee: bigint;
787
- }>]>>;
788
- dataGasConsumed: z.ZodOptional<z.ZodBigInt>;
789
- dataGasPrice: z.ZodOptional<z.ZodBigInt>;
790
- }, "strip", z.ZodTypeAny, {
791
- amount: bigint;
792
- pricePerUnit: bigint;
698
+ gasConsumed: bigint;
699
+ gasPrice: bigint;
700
+ }>;
701
+ l1DataGas: z.ZodObject<{
702
+ gasConsumed: z.ZodBigInt;
703
+ gasPrice: z.ZodBigInt;
704
+ }, "strip", z.ZodTypeAny, {
705
+ gasConsumed: bigint;
706
+ gasPrice: bigint;
707
+ }, {
708
+ gasConsumed: bigint;
709
+ gasPrice: bigint;
710
+ }>;
711
+ }, "type">, "strip", z.ZodTypeAny, {
793
712
  feeTokenAddress: `0x${string}`;
794
- max?: {
795
- amount: bigint;
796
- pricePerUnit: bigint;
797
- } | {
798
- maxFee: bigint;
799
- } | undefined;
800
- dataGasConsumed?: bigint | undefined;
801
- dataGasPrice?: bigint | undefined;
713
+ l1Gas: {
714
+ gasConsumed: bigint;
715
+ gasPrice: bigint;
716
+ };
717
+ l2Gas: {
718
+ gasConsumed: bigint;
719
+ gasPrice: bigint;
720
+ };
721
+ l1DataGas: {
722
+ gasConsumed: bigint;
723
+ gasPrice: bigint;
724
+ };
802
725
  }, {
803
- amount: bigint;
804
- pricePerUnit: bigint;
805
726
  feeTokenAddress: string;
806
- max?: {
807
- amount: bigint;
808
- pricePerUnit: bigint;
809
- } | {
810
- maxFee: bigint;
811
- } | undefined;
812
- dataGasConsumed?: bigint | undefined;
813
- dataGasPrice?: bigint | undefined;
727
+ l1Gas: {
728
+ gasConsumed: bigint;
729
+ gasPrice: bigint;
730
+ };
731
+ l2Gas: {
732
+ gasConsumed: bigint;
733
+ gasPrice: bigint;
734
+ };
735
+ l1DataGas: {
736
+ gasConsumed: bigint;
737
+ gasPrice: bigint;
738
+ };
814
739
  }>;
815
- deployment: z.ZodOptional<z.ZodObject<{
740
+ deployment: z.ZodOptional<z.ZodObject<Omit<{
741
+ type: z.ZodLiteral<"native">;
816
742
  feeTokenAddress: z.ZodEffects<z.ZodPipeline<z.ZodString, z.ZodEffects<z.ZodString, string, string>>, `0x${string}`, string>;
817
- amount: z.ZodBigInt;
818
- pricePerUnit: z.ZodBigInt;
819
- max: z.ZodOptional<z.ZodUnion<[z.ZodObject<{
820
- amount: z.ZodBigInt;
821
- pricePerUnit: z.ZodBigInt;
743
+ l1Gas: z.ZodObject<{
744
+ gasConsumed: z.ZodBigInt;
745
+ gasPrice: z.ZodBigInt;
822
746
  }, "strip", z.ZodTypeAny, {
823
- amount: bigint;
824
- pricePerUnit: bigint;
747
+ gasConsumed: bigint;
748
+ gasPrice: bigint;
825
749
  }, {
826
- amount: bigint;
827
- pricePerUnit: bigint;
828
- }>, z.ZodObject<{
829
- maxFee: z.ZodBigInt;
750
+ gasConsumed: bigint;
751
+ gasPrice: bigint;
752
+ }>;
753
+ l2Gas: z.ZodObject<{
754
+ gasConsumed: z.ZodBigInt;
755
+ gasPrice: z.ZodBigInt;
830
756
  }, "strip", z.ZodTypeAny, {
831
- maxFee: bigint;
757
+ gasConsumed: bigint;
758
+ gasPrice: bigint;
832
759
  }, {
833
- maxFee: bigint;
834
- }>]>>;
835
- dataGasConsumed: z.ZodOptional<z.ZodBigInt>;
836
- dataGasPrice: z.ZodOptional<z.ZodBigInt>;
837
- }, "strip", z.ZodTypeAny, {
838
- amount: bigint;
839
- pricePerUnit: bigint;
760
+ gasConsumed: bigint;
761
+ gasPrice: bigint;
762
+ }>;
763
+ l1DataGas: z.ZodObject<{
764
+ gasConsumed: z.ZodBigInt;
765
+ gasPrice: z.ZodBigInt;
766
+ }, "strip", z.ZodTypeAny, {
767
+ gasConsumed: bigint;
768
+ gasPrice: bigint;
769
+ }, {
770
+ gasConsumed: bigint;
771
+ gasPrice: bigint;
772
+ }>;
773
+ }, "type">, "strip", z.ZodTypeAny, {
840
774
  feeTokenAddress: `0x${string}`;
841
- max?: {
842
- amount: bigint;
843
- pricePerUnit: bigint;
844
- } | {
845
- maxFee: bigint;
846
- } | undefined;
847
- dataGasConsumed?: bigint | undefined;
848
- dataGasPrice?: bigint | undefined;
775
+ l1Gas: {
776
+ gasConsumed: bigint;
777
+ gasPrice: bigint;
778
+ };
779
+ l2Gas: {
780
+ gasConsumed: bigint;
781
+ gasPrice: bigint;
782
+ };
783
+ l1DataGas: {
784
+ gasConsumed: bigint;
785
+ gasPrice: bigint;
786
+ };
849
787
  }, {
850
- amount: bigint;
851
- pricePerUnit: bigint;
852
788
  feeTokenAddress: string;
853
- max?: {
854
- amount: bigint;
855
- pricePerUnit: bigint;
856
- } | {
857
- maxFee: bigint;
858
- } | undefined;
859
- dataGasConsumed?: bigint | undefined;
860
- dataGasPrice?: bigint | undefined;
789
+ l1Gas: {
790
+ gasConsumed: bigint;
791
+ gasPrice: bigint;
792
+ };
793
+ l2Gas: {
794
+ gasConsumed: bigint;
795
+ gasPrice: bigint;
796
+ };
797
+ l1DataGas: {
798
+ gasConsumed: bigint;
799
+ gasPrice: bigint;
800
+ };
861
801
  }>>;
862
802
  }, "type">, "strip", z.ZodTypeAny, {
863
803
  transactions: {
864
- amount: bigint;
865
- pricePerUnit: bigint;
866
804
  feeTokenAddress: `0x${string}`;
867
- max?: {
868
- amount: bigint;
869
- pricePerUnit: bigint;
870
- } | {
871
- maxFee: bigint;
872
- } | undefined;
873
- dataGasConsumed?: bigint | undefined;
874
- dataGasPrice?: bigint | undefined;
805
+ l1Gas: {
806
+ gasConsumed: bigint;
807
+ gasPrice: bigint;
808
+ };
809
+ l2Gas: {
810
+ gasConsumed: bigint;
811
+ gasPrice: bigint;
812
+ };
813
+ l1DataGas: {
814
+ gasConsumed: bigint;
815
+ gasPrice: bigint;
816
+ };
875
817
  };
876
818
  deployment?: {
877
- amount: bigint;
878
- pricePerUnit: bigint;
879
819
  feeTokenAddress: `0x${string}`;
880
- max?: {
881
- amount: bigint;
882
- pricePerUnit: bigint;
883
- } | {
884
- maxFee: bigint;
885
- } | undefined;
886
- dataGasConsumed?: bigint | undefined;
887
- dataGasPrice?: bigint | undefined;
820
+ l1Gas: {
821
+ gasConsumed: bigint;
822
+ gasPrice: bigint;
823
+ };
824
+ l2Gas: {
825
+ gasConsumed: bigint;
826
+ gasPrice: bigint;
827
+ };
828
+ l1DataGas: {
829
+ gasConsumed: bigint;
830
+ gasPrice: bigint;
831
+ };
888
832
  } | undefined;
889
833
  }, {
890
834
  transactions: {
891
- amount: bigint;
892
- pricePerUnit: bigint;
893
835
  feeTokenAddress: string;
894
- max?: {
895
- amount: bigint;
896
- pricePerUnit: bigint;
897
- } | {
898
- maxFee: bigint;
899
- } | undefined;
900
- dataGasConsumed?: bigint | undefined;
901
- dataGasPrice?: bigint | undefined;
836
+ l1Gas: {
837
+ gasConsumed: bigint;
838
+ gasPrice: bigint;
839
+ };
840
+ l2Gas: {
841
+ gasConsumed: bigint;
842
+ gasPrice: bigint;
843
+ };
844
+ l1DataGas: {
845
+ gasConsumed: bigint;
846
+ gasPrice: bigint;
847
+ };
902
848
  };
903
849
  deployment?: {
904
- amount: bigint;
905
- pricePerUnit: bigint;
906
850
  feeTokenAddress: string;
907
- max?: {
908
- amount: bigint;
909
- pricePerUnit: bigint;
910
- } | {
911
- maxFee: bigint;
912
- } | undefined;
913
- dataGasConsumed?: bigint | undefined;
914
- dataGasPrice?: bigint | undefined;
851
+ l1Gas: {
852
+ gasConsumed: bigint;
853
+ gasPrice: bigint;
854
+ };
855
+ l2Gas: {
856
+ gasConsumed: bigint;
857
+ gasPrice: bigint;
858
+ };
859
+ l1DataGas: {
860
+ gasConsumed: bigint;
861
+ gasPrice: bigint;
862
+ };
915
863
  } | undefined;
916
864
  }>;
917
865
  paymaster: z.ZodOptional<z.ZodObject<Omit<{
@@ -922,12 +870,12 @@ export declare const feeEstimationResultV2Schema: z.ZodObject<{
922
870
  maxFee: z.ZodBigInt;
923
871
  overallFee: z.ZodBigInt;
924
872
  }, "type">, "strip", z.ZodTypeAny, {
925
- maxFee: bigint;
926
873
  feeTokenAddress: `0x${string}`;
874
+ maxFee: bigint;
927
875
  overallFee: bigint;
928
876
  }, {
929
- maxFee: bigint;
930
877
  feeTokenAddress: string;
878
+ maxFee: bigint;
931
879
  overallFee: bigint;
932
880
  }>;
933
881
  deployment: z.ZodOptional<z.ZodObject<Omit<{
@@ -936,118 +884,130 @@ export declare const feeEstimationResultV2Schema: z.ZodObject<{
936
884
  maxFee: z.ZodBigInt;
937
885
  overallFee: z.ZodBigInt;
938
886
  }, "type">, "strip", z.ZodTypeAny, {
939
- maxFee: bigint;
940
887
  feeTokenAddress: `0x${string}`;
888
+ maxFee: bigint;
941
889
  overallFee: bigint;
942
890
  }, {
943
- maxFee: bigint;
944
891
  feeTokenAddress: string;
892
+ maxFee: bigint;
945
893
  overallFee: bigint;
946
894
  }>>;
947
895
  }, "type">, "strip", z.ZodTypeAny, {
948
896
  transactions: {
949
- maxFee: bigint;
950
897
  feeTokenAddress: `0x${string}`;
898
+ maxFee: bigint;
951
899
  overallFee: bigint;
952
900
  };
953
901
  deployment?: {
954
- maxFee: bigint;
955
902
  feeTokenAddress: `0x${string}`;
903
+ maxFee: bigint;
956
904
  overallFee: bigint;
957
905
  } | undefined;
958
906
  }, {
959
907
  transactions: {
960
- maxFee: bigint;
961
908
  feeTokenAddress: string;
909
+ maxFee: bigint;
962
910
  overallFee: bigint;
963
911
  };
964
912
  deployment?: {
965
- maxFee: bigint;
966
913
  feeTokenAddress: string;
914
+ maxFee: bigint;
967
915
  overallFee: bigint;
968
916
  } | undefined;
969
917
  }>>;
970
918
  }, "strip", z.ZodTypeAny, {
971
919
  native: {
972
920
  transactions: {
973
- amount: bigint;
974
- pricePerUnit: bigint;
975
921
  feeTokenAddress: `0x${string}`;
976
- max?: {
977
- amount: bigint;
978
- pricePerUnit: bigint;
979
- } | {
980
- maxFee: bigint;
981
- } | undefined;
982
- dataGasConsumed?: bigint | undefined;
983
- dataGasPrice?: bigint | undefined;
922
+ l1Gas: {
923
+ gasConsumed: bigint;
924
+ gasPrice: bigint;
925
+ };
926
+ l2Gas: {
927
+ gasConsumed: bigint;
928
+ gasPrice: bigint;
929
+ };
930
+ l1DataGas: {
931
+ gasConsumed: bigint;
932
+ gasPrice: bigint;
933
+ };
984
934
  };
985
935
  deployment?: {
986
- amount: bigint;
987
- pricePerUnit: bigint;
988
936
  feeTokenAddress: `0x${string}`;
989
- max?: {
990
- amount: bigint;
991
- pricePerUnit: bigint;
992
- } | {
993
- maxFee: bigint;
994
- } | undefined;
995
- dataGasConsumed?: bigint | undefined;
996
- dataGasPrice?: bigint | undefined;
937
+ l1Gas: {
938
+ gasConsumed: bigint;
939
+ gasPrice: bigint;
940
+ };
941
+ l2Gas: {
942
+ gasConsumed: bigint;
943
+ gasPrice: bigint;
944
+ };
945
+ l1DataGas: {
946
+ gasConsumed: bigint;
947
+ gasPrice: bigint;
948
+ };
997
949
  } | undefined;
998
950
  };
999
951
  paymaster?: {
1000
952
  transactions: {
1001
- maxFee: bigint;
1002
953
  feeTokenAddress: `0x${string}`;
954
+ maxFee: bigint;
1003
955
  overallFee: bigint;
1004
956
  };
1005
957
  deployment?: {
1006
- maxFee: bigint;
1007
958
  feeTokenAddress: `0x${string}`;
959
+ maxFee: bigint;
1008
960
  overallFee: bigint;
1009
961
  } | undefined;
1010
962
  } | undefined;
1011
963
  }, {
1012
964
  native: {
1013
965
  transactions: {
1014
- amount: bigint;
1015
- pricePerUnit: bigint;
1016
966
  feeTokenAddress: string;
1017
- max?: {
1018
- amount: bigint;
1019
- pricePerUnit: bigint;
1020
- } | {
1021
- maxFee: bigint;
1022
- } | undefined;
1023
- dataGasConsumed?: bigint | undefined;
1024
- dataGasPrice?: bigint | undefined;
967
+ l1Gas: {
968
+ gasConsumed: bigint;
969
+ gasPrice: bigint;
970
+ };
971
+ l2Gas: {
972
+ gasConsumed: bigint;
973
+ gasPrice: bigint;
974
+ };
975
+ l1DataGas: {
976
+ gasConsumed: bigint;
977
+ gasPrice: bigint;
978
+ };
1025
979
  };
1026
980
  deployment?: {
1027
- amount: bigint;
1028
- pricePerUnit: bigint;
1029
981
  feeTokenAddress: string;
1030
- max?: {
1031
- amount: bigint;
1032
- pricePerUnit: bigint;
1033
- } | {
1034
- maxFee: bigint;
1035
- } | undefined;
1036
- dataGasConsumed?: bigint | undefined;
1037
- dataGasPrice?: bigint | undefined;
982
+ l1Gas: {
983
+ gasConsumed: bigint;
984
+ gasPrice: bigint;
985
+ };
986
+ l2Gas: {
987
+ gasConsumed: bigint;
988
+ gasPrice: bigint;
989
+ };
990
+ l1DataGas: {
991
+ gasConsumed: bigint;
992
+ gasPrice: bigint;
993
+ };
1038
994
  } | undefined;
1039
995
  };
1040
996
  paymaster?: {
1041
997
  transactions: {
1042
- maxFee: bigint;
1043
998
  feeTokenAddress: string;
999
+ maxFee: bigint;
1044
1000
  overallFee: bigint;
1045
1001
  };
1046
1002
  deployment?: {
1047
- maxFee: bigint;
1048
1003
  feeTokenAddress: string;
1004
+ maxFee: bigint;
1049
1005
  overallFee: bigint;
1050
1006
  } | undefined;
1051
1007
  } | undefined;
1052
1008
  }>;
1053
- export type FeeEstimationResultV2 = z.infer<typeof feeEstimationResultV2Schema>;
1009
+ export type FeeEstimationResult = z.infer<typeof feeEstimationResultSchema>;
1010
+ export type NativeEstimatedFeeData = StrictOmit<NativeEstimatedFee, "type">;
1011
+ export type NativeEstimatedFeesData = StrictOmit<NativeEstimatedFees, "type">;
1012
+ export type PaymasterEstimatedFeeData = StrictOmit<PaymasterEstimatedFee, "type">;
1013
+ export type PaymasterEstimatedFeesData = StrictOmit<PaymasterEstimatedFees, "type">;