viem 2.18.7 → 2.19.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (652) hide show
  1. package/CHANGELOG.md +42 -0
  2. package/README.md +1 -1
  3. package/_cjs/account-abstraction/errors/bundler.js +36 -216
  4. package/_cjs/account-abstraction/errors/bundler.js.map +1 -1
  5. package/_cjs/account-abstraction/errors/userOperation.js +5 -26
  6. package/_cjs/account-abstraction/errors/userOperation.js.map +1 -1
  7. package/_cjs/accounts/index.js +3 -1
  8. package/_cjs/accounts/index.js.map +1 -1
  9. package/_cjs/accounts/privateKeyToAccount.js +4 -0
  10. package/_cjs/accounts/privateKeyToAccount.js.map +1 -1
  11. package/_cjs/accounts/toAccount.js +1 -0
  12. package/_cjs/accounts/toAccount.js.map +1 -1
  13. package/_cjs/accounts/utils/signAuthorization.js +22 -0
  14. package/_cjs/accounts/utils/signAuthorization.js.map +1 -0
  15. package/_cjs/actions/public/estimateGas.js +48 -10
  16. package/_cjs/actions/public/estimateGas.js.map +1 -1
  17. package/_cjs/actions/public/simulateContract.js.map +1 -1
  18. package/_cjs/actions/wallet/prepareTransactionRequest.js.map +1 -1
  19. package/_cjs/actions/wallet/sendTransaction.js +21 -3
  20. package/_cjs/actions/wallet/sendTransaction.js.map +1 -1
  21. package/_cjs/actions/wallet/writeContract.js.map +1 -1
  22. package/_cjs/chains/definitions/abstractTestnet.js +26 -0
  23. package/_cjs/chains/definitions/abstractTestnet.js.map +1 -0
  24. package/_cjs/chains/definitions/b3Sepolia.js +28 -0
  25. package/_cjs/chains/definitions/b3Sepolia.js.map +1 -0
  26. package/_cjs/chains/definitions/{zkSync.js → zksync.js} +6 -5
  27. package/_cjs/chains/definitions/{zkSync.js.map → zksync.js.map} +1 -1
  28. package/_cjs/chains/definitions/{zkSyncInMemoryNode.js → zksyncInMemoryNode.js} +4 -4
  29. package/_cjs/chains/definitions/{zkSyncInMemoryNode.js.map → zksyncInMemoryNode.js.map} +1 -1
  30. package/_cjs/chains/definitions/{zkSyncLocalNode.js → zksyncLocalNode.js} +4 -4
  31. package/_cjs/chains/definitions/{zkSyncLocalNode.js.map → zksyncLocalNode.js.map} +1 -1
  32. package/_cjs/chains/definitions/{zkSyncSepoliaTestnet.js → zksyncSepoliaTestnet.js} +7 -5
  33. package/_cjs/chains/definitions/zksyncSepoliaTestnet.js.map +1 -0
  34. package/_cjs/chains/index.js +23 -17
  35. package/_cjs/chains/index.js.map +1 -1
  36. package/_cjs/errors/abi.js +32 -163
  37. package/_cjs/errors/abi.js.map +1 -1
  38. package/_cjs/errors/account.js +2 -12
  39. package/_cjs/errors/account.js.map +1 -1
  40. package/_cjs/errors/address.js +1 -6
  41. package/_cjs/errors/address.js.map +1 -1
  42. package/_cjs/errors/base.js +29 -18
  43. package/_cjs/errors/base.js.map +1 -1
  44. package/_cjs/errors/blob.js +4 -25
  45. package/_cjs/errors/blob.js.map +1 -1
  46. package/_cjs/errors/block.js +1 -7
  47. package/_cjs/errors/block.js.map +1 -1
  48. package/_cjs/errors/ccip.js +3 -18
  49. package/_cjs/errors/ccip.js.map +1 -1
  50. package/_cjs/errors/chain.js +7 -31
  51. package/_cjs/errors/chain.js.map +1 -1
  52. package/_cjs/errors/contract.js +6 -37
  53. package/_cjs/errors/contract.js.map +1 -1
  54. package/_cjs/errors/cursor.js +4 -20
  55. package/_cjs/errors/cursor.js.map +1 -1
  56. package/_cjs/errors/data.js +3 -21
  57. package/_cjs/errors/data.js.map +1 -1
  58. package/_cjs/errors/eip712.js +1 -6
  59. package/_cjs/errors/eip712.js.map +1 -1
  60. package/_cjs/errors/encoding.js +6 -34
  61. package/_cjs/errors/encoding.js.map +1 -1
  62. package/_cjs/errors/ens.js +5 -26
  63. package/_cjs/errors/ens.js.map +1 -1
  64. package/_cjs/errors/estimateGas.js +1 -6
  65. package/_cjs/errors/estimateGas.js.map +1 -1
  66. package/_cjs/errors/fee.js +5 -19
  67. package/_cjs/errors/fee.js.map +1 -1
  68. package/_cjs/errors/log.js +2 -6
  69. package/_cjs/errors/log.js.map +1 -1
  70. package/_cjs/errors/node.js +12 -75
  71. package/_cjs/errors/node.js.map +1 -1
  72. package/_cjs/errors/request.js +5 -30
  73. package/_cjs/errors/request.js.map +1 -1
  74. package/_cjs/errors/rpc.js +22 -122
  75. package/_cjs/errors/rpc.js.map +1 -1
  76. package/_cjs/errors/siwe.js +1 -7
  77. package/_cjs/errors/siwe.js.map +1 -1
  78. package/_cjs/errors/stateOverride.js +4 -12
  79. package/_cjs/errors/stateOverride.js.map +1 -1
  80. package/_cjs/errors/transaction.js +15 -63
  81. package/_cjs/errors/transaction.js.map +1 -1
  82. package/_cjs/errors/transport.js +1 -0
  83. package/_cjs/errors/transport.js.map +1 -1
  84. package/_cjs/errors/utils.js +1 -4
  85. package/_cjs/errors/utils.js.map +1 -1
  86. package/_cjs/errors/version.js +1 -1
  87. package/_cjs/experimental/eip5792/decorators/eip5792.js +2 -2
  88. package/_cjs/experimental/eip5792/decorators/eip5792.js.map +1 -1
  89. package/_cjs/experimental/eip7702/actions/signAuthorization.js +41 -0
  90. package/_cjs/experimental/eip7702/actions/signAuthorization.js.map +1 -0
  91. package/_cjs/experimental/eip7702/decorators/eip7702.js +12 -0
  92. package/_cjs/experimental/eip7702/decorators/eip7702.js.map +1 -0
  93. package/_cjs/experimental/eip7702/types/authorization.js +3 -0
  94. package/_cjs/experimental/eip7702/types/authorization.js.map +1 -0
  95. package/_cjs/experimental/eip7702/types/rpc.js +3 -0
  96. package/_cjs/experimental/eip7702/types/rpc.js.map +1 -0
  97. package/_cjs/experimental/eip7702/utils/hashAuthorization.js +23 -0
  98. package/_cjs/experimental/eip7702/utils/hashAuthorization.js.map +1 -0
  99. package/_cjs/experimental/eip7702/utils/recoverAuthorizationAddress.js +13 -0
  100. package/_cjs/experimental/eip7702/utils/recoverAuthorizationAddress.js.map +1 -0
  101. package/_cjs/experimental/eip7702/utils/serializeAuthorizationList.js +21 -0
  102. package/_cjs/experimental/eip7702/utils/serializeAuthorizationList.js.map +1 -0
  103. package/_cjs/experimental/eip7702/utils/verifyAuthorization.js +13 -0
  104. package/_cjs/experimental/eip7702/utils/verifyAuthorization.js.map +1 -0
  105. package/_cjs/experimental/erc7715/decorators/erc7715.js +2 -2
  106. package/_cjs/experimental/erc7715/decorators/erc7715.js.map +1 -1
  107. package/_cjs/experimental/index.js +22 -8
  108. package/_cjs/experimental/index.js.map +1 -1
  109. package/_cjs/index.js +7 -6
  110. package/_cjs/index.js.map +1 -1
  111. package/_cjs/op-stack/errors/withdrawal.js +2 -14
  112. package/_cjs/op-stack/errors/withdrawal.js.map +1 -1
  113. package/_cjs/utils/formatters/transaction.js +19 -0
  114. package/_cjs/utils/formatters/transaction.js.map +1 -1
  115. package/_cjs/utils/formatters/transactionRequest.js +19 -0
  116. package/_cjs/utils/formatters/transactionRequest.js.map +1 -1
  117. package/_cjs/utils/transaction/assertTransaction.js +15 -3
  118. package/_cjs/utils/transaction/assertTransaction.js.map +1 -1
  119. package/_cjs/utils/transaction/getSerializedTransactionType.js +2 -0
  120. package/_cjs/utils/transaction/getSerializedTransactionType.js.map +1 -1
  121. package/_cjs/utils/transaction/getTransactionType.js +2 -0
  122. package/_cjs/utils/transaction/getTransactionType.js.map +1 -1
  123. package/_cjs/utils/transaction/parseTransaction.js +70 -0
  124. package/_cjs/utils/transaction/parseTransaction.js.map +1 -1
  125. package/_cjs/utils/transaction/serializeTransaction.js +25 -0
  126. package/_cjs/utils/transaction/serializeTransaction.js.map +1 -1
  127. package/_cjs/zksync/chains.js +9 -7
  128. package/_cjs/zksync/chains.js.map +1 -1
  129. package/_cjs/zksync/errors/bytecode.js +3 -21
  130. package/_cjs/zksync/errors/bytecode.js.map +1 -1
  131. package/_cjs/zksync/errors/token-is-eth.js +1 -7
  132. package/_cjs/zksync/errors/token-is-eth.js.map +1 -1
  133. package/_cjs/zksync/errors/transaction.js +1 -7
  134. package/_cjs/zksync/errors/transaction.js.map +1 -1
  135. package/_cjs/zksync/index.js +9 -4
  136. package/_cjs/zksync/index.js.map +1 -1
  137. package/_cjs/zksync/utils/getEip712Domain.js +1 -1
  138. package/_cjs/zksync/utils/isEip712Transaction.js.map +1 -1
  139. package/_esm/account-abstraction/errors/bundler.js +36 -216
  140. package/_esm/account-abstraction/errors/bundler.js.map +1 -1
  141. package/_esm/account-abstraction/errors/userOperation.js +5 -26
  142. package/_esm/account-abstraction/errors/userOperation.js.map +1 -1
  143. package/_esm/accounts/index.js +1 -0
  144. package/_esm/accounts/index.js.map +1 -1
  145. package/_esm/accounts/privateKeyToAccount.js +4 -0
  146. package/_esm/accounts/privateKeyToAccount.js.map +1 -1
  147. package/_esm/accounts/toAccount.js +1 -0
  148. package/_esm/accounts/toAccount.js.map +1 -1
  149. package/_esm/accounts/utils/signAuthorization.js +22 -0
  150. package/_esm/accounts/utils/signAuthorization.js.map +1 -0
  151. package/_esm/actions/public/estimateGas.js +55 -10
  152. package/_esm/actions/public/estimateGas.js.map +1 -1
  153. package/_esm/actions/public/simulateContract.js.map +1 -1
  154. package/_esm/actions/wallet/prepareTransactionRequest.js.map +1 -1
  155. package/_esm/actions/wallet/sendTransaction.js +25 -3
  156. package/_esm/actions/wallet/sendTransaction.js.map +1 -1
  157. package/_esm/actions/wallet/writeContract.js.map +1 -1
  158. package/_esm/chains/definitions/abstractTestnet.js +23 -0
  159. package/_esm/chains/definitions/abstractTestnet.js.map +1 -0
  160. package/_esm/chains/definitions/b3Sepolia.js +25 -0
  161. package/_esm/chains/definitions/b3Sepolia.js.map +1 -0
  162. package/_esm/chains/definitions/{zkSync.js → zksync.js} +5 -4
  163. package/_esm/chains/definitions/{zkSync.js.map → zksync.js.map} +1 -1
  164. package/_esm/chains/definitions/{zkSyncInMemoryNode.js → zksyncInMemoryNode.js} +3 -3
  165. package/_esm/chains/definitions/{zkSyncInMemoryNode.js.map → zksyncInMemoryNode.js.map} +1 -1
  166. package/_esm/chains/definitions/{zkSyncLocalNode.js → zksyncLocalNode.js} +3 -3
  167. package/_esm/chains/definitions/{zkSyncLocalNode.js.map → zksyncLocalNode.js.map} +1 -1
  168. package/_esm/chains/definitions/{zkSyncSepoliaTestnet.js → zksyncSepoliaTestnet.js} +6 -4
  169. package/_esm/chains/definitions/{zkSyncSepoliaTestnet.js.map → zksyncSepoliaTestnet.js.map} +1 -1
  170. package/_esm/chains/index.js +14 -5
  171. package/_esm/chains/index.js.map +1 -1
  172. package/_esm/errors/abi.js +32 -163
  173. package/_esm/errors/abi.js.map +1 -1
  174. package/_esm/errors/account.js +2 -12
  175. package/_esm/errors/account.js.map +1 -1
  176. package/_esm/errors/address.js +1 -6
  177. package/_esm/errors/address.js.map +1 -1
  178. package/_esm/errors/base.js +27 -17
  179. package/_esm/errors/base.js.map +1 -1
  180. package/_esm/errors/blob.js +4 -25
  181. package/_esm/errors/blob.js.map +1 -1
  182. package/_esm/errors/block.js +1 -7
  183. package/_esm/errors/block.js.map +1 -1
  184. package/_esm/errors/ccip.js +3 -18
  185. package/_esm/errors/ccip.js.map +1 -1
  186. package/_esm/errors/chain.js +7 -31
  187. package/_esm/errors/chain.js.map +1 -1
  188. package/_esm/errors/contract.js +6 -37
  189. package/_esm/errors/contract.js.map +1 -1
  190. package/_esm/errors/cursor.js +4 -20
  191. package/_esm/errors/cursor.js.map +1 -1
  192. package/_esm/errors/data.js +3 -21
  193. package/_esm/errors/data.js.map +1 -1
  194. package/_esm/errors/eip712.js +1 -6
  195. package/_esm/errors/eip712.js.map +1 -1
  196. package/_esm/errors/encoding.js +6 -34
  197. package/_esm/errors/encoding.js.map +1 -1
  198. package/_esm/errors/ens.js +5 -26
  199. package/_esm/errors/ens.js.map +1 -1
  200. package/_esm/errors/estimateGas.js +1 -6
  201. package/_esm/errors/estimateGas.js.map +1 -1
  202. package/_esm/errors/fee.js +5 -19
  203. package/_esm/errors/fee.js.map +1 -1
  204. package/_esm/errors/log.js +2 -6
  205. package/_esm/errors/log.js.map +1 -1
  206. package/_esm/errors/node.js +12 -75
  207. package/_esm/errors/node.js.map +1 -1
  208. package/_esm/errors/request.js +5 -30
  209. package/_esm/errors/request.js.map +1 -1
  210. package/_esm/errors/rpc.js +22 -122
  211. package/_esm/errors/rpc.js.map +1 -1
  212. package/_esm/errors/siwe.js +1 -7
  213. package/_esm/errors/siwe.js.map +1 -1
  214. package/_esm/errors/stateOverride.js +4 -12
  215. package/_esm/errors/stateOverride.js.map +1 -1
  216. package/_esm/errors/transaction.js +15 -63
  217. package/_esm/errors/transaction.js.map +1 -1
  218. package/_esm/errors/transport.js +1 -0
  219. package/_esm/errors/transport.js.map +1 -1
  220. package/_esm/errors/utils.js +0 -2
  221. package/_esm/errors/utils.js.map +1 -1
  222. package/_esm/errors/version.js +1 -1
  223. package/_esm/experimental/eip5792/decorators/eip5792.js +3 -3
  224. package/_esm/experimental/eip5792/decorators/eip5792.js.map +1 -1
  225. package/_esm/experimental/eip7702/actions/signAuthorization.js +80 -0
  226. package/_esm/experimental/eip7702/actions/signAuthorization.js.map +1 -0
  227. package/_esm/experimental/eip7702/decorators/eip7702.js +24 -0
  228. package/_esm/experimental/eip7702/decorators/eip7702.js.map +1 -0
  229. package/_esm/experimental/eip7702/types/authorization.js +2 -0
  230. package/_esm/experimental/eip7702/types/authorization.js.map +1 -0
  231. package/_esm/experimental/eip7702/types/rpc.js +2 -0
  232. package/_esm/experimental/eip7702/types/rpc.js.map +1 -0
  233. package/_esm/experimental/eip7702/utils/hashAuthorization.js +23 -0
  234. package/_esm/experimental/eip7702/utils/hashAuthorization.js.map +1 -0
  235. package/_esm/experimental/eip7702/utils/recoverAuthorizationAddress.js +10 -0
  236. package/_esm/experimental/eip7702/utils/recoverAuthorizationAddress.js.map +1 -0
  237. package/_esm/experimental/eip7702/utils/serializeAuthorizationList.js +21 -0
  238. package/_esm/experimental/eip7702/utils/serializeAuthorizationList.js.map +1 -0
  239. package/_esm/experimental/eip7702/utils/verifyAuthorization.js +18 -0
  240. package/_esm/experimental/eip7702/utils/verifyAuthorization.js.map +1 -0
  241. package/_esm/experimental/erc7715/decorators/erc7715.js +3 -3
  242. package/_esm/experimental/erc7715/decorators/erc7715.js.map +1 -1
  243. package/_esm/experimental/index.js +16 -4
  244. package/_esm/experimental/index.js.map +1 -1
  245. package/_esm/index.js +1 -1
  246. package/_esm/index.js.map +1 -1
  247. package/_esm/op-stack/errors/withdrawal.js +2 -14
  248. package/_esm/op-stack/errors/withdrawal.js.map +1 -1
  249. package/_esm/utils/formatters/transaction.js +20 -0
  250. package/_esm/utils/formatters/transaction.js.map +1 -1
  251. package/_esm/utils/formatters/transactionRequest.js +20 -0
  252. package/_esm/utils/formatters/transactionRequest.js.map +1 -1
  253. package/_esm/utils/transaction/assertTransaction.js +14 -3
  254. package/_esm/utils/transaction/assertTransaction.js.map +1 -1
  255. package/_esm/utils/transaction/getSerializedTransactionType.js +2 -0
  256. package/_esm/utils/transaction/getSerializedTransactionType.js.map +1 -1
  257. package/_esm/utils/transaction/getTransactionType.js +2 -0
  258. package/_esm/utils/transaction/getTransactionType.js.map +1 -1
  259. package/_esm/utils/transaction/parseTransaction.js +71 -1
  260. package/_esm/utils/transaction/parseTransaction.js.map +1 -1
  261. package/_esm/utils/transaction/serializeTransaction.js +26 -1
  262. package/_esm/utils/transaction/serializeTransaction.js.map +1 -1
  263. package/_esm/zksync/actions/deployContract.js +1 -1
  264. package/_esm/zksync/actions/sendEip712Transaction.js +4 -4
  265. package/_esm/zksync/actions/sendTransaction.js +4 -4
  266. package/_esm/zksync/actions/signEip712Transaction.js +4 -4
  267. package/_esm/zksync/actions/signTransaction.js +4 -4
  268. package/_esm/zksync/chains.js +4 -3
  269. package/_esm/zksync/chains.js.map +1 -1
  270. package/_esm/zksync/errors/bytecode.js +3 -21
  271. package/_esm/zksync/errors/bytecode.js.map +1 -1
  272. package/_esm/zksync/errors/token-is-eth.js +1 -7
  273. package/_esm/zksync/errors/token-is-eth.js.map +1 -1
  274. package/_esm/zksync/errors/transaction.js +1 -7
  275. package/_esm/zksync/errors/transaction.js.map +1 -1
  276. package/_esm/zksync/index.js +9 -1
  277. package/_esm/zksync/index.js.map +1 -1
  278. package/_esm/zksync/utils/getEip712Domain.js +1 -1
  279. package/_esm/zksync/utils/isEip712Transaction.js.map +1 -1
  280. package/_types/account-abstraction/errors/bundler.d.ts +0 -36
  281. package/_types/account-abstraction/errors/bundler.d.ts.map +1 -1
  282. package/_types/account-abstraction/errors/userOperation.d.ts +0 -4
  283. package/_types/account-abstraction/errors/userOperation.d.ts.map +1 -1
  284. package/_types/accounts/index.d.ts +1 -0
  285. package/_types/accounts/index.d.ts.map +1 -1
  286. package/_types/accounts/privateKeyToAccount.d.ts.map +1 -1
  287. package/_types/accounts/toAccount.d.ts.map +1 -1
  288. package/_types/accounts/types.d.ts +7 -3
  289. package/_types/accounts/types.d.ts.map +1 -1
  290. package/_types/accounts/utils/signAuthorization.d.ts +20 -0
  291. package/_types/accounts/utils/signAuthorization.d.ts.map +1 -0
  292. package/_types/actions/public/estimateGas.d.ts +2 -1
  293. package/_types/actions/public/estimateGas.d.ts.map +1 -1
  294. package/_types/actions/public/simulateContract.d.ts +18 -6
  295. package/_types/actions/public/simulateContract.d.ts.map +1 -1
  296. package/_types/actions/wallet/prepareTransactionRequest.d.ts +2 -2
  297. package/_types/actions/wallet/prepareTransactionRequest.d.ts.map +1 -1
  298. package/_types/actions/wallet/sendTransaction.d.ts +2 -1
  299. package/_types/actions/wallet/sendTransaction.d.ts.map +1 -1
  300. package/_types/actions/wallet/writeContract.d.ts +3 -2
  301. package/_types/actions/wallet/writeContract.d.ts.map +1 -1
  302. package/_types/celo/chainConfig.d.ts +144 -20
  303. package/_types/celo/chainConfig.d.ts.map +1 -1
  304. package/_types/celo/formatters.d.ts +72 -10
  305. package/_types/celo/formatters.d.ts.map +1 -1
  306. package/_types/celo/serializers.d.ts +1 -1
  307. package/_types/celo/serializers.d.ts.map +1 -1
  308. package/_types/chains/definitions/{zkSyncTestnet.d.ts → abstractTestnet.d.ts} +81 -27
  309. package/_types/chains/definitions/{zkSyncLocalNode.d.ts.map → abstractTestnet.d.ts.map} +1 -1
  310. package/_types/chains/definitions/ancient8.d.ts +32 -0
  311. package/_types/chains/definitions/ancient8.d.ts.map +1 -1
  312. package/_types/chains/definitions/ancient8Sepolia.d.ts +32 -0
  313. package/_types/chains/definitions/ancient8Sepolia.d.ts.map +1 -1
  314. package/_types/chains/definitions/b3Sepolia.d.ts +35 -0
  315. package/_types/chains/definitions/b3Sepolia.d.ts.map +1 -0
  316. package/_types/chains/definitions/base.d.ts +32 -0
  317. package/_types/chains/definitions/base.d.ts.map +1 -1
  318. package/_types/chains/definitions/baseGoerli.d.ts +32 -0
  319. package/_types/chains/definitions/baseGoerli.d.ts.map +1 -1
  320. package/_types/chains/definitions/baseSepolia.d.ts +32 -0
  321. package/_types/chains/definitions/baseSepolia.d.ts.map +1 -1
  322. package/_types/chains/definitions/celo.d.ts +144 -20
  323. package/_types/chains/definitions/celo.d.ts.map +1 -1
  324. package/_types/chains/definitions/celoAlfajores.d.ts +144 -20
  325. package/_types/chains/definitions/celoAlfajores.d.ts.map +1 -1
  326. package/_types/chains/definitions/dchain.d.ts +32 -0
  327. package/_types/chains/definitions/dchain.d.ts.map +1 -1
  328. package/_types/chains/definitions/dchainTestnet.d.ts +32 -0
  329. package/_types/chains/definitions/dchainTestnet.d.ts.map +1 -1
  330. package/_types/chains/definitions/fraxtal.d.ts +32 -0
  331. package/_types/chains/definitions/fraxtal.d.ts.map +1 -1
  332. package/_types/chains/definitions/fraxtalTestnet.d.ts +32 -0
  333. package/_types/chains/definitions/fraxtalTestnet.d.ts.map +1 -1
  334. package/_types/chains/definitions/funkiMainnet.d.ts +32 -0
  335. package/_types/chains/definitions/funkiMainnet.d.ts.map +1 -1
  336. package/_types/chains/definitions/funkiSepolia.d.ts +32 -0
  337. package/_types/chains/definitions/funkiSepolia.d.ts.map +1 -1
  338. package/_types/chains/definitions/lisk.d.ts +32 -0
  339. package/_types/chains/definitions/lisk.d.ts.map +1 -1
  340. package/_types/chains/definitions/liskSepolia.d.ts +32 -0
  341. package/_types/chains/definitions/liskSepolia.d.ts.map +1 -1
  342. package/_types/chains/definitions/metalL2.d.ts +32 -0
  343. package/_types/chains/definitions/metalL2.d.ts.map +1 -1
  344. package/_types/chains/definitions/modeTestnet.d.ts +32 -0
  345. package/_types/chains/definitions/modeTestnet.d.ts.map +1 -1
  346. package/_types/chains/definitions/optimism.d.ts +32 -0
  347. package/_types/chains/definitions/optimism.d.ts.map +1 -1
  348. package/_types/chains/definitions/optimismGoerli.d.ts +32 -0
  349. package/_types/chains/definitions/optimismGoerli.d.ts.map +1 -1
  350. package/_types/chains/definitions/optimismSepolia.d.ts +32 -0
  351. package/_types/chains/definitions/optimismSepolia.d.ts.map +1 -1
  352. package/_types/chains/definitions/pgn.d.ts +32 -0
  353. package/_types/chains/definitions/pgn.d.ts.map +1 -1
  354. package/_types/chains/definitions/pgnTestnet.d.ts +32 -0
  355. package/_types/chains/definitions/pgnTestnet.d.ts.map +1 -1
  356. package/_types/chains/definitions/playfiAlbireo.d.ts +64 -10
  357. package/_types/chains/definitions/playfiAlbireo.d.ts.map +1 -1
  358. package/_types/chains/definitions/rss3.d.ts +32 -0
  359. package/_types/chains/definitions/rss3.d.ts.map +1 -1
  360. package/_types/chains/definitions/rss3Sepolia.d.ts +32 -0
  361. package/_types/chains/definitions/rss3Sepolia.d.ts.map +1 -1
  362. package/_types/chains/definitions/{zkSync.d.ts → zksync.d.ts} +69 -14
  363. package/_types/chains/definitions/{zkSync.d.ts.map → zksync.d.ts.map} +1 -1
  364. package/_types/chains/definitions/{zkSyncInMemoryNode.d.ts → zksyncInMemoryNode.d.ts} +67 -13
  365. package/_types/chains/definitions/{zkSyncInMemoryNode.d.ts.map → zksyncInMemoryNode.d.ts.map} +1 -1
  366. package/_types/chains/definitions/{zkSyncLocalNode.d.ts → zksyncLocalNode.d.ts} +67 -13
  367. package/_types/chains/definitions/{zkSyncTestnet.d.ts.map → zksyncLocalNode.d.ts.map} +1 -1
  368. package/_types/chains/definitions/{zkSyncSepoliaTestnet.d.ts → zksyncSepoliaTestnet.d.ts} +70 -14
  369. package/_types/chains/definitions/{zkSyncSepoliaTestnet.d.ts.map → zksyncSepoliaTestnet.d.ts.map} +1 -1
  370. package/_types/chains/definitions/zora.d.ts +32 -0
  371. package/_types/chains/definitions/zora.d.ts.map +1 -1
  372. package/_types/chains/definitions/zoraSepolia.d.ts +32 -0
  373. package/_types/chains/definitions/zoraSepolia.d.ts.map +1 -1
  374. package/_types/chains/definitions/zoraTestnet.d.ts +32 -0
  375. package/_types/chains/definitions/zoraTestnet.d.ts.map +1 -1
  376. package/_types/chains/index.d.ts +79 -10
  377. package/_types/chains/index.d.ts.map +1 -1
  378. package/_types/errors/abi.d.ts +0 -26
  379. package/_types/errors/abi.d.ts.map +1 -1
  380. package/_types/errors/account.d.ts +0 -2
  381. package/_types/errors/account.d.ts.map +1 -1
  382. package/_types/errors/address.d.ts +0 -1
  383. package/_types/errors/address.d.ts.map +1 -1
  384. package/_types/errors/base.d.ts +7 -1
  385. package/_types/errors/base.d.ts.map +1 -1
  386. package/_types/errors/blob.d.ts +0 -4
  387. package/_types/errors/blob.d.ts.map +1 -1
  388. package/_types/errors/block.d.ts +0 -1
  389. package/_types/errors/block.d.ts.map +1 -1
  390. package/_types/errors/ccip.d.ts +0 -3
  391. package/_types/errors/ccip.d.ts.map +1 -1
  392. package/_types/errors/chain.d.ts +0 -5
  393. package/_types/errors/chain.d.ts.map +1 -1
  394. package/_types/errors/contract.d.ts +0 -6
  395. package/_types/errors/contract.d.ts.map +1 -1
  396. package/_types/errors/cursor.d.ts +0 -3
  397. package/_types/errors/cursor.d.ts.map +1 -1
  398. package/_types/errors/data.d.ts +0 -3
  399. package/_types/errors/data.d.ts.map +1 -1
  400. package/_types/errors/eip712.d.ts +0 -1
  401. package/_types/errors/eip712.d.ts.map +1 -1
  402. package/_types/errors/encoding.d.ts +0 -5
  403. package/_types/errors/encoding.d.ts.map +1 -1
  404. package/_types/errors/ens.d.ts +0 -4
  405. package/_types/errors/ens.d.ts.map +1 -1
  406. package/_types/errors/estimateGas.d.ts +0 -1
  407. package/_types/errors/estimateGas.d.ts.map +1 -1
  408. package/_types/errors/fee.d.ts +0 -3
  409. package/_types/errors/fee.d.ts.map +1 -1
  410. package/_types/errors/log.d.ts +0 -1
  411. package/_types/errors/log.d.ts.map +1 -1
  412. package/_types/errors/node.d.ts +0 -12
  413. package/_types/errors/node.d.ts.map +1 -1
  414. package/_types/errors/request.d.ts +0 -5
  415. package/_types/errors/request.d.ts.map +1 -1
  416. package/_types/errors/rpc.d.ts +2 -22
  417. package/_types/errors/rpc.d.ts.map +1 -1
  418. package/_types/errors/siwe.d.ts +0 -1
  419. package/_types/errors/siwe.d.ts.map +1 -1
  420. package/_types/errors/stateOverride.d.ts +0 -2
  421. package/_types/errors/stateOverride.d.ts.map +1 -1
  422. package/_types/errors/transaction.d.ts +0 -10
  423. package/_types/errors/transaction.d.ts.map +1 -1
  424. package/_types/errors/transport.d.ts.map +1 -1
  425. package/_types/errors/utils.d.ts +0 -1
  426. package/_types/errors/utils.d.ts.map +1 -1
  427. package/_types/errors/version.d.ts +1 -1
  428. package/_types/experimental/eip5792/decorators/eip5792.d.ts +12 -12
  429. package/_types/experimental/eip5792/decorators/eip5792.d.ts.map +1 -1
  430. package/_types/experimental/eip7702/actions/signAuthorization.d.ts +59 -0
  431. package/_types/experimental/eip7702/actions/signAuthorization.d.ts.map +1 -0
  432. package/_types/experimental/eip7702/decorators/eip7702.d.ts +69 -0
  433. package/_types/experimental/eip7702/decorators/eip7702.d.ts.map +1 -0
  434. package/_types/experimental/eip7702/types/authorization.d.ts +24 -0
  435. package/_types/experimental/eip7702/types/authorization.d.ts.map +1 -0
  436. package/_types/experimental/eip7702/types/rpc.d.ts +12 -0
  437. package/_types/experimental/eip7702/types/rpc.d.ts.map +1 -0
  438. package/_types/experimental/eip7702/utils/hashAuthorization.d.ts +21 -0
  439. package/_types/experimental/eip7702/utils/hashAuthorization.d.ts.map +1 -0
  440. package/_types/experimental/eip7702/utils/recoverAuthorizationAddress.d.ts +26 -0
  441. package/_types/experimental/eip7702/utils/recoverAuthorizationAddress.d.ts.map +1 -0
  442. package/_types/experimental/eip7702/utils/serializeAuthorizationList.d.ts +6 -0
  443. package/_types/experimental/eip7702/utils/serializeAuthorizationList.d.ts.map +1 -0
  444. package/_types/experimental/eip7702/utils/verifyAuthorization.d.ts +21 -0
  445. package/_types/experimental/eip7702/utils/verifyAuthorization.d.ts.map +1 -0
  446. package/_types/experimental/erc7715/decorators/erc7715.d.ts +6 -6
  447. package/_types/experimental/erc7715/decorators/erc7715.d.ts.map +1 -1
  448. package/_types/experimental/index.d.ts +20 -4
  449. package/_types/experimental/index.d.ts.map +1 -1
  450. package/_types/index.d.ts +3 -3
  451. package/_types/index.d.ts.map +1 -1
  452. package/_types/op-stack/chainConfig.d.ts +32 -0
  453. package/_types/op-stack/chainConfig.d.ts.map +1 -1
  454. package/_types/op-stack/errors/withdrawal.d.ts +0 -2
  455. package/_types/op-stack/errors/withdrawal.d.ts.map +1 -1
  456. package/_types/op-stack/formatters.d.ts +32 -0
  457. package/_types/op-stack/formatters.d.ts.map +1 -1
  458. package/_types/op-stack/serializers.d.ts +1 -1
  459. package/_types/op-stack/serializers.d.ts.map +1 -1
  460. package/_types/types/rpc.d.ts +9 -4
  461. package/_types/types/rpc.d.ts.map +1 -1
  462. package/_types/types/transaction.d.ts +50 -36
  463. package/_types/types/transaction.d.ts.map +1 -1
  464. package/_types/types/utils.d.ts +0 -14
  465. package/_types/types/utils.d.ts.map +1 -1
  466. package/_types/utils/formatters/transaction.d.ts +2 -1
  467. package/_types/utils/formatters/transaction.d.ts.map +1 -1
  468. package/_types/utils/formatters/transactionRequest.d.ts +2 -1
  469. package/_types/utils/formatters/transactionRequest.d.ts.map +1 -1
  470. package/_types/utils/index.d.ts +1 -1
  471. package/_types/utils/index.d.ts.map +1 -1
  472. package/_types/utils/signature/hashMessage.d.ts +2 -2
  473. package/_types/utils/signature/hashMessage.d.ts.map +1 -1
  474. package/_types/utils/transaction/assertTransaction.d.ts +3 -1
  475. package/_types/utils/transaction/assertTransaction.d.ts.map +1 -1
  476. package/_types/utils/transaction/getSerializedTransactionType.d.ts +2 -2
  477. package/_types/utils/transaction/getSerializedTransactionType.d.ts.map +1 -1
  478. package/_types/utils/transaction/getTransactionType.d.ts +12 -5
  479. package/_types/utils/transaction/getTransactionType.d.ts.map +1 -1
  480. package/_types/utils/transaction/parseTransaction.d.ts +6 -4
  481. package/_types/utils/transaction/parseTransaction.d.ts.map +1 -1
  482. package/_types/utils/transaction/serializeTransaction.d.ts +4 -2
  483. package/_types/utils/transaction/serializeTransaction.d.ts.map +1 -1
  484. package/_types/zksync/actions/deployContract.d.ts +1 -1
  485. package/_types/zksync/actions/estimateFee.d.ts +4 -4
  486. package/_types/zksync/actions/estimateGasL1ToL2.d.ts +2 -2
  487. package/_types/zksync/actions/getAllBalances.d.ts +2 -2
  488. package/_types/zksync/actions/getBaseTokenL1Address.d.ts +2 -2
  489. package/_types/zksync/actions/getBlockDetails.d.ts +5 -5
  490. package/_types/zksync/actions/getBridgehubContractAddress.d.ts +2 -2
  491. package/_types/zksync/actions/getDefaultBridgeAddresses.d.ts +2 -2
  492. package/_types/zksync/actions/getL1BatchBlockRange.d.ts +2 -2
  493. package/_types/zksync/actions/getL1BatchDetails.d.ts +5 -5
  494. package/_types/zksync/actions/getL1BatchNumber.d.ts +2 -2
  495. package/_types/zksync/actions/getL1ChainId.d.ts +2 -2
  496. package/_types/zksync/actions/getLogProof.d.ts +2 -2
  497. package/_types/zksync/actions/getMainContractAddress.d.ts +2 -2
  498. package/_types/zksync/actions/getRawBlockTransactions.d.ts +6 -6
  499. package/_types/zksync/actions/getTestnetPaymasterAddress.d.ts +2 -2
  500. package/_types/zksync/actions/getTransactionDetails.d.ts +4 -4
  501. package/_types/zksync/actions/sendEip712Transaction.d.ts +4 -4
  502. package/_types/zksync/actions/sendTransaction.d.ts +4 -4
  503. package/_types/zksync/actions/signEip712Transaction.d.ts +4 -4
  504. package/_types/zksync/actions/signTransaction.d.ts +4 -4
  505. package/_types/zksync/chainConfig.d.ts +65 -11
  506. package/_types/zksync/chainConfig.d.ts.map +1 -1
  507. package/_types/zksync/chains.d.ts +4 -3
  508. package/_types/zksync/chains.d.ts.map +1 -1
  509. package/_types/zksync/decorators/eip712.d.ts +13 -13
  510. package/_types/zksync/decorators/publicL2.d.ts +37 -37
  511. package/_types/zksync/errors/bytecode.d.ts +0 -3
  512. package/_types/zksync/errors/bytecode.d.ts.map +1 -1
  513. package/_types/zksync/errors/token-is-eth.d.ts +0 -1
  514. package/_types/zksync/errors/token-is-eth.d.ts.map +1 -1
  515. package/_types/zksync/errors/transaction.d.ts +0 -1
  516. package/_types/zksync/errors/transaction.d.ts.map +1 -1
  517. package/_types/zksync/formatters.d.ts +75 -21
  518. package/_types/zksync/formatters.d.ts.map +1 -1
  519. package/_types/zksync/index.d.ts +77 -7
  520. package/_types/zksync/index.d.ts.map +1 -1
  521. package/_types/zksync/serializers.d.ts +2 -2
  522. package/_types/zksync/serializers.d.ts.map +1 -1
  523. package/_types/zksync/types/block.d.ts +6 -6
  524. package/_types/zksync/types/chain.d.ts +2 -2
  525. package/_types/zksync/types/eip1193.d.ts +8 -8
  526. package/_types/zksync/types/eip712.d.ts +3 -3
  527. package/_types/zksync/types/fee.d.ts +2 -2
  528. package/_types/zksync/types/log.d.ts +4 -4
  529. package/_types/zksync/types/transaction.d.ts +31 -31
  530. package/_types/zksync/utils/assertEip712Request.d.ts +2 -2
  531. package/_types/zksync/utils/assertEip712Transaction.d.ts +2 -2
  532. package/_types/zksync/utils/getEip712Domain.d.ts +2 -2
  533. package/_types/zksync/utils/isEip712Transaction.d.ts +3 -3
  534. package/_types/zksync/utils/isEip712Transaction.d.ts.map +1 -1
  535. package/account-abstraction/errors/bundler.ts +36 -48
  536. package/account-abstraction/errors/userOperation.ts +6 -6
  537. package/accounts/index.ts +6 -0
  538. package/accounts/privateKeyToAccount.ts +4 -0
  539. package/accounts/toAccount.ts +1 -0
  540. package/accounts/types.ts +11 -3
  541. package/accounts/utils/signAuthorization.ts +63 -0
  542. package/actions/public/estimateGas.ts +74 -11
  543. package/actions/public/simulateContract.ts +48 -14
  544. package/actions/wallet/prepareTransactionRequest.ts +3 -1
  545. package/actions/wallet/sendTransaction.ts +33 -4
  546. package/actions/wallet/writeContract.ts +5 -3
  547. package/chains/definitions/abstractTestnet.ts +23 -0
  548. package/chains/definitions/b3Sepolia.ts +26 -0
  549. package/chains/definitions/{zkSync.ts → zksync.ts} +4 -3
  550. package/chains/definitions/{zkSyncInMemoryNode.ts → zksyncInMemoryNode.ts} +2 -2
  551. package/chains/definitions/{zkSyncLocalNode.ts → zksyncLocalNode.ts} +2 -2
  552. package/chains/definitions/{zkSyncSepoliaTestnet.ts → zksyncSepoliaTestnet.ts} +5 -3
  553. package/chains/index.ts +115 -34
  554. package/errors/abi.ts +37 -37
  555. package/errors/account.ts +2 -2
  556. package/errors/address.ts +1 -1
  557. package/errors/base.ts +41 -22
  558. package/errors/blob.ts +4 -5
  559. package/errors/block.ts +1 -2
  560. package/errors/ccip.ts +3 -3
  561. package/errors/chain.ts +9 -10
  562. package/errors/contract.ts +6 -10
  563. package/errors/cursor.ts +5 -4
  564. package/errors/data.ts +3 -3
  565. package/errors/eip712.ts +1 -1
  566. package/errors/encoding.ts +7 -5
  567. package/errors/ens.ts +6 -5
  568. package/errors/estimateGas.ts +1 -2
  569. package/errors/fee.ts +7 -5
  570. package/errors/log.ts +3 -2
  571. package/errors/node.ts +12 -17
  572. package/errors/request.ts +5 -10
  573. package/errors/rpc.ts +29 -26
  574. package/errors/siwe.ts +1 -2
  575. package/errors/stateOverride.ts +6 -4
  576. package/errors/transaction.ts +19 -19
  577. package/errors/transport.ts +1 -0
  578. package/errors/utils.ts +0 -3
  579. package/errors/version.ts +1 -1
  580. package/experimental/eip5792/decorators/eip5792.ts +13 -13
  581. package/experimental/eip7702/actions/signAuthorization.ts +136 -0
  582. package/experimental/eip7702/decorators/eip7702.ts +86 -0
  583. package/experimental/eip7702/types/authorization.ts +30 -0
  584. package/experimental/eip7702/types/rpc.ts +12 -0
  585. package/experimental/eip7702/utils/hashAuthorization.ts +60 -0
  586. package/experimental/eip7702/utils/recoverAuthorizationAddress.ts +61 -0
  587. package/experimental/eip7702/utils/serializeAuthorizationList.ts +33 -0
  588. package/experimental/eip7702/utils/verifyAuthorization.ts +52 -0
  589. package/experimental/erc7715/decorators/erc7715.ts +7 -7
  590. package/experimental/index.ts +72 -18
  591. package/index.ts +29 -4
  592. package/op-stack/errors/withdrawal.ts +2 -3
  593. package/package.json +1 -1
  594. package/types/rpc.ts +21 -1
  595. package/types/transaction.ts +103 -54
  596. package/types/utils.ts +0 -15
  597. package/utils/formatters/transaction.ts +32 -0
  598. package/utils/formatters/transactionRequest.ts +31 -0
  599. package/utils/index.ts +1 -1
  600. package/utils/signature/hashMessage.ts +2 -2
  601. package/utils/transaction/assertTransaction.ts +24 -12
  602. package/utils/transaction/getSerializedTransactionType.ts +7 -0
  603. package/utils/transaction/getTransactionType.ts +95 -60
  604. package/utils/transaction/parseTransaction.ts +127 -0
  605. package/utils/transaction/serializeTransaction.ts +66 -0
  606. package/zksync/actions/deployContract.ts +1 -1
  607. package/zksync/actions/estimateFee.ts +4 -4
  608. package/zksync/actions/estimateGasL1ToL2.ts +2 -2
  609. package/zksync/actions/getAllBalances.ts +2 -2
  610. package/zksync/actions/getBaseTokenL1Address.ts +2 -2
  611. package/zksync/actions/getBlockDetails.ts +6 -6
  612. package/zksync/actions/getBridgehubContractAddress.ts +2 -2
  613. package/zksync/actions/getDefaultBridgeAddresses.ts +2 -2
  614. package/zksync/actions/getL1BatchBlockRange.ts +2 -2
  615. package/zksync/actions/getL1BatchDetails.ts +6 -6
  616. package/zksync/actions/getL1BatchNumber.ts +2 -2
  617. package/zksync/actions/getL1ChainId.ts +2 -2
  618. package/zksync/actions/getLogProof.ts +2 -2
  619. package/zksync/actions/getMainContractAddress.ts +2 -2
  620. package/zksync/actions/getRawBlockTransactions.ts +6 -6
  621. package/zksync/actions/getTestnetPaymasterAddress.ts +2 -2
  622. package/zksync/actions/getTransactionDetails.ts +4 -4
  623. package/zksync/actions/sendEip712Transaction.ts +4 -4
  624. package/zksync/actions/sendTransaction.ts +4 -4
  625. package/zksync/actions/signEip712Transaction.ts +4 -4
  626. package/zksync/actions/signTransaction.ts +4 -4
  627. package/zksync/chains.ts +4 -3
  628. package/zksync/decorators/eip712.ts +13 -13
  629. package/zksync/decorators/publicL2.ts +37 -37
  630. package/zksync/errors/bytecode.ts +3 -3
  631. package/zksync/errors/token-is-eth.ts +1 -2
  632. package/zksync/errors/transaction.ts +1 -2
  633. package/zksync/formatters.ts +22 -22
  634. package/zksync/index.ts +111 -32
  635. package/zksync/serializers.ts +7 -7
  636. package/zksync/types/block.ts +9 -9
  637. package/zksync/types/chain.ts +5 -5
  638. package/zksync/types/eip1193.ts +8 -8
  639. package/zksync/types/eip712.ts +3 -3
  640. package/zksync/types/fee.ts +2 -2
  641. package/zksync/types/log.ts +4 -4
  642. package/zksync/types/transaction.ts +45 -45
  643. package/zksync/utils/assertEip712Request.ts +2 -2
  644. package/zksync/utils/assertEip712Transaction.ts +4 -4
  645. package/zksync/utils/getEip712Domain.ts +9 -9
  646. package/zksync/utils/isEip712Transaction.ts +8 -3
  647. package/_cjs/chains/definitions/zkSyncSepoliaTestnet.js.map +0 -1
  648. package/_cjs/chains/definitions/zkSyncTestnet.js +0 -31
  649. package/_cjs/chains/definitions/zkSyncTestnet.js.map +0 -1
  650. package/_esm/chains/definitions/zkSyncTestnet.js +0 -29
  651. package/_esm/chains/definitions/zkSyncTestnet.js.map +0 -1
  652. package/chains/definitions/zkSyncTestnet.ts +0 -29
