viem 0.0.0-main.20231026T220458 → 0.0.0-main.20231026T222229

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 (47) 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/node.js +11 -11
  9. package/_cjs/errors/node.js.map +1 -1
  10. package/_cjs/errors/rpc.js +18 -18
  11. package/_cjs/errors/rpc.js.map +1 -1
  12. package/_cjs/errors/version.js +1 -1
  13. package/_esm/chains/celo/formatters.js +34 -5
  14. package/_esm/chains/celo/formatters.js.map +1 -1
  15. package/_esm/chains/celo/parsers.js +56 -1
  16. package/_esm/chains/celo/parsers.js.map +1 -1
  17. package/_esm/chains/celo/serializers.js +73 -7
  18. package/_esm/chains/celo/serializers.js.map +1 -1
  19. package/_esm/chains/utils/index.js.map +1 -1
  20. package/_esm/errors/node.js +22 -11
  21. package/_esm/errors/node.js.map +1 -1
  22. package/_esm/errors/rpc.js +36 -18
  23. package/_esm/errors/rpc.js.map +1 -1
  24. package/_esm/errors/version.js +1 -1
  25. package/_types/chains/celo/formatters.d.ts +126 -0
  26. package/_types/chains/celo/formatters.d.ts.map +1 -1
  27. package/_types/chains/celo/parsers.d.ts.map +1 -1
  28. package/_types/chains/celo/serializers.d.ts +3 -1
  29. package/_types/chains/celo/serializers.d.ts.map +1 -1
  30. package/_types/chains/celo/types.d.ts +39 -7
  31. package/_types/chains/celo/types.d.ts.map +1 -1
  32. package/_types/chains/definitions/celo.d.ts +126 -0
  33. package/_types/chains/definitions/celo.d.ts.map +1 -1
  34. package/_types/chains/definitions/celoAlfajores.d.ts +126 -0
  35. package/_types/chains/definitions/celoAlfajores.d.ts.map +1 -1
  36. package/_types/chains/definitions/celoCannoli.d.ts +126 -0
  37. package/_types/chains/definitions/celoCannoli.d.ts.map +1 -1
  38. package/_types/chains/utils/index.d.ts +1 -1
  39. package/_types/chains/utils/index.d.ts.map +1 -1
  40. package/_types/errors/version.d.ts +1 -1
  41. package/chains/celo/formatters.ts +39 -5
  42. package/chains/celo/parsers.ts +82 -1
  43. package/chains/celo/serializers.ts +121 -9
  44. package/chains/celo/types.ts +60 -2
  45. package/chains/utils/index.ts +6 -0
  46. package/errors/version.ts +1 -1
  47. package/package.json +1 -1
@@ -75,6 +75,7 @@ export type CeloRpcBlock<
75
75
  export type CeloRpcTransaction<TPending extends boolean = boolean> =
76
76
  | RpcTransaction<TPending>
77
77
  | RpcTransactionCIP42<TPending>
78
+ | RpcTransactionCIP64<TPending>
78
79
 
79
80
  export type CeloRpcTransactionReceiptOverrides = {
80
81
  feeCurrency: Address | null
@@ -87,10 +88,12 @@ export type CeloRpcTransactionReceipt = RpcTransactionReceipt &
87
88
  export type CeloRpcTransactionRequest =
88
89
  | RpcTransactionRequest
89
90
  | RpcTransactionRequestCIP42
91
+ | RpcTransactionRequestCIP64
90
92
 
91
93
  export type CeloTransaction<TPending extends boolean = boolean> =
92
94
  | Transaction<TPending>
93
95
  | TransactionCIP42<TPending>
96
+ | TransactionCIP64<TPending>
94
97
 
95
98
  export type CeloTransactionReceiptOverrides = {
96
99
  feeCurrency: Address | null
@@ -103,16 +106,21 @@ export type CeloTransactionReceipt = TransactionReceipt &
103
106
  export type CeloTransactionRequest =
104
107
  | TransactionRequest
105
108
  | TransactionRequestCIP42
109
+ | TransactionRequestCIP64
106
110
 
107
111
  export type CeloTransactionSerializable =
108
112
  | TransactionSerializableCIP42
113
+ | TransactionSerializableCIP64
109
114
  | TransactionSerializable
110
115
 
111
116
  export type CeloTransactionSerialized<
112
117
  TType extends CeloTransactionType = 'legacy',
113
- > = TransactionSerialized<TType> | TransactionSerializedCIP42
118
+ > =
119
+ | TransactionSerialized<TType>
120
+ | TransactionSerializedCIP42
121
+ | TransactionSerializedCIP64
114
122
 
115
- export type CeloTransactionType = TransactionType | 'cip42'
123
+ export type CeloTransactionType = TransactionType | 'cip42' | 'cip64'
116
124
 
117
125
  type RpcTransaction<TPending extends boolean = boolean> =
118
126
  RpcTransaction_<TPending> & {
@@ -136,6 +144,13 @@ export type RpcTransactionCIP42<TPending extends boolean = boolean> =
136
144
  type: '0x7c'
137
145
  }
138
146
 
147
+ export type RpcTransactionCIP64<TPending extends boolean = boolean> =
148
+ TransactionBase<Quantity, Index, TPending> &
149
+ FeeValuesEIP1559<Quantity> & {
150
+ feeCurrency: Address | null
151
+ type: '0x7b'
152
+ }
153
+
139
154
  export type RpcTransactionRequestCIP42 = TransactionRequestBase<
140
155
  Quantity,
141
156
  Index
@@ -148,6 +163,18 @@ export type RpcTransactionRequestCIP42 = TransactionRequestBase<
148
163
  type?: '0x7c'
149
164
  }
150
165
 
166
+ export type RpcTransactionRequestCIP64 = TransactionRequestBase<
167
+ Quantity,
168
+ Index
169
+ > &
170
+ Partial<FeeValuesEIP1559<Quantity>> & {
171
+ accessList?: AccessList
172
+ feeCurrency?: Address
173
+ gatewayFee?: undefined
174
+ gatewayFeeRecipient?: undefined
175
+ type?: '0x7b'
176
+ }
177
+
151
178
  type Transaction<TPending extends boolean = boolean> = Transaction_<
152
179
  bigint,
153
180
  number,
@@ -167,6 +194,15 @@ export type TransactionCIP42<TPending extends boolean = boolean> =
167
194
  type: 'cip42'
168
195
  }
