keyring-agent-core 0.2.1 → 0.2.3

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 (417) hide show
  1. package/dist/index.d.ts +6692 -27
  2. package/dist/index.js +877 -70
  3. package/package.json +6 -4
  4. package/dist/agent/AgentCore.d.ts +0 -256
  5. package/dist/agent/AgentCore.d.ts.map +0 -1
  6. package/dist/agent/AgentCore.js +0 -1093
  7. package/dist/agent/AgentCore.js.map +0 -1
  8. package/dist/agent/QueryRewriter.d.ts +0 -84
  9. package/dist/agent/QueryRewriter.d.ts.map +0 -1
  10. package/dist/agent/QueryRewriter.js +0 -306
  11. package/dist/agent/QueryRewriter.js.map +0 -1
  12. package/dist/agent/Router.d.ts +0 -33
  13. package/dist/agent/Router.d.ts.map +0 -1
  14. package/dist/agent/Router.js +0 -229
  15. package/dist/agent/Router.js.map +0 -1
  16. package/dist/agent/Subagent.d.ts +0 -80
  17. package/dist/agent/Subagent.d.ts.map +0 -1
  18. package/dist/agent/Subagent.js +0 -272
  19. package/dist/agent/Subagent.js.map +0 -1
  20. package/dist/agent/Synthesizer.d.ts +0 -11
  21. package/dist/agent/Synthesizer.d.ts.map +0 -1
  22. package/dist/agent/Synthesizer.js +0 -86
  23. package/dist/agent/Synthesizer.js.map +0 -1
  24. package/dist/agent/chatGraph.d.ts +0 -364
  25. package/dist/agent/chatGraph.d.ts.map +0 -1
  26. package/dist/agent/chatGraph.js +0 -184
  27. package/dist/agent/chatGraph.js.map +0 -1
  28. package/dist/agent/index.d.ts +0 -10
  29. package/dist/agent/index.d.ts.map +0 -1
  30. package/dist/agent/index.js +0 -24
  31. package/dist/agent/index.js.map +0 -1
  32. package/dist/agent/subagents/AiAgent.d.ts +0 -6
  33. package/dist/agent/subagents/AiAgent.d.ts.map +0 -1
  34. package/dist/agent/subagents/AiAgent.js +0 -52
  35. package/dist/agent/subagents/AiAgent.js.map +0 -1
  36. package/dist/agent/subagents/NftAgent.d.ts +0 -6
  37. package/dist/agent/subagents/NftAgent.d.ts.map +0 -1
  38. package/dist/agent/subagents/NftAgent.js +0 -79
  39. package/dist/agent/subagents/NftAgent.js.map +0 -1
  40. package/dist/agent/subagents/PoolAgent.d.ts +0 -6
  41. package/dist/agent/subagents/PoolAgent.d.ts.map +0 -1
  42. package/dist/agent/subagents/PoolAgent.js +0 -184
  43. package/dist/agent/subagents/PoolAgent.js.map +0 -1
  44. package/dist/agent/subagents/PoolSubgraphAgent.d.ts +0 -6
  45. package/dist/agent/subagents/PoolSubgraphAgent.d.ts.map +0 -1
  46. package/dist/agent/subagents/PoolSubgraphAgent.js +0 -117
  47. package/dist/agent/subagents/PoolSubgraphAgent.js.map +0 -1
  48. package/dist/agent/subagents/TokenAgent.d.ts +0 -6
  49. package/dist/agent/subagents/TokenAgent.d.ts.map +0 -1
  50. package/dist/agent/subagents/TokenAgent.js +0 -76
  51. package/dist/agent/subagents/TokenAgent.js.map +0 -1
  52. package/dist/agent/subagents/WalletActionAgent.d.ts +0 -6
  53. package/dist/agent/subagents/WalletActionAgent.d.ts.map +0 -1
  54. package/dist/agent/subagents/WalletActionAgent.js +0 -55
  55. package/dist/agent/subagents/WalletActionAgent.js.map +0 -1
  56. package/dist/agent/subagents/WalletAgent.d.ts +0 -6
  57. package/dist/agent/subagents/WalletAgent.d.ts.map +0 -1
  58. package/dist/agent/subagents/WalletAgent.js +0 -93
  59. package/dist/agent/subagents/WalletAgent.js.map +0 -1
  60. package/dist/agent/subagents/index.d.ts +0 -34
  61. package/dist/agent/subagents/index.d.ts.map +0 -1
  62. package/dist/agent/subagents/index.js +0 -69
  63. package/dist/agent/subagents/index.js.map +0 -1
  64. package/dist/constants/abi.d.ts +0 -551
  65. package/dist/constants/abi.d.ts.map +0 -1
  66. package/dist/constants/abi.js +0 -690
  67. package/dist/constants/abi.js.map +0 -1
  68. package/dist/functions/pool.d.ts +0 -25
  69. package/dist/functions/pool.d.ts.map +0 -1
  70. package/dist/functions/pool.js +0 -151
  71. package/dist/functions/pool.js.map +0 -1
  72. package/dist/functions/web3.d.ts +0 -31
  73. package/dist/functions/web3.d.ts.map +0 -1
  74. package/dist/functions/web3.js +0 -232
  75. package/dist/functions/web3.js.map +0 -1
  76. package/dist/index.d.ts.map +0 -1
  77. package/dist/index.js.map +0 -1
  78. package/dist/llm/GeminiProvider.d.ts +0 -16
  79. package/dist/llm/GeminiProvider.d.ts.map +0 -1
  80. package/dist/llm/GeminiProvider.js +0 -329
  81. package/dist/llm/GeminiProvider.js.map +0 -1
  82. package/dist/llm/index.d.ts +0 -2
  83. package/dist/llm/index.d.ts.map +0 -1
  84. package/dist/llm/index.js +0 -6
  85. package/dist/llm/index.js.map +0 -1
  86. package/dist/memory/ChatHistory.d.ts +0 -83
  87. package/dist/memory/ChatHistory.d.ts.map +0 -1
  88. package/dist/memory/ChatHistory.js +0 -143
  89. package/dist/memory/ChatHistory.js.map +0 -1
  90. package/dist/memory/KnowledgeBase.d.ts +0 -38
  91. package/dist/memory/KnowledgeBase.d.ts.map +0 -1
  92. package/dist/memory/KnowledgeBase.js +0 -139
  93. package/dist/memory/KnowledgeBase.js.map +0 -1
  94. package/dist/memory/Summarizer.d.ts +0 -12
  95. package/dist/memory/Summarizer.d.ts.map +0 -1
  96. package/dist/memory/Summarizer.js +0 -39
  97. package/dist/memory/Summarizer.js.map +0 -1
  98. package/dist/memory/UpstashKnowledgeBase.d.ts +0 -124
  99. package/dist/memory/UpstashKnowledgeBase.d.ts.map +0 -1
  100. package/dist/memory/UpstashKnowledgeBase.js +0 -152
  101. package/dist/memory/UpstashKnowledgeBase.js.map +0 -1
  102. package/dist/memory/historyUtils.d.ts +0 -58
  103. package/dist/memory/historyUtils.d.ts.map +0 -1
  104. package/dist/memory/historyUtils.js +0 -190
  105. package/dist/memory/historyUtils.js.map +0 -1
  106. package/dist/memory/index.d.ts +0 -7
  107. package/dist/memory/index.d.ts.map +0 -1
  108. package/dist/memory/index.js +0 -12
  109. package/dist/memory/index.js.map +0 -1
  110. package/dist/memory/ingestKnowledgeBase.d.ts +0 -17
  111. package/dist/memory/ingestKnowledgeBase.d.ts.map +0 -1
  112. package/dist/memory/ingestKnowledgeBase.js +0 -35
  113. package/dist/memory/ingestKnowledgeBase.js.map +0 -1
  114. package/dist/services/MoralisService.d.ts +0 -1328
  115. package/dist/services/MoralisService.d.ts.map +0 -1
  116. package/dist/services/MoralisService.js +0 -1239
  117. package/dist/services/MoralisService.js.map +0 -1
  118. package/dist/services/PantographService.d.ts +0 -98
  119. package/dist/services/PantographService.d.ts.map +0 -1
  120. package/dist/services/PantographService.js +0 -451
  121. package/dist/services/PantographService.js.map +0 -1
  122. package/dist/services/PoolService.d.ts +0 -238
  123. package/dist/services/PoolService.d.ts.map +0 -1
  124. package/dist/services/PoolService.js +0 -485
  125. package/dist/services/PoolService.js.map +0 -1
  126. package/dist/services/UniswapService.d.ts +0 -289
  127. package/dist/services/UniswapService.d.ts.map +0 -1
  128. package/dist/services/UniswapService.js +0 -585
  129. package/dist/services/UniswapService.js.map +0 -1
  130. package/dist/services/UniswapSubgraphService.d.ts +0 -144
  131. package/dist/services/UniswapSubgraphService.d.ts.map +0 -1
  132. package/dist/services/UniswapSubgraphService.js +0 -606
  133. package/dist/services/UniswapSubgraphService.js.map +0 -1
  134. package/dist/services/rpc.d.ts +0 -35
  135. package/dist/services/rpc.d.ts.map +0 -1
  136. package/dist/services/rpc.js +0 -110
  137. package/dist/services/rpc.js.map +0 -1
  138. package/dist/services/swap/BaseSwapService.d.ts +0 -17
  139. package/dist/services/swap/BaseSwapService.d.ts.map +0 -1
  140. package/dist/services/swap/BaseSwapService.js +0 -19
  141. package/dist/services/swap/BaseSwapService.js.map +0 -1
  142. package/dist/services/swap/DebridgeAdapter.d.ts +0 -37
  143. package/dist/services/swap/DebridgeAdapter.d.ts.map +0 -1
  144. package/dist/services/swap/DebridgeAdapter.js +0 -243
  145. package/dist/services/swap/DebridgeAdapter.js.map +0 -1
  146. package/dist/services/swap/RelayAdapter.d.ts +0 -19
  147. package/dist/services/swap/RelayAdapter.d.ts.map +0 -1
  148. package/dist/services/swap/RelayAdapter.js +0 -189
  149. package/dist/services/swap/RelayAdapter.js.map +0 -1
  150. package/dist/services/swap/SwapServiceFactory.d.ts +0 -25
  151. package/dist/services/swap/SwapServiceFactory.d.ts.map +0 -1
  152. package/dist/services/swap/SwapServiceFactory.js +0 -79
  153. package/dist/services/swap/SwapServiceFactory.js.map +0 -1
  154. package/dist/services/swap/addresses.d.ts +0 -3
  155. package/dist/services/swap/addresses.d.ts.map +0 -1
  156. package/dist/services/swap/addresses.js +0 -68
  157. package/dist/services/swap/addresses.js.map +0 -1
  158. package/dist/services/swap/affiliate.d.ts +0 -17
  159. package/dist/services/swap/affiliate.d.ts.map +0 -1
  160. package/dist/services/swap/affiliate.js +0 -126
  161. package/dist/services/swap/affiliate.js.map +0 -1
  162. package/dist/services/swap/config.d.ts +0 -9
  163. package/dist/services/swap/config.d.ts.map +0 -1
  164. package/dist/services/swap/config.js +0 -19
  165. package/dist/services/swap/config.js.map +0 -1
  166. package/dist/services/swap/index.d.ts +0 -10
  167. package/dist/services/swap/index.d.ts.map +0 -1
  168. package/dist/services/swap/index.js +0 -22
  169. package/dist/services/swap/index.js.map +0 -1
  170. package/dist/services/swap/types.d.ts +0 -89
  171. package/dist/services/swap/types.d.ts.map +0 -1
  172. package/dist/services/swap/types.js +0 -6
  173. package/dist/services/swap/types.js.map +0 -1
  174. package/dist/tools/BaseTool.d.ts +0 -15
  175. package/dist/tools/BaseTool.d.ts.map +0 -1
  176. package/dist/tools/BaseTool.js +0 -35
  177. package/dist/tools/BaseTool.js.map +0 -1
  178. package/dist/tools/ToolRegistry.d.ts +0 -27
  179. package/dist/tools/ToolRegistry.d.ts.map +0 -1
  180. package/dist/tools/ToolRegistry.js +0 -80
  181. package/dist/tools/ToolRegistry.js.map +0 -1
  182. package/dist/tools/builtin/ai/GeminiSearchAiTool.d.ts +0 -36
  183. package/dist/tools/builtin/ai/GeminiSearchAiTool.d.ts.map +0 -1
  184. package/dist/tools/builtin/ai/GeminiSearchAiTool.js +0 -91
  185. package/dist/tools/builtin/ai/GeminiSearchAiTool.js.map +0 -1
  186. package/dist/tools/builtin/ai/index.d.ts +0 -3
  187. package/dist/tools/builtin/ai/index.d.ts.map +0 -1
  188. package/dist/tools/builtin/ai/index.js +0 -6
  189. package/dist/tools/builtin/ai/index.js.map +0 -1
  190. package/dist/tools/builtin/index.d.ts +0 -8
  191. package/dist/tools/builtin/index.d.ts.map +0 -1
  192. package/dist/tools/builtin/index.js +0 -24
  193. package/dist/tools/builtin/index.js.map +0 -1
  194. package/dist/tools/builtin/nft/BaseNftMessageTool.d.ts +0 -35
  195. package/dist/tools/builtin/nft/BaseNftMessageTool.d.ts.map +0 -1
  196. package/dist/tools/builtin/nft/BaseNftMessageTool.js +0 -45
  197. package/dist/tools/builtin/nft/BaseNftMessageTool.js.map +0 -1
  198. package/dist/tools/builtin/nft/NFTContractInfoTool.d.ts +0 -15
  199. package/dist/tools/builtin/nft/NFTContractInfoTool.d.ts.map +0 -1
  200. package/dist/tools/builtin/nft/NFTContractInfoTool.js +0 -19
  201. package/dist/tools/builtin/nft/NFTContractInfoTool.js.map +0 -1
  202. package/dist/tools/builtin/nft/NFTMetadataTool.d.ts +0 -15
  203. package/dist/tools/builtin/nft/NFTMetadataTool.d.ts.map +0 -1
  204. package/dist/tools/builtin/nft/NFTMetadataTool.js +0 -20
  205. package/dist/tools/builtin/nft/NFTMetadataTool.js.map +0 -1
  206. package/dist/tools/builtin/nft/SendNftTool.d.ts +0 -14
  207. package/dist/tools/builtin/nft/SendNftTool.d.ts.map +0 -1
  208. package/dist/tools/builtin/nft/SendNftTool.js +0 -20
  209. package/dist/tools/builtin/nft/SendNftTool.js.map +0 -1
  210. package/dist/tools/builtin/nft/WalletNFTsTool.d.ts +0 -15
  211. package/dist/tools/builtin/nft/WalletNFTsTool.d.ts.map +0 -1
  212. package/dist/tools/builtin/nft/WalletNFTsTool.js +0 -20
  213. package/dist/tools/builtin/nft/WalletNFTsTool.js.map +0 -1
  214. package/dist/tools/builtin/nft/index.d.ts +0 -7
  215. package/dist/tools/builtin/nft/index.d.ts.map +0 -1
  216. package/dist/tools/builtin/nft/index.js +0 -10
  217. package/dist/tools/builtin/nft/index.js.map +0 -1
  218. package/dist/tools/builtin/pool/EstimatePoolYieldTool.d.ts +0 -124
  219. package/dist/tools/builtin/pool/EstimatePoolYieldTool.d.ts.map +0 -1
  220. package/dist/tools/builtin/pool/EstimatePoolYieldTool.js +0 -236
  221. package/dist/tools/builtin/pool/EstimatePoolYieldTool.js.map +0 -1
  222. package/dist/tools/builtin/pool/OpenAddLiquidityFormTool.d.ts +0 -128
  223. package/dist/tools/builtin/pool/OpenAddLiquidityFormTool.d.ts.map +0 -1
  224. package/dist/tools/builtin/pool/OpenAddLiquidityFormTool.js +0 -520
  225. package/dist/tools/builtin/pool/OpenAddLiquidityFormTool.js.map +0 -1
  226. package/dist/tools/builtin/pool/PoolByAddressTool.d.ts +0 -127
  227. package/dist/tools/builtin/pool/PoolByAddressTool.d.ts.map +0 -1
  228. package/dist/tools/builtin/pool/PoolByAddressTool.js +0 -238
  229. package/dist/tools/builtin/pool/PoolByAddressTool.js.map +0 -1
  230. package/dist/tools/builtin/pool/PoolDetailTool.d.ts +0 -127
  231. package/dist/tools/builtin/pool/PoolDetailTool.d.ts.map +0 -1
  232. package/dist/tools/builtin/pool/PoolDetailTool.js +0 -273
  233. package/dist/tools/builtin/pool/PoolDetailTool.js.map +0 -1
  234. package/dist/tools/builtin/pool/PoolSearchTool.d.ts +0 -50
  235. package/dist/tools/builtin/pool/PoolSearchTool.d.ts.map +0 -1
  236. package/dist/tools/builtin/pool/PoolSearchTool.js +0 -160
  237. package/dist/tools/builtin/pool/PoolSearchTool.js.map +0 -1
  238. package/dist/tools/builtin/pool/PreviewAddLiquidityTool.d.ts +0 -124
  239. package/dist/tools/builtin/pool/PreviewAddLiquidityTool.d.ts.map +0 -1
  240. package/dist/tools/builtin/pool/PreviewAddLiquidityTool.js +0 -382
  241. package/dist/tools/builtin/pool/PreviewAddLiquidityTool.js.map +0 -1
  242. package/dist/tools/builtin/pool/TopPoolsTool.d.ts +0 -68
  243. package/dist/tools/builtin/pool/TopPoolsTool.d.ts.map +0 -1
  244. package/dist/tools/builtin/pool/TopPoolsTool.js +0 -159
  245. package/dist/tools/builtin/pool/TopPoolsTool.js.map +0 -1
  246. package/dist/tools/builtin/pool/index.d.ts +0 -15
  247. package/dist/tools/builtin/pool/index.d.ts.map +0 -1
  248. package/dist/tools/builtin/pool/index.js +0 -18
  249. package/dist/tools/builtin/pool/index.js.map +0 -1
  250. package/dist/tools/builtin/pool-subgraph/SubgraphCoinPoolPairsTool.d.ts +0 -54
  251. package/dist/tools/builtin/pool-subgraph/SubgraphCoinPoolPairsTool.d.ts.map +0 -1
  252. package/dist/tools/builtin/pool-subgraph/SubgraphCoinPoolPairsTool.js +0 -98
  253. package/dist/tools/builtin/pool-subgraph/SubgraphCoinPoolPairsTool.js.map +0 -1
  254. package/dist/tools/builtin/pool-subgraph/SubgraphPoolByAddressTool.d.ts +0 -63
  255. package/dist/tools/builtin/pool-subgraph/SubgraphPoolByAddressTool.d.ts.map +0 -1
  256. package/dist/tools/builtin/pool-subgraph/SubgraphPoolByAddressTool.js +0 -82
  257. package/dist/tools/builtin/pool-subgraph/SubgraphPoolByAddressTool.js.map +0 -1
  258. package/dist/tools/builtin/pool-subgraph/SubgraphPoolByPositionIdTool.d.ts +0 -79
  259. package/dist/tools/builtin/pool-subgraph/SubgraphPoolByPositionIdTool.d.ts.map +0 -1
  260. package/dist/tools/builtin/pool-subgraph/SubgraphPoolByPositionIdTool.js +0 -97
  261. package/dist/tools/builtin/pool-subgraph/SubgraphPoolByPositionIdTool.js.map +0 -1
  262. package/dist/tools/builtin/pool-subgraph/SubgraphPoolSearchTool.d.ts +0 -77
  263. package/dist/tools/builtin/pool-subgraph/SubgraphPoolSearchTool.d.ts.map +0 -1
  264. package/dist/tools/builtin/pool-subgraph/SubgraphPoolSearchTool.js +0 -190
  265. package/dist/tools/builtin/pool-subgraph/SubgraphPoolSearchTool.js.map +0 -1
  266. package/dist/tools/builtin/pool-subgraph/SubgraphPositionDetailTool.d.ts +0 -107
  267. package/dist/tools/builtin/pool-subgraph/SubgraphPositionDetailTool.d.ts.map +0 -1
  268. package/dist/tools/builtin/pool-subgraph/SubgraphPositionDetailTool.js +0 -92
  269. package/dist/tools/builtin/pool-subgraph/SubgraphPositionDetailTool.js.map +0 -1
  270. package/dist/tools/builtin/pool-subgraph/SubgraphTrendingPoolsTool.d.ts +0 -56
  271. package/dist/tools/builtin/pool-subgraph/SubgraphTrendingPoolsTool.d.ts.map +0 -1
  272. package/dist/tools/builtin/pool-subgraph/SubgraphTrendingPoolsTool.js +0 -94
  273. package/dist/tools/builtin/pool-subgraph/SubgraphTrendingPoolsTool.js.map +0 -1
  274. package/dist/tools/builtin/pool-subgraph/index.d.ts +0 -13
  275. package/dist/tools/builtin/pool-subgraph/index.d.ts.map +0 -1
  276. package/dist/tools/builtin/pool-subgraph/index.js +0 -18
  277. package/dist/tools/builtin/pool-subgraph/index.js.map +0 -1
  278. package/dist/tools/builtin/token/TokenAnalyticsTool.d.ts +0 -71
  279. package/dist/tools/builtin/token/TokenAnalyticsTool.d.ts.map +0 -1
  280. package/dist/tools/builtin/token/TokenAnalyticsTool.js +0 -147
  281. package/dist/tools/builtin/token/TokenAnalyticsTool.js.map +0 -1
  282. package/dist/tools/builtin/token/TokenHoldersTool.d.ts +0 -81
  283. package/dist/tools/builtin/token/TokenHoldersTool.d.ts.map +0 -1
  284. package/dist/tools/builtin/token/TokenHoldersTool.js +0 -139
  285. package/dist/tools/builtin/token/TokenHoldersTool.js.map +0 -1
  286. package/dist/tools/builtin/token/TokenInfoTool.d.ts +0 -40
  287. package/dist/tools/builtin/token/TokenInfoTool.d.ts.map +0 -1
  288. package/dist/tools/builtin/token/TokenInfoTool.js +0 -221
  289. package/dist/tools/builtin/token/TokenInfoTool.js.map +0 -1
  290. package/dist/tools/builtin/token/TokenScoreTool.d.ts +0 -63
  291. package/dist/tools/builtin/token/TokenScoreTool.d.ts.map +0 -1
  292. package/dist/tools/builtin/token/TokenScoreTool.js +0 -148
  293. package/dist/tools/builtin/token/TokenScoreTool.js.map +0 -1
  294. package/dist/tools/builtin/token/TopGainersTool.d.ts +0 -37
  295. package/dist/tools/builtin/token/TopGainersTool.d.ts.map +0 -1
  296. package/dist/tools/builtin/token/TopGainersTool.js +0 -100
  297. package/dist/tools/builtin/token/TopGainersTool.js.map +0 -1
  298. package/dist/tools/builtin/token/TopLosersTool.d.ts +0 -66
  299. package/dist/tools/builtin/token/TopLosersTool.d.ts.map +0 -1
  300. package/dist/tools/builtin/token/TopLosersTool.js +0 -129
  301. package/dist/tools/builtin/token/TopLosersTool.js.map +0 -1
  302. package/dist/tools/builtin/token/TrendingTokensTool.d.ts +0 -39
  303. package/dist/tools/builtin/token/TrendingTokensTool.d.ts.map +0 -1
  304. package/dist/tools/builtin/token/TrendingTokensTool.js +0 -83
  305. package/dist/tools/builtin/token/TrendingTokensTool.js.map +0 -1
  306. package/dist/tools/builtin/token/index.d.ts +0 -13
  307. package/dist/tools/builtin/token/index.d.ts.map +0 -1
  308. package/dist/tools/builtin/token/index.js +0 -16
  309. package/dist/tools/builtin/token/index.js.map +0 -1
  310. package/dist/tools/builtin/wallet/TransactionByHashTool.d.ts +0 -70
  311. package/dist/tools/builtin/wallet/TransactionByHashTool.d.ts.map +0 -1
  312. package/dist/tools/builtin/wallet/TransactionByHashTool.js +0 -111
  313. package/dist/tools/builtin/wallet/TransactionByHashTool.js.map +0 -1
  314. package/dist/tools/builtin/wallet/WalletApprovalsTool.d.ts +0 -107
  315. package/dist/tools/builtin/wallet/WalletApprovalsTool.d.ts.map +0 -1
  316. package/dist/tools/builtin/wallet/WalletApprovalsTool.js +0 -164
  317. package/dist/tools/builtin/wallet/WalletApprovalsTool.js.map +0 -1
  318. package/dist/tools/builtin/wallet/WalletDefiPositionsTool.d.ts +0 -61
  319. package/dist/tools/builtin/wallet/WalletDefiPositionsTool.d.ts.map +0 -1
  320. package/dist/tools/builtin/wallet/WalletDefiPositionsTool.js +0 -100
  321. package/dist/tools/builtin/wallet/WalletDefiPositionsTool.js.map +0 -1
  322. package/dist/tools/builtin/wallet/WalletDefiProtocolPositionsTool.d.ts +0 -68
  323. package/dist/tools/builtin/wallet/WalletDefiProtocolPositionsTool.d.ts.map +0 -1
  324. package/dist/tools/builtin/wallet/WalletDefiProtocolPositionsTool.js +0 -115
  325. package/dist/tools/builtin/wallet/WalletDefiProtocolPositionsTool.js.map +0 -1
  326. package/dist/tools/builtin/wallet/WalletDefiSummaryTool.d.ts +0 -50
  327. package/dist/tools/builtin/wallet/WalletDefiSummaryTool.d.ts.map +0 -1
  328. package/dist/tools/builtin/wallet/WalletDefiSummaryTool.js +0 -80
  329. package/dist/tools/builtin/wallet/WalletDefiSummaryTool.js.map +0 -1
  330. package/dist/tools/builtin/wallet/WalletHistoryTool.d.ts +0 -31
  331. package/dist/tools/builtin/wallet/WalletHistoryTool.d.ts.map +0 -1
  332. package/dist/tools/builtin/wallet/WalletHistoryTool.js +0 -154
  333. package/dist/tools/builtin/wallet/WalletHistoryTool.js.map +0 -1
  334. package/dist/tools/builtin/wallet/WalletNetWorthTool.d.ts +0 -44
  335. package/dist/tools/builtin/wallet/WalletNetWorthTool.d.ts.map +0 -1
  336. package/dist/tools/builtin/wallet/WalletNetWorthTool.js +0 -122
  337. package/dist/tools/builtin/wallet/WalletNetWorthTool.js.map +0 -1
  338. package/dist/tools/builtin/wallet/WalletNftTransfersTool.d.ts +0 -86
  339. package/dist/tools/builtin/wallet/WalletNftTransfersTool.d.ts.map +0 -1
  340. package/dist/tools/builtin/wallet/WalletNftTransfersTool.js +0 -265
  341. package/dist/tools/builtin/wallet/WalletNftTransfersTool.js.map +0 -1
  342. package/dist/tools/builtin/wallet/WalletPnlSummaryTool.d.ts +0 -43
  343. package/dist/tools/builtin/wallet/WalletPnlSummaryTool.d.ts.map +0 -1
  344. package/dist/tools/builtin/wallet/WalletPnlSummaryTool.js +0 -89
  345. package/dist/tools/builtin/wallet/WalletPnlSummaryTool.js.map +0 -1
  346. package/dist/tools/builtin/wallet/WalletPnlTool.d.ts +0 -43
  347. package/dist/tools/builtin/wallet/WalletPnlTool.d.ts.map +0 -1
  348. package/dist/tools/builtin/wallet/WalletPnlTool.js +0 -175
  349. package/dist/tools/builtin/wallet/WalletPnlTool.js.map +0 -1
  350. package/dist/tools/builtin/wallet/WalletTokenBalancesTool.d.ts +0 -35
  351. package/dist/tools/builtin/wallet/WalletTokenBalancesTool.d.ts.map +0 -1
  352. package/dist/tools/builtin/wallet/WalletTokenBalancesTool.js +0 -68
  353. package/dist/tools/builtin/wallet/WalletTokenBalancesTool.js.map +0 -1
  354. package/dist/tools/builtin/wallet/WalletTokenTransfersTool.d.ts +0 -109
  355. package/dist/tools/builtin/wallet/WalletTokenTransfersTool.d.ts.map +0 -1
  356. package/dist/tools/builtin/wallet/WalletTokenTransfersTool.js +0 -354
  357. package/dist/tools/builtin/wallet/WalletTokenTransfersTool.js.map +0 -1
  358. package/dist/tools/builtin/wallet/index.d.ts +0 -28
  359. package/dist/tools/builtin/wallet/index.d.ts.map +0 -1
  360. package/dist/tools/builtin/wallet/index.js +0 -32
  361. package/dist/tools/builtin/wallet/index.js.map +0 -1
  362. package/dist/tools/builtin/wallet-action/ApproveTokenTool.d.ts +0 -25
  363. package/dist/tools/builtin/wallet-action/ApproveTokenTool.d.ts.map +0 -1
  364. package/dist/tools/builtin/wallet-action/ApproveTokenTool.js +0 -98
  365. package/dist/tools/builtin/wallet-action/ApproveTokenTool.js.map +0 -1
  366. package/dist/tools/builtin/wallet-action/BaseWalletActionTool.d.ts +0 -211
  367. package/dist/tools/builtin/wallet-action/BaseWalletActionTool.d.ts.map +0 -1
  368. package/dist/tools/builtin/wallet-action/BaseWalletActionTool.js +0 -499
  369. package/dist/tools/builtin/wallet-action/BaseWalletActionTool.js.map +0 -1
  370. package/dist/tools/builtin/wallet-action/BuyTokenTool.d.ts +0 -240
  371. package/dist/tools/builtin/wallet-action/BuyTokenTool.d.ts.map +0 -1
  372. package/dist/tools/builtin/wallet-action/BuyTokenTool.js +0 -1257
  373. package/dist/tools/builtin/wallet-action/BuyTokenTool.js.map +0 -1
  374. package/dist/tools/builtin/wallet-action/SendNativeTool.d.ts +0 -41
  375. package/dist/tools/builtin/wallet-action/SendNativeTool.d.ts.map +0 -1
  376. package/dist/tools/builtin/wallet-action/SendNativeTool.js +0 -127
  377. package/dist/tools/builtin/wallet-action/SendNativeTool.js.map +0 -1
  378. package/dist/tools/builtin/wallet-action/SendTokenTool.d.ts +0 -63
  379. package/dist/tools/builtin/wallet-action/SendTokenTool.d.ts.map +0 -1
  380. package/dist/tools/builtin/wallet-action/SendTokenTool.js +0 -294
  381. package/dist/tools/builtin/wallet-action/SendTokenTool.js.map +0 -1
  382. package/dist/tools/builtin/wallet-action/SwapTokenTool.d.ts +0 -247
  383. package/dist/tools/builtin/wallet-action/SwapTokenTool.d.ts.map +0 -1
  384. package/dist/tools/builtin/wallet-action/SwapTokenTool.js +0 -1258
  385. package/dist/tools/builtin/wallet-action/SwapTokenTool.js.map +0 -1
  386. package/dist/tools/builtin/wallet-action/UnwrapNativeTool.d.ts +0 -20
  387. package/dist/tools/builtin/wallet-action/UnwrapNativeTool.d.ts.map +0 -1
  388. package/dist/tools/builtin/wallet-action/UnwrapNativeTool.js +0 -36
  389. package/dist/tools/builtin/wallet-action/UnwrapNativeTool.js.map +0 -1
  390. package/dist/tools/builtin/wallet-action/WrapNativeTool.d.ts +0 -23
  391. package/dist/tools/builtin/wallet-action/WrapNativeTool.d.ts.map +0 -1
  392. package/dist/tools/builtin/wallet-action/WrapNativeTool.js +0 -54
  393. package/dist/tools/builtin/wallet-action/WrapNativeTool.js.map +0 -1
  394. package/dist/tools/builtin/wallet-action/amountSpec.d.ts +0 -62
  395. package/dist/tools/builtin/wallet-action/amountSpec.d.ts.map +0 -1
  396. package/dist/tools/builtin/wallet-action/amountSpec.js +0 -93
  397. package/dist/tools/builtin/wallet-action/amountSpec.js.map +0 -1
  398. package/dist/tools/builtin/wallet-action/gasReserve.d.ts +0 -42
  399. package/dist/tools/builtin/wallet-action/gasReserve.d.ts.map +0 -1
  400. package/dist/tools/builtin/wallet-action/gasReserve.js +0 -103
  401. package/dist/tools/builtin/wallet-action/gasReserve.js.map +0 -1
  402. package/dist/tools/builtin/wallet-action/index.d.ts +0 -9
  403. package/dist/tools/builtin/wallet-action/index.d.ts.map +0 -1
  404. package/dist/tools/builtin/wallet-action/index.js +0 -20
  405. package/dist/tools/builtin/wallet-action/index.js.map +0 -1
  406. package/dist/tools/chainResolver.d.ts +0 -98
  407. package/dist/tools/chainResolver.d.ts.map +0 -1
  408. package/dist/tools/chainResolver.js +0 -302
  409. package/dist/tools/chainResolver.js.map +0 -1
  410. package/dist/tools/index.d.ts +0 -4
  411. package/dist/tools/index.d.ts.map +0 -1
  412. package/dist/tools/index.js +0 -23
  413. package/dist/tools/index.js.map +0 -1
  414. package/dist/types/index.d.ts +0 -777
  415. package/dist/types/index.d.ts.map +0 -1
  416. package/dist/types/index.js +0 -6
  417. package/dist/types/index.js.map +0 -1
