keyring-agent-core 0.2.0 → 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,71 +0,0 @@
1
- import { BaseTool } from '../../BaseTool';
2
- import type { ToolParameter, UserContext } from '../../../types';
3
- import { type MoralisServiceConfig } from '../../../services/MoralisService';
4
- export type TokenAnalyticsToolConfig = MoralisServiceConfig;
5
- /**
6
- * Tool: get-token-analytics
7
- *
8
- * Queries `GET /tokens/{tokenAddress}/analytics` — detailed trading analytics
9
- * for a single token broken down across 5min / 1h / 6h / 24h windows.
10
- *
11
- * Returned metrics:
12
- * - totalBuyVolume / totalSellVolume (USD)
13
- * - totalBuyers / totalSellers (unique counts)
14
- * - totalBuys / totalSells (transaction counts)
15
- * - uniqueWallets
16
- * - pricePercentChange
17
- * - usdPrice, totalLiquidity, totalFullyDilutedValuation (point-in-time)
18
- *
19
- * Accepts either `tokenSymbol` (e.g. "PEPE") or `contractAddress` (0x…).
20
- * Symbol → address resolution mirrors `TokenHoldersTool`: first checks the
21
- * connected wallet's balances, then falls back to Pantograph search.
22
- */
23
- export declare class TokenAnalyticsTool extends BaseTool {
24
- name: string;
25
- description: string;
26
- category: string;
27
- parameters: ToolParameter[];
28
- private service;
29
- constructor(config?: TokenAnalyticsToolConfig);
30
- protected run(args: Record<string, unknown>, userContext?: UserContext): Promise<{
31
- error: string;
32
- token?: undefined;
33
- usdPrice?: undefined;
34
- totalLiquidity?: undefined;
35
- totalFullyDilutedValuation?: undefined;
36
- totalBuyVolume?: undefined;
37
- totalSellVolume?: undefined;
38
- totalBuyers?: undefined;
39
- totalSellers?: undefined;
40
- totalBuys?: undefined;
41
- totalSells?: undefined;
42
- uniqueWallets?: undefined;
43
- pricePercentChange?: undefined;
44
- } | {
45
- token: {
46
- symbol: string | null;
47
- name: string | null;
48
- contractAddress: string;
49
- chain: string;
50
- };
51
- usdPrice: string | number | null;
52
- totalLiquidity: string | number | null;
53
- totalFullyDilutedValuation: string | number | null;
54
- totalBuyVolume: import("../../../services/MoralisService").TokenAnalyticsTimeframeBuckets | null;
55
- totalSellVolume: import("../../../services/MoralisService").TokenAnalyticsTimeframeBuckets | null;
56
- totalBuyers: import("../../../services/MoralisService").TokenAnalyticsTimeframeBuckets | null;
57
- totalSellers: import("../../../services/MoralisService").TokenAnalyticsTimeframeBuckets | null;
58
- totalBuys: import("../../../services/MoralisService").TokenAnalyticsTimeframeBuckets | null;
59
- totalSells: import("../../../services/MoralisService").TokenAnalyticsTimeframeBuckets | null;
60
- uniqueWallets: import("../../../services/MoralisService").TokenAnalyticsTimeframeBuckets | null;
61
- pricePercentChange: import("../../../services/MoralisService").TokenAnalyticsTimeframeBuckets | null;
62
- error?: undefined;
63
- }>;
64
- /**
65
- * Resolve a contract address from a token symbol.
66
- * 1. Wallet balances (if wallet address available — most reliable)
67
- * 2. Pantograph token search (fallback)
68
- */
69
- private resolveContractAddress;
70
- }
71
- //# sourceMappingURL=TokenAnalyticsTool.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"TokenAnalyticsTool.d.ts","sourceRoot":"","sources":["../../../../src/tools/builtin/token/TokenAnalyticsTool.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,wBAAwB,GAAG,oBAAoB,CAAC;AAE5D;;;;;;;;;;;;;;;;;GAiBG;AACH,qBAAa,kBAAmB,SAAQ,QAAQ;IAC9C,IAAI,SAAyB;IAC7B,WAAW,SAauE;IAClF,QAAQ,SAAqB;IAC7B,UAAU,EAAE,aAAa,EAAE,CA0BzB;IAEF,OAAO,CAAC,OAAO,CAAiB;gBAEpB,MAAM,CAAC,EAAE,wBAAwB;cAK7B,GAAG,CAAC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,WAAW,CAAC,EAAE,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IA2D5E;;;;OAIG;YACW,sBAAsB;CA4BrC"}
@@ -1,147 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.TokenAnalyticsTool = 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-token-analytics
9
- *
10
- * Queries `GET /tokens/{tokenAddress}/analytics` — detailed trading analytics
11
- * for a single token broken down across 5min / 1h / 6h / 24h windows.
12
- *
13
- * Returned metrics:
14
- * - totalBuyVolume / totalSellVolume (USD)
15
- * - totalBuyers / totalSellers (unique counts)
16
- * - totalBuys / totalSells (transaction counts)
17
- * - uniqueWallets
18
- * - pricePercentChange
19
- * - usdPrice, totalLiquidity, totalFullyDilutedValuation (point-in-time)
20
- *
21
- * Accepts either `tokenSymbol` (e.g. "PEPE") or `contractAddress` (0x…).
22
- * Symbol → address resolution mirrors `TokenHoldersTool`: first checks the
23
- * connected wallet's balances, then falls back to Pantograph search.
24
- */
25
- class TokenAnalyticsTool extends BaseTool_1.BaseTool {
26
- name = 'get-token-analytics';
27
- description = 'Get detailed trading analytics for a single ERC-20 token, broken down across 5min / 1h / 6h / 24h windows. ' +
28
- 'Returns: buy volume, sell volume, unique buyers, unique sellers, buy/sell transaction counts, unique wallets, ' +
29
- 'price % change, current USD price, total liquidity and fully-diluted valuation (FDV). ' +
30
- 'Use tokenSymbol (e.g. "PEPE") to look up by name — the tool auto-resolves the contract address. ' +
31
- 'Use contractAddress when you already have the exact 0x address. ' +
32
- 'Use this tool for questions like: ' +
33
- '"How is PEPE trading today?" (tokenSymbol=PEPE), ' +
34
- '"24h buy vs sell volume for USDC?" (tokenSymbol=USDC → totalBuyVolume vs totalSellVolume), ' +
35
- '"Is buying or selling pressure stronger for this token?", ' +
36
- '"How many unique wallets touched this token in the last hour?" (→ uniqueWallets.1h), ' +
37
- '"What\'s the FDV and liquidity of X?" (→ totalFullyDilutedValuation, totalLiquidity), ' +
38
- '"Price change over 6h?" (→ pricePercentChange.6h). ' +
39
- 'Supports: Ethereum, Optimism, BSC, Polygon, Base, Arbitrum, Avalanche, Linea.';
40
- category = 'blockchain-data';
41
- parameters = [
42
- {
43
- name: 'tokenSymbol',
44
- type: 'string',
45
- description: 'Token symbol (e.g. "PEPE", "USDC", "WETH"). ' +
46
- "The tool resolves the contract address automatically: first checks the connected wallet's balances, " +
47
- 'then searches by symbol. Takes precedence over contractAddress when both are given.',
48
- required: false,
49
- },
50
- {
51
- name: 'contractAddress',
52
- type: 'string',
53
- description: 'ERC-20 token contract address (0x…). Use when the exact address is already known. ' +
54
- 'Ignored if tokenSymbol is provided.',
55
- required: false,
56
- },
57
- {
58
- name: 'chain',
59
- type: 'string',
60
- description: 'Hex chain ID: "0x1" Ethereum, "0xa" Optimism, "0x38" BSC, "0x89" Polygon, "0x2105" Base, ' +
61
- '"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.',
62
- required: false,
63
- },
64
- ];
65
- service;
66
- constructor(config) {
67
- super();
68
- this.service = new MoralisService_1.MoralisService(config);
69
- }
70
- async run(args, userContext) {
71
- const chain = (0, chainResolver_1.resolveChain)(args.chain, userContext);
72
- const walletAddress = userContext?.walletAddress || undefined;
73
- const tokenSymbol = typeof args.tokenSymbol === 'string' && args.tokenSymbol ? args.tokenSymbol.trim() : undefined;
74
- let contractAddress = typeof args.contractAddress === 'string' && args.contractAddress ? args.contractAddress.trim() : undefined;
75
- if (!tokenSymbol && !contractAddress) {
76
- return { error: 'Provide either tokenSymbol (e.g. "PEPE") or contractAddress (0x…).' };
77
- }
78
- let resolvedSymbol;
79
- let resolvedName;
80
- if (tokenSymbol) {
81
- const resolved = await this.resolveContractAddress(tokenSymbol, chain, walletAddress);
82
- if (!resolved) {
83
- return {
84
- error: `Cannot resolve token symbol "${tokenSymbol}" to a contract address on chain ${chain ?? 'default'}. Try passing contractAddress directly.`,
85
- };
86
- }
87
- contractAddress = resolved.address;
88
- resolvedSymbol = resolved.symbol;
89
- resolvedName = resolved.name;
90
- }
91
- const result = await this.service.getTokenAnalytics({
92
- address: contractAddress,
93
- chain,
94
- });
95
- if (!result.success) {
96
- return { error: result.error || 'Failed to fetch token analytics' };
97
- }
98
- const data = result.data ?? {};
99
- return {
100
- token: {
101
- symbol: resolvedSymbol ?? tokenSymbol ?? null,
102
- name: resolvedName ?? null,
103
- contractAddress: contractAddress,
104
- chain: chain || 'default',
105
- },
106
- usdPrice: data.usdPrice ?? null,
107
- totalLiquidity: data.totalLiquidity ?? null,
108
- totalFullyDilutedValuation: data.totalFullyDilutedValuation ?? null,
109
- totalBuyVolume: data.totalBuyVolume ?? null,
110
- totalSellVolume: data.totalSellVolume ?? null,
111
- totalBuyers: data.totalBuyers ?? null,
112
- totalSellers: data.totalSellers ?? null,
113
- totalBuys: data.totalBuys ?? null,
114
- totalSells: data.totalSells ?? null,
115
- uniqueWallets: data.uniqueWallets ?? null,
116
- pricePercentChange: data.pricePercentChange ?? null,
117
- };
118
- }
119
- /**
120
- * Resolve a contract address from a token symbol.
121
- * 1. Wallet balances (if wallet address available — most reliable)
122
- * 2. Pantograph token search (fallback)
123
- */
124
- async resolveContractAddress(symbol, chain, walletAddress) {
125
- const symLower = symbol.toLowerCase();
126
- if (walletAddress) {
127
- const balRes = await this.service.getWalletTokenBalances({ address: walletAddress, chain });
128
- if (balRes.success && balRes.data?.result?.length) {
129
- const match = balRes.data.result.find((t) => (t.symbol ?? '').toLowerCase() === symLower);
130
- if (match) {
131
- return { address: match.token_address, symbol: match.symbol, name: match.name };
132
- }
133
- }
134
- }
135
- const searchRes = await this.service.searchTokensByKey({ key: symbol, chain });
136
- if (searchRes.success && searchRes.data?.length) {
137
- const exact = searchRes.data.find((t) => (t.symbol ?? '').toLowerCase() === symLower);
138
- const candidate = exact ?? searchRes.data[0];
139
- if (candidate?.token_address) {
140
- return { address: candidate.token_address, symbol: candidate.symbol, name: candidate.name };
141
- }
142
- }
143
- return undefined;
144
- }
145
- }
146
- exports.TokenAnalyticsTool = TokenAnalyticsTool;
147
- //# sourceMappingURL=TokenAnalyticsTool.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"TokenAnalyticsTool.js","sourceRoot":"","sources":["../../../../src/tools/builtin/token/TokenAnalyticsTool.ts"],"names":[],"mappings":";;;AAAA,6CAA0C;AAC1C,uDAAmD;AAEnD,qEAA6F;AAI7F;;;;;;;;;;;;;;;;;GAiBG;AACH,MAAa,kBAAmB,SAAQ,mBAAQ;IAC9C,IAAI,GAAG,qBAAqB,CAAC;IAC7B,WAAW,GACT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AC,IAAI,EAAE,CAAC;gBAClF,CAAC;YACH,CAAC;QACH,CAAC;QAED,MAAM,SAAS,GAAG,MAAM,IAAI,CAAC,OAAO,CAAC,iBAAiB,CAAC,EAAE,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,CAAC,CAAC;QAC/E,IAAI,SAAS,CAAC,OAAO,IAAI,SAAS,CAAC,IAAI,EAAE,MAAM,EAAE,CAAC;YAChD,MAAM,KAAK,GAAG,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,MAAM,IAAI,EAAE,CAAC,CAAC,WAAW,EAAE,KAAK,QAAQ,CAAC,CAAC;YACtF,MAAM,SAAS,GAAG,KAAK,IAAI,SAAS,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;YAC7C,IAAI,SAAS,EAAE,aAAa,EAAE,CAAC;gBAC7B,OAAO,EAAE,OAAO,EAAE,SAAS,CAAC,aAAa,EAAE,MAAM,EAAE,SAAS,CAAC,MAAM,EAAE,IAAI,EAAE,SAAS,CAAC,IAAI,EAAE,CAAC;YAC9F,CAAC;QACH,CAAC;QAED,OAAO,SAAS,CAAC;IACnB,CAAC;CACF;AAhJD,gDAgJC"}
@@ -1,81 +0,0 @@
1
- import { BaseTool } from '../../BaseTool';
2
- import type { ToolParameter, UserContext } from '../../../types';
3
- import { type MoralisServiceConfig } from '../../../services/MoralisService';
4
- export type TokenHoldersToolConfig = MoralisServiceConfig;
5
- /**
6
- * Tool: get-token-holders
7
- *
8
- * Queries `GET /erc20/{address}/holders` which returns aggregate holder
9
- * statistics for an ERC-20 token — NOT a paginated list of addresses.
10
- *
11
- * Response covers:
12
- * - totalHolders: current unique holder count
13
- * - holderChange: change in holder count over 5min / 1h / 6h / 24h / 3d / 7d / 30d
14
- * - holdersByAcquisition: how holders acquired (swap / transfer / airdrop)
15
- * - holderSupply: supply concentration for top 10/25/50/100/250/500 holders
16
- * - holderDistribution: segmentation by size (whales → shrimps)
17
- */
18
- export declare class TokenHoldersTool extends BaseTool {
19
- name: string;
20
- description: string;
21
- category: string;
22
- parameters: ToolParameter[];
23
- private service;
24
- constructor(config?: TokenHoldersToolConfig);
25
- protected run(args: Record<string, unknown>, userContext?: UserContext): Promise<{
26
- error: string;
27
- token?: undefined;
28
- totalHolders?: undefined;
29
- holdersByAcquisition?: undefined;
30
- holderChange?: undefined;
31
- holderSupply?: undefined;
32
- holderDistribution?: undefined;
33
- } | {
34
- token: {
35
- symbol: string | null;
36
- name: string | null;
37
- contractAddress: string;
38
- chain: string;
39
- };
40
- totalHolders: number;
41
- holdersByAcquisition: {
42
- swap: number;
43
- transfer: number;
44
- airdrop: number;
45
- };
46
- holderChange: {
47
- '5min': import("../../../services/MoralisService").HolderChangePeriod;
48
- '1h': import("../../../services/MoralisService").HolderChangePeriod;
49
- '6h': import("../../../services/MoralisService").HolderChangePeriod;
50
- '24h': import("../../../services/MoralisService").HolderChangePeriod;
51
- '3d': import("../../../services/MoralisService").HolderChangePeriod;
52
- '7d': import("../../../services/MoralisService").HolderChangePeriod;
53
- '30d': import("../../../services/MoralisService").HolderChangePeriod;
54
- };
55
- holderSupply: {
56
- top10: import("../../../services/MoralisService").HolderSupplyTier;
57
- top25: import("../../../services/MoralisService").HolderSupplyTier;
58
- top50: import("../../../services/MoralisService").HolderSupplyTier;
59
- top100: import("../../../services/MoralisService").HolderSupplyTier;
60
- top250: import("../../../services/MoralisService").HolderSupplyTier;
61
- top500: import("../../../services/MoralisService").HolderSupplyTier;
62
- };
63
- holderDistribution: {
64
- whales: number;
65
- sharks: number;
66
- dolphins: number;
67
- fish: number;
68
- octopus: number;
69
- crabs: number;
70
- shrimps: number;
71
- };
72
- error?: undefined;
73
- }>;
74
- /**
75
- * Resolve a contract address from a token symbol.
76
- * 1. Wallet balances (if wallet address available — most reliable)
77
- * 2. Pantograph token search (fallback)
78
- */
79
- private resolveContractAddress;
80
- }
81
- //# sourceMappingURL=TokenHoldersTool.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"TokenHoldersTool.d.ts","sourceRoot":"","sources":["../../../../src/tools/builtin/token/TokenHoldersTool.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,sBAAsB,GAAG,oBAAoB,CAAC;AAE1D;;;;;;;;;;;;GAYG;AACH,qBAAa,gBAAiB,SAAQ,QAAQ;IAC5C,IAAI,SAAuB;IAC3B,WAAW,SAgBwE;IACnF,QAAQ,SAAqB;IAC7B,UAAU,EAAE,aAAa,EAAE,CA0BzB;IAEF,OAAO,CAAC,OAAO,CAAiB;gBAEpB,MAAM,CAAC,EAAE,sBAAsB;cAK3B,GAAG,CAAC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,WAAW,CAAC,EAAE,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAqD5E;;;;OAIG;YACW,sBAAsB;CA4BrC"}
@@ -1,139 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.TokenHoldersTool = 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-token-holders
9
- *
10
- * Queries `GET /erc20/{address}/holders` which returns aggregate holder
11
- * statistics for an ERC-20 token — NOT a paginated list of addresses.
12
- *
13
- * Response covers:
14
- * - totalHolders: current unique holder count
15
- * - holderChange: change in holder count over 5min / 1h / 6h / 24h / 3d / 7d / 30d
16
- * - holdersByAcquisition: how holders acquired (swap / transfer / airdrop)
17
- * - holderSupply: supply concentration for top 10/25/50/100/250/500 holders
18
- * - holderDistribution: segmentation by size (whales → shrimps)
19
- */
20
- class TokenHoldersTool extends BaseTool_1.BaseTool {
21
- name = 'get-token-holders';
22
- description = 'Get holder statistics and analytics for an ERC-20 token. ' +
23
- 'Returns: total holder count, holder count changes over time (5min/1h/6h/24h/3d/7d/30d), ' +
24
- 'how holders acquired the token (swap/transfer/airdrop), ' +
25
- 'supply concentration (% held by top 10/25/50/100/250/500 holders), ' +
26
- 'and holder size distribution (whales, sharks, dolphins, fish, octopus, crabs, shrimps). ' +
27
- 'Use tokenSymbol (e.g. "USDC") to look up by name — the tool auto-resolves the contract address. ' +
28
- 'Use contractAddress when you already have the exact 0x address. ' +
29
- 'Use this tool for questions like: ' +
30
- '"How many holders does USDC have?" (tokenSymbol=USDC), ' +
31
- '"Is USDC gaining or losing holders?" (tokenSymbol=USDC → holderChange), ' +
32
- '"How many new holders did ETH get in the last 7 days?" (tokenSymbol=WETH), ' +
33
- '"How concentrated is USDC ownership?" (tokenSymbol=USDC → holderSupply), ' +
34
- '"What % of supply do the top 10 holders control?" (tokenSymbol=USDC), ' +
35
- '"How many whales hold USDT?" (tokenSymbol=USDT → holderDistribution), ' +
36
- '"Did most holders buy via swap or transfer?" (tokenSymbol=USDC → holdersByAcquisition). ' +
37
- 'Supports: Ethereum, Optimism, BSC, Polygon, Base, Arbitrum, Avalanche, Linea. ';
38
- category = 'blockchain-data';
39
- parameters = [
40
- {
41
- name: 'tokenSymbol',
42
- type: 'string',
43
- description: 'Token symbol (e.g. "USDC", "USDT", "WETH"). ' +
44
- "The tool resolves the contract address automatically: first checks the connected wallet's balances, " +
45
- 'then searches by symbol. Takes precedence over contractAddress when both are given.',
46
- required: false,
47
- },
48
- {
49
- name: 'contractAddress',
50
- type: 'string',
51
- description: 'ERC-20 token contract address (0x…). Use when the exact address is already known. ' +
52
- 'Ignored if tokenSymbol is provided.',
53
- required: false,
54
- },
55
- {
56
- name: 'chain',
57
- type: 'string',
58
- description: 'Hex chain ID: "0x1" Ethereum, "0xa" Optimism, "0x38" BSC, "0x89" Polygon, "0x2105" Base, ' +
59
- '"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.',
60
- required: false,
61
- },
62
- ];
63
- service;
64
- constructor(config) {
65
- super();
66
- this.service = new MoralisService_1.MoralisService(config);
67
- }
68
- async run(args, userContext) {
69
- const chain = (0, chainResolver_1.resolveChain)(args.chain, userContext);
70
- const walletAddress = userContext?.walletAddress || undefined;
71
- const tokenSymbol = typeof args.tokenSymbol === 'string' && args.tokenSymbol ? args.tokenSymbol.trim() : undefined;
72
- let contractAddress = typeof args.contractAddress === 'string' && args.contractAddress ? args.contractAddress.trim() : undefined;
73
- if (!tokenSymbol && !contractAddress) {
74
- return { error: 'Provide either tokenSymbol (e.g. "USDC") or contractAddress (0x…).' };
75
- }
76
- let resolvedSymbol;
77
- let resolvedName;
78
- if (tokenSymbol) {
79
- const resolved = await this.resolveContractAddress(tokenSymbol, chain, walletAddress);
80
- if (!resolved) {
81
- return {
82
- error: `Cannot resolve token symbol "${tokenSymbol}" to a contract address on chain ${chain ?? 'default'}. Try passing contractAddress directly.`,
83
- };
84
- }
85
- contractAddress = resolved.address;
86
- resolvedSymbol = resolved.symbol;
87
- resolvedName = resolved.name;
88
- }
89
- const result = await this.service.getTokenHolders({
90
- address: contractAddress,
91
- chain,
92
- });
93
- if (!result.success) {
94
- return { error: result.error || 'Failed to fetch token holder stats' };
95
- }
96
- const data = result.data;
97
- return {
98
- token: {
99
- symbol: resolvedSymbol ?? tokenSymbol ?? null,
100
- name: resolvedName ?? null,
101
- contractAddress: contractAddress,
102
- chain: chain || 'default',
103
- },
104
- totalHolders: data.totalHolders,
105
- holdersByAcquisition: data.holdersByAcquisition,
106
- holderChange: data.holderChange,
107
- holderSupply: data.holderSupply,
108
- holderDistribution: data.holderDistribution,
109
- };
110
- }
111
- /**
112
- * Resolve a contract address from a token symbol.
113
- * 1. Wallet balances (if wallet address available — most reliable)
114
- * 2. Pantograph token search (fallback)
115
- */
116
- async resolveContractAddress(symbol, chain, walletAddress) {
117
- const symLower = symbol.toLowerCase();
118
- if (walletAddress) {
119
- const balRes = await this.service.getWalletTokenBalances({ address: walletAddress, chain });
120
- if (balRes.success && balRes.data?.result?.length) {
121
- const match = balRes.data.result.find((t) => (t.symbol ?? '').toLowerCase() === symLower);
122
- if (match) {
123
- return { address: match.token_address, symbol: match.symbol, name: match.name };
124
- }
125
- }
126
- }
127
- const searchRes = await this.service.searchTokensByKey({ key: symbol, chain });
128
- if (searchRes.success && searchRes.data?.length) {
129
- const exact = searchRes.data.find((t) => (t.symbol ?? '').toLowerCase() === symLower);
130
- const candidate = exact ?? searchRes.data[0];
131
- if (candidate?.token_address) {
132
- return { address: candidate.token_address, symbol: candidate.symbol, name: candidate.name };
133
- }
134
- }
135
- return undefined;
136
- }
137
- }
138
- exports.TokenHoldersTool = TokenHoldersTool;
139
- //# sourceMappingURL=TokenHoldersTool.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"TokenHoldersTool.js","sourceRoot":"","sources":["../../../../src/tools/builtin/token/TokenHoldersTool.ts"],"names":[],"mappings":";;;AAAA,6CAA0C;AAC1C,uDAAmD;AAEnD,qEAA6F;AAI7F;;;;;;;;;;;;GAYG;AACH,MAAa,gBAAiB,SAAQ,mBAAQ;IAC5C,IAAI,GAAG,mBAAmB,CAAC;IAC3B,WAAW,GACT,2DAA2D;QAC3D,0FAA0F;QAC1F,0DAA0D;QAC1D,qEAAqE;QACrE,0FAA0F;QAC1F,kGAAkG;QAClG,kEAAkE;QAClE,oCAAoC;QACpC,yDAAyD;QACzD,0EAA0E;QAC1E,6EAA6E;QAC7E,2EAA2E;QAC3E,wEAAwE;QACxE,wEAAwE;QACxE,0FAA0F;QAC1F,gFAAgF,CAAC;IACnF,QAAQ,GAAG,iBAAiB,CAAC;IAC7B,UAAU,GAAoB;QAC5B;YACE,IAAI,EAAE,aAAa;YACnB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,IAAI,EAAE,SAAS,CAAC,IAAI,EAAE,CAAC;YAC9F,CAAC;QACH,CAAC;QAED,OAAO,SAAS,CAAC;IACnB,CAAC;CACF;AA7ID,4CA6IC"}
@@ -1,40 +0,0 @@
1
- import { BaseTool } from '../../BaseTool';
2
- import type { SuggestedAction, ToolParameter, ToolResult, UserContext } from '../../../types';
3
- import type { TokenBalance, TokenMetadata } from '../../../services/MoralisService';
4
- import { type MoralisServiceConfig } from '../../../services/MoralisService';
5
- export type TokenInfoToolConfig = MoralisServiceConfig;
6
- /**
7
- * Tool: get-token-info
8
- *
9
- * Searches for a token by symbol/name and returns metadata, price,
10
- * 24h change, and whether the user holds it in their wallet.
11
- * Combines data from Pantograph search, Moralis metadata, and wallet balances.
12
- */
13
- export declare class TokenInfoTool extends BaseTool {
14
- name: string;
15
- description: string;
16
- category: string;
17
- parameters: ToolParameter[];
18
- private service;
19
- private llm;
20
- constructor(config?: TokenInfoToolConfig);
21
- protected run(args: Record<string, unknown>, userContext?: UserContext): Promise<{
22
- actionButtons?: SuggestedAction[] | undefined;
23
- research: string | null;
24
- searchResults?: TokenMetadata[] | undefined;
25
- _instructions: string;
26
- chain: string;
27
- userHoldsToken: boolean;
28
- walletBalance: TokenBalance | null;
29
- token: TokenMetadata | null;
30
- } | {
31
- error: string;
32
- }>;
33
- execute(args: Record<string, unknown>, userContext?: UserContext): Promise<ToolResult>;
34
- private searchToken;
35
- /** Substitute the {token} placeholder in an LLM-supplied localized template. */
36
- private fillTemplate;
37
- private askGeminiWithSearch;
38
- private findTokenInWallet;
39
- }
40
- //# sourceMappingURL=TokenInfoTool.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"TokenInfoTool.d.ts","sourceRoot":"","sources":["../../../../src/tools/builtin/token/TokenInfoTool.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAE1C,OAAO,KAAK,EAAE,eAAe,EAAE,aAAa,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC9F,OAAO,KAAK,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,kCAAkC,CAAC;AACpF,OAAO,EAAkB,KAAK,oBAAoB,EAAE,MAAM,kCAAkC,CAAC;AAG7F,MAAM,MAAM,mBAAmB,GAAG,oBAAoB,CAAC;AAEvD;;;;;;GAMG;AACH,qBAAa,aAAc,SAAQ,QAAQ;IACzC,IAAI,SAAoB;IACxB,WAAW,SAIsE;IACjF,QAAQ,SAAqB;IAC7B,UAAU,EAAE,aAAa,EAAE,CA+DzB;IAEF,OAAO,CAAC,OAAO,CAAiB;IAChC,OAAO,CAAC,GAAG,CAAiB;gBAEhB,MAAM,CAAC,EAAE,mBAAmB;cAMxB,GAAG,CAAC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,WAAW,CAAC,EAAE,WAAW;;;;;;;;;;;;IAiBtE,OAAO,CAAC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,WAAW,CAAC,EAAE,WAAW,GAAG,OAAO,CAAC,UAAU,CAAC;YAS9E,WAAW;IA0FzB,gFAAgF;IAChF,OAAO,CAAC,YAAY;YAQN,mBAAmB;YAiBnB,iBAAiB;CA0BhC"}