viem 2.57.17 → 2.57.19

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 (424) hide show
  1. package/CHANGELOG.md +100 -0
  2. package/_cjs/account-abstraction/actions/paymaster/getPaymasterData.js +4 -2
  3. package/_cjs/account-abstraction/actions/paymaster/getPaymasterData.js.map +1 -1
  4. package/_cjs/account-abstraction/actions/paymaster/getPaymasterStubData.js +6 -2
  5. package/_cjs/account-abstraction/actions/paymaster/getPaymasterStubData.js.map +1 -1
  6. package/_cjs/actions/ens/getEnsAddress.js +11 -1
  7. package/_cjs/actions/ens/getEnsAddress.js.map +1 -1
  8. package/_cjs/actions/ens/getEnsText.js.map +1 -1
  9. package/_cjs/actions/index.js +5 -3
  10. package/_cjs/actions/index.js.map +1 -1
  11. package/_cjs/actions/public/call.js +13 -2
  12. package/_cjs/actions/public/call.js.map +1 -1
  13. package/_cjs/actions/public/getDelegation.js +2 -1
  14. package/_cjs/actions/public/getDelegation.js.map +1 -1
  15. package/_cjs/actions/public/getFeeHistory.js.map +1 -1
  16. package/_cjs/actions/public/getLogs.js +18 -1
  17. package/_cjs/actions/public/getLogs.js.map +1 -1
  18. package/_cjs/actions/public/internal/isRangeError.js +18 -0
  19. package/_cjs/actions/public/internal/isRangeError.js.map +1 -0
  20. package/_cjs/actions/public/internal/watchTransport.js +24 -0
  21. package/_cjs/actions/public/internal/watchTransport.js.map +1 -0
  22. package/_cjs/actions/public/iterateLogs.js +48 -0
  23. package/_cjs/actions/public/iterateLogs.js.map +1 -0
  24. package/_cjs/actions/public/simulateContract.js +4 -4
  25. package/_cjs/actions/public/simulateContract.js.map +1 -1
  26. package/_cjs/actions/public/verifyHash.js +72 -39
  27. package/_cjs/actions/public/verifyHash.js.map +1 -1
  28. package/_cjs/actions/public/waitForTransactionReceipt.js +18 -1
  29. package/_cjs/actions/public/waitForTransactionReceipt.js.map +1 -1
  30. package/_cjs/actions/public/watchBlockHeaders.js +2 -10
  31. package/_cjs/actions/public/watchBlockHeaders.js.map +1 -1
  32. package/_cjs/actions/public/watchBlockNumber.js +3 -18
  33. package/_cjs/actions/public/watchBlockNumber.js.map +1 -1
  34. package/_cjs/actions/public/watchBlocks.js +3 -18
  35. package/_cjs/actions/public/watchBlocks.js.map +1 -1
  36. package/_cjs/actions/public/watchContractEvent.js +5 -33
  37. package/_cjs/actions/public/watchContractEvent.js.map +1 -1
  38. package/_cjs/actions/public/watchEvent.js +5 -33
  39. package/_cjs/actions/public/watchEvent.js.map +1 -1
  40. package/_cjs/actions/token/internal.js +2 -10
  41. package/_cjs/actions/token/internal.js.map +1 -1
  42. package/_cjs/actions/wallet/deployContract.js +2 -1
  43. package/_cjs/actions/wallet/deployContract.js.map +1 -1
  44. package/_cjs/actions/wallet/prepareTransactionRequest.js +16 -3
  45. package/_cjs/actions/wallet/prepareTransactionRequest.js.map +1 -1
  46. package/_cjs/actions/wallet/sendCalls.js +2 -1
  47. package/_cjs/actions/wallet/sendCalls.js.map +1 -1
  48. package/_cjs/actions/wallet/signAuthorization.js +2 -1
  49. package/_cjs/actions/wallet/signAuthorization.js.map +1 -1
  50. package/_cjs/celo/serializers.js +1 -1
  51. package/_cjs/celo/serializers.js.map +1 -1
  52. package/_cjs/chains/definitions/kinetiqElysium.js +30 -0
  53. package/_cjs/chains/definitions/kinetiqElysium.js.map +1 -0
  54. package/_cjs/chains/definitions/kinetiqElysiumTestnet.js +31 -0
  55. package/_cjs/chains/definitions/kinetiqElysiumTestnet.js.map +1 -0
  56. package/_cjs/chains/index.js +14 -9
  57. package/_cjs/chains/index.js.map +1 -1
  58. package/_cjs/clients/decorators/public.js +2 -0
  59. package/_cjs/clients/decorators/public.js.map +1 -1
  60. package/_cjs/constants/contracts.js +1 -1
  61. package/_cjs/constants/contracts.js.map +1 -1
  62. package/_cjs/errors/chain.js +2 -2
  63. package/_cjs/errors/chain.js.map +1 -1
  64. package/_cjs/errors/typedData.js +2 -0
  65. package/_cjs/errors/typedData.js.map +1 -1
  66. package/_cjs/errors/version.js +1 -1
  67. package/_cjs/index.js +5 -4
  68. package/_cjs/index.js.map +1 -1
  69. package/_cjs/op-stack/actions/buildProveWithdrawal.js +5 -5
  70. package/_cjs/op-stack/actions/buildProveWithdrawal.js.map +1 -1
  71. package/_cjs/op-stack/actions/getL2Output.js +13 -9
  72. package/_cjs/op-stack/actions/getL2Output.js.map +1 -1
  73. package/_cjs/op-stack/actions/waitToProve.js +1 -0
  74. package/_cjs/op-stack/actions/waitToProve.js.map +1 -1
  75. package/_cjs/tempo/Account.js +30 -0
  76. package/_cjs/tempo/Account.js.map +1 -1
  77. package/_cjs/tempo/actions/accessKey.js +1 -1
  78. package/_cjs/tempo/actions/accessKey.js.map +1 -1
  79. package/_cjs/tempo/actions/accounts.js +19 -9
  80. package/_cjs/tempo/actions/accounts.js.map +1 -1
  81. package/_cjs/tempo/actions/earn/deployment.js +1 -1
  82. package/_cjs/tempo/actions/earn/deployment.js.map +1 -1
  83. package/_cjs/tempo/actions/earn.js +3 -3
  84. package/_cjs/tempo/actions/earn.js.map +1 -1
  85. package/_cjs/tempo/actions/propAmm.js +1 -1
  86. package/_cjs/tempo/actions/propAmm.js.map +1 -1
  87. package/_cjs/tempo/actions/token.js +10 -2
  88. package/_cjs/tempo/actions/token.js.map +1 -1
  89. package/_cjs/tempo/chainConfig.js +37 -1
  90. package/_cjs/tempo/chainConfig.js.map +1 -1
  91. package/_cjs/tempo/internal/preAuthorized.js +214 -0
  92. package/_cjs/tempo/internal/preAuthorized.js.map +1 -0
  93. package/_cjs/tempo/internal/relay/feePayer.js +25 -7
  94. package/_cjs/tempo/internal/relay/feePayer.js.map +1 -1
  95. package/_cjs/tempo/internal/relay.js +2 -2
  96. package/_cjs/tempo/internal/relay.js.map +1 -1
  97. package/_cjs/tempo/internal/utils.js +2 -10
  98. package/_cjs/tempo/internal/utils.js.map +1 -1
  99. package/_cjs/tokens/defineToken.js +1 -1
  100. package/_cjs/tokens/defineToken.js.map +1 -1
  101. package/_cjs/tokens/definitions/ousd.js +1 -0
  102. package/_cjs/tokens/definitions/ousd.js.map +1 -1
  103. package/_cjs/utils/abi/decodeAbiParameters.js +33 -9
  104. package/_cjs/utils/abi/decodeAbiParameters.js.map +1 -1
  105. package/_cjs/utils/abi/encodeAbiParameters.js +5 -4
  106. package/_cjs/utils/abi/encodeAbiParameters.js.map +1 -1
  107. package/_cjs/utils/abi/encodePacked.js +4 -2
  108. package/_cjs/utils/abi/encodePacked.js.map +1 -1
  109. package/_cjs/utils/ccip.js +5 -1
  110. package/_cjs/utils/ccip.js.map +1 -1
  111. package/_cjs/utils/chain/getChainContractAddress.js +2 -2
  112. package/_cjs/utils/chain/getChainContractAddress.js.map +1 -1
  113. package/_cjs/utils/encoding/toBytes.js +5 -6
  114. package/_cjs/utils/encoding/toBytes.js.map +1 -1
  115. package/_cjs/utils/ens/avatar/utils.js +25 -5
  116. package/_cjs/utils/ens/avatar/utils.js.map +1 -1
  117. package/_cjs/utils/ens/localBatchGatewayRequest.js +13 -1
  118. package/_cjs/utils/ens/localBatchGatewayRequest.js.map +1 -1
  119. package/_cjs/utils/promise/createBatchScheduler.js +1 -1
  120. package/_cjs/utils/promise/createBatchScheduler.js.map +1 -1
  121. package/_cjs/utils/siwe/validateSiweMessage.js +5 -0
  122. package/_cjs/utils/siwe/validateSiweMessage.js.map +1 -1
  123. package/_cjs/zksync/actions/estimateFee.js +1 -1
  124. package/_cjs/zksync/actions/estimateFee.js.map +1 -1
  125. package/_cjs/zksync/actions/estimateGasL1ToL2.js +1 -1
  126. package/_cjs/zksync/actions/estimateGasL1ToL2.js.map +1 -1
  127. package/_cjs/zksync/actions/finalizeWithdrawal.js +3 -3
  128. package/_cjs/zksync/actions/finalizeWithdrawal.js.map +1 -1
  129. package/_cjs/zksync/actions/sendEip712Transaction.js +10 -2
  130. package/_cjs/zksync/actions/sendEip712Transaction.js.map +1 -1
  131. package/_cjs/zksync/actions/signEip712Transaction.js +2 -2
  132. package/_cjs/zksync/actions/signEip712Transaction.js.map +1 -1
  133. package/_esm/account-abstraction/actions/paymaster/getPaymasterData.js +4 -2
  134. package/_esm/account-abstraction/actions/paymaster/getPaymasterData.js.map +1 -1
  135. package/_esm/account-abstraction/actions/paymaster/getPaymasterStubData.js +6 -2
  136. package/_esm/account-abstraction/actions/paymaster/getPaymasterStubData.js.map +1 -1
  137. package/_esm/actions/ens/getEnsAddress.js +12 -1
  138. package/_esm/actions/ens/getEnsAddress.js.map +1 -1
  139. package/_esm/actions/ens/getEnsText.js.map +1 -1
  140. package/_esm/actions/index.js +1 -0
  141. package/_esm/actions/index.js.map +1 -1
  142. package/_esm/actions/public/call.js +13 -2
  143. package/_esm/actions/public/call.js.map +1 -1
  144. package/_esm/actions/public/getDelegation.js +2 -1
  145. package/_esm/actions/public/getDelegation.js.map +1 -1
  146. package/_esm/actions/public/getFeeHistory.js.map +1 -1
  147. package/_esm/actions/public/getLogs.js +18 -1
  148. package/_esm/actions/public/getLogs.js.map +1 -1
  149. package/_esm/actions/public/internal/isRangeError.js +19 -0
  150. package/_esm/actions/public/internal/isRangeError.js.map +1 -0
  151. package/_esm/actions/public/internal/watchTransport.js +22 -0
  152. package/_esm/actions/public/internal/watchTransport.js.map +1 -0
  153. package/_esm/actions/public/iterateLogs.js +84 -0
  154. package/_esm/actions/public/iterateLogs.js.map +1 -0
  155. package/_esm/actions/public/simulateContract.js +5 -4
  156. package/_esm/actions/public/simulateContract.js.map +1 -1
  157. package/_esm/actions/public/verifyHash.js +77 -40
  158. package/_esm/actions/public/verifyHash.js.map +1 -1
  159. package/_esm/actions/public/waitForTransactionReceipt.js +20 -1
  160. package/_esm/actions/public/waitForTransactionReceipt.js.map +1 -1
  161. package/_esm/actions/public/watchBlockHeaders.js +2 -10
  162. package/_esm/actions/public/watchBlockHeaders.js.map +1 -1
  163. package/_esm/actions/public/watchBlockNumber.js +3 -18
  164. package/_esm/actions/public/watchBlockNumber.js.map +1 -1
  165. package/_esm/actions/public/watchBlocks.js +3 -18
  166. package/_esm/actions/public/watchBlocks.js.map +1 -1
  167. package/_esm/actions/public/watchContractEvent.js +4 -36
  168. package/_esm/actions/public/watchContractEvent.js.map +1 -1
  169. package/_esm/actions/public/watchEvent.js +4 -36
  170. package/_esm/actions/public/watchEvent.js.map +1 -1
  171. package/_esm/actions/token/internal.js +2 -10
  172. package/_esm/actions/token/internal.js.map +1 -1
  173. package/_esm/actions/wallet/deployContract.js +2 -1
  174. package/_esm/actions/wallet/deployContract.js.map +1 -1
  175. package/_esm/actions/wallet/prepareTransactionRequest.js +17 -3
  176. package/_esm/actions/wallet/prepareTransactionRequest.js.map +1 -1
  177. package/_esm/actions/wallet/sendCalls.js +2 -1
  178. package/_esm/actions/wallet/sendCalls.js.map +1 -1
  179. package/_esm/actions/wallet/signAuthorization.js +2 -1
  180. package/_esm/actions/wallet/signAuthorization.js.map +1 -1
  181. package/_esm/celo/serializers.js +1 -1
  182. package/_esm/celo/serializers.js.map +1 -1
  183. package/_esm/chains/definitions/kinetiqElysium.js +27 -0
  184. package/_esm/chains/definitions/kinetiqElysium.js.map +1 -0
  185. package/_esm/chains/definitions/kinetiqElysiumTestnet.js +28 -0
  186. package/_esm/chains/definitions/kinetiqElysiumTestnet.js.map +1 -0
  187. package/_esm/chains/index.js +2 -0
  188. package/_esm/chains/index.js.map +1 -1
  189. package/_esm/clients/decorators/public.js +2 -0
  190. package/_esm/clients/decorators/public.js.map +1 -1
  191. package/_esm/constants/contracts.js +1 -1
  192. package/_esm/constants/contracts.js.map +1 -1
  193. package/_esm/errors/chain.js +2 -2
  194. package/_esm/errors/chain.js.map +1 -1
  195. package/_esm/errors/typedData.js +2 -0
  196. package/_esm/errors/typedData.js.map +1 -1
  197. package/_esm/errors/version.js +1 -1
  198. package/_esm/index.js +1 -1
  199. package/_esm/index.js.map +1 -1
  200. package/_esm/op-stack/actions/buildProveWithdrawal.js +5 -5
  201. package/_esm/op-stack/actions/buildProveWithdrawal.js.map +1 -1
  202. package/_esm/op-stack/actions/getL2Output.js +14 -9
  203. package/_esm/op-stack/actions/getL2Output.js.map +1 -1
  204. package/_esm/op-stack/actions/waitToProve.js +1 -0
  205. package/_esm/op-stack/actions/waitToProve.js.map +1 -1
  206. package/_esm/tempo/Account.js +33 -1
  207. package/_esm/tempo/Account.js.map +1 -1
  208. package/_esm/tempo/actions/accessKey.js +1 -1
  209. package/_esm/tempo/actions/accessKey.js.map +1 -1
  210. package/_esm/tempo/actions/accounts.js +24 -10
  211. package/_esm/tempo/actions/accounts.js.map +1 -1
  212. package/_esm/tempo/actions/earn/deployment.js +1 -1
  213. package/_esm/tempo/actions/earn/deployment.js.map +1 -1
  214. package/_esm/tempo/actions/earn.js +3 -3
  215. package/_esm/tempo/actions/earn.js.map +1 -1
  216. package/_esm/tempo/actions/propAmm.js +1 -1
  217. package/_esm/tempo/actions/propAmm.js.map +1 -1
  218. package/_esm/tempo/actions/token.js +10 -2
  219. package/_esm/tempo/actions/token.js.map +1 -1
  220. package/_esm/tempo/chainConfig.js +41 -1
  221. package/_esm/tempo/chainConfig.js.map +1 -1
  222. package/_esm/tempo/internal/preAuthorized.js +244 -0
  223. package/_esm/tempo/internal/preAuthorized.js.map +1 -0
  224. package/_esm/tempo/internal/relay/feePayer.js +26 -7
  225. package/_esm/tempo/internal/relay/feePayer.js.map +1 -1
  226. package/_esm/tempo/internal/relay.js +8 -3
  227. package/_esm/tempo/internal/relay.js.map +1 -1
  228. package/_esm/tempo/internal/utils.js +2 -10
  229. package/_esm/tempo/internal/utils.js.map +1 -1
  230. package/_esm/tokens/defineToken.js +2 -1
  231. package/_esm/tokens/defineToken.js.map +1 -1
  232. package/_esm/tokens/definitions/ousd.js +2 -1
  233. package/_esm/tokens/definitions/ousd.js.map +1 -1
  234. package/_esm/utils/abi/decodeAbiParameters.js +37 -9
  235. package/_esm/utils/abi/decodeAbiParameters.js.map +1 -1
  236. package/_esm/utils/abi/encodeAbiParameters.js +6 -4
  237. package/_esm/utils/abi/encodeAbiParameters.js.map +1 -1
  238. package/_esm/utils/abi/encodePacked.js +5 -2
  239. package/_esm/utils/abi/encodePacked.js.map +1 -1
  240. package/_esm/utils/ccip.js +8 -3
  241. package/_esm/utils/ccip.js.map +1 -1
  242. package/_esm/utils/chain/getChainContractAddress.js +2 -2
  243. package/_esm/utils/chain/getChainContractAddress.js.map +1 -1
  244. package/_esm/utils/encoding/toBytes.js +5 -6
  245. package/_esm/utils/encoding/toBytes.js.map +1 -1
  246. package/_esm/utils/ens/avatar/utils.js +26 -5
  247. package/_esm/utils/ens/avatar/utils.js.map +1 -1
  248. package/_esm/utils/ens/localBatchGatewayRequest.js +17 -1
  249. package/_esm/utils/ens/localBatchGatewayRequest.js.map +1 -1
  250. package/_esm/utils/promise/createBatchScheduler.js +2 -1
  251. package/_esm/utils/promise/createBatchScheduler.js.map +1 -1
  252. package/_esm/utils/siwe/validateSiweMessage.js +6 -0
  253. package/_esm/utils/siwe/validateSiweMessage.js.map +1 -1
  254. package/_esm/zksync/actions/estimateFee.js +1 -1
  255. package/_esm/zksync/actions/estimateFee.js.map +1 -1
  256. package/_esm/zksync/actions/estimateGasL1ToL2.js +1 -1
  257. package/_esm/zksync/actions/estimateGasL1ToL2.js.map +1 -1
  258. package/_esm/zksync/actions/finalizeWithdrawal.js +3 -3
  259. package/_esm/zksync/actions/finalizeWithdrawal.js.map +1 -1
  260. package/_esm/zksync/actions/sendEip712Transaction.js +12 -2
  261. package/_esm/zksync/actions/sendEip712Transaction.js.map +1 -1
  262. package/_esm/zksync/actions/signEip712Transaction.js +2 -2
  263. package/_esm/zksync/actions/signEip712Transaction.js.map +1 -1
  264. package/_types/account-abstraction/actions/paymaster/getPaymasterData.d.ts.map +1 -1
  265. package/_types/account-abstraction/actions/paymaster/getPaymasterStubData.d.ts.map +1 -1
  266. package/_types/actions/ens/getEnsAddress.d.ts +2 -1
  267. package/_types/actions/ens/getEnsAddress.d.ts.map +1 -1
  268. package/_types/actions/ens/getEnsText.d.ts +2 -1
  269. package/_types/actions/ens/getEnsText.d.ts.map +1 -1
  270. package/_types/actions/index.d.ts +1 -0
  271. package/_types/actions/index.d.ts.map +1 -1
  272. package/_types/actions/public/call.d.ts.map +1 -1
  273. package/_types/actions/public/getDelegation.d.ts.map +1 -1
  274. package/_types/actions/public/getFeeHistory.d.ts +2 -1
  275. package/_types/actions/public/getFeeHistory.d.ts.map +1 -1
  276. package/_types/actions/public/getLogs.d.ts +20 -2
  277. package/_types/actions/public/getLogs.d.ts.map +1 -1
  278. package/_types/actions/public/internal/isRangeError.d.ts +3 -0
  279. package/_types/actions/public/internal/isRangeError.d.ts.map +1 -0
  280. package/_types/actions/public/internal/watchTransport.d.ts +6 -0
  281. package/_types/actions/public/internal/watchTransport.d.ts.map +1 -0
  282. package/_types/actions/public/iterateLogs.d.ts +94 -0
  283. package/_types/actions/public/iterateLogs.d.ts.map +1 -0
  284. package/_types/actions/public/simulateContract.d.ts.map +1 -1
  285. package/_types/actions/public/verifyHash.d.ts +2 -1
  286. package/_types/actions/public/verifyHash.d.ts.map +1 -1
  287. package/_types/actions/public/waitForTransactionReceipt.d.ts +7 -2
  288. package/_types/actions/public/waitForTransactionReceipt.d.ts.map +1 -1
  289. package/_types/actions/public/watchBlockHeaders.d.ts.map +1 -1
  290. package/_types/actions/public/watchBlockNumber.d.ts.map +1 -1
  291. package/_types/actions/public/watchBlocks.d.ts.map +1 -1
  292. package/_types/actions/public/watchContractEvent.d.ts.map +1 -1
  293. package/_types/actions/public/watchEvent.d.ts.map +1 -1
  294. package/_types/actions/token/internal.d.ts.map +1 -1
  295. package/_types/actions/wallet/deployContract.d.ts.map +1 -1
  296. package/_types/actions/wallet/prepareTransactionRequest.d.ts +3 -1
  297. package/_types/actions/wallet/prepareTransactionRequest.d.ts.map +1 -1
  298. package/_types/actions/wallet/sendCalls.d.ts.map +1 -1
  299. package/_types/actions/wallet/signAuthorization.d.ts.map +1 -1
  300. package/_types/celo/serializers.d.ts.map +1 -1
  301. package/_types/chains/definitions/kinetiqElysium.d.ts +52 -0
  302. package/_types/chains/definitions/kinetiqElysium.d.ts.map +1 -0
  303. package/_types/chains/definitions/kinetiqElysiumTestnet.d.ts +52 -0
  304. package/_types/chains/definitions/kinetiqElysiumTestnet.d.ts.map +1 -0
  305. package/_types/chains/index.d.ts +2 -0
  306. package/_types/chains/index.d.ts.map +1 -1
  307. package/_types/clients/decorators/public.d.ts +33 -0
  308. package/_types/clients/decorators/public.d.ts.map +1 -1
  309. package/_types/constants/contracts.d.ts +1 -1
  310. package/_types/constants/contracts.d.ts.map +1 -1
  311. package/_types/errors/typedData.d.ts.map +1 -1
  312. package/_types/errors/version.d.ts +1 -1
  313. package/_types/index.d.ts +2 -1
  314. package/_types/index.d.ts.map +1 -1
  315. package/_types/op-stack/actions/getL2Output.d.ts +6 -0
  316. package/_types/op-stack/actions/getL2Output.d.ts.map +1 -1
  317. package/_types/op-stack/actions/waitToProve.d.ts.map +1 -1
  318. package/_types/tempo/Account.d.ts +5 -1
  319. package/_types/tempo/Account.d.ts.map +1 -1
  320. package/_types/tempo/actions/accounts.d.ts +4 -1
  321. package/_types/tempo/actions/accounts.d.ts.map +1 -1
  322. package/_types/tempo/actions/earn/deployment.d.ts.map +1 -1
  323. package/_types/tempo/actions/propAmm.d.ts.map +1 -1
  324. package/_types/tempo/actions/token.d.ts.map +1 -1
  325. package/_types/tempo/chainConfig.d.ts.map +1 -1
  326. package/_types/tempo/internal/preAuthorized.d.ts +41 -0
  327. package/_types/tempo/internal/preAuthorized.d.ts.map +1 -0
  328. package/_types/tempo/internal/relay/feePayer.d.ts.map +1 -1
  329. package/_types/tempo/internal/utils.d.ts.map +1 -1
  330. package/_types/tokens/defineToken.d.ts +5 -1
  331. package/_types/tokens/defineToken.d.ts.map +1 -1
  332. package/_types/tokens/definitions/ousd.d.ts +2 -1
  333. package/_types/tokens/definitions/ousd.d.ts.map +1 -1
  334. package/_types/tokens/sets.d.ts +3 -0
  335. package/_types/tokens/sets.d.ts.map +1 -1
  336. package/_types/utils/abi/decodeAbiParameters.d.ts +15 -1
  337. package/_types/utils/abi/decodeAbiParameters.d.ts.map +1 -1
  338. package/_types/utils/abi/encodeAbiParameters.d.ts.map +1 -1
  339. package/_types/utils/ccip.d.ts +4 -3
  340. package/_types/utils/ccip.d.ts.map +1 -1
  341. package/_types/utils/encoding/toBytes.d.ts +1 -1
  342. package/_types/utils/encoding/toBytes.d.ts.map +1 -1
  343. package/_types/utils/ens/avatar/utils.d.ts +6 -2
  344. package/_types/utils/ens/avatar/utils.d.ts.map +1 -1
  345. package/_types/utils/ens/localBatchGatewayRequest.d.ts +6 -1
  346. package/_types/utils/ens/localBatchGatewayRequest.d.ts.map +1 -1
  347. package/_types/utils/promise/createBatchScheduler.d.ts.map +1 -1
  348. package/_types/utils/siwe/validateSiweMessage.d.ts.map +1 -1
  349. package/_types/zksync/actions/estimateFee.d.ts.map +1 -1
  350. package/_types/zksync/actions/estimateGasL1ToL2.d.ts.map +1 -1
  351. package/_types/zksync/actions/finalizeWithdrawal.d.ts.map +1 -1
  352. package/_types/zksync/actions/sendEip712Transaction.d.ts +1 -1
  353. package/_types/zksync/actions/sendEip712Transaction.d.ts.map +1 -1
  354. package/_types/zksync/errors/bridge.d.ts +1 -1
  355. package/_types/zksync/errors/bridge.d.ts.map +1 -1
  356. package/account-abstraction/actions/paymaster/getPaymasterData.ts +23 -16
  357. package/account-abstraction/actions/paymaster/getPaymasterStubData.ts +27 -16
  358. package/actions/ens/getEnsAddress.ts +15 -1
  359. package/actions/ens/getEnsText.ts +2 -0
  360. package/actions/index.ts +6 -0
  361. package/actions/public/call.ts +15 -2
  362. package/actions/public/getDelegation.ts +6 -1
  363. package/actions/public/getFeeHistory.ts +2 -0
  364. package/actions/public/getLogs.ts +44 -0
  365. package/actions/public/internal/isRangeError.ts +18 -0
  366. package/actions/public/internal/watchTransport.ts +29 -0
  367. package/actions/public/iterateLogs.ts +209 -0
  368. package/actions/public/simulateContract.ts +6 -4
  369. package/actions/public/verifyHash.ts +87 -60
  370. package/actions/public/waitForTransactionReceipt.ts +31 -1
  371. package/actions/public/watchBlockHeaders.ts +2 -12
  372. package/actions/public/watchBlockNumber.ts +6 -24
  373. package/actions/public/watchBlocks.ts +6 -24
  374. package/actions/public/watchContractEvent.ts +7 -42
  375. package/actions/public/watchEvent.ts +7 -42
  376. package/actions/token/internal.ts +2 -10
  377. package/actions/wallet/deployContract.ts +6 -1
  378. package/actions/wallet/prepareTransactionRequest.ts +25 -3
  379. package/actions/wallet/sendCalls.ts +6 -1
  380. package/actions/wallet/signAuthorization.ts +6 -1
  381. package/celo/serializers.ts +5 -2
  382. package/chains/definitions/kinetiqElysium.ts +27 -0
  383. package/chains/definitions/kinetiqElysiumTestnet.ts +28 -0
  384. package/chains/index.ts +2 -0
  385. package/clients/decorators/public.ts +47 -0
  386. package/constants/contracts.ts +1 -1
  387. package/errors/chain.ts +2 -2
  388. package/errors/typedData.ts +2 -0
  389. package/errors/version.ts +1 -1
  390. package/index.ts +7 -0
  391. package/op-stack/actions/buildProveWithdrawal.ts +5 -5
  392. package/op-stack/actions/getL2Output.ts +24 -11
  393. package/op-stack/actions/waitToProve.ts +1 -0
  394. package/package.json +2 -2
  395. package/tempo/Account.ts +38 -1
  396. package/tempo/actions/accessKey.ts +1 -1
  397. package/tempo/actions/accounts.ts +29 -11
  398. package/tempo/actions/earn/deployment.ts +2 -1
  399. package/tempo/actions/earn.ts +2 -2
  400. package/tempo/actions/propAmm.ts +2 -1
  401. package/tempo/actions/token.ts +10 -2
  402. package/tempo/chainConfig.ts +53 -5
  403. package/tempo/internal/preAuthorized.ts +309 -0
  404. package/tempo/internal/relay/feePayer.ts +33 -11
  405. package/tempo/internal/relay.ts +8 -3
  406. package/tempo/internal/utils.ts +2 -10
  407. package/tokens/defineToken.ts +6 -2
  408. package/tokens/definitions/ousd.ts +2 -1
  409. package/utils/abi/decodeAbiParameters.ts +60 -9
  410. package/utils/abi/encodeAbiParameters.ts +6 -4
  411. package/utils/abi/encodePacked.ts +5 -1
  412. package/utils/ccip.ts +17 -3
  413. package/utils/chain/getChainContractAddress.ts +2 -2
  414. package/utils/encoding/toBytes.ts +4 -6
  415. package/utils/ens/avatar/utils.ts +38 -4
  416. package/utils/ens/localBatchGatewayRequest.ts +21 -2
  417. package/utils/promise/createBatchScheduler.ts +2 -1
  418. package/utils/siwe/validateSiweMessage.ts +7 -0
  419. package/zksync/actions/estimateFee.ts +2 -1
  420. package/zksync/actions/estimateGasL1ToL2.ts +2 -1
  421. package/zksync/actions/finalizeWithdrawal.ts +4 -3
  422. package/zksync/actions/sendEip712Transaction.ts +21 -8
  423. package/zksync/actions/signEip712Transaction.ts +3 -3
  424. package/zksync/errors/bridge.ts +1 -1
