viem 2.0.0-alpha.12 → 2.0.0-alpha.13

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 (1359) hide show
  1. package/CHANGELOG.md +22 -0
  2. package/_cjs/_test/generated.js +313 -0
  3. package/_cjs/_test/generated.js.map +1 -0
  4. package/_cjs/abi/index.js.map +1 -1
  5. package/_cjs/accounts/generateMnemonic.js.map +1 -1
  6. package/_cjs/accounts/generatePrivateKey.js.map +1 -1
  7. package/_cjs/accounts/hdKeyToAccount.js.map +1 -1
  8. package/_cjs/accounts/index.js.map +1 -1
  9. package/_cjs/accounts/mnemonicToAccount.js.map +1 -1
  10. package/_cjs/accounts/privateKeyToAccount.js.map +1 -1
  11. package/_cjs/accounts/toAccount.js.map +1 -1
  12. package/_cjs/accounts/utils/parseAccount.js.map +1 -1
  13. package/_cjs/accounts/utils/privateKeyToAddress.js.map +1 -1
  14. package/_cjs/accounts/utils/publicKeyToAddress.js.map +1 -1
  15. package/_cjs/accounts/utils/sign.js.map +1 -1
  16. package/_cjs/accounts/utils/signMessage.js.map +1 -1
  17. package/_cjs/accounts/utils/signTransaction.js.map +1 -1
  18. package/_cjs/accounts/utils/signTypedData.js.map +1 -1
  19. package/_cjs/actions/ens/getEnsAddress.js.map +1 -1
  20. package/_cjs/actions/ens/getEnsAvatar.js.map +1 -1
  21. package/_cjs/actions/ens/getEnsName.js.map +1 -1
  22. package/_cjs/actions/ens/getEnsResolver.js.map +1 -1
  23. package/_cjs/actions/ens/getEnsText.js.map +1 -1
  24. package/_cjs/actions/getContract.js.map +1 -1
  25. package/_cjs/actions/index.js.map +1 -1
  26. package/_cjs/actions/public/call.js.map +1 -1
  27. package/_cjs/actions/public/createBlockFilter.js.map +1 -1
  28. package/_cjs/actions/public/createContractEventFilter.js.map +1 -1
  29. package/_cjs/actions/public/createEventFilter.js.map +1 -1
  30. package/_cjs/actions/public/createPendingTransactionFilter.js.map +1 -1
  31. package/_cjs/actions/public/estimateContractGas.js.map +1 -1
  32. package/_cjs/actions/public/estimateFeesPerGas.js.map +1 -1
  33. package/_cjs/actions/public/estimateGas.js.map +1 -1
  34. package/_cjs/actions/public/estimateMaxPriorityFeePerGas.js.map +1 -1
  35. package/_cjs/actions/public/getBalance.js.map +1 -1
  36. package/_cjs/actions/public/getBlock.js.map +1 -1
  37. package/_cjs/actions/public/getBlockNumber.js.map +1 -1
  38. package/_cjs/actions/public/getBlockTransactionCount.js.map +1 -1
  39. package/_cjs/actions/public/getBytecode.js.map +1 -1
  40. package/_cjs/actions/public/getChainId.js.map +1 -1
  41. package/_cjs/actions/public/getContractEvents.js.map +1 -1
  42. package/_cjs/actions/public/getFeeHistory.js.map +1 -1
  43. package/_cjs/actions/public/getFilterChanges.js.map +1 -1
  44. package/_cjs/actions/public/getFilterLogs.js.map +1 -1
  45. package/_cjs/actions/public/getGasPrice.js.map +1 -1
  46. package/_cjs/actions/public/getLogs.js.map +1 -1
  47. package/_cjs/actions/public/getStorageAt.js.map +1 -1
  48. package/_cjs/actions/public/getTransaction.js.map +1 -1
  49. package/_cjs/actions/public/getTransactionConfirmations.js.map +1 -1
  50. package/_cjs/actions/public/getTransactionCount.js.map +1 -1
  51. package/_cjs/actions/public/getTransactionReceipt.js.map +1 -1
  52. package/_cjs/actions/public/multicall.js.map +1 -1
  53. package/_cjs/actions/public/readContract.js.map +1 -1
  54. package/_cjs/actions/public/simulateContract.js.map +1 -1
  55. package/_cjs/actions/public/uninstallFilter.js.map +1 -1
  56. package/_cjs/actions/public/verifyHash.js.map +1 -1
  57. package/_cjs/actions/public/verifyMessage.js.map +1 -1
  58. package/_cjs/actions/public/verifyTypedData.js.map +1 -1
  59. package/_cjs/actions/public/waitForTransactionReceipt.js.map +1 -1
  60. package/_cjs/actions/public/watchBlockNumber.js.map +1 -1
  61. package/_cjs/actions/public/watchBlocks.js.map +1 -1
  62. package/_cjs/actions/public/watchContractEvent.js.map +1 -1
  63. package/_cjs/actions/public/watchEvent.js.map +1 -1
  64. package/_cjs/actions/public/watchPendingTransactions.js.map +1 -1
  65. package/_cjs/actions/test/dropTransaction.js.map +1 -1
  66. package/_cjs/actions/test/getAutomine.js.map +1 -1
  67. package/_cjs/actions/test/getTxpoolContent.js.map +1 -1
  68. package/_cjs/actions/test/getTxpoolStatus.js.map +1 -1
  69. package/_cjs/actions/test/impersonateAccount.js.map +1 -1
  70. package/_cjs/actions/test/increaseTime.js.map +1 -1
  71. package/_cjs/actions/test/inspectTxpool.js.map +1 -1
  72. package/_cjs/actions/test/mine.js.map +1 -1
  73. package/_cjs/actions/test/removeBlockTimestampInterval.js.map +1 -1
  74. package/_cjs/actions/test/reset.js.map +1 -1
  75. package/_cjs/actions/test/revert.js.map +1 -1
  76. package/_cjs/actions/test/sendUnsignedTransaction.js.map +1 -1
  77. package/_cjs/actions/test/setAutomine.js.map +1 -1
  78. package/_cjs/actions/test/setBalance.js.map +1 -1
  79. package/_cjs/actions/test/setBlockGasLimit.js.map +1 -1
  80. package/_cjs/actions/test/setBlockTimestampInterval.js +6 -1
  81. package/_cjs/actions/test/setBlockTimestampInterval.js.map +1 -1
  82. package/_cjs/actions/test/setCode.js.map +1 -1
  83. package/_cjs/actions/test/setCoinbase.js.map +1 -1
  84. package/_cjs/actions/test/setIntervalMining.js +6 -1
  85. package/_cjs/actions/test/setIntervalMining.js.map +1 -1
  86. package/_cjs/actions/test/setLoggingEnabled.js.map +1 -1
  87. package/_cjs/actions/test/setMinGasPrice.js.map +1 -1
  88. package/_cjs/actions/test/setNextBlockBaseFeePerGas.js.map +1 -1
  89. package/_cjs/actions/test/setNextBlockTimestamp.js.map +1 -1
  90. package/_cjs/actions/test/setNonce.js.map +1 -1
  91. package/_cjs/actions/test/setRpcUrl.js.map +1 -1
  92. package/_cjs/actions/test/setStorageAt.js.map +1 -1
  93. package/_cjs/actions/test/snapshot.js.map +1 -1
  94. package/_cjs/actions/test/stopImpersonatingAccount.js.map +1 -1
  95. package/_cjs/actions/wallet/addChain.js.map +1 -1
  96. package/_cjs/actions/wallet/deployContract.js.map +1 -1
  97. package/_cjs/actions/wallet/getAddresses.js.map +1 -1
  98. package/_cjs/actions/wallet/getPermissions.js.map +1 -1
  99. package/_cjs/actions/wallet/prepareTransactionRequest.js.map +1 -1
  100. package/_cjs/actions/wallet/requestAddresses.js.map +1 -1
  101. package/_cjs/actions/wallet/requestPermissions.js.map +1 -1
  102. package/_cjs/actions/wallet/sendRawTransaction.js.map +1 -1
  103. package/_cjs/actions/wallet/sendTransaction.js.map +1 -1
  104. package/_cjs/actions/wallet/signMessage.js.map +1 -1
  105. package/_cjs/actions/wallet/signTransaction.js.map +1 -1
  106. package/_cjs/actions/wallet/signTypedData.js.map +1 -1
  107. package/_cjs/actions/wallet/switchChain.js.map +1 -1
  108. package/_cjs/actions/wallet/watchAsset.js.map +1 -1
  109. package/_cjs/actions/wallet/writeContract.js.map +1 -1
  110. package/_cjs/chains/definitions/holesky.js +6 -1
  111. package/_cjs/chains/definitions/holesky.js.map +1 -1
  112. package/_cjs/clients/createClient.js.map +1 -1
  113. package/_cjs/clients/createPublicClient.js.map +1 -1
  114. package/_cjs/clients/createTestClient.js.map +1 -1
  115. package/_cjs/clients/createWalletClient.js.map +1 -1
  116. package/_cjs/clients/transports/createTransport.js.map +1 -1
  117. package/_cjs/clients/transports/custom.js.map +1 -1
  118. package/_cjs/clients/transports/fallback.js.map +1 -1
  119. package/_cjs/clients/transports/http.js.map +1 -1
  120. package/_cjs/clients/transports/webSocket.js.map +1 -1
  121. package/_cjs/contract/index.js.map +1 -1
  122. package/_cjs/ens/index.js.map +1 -1
  123. package/_cjs/errors/abi.js.map +1 -1
  124. package/_cjs/errors/account.js.map +1 -1
  125. package/_cjs/errors/address.js.map +1 -1
  126. package/_cjs/errors/base.js.map +1 -1
  127. package/_cjs/errors/block.js.map +1 -1
  128. package/_cjs/errors/ccip.js.map +1 -1
  129. package/_cjs/errors/chain.js.map +1 -1
  130. package/_cjs/errors/contract.js.map +1 -1
  131. package/_cjs/errors/cursor.js.map +1 -1
  132. package/_cjs/errors/data.js.map +1 -1
  133. package/_cjs/errors/encoding.js.map +1 -1
  134. package/_cjs/errors/ens.js.map +1 -1
  135. package/_cjs/errors/estimateGas.js.map +1 -1
  136. package/_cjs/errors/fee.js.map +1 -1
  137. package/_cjs/errors/log.js.map +1 -1
  138. package/_cjs/errors/node.js.map +1 -1
  139. package/_cjs/errors/request.js.map +1 -1
  140. package/_cjs/errors/rpc.js.map +1 -1
  141. package/_cjs/errors/transaction.js.map +1 -1
  142. package/_cjs/errors/transport.js.map +1 -1
  143. package/_cjs/errors/utils.js.map +1 -1
  144. package/_cjs/errors/version.js +1 -1
  145. package/_cjs/index.js +33 -7
  146. package/_cjs/index.js.map +1 -1
  147. package/_cjs/public/index.js.map +1 -1
  148. package/_cjs/test/index.js.map +1 -1
  149. package/_cjs/types/eip1193.js.map +1 -1
  150. package/_cjs/utils/abi/decodeAbiParameters.js.map +1 -1
  151. package/_cjs/utils/abi/decodeDeployData.js.map +1 -1
  152. package/_cjs/utils/abi/decodeErrorResult.js.map +1 -1
  153. package/_cjs/utils/abi/decodeEventLog.js.map +1 -1
  154. package/_cjs/utils/abi/decodeFunctionData.js.map +1 -1
  155. package/_cjs/utils/abi/decodeFunctionResult.js.map +1 -1
  156. package/_cjs/utils/abi/encodeAbiParameters.js.map +1 -1
  157. package/_cjs/utils/abi/encodeDeployData.js.map +1 -1
  158. package/_cjs/utils/abi/encodeErrorResult.js.map +1 -1
  159. package/_cjs/utils/abi/encodeEventTopics.js.map +1 -1
  160. package/_cjs/utils/abi/encodeFunctionData.js.map +1 -1
  161. package/_cjs/utils/abi/encodeFunctionResult.js.map +1 -1
  162. package/_cjs/utils/abi/encodePacked.js.map +1 -1
  163. package/_cjs/utils/abi/formatAbiItem.js.map +1 -1
  164. package/_cjs/utils/abi/formatAbiItemWithArgs.js.map +1 -1
  165. package/_cjs/utils/abi/getAbiItem.js +3 -3
  166. package/_cjs/utils/abi/getAbiItem.js.map +1 -1
  167. package/_cjs/utils/address/getAddress.js.map +1 -1
  168. package/_cjs/utils/address/getContractAddress.js.map +1 -1
  169. package/_cjs/utils/address/isAddress.js.map +1 -1
  170. package/_cjs/utils/address/isAddressEqual.js.map +1 -1
  171. package/_cjs/utils/buildRequest.js.map +1 -1
  172. package/_cjs/utils/ccip.js.map +1 -1
  173. package/_cjs/utils/chain.js.map +1 -1
  174. package/_cjs/utils/contract/extractFunctionParts.js.map +1 -1
  175. package/_cjs/utils/cursor.js.map +1 -1
  176. package/_cjs/utils/data/concat.js.map +1 -1
  177. package/_cjs/utils/data/isBytes.js.map +1 -1
  178. package/_cjs/utils/data/isBytesEqual.js.map +1 -1
  179. package/_cjs/utils/data/isHex.js.map +1 -1
  180. package/_cjs/utils/data/pad.js.map +1 -1
  181. package/_cjs/utils/data/size.js.map +1 -1
  182. package/_cjs/utils/data/slice.js.map +1 -1
  183. package/_cjs/utils/data/trim.js.map +1 -1
  184. package/_cjs/utils/encoding/fromBytes.js +4 -4
  185. package/_cjs/utils/encoding/fromBytes.js.map +1 -1
  186. package/_cjs/utils/encoding/fromHex.js.map +1 -1
  187. package/_cjs/utils/encoding/fromRlp.js.map +1 -1
  188. package/_cjs/utils/encoding/toBytes.js.map +1 -1
  189. package/_cjs/utils/encoding/toHex.js.map +1 -1
  190. package/_cjs/utils/encoding/toRlp.js.map +1 -1
  191. package/_cjs/utils/ens/avatar/parseAvatarRecord.js.map +1 -1
  192. package/_cjs/utils/ens/avatar/utils.js.map +1 -1
  193. package/_cjs/utils/ens/encodeLabelhash.js.map +1 -1
  194. package/_cjs/utils/ens/encodedLabelToLabelhash.js.map +1 -1
  195. package/_cjs/utils/ens/errors.js.map +1 -1
  196. package/_cjs/utils/ens/labelhash.js.map +1 -1
  197. package/_cjs/utils/ens/namehash.js.map +1 -1
  198. package/_cjs/utils/ens/normalize.js.map +1 -1
  199. package/_cjs/utils/ens/packetToBytes.js.map +1 -1
  200. package/_cjs/utils/errors/getCallError.js +6 -3
  201. package/_cjs/utils/errors/getCallError.js.map +1 -1
  202. package/_cjs/utils/errors/getContractError.js +14 -13
  203. package/_cjs/utils/errors/getContractError.js.map +1 -1
  204. package/_cjs/utils/errors/getEstimateGasError.js +6 -3
  205. package/_cjs/utils/errors/getEstimateGasError.js.map +1 -1
  206. package/_cjs/utils/errors/getNodeError.js.map +1 -1
  207. package/_cjs/utils/errors/getTransactionError.js +6 -3
  208. package/_cjs/utils/errors/getTransactionError.js.map +1 -1
  209. package/_cjs/utils/formatters/block.js.map +1 -1
  210. package/_cjs/utils/formatters/extract.js.map +1 -1
  211. package/_cjs/utils/formatters/feeHistory.js.map +1 -1
  212. package/_cjs/utils/formatters/formatter.js.map +1 -1
  213. package/_cjs/utils/formatters/log.js.map +1 -1
  214. package/_cjs/utils/formatters/transaction.js.map +1 -1
  215. package/_cjs/utils/formatters/transactionReceipt.js.map +1 -1
  216. package/_cjs/utils/formatters/transactionRequest.js.map +1 -1
  217. package/_cjs/utils/hash/getEventSelector.js.map +1 -1
  218. package/_cjs/utils/hash/getEventSignature.js.map +1 -1
  219. package/_cjs/utils/hash/getFunctionSelector.js.map +1 -1
  220. package/_cjs/utils/hash/getFunctionSignature.js.map +1 -1
  221. package/_cjs/utils/hash/hashFunction.js.map +1 -1
  222. package/_cjs/utils/hash/isHash.js.map +1 -1
  223. package/_cjs/utils/hash/keccak256.js.map +1 -1
  224. package/_cjs/utils/index.js +6 -4
  225. package/_cjs/utils/index.js.map +1 -1
  226. package/_cjs/utils/observe.js.map +1 -1
  227. package/_cjs/utils/poll.js.map +1 -1
  228. package/_cjs/utils/promise/createBatchScheduler.js.map +1 -1
  229. package/_cjs/utils/promise/withCache.js.map +1 -1
  230. package/_cjs/utils/promise/withRetry.js.map +1 -1
  231. package/_cjs/utils/promise/withTimeout.js.map +1 -1
  232. package/_cjs/utils/rpc.js.map +1 -1
  233. package/_cjs/utils/signature/hashMessage.js.map +1 -1
  234. package/_cjs/utils/signature/hashTypedData.js.map +1 -1
  235. package/_cjs/utils/signature/hexToSignature.js.map +1 -1
  236. package/_cjs/utils/signature/recoverAddress.js.map +1 -1
  237. package/_cjs/utils/signature/recoverMessageAddress.js.map +1 -1
  238. package/_cjs/utils/signature/recoverPublicKey.js.map +1 -1
  239. package/_cjs/utils/signature/recoverTypedDataAddress.js.map +1 -1
  240. package/_cjs/utils/signature/signatureToHex.js.map +1 -1
  241. package/_cjs/utils/signature/verifyMessage.js.map +1 -1
  242. package/_cjs/utils/signature/verifyTypedData.js.map +1 -1
  243. package/_cjs/utils/stringify.js.map +1 -1
  244. package/_cjs/utils/transaction/assertRequest.js.map +1 -1
  245. package/_cjs/utils/transaction/assertTransaction.js.map +1 -1
  246. package/_cjs/utils/transaction/getSerializedTransactionType.js.map +1 -1
  247. package/_cjs/utils/transaction/getTransactionType.js.map +1 -1
  248. package/_cjs/utils/transaction/parseTransaction.js.map +1 -1
  249. package/_cjs/utils/transaction/serializeAccessList.js.map +1 -1
  250. package/_cjs/utils/transaction/serializeTransaction.js.map +1 -1
  251. package/_cjs/utils/typedData.js.map +1 -1
  252. package/_cjs/utils/unit/formatEther.js.map +1 -1
  253. package/_cjs/utils/unit/formatGwei.js.map +1 -1
  254. package/_cjs/utils/unit/formatUnits.js.map +1 -1
  255. package/_cjs/utils/unit/parseEther.js.map +1 -1
  256. package/_cjs/utils/unit/parseGwei.js.map +1 -1
  257. package/_cjs/utils/unit/parseUnits.js.map +1 -1
  258. package/_esm/_test/generated.js +335 -0
  259. package/_esm/_test/generated.js.map +1 -0
  260. package/_esm/abi/index.js +1 -1
  261. package/_esm/abi/index.js.map +1 -1
  262. package/_esm/accounts/generateMnemonic.js.map +1 -1
  263. package/_esm/accounts/generatePrivateKey.js.map +1 -1
  264. package/_esm/accounts/hdKeyToAccount.js +1 -1
  265. package/_esm/accounts/hdKeyToAccount.js.map +1 -1
  266. package/_esm/accounts/index.js +10 -10
  267. package/_esm/accounts/index.js.map +1 -1
  268. package/_esm/accounts/mnemonicToAccount.js +1 -1
  269. package/_esm/accounts/mnemonicToAccount.js.map +1 -1
  270. package/_esm/accounts/privateKeyToAccount.js +3 -3
  271. package/_esm/accounts/privateKeyToAccount.js.map +1 -1
  272. package/_esm/accounts/toAccount.js +2 -2
  273. package/_esm/accounts/toAccount.js.map +1 -1
  274. package/_esm/accounts/utils/parseAccount.js.map +1 -1
  275. package/_esm/accounts/utils/privateKeyToAddress.js +2 -2
  276. package/_esm/accounts/utils/privateKeyToAddress.js.map +1 -1
  277. package/_esm/accounts/utils/publicKeyToAddress.js +2 -2
  278. package/_esm/accounts/utils/publicKeyToAddress.js.map +1 -1
  279. package/_esm/accounts/utils/sign.js.map +1 -1
  280. package/_esm/accounts/utils/signMessage.js +2 -2
  281. package/_esm/accounts/utils/signMessage.js.map +1 -1
  282. package/_esm/accounts/utils/signTransaction.js +1 -1
  283. package/_esm/accounts/utils/signTransaction.js.map +1 -1
  284. package/_esm/accounts/utils/signTypedData.js +2 -2
  285. package/_esm/accounts/utils/signTypedData.js.map +1 -1
  286. package/_esm/actions/ens/getEnsAddress.js +4 -4
  287. package/_esm/actions/ens/getEnsAddress.js.map +1 -1
  288. package/_esm/actions/ens/getEnsAvatar.js +2 -2
  289. package/_esm/actions/ens/getEnsAvatar.js.map +1 -1
  290. package/_esm/actions/ens/getEnsName.js +2 -2
  291. package/_esm/actions/ens/getEnsName.js.map +1 -1
  292. package/_esm/actions/ens/getEnsResolver.js +2 -2
  293. package/_esm/actions/ens/getEnsResolver.js.map +1 -1
  294. package/_esm/actions/ens/getEnsText.js +4 -4
  295. package/_esm/actions/ens/getEnsText.js.map +1 -1
  296. package/_esm/actions/getContract.js.map +1 -1
  297. package/_esm/actions/index.js +8 -8
  298. package/_esm/actions/index.js.map +1 -1
  299. package/_esm/actions/public/call.js +8 -8
  300. package/_esm/actions/public/call.js.map +1 -1
  301. package/_esm/actions/public/createBlockFilter.js.map +1 -1
  302. package/_esm/actions/public/createContractEventFilter.js +1 -1
  303. package/_esm/actions/public/createContractEventFilter.js.map +1 -1
  304. package/_esm/actions/public/createEventFilter.js +1 -1
  305. package/_esm/actions/public/createEventFilter.js.map +1 -1
  306. package/_esm/actions/public/createPendingTransactionFilter.js.map +1 -1
  307. package/_esm/actions/public/estimateContractGas.js +4 -4
  308. package/_esm/actions/public/estimateContractGas.js.map +1 -1
  309. package/_esm/actions/public/estimateFeesPerGas.js +1 -1
  310. package/_esm/actions/public/estimateFeesPerGas.js.map +1 -1
  311. package/_esm/actions/public/estimateGas.js +3 -3
  312. package/_esm/actions/public/estimateGas.js.map +1 -1
  313. package/_esm/actions/public/estimateMaxPriorityFeePerGas.js +2 -2
  314. package/_esm/actions/public/estimateMaxPriorityFeePerGas.js.map +1 -1
  315. package/_esm/actions/public/getBalance.js +1 -1
  316. package/_esm/actions/public/getBalance.js.map +1 -1
  317. package/_esm/actions/public/getBlock.js +2 -2
  318. package/_esm/actions/public/getBlock.js.map +1 -1
  319. package/_esm/actions/public/getBlockNumber.js.map +1 -1
  320. package/_esm/actions/public/getBlockTransactionCount.js +2 -2
  321. package/_esm/actions/public/getBlockTransactionCount.js.map +1 -1
  322. package/_esm/actions/public/getBytecode.js +1 -1
  323. package/_esm/actions/public/getBytecode.js.map +1 -1
  324. package/_esm/actions/public/getChainId.js +1 -1
  325. package/_esm/actions/public/getChainId.js.map +1 -1
  326. package/_esm/actions/public/getContractEvents.js +1 -1
  327. package/_esm/actions/public/getContractEvents.js.map +1 -1
  328. package/_esm/actions/public/getFeeHistory.js +2 -2
  329. package/_esm/actions/public/getFeeHistory.js.map +1 -1
  330. package/_esm/actions/public/getFilterChanges.js +2 -2
  331. package/_esm/actions/public/getFilterChanges.js.map +1 -1
  332. package/_esm/actions/public/getFilterLogs.js +2 -2
  333. package/_esm/actions/public/getFilterLogs.js.map +1 -1
  334. package/_esm/actions/public/getGasPrice.js.map +1 -1
  335. package/_esm/actions/public/getLogs.js +3 -3
  336. package/_esm/actions/public/getLogs.js.map +1 -1
  337. package/_esm/actions/public/getStorageAt.js +1 -1
  338. package/_esm/actions/public/getStorageAt.js.map +1 -1
  339. package/_esm/actions/public/getTransaction.js +1 -1
  340. package/_esm/actions/public/getTransaction.js.map +1 -1
  341. package/_esm/actions/public/getTransactionConfirmations.js +2 -2
  342. package/_esm/actions/public/getTransactionConfirmations.js.map +1 -1
  343. package/_esm/actions/public/getTransactionCount.js +2 -2
  344. package/_esm/actions/public/getTransactionCount.js.map +1 -1
  345. package/_esm/actions/public/getTransactionReceipt.js +1 -1
  346. package/_esm/actions/public/getTransactionReceipt.js.map +1 -1
  347. package/_esm/actions/public/multicall.js +4 -4
  348. package/_esm/actions/public/multicall.js.map +1 -1
  349. package/_esm/actions/public/readContract.js +3 -3
  350. package/_esm/actions/public/readContract.js.map +1 -1
  351. package/_esm/actions/public/simulateContract.js +4 -4
  352. package/_esm/actions/public/simulateContract.js.map +1 -1
  353. package/_esm/actions/public/uninstallFilter.js.map +1 -1
  354. package/_esm/actions/public/verifyHash.js +1 -1
  355. package/_esm/actions/public/verifyHash.js.map +1 -1
  356. package/_esm/actions/public/verifyMessage.js +1 -1
  357. package/_esm/actions/public/verifyMessage.js.map +1 -1
  358. package/_esm/actions/public/verifyTypedData.js +2 -2
  359. package/_esm/actions/public/verifyTypedData.js.map +1 -1
  360. package/_esm/actions/public/waitForTransactionReceipt.js +1 -1
  361. package/_esm/actions/public/waitForTransactionReceipt.js.map +1 -1
  362. package/_esm/actions/public/watchBlockNumber.js.map +1 -1
  363. package/_esm/actions/public/watchBlocks.js.map +1 -1
  364. package/_esm/actions/public/watchContractEvent.js.map +1 -1
  365. package/_esm/actions/public/watchEvent.js.map +1 -1
  366. package/_esm/actions/public/watchPendingTransactions.js.map +1 -1
  367. package/_esm/actions/test/dropTransaction.js.map +1 -1
  368. package/_esm/actions/test/getAutomine.js.map +1 -1
  369. package/_esm/actions/test/getTxpoolContent.js.map +1 -1
  370. package/_esm/actions/test/getTxpoolStatus.js.map +1 -1
  371. package/_esm/actions/test/impersonateAccount.js.map +1 -1
  372. package/_esm/actions/test/increaseTime.js.map +1 -1
  373. package/_esm/actions/test/inspectTxpool.js.map +1 -1
  374. package/_esm/actions/test/mine.js.map +1 -1
  375. package/_esm/actions/test/removeBlockTimestampInterval.js.map +1 -1
  376. package/_esm/actions/test/reset.js.map +1 -1
  377. package/_esm/actions/test/revert.js.map +1 -1
  378. package/_esm/actions/test/sendUnsignedTransaction.js.map +1 -1
  379. package/_esm/actions/test/setAutomine.js.map +1 -1
  380. package/_esm/actions/test/setBalance.js.map +1 -1
  381. package/_esm/actions/test/setBlockGasLimit.js.map +1 -1
  382. package/_esm/actions/test/setBlockTimestampInterval.js +6 -1
  383. package/_esm/actions/test/setBlockTimestampInterval.js.map +1 -1
  384. package/_esm/actions/test/setCode.js.map +1 -1
  385. package/_esm/actions/test/setCoinbase.js.map +1 -1
  386. package/_esm/actions/test/setIntervalMining.js +6 -1
  387. package/_esm/actions/test/setIntervalMining.js.map +1 -1
  388. package/_esm/actions/test/setLoggingEnabled.js.map +1 -1
  389. package/_esm/actions/test/setMinGasPrice.js.map +1 -1
  390. package/_esm/actions/test/setNextBlockBaseFeePerGas.js.map +1 -1
  391. package/_esm/actions/test/setNextBlockTimestamp.js.map +1 -1
  392. package/_esm/actions/test/setNonce.js.map +1 -1
  393. package/_esm/actions/test/setRpcUrl.js.map +1 -1
  394. package/_esm/actions/test/setStorageAt.js.map +1 -1
  395. package/_esm/actions/test/snapshot.js.map +1 -1
  396. package/_esm/actions/test/stopImpersonatingAccount.js.map +1 -1
  397. package/_esm/actions/wallet/addChain.js +1 -1
  398. package/_esm/actions/wallet/addChain.js.map +1 -1
  399. package/_esm/actions/wallet/deployContract.js.map +1 -1
  400. package/_esm/actions/wallet/getAddresses.js +1 -1
  401. package/_esm/actions/wallet/getAddresses.js.map +1 -1
  402. package/_esm/actions/wallet/getPermissions.js.map +1 -1
  403. package/_esm/actions/wallet/prepareTransactionRequest.js +5 -5
  404. package/_esm/actions/wallet/prepareTransactionRequest.js.map +1 -1
  405. package/_esm/actions/wallet/requestAddresses.js.map +1 -1
  406. package/_esm/actions/wallet/requestPermissions.js.map +1 -1
  407. package/_esm/actions/wallet/sendRawTransaction.js.map +1 -1
  408. package/_esm/actions/wallet/sendTransaction.js +5 -5
  409. package/_esm/actions/wallet/sendTransaction.js.map +1 -1
  410. package/_esm/actions/wallet/signMessage.js +2 -2
  411. package/_esm/actions/wallet/signMessage.js.map +1 -1
  412. package/_esm/actions/wallet/signTransaction.js +3 -3
  413. package/_esm/actions/wallet/signTransaction.js.map +1 -1
  414. package/_esm/actions/wallet/signTypedData.js +2 -2
  415. package/_esm/actions/wallet/signTypedData.js.map +1 -1
  416. package/_esm/actions/wallet/switchChain.js +1 -1
  417. package/_esm/actions/wallet/switchChain.js.map +1 -1
  418. package/_esm/actions/wallet/watchAsset.js.map +1 -1
  419. package/_esm/actions/wallet/writeContract.js +1 -1
  420. package/_esm/actions/wallet/writeContract.js.map +1 -1
  421. package/_esm/chains/definitions/holesky.js +6 -1
  422. package/_esm/chains/definitions/holesky.js.map +1 -1
  423. package/_esm/clients/createClient.js.map +1 -1
  424. package/_esm/clients/createPublicClient.js +1 -1
  425. package/_esm/clients/createPublicClient.js.map +1 -1
  426. package/_esm/clients/createTestClient.js +1 -1
  427. package/_esm/clients/createTestClient.js.map +1 -1
  428. package/_esm/clients/createWalletClient.js +1 -1
  429. package/_esm/clients/createWalletClient.js.map +1 -1
  430. package/_esm/clients/transports/createTransport.js.map +1 -1
  431. package/_esm/clients/transports/custom.js.map +1 -1
  432. package/_esm/clients/transports/fallback.js.map +1 -1
  433. package/_esm/clients/transports/http.js +1 -1
  434. package/_esm/clients/transports/http.js.map +1 -1
  435. package/_esm/clients/transports/webSocket.js +1 -1
  436. package/_esm/clients/transports/webSocket.js.map +1 -1
  437. package/_esm/contract/index.js +2 -2
  438. package/_esm/contract/index.js.map +1 -1
  439. package/_esm/ens/index.js.map +1 -1
  440. package/_esm/errors/abi.js.map +1 -1
  441. package/_esm/errors/account.js.map +1 -1
  442. package/_esm/errors/address.js.map +1 -1
  443. package/_esm/errors/base.js.map +1 -1
  444. package/_esm/errors/block.js.map +1 -1
  445. package/_esm/errors/ccip.js.map +1 -1
  446. package/_esm/errors/chain.js.map +1 -1
  447. package/_esm/errors/contract.js.map +1 -1
  448. package/_esm/errors/cursor.js.map +1 -1
  449. package/_esm/errors/data.js.map +1 -1
  450. package/_esm/errors/encoding.js.map +1 -1
  451. package/_esm/errors/ens.js.map +1 -1
  452. package/_esm/errors/estimateGas.js.map +1 -1
  453. package/_esm/errors/fee.js.map +1 -1
  454. package/_esm/errors/log.js.map +1 -1
  455. package/_esm/errors/node.js +0 -9
  456. package/_esm/errors/node.js.map +1 -1
  457. package/_esm/errors/request.js.map +1 -1
  458. package/_esm/errors/rpc.js +0 -103
  459. package/_esm/errors/rpc.js.map +1 -1
  460. package/_esm/errors/transaction.js.map +1 -1
  461. package/_esm/errors/transport.js.map +1 -1
  462. package/_esm/errors/utils.js.map +1 -1
  463. package/_esm/errors/version.js +1 -1
  464. package/_esm/index.js +45 -43
  465. package/_esm/index.js.map +1 -1
  466. package/_esm/public/index.js +1 -1
  467. package/_esm/public/index.js.map +1 -1
  468. package/_esm/test/index.js +9 -9
  469. package/_esm/test/index.js.map +1 -1
  470. package/_esm/types/eip1193.js +0 -2
  471. package/_esm/types/eip1193.js.map +1 -1
  472. package/_esm/utils/abi/decodeAbiParameters.js +2 -3
  473. package/_esm/utils/abi/decodeAbiParameters.js.map +1 -1
  474. package/_esm/utils/abi/decodeDeployData.js +1 -1
  475. package/_esm/utils/abi/decodeDeployData.js.map +1 -1
  476. package/_esm/utils/abi/decodeErrorResult.js +2 -2
  477. package/_esm/utils/abi/decodeErrorResult.js.map +1 -1
  478. package/_esm/utils/abi/decodeEventLog.js +2 -2
  479. package/_esm/utils/abi/decodeEventLog.js.map +1 -1
  480. package/_esm/utils/abi/decodeFunctionData.js +2 -2
  481. package/_esm/utils/abi/decodeFunctionData.js.map +1 -1
  482. package/_esm/utils/abi/decodeFunctionResult.js +1 -1
  483. package/_esm/utils/abi/decodeFunctionResult.js.map +1 -1
  484. package/_esm/utils/abi/encodeAbiParameters.js +2 -4
  485. package/_esm/utils/abi/encodeAbiParameters.js.map +1 -1
  486. package/_esm/utils/abi/encodeDeployData.js +1 -1
  487. package/_esm/utils/abi/encodeDeployData.js.map +1 -1
  488. package/_esm/utils/abi/encodeErrorResult.js +2 -2
  489. package/_esm/utils/abi/encodeErrorResult.js.map +1 -1
  490. package/_esm/utils/abi/encodeEventTopics.js +4 -4
  491. package/_esm/utils/abi/encodeEventTopics.js.map +1 -1
  492. package/_esm/utils/abi/encodeFunctionData.js +3 -3
  493. package/_esm/utils/abi/encodeFunctionData.js.map +1 -1
  494. package/_esm/utils/abi/encodeFunctionResult.js +1 -1
  495. package/_esm/utils/abi/encodeFunctionResult.js.map +1 -1
  496. package/_esm/utils/abi/encodePacked.js +2 -2
  497. package/_esm/utils/abi/encodePacked.js.map +1 -1
  498. package/_esm/utils/abi/formatAbiItem.js +1 -1
  499. package/_esm/utils/abi/formatAbiItem.js.map +1 -1
  500. package/_esm/utils/abi/formatAbiItemWithArgs.js.map +1 -1
  501. package/_esm/utils/abi/getAbiItem.js +3 -3
  502. package/_esm/utils/abi/getAbiItem.js.map +1 -1
  503. package/_esm/utils/address/getAddress.js +1 -1
  504. package/_esm/utils/address/getAddress.js.map +1 -1
  505. package/_esm/utils/address/getContractAddress.js.map +1 -1
  506. package/_esm/utils/address/isAddress.js.map +1 -1
  507. package/_esm/utils/address/isAddressEqual.js +1 -1
  508. package/_esm/utils/address/isAddressEqual.js.map +1 -1
  509. package/_esm/utils/buildRequest.js +1 -1
  510. package/_esm/utils/buildRequest.js.map +1 -1
  511. package/_esm/utils/ccip.js.map +1 -1
  512. package/_esm/utils/chain.js.map +1 -1
  513. package/_esm/utils/contract/extractFunctionParts.js.map +1 -1
  514. package/_esm/utils/cursor.js.map +1 -1
  515. package/_esm/utils/data/concat.js.map +1 -1
  516. package/_esm/utils/data/isBytes.js.map +1 -1
  517. package/_esm/utils/data/isBytesEqual.js.map +1 -1
  518. package/_esm/utils/data/isHex.js.map +1 -1
  519. package/_esm/utils/data/pad.js +1 -1
  520. package/_esm/utils/data/pad.js.map +1 -1
  521. package/_esm/utils/data/size.js.map +1 -1
  522. package/_esm/utils/data/slice.js +1 -1
  523. package/_esm/utils/data/slice.js.map +1 -1
  524. package/_esm/utils/data/trim.js.map +1 -1
  525. package/_esm/utils/encoding/fromBytes.js +5 -5
  526. package/_esm/utils/encoding/fromBytes.js.map +1 -1
  527. package/_esm/utils/encoding/fromHex.js.map +1 -1
  528. package/_esm/utils/encoding/fromRlp.js +2 -2
  529. package/_esm/utils/encoding/fromRlp.js.map +1 -1
  530. package/_esm/utils/encoding/toBytes.js +1 -1
  531. package/_esm/utils/encoding/toBytes.js.map +1 -1
  532. package/_esm/utils/encoding/toHex.js +1 -1
  533. package/_esm/utils/encoding/toHex.js.map +1 -1
  534. package/_esm/utils/encoding/toRlp.js +1 -1
  535. package/_esm/utils/encoding/toRlp.js.map +1 -1
  536. package/_esm/utils/ens/avatar/parseAvatarRecord.js.map +1 -1
  537. package/_esm/utils/ens/avatar/utils.js +1 -1
  538. package/_esm/utils/ens/avatar/utils.js.map +1 -1
  539. package/_esm/utils/ens/encodeLabelhash.js.map +1 -1
  540. package/_esm/utils/ens/encodedLabelToLabelhash.js.map +1 -1
  541. package/_esm/utils/ens/errors.js.map +1 -1
  542. package/_esm/utils/ens/labelhash.js +2 -2
  543. package/_esm/utils/ens/labelhash.js.map +1 -1
  544. package/_esm/utils/ens/namehash.js +2 -2
  545. package/_esm/utils/ens/namehash.js.map +1 -1
  546. package/_esm/utils/ens/normalize.js.map +1 -1
  547. package/_esm/utils/ens/packetToBytes.js +2 -2
  548. package/_esm/utils/ens/packetToBytes.js.map +1 -1
  549. package/_esm/utils/errors/getCallError.js +8 -5
  550. package/_esm/utils/errors/getCallError.js.map +1 -1
  551. package/_esm/utils/errors/getContractError.js +14 -13
  552. package/_esm/utils/errors/getContractError.js.map +1 -1
  553. package/_esm/utils/errors/getEstimateGasError.js +8 -5
  554. package/_esm/utils/errors/getEstimateGasError.js.map +1 -1
  555. package/_esm/utils/errors/getNodeError.js.map +1 -1
  556. package/_esm/utils/errors/getTransactionError.js +8 -5
  557. package/_esm/utils/errors/getTransactionError.js.map +1 -1
  558. package/_esm/utils/formatters/block.js.map +1 -1
  559. package/_esm/utils/formatters/extract.js.map +1 -1
  560. package/_esm/utils/formatters/feeHistory.js.map +1 -1
  561. package/_esm/utils/formatters/formatter.js.map +1 -1
  562. package/_esm/utils/formatters/log.js.map +1 -1
  563. package/_esm/utils/formatters/transaction.js.map +1 -1
  564. package/_esm/utils/formatters/transactionReceipt.js.map +1 -1
  565. package/_esm/utils/formatters/transactionRequest.js.map +1 -1
  566. package/_esm/utils/hash/getEventSelector.js.map +1 -1
  567. package/_esm/utils/hash/getEventSignature.js +1 -1
  568. package/_esm/utils/hash/getEventSignature.js.map +1 -1
  569. package/_esm/utils/hash/getFunctionSelector.js +1 -1
  570. package/_esm/utils/hash/getFunctionSelector.js.map +1 -1
  571. package/_esm/utils/hash/getFunctionSignature.js +1 -1
  572. package/_esm/utils/hash/getFunctionSignature.js.map +1 -1
  573. package/_esm/utils/hash/hashFunction.js +2 -2
  574. package/_esm/utils/hash/hashFunction.js.map +1 -1
  575. package/_esm/utils/hash/isHash.js.map +1 -1
  576. package/_esm/utils/hash/keccak256.js.map +1 -1
  577. package/_esm/utils/index.js +29 -27
  578. package/_esm/utils/index.js.map +1 -1
  579. package/_esm/utils/observe.js.map +1 -1
  580. package/_esm/utils/poll.js.map +1 -1
  581. package/_esm/utils/promise/createBatchScheduler.js.map +1 -1
  582. package/_esm/utils/promise/withCache.js.map +1 -1
  583. package/_esm/utils/promise/withRetry.js.map +1 -1
  584. package/_esm/utils/promise/withTimeout.js.map +1 -1
  585. package/_esm/utils/rpc.js +2 -2
  586. package/_esm/utils/rpc.js.map +1 -1
  587. package/_esm/utils/signature/hashMessage.js +1 -1
  588. package/_esm/utils/signature/hashMessage.js.map +1 -1
  589. package/_esm/utils/signature/hashTypedData.js +2 -2
  590. package/_esm/utils/signature/hashTypedData.js.map +1 -1
  591. package/_esm/utils/signature/hexToSignature.js +1 -1
  592. package/_esm/utils/signature/hexToSignature.js.map +1 -1
  593. package/_esm/utils/signature/recoverAddress.js.map +1 -1
  594. package/_esm/utils/signature/recoverMessageAddress.js +1 -1
  595. package/_esm/utils/signature/recoverMessageAddress.js.map +1 -1
  596. package/_esm/utils/signature/recoverPublicKey.js.map +1 -1
  597. package/_esm/utils/signature/recoverTypedDataAddress.js +1 -1
  598. package/_esm/utils/signature/recoverTypedDataAddress.js.map +1 -1
  599. package/_esm/utils/signature/signatureToHex.js +1 -1
  600. package/_esm/utils/signature/signatureToHex.js.map +1 -1
  601. package/_esm/utils/signature/verifyMessage.js +2 -2
  602. package/_esm/utils/signature/verifyMessage.js.map +1 -1
  603. package/_esm/utils/signature/verifyTypedData.js +1 -1
  604. package/_esm/utils/signature/verifyTypedData.js.map +1 -1
  605. package/_esm/utils/stringify.js.map +1 -1
  606. package/_esm/utils/transaction/assertRequest.js +4 -4
  607. package/_esm/utils/transaction/assertRequest.js.map +1 -1
  608. package/_esm/utils/transaction/assertTransaction.js +3 -3
  609. package/_esm/utils/transaction/assertTransaction.js.map +1 -1
  610. package/_esm/utils/transaction/getSerializedTransactionType.js +1 -1
  611. package/_esm/utils/transaction/getSerializedTransactionType.js.map +1 -1
  612. package/_esm/utils/transaction/getTransactionType.js +1 -1
  613. package/_esm/utils/transaction/getTransactionType.js.map +1 -1
  614. package/_esm/utils/transaction/parseTransaction.js +2 -2
  615. package/_esm/utils/transaction/parseTransaction.js.map +1 -1
  616. package/_esm/utils/transaction/serializeAccessList.js +2 -2
  617. package/_esm/utils/transaction/serializeAccessList.js.map +1 -1
  618. package/_esm/utils/transaction/serializeTransaction.js +2 -2
  619. package/_esm/utils/transaction/serializeTransaction.js.map +1 -1
  620. package/_esm/utils/typedData.js +1 -1
  621. package/_esm/utils/typedData.js.map +1 -1
  622. package/_esm/utils/unit/formatEther.js.map +1 -1
  623. package/_esm/utils/unit/formatGwei.js.map +1 -1
  624. package/_esm/utils/unit/formatUnits.js.map +1 -1
  625. package/_esm/utils/unit/parseEther.js.map +1 -1
  626. package/_esm/utils/unit/parseGwei.js.map +1 -1
  627. package/_esm/utils/unit/parseUnits.js.map +1 -1
  628. package/_test/generated.ts +350 -0
  629. package/_types/_test/generated.d.ts +428 -0
  630. package/_types/_test/generated.d.ts.map +1 -0
  631. package/_types/abi/index.d.ts +4 -4
  632. package/_types/abi/index.d.ts.map +1 -1
  633. package/_types/accounts/generateMnemonic.d.ts +2 -0
  634. package/_types/accounts/generateMnemonic.d.ts.map +1 -1
  635. package/_types/accounts/generatePrivateKey.d.ts +3 -0
  636. package/_types/accounts/generatePrivateKey.d.ts.map +1 -1
  637. package/_types/accounts/hdKeyToAccount.d.ts +4 -0
  638. package/_types/accounts/hdKeyToAccount.d.ts.map +1 -1
  639. package/_types/accounts/index.d.ts +14 -14
  640. package/_types/accounts/index.d.ts.map +1 -1
  641. package/_types/accounts/mnemonicToAccount.d.ts +3 -0
  642. package/_types/accounts/mnemonicToAccount.d.ts.map +1 -1
  643. package/_types/accounts/privateKeyToAccount.d.ts +8 -0
  644. package/_types/accounts/privateKeyToAccount.d.ts.map +1 -1
  645. package/_types/accounts/toAccount.d.ts +4 -0
  646. package/_types/accounts/toAccount.d.ts.map +1 -1
  647. package/_types/accounts/utils/parseAccount.d.ts +2 -0
  648. package/_types/accounts/utils/parseAccount.d.ts.map +1 -1
  649. package/_types/accounts/utils/privateKeyToAddress.d.ts +4 -0
  650. package/_types/accounts/utils/privateKeyToAddress.d.ts.map +1 -1
  651. package/_types/accounts/utils/publicKeyToAddress.d.ts +4 -0
  652. package/_types/accounts/utils/publicKeyToAddress.d.ts.map +1 -1
  653. package/_types/accounts/utils/sign.d.ts +3 -0
  654. package/_types/accounts/utils/sign.d.ts.map +1 -1
  655. package/_types/accounts/utils/signMessage.d.ts +5 -0
  656. package/_types/accounts/utils/signMessage.d.ts.map +1 -1
  657. package/_types/accounts/utils/signTransaction.d.ts +4 -0
  658. package/_types/accounts/utils/signTransaction.d.ts.map +1 -1
  659. package/_types/accounts/utils/signTypedData.d.ts +5 -0
  660. package/_types/accounts/utils/signTypedData.d.ts.map +1 -1
  661. package/_types/actions/ens/getEnsAddress.d.ts +9 -0
  662. package/_types/actions/ens/getEnsAddress.d.ts.map +1 -1
  663. package/_types/actions/ens/getEnsAvatar.d.ts +4 -1
  664. package/_types/actions/ens/getEnsAvatar.d.ts.map +1 -1
  665. package/_types/actions/ens/getEnsName.d.ts +6 -1
  666. package/_types/actions/ens/getEnsName.d.ts.map +1 -1
  667. package/_types/actions/ens/getEnsResolver.d.ts +5 -0
  668. package/_types/actions/ens/getEnsResolver.d.ts.map +1 -1
  669. package/_types/actions/ens/getEnsText.d.ts +8 -1
  670. package/_types/actions/ens/getEnsText.d.ts.map +1 -1
  671. package/_types/actions/getContract.d.ts +2 -0
  672. package/_types/actions/getContract.d.ts.map +1 -1
  673. package/_types/actions/index.d.ts +79 -79
  674. package/_types/actions/index.d.ts.map +1 -1
  675. package/_types/actions/public/call.d.ts +15 -1
  676. package/_types/actions/public/call.d.ts.map +1 -1
  677. package/_types/actions/public/createBlockFilter.d.ts +3 -0
  678. package/_types/actions/public/createBlockFilter.d.ts.map +1 -1
  679. package/_types/actions/public/createContractEventFilter.d.ts +5 -0
  680. package/_types/actions/public/createContractEventFilter.d.ts.map +1 -1
  681. package/_types/actions/public/createEventFilter.d.ts +5 -0
  682. package/_types/actions/public/createEventFilter.d.ts.map +1 -1
  683. package/_types/actions/public/createPendingTransactionFilter.d.ts +3 -0
  684. package/_types/actions/public/createPendingTransactionFilter.d.ts.map +1 -1
  685. package/_types/actions/public/estimateContractGas.d.ts +5 -1
  686. package/_types/actions/public/estimateContractGas.d.ts.map +1 -1
  687. package/_types/actions/public/estimateFeesPerGas.d.ts +5 -0
  688. package/_types/actions/public/estimateFeesPerGas.d.ts.map +1 -1
  689. package/_types/actions/public/estimateGas.d.ts +6 -0
  690. package/_types/actions/public/estimateGas.d.ts.map +1 -1
  691. package/_types/actions/public/estimateMaxPriorityFeePerGas.d.ts +7 -0
  692. package/_types/actions/public/estimateMaxPriorityFeePerGas.d.ts.map +1 -1
  693. package/_types/actions/public/getBalance.d.ts +4 -0
  694. package/_types/actions/public/getBalance.d.ts.map +1 -1
  695. package/_types/actions/public/getBlock.d.ts +5 -0
  696. package/_types/actions/public/getBlock.d.ts.map +1 -1
  697. package/_types/actions/public/getBlockNumber.d.ts +3 -0
  698. package/_types/actions/public/getBlockNumber.d.ts.map +1 -1
  699. package/_types/actions/public/getBlockTransactionCount.d.ts +5 -0
  700. package/_types/actions/public/getBlockTransactionCount.d.ts.map +1 -1
  701. package/_types/actions/public/getBytecode.d.ts +4 -0
  702. package/_types/actions/public/getBytecode.d.ts.map +1 -1
  703. package/_types/actions/public/getChainId.d.ts +4 -0
  704. package/_types/actions/public/getChainId.d.ts.map +1 -1
  705. package/_types/actions/public/getContractEvents.d.ts +4 -0
  706. package/_types/actions/public/getContractEvents.d.ts.map +1 -1
  707. package/_types/actions/public/getFeeHistory.d.ts +4 -0
  708. package/_types/actions/public/getFeeHistory.d.ts.map +1 -1
  709. package/_types/actions/public/getFilterChanges.d.ts +5 -0
  710. package/_types/actions/public/getFilterChanges.d.ts.map +1 -1
  711. package/_types/actions/public/getFilterLogs.d.ts +5 -0
  712. package/_types/actions/public/getFilterLogs.d.ts.map +1 -1
  713. package/_types/actions/public/getGasPrice.d.ts +3 -0
  714. package/_types/actions/public/getGasPrice.d.ts.map +1 -1
  715. package/_types/actions/public/getLogs.d.ts +7 -0
  716. package/_types/actions/public/getLogs.d.ts.map +1 -1
  717. package/_types/actions/public/getStorageAt.d.ts +4 -0
  718. package/_types/actions/public/getStorageAt.d.ts.map +1 -1
  719. package/_types/actions/public/getTransaction.d.ts +4 -0
  720. package/_types/actions/public/getTransaction.d.ts.map +1 -1
  721. package/_types/actions/public/getTransactionConfirmations.d.ts +4 -0
  722. package/_types/actions/public/getTransactionConfirmations.d.ts.map +1 -1
  723. package/_types/actions/public/getTransactionCount.d.ts +5 -0
  724. package/_types/actions/public/getTransactionCount.d.ts.map +1 -1
  725. package/_types/actions/public/getTransactionReceipt.d.ts +4 -0
  726. package/_types/actions/public/getTransactionReceipt.d.ts.map +1 -1
  727. package/_types/actions/public/multicall.d.ts +7 -0
  728. package/_types/actions/public/multicall.d.ts.map +1 -1
  729. package/_types/actions/public/readContract.d.ts +5 -1
  730. package/_types/actions/public/readContract.d.ts.map +1 -1
  731. package/_types/actions/public/simulateContract.d.ts +7 -1
  732. package/_types/actions/public/simulateContract.d.ts.map +1 -1
  733. package/_types/actions/public/uninstallFilter.d.ts +3 -0
  734. package/_types/actions/public/uninstallFilter.d.ts.map +1 -1
  735. package/_types/actions/public/verifyHash.d.ts +7 -1
  736. package/_types/actions/public/verifyHash.d.ts.map +1 -1
  737. package/_types/actions/public/verifyMessage.d.ts +4 -1
  738. package/_types/actions/public/verifyMessage.d.ts.map +1 -1
  739. package/_types/actions/public/verifyTypedData.d.ts +4 -1
  740. package/_types/actions/public/verifyTypedData.d.ts.map +1 -1
  741. package/_types/actions/public/waitForTransactionReceipt.d.ts +7 -1
  742. package/_types/actions/public/waitForTransactionReceipt.d.ts.map +1 -1
  743. package/_types/actions/public/watchBlockNumber.d.ts +3 -0
  744. package/_types/actions/public/watchBlockNumber.d.ts.map +1 -1
  745. package/_types/actions/public/watchBlocks.d.ts +4 -0
  746. package/_types/actions/public/watchBlocks.d.ts.map +1 -1
  747. package/_types/actions/public/watchContractEvent.d.ts +5 -1
  748. package/_types/actions/public/watchContractEvent.d.ts.map +1 -1
  749. package/_types/actions/public/watchEvent.d.ts +4 -0
  750. package/_types/actions/public/watchEvent.d.ts.map +1 -1
  751. package/_types/actions/public/watchPendingTransactions.d.ts +4 -0
  752. package/_types/actions/public/watchPendingTransactions.d.ts.map +1 -1
  753. package/_types/actions/test/dropTransaction.d.ts +3 -0
  754. package/_types/actions/test/dropTransaction.d.ts.map +1 -1
  755. package/_types/actions/test/getAutomine.d.ts +3 -0
  756. package/_types/actions/test/getAutomine.d.ts.map +1 -1
  757. package/_types/actions/test/getTxpoolContent.d.ts +3 -0
  758. package/_types/actions/test/getTxpoolContent.d.ts.map +1 -1
  759. package/_types/actions/test/getTxpoolStatus.d.ts +3 -0
  760. package/_types/actions/test/getTxpoolStatus.d.ts.map +1 -1
  761. package/_types/actions/test/impersonateAccount.d.ts +3 -0
  762. package/_types/actions/test/impersonateAccount.d.ts.map +1 -1
  763. package/_types/actions/test/increaseTime.d.ts +3 -0
  764. package/_types/actions/test/increaseTime.d.ts.map +1 -1
  765. package/_types/actions/test/inspectTxpool.d.ts +3 -0
  766. package/_types/actions/test/inspectTxpool.d.ts.map +1 -1
  767. package/_types/actions/test/mine.d.ts +3 -0
  768. package/_types/actions/test/mine.d.ts.map +1 -1
  769. package/_types/actions/test/removeBlockTimestampInterval.d.ts +3 -0
  770. package/_types/actions/test/removeBlockTimestampInterval.d.ts.map +1 -1
  771. package/_types/actions/test/reset.d.ts +3 -0
  772. package/_types/actions/test/reset.d.ts.map +1 -1
  773. package/_types/actions/test/revert.d.ts +3 -0
  774. package/_types/actions/test/revert.d.ts.map +1 -1
  775. package/_types/actions/test/sendUnsignedTransaction.d.ts +3 -0
  776. package/_types/actions/test/sendUnsignedTransaction.d.ts.map +1 -1
  777. package/_types/actions/test/setAutomine.d.ts +3 -0
  778. package/_types/actions/test/setAutomine.d.ts.map +1 -1
  779. package/_types/actions/test/setBalance.d.ts +3 -0
  780. package/_types/actions/test/setBalance.d.ts.map +1 -1
  781. package/_types/actions/test/setBlockGasLimit.d.ts +3 -0
  782. package/_types/actions/test/setBlockGasLimit.d.ts.map +1 -1
  783. package/_types/actions/test/setBlockTimestampInterval.d.ts +3 -0
  784. package/_types/actions/test/setBlockTimestampInterval.d.ts.map +1 -1
  785. package/_types/actions/test/setCode.d.ts +3 -0
  786. package/_types/actions/test/setCode.d.ts.map +1 -1
  787. package/_types/actions/test/setCoinbase.d.ts +3 -0
  788. package/_types/actions/test/setCoinbase.d.ts.map +1 -1
  789. package/_types/actions/test/setIntervalMining.d.ts +3 -0
  790. package/_types/actions/test/setIntervalMining.d.ts.map +1 -1
  791. package/_types/actions/test/setLoggingEnabled.d.ts +3 -0
  792. package/_types/actions/test/setLoggingEnabled.d.ts.map +1 -1
  793. package/_types/actions/test/setMinGasPrice.d.ts +3 -0
  794. package/_types/actions/test/setMinGasPrice.d.ts.map +1 -1
  795. package/_types/actions/test/setNextBlockBaseFeePerGas.d.ts +3 -0
  796. package/_types/actions/test/setNextBlockBaseFeePerGas.d.ts.map +1 -1
  797. package/_types/actions/test/setNextBlockTimestamp.d.ts +3 -0
  798. package/_types/actions/test/setNextBlockTimestamp.d.ts.map +1 -1
  799. package/_types/actions/test/setNonce.d.ts +3 -0
  800. package/_types/actions/test/setNonce.d.ts.map +1 -1
  801. package/_types/actions/test/setRpcUrl.d.ts +3 -0
  802. package/_types/actions/test/setRpcUrl.d.ts.map +1 -1
  803. package/_types/actions/test/setStorageAt.d.ts +3 -0
  804. package/_types/actions/test/setStorageAt.d.ts.map +1 -1
  805. package/_types/actions/test/snapshot.d.ts +3 -0
  806. package/_types/actions/test/snapshot.d.ts.map +1 -1
  807. package/_types/actions/test/stopImpersonatingAccount.d.ts +3 -0
  808. package/_types/actions/test/stopImpersonatingAccount.d.ts.map +1 -1
  809. package/_types/actions/wallet/addChain.d.ts +4 -0
  810. package/_types/actions/wallet/addChain.d.ts.map +1 -1
  811. package/_types/actions/wallet/deployContract.d.ts +3 -1
  812. package/_types/actions/wallet/deployContract.d.ts.map +1 -1
  813. package/_types/actions/wallet/getAddresses.d.ts +4 -0
  814. package/_types/actions/wallet/getAddresses.d.ts.map +1 -1
  815. package/_types/actions/wallet/getPermissions.d.ts +3 -0
  816. package/_types/actions/wallet/getPermissions.d.ts.map +1 -1
  817. package/_types/actions/wallet/prepareTransactionRequest.d.ts +8 -0
  818. package/_types/actions/wallet/prepareTransactionRequest.d.ts.map +1 -1
  819. package/_types/actions/wallet/requestAddresses.d.ts +3 -0
  820. package/_types/actions/wallet/requestAddresses.d.ts.map +1 -1
  821. package/_types/actions/wallet/requestPermissions.d.ts +3 -0
  822. package/_types/actions/wallet/requestPermissions.d.ts.map +1 -1
  823. package/_types/actions/wallet/sendRawTransaction.d.ts +3 -0
  824. package/_types/actions/wallet/sendRawTransaction.d.ts.map +1 -1
  825. package/_types/actions/wallet/sendTransaction.d.ts +11 -0
  826. package/_types/actions/wallet/sendTransaction.d.ts.map +1 -1
  827. package/_types/actions/wallet/signMessage.d.ts +6 -0
  828. package/_types/actions/wallet/signMessage.d.ts.map +1 -1
  829. package/_types/actions/wallet/signTransaction.d.ts +9 -0
  830. package/_types/actions/wallet/signTransaction.d.ts.map +1 -1
  831. package/_types/actions/wallet/signTypedData.d.ts +9 -0
  832. package/_types/actions/wallet/signTypedData.d.ts.map +1 -1
  833. package/_types/actions/wallet/switchChain.d.ts +4 -0
  834. package/_types/actions/wallet/switchChain.d.ts.map +1 -1
  835. package/_types/actions/wallet/watchAsset.d.ts +3 -0
  836. package/_types/actions/wallet/watchAsset.d.ts.map +1 -1
  837. package/_types/actions/wallet/writeContract.d.ts +4 -1
  838. package/_types/actions/wallet/writeContract.d.ts.map +1 -1
  839. package/_types/chains/definitions/holesky.d.ts +6 -1
  840. package/_types/chains/definitions/holesky.d.ts.map +1 -1
  841. package/_types/clients/createClient.d.ts +3 -0
  842. package/_types/clients/createClient.d.ts.map +1 -1
  843. package/_types/clients/createPublicClient.d.ts +3 -1
  844. package/_types/clients/createPublicClient.d.ts.map +1 -1
  845. package/_types/clients/createTestClient.d.ts +3 -1
  846. package/_types/clients/createTestClient.d.ts.map +1 -1
  847. package/_types/clients/createWalletClient.d.ts +3 -1
  848. package/_types/clients/createWalletClient.d.ts.map +1 -1
  849. package/_types/clients/transports/createTransport.d.ts +2 -0
  850. package/_types/clients/transports/createTransport.d.ts.map +1 -1
  851. package/_types/clients/transports/custom.d.ts +3 -1
  852. package/_types/clients/transports/custom.d.ts.map +1 -1
  853. package/_types/clients/transports/fallback.d.ts +3 -1
  854. package/_types/clients/transports/fallback.d.ts.map +1 -1
  855. package/_types/clients/transports/http.d.ts +4 -1
  856. package/_types/clients/transports/http.d.ts.map +1 -1
  857. package/_types/clients/transports/webSocket.d.ts +4 -1
  858. package/_types/clients/transports/webSocket.d.ts.map +1 -1
  859. package/_types/contract/index.d.ts +25 -25
  860. package/_types/contract/index.d.ts.map +1 -1
  861. package/_types/ens/index.d.ts +8 -8
  862. package/_types/ens/index.d.ts.map +1 -1
  863. package/_types/errors/abi.d.ts +75 -0
  864. package/_types/errors/abi.d.ts.map +1 -1
  865. package/_types/errors/account.d.ts +3 -0
  866. package/_types/errors/account.d.ts.map +1 -1
  867. package/_types/errors/address.d.ts +3 -0
  868. package/_types/errors/address.d.ts.map +1 -1
  869. package/_types/errors/base.d.ts +3 -0
  870. package/_types/errors/base.d.ts.map +1 -1
  871. package/_types/errors/block.d.ts +3 -0
  872. package/_types/errors/block.d.ts.map +1 -1
  873. package/_types/errors/ccip.d.ts +9 -0
  874. package/_types/errors/ccip.d.ts.map +1 -1
  875. package/_types/errors/chain.d.ts +15 -0
  876. package/_types/errors/chain.d.ts.map +1 -1
  877. package/_types/errors/contract.d.ts +15 -0
  878. package/_types/errors/contract.d.ts.map +1 -1
  879. package/_types/errors/cursor.d.ts +6 -0
  880. package/_types/errors/cursor.d.ts.map +1 -1
  881. package/_types/errors/data.d.ts +6 -0
  882. package/_types/errors/data.d.ts.map +1 -1
  883. package/_types/errors/encoding.d.ts +26 -2
  884. package/_types/errors/encoding.d.ts.map +1 -1
  885. package/_types/errors/ens.d.ts +12 -0
  886. package/_types/errors/ens.d.ts.map +1 -1
  887. package/_types/errors/estimateGas.d.ts +3 -0
  888. package/_types/errors/estimateGas.d.ts.map +1 -1
  889. package/_types/errors/fee.d.ts +9 -0
  890. package/_types/errors/fee.d.ts.map +1 -1
  891. package/_types/errors/log.d.ts +3 -0
  892. package/_types/errors/log.d.ts.map +1 -1
  893. package/_types/errors/node.d.ts +37 -0
  894. package/_types/errors/node.d.ts.map +1 -1
  895. package/_types/errors/request.d.ts +12 -0
  896. package/_types/errors/request.d.ts.map +1 -1
  897. package/_types/errors/rpc.d.ts +81 -0
  898. package/_types/errors/rpc.d.ts.map +1 -1
  899. package/_types/errors/transaction.d.ts +30 -0
  900. package/_types/errors/transaction.d.ts.map +1 -1
  901. package/_types/errors/transport.d.ts +3 -0
  902. package/_types/errors/transport.d.ts.map +1 -1
  903. package/_types/errors/utils.d.ts +3 -0
  904. package/_types/errors/utils.d.ts.map +1 -1
  905. package/_types/errors/version.d.ts +1 -1
  906. package/_types/index.d.ts +176 -174
  907. package/_types/index.d.ts.map +1 -1
  908. package/_types/public/index.d.ts +27 -27
  909. package/_types/public/index.d.ts.map +1 -1
  910. package/_types/test/index.d.ts +28 -28
  911. package/_types/test/index.d.ts.map +1 -1
  912. package/_types/types/eip1193.d.ts +3 -0
  913. package/_types/types/eip1193.d.ts.map +1 -1
  914. package/_types/utils/abi/decodeAbiParameters.d.ts +20 -0
  915. package/_types/utils/abi/decodeAbiParameters.d.ts.map +1 -1
  916. package/_types/utils/abi/decodeDeployData.d.ts +4 -0
  917. package/_types/utils/abi/decodeDeployData.d.ts.map +1 -1
  918. package/_types/utils/abi/decodeErrorResult.d.ts +6 -0
  919. package/_types/utils/abi/decodeErrorResult.d.ts.map +1 -1
  920. package/_types/utils/abi/decodeEventLog.d.ts +6 -0
  921. package/_types/utils/abi/decodeEventLog.d.ts.map +1 -1
  922. package/_types/utils/abi/decodeFunctionData.d.ts +7 -0
  923. package/_types/utils/abi/decodeFunctionData.d.ts.map +1 -1
  924. package/_types/utils/abi/decodeFunctionResult.d.ts +5 -0
  925. package/_types/utils/abi/decodeFunctionResult.d.ts.map +1 -1
  926. package/_types/utils/abi/encodeAbiParameters.d.ts +21 -0
  927. package/_types/utils/abi/encodeAbiParameters.d.ts.map +1 -1
  928. package/_types/utils/abi/encodeDeployData.d.ts +5 -0
  929. package/_types/utils/abi/encodeDeployData.d.ts.map +1 -1
  930. package/_types/utils/abi/encodeErrorResult.d.ts +7 -0
  931. package/_types/utils/abi/encodeErrorResult.d.ts.map +1 -1
  932. package/_types/utils/abi/encodeEventTopics.d.ts +11 -0
  933. package/_types/utils/abi/encodeEventTopics.d.ts.map +1 -1
  934. package/_types/utils/abi/encodeFunctionData.d.ts +8 -0
  935. package/_types/utils/abi/encodeFunctionData.d.ts.map +1 -1
  936. package/_types/utils/abi/encodeFunctionResult.d.ts +5 -0
  937. package/_types/utils/abi/encodeFunctionResult.d.ts.map +1 -1
  938. package/_types/utils/abi/encodePacked.d.ts +9 -0
  939. package/_types/utils/abi/encodePacked.d.ts.map +1 -1
  940. package/_types/utils/abi/formatAbiItem.d.ts +5 -0
  941. package/_types/utils/abi/formatAbiItem.d.ts.map +1 -1
  942. package/_types/utils/abi/formatAbiItemWithArgs.d.ts +2 -0
  943. package/_types/utils/abi/formatAbiItemWithArgs.d.ts.map +1 -1
  944. package/_types/utils/abi/getAbiItem.d.ts +6 -0
  945. package/_types/utils/abi/getAbiItem.d.ts.map +1 -1
  946. package/_types/utils/address/getAddress.d.ts +6 -0
  947. package/_types/utils/address/getAddress.d.ts.map +1 -1
  948. package/_types/utils/address/getContractAddress.d.ts +11 -0
  949. package/_types/utils/address/getContractAddress.d.ts.map +1 -1
  950. package/_types/utils/address/isAddress.d.ts +2 -0
  951. package/_types/utils/address/isAddress.d.ts.map +1 -1
  952. package/_types/utils/address/isAddressEqual.d.ts +4 -0
  953. package/_types/utils/address/isAddressEqual.d.ts.map +1 -1
  954. package/_types/utils/buildRequest.d.ts +8 -0
  955. package/_types/utils/buildRequest.d.ts.map +1 -1
  956. package/_types/utils/ccip.d.ts +3 -0
  957. package/_types/utils/ccip.d.ts.map +1 -1
  958. package/_types/utils/chain.d.ts +4 -0
  959. package/_types/utils/chain.d.ts.map +1 -1
  960. package/_types/utils/contract/extractFunctionParts.d.ts +5 -0
  961. package/_types/utils/contract/extractFunctionParts.d.ts.map +1 -1
  962. package/_types/utils/cursor.d.ts +7 -0
  963. package/_types/utils/cursor.d.ts.map +1 -1
  964. package/_types/utils/data/concat.d.ts +4 -0
  965. package/_types/utils/data/concat.d.ts.map +1 -1
  966. package/_types/utils/data/isBytes.d.ts +2 -0
  967. package/_types/utils/data/isBytes.d.ts.map +1 -1
  968. package/_types/utils/data/isBytesEqual.d.ts +4 -0
  969. package/_types/utils/data/isBytesEqual.d.ts.map +1 -1
  970. package/_types/utils/data/isHex.d.ts +2 -0
  971. package/_types/utils/data/isHex.d.ts.map +1 -1
  972. package/_types/utils/data/pad.d.ts +5 -0
  973. package/_types/utils/data/pad.d.ts.map +1 -1
  974. package/_types/utils/data/size.d.ts +3 -0
  975. package/_types/utils/data/size.d.ts.map +1 -1
  976. package/_types/utils/data/slice.d.ts +9 -0
  977. package/_types/utils/data/slice.d.ts.map +1 -1
  978. package/_types/utils/data/trim.d.ts +2 -0
  979. package/_types/utils/data/trim.d.ts.map +1 -1
  980. package/_types/utils/encoding/fromBytes.d.ts +13 -5
  981. package/_types/utils/encoding/fromBytes.d.ts.map +1 -1
  982. package/_types/utils/encoding/fromHex.d.ts +11 -0
  983. package/_types/utils/encoding/fromHex.d.ts.map +1 -1
  984. package/_types/utils/encoding/fromRlp.d.ts +12 -0
  985. package/_types/utils/encoding/fromRlp.d.ts.map +1 -1
  986. package/_types/utils/encoding/toBytes.d.ts +12 -3
  987. package/_types/utils/encoding/toBytes.d.ts.map +1 -1
  988. package/_types/utils/encoding/toHex.d.ts +9 -0
  989. package/_types/utils/encoding/toHex.d.ts.map +1 -1
  990. package/_types/utils/encoding/toRlp.d.ts +7 -0
  991. package/_types/utils/encoding/toRlp.d.ts.map +1 -1
  992. package/_types/utils/ens/avatar/parseAvatarRecord.d.ts +4 -0
  993. package/_types/utils/ens/avatar/parseAvatarRecord.d.ts.map +1 -1
  994. package/_types/utils/ens/avatar/utils.d.ts +11 -0
  995. package/_types/utils/ens/avatar/utils.d.ts.map +1 -1
  996. package/_types/utils/ens/encodeLabelhash.d.ts +2 -0
  997. package/_types/utils/ens/encodeLabelhash.d.ts.map +1 -1
  998. package/_types/utils/ens/encodedLabelToLabelhash.d.ts +3 -0
  999. package/_types/utils/ens/encodedLabelToLabelhash.d.ts.map +1 -1
  1000. package/_types/utils/ens/errors.d.ts +2 -0
  1001. package/_types/utils/ens/errors.d.ts.map +1 -1
  1002. package/_types/utils/ens/labelhash.d.ts +6 -0
  1003. package/_types/utils/ens/labelhash.d.ts.map +1 -1
  1004. package/_types/utils/ens/namehash.d.ts +7 -0
  1005. package/_types/utils/ens/namehash.d.ts.map +1 -1
  1006. package/_types/utils/ens/normalize.d.ts +2 -0
  1007. package/_types/utils/ens/normalize.d.ts.map +1 -1
  1008. package/_types/utils/ens/packetToBytes.d.ts +5 -0
  1009. package/_types/utils/ens/packetToBytes.d.ts.map +1 -1
  1010. package/_types/utils/errors/getCallError.d.ts +8 -4
  1011. package/_types/utils/errors/getCallError.d.ts.map +1 -1
  1012. package/_types/utils/errors/getContractError.d.ts +7 -4
  1013. package/_types/utils/errors/getContractError.d.ts.map +1 -1
  1014. package/_types/utils/errors/getEstimateGasError.d.ts +8 -4
  1015. package/_types/utils/errors/getEstimateGasError.d.ts.map +1 -1
  1016. package/_types/utils/errors/getNodeError.d.ts +3 -2
  1017. package/_types/utils/errors/getNodeError.d.ts.map +1 -1
  1018. package/_types/utils/errors/getTransactionError.d.ts +7 -3
  1019. package/_types/utils/errors/getTransactionError.d.ts.map +1 -1
  1020. package/_types/utils/formatters/block.d.ts +4 -0
  1021. package/_types/utils/formatters/block.d.ts.map +1 -1
  1022. package/_types/utils/formatters/extract.d.ts +2 -0
  1023. package/_types/utils/formatters/extract.d.ts.map +1 -1
  1024. package/_types/utils/formatters/feeHistory.d.ts +2 -0
  1025. package/_types/utils/formatters/feeHistory.d.ts.map +1 -1
  1026. package/_types/utils/formatters/formatter.d.ts +2 -0
  1027. package/_types/utils/formatters/formatter.d.ts.map +1 -1
  1028. package/_types/utils/formatters/log.d.ts +2 -0
  1029. package/_types/utils/formatters/log.d.ts.map +1 -1
  1030. package/_types/utils/formatters/transaction.d.ts +4 -0
  1031. package/_types/utils/formatters/transaction.d.ts.map +1 -1
  1032. package/_types/utils/formatters/transactionReceipt.d.ts +4 -0
  1033. package/_types/utils/formatters/transactionReceipt.d.ts.map +1 -1
  1034. package/_types/utils/formatters/transactionRequest.d.ts +4 -0
  1035. package/_types/utils/formatters/transactionRequest.d.ts.map +1 -1
  1036. package/_types/utils/hash/getEventSelector.d.ts +4 -0
  1037. package/_types/utils/hash/getEventSelector.d.ts.map +1 -1
  1038. package/_types/utils/hash/getEventSignature.d.ts +3 -0
  1039. package/_types/utils/hash/getEventSignature.d.ts.map +1 -1
  1040. package/_types/utils/hash/getFunctionSelector.d.ts +6 -0
  1041. package/_types/utils/hash/getFunctionSelector.d.ts.map +1 -1
  1042. package/_types/utils/hash/getFunctionSignature.d.ts +4 -0
  1043. package/_types/utils/hash/getFunctionSignature.d.ts.map +1 -1
  1044. package/_types/utils/hash/hashFunction.d.ts +7 -0
  1045. package/_types/utils/hash/hashFunction.d.ts.map +1 -1
  1046. package/_types/utils/hash/isHash.d.ts +4 -0
  1047. package/_types/utils/hash/isHash.d.ts.map +1 -1
  1048. package/_types/utils/hash/keccak256.d.ts +5 -0
  1049. package/_types/utils/hash/keccak256.d.ts.map +1 -1
  1050. package/_types/utils/index.d.ts +80 -78
  1051. package/_types/utils/index.d.ts.map +1 -1
  1052. package/_types/utils/observe.d.ts +2 -0
  1053. package/_types/utils/observe.d.ts.map +1 -1
  1054. package/_types/utils/poll.d.ts +2 -0
  1055. package/_types/utils/poll.d.ts.map +1 -1
  1056. package/_types/utils/promise/createBatchScheduler.d.ts +2 -0
  1057. package/_types/utils/promise/createBatchScheduler.d.ts.map +1 -1
  1058. package/_types/utils/promise/withCache.d.ts +2 -0
  1059. package/_types/utils/promise/withCache.d.ts.map +1 -1
  1060. package/_types/utils/promise/withRetry.d.ts +2 -0
  1061. package/_types/utils/promise/withRetry.d.ts.map +1 -1
  1062. package/_types/utils/promise/withTimeout.d.ts +2 -0
  1063. package/_types/utils/promise/withTimeout.d.ts.map +1 -1
  1064. package/_types/utils/rpc.d.ts +8 -0
  1065. package/_types/utils/rpc.d.ts.map +1 -1
  1066. package/_types/utils/signature/hashMessage.d.ts +5 -0
  1067. package/_types/utils/signature/hashMessage.d.ts.map +1 -1
  1068. package/_types/utils/signature/hashTypedData.d.ts +13 -0
  1069. package/_types/utils/signature/hashTypedData.d.ts.map +1 -1
  1070. package/_types/utils/signature/hexToSignature.d.ts +3 -0
  1071. package/_types/utils/signature/hexToSignature.d.ts.map +1 -1
  1072. package/_types/utils/signature/recoverAddress.d.ts +2 -0
  1073. package/_types/utils/signature/recoverAddress.d.ts.map +1 -1
  1074. package/_types/utils/signature/recoverMessageAddress.d.ts +4 -0
  1075. package/_types/utils/signature/recoverMessageAddress.d.ts.map +1 -1
  1076. package/_types/utils/signature/recoverPublicKey.d.ts +4 -0
  1077. package/_types/utils/signature/recoverPublicKey.d.ts.map +1 -1
  1078. package/_types/utils/signature/recoverTypedDataAddress.d.ts +4 -0
  1079. package/_types/utils/signature/recoverTypedDataAddress.d.ts.map +1 -1
  1080. package/_types/utils/signature/signatureToHex.d.ts +4 -0
  1081. package/_types/utils/signature/signatureToHex.d.ts.map +1 -1
  1082. package/_types/utils/signature/verifyMessage.d.ts +5 -0
  1083. package/_types/utils/signature/verifyMessage.d.ts.map +1 -1
  1084. package/_types/utils/signature/verifyTypedData.d.ts +5 -0
  1085. package/_types/utils/signature/verifyTypedData.d.ts.map +1 -1
  1086. package/_types/utils/stringify.d.ts +2 -0
  1087. package/_types/utils/stringify.d.ts.map +1 -1
  1088. package/_types/utils/transaction/assertRequest.d.ts +6 -0
  1089. package/_types/utils/transaction/assertRequest.d.ts.map +1 -1
  1090. package/_types/utils/transaction/assertTransaction.d.ts +9 -0
  1091. package/_types/utils/transaction/assertTransaction.d.ts.map +1 -1
  1092. package/_types/utils/transaction/getSerializedTransactionType.d.ts +5 -0
  1093. package/_types/utils/transaction/getSerializedTransactionType.d.ts.map +1 -1
  1094. package/_types/utils/transaction/getTransactionType.d.ts +3 -0
  1095. package/_types/utils/transaction/getTransactionType.d.ts.map +1 -1
  1096. package/_types/utils/transaction/parseTransaction.d.ts +18 -1
  1097. package/_types/utils/transaction/parseTransaction.d.ts.map +1 -1
  1098. package/_types/utils/transaction/serializeAccessList.d.ts +5 -0
  1099. package/_types/utils/transaction/serializeAccessList.d.ts.map +1 -1
  1100. package/_types/utils/transaction/serializeTransaction.d.ts +13 -1
  1101. package/_types/utils/transaction/serializeTransaction.d.ts.map +1 -1
  1102. package/_types/utils/typedData.d.ts +8 -0
  1103. package/_types/utils/typedData.d.ts.map +1 -1
  1104. package/_types/utils/unit/formatEther.d.ts +2 -0
  1105. package/_types/utils/unit/formatEther.d.ts.map +1 -1
  1106. package/_types/utils/unit/formatGwei.d.ts +2 -0
  1107. package/_types/utils/unit/formatGwei.d.ts.map +1 -1
  1108. package/_types/utils/unit/formatUnits.d.ts +2 -0
  1109. package/_types/utils/unit/formatUnits.d.ts.map +1 -1
  1110. package/_types/utils/unit/parseEther.d.ts +3 -0
  1111. package/_types/utils/unit/parseEther.d.ts.map +1 -1
  1112. package/_types/utils/unit/parseGwei.d.ts +3 -0
  1113. package/_types/utils/unit/parseGwei.d.ts.map +1 -1
  1114. package/_types/utils/unit/parseUnits.d.ts +2 -0
  1115. package/_types/utils/unit/parseUnits.d.ts.map +1 -1
  1116. package/abi/index.ts +7 -1
  1117. package/accounts/generateMnemonic.ts +3 -0
  1118. package/accounts/generatePrivateKey.ts +4 -1
  1119. package/accounts/hdKeyToAccount.ts +11 -2
  1120. package/accounts/index.ts +46 -11
  1121. package/accounts/mnemonicToAccount.ts +7 -1
  1122. package/accounts/privateKeyToAccount.ts +25 -6
  1123. package/accounts/toAccount.ts +14 -2
  1124. package/accounts/utils/parseAccount.ts +3 -0
  1125. package/accounts/utils/privateKeyToAddress.ts +14 -2
  1126. package/accounts/utils/publicKeyToAddress.ts +14 -2
  1127. package/accounts/utils/sign.ts +5 -1
  1128. package/accounts/utils/signMessage.ts +17 -3
  1129. package/accounts/utils/signTransaction.ts +12 -2
  1130. package/accounts/utils/signTypedData.ts +16 -3
  1131. package/actions/ens/getEnsAddress.ts +30 -7
  1132. package/actions/ens/getEnsAvatar.ts +15 -2
  1133. package/actions/ens/getEnsName.ts +18 -3
  1134. package/actions/ens/getEnsResolver.ts +16 -3
  1135. package/actions/ens/getEnsText.ts +28 -6
  1136. package/actions/getContract.ts +3 -0
  1137. package/actions/index.ts +111 -10
  1138. package/actions/public/call.ts +60 -10
  1139. package/actions/public/createBlockFilter.ts +4 -0
  1140. package/actions/public/createContractEventFilter.ts +13 -1
  1141. package/actions/public/createEventFilter.ts +13 -1
  1142. package/actions/public/createPendingTransactionFilter.ts +6 -0
  1143. package/actions/public/estimateContractGas.ts +21 -4
  1144. package/actions/public/estimateFeesPerGas.ts +15 -2
  1145. package/actions/public/estimateGas.ts +21 -3
  1146. package/actions/public/estimateMaxPriorityFeePerGas.ts +22 -4
  1147. package/actions/public/getBalance.ts +11 -1
  1148. package/actions/public/getBlock.ts +16 -2
  1149. package/actions/public/getBlockNumber.ts +4 -0
  1150. package/actions/public/getBlockTransactionCount.ts +16 -2
  1151. package/actions/public/getBytecode.ts +11 -1
  1152. package/actions/public/getChainId.ts +11 -1
  1153. package/actions/public/getContractEvents.ts +12 -2
  1154. package/actions/public/getFeeHistory.ts +14 -2
  1155. package/actions/public/getFilterChanges.ts +16 -2
  1156. package/actions/public/getFilterLogs.ts +16 -2
  1157. package/actions/public/getGasPrice.ts +4 -0
  1158. package/actions/public/getLogs.ts +23 -3
  1159. package/actions/public/getStorageAt.ts +11 -1
  1160. package/actions/public/getTransaction.ts +11 -1
  1161. package/actions/public/getTransactionConfirmations.ts +14 -2
  1162. package/actions/public/getTransactionCount.ts +16 -2
  1163. package/actions/public/getTransactionReceipt.ts +11 -1
  1164. package/actions/public/multicall.ts +27 -5
  1165. package/actions/public/readContract.ts +18 -4
  1166. package/actions/public/simulateContract.ts +24 -5
  1167. package/actions/public/uninstallFilter.ts +4 -0
  1168. package/actions/public/verifyHash.ts +17 -2
  1169. package/actions/public/verifyMessage.ts +12 -1
  1170. package/actions/public/verifyTypedData.ts +15 -2
  1171. package/actions/public/waitForTransactionReceipt.ts +17 -3
  1172. package/actions/public/watchBlockNumber.ts +4 -1
  1173. package/actions/public/watchBlocks.ts +8 -2
  1174. package/actions/public/watchContractEvent.ts +12 -5
  1175. package/actions/public/watchEvent.ts +8 -2
  1176. package/actions/public/watchPendingTransactions.ts +8 -2
  1177. package/actions/test/dropTransaction.ts +4 -0
  1178. package/actions/test/getAutomine.ts +4 -0
  1179. package/actions/test/getTxpoolContent.ts +4 -0
  1180. package/actions/test/getTxpoolStatus.ts +4 -0
  1181. package/actions/test/impersonateAccount.ts +4 -0
  1182. package/actions/test/increaseTime.ts +4 -0
  1183. package/actions/test/inspectTxpool.ts +4 -0
  1184. package/actions/test/mine.ts +4 -0
  1185. package/actions/test/removeBlockTimestampInterval.ts +4 -0
  1186. package/actions/test/reset.ts +4 -0
  1187. package/actions/test/revert.ts +4 -0
  1188. package/actions/test/sendUnsignedTransaction.ts +4 -0
  1189. package/actions/test/setAutomine.ts +4 -0
  1190. package/actions/test/setBalance.ts +4 -0
  1191. package/actions/test/setBlockGasLimit.ts +4 -0
  1192. package/actions/test/setBlockTimestampInterval.ts +10 -1
  1193. package/actions/test/setCode.ts +4 -0
  1194. package/actions/test/setCoinbase.ts +4 -0
  1195. package/actions/test/setIntervalMining.ts +10 -1
  1196. package/actions/test/setLoggingEnabled.ts +4 -0
  1197. package/actions/test/setMinGasPrice.ts +4 -0
  1198. package/actions/test/setNextBlockBaseFeePerGas.ts +4 -0
  1199. package/actions/test/setNextBlockTimestamp.ts +4 -0
  1200. package/actions/test/setNonce.ts +4 -0
  1201. package/actions/test/setRpcUrl.ts +4 -0
  1202. package/actions/test/setStorageAt.ts +4 -0
  1203. package/actions/test/snapshot.ts +4 -0
  1204. package/actions/test/stopImpersonatingAccount.ts +4 -0
  1205. package/actions/wallet/addChain.ts +11 -1
  1206. package/actions/wallet/deployContract.ts +4 -0
  1207. package/actions/wallet/getAddresses.ts +11 -1
  1208. package/actions/wallet/getPermissions.ts +4 -0
  1209. package/actions/wallet/prepareTransactionRequest.ts +34 -6
  1210. package/actions/wallet/requestAddresses.ts +4 -0
  1211. package/actions/wallet/requestPermissions.ts +4 -0
  1212. package/actions/wallet/sendRawTransaction.ts +4 -0
  1213. package/actions/wallet/sendTransaction.ts +38 -6
  1214. package/actions/wallet/signMessage.ts +19 -2
  1215. package/actions/wallet/signTransaction.ts +27 -4
  1216. package/actions/wallet/signTypedData.ts +26 -4
  1217. package/actions/wallet/switchChain.ts +11 -1
  1218. package/actions/wallet/watchAsset.ts +3 -0
  1219. package/actions/wallet/writeContract.ts +11 -1
  1220. package/chains/definitions/holesky.ts +6 -1
  1221. package/clients/createClient.ts +4 -0
  1222. package/clients/createPublicClient.ts +9 -1
  1223. package/clients/createTestClient.ts +9 -1
  1224. package/clients/createWalletClient.ts +9 -1
  1225. package/clients/transports/createTransport.ts +3 -0
  1226. package/clients/transports/custom.ts +4 -0
  1227. package/clients/transports/fallback.ts +4 -0
  1228. package/clients/transports/http.ts +11 -1
  1229. package/clients/transports/webSocket.ts +11 -1
  1230. package/contract/index.ts +31 -2
  1231. package/ens/index.ts +8 -3
  1232. package/errors/abi.ts +87 -0
  1233. package/errors/account.ts +3 -0
  1234. package/errors/address.ts +3 -0
  1235. package/errors/base.ts +1 -0
  1236. package/errors/block.ts +3 -0
  1237. package/errors/ccip.ts +11 -0
  1238. package/errors/chain.ts +17 -0
  1239. package/errors/contract.ts +18 -0
  1240. package/errors/cursor.ts +6 -0
  1241. package/errors/data.ts +6 -0
  1242. package/errors/encoding.ts +26 -2
  1243. package/errors/ens.ts +14 -0
  1244. package/errors/estimateGas.ts +3 -0
  1245. package/errors/fee.ts +9 -0
  1246. package/errors/log.ts +3 -0
  1247. package/errors/node.ts +38 -1
  1248. package/errors/request.ts +12 -0
  1249. package/errors/rpc.ts +81 -0
  1250. package/errors/transaction.ts +35 -0
  1251. package/errors/transport.ts +3 -0
  1252. package/errors/utils.ts +2 -0
  1253. package/errors/version.ts +1 -1
  1254. package/index.ts +549 -80
  1255. package/package.json +1 -1
  1256. package/public/index.ts +34 -1
  1257. package/test/index.ts +60 -10
  1258. package/types/eip1193.ts +3 -0
  1259. package/utils/abi/decodeAbiParameters.ts +70 -5
  1260. package/utils/abi/decodeDeployData.ts +13 -1
  1261. package/utils/abi/decodeErrorResult.ts +21 -5
  1262. package/utils/abi/decodeEventLog.ts +26 -3
  1263. package/utils/abi/decodeFunctionData.ts +19 -5
  1264. package/utils/abi/decodeFunctionResult.ts +15 -2
  1265. package/utils/abi/encodeAbiParameters.ts +87 -7
  1266. package/utils/abi/encodeDeployData.ts +13 -3
  1267. package/utils/abi/encodeErrorResult.ts +20 -5
  1268. package/utils/abi/encodeEventTopics.ts +36 -9
  1269. package/utils/abi/encodeFunctionData.ts +25 -6
  1270. package/utils/abi/encodeFunctionResult.ts +13 -2
  1271. package/utils/abi/encodePacked.ts +35 -5
  1272. package/utils/abi/formatAbiItem.ts +14 -1
  1273. package/utils/abi/formatAbiItemWithArgs.ts +3 -0
  1274. package/utils/abi/getAbiItem.ts +16 -4
  1275. package/utils/address/getAddress.ts +16 -3
  1276. package/utils/address/getContractAddress.ts +27 -8
  1277. package/utils/address/isAddress.ts +3 -0
  1278. package/utils/address/isAddressEqual.ts +8 -2
  1279. package/utils/buildRequest.ts +62 -2
  1280. package/utils/ccip.ts +5 -0
  1281. package/utils/chain.ts +12 -0
  1282. package/utils/contract/extractFunctionParts.ts +10 -0
  1283. package/utils/cursor.ts +15 -0
  1284. package/utils/data/concat.ts +10 -0
  1285. package/utils/data/isBytes.ts +3 -0
  1286. package/utils/data/isBytesEqual.ts +8 -2
  1287. package/utils/data/isHex.ts +3 -0
  1288. package/utils/data/pad.ts +11 -1
  1289. package/utils/data/size.ts +4 -1
  1290. package/utils/data/slice.ts +33 -3
  1291. package/utils/data/trim.ts +3 -0
  1292. package/utils/encoding/fromBytes.ts +44 -8
  1293. package/utils/encoding/fromHex.ts +35 -3
  1294. package/utils/encoding/fromRlp.ts +34 -5
  1295. package/utils/encoding/toBytes.ts +36 -6
  1296. package/utils/encoding/toHex.ts +25 -3
  1297. package/utils/encoding/toRlp.ts +18 -3
  1298. package/utils/ens/avatar/parseAvatarRecord.ts +21 -0
  1299. package/utils/ens/avatar/utils.ts +41 -1
  1300. package/utils/ens/encodeLabelhash.ts +3 -0
  1301. package/utils/ens/encodedLabelToLabelhash.ts +4 -1
  1302. package/utils/ens/errors.ts +3 -0
  1303. package/utils/ens/labelhash.ts +18 -4
  1304. package/utils/ens/namehash.ts +23 -5
  1305. package/utils/ens/normalize.ts +3 -0
  1306. package/utils/ens/packetToBytes.ts +16 -3
  1307. package/utils/errors/getCallError.ts +29 -8
  1308. package/utils/errors/getContractError.ts +35 -19
  1309. package/utils/errors/getEstimateGasError.ts +27 -8
  1310. package/utils/errors/getNodeError.ts +43 -14
  1311. package/utils/errors/getTransactionError.ts +27 -8
  1312. package/utils/formatters/block.ts +6 -1
  1313. package/utils/formatters/extract.ts +3 -0
  1314. package/utils/formatters/feeHistory.ts +3 -0
  1315. package/utils/formatters/formatter.ts +3 -0
  1316. package/utils/formatters/log.ts +3 -0
  1317. package/utils/formatters/transaction.ts +6 -1
  1318. package/utils/formatters/transactionReceipt.ts +8 -1
  1319. package/utils/formatters/transactionRequest.ts +8 -1
  1320. package/utils/hash/getEventSelector.ts +8 -2
  1321. package/utils/hash/getEventSignature.ts +9 -1
  1322. package/utils/hash/getFunctionSelector.ts +15 -4
  1323. package/utils/hash/getFunctionSignature.ts +13 -1
  1324. package/utils/hash/hashFunction.ts +23 -4
  1325. package/utils/hash/isHash.ts +5 -2
  1326. package/utils/hash/keccak256.ts +10 -3
  1327. package/utils/index.ts +241 -45
  1328. package/utils/observe.ts +3 -0
  1329. package/utils/poll.ts +3 -0
  1330. package/utils/promise/createBatchScheduler.ts +5 -0
  1331. package/utils/promise/withCache.ts +4 -0
  1332. package/utils/promise/withRetry.ts +3 -0
  1333. package/utils/promise/withTimeout.ts +4 -0
  1334. package/utils/rpc.ts +27 -3
  1335. package/utils/signature/hashMessage.ts +16 -3
  1336. package/utils/signature/hashTypedData.ts +46 -4
  1337. package/utils/signature/hexToSignature.ts +7 -1
  1338. package/utils/signature/recoverAddress.ts +4 -0
  1339. package/utils/signature/recoverMessageAddress.ts +12 -2
  1340. package/utils/signature/recoverPublicKey.ts +9 -2
  1341. package/utils/signature/recoverTypedDataAddress.ts +12 -2
  1342. package/utils/signature/signatureToHex.ts +11 -2
  1343. package/utils/signature/verifyMessage.ts +16 -3
  1344. package/utils/signature/verifyTypedData.ts +12 -2
  1345. package/utils/stringify.ts +4 -0
  1346. package/utils/transaction/assertRequest.ts +27 -4
  1347. package/utils/transaction/assertTransaction.ts +42 -5
  1348. package/utils/transaction/getSerializedTransactionType.ts +13 -3
  1349. package/utils/transaction/getTransactionType.ts +9 -1
  1350. package/utils/transaction/parseTransaction.ts +71 -6
  1351. package/utils/transaction/serializeAccessList.ts +16 -3
  1352. package/utils/transaction/serializeTransaction.ts +48 -5
  1353. package/utils/typedData.ts +22 -4
  1354. package/utils/unit/formatEther.ts +3 -1
  1355. package/utils/unit/formatGwei.ts +3 -1
  1356. package/utils/unit/formatUnits.ts +4 -0
  1357. package/utils/unit/parseEther.ts +4 -1
  1358. package/utils/unit/parseGwei.ts +4 -1
  1359. package/utils/unit/parseUnits.ts +4 -0
