viem 2.0.0-beta.8 → 2.0.0-rc.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (474) hide show
  1. package/CHANGELOG.md +44 -0
  2. package/README.md +9 -3
  3. package/_cjs/actions/ens/getEnsName.js +4 -2
  4. package/_cjs/actions/ens/getEnsName.js.map +1 -1
  5. package/_cjs/actions/index.js +16 -2
  6. package/_cjs/actions/index.js.map +1 -1
  7. package/_cjs/actions/wallet/prepareTransactionRequest.js.map +1 -1
  8. package/_cjs/chains/definitions/arbitrumSepolia.js +4 -0
  9. package/_cjs/chains/definitions/arbitrumSepolia.js.map +1 -1
  10. package/_cjs/chains/definitions/base.js +5 -0
  11. package/_cjs/chains/definitions/base.js.map +1 -1
  12. package/_cjs/chains/definitions/baseGoerli.js +5 -0
  13. package/_cjs/chains/definitions/baseGoerli.js.map +1 -1
  14. package/_cjs/chains/definitions/baseSepolia.js +5 -0
  15. package/_cjs/chains/definitions/baseSepolia.js.map +1 -1
  16. package/_cjs/chains/definitions/fantomSonicTestnet.js +26 -0
  17. package/_cjs/chains/definitions/fantomSonicTestnet.js.map +1 -0
  18. package/_cjs/chains/definitions/optimism.js +5 -0
  19. package/_cjs/chains/definitions/optimism.js.map +1 -1
  20. package/_cjs/chains/definitions/optimismGoerli.js +5 -0
  21. package/_cjs/chains/definitions/optimismGoerli.js.map +1 -1
  22. package/_cjs/chains/definitions/optimismSepolia.js +5 -0
  23. package/_cjs/chains/definitions/optimismSepolia.js.map +1 -1
  24. package/_cjs/chains/definitions/pgn.js +12 -0
  25. package/_cjs/chains/definitions/pgn.js.map +1 -1
  26. package/_cjs/chains/definitions/pgnTestnet.js +7 -0
  27. package/_cjs/chains/definitions/pgnTestnet.js.map +1 -1
  28. package/_cjs/chains/definitions/zilliqa.js +26 -0
  29. package/_cjs/chains/definitions/zilliqa.js.map +1 -0
  30. package/_cjs/chains/definitions/zilliqaTestnet.js +26 -0
  31. package/_cjs/chains/definitions/zilliqaTestnet.js.map +1 -0
  32. package/_cjs/chains/definitions/zkSyncSepoliaTestnet.js +35 -0
  33. package/_cjs/chains/definitions/zkSyncSepoliaTestnet.js.map +1 -0
  34. package/_cjs/chains/definitions/zkSyncTestnet.js +4 -0
  35. package/_cjs/chains/definitions/zkSyncTestnet.js.map +1 -1
  36. package/_cjs/chains/definitions/zora.js +5 -0
  37. package/_cjs/chains/definitions/zora.js.map +1 -1
  38. package/_cjs/chains/definitions/zoraSepolia.js +5 -0
  39. package/_cjs/chains/definitions/zoraSepolia.js.map +1 -1
  40. package/_cjs/chains/index.js +12 -4
  41. package/_cjs/chains/index.js.map +1 -1
  42. package/_cjs/chains/opStack/abis.js +366 -1
  43. package/_cjs/chains/opStack/abis.js.map +1 -1
  44. package/_cjs/chains/opStack/actions/buildDepositTransaction.js +1 -1
  45. package/_cjs/chains/opStack/actions/buildDepositTransaction.js.map +1 -1
  46. package/_cjs/chains/opStack/actions/buildInitiateWithdrawal.js +29 -0
  47. package/_cjs/chains/opStack/actions/buildInitiateWithdrawal.js.map +1 -0
  48. package/_cjs/chains/opStack/actions/buildProveWithdrawal.js +39 -0
  49. package/_cjs/chains/opStack/actions/buildProveWithdrawal.js.map +1 -0
  50. package/_cjs/chains/opStack/actions/depositTransaction.js +11 -6
  51. package/_cjs/chains/opStack/actions/depositTransaction.js.map +1 -1
  52. package/_cjs/chains/opStack/actions/estimateDepositTransactionGas.js +37 -0
  53. package/_cjs/chains/opStack/actions/estimateDepositTransactionGas.js.map +1 -0
  54. package/_cjs/chains/opStack/actions/estimateFinalizeWithdrawalGas.js +29 -0
  55. package/_cjs/chains/opStack/actions/estimateFinalizeWithdrawalGas.js.map +1 -0
  56. package/_cjs/chains/opStack/actions/estimateInitiateWithdrawalGas.js +24 -0
  57. package/_cjs/chains/opStack/actions/estimateInitiateWithdrawalGas.js.map +1 -0
  58. package/_cjs/chains/opStack/actions/estimateProveWithdrawalGas.js +29 -0
  59. package/_cjs/chains/opStack/actions/estimateProveWithdrawalGas.js.map +1 -0
  60. package/_cjs/chains/opStack/actions/finalizeWithdrawal.js +33 -0
  61. package/_cjs/chains/opStack/actions/finalizeWithdrawal.js.map +1 -0
  62. package/_cjs/chains/opStack/actions/getL2Output.js +30 -0
  63. package/_cjs/chains/opStack/actions/getL2Output.js.map +1 -0
  64. package/_cjs/chains/opStack/actions/getTimeToFinalize.js +46 -0
  65. package/_cjs/chains/opStack/actions/getTimeToFinalize.js.map +1 -0
  66. package/_cjs/chains/opStack/actions/getTimeToNextL2Output.js +63 -0
  67. package/_cjs/chains/opStack/actions/getTimeToNextL2Output.js.map +1 -0
  68. package/_cjs/chains/opStack/actions/getTimeToProve.js +13 -0
  69. package/_cjs/chains/opStack/actions/getTimeToProve.js.map +1 -0
  70. package/_cjs/chains/opStack/actions/getWithdrawalStatus.js +71 -0
  71. package/_cjs/chains/opStack/actions/getWithdrawalStatus.js.map +1 -0
  72. package/_cjs/chains/opStack/actions/initiateWithdrawal.js +28 -0
  73. package/_cjs/chains/opStack/actions/initiateWithdrawal.js.map +1 -0
  74. package/_cjs/chains/opStack/actions/proveWithdrawal.js +33 -0
  75. package/_cjs/chains/opStack/actions/proveWithdrawal.js.map +1 -0
  76. package/_cjs/chains/opStack/actions/waitForNextL2Output.js +32 -0
  77. package/_cjs/chains/opStack/actions/waitForNextL2Output.js.map +1 -0
  78. package/_cjs/chains/opStack/actions/waitToFinalize.js +11 -0
  79. package/_cjs/chains/opStack/actions/waitToFinalize.js.map +1 -0
  80. package/_cjs/chains/opStack/actions/waitToProve.js +21 -0
  81. package/_cjs/chains/opStack/actions/waitToProve.js.map +1 -0
  82. package/_cjs/chains/opStack/chains.js +5 -1
  83. package/_cjs/chains/opStack/chains.js.map +1 -1
  84. package/_cjs/chains/opStack/decorators/publicL1.js +35 -0
  85. package/_cjs/chains/opStack/decorators/publicL1.js.map +1 -0
  86. package/_cjs/chains/opStack/decorators/publicL2.js +5 -1
  87. package/_cjs/chains/opStack/decorators/publicL2.js.map +1 -1
  88. package/_cjs/chains/opStack/decorators/walletL1.js +4 -0
  89. package/_cjs/chains/opStack/decorators/walletL1.js.map +1 -1
  90. package/_cjs/chains/opStack/decorators/walletL2.js +13 -0
  91. package/_cjs/chains/opStack/decorators/walletL2.js.map +1 -0
  92. package/_cjs/chains/opStack/errors/withdrawal.js +17 -0
  93. package/_cjs/chains/opStack/errors/withdrawal.js.map +1 -0
  94. package/_cjs/chains/opStack/index.js +43 -15
  95. package/_cjs/chains/opStack/index.js.map +1 -1
  96. package/_cjs/chains/opStack/types/deposit.js +3 -0
  97. package/_cjs/chains/opStack/types/deposit.js.map +1 -0
  98. package/_cjs/chains/opStack/types/withdrawal.js +3 -0
  99. package/_cjs/chains/opStack/types/withdrawal.js.map +1 -0
  100. package/_cjs/chains/opStack/utils/extractWithdrawalMessageLogs.js +14 -0
  101. package/_cjs/chains/opStack/utils/extractWithdrawalMessageLogs.js.map +1 -0
  102. package/_cjs/chains/opStack/utils/getL2TransactionHash.js +2 -2
  103. package/_cjs/chains/opStack/utils/getL2TransactionHash.js.map +1 -1
  104. package/_cjs/chains/opStack/utils/getWithdrawalHashStorageSlot.js +11 -0
  105. package/_cjs/chains/opStack/utils/getWithdrawalHashStorageSlot.js.map +1 -0
  106. package/_cjs/chains/opStack/utils/getWithdrawals.js +10 -0
  107. package/_cjs/chains/opStack/utils/getWithdrawals.js.map +1 -0
  108. package/_cjs/chains/opStack/utils/{fromOpaqueData.js → opaqueDataToDepositData.js} +4 -4
  109. package/_cjs/chains/opStack/utils/opaqueDataToDepositData.js.map +1 -0
  110. package/_cjs/errors/abi.js +21 -1
  111. package/_cjs/errors/abi.js.map +1 -1
  112. package/_cjs/errors/version.js +1 -1
  113. package/_cjs/errors/version.js.map +1 -1
  114. package/_cjs/index.js +10 -2
  115. package/_cjs/index.js.map +1 -1
  116. package/_cjs/utils/abi/getAbiItem.js +46 -3
  117. package/_cjs/utils/abi/getAbiItem.js.map +1 -1
  118. package/_cjs/utils/hash/ripemd160.js +16 -0
  119. package/_cjs/utils/hash/ripemd160.js.map +1 -0
  120. package/_cjs/utils/hash/sha256.js +16 -0
  121. package/_cjs/utils/hash/sha256.js.map +1 -0
  122. package/_cjs/utils/index.js +5 -1
  123. package/_cjs/utils/index.js.map +1 -1
  124. package/_esm/actions/ens/getEnsName.js +4 -2
  125. package/_esm/actions/ens/getEnsName.js.map +1 -1
  126. package/_esm/actions/index.js +7 -0
  127. package/_esm/actions/index.js.map +1 -1
  128. package/_esm/actions/wallet/prepareTransactionRequest.js.map +1 -1
  129. package/_esm/chains/definitions/arbitrumSepolia.js +4 -0
  130. package/_esm/chains/definitions/arbitrumSepolia.js.map +1 -1
  131. package/_esm/chains/definitions/base.js +5 -0
  132. package/_esm/chains/definitions/base.js.map +1 -1
  133. package/_esm/chains/definitions/baseGoerli.js +5 -0
  134. package/_esm/chains/definitions/baseGoerli.js.map +1 -1
  135. package/_esm/chains/definitions/baseSepolia.js +5 -0
  136. package/_esm/chains/definitions/baseSepolia.js.map +1 -1
  137. package/_esm/chains/definitions/fantomSonicTestnet.js +23 -0
  138. package/_esm/chains/definitions/fantomSonicTestnet.js.map +1 -0
  139. package/_esm/chains/definitions/optimism.js +5 -0
  140. package/_esm/chains/definitions/optimism.js.map +1 -1
  141. package/_esm/chains/definitions/optimismGoerli.js +5 -0
  142. package/_esm/chains/definitions/optimismGoerli.js.map +1 -1
  143. package/_esm/chains/definitions/optimismSepolia.js +5 -0
  144. package/_esm/chains/definitions/optimismSepolia.js.map +1 -1
  145. package/_esm/chains/definitions/pgn.js +12 -0
  146. package/_esm/chains/definitions/pgn.js.map +1 -1
  147. package/_esm/chains/definitions/pgnTestnet.js +7 -0
  148. package/_esm/chains/definitions/pgnTestnet.js.map +1 -1
  149. package/_esm/chains/definitions/zilliqa.js +23 -0
  150. package/_esm/chains/definitions/zilliqa.js.map +1 -0
  151. package/_esm/chains/definitions/zilliqaTestnet.js +23 -0
  152. package/_esm/chains/definitions/zilliqaTestnet.js.map +1 -0
  153. package/_esm/chains/definitions/zkSyncSepoliaTestnet.js +32 -0
  154. package/_esm/chains/definitions/zkSyncSepoliaTestnet.js.map +1 -0
  155. package/_esm/chains/definitions/zkSyncTestnet.js +5 -0
  156. package/_esm/chains/definitions/zkSyncTestnet.js.map +1 -1
  157. package/_esm/chains/definitions/zora.js +5 -0
  158. package/_esm/chains/definitions/zora.js.map +1 -1
  159. package/_esm/chains/definitions/zoraSepolia.js +5 -0
  160. package/_esm/chains/definitions/zoraSepolia.js.map +1 -1
  161. package/_esm/chains/index.js +4 -0
  162. package/_esm/chains/index.js.map +1 -1
  163. package/_esm/chains/opStack/abis.js +365 -0
  164. package/_esm/chains/opStack/abis.js.map +1 -1
  165. package/_esm/chains/opStack/actions/buildDepositTransaction.js +2 -2
  166. package/_esm/chains/opStack/actions/buildDepositTransaction.js.map +1 -1
  167. package/_esm/chains/opStack/actions/buildInitiateWithdrawal.js +50 -0
  168. package/_esm/chains/opStack/actions/buildInitiateWithdrawal.js.map +1 -0
  169. package/_esm/chains/opStack/actions/buildProveWithdrawal.js +59 -0
  170. package/_esm/chains/opStack/actions/buildProveWithdrawal.js.map +1 -0
  171. package/_esm/chains/opStack/actions/depositTransaction.js +17 -14
  172. package/_esm/chains/opStack/actions/depositTransaction.js.map +1 -1
  173. package/_esm/chains/opStack/actions/estimateDepositTransactionGas.js +62 -0
  174. package/_esm/chains/opStack/actions/estimateDepositTransactionGas.js.map +1 -0
  175. package/_esm/chains/opStack/actions/estimateFinalizeWithdrawalGas.js +50 -0
  176. package/_esm/chains/opStack/actions/estimateFinalizeWithdrawalGas.js.map +1 -0
  177. package/_esm/chains/opStack/actions/estimateInitiateWithdrawalGas.js +48 -0
  178. package/_esm/chains/opStack/actions/estimateInitiateWithdrawalGas.js.map +1 -0
  179. package/_esm/chains/opStack/actions/estimateProveWithdrawalGas.js +53 -0
  180. package/_esm/chains/opStack/actions/estimateProveWithdrawalGas.js.map +1 -0
  181. package/_esm/chains/opStack/actions/finalizeWithdrawal.js +53 -0
  182. package/_esm/chains/opStack/actions/finalizeWithdrawal.js.map +1 -0
  183. package/_esm/chains/opStack/actions/getL2Output.js +50 -0
  184. package/_esm/chains/opStack/actions/getL2Output.js.map +1 -0
  185. package/_esm/chains/opStack/actions/getTimeToFinalize.js +77 -0
  186. package/_esm/chains/opStack/actions/getTimeToFinalize.js.map +1 -0
  187. package/_esm/chains/opStack/actions/getTimeToNextL2Output.js +91 -0
  188. package/_esm/chains/opStack/actions/getTimeToNextL2Output.js.map +1 -0
  189. package/_esm/chains/opStack/actions/getTimeToProve.js +39 -0
  190. package/_esm/chains/opStack/actions/getTimeToProve.js.map +1 -0
  191. package/_esm/chains/opStack/actions/getWithdrawalStatus.js +99 -0
  192. package/_esm/chains/opStack/actions/getWithdrawalStatus.js.map +1 -0
  193. package/_esm/chains/opStack/actions/initiateWithdrawal.js +76 -0
  194. package/_esm/chains/opStack/actions/initiateWithdrawal.js.map +1 -0
  195. package/_esm/chains/opStack/actions/proveWithdrawal.js +57 -0
  196. package/_esm/chains/opStack/actions/proveWithdrawal.js.map +1 -0
  197. package/_esm/chains/opStack/actions/waitForNextL2Output.js +58 -0
  198. package/_esm/chains/opStack/actions/waitForNextL2Output.js.map +1 -0
  199. package/_esm/chains/opStack/actions/waitToFinalize.js +41 -0
  200. package/_esm/chains/opStack/actions/waitToFinalize.js.map +1 -0
  201. package/_esm/chains/opStack/actions/waitToProve.js +47 -0
  202. package/_esm/chains/opStack/actions/waitToProve.js.map +1 -0
  203. package/_esm/chains/opStack/chains.js +2 -0
  204. package/_esm/chains/opStack/chains.js.map +1 -1
  205. package/_esm/chains/opStack/decorators/publicL1.js +31 -0
  206. package/_esm/chains/opStack/decorators/publicL1.js.map +1 -0
  207. package/_esm/chains/opStack/decorators/publicL2.js +5 -1
  208. package/_esm/chains/opStack/decorators/publicL2.js.map +1 -1
  209. package/_esm/chains/opStack/decorators/walletL1.js +4 -0
  210. package/_esm/chains/opStack/decorators/walletL1.js.map +1 -1
  211. package/_esm/chains/opStack/decorators/walletL2.js +9 -0
  212. package/_esm/chains/opStack/decorators/walletL2.js.map +1 -0
  213. package/_esm/chains/opStack/errors/withdrawal.js +13 -0
  214. package/_esm/chains/opStack/errors/withdrawal.js.map +1 -0
  215. package/_esm/chains/opStack/index.js +21 -3
  216. package/_esm/chains/opStack/index.js.map +1 -1
  217. package/_esm/chains/opStack/types/deposit.js +2 -0
  218. package/_esm/chains/opStack/types/deposit.js.map +1 -0
  219. package/_esm/chains/opStack/types/withdrawal.js +2 -0
  220. package/_esm/chains/opStack/types/withdrawal.js.map +1 -0
  221. package/_esm/chains/opStack/utils/extractWithdrawalMessageLogs.js +10 -0
  222. package/_esm/chains/opStack/utils/extractWithdrawalMessageLogs.js.map +1 -0
  223. package/_esm/chains/opStack/utils/getL2TransactionHash.js +2 -2
  224. package/_esm/chains/opStack/utils/getL2TransactionHash.js.map +1 -1
  225. package/_esm/chains/opStack/utils/getWithdrawalHashStorageSlot.js +7 -0
  226. package/_esm/chains/opStack/utils/getWithdrawalHashStorageSlot.js.map +1 -0
  227. package/_esm/chains/opStack/utils/getWithdrawals.js +6 -0
  228. package/_esm/chains/opStack/utils/getWithdrawals.js.map +1 -0
  229. package/_esm/chains/opStack/utils/{fromOpaqueData.js → opaqueDataToDepositData.js} +2 -2
  230. package/_esm/chains/opStack/utils/opaqueDataToDepositData.js.map +1 -0
  231. package/_esm/errors/abi.js +19 -0
  232. package/_esm/errors/abi.js.map +1 -1
  233. package/_esm/errors/version.js +1 -1
  234. package/_esm/errors/version.js.map +1 -1
  235. package/_esm/index.js +4 -0
  236. package/_esm/index.js.map +1 -1
  237. package/_esm/utils/abi/getAbiItem.js +46 -2
  238. package/_esm/utils/abi/getAbiItem.js.map +1 -1
  239. package/_esm/utils/hash/ripemd160.js +12 -0
  240. package/_esm/utils/hash/ripemd160.js.map +1 -0
  241. package/_esm/utils/hash/sha256.js +12 -0
  242. package/_esm/utils/hash/sha256.js.map +1 -0
  243. package/_esm/utils/index.js +2 -0
  244. package/_esm/utils/index.js.map +1 -1
  245. package/_types/actions/ens/getEnsName.d.ts.map +1 -1
  246. package/_types/actions/index.d.ts +7 -0
  247. package/_types/actions/index.d.ts.map +1 -1
  248. package/_types/actions/public/getBlock.d.ts +1 -1
  249. package/_types/actions/public/getBlock.d.ts.map +1 -1
  250. package/_types/actions/public/getTransaction.d.ts +1 -1
  251. package/_types/actions/public/getTransaction.d.ts.map +1 -1
  252. package/_types/actions/public/getTransactionReceipt.d.ts +1 -1
  253. package/_types/actions/public/getTransactionReceipt.d.ts.map +1 -1
  254. package/_types/actions/wallet/prepareTransactionRequest.d.ts +5 -5
  255. package/_types/actions/wallet/prepareTransactionRequest.d.ts.map +1 -1
  256. package/_types/chains/celo/chainConfig.d.ts +180 -180
  257. package/_types/chains/celo/formatters.d.ts +180 -180
  258. package/_types/chains/definitions/arbitrumSepolia.d.ts +4 -0
  259. package/_types/chains/definitions/arbitrumSepolia.d.ts.map +1 -1
  260. package/_types/chains/definitions/base.d.ts +142 -137
  261. package/_types/chains/definitions/base.d.ts.map +1 -1
  262. package/_types/chains/definitions/baseGoerli.d.ts +142 -137
  263. package/_types/chains/definitions/baseGoerli.d.ts.map +1 -1
  264. package/_types/chains/definitions/baseSepolia.d.ts +142 -137
  265. package/_types/chains/definitions/baseSepolia.d.ts.map +1 -1
  266. package/_types/chains/definitions/celo.d.ts +180 -180
  267. package/_types/chains/definitions/celoAlfajores.d.ts +180 -180
  268. package/_types/chains/definitions/celoCannoli.d.ts +180 -180
  269. package/_types/chains/definitions/fantomSonicTestnet.d.ts +38 -0
  270. package/_types/chains/definitions/fantomSonicTestnet.d.ts.map +1 -0
  271. package/_types/chains/definitions/optimism.d.ts +142 -137
  272. package/_types/chains/definitions/optimism.d.ts.map +1 -1
  273. package/_types/chains/definitions/optimismGoerli.d.ts +142 -137
  274. package/_types/chains/definitions/optimismGoerli.d.ts.map +1 -1
  275. package/_types/chains/definitions/optimismSepolia.d.ts +142 -137
  276. package/_types/chains/definitions/optimismSepolia.d.ts.map +1 -1
  277. package/_types/chains/definitions/pgn.d.ts +147 -137
  278. package/_types/chains/definitions/pgn.d.ts.map +1 -1
  279. package/_types/chains/definitions/pgnTestnet.d.ts +142 -137
  280. package/_types/chains/definitions/pgnTestnet.d.ts.map +1 -1
  281. package/_types/chains/definitions/zilliqa.d.ts +38 -0
  282. package/_types/chains/definitions/zilliqa.d.ts.map +1 -0
  283. package/_types/chains/definitions/zilliqaTestnet.d.ts +38 -0
  284. package/_types/chains/definitions/zilliqaTestnet.d.ts.map +1 -0
  285. package/_types/chains/definitions/zkSync.d.ts +24 -24
  286. package/_types/chains/definitions/zkSyncSepoliaTestnet.d.ts +533 -0
  287. package/_types/chains/definitions/zkSyncSepoliaTestnet.d.ts.map +1 -0
  288. package/_types/chains/definitions/zkSyncTestnet.d.ts +29 -24
  289. package/_types/chains/definitions/zkSyncTestnet.d.ts.map +1 -1
  290. package/_types/chains/definitions/zora.d.ts +142 -137
  291. package/_types/chains/definitions/zora.d.ts.map +1 -1
  292. package/_types/chains/definitions/zoraSepolia.d.ts +142 -137
  293. package/_types/chains/definitions/zoraSepolia.d.ts.map +1 -1
  294. package/_types/chains/definitions/zoraTestnet.d.ts +137 -137
  295. package/_types/chains/index.d.ts +5 -1
  296. package/_types/chains/index.d.ts.map +1 -1
  297. package/_types/chains/opStack/abis.d.ts +457 -0
  298. package/_types/chains/opStack/abis.d.ts.map +1 -1
  299. package/_types/chains/opStack/actions/buildDepositTransaction.d.ts +5 -3
  300. package/_types/chains/opStack/actions/buildDepositTransaction.d.ts.map +1 -1
  301. package/_types/chains/opStack/actions/buildInitiateWithdrawal.d.ts +50 -0
  302. package/_types/chains/opStack/actions/buildInitiateWithdrawal.d.ts.map +1 -0
  303. package/_types/chains/opStack/actions/buildProveWithdrawal.d.ts +48 -0
  304. package/_types/chains/opStack/actions/buildProveWithdrawal.d.ts.map +1 -0
  305. package/_types/chains/opStack/actions/depositTransaction.d.ts +18 -34
  306. package/_types/chains/opStack/actions/depositTransaction.d.ts.map +1 -1
  307. package/_types/chains/opStack/actions/estimateDepositTransactionGas.d.ts +50 -0
  308. package/_types/chains/opStack/actions/estimateDepositTransactionGas.d.ts.map +1 -0
  309. package/_types/chains/opStack/actions/estimateFinalizeWithdrawalGas.d.ts +45 -0
  310. package/_types/chains/opStack/actions/estimateFinalizeWithdrawalGas.d.ts.map +1 -0
  311. package/_types/chains/opStack/actions/estimateInitiateWithdrawalGas.d.ts +51 -0
  312. package/_types/chains/opStack/actions/estimateInitiateWithdrawalGas.d.ts.map +1 -0
  313. package/_types/chains/opStack/actions/estimateProveWithdrawalGas.d.ts +63 -0
  314. package/_types/chains/opStack/actions/estimateProveWithdrawalGas.d.ts.map +1 -0
  315. package/_types/chains/opStack/actions/finalizeWithdrawal.d.ts +49 -0
  316. package/_types/chains/opStack/actions/finalizeWithdrawal.d.ts.map +1 -0
  317. package/_types/chains/opStack/actions/getL2Output.d.ts +44 -0
  318. package/_types/chains/opStack/actions/getL2Output.d.ts.map +1 -0
  319. package/_types/chains/opStack/actions/getTimeToFinalize.d.ts +57 -0
  320. package/_types/chains/opStack/actions/getTimeToFinalize.d.ts.map +1 -0
  321. package/_types/chains/opStack/actions/getTimeToNextL2Output.d.ts +61 -0
  322. package/_types/chains/opStack/actions/getTimeToNextL2Output.d.ts.map +1 -0
  323. package/_types/chains/opStack/actions/getTimeToProve.d.ts +50 -0
  324. package/_types/chains/opStack/actions/getTimeToProve.d.ts.map +1 -0
  325. package/_types/chains/opStack/actions/getWithdrawalStatus.d.ts +48 -0
  326. package/_types/chains/opStack/actions/getWithdrawalStatus.d.ts.map +1 -0
  327. package/_types/chains/opStack/actions/initiateWithdrawal.d.ts +77 -0
  328. package/_types/chains/opStack/actions/initiateWithdrawal.d.ts.map +1 -0
  329. package/_types/chains/opStack/actions/proveWithdrawal.d.ts +67 -0
  330. package/_types/chains/opStack/actions/proveWithdrawal.d.ts.map +1 -0
  331. package/_types/chains/opStack/actions/waitForNextL2Output.d.ts +55 -0
  332. package/_types/chains/opStack/actions/waitForNextL2Output.d.ts.map +1 -0
  333. package/_types/chains/opStack/actions/waitToFinalize.d.ts +45 -0
  334. package/_types/chains/opStack/actions/waitToFinalize.d.ts.map +1 -0
  335. package/_types/chains/opStack/actions/waitToProve.d.ts +55 -0
  336. package/_types/chains/opStack/actions/waitToProve.d.ts.map +1 -0
  337. package/_types/chains/opStack/chainConfig.d.ts +136 -136
  338. package/_types/chains/opStack/chains.d.ts +2 -0
  339. package/_types/chains/opStack/chains.d.ts.map +1 -1
  340. package/_types/chains/opStack/decorators/publicL1.d.ts +386 -0
  341. package/_types/chains/opStack/decorators/publicL1.d.ts.map +1 -0
  342. package/_types/chains/opStack/decorators/publicL2.d.ts +82 -26
  343. package/_types/chains/opStack/decorators/publicL2.d.ts.map +1 -1
  344. package/_types/chains/opStack/decorators/walletL1.d.ts +57 -2
  345. package/_types/chains/opStack/decorators/walletL1.d.ts.map +1 -1
  346. package/_types/chains/opStack/decorators/walletL2.d.ts +62 -0
  347. package/_types/chains/opStack/decorators/walletL2.d.ts.map +1 -0
  348. package/_types/chains/opStack/errors/withdrawal.d.ts +12 -0
  349. package/_types/chains/opStack/errors/withdrawal.d.ts.map +1 -0
  350. package/_types/chains/opStack/formatters.d.ts +136 -136
  351. package/_types/chains/opStack/index.d.ts +21 -3
  352. package/_types/chains/opStack/index.d.ts.map +1 -1
  353. package/_types/chains/opStack/types/deposit.d.ts +25 -0
  354. package/_types/chains/opStack/types/deposit.d.ts.map +1 -0
  355. package/_types/chains/opStack/types/withdrawal.d.ts +22 -0
  356. package/_types/chains/opStack/types/withdrawal.d.ts.map +1 -0
  357. package/_types/chains/opStack/utils/extractWithdrawalMessageLogs.d.ts +137 -0
  358. package/_types/chains/opStack/utils/extractWithdrawalMessageLogs.d.ts.map +1 -0
  359. package/_types/chains/opStack/utils/getWithdrawalHashStorageSlot.d.ts +11 -0
  360. package/_types/chains/opStack/utils/getWithdrawalHashStorageSlot.d.ts.map +1 -0
  361. package/_types/chains/opStack/utils/getWithdrawals.d.ts +12 -0
  362. package/_types/chains/opStack/utils/getWithdrawals.d.ts.map +1 -0
  363. package/_types/chains/opStack/utils/opaqueDataToDepositData.d.ts +15 -0
  364. package/_types/chains/opStack/utils/opaqueDataToDepositData.d.ts.map +1 -0
  365. package/_types/chains/zksync/chainConfig.d.ts +24 -24
  366. package/_types/chains/zksync/formatters.d.ts +24 -24
  367. package/_types/clients/decorators/public.d.ts +2 -2
  368. package/_types/clients/decorators/public.d.ts.map +1 -1
  369. package/_types/clients/decorators/wallet.d.ts +2 -2
  370. package/_types/clients/decorators/wallet.d.ts.map +1 -1
  371. package/_types/errors/abi.d.ts +14 -1
  372. package/_types/errors/abi.d.ts.map +1 -1
  373. package/_types/errors/version.d.ts +1 -1
  374. package/_types/errors/version.d.ts.map +1 -1
  375. package/_types/index.d.ts +15 -1
  376. package/_types/index.d.ts.map +1 -1
  377. package/_types/types/account.d.ts +1 -1
  378. package/_types/types/account.d.ts.map +1 -1
  379. package/_types/types/eip1193.d.ts +12 -0
  380. package/_types/types/eip1193.d.ts.map +1 -1
  381. package/_types/utils/abi/getAbiItem.d.ts +2 -1
  382. package/_types/utils/abi/getAbiItem.d.ts.map +1 -1
  383. package/_types/utils/formatters/block.d.ts +1 -1
  384. package/_types/utils/formatters/block.d.ts.map +1 -1
  385. package/_types/utils/formatters/transaction.d.ts +2 -2
  386. package/_types/utils/formatters/transaction.d.ts.map +1 -1
  387. package/_types/utils/formatters/transactionReceipt.d.ts +1 -1
  388. package/_types/utils/formatters/transactionReceipt.d.ts.map +1 -1
  389. package/_types/utils/formatters/transactionRequest.d.ts +1 -1
  390. package/_types/utils/hash/ripemd160.d.ts +11 -0
  391. package/_types/utils/hash/ripemd160.d.ts.map +1 -0
  392. package/_types/utils/hash/sha256.d.ts +11 -0
  393. package/_types/utils/hash/sha256.d.ts.map +1 -0
  394. package/_types/utils/index.d.ts +2 -0
  395. package/_types/utils/index.d.ts.map +1 -1
  396. package/actions/ens/getEnsName.ts +3 -2
  397. package/actions/index.ts +31 -0
  398. package/actions/public/getBlock.ts +1 -1
  399. package/actions/public/getTransaction.ts +1 -1
  400. package/actions/public/getTransactionReceipt.ts +1 -1
  401. package/actions/wallet/prepareTransactionRequest.ts +16 -9
  402. package/chains/definitions/arbitrumSepolia.ts +4 -0
  403. package/chains/definitions/base.ts +5 -0
  404. package/chains/definitions/baseGoerli.ts +5 -0
  405. package/chains/definitions/baseSepolia.ts +5 -0
  406. package/chains/definitions/fantomSonicTestnet.ts +23 -0
  407. package/chains/definitions/optimism.ts +5 -0
  408. package/chains/definitions/optimismGoerli.ts +5 -0
  409. package/chains/definitions/optimismSepolia.ts +5 -0
  410. package/chains/definitions/pgn.ts +13 -0
  411. package/chains/definitions/pgnTestnet.ts +8 -0
  412. package/chains/definitions/zilliqa.ts +23 -0
  413. package/chains/definitions/zilliqaTestnet.ts +23 -0
  414. package/chains/definitions/zkSyncSepoliaTestnet.ts +32 -0
  415. package/chains/definitions/zkSyncTestnet.ts +5 -0
  416. package/chains/definitions/zora.ts +5 -0
  417. package/chains/definitions/zoraSepolia.ts +5 -0
  418. package/chains/index.ts +9 -0
  419. package/chains/opStack/abis.ts +367 -0
  420. package/chains/opStack/actions/buildDepositTransaction.ts +11 -6
  421. package/chains/opStack/actions/buildInitiateWithdrawal.ts +118 -0
  422. package/chains/opStack/actions/buildProveWithdrawal.ts +149 -0
  423. package/chains/opStack/actions/depositTransaction.ts +50 -44
  424. package/chains/opStack/actions/estimateDepositTransactionGas.ts +138 -0
  425. package/chains/opStack/actions/estimateFinalizeWithdrawalGas.ts +118 -0
  426. package/chains/opStack/actions/estimateInitiateWithdrawalGas.ts +118 -0
  427. package/chains/opStack/actions/estimateProveWithdrawalGas.ts +139 -0
  428. package/chains/opStack/actions/finalizeWithdrawal.ts +130 -0
  429. package/chains/opStack/actions/getL2Output.ts +89 -0
  430. package/chains/opStack/actions/getTimeToFinalize.ts +122 -0
  431. package/chains/opStack/actions/getTimeToNextL2Output.ts +162 -0
  432. package/chains/opStack/actions/getTimeToProve.ts +79 -0
  433. package/chains/opStack/actions/getWithdrawalStatus.ts +152 -0
  434. package/chains/opStack/actions/initiateWithdrawal.ts +153 -0
  435. package/chains/opStack/actions/proveWithdrawal.ts +151 -0
  436. package/chains/opStack/actions/waitForNextL2Output.ts +111 -0
  437. package/chains/opStack/actions/waitToFinalize.ts +64 -0
  438. package/chains/opStack/actions/waitToProve.ts +99 -0
  439. package/chains/opStack/chains.ts +2 -0
  440. package/chains/opStack/decorators/publicL1.ts +514 -0
  441. package/chains/opStack/decorators/publicL2.ts +129 -37
  442. package/chains/opStack/decorators/walletL1.ts +71 -2
  443. package/chains/opStack/decorators/walletL2.ts +84 -0
  444. package/chains/opStack/errors/withdrawal.ts +15 -0
  445. package/chains/opStack/index.ts +112 -21
  446. package/chains/opStack/types/deposit.ts +28 -0
  447. package/chains/opStack/types/withdrawal.ts +23 -0
  448. package/chains/opStack/utils/extractWithdrawalMessageLogs.ts +36 -0
  449. package/chains/opStack/utils/getL2TransactionHash.ts +2 -2
  450. package/chains/opStack/utils/getWithdrawalHashStorageSlot.ts +29 -0
  451. package/chains/opStack/utils/getWithdrawals.ts +25 -0
  452. package/chains/opStack/utils/{fromOpaqueData.ts → opaqueDataToDepositData.ts} +9 -4
  453. package/clients/decorators/public.ts +2 -2
  454. package/clients/decorators/wallet.ts +2 -2
  455. package/errors/abi.ts +22 -1
  456. package/errors/version.ts +1 -1
  457. package/index.ts +40 -0
  458. package/package.json +1 -1
  459. package/types/account.ts +1 -1
  460. package/types/eip1193.ts +12 -0
  461. package/utils/abi/getAbiItem.ts +71 -2
  462. package/utils/formatters/block.ts +1 -1
  463. package/utils/formatters/transaction.ts +1 -1
  464. package/utils/formatters/transactionReceipt.ts +1 -1
  465. package/utils/hash/ripemd160.ts +31 -0
  466. package/utils/hash/sha256.ts +31 -0
  467. package/utils/index.ts +2 -0
  468. package/_cjs/chains/opStack/utils/fromOpaqueData.js.map +0 -1
  469. package/_esm/chains/opStack/utils/fromOpaqueData.js.map +0 -1
  470. package/_types/chains/opStack/utils/fromOpaqueData.d.ts +0 -15
  471. package/_types/chains/opStack/utils/fromOpaqueData.d.ts.map +0 -1
  472. package/chains/celo/package.json +0 -6
  473. package/chains/opStack/package.json +0 -6
  474. package/chains/zksync/package.json +0 -6
