@aa-sdk/core 4.0.0-alpha.9 → 4.0.0-beta.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 (416) hide show
  1. package/dist/esm/abis/EntryPointAbi_v7.js +1 -0
  2. package/dist/esm/abis/EntryPointAbi_v7.js.map +1 -1
  3. package/dist/esm/account/smartContractAccount.d.ts +50 -1
  4. package/dist/esm/account/smartContractAccount.js +111 -2
  5. package/dist/esm/account/smartContractAccount.js.map +1 -1
  6. package/dist/esm/actions/smartAccount/buildUserOperation.d.ts +23 -0
  7. package/dist/esm/actions/smartAccount/buildUserOperation.js +23 -0
  8. package/dist/esm/actions/smartAccount/buildUserOperation.js.map +1 -1
  9. package/dist/esm/actions/smartAccount/buildUserOperationFromTx.d.ts +39 -0
  10. package/dist/esm/actions/smartAccount/buildUserOperationFromTx.js +39 -0
  11. package/dist/esm/actions/smartAccount/buildUserOperationFromTx.js.map +1 -1
  12. package/dist/esm/actions/smartAccount/buildUserOperationFromTxs.d.ts +54 -0
  13. package/dist/esm/actions/smartAccount/buildUserOperationFromTxs.js +55 -0
  14. package/dist/esm/actions/smartAccount/buildUserOperationFromTxs.js.map +1 -1
  15. package/dist/esm/actions/smartAccount/checkGasSponsorshipEligibility.d.ts +28 -0
  16. package/dist/esm/actions/smartAccount/checkGasSponsorshipEligibility.js +28 -0
  17. package/dist/esm/actions/smartAccount/checkGasSponsorshipEligibility.js.map +1 -1
  18. package/dist/esm/actions/smartAccount/dropAndReplaceUserOperation.d.ts +22 -0
  19. package/dist/esm/actions/smartAccount/dropAndReplaceUserOperation.js +27 -6
  20. package/dist/esm/actions/smartAccount/dropAndReplaceUserOperation.js.map +1 -1
  21. package/dist/esm/actions/smartAccount/estimateUserOperationGas.d.ts +13 -0
  22. package/dist/esm/actions/smartAccount/estimateUserOperationGas.js +13 -0
  23. package/dist/esm/actions/smartAccount/estimateUserOperationGas.js.map +1 -1
  24. package/dist/esm/actions/smartAccount/internal/initUserOperation.d.ts +13 -0
  25. package/dist/esm/actions/smartAccount/internal/initUserOperation.js +14 -1
  26. package/dist/esm/actions/smartAccount/internal/initUserOperation.js.map +1 -1
  27. package/dist/esm/actions/smartAccount/internal/runMiddlewareStack.js +2 -1
  28. package/dist/esm/actions/smartAccount/internal/runMiddlewareStack.js.map +1 -1
  29. package/dist/esm/actions/smartAccount/sendTransaction.d.ts +24 -0
  30. package/dist/esm/actions/smartAccount/sendTransaction.js +24 -0
  31. package/dist/esm/actions/smartAccount/sendTransaction.js.map +1 -1
  32. package/dist/esm/actions/smartAccount/sendTransactions.d.ts +23 -0
  33. package/dist/esm/actions/smartAccount/sendTransactions.js +23 -0
  34. package/dist/esm/actions/smartAccount/sendTransactions.js.map +1 -1
  35. package/dist/esm/actions/smartAccount/sendUserOperation.d.ts +21 -0
  36. package/dist/esm/actions/smartAccount/sendUserOperation.js +21 -0
  37. package/dist/esm/actions/smartAccount/sendUserOperation.js.map +1 -1
  38. package/dist/esm/actions/smartAccount/types.d.ts +14 -0
  39. package/dist/esm/actions/smartAccount/types.js +1 -0
  40. package/dist/esm/actions/smartAccount/types.js.map +1 -1
  41. package/dist/esm/actions/smartAccount/waitForUserOperationTransacation.d.ts +24 -0
  42. package/dist/esm/actions/smartAccount/waitForUserOperationTransacation.js +24 -0
  43. package/dist/esm/actions/smartAccount/waitForUserOperationTransacation.js.map +1 -1
  44. package/dist/esm/client/bundlerClient.d.ts +21 -0
  45. package/dist/esm/client/bundlerClient.js +32 -0
  46. package/dist/esm/client/bundlerClient.js.map +1 -1
  47. package/dist/esm/client/decorators/bundlerClient.d.ts +41 -0
  48. package/dist/esm/client/decorators/bundlerClient.js +10 -0
  49. package/dist/esm/client/decorators/bundlerClient.js.map +1 -1
  50. package/dist/esm/client/decorators/smartAccountClient.d.ts +8 -0
  51. package/dist/esm/client/decorators/smartAccountClient.js +12 -1
  52. package/dist/esm/client/decorators/smartAccountClient.js.map +1 -1
  53. package/dist/esm/client/isSmartAccountClient.d.ts +16 -0
  54. package/dist/esm/client/isSmartAccountClient.js +16 -0
  55. package/dist/esm/client/isSmartAccountClient.js.map +1 -1
  56. package/dist/esm/client/schema.d.ts +12 -0
  57. package/dist/esm/client/schema.js +14 -0
  58. package/dist/esm/client/schema.js.map +1 -1
  59. package/dist/esm/client/smartAccountClient.js +53 -0
  60. package/dist/esm/client/smartAccountClient.js.map +1 -1
  61. package/dist/esm/client/types.js +1 -0
  62. package/dist/esm/client/types.js.map +1 -1
  63. package/dist/esm/ens/utils.d.ts +45 -0
  64. package/dist/esm/ens/utils.js +49 -0
  65. package/dist/esm/ens/utils.js.map +1 -1
  66. package/dist/esm/entrypoint/index.d.ts +14 -0
  67. package/dist/esm/entrypoint/index.js +30 -0
  68. package/dist/esm/entrypoint/index.js.map +1 -1
  69. package/dist/esm/entrypoint/types.d.ts +17 -0
  70. package/dist/esm/errors/account.d.ts +87 -4
  71. package/dist/esm/errors/account.js +88 -4
  72. package/dist/esm/errors/account.js.map +1 -1
  73. package/dist/esm/errors/base.d.ts +5 -0
  74. package/dist/esm/errors/base.js +5 -0
  75. package/dist/esm/errors/base.js.map +1 -1
  76. package/dist/esm/errors/client.d.ts +24 -0
  77. package/dist/esm/errors/client.js +24 -0
  78. package/dist/esm/errors/client.js.map +1 -1
  79. package/dist/esm/errors/entrypoint.d.ts +18 -0
  80. package/dist/esm/errors/entrypoint.js +18 -0
  81. package/dist/esm/errors/entrypoint.js.map +1 -1
  82. package/dist/esm/errors/signer.d.ts +8 -0
  83. package/dist/esm/errors/signer.js +8 -0
  84. package/dist/esm/errors/signer.js.map +1 -1
  85. package/dist/esm/errors/transaction.d.ts +14 -1
  86. package/dist/esm/errors/transaction.js +14 -1
  87. package/dist/esm/errors/transaction.js.map +1 -1
  88. package/dist/esm/errors/useroperation.d.ts +25 -0
  89. package/dist/esm/errors/useroperation.js +26 -0
  90. package/dist/esm/errors/useroperation.js.map +1 -1
  91. package/dist/esm/index.d.ts +0 -1
  92. package/dist/esm/index.js +0 -1
  93. package/dist/esm/index.js.map +1 -1
  94. package/dist/esm/logger.d.ts +91 -0
  95. package/dist/esm/logger.js +91 -0
  96. package/dist/esm/logger.js.map +1 -1
  97. package/dist/esm/middleware/actions.d.ts +14 -0
  98. package/dist/esm/middleware/actions.js +7 -0
  99. package/dist/esm/middleware/actions.js.map +1 -1
  100. package/dist/esm/middleware/defaults/feeEstimator.d.ts +20 -0
  101. package/dist/esm/middleware/defaults/feeEstimator.js +28 -0
  102. package/dist/esm/middleware/defaults/feeEstimator.js.map +1 -1
  103. package/dist/esm/middleware/defaults/gasEstimator.d.ts +8 -0
  104. package/dist/esm/middleware/defaults/gasEstimator.js +8 -0
  105. package/dist/esm/middleware/defaults/gasEstimator.js.map +1 -1
  106. package/dist/esm/middleware/defaults/paymasterAndData.d.ts +8 -0
  107. package/dist/esm/middleware/defaults/paymasterAndData.js +8 -0
  108. package/dist/esm/middleware/defaults/paymasterAndData.js.map +1 -1
  109. package/dist/esm/middleware/defaults/userOpSigner.d.ts +10 -0
  110. package/dist/esm/middleware/defaults/userOpSigner.js +10 -0
  111. package/dist/esm/middleware/defaults/userOpSigner.js.map +1 -1
  112. package/dist/esm/middleware/erc7677middleware.d.ts +21 -0
  113. package/dist/esm/middleware/erc7677middleware.js +23 -0
  114. package/dist/esm/middleware/erc7677middleware.js.map +1 -1
  115. package/dist/esm/middleware/noopMiddleware.d.ts +6 -0
  116. package/dist/esm/middleware/noopMiddleware.js +6 -0
  117. package/dist/esm/middleware/noopMiddleware.js.map +1 -1
  118. package/dist/esm/middleware/types.js +1 -0
  119. package/dist/esm/middleware/types.js.map +1 -1
  120. package/dist/esm/signer/local-account.d.ts +96 -1
  121. package/dist/esm/signer/local-account.js +97 -2
  122. package/dist/esm/signer/local-account.js.map +1 -1
  123. package/dist/esm/signer/schema.d.ts +14 -0
  124. package/dist/esm/signer/schema.js +14 -0
  125. package/dist/esm/signer/schema.js.map +1 -1
  126. package/dist/esm/signer/types.d.ts +12 -0
  127. package/dist/esm/signer/types.js +1 -0
  128. package/dist/esm/signer/types.js.map +1 -1
  129. package/dist/esm/signer/utils.d.ts +20 -0
  130. package/dist/esm/signer/utils.js +27 -0
  131. package/dist/esm/signer/utils.js.map +1 -1
  132. package/dist/esm/signer/wallet-client.d.ts +92 -0
  133. package/dist/esm/signer/wallet-client.js +92 -0
  134. package/dist/esm/signer/wallet-client.js.map +1 -1
  135. package/dist/esm/transport/split.d.ts +32 -0
  136. package/dist/esm/transport/split.js +32 -0
  137. package/dist/esm/transport/split.js.map +1 -1
  138. package/dist/esm/types.d.ts +17 -0
  139. package/dist/esm/types.js +1 -0
  140. package/dist/esm/types.js.map +1 -1
  141. package/dist/esm/utils/bigint.d.ts +45 -0
  142. package/dist/esm/utils/bigint.js +46 -0
  143. package/dist/esm/utils/bigint.js.map +1 -1
  144. package/dist/esm/utils/bytes.d.ts +9 -0
  145. package/dist/esm/utils/bytes.js +10 -1
  146. package/dist/esm/utils/bytes.js.map +1 -1
  147. package/dist/esm/utils/index.d.ts +86 -0
  148. package/dist/esm/utils/index.js +86 -0
  149. package/dist/esm/utils/index.js.map +1 -1
  150. package/dist/esm/utils/schema.d.ts +3 -0
  151. package/dist/esm/utils/schema.js +9 -0
  152. package/dist/esm/utils/schema.js.map +1 -1
  153. package/dist/esm/utils/stateOverride.js +2 -0
  154. package/dist/esm/utils/stateOverride.js.map +1 -1
  155. package/dist/esm/utils/types.d.ts +22 -0
  156. package/dist/esm/utils/types.js +1 -0
  157. package/dist/esm/utils/types.js.map +1 -1
  158. package/dist/esm/utils/userop.d.ts +79 -0
  159. package/dist/esm/utils/userop.js +83 -0
  160. package/dist/esm/utils/userop.js.map +1 -1
  161. package/dist/esm/version.d.ts +1 -1
  162. package/dist/esm/version.js +3 -1
  163. package/dist/esm/version.js.map +1 -1
  164. package/dist/types/account/smartContractAccount.d.ts +1 -1
  165. package/dist/types/account/smartContractAccount.d.ts.map +1 -1
  166. package/dist/types/actions/smartAccount/dropAndReplaceUserOperation.d.ts.map +1 -1
  167. package/dist/types/client/smartAccountClient.d.ts.map +1 -1
  168. package/dist/types/index.d.ts +0 -1
  169. package/dist/types/index.d.ts.map +1 -1
  170. package/dist/types/transport/split.d.ts +1 -1
  171. package/dist/types/version.d.ts +1 -1
  172. package/dist/types/version.d.ts.map +1 -1
  173. package/package.json +10 -11
  174. package/src/account/smartContractAccount.ts +3 -3
  175. package/src/actions/smartAccount/dropAndReplaceUserOperation.ts +10 -10
  176. package/src/actions/smartAccount/internal/initUserOperation.ts +1 -1
  177. package/src/client/smartAccountClient.ts +7 -0
  178. package/src/index.ts +0 -1
  179. package/src/transport/split.ts +1 -1
  180. package/src/version.ts +1 -1
  181. package/dist/cjs/abis/EntryPointAbi_v6.d.ts +0 -1018
  182. package/dist/cjs/abis/EntryPointAbi_v6.js +0 -1313
  183. package/dist/cjs/abis/EntryPointAbi_v6.js.map +0 -1
  184. package/dist/cjs/abis/EntryPointAbi_v7.d.ts +0 -775
  185. package/dist/cjs/abis/EntryPointAbi_v7.js +0 -661
  186. package/dist/cjs/abis/EntryPointAbi_v7.js.map +0 -1
  187. package/dist/cjs/abis/SimpleAccountAbi_v6.d.ts +0 -405
  188. package/dist/cjs/abis/SimpleAccountAbi_v6.js +0 -528
  189. package/dist/cjs/abis/SimpleAccountAbi_v6.js.map +0 -1
  190. package/dist/cjs/abis/SimpleAccountAbi_v7.d.ts +0 -410
  191. package/dist/cjs/abis/SimpleAccountAbi_v7.js +0 -538
  192. package/dist/cjs/abis/SimpleAccountAbi_v7.js.map +0 -1
  193. package/dist/cjs/abis/SimpleAccountFactoryAbi.d.ts +0 -55
  194. package/dist/cjs/abis/SimpleAccountFactoryAbi.js +0 -78
  195. package/dist/cjs/abis/SimpleAccountFactoryAbi.js.map +0 -1
  196. package/dist/cjs/account/smartContractAccount.d.ts +0 -74
  197. package/dist/cjs/account/smartContractAccount.js +0 -180
  198. package/dist/cjs/account/smartContractAccount.js.map +0 -1
  199. package/dist/cjs/actions/bundler/estimateUserOperationGas.d.ts +0 -8
  200. package/dist/cjs/actions/bundler/estimateUserOperationGas.js +0 -18
  201. package/dist/cjs/actions/bundler/estimateUserOperationGas.js.map +0 -1
  202. package/dist/cjs/actions/bundler/getSupportedEntryPoints.d.ts +0 -3
  203. package/dist/cjs/actions/bundler/getSupportedEntryPoints.js +0 -11
  204. package/dist/cjs/actions/bundler/getSupportedEntryPoints.js.map +0 -1
  205. package/dist/cjs/actions/bundler/getUserOperationByHash.d.ts +0 -6
  206. package/dist/cjs/actions/bundler/getUserOperationByHash.js +0 -11
  207. package/dist/cjs/actions/bundler/getUserOperationByHash.js.map +0 -1
  208. package/dist/cjs/actions/bundler/getUserOperationReceipt.d.ts +0 -6
  209. package/dist/cjs/actions/bundler/getUserOperationReceipt.js +0 -11
  210. package/dist/cjs/actions/bundler/getUserOperationReceipt.js.map +0 -1
  211. package/dist/cjs/actions/bundler/sendRawUserOperation.d.ts +0 -7
  212. package/dist/cjs/actions/bundler/sendRawUserOperation.js +0 -11
  213. package/dist/cjs/actions/bundler/sendRawUserOperation.js.map +0 -1
  214. package/dist/cjs/actions/smartAccount/buildUserOperation.d.ts +0 -5
  215. package/dist/cjs/actions/smartAccount/buildUserOperation.js +0 -25
  216. package/dist/cjs/actions/smartAccount/buildUserOperation.js.map +0 -1
  217. package/dist/cjs/actions/smartAccount/buildUserOperationFromTx.d.ts +0 -5
  218. package/dist/cjs/actions/smartAccount/buildUserOperationFromTx.js +0 -39
  219. package/dist/cjs/actions/smartAccount/buildUserOperationFromTx.js.map +0 -1
  220. package/dist/cjs/actions/smartAccount/buildUserOperationFromTxs.d.ts +0 -4
  221. package/dist/cjs/actions/smartAccount/buildUserOperationFromTxs.js +0 -62
  222. package/dist/cjs/actions/smartAccount/buildUserOperationFromTxs.js.map +0 -1
  223. package/dist/cjs/actions/smartAccount/checkGasSponsorshipEligibility.d.ts +0 -4
  224. package/dist/cjs/actions/smartAccount/checkGasSponsorshipEligibility.js +0 -34
  225. package/dist/cjs/actions/smartAccount/checkGasSponsorshipEligibility.js.map +0 -1
  226. package/dist/cjs/actions/smartAccount/dropAndReplaceUserOperation.d.ts +0 -5
  227. package/dist/cjs/actions/smartAccount/dropAndReplaceUserOperation.js +0 -64
  228. package/dist/cjs/actions/smartAccount/dropAndReplaceUserOperation.js.map +0 -1
  229. package/dist/cjs/actions/smartAccount/estimateUserOperationGas.d.ts +0 -5
  230. package/dist/cjs/actions/smartAccount/estimateUserOperationGas.js +0 -23
  231. package/dist/cjs/actions/smartAccount/estimateUserOperationGas.js.map +0 -1
  232. package/dist/cjs/actions/smartAccount/getAddress.d.ts +0 -4
  233. package/dist/cjs/actions/smartAccount/getAddress.js +0 -13
  234. package/dist/cjs/actions/smartAccount/getAddress.js.map +0 -1
  235. package/dist/cjs/actions/smartAccount/internal/initUserOperation.d.ts +0 -7
  236. package/dist/cjs/actions/smartAccount/internal/initUserOperation.js +0 -42
  237. package/dist/cjs/actions/smartAccount/internal/initUserOperation.js.map +0 -1
  238. package/dist/cjs/actions/smartAccount/internal/runMiddlewareStack.d.ts +0 -10
  239. package/dist/cjs/actions/smartAccount/internal/runMiddlewareStack.js +0 -47
  240. package/dist/cjs/actions/smartAccount/internal/runMiddlewareStack.js.map +0 -1
  241. package/dist/cjs/actions/smartAccount/internal/sendUserOperation.d.ts +0 -10
  242. package/dist/cjs/actions/smartAccount/internal/sendUserOperation.js +0 -28
  243. package/dist/cjs/actions/smartAccount/internal/sendUserOperation.js.map +0 -1
  244. package/dist/cjs/actions/smartAccount/sendTransaction.d.ts +0 -5
  245. package/dist/cjs/actions/smartAccount/sendTransaction.js +0 -35
  246. package/dist/cjs/actions/smartAccount/sendTransaction.js.map +0 -1
  247. package/dist/cjs/actions/smartAccount/sendTransactions.d.ts +0 -4
  248. package/dist/cjs/actions/smartAccount/sendTransactions.js +0 -36
  249. package/dist/cjs/actions/smartAccount/sendTransactions.js.map +0 -1
  250. package/dist/cjs/actions/smartAccount/sendUserOperation.d.ts +0 -5
  251. package/dist/cjs/actions/smartAccount/sendUserOperation.js +0 -31
  252. package/dist/cjs/actions/smartAccount/sendUserOperation.js.map +0 -1
  253. package/dist/cjs/actions/smartAccount/signMessage.d.ts +0 -6
  254. package/dist/cjs/actions/smartAccount/signMessage.js +0 -12
  255. package/dist/cjs/actions/smartAccount/signMessage.js.map +0 -1
  256. package/dist/cjs/actions/smartAccount/signMessageWith6492.d.ts +0 -4
  257. package/dist/cjs/actions/smartAccount/signMessageWith6492.js +0 -12
  258. package/dist/cjs/actions/smartAccount/signMessageWith6492.js.map +0 -1
  259. package/dist/cjs/actions/smartAccount/signTypedData.d.ts +0 -10
  260. package/dist/cjs/actions/smartAccount/signTypedData.js +0 -12
  261. package/dist/cjs/actions/smartAccount/signTypedData.js.map +0 -1
  262. package/dist/cjs/actions/smartAccount/signTypedDataWith6492.d.ts +0 -6
  263. package/dist/cjs/actions/smartAccount/signTypedDataWith6492.js +0 -12
  264. package/dist/cjs/actions/smartAccount/signTypedDataWith6492.js.map +0 -1
  265. package/dist/cjs/actions/smartAccount/signUserOperation.d.ts +0 -5
  266. package/dist/cjs/actions/smartAccount/signUserOperation.js +0 -30
  267. package/dist/cjs/actions/smartAccount/signUserOperation.js.map +0 -1
  268. package/dist/cjs/actions/smartAccount/types.d.ts +0 -42
  269. package/dist/cjs/actions/smartAccount/types.js +0 -3
  270. package/dist/cjs/actions/smartAccount/types.js.map +0 -1
  271. package/dist/cjs/actions/smartAccount/upgradeAccount.d.ts +0 -4
  272. package/dist/cjs/actions/smartAccount/upgradeAccount.js +0 -38
  273. package/dist/cjs/actions/smartAccount/upgradeAccount.js.map +0 -1
  274. package/dist/cjs/actions/smartAccount/waitForUserOperationTransacation.d.ts +0 -3
  275. package/dist/cjs/actions/smartAccount/waitForUserOperationTransacation.js +0 -36
  276. package/dist/cjs/actions/smartAccount/waitForUserOperationTransacation.js.map +0 -1
  277. package/dist/cjs/client/bundlerClient.d.ts +0 -10
  278. package/dist/cjs/client/bundlerClient.js +0 -51
  279. package/dist/cjs/client/bundlerClient.js.map +0 -1
  280. package/dist/cjs/client/decorators/bundlerClient.d.ts +0 -41
  281. package/dist/cjs/client/decorators/bundlerClient.js +0 -17
  282. package/dist/cjs/client/decorators/bundlerClient.js.map +0 -1
  283. package/dist/cjs/client/decorators/smartAccountClient.d.ts +0 -35
  284. package/dist/cjs/client/decorators/smartAccountClient.js +0 -43
  285. package/dist/cjs/client/decorators/smartAccountClient.js.map +0 -1
  286. package/dist/cjs/client/isSmartAccountClient.d.ts +0 -5
  287. package/dist/cjs/client/isSmartAccountClient.js +0 -18
  288. package/dist/cjs/client/isSmartAccountClient.js.map +0 -1
  289. package/dist/cjs/client/schema.d.ts +0 -767
  290. package/dist/cjs/client/schema.js +0 -63
  291. package/dist/cjs/client/schema.js.map +0 -1
  292. package/dist/cjs/client/smartAccountClient.d.ts +0 -33
  293. package/dist/cjs/client/smartAccountClient.js +0 -93
  294. package/dist/cjs/client/smartAccountClient.js.map +0 -1
  295. package/dist/cjs/client/types.d.ts +0 -21
  296. package/dist/cjs/client/types.js +0 -3
  297. package/dist/cjs/client/types.js.map +0 -1
  298. package/dist/cjs/ens/utils.d.ts +0 -6
  299. package/dist/cjs/ens/utils.js +0 -53
  300. package/dist/cjs/ens/utils.js.map +0 -1
  301. package/dist/cjs/entrypoint/0.6.d.ts +0 -1029
  302. package/dist/cjs/entrypoint/0.6.js +0 -49
  303. package/dist/cjs/entrypoint/0.6.js.map +0 -1
  304. package/dist/cjs/entrypoint/0.7.d.ts +0 -792
  305. package/dist/cjs/entrypoint/0.7.js +0 -88
  306. package/dist/cjs/entrypoint/0.7.js.map +0 -1
  307. package/dist/cjs/entrypoint/index.d.ts +0 -8
  308. package/dist/cjs/entrypoint/index.js +0 -53
  309. package/dist/cjs/entrypoint/index.js.map +0 -1
  310. package/dist/cjs/entrypoint/types.d.ts +0 -46
  311. package/dist/cjs/entrypoint/types.js +0 -3
  312. package/dist/cjs/entrypoint/types.js.map +0 -1
  313. package/dist/cjs/errors/account.d.ts +0 -47
  314. package/dist/cjs/errors/account.js +0 -140
  315. package/dist/cjs/errors/account.js.map +0 -1
  316. package/dist/cjs/errors/base.d.ts +0 -18
  317. package/dist/cjs/errors/base.js +0 -39
  318. package/dist/cjs/errors/base.js.map +0 -1
  319. package/dist/cjs/errors/client.d.ts +0 -14
  320. package/dist/cjs/errors/client.js +0 -44
  321. package/dist/cjs/errors/client.js.map +0 -1
  322. package/dist/cjs/errors/entrypoint.d.ts +0 -10
  323. package/dist/cjs/errors/entrypoint.js +0 -32
  324. package/dist/cjs/errors/entrypoint.js.map +0 -1
  325. package/dist/cjs/errors/signer.d.ts +0 -5
  326. package/dist/cjs/errors/signer.js +0 -20
  327. package/dist/cjs/errors/signer.js.map +0 -1
  328. package/dist/cjs/errors/transaction.d.ts +0 -10
  329. package/dist/cjs/errors/transaction.js +0 -29
  330. package/dist/cjs/errors/transaction.js.map +0 -1
  331. package/dist/cjs/errors/useroperation.d.ts +0 -10
  332. package/dist/cjs/errors/useroperation.js +0 -34
  333. package/dist/cjs/errors/useroperation.js.map +0 -1
  334. package/dist/cjs/index.d.ts +0 -60
  335. package/dist/cjs/index.js +0 -170
  336. package/dist/cjs/index.js.map +0 -1
  337. package/dist/cjs/logger.d.ts +0 -20
  338. package/dist/cjs/logger.js +0 -60
  339. package/dist/cjs/logger.js.map +0 -1
  340. package/dist/cjs/middleware/actions.d.ts +0 -12
  341. package/dist/cjs/middleware/actions.js +0 -21
  342. package/dist/cjs/middleware/actions.js.map +0 -1
  343. package/dist/cjs/middleware/defaults/feeEstimator.d.ts +0 -3
  344. package/dist/cjs/middleware/defaults/feeEstimator.js +0 -23
  345. package/dist/cjs/middleware/defaults/feeEstimator.js.map +0 -1
  346. package/dist/cjs/middleware/defaults/gasEstimator.d.ts +0 -3
  347. package/dist/cjs/middleware/defaults/gasEstimator.js +0 -28
  348. package/dist/cjs/middleware/defaults/gasEstimator.js.map +0 -1
  349. package/dist/cjs/middleware/defaults/paymasterAndData.d.ts +0 -2
  350. package/dist/cjs/middleware/defaults/paymasterAndData.js +0 -12
  351. package/dist/cjs/middleware/defaults/paymasterAndData.js.map +0 -1
  352. package/dist/cjs/middleware/defaults/userOpSigner.d.ts +0 -2
  353. package/dist/cjs/middleware/defaults/userOpSigner.js +0 -26
  354. package/dist/cjs/middleware/defaults/userOpSigner.js.map +0 -1
  355. package/dist/cjs/middleware/erc7677middleware.d.ts +0 -40
  356. package/dist/cjs/middleware/erc7677middleware.js +0 -77
  357. package/dist/cjs/middleware/erc7677middleware.js.map +0 -1
  358. package/dist/cjs/middleware/noopMiddleware.d.ts +0 -3
  359. package/dist/cjs/middleware/noopMiddleware.js +0 -8
  360. package/dist/cjs/middleware/noopMiddleware.js.map +0 -1
  361. package/dist/cjs/middleware/types.d.ts +0 -22
  362. package/dist/cjs/middleware/types.js +0 -3
  363. package/dist/cjs/middleware/types.js.map +0 -1
  364. package/dist/cjs/package.json +0 -1
  365. package/dist/cjs/signer/local-account.d.ts +0 -219
  366. package/dist/cjs/signer/local-account.js +0 -56
  367. package/dist/cjs/signer/local-account.js.map +0 -1
  368. package/dist/cjs/signer/schema.d.ts +0 -4
  369. package/dist/cjs/signer/schema.js +0 -16
  370. package/dist/cjs/signer/schema.js.map +0 -1
  371. package/dist/cjs/signer/types.d.ts +0 -15
  372. package/dist/cjs/signer/types.js +0 -3
  373. package/dist/cjs/signer/types.js.map +0 -1
  374. package/dist/cjs/signer/utils.d.ts +0 -7
  375. package/dist/cjs/signer/utils.js +0 -16
  376. package/dist/cjs/signer/utils.js.map +0 -1
  377. package/dist/cjs/signer/wallet-client.d.ts +0 -217
  378. package/dist/cjs/signer/wallet-client.js +0 -58
  379. package/dist/cjs/signer/wallet-client.js.map +0 -1
  380. package/dist/cjs/transport/split.d.ts +0 -9
  381. package/dist/cjs/transport/split.js +0 -26
  382. package/dist/cjs/transport/split.js.map +0 -1
  383. package/dist/cjs/types.d.ts +0 -158
  384. package/dist/cjs/types.js +0 -3
  385. package/dist/cjs/types.js.map +0 -1
  386. package/dist/cjs/utils/bigint.d.ts +0 -10
  387. package/dist/cjs/utils/bigint.js +0 -55
  388. package/dist/cjs/utils/bigint.js.map +0 -1
  389. package/dist/cjs/utils/bytes.d.ts +0 -7
  390. package/dist/cjs/utils/bytes.js +0 -11
  391. package/dist/cjs/utils/bytes.js.map +0 -1
  392. package/dist/cjs/utils/defaults.d.ts +0 -4
  393. package/dist/cjs/utils/defaults.js +0 -19
  394. package/dist/cjs/utils/defaults.js.map +0 -1
  395. package/dist/cjs/utils/index.d.ts +0 -19
  396. package/dist/cjs/utils/index.js +0 -95
  397. package/dist/cjs/utils/index.js.map +0 -1
  398. package/dist/cjs/utils/schema.d.ts +0 -25
  399. package/dist/cjs/utils/schema.js +0 -35
  400. package/dist/cjs/utils/schema.js.map +0 -1
  401. package/dist/cjs/utils/stateOverride.d.ts +0 -4
  402. package/dist/cjs/utils/stateOverride.js +0 -52
  403. package/dist/cjs/utils/stateOverride.js.map +0 -1
  404. package/dist/cjs/utils/testUtils.d.ts +0 -6
  405. package/dist/cjs/utils/testUtils.js +0 -33
  406. package/dist/cjs/utils/testUtils.js.map +0 -1
  407. package/dist/cjs/utils/types.d.ts +0 -16
  408. package/dist/cjs/utils/types.js +0 -3
  409. package/dist/cjs/utils/types.js.map +0 -1
  410. package/dist/cjs/utils/userop.d.ts +0 -49
  411. package/dist/cjs/utils/userop.js +0 -75
  412. package/dist/cjs/utils/userop.js.map +0 -1
  413. package/dist/cjs/version.d.ts +0 -1
  414. package/dist/cjs/version.js +0 -5
  415. package/dist/cjs/version.js.map +0 -1
  416. package/dist/esm/package.json +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/utils/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,MAAM,CAAC;AAU7B,MAAM,CAAC,MAAM,SAAS,GACpB,CAAU,GAAG,GAA2C,EAAE,EAAE,CAC5D,KAAK,EAAE,CAAI,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C,GAAG,EAAE,EAAE,CAAC,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC;AACjE,CAAC;AASD,MAAM,CAAC,MAAM,QAAQ,GAAG,CAAC,GAAG,MAAa,EAAW,EAAE;IACpD,IAAI,MAAM,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QACxB,MAAM,IAAI,KAAK,CAAC,qBAAqB,CAAC,CAAC;IACzC,CAAC;IACD,OAAO,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,KAAK,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC;AAC9C,CAAC,CAAC;AASF,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAC/B,SAA2B,EAC3B,KAAuB,EACC,EAAE,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC;AAsB9E,MAAM,CAAC,MAAM,QAAQ,GAAG,CAKtB,KAAU,EACV,QAAW,EACX,EAAkB,EACD,EAAE,CACnB,KAAK,CAAC,MAAM,CAAC,CAAC,GAAG,EAAE,IAAI,EAAE,EAAE;IACzB,GAAG,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC,CAAC;IAC/B,OAAO,GAAG,CAAC;AACb,CAAC,EAAE,EAAqB,CAAC,CAAC;AAE5B,cAAc,aAAa,CAAC;AAC5B,cAAc,YAAY,CAAC;AAC3B,cAAc,eAAe,CAAC;AAC9B,cAAc,aAAa,CAAC;AAE5B,cAAc,aAAa,CAAC","sourcesContent":["import { toHex } from \"viem\";\nimport type { PromiseOrValue } from \"../types.js\";\nimport type { RecordableKeys } from \"./types.js\";\n\n/**\n * Utility function that allows for piping a series of async functions together\n *\n * @param {((s: S, o?: O, f?: F) => Promise<S>)[]} fns - functions to pipe\n * @returns {S} result of the pipe\n */\nexport const asyncPipe =\n <S, O, F>(...fns: ((s: S, o?: O, f?: F) => Promise<S>)[]) =>\n async (s: S, o?: O, f?: F) => {\n let result = s;\n for (const fn of fns) {\n result = await fn(result, o, f);\n }\n return result;\n };\n\n// based on @ethersproject/properties, but pulled in here to minize the dependency on ethers\nexport type Deferrable<T> = {\n [K in keyof T]: PromiseOrValue<T[K]>;\n};\n\n/**\n * Await all of the properties of a Deferrable object\n *\n * @param {Deferrable<T>} object - a Deferrable object\n * @returns {Promise<T>} the object with its properties resolved\n */\nexport async function resolveProperties<T>(object: Deferrable<T>): Promise<T> {\n const promises = Object.keys(object).map((key) => {\n const value = object[key as keyof Deferrable<T>];\n return Promise.resolve(value).then((v) => ({ key: key, value: v }));\n });\n\n const results = await Promise.all(promises);\n\n return filterUndefined<T>(\n results.reduce((accum, curr) => {\n accum[curr.key as keyof T] = curr.value;\n return accum;\n }, {} as T)\n );\n}\n\n/**\n * Recursively converts all values in an object to hex strings\n *\n * @param {any} obj - obj to deep hexlify\n * @returns {any} object with all of its values hexlified\n */\nexport function deepHexlify(obj: any): any {\n if (typeof obj === \"function\") {\n return undefined;\n }\n if (obj == null || typeof obj === \"string\" || typeof obj === \"boolean\") {\n return obj;\n } else if (typeof obj === \"bigint\") {\n return toHex(obj);\n } else if (obj._isBigNumber != null || typeof obj !== \"object\") {\n return toHex(obj).replace(/^0x0/, \"0x\");\n }\n if (Array.isArray(obj)) {\n return obj.map((member) => deepHexlify(member));\n }\n return Object.keys(obj).reduce(\n (set, key) => ({\n ...set,\n [key]: deepHexlify(obj[key]),\n }),\n {}\n );\n}\n\n/**\n * Filters out properties with undefined or null values from the provided object.\n *\n * @example\n * ```ts\n * import { filterUndefined } from \"@aa-sdk/core\";\n *\n * const result = filterUndefined({\n * foo: undefined,\n * bar: null,\n * baz: \"baz\",\n * }); // { baz: \"baz\" }\n * ```\n *\n * @param {T} obj the object from which to remove properties with undefined or null values\n * @returns {T} the object with undefined or null properties removed\n */\nexport function filterUndefined<T>(obj: T): T {\n for (const key in obj) {\n if (obj[key] == null) {\n delete obj[key];\n }\n }\n return obj as T;\n}\n\n/**\n * Picks the specified keys from an object and returns a new object containing only those key-value pairs.\n *\n * @example\n * ```ts\n * import { pick } from \"@aa-sdk/core\";\n *\n * const picked = pick({\n * foo: \"foo\",\n * bar: \"bar\",\n * }, [\"foo\"]); // { foo: \"foo\" }\n * ```\n *\n * @param {Record<string, unknown>} obj The object from which to pick keys\n * @param {string|string[]} keys A single key or an array of keys to pick from the object\n * @returns {Record<string, unknown>} A new object containing only the picked key-value pairs\n */\nexport function pick(obj: Record<string, unknown>, keys: string | string[]) {\n return Object.keys(obj)\n .filter((k) => keys.includes(k))\n .reduce((res, k) => Object.assign(res, { [k]: obj[k] }), {});\n}\n\n/**\n * Utility method for checking if the passed in values are all equal (strictly)\n *\n * @param {...any[]} params - values to check\n * @returns {boolean} a boolean indicating if all values are the same\n * @throws if no values are passed in\n */\nexport const allEqual = (...params: any[]): boolean => {\n if (params.length === 0) {\n throw new Error(\"no values passed in\");\n }\n return params.every((v) => v === params[0]);\n};\n\n/**\n * Utility method for checking the condition and return the value if condition holds true, undefined if not.\n *\n * @param {Promise<boolean>} condition - condition to check\n * @param {() => Promise<T>} value - value to return when condition holds true\n * @returns {Promise<T | undefined>} the value if condition holds true, undefined if not\n */\nexport const conditionalReturn = <T>(\n condition: Promise<boolean>,\n value: () => Promise<T>\n): Promise<T | undefined> => condition.then((t) => (t ? value() : undefined));\n\n/**\n * Converts an array of objects into a record (object) where each key is determined by the specified selector and the value is determined by the provided function.\n *\n * @example\n * ```ts\n * import { toRecord } from \"@aa-sdk/core\";\n * import { sepolia, mainnet } from \"viem/chains\";\n *\n * const addressesByChain = toRecord(\n * [sepolia, mainnet],\n * \"id\",\n * () => \"0x...\"\n * ); // { [sepolia.id]: \"0x...\", [mainnet.id]: \"0x...\" }\n * ```\n *\n * @param {T[]} array The array of objects to convert to a record\n * @param {K} selector The key used to select the property that will become the record's key\n * @param {(item: T) => V} fn The function that transforms each item in the array into the record's value\n * @returns {Record<T[K], V>} The resulting record object\n */\nexport const toRecord = <\n T extends { [K in RecordableKeys<T>]: string | number | symbol },\n K extends RecordableKeys<T>,\n V\n>(\n array: T[],\n selector: K,\n fn: (item: T) => V\n): Record<T[K], V> =>\n array.reduce((acc, item) => {\n acc[item[selector]] = fn(item);\n return acc;\n }, {} as Record<T[K], V>);\n\nexport * from \"./bigint.js\";\nexport * from \"./bytes.js\";\nexport * from \"./defaults.js\";\nexport * from \"./schema.js\";\nexport type * from \"./types.js\";\nexport * from \"./userop.js\";\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/utils/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,MAAM,CAAC;AAI7B;;;;;GAKG;AACH,MAAM,CAAC,MAAM,SAAS,GACpB,CAAU,GAAG,GAA2C,EAAE,EAAE,CAC5D,KAAK,EAAE,CAAI,EAAE,CAAK,EAAE,CAAK,EAAE,EAAE;IAC3B,IAAI,MAAM,GAAG,CAAC,CAAC;IACf,KAAK,MAAM,EAAE,IAAI,GAAG,EAAE,CAAC;QACrB,MAAM,GAAG,MAAM,EAAE,CAAC,MAAM,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC;IAClC,CAAC;IACD,OAAO,MAAM,CAAC;AAChB,CAAC,CAAC;AAOJ;;;;;GAKG;AACH,MAAM,CAAC,KAAK,UAAU,iBAAiB,CAAI,MAAqB;IAC9D,MAAM,QAAQ,GAAG,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE;QAC/C,MAAM,KAAK,GAAG,MAAM,CAAC,GAA0B,CAAC,CAAC;QACjD,OAAO,OAAO,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,EAAE,GAAG,EAAE,G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,EAC3B,KAAuB,EACC,EAAE,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC;AAE9E;;;;;;;;;;;;;;;;;;;GAmBG;AACH,MAAM,CAAC,MAAM,QAAQ,GAAG,CAKtB,KAAU,EACV,QAAW,EACX,EAAkB,EACD,EAAE,CACnB,KAAK,CAAC,MAAM,CAAC,CAAC,GAAG,EAAE,IAAI,EAAE,EAAE;IACzB,GAAG,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC,CAAC;IAC/B,OAAO,GAAG,CAAC;AACb,CAAC,EAAE,EAAqB,CAAC,CAAC;AAE5B,cAAc,aAAa,CAAC;AAC5B,cAAc,YAAY,CAAC;AAC3B,cAAc,eAAe,CAAC;AAC9B,cAAc,aAAa,CAAC;AAE5B,cAAc,aAAa,CAAC","sourcesContent":["import { toHex } from \"viem\";\nimport type { PromiseOrValue } from \"../types.js\";\nimport type { RecordableKeys } from \"./types.js\";\n\n/**\n * Utility function that allows for piping a series of async functions together\n *\n * @param {((s: S, o?: O, f?: F) => Promise<S>)[]} fns - functions to pipe\n * @returns {S} result of the pipe\n */\nexport const asyncPipe =\n <S, O, F>(...fns: ((s: S, o?: O, f?: F) => Promise<S>)[]) =>\n async (s: S, o?: O, f?: F) => {\n let result = s;\n for (const fn of fns) {\n result = await fn(result, o, f);\n }\n return result;\n };\n\n// based on @ethersproject/properties, but pulled in here to minize the dependency on ethers\nexport type Deferrable<T> = {\n [K in keyof T]: PromiseOrValue<T[K]>;\n};\n\n/**\n * Await all of the properties of a Deferrable object\n *\n * @param {Deferrable<T>} object - a Deferrable object\n * @returns {Promise<T>} the object with its properties resolved\n */\nexport async function resolveProperties<T>(object: Deferrable<T>): Promise<T> {\n const promises = Object.keys(object).map((key) => {\n const value = object[key as keyof Deferrable<T>];\n return Promise.resolve(value).then((v) => ({ key: key, value: v }));\n });\n\n const results = await Promise.all(promises);\n\n return filterUndefined<T>(\n results.reduce((accum, curr) => {\n accum[curr.key as keyof T] = curr.value;\n return accum;\n }, {} as T)\n );\n}\n\n/**\n * Recursively converts all values in an object to hex strings\n *\n * @param {any} obj - obj to deep hexlify\n * @returns {any} object with all of its values hexlified\n */\nexport function deepHexlify(obj: any): any {\n if (typeof obj === \"function\") {\n return undefined;\n }\n if (obj == null || typeof obj === \"string\" || typeof obj === \"boolean\") {\n return obj;\n } else if (typeof obj === \"bigint\") {\n return toHex(obj);\n } else if (obj._isBigNumber != null || typeof obj !== \"object\") {\n return toHex(obj).replace(/^0x0/, \"0x\");\n }\n if (Array.isArray(obj)) {\n return obj.map((member) => deepHexlify(member));\n }\n return Object.keys(obj).reduce(\n (set, key) => ({\n ...set,\n [key]: deepHexlify(obj[key]),\n }),\n {}\n );\n}\n\n/**\n * Filters out properties with undefined or null values from the provided object.\n *\n * @example\n * ```ts\n * import { filterUndefined } from \"@aa-sdk/core\";\n *\n * const result = filterUndefined({\n * foo: undefined,\n * bar: null,\n * baz: \"baz\",\n * }); // { baz: \"baz\" }\n * ```\n *\n * @param {T} obj the object from which to remove properties with undefined or null values\n * @returns {T} the object with undefined or null properties removed\n */\nexport function filterUndefined<T>(obj: T): T {\n for (const key in obj) {\n if (obj[key] == null) {\n delete obj[key];\n }\n }\n return obj as T;\n}\n\n/**\n * Picks the specified keys from an object and returns a new object containing only those key-value pairs.\n *\n * @example\n * ```ts\n * import { pick } from \"@aa-sdk/core\";\n *\n * const picked = pick({\n * foo: \"foo\",\n * bar: \"bar\",\n * }, [\"foo\"]); // { foo: \"foo\" }\n * ```\n *\n * @param {Record<string, unknown>} obj The object from which to pick keys\n * @param {string|string[]} keys A single key or an array of keys to pick from the object\n * @returns {Record<string, unknown>} A new object containing only the picked key-value pairs\n */\nexport function pick(obj: Record<string, unknown>, keys: string | string[]) {\n return Object.keys(obj)\n .filter((k) => keys.includes(k))\n .reduce((res, k) => Object.assign(res, { [k]: obj[k] }), {});\n}\n\n/**\n * Utility method for checking if the passed in values are all equal (strictly)\n *\n * @param {...any[]} params - values to check\n * @returns {boolean} a boolean indicating if all values are the same\n * @throws if no values are passed in\n */\nexport const allEqual = (...params: any[]): boolean => {\n if (params.length === 0) {\n throw new Error(\"no values passed in\");\n }\n return params.every((v) => v === params[0]);\n};\n\n/**\n * Utility method for checking the condition and return the value if condition holds true, undefined if not.\n *\n * @param {Promise<boolean>} condition - condition to check\n * @param {() => Promise<T>} value - value to return when condition holds true\n * @returns {Promise<T | undefined>} the value if condition holds true, undefined if not\n */\nexport const conditionalReturn = <T>(\n condition: Promise<boolean>,\n value: () => Promise<T>\n): Promise<T | undefined> => condition.then((t) => (t ? value() : undefined));\n\n/**\n * Converts an array of objects into a record (object) where each key is determined by the specified selector and the value is determined by the provided function.\n *\n * @example\n * ```ts\n * import { toRecord } from \"@aa-sdk/core\";\n * import { sepolia, mainnet } from \"viem/chains\";\n *\n * const addressesByChain = toRecord(\n * [sepolia, mainnet],\n * \"id\",\n * () => \"0x...\"\n * ); // { [sepolia.id]: \"0x...\", [mainnet.id]: \"0x...\" }\n * ```\n *\n * @param {T[]} array The array of objects to convert to a record\n * @param {K} selector The key used to select the property that will become the record's key\n * @param {(item: T) => V} fn The function that transforms each item in the array into the record's value\n * @returns {Record<T[K], V>} The resulting record object\n */\nexport const toRecord = <\n T extends { [K in RecordableKeys<T>]: string | number | symbol },\n K extends RecordableKeys<T>,\n V\n>(\n array: T[],\n selector: K,\n fn: (item: T) => V\n): Record<T[K], V> =>\n array.reduce((acc, item) => {\n acc[item[selector]] = fn(item);\n return acc;\n }, {} as Record<T[K], V>);\n\nexport * from \"./bigint.js\";\nexport * from \"./bytes.js\";\nexport * from \"./defaults.js\";\nexport * from \"./schema.js\";\nexport type * from \"./types.js\";\nexport * from \"./userop.js\";\n"]}