@@ -1,13 +1,28 @@
1
1
  import type { CallParameters } from '../../actions/public/call.js'
2
2
  import type { BaseError } from '../../errors/base.js'
3
- import { CallExecutionError } from '../../errors/contract.js'
3
+ import {
4
+ CallExecutionError,
5
+ type CallExecutionErrorType,
6
+ } from '../../errors/contract.js'
4
7
  import { UnknownNodeError } from '../../errors/node.js'
8
+ import type { ErrorType } from '../../errors/utils.js'
5
9
  import type { Chain } from '../../types/chain.js'
6
10
 
7
- import { type GetNodeErrorParameters, getNodeError } from './getNodeError.js'
11
+ import {
12
+ type GetNodeErrorParameters,
13
+ type GetNodeErrorReturnType,
14
+ getNodeError,
15
+ } from './getNodeError.js'
8
16
 
9
- export function getCallError(
10
- err: BaseError,
17
+ export type GetCallErrorReturnType<cause = ErrorType> = Omit<
18
+ CallExecutionErrorType,
19
+ 'cause'
20
+ > & {
21
+ cause: cause | GetNodeErrorReturnType
22
+ }
23
+
24
+ export function getCallError<err extends ErrorType<string>>(
25
+ err: err,
11
26
  {
12
27
  docsPath,
13
28
  ...args
@@ -15,11 +30,17 @@ export function getCallError(
15
30
  chain?: Chain
16
31
  docsPath?: string
17
32
  },
18
- ) {
19
- let cause = getNodeError(err, args as GetNodeErrorParameters)
20
- if (cause instanceof UnknownNodeError) cause = err
33
+ ): GetCallErrorReturnType<err> {
34
+ const cause = (() => {
35
+ const cause = getNodeError(
36
+ err as {} as BaseError,
37
+ args as GetNodeErrorParameters,
38
+ )
39
+ if (cause instanceof UnknownNodeError) return err as {} as BaseError
40
+ return cause
41
+ })()
21
42
  return new CallExecutionError(cause, {
22
43
  docsPath,
23
44
  ...args,
24
- })
45
+ }) as GetCallErrorReturnType<err>
25
46
  }
