viem 0.3.5 → 0.3.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 (582) hide show
  1. package/dist/cjs/errors/version.js +1 -1
  2. package/dist/esm/errors/version.js +1 -1
  3. package/dist/types/abi.d.ts +3 -0
  4. package/dist/types/abi.d.ts.map +1 -0
  5. package/dist/types/accounts/generateMnemonic.d.ts +9 -0
  6. package/dist/types/accounts/generateMnemonic.d.ts.map +1 -0
  7. package/dist/types/accounts/generatePrivateKey.d.ts +8 -0
  8. package/dist/types/accounts/generatePrivateKey.d.ts.map +1 -0
  9. package/dist/types/accounts/hdKeyToAccount.d.ts +9 -0
  10. package/dist/types/accounts/hdKeyToAccount.d.ts.map +1 -0
  11. package/dist/types/accounts/index.d.ts +21 -0
  12. package/dist/types/accounts/index.d.ts.map +1 -0
  13. package/dist/types/accounts/mnemonicToAccount.d.ts +8 -0
  14. package/dist/types/accounts/mnemonicToAccount.d.ts.map +1 -0
  15. package/dist/types/accounts/privateKeyToAccount.d.ts +9 -0
  16. package/dist/types/accounts/privateKeyToAccount.d.ts.map +1 -0
  17. package/dist/types/accounts/toAccount.d.ts +11 -0
  18. package/dist/types/accounts/toAccount.d.ts.map +1 -0
  19. package/dist/types/accounts/types.d.ts +45 -0
  20. package/dist/types/accounts/types.d.ts.map +1 -0
  21. package/dist/types/accounts/utils/index.d.ts +10 -0
  22. package/dist/types/accounts/utils/index.d.ts.map +1 -0
  23. package/dist/types/accounts/utils/parseAccount.d.ts +4 -0
  24. package/dist/types/accounts/utils/parseAccount.d.ts.map +1 -0
  25. package/dist/types/accounts/utils/publicKeyToAddress.d.ts +10 -0
  26. package/dist/types/accounts/utils/publicKeyToAddress.d.ts.map +1 -0
  27. package/dist/types/accounts/utils/sign.d.ts +16 -0
  28. package/dist/types/accounts/utils/sign.d.ts.map +1 -0
  29. package/dist/types/accounts/utils/signMessage.d.ts +16 -0
  30. package/dist/types/accounts/utils/signMessage.d.ts.map +1 -0
  31. package/dist/types/accounts/utils/signTransaction.d.ts +9 -0
  32. package/dist/types/accounts/utils/signTransaction.d.ts.map +1 -0
  33. package/dist/types/accounts/utils/signTypedData.d.ts +19 -0
  34. package/dist/types/accounts/utils/signTypedData.d.ts.map +1 -0
  35. package/dist/types/accounts/utils/signatureToHex.d.ts +3 -0
  36. package/dist/types/accounts/utils/signatureToHex.d.ts.map +1 -0
  37. package/dist/types/accounts/wordlists/czech.d.ts +2 -0
  38. package/dist/types/accounts/wordlists/czech.d.ts.map +1 -0
  39. package/dist/types/accounts/wordlists/english.d.ts +2 -0
  40. package/dist/types/accounts/wordlists/english.d.ts.map +1 -0
  41. package/dist/types/accounts/wordlists/french.d.ts +2 -0
  42. package/dist/types/accounts/wordlists/french.d.ts.map +1 -0
  43. package/dist/types/accounts/wordlists/italian.d.ts +2 -0
  44. package/dist/types/accounts/wordlists/italian.d.ts.map +1 -0
  45. package/dist/types/accounts/wordlists/japanese.d.ts +2 -0
  46. package/dist/types/accounts/wordlists/japanese.d.ts.map +1 -0
  47. package/dist/types/accounts/wordlists/korean.d.ts +2 -0
  48. package/dist/types/accounts/wordlists/korean.d.ts.map +1 -0
  49. package/dist/types/accounts/wordlists/simplifiedChinese.d.ts +2 -0
  50. package/dist/types/accounts/wordlists/simplifiedChinese.d.ts.map +1 -0
  51. package/dist/types/accounts/wordlists/spanish.d.ts +2 -0
  52. package/dist/types/accounts/wordlists/spanish.d.ts.map +1 -0
  53. package/dist/types/accounts/wordlists/traditionalChinese.d.ts +2 -0
  54. package/dist/types/accounts/wordlists/traditionalChinese.d.ts.map +1 -0
  55. package/dist/types/actions/ens/getEnsAddress.d.ts +40 -0
  56. package/dist/types/actions/ens/getEnsAddress.d.ts.map +1 -0
  57. package/dist/types/actions/ens/getEnsAvatar.d.ts +38 -0
  58. package/dist/types/actions/ens/getEnsAvatar.d.ts.map +1 -0
  59. package/dist/types/actions/ens/getEnsName.d.ts +38 -0
  60. package/dist/types/actions/ens/getEnsName.d.ts.map +1 -0
  61. package/dist/types/actions/ens/getEnsResolver.d.ts +40 -0
  62. package/dist/types/actions/ens/getEnsResolver.d.ts.map +1 -0
  63. package/dist/types/actions/ens/getEnsText.d.ts +43 -0
  64. package/dist/types/actions/ens/getEnsText.d.ts.map +1 -0
  65. package/dist/types/actions/ens/index.d.ts +6 -0
  66. package/dist/types/actions/ens/index.d.ts.map +1 -0
  67. package/dist/types/actions/getContract.d.ts +261 -0
  68. package/dist/types/actions/getContract.d.ts.map +1 -0
  69. package/dist/types/actions/index.d.ts +11 -0
  70. package/dist/types/actions/index.d.ts.map +1 -0
  71. package/dist/types/actions/public/call.d.ts +49 -0
  72. package/dist/types/actions/public/call.d.ts.map +1 -0
  73. package/dist/types/actions/public/createBlockFilter.d.ts +26 -0
  74. package/dist/types/actions/public/createBlockFilter.d.ts.map +1 -0
  75. package/dist/types/actions/public/createContractEventFilter.d.ts +41 -0
  76. package/dist/types/actions/public/createContractEventFilter.d.ts.map +1 -0
  77. package/dist/types/actions/public/createEventFilter.d.ts +46 -0
  78. package/dist/types/actions/public/createEventFilter.d.ts.map +1 -0
  79. package/dist/types/actions/public/createPendingTransactionFilter.d.ts +26 -0
  80. package/dist/types/actions/public/createPendingTransactionFilter.d.ts.map +1 -0
  81. package/dist/types/actions/public/estimateContractGas.d.ts +35 -0
  82. package/dist/types/actions/public/estimateContractGas.d.ts.map +1 -0
  83. package/dist/types/actions/public/estimateGas.d.ts +45 -0
  84. package/dist/types/actions/public/estimateGas.d.ts.map +1 -0
  85. package/dist/types/actions/public/getBalance.d.ts +52 -0
  86. package/dist/types/actions/public/getBalance.d.ts.map +1 -0
  87. package/dist/types/actions/public/getBlock.d.ts +52 -0
  88. package/dist/types/actions/public/getBlock.d.ts.map +1 -0
  89. package/dist/types/actions/public/getBlockNumber.d.ts +54 -0
  90. package/dist/types/actions/public/getBlockNumber.d.ts.map +1 -0
  91. package/dist/types/actions/public/getBlockTransactionCount.d.ts +44 -0
  92. package/dist/types/actions/public/getBlockTransactionCount.d.ts.map +1 -0
  93. package/dist/types/actions/public/getBytecode.d.ts +37 -0
  94. package/dist/types/actions/public/getBytecode.d.ts.map +1 -0
  95. package/dist/types/actions/public/getChainId.d.ts +26 -0
  96. package/dist/types/actions/public/getChainId.d.ts.map +1 -0
  97. package/dist/types/actions/public/getFeeHistory.d.ts +50 -0
  98. package/dist/types/actions/public/getFeeHistory.d.ts.map +1 -0
  99. package/dist/types/actions/public/getFilterChanges.d.ts +91 -0
  100. package/dist/types/actions/public/getFilterChanges.d.ts.map +1 -0
  101. package/dist/types/actions/public/getFilterLogs.d.ts +36 -0
  102. package/dist/types/actions/public/getFilterLogs.d.ts.map +1 -0
  103. package/dist/types/actions/public/getGasPrice.d.ts +25 -0
  104. package/dist/types/actions/public/getGasPrice.d.ts.map +1 -0
  105. package/dist/types/actions/public/getLogs.d.ts +49 -0
  106. package/dist/types/actions/public/getLogs.d.ts.map +1 -0
  107. package/dist/types/actions/public/getStorageAt.d.ts +39 -0
  108. package/dist/types/actions/public/getStorageAt.d.ts.map +1 -0
  109. package/dist/types/actions/public/getTransaction.d.ts +62 -0
  110. package/dist/types/actions/public/getTransaction.d.ts.map +1 -0
  111. package/dist/types/actions/public/getTransactionConfirmations.d.ts +39 -0
  112. package/dist/types/actions/public/getTransactionConfirmations.d.ts.map +1 -0
  113. package/dist/types/actions/public/getTransactionCount.d.ts +40 -0
  114. package/dist/types/actions/public/getTransactionCount.d.ts.map +1 -0
  115. package/dist/types/actions/public/getTransactionReceipt.d.ts +34 -0
  116. package/dist/types/actions/public/getTransactionReceipt.d.ts.map +1 -0
  117. package/dist/types/actions/public/index.d.ts +67 -0
  118. package/dist/types/actions/public/index.d.ts.map +1 -0
  119. package/dist/types/actions/public/multicall.d.ts +52 -0
  120. package/dist/types/actions/public/multicall.d.ts.map +1 -0
  121. package/dist/types/actions/public/readContract.d.ts +39 -0
  122. package/dist/types/actions/public/readContract.d.ts.map +1 -0
  123. package/dist/types/actions/public/simulateContract.d.ts +47 -0
  124. package/dist/types/actions/public/simulateContract.d.ts.map +1 -0
  125. package/dist/types/actions/public/uninstallFilter.d.ts +32 -0
  126. package/dist/types/actions/public/uninstallFilter.d.ts.map +1 -0
  127. package/dist/types/actions/public/waitForTransactionReceipt.d.ts +69 -0
  128. package/dist/types/actions/public/waitForTransactionReceipt.d.ts.map +1 -0
  129. package/dist/types/actions/public/watchBlockNumber.d.ts +57 -0
  130. package/dist/types/actions/public/watchBlockNumber.d.ts.map +1 -0
  131. package/dist/types/actions/public/watchBlocks.d.ts +64 -0
  132. package/dist/types/actions/public/watchBlocks.d.ts.map +1 -0
  133. package/dist/types/actions/public/watchContractEvent.d.ts +55 -0
  134. package/dist/types/actions/public/watchContractEvent.d.ts.map +1 -0
  135. package/dist/types/actions/public/watchEvent.d.ts +61 -0
  136. package/dist/types/actions/public/watchEvent.d.ts.map +1 -0
  137. package/dist/types/actions/public/watchPendingTransactions.d.ts +71 -0
  138. package/dist/types/actions/public/watchPendingTransactions.d.ts.map +1 -0
  139. package/dist/types/actions/test/dropTransaction.d.ts +30 -0
  140. package/dist/types/actions/test/dropTransaction.d.ts.map +1 -0
  141. package/dist/types/actions/test/getAutomine.d.ts +25 -0
  142. package/dist/types/actions/test/getAutomine.d.ts.map +1 -0
  143. package/dist/types/actions/test/getTxpoolContent.d.ts +31 -0
  144. package/dist/types/actions/test/getTxpoolContent.d.ts.map +1 -0
  145. package/dist/types/actions/test/getTxpoolStatus.d.ts +28 -0
  146. package/dist/types/actions/test/getTxpoolStatus.d.ts.map +1 -0
  147. package/dist/types/actions/test/impersonateAccount.d.ts +30 -0
  148. package/dist/types/actions/test/impersonateAccount.d.ts.map +1 -0
  149. package/dist/types/actions/test/increaseTime.d.ts +30 -0
  150. package/dist/types/actions/test/increaseTime.d.ts.map +1 -0
  151. package/dist/types/actions/test/index.d.ts +52 -0
  152. package/dist/types/actions/test/index.d.ts.map +1 -0
  153. package/dist/types/actions/test/inspectTxpool.d.ts +28 -0
  154. package/dist/types/actions/test/inspectTxpool.d.ts.map +1 -0
  155. package/dist/types/actions/test/mine.d.ts +30 -0
  156. package/dist/types/actions/test/mine.d.ts.map +1 -0
  157. package/dist/types/actions/test/removeBlockTimestampInterval.d.ts +23 -0
  158. package/dist/types/actions/test/removeBlockTimestampInterval.d.ts.map +1 -0
  159. package/dist/types/actions/test/reset.d.ts +30 -0
  160. package/dist/types/actions/test/reset.d.ts.map +1 -0
  161. package/dist/types/actions/test/revert.d.ts +28 -0
  162. package/dist/types/actions/test/revert.d.ts.map +1 -0
  163. package/dist/types/actions/test/sendUnsignedTransaction.d.ts +31 -0
  164. package/dist/types/actions/test/sendUnsignedTransaction.d.ts.map +1 -0
  165. package/dist/types/actions/test/setAutomine.d.ts +23 -0
  166. package/dist/types/actions/test/setAutomine.d.ts.map +1 -0
  167. package/dist/types/actions/test/setBalance.d.ts +33 -0
  168. package/dist/types/actions/test/setBalance.d.ts.map +1 -0
  169. package/dist/types/actions/test/setBlockGasLimit.d.ts +28 -0
  170. package/dist/types/actions/test/setBlockGasLimit.d.ts.map +1 -0
  171. package/dist/types/actions/test/setBlockTimestampInterval.d.ts +28 -0
  172. package/dist/types/actions/test/setBlockTimestampInterval.d.ts.map +1 -0
  173. package/dist/types/actions/test/setCode.d.ts +33 -0
  174. package/dist/types/actions/test/setCode.d.ts.map +1 -0
  175. package/dist/types/actions/test/setCoinbase.d.ts +30 -0
  176. package/dist/types/actions/test/setCoinbase.d.ts.map +1 -0
  177. package/dist/types/actions/test/setIntervalMining.d.ts +28 -0
  178. package/dist/types/actions/test/setIntervalMining.d.ts.map +1 -0
  179. package/dist/types/actions/test/setLoggingEnabled.d.ts +23 -0
  180. package/dist/types/actions/test/setLoggingEnabled.d.ts.map +1 -0
  181. package/dist/types/actions/test/setMinGasPrice.d.ts +32 -0
  182. package/dist/types/actions/test/setMinGasPrice.d.ts.map +1 -0
  183. package/dist/types/actions/test/setNextBlockBaseFeePerGas.d.ts +30 -0
  184. package/dist/types/actions/test/setNextBlockBaseFeePerGas.d.ts.map +1 -0
  185. package/dist/types/actions/test/setNextBlockTimestamp.d.ts +28 -0
  186. package/dist/types/actions/test/setNextBlockTimestamp.d.ts.map +1 -0
  187. package/dist/types/actions/test/setNonce.d.ts +33 -0
  188. package/dist/types/actions/test/setNonce.d.ts.map +1 -0
  189. package/dist/types/actions/test/setRpcUrl.d.ts +24 -0
  190. package/dist/types/actions/test/setRpcUrl.d.ts.map +1 -0
  191. package/dist/types/actions/test/setStorageAt.d.ts +36 -0
  192. package/dist/types/actions/test/setStorageAt.d.ts.map +1 -0
  193. package/dist/types/actions/test/snapshot.d.ts +23 -0
  194. package/dist/types/actions/test/snapshot.d.ts.map +1 -0
  195. package/dist/types/actions/test/stopImpersonatingAccount.d.ts +30 -0
  196. package/dist/types/actions/test/stopImpersonatingAccount.d.ts.map +1 -0
  197. package/dist/types/actions/wallet/addChain.d.ts +27 -0
  198. package/dist/types/actions/wallet/addChain.d.ts.map +1 -0
  199. package/dist/types/actions/wallet/deployContract.d.ts +38 -0
  200. package/dist/types/actions/wallet/deployContract.d.ts.map +1 -0
  201. package/dist/types/actions/wallet/getAddresses.d.ts +26 -0
  202. package/dist/types/actions/wallet/getAddresses.d.ts.map +1 -0
  203. package/dist/types/actions/wallet/getPermissions.d.ts +26 -0
  204. package/dist/types/actions/wallet/getPermissions.d.ts.map +1 -0
  205. package/dist/types/actions/wallet/index.d.ts +27 -0
  206. package/dist/types/actions/wallet/index.d.ts.map +1 -0
  207. package/dist/types/actions/wallet/requestAddresses.d.ts +30 -0
  208. package/dist/types/actions/wallet/requestAddresses.d.ts.map +1 -0
  209. package/dist/types/actions/wallet/requestPermissions.d.ts +34 -0
  210. package/dist/types/actions/wallet/requestPermissions.d.ts.map +1 -0
  211. package/dist/types/actions/wallet/sendTransaction.d.ts +53 -0
  212. package/dist/types/actions/wallet/sendTransaction.d.ts.map +1 -0
  213. package/dist/types/actions/wallet/signMessage.d.ts +54 -0
  214. package/dist/types/actions/wallet/signMessage.d.ts.map +1 -0
  215. package/dist/types/actions/wallet/signTypedData.d.ts +109 -0
  216. package/dist/types/actions/wallet/signTypedData.d.ts.map +1 -0
  217. package/dist/types/actions/wallet/switchChain.d.ts +28 -0
  218. package/dist/types/actions/wallet/switchChain.d.ts.map +1 -0
  219. package/dist/types/actions/wallet/watchAsset.d.ts +35 -0
  220. package/dist/types/actions/wallet/watchAsset.d.ts.map +1 -0
  221. package/dist/types/actions/wallet/writeContract.d.ts +58 -0
  222. package/dist/types/actions/wallet/writeContract.d.ts.map +1 -0
  223. package/dist/types/adapters/ethers.d.ts +27 -0
  224. package/dist/types/adapters/ethers.d.ts.map +1 -0
  225. package/dist/types/chains.d.ts +2487 -0
  226. package/dist/types/chains.d.ts.map +1 -0
  227. package/dist/types/clients/createClient.d.ts +43 -0
  228. package/dist/types/clients/createClient.d.ts.map +1 -0
  229. package/dist/types/clients/createPublicClient.d.ts +40 -0
  230. package/dist/types/clients/createPublicClient.d.ts.map +1 -0
  231. package/dist/types/clients/createTestClient.d.ts +38 -0
  232. package/dist/types/clients/createTestClient.d.ts.map +1 -0
  233. package/dist/types/clients/createWalletClient.d.ts +51 -0
  234. package/dist/types/clients/createWalletClient.d.ts.map +1 -0
  235. package/dist/types/clients/decorators/index.d.ts +7 -0
  236. package/dist/types/clients/decorators/index.d.ts.map +1 -0
  237. package/dist/types/clients/decorators/public.d.ts +1043 -0
  238. package/dist/types/clients/decorators/public.d.ts.map +1 -0
  239. package/dist/types/clients/decorators/test.d.ts +572 -0
  240. package/dist/types/clients/decorators/test.d.ts.map +1 -0
  241. package/dist/types/clients/decorators/wallet.d.ts +436 -0
  242. package/dist/types/clients/decorators/wallet.d.ts.map +1 -0
  243. package/dist/types/clients/index.d.ts +11 -0
  244. package/dist/types/clients/index.d.ts.map +1 -0
  245. package/dist/types/clients/transports/createTransport.d.ts +37 -0
  246. package/dist/types/clients/transports/createTransport.d.ts.map +1 -0
  247. package/dist/types/clients/transports/custom.d.ts +21 -0
  248. package/dist/types/clients/transports/custom.d.ts.map +1 -0
  249. package/dist/types/clients/transports/fallback.d.ts +75 -0
  250. package/dist/types/clients/transports/fallback.d.ts.map +1 -0
  251. package/dist/types/clients/transports/http.d.ts +29 -0
  252. package/dist/types/clients/transports/http.d.ts.map +1 -0
  253. package/dist/types/clients/transports/index.d.ts +11 -0
  254. package/dist/types/clients/transports/index.d.ts.map +1 -0
  255. package/dist/types/clients/transports/webSocket.d.ts +46 -0
  256. package/dist/types/clients/transports/webSocket.d.ts.map +1 -0
  257. package/dist/types/constants/abis.d.ts +79 -0
  258. package/dist/types/constants/abis.d.ts.map +1 -0
  259. package/dist/types/constants/contract.d.ts +2 -0
  260. package/dist/types/constants/contract.d.ts.map +1 -0
  261. package/dist/types/constants/index.d.ts +5 -0
  262. package/dist/types/constants/index.d.ts.map +1 -0
  263. package/dist/types/constants/solidity.d.ts +15 -0
  264. package/dist/types/constants/solidity.d.ts.map +1 -0
  265. package/dist/types/constants/unit.d.ts +13 -0
  266. package/dist/types/constants/unit.d.ts.map +1 -0
  267. package/dist/types/contract.d.ts +7 -0
  268. package/dist/types/contract.d.ts.map +1 -0
  269. package/dist/types/ens.d.ts +5 -0
  270. package/dist/types/ens.d.ts.map +1 -0
  271. package/dist/types/errors/abi.d.ts +165 -0
  272. package/dist/types/errors/abi.d.ts.map +1 -0
  273. package/dist/types/errors/account.d.ts +8 -0
  274. package/dist/types/errors/account.d.ts.map +1 -0
  275. package/dist/types/errors/address.d.ts +8 -0
  276. package/dist/types/errors/address.d.ts.map +1 -0
  277. package/dist/types/errors/base.d.ts +22 -0
  278. package/dist/types/errors/base.d.ts.map +1 -0
  279. package/dist/types/errors/block.d.ts +10 -0
  280. package/dist/types/errors/block.d.ts.map +1 -0
  281. package/dist/types/errors/chain.d.ts +35 -0
  282. package/dist/types/errors/chain.d.ts.map +1 -0
  283. package/dist/types/errors/contract.d.ts +58 -0
  284. package/dist/types/errors/contract.d.ts.map +1 -0
  285. package/dist/types/errors/data.d.ts +10 -0
  286. package/dist/types/errors/data.d.ts.map +1 -0
  287. package/dist/types/errors/encoding.d.ts +53 -0
  288. package/dist/types/errors/encoding.d.ts.map +1 -0
  289. package/dist/types/errors/ens.d.ts +26 -0
  290. package/dist/types/errors/ens.d.ts.map +1 -0
  291. package/dist/types/errors/estimateGas.d.ts +13 -0
  292. package/dist/types/errors/estimateGas.d.ts.map +1 -0
  293. package/dist/types/errors/index.d.ts +18 -0
  294. package/dist/types/errors/index.d.ts.map +1 -0
  295. package/dist/types/errors/log.d.ts +6 -0
  296. package/dist/types/errors/log.d.ts.map +1 -0
  297. package/dist/types/errors/node.d.ts +105 -0
  298. package/dist/types/errors/node.d.ts.map +1 -0
  299. package/dist/types/errors/request.d.ts +53 -0
  300. package/dist/types/errors/request.d.ts.map +1 -0
  301. package/dist/types/errors/rpc.d.ts +199 -0
  302. package/dist/types/errors/rpc.d.ts.map +1 -0
  303. package/dist/types/errors/transaction.d.ts +75 -0
  304. package/dist/types/errors/transaction.d.ts.map +1 -0
  305. package/dist/types/errors/transport.d.ts +5 -0
  306. package/dist/types/errors/transport.d.ts.map +1 -0
  307. package/dist/types/errors/utils.d.ts +5 -0
  308. package/dist/types/errors/utils.d.ts.map +1 -0
  309. package/dist/types/errors/version.d.ts +2 -0
  310. package/dist/types/errors/version.d.ts.map +1 -0
  311. package/dist/types/ethers.d.ts +2 -0
  312. package/dist/types/ethers.d.ts.map +1 -0
  313. package/dist/types/index.d.ts +12 -0
  314. package/dist/types/index.d.ts.map +1 -0
  315. package/dist/types/public.d.ts +3 -0
  316. package/dist/types/public.d.ts.map +1 -0
  317. package/dist/types/test.d.ts +3 -0
  318. package/dist/types/test.d.ts.map +1 -0
  319. package/dist/types/types/account.d.ts +11 -0
  320. package/dist/types/types/account.d.ts.map +1 -0
  321. package/dist/types/types/block.d.ts +62 -0
  322. package/dist/types/types/block.d.ts.map +1 -0
  323. package/dist/types/types/chain.d.ts +17 -0
  324. package/dist/types/types/chain.d.ts.map +1 -0
  325. package/dist/types/types/contract.d.ts +159 -0
  326. package/dist/types/types/contract.d.ts.map +1 -0
  327. package/dist/types/types/eip1193.d.ts +1002 -0
  328. package/dist/types/types/eip1193.d.ts.map +1 -0
  329. package/dist/types/types/ens.d.ts +5 -0
  330. package/dist/types/types/ens.d.ts.map +1 -0
  331. package/dist/types/types/fee.d.ts +28 -0
  332. package/dist/types/types/fee.d.ts.map +1 -0
  333. package/dist/types/types/filter.d.ts +27 -0
  334. package/dist/types/types/filter.d.ts.map +1 -0
  335. package/dist/types/types/formatter.d.ts +13 -0
  336. package/dist/types/types/formatter.d.ts.map +1 -0
  337. package/dist/types/types/index.d.ts +19 -0
  338. package/dist/types/types/index.d.ts.map +1 -0
  339. package/dist/types/types/log.d.ts +42 -0
  340. package/dist/types/types/log.d.ts.map +1 -0
  341. package/dist/types/types/misc.d.ts +10 -0
  342. package/dist/types/types/misc.d.ts.map +1 -0
  343. package/dist/types/types/multicall.d.ts +48 -0
  344. package/dist/types/types/multicall.d.ts.map +1 -0
  345. package/dist/types/types/rpc.d.ts +19 -0
  346. package/dist/types/types/rpc.d.ts.map +1 -0
  347. package/dist/types/types/transaction.d.ts +132 -0
  348. package/dist/types/types/transaction.d.ts.map +1 -0
  349. package/dist/types/types/transport.d.ts +3 -0
  350. package/dist/types/types/transport.d.ts.map +1 -0
  351. package/dist/types/types/typedData.d.ts +47 -0
  352. package/dist/types/types/typedData.d.ts.map +1 -0
  353. package/dist/types/types/utils.d.ts +156 -0
  354. package/dist/types/types/utils.d.ts.map +1 -0
  355. package/dist/types/types/window.d.ts +7 -0
  356. package/dist/types/types/window.d.ts.map +1 -0
  357. package/dist/types/utils/abi/decodeAbiParameters.d.ts +5 -0
  358. package/dist/types/utils/abi/decodeAbiParameters.d.ts.map +1 -0
  359. package/dist/types/utils/abi/decodeDeployData.d.ts +13 -0
  360. package/dist/types/utils/abi/decodeDeployData.d.ts.map +1 -0
  361. package/dist/types/utils/abi/decodeErrorResult.d.ts +13 -0
  362. package/dist/types/utils/abi/decodeErrorResult.d.ts.map +1 -0
  363. package/dist/types/utils/abi/decodeEventLog.d.ts +13 -0
  364. package/dist/types/utils/abi/decodeEventLog.d.ts.map +1 -0
  365. package/dist/types/utils/abi/decodeFunctionData.d.ts +14 -0
  366. package/dist/types/utils/abi/decodeFunctionData.d.ts.map +1 -0
  367. package/dist/types/utils/abi/decodeFunctionResult.d.ts +10 -0
  368. package/dist/types/utils/abi/decodeFunctionResult.d.ts.map +1 -0
  369. package/dist/types/utils/abi/encodeAbiParameters.d.ts +9 -0
  370. package/dist/types/utils/abi/encodeAbiParameters.d.ts.map +1 -0
  371. package/dist/types/utils/abi/encodeDeployData.d.ts +8 -0
  372. package/dist/types/utils/abi/encodeDeployData.d.ts.map +1 -0
  373. package/dist/types/utils/abi/encodeErrorResult.d.ts +8 -0
  374. package/dist/types/utils/abi/encodeErrorResult.d.ts.map +1 -0
  375. package/dist/types/utils/abi/encodeEventTopics.d.ts +9 -0
  376. package/dist/types/utils/abi/encodeEventTopics.d.ts.map +1 -0
  377. package/dist/types/utils/abi/encodeFunctionData.d.ts +8 -0
  378. package/dist/types/utils/abi/encodeFunctionData.d.ts.map +1 -0
  379. package/dist/types/utils/abi/encodeFunctionResult.d.ts +9 -0
  380. package/dist/types/utils/abi/encodeFunctionResult.d.ts.map +1 -0
  381. package/dist/types/utils/abi/encodePacked.d.ts +11 -0
  382. package/dist/types/utils/abi/encodePacked.d.ts.map +1 -0
  383. package/dist/types/utils/abi/formatAbiItem.d.ts +9 -0
  384. package/dist/types/utils/abi/formatAbiItem.d.ts.map +1 -0
  385. package/dist/types/utils/abi/formatAbiItemWithArgs.d.ts +8 -0
  386. package/dist/types/utils/abi/formatAbiItemWithArgs.d.ts.map +1 -0
  387. package/dist/types/utils/abi/getAbiItem.d.ts +12 -0
  388. package/dist/types/utils/abi/getAbiItem.d.ts.map +1 -0
  389. package/dist/types/utils/abi/index.d.ts +30 -0
  390. package/dist/types/utils/abi/index.d.ts.map +1 -0
  391. package/dist/types/utils/accounts.d.ts +3 -0
  392. package/dist/types/utils/accounts.d.ts.map +1 -0
  393. package/dist/types/utils/address/getAddress.d.ts +4 -0
  394. package/dist/types/utils/address/getAddress.d.ts.map +1 -0
  395. package/dist/types/utils/address/getContractAddress.d.ts +19 -0
  396. package/dist/types/utils/address/getContractAddress.d.ts.map +1 -0
  397. package/dist/types/utils/address/index.d.ts +6 -0
  398. package/dist/types/utils/address/index.d.ts.map +1 -0
  399. package/dist/types/utils/address/isAddress.d.ts +3 -0
  400. package/dist/types/utils/address/isAddress.d.ts.map +1 -0
  401. package/dist/types/utils/address/isAddressEqual.d.ts +3 -0
  402. package/dist/types/utils/address/isAddressEqual.d.ts.map +1 -0
  403. package/dist/types/utils/buildRequest.d.ts +6 -0
  404. package/dist/types/utils/buildRequest.d.ts.map +1 -0
  405. package/dist/types/utils/chain.d.ts +8 -0
  406. package/dist/types/utils/chain.d.ts.map +1 -0
  407. package/dist/types/utils/contract/extractFunctionParts.d.ts +13 -0
  408. package/dist/types/utils/contract/extractFunctionParts.d.ts.map +1 -0
  409. package/dist/types/utils/contract/index.d.ts +2 -0
  410. package/dist/types/utils/contract/index.d.ts.map +1 -0
  411. package/dist/types/utils/data/concat.d.ts +6 -0
  412. package/dist/types/utils/data/concat.d.ts.map +1 -0
  413. package/dist/types/utils/data/index.d.ts +8 -0
  414. package/dist/types/utils/data/index.d.ts.map +1 -0
  415. package/dist/types/utils/data/isBytes.d.ts +3 -0
  416. package/dist/types/utils/data/isBytes.d.ts.map +1 -0
  417. package/dist/types/utils/data/isHex.d.ts +3 -0
  418. package/dist/types/utils/data/isHex.d.ts.map +1 -0
  419. package/dist/types/utils/data/pad.d.ts +11 -0
  420. package/dist/types/utils/data/pad.d.ts.map +1 -0
  421. package/dist/types/utils/data/size.d.ts +9 -0
  422. package/dist/types/utils/data/size.d.ts.map +1 -0
  423. package/dist/types/utils/data/slice.d.ts +27 -0
  424. package/dist/types/utils/data/slice.d.ts.map +1 -0
  425. package/dist/types/utils/data/trim.d.ts +8 -0
  426. package/dist/types/utils/data/trim.d.ts.map +1 -0
  427. package/dist/types/utils/encoding/fromBytes.d.ts +110 -0
  428. package/dist/types/utils/encoding/fromBytes.d.ts.map +1 -0
  429. package/dist/types/utils/encoding/fromHex.d.ts +138 -0
  430. package/dist/types/utils/encoding/fromHex.d.ts.map +1 -0
  431. package/dist/types/utils/encoding/fromRlp.d.ts +6 -0
  432. package/dist/types/utils/encoding/fromRlp.d.ts.map +1 -0
  433. package/dist/types/utils/encoding/index.d.ts +8 -0
  434. package/dist/types/utils/encoding/index.d.ts.map +1 -0
  435. package/dist/types/utils/encoding/toBytes.d.ts +125 -0
  436. package/dist/types/utils/encoding/toBytes.d.ts.map +1 -0
  437. package/dist/types/utils/encoding/toHex.d.ts +139 -0
  438. package/dist/types/utils/encoding/toHex.d.ts.map +1 -0
  439. package/dist/types/utils/encoding/toRlp.d.ts +8 -0
  440. package/dist/types/utils/encoding/toRlp.d.ts.map +1 -0
  441. package/dist/types/utils/ens/avatar/index.d.ts +2 -0
  442. package/dist/types/utils/ens/avatar/index.d.ts.map +1 -0
  443. package/dist/types/utils/ens/avatar/parseAvatarRecord.d.ts +7 -0
  444. package/dist/types/utils/ens/avatar/parseAvatarRecord.d.ts.map +1 -0
  445. package/dist/types/utils/ens/avatar/utils.d.ts +34 -0
  446. package/dist/types/utils/ens/avatar/utils.d.ts.map +1 -0
  447. package/dist/types/utils/ens/index.d.ts +5 -0
  448. package/dist/types/utils/ens/index.d.ts.map +1 -0
  449. package/dist/types/utils/ens/labelhash.d.ts +11 -0
  450. package/dist/types/utils/ens/labelhash.d.ts.map +1 -0
  451. package/dist/types/utils/ens/namehash.d.ts +13 -0
  452. package/dist/types/utils/ens/namehash.d.ts.map +1 -0
  453. package/dist/types/utils/ens/normalize.d.ts +12 -0
  454. package/dist/types/utils/ens/normalize.d.ts.map +1 -0
  455. package/dist/types/utils/ens/packetToBytes.d.ts +3 -0
  456. package/dist/types/utils/ens/packetToBytes.d.ts.map +1 -0
  457. package/dist/types/utils/errors/getCallError.d.ts +9 -0
  458. package/dist/types/utils/errors/getCallError.d.ts.map +1 -0
  459. package/dist/types/utils/errors/getContractError.d.ts +13 -0
  460. package/dist/types/utils/errors/getContractError.d.ts.map +1 -0
  461. package/dist/types/utils/errors/getEstimateGasError.d.ts +10 -0
  462. package/dist/types/utils/errors/getEstimateGasError.d.ts.map +1 -0
  463. package/dist/types/utils/errors/getNodeError.d.ts +6 -0
  464. package/dist/types/utils/errors/getNodeError.d.ts.map +1 -0
  465. package/dist/types/utils/errors/getTransactionError.d.ts +10 -0
  466. package/dist/types/utils/errors/getTransactionError.d.ts.map +1 -0
  467. package/dist/types/utils/errors/index.d.ts +6 -0
  468. package/dist/types/utils/errors/index.d.ts.map +1 -0
  469. package/dist/types/utils/filters/createFilterRequestScope.d.ts +16 -0
  470. package/dist/types/utils/filters/createFilterRequestScope.d.ts.map +1 -0
  471. package/dist/types/utils/formatters/block.d.ts +14 -0
  472. package/dist/types/utils/formatters/block.d.ts.map +1 -0
  473. package/dist/types/utils/formatters/extract.d.ts +8 -0
  474. package/dist/types/utils/formatters/extract.d.ts.map +1 -0
  475. package/dist/types/utils/formatters/feeHistory.d.ts +3 -0
  476. package/dist/types/utils/formatters/feeHistory.d.ts.map +1 -0
  477. package/dist/types/utils/formatters/format.d.ts +36 -0
  478. package/dist/types/utils/formatters/format.d.ts.map +1 -0
  479. package/dist/types/utils/formatters/index.d.ts +13 -0
  480. package/dist/types/utils/formatters/index.d.ts.map +1 -0
  481. package/dist/types/utils/formatters/log.d.ts +16 -0
  482. package/dist/types/utils/formatters/log.d.ts.map +1 -0
  483. package/dist/types/utils/formatters/transaction.d.ts +19 -0
  484. package/dist/types/utils/formatters/transaction.d.ts.map +1 -0
  485. package/dist/types/utils/formatters/transactionReceipt.d.ts +14 -0
  486. package/dist/types/utils/formatters/transactionReceipt.d.ts.map +1 -0
  487. package/dist/types/utils/formatters/transactionRequest.d.ts +14 -0
  488. package/dist/types/utils/formatters/transactionRequest.d.ts.map +1 -0
  489. package/dist/types/utils/hash/getEventSelector.d.ts +3 -0
  490. package/dist/types/utils/hash/getEventSelector.d.ts.map +1 -0
  491. package/dist/types/utils/hash/getFunctionSelector.d.ts +2 -0
  492. package/dist/types/utils/hash/getFunctionSelector.d.ts.map +1 -0
  493. package/dist/types/utils/hash/hashFunction.d.ts +2 -0
  494. package/dist/types/utils/hash/hashFunction.d.ts.map +1 -0
  495. package/dist/types/utils/hash/index.d.ts +5 -0
  496. package/dist/types/utils/hash/index.d.ts.map +1 -0
  497. package/dist/types/utils/hash/isHash.d.ts +3 -0
  498. package/dist/types/utils/hash/isHash.d.ts.map +1 -0
  499. package/dist/types/utils/hash/keccak256.d.ts +6 -0
  500. package/dist/types/utils/hash/keccak256.d.ts.map +1 -0
  501. package/dist/types/utils/index.d.ts +26 -0
  502. package/dist/types/utils/index.d.ts.map +1 -0
  503. package/dist/types/utils/observe.d.ts +17 -0
  504. package/dist/types/utils/observe.d.ts.map +1 -0
  505. package/dist/types/utils/poll.d.ts +13 -0
  506. package/dist/types/utils/poll.d.ts.map +1 -0
  507. package/dist/types/utils/promise/createBatchScheduler.d.ts +15 -0
  508. package/dist/types/utils/promise/createBatchScheduler.d.ts.map +1 -0
  509. package/dist/types/utils/promise/index.d.ts +5 -0
  510. package/dist/types/utils/promise/index.d.ts.map +1 -0
  511. package/dist/types/utils/promise/withCache.d.ts +36 -0
  512. package/dist/types/utils/promise/withCache.d.ts.map +1 -0
  513. package/dist/types/utils/promise/withRetry.d.ts +12 -0
  514. package/dist/types/utils/promise/withRetry.d.ts.map +1 -0
  515. package/dist/types/utils/promise/withTimeout.d.ts +8 -0
  516. package/dist/types/utils/promise/withTimeout.d.ts.map +1 -0
  517. package/dist/types/utils/regex.d.ts +4 -0
  518. package/dist/types/utils/regex.d.ts.map +1 -0
  519. package/dist/types/utils/rpc.d.ts +64 -0
  520. package/dist/types/utils/rpc.d.ts.map +1 -0
  521. package/dist/types/utils/signature/hashMessage.d.ts +6 -0
  522. package/dist/types/utils/signature/hashMessage.d.ts.map +1 -0
  523. package/dist/types/utils/signature/hashTypedData.d.ts +10 -0
  524. package/dist/types/utils/signature/hashTypedData.d.ts.map +1 -0
  525. package/dist/types/utils/signature/index.d.ts +16 -0
  526. package/dist/types/utils/signature/index.d.ts.map +1 -0
  527. package/dist/types/utils/signature/recoverAddress.d.ts +8 -0
  528. package/dist/types/utils/signature/recoverAddress.d.ts.map +1 -0
  529. package/dist/types/utils/signature/recoverMessageAddress.d.ts +8 -0
  530. package/dist/types/utils/signature/recoverMessageAddress.d.ts.map +1 -0
  531. package/dist/types/utils/signature/recoverPublicKey.d.ts +8 -0
  532. package/dist/types/utils/signature/recoverPublicKey.d.ts.map +1 -0
  533. package/dist/types/utils/signature/recoverTypedDataAddress.d.ts +12 -0
  534. package/dist/types/utils/signature/recoverTypedDataAddress.d.ts.map +1 -0
  535. package/dist/types/utils/signature/verifyMessage.d.ts +10 -0
  536. package/dist/types/utils/signature/verifyMessage.d.ts.map +1 -0
  537. package/dist/types/utils/signature/verifyTypedData.d.ts +13 -0
  538. package/dist/types/utils/signature/verifyTypedData.d.ts.map +1 -0
  539. package/dist/types/utils/stringify.d.ts +2 -0
  540. package/dist/types/utils/stringify.d.ts.map +1 -0
  541. package/dist/types/utils/transaction/assertRequest.d.ts +4 -0
  542. package/dist/types/utils/transaction/assertRequest.d.ts.map +1 -0
  543. package/dist/types/utils/transaction/assertTransaction.d.ts +5 -0
  544. package/dist/types/utils/transaction/assertTransaction.d.ts.map +1 -0
  545. package/dist/types/utils/transaction/getSerializedTransactionType.d.ts +4 -0
  546. package/dist/types/utils/transaction/getSerializedTransactionType.d.ts.map +1 -0
  547. package/dist/types/utils/transaction/getTransactionType.d.ts +4 -0
  548. package/dist/types/utils/transaction/getTransactionType.d.ts.map +1 -0
  549. package/dist/types/utils/transaction/index.d.ts +10 -0
  550. package/dist/types/utils/transaction/index.d.ts.map +1 -0
  551. package/dist/types/utils/transaction/parseTransaction.d.ts +5 -0
  552. package/dist/types/utils/transaction/parseTransaction.d.ts.map +1 -0
  553. package/dist/types/utils/transaction/prepareRequest.d.ts +21 -0
  554. package/dist/types/utils/transaction/prepareRequest.d.ts.map +1 -0
  555. package/dist/types/utils/transaction/serializeTransaction.d.ts +5 -0
  556. package/dist/types/utils/transaction/serializeTransaction.d.ts.map +1 -0
  557. package/dist/types/utils/typedData.d.ts +6 -0
  558. package/dist/types/utils/typedData.d.ts.map +1 -0
  559. package/dist/types/utils/uid.d.ts +2 -0
  560. package/dist/types/utils/uid.d.ts.map +1 -0
  561. package/dist/types/utils/unit/formatEther.d.ts +2 -0
  562. package/dist/types/utils/unit/formatEther.d.ts.map +1 -0
  563. package/dist/types/utils/unit/formatGwei.d.ts +2 -0
  564. package/dist/types/utils/unit/formatGwei.d.ts.map +1 -0
  565. package/dist/types/utils/unit/formatUnits.d.ts +2 -0
  566. package/dist/types/utils/unit/formatUnits.d.ts.map +1 -0
  567. package/dist/types/utils/unit/index.d.ts +7 -0
  568. package/dist/types/utils/unit/index.d.ts.map +1 -0
  569. package/dist/types/utils/unit/parseEther.d.ts +2 -0
  570. package/dist/types/utils/unit/parseEther.d.ts.map +1 -0
  571. package/dist/types/utils/unit/parseGwei.d.ts +2 -0
  572. package/dist/types/utils/unit/parseGwei.d.ts.map +1 -0
  573. package/dist/types/utils/unit/parseUnits.d.ts +2 -0
  574. package/dist/types/utils/unit/parseUnits.d.ts.map +1 -0
  575. package/dist/types/utils/wait.d.ts +2 -0
  576. package/dist/types/utils/wait.d.ts.map +1 -0
  577. package/dist/types/wallet.d.ts +3 -0
  578. package/dist/types/wallet.d.ts.map +1 -0
  579. package/dist/types/window.d.ts +2 -0
  580. package/dist/types/window.d.ts.map +1 -0
  581. package/package.json +1 -1
  582. package/src/errors/version.ts +1 -1
