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 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/tools/builtin/pool/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,YAAY,EAAE,kBAAkB,EAAE,MAAM,gBAAgB,CAAC;AACzD,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,YAAY,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAC;AAC7D,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,YAAY,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAC;AAC7D,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACxD,YAAY,EAAE,uBAAuB,EAAE,MAAM,qBAAqB,CAAC;AACnE,OAAO,EAAE,wBAAwB,EAAE,MAAM,4BAA4B,CAAC;AACtE,YAAY,EAAE,8BAA8B,EAAE,MAAM,4BAA4B,CAAC;AACjF,OAAO,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AACpE,YAAY,EAAE,6BAA6B,EAAE,MAAM,2BAA2B,CAAC;AAC/E,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAChE,YAAY,EAAE,2BAA2B,EAAE,MAAM,yBAAyB,CAAC"}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.EstimatePoolYieldTool = exports.PreviewAddLiquidityTool = exports.OpenAddLiquidityFormTool = exports.PoolByAddressTool = exports.PoolSearchTool = exports.PoolDetailTool = exports.TopPoolsTool = void 0;
|
|
4
|
-
var TopPoolsTool_1 = require("./TopPoolsTool");
|
|
5
|
-
Object.defineProperty(exports, "TopPoolsTool", { enumerable: true, get: function () { return TopPoolsTool_1.TopPoolsTool; } });
|
|
6
|
-
var PoolDetailTool_1 = require("./PoolDetailTool");
|
|
7
|
-
Object.defineProperty(exports, "PoolDetailTool", { enumerable: true, get: function () { return PoolDetailTool_1.PoolDetailTool; } });
|
|
8
|
-
var PoolSearchTool_1 = require("./PoolSearchTool");
|
|
9
|
-
Object.defineProperty(exports, "PoolSearchTool", { enumerable: true, get: function () { return PoolSearchTool_1.PoolSearchTool; } });
|
|
10
|
-
var PoolByAddressTool_1 = require("./PoolByAddressTool");
|
|
11
|
-
Object.defineProperty(exports, "PoolByAddressTool", { enumerable: true, get: function () { return PoolByAddressTool_1.PoolByAddressTool; } });
|
|
12
|
-
var OpenAddLiquidityFormTool_1 = require("./OpenAddLiquidityFormTool");
|
|
13
|
-
Object.defineProperty(exports, "OpenAddLiquidityFormTool", { enumerable: true, get: function () { return OpenAddLiquidityFormTool_1.OpenAddLiquidityFormTool; } });
|
|
14
|
-
var PreviewAddLiquidityTool_1 = require("./PreviewAddLiquidityTool");
|
|
15
|
-
Object.defineProperty(exports, "PreviewAddLiquidityTool", { enumerable: true, get: function () { return PreviewAddLiquidityTool_1.PreviewAddLiquidityTool; } });
|
|
16
|
-
var EstimatePoolYieldTool_1 = require("./EstimatePoolYieldTool");
|
|
17
|
-
Object.defineProperty(exports, "EstimatePoolYieldTool", { enumerable: true, get: function () { return EstimatePoolYieldTool_1.EstimatePoolYieldTool; } });
|
|
18
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/tools/builtin/pool/index.ts"],"names":[],"mappings":";;;AAAA,+CAA8C;AAArC,4GAAA,YAAY,OAAA;AAErB,mDAAkD;AAAzC,gHAAA,cAAc,OAAA;AAEvB,mDAAkD;AAAzC,gHAAA,cAAc,OAAA;AAEvB,yDAAwD;AAA/C,sHAAA,iBAAiB,OAAA;AAE1B,uEAAsE;AAA7D,oIAAA,wBAAwB,OAAA;AAEjC,qEAAoE;AAA3D,kIAAA,uBAAuB,OAAA;AAEhC,iEAAgE;AAAvD,8HAAA,qBAAqB,OAAA"}
|
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
import { BaseTool } from '../../BaseTool';
|
|
2
|
-
import type { ToolParameter, UserContext } from '../../../types';
|
|
3
|
-
import { type SubgraphServiceConfig } from '../../../services/UniswapSubgraphService';
|
|
4
|
-
export type SubgraphCoinPoolPairsToolConfig = SubgraphServiceConfig;
|
|
5
|
-
/**
|
|
6
|
-
* Tool: subgraph-coinpool-pairs
|
|
7
|
-
*
|
|
8
|
-
* Returns concentrated-liquidity price-range candidates from the CoinPool
|
|
9
|
-
* platform for a given token pair on a chain. Each entry is a SPECIFIC
|
|
10
|
-
* price range with its own APR (NOT the overall pool APR). Use when the
|
|
11
|
-
* user asks about price ranges, "which range to pick", or "best range"
|
|
12
|
-
* for a known token pair.
|
|
13
|
-
*
|
|
14
|
-
* Requires both `coinPoolBaseUrl` and `keyringPoolBaseUrl` to be set in
|
|
15
|
-
* SubgraphServiceConfig — otherwise the tool returns an empty list.
|
|
16
|
-
*/
|
|
17
|
-
export declare class SubgraphCoinPoolPairsTool extends BaseTool {
|
|
18
|
-
name: string;
|
|
19
|
-
description: string;
|
|
20
|
-
category: string;
|
|
21
|
-
noSuggestions: boolean;
|
|
22
|
-
parameters: ToolParameter[];
|
|
23
|
-
private service;
|
|
24
|
-
constructor(config?: SubgraphCoinPoolPairsToolConfig);
|
|
25
|
-
protected run(args: Record<string, unknown>, userContext?: UserContext): Promise<{
|
|
26
|
-
error: string;
|
|
27
|
-
_instructions?: undefined;
|
|
28
|
-
unsupportedChains?: undefined;
|
|
29
|
-
supportedChains?: undefined;
|
|
30
|
-
tokens?: undefined;
|
|
31
|
-
chain?: undefined;
|
|
32
|
-
count?: undefined;
|
|
33
|
-
pairs?: undefined;
|
|
34
|
-
} | {
|
|
35
|
-
_instructions: string;
|
|
36
|
-
unsupportedChains: string[];
|
|
37
|
-
supportedChains: string[];
|
|
38
|
-
error?: undefined;
|
|
39
|
-
tokens?: undefined;
|
|
40
|
-
chain?: undefined;
|
|
41
|
-
count?: undefined;
|
|
42
|
-
pairs?: undefined;
|
|
43
|
-
} | {
|
|
44
|
-
_instructions: string;
|
|
45
|
-
tokens: string[];
|
|
46
|
-
chain: string;
|
|
47
|
-
count: number;
|
|
48
|
-
pairs: import("../../../services/UniswapSubgraphService").CoinPoolPairSummary[];
|
|
49
|
-
error?: undefined;
|
|
50
|
-
unsupportedChains?: undefined;
|
|
51
|
-
supportedChains?: undefined;
|
|
52
|
-
}>;
|
|
53
|
-
}
|
|
54
|
-
//# sourceMappingURL=SubgraphCoinPoolPairsTool.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"SubgraphCoinPoolPairsTool.d.ts","sourceRoot":"","sources":["../../../../src/tools/builtin/pool-subgraph/SubgraphCoinPoolPairsTool.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAC1C,OAAO,KAAK,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AACjE,OAAO,EAA0B,KAAK,qBAAqB,EAAE,MAAM,0CAA0C,CAAC;AAE9G,MAAM,MAAM,+BAA+B,GAAG,qBAAqB,CAAC;AAEpE;;;;;;;;;;;GAWG;AACH,qBAAa,yBAA0B,SAAQ,QAAQ;IACrD,IAAI,SAA6B;IACjC,WAAW,SAM+E;IAC1F,QAAQ,SAAqB;IAC7B,aAAa,UAAQ;IACrB,UAAU,EAAE,aAAa,EAAE,CAuBzB;IAEF,OAAO,CAAC,OAAO,CAAyB;gBAE5B,MAAM,CAAC,EAAE,+BAA+B;cAKpC,GAAG,CAAC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,WAAW,CAAC,EAAE,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAgD7E"}
|
|
@@ -1,98 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.SubgraphCoinPoolPairsTool = void 0;
|
|
4
|
-
const BaseTool_1 = require("../../BaseTool");
|
|
5
|
-
const UniswapSubgraphService_1 = require("../../../services/UniswapSubgraphService");
|
|
6
|
-
/**
|
|
7
|
-
* Tool: subgraph-coinpool-pairs
|
|
8
|
-
*
|
|
9
|
-
* Returns concentrated-liquidity price-range candidates from the CoinPool
|
|
10
|
-
* platform for a given token pair on a chain. Each entry is a SPECIFIC
|
|
11
|
-
* price range with its own APR (NOT the overall pool APR). Use when the
|
|
12
|
-
* user asks about price ranges, "which range to pick", or "best range"
|
|
13
|
-
* for a known token pair.
|
|
14
|
-
*
|
|
15
|
-
* Requires both `coinPoolBaseUrl` and `keyringPoolBaseUrl` to be set in
|
|
16
|
-
* SubgraphServiceConfig — otherwise the tool returns an empty list.
|
|
17
|
-
*/
|
|
18
|
-
class SubgraphCoinPoolPairsTool extends BaseTool_1.BaseTool {
|
|
19
|
-
name = 'subgraph-coinpool-pairs';
|
|
20
|
-
description = 'List CoinPool concentrated-liquidity price-range candidates for a token pair on a chain. ' +
|
|
21
|
-
'Each entry shows: pair, fee tier, min/max price range, current price, and APR within that range ' +
|
|
22
|
-
'(NOT the overall pool APR — strictly per-range). ' +
|
|
23
|
-
'Use ONLY for queries about price ranges or which range to pick: "what price range should I use for ETH/USDC?", ' +
|
|
24
|
-
'"best range for USDC/WETH on Arbitrum", "gợi ý khoảng giá ETH/USDC". ' +
|
|
25
|
-
'Do NOT use for general "show me ETH/USDC pools" — use subgraph-search-pools for that.';
|
|
26
|
-
category = 'blockchain-data';
|
|
27
|
-
noSuggestions = true;
|
|
28
|
-
parameters = [
|
|
29
|
-
{
|
|
30
|
-
name: 'tokens',
|
|
31
|
-
type: 'array',
|
|
32
|
-
items: { type: 'string' },
|
|
33
|
-
description: 'Two token symbols (e.g. ["ETH","USDC"]).',
|
|
34
|
-
required: true,
|
|
35
|
-
},
|
|
36
|
-
{
|
|
37
|
-
name: 'chain',
|
|
38
|
-
type: 'string',
|
|
39
|
-
description: 'Hex chain ID: "0x1" Ethereum, "0xa" Optimism, "0x38" BSC, "0x89" Polygon, "0x2105" Base, "0xa4b1" Arbitrum, "0xa86a" Avalanche. ' +
|
|
40
|
-
'Defaults to the connected chain when omitted.',
|
|
41
|
-
required: false,
|
|
42
|
-
},
|
|
43
|
-
{
|
|
44
|
-
name: 'limit',
|
|
45
|
-
type: 'number',
|
|
46
|
-
description: 'Max entries to return (sorted by APR desc). Default 10.',
|
|
47
|
-
required: false,
|
|
48
|
-
default: 10,
|
|
49
|
-
},
|
|
50
|
-
];
|
|
51
|
-
service;
|
|
52
|
-
constructor(config) {
|
|
53
|
-
super();
|
|
54
|
-
this.service = new UniswapSubgraphService_1.UniswapSubgraphService(config);
|
|
55
|
-
}
|
|
56
|
-
async run(args, userContext) {
|
|
57
|
-
const tokens = (Array.isArray(args.tokens) ? args.tokens : [])
|
|
58
|
-
.filter((t) => typeof t === 'string' && t.trim().length > 0)
|
|
59
|
-
.map((t) => t.trim().toUpperCase());
|
|
60
|
-
if (tokens.length < 2) {
|
|
61
|
-
return { error: 'tokens must contain two token symbols (e.g. ["ETH","USDC"]).' };
|
|
62
|
-
}
|
|
63
|
-
const chainArg = typeof args.chain === 'string' && args.chain.trim() ? args.chain.trim() : userContext?.chain || '0x1';
|
|
64
|
-
if (!this.service.isSupported(chainArg)) {
|
|
65
|
-
return {
|
|
66
|
-
_instructions: 'Requested chain not supported. Mention supported chains.',
|
|
67
|
-
unsupportedChains: [chainArg],
|
|
68
|
-
supportedChains: this.service.listSupportedChains(),
|
|
69
|
-
};
|
|
70
|
-
}
|
|
71
|
-
const chain = this.service.resolveChain(chainArg);
|
|
72
|
-
const limit = typeof args.limit === 'number' && Number.isFinite(args.limit) && args.limit > 0
|
|
73
|
-
? Math.min(Math.floor(args.limit), 30)
|
|
74
|
-
: 10;
|
|
75
|
-
const pairs = await this.service.getCoinPoolPairs({ chain, tokens });
|
|
76
|
-
if (pairs.length === 0) {
|
|
77
|
-
return {
|
|
78
|
-
_instructions: 'No CoinPool range data is available for this pair on this chain. Tell the user this nicely and suggest using general pool data instead (via subgraph-search-pools).',
|
|
79
|
-
tokens,
|
|
80
|
-
chain,
|
|
81
|
-
pairs: [],
|
|
82
|
-
count: 0,
|
|
83
|
-
};
|
|
84
|
-
}
|
|
85
|
-
const sorted = [...pairs].sort((a, b) => (b.apr ?? -Infinity) - (a.apr ?? -Infinity)).slice(0, limit);
|
|
86
|
-
return {
|
|
87
|
-
_instructions: 'CRITICAL: APR in each entry is the APR for that SPECIFIC price range only — NEVER present it as the overall pool APR. ' +
|
|
88
|
-
'Always show the min–max price together with the APR, e.g. "APR X% (range: 1800 – 2200 ETH/USDC)". ' +
|
|
89
|
-
'Sort by APR descending; explain that the top entry is the best concentrated range but narrower = higher out-of-range risk.',
|
|
90
|
-
tokens,
|
|
91
|
-
chain,
|
|
92
|
-
count: sorted.length,
|
|
93
|
-
pairs: sorted,
|
|
94
|
-
};
|
|
95
|
-
}
|
|
96
|
-
}
|
|
97
|
-
exports.SubgraphCoinPoolPairsTool = SubgraphCoinPoolPairsTool;
|
|
98
|
-
//# sourceMappingURL=SubgraphCoinPoolPairsTool.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"SubgraphCoinPoolPairsTool.js","sourceRoot":"","sources":["../../../../src/tools/builtin/pool-subgraph/SubgraphCoinPoolPairsTool.ts"],"names":[],"mappings":";;;AAAA,6CAA0C;AAE1C,qFAA8G;AAI9G;;;;;;;;;;;GAWG;AACH,MAAa,yBAA0B,SAAQ,mBAAQ;IACrD,IAAI,GAAG,yBAAyB,CAAC;IACjC,WAAW,GACT,2FAA2F;QAC3F,kGAAkG;QAClG,mDAAmD;QACnD,iHAAiH;QACjH,uEAAuE;QACvE,uFAAuF,CAAC;IAC1F,QAAQ,GAAG,iBAAiB,CAAC;IAC7B,aAAa,GAAG,IAAI,CAAC;IACrB,UAAU,GAAoB;QAC5B;YACE,IAAI,EAAE,QAAQ;YACd,IAAI,EAAE,OAAO;YACb,KAAK,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;YACzB,WAAW,EAAE,0CAA0C;YACvD,QAAQ,EAAE,IAAI;SACf;QACD;YACE,IAAI,EAAE,OAAO;YACb,IAAI,EAAE,QAAQ;YACd,WAAW,EACT,kIAAkI;g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
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
import { BaseTool } from '../../BaseTool';
|
|
2
|
-
import type { ToolParameter, UserContext } from '../../../types';
|
|
3
|
-
import { type SubgraphServiceConfig } from '../../../services/UniswapSubgraphService';
|
|
4
|
-
export type SubgraphPoolByAddressToolConfig = SubgraphServiceConfig;
|
|
5
|
-
/**
|
|
6
|
-
* Tool: subgraph-pool-by-address
|
|
7
|
-
*
|
|
8
|
-
* Fetch a single Uniswap V3 pool by its on-chain address. Maps to intent
|
|
9
|
-
* `pool_detail` when the parser extracts a 0x-prefixed pool address.
|
|
10
|
-
*/
|
|
11
|
-
export declare class SubgraphPoolByAddressTool extends BaseTool {
|
|
12
|
-
name: string;
|
|
13
|
-
description: string;
|
|
14
|
-
category: string;
|
|
15
|
-
noSuggestions: boolean;
|
|
16
|
-
parameters: ToolParameter[];
|
|
17
|
-
private service;
|
|
18
|
-
constructor(config?: SubgraphPoolByAddressToolConfig);
|
|
19
|
-
protected run(args: Record<string, unknown>, userContext?: UserContext): Promise<{
|
|
20
|
-
error: string;
|
|
21
|
-
_instructions?: undefined;
|
|
22
|
-
unsupportedChains?: undefined;
|
|
23
|
-
supportedChains?: undefined;
|
|
24
|
-
chain?: undefined;
|
|
25
|
-
pool?: undefined;
|
|
26
|
-
} | {
|
|
27
|
-
_instructions: string;
|
|
28
|
-
unsupportedChains: string[];
|
|
29
|
-
supportedChains: string[];
|
|
30
|
-
error?: undefined;
|
|
31
|
-
chain?: undefined;
|
|
32
|
-
pool?: undefined;
|
|
33
|
-
} | {
|
|
34
|
-
_instructions: string;
|
|
35
|
-
chain: string;
|
|
36
|
-
pool: {
|
|
37
|
-
pair: string;
|
|
38
|
-
poolAddress: string;
|
|
39
|
-
chain: string;
|
|
40
|
-
feeTierBps: number;
|
|
41
|
-
feeTierPercent: number;
|
|
42
|
-
tvlUsd: number;
|
|
43
|
-
volume24hUsd: number;
|
|
44
|
-
fees24hUsd: number;
|
|
45
|
-
apr: number | null;
|
|
46
|
-
token0: {
|
|
47
|
-
symbol: string;
|
|
48
|
-
address: string;
|
|
49
|
-
name?: string;
|
|
50
|
-
};
|
|
51
|
-
token1: {
|
|
52
|
-
symbol: string;
|
|
53
|
-
address: string;
|
|
54
|
-
name?: string;
|
|
55
|
-
};
|
|
56
|
-
uniswapUrl: string;
|
|
57
|
-
};
|
|
58
|
-
error?: undefined;
|
|
59
|
-
unsupportedChains?: undefined;
|
|
60
|
-
supportedChains?: undefined;
|
|
61
|
-
}>;
|
|
62
|
-
}
|
|
63
|
-
//# sourceMappingURL=SubgraphPoolByAddressTool.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"SubgraphPoolByAddressTool.d.ts","sourceRoot":"","sources":["../../../../src/tools/builtin/pool-subgraph/SubgraphPoolByAddressTool.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAC1C,OAAO,KAAK,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AACjE,OAAO,EAA0B,KAAK,qBAAqB,EAAE,MAAM,0CAA0C,CAAC;AAG9G,MAAM,MAAM,+BAA+B,GAAG,qBAAqB,CAAC;AAEpE;;;;;GAKG;AACH,qBAAa,yBAA0B,SAAQ,QAAQ;IACrD,IAAI,SAA8B;IAClC,WAAW,SAEkG;IAC7G,QAAQ,SAAqB;IAC7B,aAAa,UAAQ;IACrB,UAAU,EAAE,aAAa,EAAE,CAezB;IAEF,OAAO,CAAC,OAAO,CAAyB;gBAE5B,MAAM,CAAC,EAAE,+BAA+B;cAKpC,GAAG,CAAC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,WAAW,CAAC,EAAE,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA+C7E"}
|
|
@@ -1,82 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.SubgraphPoolByAddressTool = void 0;
|
|
4
|
-
const BaseTool_1 = require("../../BaseTool");
|
|
5
|
-
const UniswapSubgraphService_1 = require("../../../services/UniswapSubgraphService");
|
|
6
|
-
const SubgraphPoolSearchTool_1 = require("./SubgraphPoolSearchTool");
|
|
7
|
-
/**
|
|
8
|
-
* Tool: subgraph-pool-by-address
|
|
9
|
-
*
|
|
10
|
-
* Fetch a single Uniswap V3 pool by its on-chain address. Maps to intent
|
|
11
|
-
* `pool_detail` when the parser extracts a 0x-prefixed pool address.
|
|
12
|
-
*/
|
|
13
|
-
class SubgraphPoolByAddressTool extends BaseTool_1.BaseTool {
|
|
14
|
-
name = 'subgraph-pool-by-address';
|
|
15
|
-
description = 'Fetch full pool detail (pair, fee tier, TVL, 24h volume + fees, APR, token addresses) for a specific Uniswap V3 pool by its on-chain address via The Graph subgraphs. ' +
|
|
16
|
-
'Use whenever the user pastes a 0x pool address: "tell me about pool 0xabc…", "details of this pool 0x…".';
|
|
17
|
-
category = 'blockchain-data';
|
|
18
|
-
noSuggestions = true;
|
|
19
|
-
parameters = [
|
|
20
|
-
{
|
|
21
|
-
name: 'poolAddress',
|
|
22
|
-
type: 'string',
|
|
23
|
-
description: '0x-prefixed Uniswap V3 pool contract address (40 hex chars).',
|
|
24
|
-
required: true,
|
|
25
|
-
},
|
|
26
|
-
{
|
|
27
|
-
name: 'chain',
|
|
28
|
-
type: 'string',
|
|
29
|
-
description: 'Hex chain ID: "0x1" Ethereum, "0xa" Optimism, "0x38" BSC, "0x89" Polygon, "0x2105" Base, "0xa4b1" Arbitrum, "0xa86a" Avalanche. ' +
|
|
30
|
-
'Defaults to the connected chain when omitted.',
|
|
31
|
-
required: false,
|
|
32
|
-
},
|
|
33
|
-
];
|
|
34
|
-
service;
|
|
35
|
-
constructor(config) {
|
|
36
|
-
super();
|
|
37
|
-
this.service = new UniswapSubgraphService_1.UniswapSubgraphService(config);
|
|
38
|
-
}
|
|
39
|
-
async run(args, userContext) {
|
|
40
|
-
const poolAddress = typeof args.poolAddress === 'string' ? args.poolAddress.trim() : '';
|
|
41
|
-
if (!/^0x[a-fA-F0-9]{40}$/.test(poolAddress)) {
|
|
42
|
-
return {
|
|
43
|
-
error: 'This only supports Uniswap V3 pools. Provide a valid Uniswap V3 pool address (a 0x-prefixed 40-character hex address).',
|
|
44
|
-
};
|
|
45
|
-
}
|
|
46
|
-
const chainArg = typeof args.chain === 'string' && args.chain.trim() ? args.chain.trim() : userContext?.chain || '0x1';
|
|
47
|
-
if (!this.service.isSupported(chainArg)) {
|
|
48
|
-
return {
|
|
49
|
-
_instructions: 'The requested chain is not supported by the Subgraph pool service. List the supported chains briefly.',
|
|
50
|
-
unsupportedChains: [chainArg],
|
|
51
|
-
supportedChains: this.service.listSupportedChains(),
|
|
52
|
-
};
|
|
53
|
-
}
|
|
54
|
-
const chain = this.service.resolveChain(chainArg);
|
|
55
|
-
const pool = await this.service.getPoolByAddress({ poolAddress, chain });
|
|
56
|
-
if (!pool) {
|
|
57
|
-
return { error: `No pool found at ${poolAddress} on chain ${chain}.` };
|
|
58
|
-
}
|
|
59
|
-
return {
|
|
60
|
-
_instructions: 'Prefix with: "According to the latest data from Subgraph Uniswap V3," (translate naturally; keep "Subgraph" as-is). ' +
|
|
61
|
-
'Show pair, fee tier (%), TVL, 24h volume, 24h fees, APR (skip if null), and the pool address. ' +
|
|
62
|
-
'End the response with the provided uniswapUrl as a clickable markdown link, e.g. "[View on Uniswap](uniswapUrl)". Never omit it. Do not invent URLs.',
|
|
63
|
-
chain,
|
|
64
|
-
pool: {
|
|
65
|
-
pair: pool.pair,
|
|
66
|
-
poolAddress: pool.poolAddress,
|
|
67
|
-
chain: pool.chain,
|
|
68
|
-
feeTierBps: pool.feeTierBps,
|
|
69
|
-
feeTierPercent: pool.feeTierPercent,
|
|
70
|
-
tvlUsd: pool.tvl,
|
|
71
|
-
volume24hUsd: pool.volume24hUsd,
|
|
72
|
-
fees24hUsd: pool.fees24hUsd,
|
|
73
|
-
apr: pool.apr,
|
|
74
|
-
token0: pool.token0,
|
|
75
|
-
token1: pool.token1,
|
|
76
|
-
uniswapUrl: (0, SubgraphPoolSearchTool_1.buildUniswapPoolUrl)(pool),
|
|
77
|
-
},
|
|
78
|
-
};
|
|
79
|
-
}
|
|
80
|
-
}
|
|
81
|
-
exports.SubgraphPoolByAddressTool = SubgraphPoolByAddressTool;
|
|
82
|
-
//# sourceMappingURL=SubgraphPoolByAddressTool.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"SubgraphPoolByAddressTool.js","sourceRoot":"","sources":["../../../../src/tools/builtin/pool-subgraph/SubgraphPoolByAddressTool.ts"],"names":[],"mappings":";;;AAAA,6CAA0C;AAE1C,qFAA8G;AAC9G,qEAA+D;AAI/D;;;;;GAKG;AACH,MAAa,yBAA0B,SAAQ,mBAAQ;IACrD,IAAI,GAAG,0BAA0B,CAAC;IAClC,WAAW,GACT,wKAAwK;QACxK,0GAA0G,CAAC;IAC7G,QAAQ,GAAG,iBAAiB,CAAC;IAC7B,aAAa,GAAG,IAAI,CAAC;IACrB,UAAU,GAAoB;QAC5B;YACE,IAAI,EAAE,aAAa;YACnB,IAAI,EAAE,QAAQ;YACd,WAAW,EAAE,8DAA8D;YAC3E,QAAQ,EAAE,IAAI;SACf;QACD;YACE,IAAI,EAAE,OAAO;YACb,IAAI,EAAE,QAAQ;YACd,WAAW,EACT,kIAAkI;gBAClI,+CAA+C;YACjD,QAAQ,EAAE,KAAK;SAChB;KACF,CAAC;IAEM,OAAO,CAAyB;IAExC,YAAY,MAAwC;QAClD,KAAK,EAAE,CAAC;QACR,IAAI,CAAC,OAAO,GAAG,IAAI,+CAAsB,CAAC,MAAM,CAAC,CAAC;IACpD,CAAC;IAES,KAAK,CAAC,GAAG,CAAC,IAA6B,EAAE,WAAyB;QAC1E,MAAM,WAAW,GAAG,OAAO,IAAI,CAAC,WAAW,KAAK,QAAQ,CAAC,CAAC,CAAC,IAA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AAC,cAAc;gBACnC,MAAM,EAAE,IAAI,CAAC,GAAG;gBAChB,YAAY,EAAE,IAAI,CAAC,YAAY;gBAC/B,UAAU,EAAE,IAAI,CAAC,UAAU;gBAC3B,GAAG,EAAE,IAAI,CAAC,GAAG;gBACb,MAAM,EAAE,IAAI,CAAC,MAAM;gBACnB,MAAM,EAAE,IAAI,CAAC,MAAM;gBACnB,UAAU,EAAE,IAAA,4CAAmB,EAAC,IAAI,CAAC;aACtC;SACF,CAAC;IACJ,CAAC;CACF;AA9ED,8DA8EC"}
|
|
@@ -1,79 +0,0 @@
|
|
|
1
|
-
import { BaseTool } from '../../BaseTool';
|
|
2
|
-
import type { ToolParameter, UserContext } from '../../../types';
|
|
3
|
-
import { type SubgraphServiceConfig } from '../../../services/UniswapSubgraphService';
|
|
4
|
-
export type SubgraphPoolByPositionIdToolConfig = SubgraphServiceConfig;
|
|
5
|
-
/**
|
|
6
|
-
* Tool: subgraph-pool-by-position-id
|
|
7
|
-
*
|
|
8
|
-
* Resolve a Uniswap V3 NFT position id to its underlying pool (without the
|
|
9
|
-
* deposit / fee history). Useful when the user asks "what pool is position
|
|
10
|
-
* 12345 in?" or refers to a pool by its position id colloquially.
|
|
11
|
-
*/
|
|
12
|
-
export declare class SubgraphPoolByPositionIdTool extends BaseTool {
|
|
13
|
-
name: string;
|
|
14
|
-
description: string;
|
|
15
|
-
category: string;
|
|
16
|
-
noSuggestions: boolean;
|
|
17
|
-
parameters: ToolParameter[];
|
|
18
|
-
private service;
|
|
19
|
-
constructor(config?: SubgraphPoolByPositionIdToolConfig);
|
|
20
|
-
protected run(args: Record<string, unknown>, userContext?: UserContext): Promise<{
|
|
21
|
-
error: string;
|
|
22
|
-
_instructions?: undefined;
|
|
23
|
-
unsupportedChains?: undefined;
|
|
24
|
-
supportedChains?: undefined;
|
|
25
|
-
positionId?: undefined;
|
|
26
|
-
chains?: undefined;
|
|
27
|
-
found?: undefined;
|
|
28
|
-
pool?: undefined;
|
|
29
|
-
} | {
|
|
30
|
-
_instructions: string;
|
|
31
|
-
unsupportedChains: string[];
|
|
32
|
-
supportedChains: string[];
|
|
33
|
-
error?: undefined;
|
|
34
|
-
positionId?: undefined;
|
|
35
|
-
chains?: undefined;
|
|
36
|
-
found?: undefined;
|
|
37
|
-
pool?: undefined;
|
|
38
|
-
} | {
|
|
39
|
-
_instructions: string;
|
|
40
|
-
positionId: string;
|
|
41
|
-
chains: string[];
|
|
42
|
-
found: boolean;
|
|
43
|
-
error?: undefined;
|
|
44
|
-
unsupportedChains?: undefined;
|
|
45
|
-
supportedChains?: undefined;
|
|
46
|
-
pool?: undefined;
|
|
47
|
-
} | {
|
|
48
|
-
_instructions: string;
|
|
49
|
-
positionId: string;
|
|
50
|
-
pool: {
|
|
51
|
-
pair: string;
|
|
52
|
-
poolAddress: string;
|
|
53
|
-
chain: string;
|
|
54
|
-
feeTierBps: number;
|
|
55
|
-
feeTierPercent: number;
|
|
56
|
-
tvlUsd: number;
|
|
57
|
-
volume24hUsd: number;
|
|
58
|
-
fees24hUsd: number;
|
|
59
|
-
apr: number | null;
|
|
60
|
-
token0: {
|
|
61
|
-
symbol: string;
|
|
62
|
-
address: string;
|
|
63
|
-
name?: string;
|
|
64
|
-
};
|
|
65
|
-
token1: {
|
|
66
|
-
symbol: string;
|
|
67
|
-
address: string;
|
|
68
|
-
name?: string;
|
|
69
|
-
};
|
|
70
|
-
uniswapUrl: string;
|
|
71
|
-
};
|
|
72
|
-
error?: undefined;
|
|
73
|
-
unsupportedChains?: undefined;
|
|
74
|
-
supportedChains?: undefined;
|
|
75
|
-
chains?: undefined;
|
|
76
|
-
found?: undefined;
|
|
77
|
-
}>;
|
|
78
|
-
}
|
|
79
|
-
//# sourceMappingURL=SubgraphPoolByPositionIdTool.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"SubgraphPoolByPositionIdTool.d.ts","sourceRoot":"","sources":["../../../../src/tools/builtin/pool-subgraph/SubgraphPoolByPositionIdTool.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAC1C,OAAO,KAAK,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AACjE,OAAO,EAA0B,KAAK,qBAAqB,EAAE,MAAM,0CAA0C,CAAC;AAG9G,MAAM,MAAM,kCAAkC,GAAG,qBAAqB,CAAC;AAEvE;;;;;;GAMG;AACH,qBAAa,4BAA6B,SAAQ,QAAQ;IACxD,IAAI,SAAkC;IACtC,WAAW,SAIyD;IACpE,QAAQ,SAAqB;IAC7B,aAAa,UAAQ;IACrB,UAAU,EAAE,aAAa,EAAE,CAiBzB;IAEF,OAAO,CAAC,OAAO,CAAyB;gBAE5B,MAAM,CAAC,EAAE,kCAAkC;cAKvC,GAAG,CAAC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,WAAW,CAAC,EAAE,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA+D7E"}
|
|
@@ -1,97 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.SubgraphPoolByPositionIdTool = void 0;
|
|
4
|
-
const BaseTool_1 = require("../../BaseTool");
|
|
5
|
-
const UniswapSubgraphService_1 = require("../../../services/UniswapSubgraphService");
|
|
6
|
-
const SubgraphPoolSearchTool_1 = require("./SubgraphPoolSearchTool");
|
|
7
|
-
/**
|
|
8
|
-
* Tool: subgraph-pool-by-position-id
|
|
9
|
-
*
|
|
10
|
-
* Resolve a Uniswap V3 NFT position id to its underlying pool (without the
|
|
11
|
-
* deposit / fee history). Useful when the user asks "what pool is position
|
|
12
|
-
* 12345 in?" or refers to a pool by its position id colloquially.
|
|
13
|
-
*/
|
|
14
|
-
class SubgraphPoolByPositionIdTool extends BaseTool_1.BaseTool {
|
|
15
|
-
name = 'subgraph-pool-by-position-id';
|
|
16
|
-
description = 'Return the pool underlying a Uniswap V3 NFT position id. ' +
|
|
17
|
-
'Use when the user wants the pool stats for a numeric id WITHOUT the deposit/withdraw/fee history ' +
|
|
18
|
-
'(e.g. "which pool is position 962961 in?", "show the pool of id 12345"). ' +
|
|
19
|
-
'For full position history use subgraph-position-detail instead.';
|
|
20
|
-
category = 'blockchain-data';
|
|
21
|
-
noSuggestions = true;
|
|
22
|
-
parameters = [
|
|
23
|
-
{
|
|
24
|
-
name: 'positionId',
|
|
25
|
-
type: 'string',
|
|
26
|
-
description: 'Numeric Uniswap V3 NFT position id as a string.',
|
|
27
|
-
required: true,
|
|
28
|
-
},
|
|
29
|
-
{
|
|
30
|
-
name: 'chains',
|
|
31
|
-
type: 'array',
|
|
32
|
-
items: { type: 'string' },
|
|
33
|
-
description: 'Hex chain IDs: "0x1" Ethereum, "0xa" Optimism, "0x38" BSC, "0x89" Polygon, "0x2105" Base, "0xa4b1" Arbitrum, "0xa86a" Avalanche. ' +
|
|
34
|
-
'Pass [] when the user did not name a chain — the tool defaults to the connected chain.',
|
|
35
|
-
required: false,
|
|
36
|
-
default: [],
|
|
37
|
-
},
|
|
38
|
-
];
|
|
39
|
-
service;
|
|
40
|
-
constructor(config) {
|
|
41
|
-
super();
|
|
42
|
-
this.service = new UniswapSubgraphService_1.UniswapSubgraphService(config);
|
|
43
|
-
}
|
|
44
|
-
async run(args, userContext) {
|
|
45
|
-
const positionId = typeof args.positionId === 'string' ? args.positionId.trim() : '';
|
|
46
|
-
if (!/^\d+$/.test(positionId)) {
|
|
47
|
-
return { error: 'positionId must be a numeric string.' };
|
|
48
|
-
}
|
|
49
|
-
const requested = (Array.isArray(args.chains) ? args.chains : []).filter((c) => typeof c === 'string' && c.trim().length > 0);
|
|
50
|
-
const unsupported = requested.filter((c) => !this.service.isSupported(c));
|
|
51
|
-
const supported = requested.filter((c) => this.service.isSupported(c)).map((c) => this.service.resolveChain(c));
|
|
52
|
-
if (requested.length > 0 && supported.length === 0) {
|
|
53
|
-
return {
|
|
54
|
-
_instructions: 'Requested chains are not supported. List the supported chains.',
|
|
55
|
-
unsupportedChains: unsupported,
|
|
56
|
-
supportedChains: this.service.listSupportedChains(),
|
|
57
|
-
};
|
|
58
|
-
}
|
|
59
|
-
const chains = supported.length > 0
|
|
60
|
-
? supported
|
|
61
|
-
: this.service.isSupported(userContext?.chain)
|
|
62
|
-
? [this.service.resolveChain(userContext?.chain)]
|
|
63
|
-
: ['0x1'];
|
|
64
|
-
const results = await Promise.allSettled(chains.map((chain) => this.service.getPoolByPositionId({ positionId, chain })));
|
|
65
|
-
const pool = results.map((r) => (r.status === 'fulfilled' ? r.value : null)).find((p) => p != null);
|
|
66
|
-
if (!pool) {
|
|
67
|
-
return {
|
|
68
|
-
_instructions: 'No pool found for this position id on the chosen chains. Ask the user to verify the id or chain.',
|
|
69
|
-
positionId,
|
|
70
|
-
chains,
|
|
71
|
-
found: false,
|
|
72
|
-
};
|
|
73
|
-
}
|
|
74
|
-
return {
|
|
75
|
-
_instructions: 'Prefix with: "According to the latest data from Subgraph Uniswap V3," (translate naturally; keep "Subgraph" as-is). ' +
|
|
76
|
-
'Show the pool of that position: pair, fee %, TVL, 24h volume, APR. Mention the position id. ' +
|
|
77
|
-
'End the response with the provided uniswapUrl as a clickable markdown link, e.g. "[View on Uniswap](uniswapUrl)". Never omit it. Do not invent URLs.',
|
|
78
|
-
positionId,
|
|
79
|
-
pool: {
|
|
80
|
-
pair: pool.pair,
|
|
81
|
-
poolAddress: pool.poolAddress,
|
|
82
|
-
chain: pool.chain,
|
|
83
|
-
feeTierBps: pool.feeTierBps,
|
|
84
|
-
feeTierPercent: pool.feeTierPercent,
|
|
85
|
-
tvlUsd: pool.tvl,
|
|
86
|
-
volume24hUsd: pool.volume24hUsd,
|
|
87
|
-
fees24hUsd: pool.fees24hUsd,
|
|
88
|
-
apr: pool.apr,
|
|
89
|
-
token0: pool.token0,
|
|
90
|
-
token1: pool.token1,
|
|
91
|
-
uniswapUrl: (0, SubgraphPoolSearchTool_1.buildUniswapPoolUrl)(pool),
|
|
92
|
-
},
|
|
93
|
-
};
|
|
94
|
-
}
|
|
95
|
-
}
|
|
96
|
-
exports.SubgraphPoolByPositionIdTool = SubgraphPoolByPositionIdTool;
|
|
97
|
-
//# sourceMappingURL=SubgraphPoolByPositionIdTool.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"SubgraphPoolByPositionIdTool.js","sourceRoot":"","sources":["../../../../src/tools/builtin/pool-subgraph/SubgraphPoolByPositionIdTool.ts"],"names":[],"mappings":";;;AAAA,6CAA0C;AAE1C,qFAA8G;AAC9G,qEAA+D;AAI/D;;;;;;GAMG;AACH,MAAa,4BAA6B,SAAQ,mBAAQ;IACxD,IAAI,GAAG,8BAA8B,CAAC;IACtC,WAAW,GACT,2DAA2D;QAC3D,mGAAmG;QACnG,2EAA2E;QAC3E,iEAAiE,CAAC;IACpE,QAAQ,GAAG,iBAAiB,CAAC;IAC7B,aAAa,GAAG,IAAI,CAAC;IACrB,UAAU,GAAoB;QAC5B;YACE,IAAI,EAAE,YAAY;YAClB,IAAI,EAAE,QAAQ;YACd,WAAW,EAAE,iDAAiD;YAC9D,QAAQ,EAAE,IAAI;SACf;QACD;YACE,IAAI,EAAE,QAAQ;YACd,IAAI,EAAE,OAAO;YACb,KAAK,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;YACzB,WAAW,EACT,mIAAmI;gBACnI,wFAAwF;YAC1F,QAAQ,EAAE,KAAK;YACf,OAAO,EAAE,EAAE;SACZ;KACF,CAAC;IAEM,OAAO,CAAyB;IAExC,YAAY,MAA2C;QACrD,KAAK,EAAE,CAAC;QACR,IAAI,CAAC,OAAO,GAAG,IAAI,+CAAsB,CAAC,MAAM,CAAC,CAAC;IACpD,CAAC;IAES,KAAK,CAAC,GAAG,CAAC,IAA6B,EAAE,WAAyB;QAC1E,MAAM,UAAU,GAAG,OAAO,IAAI,CAAC,UAAU,KAAK,QA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GAAG;gBACb,MAAM,EAAE,IAAI,CAAC,MAAM;gBACnB,MAAM,EAAE,IAAI,CAAC,MAAM;gBACnB,UAAU,EAAE,IAAA,4CAAmB,EAAC,IAAI,CAAC;aACtC;SACF,CAAC;IACJ,CAAC;CACF;AAlGD,oEAkGC"}
|
|
@@ -1,77 +0,0 @@
|
|
|
1
|
-
import { BaseTool } from '../../BaseTool';
|
|
2
|
-
import type { ToolParameter, UserContext } from '../../../types';
|
|
3
|
-
import { type SubgraphServiceConfig, type SubgraphSort } from '../../../services/UniswapSubgraphService';
|
|
4
|
-
export type SubgraphPoolSearchToolConfig = SubgraphServiceConfig;
|
|
5
|
-
/**
|
|
6
|
-
* Tool: subgraph-search-pools
|
|
7
|
-
*
|
|
8
|
-
* Search Uniswap V3 pools across one or more EVM chains via The Graph
|
|
9
|
-
* subgraphs. Handles single-token, two-token, and no-token queries. Used
|
|
10
|
-
* for intents: search_pool, best_pool, safe_pool, compare_pool, new_pool.
|
|
11
|
-
*
|
|
12
|
-
* APR comes from DefiLlama Yields (uniswap-v3 only) for accuracy.
|
|
13
|
-
*/
|
|
14
|
-
export declare class SubgraphPoolSearchTool extends BaseTool {
|
|
15
|
-
name: string;
|
|
16
|
-
description: string;
|
|
17
|
-
category: string;
|
|
18
|
-
noSuggestions: boolean;
|
|
19
|
-
parameters: ToolParameter[];
|
|
20
|
-
private service;
|
|
21
|
-
constructor(config?: SubgraphPoolSearchToolConfig);
|
|
22
|
-
protected run(args: Record<string, unknown>, userContext?: UserContext): Promise<{
|
|
23
|
-
_instructions: string;
|
|
24
|
-
unsupportedChains: string[];
|
|
25
|
-
supportedChains: string[];
|
|
26
|
-
pools: never[];
|
|
27
|
-
count: number;
|
|
28
|
-
tokens?: undefined;
|
|
29
|
-
chains?: undefined;
|
|
30
|
-
sortBy?: undefined;
|
|
31
|
-
filters?: undefined;
|
|
32
|
-
} | {
|
|
33
|
-
_instructions: string;
|
|
34
|
-
tokens: string[];
|
|
35
|
-
chains: string[];
|
|
36
|
-
unsupportedChains: string[];
|
|
37
|
-
sortBy: SubgraphSort;
|
|
38
|
-
filters: {
|
|
39
|
-
minTVL: number | undefined;
|
|
40
|
-
maxTVL: number | undefined;
|
|
41
|
-
minAPR: number | undefined;
|
|
42
|
-
maxAPR: number | undefined;
|
|
43
|
-
feeTier: number | undefined;
|
|
44
|
-
};
|
|
45
|
-
count: number;
|
|
46
|
-
pools: {
|
|
47
|
-
pair: string;
|
|
48
|
-
poolAddress: string;
|
|
49
|
-
chain: string;
|
|
50
|
-
feeTierBps: number;
|
|
51
|
-
feeTierPercent: number;
|
|
52
|
-
tvlUsd: number;
|
|
53
|
-
volume24hUsd: number;
|
|
54
|
-
fees24hUsd: number;
|
|
55
|
-
apr: number | null;
|
|
56
|
-
token0: {
|
|
57
|
-
symbol: string;
|
|
58
|
-
address: string;
|
|
59
|
-
name?: string;
|
|
60
|
-
};
|
|
61
|
-
token1: {
|
|
62
|
-
symbol: string;
|
|
63
|
-
address: string;
|
|
64
|
-
name?: string;
|
|
65
|
-
};
|
|
66
|
-
uniswapUrl: string;
|
|
67
|
-
}[];
|
|
68
|
-
supportedChains?: undefined;
|
|
69
|
-
}>;
|
|
70
|
-
private formatPool;
|
|
71
|
-
}
|
|
72
|
-
export declare function buildUniswapPoolUrl(p: {
|
|
73
|
-
chain: string;
|
|
74
|
-
poolAddress: string;
|
|
75
|
-
}): string;
|
|
76
|
-
export declare const UNISWAP_CHAIN_SLUG: Record<string, string>;
|
|
77
|
-
//# sourceMappingURL=SubgraphPoolSearchTool.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"SubgraphPoolSearchTool.d.ts","sourceRoot":"","sources":["../../../../src/tools/builtin/pool-subgraph/SubgraphPoolSearchTool.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAC1C,OAAO,KAAK,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AACjE,OAAO,EAEL,KAAK,qBAAqB,EAE1B,KAAK,YAAY,EAClB,MAAM,0CAA0C,CAAC;AAElD,MAAM,MAAM,4BAA4B,GAAG,qBAAqB,CAAC;AAIjE;;;;;;;;GAQG;AACH,qBAAa,sBAAuB,SAAQ,QAAQ;IAClD,IAAI,SAA2B;IAC/B,WAAW,SAK6H;IACxI,QAAQ,SAAqB;IAC7B,aAAa,UAAQ;IACrB,UAAU,EAAE,aAAa,EAAE,CAiEzB;IAEF,OAAO,CAAC,OAAO,CAAyB;gBAE5B,MAAM,CAAC,EAAE,4BAA4B;cAKjC,GAAG,CAAC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,WAAW,CAAC,EAAE,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IA+E5E,OAAO,CAAC,UAAU;CAgBnB;AAED,wBAAgB,mBAAmB,CAAC,CAAC,EAAE;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,WAAW,EAAE,MAAM,CAAA;CAAE,GAAG,MAAM,CAGrF;AAED,eAAO,MAAM,kBAAkB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAQrD,CAAC"}
|