@@ -0,0 +1,21 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.waitToProve = void 0;
4
+ const withdrawal_js_1 = require("../errors/withdrawal.js");
5
+ const getWithdrawals_js_1 = require("../utils/getWithdrawals.js");
6
+ const waitForNextL2Output_js_1 = require("./waitForNextL2Output.js");
7
+ async function waitToProve(client, parameters) {
8
+ const { receipt } = parameters;
9
+ const [withdrawal] = (0, getWithdrawals_js_1.getWithdrawals)(receipt);
10
+ if (!withdrawal)
11
+ throw new withdrawal_js_1.ReceiptContainsNoWithdrawalsError({
12
+ hash: receipt.transactionHash,
13
+ });
14
+ const output = await (0, waitForNextL2Output_js_1.waitForNextL2Output)(client, {
15
+ ...parameters,
16
+ l2BlockNumber: receipt.blockNumber,
17
+ });
18
+ return { output, withdrawal };
19
+ }
20
+ exports.waitToProve = waitToProve;
21
+ //# sourceMappingURL=waitToProve.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"waitToProve.js","sourceRoot":"","sources":["../../../../chains/opStack/actions/waitToProve.ts"],"names":[],"mappings":";;;AAUA,2DAA2E;AAG3E,kEAGmC;AACnC,qEAIiC;AAsD1B,KAAK,UAAU,WAAW,CAK/B,MAAyC,EACzC,UAAuD;IAEvD,MAAM,EAAE,OAAO,EAAE,GAAG,UAAU,CAAA;IAE9B,MAAM,CAAC,UAAU,CAAC,GAAG,IAAA,kCAAc,EAAC,OAAO,CAAC,CAAA;IAE5C,IAAI,CAAC,UAAU;QACb,MAAM,IAAI,iDAAiC,CAAC;YAC1C,IAAI,EAAE,OAAO,CAAC,eAAe;SAC9B,CAAC,CAAA;IAEJ,MAAM,MAAM,GAAG,MAAM,IAAA,4CAAmB,EAAC,MAAM,EAAE;QAC/C,GAAG,UAAU;QACb,aAAa,EAAE,OAAO,CAAC,WAAW;KACnC,CAAC,CAAA;IAEF,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,CAAA;AAC/B,CAAC;AAvBD,kCAuBC"}
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.zoraTestnet = exports.zoraSepolia = exports.zora = exports.optimismSepolia = exports.optimismGoerli = exports.optimism = exports.baseSepolia = exports.baseGoerli = exports.base = void 0;
3
+ exports.zoraTestnet = exports.zoraSepolia = exports.zora = exports.pgnTestnet = exports.pgn = exports.optimismSepolia = exports.optimismGoerli = exports.optimism = exports.baseSepolia = exports.baseGoerli = exports.base = void 0;
4
4
  var base_js_1 = require("../definitions/base.js");
