keyring-agent-core 0.2.0 → 0.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +6692 -27
- package/dist/index.js +877 -70
- package/package.json +4 -3
- 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
package/dist/types/index.d.ts
DELETED
|
@@ -1,777 +0,0 @@
|
|
|
1
|
-
import type { PoolOnchainInfo } from '../services/PoolService';
|
|
2
|
-
/** Role inside a conversation */
|
|
3
|
-
export type ChatRole = 'user' | 'assistant' | 'system' | 'tool';
|
|
4
|
-
/** A single message in the conversation */
|
|
5
|
-
export interface ChatMessage {
|
|
6
|
-
role: ChatRole;
|
|
7
|
-
content: string;
|
|
8
|
-
/** If role === 'tool', the name of the tool that produced this message */
|
|
9
|
-
toolName?: string;
|
|
10
|
-
/** If role === 'tool', the call id this result belongs to */
|
|
11
|
-
toolCallId?: string;
|
|
12
|
-
/** If role === 'assistant' and the model made function calls */
|
|
13
|
-
toolCalls?: LLMToolCall[];
|
|
14
|
-
/**
|
|
15
|
-
* Names of the subagents that produced this assistant message (if any).
|
|
16
|
-
* Used for follow-up resolution: if this turn was handled by ["wallet-agent"],
|
|
17
|
-
* a short reply like "more" / "tiếp" almost certainly still belongs to wallet.
|
|
18
|
-
* Only set on role === 'assistant' (the final user-facing answer).
|
|
19
|
-
*/
|
|
20
|
-
subagents?: string[];
|
|
21
|
-
/**
|
|
22
|
-
* Suggested follow-up prompts attached to this assistant turn. Persisted with
|
|
23
|
-
* history so that when a session is restored, the FE can re-render the same
|
|
24
|
-
* suggestion chips next to the message. Only set on role === 'assistant'.
|
|
25
|
-
*/
|
|
26
|
-
suggestedPrompts?: string[];
|
|
27
|
-
/**
|
|
28
|
-
* UI payloads (forms / confirms / result widgets) emitted by tools during
|
|
29
|
-
* this turn. Persisted with history so the FE can re-render these widgets
|
|
30
|
-
* after a reload. Only set on role === 'assistant'.
|
|
31
|
-
*/
|
|
32
|
-
uiActions?: UIPayload[];
|
|
33
|
-
/**
|
|
34
|
-
* Tool-emitted clickable buttons attached to this assistant turn (e.g. a
|
|
35
|
-
* token picker after the user said "send token"). Persisted with history so
|
|
36
|
-
* the FE can re-render them after a reload. Only set on role === 'assistant'.
|
|
37
|
-
*/
|
|
38
|
-
actionButtons?: SuggestedAction[];
|
|
39
|
-
/**
|
|
40
|
-
* Stable id of the response turn (matches `AgentResponse.messageId`). Lets
|
|
41
|
-
* the FE key persistent widgets across reloads. Only set on role === 'assistant'.
|
|
42
|
-
*/
|
|
43
|
-
messageId?: string;
|
|
44
|
-
/**
|
|
45
|
-
* Internal flag — set on the bridging assistant message that `persistToolMessages`
|
|
46
|
-
* injects after each subagent's tool exchange (to satisfy Gemini's rule that
|
|
47
|
-
* function-response turns must be followed by a model turn). These messages
|
|
48
|
-
* must be stripped before building a Synthesiser or direct-LLM history so they
|
|
49
|
-
* don't appear as duplicate model turns alongside the synthesised answer.
|
|
50
|
-
*/
|
|
51
|
-
_intermediate?: boolean;
|
|
52
|
-
timestamp: number;
|
|
53
|
-
}
|
|
54
|
-
/** Describes a parameter for a tool */
|
|
55
|
-
export interface ToolParameter {
|
|
56
|
-
name: string;
|
|
57
|
-
type: 'string' | 'number' | 'boolean' | 'object' | 'array';
|
|
58
|
-
description: string;
|
|
59
|
-
required: boolean;
|
|
60
|
-
default?: unknown;
|
|
61
|
-
/** For array types, the type of items in the array (default: 'string') */
|
|
62
|
-
items?: {
|
|
63
|
-
type: 'string' | 'number' | 'boolean' | 'object';
|
|
64
|
-
};
|
|
65
|
-
}
|
|
66
|
-
/**
|
|
67
|
-
* Tool kind — drives how the orchestrator handles the result.
|
|
68
|
-
* - 'data' (default): result fed back into the LLM for synthesis
|
|
69
|
-
* - 'ui' : result includes a `ui` payload that the FE renders as a component
|
|
70
|
-
* - 'action' : result includes an unsigned transaction the FE will sign + send
|
|
71
|
-
*/
|
|
72
|
-
export type ToolKind = 'data' | 'ui' | 'action';
|
|
73
|
-
/** Definition of a single tool that the agent can invoke */
|
|
74
|
-
export interface ToolDefinition {
|
|
75
|
-
/** Unique tool name (slug-style, e.g. "get-faq") */
|
|
76
|
-
name: string;
|
|
77
|
-
/** Human-readable description – sent to the LLM so it knows when to use the tool */
|
|
78
|
-
description: string;
|
|
79
|
-
/** The parameters the tool accepts */
|
|
80
|
-
parameters: ToolParameter[];
|
|
81
|
-
/** Optional category for grouping */
|
|
82
|
-
category?: string;
|
|
83
|
-
/** Whether this tool returns plain data, a UI payload, or an unsigned action. Default 'data'. */
|
|
84
|
-
kind?: ToolKind;
|
|
85
|
-
/**
|
|
86
|
-
* When true, AgentCore skips generating `suggestedPrompts` for any turn in
|
|
87
|
-
* which this tool was executed. Use on tools that already drive the user to
|
|
88
|
-
* a concrete next step (e.g. pool action forms, wallet-action forms) where
|
|
89
|
-
* generic suggestions add noise instead of helping.
|
|
90
|
-
* Default false.
|
|
91
|
-
*/
|
|
92
|
-
noSuggestions?: boolean;
|
|
93
|
-
}
|
|
94
|
-
/**
|
|
95
|
-
* UI payload emitted by a tool. The FE has pre-built components keyed by
|
|
96
|
-
* `component`; it dispatches on the name and forwards `props` verbatim.
|
|
97
|
-
*
|
|
98
|
-
* `TProps` is the typed shape of `props`. Tools that ship typed props should
|
|
99
|
-
* narrow this generic (e.g. `UIPayload<AddLiquidityFormProps>`) so the FE can
|
|
100
|
-
* `props as AddLiquidityFormProps` without losing type-safety.
|
|
101
|
-
*/
|
|
102
|
-
export interface UIPayload<TProps = Record<string, unknown>> {
|
|
103
|
-
/** Component name registered on the FE (e.g. "AddLiquidityForm") */
|
|
104
|
-
component: string;
|
|
105
|
-
/** Props forwarded to that component as-is */
|
|
106
|
-
props: TProps;
|
|
107
|
-
/**
|
|
108
|
-
* BCP-47 language tag (e.g. "en", "vi", "zh", "ja") detected from the
|
|
109
|
-
* CURRENT user message. Stamped by AgentCore so the FE renders this
|
|
110
|
-
* component in whichever language the user just typed in — independent of
|
|
111
|
-
* the FE's app locale. Tools do NOT set this themselves.
|
|
112
|
-
*/
|
|
113
|
-
language?: string;
|
|
114
|
-
}
|
|
115
|
-
/** Identifies a chain in BE↔FE payloads. */
|
|
116
|
-
export interface ChainRef {
|
|
117
|
-
/** Hex chain id, e.g. "0x2105" for Base */
|
|
118
|
-
hexId: string;
|
|
119
|
-
/** Human-readable chain name, e.g. "Base" */
|
|
120
|
-
name: string;
|
|
121
|
-
}
|
|
122
|
-
/** A token shown to the user inside a pool/strategy display. */
|
|
123
|
-
export interface TokenDisplay {
|
|
124
|
-
address: string;
|
|
125
|
-
symbol?: string;
|
|
126
|
-
name?: string;
|
|
127
|
-
decimals?: number;
|
|
128
|
-
logo?: string;
|
|
129
|
-
}
|
|
130
|
-
/** On-chain + display state of a Uniswap V3 pool, normalised for the FE. */
|
|
131
|
-
export interface PoolDisplayInfo {
|
|
132
|
-
address: string;
|
|
133
|
-
/** Fee tier in basis points (e.g. 500 for 0.05%) */
|
|
134
|
-
fee: number;
|
|
135
|
-
/** Same as `fee / 10_000` — pre-computed for convenience */
|
|
136
|
-
feePercent: number;
|
|
137
|
-
tickSpacing: number;
|
|
138
|
-
currentTick: number;
|
|
139
|
-
/** Decimal-adjusted price (token1 per token0) */
|
|
140
|
-
currentPrice: number;
|
|
141
|
-
/** Stringified bigint — sqrt price in Q96 fixed-point */
|
|
142
|
-
sqrtPriceX96: string;
|
|
143
|
-
token0: TokenDisplay;
|
|
144
|
-
token1: TokenDisplay;
|
|
145
|
-
}
|
|
146
|
-
/**
|
|
147
|
-
* Hard bounds for the price-range inputs (token1 per token0, decimal-adjusted).
|
|
148
|
-
* The form should clamp user inputs to this window — anything outside the
|
|
149
|
-
* Uniswap V3 valid tick range is unmintable.
|
|
150
|
-
*/
|
|
151
|
-
export interface PriceBounds {
|
|
152
|
-
/** Decimal-adjusted absolute minimum (corresponds to MIN_TICK). */
|
|
153
|
-
min: number;
|
|
154
|
-
/** Decimal-adjusted absolute maximum (corresponds to MAX_TICK). */
|
|
155
|
-
max: number;
|
|
156
|
-
}
|
|
157
|
-
/** Pre-computed quick-pick chip (e.g. "25% of spendable"). */
|
|
158
|
-
export interface QuickRate {
|
|
159
|
-
percent: number;
|
|
160
|
-
/** Wei as decimal string */
|
|
161
|
-
amountWei: string;
|
|
162
|
-
/** Human-readable amount in token units */
|
|
163
|
-
amount: number;
|
|
164
|
-
}
|
|
165
|
-
/**
|
|
166
|
-
* Self-contained block describing the input field of the AddLiquidityForm.
|
|
167
|
-
* The CoinPool gateway only accepts native coin as input — the FE renders a
|
|
168
|
-
* locked input bound to this single token.
|
|
169
|
-
*/
|
|
170
|
-
export interface InputTokenInfo {
|
|
171
|
-
/** Always zeroAddress for native */
|
|
172
|
-
address: string;
|
|
173
|
-
/** Always true today — kept for forward compatibility */
|
|
174
|
-
isNative: boolean;
|
|
175
|
-
symbol: string;
|
|
176
|
-
name: string;
|
|
177
|
-
decimals: number;
|
|
178
|
-
/** USD price; null when the price oracle was unavailable */
|
|
179
|
-
priceUsd: number | null;
|
|
180
|
-
balanceWei: string;
|
|
181
|
-
balance: number;
|
|
182
|
-
gasReserveWei: string;
|
|
183
|
-
spendableWei: string;
|
|
184
|
-
spendable: number;
|
|
185
|
-
/** spendable × priceUsd; null when priceUsd is null */
|
|
186
|
-
spendableUsd: number | null;
|
|
187
|
-
/** Quick-pick chips (25/50/75/100% of spendable) */
|
|
188
|
-
quickRates: QuickRate[];
|
|
189
|
-
/** Minimum USD value the user must add (e.g. 10) */
|
|
190
|
-
minProvideUsd: number;
|
|
191
|
-
/** Machine-readable warning code; null when balance is fine */
|
|
192
|
-
warning: 'no_balance' | 'insufficient_balance' | null;
|
|
193
|
-
/** Optional human-language hint mirroring `warning` */
|
|
194
|
-
warningMessage: string | null;
|
|
195
|
-
/**
|
|
196
|
-
* Pre-fill amount the FE should populate the input with on first render.
|
|
197
|
-
* Set when the user supplied an amount before choosing a pool (e.g.
|
|
198
|
-
* "add 0.1 ETH to USDC/WETH"). null when no pre-fill is available.
|
|
199
|
-
*/
|
|
200
|
-
prefillAmount: number | null;
|
|
201
|
-
prefillAmountWei: string | null;
|
|
202
|
-
}
|
|
203
|
-
/**
|
|
204
|
-
* Pre-filled price range for the AddLiquidityForm. The FE should populate the
|
|
205
|
-
* min/max inputs with these values on first render, but MUST keep the inputs
|
|
206
|
-
* editable so the user can override before submitting.
|
|
207
|
-
*/
|
|
208
|
-
export interface PriceRangePrefill {
|
|
209
|
-
/**
|
|
210
|
-
* How the range was derived:
|
|
211
|
-
* - "user": user passed explicit minPrice / maxPrice
|
|
212
|
-
* - "stable": ±tickSpacing × N around currentTick (narrow, high-yield, high-out-of-range risk)
|
|
213
|
-
* - "wide": currentPrice × [0.5, 2.0] (broad, lower yield, less rebalancing)
|
|
214
|
-
* - "full": [priceBounds.min, priceBounds.max] (full V3 tick range, lowest yield, no out-of-range risk)
|
|
215
|
-
*/
|
|
216
|
-
strategy: 'user' | 'stable' | 'wide' | 'full';
|
|
217
|
-
/** Decimal-adjusted prices in token1-per-token0 units (same as pool.currentPrice). */
|
|
218
|
-
minPrice: number;
|
|
219
|
-
maxPrice: number;
|
|
220
|
-
}
|
|
221
|
-
/** Props for the FE `AddLiquidityForm` component. */
|
|
222
|
-
export interface AddLiquidityFormProps {
|
|
223
|
-
chain: ChainRef;
|
|
224
|
-
pool: PoolDisplayInfo;
|
|
225
|
-
inputToken: InputTokenInfo;
|
|
226
|
-
/**
|
|
227
|
-
* Allowed bounds for the user-entered price range, in token1-per-token0 units
|
|
228
|
-
* (decimal-adjusted, the same unit as `pool.currentPrice`). The form should
|
|
229
|
-
* not let the user submit values outside this window.
|
|
230
|
-
*/
|
|
231
|
-
priceBounds: PriceBounds;
|
|
232
|
-
/**
|
|
233
|
-
* Optional pre-fill for the min/max price inputs. Populated when the user
|
|
234
|
-
* named explicit prices ("range 1800 to 2200") or asked for a preset strategy
|
|
235
|
-
* ("safe range", "wide range"). null when no pre-fill was requested. The FE
|
|
236
|
-
* must keep the inputs editable in all cases.
|
|
237
|
-
*/
|
|
238
|
-
prefillRange: PriceRangePrefill | null;
|
|
239
|
-
/** CoinPool gateway contract address on this chain */
|
|
240
|
-
gatewayAddress: string;
|
|
241
|
-
}
|
|
242
|
-
export type WalletActionType = 'send_native' | 'send_token' | 'approve_token' | 'wrap_native' | 'unwrap_native';
|
|
243
|
-
/**
|
|
244
|
-
* Common envelope every wallet-action tool returns as its UI payload `props`.
|
|
245
|
-
* The FE renders the form keyed by `action`, pre-fills inputs from `parameters`,
|
|
246
|
-
* and submits the on-chain tx itself.
|
|
247
|
-
*
|
|
248
|
-
* `parameters` mirrors the field set declared in the chatbot SDK's
|
|
249
|
-
* `ACTION_SCHEMAS` (keyring-chatbot-agent-sdk) so the FE can reuse its existing
|
|
250
|
-
* `<ActionForm>` rendering without changes.
|
|
251
|
-
*/
|
|
252
|
-
export interface WalletActionProps {
|
|
253
|
-
action: WalletActionType;
|
|
254
|
-
/** Hex chain id, e.g. "0x1", "0x2105". Falls back to userContext.chain. */
|
|
255
|
-
chainId: string;
|
|
256
|
-
/** Connected wallet that will sign the tx. */
|
|
257
|
-
walletAddress: string;
|
|
258
|
-
/**
|
|
259
|
-
* Field values to pre-fill in the form. Keys match the chatbot SDK schema
|
|
260
|
-
* (e.g. to_address, amount, contract_address, token_symbol, decimals, …).
|
|
261
|
-
* Missing keys mean "ask the user for this field".
|
|
262
|
-
*/
|
|
263
|
-
parameters: Record<string, string>;
|
|
264
|
-
}
|
|
265
|
-
/** Unsigned EVM transaction the FE will pass to the connected wallet. */
|
|
266
|
-
export interface UnsignedTx {
|
|
267
|
-
/** Hex chain id */
|
|
268
|
-
chainId: string;
|
|
269
|
-
to: string;
|
|
270
|
-
data: string;
|
|
271
|
-
/** Wei as decimal string */
|
|
272
|
-
value: string;
|
|
273
|
-
from: string;
|
|
274
|
-
}
|
|
275
|
-
/** One side of a buy, with whatever identity the tool could resolve. */
|
|
276
|
-
export interface BuyTokenSide {
|
|
277
|
-
/** Contract address (0x…) or the literal "native". */
|
|
278
|
-
address: string;
|
|
279
|
-
symbol?: string;
|
|
280
|
-
decimals?: number;
|
|
281
|
-
/** Human-readable amount (e.g. "10" for 10 USDC). */
|
|
282
|
-
amount?: string;
|
|
283
|
-
/** Amount in the token's smallest unit (wei-equivalent), as a decimal string. */
|
|
284
|
-
rawAmount?: string;
|
|
285
|
-
}
|
|
286
|
-
/**
|
|
287
|
-
* Props for the FE `BuyTokenConfirmTx` component — the single data cube the
|
|
288
|
-
* BuyTokenTool ships once the user has supplied pay token + dest token + a
|
|
289
|
-
* spend amount.
|
|
290
|
-
*
|
|
291
|
-
* The tool has already: fetched a swap quote (so `estimatedOut` is the expected
|
|
292
|
-
* receive amount), built the raw swap transaction (`swapTx`), and checked
|
|
293
|
-
* allowance (`approveTx` is set only when an approval must run first). The FE
|
|
294
|
-
* renders a confirmation panel and executes approve (if any) then swap itself —
|
|
295
|
-
* no further BE round-trip is needed. This is NOT a wallet-action form payload:
|
|
296
|
-
* BuyTokenTool emits its own UI component, so `buy_token` is intentionally NOT
|
|
297
|
-
* a member of WalletActionType.
|
|
298
|
-
*/
|
|
299
|
-
export interface BuyTokenConfirmTxProps {
|
|
300
|
-
chain: ChainRef;
|
|
301
|
-
/** Token the user spends. */
|
|
302
|
-
payToken: BuyTokenSide;
|
|
303
|
-
/** Token the user receives. */
|
|
304
|
-
buyToken: BuyTokenSide;
|
|
305
|
-
/** Estimated receive amount of buyToken (human-readable), when the provider reported one. */
|
|
306
|
-
estimatedOut?: string;
|
|
307
|
-
/** Estimated receive amount of buyToken in smallest units, when available. */
|
|
308
|
-
estimatedOutRaw?: string;
|
|
309
|
-
/** Swap provider that produced the quote (e.g. "debridge", "relay"). */
|
|
310
|
-
provider?: string;
|
|
311
|
-
/** Raw swap transaction the FE signs + broadcasts. */
|
|
312
|
-
swapTx: UnsignedTx;
|
|
313
|
-
/**
|
|
314
|
-
* Raw ERC-20 approve transaction to run BEFORE the swap. Present only when an
|
|
315
|
-
* allowance is required (native pay token or sufficient allowance ⇒ omitted).
|
|
316
|
-
*/
|
|
317
|
-
approveTx?: UnsignedTx;
|
|
318
|
-
}
|
|
319
|
-
/**
|
|
320
|
-
* Props for the FE `SwapTokenConfirmTx` component — the single data cube the
|
|
321
|
-
* SwapTokenTool ships once the user has supplied a SOURCE token they hold,
|
|
322
|
-
* a destination token, and a source amount.
|
|
323
|
-
*
|
|
324
|
-
* Mechanically identical to {@link BuyTokenConfirmTxProps} (deBridge EXACT_INPUT
|
|
325
|
-
* quote → raw swap tx → optional approve), but the framing is "swap FROM a token
|
|
326
|
-
* I already hold TO another token": `fromToken` is the user's held source token
|
|
327
|
-
* (always balance-checked) and `toToken` is what they receive. Like buy, this is
|
|
328
|
-
* NOT a wallet-action form payload — SwapTokenTool emits its own UI component, so
|
|
329
|
-
* `swap_token` is intentionally NOT a member of WalletActionType.
|
|
330
|
-
*/
|
|
331
|
-
export interface SwapTokenConfirmTxProps {
|
|
332
|
-
chain: ChainRef;
|
|
333
|
-
/** Token the user spends (the source they already hold). */
|
|
334
|
-
fromToken: BuyTokenSide;
|
|
335
|
-
/** Token the user receives. */
|
|
336
|
-
toToken: BuyTokenSide;
|
|
337
|
-
/** Estimated receive amount of toToken (human-readable), when the provider reported one. */
|
|
338
|
-
estimatedOut?: string;
|
|
339
|
-
/** Estimated receive amount of toToken in smallest units, when available. */
|
|
340
|
-
estimatedOutRaw?: string;
|
|
341
|
-
/** Swap provider that produced the quote (e.g. "debridge", "relay"). */
|
|
342
|
-
provider?: string;
|
|
343
|
-
/** Raw swap transaction the FE signs + broadcasts. */
|
|
344
|
-
swapTx: UnsignedTx;
|
|
345
|
-
/**
|
|
346
|
-
* Raw ERC-20 approve transaction to run BEFORE the swap. Present only when an
|
|
347
|
-
* allowance is required (native source token or sufficient allowance ⇒ omitted).
|
|
348
|
-
*/
|
|
349
|
-
approveTx?: UnsignedTx;
|
|
350
|
-
}
|
|
351
|
-
/** Human-readable summary of an add-liquidity tx, shown above the Confirm button. */
|
|
352
|
-
export interface AddLiquiditySummary {
|
|
353
|
-
nativeIn: number;
|
|
354
|
-
nativeInUsd: number | null;
|
|
355
|
-
ratio: {
|
|
356
|
-
token0Percent: number;
|
|
357
|
-
token1Percent: number;
|
|
358
|
-
};
|
|
359
|
-
expectedToken0: number;
|
|
360
|
-
expectedToken1: number;
|
|
361
|
-
amount0Min: string;
|
|
362
|
-
amount1Min: string;
|
|
363
|
-
slippageBps: number | string;
|
|
364
|
-
}
|
|
365
|
-
/**
|
|
366
|
-
* Resolved range for an add-liquidity action — both the protocol-level ticks
|
|
367
|
-
* (used in the on-chain mint) and the human prices the user entered.
|
|
368
|
-
*/
|
|
369
|
-
export interface ResolvedRange {
|
|
370
|
-
tickLower: number;
|
|
371
|
-
tickUpper: number;
|
|
372
|
-
/** Decimal-adjusted price (token1 per token0) at tickLower */
|
|
373
|
-
minPrice: number;
|
|
374
|
-
/** Decimal-adjusted price at tickUpper */
|
|
375
|
-
maxPrice: number;
|
|
376
|
-
}
|
|
377
|
-
/** Props for the FE `ConfirmAddLiquidityTx` component. */
|
|
378
|
-
export interface ConfirmAddLiquidityTxProps {
|
|
379
|
-
chain: ChainRef;
|
|
380
|
-
unsignedTx: UnsignedTx;
|
|
381
|
-
summary: AddLiquiditySummary;
|
|
382
|
-
pool: Omit<PoolOnchainInfo, 'token0' | 'token1'> & {
|
|
383
|
-
token0: TokenDisplay;
|
|
384
|
-
token1: TokenDisplay;
|
|
385
|
-
feePercent: number;
|
|
386
|
-
};
|
|
387
|
-
range: ResolvedRange;
|
|
388
|
-
gatewayAddress: string;
|
|
389
|
-
}
|
|
390
|
-
/**
|
|
391
|
-
* A clickable suggested action emitted by a tool — the FE renders it as a
|
|
392
|
-
* button below the assistant message. When the user clicks, the FE submits
|
|
393
|
-
* `prompt` as the next user message.
|
|
394
|
-
*
|
|
395
|
-
* Distinct from `AgentResponse.suggestedPrompts`: those are LLM-generated
|
|
396
|
-
* generic follow-ups; these are deterministic, tool-emitted picker / disambig
|
|
397
|
-
* buttons (e.g. "Send USDC", "Send WETH" when the user said "send token"
|
|
398
|
-
* without naming one).
|
|
399
|
-
*/
|
|
400
|
-
export interface SuggestedAction {
|
|
401
|
-
/** Button label shown to the user. */
|
|
402
|
-
label: string;
|
|
403
|
-
/** Message submitted on click — fed back into the agent as a new user turn. */
|
|
404
|
-
prompt: string;
|
|
405
|
-
/**
|
|
406
|
-
* BCP-47 language tag of the conversation when this button was emitted,
|
|
407
|
-
* stamped by AgentCore. The `prompt` is a synthetic, often-English command
|
|
408
|
-
* (e.g. "buy PEPE"), so on click the FE should pass this back as
|
|
409
|
-
* `chat(prompt, { language })` — otherwise the next turn's auto-detection
|
|
410
|
-
* sees English and renders the resulting form/reply in the wrong language.
|
|
411
|
-
*/
|
|
412
|
-
language?: string;
|
|
413
|
-
}
|
|
414
|
-
/** The result returned after a tool executes */
|
|
415
|
-
export interface ToolResult {
|
|
416
|
-
toolName: string;
|
|
417
|
-
callId: string;
|
|
418
|
-
success: boolean;
|
|
419
|
-
data?: unknown;
|
|
420
|
-
error?: string;
|
|
421
|
-
/** Execution time in ms */
|
|
422
|
-
duration: number;
|
|
423
|
-
/**
|
|
424
|
-
* Optional UI payload. Set by tools with kind='ui' or 'action' to ask the FE
|
|
425
|
-
* to render a component. AgentCore aggregates these into AgentResponse.uiActions.
|
|
426
|
-
*/
|
|
427
|
-
ui?: UIPayload;
|
|
428
|
-
/**
|
|
429
|
-
* Optional set of clickable buttons rendered below the assistant message.
|
|
430
|
-
* Used by tools that need to disambiguate before completing (e.g. "which
|
|
431
|
-
* token do you want to send?"). AgentCore aggregates these into
|
|
432
|
-
* `AgentResponse.actionButtons`.
|
|
433
|
-
*/
|
|
434
|
-
actionButtons?: SuggestedAction[];
|
|
435
|
-
}
|
|
436
|
-
/** A concrete handler for a tool (provided by the consumer) */
|
|
437
|
-
export interface Tool extends ToolDefinition {
|
|
438
|
-
/** Execute the tool with the given arguments and return a result */
|
|
439
|
-
execute(args: Record<string, unknown>, userContext?: UserContext): Promise<ToolResult>;
|
|
440
|
-
}
|
|
441
|
-
export type ReActPhase = 'think' | 'act' | 'observe';
|
|
442
|
-
export interface ReActStep {
|
|
443
|
-
phase: ReActPhase;
|
|
444
|
-
content: string;
|
|
445
|
-
toolCall?: {
|
|
446
|
-
toolName: string;
|
|
447
|
-
args: Record<string, unknown>;
|
|
448
|
-
};
|
|
449
|
-
toolResult?: ToolResult;
|
|
450
|
-
timestamp: number;
|
|
451
|
-
}
|
|
452
|
-
export interface ReActTrace {
|
|
453
|
-
steps: ReActStep[];
|
|
454
|
-
finalAnswer: string;
|
|
455
|
-
}
|
|
456
|
-
/**
|
|
457
|
-
* A capability card advertised by a subagent to the Router.
|
|
458
|
-
* Only `name` + `description` are sent to the Router's LLM, so they must
|
|
459
|
-
* be dense and token-efficient.
|
|
460
|
-
*/
|
|
461
|
-
export interface SubagentCard {
|
|
462
|
-
/** Unique subagent id, e.g. "wallet-agent" */
|
|
463
|
-
name: string;
|
|
464
|
-
/** When to use this subagent (one-liner, shown to the router LLM) */
|
|
465
|
-
description: string;
|
|
466
|
-
/** High-level domain tag for logging / UI */
|
|
467
|
-
domain: string;
|
|
468
|
-
}
|
|
469
|
-
/** A focused sub-query dispatched to a single subagent. */
|
|
470
|
-
export interface SubagentTask {
|
|
471
|
-
/** Domain-scoped query rewritten by the router */
|
|
472
|
-
query: string;
|
|
473
|
-
/** Router's reason for assigning this subagent (optional, for logging) */
|
|
474
|
-
reasoning?: string;
|
|
475
|
-
/**
|
|
476
|
-
* BCP-47 language tag of the current turn (e.g. "en", "vi", "ja"), detected
|
|
477
|
-
* by the QueryRewriter. Passed through so the subagent LLM can write any
|
|
478
|
-
* user-facing strings it generates as tool arguments (e.g. localized
|
|
479
|
-
* action-button prompts) in the right language. Empty when undetected.
|
|
480
|
-
*/
|
|
481
|
-
language?: string;
|
|
482
|
-
}
|
|
483
|
-
/** Output of a single subagent run (tool calls + final summary). */
|
|
484
|
-
export interface SubagentResult {
|
|
485
|
-
/** Name of the subagent that produced this result */
|
|
486
|
-
subagentName: string;
|
|
487
|
-
/** ReAct steps (think/act/observe) produced internally */
|
|
488
|
-
steps: ReActStep[];
|
|
489
|
-
/** Subagent's summarised answer for its domain */
|
|
490
|
-
finalAnswer: string;
|
|
491
|
-
/** Raw tool results from the run (useful for synthesiser and debugging) */
|
|
492
|
-
toolResults: ToolResult[];
|
|
493
|
-
/**
|
|
494
|
-
* Interleaved assistant-with-toolCalls + role:'tool' result messages.
|
|
495
|
-
* AgentCore appends these to ChatHistory so the next turn can reference
|
|
496
|
-
* previous tool data — pagination cursors, raw results, etc.
|
|
497
|
-
* Tool result content is truncated to cap history size.
|
|
498
|
-
*/
|
|
499
|
-
toolMessages: ChatMessage[];
|
|
500
|
-
}
|
|
501
|
-
/** A single routing assignment the Router emits. */
|
|
502
|
-
export interface RouterAssignment {
|
|
503
|
-
/** Name of the subagent to invoke */
|
|
504
|
-
subagent: string;
|
|
505
|
-
/** Focused sub-query for that subagent, in the user's language */
|
|
506
|
-
query: string;
|
|
507
|
-
/** Router's reason */
|
|
508
|
-
reasoning: string;
|
|
509
|
-
}
|
|
510
|
-
/** The Router's decision for a user query. */
|
|
511
|
-
export interface RouterDecision {
|
|
512
|
-
/** Brief intent analysis (user-language) */
|
|
513
|
-
analysis: string;
|
|
514
|
-
/** Subagents to invoke. Empty array = no subagent needed (answer directly). */
|
|
515
|
-
assignments: RouterAssignment[];
|
|
516
|
-
}
|
|
517
|
-
/** Context about the connected wallet — set/updated by the UI layer. */
|
|
518
|
-
export interface UserContext {
|
|
519
|
-
/** Connected wallet address (e.g. "0x…"). null/undefined = not connected. */
|
|
520
|
-
walletAddress?: string | null;
|
|
521
|
-
/** Current chain the wallet is on (e.g. "ethereum", "arbitrum", "base"). */
|
|
522
|
-
chain?: string | null;
|
|
523
|
-
}
|
|
524
|
-
/**
|
|
525
|
-
* Platform-agnostic storage interface.
|
|
526
|
-
* - Web: pass `localStorage` directly (or a wrapper).
|
|
527
|
-
* - React Native: pass `AsyncStorage` (all methods return Promise).
|
|
528
|
-
* - Node: pass any key-value store.
|
|
529
|
-
*
|
|
530
|
-
* All methods may return a value OR a Promise — the SDK awaits either.
|
|
531
|
-
*/
|
|
532
|
-
export interface StorageProvider {
|
|
533
|
-
getItem(key: string): string | null | Promise<string | null>;
|
|
534
|
-
setItem(key: string, value: string): void | Promise<void>;
|
|
535
|
-
removeItem(key: string): void | Promise<void>;
|
|
536
|
-
}
|
|
537
|
-
/** A single entry in the knowledge base. */
|
|
538
|
-
export interface KnowledgeBaseEntry {
|
|
539
|
-
/** The question or topic. Used for matching against user queries. */
|
|
540
|
-
question: string;
|
|
541
|
-
/** The reference answer content. The LLM will use this as source material (not returned verbatim). */
|
|
542
|
-
answer: string;
|
|
543
|
-
}
|
|
544
|
-
/** A scored knowledge-base hit. Score is in [0, 1] — higher is better. */
|
|
545
|
-
export interface KBSearchResult {
|
|
546
|
-
entry: KnowledgeBaseEntry;
|
|
547
|
-
score: number;
|
|
548
|
-
}
|
|
549
|
-
/**
|
|
550
|
-
* Pluggable knowledge-base backend. The agent only needs `search()`; ingestion
|
|
551
|
-
* is the responsibility of each concrete provider (in-memory, Upstash, pgvector…).
|
|
552
|
-
*/
|
|
553
|
-
export interface KnowledgeBaseProvider {
|
|
554
|
-
/** Find the top-K most relevant entries for the query. */
|
|
555
|
-
search(query: string, maxResults?: number): Promise<KBSearchResult[]>;
|
|
556
|
-
}
|
|
557
|
-
/** Vector-backed KB config (Upstash-flavoured by default). */
|
|
558
|
-
export interface VectorKBConfig {
|
|
559
|
-
/**
|
|
560
|
-
* Master switch. `true` → use vector search. `false`/omitted → legacy
|
|
561
|
-
* LLM-based matcher (unchanged behaviour).
|
|
562
|
-
*/
|
|
563
|
-
enabled: boolean;
|
|
564
|
-
/**
|
|
565
|
-
* Upstash Vector REST URL. Falls back to UPSTASH_VECTOR_REST_URL env var.
|
|
566
|
-
*/
|
|
567
|
-
url?: string;
|
|
568
|
-
/**
|
|
569
|
-
* Upstash Vector REST token. Falls back to UPSTASH_VECTOR_REST_TOKEN env var.
|
|
570
|
-
*/
|
|
571
|
-
token?: string;
|
|
572
|
-
/** Optional namespace for multi-tenant isolation. */
|
|
573
|
-
namespace?: string;
|
|
574
|
-
/** Minimum cosine score (0..1) for a hit to be returned. Default 0.7. */
|
|
575
|
-
minScore?: number;
|
|
576
|
-
/** Default top-K. Default 3. */
|
|
577
|
-
defaultTopK?: number;
|
|
578
|
-
/**
|
|
579
|
-
* If true, the agent upserts `config.knowledgeBase` entries to Upstash the
|
|
580
|
-
* first time it runs. Idempotent — same entries produce the same ids, so
|
|
581
|
-
* re-running does not duplicate. Default false (manage ingestion yourself).
|
|
582
|
-
*/
|
|
583
|
-
autoIngest?: boolean;
|
|
584
|
-
/**
|
|
585
|
-
* Bring your own provider. Overrides every other field above when set —
|
|
586
|
-
* useful for swapping in pgvector, Pinecone, or test doubles.
|
|
587
|
-
*/
|
|
588
|
-
provider?: KnowledgeBaseProvider;
|
|
589
|
-
}
|
|
590
|
-
export interface LLMProviderConfig {
|
|
591
|
-
/** Model name, e.g. "gemini-2.5-flash-lite" */
|
|
592
|
-
model?: string;
|
|
593
|
-
/** Max tokens for generation */
|
|
594
|
-
maxTokens?: number;
|
|
595
|
-
/** Temperature (0-2) */
|
|
596
|
-
temperature?: number;
|
|
597
|
-
/** Base URL for the Gemini API proxy. Defaults to "https://nft.keyring.app/api/gemini-cortex/proxy" */
|
|
598
|
-
baseUrl?: string;
|
|
599
|
-
}
|
|
600
|
-
export interface AgentConfig {
|
|
601
|
-
/** LLM provider configuration */
|
|
602
|
-
llm: LLMProviderConfig;
|
|
603
|
-
/**
|
|
604
|
-
* Core-wide RPC overrides, keyed by hex chain id (e.g. `{ '0x1': 'https://…' }`).
|
|
605
|
-
* The single place to configure RPC endpoints — shared by every on-chain read
|
|
606
|
-
* in the core: gas-reserve estimation for wallet actions, the swap allowance
|
|
607
|
-
* check, and the pool tools. A chain that is not listed falls back to the
|
|
608
|
-
* built-in public default for that chain.
|
|
609
|
-
*/
|
|
610
|
-
rpcUrls?: Record<string, string>;
|
|
611
|
-
/** Maximum number of ReAct iterations before forcing an answer */
|
|
612
|
-
maxIterations?: number;
|
|
613
|
-
/** Maximum number of messages to keep in history before summarising */
|
|
614
|
-
maxHistoryMessages?: number;
|
|
615
|
-
/** System prompt prepended to every LLM call */
|
|
616
|
-
systemPrompt?: string;
|
|
617
|
-
/** Enable debug logging */
|
|
618
|
-
debug?: boolean;
|
|
619
|
-
/**
|
|
620
|
-
* Cross-platform storage for persisting chat history.
|
|
621
|
-
* - Web: pass `localStorage`
|
|
622
|
-
* - React Native: pass `AsyncStorage`
|
|
623
|
-
* If omitted, history is in-memory only (lost on reload).
|
|
624
|
-
*/
|
|
625
|
-
storage?: StorageProvider;
|
|
626
|
-
/**
|
|
627
|
-
* Key used in storage. Defaults to "keyring-agent-history".
|
|
628
|
-
* Useful when running multiple agent instances.
|
|
629
|
-
*/
|
|
630
|
-
storageKey?: string;
|
|
631
|
-
/**
|
|
632
|
-
* Whether chat history is persisted across app restarts. Default true.
|
|
633
|
-
*
|
|
634
|
-
* When false, the agent does NOT load prior history from `storage` on the
|
|
635
|
-
* first turn and does NOT write subsequent turns back — every app launch
|
|
636
|
-
* starts a fresh session. Useful for incognito-style chats or to opt out
|
|
637
|
-
* even when a storage provider is configured globally.
|
|
638
|
-
*
|
|
639
|
-
* Note: when `storage` is omitted, history is in-memory only regardless
|
|
640
|
-
* of this flag.
|
|
641
|
-
*/
|
|
642
|
-
persistHistory?: boolean;
|
|
643
|
-
/**
|
|
644
|
-
* Pre-defined Q&A knowledge base entries. By default the agent matches them
|
|
645
|
-
* with an LLM (sends the whole list each call — fine up to ~50 entries).
|
|
646
|
-
* Toggle `vectorKB.enabled` to switch to Upstash vector search instead.
|
|
647
|
-
*/
|
|
648
|
-
knowledgeBase?: KnowledgeBaseEntry[];
|
|
649
|
-
/**
|
|
650
|
-
* Vector-backed knowledge base config. When `enabled: true`, the agent
|
|
651
|
-
* searches via Upstash Vector instead of the LLM matcher. When omitted or
|
|
652
|
-
* `enabled: false`, behaviour is identical to versions without this flag.
|
|
653
|
-
*/
|
|
654
|
-
vectorKB?: VectorKBConfig;
|
|
655
|
-
/**
|
|
656
|
-
* Minimum top-hit score (0..1) at which the agent answers directly from
|
|
657
|
-
* the KB and skips the Router/Subagent pipeline entirely. Default 0.8.
|
|
658
|
-
*
|
|
659
|
-
* Vector backends (e.g. Upstash bge-m3 hybrid) commonly produce scores in
|
|
660
|
-
* the 0.7–0.85 range for genuinely relevant matches; lowering this to
|
|
661
|
-
* around 0.7 typically gives better KB recall in production.
|
|
662
|
-
*/
|
|
663
|
-
kbAnswerThreshold?: number;
|
|
664
|
-
/**
|
|
665
|
-
* Whether to generate suggested follow-up prompts after each answer.
|
|
666
|
-
* Default true. Set to false to skip the extra LLM call and omit
|
|
667
|
-
* `suggestedPrompts` from every response.
|
|
668
|
-
*/
|
|
669
|
-
generateSuggestions?: boolean;
|
|
670
|
-
/** Moralis AI tool config. Set to false to disable the built-in Moralis tool. */
|
|
671
|
-
moralis?: {
|
|
672
|
-
/** Base URL for Moralis proxy (default: https://nft.keyring.app) */
|
|
673
|
-
baseUrl?: string;
|
|
674
|
-
/** Base URL for DeFi APIs — uses /api/moralis-v1/proxy route (default: https://nft-demo.keyring.app) */
|
|
675
|
-
v1BaseUrl?: string;
|
|
676
|
-
/** Pantograph API base URL for price enrichment */
|
|
677
|
-
pantographUrl?: string;
|
|
678
|
-
} | false;
|
|
679
|
-
/**
|
|
680
|
-
* Enable/disable individual built-in subagents. Defaults to all-enabled.
|
|
681
|
-
* Set any key to `false` to skip that subagent — it won't be created or
|
|
682
|
-
* routed to. Custom subagents added via `registerSubagent()` are not affected.
|
|
683
|
-
*
|
|
684
|
-
* Names mirror `DefaultSubagentName` in agent/subagents.
|
|
685
|
-
*/
|
|
686
|
-
subagents?: {
|
|
687
|
-
wallet?: boolean;
|
|
688
|
-
'wallet-action'?: boolean;
|
|
689
|
-
token?: boolean;
|
|
690
|
-
nft?: boolean;
|
|
691
|
-
pool?: boolean;
|
|
692
|
-
/**
|
|
693
|
-
* Subgraph-backed pool agent (Uniswap V3 via The Graph + DefiLlama APR + CoinPool ranges).
|
|
694
|
-
* Mutually exclusive with `pool`. Enabling this (true) automatically disables `pool`
|
|
695
|
-
* unless `pool` is also explicitly set to true. Defaults to false.
|
|
696
|
-
*/
|
|
697
|
-
'pool-subgraph'?: boolean;
|
|
698
|
-
ai?: boolean;
|
|
699
|
-
};
|
|
700
|
-
/**
|
|
701
|
-
* Configuration for the subgraph-backed pool tools (used by the
|
|
702
|
-
* `pool-subgraph` subagent). Set to `false` to skip registering them.
|
|
703
|
-
*
|
|
704
|
-
* Independent of `uniswap` — the subgraph stack does not need RPC URLs or
|
|
705
|
-
* the Uniswap interface gateway. To actually route queries to it, also set
|
|
706
|
-
* `subagents['pool-subgraph']: true`.
|
|
707
|
-
*/
|
|
708
|
-
subgraph?: {
|
|
709
|
-
/** The Graph gateway API key. Falls back to a public demo key. */
|
|
710
|
-
theGraphApiKey?: string;
|
|
711
|
-
/** CoinPool pair-list base url (`<base>/pair/pure-list?chainId=…`). */
|
|
712
|
-
coinPoolBaseUrl?: string;
|
|
713
|
-
/** Keyring pool API base url (`<base>/user/positions-details/v3?…`). */
|
|
714
|
-
keyringPoolBaseUrl?: string;
|
|
715
|
-
/** Override subgraph URLs per hex chain id. */
|
|
716
|
-
subgraphUrls?: Record<string, string>;
|
|
717
|
-
/**
|
|
718
|
-
* Website link for adding liquidity / creating a pool. When set, the
|
|
719
|
-
* `pool-subgraph` subagent appends this exact URL at the end of its
|
|
720
|
-
* answer whenever the user asks to add liquidity / add a pool / create
|
|
721
|
-
* a pair ("add liquidity", "create pool", "thêm thanh khoản", …). When
|
|
722
|
-
* omitted, the subagent says add-liquidity is not handled, as before.
|
|
723
|
-
*/
|
|
724
|
-
linkAddLiquidity?: string;
|
|
725
|
-
} | false;
|
|
726
|
-
/** Uniswap Explore gateway config. Set to false to disable the built-in pool tools. */
|
|
727
|
-
uniswap?: {
|
|
728
|
-
/** Base URL for the Uniswap interface gateway (default: https://interface.gateway.uniswap.org) */
|
|
729
|
-
baseUrl?: string;
|
|
730
|
-
/** Minimum USD value the user must supply to add liquidity. Default 10. */
|
|
731
|
-
minProvideUsd?: number;
|
|
732
|
-
/**
|
|
733
|
-
* Hit production endpoints (coinpool.app) for addresses + bridge-provider
|
|
734
|
-
* mapping. Set false for staging. Default true.
|
|
735
|
-
*/
|
|
736
|
-
isProduction?: boolean;
|
|
737
|
-
} | false;
|
|
738
|
-
/**
|
|
739
|
-
* Website link for the NFT tools (`send-nft` and the nft-agent data tools:
|
|
740
|
-
* `get-wallet-nfts`, `get-nft-metadata`, `get-nft-contract-info`). Supplied
|
|
741
|
-
* at AgentCore construction.
|
|
742
|
-
*
|
|
743
|
-
* Each tool emits a fixed message containing the phrase "this website". When
|
|
744
|
-
* this URL is set, that phrase is rendered as a Markdown link to it; when
|
|
745
|
-
* omitted, it stays as plain text. A single link is shared by all NFT tools.
|
|
746
|
-
*/
|
|
747
|
-
nftLink?: string;
|
|
748
|
-
}
|
|
749
|
-
export interface LLMToolCall {
|
|
750
|
-
toolName: string;
|
|
751
|
-
args: Record<string, unknown>;
|
|
752
|
-
callId: string;
|
|
753
|
-
}
|
|
754
|
-
export interface LLMResponse {
|
|
755
|
-
text: string;
|
|
756
|
-
toolCalls: LLMToolCall[];
|
|
757
|
-
/** Raw usage stats from the provider */
|
|
758
|
-
usage?: {
|
|
759
|
-
promptTokens: number;
|
|
760
|
-
completionTokens: number;
|
|
761
|
-
totalTokens: number;
|
|
762
|
-
};
|
|
763
|
-
}
|
|
764
|
-
/** Optional flags for an LLM call */
|
|
765
|
-
export interface ChatOptions {
|
|
766
|
-
/** Enable Google Search grounding (Gemini only) */
|
|
767
|
-
googleSearch?: boolean;
|
|
768
|
-
/** Maximum number of retries for transient errors */
|
|
769
|
-
maxRetries?: number;
|
|
770
|
-
/** Delay between retries in ms */
|
|
771
|
-
retryDelayMs?: number;
|
|
772
|
-
}
|
|
773
|
-
export interface LLMProvider {
|
|
774
|
-
/** Send messages to the LLM and get a response */
|
|
775
|
-
chat(messages: ChatMessage[], tools?: ToolDefinition[], options?: ChatOptions): Promise<LLMResponse>;
|
|
776
|
-
}
|
|
777
|
-
//# sourceMappingURL=index.d.ts.map
|