@@ -4,16 +4,30 @@ import { AbiDecodingZeroDataError } from '../../errors/abi.js'
4
4
  import { BaseError } from '../../errors/base.js'
5
5
  import {
6
6
  ContractFunctionExecutionError,
7
+ type ContractFunctionExecutionErrorType,
7
8
  ContractFunctionRevertedError,
9
+ type ContractFunctionRevertedErrorType,
8
10
  ContractFunctionZeroDataError,
11
+ type ContractFunctionZeroDataErrorType,
9
12
  RawContractError,
10
13
  } from '../../errors/contract.js'
11
14
  import { InternalRpcError } from '../../errors/rpc.js'
15
+ import type { ErrorType } from '../../errors/utils.js'
12
16
 
13
17
  const EXECUTION_REVERTED_ERROR_CODE = 3
14
18
 
15
- export function getContractError(
16
- err: BaseError,
19
+ export type GetContractErrorReturnType<cause = ErrorType> = Omit<
20
+ ContractFunctionExecutionErrorType,
21
+ 'cause'
22
+ > & {
23
+ cause:
24
+ | cause
25
+ | ContractFunctionZeroDataErrorType
26
+ | ContractFunctionRevertedErrorType
27
+ }
28
+
29
+ export function getContractError<err extends ErrorType<string>>(
30
+ err: err,
17
31
  {
18
32
  abi,
19
33
  address,
@@ -29,7 +43,7 @@ export function getContractError(
29
43
  functionName: string
30
44
  sender?: Address
31
45
  },
32
- ) {
46
+ ): GetContractErrorReturnType {
33
47
  const { code, data, message, shortMessage } = (
34
48
  err instanceof RawContractError
35
49
  ? err
@@ -38,27 +52,29 @@ export function getContractError(
38
52
  : {}
39
53
  ) as RawContractError
40
54
 
41
- let cause = err
42
- if (err instanceof AbiDecodingZeroDataError) {
43
- cause = new ContractFunctionZeroDataError({ functionName })
44
- } else if (
45
- [EXECUTION_REVERTED_ERROR_CODE, InternalRpcError.code].includes(code) &&
46
- (data || message || shortMessage)
47
- ) {
48
- cause = new ContractFunctionRevertedError({
49
- abi,
50
- data: typeof data === 'object' ? data.data : data,
51
- functionName,
52
- message: shortMessage ?? message,
53
- })
54
- }
55
+ const cause = (() => {
56
+ if (err instanceof AbiDecodingZeroDataError)
57
+ return new ContractFunctionZeroDataError({ functionName })
58
+ if (
59
+ [EXECUTION_REVERTED_ERROR_CODE, InternalRpcError.code].includes(code) &&
60
+ (data || message || shortMessage)
61
+ ) {
62
+ return new ContractFunctionRevertedError({
63
+ abi,
64
+ data: typeof data === 'object' ? data.data : data,
65
+ functionName,
66
+ message: shortMessage ?? message,
67
+ })
68
+ }
69
+ return err
70
+ })()
55
71
 
56
- return new ContractFunctionExecutionError(cause, {
72
+ return new ContractFunctionExecutionError(cause as BaseError, {
57
73
  abi,
58
74
  args,
59
75
  contractAddress: address,
60
76
  docsPath,
61
77
  functionName,
62
78
  sender,
63
- })
79
+ }) as GetContractErrorReturnType
64
80
  }
@@ -1,14 +1,27 @@
1
1
  import type { Account } from '../../accounts/types.js'
2
2
  import type { EstimateGasParameters } from '../../actions/public/estimateGas.js'
3
3
  import type { BaseError } from '../../errors/base.js'
4
- import { EstimateGasExecutionError } from '../../errors/estimateGas.js'
4
+ import {
5
+ EstimateGasExecutionError,
6
+ type EstimateGasExecutionErrorType,
7
+ } from '../../errors/estimateGas.js'
5
8
  import { UnknownNodeError } from '../../errors/node.js'
9
+ import type { ErrorType } from '../../errors/utils.js'
6
10
  import type { Chain } from '../../types/chain.js'
7
11
 
8
- import { type GetNodeErrorParameters, getNodeError } from './getNodeError.js'
12
+ import {
13
+ type GetNodeErrorParameters,
14
+ type GetNodeErrorReturnType,
15
+ getNodeError,
16
+ } from './getNodeError.js'
9
17
 
10
- export function getEstimateGasError(
11
- err: BaseError,
18
+ export type GetEstimateGasErrorReturnType<cause = ErrorType> = Omit<
19
+ EstimateGasExecutionErrorType,
20
+ 'cause'
21
+ > & { cause: cause | GetNodeErrorReturnType }
22
+
23
+ export function getEstimateGasError<err extends ErrorType<string>>(
24
+ err: err,
12
25
  {
13
26
  docsPath,
14
27
  ...args
@@ -17,11 +30,17 @@ export function getEstimateGasError(
17
30
  chain?: Chain
18
31
  docsPath?: string
19
32
  },
20
- ) {
21
- let cause = getNodeError(err, args as GetNodeErrorParameters)
22
- if (cause instanceof UnknownNodeError) cause = err
33
+ ): GetEstimateGasErrorReturnType<err> {
34
+ const cause = (() => {
35
+ const cause = getNodeError(
36
+ err as {} as BaseError,
37
+ args as GetNodeErrorParameters,
38
+ )
39
+ if (cause instanceof UnknownNodeError) return err as {} as BaseError
40
+ return cause
41
+ })()
23
42
  return new EstimateGasExecutionError(cause, {
24
43
  docsPath,
25
44
  ...args,
26
- })
45
+ }) as GetEstimateGasErrorReturnType<err>
27
46
  }
@@ -2,17 +2,29 @@ import type { SendTransactionParameters } from '../../actions/wallet/sendTransac
2
2
  import { BaseError } from '../../errors/base.js'
3
3
  import {
4
4
  ExecutionRevertedError,
5
+ type ExecutionRevertedErrorType,
5
6
  FeeCapTooHighError,
7
+ type FeeCapTooHighErrorType,
6
8
  FeeCapTooLowError,
9
+ type FeeCapTooLowErrorType,
7
10
  InsufficientFundsError,
11
+ type InsufficientFundsErrorType,
8
12
  IntrinsicGasTooHighError,
13
+ type IntrinsicGasTooHighErrorType,
9
14
  IntrinsicGasTooLowError,
15
+ type IntrinsicGasTooLowErrorType,
10
16
  NonceMaxValueError,
17
+ type NonceMaxValueErrorType,
11
18
  NonceTooHighError,
19
+ type NonceTooHighErrorType,
12
20
  NonceTooLowError,
21
+ type NonceTooLowErrorType,
13
22
  TipAboveFeeCapError,
23
+ type TipAboveFeeCapErrorType,
14
24
  TransactionTypeNotSupportedError,
25
+ type TransactionTypeNotSupportedErrorType,
15
26
  UnknownNodeError,
27
+ type UnknownNodeErrorType,
16
28
  } from '../../errors/node.js'
17
29
  import { RpcRequestError } from '../../errors/request.js'
18
30
  import {
@@ -30,7 +42,24 @@ export function containsNodeError(err: BaseError) {
30
42
 
31
43
  export type GetNodeErrorParameters = Partial<SendTransactionParameters<any>>
32
44
 
33
- export function getNodeError(err: BaseError, args: GetNodeErrorParameters) {
45
+ export type GetNodeErrorReturnType =
46
+ | ExecutionRevertedErrorType
47
+ | FeeCapTooHighErrorType
48
+ | FeeCapTooLowErrorType
49
+ | NonceTooHighErrorType
50
+ | NonceTooLowErrorType
51
+ | NonceMaxValueErrorType
52
+ | InsufficientFundsErrorType
53
+ | IntrinsicGasTooHighErrorType
54
+ | IntrinsicGasTooLowErrorType
55
+ | TransactionTypeNotSupportedErrorType
56
+ | TipAboveFeeCapErrorType
57
+ | UnknownNodeErrorType
58
+
59
+ export function getNodeError(
60
+ err: BaseError,
61
+ args: GetNodeErrorParameters,
62
+ ): GetNodeErrorReturnType {
34
63
  const message = (err.details || '').toLowerCase()
35
64
 
36
65
  const executionRevertedError = err.walk(
@@ -40,43 +69,43 @@ export function getNodeError(err: BaseError, args: GetNodeErrorParameters) {
40
69
  return new ExecutionRevertedError({
41
70
  cause: err,
42
71
  message: executionRevertedError.details,
43
- })
72
+ }) as any
44
73
  } else if (ExecutionRevertedError.nodeMessage.test(message))
45
74
  return new ExecutionRevertedError({
46
75
  cause: err,
47
76
  message: err.details,
48
- })
77
+ }) as any
49
78
  else if (FeeCapTooHighError.nodeMessage.test(message))
50
79
  return new FeeCapTooHighError({
51
80
  cause: err,
52
81
  maxFeePerGas: args?.maxFeePerGas,
53
- })
82
+ }) as any
54
83
  else if (FeeCapTooLowError.nodeMessage.test(message))
55
84
  return new FeeCapTooLowError({
56
85
  cause: err,
57
86
  maxFeePerGas: args?.maxFeePerGas,
58
- })
87
+ }) as any
59
88
  else if (NonceTooHighError.nodeMessage.test(message))