5
5
  Object.defineProperty(exports, "base", { enumerable: true, get: function () { return base_js_1.base; } });
6
6
  var baseGoerli_js_1 = require("../definitions/baseGoerli.js");
@@ -13,6 +13,10 @@ var optimismGoerli_js_1 = require("../definitions/optimismGoerli.js");
13
13
  Object.defineProperty(exports, "optimismGoerli", { enumerable: true, get: function () { return optimismGoerli_js_1.optimismGoerli; } });
14
14
  var optimismSepolia_js_1 = require("../definitions/optimismSepolia.js");
15
15
  Object.defineProperty(exports, "optimismSepolia", { enumerable: true, get: function () { return optimismSepolia_js_1.optimismSepolia; } });
16
+ var pgn_js_1 = require("../definitions/pgn.js");
17
+ Object.defineProperty(exports, "pgn", { enumerable: true, get: function () { return pgn_js_1.pgn; } });
18
+ var pgnTestnet_js_1 = require("../definitions/pgnTestnet.js");
19
+ Object.defineProperty(exports, "pgnTestnet", { enumerable: true, get: function () { return pgnTestnet_js_1.pgnTestnet; } });
16
20
  var zora_js_1 = require("../definitions/zora.js");
17
21
  Object.defineProperty(exports, "zora", { enumerable: true, get: function () { return zora_js_1.zora; } });
