viem 2.0.0-rc.0 → 2.0.0-rc.2

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 (262) hide show
  1. package/CHANGELOG.md +10 -0
  2. package/_cjs/actions/public/getFilterChanges.js +3 -2
  3. package/_cjs/actions/public/getFilterChanges.js.map +1 -1
  4. package/_cjs/actions/public/getFilterLogs.js +3 -2
  5. package/_cjs/actions/public/getFilterLogs.js.map +1 -1
  6. package/_cjs/actions/public/getLogs.js +3 -2
  7. package/_cjs/actions/public/getLogs.js.map +1 -1
  8. package/_cjs/actions/public/verifyTypedData.js +2 -1
  9. package/_cjs/actions/public/verifyTypedData.js.map +1 -1
  10. package/_cjs/chains/celo/formatters.js +0 -10
  11. package/_cjs/chains/celo/formatters.js.map +1 -1
  12. package/_cjs/chains/definitions/astar.js +0 -1
  13. package/_cjs/chains/definitions/astar.js.map +1 -1
  14. package/_cjs/chains/definitions/astarZkatana.js +0 -6
  15. package/_cjs/chains/definitions/astarZkatana.js.map +1 -1
  16. package/_cjs/chains/definitions/baseSepolia.js +0 -3
  17. package/_cjs/chains/definitions/baseSepolia.js.map +1 -1
  18. package/_cjs/chains/definitions/bscTestnet.js +0 -1
  19. package/_cjs/chains/definitions/bscTestnet.js.map +1 -1
  20. package/_cjs/chains/definitions/confluxESpaceTestnet.js +0 -4
  21. package/_cjs/chains/definitions/confluxESpaceTestnet.js.map +1 -1
  22. package/_cjs/chains/definitions/fantomSonicTestnet.js +0 -1
  23. package/_cjs/chains/definitions/fantomSonicTestnet.js.map +1 -1
  24. package/_cjs/chains/definitions/kava.js +0 -1
  25. package/_cjs/chains/definitions/kava.js.map +1 -1
  26. package/_cjs/chains/definitions/kavaTestnet.js +0 -1
  27. package/_cjs/chains/definitions/kavaTestnet.js.map +1 -1
  28. package/_cjs/chains/definitions/klaytnBaobab.js +0 -1
  29. package/_cjs/chains/definitions/klaytnBaobab.js.map +1 -1
  30. package/_cjs/chains/definitions/lukso.js +0 -4
  31. package/_cjs/chains/definitions/lukso.js.map +1 -1
  32. package/_cjs/chains/definitions/manta.js +0 -1
  33. package/_cjs/chains/definitions/manta.js.map +1 -1
  34. package/_cjs/chains/definitions/mantaTestnet.js +0 -1
  35. package/_cjs/chains/definitions/mantaTestnet.js.map +1 -1
  36. package/_cjs/chains/definitions/neonMainnet.js +0 -3
  37. package/_cjs/chains/definitions/neonMainnet.js.map +1 -1
  38. package/_cjs/chains/definitions/pgn.js +0 -3
  39. package/_cjs/chains/definitions/pgn.js.map +1 -1
  40. package/_cjs/chains/definitions/pgnTestnet.js +0 -3
  41. package/_cjs/chains/definitions/pgnTestnet.js.map +1 -1
  42. package/_cjs/chains/definitions/rootstock.js +0 -1
  43. package/_cjs/chains/definitions/rootstock.js.map +1 -1
  44. package/_cjs/chains/definitions/sapphire.js +0 -4
  45. package/_cjs/chains/definitions/sapphire.js.map +1 -1
  46. package/_cjs/chains/definitions/sapphireTestnet.js +0 -4
  47. package/_cjs/chains/definitions/sapphireTestnet.js.map +1 -1
  48. package/_cjs/chains/definitions/shibarium.js +0 -3
  49. package/_cjs/chains/definitions/shibarium.js.map +1 -1
  50. package/_cjs/chains/definitions/shimmer.js +0 -3
  51. package/_cjs/chains/definitions/shimmer.js.map +1 -1
  52. package/_cjs/chains/definitions/shimmerTestnet.js +0 -3
  53. package/_cjs/chains/definitions/shimmerTestnet.js.map +1 -1
  54. package/_cjs/chains/definitions/taikoJolnir.js +2 -2
  55. package/_cjs/chains/definitions/taikoJolnir.js.map +1 -1
  56. package/_cjs/chains/definitions/tenet.js +0 -1
  57. package/_cjs/chains/definitions/tenet.js.map +1 -1
  58. package/_cjs/chains/definitions/zilliqa.js +0 -3
  59. package/_cjs/chains/definitions/zilliqa.js.map +1 -1
  60. package/_cjs/chains/definitions/zilliqaTestnet.js +0 -3
  61. package/_cjs/chains/definitions/zilliqaTestnet.js.map +1 -1
  62. package/_cjs/chains/definitions/zkSyncSepoliaTestnet.js +0 -4
  63. package/_cjs/chains/definitions/zkSyncSepoliaTestnet.js.map +1 -1
  64. package/_cjs/chains/definitions/zkSyncTestnet.js +0 -4
  65. package/_cjs/chains/definitions/zkSyncTestnet.js.map +1 -1
  66. package/_cjs/chains/definitions/zoraSepolia.js +0 -4
  67. package/_cjs/chains/definitions/zoraSepolia.js.map +1 -1
  68. package/_cjs/errors/version.js +1 -1
  69. package/_esm/actions/public/getFilterChanges.js +3 -2
  70. package/_esm/actions/public/getFilterChanges.js.map +1 -1
  71. package/_esm/actions/public/getFilterLogs.js +3 -2
  72. package/_esm/actions/public/getFilterLogs.js.map +1 -1
  73. package/_esm/actions/public/getLogs.js +3 -2
  74. package/_esm/actions/public/getLogs.js.map +1 -1
  75. package/_esm/actions/public/verifyTypedData.js +2 -1
  76. package/_esm/actions/public/verifyTypedData.js.map +1 -1
  77. package/_esm/chains/celo/formatters.js +0 -10
  78. package/_esm/chains/celo/formatters.js.map +1 -1
  79. package/_esm/chains/definitions/astar.js +0 -1
  80. package/_esm/chains/definitions/astar.js.map +1 -1
  81. package/_esm/chains/definitions/astarZkatana.js +0 -6
  82. package/_esm/chains/definitions/astarZkatana.js.map +1 -1
  83. package/_esm/chains/definitions/baseSepolia.js +0 -3
  84. package/_esm/chains/definitions/baseSepolia.js.map +1 -1
  85. package/_esm/chains/definitions/bscTestnet.js +0 -1
  86. package/_esm/chains/definitions/bscTestnet.js.map +1 -1
  87. package/_esm/chains/definitions/confluxESpaceTestnet.js +0 -4
  88. package/_esm/chains/definitions/confluxESpaceTestnet.js.map +1 -1
  89. package/_esm/chains/definitions/fantomSonicTestnet.js +0 -1
  90. package/_esm/chains/definitions/fantomSonicTestnet.js.map +1 -1
  91. package/_esm/chains/definitions/kava.js +0 -1
  92. package/_esm/chains/definitions/kava.js.map +1 -1
  93. package/_esm/chains/definitions/kavaTestnet.js +0 -1
  94. package/_esm/chains/definitions/kavaTestnet.js.map +1 -1
  95. package/_esm/chains/definitions/klaytnBaobab.js +0 -1
  96. package/_esm/chains/definitions/klaytnBaobab.js.map +1 -1
  97. package/_esm/chains/definitions/lukso.js +0 -4
  98. package/_esm/chains/definitions/lukso.js.map +1 -1
  99. package/_esm/chains/definitions/manta.js +0 -1
  100. package/_esm/chains/definitions/manta.js.map +1 -1
  101. package/_esm/chains/definitions/mantaTestnet.js +0 -1
  102. package/_esm/chains/definitions/mantaTestnet.js.map +1 -1
  103. package/_esm/chains/definitions/neonMainnet.js +0 -3
  104. package/_esm/chains/definitions/neonMainnet.js.map +1 -1
  105. package/_esm/chains/definitions/pgn.js +0 -3
  106. package/_esm/chains/definitions/pgn.js.map +1 -1
  107. package/_esm/chains/definitions/pgnTestnet.js +0 -3
  108. package/_esm/chains/definitions/pgnTestnet.js.map +1 -1
  109. package/_esm/chains/definitions/rootstock.js +0 -1
  110. package/_esm/chains/definitions/rootstock.js.map +1 -1
  111. package/_esm/chains/definitions/sapphire.js +0 -4
  112. package/_esm/chains/definitions/sapphire.js.map +1 -1
  113. package/_esm/chains/definitions/sapphireTestnet.js +0 -4
  114. package/_esm/chains/definitions/sapphireTestnet.js.map +1 -1
  115. package/_esm/chains/definitions/shibarium.js +0 -3
  116. package/_esm/chains/definitions/shibarium.js.map +1 -1
  117. package/_esm/chains/definitions/shimmer.js +0 -3
  118. package/_esm/chains/definitions/shimmer.js.map +1 -1
  119. package/_esm/chains/definitions/shimmerTestnet.js +0 -3
  120. package/_esm/chains/definitions/shimmerTestnet.js.map +1 -1
  121. package/_esm/chains/definitions/taikoJolnir.js +2 -2
  122. package/_esm/chains/definitions/taikoJolnir.js.map +1 -1
  123. package/_esm/chains/definitions/tenet.js +0 -1
  124. package/_esm/chains/definitions/tenet.js.map +1 -1
  125. package/_esm/chains/definitions/zilliqa.js +0 -3
  126. package/_esm/chains/definitions/zilliqa.js.map +1 -1
  127. package/_esm/chains/definitions/zilliqaTestnet.js +0 -3
  128. package/_esm/chains/definitions/zilliqaTestnet.js.map +1 -1
  129. package/_esm/chains/definitions/zkSyncSepoliaTestnet.js +0 -4
  130. package/_esm/chains/definitions/zkSyncSepoliaTestnet.js.map +1 -1
  131. package/_esm/chains/definitions/zkSyncTestnet.js +0 -4
  132. package/_esm/chains/definitions/zkSyncTestnet.js.map +1 -1
  133. package/_esm/chains/definitions/zoraSepolia.js +0 -4
  134. package/_esm/chains/definitions/zoraSepolia.js.map +1 -1
  135. package/_esm/errors/version.js +1 -1
  136. package/_types/actions/public/getFilterChanges.d.ts.map +1 -1
  137. package/_types/actions/public/verifyTypedData.d.ts +2 -4
  138. package/_types/actions/public/verifyTypedData.d.ts.map +1 -1
  139. package/_types/chains/celo/chainConfig.d.ts +180 -203
  140. package/_types/chains/celo/chainConfig.d.ts.map +1 -1
  141. package/_types/chains/celo/formatters.d.ts +181 -204
  142. package/_types/chains/celo/formatters.d.ts.map +1 -1
  143. package/_types/chains/celo/index.d.ts +1 -1
  144. package/_types/chains/celo/index.d.ts.map +1 -1
  145. package/_types/chains/celo/types.d.ts +2 -14
  146. package/_types/chains/celo/types.d.ts.map +1 -1
  147. package/_types/chains/definitions/astar.d.ts +0 -3
  148. package/_types/chains/definitions/astar.d.ts.map +1 -1
  149. package/_types/chains/definitions/astarZkatana.d.ts +0 -3
  150. package/_types/chains/definitions/astarZkatana.d.ts.map +1 -1
  151. package/_types/chains/definitions/base.d.ts +136 -136
  152. package/_types/chains/definitions/baseGoerli.d.ts +136 -136
  153. package/_types/chains/definitions/baseSepolia.d.ts +136 -139
  154. package/_types/chains/definitions/baseSepolia.d.ts.map +1 -1
  155. package/_types/chains/definitions/bscTestnet.d.ts +0 -3
  156. package/_types/chains/definitions/bscTestnet.d.ts.map +1 -1
  157. package/_types/chains/definitions/celo.d.ts +180 -203
  158. package/_types/chains/definitions/celo.d.ts.map +1 -1
  159. package/_types/chains/definitions/celoAlfajores.d.ts +180 -203
  160. package/_types/chains/definitions/celoAlfajores.d.ts.map +1 -1
  161. package/_types/chains/definitions/celoCannoli.d.ts +180 -203
  162. package/_types/chains/definitions/celoCannoli.d.ts.map +1 -1
  163. package/_types/chains/definitions/confluxESpaceTestnet.d.ts +0 -4
  164. package/_types/chains/definitions/confluxESpaceTestnet.d.ts.map +1 -1
  165. package/_types/chains/definitions/fantomSonicTestnet.d.ts +0 -3
  166. package/_types/chains/definitions/fantomSonicTestnet.d.ts.map +1 -1
  167. package/_types/chains/definitions/kava.d.ts +0 -3
  168. package/_types/chains/definitions/kava.d.ts.map +1 -1
  169. package/_types/chains/definitions/kavaTestnet.d.ts +0 -3
  170. package/_types/chains/definitions/kavaTestnet.d.ts.map +1 -1
  171. package/_types/chains/definitions/klaytnBaobab.d.ts +0 -3
  172. package/_types/chains/definitions/klaytnBaobab.d.ts.map +1 -1
  173. package/_types/chains/definitions/lukso.d.ts +0 -4
  174. package/_types/chains/definitions/lukso.d.ts.map +1 -1
  175. package/_types/chains/definitions/manta.d.ts +0 -3
  176. package/_types/chains/definitions/manta.d.ts.map +1 -1
  177. package/_types/chains/definitions/mantaTestnet.d.ts +0 -3
  178. package/_types/chains/definitions/mantaTestnet.d.ts.map +1 -1
  179. package/_types/chains/definitions/neonMainnet.d.ts +0 -3
  180. package/_types/chains/definitions/neonMainnet.d.ts.map +1 -1
  181. package/_types/chains/definitions/optimism.d.ts +136 -136
  182. package/_types/chains/definitions/optimismGoerli.d.ts +136 -136
  183. package/_types/chains/definitions/optimismSepolia.d.ts +136 -136
  184. package/_types/chains/definitions/pgn.d.ts +136 -139
  185. package/_types/chains/definitions/pgn.d.ts.map +1 -1
  186. package/_types/chains/definitions/pgnTestnet.d.ts +136 -139
  187. package/_types/chains/definitions/pgnTestnet.d.ts.map +1 -1
  188. package/_types/chains/definitions/rootstock.d.ts +0 -3
  189. package/_types/chains/definitions/rootstock.d.ts.map +1 -1
  190. package/_types/chains/definitions/sapphire.d.ts +0 -4
  191. package/_types/chains/definitions/sapphire.d.ts.map +1 -1
  192. package/_types/chains/definitions/sapphireTestnet.d.ts +0 -4
  193. package/_types/chains/definitions/sapphireTestnet.d.ts.map +1 -1
  194. package/_types/chains/definitions/shibarium.d.ts +0 -3
  195. package/_types/chains/definitions/shibarium.d.ts.map +1 -1
  196. package/_types/chains/definitions/shimmer.d.ts +0 -3
  197. package/_types/chains/definitions/shimmer.d.ts.map +1 -1
  198. package/_types/chains/definitions/shimmerTestnet.d.ts +0 -3
  199. package/_types/chains/definitions/shimmerTestnet.d.ts.map +1 -1
  200. package/_types/chains/definitions/taikoJolnir.d.ts +2 -2
  201. package/_types/chains/definitions/tenet.d.ts +0 -3
  202. package/_types/chains/definitions/tenet.d.ts.map +1 -1
  203. package/_types/chains/definitions/zilliqa.d.ts +0 -3
  204. package/_types/chains/definitions/zilliqa.d.ts.map +1 -1
  205. package/_types/chains/definitions/zilliqaTestnet.d.ts +0 -3
  206. package/_types/chains/definitions/zilliqaTestnet.d.ts.map +1 -1
  207. package/_types/chains/definitions/zkSync.d.ts +24 -24
  208. package/_types/chains/definitions/zkSyncSepoliaTestnet.d.ts +24 -28
  209. package/_types/chains/definitions/zkSyncSepoliaTestnet.d.ts.map +1 -1
  210. package/_types/chains/definitions/zkSyncTestnet.d.ts +24 -28
  211. package/_types/chains/definitions/zkSyncTestnet.d.ts.map +1 -1
  212. package/_types/chains/definitions/zora.d.ts +136 -136
  213. package/_types/chains/definitions/zoraSepolia.d.ts +136 -140
  214. package/_types/chains/definitions/zoraSepolia.d.ts.map +1 -1
  215. package/_types/chains/definitions/zoraTestnet.d.ts +136 -136
  216. package/_types/chains/index.d.ts +1 -1
  217. package/_types/chains/index.d.ts.map +1 -1
  218. package/_types/chains/opStack/chainConfig.d.ts +136 -136
  219. package/_types/chains/opStack/formatters.d.ts +136 -136
  220. package/_types/chains/zksync/chainConfig.d.ts +24 -24
  221. package/_types/chains/zksync/formatters.d.ts +24 -24
  222. package/_types/errors/version.d.ts +1 -1
  223. package/_types/utils/formatters/transaction.d.ts +1 -1
  224. package/_types/utils/formatters/transactionRequest.d.ts +1 -1
  225. package/actions/public/getFilterChanges.ts +3 -5
  226. package/actions/public/getFilterLogs.ts +3 -3
  227. package/actions/public/getLogs.ts +3 -3
  228. package/actions/public/verifyTypedData.ts +13 -8
  229. package/chains/celo/formatters.ts +0 -14
  230. package/chains/celo/index.ts +0 -4
  231. package/chains/celo/types.ts +0 -18
  232. package/chains/definitions/astar.ts +0 -1
  233. package/chains/definitions/astarZkatana.ts +0 -6
  234. package/chains/definitions/baseSepolia.ts +0 -3
  235. package/chains/definitions/bscTestnet.ts +0 -1
  236. package/chains/definitions/confluxESpaceTestnet.ts +0 -4
  237. package/chains/definitions/fantomSonicTestnet.ts +0 -1
  238. package/chains/definitions/kava.ts +0 -1
  239. package/chains/definitions/kavaTestnet.ts +0 -1
  240. package/chains/definitions/klaytnBaobab.ts +0 -1
  241. package/chains/definitions/lukso.ts +0 -4
  242. package/chains/definitions/manta.ts +0 -1
  243. package/chains/definitions/mantaTestnet.ts +0 -1
  244. package/chains/definitions/neonMainnet.ts +0 -3
  245. package/chains/definitions/pgn.ts +0 -3
  246. package/chains/definitions/pgnTestnet.ts +0 -3
  247. package/chains/definitions/rootstock.ts +0 -1
  248. package/chains/definitions/sapphire.ts +0 -4
  249. package/chains/definitions/sapphireTestnet.ts +0 -4
  250. package/chains/definitions/shibarium.ts +0 -3
  251. package/chains/definitions/shimmer.ts +0 -3
  252. package/chains/definitions/shimmerTestnet.ts +0 -3
  253. package/chains/definitions/taikoJolnir.ts +2 -2
  254. package/chains/definitions/tenet.ts +0 -1
  255. package/chains/definitions/zilliqa.ts +0 -3
  256. package/chains/definitions/zilliqaTestnet.ts +0 -3
  257. package/chains/definitions/zkSyncSepoliaTestnet.ts +0 -4
  258. package/chains/definitions/zkSyncTestnet.ts +0 -4
  259. package/chains/definitions/zoraSepolia.ts +0 -4
  260. package/chains/index.ts +8 -1
  261. package/errors/version.ts +1 -1
  262. package/package.json +34 -12