60
- return new NonceTooHighError({ cause: err, nonce: args?.nonce })
89
+ return new NonceTooHighError({ cause: err, nonce: args?.nonce }) as any
61
90
  else if (NonceTooLowError.nodeMessage.test(message))
62
- return new NonceTooLowError({ cause: err, nonce: args?.nonce })
91
+ return new NonceTooLowError({ cause: err, nonce: args?.nonce }) as any
63
92
  else if (NonceMaxValueError.nodeMessage.test(message))
64
- return new NonceMaxValueError({ cause: err, nonce: args?.nonce })
93
+ return new NonceMaxValueError({ cause: err, nonce: args?.nonce }) as any
65
94
  else if (InsufficientFundsError.nodeMessage.test(message))
66
- return new InsufficientFundsError({ cause: err })
95
+ return new InsufficientFundsError({ cause: err }) as any
67
96
  else if (IntrinsicGasTooHighError.nodeMessage.test(message))
68
- return new IntrinsicGasTooHighError({ cause: err, gas: args?.gas })
97
+ return new IntrinsicGasTooHighError({ cause: err, gas: args?.gas }) as any
69
98
  else if (IntrinsicGasTooLowError.nodeMessage.test(message))
70
- return new IntrinsicGasTooLowError({ cause: err, gas: args?.gas })
99
+ return new IntrinsicGasTooLowError({ cause: err, gas: args?.gas }) as any
71
100
  else if (TransactionTypeNotSupportedError.nodeMessage.test(message))