@@ -1 +1 @@
1
- {"version":3,"file":"userOperation.js","sourceRoot":"","sources":["../../../account-abstraction/errors/userOperation.ts"],"names":[],"mappings":";;;AAAA,kDAAgD;AAChD,gEAAyD;AAEzD,mDAAiD;AAMjD,MAAa,2BAA4B,SAAQ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2EAA2E,CACrH,CAAA;QAJM;;;;mBAAO,mCAAmC;WAAA;IAKnD,CAAC;CACF;AAPD,8EAOC;AAKD,MAAa,0BAA2B,SAAQ,mBAAS;IAEvD,YAAY,EAAE,IAAI,EAAkB;QAClC,KAAK,CAAC,6BAA6B,IAAI,uBAAuB,CAAC,CAAA;QAFxD;;;;mBAAO,4BAA4B;WAAA;IAG5C,CAAC;CACF;AALD,gEAKC;AAMD,MAAa,uCAAwC,SAAQ,mBAAS;IAEpE,YAAY,EAAE,IAAI,EAAkB;QAClC,KAAK,CACH,yDAAyD,IAAI,oBAAoB,CAClF,CAAA;QAJM;;;;mBAAO,yCAAyC;WAAA;IAKzD,CAAC;CACF;AAPD,0FAOC"}
1
+ {"version":3,"file":"userOperation.js","sourceRoot":"","sources":["../../../account-abstraction/errors/userOperation.ts"],"names":[],"mappings":";;;AAAA,kDAAgD;AAChD,gEAAyD;AAEzD,mDAAiD;AAMjD,MAAa,2BAA4B,SAAQ,mBAAS;IAGxD,YACE,KAAgB,EAChB,EACE,QAAQ,EACR,YAAY,EACZ,QAAQ,EACR,OAAO,EACP,WAAW,EACX,QAAQ,EACR,YAAY,EACZ,oBAAoB,EACpB,KAAK,EACL,SAAS,EACT,gBAAgB,EAChB,aAAa,EACb,uBAAuB,EACvB,6BAA6B,EAC7B,kBAAkB,EAClB,MAAM,EACN,SAAS,EACT,oBAAoB,GAGrB;QAED,MAAM,UAAU,GAAG,IAAA,4BAAW,EAAC;YAC7B,QAAQ;YACR,YAAY;YACZ,OAAO;YACP,WAAW;YACX,QAAQ;YACR,YAAY,EACV,OAAO,YAAY,KAAK,WAAW;gBACnC,GAAG,IAAA,qBAAU,EAAC,YAAY,CAAC,OAAO;YACpC,oBAAoB,EAClB,OAAO,oBAAoB,KAAK,WAAW;gBAC3C,GAAG,IAAA,qBAAU,EAAC,oBAAoB,CAAC,OAAO;YAC5C,KAAK;YACL,SAAS;YACT,gBAAgB;YAChB,aAAa;YACb,uBAAuB;YACvB,6BAA6B;YAC7B,kBAAkB;YAClB,MAAM;YACN,SAAS;YACT,oBAAoB;SACrB,CAAC,CAAA;QAEF,KAAK,CAAC,KAAK,CAAC,YAAY,EAAE;YACxB,KAAK;YACL,QAAQ;YACR,YAAY,EAAE;gBACZ,GAAG,CAAC,KAAK,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,GAAG,KAAK,CAAC,YAAY,EAAE,GAAG,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;gBAC3D,oBAAoB;gBACpB,UAAU;aACX,CAAC,MAAM,CAAC,OAAO,CAAa;YAC7B,IAAI,EAAE,6BAA6B;SACpC,CAAC,CAAA;QA5DK;;;;;WAAgB;QA6DvB,IAAI,CAAC,KAAK,GAAG,KAAK,CAAA;IACpB,CAAC;CACF;AAhED,kEAgEC;AAMD,MAAa,iCAAkC,SAAQ,mBAAS;IAC9D,YAAY,EAAE,IAAI,EAAkB;QAClC,KAAK,CACH,qCAAqC,IAAI,2EAA2E,EACpH,EAAE,IAAI,EAAE,mCAAmC,EAAE,CAC9C,CAAA;IACH,CAAC;CACF;AAPD,8EAOC;AAKD,MAAa,0BAA2B,SAAQ,mBAAS;IACvD,YAAY,EAAE,IAAI,EAAkB;QAClC,KAAK,CAAC,6BAA6B,IAAI,uBAAuB,EAAE;YAC9D,IAAI,EAAE,4BAA4B;SACnC,CAAC,CAAA;IACJ,CAAC;CACF;AAND,gEAMC;AAMD,MAAa,uCAAwC,SAAQ,mBAAS;IACpE,YAAY,EAAE,IAAI,EAAkB;QAClC,KAAK,CACH,yDAAyD,IAAI,oBAAoB,EACjF,EAAE,IAAI,EAAE,yCAAyC,EAAE,CACpD,CAAA;IACH,CAAC;CACF;AAPD,0FAOC"}
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.nonceManager = exports.createNonceManager = exports.privateKeyToAddress = exports.publicKeyToAddress = exports.parseAccount = exports.signTypedData = exports.signTransaction = exports.signMessage = exports.serializeSignature = exports.signatureToHex = exports.sign = exports.toAccount = exports.privateKeyToAccount = exports.mnemonicToAccount = exports.hdKeyToAccount = exports.generatePrivateKey = exports.generateMnemonic = exports.traditionalChinese = exports.spanish = exports.simplifiedChinese = exports.korean = exports.japanese = exports.italian = exports.french = exports.english = exports.czech = exports.HDKey = void 0;
3
+ exports.nonceManager = exports.createNonceManager = exports.privateKeyToAddress = exports.publicKeyToAddress = exports.parseAccount = exports.signTypedData = exports.signTransaction = exports.signMessage = exports.experimental_signAuthorization = exports.serializeSignature = exports.signatureToHex = exports.sign = exports.toAccount = exports.privateKeyToAccount = exports.mnemonicToAccount = exports.hdKeyToAccount = exports.generatePrivateKey = exports.generateMnemonic = exports.traditionalChinese = exports.spanish = exports.simplifiedChinese = exports.korean = exports.japanese = exports.italian = exports.french = exports.english = exports.czech = exports.HDKey = void 0;
4
4
  var bip32_1 = require("@scure/bip32");
