viem 0.0.0-main.20231026T220458 → 0.0.0-main.20231027T032213

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 (39) hide show
  1. package/_cjs/chains/celo/formatters.js +34 -5
  2. package/_cjs/chains/celo/formatters.js.map +1 -1
  3. package/_cjs/chains/celo/parsers.js +55 -0
  4. package/_cjs/chains/celo/parsers.js.map +1 -1
  5. package/_cjs/chains/celo/serializers.js +70 -6
  6. package/_cjs/chains/celo/serializers.js.map +1 -1
  7. package/_cjs/chains/utils/index.js.map +1 -1
  8. package/_cjs/errors/version.js +1 -1
  9. package/_esm/chains/celo/formatters.js +34 -5
  10. package/_esm/chains/celo/formatters.js.map +1 -1
  11. package/_esm/chains/celo/parsers.js +56 -1
  12. package/_esm/chains/celo/parsers.js.map +1 -1
  13. package/_esm/chains/celo/serializers.js +73 -7
  14. package/_esm/chains/celo/serializers.js.map +1 -1
  15. package/_esm/chains/utils/index.js.map +1 -1
  16. package/_esm/errors/version.js +1 -1
  17. package/_types/chains/celo/formatters.d.ts +126 -0
  18. package/_types/chains/celo/formatters.d.ts.map +1 -1
  19. package/_types/chains/celo/parsers.d.ts.map +1 -1
  20. package/_types/chains/celo/serializers.d.ts +3 -1
  21. package/_types/chains/celo/serializers.d.ts.map +1 -1
  22. package/_types/chains/celo/types.d.ts +39 -7
  23. package/_types/chains/celo/types.d.ts.map +1 -1
  24. package/_types/chains/definitions/celo.d.ts +126 -0
  25. package/_types/chains/definitions/celo.d.ts.map +1 -1
  26. package/_types/chains/definitions/celoAlfajores.d.ts +126 -0
  27. package/_types/chains/definitions/celoAlfajores.d.ts.map +1 -1
  28. package/_types/chains/definitions/celoCannoli.d.ts +126 -0
  29. package/_types/chains/definitions/celoCannoli.d.ts.map +1 -1
  30. package/_types/chains/utils/index.d.ts +1 -1
  31. package/_types/chains/utils/index.d.ts.map +1 -1
  32. package/_types/errors/version.d.ts +1 -1
  33. package/chains/celo/formatters.ts +39 -5
  34. package/chains/celo/parsers.ts +82 -1
  35. package/chains/celo/serializers.ts +121 -9
  36. package/chains/celo/types.ts +60 -2
  37. package/chains/utils/index.ts +6 -0
  38. package/errors/version.ts +1 -1
  39. package/package.json +1 -1