72
- return new TransactionTypeNotSupportedError({ cause: err })
101
+ return new TransactionTypeNotSupportedError({ cause: err }) as any
73
102
  else if (TipAboveFeeCapError.nodeMessage.test(message))
74
103
  return new TipAboveFeeCapError({
75
104
  cause: err,
76
105
  maxFeePerGas: args?.maxFeePerGas,
77
106
  maxPriorityFeePerGas: args?.maxPriorityFeePerGas,
78
- })
107
+ }) as any
79
108
  return new UnknownNodeError({
80
109
  cause: err,
81
- })
110
+ }) as any
82
111
  }
@@ -2,10 +2,18 @@ import type { Account } from '../../accounts/types.js'
2
2
  import type { SendTransactionParameters } from '../../actions/wallet/sendTransaction.js'
3
3
  import type { BaseError } from '../../errors/base.js'
4
4
  import { UnknownNodeError } from '../../errors/node.js'
5
- import { TransactionExecutionError } from '../../errors/transaction.js'
5
+ import {
6
+ TransactionExecutionError,
7
+ type TransactionExecutionErrorType,
8
+ } from '../../errors/transaction.js'
9
+ import type { ErrorType } from '../../errors/utils.js'
6
10
  import type { Chain } from '../../types/chain.js'