@@ -15,6 +15,9 @@ export declare const BigNumberishRangeSchema: z.ZodObject<{
15
15
  max?: number | bigint | `0x${string}` | undefined;
16
16
  }>;
17
17
  export declare const MultiplierSchema: z.ZodObject<{
18
+ /**
19
+ * Multiplier value with max precision of 4 decimal places
20
+ */
18
21
  multiplier: z.ZodEffects<z.ZodNumber, number, number>;
19
22
  }, "strict", z.ZodTypeAny, {
20
23
  multiplier: number;
@@ -7,20 +7,29 @@ export const ChainSchema = z.custom((chain) => chain != null &&
7
7
  export const HexSchema = z.custom((val) => {
8
8
  return isHex(val, { strict: true });
9
9
  });
10
+ // [!region BigNumberish]
10
11
  export const BigNumberishSchema = z.union([HexSchema, z.number(), z.bigint()]);
12
+ // [!endregion BigNumberish]
13
+ // [!region BigNumberishRange]
11
14
  export const BigNumberishRangeSchema = z
12
15
  .object({
13
16
  min: BigNumberishSchema.optional(),
14
17
  max: BigNumberishSchema.optional(),
15
18
  })
16
19
  .strict();
20
+ // [!endregion BigNumberishRange]
21
+ // [!region Multiplier]
17
22
  export const MultiplierSchema = z
18
23
  .object({
24
+ /**
25
+ * Multiplier value with max precision of 4 decimal places
26
+ */
19
27
  multiplier: z.number().refine((n) => {
20
28
  return (n.toString().split(".")[1]?.length ?? 0) <= 4;
21
29
  }, { message: "Max precision is 4 decimal places" }),
22
30
  })
23
31
  .strict();
32
+ // [!endregion Multiplier]
24
33
  export function isBigNumberish(x) {
25
34
  return x != null && BigNumberishSchema.safeParse(x).success;
26
35
  }
@@ -1 +1 @@
1
- {"version":3,"file":"schema.js","sourceRoot":"","sources":["../../../src/utils/schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAc,MAAM,MAAM,CAAC;AACzC,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC,CAAC,MAAM,CACjC,CAAC,KAAK,EAAE,EAAE,CACR,KAAK,IAAI,IAAI;IACb,OAAO,KAAK,KAAK,QAAQ;IACzB,IAAI,IAAI,KAAK;IACb,OAAO,KAAK,CA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cesContent":["import { isHex, type Chain } from \"viem\";\nimport { z } from \"zod\";\nimport type { BigNumberish, Multiplier } from \"../types\";\n\nexport const ChainSchema = z.custom<Chain>(\n (chain) =>\n chain != null &&\n typeof chain === \"object\" &&\n \"id\" in chain &&\n typeof chain.id === \"number\"\n);\n\nexport const HexSchema = z.custom<`0x${string}` | \"0x\">((val) => {\n return isHex(val, { strict: true });\n});\n\n// [!region BigNumberish]\nexport const BigNumberishSchema = z.union([HexSchema, z.number(), z.bigint()]);\n// [!endregion BigNumberish]\n\n// [!region BigNumberishRange]\nexport const BigNumberishRangeSchema = z\n .object({\n min: BigNumberishSchema.optional(),\n max: BigNumberishSchema.optional(),\n })\n .strict();\n// [!endregion BigNumberishRange]\n\n// [!region Multiplier]\nexport const MultiplierSchema = z\n .object({\n /**\n * Multiplier value with max precision of 4 decimal places\n */\n multiplier: z.number().refine(\n (n) => {\n return (n.toString().split(\".\")[1]?.length ?? 0) <= 4;\n },\n { message: \"Max precision is 4 decimal places\" }\n ),\n })\n .strict();\n// [!endregion Multiplier]\n\nexport function isBigNumberish(x: any): x is BigNumberish {\n return x != null && BigNumberishSchema.safeParse(x).success;\n}\n\nexport function isMultiplier(x: any): x is Multiplier {\n return x != null && MultiplierSchema.safeParse(x).success;\n}\n"]}
1
+ {"version":3,"file":"schema.js","sourceRoot":"","sources":["../../../src/utils/schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAc,MAAM,MAAM,CAAC;AACzC,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC,CAAC,MAAM,CACjC,CAAC,KAAK,EAAE,EAAE,CACR,KAAK,IAAI,IAAI;IACb,OAAO,KAAK,KAAK,QAAQ;IACzB,IAAI,IAAI,KAAK;IACb,OAAO,KAAK,CAAC,EAAE,KAAK,QAAQ,CAC/B,CAAC;AAEF,MAAM,CAAC,MAAM,SAAS,GAAG,CAAC,CAAC,MAAM,C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CAAC","sourcesContent":["import { isHex, type Chain } from \"viem\";\nimport { z } from \"zod\";\nimport type { BigNumberish, Multiplier } from \"../types\";\n\nexport const ChainSchema = z.custom<Chain>(\n (chain) =>\n chain != null &&\n typeof chain === \"object\" &&\n \"id\" in chain &&\n typeof chain.id === \"number\"\n);\n\nexport const HexSchema = z.custom<`0x${string}` | \"0x\">((val) => {\n return isHex(val, { strict: true });\n});\n\n// [!region BigNumberish]\nexport const BigNumberishSchema = z.union([HexSchema, z.number(), z.bigint()]);\n// [!endregion BigNumberish]\n\n// [!region BigNumberishRange]\nexport const BigNumberishRangeSchema = z\n .object({\n min: BigNumberishSchema.optional(),\n max: BigNumberishSchema.optional(),\n })\n .strict();\n// [!endregion BigNumberishRange]\n\n// [!region Multiplier]\nexport const MultiplierSchema = z\n .object({\n /**\n * Multiplier value with max precision of 4 decimal places\n */\n multiplier: z.number().refine(\n (n) => {\n return (n.toString().split(\".\")[1]?.length ?? 0) <= 4;\n },\n { message: \"Max precision is 4 decimal places\" }\n ),\n })\n .strict();\n// [!endregion Multiplier]\n\nexport function isBigNumberish(x: any): x is BigNumberish {\n return x != null && BigNumberishSchema.safeParse(x).success;\n}\n\nexport function isMultiplier(x: any): x is Multiplier {\n return x != null && MultiplierSchema.safeParse(x).success;\n}\n"]}
@@ -11,6 +11,7 @@ function serializeStateMapping(stateMapping) {
11
11
  }
12
12
  function validateBytes32HexLength(value) {
13
13
  if (value.length !== 66) {
14
+ // This is the error message from Viem's non-exported InvalidBytesLengthError.
14
15
  throw new Error(`Hex is expected to be 66 hex long, but is ${value.length} hex long.`);
15
16
  }
16
17
  }
@@ -32,6 +33,7 @@ function serializeAccountStateOverride(parameters) {
32
33
  }
33
34
  return rpcAccountStateOverride;
34
35
  }
36
+ // eslint-disable-next-line jsdoc/require-jsdoc
35
37
  export function serializeStateOverride(parameters) {
36
38
  if (!parameters)
37
39
  return undefined;
@@ -1 +1 @@
1
- {"version":3,"file":"stateOverride.js","sourceRoot":"","sources":["../../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qBAAqB,CAAC,KAAK,CAAC,CAAC;IAC/D,IAAI,SAAS,KAAK,SAAS,EAAE,CAAC;QAC5B,IAAI,uBAAuB,CAAC,KAAK;YAAE,MAAM,IAAI,4BAA4B,EAAE,CAAC;QAC5E,uBAAuB,CAAC,SAAS,GAAG,qBAAqB,CAAC,SAAS,CAAC,CAAC;IACvE,CAAC;IACD,OAAO,uBAAuB,CAAC;AACjC,CAAC;AAKD,MAAM,UAAU,sBAAsB,CACpC,UAA6C;IAE7C,IAAI,CAAC,UAAU;QAAE,OAAO,SAAS,CAAC;IAClC,MAAM,gBAAgB,GAAqB,EAAE,CAAC;IAC9C,KAAK,MAAM,EAAE,OAAO,EAAE,GAAG,YAAY,EAAE,IAAI,UAAU,EAAE,CAAC;QACtD,IAAI,CAAC,SAAS,CAAC,OAAO,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,CAAC;YACxC,MAAM,IAAI,mBAAmB,CAAC,EAAE,OAAO,EAAE,CAAC,CAAC;QAC7C,IAAI,gBAAgB,CAAC,OAAO,CAAC;YAC3B,MAAM,IAAI,yBAAyB,CAAC,EAAE,OAAO,EAAE,OAAO,EAAE,CAAC,CAAC;QAC5D,gBAAgB,CAAC,OAAO,CAAC,GAAG,6BAA6B,CAAC,YAAY,CAAC,CAAC;IAC1E,CAAC;IACD,OAAO,gBAAgB,CAAC;AAC1B,CAAC","sourcesContent":["import type { Address } from \"abitype\";\nimport {\n AccountStateConflictError,\n InvalidAddressError,\n StateAssignmentConflictError,\n isAddress,\n numberToHex,\n type RpcAccountStateOverride,\n type RpcStateMapping,\n type RpcStateOverride,\n type StateMapping,\n type StateOverride,\n} from \"viem\";\n\n// Copied from Viem's utils/stateOverride.ts, which does not expose these\n// functions.\n\ntype SerializeStateMappingParameters = StateMapping | undefined;\n\nfunction serializeStateMapping(\n stateMapping: SerializeStateMappingParameters\n): RpcStateMapping | undefined {\n if (!stateMapping || stateMapping.length === 0) return undefined;\n return stateMapping.reduce((acc, { slot, value }) => {\n validateBytes32HexLength(slot);\n validateBytes32HexLength(value);\n acc[slot] = value;\n return acc;\n }, {} as RpcStateMapping);\n}\n\nfunction validateBytes32HexLength(value: Address): void {\n if (value.length !== 66) {\n // This is the error message from Viem's non-exported InvalidBytesLengthError.\n throw new Error(\n `Hex is expected to be 66 hex long, but is ${value.length} hex long.`\n );\n }\n}\n\ntype SerializeAccountStateOverrideParameters = Omit<\n StateOverride[number],\n \"address\"\n>;\n\nfunction serializeAccountStateOverride(\n parameters: SerializeAccountStateOverrideParameters\n): RpcAccountStateOverride {\n const { balance, nonce, state, stateDiff, code } = parameters;\n const rpcAccountStateOverride: RpcAccountStateOverride = {};\n if (code !== undefined) rpcAccountStateOverride.code = code;\n if (balance !== undefined)\n rpcAccountStateOverride.balance = numberToHex(balance);\n if (nonce !== undefined) rpcAccountStateOverride.nonce = numberToHex(nonce);\n if (state !== undefined)\n rpcAccountStateOverride.state = serializeStateMapping(state);\n if (stateDiff !== undefined) {\n if (rpcAccountStateOverride.state) throw new StateAssignmentConflictError();\n rpcAccountStateOverride.stateDiff = serializeStateMapping(stateDiff);\n }\n return rpcAccountStateOverride;\n}\n\ntype SerializeStateOverrideParameters = StateOverride | undefined;\n\n// eslint-disable-next-line jsdoc/require-jsdoc\nexport function serializeStateOverride(\n parameters?: SerializeStateOverrideParameters\n): RpcStateOverride | undefined {\n if (!parameters) return undefined;\n const rpcStateOverride: RpcStateOverride = {};\n for (const { address, ...accountState } of parameters) {\n if (!isAddress(address, { strict: false }))\n throw new InvalidAddressError({ address });\n if (rpcStateOverride[address])\n throw new AccountStateConflictError({ address: address });\n rpcStateOverride[address] = serializeAccountStateOverride(accountState);\n }\n return rpcStateOverride;\n}\n"]}
1
+ {"version":3,"file":"stateOverride.js","sourceRoot":"","sources":["../../../src/utils/stateOverride.ts"],"names":[],"mappings":"AACA,OAAO,EACL,yBAAyB,EACzB,mBAAmB,EACnB,4BAA4B,EAC5B,SAAS,EACT,WAAW,GAMZ,MAAM,MAAM,CA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MAAM,IAAI,4BAA4B,EAAE,CAAC;QAC5E,uBAAuB,CAAC,SAAS,GAAG,qBAAqB,CAAC,SAAS,CAAC,CAAC;IACvE,CAAC;IACD,OAAO,uBAAuB,CAAC;AACjC,CAAC;AAID,+CAA+C;AAC/C,MAAM,UAAU,sBAAsB,CACpC,UAA6C;IAE7C,IAAI,CAAC,UAAU;QAAE,OAAO,SAAS,CAAC;IAClC,MAAM,gBAAgB,GAAqB,EAAE,CAAC;IAC9C,KAAK,MAAM,EAAE,OAAO,EAAE,GAAG,YAAY,EAAE,IAAI,UAAU,EAAE,CAAC;QACtD,IAAI,CAAC,SAAS,CAAC,OAAO,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,CAAC;YACxC,MAAM,IAAI,mBAAmB,CAAC,EAAE,OAAO,EAAE,CAAC,CAAC;QAC7C,IAAI,gBAAgB,CAAC,OAAO,CAAC;YAC3B,MAAM,IAAI,yBAAyB,CAAC,EAAE,OAAO,EAAE,OAAO,EAAE,CAAC,CAAC;QAC5D,gBAAgB,CAAC,OAAO,CAAC,GAAG,6BAA6B,CAAC,YAAY,CAAC,CAAC;IAC1E,CAAC;IACD,OAAO,gBAAgB,CAAC;AAC1B,CAAC","sourcesContent":["import type { Address } from \"abitype\";\nimport {\n AccountStateConflictError,\n InvalidAddressError,\n StateAssignmentConflictError,\n isAddress,\n numberToHex,\n type RpcAccountStateOverride,\n type RpcStateMapping,\n type RpcStateOverride,\n type StateMapping,\n type StateOverride,\n} from \"viem\";\n\n// Copied from Viem's utils/stateOverride.ts, which does not expose these\n// functions.\n\ntype SerializeStateMappingParameters = StateMapping | undefined;\n\nfunction serializeStateMapping(\n stateMapping: SerializeStateMappingParameters\n): RpcStateMapping | undefined {\n if (!stateMapping || stateMapping.length === 0) return undefined;\n return stateMapping.reduce((acc, { slot, value }) => {\n validateBytes32HexLength(slot);\n validateBytes32HexLength(value);\n acc[slot] = value;\n return acc;\n }, {} as RpcStateMapping);\n}\n\nfunction validateBytes32HexLength(value: Address): void {\n if (value.length !== 66) {\n // This is the error message from Viem's non-exported InvalidBytesLengthError.\n throw new Error(\n `Hex is expected to be 66 hex long, but is ${value.length} hex long.`\n );\n }\n}\n\ntype SerializeAccountStateOverrideParameters = Omit<\n StateOverride[number],\n \"address\"\n>;\n\nfunction serializeAccountStateOverride(\n parameters: SerializeAccountStateOverrideParameters\n): RpcAccountStateOverride {\n const { balance, nonce, state, stateDiff, code } = parameters;\n const rpcAccountStateOverride: RpcAccountStateOverride = {};\n if (code !== undefined) rpcAccountStateOverride.code = code;\n if (balance !== undefined)\n rpcAccountStateOverride.balance = numberToHex(balance);\n if (nonce !== undefined) rpcAccountStateOverride.nonce = numberToHex(nonce);\n if (state !== undefined)\n rpcAccountStateOverride.state = serializeStateMapping(state);\n if (stateDiff !== undefined) {\n if (rpcAccountStateOverride.state) throw new StateAssignmentConflictError();\n rpcAccountStateOverride.stateDiff = serializeStateMapping(stateDiff);\n }\n return rpcAccountStateOverride;\n}\n\ntype SerializeStateOverrideParameters = StateOverride | undefined;\n\n// eslint-disable-next-line jsdoc/require-jsdoc\nexport function serializeStateOverride(\n parameters?: SerializeStateOverrideParameters\n): RpcStateOverride | undefined {\n if (!parameters) return undefined;\n const rpcStateOverride: RpcStateOverride = {};\n for (const { address, ...accountState } of parameters) {\n if (!isAddress(address, { strict: false }))\n throw new InvalidAddressError({ address });\n if (rpcStateOverride[address])\n throw new AccountStateConflictError({ address: address });\n rpcStateOverride[address] = serializeAccountStateOverride(accountState);\n }\n return rpcStateOverride;\n}\n"]}
@@ -1,6 +1,28 @@
1
+ /**
2
+ * @description Constructs a type by excluding `undefined` from `T`.
3
+ *
4
+ * @example
5
+ * NoUndefined<string | undefined>
6
+ * => string
7
+ */
1
8
  export type NoUndefined<T> = T extends undefined ? never : T;
9
+ /**
10
+ * @description Checks if T is `undefined`
11
+ * @param T - Type to check
12
+ * @example
13
+ * type Result = IsUndefined<undefined>
14
+ * // ^? type Result = true
15
+ */
2
16
  export type IsUndefined<T> = [undefined] extends [T] ? true : false;
3
17
  export type RequiredBy<TType, TKeys extends keyof TType> = Required<Pick<TType, TKeys>> & Omit<TType, TKeys>;
18
+ /**
19
+ * @description Combines members of an intersection into a readable type.
20
+ *
21
+ * @see https://twitter.com/mattpocockuk/status/1622730173446557697?s=20&t=NdpAcmEFXY01xkqU3KO0Mg
22
+ * @example
23
+ * Prettify<{ a: string } & { b: string } & { c: number, d: bigint }>
24
+ * => { a: string, b: string, c: number, d: bigint }
25
+ */
4
26
  export type Prettify<T> = {
5
27
  [K in keyof T]: T[K];
6
28
  } & {};
@@ -1,2 +1,3 @@
1
+ // borrowed from viem
1
2
  export {};
2
3
  //# sourceMappingURL=types.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/utils/types.ts"],"names":[],"mappings":"","sourcesContent":["// borrowed from viem\n\n/**\n * @description Constructs a type by excluding `undefined` from `T`.\n *\n * @example\n * NoUndefined<string | undefined>\n * => string\n */\nexport type NoUndefined<T> = T extends undefined ? never : T;\n// borrowed from viem\n/**\n * @description Checks if T is `undefined`\n * @param T - Type to check\n * @example\n * type Result = IsUndefined<undefined>\n * // ^? type Result = true\n */\n\nexport type IsUndefined<T> = [undefined] extends [T] ? true : false;\n\nexport type RequiredBy<TType, TKeys extends keyof TType> = Required<\n Pick<TType, TKeys>\n> &\n Omit<TType, TKeys>;\n\n/**\n * @description Combines members of an intersection into a readable type.\n *\n * @see https://twitter.com/mattpocockuk/status/1622730173446557697?s=20&t=NdpAcmEFXY01xkqU3KO0Mg\n * @example\n * Prettify<{ a: string } & { b: string } & { c: number, d: bigint }>\n * => { a: string, b: string, c: number, d: bigint }\n */\nexport type Prettify<T> = {\n [K in keyof T]: T[K];\n} & {};\n\nexport type WithRequired<T, K extends keyof T> = Required<Pick<T, K>>;\nexport type WithOptional<T, K extends keyof T> = Pick<Partial<T>, K>;\n\n// Checks for type equivalence, evaluates always to either `true` or `false`.\n// Semantics: (EQ<A, B> = true) <==> (A <==> B)\nexport type EQ<A, B> = [A] extends [B]\n ? [B] extends [A]\n ? true\n : false\n : false;\n\n// Auxiliary type for `IsMemberOrSubtypeOfAComponent`\n// Evaluates to `true` or `boolean` if one of the explicit components (according to the TypeScript distribution\n// mechanism for union types) of the union type equals the other given type.\n// Examples:\n// EqualsOneOfTheComponents<string, string | boolean> ⟶ boolean\n// EqualsOneOfTheComponents<string, string> ⟶ true\n// EqualsOneOfTheComponents<number, string | boolean> ⟶ false\nexport type EqualsOneOfTheComponents<T, Union> = Union extends infer Component // enforce distribution\n ? EQ<T, Component>\n : never;\n\n// Auxiliary type for `IsOneOf`\nexport type IsMemberOrSubtypeOfAComponent<\n T,\n Union,\n ConjunctionOfExplicitComponentChecks extends boolean\n> = [T] extends [Union]\n ? true extends ConjunctionOfExplicitComponentChecks\n ? true\n : false\n : false;\n\n// Checks whether the given type equals one of the explicit components of the union type. Note that in this respect we\n// consider the members of the infinite types number and string as implicit since the inbuilt distribution mechanism of\n// TypeScript does not (cannot) distribute over the infinite number of strings or numbers. However, `boolean` is treated\n// by TypeScript (and accordingly here) as the explicit union `true | false`.\n//\n// In particular, the evaluation result is `false` if the type is a proper union of components of the union type. It also\n// evaluates to false if the given type is a proper subtype of one of its explicit components.\n// It always evaluates to either `true` or `false`.\n// Examples:\n// IsOneOf<number, string | number | boolean> ⟶ true\n// IsOneOf<2 | 4, 0 | 1 | 2 | 3 | 4 | 5 | 6> ⟶ false\n// IsOneOf<'text', string> ⟶ false // only implicit but not explicit component\nexport type IsOneOf<T, Union> = IsMemberOrSubtypeOfAComponent<\n T,\n Union,\n EqualsOneOfTheComponents<T, Union>\n>;\n\nexport type OneOf<T1, T2> = IsOneOf<T1, T2> extends true ? T1 : never;\n\nexport type RecordableKeys<T> = {\n [K in keyof T]: T[K] extends string | number | symbol ? K : never;\n}[keyof T];\n"]}
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/utils/types.ts"],"names":[],"mappings":"AAAA,qBAAqB","sourcesContent":["// borrowed from viem\n\n/**\n * @description Constructs a type by excluding `undefined` from `T`.\n *\n * @example\n * NoUndefined<string | undefined>\n * => string\n */\nexport type NoUndefined<T> = T extends undefined ? never : T;\n// borrowed from viem\n/**\n * @description Checks if T is `undefined`\n * @param T - Type to check\n * @example\n * type Result = IsUndefined<undefined>\n * // ^? type Result = true\n */\n\nexport type IsUndefined<T> = [undefined] extends [T] ? true : false;\n\nexport type RequiredBy<TType, TKeys extends keyof TType> = Required<\n Pick<TType, TKeys>\n> &\n Omit<TType, TKeys>;\n\n/**\n * @description Combines members of an intersection into a readable type.\n *\n * @see https://twitter.com/mattpocockuk/status/1622730173446557697?s=20&t=NdpAcmEFXY01xkqU3KO0Mg\n * @example\n * Prettify<{ a: string } & { b: string } & { c: number, d: bigint }>\n * => { a: string, b: string, c: number, d: bigint }\n */\nexport type Prettify<T> = {\n [K in keyof T]: T[K];\n} & {};\n\nexport type WithRequired<T, K extends keyof T> = Required<Pick<T, K>>;\nexport type WithOptional<T, K extends keyof T> = Pick<Partial<T>, K>;\n\n// Checks for type equivalence, evaluates always to either `true` or `false`.\n// Semantics: (EQ<A, B> = true) <==> (A <==> B)\nexport type EQ<A, B> = [A] extends [B]\n ? [B] extends [A]\n ? true\n : false\n : false;\n\n// Auxiliary type for `IsMemberOrSubtypeOfAComponent`\n// Evaluates to `true` or `boolean` if one of the explicit components (according to the TypeScript distribution\n// mechanism for union types) of the union type equals the other given type.\n// Examples:\n// EqualsOneOfTheComponents<string, string | boolean> ⟶ boolean\n// EqualsOneOfTheComponents<string, string> ⟶ true\n// EqualsOneOfTheComponents<number, string | boolean> ⟶ false\nexport type EqualsOneOfTheComponents<T, Union> = Union extends infer Component // enforce distribution\n ? EQ<T, Component>\n : never;\n\n// Auxiliary type for `IsOneOf`\nexport type IsMemberOrSubtypeOfAComponent<\n T,\n Union,\n ConjunctionOfExplicitComponentChecks extends boolean\n> = [T] extends [Union]\n ? true extends ConjunctionOfExplicitComponentChecks\n ? true\n : false\n : false;\n\n// Checks whether the given type equals one of the explicit components of the union type. Note that in this respect we\n// consider the members of the infinite types number and string as implicit since the inbuilt distribution mechanism of\n// TypeScript does not (cannot) distribute over the infinite number of strings or numbers. However, `boolean` is treated\n// by TypeScript (and accordingly here) as the explicit union `true | false`.\n//\n// In particular, the evaluation result is `false` if the type is a proper union of components of the union type. It also\n// evaluates to false if the given type is a proper subtype of one of its explicit components.\n// It always evaluates to either `true` or `false`.\n// Examples:\n// IsOneOf<number, string | number | boolean> ⟶ true\n// IsOneOf<2 | 4, 0 | 1 | 2 | 3 | 4 | 5 | 6> ⟶ false\n// IsOneOf<'text', string> ⟶ false // only implicit but not explicit component\nexport type IsOneOf<T, Union> = IsMemberOrSubtypeOfAComponent<\n T,\n Union,\n EqualsOneOfTheComponents<T, Union>\n>;\n\nexport type OneOf<T1, T2> = IsOneOf<T1, T2> extends true ? T1 : never;\n\nexport type RecordableKeys<T> = {\n [K in keyof T]: T[K] extends string | number | symbol ? K : never;\n}[keyof T];\n"]}
@@ -1,12 +1,65 @@
1
1
  import { type Hex } from "viem";
2
2
  import type { EntryPointVersion } from "../entrypoint/types";
3
3
  import type { BigNumberish, Multiplier, UserOperationFeeOptionsField, UserOperationOverrides, UserOperationRequest, UserOperationStruct } from "../types";
4
+ /**
5
+ * Utility method for asserting a UserOperationStruct has valid fields for the given entry point version
6
+ *
7
+ * @param {UserOperationStruct} request a UserOperationStruct to validate
8
+ * @returns {boolean} a type guard that asserts the UserOperationRequest is valid
9
+ */
4
10
  export declare function isValidRequest<TEntryPointVersion extends EntryPointVersion = EntryPointVersion>(request: UserOperationStruct<TEntryPointVersion>): request is UserOperationRequest<TEntryPointVersion>;
11
+ /**
12
+ * Utility method for asserting a UserOperationRequest has valid fields for the paymaster data
13
+ *
14
+ * @param {UserOperationRequest} request a UserOperationRequest to validate
15
+ * @returns {boolean} a type guard that asserts the UserOperationRequest is a UserOperationRequest
16
+ */
5
17
  export declare function isValidPaymasterAndData<TEntryPointVersion extends EntryPointVersion = EntryPointVersion>(request: UserOperationStruct<TEntryPointVersion>): boolean;
18
+ /**
19
+ * Utility method for asserting a UserOperationStruct has valid fields for the paymaster data
20
+ *
21
+ * @param {UserOperationRequest} request a UserOperationRequest to validate
22
+ * @returns {boolean} a type guard that asserts the UserOperationStruct is a UserOperationRequest
23
+ */
6
24
  export declare function isValidFactoryAndData<TEntryPointVersion extends EntryPointVersion = EntryPointVersion>(request: UserOperationStruct<TEntryPointVersion>): boolean;
25
+ /**
26
+ * Utility method for applying a UserOperationOverrides field value
27
+ * over the current value set for the field
28
+ *
29
+ * @param {BigNumberish} value the current value of the field
30
+ * @param {BigNumberish | Multiplier} override the override value to apply
31
+ * @returns {BigNumberish} the new value of the field after applying the override
32
+ */
7
33
  export declare function applyUserOpOverride<TValue extends BigNumberish | undefined>(value: TValue, override?: BigNumberish | Multiplier): TValue | BigNumberish;
34
+ /**
35
+ * Utility method for applying a UserOperationFeeOptionsField value
36
+ * over the current value set for the field
37
+ *
38
+ * @param {BigNumberish} value the current value of the field
39
+ * @param {UserOperationFeeOptionsField} feeOption the override value to apply
40
+ * @returns {BigNumberish} the new value of the field after applying the override
41
+ */
8
42
  export declare function applyUserOpFeeOption<TValue extends BigNumberish | undefined>(value: TValue, feeOption?: UserOperationFeeOptionsField): TValue | BigNumberish;
43
+ /**
44
+ * Utility method for applying a UserOperationOverrides field value and
45
+ * a UserOperationFeeOptionsField value over the current value set for the field,
46
+ * with the override taking precedence over the fee option
47
+ *
48
+ * @param {BigNumberish} value the current value of the field
49
+ * @param {BigNumberish | Multiplier} [override] the override value to apply
50
+ * @param {UserOperationFeeOptionsField} [feeOption] the fee option field value to apply
51
+ * @returns {BigNumberish} the new value of the field after applying the override or fee option
52
+ */
9
53
  export declare function applyUserOpOverrideOrFeeOption<TValue extends BigNumberish | undefined>(value: TValue, override?: BigNumberish | Multiplier, feeOption?: UserOperationFeeOptionsField): TValue | BigNumberish;
54
+ /**
55
+ * Utility method for checking whether the middleware pipeline should
56
+ * bypass the paymaster middleware for the user operation with the given overrides,
57
+ * either because the UserOp is paying for its own gas, or passing a specific paymaster
58
+ *
59
+ * @template EntryPointVersion TEntryPointVersion
60
+ * @param {UserOperationOverrides<TEntryPointVersion> | undefined} overrides the user operation overrides to check
61
+ * @returns {boolean} whether the paymaster middleware should be bypassed
62
+ */
10
63
  export declare const bypassPaymasterAndData: <TEntryPointVersion extends keyof import("../entrypoint/types").EntryPointRegistryBase<unknown> = keyof import("../entrypoint/types").EntryPointRegistryBase<unknown>>(overrides: Partial<{
11
64
  callGasLimit: {
12
65
  multiplier: number;
@@ -26,6 +79,15 @@ export declare const bypassPaymasterAndData: <TEntryPointVersion extends keyof i
26
79
  nonceKey: bigint;
27
80
  stateOverride: import("viem").StateOverride;
28
81
  } & import("../types").UserOperationPaymasterOverrides<TEntryPointVersion>> | undefined) => boolean;
82
+ /**
83
+ * An alternative to `bypassPaymasterAndData` which only returns true if the data parameter
84
+ * is "0x," this is useful for cases when middleware should be bypassed ONLY IF the UserOp will
85
+ * pay for its own gas
86
+ *
87
+ * @template EntryPointVersion TEntryPointVersion
88
+ * @param {UserOperationOverrides<TEntryPointVersion> | undefined} overrides the user operation overrides to check
89
+ * @returns {boolean} whether the paymaster middleware should be bypassed
90
+ */
29
91
  export declare const bypassPaymasterAndDataEmptyHex: <TEntryPointVersion extends keyof import("../entrypoint/types").EntryPointRegistryBase<unknown> = keyof import("../entrypoint/types").EntryPointRegistryBase<unknown>>(overrides: Partial<{
30
92
  callGasLimit: {
31
93
  multiplier: number;
@@ -45,5 +107,22 @@ export declare const bypassPaymasterAndDataEmptyHex: <TEntryPointVersion extends
45
107
  nonceKey: bigint;
46
108
  stateOverride: import("viem").StateOverride;
47
109
  } & import("../types").UserOperationPaymasterOverrides<TEntryPointVersion>> | undefined) => boolean;
110
+ /**
111
+ * Utility method for parsing the paymaster address and paymasterData from the paymasterAndData hex string
112
+ *
113
+ * @param {Hex} paymasterAndData the paymaster and data hex string to parse.
114
+ * The hex string refers to the paymasterAndData field of entrypoint v0.6 user operation request
115
+ * @returns {{ paymaster: Hex; paymasterData: Hex}} the parsed paymaster and paymasterData fields of entrypoint v0.7 user operation request paymaster and paymasterData field
116
+ */
48
117
  export declare const parsePaymasterAndData: (paymasterAndData: Hex) => Pick<UserOperationRequest<"0.7.0">, "paymaster" | "paymasterData">;
118
+ /**
119
+ * Utility method for converting the object containing the paymaster address and paymaster data
120
+ * to the paymaster and data concatenated hex string
121
+ *
122
+ * @param {{ paymaster: Hex; paymasterData: Hex}} paymasterAndData the object containing the picked paymaster and paymasterData fields of
123
+ * entrypoint v0.7 user operation request
124
+ * @param {Hex} paymasterAndData.paymaster the paymaster address
125
+ * @param {Hex} paymasterAndData.paymasterData the paymaster data
126
+ * @returns {Hex} the paymasterAndData hex value of entrypoint v0.6 user operation request paymasterAndData field
127
+ */
49
128
  export declare const concatPaymasterAndData: ({ paymaster, paymasterData, }: Pick<UserOperationRequest<"0.7.0">, "paymaster" | "paymasterData">) => Hex;
@@ -1,7 +1,14 @@
1
1
  import { concat } from "viem";
2
2
  import { bigIntClamp, bigIntMultiply } from "./bigint.js";
3
3
  import { allEqual, isBigNumberish } from "./index.js";
4
+ /**
5
+ * Utility method for asserting a UserOperationStruct has valid fields for the given entry point version
6
+ *
7
+ * @param {UserOperationStruct} request a UserOperationStruct to validate
8
+ * @returns {boolean} a type guard that asserts the UserOperationRequest is valid
9
+ */
4
10
  export function isValidRequest(request) {
11
+ // These are the only ones marked as optional in the interface above
5
12
  return (BigInt(request.callGasLimit || 0n) > 0n &&
6
13
  BigInt(request.maxFeePerGas || 0n) > 0n &&
7
14
  BigInt(request.preVerificationGas || 0n) > 0n &&
@@ -10,19 +17,41 @@ export function isValidRequest(request) {
10
17
  isValidPaymasterAndData(request) &&
11
18
  isValidFactoryAndData(request));
12
19
  }
20
+ /**
21
+ * Utility method for asserting a UserOperationRequest has valid fields for the paymaster data
22
+ *
23
+ * @param {UserOperationRequest} request a UserOperationRequest to validate
24
+ * @returns {boolean} a type guard that asserts the UserOperationRequest is a UserOperationRequest
25
+ */
13
26
  export function isValidPaymasterAndData(request) {
14
27
  if ("paymasterAndData" in request) {
15
28
  return request.paymasterAndData != null;
16
29
  }
30
+ // either all exist, or none.
17
31
  return allEqual(request.paymaster == null, request.paymasterData == null, request.paymasterPostOpGasLimit == null, request.paymasterVerificationGasLimit == null);
18
32
  }
33
+ /**
34
+ * Utility method for asserting a UserOperationStruct has valid fields for the paymaster data
35
+ *
36
+ * @param {UserOperationRequest} request a UserOperationRequest to validate
37
+ * @returns {boolean} a type guard that asserts the UserOperationStruct is a UserOperationRequest
38
+ */
19
39
  export function isValidFactoryAndData(request) {
20
40
  if ("initCode" in request) {
21
41
  const { initCode } = request;
22
42
  return initCode != null;
23
43
  }
44
+ // either all exist, or none.
24
45
  return allEqual(request.factory == null, request.factoryData == null);
25
46
  }
47
+ /**
48
+ * Utility method for applying a UserOperationOverrides field value
49
+ * over the current value set for the field
50
+ *
51
+ * @param {BigNumberish} value the current value of the field
52
+ * @param {BigNumberish | Multiplier} override the override value to apply
53
+ * @returns {BigNumberish} the new value of the field after applying the override
54
+ */
26
55
  export function applyUserOpOverride(value, override) {
27
56
  if (override == null) {
28
57
  return value;
@@ -30,10 +59,19 @@ export function applyUserOpOverride(value, override) {
30
59
  if (isBigNumberish(override)) {
31
60
  return override;
32
61
  }
62
+ // multiplier override
33
63
  else {
34
64
  return value != null ? bigIntMultiply(value, override.multiplier) : value;
35
65
  }
36
66
  }
67
+ /**
68
+ * Utility method for applying a UserOperationFeeOptionsField value
69
+ * over the current value set for the field
70
+ *
71
+ * @param {BigNumberish} value the current value of the field
72
+ * @param {UserOperationFeeOptionsField} feeOption the override value to apply
73
+ * @returns {BigNumberish} the new value of the field after applying the override
74
+ */
37
75
  export function applyUserOpFeeOption(value, feeOption) {
38
76
  if (feeOption == null) {
39
77
  return value;
@@ -44,19 +82,64 @@ export function applyUserOpFeeOption(value, feeOption) {
44
82
  : value, feeOption.min, feeOption.max)
45
83
  : feeOption.min ?? 0n;
46
84
  }
85
+ /**
86
+ * Utility method for applying a UserOperationOverrides field value and
87
+ * a UserOperationFeeOptionsField value over the current value set for the field,
88
+ * with the override taking precedence over the fee option
89
+ *
90
+ * @param {BigNumberish} value the current value of the field
91
+ * @param {BigNumberish | Multiplier} [override] the override value to apply
92
+ * @param {UserOperationFeeOptionsField} [feeOption] the fee option field value to apply
93
+ * @returns {BigNumberish} the new value of the field after applying the override or fee option
94
+ */
47
95
  export function applyUserOpOverrideOrFeeOption(value, override, feeOption) {
48
96
  return value != null && override != null
49
97
  ? applyUserOpOverride(value, override)
50
98
  : applyUserOpFeeOption(value, feeOption);
51
99
  }
100
+ /**
101
+ * Utility method for checking whether the middleware pipeline should
102
+ * bypass the paymaster middleware for the user operation with the given overrides,
103
+ * either because the UserOp is paying for its own gas, or passing a specific paymaster
104
+ *
105
+ * @template EntryPointVersion TEntryPointVersion
106
+ * @param {UserOperationOverrides<TEntryPointVersion> | undefined} overrides the user operation overrides to check
107
+ * @returns {boolean} whether the paymaster middleware should be bypassed
108
+ */
52
109
  export const bypassPaymasterAndData = (overrides) => !!overrides &&
53
110
  ("paymasterAndData" in overrides || "paymasterData" in overrides);
111
+ /**
112
+ * An alternative to `bypassPaymasterAndData` which only returns true if the data parameter
113
+ * is "0x," this is useful for cases when middleware should be bypassed ONLY IF the UserOp will
114
+ * pay for its own gas
115
+ *
116
+ * @template EntryPointVersion TEntryPointVersion
117
+ * @param {UserOperationOverrides<TEntryPointVersion> | undefined} overrides the user operation overrides to check
118
+ * @returns {boolean} whether the paymaster middleware should be bypassed
119
+ */
54
120
  export const bypassPaymasterAndDataEmptyHex = (overrides) => overrides !== undefined &&
55
121
  (("paymasterAndData" in overrides && overrides.paymasterAndData === "0x") ||
56
122
  ("paymasterData" in overrides && overrides.paymasterData === "0x"));
123
+ /**
124
+ * Utility method for parsing the paymaster address and paymasterData from the paymasterAndData hex string
125
+ *
126
+ * @param {Hex} paymasterAndData the paymaster and data hex string to parse.
127
+ * The hex string refers to the paymasterAndData field of entrypoint v0.6 user operation request
128
+ * @returns {{ paymaster: Hex; paymasterData: Hex}} the parsed paymaster and paymasterData fields of entrypoint v0.7 user operation request paymaster and paymasterData field
129
+ */
57
130
  export const parsePaymasterAndData = (paymasterAndData) => ({
58
131
  paymaster: paymasterAndData.substring(0, 42),
59
132
  paymasterData: `0x${paymasterAndData.substring(42)}`,
60
133
  });
134
+ /**
135
+ * Utility method for converting the object containing the paymaster address and paymaster data
136
+ * to the paymaster and data concatenated hex string
137
+ *
138
+ * @param {{ paymaster: Hex; paymasterData: Hex}} paymasterAndData the object containing the picked paymaster and paymasterData fields of
139
+ * entrypoint v0.7 user operation request
140
+ * @param {Hex} paymasterAndData.paymaster the paymaster address
141
+ * @param {Hex} paymasterAndData.paymasterData the paymaster data
142
+ * @returns {Hex} the paymasterAndData hex value of entrypoint v0.6 user operation request paymasterAndData field
143
+ */
61
144
  export const concatPaymasterAndData = ({ paymaster = "0x", paymasterData = "0x", }) => concat([paymaster, paymasterData]);
62
145
  //# sourceMappingURL=userop.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"userop.js","sourceRoot":"","sources":["../../../src/utils/userop.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAA0B,MAAM,MAAM,CAAC;AAYtD,OAAO,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAC1D,OAAO,EAAE,QAAQ,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAQtD,MAAM,UAAU,cAAc,CAG5B,OAAgD;IAGhD,OAAO,CACL,MAAM,CAAC,OAAO,CAAC,YAAY,IAAI,EAAE,CAAC,GAAG,EAAE;QACvC,MAAM,CAAC,OAAO,CAAC,YAAY,IAAI,EAAE,CAAC,GAAG,EAAE;QACvC,MAAM,CAAC,OAAO,CAAC,kBAAkB,IAAI,EAAE,CAAC,GAAG,EAAE;QAC7C,MAAM,CAAC,OAAO,CAAC,oBAAo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AC,EAAE,CAAC,EAAS;CAC5D,CAAC,CAAC;AAYH,MAAM,CAAC,MAAM,sBAAsB,GAAG,CAAC,EACrC,SAAS,GAAG,IAAI,EAChB,aAAa,GAAG,IAAI,GAC+C,EAAO,EAAE,CAC5E,MAAM,CAAC,CAAC,SAAS,EAAE,aAAa,CAAC,CAAC,CAAC","sourcesContent":["import { concat, type Address, type Hex } from \"viem\";\nimport type { EntryPointVersion } from \"../entrypoint/types\";\nimport type {\n BigNumberish,\n Multiplier,\n UserOperationFeeOptionsField,\n UserOperationOverrides,\n UserOperationRequest,\n UserOperationStruct,\n UserOperationStruct_v6,\n UserOperationStruct_v7,\n} from \"../types\";\nimport { bigIntClamp, bigIntMultiply } from \"./bigint.js\";\nimport { allEqual, isBigNumberish } from \"./index.js\";\n\n/**\n * Utility method for asserting a UserOperationStruct has valid fields for the given entry point version\n *\n * @param {UserOperationStruct} request a UserOperationStruct to validate\n * @returns {boolean} a type guard that asserts the UserOperationRequest is valid\n */\nexport function isValidRequest<\n TEntryPointVersion extends EntryPointVersion = EntryPointVersion\n>(\n request: UserOperationStruct<TEntryPointVersion>\n): request is UserOperationRequest<TEntryPointVersion> {\n // These are the only ones marked as optional in the interface above\n return (\n BigInt(request.callGasLimit || 0n) > 0n &&\n BigInt(request.maxFeePerGas || 0n) > 0n &&\n BigInt(request.preVerificationGas || 0n) > 0n &&\n BigInt(request.verificationGasLimit || 0n) > 0n &&\n request.maxPriorityFeePerGas != null &&\n isValidPaymasterAndData(request) &&\n isValidFactoryAndData(request)\n );\n}\n\n/**\n * Utility method for asserting a UserOperationRequest has valid fields for the paymaster data\n *\n * @param {UserOperationRequest} request a UserOperationRequest to validate\n * @returns {boolean} a type guard that asserts the UserOperationRequest is a UserOperationRequest\n */\nexport function isValidPaymasterAndData<\n TEntryPointVersion extends EntryPointVersion = EntryPointVersion\n>(request: UserOperationStruct<TEntryPointVersion>): boolean {\n if (\"paymasterAndData\" in request) {\n return (request as UserOperationStruct_v6).paymasterAndData != null;\n }\n\n // either all exist, or none.\n return allEqual(\n (request as UserOperationStruct_v7).paymaster == null,\n (request as UserOperationStruct_v7).paymasterData == null,\n (request as UserOperationStruct_v7).paymasterPostOpGasLimit == null,\n (request as UserOperationStruct_v7).paymasterVerificationGasLimit == null\n );\n}\n\n/**\n * Utility method for asserting a UserOperationStruct has valid fields for the paymaster data\n *\n * @param {UserOperationRequest} request a UserOperationRequest to validate\n * @returns {boolean} a type guard that asserts the UserOperationStruct is a UserOperationRequest\n */\nexport function isValidFactoryAndData<\n TEntryPointVersion extends EntryPointVersion = EntryPointVersion\n>(request: UserOperationStruct<TEntryPointVersion>): boolean {\n if (\"initCode\" in request) {\n const { initCode } = request as UserOperationStruct_v6;\n return initCode != null;\n }\n\n // either all exist, or none.\n return allEqual(\n (request as UserOperationStruct_v7).factory == null,\n (request as UserOperationStruct_v7).factoryData == null\n );\n}\n\n/**\n * Utility method for applying a UserOperationOverrides field value\n * over the current value set for the field\n *\n * @param {BigNumberish} value the current value of the field\n * @param {BigNumberish | Multiplier} override the override value to apply\n * @returns {BigNumberish} the new value of the field after applying the override\n */\nexport function applyUserOpOverride<TValue extends BigNumberish | undefined>(\n value: TValue,\n override?: BigNumberish | Multiplier\n): TValue | BigNumberish {\n if (override == null) {\n return value;\n }\n\n if (isBigNumberish(override)) {\n return override;\n }\n\n // multiplier override\n else {\n return value != null ? bigIntMultiply(value, override.multiplier) : value;\n }\n}\n\n/**\n * Utility method for applying a UserOperationFeeOptionsField value\n * over the current value set for the field\n *\n * @param {BigNumberish} value the current value of the field\n * @param {UserOperationFeeOptionsField} feeOption the override value to apply\n * @returns {BigNumberish} the new value of the field after applying the override\n */\nexport function applyUserOpFeeOption<TValue extends BigNumberish | undefined>(\n value: TValue,\n feeOption?: UserOperationFeeOptionsField\n): TValue | BigNumberish {\n if (feeOption == null) {\n return value;\n }\n\n return value != null\n ? bigIntClamp(\n feeOption.multiplier\n ? bigIntMultiply(value, feeOption.multiplier)\n : value,\n feeOption.min,\n feeOption.max\n )\n : feeOption.min ?? 0n;\n}\n\n/**\n * Utility method for applying a UserOperationOverrides field value and\n * a UserOperationFeeOptionsField value over the current value set for the field,\n * with the override taking precedence over the fee option\n *\n * @param {BigNumberish} value the current value of the field\n * @param {BigNumberish | Multiplier} [override] the override value to apply\n * @param {UserOperationFeeOptionsField} [feeOption] the fee option field value to apply\n * @returns {BigNumberish} the new value of the field after applying the override or fee option\n */\nexport function applyUserOpOverrideOrFeeOption<\n TValue extends BigNumberish | undefined\n>(\n value: TValue,\n override?: BigNumberish | Multiplier,\n feeOption?: UserOperationFeeOptionsField\n): TValue | BigNumberish {\n return value != null && override != null\n ? applyUserOpOverride(value, override)!\n : applyUserOpFeeOption(value, feeOption);\n}\n\n/**\n * Utility method for checking whether the middleware pipeline should\n * bypass the paymaster middleware for the user operation with the given overrides,\n * either because the UserOp is paying for its own gas, or passing a specific paymaster\n *\n * @template EntryPointVersion TEntryPointVersion\n * @param {UserOperationOverrides<TEntryPointVersion> | undefined} overrides the user operation overrides to check\n * @returns {boolean} whether the paymaster middleware should be bypassed\n */\nexport const bypassPaymasterAndData = <\n TEntryPointVersion extends EntryPointVersion = EntryPointVersion\n>(\n overrides: UserOperationOverrides<TEntryPointVersion> | undefined\n): boolean =>\n !!overrides &&\n (\"paymasterAndData\" in overrides || \"paymasterData\" in overrides);\n\n/**\n * An alternative to `bypassPaymasterAndData` which only returns true if the data parameter\n * is \"0x,\" this is useful for cases when middleware should be bypassed ONLY IF the UserOp will\n * pay for its own gas\n *\n * @template EntryPointVersion TEntryPointVersion\n * @param {UserOperationOverrides<TEntryPointVersion> | undefined} overrides the user operation overrides to check\n * @returns {boolean} whether the paymaster middleware should be bypassed\n */\nexport const bypassPaymasterAndDataEmptyHex = <\n TEntryPointVersion extends EntryPointVersion = EntryPointVersion\n>(\n overrides: UserOperationOverrides<TEntryPointVersion> | undefined\n): boolean =>\n overrides !== undefined &&\n ((\"paymasterAndData\" in overrides && overrides.paymasterAndData === \"0x\") ||\n (\"paymasterData\" in overrides && overrides.paymasterData === \"0x\"));\n\n/**\n * Utility method for parsing the paymaster address and paymasterData from the paymasterAndData hex string\n *\n * @param {Hex} paymasterAndData the paymaster and data hex string to parse.\n * The hex string refers to the paymasterAndData field of entrypoint v0.6 user operation request\n * @returns {{ paymaster: Hex; paymasterData: Hex}} the parsed paymaster and paymasterData fields of entrypoint v0.7 user operation request paymaster and paymasterData field\n */\nexport const parsePaymasterAndData = (\n paymasterAndData: Hex\n): Pick<UserOperationRequest<\"0.7.0\">, \"paymaster\" | \"paymasterData\"> => ({\n paymaster: paymasterAndData.substring(0, 42) as Address,\n paymasterData: `0x${paymasterAndData.substring(42)}` as Hex,\n});\n\n/**\n * Utility method for converting the object containing the paymaster address and paymaster data\n * to the paymaster and data concatenated hex string\n *\n * @param {{ paymaster: Hex; paymasterData: Hex}} paymasterAndData the object containing the picked paymaster and paymasterData fields of\n * entrypoint v0.7 user operation request\n * @param {Hex} paymasterAndData.paymaster the paymaster address\n * @param {Hex} paymasterAndData.paymasterData the paymaster data\n * @returns {Hex} the paymasterAndData hex value of entrypoint v0.6 user operation request paymasterAndData field\n */\nexport const concatPaymasterAndData = ({\n paymaster = \"0x\",\n paymasterData = \"0x\",\n}: Pick<UserOperationRequest<\"0.7.0\">, \"paymaster\" | \"paymasterData\">): Hex =>\n concat([paymaster, paymasterData]);\n"]}
1
+ {"version":3,"file":"userop.js","sourceRoot":"","sources":["../../../src/utils/userop.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAA0B,MAAM,MAAM,CAAC;AAYtD,OAAO,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAC1D,OAAO,EAAE,QAAQ,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAEtD;;;;;GAKG;AACH,MAAM,UAAU,cAAc,CAG5B,OAAgD;IAEhD,oEAAoE;IACpE,OAAO,CACL,MAAM,CAAC,OAAO,CAAC,YAAY,IAAI,EAAE,CAAC,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,kBAAkB,IAAI,SAAS,IAAI,SAAS,CAAC,gBAAgB,KAAK,IAAI,CAAC;QACvE,CAAC,eAAe,IAAI,SAAS,IAAI,SAAS,CAAC,aAAa,KAAK,IAAI,CAAC,CAAC,CAAC;AAExE;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,qBAAqB,GAAG,CACnC,gBAAqB,EAC+C,EAAE,CAAC,CAAC;IACxE,SAAS,EAAE,gBAAgB,CAAC,SAAS,CAAC,CAAC,EAAE,EAAE,CAAY;IACvD,aAAa,EAAE,KAAK,gBAAgB,CAAC,SAAS,CAAC,EAAE,CAAC,EAAS;CAC5D,CAAC,CAAC;AAEH;;;;;;;;;GASG;AACH,MAAM,CAAC,MAAM,sBAAsB,GAAG,CAAC,EACrC,SAAS,GAAG,IAAI,EAChB,aAAa,GAAG,IAAI,GAC+C,EAAO,EAAE,CAC5E,MAAM,CAAC,CAAC,SAAS,EAAE,aAAa,CAAC,CAAC,CAAC","sourcesContent":["import { concat, type Address, type Hex } from \"viem\";\nimport type { EntryPointVersion } from \"../entrypoint/types\";\nimport type {\n BigNumberish,\n Multiplier,\n UserOperationFeeOptionsField,\n UserOperationOverrides,\n UserOperationRequest,\n UserOperationStruct,\n UserOperationStruct_v6,\n UserOperationStruct_v7,\n} from \"../types\";\nimport { bigIntClamp, bigIntMultiply } from \"./bigint.js\";\nimport { allEqual, isBigNumberish } from \"./index.js\";\n\n/**\n * Utility method for asserting a UserOperationStruct has valid fields for the given entry point version\n *\n * @param {UserOperationStruct} request a UserOperationStruct to validate\n * @returns {boolean} a type guard that asserts the UserOperationRequest is valid\n */\nexport function isValidRequest<\n TEntryPointVersion extends EntryPointVersion = EntryPointVersion\n>(\n request: UserOperationStruct<TEntryPointVersion>\n): request is UserOperationRequest<TEntryPointVersion> {\n // These are the only ones marked as optional in the interface above\n return (\n BigInt(request.callGasLimit || 0n) > 0n &&\n BigInt(request.maxFeePerGas || 0n) > 0n &&\n BigInt(request.preVerificationGas || 0n) > 0n &&\n BigInt(request.verificationGasLimit || 0n) > 0n &&\n request.maxPriorityFeePerGas != null &&\n isValidPaymasterAndData(request) &&\n isValidFactoryAndData(request)\n );\n}\n\n/**\n * Utility method for asserting a UserOperationRequest has valid fields for the paymaster data\n *\n * @param {UserOperationRequest} request a UserOperationRequest to validate\n * @returns {boolean} a type guard that asserts the UserOperationRequest is a UserOperationRequest\n */\nexport function isValidPaymasterAndData<\n TEntryPointVersion extends EntryPointVersion = EntryPointVersion\n>(request: UserOperationStruct<TEntryPointVersion>): boolean {\n if (\"paymasterAndData\" in request) {\n return (request as UserOperationStruct_v6).paymasterAndData != null;\n }\n\n // either all exist, or none.\n return allEqual(\n (request as UserOperationStruct_v7).paymaster == null,\n (request as UserOperationStruct_v7).paymasterData == null,\n (request as UserOperationStruct_v7).paymasterPostOpGasLimit == null,\n (request as UserOperationStruct_v7).paymasterVerificationGasLimit == null\n );\n}\n\n/**\n * Utility method for asserting a UserOperationStruct has valid fields for the paymaster data\n *\n * @param {UserOperationRequest} request a UserOperationRequest to validate\n * @returns {boolean} a type guard that asserts the UserOperationStruct is a UserOperationRequest\n */\nexport function isValidFactoryAndData<\n TEntryPointVersion extends EntryPointVersion = EntryPointVersion\n>(request: UserOperationStruct<TEntryPointVersion>): boolean {\n if (\"initCode\" in request) {\n const { initCode } = request as UserOperationStruct_v6;\n return initCode != null;\n }\n\n // either all exist, or none.\n return allEqual(\n (request as UserOperationStruct_v7).factory == null,\n (request as UserOperationStruct_v7).factoryData == null\n );\n}\n\n/**\n * Utility method for applying a UserOperationOverrides field value\n * over the current value set for the field\n *\n * @param {BigNumberish} value the current value of the field\n * @param {BigNumberish | Multiplier} override the override value to apply\n * @returns {BigNumberish} the new value of the field after applying the override\n */\nexport function applyUserOpOverride<TValue extends BigNumberish | undefined>(\n value: TValue,\n override?: BigNumberish | Multiplier\n): TValue | BigNumberish {\n if (override == null) {\n return value;\n }\n\n if (isBigNumberish(override)) {\n return override;\n }\n\n // multiplier override\n else {\n return value != null ? bigIntMultiply(value, override.multiplier) : value;\n }\n}\n\n/**\n * Utility method for applying a UserOperationFeeOptionsField value\n * over the current value set for the field\n *\n * @param {BigNumberish} value the current value of the field\n * @param {UserOperationFeeOptionsField} feeOption the override value to apply\n * @returns {BigNumberish} the new value of the field after applying the override\n */\nexport function applyUserOpFeeOption<TValue extends BigNumberish | undefined>(\n value: TValue,\n feeOption?: UserOperationFeeOptionsField\n): TValue | BigNumberish {\n if (feeOption == null) {\n return value;\n }\n\n return value != null\n ? bigIntClamp(\n feeOption.multiplier\n ? bigIntMultiply(value, feeOption.multiplier)\n : value,\n feeOption.min,\n feeOption.max\n )\n : feeOption.min ?? 0n;\n}\n\n/**\n * Utility method for applying a UserOperationOverrides field value and\n * a UserOperationFeeOptionsField value over the current value set for the field,\n * with the override taking precedence over the fee option\n *\n * @param {BigNumberish} value the current value of the field\n * @param {BigNumberish | Multiplier} [override] the override value to apply\n * @param {UserOperationFeeOptionsField} [feeOption] the fee option field value to apply\n * @returns {BigNumberish} the new value of the field after applying the override or fee option\n */\nexport function applyUserOpOverrideOrFeeOption<\n TValue extends BigNumberish | undefined\n>(\n value: TValue,\n override?: BigNumberish | Multiplier,\n feeOption?: UserOperationFeeOptionsField\n): TValue | BigNumberish {\n return value != null && override != null\n ? applyUserOpOverride(value, override)!\n : applyUserOpFeeOption(value, feeOption);\n}\n\n/**\n * Utility method for checking whether the middleware pipeline should\n * bypass the paymaster middleware for the user operation with the given overrides,\n * either because the UserOp is paying for its own gas, or passing a specific paymaster\n *\n * @template EntryPointVersion TEntryPointVersion\n * @param {UserOperationOverrides<TEntryPointVersion> | undefined} overrides the user operation overrides to check\n * @returns {boolean} whether the paymaster middleware should be bypassed\n */\nexport const bypassPaymasterAndData = <\n TEntryPointVersion extends EntryPointVersion = EntryPointVersion\n>(\n overrides: UserOperationOverrides<TEntryPointVersion> | undefined\n): boolean =>\n !!overrides &&\n (\"paymasterAndData\" in overrides || \"paymasterData\" in overrides);\n\n/**\n * An alternative to `bypassPaymasterAndData` which only returns true if the data parameter\n * is \"0x,\" this is useful for cases when middleware should be bypassed ONLY IF the UserOp will\n * pay for its own gas\n *\n * @template EntryPointVersion TEntryPointVersion\n * @param {UserOperationOverrides<TEntryPointVersion> | undefined} overrides the user operation overrides to check\n * @returns {boolean} whether the paymaster middleware should be bypassed\n */\nexport const bypassPaymasterAndDataEmptyHex = <\n TEntryPointVersion extends EntryPointVersion = EntryPointVersion\n>(\n overrides: UserOperationOverrides<TEntryPointVersion> | undefined\n): boolean =>\n overrides !== undefined &&\n ((\"paymasterAndData\" in overrides && overrides.paymasterAndData === \"0x\") ||\n (\"paymasterData\" in overrides && overrides.paymasterData === \"0x\"));\n\n/**\n * Utility method for parsing the paymaster address and paymasterData from the paymasterAndData hex string\n *\n * @param {Hex} paymasterAndData the paymaster and data hex string to parse.\n * The hex string refers to the paymasterAndData field of entrypoint v0.6 user operation request\n * @returns {{ paymaster: Hex; paymasterData: Hex}} the parsed paymaster and paymasterData fields of entrypoint v0.7 user operation request paymaster and paymasterData field\n */\nexport const parsePaymasterAndData = (\n paymasterAndData: Hex\n): Pick<UserOperationRequest<\"0.7.0\">, \"paymaster\" | \"paymasterData\"> => ({\n paymaster: paymasterAndData.substring(0, 42) as Address,\n paymasterData: `0x${paymasterAndData.substring(42)}` as Hex,\n});\n\n/**\n * Utility method for converting the object containing the paymaster address and paymaster data\n * to the paymaster and data concatenated hex string\n *\n * @param {{ paymaster: Hex; paymasterData: Hex}} paymasterAndData the object containing the picked paymaster and paymasterData fields of\n * entrypoint v0.7 user operation request\n * @param {Hex} paymasterAndData.paymaster the paymaster address\n * @param {Hex} paymasterAndData.paymasterData the paymaster data\n * @returns {Hex} the paymasterAndData hex value of entrypoint v0.6 user operation request paymasterAndData field\n */\nexport const concatPaymasterAndData = ({\n paymaster = \"0x\",\n paymasterData = \"0x\",\n}: Pick<UserOperationRequest<\"0.7.0\">, \"paymaster\" | \"paymasterData\">): Hex =>\n concat([paymaster, paymasterData]);\n"]}
@@ -1 +1 @@
1
- export declare const VERSION = "4.0.0-alpha.9";
1
+ export declare const VERSION = "4.0.0-beta.0";
@@ -1,2 +1,4 @@
1
- export const VERSION = "4.0.0-alpha.9";
1
+ // This file is autogenerated by inject-version.ts. Any changes will be
2
+ // overwritten on commit!
3
+ export const VERSION = "4.0.0-beta.0";
2
4
  //# sourceMappingURL=version.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"version.js","sourceRoot":"","sources":["../../src/version.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,OAAO,GAAG,eAAe,CAAC","sourcesContent":["// This file is autogenerated by inject-version.ts. Any changes will be\n// overwritten on commit!\nexport const VERSION = \"4.0.0-alpha.9\";\n"]}
1
+ {"version":3,"file":"version.js","sourceRoot":"","sources":["../../src/version.ts"],"names":[],"mappings":"AAAA,uEAAuE;AACvE,yBAAyB;AACzB,MAAM,CAAC,MAAM,OAAO,GAAG,cAAc,CAAC","sourcesContent":["// This file is autogenerated by inject-version.ts. Any changes will be\n// overwritten on commit!\nexport const VERSION = \"4.0.0-beta.0\";\n"]}
@@ -53,7 +53,7 @@ export type SmartContractAccount<Name extends string = string, TEntryPointVersio
53
53
  }) => Promise<Hex>;
54
54
  signTypedDataWith6492: <const typedData extends TypedData | Record<string, unknown>, primaryType extends keyof typedData | "EIP712Domain" = keyof typedData>(typedDataDefinition: TypedDataDefinition<typedData, primaryType>) => Promise<Hex>;
55
55
  encodeUpgradeToAndCall: (params: UpgradeToAndCallParams) => Promise<Hex>;
56
- getNonce(nonceKey?: bigint): Promise<bigint>;
56
+ getAccountNonce(nonceKey?: bigint): Promise<bigint>;
57
57
  getInitCode: () => Promise<Hex>;
58
58
  isAccountDeployed: () => Promise<boolean>;
59
59
  getFactoryAddress: () => Promise<Address>;
@@ -1 +1 @@
1
- {"version":3,"file":"smartContractAccount.d.ts","sourceRoot":"","sources":["../../../src/account/smartContractAccount.ts"],"names":[],"mappings":"AAAA,OAAO,EAIL,KAAK,OAAO,EACZ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,EACjB,qBAAqB,EACrB,sBAAsB,GACvB,EAAE,4BAA4B,CAC7B,IAAI,EACJ,UAAU,EACV,MAAM,EACN,kBAAkB,CACnB,GAAG,OAAO,CAAC,oBAAoB,CAAC,IAAI,EAAE,kBAAkB,CAAC,CAAC,CAAC"}
1
+ {"version":3,"file":"smartContractAccount.d.ts","sourceRoot":"","sources":["../../../src/account/smartContractAccount.ts"],"names":[],"mappings":"AAAA,OAAO,EAIL,KAAK,OAAO,EACZ,KAAK,KAAK,EACV,KAAK,YAAY,EACjB,KAAK,GAAG,EACR,KAAK,YAAY,EACjB,KAAK,YAAY,EACjB,KAAK,eAAe,EACpB,KAAK,SAAS,EACd,KAAK,SAAS,EACd,KAAK,mBAAmB,EACzB,MAAM,MAAM,CAAC;AAGd,OAAO,KAAK,EACV,aAAa,EACb,sBAAsB,EACtB,iBAAiB,EAClB,MAAM,wBAAwB,CAAC;AAWhC,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AAE7D,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC/C,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAErD,MAAM,MAAM,SAAS,GAAG;IACtB,MAAM,EAAE,OAAO,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,GAAG,GAAG,IAAI,CAAC;CAClB,CAAC;AAEF,oBAAY,eAAe;IACzB,SAAS,QAAQ;IACjB,YAAY,QAAQ;IACpB,QAAQ,QAAQ;CACjB;AAED,MAAM,MAAM,wBAAwB,CAClC,QAAQ,SAAS,oBAAoB,GAAG,SAAS,EACjD,gBAAgB,SAAS,oBAAoB,GAAG,oBAAoB,IAClE,mBAAmB,CACrB,QAAQ,EACR,gBAAgB,CACjB,SAAS,oBAAoB,CAAC,MAAM,EAAE,MAAM,kBAAkB,CAAC,GAC5D,kBAAkB,GAClB,iBAAiB,CAAC;AAEtB,MAAM,MAAM,m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BAAsB,CAC1C,IAAI,SAAS,MAAM,GAAG,MAAM,EAC5B,UAAU,SAAS,SAAS,GAAG,SAAS,EACxC,MAAM,SAAS,KAAK,GAAG,KAAK,EAC5B,kBAAkB,SAAS,iBAAiB,GAAG,iBAAiB,EAChE,EACA,SAAS,EACT,KAAK,EACL,UAAU,EACV,MAAM,EACN,cAAc,EACd,kBAAkB,EAClB,WAAW,EACX,aAAa,EACb,kBAAkB,EAClB,aAAa,EACb,iBAAiB,EACjB,qBAAqB,EACrB,sBAAsB,GACvB,EAAE,4BAA4B,CAC7B,IAAI,EACJ,UAAU,EACV,MAAM,EACN,kBAAkB,CACnB,GAAG,OAAO,CAAC,oBAAoB,CAAC,IAAI,EAAE,kBAAkB,CAAC,CAAC,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"dropAndReplaceUserOperation.d.ts","sourceRoot":"","sources":["../../../../src/actions/smartAccount/dropAndReplaceUserOperation.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,MAAM,CAAC;AACrD,OAAO,KAAK,EACV,wBAAwB,EACxB,oBAAoB,EACrB,MAAM,oCAAoC,CAAC;AAE5C,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,oBAAoB,CAAC;AAWlE,OAAO,KAAK,EACV,qCAAqC,EACrC,oBAAoB,EACrB,MAAM,SAAS,CAAC;AAEjB;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,wBAAsB,2BAA2B,CAC/C,UAAU,SAAS,SAAS,GAAG,SAAS,EACxC,MAAM,SAAS,KAAK,GAAG,SAAS,GAAG,KAAK,GAAG,SAAS,EACpD,QAAQ,SAAS,oBAAoB,GAAG,SAAS,GAC7C,oBAAoB,GACpB,SAAS,EACb,QAAQ,SAAS,oBAAoB,GAAG,SAAS,GAC7C,oBAAoB,GACpB,SAAS,EACb,kBAAkB,SAAS,wBAAwB,CAAC,QAAQ,CAAC,GAAG,wBAAwB,CAAC,QAAQ,CAAC,EAElG,MAAM,EAAE,MAAM,CAAC,UAAU,EAAE,MAAM,EAAE,QAAQ,CAAC,EAC5C,IAAI,EAAE,qCAAqC,CAAC,QAAQ,EAAE,QAAQ,CAAC,GAC9D,OAAO,CAAC,uBAAuB,CAAC,kBAAkB,CAAC,CAAC,CA2EtD"}
1
+ {"version":3,"file":"dropAndReplaceUserOperation.d.ts","sourceRoot":"","sources":["../../../../src/actions/smartAccount/dropAndReplaceUserOperation.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,MAAM,CAAC;AACrD,OAAO,KAAK,EACV,wBAAwB,EACxB,oBAAoB,EACrB,MAAM,oCAAoC,CAAC;AAE5C,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,oBAAoB,CAAC;AAelE,OAAO,KAAK,EACV,qCAAqC,EACrC,oBAAoB,EACrB,MAAM,SAAS,CAAC;AAEjB;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,wBAAsB,2BAA2B,CAC/C,UAAU,SAAS,SAAS,GAAG,SAAS,EACxC,MAAM,SAAS,KAAK,GAAG,SAAS,GAAG,KAAK,GAAG,SAAS,EACpD,QAAQ,SAAS,oBAAoB,GAAG,SAAS,GAC7C,oBAAoB,GACpB,SAAS,EACb,QAAQ,SAAS,oBAAoB,GAAG,SAAS,GAC7C,oBAAoB,GACpB,SAAS,EACb,kBAAkB,SAAS,wBAAwB,CAAC,QAAQ,CAAC,GAAG,wBAAwB,CAAC,QAAQ,CAAC,EAElG,MAAM,EAAE,MAAM,CAAC,UAAU,EAAE,MAAM,EAAE,QAAQ,CAAC,EAC5C,IAAI,EAAE,qCAAqC,CAAC,QAAQ,EAAE,QAAQ,CAAC,GAC9D,OAAO,CAAC,uBAAuB,CAAC,kBAAkB,CAAC,CAAC,CAuEtD"}
@@ -1 +1 @@
1
- {"version":3,"file":"smartAccountClient.d.ts","sourceRoot":"","sources":["../../../src/client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M,SAAS,KAAK,GAAG,SAAS,GAAG,KAAK,GAAG,SAAS,EACpD,QAAQ,SAAS,oBAAoB,GAAG,SAAS,GAC7C,oBAAoB,GACpB,SAAS,EACb,OAAO,SAAS,aAAa,CAAC,UAAU,CAAC,GAAG,aAAa,CAAC,UAAU,CAAC,EACrE,QAAQ,SAAS,yBAAyB,CACxC,MAAM,EACN,QAAQ,EACR,QAAQ,CACT,GAAG,yBAAyB,CAAC,MAAM,EAAE,QAAQ,CAAC,EAC/C,UAAU,SAAS,2BAA2B,GAAG,2BAA2B,EAC5E,QAAQ,SAAS,oBAAoB,GAAG,SAAS,GAC7C,oBAAoB,GACpB,SAAS,EAEb,MAAM,EAAE,IAAI,CACV,wBAAwB,CAAC,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,QAAQ,CAAC,EAC/D,WAAW,GAAG,OAAO,CACtB,GAAG;IAAE,MAAM,EAAE,OAAO,CAAA;CAAE,GACtB,kBAAkB,CACnB,eAAe,EACf,MAAM,EACN,QAAQ,EACR,QAAQ,EACR,UAAU,EACV,QAAQ,CACT,CAAC"}
@@ -1,6 +1,5 @@
1
1
  export type { Abi } from "abitype";
2
2
  export type { Address, HttpTransport } from "viem";
3
- export * as chains from "viem/chains";
4
3
  export { EntryPointAbi_v6 } from "./abis/EntryPointAbi_v6.js";
5
4
  export { EntryPointAbi_v7 } from "./abis/EntryPointAbi_v7.js";
6
5
  export { SimpleAccountAbi_v6 } from "./abis/SimpleAccountAbi_v6.js";