viem 2.13.6 → 2.13.7

Sign up to get free protection for your applications and to get access to all the features.
Files changed (399) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/README.md +0 -6
  3. package/_cjs/celo/fees.js.map +1 -1
  4. package/_cjs/celo/formatters.js.map +1 -1
  5. package/_cjs/celo/serializers.js.map +1 -1
  6. package/_cjs/chains/definitions/defichainEvm.js +1 -1
  7. package/_cjs/chains/definitions/defichainEvm.js.map +1 -1
  8. package/_cjs/chains/definitions/defichainEvmTestnet.js +1 -1
  9. package/_cjs/chains/definitions/defichainEvmTestnet.js.map +1 -1
  10. package/_cjs/clients/transports/fallback.js.map +1 -1
  11. package/_cjs/errors/version.js +1 -1
  12. package/_cjs/index.js +2 -1
  13. package/_cjs/index.js.map +1 -1
  14. package/_cjs/utils/index.js +4 -3
  15. package/_cjs/utils/index.js.map +1 -1
  16. package/_cjs/utils/transaction/parseTransaction.js.map +1 -1
  17. package/_cjs/zksync/actions/sendTransaction.js.map +1 -1
  18. package/_esm/celo/fees.js.map +1 -1
  19. package/_esm/celo/formatters.js.map +1 -1
  20. package/_esm/celo/serializers.js.map +1 -1
  21. package/_esm/chains/definitions/defichainEvm.js +1 -1
  22. package/_esm/chains/definitions/defichainEvm.js.map +1 -1
  23. package/_esm/chains/definitions/defichainEvmTestnet.js +1 -1
  24. package/_esm/chains/definitions/defichainEvmTestnet.js.map +1 -1
  25. package/_esm/clients/transports/fallback.js.map +1 -1
  26. package/_esm/errors/version.js +1 -1
  27. package/_esm/index.js +1 -1
  28. package/_esm/index.js.map +1 -1
  29. package/_esm/utils/index.js +1 -1
  30. package/_esm/utils/index.js.map +1 -1
  31. package/_esm/utils/transaction/parseTransaction.js.map +1 -1
  32. package/_esm/zksync/actions/sendTransaction.js.map +1 -1
  33. package/_types/celo/chainConfig.d.ts +682 -704
  34. package/_types/celo/chainConfig.d.ts.map +1 -1
  35. package/_types/celo/fees.d.ts.map +1 -1
  36. package/_types/celo/formatters.d.ts +341 -352
  37. package/_types/celo/formatters.d.ts.map +1 -1
  38. package/_types/celo/serializers.d.ts.map +1 -1
  39. package/_types/celo/types.d.ts +27 -27
  40. package/_types/celo/types.d.ts.map +1 -1
  41. package/_types/chains/definitions/acala.d.ts +2 -2
  42. package/_types/chains/definitions/ancient8.d.ts +192 -203
  43. package/_types/chains/definitions/ancient8.d.ts.map +1 -1
  44. package/_types/chains/definitions/ancient8Sepolia.d.ts +192 -203
  45. package/_types/chains/definitions/ancient8Sepolia.d.ts.map +1 -1
  46. package/_types/chains/definitions/anvil.d.ts +2 -2
  47. package/_types/chains/definitions/apexTestnet.d.ts +2 -2
  48. package/_types/chains/definitions/arbitrum.d.ts +2 -2
  49. package/_types/chains/definitions/arbitrumGoerli.d.ts +2 -2
  50. package/_types/chains/definitions/arbitrumNova.d.ts +2 -2
  51. package/_types/chains/definitions/arbitrumSepolia.d.ts +2 -2
  52. package/_types/chains/definitions/areonNetwork.d.ts +2 -2
  53. package/_types/chains/definitions/areonNetworkTestnet.d.ts +2 -2
  54. package/_types/chains/definitions/astar.d.ts +2 -2
  55. package/_types/chains/definitions/astarZkEVM.d.ts +2 -2
  56. package/_types/chains/definitions/astarZkyoto.d.ts +2 -2
  57. package/_types/chains/definitions/aurora.d.ts +2 -2
  58. package/_types/chains/definitions/auroraTestnet.d.ts +2 -2
  59. package/_types/chains/definitions/auroria.d.ts +2 -2
  60. package/_types/chains/definitions/avalanche.d.ts +2 -2
  61. package/_types/chains/definitions/avalancheFuji.d.ts +2 -2
  62. package/_types/chains/definitions/bahamut.d.ts +2 -2
  63. package/_types/chains/definitions/base.d.ts +192 -203
  64. package/_types/chains/definitions/base.d.ts.map +1 -1
  65. package/_types/chains/definitions/baseGoerli.d.ts +192 -203
  66. package/_types/chains/definitions/baseGoerli.d.ts.map +1 -1
  67. package/_types/chains/definitions/baseSepolia.d.ts +192 -203
  68. package/_types/chains/definitions/baseSepolia.d.ts.map +1 -1
  69. package/_types/chains/definitions/beam.d.ts +2 -2
  70. package/_types/chains/definitions/beamTestnet.d.ts +2 -2
  71. package/_types/chains/definitions/bearNetworkChainMainnet.d.ts +2 -2
  72. package/_types/chains/definitions/bearNetworkChainTestnet.d.ts +2 -2
  73. package/_types/chains/definitions/berachainTestnet.d.ts +2 -2
  74. package/_types/chains/definitions/bevmMainnet.d.ts +2 -2
  75. package/_types/chains/definitions/bitTorrent.d.ts +2 -2
  76. package/_types/chains/definitions/bitTorrentTestnet.d.ts +2 -2
  77. package/_types/chains/definitions/bitkub.d.ts +2 -2
  78. package/_types/chains/definitions/bitkubTestnet.d.ts +2 -2
  79. package/_types/chains/definitions/blast.d.ts +2 -2
  80. package/_types/chains/definitions/blastSepolia.d.ts +2 -2
  81. package/_types/chains/definitions/bob.d.ts +2 -2
  82. package/_types/chains/definitions/boba.d.ts +2 -2
  83. package/_types/chains/definitions/bronos.d.ts +2 -2
  84. package/_types/chains/definitions/bronosTestnet.d.ts +2 -2
  85. package/_types/chains/definitions/bsc.d.ts +2 -2
  86. package/_types/chains/definitions/bscGreenfield.d.ts +2 -2
  87. package/_types/chains/definitions/bscTestnet.d.ts +2 -2
  88. package/_types/chains/definitions/btr.d.ts +2 -2
  89. package/_types/chains/definitions/btrTestnet.d.ts +2 -2
  90. package/_types/chains/definitions/bxn.d.ts +2 -2
  91. package/_types/chains/definitions/bxnTestnet.d.ts +2 -2
  92. package/_types/chains/definitions/canto.d.ts +2 -2
  93. package/_types/chains/definitions/celo.d.ts +690 -712
  94. package/_types/chains/definitions/celo.d.ts.map +1 -1
  95. package/_types/chains/definitions/celoAlfajores.d.ts +690 -712
  96. package/_types/chains/definitions/celoAlfajores.d.ts.map +1 -1
  97. package/_types/chains/definitions/chiliz.d.ts +2 -2
  98. package/_types/chains/definitions/classic.d.ts +2 -2
  99. package/_types/chains/definitions/confluxESpace.d.ts +2 -2
  100. package/_types/chains/definitions/confluxESpaceTestnet.d.ts +2 -2
  101. package/_types/chains/definitions/coreDao.d.ts +2 -2
  102. package/_types/chains/definitions/cronos.d.ts +2 -2
  103. package/_types/chains/definitions/cronosTestnet.d.ts +2 -2
  104. package/_types/chains/definitions/crossbell.d.ts +2 -2
  105. package/_types/chains/definitions/cyber.d.ts +2 -2
  106. package/_types/chains/definitions/cyberTestnet.d.ts +2 -2
  107. package/_types/chains/definitions/darwinia.d.ts +2 -2
  108. package/_types/chains/definitions/defichainEvm.d.ts +3 -3
  109. package/_types/chains/definitions/defichainEvmTestnet.d.ts +3 -3
  110. package/_types/chains/definitions/degen.d.ts +2 -2
  111. package/_types/chains/definitions/dfk.d.ts +2 -2
  112. package/_types/chains/definitions/dodochainTestnet.d.ts +2 -2
  113. package/_types/chains/definitions/dogechain.d.ts +2 -2
  114. package/_types/chains/definitions/dreyerxMainnet.d.ts +2 -2
  115. package/_types/chains/definitions/edgeless.d.ts +2 -2
  116. package/_types/chains/definitions/edgelessTestnet.d.ts +2 -2
  117. package/_types/chains/definitions/edgeware.d.ts +2 -2
  118. package/_types/chains/definitions/edgewareTestnet.d.ts +2 -2
  119. package/_types/chains/definitions/ekta.d.ts +2 -2
  120. package/_types/chains/definitions/ektaTestnet.d.ts +2 -2
  121. package/_types/chains/definitions/eon.d.ts +2 -2
  122. package/_types/chains/definitions/eos.d.ts +2 -2
  123. package/_types/chains/definitions/eosTestnet.d.ts +2 -2
  124. package/_types/chains/definitions/etherlinkTestnet.d.ts +2 -2
  125. package/_types/chains/definitions/evmos.d.ts +2 -2
  126. package/_types/chains/definitions/evmosTestnet.d.ts +2 -2
  127. package/_types/chains/definitions/fantom.d.ts +2 -2
  128. package/_types/chains/definitions/fantomSonicTestnet.d.ts +2 -2
  129. package/_types/chains/definitions/fantomTestnet.d.ts +2 -2
  130. package/_types/chains/definitions/fibo.d.ts +2 -2
  131. package/_types/chains/definitions/filecoin.d.ts +2 -2
  132. package/_types/chains/definitions/filecoinCalibration.d.ts +2 -2
  133. package/_types/chains/definitions/filecoinHyperspace.d.ts +2 -2
  134. package/_types/chains/definitions/flare.d.ts +2 -2
  135. package/_types/chains/definitions/flareTestnet.d.ts +2 -2
  136. package/_types/chains/definitions/flowMainnet.d.ts +2 -2
  137. package/_types/chains/definitions/flowPreviewnet.d.ts +2 -2
  138. package/_types/chains/definitions/flowTestnet.d.ts +2 -2
  139. package/_types/chains/definitions/foundry.d.ts +2 -2
  140. package/_types/chains/definitions/fraxtal.d.ts +192 -203
  141. package/_types/chains/definitions/fraxtal.d.ts.map +1 -1
  142. package/_types/chains/definitions/fraxtalTestnet.d.ts +192 -203
  143. package/_types/chains/definitions/fraxtalTestnet.d.ts.map +1 -1
  144. package/_types/chains/definitions/funkiSepolia.d.ts +192 -203
  145. package/_types/chains/definitions/funkiSepolia.d.ts.map +1 -1
  146. package/_types/chains/definitions/fuse.d.ts +2 -2
  147. package/_types/chains/definitions/fuseSparknet.d.ts +2 -2
  148. package/_types/chains/definitions/gnosis.d.ts +2 -2
  149. package/_types/chains/definitions/gnosisChiado.d.ts +2 -2
  150. package/_types/chains/definitions/gobi.d.ts +2 -2
  151. package/_types/chains/definitions/goerli.d.ts +2 -2
  152. package/_types/chains/definitions/haqqMainnet.d.ts +2 -2
  153. package/_types/chains/definitions/haqqTestedge2.d.ts +2 -2
  154. package/_types/chains/definitions/hardhat.d.ts +2 -2
  155. package/_types/chains/definitions/harmonyOne.d.ts +2 -2
  156. package/_types/chains/definitions/hedera.d.ts +2 -2
  157. package/_types/chains/definitions/hederaPreviewnet.d.ts +2 -2
  158. package/_types/chains/definitions/hederaTestnet.d.ts +2 -2
  159. package/_types/chains/definitions/holesky.d.ts +2 -2
  160. package/_types/chains/definitions/immutableZkEvm.d.ts +2 -2
  161. package/_types/chains/definitions/immutableZkEvmTestnet.d.ts +2 -2
  162. package/_types/chains/definitions/inEVM.d.ts +2 -2
  163. package/_types/chains/definitions/iotex.d.ts +2 -2
  164. package/_types/chains/definitions/iotexTestnet.d.ts +2 -2
  165. package/_types/chains/definitions/jbc.d.ts +2 -2
  166. package/_types/chains/definitions/jbcTestnet.d.ts +2 -2
  167. package/_types/chains/definitions/kakarotSepolia.d.ts +2 -2
  168. package/_types/chains/definitions/karura.d.ts +2 -2
  169. package/_types/chains/definitions/kava.d.ts +2 -2
  170. package/_types/chains/definitions/kavaTestnet.d.ts +2 -2
  171. package/_types/chains/definitions/kcc.d.ts +2 -2
  172. package/_types/chains/definitions/klaytn.d.ts +2 -2
  173. package/_types/chains/definitions/klaytnBaobab.d.ts +2 -2
  174. package/_types/chains/definitions/kroma.d.ts +2 -2
  175. package/_types/chains/definitions/kromaSepolia.d.ts +2 -2
  176. package/_types/chains/definitions/l3x.d.ts +2 -2
  177. package/_types/chains/definitions/l3xTestnet.d.ts +2 -2
  178. package/_types/chains/definitions/lightlinkPegasus.d.ts +2 -2
  179. package/_types/chains/definitions/lightlinkPhoenix.d.ts +2 -2
  180. package/_types/chains/definitions/linea.d.ts +2 -2
  181. package/_types/chains/definitions/lineaGoerli.d.ts +2 -2
  182. package/_types/chains/definitions/lineaSepolia.d.ts +2 -2
  183. package/_types/chains/definitions/lineaTestnet.d.ts +2 -2
  184. package/_types/chains/definitions/lisk.d.ts +171 -171
  185. package/_types/chains/definitions/liskSepolia.d.ts +192 -203
  186. package/_types/chains/definitions/liskSepolia.d.ts.map +1 -1
  187. package/_types/chains/definitions/localhost.d.ts +2 -2
  188. package/_types/chains/definitions/lukso.d.ts +2 -2
  189. package/_types/chains/definitions/luksoTestnet.d.ts +2 -2
  190. package/_types/chains/definitions/lycan.d.ts +2 -2
  191. package/_types/chains/definitions/mainnet.d.ts +2 -2
  192. package/_types/chains/definitions/mandala.d.ts +2 -2
  193. package/_types/chains/definitions/manta.d.ts +2 -2
  194. package/_types/chains/definitions/mantaSepoliaTestnet.d.ts +2 -2
  195. package/_types/chains/definitions/mantaTestnet.d.ts +2 -2
  196. package/_types/chains/definitions/mantle.d.ts +2 -2
  197. package/_types/chains/definitions/mantleSepoliaTestnet.d.ts +2 -2
  198. package/_types/chains/definitions/mantleTestnet.d.ts +2 -2
  199. package/_types/chains/definitions/merlin.d.ts +2 -2
  200. package/_types/chains/definitions/metachain.d.ts +2 -2
  201. package/_types/chains/definitions/metachainIstanbul.d.ts +2 -2
  202. package/_types/chains/definitions/metalL2.d.ts +192 -203
  203. package/_types/chains/definitions/metalL2.d.ts.map +1 -1
  204. package/_types/chains/definitions/meter.d.ts +2 -2
  205. package/_types/chains/definitions/meterTestnet.d.ts +2 -2
  206. package/_types/chains/definitions/metis.d.ts +2 -2
  207. package/_types/chains/definitions/metisGoerli.d.ts +2 -2
  208. package/_types/chains/definitions/mev.d.ts +2 -2
  209. package/_types/chains/definitions/mevTestnet.d.ts +2 -2
  210. package/_types/chains/definitions/mintSepoliaTestnet.d.ts +2 -2
  211. package/_types/chains/definitions/mode.d.ts +2 -2
  212. package/_types/chains/definitions/modeTestnet.d.ts +2 -2
  213. package/_types/chains/definitions/moonbaseAlpha.d.ts +2 -2
  214. package/_types/chains/definitions/moonbeam.d.ts +2 -2
  215. package/_types/chains/definitions/moonbeamDev.d.ts +2 -2
  216. package/_types/chains/definitions/moonriver.d.ts +2 -2
  217. package/_types/chains/definitions/morphSepolia.d.ts +2 -2
  218. package/_types/chains/definitions/nautilus.d.ts +2 -2
  219. package/_types/chains/definitions/neonDevnet.d.ts +2 -2
  220. package/_types/chains/definitions/neonMainnet.d.ts +2 -2
  221. package/_types/chains/definitions/nexi.d.ts +2 -2
  222. package/_types/chains/definitions/nexilix.d.ts +2 -2
  223. package/_types/chains/definitions/oasisTestnet.d.ts +2 -2
  224. package/_types/chains/definitions/oasys.d.ts +2 -2
  225. package/_types/chains/definitions/okc.d.ts +2 -2
  226. package/_types/chains/definitions/oortmainnetDev.d.ts +2 -2
  227. package/_types/chains/definitions/opBNB.d.ts +2 -2
  228. package/_types/chains/definitions/opBNBTestnet.d.ts +2 -2
  229. package/_types/chains/definitions/optimism.d.ts +192 -203
  230. package/_types/chains/definitions/optimism.d.ts.map +1 -1
  231. package/_types/chains/definitions/optimismGoerli.d.ts +192 -203
  232. package/_types/chains/definitions/optimismGoerli.d.ts.map +1 -1
  233. package/_types/chains/definitions/optimismSepolia.d.ts +192 -203
  234. package/_types/chains/definitions/optimismSepolia.d.ts.map +1 -1
  235. package/_types/chains/definitions/otimDevnet.d.ts +2 -2
  236. package/_types/chains/definitions/palm.d.ts +2 -2
  237. package/_types/chains/definitions/palmTestnet.d.ts +2 -2
  238. package/_types/chains/definitions/pgn.d.ts +193 -204
  239. package/_types/chains/definitions/pgn.d.ts.map +1 -1
  240. package/_types/chains/definitions/pgnTestnet.d.ts +193 -204
  241. package/_types/chains/definitions/pgnTestnet.d.ts.map +1 -1
  242. package/_types/chains/definitions/phoenix.d.ts +2 -2
  243. package/_types/chains/definitions/playfiAlbireo.d.ts +171 -171
  244. package/_types/chains/definitions/plinga.d.ts +2 -2
  245. package/_types/chains/definitions/plumeTestnet.d.ts +2 -2
  246. package/_types/chains/definitions/polygon.d.ts +2 -2
  247. package/_types/chains/definitions/polygonAmoy.d.ts +2 -2
  248. package/_types/chains/definitions/polygonMumbai.d.ts +2 -2
  249. package/_types/chains/definitions/polygonZkEvm.d.ts +2 -2
  250. package/_types/chains/definitions/polygonZkEvmCardona.d.ts +2 -2
  251. package/_types/chains/definitions/polygonZkEvmTestnet.d.ts +2 -2
  252. package/_types/chains/definitions/pulsechain.d.ts +2 -2
  253. package/_types/chains/definitions/pulsechainV4.d.ts +2 -2
  254. package/_types/chains/definitions/qMainnet.d.ts +2 -2
  255. package/_types/chains/definitions/qTestnet.d.ts +2 -2
  256. package/_types/chains/definitions/redstone.d.ts +2 -2
  257. package/_types/chains/definitions/reyaNetwork.d.ts +2 -2
  258. package/_types/chains/definitions/rollux.d.ts +2 -2
  259. package/_types/chains/definitions/rolluxTestnet.d.ts +2 -2
  260. package/_types/chains/definitions/ronin.d.ts +2 -2
  261. package/_types/chains/definitions/rootstock.d.ts +2 -2
  262. package/_types/chains/definitions/rootstockTestnet.d.ts +2 -2
  263. package/_types/chains/definitions/rss3.d.ts +192 -203
  264. package/_types/chains/definitions/rss3.d.ts.map +1 -1
  265. package/_types/chains/definitions/rss3Sepolia.d.ts +192 -203
  266. package/_types/chains/definitions/rss3Sepolia.d.ts.map +1 -1
  267. package/_types/chains/definitions/saigon.d.ts +2 -2
  268. package/_types/chains/definitions/sapphire.d.ts +2 -2
  269. package/_types/chains/definitions/sapphireTestnet.d.ts +2 -2
  270. package/_types/chains/definitions/satoshivm.d.ts +2 -2
  271. package/_types/chains/definitions/satoshivmTestnet.d.ts +2 -2
  272. package/_types/chains/definitions/scroll.d.ts +2 -2
  273. package/_types/chains/definitions/scrollSepolia.d.ts +2 -2
  274. package/_types/chains/definitions/sei.d.ts +2 -2
  275. package/_types/chains/definitions/seiDevnet.d.ts +2 -2
  276. package/_types/chains/definitions/sepolia.d.ts +2 -2
  277. package/_types/chains/definitions/shardeumSphinx.d.ts +2 -2
  278. package/_types/chains/definitions/shibarium.d.ts +2 -2
  279. package/_types/chains/definitions/shimmer.d.ts +2 -2
  280. package/_types/chains/definitions/shimmerTestnet.d.ts +2 -2
  281. package/_types/chains/definitions/skale/brawl.d.ts +2 -2
  282. package/_types/chains/definitions/skale/calypso.d.ts +2 -2
  283. package/_types/chains/definitions/skale/calypsoTestnet.d.ts +2 -2
  284. package/_types/chains/definitions/skale/cryptoBlades.d.ts +2 -2
  285. package/_types/chains/definitions/skale/cryptoColosseum.d.ts +2 -2
  286. package/_types/chains/definitions/skale/europa.d.ts +2 -2
  287. package/_types/chains/definitions/skale/europaTestnet.d.ts +2 -2
  288. package/_types/chains/definitions/skale/exorde.d.ts +2 -2
  289. package/_types/chains/definitions/skale/humanProtocol.d.ts +2 -2
  290. package/_types/chains/definitions/skale/nebula.d.ts +2 -2
  291. package/_types/chains/definitions/skale/nebulaTestnet.d.ts +2 -2
  292. package/_types/chains/definitions/skale/razor.d.ts +2 -2
  293. package/_types/chains/definitions/skale/titan.d.ts +2 -2
  294. package/_types/chains/definitions/skale/titanTestnet.d.ts +2 -2
  295. package/_types/chains/definitions/songbird.d.ts +2 -2
  296. package/_types/chains/definitions/songbirdTestnet.d.ts +2 -2
  297. package/_types/chains/definitions/spicy.d.ts +2 -2
  298. package/_types/chains/definitions/stratis.d.ts +2 -2
  299. package/_types/chains/definitions/syscoin.d.ts +2 -2
  300. package/_types/chains/definitions/syscoinTestnet.d.ts +2 -2
  301. package/_types/chains/definitions/taiko.d.ts +2 -2
  302. package/_types/chains/definitions/taikoHekla.d.ts +2 -2
  303. package/_types/chains/definitions/taikoJolnir.d.ts +2 -2
  304. package/_types/chains/definitions/taikoKatla.d.ts +2 -2
  305. package/_types/chains/definitions/taikoTestnetSepolia.d.ts +2 -2
  306. package/_types/chains/definitions/taraxa.d.ts +2 -2
  307. package/_types/chains/definitions/taraxaTestnet.d.ts +2 -2
  308. package/_types/chains/definitions/telcoinTestnet.d.ts +2 -2
  309. package/_types/chains/definitions/telos.d.ts +2 -2
  310. package/_types/chains/definitions/telosTestnet.d.ts +2 -2
  311. package/_types/chains/definitions/tenet.d.ts +2 -2
  312. package/_types/chains/definitions/thaiChain.d.ts +2 -2
  313. package/_types/chains/definitions/thunderTestnet.d.ts +2 -2
  314. package/_types/chains/definitions/vechain.d.ts +2 -2
  315. package/_types/chains/definitions/wanchain.d.ts +2 -2
  316. package/_types/chains/definitions/wanchainTestnet.d.ts +2 -2
  317. package/_types/chains/definitions/wemix.d.ts +2 -2
  318. package/_types/chains/definitions/wemixTestnet.d.ts +2 -2
  319. package/_types/chains/definitions/xLayer.d.ts +2 -2
  320. package/_types/chains/definitions/xLayerTestnet.d.ts +2 -2
  321. package/_types/chains/definitions/xdc.d.ts +2 -2
  322. package/_types/chains/definitions/xdcTestnet.d.ts +2 -2
  323. package/_types/chains/definitions/yooldoVerse.d.ts +2 -2
  324. package/_types/chains/definitions/yooldoVerseTestnet.d.ts +2 -2
  325. package/_types/chains/definitions/zetachain.d.ts +2 -2
  326. package/_types/chains/definitions/zetachainAthensTestnet.d.ts +2 -2
  327. package/_types/chains/definitions/zhejiang.d.ts +2 -2
  328. package/_types/chains/definitions/zilliqa.d.ts +2 -2
  329. package/_types/chains/definitions/zilliqaTestnet.d.ts +2 -2
  330. package/_types/chains/definitions/zkFair.d.ts +2 -2
  331. package/_types/chains/definitions/zkFairTestnet.d.ts +2 -2
  332. package/_types/chains/definitions/zkSync.d.ts +171 -171
  333. package/_types/chains/definitions/zkSyncInMemoryNode.d.ts +171 -171
  334. package/_types/chains/definitions/zkSyncLocalNode.d.ts +171 -171
  335. package/_types/chains/definitions/zkSyncSepoliaTestnet.d.ts +171 -171
  336. package/_types/chains/definitions/zkSyncTestnet.d.ts +171 -171
  337. package/_types/chains/definitions/zora.d.ts +192 -203
  338. package/_types/chains/definitions/zora.d.ts.map +1 -1
  339. package/_types/chains/definitions/zoraSepolia.d.ts +192 -203
  340. package/_types/chains/definitions/zoraSepolia.d.ts.map +1 -1
  341. package/_types/chains/definitions/zoraTestnet.d.ts +192 -203
  342. package/_types/chains/definitions/zoraTestnet.d.ts.map +1 -1
  343. package/_types/clients/transports/fallback.d.ts +4 -4
  344. package/_types/clients/transports/fallback.d.ts.map +1 -1
  345. package/_types/errors/version.d.ts +1 -1
  346. package/_types/index.d.ts +1 -1
  347. package/_types/index.d.ts.map +1 -1
  348. package/_types/op-stack/chainConfig.d.ts +191 -202
  349. package/_types/op-stack/chainConfig.d.ts.map +1 -1
  350. package/_types/op-stack/formatters.d.ts +191 -202
  351. package/_types/op-stack/formatters.d.ts.map +1 -1
  352. package/_types/types/block.d.ts +15 -15
  353. package/_types/types/block.d.ts.map +1 -1
  354. package/_types/types/chain.d.ts +28 -39
  355. package/_types/types/chain.d.ts.map +1 -1
  356. package/_types/types/eip1193.d.ts +2 -2
  357. package/_types/types/eip1193.d.ts.map +1 -1
  358. package/_types/types/fee.d.ts +20 -15
  359. package/_types/types/fee.d.ts.map +1 -1
  360. package/_types/types/rpc.d.ts +13 -13
  361. package/_types/types/rpc.d.ts.map +1 -1
  362. package/_types/types/transaction.d.ts +77 -77
  363. package/_types/types/transaction.d.ts.map +1 -1
  364. package/_types/types/transport.d.ts +1 -1
  365. package/_types/types/transport.d.ts.map +1 -1
  366. package/_types/types/utils.d.ts +9 -4
  367. package/_types/types/utils.d.ts.map +1 -1
  368. package/_types/utils/chain/extractChain.d.ts +4 -2
  369. package/_types/utils/chain/extractChain.d.ts.map +1 -1
  370. package/_types/utils/formatters/transaction.d.ts +64 -64
  371. package/_types/utils/formatters/transactionRequest.d.ts +40 -40
  372. package/_types/utils/index.d.ts +1 -1
  373. package/_types/utils/index.d.ts.map +1 -1
  374. package/_types/utils/transaction/parseTransaction.d.ts.map +1 -1
  375. package/_types/zksync/actions/sendTransaction.d.ts.map +1 -1
  376. package/_types/zksync/chainConfig.d.ts +170 -170
  377. package/_types/zksync/formatters.d.ts +170 -170
  378. package/celo/fees.ts +0 -1
  379. package/celo/formatters.ts +3 -3
  380. package/celo/serializers.ts +0 -1
  381. package/celo/types.ts +89 -96
  382. package/chains/definitions/defichainEvm.ts +1 -1
  383. package/chains/definitions/defichainEvmTestnet.ts +1 -1
  384. package/clients/transports/fallback.ts +13 -12
  385. package/errors/version.ts +1 -1
  386. package/index.ts +2 -0
  387. package/package.json +3 -2
  388. package/types/block.ts +16 -16
  389. package/types/chain.ts +44 -60
  390. package/types/eip1193.ts +2 -2
  391. package/types/fee.ts +23 -21
  392. package/types/rpc.ts +30 -31
  393. package/types/transaction.ts +216 -207
  394. package/types/transport.ts +3 -1
  395. package/types/utils.ts +14 -4
  396. package/utils/chain/extractChain.ts +2 -2
  397. package/utils/index.ts +3 -0
  398. package/utils/transaction/parseTransaction.ts +2 -2
  399. package/zksync/actions/sendTransaction.ts +1 -2