7
11
 
8
- import { type GetNodeErrorParameters, getNodeError } from './getNodeError.js'
12
+ import {
13
+ type GetNodeErrorParameters,
14
+ type GetNodeErrorReturnType,
15
+ getNodeError,
16
+ } from './getNodeError.js'
9
17
 
10
18
  export type GetTransactionErrorParameters = Omit<
11
19
  SendTransactionParameters,
@@ -16,14 +24,25 @@ export type GetTransactionErrorParameters = Omit<
16
24
  docsPath?: string
17
25
  }
18
26
 
19
- export function getTransactionError(
20
- err: BaseError,
27
+ export type GetTransactionErrorReturnType<cause = ErrorType> = Omit<
28
+ TransactionExecutionErrorType,
29
+ 'cause'
30
+ > & { cause: cause | GetNodeErrorReturnType }
31
+
32
+ export function getTransactionError<err extends ErrorType<string>>(
33
+ err: err,
21
34
  { docsPath, ...args }: GetTransactionErrorParameters,
22
- ) {
23
- let cause = getNodeError(err, args as GetNodeErrorParameters)
24
- if (cause instanceof UnknownNodeError) cause = err
35
+ ): GetTransactionErrorReturnType<err> {
36
+ const cause = (() => {
37
+ const cause = getNodeError(
38
+ err as {} as BaseError,
39
+ args as GetNodeErrorParameters,
40
+ )
41
+ if (cause instanceof UnknownNodeError) return err as {} as BaseError
42
+ return cause
43
+ })()
25
44
  return new TransactionExecutionError(cause, {
26
45
  docsPath,
27
46
  ...args,
28
- })
47
+ }) as GetTransactionErrorReturnType<err>
29
48
  }
