@pimlico/alto 0.0.19 → 0.0.21

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 (357) hide show
  1. package/contracts/EIP712.sol/EIP712.json +1 -1
  2. package/contracts/ERC165.sol/ERC165.json +1 -1
  3. package/contracts/ERC20.sol/ERC20.json +1 -1
  4. package/contracts/Eip7702Support.sol/Eip7702Support.json +1 -1
  5. package/contracts/EntryPoint.sol/EntryPoint.json +1 -1
  6. package/contracts/EntryPointFilterOpsOverride.sol/EntryPointFilterOpsOverride06.json +1 -1
  7. package/contracts/EntryPointFilterOpsOverride.sol/EntryPointFilterOpsOverride07.json +1 -1
  8. package/contracts/EntryPointFilterOpsOverride.sol/EntryPointFilterOpsOverride08.json +1 -1
  9. package/contracts/EntryPointFilterOpsOverride.sol/EntryPointFilterOpsOverride09.json +1 -0
  10. package/contracts/EntryPointGasEstimationOverride.sol/EntryPointGasEstimationOverride06.json +1 -1
  11. package/contracts/EntryPointSimulations.sol/EntryPointSimulations07.json +1 -1
  12. package/contracts/EntryPointSimulations.sol/EntryPointSimulations08.json +1 -1
  13. package/contracts/EntryPointSimulations.sol/EntryPointSimulations09.json +1 -0
  14. package/contracts/Exec.sol/Exec.json +1 -1
  15. package/contracts/IAccount.sol/IAccount.json +1 -1
  16. package/contracts/IAccountExecute.sol/IAccountExecute.json +1 -1
  17. package/contracts/IAggregator.sol/IAggregator.json +1 -1
  18. package/contracts/IERC165.sol/IERC165.json +1 -1
  19. package/contracts/IERC5267.sol/IERC5267.json +1 -1
  20. package/contracts/IEntryPoint.sol/IEntryPoint.json +1 -1
  21. package/contracts/IEntryPointFilterOpsOverride.sol/IEntryPointFilterOpsOverride08.json +1 -0
  22. package/contracts/IEntryPointFilterOpsOverride.sol/IEntryPointFilterOpsOverride09.json +1 -0
  23. package/contracts/IEntryPointSimulations.sol/IEntryPointSimulations.json +1 -1
  24. package/contracts/INonceManager.sol/INonceManager.json +1 -1
  25. package/contracts/IPaymaster.sol/IPaymaster.json +1 -1
  26. package/contracts/ISenderCreator.sol/ISenderCreator.json +1 -1
  27. package/contracts/IStakeManager.sol/IStakeManager.json +1 -1
  28. package/contracts/LibBytes.sol/LibBytes.json +1 -1
  29. package/contracts/Math.sol/Math.json +1 -1
  30. package/contracts/MessageHashUtils.sol/MessageHashUtils.json +1 -1
  31. package/contracts/NonceManager.sol/NonceManager.json +1 -1
  32. package/contracts/Panic.sol/Panic.json +1 -1
  33. package/contracts/PimlicoSimulations.sol/PimlicoSimulations.json +1 -1
  34. package/contracts/ReentrancyGuard.sol/ReentrancyGuard.json +1 -1
  35. package/contracts/ReentrancyGuardTransient.sol/ReentrancyGuardTransient.json +1 -1
  36. package/contracts/SafeCast.sol/SafeCast.json +1 -1
  37. package/contracts/SenderCreator.sol/SenderCreator.json +1 -1
  38. package/contracts/ShortStrings.sol/ShortStrings.json +1 -1
  39. package/contracts/SignedMath.sol/SignedMath.json +1 -1
  40. package/contracts/SimulationOverrideHelper.sol/SimulationOverrideHelper.json +1 -0
  41. package/contracts/StakeManager.sol/StakeManager.json +1 -1
  42. package/contracts/StorageSlot.sol/StorageSlot.json +1 -1
  43. package/contracts/Strings.sol/Strings.json +1 -1
  44. package/contracts/TransientSlot.sol/TransientSlot.json +1 -1
  45. package/contracts/UserOperation.sol/UserOperationLib.json +1 -1
  46. package/contracts/UserOperationLib.sol/UserOperationLib.json +1 -1
  47. package/contracts/account-abstraction-v9/contracts/interfaces/IAggregator.sol/IAggregator.json +1 -0
  48. package/contracts/account-abstraction-v9/contracts/interfaces/IEntryPoint.sol/IEntryPoint.json +1 -0
  49. package/contracts/account-abstraction-v9/contracts/interfaces/INonceManager.sol/INonceManager.json +1 -0
  50. package/contracts/account-abstraction-v9/contracts/interfaces/IStakeManager.sol/IStakeManager.json +1 -0
  51. package/contracts/build-info/{880955d5786bfdae.json → 031b289b93191224.json} +1 -1
  52. package/contracts/build-info/181f3522c3744403.json +1 -0
  53. package/contracts/build-info/a2db592afab5c9de.json +1 -0
  54. package/contracts/contracts/interfaces/IAggregator.sol/IAggregator.json +1 -1
  55. package/contracts/contracts/interfaces/IEntryPoint.sol/IEntryPoint.json +1 -1
  56. package/contracts/contracts/interfaces/INonceManager.sol/INonceManager.json +1 -1
  57. package/contracts/contracts/interfaces/IStakeManager.sol/IStakeManager.json +1 -1
  58. package/contracts/core/Eip7702Support.sol/Eip7702Support.json +1 -0
  59. package/contracts/core/NonceManager.sol/NonceManager.json +1 -0
  60. package/contracts/core/SenderCreator.sol/SenderCreator.json +1 -0
  61. package/contracts/core/StakeManager.sol/StakeManager.json +1 -0
  62. package/contracts/core/UserOperationLib.sol/UserOperationLib.json +1 -0
  63. package/contracts/interfaces/IAccount.sol/IAccount.json +1 -0
  64. package/contracts/interfaces/IAccountExecute.sol/IAccountExecute.json +1 -0
  65. package/contracts/interfaces/IAggregator.sol/IAggregator.json +1 -1
  66. package/contracts/interfaces/IEntryPoint.sol/IEntryPoint.json +1 -1
  67. package/contracts/interfaces/INonceManager.sol/INonceManager.json +1 -1
  68. package/contracts/interfaces/IPaymaster.sol/IPaymaster.json +1 -0
  69. package/contracts/interfaces/ISenderCreator.sol/ISenderCreator.json +1 -0
  70. package/contracts/interfaces/IStakeManager.sol/IStakeManager.json +1 -1
  71. package/contracts/overrides/Eip7702Support.sol/Eip7702Support.json +1 -0
  72. package/contracts/overrides/NonceManager.sol/NonceManager.json +1 -0
  73. package/contracts/overrides/SenderCreator.sol/SenderCreator.json +1 -0
  74. package/contracts/overrides/StakeManager.sol/StakeManager.json +1 -0
  75. package/contracts/overrides/UserOperationLib.sol/UserOperationLib.json +1 -0
  76. package/contracts/utils/Exec.sol/Exec.json +1 -1
  77. package/contracts/utils/StorageSlot.sol/StorageSlot.json +1 -0
  78. package/contracts/v09/EntryPoint.sol/EntryPoint.json +1 -0
  79. package/esm/cli/alto.js +17 -6
  80. package/esm/cli/alto.js.map +1 -1
  81. package/esm/cli/config/bundler.d.ts +459 -321
  82. package/esm/cli/config/bundler.js +125 -91
  83. package/esm/cli/config/bundler.js.map +1 -1
  84. package/esm/cli/config/options.d.ts +4 -1
  85. package/esm/cli/config/options.js +233 -106
  86. package/esm/cli/config/options.js.map +1 -1
  87. package/esm/cli/customTransport.d.ts +3 -3
  88. package/esm/cli/deploySimulationsContract.d.ts +1 -0
  89. package/esm/cli/deploySimulationsContract.js +41 -5
  90. package/esm/cli/deploySimulationsContract.js.map +1 -1
  91. package/esm/cli/handler.js +76 -80
  92. package/esm/cli/handler.js.map +1 -1
  93. package/esm/cli/multiRpcTransport.d.ts +7 -0
  94. package/esm/cli/multiRpcTransport.js +52 -0
  95. package/esm/cli/multiRpcTransport.js.map +1 -0
  96. package/esm/cli/setupServer.js +92 -70
  97. package/esm/cli/setupServer.js.map +1 -1
  98. package/esm/cli/shutDown.d.ts +20 -0
  99. package/esm/cli/shutDown.js +285 -0
  100. package/esm/cli/shutDown.js.map +1 -0
  101. package/esm/contracts/EntryPointFilterOpsOverride.sol/EntryPointFilterOpsOverride06.json +1 -1
  102. package/esm/contracts/EntryPointFilterOpsOverride.sol/EntryPointFilterOpsOverride07.json +1 -1
  103. package/esm/contracts/EntryPointFilterOpsOverride.sol/EntryPointFilterOpsOverride08.json +1 -1
  104. package/esm/contracts/EntryPointFilterOpsOverride.sol/EntryPointFilterOpsOverride09.json +1 -0
  105. package/esm/contracts/EntryPointGasEstimationOverride.sol/EntryPointGasEstimationOverride06.json +1 -1
  106. package/esm/contracts/EntryPointSimulations.sol/EntryPointSimulations07.json +1 -1
  107. package/esm/contracts/EntryPointSimulations.sol/EntryPointSimulations08.json +1 -1
  108. package/esm/contracts/EntryPointSimulations.sol/EntryPointSimulations09.json +1 -0
  109. package/esm/contracts/PimlicoSimulations.sol/PimlicoSimulations.json +1 -1
  110. package/esm/createConfig.d.ts +9 -2
  111. package/esm/createConfig.js.map +1 -1
  112. package/esm/executor/{userOpMonitor.d.ts → bundleManager.d.ts} +56 -37
  113. package/esm/executor/bundleManager.js +393 -0
  114. package/esm/executor/bundleManager.js.map +1 -0
  115. package/esm/executor/executor.d.ts +4 -3
  116. package/esm/executor/executor.js +47 -23
  117. package/esm/executor/executor.js.map +1 -1
  118. package/esm/executor/executorManager.d.ts +20 -15
  119. package/esm/executor/executorManager.js +248 -67
  120. package/esm/executor/executorManager.js.map +1 -1
  121. package/esm/executor/filterOpsAndEstimateGas.d.ts +17 -2
  122. package/esm/executor/filterOpsAndEstimateGas.js +100 -77
  123. package/esm/executor/filterOpsAndEstimateGas.js.map +1 -1
  124. package/esm/executor/getBundleStatus.d.ts +5 -1
  125. package/esm/executor/getBundleStatus.js.map +1 -1
  126. package/esm/executor/index.d.ts +1 -0
  127. package/esm/executor/index.js +1 -0
  128. package/esm/executor/index.js.map +1 -1
  129. package/esm/executor/senderManager/createMemorySenderManager.js +13 -0
  130. package/esm/executor/senderManager/createMemorySenderManager.js.map +1 -1
  131. package/esm/executor/senderManager/createRedisSenderManager.d.ts +2 -1
  132. package/esm/executor/senderManager/createRedisSenderManager.js +45 -26
  133. package/esm/executor/senderManager/createRedisSenderManager.js.map +1 -1
  134. package/esm/executor/senderManager/flushOnStartUp.js +7 -5
  135. package/esm/executor/senderManager/flushOnStartUp.js.map +1 -1
  136. package/esm/executor/senderManager/index.d.ts +1 -0
  137. package/esm/executor/senderManager/index.js +6 -2
  138. package/esm/executor/senderManager/index.js.map +1 -1
  139. package/esm/executor/senderManager/validateAndRefill.js +268 -85
  140. package/esm/executor/senderManager/validateAndRefill.js.map +1 -1
  141. package/esm/executor/utils.d.ts +8 -3
  142. package/esm/executor/utils.js +59 -27
  143. package/esm/executor/utils.js.map +1 -1
  144. package/esm/handlers/arbitrumGasPriceManager.d.ts +3 -2
  145. package/esm/handlers/arbitrumGasPriceManager.js +6 -2
  146. package/esm/handlers/arbitrumGasPriceManager.js.map +1 -1
  147. package/esm/handlers/citreaManager.d.ts +10 -0
  148. package/esm/handlers/citreaManager.js +17 -0
  149. package/esm/handlers/citreaManager.js.map +1 -0
  150. package/esm/handlers/eventManager.d.ts +9 -9
  151. package/esm/handlers/eventManager.js +59 -60
  152. package/esm/handlers/eventManager.js.map +1 -1
  153. package/esm/handlers/gasPriceManager.d.ts +17 -10
  154. package/esm/handlers/gasPriceManager.js +245 -99
  155. package/esm/handlers/gasPriceManager.js.map +1 -1
  156. package/esm/handlers/mantleGasPriceManager.d.ts +4 -4
  157. package/esm/handlers/mantleGasPriceManager.js +4 -4
  158. package/esm/handlers/mantleGasPriceManager.js.map +1 -1
  159. package/esm/handlers/optimismManager.d.ts +1 -1
  160. package/esm/handlers/optimismManager.js +1 -1
  161. package/esm/handlers/optimismManager.js.map +1 -1
  162. package/esm/mempool/index.d.ts +1 -1
  163. package/esm/mempool/index.js +1 -1
  164. package/esm/mempool/index.js.map +1 -1
  165. package/esm/mempool/mempool.d.ts +61 -22
  166. package/esm/mempool/mempool.js +223 -133
  167. package/esm/mempool/mempool.js.map +1 -1
  168. package/esm/mempool/reputationManager.d.ts +14 -14
  169. package/esm/mempool/reputationManager.js +36 -39
  170. package/esm/mempool/reputationManager.js.map +1 -1
  171. package/esm/mempool/statusManager.d.ts +20 -0
  172. package/esm/mempool/statusManager.js +143 -0
  173. package/esm/mempool/statusManager.js.map +1 -0
  174. package/esm/receiptCache/createMemoryReceiptCache.d.ts +3 -0
  175. package/esm/receiptCache/createMemoryReceiptCache.js +30 -0
  176. package/esm/receiptCache/createMemoryReceiptCache.js.map +1 -0
  177. package/esm/receiptCache/createRedisReceiptCache.d.ts +10 -0
  178. package/esm/receiptCache/createRedisReceiptCache.js +56 -0
  179. package/esm/receiptCache/createRedisReceiptCache.js.map +1 -0
  180. package/esm/receiptCache/index.d.ts +11 -0
  181. package/esm/receiptCache/index.js +21 -0
  182. package/esm/receiptCache/index.js.map +1 -0
  183. package/esm/rpc/createMethodHandler.js.map +1 -1
  184. package/esm/rpc/estimation/gasEstimationHandler.d.ts +2 -4
  185. package/esm/rpc/estimation/gasEstimationHandler.js.map +1 -1
  186. package/esm/rpc/estimation/gasEstimations06.d.ts +6 -7
  187. package/esm/rpc/estimation/gasEstimations06.js +1 -5
  188. package/esm/rpc/estimation/gasEstimations06.js.map +1 -1
  189. package/esm/rpc/estimation/gasEstimations07.d.ts +13 -41
  190. package/esm/rpc/estimation/gasEstimations07.js +27 -34
  191. package/esm/rpc/estimation/gasEstimations07.js.map +1 -1
  192. package/esm/{utils/preVerificationGasCalulator.d.ts → rpc/estimation/preVerificationGasCalculator.d.ts} +20 -6
  193. package/esm/{utils/preVerificationGasCalulator.js → rpc/estimation/preVerificationGasCalculator.js} +134 -48
  194. package/esm/rpc/estimation/preVerificationGasCalculator.js.map +1 -0
  195. package/esm/rpc/estimation/types.d.ts +4 -2
  196. package/esm/rpc/estimation/utils.d.ts +10 -8
  197. package/esm/rpc/estimation/utils.js +56 -53
  198. package/esm/rpc/estimation/utils.js.map +1 -1
  199. package/esm/rpc/methods/boost_sendUserOperation.d.ts +304 -0
  200. package/esm/rpc/methods/boost_sendUserOperation.js +1 -1
  201. package/esm/rpc/methods/boost_sendUserOperation.js.map +1 -1
  202. package/esm/rpc/methods/debug_bundler_clearReputation.js +1 -1
  203. package/esm/rpc/methods/debug_bundler_clearReputation.js.map +1 -1
  204. package/esm/rpc/methods/debug_bundler_clearState.js +1 -1
  205. package/esm/rpc/methods/debug_bundler_clearState.js.map +1 -1
  206. package/esm/rpc/methods/debug_bundler_dumpMempool.d.ts +338 -0
  207. package/esm/rpc/methods/debug_bundler_dumpReputation.js +1 -1
  208. package/esm/rpc/methods/debug_bundler_dumpReputation.js.map +1 -1
  209. package/esm/rpc/methods/eth_estimateUserOperationGas.d.ts +622 -14
  210. package/esm/rpc/methods/eth_estimateUserOperationGas.js +61 -30
  211. package/esm/rpc/methods/eth_estimateUserOperationGas.js.map +1 -1
  212. package/esm/rpc/methods/eth_getUserOperationByHash.d.ts +621 -11
  213. package/esm/rpc/methods/eth_getUserOperationByHash.js.map +1 -1
  214. package/esm/rpc/methods/eth_getUserOperationReceipt.d.ts +34 -34
  215. package/esm/rpc/methods/eth_getUserOperationReceipt.js +1 -1
  216. package/esm/rpc/methods/eth_sendUserOperation.d.ts +307 -3
  217. package/esm/rpc/methods/eth_sendUserOperation.js +153 -48
  218. package/esm/rpc/methods/eth_sendUserOperation.js.map +1 -1
  219. package/esm/rpc/methods/pimlico_getUserOperationStatus.js +1 -1
  220. package/esm/rpc/methods/pimlico_getUserOperationStatus.js.map +1 -1
  221. package/esm/rpc/methods/pimlico_sendUserOperationNow.d.ts +338 -34
  222. package/esm/rpc/methods/pimlico_sendUserOperationNow.js +26 -29
  223. package/esm/rpc/methods/pimlico_sendUserOperationNow.js.map +1 -1
  224. package/esm/rpc/methods/pimlico_simulateAssetChange.d.ts +620 -12
  225. package/esm/rpc/methods/pimlico_simulateAssetChange.js +14 -19
  226. package/esm/rpc/methods/pimlico_simulateAssetChange.js.map +1 -1
  227. package/esm/rpc/rpcHandler.d.ts +38 -26
  228. package/esm/rpc/rpcHandler.js +97 -44
  229. package/esm/rpc/rpcHandler.js.map +1 -1
  230. package/esm/rpc/server.d.ts +5 -5
  231. package/esm/rpc/server.js +15 -11
  232. package/esm/rpc/server.js.map +1 -1
  233. package/esm/rpc/validation/BundlerCollectorTracerV06.js +1 -1
  234. package/esm/rpc/validation/BundlerCollectorTracerV06.js.map +1 -1
  235. package/esm/rpc/validation/BundlerCollectorTracerV07.js +1 -1
  236. package/esm/rpc/validation/BundlerCollectorTracerV07.js.map +1 -1
  237. package/esm/rpc/validation/SafeValidator.d.ts +13 -14
  238. package/esm/rpc/validation/SafeValidator.js +24 -24
  239. package/esm/rpc/validation/SafeValidator.js.map +1 -1
  240. package/esm/rpc/validation/TracerResultParserV06.d.ts +2 -2
  241. package/esm/rpc/validation/TracerResultParserV06.js +11 -11
  242. package/esm/rpc/validation/TracerResultParserV06.js.map +1 -1
  243. package/esm/rpc/validation/TracerResultParserV07.d.ts +2 -2
  244. package/esm/rpc/validation/TracerResultParserV07.js +13 -13
  245. package/esm/rpc/validation/TracerResultParserV07.js.map +1 -1
  246. package/esm/rpc/validation/UnsafeValidator.d.ts +18 -14
  247. package/esm/rpc/validation/UnsafeValidator.js +76 -41
  248. package/esm/rpc/validation/UnsafeValidator.js.map +1 -1
  249. package/esm/store/createMempoolStore.d.ts +1 -1
  250. package/esm/store/createMempoolStore.js +79 -140
  251. package/esm/store/createMempoolStore.js.map +1 -1
  252. package/esm/store/index.d.ts +4 -75
  253. package/esm/store/index.js +4 -1
  254. package/esm/store/index.js.map +1 -1
  255. package/esm/store/outstanding/index.d.ts +13 -0
  256. package/esm/store/outstanding/index.js +16 -0
  257. package/esm/store/outstanding/index.js.map +1 -0
  258. package/esm/store/{createMemoryOutstandingStore.d.ts → outstanding/memory.d.ts} +14 -13
  259. package/esm/store/outstanding/memory.js +263 -0
  260. package/esm/store/outstanding/memory.js.map +1 -0
  261. package/esm/store/outstanding/redis.d.ts +11 -0
  262. package/esm/store/outstanding/redis.js +229 -0
  263. package/esm/store/outstanding/redis.js.map +1 -0
  264. package/esm/store/outstanding/types.d.ts +19 -0
  265. package/esm/store/outstanding/types.js +2 -0
  266. package/esm/store/outstanding/types.js.map +1 -0
  267. package/esm/store/processing/index.d.ts +11 -0
  268. package/esm/store/processing/index.js +17 -0
  269. package/esm/store/processing/index.js.map +1 -0
  270. package/esm/store/processing/memory.d.ts +19 -0
  271. package/esm/store/processing/memory.js +83 -0
  272. package/esm/store/processing/memory.js.map +1 -0
  273. package/esm/store/processing/redis.d.ts +26 -0
  274. package/esm/store/processing/redis.js +123 -0
  275. package/esm/store/processing/redis.js.map +1 -0
  276. package/esm/store/processing/types.d.ts +12 -0
  277. package/esm/store/processing/types.js +2 -0
  278. package/esm/store/processing/types.js.map +1 -0
  279. package/esm/store/types.d.ts +52 -0
  280. package/esm/store/types.js +2 -0
  281. package/esm/store/types.js.map +1 -0
  282. package/esm/types/contracts/Multicall3.d.ts +34 -0
  283. package/esm/types/contracts/Multicall3.js +31 -0
  284. package/esm/types/contracts/Multicall3.js.map +1 -0
  285. package/esm/types/contracts/PimlicoSimulations.d.ts +81 -0
  286. package/esm/types/contracts/PimlicoSimulations.js +105 -0
  287. package/esm/types/contracts/PimlicoSimulations.js.map +1 -1
  288. package/esm/types/contracts/index.d.ts +1 -1
  289. package/esm/types/contracts/index.js +1 -1
  290. package/esm/types/contracts/index.js.map +1 -1
  291. package/esm/types/gasPrice.js +0 -18
  292. package/esm/types/gasPrice.js.map +1 -1
  293. package/esm/types/interfaces.d.ts +15 -10
  294. package/esm/types/mempool.d.ts +3 -0
  295. package/esm/types/schemas.d.ts +13184 -4741
  296. package/esm/types/schemas.js +116 -27
  297. package/esm/types/schemas.js.map +1 -1
  298. package/esm/types/utils.d.ts +2 -5
  299. package/esm/types/utils.js +16 -18
  300. package/esm/types/utils.js.map +1 -1
  301. package/esm/types/validation.d.ts +7646 -6912
  302. package/esm/types/validation.js +122 -152
  303. package/esm/types/validation.js.map +1 -1
  304. package/esm/utils/eip7702.d.ts +2 -1
  305. package/esm/utils/eip7702.js +14 -8
  306. package/esm/utils/eip7702.js.map +1 -1
  307. package/esm/utils/entryPointOverrides.js +18 -4
  308. package/esm/utils/entryPointOverrides.js.map +1 -1
  309. package/esm/utils/helpers.d.ts +7 -1
  310. package/esm/utils/helpers.js +36 -11
  311. package/esm/utils/helpers.js.map +1 -1
  312. package/esm/utils/index.d.ts +0 -1
  313. package/esm/utils/index.js +0 -1
  314. package/esm/utils/index.js.map +1 -1
  315. package/esm/utils/metrics.d.ts +4 -1
  316. package/esm/utils/metrics.js +34 -7
  317. package/esm/utils/metrics.js.map +1 -1
  318. package/esm/utils/minMaxQueue/createMemoryMinMaxQueue.js +8 -9
  319. package/esm/utils/minMaxQueue/createMemoryMinMaxQueue.js.map +1 -1
  320. package/esm/utils/minMaxQueue/createRedisMinMaxQueue.d.ts +24 -2
  321. package/esm/utils/minMaxQueue/createRedisMinMaxQueue.js +85 -64
  322. package/esm/utils/minMaxQueue/createRedisMinMaxQueue.js.map +1 -1
  323. package/esm/utils/minMaxQueue/index.d.ts +2 -2
  324. package/esm/utils/minMaxQueue/index.js +4 -3
  325. package/esm/utils/minMaxQueue/index.js.map +1 -1
  326. package/esm/utils/rpc-reply.d.ts +3 -3
  327. package/esm/utils/rpc-reply.js.map +1 -1
  328. package/esm/utils/toViemStateOverrides.js +7 -7
  329. package/esm/utils/toViemStateOverrides.js.map +1 -1
  330. package/esm/utils/userop.d.ts +110 -56
  331. package/esm/utils/userop.js +161 -249
  332. package/esm/utils/userop.js.map +1 -1
  333. package/package.json +4 -2
  334. package/contracts/build-info/7710b5a048396e70.json +0 -1
  335. package/esm/executor/userOpMonitor.js +0 -326
  336. package/esm/executor/userOpMonitor.js.map +0 -1
  337. package/esm/executor/utilityWalletMonitor.d.ts +0 -19
  338. package/esm/executor/utilityWalletMonitor.js +0 -38
  339. package/esm/executor/utilityWalletMonitor.js.map +0 -1
  340. package/esm/mempool/monitoring.d.ts +0 -15
  341. package/esm/mempool/monitoring.js +0 -118
  342. package/esm/mempool/monitoring.js.map +0 -1
  343. package/esm/store/createMemoryOutstandingStore.js +0 -240
  344. package/esm/store/createMemoryOutstandingStore.js.map +0 -1
  345. package/esm/store/createRedisOutstandingStore.d.ts +0 -27
  346. package/esm/store/createRedisOutstandingStore.js +0 -344
  347. package/esm/store/createRedisOutstandingStore.js.map +0 -1
  348. package/esm/store/createRedisStore.d.ts +0 -9
  349. package/esm/store/createRedisStore.js +0 -131
  350. package/esm/store/createRedisStore.js.map +0 -1
  351. package/esm/store/createStore.d.ts +0 -6
  352. package/esm/store/createStore.js +0 -66
  353. package/esm/store/createStore.js.map +0 -1
  354. package/esm/types/contracts/CallEngine.d.ts +0 -28
  355. package/esm/types/contracts/CallEngine.js +0 -37
  356. package/esm/types/contracts/CallEngine.js.map +0 -1
  357. package/esm/utils/preVerificationGasCalulator.js.map +0 -1