@@ -200,18 +200,18 @@ export async function getLogs<
200
200
  })
201
201
  }
202
202
 
203
+ const formattedLogs = logs.map((log) => formatLog(log))
203
204
  if (!events)
204
- return logs.map((log) => formatLog(log)) as GetLogsReturnType<
205
+ return formattedLogs as GetLogsReturnType<
205
206
  TAbiEvent,
206
207
  TAbiEvents,
207
208
  TStrict,
208
209
  TFromBlock,
209
210
  TToBlock
210
211
  >
211
-
212
212
  return parseEventLogs({
213
213
  abi: events,
214
- logs,
214
+ logs: formattedLogs,
215
215
  strict,
216
216
  }) as unknown as GetLogsReturnType<
217
217
  TAbiEvent,
@@ -17,10 +17,10 @@ import {
17
17
  } from './verifyHash.js'
18
18
 
19
19
  export type VerifyTypedDataParameters<
20
- TTypedData extends TypedData | { [key: string]: unknown } = TypedData,
21
- TPrimaryType extends string = string,
20
+ typedData extends TypedData | Record<string, unknown> = TypedData,
21
+ primaryType extends keyof typedData | 'EIP712Domain' = keyof typedData,
22
22
  > = Omit<VerifyHashParameters, 'hash'> &