@@ -1,3 +1,4 @@
1
+ import type { ErrorType } from '../../errors/utils.js'
1
2
  import type { Block, BlockTag } from '../../types/block.js'
2
3
  import type { Chain } from '../../types/chain.js'
3
4
  import type {
@@ -8,7 +9,7 @@ import type { Hash } from '../../types/misc.js'
8
9
  import type { RpcBlock } from '../../types/rpc.js'
9
10
  import type { Prettify } from '../../types/utils.js'
10
11
 
11
- import { defineFormatter } from './formatter.js'
12
+ import { type DefineFormatterErrorType, defineFormatter } from './formatter.js'
12
13
  import { type FormattedTransaction, formatTransaction } from './transaction.js'
13
14
 
14
15
  type BlockPendingDependencies = 'hash' | 'logsBloom' | 'nonce' | 'number'
@@ -39,6 +40,8 @@ export type FormattedBlock<
39
40
  transactions: _Transactions
40
41
  }
41
42
 
43
+ export type FormatBlockErrorType = ErrorType
44
+
42
45
  export function formatBlock(block: Partial<RpcBlock>) {
43
46
  const transactions = block.transactions?.map((transaction) => {
44
47
  if (typeof transaction === 'string') return transaction
@@ -63,4 +66,6 @@ export function formatBlock(block: Partial<RpcBlock>) {
63
66
  } as Block
64
67
  }
65
68
 
69
+ export type DefineBlockErrorType = DefineFormatterErrorType | ErrorType
70
+
66
71
  export const defineBlock = /*#__PURE__*/ defineFormatter('block', formatBlock)
@@ -1,5 +1,8 @@
1
+ import type { ErrorType } from '../../errors/utils.js'
1
2
  import type { ChainFormatter } from '../../types/chain.js'
2
3
 
4
+ export type ExtractErrorType = ErrorType
5
+
3
6
  /**
4
7
  * @description Picks out the keys from `value` that exist in the formatter.
5
8
  */
@@ -1,6 +1,9 @@
1
+ import type { ErrorType } from '../../errors/utils.js'
1
2
  import type { FeeHistory } from '../../types/fee.js'
2
3
  import type { RpcFeeHistory } from '../../types/rpc.js'
3
4
 
5
+ export type FormatFeeHistoryErrorType = ErrorType
6
+
4
7
  export function formatFeeHistory(feeHistory: RpcFeeHistory): FeeHistory {
5
8
  return {
6
9
  baseFeePerGas: feeHistory.baseFeePerGas.map((value) => BigInt(value)),
@@ -1,5 +1,8 @@
1
+ import type { ErrorType } from '../../errors/utils.js'
1
2
  import type { Assign, Prettify } from '../../types/utils.js'
2
3
 
4
+ export type DefineFormatterErrorType = ErrorType
5
+
3
6
  export function defineFormatter<TType extends string, TParameters, TReturnType>(
4
7
  type: TType,
5
8
  format: (_: TParameters) => TReturnType,
@@ -1,6 +1,9 @@
1
+ import type { ErrorType } from '../../errors/utils.js'
1
2
  import type { Log } from '../../types/log.js'
2
3
  import type { RpcLog } from '../../types/rpc.js'
3
4
 
5
+ export type FormatLogErrorType = ErrorType
6
+
4
7
  export function formatLog(
5
8
  log: Partial<RpcLog>,
6
9
  { args, eventName }: { args?: unknown; eventName?: string } = {},
@@ -1,3 +1,4 @@
1
+ import type { ErrorType } from '../../errors/utils.js'
1
2
  import type { BlockTag } from '../../types/block.js'
2
3
  import type { Chain } from '../../types/chain.js'
3
4
  import type {
@@ -8,7 +9,7 @@ import type { RpcTransaction } from '../../types/rpc.js'
8
9
  import type { Transaction } from '../../types/transaction.js'
9
10
  import type { UnionLooseOmit } from '../../types/utils.js'
10
11
  import { hexToNumber } from '../encoding/fromHex.js'
11
- import { defineFormatter } from './formatter.js'
12
+ import { type DefineFormatterErrorType, defineFormatter } from './formatter.js'
12
13
 
13
14
  type TransactionPendingDependencies =
14
15
  | 'blockHash'
@@ -40,6 +41,8 @@ export const transactionType = {
40
41
  '0x2': 'eip1559',
41
42
  } as const
42
43
 
44
+ export type FormatTransactionErrorType = ErrorType
45
+
43
46
  export function formatTransaction(transaction: Partial<RpcTransaction>) {
44
47
  const transaction_ = {
45
48
  ...transaction,
@@ -79,6 +82,8 @@ export function formatTransaction(transaction: Partial<RpcTransaction>) {
79
82
  return transaction_ as Transaction
80
83
  }
81
84
 
85
+ export type DefineTransactionErrorType = DefineFormatterErrorType | ErrorType
86
+
82
87
  export const defineTransaction = /*#__PURE__*/ defineFormatter(
83
88
  'transaction',
84
89
  formatTransaction,
@@ -1,3 +1,4 @@
1
+ import type { ErrorType } from '../../errors/utils.js'
1
2
  import type {
2
3
  Chain,
3
4
  ExtractChainFormatterReturnType,
@@ -6,7 +7,7 @@ import type { RpcTransactionReceipt } from '../../types/rpc.js'
6
7
  import type { TransactionReceipt } from '../../types/transaction.js'
7
8
  import { hexToNumber } from '../encoding/fromHex.js'
8
9
 
9
- import { defineFormatter } from './formatter.js'
10
+ import { type DefineFormatterErrorType, defineFormatter } from './formatter.js'
10
11
  import { formatLog } from './log.js'
11
12
  import { transactionType } from './transaction.js'
12
13
 
@@ -23,6 +24,8 @@ const statuses = {
23
24
  '0x1': 'success',
24
25
  } as const
25
26
 
27
+ export type FormatTransactionReceiptErrorType = ErrorType
28
+
26
29
  export function formatTransactionReceipt(
27
30
  transactionReceipt: Partial<RpcTransactionReceipt>,
28
31
  ) {
@@ -61,6 +64,10 @@ export function formatTransactionReceipt(
61
64
  } as TransactionReceipt
62
65
  }
63
66
 
67
+ export type DefineTransactionReceiptErrorType =
68
+ | DefineFormatterErrorType
69
+ | ErrorType
70
+
64
71
  export const defineTransactionReceipt = /*#__PURE__*/ defineFormatter(
65
72
  'transactionReceipt',
66
73
  formatTransactionReceipt,
@@ -1,3 +1,4 @@
1
+ import type { ErrorType } from '../../errors/utils.js'
1
2
  import type {
2
3
  Chain,
3
4
  ExtractChainFormatterParameters,
@@ -5,7 +6,7 @@ import type {
5
6
  import type { RpcTransactionRequest } from '../../types/rpc.js'
6
7
  import type { TransactionRequest } from '../../types/transaction.js'
7
8
  import { numberToHex } from '../encoding/toHex.js'
8
- import { defineFormatter } from './formatter.js'
9
+ import { type DefineFormatterErrorType, defineFormatter } from './formatter.js'
9
10
 
10
11
  export type FormattedTransactionRequest<
11
12
  TChain extends Chain | undefined = Chain | undefined,
@@ -21,6 +22,8 @@ export const rpcTransactionType = {
21
22
  eip1559: '0x2',
22
23
  } as const
23
24
 
25
+ export type FormatTransactionRequestErrorType = ErrorType
26
+
24
27
  export function formatTransactionRequest(
25
28
  transactionRequest: Partial<TransactionRequest>,
26
29
  ) {
@@ -57,6 +60,10 @@ export function formatTransactionRequest(
57
60
  } as RpcTransactionRequest
58
61
  }
59
62
 
63
+ export type DefineTransactionRequestErrorType =
64
+ | DefineFormatterErrorType
65
+ | ErrorType
66
+
60
67
  export const defineTransactionRequest = /*#__PURE__*/ defineFormatter(
61
68
  'transactionRequest',
62
69
  formatTransactionRequest,
@@ -1,10 +1,16 @@
1
1
  import type { AbiEvent } from 'abitype'
2
2
 
3
- import { toBytes } from '../encoding/toBytes.js'
3
+ import type { ErrorType } from '../../errors/utils.js'
4
+ import { type ToBytesErrorType, toBytes } from '../encoding/toBytes.js'
4
5
  import { getEventSignature } from './getEventSignature.js'
5
- import { keccak256 } from './keccak256.js'
6
+ import { type Keccak256ErrorType, keccak256 } from './keccak256.js'
6
7
 
7
8
  const hash = (value: string) => keccak256(toBytes(value))
8
9
 
10
+ export type GetEventSelectorErrorType =
11
+ | Keccak256ErrorType
12
+ | ToBytesErrorType
13
+ | ErrorType
14
+
9
15
  export const getEventSelector = (fn: string | AbiEvent) =>
10
16
  hash(getEventSignature(fn))
@@ -1,6 +1,14 @@
1
1
  import type { AbiEvent, AbiFunction } from 'abitype'
2
2
 
3
- import { getFunctionSignature } from './getFunctionSignature.js'
3
+ import type { ErrorType } from '../../errors/utils.js'
4
+ import {
5
+ type GetFunctionSignatureErrorType,
6
+ getFunctionSignature,
7
+ } from './getFunctionSignature.js'
8
+
9
+ export type GetEventSignatureErrorType =
10
+ | GetFunctionSignatureErrorType
11
+ | ErrorType
4
12
 
5
13
  export const getEventSignature = (fn: string | AbiEvent) => {
6
14
  return getFunctionSignature(fn as {} as AbiFunction)
@@ -1,11 +1,22 @@
1
1
  import type { AbiFunction } from 'abitype'
2
- import { slice } from '../data/slice.js'
3
2
 
4
- import { toBytes } from '../encoding/toBytes.js'
5
- import { getFunctionSignature } from './getFunctionSignature.js'
6
- import { keccak256 } from './keccak256.js'
3
+ import type { ErrorType } from '../../errors/utils.js'
4
+ import { type SliceErrorType, slice } from '../data/slice.js'
5
+ import { type ToBytesErrorType, toBytes } from '../encoding/toBytes.js'
6
+ import {
7
+ type GetFunctionSignatureErrorType,
8
+ getFunctionSignature,
9
+ } from './getFunctionSignature.js'
10
+ import { type Keccak256ErrorType, keccak256 } from './keccak256.js'
7
11
 
8
12
  const hash = (value: string) => keccak256(toBytes(value))
9
13
 
14
+ export type GetFunctionSelectorErrorType =
15
+ | GetFunctionSignatureErrorType
16
+ | Keccak256ErrorType
17
+ | SliceErrorType
18
+ | ToBytesErrorType
19
+ | ErrorType
20
+
10
21
  export const getFunctionSelector = (fn: string | AbiFunction) =>
11
22
  slice(hash(getFunctionSignature(fn)), 0, 4)
@@ -1,11 +1,23 @@
1
1
  import type { AbiFunction } from 'abitype'
2
2
 
3
- import { formatAbiItem } from '../abi/formatAbiItem.js'
3
+ import type { ErrorType } from '../../errors/utils.js'
4
4
  import {
5
+ type FormatAbiItemErrorType,
6
+ formatAbiItem,
7
+ } from '../abi/formatAbiItem.js'
8
+ import {
9
+ type ExtractFunctionNameErrorType,
10
+ type ExtractFunctionParamsErrorType,
5
11
  extractFunctionName,
6
12
  extractFunctionParams,
7
13
  } from '../contract/extractFunctionParts.js'
8
14
 
15
+ export type GetFunctionSignatureErrorType =
16
+ | ExtractFunctionNameErrorType
17
+ | ExtractFunctionParamsErrorType
18
+ | FormatAbiItemErrorType
19
+ | ErrorType
20
+
9
21
  export const getFunctionSignature = (fn: string | AbiFunction) => {
10
22
  if (typeof fn === 'string') {
11
23
  const name = extractFunctionName(fn)
@@ -1,16 +1,35 @@
1
1
  import type { AbiEvent, AbiFunction } from 'abitype'
2
- import { formatAbiItem } from '../abi/formatAbiItem.js'
3
- import { toBytes } from '../encoding/toBytes.js'
2
+ import {
3
+ type FormatAbiItemErrorType,
4
+ formatAbiItem,
5
+ } from '../abi/formatAbiItem.js'
6
+ import { type ToBytesErrorType, toBytes } from '../encoding/toBytes.js'
4
7
 
5
- import { getFunctionSignature } from './getFunctionSignature.js'
6
- import { keccak256 } from './keccak256.js'
8
+ import type { ErrorType } from '../../errors/utils.js'
9
+ import {
10
+ type GetFunctionSignatureErrorType,
11
+ getFunctionSignature,
12
+ } from './getFunctionSignature.js'
13
+ import { type Keccak256ErrorType, keccak256 } from './keccak256.js'
7
14
 
8
15
  const hash = (value: string) => keccak256(toBytes(value))
9
16
 
17
+ export type HashFunctionErrorType =
18
+ | Keccak256ErrorType
19
+ | ToBytesErrorType
20
+ | GetFunctionSignatureErrorType
21
+ | ErrorType
22
+
10
23
  export function hashFunction(def: string) {
11
24
  return hash(getFunctionSignature(def))
12
25
  }
13
26
 
27
+ export type HashAbiItemErrorType =
28
+ | Keccak256ErrorType
29
+ | ToBytesErrorType
30
+ | FormatAbiItemErrorType
31
+ | ErrorType
32
+
14
33
  export function hashAbiItem(abiItem: AbiFunction | AbiEvent) {
15
34
  return hash(formatAbiItem(abiItem))
16
35
  }