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,89 +0,0 @@
1
- /**
2
- * Shared types for swap/bridge service providers.
3
- */
4
- export type ProviderName = 'debridge' | 'relay';
5
- export interface SwapQuoteParams {
6
- srcChainId: number | string;
7
- srcTokenAddress: string;
8
- srcTokenAmount: string;
9
- dstChainId: number | string;
10
- dstTokenAddress: string;
11
- recipientAddress: string;
12
- senderAddress: string;
13
- /**
14
- * Slippage tolerance. Either a percent (e.g. 0.5 for 0.5%) or the literal
15
- * 'auto' — adapters decide what 'auto' means (deBridge forwards it; Relay
16
- * falls back to its server-side default).
17
- */
18
- slippage?: number | 'auto';
19
- isCrossChain?: boolean;
20
- isHasAffiliate?: boolean;
21
- }
22
- export interface SwapTxData {
23
- from?: string;
24
- to?: string;
25
- data?: string | {
26
- instructions: unknown[];
27
- addressLookupTableAddresses?: string[];
28
- };
29
- value?: string;
30
- chainId?: number | string;
31
- maxFeePerGas?: string;
32
- maxPriorityFeePerGas?: string;
33
- }
34
- export interface SwapQuoteResult {
35
- success: boolean;
36
- provider?: ProviderName;
37
- tx?: SwapTxData | null;
38
- estimation?: Record<string, unknown>;
39
- isCrossChain?: boolean;
40
- srcChainId?: number | string;
41
- dstChainId?: number | string;
42
- error?: unknown;
43
- errorMessage?: string;
44
- /** Provider-specific raw payload — consumers can read additional fields here. */
45
- raw?: Record<string, unknown>;
46
- }
47
- export interface CheckApprovalParams {
48
- chain?: string;
49
- userAddress: string;
50
- tokenAddress: string;
51
- amount: string;
52
- tokenDecimals: number;
53
- quoteData: SwapQuoteResult;
54
- }
55
- export interface CheckApprovalResult {
56
- isNeeded: boolean;
57
- integrated?: boolean;
58
- contractAddress?: string;
59
- approvalData?: unknown;
60
- message?: string;
61
- error?: string;
62
- }
63
- export interface ExecuteSwapParams {
64
- quoteData: SwapQuoteResult;
65
- }
66
- export interface ExecuteSwapResult {
67
- success: boolean;
68
- provider?: ProviderName;
69
- txData?: SwapTxData;
70
- steps?: unknown[];
71
- estimation?: Record<string, unknown>;
72
- error?: string;
73
- }
74
- export interface TrackTransactionParams {
75
- requestIdOrTxHash: string;
76
- }
77
- export type TrackStatus = 'PENDING' | 'COMPLETED' | 'FAILED' | 'ERROR';
78
- export interface TrackTransactionResult {
79
- success: boolean;
80
- status: TrackStatus;
81
- error?: string;
82
- }
83
- export interface SwapServiceConfig {
84
- apiBaseUrl?: string;
85
- apiKey?: string;
86
- accessToken?: string;
87
- }
88
- export type ExchangeProviderConfig = Record<ProviderName, SwapServiceConfig>;
89
- //# sourceMappingURL=types.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/services/swap/types.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,MAAM,MAAM,YAAY,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;IACpB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,MAAM,MAAM,sBAAsB,GAAG,MAAM,CAAC,YAAY,EAAE,iBAAiB,CAAC,CAAC"}
@@ -1,6 +0,0 @@
1
- "use strict";
2
- /**
3
- * Shared types for swap/bridge service providers.
4
- */
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- //# sourceMappingURL=types.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/services/swap/types.ts"],"names":[],"mappings":";AAAA;;GAEG"}
@@ -1,15 +0,0 @@
1
- import type { Tool, ToolParameter, ToolResult, UserContext } from '../types';
2
- /**
3
- * Convenience base class for building tools.
4
- * Consumers extend this and implement `run()`.
5
- */
6
- export declare abstract class BaseTool implements Tool {
7
- abstract name: string;
8
- abstract description: string;
9
- abstract parameters: ToolParameter[];
10
- category?: string;
11
- /** Implement the actual tool logic here. */
12
- protected abstract run(args: Record<string, unknown>, userContext?: UserContext): Promise<unknown>;
13
- execute(args: Record<string, unknown>, userContext?: UserContext): Promise<ToolResult>;
14
- }
15
- //# sourceMappingURL=BaseTool.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"BaseTool.d.ts","sourceRoot":"","sources":["../../src/tools/BaseTool.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,aAAa,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAE7E;;;GAGG;AACH,8BAAsB,QAAS,YAAW,IAAI;IAC5C,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,UAAU,EAAE,aAAa,EAAE,CAAC;IACrC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAElB,4CAA4C;IAC5C,SAAS,CAAC,QAAQ,CAAC,GAAG,CAAC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,WAAW,CAAC,EAAE,WAAW,GAAG,OAAO,CAAC,OAAO,CAAC;IAE5F,OAAO,CAAC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,WAAW,CAAC,EAAE,WAAW,GAAG,OAAO,CAAC,UAAU,CAAC;CAsB7F"}
@@ -1,35 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.BaseTool = void 0;
4
- /**
5
- * Convenience base class for building tools.
6
- * Consumers extend this and implement `run()`.
7
- */
8
- class BaseTool {
9
- category;
10
- async execute(args, userContext) {
11
- const callId = `call_${Date.now()}_${Math.random().toString(36).slice(2, 8)}`;
12
- const start = Date.now();
13
- try {
14
- const data = await this.run(args, userContext);
15
- return {
16
- toolName: this.name,
17
- callId,
18
- success: true,
19
- data,
20
- duration: Date.now() - start,
21
- };
22
- }
23
- catch (err) {
24
- return {
25
- toolName: this.name,
26
- callId,
27
- success: false,
28
- error: err instanceof Error ? err.message : String(err),
29
- duration: Date.now() - start,
30
- };
31
- }
32
- }
33
- }
34
- exports.BaseTool = BaseTool;
35
- //# sourceMappingURL=BaseTool.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"BaseTool.js","sourceRoot":"","sources":["../../src/tools/BaseTool.ts"],"names":[],"mappings":";;;AAEA;;;GAGG;AACH,MAAsB,QAAQ;IAI5B,QAAQ,CAAU;IAKlB,KAAK,CAAC,OAAO,CAAC,IAA6B,EAAE,WAAyB;QACpE,MAAM,MAAM,GAAG,QAAQ,IAAI,CAAC,GAAG,EAAE,IAAI,IAAI,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC;QAC9E,MAAM,KAAK,GAAG,IAAI,CAAC,GAAG,EAAE,CAAC;QACzB,IAAI,CAAC;YACH,MAAM,IAAI,GAAG,MAAM,IAAI,CAAC,GAAG,CAAC,IAAI,EAAE,WAAW,CAAC,CAAC;YAC/C,OAAO;gBACL,QAAQ,EAAE,IAAI,CAAC,IAAI;gBACnB,MAAM;gBACN,OAAO,EAAE,IAAI;gBACb,IAAI;gBACJ,QAAQ,EAAE,IAAI,CAAC,GAAG,EAAE,GAAG,KAAK;aAC7B,CAAC;QACJ,CAAC;QAAC,OAAO,GAAG,EAAE,CAAC;YACb,OAAO;gBACL,QAAQ,EAAE,IAAI,CAAC,IAAI;gBACnB,MAAM;gBACN,OAAO,EAAE,KAAK;gBACd,KAAK,EAAE,GAAG,YAAY,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC;gBACvD,QAAQ,EAAE,IAAI,CAAC,GAAG,EAAE,GAAG,KAAK;aAC7B,CAAC;QACJ,CAAC;IACH,CAAC;CACF;AA/BD,4BA+BC"}
@@ -1,27 +0,0 @@
1
- import type { Tool, ToolDefinition, ToolResult, UserContext } from '../types';
2
- /**
3
- * Registry that holds all available tools.
4
- * Consumer registers tools here; the Router and Subagents query the registry.
5
- */
6
- export declare class ToolRegistry {
7
- private tools;
8
- /** Register a tool. Throws if a tool with the same name already exists. */
9
- register(tool: Tool): void;
10
- /** Unregister a tool by name. */
11
- unregister(name: string): boolean;
12
- /** Get a tool by name. */
13
- get(name: string): Tool | undefined;
14
- /** Check if a tool exists. */
15
- has(name: string): boolean;
16
- /** Return definitions of all registered tools (used for LLM function calling). */
17
- getDefinitions(): ToolDefinition[];
18
- /** Return definitions filtered by category. */
19
- getDefinitionsByCategory(category: string): ToolDefinition[];
20
- /** Execute a tool by name. Returns an error ToolResult if the tool is not found. */
21
- execute(name: string, args: Record<string, unknown>, userContext?: UserContext): Promise<ToolResult>;
22
- /** Number of registered tools. */
23
- get size(): number;
24
- /** List all registered tool names. */
25
- listNames(): string[];
26
- }
27
- //# sourceMappingURL=ToolRegistry.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ToolRegistry.d.ts","sourceRoot":"","sources":["../../src/tools/ToolRegistry.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,cAAc,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAE9E;;;GAGG;AACH,qBAAa,YAAY;IACvB,OAAO,CAAC,KAAK,CAA2B;IAExC,2EAA2E;IAC3E,QAAQ,CAAC,IAAI,EAAE,IAAI,GAAG,IAAI;IAO1B,iCAAiC;IACjC,UAAU,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO;IAIjC,0BAA0B;IAC1B,GAAG,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS;IAInC,8BAA8B;IAC9B,GAAG,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO;IAI1B,kFAAkF;IAClF,cAAc,IAAI,cAAc,EAAE;IAUlC,+CAA+C;IAC/C,wBAAwB,CAAC,QAAQ,EAAE,MAAM,GAAG,cAAc,EAAE;IAI5D,oFAAoF;IAC9E,OAAO,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,WAAW,CAAC,EAAE,WAAW,GAAG,OAAO,CAAC,UAAU,CAAC;IA2B1G,kCAAkC;IAClC,IAAI,IAAI,IAAI,MAAM,CAEjB;IAED,sCAAsC;IACtC,SAAS,IAAI,MAAM,EAAE;CAGtB"}
@@ -1,80 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.ToolRegistry = void 0;
4
- /**
5
- * Registry that holds all available tools.
6
- * Consumer registers tools here; the Router and Subagents query the registry.
7
- */
8
- class ToolRegistry {
9
- tools = new Map();
10
- /** Register a tool. Throws if a tool with the same name already exists. */
11
- register(tool) {
12
- if (this.tools.has(tool.name)) {
13
- throw new Error(`Tool "${tool.name}" is already registered`);
14
- }
15
- this.tools.set(tool.name, tool);
16
- }
17
- /** Unregister a tool by name. */
18
- unregister(name) {
19
- return this.tools.delete(name);
20
- }
21
- /** Get a tool by name. */
22
- get(name) {
23
- return this.tools.get(name);
24
- }
25
- /** Check if a tool exists. */
26
- has(name) {
27
- return this.tools.has(name);
28
- }
29
- /** Return definitions of all registered tools (used for LLM function calling). */
30
- getDefinitions() {
31
- return Array.from(this.tools.values()).map((t) => ({
32
- name: t.name,
33
- description: t.description,
34
- parameters: t.parameters,
35
- category: t.category,
36
- kind: t.kind,
37
- }));
38
- }
39
- /** Return definitions filtered by category. */
40
- getDefinitionsByCategory(category) {
41
- return this.getDefinitions().filter((d) => d.category === category);
42
- }
43
- /** Execute a tool by name. Returns an error ToolResult if the tool is not found. */
44
- async execute(name, args, userContext) {
45
- const tool = this.tools.get(name);
46
- if (!tool) {
47
- return {
48
- toolName: name,
49
- callId: `err_${Date.now()}`,
50
- success: false,
51
- error: `Tool "${name}" not found in registry`,
52
- duration: 0,
53
- };
54
- }
55
- const start = Date.now();
56
- try {
57
- const result = await tool.execute(args, userContext);
58
- return { ...result, duration: Date.now() - start };
59
- }
60
- catch (err) {
61
- return {
62
- toolName: name,
63
- callId: `err_${Date.now()}`,
64
- success: false,
65
- error: err instanceof Error ? err.message : String(err),
66
- duration: Date.now() - start,
67
- };
68
- }
69
- }
70
- /** Number of registered tools. */
71
- get size() {
72
- return this.tools.size;
73
- }
74
- /** List all registered tool names. */
75
- listNames() {
76
- return Array.from(this.tools.keys());
77
- }
78
- }
79
- exports.ToolRegistry = ToolRegistry;
80
- //# sourceMappingURL=ToolRegistry.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ToolRegistry.js","sourceRoot":"","sources":["../../src/tools/ToolRegistry.ts"],"names":[],"mappings":";;;AAEA;;;GAGG;AACH,MAAa,YAAY;IACf,KAAK,GAAG,IAAI,GAAG,EAAgB,CAAC;IAExC,2EAA2E;IAC3E,QAAQ,CAAC,IAAU;QACjB,IAAI,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,IAA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CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;QAClC,IAAI,CAAC,IAAI,EAAE,CAAC;YACV,OAAO;gBACL,QAAQ,EAAE,IAAI;gBACd,MAAM,EAAE,OAAO,IAAI,CAAC,GAAG,EAAE,EAAE;gBAC3B,OAAO,EAAE,KAAK;gBACd,KAAK,EAAE,SAAS,IAAI,yBAAyB;gBAC7C,QAAQ,EAAE,CAAC;aACZ,CAAC;QACJ,CAAC;QAED,MAAM,KAAK,GAAG,IAAI,CAAC,GAAG,EAAE,CAAC;QACzB,IAAI,CAAC;YACH,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,OAAO,CAAC,IAAI,EAAE,WAAW,CAAC,CAAC;YACrD,OAAO,EAAE,GAAG,MAAM,EAAE,QAAQ,EAAE,IAAI,CAAC,GAAG,EAAE,GAAG,KAAK,EAAE,CAAC;QACrD,CAAC;QAAC,OAAO,GAAG,EAAE,CAAC;YACb,OAAO;gBACL,QAAQ,EAAE,IAAI;gBACd,MAAM,EAAE,OAAO,IAAI,CAAC,GAAG,EAAE,EAAE;gBAC3B,OAAO,EAAE,KAAK;gBACd,KAAK,EAAE,GAAG,YAAY,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC;gBACvD,QAAQ,EAAE,IAAI,CAAC,GAAG,EAAE,GAAG,KAAK;aAC7B,CAAC;QACJ,CAAC;IACH,CAAC;IAED,kCAAkC;IAClC,IAAI,IAAI;QACN,OAAO,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC;IACzB,CAAC;IAED,sCAAsC;IACtC,SAAS;QACP,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,EAAE,CAAC,CAAC;IACvC,CAAC;CACF;AA/ED,oCA+EC"}
@@ -1,36 +0,0 @@
1
- import { BaseTool } from '../../BaseTool';
2
- import type { LLMProviderConfig, ToolParameter, UserContext } from '../../../types';
3
- export type GeminiSearchAiToolConfig = LLMProviderConfig;
4
- /**
5
- * Tool: gemini-search-ai
6
- *
7
- * Open-ended AI fallback for blockchain / crypto questions that none of the
8
- * specialised data tools can answer. Backed by Gemini with the built-in
9
- * `googleSearch` grounding tool, so answers reflect live web data (news,
10
- * prices, recent on-chain events, protocol updates, etc.).
11
- *
12
- * This tool replaces the previous `moralis-cortex-ai` cortex tool. It is chain-agnostic — the caller
13
- * embeds whatever context (chain id, wallet address, time window, token
14
- * symbols) directly in `prompt`.
15
- *
16
- * Subagents wire this in as their `cortexFallbackTool` so the framework
17
- * forces a tool call every turn even when no specialised tool matches.
18
- */
19
- export declare class GeminiSearchAiTool extends BaseTool {
20
- name: string;
21
- description: string;
22
- category: string;
23
- parameters: ToolParameter[];
24
- private llm;
25
- constructor(config?: GeminiSearchAiToolConfig);
26
- protected run(args: Record<string, unknown>, userContext?: UserContext): Promise<{
27
- error: string;
28
- source?: undefined;
29
- answer?: undefined;
30
- } | {
31
- source: string;
32
- answer: string;
33
- error?: undefined;
34
- }>;
35
- }
36
- //# sourceMappingURL=GeminiSearchAiTool.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"GeminiSearchAiTool.d.ts","sourceRoot":"","sources":["../../../../src/tools/builtin/ai/GeminiSearchAiTool.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAE1C,OAAO,KAAK,EAAe,iBAAiB,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAEjG,MAAM,MAAM,wBAAwB,GAAG,iBAAiB,CAAC;AAEzD;;;;;;;;;;;;;;GAcG;AACH,qBAAa,kBAAmB,SAAQ,QAAQ;IAC9C,IAAI,SAAsB;IAC1B,WAAW,SAemC;IAC9C,QAAQ,SAAmB;IAC3B,UAAU,EAAE,aAAa,EAAE,CAczB;IAEF,OAAO,CAAC,GAAG,CAAiB;gBAEhB,MAAM,CAAC,EAAE,wBAAwB;cAK7B,GAAG,CAAC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,WAAW,CAAC,EAAE,WAAW;;;;;;;;;CAiC7E"}
@@ -1,91 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.GeminiSearchAiTool = void 0;
4
- const BaseTool_1 = require("../../BaseTool");
5
- const GeminiProvider_1 = require("../../../llm/GeminiProvider");
6
- /**
7
- * Tool: gemini-search-ai
8
- *
9
- * Open-ended AI fallback for blockchain / crypto questions that none of the
10
- * specialised data tools can answer. Backed by Gemini with the built-in
11
- * `googleSearch` grounding tool, so answers reflect live web data (news,
12
- * prices, recent on-chain events, protocol updates, etc.).
13
- *
14
- * This tool replaces the previous `moralis-cortex-ai` cortex tool. It is chain-agnostic — the caller
15
- * embeds whatever context (chain id, wallet address, time window, token
16
- * symbols) directly in `prompt`.
17
- *
18
- * Subagents wire this in as their `cortexFallbackTool` so the framework
19
- * forces a tool call every turn even when no specialised tool matches.
20
- */
21
- class GeminiSearchAiTool extends BaseTool_1.BaseTool {
22
- name = 'gemini-search-ai';
23
- description = 'Ask a search-grounded Gemini model for blockchain / crypto insights that no dedicated tool can answer. ' +
24
- 'Use this as a LAST-RESORT fallback when the specialised data tools are insufficient. ' +
25
- 'Backed by live Google Search grounding — good for: market analysis, category/theme queries ' +
26
- '(meme, AI, gaming, L2, RWA), DeFi protocol explanations, cross-chain comparisons, trend / sentiment, ' +
27
- 'recent news or announcements, gas insights, NFT collection lore, and any open-ended crypto reasoning question. ' +
28
- 'Chain-agnostic — write the chain (Ethereum, BSC, Base, …) and any addresses, time range, or ' +
29
- 'token symbols directly into the prompt. ' +
30
- 'Do NOT use this for: ' +
31
- 'token balances → get-wallet-token-balances; ' +
32
- 'token prices/metadata → get-token-info; ' +
33
- 'NFT holdings → get-wallet-nfts; NFT contract info → get-nft-contract-info; ' +
34
- 'transaction details → get-transaction-by-hash; wallet history → get-wallet-history; ' +
35
- 'token transfers → get-wallet-token-transfers; NFT transfers → get-wallet-nft-transfers; ' +
36
- 'token holders → get-token-holders; wallet PnL → get-wallet-pnl or get-wallet-pnl-summary; ' +
37
- 'pool / liquidity data → pool-agent tools.';
38
- category = 'blockchain-ai';
39
- parameters = [
40
- {
41
- name: 'prompt',
42
- type: 'string',
43
- description: 'A clear, self-contained English question for the AI. ' +
44
- 'Must include every detail needed to answer without the conversation context: ' +
45
- 'chain (Ethereum / BSC / Base / …), wallet or contract addresses, token symbols, ' +
46
- 'time range, what to compare or rank. ' +
47
- 'Instruct the model to use up-to-date web sources when relevant. ' +
48
- 'Example: "List the top 10 meme-category tokens on Ethereum right now, ranked by 24h trading volume, ' +
49
- 'using up-to-date market data."',
50
- required: true,
51
- },
52
- ];
53
- llm;
54
- constructor(config) {
55
- super();
56
- this.llm = new GeminiProvider_1.GeminiProvider(config ?? {});
57
- }
58
- async run(args, userContext) {
59
- const prompt = typeof args.prompt === 'string' ? args.prompt.trim() : '';
60
- if (!prompt) {
61
- return { error: 'Missing required parameter: prompt' };
62
- }
63
- // Embed connected-wallet / chain context as an explicit, clearly-labelled
64
- // system message so the model does not confuse it with the question.
65
- const contextLines = [];
66
- if (userContext?.walletAddress) {
67
- contextLines.push(`- Connected wallet address: ${userContext.walletAddress}`);
68
- }
69
- if (userContext?.chain) {
70
- contextLines.push(`- Current chain: ${userContext.chain}`);
71
- }
72
- contextLines.push('Use this context only when relevant to the question. Do not invent on-chain values.');
73
- const now = Date.now();
74
- const messages = [
75
- { role: 'system', content: `[USER CONTEXT]\n${contextLines.join('\n')}`, timestamp: now },
76
- { role: 'user', content: prompt, timestamp: now },
77
- ];
78
- try {
79
- const res = await this.llm.chat(messages, undefined, { googleSearch: true, maxRetries: 1 });
80
- return {
81
- source: 'gemini-search-ai',
82
- answer: res.text?.trim() ?? '',
83
- };
84
- }
85
- catch (err) {
86
- return { error: err instanceof Error ? err.message : String(err) };
87
- }
88
- }
89
- }
90
- exports.GeminiSearchAiTool = GeminiSearchAiTool;
91
- //# sourceMappingURL=GeminiSearchAiTool.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"GeminiSearchAiTool.js","sourceRoot":"","sources":["../../../../src/tools/builtin/ai/GeminiSearchAiTool.ts"],"names":[],"mappings":";;;AAAA,6CAA0C;AAC1C,gEAA6D;AAK7D;;;;;;;;;;;;;;GAcG;AACH,MAAa,kBAAmB,SAAQ,mBAAQ;IAC9C,IAAI,GAAG,kBAAkB,CAAC;IAC1B,WAAW,GACT,yGAAyG;QACzG,uFAAuF;QACvF,6FAA6F;QAC7F,uGAAuG;QACvG,iHAAiH;QACjH,8FAA8F;QAC9F,0CAA0C;QAC1C,uBAAuB;QACvB,8CAA8C;QAC9C,0CAA0C;QAC1C,6EAA6E;QAC7E,sFAAsF;QACtF,0FAA0F;QAC1F,4FAA4F;QAC5F,2CAA2C,CAAC;IAC9C,QAAQ,GAAG,eAAe,CAAC;IAC3B,UAAU,GAAoB;QAC5B;YACE,IAAI,EAAE,QAAQ;YACd,IAAI,EAAE,QAAQ;YACd,WAAW,EACT,uDAAuD;gBACvD,+EAA+E;gBAC/E,kFAAkF;gBAClF,uCAAuC;gBACvC,kEAAkE;gBAClE,sGAAsG;gBACtG,gCAAgC;YAClC,QAAQ,EAAE,IAAI;SACf;KACF,CAAC;IAEM,GAAG,CAAiB;IAE5B,YAAY,MAAiC;QAC3C,KAAK,EAAE,CAAC;QACR,IAAI,CAAC,GAAG,GAAG,IAAI,+BAAc,CAAC,MAAM,IAAI,EAAE,CAAC,CAAC;IAC9C,CAAC;IAES,KAAK,CAAC,GAAG,CAAC,IAA6B,EAAE,WAAyB;QAC1E,MAAM,MAAM,GAAG,OAAO,IAAI,CAAC,MAAM,KAAK,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;QACzE,IAAI,CAAC,MAAM,EAAE,CAAC;YACZ,OAAO,EAAE,KAAK,EAAE,oCAAoC,EAAE,CAAC;QACz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
- export { GeminiSearchAiTool } from './GeminiSearchAiTool';
2
- export type { GeminiSearchAiToolConfig } from './GeminiSearchAiTool';
3
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/tools/builtin/ai/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC1D,YAAY,EAAE,wBAAwB,EAAE,MAAM,sBAAsB,CAAC"}
@@ -1,6 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.GeminiSearchAiTool = void 0;
4
- var GeminiSearchAiTool_1 = require("./GeminiSearchAiTool");
5
- Object.defineProperty(exports, "GeminiSearchAiTool", { enumerable: true, get: function () { return GeminiSearchAiTool_1.GeminiSearchAiTool; } });
6
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/tools/builtin/ai/index.ts"],"names":[],"mappings":";;;AAAA,2DAA0D;AAAjD,wHAAA,kBAAkB,OAAA"}
@@ -1,8 +0,0 @@
1
- export * from './token';
2
- export * from './wallet';
3
- export * from './nft';
4
- export * from './ai';
5
- export * from './pool';
6
- export * from './pool-subgraph';
7
- export * from './wallet-action';
8
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/tools/builtin/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC;AACxB,cAAc,UAAU,CAAC;AACzB,cAAc,OAAO,CAAC;AACtB,cAAc,MAAM,CAAC;AACrB,cAAc,QAAQ,CAAC;AACvB,cAAc,iBAAiB,CAAC;AAChC,cAAc,iBAAiB,CAAC"}
@@ -1,24 +0,0 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
- };
16
- Object.defineProperty(exports, "__esModule", { value: true });
17
- __exportStar(require("./token"), exports);
18
- __exportStar(require("./wallet"), exports);
19
- __exportStar(require("./nft"), exports);
20
- __exportStar(require("./ai"), exports);
21
- __exportStar(require("./pool"), exports);
22
- __exportStar(require("./pool-subgraph"), exports);
23
- __exportStar(require("./wallet-action"), exports);
24
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/tools/builtin/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,0CAAwB;AACxB,2CAAyB;AACzB,wCAAsB;AACtB,uCAAqB;AACrB,yCAAuB;AACvB,kDAAgC;AAChC,kDAAgC"}
@@ -1,35 +0,0 @@
1
- import { BaseTool } from '../../BaseTool';
2
- import type { ToolKind, ToolParameter } from '../../../types';
3
- /** Config for an NFT message tool — the optional website link it points to. */
4
- export interface NftMessageToolConfig {
5
- /**
6
- * Destination URL. When set, the "this website" phrase in the message becomes
7
- * a Markdown link to it; when omitted/blank, the phrase stays plain text.
8
- */
9
- url?: string;
10
- }
11
- /**
12
- * Shared base for the canned-message NFT notice tools (`send-nft`,
13
- * `get-wallet-nfts`, `get-nft-metadata`, `get-nft-contract-info`).
14
- *
15
- * Each tool emits one fixed sentence that points the user at a website. The
16
- * phrase "this website" is rendered as a Markdown link to `config.url` when one
17
- * was supplied at AgentCore construction; otherwise it stays plain text. The
18
- * tool takes no arguments — it returns the fully-built Markdown message plus
19
- * `_instructions` telling the agent to reply with it verbatim.
20
- */
21
- export declare abstract class BaseNftMessageTool extends BaseTool {
22
- kind: ToolKind;
23
- category: string;
24
- noSuggestions: boolean;
25
- parameters: ToolParameter[];
26
- /** The phrase inside the template that links to the website. */
27
- protected readonly linkPhrase = "this website";
28
- /** Message template containing the literal `{link}` placeholder. */
29
- protected abstract readonly template: string;
30
- /** Resolved (trimmed) URL, or undefined when none was configured. */
31
- protected readonly url?: string;
32
- constructor(config?: NftMessageToolConfig);
33
- protected run(): Promise<unknown>;
34
- }
35
- //# sourceMappingURL=BaseNftMessageTool.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"BaseNftMessageTool.d.ts","sourceRoot":"","sources":["../../../../src/tools/builtin/nft/BaseNftMessageTool.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAC1C,OAAO,KAAK,EAAE,QAAQ,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAE9D,+EAA+E;AAC/E,MAAM,WAAW,oBAAoB;IACnC;;;OAGG;IACH,GAAG,CAAC,EAAE,MAAM,CAAC;CACd;AAED;;;;;;;;;GASG;AACH,8BAAsB,kBAAmB,SAAQ,QAAQ;IACvD,IAAI,EAAE,QAAQ,CAAU;IACxB,QAAQ,SAAS;IAGjB,aAAa,UAAQ;IACrB,UAAU,EAAE,aAAa,EAAE,CAAM;IAEjC,gEAAgE;IAChE,SAAS,CAAC,QAAQ,CAAC,UAAU,kBAAkB;IAC/C,oEAAoE;IACpE,SAAS,CAAC,QAAQ,CAAC,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAE7C,qEAAqE;IACrE,SAAS,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE,MAAM,CAAC;gBAEpB,MAAM,CAAC,EAAE,oBAAoB;cAMzB,GAAG,IAAI,OAAO,CAAC,OAAO,CAAC;CAaxC"}
@@ -1,45 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.BaseNftMessageTool = void 0;
4
- const BaseTool_1 = require("../../BaseTool");
5
- /**
6
- * Shared base for the canned-message NFT notice tools (`send-nft`,
7
- * `get-wallet-nfts`, `get-nft-metadata`, `get-nft-contract-info`).
8
- *
9
- * Each tool emits one fixed sentence that points the user at a website. The
10
- * phrase "this website" is rendered as a Markdown link to `config.url` when one
11
- * was supplied at AgentCore construction; otherwise it stays plain text. The
12
- * tool takes no arguments — it returns the fully-built Markdown message plus
13
- * `_instructions` telling the agent to reply with it verbatim.
14
- */
15
- class BaseNftMessageTool extends BaseTool_1.BaseTool {
16
- kind = 'data';
17
- category = 'nft';
18
- // The message points the user at a concrete next step (a website), so generic
19
- // follow-up suggestions would only add noise.
20
- noSuggestions = true;
21
- parameters = [];
22
- /** The phrase inside the template that links to the website. */
23
- linkPhrase = 'this website';
24
- /** Resolved (trimmed) URL, or undefined when none was configured. */
25
- url;
26
- constructor(config) {
27
- super();
28
- const u = config?.url?.trim();
29
- this.url = u ? u : undefined;
30
- }
31
- async run() {
32
- const link = this.url ? `[${this.linkPhrase}](${this.url})` : this.linkPhrase;
33
- const message = this.template.replace('{link}', link);
34
- return {
35
- message,
36
- _instructions: 'This is a fixed notice. Output it to the user EXACTLY as written below — in English, ' +
37
- 'without translating, rephrasing, summarising, or adding/removing any words. ' +
38
- 'Preserve the Markdown link verbatim (do not change, wrap, or drop the URL or the linked words). ' +
39
- 'Do not mention tools. Reply with only this message:\n\n' +
40
- message,
41
- };
42
- }
43
- }
44
- exports.BaseNftMessageTool = BaseNftMessageTool;
45
- //# sourceMappingURL=BaseNftMessageTool.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"BaseNftMessageTool.js","sourceRoot":"","sources":["../../../../src/tools/builtin/nft/BaseNftMessageTool.ts"],"names":[],"mappings":";;;AAAA,6CAA0C;AAY1C;;;;;;;;;GASG;AACH,MAAsB,kBAAmB,SAAQ,mBAAQ;IACvD,IAAI,GAAa,MAAM,CAAC;IACxB,QAAQ,GAAG,KAAK,CAAC;IACjB,8EAA8E;IAC9E,8CAA8C;IAC9C,aAAa,GAAG,IAAI,CAAC;IACrB,UAAU,GAAoB,EAAE,CAAC;IAEjC,gEAAgE;IAC7C,UAAU,GAAG,cAAc,CAAC;IAI/C,qEAAqE;IAClD,GAAG,CAAU;IAEhC,YAAY,MAA6B;QACvC,KAAK,EAAE,CAAC;QACR,MAAM,CAAC,GAAG,MAAM,EAAE,GAAG,EAAE,IAAI,EAAE,CAAC;QAC9B,IAAI,CAAC,GAAG,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;IAC/B,CAAC;IAES,KAAK,CAAC,GAAG;QACjB,MAAM,IAAI,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,IAAI,IAAI,CAAC,UAAU,KAAK,IAAI,CAAC,GAAG,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC,UAAU,CAAC;QAC9E,MAAM,OAAO,GAAG,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,QAAQ,EAAE,IAAI,CAAC,CAAC;QACtD,OAAO;YACL,OAAO;YACP,aAAa,EACX,uFAAuF;gBACvF,8EAA8E;gBAC9E,kGAAkG;gBAClG,yDAAyD;gBACzD,OAAO;SACV,CAAC;IACJ,CAAC;CACF;AAnCD,gDAmCC"}
@@ -1,15 +0,0 @@
1
- import { BaseNftMessageTool, type NftMessageToolConfig } from './BaseNftMessageTool';
2
- export type NFTContractInfoToolConfig = NftMessageToolConfig;
3
- /**
4
- * Tool: get-nft-contract-info
5
- *
6
- * Points the user to the NFT website instead of returning collection/contract
7
- * metadata. Emits a fixed NFT website notice; "this website" links to the
8
- * configured `nftLink` URL when set, otherwise it stays plain text.
9
- */
10
- export declare class NFTContractInfoTool extends BaseNftMessageTool {
11
- name: string;
12
- description: string;
13
- protected readonly template = "Please view your NFT collection on {link} for more details";
14
- }
15
- //# sourceMappingURL=NFTContractInfoTool.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"NFTContractInfoTool.d.ts","sourceRoot":"","sources":["../../../../src/tools/builtin/nft/NFTContractInfoTool.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,KAAK,oBAAoB,EAAE,MAAM,sBAAsB,CAAC;AAErF,MAAM,MAAM,yBAAyB,GAAG,oBAAoB,CAAC;AAE7D;;;;;;GAMG;AACH,qBAAa,mBAAoB,SAAQ,kBAAkB;IACzD,IAAI,SAA2B;IAC/B,WAAW,SAEuE;IAElF,SAAS,CAAC,QAAQ,CAAC,QAAQ,gEAAgE;CAC5F"}
@@ -1,19 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.NFTContractInfoTool = void 0;
4
- const BaseNftMessageTool_1 = require("./BaseNftMessageTool");
5
- /**
6
- * Tool: get-nft-contract-info
7
- *
8
- * Points the user to the NFT website instead of returning collection/contract
9
- * metadata. Emits a fixed NFT website notice; "this website" links to the
10
- * configured `nftLink` URL when set, otherwise it stays plain text.
11
- */
12
- class NFTContractInfoTool extends BaseNftMessageTool_1.BaseNftMessageTool {
13
- name = 'get-nft-contract-info';
14
- description = 'Use when the user asks about an NFT collection / contract (name, symbol, type, floor, socials). ' +
15
- 'Returns a fixed notice directing them to the NFT website. Takes no arguments.';
16
- template = 'Please view your NFT collection on {link} for more details';
17
- }
18
- exports.NFTContractInfoTool = NFTContractInfoTool;
19
- //# sourceMappingURL=NFTContractInfoTool.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"NFTContractInfoTool.js","sourceRoot":"","sources":["../../../../src/tools/builtin/nft/NFTContractInfoTool.ts"],"names":[],"mappings":";;;AAAA,6DAAqF;AAIrF;;;;;;GAMG;AACH,MAAa,mBAAoB,SAAQ,uCAAkB;IACzD,IAAI,GAAG,uBAAuB,CAAC;IAC/B,WAAW,GACT,kGAAkG;QAClG,+EAA+E,CAAC;IAE/D,QAAQ,GAAG,4DAA4D,CAAC;CAC5F;AAPD,kDAOC"}