18
22
  var zoraSepolia_js_1 = require("../definitions/zoraSepolia.js");
@@ -1 +1 @@
1
- {"version":3,"file":"chains.js","sourceRoot":"","sources":["../../../chains/opStack/chains.ts"],"names":[],"mappings":";;;AAAA,kDAA6C;AAApC,+FAAA,IAAI,OAAA;AACb,8DAAyD;AAAhD,2GAAA,UAAU,OAAA;AACnB,gEAA2D;AAAlD,6GAAA,WAAW,OAAA;AACpB,0DAAqD;AAA5C,uGAAA,QAAQ,OAAA;AACjB,sEAAiE;AAAxD,mHAAA,cAAc,OAAA;AACvB,wEAAmE;AAA1D,qHAAA,eAAe,OAAA;AACxB,kDAA6C;AAApC,+FAAA,IAAI,OAAA;AACb,gEAA2D;AAAlD,6GAAA,WAAW,OAAA;AACpB,gEAA2D;AAAlD,6GAAA,WAAW,OAAA"}
1
+ {"version":3,"file":"chains.js","sourceRoot":"","sources":["../../../chains/opStack/chains.ts"],"names":[],"mappings":";;;AAAA,kDAA6C;AAApC,+FAAA,IAAI,OAAA;AACb,8DAAyD;AAAhD,2GAAA,UAAU,OAAA;AACnB,gEAA2D;AAAlD,6GAAA,WAAW,OAAA;AACpB,0DAAqD;AAA5C,uGAAA,QAAQ,OAAA;AACjB,sEAAiE;AAAxD,mHAAA,cAAc,OAAA;AACvB,wEAAmE;AAA1D,qHAAA,eAAe,OAAA;AACxB,gDAA2C;AAAlC,6FAAA,GAAG,OAAA;AACZ,8DAAyD;AAAhD,2GAAA,UAAU,OAAA;AACnB,kDAA6C;AAApC,+FAAA,IAAI,OAAA;AACb,gEAA2D;AAAlD,6GAAA,WAAW,OAAA;AACpB,gEAA2D;AAAlD,6GAAA,WAAW,OAAA"}
@@ -0,0 +1,35 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.publicActionsL1 = void 0;
4
+ const buildInitiateWithdrawal_js_1 = require("../actions/buildInitiateWithdrawal.js");
5
+ const estimateDepositTransactionGas_js_1 = require("../actions/estimateDepositTransactionGas.js");
6
+ const estimateFinalizeWithdrawalGas_js_1 = require("../actions/estimateFinalizeWithdrawalGas.js");
7
+ const estimateProveWithdrawalGas_js_1 = require("../actions/estimateProveWithdrawalGas.js");
8
+ const getL2Output_js_1 = require("../actions/getL2Output.js");
9
+ const getTimeToFinalize_js_1 = require("../actions/getTimeToFinalize.js");
10
+ const getTimeToNextL2Output_js_1 = require("../actions/getTimeToNextL2Output.js");
11
+ const getTimeToProve_js_1 = require("../actions/getTimeToProve.js");
12
+ const getWithdrawalStatus_js_1 = require("../actions/getWithdrawalStatus.js");
13
+ const waitForNextL2Output_js_1 = require("../actions/waitForNextL2Output.js");
14
+ const waitToFinalize_js_1 = require("../actions/waitToFinalize.js");
15
+ const waitToProve_js_1 = require("../actions/waitToProve.js");
16
+ function publicActionsL1() {
17
+ return (client) => {
18
+ return {
19
+ buildInitiateWithdrawal: (args) => (0, buildInitiateWithdrawal_js_1.buildInitiateWithdrawal)(client, args),
20
+ estimateDepositTransactionGas: (args) => (0, estimateDepositTransactionGas_js_1.estimateDepositTransactionGas)(client, args),
21
+ estimateFinalizeWithdrawalGas: (args) => (0, estimateFinalizeWithdrawalGas_js_1.estimateFinalizeWithdrawalGas)(client, args),
22
+ estimateProveWithdrawalGas: (args) => (0, estimateProveWithdrawalGas_js_1.estimateProveWithdrawalGas)(client, args),
23
+ getL2Output: (args) => (0, getL2Output_js_1.getL2Output)(client, args),
24
+ getTimeToFinalize: (args) => (0, getTimeToFinalize_js_1.getTimeToFinalize)(client, args),
25
+ getTimeToNextL2Output: (args) => (0, getTimeToNextL2Output_js_1.getTimeToNextL2Output)(client, args),
26
+ getTimeToProve: (args) => (0, getTimeToProve_js_1.getTimeToProve)(client, args),
27
+ getWithdrawalStatus: (args) => (0, getWithdrawalStatus_js_1.getWithdrawalStatus)(client, args),
28
+ waitForNextL2Output: (args) => (0, waitForNextL2Output_js_1.waitForNextL2Output)(client, args),
29
+ waitToFinalize: (args) => (0, waitToFinalize_js_1.waitToFinalize)(client, args),
30
+ waitToProve: (args) => (0, waitToProve_js_1.waitToProve)(client, args),
31
+ };
32
+ };
33
+ }
34
+ exports.publicActionsL1 = publicActionsL1;
35
+ //# sourceMappingURL=publicL1.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"publicL1.js","sourceRoot":"","sources":["../../../../chains/opStack/decorators/publicL1.ts"],"names":[],"mappings":";;;AAKA,sFAI8C;AAC9C,kGAIoD;AACpD,kGAIoD;AACpD,4FAIiD;AACjD,8DAIkC;AAClC,0EAIwC;AACxC,kFAI4C;AAC5C,oEAIqC;AACrC,8EAI0C;AAC1C,8EAI0C;AAC1C,oEAIqC;AACrC,8DAIkC;AAualC,SAAgB,eAAe;IAC7B,OAAO,CAKL,MAA4C,EACT,EAAE;QACrC,OAAO;YACL,uBAAuB,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,IAAA,oDAAuB,EAAC,MAAM,EAAE,IAAI,CAAC;YACxE,6BAA6B,EAAE,CAAC,IAAI,EAAE,EAAE,CACtC,IAAA,gEAA6B,EAAC,MAAM,EAAE,IAAI,CAAC;YAC7C,6BAA6B,EAAE,CAAC,IAAI,EAAE,EAAE,CACtC,IAAA,gEAA6B,EAAC,MAAM,EAAE,IAAI,CAAC;YAC7C,0BAA0B,EAAE,CAAC,IAAI,EAAE,EAAE,CACnC,IAAA,0DAA0B,EAAC,MAAM,EAAE,IAAI,CAAC;YAC1C,WAAW,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,IAAA,4BAAW,EAAC,MAAM,EAAE,IAAI,CAAC;YAChD,iBAAiB,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,IAAA,wCAAiB,EAAC,MAAM,EAAE,IAAI,CAAC;YAC5D,qBAAqB,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,IAAA,gDAAqB,EAAC,MAAM,EAAE,IAAI,CAAC;YACpE,cAAc,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,IAAA,kCAAc,EAAC,MAAM,EAAE,IAAI,CAAC;YACtD,mBAAmB,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,IAAA,4CAAmB,EAAC,MAAM,EAAE,IAAI,CAAC;YAChE,mBAAmB,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,IAAA,4CAAmB,EAAC,MAAM,EAAE,IAAI,CAAC;YAChE,cAAc,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,IAAA,kCAAc,EAAC,MAAM,EAAE,IAAI,CAAC;YACtD,WAAW,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,IAAA,4BAAW,EAAC,MAAM,EAAE,IAAI,CAAC;SACjD,CAAA;IACH,CAAC,CAAA;AACH,CAAC;AA1BD,0CA0BC"}
@@ -2,10 +2,12 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.publicActionsL2 = void 0;
4
4
  const buildDepositTransaction_js_1 = require("../actions/buildDepositTransaction.js");
5
+ const buildProveWithdrawal_js_1 = require("../actions/buildProveWithdrawal.js");
5
6
  const estimateContractL1Fee_js_1 = require("../actions/estimateContractL1Fee.js");
6
7
  const estimateContractL1Gas_js_1 = require("../actions/estimateContractL1Gas.js");
7
8
  const estimateContractTotalFee_js_1 = require("../actions/estimateContractTotalFee.js");
8
9
  const estimateContractTotalGas_js_1 = require("../actions/estimateContractTotalGas.js");
10
+ const estimateInitiateWithdrawalGas_js_1 = require("../actions/estimateInitiateWithdrawalGas.js");
9
11
  const estimateL1Fee_js_1 = require("../actions/estimateL1Fee.js");
10
12
  const estimateL1Gas_js_1 = require("../actions/estimateL1Gas.js");
11
13
  const estimateTotalFee_js_1 = require("../actions/estimateTotalFee.js");