5
5
  Object.defineProperty(exports, "HDKey", { enumerable: true, get: function () { return bip32_1.HDKey; } });
6
6
  var czech_1 = require("@scure/bip39/wordlists/czech");
@@ -38,6 +38,8 @@ Object.defineProperty(exports, "sign", { enumerable: true, get: function () { re
38
38
  var serializeSignature_js_1 = require("../utils/signature/serializeSignature.js");
39
39
  Object.defineProperty(exports, "signatureToHex", { enumerable: true, get: function () { return serializeSignature_js_1.serializeSignature; } });
40
40
  Object.defineProperty(exports, "serializeSignature", { enumerable: true, get: function () { return serializeSignature_js_1.serializeSignature; } });
41
+ var signAuthorization_js_1 = require("./utils/signAuthorization.js");
42
+ Object.defineProperty(exports, "experimental_signAuthorization", { enumerable: true, get: function () { return signAuthorization_js_1.experimental_signAuthorization; } });
41
43
  var signMessage_js_1 = require("./utils/signMessage.js");
42
44
  Object.defineProperty(exports, "signMessage", { enumerable: true, get: function () { return signMessage_js_1.signMessage; } });
43
45
  var signTransaction_js_1 = require("./utils/signTransaction.js");
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../accounts/index.ts"],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
  const publicKeyToAddress_js_1 = require("./utils/publicKeyToAddress.js");
8
8
  const sign_js_1 = require("./utils/sign.js");
9
+ const signAuthorization_js_1 = require("./utils/signAuthorization.js");
9
10
  const signMessage_js_1 = require("./utils/signMessage.js");
10
11
  const signTransaction_js_1 = require("./utils/signTransaction.js");
11
12
  const signTypedData_js_1 = require("./utils/signTypedData.js");
@@ -19,6 +20,9 @@ function privateKeyToAccount(privateKey, options = {}) {
19
20
  async sign({ hash }) {
20
21
  return (0, sign_js_1.sign)({ hash, privateKey, to: 'hex' });
21
22
  },
23
+ async experimental_signAuthorization(authorization) {
24
+ return (0, signAuthorization_js_1.experimental_signAuthorization)({ ...authorization, privateKey });
25
+ },
22
26
  async signMessage({ message }) {
23
27
  return (0, signMessage_js_1.signMessage)({ message, privateKey });
24
28
  },
@@ -1 +1 @@
1
- {"version":3,"file":"privateKeyToAccount.js","sourceRoot":"","sources":["../../accounts/privateKeyToAccount.ts"],"names":[],"mappings":";;AA2CA,kDA8BC;AAzED,uDAAmD;AAGnD,yDAAuE;AAIvE,iDAAmE;AAEnE,yEAGsC;AACtC,6CAA0D;AAC1D,2DAA+E;AAC/E,mEAGmC;AACnC,+DAGiC;AAqBjC,SAAgB,mBAAmB,CACjC,UAAe,EACf,UAAsC,EAAE;IAExC,MAAM,EAAE,YAAY,EAAE,GAAG,OAAO,CAAA;IAChC,MAAM,SAAS,GAAG,IAAA,gBAAK,EAAC,qBAAS,CAAC,YAAY,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,KAAK,CAAC,CAAC,CAAA;IAC3E,MAAM,OAAO,GAAG,IAAA,0CAAkB,EAAC,SAAS,CAAC,CAAA;IAE7C,MAAM,OAAO,GAAG,IAAA,wBAAS,EAAC;QACxB,OAAO;QACP,YAAY;QACZ,KAAK,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE;YACjB,OAAO,IAAA,cAAI,EAAC,EAAE,IAAI,EAAE,UAAU,EAAE,EAAE,EAAE,KAA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AAO,IAAA,cAAI,EAAC,EAAE,IAAI,EAAE,UAAU,EAAE,EAAE,EAAE,KAAK,EAAE,CAAC,CAAA;QAC9C,CAAC;QACD,KAAK,CAAC,8BAA8B,CAAC,aAAa;YAChD,OAAO,IAAA,qDAA8B,EAAC,EAAE,GAAG,aAAa,EAAE,UAAU,EAAE,CAAC,CAAA;QACzE,CAAC;QACD,KAAK,CAAC,WAAW,CAAC,EAAE,OAAO,EAAE;YAC3B,OAAO,IAAA,4BAAW,EAAC,EAAE,OAAO,EAAE,UAAU,EAAE,CAAC,CAAA;QAC7C,CAAC;QACD,KAAK,CAAC,eAAe,CAAC,WAAW,EAAE,EAAE,UAAU,EAAE,GAAG,EAAE;YACpD,OAAO,IAAA,oCAAe,EAAC,EAAE,UAAU,EAAE,WAAW,EAAE,UAAU,EAAE,CAAC,CAAA;QACjE,CAAC;QACD,KAAK,CAAC,aAAa,CAAC,SAAS;YAC3B,OAAO,IAAA,gCAAa,EAAC,EAAE,GAAG,SAAS,EAAE,UAAU,EAAE,CAAC,CAAA;QACpD,CAAC;KACF,CAAC,CAAA;IAEF,OAAO;QACL,GAAG,OAAO;QACV,SAAS;QACT,MAAM,EAAE,YAAY;KACA,CAAA;AACxB,CAAC"}
@@ -18,6 +18,7 @@ function toAccount(source) {
18
18
  address: source.address,
19
19
  nonceManager: source.nonceManager,
20
20
  sign: source.sign,
21
+ experimental_signAuthorization: source.experimental_signAuthorization,
21
22
  signMessage: source.signMessage,
22
23
  signTransaction: source.signTransaction,
23
24
  signTypedData: source.signTypedData,
@@ -1 +1 @@
1
- {"version":3,"file":"toAccount.js","sourceRoot":"","sources":["../../accounts/toAccount.ts"],"names":[],"mappings":";;AAmCA,8BAwBC;AAvDD,qDAG6B;AAC7B,gEAGsC;AAwBtC,SAAgB,SAAS,CACvB,MAAqB;IAErB,IAAI,OAAO,MAAM,KAAK,QAAQ,EAAE,CAAC;QAC/B,IAAI,CAAC,IAAA,wBAAS,EAAC,MAAM,EAAE,EAAE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MAAM,IAAI,gCAAmB,CAAC,EAAE,OAAO,EAAE,MAAM,CAAC,OAAO,EAAE,CAAC,CAAA;IAC5D,OAAO;QACL,OAAO,EAAE,MAAM,CAAC,OAAO;QACvB,YAAY,EAAE,MAAM,CAAC,YAAY;QACjC,IAAI,EAAE,MAAM,CAAC,IAAI;QACjB,8BAA8B,EAAE,MAAM,CAAC,8BAA8B;QACrE,WAAW,EAAE,MAAM,CAAC,WAAW;QAC/B,eAAe,EAAE,MAAM,CAAC,eAAe;QACvC,aAAa,EAAE,MAAM,CAAC,aAAa;QACnC,MAAM,EAAE,QAAQ;QAChB,IAAI,EAAE,OAAO;KACyB,CAAA;AAC1C,CAAC"}
@@ -0,0 +1,22 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.experimental_signAuthorization = experimental_signAuthorization;
4
+ const hashAuthorization_js_1 = require("../../experimental/eip7702/utils/hashAuthorization.js");
5
+ const sign_js_1 = require("./sign.js");
6
+ async function experimental_signAuthorization(parameters) {
7
+ const { contractAddress, chainId, nonce, privateKey, to = 'object', } = parameters;
8
+ const signature = await (0, sign_js_1.sign)({
9
+ hash: (0, hashAuthorization_js_1.hashAuthorization)({ contractAddress, chainId, nonce }),
10
+ privateKey,
11
+ to,
12
+ });
13
+ if (to === 'object')
14
+ return {
15
+ contractAddress,
16
+ chainId,
17
+ nonce,
18
+ ...signature,
19
+ };
20
+ return signature;
21
+ }
22
+ //# sourceMappingURL=signAuthorization.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"signAuthorization.js","sourceRoot":"","sources":["../../../accounts/utils/signAuthorization.ts"],"names":[],"mappings":";;AAuCA,wEAuBC;AAzDD,gGAG8D;AAG9D,uCAKkB;AAuBX,KAAK,UAAU,8BAA8B,CAClD,UAA2C;IAE3C,MAAM,EACJ,eAAe,EACf,OAAO,EACP,KAAK,EACL,UAAU,EACV,EAAE,GAAG,QAAQ,GACd,GAAG,UAAU,CAAA;IACd,MAAM,SAAS,GAAG,MAAM,IAAA,cAAI,EAAC;QAC3B,IAAI,EAAE,IAAA,wCAAiB,EAAC,EAAE,eAAe,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC;QAC5D,UAAU;QACV,EAAE;KACH,CAAC,CAAA;IACF,IAAI,EAAE,KAAK,QAAQ;QACjB,OAAO;YACL,eAAe;YACf,OAAO;YACP,KAAK;YACL,GAAI,SAAuB;SACrB,CAAA;IACV,OAAO,SAAgB,CAAA;AACzB,CAAC"}
@@ -2,6 +2,8 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.estimateGas = estimateGas;
4
4
  const parseAccount_js_1 = require("../../accounts/utils/parseAccount.js");
5
+ const base_js_1 = require("../../errors/base.js");
6
+ const recoverAuthorizationAddress_js_1 = require("../../experimental/eip7702/utils/recoverAuthorizationAddress.js");
5
7
  const toHex_js_1 = require("../../utils/encoding/toHex.js");
6
8
  const getEstimateGasError_js_1 = require("../../utils/errors/getEstimateGasError.js");
7
9
  const extract_js_1 = require("../../utils/formatters/extract.js");
@@ -9,17 +11,29 @@ const transactionRequest_js_1 = require("../../utils/formatters/transactionReque
9
11
  const stateOverride_js_1 = require("../../utils/stateOverride.js");
10
12
  const assertRequest_js_1 = require("../../utils/transaction/assertRequest.js");
11
13
  const prepareTransactionRequest_js_1 = require("../wallet/prepareTransactionRequest.js");
14
+ const getBalance_js_1 = require("./getBalance.js");
12
15
  async function estimateGas(client, args) {
13
16
  const account_ = args.account ?? client.account;
14
17
  const account = account_ ? (0, parseAccount_js_1.parseAccount)(account_) : undefined;
15
18
  try {
16
- const { accessList, blobs, blobVersionedHashes, blockNumber, blockTag, data, gas, gasPrice, maxFeePerBlobGas, maxFeePerGas, maxPriorityFeePerGas, nonce, to, value, stateOverride, ...rest } = (await (0, prepareTransactionRequest_js_1.prepareTransactionRequest)(client, {
19
+ const { accessList, authorizationList, blobs, blobVersionedHashes, blockNumber, blockTag, data, gas, gasPrice, maxFeePerBlobGas, maxFeePerGas, maxPriorityFeePerGas, nonce, value, stateOverride, ...rest } = (await (0, prepareTransactionRequest_js_1.prepareTransactionRequest)(client, {
17
20
  ...args,
18
21
  parameters: account?.type === 'local' ? undefined : ['blobVersionedHashes'],
19
22
  }));
20
23
  const blockNumberHex = blockNumber ? (0, toHex_js_1.numberToHex)(blockNumber) : undefined;
21
24
  const block = blockNumberHex || blockTag;
22
25
  const rpcStateOverride = (0, stateOverride_js_1.serializeStateOverride)(stateOverride);
26
+ const to = await (async () => {
27
+ if (rest.to)
28
+ return rest.to;
29
+ if (authorizationList && authorizationList.length > 0)
30
+ return await (0, recoverAuthorizationAddress_js_1.recoverAuthorizationAddress)({
31
+ authorization: authorizationList[0],
32
+ }).catch(() => {
33
+ throw new base_js_1.BaseError('`to` is required. Could not infer from `authorizationList`');
34
+ });
35
+ return undefined;
36
+ })();
23
37
  (0, assertRequest_js_1.assertRequest)(args);
24
38
  const chainFormat = client.chain?.formatters?.transactionRequest?.format;
25
39
  const format = chainFormat || transactionRequest_js_1.formatTransactionRequest;
@@ -27,6 +41,7 @@ async function estimateGas(client, args) {
27
41
  ...(0, extract_js_1.extract)(rest, { format: chainFormat }),
28
42
  from: account?.address,
29
43
  accessList,
44
+ authorizationList,
30
45
  blobs,
31
46
  blobVersionedHashes,
32
47
  data,
@@ -39,15 +54,38 @@ async function estimateGas(client, args) {
39
54
  to,
40
55
  value,
41
56
  });
42
- const balance = await client.request({
43
- method: 'eth_estimateGas',
44
- params: rpcStateOverride
45
- ? [request, block ?? 'latest', rpcStateOverride]
46
- : block
47
- ? [request, block]
48
- : [request],
49
- });
50
- return BigInt(balance);
57
+ function estimateGas_rpc(parameters) {
58
+ const { block, request, rpcStateOverride } = parameters;
59
+ return client.request({
60
+ method: 'eth_estimateGas',
61
+ params: rpcStateOverride
62
+ ? [request, block ?? 'latest', rpcStateOverride]
63
+ : block
64
+ ? [request, block]
65
+ : [request],
66
+ });
67
+ }
68
+ let estimate = BigInt(await estimateGas_rpc({ block, request, rpcStateOverride }));
69
+ if (authorizationList) {
70
+ const value = await (0, getBalance_js_1.getBalance)(client, { address: request.from });
71
+ const estimates = await Promise.all(authorizationList.map(async (authorization) => {
72
+ const { contractAddress } = authorization;
73
+ const estimate = await estimateGas_rpc({
74
+ block,
75
+ request: {
76
+ authorizationList: undefined,
77
+ data,
78
+ from: account?.address,
79
+ to: contractAddress,
80
+ value: (0, toHex_js_1.numberToHex)(value),
81
+ },
82
+ rpcStateOverride,
83
+ }).catch(() => 100000n);
84
+ return 2n * BigInt(estimate);
85
+ }));
86
+ estimate += estimates.reduce((acc, curr) => acc + curr, 0n);
87
+ }
88
+ return estimate;
51
89
  }
52
90
  catch (err) {
53
91
  throw (0, getEstimateGasError_js_1.getEstimateGasError)(err, {
@@ -1 +1 @@
1
- {"version":3,"file":"estimateGas.js","sourceRoot":"","sources":["../../../actions/public/estimateGas.ts"],"names":[],"mappings":";;AAgGA,kCAgFC;AA9KD,0EAG6C;AAU7C,4DAGsC;AACtC,sFAGkD;AAClD,kEAA2D;AAC3D,wFAGqD;AACrD,mEAAqE;AACrE,+EAIiD;AACjD,yFAG+C;AA2DxC,KAAK,UAAU,WAAW,CAI/B,MAAyC,EACzC,IAAkC;IAElC,MAAM,QAAQ,GAAG,IAAI,CAAC,OAAO,IAAI,MAAM,CAAC,OAAO,CAAA;IAC/C,MAAM,OAAO,GAAG,QAAQ,CAAC,CAAC,CAAC,IAAA,8BAAY,EAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,SAAS,CAAA;IAE7D,IAAI,CAAC;QACH,MAAM,EACJ,UAAU,EACV,KAAK,EACL,mBAAmB,EACnB,WAAW,EACX,QAAQ,EACR,IAAI,EACJ,GAAG,EACH,QAAQ,EACR,gBAAgB,EAChB,YAAY,EACZ,oBAAoB,EACpB,KAAK,EACL,EAAE,EACF,KAAK,EACL,aAAa,EACb,GAAG,IAAI,EACR,GAAG,CAAC,MAAM,IAAA,wDAAyB,EAAC,MAAM,EAAE;YAC3C,GAAG,IAAI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ED,OAAO,QAAQ,CAAA;IACjB,CAAC;IAAC,OAAO,GAAG,EAAE,CAAC;QACb,MAAM,IAAA,4CAAmB,EAAC,GAAgB,EAAE;YAC1C,GAAG,IAAI;YACP,OAAO;YACP,KAAK,EAAE,MAAM,CAAC,KAAK;SACpB,CAAC,CAAA;IACJ,CAAC;AACH,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"simulateContract.js","sourceRoot":"","sources":["../../../actions/public/simulateContract.ts"],"names":[],"mappings":";;AA4LA,4CA4FC;AAtRD,0EAG6C;AAiB7C,qFAGgD;AAChD,iFAG8C;AAC9C,gFAG+C;AAG/C,2DAAoD;AACpD,uCAAyE;AAuJlE,KAAK,UAAU,gBAAgB,CAapC,MAAyC,EACzC,UAOC;IAYD,MAAM,EAAE,GAAG,EAAE,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE,YAAY,EAAE,GAAG,WAAW,EAAE,GACpE,UAAwC,CAAA;IAE1C,MAAM,OAAO,GAAG,WAAW,CAAC,OAAO;QACjC,CAAC,CAAC,IAAA,8BAAY,EAAC,WAAW,CAAC,OAAO,CAAC;QACnC,CAAC,CAAC,MAAM,CAAC,OAAO,CAAA;IAClB,MAAM,QAAQ,GAAG,IAAA,0CAAkB,EAAC,EAAE,GAAG,EAAE,IAAI,EAAE,YAAY,EAAE,CAAC,CAAA;IAChE,IAAI,CAAC;QACH,MAAM,EAAE,IAAI,EAAE,GAAG,MAAM,IAAA,wBAAS,EAC9B,MAAM,EACN,cAAI,EACJ,MAAM,CACP,CAAC;YACA,KAAK,EAAE,KAAK;YACZ,IAAI,EAAE,GAAG,QAAQ,GAAG,UAAU,CAAC,CAAC,CAAC,UAAU,CAAC,OAAO,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,EAAE,EAAE;YACpE,EAAE,EAAE,OAAO;YACX,GAAG,WAAW;YACd,OAAO;SACR,CAAC,CAAA;QACF,MAAM,MAAM,GAAG,IAAA,8CAAoB,EAAC;YAClC,GAAG;YACH,IAAI;YACJ,YAAY;YACZ,IAAI,EAAE,IAAI,IAAI,IAAI;SACnB,CAAC,CAAA;QACF,MAAM,YAAY,GAAG,GAAG,CAAC,MAAM,CAC7B,CAAC,OAAO,EAAE,EAAE,CACV,MAAM,IAAI,OAAO,IAAI,OAAO,CAAC,IAAI,KAAK,UAAU,CAAC,YAAY,CAChE,CAAA;QACD,OAAO;YACL,MAAM;YACN,OAAO,EAAE;gBACP,GAAG,EAAE,YAAY;gBACjB,OAAO;gBACP,IAAI;gBACJ,UAAU;gBACV,YAAY;gBACZ,GAAG,WAAW;gBACd,OAAO;aACR;SASF,CAAA;IACH,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,MAAM,IAAA,sCAAgB,EAAC,KAAkB,EAAE;YACzC,GAAG;YACH,OAAO;YACP,IAAI;YACJ,QAAQ,EAAE,iCAAiC;YAC3C,YAAY;YACZ,MAAM,EAAE,OAAO,EAAE,OAAO;SACzB,CAAC,CAAA;IACJ,CAAC;AACH,CAAC"}
1
+ {"version":3,"file":"simulateContract.js","sourceRoot":"","sources":["../../../actions/public/simulateContract.ts"],"names":[],"mappings":";;AA8NA,4CA4FC;AAxTD,0EAG6C;AAsB7C,qFAGgD;AAChD,iFAG8C;AAC9C,gFAG+C;AAI/C,2DAAoD;AACpD,uCAAyE;AAmLlE,KAAK,UAAU,gBAAgB,CAapC,MAAyC,EACzC,UAOC;IAYD,MAAM,EAAE,GAAG,EAAE,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE,YAAY,EAAE,GAAG,WAAW,EAAE,GACpE,UAAwC,CAAA;IAE1C,MAAM,OAAO,GAAG,WAAW,CAAC,OAAO;QACjC,CAAC,CAAC,IAAA,8BAAY,EAAC,WAAW,CAAC,OAAO,CAAC;QACnC,CAAC,CAAC,MAAM,CAAC,OAAO,CAAA;IAClB,MAAM,QAAQ,GAAG,IAAA,0CAAkB,EAAC,EAAE,GAAG,EAAE,IAAI,EAAE,YAAY,EAAE,CAAC,CAAA;IAChE,IAAI,CAAC;QACH,MAAM,EAAE,IAAI,EAAE,GAAG,MAAM,IAAA,wBAAS,EAC9B,MAAM,EACN,cAAI,EACJ,MAAM,CACP,CAAC;YACA,KAAK,EAAE,KAAK;YACZ,IAAI,EAAE,GAAG,QAAQ,GAAG,UAAU,CAAC,CAAC,CAAC,UAAU,CAAC,OAAO,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,EAAE,EAAE;YACpE,EAAE,EAAE,OAAO;YACX,GAAG,WAAW;YACd,OAAO;SACR,CAAC,CAAA;QACF,MAAM,MAAM,GAAG,IAAA,8CAAoB,EAAC;YAClC,GAAG;YACH,IAAI;YACJ,YAAY;YACZ,IAAI,EAAE,IAAI,IAAI,IAAI;SACnB,CAAC,CAAA;QACF,MAAM,YAAY,GAAG,GAAG,CAAC,MAAM,CAC7B,CAAC,OAAO,EAAE,EAAE,CACV,MAAM,IAAI,OAAO,IAAI,OAAO,CAAC,IAAI,KAAK,UAAU,CAAC,YAAY,CAChE,CAAA;QACD,OAAO;YACL,MAAM;YACN,OAAO,EAAE;gBACP,GAAG,EAAE,YAAY;gBACjB,OAAO;gBACP,IAAI;gBACJ,UAAU;gBACV,YAAY;gBACZ,GAAG,WAAW;gBACd,OAAO;aACR;SASF,CAAA;IACH,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,MAAM,IAAA,sCAAgB,EAAC,KAAkB,EAAE;YACzC,GAAG;YACH,OAAO;YACP,IAAI;YACJ,QAAQ,EAAE,iCAAiC;YAC3C,YAAY;YACZ,MAAM,EAAE,OAAO,EAAE,OAAO;SACzB,CAAC,CAAA;IACJ,CAAC;AACH,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"prepareTransactionRequest.js","sourceRoot":"","sources":["../../../actions/wallet/prepareTransactionRequest.ts"],"names":[],"mappings":";;;AAyNA,8DAgMC;AAvZD,0EAG6C;AAC7C,sFAGmD;AACnD,wEAI4C;AAC5C,kEAGyC;AAC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AAC,SAAS;SACW,CAAC,CAAA;IAE7B,IAAA,gCAAa,EAAC,OAAkC,CAAC,CAAA;IAEjD,OAAO,OAAO,CAAC,UAAU,CAAA;IAEzB,OAAO,OAAc,CAAA;AACvB,CAAC"}
1
+ {"version":3,"file":"prepareTransactionRequest.js","sourceRoot":"","sources":["../../../actions/wallet/prepareTransactionRequest.ts"],"names":[],"mappings":";;;AA2NA,8DAgMC;AAzZD,0EAG6C;AAC7C,sFAGmD;AACnD,wEAI4C;AAC5C,kEAGyC;AACzC,wFAGoD;AAIpD,gDAG4B;AAsB5B,kFAA2E;AAC3E,wEAAiE;AACjE,sGAA+F;AAC/F,0EAAmE;AAEnE,2DAAoD;AACpD,+EAIiD;AACjD,yFAGsD;AACtD,2DAAmE;AAEtD,QAAA,iBAAiB,GAAG;IAC/B,qBAAqB;IACrB,SAAS;IACT,MAAM;IACN,KAAK;IACL,OAAO;IACP,MAAM;CACE,CAAA;AAgJH,KAAK,UAAU,yBAAyB,CAO7C,MAAyC,EACzC,IAMC;IAUD,MAAM,EACJ,OAAO,EAAE,QAAQ,GAAG,MAAM,CAAC,OAAO,EAClC,KAAK,EACL,KAAK,EACL,GAAG,EACH,GAAG,EACH,KAAK,EACL,UAAU,GAAG,yBAAiB,EAC9B,IAAI,GACL,GAAG,IAAI,CAAA;IACR,MAAM,OAAO,GAAG,QAAQ,CAAC,CAAC,CAAC,IAAA,8BAAY,EAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,SAAS,CAAA;IAE7D,MAAM,OAAO,GAAG,EAAE,GAAG,IAAI,EAAE,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,CAAA;IAE3E,IAAI,KAAwB,CAAA;IAC5B,KAAK,UAAU,QAAQ;QACrB,IAAI,KAAK;YAAE,OAAO,KAAK,CAAA;QACvB,KAAK,GAAG,MAAM,IAAA,wBAAS,EACrB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ACH,CAAC;IAED,IAAI,UAAU,CAAC,QAAQ,CAAC,KAAK,CAAC,IAAI,OAAO,GAAG,KAAK,WAAW;QAC1D,OAAO,CAAC,GAAG,GAAG,MAAM,IAAA,wBAAS,EAC3B,MAAM,EACN,4BAAW,EACX,aAAa,CACd,CAAC;YACA,GAAG,OAAO;YACV,OAAO,EAAE,OAAO;gBACd,CAAC,CAAC,EAAE,OAAO,EAAE,OAAO,CAAC,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE;gBAChD,CAAC,CAAC,SAAS;SACW,CAAC,CAAA;IAE7B,IAAA,gCAAa,EAAC,OAAkC,CAAC,CAAA;IAEjD,OAAO,OAAO,CAAC,UAAU,CAAA;IAEzB,OAAO,OAAc,CAAA;AACvB,CAAC"}
@@ -3,6 +3,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.sendTransaction = sendTransaction;
4
4
  const parseAccount_js_1 = require("../../accounts/utils/parseAccount.js");
5
5
  const account_js_1 = require("../../errors/account.js");
6
+ const base_js_1 = require("../../errors/base.js");
7
+ const recoverAuthorizationAddress_js_1 = require("../../experimental/eip7702/utils/recoverAuthorizationAddress.js");
6
8
  const assertCurrentChain_js_1 = require("../../utils/chain/assertCurrentChain.js");
7
9
  const getTransactionError_js_1 = require("../../utils/errors/getTransactionError.js");
8
10
  const extract_js_1 = require("../../utils/formatters/extract.js");
@@ -13,7 +15,7 @@ const getChainId_js_1 = require("../public/getChainId.js");
13
15
  const prepareTransactionRequest_js_1 = require("./prepareTransactionRequest.js");
14
16
  const sendRawTransaction_js_1 = require("./sendRawTransaction.js");
15
17
  async function sendTransaction(client, parameters) {
16
- const { account: account_ = client.account, chain = client.chain, accessList, blobs, data, gas, gasPrice, maxFeePerBlobGas, maxFeePerGas, maxPriorityFeePerGas, nonce, to, value, ...rest } = parameters;
18
+ const { account: account_ = client.account, chain = client.chain, accessList, authorizationList, blobs, data, gas, gasPrice, maxFeePerBlobGas, maxFeePerGas, maxPriorityFeePerGas, nonce, value, ...rest } = parameters;
17
19
  if (!account_)
18
20
  throw new account_js_1.AccountNotFoundError({
19
21
  docsPath: '/docs/actions/wallet/sendTransaction',
@@ -29,12 +31,24 @@ async function sendTransaction(client, parameters) {
29
31
  chain,
30
32
  });
31
33
  }
34
+ const to = await (async () => {
35
+ if (parameters.to)
36
+ return parameters.to;
37
+ if (authorizationList && authorizationList.length > 0)
38
+ return await (0, recoverAuthorizationAddress_js_1.recoverAuthorizationAddress)({
39
+ authorization: authorizationList[0],
40
+ }).catch(() => {
41
+ throw new base_js_1.BaseError('`to` is required. Could not infer from `authorizationList`.');
42
+ });
43
+ return undefined;
44
+ })();
32
45
  if (account.type === 'json-rpc') {
33
46
  const chainFormat = client.chain?.formatters?.transactionRequest?.format;
34
47
  const format = chainFormat || transactionRequest_js_1.formatTransactionRequest;
35
48
  const request = format({
36
49
  ...(0, extract_js_1.extract)(rest, { format: chainFormat }),
37
50
  accessList,
51
+ authorizationList,
38
52
  blobs,
39
53
  chainId,
40
54
  data,
@@ -57,6 +71,7 @@ async function sendTransaction(client, parameters) {
57
71
  const request = await (0, getAction_js_1.getAction)(client, prepareTransactionRequest_js_1.prepareTransactionRequest, 'prepareTransactionRequest')({
58
72
  account,
59
73
  accessList,
74
+ authorizationList,
60
75
  blobs,
61
76
  chain,
62
77
  chainId,
@@ -68,9 +83,9 @@ async function sendTransaction(client, parameters) {
68
83
  maxPriorityFeePerGas,
69
84
  nonce,
70
85
  parameters: [...prepareTransactionRequest_js_1.defaultParameters, 'sidecars'],
71
- to,
72
86
  value,
73
87
  ...rest,
88
+ to,
74
89
  });
75
90
  const serializer = chain?.serializers?.transaction;
76
91
  const serializedTransaction = (await account.signTransaction(request, {
@@ -88,7 +103,10 @@ async function sendTransaction(client, parameters) {
88
103
  docsPath: '/docs/actions/bundler/sendUserOperation',
89
104
  type: 'smart',
90
105
  });
91
- throw new Error('incompatible account type.');
106
+ throw new account_js_1.AccountTypeNotSupportedError({
107
+ docsPath: '/docs/actions/wallet/sendTransaction',
108
+ type: account.type,
109
+ });
92
110
  }
93
111
  catch (err) {
94
112
  if (err instanceof account_js_1.AccountTypeNotSupportedError)
@@ -1 +1 @@
1
- {"version":3,"file":"sendTransaction.js","sourceRoot":"","sources":["../../../actions/wallet/sendTransaction.ts"],"names":[],"mappings":";;AAyIA,0CAkIC;AA1QD,0EAG6C;AAI7C,wDAKgC;AAWhC,mFAGgD;AAChD,sFAGkD;AAClD,kEAA2D;AAC3D,wFAGqD;AACrD,2DAAoD;AACpD,+EAIiD;AACjD,2DAA8E;AAC9E,iFAIuC;AACvC,mEAGgC;AAqFzB,KAAK,UAAU,eAAe,CAMnC,MAAyC,EACzC,UAA6E;IAE7E,MAAM,EACJ,OAAO,EAAE,QAAQ,GAAG,MAAM,CAAC,OAAO,EAClC,KAAK,GAAG,MAAM,CAAC,KAAK,EACpB,UAAU,EACV,KAAK,EACL,IAAI,EACJ,GAAG,EACH,QAAQ,EACR,gBAAgB,EAChB,YAAY,EACZ,oBAAoB,EACpB,KAAK,EACL,EAAE,EACF,KAAK,EACL,GAAG,IAAI,EACR,GAAG,UAAU,CAAA;IAEd,IAAI,CAAC,QAAQ;QACX,MAAM,IAAI,iCAAoB,CAAC;YAC7B,QAAQ,EAAE,sCAAsC;SACjD,CAAC,CAAA;IACJ,MAAM,OAAO,GAAG,IAAA,8BAAY,EAAC,QAAQ,CAAC,CAAA;IAEtC,IAAI,CAAC;QACH,IAAA,gCAAa,EAAC,UAAqC,CAAC,CAAA;QAEpD,IAAI,OAA2B,CAAA;QAC/B,IAAI,KAAK,KAAK,IAAI,EAAE,CAAC;YACnB,OAAO,GAAG,MAAM,IAAA,wBAAS,EAAC,MAAM,EAAE,0BAAU,EAAE,YAAY,CAAC,CAAC,EAAE,CAAC,CAAA;YAC/D,IAAA,0CAAkB,EAAC;gBACjB,cAAc,EAAE,OAAO;gBACvB,KAAK;aACN,CAAC,CAAA;QACJ,CAAC;QAED,IAAI,OAAO,CAAC,IAAI,KAAK,UA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AC,CAAS,CAAA;YACX,OAAO,MAAM,IAAA,wBAAS,EACpB,MAAM,EACN,0CAAkB,EAClB,oBAAoB,CACrB,CAAC;gBACA,qBAAqB;aACtB,CAAC,CAAA;QACJ,CAAC;QAED,IAAI,OAAO,CAAC,IAAI,KAAK,OAAO;YAC1B,MAAM,IAAI,yCAA4B,CAAC;gBACrC,YAAY,EAAE;oBACZ,wDAAwD;iBACzD;gBACD,QAAQ,EAAE,yCAAyC;gBACnD,IAAI,EAAE,OAAO;aACd,CAAC,CAAA;QAEJ,MAAM,IAAI,KAAK,CAAC,4BAA4B,CAAC,CAAA;IAC/C,CAAC;IAAC,OAAO,GAAG,EAAE,CAAC;QACb,IAAI,GAAG,YAAY,yCAA4B;YAAE,MAAM,GAAG,CAAA;QAC1D,MAAM,IAAA,4CAAmB,EAAC,GAAgB,EAAE;YAC1C,GAAG,UAAU;YACb,OAAO;YACP,KAAK,EAAE,UAAU,CAAC,KAAK,IAAI,SAAS;SACrC,CAAC,CAAA;IACJ,CAAC;AACH,CAAC"}
1
+ {"version":3,"file":"sendTransaction.js","sourceRoot":"","sources":["../../../actions/wallet/sendTransaction.ts"],"names":[],"mappings":";;AA8IA,0CA0JC;AAvSD,0EAG6C;AAI7C,wDAKgC;AAChC,kDAAgD;AAEhD,oHAGwE;AASxE,mFAGgD;AAChD,sFAGkD;AAClD,kEAA2D;AAC3D,wFAGqD;AACrD,2DAAoD;AACpD,+EAIiD;AACjD,2DAA8E;AAC9E,iFAIuC;AACvC,mEAGgC;AAsFzB,KAAK,UAAU,eAAe,CAMnC,MAAyC,EACzC,UAA6E;IAE7E,MAAM,EACJ,OAAO,EAAE,QAAQ,GAAG,MAAM,CAAC,OAAO,EAClC,KAAK,GAAG,MAAM,CAAC,KAAK,EACpB,UAAU,EACV,iBAAiB,EACjB,KAAK,EACL,IAAI,EACJ,GAAG,EACH,QAAQ,EACR,gBAAgB,EAChB,YAAY,EACZ,oBAAoB,EACpB,KAAK,EACL,KAAK,EACL,G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"version":3,"file":"writeContract.js","sourceRoot":"","sources":["../../../actions/wallet/writeContract.ts"],"names":[],"mappings":";;AAwIA,sCAsCC;AA3JD,iFAI8C;AAE9C,2DAAoD;AAEpD,6DAI6B;AAyGtB,KAAK,UAAU,aAAa,CAYjC,MAAyC,EACzC,UAOC;IAED,MAAM,EAAE,GAAG,EAAE,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE,YAAY,EAAE,GAAG,OAAO,EAAE,GAChE,UAAqC,CAAA;IACvC,MAAM,IAAI,GAAG,IAAA,0CAAkB,EAAC;QAC9B,GAAG;QACH,IAAI;QACJ,YAAY;KACmB,CAAC,CAAA;IAClC,OAAO,IAAA,wBAAS,EACd,MAAM,EACN,oCAAe,EACf,iBAAiB,CAClB,CAAC;QACA,IAAI,EAAE,GAAG,IAAI,GAAG,UAAU,CAAC,CAAC,CAAC,UAAU,CAAC,OAAO,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,EAAE,EAAE;QAChE,EAAE,EAAE,OAAO;QACX,GAAG,OAAO;KACX,CAAC,CAAA;AACJ,CAAC"}
@@ -0,0 +1,26 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.abstractTestnet = void 0;
4
+ const defineChain_js_1 = require("../../utils/chain/defineChain.js");
5
+ const chainConfig_js_1 = require("../../zksync/chainConfig.js");
6
+ exports.abstractTestnet = (0, defineChain_js_1.defineChain)({
7
+ ...chainConfig_js_1.chainConfig,
8
+ id: 11_124,
9
+ name: 'Abstract Testnet',
10
+ nativeCurrency: {
11
+ decimals: 18,
12
+ name: 'ETH',
13
+ symbol: 'ETH',
14
+ },
15
+ rpcUrls: {
16
+ default: { http: ['https://api.testnet.abs.xyz'] },
17
+ },
18
+ blockExplorers: {
19
+ default: {
20
+ name: 'Abstract Block Explorer',
21
+ url: 'https://explorer.testnet.abs.xyz',
22
+ },
23
+ },
24
+ testnet: true,
25
+ });
26
+ //# sourceMappingURL=abstractTestnet.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"abstractTestnet.js","sourceRoot":"","sources":["../../../chains/definitions/abstractTestnet.ts"],"names":[],"mappings":";;;AAAA,qEAA8D;AAC9D,gEAAyD;AAE5C,QAAA,eAAe,GAAiB,IAAA,4BAAW,EAAC;IACvD,GAAG,4BAAW;IACd,EAAE,EAAE,MAAM;IACV,IAAI,EAAE,kBAAkB;IACxB,cAAc,EAAE;QACd,QAAQ,EAAE,EAAE;QACZ,IAAI,EAAE,KAAK;QACX,MAAM,EAAE,KAAK;KACd;IACD,OAAO,EAAE;QACP,OAAO,EAAE,EAAE,IAAI,EAAE,CAAC,6BAA6B,CAAC,EAAE;KACnD;IACD,cAAc,EAAE;QACd,OAAO,EAAE;YACP,IAAI,EAAE,yBAAyB;YAC/B,GAAG,EAAE,kCAAkC;SACxC;KACF;IACD,OAAO,EAAE,IAAI;CACd,CAAC,CAAA"}
@@ -0,0 +1,28 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.b3Sepolia = void 0;
4
+ const defineChain_js_1 = require("../../utils/chain/defineChain.js");
5
+ const sourceId = 168_587_773;
6
+ exports.b3Sepolia = (0, defineChain_js_1.defineChain)({
7
+ id: 1993,
8
+ name: 'B3 Sepolia',
9
+ nativeCurrency: {
10
+ name: 'Ether',
11
+ symbol: 'ETH',
12
+ decimals: 18,
13
+ },
14
+ rpcUrls: {
15
+ default: {
16
+ http: ['https://sepolia.b3.fun'],
17
+ },
18
+ },
19
+ blockExplorers: {
20
+ default: {
21
+ name: 'Blockscout',
22
+ url: 'https://sepolia.explorer.b3.fun',
23
+ },
24
+ },
25
+ testnet: true,
26
+ sourceId,
27
+ });
28
+ //# sourceMappingURL=b3Sepolia.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"b3Sepolia.js","sourceRoot":"","sources":["../../../chains/definitions/b3Sepolia.ts"],"names":[],"mappings":";;;AAAA,qEAA8D;AAE9D,MAAM,QAAQ,GAAG,WAAW,CAAA;AAEf,QAAA,SAAS,GAAiB,IAAA,4BAAW,EAAC;IACjD,EAAE,EAAE,IAAI;IACR,IAAI,EAAE,YAAY;IAClB,cAAc,EAAE;QACd,IAAI,EAAE,OAAO;QACb,MAAM,EAAE,KAAK;QACb,QAAQ,EAAE,EAAE;KACb;IACD,OAAO,EAAE;QACP,OAAO,EAAE;YACP,IAAI,EAAE,CAAC,wBAAwB,CAAC;SACjC;KACF;IACD,cAAc,EAAE;QACd,OAAO,EAAE;YACP,IAAI,EAAE,YAAY;YAClB,GAAG,EAAE,iCAAiC;SACvC;KACF;IACD,OAAO,EAAE,IAAI;IACb,QAAQ;CACT,CAAC,CAAA"}
@@ -1,12 +1,12 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.zkSync = void 0;
3
+ exports.zksync = void 0;
4
4
  const defineChain_js_1 = require("../../utils/chain/defineChain.js");
5
5
  const chainConfig_js_1 = require("../../zksync/chainConfig.js");
6
- exports.zkSync = (0, defineChain_js_1.defineChain)({
6
+ exports.zksync = (0, defineChain_js_1.defineChain)({
7
7
  ...chainConfig_js_1.chainConfig,
8
8
  id: 324,
9
- name: 'zkSync Era',
9
+ name: 'ZKsync Era',
10
10
  network: 'zksync-era',
11
11
  nativeCurrency: {
12
12
  decimals: 18,
@@ -26,8 +26,9 @@ exports.zkSync = (0, defineChain_js_1.defineChain)({
26
26
  apiUrl: 'https://api-era.zksync.network/api',
27
27
  },
28
28
  native: {
29
- name: 'zkSync Explorer',
29
+ name: 'ZKsync Explorer',
30
30
  url: 'https://explorer.zksync.io/',
31
+ apiUrl: 'https://block-explorer-api.mainnet.zksync.io/api',
31
32
  },
32
33
  },
33
34
  contracts: {
@@ -36,4 +37,4 @@ exports.zkSync = (0, defineChain_js_1.defineChain)({
36
37
  },
37
38
  },
38
39
  });
39
- //# sourceMappingURL=zkSync.js.map
40
+ //# sourceMappingURL=zksync.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"zkSync.js","sourceRoot":"","sources":["../../../chains/definitions/zkSync.ts"],"names":[],"mappings":";;;AAAA,qEAA8D;AAC9D,gEAAyD;AAE5C,QAAA,MAAM,GAAiB,IAAA,4BAAW,EAAC;IAC9C,GAAG,4BAAW;IACd,EAAE,EAAE,GAAG;IACP,IAAI,EAAE,YAAY;IAClB,OAAO,EAAE,YAAY;IACrB,cAAc,EAAE;QACd,QAAQ,EAAE,EAAE;QACZ,IAAI,EAAE,OAAO;QACb,MAAM,EAAE,KAAK;KACd;IACD,OAAO,EAAE;QACP,OAAO,EAAE;YACP,IAAI,EAAE,CAAC,+BAA+B,CAAC;YACvC,SAAS,EAAE,CAAC,gCAAgC,CAAC;SAC9C;KACF;IACD,cAAc,EAAE;QACd,OAAO,EAAE;YACP,IAAI,EAAE,WAAW;YACjB,GAAG,EAAE,6BAA6B;YAClC,MAAM,EAAE,oCAAoC;SAC7C;QACD,MAAM,EAAE;YACN,IAAI,EAAE,iBAAiB;YACvB,GAAG,EAAE,6BAA6B;SACnC;KACF;IACD,SAAS,EAAE;QACT,UAAU,EAAE;YACV,OAAO,EAAE,4CAA4C;SACtD;KACF;CACF,CAAC,CAAA"}
1
+ {"version":3,"file":"zksync.js","sourceRoot":"","sources":["../../../chains/definitions/zksync.ts"],"names":[],"mappings":";;;AAAA,qEAA8D;AAC9D,gEAAyD;AAE5C,QAAA,MAAM,GAAiB,IAAA,4BAAW,EAAC;IAC9C,GAAG,4BAAW;IACd,EAAE,EAAE,GAAG;IACP,IAAI,EAAE,YAAY;IAClB,OAAO,EAAE,YAAY;IACrB,cAAc,EAAE;QACd,QAAQ,EAAE,EAAE;QACZ,IAAI,EAAE,OAAO;QACb,MAAM,EAAE,KAAK;KACd;IACD,OAAO,EAAE;QACP,OAAO,EAAE;YACP,IAAI,EAAE,CAAC,+BAA+B,CAAC;YACvC,SAAS,EAAE,CAAC,gCAAgC,CAAC;SAC9C;KACF;IACD,cAAc,EAAE;QACd,OAAO,EAAE;YACP,IAAI,EAAE,WAAW;YACjB,GAAG,EAAE,6BAA6B;YAClC,MAAM,EAAE,oCAAoC;SAC7C;QACD,MAAM,EAAE;YACN,IAAI,EAAE,iBAAiB;YACvB,GAAG,EAAE,6BAA6B;YAClC,MAAM,EAAE,kDAAkD;SAC3D;KACF;IACD,SAAS,EAAE;QACT,UAAU,EAAE;YACV,OAAO,EAAE,4CAA4C;SACtD;KACF;CACF,CAAC,CAAA"}
@@ -1,12 +1,12 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.zkSyncInMemoryNode = void 0;
3
+ exports.zksyncInMemoryNode = void 0;
4
4
  const defineChain_js_1 = require("../../utils/chain/defineChain.js");
5
5
  const chainConfig_js_1 = require("../../zksync/chainConfig.js");
6
- exports.zkSyncInMemoryNode = (0, defineChain_js_1.defineChain)({
6
+ exports.zksyncInMemoryNode = (0, defineChain_js_1.defineChain)({
7
7
  ...chainConfig_js_1.chainConfig,
8
8
  id: 260,
9
- name: 'zkSync InMemory Node',
9
+ name: 'ZKsync InMemory Node',
10
10
  network: 'zksync-in-memory-node',
11
11
  nativeCurrency: { name: 'Ether', symbol: 'ETH', decimals: 18 },
12
12
  rpcUrls: {
@@ -16,4 +16,4 @@ exports.zkSyncInMemoryNode = (0, defineChain_js_1.defineChain)({
16
16
  },
17
17
  testnet: true,
18
18
  });
19
- //# sourceMappingURL=zkSyncInMemoryNode.js.map
19
+ //# sourceMappingURL=zksyncInMemoryNode.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"zkSyncInMemoryNode.js","sourceRoot":"","sources":["../../../chains/definitions/zkSyncInMemoryNode.ts"],"names":[],"mappings":";;;AAAA,qEAA8D;AAC9D,gEAAyD;AAE5C,QAAA,kBAAkB,GAAiB,IAAA,4BAAW,EAAC;IAC1D,GAAG,4BAAW;IACd,EAAE,EAAE,GAAG;IACP,IAAI,EAAE,sBAAsB;IAC5B,OAAO,EAAE,uBAAuB;IAChC,cAAc,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,QAAQ,EAAE,EAAE,EAAE;IAC9D,OAAO,EAAE;QACP,OAAO,EAAE;YACP,IAAI,EAAE,CAAC,uBAAuB,CAAC;SAChC;KACF;IACD,OAAO,EAAE,IAAI;CACd,CAAC,CAAA"}
1
+ {"version":3,"file":"zksyncInMemoryNode.js","sourceRoot":"","sources":["../../../chains/definitions/zksyncInMemoryNode.ts"],"names":[],"mappings":";;;AAAA,qEAA8D;AAC9D,gEAAyD;AAE5C,QAAA,kBAAkB,GAAiB,IAAA,4BAAW,EAAC;IAC1D,GAAG,4BAAW;IACd,EAAE,EAAE,GAAG;IACP,IAAI,EAAE,sBAAsB;IAC5B,OAAO,EAAE,uBAAuB;IAChC,cAAc,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,QAAQ,EAAE,EAAE,EAAE;IAC9D,OAAO,EAAE;QACP,OAAO,EAAE;YACP,IAAI,EAAE,CAAC,uBAAuB,CAAC;SAChC;KACF;IACD,OAAO,EAAE,IAAI;CACd,CAAC,CAAA"}
@@ -1,12 +1,12 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.zkSyncLocalNode = void 0;
3
+ exports.zksyncLocalNode = void 0;
4
4
  const defineChain_js_1 = require("../../utils/chain/defineChain.js");
5
5
  const chainConfig_js_1 = require("../../zksync/chainConfig.js");
6
- exports.zkSyncLocalNode = (0, defineChain_js_1.defineChain)({
6
+ exports.zksyncLocalNode = (0, defineChain_js_1.defineChain)({
7
7
  ...chainConfig_js_1.chainConfig,
8
8
  id: 270,
9
- name: 'zkSync CLI Local Node',
9
+ name: 'ZKsync CLI Local Node',
10
10
  network: 'zksync-cli-local-node',
11
11
  nativeCurrency: { name: 'Ether', symbol: 'ETH', decimals: 18 },
12
12
  rpcUrls: {
@@ -16,4 +16,4 @@ exports.zkSyncLocalNode = (0, defineChain_js_1.defineChain)({
16
16
  },
17
17
  testnet: true,
18
18
  });
19
- //# sourceMappingURL=zkSyncLocalNode.js.map
19
+ //# sourceMappingURL=zksyncLocalNode.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"zkSyncLocalNode.js","sourceRoot":"","sources":["../../../chains/definitions/zkSyncLocalNode.ts"],"names":[],"mappings":";;;AAAA,qEAA8D;AAC9D,gEAAyD;AAE5C,QAAA,eAAe,GAAiB,IAAA,4BAAW,EAAC;IACvD,GAAG,4BAAW;IACd,EAAE,EAAE,GAAG;IACP,IAAI,EAAE,uBAAuB;IAC7B,OAAO,EAAE,uBAAuB;IAChC,cAAc,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,QAAQ,EAAE,EAAE,EAAE;IAC9D,OAAO,EAAE;QACP,OAAO,EAAE;YACP,IAAI,EAAE,CAAC,uBAAuB,CAAC;SAChC;KACF;IACD,OAAO,EAAE,IAAI;CACd,CAAC,CAAA"}
1
+ {"version":3,"file":"zksyncLocalNode.js","sourceRoot":"","sources":["../../../chains/definitions/zksyncLocalNode.ts"],"names":[],"mappings":";;;AAAA,qEAA8D;AAC9D,gEAAyD;AAE5C,QAAA,eAAe,GAAiB,IAAA,4BAAW,EAAC;IACvD,GAAG,4BAAW;IACd,EAAE,EAAE,GAAG;IACP,IAAI,EAAE,uBAAuB;IAC7B,OAAO,EAAE,uBAAuB;IAChC,cAAc,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,QAAQ,EAAE,EAAE,EAAE;IAC9D,OAAO,EAAE;QACP,OAAO,EAAE;YACP,IAAI,EAAE,CAAC,uBAAuB,CAAC;SAChC;KACF;IACD,OAAO,EAAE,IAAI;CACd,CAAC,CAAA"}
@@ -1,12 +1,12 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.zkSyncSepoliaTestnet = void 0;
3
+ exports.zksyncSepoliaTestnet = void 0;
4
4
  const defineChain_js_1 = require("../../utils/chain/defineChain.js");
5
5
  const chainConfig_js_1 = require("../../zksync/chainConfig.js");
6
- exports.zkSyncSepoliaTestnet = (0, defineChain_js_1.defineChain)({
6
+ exports.zksyncSepoliaTestnet = (0, defineChain_js_1.defineChain)({
7
7
  ...chainConfig_js_1.chainConfig,
8
8
  id: 300,
9
- name: 'zkSync Sepolia Testnet',
9
+ name: 'ZKsync Sepolia Testnet',
10
10
  network: 'zksync-sepolia-testnet',
11
11
  nativeCurrency: { name: 'Ether', symbol: 'ETH', decimals: 18 },
12
12
  rpcUrls: {
@@ -19,10 +19,12 @@ exports.zkSyncSepoliaTestnet = (0, defineChain_js_1.defineChain)({
19
19
  default: {
20
20
  name: 'Etherscan',
21
21
  url: 'https://sepolia-era.zksync.network/',
22
+ apiUrl: 'https://api-sepolia-era.zksync.network/api',
22
23
  },
23
24
  native: {
24
- name: 'zkSync Explorer',
25
+ name: 'ZKsync Explorer',
25
26
  url: 'https://sepolia.explorer.zksync.io/',
27
+ blockExplorerApi: 'https://block-explorer-api.sepolia.zksync.dev/api',
26
28
  },
27
29
  },
28
30
  contracts: {
@@ -32,4 +34,4 @@ exports.zkSyncSepoliaTestnet = (0, defineChain_js_1.defineChain)({
32
34
  },
33
35
  testnet: true,
34
36
  });
35
- //# sourceMappingURL=zkSyncSepoliaTestnet.js.map
37
+ //# sourceMappingURL=zksyncSepoliaTestnet.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"zksyncSepoliaTestnet.js","sourceRoot":"","sources":["../../../chains/definitions/zksyncSepoliaTestnet.ts"],"names":[],"mappings":";;;AAAA,qEAA8D;AAC9D,gEAAyD;AAE5C,QAAA,oBAAoB,GAAiB,IAAA,4BAAW,EAAC;IAC5D,GAAG,4BAAW;IACd,EAAE,EAAE,GAAG;IACP,IAAI,EAAE,wBAAwB;IAC9B,OAAO,EAAE,wBAAwB;IACjC,cAAc,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,QAAQ,EAAE,EAAE,EAAE;IAC9D,OAAO,EAAE;QACP,OAAO,EAAE;YACP,IAAI,EAAE,CAAC,gCAAgC,CAAC;YACxC,SAAS,EAAE,CAAC,iCAAiC,CAAC;SAC/C;KACF;IACD,cAAc,EAAE;QACd,OAAO,EAAE;YACP,IAAI,EAAE,WAAW;YACjB,GAAG,EAAE,qCAAqC;YAC1C,MAAM,EAAE,4CAA4C;SACrD;QACD,MAAM,EAAE;YACN,IAAI,EAAE,iBAAiB;YACvB,GAAG,EAAE,qCAAqC;YAC1C,gBAAgB,EAAE,mDAAmD;SACtE;KACF;IACD,SAAS,EAAE;QACT,UAAU,EAAE;YACV,OAAO,EAAE,4CAA4C;SACtD;KACF;IACD,OAAO,EAAE,IAAI;CACd,CAAC,CAAA"}