@@ -195,6 +195,11 @@ import {
195
195
  type GetTransactionReceiptReturnType,
196
196
  getTransactionReceipt,
197
197
  } from '../../actions/public/getTransactionReceipt.js'
198
+ import {
199
+ type IterateLogsParameters,
200
+ type IterateLogsReturnType,
201
+ iterateLogs,
202
+ } from '../../actions/public/iterateLogs.js'
198
203
  import {
199
204
  type MulticallParameters,
200
205
  type MulticallReturnType,
@@ -1529,6 +1534,47 @@ export type PublicActions<
1529
1534
  getTransactionReceipt: (
1530
1535
  args: GetTransactionReceiptParameters,
1531
1536
  ) => Promise<GetTransactionReceiptReturnType<chain>>
1537
+ /**
1538
+ * Iterates over the event logs in a block range, one page of blocks at a time.
1539
+ *
1540
+ * - Docs: https://viem.sh/docs/actions/public/iterateLogs
1541
+ * - JSON-RPC Methods: [`eth_getLogs`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getlogs)
1542
+ *
1543
+ * Pages are contiguous and are yielded even when they contain no logs, so a consumer that
1544
+ * stores each page's `toBlock` can resume from `toBlock + 1n`. A page is only requested
1545
+ * once the consumer asks for it. If a request fails with an error that a smaller block
1546
+ * range may avoid (such as an RPC Provider's block range or response size limit), the page
1547
+ * is halved and requested again.
1548
+ *
1549
+ * @param args - {@link IterateLogsParameters}
1550
+ * @returns An async iterator of log pages. {@link IterateLogsReturnType}
1551
+ *
1552
+ * @example
1553
+ * import { createPublicClient, http, parseAbiItem } from 'viem'
1554
+ * import { mainnet } from 'viem/chains'
1555
+ *
1556
+ * const client = createPublicClient({
1557
+ * chain: mainnet,
1558
+ * transport: http(),
1559
+ * })
1560
+ * for await (const page of client.iterateLogs({
1561
+ * event: parseAbiItem('event Transfer(address indexed, address indexed, uint256)'),
1562
+ * fromBlock: 16330000n,
1563
+ * toBlock: 16340000n,
1564
+ * })) {
1565
+ * console.log(page.toBlock, page.logs)
1566
+ * }
1567
+ */
1568
+ iterateLogs: <
1569
+ const abiEvent extends AbiEvent | undefined = undefined,
1570
+ const abiEvents extends
1571
+ | readonly AbiEvent[]
1572
+ | readonly unknown[]
1573
+ | undefined = abiEvent extends AbiEvent ? [abiEvent] : undefined,
1574
+ strict extends boolean | undefined = undefined,
1575
+ >(
1576
+ args: IterateLogsParameters<abiEvent, abiEvents, strict>,
1577
+ ) => IterateLogsReturnType<abiEvent, abiEvents, strict>
1532
1578
  /**
1533
1579
  * Similar to [`readContract`](https://viem.sh/docs/contract/readContract), but batches up multiple functions on a contract in a single RPC call via the [`multicall3` contract](https://github.com/mds1/multicall).
1534
1580
  *
@@ -2373,6 +2419,7 @@ export function publicActions<
2373
2419
  getTransactionConfirmations(client, args),
2374
2420
  getTransactionCount: (args) => getTransactionCount(client, args),
2375
2421
  getTransactionReceipt: (args) => getTransactionReceipt(client, args),
2422
+ iterateLogs: (args) => iterateLogs(client, args as any),
2376
2423
  multicall: (args) => multicall(client, args),
2377
2424
  prepareTransactionRequest: (args) =>
2378
2425
  prepareTransactionRequest(client as any, args as any) as any,
@@ -5,7 +5,7 @@ export const deploylessCallViaFactoryBytecode =
5
5
  '0x608060405234801561001057600080fd5b506040516102c03803806102c083398101604081905261002f916101e6565b836001600160a01b03163b6000036100e457600080836001600160a01b03168360405161005c9190610270565b6000604051808303816000865af19150503d8060008114610099576040519150601f19603f3d011682016040523d82523d6000602084013e61009e565b606091505b50915091508115806100b857506001600160a01b0386163b155b156100e1578060405163101bb98d60e01b81526004016100d8919061028c565b60405180910390fd5b50505b6000808451602086016000885af16040513d6000823e81610103573d81fd5b3d81f35b80516001600160a01b038116811461011e57600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b60005b8381101561015457818101518382015260200161013c565b50506000910152565b600082601f83011261016e57600080fd5b81516001600160401b0381111561018757610187610123565b604051601f8201601f19908116603f011681016001600160401b03811182821017156101b5576101b5610123565b6040528181528382016020018510156101cd57600080fd5b6101de826020830160208701610139565b949350505050565b600080600080608085870312156101fc57600080fd5b61020585610107565b60208601519094506001600160401b0381111561022157600080fd5b61022d8782880161015d565b93505061023c60408601610107565b60608601519092506001600160401b0381111561025857600080fd5b6102648782880161015d565b91505092959194509250565b60008251610282818460208701610139565b9190910192915050565b60208152600082518060208401526102ab816040850160208701610139565b601f01601f1916919091016040019291505056fe'
6
6
 
7
7
  export const erc6492SignatureValidatorByteCode =
8
- '0x608060405234801561001057600080fd5b5060405161069438038061069483398101604081905261002f9161051e565b600061003c848484610048565b9050806000526001601ff35b60007f64926492649264926492649264926492649264926492649264926492649264926100748361040c565b036101e7576000606080848060200190518101906100929190610577565b60405192955090935091506000906001600160a01b038516906100b69085906105dd565b6000604051808303816000865af19150503d80600081146100f3576040519150601f19603f3d011682016040523d82523d6000602084013e6100f8565b606091505b50509050876001600160a01b03163b60000361016057806101605760405162461bcd60e51b815260206004820152601e60248201527f5369676e617475726556616c696461746f723a206465706c6f796d656e74000060448201526064015b60405180910390fd5b604051630b135d3f60e11b808252906001600160a01b038a1690631626ba7e90610190908b9087906004016105f9565b602060405180830381865afa1580156101ad573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906101d19190610633565b6001600160e01b03191614945050505050610405565b6001600160a01b0384163b1561027a57604051630b135d3f60e11b808252906001600160a01b03861690631626ba7e9061022790879087906004016105f9565b602060405180830381865afa158015610244573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102689190610633565b6001600160e01b031916149050610405565b81516041146102df5760405162461bcd60e51b815260206004820152603a602482015260008051602061067483398151915260448201527f3a20696e76616c6964207369676e6174757265206c656e6774680000000000006064820152608401610157565b6102e7610425565b5060208201516040808401518451859392600091859190811061030c5761030c61065d565b016020015160f81c9050601b811480159061032b57508060ff16601c14155b1561038c5760405162461bcd60e51b815260206004820152603b602482015260008051602061067483398151915260448201527f3a20696e76616c6964207369676e617475726520762076616c756500000000006064820152608401610157565b60408051600081526020810180835289905260ff83169181019190915260608101849052608081018390526001600160a01b0389169060019060a0016020604051602081039080840390855afa1580156103ea573d6000803e3d6000fd5b505050602060405103516001600160a01b0316149450505050505b9392505050565b600060208251101561041d57600080fd5b508051015190565b60405180606001604052806003906020820280368337509192915050565b6001600160a01b038116811461045857600080fd5b50565b634e487b7160e01b600052604160045260246000fd5b60005b8381101561048c578181015183820152602001610474565b50506000910152565b600082601f8301126104a657600080fd5b81516001600160401b038111156104bf576104bf61045b565b604051601f8201601f19908116603f011681016001600160401b03811182821017156104ed576104ed61045b565b60405281815283820160200185101561050557600080fd5b610516826020830160208701610471565b949350505050565b60008060006060848603121561053357600080fd5b835161053e81610443565b6020850151604086015191945092506001600160401b0381111561056157600080fd5b61056d86828701610495565b9150509250925092565b60008060006060848603121561058c57600080fd5b835161059781610443565b60208501519093506001600160401b038111156105b357600080fd5b6105bf86828701610495565b604086015190935090506001600160401b0381111561056157600080fd5b600082516105ef818460208701610471565b9190910192915050565b828152604060208201526000825180604084015261061e816060850160208701610471565b601f01601f1916919091016060019392505050565b60006020828403121561064557600080fd5b81516001600160e01b03198116811461040557600080fd5b634e487b7160e01b600052603260045260246000fdfe5369676e617475726556616c696461746f72237265636f7665725369676e6572'
8
+ '0x608060405234801561001057600080fd5b506040516106ad3803806106ad83398101604081905261002f91610537565b600061003c848484610048565b9050806000526001601ff35b60007f649264926492649264926492649264926492649264926492649264926492649261007483610425565b036101e7576000606080848060200190518101906100929190610590565b60405192955090935091506000906001600160a01b038516906100b69085906105f6565b6000604051808303816000865af19150503d80600081146100f3576040519150601f19603f3d011682016040523d82523d6000602084013e6100f8565b606091505b50509050876001600160a01b03163b60000361016057806101605760405162461bcd60e51b815260206004820152601e60248201527f5369676e617475726556616c696461746f723a206465706c6f796d656e74000060448201526064015b60405180910390fd5b604051630b135d3f60e11b808252906001600160a01b038a1690631626ba7e90610190908b908790600401610612565b602060405180830381865afa1580156101ad573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906101d1919061064c565b6001600160e01b0319161494505050505061041e565b6001600160a01b0384163b1561027a57604051630b135d3f60e11b808252906001600160a01b03861690631626ba7e906102279087908790600401610612565b602060405180830381865afa158015610244573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610268919061064c565b6001600160e01b03191614905061041e565b81516041146102df5760405162461bcd60e51b815260206004820152603a602482015260008051602061068d83398151915260448201527f3a20696e76616c6964207369676e6174757265206c656e6774680000000000006064820152608401610157565b6102e761043e565b5060208201516040808401518451859392600091859190811061030c5761030c610676565b016020015160f81c9050601b811480159061032b57508060ff16601c14155b1561038c5760405162461bcd60e51b815260206004820152603b602482015260008051602061068d83398151915260448201527f3a20696e76616c6964207369676e617475726520762076616c756500000000006064820152608401610157565b604080516000808252602082018084528a905260ff841692820192909252606081018590526080810184905260019060a0016020604051602081039080840390855afa1580156103e0573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b038116158015906104165750886001600160a01b0316816001600160a01b0316145b955050505050505b9392505050565b600060208251101561043657600080fd5b508051015190565b60405180606001604052806003906020820280368337509192915050565b6001600160a01b038116811461047157600080fd5b50565b634e487b7160e01b600052604160045260246000fd5b60005b838110156104a557818101518382015260200161048d565b50506000910152565b600082601f8301126104bf57600080fd5b81516001600160401b038111156104d8576104d8610474565b604051601f8201601f19908116603f011681016001600160401b038111828210171561050657610506610474565b60405281815283820160200185101561051e57600080fd5b61052f82602083016020870161048a565b949350505050565b60008060006060848603121561054c57600080fd5b83516105578161045c565b6020850151604086015191945092506001600160401b0381111561057a57600080fd5b610586868287016104ae565b9150509250925092565b6000806000606084860312156105a557600080fd5b83516105b08161045c565b60208501519093506001600160401b038111156105cc57600080fd5b6105d8868287016104ae565b604086015190935090506001600160401b0381111561057a57600080fd5b6000825161060881846020870161048a565b9190910192915050565b828152604060208201526000825180604084015261063781606085016020870161048a565b601f01601f1916919091016060019392505050565b60006020828403121561065e57600080fd5b81516001600160e01b03198116811461041e57600080fd5b634e487b7160e01b600052603260045260246000fdfe5369676e617475726556616c696461746f72237265636f7665725369676e6572'
9
9
 
10
10
  export const multicall3Bytecode =
11
11
  '0x608060405234801561001057600080fd5b506115b9806100206000396000f3fe6080604052600436106100f35760003560e01c80634d2301cc1161008a578063a8b0574e11610059578063a8b0574e14610325578063bce38bd714610350578063c3077fa914610380578063ee82ac5e146103b2576100f3565b80634d2301cc1461026257806372425d9d1461029f57806382ad56cb146102ca57806386d516e8146102fa576100f3565b80633408e470116100c65780633408e470146101af578063399542e9146101da5780633e64a6961461020c57806342cbb15c14610237576100f3565b80630f28c97d146100f8578063174dea7114610123578063252dba421461015357806327e86d6e14610184575b600080fd5b34801561010457600080fd5b5061010d6103ef565b60405161011a9190610c0a565b60405180910390f35b61013d60048036038101906101389190610c94565b6103f7565b60405161014a9190610e94565b60405180910390f35b61016d60048036038101906101689190610f0c565b610615565b60405161017b92919061101b565b60405180910390f35b34801561019057600080fd5b506101996107ab565b6040516101a69190611064565b60405180910390f35b3480156101bb57600080fd5b506101c46107b7565b6040516101d19190610c0a565b60405180910390f35b6101f460048036038101906101ef91906110ab565b6107bf565b6040516102039392919061110b565b60405180910390f35b34801561021857600080fd5b506102216107e1565b60405161022e9190610c0a565b60405180910390f35b34801561024357600080fd5b5061024c6107e9565b6040516102599190610c0a565b60405180910390f35b34801561026e57600080fd5b50610289600480360381019061028491906111a7565b6107f1565b6040516102969190610c0a565b60405180910390f35b3480156102ab57600080fd5b506102b4610812565b6040516102c19190610c0a565b60405180910390f35b6102e460048036038101906102df919061122a565b61081a565b6040516102f19190610e94565b60405180910390f35b34801561030657600080fd5b5061030f6109e4565b60405161031c9190610c0a565b60405180910390f35b34801561033157600080fd5b5061033a6109ec565b6040516103479190611286565b60405180910390f35b61036a600480360381019061036591906110ab565b6109f4565b6040516103779190610e94565b60405180910390f35b61039a60048036038101906103959190610f0c565b610ba6565b6040516103a99392919061110b565b60405180910390f35b3480156103be57600080fd5b506103d960048036038101906103d491906112cd565b610bca565b6040516103e69190611064565b60405180910390f35b600042905090565b60606000808484905090508067ffffffffffffffff81111561041c5761041b6112fa565b5b60405190808252806020026020018201604052801561045557816020015b610442610bd5565b81526020019060019003908161043a5790505b5092503660005b828110156105c957600085828151811061047957610478611329565b5b6020026020010151905087878381811061049657610495611329565b5b90506020028101906104a89190611367565b925060008360400135905080860195508360000160208101906104cb91906111a7565b73ffffffffffffffffffffffffffffffffffffffff16818580606001906104f2919061138f565b604051610500929190611431565b60006040518083038185875af1925050503d806000811461053d576040519150601f19603f3d011682016040523d82523d6000602084013e610542565b606091505b5083600001846020018290528215151515815250505081516020850135176105bc577f08c379a000000000000000000000000000000000000000000000000000000000600052602060045260176024527f4d756c746963616c6c333a2063616c6c206661696c656400000000000000000060445260846000fd5b826001019250505061045c565b5082341461060c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610603906114a7565b60405180910390fd5b50505092915050565b6000606043915060008484905090508067ffffffffffffffff81111561063e5761063d6112fa565b5b60405190808252806020026020018201604052801561067157816020015b606081526020019060019003908161065c5790505b5091503660005b828110156107a157600087878381811061069557610694611329565b5b90506020028101906106a791906114c7565b92508260000160208101906106bc91906111a7565b73ffffffffffffffffffffffffffffffffffffffff168380602001906106e2919061138f565b6040516106f0929190611431565b6000604051808303816000865af19150503d806000811461072d576040519150601f19603f3d011682016040523d82523d6000602084013e610732565b606091505b5086848151811061074657610745611329565b5b60200260200101819052819250505080610795576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161078c9061153b565b60405180910390fd5b81600101915050610678565b5050509250929050565b60006001430340905090565b600046905090565b6000806060439250434091506107d68686866109f4565b905093509350939050565b600048905090565b600043905090565b60008173ffffffffffffffffffffffffffffffffffffffff16319050919050565b600044905090565b606060008383905090508067ffffffffffffffff81111561083e5761083d6112fa565b5b60405190808252806020026020018201604052801561087757816020015b610864610bd5565b81526020019060019003908161085c5790505b5091503660005b828110156109db57600084828151811061089b5761089a611329565b5b602002602001015190508686838181106108b8576108b7611329565b5b90506020028101906108ca919061155b565b92508260000160208101906108df91906111a7565b73ffffffffffffffffffffffffffffffffffffffff16838060400190610905919061138f565b604051610913929190611431565b6000604051808303816000865af19150503d8060008114610950576040519150601f19603f3d011682016040523d82523d6000602084013e610955565b606091505b5082600001836020018290528215151515815250505080516020840135176109cf577f08c379a000000000000000000000000000000000000000000000000000000000600052602060045260176024527f4d756c746963616c6c333a2063616c6c206661696c656400000000000000000060445260646000fd5b8160010191505061087e565b50505092915050565b600045905090565b600041905090565b606060008383905090508067ffffffffffffffff811115610a1857610a176112fa565b5b604051908082528060200260200182016040528015610a5157816020015b610a3e610bd5565b815260200190600190039081610a365790505b5091503660005b82811015610b9c576000848281518110610a7557610a74611329565b5b60200260200101519050868683818110610a9257610a91611329565b5b9050602002810190610aa491906114c7565b9250826000016020810190610ab991906111a7565b73ffffffffffffffffffffffffffffffffffffffff16838060200190610adf919061138f565b604051610aed929190611431565b6000604051808303816000865af19150503d8060008114610b2a576040519150601f19603f3d011682016040523d82523d6000602084013e610b2f565b606091505b508260000183602001829052821515151581525050508715610b90578060000151610b8f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b869061153b565b60405180910390fd5b5b81600101915050610a58565b5050509392505050565b6000806060610bb7600186866107bf565b8093508194508295505050509250925092565b600081409050919050565b6040518060400160405280600015158152602001606081525090565b6000819050919050565b610c0481610bf1565b82525050565b6000602082019050610c1f6000830184610bfb565b92915050565b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b60008083601f840112610c5457610c53610c2f565b5b8235905067ffffffffffffffff811115610c7157610c70610c34565b5b602083019150836020820283011115610c8d57610c8c610c39565b5b9250929050565b60008060208385031215610cab57610caa610c25565b5b600083013567ffffffffffffffff811115610cc957610cc8610c2a565b5b610cd585828601610c3e565b92509250509250929050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b60008115159050919050565b610d2281610d0d565b82525050565b600081519050919050565b600082825260208201905092915050565b60005b83811015610d62578082015181840152602081019050610d47565b83811115610d71576000848401525b50505050565b6000601f19601f8301169050919050565b6000610d9382610d28565b610d9d8185610d33565b9350610dad818560208601610d44565b610db681610d77565b840191505092915050565b6000604083016000830151610dd96000860182610d19565b5060208301518482036020860152610df18282610d88565b9150508091505092915050565b6000610e0a8383610dc1565b905092915050565b6000602082019050919050565b6000610e2a82610ce1565b610e348185610cec565b935083602082028501610e4685610cfd565b8060005b85811015610e825784840389528151610e638582610dfe565b9450610e6e83610e12565b925060208a01995050600181019050610e4a565b50829750879550505050505092915050565b60006020820190508181036000830152610eae8184610e1f565b905092915050565b60008083601f840112610ecc57610ecb610c2f565b5b8235905067ffffffffffffffff811115610ee957610ee8610c34565b5b602083019150836020820283011115610f0557610f04610c39565b5b9250929050565b60008060208385031215610f2357610f22610c25565b5b600083013567ffffffffffffffff811115610f4157610f40610c2a565b5b610f4d85828601610eb6565b92509250509250929050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b6000610f918383610d88565b905092915050565b6000602082019050919050565b6000610fb182610f59565b610fbb8185610f64565b935083602082028501610fcd85610f75565b8060005b858110156110095784840389528151610fea8582610f85565b9450610ff583610f99565b925060208a01995050600181019050610fd1565b50829750879550505050505092915050565b60006040820190506110306000830185610bfb565b81810360208301526110428184610fa6565b90509392505050565b6000819050919050565b61105e8161104b565b82525050565b60006020820190506110796000830184611055565b92915050565b61108881610d0d565b811461109357600080fd5b50565b6000813590506110a58161107f565b92915050565b6000806000604084860312156110c4576110c3610c25565b5b60006110d286828701611096565b935050602084013567ffffffffffffffff8111156110f3576110f2610c2a565b5b6110ff86828701610eb6565b92509250509250925092565b60006060820190506111206000830186610bfb565b61112d6020830185611055565b818103604083015261113f8184610e1f565b9050949350505050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600061117482611149565b9050919050565b61118481611169565b811461118f57600080fd5b50565b6000813590506111a18161117b565b92915050565b6000602082840312156111bd576111bc610c25565b5b60006111cb84828501611192565b91505092915050565b60008083601f8401126111ea576111e9610c2f565b5b8235905067ffffffffffffffff81111561120757611206610c34565b5b60208301915083602082028301111561122357611222610c39565b5b9250929050565b6000806020838503121561124157611240610c25565b5b600083013567ffffffffffffffff81111561125f5761125e610c2a565b5b61126b858286016111d4565b92509250509250929050565b61128081611169565b82525050565b600060208201905061129b6000830184611277565b92915050565b6112aa81610bf1565b81146112b557600080fd5b50565b6000813590506112c7816112a1565b92915050565b6000602082840312156112e3576112e2610c25565b5b60006112f1848285016112b8565b91505092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b600080fd5b600080fd5b600080fd5b60008235600160800383360303811261138357611382611358565b5b80830191505092915050565b600080833560016020038436030381126113ac576113ab611358565b5b80840192508235915067ffffffffffffffff8211156113ce576113cd61135d565b5b6020830192506001820236038313156113ea576113e9611362565b5b509250929050565b600081905092915050565b82818337600083830152505050565b600061141883856113f2565b93506114258385846113fd565b82840190509392505050565b600061143e82848661140c565b91508190509392505050565b600082825260208201905092915050565b7f4d756c746963616c6c333a2076616c7565206d69736d61746368000000000000600082015250565b6000611491601a8361144a565b915061149c8261145b565b602082019050919050565b600060208201905081810360008301526114c081611484565b9050919050565b6000823560016040038336030381126114e3576114e2611358565b5b80830191505092915050565b7f4d756c746963616c6c333a2063616c6c206661696c6564000000000000000000600082015250565b600061152560178361144a565b9150611530826114ef565b602082019050919050565b6000602082019050818103600083015261155481611518565b9050919050565b60008235600160600383360303811261157757611576611358565b5b8083019150509291505056fea264697066735822122020c1bc9aacf8e4a6507193432a895a8e77094f45a1395583f07b24e860ef06cd64736f6c634300080c0033'
package/errors/chain.ts CHANGED
@@ -21,8 +21,8 @@ export class ChainDoesNotSupportContract extends BaseError {
21
21
  {
22
22
  metaMessages: [
23
23
  'This could be due to any of the following:',
24
- ...(blockNumber &&
25
- contract.blockCreated &&
24
+ ...(blockNumber !== undefined &&
25
+ contract.blockCreated !== undefined &&
26
26
  contract.blockCreated > blockNumber
27
27
  ? [
28
28
  `- The contract "${contract.name}" was not deployed until block ${contract.blockCreated} (current block ${blockNumber}).`,
@@ -10,6 +10,7 @@ export class InvalidDomainError extends BaseError {
10
10
  constructor({ domain }: { domain: unknown }) {
11
11
  super(`Invalid domain "${stringify(domain)}".`, {
12
12
  metaMessages: ['Must be a valid EIP-712 domain.'],
13
+ name: 'InvalidDomainError',
13
14
  })
14
15
  }
15
16
  }
@@ -27,6 +28,7 @@ export class InvalidPrimaryTypeError extends BaseError {
27
28
  {
28
29
  docsPath: '/api/glossary/Errors#typeddatainvalidprimarytypeerror',
29
30
  metaMessages: ['Check that the primary type is a key in `types`.'],
31
+ name: 'InvalidPrimaryTypeError',
30
32
  },
31
33
  )
32
34
  }
package/errors/version.ts CHANGED
@@ -1 +1 @@
1
- export const version = '2.57.17'
1
+ export const version = '2.57.19'
package/index.ts CHANGED
@@ -272,6 +272,11 @@ export type {
272
272
  GetTransactionReceiptParameters,
273
273
  GetTransactionReceiptReturnType,
274
274
  } from './actions/public/getTransactionReceipt.js'
275
+ export type {
276
+ IterateLogsErrorType,
277
+ IterateLogsParameters,
278
+ IterateLogsReturnType,
279
+ } from './actions/public/iterateLogs.js'
275
280
  export type {
276
281
  MulticallErrorType,
277
282
  MulticallParameters,
@@ -1333,6 +1338,8 @@ export type {
1333
1338
  } from './types/utils.js'
1334
1339
  export type { Withdrawal } from './types/withdrawal.js'
1335
1340
  export {
1341
+ AbiDecodingSizeLimitExceededError,
1342
+ type AbiDecodingSizeLimitExceededErrorType,
1336
1343
  type DecodeAbiParametersErrorType,
1337
1344
  type DecodeAbiParametersReturnType,
1338
1345
  decodeAbiParameters,
@@ -124,10 +124,10 @@ export async function buildProveWithdrawal<
124
124
  const { account, chain = client.chain, game, output, withdrawal } = args
125
125
 
126
126
  const { withdrawalHash } = withdrawal
127
- const { l2BlockNumber } = game ?? output
128
- const blockNumber = game?.usesSuperRoots
127
+ const { l2BlockNumber, usesSuperRoots } = game ?? output
128
+ const blockNumber = usesSuperRoots
129
129
  ? await getL2BlockNumberAtTimestamp(client, {
130
- timestamp: game.l2BlockNumber,
130
+ timestamp: l2BlockNumber,
131
131
  })
132
132
  : l2BlockNumber
133
133
 
@@ -143,9 +143,9 @@ export async function buildProveWithdrawal<
143
143
  }),
144
144
  ])
145
145
 
146
- if (game?.usesSuperRoots && block.timestamp !== game.l2BlockNumber)
146
+ if (usesSuperRoots && block.timestamp !== l2BlockNumber)
147
147
  throw new Error(
148
- `L2 block timestamp ${block.timestamp} does not match dispute game timestamp ${game.l2BlockNumber}.`,
148
+ `L2 block timestamp ${block.timestamp} does not match dispute game timestamp ${l2BlockNumber}.`,
149
149
  )
150
150
 
151
151
  return {
@@ -46,7 +46,13 @@ export type GetL2OutputReturnType = {
46
46
  outputIndex: bigint
47
47
  outputRoot: Hex
48
48
  timestamp: bigint
49
+ /**
50
+ * L2 block number of the output. For super-root dispute games, this value is
51
+ * the L2 timestamp instead. Check `usesSuperRoots` to distinguish the unit.
52
+ */
49
53
  l2BlockNumber: bigint
54
+ /** Whether the output comes from a super-root dispute game. */
55
+ usesSuperRoots?: boolean | undefined
50
56
  }
