viem 1.6.4 → 1.6.6

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