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":"WalletPnlTool.js","sourceRoot":"","sources":["../../../../src/tools/builtin/wallet/WalletPnlTool.ts"],"names":[],"mappings":";;;AAAA,6CAA0C;AAC1C,uDAAmD;AAEnD,qEAAuH;AAIvH,MAAM,UAAU,GAA0B,CAAC,KAAK,EAAE,GAAG,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC;AAEzE;;;;;;;;GAQG;AACH,MAAM,iBAAiB,GAAG,EAAE,CAAC;AAE7B,MAAa,aAAc,SAAQ,mBAAQ;IACzC,IAAI,GAAG,gBAAgB,CAAC;IACxB,WAAW,GACT,wEAAwE;QACxE,2GAA2G;QAC3G,yGAAyG;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seTool } from '../../BaseTool';
2
- import type { ToolParameter, UserContext } from '../../../types';
3
- import { type MoralisServiceConfig } from '../../../services/MoralisService';
4
- export type WalletTokenBalancesToolConfig = MoralisServiceConfig;
5
- /**
6
- * Tool: get-wallet-token-balances
7
- *
8
- * Fetches ERC-20 token balances for a wallet address via the Moralis EVM API.
9
- * Automatically enriches prices, filters spam/dust, and uses the connected
10
- * wallet + chain from UserContext when not explicitly provided.
11
- */
12
- export declare class WalletTokenBalancesTool extends BaseTool {
13
- name: string;
14
- description: string;
15
- category: string;
16
- parameters: ToolParameter[];
17
- private service;
18
- constructor(config?: WalletTokenBalancesToolConfig);
19
- protected run(args: Record<string, unknown>, userContext?: UserContext): Promise<{
20
- error: string;
21
- walletAddress?: undefined;
22
- chain?: undefined;
23
- tokenCount?: undefined;
24
- tokens?: undefined;
25
- totalUsdValue?: undefined;
26
- } | {
27
- walletAddress: string;
28
- chain: string;
29
- tokenCount: number;
30
- tokens: import("../../../services/MoralisService").TokenBalance[];
31
- totalUsdValue: number;
32
- error?: undefined;
33
- }>;
34
- }
35
- //# sourceMappingURL=WalletTokenBalancesTool.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"WalletTokenBalancesTool.d.ts","sourceRoot":"","sources":["../../../../src/tools/builtin/wallet/WalletTokenBalancesTool.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAE1C,OAAO,KAAK,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AACjE,OAAO,EAAkB,KAAK,oBAAoB,EAAE,MAAM,kCAAkC,CAAC;AAE7F,MAAM,MAAM,6BAA6B,GAAG,oBAAoB,CAAC;AAEjE;;;;;;GAMG;AACH,qBAAa,uBAAwB,SAAQ,QAAQ;IACnD,IAAI,SAA+B;IACnC,WAAW,SAIwE;IACnF,QAAQ,SAAqB;IAC7B,UAAU,EAAE,aAAa,EAAE,CAezB;IAEF,OAAO,CAAC,OAAO,CAAiB;gBAEpB,MAAM,CAAC,EAAE,6BAA6B;cAKlC,GAAG,CAAC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,WAAW,CAAC,EAAE,WAAW;;;;;;;;;;;;;;;CA8B7E"}
@@ -1,68 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.WalletTokenBalancesTool = void 0;
4
- const BaseTool_1 = require("../../BaseTool");
5
- const chainResolver_1 = require("../../chainResolver");
6
- const MoralisService_1 = require("../../../services/MoralisService");
7
- /**
8
- * Tool: get-wallet-token-balances
9
- *
10
- * Fetches ERC-20 token balances for a wallet address via the Moralis EVM API.
11
- * Automatically enriches prices, filters spam/dust, and uses the connected
12
- * wallet + chain from UserContext when not explicitly provided.
13
- */
14
- class WalletTokenBalancesTool extends BaseTool_1.BaseTool {
15
- name = 'get-wallet-token-balances';
16
- description = 'Get all ERC-20 token balances for a wallet address, including USD prices and 24h changes. ' +
17
- 'Use this when the user asks about: "my tokens", "my balances", "what do I hold", "portfolio", ' +
18
- '"how much ETH/USDC/… do I have", or any wallet balance question. ' +
19
- 'Supports: Ethereum, Optimism, BSC, Polygon, Base, Arbitrum, Avalanche, Linea. ';
20
- category = 'blockchain-data';
21
- parameters = [
22
- {
23
- name: 'address',
24
- type: 'string',
25
- description: 'Wallet address to query (0x…). If omitted, uses the connected wallet from user context.',
26
- required: false,
27
- },
28
- {
29
- name: 'chain',
30
- type: 'string',
31
- description: 'Hex chain ID: "0x1" Ethereum, "0xa" Optimism, "0x38" BSC, "0x89" Polygon, "0x2105" Base, ' +
32
- '"0xa4b1" Arbitrum, "0xa86a" Avalanche, "0xe708" Linea. ONLY set this when the user EXPLICITLY names a chain; otherwise OMIT it so the connected wallet chain is used.',
33
- required: false,
34
- },
35
- ];
36
- service;
37
- constructor(config) {
38
- super();
39
- this.service = new MoralisService_1.MoralisService(config);
40
- }
41
- async run(args, userContext) {
42
- const address = args.address || userContext?.walletAddress || undefined;
43
- const chain = (0, chainResolver_1.resolveChain)(args.chain, userContext);
44
- if (!address) {
45
- return { error: 'No wallet address available. Please connect a wallet.' };
46
- }
47
- const result = await this.service.getWalletTokenBalances({
48
- address,
49
- chain,
50
- excludeSpam: false,
51
- excludeUnverifiedContracts: false,
52
- });
53
- if (!result.success) {
54
- return { error: result.error || 'Failed to fetch token balances' };
55
- }
56
- const tokens = result.data?.result || [];
57
- // Build structured response data for the Synthesizer
58
- return {
59
- walletAddress: address,
60
- chain: chain || 'default',
61
- tokenCount: tokens.length,
62
- tokens: tokens,
63
- totalUsdValue: tokens.reduce((sum, t) => sum + (t.usd_value || 0), 0),
64
- };
65
- }
66
- }
67
- exports.WalletTokenBalancesTool = WalletTokenBalancesTool;
68
- //# sourceMappingURL=WalletTokenBalancesTool.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"WalletTokenBalancesTool.js","sourceRoot":"","sources":["../../../../src/tools/builtin/wallet/WalletTokenBalancesTool.ts"],"names":[],"mappings":";;;AAAA,6CAA0C;AAC1C,uDAAmD;AAEnD,qEAA6F;AAI7F;;;;;;GAMG;AACH,MAAa,uBAAwB,SAAQ,mBAAQ;IACnD,IAAI,GAAG,2BAA2B,CAAC;IACnC,WAAW,GACT,4FAA4F;QAC5F,gGAAgG;QAChG,mEAAmE;QACnE,gFAAgF,CAAC;IACnF,QAAQ,GAAG,iBAAiB,CAAC;IAC7B,UAAU,GAAoB;QAC5B;YACE,IAAI,EAAE,SAAS;YACf,IAAI,EAAE,QAAQ;YACd,WAAW,EAAE,yFAAyF;YACtG,QAAQ,EAAE,KAAK;SAChB;QACD;YACE,IAAI,EAAE,OAAO;YACb,IAAI,EAAE,QAAQ;YACd,WAAW,EACT,2FAA2F;gBAC3F,uKAAuK;YACzK,QAAQ,EAAE,KAAK;SAChB;KACF,CAAC;IAEM,OAAO,CAAiB;IAEhC,YAAY,MAAsC;QAChD,KAAK,EAAE,CAAC;QACR,IAAI,CAAC,OAAO,GAAG,IAAI,+BAAc,CAAC,MAAM,CAAC,CAAC;IAC5C,CAAC;IAES,KAAK,CAAC,GAAG,CAAC,IAA6B,EAAE,WAAyB;QAC1E,MAAM,OAAO,GAAI,IAAI,CAAC,OAAkB,IAAI,WAAW,EAAE,aAAa,IAAI,SAAS,CAAC;QACpF,MAAM,KAAK,GAAG,IAAA,4BAAY,EAAC,IAAI,CAAC,KAAK,EAAE,WAAW,CAAC,CAAC;QAEpD,IAAI,CAAC,OAAO,EAAE,CAAC;YACb,OAAO,EAAE,KAAK,EAAE,uDAAuD,EAAE,CAAC;QAC5E,CAAC;QAED,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,OAAO,CAAC,sBAAsB,CAAC;YACvD,OAAO;YACP,KAAK;YACL,WAAW,EAAE,KAAK;YAClB,0BAA0B,EAAE,KAAK;SAClC,CAAC,CAAC;QAEH,IAAI,CAAC,MAAM,CAAC,OAAO,EAAE,CAAC;YACpB,OAAO,EAAE,KAAK,EAAE,MAAM,CAAC,KAAK,IAAI,gCAAgC,EAAE,CAAC;QACrE,CAAC;QAED,MAAM,MAAM,GAAG,MAAM,CAAC,IAAI,EAAE,MAAM,IAAI,EAAE,CAAC;QAEzC,qDAAqD;QACrD,OAAO;YACL,aAAa,EAAE,OAAO;YACtB,KAAK,EAAE,KAAK,IAAI,SAAS;YACzB,UAAU,EAAE,MAAM,CAAC,MAAM;YACzB,MAAM,EAAE,MAAM;YACd,aAAa,EAAE,MAAM,CAAC,MAAM,CAAC,CAAC,GAAG,EAAE,CAAC,EAAE,EAAE,CAAC,GAAG,GAAG,CAAC,CAAC,CAAC,SAAS,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC;SACtE,CAAC;IACJ,CAAC;CACF;AA9DD,0DA8DC"}
@@ -1,109 +0,0 @@
1
- import { BaseTool } from '../../BaseTool';
2
- import type { ToolParameter, UserContext } from '../../../types';
3
- import { type MoralisServiceConfig, type WalletTokenTransferItem } from '../../../services/MoralisService';
4
- export type WalletTokenTransfersToolConfig = MoralisServiceConfig;
5
- interface EnrichedTransfer extends WalletTokenTransferItem {
6
- /** "send" = wallet sent, "receive" = wallet received */
7
- direction: 'send' | 'receive';
8
- /** Human-readable amount */
9
- amount_formatted: string;
10
- /** The other party: to_address (for send) or from_address (for receive) */
11
- counterparty: string;
12
- counterparty_label?: string;
13
- counterparty_entity?: string;
14
- }
15
- interface CounterpartySummary {
16
- address: string;
17
- label?: string;
18
- entity?: string;
19
- total_amount: string;
20
- tx_count: number;
21
- first_seen: string;
22
- last_seen: string;
23
- }
24
- /**
25
- * Tool: get-wallet-token-transfers
26
- *
27
- * Queries the dedicated Moralis ERC-20 transfer endpoint
28
- * `GET /{address}/erc20/transfers`, which returns every ERC-20 transfer
29
- * involving the wallet — far more reliable for token-specific questions than
30
- * parsing the general history endpoint.
31
- *
32
- * Each item is enriched with:
33
- * - `direction`: "send" or "receive" (derived from from_address vs wallet)
34
- * - `amount_formatted`: human-readable amount (decimals applied)
35
- * - `counterparty`: the other address (recipient for sends, sender for receives)
36
- * - `counterparty_label` / `counterparty_entity`: Moralis-resolved name if known
37
- *
38
- * The response also includes a `counterparties` aggregation — unique addresses
39
- * grouped by direction with total transferred amount and tx count.
40
- */
41
- export declare class WalletTokenTransfersTool extends BaseTool {
42
- name: string;
43
- description: string;
44
- category: string;
45
- parameters: ToolParameter[];
46
- private service;
47
- constructor(config?: WalletTokenTransfersToolConfig);
48
- protected run(args: Record<string, unknown>, userContext?: UserContext): Promise<{
49
- error: string;
50
- walletAddress?: undefined;
51
- chain?: undefined;
52
- resolvedToken?: undefined;
53
- filters?: undefined;
54
- pagination?: undefined;
55
- transferCount?: undefined;
56
- transfers?: undefined;
57
- counterparties?: undefined;
58
- } | {
59
- walletAddress: string;
60
- chain: string;
61
- resolvedToken: {
62
- symbol: string;
63
- name: string | undefined;
64
- contractAddress: string | undefined;
65
- } | null;
66
- filters: {
67
- tokenSymbol: string | null;
68
- contractAddresses: string[] | null;
69
- direction: "receive" | "send" | "all";
70
- limit: number;
71
- order: "ASC" | "DESC";
72
- fromDate: string | null;
73
- toDate: string | null;
74
- fromBlock: number | null;
75
- toBlock: number | null;
76
- };
77
- pagination: {
78
- cursor: string | null;
79
- pageSize: number;
80
- page: number | null;
81
- hasMore: boolean;
82
- };
83
- transferCount: number;
84
- transfers: EnrichedTransfer[];
85
- counterparties: {
86
- sent: CounterpartySummary[];
87
- received: CounterpartySummary[];
88
- };
89
- error?: undefined;
90
- }>;
91
- /**
92
- * Resolve a token's contract address from a symbol string.
93
- *
94
- * Strategy (in order):
95
- * 1. Wallet token balances — most reliable, wallet has actually held this token.
96
- * 2. Token search (Pantograph) — fallback for tokens no longer in the wallet.
97
- *
98
- * Returns the first confident match, or undefined if nothing found.
99
- */
100
- private resolveContractAddressBySymbol;
101
- /**
102
- * Aggregate unique counterparties, sorted by tx count descending.
103
- * Splits into sent[] and received[].
104
- */
105
- private buildCounterparties;
106
- private parseBlock;
107
- }
108
- export {};
109
- //# sourceMappingURL=WalletTokenTransfersTool.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"WalletTokenTransfersTool.d.ts","sourceRoot":"","sources":["../../../../src/tools/builtin/wallet/WalletTokenTransfersTool.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAE1C,OAAO,KAAK,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AACjE,OAAO,EAEL,KAAK,oBAAoB,EACzB,KAAK,uBAAuB,EAC7B,MAAM,kCAAkC,CAAC;AAE1C,MAAM,MAAM,8BAA8B,GAAG,oBAAoB,CAAC;AAsBlE,UAAU,gBAAiB,SAAQ,uBAAuB;IACxD,wDAAwD;IACxD,SAAS,EAAE,MAAM,GAAG,SAAS,CAAC;IAC9B,4BAA4B;IAC5B,gBAAgB,EAAE,MAAM,CAAC;IACzB,2EAA2E;IAC3E,YAAY,EAAE,MAAM,CAAC;IACrB,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,mBAAmB,CAAC,EAAE,MAAM,CAAC;CAC9B;AAED,UAAU,mBAAmB;IAC3B,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,YAAY,EAAE,MAAM,CAAC;IACrB,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,MAAM,CAAC;IACnB,SAAS,EAAE,MAAM,CAAC;CACnB;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,qBAAa,wBAAyB,SAAQ,QAAQ;IACpD,IAAI,SAAgC;IACpC,WAAW,SAkB0D;IACrE,QAAQ,SAAqB;IAC7B,UAAU,EAAE,aAAa,EAAE,CA0FzB;IAEF,OAAO,CAAC,OAAO,CAAiB;gBAEpB,MAAM,CAAC,EAAE,8BAA8B;cAKnC,GAAG,CAAC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,WAAW,CAAC,EAAE,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAwKpE,mBAAmB,EAAE;sBACjB,mBAAmB,EAAE;;;;IA5CjC;;;;;;;;OAQG;YACW,8BAA8B;IA6B5C;;;OAGG;IACH,OAAO,CAAC,mBAAmB;IAwD3B,OAAO,CAAC,UAAU;CAQnB"}
@@ -1,354 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.WalletTokenTransfersTool = void 0;
4
- const BaseTool_1 = require("../../BaseTool");
5
- const chainResolver_1 = require("../../chainResolver");
6
- const MoralisService_1 = require("../../../services/MoralisService");
7
- /**
8
- * Derive human-readable amount from raw value + decimals string.
9
- * Falls back to value_decimal if provided by Moralis.
10
- */
11
- function formatTokenAmount(item) {
12
- if (item.value_decimal)
13
- return item.value_decimal;
14
- const dec = parseInt(item.token_decimals ?? '18', 10);
15
- if (isNaN(dec) || dec === 0)
16
- return item.value;
17
- try {
18
- const raw = BigInt(item.value);
19
- const divisor = BigInt(10) ** BigInt(dec);
20
- const whole = raw / divisor;
21
- const remainder = raw % divisor;
22
- const fracStr = remainder.toString().padStart(dec, '0').replace(/0+$/, '');
23
- return fracStr ? `${whole}.${fracStr}` : `${whole}`;
24
- }
25
- catch {
26
- return item.value;
27
- }
28
- }
29
- /**
30
- * Tool: get-wallet-token-transfers
31
- *
32
- * Queries the dedicated Moralis ERC-20 transfer endpoint
33
- * `GET /{address}/erc20/transfers`, which returns every ERC-20 transfer
34
- * involving the wallet — far more reliable for token-specific questions than
35
- * parsing the general history endpoint.
36
- *
37
- * Each item is enriched with:
38
- * - `direction`: "send" or "receive" (derived from from_address vs wallet)
39
- * - `amount_formatted`: human-readable amount (decimals applied)
40
- * - `counterparty`: the other address (recipient for sends, sender for receives)
41
- * - `counterparty_label` / `counterparty_entity`: Moralis-resolved name if known
42
- *
43
- * The response also includes a `counterparties` aggregation — unique addresses
44
- * grouped by direction with total transferred amount and tx count.
45
- */
46
- class WalletTokenTransfersTool extends BaseTool_1.BaseTool {
47
- name = 'get-wallet-token-transfers';
48
- description = 'Get all ERC-20 token transfers for a wallet from the dedicated Moralis transfers endpoint. ' +
49
- 'Each transfer includes direction (send/receive), human-readable amount, and the exact counterparty address with its label/entity. ' +
50
- 'The response includes a "counterparties" section that aggregates unique sender/recipient addresses with totals. ' +
51
- 'Use tokenSymbol (e.g. "USDC") to filter by token name — the tool automatically resolves the contract address ' +
52
- "by checking the wallet's token balances first, then falling back to token search. " +
53
- 'Use contractAddresses when you already have the exact contract address. ' +
54
- 'Use this tool for questions like: ' +
55
- '"When did I last send USDC and to whom?" (tokenSymbol=USDC, direction=send, limit=1), ' +
56
- '"Who have I sent token 0x… to?" (contractAddresses=[0x…], direction=send), ' +
57
- '"Who sent me USDT?" (tokenSymbol=USDT, direction=receive), ' +
58
- '"Show all USDC transfers" (tokenSymbol=USDC), ' +
59
- '"What tokens did I receive this month?" (fromDate=..., direction=receive). ' +
60
- 'Supports: Ethereum, Optimism, BSC, Polygon, Base, Arbitrum, Avalanche, Linea. ' +
61
- 'Returns paginated results — pass cursor to get the next page. ' +
62
- 'IMPORTANT — this tool covers ERC-20 tokens ONLY. ' +
63
- 'Do NOT use it for native coins (ETH, BNB, MATIC, AVAX, etc.) — ' +
64
- 'native coin transfers are not ERC-20 and will not appear here. ' +
65
- 'For native coin transfer history use get-wallet-history instead.';
66
- category = 'blockchain-data';
67
- parameters = [
68
- {
69
- name: 'address',
70
- type: 'string',
71
- description: 'EVM wallet address (0x…). If omitted, uses the connected wallet from user context.',
72
- required: false,
73
- },
74
- {
75
- name: 'chain',
76
- type: 'string',
77
- description: 'Hex chain ID: "0x1" Ethereum, "0xa" Optimism, "0x38" BSC, "0x89" Polygon, "0x2105" Base, ' +
78
- '"0xa4b1" Arbitrum, "0xa86a" Avalanche, "0xe708" Linea . ONLY set this when the user EXPLICITLY names a chain; otherwise OMIT it so the connected wallet chain is used.',
79
- required: false,
80
- },
81
- {
82
- name: 'tokenSymbol',
83
- type: 'string',
84
- description: 'Filter by token symbol (e.g. "USDC", "USDT", "WETH"). ' +
85
- 'The tool resolves the contract address automatically: first checks wallet balances, ' +
86
- 'then searches by symbol on the chain. Use this when the user mentions a token by name/symbol. ' +
87
- 'Takes precedence over contractAddresses when both are given.',
88
- required: false,
89
- },
90
- {
91
- name: 'contractAddresses',
92
- type: 'array',
93
- description: 'Filter by one or more ERC-20 token contract addresses (0x…). ' +
94
- 'Use when the exact contract address is already known. Ignored if tokenSymbol is provided.',
95
- required: false,
96
- items: { type: 'string' },
97
- },
98
- {
99
- name: 'direction',
100
- type: 'string',
101
- description: 'Client-side direction filter: "send" (wallet is sender), "receive" (wallet is recipient), "all" (default).',
102
- required: false,
103
- default: 'all',
104
- },
105
- {
106
- name: 'limit',
107
- type: 'number',
108
- description: 'Page size (1-100, default 25). ' +
109
- 'Use limit=1 ONLY when the user asks for the single most recent transfer (e.g. "Lần cuối cùng tôi gửi USDC là khi nào?"). ' +
110
- 'For "show recent history" or "list my transfers" questions use the default (25). ' +
111
- 'Use 100 for bulk counterparty analysis.',
112
- required: false,
113
- default: 25,
114
- },
115
- {
116
- name: 'fromDate',
117
- type: 'string',
118
- description: 'Inclusive start date (ISO-8601 or "YYYY-MM-DD").',
119
- required: false,
120
- },
121
- {
122
- name: 'toDate',
123
- type: 'string',
124
- description: 'Inclusive end date (ISO-8601 or "YYYY-MM-DD").',
125
- required: false,
126
- },
127
- {
128
- name: 'fromBlock',
129
- type: 'number',
130
- description: 'Minimum block number.',
131
- required: false,
132
- },
133
- {
134
- name: 'toBlock',
135
- type: 'number',
136
- description: 'Maximum block number.',
137
- required: false,
138
- },
139
- {
140
- name: 'cursor',
141
- type: 'string',
142
- description: 'Pagination cursor from a previous response.',
143
- required: false,
144
- },
145
- {
146
- name: 'order',
147
- type: 'string',
148
- description: '"DESC" newest first (default) or "ASC" oldest first.',
149
- required: false,
150
- default: 'DESC',
151
- },
152
- ];
153
- service;
154
- constructor(config) {
155
- super();
156
- this.service = new MoralisService_1.MoralisService(config);
157
- }
158
- async run(args, userContext) {
159
- const address = args.address || userContext?.walletAddress || undefined;
160
- const chain = (0, chainResolver_1.resolveChain)(args.chain, userContext);
161
- if (!address) {
162
- return { error: 'No wallet address available. Please connect a wallet or pass "address".' };
163
- }
164
- const rawLimit = typeof args.limit === 'number' ? args.limit : Number(args.limit);
165
- const limit = Number.isFinite(rawLimit) && rawLimit > 0 ? Math.min(100, Math.floor(rawLimit)) : 25;
166
- const fromDate = typeof args.fromDate === 'string' && args.fromDate ? args.fromDate : undefined;
167
- const toDate = typeof args.toDate === 'string' && args.toDate ? args.toDate : undefined;
168
- const fromBlock = this.parseBlock(args.fromBlock);
169
- const toBlock = this.parseBlock(args.toBlock);
170
- const cursor = typeof args.cursor === 'string' && args.cursor ? args.cursor : undefined;
171
- const rawOrder = typeof args.order === 'string' ? args.order.toUpperCase() : '';
172
- const order = rawOrder === 'ASC' ? 'ASC' : 'DESC';
173
- const rawDir = typeof args.direction === 'string' ? args.direction.trim().toLowerCase() : 'all';
174
- const direction = rawDir === 'send' ? 'send' : rawDir === 'receive' ? 'receive' : 'all';
175
- // tokenSymbol takes precedence: resolve contract address automatically
176
- const tokenSymbol = typeof args.tokenSymbol === 'string' && args.tokenSymbol ? args.tokenSymbol.trim() : undefined;
177
- let contractAddresses = Array.isArray(args.contractAddresses)
178
- ? args.contractAddresses
179
- .filter((c) => typeof c === 'string' && !!c)
180
- .map((c) => c.trim())
181
- : undefined;
182
- let resolvedSymbol;
183
- let resolvedTokenName;
184
- if (tokenSymbol) {
185
- const resolved = await this.resolveContractAddressBySymbol(tokenSymbol, address, chain);
186
- if (resolved) {
187
- contractAddresses = [resolved.address];
188
- resolvedSymbol = resolved.symbol;
189
- resolvedTokenName = resolved.name;
190
- }
191
- // If resolution fails we still proceed — Moralis will return all transfers
192
- // and client-side filtering by symbol below acts as a safety net
193
- }
194
- const result = await this.service.getWalletTokenTransfers({
195
- address,
196
- chain,
197
- contractAddresses,
198
- limit,
199
- fromDate,
200
- toDate,
201
- fromBlock,
202
- toBlock,
203
- cursor,
204
- order,
205
- });
206
- if (!result.success) {
207
- return { error: result.error || 'Failed to fetch token transfers' };
208
- }
209
- const walletLower = address.toLowerCase();
210
- const rawItems = result.data?.result || [];
211
- // Enrich each transfer with direction, formatted amount, and counterparty
212
- const allEnriched = rawItems.map((tr) => {
213
- const isSend = tr.from_address.toLowerCase() === walletLower;
214
- const dir = isSend ? 'send' : 'receive';
215
- const counterparty = isSend ? tr.to_address : tr.from_address;
216
- const counterpartyLabel = isSend ? (tr.to_address_label ?? undefined) : (tr.from_address_label ?? undefined);
217
- const counterpartyEntity = isSend ? (tr.to_address_entity ?? undefined) : (tr.from_address_entity ?? undefined);
218
- return {
219
- ...tr,
220
- direction: dir,
221
- amount_formatted: formatTokenAmount(tr),
222
- counterparty,
223
- counterparty_label: counterpartyLabel,
224
- counterparty_entity: counterpartyEntity,
225
- };
226
- });
227
- // Apply client-side direction filter
228
- let enriched = direction === 'all' ? allEnriched : allEnriched.filter((t) => t.direction === direction);
229
- // Safety-net symbol filter: when tokenSymbol was provided but contract resolution failed,
230
- // filter results by symbol client-side so we never return unrelated tokens.
231
- if (tokenSymbol && !contractAddresses) {
232
- const symLower = tokenSymbol.toLowerCase();
233
- enriched = enriched.filter((t) => (t.token_symbol ?? '').toLowerCase() === symLower);
234
- }
235
- // Build counterparty aggregation
236
- const counterparties = this.buildCounterparties(enriched);
237
- return {
238
- walletAddress: address,
239
- chain: chain || 'default',
240
- resolvedToken: resolvedSymbol
241
- ? { symbol: resolvedSymbol, name: resolvedTokenName, contractAddress: contractAddresses?.[0] }
242
- : null,
243
- filters: {
244
- tokenSymbol: tokenSymbol || null,
245
- contractAddresses: contractAddresses || null,
246
- direction,
247
- limit,
248
- order,
249
- fromDate: fromDate || null,
250
- toDate: toDate || null,
251
- fromBlock: fromBlock ?? null,
252
- toBlock: toBlock ?? null,
253
- },
254
- pagination: {
255
- cursor: result.data?.cursor ?? null,
256
- pageSize: result.data?.page_size ?? limit,
257
- page: result.data?.page ?? null,
258
- hasMore: !!result.data?.cursor,
259
- },
260
- transferCount: enriched.length,
261
- transfers: enriched,
262
- counterparties,
263
- };
264
- }
265
- /**
266
- * Resolve a token's contract address from a symbol string.
267
- *
268
- * Strategy (in order):
269
- * 1. Wallet token balances — most reliable, wallet has actually held this token.
270
- * 2. Token search (Pantograph) — fallback for tokens no longer in the wallet.
271
- *
272
- * Returns the first confident match, or undefined if nothing found.
273
- */
274
- async resolveContractAddressBySymbol(symbol, walletAddress, chain) {
275
- const symLower = symbol.toLowerCase();
276
- // 1. Check wallet's current token balances
277
- const balancesRes = await this.service.getWalletTokenBalances({ address: walletAddress, chain });
278
- if (balancesRes.success && balancesRes.data?.result?.length) {
279
- const match = balancesRes.data.result.find((t) => (t.symbol ?? '').toLowerCase() === symLower);
280
- if (match) {
281
- return { address: match.token_address, symbol: match.symbol, name: match.name };
282
- }
283
- }
284
- // 2. Search for the token by symbol on the chain
285
- const searchRes = await this.service.searchTokensByKey({ key: symbol, chain });
286
- if (searchRes.success && searchRes.data?.length) {
287
- const exact = searchRes.data.find((t) => (t.symbol ?? '').toLowerCase() === symLower);
288
- const candidate = exact ?? searchRes.data[0];
289
- if (candidate?.token_address) {
290
- return { address: candidate.token_address, symbol: candidate.symbol, name: candidate.name };
291
- }
292
- }
293
- return undefined;
294
- }
295
- /**
296
- * Aggregate unique counterparties, sorted by tx count descending.
297
- * Splits into sent[] and received[].
298
- */
299
- buildCounterparties(transfers) {
300
- const sentMap = new Map();
301
- const receivedMap = new Map();
302
- for (const t of transfers) {
303
- const map = t.direction === 'send' ? sentMap : receivedMap;
304
- const key = t.counterparty.toLowerCase();
305
- const amount = parseFloat(t.amount_formatted) || 0;
306
- const existing = map.get(key);
307
- if (existing) {
308
- existing.total += amount;
309
- existing.count += 1;
310
- if (!existing.label && t.counterparty_label)
311
- existing.label = t.counterparty_label;
312
- if (!existing.entity && t.counterparty_entity)
313
- existing.entity = t.counterparty_entity;
314
- if (t.block_timestamp < existing.first)
315
- existing.first = t.block_timestamp;
316
- if (t.block_timestamp > existing.last)
317
- existing.last = t.block_timestamp;
318
- }
319
- else {
320
- map.set(key, {
321
- label: t.counterparty_label,
322
- entity: t.counterparty_entity,
323
- total: amount,
324
- count: 1,
325
- first: t.block_timestamp,
326
- last: t.block_timestamp,
327
- });
328
- }
329
- }
330
- const toArray = (map) => Array.from(map.entries())
331
- .sort((a, b) => b[1].count - a[1].count)
332
- .map(([addr, info]) => ({
333
- address: addr,
334
- label: info.label,
335
- entity: info.entity,
336
- total_amount: info.total.toFixed(6).replace(/\.?0+$/, ''),
337
- tx_count: info.count,
338
- first_seen: info.first,
339
- last_seen: info.last,
340
- }));
341
- return { sent: toArray(sentMap), received: toArray(receivedMap) };
342
- }
343
- parseBlock(raw) {
344
- if (typeof raw === 'number')
345
- return Number.isFinite(raw) ? raw : undefined;
346
- if (typeof raw === 'string' && raw) {
347
- const n = Number(raw);
348
- return Number.isFinite(n) ? n : undefined;
349
- }
350
- return undefined;
351
- }
352
- }
353
- exports.WalletTokenTransfersTool = WalletTokenTransfersTool;
354
- //# sourceMappingURL=WalletTokenTransfersTool.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"WalletTokenTransfersTool.js","sourceRoot":"","sources":["../../../../src/tools/builtin/wallet/WalletTokenTransfersTool.ts"],"names":[],"mappings":";;;AAAA,6CAA0C;AAC1C,uDAAmD;AAEnD,qEAI0C;AAI1C;;;GAGG;AACH,SAAS,iBAAiB,CAAC,IAA6B;IACtD,IAAI,IAAI,CAAC,aAAa;QAAE,OAAO,IAAI,CAAC,aAAa,CAAC;IAClD,MAAM,GAAG,GAAG,QAAQ,CAAC,IAAI,CAAC,cAAc,IAAI,IAAI,EAAE,EAAE,CAAC,CAAC;IACtD,IAAI,KAAK,CAAC,GAAG,CAAC,IAAI,GAAG,KAAK,CAAC;QAAE,OAAO,IAAI,CAAC,KAAK,CAAC;IAC/C,IAAI,CAAC;QACH,MAAM,GAAG,GAAG,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;QAC/B,MAAM,OAAO,GAAG,MAAM,CAAC,EAAE,CAAC,IAAI,MAAM,CAAC,GAAG,CAAC,CAAC;QAC1C,MAAM,KAAK,GAAG,GAAG,GAAG,OAAO,CAAC;QAC5B,MAAM,SAAS,GAAG,GAAG,GAAG,OAAO,CAAC;QAChC,MAAM,OAAO,GAAG,SAAS,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC;QAC3E,OAAO,OAAO,CAAC,CAAC,CAAC,GAAG,KAAK,IAAI,OAAO,EAAE,CAAC,CAAC,CAAC,GAAG,KAAK,EAAE,CAAC;IACtD,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,IAAI,CAAC,KAAK,CAAC;IACpB,CAAC;AACH,CAAC;AAuBD;;;;;;;;;;;;;;;;GAgBG;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AC,MAAM;YACnB,YAAY,EAAE,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,QAAQ,EAAE,EAAE,CAAC;YACzD,QAAQ,EAAE,IAAI,CAAC,KAAK;YACpB,UAAU,EAAE,IAAI,CAAC,KAAK;YACtB,SAAS,EAAE,IAAI,CAAC,IAAI;SACrB,CAAC,CAAC,CAAC;QAER,OAAO,EAAE,IAAI,EAAE,OAAO,CAAC,OAAO,CAAC,EAAE,QAAQ,EAAE,OAAO,CAAC,WAAW,CAAC,EAAE,CAAC;IACpE,CAAC;IAEO,UAAU,CAAC,GAAY;QAC7B,IAAI,OAAO,GAAG,KAAK,QAAQ;YAAE,OAAO,MAAM,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,SAAS,CAAC;QAC3E,IAAI,OAAO,GAAG,KAAK,QAAQ,IAAI,GAAG,EAAE,CAAC;YACnC,MAAM,CAAC,GAAG,MAAM,CAAC,GAAG,CAAC,CAAC;YACtB,OAAO,MAAM,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;QAC5C,CAAC;QACD,OAAO,SAAS,CAAC;IACnB,CAAC;CACF;AAhWD,4DAgWC"}
@@ -1,28 +0,0 @@
1
- export { WalletTokenBalancesTool } from './WalletTokenBalancesTool';
2
- export type { WalletTokenBalancesToolConfig } from './WalletTokenBalancesTool';
3
- export { WalletHistoryTool } from './WalletHistoryTool';
4
- export type { WalletHistoryToolConfig } from './WalletHistoryTool';
5
- export { WalletTokenTransfersTool } from './WalletTokenTransfersTool';
6
- export type { WalletTokenTransfersToolConfig } from './WalletTokenTransfersTool';
7
- export { WalletNftTransfersTool } from './WalletNftTransfersTool';
8
- export type { WalletNftTransfersToolConfig } from './WalletNftTransfersTool';
9
- export { WalletNetWorthTool } from './WalletNetWorthTool';
10
- export type { WalletNetWorthToolConfig } from './WalletNetWorthTool';
11
- export { WalletPnlSummaryTool } from './WalletPnlSummaryTool';
12
- export type { WalletPnlSummaryToolConfig } from './WalletPnlSummaryTool';
13
- export { WalletPnlTool } from './WalletPnlTool';
14
- export type { WalletPnlToolConfig } from './WalletPnlTool';
15
- export { WalletApprovalsTool } from './WalletApprovalsTool';
16
- export type { WalletApprovalsToolConfig } from './WalletApprovalsTool';
17
- export { WalletDefiSummaryTool } from './WalletDefiSummaryTool';
18
- export type { WalletDefiSummaryToolConfig } from './WalletDefiSummaryTool';
19
- export { WalletDefiPositionsTool } from './WalletDefiPositionsTool';
20
- export type { WalletDefiPositionsToolConfig } from './WalletDefiPositionsTool';
21
- export { WalletDefiProtocolPositionsTool } from './WalletDefiProtocolPositionsTool';
22
- export type { WalletDefiProtocolPositionsToolConfig } from './WalletDefiProtocolPositionsTool';
23
- export { TransactionByHashTool } from './TransactionByHashTool';
24
- export type { TransactionByHashToolConfig } from './TransactionByHashTool';
25
- export { BaseNftMessageTool } from '../nft/BaseNftMessageTool';
26
- export type { NftMessageToolConfig } from '../nft/BaseNftMessageTool';
27
- export { SendNftTool } from '../nft/SendNftTool';
28
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/tools/builtin/wallet/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AACpE,YAAY,EAAE,6BAA6B,EAAE,MAAM,2BAA2B,CAAC;AAC/E,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACxD,YAAY,EAAE,uBAAuB,EAAE,MAAM,qBAAqB,CAAC;AACnE,OAAO,EAAE,wBAAwB,EAAE,MAAM,4BAA4B,CAAC;AACtE,YAAY,EAAE,8BAA8B,EAAE,MAAM,4BAA4B,CAAC;AACjF,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AAClE,YAAY,EAAE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