169
196
 
197
+ export type TransactionCIP64<TPending extends boolean = boolean> =
198
+ TransactionBase<bigint, number, TPending> &
199
+ FeeValuesEIP1559 & {
200
+ feeCurrency: Address | null
201
+ gatewayFee?: undefined
202
+ gatewayFeeRecipient?: undefined
203
+ type: 'cip64'
204
+ }
205
+
170
206
  type TransactionRequest = TransactionRequest_ & {
171
207
  feeCurrency?: Address
172
208
  gatewayFee?: bigint
@@ -182,6 +218,15 @@ export type TransactionRequestCIP42 = TransactionRequestBase &
182
218
  type?: 'cip42'
183
219
  }
184
220
 
221
+ export type TransactionRequestCIP64 = TransactionRequestBase &
222
+ Partial<FeeValuesEIP1559> & {
223
+ accessList?: AccessList
224
+ feeCurrency?: Address
225
+ gatewayFee?: undefined
226
+ gatewayFeeRecipient?: undefined
227
+ type?: 'cip64'
228
+ }
229
+
185
230
  export type TransactionSerializableCIP42<
186
231
  TQuantity = bigint,
187
232
  TIndex = number,
@@ -196,4 +241,17 @@ export type TransactionSerializableCIP42<
196
241
  type?: 'cip42'
197
242
  }
198
243
 
244
+ export type TransactionSerializableCIP64<
245
+ TQuantity = bigint,
246
+ TIndex = number,
247
+ > = TransactionSerializableBase<TQuantity, TIndex> &
248
+ FeeValuesEIP1559<TQuantity> & {
249
+ accessList?: AccessList
250
+ gasPrice?: never
251
+ feeCurrency?: Address
252
+ chainId: number
253
+ type?: 'cip64'
254
+ }
255
+
199
256
  export type TransactionSerializedCIP42 = `0x7c${string}`
257
+ export type TransactionSerializedCIP64 = `0x7b${string}`
@@ -21,11 +21,17 @@ export type {
21
21
  CeloTransactionSerialized,
22
22
  CeloTransactionType,
23
23
  RpcTransactionCIP42,
24
+ RpcTransactionCIP64,
24
25
  RpcTransactionRequestCIP42,
26
+ RpcTransactionRequestCIP64,
25
27
  TransactionCIP42,
28
+ TransactionCIP64,
26
29
  TransactionRequestCIP42,
30
+ TransactionRequestCIP64,
27
31
  TransactionSerializableCIP42,
32
+ TransactionSerializableCIP64,
28
33
  TransactionSerializedCIP42,
34
+ TransactionSerializedCIP64,
29
35
  } from '../celo/types.js'
30
36
 
31
37
  export { formattersOptimism } from '../optimism/formatters.js'
package/errors/version.ts CHANGED
@@ -1 +1 @@
1
- export const version = '0.0.0-main.20231026T220458'
1
+ export const version = '0.0.0-main.20231026T222229'
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "viem",
3
3
  "description": "TypeScript Interface for Ethereum",
4
- "version": "0.0.0-main.20231026T220458",
4
+ "version": "0.0.0-main.20231026T222229",
5
5
  "type": "module",
6
6
  "main": "./_cjs/index.js",
7
7
  "module": "./_esm/index.js",