@apibara/indexer 0.3.0 → 0.3.1

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,17 +1,17 @@
1
1
  import { FieldElement } from "./felt";
2
- export type Block = {
2
+ export type Block = Partial<{
3
3
  /** Block header. */
4
- header?: BlockHeader;
4
+ header: BlockHeader;
5
5
  /** Transactions. */
6
- transactions?: TransactionWithReceipt[];
6
+ transactions: TransactionWithReceipt[];
7
7
  /** Events. */
8
- events?: EventWithTransaction[];
8
+ events: EventWithTransaction[];
9
9
  /** Messages from L2 to L1. */
10
- l2ToL1Messages?: L2ToL1MessageWithTransaction[];
10
+ l2ToL1Messages: L2ToL1MessageWithTransaction[];
11
11
  /** State update. */
12
- stateUpdate?: StateUpdate;
13
- };
14
- export type BlockHeader = {
12
+ stateUpdate: StateUpdate;
13
+ }>;
14
+ export type BlockHeader = Partial<{
15
15
  /** Block hash. */
16
16
  blockHash: FieldElement;
17
17
  /** Parent block hash. */
@@ -25,8 +25,8 @@ export type BlockHeader = {
25
25
  /** Block production timestamp. */
26
26
  timestamp: string;
27
27
  /** Price of L1 gas in the block. */
28
- l1GasPrice?: ResourcePrice;
29
- };
28
+ l1GasPrice: ResourcePrice;
29
+ }>;
30
30
  export type TransactionWithReceipt = {
31
31
  /** Transaction. */
32
32
  transaction: Transaction;
@@ -51,7 +51,7 @@ export type Transaction = TransactionCommon & (InvokeTransactionV0 | InvokeTrans
51
51
  export type TransactionCommon = {
52
52
  meta: TransactionMeta;
53
53
  };
54
- export type TransactionMeta = {
54
+ export type TransactionMeta = Partial<{
55
55
  /** Transaction hash. */
56
56
  hash: FieldElement;
57
57
  /** Maximum fee. */
@@ -74,16 +74,16 @@ export type TransactionMeta = {
74
74
  feeDataAvailabilityMode?: DataAvailabilityMode;
75
75
  /** Transaction index in the block. */
76
76
  transactionIndex?: number;
77
- };
77
+ }>;
78
78
  export type InvokeTransactionV0 = {
79
- invokeV0?: {
79
+ invokeV0?: Partial<{
80
80
  /** Target contract address. */
81
81
  contractAddress: FieldElement;
82
82
  /** Selector of the function being invoked. */
83
83
  entryPointSelector: FieldElement;
84
84
  /** Calldata. */
85
85
  calldata: FieldElement[];
86
- };
86
+ }>;
87
87
  invokeV1?: never;
88
88
  invokeV3?: never;
89
89
  deploy?: never;
@@ -94,12 +94,12 @@ export type InvokeTransactionV0 = {
94
94
  deployAccountV3?: never;
95
95
  };
96
96
  export type InvokeTransactionV1 = {
97
- invokeV1?: {
97
+ invokeV1?: Partial<{
98
98
  /** Address of the account sending the transaction. */
99
99
  senderAddress: FieldElement;
100
100
  /** Calldata. */
101
101
  calldata: FieldElement[];
102
- };
102
+ }>;
103
103
  invokeV0?: never;
104
104
  invokeV3?: never;
105
105
  deploy?: never;
@@ -110,14 +110,14 @@ export type InvokeTransactionV1 = {
110
110
  deployAccountV3?: never;
111
111
  };
112
112
  export type InvokeTransactionV3 = {
113
- invokeV3?: {
113
+ invokeV3?: Partial<{
114
114
  /** Address of the account sending the transaction. */
115
115
  senderAddress: FieldElement;
116
116
  /** Calldata. */
117
117
  calldata: FieldElement[];
118
118
  /** Data passed to the account deployment. */
119
119
  accountDeploymentData: FieldElement[];
120
- };
120
+ }>;
121
121
  invokeV1?: never;
122
122
  invokeV0?: never;
123
123
  deploy?: never;
@@ -128,14 +128,14 @@ export type InvokeTransactionV3 = {
128
128
  deployAccountV3?: never;
129
129
  };
130
130
  export type DeployTransaction = {
131
- deploy?: {
131
+ deploy?: Partial<{
132
132
  /** Constructor calldata. */
133
133
  constructorCalldata: FieldElement[];
134
134
  /** Salt used when computing the contract's address. */
135
135
  contractAddressSalt: FieldElement;
136
136
  /** Hash of the class being deployed. */
137
137
  classHash: FieldElement;
138
- };
138
+ }>;
139
139
  invokeV0?: never;
140
140
  invokeV1?: never;
141
141
  invokeV3?: never;
@@ -146,14 +146,14 @@ export type DeployTransaction = {
146
146
  deployAccountV3?: never;
147
147
  };
148
148
  export type DeclareTransaction = {
149
- declare?: {
149
+ declare?: Partial<{
150
150
  /** Class hash. */
151
151
  classHash: FieldElement;
152
152
  /** Address of the account sending the transaction. */
153
153
  senderAddress: FieldElement;
154
154
  /** Hash of the cairo assembly resulting from the sierra compilation. */
155
155
  compiledClassHash: FieldElement;
156
- };
156
+ }>;
157
157
  declareV3?: never;
158
158
  invokeV0?: never;
159
159
  invokeV1?: never;
@@ -164,7 +164,7 @@ export type DeclareTransaction = {
164
164
  deployAccountV3?: never;
165
165
  };
166
166
  export type DeclareTransactionV3 = {
167
- declareV3?: {
167
+ declareV3?: Partial<{
168
168
  /** Class hash. */
169
169
  classHash: FieldElement;
170
170
  /** Address of the account sending the transaction. */
@@ -173,7 +173,7 @@ export type DeclareTransactionV3 = {
173
173
  compiledClassHash: FieldElement;
174
174
  /** Data passed to the account deployment. */
175
175
  accountDeploymentData: FieldElement[];
176
- };
176
+ }>;
177
177
  declare?: never;
178
178
  invokeV0?: never;
179
179
  invokeV1?: never;
@@ -184,14 +184,14 @@ export type DeclareTransactionV3 = {
184
184
  deployAccount?: never;
185
185
  };
186
186
  export type DeployAccountTransaction = {
187
- deployAccount?: {
187
+ deployAccount?: Partial<{
188
188
  /** Constructor calldata. */
189
189
  constructorCalldata: FieldElement[];
190
190
  /** Salt used when computing the contract's address. */
191
191
  contractAddressSalt: FieldElement;
192
192
  /** Hash of the class being deployed. */
193
193
  classHash: FieldElement;
194
- };
194
+ }>;
195
195
  deployAccountV3?: never;
196
196
  invokeV0?: never;
197
197
  invokeV1?: never;
@@ -202,14 +202,14 @@ export type DeployAccountTransaction = {
202
202
  l1Handler?: never;
203
203
  };
204
204
  export type DeployAccountTransactionV3 = {
205
- deployAccountV3?: {
205
+ deployAccountV3?: Partial<{
206
206
  /** Constructor calldata. */
207
207
  constructorCalldata: FieldElement[];
208
208
  /** Salt used when computing the contract's address. */
209
209
  contractAddressSalt: FieldElement;
210
210
  /** Hash of the class being deployed. */
211
211
  classHash: FieldElement;
212
- };
212
+ }>;
213
213
  deployAccount?: never;
214
214
  invokeV0?: never;
215
215
  invokeV1?: never;
@@ -220,14 +220,14 @@ export type DeployAccountTransactionV3 = {
220
220
  l1Handler?: never;
221
221
  };
222
222
  export type L1HandlerTransaction = {
223
- l1Handler?: {
223
+ l1Handler?: Partial<{
224
224
  /** Target contract address. */
225
225
  contractAddress: FieldElement;
226
226
  /** Selector of the function being invoked. */
227
227
  entryPointSelector: FieldElement;
228
228
  /** Calldata. */
229
229
  calldata: FieldElement[];
230
- };
230
+ }>;
231
231
  invokeV0?: never;
232
232
  invokeV1?: never;
233
233
  invokeV3?: never;
@@ -236,7 +236,7 @@ export type L1HandlerTransaction = {
236
236
  declareV3?: never;
237
237
  deployAccount?: never;
238
238
  };
239
- export type TransactionReceipt = {
239
+ export type TransactionReceipt = Partial<{
240
240
  /** Transaction status. */
241
241
  executionStatus: ExecutionStatus;
242
242
  /** Transaction hash. */
@@ -253,9 +253,9 @@ export type TransactionReceipt = {
253
253
  events: Event[];
254
254
  /** Revert reason. */
255
255
  revertReason?: string;
256
- };
256
+ }>;
257
257
  export type ExecutionStatus = "EXECUTION_STATUS_UNSPECIFIED" | "EXECUTION_STATUS_SUCCEEDED" | "EXECUTION_STATUS_REVERTED";
258
- export type Event = {
258
+ export type Event = Partial<{
259
259
  /** Event index. */
260
260
  index: number;
261
261
  /** Contract address. */
@@ -264,8 +264,8 @@ export type Event = {
264
264
  keys: FieldElement[];
265
265
  /** Event data. */
266
266
  data: FieldElement[];
267
- };
268
- export type L2ToL1Message = {
267
+ }>;
268
+ export type L2ToL1Message = Partial<{
269
269
  /** Message index. */
270
270
  index: number;
271
271
  /** L2 sender address. */
@@ -274,16 +274,16 @@ export type L2ToL1Message = {
274
274
  toAddress: FieldElement;
275
275
  /** Calldata. */
276
276
  payload: FieldElement[];
277
- };
278
- export type StateUpdate = {
277
+ }>;
278
+ export type StateUpdate = Partial<{
279
279
  /** New state root. */
280
280
  newRoot: FieldElement;
281
281
  /** Old state root. */
282
282
  oldRoot: FieldElement;
283
283
  /** State diff. */
284
284
  stateDiff: StateDiff;
285
- };
286
- export type StateDiff = {
285
+ }>;
286
+ export type StateDiff = Partial<{
287
287
  /** Changes in storage. */
288
288
  storageDiffs: StorageDiff[];
289
289
  /** Declared contracts. */
@@ -296,62 +296,62 @@ export type StateDiff = {
296
296
  declaredClasses: DeclaredClass[];
297
297
  /** Classes replaced. */
298
298
  replacedClasses: ReplacedClass[];
299
- };
300
- export type StorageDiff = {
299
+ }>;
300
+ export type StorageDiff = Partial<{
301
301
  /** Contract address. */
302
302
  contractAddress: FieldElement;
303
303
  /** Changes in storage. */
304
304
  storageEntries: StorageEntry[];
305
- };
306
- export type StorageEntry = {
305
+ }>;
306
+ export type StorageEntry = Partial<{
307
307
  /** Storage key. */
308
308
  key: FieldElement;
309
309
  /** New storage value. */
310
310
  value: FieldElement;
311
- };
312
- export type DeclaredContract = {
311
+ }>;
312
+ export type DeclaredContract = Partial<{
313
313
  /** Class hash. */
314
314
  classHash: FieldElement;
315
- };
316
- export type DeclaredClass = {
315
+ }>;
316
+ export type DeclaredClass = Partial<{
317
317
  /** Class hash. */
318
318
  classHash: FieldElement;
319
319
  /** Compiled class hash. */
320
320
  compiledClassHash: FieldElement;
321
- };
322
- export type ReplacedClass = {
321
+ }>;
322
+ export type ReplacedClass = Partial<{
323
323
  /** Contract address. */
324
324
  contractAddress: FieldElement;
325
325
  /** Class hash. */
326
326
  classHash: FieldElement;
327
- };
328
- export type DeployedContract = {
327
+ }>;
328
+ export type DeployedContract = Partial<{
329
329
  /** Contract address. */
330
330
  contractAddress: FieldElement;
331
331
  /** Class hash. */
332
332
  classHash: FieldElement;
333
- };
334
- export type NonceUpdate = {
333
+ }>;
334
+ export type NonceUpdate = Partial<{
335
335
  /** Contract address. */
336
336
  contractAddress: FieldElement;
337
337
  /** New nonce. */
338
338
  nonce: FieldElement;
339
- };
340
- export type ResourcePrice = {
339
+ }>;
340
+ export type ResourcePrice = Partial<{
341
341
  /** Price in fri (10^-18 strk). */
342
342
  priceInFri: FieldElement;
343
343
  /** Price in wei (10^-18 eth). */
344
344
  priceInWei: FieldElement;
345
- };
346
- export type ResourceBoundsMapping = {
345
+ }>;
346
+ export type ResourceBoundsMapping = Partial<{
347
347
  l1Gas: ResourceBounds;
348
348
  l2Gas: ResourceBounds;
349
- };
350
- export type ResourceBounds = {
349
+ }>;
350
+ export type ResourceBounds = Partial<{
351
351
  maxAmount: number;
352
- maxPricePerUnit: {
352
+ maxPricePerUnit: Partial<{
353
353
  low: number;
354
354
  high: number;
355
- };
356
- };
355
+ }>;
356
+ }>;
357
357
  export type DataAvailabilityMode = "DATA_AVAILABILITY_MODE_UNSPECIFIED" | "DATA_AVAILABILITY_MODE_L2" | "DATA_AVAILABILITY_MODE_L1";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@apibara/indexer",
3
- "version": "0.3.0",
3
+ "version": "0.3.1",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  ".": {
@@ -1,19 +1,19 @@
1
1
  import { FieldElement } from "./felt";
2
2
 
3
- export type Block = {
3
+ export type Block = Partial<{
4
4
  /** Block header. */
5
- header?: BlockHeader;
5
+ header: BlockHeader;
6
6
  /** Transactions. */
7
- transactions?: TransactionWithReceipt[];
7
+ transactions: TransactionWithReceipt[];
8
8
  /** Events. */
9
- events?: EventWithTransaction[];
9
+ events: EventWithTransaction[];
10
10
  /** Messages from L2 to L1. */
11
- l2ToL1Messages?: L2ToL1MessageWithTransaction[];
11
+ l2ToL1Messages: L2ToL1MessageWithTransaction[];
12
12
  /** State update. */
13
- stateUpdate?: StateUpdate;
14
- };
13
+ stateUpdate: StateUpdate;
14
+ }>;
15
15
 
16
- export type BlockHeader = {
16
+ export type BlockHeader = Partial<{
17
17
  /** Block hash. */
18
18
  blockHash: FieldElement;
19
19
  /** Parent block hash. */
@@ -27,8 +27,8 @@ export type BlockHeader = {
27
27
  /** Block production timestamp. */
28
28
  timestamp: string;
29
29
  /** Price of L1 gas in the block. */
30
- l1GasPrice?: ResourcePrice;
31
- };
30
+ l1GasPrice: ResourcePrice;
31
+ }>;
32
32
 
33
33
  export type TransactionWithReceipt = {
34
34
  /** Transaction. */
@@ -70,7 +70,7 @@ export type TransactionCommon = {
70
70
  meta: TransactionMeta;
71
71
  };
72
72
 
73
- export type TransactionMeta = {
73
+ export type TransactionMeta = Partial<{
74
74
  /** Transaction hash. */
75
75
  hash: FieldElement;
76
76
  /** Maximum fee. */
@@ -93,17 +93,17 @@ export type TransactionMeta = {
93
93
  feeDataAvailabilityMode?: DataAvailabilityMode;
94
94
  /** Transaction index in the block. */
95
95
  transactionIndex?: number;
96
- };
96
+ }>;
97
97
 
98
98
  export type InvokeTransactionV0 = {
99
- invokeV0?: {
99
+ invokeV0?: Partial<{
100
100
  /** Target contract address. */
101
101
  contractAddress: FieldElement;
102
102
  /** Selector of the function being invoked. */
103
103
  entryPointSelector: FieldElement;
104
104
  /** Calldata. */
105
105
  calldata: FieldElement[];
106
- };
106
+ }>;
107
107
  invokeV1?: never;
108
108
  invokeV3?: never;
109
109
  deploy?: never;
@@ -115,12 +115,12 @@ export type InvokeTransactionV0 = {
115
115
  };
116
116
 
117
117
  export type InvokeTransactionV1 = {
118
- invokeV1?: {
118
+ invokeV1?: Partial<{
119
119
  /** Address of the account sending the transaction. */
120
120
  senderAddress: FieldElement;
121
121
  /** Calldata. */
122
122
  calldata: FieldElement[];
123
- };
123
+ }>;
124
124
  invokeV0?: never;
125
125
  invokeV3?: never;
126
126
  deploy?: never;
@@ -132,14 +132,14 @@ export type InvokeTransactionV1 = {
132
132
  };
133
133
 
134
134
  export type InvokeTransactionV3 = {
135
- invokeV3?: {
135
+ invokeV3?: Partial<{
136
136
  /** Address of the account sending the transaction. */
137
137
  senderAddress: FieldElement;
138
138
  /** Calldata. */
139
139
  calldata: FieldElement[];
140
140
  /** Data passed to the account deployment. */
141
141
  accountDeploymentData: FieldElement[];
142
- };
142
+ }>;
143
143
  invokeV1?: never;
144
144
  invokeV0?: never;
145
145
  deploy?: never;
@@ -151,14 +151,14 @@ export type InvokeTransactionV3 = {
151
151
  };
152
152
 
153
153
  export type DeployTransaction = {
154
- deploy?: {
154
+ deploy?: Partial<{
155
155
  /** Constructor calldata. */
156
156
  constructorCalldata: FieldElement[];
157
157
  /** Salt used when computing the contract's address. */
158
158
  contractAddressSalt: FieldElement;
159
159
  /** Hash of the class being deployed. */
160
160
  classHash: FieldElement;
161
- };
161
+ }>;
162
162
  invokeV0?: never;
163
163
  invokeV1?: never;
164
164
  invokeV3?: never;
@@ -170,14 +170,14 @@ export type DeployTransaction = {
170
170
  };
171
171
 
172
172
  export type DeclareTransaction = {
173
- declare?: {
173
+ declare?: Partial<{
174
174
  /** Class hash. */
175
175
  classHash: FieldElement;
176
176
  /** Address of the account sending the transaction. */
177
177
  senderAddress: FieldElement;
178
178
  /** Hash of the cairo assembly resulting from the sierra compilation. */
179
179
  compiledClassHash: FieldElement;
180
- };
180
+ }>;
181
181
  declareV3?: never;
182
182
  invokeV0?: never;
183
183
  invokeV1?: never;
@@ -189,7 +189,7 @@ export type DeclareTransaction = {
189
189
  };
190
190
 
191
191
  export type DeclareTransactionV3 = {
192
- declareV3?: {
192
+ declareV3?: Partial<{
193
193
  /** Class hash. */
194
194
  classHash: FieldElement;
195
195
  /** Address of the account sending the transaction. */
@@ -198,7 +198,7 @@ export type DeclareTransactionV3 = {
198
198
  compiledClassHash: FieldElement;
199
199
  /** Data passed to the account deployment. */
200
200
  accountDeploymentData: FieldElement[];
201
- };
201
+ }>;
202
202
  declare?: never;
203
203
  invokeV0?: never;
204
204
  invokeV1?: never;
@@ -210,14 +210,14 @@ export type DeclareTransactionV3 = {
210
210
  };
211
211
 
212
212
  export type DeployAccountTransaction = {
213
- deployAccount?: {
213
+ deployAccount?: Partial<{
214
214
  /** Constructor calldata. */
215
215
  constructorCalldata: FieldElement[];
216
216
  /** Salt used when computing the contract's address. */
217
217
  contractAddressSalt: FieldElement;
218
218
  /** Hash of the class being deployed. */
219
219
  classHash: FieldElement;
220
- };
220
+ }>;
221
221
  deployAccountV3?: never;
222
222
  invokeV0?: never;
223
223
  invokeV1?: never;
@@ -229,14 +229,14 @@ export type DeployAccountTransaction = {
229
229
  };
230
230
 
231
231
  export type DeployAccountTransactionV3 = {
232
- deployAccountV3?: {
232
+ deployAccountV3?: Partial<{
233
233
  /** Constructor calldata. */
234
234
  constructorCalldata: FieldElement[];
235
235
  /** Salt used when computing the contract's address. */
236
236
  contractAddressSalt: FieldElement;
237
237
  /** Hash of the class being deployed. */
238
238
  classHash: FieldElement;
239
- };
239
+ }>;
240
240
  deployAccount?: never;
241
241
  invokeV0?: never;
242
242
  invokeV1?: never;
@@ -248,14 +248,14 @@ export type DeployAccountTransactionV3 = {
248
248
  };
249
249
 
250
250
  export type L1HandlerTransaction = {
251
- l1Handler?: {
251
+ l1Handler?: Partial<{
252
252
  /** Target contract address. */
253
253
  contractAddress: FieldElement;
254
254
  /** Selector of the function being invoked. */
255
255
  entryPointSelector: FieldElement;
256
256
  /** Calldata. */
257
257
  calldata: FieldElement[];
258
- };
258
+ }>;
259
259
  invokeV0?: never;
260
260
  invokeV1?: never;
261
261
  invokeV3?: never;
@@ -265,7 +265,7 @@ export type L1HandlerTransaction = {
265
265
  deployAccount?: never;
266
266
  };
267
267
 
268
- export type TransactionReceipt = {
268
+ export type TransactionReceipt = Partial<{
269
269
  /** Transaction status. */
270
270
  executionStatus: ExecutionStatus;
271
271
  /** Transaction hash. */
@@ -282,14 +282,14 @@ export type TransactionReceipt = {
282
282
  events: Event[];
283
283
  /** Revert reason. */
284
284
  revertReason?: string;
285
- };
285
+ }>;
286
286
 
287
287
  export type ExecutionStatus =
288
288
  | "EXECUTION_STATUS_UNSPECIFIED"
289
289
  | "EXECUTION_STATUS_SUCCEEDED"
290
290
  | "EXECUTION_STATUS_REVERTED";
291
291
 
292
- export type Event = {
292
+ export type Event = Partial<{
293
293
  /** Event index. */
294
294
  index: number;
295
295
  /** Contract address. */
@@ -298,9 +298,9 @@ export type Event = {
298
298
  keys: FieldElement[];
299
299
  /** Event data. */
300
300
  data: FieldElement[];
301
- };
301
+ }>;
302
302
 
303
- export type L2ToL1Message = {
303
+ export type L2ToL1Message = Partial<{
304
304
  /** Message index. */
305
305
  index: number;
306
306
  /** L2 sender address. */
@@ -309,18 +309,18 @@ export type L2ToL1Message = {
309
309
  toAddress: FieldElement;
310
310
  /** Calldata. */
311
311
  payload: FieldElement[];
312
- };
312
+ }>;
313
313
 
314
- export type StateUpdate = {
314
+ export type StateUpdate = Partial<{
315
315
  /** New state root. */
316
316
  newRoot: FieldElement;
317
317
  /** Old state root. */
318
318
  oldRoot: FieldElement;
319
319
  /** State diff. */
320
320
  stateDiff: StateDiff;
321
- };
321
+ }>;
322
322
 
323
- export type StateDiff = {
323
+ export type StateDiff = Partial<{
324
324
  /** Changes in storage. */
325
325
  storageDiffs: StorageDiff[];
326
326
  /** Declared contracts. */
@@ -333,71 +333,71 @@ export type StateDiff = {
333
333
  declaredClasses: DeclaredClass[];
334
334
  /** Classes replaced. */
335
335
  replacedClasses: ReplacedClass[];
336
- };
336
+ }>;
337
337
 
338
- export type StorageDiff = {
338
+ export type StorageDiff = Partial<{
339
339
  /** Contract address. */
340
340
  contractAddress: FieldElement;
341
341
  /** Changes in storage. */
342
342
  storageEntries: StorageEntry[];
343
- };
343
+ }>;
344
344
 
345
- export type StorageEntry = {
345
+ export type StorageEntry = Partial<{
346
346
  /** Storage key. */
347
347
  key: FieldElement;
348
348
  /** New storage value. */
349
349
  value: FieldElement;
350
- };
350
+ }>;
351
351
 
352
- export type DeclaredContract = {
352
+ export type DeclaredContract = Partial<{
353
353
  /** Class hash. */
354
354
  classHash: FieldElement;
355
- };
355
+ }>;
356
356
 
357
- export type DeclaredClass = {
357
+ export type DeclaredClass = Partial<{
358
358
  /** Class hash. */
359
359
  classHash: FieldElement;
360
360
  /** Compiled class hash. */
361
361
  compiledClassHash: FieldElement;
362
- };
362
+ }>;
363
363
 
364
- export type ReplacedClass = {
364
+ export type ReplacedClass = Partial<{
365
365
  /** Contract address. */
366
366
  contractAddress: FieldElement;
367
367
  /** Class hash. */
368
368
  classHash: FieldElement;
369
- };
369
+ }>;
370
370
 
371
- export type DeployedContract = {
371
+ export type DeployedContract = Partial<{
372
372
  /** Contract address. */
373
373
  contractAddress: FieldElement;
374
374
  /** Class hash. */
375
375
  classHash: FieldElement;
376
- };
376
+ }>;
377
377
 
378
- export type NonceUpdate = {
378
+ export type NonceUpdate = Partial<{
379
379
  /** Contract address. */
380
380
  contractAddress: FieldElement;
381
381
  /** New nonce. */
382
382
  nonce: FieldElement;
383
- };
383
+ }>;
384
384
 
385
- export type ResourcePrice = {
385
+ export type ResourcePrice = Partial<{
386
386
  /** Price in fri (10^-18 strk). */
387
387
  priceInFri: FieldElement;
388
388
  /** Price in wei (10^-18 eth). */
389
389
  priceInWei: FieldElement;
390
- };
390
+ }>;
391
391
 
392
- export type ResourceBoundsMapping = {
392
+ export type ResourceBoundsMapping = Partial<{
393
393
  l1Gas: ResourceBounds;
394
394
  l2Gas: ResourceBounds;
395
- };
395
+ }>;
396
396
 
397
- export type ResourceBounds = {
397
+ export type ResourceBounds = Partial<{
398
398
  maxAmount: number;
399
- maxPricePerUnit: { low: number; high: number };
400
- };
399
+ maxPricePerUnit: Partial<{ low: number; high: number }>;
400
+ }>;
401
401
 
402
402
  export type DataAvailabilityMode =
403
403
  | "DATA_AVAILABILITY_MODE_UNSPECIFIED"