viem 0.3.15 → 0.3.17

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 (370) hide show
  1. package/dist/cjs/accounts/mnemonicToAccount.js.map +1 -1
  2. package/dist/cjs/accounts/privateKeyToAccount.js +1 -1
  3. package/dist/cjs/accounts/privateKeyToAccount.js.map +1 -1
  4. package/dist/cjs/accounts/utils/publicKeyToAddress.js +4 -4
  5. package/dist/cjs/accounts/utils/publicKeyToAddress.js.map +1 -1
  6. package/dist/cjs/actions/ens/getEnsAddress.js +8 -8
  7. package/dist/cjs/actions/ens/getEnsAddress.js.map +1 -1
  8. package/dist/cjs/actions/ens/getEnsName.js +4 -4
  9. package/dist/cjs/actions/ens/getEnsName.js.map +1 -1
  10. package/dist/cjs/actions/ens/getEnsResolver.js +4 -4
  11. package/dist/cjs/actions/ens/getEnsResolver.js.map +1 -1
  12. package/dist/cjs/actions/ens/getEnsText.js +7 -7
  13. package/dist/cjs/actions/ens/getEnsText.js.map +1 -1
  14. package/dist/cjs/actions/getContract.js.map +1 -1
  15. package/dist/cjs/actions/public/call.js +4 -1
  16. package/dist/cjs/actions/public/call.js.map +1 -1
  17. package/dist/cjs/actions/public/createContractEventFilter.js +1 -1
  18. package/dist/cjs/actions/public/createContractEventFilter.js.map +1 -1
  19. package/dist/cjs/actions/public/createEventFilter.js +1 -1
  20. package/dist/cjs/actions/public/createEventFilter.js.map +1 -1
  21. package/dist/cjs/actions/public/estimateGas.js +3 -2
  22. package/dist/cjs/actions/public/estimateGas.js.map +1 -1
  23. package/dist/cjs/actions/public/getFeeHistory.js +5 -5
  24. package/dist/cjs/actions/public/getFeeHistory.js.map +1 -1
  25. package/dist/cjs/actions/public/getFilterChanges.js +1 -1
  26. package/dist/cjs/actions/public/getFilterChanges.js.map +1 -1
  27. package/dist/cjs/actions/public/getFilterLogs.js +1 -1
  28. package/dist/cjs/actions/public/getFilterLogs.js.map +1 -1
  29. package/dist/cjs/actions/public/getLogs.js +1 -1
  30. package/dist/cjs/actions/public/getLogs.js.map +1 -1
  31. package/dist/cjs/actions/public/getTransaction.js +1 -1
  32. package/dist/cjs/actions/public/getTransaction.js.map +1 -1
  33. package/dist/cjs/actions/public/getTransactionReceipt.js +1 -1
  34. package/dist/cjs/actions/public/getTransactionReceipt.js.map +1 -1
  35. package/dist/cjs/actions/public/multicall.js.map +1 -1
  36. package/dist/cjs/actions/public/watchContractEvent.js.map +1 -1
  37. package/dist/cjs/actions/public/watchEvent.js.map +1 -1
  38. package/dist/cjs/actions/test/getTxpoolContent.js.map +1 -1
  39. package/dist/cjs/actions/wallet/deployContract.js.map +1 -1
  40. package/dist/cjs/actions/wallet/signTypedData.js.map +1 -1
  41. package/dist/cjs/clients/createWalletClient.js +4 -4
  42. package/dist/cjs/clients/createWalletClient.js.map +1 -1
  43. package/dist/cjs/clients/decorators/public.js.map +1 -1
  44. package/dist/cjs/clients/decorators/wallet.js.map +1 -1
  45. package/dist/cjs/clients/transports/webSocket.js.map +1 -1
  46. package/dist/cjs/errors/abi.js.map +1 -1
  47. package/dist/cjs/errors/ccip.js.map +1 -1
  48. package/dist/cjs/errors/contract.js.map +1 -1
  49. package/dist/cjs/errors/data.js +13 -1
  50. package/dist/cjs/errors/data.js.map +1 -1
  51. package/dist/cjs/errors/index.js +4 -3
  52. package/dist/cjs/errors/index.js.map +1 -1
  53. package/dist/cjs/errors/utils.js.map +1 -1
  54. package/dist/cjs/errors/version.js +1 -1
  55. package/dist/cjs/types/eip1193.js.map +1 -1
  56. package/dist/cjs/utils/abi/decodeErrorResult.js.map +1 -1
  57. package/dist/cjs/utils/abi/decodeEventLog.js +1 -1
  58. package/dist/cjs/utils/abi/decodeEventLog.js.map +1 -1
  59. package/dist/cjs/utils/abi/decodeFunctionResult.js.map +1 -1
  60. package/dist/cjs/utils/abi/encodeErrorResult.js.map +1 -1
  61. package/dist/cjs/utils/abi/encodeFunctionResult.js.map +1 -1
  62. package/dist/cjs/utils/abi/encodePacked.js.map +1 -1
  63. package/dist/cjs/utils/abi/formatAbiItemWithArgs.js.map +1 -1
  64. package/dist/cjs/utils/abi/getAbiItem.js.map +1 -1
  65. package/dist/cjs/utils/address/isAddressEqual.js.map +1 -1
  66. package/dist/cjs/utils/ccip.js +1 -1
  67. package/dist/cjs/utils/ccip.js.map +1 -1
  68. package/dist/cjs/utils/data/slice.js +2 -1
  69. package/dist/cjs/utils/data/slice.js.map +1 -1
  70. package/dist/cjs/utils/encoding/fromHex.js +1 -1
  71. package/dist/cjs/utils/encoding/fromHex.js.map +1 -1
  72. package/dist/cjs/utils/encoding/toHex.js +6 -6
  73. package/dist/cjs/utils/encoding/toHex.js.map +1 -1
  74. package/dist/cjs/utils/errors/getContractError.js +8 -5
  75. package/dist/cjs/utils/errors/getContractError.js.map +1 -1
  76. package/dist/cjs/utils/formatters/transactionRequest.js +1 -1
  77. package/dist/cjs/utils/formatters/transactionRequest.js.map +1 -1
  78. package/dist/cjs/utils/hash/hashFunction.js +5 -5
  79. package/dist/cjs/utils/hash/hashFunction.js.map +1 -1
  80. package/dist/cjs/utils/rpc.js.map +1 -1
  81. package/dist/cjs/utils/signature/recoverTypedDataAddress.js.map +1 -1
  82. package/dist/cjs/utils/signature/verifyMessage.js.map +1 -1
  83. package/dist/cjs/utils/signature/verifyTypedData.js.map +1 -1
  84. package/dist/cjs/utils/transaction/prepareRequest.js +1 -1
  85. package/dist/cjs/utils/transaction/prepareRequest.js.map +1 -1
  86. package/dist/esm/accounts/mnemonicToAccount.js.map +1 -1
  87. package/dist/esm/accounts/privateKeyToAccount.js +1 -1
  88. package/dist/esm/accounts/privateKeyToAccount.js.map +1 -1
  89. package/dist/esm/accounts/utils/publicKeyToAddress.js +1 -1
  90. package/dist/esm/accounts/utils/publicKeyToAddress.js.map +1 -1
  91. package/dist/esm/actions/ens/getEnsAddress.js +1 -1
  92. package/dist/esm/actions/ens/getEnsAddress.js.map +1 -1
  93. package/dist/esm/actions/ens/getEnsName.js +1 -1
  94. package/dist/esm/actions/ens/getEnsName.js.map +1 -1
  95. package/dist/esm/actions/ens/getEnsResolver.js +1 -1
  96. package/dist/esm/actions/ens/getEnsResolver.js.map +1 -1
  97. package/dist/esm/actions/ens/getEnsText.js +1 -1
  98. package/dist/esm/actions/ens/getEnsText.js.map +1 -1
  99. package/dist/esm/actions/getContract.js +1 -1
  100. package/dist/esm/actions/getContract.js.map +1 -1
  101. package/dist/esm/actions/public/call.js +4 -1
  102. package/dist/esm/actions/public/call.js.map +1 -1
  103. package/dist/esm/actions/public/createContractEventFilter.js +1 -1
  104. package/dist/esm/actions/public/createContractEventFilter.js.map +1 -1
  105. package/dist/esm/actions/public/createEventFilter.js +1 -1
  106. package/dist/esm/actions/public/createEventFilter.js.map +1 -1
  107. package/dist/esm/actions/public/estimateGas.js +3 -2
  108. package/dist/esm/actions/public/estimateGas.js.map +1 -1
  109. package/dist/esm/actions/public/getFeeHistory.js +1 -1
  110. package/dist/esm/actions/public/getFeeHistory.js.map +1 -1
  111. package/dist/esm/actions/public/getFilterChanges.js +1 -1
  112. package/dist/esm/actions/public/getFilterChanges.js.map +1 -1
  113. package/dist/esm/actions/public/getFilterLogs.js +1 -1
  114. package/dist/esm/actions/public/getFilterLogs.js.map +1 -1
  115. package/dist/esm/actions/public/getLogs.js +1 -1
  116. package/dist/esm/actions/public/getLogs.js.map +1 -1
  117. package/dist/esm/actions/public/getTransaction.js +1 -1
  118. package/dist/esm/actions/public/getTransaction.js.map +1 -1
  119. package/dist/esm/actions/public/getTransactionReceipt.js +1 -1
  120. package/dist/esm/actions/public/getTransactionReceipt.js.map +1 -1
  121. package/dist/esm/actions/public/multicall.js.map +1 -1
  122. package/dist/esm/actions/public/watchContractEvent.js.map +1 -1
  123. package/dist/esm/actions/public/watchEvent.js.map +1 -1
  124. package/dist/esm/actions/test/getTxpoolContent.js.map +1 -1
  125. package/dist/esm/actions/wallet/deployContract.js.map +1 -1
  126. package/dist/esm/actions/wallet/signTypedData.js.map +1 -1
  127. package/dist/esm/clients/createWalletClient.js +1 -1
  128. package/dist/esm/clients/createWalletClient.js.map +1 -1
  129. package/dist/esm/clients/decorators/public.js.map +1 -1
  130. package/dist/esm/clients/decorators/wallet.js.map +1 -1
  131. package/dist/esm/clients/transports/webSocket.js.map +1 -1
  132. package/dist/esm/errors/abi.js.map +1 -1
  133. package/dist/esm/errors/ccip.js.map +1 -1
  134. package/dist/esm/errors/contract.js.map +1 -1
  135. package/dist/esm/errors/data.js +11 -0
  136. package/dist/esm/errors/data.js.map +1 -1
  137. package/dist/esm/errors/index.js +1 -1
  138. package/dist/esm/errors/index.js.map +1 -1
  139. package/dist/esm/errors/utils.js.map +1 -1
  140. package/dist/esm/errors/version.js +1 -1
  141. package/dist/esm/types/eip1193.js.map +1 -1
  142. package/dist/esm/utils/abi/decodeErrorResult.js.map +1 -1
  143. package/dist/esm/utils/abi/decodeEventLog.js +1 -1
  144. package/dist/esm/utils/abi/decodeEventLog.js.map +1 -1
  145. package/dist/esm/utils/abi/decodeFunctionResult.js.map +1 -1
  146. package/dist/esm/utils/abi/encodeErrorResult.js.map +1 -1
  147. package/dist/esm/utils/abi/encodeFunctionResult.js.map +1 -1
  148. package/dist/esm/utils/abi/encodePacked.js.map +1 -1
  149. package/dist/esm/utils/abi/formatAbiItemWithArgs.js.map +1 -1
  150. package/dist/esm/utils/abi/getAbiItem.js.map +1 -1
  151. package/dist/esm/utils/address/isAddressEqual.js.map +1 -1
  152. package/dist/esm/utils/ccip.js +1 -1
  153. package/dist/esm/utils/ccip.js.map +1 -1
  154. package/dist/esm/utils/data/slice.js +2 -1
  155. package/dist/esm/utils/data/slice.js.map +1 -1
  156. package/dist/esm/utils/encoding/fromHex.js +1 -1
  157. package/dist/esm/utils/encoding/fromHex.js.map +1 -1
  158. package/dist/esm/utils/encoding/toHex.js +1 -1
  159. package/dist/esm/utils/encoding/toHex.js.map +1 -1
  160. package/dist/esm/utils/errors/getContractError.js +5 -2
  161. package/dist/esm/utils/errors/getContractError.js.map +1 -1
  162. package/dist/esm/utils/errors/getNodeError.js.map +1 -1
  163. package/dist/esm/utils/formatters/transactionRequest.js +1 -1
  164. package/dist/esm/utils/formatters/transactionRequest.js.map +1 -1
  165. package/dist/esm/utils/hash/hashFunction.js +1 -1
  166. package/dist/esm/utils/hash/hashFunction.js.map +1 -1
  167. package/dist/esm/utils/rpc.js.map +1 -1
  168. package/dist/esm/utils/signature/recoverTypedDataAddress.js.map +1 -1
  169. package/dist/esm/utils/signature/verifyMessage.js.map +1 -1
  170. package/dist/esm/utils/signature/verifyTypedData.js.map +1 -1
  171. package/dist/esm/utils/transaction/prepareRequest.js +1 -1
  172. package/dist/esm/utils/transaction/prepareRequest.js.map +1 -1
  173. package/dist/types/accounts/privateKeyToAccount.d.ts.map +1 -1
  174. package/dist/types/accounts/types.d.ts.map +1 -1
  175. package/dist/types/actions/getContract.d.ts +1 -1
  176. package/dist/types/actions/getContract.d.ts.map +1 -1
  177. package/dist/types/actions/public/call.d.ts.map +1 -1
  178. package/dist/types/actions/public/createContractEventFilter.d.ts +1 -1
  179. package/dist/types/actions/public/createContractEventFilter.d.ts.map +1 -1
  180. package/dist/types/actions/public/createEventFilter.d.ts.map +1 -1
  181. package/dist/types/actions/public/estimateGas.d.ts +2 -2
  182. package/dist/types/actions/public/estimateGas.d.ts.map +1 -1
  183. package/dist/types/actions/public/getBlock.d.ts +1 -1
  184. package/dist/types/actions/public/getBlock.d.ts.map +1 -1
  185. package/dist/types/actions/public/getFeeHistory.d.ts.map +1 -1
  186. package/dist/types/actions/public/getFilterChanges.d.ts.map +1 -1
  187. package/dist/types/actions/public/getFilterLogs.d.ts.map +1 -1
  188. package/dist/types/actions/public/getLogs.d.ts.map +1 -1
  189. package/dist/types/actions/public/getTransaction.d.ts.map +1 -1
  190. package/dist/types/actions/public/getTransactionReceipt.d.ts.map +1 -1
  191. package/dist/types/actions/public/multicall.d.ts.map +1 -1
  192. package/dist/types/actions/public/watchContractEvent.d.ts +1 -1
  193. package/dist/types/actions/public/watchContractEvent.d.ts.map +1 -1
  194. package/dist/types/actions/public/watchEvent.d.ts +1 -1
  195. package/dist/types/actions/public/watchEvent.d.ts.map +1 -1
  196. package/dist/types/actions/test/getTxpoolContent.d.ts.map +1 -1
  197. package/dist/types/actions/test/getTxpoolStatus.d.ts +1 -1
  198. package/dist/types/actions/test/getTxpoolStatus.d.ts.map +1 -1
  199. package/dist/types/actions/test/increaseTime.d.ts +1 -1
  200. package/dist/types/actions/test/increaseTime.d.ts.map +1 -1
  201. package/dist/types/actions/test/removeBlockTimestampInterval.d.ts +1 -1
  202. package/dist/types/actions/test/removeBlockTimestampInterval.d.ts.map +1 -1
  203. package/dist/types/actions/test/setBlockTimestampInterval.d.ts +1 -1
  204. package/dist/types/actions/test/setBlockTimestampInterval.d.ts.map +1 -1
  205. package/dist/types/actions/wallet/deployContract.d.ts +2 -2
  206. package/dist/types/actions/wallet/deployContract.d.ts.map +1 -1
  207. package/dist/types/actions/wallet/getPermissions.d.ts +1 -1
  208. package/dist/types/actions/wallet/getPermissions.d.ts.map +1 -1
  209. package/dist/types/actions/wallet/requestPermissions.d.ts +1 -1
  210. package/dist/types/actions/wallet/requestPermissions.d.ts.map +1 -1
  211. package/dist/types/actions/wallet/sendTransaction.d.ts +1 -1
  212. package/dist/types/actions/wallet/sendTransaction.d.ts.map +1 -1
  213. package/dist/types/actions/wallet/signTypedData.d.ts.map +1 -1
  214. package/dist/types/actions/wallet/watchAsset.d.ts +1 -1
  215. package/dist/types/actions/wallet/watchAsset.d.ts.map +1 -1
  216. package/dist/types/clients/createClient.d.ts +1 -1
  217. package/dist/types/clients/createClient.d.ts.map +1 -1
  218. package/dist/types/clients/createPublicClient.d.ts +2 -2
  219. package/dist/types/clients/createPublicClient.d.ts.map +1 -1
  220. package/dist/types/clients/createTestClient.d.ts +1 -1
  221. package/dist/types/clients/createTestClient.d.ts.map +1 -1
  222. package/dist/types/clients/createWalletClient.d.ts +3 -3
  223. package/dist/types/clients/createWalletClient.d.ts.map +1 -1
  224. package/dist/types/clients/decorators/public.d.ts +1 -1
  225. package/dist/types/clients/decorators/public.d.ts.map +1 -1
  226. package/dist/types/clients/decorators/wallet.d.ts.map +1 -1
  227. package/dist/types/clients/transports/createTransport.d.ts +1 -1
  228. package/dist/types/clients/transports/createTransport.d.ts.map +1 -1
  229. package/dist/types/clients/transports/webSocket.d.ts.map +1 -1
  230. package/dist/types/errors/abi.d.ts.map +1 -1
  231. package/dist/types/errors/ccip.d.ts +1 -1
  232. package/dist/types/errors/ccip.d.ts.map +1 -1
  233. package/dist/types/errors/contract.d.ts.map +1 -1
  234. package/dist/types/errors/data.d.ts +7 -0
  235. package/dist/types/errors/data.d.ts.map +1 -1
  236. package/dist/types/errors/index.d.ts +1 -1
  237. package/dist/types/errors/index.d.ts.map +1 -1
  238. package/dist/types/errors/transaction.d.ts +1 -1
  239. package/dist/types/errors/transaction.d.ts.map +1 -1
  240. package/dist/types/errors/utils.d.ts.map +1 -1
  241. package/dist/types/errors/version.d.ts +1 -1
  242. package/dist/types/types/account.d.ts.map +1 -1
  243. package/dist/types/types/block.d.ts.map +1 -1
  244. package/dist/types/types/chain.d.ts.map +1 -1
  245. package/dist/types/types/contract.d.ts +1 -1
  246. package/dist/types/types/contract.d.ts.map +1 -1
  247. package/dist/types/types/eip1193.d.ts +3 -3
  248. package/dist/types/types/eip1193.d.ts.map +1 -1
  249. package/dist/types/types/filter.d.ts +1 -1
  250. package/dist/types/types/filter.d.ts.map +1 -1
  251. package/dist/types/types/log.d.ts.map +1 -1
  252. package/dist/types/types/multicall.d.ts.map +1 -1
  253. package/dist/types/types/transaction.d.ts.map +1 -1
  254. package/dist/types/utils/abi/decodeAbiParameters.d.ts.map +1 -1
  255. package/dist/types/utils/abi/decodeErrorResult.d.ts.map +1 -1
  256. package/dist/types/utils/abi/decodeEventLog.d.ts +1 -1
  257. package/dist/types/utils/abi/decodeEventLog.d.ts.map +1 -1
  258. package/dist/types/utils/abi/decodeFunctionResult.d.ts +1 -1
  259. package/dist/types/utils/abi/decodeFunctionResult.d.ts.map +1 -1
  260. package/dist/types/utils/abi/encodeAbiParameters.d.ts.map +1 -1
  261. package/dist/types/utils/abi/encodeErrorResult.d.ts.map +1 -1
  262. package/dist/types/utils/abi/encodeEventTopics.d.ts.map +1 -1
  263. package/dist/types/utils/abi/encodeFunctionResult.d.ts +1 -1
  264. package/dist/types/utils/abi/encodeFunctionResult.d.ts.map +1 -1
  265. package/dist/types/utils/abi/encodePacked.d.ts.map +1 -1
  266. package/dist/types/utils/abi/formatAbiItemWithArgs.d.ts.map +1 -1
  267. package/dist/types/utils/abi/getAbiItem.d.ts.map +1 -1
  268. package/dist/types/utils/address/isAddressEqual.d.ts.map +1 -1
  269. package/dist/types/utils/ccip.d.ts +2 -2
  270. package/dist/types/utils/ccip.d.ts.map +1 -1
  271. package/dist/types/utils/data/slice.d.ts.map +1 -1
  272. package/dist/types/utils/errors/getContractError.d.ts +1 -1
  273. package/dist/types/utils/errors/getContractError.d.ts.map +1 -1
  274. package/dist/types/utils/errors/getNodeError.d.ts.map +1 -1
  275. package/dist/types/utils/formatters/block.d.ts +1 -1
  276. package/dist/types/utils/formatters/transaction.d.ts +1 -1
  277. package/dist/types/utils/formatters/transactionRequest.d.ts.map +1 -1
  278. package/dist/types/utils/rpc.d.ts.map +1 -1
  279. package/dist/types/utils/signature/recoverTypedDataAddress.d.ts.map +1 -1
  280. package/dist/types/utils/signature/verifyMessage.d.ts +1 -1
  281. package/dist/types/utils/signature/verifyMessage.d.ts.map +1 -1
  282. package/dist/types/utils/signature/verifyTypedData.d.ts +1 -1
  283. package/dist/types/utils/signature/verifyTypedData.d.ts.map +1 -1
  284. package/dist/types/utils/transaction/prepareRequest.d.ts.map +1 -1
  285. package/package.json +1 -1
  286. package/src/accounts/mnemonicToAccount.ts +1 -1
  287. package/src/accounts/privateKeyToAccount.ts +2 -2
  288. package/src/accounts/types.ts +1 -0
  289. package/src/accounts/utils/publicKeyToAddress.ts +1 -1
  290. package/src/actions/ens/getEnsAddress.ts +1 -1
  291. package/src/actions/ens/getEnsName.ts +1 -1
  292. package/src/actions/ens/getEnsResolver.ts +1 -1
  293. package/src/actions/ens/getEnsText.ts +1 -1
  294. package/src/actions/getContract.ts +8 -7
  295. package/src/actions/public/call.ts +6 -1
  296. package/src/actions/public/createContractEventFilter.ts +3 -3
  297. package/src/actions/public/createEventFilter.ts +2 -2
  298. package/src/actions/public/estimateGas.ts +5 -4
  299. package/src/actions/public/getBlock.ts +1 -1
  300. package/src/actions/public/getFeeHistory.ts +1 -2
  301. package/src/actions/public/getFilterChanges.ts +2 -2
  302. package/src/actions/public/getFilterLogs.ts +2 -2
  303. package/src/actions/public/getLogs.ts +2 -1
  304. package/src/actions/public/getTransaction.ts +1 -1
  305. package/src/actions/public/getTransactionReceipt.ts +1 -1
  306. package/src/actions/public/multicall.ts +1 -0
  307. package/src/actions/public/watchContractEvent.ts +2 -2
  308. package/src/actions/public/watchEvent.ts +1 -1
  309. package/src/actions/test/getTxpoolContent.ts +1 -0
  310. package/src/actions/test/getTxpoolStatus.ts +1 -1
  311. package/src/actions/test/increaseTime.ts +1 -1
  312. package/src/actions/test/removeBlockTimestampInterval.ts +1 -1
  313. package/src/actions/test/setBlockTimestampInterval.ts +1 -1
  314. package/src/actions/wallet/deployContract.ts +3 -2
  315. package/src/actions/wallet/getPermissions.ts +1 -1
  316. package/src/actions/wallet/requestPermissions.ts +1 -1
  317. package/src/actions/wallet/sendTransaction.ts +1 -1
  318. package/src/actions/wallet/signTypedData.ts +1 -0
  319. package/src/actions/wallet/watchAsset.ts +1 -1
  320. package/src/clients/createClient.ts +1 -1
  321. package/src/clients/createPublicClient.ts +2 -2
  322. package/src/clients/createTestClient.ts +1 -1
  323. package/src/clients/createWalletClient.ts +5 -5
  324. package/src/clients/decorators/public.ts +1 -1
  325. package/src/clients/decorators/wallet.ts +1 -0
  326. package/src/clients/transports/createTransport.ts +1 -1
  327. package/src/clients/transports/webSocket.ts +1 -0
  328. package/src/errors/abi.ts +1 -0
  329. package/src/errors/ccip.ts +2 -1
  330. package/src/errors/contract.ts +1 -0
  331. package/src/errors/data.ts +9 -0
  332. package/src/errors/index.ts +4 -1
  333. package/src/errors/transaction.ts +2 -2
  334. package/src/errors/utils.ts +1 -0
  335. package/src/errors/version.ts +1 -1
  336. package/src/types/account.ts +1 -0
  337. package/src/types/block.ts +1 -0
  338. package/src/types/chain.ts +1 -0
  339. package/src/types/contract.ts +5 -4
  340. package/src/types/eip1193.ts +4 -3
  341. package/src/types/filter.ts +2 -1
  342. package/src/types/log.ts +1 -0
  343. package/src/types/multicall.ts +1 -0
  344. package/src/types/transaction.ts +1 -0
  345. package/src/utils/abi/decodeAbiParameters.ts +1 -1
  346. package/src/utils/abi/decodeErrorResult.ts +1 -0
  347. package/src/utils/abi/decodeEventLog.ts +3 -2
  348. package/src/utils/abi/decodeFunctionResult.ts +3 -2
  349. package/src/utils/abi/encodeAbiParameters.ts +1 -1
  350. package/src/utils/abi/encodeErrorResult.ts +2 -1
  351. package/src/utils/abi/encodeEventTopics.ts +1 -1
  352. package/src/utils/abi/encodeFunctionResult.ts +2 -2
  353. package/src/utils/abi/encodePacked.ts +1 -0
  354. package/src/utils/abi/formatAbiItemWithArgs.ts +1 -0
  355. package/src/utils/abi/getAbiItem.ts +1 -0
  356. package/src/utils/address/isAddressEqual.ts +1 -1
  357. package/src/utils/ccip.ts +3 -3
  358. package/src/utils/data/slice.ts +2 -5
  359. package/src/utils/encoding/fromHex.ts +1 -1
  360. package/src/utils/encoding/toHex.ts +2 -2
  361. package/src/utils/errors/getContractError.ts +9 -6
  362. package/src/utils/errors/getNodeError.ts +1 -1
  363. package/src/utils/formatters/block.ts +1 -1
  364. package/src/utils/formatters/transactionRequest.ts +1 -1
  365. package/src/utils/hash/hashFunction.ts +1 -1
  366. package/src/utils/rpc.ts +2 -1
  367. package/src/utils/signature/recoverTypedDataAddress.ts +1 -0
  368. package/src/utils/signature/verifyMessage.ts +2 -1
  369. package/src/utils/signature/verifyTypedData.ts +2 -1
  370. package/src/utils/transaction/prepareRequest.ts +1 -1