package/celo/fees.ts CHANGED
@@ -5,7 +5,6 @@ import type {
5
5
  ChainFees,
6
6
  Hex,
7
7
  } from '../index.js'
8
-
9
8
  import type { formatters } from './formatters.js'
10
9
 
11
10
  export const fees: ChainFees<typeof formatters> = {
@@ -22,10 +22,10 @@ export const formatters = {
22
22
  exclude: ['difficulty', 'gasLimit', 'mixHash', 'nonce', 'uncles'],
23
23
  format(
24
24
  args: CeloBlockOverrides & {
25
- transactions: Hash[] | CeloRpcTransaction[]
25
+ transactions: readonly Hash[] | readonly CeloRpcTransaction[]
26
26
  },
27
27
  ): CeloBlockOverrides & {
28
- transactions: Hash[] | CeloTransaction[]
28
+ transactions: readonly Hash[] | readonly CeloTransaction[]
29
29
  } {
30
30
  const transactions = args.transactions?.map((transaction) => {
31
31
  if (typeof transaction === 'string') return transaction
@@ -41,7 +41,7 @@ export const formatters = {
41
41
  }
42
42
  : {}),
43
43
  }
44
- }) as Hash[] | CeloTransaction[]
44
+ }) as readonly Hash[] | readonly CeloTransaction[]
45
45
  return {
46
46
  randomness: args.randomness,
47
47
  transactions,
@@ -27,7 +27,6 @@ export function serializeTransaction(
27
27
  ) {
28
28
  if (isCIP64(transaction))
29
29
  return serializeTransactionCIP64(transaction, signature)
30
-
31
30
  return serializeTransaction_(transaction, signature)
32
31
  }
33
32
 
package/celo/types.ts CHANGED
@@ -7,19 +7,19 @@ import type {
7
7
  Index,
8
8
  Quantity,
9
9
  RpcBlock,
10
- RpcTransactionRequest as RpcTransactionRequest_,
11
- RpcTransaction as RpcTransaction_,
12
10
  TransactionType,
11
+ RpcTransaction as core_RpcTransaction,
12
+ RpcTransactionRequest as core_RpcTransactionRequest,
13
13
  } from '../types/rpc.js'
14
14
  import type {
15
15
  AccessList,
16
16
  TransactionBase,
17
17
  TransactionRequestBase,
18
- TransactionRequest as TransactionRequest_,
19
18
  TransactionSerializable,
20
19
  TransactionSerializableBase,
21
20
  TransactionSerialized,
22
- Transaction as Transaction_,
21
+ Transaction as core_Transaction,
22
+ TransactionRequest as core_TransactionRequest,
23
23
  } from '../types/transaction.js'
24
24
  import type { ExactPartial, NeverBy, OneOf } from '../types/utils.js'
25
25
 
@@ -36,15 +36,16 @@ export type CeloBlockOverrides = {
36
36
  revealed: Hex
37
37
  }
38
38
  }