@@ -1,8 +1,6 @@
1
+ import { getUserOpHashes } from "../executor/index.js";
2
+ import { createOutstandingQueue, createProcessingStore } from "./index.js";
1
3
  import * as sentry from "@sentry/node";
2
- import { createMemoryOutstandingQueue } from "./createMemoryOutstandingStore.js";
3
- import { createRedisOutstandingQueue } from "./createRedisOutstandingStore.js";
4
- import { createRedisStore } from "./createRedisStore.js";
5
- import { createMemoryStore } from "./createStore.js";
6
4
  export const createMempoolStore = ({ config, metrics }) => {
7
5
  const logger = config.getLogger({ module: "mempool-store" }, {
8
6
  level: config.logLevel
@@ -17,48 +15,20 @@ export const createMempoolStore = ({ config, metrics }) => {
17
15
  return handlers;
18
16
  };
19
17
  for (const entryPoint of config.entrypoints) {
20
- let outstanding;
21
- let processing;
22
- let submitted;
23
- if (config.redisMempoolUrl) {
24
- outstanding = createRedisOutstandingQueue({
25
- config,
26
- entryPoint
27
- });
28
- processing = createRedisStore({
29
- config,
30
- entryPoint,
31
- storeType: "processing"
32
- });
33
- submitted = createRedisStore({
34
- config,
35
- entryPoint,
36
- storeType: "submitted"
37
- });
38
- logger.info("Using redis for outstanding, processing, submitted mempools");
39
- }
40
- else {
41
- outstanding = createMemoryOutstandingQueue({
42
- config
43
- });
44
- processing = createMemoryStore({
45
- config
46
- });
47
- submitted = createMemoryStore({
48
- config
49
- });
50
- logger.info("Using memory for outstanding, processing, submitted mempools");
51
- }
18
+ const outstanding = createOutstandingQueue({
19
+ config,
20
+ entryPoint,
21
+ logger
22
+ });
23
+ const processing = createProcessingStore({
24
+ config,
25
+ entryPoint
26
+ });
52
27
  storeHandlers.set(entryPoint, {
53
- processing,
54
- submitted,
55
- outstanding
28
+ outstanding,
29
+ processing
56
30
  });
57
31
  }
58
- const logAddOperation = (userOpHash, storeType) => {
59
- logger.debug({ userOpHash, store: storeType }, `added user op to ${storeType} mempool`);
60
- metrics.userOpsInMempool.labels({ status: storeType }).inc();
61
- };
62
32
  const logRemoveOperation = (userOpHash, storeType, removed) => {
63
33
  if (!removed) {
64
34
  logger.warn({ userOpHash, store: storeType }, "tried to remove non-existent user op from mempool");
@@ -74,144 +44,103 @@ export const createMempoolStore = ({ config, metrics }) => {
74
44
  };
75
45
  return {
76
46
  // Methods used for bundling
77
- popOutstanding: async (entryPoint) => {
47
+ popOutstanding: async (entryPoint, count) => {
78
48
  try {
79
49
  const { outstanding } = getStoreHandlers(entryPoint);
80
- return await outstanding.pop();
50
+ const poppedUserOps = await outstanding.pop(count);
51
+ if (poppedUserOps.length > 0) {
52
+ logger.info({ userOpHashes: getUserOpHashes(poppedUserOps) }, "popped userOps from outstanding");
53
+ }
54
+ return poppedUserOps;
81
55
  }
82
56
  catch (err) {
83
- logger.error({ err }, "Failed to pop from outstanding mempool, defaulting to undefined");
57
+ logger.error({ err }, "Failed to pop from outstanding mempool, defaulting to empty array");
84
58
  sentry.captureException(err);
85
- return undefined;
86
- }
87
- },
88
- peekOutstanding: async (entryPoint) => {
89
- try {
90
- const { outstanding } = getStoreHandlers(entryPoint);
91
- return await outstanding.peek();
92
- }
93
- catch (err) {
94
- logger.error({ err }, "Failed to peek from outstanding mempool, defaulting to undefined");
95
- sentry.captureException(err);
96
- return undefined;
59
+ return [];
97
60
  }
98
61
  },
99
62
  // State handling
100
- addOutstanding: async ({ entryPoint, userOpInfo }) => {
63
+ addOutstanding: async ({ entryPoint, userOpInfos }) => {
101
64
  const { outstanding } = getStoreHandlers(entryPoint);
102
- logAddOperation(userOpInfo.userOpHash, "outstanding");
65
+ metrics.userOpsInMempool
66
+ .labels({ status: "outstanding" })
67
+ .inc(userOpInfos.length);
103
68
  try {
104
- await outstanding.add(userOpInfo);
69
+ await outstanding.add(userOpInfos);
105
70
  }
106
71
  catch (err) {
107
72
  logger.error({ err }, "Failed to add to outstanding mempool");
108
73
  sentry.captureException(err);
109
74
  }
110
75
  },
111
- addProcessing: ({ entryPoint, userOpInfo }) => {
112
- try {
113
- const { processing } = getStoreHandlers(entryPoint);
114
- logAddOperation(userOpInfo.userOpHash, "processing");
115
- processing.add(userOpInfo);
116
- return Promise.resolve();
117
- }
118
- catch (err) {
119
- logger.error({ err }, "Failed to add to processing mempool");
120
- sentry.captureException(err);
121
- return Promise.resolve();
122
- }
123
- },
124
- addSubmitted: ({ entryPoint, userOpInfo }) => {
125
- try {
126
- const { submitted } = getStoreHandlers(entryPoint);
127
- logAddOperation(userOpInfo.userOpHash, "submitted");
128
- submitted.add(userOpInfo);
129
- return Promise.resolve();
130
- }
131
- catch (err) {
132
- logger.error({ err }, "Failed to add to submitted mempool");
133
- sentry.captureException(err);
134
- return Promise.resolve();
135
- }
136
- },
137
76
  removeOutstanding: async ({ entryPoint, userOpHash }) => {
138
77
  try {
139
78
  const { outstanding } = getStoreHandlers(entryPoint);
140
- const removed = await outstanding.remove(userOpHash);
141
- logRemoveOperation(userOpHash, "outstanding", removed);
79
+ const removed = await outstanding.remove([userOpHash]);
80
+ logRemoveOperation(userOpHash, "outstanding", removed.length > 0);
142
81
  }
143
82
  catch (err) {
144
83
  logger.error({ err }, "Failed to remove from outstanding mempool");
145
84
  sentry.captureException(err);
146
- return Promise.resolve();
147
85
  }
148
86
  },
149
- removeProcessing: async ({ entryPoint, userOpHash }) => {
87
+ dumpOutstanding: async (entryPoint) => {
88
+ const { outstanding } = getStoreHandlers(entryPoint);
89
+ logDumpOperation("outstanding");
90
+ return await outstanding.dumpLocal();
91
+ },
92
+ // Methods to mark/unmark userOps that are being processed.
93
+ addProcessing: async ({ entryPoint, userOpInfos }) => {
150
94
  try {
151
95
  const { processing } = getStoreHandlers(entryPoint);
152
- const removed = await processing.remove(userOpHash);
153
- logRemoveOperation(userOpHash, "processing", removed);
96
+ await processing.addProcessing(userOpInfos);
154
97
  }
155
98
  catch (err) {
156
- logger.error({ err }, "Failed to remove from processing mempool");
99
+ logger.error({ err }, "Failed to track active userOps");
157
100
  sentry.captureException(err);
158
- return Promise.resolve();
159
101
  }
160
102
  },
161
- removeSubmitted: async ({ entryPoint, userOpHash }) => {
103
+ removeProcessing: async ({ entryPoint, userOpInfos }) => {
162
104
  try {
163
- const { submitted } = getStoreHandlers(entryPoint);
164
- const removed = await submitted.remove(userOpHash);
165
- logRemoveOperation(userOpHash, "submitted", removed);
105
+ const { processing } = getStoreHandlers(entryPoint);
106
+ await processing.removeProcessing(userOpInfos);
166
107
  }
167
108
  catch (err) {
168
- logger.error({ err }, "Failed to remove from submitted mempool");
109
+ logger.error({ err }, "Failed to untrack active userOps");
169
110
  sentry.captureException(err);
170
- return Promise.resolve();
171
111
  }
172
112
  },
173
- dumpOutstanding: async (entryPoint) => {
174
- const { outstanding } = getStoreHandlers(entryPoint);
175
- logDumpOperation("outstanding");
176
- return await outstanding.dumpLocal();
177
- },
178
- dumpProcessing: async (entryPoint) => {
179
- const { processing } = getStoreHandlers(entryPoint);
180
- logDumpOperation("processing");
181
- return await processing.dumpLocal();
182
- },
183
- dumpSubmitted: async (entryPoint) => {
184
- const { submitted } = getStoreHandlers(entryPoint);
185
- logDumpOperation("submitted");
186
- return await submitted.dumpLocal();
187
- },
188
- // Check if the userOp is already in the mempool
189
- isInMempool: async ({ userOpHash, entryPoint }) => {
190
- const { outstanding, processing, submitted } = getStoreHandlers(entryPoint);
191
- const [inOutstanding, inProcessing, inSubmitted] = await Promise.all([
113
+ // Check if the userOp is already in the mempool or conflicts with existing userOps.
114
+ checkDuplicatesAndConflicts: async ({ entryPoint, userOp, userOpHash }) => {
115
+ const { outstanding, processing } = getStoreHandlers(entryPoint);
116
+ const [isInOutstanding, isInProcessing, wouldConflict] = await Promise.all([
192
117
  outstanding.contains(userOpHash),
193
- processing.contains(userOpHash),
194
- submitted.contains(userOpHash)
118
+ processing.isProcessing(userOpHash),
119
+ processing.wouldConflict(userOp)
195
120
  ]);
196
- return inOutstanding || inProcessing || inSubmitted;
197
- },
198
- validateSubmittedOrProcessing: async ({ entryPoint, userOp }) => {
199
- const { submitted, processing } = getStoreHandlers(entryPoint);
200
- const [submittedConflict, processingConflict] = await Promise.all([
201
- submitted.findConflicting(userOp),
202
- processing.findConflicting(userOp)
203
- ]);
204
- const conflicting = submittedConflict || processingConflict;
205
- if (conflicting?.reason === "conflicting_nonce") {
121
+ // Check if already known (in outstanding or processing).
122
+ if (isInOutstanding || isInProcessing) {
123
+ return {
124
+ valid: false,
125
+ reason: "Already known"
126
+ };
127
+ }
128
+ if (wouldConflict === "conflicting_deployment") {
129
+ return {
130
+ valid: false,
131
+ reason: "AA10 invalid account deployment: Another deployment operation for this sender is already being processed"
132
+ };
133
+ }
134
+ if (wouldConflict === "conflicting_nonce") {
206
135
  return {
207
136
  valid: false,
208
137
  reason: "AA25 invalid account nonce: Another UserOperation with same sender and nonce is already being processed"
209
138
  };
210
139
  }
211
- if (conflicting?.reason === "conflicting_deployment") {
140
+ if (wouldConflict === "conflicting_7702_auth") {
212
141
  return {
213
142
  valid: false,
214
- reason: "AA25 invalid account deployment: Another deployment operation for this sender is already being processed"
143
+ reason: "AA10 sender already constructed: Sender already has an inflight EIP-7702 authorization"
215
144
  };
216
145
  }
217
146
  return { valid: true };
@@ -227,21 +156,21 @@ export const createMempoolStore = ({ config, metrics }) => {
227
156
  return undefined;
228
157
  }
229
158
  },
230
- validateSenderLimits: ({ entryPoint, userOp }) => {
159
+ validateSenderLimits: async ({ entryPoint, userOp }) => {
231
160
  const { outstanding } = getStoreHandlers(entryPoint);
232
161
  if (!outstanding.validateParallelLimit(userOp)) {
233
- return Promise.resolve({
162
+ return {
234
163
  valid: false,
235
164
  reason: "AA25 invalid account nonce: Maximum number of parallel user operations for that is allowed for this sender reached"
236
- });
165
+ };
237
166
  }
238
167
  if (!outstanding.validateQueuedLimit(userOp)) {
239
- return Promise.resolve({
168
+ return {
240
169
  valid: false,
241
170
  reason: "AA25 invalid account nonce: Maximum number of queued user operations reached for this sender and nonce key"
242
- });
171
+ };
243
172
  }
244
- return Promise.resolve({ valid: true });
173
+ return { valid: true };
245
174
  },
246
175
  // misc
247
176
  getQueuedOutstandingUserOps: async ({ userOp, entryPoint }) => {
@@ -252,6 +181,16 @@ export const createMempoolStore = ({ config, metrics }) => {
252
181
  const { outstanding } = getStoreHandlers(entryPoint);
253
182
  await outstanding.clear();
254
183
  logger.debug({ store: "outstanding" }, "cleared mempool");
184
+ },
185
+ // Flush all processing userOps for an entrypoint and return them
186
+ flushProcessing: async (entryPoint) => {
187
+ const { processing } = getStoreHandlers(entryPoint);
188
+ return await processing.flush();
189
+ },
190
+ // Clear all processing tracking state for an entrypoint
191
+ clearAllProcessing: async (entryPoint) => {
192
+ const { processing } = getStoreHandlers(entryPoint);
193
+ await processing.clearAllProcessing();
255
194
  }
256
195
  };
257
196
  };
@@ -1 +1 @@
1
- {"version":3,"file":"createMempoolStore.js","sourceRoot":"","sources":["../../store/createMempoolStore.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,MAAM,MAAM,cAAc,CAAA;AAWtC,OAAO,EAAE,4BAA4B,EAAE,MAAM,gCAAgC,CAAA;AAC7E,OAAO,EAAE,2BAA2B,EAAE,MAAM,+BAA+B,CAAA;AAC3E,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAA;AACrD,OAAO,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAA;AAEjD,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC,EAC/B,MAAM,EACN,OAAO,EACgC,EAAgB,EAAE;IACzD,MAAM,MAAM,GAAW,MAAM,CAAC,SAAS,CACnC,EAAE,MAAM,EAAE,eAAe,EAAE,EAC3B;QACI,KAAK,EAAE,MAAM,CAAC,QAAQ;KACzB,CACJ,CAAA;IAED,MAAM,aAAa,GAOf,IAAI,GAAG,EAAE,CAAA;IAEb,2DAA2D;IAC3D,MAAM,gBAAgB,GAAG,CAAC,UAAmB,EAAE,EAAE;QAC7C,MAAM,QAAQ,GAAG,aAAa,CAAC,GAAG,CAAC,UAAU,CAAC,CAAA;QAC9C,IAAI,CAAC,QAAQ,EAAE,CAAC;YACZ,MAAM,IAAI,KAAK,CACX,2CAA2C,UAAU,EAAE,CAC1D,CAAA;QACL,CAAC;QACD,OAAO,QAAQ,CAAA;IACnB,CAAC,CAAA;IAED,KAAK,MAAM,U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EAAE,CAAA;YACzB,MAAM,CAAC,KAAK,CAAC,EAAE,KAAK,EAAE,aAAa,EAAE,EAAE,iBAAiB,CAAC,CAAA;QAC7D,CAAC;QAED,iEAAiE;QACjE,eAAe,EAAE,KAAK,EAAE,UAAmB,EAAE,EAAE;YAC3C,MAAM,EAAE,UAAU,EAAE,GAAG,gBAAgB,CAAC,UAAU,CAAC,CAAA;YACnD,OAAO,MAAM,UAAU,CAAC,KAAK,EAAE,CAAA;QACnC,CAAC;QAED,wDAAwD;QACxD,kBAAkB,EAAE,KAAK,EAAE,UAAmB,EAAE,EAAE;YAC9C,MAAM,EAAE,UAAU,EAAE,GAAG,gBAAgB,CAAC,UAAU,CAAC,CAAA;YACnD,MAAM,UAAU,CAAC,kBAAkB,EAAE,CAAA;QACzC,CAAC;KACJ,CAAA;AACL,CAAC,CAAA"}
@@ -1,76 +1,5 @@
1
- import type { Address, HexData32, UserOpInfo, UserOperation } from "../types/index.js";
2
- export type StoreType = "outstanding" | "processing" | "submitted";
3
- export type ConflictingOutstandingType = {
4
- reason: "conflicting_nonce" | "conflicting_deployment";
5
- userOpInfo: UserOpInfo;
6
- } | undefined;
7
- export type ConflictingStoreType = {
8
- reason: "conflicting_nonce" | "conflicting_deployment";
9
- userOp: UserOperation;
10
- } | undefined;
11
- type ValidationResult = {
12
- valid: true;
13
- } | {
14
- valid: false;
15
- reason: string;
16
- };
17
- export type EntryPointUserOpInfoParam = {
18
- entryPoint: Address;
19
- userOpInfo: UserOpInfo;
20
- };
21
- export type EntryPointUserOpHashParam = {
22
- entryPoint: Address;
23
- userOpHash: HexData32;
24
- };
25
- export type EntryPointUserOpParam = {
26
- userOp: UserOperation;
27
- entryPoint: Address;
28
- };
29
- export type MempoolStore = {
30
- peekOutstanding: (entryPoint: Address) => Promise<UserOpInfo | undefined>;
31
- popOutstanding: (entryPoint: Address) => Promise<UserOpInfo | undefined>;
32
- addOutstanding: (args: EntryPointUserOpInfoParam) => Promise<void>;
33
- addProcessing: (args: EntryPointUserOpInfoParam) => Promise<void>;
34
- addSubmitted: (args: EntryPointUserOpInfoParam) => Promise<void>;
35
- removeOutstanding: (args: EntryPointUserOpHashParam) => Promise<void>;
36
- removeProcessing: (args: EntryPointUserOpHashParam) => Promise<void>;
37
- removeSubmitted: (args: EntryPointUserOpHashParam) => Promise<void>;
38
- dumpOutstanding: (entryPoint: Address) => Promise<UserOpInfo[]>;
39
- dumpProcessing: (entryPoint: Address) => Promise<UserOpInfo[]>;
40
- dumpSubmitted: (entryPoint: Address) => Promise<UserOpInfo[]>;
41
- isInMempool: (args: EntryPointUserOpHashParam) => Promise<boolean>;
42
- popConflictingOustanding: (args: {
43
- entryPoint: Address;
44
- userOp: UserOperation;
45
- }) => Promise<ConflictingOutstandingType>;
46
- validateSubmittedOrProcessing: (args: EntryPointUserOpParam) => Promise<ValidationResult>;
47
- validateSenderLimits: (args: {
48
- entryPoint: Address;
49
- userOp: UserOperation;
50
- }) => Promise<ValidationResult>;
51
- getQueuedOutstandingUserOps: (args: {
52
- userOp: UserOperation;
53
- entryPoint: Address;
54
- }) => Promise<UserOperation[]>;
55
- clearOutstanding: (entryPoint: Address) => Promise<void>;
56
- };
57
- export type BaseStore = {
58
- add: (op: UserOpInfo) => Promise<void>;
59
- remove: (userOpHash: HexData32) => Promise<boolean>;
60
- contains: (userOpHash: HexData32) => Promise<boolean>;
61
- dumpLocal: () => Promise<UserOpInfo[]>;
62
- };
63
- export type Store = BaseStore & {
64
- findConflicting: (args: UserOperation) => Promise<ConflictingStoreType>;
65
- };
66
- export type OutstandingStore = BaseStore & {
67
- clear: () => Promise<void>;
68
- popConflicting: (args: UserOperation) => Promise<ConflictingOutstandingType>;
69
- validateQueuedLimit: (userOp: UserOperation) => boolean;
70
- validateParallelLimit: (userOp: UserOperation) => boolean;
71
- getQueuedUserOps: (userOp: UserOperation) => Promise<UserOperation[]>;
72
- peek: () => Promise<UserOpInfo | undefined>;
73
- pop: () => Promise<UserOpInfo | undefined>;
74
- };
75
- export { createMempoolStore } from "./createMempoolStore.js";
1
+ export * from "./types.js";
2
+ export * from "./outstanding/index.js";
3
+ export * from "./processing/index.js";
4
+ export * from "./createMempoolStore.js";
76
5
  //# sourceMappingURL=index.d.ts.map
@@ -1,2 +1,5 @@
1
- export { createMempoolStore } from "./createMempoolStore.js";
1
+ export * from "./types.js";
2
+ export * from "./outstanding/index.js";
3
+ export * from "./processing/index.js";
4
+ export * from "./createMempoolStore.js";
2
5
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../store/index.ts"],"names":[],"mappings":"AA0GA,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAA"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../store/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAA;AACvB,cAAc,eAAe,CAAA;AAC7B,cAAc,cAAc,CAAA;AAC5B,cAAc,sBAAsB,CAAA"}
@@ -0,0 +1,13 @@
1
+ import { type OutstandingStore } from "../index.js";
2
+ import type { Logger } from "../../utils/index.js";
3
+ import type { Address } from "viem";
4
+ import type { AltoConfig } from "../../createConfig.js";
5
+ export declare const createOutstandingQueue: ({ config, entryPoint, logger }: {
6
+ config: AltoConfig;
7
+ entryPoint: Address;
8
+ logger: Logger;
9
+ }) => OutstandingStore;
10
+ export * from "./types.js";
11
+ export * from "./memory.js";
12
+ export * from "./redis.js";
13
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1,16 @@
1
+ import { createMemoryOutstandingQueue, createRedisOutstandingQueue } from "../index.js";
2
+ export const createOutstandingQueue = ({ config, entryPoint, logger }) => {
3
+ if (config.enableHorizontalScaling && config.redisEndpoint) {
4
+ return createRedisOutstandingQueue({
5
+ config,
6
+ entryPoint,
7
+ redisEndpoint: config.redisEndpoint,
8
+ logger
9
+ });
10
+ }
11
+ return createMemoryOutstandingQueue({ config, logger });
12
+ };
13
+ export * from "./types.js";
14
+ export * from "./memory.js";
15
+ export * from "./redis.js";
16
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../store/outstanding/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAEH,4BAA4B,EAC5B,2BAA2B,EAC9B,MAAM,aAAa,CAAA;AAKpB,MAAM,CAAC,MAAM,sBAAsB,GAAG,CAAC,EACnC,MAAM,EACN,UAAU,EACV,MAAM,EAKT,EAAoB,EAAE;IACnB,IAAI,MAAM,CAAC,uBAAuB,IAAI,MAAM,CAAC,aAAa,EAAE,CAAC;QACzD,OAAO,2BAA2B,CAAC;YAC/B,MAAM;YACN,UAAU;YACV,aAAa,EAAE,MAAM,CAAC,aAAa;YACnC,MAAM;SACT,CAAC,CAAA;IACN,CAAC;IACD,OAAO,4BAA4B,CAAC,EAAE,MAAM,EAAE,MAAM,EAAE,CAAC,CAAA;AAC3D,CAAC,CAAA;AAED,cAAc,SAAS,CAAA;AACvB,cAAc,UAAU,CAAA;AACxB,cAAc,SAAS,CAAA"}
@@ -1,11 +1,13 @@
1
- import type { HexData32, UserOpInfo, UserOperation } from "../types/index.js";
2
- import type { ConflictingOutstandingType, OutstandingStore } from "./index.js";
3
- import type { AltoConfig } from "../createConfig.js";
1
+ import type { HexData32, UserOpInfo, UserOperation } from "../../types/index.js";
2
+ import type { Logger } from "../../utils/index.js";
3
+ import type { AltoConfig } from "../../createConfig.js";
4
+ import type { ConflictingOutstandingType, OutstandingStore } from "./types.js";
4
5
  export declare class MemoryOutstanding implements OutstandingStore {
5
- private config;
6
- private pendingOps;
6
+ private readonly pendingOps;
7
+ private readonly hashLookup;
8
+ private readonly logger;
9
+ private readonly config;
7
10
  private priorityQueue;
8
- private logger;
9
11
  constructor(config: AltoConfig);
10
12
  private dump;
11
13
  private addToPriorityQueue;
@@ -13,16 +15,15 @@ export declare class MemoryOutstanding implements OutstandingStore {
13
15
  validateParallelLimit(userOp: UserOperation): boolean;
14
16
  popConflicting(userOp: UserOperation): Promise<ConflictingOutstandingType>;
15
17
  contains(userOpHash: HexData32): Promise<boolean>;
16
- peek(): Promise<UserOpInfo | undefined>;
17
- pop(): Promise<UserOpInfo | undefined>;
18
- add(userOpInfo: UserOpInfo): Promise<void>;
18
+ pop(count: number): Promise<UserOpInfo[]>;
19
+ add(userOpInfos: UserOpInfo[]): Promise<void>;
19
20
  getQueuedUserOps(userOp: UserOperation): Promise<UserOperation[]>;
20
- remove(userOpHash: HexData32): Promise<boolean>;
21
+ remove(userOpHashes: HexData32[]): Promise<UserOpInfo[]>;
21
22
  dumpLocal(): Promise<UserOpInfo[]>;
22
23
  clear(): Promise<void>;
23
- findConflicting(userOp: UserOperation): Promise<ConflictingOutstandingType>;
24
24
  }
25
- export declare const createMemoryOutstandingQueue: ({ config }: {
25
+ export declare const createMemoryOutstandingQueue: ({ config, logger }: {
26
26
  config: AltoConfig;
27
+ logger: Logger;
27
28
  }) => OutstandingStore;
28
- //# sourceMappingURL=createMemoryOutstandingStore.d.ts.map
29
+ //# sourceMappingURL=memory.d.ts.map