@@ -13,15 +15,17 @@ const estimateTotalGas_js_1 = require("../actions/estimateTotalGas.js");
13
15
  function publicActionsL2() {
14
16
  return (client) => {
15
17
  return {
18
+ buildDepositTransaction: (args) => (0, buildDepositTransaction_js_1.buildDepositTransaction)(client, args),
19
+ buildProveWithdrawal: (args) => (0, buildProveWithdrawal_js_1.buildProveWithdrawal)(client, args),
16
20
  estimateContractL1Fee: (args) => (0, estimateContractL1Fee_js_1.estimateContractL1Fee)(client, args),
17
21
  estimateContractL1Gas: (args) => (0, estimateContractL1Gas_js_1.estimateContractL1Gas)(client, args),
18
22
  estimateContractTotalFee: (args) => (0, estimateContractTotalFee_js_1.estimateContractTotalFee)(client, args),
19
23
  estimateContractTotalGas: (args) => (0, estimateContractTotalGas_js_1.estimateContractTotalGas)(client, args),
24
+ estimateInitiateWithdrawalGas: (args) => (0, estimateInitiateWithdrawalGas_js_1.estimateInitiateWithdrawalGas)(client, args),
20
25
  estimateL1Fee: (args) => (0, estimateL1Fee_js_1.estimateL1Fee)(client, args),
21
26
  estimateL1Gas: (args) => (0, estimateL1Gas_js_1.estimateL1Gas)(client, args),
22
27
  estimateTotalFee: (args) => (0, estimateTotalFee_js_1.estimateTotalFee)(client, args),
23
28
  estimateTotalGas: (args) => (0, estimateTotalGas_js_1.estimateTotalGas)(client, args),
24
- buildDepositTransaction: (args) => (0, buildDepositTransaction_js_1.buildDepositTransaction)(client, args),
25
29
  };
26
30
  };
27
31
  }
@@ -1 +1 @@
1
- {"version":3,"file":"publicL2.js","sourceRoot":"","sources":["../../../../chains/opStack/decorators/publicL2.ts"],"names":[],"mappings":";;;AASA,sFAI8C;AAC9C,kFAI4C;AAC5C,kFAI4C;AAC5C,wFAI+C;AAC/C,wFAI+C;AAC/C,kEAIoC;AACpC,kEAIoC;AACpC,wEAIuC;AACvC,wEAIuC;AAgTvC,SAAgB,eAAe;IAC7B,OAAO,CAKL,MAA4C,EACT,EAAE;QACrC,OAAO;YACL,qBAAqB,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,IAAA,gDAAqB,EAAC,MAAM,EAAE,IAAI,CAAC;YACpE,qBAAqB,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,IAAA,gDAAqB,EAAC,MAAM,EAAE,IAAI,CAAC;YACpE,wBAAwB,EAAE,CAAC,IAAI,EAAE,EAAE,CACjC,IAAA,sDAAwB,EAAC,MAAM,EAAE,IAAI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AC;YACpE,qBAAqB,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,IAAA,gDAAqB,EAAC,MAAM,EAAE,IAAI,CAAC;YACpE,wBAAwB,EAAE,CAAC,IAAI,EAAE,EAAE,CACjC,IAAA,sDAAwB,EAAC,MAAM,EAAE,IAAI,CAAC;YACxC,wBAAwB,EAAE,CAAC,IAAI,EAAE,EAAE,CACjC,IAAA,sDAAwB,EAAC,MAAM,EAAE,IAAI,CAAC;YACxC,6BAA6B,EAAE,CAAC,IAAI,EAAE,EAAE,CACtC,IAAA,gEAA6B,EAAC,MAAM,EAAE,IAAI,CAAC;YAC7C,aAAa,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,IAAA,gCAAa,EAAC,MAAM,EAAE,IAAI,CAAC;YACpD,aAAa,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,IAAA,gCAAa,EAAC,MAAM,EAAE,IAAI,CAAC;YACpD,gBAAgB,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,IAAA,sCAAgB,EAAC,MAAM,EAAE,IAAI,CAAC;YAC1D,gBAAgB,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,IAAA,sCAAgB,EAAC,MAAM,EAAE,IAAI,CAAC;SAC3D,CAAA;IACH,CAAC,CAAA;AACH,CAAC;AAzBD,0CAyBC"}
@@ -2,10 +2,14 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.walletActionsL1 = void 0;
4
4
  const depositTransaction_js_1 = require("../actions/depositTransaction.js");
5
+ const finalizeWithdrawal_js_1 = require("../actions/finalizeWithdrawal.js");
6
+ const proveWithdrawal_js_1 = require("../actions/proveWithdrawal.js");
5
7
  function walletActionsL1() {
6
8
  return (client) => {
7
9
  return {
8
10
  depositTransaction: (args) => (0, depositTransaction_js_1.depositTransaction)(client, args),
11
+ finalizeWithdrawal: (args) => (0, finalizeWithdrawal_js_1.finalizeWithdrawal)(client, args),
12
+ proveWithdrawal: (args) => (0, proveWithdrawal_js_1.proveWithdrawal)(client, args),
9
13
  };
10
14
  };
11
15
  }
@@ -1 +1 @@
1
- {"version":3,"file":"walletL1.js","sourceRoot":"","sources":["../../../../chains/opStack/decorators/walletL1.ts"],"names":[],"mappings":";;;AAIA,4EAIyC;AAiEzC,SAAgB,eAAe;IAC7B,OAAO,CAKL,MAA4C,EACT,EAAE;QACrC,OAAO;YACL,kBAAkB,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,IAAA,0CAAkB,EAAC,MAAM,EAAE,IAAI,CAAC;SAC/D,CAAA;IACH,CAAC,CAAA;AACH,CAAC;AAZD,0CAYC"}
1
+ {"version":3,"file":"walletL1.js","sourceRoot":"","sources":["../../../../chains/opStack/decorators/walletL1.ts"],"names":[],"mappings":";;;AAIA,4EAIyC;AACzC,4EAIyC;AACzC,sEAIsC;AA0HtC,SAAgB,eAAe;IAC7B,OAAO,CAKL,MAA4C,EACT,EAAE;QACrC,OAAO;YACL,kBAAkB,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,IAAA,0CAAkB,EAAC,MAAM,EAAE,IAAI,CAAC;YAC9D,kBAAkB,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,IAAA,0CAAkB,EAAC,MAAM,EAAE,IAAI,CAAC;YAC9D,eAAe,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,IAAA,oCAAe,EAAC,MAAM,EAAE,IAAI,CAAC;SACzD,CAAA;IACH,CAAC,CAAA;AACH,CAAC;AAdD,0CAcC"}
@@ -0,0 +1,13 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.walletActionsL2 = void 0;
4
+ const initiateWithdrawal_js_1 = require("../actions/initiateWithdrawal.js");
5
+ function walletActionsL2() {
6
+ return (client) => {
7
+ return {
8
+ initiateWithdrawal: (args) => (0, initiateWithdrawal_js_1.initiateWithdrawal)(client, args),
9
+ };
10
+ };
11
+ }
12
+ exports.walletActionsL2 = walletActionsL2;
13
+ //# sourceMappingURL=walletL2.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"walletL2.js","sourceRoot":"","sources":["../../../../chains/opStack/decorators/walletL2.ts"],"names":[],"mappings":";;;AAIA,4EAIyC;AA+DzC,SAAgB,eAAe;IAC7B,OAAO,CAKL,MAA4C,EACT,EAAE;QACrC,OAAO;YACL,kBAAkB,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,IAAA,0CAAkB,EAAC,MAAM,EAAE,IAAI,CAAC;SAC/D,CAAA;IACH,CAAC,CAAA;AACH,CAAC;AAZD,0CAYC"}
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ReceiptContainsNoWithdrawalsError = void 0;
4
+ const base_js_1 = require("../../../errors/base.js");
5
+ class ReceiptContainsNoWithdrawalsError extends base_js_1.BaseError {
6
+ constructor({ hash }) {
7
+ super(`The provided transaction receipt with hash "${hash}" contains no withdrawals.`);
8
+ Object.defineProperty(this, "name", {
9
+ enumerable: true,
10
+ configurable: true,
11
+ writable: true,
12
+ value: 'ReceiptContainsNoWithdrawalsError'
13
+ });
14
+ }
15
+ }
16
+ exports.ReceiptContainsNoWithdrawalsError = ReceiptContainsNoWithdrawalsError;
17
+ //# sourceMappingURL=withdrawal.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"withdrawal.js","sourceRoot":"","sources":["../../../../chains/opStack/errors/withdrawal.ts"],"names":[],"mappings":";;;AAAA,qDAAmD;AAOnD,MAAa,iCAAkC,SAAQ,mBAAS;IAE9D,YAAY,EAAE,IAAI,EAAiB;QACjC,KAAK,CACH,+CAA+C,IAAI,4BAA4B,CAChF,CAAA;QAJM;;;;mBAAO,mCAAmC;WAAA;IAKnD,CAAC;CACF;AAPD,8EAOC"}
@@ -1,6 +1,13 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.getSourceHash = exports.getL2TransactionHashes = exports.getL2TransactionHash = exports.fromOpaqueData = exports.extractTransactionDepositedLogs = exports.serializers = exports.serializeTransaction = exports.parseTransaction = exports.walletActionsL1 = exports.publicActionsL2 = exports.zoraTestnet = exports.zoraSepolia = exports.zora = exports.optimismSepolia = exports.optimismGoerli = exports.optimism = exports.baseSepolia = exports.baseGoerli = exports.base = exports.chainConfig = exports.buildDepositTransaction = exports.estimateTotalGas = exports.estimateTotalFee = exports.estimateL1Gas = exports.estimateL1Fee = exports.estimateContractTotalGas = exports.estimateContractTotalFee = exports.estimateContractL1Gas = exports.estimateContractL1Fee = exports.depositTransaction = void 0;
3
+ exports.getWithdrawals = exports.getWithdrawalHashStorageSlot = exports.getSourceHash = exports.getL2TransactionHashes = exports.getL2TransactionHash = exports.opaqueDataToDepositData = exports.extractTransactionDepositedLogs = exports.extractWithdrawalMessageLogs = exports.serializers = exports.serializeTransaction = exports.parseTransaction = exports.walletActionsL2 = exports.walletActionsL1 = exports.publicActionsL2 = exports.publicActionsL1 = exports.chainConfig = exports.waitToProve = exports.waitToFinalize = exports.waitForNextL2Output = exports.proveWithdrawal = exports.initiateWithdrawal = exports.getWithdrawalStatus = exports.getTimeToProve = exports.getTimeToNextL2Output = exports.getTimeToFinalize = exports.getL2Output = exports.finalizeWithdrawal = exports.estimateTotalGas = exports.estimateTotalFee = exports.estimateL1Gas = exports.estimateL1Fee = exports.estimateContractTotalGas = exports.estimateContractTotalFee = exports.estimateContractL1Gas = exports.estimateContractL1Fee = exports.depositTransaction = exports.buildProveWithdrawal = exports.buildInitiateWithdrawal = exports.buildDepositTransaction = void 0;
4
+ const tslib_1 = require("tslib");
5
+ var buildDepositTransaction_js_1 = require("./actions/buildDepositTransaction.js");
6
+ Object.defineProperty(exports, "buildDepositTransaction", { enumerable: true, get: function () { return buildDepositTransaction_js_1.buildDepositTransaction; } });
7
+ var buildInitiateWithdrawal_js_1 = require("./actions/buildInitiateWithdrawal.js");
8
+ Object.defineProperty(exports, "buildInitiateWithdrawal", { enumerable: true, get: function () { return buildInitiateWithdrawal_js_1.buildInitiateWithdrawal; } });
9
+ var buildProveWithdrawal_js_1 = require("./actions/buildProveWithdrawal.js");
10
+ Object.defineProperty(exports, "buildProveWithdrawal", { enumerable: true, get: function () { return buildProveWithdrawal_js_1.buildProveWithdrawal; } });
4
11
  var depositTransaction_js_1 = require("./actions/depositTransaction.js");
5
12
  Object.defineProperty(exports, "depositTransaction", { enumerable: true, get: function () { return depositTransaction_js_1.depositTransaction; } });
6
13
  var estimateContractL1Fee_js_1 = require("./actions/estimateContractL1Fee.js");
@@ -19,37 +26,58 @@ var estimateTotalFee_js_1 = require("./actions/estimateTotalFee.js");
19
26
  Object.defineProperty(exports, "estimateTotalFee", { enumerable: true, get: function () { return estimateTotalFee_js_1.estimateTotalFee; } });
20
27
  var estimateTotalGas_js_1 = require("./actions/estimateTotalGas.js");
21
28
  Object.defineProperty(exports, "estimateTotalGas", { enumerable: true, get: function () { return estimateTotalGas_js_1.estimateTotalGas; } });