39
+
39
40
  export type CeloBlock<
40
- TIncludeTransactions extends boolean = boolean,
41
- TBlockTag extends BlockTag = BlockTag,
41
+ includeTransactions extends boolean = boolean,
42
+ blockTag extends BlockTag = BlockTag,
42
43
  > = NeverBy<
43
44
  Block<
44
45
  bigint,
45
- TIncludeTransactions,
46
- TBlockTag,
47
- CeloTransaction<TBlockTag extends 'pending' ? true : false>
46
+ includeTransactions,
47
+ blockTag,
48
+ CeloTransaction<blockTag extends 'pending' ? true : false>
48
49
  >,
49
50
  CeloBlockExclude
50
51
  > &
@@ -57,31 +58,31 @@ export type CeloRpcBlockOverrides = {
57
58
  }
58
59
  }
59
60
  export type CeloRpcBlock<
60
- TBlockTag extends BlockTag = BlockTag,
61
- TIncludeTransactions extends boolean = boolean,
61
+ blockTag extends BlockTag = BlockTag,
62
+ includeTransactions extends boolean = boolean,
62
63
  > = NeverBy<
63
64
  RpcBlock<
64
- TBlockTag,
65
- TIncludeTransactions,
66
- RpcTransaction<TBlockTag extends 'pending' ? true : false>
65
+ blockTag,
66
+ includeTransactions,
67
+ RpcTransaction<blockTag extends 'pending' ? true : false>
67
68
  >,
