keyring-agent-core 0.2.1 → 0.2.2

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 +4 -3
  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,66 +0,0 @@
1
- import { BaseTool } from '../../BaseTool';
2
- import type { ToolParameter, UserContext } from '../../../types';
3
- import { type MoralisServiceConfig, type TopGainersTimeFrame } from '../../../services/MoralisService';
4
- export type TopLosersToolConfig = MoralisServiceConfig;
5
- /**
6
- * Tool: get-top-losers
7
- *
8
- * Queries `GET /discovery/tokens/top-losers` — tokens with the largest USD
9
- * price decrease over a chosen timeframe. Mirrors the top-gainers endpoint
10
- * with the same filter set (minimum market cap, minimum security score) and
11
- * the same response shape; only the ranking direction differs.
12
- *
13
- * Each row carries multi-timeframe buckets (1h / 1d / 1w / 1M) for:
14
- * - price_percent_change_usd
15
- * - volume_change_usd / net_volume_change_usd
16
- * - liquidity_change_usd
17
- * - holders_change
18
- * - experienced_net_buyers_change
19
- */
20
- export declare class TopLosersTool extends BaseTool {
21
- name: string;
22
- description: string;
23
- category: string;
24
- parameters: ToolParameter[];
25
- private service;
26
- constructor(config?: TopLosersToolConfig);
27
- protected run(args: Record<string, unknown>, userContext?: UserContext): Promise<{
28
- error: string;
29
- chain?: undefined;
30
- timeFrame?: undefined;
31
- filters?: undefined;
32
- count?: undefined;
33
- tokens?: undefined;
34
- } | {
35
- chain: string;
36
- timeFrame: TopGainersTimeFrame | null;
37
- filters: {
38
- minMarketCap: number | null;
39
- securityScore: number | null;
40
- };
41
- count: number;
42
- tokens: {
43
- chainId: string;
44
- contractAddress: string;
45
- symbol: string | null;
46
- name: string | null;
47
- logo: string | null;
48
- usdPrice: number | null;
49
- marketCap: number | null;
50
- fullyDilutedValuation: number | null;
51
- tokenAgeInDays: number | null;
52
- securityScore: number | null;
53
- onChainStrengthIndex: number | null;
54
- twitterFollowers: number | null;
55
- pricePercentChangeUsd: import("../../../services/MoralisService").TopGainerTimeFrames | null;
56
- volumeChangeUsd: import("../../../services/MoralisService").TopGainerTimeFrames | null;
57
- netVolumeChangeUsd: import("../../../services/MoralisService").TopGainerTimeFrames | null;
58
- liquidityChangeUsd: import("../../../services/MoralisService").TopGainerTimeFrames | null;
59
- holdersChange: import("../../../services/MoralisService").TopGainerTimeFrames | null;
60
- experiencedNetBuyersChange: import("../../../services/MoralisService").TopGainerTimeFrames | null;
61
- }[];
62
- error?: undefined;
63
- }>;
64
- private projectToken;
65
- }
66
- //# sourceMappingURL=TopLosersTool.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"TopLosersTool.d.ts","sourceRoot":"","sources":["../../../../src/tools/builtin/token/TopLosersTool.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,EAEzB,KAAK,mBAAmB,EACzB,MAAM,kCAAkC,CAAC;AAE1C,MAAM,MAAM,mBAAmB,GAAG,oBAAoB,CAAC;AAIvD;;;;;;;;;;;;;;GAcG;AACH,qBAAa,aAAc,SAAQ,QAAQ;IACzC,IAAI,SAAoB;IACxB,WAAW,SAWiF;IAC5F,QAAQ,SAAqB;IAC7B,UAAU,EAAE,aAAa,EAAE,CAmCzB;IAEF,OAAO,CAAC,OAAO,CAAiB;gBAEpB,MAAM,CAAC,EAAE,mBAAmB;cAKxB,GAAG,CAAC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,WAAW,CAAC,EAAE,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IA0C5E,OAAO,CAAC,YAAY;CAsBrB"}
@@ -1,129 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.TopLosersTool = void 0;
4
- const BaseTool_1 = require("../../BaseTool");
5
- const chainResolver_1 = require("../../chainResolver");
6
- const MoralisService_1 = require("../../../services/MoralisService");
7
- const ALLOWED_TIMEFRAMES = ['1h', '1d', '1w', '1M'];
8
- /**
9
- * Tool: get-top-losers
10
- *
11
- * Queries `GET /discovery/tokens/top-losers` — tokens with the largest USD
12
- * price decrease over a chosen timeframe. Mirrors the top-gainers endpoint
13
- * with the same filter set (minimum market cap, minimum security score) and
14
- * the same response shape; only the ranking direction differs.
15
- *
16
- * Each row carries multi-timeframe buckets (1h / 1d / 1w / 1M) for:
17
- * - price_percent_change_usd
18
- * - volume_change_usd / net_volume_change_usd
19
- * - liquidity_change_usd
20
- * - holders_change
21
- * - experienced_net_buyers_change
22
- */
23
- class TopLosersTool extends BaseTool_1.BaseTool {
24
- name = 'get-top-losers';
25
- description = 'List tokens with the largest USD price DECREASE over a chosen timeframe (1h / 1d / 1w / 1M). ' +
26
- 'Returns price, market cap, fully-diluted valuation, token age, Twitter followers, security score, ' +
27
- 'on-chain strength index, and multi-timeframe change buckets for: price %, volume, net volume, ' +
28
- 'liquidity, holder count, and experienced net buyers. ' +
29
- 'Optionally filter out low-quality tokens via minMarketCap (USD floor) and securityScore (0–100, higher = safer). ' +
30
- 'Use this tool for questions like: ' +
31
- '"What are today\'s biggest losers?", "Which tokens dumped the most this week?", ' +
32
- '"Worst performers in the last hour?", ' +
33
- '"Top losers on BSC with market cap over $10M", ' +
34
- '"Show me safe tokens that dropped this month (securityScore >= 80)". ' +
35
- 'Supports: Ethereum, Optimism, BSC, Polygon, Base, Arbitrum, Avalanche, Linea, and more.';
36
- category = 'blockchain-data';
37
- parameters = [
38
- {
39
- name: 'chain',
40
- type: 'string',
41
- description: 'Hex chain ID: "0x1" Ethereum, "0xa" Optimism, "0x38" BSC, "0x89" Polygon, "0x2105" Base, ' +
42
- '"0xa4b1" Arbitrum, "0xa86a" Avalanche, "0xe708" Linea. Defaults to connected chain, ' +
43
- 'or Ethereum (0x1) if no chain is connected.',
44
- required: false,
45
- },
46
- {
47
- name: 'timeFrame',
48
- type: 'string',
49
- description: 'Window over which the price change is measured. Allowed values: ' +
50
- '"1h" (last hour), "1d" (last 24h), "1w" (last 7 days), "1M" (last 30 days). ' +
51
- 'Pick the timeframe that matches the user\'s question — e.g. "today" → "1d", "this week" → "1w".',
52
- required: false,
53
- },
54
- {
55
- name: 'minMarketCap',
56
- type: 'number',
57
- description: 'Minimum token market cap in USD. Use to exclude micro-caps and meme dust. ' +
58
- 'Example: 1000000 = $1M floor, 10000000 = $10M floor. Omit for no floor.',
59
- required: false,
60
- },
61
- {
62
- name: 'securityScore',
63
- type: 'number',
64
- description: 'Minimum security score threshold on a 0–100 scale (higher = safer). ' +
65
- 'Typical values: 70 (moderate safety), 80 (safe), 90 (very safe). Omit for no filter.',
66
- required: false,
67
- },
68
- ];
69
- service;
70
- constructor(config) {
71
- super();
72
- this.service = new MoralisService_1.MoralisService(config);
73
- }
74
- async run(args, userContext) {
75
- const chain = (0, chainResolver_1.resolveChain)(args.chain, userContext);
76
- const rawTimeFrame = typeof args.timeFrame === 'string' ? args.timeFrame.trim() : undefined;
77
- const timeFrame = rawTimeFrame && ALLOWED_TIMEFRAMES.includes(rawTimeFrame)
78
- ? rawTimeFrame
79
- : undefined;
80
- if (rawTimeFrame && !timeFrame) {
81
- return {
82
- error: `Invalid timeFrame "${rawTimeFrame}". Allowed values: ${ALLOWED_TIMEFRAMES.join(', ')}.`,
83
- };
84
- }
85
- const minMarketCap = typeof args.minMarketCap === 'number' && Number.isFinite(args.minMarketCap) && args.minMarketCap >= 0
86
- ? args.minMarketCap
87
- : undefined;
88
- const securityScore = typeof args.securityScore === 'number' && Number.isFinite(args.securityScore) ? args.securityScore : undefined;
89
- const result = await this.service.getTopLosers({ chain, timeFrame, minMarketCap, securityScore });
90
- if (!result.success) {
91
- return { error: result.error || 'Failed to fetch top losers' };
92
- }
93
- const tokens = result.data ?? [];
94
- return {
95
- chain,
96
- timeFrame: timeFrame ?? null,
97
- filters: {
98
- minMarketCap: minMarketCap ?? null,
99
- securityScore: securityScore ?? null,
100
- },
101
- count: tokens.length,
102
- tokens: tokens.map((t) => this.projectToken(t)),
103
- };
104
- }
105
- projectToken(t) {
106
- return {
107
- chainId: t.chain_id,
108
- contractAddress: t.token_address,
109
- symbol: t.token_symbol ?? null,
110
- name: t.token_name ?? null,
111
- logo: t.token_logo ?? null,
112
- usdPrice: t.price_usd ?? null,
113
- marketCap: t.market_cap ?? null,
114
- fullyDilutedValuation: t.fully_diluted_valuation ?? null,
115
- tokenAgeInDays: t.token_age_in_days ?? null,
116
- securityScore: t.security_score ?? null,
117
- onChainStrengthIndex: t.on_chain_strength_index ?? null,
118
- twitterFollowers: t.twitter_followers ?? null,
119
- pricePercentChangeUsd: t.price_percent_change_usd ?? null,
120
- volumeChangeUsd: t.volume_change_usd ?? null,
121
- netVolumeChangeUsd: t.net_volume_change_usd ?? null,
122
- liquidityChangeUsd: t.liquidity_change_usd ?? null,
123
- holdersChange: t.holders_change ?? null,
124
- experiencedNetBuyersChange: t.experienced_net_buyers_change ?? null,
125
- };
126
- }
127
- }
128
- exports.TopLosersTool = TopLosersTool;
129
- //# sourceMappingURL=TopLosersTool.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"TopLosersTool.js","sourceRoot":"","sources":["../../../../src/tools/builtin/token/TopLosersTool.ts"],"names":[],"mappings":";;;AAAA,6CAA0C;AAC1C,uDAAmD;AAEnD,qEAK0C;AAI1C,MAAM,kBAAkB,GAA0B,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC;AAE3E;;;;;;;;;;;;;;GAcG;AACH,MAAa,aAAc,SAAQ,mBAAQ;IACzC,IAAI,GAAG,gBAAgB,CAAC;IACxB,WAAW,GACT,+FAA+F;QAC/F,oGAAoG;QACpG,gGAAgG;QAChG,uDAAuD;QACvD,mHAAmH;QACnH,oCAAoC;QACpC,kFAAkF;QAClF,wCAAwC;QACxC,iDAAiD;QACjD,uEAAuE;QACvE,yFAAyF,CAAC;IAC5F,QAAQ,GAAG,iBAAiB,CAAC;IAC7B,UAAU,GAAoB;QAC5B;YACE,IAAI,EAAE,OAAO;YACb,IAAI,EAAE,QAAQ;YACd,WAAW,EACT,2FAA2F;gBAC3F,sFAAsF;gBACtF,6CAA6C;YAC/C,QAAQ,EAAE,KAAK;SAChB;QACD;YACE,IAAI,EAAE,WAAW;YACjB,IAAI,EAAE,QAAQ;YACd,WAAW,EACT,kEAAkE;gBAClE,8EAA8E;gBAC9E,iGAAiG;YACnG,QAAQ,EAAE,KAAK;SAChB;QACD;YACE,IAAI,EAAE,cAAc;YACpB,IAAI,EAAE,QAAQ;YACd,WAAW,EACT,4EAA4E;gBAC5E,yEAAyE;YAC3E,QAAQ,EAAE,KAAK;SAChB;QACD;YACE,IAAI,EAAE,eAAe;YACrB,IAAI,EAAE,QAAQ;YACd,WAAW,EACT,sEAAsE;gBACtE,sFAAsF;YACxF,QAAQ,EAAE,KAAK;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AAI,IAAI;YACzD,eAAe,EAAE,CAAC,CAAC,iBAAiB,IAAI,IAAI;YAC5C,kBAAkB,EAAE,CAAC,CAAC,qBAAqB,IAAI,IAAI;YACnD,kBAAkB,EAAE,CAAC,CAAC,oBAAoB,IAAI,IAAI;YAClD,aAAa,EAAE,CAAC,CAAC,cAAc,IAAI,IAAI;YACvC,0BAA0B,EAAE,CAAC,CAAC,6BAA6B,IAAI,IAAI;SACpE,CAAC;IACJ,CAAC;CACF;AA3HD,sCA2HC"}
@@ -1,39 +0,0 @@
1
- import { BaseTool } from '../../BaseTool';
2
- import type { ToolParameter, UserContext } from '../../../types';
3
- import type { MoralisServiceConfig } from '../../../services/MoralisService';
4
- export type TrendingTokensToolConfig = MoralisServiceConfig;
5
- /**
6
- * Tool: get-trending-tokens
7
- *
8
- * Queries `GET /tokens/trending` — a ranked list of tokens gaining
9
- * traction based on trading activity, volume, liquidity and holder growth.
10
- * Cross-chain by default; pass `chain` to restrict to a single network.
11
- *
12
- * Each row carries multi-timeframe buckets (1h / 4h / 12h / 24h) for:
13
- * - pricePercentChange
14
- * - totalVolume
15
- * - transactions / buyTransactions / sellTransactions
16
- * - buyers / sellers
17
- */
18
- export declare class TrendingTokensTool extends BaseTool {
19
- name: string;
20
- description: string;
21
- category: string;
22
- parameters: ToolParameter[];
23
- private service;
24
- constructor(config?: TrendingTokensToolConfig);
25
- protected run(args: Record<string, unknown>, userContext?: UserContext): Promise<{
26
- error: string;
27
- _instructions?: undefined;
28
- chain?: undefined;
29
- count?: undefined;
30
- tokens?: undefined;
31
- } | {
32
- _instructions: string;
33
- chain: string;
34
- count: number;
35
- tokens: import("../../../services/MoralisService").TrendingToken[];
36
- error?: undefined;
37
- }>;
38
- }
39
- //# sourceMappingURL=TrendingTokensTool.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"TrendingTokensTool.d.ts","sourceRoot":"","sources":["../../../../src/tools/builtin/token/TrendingTokensTool.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAC1C,OAAO,KAAK,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AACjE,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,kCAAkC,CAAC;AAI7E,MAAM,MAAM,wBAAwB,GAAG,oBAAoB,CAAC;AAE5D;;;;;;;;;;;;GAYG;AACH,qBAAa,kBAAmB,SAAQ,QAAQ;IAC9C,IAAI,SAAyB;IAC7B,WAAW,SAQiF;IAC5F,QAAQ,SAAqB;IAC7B,UAAU,EAAE,aAAa,EAAE,CAoBzB;IAEF,OAAO,CAAC,OAAO,CAAoB;gBAEvB,MAAM,CAAC,EAAE,wBAAwB;cAK7B,GAAG,CAAC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,WAAW,CAAC,EAAE,WAAW;;;;;;;;;;;;;CAiC7E"}
@@ -1,83 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.TrendingTokensTool = void 0;
4
- const BaseTool_1 = require("../../BaseTool");
5
- const PantographService_1 = require("../../../services/PantographService");
6
- const chainResolver_1 = require("../../chainResolver");
7
- /**
8
- * Tool: get-trending-tokens
9
- *
10
- * Queries `GET /tokens/trending` — a ranked list of tokens gaining
11
- * traction based on trading activity, volume, liquidity and holder growth.
12
- * Cross-chain by default; pass `chain` to restrict to a single network.
13
- *
14
- * Each row carries multi-timeframe buckets (1h / 4h / 12h / 24h) for:
15
- * - pricePercentChange
16
- * - totalVolume
17
- * - transactions / buyTransactions / sellTransactions
18
- * - buyers / sellers
19
- */
20
- class TrendingTokensTool extends BaseTool_1.BaseTool {
21
- name = 'get-trending-tokens';
22
- description = 'List tokens trending on-chain right now, ranked by trading activity, volume, liquidity and holder growth. ' +
23
- 'Returns price, market cap, liquidity, holder count, and multi-timeframe buckets (1h / 4h / 12h / 24h) of ' +
24
- 'price change, volume, transaction counts, and unique buyers/sellers. ' +
25
- 'Cross-chain by default — omit `chain` for a global ranking, or pass it to filter to one network. ' +
26
- 'Use this tool for questions like: ' +
27
- '"What tokens are trending right now?", "Show me hot tokens", "What\'s popular on Base today?", ' +
28
- '"Which tokens have the highest 24h volume?", "Biggest movers in the last hour?". ' +
29
- 'Supports: Ethereum, Optimism, BSC, Polygon, Base, Arbitrum, Avalanche, Linea, and more.';
30
- category = 'blockchain-data';
31
- parameters = [
32
- {
33
- name: 'chain',
34
- type: 'string',
35
- description: 'Optional hex chain ID to scope results to a single network: ' +
36
- '"0x1" Ethereum, "0xa" Optimism, "0x38" BSC, "0x89" Polygon, "0x2105" Base, ' +
37
- '"0xa4b1" Arbitrum, "0xa86a" Avalanche, "0xe708" Linea. ' +
38
- 'ONLY set this when the user names a chain. Omit to return cross-chain trending results.',
39
- required: false,
40
- },
41
- {
42
- name: 'limit',
43
- type: 'number',
44
- description: 'Total number of trending tokens to return (chain default tokens + top gainers combined). ' +
45
- 'Only set this when the user asks for a specific count (e.g. "show 20 trending tokens" → 20). ' +
46
- 'Omit otherwise — when omitted, returns all default tokens plus 5 top gainers.',
47
- required: false,
48
- },
49
- ];
50
- service;
51
- constructor(config) {
52
- super();
53
- this.service = new PantographService_1.PantographService({ baseUrl: config?.pantographUrl });
54
- }
55
- async run(args, userContext) {
56
- const chain = (0, chainResolver_1.resolveChainScope)(args.chain, userContext);
57
- const limit = typeof args.limit === 'number' && Number.isFinite(args.limit) && args.limit > 0
58
- ? Math.floor(args.limit)
59
- : undefined;
60
- const result = await this.service.getTrendingTokens({ chain, limit });
61
- if (!result.success) {
62
- return { error: result.error || 'Failed to fetch trending tokens' };
63
- }
64
- const tokens = result.data ?? [];
65
- return {
66
- _instructions: 'Start with a one-line header like "Here are some of the top trending tokens on <chain name> right now:". ' +
67
- 'Then present the tokens as a numbered list. For EACH token render exactly these lines (omit any line whose value is null):\n' +
68
- '<rank>. <name> (<symbol>)\n' +
69
- '- Price: <usdPrice>\n' +
70
- '- Market Cap: <marketCap>\n' +
71
- '- 24h Price Change: <pricePercentChange.24h>\n' +
72
- '- 24h Volume: <totalVolume.24h>\n' +
73
- 'Format numbers human-readably: price as $0.65 / $0.016 (more decimals for sub-cent), ' +
74
- 'market cap & volume compact ($12.8M, $6,474), price change signed with one or two decimals (+3.56%, -1.6%). ' +
75
- "Reply in the user's language and use the human-readable chain name. Do NOT mention tool names, UI, or forms.",
76
- chain: chain ?? 'all',
77
- count: tokens.length,
78
- tokens: tokens,
79
- };
80
- }
81
- }
82
- exports.TrendingTokensTool = TrendingTokensTool;
83
- //# sourceMappingURL=TrendingTokensTool.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"TrendingTokensTool.js","sourceRoot":"","sources":["../../../../src/tools/builtin/token/TrendingTokensTool.ts"],"names":[],"mappings":";;;AAAA,6CAA0C;AAG1C,2EAAwE;AACxE,uDAAwD;AAIxD;;;;;;;;;;;;GAYG;AACH,MAAa,kBAAmB,SAAQ,mBAAQ;IAC9C,IAAI,GAAG,qBAAqB,CAAC;IAC7B,WAAW,GACT,4GAA4G;QAC5G,2GAA2G;QAC3G,uEAAuE;QACvE,mGAAmG;QACnG,oCAAoC;QACpC,iGAAiG;QACjG,mFAAmF;QACnF,yFAAyF,CAAC;IAC5F,QAAQ,GAAG,iBAAiB,CAAC;IAC7B,UAAU,GAAoB;QAC5B;YACE,IAAI,EAAE,OAAO;YACb,IAAI,EAAE,QAAQ;YACd,WAAW,EACT,8DAA8D;gBAC9D,6EAA6E;gBAC7E,yDAAyD;gBACzD,yFAAyF;YAC3F,QAAQ,EAAE,KAAK;SAChB;QACD;YACE,IAAI,EAAE,OAAO;YACb,IAAI,EAAE,QAAQ;YACd,WAAW,EACT,2FAA2F;gBAC3F,+FAA+F;gBAC/F,+EAA+E;YACjF,QAAQ,EAAE,KAAK;SAChB;KACF,CAAC;IAEM,OAAO,CAAoB;IAEnC,YAAY,MAAiC;QAC3C,KAAK,EAAE,CAAC;QACR,IAAI,CAAC,OAAO,GAAG,IAAI,qCAAiB,CAAC,EAAE,OAAO,EAAE,MAAM,EAAE,aAAa,EAAE,CAAC,CAAC;IAC3E,CAAC;IAES,KAAK,CAAC,GAAG,CAAC,IAA6B,EAAE,WAAyB;QAC1E,MAAM,KAAK,GAAG,IAAA,iCAAiB,EAAC,IAAI,CAAC,KAAK,EAAE,WAAW,CAAC,CAAC;QAEzD,MAAM,KAAK,GACT,OAAO,IAAI,CAAC,KAAK,KAAK,QAAQ,IAAI,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,IAAI,CAAC,KAAK,GAAG,CAAC;YAC7E,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC;YACxB,CAAC,CAAC,SAAS,CAAC;QAEhB,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,OAAO,CAAC,iBAAiB,CAAC,EAAE,KAAK,EAAE,KAAK,EAAE,CAAC,CAAC;QAEtE,IAAI,CAAC,MAAM,CAAC,OAAO,EAAE,CAAC;YACpB,OAAO,EAAE,KAAK,EAAE,MAAM,CAAC,KAAK,IAAI,iCAAiC,EAAE,CAAC;QACtE,CAAC;QAED,MAAM,MAAM,GAAG,MAAM,CAAC,IAAI,IAAI,EAAE,CAAC;QAEjC,OAAO;YACL,aAAa,EACX,2GAA2G;gBAC3G,8HAA8H;gBAC9H,6BAA6B;gBAC7B,uBAAuB;gBACvB,6BAA6B;gBAC7B,gDAAgD;gBAChD,mCAAmC;gBACnC,uFAAuF;gBACvF,8GAA8G;gBAC9G,8GAA8G;YAChH,KAAK,EAAE,KAAK,IAAI,KAAK;YACrB,KAAK,EAAE,MAAM,CAAC,MAAM;YACpB,MAAM,EAAE,MAAM;SACf,CAAC;IACJ,CAAC;CACF;AA1ED,gDA0EC"}
@@ -1,13 +0,0 @@
1
- export { TokenInfoTool } from './TokenInfoTool';
2
- export type { TokenInfoToolConfig } from './TokenInfoTool';
3
- export { TokenHoldersTool } from './TokenHoldersTool';
4
- export type { TokenHoldersToolConfig } from './TokenHoldersTool';
5
- export { TokenAnalyticsTool } from './TokenAnalyticsTool';
6
- export type { TokenAnalyticsToolConfig } from './TokenAnalyticsTool';
7
- export { TokenScoreTool } from './TokenScoreTool';
8
- export type { TokenScoreToolConfig } from './TokenScoreTool';
9
- export { TrendingTokensTool } from './TrendingTokensTool';
10
- export type { TrendingTokensToolConfig } from './TrendingTokensTool';
11
- export { TopGainersTool } from './TopGainersTool';
12
- export type { TopGainersToolConfig } from './TopGainersTool';
13
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/tools/builtin/token/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,YAAY,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAC;AAC3D,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,YAAY,EAAE,sBAAsB,EAAE,MAAM,oBAAoB,CAAC;AACjE,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC1D,YAAY,EAAE,wBAAwB,EAAE,MAAM,sBAAsB,CAAC;AACrE,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,YAAY,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAC;AAC7D,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC1D,YAAY,EAAE,wBAAwB,EAAE,MAAM,sBAAsB,CAAC;AACrE,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,YAAY,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAC"}
@@ -1,16 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.TopGainersTool = exports.TrendingTokensTool = exports.TokenScoreTool = exports.TokenAnalyticsTool = exports.TokenHoldersTool = exports.TokenInfoTool = void 0;
4
- var TokenInfoTool_1 = require("./TokenInfoTool");
5
- Object.defineProperty(exports, "TokenInfoTool", { enumerable: true, get: function () { return TokenInfoTool_1.TokenInfoTool; } });
6
- var TokenHoldersTool_1 = require("./TokenHoldersTool");
7
- Object.defineProperty(exports, "TokenHoldersTool", { enumerable: true, get: function () { return TokenHoldersTool_1.TokenHoldersTool; } });
8
- var TokenAnalyticsTool_1 = require("./TokenAnalyticsTool");
9
- Object.defineProperty(exports, "TokenAnalyticsTool", { enumerable: true, get: function () { return TokenAnalyticsTool_1.TokenAnalyticsTool; } });
10
- var TokenScoreTool_1 = require("./TokenScoreTool");
11
- Object.defineProperty(exports, "TokenScoreTool", { enumerable: true, get: function () { return TokenScoreTool_1.TokenScoreTool; } });
12
- var TrendingTokensTool_1 = require("./TrendingTokensTool");
13
- Object.defineProperty(exports, "TrendingTokensTool", { enumerable: true, get: function () { return TrendingTokensTool_1.TrendingTokensTool; } });
14
- var TopGainersTool_1 = require("./TopGainersTool");
15
- Object.defineProperty(exports, "TopGainersTool", { enumerable: true, get: function () { return TopGainersTool_1.TopGainersTool; } });
16
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/tools/builtin/token/index.ts"],"names":[],"mappings":";;;AAAA,iDAAgD;AAAvC,8GAAA,aAAa,OAAA;AAEtB,uDAAsD;AAA7C,oHAAA,gBAAgB,OAAA;AAEzB,2DAA0D;AAAjD,wHAAA,kBAAkB,OAAA;AAE3B,mDAAkD;AAAzC,gHAAA,cAAc,OAAA;AAEvB,2DAA0D;AAAjD,wHAAA,kBAAkB,OAAA;AAE3B,mDAAkD;AAAzC,gHAAA,cAAc,OAAA"}
@@ -1,70 +0,0 @@
1
- import { BaseTool } from '../../BaseTool';
2
- import type { ToolParameter, UserContext } from '../../../types';
3
- import { type MoralisServiceConfig } from '../../../services/MoralisService';
4
- export type TransactionByHashToolConfig = MoralisServiceConfig;
5
- export declare class TransactionByHashTool extends BaseTool {
6
- name: string;
7
- description: string;
8
- category: string;
9
- parameters: ToolParameter[];
10
- private service;
11
- constructor(config?: TransactionByHashToolConfig);
12
- protected run(args: Record<string, unknown>, userContext?: UserContext): Promise<{
13
- error: string;
14
- hash?: undefined;
15
- status?: undefined;
16
- timestamp?: undefined;
17
- blockNumber?: undefined;
18
- from?: undefined;
19
- to?: undefined;
20
- valueEth?: undefined;
21
- fee?: undefined;
22
- gasUsed?: undefined;
23
- gasPriceGwei?: undefined;
24
- decodedCall?: undefined;
25
- decodedEvents?: undefined;
26
- contractCreated?: undefined;
27
- logs?: undefined;
28
- } | {
29
- hash: string;
30
- status: string;
31
- timestamp: string;
32
- blockNumber: string;
33
- from: {
34
- address: string;
35
- label: string | null;
36
- entity: string | null;
37
- };
38
- to: {
39
- address: string;
40
- label: string | null;
41
- entity: string | null;
42
- } | null;
43
- valueEth: string;
44
- fee: string;
45
- gasUsed: string;
46
- gasPriceGwei: string | null;
47
- decodedCall: {
48
- signature: string;
49
- label: string;
50
- params: import("../../../services/MoralisService").DecodedParam[];
51
- } | null;
52
- decodedEvents: {
53
- contract: string;
54
- signature: string;
55
- label: string;
56
- params: import("../../../services/MoralisService").DecodedParam[];
57
- }[];
58
- contractCreated: string | null;
59
- logs: {
60
- address: string;
61
- decodedEvent: {
62
- signature: string;
63
- label: string;
64
- params: import("../../../services/MoralisService").DecodedParam[];
65
- } | null;
66
- }[];
67
- error?: undefined;
68
- }>;
69
- }
70
- //# sourceMappingURL=TransactionByHashTool.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"TransactionByHashTool.d.ts","sourceRoot":"","sources":["../../../../src/tools/builtin/wallet/TransactionByHashTool.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,2BAA2B,GAAG,oBAAoB,CAAC;AAY/D,qBAAa,qBAAsB,SAAQ,QAAQ;IACjD,IAAI,SAA6B;IACjC,WAAW,SAOuE;IAClF,QAAQ,SAAqB;IAC7B,UAAU,EAAE,aAAa,EAAE,CAezB;IAEF,OAAO,CAAC,OAAO,CAAiB;gBAEpB,MAAM,CAAC,EAAE,2BAA2B;cAKhC,GAAG,CAAC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,WAAW,CAAC,EAAE,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAqE7E"}
@@ -1,111 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.TransactionByHashTool = void 0;
4
- const BaseTool_1 = require("../../BaseTool");
5
- const chainResolver_1 = require("../../chainResolver");
6
- const MoralisService_1 = require("../../../services/MoralisService");
7
- function formatWei(weiStr) {
8
- try {
9
- const eth = Number(BigInt(weiStr)) / 1e18;
10
- const s = eth.toFixed(10).replace(/\.?0+$/, '');
11
- return s || '0';
12
- }
13
- catch {
14
- return weiStr;
15
- }
16
- }
17
- class TransactionByHashTool extends BaseTool_1.BaseTool {
18
- name = 'get-transaction-by-hash';
19
- description = 'Get full decoded details of a single EVM transaction by its hash. ' +
20
- 'Returns: status (success/failed), timestamp, from/to addresses with labels and entity names, ' +
21
- 'native value transferred (ETH), transaction fee, gas used, decoded function call with params, ' +
22
- 'and decoded event logs (ERC-20 transfers, swaps, approvals, etc.). ' +
23
- 'Use this when the user asks: "what did this transaction do?", "explain tx 0x…", ' +
24
- '"was this transaction successful?", "who sent/received in this tx?", "what function was called?". ' +
25
- 'Supports: Ethereum, Optimism, BSC, Polygon, Base, Arbitrum, Avalanche, Linea.';
26
- category = 'blockchain-data';
27
- parameters = [
28
- {
29
- name: 'transactionHash',
30
- type: 'string',
31
- description: 'The transaction hash to look up (0x…).',
32
- required: true,
33
- },
34
- {
35
- name: 'chain',
36
- type: 'string',
37
- description: 'Hex chain ID: "0x1" Ethereum, "0xa" Optimism, "0x38" BSC, "0x89" Polygon, "0x2105" Base, ' +
38
- '"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.',
39
- required: false,
40
- },
41
- ];
42
- service;
43
- constructor(config) {
44
- super();
45
- this.service = new MoralisService_1.MoralisService(config);
46
- }
47
- async run(args, userContext) {
48
- const transactionHash = args.transactionHash;
49
- const chain = (0, chainResolver_1.resolveChain)(args.chain, userContext);
50
- if (!transactionHash) {
51
- return { error: 'Transaction hash is required.' };
52
- }
53
- const result = await this.service.getTransactionByHash({ transactionHash, chain });
54
- if (!result.success || !result.data) {
55
- return { error: result.error || 'Failed to fetch transaction' };
56
- }
57
- const tx = result.data;
58
- const decodedEvents = (tx.logs ?? [])
59
- .filter((log) => !!log.decoded_event)
60
- .map((log) => ({
61
- contract: log.address,
62
- signature: log.decoded_event.signature,
63
- label: log.decoded_event.label,
64
- params: log.decoded_event.params,
65
- }));
66
- const logs = tx.logs.map((log) => ({
67
- address: log.address,
68
- decodedEvent: log.decoded_event
69
- ? {
70
- signature: log.decoded_event.signature,
71
- label: log.decoded_event.label,
72
- params: log.decoded_event.params,
73
- }
74
- : null,
75
- }));
76
- return {
77
- hash: tx.hash,
78
- status: tx.receipt_status === '1' ? 'success' : tx.receipt_status === '0' ? 'failed' : 'unknown',
79
- timestamp: tx.block_timestamp,
80
- blockNumber: tx.block_number,
81
- from: {
82
- address: tx.from_address,
83
- label: tx.from_address_label || null,
84
- entity: tx.from_address_entity || null,
85
- },
86
- to: tx.to_address
87
- ? {
88
- address: tx.to_address,
89
- label: tx.to_address_label || null,
90
- entity: tx.to_address_entity || null,
91
- }
92
- : null,
93
- valueEth: formatWei(tx.value || '0'),
94
- fee: tx.transaction_fee,
95
- gasUsed: tx.receipt_gas_used,
96
- gasPriceGwei: tx.gas_price ? (Number(tx.gas_price) / 1e9).toFixed(4) : null,
97
- decodedCall: tx.decoded_call
98
- ? {
99
- signature: tx.decoded_call.signature,
100
- label: tx.decoded_call.label,
101
- params: tx.decoded_call.params,
102
- }
103
- : null,
104
- decodedEvents,
105
- contractCreated: tx.receipt_contract_address || null,
106
- logs: logs,
107
- };
108
- }
109
- }
110
- exports.TransactionByHashTool = TransactionByHashTool;
111
- //# sourceMappingURL=TransactionByHashTool.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"TransactionByHashTool.js","sourceRoot":"","sources":["../../../../src/tools/builtin/wallet/TransactionByHashTool.ts"],"names":[],"mappings":";;;AAAA,6CAA0C;AAC1C,uDAAmD;AAEnD,qEAA6F;AAI7F,SAAS,SAAS,CAAC,MAAc;IAC/B,IAAI,CAAC;QACH,MAAM,GAAG,GAAG,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,GAAG,IAAI,CAAC;QAC1C,MAAM,CAAC,GAAG,GAAG,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC,OAAO,CAAC,QAAQ,EAAE,EAAE,CAAC,CAAC;QAChD,OAAO,CAAC,IAAI,GAAG,CAAC;IAClB,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,MAAM,CAAC;IAChB,CAAC;AACH,CAAC;AAED,MAAa,qBAAsB,SAAQ,mBAAQ;IACjD,IAAI,GAAG,yBAAyB,CAAC;IACjC,WAAW,GACT,oEAAoE;QACpE,+FAA+F;QAC/F,gGAAgG;QAChG,qEAAqE;QACrE,kFAAkF;QAClF,oGAAoG;QACpG,+EAA+E,CAAC;IAClF,QAAQ,GAAG,iBAAiB,CAAC;IAC7B,UAAU,GAAoB;QAC5B;YACE,IAAI,EAAE,iBAAiB;YACvB,IAAI,EAAE,QAAQ;YACd,WAAW,EAAE,wCAAwC;YACrD,QAAQ,EAAE,IAAI;SACf;QACD;YACE,IAAI,EAAE,OAAO;YACb,IAAI,EAAE,QAAQ;Y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