keyring-agent-core 0.1.0
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/README.md +169 -0
- package/dist/agent/AgentCore.d.ts +220 -0
- package/dist/agent/AgentCore.d.ts.map +1 -0
- package/dist/agent/AgentCore.js +950 -0
- package/dist/agent/AgentCore.js.map +1 -0
- package/dist/agent/QueryRewriter.d.ts +67 -0
- package/dist/agent/QueryRewriter.d.ts.map +1 -0
- package/dist/agent/QueryRewriter.js +262 -0
- package/dist/agent/QueryRewriter.js.map +1 -0
- package/dist/agent/Router.d.ts +33 -0
- package/dist/agent/Router.d.ts.map +1 -0
- package/dist/agent/Router.js +191 -0
- package/dist/agent/Router.js.map +1 -0
- package/dist/agent/Subagent.d.ts +63 -0
- package/dist/agent/Subagent.d.ts.map +1 -0
- package/dist/agent/Subagent.js +240 -0
- package/dist/agent/Subagent.js.map +1 -0
- package/dist/agent/Synthesizer.d.ts +11 -0
- package/dist/agent/Synthesizer.d.ts.map +1 -0
- package/dist/agent/Synthesizer.js +86 -0
- package/dist/agent/Synthesizer.js.map +1 -0
- package/dist/agent/index.d.ts +10 -0
- package/dist/agent/index.d.ts.map +1 -0
- package/dist/agent/index.js +24 -0
- package/dist/agent/index.js.map +1 -0
- package/dist/agent/subagents/AiAgent.d.ts +6 -0
- package/dist/agent/subagents/AiAgent.d.ts.map +1 -0
- package/dist/agent/subagents/AiAgent.js +48 -0
- package/dist/agent/subagents/AiAgent.js.map +1 -0
- package/dist/agent/subagents/NftAgent.d.ts +6 -0
- package/dist/agent/subagents/NftAgent.d.ts.map +1 -0
- package/dist/agent/subagents/NftAgent.js +69 -0
- package/dist/agent/subagents/NftAgent.js.map +1 -0
- package/dist/agent/subagents/PoolAgent.d.ts +6 -0
- package/dist/agent/subagents/PoolAgent.d.ts.map +1 -0
- package/dist/agent/subagents/PoolAgent.js +184 -0
- package/dist/agent/subagents/PoolAgent.js.map +1 -0
- package/dist/agent/subagents/TokenAgent.d.ts +6 -0
- package/dist/agent/subagents/TokenAgent.d.ts.map +1 -0
- package/dist/agent/subagents/TokenAgent.js +75 -0
- package/dist/agent/subagents/TokenAgent.js.map +1 -0
- package/dist/agent/subagents/WalletAgent.d.ts +6 -0
- package/dist/agent/subagents/WalletAgent.d.ts.map +1 -0
- package/dist/agent/subagents/WalletAgent.js +92 -0
- package/dist/agent/subagents/WalletAgent.js.map +1 -0
- package/dist/agent/subagents/index.d.ts +14 -0
- package/dist/agent/subagents/index.d.ts.map +1 -0
- package/dist/agent/subagents/index.js +38 -0
- package/dist/agent/subagents/index.js.map +1 -0
- package/dist/constants/abi.d.ts +520 -0
- package/dist/constants/abi.d.ts.map +1 -0
- package/dist/constants/abi.js +667 -0
- package/dist/constants/abi.js.map +1 -0
- package/dist/functions/pool.d.ts +25 -0
- package/dist/functions/pool.d.ts.map +1 -0
- package/dist/functions/pool.js +151 -0
- package/dist/functions/pool.js.map +1 -0
- package/dist/functions/web3.d.ts +32 -0
- package/dist/functions/web3.d.ts.map +1 -0
- package/dist/functions/web3.js +277 -0
- package/dist/functions/web3.js.map +1 -0
- package/dist/index.d.ts +24 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +65 -0
- package/dist/index.js.map +1 -0
- package/dist/llm/GeminiProvider.d.ts +16 -0
- package/dist/llm/GeminiProvider.d.ts.map +1 -0
- package/dist/llm/GeminiProvider.js +248 -0
- package/dist/llm/GeminiProvider.js.map +1 -0
- package/dist/llm/index.d.ts +2 -0
- package/dist/llm/index.d.ts.map +1 -0
- package/dist/llm/index.js +6 -0
- package/dist/llm/index.js.map +1 -0
- package/dist/memory/ChatHistory.d.ts +83 -0
- package/dist/memory/ChatHistory.d.ts.map +1 -0
- package/dist/memory/ChatHistory.js +143 -0
- package/dist/memory/ChatHistory.js.map +1 -0
- package/dist/memory/KnowledgeBase.d.ts +38 -0
- package/dist/memory/KnowledgeBase.d.ts.map +1 -0
- package/dist/memory/KnowledgeBase.js +139 -0
- package/dist/memory/KnowledgeBase.js.map +1 -0
- package/dist/memory/Summarizer.d.ts +12 -0
- package/dist/memory/Summarizer.d.ts.map +1 -0
- package/dist/memory/Summarizer.js +39 -0
- package/dist/memory/Summarizer.js.map +1 -0
- package/dist/memory/UpstashKnowledgeBase.d.ts +124 -0
- package/dist/memory/UpstashKnowledgeBase.d.ts.map +1 -0
- package/dist/memory/UpstashKnowledgeBase.js +152 -0
- package/dist/memory/UpstashKnowledgeBase.js.map +1 -0
- package/dist/memory/historyUtils.d.ts +58 -0
- package/dist/memory/historyUtils.d.ts.map +1 -0
- package/dist/memory/historyUtils.js +190 -0
- package/dist/memory/historyUtils.js.map +1 -0
- package/dist/memory/index.d.ts +7 -0
- package/dist/memory/index.d.ts.map +1 -0
- package/dist/memory/index.js +12 -0
- package/dist/memory/index.js.map +1 -0
- package/dist/memory/ingestKnowledgeBase.d.ts +17 -0
- package/dist/memory/ingestKnowledgeBase.d.ts.map +1 -0
- package/dist/memory/ingestKnowledgeBase.js +35 -0
- package/dist/memory/ingestKnowledgeBase.js.map +1 -0
- package/dist/services/MoralisService.d.ts +1350 -0
- package/dist/services/MoralisService.d.ts.map +1 -0
- package/dist/services/MoralisService.js +1364 -0
- package/dist/services/MoralisService.js.map +1 -0
- package/dist/services/PantographService.d.ts +38 -0
- package/dist/services/PantographService.d.ts.map +1 -0
- package/dist/services/PantographService.js +199 -0
- package/dist/services/PantographService.js.map +1 -0
- package/dist/services/PoolService.d.ts +241 -0
- package/dist/services/PoolService.d.ts.map +1 -0
- package/dist/services/PoolService.js +507 -0
- package/dist/services/PoolService.js.map +1 -0
- package/dist/services/UniswapService.d.ts +289 -0
- package/dist/services/UniswapService.d.ts.map +1 -0
- package/dist/services/UniswapService.js +585 -0
- package/dist/services/UniswapService.js.map +1 -0
- package/dist/services/swap/BaseSwapService.d.ts +17 -0
- package/dist/services/swap/BaseSwapService.d.ts.map +1 -0
- package/dist/services/swap/BaseSwapService.js +19 -0
- package/dist/services/swap/BaseSwapService.js.map +1 -0
- package/dist/services/swap/DebridgeAdapter.d.ts +20 -0
- package/dist/services/swap/DebridgeAdapter.d.ts.map +1 -0
- package/dist/services/swap/DebridgeAdapter.js +175 -0
- package/dist/services/swap/DebridgeAdapter.js.map +1 -0
- package/dist/services/swap/RelayAdapter.d.ts +19 -0
- package/dist/services/swap/RelayAdapter.d.ts.map +1 -0
- package/dist/services/swap/RelayAdapter.js +189 -0
- package/dist/services/swap/RelayAdapter.js.map +1 -0
- package/dist/services/swap/SwapServiceFactory.d.ts +24 -0
- package/dist/services/swap/SwapServiceFactory.d.ts.map +1 -0
- package/dist/services/swap/SwapServiceFactory.js +74 -0
- package/dist/services/swap/SwapServiceFactory.js.map +1 -0
- package/dist/services/swap/addresses.d.ts +3 -0
- package/dist/services/swap/addresses.d.ts.map +1 -0
- package/dist/services/swap/addresses.js +68 -0
- package/dist/services/swap/addresses.js.map +1 -0
- package/dist/services/swap/affiliate.d.ts +17 -0
- package/dist/services/swap/affiliate.d.ts.map +1 -0
- package/dist/services/swap/affiliate.js +126 -0
- package/dist/services/swap/affiliate.js.map +1 -0
- package/dist/services/swap/config.d.ts +9 -0
- package/dist/services/swap/config.d.ts.map +1 -0
- package/dist/services/swap/config.js +19 -0
- package/dist/services/swap/config.js.map +1 -0
- package/dist/services/swap/index.d.ts +10 -0
- package/dist/services/swap/index.d.ts.map +1 -0
- package/dist/services/swap/index.js +22 -0
- package/dist/services/swap/index.js.map +1 -0
- package/dist/services/swap/types.d.ts +89 -0
- package/dist/services/swap/types.d.ts.map +1 -0
- package/dist/services/swap/types.js +6 -0
- package/dist/services/swap/types.js.map +1 -0
- package/dist/tools/BaseTool.d.ts +15 -0
- package/dist/tools/BaseTool.d.ts.map +1 -0
- package/dist/tools/BaseTool.js +35 -0
- package/dist/tools/BaseTool.js.map +1 -0
- package/dist/tools/ToolRegistry.d.ts +27 -0
- package/dist/tools/ToolRegistry.d.ts.map +1 -0
- package/dist/tools/ToolRegistry.js +80 -0
- package/dist/tools/ToolRegistry.js.map +1 -0
- package/dist/tools/builtin/ai/MoralisCortexTool.d.ts +33 -0
- package/dist/tools/builtin/ai/MoralisCortexTool.d.ts.map +1 -0
- package/dist/tools/builtin/ai/MoralisCortexTool.js +76 -0
- package/dist/tools/builtin/ai/MoralisCortexTool.js.map +1 -0
- package/dist/tools/builtin/ai/SolanaCortexTool.d.ts +22 -0
- package/dist/tools/builtin/ai/SolanaCortexTool.d.ts.map +1 -0
- package/dist/tools/builtin/ai/SolanaCortexTool.js +80 -0
- package/dist/tools/builtin/ai/SolanaCortexTool.js.map +1 -0
- package/dist/tools/builtin/ai/index.d.ts +5 -0
- package/dist/tools/builtin/ai/index.d.ts.map +1 -0
- package/dist/tools/builtin/ai/index.js +8 -0
- package/dist/tools/builtin/ai/index.js.map +1 -0
- package/dist/tools/builtin/index.d.ts +6 -0
- package/dist/tools/builtin/index.d.ts.map +1 -0
- package/dist/tools/builtin/index.js +22 -0
- package/dist/tools/builtin/index.js.map +1 -0
- package/dist/tools/builtin/nft/NFTContractInfoTool.d.ts +21 -0
- package/dist/tools/builtin/nft/NFTContractInfoTool.d.ts.map +1 -0
- package/dist/tools/builtin/nft/NFTContractInfoTool.js +54 -0
- package/dist/tools/builtin/nft/NFTContractInfoTool.js.map +1 -0
- package/dist/tools/builtin/nft/NFTMetadataTool.d.ts +121 -0
- package/dist/tools/builtin/nft/NFTMetadataTool.d.ts.map +1 -0
- package/dist/tools/builtin/nft/NFTMetadataTool.js +159 -0
- package/dist/tools/builtin/nft/NFTMetadataTool.js.map +1 -0
- package/dist/tools/builtin/nft/WalletNFTsTool.d.ts +82 -0
- package/dist/tools/builtin/nft/WalletNFTsTool.d.ts.map +1 -0
- package/dist/tools/builtin/nft/WalletNFTsTool.js +172 -0
- package/dist/tools/builtin/nft/WalletNFTsTool.js.map +1 -0
- package/dist/tools/builtin/nft/index.d.ts +7 -0
- package/dist/tools/builtin/nft/index.d.ts.map +1 -0
- package/dist/tools/builtin/nft/index.js +10 -0
- package/dist/tools/builtin/nft/index.js.map +1 -0
- package/dist/tools/builtin/pool/EstimatePoolYieldTool.d.ts +124 -0
- package/dist/tools/builtin/pool/EstimatePoolYieldTool.d.ts.map +1 -0
- package/dist/tools/builtin/pool/EstimatePoolYieldTool.js +235 -0
- package/dist/tools/builtin/pool/EstimatePoolYieldTool.js.map +1 -0
- package/dist/tools/builtin/pool/OpenAddLiquidityFormTool.d.ts +127 -0
- package/dist/tools/builtin/pool/OpenAddLiquidityFormTool.d.ts.map +1 -0
- package/dist/tools/builtin/pool/OpenAddLiquidityFormTool.js +517 -0
- package/dist/tools/builtin/pool/OpenAddLiquidityFormTool.js.map +1 -0
- package/dist/tools/builtin/pool/PoolByAddressTool.d.ts +127 -0
- package/dist/tools/builtin/pool/PoolByAddressTool.d.ts.map +1 -0
- package/dist/tools/builtin/pool/PoolByAddressTool.js +237 -0
- package/dist/tools/builtin/pool/PoolByAddressTool.js.map +1 -0
- package/dist/tools/builtin/pool/PoolDetailTool.d.ts +127 -0
- package/dist/tools/builtin/pool/PoolDetailTool.d.ts.map +1 -0
- package/dist/tools/builtin/pool/PoolDetailTool.js +272 -0
- package/dist/tools/builtin/pool/PoolDetailTool.js.map +1 -0
- package/dist/tools/builtin/pool/PoolSearchTool.d.ts +50 -0
- package/dist/tools/builtin/pool/PoolSearchTool.d.ts.map +1 -0
- package/dist/tools/builtin/pool/PoolSearchTool.js +159 -0
- package/dist/tools/builtin/pool/PoolSearchTool.js.map +1 -0
- package/dist/tools/builtin/pool/PreviewAddLiquidityTool.d.ts +123 -0
- package/dist/tools/builtin/pool/PreviewAddLiquidityTool.d.ts.map +1 -0
- package/dist/tools/builtin/pool/PreviewAddLiquidityTool.js +380 -0
- package/dist/tools/builtin/pool/PreviewAddLiquidityTool.js.map +1 -0
- package/dist/tools/builtin/pool/TopPoolsTool.d.ts +68 -0
- package/dist/tools/builtin/pool/TopPoolsTool.d.ts.map +1 -0
- package/dist/tools/builtin/pool/TopPoolsTool.js +158 -0
- package/dist/tools/builtin/pool/TopPoolsTool.js.map +1 -0
- package/dist/tools/builtin/pool/index.d.ts +15 -0
- package/dist/tools/builtin/pool/index.d.ts.map +1 -0
- package/dist/tools/builtin/pool/index.js +18 -0
- package/dist/tools/builtin/pool/index.js.map +1 -0
- package/dist/tools/builtin/token/TokenAnalyticsTool.d.ts +71 -0
- package/dist/tools/builtin/token/TokenAnalyticsTool.d.ts.map +1 -0
- package/dist/tools/builtin/token/TokenAnalyticsTool.js +146 -0
- package/dist/tools/builtin/token/TokenAnalyticsTool.js.map +1 -0
- package/dist/tools/builtin/token/TokenHoldersTool.d.ts +81 -0
- package/dist/tools/builtin/token/TokenHoldersTool.d.ts.map +1 -0
- package/dist/tools/builtin/token/TokenHoldersTool.js +138 -0
- package/dist/tools/builtin/token/TokenHoldersTool.js.map +1 -0
- package/dist/tools/builtin/token/TokenInfoTool.d.ts +36 -0
- package/dist/tools/builtin/token/TokenInfoTool.d.ts.map +1 -0
- package/dist/tools/builtin/token/TokenInfoTool.js +163 -0
- package/dist/tools/builtin/token/TokenInfoTool.js.map +1 -0
- package/dist/tools/builtin/token/TokenScoreTool.d.ts +63 -0
- package/dist/tools/builtin/token/TokenScoreTool.d.ts.map +1 -0
- package/dist/tools/builtin/token/TokenScoreTool.js +147 -0
- package/dist/tools/builtin/token/TokenScoreTool.js.map +1 -0
- package/dist/tools/builtin/token/TopGainersTool.d.ts +46 -0
- package/dist/tools/builtin/token/TopGainersTool.d.ts.map +1 -0
- package/dist/tools/builtin/token/TopGainersTool.js +110 -0
- package/dist/tools/builtin/token/TopGainersTool.js.map +1 -0
- package/dist/tools/builtin/token/TopLosersTool.d.ts +66 -0
- package/dist/tools/builtin/token/TopLosersTool.d.ts.map +1 -0
- package/dist/tools/builtin/token/TopLosersTool.js +128 -0
- package/dist/tools/builtin/token/TopLosersTool.js.map +1 -0
- package/dist/tools/builtin/token/TrendingTokensTool.d.ts +39 -0
- package/dist/tools/builtin/token/TrendingTokensTool.d.ts.map +1 -0
- package/dist/tools/builtin/token/TrendingTokensTool.js +75 -0
- package/dist/tools/builtin/token/TrendingTokensTool.js.map +1 -0
- package/dist/tools/builtin/token/index.d.ts +15 -0
- package/dist/tools/builtin/token/index.d.ts.map +1 -0
- package/dist/tools/builtin/token/index.js +18 -0
- package/dist/tools/builtin/token/index.js.map +1 -0
- package/dist/tools/builtin/wallet/TransactionByHashTool.d.ts +70 -0
- package/dist/tools/builtin/wallet/TransactionByHashTool.d.ts.map +1 -0
- package/dist/tools/builtin/wallet/TransactionByHashTool.js +110 -0
- package/dist/tools/builtin/wallet/TransactionByHashTool.js.map +1 -0
- package/dist/tools/builtin/wallet/WalletApprovalsTool.d.ts +107 -0
- package/dist/tools/builtin/wallet/WalletApprovalsTool.d.ts.map +1 -0
- package/dist/tools/builtin/wallet/WalletApprovalsTool.js +163 -0
- package/dist/tools/builtin/wallet/WalletApprovalsTool.js.map +1 -0
- package/dist/tools/builtin/wallet/WalletDefiPositionsTool.d.ts +61 -0
- package/dist/tools/builtin/wallet/WalletDefiPositionsTool.d.ts.map +1 -0
- package/dist/tools/builtin/wallet/WalletDefiPositionsTool.js +99 -0
- package/dist/tools/builtin/wallet/WalletDefiPositionsTool.js.map +1 -0
- package/dist/tools/builtin/wallet/WalletDefiProtocolPositionsTool.d.ts +68 -0
- package/dist/tools/builtin/wallet/WalletDefiProtocolPositionsTool.d.ts.map +1 -0
- package/dist/tools/builtin/wallet/WalletDefiProtocolPositionsTool.js +114 -0
- package/dist/tools/builtin/wallet/WalletDefiProtocolPositionsTool.js.map +1 -0
- package/dist/tools/builtin/wallet/WalletDefiSummaryTool.d.ts +50 -0
- package/dist/tools/builtin/wallet/WalletDefiSummaryTool.d.ts.map +1 -0
- package/dist/tools/builtin/wallet/WalletDefiSummaryTool.js +79 -0
- package/dist/tools/builtin/wallet/WalletDefiSummaryTool.js.map +1 -0
- package/dist/tools/builtin/wallet/WalletHistoryTool.d.ts +31 -0
- package/dist/tools/builtin/wallet/WalletHistoryTool.d.ts.map +1 -0
- package/dist/tools/builtin/wallet/WalletHistoryTool.js +153 -0
- package/dist/tools/builtin/wallet/WalletHistoryTool.js.map +1 -0
- package/dist/tools/builtin/wallet/WalletNetWorthTool.d.ts +44 -0
- package/dist/tools/builtin/wallet/WalletNetWorthTool.d.ts.map +1 -0
- package/dist/tools/builtin/wallet/WalletNetWorthTool.js +122 -0
- package/dist/tools/builtin/wallet/WalletNetWorthTool.js.map +1 -0
- package/dist/tools/builtin/wallet/WalletNftTransfersTool.d.ts +86 -0
- package/dist/tools/builtin/wallet/WalletNftTransfersTool.d.ts.map +1 -0
- package/dist/tools/builtin/wallet/WalletNftTransfersTool.js +264 -0
- package/dist/tools/builtin/wallet/WalletNftTransfersTool.js.map +1 -0
- package/dist/tools/builtin/wallet/WalletPnlSummaryTool.d.ts +43 -0
- package/dist/tools/builtin/wallet/WalletPnlSummaryTool.d.ts.map +1 -0
- package/dist/tools/builtin/wallet/WalletPnlSummaryTool.js +88 -0
- package/dist/tools/builtin/wallet/WalletPnlSummaryTool.js.map +1 -0
- package/dist/tools/builtin/wallet/WalletPnlTool.d.ts +43 -0
- package/dist/tools/builtin/wallet/WalletPnlTool.d.ts.map +1 -0
- package/dist/tools/builtin/wallet/WalletPnlTool.js +174 -0
- package/dist/tools/builtin/wallet/WalletPnlTool.js.map +1 -0
- package/dist/tools/builtin/wallet/WalletTokenBalancesTool.d.ts +35 -0
- package/dist/tools/builtin/wallet/WalletTokenBalancesTool.d.ts.map +1 -0
- package/dist/tools/builtin/wallet/WalletTokenBalancesTool.js +67 -0
- package/dist/tools/builtin/wallet/WalletTokenBalancesTool.js.map +1 -0
- package/dist/tools/builtin/wallet/WalletTokenTransfersTool.d.ts +109 -0
- package/dist/tools/builtin/wallet/WalletTokenTransfersTool.d.ts.map +1 -0
- package/dist/tools/builtin/wallet/WalletTokenTransfersTool.js +353 -0
- package/dist/tools/builtin/wallet/WalletTokenTransfersTool.js.map +1 -0
- package/dist/tools/builtin/wallet/index.d.ts +25 -0
- package/dist/tools/builtin/wallet/index.d.ts.map +1 -0
- package/dist/tools/builtin/wallet/index.js +28 -0
- package/dist/tools/builtin/wallet/index.js.map +1 -0
- package/dist/tools/index.d.ts +4 -0
- package/dist/tools/index.d.ts.map +1 -0
- package/dist/tools/index.js +23 -0
- package/dist/tools/index.js.map +1 -0
- package/dist/types/index.d.ts +566 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/index.js +6 -0
- package/dist/types/index.js.map +1 -0
- package/package.json +52 -0
|
@@ -0,0 +1,380 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.PreviewAddLiquidityTool = void 0;
|
|
4
|
+
const BaseTool_1 = require("../../BaseTool");
|
|
5
|
+
const PoolService_1 = require("../../../services/PoolService");
|
|
6
|
+
const pool_1 = require("../../../functions/pool");
|
|
7
|
+
const PantographService_1 = require("../../../services/PantographService");
|
|
8
|
+
const web3_1 = require("../../../functions/web3");
|
|
9
|
+
const abi_1 = require("../../../constants/abi");
|
|
10
|
+
/**
|
|
11
|
+
* Tool: preview-add-liquidity
|
|
12
|
+
*
|
|
13
|
+
* Called when the user has filled the AddLiquidityForm with:
|
|
14
|
+
* - native amount (in wei)
|
|
15
|
+
* - minPrice + maxPrice (token1 per token0, decimal-adjusted — the same unit
|
|
16
|
+
* as `pool.currentPrice` returned by open-add-liquidity-form)
|
|
17
|
+
*
|
|
18
|
+
* The tool converts those prices into ticks (rounded to tickSpacing), fetches
|
|
19
|
+
* deBridge swap quotes for both legs, encodes the gateway.mint calldata, and
|
|
20
|
+
* returns:
|
|
21
|
+
* - a UI payload (`ConfirmAddLiquidityTx`) the FE renders as a confirmation
|
|
22
|
+
* panel showing expected token0/token1 amounts and the unsigned tx,
|
|
23
|
+
* - the unsigned tx itself in `props.unsignedTx`, which the FE will pass to
|
|
24
|
+
* a wallet-side execute function (e.g. wagmi.sendTransactionAsync).
|
|
25
|
+
*
|
|
26
|
+
* The user reviews the panel and either confirms (FE signs + broadcasts) or
|
|
27
|
+
* cancels. Native-only input — no approvals needed.
|
|
28
|
+
*/
|
|
29
|
+
class PreviewAddLiquidityTool extends BaseTool_1.BaseTool {
|
|
30
|
+
name = 'preview-add-liquidity';
|
|
31
|
+
kind = 'action';
|
|
32
|
+
category = 'pool-action';
|
|
33
|
+
description = 'Preview the add-liquidity transaction once the user has filled the AddLiquidityForm with a native amount ' +
|
|
34
|
+
'and a price range (min/max price in token1 per token0). The tool converts prices → ticks (rounded to ' +
|
|
35
|
+
'tickSpacing), fetches deBridge swap quotes for both legs, encodes the gateway.mint call, and returns an ' +
|
|
36
|
+
'unsigned tx the FE will sign. Do NOT call this until the user has filled both prices and an amount.';
|
|
37
|
+
parameters = [
|
|
38
|
+
{
|
|
39
|
+
name: 'poolAddress',
|
|
40
|
+
type: 'string',
|
|
41
|
+
description: 'V3 pool contract address (returned by open-add-liquidity-form in props.pool.address).',
|
|
42
|
+
required: true,
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
name: 'chain',
|
|
46
|
+
type: 'string',
|
|
47
|
+
description: 'Hex chain ID: "0x1" Ethereum, "0xa" Optimism, "0x38" BSC, "0x89" Polygon, "0x2105" Base, ' +
|
|
48
|
+
'"0xa4b1" Arbitrum, "0xa86a" Avalanche, "0xe708" Linea .Must match the pool\'s chain. Defaults to connected chain.',
|
|
49
|
+
required: true,
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
name: 'minPrice',
|
|
53
|
+
type: 'number',
|
|
54
|
+
description: 'Lower bound of the position price range, in token1-per-token0 units (decimal-adjusted — the SAME unit ' +
|
|
55
|
+
'as pool.currentPrice from open-add-liquidity-form). Example: if currentPrice is 1800 (USDC per WETH), ' +
|
|
56
|
+
'minPrice 900 means "the position is in-range while WETH ≥ 900 USDC". Must be > 0 and < maxPrice.',
|
|
57
|
+
required: true,
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
name: 'maxPrice',
|
|
61
|
+
type: 'number',
|
|
62
|
+
description: 'Upper bound of the position price range, in the same units as minPrice. Must be > minPrice. ' +
|
|
63
|
+
'Pass a very large number (or props.priceBounds.max) for a "full range upper" position.',
|
|
64
|
+
required: true,
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
name: 'nativeAmount',
|
|
68
|
+
type: 'number',
|
|
69
|
+
description: 'Native amount the user wants to spend, as a human-readable decimal number ' +
|
|
70
|
+
'(e.g. 0.1 for 0.1 ETH). The tool converts to wei internally.',
|
|
71
|
+
required: true,
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
name: 'slippageBps',
|
|
75
|
+
type: 'number',
|
|
76
|
+
description: 'Slippage tolerance in basis points (100 = 1%). Optional — defaults to 100.',
|
|
77
|
+
required: false,
|
|
78
|
+
},
|
|
79
|
+
];
|
|
80
|
+
pool;
|
|
81
|
+
defaultSlippageBps;
|
|
82
|
+
mintMinPercent;
|
|
83
|
+
pantograph;
|
|
84
|
+
constructor(config) {
|
|
85
|
+
super();
|
|
86
|
+
this.pool = new PoolService_1.PoolService(config?.pool);
|
|
87
|
+
this.defaultSlippageBps = config?.defaultSlippageBps ?? 'auto';
|
|
88
|
+
this.mintMinPercent = config?.mintMinPercent ?? 80;
|
|
89
|
+
this.pantograph = new PantographService_1.PantographService();
|
|
90
|
+
}
|
|
91
|
+
/** Forward `ui` from run() into the ToolResult envelope. */
|
|
92
|
+
async execute(args, userContext) {
|
|
93
|
+
const callId = `call_${Date.now()}_${Math.random().toString(36).slice(2, 8)}`;
|
|
94
|
+
const start = Date.now();
|
|
95
|
+
try {
|
|
96
|
+
const out = (await this.run(args, userContext));
|
|
97
|
+
const result = {
|
|
98
|
+
toolName: this.name,
|
|
99
|
+
callId,
|
|
100
|
+
success: true,
|
|
101
|
+
data: out,
|
|
102
|
+
duration: Date.now() - start,
|
|
103
|
+
};
|
|
104
|
+
if (out && typeof out === 'object' && out.ui) {
|
|
105
|
+
result.ui = out.ui;
|
|
106
|
+
}
|
|
107
|
+
return result;
|
|
108
|
+
}
|
|
109
|
+
catch (err) {
|
|
110
|
+
return {
|
|
111
|
+
toolName: this.name,
|
|
112
|
+
callId,
|
|
113
|
+
success: false,
|
|
114
|
+
error: err instanceof Error ? err.message : String(err),
|
|
115
|
+
duration: Date.now() - start,
|
|
116
|
+
};
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
async run(args, userContext) {
|
|
120
|
+
const poolAddress = typeof args.poolAddress === 'string' ? args.poolAddress.trim() : '';
|
|
121
|
+
const chain = typeof args.chain === 'string' && args.chain.trim() ? args.chain.trim() : userContext?.chain || '';
|
|
122
|
+
const minPrice = Number(args.minPrice);
|
|
123
|
+
const maxPrice = Number(args.maxPrice);
|
|
124
|
+
const nativeAmountHuman = typeof args.nativeAmount === 'number' && Number.isFinite(args.nativeAmount) ? args.nativeAmount : NaN;
|
|
125
|
+
const slippageBps = typeof args.slippageBps === 'number' && Number.isFinite(args.slippageBps) && String(args.slippageBps) !== 'auto'
|
|
126
|
+
? Math.floor(args.slippageBps) / 100
|
|
127
|
+
: String(this.defaultSlippageBps);
|
|
128
|
+
if (!poolAddress ||
|
|
129
|
+
!chain ||
|
|
130
|
+
!Number.isFinite(nativeAmountHuman) ||
|
|
131
|
+
!Number.isFinite(minPrice) ||
|
|
132
|
+
!Number.isFinite(maxPrice)) {
|
|
133
|
+
return {
|
|
134
|
+
error: 'missing_inputs',
|
|
135
|
+
_instructions: 'poolAddress, chain, minPrice, maxPrice, nativeAmount are all required.',
|
|
136
|
+
};
|
|
137
|
+
}
|
|
138
|
+
if (minPrice <= 0 || maxPrice <= 0 || minPrice >= maxPrice) {
|
|
139
|
+
return {
|
|
140
|
+
error: 'invalid_price_range',
|
|
141
|
+
_instructions: 'minPrice and maxPrice must both be > 0 and minPrice must be strictly less than maxPrice.',
|
|
142
|
+
};
|
|
143
|
+
}
|
|
144
|
+
if (nativeAmountHuman <= 0) {
|
|
145
|
+
return { error: 'invalid_native_amount', _instructions: 'nativeAmount must be > 0.' };
|
|
146
|
+
}
|
|
147
|
+
const meta = (0, PoolService_1.getChainMeta)(chain);
|
|
148
|
+
if (!meta)
|
|
149
|
+
return { error: 'unsupported_chain', chain };
|
|
150
|
+
const gateway = await this.pool.getGatewayAddress(chain);
|
|
151
|
+
if (!gateway)
|
|
152
|
+
return { error: 'no_gateway_configured', chain };
|
|
153
|
+
const walletAddress = userContext?.walletAddress;
|
|
154
|
+
if (!walletAddress)
|
|
155
|
+
return { error: 'wallet_not_connected' };
|
|
156
|
+
// Convert human-readable native amount to wei bigint
|
|
157
|
+
const native = (0, PoolService_1.getNativeTokenInfo)(chain);
|
|
158
|
+
const nativeAmount = BigInt(Math.floor(nativeAmountHuman * 10 ** native.decimals));
|
|
159
|
+
if (nativeAmount <= 0n) {
|
|
160
|
+
return { error: 'invalid_native_amount', _instructions: 'nativeAmount must be > 0.' };
|
|
161
|
+
}
|
|
162
|
+
// ---- Read pool to get tickSpacing + token decimals ----
|
|
163
|
+
const onchain = await this.pool.readPoolOnchain(chain, poolAddress);
|
|
164
|
+
const [token0Decimals, token1Decimals] = await Promise.all([
|
|
165
|
+
this.pool.readErc20Decimals(chain, onchain.token0),
|
|
166
|
+
this.pool.readErc20Decimals(chain, onchain.token1),
|
|
167
|
+
]);
|
|
168
|
+
// ---- Convert prices → ticks → align to tickSpacing ----
|
|
169
|
+
// Floor the lower tick (round down → wider range), ceil the upper tick
|
|
170
|
+
// (round up → wider range). Both are clamped to V3's protocol bounds.
|
|
171
|
+
const rawTickLower = (0, PoolService_1.priceToTick)(minPrice, token0Decimals, token1Decimals);
|
|
172
|
+
const rawTickUpper = (0, PoolService_1.priceToTick)(maxPrice, token0Decimals, token1Decimals);
|
|
173
|
+
const tickLower = (0, PoolService_1.clampTick)((0, PoolService_1.roundTickToSpacing)(rawTickLower, onchain.tickSpacing, 'down'));
|
|
174
|
+
const tickUpper = (0, PoolService_1.clampTick)((0, PoolService_1.roundTickToSpacing)(rawTickUpper, onchain.tickSpacing, 'up'));
|
|
175
|
+
if (tickLower >= tickUpper || tickLower < pool_1.MIN_TICK || tickUpper > pool_1.MAX_TICK) {
|
|
176
|
+
return {
|
|
177
|
+
error: 'invalid_range_after_alignment',
|
|
178
|
+
_instructions: 'After aligning to tickSpacing the range collapsed. Ask the user for a wider price range.',
|
|
179
|
+
rawTickLower,
|
|
180
|
+
rawTickUpper,
|
|
181
|
+
tickLower,
|
|
182
|
+
tickUpper,
|
|
183
|
+
};
|
|
184
|
+
}
|
|
185
|
+
// Re-derive the actual range prices from the aligned ticks so the FE
|
|
186
|
+
// can display what was really used (may differ slightly from user input).
|
|
187
|
+
const resolvedRange = {
|
|
188
|
+
tickLower,
|
|
189
|
+
tickUpper,
|
|
190
|
+
minPrice: (0, PoolService_1.tickToPrice)(tickLower, token0Decimals, token1Decimals),
|
|
191
|
+
maxPrice: (0, PoolService_1.tickToPrice)(tickUpper, token0Decimals, token1Decimals),
|
|
192
|
+
};
|
|
193
|
+
// ---- Re-check balance ----
|
|
194
|
+
const [balanceWei, gasReserveWei, nativePriceUsd] = await Promise.all([
|
|
195
|
+
this.pool.getNativeBalance(chain, walletAddress),
|
|
196
|
+
this.pool.estimateGasReserveWei(chain),
|
|
197
|
+
this.pool.getNativePriceUsd(chain),
|
|
198
|
+
]);
|
|
199
|
+
const required = nativeAmount + gasReserveWei;
|
|
200
|
+
if (balanceWei < required) {
|
|
201
|
+
return {
|
|
202
|
+
error: 'insufficient_balance',
|
|
203
|
+
_instructions: 'User does not have enough native coin (amount + gas reserve). ' +
|
|
204
|
+
'Tell them the shortfall in their language.',
|
|
205
|
+
balanceWei: balanceWei.toString(),
|
|
206
|
+
requiredWei: required.toString(),
|
|
207
|
+
gasReserveWei: gasReserveWei.toString(),
|
|
208
|
+
};
|
|
209
|
+
}
|
|
210
|
+
// ---- Split native amount across the two pool tokens ----
|
|
211
|
+
const split = this.pool.splitNativeAmountForRange({
|
|
212
|
+
nativeAmountWei: nativeAmount,
|
|
213
|
+
pool: onchain,
|
|
214
|
+
tickLower,
|
|
215
|
+
tickUpper,
|
|
216
|
+
token0Decimals,
|
|
217
|
+
token1Decimals,
|
|
218
|
+
});
|
|
219
|
+
// ---- Build swap legs (skip when native == pool token) ----
|
|
220
|
+
const t0IsNative = onchain.token0.toLowerCase() === PoolService_1.ZERO_ADDRESS;
|
|
221
|
+
const t1IsNative = onchain.token1.toLowerCase() === PoolService_1.ZERO_ADDRESS;
|
|
222
|
+
const legs = [];
|
|
223
|
+
if (t0IsNative || split.amountInFor0Wei === 0n) {
|
|
224
|
+
legs.push({
|
|
225
|
+
tokenIn: PoolService_1.ZERO_ADDRESS,
|
|
226
|
+
tokenOut: onchain.token0,
|
|
227
|
+
amountIn: split.amountInFor0Wei,
|
|
228
|
+
tx: { to: PoolService_1.ZERO_ADDRESS, data: '0x', value: '0' },
|
|
229
|
+
minAmountOut: t0IsNative ? split.amountInFor0Wei : 0n,
|
|
230
|
+
});
|
|
231
|
+
}
|
|
232
|
+
else {
|
|
233
|
+
const swap = await this.pool.fetchSwapLeg({
|
|
234
|
+
senderAddress: walletAddress,
|
|
235
|
+
chainId: chain,
|
|
236
|
+
tokenIn: PoolService_1.ZERO_ADDRESS,
|
|
237
|
+
tokenInAmount: split.amountInFor0Wei.toString(),
|
|
238
|
+
tokenOut: onchain.token0,
|
|
239
|
+
tokenOutRecipient: gateway,
|
|
240
|
+
slippage: typeof slippageBps === 'number' ? slippageBps : 'auto',
|
|
241
|
+
});
|
|
242
|
+
legs.push({
|
|
243
|
+
tokenIn: PoolService_1.ZERO_ADDRESS,
|
|
244
|
+
tokenOut: onchain.token0,
|
|
245
|
+
amountIn: split.amountInFor0Wei,
|
|
246
|
+
tx: { to: swap.to, data: swap.data, value: swap.value },
|
|
247
|
+
minAmountOut: BigInt(swap.minAmountOut || '0'),
|
|
248
|
+
});
|
|
249
|
+
}
|
|
250
|
+
if (t1IsNative || split.amountInFor1Wei === 0n) {
|
|
251
|
+
legs.push({
|
|
252
|
+
tokenIn: PoolService_1.ZERO_ADDRESS,
|
|
253
|
+
tokenOut: onchain.token1,
|
|
254
|
+
amountIn: split.amountInFor1Wei,
|
|
255
|
+
tx: { to: PoolService_1.ZERO_ADDRESS, data: '0x', value: '0' },
|
|
256
|
+
minAmountOut: t1IsNative ? split.amountInFor1Wei : 0n,
|
|
257
|
+
});
|
|
258
|
+
}
|
|
259
|
+
else {
|
|
260
|
+
const swap = await this.pool.fetchSwapLeg({
|
|
261
|
+
senderAddress: walletAddress,
|
|
262
|
+
chainId: chain,
|
|
263
|
+
tokenIn: PoolService_1.ZERO_ADDRESS,
|
|
264
|
+
tokenInAmount: split.amountInFor1Wei.toString(),
|
|
265
|
+
tokenOut: onchain.token1,
|
|
266
|
+
tokenOutRecipient: gateway,
|
|
267
|
+
slippage: typeof slippageBps === 'number' ? slippageBps : 'auto',
|
|
268
|
+
});
|
|
269
|
+
legs.push({
|
|
270
|
+
tokenIn: PoolService_1.ZERO_ADDRESS,
|
|
271
|
+
tokenOut: onchain.token1,
|
|
272
|
+
amountIn: split.amountInFor1Wei,
|
|
273
|
+
tx: { to: swap.to, data: swap.data, value: swap.value },
|
|
274
|
+
minAmountOut: BigInt(swap.minAmountOut || '0'),
|
|
275
|
+
});
|
|
276
|
+
}
|
|
277
|
+
// ---- amount0Min/amount1Min: floor at mintMinPercent of swap minOut ----
|
|
278
|
+
const floorMin = (n) => (n * BigInt(this.mintMinPercent)) / 100n;
|
|
279
|
+
const amount0Min = floorMin(legs[0].minAmountOut);
|
|
280
|
+
const amount1Min = floorMin(legs[1].minAmountOut);
|
|
281
|
+
const paymentInfo = legs.map((l) => ({
|
|
282
|
+
tokenIn: l.tokenIn,
|
|
283
|
+
tokenInAmount: BigInt(l.amountIn),
|
|
284
|
+
tokenOut: l.tokenOut,
|
|
285
|
+
tokenOutAmount: BigInt(l.minAmountOut),
|
|
286
|
+
}));
|
|
287
|
+
const exchangesInfo = legs.map((l) => ({
|
|
288
|
+
to: l.tx.to,
|
|
289
|
+
data: l.tx.data,
|
|
290
|
+
value: BigInt(l.tx.value || '0'),
|
|
291
|
+
}));
|
|
292
|
+
console.log('🚀 ~ PreviewAddLiquidityTool ~ run ~ paymentInfo:', paymentInfo);
|
|
293
|
+
console.log('🚀 ~ PreviewAddLiquidityTool ~ run ~ exchangesInfo:', exchangesInfo);
|
|
294
|
+
console.log('🚀 ~ PreviewAddLiquidityTool ~ run ~ args:', {
|
|
295
|
+
args: [
|
|
296
|
+
paymentInfo,
|
|
297
|
+
exchangesInfo,
|
|
298
|
+
{
|
|
299
|
+
fee: Number(onchain.fee),
|
|
300
|
+
amount0Min: BigInt(amount0Min),
|
|
301
|
+
amount1Min: BigInt(amount1Min),
|
|
302
|
+
tickLower,
|
|
303
|
+
tickUpper,
|
|
304
|
+
},
|
|
305
|
+
],
|
|
306
|
+
});
|
|
307
|
+
const calldata = (0, web3_1.encodeFunctionData)({
|
|
308
|
+
abi: abi_1.GatewayAbi,
|
|
309
|
+
functionName: 'mint',
|
|
310
|
+
args: [
|
|
311
|
+
paymentInfo,
|
|
312
|
+
exchangesInfo,
|
|
313
|
+
{
|
|
314
|
+
fee: Number(onchain.fee),
|
|
315
|
+
amount0Min: BigInt(amount0Min),
|
|
316
|
+
amount1Min: BigInt(amount1Min),
|
|
317
|
+
tickLower,
|
|
318
|
+
tickUpper,
|
|
319
|
+
},
|
|
320
|
+
],
|
|
321
|
+
});
|
|
322
|
+
const humanAmountIn = nativeAmountHuman;
|
|
323
|
+
const unsignedTx = {
|
|
324
|
+
chainId: chain,
|
|
325
|
+
to: gateway,
|
|
326
|
+
data: calldata,
|
|
327
|
+
value: nativeAmount.toString(),
|
|
328
|
+
from: walletAddress,
|
|
329
|
+
};
|
|
330
|
+
const txSummary = {
|
|
331
|
+
nativeIn: humanAmountIn,
|
|
332
|
+
nativeInUsd: nativePriceUsd != null ? humanAmountIn * nativePriceUsd : null,
|
|
333
|
+
ratio: { token0Percent: split.ratio0, token1Percent: split.ratio1 },
|
|
334
|
+
expectedToken0: Number(legs[0].minAmountOut) / 10 ** token0Decimals,
|
|
335
|
+
expectedToken1: Number(legs[1].minAmountOut) / 10 ** token1Decimals,
|
|
336
|
+
amount0Min: amount0Min.toString(),
|
|
337
|
+
amount1Min: amount1Min.toString(),
|
|
338
|
+
slippageBps,
|
|
339
|
+
};
|
|
340
|
+
const dataTokens = await this.pantograph.getTokensMetadata([onchain.token0, onchain.token1], chain);
|
|
341
|
+
const token0Info = dataTokens[onchain.token0];
|
|
342
|
+
const token1Info = dataTokens[onchain.token1];
|
|
343
|
+
const props = {
|
|
344
|
+
chain: { hexId: chain, name: meta.name },
|
|
345
|
+
unsignedTx,
|
|
346
|
+
summary: txSummary,
|
|
347
|
+
pool: {
|
|
348
|
+
...onchain,
|
|
349
|
+
feePercent: onchain.fee / 10_000,
|
|
350
|
+
token0: {
|
|
351
|
+
address: onchain.token0,
|
|
352
|
+
symbol: token0Info.symbol,
|
|
353
|
+
name: token0Info.name,
|
|
354
|
+
decimals: token0Info.decimals,
|
|
355
|
+
logo: token0Info.icon_image,
|
|
356
|
+
},
|
|
357
|
+
token1: {
|
|
358
|
+
address: onchain.token1,
|
|
359
|
+
symbol: token1Info.symbol,
|
|
360
|
+
name: token1Info.name,
|
|
361
|
+
decimals: token1Info.decimals,
|
|
362
|
+
logo: token1Info.icon_image,
|
|
363
|
+
},
|
|
364
|
+
},
|
|
365
|
+
range: resolvedRange,
|
|
366
|
+
gatewayAddress: gateway,
|
|
367
|
+
};
|
|
368
|
+
const ui = { component: 'ConfirmAddLiquidityTx', props };
|
|
369
|
+
return {
|
|
370
|
+
ui,
|
|
371
|
+
summary: `Ready to add ${humanAmountIn} ${native.symbol} to pool ${onchain.token0}/${onchain.token1} ` +
|
|
372
|
+
`${onchain.fee / 10_000}% on ${meta.name}, range [${resolvedRange.minPrice}, ${resolvedRange.maxPrice}].`,
|
|
373
|
+
_instructions: 'A confirmation panel has been opened on the FE; the user will sign and broadcast the unsigned tx with their wallet. ' +
|
|
374
|
+
'Briefly tell them (in their language) what is about to happen — the native amount, the auto-split ratio between the two pool tokens, ' +
|
|
375
|
+
'and the chosen price range. Do NOT mention internal tool/component names.',
|
|
376
|
+
};
|
|
377
|
+
}
|
|
378
|
+
}
|
|
379
|
+
exports.PreviewAddLiquidityTool = PreviewAddLiquidityTool;
|
|
380
|
+
//# sourceMappingURL=PreviewAddLiquidityTool.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PreviewAddLiquidityTool.js","sourceRoot":"","sources":["../../../../src/tools/builtin/pool/PreviewAddLiquidityTool.ts"],"names":[],"mappings":";;;AAAA,6CAA0C;AAY1C,+DAUuC;AACvC,kDAA6D;AAC7D,2EAAwE;AACxE,kDAA6D;AAC7D,gDAAoD;AAUpD;;;;;;;;;;;;;;;;;;GAkBG;AACH,MAAa,uBAAwB,SAAQ,mBAAQ;IACnD,IAAI,GAAG,uBAAuB,CAAC;IAC/B,IAAI,GAAa,QAAQ,CAAC;IAC1B,QAAQ,GAAG,aAAa,CAAC;IACzB,WAAW,GACT,2GAA2G;QAC3G,uGAAuG;QACvG,0GAA0G;QAC1G,qGAAqG,CAAC;IAExG,UAAU,GAAoB;QAC5B;YACE,IAAI,EAAE,aAAa;YACnB,IAAI,EAAE,QAAQ;YACd,WAAW,EAAE,uFAAuF;YACpG,QAAQ,EAAE,IAAI;SACf;QACD;YACE,IAAI,EAAE,OAAO;YACb,IAAI,EAAE,QAAQ;YACd,WAAW,EACT,2FAA2F;gBAC3F,mHAAmH;YACrH,QAAQ,EAAE,IAAI;SACf;QACD;YACE,IAAI,EAAE,UAAU;YAChB,IAAI,EAAE,QAAQ;YACd,WAAW,EACT,wGAAwG;gBACxG,wGAAwG;gBACxG,kGAAkG;YACpG,QAAQ,EAAE,IAAI;SACf;QACD;YACE,IAAI,EAAE,UAAU;YAChB,IAAI,EAAE,QAAQ;YACd,WAAW,EACT,8FAA8F;gBAC9F,wFAAwF;YAC1F,QAAQ,EAAE,IAAI;SACf;Q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C,EAAE,SAAS,EAAE,uBAAuB,EAAE,KAAK,EAAE,CAAC;QAEhG,OAAO;YACL,EAAE;YACF,OAAO,EACL,gBAAgB,aAAa,IAAI,MAAM,CAAC,MAAM,YAAY,OAAO,CAAC,MAAM,IAAI,OAAO,CAAC,MAAM,GAAG;gBAC7F,GAAG,OAAO,CAAC,GAAG,GAAG,MAAM,QAAQ,IAAI,CAAC,IAAI,YAAY,aAAa,CAAC,QAAQ,KAAK,aAAa,CAAC,QAAQ,IAAI;YAC3G,aAAa,EACX,sHAAsH;gBACtH,uIAAuI;gBACvI,2EAA2E;SAC9E,CAAC;IACJ,CAAC;CACF;AArYD,0DAqYC"}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import { BaseTool } from '../../BaseTool';
|
|
2
|
+
import type { ToolParameter, UserContext } from '../../../types';
|
|
3
|
+
import { type UniswapServiceConfig, type UniswapProtocolVersion } from '../../../services/UniswapService';
|
|
4
|
+
export type TopPoolsToolConfig = UniswapServiceConfig;
|
|
5
|
+
/**
|
|
6
|
+
* Tool: get-top-pools
|
|
7
|
+
*
|
|
8
|
+
* Wraps Uniswap's ExploreStats endpoint
|
|
9
|
+
* (`uniswap.explore.v1.ExploreStatsService/ExploreStats`) to surface the
|
|
10
|
+
* top liquidity pools for a given EVM chain. Returns pools ranked by TVL by
|
|
11
|
+
* default; sorting can be switched to volume or transaction count.
|
|
12
|
+
*/
|
|
13
|
+
export declare class TopPoolsTool extends BaseTool {
|
|
14
|
+
name: string;
|
|
15
|
+
description: string;
|
|
16
|
+
category: string;
|
|
17
|
+
parameters: ToolParameter[];
|
|
18
|
+
private service;
|
|
19
|
+
constructor(config?: TopPoolsToolConfig);
|
|
20
|
+
protected run(args: Record<string, unknown>, userContext?: UserContext): Promise<{
|
|
21
|
+
error: string;
|
|
22
|
+
_instructions?: undefined;
|
|
23
|
+
chain?: undefined;
|
|
24
|
+
protocolVersion?: undefined;
|
|
25
|
+
sortBy?: undefined;
|
|
26
|
+
count?: undefined;
|
|
27
|
+
pools?: undefined;
|
|
28
|
+
} | {
|
|
29
|
+
_instructions: string;
|
|
30
|
+
chain: string;
|
|
31
|
+
protocolVersion: UniswapProtocolVersion;
|
|
32
|
+
sortBy: "tvl" | "volume1Day" | "volume1Week" | "volume30Day" | "txCount" | "apr";
|
|
33
|
+
count: number;
|
|
34
|
+
pools: {
|
|
35
|
+
apr: number | undefined;
|
|
36
|
+
address: string;
|
|
37
|
+
chain: string | undefined;
|
|
38
|
+
protocolVersion: UniswapProtocolVersion | undefined;
|
|
39
|
+
feeTierBps: number | undefined;
|
|
40
|
+
feeTierPercent: number | undefined;
|
|
41
|
+
tvlUsd: number | undefined;
|
|
42
|
+
volume1DayUsd: number | undefined;
|
|
43
|
+
volume1WeekUsd: number | undefined;
|
|
44
|
+
volume30DayUsd: number | undefined;
|
|
45
|
+
txCount: number | undefined;
|
|
46
|
+
token0: {
|
|
47
|
+
address: string | undefined;
|
|
48
|
+
symbol: string | undefined;
|
|
49
|
+
name: string | undefined;
|
|
50
|
+
decimals: number | undefined;
|
|
51
|
+
priceUsd: number | undefined;
|
|
52
|
+
} | undefined;
|
|
53
|
+
token1: {
|
|
54
|
+
address: string | undefined;
|
|
55
|
+
symbol: string | undefined;
|
|
56
|
+
name: string | undefined;
|
|
57
|
+
decimals: number | undefined;
|
|
58
|
+
priceUsd: number | undefined;
|
|
59
|
+
} | undefined;
|
|
60
|
+
}[];
|
|
61
|
+
error?: undefined;
|
|
62
|
+
}>;
|
|
63
|
+
private parseProtocolVersion;
|
|
64
|
+
private parseSortKey;
|
|
65
|
+
/** Trim the upstream payload to the fields a downstream LLM actually needs. */
|
|
66
|
+
private formatPool;
|
|
67
|
+
}
|
|
68
|
+
//# sourceMappingURL=TopPoolsTool.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TopPoolsTool.d.ts","sourceRoot":"","sources":["../../../../src/tools/builtin/pool/TopPoolsTool.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,oBAAoB,EAEzB,KAAK,sBAAsB,EAC5B,MAAM,kCAAkC,CAAC;AAE1C,MAAM,MAAM,kBAAkB,GAAG,oBAAoB,CAAC;AAOtD;;;;;;;GAOG;AACH,qBAAa,YAAa,SAAQ,QAAQ;IACxC,IAAI,SAAmB;IACvB,WAAW,SAOsE;IACjF,QAAQ,SAAqB;IAC7B,UAAU,EAAE,aAAa,EAAE,CA6CzB;IAEF,OAAO,CAAC,OAAO,CAAiB;gBAEpB,MAAM,CAAC,EAAE,kBAAkB;cAKvB,GAAG,CAAC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,WAAW,CAAC,EAAE,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAuC5E,OAAO,CAAC,oBAAoB;IAU5B,OAAO,CAAC,YAAY;IAUpB,+EAA+E;IAC/E,OAAO,CAAC,UAAU;CAiCnB"}
|
|
@@ -0,0 +1,158 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.TopPoolsTool = void 0;
|
|
4
|
+
const BaseTool_1 = require("../../BaseTool");
|
|
5
|
+
const UniswapService_1 = require("../../../services/UniswapService");
|
|
6
|
+
const SUPPORTED_SORT_KEYS = ['tvl', 'volume1Day', 'volume1Week', 'volume30Day', 'txCount', 'apr'];
|
|
7
|
+
const SUPPORTED_VERSIONS = ['V2', 'V3', 'V4'];
|
|
8
|
+
/**
|
|
9
|
+
* Tool: get-top-pools
|
|
10
|
+
*
|
|
11
|
+
* Wraps Uniswap's ExploreStats endpoint
|
|
12
|
+
* (`uniswap.explore.v1.ExploreStatsService/ExploreStats`) to surface the
|
|
13
|
+
* top liquidity pools for a given EVM chain. Returns pools ranked by TVL by
|
|
14
|
+
* default; sorting can be switched to volume or transaction count.
|
|
15
|
+
*/
|
|
16
|
+
class TopPoolsTool extends BaseTool_1.BaseTool {
|
|
17
|
+
name = 'get-top-pools';
|
|
18
|
+
description = 'List the top Uniswap liquidity pools on a given EVM chain, ranked by TVL by default. ' +
|
|
19
|
+
"Returns each pool's address, fee tier, protocol version, both tokens (symbol, name, address, decimals), " +
|
|
20
|
+
'TVL, transaction count, and rolling volume buckets (1d / 1w / 30d). ' +
|
|
21
|
+
'Use this tool for questions like: "top pools on Ethereum", "biggest Uniswap V3 pools on Base", ' +
|
|
22
|
+
'"which pool has the most liquidity for USDC", "show pools with highest 24h volume on Arbitrum". ' +
|
|
23
|
+
'Source: https://app.uniswap.org/explore (ExploreStats gateway). ' +
|
|
24
|
+
'Supports: Ethereum, Optimism, BSC, Polygon, Base, Arbitrum, Avalanche, Linea';
|
|
25
|
+
category = 'blockchain-data';
|
|
26
|
+
parameters = [
|
|
27
|
+
{
|
|
28
|
+
name: 'chain',
|
|
29
|
+
type: 'string',
|
|
30
|
+
description: 'Hex chain ID: "0x1" Ethereum, "0xa" Optimism, "0x38" BSC, "0x89" Polygon, "0x2105" Base, ' +
|
|
31
|
+
'"0xa4b1" Arbitrum, "0xa86a" Avalanche, "0xe708" Linea. Defaults to connected chain.',
|
|
32
|
+
required: true,
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
name: 'protocolVersion',
|
|
36
|
+
type: 'string',
|
|
37
|
+
description: 'Uniswap protocol version to filter by: "V2", "V3", or "V4". ' +
|
|
38
|
+
'Default is "V3" (the dataset with the richest stats). ' +
|
|
39
|
+
'Use "V4" only when the user explicitly asks for V4 pools.',
|
|
40
|
+
required: false,
|
|
41
|
+
default: 'V3',
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
name: 'sortBy',
|
|
45
|
+
type: 'string',
|
|
46
|
+
description: 'Ranking metric: "tvl" (total value locked, default), "volume1Day", "volume1Week", ' +
|
|
47
|
+
'"volume30Day", "txCount", or "apr" (estimated annualized fee yield). ' +
|
|
48
|
+
'Pools are returned in descending order by this metric.',
|
|
49
|
+
required: false,
|
|
50
|
+
default: 'tvl',
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
name: 'limit',
|
|
54
|
+
type: 'number',
|
|
55
|
+
description: 'Maximum number of pools to return after sorting. Defaults to 10.',
|
|
56
|
+
required: false,
|
|
57
|
+
default: 10,
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
name: 'multichain',
|
|
61
|
+
type: 'boolean',
|
|
62
|
+
description: "When true, request Uniswap's multichain aggregated view instead of a single chain. " +
|
|
63
|
+
'Defaults to false. Most queries should leave this off.',
|
|
64
|
+
required: false,
|
|
65
|
+
default: false,
|
|
66
|
+
},
|
|
67
|
+
];
|
|
68
|
+
service;
|
|
69
|
+
constructor(config) {
|
|
70
|
+
super();
|
|
71
|
+
this.service = new UniswapService_1.UniswapService(config);
|
|
72
|
+
}
|
|
73
|
+
async run(args, userContext) {
|
|
74
|
+
const chain = typeof args.chain === 'string' && args.chain.trim() ? args.chain.trim() : userContext?.chain || '0x1';
|
|
75
|
+
const protocolVersion = this.parseProtocolVersion(args.protocolVersion);
|
|
76
|
+
const sortBy = this.parseSortKey(args.sortBy);
|
|
77
|
+
const limit = typeof args.limit === 'number' && Number.isFinite(args.limit) && args.limit > 0
|
|
78
|
+
? Math.min(Math.floor(args.limit), 50)
|
|
79
|
+
: 10;
|
|
80
|
+
const multichain = args.multichain === true;
|
|
81
|
+
const result = await this.service.getTopPools({
|
|
82
|
+
chain,
|
|
83
|
+
protocolVersion,
|
|
84
|
+
sortBy,
|
|
85
|
+
limit,
|
|
86
|
+
multichain,
|
|
87
|
+
});
|
|
88
|
+
if (!result.success) {
|
|
89
|
+
return { error: result.error || 'Failed to fetch top pools' };
|
|
90
|
+
}
|
|
91
|
+
const pools = (result.data ?? []).map((p) => this.formatPool(p));
|
|
92
|
+
return {
|
|
93
|
+
_instructions: 'Present the pools as a ranked list. For each pool show: rank, pair (token0/token1 symbols), apr(in %), ' +
|
|
94
|
+
'fee tier (in %), TVL in USD, 24h volume, 24h fee revenue, and protocol version. ' +
|
|
95
|
+
'Format numbers human-readably (e.g. $12.5M, 0.05%). Mention the chain and the sort metric ' +
|
|
96
|
+
'in the intro line. If a value is null, omit it. Do NOT mention tool or API names.',
|
|
97
|
+
chain,
|
|
98
|
+
protocolVersion,
|
|
99
|
+
sortBy,
|
|
100
|
+
count: pools.length,
|
|
101
|
+
pools,
|
|
102
|
+
};
|
|
103
|
+
}
|
|
104
|
+
parseProtocolVersion(value) {
|
|
105
|
+
if (typeof value === 'string') {
|
|
106
|
+
const upper = value.trim().toUpperCase();
|
|
107
|
+
if (SUPPORTED_VERSIONS.includes(upper)) {
|
|
108
|
+
return upper;
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
return 'V3';
|
|
112
|
+
}
|
|
113
|
+
parseSortKey(value) {
|
|
114
|
+
if (typeof value === 'string') {
|
|
115
|
+
const trimmed = value.trim();
|
|
116
|
+
if (SUPPORTED_SORT_KEYS.includes(trimmed)) {
|
|
117
|
+
return trimmed;
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
return 'tvl';
|
|
121
|
+
}
|
|
122
|
+
/** Trim the upstream payload to the fields a downstream LLM actually needs. */
|
|
123
|
+
formatPool(p) {
|
|
124
|
+
return {
|
|
125
|
+
apr: p.apr,
|
|
126
|
+
address: p.id,
|
|
127
|
+
chain: p.chain,
|
|
128
|
+
protocolVersion: p.protocolVersion,
|
|
129
|
+
feeTierBps: p.feeTier,
|
|
130
|
+
feeTierPercent: typeof p.feeTier === 'number' ? p.feeTier / 10_000 : undefined,
|
|
131
|
+
tvlUsd: p.totalLiquidity?.value,
|
|
132
|
+
volume1DayUsd: p.volume1Day?.value,
|
|
133
|
+
volume1WeekUsd: p.volume1Week?.value,
|
|
134
|
+
volume30DayUsd: p.volume30Day?.value,
|
|
135
|
+
txCount: p.txCount,
|
|
136
|
+
token0: p.token0
|
|
137
|
+
? {
|
|
138
|
+
address: p.token0.address,
|
|
139
|
+
symbol: p.token0.symbol,
|
|
140
|
+
name: p.token0.name,
|
|
141
|
+
decimals: p.token0.decimals,
|
|
142
|
+
priceUsd: p.token0.price?.value,
|
|
143
|
+
}
|
|
144
|
+
: undefined,
|
|
145
|
+
token1: p.token1
|
|
146
|
+
? {
|
|
147
|
+
address: p.token1.address,
|
|
148
|
+
symbol: p.token1.symbol,
|
|
149
|
+
name: p.token1.name,
|
|
150
|
+
decimals: p.token1.decimals,
|
|
151
|
+
priceUsd: p.token1.price?.value,
|
|
152
|
+
}
|
|
153
|
+
: undefined,
|
|
154
|
+
};
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
exports.TopPoolsTool = TopPoolsTool;
|
|
158
|
+
//# sourceMappingURL=TopPoolsTool.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TopPoolsTool.js","sourceRoot":"","sources":["../../../../src/tools/builtin/pool/TopPoolsTool.ts"],"names":[],"mappings":";;;AAAA,6CAA0C;AAE1C,qEAK0C;AAI1C,MAAM,mBAAmB,GAAG,CAAC,KAAK,EAAE,YAAY,EAAE,aAAa,EAAE,aAAa,EAAE,SAAS,EAAE,KAAK,CAAU,CAAC;AAG3G,MAAM,kBAAkB,GAA6B,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC;AAExE;;;;;;;GAOG;AACH,MAAa,YAAa,SAAQ,mBAAQ;IACxC,IAAI,GAAG,eAAe,CAAC;IACvB,WAAW,GACT,uFAAuF;QACvF,0GAA0G;QAC1G,sEAAsE;QACtE,iGAAiG;QACjG,kGAAkG;QAClG,kEAAkE;QAClE,8EAA8E,CAAC;IACjF,QAAQ,GAAG,iBAAiB,CAAC;IAC7B,UAAU,GAAoB;QAC5B;YACE,IAAI,EAAE,OAAO;YACb,IAAI,EAAE,QAAQ;YACd,WAAW,EACT,2FAA2F;g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AC,CAAC,SAAS;YACb,MAAM,EAAE,CAAC,CAAC,MAAM;gBACd,CAAC,CAAC;oBACE,OAAO,EAAE,CAAC,CAAC,MAAM,CAAC,OAAO;oBACzB,MAAM,EAAE,CAAC,CAAC,MAAM,CAAC,MAAM;oBACvB,IAAI,EAAE,CAAC,CAAC,MAAM,CAAC,IAAI;oBACnB,QAAQ,EAAE,CAAC,CAAC,MAAM,CAAC,QAAQ;oBAC3B,QAAQ,EAAE,CAAC,CAAC,MAAM,CAAC,KAAK,EAAE,KAAK;iBAChC;gBACH,CAAC,CAAC,SAAS;SACd,CAAC;IACJ,CAAC;CACF;AA9JD,oCA8JC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export { TopPoolsTool } from './TopPoolsTool';
|
|
2
|
+
export type { TopPoolsToolConfig } from './TopPoolsTool';
|
|
3
|
+
export { PoolDetailTool } from './PoolDetailTool';
|
|
4
|
+
export type { PoolDetailToolConfig } from './PoolDetailTool';
|
|
5
|
+
export { PoolSearchTool } from './PoolSearchTool';
|
|
6
|
+
export type { PoolSearchToolConfig } from './PoolSearchTool';
|
|
7
|
+
export { PoolByAddressTool } from './PoolByAddressTool';
|
|
8
|
+
export type { PoolByAddressToolConfig } from './PoolByAddressTool';
|
|
9
|
+
export { OpenAddLiquidityFormTool } from './OpenAddLiquidityFormTool';
|
|
10
|
+
export type { OpenAddLiquidityFormToolConfig } from './OpenAddLiquidityFormTool';
|
|
11
|
+
export { PreviewAddLiquidityTool } from './PreviewAddLiquidityTool';
|
|
12
|
+
export type { PreviewAddLiquidityToolConfig } from './PreviewAddLiquidityTool';
|
|
13
|
+
export { EstimatePoolYieldTool } from './EstimatePoolYieldTool';
|
|
14
|
+
export type { EstimatePoolYieldToolConfig } from './EstimatePoolYieldTool';
|
|
15
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
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"}
|