68
69
  CeloBlockExclude
69
70
  > &
70
71
  CeloRpcBlockOverrides
71
72
 
72
- export type CeloRpcTransaction<TPending extends boolean = boolean> =
73
- | RpcTransaction<TPending>
74
- | RpcTransactionCIP42<TPending>
75
- | RpcTransactionCIP64<TPending>
73
+ export type CeloRpcTransaction<isPending extends boolean = boolean> =
74
+ | RpcTransaction<isPending>
75
+ | RpcTransactionCIP42<isPending>
76
+ | RpcTransactionCIP64<isPending>
76
77
 
77
78
  export type CeloRpcTransactionRequest =
78
79
  | RpcTransactionRequest
79
80
  | RpcTransactionRequestCIP64
80
81
 
81
- export type CeloTransaction<TPending extends boolean = boolean> =
82
- | Transaction<TPending>
83
- | TransactionCIP42<TPending>
84
- | TransactionCIP64<TPending>
82
+ export type CeloTransaction<isPending extends boolean = boolean> =
83
+ | Transaction<isPending>
84
+ | TransactionCIP42<isPending>
85
+ | TransactionCIP64<isPending>
85
86
 
86
87
  export type CeloTransactionRequest =
87
88
  | TransactionRequest
@@ -100,111 +101,103 @@ export type CeloTransactionSerialized<
100
101
 