22
- var buildDepositTransaction_js_1 = require("./actions/buildDepositTransaction.js");
23
- Object.defineProperty(exports, "buildDepositTransaction", { enumerable: true, get: function () { return buildDepositTransaction_js_1.buildDepositTransaction; } });
29
+ var finalizeWithdrawal_js_1 = require("./actions/finalizeWithdrawal.js");
30
+ Object.defineProperty(exports, "finalizeWithdrawal", { enumerable: true, get: function () { return finalizeWithdrawal_js_1.finalizeWithdrawal; } });
31
+ var getL2Output_js_1 = require("./actions/getL2Output.js");
32
+ Object.defineProperty(exports, "getL2Output", { enumerable: true, get: function () { return getL2Output_js_1.getL2Output; } });
33
+ var getTimeToFinalize_js_1 = require("./actions/getTimeToFinalize.js");
34
+ Object.defineProperty(exports, "getTimeToFinalize", { enumerable: true, get: function () { return getTimeToFinalize_js_1.getTimeToFinalize; } });
35
+ var getTimeToNextL2Output_js_1 = require("./actions/getTimeToNextL2Output.js");
36
+ Object.defineProperty(exports, "getTimeToNextL2Output", { enumerable: true, get: function () { return getTimeToNextL2Output_js_1.getTimeToNextL2Output; } });
37
+ var getTimeToProve_js_1 = require("./actions/getTimeToProve.js");
38
+ Object.defineProperty(exports, "getTimeToProve", { enumerable: true, get: function () { return getTimeToProve_js_1.getTimeToProve; } });
39
+ var getWithdrawalStatus_js_1 = require("./actions/getWithdrawalStatus.js");
40
+ Object.defineProperty(exports, "getWithdrawalStatus", { enumerable: true, get: function () { return getWithdrawalStatus_js_1.getWithdrawalStatus; } });
41
+ var initiateWithdrawal_js_1 = require("./actions/initiateWithdrawal.js");
42
+ Object.defineProperty(exports, "initiateWithdrawal", { enumerable: true, get: function () { return initiateWithdrawal_js_1.initiateWithdrawal; } });
43
+ var proveWithdrawal_js_1 = require("./actions/proveWithdrawal.js");
44
+ Object.defineProperty(exports, "proveWithdrawal", { enumerable: true, get: function () { return proveWithdrawal_js_1.proveWithdrawal; } });
45
+ var waitForNextL2Output_js_1 = require("./actions/waitForNextL2Output.js");
46
+ Object.defineProperty(exports, "waitForNextL2Output", { enumerable: true, get: function () { return waitForNextL2Output_js_1.waitForNextL2Output; } });
47
+ var waitToFinalize_js_1 = require("./actions/waitToFinalize.js");
48
+ Object.defineProperty(exports, "waitToFinalize", { enumerable: true, get: function () { return waitToFinalize_js_1.waitToFinalize; } });
49
+ var waitToProve_js_1 = require("./actions/waitToProve.js");
50
+ Object.defineProperty(exports, "waitToProve", { enumerable: true, get: function () { return waitToProve_js_1.waitToProve; } });
24
51
  var chainConfig_js_1 = require("./chainConfig.js");
25
52
  Object.defineProperty(exports, "chainConfig", { enumerable: true, get: function () { return chainConfig_js_1.chainConfig; } });
26
- var chains_js_1 = require("./chains.js");
27
- Object.defineProperty(exports, "base", { enumerable: true, get: function () { return chains_js_1.base; } });
28
- Object.defineProperty(exports, "baseGoerli", { enumerable: true, get: function () { return chains_js_1.baseGoerli; } });
29
- Object.defineProperty(exports, "baseSepolia", { enumerable: true, get: function () { return chains_js_1.baseSepolia; } });
30
- Object.defineProperty(exports, "optimism", { enumerable: true, get: function () { return chains_js_1.optimism; } });
31
- Object.defineProperty(exports, "optimismGoerli", { enumerable: true, get: function () { return chains_js_1.optimismGoerli; } });
32
- Object.defineProperty(exports, "optimismSepolia", { enumerable: true, get: function () { return chains_js_1.optimismSepolia; } });
33
- Object.defineProperty(exports, "zora", { enumerable: true, get: function () { return chains_js_1.zora; } });
34
- Object.defineProperty(exports, "zoraSepolia", { enumerable: true, get: function () { return chains_js_1.zoraSepolia; } });
35
- Object.defineProperty(exports, "zoraTestnet", { enumerable: true, get: function () { return chains_js_1.zoraTestnet; } });
53
+ tslib_1.__exportStar(require("./chains.js"), exports);
54
+ var publicL1_js_1 = require("./decorators/publicL1.js");
55
+ Object.defineProperty(exports, "publicActionsL1", { enumerable: true, get: function () { return publicL1_js_1.publicActionsL1; } });
36
56
  var publicL2_js_1 = require("./decorators/publicL2.js");
37
57
  Object.defineProperty(exports, "publicActionsL2", { enumerable: true, get: function () { return publicL2_js_1.publicActionsL2; } });
38
58
  var walletL1_js_1 = require("./decorators/walletL1.js");
39
59
  Object.defineProperty(exports, "walletActionsL1", { enumerable: true, get: function () { return walletL1_js_1.walletActionsL1; } });
60
+ var walletL2_js_1 = require("./decorators/walletL2.js");
61
+ Object.defineProperty(exports, "walletActionsL2", { enumerable: true, get: function () { return walletL2_js_1.walletActionsL2; } });
40
62
  var parsers_js_1 = require("./parsers.js");
41
63
  Object.defineProperty(exports, "parseTransaction", { enumerable: true, get: function () { return parsers_js_1.parseTransaction; } });
42
64
  var serializers_js_1 = require("./serializers.js");
43
65
  Object.defineProperty(exports, "serializeTransaction", { enumerable: true, get: function () { return serializers_js_1.serializeTransaction; } });
44
66
  Object.defineProperty(exports, "serializers", { enumerable: true, get: function () { return serializers_js_1.serializers; } });
67
+ var extractWithdrawalMessageLogs_js_1 = require("./utils/extractWithdrawalMessageLogs.js");
68
+ Object.defineProperty(exports, "extractWithdrawalMessageLogs", { enumerable: true, get: function () { return extractWithdrawalMessageLogs_js_1.extractWithdrawalMessageLogs; } });
45
69
  var extractTransactionDepositedLogs_js_1 = require("./utils/extractTransactionDepositedLogs.js");
46
70
  Object.defineProperty(exports, "extractTransactionDepositedLogs", { enumerable: true, get: function () { return extractTransactionDepositedLogs_js_1.extractTransactionDepositedLogs; } });
47
- var fromOpaqueData_js_1 = require("./utils/fromOpaqueData.js");
48
- Object.defineProperty(exports, "fromOpaqueData", { enumerable: true, get: function () { return fromOpaqueData_js_1.fromOpaqueData; } });
71
+ var opaqueDataToDepositData_js_1 = require("./utils/opaqueDataToDepositData.js");
72
+ Object.defineProperty(exports, "opaqueDataToDepositData", { enumerable: true, get: function () { return opaqueDataToDepositData_js_1.opaqueDataToDepositData; } });
49
73
  var getL2TransactionHash_js_1 = require("./utils/getL2TransactionHash.js");
50
74
  Object.defineProperty(exports, "getL2TransactionHash", { enumerable: true, get: function () { return getL2TransactionHash_js_1.getL2TransactionHash; } });
51
75
  var getL2TransactionHashes_js_1 = require("./utils/getL2TransactionHashes.js");
52
76
  Object.defineProperty(exports, "getL2TransactionHashes", { enumerable: true, get: function () { return getL2TransactionHashes_js_1.getL2TransactionHashes; } });
53
77
  var getSourceHash_js_1 = require("./utils/getSourceHash.js");
54
78
  Object.defineProperty(exports, "getSourceHash", { enumerable: true, get: function () { return getSourceHash_js_1.getSourceHash; } });
79
+ var getWithdrawalHashStorageSlot_js_1 = require("./utils/getWithdrawalHashStorageSlot.js");
80
+ Object.defineProperty(exports, "getWithdrawalHashStorageSlot", { enumerable: true, get: function () { return getWithdrawalHashStorageSlot_js_1.getWithdrawalHashStorageSlot; } });
81
+ var getWithdrawals_js_1 = require("./utils/getWithdrawals.js");
82
+ Object.defineProperty(exports, "getWithdrawals", { enumerable: true, get: function () { return getWithdrawals_js_1.getWithdrawals; } });
55
83
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../chains/opStack/index.ts"],"names":[],"mappings":";;;AAAA,yEAKwC;AAJtC,2HAAA,kBAAkB,OAAA;AAKpB,+EAK2C;AAJzC,iIAAA,qBAAqB,OAAA;AAKvB,+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AKgD;AAJ9C,+IAAA,4BAA4B,OAAA;AAM9B,iGAKmD;AAJjD,qJAAA,+BAA+B,OAAA;AAMjC,iFAK2C;AAJzC,qIAAA,uBAAuB,OAAA;AAMzB,2EAKwC;AAJtC,+HAAA,oBAAoB,OAAA;AAMtB,+EAK0C;AAJxC,mIAAA,sBAAsB,OAAA;AAMxB,6DAKiC;AAJ/B,iHAAA,aAAa,OAAA;AAMf,2FAKgD;AAJ9C,+IAAA,4BAA4B,OAAA;AAM9B,+DAKkC;AAJhC,mHAAA,cAAc,OAAA"}
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=deposit.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"deposit.js","sourceRoot":"","sources":["../../../../chains/opStack/types/deposit.ts"],"names":[],"mappings":""}
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=withdrawal.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"withdrawal.js","sourceRoot":"","sources":["../../../../chains/opStack/types/withdrawal.ts"],"names":[],"mappings":""}
@@ -0,0 +1,14 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.extractWithdrawalMessageLogs = void 0;
4
+ const parseEventLogs_js_1 = require("../../../utils/abi/parseEventLogs.js");
5
+ const abis_js_1 = require("../abis.js");
6
+ function extractWithdrawalMessageLogs({ logs, }) {
7
+ return (0, parseEventLogs_js_1.parseEventLogs)({
8
+ abi: abis_js_1.l2ToL1MessagePasserAbi,
9
+ eventName: 'MessagePassed',
10
+ logs,
11
+ });
12
+ }
13
+ exports.extractWithdrawalMessageLogs = extractWithdrawalMessageLogs;
14
+ //# sourceMappingURL=extractWithdrawalMessageLogs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"extractWithdrawalMessageLogs.js","sourceRoot":"","sources":["../../../../chains/opStack/utils/extractWithdrawalMessageLogs.ts"],"names":[],"mappings":";;;AAEA,4EAG6C;AAC7C,wCAAmD;AAqBnD,SAAgB,4BAA4B,CAAC,EAC3C,IAAI,GACmC;IACvC,OAAO,IAAA,kCAAc,EAAC;QACpB,GAAG,EAAE,gCAAsB;QAC3B,SAAS,EAAE,eAAe;QAC1B,IAAI;KACL,CAAC,CAAA;AACJ,CAAC;AARD,oEAQC"}
@@ -3,15 +3,15 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.getL2TransactionHash = void 0;
4
4
  const keccak256_js_1 = require("../../../utils/hash/keccak256.js");
5
5
  const serializers_js_1 = require("../serializers.js");
6
- const fromOpaqueData_js_1 = require("./fromOpaqueData.js");
7
6
  const getSourceHash_js_1 = require("./getSourceHash.js");