51
57
  export type GetL2OutputErrorType = ReadContractErrorType | ErrorType
52
58
 
@@ -84,18 +90,25 @@ export async function getL2Output<
84
90
  ): Promise<GetL2OutputReturnType> {
85
91
  const { chain = client.chain, l2BlockNumber, targetChain } = parameters
86
92
 
87
- const version = await getPortalVersion(
88
- client,
89
- parameters as GetPortalVersionParameters,
90
- )
93
+ // Without a portal, read the L2OutputOracle directly.
94
+ if (
95
+ parameters.portalAddress ||
96
+ (targetChain as unknown as TargetChain | undefined)?.contracts.portal
97
+ ) {
98
+ const version = await getPortalVersion(
99
+ client,
100
+ parameters as GetPortalVersionParameters,
101
+ )
91
102
 
92
- if (version.major >= 3) {
93
- const game = await getGame(client, parameters as GetGameParameters)
94
- return {
95
- l2BlockNumber: game.l2BlockNumber,
96
- outputIndex: game.index,
97
- outputRoot: game.rootClaim,
98
- timestamp: game.timestamp,
103
+ if (version.major >= 3) {
104
+ const game = await getGame(client, parameters as GetGameParameters)
105
+ return {
106
+ l2BlockNumber: game.l2BlockNumber,
107
+ outputIndex: game.index,
108
+ outputRoot: game.rootClaim,
109
+ timestamp: game.timestamp,
110
+ usesSuperRoots: game.usesSuperRoots,
111
+ }
99
112
  }
100
113
  }
101
114
 
@@ -198,6 +198,7 @@ export async function waitToProve<
198
198
  outputIndex: game.index,
199
199
  outputRoot: game.rootClaim,
200
200
  timestamp: game.timestamp,
201
+ usesSuperRoots: game.usesSuperRoots,
201
202
  },
202
203
  withdrawal,
203
204
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "viem",
3
3
  "description": "TypeScript Interface for Ethereum",
4
- "version": "2.57.17",
4
+ "version": "2.57.19",
5
5
  "main": "./_cjs/index.js",
6
6
  "module": "./_esm/index.js",
7
7
  "types": "./_types/index.d.ts",
@@ -233,7 +233,7 @@
233
233
  "@scure/bip39": "1.6.0",
234
234
  "abitype": "1.2.3",
235
235
  "isows": "1.0.7",
236
- "ox": "0.14.63",
236
+ "ox": "0.14.65",
237
237
  "ws": "8.21.0"
238
238
  },
239
239
  "license": "MIT",
package/tempo/Account.ts CHANGED
@@ -9,6 +9,7 @@ import {
9
9
  Channel,
10
10
  KeyAuthorization,
11
11
  SignatureEnvelope,
12
+ SignaturePreAuthorized,
12
13
  } from 'ox/tempo'
13
14
  import * as WebAuthnP256 from 'ox/WebAuthnP256'
14
15
  import * as WebCryptoP256 from 'ox/WebCryptoP256'
@@ -80,7 +81,11 @@ export type AccessKeyAccount = Omit<Account_base<'accessKey'>, 'keyType'> & {
80
81
  * Signs a hash.
81
82
  *
82
83
  * By default, access key accounts sign through a keychain envelope so the
83
- * signature authorizes the parent account.
84
+ * signature authorizes the parent account. While the account's key
85
+ * authorization manager holds the key authorization the account was created
86
+ * with, `sign`, `signMessage`, and `signTypedData` return a pre-authorized
87
+ * signature (TIP-1165) that bundles it, so `verifyHash` accepts the signature
88
+ * before the chain registers the access key.
84
89
  *
85
90
  * Set `raw` to `true` to sign directly with the access key, without keychain
86
91
  * hashing or keychain enveloping.
@@ -1408,10 +1413,42 @@ function fromAccessKey(parameters: fromAccessKey.Parameters): AccessKeyAccount {
1408
1413
  keyAuthorizationManager,
1409
1414
  parentAddress,
1410
1415
  })
1416
+
1417
+ // While the manager holds the access key's unregistered authorization, signatures
1418
+ // carry it (TIP-1165) so verifiers accept them before the chain registers the key.
1419
+ async function preAuthorize(signature: Hex.Hex) {
1420
+ const { internal_version = 'v2' } = parameters
1421
+ if (!keyAuthorization || !keyAuthorizationManager) return signature
1422
+ if (internal_version !== 'v2') return signature
1423
+ const pending = await keyAuthorizationManager.get({
1424
+ address: account.address,
1425
+ accessKey: accessKeyAddress,
1426
+ chainId: Number(keyAuthorization.chainId),
1427
+ })
1428
+ if (!pending) return signature
1429
+ return SignaturePreAuthorized.wrap({
1430
+ keyAuthorization: pending,
1431
+ signature: SignatureEnvelope.from(
1432
+ signature,
1433
+ ) as SignatureEnvelope.Keychain,
1434
+ })
1435
+ }
1436
+
1411
1437
  return {
1412
1438
  ...account,
1413
1439
  accessKeyAddress,
1414
1440
  keyAuthorizationManager,
1441
+ async sign(parameters: { hash: Hex.Hex; raw?: boolean | undefined }) {
1442
+ const signature = await account.sign(parameters)
1443
+ if (parameters.raw) return signature
1444
+ return await preAuthorize(signature)
1445
+ },
1446
+ async signMessage(parameters) {
1447
+ return await preAuthorize(await account.signMessage(parameters))
1448
+ },
1449
+ async signTypedData(typedData) {
1450
+ return await preAuthorize(await account.signTypedData(typedData))
1451
+ },
1415
1452
  source: 'accessKey',
1416
1453
  }
1417
1454
  }
