viem 1.6.6 → 1.7.0

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 (651) hide show
  1. package/dist/cjs/actions/public/estimateFeesPerGas.js +59 -0
  2. package/dist/cjs/actions/public/estimateFeesPerGas.js.map +1 -0
  3. package/dist/cjs/actions/public/estimateMaxPriorityFeePerGas.js +44 -0
  4. package/dist/cjs/actions/public/estimateMaxPriorityFeePerGas.js.map +1 -0
  5. package/dist/cjs/actions/public/verifyHash.js.map +1 -1
  6. package/dist/cjs/actions/public/verifyMessage.js.map +1 -1
  7. package/dist/cjs/actions/public/verifyTypedData.js.map +1 -1
  8. package/dist/cjs/actions/wallet/deployContract.js.map +1 -1
  9. package/dist/cjs/actions/wallet/sendTransaction.js.map +1 -1
  10. package/dist/cjs/actions/wallet/writeContract.js.map +1 -1
  11. package/dist/cjs/clients/createTestClient.js.map +1 -1
  12. package/dist/cjs/clients/decorators/public.js +4 -0
  13. package/dist/cjs/clients/decorators/public.js.map +1 -1
  14. package/dist/cjs/errors/fee.js +42 -0
  15. package/dist/cjs/errors/fee.js.map +1 -0
  16. package/dist/cjs/errors/version.js +1 -1
  17. package/dist/cjs/index.js +8 -4
  18. package/dist/cjs/index.js.map +1 -1
  19. package/dist/cjs/public.js +5 -1
  20. package/dist/cjs/public.js.map +1 -1
  21. package/dist/cjs/utils/transaction/prepareRequest.js +26 -29
  22. package/dist/cjs/utils/transaction/prepareRequest.js.map +1 -1
  23. package/dist/esm/actions/public/estimateFeesPerGas.js +77 -0
  24. package/dist/esm/actions/public/estimateFeesPerGas.js.map +1 -0
  25. package/dist/esm/actions/public/estimateMaxPriorityFeePerGas.js +64 -0
  26. package/dist/esm/actions/public/estimateMaxPriorityFeePerGas.js.map +1 -0
  27. package/dist/esm/actions/public/verifyHash.js.map +1 -1
  28. package/dist/esm/actions/public/verifyMessage.js.map +1 -1
  29. package/dist/esm/actions/public/verifyTypedData.js.map +1 -1
  30. package/dist/esm/actions/wallet/deployContract.js.map +1 -1
  31. package/dist/esm/actions/wallet/sendTransaction.js.map +1 -1
  32. package/dist/esm/actions/wallet/writeContract.js.map +1 -1
  33. package/dist/esm/clients/createTestClient.js.map +1 -1
  34. package/dist/esm/clients/decorators/public.js +4 -0
  35. package/dist/esm/clients/decorators/public.js.map +1 -1
  36. package/dist/esm/errors/fee.js +36 -0
  37. package/dist/esm/errors/fee.js.map +1 -0
  38. package/dist/esm/errors/version.js +1 -1
  39. package/dist/esm/index.js +1 -0
  40. package/dist/esm/index.js.map +1 -1
  41. package/dist/esm/public.js +2 -0
  42. package/dist/esm/public.js.map +1 -1
  43. package/dist/esm/utils/transaction/prepareRequest.js +27 -31
  44. package/dist/esm/utils/transaction/prepareRequest.js.map +1 -1
  45. package/dist/types/abi.d.ts +6 -0
  46. package/dist/types/abi.d.ts.map +1 -0
  47. package/dist/types/accounts/generateMnemonic.d.ts +9 -0
  48. package/dist/types/accounts/generateMnemonic.d.ts.map +1 -0
  49. package/dist/types/accounts/generatePrivateKey.d.ts +8 -0
  50. package/dist/types/accounts/generatePrivateKey.d.ts.map +1 -0
  51. package/dist/types/accounts/hdKeyToAccount.d.ts +9 -0
  52. package/dist/types/accounts/hdKeyToAccount.d.ts.map +1 -0
  53. package/dist/types/accounts/index.d.ts +27 -0
  54. package/dist/types/accounts/index.d.ts.map +1 -0
  55. package/dist/types/accounts/mnemonicToAccount.d.ts +8 -0
  56. package/dist/types/accounts/mnemonicToAccount.d.ts.map +1 -0
  57. package/dist/types/accounts/privateKeyToAccount.d.ts +9 -0
  58. package/dist/types/accounts/privateKeyToAccount.d.ts.map +1 -0
  59. package/dist/types/accounts/toAccount.d.ts +11 -0
  60. package/dist/types/accounts/toAccount.d.ts.map +1 -0
  61. package/dist/types/accounts/types.d.ts +52 -0
  62. package/dist/types/accounts/types.d.ts.map +1 -0
  63. package/dist/types/accounts/utils/parseAccount.d.ts +4 -0
  64. package/dist/types/accounts/utils/parseAccount.d.ts.map +1 -0
  65. package/dist/types/accounts/utils/privateKeyToAddress.d.ts +11 -0
  66. package/dist/types/accounts/utils/privateKeyToAddress.d.ts.map +1 -0
  67. package/dist/types/accounts/utils/publicKeyToAddress.d.ts +11 -0
  68. package/dist/types/accounts/utils/publicKeyToAddress.d.ts.map +1 -0
  69. package/dist/types/accounts/utils/sign.d.ts +16 -0
  70. package/dist/types/accounts/utils/sign.d.ts.map +1 -0
  71. package/dist/types/accounts/utils/signMessage.d.ts +16 -0
  72. package/dist/types/accounts/utils/signMessage.d.ts.map +1 -0
  73. package/dist/types/accounts/utils/signTransaction.d.ts +12 -0
  74. package/dist/types/accounts/utils/signTransaction.d.ts.map +1 -0
  75. package/dist/types/accounts/utils/signTypedData.d.ts +20 -0
  76. package/dist/types/accounts/utils/signTypedData.d.ts.map +1 -0
  77. package/dist/types/accounts/wordlists/czech.d.ts +2 -0
  78. package/dist/types/accounts/wordlists/czech.d.ts.map +1 -0
  79. package/dist/types/accounts/wordlists/english.d.ts +2 -0
  80. package/dist/types/accounts/wordlists/english.d.ts.map +1 -0
  81. package/dist/types/accounts/wordlists/french.d.ts +2 -0
  82. package/dist/types/accounts/wordlists/french.d.ts.map +1 -0
  83. package/dist/types/accounts/wordlists/italian.d.ts +2 -0
  84. package/dist/types/accounts/wordlists/italian.d.ts.map +1 -0
  85. package/dist/types/accounts/wordlists/japanese.d.ts +2 -0
  86. package/dist/types/accounts/wordlists/japanese.d.ts.map +1 -0
  87. package/dist/types/accounts/wordlists/korean.d.ts +2 -0
  88. package/dist/types/accounts/wordlists/korean.d.ts.map +1 -0
  89. package/dist/types/accounts/wordlists/simplifiedChinese.d.ts +2 -0
  90. package/dist/types/accounts/wordlists/simplifiedChinese.d.ts.map +1 -0
  91. package/dist/types/accounts/wordlists/spanish.d.ts +2 -0
  92. package/dist/types/accounts/wordlists/spanish.d.ts.map +1 -0
  93. package/dist/types/accounts/wordlists/traditionalChinese.d.ts +2 -0
  94. package/dist/types/accounts/wordlists/traditionalChinese.d.ts.map +1 -0
  95. package/dist/types/actions/ens/getEnsAddress.d.ts +45 -0
  96. package/dist/types/actions/ens/getEnsAddress.d.ts.map +1 -0
  97. package/dist/types/actions/ens/getEnsAvatar.d.ts +41 -0
  98. package/dist/types/actions/ens/getEnsAvatar.d.ts.map +1 -0
  99. package/dist/types/actions/ens/getEnsName.d.ts +41 -0
  100. package/dist/types/actions/ens/getEnsName.d.ts.map +1 -0
  101. package/dist/types/actions/ens/getEnsResolver.d.ts +43 -0
  102. package/dist/types/actions/ens/getEnsResolver.d.ts.map +1 -0
  103. package/dist/types/actions/ens/getEnsText.d.ts +46 -0
  104. package/dist/types/actions/ens/getEnsText.d.ts.map +1 -0
  105. package/dist/types/actions/getContract.d.ts +314 -0
  106. package/dist/types/actions/getContract.d.ts.map +1 -0
  107. package/dist/types/actions/index.d.ts +80 -0
  108. package/dist/types/actions/index.d.ts.map +1 -0
  109. package/dist/types/actions/public/call.d.ts +56 -0
  110. package/dist/types/actions/public/call.d.ts.map +1 -0
  111. package/dist/types/actions/public/createBlockFilter.d.ts +28 -0
  112. package/dist/types/actions/public/createBlockFilter.d.ts.map +1 -0
  113. package/dist/types/actions/public/createContractEventFilter.d.ts +50 -0
  114. package/dist/types/actions/public/createContractEventFilter.d.ts.map +1 -0
  115. package/dist/types/actions/public/createEventFilter.d.ts +76 -0
  116. package/dist/types/actions/public/createEventFilter.d.ts.map +1 -0
  117. package/dist/types/actions/public/createPendingTransactionFilter.d.ts +28 -0
  118. package/dist/types/actions/public/createPendingTransactionFilter.d.ts.map +1 -0
  119. package/dist/types/actions/public/estimateContractGas.d.ts +39 -0
  120. package/dist/types/actions/public/estimateContractGas.d.ts.map +1 -0
  121. package/dist/types/actions/public/estimateFeesPerGas.d.ts +48 -0
  122. package/dist/types/actions/public/estimateFeesPerGas.d.ts.map +1 -0
  123. package/dist/types/actions/public/estimateGas.d.ts +49 -0
  124. package/dist/types/actions/public/estimateGas.d.ts.map +1 -0
  125. package/dist/types/actions/public/estimateMaxPriorityFeePerGas.d.ts +35 -0
  126. package/dist/types/actions/public/estimateMaxPriorityFeePerGas.d.ts.map +1 -0
  127. package/dist/types/actions/public/getBalance.d.ts +55 -0
  128. package/dist/types/actions/public/getBalance.d.ts.map +1 -0
  129. package/dist/types/actions/public/getBlock.d.ts +56 -0
  130. package/dist/types/actions/public/getBlock.d.ts.map +1 -0
  131. package/dist/types/actions/public/getBlockNumber.d.ts +57 -0
  132. package/dist/types/actions/public/getBlockNumber.d.ts.map +1 -0
  133. package/dist/types/actions/public/getBlockTransactionCount.d.ts +47 -0
  134. package/dist/types/actions/public/getBlockTransactionCount.d.ts.map +1 -0
  135. package/dist/types/actions/public/getBytecode.d.ts +41 -0
  136. package/dist/types/actions/public/getBytecode.d.ts.map +1 -0
  137. package/dist/types/actions/public/getChainId.d.ts +28 -0
  138. package/dist/types/actions/public/getChainId.d.ts.map +1 -0
  139. package/dist/types/actions/public/getFeeHistory.d.ts +53 -0
  140. package/dist/types/actions/public/getFeeHistory.d.ts.map +1 -0
  141. package/dist/types/actions/public/getFilterChanges.d.ts +96 -0
  142. package/dist/types/actions/public/getFilterChanges.d.ts.map +1 -0
  143. package/dist/types/actions/public/getFilterLogs.d.ts +40 -0
  144. package/dist/types/actions/public/getFilterLogs.d.ts.map +1 -0
  145. package/dist/types/actions/public/getGasPrice.d.ts +27 -0
  146. package/dist/types/actions/public/getGasPrice.d.ts.map +1 -0
  147. package/dist/types/actions/public/getLogs.d.ts +71 -0
  148. package/dist/types/actions/public/getLogs.d.ts.map +1 -0
  149. package/dist/types/actions/public/getStorageAt.d.ts +43 -0
  150. package/dist/types/actions/public/getStorageAt.d.ts.map +1 -0
  151. package/dist/types/actions/public/getTransaction.d.ts +65 -0
  152. package/dist/types/actions/public/getTransaction.d.ts.map +1 -0
  153. package/dist/types/actions/public/getTransactionConfirmations.d.ts +41 -0
  154. package/dist/types/actions/public/getTransactionConfirmations.d.ts.map +1 -0
  155. package/dist/types/actions/public/getTransactionCount.d.ts +44 -0
  156. package/dist/types/actions/public/getTransactionCount.d.ts.map +1 -0
  157. package/dist/types/actions/public/getTransactionReceipt.d.ts +36 -0
  158. package/dist/types/actions/public/getTransactionReceipt.d.ts.map +1 -0
  159. package/dist/types/actions/public/multicall.d.ts +56 -0
  160. package/dist/types/actions/public/multicall.d.ts.map +1 -0
  161. package/dist/types/actions/public/readContract.d.ts +41 -0
  162. package/dist/types/actions/public/readContract.d.ts.map +1 -0
  163. package/dist/types/actions/public/simulateContract.d.ts +54 -0
  164. package/dist/types/actions/public/simulateContract.d.ts.map +1 -0
  165. package/dist/types/actions/public/uninstallFilter.d.ts +34 -0
  166. package/dist/types/actions/public/uninstallFilter.d.ts.map +1 -0
  167. package/dist/types/actions/public/verifyHash.d.ts +24 -0
  168. package/dist/types/actions/public/verifyHash.d.ts.map +1 -0
  169. package/dist/types/actions/public/verifyMessage.d.ts +28 -0
  170. package/dist/types/actions/public/verifyMessage.d.ts.map +1 -0
  171. package/dist/types/actions/public/verifyTypedData.d.ts +27 -0
  172. package/dist/types/actions/public/verifyTypedData.d.ts.map +1 -0
  173. package/dist/types/actions/public/waitForTransactionReceipt.d.ts +72 -0
  174. package/dist/types/actions/public/waitForTransactionReceipt.d.ts.map +1 -0
  175. package/dist/types/actions/public/watchBlockNumber.d.ts +59 -0
  176. package/dist/types/actions/public/watchBlockNumber.d.ts.map +1 -0
  177. package/dist/types/actions/public/watchBlocks.d.ts +67 -0
  178. package/dist/types/actions/public/watchBlocks.d.ts.map +1 -0
  179. package/dist/types/actions/public/watchContractEvent.d.ts +89 -0
  180. package/dist/types/actions/public/watchContractEvent.d.ts.map +1 -0
  181. package/dist/types/actions/public/watchEvent.d.ts +104 -0
  182. package/dist/types/actions/public/watchEvent.d.ts.map +1 -0
  183. package/dist/types/actions/public/watchPendingTransactions.d.ts +74 -0
  184. package/dist/types/actions/public/watchPendingTransactions.d.ts.map +1 -0
  185. package/dist/types/actions/test/dropTransaction.d.ts +33 -0
  186. package/dist/types/actions/test/dropTransaction.d.ts.map +1 -0
  187. package/dist/types/actions/test/getAutomine.d.ts +27 -0
  188. package/dist/types/actions/test/getAutomine.d.ts.map +1 -0
  189. package/dist/types/actions/test/getTxpoolContent.d.ts +34 -0
  190. package/dist/types/actions/test/getTxpoolContent.d.ts.map +1 -0
  191. package/dist/types/actions/test/getTxpoolStatus.d.ts +30 -0
  192. package/dist/types/actions/test/getTxpoolStatus.d.ts.map +1 -0
  193. package/dist/types/actions/test/impersonateAccount.d.ts +33 -0
  194. package/dist/types/actions/test/impersonateAccount.d.ts.map +1 -0
  195. package/dist/types/actions/test/increaseTime.d.ts +32 -0
  196. package/dist/types/actions/test/increaseTime.d.ts.map +1 -0
  197. package/dist/types/actions/test/inspectTxpool.d.ts +31 -0
  198. package/dist/types/actions/test/inspectTxpool.d.ts.map +1 -0
  199. package/dist/types/actions/test/mine.d.ts +32 -0
  200. package/dist/types/actions/test/mine.d.ts.map +1 -0
  201. package/dist/types/actions/test/removeBlockTimestampInterval.d.ts +25 -0
  202. package/dist/types/actions/test/removeBlockTimestampInterval.d.ts.map +1 -0
  203. package/dist/types/actions/test/reset.d.ts +32 -0
  204. package/dist/types/actions/test/reset.d.ts.map +1 -0
  205. package/dist/types/actions/test/revert.d.ts +31 -0
  206. package/dist/types/actions/test/revert.d.ts.map +1 -0
  207. package/dist/types/actions/test/sendUnsignedTransaction.d.ts +35 -0
  208. package/dist/types/actions/test/sendUnsignedTransaction.d.ts.map +1 -0
  209. package/dist/types/actions/test/setAutomine.d.ts +25 -0
  210. package/dist/types/actions/test/setAutomine.d.ts.map +1 -0
  211. package/dist/types/actions/test/setBalance.d.ts +36 -0
  212. package/dist/types/actions/test/setBalance.d.ts.map +1 -0
  213. package/dist/types/actions/test/setBlockGasLimit.d.ts +30 -0
  214. package/dist/types/actions/test/setBlockGasLimit.d.ts.map +1 -0
  215. package/dist/types/actions/test/setBlockTimestampInterval.d.ts +30 -0
  216. package/dist/types/actions/test/setBlockTimestampInterval.d.ts.map +1 -0
  217. package/dist/types/actions/test/setCode.d.ts +37 -0
  218. package/dist/types/actions/test/setCode.d.ts.map +1 -0
  219. package/dist/types/actions/test/setCoinbase.d.ts +33 -0
  220. package/dist/types/actions/test/setCoinbase.d.ts.map +1 -0
  221. package/dist/types/actions/test/setIntervalMining.d.ts +30 -0
  222. package/dist/types/actions/test/setIntervalMining.d.ts.map +1 -0
  223. package/dist/types/actions/test/setLoggingEnabled.d.ts +25 -0
  224. package/dist/types/actions/test/setLoggingEnabled.d.ts.map +1 -0
  225. package/dist/types/actions/test/setMinGasPrice.d.ts +34 -0
  226. package/dist/types/actions/test/setMinGasPrice.d.ts.map +1 -0
  227. package/dist/types/actions/test/setNextBlockBaseFeePerGas.d.ts +32 -0
  228. package/dist/types/actions/test/setNextBlockBaseFeePerGas.d.ts.map +1 -0
  229. package/dist/types/actions/test/setNextBlockTimestamp.d.ts +30 -0
  230. package/dist/types/actions/test/setNextBlockTimestamp.d.ts.map +1 -0
  231. package/dist/types/actions/test/setNonce.d.ts +36 -0
  232. package/dist/types/actions/test/setNonce.d.ts.map +1 -0
  233. package/dist/types/actions/test/setRpcUrl.d.ts +26 -0
  234. package/dist/types/actions/test/setRpcUrl.d.ts.map +1 -0
  235. package/dist/types/actions/test/setStorageAt.d.ts +40 -0
  236. package/dist/types/actions/test/setStorageAt.d.ts.map +1 -0
  237. package/dist/types/actions/test/snapshot.d.ts +25 -0
  238. package/dist/types/actions/test/snapshot.d.ts.map +1 -0
  239. package/dist/types/actions/test/stopImpersonatingAccount.d.ts +33 -0
  240. package/dist/types/actions/test/stopImpersonatingAccount.d.ts.map +1 -0
  241. package/dist/types/actions/wallet/addChain.d.ts +29 -0
  242. package/dist/types/actions/wallet/addChain.d.ts.map +1 -0
  243. package/dist/types/actions/wallet/deployContract.d.ts +44 -0
  244. package/dist/types/actions/wallet/deployContract.d.ts.map +1 -0
  245. package/dist/types/actions/wallet/getAddresses.d.ts +28 -0
  246. package/dist/types/actions/wallet/getAddresses.d.ts.map +1 -0
  247. package/dist/types/actions/wallet/getPermissions.d.ts +28 -0
  248. package/dist/types/actions/wallet/getPermissions.d.ts.map +1 -0
  249. package/dist/types/actions/wallet/requestAddresses.d.ts +32 -0
  250. package/dist/types/actions/wallet/requestAddresses.d.ts.map +1 -0
  251. package/dist/types/actions/wallet/requestPermissions.d.ts +37 -0
  252. package/dist/types/actions/wallet/requestPermissions.d.ts.map +1 -0
  253. package/dist/types/actions/wallet/sendTransaction.d.ts +58 -0
  254. package/dist/types/actions/wallet/sendTransaction.d.ts.map +1 -0
  255. package/dist/types/actions/wallet/signMessage.d.ts +58 -0
  256. package/dist/types/actions/wallet/signMessage.d.ts.map +1 -0
  257. package/dist/types/actions/wallet/signTypedData.d.ts +114 -0
  258. package/dist/types/actions/wallet/signTypedData.d.ts.map +1 -0
  259. package/dist/types/actions/wallet/switchChain.d.ts +30 -0
  260. package/dist/types/actions/wallet/switchChain.d.ts.map +1 -0
  261. package/dist/types/actions/wallet/watchAsset.d.ts +37 -0
  262. package/dist/types/actions/wallet/watchAsset.d.ts.map +1 -0
  263. package/dist/types/actions/wallet/writeContract.d.ts +69 -0
  264. package/dist/types/actions/wallet/writeContract.d.ts.map +1 -0
  265. package/dist/types/chains/celo/formatters.d.ts +195 -0
  266. package/dist/types/chains/celo/formatters.d.ts.map +1 -0
  267. package/dist/types/chains/celo/parsers.d.ts +6 -0
  268. package/dist/types/chains/celo/parsers.d.ts.map +1 -0
  269. package/dist/types/chains/celo/serializers.d.ts +9 -0
  270. package/dist/types/chains/celo/serializers.d.ts.map +1 -0
  271. package/dist/types/chains/celo/types.d.ts +74 -0
  272. package/dist/types/chains/celo/types.d.ts.map +1 -0
  273. package/dist/types/chains/index.d.ts +5329 -0
  274. package/dist/types/chains/index.d.ts.map +1 -0
  275. package/dist/types/chains/optimism/fees.d.ts +4 -0
  276. package/dist/types/chains/optimism/fees.d.ts.map +1 -0
  277. package/dist/types/chains/optimism/formatters.d.ts +299 -0
  278. package/dist/types/chains/optimism/formatters.d.ts.map +1 -0
  279. package/dist/types/chains/optimism/types.d.ts +53 -0
  280. package/dist/types/chains/optimism/types.d.ts.map +1 -0
  281. package/dist/types/chains/utils.d.ts +7 -0
  282. package/dist/types/chains/utils.d.ts.map +1 -0
  283. package/dist/types/clients/createClient.d.ts +79 -0
  284. package/dist/types/clients/createClient.d.ts.map +1 -0
  285. package/dist/types/clients/createPublicClient.d.ts +29 -0
  286. package/dist/types/clients/createPublicClient.d.ts.map +1 -0
  287. package/dist/types/clients/createTestClient.d.ts +43 -0
  288. package/dist/types/clients/createTestClient.d.ts.map +1 -0
  289. package/dist/types/clients/createWalletClient.d.ts +49 -0
  290. package/dist/types/clients/createWalletClient.d.ts.map +1 -0
  291. package/dist/types/clients/decorators/public.d.ts +1133 -0
  292. package/dist/types/clients/decorators/public.d.ts.map +1 -0
  293. package/dist/types/clients/decorators/test.d.ts +599 -0
  294. package/dist/types/clients/decorators/test.d.ts.map +1 -0
  295. package/dist/types/clients/decorators/wallet.d.ts +449 -0
  296. package/dist/types/clients/decorators/wallet.d.ts.map +1 -0
  297. package/dist/types/clients/transports/createTransport.d.ts +34 -0
  298. package/dist/types/clients/transports/createTransport.d.ts.map +1 -0
  299. package/dist/types/clients/transports/custom.d.ts +21 -0
  300. package/dist/types/clients/transports/custom.d.ts.map +1 -0
  301. package/dist/types/clients/transports/fallback.d.ts +75 -0
  302. package/dist/types/clients/transports/fallback.d.ts.map +1 -0
  303. package/dist/types/clients/transports/http.d.ts +40 -0
  304. package/dist/types/clients/transports/http.d.ts.map +1 -0
  305. package/dist/types/clients/transports/webSocket.d.ts +46 -0
  306. package/dist/types/clients/transports/webSocket.d.ts.map +1 -0
  307. package/dist/types/constants/abis.d.ts +165 -0
  308. package/dist/types/constants/abis.d.ts.map +1 -0
  309. package/dist/types/constants/address.d.ts +2 -0
  310. package/dist/types/constants/address.d.ts.map +1 -0
  311. package/dist/types/constants/contract.d.ts +2 -0
  312. package/dist/types/constants/contract.d.ts.map +1 -0
  313. package/dist/types/constants/contracts.d.ts +2 -0
  314. package/dist/types/constants/contracts.d.ts.map +1 -0
  315. package/dist/types/constants/number.d.ts +97 -0
  316. package/dist/types/constants/number.d.ts.map +1 -0
  317. package/dist/types/constants/solidity.d.ts +15 -0
  318. package/dist/types/constants/solidity.d.ts.map +1 -0
  319. package/dist/types/constants/unit.d.ts +13 -0
  320. package/dist/types/constants/unit.d.ts.map +1 -0
  321. package/dist/types/contract.d.ts +30 -0
  322. package/dist/types/contract.d.ts.map +1 -0
  323. package/dist/types/ens.d.ts +9 -0
  324. package/dist/types/ens.d.ts.map +1 -0
  325. package/dist/types/errors/abi.d.ts +169 -0
  326. package/dist/types/errors/abi.d.ts.map +1 -0
  327. package/dist/types/errors/account.d.ts +8 -0
  328. package/dist/types/errors/account.d.ts.map +1 -0
  329. package/dist/types/errors/address.d.ts +8 -0
  330. package/dist/types/errors/address.d.ts.map +1 -0
  331. package/dist/types/errors/base.d.ts +24 -0
  332. package/dist/types/errors/base.d.ts.map +1 -0
  333. package/dist/types/errors/block.d.ts +10 -0
  334. package/dist/types/errors/block.d.ts.map +1 -0
  335. package/dist/types/errors/ccip.d.ts +29 -0
  336. package/dist/types/errors/ccip.d.ts.map +1 -0
  337. package/dist/types/errors/chain.d.ts +35 -0
  338. package/dist/types/errors/chain.d.ts.map +1 -0
  339. package/dist/types/errors/contract.d.ts +64 -0
  340. package/dist/types/errors/contract.d.ts.map +1 -0
  341. package/dist/types/errors/data.d.ts +18 -0
  342. package/dist/types/errors/data.d.ts.map +1 -0
  343. package/dist/types/errors/encoding.d.ts +53 -0
  344. package/dist/types/errors/encoding.d.ts.map +1 -0
  345. package/dist/types/errors/ens.d.ts +26 -0
  346. package/dist/types/errors/ens.d.ts.map +1 -0
  347. package/dist/types/errors/estimateGas.d.ts +14 -0
  348. package/dist/types/errors/estimateGas.d.ts.map +1 -0
  349. package/dist/types/errors/fee.d.ts +16 -0
  350. package/dist/types/errors/fee.d.ts.map +1 -0
  351. package/dist/types/errors/log.d.ts +6 -0
  352. package/dist/types/errors/log.d.ts.map +1 -0
  353. package/dist/types/errors/node.d.ts +105 -0
  354. package/dist/types/errors/node.d.ts.map +1 -0
  355. package/dist/types/errors/request.d.ts +61 -0
  356. package/dist/types/errors/request.d.ts.map +1 -0
  357. package/dist/types/errors/rpc.d.ts +221 -0
  358. package/dist/types/errors/rpc.d.ts.map +1 -0
  359. package/dist/types/errors/transaction.d.ts +79 -0
  360. package/dist/types/errors/transaction.d.ts.map +1 -0
  361. package/dist/types/errors/transport.d.ts +5 -0
  362. package/dist/types/errors/transport.d.ts.map +1 -0
  363. package/dist/types/errors/utils.d.ts +5 -0
  364. package/dist/types/errors/utils.d.ts.map +1 -0
  365. package/dist/types/errors/version.d.ts +2 -0
  366. package/dist/types/errors/version.d.ts.map +1 -0
  367. package/dist/types/index.d.ts +215 -0
  368. package/dist/types/index.d.ts.map +1 -0
  369. package/dist/types/public.d.ts +33 -0
  370. package/dist/types/public.d.ts.map +1 -0
  371. package/dist/types/test.d.ts +29 -0
  372. package/dist/types/test.d.ts.map +1 -0
  373. package/dist/types/types/account.d.ts +12 -0
  374. package/dist/types/types/account.d.ts.map +1 -0
  375. package/dist/types/types/block.d.ts +62 -0
  376. package/dist/types/types/block.d.ts.map +1 -0
  377. package/dist/types/types/chain.d.ts +115 -0
  378. package/dist/types/types/chain.d.ts.map +1 -0
  379. package/dist/types/types/contract.d.ts +138 -0
  380. package/dist/types/types/contract.d.ts.map +1 -0
  381. package/dist/types/types/eip1193.d.ts +1228 -0
  382. package/dist/types/types/eip1193.d.ts.map +1 -0
  383. package/dist/types/types/ens.d.ts +5 -0
  384. package/dist/types/types/ens.d.ts.map +1 -0
  385. package/dist/types/types/fee.d.ts +30 -0
  386. package/dist/types/types/fee.d.ts.map +1 -0
  387. package/dist/types/types/filter.d.ts +40 -0
  388. package/dist/types/types/filter.d.ts.map +1 -0
  389. package/dist/types/types/log.d.ts +55 -0
  390. package/dist/types/types/log.d.ts.map +1 -0
  391. package/dist/types/types/misc.d.ts +14 -0
  392. package/dist/types/types/misc.d.ts.map +1 -0
  393. package/dist/types/types/multicall.d.ts +48 -0
  394. package/dist/types/types/multicall.d.ts.map +1 -0
  395. package/dist/types/types/rpc.d.ts +20 -0
  396. package/dist/types/types/rpc.d.ts.map +1 -0
  397. package/dist/types/types/transaction.d.ts +147 -0
  398. package/dist/types/types/transaction.d.ts.map +1 -0
  399. package/dist/types/types/transport.d.ts +3 -0
  400. package/dist/types/types/transport.d.ts.map +1 -0
  401. package/dist/types/types/typedData.d.ts +47 -0
  402. package/dist/types/types/typedData.d.ts.map +1 -0
  403. package/dist/types/types/utils.d.ts +188 -0
  404. package/dist/types/types/utils.d.ts.map +1 -0
  405. package/dist/types/types/window.d.ts +7 -0
  406. package/dist/types/types/window.d.ts.map +1 -0
  407. package/dist/types/utils/abi/decodeAbiParameters.d.ts +5 -0
  408. package/dist/types/utils/abi/decodeAbiParameters.d.ts.map +1 -0
  409. package/dist/types/utils/abi/decodeDeployData.d.ts +13 -0
  410. package/dist/types/utils/abi/decodeDeployData.d.ts.map +1 -0
  411. package/dist/types/utils/abi/decodeErrorResult.d.ts +16 -0
  412. package/dist/types/utils/abi/decodeErrorResult.d.ts.map +1 -0
  413. package/dist/types/utils/abi/decodeEventLog.d.ts +20 -0
  414. package/dist/types/utils/abi/decodeEventLog.d.ts.map +1 -0
  415. package/dist/types/utils/abi/decodeFunctionData.d.ts +15 -0
  416. package/dist/types/utils/abi/decodeFunctionData.d.ts.map +1 -0
  417. package/dist/types/utils/abi/decodeFunctionResult.d.ts +14 -0
  418. package/dist/types/utils/abi/decodeFunctionResult.d.ts.map +1 -0
  419. package/dist/types/utils/abi/encodeAbiParameters.d.ts +9 -0
  420. package/dist/types/utils/abi/encodeAbiParameters.d.ts.map +1 -0
  421. package/dist/types/utils/abi/encodeDeployData.d.ts +9 -0
  422. package/dist/types/utils/abi/encodeDeployData.d.ts.map +1 -0
  423. package/dist/types/utils/abi/encodeErrorResult.d.ts +11 -0
  424. package/dist/types/utils/abi/encodeErrorResult.d.ts.map +1 -0
  425. package/dist/types/utils/abi/encodeEventTopics.d.ts +13 -0
  426. package/dist/types/utils/abi/encodeEventTopics.d.ts.map +1 -0
  427. package/dist/types/utils/abi/encodeFunctionData.d.ts +11 -0
  428. package/dist/types/utils/abi/encodeFunctionData.d.ts.map +1 -0
  429. package/dist/types/utils/abi/encodeFunctionResult.d.ts +13 -0
  430. package/dist/types/utils/abi/encodeFunctionResult.d.ts.map +1 -0
  431. package/dist/types/utils/abi/encodePacked.d.ts +11 -0
  432. package/dist/types/utils/abi/encodePacked.d.ts.map +1 -0
  433. package/dist/types/utils/abi/formatAbiItem.d.ts +9 -0
  434. package/dist/types/utils/abi/formatAbiItem.d.ts.map +1 -0
  435. package/dist/types/utils/abi/formatAbiItemWithArgs.d.ts +8 -0
  436. package/dist/types/utils/abi/formatAbiItemWithArgs.d.ts.map +1 -0
  437. package/dist/types/utils/abi/getAbiItem.d.ts +12 -0
  438. package/dist/types/utils/abi/getAbiItem.d.ts.map +1 -0
  439. package/dist/types/utils/accounts.d.ts +3 -0
  440. package/dist/types/utils/accounts.d.ts.map +1 -0
  441. package/dist/types/utils/address/getAddress.d.ts +4 -0
  442. package/dist/types/utils/address/getAddress.d.ts.map +1 -0
  443. package/dist/types/utils/address/getContractAddress.d.ts +20 -0
  444. package/dist/types/utils/address/getContractAddress.d.ts.map +1 -0
  445. package/dist/types/utils/address/isAddress.d.ts +3 -0
  446. package/dist/types/utils/address/isAddress.d.ts.map +1 -0
  447. package/dist/types/utils/address/isAddressEqual.d.ts +3 -0
  448. package/dist/types/utils/address/isAddressEqual.d.ts.map +1 -0
  449. package/dist/types/utils/buildRequest.d.ts +6 -0
  450. package/dist/types/utils/buildRequest.d.ts.map +1 -0
  451. package/dist/types/utils/ccip.d.ts +37 -0
  452. package/dist/types/utils/ccip.d.ts.map +1 -0
  453. package/dist/types/utils/chain.d.ts +14 -0
  454. package/dist/types/utils/chain.d.ts.map +1 -0
  455. package/dist/types/utils/contract/extractFunctionParts.d.ts +13 -0
  456. package/dist/types/utils/contract/extractFunctionParts.d.ts.map +1 -0
  457. package/dist/types/utils/data/concat.d.ts +6 -0
  458. package/dist/types/utils/data/concat.d.ts.map +1 -0
  459. package/dist/types/utils/data/isBytes.d.ts +3 -0
  460. package/dist/types/utils/data/isBytes.d.ts.map +1 -0
  461. package/dist/types/utils/data/isBytesEqual.d.ts +3 -0
  462. package/dist/types/utils/data/isBytesEqual.d.ts.map +1 -0
  463. package/dist/types/utils/data/isHex.d.ts +5 -0
  464. package/dist/types/utils/data/isHex.d.ts.map +1 -0
  465. package/dist/types/utils/data/pad.d.ts +11 -0
  466. package/dist/types/utils/data/pad.d.ts.map +1 -0
  467. package/dist/types/utils/data/size.d.ts +9 -0
  468. package/dist/types/utils/data/size.d.ts.map +1 -0
  469. package/dist/types/utils/data/slice.d.ts +33 -0
  470. package/dist/types/utils/data/slice.d.ts.map +1 -0
  471. package/dist/types/utils/data/trim.d.ts +8 -0
  472. package/dist/types/utils/data/trim.d.ts.map +1 -0
  473. package/dist/types/utils/encoding/fromBytes.d.ts +109 -0
  474. package/dist/types/utils/encoding/fromBytes.d.ts.map +1 -0
  475. package/dist/types/utils/encoding/fromHex.d.ts +138 -0
  476. package/dist/types/utils/encoding/fromHex.d.ts.map +1 -0
  477. package/dist/types/utils/encoding/fromRlp.d.ts +6 -0
  478. package/dist/types/utils/encoding/fromRlp.d.ts.map +1 -0
  479. package/dist/types/utils/encoding/toBytes.d.ts +125 -0
  480. package/dist/types/utils/encoding/toBytes.d.ts.map +1 -0
  481. package/dist/types/utils/encoding/toHex.d.ts +139 -0
  482. package/dist/types/utils/encoding/toHex.d.ts.map +1 -0
  483. package/dist/types/utils/encoding/toRlp.d.ts +8 -0
  484. package/dist/types/utils/encoding/toRlp.d.ts.map +1 -0
  485. package/dist/types/utils/ens/avatar/parseAvatarRecord.d.ts +9 -0
  486. package/dist/types/utils/ens/avatar/parseAvatarRecord.d.ts.map +1 -0
  487. package/dist/types/utils/ens/avatar/utils.d.ts +37 -0
  488. package/dist/types/utils/ens/avatar/utils.d.ts.map +1 -0
  489. package/dist/types/utils/ens/encodeLabelhash.d.ts +3 -0
  490. package/dist/types/utils/ens/encodeLabelhash.d.ts.map +1 -0
  491. package/dist/types/utils/ens/encodedLabelToLabelhash.d.ts +3 -0
  492. package/dist/types/utils/ens/encodedLabelToLabelhash.d.ts.map +1 -0
  493. package/dist/types/utils/ens/errors.d.ts +2 -0
  494. package/dist/types/utils/ens/errors.d.ts.map +1 -0
  495. package/dist/types/utils/ens/labelhash.d.ts +11 -0
  496. package/dist/types/utils/ens/labelhash.d.ts.map +1 -0
  497. package/dist/types/utils/ens/namehash.d.ts +13 -0
  498. package/dist/types/utils/ens/namehash.d.ts.map +1 -0
  499. package/dist/types/utils/ens/normalize.d.ts +12 -0
  500. package/dist/types/utils/ens/normalize.d.ts.map +1 -0
  501. package/dist/types/utils/ens/packetToBytes.d.ts +3 -0
  502. package/dist/types/utils/ens/packetToBytes.d.ts.map +1 -0
  503. package/dist/types/utils/errors/getCallError.d.ts +9 -0
  504. package/dist/types/utils/errors/getCallError.d.ts.map +1 -0
  505. package/dist/types/utils/errors/getContractError.d.ts +12 -0
  506. package/dist/types/utils/errors/getContractError.d.ts.map +1 -0
  507. package/dist/types/utils/errors/getEstimateGasError.d.ts +11 -0
  508. package/dist/types/utils/errors/getEstimateGasError.d.ts.map +1 -0
  509. package/dist/types/utils/errors/getNodeError.d.ts +7 -0
  510. package/dist/types/utils/errors/getNodeError.d.ts.map +1 -0
  511. package/dist/types/utils/errors/getTransactionError.d.ts +12 -0
  512. package/dist/types/utils/errors/getTransactionError.d.ts.map +1 -0
  513. package/dist/types/utils/filters/createFilterRequestScope.d.ts +22 -0
  514. package/dist/types/utils/filters/createFilterRequestScope.d.ts.map +1 -0
  515. package/dist/types/utils/formatters/block.d.ts +28 -0
  516. package/dist/types/utils/formatters/block.d.ts.map +1 -0
  517. package/dist/types/utils/formatters/extract.d.ts +8 -0
  518. package/dist/types/utils/formatters/extract.d.ts.map +1 -0
  519. package/dist/types/utils/formatters/feeHistory.d.ts +4 -0
  520. package/dist/types/utils/formatters/feeHistory.d.ts.map +1 -0
  521. package/dist/types/utils/formatters/formatter.d.ts +10 -0
  522. package/dist/types/utils/formatters/formatter.d.ts.map +1 -0
  523. package/dist/types/utils/formatters/log.d.ts +7 -0
  524. package/dist/types/utils/formatters/log.d.ts.map +1 -0
  525. package/dist/types/utils/formatters/transaction.d.ts +30 -0
  526. package/dist/types/utils/formatters/transaction.d.ts.map +1 -0
  527. package/dist/types/utils/formatters/transactionReceipt.d.ts +14 -0
  528. package/dist/types/utils/formatters/transactionReceipt.d.ts.map +1 -0
  529. package/dist/types/utils/formatters/transactionRequest.d.ts +14 -0
  530. package/dist/types/utils/formatters/transactionRequest.d.ts.map +1 -0
  531. package/dist/types/utils/hash/getEventSelector.d.ts +4 -0
  532. package/dist/types/utils/hash/getEventSelector.d.ts.map +1 -0
  533. package/dist/types/utils/hash/getFunctionSelector.d.ts +3 -0
  534. package/dist/types/utils/hash/getFunctionSelector.d.ts.map +1 -0
  535. package/dist/types/utils/hash/hashFunction.d.ts +4 -0
  536. package/dist/types/utils/hash/hashFunction.d.ts.map +1 -0
  537. package/dist/types/utils/hash/isHash.d.ts +3 -0
  538. package/dist/types/utils/hash/isHash.d.ts.map +1 -0
  539. package/dist/types/utils/hash/keccak256.d.ts +6 -0
  540. package/dist/types/utils/hash/keccak256.d.ts.map +1 -0
  541. package/dist/types/utils/index.d.ts +82 -0
  542. package/dist/types/utils/index.d.ts.map +1 -0
  543. package/dist/types/utils/observe.d.ts +17 -0
  544. package/dist/types/utils/observe.d.ts.map +1 -0
  545. package/dist/types/utils/poll.d.ts +13 -0
  546. package/dist/types/utils/poll.d.ts.map +1 -0
  547. package/dist/types/utils/promise/createBatchScheduler.d.ts +17 -0
  548. package/dist/types/utils/promise/createBatchScheduler.d.ts.map +1 -0
  549. package/dist/types/utils/promise/withCache.d.ts +36 -0
  550. package/dist/types/utils/promise/withCache.d.ts.map +1 -0
  551. package/dist/types/utils/promise/withRetry.d.ts +12 -0
  552. package/dist/types/utils/promise/withRetry.d.ts.map +1 -0
  553. package/dist/types/utils/promise/withTimeout.d.ts +8 -0
  554. package/dist/types/utils/promise/withTimeout.d.ts.map +1 -0
  555. package/dist/types/utils/regex.d.ts +4 -0
  556. package/dist/types/utils/regex.d.ts.map +1 -0
  557. package/dist/types/utils/rpc.d.ts +72 -0
  558. package/dist/types/utils/rpc.d.ts.map +1 -0
  559. package/dist/types/utils/signature/hashMessage.d.ts +6 -0
  560. package/dist/types/utils/signature/hashMessage.d.ts.map +1 -0
  561. package/dist/types/utils/signature/hashTypedData.d.ts +11 -0
  562. package/dist/types/utils/signature/hashTypedData.d.ts.map +1 -0
  563. package/dist/types/utils/signature/hexToSignature.d.ts +13 -0
  564. package/dist/types/utils/signature/hexToSignature.d.ts.map +1 -0
  565. package/dist/types/utils/signature/recoverAddress.d.ts +9 -0
  566. package/dist/types/utils/signature/recoverAddress.d.ts.map +1 -0
  567. package/dist/types/utils/signature/recoverMessageAddress.d.ts +9 -0
  568. package/dist/types/utils/signature/recoverMessageAddress.d.ts.map +1 -0
  569. package/dist/types/utils/signature/recoverPublicKey.d.ts +8 -0
  570. package/dist/types/utils/signature/recoverPublicKey.d.ts.map +1 -0
  571. package/dist/types/utils/signature/recoverTypedDataAddress.d.ts +13 -0
  572. package/dist/types/utils/signature/recoverTypedDataAddress.d.ts.map +1 -0
  573. package/dist/types/utils/signature/signatureToHex.d.ts +17 -0
  574. package/dist/types/utils/signature/signatureToHex.d.ts.map +1 -0
  575. package/dist/types/utils/signature/verifyMessage.d.ts +25 -0
  576. package/dist/types/utils/signature/verifyMessage.d.ts.map +1 -0
  577. package/dist/types/utils/signature/verifyTypedData.d.ts +28 -0
  578. package/dist/types/utils/signature/verifyTypedData.d.ts.map +1 -0
  579. package/dist/types/utils/stringify.d.ts +2 -0
  580. package/dist/types/utils/stringify.d.ts.map +1 -0
  581. package/dist/types/utils/transaction/assertRequest.d.ts +5 -0
  582. package/dist/types/utils/transaction/assertRequest.d.ts.map +1 -0
  583. package/dist/types/utils/transaction/assertTransaction.d.ts +5 -0
  584. package/dist/types/utils/transaction/assertTransaction.d.ts.map +1 -0
  585. package/dist/types/utils/transaction/getSerializedTransactionType.d.ts +4 -0
  586. package/dist/types/utils/transaction/getSerializedTransactionType.d.ts.map +1 -0
  587. package/dist/types/utils/transaction/getTransactionType.d.ts +4 -0
  588. package/dist/types/utils/transaction/getTransactionType.d.ts.map +1 -0
  589. package/dist/types/utils/transaction/parseTransaction.d.ts +9 -0
  590. package/dist/types/utils/transaction/parseTransaction.d.ts.map +1 -0
  591. package/dist/types/utils/transaction/prepareRequest.d.ts +21 -0
  592. package/dist/types/utils/transaction/prepareRequest.d.ts.map +1 -0
  593. package/dist/types/utils/transaction/serializeAccessList.d.ts +5 -0
  594. package/dist/types/utils/transaction/serializeAccessList.d.ts.map +1 -0
  595. package/dist/types/utils/transaction/serializeTransaction.d.ts +7 -0
  596. package/dist/types/utils/transaction/serializeTransaction.d.ts.map +1 -0
  597. package/dist/types/utils/typedData.d.ts +6 -0
  598. package/dist/types/utils/typedData.d.ts.map +1 -0
  599. package/dist/types/utils/uid.d.ts +2 -0
  600. package/dist/types/utils/uid.d.ts.map +1 -0
  601. package/dist/types/utils/unit/formatEther.d.ts +2 -0
  602. package/dist/types/utils/unit/formatEther.d.ts.map +1 -0
  603. package/dist/types/utils/unit/formatGwei.d.ts +2 -0
  604. package/dist/types/utils/unit/formatGwei.d.ts.map +1 -0
  605. package/dist/types/utils/unit/formatUnits.d.ts +2 -0
  606. package/dist/types/utils/unit/formatUnits.d.ts.map +1 -0
  607. package/dist/types/utils/unit/parseEther.d.ts +2 -0
  608. package/dist/types/utils/unit/parseEther.d.ts.map +1 -0
  609. package/dist/types/utils/unit/parseGwei.d.ts +2 -0
  610. package/dist/types/utils/unit/parseGwei.d.ts.map +1 -0
  611. package/dist/types/utils/unit/parseUnits.d.ts +2 -0
  612. package/dist/types/utils/unit/parseUnits.d.ts.map +1 -0
  613. package/dist/types/utils/wait.d.ts +2 -0
  614. package/dist/types/utils/wait.d.ts.map +1 -0
  615. package/dist/types/wallet.d.ts +11 -0
  616. package/dist/types/wallet.d.ts.map +1 -0
  617. package/dist/types/window.d.ts +2 -0
  618. package/dist/types/window.d.ts.map +1 -0
  619. package/package.json +1 -1
  620. package/src/actions/public/estimateFeesPerGas.ts +152 -0
  621. package/src/actions/public/estimateMaxPriorityFeePerGas.ts +96 -0
  622. package/src/actions/public/verifyHash.ts +1 -1
  623. package/src/actions/public/verifyMessage.ts +3 -2
  624. package/src/actions/public/verifyTypedData.ts +3 -2
  625. package/src/actions/wallet/deployContract.ts +2 -1
  626. package/src/actions/wallet/sendTransaction.ts +2 -1
  627. package/src/actions/wallet/writeContract.ts +2 -1
  628. package/src/clients/createTestClient.ts +2 -1
  629. package/src/clients/decorators/public.ts +64 -0
  630. package/src/errors/fee.ts +27 -0
  631. package/src/errors/version.ts +1 -1
  632. package/src/index.ts +38 -24
  633. package/src/public.ts +10 -0
  634. package/src/types/chain.ts +80 -12
  635. package/src/types/eip1193.ts +12 -0
  636. package/src/types/fee.ts +2 -0
  637. package/src/utils/transaction/prepareRequest.ts +37 -45
  638. package/chains/dist/cjs/celo/formatters.js.map +0 -1
  639. package/chains/dist/cjs/celo/parsers.js.map +0 -1
  640. package/chains/dist/cjs/celo/serializers.js.map +0 -1
  641. package/chains/dist/cjs/celo/types.js.map +0 -1
  642. package/chains/dist/cjs/index.js.map +0 -1
  643. package/chains/dist/cjs/optimism/fees.js.map +0 -1
  644. package/chains/dist/cjs/optimism/formatters.js.map +0 -1
  645. package/chains/dist/cjs/optimism/types.js.map +0 -1
  646. package/chains/dist/cjs/types.js.map +0 -1
  647. package/chains/dist/cjs/utils.js.map +0 -1
  648. package/chains/dist/tsconfig.build.tsbuildinfo +0 -1
  649. package/chains/node_modules/.bin/tsc +0 -17
  650. package/chains/node_modules/.bin/tsserver +0 -17
  651. package/chains/tsconfig.tsbuildinfo +0 -1
