keyring-agent-core 0.2.1 → 0.2.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +6692 -27
- package/dist/index.js +877 -70
- package/package.json +6 -4
- package/dist/agent/AgentCore.d.ts +0 -256
- package/dist/agent/AgentCore.d.ts.map +0 -1
- package/dist/agent/AgentCore.js +0 -1093
- package/dist/agent/AgentCore.js.map +0 -1
- package/dist/agent/QueryRewriter.d.ts +0 -84
- package/dist/agent/QueryRewriter.d.ts.map +0 -1
- package/dist/agent/QueryRewriter.js +0 -306
- package/dist/agent/QueryRewriter.js.map +0 -1
- package/dist/agent/Router.d.ts +0 -33
- package/dist/agent/Router.d.ts.map +0 -1
- package/dist/agent/Router.js +0 -229
- package/dist/agent/Router.js.map +0 -1
- package/dist/agent/Subagent.d.ts +0 -80
- package/dist/agent/Subagent.d.ts.map +0 -1
- package/dist/agent/Subagent.js +0 -272
- package/dist/agent/Subagent.js.map +0 -1
- package/dist/agent/Synthesizer.d.ts +0 -11
- package/dist/agent/Synthesizer.d.ts.map +0 -1
- package/dist/agent/Synthesizer.js +0 -86
- package/dist/agent/Synthesizer.js.map +0 -1
- package/dist/agent/chatGraph.d.ts +0 -364
- package/dist/agent/chatGraph.d.ts.map +0 -1
- package/dist/agent/chatGraph.js +0 -184
- package/dist/agent/chatGraph.js.map +0 -1
- package/dist/agent/index.d.ts +0 -10
- package/dist/agent/index.d.ts.map +0 -1
- package/dist/agent/index.js +0 -24
- package/dist/agent/index.js.map +0 -1
- package/dist/agent/subagents/AiAgent.d.ts +0 -6
- package/dist/agent/subagents/AiAgent.d.ts.map +0 -1
- package/dist/agent/subagents/AiAgent.js +0 -52
- package/dist/agent/subagents/AiAgent.js.map +0 -1
- package/dist/agent/subagents/NftAgent.d.ts +0 -6
- package/dist/agent/subagents/NftAgent.d.ts.map +0 -1
- package/dist/agent/subagents/NftAgent.js +0 -79
- package/dist/agent/subagents/NftAgent.js.map +0 -1
- package/dist/agent/subagents/PoolAgent.d.ts +0 -6
- package/dist/agent/subagents/PoolAgent.d.ts.map +0 -1
- package/dist/agent/subagents/PoolAgent.js +0 -184
- package/dist/agent/subagents/PoolAgent.js.map +0 -1
- package/dist/agent/subagents/PoolSubgraphAgent.d.ts +0 -6
- package/dist/agent/subagents/PoolSubgraphAgent.d.ts.map +0 -1
- package/dist/agent/subagents/PoolSubgraphAgent.js +0 -117
- package/dist/agent/subagents/PoolSubgraphAgent.js.map +0 -1
- package/dist/agent/subagents/TokenAgent.d.ts +0 -6
- package/dist/agent/subagents/TokenAgent.d.ts.map +0 -1
- package/dist/agent/subagents/TokenAgent.js +0 -76
- package/dist/agent/subagents/TokenAgent.js.map +0 -1
- package/dist/agent/subagents/WalletActionAgent.d.ts +0 -6
- package/dist/agent/subagents/WalletActionAgent.d.ts.map +0 -1
- package/dist/agent/subagents/WalletActionAgent.js +0 -55
- package/dist/agent/subagents/WalletActionAgent.js.map +0 -1
- package/dist/agent/subagents/WalletAgent.d.ts +0 -6
- package/dist/agent/subagents/WalletAgent.d.ts.map +0 -1
- package/dist/agent/subagents/WalletAgent.js +0 -93
- package/dist/agent/subagents/WalletAgent.js.map +0 -1
- package/dist/agent/subagents/index.d.ts +0 -34
- package/dist/agent/subagents/index.d.ts.map +0 -1
- package/dist/agent/subagents/index.js +0 -69
- package/dist/agent/subagents/index.js.map +0 -1
- package/dist/constants/abi.d.ts +0 -551
- package/dist/constants/abi.d.ts.map +0 -1
- package/dist/constants/abi.js +0 -690
- package/dist/constants/abi.js.map +0 -1
- package/dist/functions/pool.d.ts +0 -25
- package/dist/functions/pool.d.ts.map +0 -1
- package/dist/functions/pool.js +0 -151
- package/dist/functions/pool.js.map +0 -1
- package/dist/functions/web3.d.ts +0 -31
- package/dist/functions/web3.d.ts.map +0 -1
- package/dist/functions/web3.js +0 -232
- package/dist/functions/web3.js.map +0 -1
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/llm/GeminiProvider.d.ts +0 -16
- package/dist/llm/GeminiProvider.d.ts.map +0 -1
- package/dist/llm/GeminiProvider.js +0 -329
- package/dist/llm/GeminiProvider.js.map +0 -1
- package/dist/llm/index.d.ts +0 -2
- package/dist/llm/index.d.ts.map +0 -1
- package/dist/llm/index.js +0 -6
- package/dist/llm/index.js.map +0 -1
- package/dist/memory/ChatHistory.d.ts +0 -83
- package/dist/memory/ChatHistory.d.ts.map +0 -1
- package/dist/memory/ChatHistory.js +0 -143
- package/dist/memory/ChatHistory.js.map +0 -1
- package/dist/memory/KnowledgeBase.d.ts +0 -38
- package/dist/memory/KnowledgeBase.d.ts.map +0 -1
- package/dist/memory/KnowledgeBase.js +0 -139
- package/dist/memory/KnowledgeBase.js.map +0 -1
- package/dist/memory/Summarizer.d.ts +0 -12
- package/dist/memory/Summarizer.d.ts.map +0 -1
- package/dist/memory/Summarizer.js +0 -39
- package/dist/memory/Summarizer.js.map +0 -1
- package/dist/memory/UpstashKnowledgeBase.d.ts +0 -124
- package/dist/memory/UpstashKnowledgeBase.d.ts.map +0 -1
- package/dist/memory/UpstashKnowledgeBase.js +0 -152
- package/dist/memory/UpstashKnowledgeBase.js.map +0 -1
- package/dist/memory/historyUtils.d.ts +0 -58
- package/dist/memory/historyUtils.d.ts.map +0 -1
- package/dist/memory/historyUtils.js +0 -190
- package/dist/memory/historyUtils.js.map +0 -1
- package/dist/memory/index.d.ts +0 -7
- package/dist/memory/index.d.ts.map +0 -1
- package/dist/memory/index.js +0 -12
- package/dist/memory/index.js.map +0 -1
- package/dist/memory/ingestKnowledgeBase.d.ts +0 -17
- package/dist/memory/ingestKnowledgeBase.d.ts.map +0 -1
- package/dist/memory/ingestKnowledgeBase.js +0 -35
- package/dist/memory/ingestKnowledgeBase.js.map +0 -1
- package/dist/services/MoralisService.d.ts +0 -1328
- package/dist/services/MoralisService.d.ts.map +0 -1
- package/dist/services/MoralisService.js +0 -1239
- package/dist/services/MoralisService.js.map +0 -1
- package/dist/services/PantographService.d.ts +0 -98
- package/dist/services/PantographService.d.ts.map +0 -1
- package/dist/services/PantographService.js +0 -451
- package/dist/services/PantographService.js.map +0 -1
- package/dist/services/PoolService.d.ts +0 -238
- package/dist/services/PoolService.d.ts.map +0 -1
- package/dist/services/PoolService.js +0 -485
- package/dist/services/PoolService.js.map +0 -1
- package/dist/services/UniswapService.d.ts +0 -289
- package/dist/services/UniswapService.d.ts.map +0 -1
- package/dist/services/UniswapService.js +0 -585
- package/dist/services/UniswapService.js.map +0 -1
- package/dist/services/UniswapSubgraphService.d.ts +0 -144
- package/dist/services/UniswapSubgraphService.d.ts.map +0 -1
- package/dist/services/UniswapSubgraphService.js +0 -606
- package/dist/services/UniswapSubgraphService.js.map +0 -1
- package/dist/services/rpc.d.ts +0 -35
- package/dist/services/rpc.d.ts.map +0 -1
- package/dist/services/rpc.js +0 -110
- package/dist/services/rpc.js.map +0 -1
- package/dist/services/swap/BaseSwapService.d.ts +0 -17
- package/dist/services/swap/BaseSwapService.d.ts.map +0 -1
- package/dist/services/swap/BaseSwapService.js +0 -19
- package/dist/services/swap/BaseSwapService.js.map +0 -1
- package/dist/services/swap/DebridgeAdapter.d.ts +0 -37
- package/dist/services/swap/DebridgeAdapter.d.ts.map +0 -1
- package/dist/services/swap/DebridgeAdapter.js +0 -243
- package/dist/services/swap/DebridgeAdapter.js.map +0 -1
- package/dist/services/swap/RelayAdapter.d.ts +0 -19
- package/dist/services/swap/RelayAdapter.d.ts.map +0 -1
- package/dist/services/swap/RelayAdapter.js +0 -189
- package/dist/services/swap/RelayAdapter.js.map +0 -1
- package/dist/services/swap/SwapServiceFactory.d.ts +0 -25
- package/dist/services/swap/SwapServiceFactory.d.ts.map +0 -1
- package/dist/services/swap/SwapServiceFactory.js +0 -79
- package/dist/services/swap/SwapServiceFactory.js.map +0 -1
- package/dist/services/swap/addresses.d.ts +0 -3
- package/dist/services/swap/addresses.d.ts.map +0 -1
- package/dist/services/swap/addresses.js +0 -68
- package/dist/services/swap/addresses.js.map +0 -1
- package/dist/services/swap/affiliate.d.ts +0 -17
- package/dist/services/swap/affiliate.d.ts.map +0 -1
- package/dist/services/swap/affiliate.js +0 -126
- package/dist/services/swap/affiliate.js.map +0 -1
- package/dist/services/swap/config.d.ts +0 -9
- package/dist/services/swap/config.d.ts.map +0 -1
- package/dist/services/swap/config.js +0 -19
- package/dist/services/swap/config.js.map +0 -1
- package/dist/services/swap/index.d.ts +0 -10
- package/dist/services/swap/index.d.ts.map +0 -1
- package/dist/services/swap/index.js +0 -22
- package/dist/services/swap/index.js.map +0 -1
- package/dist/services/swap/types.d.ts +0 -89
- package/dist/services/swap/types.d.ts.map +0 -1
- package/dist/services/swap/types.js +0 -6
- package/dist/services/swap/types.js.map +0 -1
- package/dist/tools/BaseTool.d.ts +0 -15
- package/dist/tools/BaseTool.d.ts.map +0 -1
- package/dist/tools/BaseTool.js +0 -35
- package/dist/tools/BaseTool.js.map +0 -1
- package/dist/tools/ToolRegistry.d.ts +0 -27
- package/dist/tools/ToolRegistry.d.ts.map +0 -1
- package/dist/tools/ToolRegistry.js +0 -80
- package/dist/tools/ToolRegistry.js.map +0 -1
- package/dist/tools/builtin/ai/GeminiSearchAiTool.d.ts +0 -36
- package/dist/tools/builtin/ai/GeminiSearchAiTool.d.ts.map +0 -1
- package/dist/tools/builtin/ai/GeminiSearchAiTool.js +0 -91
- package/dist/tools/builtin/ai/GeminiSearchAiTool.js.map +0 -1
- package/dist/tools/builtin/ai/index.d.ts +0 -3
- package/dist/tools/builtin/ai/index.d.ts.map +0 -1
- package/dist/tools/builtin/ai/index.js +0 -6
- package/dist/tools/builtin/ai/index.js.map +0 -1
- package/dist/tools/builtin/index.d.ts +0 -8
- package/dist/tools/builtin/index.d.ts.map +0 -1
- package/dist/tools/builtin/index.js +0 -24
- package/dist/tools/builtin/index.js.map +0 -1
- package/dist/tools/builtin/nft/BaseNftMessageTool.d.ts +0 -35
- package/dist/tools/builtin/nft/BaseNftMessageTool.d.ts.map +0 -1
- package/dist/tools/builtin/nft/BaseNftMessageTool.js +0 -45
- package/dist/tools/builtin/nft/BaseNftMessageTool.js.map +0 -1
- package/dist/tools/builtin/nft/NFTContractInfoTool.d.ts +0 -15
- package/dist/tools/builtin/nft/NFTContractInfoTool.d.ts.map +0 -1
- package/dist/tools/builtin/nft/NFTContractInfoTool.js +0 -19
- package/dist/tools/builtin/nft/NFTContractInfoTool.js.map +0 -1
- package/dist/tools/builtin/nft/NFTMetadataTool.d.ts +0 -15
- package/dist/tools/builtin/nft/NFTMetadataTool.d.ts.map +0 -1
- package/dist/tools/builtin/nft/NFTMetadataTool.js +0 -20
- package/dist/tools/builtin/nft/NFTMetadataTool.js.map +0 -1
- package/dist/tools/builtin/nft/SendNftTool.d.ts +0 -14
- package/dist/tools/builtin/nft/SendNftTool.d.ts.map +0 -1
- package/dist/tools/builtin/nft/SendNftTool.js +0 -20
- package/dist/tools/builtin/nft/SendNftTool.js.map +0 -1
- package/dist/tools/builtin/nft/WalletNFTsTool.d.ts +0 -15
- package/dist/tools/builtin/nft/WalletNFTsTool.d.ts.map +0 -1
- package/dist/tools/builtin/nft/WalletNFTsTool.js +0 -20
- package/dist/tools/builtin/nft/WalletNFTsTool.js.map +0 -1
- package/dist/tools/builtin/nft/index.d.ts +0 -7
- package/dist/tools/builtin/nft/index.d.ts.map +0 -1
- package/dist/tools/builtin/nft/index.js +0 -10
- package/dist/tools/builtin/nft/index.js.map +0 -1
- package/dist/tools/builtin/pool/EstimatePoolYieldTool.d.ts +0 -124
- package/dist/tools/builtin/pool/EstimatePoolYieldTool.d.ts.map +0 -1
- package/dist/tools/builtin/pool/EstimatePoolYieldTool.js +0 -236
- package/dist/tools/builtin/pool/EstimatePoolYieldTool.js.map +0 -1
- package/dist/tools/builtin/pool/OpenAddLiquidityFormTool.d.ts +0 -128
- package/dist/tools/builtin/pool/OpenAddLiquidityFormTool.d.ts.map +0 -1
- package/dist/tools/builtin/pool/OpenAddLiquidityFormTool.js +0 -520
- package/dist/tools/builtin/pool/OpenAddLiquidityFormTool.js.map +0 -1
- package/dist/tools/builtin/pool/PoolByAddressTool.d.ts +0 -127
- package/dist/tools/builtin/pool/PoolByAddressTool.d.ts.map +0 -1
- package/dist/tools/builtin/pool/PoolByAddressTool.js +0 -238
- package/dist/tools/builtin/pool/PoolByAddressTool.js.map +0 -1
- package/dist/tools/builtin/pool/PoolDetailTool.d.ts +0 -127
- package/dist/tools/builtin/pool/PoolDetailTool.d.ts.map +0 -1
- package/dist/tools/builtin/pool/PoolDetailTool.js +0 -273
- package/dist/tools/builtin/pool/PoolDetailTool.js.map +0 -1
- package/dist/tools/builtin/pool/PoolSearchTool.d.ts +0 -50
- package/dist/tools/builtin/pool/PoolSearchTool.d.ts.map +0 -1
- package/dist/tools/builtin/pool/PoolSearchTool.js +0 -160
- package/dist/tools/builtin/pool/PoolSearchTool.js.map +0 -1
- package/dist/tools/builtin/pool/PreviewAddLiquidityTool.d.ts +0 -124
- package/dist/tools/builtin/pool/PreviewAddLiquidityTool.d.ts.map +0 -1
- package/dist/tools/builtin/pool/PreviewAddLiquidityTool.js +0 -382
- package/dist/tools/builtin/pool/PreviewAddLiquidityTool.js.map +0 -1
- package/dist/tools/builtin/pool/TopPoolsTool.d.ts +0 -68
- package/dist/tools/builtin/pool/TopPoolsTool.d.ts.map +0 -1
- package/dist/tools/builtin/pool/TopPoolsTool.js +0 -159
- package/dist/tools/builtin/pool/TopPoolsTool.js.map +0 -1
- package/dist/tools/builtin/pool/index.d.ts +0 -15
- package/dist/tools/builtin/pool/index.d.ts.map +0 -1
- package/dist/tools/builtin/pool/index.js +0 -18
- package/dist/tools/builtin/pool/index.js.map +0 -1
- package/dist/tools/builtin/pool-subgraph/SubgraphCoinPoolPairsTool.d.ts +0 -54
- package/dist/tools/builtin/pool-subgraph/SubgraphCoinPoolPairsTool.d.ts.map +0 -1
- package/dist/tools/builtin/pool-subgraph/SubgraphCoinPoolPairsTool.js +0 -98
- package/dist/tools/builtin/pool-subgraph/SubgraphCoinPoolPairsTool.js.map +0 -1
- package/dist/tools/builtin/pool-subgraph/SubgraphPoolByAddressTool.d.ts +0 -63
- package/dist/tools/builtin/pool-subgraph/SubgraphPoolByAddressTool.d.ts.map +0 -1
- package/dist/tools/builtin/pool-subgraph/SubgraphPoolByAddressTool.js +0 -82
- package/dist/tools/builtin/pool-subgraph/SubgraphPoolByAddressTool.js.map +0 -1
- package/dist/tools/builtin/pool-subgraph/SubgraphPoolByPositionIdTool.d.ts +0 -79
- package/dist/tools/builtin/pool-subgraph/SubgraphPoolByPositionIdTool.d.ts.map +0 -1
- package/dist/tools/builtin/pool-subgraph/SubgraphPoolByPositionIdTool.js +0 -97
- package/dist/tools/builtin/pool-subgraph/SubgraphPoolByPositionIdTool.js.map +0 -1
- package/dist/tools/builtin/pool-subgraph/SubgraphPoolSearchTool.d.ts +0 -77
- package/dist/tools/builtin/pool-subgraph/SubgraphPoolSearchTool.d.ts.map +0 -1
- package/dist/tools/builtin/pool-subgraph/SubgraphPoolSearchTool.js +0 -190
- package/dist/tools/builtin/pool-subgraph/SubgraphPoolSearchTool.js.map +0 -1
- package/dist/tools/builtin/pool-subgraph/SubgraphPositionDetailTool.d.ts +0 -107
- package/dist/tools/builtin/pool-subgraph/SubgraphPositionDetailTool.d.ts.map +0 -1
- package/dist/tools/builtin/pool-subgraph/SubgraphPositionDetailTool.js +0 -92
- package/dist/tools/builtin/pool-subgraph/SubgraphPositionDetailTool.js.map +0 -1
- package/dist/tools/builtin/pool-subgraph/SubgraphTrendingPoolsTool.d.ts +0 -56
- package/dist/tools/builtin/pool-subgraph/SubgraphTrendingPoolsTool.d.ts.map +0 -1
- package/dist/tools/builtin/pool-subgraph/SubgraphTrendingPoolsTool.js +0 -94
- package/dist/tools/builtin/pool-subgraph/SubgraphTrendingPoolsTool.js.map +0 -1
- package/dist/tools/builtin/pool-subgraph/index.d.ts +0 -13
- package/dist/tools/builtin/pool-subgraph/index.d.ts.map +0 -1
- package/dist/tools/builtin/pool-subgraph/index.js +0 -18
- package/dist/tools/builtin/pool-subgraph/index.js.map +0 -1
- package/dist/tools/builtin/token/TokenAnalyticsTool.d.ts +0 -71
- package/dist/tools/builtin/token/TokenAnalyticsTool.d.ts.map +0 -1
- package/dist/tools/builtin/token/TokenAnalyticsTool.js +0 -147
- package/dist/tools/builtin/token/TokenAnalyticsTool.js.map +0 -1
- package/dist/tools/builtin/token/TokenHoldersTool.d.ts +0 -81
- package/dist/tools/builtin/token/TokenHoldersTool.d.ts.map +0 -1
- package/dist/tools/builtin/token/TokenHoldersTool.js +0 -139
- package/dist/tools/builtin/token/TokenHoldersTool.js.map +0 -1
- package/dist/tools/builtin/token/TokenInfoTool.d.ts +0 -40
- package/dist/tools/builtin/token/TokenInfoTool.d.ts.map +0 -1
- package/dist/tools/builtin/token/TokenInfoTool.js +0 -221
- package/dist/tools/builtin/token/TokenInfoTool.js.map +0 -1
- package/dist/tools/builtin/token/TokenScoreTool.d.ts +0 -63
- package/dist/tools/builtin/token/TokenScoreTool.d.ts.map +0 -1
- package/dist/tools/builtin/token/TokenScoreTool.js +0 -148
- package/dist/tools/builtin/token/TokenScoreTool.js.map +0 -1
- package/dist/tools/builtin/token/TopGainersTool.d.ts +0 -37
- package/dist/tools/builtin/token/TopGainersTool.d.ts.map +0 -1
- package/dist/tools/builtin/token/TopGainersTool.js +0 -100
- package/dist/tools/builtin/token/TopGainersTool.js.map +0 -1
- package/dist/tools/builtin/token/TopLosersTool.d.ts +0 -66
- package/dist/tools/builtin/token/TopLosersTool.d.ts.map +0 -1
- package/dist/tools/builtin/token/TopLosersTool.js +0 -129
- package/dist/tools/builtin/token/TopLosersTool.js.map +0 -1
- package/dist/tools/builtin/token/TrendingTokensTool.d.ts +0 -39
- package/dist/tools/builtin/token/TrendingTokensTool.d.ts.map +0 -1
- package/dist/tools/builtin/token/TrendingTokensTool.js +0 -83
- package/dist/tools/builtin/token/TrendingTokensTool.js.map +0 -1
- package/dist/tools/builtin/token/index.d.ts +0 -13
- package/dist/tools/builtin/token/index.d.ts.map +0 -1
- package/dist/tools/builtin/token/index.js +0 -16
- package/dist/tools/builtin/token/index.js.map +0 -1
- package/dist/tools/builtin/wallet/TransactionByHashTool.d.ts +0 -70
- package/dist/tools/builtin/wallet/TransactionByHashTool.d.ts.map +0 -1
- package/dist/tools/builtin/wallet/TransactionByHashTool.js +0 -111
- package/dist/tools/builtin/wallet/TransactionByHashTool.js.map +0 -1
- package/dist/tools/builtin/wallet/WalletApprovalsTool.d.ts +0 -107
- package/dist/tools/builtin/wallet/WalletApprovalsTool.d.ts.map +0 -1
- package/dist/tools/builtin/wallet/WalletApprovalsTool.js +0 -164
- package/dist/tools/builtin/wallet/WalletApprovalsTool.js.map +0 -1
- package/dist/tools/builtin/wallet/WalletDefiPositionsTool.d.ts +0 -61
- package/dist/tools/builtin/wallet/WalletDefiPositionsTool.d.ts.map +0 -1
- package/dist/tools/builtin/wallet/WalletDefiPositionsTool.js +0 -100
- package/dist/tools/builtin/wallet/WalletDefiPositionsTool.js.map +0 -1
- package/dist/tools/builtin/wallet/WalletDefiProtocolPositionsTool.d.ts +0 -68
- package/dist/tools/builtin/wallet/WalletDefiProtocolPositionsTool.d.ts.map +0 -1
- package/dist/tools/builtin/wallet/WalletDefiProtocolPositionsTool.js +0 -115
- package/dist/tools/builtin/wallet/WalletDefiProtocolPositionsTool.js.map +0 -1
- package/dist/tools/builtin/wallet/WalletDefiSummaryTool.d.ts +0 -50
- package/dist/tools/builtin/wallet/WalletDefiSummaryTool.d.ts.map +0 -1
- package/dist/tools/builtin/wallet/WalletDefiSummaryTool.js +0 -80
- package/dist/tools/builtin/wallet/WalletDefiSummaryTool.js.map +0 -1
- package/dist/tools/builtin/wallet/WalletHistoryTool.d.ts +0 -31
- package/dist/tools/builtin/wallet/WalletHistoryTool.d.ts.map +0 -1
- package/dist/tools/builtin/wallet/WalletHistoryTool.js +0 -154
- package/dist/tools/builtin/wallet/WalletHistoryTool.js.map +0 -1
- package/dist/tools/builtin/wallet/WalletNetWorthTool.d.ts +0 -44
- package/dist/tools/builtin/wallet/WalletNetWorthTool.d.ts.map +0 -1
- package/dist/tools/builtin/wallet/WalletNetWorthTool.js +0 -122
- package/dist/tools/builtin/wallet/WalletNetWorthTool.js.map +0 -1
- package/dist/tools/builtin/wallet/WalletNftTransfersTool.d.ts +0 -86
- package/dist/tools/builtin/wallet/WalletNftTransfersTool.d.ts.map +0 -1
- package/dist/tools/builtin/wallet/WalletNftTransfersTool.js +0 -265
- package/dist/tools/builtin/wallet/WalletNftTransfersTool.js.map +0 -1
- package/dist/tools/builtin/wallet/WalletPnlSummaryTool.d.ts +0 -43
- package/dist/tools/builtin/wallet/WalletPnlSummaryTool.d.ts.map +0 -1
- package/dist/tools/builtin/wallet/WalletPnlSummaryTool.js +0 -89
- package/dist/tools/builtin/wallet/WalletPnlSummaryTool.js.map +0 -1
- package/dist/tools/builtin/wallet/WalletPnlTool.d.ts +0 -43
- package/dist/tools/builtin/wallet/WalletPnlTool.d.ts.map +0 -1
- package/dist/tools/builtin/wallet/WalletPnlTool.js +0 -175
- package/dist/tools/builtin/wallet/WalletPnlTool.js.map +0 -1
- package/dist/tools/builtin/wallet/WalletTokenBalancesTool.d.ts +0 -35
- package/dist/tools/builtin/wallet/WalletTokenBalancesTool.d.ts.map +0 -1
- package/dist/tools/builtin/wallet/WalletTokenBalancesTool.js +0 -68
- package/dist/tools/builtin/wallet/WalletTokenBalancesTool.js.map +0 -1
- package/dist/tools/builtin/wallet/WalletTokenTransfersTool.d.ts +0 -109
- package/dist/tools/builtin/wallet/WalletTokenTransfersTool.d.ts.map +0 -1
- package/dist/tools/builtin/wallet/WalletTokenTransfersTool.js +0 -354
- package/dist/tools/builtin/wallet/WalletTokenTransfersTool.js.map +0 -1
- package/dist/tools/builtin/wallet/index.d.ts +0 -28
- package/dist/tools/builtin/wallet/index.d.ts.map +0 -1
- package/dist/tools/builtin/wallet/index.js +0 -32
- package/dist/tools/builtin/wallet/index.js.map +0 -1
- package/dist/tools/builtin/wallet-action/ApproveTokenTool.d.ts +0 -25
- package/dist/tools/builtin/wallet-action/ApproveTokenTool.d.ts.map +0 -1
- package/dist/tools/builtin/wallet-action/ApproveTokenTool.js +0 -98
- package/dist/tools/builtin/wallet-action/ApproveTokenTool.js.map +0 -1
- package/dist/tools/builtin/wallet-action/BaseWalletActionTool.d.ts +0 -211
- package/dist/tools/builtin/wallet-action/BaseWalletActionTool.d.ts.map +0 -1
- package/dist/tools/builtin/wallet-action/BaseWalletActionTool.js +0 -499
- package/dist/tools/builtin/wallet-action/BaseWalletActionTool.js.map +0 -1
- package/dist/tools/builtin/wallet-action/BuyTokenTool.d.ts +0 -240
- package/dist/tools/builtin/wallet-action/BuyTokenTool.d.ts.map +0 -1
- package/dist/tools/builtin/wallet-action/BuyTokenTool.js +0 -1257
- package/dist/tools/builtin/wallet-action/BuyTokenTool.js.map +0 -1
- package/dist/tools/builtin/wallet-action/SendNativeTool.d.ts +0 -41
- package/dist/tools/builtin/wallet-action/SendNativeTool.d.ts.map +0 -1
- package/dist/tools/builtin/wallet-action/SendNativeTool.js +0 -127
- package/dist/tools/builtin/wallet-action/SendNativeTool.js.map +0 -1
- package/dist/tools/builtin/wallet-action/SendTokenTool.d.ts +0 -63
- package/dist/tools/builtin/wallet-action/SendTokenTool.d.ts.map +0 -1
- package/dist/tools/builtin/wallet-action/SendTokenTool.js +0 -294
- package/dist/tools/builtin/wallet-action/SendTokenTool.js.map +0 -1
- package/dist/tools/builtin/wallet-action/SwapTokenTool.d.ts +0 -247
- package/dist/tools/builtin/wallet-action/SwapTokenTool.d.ts.map +0 -1
- package/dist/tools/builtin/wallet-action/SwapTokenTool.js +0 -1258
- package/dist/tools/builtin/wallet-action/SwapTokenTool.js.map +0 -1
- package/dist/tools/builtin/wallet-action/UnwrapNativeTool.d.ts +0 -20
- package/dist/tools/builtin/wallet-action/UnwrapNativeTool.d.ts.map +0 -1
- package/dist/tools/builtin/wallet-action/UnwrapNativeTool.js +0 -36
- package/dist/tools/builtin/wallet-action/UnwrapNativeTool.js.map +0 -1
- package/dist/tools/builtin/wallet-action/WrapNativeTool.d.ts +0 -23
- package/dist/tools/builtin/wallet-action/WrapNativeTool.d.ts.map +0 -1
- package/dist/tools/builtin/wallet-action/WrapNativeTool.js +0 -54
- package/dist/tools/builtin/wallet-action/WrapNativeTool.js.map +0 -1
- package/dist/tools/builtin/wallet-action/amountSpec.d.ts +0 -62
- package/dist/tools/builtin/wallet-action/amountSpec.d.ts.map +0 -1
- package/dist/tools/builtin/wallet-action/amountSpec.js +0 -93
- package/dist/tools/builtin/wallet-action/amountSpec.js.map +0 -1
- package/dist/tools/builtin/wallet-action/gasReserve.d.ts +0 -42
- package/dist/tools/builtin/wallet-action/gasReserve.d.ts.map +0 -1
- package/dist/tools/builtin/wallet-action/gasReserve.js +0 -103
- package/dist/tools/builtin/wallet-action/gasReserve.js.map +0 -1
- package/dist/tools/builtin/wallet-action/index.d.ts +0 -9
- package/dist/tools/builtin/wallet-action/index.d.ts.map +0 -1
- package/dist/tools/builtin/wallet-action/index.js +0 -20
- package/dist/tools/builtin/wallet-action/index.js.map +0 -1
- package/dist/tools/chainResolver.d.ts +0 -98
- package/dist/tools/chainResolver.d.ts.map +0 -1
- package/dist/tools/chainResolver.js +0 -302
- package/dist/tools/chainResolver.js.map +0 -1
- package/dist/tools/index.d.ts +0 -4
- package/dist/tools/index.d.ts.map +0 -1
- package/dist/tools/index.js +0 -23
- package/dist/tools/index.js.map +0 -1
- package/dist/types/index.d.ts +0 -777
- package/dist/types/index.d.ts.map +0 -1
- package/dist/types/index.js +0 -6
- package/dist/types/index.js.map +0 -1
|
@@ -1,221 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.TokenInfoTool = void 0;
|
|
4
|
-
const BaseTool_1 = require("../../BaseTool");
|
|
5
|
-
const chainResolver_1 = require("../../chainResolver");
|
|
6
|
-
const MoralisService_1 = require("../../../services/MoralisService");
|
|
7
|
-
const GeminiProvider_1 = require("../../../llm/GeminiProvider");
|
|
8
|
-
/**
|
|
9
|
-
* Tool: get-token-info
|
|
10
|
-
*
|
|
11
|
-
* Searches for a token by symbol/name and returns metadata, price,
|
|
12
|
-
* 24h change, and whether the user holds it in their wallet.
|
|
13
|
-
* Combines data from Pantograph search, Moralis metadata, and wallet balances.
|
|
14
|
-
*/
|
|
15
|
-
class TokenInfoTool extends BaseTool_1.BaseTool {
|
|
16
|
-
name = 'get-token-info';
|
|
17
|
-
description = 'Get information about a specific cryptocurrency token: price, metadata, 24h change, market data, and user holdings. ' +
|
|
18
|
-
'Use this when the user asks about: token price, token info, "what is X token", "tell me about X", ' +
|
|
19
|
-
'"how much is X worth", or any token-specific question. ' +
|
|
20
|
-
'Supports: Ethereum, Optimism, BSC, Polygon, Base, Arbitrum, Avalanche, Linea';
|
|
21
|
-
category = 'blockchain-data';
|
|
22
|
-
parameters = [
|
|
23
|
-
{
|
|
24
|
-
name: 'keyword',
|
|
25
|
-
type: 'string',
|
|
26
|
-
description: 'Token symbol, name, or contract address (e.g. "USDC", "Pepe", "ETH", "0x1234…"). ' +
|
|
27
|
-
'If a 0x address is provided, performs a precise contract lookup. Otherwise searches by name/symbol.',
|
|
28
|
-
required: true,
|
|
29
|
-
},
|
|
30
|
-
{
|
|
31
|
-
name: 'chain',
|
|
32
|
-
type: 'string',
|
|
33
|
-
description: 'Hex chain ID: "0x1" Ethereum, "0xa" Optimism, "0x38" BSC, "0x89" Polygon, "0x2105" Base, ' +
|
|
34
|
-
'"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.',
|
|
35
|
-
required: false,
|
|
36
|
-
},
|
|
37
|
-
{
|
|
38
|
-
name: 'prompt',
|
|
39
|
-
type: 'string',
|
|
40
|
-
description: 'A rich, multi-angle research prompt sent to Gemini with Google Search grounding (real-time web access). ' +
|
|
41
|
-
"The prompt must be self-contained — Gemini does NOT see the user's original message, only this prompt. " +
|
|
42
|
-
'ALWAYS include: the token symbol/name, the chain, and an instruction to use web search for up-to-date info. ' +
|
|
43
|
-
'When the user asks an open/broad question (e.g. "show me X", "tell me about X", "what is X"), ' +
|
|
44
|
-
'expand the prompt to cover ALL of these angles in one request: ' +
|
|
45
|
-
'(1) what the token/project is and its core utility, ' +
|
|
46
|
-
'(2) current USD price, 24h change, market cap, FDV, 24h volume, ' +
|
|
47
|
-
'(3) recent news, announcements, or notable events in the last 7-30 days, ' +
|
|
48
|
-
'(4) on-chain activity signals (holders, liquidity, unusual flows), ' +
|
|
49
|
-
'(5) team/protocol updates or roadmap items, ' +
|
|
50
|
-
'(6) key risks, red flags, or controversies, ' +
|
|
51
|
-
'(7) sentiment and notable community discussion. ' +
|
|
52
|
-
'When the user asks a narrow question (e.g. "price of X"), still include 2-3 supporting angles for context. ' +
|
|
53
|
-
'Aim for 3-6 sentences. Be specific to the token. Do not use generic filler. ' +
|
|
54
|
-
'Example for "show me JPYT": "Research the JPYT token on Ethereum using up-to-date web sources. ' +
|
|
55
|
-
'Cover: what JPYT is and who issues it; current USD price, 24h change, market cap, FDV, and 24h volume; ' +
|
|
56
|
-
'recent news or announcements in the last 30 days; on-chain signals such as holder count, liquidity, ' +
|
|
57
|
-
'and unusual volume patterns; team or protocol updates; key risks or red flags; and overall sentiment."',
|
|
58
|
-
required: true,
|
|
59
|
-
},
|
|
60
|
-
{
|
|
61
|
-
name: 'buy_button_label',
|
|
62
|
-
type: 'string',
|
|
63
|
-
description: 'Label for the "Buy" suggestion button shown under the token info, IN THE USER\'S CURRENT LANGUAGE. ' +
|
|
64
|
-
'Use the exact placeholder "{token}" (do not translate the braces) for the token symbol; put the ' +
|
|
65
|
-
'localized verb directly in the text. ' +
|
|
66
|
-
'English example: "Buy {token}". Vietnamese example: "Mua {token}". Japanese example: "{token} を買う". ' +
|
|
67
|
-
'Always include {token}.',
|
|
68
|
-
required: true,
|
|
69
|
-
},
|
|
70
|
-
{
|
|
71
|
-
name: 'buy_prompt_template',
|
|
72
|
-
type: 'string',
|
|
73
|
-
description: 'A short "buy" command IN THE USER\'S CURRENT LANGUAGE, submitted as the next user turn when the Buy button ' +
|
|
74
|
-
'is clicked. Use the exact placeholder "{token}" (do not translate the braces) for the token symbol; put ' +
|
|
75
|
-
'the localized verb directly in the text. ' +
|
|
76
|
-
'English example: "buy {token}". Vietnamese example: "mua {token}". Japanese example: "{token} を買う". ' +
|
|
77
|
-
'Always include {token}.',
|
|
78
|
-
required: true,
|
|
79
|
-
},
|
|
80
|
-
];
|
|
81
|
-
service;
|
|
82
|
-
llm;
|
|
83
|
-
constructor(config) {
|
|
84
|
-
super();
|
|
85
|
-
this.service = new MoralisService_1.MoralisService(config);
|
|
86
|
-
this.llm = new GeminiProvider_1.GeminiProvider({});
|
|
87
|
-
}
|
|
88
|
-
async run(args, userContext) {
|
|
89
|
-
const keyword = args.keyword || '';
|
|
90
|
-
const chain = (0, chainResolver_1.resolveChain)(args.chain, userContext);
|
|
91
|
-
const prompt = args.prompt || '';
|
|
92
|
-
const buyButtonLabel = args.buy_button_label || '';
|
|
93
|
-
const buyPromptTemplate = args.buy_prompt_template || '';
|
|
94
|
-
const walletAddress = userContext?.walletAddress || undefined;
|
|
95
|
-
if (!keyword) {
|
|
96
|
-
return { error: 'Missing required parameter: keyword' };
|
|
97
|
-
}
|
|
98
|
-
return await this.searchToken(keyword, chain, prompt, buyButtonLabel, buyPromptTemplate, walletAddress);
|
|
99
|
-
}
|
|
100
|
-
// Lift `actionButtons` from run() onto the ToolResult so AgentCore renders
|
|
101
|
-
// the Buy suggestion button below the token info.
|
|
102
|
-
async execute(args, userContext) {
|
|
103
|
-
const result = await super.execute(args, userContext);
|
|
104
|
-
const data = result.data;
|
|
105
|
-
if (result.success && data && Array.isArray(data.actionButtons) && data.actionButtons.length > 0) {
|
|
106
|
-
result.actionButtons = data.actionButtons;
|
|
107
|
-
}
|
|
108
|
-
return result;
|
|
109
|
-
}
|
|
110
|
-
async searchToken(keyword, chain, prompt, buyButtonLabel, buyPromptTemplate, walletAddress) {
|
|
111
|
-
const systemPrompt = [
|
|
112
|
-
walletAddress ? `User's connected wallet address: ${walletAddress}` : null,
|
|
113
|
-
chain ? `Current chain (hex chain ID): ${chain}, only consider tokens on this chain` : null,
|
|
114
|
-
'Use this context to personalize your answer where relevant (e.g. whether the user holds the token, chain-specific data).',
|
|
115
|
-
]
|
|
116
|
-
.filter(Boolean)
|
|
117
|
-
.join('\n');
|
|
118
|
-
// Run search, wallet check, and Gemini (with Google Search grounding) in parallel
|
|
119
|
-
const [searchRes, walletHolding, aiText] = await Promise.all([
|
|
120
|
-
this.service.searchTokensByKey({ key: keyword, chain }),
|
|
121
|
-
walletAddress ? this.findTokenInWallet(walletAddress, chain, keyword) : Promise.resolve(null),
|
|
122
|
-
prompt ? this.askGeminiWithSearch(prompt, systemPrompt) : Promise.resolve(null),
|
|
123
|
-
]);
|
|
124
|
-
const list = searchRes.success && searchRes.data ? (Array.isArray(searchRes.data) ? searchRes.data : []) : [];
|
|
125
|
-
const kw = keyword.toLowerCase();
|
|
126
|
-
const isExactMatch = (t) => t.symbol?.toLowerCase() === kw || t.token_address?.toLowerCase() === kw;
|
|
127
|
-
const sortedList = [...list].sort((a, b) => (isExactMatch(a) ? 0 : 1) - (isExactMatch(b) ? 0 : 1));
|
|
128
|
-
// Get Moralis metadata for best match (richer price data)
|
|
129
|
-
let token = null;
|
|
130
|
-
const topResult = sortedList[0];
|
|
131
|
-
if (topResult?.token_address) {
|
|
132
|
-
const metaRes = await this.service.getTokenMetadata({
|
|
133
|
-
address: topResult.token_address,
|
|
134
|
-
chain,
|
|
135
|
-
});
|
|
136
|
-
if (metaRes.success && metaRes.data) {
|
|
137
|
-
token = metaRes.data;
|
|
138
|
-
}
|
|
139
|
-
}
|
|
140
|
-
// Fallback: use search result directly
|
|
141
|
-
if (!token && topResult) {
|
|
142
|
-
token = { ...topResult };
|
|
143
|
-
}
|
|
144
|
-
// Offer a "Buy <token>" suggestion button when a token was resolved. The
|
|
145
|
-
// label/prompt are built from the LLM-supplied, already-localized templates
|
|
146
|
-
// (AgentCore stamps the turn language so a click re-runs in the same one).
|
|
147
|
-
const buySymbol = token?.symbol?.trim();
|
|
148
|
-
const buyButtons = buySymbol
|
|
149
|
-
? [
|
|
150
|
-
{
|
|
151
|
-
label: this.fillTemplate(buyButtonLabel, buySymbol, `Buy {token}`),
|
|
152
|
-
prompt: this.fillTemplate(buyPromptTemplate, buySymbol, `buy {token}`),
|
|
153
|
-
},
|
|
154
|
-
]
|
|
155
|
-
: [];
|
|
156
|
-
const data = {
|
|
157
|
-
_instructions: 'Present the token info in a clear summary. Include: token name & symbol, contract address (shortened), ' +
|
|
158
|
-
'current USD price, 24h price change % (use ▲ for positive, ▼ for negative), market cap, ' +
|
|
159
|
-
'fully diluted valuation, 24h trading volume, liquidity, and holder count (if available). ' +
|
|
160
|
-
'If the user holds this token, prominently show their balance and USD value. ' +
|
|
161
|
-
'If research is present, weave its substance naturally into your answer — fold the relevant points into ' +
|
|
162
|
-
'the description, context, and any notable news or risks. Do NOT add a labelled "AI Analysis" section or ' +
|
|
163
|
-
'any similar heading, and do NOT mention that the analysis came from AI; just write it as part of the ' +
|
|
164
|
-
'token summary. ' +
|
|
165
|
-
'Format numbers in a human-readable way (e.g. $1.23, +5.67%, $12.5M). If a field is null, omit it. ' +
|
|
166
|
-
'A "Buy" button is shown below your reply automatically — do NOT mention it, list it, or repeat its text.',
|
|
167
|
-
chain,
|
|
168
|
-
userHoldsToken: !!walletHolding,
|
|
169
|
-
walletBalance: walletHolding,
|
|
170
|
-
token,
|
|
171
|
-
...(list.length > 1
|
|
172
|
-
? {
|
|
173
|
-
searchResults: sortedList.slice(0, 10),
|
|
174
|
-
}
|
|
175
|
-
: {}),
|
|
176
|
-
research: aiText,
|
|
177
|
-
...(buyButtons.length > 0 ? { actionButtons: buyButtons } : {}),
|
|
178
|
-
};
|
|
179
|
-
return data;
|
|
180
|
-
}
|
|
181
|
-
/** Substitute the {token} placeholder in an LLM-supplied localized template. */
|
|
182
|
-
fillTemplate(template, token, fallback) {
|
|
183
|
-
const tpl = template && template.includes('{token}') ? template : fallback;
|
|
184
|
-
return tpl
|
|
185
|
-
.replace(/\{token\}/g, token)
|
|
186
|
-
.replace(/\s+/g, ' ')
|
|
187
|
-
.trim();
|
|
188
|
-
}
|
|
189
|
-
async askGeminiWithSearch(prompt, systemPrompt) {
|
|
190
|
-
const now = Date.now();
|
|
191
|
-
try {
|
|
192
|
-
const res = await this.llm.chat([
|
|
193
|
-
...(systemPrompt ? [{ role: 'system', content: systemPrompt, timestamp: now }] : []),
|
|
194
|
-
{ role: 'user', content: prompt, timestamp: now },
|
|
195
|
-
], undefined, { googleSearch: true, maxRetries: 1 });
|
|
196
|
-
return res.text?.trim() || null;
|
|
197
|
-
}
|
|
198
|
-
catch {
|
|
199
|
-
return null;
|
|
200
|
-
}
|
|
201
|
-
}
|
|
202
|
-
async findTokenInWallet(walletAddress, chain, keyword) {
|
|
203
|
-
if (!keyword)
|
|
204
|
-
return null;
|
|
205
|
-
const balancesRes = await this.service.getWalletTokenBalances({
|
|
206
|
-
address: walletAddress,
|
|
207
|
-
chain,
|
|
208
|
-
excludeSpam: true,
|
|
209
|
-
excludeUnverifiedContracts: true,
|
|
210
|
-
});
|
|
211
|
-
if (!balancesRes.success || !balancesRes.data?.result)
|
|
212
|
-
return null;
|
|
213
|
-
const kw = keyword.toLowerCase();
|
|
214
|
-
const match = balancesRes.data.result.find((t) => t.token_address.toLowerCase() === kw || t.symbol?.toLowerCase() === kw || t.name?.toLowerCase().includes(kw));
|
|
215
|
-
if (!match)
|
|
216
|
-
return null;
|
|
217
|
-
return match;
|
|
218
|
-
}
|
|
219
|
-
}
|
|
220
|
-
exports.TokenInfoTool = TokenInfoTool;
|
|
221
|
-
//# sourceMappingURL=TokenInfoTool.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"TokenInfoTool.js","sourceRoot":"","sources":["../../../../src/tools/builtin/token/TokenInfoTool.ts"],"names":[],"mappings":";;;AAAA,6CAA0C;AAC1C,uDAAmD;AAGnD,qEAA6F;AAC7F,gEAA6D;AAI7D;;;;;;GAMG;AACH,MAAa,aAAc,SAAQ,mBAAQ;IACzC,IAAI,GAAG,gBAAgB,CAAC;IACxB,WAAW,GACT,sHAAsH;QACtH,oGAAoG;QACpG,yDAAyD;QACzD,8EAA8E,CAAC;IACjF,QAAQ,GAAG,iBAAiB,CAAC;IAC7B,UAAU,GAAoB;QAC5B;YACE,IAAI,EAAE,SAAS;YACf,IAAI,EAAE,QAAQ;YACd,WAAW,EACT,mFAAmF;gBACnF,qGAAqG;YACvG,QAAQ,EAAE,IAAI;SACf;QACD;YACE,IAAI,EAAE,OAAO;YACb,IAAI,EAAE,QAAQ;YACd,WAAW,EACT,2FAA2F;gBAC3F,uKAAuK;YACzK,QAAQ,EAAE,KAAK;SAChB;QACD;YACE,IAAI,EAAE,QAAQ;YACd,IAAI,EAAE,QAAQ;YACd,WAAW,EACT,0GAA0G;gBAC1G,yGAAyG;gBACzG,8GAA8G;gBAC9G,gGAAgG;gBAChG,iEAAiE;gBACjE,sDAAsD;gBACtD,kEAAkE;gBAClE,2EAA2E;gBAC3E,qEAAqE;gBACrE,8CAA8C;gBAC9C,8CAA8C;gBAC9C,kDAAkD;gBAClD,6GAA6G;gBAC7G,8EAA8E;gBAC9E,iGAAiG;gBACjG,yGAAyG;gBACzG,sGAAsG;gBACtG,wGAAwG;YAC1G,QAAQ,EAAE,IAAI;SACf;QACD;YACE,IAAI,EAAE,kBAAkB;YACxB,IAAI,EAAE,QAAQ;YACd,WAAW,EACT,qGAAqG;gBACrG,kGAAkG;gBAClG,uCAAuC;gBACvC,sGAAsG;gBACtG,yBAAyB;YAC3B,QAAQ,EAAE,IAAI;SACf;QACD;YACE,IAAI,EAAE,qBAAqB;YAC3B,IAAI,EAAE,QAAQ;YACd,WAAW,EACT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,IAAI,CAAC,MAAM,CAAC,IAAI,CACxC,CAAC,CAAC,EAAE,EAAE,CACJ,CAAC,CAAC,aAAa,CAAC,WAAW,EAAE,KAAK,EAAE,IAAI,CAAC,CAAC,MAAM,EAAE,WAAW,EAAE,KAAK,EAAE,IAAI,CAAC,CAAC,IAAI,EAAE,WAAW,EAAE,CAAC,QAAQ,CAAC,EAAE,CAAC,CAC/G,CAAC;QAEF,IAAI,CAAC,KAAK;YAAE,OAAO,IAAI,CAAC;QAExB,OAAO,KAAK,CAAC;IACf,CAAC;CACF;AA1PD,sCA0PC"}
|
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
import { BaseTool } from '../../BaseTool';
|
|
2
|
-
import type { ToolParameter, UserContext } from '../../../types';
|
|
3
|
-
import { type MoralisServiceConfig } from '../../../services/MoralisService';
|
|
4
|
-
export type TokenScoreToolConfig = MoralisServiceConfig;
|
|
5
|
-
/**
|
|
6
|
-
* Tool: get-token-score
|
|
7
|
-
*
|
|
8
|
-
* Queries `GET /tokens/{tokenAddress}/score` — a composite 0–100 health/safety
|
|
9
|
-
* score for a single token, plus the underlying metrics Moralis uses to
|
|
10
|
-
* compute it.
|
|
11
|
-
*
|
|
12
|
-
* Returned fields:
|
|
13
|
-
* - score: integer 0–100 (higher = safer / healthier)
|
|
14
|
-
* - updatedAt: ISO timestamp of last refresh
|
|
15
|
-
* - metrics.usdPrice, metrics.liquidityUsd
|
|
16
|
-
* - metrics.volumeUsd: 10m / 30m / 1h / 4h / 12h / 1d / 7d / 30d
|
|
17
|
-
* - metrics.transactions: same 8 buckets
|
|
18
|
-
* - metrics.supply: { total, top10Percent }
|
|
19
|
-
*
|
|
20
|
-
* Accepts either `tokenSymbol` (e.g. "PEPE") or `contractAddress` (0x…).
|
|
21
|
-
* Symbol → address resolution mirrors `TokenAnalyticsTool` / `TokenHoldersTool`:
|
|
22
|
-
* first checks the connected wallet's balances, then falls back to Pantograph
|
|
23
|
-
* search.
|
|
24
|
-
*/
|
|
25
|
-
export declare class TokenScoreTool extends BaseTool {
|
|
26
|
-
name: string;
|
|
27
|
-
description: string;
|
|
28
|
-
category: string;
|
|
29
|
-
parameters: ToolParameter[];
|
|
30
|
-
private service;
|
|
31
|
-
constructor(config?: TokenScoreToolConfig);
|
|
32
|
-
protected run(args: Record<string, unknown>, userContext?: UserContext): Promise<{
|
|
33
|
-
error: string;
|
|
34
|
-
token?: undefined;
|
|
35
|
-
score?: undefined;
|
|
36
|
-
updatedAt?: undefined;
|
|
37
|
-
metrics?: undefined;
|
|
38
|
-
} | {
|
|
39
|
-
token: {
|
|
40
|
-
symbol: string | null;
|
|
41
|
-
name: string | null;
|
|
42
|
-
contractAddress: string;
|
|
43
|
-
chain: string;
|
|
44
|
-
};
|
|
45
|
-
score: number | null;
|
|
46
|
-
updatedAt: string | null;
|
|
47
|
-
metrics: {
|
|
48
|
-
usdPrice: number | null;
|
|
49
|
-
liquidityUsd: number | null;
|
|
50
|
-
volumeUsd: import("../../../services/MoralisService").TokenScoreTimeframeBuckets | null;
|
|
51
|
-
transactions: import("../../../services/MoralisService").TokenScoreTimeframeBuckets | null;
|
|
52
|
-
supply: import("../../../services/MoralisService").TokenScoreSupply | null;
|
|
53
|
-
};
|
|
54
|
-
error?: undefined;
|
|
55
|
-
}>;
|
|
56
|
-
/**
|
|
57
|
-
* Resolve a contract address from a token symbol.
|
|
58
|
-
* 1. Wallet balances (if wallet address available — most reliable)
|
|
59
|
-
* 2. Pantograph token search (fallback)
|
|
60
|
-
*/
|
|
61
|
-
private resolveContractAddress;
|
|
62
|
-
}
|
|
63
|
-
//# sourceMappingURL=TokenScoreTool.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"TokenScoreTool.d.ts","sourceRoot":"","sources":["../../../../src/tools/builtin/token/TokenScoreTool.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,oBAAoB,GAAG,oBAAoB,CAAC;AAExD;;;;;;;;;;;;;;;;;;;GAmBG;AACH,qBAAa,cAAe,SAAQ,QAAQ;IAC1C,IAAI,SAAqB;IACzB,WAAW,SAauE;IAClF,QAAQ,SAAqB;IAC7B,UAAU,EAAE,aAAa,EAAE,CA0BzB;IAEF,OAAO,CAAC,OAAO,CAAiB;gBAEpB,MAAM,CAAC,EAAE,oBAAoB;cAKzB,GAAG,CAAC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,WAAW,CAAC,EAAE,WAAW;;;;;;;;;;;;;;;;;;;;;;;;IA0D5E;;;;OAIG;YACW,sBAAsB;CA4BrC"}
|
|
@@ -1,148 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.TokenScoreTool = 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-score
|
|
9
|
-
*
|
|
10
|
-
* Queries `GET /tokens/{tokenAddress}/score` — a composite 0–100 health/safety
|
|
11
|
-
* score for a single token, plus the underlying metrics Moralis uses to
|
|
12
|
-
* compute it.
|
|
13
|
-
*
|
|
14
|
-
* Returned fields:
|
|
15
|
-
* - score: integer 0–100 (higher = safer / healthier)
|
|
16
|
-
* - updatedAt: ISO timestamp of last refresh
|
|
17
|
-
* - metrics.usdPrice, metrics.liquidityUsd
|
|
18
|
-
* - metrics.volumeUsd: 10m / 30m / 1h / 4h / 12h / 1d / 7d / 30d
|
|
19
|
-
* - metrics.transactions: same 8 buckets
|
|
20
|
-
* - metrics.supply: { total, top10Percent }
|
|
21
|
-
*
|
|
22
|
-
* Accepts either `tokenSymbol` (e.g. "PEPE") or `contractAddress` (0x…).
|
|
23
|
-
* Symbol → address resolution mirrors `TokenAnalyticsTool` / `TokenHoldersTool`:
|
|
24
|
-
* first checks the connected wallet's balances, then falls back to Pantograph
|
|
25
|
-
* search.
|
|
26
|
-
*/
|
|
27
|
-
class TokenScoreTool extends BaseTool_1.BaseTool {
|
|
28
|
-
name = 'get-token-score';
|
|
29
|
-
description = 'Get a composite 0–100 health/safety score for a single ERC-20 token, plus the metrics behind it. ' +
|
|
30
|
-
'Returns: overall score, last-updated timestamp, current USD price, paired liquidity, ' +
|
|
31
|
-
'multi-timeframe volume buckets (10m / 30m / 1h / 4h / 12h / 1d / 7d / 30d), ' +
|
|
32
|
-
'same buckets for transaction counts, and supply info (total supply + % held by top 10 holders). ' +
|
|
33
|
-
'Use tokenSymbol (e.g. "PEPE") to look up by name — the tool auto-resolves the contract address. ' +
|
|
34
|
-
'Use contractAddress when you already have the exact 0x address. ' +
|
|
35
|
-
'Use this tool for questions like: ' +
|
|
36
|
-
'"Is PEPE a safe token?" (tokenSymbol=PEPE → score), ' +
|
|
37
|
-
'"What\'s the health/score of USDC?", ' +
|
|
38
|
-
'"How concentrated is X\'s supply among whales?" (→ metrics.supply.top10Percent), ' +
|
|
39
|
-
'"How much volume did this token do over the last 7 days?" (→ metrics.volumeUsd.7d), ' +
|
|
40
|
-
'"Transaction count for this token in the last hour?" (→ metrics.transactions.1h). ' +
|
|
41
|
-
'Supports: Ethereum, Optimism, BSC, Polygon, Base, Arbitrum, Avalanche, Linea.';
|
|
42
|
-
category = 'blockchain-data';
|
|
43
|
-
parameters = [
|
|
44
|
-
{
|
|
45
|
-
name: 'tokenSymbol',
|
|
46
|
-
type: 'string',
|
|
47
|
-
description: 'Token symbol (e.g. "PEPE", "USDC", "WETH"). ' +
|
|
48
|
-
"The tool resolves the contract address automatically: first checks the connected wallet's balances, " +
|
|
49
|
-
'then searches by symbol. Takes precedence over contractAddress when both are given.',
|
|
50
|
-
required: false,
|
|
51
|
-
},
|
|
52
|
-
{
|
|
53
|
-
name: 'contractAddress',
|
|
54
|
-
type: 'string',
|
|
55
|
-
description: 'ERC-20 token contract address (0x…). Use when the exact address is already known. ' +
|
|
56
|
-
'Ignored if tokenSymbol is provided.',
|
|
57
|
-
required: false,
|
|
58
|
-
},
|
|
59
|
-
{
|
|
60
|
-
name: 'chain',
|
|
61
|
-
type: 'string',
|
|
62
|
-
description: 'Hex chain ID: "0x1" Ethereum, "0xa" Optimism, "0x38" BSC, "0x89" Polygon, "0x2105" Base, ' +
|
|
63
|
-
'"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.',
|
|
64
|
-
required: false,
|
|
65
|
-
},
|
|
66
|
-
];
|
|
67
|
-
service;
|
|
68
|
-
constructor(config) {
|
|
69
|
-
super();
|
|
70
|
-
this.service = new MoralisService_1.MoralisService(config);
|
|
71
|
-
}
|
|
72
|
-
async run(args, userContext) {
|
|
73
|
-
const chain = (0, chainResolver_1.resolveChain)(args.chain, userContext);
|
|
74
|
-
const walletAddress = userContext?.walletAddress || undefined;
|
|
75
|
-
const tokenSymbol = typeof args.tokenSymbol === 'string' && args.tokenSymbol ? args.tokenSymbol.trim() : undefined;
|
|
76
|
-
let contractAddress = typeof args.contractAddress === 'string' && args.contractAddress ? args.contractAddress.trim() : undefined;
|
|
77
|
-
if (!tokenSymbol && !contractAddress) {
|
|
78
|
-
return { error: 'Provide either tokenSymbol (e.g. "PEPE") or contractAddress (0x…).' };
|
|
79
|
-
}
|
|
80
|
-
let resolvedSymbol;
|
|
81
|
-
let resolvedName;
|
|
82
|
-
if (tokenSymbol) {
|
|
83
|
-
const resolved = await this.resolveContractAddress(tokenSymbol, chain, walletAddress);
|
|
84
|
-
if (!resolved) {
|
|
85
|
-
return {
|
|
86
|
-
error: `Cannot resolve token symbol "${tokenSymbol}" to a contract address on chain ${chain ?? 'default'}. Try passing contractAddress directly.`,
|
|
87
|
-
};
|
|
88
|
-
}
|
|
89
|
-
contractAddress = resolved.address;
|
|
90
|
-
resolvedSymbol = resolved.symbol;
|
|
91
|
-
resolvedName = resolved.name;
|
|
92
|
-
}
|
|
93
|
-
const result = await this.service.getTokenScore({
|
|
94
|
-
address: contractAddress,
|
|
95
|
-
chain,
|
|
96
|
-
});
|
|
97
|
-
if (!result.success) {
|
|
98
|
-
return { error: result.error || 'Failed to fetch token score' };
|
|
99
|
-
}
|
|
100
|
-
const data = result.data ?? {};
|
|
101
|
-
const metrics = data.metrics ?? {};
|
|
102
|
-
return {
|
|
103
|
-
token: {
|
|
104
|
-
symbol: resolvedSymbol ?? tokenSymbol ?? null,
|
|
105
|
-
name: resolvedName ?? null,
|
|
106
|
-
contractAddress: contractAddress,
|
|
107
|
-
chain: chain || 'default',
|
|
108
|
-
},
|
|
109
|
-
score: data.score ?? null,
|
|
110
|
-
updatedAt: data.updatedAt ?? null,
|
|
111
|
-
metrics: {
|
|
112
|
-
usdPrice: metrics.usdPrice ?? null,
|
|
113
|
-
liquidityUsd: metrics.liquidityUsd ?? null,
|
|
114
|
-
volumeUsd: metrics.volumeUsd ?? null,
|
|
115
|
-
transactions: metrics.transactions ?? null,
|
|
116
|
-
supply: metrics.supply ?? null,
|
|
117
|
-
},
|
|
118
|
-
};
|
|
119
|
-
}
|
|
120
|
-
/**
|
|
121
|
-
* Resolve a contract address from a token symbol.
|
|
122
|
-
* 1. Wallet balances (if wallet address available — most reliable)
|
|
123
|
-
* 2. Pantograph token search (fallback)
|
|
124
|
-
*/
|
|
125
|
-
async resolveContractAddress(symbol, chain, walletAddress) {
|
|
126
|
-
const symLower = symbol.toLowerCase();
|
|
127
|
-
if (walletAddress) {
|
|
128
|
-
const balRes = await this.service.getWalletTokenBalances({ address: walletAddress, chain });
|
|
129
|
-
if (balRes.success && balRes.data?.result?.length) {
|
|
130
|
-
const match = balRes.data.result.find((t) => (t.symbol ?? '').toLowerCase() === symLower);
|
|
131
|
-
if (match) {
|
|
132
|
-
return { address: match.token_address, symbol: match.symbol, name: match.name };
|
|
133
|
-
}
|
|
134
|
-
}
|
|
135
|
-
}
|
|
136
|
-
const searchRes = await this.service.searchTokensByKey({ key: symbol, chain });
|
|
137
|
-
if (searchRes.success && searchRes.data?.length) {
|
|
138
|
-
const exact = searchRes.data.find((t) => (t.symbol ?? '').toLowerCase() === symLower);
|
|
139
|
-
const candidate = exact ?? searchRes.data[0];
|
|
140
|
-
if (candidate?.token_address) {
|
|
141
|
-
return { address: candidate.token_address, symbol: candidate.symbol, name: candidate.name };
|
|
142
|
-
}
|
|
143
|
-
}
|
|
144
|
-
return undefined;
|
|
145
|
-
}
|
|
146
|
-
}
|
|
147
|
-
exports.TokenScoreTool = TokenScoreTool;
|
|
148
|
-
//# sourceMappingURL=TokenScoreTool.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"TokenScoreTool.js","sourceRoot":"","sources":["../../../../src/tools/builtin/token/TokenScoreTool.ts"],"names":[],"mappings":";;;AAAA,6CAA0C;AAC1C,uDAAmD;AAEnD,qEAA6F;AAI7F;;;;;;;;;;;;;;;;;;;GAmBG;AACH,MAAa,cAAe,SAAQ,mBAAQ;IAC1C,IAAI,GAAG,iBAAiB,CAAC;IACzB,WAAW,GACT,mGAAmG;QACnG,uFAAuF;QACvF,8EAA8E;QAC9E,kGAAkG;QAClG,kGAAkG;QAClG,kEAAkE;QAClE,oCAAoC;QACpC,sDAAsD;QACtD,uCAAuC;QACvC,mFAAmF;QACnF,sFAAsF;QACtF,oFAAoF;QACpF,+EAA+E,CAAC;IAClF,QAAQ,GAAG,iBAAiB,CAAC;IAC7B,UAAU,GAAoB;QAC5B;YACE,IAAI,EAAE,aAAa;YACnB,IAAI,EAAE,QAAQ;YACd,WAAW,EACT,8CAA8C;gBAC9C,sGAAsG;gBACtG,qFAAqF;YACvF,QAAQ,EAAE,KAAK;SAChB;QAC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C;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;AA/ID,wCA+IC"}
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
import { BaseTool } from '../../BaseTool';
|
|
2
|
-
import type { ToolParameter, UserContext } from '../../../types';
|
|
3
|
-
import type { MoralisServiceConfig } from '../../../services/MoralisService';
|
|
4
|
-
export type TopGainersToolConfig = MoralisServiceConfig;
|
|
5
|
-
/**
|
|
6
|
-
* Tool: get-top-gainers
|
|
7
|
-
*
|
|
8
|
-
* Queries Pantograph's `GET /token-list/top-gainers/{chain}?duration=…` — the
|
|
9
|
-
* tokens with the largest USD price increase over a chosen window. Single-chain
|
|
10
|
-
* (Pantograph has no cross-chain feed); defaults to the connected chain, then
|
|
11
|
-
* Base. Returns the canonical trending-token shape: price, market cap, 24h
|
|
12
|
-
* volume, and the price change over the selected window.
|
|
13
|
-
*/
|
|
14
|
-
export declare class TopGainersTool extends BaseTool {
|
|
15
|
-
name: string;
|
|
16
|
-
description: string;
|
|
17
|
-
category: string;
|
|
18
|
-
parameters: ToolParameter[];
|
|
19
|
-
private service;
|
|
20
|
-
constructor(config?: TopGainersToolConfig);
|
|
21
|
-
protected run(args: Record<string, unknown>, userContext?: UserContext): Promise<{
|
|
22
|
-
error: string;
|
|
23
|
-
_instructions?: undefined;
|
|
24
|
-
chain?: undefined;
|
|
25
|
-
timeFrame?: undefined;
|
|
26
|
-
count?: undefined;
|
|
27
|
-
tokens?: undefined;
|
|
28
|
-
} | {
|
|
29
|
-
_instructions: string;
|
|
30
|
-
chain: string;
|
|
31
|
-
timeFrame: string | null;
|
|
32
|
-
count: number;
|
|
33
|
-
tokens: import("../../../services/MoralisService").TrendingToken[];
|
|
34
|
-
error?: undefined;
|
|
35
|
-
}>;
|
|
36
|
-
}
|
|
37
|
-
//# sourceMappingURL=TopGainersTool.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"TopGainersTool.d.ts","sourceRoot":"","sources":["../../../../src/tools/builtin/token/TopGainersTool.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAE1C,OAAO,KAAK,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AACjE,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,kCAAkC,CAAC;AAG7E,MAAM,MAAM,oBAAoB,GAAG,oBAAoB,CAAC;AAWxD;;;;;;;;GAQG;AACH,qBAAa,cAAe,SAAQ,QAAQ;IAC1C,IAAI,SAAqB;IACzB,WAAW,SAOuE;IAClF,QAAQ,SAAqB;IAC7B,UAAU,EAAE,aAAa,EAAE,CA0BzB;IAEF,OAAO,CAAC,OAAO,CAAoB;gBAEvB,MAAM,CAAC,EAAE,oBAAoB;cAKzB,GAAG,CAAC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,WAAW,CAAC,EAAE,WAAW;;;;;;;;;;;;;;;CA2C7E"}
|
|
@@ -1,100 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.TopGainersTool = void 0;
|
|
4
|
-
const BaseTool_1 = require("../../BaseTool");
|
|
5
|
-
const chainResolver_1 = require("../../chainResolver");
|
|
6
|
-
const PantographService_1 = require("../../../services/PantographService");
|
|
7
|
-
/** Maps the user-facing timeframe to a Pantograph `duration` window. */
|
|
8
|
-
const TIMEFRAME_TO_DURATION = {
|
|
9
|
-
'1h': '1h',
|
|
10
|
-
'1d': '24h',
|
|
11
|
-
'1w': '7d',
|
|
12
|
-
'1M': '30d',
|
|
13
|
-
};
|
|
14
|
-
const ALLOWED_TIMEFRAMES = Object.keys(TIMEFRAME_TO_DURATION);
|
|
15
|
-
/**
|
|
16
|
-
* Tool: get-top-gainers
|
|
17
|
-
*
|
|
18
|
-
* Queries Pantograph's `GET /token-list/top-gainers/{chain}?duration=…` — the
|
|
19
|
-
* tokens with the largest USD price increase over a chosen window. Single-chain
|
|
20
|
-
* (Pantograph has no cross-chain feed); defaults to the connected chain, then
|
|
21
|
-
* Base. Returns the canonical trending-token shape: price, market cap, 24h
|
|
22
|
-
* volume, and the price change over the selected window.
|
|
23
|
-
*/
|
|
24
|
-
class TopGainersTool extends BaseTool_1.BaseTool {
|
|
25
|
-
name = 'get-top-gainers';
|
|
26
|
-
description = 'List tokens with the highest USD price increase over a chosen timeframe (1h / 1d / 1w / 1M). ' +
|
|
27
|
-
'Returns name & symbol, current USD price, market cap, 24h volume, and the price change % over the selected window. ' +
|
|
28
|
-
'Scoped to a single chain — pass `chain` to pick the network, otherwise the connected chain (or Base) is used. ' +
|
|
29
|
-
'Use this tool for questions like: ' +
|
|
30
|
-
'"What are today\'s top gainers?", "Biggest pumps this week?", "Which tokens went up most in the last hour?", ' +
|
|
31
|
-
'"Top gainers on Base". ' +
|
|
32
|
-
'Supports: Ethereum, Optimism, BSC, Polygon, Base, Arbitrum, Avalanche, Linea.';
|
|
33
|
-
category = 'blockchain-data';
|
|
34
|
-
parameters = [
|
|
35
|
-
{
|
|
36
|
-
name: 'chain',
|
|
37
|
-
type: 'string',
|
|
38
|
-
description: 'Hex chain ID: "0x1" Ethereum, "0xa" Optimism, "0x38" BSC, "0x89" Polygon, "0x2105" Base, ' +
|
|
39
|
-
'"0xa4b1" Arbitrum, "0xa86a" Avalanche, "0xe708" Linea. Defaults to the connected chain, or Base (0x2105).',
|
|
40
|
-
required: false,
|
|
41
|
-
},
|
|
42
|
-
{
|
|
43
|
-
name: 'timeFrame',
|
|
44
|
-
type: 'string',
|
|
45
|
-
description: 'Window over which the price change is measured. Allowed values: ' +
|
|
46
|
-
'"1h" (last hour), "1d" (last 24h), "1w" (last 7 days), "1M" (last 30 days). ' +
|
|
47
|
-
'Pick the timeframe that matches the user\'s question — e.g. "today" → "1d", "this week" → "1w". Defaults to "1d".',
|
|
48
|
-
required: false,
|
|
49
|
-
},
|
|
50
|
-
{
|
|
51
|
-
name: 'limit',
|
|
52
|
-
type: 'number',
|
|
53
|
-
description: 'Number of top gainers to return. Only set this when the user asks for a specific count ' +
|
|
54
|
-
'(e.g. "show 20 top gainers" → 20). Omit otherwise.',
|
|
55
|
-
required: false,
|
|
56
|
-
},
|
|
57
|
-
];
|
|
58
|
-
service;
|
|
59
|
-
constructor(config) {
|
|
60
|
-
super();
|
|
61
|
-
this.service = new PantographService_1.PantographService({ baseUrl: config?.pantographUrl });
|
|
62
|
-
}
|
|
63
|
-
async run(args, userContext) {
|
|
64
|
-
const chain = (0, chainResolver_1.resolveChainScope)(args.chain, userContext);
|
|
65
|
-
const rawTimeFrame = typeof args.timeFrame === 'string' ? args.timeFrame.trim() : undefined;
|
|
66
|
-
if (rawTimeFrame && !ALLOWED_TIMEFRAMES.includes(rawTimeFrame)) {
|
|
67
|
-
return {
|
|
68
|
-
error: `Invalid timeFrame "${rawTimeFrame}". Allowed values: ${ALLOWED_TIMEFRAMES.join(', ')}.`,
|
|
69
|
-
};
|
|
70
|
-
}
|
|
71
|
-
const timeFrame = rawTimeFrame || undefined;
|
|
72
|
-
const duration = timeFrame ? TIMEFRAME_TO_DURATION[timeFrame] : undefined;
|
|
73
|
-
const limit = typeof args.limit === 'number' && Number.isFinite(args.limit) && args.limit > 0
|
|
74
|
-
? Math.floor(args.limit)
|
|
75
|
-
: undefined;
|
|
76
|
-
const result = await this.service.getTopGainers({ chain, limit, duration });
|
|
77
|
-
if (!result.success) {
|
|
78
|
-
return { error: result.error || 'Failed to fetch top gainers' };
|
|
79
|
-
}
|
|
80
|
-
const tokens = result.data ?? [];
|
|
81
|
-
return {
|
|
82
|
-
_instructions: 'Start with a one-line header like "Here are the top gainers on <chain name> right now:". ' +
|
|
83
|
-
'Then present the tokens as a numbered list. For EACH token render exactly these lines (omit any line whose value is null):\n' +
|
|
84
|
-
'<rank>. <name> (<symbol>)\n' +
|
|
85
|
-
'- Price: <usdPrice>\n' +
|
|
86
|
-
'- Market Cap: <marketCap>\n' +
|
|
87
|
-
'- Price Change: <pricePercentChange.24h> (use ▲ for positive, ▼ for negative)\n' +
|
|
88
|
-
'- 24h Volume: <totalVolume.24h>\n' +
|
|
89
|
-
'Format numbers human-readably: price as $0.65 / $0.016 (more decimals for sub-cent), ' +
|
|
90
|
-
'market cap & volume compact ($12.8M, $6,474), price change signed with one or two decimals (+5.67%, -1.6%). ' +
|
|
91
|
-
"Reply in the user's language and use the human-readable chain name. Do NOT mention tool names, UI, or forms.",
|
|
92
|
-
chain: chain ?? 'all',
|
|
93
|
-
timeFrame: timeFrame ?? null,
|
|
94
|
-
count: tokens.length,
|
|
95
|
-
tokens: tokens,
|
|
96
|
-
};
|
|
97
|
-
}
|
|
98
|
-
}
|
|
99
|
-
exports.TopGainersTool = TopGainersTool;
|
|
100
|
-
//# sourceMappingURL=TopGainersTool.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"TopGainersTool.js","sourceRoot":"","sources":["../../../../src/tools/builtin/token/TopGainersTool.ts"],"names":[],"mappings":";;;AAAA,6CAA0C;AAC1C,uDAAwD;AAGxD,2EAAwE;AAIxE,wEAAwE;AACxE,MAAM,qBAAqB,GAA2B;IACpD,IAAI,EAAE,IAAI;IACV,IAAI,EAAE,KAAK;IACX,IAAI,EAAE,IAAI;IACV,IAAI,EAAE,KAAK;CACZ,CAAC;AACF,MAAM,kBAAkB,GAAG,MAAM,CAAC,IAAI,CAAC,qBAAqB,CAAC,CAAC;AAE9D;;;;;;;;GAQG;AACH,MAAa,cAAe,SAAQ,mBAAQ;IAC1C,IAAI,GAAG,iBAAiB,CAAC;IACzB,WAAW,GACT,+FAA+F;QAC/F,qHAAqH;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