@@ -1,5 +1,5 @@
1
1
  import type { Abi } from 'abitype';
2
- import type { BaseError } from '../../errors/index.js';
2
+ import { BaseError } from '../../errors/index.js';
3
3
  import { ContractFunctionExecutionError } from '../../errors/index.js';
4
4
  import type { Address } from '../../types/index.js';
5
5
  export declare function getContractError(err: BaseError, { abi, address, args, docsPath, functionName, sender, }: {
@@ -1 +1 @@
1
- {"version":3,"file":"getContractError.d.ts","sourceRoot":"","sources":["../../../../src/utils/errors/getContractError.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,SAAS,CAAA;AAClC,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAA;AACtD,OAAO,EAEL,8BAA8B,EAE/B,MAAM,uBAAuB,CAAA;AAK9B,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAA;AAInD,wBAAgB,gBAAgB,CAC9B,GAAG,EAAE,SAAS,EACd,EACE,GAAG,EACH,OAAO,EACP,IAAI,EACJ,QAAQ,EACR,YAAY,EACZ,MAAM,GACP,EAAE;IACD,GAAG,EAAE,GAAG,CAAA;IACR,IAAI,EAAE,GAAG,CAAA;IACT,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,YAAY,EAAE,MAAM,CAAA;IACpB,MAAM,CAAC,EAAE,OAAO,CAAA;CACjB,kCA+BF"}
1
+ {"version":3,"file":"getContractError.d.ts","sourceRoot":"","sources":["../../../../src/utils/errors/getContractError.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,SAAS,CAAA;AAMlC,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAA;AACjD,OAAO,EAEL,8BAA8B,EAE/B,MAAM,uBAAuB,CAAA;AAC9B,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAA;AAInD,wBAAgB,gBAAgB,CAC9B,GAAG,EAAE,SAAS,EACd,EACE,GAAG,EACH,OAAO,EACP,IAAI,EACJ,QAAQ,EACR,YAAY,EACZ,MAAM,GACP,EAAE;IACD,GAAG,EAAE,GAAG,CAAA;IACR,IAAI,EAAE,GAAG,CAAA;IACT,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,YAAY,EAAE,MAAM,CAAA;IACpB,MAAM,CAAC,EAAE,OAAO,CAAA;CACjB,kCAiCF"}
@@ -1 +1 @@
1
- {"version":3,"file":"getNodeError.d.ts","sourceRoot":"","sources":["../../../../src/utils/errors/getNodeError.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,wBAAwB,CAAA;AACvE,OAAO,EAAmB,KAAK,SAAS,EAAE,MAAM,uBAAuB,CAAA;AACvE,OAAO,EACL,sBAAsB,EACtB,kBAAkB,EAClB,iBAAiB,EACjB,sBAAsB,EACtB,wBAAwB,EACxB,uBAAuB,EAEvB,kBAAkB,EAClB,iBAAiB,EACjB,gBAAgB,EAChB,mBAAmB,EAEnB,gCAAgC,EAChC,gBAAgB,EACjB,MAAM,uBAAuB,CAAA;AAE9B,wBAAgB,iBAAiB,CAAC,GAAG,EAAE,SAAS,WAM/C;AAED,wBAAgB,YAAY,CAC1B,GAAG,EAAE,SAAS,EACd,IAAI,EAAE,OAAO,CAAC,yBAAyB,CAAC,GAAG,CAAC,CAAC,yRA6C9C"}
1
+ {"version":3,"file":"getNodeError.d.ts","sourceRoot":"","sources":["../../../../src/utils/errors/getNodeError.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,wBAAwB,CAAA;AACvE,OAAO,EAAE,KAAK,SAAS,EAAmB,MAAM,uBAAuB,CAAA;AACvE,OAAO,EACL,sBAAsB,EACtB,kBAAkB,EAClB,iBAAiB,EACjB,sBAAsB,EACtB,wBAAwB,EACxB,uBAAuB,EAEvB,kBAAkB,EAClB,iBAAiB,EACjB,gBAAgB,EAChB,mBAAmB,EAEnB,gCAAgC,EAChC,gBAAgB,EACjB,MAAM,uBAAuB,CAAA;AAE9B,wBAAgB,iBAAiB,CAAC,GAAG,EAAE,SAAS,WAM/C;AAED,wBAAgB,YAAY,CAC1B,GAAG,EAAE,SAAS,EACd,IAAI,EAAE,OAAO,CAAC,yBAAyB,CAAC,GAAG,CAAC,CAAC,yRA6C9C"}
@@ -1,4 +1,4 @@
1
- import type { Chain, Block, Formatter, Formatters, RpcBlock } from '../../types/index.js';
1
+ import type { Block, Chain, Formatter, Formatters, RpcBlock } from '../../types/index.js';
2
2
  import type { ExtractFormatter, Formatted } from './format.js';
3
3
  export type BlockFormatter<TChain extends Chain | undefined = Chain> = TChain extends Chain ? ExtractFormatter<TChain, 'block', NonNullable<Formatters['block']>> : Formatters['block'];
4
4
  export type FormattedBlock<TFormatter extends Formatter | undefined = Formatter> = Formatted<TFormatter, Block>;
@@ -10,7 +10,7 @@ export declare const transactionType: {
10
10
  export declare function formatTransaction(transaction: Partial<RpcTransaction>): Transaction;
11
11
  export declare const defineTransaction: <TFormat extends Formatter<Partial<RpcTransaction>, Partial<Transaction> & {
12
12
  [key: string]: unknown;
13
- }>, TExclude extends ("from" | "gas" | "nonce" | "to" | "value" | "type" | "gasPrice" | "maxFeePerGas" | "maxPriorityFeePerGas" | "accessList" | "blockNumber" | "blockHash" | "transactionIndex" | "chainId" | "r" | "s" | "v" | "hash" | "input")[] = []>({ exclude, format: formatOverride, }: {
13
+ }>, TExclude extends ("from" | "gas" | "nonce" | "to" | "value" | "type" | "gasPrice" | "maxFeePerGas" | "maxPriorityFeePerGas" | "chainId" | "accessList" | "r" | "s" | "v" | "blockNumber" | "blockHash" | "transactionIndex" | "hash" | "input")[] = []>({ exclude, format: formatOverride, }: {
14
14
  exclude?: TExclude | undefined;
15
15
  format?: TFormat | undefined;
16
16
  }) => (data: Partial<RpcTransaction> & {
@@ -1 +1 @@
1
- {"version":3,"file":"transactionRequest.d.ts","sourceRoot":"","sources":["../../../../src/utils/formatters/transactionRequest.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,KAAK,EACL,SAAS,EACT,UAAU,EACV,qBAAqB,EACrB,kBAAkB,EACnB,MAAM,sBAAsB,CAAA;AAE7B,OAAO,KAAK,EAAE,gBAAgB,EAAE,SAAS,EAAE,MAAM,aAAa,CAAA;AAG9D,MAAM,MAAM,2BAA2B,CACrC,MAAM,SAAS,KAAK,GAAG,SAAS,GAAG,KAAK,IACtC,MAAM,SAAS,KAAK,GACpB,gBAAgB,CACd,MAAM,EACN,oBAAoB,EACpB,WAAW,CAAC,UAAU,CAAC,oBAAoB,CAAC,CAAC,CAC9C,GACD,UAAU,CAAC,oBAAoB,CAAC,CAAA;AAEpC,MAAM,MAAM,2BAA2B,CACrC,UAAU,SAAS,SAAS,GAAG,SAAS,GAAG,SAAS,IAClD,SAAS,CAAC,UAAU,EAAE,qBAAqB,CAAC,CAAA;AAEhD,wBAAgB,wBAAwB,CACtC,kBAAkB,EAAE,OAAO,CAAC,kBAAkB,CAAC,yBA6BhD;AAED,eAAO,MAAM,wBAAwB;;;;;;;uFAEnC,CAAA"}
1
+ {"version":3,"file":"transactionRequest.d.ts","sourceRoot":"","sources":["../../../../src/utils/formatters/transactionRequest.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,KAAK,EACL,SAAS,EACT,UAAU,EACV,qBAAqB,EACrB,kBAAkB,EACnB,MAAM,sBAAsB,CAAA;AAG7B,OAAO,KAAK,EAAE,gBAAgB,EAAE,SAAS,EAAE,MAAM,aAAa,CAAA;AAE9D,MAAM,MAAM,2BAA2B,CACrC,MAAM,SAAS,KAAK,GAAG,SAAS,GAAG,KAAK,IACtC,MAAM,SAAS,KAAK,GACpB,gBAAgB,CACd,MAAM,EACN,oBAAoB,EACpB,WAAW,CAAC,UAAU,CAAC,oBAAoB,CAAC,CAAC,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f,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"recoverTypedDataAddress.d.ts","sourceRoot":"","sources":["../../../../src/utils/signature/recoverTypedDataAddress.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,SAAS,CAAA;AACxC,OAAO,KAAK,EACV,OAAO,EACP,SAAS,EACT,GAAG,EACH,mBAAmB,EACpB,MAAM,sBAAsB,CAAA;AAI7B,MAAM,MAAM,iCAAiC,CAC3C,UAAU,SAAS,SAAS,GAAG;IAAE,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAA;CAAE,GAAG,SAAS,EACrE,YAAY,SAAS,MAAM,GAAG,MAAM,IAClC,mBAAmB,CAAC,UAAU,EAAE,YAAY,CAAC,GAAG;IAClD,SAAS,EAAE,GAAG,GAAG,SAAS,CAAA;CAC3B,CAAA;AACD,MAAM,MAAM,iCAAiC,GAAG,OAAO,CAAA;AAEvD,wBAAsB,uBAAuB,CAC3C,UAAU,SAAS,SAAS,GAAG;IAAE,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAA;CAAE,EACzD,YAAY,SAAS,MAAM,GAAG,MAAM,EACpC,EACA,MAAM,EACN,OAAO,EACP,WAAW,EACX,SAAS,EACT,KAAK,GACN,EAAE,iCAAiC,CAClC,UAAU,EACV,YAAY,CACb,GAAG,OAAO,CAAC,iCAAiC,CAAC,CAU7C"}
1
+ {"version":3,"file":"recoverTypedDataAddress.d.ts","sourceRoot":"","sources":["../../../../src/utils/signature/recoverTypedDataAddress.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,SAAS,CAAA;AAExC,OAAO,KAAK,EACV,OAAO,EACP,SAAS,EACT,GAAG,EACH,mBAAmB,EACpB,MAAM,sBAAsB,CAAA;AAI7B,MAAM,MAAM,iCAAiC,CAC3C,UAAU,SAAS,SAAS,GAAG;IAAE,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAA;CAAE,GAAG,SAAS,EACrE,YAAY,SAAS,MAAM,GAAG,MAAM,IAClC,mBAAmB,CAAC,UAAU,EAAE,YAAY,CAAC,GAAG;IAClD,SAAS,EAAE,GAAG,GAAG,SAAS,CAAA;CAC3B,CAAA;AACD,MAAM,MAAM,iCAAiC,GAAG,OAAO,CAAA;AAEvD,wBAAsB,uBAAuB,CAC3C,UAAU,SAAS,SAAS,GAAG;IAAE,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAA;CAAE,EACzD,YAAY,SAAS,MAAM,GAAG,MAAM,EACpC,EACA,MAAM,EACN,OAAO,EACP,WAAW,EACX,SAAS,EACT,KAAK,GACN,EAAE,iCAAiC,CAClC,UAAU,EACV,YAAY,CACb,GAAG,OAAO,CAAC,iCAAiC,CAAC,CAU7C"}
@@ -1,5 +1,5 @@
1
1
  import type { Address } from 'abitype';
2
- import type { Hex, ByteArray } from '../../types/index.js';
2
+ import type { ByteArray, Hex } from '../../types/index.js';
3
3
  export type VerifyMessageParameters = {
4
4
  address: Address;
5
5
  message: string;
@@ -1 +1 @@
1
- {"version":3,"file":"verifyMessage.d.ts","sourceRoot":"","sources":["../../../../src/utils/signature/verifyMessage.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,SAAS,CAAA;AACtC,OAAO,KAAK,EAAE,GAAG,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAA;AAG1D,MAAM,MAAM,uBAAuB,GAAG;IACpC,OAAO,EAAE,OAAO,CAAA;IAChB,OAAO,EAAE,MAAM,CAAA;IACf,SAAS,EAAE,GAAG,GAAG,SAAS,CAAA;CAC3B,CAAA;AAED,MAAM,MAAM,uBAAuB,GAAG,OAAO,CAAA;AAE7C,wBAAsB,aAAa,CAAC,EAClC,OAAO,EACP,OAAO,EACP,SAAS,GACV,EAAE,uBAAuB,GAAG,OAAO,CAAC,uBAAuB,CAAC,CAK5D"}
1
+ {"version":3,"file":"verifyMessage.d.ts","sourceRoot":"","sources":["../../../../src/utils/signature/verifyMessage.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,SAAS,CAAA;AAEtC,OAAO,KAAK,EAAE,SAAS,EAAE,GAAG,EAAE,MAAM,sBAAsB,CAAA;AAG1D,MAAM,MAAM,uBAAuB,GAAG;IACpC,OAAO,EAAE,OAAO,CAAA;IAChB,OAAO,EAAE,MAAM,CAAA;IACf,SAAS,EAAE,GAAG,GAAG,SAAS,CAAA;CAC3B,CAAA;AAED,MAAM,MAAM,uBAAuB,GAAG,OAAO,CAAA;AAE7C,wBAAsB,aAAa,CAAC,EAClC,OAAO,EACP,OAAO,EACP,SAAS,GACV,EAAE,uBAAuB,GAAG,OAAO,CAAC,uBAAuB,CAAC,CAK5D"}
@@ -1,5 +1,5 @@
1
1
  import type { Address, TypedData } from 'abitype';
2
- import type { Hex, ByteArray, TypedDataDefinition } from '../../types/index.js';
2
+ import type { ByteArray, Hex, TypedDataDefinition } from '../../types/index.js';
3
3
  export type VerifyTypedDataParameters<TTypedData extends TypedData | {
4
4
  [key: string]: unknown;
5
5
  } = TypedData, TPrimaryType extends string = string> = TypedDataDefinition<TTypedData, TPrimaryType> & {
@@ -1 +1 @@
1
- {"version":3,"file":"verifyTypedData.d.ts","sourceRoot":"","sources":["../../../../src/utils/signature/verifyTypedData.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,SAAS,EAAE,MAAM,SAAS,CAAA;AACjD,OAAO,KAAK,EAAE,GAAG,EAAE,SAAS,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAA;AAK/E,MAAM,MAAM,yBAAyB,CACnC,UAAU,SAAS,SAAS,GAAG;IAAE,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAA;CAAE,GAAG,SAAS,EACrE,YAAY,SAAS,MAAM,GAAG,MAAM,IAClC,mBAAmB,CAAC,UAAU,EAAE,YAAY,CAAC,GAAG;IAClD,OAAO,EAAE,OAAO,CAAA;IAChB,SAAS,EAAE,GAAG,GAAG,SAAS,CAAA;CAC3B,CAAA;AAED,MAAM,MAAM,yBAAyB,GAAG,OAAO,CAAA;AAE/C,wBAAsB,eAAe,CACnC,UAAU,SAAS,SAAS,GAAG;IAAE,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAA;CAAE,EACzD,YAAY,SAAS,MAAM,GAAG,MAAM,EACpC,EACA,OAAO,EACP,MAAM,EACN,OAAO,EACP,WAAW,EACX,SAAS,EACT,KAAK,GACN,EAAE,yBAAyB,CAC1B,UAAU,EACV,YAAY,CACb,GAAG,OAAO,CAAC,yBAAyB,CAAC,CAWrC"}
1
+ {"version":3,"file":"verifyTypedData.d.ts","sourceRoot":"","sources":["../../../../src/utils/signature/verifyTypedData.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,SAAS,EAAE,MAAM,SAAS,CAAA;AAEjD,OAAO,KAAK,EAAE,SAAS,EAAE,GAAG,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAA;AAK/E,MAAM,MAAM,yBAAyB,CACnC,UAAU,SAAS,SAAS,GAAG;IAAE,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAA;CAAE,GAAG,SAAS,EACrE,YAAY,SAAS,MAAM,GAAG,MAAM,IAClC,mBAAmB,CAAC,UAAU,EAAE,YAAY,CAAC,GAAG;IAClD,OAAO,EAAE,OAAO,CAAA;IAChB,SAAS,EAAE,GAAG,GAAG,SAAS,CAAA;CAC3B,CAAA;AAED,MAAM,MAAM,yBAAyB,GAAG,OAAO,CAAA;AAE/C,wBAAsB,eAAe,CACnC,UAAU,SAAS,SAAS,GAAG;IAAE,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAA;CAAE,EACzD,YAAY,SAAS,MAAM,GAAG,MAAM,EACpC,EACA,OAAO,EACP,MAAM,EACN,OAAO,EACP,WAAW,EACX,SAAS,EACT,KAAK,GACN,EAAE,yBAAyB,CAC1B,UAAU,E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AS,OAAO,GAAG,SAAS,GAAG,SAAS,EAChD,WAAW,SAAS,wBAAwB,CAAC,QAAQ,CAAC,GAAG,wBAAwB,CAAC,QAAQ,CAAC,IACzF,WAAW,GAAG;IAChB,IAAI,EAAE,OAAO,CAAA;IACb,GAAG,EAAE,yBAAyB,CAAC,KAAK,CAAC,CAAA;IACrC,QAAQ,CAAC,EAAE,yBAAyB,CAAC,UAAU,CAAC,CAAA;IAChD,YAAY,CAAC,EAAE,yBAAyB,CAAC,cAAc,CAAC,CAAA;IACxD,oBAAoB,CAAC,EAAE,yBAAyB,CAAC,sBAAsB,CAAC,CAAA;IACxE,KAAK,EAAE,yBAAyB,CAAC,OAAO,CAAC,CAAA;CAC1C,CAAA;AAED,eAAO,MAAM,UAAU,QAAmB,CAAA;AAE1C,wBAAsB,cAAc,CAClC,MAAM,SAAS,KAAK,GAAG,SAAS,EAChC,QAAQ,SAAS,OAAO,GAAG,SAAS,EACpC,WAAW,SAAS,wBAAwB,CAAC,QAAQ,CAAC,EAEtD,MAAM,EACF,YAAY,CAAC,SAAS,EAAE,MAAM,EAAE,QAAQ,CAAC,GACzC,YAAY,CAAC,SAAS,EAAE,MAAM,CAAC,EACnC,IAAI,EAAE,WAAW,GAChB,OAAO,CAAC,wBAAwB,CAAC,QAAQ,EAAE,WAAW,CAAC,CAAC,CAiE1D"}
package/package.json CHANGED
@@ -12,7 +12,7 @@
12
12
  "isomorphic-ws": "5.0.0",
13
13
  "ws": "8.12.0"
14
14
  },
15
- "version": "0.3.15",
15
+ "version": "0.3.17",
16
16
  "files": [
17
17
  "dist",
18
18
  "!dist/**/*.tsbuildinfo",
@@ -1,7 +1,7 @@
1
1
  import { HDKey } from '@scure/bip32'
2
2
  import { mnemonicToSeedSync } from '@scure/bip39'
3
- import { hdKeyToAccount } from './hdKeyToAccount.js'
4
3
 
4
+ import { hdKeyToAccount } from './hdKeyToAccount.js'
5
5
  import type { HDAccount, HDOptions } from './types.js'
6
6
 
7
7
  /**
@@ -2,14 +2,14 @@ import { secp256k1 } from '@noble/curves/secp256k1'
2
2
 
3
3
  import type { Hex } from '../types/index.js'
4
4
  import { toHex } from '../utils/index.js'
5
+ import { toAccount } from './toAccount.js'
6
+ import type { PrivateKeyAccount } from './types.js'
5
7
  import {
6
8
  publicKeyToAddress,
7
9
  signMessage,
8
10
  signTransaction,
9
11
  signTypedData,
10
12
  } from './utils/index.js'
11
- import { toAccount } from './toAccount.js'
12
- import type { PrivateKeyAccount } from './types.js'
13
13
 
14
14
  /**
15
15
  * @description Creates an Account from a private key.
@@ -1,5 +1,6 @@
1
1
  import type { HDKey } from '@scure/bip32'
2
2
  import type { Address, TypedData } from 'abitype'
3
+
3
4
  import type {
4
5
  Hash,
5
6
  Hex,
@@ -1,6 +1,6 @@
1
1
  import type { Address, Hex } from '../../types/index.js'
2
- import { keccak256 } from '../../utils/index.js'
3
2
  import { checksumAddress } from '../../utils/address/index.js'
3
+ import { keccak256 } from '../../utils/index.js'
4
4
 
5
5
  /**
6
6
  * @description Converts an ECDSA public key to an address.
@@ -4,6 +4,7 @@ import {
4
4
  universalResolverAbi,
5
5
  } from '../../constants/abis.js'
6
6
  import type { Address, Chain, Prettify } from '../../types/index.js'
7
+ import { namehash, packetToBytes } from '../../utils/ens/index.js'
7
8
  import {
8
9
  decodeFunctionResult,
9
10
  encodeFunctionData,
@@ -11,7 +12,6 @@ import {
11
12
  toHex,
12
13
  trim,
13
14
  } from '../../utils/index.js'
14
- import { namehash, packetToBytes } from '../../utils/ens/index.js'
15
15
  import { readContract } from '../public/index.js'
16
16
  import type { ReadContractParameters } from '../public/index.js'
17
17
 
@@ -3,8 +3,8 @@ import { panicReasons } from '../../constants/index.js'
3
3
  import type { ContractFunctionRevertedError } from '../../errors/index.js'
4
4
  import { ContractFunctionExecutionError } from '../../errors/index.js'
5
5
  import type { Address, Chain, Prettify } from '../../types/index.js'
6
- import { getChainContractAddress, toHex } from '../../utils/index.js'
7
6
  import { packetToBytes } from '../../utils/ens/index.js'
7
+ import { getChainContractAddress, toHex } from '../../utils/index.js'
8
8
  import { readContract } from '../public/index.js'
9
9
  import type { ReadContractParameters } from '../public/index.js'
10
10
 
@@ -1,7 +1,7 @@
1
1
  import type { PublicClient, Transport } from '../../clients/index.js'
2
2
  import type { Address, Chain, Prettify } from '../../types/index.js'
3
- import { getChainContractAddress, toHex } from '../../utils/index.js'
4
3
  import { packetToBytes } from '../../utils/ens/index.js'
4
+ import { getChainContractAddress, toHex } from '../../utils/index.js'
5
5
  import { readContract } from '../public/index.js'
6
6
  import type { ReadContractParameters } from '../public/index.js'
7
7
 
@@ -1,13 +1,13 @@
1
1
  import type { PublicClient, Transport } from '../../clients/index.js'
2
2
  import { textResolverAbi, universalResolverAbi } from '../../constants/abis.js'
3
3
  import type { Address, Chain, Prettify } from '../../types/index.js'
4
+ import { namehash, packetToBytes } from '../../utils/ens/index.js'
4
5
  import {
5
6
  decodeFunctionResult,
6
7
  encodeFunctionData,
7
8
  getChainContractAddress,
8
9
  toHex,
9
10
  } from '../../utils/index.js'
10
- import { namehash, packetToBytes } from '../../utils/ens/index.js'
11
11
  import { readContract } from '../public/index.js'
12
12
  import type { ReadContractParameters } from '../public/index.js'
13
13
 
@@ -10,6 +10,7 @@ import type {
10
10
  ExtractAbiFunctionNames,
11
11
  Narrow,
12
12
  } from 'abitype'
13
+
13
14
  import type { PublicClient, Transport, WalletClient } from '../clients/index.js'
14
15
  import type {
15
16
  AbiEventParametersToPrimitiveTypes,
@@ -24,22 +25,22 @@ import type {
24
25
  } from '../types/index.js'
25
26
  import {
26
27
  createContractEventFilter,
28
+ estimateContractGas,
27
29
  readContract,
28
30
  simulateContract,
29
- estimateContractGas,
30
31
  watchContractEvent,
31
32
  } from './public/index.js'
32
33
  import type {
33
- WatchContractEventParameters,
34
- WatchContractEventReturnType,
35
- ReadContractParameters,
36
- ReadContractReturnType,
37
- SimulateContractParameters,
38
- EstimateContractGasParameters,
39
34
  CreateContractEventFilterParameters,
40
35
  CreateContractEventFilterReturnType,
36
+ EstimateContractGasParameters,
41
37
  EstimateContractGasReturnType,
38
+ ReadContractParameters,
39
+ ReadContractReturnType,
40
+ SimulateContractParameters,
42
41
  SimulateContractReturnType,
42
+ WatchContractEventParameters,
43
+ WatchContractEventReturnType,
43
44
  } from './public/index.js'
44
45
  import { writeContract } from './wallet/index.js'
45
46
  import type {
@@ -14,6 +14,7 @@ import type {
14
14
  Formatter,
15
15
  Hex,
16
16
  MergeIntersectionProperties,
17
+ RpcTransactionRequest,
17
18
  TransactionRequest,
18
19
  } from '../../types/index.js'
19
20
  import type {
@@ -115,6 +116,8 @@ export async function call<TChain extends Chain | undefined>(
115
116
  assertRequest(args)
116
117
 
117
118
  const blockNumberHex = blockNumber ? numberToHex(blockNumber) : undefined
119
+ const block = blockNumberHex || blockTag
120
+
118
121
  const formatter = client.chain?.formatters?.transactionRequest
119
122
  const request = format(
120
123
  {
@@ -154,7 +157,9 @@ export async function call<TChain extends Chain | undefined>(
154
157
 
155
158
  const response = await client.request({
156
159
  method: 'eth_call',
157
- params: [request as any, blockNumberHex || blockTag],
160
+ params: block
161
+ ? [request as Partial<RpcTransactionRequest>, block]
162
+ : [request as Partial<RpcTransactionRequest>],
158
163
  })
159
164
  if (response === '0x') return { data: undefined }
160
165
  return { data: response }
@@ -1,18 +1,18 @@
1
1
  import type { Abi, Narrow } from 'abitype'
2
- import type { PublicClient, Transport } from '../../clients/index.js'
3
2
 
3
+ import type { PublicClient, Transport } from '../../clients/index.js'
4
4
  import type {
5
5
  Address,
6
6
  BlockNumber,
7
7
  BlockTag,
8
8
  Chain,
9
- InferEventName,
10
9
  Filter,
10
+ InferEventName,
11
11
  MaybeExtractEventArgsFromAbi,
12
12
  } from '../../types/index.js'
13
+ import { createFilterRequestScope } from '../../utils/filters/createFilterRequestScope.js'
13
14
  import { encodeEventTopics, numberToHex } from '../../utils/index.js'
14
15
  import type { EncodeEventTopicsParameters } from '../../utils/index.js'
15
- import { createFilterRequestScope } from '../../utils/filters/createFilterRequestScope.js'
16
16
 
17
17
  export type CreateContractEventFilterParameters<
18
18
  TAbi extends Abi | readonly unknown[] = Abi,
@@ -1,6 +1,6 @@
1
1
  import type { Abi, AbiEvent, Narrow } from 'abitype'
2
- import type { PublicClient, Transport } from '../../clients/index.js'
3
2
 
3
+ import type { PublicClient, Transport } from '../../clients/index.js'
4
4
  import type {
5
5
  Address,
6
6
  BlockNumber,
@@ -12,9 +12,9 @@ import type {
12
12
  MaybeExtractEventArgsFromAbi,
13
13
  Prettify,
14
14
  } from '../../types/index.js'
15
+ import { createFilterRequestScope } from '../../utils/filters/createFilterRequestScope.js'
15
16
  import { encodeEventTopics, numberToHex } from '../../utils/index.js'
16
17
  import type { EncodeEventTopicsParameters } from '../../utils/index.js'
17
- import { createFilterRequestScope } from '../../utils/filters/createFilterRequestScope.js'
18
18
 
19
19
  export type CreateEventFilterParameters<
20
20
  TAbiEvent extends AbiEvent | undefined = undefined,
@@ -1,10 +1,11 @@
1
1
  import type {
2
2
  PublicClient,
3
- WalletClient,
4
3
  Transport,
4
+ WalletClient,
5
5
  } from '../../clients/index.js'
6
6
  import type { BaseError } from '../../errors/index.js'
7
7
  import { AccountNotFoundError } from '../../errors/index.js'
8
+ import type { GetAccountParameter } from '../../types/account.js'
8
9
  import type {
9
10
  Account,
10
11
  BlockTag,
@@ -13,7 +14,6 @@ import type {
13
14
  MergeIntersectionProperties,
14
15
  TransactionRequest,
15
16
  } from '../../types/index.js'
16
- import type { GetAccountParameter } from '../../types/account.js'
17
17
  import {
18
18
  assertRequest,
19
19
  extract,
@@ -103,7 +103,7 @@ export async function estimateGas<
103
103
  const {
104
104
  accessList,
105
105
  blockNumber,
106
- blockTag = 'latest',
106
+ blockTag,
107
107
  data,
108
108
  gas,
109
109
  gasPrice,
@@ -116,6 +116,7 @@ export async function estimateGas<
116
116
  } = account.type === 'local' ? await prepareRequest(client, args) : args
117
117
 
118
118
  const blockNumberHex = blockNumber ? numberToHex(blockNumber) : undefined
119
+ const block = blockNumberHex || blockTag
119
120
 
120
121
  assertRequest(args)
121
122
 
@@ -142,7 +143,7 @@ export async function estimateGas<
142
143
 
143
144
  const balance = await client.request({
144
145
  method: 'eth_estimateGas',
145
- params: [request, blockNumberHex || blockTag],
146
+ params: block ? [request, block] : [request],
146
147
  })
147
148
  return BigInt(balance)
148
149
  } catch (err) {
@@ -1,7 +1,7 @@
1
1
  import type {
2
2
  PublicClient,
3
- WalletClient,
4
3
  Transport,
4
+ WalletClient,
5
5
  } from '../../clients/index.js'
6
6
  import { BlockNotFoundError } from '../../errors/index.js'
7
7
  import type {
@@ -1,8 +1,7 @@
1
1
  import type { PublicClient, Transport } from '../../clients/index.js'
2
2
  import type { BlockTag, Chain, FeeHistory } from '../../types/index.js'
3
-
4
- import { numberToHex } from '../../utils/index.js'
5
3
  import { formatFeeHistory } from '../../utils/formatters/index.js'
4
+ import { numberToHex } from '../../utils/index.js'
6
5
 
7
6
  export type GetFeeHistoryParameters = {
8
7
  /**
@@ -1,4 +1,5 @@
1
1
  import type { Abi, AbiEvent } from 'abitype'
2
+
2
3
  import type { PublicClient, Transport } from '../../clients/index.js'
3
4
  import type {
4
5
  Chain,
@@ -8,9 +9,8 @@ import type {
8
9
  Log,
9
10
  MaybeAbiEventName,
10
11
  } from '../../types/index.js'
11
- import { decodeEventLog } from '../../utils/index.js'
12
-
13
12
  import { formatLog } from '../../utils/formatters/log.js'
13
+ import { decodeEventLog } from '../../utils/index.js'
14
14
 
15
15
  export type GetFilterChangesParameters<
16
16
  TFilterType extends FilterType = FilterType,
@@ -1,4 +1,5 @@
1
1
  import type { Abi, AbiEvent } from 'abitype'
2
+
2
3
  import type { PublicClient, Transport } from '../../clients/index.js'
3
4
  import type {
4
5
  Chain,
@@ -6,9 +7,8 @@ import type {
6
7
  Log,
7
8
  MaybeAbiEventName,
8
9
  } from '../../types/index.js'
9
- import { decodeEventLog } from '../../utils/index.js'
10
-
11
10
  import { formatLog } from '../../utils/formatters/log.js'
11
+ import { decodeEventLog } from '../../utils/index.js'
12
12
 
13
13
  export type GetFilterLogsParameters<
14
14
  TAbiEvent extends AbiEvent | undefined = undefined,
@@ -1,4 +1,5 @@
1
1
  import type { AbiEvent, Narrow } from 'abitype'
2
+
2
3
  import type { PublicClient, Transport } from '../../clients/index.js'
3
4
  import type {
4
5
  Address,
@@ -12,13 +13,13 @@ import type {
12
13
  MaybeExtractEventArgsFromAbi,
13
14
  RpcLog,
14
15
  } from '../../types/index.js'
16
+ import { formatLog } from '../../utils/formatters/log.js'
15
17
  import type { EncodeEventTopicsParameters } from '../../utils/index.js'
16
18
  import {
17
19
  decodeEventLog,
18
20
  encodeEventTopics,
19
21
  numberToHex,
20
22
  } from '../../utils/index.js'
21
- import { formatLog } from '../../utils/formatters/log.js'
22
23
 
23
24
  export type GetLogsParameters<
24
25
  TAbiEvent extends AbiEvent | undefined = undefined,
@@ -6,12 +6,12 @@ import type {
6
6
  Hash,
7
7
  RpcTransaction,
8
8
  } from '../../types/index.js'
9
- import { format, numberToHex } from '../../utils/index.js'
10
9
  import type {
11
10
  FormattedTransaction,
12
11
  TransactionFormatter,
13
12
  } from '../../utils/formatters/transaction.js'
14
13
  import { formatTransaction } from '../../utils/formatters/transaction.js'
14
+ import { format, numberToHex } from '../../utils/index.js'
15
15
 
16
16
  export type GetTransactionParameters =
17
17
  | {
@@ -1,12 +1,12 @@
1
1
  import type { PublicClient, Transport } from '../../clients/index.js'
2
2
  import { TransactionReceiptNotFoundError } from '../../errors/index.js'
3
3
  import type { Chain, Hash } from '../../types/index.js'
4
- import { format } from '../../utils/index.js'
5
4
  import type {
6
5
  FormattedTransactionReceipt,
7
6
  TransactionReceiptFormatter,
8
7
  } from '../../utils/formatters/transactionReceipt.js'
9
8
  import { formatTransactionReceipt } from '../../utils/formatters/transactionReceipt.js'
9
+ import { format } from '../../utils/index.js'
10
10
 
11
11
  export type GetTransactionReceiptParameters = {
12
12
  /** The hash of the transaction. */
@@ -1,4 +1,5 @@
1
1
  import type { Narrow } from 'abitype'
2
+
2
3
  import type { PublicClient, Transport } from '../../clients/index.js'
3
4
  import { multicall3Abi } from '../../constants/index.js'
4
5
  import type { BaseError } from '../../errors/index.js'
@@ -1,11 +1,10 @@
1
- import type { Abi, ExtractAbiEvent, Narrow } from 'abitype'
2
1
  import type { PublicClient, Transport } from '../../clients/index.js'
3
2
  import type {
4
3
  Address,
5
4
  Chain,
5
+ Filter,
6
6
  GetEventArgs,
7
7
  InferEventName,
8
- Filter,
9
8
  Log,
10
9
  } from '../../types/index.js'
11
10
  import type { GetAbiItemParameters } from '../../utils/index.js'
@@ -19,6 +18,7 @@ import { getFilterChanges } from './getFilterChanges.js'
19
18
  import { getLogs } from './getLogs.js'
20
19
  import type { GetLogsParameters } from './getLogs.js'
21
20
  import { uninstallFilter } from './uninstallFilter.js'
21
+ import type { Abi, ExtractAbiEvent, Narrow } from 'abitype'
22
22
 
23
23
  export type OnLogsParameter<
24
24
  TAbi extends Abi | readonly unknown[] = readonly unknown[],
@@ -1,4 +1,3 @@
1
- import type { AbiEvent } from 'abitype'
2
1
  import type { PublicClient, Transport } from '../../clients/index.js'
3
2
  import type {
4
3
  Address,
@@ -16,6 +15,7 @@ import { getBlockNumber } from './getBlockNumber.js'
16
15
  import { getFilterChanges } from './getFilterChanges.js'
17
16
  import { getLogs } from './getLogs.js'
18
17
  import { uninstallFilter } from './uninstallFilter.js'
18
+ import type { AbiEvent } from 'abitype'
19
19
 
20
20
  export type OnLogsParameter<
21
21
  TAbiEvent extends AbiEvent | undefined = undefined,
@@ -1,4 +1,5 @@
1
1
  import type { Address } from 'abitype'
2
+
2
3
  import type {
3
4
  TestClient,
4
5
  TestClientMode,
@@ -1,4 +1,4 @@
1
- import type { Chain } from '@wagmi/chains'
1
+ import type { Chain } from '../../chains.js'
2
2
  import type {
3
3
  TestClient,
4
4
  TestClientMode,
@@ -1,4 +1,4 @@
1
- import type { Chain } from '@wagmi/chains'
1
+ import type { Chain } from '../../chains.js'
2
2
  import type {
3
3
  TestClient,
4
4
  TestClientMode,
@@ -1,4 +1,4 @@
1
- import type { Chain } from '@wagmi/chains'
1
+ import type { Chain } from '../../chains.js'
2
2
  import type {
3
3
  TestClient,
4
4
  TestClientMode,
@@ -1,4 +1,4 @@
1
- import type { Chain } from '@wagmi/chains'
1
+ import type { Chain } from '../../chains.js'
2
2
  import type {
3
3
  TestClient,
4
4
  TestClientMode,
@@ -1,10 +1,11 @@
1
1
  import type { Abi, Narrow } from 'abitype'
2
- import type { WalletClient, Transport } from '../../clients/index.js'
2
+
3
+ import type { Transport, WalletClient } from '../../clients/index.js'
3
4
  import type {
4
5
  Account,
5
6
  Chain,
6
- GetConstructorArgs,
7
7
  GetChain,
8
+ GetConstructorArgs,
8
9
  Hex,
9
10
  } from '../../types/index.js'
10
11
  import { encodeDeployData } from '../../utils/index.js'
@@ -1,6 +1,6 @@
1
1
  import type { Transport, WalletClient } from '../../clients/index.js'
2
- import type { Account, Chain } from '../../types/index.js'
3
2
  import type { WalletPermission } from '../../types/eip1193.js'
3
+ import type { Account, Chain } from '../../types/index.js'
4
4
 
5
5
  export type GetPermissionsReturnType = WalletPermission[]
6
6
 
@@ -1,6 +1,6 @@
1
1
  import type { Transport, WalletClient } from '../../clients/index.js'
2
- import type { Account, Chain, Prettify } from '../../types/index.js'
3
2
  import type { WalletPermission } from '../../types/eip1193.js'
3
+ import type { Account, Chain, Prettify } from '../../types/index.js'
4
4
 
5
5
  export type RequestPermissionsParameters = Prettify<
6
6
  {
@@ -7,9 +7,9 @@ import {
7
7
  } from '../../errors/index.js'
8
8
  import type {
9
9
  Account,
10
- GetAccountParameter,
11
10
  Chain,
12
11
  Formatter,
12
+ GetAccountParameter,
13
13
  GetChain,
14
14
  Hash,
15
15
  MergeIntersectionProperties,
@@ -1,4 +1,5 @@
1
1
  import type { TypedData } from 'abitype'
2
+
2
3
  import type { Transport, WalletClient } from '../../clients/index.js'
3
4
  import { AccountNotFoundError } from '../../errors/index.js'
4
5
  import type {
@@ -1,6 +1,6 @@
1
1
  import type { Transport, WalletClient } from '../../clients/index.js'
2
- import type { Account, Chain } from '../../types/index.js'
3
2
  import type { WatchAssetParams } from '../../types/eip1193.js'
3
+ import type { Account, Chain } from '../../types/index.js'
4
4
 
5
5
  export type WatchAssetParameters = WatchAssetParams
6
6
  export type WatchAssetReturnType = boolean