@@ -0,0 +1,1002 @@
1
+ import type { Address } from 'abitype';
2
+ import type { BlockTag } from './block.js';
3
+ import type { Hash, Hex, LogTopic } from './misc.js';
4
+ import type { RpcBlock as Block, RpcBlockIdentifier as BlockIdentifier, RpcBlockNumber as BlockNumber, RpcFeeHistory as FeeHistory, RpcLog as Log, Quantity, RpcTransaction as Transaction, RpcTransactionReceipt as TransactionReceipt, RpcTransactionRequest as TransactionRequest, RpcUncle as Uncle } from './rpc.js';
5
+ export type EIP1193Provider = Requests & Events;
6
+ export declare class RpcError extends Error {
7
+ code: number;
8
+ details: string;
9
+ constructor(code: number, message: string);
10
+ }
11
+ export type ProviderConnectInfo = {
12
+ chainId: string;
13
+ };
14
+ export type ProviderMessage = {
15
+ type: string;
16
+ data: unknown;
17
+ };
18
+ export type Events = {
19
+ on(event: 'connect', listener: (connectInfo: ProviderConnectInfo) => void): void;
20
+ on(event: 'disconnect', listener: (error: RpcError) => void): void;
21
+ on(event: 'chainChanged', listener: (chainId: string) => void): void;
22
+ on(event: 'accountsChanged', listener: (accounts: string[]) => void): void;
23
+ on(event: 'message', listener: (message: ProviderMessage) => void): void;
24
+ removeListener(event: 'connect', listener: (connectInfo: ProviderConnectInfo) => void): void;
25
+ removeListener(event: 'disconnect', listener: (error: RpcError) => void): void;
26
+ removeListener(event: 'chainChanged', listener: (chainId: string) => void): void;
27
+ removeListener(event: 'accountsChanged', listener: (accounts: Address[]) => void): void;
28
+ removeListener(event: 'message', listener: (message: ProviderMessage) => void): void;
29
+ };
30
+ export type Chain = {
31
+ /** A 0x-prefixed hexadecimal string */
32
+ chainId: string;
33
+ /** The chain name. */
34
+ chainName: string;
35
+ /** Native currency for the chain. */
36
+ nativeCurrency?: {
37
+ name: string;
38
+ symbol: string;
39
+ decimals: number;
40
+ };
41
+ rpcUrls: readonly string[];
42
+ blockExplorerUrls?: string[];
43
+ iconUrls?: string[];
44
+ };
45
+ export type NetworkSync = {
46
+ /** The current block number */
47
+ currentBlock: Quantity;
48
+ /** Number of latest block on the network */
49
+ highestBlock: Quantity;
50
+ /** Block number at which syncing started */
51
+ startingBlock: Quantity;
52
+ };
53
+ export type WalletPermissionCaveat = {
54
+ type: string;
55
+ value: any;
56
+ };
57
+ export type WalletPermission = {
58
+ caveats: WalletPermissionCaveat[];
59
+ date: number;
60
+ id: string;
61
+ invoker: `http://${string}` | `https://${string}`;
62
+ parentCapability: 'eth_accounts' | string;
63
+ };
64
+ export type WatchAssetParams = {
65
+ /** Token type. */
66
+ type: 'ERC20';
67
+ options: {
68
+ /** The address of the token contract */
69
+ address: string;
70
+ /** A ticker symbol or shorthand, up to 11 characters */
71
+ symbol: string;
72
+ /** The number of token decimals */
73
+ decimals: number;
74
+ /** A string url of the token logo */
75
+ image: string;
76
+ };
77
+ };
78
+ export type PublicRequests = {
79
+ request(args: {
80
+ /**
81
+ * @description Returns the version of the current client
82
+ * @link https://eips.ethereum.org/EIPS/eip-1474
83
+ * @example
84
+ * provider.request({ method: 'web3_clientVersion' })
85
+ * // => 'MetaMask/v1.0.0'
86
+ */
87
+ method: 'web3_clientVersion';
88
+ params?: never;
89
+ }): Promise<string>;
90
+ request(args: {
91
+ /**
92
+ * @description Hashes data using the Keccak-256 algorithm
93
+ * @link https://eips.ethereum.org/EIPS/eip-1474
94
+ * @example
95
+ * provider.request({ method: 'web3_sha3', params: ['0x68656c6c6f20776f726c64'] })
96
+ * // => '0xc94770007dda54cF92009BFF0dE90c06F603a09f'
97
+ */
98
+ method: 'web3_sha3';
99
+ params: [data: Hash];
100
+ }): Promise<string>;
101
+ request(args: {
102
+ /**
103
+ * @description Determines if this client is listening for new network connections
104
+ * @link https://eips.ethereum.org/EIPS/eip-1474
105
+ * @example
106
+ * provider.request({ method: 'net_listening' })
107
+ * // => true
108
+ */
109
+ method: 'net_listening';
110
+ params?: never;
111
+ }): Promise<boolean>;
112
+ request(args: {
113
+ /**
114
+ * @description Returns the number of peers currently connected to this client
115
+ * @link https://eips.ethereum.org/EIPS/eip-1474
116
+ * @example
117
+ * provider.request({ method: 'net_peerCount' })
118
+ * // => '0x1'
119
+ */
120
+ method: 'net_peerCount';
121
+ params?: never;
122
+ }): Promise<Quantity>;
123
+ request(args: {
124
+ /**
125
+ * @description Returns the chain ID associated with the current network
126
+ * @link https://eips.ethereum.org/EIPS/eip-1474
127
+ * @example
128
+ * provider.request({ method: 'net_version' })
129
+ * // => '1'
130
+ */
131
+ method: 'net_version';
132
+ params?: never;
133
+ }): Promise<Quantity>;
134
+ request(args: {
135
+ /**
136
+ * @description Returns the number of the most recent block seen by this client
137
+ * @link https://eips.ethereum.org/EIPS/eip-1474
138
+ * @example
139
+ * provider.request({ method: 'eth_blockNumber' })
140
+ * // => '0x1b4'
141
+ * */
142
+ method: 'eth_blockNumber';
143
+ params?: never;
144
+ }): Promise<Quantity>;
145
+ request(args: {
146
+ /**
147
+ * @description Executes a new message call immediately without submitting a transaction to the network
148
+ * @link https://eips.ethereum.org/EIPS/eip-1474
149
+ * @example
150
+ * provider.request({ method: 'eth_call', params: [{ to: '0x...', data: '0x...' }] })
151
+ * // => '0x...'
152
+ */
153
+ method: 'eth_call';
154
+ params: [
155
+ request: Partial<TransactionRequest>,
156
+ block: BlockNumber | BlockTag | BlockIdentifier
157
+ ];
158
+ }): Promise<Hex>;
159
+ request(args: {
160
+ /**
161
+ * @description Returns the chain ID associated with the current network
162
+ * @example
163
+ * provider.request({ method: 'eth_chainId' })
164
+ * // => '1'
165
+ */
166
+ method: 'eth_chainId';
167
+ params?: never;
168
+ }): Promise<Quantity>;
169
+ request(args: {
170
+ method: 'eth_coinbase';
171
+ params?: never;
172
+ }): Promise<Address>;
173
+ request(args: {
174
+ /**
175
+ * @description Estimates the gas necessary to complete a transaction without submitting it to the network
176
+ * @link https://eips.ethereum.org/EIPS/eip-1474
177
+ * @example
178
+ * provider.request({
179
+ * method: 'eth_estimateGas',
180
+ * params: [{ from: '0x...', to: '0x...', value: '0x...' }]
181
+ * })
182
+ * // => '0x5208'
183
+ * */
184
+ method: 'eth_estimateGas';
185
+ params: [parameters: TransactionRequest, block: BlockNumber | BlockTag];
186
+ }): Promise<Quantity>;
187
+ request(args: {
188
+ /**
189
+ * @description Returns a collection of historical gas information
190
+ * @link https://github.com/ethereum/EIPs/blob/master/EIPS/eip-1559.md
191
+ * @example
192
+ * provider.request({
193
+ * method: 'eth_feeHistory',
194
+ * params: ['4', 'latest', ['25', '75']]
195
+ * })
196
+ * // => {
197
+ * // oldestBlock: '0x1',
198
+ * // baseFeePerGas: ['0x1', '0x2', '0x3', '0x4'],
199
+ * // gasUsedRatio: ['0x1', '0x2', '0x3', '0x4'],
200
+ * // reward: [['0x1', '0x2'], ['0x3', '0x4'], ['0x5', '0x6'], ['0x7', '0x8']]
201
+ * // }
202
+ * */
203
+ method: 'eth_feeHistory';
204
+ params: [
205
+ /** 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. */
206
+ blockCount: Quantity,
207
+ /** Highest number block of the requested range. */
208
+ newestBlock: BlockNumber | BlockTag,
209
+ /** 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. */
210
+ rewardPercentiles: number[] | undefined
211
+ ];
212
+ }): Promise<FeeHistory>;
213
+ request(args: {
214
+ /**
215
+ * @description Returns the current price of gas expressed in wei
216
+ * @link https://eips.ethereum.org/EIPS/eip-1474
217
+ * @example
218
+ * provider.request({ method: 'eth_gasPrice' })
219
+ * // => '0x09184e72a000'
220
+ * */
221
+ method: 'eth_gasPrice';
222
+ params?: never;
223
+ }): Promise<Quantity>;
224
+ request(args: {
225
+ /**
226
+ * @description Returns the balance of an address in wei
227
+ * @link https://eips.ethereum.org/EIPS/eip-1474
228
+ * @example
229
+ * provider.request({ method: 'eth_getBalance', params: ['0x...', 'latest'] })
230
+ * // => '0x12a05...'
231
+ * */
232
+ method: 'eth_getBalance';
233
+ params: [address: Address, block: BlockNumber | BlockTag | BlockIdentifier];
234
+ }): Promise<Quantity>;
235
+ request(args: {
236
+ /**
237
+ * @description Returns information about a block specified by hash
238
+ * @link https://eips.ethereum.org/EIPS/eip-1474
239
+ * @example
240
+ * provider.request({ method: 'eth_getBlockByHash', params: ['0x...', true] })
241
+ * // => {
242
+ * // number: '0x1b4',
243
+ * // hash: '0x...',
244
+ * // parentHash: '0x...',
245
+ * // ...
246
+ * // }
247
+ * */
248
+ method: 'eth_getBlockByHash';
249
+ params: [
250
+ /** hash of a block */
251
+ hash: Hash,
252
+ /** true will pull full transaction objects, false will pull transaction hashes */
253
+ includeTransactionObjects: boolean
254
+ ];
255
+ }): Promise<Block | null>;
256
+ request(args: {
257
+ /**
258
+ * @description Returns information about a block specified by number
259
+ * @link https://eips.ethereum.org/EIPS/eip-1474
260
+ * @example
261
+ * provider.request({ method: 'eth_getBlockByNumber', params: ['0x1b4', true] })
262
+ * // => {
263
+ * // number: '0x1b4',
264
+ * // hash: '0x...',
265
+ * // parentHash: '0x...',
266
+ * // ...
267
+ * // }
268
+ * */
269
+ method: 'eth_getBlockByNumber';
270
+ params: [
271
+ /** block number, or one of "latest", "safe", "finalized", "earliest" or "pending" */
272
+ block: BlockNumber | BlockTag,
273
+ /** true will pull full transaction objects, false will pull transaction hashes */
274
+ includeTransactionObjects: boolean
275
+ ];
276
+ }): Promise<Block | null>;
277
+ request(args: {
278
+ /**
279
+ * @description Returns the number of transactions in a block specified by block hash
280
+ * @link https://eips.ethereum.org/EIPS/eip-1474
281
+ * @example
282
+ * provider.request({ method: 'eth_getBlockTransactionCountByHash', params: ['0x...'] })
283
+ * // => '0x1'
284
+ * */
285
+ method: 'eth_getBlockTransactionCountByHash';
286
+ params: [hash: Hash];
287
+ }): Promise<Quantity>;
288
+ request(args: {
289
+ /**
290
+ * @description Returns the number of transactions in a block specified by block number
291
+ * @link https://eips.ethereum.org/EIPS/eip-1474
292
+ * @example
293
+ * provider.request({ method: 'eth_getBlockTransactionCountByNumber', params: ['0x1b4'] })
294
+ * // => '0x1'
295
+ * */
296
+ method: 'eth_getBlockTransactionCountByNumber';
297
+ params: [block: BlockNumber | BlockTag];
298
+ }): Promise<Quantity>;
299
+ request(args: {
300
+ /**
301
+ * @description Returns the contract code stored at a given address
302
+ * @link https://eips.ethereum.org/EIPS/eip-1474
303
+ * @example
304
+ * provider.request({ method: 'eth_getCode', params: ['0x...', 'latest'] })
305
+ * // => '0x...'
306
+ * */
307
+ method: 'eth_getCode';
308
+ params: [address: Address, block: BlockNumber | BlockTag | BlockIdentifier];
309
+ }): Promise<Hex>;
310
+ request(args: {
311
+ /**
312
+ * @description Returns a list of all logs based on filter ID since the last log retrieval
313
+ * @link https://eips.ethereum.org/EIPS/eip-1474
314
+ * @example
315
+ * provider.request({ method: 'eth_getFilterChanges', params: ['0x...'] })
316
+ * // => [{ ... }, { ... }]
317
+ * */
318
+ method: 'eth_getFilterChanges';
319
+ params: [filterId: Quantity];
320
+ }): Promise<Log[] | Hex[]>;
321
+ request(args: {
322
+ /**
323
+ * @description Returns a list of all logs based on filter ID
324
+ * @link https://eips.ethereum.org/EIPS/eip-1474
325
+ * @example
326
+ * provider.request({ method: 'eth_getFilterLogs', params: ['0x...'] })
327
+ * // => [{ ... }, { ... }]
328
+ * */
329
+ method: 'eth_getFilterLogs';
330
+ params: [filterId: Quantity];
331
+ }): Promise<Log[]>;
332
+ request(args: {
333
+ /**
334
+ * @description Returns a list of all logs based on a filter object
335
+ * @link https://eips.ethereum.org/EIPS/eip-1474
336
+ * @example
337
+ * provider.request({ method: 'eth_getLogs', params: [{ fromBlock: '0x...', toBlock: '0x...', address: '0x...', topics: ['0x...'] }] })
338
+ * // => [{ ... }, { ... }]
339
+ * */
340
+ method: 'eth_getLogs';
341
+ params: [
342
+ parameters: {
343
+ address?: Address | Address[];
344
+ topics?: LogTopic[];
345
+ } & ({
346
+ fromBlock?: BlockNumber | BlockTag;
347
+ toBlock?: BlockNumber | BlockTag;
348
+ blockHash?: never;
349
+ } | {
350
+ fromBlock?: never;
351
+ toBlock?: never;
352
+ blockHash?: Hash;
353
+ })
354
+ ];
355
+ }): Promise<Log[]>;
356
+ request(args: {
357
+ /**
358
+ * @description Returns the value from a storage position at an address
359
+ * @link https://eips.ethereum.org/EIPS/eip-1474
360
+ * @example
361
+ * provider.request({ method: 'eth_getStorageAt', params: ['0x...', '0x...', 'latest'] })
362
+ * // => '0x...'
363
+ * */
364
+ method: 'eth_getStorageAt';
365
+ params: [
366
+ address: Address,
367
+ index: Quantity,
368
+ block: BlockNumber | BlockTag | BlockIdentifier
369
+ ];
370
+ }): Promise<Hex>;
371
+ request(args: {
372
+ /**
373
+ * @description Returns information about a transaction specified by block hash and transaction index
374
+ * @link https://eips.ethereum.org/EIPS/eip-1474
375
+ * @example
376
+ * provider.request({ method: 'eth_getTransactionByBlockHashAndIndex', params: ['0x...', '0x...'] })
377
+ * // => { ... }
378
+ * */
379
+ method: 'eth_getTransactionByBlockHashAndIndex';
380
+ params: [hash: Hash, index: Quantity];
381
+ }): Promise<Transaction | null>;
382
+ request(args: {
383
+ /**
384
+ * @description Returns information about a transaction specified by block number and transaction index
385
+ * @link https://eips.ethereum.org/EIPS/eip-1474
386
+ * @example
387
+ * provider.request({ method: 'eth_getTransactionByBlockNumberAndIndex', params: ['0x...', '0x...'] })
388
+ * // => { ... }
389
+ * */
390
+ method: 'eth_getTransactionByBlockNumberAndIndex';
391
+ params: [block: BlockNumber | BlockTag, index: Quantity];
392
+ }): Promise<Transaction | null>;
393
+ request(args: {
394
+ /**
395
+ * @description Returns information about a transaction specified by hash
396
+ * @link https://eips.ethereum.org/EIPS/eip-1474
397
+ * @example
398
+ * provider.request({ method: 'eth_getTransactionByHash', params: ['0x...'] })
399
+ * // => { ... }
400
+ * */
401
+ method: 'eth_getTransactionByHash';
402
+ params: [hash: Hash];
403
+ }): Promise<Transaction | null>;
404
+ request(args: {
405
+ /**
406
+ * @description Returns the number of transactions sent from an address
407
+ * @link https://eips.ethereum.org/EIPS/eip-1474
408
+ * @example
409
+ * provider.request({ method: 'eth_getTransactionCount', params: ['0x...', 'latest'] })
410
+ * // => '0x1'
411
+ * */
412
+ method: 'eth_getTransactionCount';
413
+ params: [address: Address, block: BlockNumber | BlockTag | BlockIdentifier];
414
+ }): Promise<Quantity>;
415
+ request(args: {
416
+ /**
417
+ * @description Returns the receipt of a transaction specified by hash
418
+ * @link https://eips.ethereum.org/EIPS/eip-1474
419
+ * @example
420
+ * provider.request({ method: 'eth_getTransactionReceipt', params: ['0x...'] })
421
+ * // => { ... }
422
+ * */
423
+ method: 'eth_getTransactionReceipt';
424
+ params: [hash: Hash];
425
+ }): Promise<TransactionReceipt | null>;
426
+ request(args: {
427
+ /**
428
+ * @description Returns information about an uncle specified by block hash and uncle index position
429
+ * @link https://eips.ethereum.org/EIPS/eip-1474
430
+ * @example
431
+ * provider.request({ method: 'eth_getUncleByBlockHashAndIndex', params: ['0x...', '0x...'] })
432
+ * // => { ... }
433
+ * */
434
+ method: 'eth_getUncleByBlockHashAndIndex';
435
+ params: [hash: Hash, index: Quantity];
436
+ }): Promise<Uncle | null>;
437
+ request(args: {
438
+ /**
439
+ * @description Returns information about an uncle specified by block number and uncle index position
440
+ * @link https://eips.ethereum.org/EIPS/eip-1474
441
+ * @example
442
+ * provider.request({ method: 'eth_getUncleByBlockNumberAndIndex', params: ['0x...', '0x...'] })
443
+ * // => { ... }
444
+ * */
445
+ method: 'eth_getUncleByBlockNumberAndIndex';
446
+ params: [block: BlockNumber | BlockTag, index: Quantity];
447
+ }): Promise<Uncle | null>;
448
+ request(args: {
449
+ /**
450
+ * @description Returns the number of uncles in a block specified by block hash
451
+ * @link https://eips.ethereum.org/EIPS/eip-1474
452
+ * @example
453
+ * provider.request({ method: 'eth_getUncleCountByBlockHash', params: ['0x...'] })
454
+ * // => '0x1'
455
+ * */
456
+ method: 'eth_getUncleCountByBlockHash';
457
+ params: [hash: Hash];
458
+ }): Promise<Quantity>;
459
+ request(args: {
460
+ /**
461
+ * @description Returns the number of uncles in a block specified by block number
462
+ * @link https://eips.ethereum.org/EIPS/eip-1474
463
+ * @example
464
+ * provider.request({ method: 'eth_getUncleCountByBlockNumber', params: ['0x...'] })
465
+ * // => '0x1'
466
+ * */
467
+ method: 'eth_getUncleCountByBlockNumber';
468
+ params: [block: BlockNumber | BlockTag];
469
+ }): Promise<Quantity>;
470
+ request(args: {
471
+ /**
472
+ * @description Creates a filter to listen for new blocks that can be used with `eth_getFilterChanges`
473
+ * @link https://eips.ethereum.org/EIPS/eip-1474
474
+ * @example
475
+ * provider.request({ method: 'eth_newBlockFilter' })
476
+ * // => '0x1'
477
+ * */
478
+ method: 'eth_newBlockFilter';
479
+ params?: never;
480
+ }): Promise<Quantity>;
481
+ request(args: {
482
+ /**
483
+ * @description Creates a filter to listen for specific state changes that can then be used with `eth_getFilterChanges`
484
+ * @link https://eips.ethereum.org/EIPS/eip-1474
485
+ * @example
486
+ * provider.request({ method: 'eth_newFilter', params: [{ fromBlock: '0x...', toBlock: '0x...', address: '0x...', topics: ['0x...'] }] })
487
+ * // => '0x1'
488
+ * */
489
+ method: 'eth_newFilter';
490
+ params: [
491
+ filter: {
492
+ fromBlock?: BlockNumber | BlockTag;
493
+ toBlock?: BlockNumber | BlockTag;
494
+ address?: Address | Address[];
495
+ topics?: LogTopic[];
496
+ }
497
+ ];
498
+ }): Promise<Quantity>;
499
+ request(args: {
500
+ /**
501
+ * @description Creates a filter to listen for new pending transactions that can be used with `eth_getFilterChanges`
502
+ * @link https://eips.ethereum.org/EIPS/eip-1474
503
+ * @example
504
+ * provider.request({ method: 'eth_newPendingTransactionFilter' })
505
+ * // => '0x1'
506
+ * */
507
+ method: 'eth_newPendingTransactionFilter';
508
+ params?: never;
509
+ }): Promise<Quantity>;
510
+ request(args: {
511
+ /**
512
+ * @description Returns the current Ethereum protocol version
513
+ * @link https://eips.ethereum.org/EIPS/eip-1474
514
+ * @example
515
+ * provider.request({ method: 'eth_protocolVersion' })
516
+ * // => '54'
517
+ * */
518
+ method: 'eth_protocolVersion';
519
+ params?: never;
520
+ }): Promise<string>;
521
+ request(args: {
522
+ /**
523
+ * @description Sends and already-signed transaction to the network
524
+ * @link https://eips.ethereum.org/EIPS/eip-1474
525
+ * @example
526
+ * provider.request({ method: 'eth_sendRawTransaction', params: ['0x...'] })
527
+ * // => '0x...'
528
+ * */
529
+ method: 'eth_sendRawTransaction';
530
+ params: [signedTransaction: Hex];
531
+ }): Promise<Hex>;
532
+ request(args: {
533
+ /**
534
+ * @description Destroys a filter based on filter ID
535
+ * @link https://eips.ethereum.org/EIPS/eip-1474
536
+ * @example
537
+ * provider.request({ method: 'eth_uninstallFilter', params: ['0x1'] })
538
+ * // => true
539
+ * */
540
+ method: 'eth_uninstallFilter';
541
+ params: [
542
+ /** ID of the filter to destroy */
543
+ filterId: Quantity
544
+ ];
545
+ }): Promise<boolean>;
546
+ };
547
+ export type TestRequests<Name extends string> = {
548
+ request(args: {
549
+ /**
550
+ * @description Add information about compiled contracts
551
+ * @link https://hardhat.org/hardhat-network/docs/reference#hardhat_addcompilationresult
552
+ */
553
+ method: `${Name}_addCompilationResult`;
554
+ params: any[];
555
+ }): Promise<any>;
556
+ request(args: {
557
+ /**
558
+ * @description Remove a transaction from the mempool
559
+ * @link https://hardhat.org/hardhat-network/docs/reference#hardhat_droptransaction
560
+ */
561
+ method: `${Name}_dropTransaction`;
562
+ params: [hash: Hash];
563
+ }): Promise<void>;
564
+ request(args: {
565
+ /**
566
+ * @description Turn on call traces for transactions that are returned to the user when they execute a transaction (instead of just txhash/receipt).
567
+ */
568
+ method: `${Name}_enableTraces`;
569
+ params?: never;
570
+ }): Promise<void>;
571
+ request(args: {
572
+ /**
573
+ * @description Impersonate an account or contract address.
574
+ * @link https://hardhat.org/hardhat-network/docs/reference#hardhat_impersonateaccount
575
+ */
576
+ method: `${Name}_impersonateAccount`;
577
+ params: [address: Address];
578
+ }): Promise<void>;
579
+ request(args: {
580
+ /**
581
+ * @description Returns true if automatic mining is enabled, and false otherwise. See [Mining Modes](https://hardhat.org/hardhat-network/explanation/mining-modes) to learn more.
582
+ * @link https://hardhat.org/hardhat-network/docs/reference#hardhat_getautomine
583
+ */
584
+ method: `${Name}_getAutomine`;
585
+ }): Promise<boolean>;
586
+ request(args: {
587
+ /**
588
+ * @description Advance the block number of the network by a certain number of blocks
589
+ * @link https://hardhat.org/hardhat-network/docs/reference#hardhat_mine
590
+ */
591
+ method: `${Name}_mine`;
592
+ params: [
593
+ /** Number of blocks to mine. */
594
+ count: Hex,
595
+ /** Interval between each block in seconds. */
596
+ interval: Hex | undefined
597
+ ];
598
+ }): Promise<void>;
599
+ request(args: {
600
+ /**
601
+ * @description Resets the fork.
602
+ * @link https://hardhat.org/hardhat-network/docs/reference#hardhat_reset
603
+ */
604
+ method: `${Name}_reset`;
605
+ params: any[];
606
+ }): Promise<void>;
607
+ request(args: {
608
+ /**
609
+ * @description Modifies the balance of an account.
610
+ * @link https://hardhat.org/hardhat-network/docs/reference#hardhat_setbalance
611
+ */
612
+ method: `${Name}_setBalance`;
613
+ params: [
614
+ /** The address of the target account. */
615
+ address: Address,
616
+ /** Amount to send in wei. */
617
+ value: Quantity
618
+ ];
619
+ }): Promise<void>;
620
+ request(args: {
621
+ /**
622
+ * @description Modifies the bytecode stored at an account's address.
623
+ * @link https://hardhat.org/hardhat-network/docs/reference#hardhat_setcode
624
+ */
625
+ method: `${Name}_setCode`;
626
+ params: [
627
+ /** The address of the contract. */
628
+ address: Address,
629
+ /** Data bytecode. */
630
+ data: string
631
+ ];
632
+ }): Promise<void>;
633
+ request(args: {
634
+ /**
635
+ * @description Sets the coinbase address to be used in new blocks.
636
+ * @link https://hardhat.org/hardhat-network/docs/reference#hardhat_setcoinbase
637
+ */
638
+ method: `${Name}_setCoinbase`;
639
+ params: [
640
+ /** The address to set as the coinbase address. */
641
+ address: Address
642
+ ];
643
+ }): Promise<void>;
644
+ request(args: {
645
+ /**
646
+ * @description Enable or disable logging on the test node network.
647
+ * @link https://hardhat.org/hardhat-network/docs/reference#hardhat_setcoinbase
648
+ */
649
+ method: `${Name}_setLoggingEnabled`;
650
+ params: [enabled: boolean];
651
+ }): Promise<void>;
652
+ request(args: {
653
+ /**
654
+ * @description Change the minimum gas price accepted by the network (in wei).
655
+ * @link https://hardhat.org/hardhat-network/docs/reference#hardhat_setmingasprice
656
+ */
657
+ method: `${Name}_setMinGasPrice`;
658
+ params: [gasPrice: Quantity];
659
+ }): Promise<void>;
660
+ request(args: {
661
+ /**
662
+ * @description Sets the base fee of the next block.
663
+ * @link https://hardhat.org/hardhat-network/docs/reference#hardhat_setnextblockbasefeepergas
664
+ */
665
+ method: `${Name}_setNextBlockBaseFeePerGas`;
666
+ params: [baseFeePerGas: Quantity];
667
+ }): Promise<void>;
668
+ request(args: {
669
+ /**
670
+ * @description Modifies an account's nonce by overwriting it.
671
+ * @link https://hardhat.org/hardhat-network/docs/reference#hardhat_setnonce
672
+ */
673
+ method: `${Name}_setNonce`;
674
+ params: [
675
+ /** The account address. */
676
+ address: Address,
677
+ /** The new nonce. */
678
+ nonce: Quantity
679
+ ];
680
+ }): Promise<void>;
681
+ request(args: {
682
+ /**
683
+ * @description Sets the backend RPC URL.
684
+ */
685
+ method: `${Name}_setRpcUrl`;
686
+ params: [url: string];
687
+ }): Promise<void>;
688
+ request(args: {
689
+ /**
690
+ * @description Writes a single position of an account's storage.
691
+ * @link https://hardhat.org/hardhat-network/docs/reference#hardhat_setstorageat
692
+ */
693
+ method: `${Name}_setStorageAt`;
694
+ params: [
695
+ /** The account address. */
696
+ address: Address,
697
+ /** The storage position index. */
698
+ index: Quantity,
699
+ /** The storage value. */
700
+ value: Quantity
701
+ ];
702
+ }): Promise<void>;
703
+ request(args: {
704
+ /**
705
+ * @description Use this method to stop impersonating an account after having previously used impersonateAccount.
706
+ * @link https://hardhat.org/hardhat-network/docs/reference#hardhat_stopimpersonatingaccount
707
+ */
708
+ method: `${Name}_stopImpersonatingAccount`;
709
+ params: [
710
+ /** The address to stop impersonating. */
711
+ address: Address
712
+ ];
713
+ }): Promise<void>;
714
+ request(args: {
715
+ /**
716
+ * @description Jump forward in time by the given amount of time, in seconds.
717
+ * @link https://github.com/trufflesuite/ganache/blob/ef1858d5d6f27e4baeb75cccd57fb3dc77a45ae8/src/chains/ethereum/ethereum/RPC-METHODS.md#evm_increasetime
718
+ */
719
+ method: 'evm_increaseTime';
720
+ params: [seconds: Quantity];
721
+ }): Promise<Quantity>;
722
+ request(args: {
723
+ /**
724
+ * @description Enables or disables, based on the single boolean argument, the automatic mining of new blocks with each new transaction submitted to the network.
725
+ * @link https://hardhat.org/hardhat-network/docs/reference#evm_setautomine
726
+ */
727
+ method: 'evm_setAutomine';
728
+ params: [boolean];
729
+ }): Promise<void>;
730
+ request(args: {
731
+ /**
732
+ * @description Sets the block's gas limit.
733
+ * @link https://hardhat.org/hardhat-network/docs/reference#evm_setblockgaslimit
734
+ */
735
+ method: 'evm_setBlockGasLimit';
736
+ params: [gasLimit: Quantity];
737
+ }): Promise<void>;
738
+ request(args: {
739
+ /**
740
+ * @description Similar to `evm_increaseTime` but sets a block timestamp `interval`.
741
+ * The timestamp of the next block will be computed as `lastBlock_timestamp` + `interval`
742
+ */
743
+ method: `${Name}_setBlockTimestampInterval`;
744
+ params: [seconds: number];
745
+ }): Promise<void>;
746
+ request(args: {
747
+ /**
748
+ * @description Removes `setBlockTimestampInterval` if it exists
749
+ */
750
+ method: `${Name}_removeBlockTimestampInterval`;
751
+ }): Promise<void>;
752
+ request(args: {
753
+ /**
754
+ * @description Enables (with a numeric argument greater than 0) or disables (with a numeric argument equal to 0), the automatic mining of blocks at a regular interval of milliseconds, each of which will include all pending transactions.
755
+ * @link https://hardhat.org/hardhat-network/docs/reference#evm_setintervalmining
756
+ */
757
+ method: 'evm_setIntervalMining';
758
+ params: [number];
759
+ }): Promise<void>;
760
+ request(args: {
761
+ /**
762
+ * @description Set the timestamp of the next block.
763
+ * @link https://hardhat.org/hardhat-network/docs/reference#evm_setnextblocktimestamp
764
+ */
765
+ method: 'evm_setNextBlockTimestamp';
766
+ params: [Quantity];
767
+ }): Promise<void>;
768
+ request(args: {
769
+ /**
770
+ * @description Snapshot the state of the blockchain at the current block. Takes no parameters. Returns the id of the snapshot that was created.
771
+ * @link https://hardhat.org/hardhat-network/docs/reference#evm_snapshot
772
+ */
773
+ method: 'evm_snapshot';
774
+ params?: never;
775
+ }): Promise<Quantity>;
776
+ request(args: {
777
+ /**
778
+ * @description Revert the state of the blockchain to a previous snapshot. Takes a single parameter, which is the snapshot id to revert to.
779
+ */
780
+ method: 'evm_revert';
781
+ params?: [id: Quantity];
782
+ }): Promise<void>;
783
+ request(args: {
784
+ /**
785
+ * @link https://geth.ethereum.org/docs/interacting-with-geth/rpc/ns-txpool#txpool-content
786
+ */
787
+ method: 'txpool_content';
788
+ params?: never;
789
+ }): Promise<{
790
+ pending: Record<Address, Record<string, Transaction>>;
791
+ queued: Record<Address, Record<string, Transaction>>;
792
+ }>;
793
+ request(args: {
794
+ /**
795
+ * @link https://geth.ethereum.org/docs/interacting-with-geth/rpc/ns-txpool#txpool-inspect
796
+ */
797
+ method: 'txpool_inspect';
798
+ params?: never;
799
+ }): Promise<{
800
+ pending: Record<Address, Record<string, string>>;
801
+ queued: Record<Address, Record<string, string>>;
802
+ }>;
803
+ request(args: {
804
+ /**
805
+ * @link https://geth.ethereum.org/docs/interacting-with-geth/rpc/ns-txpool#txpool-inspect
806
+ */
807
+ method: 'txpool_status';
808
+ params?: never;
809
+ }): Promise<{
810
+ pending: Quantity;
811
+ queued: Quantity;
812
+ }>;
813
+ request(args: {
814
+ /**
815
+ * @description Creates, signs, and sends a new transaction to the network regardless of the signature.
816
+ * @link https://eips.ethereum.org/EIPS/eip-1474
817
+ * @example
818
+ * provider.request({ method: 'eth_sendTransaction', params: [{ from: '0x...', to: '0x...', value: '0x...' }] })
819
+ * // => '0x...'
820
+ * */
821
+ method: 'eth_sendUnsignedTransaction';
822
+ params: [request: TransactionRequest];
823
+ }): Promise<Hash>;
824
+ };
825
+ export type SignableRequests = {
826
+ request(args: {
827
+ /**
828
+ * @description Creates, signs, and sends a new transaction to the network
829
+ * @link https://eips.ethereum.org/EIPS/eip-1474
830
+ * @example
831
+ * provider.request({ method: 'eth_sendTransaction', params: [{ from: '0x...', to: '0x...', value: '0x...' }] })
832
+ * // => '0x...'
833
+ * */
834
+ method: 'eth_sendTransaction';
835
+ params: [request: TransactionRequest];
836
+ }): Promise<Hash>;
837
+ request(args: {
838
+ /**
839
+ * @description Calculates an Ethereum-specific signature in the form of `keccak256("\x19Ethereum Signed Message:\n" + len(message) + message))`
840
+ * @link https://eips.ethereum.org/EIPS/eip-1474
841
+ * @example
842
+ * provider.request({ method: 'eth_sign', params: ['0x...', '0x...'] })
843
+ * // => '0x...'
844
+ * */
845
+ method: 'eth_sign';
846
+ params: [
847
+ /** Address to use for signing */
848
+ address: Address,
849
+ /** Data to sign */
850
+ data: Hex
851
+ ];
852
+ }): Promise<Hex>;
853
+ request(args: {
854
+ /**
855
+ * @description Signs a transaction that can be submitted to the network at a later time using with `eth_sendRawTransaction`
856
+ * @link https://eips.ethereum.org/EIPS/eip-1474
857
+ * @example
858
+ * provider.request({ method: 'eth_signTransaction', params: [{ from: '0x...', to: '0x...', value: '0x...' }] })
859
+ * // => '0x...'
860
+ * */
861
+ method: 'eth_signTransaction';
862
+ params: [request: TransactionRequest];
863
+ }): Promise<Hex>;
864
+ request(args: {
865
+ /**
866
+ * @description Calculates an Ethereum-specific signature in the form of `keccak256("\x19Ethereum Signed Message:\n" + len(message) + message))`
867
+ * @link https://eips.ethereum.org/EIPS/eip-1474
868
+ * @example
869
+ * provider.request({ method: 'eth_signTypedData_v4', params: [{ from: '0x...', data: [{ type: 'string', name: 'message', value: 'hello world' }] }] })
870
+ * // => '0x...'
871
+ * */
872
+ method: 'eth_signTypedData_v4';
873
+ params: [
874
+ /** Address to use for signing */
875
+ address: Address,
876
+ /** Message to sign containing type information, a domain separator, and data */
877
+ message: string
878
+ ];
879
+ }): Promise<Hex>;
880
+ request(args: {
881
+ /**
882
+ * @description Returns information about the status of this client’s network synchronization
883
+ * @link https://eips.ethereum.org/EIPS/eip-1474
884
+ * @example
885
+ * provider.request({ method: 'eth_syncing' })
886
+ * // => { startingBlock: '0x...', currentBlock: '0x...', highestBlock: '0x...' }
887
+ * */
888
+ method: 'eth_syncing';
889
+ params?: never;
890
+ }): Promise<NetworkSync | false>;
891
+ request(args: {
892
+ /**
893
+ * @description Calculates an Ethereum-specific signature in the form of `keccak256("\x19Ethereum Signed Message:\n" + len(message) + message))`
894
+ * @link https://eips.ethereum.org/EIPS/eip-1474
895
+ * @example
896
+ * provider.request({ method: 'personal_sign', params: ['0x...', '0x...'] })
897
+ * // => '0x...'
898
+ * */
899
+ method: 'personal_sign';
900
+ params: [
901
+ /** Data to sign */
902
+ data: Hex,
903
+ /** Address to use for signing */
904
+ address: Address
905
+ ];
906
+ }): Promise<Hex>;
907
+ };
908
+ export type WalletRequests = {
909
+ request(args: {
910
+ /**
911
+ * @description Returns a list of addresses owned by this client
912
+ * @link https://eips.ethereum.org/EIPS/eip-1474
913
+ * @example
914
+ * provider.request({ method: 'eth_accounts' })
915
+ * // => ['0x0fB69...']
916
+ * */
917
+ method: 'eth_accounts';
918
+ params?: never;
919
+ }): Promise<Address[]>;
920
+ request(args: {
921
+ /**
922
+ * @description Returns the current chain ID associated with the wallet.
923
+ * @example
924
+ * provider.request({ method: 'eth_chainId' })
925
+ * // => '1'
926
+ */
927
+ method: 'eth_chainId';
928
+ params?: never;
929
+ }): Promise<Quantity>;
930
+ request(args: {
931
+ /**
932
+ * @description Requests that the user provides an Ethereum address to be identified by. Typically causes a browser extension popup to appear.
933
+ * @link https://eips.ethereum.org/EIPS/eip-1102
934
+ * @example
935
+ * provider.request({ method: 'eth_requestAccounts' })
936
+ * // => ['0x...', '0x...']
937
+ * */
938
+ method: 'eth_requestAccounts';
939
+ params?: never;
940
+ }): Promise<Address[]>;
941
+ request(args: {
942
+ /**
943
+ * @description Requests the given permissions from the user.
944
+ * @link https://eips.ethereum.org/EIPS/eip-2255
945
+ * @example
946
+ * provider.request({ method: 'wallet_requestPermissions', params: [{ eth_accounts: {} }] })
947
+ * // => { ... }
948
+ * */
949
+ method: 'wallet_requestPermissions';
950
+ params: [permissions: {
951
+ eth_accounts: Record<string, any>;
952
+ }];
953
+ }): Promise<WalletPermission[]>;
954
+ request(args: {
955
+ /**
956
+ * @description Gets the wallets current permissions.
957
+ * @link https://eips.ethereum.org/EIPS/eip-2255
958
+ * @example
959
+ * provider.request({ method: 'wallet_getPermissions' })
960
+ * // => { ... }
961
+ * */
962
+ method: 'wallet_getPermissions';
963
+ params?: never;
964
+ }): Promise<WalletPermission[]>;
965
+ request(args: {
966
+ /**
967
+ * @description Add an Ethereum chain to the wallet.
968
+ * @link https://eips.ethereum.org/EIPS/eip-3085
969
+ * @example
970
+ * provider.request({ method: 'wallet_addEthereumChain', params: [{ chainId: 1, rpcUrl: 'https://mainnet.infura.io/v3/...' }] })
971
+ * // => { ... }
972
+ */
973
+ method: 'wallet_addEthereumChain';
974
+ params: [chain: Chain];
975
+ }): Promise<null>;
976
+ request(args: {
977
+ /**
978
+ * @description Switch the wallet to the given Ethereum chain.
979
+ * @link https://eips.ethereum.org/EIPS/eip-3326
980
+ * @example
981
+ * provider.request({ method: 'wallet_switchEthereumChain', params: [{ chainId: '0xf00' }] })
982
+ * // => { ... }
983
+ * */
984
+ method: 'wallet_switchEthereumChain';
985
+ params: [chain: {
986
+ chainId: string;
987
+ }];
988
+ }): Promise<null>;
989
+ /**
990
+ * @description Requests that the user tracks the token in their wallet. Returns a boolean indicating if the token was successfully added.
991
+ * @link https://eips.ethereum.org/EIPS/eip-747
992
+ * @example
993
+ * provider.request({ method: 'wallet_watchAsset' }] })
994
+ * // => true
995
+ * */
996
+ request(args: {
997
+ method: 'wallet_watchAsset';
998
+ params: [WatchAssetParams];
999
+ }): Promise<boolean>;
1000
+ };
1001
+ export type Requests = PublicRequests & SignableRequests & WalletRequests;
1002
+ //# sourceMappingURL=eip1193.d.ts.map