@@ -178,7 +178,7 @@ export namespace authorize {
178
178
  witness,
179
179
  ...rest
180
180
  } = parameters
181
- const account_ = rest.account ?? client.account
181
+ const { account: account_ = client.account } = rest
182
182
  if (!account_) throw new Error('account is required.')
183
183
  if (!chainId) throw new Error('chainId is required.')
184
184
  const keyAuthorization = await signLocal(client, {
@@ -3,13 +3,17 @@ import type * as Hex from 'ox/Hex'
3
3
  import type * as RpcSchema from 'ox/RpcSchema'
4
4
  import { AccountConfig, AccountOperation, type RpcSchemaTempo } from 'ox/tempo'
5
5
  import type { Account } from '../../accounts/types.js'
6
- import type { ReadContractReturnType } from '../../actions/public/readContract.js'
6
+ import type {
7
+ ReadContractErrorType,
8
+ ReadContractReturnType,
9
+ } from '../../actions/public/readContract.js'
7
10
  import { readContract } from '../../actions/public/readContract.js'
8
11
  import type { WriteContractReturnType } from '../../actions/wallet/writeContract.js'
9
12
  import { writeContract } from '../../actions/wallet/writeContract.js'
10
13
  import { writeContractSync } from '../../actions/wallet/writeContractSync.js'
11
14
  import type { Client } from '../../clients/createClient.js'
12
15
  import type { Transport } from '../../clients/transports/createTransport.js'
16
+ import { zeroHash } from '../../constants/bytes.js'
13
17
  import type { BaseErrorType } from '../../errors/base.js'
14
18
  import type { Chain } from '../../types/chain.js'
15
19
  import type { Log } from '../../types/log.js'
@@ -156,6 +160,9 @@ export declare namespace getConfig {
156
160
  /**
157
161
  * Gets the current configuration commitment for a configurable account.
158
162
  *
163
+ * A chain without the configurable account precompile holds no commitments,
164
+ * so the commitment of every account on it is zero.
165
+ *
159
166
  * @example
160
167
  * ```ts
161
168
  * import { createClient, http } from 'viem'
@@ -175,7 +182,7 @@ export declare namespace getConfig {
175
182
  * @param client - Client.
176
183
  * @param parameters - Parameters.
177
184
  * @returns The current configuration commitment, or zero when no config has
178
- * been committed.
185
+ * been committed or the chain has no configurable account precompile.
179
186
  */
180
187
  export async function getConfigCommitment<
181
188
  chain extends Chain | undefined,
@@ -185,10 +192,21 @@ export async function getConfigCommitment<
185
192
  parameters: getConfigCommitment.Parameters,
186
193
  ): Promise<getConfigCommitment.ReturnValue> {
187
194
  const { account, ...rest } = parameters
188
- return withExecutionError(readContract)(client, {
189
- ...rest,
190
- ...getConfigCommitment.call({ account }),
191
- })
195
+ try {
196
+ return await withExecutionError(readContract)(client, {
197
+ ...rest,
198
+ ...getConfigCommitment.call({ account }),
199
+ })
200
+ } catch (e) {
201
+ const error = e as ReadContractErrorType
202
+ // A chain without the precompile answers no data, and holds no commitments.
203
+ if (
204
+ error.name === 'ContractFunctionExecutionError' &&
205
+ error.cause.name === 'ContractFunctionZeroDataError'
206
+ )
207
+ return zeroHash
208
+ throw error
209
+ }
192
210
  }
193
211
 
194
212
  export namespace getConfigCommitment {
@@ -354,11 +372,11 @@ export namespace updateConfig {
354
372
  nextConfig,
355
373
  ...rest
356
374
  } = parameters
357
- const accountValue = account_ ?? client.account
375
+ const accountValue = account_ === undefined ? client.account : account_
358
376
  const account = (() => {
359
377
  if (
360
378
  typeof accountValue === 'object' &&
361
- accountValue.source === 'configurable'
379
+ accountValue?.source === 'configurable'
362
380
  )
363
381
  return accountValue as ConfigurableAccount
364
382
  return undefined
@@ -395,7 +413,7 @@ export namespace updateConfig {
395
413
  })()
396
414
  return (await withExecutionError(action)(client, {
397
415
  ...rest,
398
- ...(resolvedAccount ? { account: resolvedAccount } : {}),
416
+ account: resolvedAccount,
399
417
  ...updateConfig.call({ currentConfig, nextConfig }),
400
418
  } as never)) as never
401
419
  }
@@ -610,8 +628,8 @@ export namespace upgrade {
610
628
  throw new Error(
611
629
  `\`${key}\` is not supported: send \`upgrade.call\` in \`calls\` to batch the upgrade with other calls.`,
612
630
  )
613
- const account = rest.account ?? client.account
614
- if (typeof account === 'object') {
631
+ const account = rest.account === undefined ? client.account : rest.account
632
+ if (account && typeof account === 'object') {
615
633
  if (account.source === 'configurable')
616
634
  throw new Error('The account is already a configurable account.')
617
635
  if (account.source === 'accessKey')
@@ -932,7 +932,8 @@ export async function deployErc4626StackSync<
932
932
  client: Client<Transport, chain, account>,
933
933
  parameters: deployErc4626StackSync.Parameters<chain, account>,
934
934
  ): Promise<deployErc4626StackSync.ReturnValue> {
935
- const deployer = parameters.account ?? client.account
935
+ const deployer =
936
+ parameters.account === undefined ? client.account : parameters.account
936
937
  if (!deployer) throw new AccountNotFoundError()
937
938
  const owner_ = parameters.owner ?? deployer
938
939
  const owner = parseAccount(owner_).address
@@ -3426,8 +3426,8 @@ function resolveRecipient(
3426
3426
  recipient?: Address | undefined
3427
3427
  },
3428
3428
  ): Address {
3429
- if (parameters.recipient) return parameters.recipient
3430
- const account = parameters.account ?? client.account
3429
+ const { account = client.account, recipient } = parameters
3430
+ if (recipient) return recipient
3431
3431
  if (!account) throw new AccountNotFoundError()
3432
3432
  return parseAccount(account).address
3433
3433
  }
@@ -816,7 +816,8 @@ export namespace swap {
816
816
  client: Client<Transport, chain, account>,
817
817
  parameters: InputArgs & { account?: Account | Address | null | undefined },
818
818
  ) {
819
- const account = parameters.account ?? client.account
819
+ const account =
820
+ parameters.account === undefined ? client.account : parameters.account
820
821
  const recipient =
821
822
  parameters.recipient ?? (account && parseAccount(account).address)
822
823
  if (!recipient) throw new AccountNotFoundError()
@@ -3482,9 +3482,17 @@ export namespace transfer {
3482
3482
  client: Client<Transport, chain, account>,
3483
3483
  parameters: transfer.Parameters<chain, account>,
3484
3484
  ): Promise<ReturnType<action>> {
3485
+ const { amount, from, memo, to, token, ...rest } = parameters
3486
+ const call = transfer.call(client, {
3487
+ amount,
3488
+ from,
3489
+ memo,
3490
+ to,
3491
+ token,
3492
+ } as never)
3485
3493
  return (await withExecutionError(action)(client, {
3486
- ...parameters,
3487
- ...transfer.call(client, parameters as never),
3494
+ ...rest,
3495
+ ...call,
3488
3496
  } as never)) as never
3489
3497
  }
3490
3498
 
@@ -25,6 +25,7 @@ import { defineTransactionReceipt } from '../utils/formatters/transactionReceipt
25
25
  import { defineTransactionRequest } from '../utils/formatters/transactionRequest.js'
26
26
  import { getAction } from '../utils/getAction.js'
27
27
  import { keccak256 } from '../utils/hash/keccak256.js'
28
+ import { recoverAddress } from '../utils/signature/recoverAddress.js'
28
29
  import type { SerializeTransactionFn } from '../utils/transaction/serializeTransaction.js'
29
30
  import type { Account, ConfigurableAccount } from './Account.js'
30
31
  import {
@@ -39,6 +40,7 @@ import {
39
40
  import * as Formatters from './Formatters.js'
40
41
  import type { Hardfork } from './Hardfork.js'
41
42
  import * as Concurrent from './internal/concurrent.js'
43
+ import * as PreAuthorized from './internal/preAuthorized.js'
42
44
  import { transactionReplacement } from './internal/replacement.js'
43
45
  import type * as KeyAuthorizationManager from './KeyAuthorizationManager.js'
44
46
  import * as Transaction from './Transaction.js'
@@ -416,6 +418,25 @@ export const chainConfig = {
416
418
  if (signature instanceof Uint8Array) return Hex.fromBytes(signature)
417
419
  return undefined
418
420
  })()
421
+
422
+ // A pre-authorized signature (TIP-1165) carries the root key's authorization of an
423
+ // access key that the chain may not have registered yet.
424
+ if (
425
+ serialized &&
426
+ mode === 'allowAccessKey' &&
427
+ PreAuthorized.isPreAuthorized(serialized)
428
+ )
429
+ return await PreAuthorized.verify(client, {
430
+ account: address,
431
+ blockHash: parameters.blockHash,
432
+ blockNumber: parameters.blockNumber,
433
+ blockTag: parameters.blockTag,
434
+ chainId: (parameters.chain ?? client.chain)?.id,
435
+ hash,
436
+ requireCanonical: parameters.requireCanonical,
437
+ signature: serialized,
438
+ })
439
+
419
440
  const envelope = (() => {
420
441
  if (!serialized) return
421
442
  try {
@@ -558,11 +579,38 @@ export const chainConfig = {
558
579
  }
559
580
  }
560
581
 
561
- return await getAction(
562
- client,
563
- verifyHash,
564
- 'verifyHash',
565
- )({ ...parameters, chain: null })
582
+ const verify = () =>
583
+ getAction(
584
+ client,
585
+ verifyHash,
586
+ 'verifyHash',
587
+ )({ ...parameters, chain: null })
588
+
589
+ const root = await (async () => {
590
+ try {
591
+ return isAddressEqual(
592
+ address,
593
+ await recoverAddress({ hash, signature }),
594
+ )
595
+ } catch {
596
+ return false
597
+ }
598
+ })()
599
+ if (!root) return await verify()
600
+
601
+ // A config commitment retires the root key (TIP-1113), whose signature still recovers
602
+ // to the account. Only the chain knows the commitment, so this reads it in every mode.
603
+ const [commitment, valid] = await Promise.all([
604
+ getConfigCommitment(client, {
605
+ account: address,
606
+ blockHash: parameters.blockHash,
607
+ blockNumber: parameters.blockNumber,
608
+ blockTag: parameters.blockTag,
609
+ requireCanonical: parameters.requireCanonical,
610
+ } as never),
611
+ verify(),
612
+ ])
613
+ return valid && BigInt(commitment) === 0n
566
614
  },
567
615
  } as const satisfies viem_ChainConfig & { blockTime: number }
568
616