7
+ const opaqueDataToDepositData_js_1 = require("./opaqueDataToDepositData.js");
8
8
  function getL2TransactionHash({ log }) {
9
9
  const sourceHash = (0, getSourceHash_js_1.getSourceHash)({
10
10
  domain: 'userDeposit',
11
11
  l1BlockHash: log.blockHash,
12
12
  l1LogIndex: log.logIndex,
13
13
  });
14
- const { data, gas, isCreation, mint, value } = (0, fromOpaqueData_js_1.fromOpaqueData)(log.args.opaqueData);
14
+ const { data, gas, isCreation, mint, value } = (0, opaqueDataToDepositData_js_1.opaqueDataToDepositData)(log.args.opaqueData);
15
15
  return (0, keccak256_js_1.keccak256)((0, serializers_js_1.serializeTransaction)({
16
16
  from: log.args.from,
17
17
  to: isCreation ? undefined : log.args.to,
@@ -1 +1 @@
1
- {"version":3,"file":"getL2TransactionHash.js","sourceRoot":"","sources":["../../../../chains/opStack/utils/getL2TransactionHash.ts"],"names":[],"mappings":";;;AAKA,mEAA4D;AAE5D,sDAAwD;AACxD,2DAAoD;AACpD,yDAAkD;AAmBlD,SAAgB,oBAAoB,CAAC,EAAE,GAAG,EAAkC;IAC1E,MAAM,UAAU,GAAG,IAAA,gCAAa,EAAC;QAC/B,MAAM,EAAE,aAAa;QACrB,WAAW,EAAE,GAAG,CAAC,SAAS;QAC1B,UAAU,EAAE,GAAG,CAAC,QAAQ;KACzB,CAAC,CAAA;IACF,MAAM,EAAE,IAAI,EAAE,GAAG,EAAE,UAAU,EAAE,IAAI,EAAE,KAAK,EAAE,GAAG,IAAA,kCAAc,EAC3D,GAAG,CAAC,IAAI,CAAC,UAAU,CACpB,CAAA;IAED,OAAO,IAAA,wBAAS,EACd,IAAA,qCAAoB,EAAC;QACnB,IAAI,EAAE,GAAG,CAAC,IAAI,CAAC,IAAI;QACnB,EAAE,EAAE,UAAU,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE;QACxC,UAAU;QACV,IAAI;QACJ,GAAG;QACH,UAAU,EAAE,KAAK;QACjB,IAAI;QACJ,IAAI,EAAE,SAAS;QACf,KAAK;KACN,CAAC,CACH,CAAA;AACH,CAAC;AAvBD,oDAuBC"}
1
+ {"version":3,"file":"getL2TransactionHash.js","sourceRoot":"","sources":["../../../../chains/opStack/utils/getL2TransactionHash.ts"],"names":[],"mappings":";;;AAKA,mEAA4D;AAE5D,sDAAwD;AACxD,yDAAkD;AAClD,6EAAsE;AAmBtE,SAAgB,oBAAoB,CAAC,EAAE,GAAG,EAAkC;IAC1E,MAAM,UAAU,GAAG,IAAA,gCAAa,EAAC;QAC/B,MAAM,EAAE,aAAa;QACrB,WAAW,EAAE,GAAG,CAAC,SAAS;QAC1B,UAAU,EAAE,GAAG,CAAC,QAAQ;KACzB,CAAC,CAAA;IACF,MAAM,EAAE,IAAI,EAAE,GAAG,EAAE,UAAU,EAAE,IAAI,EAAE,KAAK,EAAE,GAAG,IAAA,oDAAuB,EACpE,GAAG,CAAC,IAAI,CAAC,UAAU,CACpB,CAAA;IAED,OAAO,IAAA,wBAAS,EACd,IAAA,qCAAoB,EAAC;QACnB,IAAI,EAAE,GAAG,CAAC,IAAI,CAAC,IAAI;QACnB,EAAE,EAAE,UAAU,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE;QACxC,UAAU;QACV,IAAI;QACJ,GAAG;QACH,UAAU,EAAE,KAAK;QACjB,IAAI;QACJ,IAAI,EAAE,SAAS;QACf,KAAK;KACN,CAAC,CACH,CAAA;AACH,CAAC;AAvBD,oDAuBC"}
@@ -0,0 +1,11 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getWithdrawalHashStorageSlot = void 0;
4
+ const encodeAbiParameters_js_1 = require("../../../utils/abi/encodeAbiParameters.js");
5
+ const keccak256_js_1 = require("../../../utils/hash/keccak256.js");
6
+ function getWithdrawalHashStorageSlot({ withdrawalHash, }) {
7
+ const data = (0, encodeAbiParameters_js_1.encodeAbiParameters)([{ type: 'bytes32' }, { type: 'uint256' }], [withdrawalHash, 0n]);
8
+ return (0, keccak256_js_1.keccak256)(data);
9
+ }
10
+ exports.getWithdrawalHashStorageSlot = getWithdrawalHashStorageSlot;
11
+ //# sourceMappingURL=getWithdrawalHashStorageSlot.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getWithdrawalHashStorageSlot.js","sourceRoot":"","sources":["../../../../chains/opStack/utils/getWithdrawalHashStorageSlot.ts"],"names":[],"mappings":";;;AAEA,sFAGkD;AAClD,mEAGyC;AAWzC,SAAgB,4BAA4B,CAAC,EAC3C,cAAc,GACyB;IACvC,MAAM,IAAI,GAAG,IAAA,4CAAmB,EAC9B,CAAC,EAAE,IAAI,EAAE,SAAS,EAAE,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC,EAC1C,CAAC,cAAc,EAAE,EAAE,CAAC,CACrB,CAAA;IACD,OAAO,IAAA,wBAAS,EAAC,IAAI,CAAC,CAAA;AACxB,CAAC;AARD,oEAQC"}
@@ -0,0 +1,10 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getWithdrawals = void 0;
4
+ const extractWithdrawalMessageLogs_js_1 = require("./extractWithdrawalMessageLogs.js");
5
+ function getWithdrawals({ logs, }) {
6
+ const extractedLogs = (0, extractWithdrawalMessageLogs_js_1.extractWithdrawalMessageLogs)({ logs });
7
+ return extractedLogs.map((log) => log.args);
8
+ }
9
+ exports.getWithdrawals = getWithdrawals;
10
+ //# sourceMappingURL=getWithdrawals.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getWithdrawals.js","sourceRoot":"","sources":["../../../../chains/opStack/utils/getWithdrawals.ts"],"names":[],"mappings":";;;AAGA,uFAG0C;AAa1C,SAAgB,cAAc,CAAC,EAC7B,IAAI,GACqB;IACzB,MAAM,aAAa,GAAG,IAAA,8DAA4B,EAAC,EAAE,IAAI,EAAE,CAAC,CAAA;IAC5D,OAAO,aAAa,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,IAAI,CAAC,CAAA;AAC7C,CAAC;AALD,wCAKC"}
@@ -1,10 +1,10 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.fromOpaqueData = void 0;
3
+ exports.opaqueDataToDepositData = void 0;
4
4
  const size_js_1 = require("../../../utils/data/size.js");
5
5
  const slice_js_1 = require("../../../utils/data/slice.js");
6
6
  const fromHex_js_1 = require("../../../utils/encoding/fromHex.js");
7
- function fromOpaqueData(opaqueData) {
7
+ function opaqueDataToDepositData(opaqueData) {
8
8
  let offset = 0;
9
9
  const mint = (0, slice_js_1.slice)(opaqueData, offset, offset + 32);
10
10
  offset += 32;
@@ -25,5 +25,5 @@ function fromOpaqueData(opaqueData) {
25
25
  data,
26
26
  };
27
27
  }
28
- exports.fromOpaqueData = fromOpaqueData;
29
- //# sourceMappingURL=fromOpaqueData.js.map
28
+ exports.opaqueDataToDepositData = opaqueDataToDepositData;
29
+ //# sourceMappingURL=opaqueDataToDepositData.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"opaqueDataToDepositData.js","sourceRoot":"","sources":["../../../../chains/opStack/utils/opaqueDataToDepositData.ts"],"names":[],"mappings":";;;AAEA,yDAAsE;AACtE,2DAAyE;AACzE,mEAAgE;AAiBhE,SAAgB,uBAAuB,CACrC,UAAe;IAEf,IAAI,MAAM,GAAG,CAAC,CAAA;IACd,MAAM,IAAI,GAAG,IAAA,gBAAK,EAAC,UAAU,EAAE,MAAM,EAAE,MAAM,GAAG,EAAE,CAAC,CAAA;IACnD,MAAM,IAAI,EAAE,CAAA;IACZ,MAAM,KAAK,GAAG,IAAA,gBAAK,EAAC,UAAU,EAAE,MAAM,EAAE,MAAM,GAAG,EAAE,CAAC,CAAA;IACpD,MAAM,IAAI,EAAE,CAAA;IACZ,MAAM,GAAG,GAAG,IAAA,gBAAK,EAAC,UAAU,EAAE,MAAM,EAAE,MAAM,GAAG,CAAC,CAAC,CAAA;IACjD,MAAM,IAAI,CAAC,CAAA;IACX,MAAM,UAAU,GAAG,MAAM,CAAC,IAAA,gBAAK,EAAC,UAAU,EAAE,MAAM,EAAE,MAAM,GAAG,CAAC,CAAC,CAAC,KAAK,EAAE,CAAA;IACvE,MAAM,IAAI,CAAC,CAAA;IACX,MAAM,IAAI,GACR,MAAM,GAAG,IAAA,cAAI,EAAC,UAAU,CAAC,GAAG,CAAC;QAC3B,CAAC,CAAC,IAAI;QACN,CAAC,CAAC,IAAA,gBAAK,EAAC,UAAU,EAAE,MAAM,EAAE,UAAU,CAAC,MAAM,CAAC,CAAA;IAClD,OAAO;QACL,IAAI,EAAE,IAAA,wBAAW,EAAC,IAAI,CAAC;QACvB,KAAK,EAAE,IAAA,wBAAW,EAAC,KAAK,CAAC;QACzB,GAAG,EAAE,IAAA,wBAAW,EAAC,GAAG,CAAC;QACrB,UAAU;QACV,IAAI;KACL,CAAA;AACH,CAAC;AAvBD,0DAuBC"}
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.UnsupportedPackedAbiType = exports.InvalidDefinitionTypeError = exports.InvalidArrayError = exports.InvalidAbiDecodingTypeError = exports.InvalidAbiEncodingTypeError = exports.DecodeLogTopicsMismatch = exports.DecodeLogDataMismatch = exports.BytesSizeMismatchError = exports.AbiFunctionSignatureNotFoundError = exports.AbiFunctionOutputsNotFoundError = exports.AbiFunctionNotFoundError = exports.AbiEventNotFoundError = exports.AbiEventSignatureNotFoundError = exports.AbiEventSignatureEmptyTopicsError = exports.AbiErrorSignatureNotFoundError = exports.AbiErrorNotFoundError = exports.AbiErrorInputsNotFoundError = exports.AbiEncodingLengthMismatchError = exports.AbiEncodingBytesSizeMismatchError = exports.AbiEncodingArrayLengthMismatchError = exports.AbiDecodingZeroDataError = exports.AbiDecodingDataSizeTooSmallError = exports.AbiDecodingDataSizeInvalidError = exports.AbiConstructorParamsNotFoundError = exports.AbiConstructorNotFoundError = void 0;
3
+ exports.UnsupportedPackedAbiType = exports.InvalidDefinitionTypeError = exports.InvalidArrayError = exports.InvalidAbiDecodingTypeError = exports.InvalidAbiEncodingTypeError = exports.DecodeLogTopicsMismatch = exports.DecodeLogDataMismatch = exports.BytesSizeMismatchError = exports.AbiItemAmbiguityError = exports.AbiFunctionSignatureNotFoundError = exports.AbiFunctionOutputsNotFoundError = exports.AbiFunctionNotFoundError = exports.AbiEventNotFoundError = exports.AbiEventSignatureNotFoundError = exports.AbiEventSignatureEmptyTopicsError = exports.AbiErrorSignatureNotFoundError = exports.AbiErrorNotFoundError = exports.AbiErrorInputsNotFoundError = exports.AbiEncodingLengthMismatchError = exports.AbiEncodingBytesSizeMismatchError = exports.AbiEncodingArrayLengthMismatchError = exports.AbiDecodingZeroDataError = exports.AbiDecodingDataSizeTooSmallError = exports.AbiDecodingDataSizeInvalidError = exports.AbiConstructorParamsNotFoundError = exports.AbiConstructorNotFoundError = void 0;
4
4
  const formatAbiItem_js_1 = require("../utils/abi/formatAbiItem.js");
5
5
  const size_js_1 = require("../utils/data/size.js");
6
6
  const base_js_1 = require("./base.js");
@@ -309,6 +309,26 @@ class AbiFunctionSignatureNotFoundError extends base_js_1.BaseError {
309
309
  }
310
310
  }
311
311
  exports.AbiFunctionSignatureNotFoundError = AbiFunctionSignatureNotFoundError;
312
+ class AbiItemAmbiguityError extends base_js_1.BaseError {
313
+ constructor(x, y) {
314
+ super('Found ambiguous types in overloaded ABI items.', {
315
+ metaMessages: [
316
+ `\`${x.type}\` in \`${(0, formatAbiItem_js_1.formatAbiItem)(x.abiItem)}\`, and`,
317
+ `\`${y.type}\` in \`${(0, formatAbiItem_js_1.formatAbiItem)(y.abiItem)}\``,
318
+ '',
319
+ 'These types encode differently and cannot be distinguished at runtime.',
320
+ 'Remove one of the ambiguous items in the ABI.',
321
+ ],
322
+ });
323
+ Object.defineProperty(this, "name", {
324
+ enumerable: true,
325
+ configurable: true,
326
+ writable: true,
327
+ value: 'AbiItemAmbiguityError'
328
+ });
329
+ }
330
+ }
331
+ exports.AbiItemAmbiguityError = AbiItemAmbiguityError;
312
332
  class BytesSizeMismatchError extends base_js_1.BaseError {
313
333
  constructor({ expectedSize, givenSize, }) {
314
334
  super(`Expected bytes${expectedSize}, got bytes${givenSize}.`);
@@ -1 +1 @@
1
- {"version":3,"file":"abi.js","sourceRoot":"","sources":["../../errors/abi.ts"],"names":[],"mappings":";;;AAGA,oEAA8E;AAC9E,mDAA4C;AAE5C,uCAAqC;AAKrC,MAAa,2BAA4B,SAAQ,mBAAS;IAExD,YAAY,EAAE,QAAQ,EAAwB;QAC5C,KAAK,CACH;YACE,yCAAyC;YACzC,gFAAgF;SACjF,CAAC,IAAI,CAAC,IAAI,CAAC,EACZ;YACE,QAAQ;SACT,CACF,CAAA;QAVM;;;;mBAAO,6BAA6B;WAAA;IAW7C,CAAC;CACF;AAbD,kEAaC;AAOD,MAAa,iCAAkC,SAAQ,mBAAS;IAE9D,YAAY,EAAE,QAAQ,EAAwB;QAC5C,KAAK,CACH;YACE,kHAAkH;YAClH,qGAAqG;SACtG,CAAC,IAAI,CAAC,IAAI,CAAC,EACZ;YACE,QAAQ;SACT,CACF,CAAA;QAVM;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C,CAAC;CACF;AALD,8CAKC;AAKD,MAAa,0BAA2B,SAAQ,mBAAS;IAEvD,YAAY,IAAY;QACtB,KAAK,CACH;YACE,IAAI,IAAI,mCAAmC;YAC3C,2CAA2C;SAC5C,CAAC,IAAI,CAAC,IAAI,CAAC,CACb,CAAA;QAPM;;;;mBAAO,4BAA4B;WAAA;IAQ5C,CAAC;CACF;AAVD,gEAUC;AAKD,MAAa,wBAAyB,SAAQ,mBAAS;IAErD,YAAY,IAAa;QACvB,KAAK,CAAC,SAAS,IAAI,yCAAyC,CAAC,CAAA;QAFtD;;;;mBAAO,0BAA0B;WAAA;IAG1C,CAAC;CACF;AALD,4DAKC"}
@@ -1,5 +1,5 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.version = void 0;
4
- exports.version = '2.0.0-beta.8';
4
+ exports.version = '2.0.0-rc.0';
5
5
  //# sourceMappingURL=version.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"version.js","sourceRoot":"","sources":["../../errors/version.ts"],"names":[],"mappings":";;;AAAa,QAAA,OAAO,GAAG,cAAc,CAAA"}
1
+ {"version":3,"file":"version.js","sourceRoot":"","sources":["../../errors/version.ts"],"names":[],"mappings":";;;AAAa,QAAA,OAAO,GAAG,YAAY,CAAA"}
package/_cjs/index.js CHANGED
@@ -6,8 +6,8 @@ exports.AbiEventNotFoundError = exports.AbiErrorSignatureNotFoundError = exports
6
6
  exports.InvalidBytesBooleanError = exports.InvalidChainIdError = exports.ClientChainNotConfiguredError = exports.ChainNotFoundError = exports.ChainMismatchError = exports.ChainDoesNotSupportContract = exports.UserRejectedRequestError = exports.UnsupportedProviderMethodError = exports.UnknownRpcError = exports.UnauthorizedProviderError = exports.TransactionRejectedRpcError = exports.SwitchChainError = exports.RpcError = exports.ResourceUnavailableRpcError = exports.ResourceNotFoundRpcError = exports.ProviderRpcError = exports.ProviderDisconnectedError = exports.ParseRpcError = exports.MethodNotSupportedRpcError = exports.MethodNotFoundRpcError = exports.LimitExceededRpcError = exports.JsonRpcVersionUnsupportedError = exports.InvalidRequestRpcError = exports.InvalidParamsRpcError = exports.InvalidInputRpcError = exports.InternalRpcError = exports.ChainDisconnectedError = exports.MaxFeePerGasTooLowError = exports.Eip1559FeesNotSupportedError = exports.BaseFeeScalarError = exports.RawContractError = exports.ContractFunctionZeroDataError = exports.ContractFunctionRevertedError = exports.ContractFunctionExecutionError = exports.CallExecutionError = exports.BlockNotFoundError = exports.BaseError = exports.UnsupportedPackedAbiType = exports.InvalidDefinitionTypeError = exports.InvalidArrayError = exports.InvalidAbiEncodingTypeError = exports.InvalidAbiDecodingTypeError = exports.DecodeLogTopicsMismatch = exports.DecodeLogDataMismatch = exports.BytesSizeMismatchError = exports.AbiFunctionSignatureNotFoundError = exports.AbiFunctionOutputsNotFoundError = exports.AbiFunctionNotFoundError = exports.AbiEventSignatureNotFoundError = exports.AbiEventSignatureEmptyTopicsError = void 0;
7
7
  exports.decodeFunctionResult = exports.decodeFunctionData = exports.decodeEventLog = exports.decodeErrorResult = exports.decodeDeployData = exports.decodeAbiParameters = exports.formatLog = exports.formatBlock = exports.defineBlock = exports.namehash = exports.labelhash = exports.UrlRequiredError = exports.SliceOffsetOutOfBoundsError = exports.SizeExceedsPaddingSizeError = exports.WaitForTransactionReceiptTimeoutError = exports.TransactionReceiptNotFoundError = exports.TransactionNotFoundError = exports.TransactionExecutionError = exports.InvalidStorageKeySizeError = exports.InvalidSerializedTransactionTypeError = exports.InvalidSerializedTransactionError = exports.InvalidSerializableTransactionError = exports.InvalidLegacyVError = exports.FeeConflictError = exports.InvalidAddressError = exports.WebSocketRequestError = exports.TimeoutError = exports.RpcRequestError = exports.HttpRequestError = exports.FilterTypeNotSupportedError = exports.UnknownNodeError = exports.TransactionTypeNotSupportedError = exports.TipAboveFeeCapError = exports.NonceTooLowError = exports.NonceTooHighError = exports.NonceMaxValueError = exports.IntrinsicGasTooLowError = exports.IntrinsicGasTooHighError = exports.InsufficientFundsError = exports.FeeCapTooLowError = exports.FeeCapTooHighError = exports.ExecutionRevertedError = exports.EstimateGasExecutionError = exports.EnsAvatarUnsupportedNamespaceError = exports.EnsAvatarInvalidNftUriError = exports.EnsAvatarUriResolutionError = exports.SizeOverflowError = exports.InvalidHexValueError = exports.InvalidHexBooleanError = exports.IntegerOutOfRangeError = void 0;
8
8
  exports.stringToHex = exports.numberToHex = exports.bytesToHex = exports.boolToHex = exports.toBytes = exports.stringToBytes = exports.numberToBytes = exports.hexToBytes = exports.boolToBytes = exports.assertTransactionLegacy = exports.assertTransactionEIP2930 = exports.assertTransactionEIP1559 = exports.assertRequest = exports.verifyTypedData = exports.verifyMessage = exports.toRlp = exports.hexToRlp = exports.bytesToRlp = exports.signatureToHex = exports.compactSignatureToHex = exports.signatureToCompactSignature = exports.recoverTypedDataAddress = exports.recoverPublicKey = exports.recoverMessageAddress = exports.recoverAddress = exports.hexToSignature = exports.hexToCompactSignature = exports.compactSignatureToSignature = exports.hashTypedData = exports.hashDomain = exports.getTransactionType = exports.getSerializedTransactionType = exports.getCreateAddress = exports.getCreate2Address = exports.getContractAddress = exports.getAbiItem = exports.rpcTransactionType = exports.formatTransactionRequest = exports.defineTransactionRequest = exports.formatTransactionReceipt = exports.defineTransactionReceipt = exports.transactionType = exports.formatTransaction = exports.defineTransaction = exports.encodeFunctionResult = exports.encodeFunctionData = exports.encodeEventTopics = exports.encodeErrorResult = exports.encodeDeployData = exports.encodeAbiParameters = void 0;
9
- exports.serializeTransaction = exports.serializeAccessList = exports.parseUnits = exports.parseTransaction = exports.parseGwei = exports.parseEther = exports.padHex = exports.padBytes = exports.pad = exports.keccak256 = exports.isHex = exports.isHash = exports.isBytes = exports.isAddressEqual = exports.isAddress = exports.hashMessage = exports.getFunctionSignature = exports.getFunctionSelector = exports.getEventSignature = exports.getEventSelector = exports.getContractError = exports.getAddress = exports.checksumAddress = exports.fromRlp = exports.hexToString = exports.hexToNumber = exports.hexToBool = exports.hexToBigInt = exports.fromHex = exports.formatUnits = exports.formatGwei = exports.formatEther = exports.encodePacked = exports.getChainContractAddress = exports.extractChain = exports.defineChain = exports.assertCurrentChain = exports.concatHex = exports.concatBytes = exports.concat = exports.offchainLookupSignature = exports.offchainLookupAbiItem = exports.offchainLookup = exports.ccipFetch = exports.fromBytes = exports.bytesToString = exports.bytesToNumber = exports.bytesToBool = exports.bytesToBigInt = exports.toHex = void 0;
10
- exports.getTypesForEIP712Domain = exports.domainSeparator = exports.validateTypedData = exports.trim = exports.stringify = exports.sliceHex = exports.sliceBytes = exports.slice = exports.size = void 0;
9
+ exports.parseGwei = exports.parseEther = exports.padHex = exports.padBytes = exports.pad = exports.ripemd160 = exports.sha256 = exports.keccak256 = exports.isHex = exports.isHash = exports.isBytes = exports.isAddressEqual = exports.isAddress = exports.hashMessage = exports.getFunctionSignature = exports.getFunctionSelector = exports.getEventSignature = exports.getEventSelector = exports.getContractError = exports.getAddress = exports.checksumAddress = exports.fromRlp = exports.hexToString = exports.hexToNumber = exports.hexToBool = exports.hexToBigInt = exports.fromHex = exports.formatUnits = exports.formatGwei = exports.formatEther = exports.withTimeout = exports.withRetry = exports.encodePacked = exports.getChainContractAddress = exports.extractChain = exports.defineChain = exports.assertCurrentChain = exports.concatHex = exports.concatBytes = exports.concat = exports.offchainLookupSignature = exports.offchainLookupAbiItem = exports.offchainLookup = exports.ccipFetch = exports.fromBytes = exports.bytesToString = exports.bytesToNumber = exports.bytesToBool = exports.bytesToBigInt = exports.toHex = void 0;
10
+ exports.getTypesForEIP712Domain = exports.domainSeparator = exports.validateTypedData = exports.trim = exports.stringify = exports.sliceHex = exports.sliceBytes = exports.slice = exports.size = exports.serializeTransaction = exports.serializeAccessList = exports.parseUnits = exports.parseTransaction = void 0;
11
11
  var abitype_1 = require("abitype");
12
12
  Object.defineProperty(exports, "CircularReferenceError", { enumerable: true, get: function () { return abitype_1.CircularReferenceError; } });
13
13
  Object.defineProperty(exports, "InvalidAbiParameterError", { enumerable: true, get: function () { return abitype_1.InvalidAbiParameterError; } });
@@ -412,6 +412,10 @@ var getChainContractAddress_js_1 = require("./utils/chain/getChainContractAddres
412
412
  Object.defineProperty(exports, "getChainContractAddress", { enumerable: true, get: function () { return getChainContractAddress_js_1.getChainContractAddress; } });
413
413
  var encodePacked_js_1 = require("./utils/abi/encodePacked.js");
414
414
  Object.defineProperty(exports, "encodePacked", { enumerable: true, get: function () { return encodePacked_js_1.encodePacked; } });
415
+ var withRetry_js_1 = require("./utils/promise/withRetry.js");
416
+ Object.defineProperty(exports, "withRetry", { enumerable: true, get: function () { return withRetry_js_1.withRetry; } });
417
+ var withTimeout_js_1 = require("./utils/promise/withTimeout.js");
418
+ Object.defineProperty(exports, "withTimeout", { enumerable: true, get: function () { return withTimeout_js_1.withTimeout; } });
415
419
  var formatEther_js_1 = require("./utils/unit/formatEther.js");
416
420
  Object.defineProperty(exports, "formatEther", { enumerable: true, get: function () { return formatEther_js_1.formatEther; } });
417
421
  var formatGwei_js_1 = require("./utils/unit/formatGwei.js");
@@ -453,6 +457,10 @@ var isHex_js_1 = require("./utils/data/isHex.js");
453
457
  Object.defineProperty(exports, "isHex", { enumerable: true, get: function () { return isHex_js_1.isHex; } });
454
458
  var keccak256_js_1 = require("./utils/hash/keccak256.js");
455
459
  Object.defineProperty(exports, "keccak256", { enumerable: true, get: function () { return keccak256_js_1.keccak256; } });
460
+ var sha256_js_1 = require("./utils/hash/sha256.js");
461
+ Object.defineProperty(exports, "sha256", { enumerable: true, get: function () { return sha256_js_1.sha256; } });
462
+ var ripemd160_js_1 = require("./utils/hash/ripemd160.js");
463
+ Object.defineProperty(exports, "ripemd160", { enumerable: true, get: function () { return ripemd160_js_1.ripemd160; } });
456
464
  var pad_js_1 = require("./utils/data/pad.js");
457
465
  Object.defineProperty(exports, "pad", { enumerable: true, get: function () { return pad_js_1.pad; } });
458
466
  Object.defineProperty(exports, "padBytes", { enumerable: true, get: function () { return pad_js_1.padBytes; } });