viem 1.6.4 → 1.6.6

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