101
102
  export type CeloTransactionType = TransactionType | 'cip42' | 'cip64'
102
103
 
103
- type RpcTransaction<TPending extends boolean = boolean> =
104
- RpcTransaction_<TPending> & {
104
+ type RpcTransaction<isPending extends boolean = boolean> =
105
+ core_RpcTransaction<isPending> & {
105
106
  feeCurrency: Address | null
106
107
  gatewayFee: Hex | null
107
108
  gatewayFeeRecipient: Address | null
108
109
  }
109
110
 
110
- type RpcTransactionRequest = RpcTransactionRequest_ & {
111
+ type RpcTransactionRequest = core_RpcTransactionRequest & {
111
112
  feeCurrency?: Address | undefined
112
113
  }
113
114
 
114
- export type RpcTransactionCIP42<TPending extends boolean = boolean> = Omit<
115
- TransactionBase<Quantity, Index, TPending>,
115
+ export type RpcTransactionCIP42<isPending extends boolean = boolean> = Omit<
116
+ TransactionBase<Quantity, Index, isPending>,
116
117
  'typeHex'
117
- > &
118
- FeeValuesEIP1559<Quantity> & {
119
- feeCurrency: Address | null
120
- gatewayFee: Hex | null
121
- gatewayFeeRecipient: Address | null
122
- type: '0x7c'
123
- }
118
+ > & {
119
+ feeCurrency: Address | null
120
+ gatewayFee: Hex | null
121
+ gatewayFeeRecipient: Address | null
122
+ type: '0x7c'
123
+ } & FeeValuesEIP1559<Quantity>
124
124
 
125
- export type RpcTransactionCIP64<TPending extends boolean = boolean> = Omit<
126
- TransactionBase<Quantity, Index, TPending>,
125
+ export type RpcTransactionCIP64<isPending extends boolean = boolean> = Omit<
126
+ TransactionBase<Quantity, Index, isPending>,
127
127
  'typeHex'
128
- > &
129
- FeeValuesEIP1559<Quantity> & {
130
- feeCurrency: Address | null
131
- gatewayFee?: undefined
132
- gatewayFeeRecipient?: undefined
133
- type: '0x7b'
134
- }
128
+ > & {
129
+ feeCurrency: Address | null
130
+ gatewayFee?: undefined
131
+ gatewayFeeRecipient?: undefined
132
+ type: '0x7b'
133
+ } & FeeValuesEIP1559<Quantity>
135
134
 
136
135
  export type RpcTransactionRequestCIP64 = TransactionRequestBase<
137
136
  Quantity,
138
137
  Index
139
- > &
140
- ExactPartial<FeeValuesEIP1559<Quantity>> & {
141
- accessList?: AccessList | undefined
142
- feeCurrency?: Address | undefined
143
- type?: '0x7b' | undefined
144
- }
138
+ > & {
139
+ accessList?: AccessList | undefined
140
+ feeCurrency?: Address | undefined
141
+ type?: '0x7b' | undefined
142
+ } & ExactPartial<FeeValuesEIP1559<Quantity>>
145
143
 
146
- type Transaction<TPending extends boolean = boolean> = Transaction_<
144
+ type Transaction<isPending extends boolean = boolean> = core_Transaction<
147
145
  bigint,
148
146
  number,
149
- TPending
147
+ isPending
150
148
  > & {
151
149
  feeCurrency: Address | null
152
150
  gatewayFee?: undefined
153
151
  gatewayFeeRecipient?: undefined
154
152
  }
155
153
 
156
- export type TransactionCIP42<TPending extends boolean = boolean> =
157
- TransactionBase<bigint, number, TPending> &
158
- FeeValuesEIP1559 & {
159
- feeCurrency: Address | null
160
- gatewayFee: bigint | null
161
- gatewayFeeRecipient: Address | null
162
- type: 'cip42'
163
- }
164
-
165
- export type TransactionCIP64<TPending extends boolean = boolean> =
166
- TransactionBase<bigint, number, TPending> &
167
- FeeValuesEIP1559 & {
168
- feeCurrency: Address | null
169
- gatewayFee?: undefined
170
- gatewayFeeRecipient?: undefined
171
- type: 'cip64'
172
- }
173
-
174
- type TransactionRequest = TransactionRequest_ & {
154
+ export type TransactionCIP42<isPending extends boolean = boolean> =
155
+ TransactionBase<bigint, number, isPending> & {
156
+ feeCurrency: Address | null
157
+ gatewayFee: bigint | null
158
+ gatewayFeeRecipient: Address | null
159
+ type: 'cip42'
160
+ } & FeeValuesEIP1559
161
+
162
+ export type TransactionCIP64<isPending extends boolean = boolean> =
163
+ TransactionBase<bigint, number, isPending> & {
164
+ feeCurrency: Address | null
165
+ gatewayFee?: undefined
166
+ gatewayFeeRecipient?: undefined
167
+ type: 'cip64'
168
+ } & FeeValuesEIP1559
169
+
170
+ type TransactionRequest = core_TransactionRequest & {
175
171
  feeCurrency?: Address | undefined
176
172
  }
177
173
 
178
- export type TransactionRequestCIP64 = TransactionRequestBase &
179
- ExactPartial<FeeValuesEIP1559> & {
180
- accessList?: AccessList | undefined
181
- feeCurrency?: Address | undefined
182
- type?: 'cip64' | undefined
183
- }
174
+ export type TransactionRequestCIP64 = TransactionRequestBase & {
175
+ accessList?: AccessList | undefined
176
+ feeCurrency?: Address | undefined
177
+ type?: 'cip64' | undefined
178
+ } & ExactPartial<FeeValuesEIP1559>
184
179
 
185
180
  export type TransactionSerializableCIP42<
186
- TQuantity = bigint,
187
- TIndex = number,
188
- > = TransactionSerializableBase<TQuantity, TIndex> &
189
- ExactPartial<FeeValuesEIP1559<TQuantity>> & {
190
- accessList?: AccessList | undefined
191
- feeCurrency?: Address | undefined
192
- gatewayFeeRecipient?: Address | undefined
193
- gatewayFee?: TQuantity | undefined
194
- chainId: number
195
- type?: 'cip42' | undefined
196
- }
181
+ quantity = bigint,
182
+ index = number,
183
+ > = TransactionSerializableBase<quantity, index> & {
184
+ accessList?: AccessList | undefined
185
+ feeCurrency?: Address | undefined
186
+ gatewayFeeRecipient?: Address | undefined
187
+ gatewayFee?: quantity | undefined
188
+ chainId: number
189
+ type?: 'cip42' | undefined
190
+ } & ExactPartial<FeeValuesEIP1559<quantity>>
197
191
 
198
192
  export type TransactionSerializableCIP64<
199
- TQuantity = bigint,
200
- TIndex = number,
201
- > = TransactionSerializableBase<TQuantity, TIndex> &
202
- ExactPartial<FeeValuesEIP1559<TQuantity>> & {
203
- accessList?: AccessList | undefined
204
- feeCurrency?: Address | undefined
205
- chainId: number
206
- type?: 'cip64' | undefined
207
- }
193
+ quantity = bigint,
194
+ index = number,
195
+ > = TransactionSerializableBase<quantity, index> & {
196
+ accessList?: AccessList | undefined
197
+ feeCurrency?: Address | undefined
198
+ chainId: number
199
+ type?: 'cip64' | undefined
200
+ } & ExactPartial<FeeValuesEIP1559<quantity>>
208
201
 
209
202
  export type TransactionSerializedCIP42 = `0x7c${string}`
210
203
  export type TransactionSerializedCIP64 = `0x7b${string}`
@@ -7,7 +7,7 @@ export const defichainEvm = /*#__PURE__*/ defineChain({
7
7
  nativeCurrency: {
8
8
  name: 'DeFiChain',
9
9
  symbol: 'DFI',
10
- decimals: 8,
10
+ decimals: 18,
11
11
  },
12
12
  rpcUrls: {
13
13
  default: {
@@ -7,7 +7,7 @@ export const defichainEvmTestnet = /*#__PURE__*/ defineChain({
7
7
  nativeCurrency: {
8
8
  name: 'DeFiChain',
9
9
  symbol: 'DFI',
10
- decimals: 8,
10
+ decimals: 18,
11
11
  },
12
12
  rpcUrls: {
13
13
  default: {
@@ -80,20 +80,21 @@ export type FallbackTransportConfig = {
80
80
  retryDelay?: TransportConfig['retryDelay'] | undefined
81
81
  }
82
82
 
83
- export type FallbackTransport<transports extends Transport[] = Transport[]> =
84
- Transport<
85
- 'fallback',
86
- {
87
- onResponse: (fn: OnResponseFn) => void
88
- transports: {
89
- [key in keyof transports]: ReturnType<transports[key]>
90
- }
83
+ export type FallbackTransport<
84
+ transports extends readonly Transport[] = readonly Transport[],
85
+ > = Transport<
86
+ 'fallback',
87
+ {
88
+ onResponse: (fn: OnResponseFn) => void
89
+ transports: {
90
+ [key in keyof transports]: ReturnType<transports[key]>
91
91
  }
92
- >
92
+ }
93
+ >
93
94
 
94
95
  export type FallbackTransportErrorType = CreateTransportErrorType | ErrorType
95
96
 
96
- export function fallback<const transports extends Transport[]>(
97
+ export function fallback<const transports extends readonly Transport[]>(
97
98
  transports_: transports,
98
99
  config: FallbackTransportConfig = {},
99
100
  ): FallbackTransport<transports> {
@@ -205,10 +206,10 @@ export function rankTransports({
205
206
  }: {
206
207
  chain?: Chain | undefined
207
208
  interval: RankOptions['interval']
208
- onTransports: (transports: Transport[]) => void
209
+ onTransports: (transports: readonly Transport[]) => void
209
210
  sampleCount?: RankOptions['sampleCount'] | undefined
210
211
  timeout?: RankOptions['timeout'] | undefined
211
- transports: Transport[]
212
+ transports: readonly Transport[]
212
213
  weights?: RankOptions['weights'] | undefined
213
214
  }) {
214
215
  const { stability: stabilityWeight = 0.7, latency: latencyWeight = 0.3 } =
package/errors/version.ts CHANGED
@@ -1 +1 @@
1
- export const version = '2.13.6'
1
+ export const version = '2.13.7'
package/index.ts CHANGED
@@ -1617,7 +1617,9 @@ export {
1617
1617
  export {
1618
1618
  type DomainSeparatorErrorType,
1619
1619
  type GetTypesForEIP712DomainErrorType,
1620
+ type SerializeTypedDataErrorType,
1620
1621
  type ValidateTypedDataErrorType,
1622
+ serializeTypedData,
1621
1623
  validateTypedData,
1622
1624
  domainSeparator,
1623
1625
  getTypesForEIP712Domain,
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "viem",
3
3
  "description": "TypeScript Interface for Ethereum",
4
- "version": "2.13.6",
4
+ "version": "2.13.7",
5
5
  "main": "./_cjs/index.js",
6
6
  "module": "./_esm/index.js",
7
7
  "types": "./_types/index.d.ts",
@@ -170,6 +170,7 @@
170
170
  "ethereum",
171
171
  "dapps",
172
172
  "wallet",
173
- "web3"
173
+ "web3",
174
+ "typescript"
174
175
  ]
175
176
  }
package/types/block.ts CHANGED
@@ -5,7 +5,7 @@ import type { Transaction } from './transaction.js'
5
5
  import type { Withdrawal } from './withdrawal.js'
6
6
 
7
7
  export type Block<
8
- TQuantity = bigint,
8
+ quantity = bigint,
9
9
  TIncludeTransactions extends boolean = boolean,
10
10
  TBlockTag extends BlockTag = BlockTag,
11
11
  TTransaction = Transaction<
@@ -15,19 +15,19 @@ export type Block<
15
15
  >,
16
16
  > = {
17
17
  /** Base fee per gas */
18
- baseFeePerGas: TQuantity | null
18
+ baseFeePerGas: quantity | null
19
19
  /** Total used blob gas by all transactions in this block */
20
- blobGasUsed: TQuantity
20
+ blobGasUsed: quantity
21
21
  /** Difficulty for this block */
22
- difficulty: TQuantity
22
+ difficulty: quantity
23
23
  /** Excess blob gas */
24
- excessBlobGas: TQuantity
24
+ excessBlobGas: quantity
25
25
  /** "Extra data" field of this block */
26
26
  extraData: Hex
27
27
  /** Maximum gas allowed in this block */
28
- gasLimit: TQuantity
28
+ gasLimit: quantity
29
29
  /** Total used gas by all transactions in this block */
30
- gasUsed: TQuantity
30
+ gasUsed: quantity
31
31
  /** Block hash or `null` if pending */
32
32
  hash: TBlockTag extends 'pending' ? null : Hash
33
33
  /** Logs bloom filter or `null` if pending */
@@ -39,7 +39,7 @@ export type Block<
39
39
  /** Proof-of-work hash or `null` if pending */
40
40
  nonce: TBlockTag extends 'pending' ? null : Hex
41
41
  /** Block number or `null` if pending */
42
- number: TBlockTag extends 'pending' ? null : TQuantity
42
+ number: TBlockTag extends 'pending' ? null : quantity
43
43
  /** Parent block hash */
44
44
  parentHash: Hash
45
45
  /** Root of the this block’s receipts trie */
@@ -48,13 +48,13 @@ export type Block<
48
48
  /** SHA3 of the uncles data in this block */
49
49
  sha3Uncles: Hash
50
50
  /** Size of this block in bytes */
51
- size: TQuantity
51
+ size: quantity
52
52
  /** Root of this block’s final state trie */
53
53
  stateRoot: Hash
54
54
  /** Unix timestamp of when this block was collated */
55
- timestamp: TQuantity
55
+ timestamp: quantity
56
56
  /** Total difficulty of the chain until this block */
57
- totalDifficulty: TQuantity | null
57
+ totalDifficulty: quantity | null
58
58
  /** List of transaction objects or hashes */
59
59
  transactions: TIncludeTransactions extends true ? TTransaction[] : Hash[]
60
60
  /** Root of this block’s transaction trie */
@@ -67,13 +67,13 @@ export type Block<
67
67
  withdrawalsRoot?: Hex | undefined
68
68
  }
69
69
 
70
- export type BlockIdentifier<TQuantity = bigint> = {
70
+ export type BlockIdentifier<quantity = bigint> = {
71
71
  /** Whether or not to throw an error if the block is not in the canonical chain as described below. Only allowed in conjunction with the blockHash tag. Defaults to false. */
72
72
  requireCanonical?: boolean | undefined
73
73
  } & (
74
74
  | {
75
75
  /** The block in the canonical chain with this number */
76
- blockNumber: BlockNumber<TQuantity>
76
+ blockNumber: BlockNumber<quantity>
77
77
  }
78
78
  | {
79
79
  /** The block uniquely identified by this hash. The `blockNumber` and `blockHash` properties are mutually exclusive; exactly one of them must be set. */
@@ -81,12 +81,12 @@ export type BlockIdentifier<TQuantity = bigint> = {
81
81
  }
82
82
  )
83
83
 
84
- export type BlockNumber<TQuantity = bigint> = TQuantity
84
+ export type BlockNumber<quantity = bigint> = quantity
85
85
 
86
86
  export type BlockTag = 'latest' | 'earliest' | 'pending' | 'safe' | 'finalized'
87
87
 
88
88
  export type Uncle<
89
- TQuantity = bigint,
89
+ quantity = bigint,
90
90
  TIncludeTransactions extends boolean = boolean,
91
91
  TBlockTag extends BlockTag = BlockTag,
92
92
  TTransaction = Transaction<
@@ -94,4 +94,4 @@ export type Uncle<
94
94
  number,
95
95
  TBlockTag extends 'pending' ? true : false
96
96
  >,
97
- > = Block<TQuantity, TIncludeTransactions, TBlockTag, TTransaction>
97
+ > = Block<quantity, TIncludeTransactions, TBlockTag, TTransaction>
package/types/chain.ts CHANGED
@@ -61,41 +61,12 @@ export type Chain<
61
61
 
62
62
  /** Custom chain data. */
63
63
  custom?: custom | undefined
64
- /**
65
- * Modifies how chain data structures (ie. Blocks, Transactions, etc)
66
- * are formatted & typed.
67
- */
68
- formatters?: formatters | undefined
69
- /** Modifies how data (ie. Transactions) is serialized. */
70
- serializers?: ChainSerializers<formatters> | undefined
71
64
  /** Modifies how fees are derived. */
72
65
  fees?: ChainFees<formatters | undefined> | undefined
73
- }
74
-
75
- /////////////////////////////////////////////////////////////////////
76
- // Constants
77
-
78
- type ChainBlockExplorer = {
79
- name: string
80
- url: string
81
- apiUrl?: string | undefined
82
- }
83
-
84
- export type ChainContract = {
85
- address: Address
86
- blockCreated?: number | undefined
87
- }
88
-
89
- type ChainNativeCurrency = {
90
- name: string
91
- /** 2-6 characters long */
92
- symbol: string
93
- decimals: number
94
- }
95
-
96
- type ChainRpcUrls = {
97
- http: readonly string[]
98
- webSocket?: readonly string[] | undefined
66
+ /** Modifies how data is formatted and typed (e.g. blocks and transactions) */
67
+ formatters?: formatters | undefined
68
+ /** Modifies how data is serialized (e.g. transactions). */
69
+ serializers?: ChainSerializers<formatters> | undefined
99
70
  }
100
71
 
101
72
  /////////////////////////////////////////////////////////////////////
@@ -129,17 +100,13 @@ export type ChainFees<
129
100
  * Overrides the return value in the [`estimateFeesPerGas` Action](/docs/actions/public/estimateFeesPerGas).
130
101
  */
131
102
  estimateFeesPerGas?:
132
- | ChainEstimateFeesPerGasFn<formatters>
133
103
  | bigint
104
+ | ((
105
+ args: ChainEstimateFeesPerGasFnParameters<formatters>,
106
+ ) => Promise<EstimateFeesPerGasReturnType | null>)
134
107
  | undefined
135
108
  }
136
109
 
137
- export type ChainEstimateFeesPerGasFn<
138
- formatters extends ChainFormatters | undefined = ChainFormatters | undefined,
139
- > = (
140
- args: ChainEstimateFeesPerGasFnParameters<formatters>,
141
- ) => Promise<EstimateFeesPerGasReturnType | null>
142
-
143
110
  export type ChainFormatters = {
144
111
  /** Modifies how the Block structure is formatted & typed. */
145
112
  block?: ChainFormatter<'block'> | undefined
@@ -158,18 +125,18 @@ export type ChainFormatter<type extends string = string> = {
158
125
 
159
126
  export type ChainSerializers<
160
127
  formatters extends ChainFormatters | undefined = undefined,
128
+ ///
129
+ transaction extends
130
+ TransactionSerializableGeneric = formatters extends ChainFormatters
131
+ ? formatters['transactionRequest'] extends ChainFormatter
132
+ ? TransactionSerializableGeneric &
133
+ Parameters<formatters['transactionRequest']['format']>[0]
134
+ : TransactionSerializable
135
+ : TransactionSerializable,
161
136
  > = {
162
137
  /** Modifies how Transactions are serialized. */
163
138
  transaction?:
164
- | SerializeTransactionFn<
165
- formatters extends ChainFormatters
166
- ? formatters['transactionRequest'] extends ChainFormatter
167
- ? TransactionSerializableGeneric &
168
- Parameters<formatters['transactionRequest']['format']>[0]
169
- : TransactionSerializable
170
- : TransactionSerializable,
171
- TransactionSerializedGeneric
172
- >
139
+ | SerializeTransactionFn<transaction, TransactionSerializedGeneric>
173
140
  | undefined
174
141
  }
175
142
 
@@ -201,24 +168,15 @@ export type ChainFeesFnParameters<
201
168
  export type ChainEstimateFeesPerGasFnParameters<
202
169
  formatters extends ChainFormatters | undefined = ChainFormatters | undefined,
203
170
  > = {
204
- /**
205
- * A function to multiply the base fee based on the `baseFeeMultiplier` value.
206
- */
171
+ /** A function to multiply the base fee based on the `baseFeeMultiplier` value. */
207
172
  multiply(x: bigint): bigint
208
- /**
209
- * The type of fees to return.
210
- */
173
+ /** The type of fees to return. */
211
174
  type: FeeValuesType
212
175
  } & ChainFeesFnParameters<formatters>
213
176
 
214
177
  /////////////////////////////////////////////////////////////////////
215
178
  // Utils
216
179
 
217
- export type ExtractChain<
218
- chains extends readonly Chain[],
219
- chainId extends Chain['id'],
220
- > = Extract<chains[number], { id: chainId }>
221
-
222
180
  export type ExtractChainFormatterExclude<
223
181
  chain extends Chain | undefined,
224
182
  type extends keyof ChainFormatters,
@@ -267,3 +225,29 @@ export type GetChainParameter<
267
225
  > = IsUndefined<chain> extends true
268
226
  ? { chain: chainOverride | null }
269
227
  : { chain?: chainOverride | null | undefined }
228
+
229
+ /////////////////////////////////////////////////////////////////////
230
+ // Constants
231
+
232
+ type ChainBlockExplorer = {
233
+ name: string
234
+ url: string
235
+ apiUrl?: string | undefined
236
+ }
237
+
238
+ export type ChainContract = {
239
+ address: Address
240
+ blockCreated?: number | undefined
241
+ }
242
+
243
+ type ChainNativeCurrency = {
244
+ name: string
245
+ /** 2-6 characters long */
246
+ symbol: string
247
+ decimals: number
248
+ }
249
+
250
+ type ChainRpcUrls = {
251
+ http: readonly string[]
252
+ webSocket?: readonly string[] | undefined
253
+ }