23
- TypedDataDefinition<TTypedData, TPrimaryType> & {
23
+ TypedDataDefinition<typedData, primaryType> & {
24
24
  /** The address to verify the typed data for. */
25
25
  address: Address
26
26
  /** The signature to verify */
@@ -43,9 +43,15 @@ export type VerifyTypedDataErrorType =
43
43
  * @param parameters - {@link VerifyTypedDataParameters}
44
44
  * @returns Whether or not the signature is valid. {@link VerifyTypedDataReturnType}
45
45
  */
46
- export async function verifyTypedData<TChain extends Chain | undefined>(
47
- client: Client<Transport, TChain>,
48
- {
46
+ export async function verifyTypedData<
47
+ const typedData extends TypedData | Record<string, unknown>,
48
+ primaryType extends keyof typedData | 'EIP712Domain',
49
+ chain extends Chain | undefined,
50
+ >(
51
+ client: Client<Transport, chain>,
52
+ parameters: VerifyTypedDataParameters<typedData, primaryType>,
53
+ ): Promise<VerifyTypedDataReturnType> {
54
+ const {
49
55
  address,
50
56
  signature,
51
57
  message,
@@ -53,8 +59,7 @@ export async function verifyTypedData<TChain extends Chain | undefined>(
53
59
  types,
54
60
  domain,
55
61
  ...callRequest
56
- }: VerifyTypedDataParameters,
57
- ): Promise<VerifyTypedDataReturnType> {
62
+ } = parameters as VerifyTypedDataParameters
58
63
  const hash = hashTypedData({ message, primaryType, types, domain })
59
64
  return verifyHash(client, {
60
65
  address,
@@ -8,15 +8,12 @@ import {
8
8
  defineTransaction,
9
9
  formatTransaction,
10
10
  } from '../../utils/formatters/transaction.js'
11
- import { defineTransactionReceipt } from '../../utils/formatters/transactionReceipt.js'
12
11
  import { defineTransactionRequest } from '../../utils/formatters/transactionRequest.js'
13
12
  import type {
14
13
  CeloBlockOverrides,
15
14
  CeloRpcTransaction,
16
- CeloRpcTransactionReceiptOverrides,
17
15
  CeloRpcTransactionRequest,
18
16
  CeloTransaction,
19
- CeloTransactionReceiptOverrides,
20
17
  CeloTransactionRequest,
21
18
  } from './types.js'
22
19
  import { isCIP42, isCIP64 } from './utils.js'
@@ -69,17 +66,6 @@ export const formatters = {
69
66
  return transaction
70
67
  },
71
68
  }),
72
- transactionReceipt: /*#__PURE__*/ defineTransactionReceipt({
73
- format(
74
- args: CeloRpcTransactionReceiptOverrides,
75
- ): CeloTransactionReceiptOverrides {
76
- return {
77
- feeCurrency: args.feeCurrency,
78
- gatewayFee: args.gatewayFee ? hexToBigInt(args.gatewayFee) : null,
79
- gatewayFeeRecipient: args.gatewayFeeRecipient,
80
- }
81
- },
82
- }),
83
69
 
84
70
  transactionRequest: /*#__PURE__*/ defineTransactionRequest({
85
71
  format(args: CeloTransactionRequest): CeloRpcTransactionRequest {
@@ -10,12 +10,8 @@ export type {
10
10
  CeloRpcBlock,
11
11
  CeloRpcBlockOverrides,
12
12
  CeloRpcTransaction,
13
- CeloRpcTransactionReceipt,
14
- CeloRpcTransactionReceiptOverrides,
15
13
  CeloRpcTransactionRequest,
16
14
  CeloTransaction,
17
- CeloTransactionReceipt,
18
- CeloTransactionReceiptOverrides,
19
15
  CeloTransactionRequest,
20
16
  CeloTransactionSerializable,
21
17
  CeloTransactionSerialized,
@@ -8,7 +8,6 @@ import type {
8
8
  Quantity,
9
9
  RpcBlock,
10
10
  RpcTransaction as RpcTransaction_,
11
- RpcTransactionReceipt,
12
11
  RpcTransactionRequest as RpcTransactionRequest_,
13
12
  TransactionType,
14
13
  } from '../../types/rpc.js'
@@ -16,7 +15,6 @@ import type {
16
15
  AccessList,
17
16
  Transaction as Transaction_,
18
17
  TransactionBase,
19
- TransactionReceipt,
20
18
  TransactionRequest as TransactionRequest_,
21
19
  TransactionRequestBase,
22
20
  TransactionSerializable,
@@ -76,14 +74,6 @@ export type CeloRpcTransaction<TPending extends boolean = boolean> =
76
74
  | RpcTransactionCIP42<TPending>
77
75
  | RpcTransactionCIP64<TPending>
78
76
 
79
- export type CeloRpcTransactionReceiptOverrides = {
80
- feeCurrency: Address | null
81
- gatewayFee: Hex | null
82
- gatewayFeeRecipient: Address | null
83
- }
84
- export type CeloRpcTransactionReceipt = RpcTransactionReceipt &
85
- CeloRpcTransactionReceiptOverrides
86
-
87
77
  export type CeloRpcTransactionRequest =
88
78
  | RpcTransactionRequest
89
79
  | RpcTransactionRequestCIP42
@@ -94,14 +84,6 @@ export type CeloTransaction<TPending extends boolean = boolean> =
94
84
  | TransactionCIP42<TPending>
95
85
  | TransactionCIP64<TPending>
96
86
 
97
- export type CeloTransactionReceiptOverrides = {
98
- feeCurrency: Address | null
99
- gatewayFee: bigint | null
100
- gatewayFeeRecipient: Address | null
101
- }
102
- export type CeloTransactionReceipt = TransactionReceipt &
103
- CeloTransactionReceiptOverrides
104
-
105
87
  export type CeloTransactionRequest =
106
88
  | TransactionRequest
107
89
  | TransactionRequestCIP42
@@ -10,7 +10,6 @@ export const astar = /*#__PURE__*/ defineChain({
10
10
  decimals: 18,
11
11
  },
12
12
  rpcUrls: {
13
- public: { http: ['https://astar.api.onfinality.io/public'] },
14
13
  default: { http: ['https://astar.api.onfinality.io/public'] },
15
14
  },
16
15
  blockExplorers: {
@@ -12,12 +12,6 @@ export const astarZkatana = /*#__PURE__*/ defineChain({
12
12
  'https://rpc.startale.com/zkatana',
13
13
  ],
14
14
  },
15
- public: {
16
- http: [
17
- 'https://rpc.zkatana.gelato.digital',
18
- 'https://rpc.startale.com/zkatana',
19
- ],
20
- },
21
15
  },
22
16
  blockExplorers: {
23
17
  blockscout: {
@@ -13,9 +13,6 @@ export const baseSepolia = /*#__PURE__*/ defineChain({
13
13
  default: {
14
14
  http: ['https://sepolia.base.org'],
15
15
  },
16
- public: {
17
- http: ['https://sepolia.base.org'],
18
- },
19
16
  },
20
17
  blockExplorers: {
21
18
  blockscout: {
@@ -10,7 +10,6 @@ export const bscTestnet = /*#__PURE__*/ defineChain({
10
10
  },
11
11
  rpcUrls: {
12
12
  default: { http: ['https://data-seed-prebsc-1-s1.bnbchain.org:8545'] },
13
- public: { http: ['https://data-seed-prebsc-1-s1.bnbchain.org:8545'] },
14
13
  },
15
14
  blockExplorers: {
16
15
  default: { name: 'BscScan', url: 'https://testnet.bscscan.com' },
@@ -11,10 +11,6 @@ export const confluxESpaceTestnet = /*#__PURE__*/ defineChain({
11
11
  http: ['https://evmtestnet.confluxrpc.org'],
12
12
  webSocket: ['wss://evmtestnet.confluxrpc.org/ws'],
13
13
  },
14
- public: {
15
- http: ['https://evmtestnet.confluxrpc.org'],
16
- webSocket: ['wss://evmtestnet.confluxrpc.org/ws'],
17
- },
18
14
  },
19
15
  blockExplorers: {
20
16
  default: {
@@ -11,7 +11,6 @@ export const fantomSonicTestnet = /*#__PURE__*/ defineChain({
11
11
  },
12
12
  rpcUrls: {
13
13
  default: { http: ['https://rpcapi.sonic.fantom.network'] },
14
- public: { http: ['https://rpcapi.sonic.fantom.network'] },
15
14
  },
16
15
  blockExplorers: {
17
16
  default: {
@@ -10,7 +10,6 @@ export const kava = /*#__PURE__*/ defineChain({
10
10
  decimals: 18,
11
11
  },
12
12
  rpcUrls: {
13
- public: { http: ['https://evm.kava.io'] },
14
13
  default: { http: ['https://evm.kava.io'] },
15
14
  },
16
15
  blockExplorers: {
@@ -10,7 +10,6 @@ export const kavaTestnet = /*#__PURE__*/ defineChain({
10
10
  decimals: 18,
11
11
  },
12
12
  rpcUrls: {
13
- public: { http: ['https://evm.testnet.kava.io'] },
14
13
  default: { http: ['https://evm.testnet.kava.io'] },
15
14
  },
16
15
  blockExplorers: {
@@ -11,7 +11,6 @@ export const klaytnBaobab = /*#__PURE__*/ defineChain({
11
11
  },
12
12
  rpcUrls: {
13
13
  default: { http: ['https://public-en-baobab.klaytn.net'] },
14
- public: { http: ['https://public-en-baobab.klaytn.net'] },
15
14
  },
16
15
  blockExplorers: {
17
16
  etherscan: { name: 'KlaytnScope', url: 'https://baobab.klaytnscope.com' },
@@ -14,10 +14,6 @@ export const lukso = /*#__PURE__*/ defineChain({
14
14
  http: ['https://rpc.mainnet.lukso.network'],
15
15
  webSocket: ['wss://ws-rpc.mainnet.lukso.network'],
16
16
  },
17
- public: {
18
- http: ['https://rpc.mainnet.lukso.network'],
19
- webSocket: ['wss://ws-rpc.mainnet.lukso.network'],
20
- },
21
17
  },
22
18
  blockExplorers: {
23
19
  default: {
@@ -11,7 +11,6 @@ export const manta = /*#__PURE__*/ defineChain({
11
11
  },
12
12
  rpcUrls: {
13
13
  default: { http: ['https://pacific-rpc.manta.network/http'] },
14
- public: { http: ['https://pacific-rpc.manta.network/http'] },
15
14
  },
16
15
  blockExplorers: {
17
16
  etherscan: {
@@ -11,7 +11,6 @@ export const mantaTestnet = /*#__PURE__*/ defineChain({
11
11
  },
12
12
  rpcUrls: {
13
13
  default: { http: ['https://manta-testnet.calderachain.xyz/http'] },
14
- public: { http: ['https://manta-testnet.calderachain.xyz/http'] },
15
14
  },
16
15
  blockExplorers: {
17
16
  etherscan: {
@@ -9,9 +9,6 @@ export const neonMainnet = /*#__PURE__*/ defineChain({
9
9
  default: {
10
10
  http: ['https://neon-proxy-mainnet.solana.p2p.org'],
11
11
  },
12
- public: {
13
- http: ['https://neon-proxy-mainnet.solana.p2p.org'],
14
- },
15
12
  },
16
13
  blockExplorers: {
17
14
  default: {
@@ -12,9 +12,6 @@ export const pgn = /*#__PURE__*/ defineChain({
12
12
  default: {
13
13
  http: ['https://rpc.publicgoods.network'],
14
14
  },
15
- public: {
16
- http: ['https://rpc.publicgoods.network'],
17
- },
18
15
  },
19
16
  blockExplorers: {
20
17
  default: {
@@ -12,9 +12,6 @@ export const pgnTestnet = /*#__PURE__*/ defineChain({
12
12
  default: {
13
13
  http: ['https://sepolia.publicgoods.network'],
14
14
  },
15
- public: {
16
- http: ['https://sepolia.publicgoods.network'],
17
- },
18
15
  },
19
16
  blockExplorers: {
20
17
  default: {
@@ -10,7 +10,6 @@ export const rootstock = /*#__PURE__*/ defineChain({
10
10
  symbol: 'RBTC',
11
11
  },
12
12
  rpcUrls: {
13
- public: { http: ['https://public-node.rsk.co'] },
14
13
  default: { http: ['https://public-node.rsk.co'] },
15
14
  },
16
15
  blockExplorers: {
@@ -10,10 +10,6 @@ export const sapphire = /*#__PURE__*/ defineChain({
10
10
  http: ['https://sapphire.oasis.io'],
11
11
  webSocket: ['wss://sapphire.oasis.io/ws'],
12
12
  },
13
- public: {
14
- http: ['https://sapphire.oasis.io'],
15
- webSocket: ['wss://sapphire.oasis.io/ws'],
16
- },
17
13
  },
18
14
  blockExplorers: {
19
15
  default: {
@@ -10,10 +10,6 @@ export const sapphireTestnet = /*#__PURE__*/ defineChain({
10
10
  http: ['https://testnet.sapphire.oasis.dev'],
11
11
  webSocket: ['wss://testnet.sapphire.oasis.dev/ws'],
12
12
  },
13
- public: {
14
- http: ['https://testnet.sapphire.oasis.dev'],
15
- webSocket: ['wss://testnet.sapphire.oasis.dev/ws'],
16
- },
17
13
  },
18
14
  blockExplorers: {
19
15
  default: {
@@ -9,9 +9,6 @@ export const shibarium = /*#__PURE__*/ defineChain({
9
9
  default: {
10
10
  http: ['https://rpc.shibrpc.com'],
11
11
  },
12
- public: {
13
- http: ['https://rpc.shibrpc.com'],
14
- },
15
12
  },
16
13
  blockExplorers: {
17
14
  etherscan: {
@@ -10,9 +10,6 @@ export const shimmer = /*#__PURE__*/ defineChain({
10
10
  symbol: 'SMR',
11
11
  },
12
12
  rpcUrls: {
13
- public: {
14
- http: ['https://json-rpc.evm.shimmer.network'],
15
- },
16
13
  default: {
17
14
  http: ['https://json-rpc.evm.shimmer.network'],
18
15
  },
@@ -10,9 +10,6 @@ export const shimmerTestnet = /*#__PURE__*/ defineChain({
10
10
  symbol: 'SMR',
11
11
  },
12
12
  rpcUrls: {
13
- public: {
14
- http: ['https://json-rpc.evm.testnet.shimmer.network'],
15
- },
16
13
  default: {
17
14
  http: ['https://json-rpc.evm.testnet.shimmer.network'],
18
15
  },
@@ -2,11 +2,11 @@ import { defineChain } from '../../utils/chain/defineChain.js'
2
2
 
3
3
  export const taikoJolnir = /*#__PURE__*/ defineChain({
4
4
  id: 167007,
5
- name: 'Taiko Jolnir L2',
5
+ name: 'Taiko Jolnir (Alpha-5 Testnet)',
6
6
  nativeCurrency: { name: 'Ether', symbol: 'ETH', decimals: 18 },
7
7
  rpcUrls: {
8
8
  default: {
9
- http: ['https://jolnir.taiko.xyz'],
9
+ http: ['https://rpc.jolnir.taiko.xyz'],
10
10
  },
11
11
  },
12
12
  blockExplorers: {
@@ -10,7 +10,6 @@ export const tenet = /*#__PURE__*/ defineChain({
10
10
  decimals: 18,
11
11
  },
12
12
  rpcUrls: {
13
- public: { http: ['https://rpc.tenet.org'] },
14
13
  default: { http: ['https://rpc.tenet.org'] },
15
14
  },
16
15
  blockExplorers: {
@@ -9,9 +9,6 @@ export const zilliqa = /*#__PURE__*/ defineChain({
9
9
  default: {
10
10
  http: ['https://api.zilliqa.com'],
11
11
  },
12
- public: {
13
- http: ['https://api.zilliqa.com'],
14
- },
15
12
  },
16
13
  blockExplorers: {
17
14
  default: {
@@ -9,9 +9,6 @@ export const zilliqaTestnet = /*#__PURE__*/ defineChain({
9
9
  default: {
10
10
  http: ['https://dev-api.zilliqa.com'],
11
11
  },
12
- public: {
13
- http: ['https://dev-api.zilliqa.com'],
14
- },
15
12
  },
16
13
  blockExplorers: {
17
14
  default: {
@@ -12,10 +12,6 @@ export const zkSyncSepoliaTestnet = /*#__PURE__*/ defineChain({
12
12
  http: ['https://sepolia.era.zksync.dev'],
13
13
  webSocket: ['wss://sepolia.era.zksync.dev/ws'],
14
14
  },
15
- public: {
16
- http: ['https://sepolia.era.zksync.dev'],
17
- webSocket: ['wss://sepolia.era.zksync.dev/ws'],
18
- },
19
15
  },
20
16
  blockExplorers: {
21
17
  default: {
@@ -13,10 +13,6 @@ export const zkSyncTestnet = /*#__PURE__*/ defineChain({
13
13
  http: ['https://testnet.era.zksync.dev'],
14
14
  webSocket: ['wss://testnet.era.zksync.dev/ws'],
15
15
  },
16
- public: {
17
- http: ['https://testnet.era.zksync.dev'],
18
- webSocket: ['wss://testnet.era.zksync.dev/ws'],
19
- },
20
16
  },
21
17
  blockExplorers: {
22
18
  default: {
@@ -18,10 +18,6 @@ export const zoraSepolia = /*#__PURE__*/ defineChain({
18
18
  http: ['https://sepolia.rpc.zora.energy'],
19
19
  webSocket: ['wss://sepolia.rpc.zora.energy'],
20
20
  },
21
- public: {
22
- http: ['https://sepolia.rpc.zora.energy'],
23
- webSocket: ['wss://sepolia.rpc.zora.energy'],
24
- },
25
21
  },
26
22
  blockExplorers: {
27
23
  default: {
package/chains/index.ts CHANGED
@@ -174,9 +174,16 @@ export { zora } from './definitions/zora.js'
174
174
  export { zoraSepolia } from './definitions/zoraSepolia.js'
175
175
  export { zoraTestnet } from './definitions/zoraTestnet.js'
176
176
 
177
+ //////////////////////////////////////////////////////////////////////////////////////
177
178
  // required for type inference since in explicit return type
178
179
  //////////////////////////////////////////////////////////////////////////////////////
179
- export type { Assign, Omit, PartialBy, Prettify } from '../types/utils.js'
180
+ export type {
181
+ Assign,
182
+ Omit,
183
+ PartialBy,
184
+ Prettify,
185
+ UnionLooseOmit,
186
+ } from '../types/utils.js'
180
187
  export type {
181
188
  OpStackBlock,
182
189
  OpStackBlockOverrides,
package/errors/version.ts CHANGED
@@ -1 +1 @@
1
- export const version = '2.0.0-rc.0'
1
+ export const version = '2.0.0-rc.2'
package/package.json CHANGED
@@ -1,8 +1,7 @@
1
1
  {
2
2
  "name": "viem",
3
3
  "description": "TypeScript Interface for Ethereum",
4
- "version": "2.0.0-rc.0",
5
- "type": "module",
4
+ "version": "2.0.0-rc.2",
6
5
  "main": "./_cjs/index.js",
7
6
  "module": "./_esm/index.js",
8
7
  "types": "./_types/index.d.ts",
@@ -77,13 +76,27 @@
77
76
  },
78
77
  "typesVersions": {
79
78
  "*": {
80
- "accounts": ["./_types/accounts/index.d.ts"],
81
- "actions": ["./_types/actions/index.d.ts"],
82
- "chains": ["./_types/chains/index.d.ts"],
83
- "chains/utils": ["./_types/chains/utils.d.ts"],
84
- "ens": ["./_types/ens/index.d.ts"],
85
- "utils": ["./_types/utils/index.d.ts"],
86
- "window": ["./_types/window/index.d.ts"]
79
+ "accounts": [
80
+ "./_types/accounts/index.d.ts"
81
+ ],
82
+ "actions": [
83
+ "./_types/actions/index.d.ts"
84
+ ],
85
+ "chains": [
86
+ "./_types/chains/index.d.ts"
87
+ ],
88
+ "chains/utils": [
89
+ "./_types/chains/utils.d.ts"
90
+ ],
91
+ "ens": [
92
+ "./_types/ens/index.d.ts"
93
+ ],
94
+ "utils": [
95
+ "./_types/utils/index.d.ts"
96
+ ],
97
+ "window": [
98
+ "./_types/window/index.d.ts"
99
+ ]
87
100
  }
88
101
  },
89
102
  "peerDependencies": {
@@ -107,12 +120,21 @@
107
120
  "license": "MIT",
108
121
  "homepage": "https://viem.sh",
109
122
  "repository": "wevm/viem",
110
- "authors": ["awkweb.eth", "jxom.eth"],
123
+ "authors": [
124
+ "awkweb.eth",
125
+ "jxom.eth"
126
+ ],
111
127
  "funding": [
112
128
  {
113
129
  "type": "github",
114
130
  "url": "https://github.com/sponsors/wevm"
115
131
  }
116
132
  ],
117
- "keywords": ["eth", "ethereum", "dapps", "wallet", "web3"]
118
- }
133
+ "keywords": [
134
+ "eth",
135
+ "ethereum",
136
+ "dapps",
137
+ "wallet",
138
+ "web3"
139
+ ]
140
+ }