@@ -1 +0,0 @@
1
- {"version":3,"file":"SendTokenTool.js","sourceRoot":"","sources":["../../../../src/tools/builtin/wallet-action/SendTokenTool.ts"],"names":[],"mappings":";;;AAEA,iEAAkF;AAElF;;;;;;;;;;GAUG;AACH,MAAa,aAAc,SAAQ,2CAAoB;IACrD,IAAI,GAAG,sBAAsB,CAAC;IACX,UAAU,GAAqB,YAAY,CAAC;IAC5C,SAAS,GAAG,eAAe,CAAC;IAE/C,6EAA6E;IAC7E,yEAAyE;IACtD,eAAe,GAAG;QACnC,EAAE,GAAG,EAAE,YAAY,EAAE,KAAK,EAAE,uBAAuB,EAAE;QACrD,EAAE,GAAG,EAAE,QAAQ,EAAE,KAAK,EAAE,o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AG,GAAG,CAAC,OAAO,CAAC,aAAa,EAAE,MAAM,CAAC,CAAC,OAAO,CAAC,aAAa,EAAE,MAAM,IAAI,EAAE,CAAC,CAAC;QAClF,IAAI,SAAS,EAAE,CAAC;YACd,GAAG,GAAG,GAAG,CAAC,OAAO,CAAC,SAAS,EAAE,SAAS,CAAC,CAAC;QAC1C,CAAC;aAAM,CAAC;YACN,yEAAyE;YACzE,yEAAyE;YACzE,yEAAyE;YACzE,GAAG,GAAG,GAAG;iBACN,OAAO,CAAC,kBAAkB,EAAE,EAAE,CAAC;iBAC/B,OAAO,CAAC,kBAAkB,EAAE,EAAE,CAAC;iBAC/B,OAAO,CAAC,SAAS,EAAE,EAAE,CAAC,CAAC;QAC5B,CAAC;QACD,yDAAyD;QACzD,OAAO,GAAG,CAAC,OAAO,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC,IAAI,EAAE,CAAC;IACzC,CAAC;CACF;AA/SD,sCA+SC"}
@@ -1,247 +0,0 @@
1
- import { BaseTool } from '../../BaseTool';
2
- import { type MoralisServiceConfig } from '../../../services/MoralisService';
3
- import type { ToolKind, ToolParameter, ToolResult, UIPayload, UserContext } from '../../../types';
4
- /**
5
- * Tool: open-swap-token-form
6
- *
7
- * A STANDALONE wallet-action tool (NOT a `BaseWalletActionTool`), built as the
8
- * mirror of {@link BuyTokenTool}: it does the quote + approval work itself and
9
- * ships a custom `SwapTokenConfirmTx` UI payload the FE executes directly. That's
10
- * why `swap_token` is intentionally NOT a member of `WalletActionType`.
11
- *
12
- * The defining difference from BUY: the SOURCE is a token the user ALREADY HOLDS.
13
- * Buy starts from a destination ("buy PEPE") and asks which wallet token to pay
14
- * with; swap starts from the user's own token ("swap USDC") and asks what to
15
- * receive. The source is therefore always balance-checked — we never quote a
16
- * swap the user can't fund.
17
- *
18
- * - "swap usdc to usdt" → from = USDC (held), to = USDT.
19
- * - "swap usdc" → from = USDC (held); destination unknown ⇒ trending
20
- * picker so the user picks what to receive.
21
- * - "swap" → nothing named ⇒ source picker built from the wallet's
22
- * own holdings so the user picks what to swap FROM.
23
- *
24
- * Branches, picked deterministically from the args:
25
- *
26
- * 0. **Source picker** — the user named NO source (`from_symbol`/`from_address`
27
- * empty). The tool fetches the wallet's native + ERC-20 holdings and emits
28
- * `actionButtons` so the user picks which token to swap FROM. A click
29
- * re-submits a prompt like `"swap USDC"` which routes back here.
30
- *
31
- * 1. **Destination picker (trending)** — the user named the source only. The
32
- * tool fetches the chain's live trending list (minus the source token) and
33
- * emits `actionButtons` so the user picks what to receive. A click submits a
34
- * prompt like `"swap USDC to PEPE"` which routes back for the standard flow.
35
- *
36
- * 1.4 **Balance check** — the source token is named (amount optional). Runs
37
- * before anything else so we never proceed with a token the user can't fund:
38
- * if the wallet holds NONE of it, the tool offers the tokens the user DOES
39
- * hold instead (source picker); if it holds SOME but less than the requested
40
- * amount, it reports the shortfall and emits 25/50/75/100% buttons sized off
41
- * the real balance. Skipped for the native source token.
42
- *
43
- * 1.5 **Amount picker** — source + dest known but no amount given. The tool
44
- * reads the source balance and emits 25/50/75/100% buttons so the user sizes
45
- * the swap in one tap (or types a custom amount).
46
- *
47
- * 1.75 **Confirm tx** — source + dest + a SOURCE amount are all known. The tool
48
- * fetches a swap quote (estimated receive amount + the raw swap tx), checks
49
- * allowance, and emits a `SwapTokenConfirmTx` payload bundling the estimate,
50
- * the raw swap transaction, and the approve transaction (when one is needed).
51
- * The FE executes approve (if any) then swap itself.
52
- *
53
- * When none of the above produces a result (couldn't resolve a token, quote
54
- * failed, …) the tool returns an error/_instructions object — it never opens a
55
- * generic form.
56
- *
57
- * Amount disambiguation mirrors BuyTokenTool. The swap is EXACT_INPUT (deBridge),
58
- * so the amount that seeds the quote is the SOURCE amount:
59
- * - "swap 10 USDC to USDT" → from_amount = "10"
60
- * - "swap USDC to 5 USDT" → to_amount = "5" (converted to a source amount via
61
- * live USD prices, like BuyTokenTool's buy side).
62
- */
63
- export declare class SwapTokenTool extends BaseTool {
64
- name: string;
65
- kind: ToolKind;
66
- category: string;
67
- noSuggestions: boolean;
68
- private readonly moralis?;
69
- /** Trending tokens come from Pantograph (top-gainers), not Moralis. */
70
- private readonly pantograph?;
71
- /** Branch-tracing on/off — shares AgentCore's `debug` flag (passed in). */
72
- private readonly debug;
73
- constructor(config?: MoralisServiceConfig, options?: {
74
- debug?: boolean;
75
- });
76
- /**
77
- * Branch-tracing logger. Prints which branch the tool takes and the key
78
- * values feeding that decision. Enabled by AgentCore's shared `debug` flag.
79
- */
80
- private dbg;
81
- description: string;
82
- parameters: ToolParameter[];
83
- execute(args: Record<string, unknown>, userContext?: UserContext): Promise<ToolResult>;
84
- protected run(args: Record<string, unknown>, userContext?: UserContext): Promise<{
85
- actionButtons: {
86
- label: string;
87
- prompt: string;
88
- }[];
89
- _instructions: string;
90
- } | {
91
- ui: UIPayload;
92
- _instructions: string;
93
- } | {
94
- error: string;
95
- _instructions: string;
96
- }>;
97
- private buildResult;
98
- private normaliseAddress;
99
- private normaliseAmount;
100
- private requireChain;
101
- /**
102
- * Resolve a token reference (symbol "USDC" or address "0x…") on a chain.
103
- * Wallet balances first (most reliable), then Pantograph search. Decimals come
104
- * from the API — never from the LLM.
105
- */
106
- private resolveContractAddress;
107
- /**
108
- * Resolve one side of the swap (from or to). Honours the `"native"` sentinel
109
- * the swap providers expect. Never errors — a side that can't be resolved
110
- * just comes back with `address: null`.
111
- */
112
- private resolveSide;
113
- /**
114
- * Source token + dest token + a source-token amount are known. Fetch a swap
115
- * quote (estimated receive amount + raw swap tx), check approval, and return a
116
- * `SwapTokenConfirmTx` UI payload the FE executes itself. Returns `null` when
117
- * anything we need can't be produced (bad chain, quote failed, non-EVM tx).
118
- */
119
- private buildConfirmTx;
120
- /**
121
- * deBridge only quotes EXACT_INPUT, so a "swap to X of the dest token" request
122
- * has no input amount to seed the quote. Convert the desired output into a
123
- * source-token amount using each side's live USD price:
124
- *
125
- * fromAmount ≈ (toAmount × toPriceUsd) / fromPriceUsd × (1 + buffer)
126
- *
127
- * The +2% buffer covers slippage + fees so the user receives AT LEAST roughly
128
- * the requested amount (the confirm panel still shows the REAL estimate from
129
- * the quote, not this derived figure). Returns `null` when either token's USD
130
- * price can't be fetched — the caller then asks for a from amount instead.
131
- */
132
- private deriveFromAmountFromTo;
133
- /**
134
- * Best-effort live USD price for one side of the swap, sourced from
135
- * Pantograph (via `MoralisService.getTokenMetadata`). The native coin
136
- * (`'native'`) is looked up with the zero address. Returns `null` when no
137
- * positive price is available so the caller can degrade gracefully.
138
- */
139
- private getUsdPrice;
140
- /**
141
- * Resolve the FROM-side amount, which may be plain ("10"), a PERCENT of the
142
- * held source-token balance ("50%"), or a USD value ("5$"). Percent reads the
143
- * wallet's source-token balance; usd divides by the source token's USD price.
144
- * Returns a plain token amount string, or `null` when nothing usable was given
145
- * / the balance or price needed for a percent/usd couldn't be fetched.
146
- */
147
- private resolveFromAmountSpec;
148
- /**
149
- * Resolve the TO-side amount, which may be plain ("5") or a USD value ("5$").
150
- * USD divides by the DEST token's price to get how many dest tokens "$X worth"
151
- * is — that token figure then flows through Branch 1.3 to derive the from
152
- * amount. A PERCENT on the to side is meaningless, so it's ignored (returns
153
- * null). Returns a plain token amount string or `null`.
154
- */
155
- private resolveToAmountSpec;
156
- /**
157
- * Check whether the source token needs an allowance for this swap and, if so,
158
- * return a ready-to-sign ERC-20 approve tx. deBridge only reports the spender
159
- * (`tx.to`), so we encode the approve calldata ourselves; integrated providers
160
- * (Relay) hand back the approve tx directly.
161
- */
162
- private buildApproveTx;
163
- /** Human amount → smallest-unit decimal string (no float drift via BigInt). */
164
- private toRawAmount;
165
- /**
166
- * Pull a human-readable failure reason out of a failed quote. Adapters set
167
- * `errorMessage` (string) and `error` (string or a provider object). deBridge
168
- * also nests a reason in `raw.errorMessage` / `raw.error`. Falls back to a
169
- * generic line so the caller always has something to show.
170
- */
171
- private extractQuoteError;
172
- /**
173
- * Estimated receive amount in the dest token's smallest units. Shape differs
174
- * per provider — deBridge same-chain: `raw.tokenOut.minAmount`; deBridge
175
- * cross-chain: `raw.estimation.dstChainTokenOut.amount`; Relay:
176
- * `raw.details.currencyOut.{amount|minimumAmount}`.
177
- */
178
- private extractOutRaw;
179
- private buildSourcePicker;
180
- private buildToTrendingPicker;
181
- /**
182
- * Guard the swap flow against a source token the user can't fund. Returns:
183
- * - `null` when the user holds enough (or no amount yet, or balances can't be read).
184
- * - `no_from_balance` (+ source picker buttons) when the wallet holds none of it.
185
- * - `insufficient_from_balance` (+ percentage buttons) when it holds some but
186
- * less than the requested amount.
187
- */
188
- private checkFromBalance;
189
- /**
190
- * Read the connected wallet's balance of the source token. Returns the held
191
- * amount + on-chain symbol, or `null` when balances can't be fetched / the
192
- * token isn't held (zero balance or not held at all).
193
- *
194
- * For the NATIVE source coin the returned balance is the SPENDABLE figure —
195
- * the held balance minus a silently-estimated swap gas reserve (gasLimit
196
- * 1_000_000 × gasPrice) — so the percent buttons, amount picker, and balance
197
- * check all stay within what the user can actually swap while still covering
198
- * gas. The reserve is never surfaced; callers only ever expose the spendable
199
- * number. ERC-20 sources are returned at their raw held balance (gas is paid
200
- * in the native coin, not the source token).
201
- */
202
- private readFromBalance;
203
- /**
204
- * 25/50/75/100% quick-spend buttons sized off a held balance. 100% spends the
205
- * EXACT held string; the partial fractions are float-trimmed. The amount rides
206
- * in the prompt; the label is a bare percent.
207
- */
208
- private percentSpendButtons;
209
- private buildAmountPicker;
210
- /**
211
- * Trim IEEE-754 noise from a computed amount (≤8 significant digits) and
212
- * ALWAYS return plain decimal notation — never exponential ("1.5e-7").
213
- */
214
- private trimAmount;
215
- /** Format a number as a plain decimal string, expanding any e-notation. */
216
- private toPlainDecimal;
217
- /**
218
- * Sanitize an amount STRING from an external source (e.g. Moralis
219
- * `balance_formatted`): expand e-notation to plain decimal; else pass through.
220
- */
221
- private cleanAmountString;
222
- /**
223
- * Build the source-picker click-prompt ("swap {token}") from the LLM-supplied,
224
- * already-localized template. Falls back to English when the LLM omits one.
225
- */
226
- private buildSwapFromPrompt;
227
- /**
228
- * Build the "swap X to Y" click-prompt from the LLM-supplied, already-localized
229
- * template by substituting placeholders:
230
- * {from} → source token {to} → destination token
231
- * {from_amount} → quantity swapped (next to {from})
232
- * {to_amount} → quantity received (next to {to})
233
- * The localized verb and "to" preposition live INSIDE the template, so we only
234
- * substitute concrete values. Only one side ever carries an amount; the unused
235
- * amount placeholder is replaced with '' (no preposition is attached to it, so
236
- * nothing dangles). Falls back to an English template when the LLM omits one.
237
- */
238
- private buildSwapToPrompt;
239
- /**
240
- * Format a 24h price-change percentage: ~6 significant digits, no trailing
241
- * noise, and always plain decimal (never exponential for a tiny change).
242
- */
243
- private formatPercent;
244
- /** Compact price string: e.g. 0.00001234 → "0.00001234", 1234.5 → "1,234.50". */
245
- private formatPrice;
246
- }
247
- //# sourceMappingURL=SwapTokenTool.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"SwapTokenTool.d.ts","sourceRoot":"","sources":["../../../../src/tools/builtin/wallet-action/SwapTokenTool.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAE1C,OAAO,EAAkB,KAAK,oBAAoB,EAAE,MAAM,kCAAkC,CAAC;AAI7F,OAAO,KAAK,EAGV,QAAQ,EACR,aAAa,EACb,UAAU,EACV,SAAS,EAET,WAAW,EACZ,MAAM,gBAAgB,CAAC;AAcxB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA0DG;AACH,qBAAa,aAAc,SAAQ,QAAQ;IACzC,IAAI,SAA0B;IAC9B,IAAI,EAAE,QAAQ,CAAY;IAC1B,QAAQ,SAAmB;IAE3B,aAAa,UAAQ;IAErB,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAiB;IAC1C,uEAAuE;IACvE,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAC,CAAoB;IAChD,2EAA2E;IAC3E,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAU;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