@@ -89,6 +89,9 @@ export declare const celoAlfajores: import("../../types/utils.js").Assign<{
89
89
  gatewayFee: `0x${string}` | null;
90
90
  gatewayFeeRecipient: `0x${string}` | null;
91
91
  type: "0x7c";
92
+ }) | (import("../../types/utils.js").Assign_<Partial<Omit<import("../../index.js").TransactionLegacy<`0x${string}`, `0x${string}`, boolean, "0x0">, "typeHex">>, import("../celo/types.js").CeloRpcTransaction> & import("../../index.js").TransactionBase<`0x${string}`, `0x${string}`, boolean> & import("../../index.js").FeeValuesEIP1559<`0x${string}`> & {
93
+ feeCurrency: `0x${string}` | null;
94
+ type: "0x7b";
92
95
  }) | (import("../../types/utils.js").Assign_<Partial<Omit<import("../../index.js").TransactionEIP2930<`0x${string}`, `0x${string}`, boolean, "0x1">, "typeHex">>, import("../celo/types.js").CeloRpcTransaction> & Omit<import("../../index.js").TransactionLegacy<`0x${string}`, `0x${string}`, boolean, "0x0">, "typeHex"> & {
93
96
  feeCurrency: `0x${string}` | null;
94
97
  gatewayFee: `0x${string}` | null;
@@ -106,6 +109,9 @@ export declare const celoAlfajores: import("../../types/utils.js").Assign<{
106
109
  gatewayFee: `0x${string}` | null;
107
110
  gatewayFeeRecipient: `0x${string}` | null;
108
111
  type: "0x7c";
112
+ }) | (import("../../types/utils.js").Assign_<Partial<Omit<import("../../index.js").TransactionEIP2930<`0x${string}`, `0x${string}`, boolean, "0x1">, "typeHex">>, import("../celo/types.js").CeloRpcTransaction> & import("../../index.js").TransactionBase<`0x${string}`, `0x${string}`, boolean> & import("../../index.js").FeeValuesEIP1559<`0x${string}`> & {
113
+ feeCurrency: `0x${string}` | null;
114
+ type: "0x7b";
109
115
  }) | (import("../../types/utils.js").Assign_<Partial<Omit<import("../../index.js").TransactionEIP1559<`0x${string}`, `0x${string}`, boolean, "0x2">, "typeHex">>, import("../celo/types.js").CeloRpcTransaction> & Omit<import("../../index.js").TransactionLegacy<`0x${string}`, `0x${string}`, boolean, "0x0">, "typeHex"> & {
110
116
  feeCurrency: `0x${string}` | null;
111
117
  gatewayFee: `0x${string}` | null;
@@ -123,6 +129,9 @@ export declare const celoAlfajores: import("../../types/utils.js").Assign<{
123
129
  gatewayFee: `0x${string}` | null;
124
130
  gatewayFeeRecipient: `0x${string}` | null;
125
131
  type: "0x7c";
132
+ }) | (import("../../types/utils.js").Assign_<Partial<Omit<import("../../index.js").TransactionEIP1559<`0x${string}`, `0x${string}`, boolean, "0x2">, "typeHex">>, import("../celo/types.js").CeloRpcTransaction> & import("../../index.js").TransactionBase<`0x${string}`, `0x${string}`, boolean> & import("../../index.js").FeeValuesEIP1559<`0x${string}`> & {
133
+ feeCurrency: `0x${string}` | null;
134
+ type: "0x7b";
126
135
  })) => ({
127
136
  blockHash: `0x${string}` | null;
128
137
  blockNumber: bigint | null;
@@ -171,6 +180,30 @@ export declare const celoAlfajores: import("../../types/utils.js").Assign<{
171
180
  feeCurrency: `0x${string}` | null;
172
181
  gatewayFee: bigint | null;
173
182
  gatewayFeeRecipient: `0x${string}` | null;
183
+ } | {
184
+ blockHash: `0x${string}` | null;
185
+ blockNumber: bigint | null;
186
+ from: `0x${string}`;
187
+ gas: bigint;
188
+ hash: `0x${string}`;
189
+ input: `0x${string}`;
190
+ nonce: number;
191
+ r: `0x${string}`;
192
+ s: `0x${string}`;
193
+ to: `0x${string}` | null;
194
+ transactionIndex: number | null;
195
+ typeHex: `0x${string}` | null;
196
+ v: bigint;
197
+ value: bigint;
198
+ gasPrice: undefined;
199
+ maxFeePerGas: bigint;
200
+ maxPriorityFeePerGas: bigint;
201
+ accessList?: undefined;
202
+ chainId?: number | undefined;
203
+ type: "cip64";
204
+ feeCurrency: `0x${string}` | null;
205
+ gatewayFee?: undefined;
206
+ gatewayFeeRecipient?: undefined;
174
207
  } | {
175
208
  blockHash: `0x${string}` | null;
176
209
  blockNumber: bigint | null;
@@ -243,6 +276,30 @@ export declare const celoAlfajores: import("../../types/utils.js").Assign<{
243
276
  feeCurrency: `0x${string}` | null;
244
277
  gatewayFee: bigint | null;
245
278
  gatewayFeeRecipient: `0x${string}` | null;
279
+ } | {
280
+ blockHash: `0x${string}` | null;
281
+ blockNumber: bigint | null;
282
+ from: `0x${string}`;
283
+ gas: bigint;
284
+ hash: `0x${string}`;
285
+ input: `0x${string}`;
286
+ nonce: number;
287
+ r: `0x${string}`;
288
+ s: `0x${string}`;
289
+ to: `0x${string}` | null;
290
+ transactionIndex: number | null;
291
+ typeHex: `0x${string}` | null;
292
+ v: bigint;
293
+ value: bigint;
294
+ gasPrice: undefined;
295
+ maxFeePerGas: bigint;
296
+ maxPriorityFeePerGas: bigint;
297
+ accessList: import("../../index.js").AccessList;
298
+ chainId: number;
299
+ type: "cip64";
300
+ feeCurrency: `0x${string}` | null;
301
+ gatewayFee?: undefined;
302
+ gatewayFeeRecipient?: undefined;
246
303
  } | {
247
304
  blockHash: `0x${string}` | null;
248
305
  blockNumber: bigint | null;
@@ -315,6 +372,30 @@ export declare const celoAlfajores: import("../../types/utils.js").Assign<{
315
372
  feeCurrency: `0x${string}` | null;
316
373
  gatewayFee: bigint | null;
317
374
  gatewayFeeRecipient: `0x${string}` | null;
375
+ } | {
376
+ blockHash: `0x${string}` | null;
377
+ blockNumber: bigint | null;
378
+ from: `0x${string}`;
379
+ gas: bigint;
380
+ hash: `0x${string}`;
381
+ input: `0x${string}`;
382
+ nonce: number;
383
+ r: `0x${string}`;
384
+ s: `0x${string}`;
385
+ to: `0x${string}` | null;
386
+ transactionIndex: number | null;
387
+ typeHex: `0x${string}` | null;
388
+ v: bigint;
389
+ value: bigint;
390
+ gasPrice?: undefined;
391
+ maxFeePerGas: bigint;
392
+ maxPriorityFeePerGas: bigint;
393
+ accessList: import("../../index.js").AccessList;
394
+ chainId: number;
395
+ type: "cip64";
396
+ feeCurrency: `0x${string}` | null;
397
+ gatewayFee?: undefined;
398
+ gatewayFeeRecipient?: undefined;
318
399
  }) & {};
319
400
  type: "transaction";
320
401
  };
@@ -403,6 +484,21 @@ export declare const celoAlfajores: import("../../types/utils.js").Assign<{
403
484
  feeCurrency?: `0x${string}` | undefined;
404
485
  gatewayFee?: `0x${string}` | undefined;
405
486
  gatewayFeeRecipient?: `0x${string}` | undefined;
487
+ } | {
488
+ data?: `0x${string}` | undefined;
489
+ from: `0x${string}`;
490
+ gas?: `0x${string}` | undefined;
491
+ nonce?: `0x${string}` | undefined;
492
+ to?: `0x${string}` | null | undefined;
493
+ value?: `0x${string}` | undefined;
494
+ gasPrice?: undefined;
495
+ maxFeePerGas?: `0x${string}` | undefined;
496
+ maxPriorityFeePerGas?: `0x${string}` | undefined;
497
+ accessList?: import("../../index.js").AccessList | undefined;
498
+ type?: "0x7b" | undefined;
499
+ feeCurrency?: `0x${string}` | undefined;
500
+ gatewayFee?: undefined;
501
+ gatewayFeeRecipient?: undefined;
406
502
  } | {
407
503
  data?: `0x${string}` | undefined;
408
504
  from: `0x${string}`;
@@ -463,6 +559,21 @@ export declare const celoAlfajores: import("../../types/utils.js").Assign<{
463
559
  feeCurrency?: `0x${string}` | undefined;
464
560
  gatewayFee?: `0x${string}` | undefined;
465
561
  gatewayFeeRecipient?: `0x${string}` | undefined;
562
+ } | {
563
+ data?: `0x${string}` | undefined;
564
+ from: `0x${string}`;
565
+ gas?: `0x${string}` | undefined;
566
+ nonce?: `0x${string}` | undefined;
567
+ to?: `0x${string}` | null | undefined;
568
+ value?: `0x${string}` | undefined;
569
+ gasPrice?: undefined;
570
+ maxFeePerGas?: `0x${string}` | undefined;
571
+ maxPriorityFeePerGas?: `0x${string}` | undefined;
572
+ accessList?: import("../../index.js").AccessList | undefined;
573
+ type?: "0x7b" | undefined;
574
+ feeCurrency?: `0x${string}` | undefined;
575
+ gatewayFee?: undefined;
576
+ gatewayFeeRecipient?: undefined;
466
577
  } | {
467
578
  data?: `0x${string}` | undefined;
468
579
  from: `0x${string}`;
@@ -523,6 +634,21 @@ export declare const celoAlfajores: import("../../types/utils.js").Assign<{
523
634
  feeCurrency?: `0x${string}` | undefined;
524
635
  gatewayFee?: `0x${string}` | undefined;
525
636
  gatewayFeeRecipient?: `0x${string}` | undefined;
637
+ } | {
638
+ data?: `0x${string}` | undefined;
639
+ from: `0x${string}`;
640
+ gas?: `0x${string}` | undefined;
641
+ nonce?: `0x${string}` | undefined;
642
+ to?: `0x${string}` | null | undefined;
643
+ value?: `0x${string}` | undefined;
644
+ gasPrice?: undefined;
645
+ maxFeePerGas?: `0x${string}` | undefined;
646
+ maxPriorityFeePerGas?: `0x${string}` | undefined;
647
+ accessList?: import("../../index.js").AccessList | undefined;
648
+ type?: "0x7b" | undefined;
649
+ feeCurrency?: `0x${string}` | undefined;
650
+ gatewayFee?: undefined;
651
+ gatewayFeeRecipient?: undefined;
526
652
  }) & {};
527
653
  type: "transactionRequest";
528
654
  };
@@ -1 +1 @@
1
- {"version":3,"file":"celoAlfajores.d.ts","sourceRoot":"","sources":["../../../chains/definitions/celoAlfajores.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwCzB,CAAA"}
1
+ {"version":3,"file":"celoAlfajores.d.ts","sourceRoot":"","sources":["../../../chains/definitions/celoAlfajores.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwCzB,CAAA"}
@@ -82,6 +82,9 @@ export declare const celoCannoli: import("../../types/utils.js").Assign<{
82
82
  gatewayFee: `0x${string}` | null;
83
83
  gatewayFeeRecipient: `0x${string}` | null;
84
84
  type: "0x7c";
85
+ }) | (import("../../types/utils.js").Assign_<Partial<Omit<import("../../index.js").TransactionLegacy<`0x${string}`, `0x${string}`, boolean, "0x0">, "typeHex">>, import("../celo/types.js").CeloRpcTransaction> & import("../../index.js").TransactionBase<`0x${string}`, `0x${string}`, boolean> & import("../../index.js").FeeValuesEIP1559<`0x${string}`> & {
86
+ feeCurrency: `0x${string}` | null;
87
+ type: "0x7b";
85
88
  }) | (import("../../types/utils.js").Assign_<Partial<Omit<import("../../index.js").TransactionEIP2930<`0x${string}`, `0x${string}`, boolean, "0x1">, "typeHex">>, import("../celo/types.js").CeloRpcTransaction> & Omit<import("../../index.js").TransactionLegacy<`0x${string}`, `0x${string}`, boolean, "0x0">, "typeHex"> & {
86
89
  feeCurrency: `0x${string}` | null;
87
90
  gatewayFee: `0x${string}` | null;
@@ -99,6 +102,9 @@ export declare const celoCannoli: import("../../types/utils.js").Assign<{
99
102
  gatewayFee: `0x${string}` | null;
100
103
  gatewayFeeRecipient: `0x${string}` | null;
101
104
  type: "0x7c";
105
+ }) | (import("../../types/utils.js").Assign_<Partial<Omit<import("../../index.js").TransactionEIP2930<`0x${string}`, `0x${string}`, boolean, "0x1">, "typeHex">>, import("../celo/types.js").CeloRpcTransaction> & import("../../index.js").TransactionBase<`0x${string}`, `0x${string}`, boolean> & import("../../index.js").FeeValuesEIP1559<`0x${string}`> & {
106
+ feeCurrency: `0x${string}` | null;
107
+ type: "0x7b";
102
108
  }) | (import("../../types/utils.js").Assign_<Partial<Omit<import("../../index.js").TransactionEIP1559<`0x${string}`, `0x${string}`, boolean, "0x2">, "typeHex">>, import("../celo/types.js").CeloRpcTransaction> & Omit<import("../../index.js").TransactionLegacy<`0x${string}`, `0x${string}`, boolean, "0x0">, "typeHex"> & {
103
109
  feeCurrency: `0x${string}` | null;
104
110
  gatewayFee: `0x${string}` | null;
@@ -116,6 +122,9 @@ export declare const celoCannoli: import("../../types/utils.js").Assign<{
116
122
  gatewayFee: `0x${string}` | null;
117
123
  gatewayFeeRecipient: `0x${string}` | null;
118
124
  type: "0x7c";
125
+ }) | (import("../../types/utils.js").Assign_<Partial<Omit<import("../../index.js").TransactionEIP1559<`0x${string}`, `0x${string}`, boolean, "0x2">, "typeHex">>, import("../celo/types.js").CeloRpcTransaction> & import("../../index.js").TransactionBase<`0x${string}`, `0x${string}`, boolean> & import("../../index.js").FeeValuesEIP1559<`0x${string}`> & {
126
+ feeCurrency: `0x${string}` | null;
127
+ type: "0x7b";
119
128
  })) => ({
120
129
  blockHash: `0x${string}` | null;
121
130
  blockNumber: bigint | null;
@@ -164,6 +173,30 @@ export declare const celoCannoli: import("../../types/utils.js").Assign<{
164
173
  feeCurrency: `0x${string}` | null;
165
174
  gatewayFee: bigint | null;
166
175
  gatewayFeeRecipient: `0x${string}` | null;
176
+ } | {
177
+ blockHash: `0x${string}` | null;
178
+ blockNumber: bigint | null;
179
+ from: `0x${string}`;
180
+ gas: bigint;
181
+ hash: `0x${string}`;
182
+ input: `0x${string}`;
183
+ nonce: number;
184
+ r: `0x${string}`;
185
+ s: `0x${string}`;
186
+ to: `0x${string}` | null;
187
+ transactionIndex: number | null;
188
+ typeHex: `0x${string}` | null;
189
+ v: bigint;
190
+ value: bigint;
191
+ gasPrice: undefined;
192
+ maxFeePerGas: bigint;
193
+ maxPriorityFeePerGas: bigint;
194
+ accessList?: undefined;
195
+ chainId?: number | undefined;
196
+ type: "cip64";
197
+ feeCurrency: `0x${string}` | null;
198
+ gatewayFee?: undefined;
199
+ gatewayFeeRecipient?: undefined;
167
200
  } | {
168
201
  blockHash: `0x${string}` | null;
169
202
  blockNumber: bigint | null;
@@ -236,6 +269,30 @@ export declare const celoCannoli: import("../../types/utils.js").Assign<{
236
269
  feeCurrency: `0x${string}` | null;
237
270
  gatewayFee: bigint | null;
238
271
  gatewayFeeRecipient: `0x${string}` | null;
272
+ } | {
273
+ blockHash: `0x${string}` | null;
274
+ blockNumber: bigint | null;
275
+ from: `0x${string}`;
276
+ gas: bigint;
277
+ hash: `0x${string}`;
278
+ input: `0x${string}`;
279
+ nonce: number;
280
+ r: `0x${string}`;
281
+ s: `0x${string}`;
282
+ to: `0x${string}` | null;
283
+ transactionIndex: number | null;
284
+ typeHex: `0x${string}` | null;
285
+ v: bigint;
286
+ value: bigint;
287
+ gasPrice: undefined;
288
+ maxFeePerGas: bigint;
289
+ maxPriorityFeePerGas: bigint;
290
+ accessList: import("../../index.js").AccessList;
291
+ chainId: number;
292
+ type: "cip64";
293
+ feeCurrency: `0x${string}` | null;
294
+ gatewayFee?: undefined;
295
+ gatewayFeeRecipient?: undefined;
239
296
  } | {
240
297
  blockHash: `0x${string}` | null;
241
298
  blockNumber: bigint | null;
@@ -308,6 +365,30 @@ export declare const celoCannoli: import("../../types/utils.js").Assign<{
308
365
  feeCurrency: `0x${string}` | null;
309
366
  gatewayFee: bigint | null;
310
367
  gatewayFeeRecipient: `0x${string}` | null;
368
+ } | {
369
+ blockHash: `0x${string}` | null;
370
+ blockNumber: bigint | null;
371
+ from: `0x${string}`;
372
+ gas: bigint;
373
+ hash: `0x${string}`;
374
+ input: `0x${string}`;
375
+ nonce: number;
376
+ r: `0x${string}`;
377
+ s: `0x${string}`;
378
+ to: `0x${string}` | null;
379
+ transactionIndex: number | null;
380
+ typeHex: `0x${string}` | null;
381
+ v: bigint;
382
+ value: bigint;
383
+ gasPrice?: undefined;
384
+ maxFeePerGas: bigint;
385
+ maxPriorityFeePerGas: bigint;
386
+ accessList: import("../../index.js").AccessList;
387
+ chainId: number;
388
+ type: "cip64";
389
+ feeCurrency: `0x${string}` | null;
390
+ gatewayFee?: undefined;
391
+ gatewayFeeRecipient?: undefined;
311
392
  }) & {};
312
393
  type: "transaction";
313
394
  };
@@ -396,6 +477,21 @@ export declare const celoCannoli: import("../../types/utils.js").Assign<{
396
477
  feeCurrency?: `0x${string}` | undefined;
397
478
  gatewayFee?: `0x${string}` | undefined;
398
479
  gatewayFeeRecipient?: `0x${string}` | undefined;
480
+ } | {
481
+ data?: `0x${string}` | undefined;
482
+ from: `0x${string}`;
483
+ gas?: `0x${string}` | undefined;
484
+ nonce?: `0x${string}` | undefined;
485
+ to?: `0x${string}` | null | undefined;
486
+ value?: `0x${string}` | undefined;
487
+ gasPrice?: undefined;
488
+ maxFeePerGas?: `0x${string}` | undefined;
489
+ maxPriorityFeePerGas?: `0x${string}` | undefined;
490
+ accessList?: import("../../index.js").AccessList | undefined;
491
+ type?: "0x7b" | undefined;
492
+ feeCurrency?: `0x${string}` | undefined;
493
+ gatewayFee?: undefined;
494
+ gatewayFeeRecipient?: undefined;
399
495
  } | {
400
496
  data?: `0x${string}` | undefined;
401
497
  from: `0x${string}`;
@@ -456,6 +552,21 @@ export declare const celoCannoli: import("../../types/utils.js").Assign<{
456
552
  feeCurrency?: `0x${string}` | undefined;
457
553
  gatewayFee?: `0x${string}` | undefined;
458
554
  gatewayFeeRecipient?: `0x${string}` | undefined;
555
+ } | {
556
+ data?: `0x${string}` | undefined;
557
+ from: `0x${string}`;
558
+ gas?: `0x${string}` | undefined;
559
+ nonce?: `0x${string}` | undefined;
560
+ to?: `0x${string}` | null | undefined;
561
+ value?: `0x${string}` | undefined;
562
+ gasPrice?: undefined;
563
+ maxFeePerGas?: `0x${string}` | undefined;
564
+ maxPriorityFeePerGas?: `0x${string}` | undefined;
565
+ accessList?: import("../../index.js").AccessList | undefined;
566
+ type?: "0x7b" | undefined;
567
+ feeCurrency?: `0x${string}` | undefined;
568
+ gatewayFee?: undefined;
569
+ gatewayFeeRecipient?: undefined;
459
570
  } | {
460
571
  data?: `0x${string}` | undefined;
461
572
  from: `0x${string}`;
@@ -516,6 +627,21 @@ export declare const celoCannoli: import("../../types/utils.js").Assign<{
516
627
  feeCurrency?: `0x${string}` | undefined;
517
628
  gatewayFee?: `0x${string}` | undefined;
518
629
  gatewayFeeRecipient?: `0x${string}` | undefined;
630
+ } | {
631
+ data?: `0x${string}` | undefined;
632
+ from: `0x${string}`;
633
+ gas?: `0x${string}` | undefined;
634
+ nonce?: `0x${string}` | undefined;
635
+ to?: `0x${string}` | null | undefined;
636
+ value?: `0x${string}` | undefined;
637
+ gasPrice?: undefined;
638
+ maxFeePerGas?: `0x${string}` | undefined;
639
+ maxPriorityFeePerGas?: `0x${string}` | undefined;
640
+ accessList?: import("../../index.js").AccessList | undefined;
641
+ type?: "0x7b" | undefined;
642
+ feeCurrency?: `0x${string}` | undefined;
643
+ gatewayFee?: undefined;
644
+ gatewayFeeRecipient?: undefined;
519
645
  }) & {};
520
646
  type: "transactionRequest";
521
647
  };
@@ -1 +1 @@
1
- {"version":3,"file":"celoCannoli.d.ts","sourceRoot":"","sources":["../../../chains/definitions/celoCannoli.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoCvB,CAAA"}
1
+ {"version":3,"file":"celoCannoli.d.ts","sourceRoot":"","sources":["../../../chains/definitions/celoCannoli.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoCvB,CAAA"}
@@ -1,7 +1,7 @@
1
1
  export { formattersCelo } from '../celo/formatters.js';
2
2
  export { serializeTransactionCelo, serializersCelo, } from '../celo/serializers.js';
3
3
  export { parseTransactionCelo } from '../celo/parsers.js';
4
- export type { CeloBlock, CeloBlockOverrides, CeloRpcBlock, CeloRpcBlockOverrides, CeloRpcTransaction, CeloRpcTransactionReceipt, CeloRpcTransactionReceiptOverrides, CeloRpcTransactionRequest, CeloTransaction, CeloTransactionReceipt, CeloTransactionReceiptOverrides, CeloTransactionRequest, CeloTransactionSerializable, CeloTransactionSerialized, CeloTransactionType, RpcTransactionCIP42, RpcTransactionRequestCIP42, TransactionCIP42, TransactionRequestCIP42, TransactionSerializableCIP42, TransactionSerializedCIP42, } from '../celo/types.js';
4
+ export type { CeloBlock, CeloBlockOverrides, CeloRpcBlock, CeloRpcBlockOverrides, CeloRpcTransaction, CeloRpcTransactionReceipt, CeloRpcTransactionReceiptOverrides, CeloRpcTransactionRequest, CeloTransaction, CeloTransactionReceipt, CeloTransactionReceiptOverrides, CeloTransactionRequest, CeloTransactionSerializable, CeloTransactionSerialized, CeloTransactionType, RpcTransactionCIP42, RpcTransactionCIP64, RpcTransactionRequestCIP42, RpcTransactionRequestCIP64, TransactionCIP42, TransactionCIP64, TransactionRequestCIP42, TransactionRequestCIP64, TransactionSerializableCIP42, TransactionSerializableCIP64, TransactionSerializedCIP42, TransactionSerializedCIP64, } from '../celo/types.js';
5
5
  export { formattersOptimism } from '../optimism/formatters.js';
6
6
  export type { OptimismBlock, OptimismBlockOverrides, OptimismDepositTransaction, OptimismRpcBlock, OptimismRpcBlockOverrides, OptimismRpcDepositTransaction, OptimismRpcTransaction, OptimismRpcTransactionReceipt, OptimismRpcTransactionReceiptOverrides, OptimismTransaction, OptimismTransactionReceipt, OptimismTransactionReceiptOverrides, } from '../optimism/types.js';
7
7
  export { formattersZkSync } from '../zksync/formatters.js';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../chains/utils/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAA;AACtD,OAAO,EACL,wBAAwB,EACxB,eAAe,GAChB,MAAM,wBAAwB,CAAA;AAC/B,OAAO,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAA;AACzD,YAAY,EACV,SAAS,EACT,kBAAkB,EAClB,YAAY,EACZ,qBAAqB,EACrB,kBAAkB,EAClB,yBAAyB,EACzB,kCAAkC,EAClC,yBAAyB,EACzB,eAAe,EACf,sBAAsB,EACtB,+BAA+B,EAC/B,sBAAsB,EACtB,2BAA2B,EAC3B,yBAAyB,EACzB,mBAAmB,EACnB,mBAAmB,EACnB,0BAA0B,EAC1B,gBAAgB,EAChB,uBAAuB,EACvB,4BAA4B,EAC5B,0BAA0B,GAC3B,MAAM,kBAAkB,CAAA;AAEzB,OAAO,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAA;AAC9D,YAAY,EACV,aAAa,EACb,sBAAsB,EACtB,0BAA0B,EAC1B,gBAAgB,EAChB,yBAAyB,EACzB,6BAA6B,EAC7B,sBAAsB,EACtB,6BAA6B,EAC7B,sCAAsC,EACtC,mBAAmB,EACnB,0BAA0B,EAC1B,mCAAmC,GACpC,MAAM,sBAAsB,CAAA;AAE7B,OAAO,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAA;AAC1D,YAAY,EACV,WAAW,EACX,oBAAoB,EACpB,gBAAgB,EAChB,eAAe,EACf,eAAe,EACf,SAAS,EACT,cAAc,EACd,uBAAuB,EACvB,kBAAkB,EAClB,YAAY,EACZ,oBAAoB,EACpB,0BAA0B,EAC1B,4BAA4B,EAC5B,oCAAoC,EACpC,2BAA2B,EAC3B,iCAAiC,EACjC,iBAAiB,EACjB,uBAAuB,EACvB,wBAAwB,EACxB,iCAAiC,EACjC,wBAAwB,EACxB,8BAA8B,EAC9B,6BAA6B,EAC7B,mCAAmC,EACnC,2BAA2B,EAC3B,iCAAiC,EACjC,qBAAqB,GACtB,MAAM,oBAAoB,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../chains/utils/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAA;AACtD,OAAO,EACL,wBAAwB,EACxB,eAAe,GAChB,MAAM,wBAAwB,CAAA;AAC/B,OAAO,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAA;AACzD,YAAY,EACV,SAAS,EACT,kBAAkB,EAClB,YAAY,EACZ,qBAAqB,EACrB,kBAAkB,EAClB,yBAAyB,EACzB,kCAAkC,EAClC,yBAAyB,EACzB,eAAe,EACf,sBAAsB,EACtB,+BAA+B,EAC/B,sBAAsB,EACtB,2BAA2B,EAC3B,yBAAyB,EACzB,mBAAmB,EACnB,mBAAmB,EACnB,mBAAmB,EACnB,0BAA0B,EAC1B,0BAA0B,EAC1B,gBAAgB,EAChB,gBAAgB,EAChB,uBAAuB,EACvB,uBAAuB,EACvB,4BAA4B,EAC5B,4BAA4B,EAC5B,0BAA0B,EAC1B,0BAA0B,GAC3B,MAAM,kBAAkB,CAAA;AAEzB,OAAO,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAA;AAC9D,YAAY,EACV,aAAa,EACb,sBAAsB,EACtB,0BAA0B,EAC1B,gBAAgB,EAChB,yBAAyB,EACzB,6BAA6B,EAC7B,sBAAsB,EACtB,6BAA6B,EAC7B,sCAAsC,EACtC,mBAAmB,EACnB,0BAA0B,EAC1B,mCAAmC,GACpC,MAAM,sBAAsB,CAAA;AAE7B,OAAO,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAA;AAC1D,YAAY,EACV,WAAW,EACX,oBAAoB,EACpB,gBAAgB,EAChB,eAAe,EACf,eAAe,EACf,SAAS,EACT,cAAc,EACd,uBAAuB,EACvB,kBAAkB,EAClB,YAAY,EACZ,oBAAoB,EACpB,0BAA0B,EAC1B,4BAA4B,EAC5B,oCAAoC,EACpC,2BAA2B,EAC3B,iCAAiC,EACjC,iBAAiB,EACjB,uBAAuB,EACvB,wBAAwB,EACxB,iCAAiC,EACjC,wBAAwB,EACxB,8BAA8B,EAC9B,6BAA6B,EAC7B,mCAAmC,EACnC,2BAA2B,EAC3B,iCAAiC,EACjC,qBAAqB,GACtB,MAAM,oBAAoB,CAAA"}
@@ -1,2 +1,2 @@
1
- export declare const version = "0.0.0-main.20231026T220458";
1
+ export declare const version = "0.0.0-main.20231027T032213";
2
2
  //# sourceMappingURL=version.d.ts.map
@@ -20,6 +20,22 @@ import type {
20
20
  CeloTransactionRequest,
21
21
  } from './types.js'
22
22
 
23
+ function isTransactionRequestCIP64(args: CeloTransactionRequest): boolean {
24
+ if (args.type === 'cip64') return true
25
+ if (args.type) return false
26
+ return (
27
+ 'feeCurrency' in args &&
28
+ args.gatewayFee === undefined &&
29
+ args.gatewayFeeRecipient === undefined
30
+ )
31
+ }
32
+
33
+ function isTransactionRequestCIP42(args: CeloTransactionRequest): boolean {
34
+ if (args.type === 'cip42') return true
35
+ if (args.type) return false
36
+ return args.gatewayFee !== undefined || args.gatewayFeeRecipient !== undefined
37
+ }
38
+
23
39
  export const formattersCelo = {
24
40
  block: /*#__PURE__*/ defineBlock({
25
41
  exclude: ['difficulty', 'gasLimit', 'mixHash', 'nonce', 'uncles'],
@@ -35,10 +51,15 @@ export const formattersCelo = {
35
51
  return {
36
52
  ...formatTransaction(transaction as RpcTransaction),
37
53
  feeCurrency: transaction.feeCurrency,
38
- gatewayFee: transaction.gatewayFee
39
- ? hexToBigInt(transaction.gatewayFee)
40
- : null,
41
- gatewayFeeRecipient: transaction.gatewayFeeRecipient,
54
+
55
+ ...(transaction.type !== '0x7b'
56
+ ? {
57
+ gatewayFee: transaction.gatewayFee
58
+ ? hexToBigInt(transaction.gatewayFee)
59
+ : null,
60
+ gatewayFeeRecipient: transaction.gatewayFeeRecipient || null,
61
+ }
62
+ : {}),
42
63
  }
43
64
  }) as Hash[] | CeloTransaction[]
44
65
  return {
@@ -49,6 +70,10 @@ export const formattersCelo = {
49
70
  }),
50
71
  transaction: /*#__PURE__*/ defineTransaction({
51
72
  format(args: CeloRpcTransaction): CeloTransaction {
73
+ if (args.type === '0x7b')
74
+ return {
75
+ feeCurrency: args.feeCurrency,
76
+ } as CeloTransaction
52
77
  return {
53
78
  feeCurrency: args.feeCurrency,
54
79
  gatewayFee: args.gatewayFee ? hexToBigInt(args.gatewayFee) : null,
@@ -67,8 +92,15 @@ export const formattersCelo = {
67
92
  }
68
93
  },
69
94
  }),
95
+
70
96
  transactionRequest: /*#__PURE__*/ defineTransactionRequest({
71
97
  format(args: CeloTransactionRequest): CeloRpcTransactionRequest {
98
+ if (isTransactionRequestCIP64(args))
99
+ return {
100
+ type: '0x7b',
101
+ feeCurrency: args.feeCurrency,
102
+ } as CeloRpcTransactionRequest
103
+
72
104
  const request = {
73
105
  feeCurrency: args.feeCurrency,
74
106
  gatewayFee:
@@ -77,7 +109,9 @@ export const formattersCelo = {
77
109
  : undefined,
78
110
  gatewayFeeRecipient: args.gatewayFeeRecipient,
79
111
  } as CeloRpcTransactionRequest
80
- if (args.type === 'cip42') request.type = '0x7c'
112
+
113
+ if (isTransactionRequestCIP42(args)) request.type = '0x7c'
114
+
81
115
  return request
82
116
  },
83
117
  }),
@@ -11,12 +11,17 @@ import {
11
11
  parseTransaction,
12
12
  toTransactionArray,
13
13
  } from '../../utils/transaction/parseTransaction.js'
14
- import { assertTransactionCIP42 } from './serializers.js'
14
+ import {
15
+ assertTransactionCIP42,
16
+ assertTransactionCIP64,
17
+ } from './serializers.js'
15
18
  import type {
16
19
  CeloTransactionSerialized,
17
20
  CeloTransactionType,
18
21
  TransactionSerializableCIP42,
22
+ TransactionSerializableCIP64,
19
23
  TransactionSerializedCIP42,
24
+ TransactionSerializedCIP64,
20
25
  } from './types.js'
21
26
 
22
27
  export type ParseTransactionCeloReturnType<
@@ -38,6 +43,11 @@ export function parseTransactionCelo<
38
43
  serializedTransaction as TransactionSerializedCIP42,
39
44
  ) as ParseTransactionCeloReturnType<TSerialized>
40
45
 
46
+ if (serializedType === '0x7b')
47
+ return parseTransactionCIP64(
48
+ serializedTransaction as TransactionSerializedCIP64,
49
+ ) as ParseTransactionCeloReturnType<TSerialized>
50
+
41
51
  return parseTransaction(
42
52
  serializedTransaction,
43
53
  ) as ParseTransactionCeloReturnType<TSerialized>
@@ -121,3 +131,74 @@ function parseTransactionCIP42(
121
131
 
122
132
  return transaction as TransactionSerializableCIP42
123
133
  }
134
+
135
+ function parseTransactionCIP64(
136
+ serializedTransaction: TransactionSerializedCIP64,
137
+ ): TransactionSerializableCIP64 {
138
+ const transactionArray = toTransactionArray(serializedTransaction)
139
+
140
+ const [
141
+ chainId,
142
+ nonce,
143
+ maxPriorityFeePerGas,
144
+ maxFeePerGas,
145
+ gas,
146
+ to,
147
+ value,
148
+ data,
149
+ accessList,
150
+ feeCurrency,
151
+ v,
152
+ r,
153
+ s,
154
+ ] = transactionArray
155
+
156
+ if (transactionArray.length !== 13 && transactionArray.length !== 10) {
157
+ throw new InvalidSerializedTransactionError({
158
+ attributes: {
159
+ chainId,
160
+ nonce,
161
+ maxPriorityFeePerGas,
162
+ maxFeePerGas,
163
+ gas,
164
+ to,
165
+ value,
166
+ data,
167
+ accessList,
168
+ feeCurrency,
169
+ ...(transactionArray.length > 10
170
+ ? {
171
+ v,
172
+ r,
173
+ s,
174
+ }
175
+ : {}),
176
+ },
177
+ serializedTransaction,
178
+ type: 'cip64',
179
+ })
180
+ }
181
+
182
+ const transaction: Partial<TransactionSerializableCIP64> = {
183
+ chainId: hexToNumber(chainId as Hex),
184
+ type: 'cip64',
185
+ }
186
+
187
+ if (isHex(to) && to !== '0x') transaction.to = to
188
+ if (isHex(gas) && gas !== '0x') transaction.gas = hexToBigInt(gas)
189
+ if (isHex(data) && data !== '0x') transaction.data = data
190
+ if (isHex(nonce) && nonce !== '0x') transaction.nonce = hexToNumber(nonce)
191
+ if (isHex(value) && value !== '0x') transaction.value = hexToBigInt(value)
192
+ if (isHex(feeCurrency) && feeCurrency !== '0x')
193
+ transaction.feeCurrency = feeCurrency
194
+ if (isHex(maxFeePerGas) && maxFeePerGas !== '0x')
195
+ transaction.maxFeePerGas = hexToBigInt(maxFeePerGas)
196
+ if (isHex(maxPriorityFeePerGas) && maxPriorityFeePerGas !== '0x')
197
+ transaction.maxPriorityFeePerGas = hexToBigInt(maxPriorityFeePerGas)
198
+ if (accessList.length !== 0 && accessList !== '0x')
199
+ transaction.accessList = parseAccessList(accessList as RecursiveArray<Hex>)
200
+
201
+ assertTransactionCIP64(transaction as TransactionSerializableCIP64)
202
+
203
+ return transaction as TransactionSerializableCIP64
204
+ }