@@ -0,0 +1,1133 @@
1
+ import type { Abi, AbiEvent } from 'abitype';
2
+ import { type GetEnsAddressParameters, type GetEnsAddressReturnType } from '../../actions/ens/getEnsAddress.js';
3
+ import { type GetEnsAvatarParameters, type GetEnsAvatarReturnType } from '../../actions/ens/getEnsAvatar.js';
4
+ import { type GetEnsNameParameters, type GetEnsNameReturnType } from '../../actions/ens/getEnsName.js';
5
+ import { type GetEnsResolverParameters, type GetEnsResolverReturnType } from '../../actions/ens/getEnsResolver.js';
6
+ import { type GetEnsTextParameters, type GetEnsTextReturnType } from '../../actions/ens/getEnsText.js';
7
+ import { type CallParameters, type CallReturnType } from '../../actions/public/call.js';
8
+ import { type CreateBlockFilterReturnType } from '../../actions/public/createBlockFilter.js';
9
+ import { type CreateContractEventFilterParameters, type CreateContractEventFilterReturnType } from '../../actions/public/createContractEventFilter.js';
10
+ import { type CreateEventFilterParameters, type CreateEventFilterReturnType } from '../../actions/public/createEventFilter.js';
11
+ import { type CreatePendingTransactionFilterReturnType } from '../../actions/public/createPendingTransactionFilter.js';
12
+ import { type EstimateContractGasParameters, type EstimateContractGasReturnType } from '../../actions/public/estimateContractGas.js';
13
+ import { type EstimateFeesPerGasParameters, type EstimateFeesPerGasReturnType } from '../../actions/public/estimateFeesPerGas.js';
14
+ import { type EstimateGasParameters, type EstimateGasReturnType } from '../../actions/public/estimateGas.js';
15
+ import { type EstimateMaxPriorityFeePerGasParameters, type EstimateMaxPriorityFeePerGasReturnType } from '../../actions/public/estimateMaxPriorityFeePerGas.js';
16
+ import { type GetBalanceParameters, type GetBalanceReturnType } from '../../actions/public/getBalance.js';
17
+ import { type GetBlockParameters, type GetBlockReturnType } from '../../actions/public/getBlock.js';
18
+ import { type GetBlockNumberParameters, type GetBlockNumberReturnType } from '../../actions/public/getBlockNumber.js';
19
+ import { type GetBlockTransactionCountParameters, type GetBlockTransactionCountReturnType } from '../../actions/public/getBlockTransactionCount.js';
20
+ import { type GetBytecodeParameters, type GetBytecodeReturnType } from '../../actions/public/getBytecode.js';
21
+ import { type GetChainIdReturnType } from '../../actions/public/getChainId.js';
22
+ import { type GetFeeHistoryParameters, type GetFeeHistoryReturnType } from '../../actions/public/getFeeHistory.js';
23
+ import { type GetFilterChangesParameters, type GetFilterChangesReturnType } from '../../actions/public/getFilterChanges.js';
24
+ import { type GetFilterLogsParameters, type GetFilterLogsReturnType } from '../../actions/public/getFilterLogs.js';
25
+ import { type GetGasPriceReturnType } from '../../actions/public/getGasPrice.js';
26
+ import { type GetLogsParameters, type GetLogsReturnType } from '../../actions/public/getLogs.js';
27
+ import { type GetStorageAtParameters, type GetStorageAtReturnType } from '../../actions/public/getStorageAt.js';
28
+ import { type GetTransactionParameters, type GetTransactionReturnType } from '../../actions/public/getTransaction.js';
29
+ import { type GetTransactionConfirmationsParameters, type GetTransactionConfirmationsReturnType } from '../../actions/public/getTransactionConfirmations.js';
30
+ import { type GetTransactionCountParameters, type GetTransactionCountReturnType } from '../../actions/public/getTransactionCount.js';
31
+ import { type GetTransactionReceiptParameters, type GetTransactionReceiptReturnType } from '../../actions/public/getTransactionReceipt.js';
32
+ import { type MulticallParameters, type MulticallReturnType } from '../../actions/public/multicall.js';
33
+ import { type ReadContractParameters, type ReadContractReturnType } from '../../actions/public/readContract.js';
34
+ import { type SimulateContractParameters, type SimulateContractReturnType } from '../../actions/public/simulateContract.js';
35
+ import { type UninstallFilterParameters, type UninstallFilterReturnType } from '../../actions/public/uninstallFilter.js';
36
+ import { type VerifyMessageParameters, type VerifyMessageReturnType } from '../../actions/public/verifyMessage.js';
37
+ import { type VerifyTypedDataParameters, type VerifyTypedDataReturnType } from '../../actions/public/verifyTypedData.js';
38
+ import { type WaitForTransactionReceiptParameters, type WaitForTransactionReceiptReturnType } from '../../actions/public/waitForTransactionReceipt.js';
39
+ import { type WatchBlockNumberParameters, type WatchBlockNumberReturnType } from '../../actions/public/watchBlockNumber.js';
40
+ import { type WatchBlocksParameters, type WatchBlocksReturnType } from '../../actions/public/watchBlocks.js';
41
+ import { type WatchContractEventParameters, type WatchContractEventReturnType } from '../../actions/public/watchContractEvent.js';
42
+ import { type WatchEventParameters, type WatchEventReturnType } from '../../actions/public/watchEvent.js';
43
+ import { type WatchPendingTransactionsParameters, type WatchPendingTransactionsReturnType } from '../../actions/public/watchPendingTransactions.js';
44
+ import type { Account } from '../../types/account.js';
45
+ import type { BlockNumber, BlockTag } from '../../types/block.js';
46
+ import type { Chain } from '../../types/chain.js';
47
+ import type { ContractFunctionConfig, MaybeAbiEventName, MaybeExtractEventArgsFromAbi } from '../../types/contract.js';
48
+ import type { FeeValuesType } from '../../types/fee.js';
49
+ import type { FilterType } from '../../types/filter.js';
50
+ import type { Client } from '../createClient.js';
51
+ import type { Transport } from '../transports/createTransport.js';
52
+ export type PublicActions<TTransport extends Transport = Transport, TChain extends Chain | undefined = Chain | undefined, TAccount extends Account | undefined = Account | undefined> = {
53
+ /**
54
+ * Executes a new message call immediately without submitting a transaction to the network.
55
+ *
56
+ * - Docs: https://viem.sh/docs/actions/public/call.html
57
+ * - JSON-RPC Methods: [`eth_call`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_call)
58
+ *
59
+ * @param args - {@link CallParameters}
60
+ * @returns The call data. {@link CallReturnType}
61
+ *
62
+ * @example
63
+ * import { createPublicClient, http } from 'viem'
64
+ * import { mainnet } from 'viem/chains'
65
+ *
66
+ * const client = createPublicClient({
67
+ * chain: mainnet,
68
+ * transport: http(),
69
+ * })
70
+ * const data = await client.call({
71
+ * account: '0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266',
72
+ * data: '0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2',
73
+ * to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8',
74
+ * })
75
+ */
76
+ call: (parameters: CallParameters<TChain>) => Promise<CallReturnType>;
77
+ /**
78
+ * Creates a Filter to listen for new block hashes that can be used with [`getFilterChanges`](https://viem.sh/docs/actions/public/getFilterChanges.html).
79
+ *
80
+ * - Docs: https://viem.sh/docs/actions/public/createBlockFilter.html
81
+ * - JSON-RPC Methods: [`eth_newBlockFilter`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_newBlockFilter)
82
+ *
83
+ * @returns Filter. {@link CreateBlockFilterReturnType}
84
+ *
85
+ * @example
86
+ * import { createPublicClient, createBlockFilter, http } from 'viem'
87
+ * import { mainnet } from 'viem/chains'
88
+ *
89
+ * const client = createPublicClient({
90
+ * chain: mainnet,
91
+ * transport: http(),
92
+ * })
93
+ * const filter = await createBlockFilter(client)
94
+ * // { id: "0x345a6572337856574a76364e457a4366", type: 'block' }
95
+ */
96
+ createBlockFilter: () => Promise<CreateBlockFilterReturnType>;
97
+ /**
98
+ * Creates a Filter to retrieve event logs that can be used with [`getFilterChanges`](https://viem.sh/docs/actions/public/getFilterChanges.html) or [`getFilterLogs`](https://viem.sh/docs/actions/public/getFilterLogs.html).
99
+ *
100
+ * - Docs: https://viem.sh/docs/contract/createContractEventFilter.html
101
+ *
102
+ * @param args - {@link CreateContractEventFilterParameters}
103
+ * @returns [`Filter`](https://viem.sh/docs/glossary/types.html#filter). {@link CreateContractEventFilterReturnType}
104
+ *
105
+ * @example
106
+ * import { createPublicClient, http, parseAbi } from 'viem'
107
+ * import { mainnet } from 'viem/chains'
108
+ *
109
+ * const client = createPublicClient({
110
+ * chain: mainnet,
111
+ * transport: http(),
112
+ * })
113
+ * const filter = await client.createContractEventFilter({
114
+ * abi: parseAbi(['event Transfer(address indexed, address indexed, uint256)']),
115
+ * })
116
+ */
117
+ createContractEventFilter: <const TAbi extends Abi | readonly unknown[], TEventName extends string | undefined, TArgs extends MaybeExtractEventArgsFromAbi<TAbi, TEventName> | undefined, TStrict extends boolean | undefined = undefined, TFromBlock extends BlockNumber | BlockTag | undefined = undefined, TToBlock extends BlockNumber | BlockTag | undefined = undefined>(args: CreateContractEventFilterParameters<TAbi, TEventName, TArgs, TStrict, TFromBlock, TToBlock>) => Promise<CreateContractEventFilterReturnType<TAbi, TEventName, TArgs, TStrict, TFromBlock, TToBlock>>;
118
+ /**
119
+ * Creates a [`Filter`](https://viem.sh/docs/glossary/types.html#filter) to listen for new events that can be used with [`getFilterChanges`](https://viem.sh/docs/actions/public/getFilterChanges.html).
120
+ *
121
+ * - Docs: https://viem.sh/docs/actions/public/createEventFilter.html
122
+ * - JSON-RPC Methods: [`eth_newFilter`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_newfilter)
123
+ *
124
+ * @param args - {@link CreateEventFilterParameters}
125
+ * @returns [`Filter`](https://viem.sh/docs/glossary/types.html#filter). {@link CreateEventFilterReturnType}
126
+ *
127
+ * @example
128
+ * import { createPublicClient, http } from 'viem'
129
+ * import { mainnet } from 'viem/chains'
130
+ *
131
+ * const client = createPublicClient({
132
+ * chain: mainnet,
133
+ * transport: http(),
134
+ * })
135
+ * const filter = await client.createEventFilter({
136
+ * address: '0xfba3912ca04dd458c843e2ee08967fc04f3579c2',
137
+ * })
138
+ */
139
+ createEventFilter: <const TAbiEvent extends AbiEvent | undefined = undefined, const TAbiEvents extends readonly AbiEvent[] | readonly unknown[] | undefined = TAbiEvent extends AbiEvent ? [TAbiEvent] : undefined, TStrict extends boolean | undefined = undefined, TFromBlock extends BlockNumber | BlockTag | undefined = undefined, TToBlock extends BlockNumber | BlockTag | undefined = undefined, _EventName extends string | undefined = MaybeAbiEventName<TAbiEvent>, _Args extends MaybeExtractEventArgsFromAbi<TAbiEvents, _EventName> | undefined = undefined>(args?: CreateEventFilterParameters<TAbiEvent, TAbiEvents, TStrict, TFromBlock, TToBlock, _EventName, _Args>) => Promise<CreateEventFilterReturnType<TAbiEvent, TAbiEvents, TStrict, TFromBlock, TToBlock, _EventName, _Args>>;
140
+ /**
141
+ * Creates a Filter to listen for new pending transaction hashes that can be used with [`getFilterChanges`](https://viem.sh/docs/actions/public/getFilterChanges.html).
142
+ *
143
+ * - Docs: https://viem.sh/docs/actions/public/createPendingTransactionFilter.html
144
+ * - JSON-RPC Methods: [`eth_newPendingTransactionFilter`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_newpendingtransactionfilter)
145
+ *
146
+ * @returns [`Filter`](https://viem.sh/docs/glossary/types.html#filter). {@link CreateBlockFilterReturnType}
147
+ *
148
+ * @example
149
+ * import { createPublicClient, http } from 'viem'
150
+ * import { mainnet } from 'viem/chains'
151
+ *
152
+ * const client = createPublicClient({
153
+ * chain: mainnet,
154
+ * transport: http(),
155
+ * })
156
+ * const filter = await client.createPendingTransactionFilter()
157
+ * // { id: "0x345a6572337856574a76364e457a4366", type: 'transaction' }
158
+ */
159
+ createPendingTransactionFilter: () => Promise<CreatePendingTransactionFilterReturnType>;
160
+ /**
161
+ * Estimates the gas required to successfully execute a contract write function call.
162
+ *
163
+ * - Docs: https://viem.sh/docs/contract/estimateContractGas.html
164
+ *
165
+ * @remarks
166
+ * Internally, uses a [Public Client](https://viem.sh/docs/clients/public.html) to call the [`estimateGas` action](https://viem.sh/docs/actions/public/estimateGas.html) with [ABI-encoded `data`](https://viem.sh/docs/contract/encodeFunctionData.html).
167
+ *
168
+ * @param args - {@link EstimateContractGasParameters}
169
+ * @returns The gas estimate (in wei). {@link EstimateContractGasReturnType}
170
+ *
171
+ * @example
172
+ * import { createPublicClient, http, parseAbi } from 'viem'
173
+ * import { mainnet } from 'viem/chains'
174
+ *
175
+ * const client = createPublicClient({
176
+ * chain: mainnet,
177
+ * transport: http(),
178
+ * })
179
+ * const gas = await client.estimateContractGas({
180
+ * address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2',
181
+ * abi: parseAbi(['function mint() public']),
182
+ * functionName: 'mint',
183
+ * account: '0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266',
184
+ * })
185
+ */
186
+ estimateContractGas: <TChain extends Chain | undefined, const TAbi extends Abi | readonly unknown[], TFunctionName extends string>(args: EstimateContractGasParameters<TAbi, TFunctionName, TChain, TAccount>) => Promise<EstimateContractGasReturnType>;
187
+ /**
188
+ * Estimates the gas necessary to complete a transaction without submitting it to the network.
189
+ *
190
+ * - Docs: https://viem.sh/docs/actions/public/estimateGas.html
191
+ * - JSON-RPC Methods: [`eth_estimateGas`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_estimategas)
192
+ *
193
+ * @param args - {@link EstimateGasParameters}
194
+ * @returns The gas estimate (in wei). {@link EstimateGasReturnType}
195
+ *
196
+ * @example
197
+ * import { createPublicClient, http, parseEther } from 'viem'
198
+ * import { mainnet } from 'viem/chains'
199
+ *
200
+ * const client = createPublicClient({
201
+ * chain: mainnet,
202
+ * transport: http(),
203
+ * })
204
+ * const gasEstimate = await client.estimateGas({
205
+ * account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e',
206
+ * to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8',
207
+ * value: parseEther('1'),
208
+ * })
209
+ */
210
+ estimateGas: (args: EstimateGasParameters<TChain, TAccount>) => Promise<EstimateGasReturnType>;
211
+ /**
212
+ * Returns the balance of an address in wei.
213
+ *
214
+ * - Docs: https://viem.sh/docs/actions/public/getBalance.html
215
+ * - JSON-RPC Methods: [`eth_getBalance`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getbalance)
216
+ *
217
+ * @remarks
218
+ * You can convert the balance to ether units with [`formatEther`](https://viem.sh/docs/utilities/formatEther.html).
219
+ *
220
+ * ```ts
221
+ * const balance = await getBalance(client, {
222
+ * address: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e',
223
+ * blockTag: 'safe'
224
+ * })
225
+ * const balanceAsEther = formatEther(balance)
226
+ * // "6.942"
227
+ * ```
228
+ *
229
+ * @param args - {@link GetBalanceParameters}
230
+ * @returns The balance of the address in wei. {@link GetBalanceReturnType}
231
+ *
232
+ * @example
233
+ * import { createPublicClient, http } from 'viem'
234
+ * import { mainnet } from 'viem/chains'
235
+ *
236
+ * const client = createPublicClient({
237
+ * chain: mainnet,
238
+ * transport: http(),
239
+ * })
240
+ * const balance = await client.getBalance({
241
+ * address: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e',
242
+ * })
243
+ * // 10000000000000000000000n (wei)
244
+ */
245
+ getBalance: (args: GetBalanceParameters) => Promise<GetBalanceReturnType>;
246
+ /**
247
+ * Returns information about a block at a block number, hash, or tag.
248
+ *
249
+ * - Docs: https://viem.sh/docs/actions/public/getBlock.html
250
+ * - Examples: https://stackblitz.com/github/wagmi-dev/viem/tree/main/examples/blocks/fetching-blocks
251
+ * - JSON-RPC Methods:
252
+ * - Calls [`eth_getBlockByNumber`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getblockbynumber) for `blockNumber` & `blockTag`.
253
+ * - Calls [`eth_getBlockByHash`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getblockbyhash) for `blockHash`.
254
+ *
255
+ * @param args - {@link GetBlockParameters}
256
+ * @returns Information about the block. {@link GetBlockReturnType}
257
+ *
258
+ * @example
259
+ * import { createPublicClient, http } from 'viem'
260
+ * import { mainnet } from 'viem/chains'
261
+ *
262
+ * const client = createPublicClient({
263
+ * chain: mainnet,
264
+ * transport: http(),
265
+ * })
266
+ * const block = await client.getBlock()
267
+ */
268
+ getBlock: <TIncludeTransactions extends boolean = false, TBlockTag extends BlockTag = 'latest'>(args?: GetBlockParameters<TIncludeTransactions, TBlockTag>) => Promise<GetBlockReturnType<TChain, TIncludeTransactions, TBlockTag>>;
269
+ /**
270
+ * Returns the number of the most recent block seen.
271
+ *
272
+ * - Docs: https://viem.sh/docs/actions/public/getBlockNumber.html
273
+ * - Examples: https://stackblitz.com/github/wagmi-dev/viem/tree/main/examples/blocks/fetching-blocks
274
+ * - JSON-RPC Methods: [`eth_blockNumber`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_blocknumber)
275
+ *
276
+ * @param args - {@link GetBlockNumberParameters}
277
+ * @returns The number of the block. {@link GetBlockNumberReturnType}
278
+ *
279
+ * @example
280
+ * import { createPublicClient, http } from 'viem'
281
+ * import { mainnet } from 'viem/chains'
282
+ *
283
+ * const client = createPublicClient({
284
+ * chain: mainnet,
285
+ * transport: http(),
286
+ * })
287
+ * const blockNumber = await client.getBlockNumber()
288
+ * // 69420n
289
+ */
290
+ getBlockNumber: (args?: GetBlockNumberParameters) => Promise<GetBlockNumberReturnType>;
291
+ /**
292
+ * Returns the number of Transactions at a block number, hash, or tag.
293
+ *
294
+ * - Docs: https://viem.sh/docs/actions/public/getBlockTransactionCount.html
295
+ * - JSON-RPC Methods:
296
+ * - Calls [`eth_getBlockTransactionCountByNumber`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getblocktransactioncountbynumber) for `blockNumber` & `blockTag`.
297
+ * - Calls [`eth_getBlockTransactionCountByHash`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getblocktransactioncountbyhash) for `blockHash`.
298
+ *
299
+ * @param args - {@link GetBlockTransactionCountParameters}
300
+ * @returns The block transaction count. {@link GetBlockTransactionCountReturnType}
301
+ *
302
+ * @example
303
+ * import { createPublicClient, http } from 'viem'
304
+ * import { mainnet } from 'viem/chains'
305
+ *
306
+ * const client = createPublicClient({
307
+ * chain: mainnet,
308
+ * transport: http(),
309
+ * })
310
+ * const count = await client.getBlockTransactionCount()
311
+ */
312
+ getBlockTransactionCount: (args?: GetBlockTransactionCountParameters) => Promise<GetBlockTransactionCountReturnType>;
313
+ /**
314
+ * Retrieves the bytecode at an address.
315
+ *
316
+ * - Docs: https://viem.sh/docs/contract/getBytecode.html
317
+ * - JSON-RPC Methods: [`eth_getCode`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getcode)
318
+ *
319
+ * @param args - {@link GetBytecodeParameters}
320
+ * @returns The contract's bytecode. {@link GetBytecodeReturnType}
321
+ *
322
+ * @example
323
+ * import { createPublicClient, http } from 'viem'
324
+ * import { mainnet } from 'viem/chains'
325
+ *
326
+ * const client = createPublicClient({
327
+ * chain: mainnet,
328
+ * transport: http(),
329
+ * })
330
+ * const code = await client.getBytecode({
331
+ * address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2',
332
+ * })
333
+ */
334
+ getBytecode: (args: GetBytecodeParameters) => Promise<GetBytecodeReturnType>;
335
+ /**
336
+ * Returns the chain ID associated with the current network.
337
+ *
338
+ * - Docs: https://viem.sh/docs/actions/public/getChainId.html
339
+ * - JSON-RPC Methods: [`eth_chainId`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_chainid)
340
+ *
341
+ * @returns The current chain ID. {@link GetChainIdReturnType}
342
+ *
343
+ * @example
344
+ * import { createPublicClient, http } from 'viem'
345
+ * import { mainnet } from 'viem/chains'
346
+ *
347
+ * const client = createPublicClient({
348
+ * chain: mainnet,
349
+ * transport: http(),
350
+ * })
351
+ * const chainId = await client.getChainId()
352
+ * // 1
353
+ */
354
+ getChainId: () => Promise<GetChainIdReturnType>;
355
+ /**
356
+ * Gets address for ENS name.
357
+ *
358
+ * - Docs: https://viem.sh/docs/ens/actions/getEnsAddress.html
359
+ * - Examples: https://stackblitz.com/github/wagmi-dev/viem/tree/main/examples/ens
360
+ *
361
+ * @remarks
362
+ * Calls `resolve(bytes, bytes)` on ENS Universal Resolver Contract.
363
+ *
364
+ * Since ENS names prohibit certain forbidden characters (e.g. underscore) and have other validation rules, you likely want to [normalize ENS names](https://docs.ens.domains/contract-api-reference/name-processing#normalising-names) with [UTS-46 normalization](https://unicode.org/reports/tr46) before passing them to `getEnsAddress`. You can use the built-in [`normalize`](https://viem.sh/docs/ens/utilities/normalize.html) function for this.
365
+ *
366
+ * @param args - {@link GetEnsAddressParameters}
367
+ * @returns Address for ENS name or `null` if not found. {@link GetEnsAddressReturnType}
368
+ *
369
+ * @example
370
+ * import { createPublicClient, http } from 'viem'
371
+ * import { mainnet } from 'viem/chains'
372
+ * import { normalize } from 'viem/ens'
373
+ *
374
+ * const client = createPublicClient({
375
+ * chain: mainnet,
376
+ * transport: http(),
377
+ * })
378
+ * const ensAddress = await client.getEnsAddress({
379
+ * name: normalize('wagmi-dev.eth'),
380
+ * })
381
+ * // '0xd2135CfB216b74109775236E36d4b433F1DF507B'
382
+ */
383
+ getEnsAddress: (args: GetEnsAddressParameters) => Promise<GetEnsAddressReturnType>;
384
+ /**
385
+ * Gets the avatar of an ENS name.
386
+ *
387
+ * - Docs: https://viem.sh/docs/ens/actions/getEnsAvatar.html
388
+ * - Examples: https://stackblitz.com/github/wagmi-dev/viem/tree/main/examples/ens
389
+ *
390
+ * @remarks
391
+ * Calls [`getEnsText`](https://viem.sh/docs/ens/actions/getEnsText.html) with `key` set to `'avatar'`.
392
+ *
393
+ * Since ENS names prohibit certain forbidden characters (e.g. underscore) and have other validation rules, you likely want to [normalize ENS names](https://docs.ens.domains/contract-api-reference/name-processing#normalising-names) with [UTS-46 normalization](https://unicode.org/reports/tr46) before passing them to `getEnsAddress`. You can use the built-in [`normalize`](https://viem.sh/docs/ens/utilities/normalize.html) function for this.
394
+ *
395
+ * @param args - {@link GetEnsAvatarParameters}
396
+ * @returns Avatar URI or `null` if not found. {@link GetEnsAvatarReturnType}
397
+ *
398
+ * @example
399
+ * import { createPublicClient, http } from 'viem'
400
+ * import { mainnet } from 'viem/chains'
401
+ * import { normalize } from 'viem/ens'
402
+ *
403
+ * const client = createPublicClient({
404
+ * chain: mainnet,
405
+ * transport: http(),
406
+ * })
407
+ * const ensAvatar = await client.getEnsAvatar({
408
+ * name: normalize('wagmi-dev.eth'),
409
+ * })
410
+ * // 'https://ipfs.io/ipfs/Qma8mnp6xV3J2cRNf3mTth5C8nV11CAnceVinc3y8jSbio'
411
+ */
412
+ getEnsAvatar: (args: GetEnsAvatarParameters) => Promise<GetEnsAvatarReturnType>;
413
+ /**
414
+ * Gets primary name for specified address.
415
+ *
416
+ * - Docs: https://viem.sh/docs/ens/actions/getEnsName.html
417
+ * - Examples: https://stackblitz.com/github/wagmi-dev/viem/tree/main/examples/ens
418
+ *
419
+ * @remarks
420
+ * Calls `reverse(bytes)` on ENS Universal Resolver Contract to "reverse resolve" the address to the primary ENS name.
421
+ *
422
+ * @param args - {@link GetEnsNameParameters}
423
+ * @returns Name or `null` if not found. {@link GetEnsNameReturnType}
424
+ *
425
+ * @example
426
+ * import { createPublicClient, http } from 'viem'
427
+ * import { mainnet } from 'viem/chains'
428
+ *
429
+ * const client = createPublicClient({
430
+ * chain: mainnet,
431
+ * transport: http(),
432
+ * })
433
+ * const ensName = await client.getEnsName({
434
+ * address: '0xd2135CfB216b74109775236E36d4b433F1DF507B',
435
+ * })
436
+ * // 'wagmi-dev.eth'
437
+ */
438
+ getEnsName: (args: GetEnsNameParameters) => Promise<GetEnsNameReturnType>;
439
+ /**
440
+ * Gets resolver for ENS name.
441
+ *
442
+ * - Docs: https://viem.sh/docs/ens/actions/getEnsResolver.html
443
+ * - Examples: https://stackblitz.com/github/wagmi-dev/viem/tree/main/examples/ens
444
+ *
445
+ * @remarks
446
+ * Calls `findResolver(bytes)` on ENS Universal Resolver Contract to retrieve the resolver of an ENS name.
447
+ *
448
+ * Since ENS names prohibit certain forbidden characters (e.g. underscore) and have other validation rules, you likely want to [normalize ENS names](https://docs.ens.domains/contract-api-reference/name-processing#normalising-names) with [UTS-46 normalization](https://unicode.org/reports/tr46) before passing them to `getEnsAddress`. You can use the built-in [`normalize`](https://viem.sh/docs/ens/utilities/normalize.html) function for this.
449
+ *
450
+ * @param args - {@link GetEnsResolverParameters}
451
+ * @returns Address for ENS resolver. {@link GetEnsResolverReturnType}
452
+ *
453
+ * @example
454
+ * import { createPublicClient, http } from 'viem'
455
+ * import { mainnet } from 'viem/chains'
456
+ * import { normalize } from 'viem/ens'
457
+ *
458
+ * const client = createPublicClient({
459
+ * chain: mainnet,
460
+ * transport: http(),
461
+ * })
462
+ * const resolverAddress = await client.getEnsResolver({
463
+ * name: normalize('wagmi-dev.eth'),
464
+ * })
465
+ * // '0x4976fb03C32e5B8cfe2b6cCB31c09Ba78EBaBa41'
466
+ */
467
+ getEnsResolver: (args: GetEnsResolverParameters) => Promise<GetEnsResolverReturnType>;
468
+ /**
469
+ * Gets a text record for specified ENS name.
470
+ *
471
+ * - Docs: https://viem.sh/docs/ens/actions/getEnsResolver.html
472
+ * - Examples: https://stackblitz.com/github/wagmi-dev/viem/tree/main/examples/ens
473
+ *
474
+ * @remarks
475
+ * Calls `resolve(bytes, bytes)` on ENS Universal Resolver Contract.
476
+ *
477
+ * Since ENS names prohibit certain forbidden characters (e.g. underscore) and have other validation rules, you likely want to [normalize ENS names](https://docs.ens.domains/contract-api-reference/name-processing#normalising-names) with [UTS-46 normalization](https://unicode.org/reports/tr46) before passing them to `getEnsAddress`. You can use the built-in [`normalize`](https://viem.sh/docs/ens/utilities/normalize.html) function for this.
478
+ *
479
+ * @param args - {@link GetEnsTextParameters}
480
+ * @returns Address for ENS resolver. {@link GetEnsTextReturnType}
481
+ *
482
+ * @example
483
+ * import { createPublicClient, http } from 'viem'
484
+ * import { mainnet } from 'viem/chains'
485
+ * import { normalize } from 'viem/ens'
486
+ *
487
+ * const client = createPublicClient({
488
+ * chain: mainnet,
489
+ * transport: http(),
490
+ * })
491
+ * const twitterRecord = await client.getEnsText({
492
+ * name: normalize('wagmi-dev.eth'),
493
+ * key: 'com.twitter',
494
+ * })
495
+ * // 'wagmi_sh'
496
+ */
497
+ getEnsText: (args: GetEnsTextParameters) => Promise<GetEnsTextReturnType>;
498
+ /**
499
+ * Returns a collection of historical gas information.
500
+ *
501
+ * - Docs: https://viem.sh/docs/actions/public/getFeeHistory.html
502
+ * - JSON-RPC Methods: [`eth_feeHistory`](https://docs.alchemy.com/reference/eth-feehistory)
503
+ *
504
+ * @param args - {@link GetFeeHistoryParameters}
505
+ * @returns The gas estimate (in wei). {@link GetFeeHistoryReturnType}
506
+ *
507
+ * @example
508
+ * import { createPublicClient, http } from 'viem'
509
+ * import { mainnet } from 'viem/chains'
510
+ *
511
+ * const client = createPublicClient({
512
+ * chain: mainnet,
513
+ * transport: http(),
514
+ * })
515
+ * const feeHistory = await client.getFeeHistory({
516
+ * blockCount: 4,
517
+ * rewardPercentiles: [25, 75],
518
+ * })
519
+ */
520
+ getFeeHistory: (args: GetFeeHistoryParameters) => Promise<GetFeeHistoryReturnType>;
521
+ /**
522
+ * Returns an estimate for the fees per gas for a transaction to be included
523
+ * in the next block.
524
+ *
525
+ * - Docs: https://viem.sh/docs/actions/public/estimateFeesPerGas.html
526
+ *
527
+ * @param client - Client to use
528
+ * @param parameters - {@link EstimateFeesPerGasParameters}
529
+ * @returns An estimate (in wei) for the fees per gas. {@link EstimateFeesPerGasReturnType}
530
+ *
531
+ * @example
532
+ * import { createPublicClient, http } from 'viem'
533
+ * import { mainnet } from 'viem/chains'
534
+ *
535
+ * const client = createPublicClient({
536
+ * chain: mainnet,
537
+ * transport: http(),
538
+ * })
539
+ * const maxPriorityFeePerGas = await client.estimateFeesPerGas()
540
+ * // { maxFeePerGas: ..., maxPriorityFeePerGas: ... }
541
+ */
542
+ estimateFeesPerGas: <TChainOverride extends Chain | undefined, TType extends FeeValuesType = 'eip1559'>(args?: EstimateFeesPerGasParameters<TChain, TChainOverride, TType>) => Promise<EstimateFeesPerGasReturnType>;
543
+ /**
544
+ * Returns a list of logs or hashes based on a [Filter](/docs/glossary/terms#filter) since the last time it was called.
545
+ *
546
+ * - Docs: https://viem.sh/docs/actions/public/getFilterChanges.html
547
+ * - JSON-RPC Methods: [`eth_getFilterChanges`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getfilterchanges)
548
+ *
549
+ * @remarks
550
+ * A Filter can be created from the following actions:
551
+ *
552
+ * - [`createBlockFilter`](https://viem.sh/docs/actions/public/createBlockFilter.html)
553
+ * - [`createContractEventFilter`](https://viem.sh/docs/contract/createContractEventFilter.html)
554
+ * - [`createEventFilter`](https://viem.sh/docs/actions/public/createEventFilter.html)
555
+ * - [`createPendingTransactionFilter`](https://viem.sh/docs/actions/public/createPendingTransactionFilter.html)
556
+ *
557
+ * Depending on the type of filter, the return value will be different:
558
+ *
559
+ * - If the filter was created with `createContractEventFilter` or `createEventFilter`, it returns a list of logs.
560
+ * - If the filter was created with `createPendingTransactionFilter`, it returns a list of transaction hashes.
561
+ * - If the filter was created with `createBlockFilter`, it returns a list of block hashes.
562
+ *
563
+ * @param args - {@link GetFilterChangesParameters}
564
+ * @returns Logs or hashes. {@link GetFilterChangesReturnType}
565
+ *
566
+ * @example
567
+ * // Blocks
568
+ * import { createPublicClient, http } from 'viem'
569
+ * import { mainnet } from 'viem/chains'
570
+ *
571
+ * const client = createPublicClient({
572
+ * chain: mainnet,
573
+ * transport: http(),
574
+ * })
575
+ * const filter = await client.createBlockFilter()
576
+ * const hashes = await client.getFilterChanges({ filter })
577
+ *
578
+ * @example
579
+ * // Contract Events
580
+ * import { createPublicClient, http, parseAbi } from 'viem'
581
+ * import { mainnet } from 'viem/chains'
582
+ *
583
+ * const client = createPublicClient({
584
+ * chain: mainnet,
585
+ * transport: http(),
586
+ * })
587
+ * const filter = await client.createContractEventFilter({
588
+ * address: '0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48',
589
+ * abi: parseAbi(['event Transfer(address indexed, address indexed, uint256)']),
590
+ * eventName: 'Transfer',
591
+ * })
592
+ * const logs = await client.getFilterChanges({ filter })
593
+ *
594
+ * @example
595
+ * // Raw Events
596
+ * import { createPublicClient, http, parseAbiItem } from 'viem'
597
+ * import { mainnet } from 'viem/chains'
598
+ *
599
+ * const client = createPublicClient({
600
+ * chain: mainnet,
601
+ * transport: http(),
602
+ * })
603
+ * const filter = await client.createEventFilter({
604
+ * address: '0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48',
605
+ * event: parseAbiItem('event Transfer(address indexed, address indexed, uint256)'),
606
+ * })
607
+ * const logs = await client.getFilterChanges({ filter })
608
+ *
609
+ * @example
610
+ * // Transactions
611
+ * import { createPublicClient, http } from 'viem'
612
+ * import { mainnet } from 'viem/chains'
613
+ *
614
+ * const client = createPublicClient({
615
+ * chain: mainnet,
616
+ * transport: http(),
617
+ * })
618
+ * const filter = await client.createPendingTransactionFilter()
619
+ * const hashes = await client.getFilterChanges({ filter })
620
+ */
621
+ getFilterChanges: <TFilterType extends FilterType, const TAbi extends Abi | readonly unknown[] | undefined, TEventName extends string | undefined, TStrict extends boolean | undefined = undefined, TFromBlock extends BlockNumber | BlockTag | undefined = undefined, TToBlock extends BlockNumber | BlockTag | undefined = undefined>(args: GetFilterChangesParameters<TFilterType, TAbi, TEventName, TStrict, TFromBlock, TToBlock>) => Promise<GetFilterChangesReturnType<TFilterType, TAbi, TEventName, TStrict, TFromBlock, TToBlock>>;
622
+ /**
623
+ * Returns a list of event logs since the filter was created.
624
+ *
625
+ * - Docs: https://viem.sh/docs/actions/public/getFilterLogs.html
626
+ * - JSON-RPC Methods: [`eth_getFilterLogs`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getfilterlogs)
627
+ *
628
+ * @remarks
629
+ * `getFilterLogs` is only compatible with **event filters**.
630
+ *
631
+ * @param args - {@link GetFilterLogsParameters}
632
+ * @returns A list of event logs. {@link GetFilterLogsReturnType}
633
+ *
634
+ * @example
635
+ * import { createPublicClient, http, parseAbiItem } from 'viem'
636
+ * import { mainnet } from 'viem/chains'
637
+ *
638
+ * const client = createPublicClient({
639
+ * chain: mainnet,
640
+ * transport: http(),
641
+ * })
642
+ * const filter = await client.createEventFilter({
643
+ * address: '0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48',
644
+ * event: parseAbiItem('event Transfer(address indexed, address indexed, uint256)'),
645
+ * })
646
+ * const logs = await client.getFilterLogs({ filter })
647
+ */
648
+ getFilterLogs: <const TAbi extends Abi | readonly unknown[] | undefined, TEventName extends string | undefined, TStrict extends boolean | undefined = undefined, TFromBlock extends BlockNumber | BlockTag | undefined = undefined, TToBlock extends BlockNumber | BlockTag | undefined = undefined>(args: GetFilterLogsParameters<TAbi, TEventName, TStrict, TFromBlock, TToBlock>) => Promise<GetFilterLogsReturnType<TAbi, TEventName, TStrict, TFromBlock, TToBlock>>;
649
+ /**
650
+ * Returns the current price of gas (in wei).
651
+ *
652
+ * - Docs: https://viem.sh/docs/actions/public/getGasPrice.html
653
+ * - JSON-RPC Methods: [`eth_gasPrice`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_gasprice)
654
+ *
655
+ * @returns The gas price (in wei). {@link GetGasPriceReturnType}
656
+ *
657
+ * @example
658
+ * import { createPublicClient, http } from 'viem'
659
+ * import { mainnet } from 'viem/chains'
660
+ *
661
+ * const client = createPublicClient({
662
+ * chain: mainnet,
663
+ * transport: http(),
664
+ * })
665
+ * const gasPrice = await client.getGasPrice()
666
+ */
667
+ getGasPrice: () => Promise<GetGasPriceReturnType>;
668
+ /**
669
+ * Returns a list of event logs matching the provided parameters.
670
+ *
671
+ * - Docs: https://viem.sh/docs/actions/public/getLogs.html
672
+ * - Examples: https://stackblitz.com/github/wagmi-dev/viem/tree/main/examples/filters-and-logs/event-logs
673
+ * - JSON-RPC Methods: [`eth_getLogs`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getlogs)
674
+ *
675
+ * @param args - {@link GetLogsParameters}
676
+ * @returns A list of event logs. {@link GetLogsReturnType}
677
+ *
678
+ * @example
679
+ * import { createPublicClient, http, parseAbiItem } from 'viem'
680
+ * import { mainnet } from 'viem/chains'
681
+ *
682
+ * const client = createPublicClient({
683
+ * chain: mainnet,
684
+ * transport: http(),
685
+ * })
686
+ * const logs = await client.getLogs()
687
+ */
688
+ getLogs: <const TAbiEvent extends AbiEvent | undefined = undefined, const TAbiEvents extends readonly AbiEvent[] | readonly unknown[] | undefined = TAbiEvent extends AbiEvent ? [TAbiEvent] : undefined, TStrict extends boolean | undefined = undefined, TFromBlock extends BlockNumber | BlockTag | undefined = undefined, TToBlock extends BlockNumber | BlockTag | undefined = undefined>(args?: GetLogsParameters<TAbiEvent, TAbiEvents, TStrict, TFromBlock, TToBlock>) => Promise<GetLogsReturnType<TAbiEvent, TAbiEvents, TStrict, TFromBlock, TToBlock>>;
689
+ /**
690
+ * Returns an estimate for the max priority fee per gas (in wei) for a transaction
691
+ * to be included in the next block.
692
+ *
693
+ * - Docs: https://viem.sh/docs/actions/public/estimateMaxPriorityFeePerGas.html
694
+ *
695
+ * @param client - Client to use
696
+ * @returns An estimate (in wei) for the max priority fee per gas. {@link EstimateMaxPriorityFeePerGasReturnType}
697
+ *
698
+ * @example
699
+ * import { createPublicClient, http } from 'viem'
700
+ * import { mainnet } from 'viem/chains'
701
+ *
702
+ * const client = createPublicClient({
703
+ * chain: mainnet,
704
+ * transport: http(),
705
+ * })
706
+ * const maxPriorityFeePerGas = await client.estimateMaxPriorityFeePerGas()
707
+ * // 10000000n
708
+ */
709
+ estimateMaxPriorityFeePerGas: <TChainOverride extends Chain | undefined>(args?: EstimateMaxPriorityFeePerGasParameters<TChain, TChainOverride>) => Promise<EstimateMaxPriorityFeePerGasReturnType>;
710
+ /**
711
+ * Returns the value from a storage slot at a given address.
712
+ *
713
+ * - Docs: https://viem.sh/docs/contract/getStorageAt.html
714
+ * - JSON-RPC Methods: [`eth_getStorageAt`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getstorageat)
715
+ *
716
+ * @param args - {@link GetStorageAtParameters}
717
+ * @returns The value of the storage slot. {@link GetStorageAtReturnType}
718
+ *
719
+ * @example
720
+ * import { createPublicClient, http } from 'viem'
721
+ * import { mainnet } from 'viem/chains'
722
+ * import { getStorageAt } from 'viem/contract'
723
+ *
724
+ * const client = createPublicClient({
725
+ * chain: mainnet,
726
+ * transport: http(),
727
+ * })
728
+ * const code = await client.getStorageAt({
729
+ * address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2',
730
+ * slot: toHex(0),
731
+ * })
732
+ */
733
+ getStorageAt: (args: GetStorageAtParameters) => Promise<GetStorageAtReturnType>;
734
+ /**
735
+ * Returns information about a [Transaction](https://viem.sh/docs/glossary/terms.html#transaction) given a hash or block identifier.
736
+ *
737
+ * - Docs: https://viem.sh/docs/actions/public/getTransaction.html
738
+ * - Example: https://stackblitz.com/github/wagmi-dev/viem/tree/main/examples/transactions/fetching-transactions
739
+ * - JSON-RPC Methods: [`eth_getTransactionByHash`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getTransactionByHash)
740
+ *
741
+ * @param args - {@link GetTransactionParameters}
742
+ * @returns The transaction information. {@link GetTransactionReturnType}
743
+ *
744
+ * @example
745
+ * import { createPublicClient, http } from 'viem'
746
+ * import { mainnet } from 'viem/chains'
747
+ *
748
+ * const client = createPublicClient({
749
+ * chain: mainnet,
750
+ * transport: http(),
751
+ * })
752
+ * const transaction = await client.getTransaction({
753
+ * hash: '0x4ca7ee652d57678f26e887c149ab0735f41de37bcad58c9f6d3ed5824f15b74d',
754
+ * })
755
+ */
756
+ getTransaction: <TBlockTag extends BlockTag = 'latest'>(args: GetTransactionParameters<TBlockTag>) => Promise<GetTransactionReturnType<TChain, TBlockTag>>;
757
+ /**
758
+ * Returns the number of blocks passed (confirmations) since the transaction was processed on a block.
759
+ *
760
+ * - Docs: https://viem.sh/docs/actions/public/getTransactionConfirmations.html
761
+ * - Example: https://stackblitz.com/github/wagmi-dev/viem/tree/main/examples/transactions/fetching-transactions
762
+ * - JSON-RPC Methods: [`eth_getTransactionConfirmations`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getTransactionConfirmations)
763
+ *
764
+ * @param args - {@link GetTransactionConfirmationsParameters}
765
+ * @returns The number of blocks passed since the transaction was processed. If confirmations is 0, then the Transaction has not been confirmed & processed yet. {@link GetTransactionConfirmationsReturnType}
766
+ *
767
+ * @example
768
+ * import { createPublicClient, http } from 'viem'
769
+ * import { mainnet } from 'viem/chains'
770
+ *
771
+ * const client = createPublicClient({
772
+ * chain: mainnet,
773
+ * transport: http(),
774
+ * })
775
+ * const confirmations = await client.getTransactionConfirmations({
776
+ * hash: '0x4ca7ee652d57678f26e887c149ab0735f41de37bcad58c9f6d3ed5824f15b74d',
777
+ * })
778
+ */
779
+ getTransactionConfirmations: (args: GetTransactionConfirmationsParameters<TChain>) => Promise<GetTransactionConfirmationsReturnType>;
780
+ /**
781
+ * Returns the number of [Transactions](https://viem.sh/docs/glossary/terms.html#transaction) an Account has broadcast / sent.
782
+ *
783
+ * - Docs: https://viem.sh/docs/actions/public/getTransactionCount.html
784
+ * - JSON-RPC Methods: [`eth_getTransactionCount`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_gettransactioncount)
785
+ *
786
+ * @param args - {@link GetTransactionCountParameters}
787
+ * @returns The number of transactions an account has sent. {@link GetTransactionCountReturnType}
788
+ *
789
+ * @example
790
+ * import { createPublicClient, http } from 'viem'
791
+ * import { mainnet } from 'viem/chains'
792
+ *
793
+ * const client = createPublicClient({
794
+ * chain: mainnet,
795
+ * transport: http(),
796
+ * })
797
+ * const transactionCount = await client.getTransactionCount({
798
+ * address: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e',
799
+ * })
800
+ */
801
+ getTransactionCount: (args: GetTransactionCountParameters) => Promise<GetTransactionCountReturnType>;
802
+ /**
803
+ * Returns the [Transaction Receipt](https://viem.sh/docs/glossary/terms.html#transaction-receipt) given a [Transaction](https://viem.sh/docs/glossary/terms.html#transaction) hash.
804
+ *
805
+ * - Docs: https://viem.sh/docs/actions/public/getTransactionReceipt.html
806
+ * - Example: https://stackblitz.com/github/wagmi-dev/viem/tree/main/examples/transactions/fetching-transactions
807
+ * - JSON-RPC Methods: [`eth_getTransactionReceipt`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getTransactionReceipt)
808
+ *
809
+ * @param args - {@link GetTransactionReceiptParameters}
810
+ * @returns The transaction receipt. {@link GetTransactionReceiptReturnType}
811
+ *
812
+ * @example
813
+ * import { createPublicClient, http } from 'viem'
814
+ * import { mainnet } from 'viem/chains'
815
+ *
816
+ * const client = createPublicClient({
817
+ * chain: mainnet,
818
+ * transport: http(),
819
+ * })
820
+ * const transactionReceipt = await client.getTransactionReceipt({
821
+ * hash: '0x4ca7ee652d57678f26e887c149ab0735f41de37bcad58c9f6d3ed5824f15b74d',
822
+ * })
823
+ */
824
+ getTransactionReceipt: (args: GetTransactionReceiptParameters) => Promise<GetTransactionReceiptReturnType<TChain>>;
825
+ /**
826
+ * Similar to [`readContract`](https://viem.sh/docs/contract/readContract.html), but batches up multiple functions on a contract in a single RPC call via the [`multicall3` contract](https://github.com/mds1/multicall).
827
+ *
828
+ * - Docs: https://viem.sh/docs/contract/multicall.html
829
+ *
830
+ * @param args - {@link MulticallParameters}
831
+ * @returns An array of results with accompanying status. {@link MulticallReturnType}
832
+ *
833
+ * @example
834
+ * import { createPublicClient, http, parseAbi } from 'viem'
835
+ * import { mainnet } from 'viem/chains'
836
+ *
837
+ * const client = createPublicClient({
838
+ * chain: mainnet,
839
+ * transport: http(),
840
+ * })
841
+ * const abi = parseAbi([
842
+ * 'function balanceOf(address) view returns (uint256)',
843
+ * 'function totalSupply() view returns (uint256)',
844
+ * ])
845
+ * const result = await client.multicall({
846
+ * contracts: [
847
+ * {
848
+ * address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2',
849
+ * abi,
850
+ * functionName: 'balanceOf',
851
+ * args: ['0xA0Cf798816D4b9b9866b5330EEa46a18382f251e'],
852
+ * },
853
+ * {
854
+ * address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2',
855
+ * abi,
856
+ * functionName: 'totalSupply',
857
+ * },
858
+ * ],
859
+ * })
860
+ * // [{ result: 424122n, status: 'success' }, { result: 1000000n, status: 'success' }]
861
+ */
862
+ multicall: <TContracts extends ContractFunctionConfig[], TAllowFailure extends boolean = true>(args: MulticallParameters<TContracts, TAllowFailure>) => Promise<MulticallReturnType<TContracts, TAllowFailure>>;
863
+ /**
864
+ * Calls a read-only function on a contract, and returns the response.
865
+ *
866
+ * - Docs: https://viem.sh/docs/contract/readContract.html
867
+ * - Examples: https://stackblitz.com/github/wagmi-dev/viem/tree/main/examples/contracts/reading-contracts
868
+ *
869
+ * @remarks
870
+ * A "read-only" function (constant function) on a Solidity contract is denoted by a `view` or `pure` keyword. They can only read the state of the contract, and cannot make any changes to it. Since read-only methods do not change the state of the contract, they do not require any gas to be executed, and can be called by any user without the need to pay for gas.
871
+ *
872
+ * Internally, uses a [Public Client](https://viem.sh/docs/clients/public.html) to call the [`call` action](https://viem.sh/docs/actions/public/call.html) with [ABI-encoded `data`](https://viem.sh/docs/contract/encodeFunctionData.html).
873
+ *
874
+ * @param args - {@link ReadContractParameters}
875
+ * @returns The response from the contract. Type is inferred. {@link ReadContractReturnType}
876
+ *
877
+ * @example
878
+ * import { createPublicClient, http, parseAbi } from 'viem'
879
+ * import { mainnet } from 'viem/chains'
880
+ * import { readContract } from 'viem/contract'
881
+ *
882
+ * const client = createPublicClient({
883
+ * chain: mainnet,
884
+ * transport: http(),
885
+ * })
886
+ * const result = await client.readContract({
887
+ * address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2',
888
+ * abi: parseAbi(['function balanceOf(address) view returns (uint256)']),
889
+ * functionName: 'balanceOf',
890
+ * args: ['0xA0Cf798816D4b9b9866b5330EEa46a18382f251e'],
891
+ * })
892
+ * // 424122n
893
+ */
894
+ readContract: <const TAbi extends Abi | readonly unknown[], TFunctionName extends string>(args: ReadContractParameters<TAbi, TFunctionName>) => Promise<ReadContractReturnType<TAbi, TFunctionName>>;
895
+ /**
896
+ * Simulates/validates a contract interaction. This is useful for retrieving **return data** and **revert reasons** of contract write functions.
897
+ *
898
+ * - Docs: https://viem.sh/docs/contract/simulateContract.html
899
+ * - Examples: https://stackblitz.com/github/wagmi-dev/viem/tree/main/examples/contracts/writing-to-contracts
900
+ *
901
+ * @remarks
902
+ * This function does not require gas to execute and _**does not**_ change the state of the blockchain. It is almost identical to [`readContract`](https://viem.sh/docs/contract/readContract.html), but also supports contract write functions.
903
+ *
904
+ * Internally, uses a [Public Client](https://viem.sh/docs/clients/public.html) to call the [`call` action](https://viem.sh/docs/actions/public/call.html) with [ABI-encoded `data`](https://viem.sh/docs/contract/encodeFunctionData.html).
905
+ *
906
+ * @param args - {@link SimulateContractParameters}
907
+ * @returns The simulation result and write request. {@link SimulateContractReturnType}
908
+ *
909
+ * @example
910
+ * import { createPublicClient, http } from 'viem'
911
+ * import { mainnet } from 'viem/chains'
912
+ *
913
+ * const client = createPublicClient({
914
+ * chain: mainnet,
915
+ * transport: http(),
916
+ * })
917
+ * const result = await client.simulateContract({
918
+ * address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2',
919
+ * abi: parseAbi(['function mint(uint32) view returns (uint32)']),
920
+ * functionName: 'mint',
921
+ * args: ['69420'],
922
+ * account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e',
923
+ * })
924
+ */
925
+ simulateContract: <const TAbi extends Abi | readonly unknown[], TFunctionName extends string, TChainOverride extends Chain | undefined>(args: SimulateContractParameters<TAbi, TFunctionName, TChain, TChainOverride>) => Promise<SimulateContractReturnType<TAbi, TFunctionName, TChain, TChainOverride>>;
926
+ verifyMessage: (args: VerifyMessageParameters) => Promise<VerifyMessageReturnType>;
927
+ verifyTypedData: (args: VerifyTypedDataParameters) => Promise<VerifyTypedDataReturnType>;
928
+ /**
929
+ * Destroys a Filter that was created from one of the following Actions:
930
+ *
931
+ * - [`createBlockFilter`](https://viem.sh/docs/actions/public/createBlockFilter.html)
932
+ * - [`createEventFilter`](https://viem.sh/docs/actions/public/createEventFilter.html)
933
+ * - [`createPendingTransactionFilter`](https://viem.sh/docs/actions/public/createPendingTransactionFilter.html)
934
+ *
935
+ * - Docs: https://viem.sh/docs/actions/public/uninstallFilter.html
936
+ * - JSON-RPC Methods: [`eth_uninstallFilter`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_uninstallFilter)
937
+ *
938
+ * @param args - {@link UninstallFilterParameters}
939
+ * @returns A boolean indicating if the Filter was successfully uninstalled. {@link UninstallFilterReturnType}
940
+ *
941
+ * @example
942
+ * import { createPublicClient, http } from 'viem'
943
+ * import { mainnet } from 'viem/chains'
944
+ * import { createPendingTransactionFilter, uninstallFilter } from 'viem/public'
945
+ *
946
+ * const filter = await client.createPendingTransactionFilter()
947
+ * const uninstalled = await client.uninstallFilter({ filter })
948
+ * // true
949
+ */
950
+ uninstallFilter: (args: UninstallFilterParameters) => Promise<UninstallFilterReturnType>;
951
+ /**
952
+ * Waits for the [Transaction](https://viem.sh/docs/glossary/terms.html#transaction) to be included on a [Block](https://viem.sh/docs/glossary/terms.html#block) (one confirmation), and then returns the [Transaction Receipt](https://viem.sh/docs/glossary/terms.html#transaction-receipt). If the Transaction reverts, then the action will throw an error.
953
+ *
954
+ * - Docs: https://viem.sh/docs/actions/public/waitForTransactionReceipt.html
955
+ * - Example: https://stackblitz.com/github/wagmi-dev/viem/tree/main/examples/transactions/sending-transactions
956
+ * - JSON-RPC Methods:
957
+ * - Polls [`eth_getTransactionReceipt`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getTransactionReceipt) on each block until it has been processed.
958
+ * - If a Transaction has been replaced:
959
+ * - Calls [`eth_getBlockByNumber`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getblockbynumber) and extracts the transactions
960
+ * - Checks if one of the Transactions is a replacement
961
+ * - If so, calls [`eth_getTransactionReceipt`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getTransactionReceipt).
962
+ *
963
+ * @remarks
964
+ * The `waitForTransactionReceipt` action additionally supports Replacement detection (e.g. sped up Transactions).
965
+ *
966
+ * Transactions can be replaced when a user modifies their transaction in their wallet (to speed up or cancel). Transactions are replaced when they are sent from the same nonce.
967
+ *
968
+ * There are 3 types of Transaction Replacement reasons:
969
+ *
970
+ * - `repriced`: The gas price has been modified (e.g. different `maxFeePerGas`)
971
+ * - `cancelled`: The Transaction has been cancelled (e.g. `value === 0n`)
972
+ * - `replaced`: The Transaction has been replaced (e.g. different `value` or `data`)
973
+ *
974
+ * @param args - {@link WaitForTransactionReceiptParameters}
975
+ * @returns The transaction receipt. {@link WaitForTransactionReceiptReturnType}
976
+ *
977
+ * @example
978
+ * import { createPublicClient, http } from 'viem'
979
+ * import { mainnet } from 'viem/chains'
980
+ *
981
+ * const client = createPublicClient({
982
+ * chain: mainnet,
983
+ * transport: http(),
984
+ * })
985
+ * const transactionReceipt = await client.waitForTransactionReceipt({
986
+ * hash: '0x4ca7ee652d57678f26e887c149ab0735f41de37bcad58c9f6d3ed5824f15b74d',
987
+ * })
988
+ */
989
+ waitForTransactionReceipt: (args: WaitForTransactionReceiptParameters<TChain>) => Promise<WaitForTransactionReceiptReturnType<TChain>>;
990
+ /**
991
+ * Watches and returns incoming block numbers.
992
+ *
993
+ * - Docs: https://viem.sh/docs/actions/public/watchBlockNumber.html
994
+ * - Examples: https://stackblitz.com/github/wagmi-dev/viem/tree/main/examples/blocks/watching-blocks
995
+ * - JSON-RPC Methods:
996
+ * - When `poll: true`, calls [`eth_blockNumber`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_blocknumber) on a polling interval.
997
+ * - When `poll: false` & WebSocket Transport, uses a WebSocket subscription via [`eth_subscribe`](https://docs.alchemy.com/reference/eth-subscribe-polygon) and the `"newHeads"` event.
998
+ *
999
+ * @param args - {@link WatchBlockNumberParameters}
1000
+ * @returns A function that can be invoked to stop watching for new block numbers. {@link WatchBlockNumberReturnType}
1001
+ *
1002
+ * @example
1003
+ * import { createPublicClient, http } from 'viem'
1004
+ * import { mainnet } from 'viem/chains'
1005
+ *
1006
+ * const client = createPublicClient({
1007
+ * chain: mainnet,
1008
+ * transport: http(),
1009
+ * })
1010
+ * const unwatch = await client.watchBlockNumber({
1011
+ * onBlockNumber: (blockNumber) => console.log(blockNumber),
1012
+ * })
1013
+ */
1014
+ watchBlockNumber: (args: WatchBlockNumberParameters) => WatchBlockNumberReturnType;
1015
+ /**
1016
+ * Watches and returns information for incoming blocks.
1017
+ *
1018
+ * - Docs: https://viem.sh/docs/actions/public/watchBlocks.html
1019
+ * - Examples: https://stackblitz.com/github/wagmi-dev/viem/tree/main/examples/blocks/watching-blocks
1020
+ * - JSON-RPC Methods:
1021
+ * - When `poll: true`, calls [`eth_getBlockByNumber`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getBlockByNumber) on a polling interval.
1022
+ * - When `poll: false` & WebSocket Transport, uses a WebSocket subscription via [`eth_subscribe`](https://docs.alchemy.com/reference/eth-subscribe-polygon) and the `"newHeads"` event.
1023
+ *
1024
+ * @param args - {@link WatchBlocksParameters}
1025
+ * @returns A function that can be invoked to stop watching for new block numbers. {@link WatchBlocksReturnType}
1026
+ *
1027
+ * @example
1028
+ * import { createPublicClient, http } from 'viem'
1029
+ * import { mainnet } from 'viem/chains'
1030
+ *
1031
+ * const client = createPublicClient({
1032
+ * chain: mainnet,
1033
+ * transport: http(),
1034
+ * })
1035
+ * const unwatch = await client.watchBlocks({
1036
+ * onBlock: (block) => console.log(block),
1037
+ * })
1038
+ */
1039
+ watchBlocks: <TIncludeTransactions extends boolean = false, TBlockTag extends BlockTag = 'latest'>(args: WatchBlocksParameters<TTransport, TChain, TIncludeTransactions, TBlockTag>) => WatchBlocksReturnType;
1040
+ /**
1041
+ * Watches and returns emitted contract event logs.
1042
+ *
1043
+ * - Docs: https://viem.sh/docs/contract/watchContractEvent.html
1044
+ *
1045
+ * @remarks
1046
+ * This Action will batch up all the event logs found within the [`pollingInterval`](https://viem.sh/docs/contract/watchContractEvent.html#pollinginterval-optional), and invoke them via [`onLogs`](https://viem.sh/docs/contract/watchContractEvent.html#onLogs).
1047
+ *
1048
+ * `watchContractEvent` will attempt to create an [Event Filter](https://viem.sh/docs/contract/createContractEventFilter.html) and listen to changes to the Filter per polling interval, however, if the RPC Provider does not support Filters (e.g. `eth_newFilter`), then `watchContractEvent` will fall back to using [`getLogs`](https://viem.sh/docs/actions/public/getLogs.html) instead.
1049
+ *
1050
+ * @param args - {@link WatchContractEventParameters}
1051
+ * @returns A function that can be invoked to stop watching for new event logs. {@link WatchContractEventReturnType}
1052
+ *
1053
+ * @example
1054
+ * import { createPublicClient, http, parseAbi } from 'viem'
1055
+ * import { mainnet } from 'viem/chains'
1056
+ *
1057
+ * const client = createPublicClient({
1058
+ * chain: mainnet,
1059
+ * transport: http(),
1060
+ * })
1061
+ * const unwatch = client.watchContractEvent({
1062
+ * address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2',
1063
+ * abi: parseAbi(['event Transfer(address indexed from, address indexed to, uint256 value)']),
1064
+ * eventName: 'Transfer',
1065
+ * args: { from: '0xc961145a54C96E3aE9bAA048c4F4D6b04C13916b' },
1066
+ * onLogs: (logs) => console.log(logs),
1067
+ * })
1068
+ */
1069
+ watchContractEvent: <const TAbi extends Abi | readonly unknown[], TEventName extends string, TStrict extends boolean | undefined = undefined>(args: WatchContractEventParameters<TAbi, TEventName, TStrict>) => WatchContractEventReturnType;
1070
+ /**
1071
+ * Watches and returns emitted [Event Logs](https://viem.sh/docs/glossary/terms.html#event-log).
1072
+ *
1073
+ * - Docs: https://viem.sh/docs/actions/public/watchEvent.html
1074
+ * - JSON-RPC Methods:
1075
+ * - **RPC Provider supports `eth_newFilter`:**
1076
+ * - Calls [`eth_newFilter`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_newfilter) to create a filter (called on initialize).
1077
+ * - On a polling interval, it will call [`eth_getFilterChanges`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getfilterchanges).
1078
+ * - **RPC Provider does not support `eth_newFilter`:**
1079
+ * - Calls [`eth_getLogs`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getlogs) for each block between the polling interval.
1080
+ *
1081
+ * @remarks
1082
+ * This Action will batch up all the Event Logs found within the [`pollingInterval`](https://viem.sh/docs/actions/public/watchEvent.html#pollinginterval-optional), and invoke them via [`onLogs`](https://viem.sh/docs/actions/public/watchEvent.html#onLogs).
1083
+ *
1084
+ * `watchEvent` will attempt to create an [Event Filter](https://viem.sh/docs/actions/public/createEventFilter.html) and listen to changes to the Filter per polling interval, however, if the RPC Provider does not support Filters (e.g. `eth_newFilter`), then `watchEvent` will fall back to using [`getLogs`](https://viem.sh/docs/actions/public/getLogs.html) instead.
1085
+ *
1086
+ * @param args - {@link WatchEventParameters}
1087
+ * @returns A function that can be invoked to stop watching for new Event Logs. {@link WatchEventReturnType}
1088
+ *
1089
+ * @example
1090
+ * import { createPublicClient, http } from 'viem'
1091
+ * import { mainnet } from 'viem/chains'
1092
+ *
1093
+ * const client = createPublicClient({
1094
+ * chain: mainnet,
1095
+ * transport: http(),
1096
+ * })
1097
+ * const unwatch = client.watchEvent({
1098
+ * onLogs: (logs) => console.log(logs),
1099
+ * })
1100
+ */
1101
+ watchEvent: <const TAbiEvent extends AbiEvent | undefined = undefined, const TAbiEvents extends readonly AbiEvent[] | readonly unknown[] | undefined = TAbiEvent extends AbiEvent ? [TAbiEvent] : undefined, TStrict extends boolean | undefined = undefined>(args: WatchEventParameters<TAbiEvent, TAbiEvents, TStrict>) => WatchEventReturnType;
1102
+ /**
1103
+ * Watches and returns pending transaction hashes.
1104
+ *
1105
+ * - Docs: https://viem.sh/docs/actions/public/watchPendingTransactions.html
1106
+ * - JSON-RPC Methods:
1107
+ * - When `poll: true`
1108
+ * - Calls [`eth_newPendingTransactionFilter`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_newpendingtransactionfilter) to initialize the filter.
1109
+ * - Calls [`eth_getFilterChanges`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getFilterChanges) on a polling interval.
1110
+ * - When `poll: false` & WebSocket Transport, uses a WebSocket subscription via [`eth_subscribe`](https://docs.alchemy.com/reference/eth-subscribe-polygon) and the `"newPendingTransactions"` event.
1111
+ *
1112
+ * @remarks
1113
+ * This Action will batch up all the pending transactions found within the [`pollingInterval`](https://viem.sh/docs/actions/public/watchPendingTransactions.html#pollinginterval-optional), and invoke them via [`onTransactions`](https://viem.sh/docs/actions/public/watchPendingTransactions.html#ontransactions).
1114
+ *
1115
+ * @param args - {@link WatchPendingTransactionsParameters}
1116
+ * @returns A function that can be invoked to stop watching for new pending transaction hashes. {@link WatchPendingTransactionsReturnType}
1117
+ *
1118
+ * @example
1119
+ * import { createPublicClient, http } from 'viem'
1120
+ * import { mainnet } from 'viem/chains'
1121
+ *
1122
+ * const client = createPublicClient({
1123
+ * chain: mainnet,
1124
+ * transport: http(),
1125
+ * })
1126
+ * const unwatch = await client.watchPendingTransactions({
1127
+ * onTransactions: (hashes) => console.log(hashes),
1128
+ * })
1129
+ */
1130
+ watchPendingTransactions: (args: WatchPendingTransactionsParameters<TTransport>) => WatchPendingTransactionsReturnType;
1131
+ };
1132
+ export declare function publicActions<TTransport extends Transport = Transport, TChain extends Chain | undefined = Chain | undefined, TAccount extends Account | undefined = Account | undefined>(client: Client<TTransport, TChain, TAccount>): PublicActions<TTransport, TChain, TAccount>;
1133
+ //# sourceMappingURL=public.d.ts.map