viem 1.6.6 → 1.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (651) hide show
  1. package/dist/cjs/actions/public/estimateFeesPerGas.js +59 -0
  2. package/dist/cjs/actions/public/estimateFeesPerGas.js.map +1 -0
  3. package/dist/cjs/actions/public/estimateMaxPriorityFeePerGas.js +44 -0
  4. package/dist/cjs/actions/public/estimateMaxPriorityFeePerGas.js.map +1 -0
  5. package/dist/cjs/actions/public/verifyHash.js.map +1 -1
  6. package/dist/cjs/actions/public/verifyMessage.js.map +1 -1
  7. package/dist/cjs/actions/public/verifyTypedData.js.map +1 -1
  8. package/dist/cjs/actions/wallet/deployContract.js.map +1 -1
  9. package/dist/cjs/actions/wallet/sendTransaction.js.map +1 -1
  10. package/dist/cjs/actions/wallet/writeContract.js.map +1 -1
  11. package/dist/cjs/clients/createTestClient.js.map +1 -1
  12. package/dist/cjs/clients/decorators/public.js +4 -0
  13. package/dist/cjs/clients/decorators/public.js.map +1 -1
  14. package/dist/cjs/errors/fee.js +42 -0
  15. package/dist/cjs/errors/fee.js.map +1 -0
  16. package/dist/cjs/errors/version.js +1 -1
  17. package/dist/cjs/index.js +8 -4
  18. package/dist/cjs/index.js.map +1 -1
  19. package/dist/cjs/public.js +5 -1
  20. package/dist/cjs/public.js.map +1 -1
  21. package/dist/cjs/utils/transaction/prepareRequest.js +26 -29
  22. package/dist/cjs/utils/transaction/prepareRequest.js.map +1 -1
  23. package/dist/esm/actions/public/estimateFeesPerGas.js +77 -0
  24. package/dist/esm/actions/public/estimateFeesPerGas.js.map +1 -0
  25. package/dist/esm/actions/public/estimateMaxPriorityFeePerGas.js +64 -0
  26. package/dist/esm/actions/public/estimateMaxPriorityFeePerGas.js.map +1 -0
  27. package/dist/esm/actions/public/verifyHash.js.map +1 -1
  28. package/dist/esm/actions/public/verifyMessage.js.map +1 -1
  29. package/dist/esm/actions/public/verifyTypedData.js.map +1 -1
  30. package/dist/esm/actions/wallet/deployContract.js.map +1 -1
  31. package/dist/esm/actions/wallet/sendTransaction.js.map +1 -1
  32. package/dist/esm/actions/wallet/writeContract.js.map +1 -1
  33. package/dist/esm/clients/createTestClient.js.map +1 -1
  34. package/dist/esm/clients/decorators/public.js +4 -0
  35. package/dist/esm/clients/decorators/public.js.map +1 -1
  36. package/dist/esm/errors/fee.js +36 -0
  37. package/dist/esm/errors/fee.js.map +1 -0
  38. package/dist/esm/errors/version.js +1 -1
  39. package/dist/esm/index.js +1 -0
  40. package/dist/esm/index.js.map +1 -1
  41. package/dist/esm/public.js +2 -0
  42. package/dist/esm/public.js.map +1 -1
  43. package/dist/esm/utils/transaction/prepareRequest.js +27 -31
  44. package/dist/esm/utils/transaction/prepareRequest.js.map +1 -1
  45. package/dist/types/abi.d.ts +6 -0
  46. package/dist/types/abi.d.ts.map +1 -0
  47. package/dist/types/accounts/generateMnemonic.d.ts +9 -0
  48. package/dist/types/accounts/generateMnemonic.d.ts.map +1 -0
  49. package/dist/types/accounts/generatePrivateKey.d.ts +8 -0
  50. package/dist/types/accounts/generatePrivateKey.d.ts.map +1 -0
  51. package/dist/types/accounts/hdKeyToAccount.d.ts +9 -0
  52. package/dist/types/accounts/hdKeyToAccount.d.ts.map +1 -0
  53. package/dist/types/accounts/index.d.ts +27 -0
  54. package/dist/types/accounts/index.d.ts.map +1 -0
  55. package/dist/types/accounts/mnemonicToAccount.d.ts +8 -0
  56. package/dist/types/accounts/mnemonicToAccount.d.ts.map +1 -0
  57. package/dist/types/accounts/privateKeyToAccount.d.ts +9 -0
  58. package/dist/types/accounts/privateKeyToAccount.d.ts.map +1 -0
  59. package/dist/types/accounts/toAccount.d.ts +11 -0
  60. package/dist/types/accounts/toAccount.d.ts.map +1 -0
  61. package/dist/types/accounts/types.d.ts +52 -0
  62. package/dist/types/accounts/types.d.ts.map +1 -0
  63. package/dist/types/accounts/utils/parseAccount.d.ts +4 -0
  64. package/dist/types/accounts/utils/parseAccount.d.ts.map +1 -0
  65. package/dist/types/accounts/utils/privateKeyToAddress.d.ts +11 -0
  66. package/dist/types/accounts/utils/privateKeyToAddress.d.ts.map +1 -0
  67. package/dist/types/accounts/utils/publicKeyToAddress.d.ts +11 -0
  68. package/dist/types/accounts/utils/publicKeyToAddress.d.ts.map +1 -0
  69. package/dist/types/accounts/utils/sign.d.ts +16 -0
  70. package/dist/types/accounts/utils/sign.d.ts.map +1 -0
  71. package/dist/types/accounts/utils/signMessage.d.ts +16 -0
  72. package/dist/types/accounts/utils/signMessage.d.ts.map +1 -0
  73. package/dist/types/accounts/utils/signTransaction.d.ts +12 -0
  74. package/dist/types/accounts/utils/signTransaction.d.ts.map +1 -0
  75. package/dist/types/accounts/utils/signTypedData.d.ts +20 -0
  76. package/dist/types/accounts/utils/signTypedData.d.ts.map +1 -0
  77. package/dist/types/accounts/wordlists/czech.d.ts +2 -0
  78. package/dist/types/accounts/wordlists/czech.d.ts.map +1 -0
  79. package/dist/types/accounts/wordlists/english.d.ts +2 -0
  80. package/dist/types/accounts/wordlists/english.d.ts.map +1 -0
  81. package/dist/types/accounts/wordlists/french.d.ts +2 -0
  82. package/dist/types/accounts/wordlists/french.d.ts.map +1 -0
  83. package/dist/types/accounts/wordlists/italian.d.ts +2 -0
  84. package/dist/types/accounts/wordlists/italian.d.ts.map +1 -0
  85. package/dist/types/accounts/wordlists/japanese.d.ts +2 -0
  86. package/dist/types/accounts/wordlists/japanese.d.ts.map +1 -0
  87. package/dist/types/accounts/wordlists/korean.d.ts +2 -0
  88. package/dist/types/accounts/wordlists/korean.d.ts.map +1 -0
  89. package/dist/types/accounts/wordlists/simplifiedChinese.d.ts +2 -0
  90. package/dist/types/accounts/wordlists/simplifiedChinese.d.ts.map +1 -0
  91. package/dist/types/accounts/wordlists/spanish.d.ts +2 -0
  92. package/dist/types/accounts/wordlists/spanish.d.ts.map +1 -0
  93. package/dist/types/accounts/wordlists/traditionalChinese.d.ts +2 -0
  94. package/dist/types/accounts/wordlists/traditionalChinese.d.ts.map +1 -0
  95. package/dist/types/actions/ens/getEnsAddress.d.ts +45 -0
  96. package/dist/types/actions/ens/getEnsAddress.d.ts.map +1 -0
  97. package/dist/types/actions/ens/getEnsAvatar.d.ts +41 -0
  98. package/dist/types/actions/ens/getEnsAvatar.d.ts.map +1 -0
  99. package/dist/types/actions/ens/getEnsName.d.ts +41 -0
  100. package/dist/types/actions/ens/getEnsName.d.ts.map +1 -0
  101. package/dist/types/actions/ens/getEnsResolver.d.ts +43 -0
  102. package/dist/types/actions/ens/getEnsResolver.d.ts.map +1 -0
  103. package/dist/types/actions/ens/getEnsText.d.ts +46 -0
  104. package/dist/types/actions/ens/getEnsText.d.ts.map +1 -0
  105. package/dist/types/actions/getContract.d.ts +314 -0
  106. package/dist/types/actions/getContract.d.ts.map +1 -0
  107. package/dist/types/actions/index.d.ts +80 -0
  108. package/dist/types/actions/index.d.ts.map +1 -0
  109. package/dist/types/actions/public/call.d.ts +56 -0
  110. package/dist/types/actions/public/call.d.ts.map +1 -0
  111. package/dist/types/actions/public/createBlockFilter.d.ts +28 -0
  112. package/dist/types/actions/public/createBlockFilter.d.ts.map +1 -0
  113. package/dist/types/actions/public/createContractEventFilter.d.ts +50 -0
  114. package/dist/types/actions/public/createContractEventFilter.d.ts.map +1 -0
  115. package/dist/types/actions/public/createEventFilter.d.ts +76 -0
  116. package/dist/types/actions/public/createEventFilter.d.ts.map +1 -0
  117. package/dist/types/actions/public/createPendingTransactionFilter.d.ts +28 -0
  118. package/dist/types/actions/public/createPendingTransactionFilter.d.ts.map +1 -0
  119. package/dist/types/actions/public/estimateContractGas.d.ts +39 -0
  120. package/dist/types/actions/public/estimateContractGas.d.ts.map +1 -0
  121. package/dist/types/actions/public/estimateFeesPerGas.d.ts +48 -0
  122. package/dist/types/actions/public/estimateFeesPerGas.d.ts.map +1 -0
  123. package/dist/types/actions/public/estimateGas.d.ts +49 -0
  124. package/dist/types/actions/public/estimateGas.d.ts.map +1 -0
  125. package/dist/types/actions/public/estimateMaxPriorityFeePerGas.d.ts +35 -0
  126. package/dist/types/actions/public/estimateMaxPriorityFeePerGas.d.ts.map +1 -0
  127. package/dist/types/actions/public/getBalance.d.ts +55 -0
  128. package/dist/types/actions/public/getBalance.d.ts.map +1 -0
  129. package/dist/types/actions/public/getBlock.d.ts +56 -0
  130. package/dist/types/actions/public/getBlock.d.ts.map +1 -0
  131. package/dist/types/actions/public/getBlockNumber.d.ts +57 -0
  132. package/dist/types/actions/public/getBlockNumber.d.ts.map +1 -0
  133. package/dist/types/actions/public/getBlockTransactionCount.d.ts +47 -0
  134. package/dist/types/actions/public/getBlockTransactionCount.d.ts.map +1 -0
  135. package/dist/types/actions/public/getBytecode.d.ts +41 -0
  136. package/dist/types/actions/public/getBytecode.d.ts.map +1 -0
  137. package/dist/types/actions/public/getChainId.d.ts +28 -0
  138. package/dist/types/actions/public/getChainId.d.ts.map +1 -0
  139. package/dist/types/actions/public/getFeeHistory.d.ts +53 -0
  140. package/dist/types/actions/public/getFeeHistory.d.ts.map +1 -0
  141. package/dist/types/actions/public/getFilterChanges.d.ts +96 -0
  142. package/dist/types/actions/public/getFilterChanges.d.ts.map +1 -0
  143. package/dist/types/actions/public/getFilterLogs.d.ts +40 -0
  144. package/dist/types/actions/public/getFilterLogs.d.ts.map +1 -0
  145. package/dist/types/actions/public/getGasPrice.d.ts +27 -0
  146. package/dist/types/actions/public/getGasPrice.d.ts.map +1 -0
  147. package/dist/types/actions/public/getLogs.d.ts +71 -0
  148. package/dist/types/actions/public/getLogs.d.ts.map +1 -0
  149. package/dist/types/actions/public/getStorageAt.d.ts +43 -0
  150. package/dist/types/actions/public/getStorageAt.d.ts.map +1 -0
  151. package/dist/types/actions/public/getTransaction.d.ts +65 -0
  152. package/dist/types/actions/public/getTransaction.d.ts.map +1 -0
  153. package/dist/types/actions/public/getTransactionConfirmations.d.ts +41 -0
  154. package/dist/types/actions/public/getTransactionConfirmations.d.ts.map +1 -0
  155. package/dist/types/actions/public/getTransactionCount.d.ts +44 -0
  156. package/dist/types/actions/public/getTransactionCount.d.ts.map +1 -0
  157. package/dist/types/actions/public/getTransactionReceipt.d.ts +36 -0
  158. package/dist/types/actions/public/getTransactionReceipt.d.ts.map +1 -0
  159. package/dist/types/actions/public/multicall.d.ts +56 -0
  160. package/dist/types/actions/public/multicall.d.ts.map +1 -0
  161. package/dist/types/actions/public/readContract.d.ts +41 -0
  162. package/dist/types/actions/public/readContract.d.ts.map +1 -0
  163. package/dist/types/actions/public/simulateContract.d.ts +54 -0
  164. package/dist/types/actions/public/simulateContract.d.ts.map +1 -0
  165. package/dist/types/actions/public/uninstallFilter.d.ts +34 -0
  166. package/dist/types/actions/public/uninstallFilter.d.ts.map +1 -0
  167. package/dist/types/actions/public/verifyHash.d.ts +24 -0
  168. package/dist/types/actions/public/verifyHash.d.ts.map +1 -0
  169. package/dist/types/actions/public/verifyMessage.d.ts +28 -0
  170. package/dist/types/actions/public/verifyMessage.d.ts.map +1 -0
  171. package/dist/types/actions/public/verifyTypedData.d.ts +27 -0
  172. package/dist/types/actions/public/verifyTypedData.d.ts.map +1 -0
  173. package/dist/types/actions/public/waitForTransactionReceipt.d.ts +72 -0
  174. package/dist/types/actions/public/waitForTransactionReceipt.d.ts.map +1 -0
  175. package/dist/types/actions/public/watchBlockNumber.d.ts +59 -0
  176. package/dist/types/actions/public/watchBlockNumber.d.ts.map +1 -0
  177. package/dist/types/actions/public/watchBlocks.d.ts +67 -0
  178. package/dist/types/actions/public/watchBlocks.d.ts.map +1 -0
  179. package/dist/types/actions/public/watchContractEvent.d.ts +89 -0
  180. package/dist/types/actions/public/watchContractEvent.d.ts.map +1 -0
  181. package/dist/types/actions/public/watchEvent.d.ts +104 -0
  182. package/dist/types/actions/public/watchEvent.d.ts.map +1 -0
  183. package/dist/types/actions/public/watchPendingTransactions.d.ts +74 -0
  184. package/dist/types/actions/public/watchPendingTransactions.d.ts.map +1 -0
  185. package/dist/types/actions/test/dropTransaction.d.ts +33 -0
  186. package/dist/types/actions/test/dropTransaction.d.ts.map +1 -0
  187. package/dist/types/actions/test/getAutomine.d.ts +27 -0
  188. package/dist/types/actions/test/getAutomine.d.ts.map +1 -0
  189. package/dist/types/actions/test/getTxpoolContent.d.ts +34 -0
  190. package/dist/types/actions/test/getTxpoolContent.d.ts.map +1 -0
  191. package/dist/types/actions/test/getTxpoolStatus.d.ts +30 -0
  192. package/dist/types/actions/test/getTxpoolStatus.d.ts.map +1 -0
  193. package/dist/types/actions/test/impersonateAccount.d.ts +33 -0
  194. package/dist/types/actions/test/impersonateAccount.d.ts.map +1 -0
  195. package/dist/types/actions/test/increaseTime.d.ts +32 -0
  196. package/dist/types/actions/test/increaseTime.d.ts.map +1 -0
  197. package/dist/types/actions/test/inspectTxpool.d.ts +31 -0
  198. package/dist/types/actions/test/inspectTxpool.d.ts.map +1 -0
  199. package/dist/types/actions/test/mine.d.ts +32 -0
  200. package/dist/types/actions/test/mine.d.ts.map +1 -0
  201. package/dist/types/actions/test/removeBlockTimestampInterval.d.ts +25 -0
  202. package/dist/types/actions/test/removeBlockTimestampInterval.d.ts.map +1 -0
  203. package/dist/types/actions/test/reset.d.ts +32 -0
  204. package/dist/types/actions/test/reset.d.ts.map +1 -0
  205. package/dist/types/actions/test/revert.d.ts +31 -0
  206. package/dist/types/actions/test/revert.d.ts.map +1 -0
  207. package/dist/types/actions/test/sendUnsignedTransaction.d.ts +35 -0
  208. package/dist/types/actions/test/sendUnsignedTransaction.d.ts.map +1 -0
  209. package/dist/types/actions/test/setAutomine.d.ts +25 -0
  210. package/dist/types/actions/test/setAutomine.d.ts.map +1 -0
  211. package/dist/types/actions/test/setBalance.d.ts +36 -0
  212. package/dist/types/actions/test/setBalance.d.ts.map +1 -0
  213. package/dist/types/actions/test/setBlockGasLimit.d.ts +30 -0
  214. package/dist/types/actions/test/setBlockGasLimit.d.ts.map +1 -0
  215. package/dist/types/actions/test/setBlockTimestampInterval.d.ts +30 -0
  216. package/dist/types/actions/test/setBlockTimestampInterval.d.ts.map +1 -0
  217. package/dist/types/actions/test/setCode.d.ts +37 -0
  218. package/dist/types/actions/test/setCode.d.ts.map +1 -0
  219. package/dist/types/actions/test/setCoinbase.d.ts +33 -0
  220. package/dist/types/actions/test/setCoinbase.d.ts.map +1 -0
  221. package/dist/types/actions/test/setIntervalMining.d.ts +30 -0
  222. package/dist/types/actions/test/setIntervalMining.d.ts.map +1 -0
  223. package/dist/types/actions/test/setLoggingEnabled.d.ts +25 -0
  224. package/dist/types/actions/test/setLoggingEnabled.d.ts.map +1 -0
  225. package/dist/types/actions/test/setMinGasPrice.d.ts +34 -0
  226. package/dist/types/actions/test/setMinGasPrice.d.ts.map +1 -0
  227. package/dist/types/actions/test/setNextBlockBaseFeePerGas.d.ts +32 -0
  228. package/dist/types/actions/test/setNextBlockBaseFeePerGas.d.ts.map +1 -0
  229. package/dist/types/actions/test/setNextBlockTimestamp.d.ts +30 -0
  230. package/dist/types/actions/test/setNextBlockTimestamp.d.ts.map +1 -0
  231. package/dist/types/actions/test/setNonce.d.ts +36 -0
  232. package/dist/types/actions/test/setNonce.d.ts.map +1 -0
  233. package/dist/types/actions/test/setRpcUrl.d.ts +26 -0
  234. package/dist/types/actions/test/setRpcUrl.d.ts.map +1 -0
  235. package/dist/types/actions/test/setStorageAt.d.ts +40 -0
  236. package/dist/types/actions/test/setStorageAt.d.ts.map +1 -0
  237. package/dist/types/actions/test/snapshot.d.ts +25 -0
  238. package/dist/types/actions/test/snapshot.d.ts.map +1 -0
  239. package/dist/types/actions/test/stopImpersonatingAccount.d.ts +33 -0
  240. package/dist/types/actions/test/stopImpersonatingAccount.d.ts.map +1 -0
  241. package/dist/types/actions/wallet/addChain.d.ts +29 -0
  242. package/dist/types/actions/wallet/addChain.d.ts.map +1 -0
  243. package/dist/types/actions/wallet/deployContract.d.ts +44 -0
  244. package/dist/types/actions/wallet/deployContract.d.ts.map +1 -0
  245. package/dist/types/actions/wallet/getAddresses.d.ts +28 -0
  246. package/dist/types/actions/wallet/getAddresses.d.ts.map +1 -0
  247. package/dist/types/actions/wallet/getPermissions.d.ts +28 -0
  248. package/dist/types/actions/wallet/getPermissions.d.ts.map +1 -0
  249. package/dist/types/actions/wallet/requestAddresses.d.ts +32 -0
  250. package/dist/types/actions/wallet/requestAddresses.d.ts.map +1 -0
  251. package/dist/types/actions/wallet/requestPermissions.d.ts +37 -0
  252. package/dist/types/actions/wallet/requestPermissions.d.ts.map +1 -0
  253. package/dist/types/actions/wallet/sendTransaction.d.ts +58 -0
  254. package/dist/types/actions/wallet/sendTransaction.d.ts.map +1 -0
  255. package/dist/types/actions/wallet/signMessage.d.ts +58 -0
  256. package/dist/types/actions/wallet/signMessage.d.ts.map +1 -0
  257. package/dist/types/actions/wallet/signTypedData.d.ts +114 -0
  258. package/dist/types/actions/wallet/signTypedData.d.ts.map +1 -0
  259. package/dist/types/actions/wallet/switchChain.d.ts +30 -0
  260. package/dist/types/actions/wallet/switchChain.d.ts.map +1 -0
  261. package/dist/types/actions/wallet/watchAsset.d.ts +37 -0
  262. package/dist/types/actions/wallet/watchAsset.d.ts.map +1 -0
  263. package/dist/types/actions/wallet/writeContract.d.ts +69 -0
  264. package/dist/types/actions/wallet/writeContract.d.ts.map +1 -0
  265. package/dist/types/chains/celo/formatters.d.ts +195 -0
  266. package/dist/types/chains/celo/formatters.d.ts.map +1 -0
  267. package/dist/types/chains/celo/parsers.d.ts +6 -0
  268. package/dist/types/chains/celo/parsers.d.ts.map +1 -0
  269. package/dist/types/chains/celo/serializers.d.ts +9 -0
  270. package/dist/types/chains/celo/serializers.d.ts.map +1 -0
  271. package/dist/types/chains/celo/types.d.ts +74 -0
  272. package/dist/types/chains/celo/types.d.ts.map +1 -0
  273. package/dist/types/chains/index.d.ts +5329 -0
  274. package/dist/types/chains/index.d.ts.map +1 -0
  275. package/dist/types/chains/optimism/fees.d.ts +4 -0
  276. package/dist/types/chains/optimism/fees.d.ts.map +1 -0
  277. package/dist/types/chains/optimism/formatters.d.ts +299 -0
  278. package/dist/types/chains/optimism/formatters.d.ts.map +1 -0
  279. package/dist/types/chains/optimism/types.d.ts +53 -0
  280. package/dist/types/chains/optimism/types.d.ts.map +1 -0
  281. package/dist/types/chains/utils.d.ts +7 -0
  282. package/dist/types/chains/utils.d.ts.map +1 -0
  283. package/dist/types/clients/createClient.d.ts +79 -0
  284. package/dist/types/clients/createClient.d.ts.map +1 -0
  285. package/dist/types/clients/createPublicClient.d.ts +29 -0
  286. package/dist/types/clients/createPublicClient.d.ts.map +1 -0
  287. package/dist/types/clients/createTestClient.d.ts +43 -0
  288. package/dist/types/clients/createTestClient.d.ts.map +1 -0
  289. package/dist/types/clients/createWalletClient.d.ts +49 -0
  290. package/dist/types/clients/createWalletClient.d.ts.map +1 -0
  291. package/dist/types/clients/decorators/public.d.ts +1133 -0
  292. package/dist/types/clients/decorators/public.d.ts.map +1 -0
  293. package/dist/types/clients/decorators/test.d.ts +599 -0
  294. package/dist/types/clients/decorators/test.d.ts.map +1 -0
  295. package/dist/types/clients/decorators/wallet.d.ts +449 -0
  296. package/dist/types/clients/decorators/wallet.d.ts.map +1 -0
  297. package/dist/types/clients/transports/createTransport.d.ts +34 -0
  298. package/dist/types/clients/transports/createTransport.d.ts.map +1 -0
  299. package/dist/types/clients/transports/custom.d.ts +21 -0
  300. package/dist/types/clients/transports/custom.d.ts.map +1 -0
  301. package/dist/types/clients/transports/fallback.d.ts +75 -0
  302. package/dist/types/clients/transports/fallback.d.ts.map +1 -0
  303. package/dist/types/clients/transports/http.d.ts +40 -0
  304. package/dist/types/clients/transports/http.d.ts.map +1 -0
  305. package/dist/types/clients/transports/webSocket.d.ts +46 -0
  306. package/dist/types/clients/transports/webSocket.d.ts.map +1 -0
  307. package/dist/types/constants/abis.d.ts +165 -0
  308. package/dist/types/constants/abis.d.ts.map +1 -0
  309. package/dist/types/constants/address.d.ts +2 -0
  310. package/dist/types/constants/address.d.ts.map +1 -0
  311. package/dist/types/constants/contract.d.ts +2 -0
  312. package/dist/types/constants/contract.d.ts.map +1 -0
  313. package/dist/types/constants/contracts.d.ts +2 -0
  314. package/dist/types/constants/contracts.d.ts.map +1 -0
  315. package/dist/types/constants/number.d.ts +97 -0
  316. package/dist/types/constants/number.d.ts.map +1 -0
  317. package/dist/types/constants/solidity.d.ts +15 -0
  318. package/dist/types/constants/solidity.d.ts.map +1 -0
  319. package/dist/types/constants/unit.d.ts +13 -0
  320. package/dist/types/constants/unit.d.ts.map +1 -0
  321. package/dist/types/contract.d.ts +30 -0
  322. package/dist/types/contract.d.ts.map +1 -0
  323. package/dist/types/ens.d.ts +9 -0
  324. package/dist/types/ens.d.ts.map +1 -0
  325. package/dist/types/errors/abi.d.ts +169 -0
  326. package/dist/types/errors/abi.d.ts.map +1 -0
  327. package/dist/types/errors/account.d.ts +8 -0
  328. package/dist/types/errors/account.d.ts.map +1 -0
  329. package/dist/types/errors/address.d.ts +8 -0
  330. package/dist/types/errors/address.d.ts.map +1 -0
  331. package/dist/types/errors/base.d.ts +24 -0
  332. package/dist/types/errors/base.d.ts.map +1 -0
  333. package/dist/types/errors/block.d.ts +10 -0
  334. package/dist/types/errors/block.d.ts.map +1 -0
  335. package/dist/types/errors/ccip.d.ts +29 -0
  336. package/dist/types/errors/ccip.d.ts.map +1 -0
  337. package/dist/types/errors/chain.d.ts +35 -0
  338. package/dist/types/errors/chain.d.ts.map +1 -0
  339. package/dist/types/errors/contract.d.ts +64 -0
  340. package/dist/types/errors/contract.d.ts.map +1 -0
  341. package/dist/types/errors/data.d.ts +18 -0
  342. package/dist/types/errors/data.d.ts.map +1 -0
  343. package/dist/types/errors/encoding.d.ts +53 -0
  344. package/dist/types/errors/encoding.d.ts.map +1 -0
  345. package/dist/types/errors/ens.d.ts +26 -0
  346. package/dist/types/errors/ens.d.ts.map +1 -0
  347. package/dist/types/errors/estimateGas.d.ts +14 -0
  348. package/dist/types/errors/estimateGas.d.ts.map +1 -0
  349. package/dist/types/errors/fee.d.ts +16 -0
  350. package/dist/types/errors/fee.d.ts.map +1 -0
  351. package/dist/types/errors/log.d.ts +6 -0
  352. package/dist/types/errors/log.d.ts.map +1 -0
  353. package/dist/types/errors/node.d.ts +105 -0
  354. package/dist/types/errors/node.d.ts.map +1 -0
  355. package/dist/types/errors/request.d.ts +61 -0
  356. package/dist/types/errors/request.d.ts.map +1 -0
  357. package/dist/types/errors/rpc.d.ts +221 -0
  358. package/dist/types/errors/rpc.d.ts.map +1 -0
  359. package/dist/types/errors/transaction.d.ts +79 -0
  360. package/dist/types/errors/transaction.d.ts.map +1 -0
  361. package/dist/types/errors/transport.d.ts +5 -0
  362. package/dist/types/errors/transport.d.ts.map +1 -0
  363. package/dist/types/errors/utils.d.ts +5 -0
  364. package/dist/types/errors/utils.d.ts.map +1 -0
  365. package/dist/types/errors/version.d.ts +2 -0
  366. package/dist/types/errors/version.d.ts.map +1 -0
  367. package/dist/types/index.d.ts +215 -0
  368. package/dist/types/index.d.ts.map +1 -0
  369. package/dist/types/public.d.ts +33 -0
  370. package/dist/types/public.d.ts.map +1 -0
  371. package/dist/types/test.d.ts +29 -0
  372. package/dist/types/test.d.ts.map +1 -0
  373. package/dist/types/types/account.d.ts +12 -0
  374. package/dist/types/types/account.d.ts.map +1 -0
  375. package/dist/types/types/block.d.ts +62 -0
  376. package/dist/types/types/block.d.ts.map +1 -0
  377. package/dist/types/types/chain.d.ts +115 -0
  378. package/dist/types/types/chain.d.ts.map +1 -0
  379. package/dist/types/types/contract.d.ts +138 -0
  380. package/dist/types/types/contract.d.ts.map +1 -0
  381. package/dist/types/types/eip1193.d.ts +1228 -0
  382. package/dist/types/types/eip1193.d.ts.map +1 -0
  383. package/dist/types/types/ens.d.ts +5 -0
  384. package/dist/types/types/ens.d.ts.map +1 -0
  385. package/dist/types/types/fee.d.ts +30 -0
  386. package/dist/types/types/fee.d.ts.map +1 -0
  387. package/dist/types/types/filter.d.ts +40 -0
  388. package/dist/types/types/filter.d.ts.map +1 -0
  389. package/dist/types/types/log.d.ts +55 -0
  390. package/dist/types/types/log.d.ts.map +1 -0
  391. package/dist/types/types/misc.d.ts +14 -0
  392. package/dist/types/types/misc.d.ts.map +1 -0
  393. package/dist/types/types/multicall.d.ts +48 -0
  394. package/dist/types/types/multicall.d.ts.map +1 -0
  395. package/dist/types/types/rpc.d.ts +20 -0
  396. package/dist/types/types/rpc.d.ts.map +1 -0
  397. package/dist/types/types/transaction.d.ts +147 -0
  398. package/dist/types/types/transaction.d.ts.map +1 -0
  399. package/dist/types/types/transport.d.ts +3 -0
  400. package/dist/types/types/transport.d.ts.map +1 -0
  401. package/dist/types/types/typedData.d.ts +47 -0
  402. package/dist/types/types/typedData.d.ts.map +1 -0
  403. package/dist/types/types/utils.d.ts +188 -0
  404. package/dist/types/types/utils.d.ts.map +1 -0
  405. package/dist/types/types/window.d.ts +7 -0
  406. package/dist/types/types/window.d.ts.map +1 -0
  407. package/dist/types/utils/abi/decodeAbiParameters.d.ts +5 -0
  408. package/dist/types/utils/abi/decodeAbiParameters.d.ts.map +1 -0
  409. package/dist/types/utils/abi/decodeDeployData.d.ts +13 -0
  410. package/dist/types/utils/abi/decodeDeployData.d.ts.map +1 -0
  411. package/dist/types/utils/abi/decodeErrorResult.d.ts +16 -0
  412. package/dist/types/utils/abi/decodeErrorResult.d.ts.map +1 -0
  413. package/dist/types/utils/abi/decodeEventLog.d.ts +20 -0
  414. package/dist/types/utils/abi/decodeEventLog.d.ts.map +1 -0
  415. package/dist/types/utils/abi/decodeFunctionData.d.ts +15 -0
  416. package/dist/types/utils/abi/decodeFunctionData.d.ts.map +1 -0
  417. package/dist/types/utils/abi/decodeFunctionResult.d.ts +14 -0
  418. package/dist/types/utils/abi/decodeFunctionResult.d.ts.map +1 -0
  419. package/dist/types/utils/abi/encodeAbiParameters.d.ts +9 -0
  420. package/dist/types/utils/abi/encodeAbiParameters.d.ts.map +1 -0
  421. package/dist/types/utils/abi/encodeDeployData.d.ts +9 -0
  422. package/dist/types/utils/abi/encodeDeployData.d.ts.map +1 -0
  423. package/dist/types/utils/abi/encodeErrorResult.d.ts +11 -0
  424. package/dist/types/utils/abi/encodeErrorResult.d.ts.map +1 -0
  425. package/dist/types/utils/abi/encodeEventTopics.d.ts +13 -0
  426. package/dist/types/utils/abi/encodeEventTopics.d.ts.map +1 -0
  427. package/dist/types/utils/abi/encodeFunctionData.d.ts +11 -0
  428. package/dist/types/utils/abi/encodeFunctionData.d.ts.map +1 -0
  429. package/dist/types/utils/abi/encodeFunctionResult.d.ts +13 -0
  430. package/dist/types/utils/abi/encodeFunctionResult.d.ts.map +1 -0
  431. package/dist/types/utils/abi/encodePacked.d.ts +11 -0
  432. package/dist/types/utils/abi/encodePacked.d.ts.map +1 -0
  433. package/dist/types/utils/abi/formatAbiItem.d.ts +9 -0
  434. package/dist/types/utils/abi/formatAbiItem.d.ts.map +1 -0
  435. package/dist/types/utils/abi/formatAbiItemWithArgs.d.ts +8 -0
  436. package/dist/types/utils/abi/formatAbiItemWithArgs.d.ts.map +1 -0
  437. package/dist/types/utils/abi/getAbiItem.d.ts +12 -0
  438. package/dist/types/utils/abi/getAbiItem.d.ts.map +1 -0
  439. package/dist/types/utils/accounts.d.ts +3 -0
  440. package/dist/types/utils/accounts.d.ts.map +1 -0
  441. package/dist/types/utils/address/getAddress.d.ts +4 -0
  442. package/dist/types/utils/address/getAddress.d.ts.map +1 -0
  443. package/dist/types/utils/address/getContractAddress.d.ts +20 -0
  444. package/dist/types/utils/address/getContractAddress.d.ts.map +1 -0
  445. package/dist/types/utils/address/isAddress.d.ts +3 -0
  446. package/dist/types/utils/address/isAddress.d.ts.map +1 -0
  447. package/dist/types/utils/address/isAddressEqual.d.ts +3 -0
  448. package/dist/types/utils/address/isAddressEqual.d.ts.map +1 -0
  449. package/dist/types/utils/buildRequest.d.ts +6 -0
  450. package/dist/types/utils/buildRequest.d.ts.map +1 -0
  451. package/dist/types/utils/ccip.d.ts +37 -0
  452. package/dist/types/utils/ccip.d.ts.map +1 -0
  453. package/dist/types/utils/chain.d.ts +14 -0
  454. package/dist/types/utils/chain.d.ts.map +1 -0
  455. package/dist/types/utils/contract/extractFunctionParts.d.ts +13 -0
  456. package/dist/types/utils/contract/extractFunctionParts.d.ts.map +1 -0
  457. package/dist/types/utils/data/concat.d.ts +6 -0
  458. package/dist/types/utils/data/concat.d.ts.map +1 -0
  459. package/dist/types/utils/data/isBytes.d.ts +3 -0
  460. package/dist/types/utils/data/isBytes.d.ts.map +1 -0
  461. package/dist/types/utils/data/isBytesEqual.d.ts +3 -0
  462. package/dist/types/utils/data/isBytesEqual.d.ts.map +1 -0
  463. package/dist/types/utils/data/isHex.d.ts +5 -0
  464. package/dist/types/utils/data/isHex.d.ts.map +1 -0
  465. package/dist/types/utils/data/pad.d.ts +11 -0
  466. package/dist/types/utils/data/pad.d.ts.map +1 -0
  467. package/dist/types/utils/data/size.d.ts +9 -0
  468. package/dist/types/utils/data/size.d.ts.map +1 -0
  469. package/dist/types/utils/data/slice.d.ts +33 -0
  470. package/dist/types/utils/data/slice.d.ts.map +1 -0
  471. package/dist/types/utils/data/trim.d.ts +8 -0
  472. package/dist/types/utils/data/trim.d.ts.map +1 -0
  473. package/dist/types/utils/encoding/fromBytes.d.ts +109 -0
  474. package/dist/types/utils/encoding/fromBytes.d.ts.map +1 -0
  475. package/dist/types/utils/encoding/fromHex.d.ts +138 -0
  476. package/dist/types/utils/encoding/fromHex.d.ts.map +1 -0
  477. package/dist/types/utils/encoding/fromRlp.d.ts +6 -0
  478. package/dist/types/utils/encoding/fromRlp.d.ts.map +1 -0
  479. package/dist/types/utils/encoding/toBytes.d.ts +125 -0
  480. package/dist/types/utils/encoding/toBytes.d.ts.map +1 -0
  481. package/dist/types/utils/encoding/toHex.d.ts +139 -0
  482. package/dist/types/utils/encoding/toHex.d.ts.map +1 -0
  483. package/dist/types/utils/encoding/toRlp.d.ts +8 -0
  484. package/dist/types/utils/encoding/toRlp.d.ts.map +1 -0
  485. package/dist/types/utils/ens/avatar/parseAvatarRecord.d.ts +9 -0
  486. package/dist/types/utils/ens/avatar/parseAvatarRecord.d.ts.map +1 -0
  487. package/dist/types/utils/ens/avatar/utils.d.ts +37 -0
  488. package/dist/types/utils/ens/avatar/utils.d.ts.map +1 -0
  489. package/dist/types/utils/ens/encodeLabelhash.d.ts +3 -0
  490. package/dist/types/utils/ens/encodeLabelhash.d.ts.map +1 -0
  491. package/dist/types/utils/ens/encodedLabelToLabelhash.d.ts +3 -0
  492. package/dist/types/utils/ens/encodedLabelToLabelhash.d.ts.map +1 -0
  493. package/dist/types/utils/ens/errors.d.ts +2 -0
  494. package/dist/types/utils/ens/errors.d.ts.map +1 -0
  495. package/dist/types/utils/ens/labelhash.d.ts +11 -0
  496. package/dist/types/utils/ens/labelhash.d.ts.map +1 -0
  497. package/dist/types/utils/ens/namehash.d.ts +13 -0
  498. package/dist/types/utils/ens/namehash.d.ts.map +1 -0
  499. package/dist/types/utils/ens/normalize.d.ts +12 -0
  500. package/dist/types/utils/ens/normalize.d.ts.map +1 -0
  501. package/dist/types/utils/ens/packetToBytes.d.ts +3 -0
  502. package/dist/types/utils/ens/packetToBytes.d.ts.map +1 -0
  503. package/dist/types/utils/errors/getCallError.d.ts +9 -0
  504. package/dist/types/utils/errors/getCallError.d.ts.map +1 -0
  505. package/dist/types/utils/errors/getContractError.d.ts +12 -0
  506. package/dist/types/utils/errors/getContractError.d.ts.map +1 -0
  507. package/dist/types/utils/errors/getEstimateGasError.d.ts +11 -0
  508. package/dist/types/utils/errors/getEstimateGasError.d.ts.map +1 -0
  509. package/dist/types/utils/errors/getNodeError.d.ts +7 -0
  510. package/dist/types/utils/errors/getNodeError.d.ts.map +1 -0
  511. package/dist/types/utils/errors/getTransactionError.d.ts +12 -0
  512. package/dist/types/utils/errors/getTransactionError.d.ts.map +1 -0
  513. package/dist/types/utils/filters/createFilterRequestScope.d.ts +22 -0
  514. package/dist/types/utils/filters/createFilterRequestScope.d.ts.map +1 -0
  515. package/dist/types/utils/formatters/block.d.ts +28 -0
  516. package/dist/types/utils/formatters/block.d.ts.map +1 -0
  517. package/dist/types/utils/formatters/extract.d.ts +8 -0
  518. package/dist/types/utils/formatters/extract.d.ts.map +1 -0
  519. package/dist/types/utils/formatters/feeHistory.d.ts +4 -0
  520. package/dist/types/utils/formatters/feeHistory.d.ts.map +1 -0
  521. package/dist/types/utils/formatters/formatter.d.ts +10 -0
  522. package/dist/types/utils/formatters/formatter.d.ts.map +1 -0
  523. package/dist/types/utils/formatters/log.d.ts +7 -0
  524. package/dist/types/utils/formatters/log.d.ts.map +1 -0
  525. package/dist/types/utils/formatters/transaction.d.ts +30 -0
  526. package/dist/types/utils/formatters/transaction.d.ts.map +1 -0
  527. package/dist/types/utils/formatters/transactionReceipt.d.ts +14 -0
  528. package/dist/types/utils/formatters/transactionReceipt.d.ts.map +1 -0
  529. package/dist/types/utils/formatters/transactionRequest.d.ts +14 -0
  530. package/dist/types/utils/formatters/transactionRequest.d.ts.map +1 -0
  531. package/dist/types/utils/hash/getEventSelector.d.ts +4 -0
  532. package/dist/types/utils/hash/getEventSelector.d.ts.map +1 -0
  533. package/dist/types/utils/hash/getFunctionSelector.d.ts +3 -0
  534. package/dist/types/utils/hash/getFunctionSelector.d.ts.map +1 -0
  535. package/dist/types/utils/hash/hashFunction.d.ts +4 -0
  536. package/dist/types/utils/hash/hashFunction.d.ts.map +1 -0
  537. package/dist/types/utils/hash/isHash.d.ts +3 -0
  538. package/dist/types/utils/hash/isHash.d.ts.map +1 -0
  539. package/dist/types/utils/hash/keccak256.d.ts +6 -0
  540. package/dist/types/utils/hash/keccak256.d.ts.map +1 -0
  541. package/dist/types/utils/index.d.ts +82 -0
  542. package/dist/types/utils/index.d.ts.map +1 -0
  543. package/dist/types/utils/observe.d.ts +17 -0
  544. package/dist/types/utils/observe.d.ts.map +1 -0
  545. package/dist/types/utils/poll.d.ts +13 -0
  546. package/dist/types/utils/poll.d.ts.map +1 -0
  547. package/dist/types/utils/promise/createBatchScheduler.d.ts +17 -0
  548. package/dist/types/utils/promise/createBatchScheduler.d.ts.map +1 -0
  549. package/dist/types/utils/promise/withCache.d.ts +36 -0
  550. package/dist/types/utils/promise/withCache.d.ts.map +1 -0
  551. package/dist/types/utils/promise/withRetry.d.ts +12 -0
  552. package/dist/types/utils/promise/withRetry.d.ts.map +1 -0
  553. package/dist/types/utils/promise/withTimeout.d.ts +8 -0
  554. package/dist/types/utils/promise/withTimeout.d.ts.map +1 -0
  555. package/dist/types/utils/regex.d.ts +4 -0
  556. package/dist/types/utils/regex.d.ts.map +1 -0
  557. package/dist/types/utils/rpc.d.ts +72 -0
  558. package/dist/types/utils/rpc.d.ts.map +1 -0
  559. package/dist/types/utils/signature/hashMessage.d.ts +6 -0
  560. package/dist/types/utils/signature/hashMessage.d.ts.map +1 -0
  561. package/dist/types/utils/signature/hashTypedData.d.ts +11 -0
  562. package/dist/types/utils/signature/hashTypedData.d.ts.map +1 -0
  563. package/dist/types/utils/signature/hexToSignature.d.ts +13 -0
  564. package/dist/types/utils/signature/hexToSignature.d.ts.map +1 -0
  565. package/dist/types/utils/signature/recoverAddress.d.ts +9 -0
  566. package/dist/types/utils/signature/recoverAddress.d.ts.map +1 -0
  567. package/dist/types/utils/signature/recoverMessageAddress.d.ts +9 -0
  568. package/dist/types/utils/signature/recoverMessageAddress.d.ts.map +1 -0
  569. package/dist/types/utils/signature/recoverPublicKey.d.ts +8 -0
  570. package/dist/types/utils/signature/recoverPublicKey.d.ts.map +1 -0
  571. package/dist/types/utils/signature/recoverTypedDataAddress.d.ts +13 -0
  572. package/dist/types/utils/signature/recoverTypedDataAddress.d.ts.map +1 -0
  573. package/dist/types/utils/signature/signatureToHex.d.ts +17 -0
  574. package/dist/types/utils/signature/signatureToHex.d.ts.map +1 -0
  575. package/dist/types/utils/signature/verifyMessage.d.ts +25 -0
  576. package/dist/types/utils/signature/verifyMessage.d.ts.map +1 -0
  577. package/dist/types/utils/signature/verifyTypedData.d.ts +28 -0
  578. package/dist/types/utils/signature/verifyTypedData.d.ts.map +1 -0
  579. package/dist/types/utils/stringify.d.ts +2 -0
  580. package/dist/types/utils/stringify.d.ts.map +1 -0
  581. package/dist/types/utils/transaction/assertRequest.d.ts +5 -0
  582. package/dist/types/utils/transaction/assertRequest.d.ts.map +1 -0
  583. package/dist/types/utils/transaction/assertTransaction.d.ts +5 -0
  584. package/dist/types/utils/transaction/assertTransaction.d.ts.map +1 -0
  585. package/dist/types/utils/transaction/getSerializedTransactionType.d.ts +4 -0
  586. package/dist/types/utils/transaction/getSerializedTransactionType.d.ts.map +1 -0
  587. package/dist/types/utils/transaction/getTransactionType.d.ts +4 -0
  588. package/dist/types/utils/transaction/getTransactionType.d.ts.map +1 -0
  589. package/dist/types/utils/transaction/parseTransaction.d.ts +9 -0
  590. package/dist/types/utils/transaction/parseTransaction.d.ts.map +1 -0
  591. package/dist/types/utils/transaction/prepareRequest.d.ts +21 -0
  592. package/dist/types/utils/transaction/prepareRequest.d.ts.map +1 -0
  593. package/dist/types/utils/transaction/serializeAccessList.d.ts +5 -0
  594. package/dist/types/utils/transaction/serializeAccessList.d.ts.map +1 -0
  595. package/dist/types/utils/transaction/serializeTransaction.d.ts +7 -0
  596. package/dist/types/utils/transaction/serializeTransaction.d.ts.map +1 -0
  597. package/dist/types/utils/typedData.d.ts +6 -0
  598. package/dist/types/utils/typedData.d.ts.map +1 -0
  599. package/dist/types/utils/uid.d.ts +2 -0
  600. package/dist/types/utils/uid.d.ts.map +1 -0
  601. package/dist/types/utils/unit/formatEther.d.ts +2 -0
  602. package/dist/types/utils/unit/formatEther.d.ts.map +1 -0
  603. package/dist/types/utils/unit/formatGwei.d.ts +2 -0
  604. package/dist/types/utils/unit/formatGwei.d.ts.map +1 -0
  605. package/dist/types/utils/unit/formatUnits.d.ts +2 -0
  606. package/dist/types/utils/unit/formatUnits.d.ts.map +1 -0
  607. package/dist/types/utils/unit/parseEther.d.ts +2 -0
  608. package/dist/types/utils/unit/parseEther.d.ts.map +1 -0
  609. package/dist/types/utils/unit/parseGwei.d.ts +2 -0
  610. package/dist/types/utils/unit/parseGwei.d.ts.map +1 -0
  611. package/dist/types/utils/unit/parseUnits.d.ts +2 -0
  612. package/dist/types/utils/unit/parseUnits.d.ts.map +1 -0
  613. package/dist/types/utils/wait.d.ts +2 -0
  614. package/dist/types/utils/wait.d.ts.map +1 -0
  615. package/dist/types/wallet.d.ts +11 -0
  616. package/dist/types/wallet.d.ts.map +1 -0
  617. package/dist/types/window.d.ts +2 -0
  618. package/dist/types/window.d.ts.map +1 -0
  619. package/package.json +1 -1
  620. package/src/actions/public/estimateFeesPerGas.ts +152 -0
  621. package/src/actions/public/estimateMaxPriorityFeePerGas.ts +96 -0
  622. package/src/actions/public/verifyHash.ts +1 -1
  623. package/src/actions/public/verifyMessage.ts +3 -2
  624. package/src/actions/public/verifyTypedData.ts +3 -2
  625. package/src/actions/wallet/deployContract.ts +2 -1
  626. package/src/actions/wallet/sendTransaction.ts +2 -1
  627. package/src/actions/wallet/writeContract.ts +2 -1
  628. package/src/clients/createTestClient.ts +2 -1
  629. package/src/clients/decorators/public.ts +64 -0
  630. package/src/errors/fee.ts +27 -0
  631. package/src/errors/version.ts +1 -1
  632. package/src/index.ts +38 -24
  633. package/src/public.ts +10 -0
  634. package/src/types/chain.ts +80 -12
  635. package/src/types/eip1193.ts +12 -0
  636. package/src/types/fee.ts +2 -0
  637. package/src/utils/transaction/prepareRequest.ts +37 -45
  638. package/chains/dist/cjs/celo/formatters.js.map +0 -1
  639. package/chains/dist/cjs/celo/parsers.js.map +0 -1
  640. package/chains/dist/cjs/celo/serializers.js.map +0 -1
  641. package/chains/dist/cjs/celo/types.js.map +0 -1
  642. package/chains/dist/cjs/index.js.map +0 -1
  643. package/chains/dist/cjs/optimism/fees.js.map +0 -1
  644. package/chains/dist/cjs/optimism/formatters.js.map +0 -1
  645. package/chains/dist/cjs/optimism/types.js.map +0 -1
  646. package/chains/dist/cjs/types.js.map +0 -1
  647. package/chains/dist/cjs/utils.js.map +0 -1
  648. package/chains/dist/tsconfig.build.tsbuildinfo +0 -1
  649. package/chains/node_modules/.bin/tsc +0 -17
  650. package/chains/node_modules/.bin/tsserver +0 -17
  651. package/chains/tsconfig.tsbuildinfo +0 -1
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getChainId.d.ts","sourceRoot":"","sources":["../../../../src/actions/public/getChainId.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,yBAAyB,CAAA;AACtD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,+BAA+B,CAAA;AAC3D,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,6CAA6C,CAAA;AAC5E,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAA;AAGjD,MAAM,MAAM,oBAAoB,GAAG,MAAM,CAAA;AAEzC;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAsB,UAAU,CAC9B,MAAM,SAAS,KAAK,GAAG,SAAS,EAChC,QAAQ,SAAS,OAAO,GAAG,SAAS,EACpC,MAAM,EAAE,MAAM,CAAC,SAAS,EAAE,MAAM,EAAE,QAAQ,CAAC,GAAG,OAAO,CAAC,oBAAoB,CAAC,CAK5E"}
@@ -0,0 +1,53 @@
1
+ import type { Client } from '../../clients/createClient.js';
2
+ import type { Transport } from '../../clients/transports/createTransport.js';
3
+ import type { BlockTag } from '../../types/block.js';
4
+ import type { Chain } from '../../types/chain.js';
5
+ import type { FeeHistory } from '../../types/fee.js';
6
+ export type GetFeeHistoryParameters = {
7
+ /**
8
+ * Number of blocks in the requested range. Between 1 and 1024 blocks can be requested in a single query. Less than requested may be returned if not all blocks are available.
9
+ */
10
+ blockCount: number;
11
+ /**
12
+ * A monotonically increasing list of percentile values to sample from each block's effective priority fees per gas in ascending order, weighted by gas used.
13
+ */
14
+ rewardPercentiles: number[];
15
+ } & ({
16
+ blockNumber?: never;
17
+ /**
18
+ * Highest number block of the requested range.
19
+ * @default 'latest'
20
+ */
21
+ blockTag?: BlockTag;
22
+ } | {
23
+ /** Highest number block of the requested range. */
24
+ blockNumber?: bigint;
25
+ blockTag?: never;
26
+ });
27
+ export type GetFeeHistoryReturnType = FeeHistory;
28
+ /**
29
+ * Returns a collection of historical gas information.
30
+ *
31
+ * - Docs: https://viem.sh/docs/actions/public/getFeeHistory.html
32
+ * - JSON-RPC Methods: [`eth_feeHistory`](https://docs.alchemy.com/reference/eth-feehistory)
33
+ *
34
+ * @param client - Client to use
35
+ * @param parameters - {@link GetFeeHistoryParameters}
36
+ * @returns The gas estimate (in wei). {@link GetFeeHistoryReturnType}
37
+ *
38
+ * @example
39
+ * import { createPublicClient, http } from 'viem'
40
+ * import { mainnet } from 'viem/chains'
41
+ * import { getFeeHistory } from 'viem/public'
42
+ *
43
+ * const client = createPublicClient({
44
+ * chain: mainnet,
45
+ * transport: http(),
46
+ * })
47
+ * const feeHistory = await getFeeHistory(client, {
48
+ * blockCount: 4,
49
+ * rewardPercentiles: [25, 75],
50
+ * })
51
+ */
52
+ export declare function getFeeHistory<TChain extends Chain | undefined>(client: Client<Transport, TChain>, { blockCount, blockNumber, blockTag, rewardPercentiles, }: GetFeeHistoryParameters): Promise<GetFeeHistoryReturnType>;
53
+ //# sourceMappingURL=getFeeHistory.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getFeeHistory.d.ts","sourceRoot":"","sources":["../../../../src/actions/public/getFeeHistory.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,+BAA+B,CAAA;AAC3D,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,6CAA6C,CAAA;AAC5E,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAA;AACpD,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAA;AACjD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAA;AAIpD,MAAM,MAAM,uBAAuB,GAAG;IACpC;;OAEG;IACH,UAAU,EAAE,MAAM,CAAA;IAClB;;OAEG;IACH,iBAAiB,EAAE,MAAM,EAAE,CAAA;CAC5B,GAAG,CACA;IACE,WAAW,CAAC,EAAE,KAAK,CAAA;IACnB;;;OAGG;IACH,QAAQ,CAAC,EAAE,QAAQ,CAAA;CACpB,GACD;IACE,mDAAmD;IACnD,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,QAAQ,CAAC,EAAE,KAAK,CAAA;CACjB,CACJ,CAAA;AACD,MAAM,MAAM,uBAAuB,GAAG,UAAU,CAAA;AAEhD;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,wBAAsB,aAAa,CAAC,MAAM,SAAS,KAAK,GAAG,SAAS,EAClE,MAAM,EAAE,MAAM,CAAC,SAAS,EAAE,MAAM,CAAC,EACjC,EACE,UAAU,EACV,WAAW,EACX,QAAmB,EACnB,iBAAiB,GAClB,EAAE,uBAAuB,GACzB,OAAO,CAAC,uBAAuB,CAAC,CAWlC"}
@@ -0,0 +1,96 @@
1
+ import type { Abi, AbiEvent, ExtractAbiEvent } from 'abitype';
2
+ import type { Client } from '../../clients/createClient.js';
3
+ import type { Transport } from '../../clients/transports/createTransport.js';
4
+ import type { BlockNumber, BlockTag } from '../../types/block.js';
5
+ import type { Chain } from '../../types/chain.js';
6
+ import type { Filter, FilterType } from '../../types/filter.js';
7
+ import type { Log } from '../../types/log.js';
8
+ import type { Hash } from '../../types/misc.js';
9
+ export type GetFilterChangesParameters<TFilterType extends FilterType = FilterType, TAbi extends Abi | readonly unknown[] | undefined = undefined, TEventName extends string | undefined = undefined, TStrict extends boolean | undefined = undefined, TFromBlock extends BlockNumber | BlockTag | undefined = undefined, TToBlock extends BlockNumber | BlockTag | undefined = undefined> = {
10
+ filter: Filter<TFilterType, TAbi, TEventName, any, TStrict, TFromBlock, TToBlock>;
11
+ };
12
+ export type GetFilterChangesReturnType<TFilterType extends FilterType = FilterType, TAbi extends Abi | readonly unknown[] | undefined = undefined, TEventName extends string | undefined = undefined, TStrict extends boolean | undefined = undefined, TFromBlock extends BlockNumber | BlockTag | undefined = undefined, TToBlock extends BlockNumber | BlockTag | undefined = undefined, _AbiEvent extends AbiEvent | undefined = TAbi extends Abi ? TEventName extends string ? ExtractAbiEvent<TAbi, TEventName> : undefined : undefined, _Pending extends boolean = (TFromBlock extends 'pending' ? true : false) | (TToBlock extends 'pending' ? true : false)> = TFilterType extends 'event' ? Log<bigint, number, _Pending, _AbiEvent, TStrict, TAbi, TEventName>[] : Hash[];
13
+ /**
14
+ * Returns a list of logs or hashes based on a [Filter](/docs/glossary/terms#filter) since the last time it was called.
15
+ *
16
+ * - Docs: https://viem.sh/docs/actions/public/getFilterChanges.html
17
+ * - JSON-RPC Methods: [`eth_getFilterChanges`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getfilterchanges)
18
+ *
19
+ * A Filter can be created from the following actions:
20
+ *
21
+ * - [`createBlockFilter`](https://viem.sh/docs/actions/public/createBlockFilter.html)
22
+ * - [`createContractEventFilter`](https://viem.sh/docs/contract/createContractEventFilter.html)
23
+ * - [`createEventFilter`](https://viem.sh/docs/actions/public/createEventFilter.html)
24
+ * - [`createPendingTransactionFilter`](https://viem.sh/docs/actions/public/createPendingTransactionFilter.html)
25
+ *
26
+ * Depending on the type of filter, the return value will be different:
27
+ *
28
+ * - If the filter was created with `createContractEventFilter` or `createEventFilter`, it returns a list of logs.
29
+ * - If the filter was created with `createPendingTransactionFilter`, it returns a list of transaction hashes.
30
+ * - If the filter was created with `createBlockFilter`, it returns a list of block hashes.
31
+ *
32
+ * @param client - Client to use
33
+ * @param parameters - {@link GetFilterChangesParameters}
34
+ * @returns Logs or hashes. {@link GetFilterChangesReturnType}
35
+ *
36
+ * @example
37
+ * // Blocks
38
+ * import { createPublicClient, http } from 'viem'
39
+ * import { mainnet } from 'viem/chains'
40
+ * import { createBlockFilter, getFilterChanges } from 'viem/public'
41
+ *
42
+ * const client = createPublicClient({
43
+ * chain: mainnet,
44
+ * transport: http(),
45
+ * })
46
+ * const filter = await createBlockFilter(client)
47
+ * const hashes = await getFilterChanges(client, { filter })
48
+ *
49
+ * @example
50
+ * // Contract Events
51
+ * import { createPublicClient, http, parseAbi } from 'viem'
52
+ * import { mainnet } from 'viem/chains'
53
+ * import { createContractEventFilter, getFilterChanges } from 'viem/public'
54
+ *
55
+ * const client = createPublicClient({
56
+ * chain: mainnet,
57
+ * transport: http(),
58
+ * })
59
+ * const filter = await createContractEventFilter(client, {
60
+ * address: '0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48',
61
+ * abi: parseAbi(['event Transfer(address indexed, address indexed, uint256)']),
62
+ * eventName: 'Transfer',
63
+ * })
64
+ * const logs = await getFilterChanges(client, { filter })
65
+ *
66
+ * @example
67
+ * // Raw Events
68
+ * import { createPublicClient, http, parseAbiItem } from 'viem'
69
+ * import { mainnet } from 'viem/chains'
70
+ * import { createEventFilter, getFilterChanges } from 'viem/public'
71
+ *
72
+ * const client = createPublicClient({
73
+ * chain: mainnet,
74
+ * transport: http(),
75
+ * })
76
+ * const filter = await createEventFilter(client, {
77
+ * address: '0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48',
78
+ * event: parseAbiItem('event Transfer(address indexed, address indexed, uint256)'),
79
+ * })
80
+ * const logs = await getFilterChanges(client, { filter })
81
+ *
82
+ * @example
83
+ * // Transactions
84
+ * import { createPublicClient, http } from 'viem'
85
+ * import { mainnet } from 'viem/chains'
86
+ * import { createPendingTransactionFilter, getFilterChanges } from 'viem/public'
87
+ *
88
+ * const client = createPublicClient({
89
+ * chain: mainnet,
90
+ * transport: http(),
91
+ * })
92
+ * const filter = await createPendingTransactionFilter(client)
93
+ * const hashes = await getFilterChanges(client, { filter })
94
+ */
95
+ export declare function getFilterChanges<TTransport extends Transport, TChain extends Chain | undefined, 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>(_client: Client<TTransport, TChain>, { filter, }: GetFilterChangesParameters<TFilterType, TAbi, TEventName, TStrict, TFromBlock, TToBlock>): Promise<GetFilterChangesReturnType<TFilterType, TAbi, TEventName, TStrict, TFromBlock, TToBlock>>;
96
+ //# sourceMappingURL=getFilterChanges.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getFilterChanges.d.ts","sourceRoot":"","sources":["../../../../src/actions/public/getFilterChanges.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,GAAG,EAAE,QAAQ,EAAE,eAAe,EAAE,MAAM,SAAS,CAAA;AAE7D,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,+BAA+B,CAAA;AAC3D,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,6CAA6C,CAAA;AAK5E,OAAO,KAAK,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAA;AACjE,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAA;AACjD,OAAO,KAAK,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAA;AAC/D,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,oBAAoB,CAAA;AAC7C,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,qBAAqB,CAAA;AAI/C,MAAM,MAAM,0BAA0B,CACpC,WAAW,SAAS,UAAU,GAAG,UAAU,EAC3C,IAAI,SAAS,GAAG,GAAG,SAAS,OAAO,EAAE,GAAG,SAAS,GAAG,SAAS,EAC7D,UAAU,SAAS,MAAM,GAAG,SAAS,GAAG,SAAS,EACjD,OAAO,SAAS,OAAO,GAAG,SAAS,GAAG,SAAS,EAC/C,UAAU,SAAS,WAAW,GAAG,QAAQ,GAAG,SAAS,GAAG,SAAS,EACjE,QAAQ,SAAS,WAAW,GAAG,QAAQ,GAAG,SAAS,GAAG,SAAS,IAC7D;IACF,MAAM,EAAE,MAAM,CACZ,WAAW,EACX,IAAI,EACJ,UAAU,EACV,GAAG,EACH,OAAO,EACP,UAAU,E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AU,SAAS,WAAW,GAAG,QAAQ,GAAG,SAAS,GAAG,SAAS,EACjE,QAAQ,SAAS,WAAW,GAAG,QAAQ,GAAG,SAAS,GAAG,SAAS,EAE/D,OAAO,EAAE,MAAM,CAAC,UAAU,EAAE,MAAM,CAAC,EACnC,EACE,MAAM,GACP,EAAE,0BAA0B,CAC3B,WAAW,EACX,IAAI,EACJ,UAAU,EACV,OAAO,EACP,UAAU,EACV,QAAQ,CACT,GACA,OAAO,CACR,0BAA0B,CACxB,WAAW,EACX,IAAI,EACJ,UAAU,EACV,OAAO,EACP,UAAU,EACV,QAAQ,CACT,CACF,CA8CA"}
@@ -0,0 +1,40 @@
1
+ import type { Abi, AbiEvent, ExtractAbiEvent } from 'abitype';
2
+ import type { Client } from '../../clients/createClient.js';
3
+ import type { Transport } from '../../clients/transports/createTransport.js';
4
+ import type { BlockNumber, BlockTag } from '../../types/block.js';
5
+ import type { Chain } from '../../types/chain.js';
6
+ import type { Filter } from '../../types/filter.js';
7
+ import type { Log } from '../../types/log.js';
8
+ export type GetFilterLogsParameters<TAbi extends Abi | readonly unknown[] | undefined = undefined, TEventName extends string | undefined = undefined, TStrict extends boolean | undefined = undefined, TFromBlock extends BlockNumber | BlockTag | undefined = undefined, TToBlock extends BlockNumber | BlockTag | undefined = undefined> = {
9
+ filter: Filter<'event', TAbi, TEventName, any, TStrict, TFromBlock, TToBlock>;
10
+ };
11
+ export type GetFilterLogsReturnType<TAbi extends Abi | readonly unknown[] | undefined = undefined, TEventName extends string | undefined = undefined, TStrict extends boolean | undefined = undefined, TFromBlock extends BlockNumber | BlockTag | undefined = undefined, TToBlock extends BlockNumber | BlockTag | undefined = undefined, _AbiEvent extends AbiEvent | undefined = TAbi extends Abi ? TEventName extends string ? ExtractAbiEvent<TAbi, TEventName> : undefined : undefined, _Pending extends boolean = (TFromBlock extends 'pending' ? true : false) | (TToBlock extends 'pending' ? true : false)> = Log<bigint, number, _Pending, _AbiEvent, TStrict, TAbi, TEventName>[];
12
+ /**
13
+ * Returns a list of event logs since the filter was created.
14
+ *
15
+ * - Docs: https://viem.sh/docs/actions/public/getFilterLogs.html
16
+ * - JSON-RPC Methods: [`eth_getFilterLogs`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getfilterlogs)
17
+ *
18
+ * `getFilterLogs` is only compatible with **event filters**.
19
+ *
20
+ * @param client - Client to use
21
+ * @param parameters - {@link GetFilterLogsParameters}
22
+ * @returns A list of event logs. {@link GetFilterLogsReturnType}
23
+ *
24
+ * @example
25
+ * import { createPublicClient, http, parseAbiItem } from 'viem'
26
+ * import { mainnet } from 'viem/chains'
27
+ * import { createEventFilter, getFilterLogs } from 'viem/public'
28
+ *
29
+ * const client = createPublicClient({
30
+ * chain: mainnet,
31
+ * transport: http(),
32
+ * })
33
+ * const filter = await createEventFilter(client, {
34
+ * address: '0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48',
35
+ * event: parseAbiItem('event Transfer(address indexed, address indexed, uint256)'),
36
+ * })
37
+ * const logs = await getFilterLogs(client, { filter })
38
+ */
39
+ export declare function getFilterLogs<TChain extends Chain | undefined, 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>(_client: Client<Transport, TChain>, { filter, }: GetFilterLogsParameters<TAbi, TEventName, TStrict, TFromBlock, TToBlock>): Promise<GetFilterLogsReturnType<TAbi, TEventName, TStrict, TFromBlock, TToBlock>>;
40
+ //# sourceMappingURL=getFilterLogs.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getFilterLogs.d.ts","sourceRoot":"","sources":["../../../../src/actions/public/getFilterLogs.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,GAAG,EAAE,QAAQ,EAAE,eAAe,EAAE,MAAM,SAAS,CAAA;AAE7D,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,+BAA+B,CAAA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S,EACb,QAAQ,SAAS,OAAO,GACpB,CAAC,UAAU,SAAS,SAAS,GAAG,IAAI,GAAG,KAAK,CAAC,GAC7C,CAAC,QAAQ,SAAS,SAAS,GAAG,IAAI,GAAG,KAAK,CAAC,IAC7C,GAAG,CAAC,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,SAAS,EAAE,OAAO,EAAE,IAAI,EAAE,UAAU,CAAC,EAAE,CAAA;AAEzE;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,wBAAsB,aAAa,CACjC,MAAM,SAAS,KAAK,GAAG,SAAS,EAChC,KAAK,CAAC,IAAI,SAAS,GAAG,GAAG,SAAS,OAAO,EAAE,GAAG,SAAS,EACvD,UAAU,SAAS,MAAM,GAAG,SAAS,EACrC,OAAO,SAAS,OAAO,GAAG,SAAS,GAAG,SAAS,EAC/C,UAAU,SAAS,WAAW,GAAG,QAAQ,GAAG,SAAS,GAAG,SAAS,EACjE,QAAQ,SAAS,WAAW,GAAG,QAAQ,GAAG,SAAS,GAAG,SAAS,EAE/D,OAAO,EAAE,MAAM,CAAC,SAAS,EAAE,MAAM,CAAC,EAClC,EACE,MAAM,GACP,EAAE,uBAAuB,CAAC,IAAI,EAAE,UAAU,EAAE,OAAO,EAAE,UAAU,EAAE,QAAQ,CAAC,GAC1E,OAAO,CACR,uBAAuB,CAAC,IAAI,EAAE,UAAU,EAAE,OAAO,EAAE,UAAU,EAAE,QAAQ,CAAC,CACzE,CA4CA"}
@@ -0,0 +1,27 @@
1
+ import type { Account } from '../../accounts/types.js';
2
+ import type { Client } from '../../clients/createClient.js';
3
+ import type { Transport } from '../../clients/transports/createTransport.js';
4
+ import type { Chain } from '../../types/chain.js';
5
+ export type GetGasPriceReturnType = bigint;
6
+ /**
7
+ * Returns the current price of gas (in wei).
8
+ *
9
+ * - Docs: https://viem.sh/docs/actions/public/getGasPrice.html
10
+ * - JSON-RPC Methods: [`eth_gasPrice`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_gasprice)
11
+ *
12
+ * @param client - Client to use
13
+ * @returns The gas price (in wei). {@link GetGasPriceReturnType}
14
+ *
15
+ * @example
16
+ * import { createPublicClient, http } from 'viem'
17
+ * import { mainnet } from 'viem/chains'
18
+ * import { getGasPrice } from 'viem/public'
19
+ *
20
+ * const client = createPublicClient({
21
+ * chain: mainnet,
22
+ * transport: http(),
23
+ * })
24
+ * const gasPrice = await getGasPrice(client)
25
+ */
26
+ export declare function getGasPrice<TChain extends Chain | undefined, TAccount extends Account | undefined>(client: Client<Transport, TChain, TAccount>): Promise<GetGasPriceReturnType>;
27
+ //# sourceMappingURL=getGasPrice.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getGasPrice.d.ts","sourceRoot":"","sources":["../../../../src/actions/public/getGasPrice.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,yBAAyB,CAAA;AACtD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,+BAA+B,CAAA;AAC3D,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,6CAA6C,CAAA;AAC5E,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAA;AAEjD,MAAM,MAAM,qBAAqB,GAAG,MAAM,CAAA;AAE1C;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAsB,WAAW,CAC/B,MAAM,SAAS,KAAK,GAAG,SAAS,EAChC,QAAQ,SAAS,OAAO,GAAG,SAAS,EACpC,MAAM,EAAE,MAAM,CAAC,SAAS,EAAE,MAAM,EAAE,QAAQ,CAAC,GAAG,OAAO,CAAC,qBAAqB,CAAC,CAK7E"}
@@ -0,0 +1,71 @@
1
+ import type { AbiEvent, Address } from 'abitype';
2
+ import type { Client } from '../../clients/createClient.js';
3
+ import type { Transport } from '../../clients/transports/createTransport.js';
4
+ import type { BlockNumber, BlockTag } from '../../types/block.js';
5
+ import type { Chain } from '../../types/chain.js';
6
+ import type { MaybeAbiEventName, MaybeExtractEventArgsFromAbi } from '../../types/contract.js';
7
+ import type { Log } from '../../types/log.js';
8
+ import type { Hash } from '../../types/misc.js';
9
+ export type GetLogsParameters<TAbiEvent extends AbiEvent | undefined = undefined, 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>> = {
10
+ /** Address or list of addresses from which logs originated */
11
+ address?: Address | Address[];
12
+ } & ({
13
+ event: TAbiEvent;
14
+ events?: never;
15
+ args?: MaybeExtractEventArgsFromAbi<TAbiEvents, _EventName>;
16
+ /**
17
+ * Whether or not the logs must match the indexed/non-indexed arguments on `event`.
18
+ * @default false
19
+ */
20
+ strict?: TStrict;
21
+ } | {
22
+ event?: never;
23
+ events: TAbiEvents;
24
+ args?: never;
25
+ /**
26
+ * Whether or not the logs must match the indexed/non-indexed arguments on `event`.
27
+ * @default false
28
+ */
29
+ strict?: TStrict;
30
+ } | {
31
+ event?: never;
32
+ events?: never;
33
+ args?: never;
34
+ strict?: never;
35
+ }) & ({
36
+ /** Block number or tag after which to include logs */
37
+ fromBlock?: TFromBlock | BlockNumber | BlockTag;
38
+ /** Block number or tag before which to include logs */
39
+ toBlock?: TToBlock | BlockNumber | BlockTag;
40
+ blockHash?: never;
41
+ } | {
42
+ fromBlock?: never;
43
+ toBlock?: never;
44
+ /** Hash of block to include logs from */
45
+ blockHash?: Hash;
46
+ });
47
+ export type GetLogsReturnType<TAbiEvent extends AbiEvent | undefined = undefined, 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>, _Pending extends boolean = (TFromBlock extends 'pending' ? true : false) | (TToBlock extends 'pending' ? true : false)> = Log<bigint, number, _Pending, TAbiEvent, TStrict, TAbiEvents, _EventName>[];
48
+ /**
49
+ * Returns a list of event logs matching the provided parameters.
50
+ *
51
+ * - Docs: https://viem.sh/docs/actions/public/getLogs.html
52
+ * - Examples: https://stackblitz.com/github/wagmi-dev/viem/tree/main/examples/filters-and-logs/event-logs
53
+ * - JSON-RPC Methods: [`eth_getLogs`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getlogs)
54
+ *
55
+ * @param client - Client to use
56
+ * @param parameters - {@link GetLogsParameters}
57
+ * @returns A list of event logs. {@link GetLogsReturnType}
58
+ *
59
+ * @example
60
+ * import { createPublicClient, http, parseAbiItem } from 'viem'
61
+ * import { mainnet } from 'viem/chains'
62
+ * import { getLogs } from 'viem/public'
63
+ *
64
+ * const client = createPublicClient({
65
+ * chain: mainnet,
66
+ * transport: http(),
67
+ * })
68
+ * const logs = await getLogs(client)
69
+ */
70
+ export declare function getLogs<TChain extends Chain | undefined, 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>(client: Client<Transport, TChain>, { address, blockHash, fromBlock, toBlock, event, events: events_, args, strict: strict_, }?: GetLogsParameters<TAbiEvent, TAbiEvents, TStrict, TFromBlock, TToBlock>): Promise<GetLogsReturnType<TAbiEvent, TAbiEvents, TStrict, TFromBlock, TToBlock>>;
71
+ //# sourceMappingURL=getLogs.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getLogs.d.ts","sourceRoot":"","sources":["../../../../src/actions/public/getLogs.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAO,QAAQ,EAAE,OAAO,EAAE,MAA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C,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,SAAS,EAAE,OAAO,EAAE,UAAU,EAAE,UAAU,CAAC,EAAE,CAAA;AAE/E;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,wBAAsB,OAAO,CAC3B,MAAM,SAAS,KAAK,GAAG,SAAS,EAChC,KAAK,CAAC,SAAS,SAAS,QAAQ,GAAG,SAAS,GAAG,SAAS,EACxD,KAAK,CAAC,UAAU,SACZ,SAAS,QAAQ,EAAE,GACnB,SAAS,OAAO,EAAE,GAClB,SAAS,GAAG,SAAS,SAAS,QAAQ,GAAG,CAAC,SAAS,CAAC,GAAG,SAAS,EACpE,OAAO,SAAS,OAAO,GAAG,SAAS,GAAG,SAAS,EAC/C,UAAU,SAAS,WAAW,GAAG,QAAQ,GAAG,SAAS,GAAG,SAAS,EACjE,QAAQ,SAAS,WAAW,GAAG,QAAQ,GAAG,SAAS,GAAG,SAAS,EAE/D,MAAM,EAAE,MAAM,CAAC,SAAS,EAAE,MAAM,CAAC,EACjC,EACE,OAAO,EACP,SAAS,EACT,SAAS,EACT,OAAO,EACP,KAAK,EACL,MAAM,EAAE,OAAO,EACf,IAAI,EACJ,MAAM,EAAE,OAAO,GAChB,GAAE,iBAAiB,CAClB,SAAS,EACT,UAAU,EACV,OAAO,EACP,UAAU,EACV,QAAQ,CACJ,GACL,OAAO,CACR,iBAAiB,CAAC,SAAS,EAAE,UAAU,EAAE,OAAO,EAAE,UAAU,EAAE,QAAQ,CAAC,CACxE,CA2EA"}
@@ -0,0 +1,43 @@
1
+ import type { Address } from 'abitype';
2
+ import type { Client } from '../../clients/createClient.js';
3
+ import type { Transport } from '../../clients/transports/createTransport.js';
4
+ import type { BlockTag } from '../../types/block.js';
5
+ import type { Chain } from '../../types/chain.js';
6
+ import type { Hex } from '../../types/misc.js';
7
+ export type GetStorageAtParameters = {
8
+ address: Address;
9
+ slot: Hex;
10
+ } & ({
11
+ blockNumber?: never;
12
+ blockTag?: BlockTag;
13
+ } | {
14
+ blockNumber?: bigint;
15
+ blockTag?: never;
16
+ });
17
+ export type GetStorageAtReturnType = Hex | undefined;
18
+ /**
19
+ * Returns the value from a storage slot at a given address.
20
+ *
21
+ * - Docs: https://viem.sh/docs/contract/getStorageAt.html
22
+ * - JSON-RPC Methods: [`eth_getStorageAt`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getstorageat)
23
+ *
24
+ * @param client - Client to use
25
+ * @param parameters - {@link GetStorageAtParameters}
26
+ * @returns The value of the storage slot. {@link GetStorageAtReturnType}
27
+ *
28
+ * @example
29
+ * import { createPublicClient, http } from 'viem'
30
+ * import { mainnet } from 'viem/chains'
31
+ * import { getStorageAt } from 'viem/contract'
32
+ *
33
+ * const client = createPublicClient({
34
+ * chain: mainnet,
35
+ * transport: http(),
36
+ * })
37
+ * const code = await getStorageAt(client, {
38
+ * address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2',
39
+ * slot: toHex(0),
40
+ * })
41
+ */
42
+ export declare function getStorageAt<TChain extends Chain | undefined>(client: Client<Transport, TChain>, { address, blockNumber, blockTag, slot }: GetStorageAtParameters): Promise<GetStorageAtReturnType>;
43
+ //# sourceMappingURL=getStorageAt.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getStorageAt.d.ts","sourceRoot":"","sources":["../../../../src/actions/public/getStorageAt.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,SAAS,CAAA;AAEtC,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,+BAA+B,CAAA;AAC3D,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,6CAA6C,CAAA;AAC5E,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAA;AACpD,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAA;AACjD,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,qBAAqB,CAAA;AAG9C,MAAM,MAAM,sBAAsB,GAAG;IACnC,OAAO,EAAE,OAAO,CAAA;IAChB,IAAI,EAAE,GAAG,CAAA;CACV,GAAG,CACA;IACE,WAAW,CAAC,EAAE,KAAK,CAAA;IACnB,QAAQ,CAAC,EAAE,QAAQ,CAAA;CACpB,GACD;IACE,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,QAAQ,CAAC,EAAE,KAAK,CAAA;CACjB,CACJ,CAAA;AAED,MAAM,MAAM,sBAAsB,GAAG,GAAG,GAAG,SAAS,CAAA;AAEpD;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,wBAAsB,YAAY,CAAC,MAAM,SAAS,KAAK,GAAG,SAAS,EACjE,MAAM,EAAE,MAAM,CAAC,SAAS,EAAE,MAAM,CAAC,EACjC,EAAE,OAAO,EAAE,WAAW,EAAE,QAAmB,EAAE,IAAI,EAAE,EAAE,sBAAsB,GAC1E,OAAO,CAAC,sBAAsB,CAAC,CAQjC"}
@@ -0,0 +1,65 @@
1
+ import type { Client } from '../../clients/createClient.js';
2
+ import type { Transport } from '../../clients/transports/createTransport.js';
3
+ import type { BlockTag } from '../../types/block.js';
4
+ import type { Chain } from '../../types/chain.js';
5
+ import type { Hash } from '../../types/misc.js';
6
+ import { type FormattedTransaction } from '../../utils/formatters/transaction.js';
7
+ export type GetTransactionParameters<TBlockTag extends BlockTag = 'latest'> = {
8
+ /** The block hash */
9
+ blockHash: Hash;
10
+ blockNumber?: never;
11
+ blockTag?: never;
12
+ hash?: never;
13
+ /** The index of the transaction on the block. */
14
+ index: number;
15
+ } | {
16
+ blockHash?: never;
17
+ /** The block number */
18
+ blockNumber: bigint;
19
+ blockTag?: never;
20
+ hash?: never;
21
+ /** The index of the transaction on the block. */
22
+ index: number;
23
+ } | {
24
+ blockHash?: never;
25
+ blockNumber?: never;
26
+ /** The block tag. */
27
+ blockTag: TBlockTag | BlockTag;
28
+ hash?: never;
29
+ /** The index of the transaction on the block. */
30
+ index: number;
31
+ } | {
32
+ blockHash?: never;
33
+ blockNumber?: never;
34
+ blockTag?: never;
35
+ /** The hash of the transaction. */
36
+ hash: Hash;
37
+ index?: number;
38
+ };
39
+ export type GetTransactionReturnType<TChain extends Chain | undefined = Chain, TBlockTag extends BlockTag = 'latest'> = FormattedTransaction<TChain, TBlockTag>;
40
+ /**
41
+ * Returns information about a [Transaction](https://viem.sh/docs/glossary/terms.html#transaction) given a hash or block identifier.
42
+ *
43
+ * - Docs: https://viem.sh/docs/actions/public/getTransaction.html
44
+ * - Example: https://stackblitz.com/github/wagmi-dev/viem/tree/main/examples/transactions/fetching-transactions
45
+ * - JSON-RPC Methods: [`eth_getTransactionByHash`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getTransactionByHash)
46
+ *
47
+ * @param client - Client to use
48
+ * @param parameters - {@link GetTransactionParameters}
49
+ * @returns The transaction information. {@link GetTransactionReturnType}
50
+ *
51
+ * @example
52
+ * import { createPublicClient, http } from 'viem'
53
+ * import { mainnet } from 'viem/chains'
54
+ * import { getTransaction } from 'viem/public'
55
+ *
56
+ * const client = createPublicClient({
57
+ * chain: mainnet,
58
+ * transport: http(),
59
+ * })
60
+ * const transaction = await getTransaction(client, {
61
+ * hash: '0x4ca7ee652d57678f26e887c149ab0735f41de37bcad58c9f6d3ed5824f15b74d',
62
+ * })
63
+ */
64
+ export declare function getTransaction<TChain extends Chain | undefined, TBlockTag extends BlockTag = 'latest'>(client: Client<Transport, TChain>, { blockHash, blockNumber, blockTag: blockTag_, hash, index, }: GetTransactionParameters<TBlockTag>): Promise<GetTransactionReturnType<TChain, TBlockTag>>;
65
+ //# sourceMappingURL=getTransaction.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getTransaction.d.ts","sourceRoot":"","sources":["../../../../src/actions/public/getTransaction.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,+BAA+B,CAAA;AAC3D,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,6CAA6C,CAAA;AAE5E,OAAO,KAAK,EAAE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oBAAoB,CAAC,MAAM,EAAE,SAAS,CAAC,CAAA;AAE3C;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,wBAAsB,cAAc,CAClC,MAAM,SAAS,KAAK,GAAG,SAAS,EAChC,SAAS,SAAS,QAAQ,GAAG,QAAQ,EAErC,MAAM,EAAE,MAAM,CAAC,SAAS,EAAE,MAAM,CAAC,EACjC,EACE,SAAS,EACT,WAAW,EACX,QAAQ,EAAE,SAAS,EACnB,IAAI,EACJ,KAAK,GACN,EAAE,wBAAwB,CAAC,SAAS,CAAC,GACrC,OAAO,CAAC,wBAAwB,CAAC,MAAM,EAAE,SAAS,CAAC,CAAC,CAoCtD"}
@@ -0,0 +1,41 @@
1
+ import type { Client } from '../../clients/createClient.js';
2
+ import type { Transport } from '../../clients/transports/createTransport.js';
3
+ import type { Chain } from '../../types/chain.js';
4
+ import type { Hash } from '../../types/misc.js';
5
+ import type { FormattedTransactionReceipt } from '../../utils/formatters/transactionReceipt.js';
6
+ export type GetTransactionConfirmationsParameters<TChain extends Chain | undefined = Chain> = {
7
+ /** The transaction hash. */
8
+ hash: Hash;
9
+ transactionReceipt?: never;
10
+ } | {
11
+ hash?: never;
12
+ /** The transaction receipt. */
13
+ transactionReceipt: FormattedTransactionReceipt<TChain>;
14
+ };
15
+ export type GetTransactionConfirmationsReturnType = bigint;
16
+ /**
17
+ * Returns the number of blocks passed (confirmations) since the transaction was processed on a block.
18
+ *
19
+ * - Docs: https://viem.sh/docs/actions/public/getTransactionConfirmations.html
20
+ * - Example: https://stackblitz.com/github/wagmi-dev/viem/tree/main/examples/transactions/fetching-transactions
21
+ * - JSON-RPC Methods: [`eth_getTransactionConfirmations`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getTransactionConfirmations)
22
+ *
23
+ * @param client - Client to use
24
+ * @param parameters - {@link GetTransactionConfirmationsParameters}
25
+ * @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}
26
+ *
27
+ * @example
28
+ * import { createPublicClient, http } from 'viem'
29
+ * import { mainnet } from 'viem/chains'
30
+ * import { getTransactionConfirmations } from 'viem/public'
31
+ *
32
+ * const client = createPublicClient({
33
+ * chain: mainnet,
34
+ * transport: http(),
35
+ * })
36
+ * const confirmations = await getTransactionConfirmations(client, {
37
+ * hash: '0x4ca7ee652d57678f26e887c149ab0735f41de37bcad58c9f6d3ed5824f15b74d',
38
+ * })
39
+ */
40
+ export declare function getTransactionConfirmations<TChain extends Chain | undefined>(client: Client<Transport, TChain>, { hash, transactionReceipt }: GetTransactionConfirmationsParameters<TChain>): Promise<GetTransactionConfirmationsReturnType>;
41
+ //# sourceMappingURL=getTransactionConfirmations.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getTransactionConfirmations.d.ts","sourceRoot":"","sources":["../../../../src/actions/public/getTransactionConfirmations.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,+BAA+B,CAAA;AAC3D,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,6CAA6C,CAAA;AAC5E,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAA;AACjD,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,qBAAqB,CAAA;AAC/C,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,8CAA8C,CAAA;AAK/F,MAAM,MAAM,qCAAqC,CAC/C,MAAM,SAAS,KAAK,GAAG,SAAS,GAAG,KAAK,IAEtC;IACE,4BAA4B;IAC5B,IAAI,EAAE,IAAI,CAAA;IACV,kBAAkB,CAAC,EAAE,KAAK,CAAA;CAC3B,GACD;IACE,IAAI,CAAC,EAAE,KAAK,CAAA;IACZ,+BAA+B;IAC/B,kBAAkB,EAAE,2BAA2B,CAAC,MAAM,CAAC,CAAA;CACxD,CAAA;AAEL,MAAM,MAAM,qCAAqC,GAAG,MAAM,CAAA;AAE1D;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,wBAAsB,2BAA2B,CAC/C,MAAM,SAAS,KAAK,GAAG,SAAS,EAEhC,MAAM,EAAE,MAAM,CAAC,SAAS,EAAE,MAAM,CAAC,EACjC,EAAE,IAAI,EAAE,kBAAkB,EAAE,EAAE,qCAAqC,CAAC,MAAM,CAAC,GAC1E,OAAO,CAAC,qCAAqC,CAAC,CAShD"}
@@ -0,0 +1,44 @@
1
+ import type { Address } from 'abitype';
2
+ import type { Account } from '../../accounts/types.js';
3
+ import type { Client } from '../../clients/createClient.js';
4
+ import type { Transport } from '../../clients/transports/createTransport.js';
5
+ import type { BlockTag } from '../../types/block.js';
6
+ import type { Chain } from '../../types/chain.js';
7
+ export type GetTransactionCountParameters = {
8
+ /** The account address. */
9
+ address: Address;
10
+ } & ({
11
+ /** The block number. */
12
+ blockNumber?: bigint;
13
+ blockTag?: never;
14
+ } | {
15
+ blockNumber?: never;
16
+ /** The block tag. Defaults to 'latest'. */
17
+ blockTag?: BlockTag;
18
+ });
19
+ export type GetTransactionCountReturnType = number;
20
+ /**
21
+ * Returns the number of [Transactions](https://viem.sh/docs/glossary/terms.html#transaction) an Account has broadcast / sent.
22
+ *
23
+ * - Docs: https://viem.sh/docs/actions/public/getTransactionCount.html
24
+ * - JSON-RPC Methods: [`eth_getTransactionCount`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_gettransactioncount)
25
+ *
26
+ * @param client - Client to use
27
+ * @param parameters - {@link GetTransactionCountParameters}
28
+ * @returns The number of transactions an account has sent. {@link GetTransactionCountReturnType}
29
+ *
30
+ * @example
31
+ * import { createPublicClient, http } from 'viem'
32
+ * import { mainnet } from 'viem/chains'
33
+ * import { getTransactionCount } from 'viem/public'
34
+ *
35
+ * const client = createPublicClient({
36
+ * chain: mainnet,
37
+ * transport: http(),
38
+ * })
39
+ * const transactionCount = await getTransactionCount(client, {
40
+ * address: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e',
41
+ * })
42
+ */
43
+ export declare function getTransactionCount<TChain extends Chain | undefined, TAccount extends Account | undefined>(client: Client<Transport, TChain, TAccount>, { address, blockTag, blockNumber }: GetTransactionCountParameters): Promise<GetTransactionCountReturnType>;
44
+ //# sourceMappingURL=getTransactionCount.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getTransactionCount.d.ts","sourceRoot":"","sources":["../../../../src/actions/public/getTransactionCount.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,SAAS,CAAA;AAEtC,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,yBAAyB,CAAA;AACtD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,+BAA+B,CAAA;AAC3D,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,6CAA6C,CAAA;AAC5E,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAA;AACpD,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAA;AAIjD,MAAM,MAAM,6BAA6B,GAAG;IAC1C,2BAA2B;IAC3B,OAAO,EAAE,OAAO,CAAA;CACjB,GAAG,CACA;IACE,wBAAwB;IACxB,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,QAAQ,CAAC,EAAE,KAAK,CAAA;CACjB,GACD;IACE,WAAW,CAAC,EAAE,KAAK,CAAA;IACnB,2CAA2C;IAC3C,QAAQ,CAAC,EAAE,QAAQ,CAAA;CACpB,CACJ,CAAA;AACD,MAAM,MAAM,6BAA6B,GAAG,MAAM,CAAA;AAElD;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,wBAAsB,mBAAmB,CACvC,MAAM,SAAS,KAAK,GAAG,SAAS,EAChC,QAAQ,SAAS,OAAO,GAAG,SAAS,EAEpC,MAAM,EAAE,MAAM,CAAC,SAAS,EAAE,MAAM,EAAE,QAAQ,CAAC,EAC3C,EAAE,OAAO,EAAE,QAAmB,EAAE,WAAW,EAAE,EAAE,6BAA6B,GAC3E,OAAO,CAAC,6BAA6B,CAAC,CAMxC"}
@@ -0,0 +1,36 @@
1
+ import type { Client } from '../../clients/createClient.js';
2
+ import type { Transport } from '../../clients/transports/createTransport.js';
3
+ import type { Chain } from '../../types/chain.js';
4
+ import type { Hash } from '../../types/misc.js';
5
+ import { type FormattedTransactionReceipt } from '../../utils/formatters/transactionReceipt.js';
6
+ export type GetTransactionReceiptParameters = {
7
+ /** The hash of the transaction. */
8
+ hash: Hash;
9
+ };
10
+ export type GetTransactionReceiptReturnType<TChain extends Chain | undefined = Chain | undefined> = FormattedTransactionReceipt<TChain>;
11
+ /**
12
+ * 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.
13
+ *
14
+ * - Docs: https://viem.sh/docs/actions/public/getTransactionReceipt.html
15
+ * - Example: https://stackblitz.com/github/wagmi-dev/viem/tree/main/examples/transactions/fetching-transactions
16
+ * - JSON-RPC Methods: [`eth_getTransactionReceipt`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_gettransactionreceipt)
17
+ *
18
+ * @param client - Client to use
19
+ * @param parameters - {@link GetTransactionReceiptParameters}
20
+ * @returns The transaction receipt. {@link GetTransactionReceiptReturnType}
21
+ *
22
+ * @example
23
+ * import { createPublicClient, http } from 'viem'
24
+ * import { mainnet } from 'viem/chains'
25
+ * import { getTransactionReceipt } from 'viem/public'
26
+ *
27
+ * const client = createPublicClient({
28
+ * chain: mainnet,
29
+ * transport: http(),
30
+ * })
31
+ * const transactionReceipt = await getTransactionReceipt(client, {
32
+ * hash: '0x4ca7ee652d57678f26e887c149ab0735f41de37bcad58c9f6d3ed5824f15b74d',
33
+ * })
34
+ */
35
+ export declare function getTransactionReceipt<TChain extends Chain | undefined>(client: Client<Transport, TChain>, { hash }: GetTransactionReceiptParameters): Promise<import("../../types/chain.js").ExtractChainFormatterReturnType<TChain, "transactionReceipt", import("../../index.js").TransactionReceipt>>;
36
+ //# sourceMappingURL=getTransactionReceipt.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getTransactionReceipt.d.ts","sourceRoot":"","sources":["../../../../src/actions/public/getTransactionReceipt.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,+BAA+B,CAAA;AAC3D,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,6CAA6C,CAAA;AAE5E,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAA;AACjD,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,qBAAqB,CAAA;AAC/C,OAAO,EACL,KAAK,2BAA2B,EAEjC,MAAM,8CAA8C,CAAA;AAErD,MAAM,MAAM,+BAA+B,GAAG;IAC5C,mCAAmC;IACnC,IAAI,EAAE,IAAI,CAAA;CACX,CAAA;AAED,MAAM,MAAM,+BAA+B,CACzC,MAAM,SAAS,KAAK,GAAG,SAAS,GAAG,KAAK,GAAG,SAAS,IAClD,2BAA2B,CAAC,MAAM,CAAC,CAAA;AAEvC;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,wBAAsB,qBAAqB,CAAC,MAAM,SAAS,KAAK,GAAG,SAAS,EAC1E,MAAM,EAAE,MAAM,CAAC,SAAS,EAAE,MAAM,CAAC,EACjC,EAAE,IAAI,EAAE,EAAE,+BAA+B,sJAa1C"}