@gala-chain/launchpad-mcp-server 5.0.3 → 5.0.4-beta.1
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 +49 -21
- package/dist/ai-docs.json +7357 -0
- package/dist/constants/mcpToolNames.d.ts +3 -1
- package/dist/constants/mcpToolNames.d.ts.map +1 -1
- package/dist/constants/mcpToolNames.js +2 -1
- package/dist/constants/mcpToolNames.js.map +1 -1
- package/dist/explain-sdk-usage-ai.json +3445 -0
- package/dist/generated/version.d.ts +1 -1
- package/dist/generated/version.d.ts.map +1 -1
- package/dist/generated/version.js +1 -1
- package/dist/generated/version.js.map +1 -1
- package/dist/prompts/account.d.ts +24 -0
- package/dist/prompts/account.d.ts.map +1 -0
- package/dist/prompts/account.js +89 -0
- package/dist/prompts/account.js.map +1 -0
- package/dist/prompts/api-keys.d.ts +36 -0
- package/dist/prompts/api-keys.d.ts.map +1 -0
- package/dist/prompts/api-keys.js +251 -0
- package/dist/prompts/api-keys.js.map +1 -0
- package/dist/prompts/auth.d.ts +29 -0
- package/dist/prompts/auth.d.ts.map +1 -0
- package/dist/prompts/auth.js +127 -0
- package/dist/prompts/auth.js.map +1 -0
- package/dist/prompts/balances.d.ts.map +1 -1
- package/dist/prompts/balances.js +17 -17
- package/dist/prompts/balances.js.map +1 -1
- package/dist/prompts/bans.d.ts +23 -0
- package/dist/prompts/bans.d.ts.map +1 -0
- package/dist/prompts/bans.js +82 -0
- package/dist/prompts/bans.js.map +1 -0
- package/dist/prompts/bridge.d.ts +2 -1
- package/dist/prompts/bridge.d.ts.map +1 -1
- package/dist/prompts/bridge.js +91 -227
- package/dist/prompts/bridge.js.map +1 -1
- package/dist/prompts/burns.d.ts +30 -0
- package/dist/prompts/burns.d.ts.map +1 -0
- package/dist/prompts/burns.js +127 -0
- package/dist/prompts/burns.js.map +1 -0
- package/dist/prompts/chat-messages.d.ts +21 -0
- package/dist/prompts/chat-messages.d.ts.map +1 -0
- package/dist/prompts/chat-messages.js +103 -0
- package/dist/prompts/chat-messages.js.map +1 -0
- package/dist/prompts/chat.d.ts +67 -0
- package/dist/prompts/chat.d.ts.map +1 -0
- package/dist/prompts/chat.js +355 -0
- package/dist/prompts/chat.js.map +1 -0
- package/dist/prompts/comments.d.ts +29 -0
- package/dist/prompts/comments.d.ts.map +1 -0
- package/dist/prompts/comments.js +133 -0
- package/dist/prompts/comments.js.map +1 -0
- package/dist/prompts/content-flags.d.ts +29 -0
- package/dist/prompts/content-flags.d.ts.map +1 -0
- package/dist/prompts/content-flags.js +248 -0
- package/dist/prompts/content-flags.js.map +1 -0
- package/dist/prompts/content-reactions.d.ts +29 -0
- package/dist/prompts/content-reactions.d.ts.map +1 -0
- package/dist/prompts/content-reactions.js +77 -0
- package/dist/prompts/content-reactions.js.map +1 -0
- package/dist/prompts/create-token.d.ts.map +1 -1
- package/dist/prompts/create-token.js +11 -18
- package/dist/prompts/create-token.js.map +1 -1
- package/dist/prompts/dex-trading.d.ts.map +1 -1
- package/dist/prompts/dex-trading.js +11 -42
- package/dist/prompts/dex-trading.js.map +1 -1
- package/dist/prompts/discover-tokens.d.ts.map +1 -1
- package/dist/prompts/discover-tokens.js +11 -26
- package/dist/prompts/discover-tokens.js.map +1 -1
- package/dist/prompts/event-subscriptions.d.ts +45 -0
- package/dist/prompts/event-subscriptions.d.ts.map +1 -0
- package/dist/prompts/event-subscriptions.js +330 -0
- package/dist/prompts/event-subscriptions.js.map +1 -0
- package/dist/prompts/explore-dex-pools.d.ts +2 -0
- package/dist/prompts/explore-dex-pools.d.ts.map +1 -1
- package/dist/prompts/explore-dex-pools.js +26 -104
- package/dist/prompts/explore-dex-pools.js.map +1 -1
- package/dist/prompts/factories/balance-prompt-factory.d.ts +102 -0
- package/dist/prompts/factories/balance-prompt-factory.d.ts.map +1 -0
- package/dist/prompts/factories/balance-prompt-factory.js +176 -0
- package/dist/prompts/factories/balance-prompt-factory.js.map +1 -0
- package/dist/prompts/factories/ban-management-factory.d.ts +90 -0
- package/dist/prompts/factories/ban-management-factory.d.ts.map +1 -0
- package/dist/prompts/factories/ban-management-factory.js +330 -0
- package/dist/prompts/factories/ban-management-factory.js.map +1 -0
- package/dist/prompts/factories/calculation-prompt-factory.d.ts +119 -0
- package/dist/prompts/factories/calculation-prompt-factory.d.ts.map +1 -0
- package/dist/prompts/factories/calculation-prompt-factory.js +183 -0
- package/dist/prompts/factories/calculation-prompt-factory.js.map +1 -0
- package/dist/prompts/factories/discovery-prompt-factory.d.ts +135 -0
- package/dist/prompts/factories/discovery-prompt-factory.d.ts.map +1 -0
- package/dist/prompts/factories/discovery-prompt-factory.js +240 -0
- package/dist/prompts/factories/discovery-prompt-factory.js.map +1 -0
- package/dist/prompts/factories/event-subscription-factory.d.ts +177 -0
- package/dist/prompts/factories/event-subscription-factory.d.ts.map +1 -0
- package/dist/prompts/factories/event-subscription-factory.js +329 -0
- package/dist/prompts/factories/event-subscription-factory.js.map +1 -0
- package/dist/prompts/factories/filtered-list-prompt-factory.d.ts +95 -0
- package/dist/prompts/factories/filtered-list-prompt-factory.d.ts.map +1 -0
- package/dist/prompts/factories/filtered-list-prompt-factory.js +147 -0
- package/dist/prompts/factories/filtered-list-prompt-factory.js.map +1 -0
- package/dist/prompts/factories/index.d.ts +33 -0
- package/dist/prompts/factories/index.d.ts.map +1 -0
- package/dist/prompts/factories/index.js +91 -0
- package/dist/prompts/factories/index.js.map +1 -0
- package/dist/prompts/factories/invite-management-factory.d.ts +88 -0
- package/dist/prompts/factories/invite-management-factory.d.ts.map +1 -0
- package/dist/prompts/factories/invite-management-factory.js +262 -0
- package/dist/prompts/factories/invite-management-factory.js.map +1 -0
- package/dist/prompts/factories/reaction-prompt-factory.d.ts +81 -0
- package/dist/prompts/factories/reaction-prompt-factory.d.ts.map +1 -0
- package/dist/prompts/factories/reaction-prompt-factory.js +188 -0
- package/dist/prompts/factories/reaction-prompt-factory.js.map +1 -0
- package/dist/prompts/factories/simple-operation-factory.d.ts +166 -0
- package/dist/prompts/factories/simple-operation-factory.d.ts.map +1 -0
- package/dist/prompts/factories/simple-operation-factory.js +218 -0
- package/dist/prompts/factories/simple-operation-factory.js.map +1 -0
- package/dist/prompts/index.d.ts +31 -6
- package/dist/prompts/index.d.ts.map +1 -1
- package/dist/prompts/index.js +136 -5
- package/dist/prompts/index.js.map +1 -1
- package/dist/prompts/locks.d.ts.map +1 -1
- package/dist/prompts/locks.js +32 -56
- package/dist/prompts/locks.js.map +1 -1
- package/dist/prompts/moderators.d.ts +22 -0
- package/dist/prompts/moderators.d.ts.map +1 -0
- package/dist/prompts/moderators.js +62 -0
- package/dist/prompts/moderators.js.map +1 -0
- package/dist/prompts/monitoring.d.ts +3 -1
- package/dist/prompts/monitoring.d.ts.map +1 -1
- package/dist/prompts/monitoring.js +52 -140
- package/dist/prompts/monitoring.js.map +1 -1
- package/dist/prompts/overseers.d.ts +34 -0
- package/dist/prompts/overseers.d.ts.map +1 -0
- package/dist/prompts/overseers.js +117 -0
- package/dist/prompts/overseers.js.map +1 -0
- package/dist/prompts/pools.d.ts +22 -20
- package/dist/prompts/pools.d.ts.map +1 -1
- package/dist/prompts/pools.js +150 -251
- package/dist/prompts/pools.js.map +1 -1
- package/dist/prompts/portfolio.d.ts.map +1 -1
- package/dist/prompts/portfolio.js +1 -9
- package/dist/prompts/portfolio.js.map +1 -1
- package/dist/prompts/prompt-factories.d.ts +179 -0
- package/dist/prompts/prompt-factories.d.ts.map +1 -0
- package/dist/prompts/prompt-factories.js +230 -0
- package/dist/prompts/prompt-factories.js.map +1 -0
- package/dist/prompts/referrals.d.ts +27 -0
- package/dist/prompts/referrals.d.ts.map +1 -0
- package/dist/prompts/referrals.js +176 -0
- package/dist/prompts/referrals.js.map +1 -0
- package/dist/prompts/streaming.d.ts +84 -0
- package/dist/prompts/streaming.d.ts.map +1 -0
- package/dist/prompts/streaming.js +411 -0
- package/dist/prompts/streaming.js.map +1 -0
- package/dist/prompts/tier1-bridge-operations.d.ts +30 -0
- package/dist/prompts/tier1-bridge-operations.d.ts.map +1 -0
- package/dist/prompts/tier1-bridge-operations.js +634 -0
- package/dist/prompts/tier1-bridge-operations.js.map +1 -0
- package/dist/prompts/tier1-liquidity-management.d.ts +30 -0
- package/dist/prompts/tier1-liquidity-management.d.ts.map +1 -0
- package/dist/prompts/tier1-liquidity-management.js +560 -0
- package/dist/prompts/tier1-liquidity-management.js.map +1 -0
- package/dist/prompts/tier1-pool-discovery.d.ts +30 -0
- package/dist/prompts/tier1-pool-discovery.d.ts.map +1 -0
- package/dist/prompts/tier1-pool-discovery.js +221 -0
- package/dist/prompts/tier1-pool-discovery.js.map +1 -0
- package/dist/prompts/tier1-price-history.d.ts +30 -0
- package/dist/prompts/tier1-price-history.d.ts.map +1 -0
- package/dist/prompts/tier1-price-history.js +429 -0
- package/dist/prompts/tier1-price-history.js.map +1 -0
- package/dist/prompts/tier1-token-analysis.d.ts +30 -0
- package/dist/prompts/tier1-token-analysis.d.ts.map +1 -0
- package/dist/prompts/tier1-token-analysis.js +376 -0
- package/dist/prompts/tier1-token-analysis.js.map +1 -0
- package/dist/prompts/tier2-account-setup.d.ts +24 -0
- package/dist/prompts/tier2-account-setup.d.ts.map +1 -0
- package/dist/prompts/tier2-account-setup.js +206 -0
- package/dist/prompts/tier2-account-setup.js.map +1 -0
- package/dist/prompts/tier2-advanced-liquidity.d.ts +24 -0
- package/dist/prompts/tier2-advanced-liquidity.d.ts.map +1 -0
- package/dist/prompts/tier2-advanced-liquidity.js +298 -0
- package/dist/prompts/tier2-advanced-liquidity.js.map +1 -0
- package/dist/prompts/tier2-asset-management.d.ts +25 -0
- package/dist/prompts/tier2-asset-management.d.ts.map +1 -0
- package/dist/prompts/tier2-asset-management.js +246 -0
- package/dist/prompts/tier2-asset-management.js.map +1 -0
- package/dist/prompts/tier2-token-lifecycle.d.ts +25 -0
- package/dist/prompts/tier2-token-lifecycle.d.ts.map +1 -0
- package/dist/prompts/tier2-token-lifecycle.js +241 -0
- package/dist/prompts/tier2-token-lifecycle.js.map +1 -0
- package/dist/prompts/tier3-community-engagement.d.ts +26 -0
- package/dist/prompts/tier3-community-engagement.d.ts.map +1 -0
- package/dist/prompts/tier3-community-engagement.js +610 -0
- package/dist/prompts/tier3-community-engagement.js.map +1 -0
- package/dist/prompts/tier3-moderation-workflows.d.ts +31 -0
- package/dist/prompts/tier3-moderation-workflows.d.ts.map +1 -0
- package/dist/prompts/tier3-moderation-workflows.js +511 -0
- package/dist/prompts/tier3-moderation-workflows.js.map +1 -0
- package/dist/prompts/tier3-streaming-management.d.ts +26 -0
- package/dist/prompts/tier3-streaming-management.d.ts.map +1 -0
- package/dist/prompts/tier3-streaming-management.js +797 -0
- package/dist/prompts/tier3-streaming-management.js.map +1 -0
- package/dist/prompts/token-bans.d.ts +27 -0
- package/dist/prompts/token-bans.d.ts.map +1 -0
- package/dist/prompts/token-bans.js +77 -0
- package/dist/prompts/token-bans.js.map +1 -0
- package/dist/prompts/trades.d.ts +22 -0
- package/dist/prompts/trades.d.ts.map +1 -0
- package/dist/prompts/trades.js +107 -0
- package/dist/prompts/trades.js.map +1 -0
- package/dist/prompts/trading-calculations.d.ts +3 -1
- package/dist/prompts/trading-calculations.d.ts.map +1 -1
- package/dist/prompts/trading-calculations.js +134 -270
- package/dist/prompts/trading-calculations.js.map +1 -1
- package/dist/prompts/trading.d.ts +10 -1
- package/dist/prompts/trading.d.ts.map +1 -1
- package/dist/prompts/trading.js +128 -2
- package/dist/prompts/trading.js.map +1 -1
- package/dist/prompts/transfers.d.ts +2 -1
- package/dist/prompts/transfers.d.ts.map +1 -1
- package/dist/prompts/transfers.js +26 -30
- package/dist/prompts/transfers.js.map +1 -1
- package/dist/prompts/uploads.d.ts +19 -0
- package/dist/prompts/uploads.d.ts.map +1 -0
- package/dist/prompts/uploads.js +114 -0
- package/dist/prompts/uploads.js.map +1 -0
- package/dist/prompts/utility-tools.d.ts.map +1 -1
- package/dist/prompts/utility-tools.js +27 -18
- package/dist/prompts/utility-tools.js.map +1 -1
- package/dist/prompts/utils/index.d.ts +21 -0
- package/dist/prompts/utils/index.d.ts.map +1 -0
- package/dist/prompts/utils/index.js +38 -0
- package/dist/prompts/utils/index.js.map +1 -0
- package/dist/prompts/utils/pagination-helpers.d.ts +95 -0
- package/dist/prompts/utils/pagination-helpers.d.ts.map +1 -0
- package/dist/prompts/utils/pagination-helpers.js +121 -0
- package/dist/prompts/utils/pagination-helpers.js.map +1 -0
- package/dist/prompts/utils/workflowTemplates.d.ts.map +1 -1
- package/dist/prompts/utils/workflowTemplates.js +4 -3
- package/dist/prompts/utils/workflowTemplates.js.map +1 -1
- package/dist/prompts/wallet.d.ts +24 -0
- package/dist/prompts/wallet.d.ts.map +1 -0
- package/dist/prompts/wallet.js +139 -0
- package/dist/prompts/wallet.js.map +1 -0
- package/dist/schemas/common-schemas.d.ts +890 -0
- package/dist/schemas/common-schemas.d.ts.map +1 -1
- package/dist/schemas/common-schemas.js +853 -1
- package/dist/schemas/common-schemas.js.map +1 -1
- package/dist/server.d.ts +31 -3
- package/dist/server.d.ts.map +1 -1
- package/dist/server.js +68 -7
- package/dist/server.js.map +1 -1
- package/dist/tools/api-keys/index.d.ts +41 -0
- package/dist/tools/api-keys/index.d.ts.map +1 -0
- package/dist/tools/api-keys/index.js +245 -0
- package/dist/tools/api-keys/index.js.map +1 -0
- package/dist/tools/auth/index.d.ts +19 -0
- package/dist/tools/auth/index.d.ts.map +1 -0
- package/dist/tools/auth/index.js +138 -0
- package/dist/tools/auth/index.js.map +1 -0
- package/dist/tools/balance/helpers/format-balance.d.ts +86 -0
- package/dist/tools/balance/helpers/format-balance.d.ts.map +1 -0
- package/dist/tools/balance/helpers/format-balance.js +87 -0
- package/dist/tools/balance/helpers/format-balance.js.map +1 -0
- package/dist/tools/balance/index.d.ts +4 -4
- package/dist/tools/balance/index.d.ts.map +1 -1
- package/dist/tools/balance/index.js +64 -176
- package/dist/tools/balance/index.js.map +1 -1
- package/dist/tools/ban/index.d.ts +37 -0
- package/dist/tools/ban/index.d.ts.map +1 -0
- package/dist/tools/ban/index.js +206 -0
- package/dist/tools/ban/index.js.map +1 -0
- package/dist/tools/bridge/helpers/bridgeable-token-tools.d.ts +87 -0
- package/dist/tools/bridge/helpers/bridgeable-token-tools.d.ts.map +1 -0
- package/dist/tools/bridge/helpers/bridgeable-token-tools.js +130 -0
- package/dist/tools/bridge/helpers/bridgeable-token-tools.js.map +1 -0
- package/dist/tools/bridge/helpers/external-chain-balance-tools.d.ts +87 -0
- package/dist/tools/bridge/helpers/external-chain-balance-tools.d.ts.map +1 -0
- package/dist/tools/bridge/helpers/external-chain-balance-tools.js +167 -0
- package/dist/tools/bridge/helpers/external-chain-balance-tools.js.map +1 -0
- package/dist/tools/bridge/index.d.ts +3 -7
- package/dist/tools/bridge/index.d.ts.map +1 -1
- package/dist/tools/bridge/index.js +89 -371
- package/dist/tools/bridge/index.js.map +1 -1
- package/dist/tools/burns/index.d.ts.map +1 -1
- package/dist/tools/burns/index.js +8 -36
- package/dist/tools/burns/index.js.map +1 -1
- package/dist/tools/chat/getPinnedChatMessage.d.ts +15 -0
- package/dist/tools/chat/getPinnedChatMessage.d.ts.map +1 -0
- package/dist/tools/chat/getPinnedChatMessage.js +37 -0
- package/dist/tools/chat/getPinnedChatMessage.js.map +1 -0
- package/dist/tools/chat/index.d.ts +73 -0
- package/dist/tools/chat/index.d.ts.map +1 -0
- package/dist/tools/chat/index.js +359 -0
- package/dist/tools/chat/index.js.map +1 -0
- package/dist/tools/chat/pinChatMessage.d.ts +16 -0
- package/dist/tools/chat/pinChatMessage.d.ts.map +1 -0
- package/dist/tools/chat/pinChatMessage.js +51 -0
- package/dist/tools/chat/pinChatMessage.js.map +1 -0
- package/dist/tools/chat/unpinChatMessage.d.ts +16 -0
- package/dist/tools/chat/unpinChatMessage.d.ts.map +1 -0
- package/dist/tools/chat/unpinChatMessage.js +39 -0
- package/dist/tools/chat/unpinChatMessage.js.map +1 -0
- package/dist/tools/chat-messages/index.d.ts +35 -0
- package/dist/tools/chat-messages/index.d.ts.map +1 -0
- package/dist/tools/chat-messages/index.js +165 -0
- package/dist/tools/chat-messages/index.js.map +1 -0
- package/dist/tools/comments/index.d.ts +44 -0
- package/dist/tools/comments/index.d.ts.map +1 -0
- package/dist/tools/comments/index.js +171 -0
- package/dist/tools/comments/index.js.map +1 -0
- package/dist/tools/content-flags/index.d.ts +38 -0
- package/dist/tools/content-flags/index.d.ts.map +1 -0
- package/dist/tools/content-flags/index.js +282 -0
- package/dist/tools/content-flags/index.js.map +1 -0
- package/dist/tools/content-reactions/index.d.ts +43 -0
- package/dist/tools/content-reactions/index.d.ts.map +1 -0
- package/dist/tools/content-reactions/index.js +135 -0
- package/dist/tools/content-reactions/index.js.map +1 -0
- package/dist/tools/creation/index.d.ts.map +1 -1
- package/dist/tools/creation/index.js +2 -5
- package/dist/tools/creation/index.js.map +1 -1
- package/dist/tools/dex/fetchAllDexPools.d.ts.map +1 -1
- package/dist/tools/dex/fetchAllDexPools.js +5 -21
- package/dist/tools/dex/fetchAllDexPools.js.map +1 -1
- package/dist/tools/dex/fetchDexPools.d.ts.map +1 -1
- package/dist/tools/dex/fetchDexPools.js +11 -28
- package/dist/tools/dex/fetchDexPools.js.map +1 -1
- package/dist/tools/dex/helpers.d.ts +479 -0
- package/dist/tools/dex/helpers.d.ts.map +1 -0
- package/dist/tools/dex/helpers.js +570 -0
- package/dist/tools/dex/helpers.js.map +1 -0
- package/dist/tools/dex/index.d.ts +50 -11
- package/dist/tools/dex/index.d.ts.map +1 -1
- package/dist/tools/dex/index.js +124 -486
- package/dist/tools/dex/index.js.map +1 -1
- package/dist/tools/dex/leaderboard.d.ts.map +1 -1
- package/dist/tools/dex/leaderboard.js +5 -70
- package/dist/tools/dex/leaderboard.js.map +1 -1
- package/dist/tools/dex/liquidity-positions.d.ts.map +1 -1
- package/dist/tools/dex/liquidity-positions.js +20 -91
- package/dist/tools/dex/liquidity-positions.js.map +1 -1
- package/dist/tools/dex/volume.d.ts.map +1 -1
- package/dist/tools/dex/volume.js +6 -21
- package/dist/tools/dex/volume.js.map +1 -1
- package/dist/tools/dex-analytics/index.d.ts +48 -0
- package/dist/tools/dex-analytics/index.d.ts.map +1 -0
- package/dist/tools/dex-analytics/index.js +111 -0
- package/dist/tools/dex-analytics/index.js.map +1 -0
- package/dist/tools/dex-liquidity/index.d.ts +22 -0
- package/dist/tools/dex-liquidity/index.d.ts.map +1 -0
- package/dist/tools/dex-liquidity/index.js +384 -0
- package/dist/tools/dex-liquidity/index.js.map +1 -0
- package/dist/tools/dex-pools/index.d.ts +60 -0
- package/dist/tools/dex-pools/index.d.ts.map +1 -0
- package/dist/tools/dex-pools/index.js +231 -0
- package/dist/tools/dex-pools/index.js.map +1 -0
- package/dist/tools/handler-factories.d.ts +1401 -0
- package/dist/tools/handler-factories.d.ts.map +1 -0
- package/dist/tools/handler-factories.js +1680 -0
- package/dist/tools/handler-factories.js.map +1 -0
- package/dist/tools/index.d.ts +1 -11
- package/dist/tools/index.d.ts.map +1 -1
- package/dist/tools/index.js +171 -27
- package/dist/tools/index.js.map +1 -1
- package/dist/tools/locks/index.d.ts +2 -0
- package/dist/tools/locks/index.d.ts.map +1 -1
- package/dist/tools/locks/index.js +9 -86
- package/dist/tools/locks/index.js.map +1 -1
- package/dist/tools/moderators/index.d.ts +53 -0
- package/dist/tools/moderators/index.d.ts.map +1 -0
- package/dist/tools/moderators/index.js +258 -0
- package/dist/tools/moderators/index.js.map +1 -0
- package/dist/tools/overseers/getOverseerUserSummary.d.ts +15 -0
- package/dist/tools/overseers/getOverseerUserSummary.d.ts.map +1 -0
- package/dist/tools/overseers/getOverseerUserSummary.js +40 -0
- package/dist/tools/overseers/getOverseerUserSummary.js.map +1 -0
- package/dist/tools/overseers/index.d.ts +58 -0
- package/dist/tools/overseers/index.d.ts.map +1 -0
- package/dist/tools/overseers/index.js +325 -0
- package/dist/tools/overseers/index.js.map +1 -0
- package/dist/tools/overseers/listOverseerUsers.d.ts +15 -0
- package/dist/tools/overseers/listOverseerUsers.d.ts.map +1 -0
- package/dist/tools/overseers/listOverseerUsers.js +76 -0
- package/dist/tools/overseers/listOverseerUsers.js.map +1 -0
- package/dist/tools/pagination-handler-factory.d.ts +131 -0
- package/dist/tools/pagination-handler-factory.d.ts.map +1 -0
- package/dist/tools/pagination-handler-factory.js +159 -0
- package/dist/tools/pagination-handler-factory.js.map +1 -0
- package/dist/tools/pools/checkPoolExists.d.ts +16 -0
- package/dist/tools/pools/checkPoolExists.d.ts.map +1 -0
- package/dist/tools/pools/checkPoolExists.js +48 -0
- package/dist/tools/pools/checkPoolExists.js.map +1 -0
- package/dist/tools/pools/fetchAllPools.d.ts.map +1 -1
- package/dist/tools/pools/fetchAllPools.js +51 -11
- package/dist/tools/pools/fetchAllPools.js.map +1 -1
- package/dist/tools/pools/fetchAllPriceHistory.d.ts.map +1 -1
- package/dist/tools/pools/fetchAllPriceHistory.js +11 -51
- package/dist/tools/pools/fetchAllPriceHistory.js.map +1 -1
- package/dist/tools/pools/fetchPoolDetails.d.ts.map +1 -1
- package/dist/tools/pools/fetchPoolDetails.js +4 -11
- package/dist/tools/pools/fetchPoolDetails.js.map +1 -1
- package/dist/tools/pools/fetchPools.d.ts.map +1 -1
- package/dist/tools/pools/fetchPools.js +40 -20
- package/dist/tools/pools/fetchPools.js.map +1 -1
- package/dist/tools/pools/fetchPriceHistory.d.ts.map +1 -1
- package/dist/tools/pools/fetchPriceHistory.js +10 -51
- package/dist/tools/pools/fetchPriceHistory.js.map +1 -1
- package/dist/tools/pools/fetchTokenDetails.d.ts.map +1 -1
- package/dist/tools/pools/fetchTokenDetails.js +4 -35
- package/dist/tools/pools/fetchTokenDetails.js.map +1 -1
- package/dist/tools/pools/index.d.ts +2 -0
- package/dist/tools/pools/index.d.ts.map +1 -1
- package/dist/tools/pools/index.js +103 -35
- package/dist/tools/pools/index.js.map +1 -1
- package/dist/tools/pools/onDexPoolCreation.d.ts +1 -2
- package/dist/tools/pools/onDexPoolCreation.d.ts.map +1 -1
- package/dist/tools/pools/onDexPoolCreation.js +14 -48
- package/dist/tools/pools/onDexPoolCreation.js.map +1 -1
- package/dist/tools/pools/onLaunchpadTokenCreation.d.ts +1 -2
- package/dist/tools/pools/onLaunchpadTokenCreation.d.ts.map +1 -1
- package/dist/tools/pools/onLaunchpadTokenCreation.js +9 -42
- package/dist/tools/pools/onLaunchpadTokenCreation.js.map +1 -1
- package/dist/tools/pools/priceHistoryFactory.d.ts +44 -0
- package/dist/tools/pools/priceHistoryFactory.d.ts.map +1 -0
- package/dist/tools/pools/priceHistoryFactory.js +154 -0
- package/dist/tools/pools/priceHistoryFactory.js.map +1 -0
- package/dist/tools/pools/updateTokenSocials.d.ts +16 -0
- package/dist/tools/pools/updateTokenSocials.d.ts.map +1 -0
- package/dist/tools/pools/updateTokenSocials.js +84 -0
- package/dist/tools/pools/updateTokenSocials.js.map +1 -0
- package/dist/tools/referrals/index.d.ts +12 -0
- package/dist/tools/referrals/index.d.ts.map +1 -0
- package/dist/tools/referrals/index.js +110 -0
- package/dist/tools/referrals/index.js.map +1 -0
- package/dist/tools/streaming/index.d.ts +94 -0
- package/dist/tools/streaming/index.d.ts.map +1 -0
- package/dist/tools/streaming/index.js +549 -0
- package/dist/tools/streaming/index.js.map +1 -0
- package/dist/tools/streaming/setNextLiveStreamCountdown.d.ts +16 -0
- package/dist/tools/streaming/setNextLiveStreamCountdown.d.ts.map +1 -0
- package/dist/tools/streaming/setNextLiveStreamCountdown.js +62 -0
- package/dist/tools/streaming/setNextLiveStreamCountdown.js.map +1 -0
- package/dist/tools/token-ban/index.d.ts +39 -0
- package/dist/tools/token-ban/index.d.ts.map +1 -0
- package/dist/tools/token-ban/index.js +177 -0
- package/dist/tools/token-ban/index.js.map +1 -0
- package/dist/tools/tool-factory.d.ts +84 -0
- package/dist/tools/tool-factory.d.ts.map +1 -0
- package/dist/tools/tool-factory.js +135 -0
- package/dist/tools/tool-factory.js.map +1 -0
- package/dist/tools/trades/index.d.ts +20 -0
- package/dist/tools/trades/index.d.ts.map +1 -0
- package/dist/tools/trades/index.js +113 -0
- package/dist/tools/trades/index.js.map +1 -0
- package/dist/tools/trading/helpers/arg-extractors.d.ts +128 -0
- package/dist/tools/trading/helpers/arg-extractors.d.ts.map +1 -0
- package/dist/tools/trading/helpers/arg-extractors.js +215 -0
- package/dist/tools/trading/helpers/arg-extractors.js.map +1 -0
- package/dist/tools/trading/helpers/index.d.ts +8 -0
- package/dist/tools/trading/helpers/index.d.ts.map +1 -0
- package/dist/tools/trading/helpers/index.js +24 -0
- package/dist/tools/trading/helpers/index.js.map +1 -0
- package/dist/tools/trading/helpers/trading-schemas.d.ts +276 -0
- package/dist/tools/trading/helpers/trading-schemas.d.ts.map +1 -0
- package/dist/tools/trading/helpers/trading-schemas.js +310 -0
- package/dist/tools/trading/helpers/trading-schemas.js.map +1 -0
- package/dist/tools/trading/index.d.ts +2 -0
- package/dist/tools/trading/index.d.ts.map +1 -1
- package/dist/tools/trading/index.js +148 -371
- package/dist/tools/trading/index.js.map +1 -1
- package/dist/tools/transfers/index.d.ts +3 -0
- package/dist/tools/transfers/index.d.ts.map +1 -1
- package/dist/tools/transfers/index.js +72 -52
- package/dist/tools/transfers/index.js.map +1 -1
- package/dist/tools/utils/cleanup.d.ts.map +1 -1
- package/dist/tools/utils/cleanup.js +2 -9
- package/dist/tools/utils/cleanup.js.map +1 -1
- package/dist/tools/utils/clearCache.d.ts.map +1 -1
- package/dist/tools/utils/clearCache.js +5 -7
- package/dist/tools/utils/clearCache.js.map +1 -1
- package/dist/tools/utils/explainSdkUsage.d.ts +52 -0
- package/dist/tools/utils/explainSdkUsage.d.ts.map +1 -1
- package/dist/tools/utils/explainSdkUsage.js +1905 -93
- package/dist/tools/utils/explainSdkUsage.js.map +1 -1
- package/dist/tools/utils/getEthereumAddressFromPrivateKey.d.ts.map +1 -1
- package/dist/tools/utils/getEthereumAddressFromPrivateKey.js +2 -1
- package/dist/tools/utils/getEthereumAddressFromPrivateKey.js.map +1 -1
- package/dist/tools/utils/index.d.ts +2 -0
- package/dist/tools/utils/index.d.ts.map +1 -1
- package/dist/tools/utils/index.js +2 -12
- package/dist/tools/utils/index.js.map +1 -1
- package/dist/tools/wallet/index.d.ts +7 -0
- package/dist/tools/wallet/index.d.ts.map +1 -0
- package/dist/tools/wallet/index.js +24 -0
- package/dist/tools/wallet/index.js.map +1 -0
- package/dist/utils/date-converter.d.ts +58 -0
- package/dist/utils/date-converter.d.ts.map +1 -0
- package/dist/utils/date-converter.js +83 -0
- package/dist/utils/date-converter.js.map +1 -0
- package/dist/utils/pool-filter-builder.d.ts +78 -0
- package/dist/utils/pool-filter-builder.d.ts.map +1 -0
- package/dist/utils/pool-filter-builder.js +130 -0
- package/dist/utils/pool-filter-builder.js.map +1 -0
- package/dist/utils/safe-parsers.d.ts +87 -0
- package/dist/utils/safe-parsers.d.ts.map +1 -0
- package/dist/utils/safe-parsers.js +134 -0
- package/dist/utils/safe-parsers.js.map +1 -0
- package/dist/utils/validation.d.ts +5 -5
- package/dist/utils/validation.d.ts.map +1 -1
- package/dist/utils/validation.js +23 -21
- package/dist/utils/validation.js.map +1 -1
- package/package.json +23 -15
- package/.env.example +0 -21
- package/.eslintrc.json +0 -88
- package/CHANGELOG.md +0 -2161
- package/DOCS_AUDIT_REPORT.md +0 -189
- package/DRY_REFACTORING_GUIDE.md +0 -271
- package/MCP_COVERAGE_REPORT.md +0 -164
- package/MCP_TEST_ANALYSIS.md +0 -317
- package/jest.integration.config.js +0 -70
- package/scripts/inject-version.ts +0 -31
- package/scripts/validate-mcp-test-analysis.ts +0 -250
|
@@ -0,0 +1,179 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Prompt Factory Utilities
|
|
3
|
+
*
|
|
4
|
+
* Provides reusable factory functions for creating MCP prompt definitions
|
|
5
|
+
* with standardized validation, parameter handling, and response formatting.
|
|
6
|
+
*
|
|
7
|
+
* These factories reduce boilerplate and ensure consistent prompt behavior
|
|
8
|
+
* across the entire MCP server.
|
|
9
|
+
*
|
|
10
|
+
* @example
|
|
11
|
+
* // Create a simple token operation prompt
|
|
12
|
+
* const myPrompt = createTokenOperationPrompt({
|
|
13
|
+
* name: 'my-operation',
|
|
14
|
+
* description: 'Perform operation on token',
|
|
15
|
+
* requiresTokenName: true,
|
|
16
|
+
* toolName: 'gala_launchpad_my_tool',
|
|
17
|
+
* actionDescription: 'perform the operation',
|
|
18
|
+
* buildParameters: (args) => ({
|
|
19
|
+
* token: `Token: ${args.tokenName}`,
|
|
20
|
+
* amount: `Amount: ${args.amount}`
|
|
21
|
+
* })
|
|
22
|
+
* });
|
|
23
|
+
*/
|
|
24
|
+
import type { MCPPrompt, MCPPromptArgument } from '../types/mcp.js';
|
|
25
|
+
/**
|
|
26
|
+
* Configuration for token operation prompt factory
|
|
27
|
+
*/
|
|
28
|
+
export interface TokenOperationConfig {
|
|
29
|
+
/** Unique prompt name (e.g., 'send-token') */
|
|
30
|
+
name: string;
|
|
31
|
+
/** User-facing description */
|
|
32
|
+
description: string;
|
|
33
|
+
/** Whether this operation requires a tokenName argument */
|
|
34
|
+
requiresTokenName: boolean;
|
|
35
|
+
/** MCP tool name to invoke (e.g., 'gala_launchpad_send_token') */
|
|
36
|
+
toolName: string;
|
|
37
|
+
/** Action description for display (e.g., 'send the token') */
|
|
38
|
+
actionDescription: string;
|
|
39
|
+
/** Function to build parameter object from handler arguments */
|
|
40
|
+
buildParameters: (args: Record<string, string>) => Record<string, string | undefined>;
|
|
41
|
+
/** Additional arguments beyond tokenName (if requiresTokenName is true) */
|
|
42
|
+
additionalArguments?: MCPPromptArgument[];
|
|
43
|
+
/** Optional operation description override */
|
|
44
|
+
operationDescription?: string;
|
|
45
|
+
/** Optional display format instructions */
|
|
46
|
+
displayFormat?: string;
|
|
47
|
+
/** Optional operation-specific validation function */
|
|
48
|
+
validate?: (args: Record<string, string>) => void;
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* Create a complete MCPPrompt for a token operation with standardized handling
|
|
52
|
+
*
|
|
53
|
+
* This factory handles the common pattern of:
|
|
54
|
+
* 1. Validate token name (if required)
|
|
55
|
+
* 2. Validate any additional arguments
|
|
56
|
+
* 3. Build parameters object with conditional fields
|
|
57
|
+
* 4. Create and return prompt response
|
|
58
|
+
*
|
|
59
|
+
* @param config - Configuration for the token operation prompt
|
|
60
|
+
* @returns Complete MCPPrompt definition ready to use
|
|
61
|
+
*
|
|
62
|
+
* @example
|
|
63
|
+
* ```typescript
|
|
64
|
+
* const sendTokenPrompt = createTokenOperationPrompt({
|
|
65
|
+
* name: 'send-token',
|
|
66
|
+
* description: 'Send tokens to another user',
|
|
67
|
+
* requiresTokenName: true,
|
|
68
|
+
* toolName: 'gala_launchpad_send_token',
|
|
69
|
+
* actionDescription: 'send the tokens',
|
|
70
|
+
* additionalArguments: [
|
|
71
|
+
* { name: 'to', description: 'Recipient address', required: true },
|
|
72
|
+
* { name: 'amount', description: 'Amount to send', required: true }
|
|
73
|
+
* ],
|
|
74
|
+
* buildParameters: (args) => ({
|
|
75
|
+
* token: `Token: ${args.tokenName}`,
|
|
76
|
+
* to: `To: ${args.to}`,
|
|
77
|
+
* amount: `Amount: ${args.amount}`
|
|
78
|
+
* }),
|
|
79
|
+
* operationDescription: 'Send tokens to another user. Requires valid recipient address.'
|
|
80
|
+
* });
|
|
81
|
+
* ```
|
|
82
|
+
*/
|
|
83
|
+
export declare function createTokenOperationPrompt(config: TokenOperationConfig): MCPPrompt;
|
|
84
|
+
/**
|
|
85
|
+
* Build an address parameter conditionally
|
|
86
|
+
*
|
|
87
|
+
* Useful for handlers that accept optional address arguments.
|
|
88
|
+
* Returns the formatted parameter only if address is provided.
|
|
89
|
+
*
|
|
90
|
+
* @param address - Address value (optional)
|
|
91
|
+
* @param fieldName - Display name for the parameter (default: 'address')
|
|
92
|
+
* @returns Parameter object with formatted address, or undefined
|
|
93
|
+
*
|
|
94
|
+
* @example
|
|
95
|
+
* ```typescript
|
|
96
|
+
* // In handler
|
|
97
|
+
* const parameters = {
|
|
98
|
+
* ...buildAddressParameter(args.address, 'From'),
|
|
99
|
+
* ...buildAddressParameter(args.to, 'To')
|
|
100
|
+
* };
|
|
101
|
+
* ```
|
|
102
|
+
*/
|
|
103
|
+
export declare function buildAddressParameter(address?: string, fieldName?: string): Record<string, string> | undefined;
|
|
104
|
+
/**
|
|
105
|
+
* Build parameter object with conditional fields
|
|
106
|
+
*
|
|
107
|
+
* Provides flexible parameter object construction with support for
|
|
108
|
+
* default values and conditional inclusion based on predicates.
|
|
109
|
+
*
|
|
110
|
+
* @param defaults - Default parameters to always include
|
|
111
|
+
* @param conditionals - Array of [condition, key, value] tuples for conditional fields
|
|
112
|
+
* @returns Parameter object with default and conditional fields
|
|
113
|
+
*
|
|
114
|
+
* @example
|
|
115
|
+
* ```typescript
|
|
116
|
+
* const parameters = buildParameterObject(
|
|
117
|
+
* {
|
|
118
|
+
* token: `Token: ${args.tokenName}`
|
|
119
|
+
* },
|
|
120
|
+
* [
|
|
121
|
+
* [!!args.amount, 'amount', `Amount: ${args.amount}`],
|
|
122
|
+
* [!!args.slippage, 'slippage', `Slippage: ${args.slippage}%`],
|
|
123
|
+
* [args.type === 'exact', 'type', 'Type: Exact Input']
|
|
124
|
+
* ]
|
|
125
|
+
* );
|
|
126
|
+
* ```
|
|
127
|
+
*/
|
|
128
|
+
export declare function buildParameterObject(defaults: Record<string, string>, conditionals?: Array<[condition: boolean, key: string, value: string]>): Record<string, string>;
|
|
129
|
+
/**
|
|
130
|
+
* Parse boolean value from string argument
|
|
131
|
+
*
|
|
132
|
+
* Handles common boolean representations: 'true', 't', 'yes', '1' as true,
|
|
133
|
+
* everything else as false.
|
|
134
|
+
*
|
|
135
|
+
* @param value - String value to parse as boolean
|
|
136
|
+
* @returns Parsed boolean value
|
|
137
|
+
*
|
|
138
|
+
* @example
|
|
139
|
+
* ```typescript
|
|
140
|
+
* parseBoolean('true') // → true
|
|
141
|
+
* parseBoolean('false') // → false
|
|
142
|
+
* parseBoolean('yes') // → true
|
|
143
|
+
* parseBoolean('no') // → false
|
|
144
|
+
* parseBoolean('1') // → true
|
|
145
|
+
* parseBoolean('0') // → false
|
|
146
|
+
* ```
|
|
147
|
+
*/
|
|
148
|
+
export declare function parseBoolean(value: string): boolean;
|
|
149
|
+
/**
|
|
150
|
+
* Format private key for display by obfuscating sensitive parts
|
|
151
|
+
*
|
|
152
|
+
* Shows only first and last 6 characters, replacing middle with asterisks.
|
|
153
|
+
* Never displays the full key to prevent accidental exposure.
|
|
154
|
+
*
|
|
155
|
+
* @param key - Private key to obfuscate
|
|
156
|
+
* @returns Obfuscated key for safe display
|
|
157
|
+
*
|
|
158
|
+
* @example
|
|
159
|
+
* ```typescript
|
|
160
|
+
* formatPrivateKeyForDisplay('0x1234567890abcdef...')
|
|
161
|
+
* // → '0x1234...cdef' (or similar pattern)
|
|
162
|
+
*
|
|
163
|
+
* const key = 'abc123def456ghi789'; // 18 chars
|
|
164
|
+
* formatPrivateKeyForDisplay(key)
|
|
165
|
+
* // → 'abc123...i789'
|
|
166
|
+
* ```
|
|
167
|
+
*/
|
|
168
|
+
export declare function formatPrivateKeyForDisplay(key: string): string;
|
|
169
|
+
/**
|
|
170
|
+
* Export all factory utilities for convenient access
|
|
171
|
+
*/
|
|
172
|
+
export declare const promptFactories: {
|
|
173
|
+
createTokenOperationPrompt: typeof createTokenOperationPrompt;
|
|
174
|
+
buildAddressParameter: typeof buildAddressParameter;
|
|
175
|
+
buildParameterObject: typeof buildParameterObject;
|
|
176
|
+
parseBoolean: typeof parseBoolean;
|
|
177
|
+
formatPrivateKeyForDisplay: typeof formatPrivateKeyForDisplay;
|
|
178
|
+
};
|
|
179
|
+
//# sourceMappingURL=prompt-factories.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"prompt-factories.d.ts","sourceRoot":"","sources":["../../src/prompts/prompt-factories.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAEH,OAAO,KAAK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,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,CAAC,CAAM,GACzE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAUxB;AAED;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,YAAY,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAKnD;AAED;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,0BAA0B,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAS9D;AAED;;GAEG;AACH,eAAO,MAAM,eAAe;;;;;;CAM3B,CAAC"}
|
|
@@ -0,0 +1,230 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Prompt Factory Utilities
|
|
4
|
+
*
|
|
5
|
+
* Provides reusable factory functions for creating MCP prompt definitions
|
|
6
|
+
* with standardized validation, parameter handling, and response formatting.
|
|
7
|
+
*
|
|
8
|
+
* These factories reduce boilerplate and ensure consistent prompt behavior
|
|
9
|
+
* across the entire MCP server.
|
|
10
|
+
*
|
|
11
|
+
* @example
|
|
12
|
+
* // Create a simple token operation prompt
|
|
13
|
+
* const myPrompt = createTokenOperationPrompt({
|
|
14
|
+
* name: 'my-operation',
|
|
15
|
+
* description: 'Perform operation on token',
|
|
16
|
+
* requiresTokenName: true,
|
|
17
|
+
* toolName: 'gala_launchpad_my_tool',
|
|
18
|
+
* actionDescription: 'perform the operation',
|
|
19
|
+
* buildParameters: (args) => ({
|
|
20
|
+
* token: `Token: ${args.tokenName}`,
|
|
21
|
+
* amount: `Amount: ${args.amount}`
|
|
22
|
+
* })
|
|
23
|
+
* });
|
|
24
|
+
*/
|
|
25
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
+
exports.promptFactories = void 0;
|
|
27
|
+
exports.createTokenOperationPrompt = createTokenOperationPrompt;
|
|
28
|
+
exports.buildAddressParameter = buildAddressParameter;
|
|
29
|
+
exports.buildParameterObject = buildParameterObject;
|
|
30
|
+
exports.parseBoolean = parseBoolean;
|
|
31
|
+
exports.formatPrivateKeyForDisplay = formatPrivateKeyForDisplay;
|
|
32
|
+
const validation_js_1 = require("../utils/validation.js");
|
|
33
|
+
const handlerHelpers_js_1 = require("./utils/handlerHelpers.js");
|
|
34
|
+
const textTemplates_js_1 = require("./utils/textTemplates.js");
|
|
35
|
+
/**
|
|
36
|
+
* Create a complete MCPPrompt for a token operation with standardized handling
|
|
37
|
+
*
|
|
38
|
+
* This factory handles the common pattern of:
|
|
39
|
+
* 1. Validate token name (if required)
|
|
40
|
+
* 2. Validate any additional arguments
|
|
41
|
+
* 3. Build parameters object with conditional fields
|
|
42
|
+
* 4. Create and return prompt response
|
|
43
|
+
*
|
|
44
|
+
* @param config - Configuration for the token operation prompt
|
|
45
|
+
* @returns Complete MCPPrompt definition ready to use
|
|
46
|
+
*
|
|
47
|
+
* @example
|
|
48
|
+
* ```typescript
|
|
49
|
+
* const sendTokenPrompt = createTokenOperationPrompt({
|
|
50
|
+
* name: 'send-token',
|
|
51
|
+
* description: 'Send tokens to another user',
|
|
52
|
+
* requiresTokenName: true,
|
|
53
|
+
* toolName: 'gala_launchpad_send_token',
|
|
54
|
+
* actionDescription: 'send the tokens',
|
|
55
|
+
* additionalArguments: [
|
|
56
|
+
* { name: 'to', description: 'Recipient address', required: true },
|
|
57
|
+
* { name: 'amount', description: 'Amount to send', required: true }
|
|
58
|
+
* ],
|
|
59
|
+
* buildParameters: (args) => ({
|
|
60
|
+
* token: `Token: ${args.tokenName}`,
|
|
61
|
+
* to: `To: ${args.to}`,
|
|
62
|
+
* amount: `Amount: ${args.amount}`
|
|
63
|
+
* }),
|
|
64
|
+
* operationDescription: 'Send tokens to another user. Requires valid recipient address.'
|
|
65
|
+
* });
|
|
66
|
+
* ```
|
|
67
|
+
*/
|
|
68
|
+
function createTokenOperationPrompt(config) {
|
|
69
|
+
const { name, description, requiresTokenName, toolName, actionDescription, buildParameters, additionalArguments = [], operationDescription, displayFormat, validate: customValidate, } = config;
|
|
70
|
+
// Build arguments list
|
|
71
|
+
const baseArguments = requiresTokenName
|
|
72
|
+
? [{ name: 'tokenName', description: 'Token name (e.g., anime)', required: true }]
|
|
73
|
+
: [];
|
|
74
|
+
return {
|
|
75
|
+
name,
|
|
76
|
+
description,
|
|
77
|
+
arguments: [...baseArguments, ...additionalArguments],
|
|
78
|
+
handler: (args) => {
|
|
79
|
+
// Validate token name if required
|
|
80
|
+
if (requiresTokenName) {
|
|
81
|
+
(0, validation_js_1.validateTokenName)(args.tokenName);
|
|
82
|
+
}
|
|
83
|
+
// Run custom validation if provided
|
|
84
|
+
if (customValidate) {
|
|
85
|
+
customValidate(args);
|
|
86
|
+
}
|
|
87
|
+
// Build parameters object
|
|
88
|
+
const parameters = buildParameters(args);
|
|
89
|
+
// Create operation description (support template placeholders)
|
|
90
|
+
let operation = operationDescription || '';
|
|
91
|
+
if (operation && requiresTokenName) {
|
|
92
|
+
operation = operation.replace('{tokenName}', args.tokenName);
|
|
93
|
+
}
|
|
94
|
+
if (!operation) {
|
|
95
|
+
operation = requiresTokenName
|
|
96
|
+
? `Perform operation on token "${args.tokenName}".`
|
|
97
|
+
: 'Perform operation.';
|
|
98
|
+
}
|
|
99
|
+
// Create and return prompt response
|
|
100
|
+
return (0, handlerHelpers_js_1.createPromptResponse)((0, textTemplates_js_1.createSimpleOperationText)({
|
|
101
|
+
operation,
|
|
102
|
+
parameters,
|
|
103
|
+
toolName,
|
|
104
|
+
actionDescription,
|
|
105
|
+
displayFormat,
|
|
106
|
+
}));
|
|
107
|
+
},
|
|
108
|
+
};
|
|
109
|
+
}
|
|
110
|
+
/**
|
|
111
|
+
* Build an address parameter conditionally
|
|
112
|
+
*
|
|
113
|
+
* Useful for handlers that accept optional address arguments.
|
|
114
|
+
* Returns the formatted parameter only if address is provided.
|
|
115
|
+
*
|
|
116
|
+
* @param address - Address value (optional)
|
|
117
|
+
* @param fieldName - Display name for the parameter (default: 'address')
|
|
118
|
+
* @returns Parameter object with formatted address, or undefined
|
|
119
|
+
*
|
|
120
|
+
* @example
|
|
121
|
+
* ```typescript
|
|
122
|
+
* // In handler
|
|
123
|
+
* const parameters = {
|
|
124
|
+
* ...buildAddressParameter(args.address, 'From'),
|
|
125
|
+
* ...buildAddressParameter(args.to, 'To')
|
|
126
|
+
* };
|
|
127
|
+
* ```
|
|
128
|
+
*/
|
|
129
|
+
function buildAddressParameter(address, fieldName = 'Address') {
|
|
130
|
+
if (!address) {
|
|
131
|
+
return undefined;
|
|
132
|
+
}
|
|
133
|
+
return { [fieldName]: `${fieldName}: ${address}` };
|
|
134
|
+
}
|
|
135
|
+
/**
|
|
136
|
+
* Build parameter object with conditional fields
|
|
137
|
+
*
|
|
138
|
+
* Provides flexible parameter object construction with support for
|
|
139
|
+
* default values and conditional inclusion based on predicates.
|
|
140
|
+
*
|
|
141
|
+
* @param defaults - Default parameters to always include
|
|
142
|
+
* @param conditionals - Array of [condition, key, value] tuples for conditional fields
|
|
143
|
+
* @returns Parameter object with default and conditional fields
|
|
144
|
+
*
|
|
145
|
+
* @example
|
|
146
|
+
* ```typescript
|
|
147
|
+
* const parameters = buildParameterObject(
|
|
148
|
+
* {
|
|
149
|
+
* token: `Token: ${args.tokenName}`
|
|
150
|
+
* },
|
|
151
|
+
* [
|
|
152
|
+
* [!!args.amount, 'amount', `Amount: ${args.amount}`],
|
|
153
|
+
* [!!args.slippage, 'slippage', `Slippage: ${args.slippage}%`],
|
|
154
|
+
* [args.type === 'exact', 'type', 'Type: Exact Input']
|
|
155
|
+
* ]
|
|
156
|
+
* );
|
|
157
|
+
* ```
|
|
158
|
+
*/
|
|
159
|
+
function buildParameterObject(defaults, conditionals = []) {
|
|
160
|
+
const parameters = { ...defaults };
|
|
161
|
+
for (const [condition, key, value] of conditionals) {
|
|
162
|
+
if (condition) {
|
|
163
|
+
parameters[key] = value;
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
return parameters;
|
|
167
|
+
}
|
|
168
|
+
/**
|
|
169
|
+
* Parse boolean value from string argument
|
|
170
|
+
*
|
|
171
|
+
* Handles common boolean representations: 'true', 't', 'yes', '1' as true,
|
|
172
|
+
* everything else as false.
|
|
173
|
+
*
|
|
174
|
+
* @param value - String value to parse as boolean
|
|
175
|
+
* @returns Parsed boolean value
|
|
176
|
+
*
|
|
177
|
+
* @example
|
|
178
|
+
* ```typescript
|
|
179
|
+
* parseBoolean('true') // → true
|
|
180
|
+
* parseBoolean('false') // → false
|
|
181
|
+
* parseBoolean('yes') // → true
|
|
182
|
+
* parseBoolean('no') // → false
|
|
183
|
+
* parseBoolean('1') // → true
|
|
184
|
+
* parseBoolean('0') // → false
|
|
185
|
+
* ```
|
|
186
|
+
*/
|
|
187
|
+
function parseBoolean(value) {
|
|
188
|
+
if (!value || typeof value !== 'string') {
|
|
189
|
+
return false;
|
|
190
|
+
}
|
|
191
|
+
return ['true', 't', 'yes', 'y', '1'].includes(value.toLowerCase());
|
|
192
|
+
}
|
|
193
|
+
/**
|
|
194
|
+
* Format private key for display by obfuscating sensitive parts
|
|
195
|
+
*
|
|
196
|
+
* Shows only first and last 6 characters, replacing middle with asterisks.
|
|
197
|
+
* Never displays the full key to prevent accidental exposure.
|
|
198
|
+
*
|
|
199
|
+
* @param key - Private key to obfuscate
|
|
200
|
+
* @returns Obfuscated key for safe display
|
|
201
|
+
*
|
|
202
|
+
* @example
|
|
203
|
+
* ```typescript
|
|
204
|
+
* formatPrivateKeyForDisplay('0x1234567890abcdef...')
|
|
205
|
+
* // → '0x1234...cdef' (or similar pattern)
|
|
206
|
+
*
|
|
207
|
+
* const key = 'abc123def456ghi789'; // 18 chars
|
|
208
|
+
* formatPrivateKeyForDisplay(key)
|
|
209
|
+
* // → 'abc123...i789'
|
|
210
|
+
* ```
|
|
211
|
+
*/
|
|
212
|
+
function formatPrivateKeyForDisplay(key) {
|
|
213
|
+
if (!key || key.length <= 12) {
|
|
214
|
+
return '***' + (key?.slice(-3) || '***');
|
|
215
|
+
}
|
|
216
|
+
const prefix = key.slice(0, 6);
|
|
217
|
+
const suffix = key.slice(-6);
|
|
218
|
+
return `${prefix}...${suffix}`;
|
|
219
|
+
}
|
|
220
|
+
/**
|
|
221
|
+
* Export all factory utilities for convenient access
|
|
222
|
+
*/
|
|
223
|
+
exports.promptFactories = {
|
|
224
|
+
createTokenOperationPrompt,
|
|
225
|
+
buildAddressParameter,
|
|
226
|
+
buildParameterObject,
|
|
227
|
+
parseBoolean,
|
|
228
|
+
formatPrivateKeyForDisplay,
|
|
229
|
+
};
|
|
230
|
+
//# sourceMappingURL=prompt-factories.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"prompt-factories.js","sourceRoot":"","sources":["../../src/prompts/prompt-factories.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;;;AA2EH,gEA4DC;AAqBD,sDAQC;AA0BD,oDAaC;AAqBD,oCAKC;AAqBD,gEASC;AAhQD,0DAA2D;AAC3D,iEAAiE;AACjE,+DAAqE;AAqCrE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AACH,SAAgB,0BAA0B,CAAC,MAA4B;IACrE,MAAM,EACJ,IAAI,EACJ,WAAW,EACX,iBAAiB,EACjB,QAAQ,EACR,iBAAiB,EACjB,eAAe,EACf,mBAAmB,GAAG,EAAE,EACxB,oBAAoB,EACpB,aAAa,EACb,QAAQ,EAAE,cAAc,GACzB,GAAG,MAAM,CAAC;IAEX,uBAAuB;IACvB,MAAM,aAAa,GAAwB,iBAAiB;QAC1D,CAAC,CAAC,CAAC,EAAE,IAAI,EAAE,WAAW,EAAE,WAAW,EAAE,0BAA0B,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;QAClF,CAAC,CAAC,EAAE,CAAC;IAEP,OAAO;QACL,IAAI;QACJ,WAAW;QACX,SAAS,EAAE,CAAC,GAAG,aAAa,EAAE,GAAG,mBAAmB,CAAC;QACrD,OAAO,EAAE,CAAC,IAAI,EAAE,EAAE;YAChB,kCAAkC;YAClC,IAAI,iBA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
* Includes fetching referral URLs, listing referrals, and viewing summaries.
|
|
6
|
+
*
|
|
7
|
+
* @since 6.0.0
|
|
8
|
+
*/
|
|
9
|
+
import type { MCPPrompt } from '../types/mcp.js';
|
|
10
|
+
/**
|
|
11
|
+
* Fetch Referral URL - Get unique referral link
|
|
12
|
+
*/
|
|
13
|
+
export declare const fetchReferralUrlPrompt: MCPPrompt;
|
|
14
|
+
/**
|
|
15
|
+
* Fetch Referrals - Get paginated list of referrals
|
|
16
|
+
*/
|
|
17
|
+
export declare const fetchReferralsPrompt: MCPPrompt;
|
|
18
|
+
/**
|
|
19
|
+
* Fetch All Referrals - Get complete referral list
|
|
20
|
+
*/
|
|
21
|
+
export declare const fetchAllReferralsPrompt: MCPPrompt;
|
|
22
|
+
/**
|
|
23
|
+
* Fetch Referrals Summary - Get referral statistics
|
|
24
|
+
*/
|
|
25
|
+
export declare const fetchReferralsSummaryPrompt: MCPPrompt;
|
|
26
|
+
export declare const referralPrompts: MCPPrompt[];
|
|
27
|
+
//# sourceMappingURL=referrals.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"referrals.d.ts","sourceRoot":"","sources":["../../src/prompts/referrals.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAmBjD;;GAEG;AACH,eAAO,MAAM,sBAAsB,EAAE,SAkBpC,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,oBAAoB,EAAE,SA+ClC,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,uBAAuB,EAAE,SA8CrC,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,2BAA2B,EAAE,SAoCzC,CAAC;AAMF,eAAO,MAAM,eAAe,EAAE,SAAS,EAKtC,CAAC"}
|
|
@@ -0,0 +1,176 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Referral Prompts
|
|
4
|
+
*
|
|
5
|
+
* Slash commands for the referral program and rewards tracking on Gala Launchpad.
|
|
6
|
+
* Includes fetching referral URLs, listing referrals, and viewing summaries.
|
|
7
|
+
*
|
|
8
|
+
* @since 6.0.0
|
|
9
|
+
*/
|
|
10
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
11
|
+
exports.referralPrompts = exports.fetchReferralsSummaryPrompt = exports.fetchAllReferralsPrompt = exports.fetchReferralsPrompt = exports.fetchReferralUrlPrompt = void 0;
|
|
12
|
+
const validation_js_1 = require("../utils/validation.js");
|
|
13
|
+
const handlerHelpers_js_1 = require("./utils/handlerHelpers.js");
|
|
14
|
+
const textTemplates_js_1 = require("./utils/textTemplates.js");
|
|
15
|
+
const prompt_factories_js_1 = require("./prompt-factories.js");
|
|
16
|
+
const pagination_helpers_js_1 = require("./utils/pagination-helpers.js");
|
|
17
|
+
// Tool name constants
|
|
18
|
+
const REFERRAL_TOOLS = {
|
|
19
|
+
FETCH_REFERRAL_URL: 'gala_launchpad_fetch_referral_url',
|
|
20
|
+
FETCH_REFERRALS: 'gala_launchpad_fetch_referrals',
|
|
21
|
+
FETCH_ALL_REFERRALS: 'gala_launchpad_fetch_all_referrals',
|
|
22
|
+
FETCH_REFERRALS_SUMMARY: 'gala_launchpad_fetch_referrals_summary',
|
|
23
|
+
};
|
|
24
|
+
// =============================================================================
|
|
25
|
+
// Referral Prompts
|
|
26
|
+
// =============================================================================
|
|
27
|
+
/**
|
|
28
|
+
* Fetch Referral URL - Get unique referral link
|
|
29
|
+
*/
|
|
30
|
+
exports.fetchReferralUrlPrompt = {
|
|
31
|
+
name: 'galachain-launchpad:fetch-referral-url',
|
|
32
|
+
description: 'Get your unique referral URL for sharing',
|
|
33
|
+
arguments: [],
|
|
34
|
+
handler: () => {
|
|
35
|
+
return (0, handlerHelpers_js_1.createPromptResponse)((0, textTemplates_js_1.createSimpleOperationText)({
|
|
36
|
+
operation: `Get your unique referral URL.
|
|
37
|
+
|
|
38
|
+
The referral URL can be shared to earn rewards when new users sign up.
|
|
39
|
+
Requires wallet configuration.`,
|
|
40
|
+
parameters: {},
|
|
41
|
+
toolName: REFERRAL_TOOLS.FETCH_REFERRAL_URL,
|
|
42
|
+
actionDescription: 'fetch the referral URL',
|
|
43
|
+
displayFormat: 'Display the referral URL ready for sharing.',
|
|
44
|
+
}));
|
|
45
|
+
},
|
|
46
|
+
};
|
|
47
|
+
/**
|
|
48
|
+
* Fetch Referrals - Get paginated list of referrals
|
|
49
|
+
*/
|
|
50
|
+
exports.fetchReferralsPrompt = {
|
|
51
|
+
name: 'galachain-launchpad:fetch-referrals',
|
|
52
|
+
description: 'Get paginated list of users who signed up using your referral link',
|
|
53
|
+
arguments: [
|
|
54
|
+
{
|
|
55
|
+
name: 'address',
|
|
56
|
+
description: 'Wallet address (defaults to SDK wallet)',
|
|
57
|
+
required: false,
|
|
58
|
+
},
|
|
59
|
+
...(0, pagination_helpers_js_1.createPaginationArguments)({ defaultLimit: 100, maxLimit: 100 }),
|
|
60
|
+
{
|
|
61
|
+
name: 'sortBy',
|
|
62
|
+
description: 'Sort field: joined (default: joined)',
|
|
63
|
+
required: false,
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
name: 'sortDir',
|
|
67
|
+
description: 'Sort direction: asc or desc (default: desc)',
|
|
68
|
+
required: false,
|
|
69
|
+
},
|
|
70
|
+
],
|
|
71
|
+
handler: (args) => {
|
|
72
|
+
if (args.address) {
|
|
73
|
+
(0, validation_js_1.validateAddress)(args.address, 'address');
|
|
74
|
+
}
|
|
75
|
+
const parameters = (0, prompt_factories_js_1.buildParameterObject)({}, [
|
|
76
|
+
[!!args.address, 'address', `Address: ${args.address}`],
|
|
77
|
+
[!!args.page, 'page', `Page: ${args.page}`],
|
|
78
|
+
[!!args.limit, 'limit', `Limit: ${args.limit}`],
|
|
79
|
+
[!!args.sortBy, 'sortBy', `Sort By: ${args.sortBy}`],
|
|
80
|
+
[!!args.sortDir, 'sortDir', `Sort Dir: ${args.sortDir}`],
|
|
81
|
+
]);
|
|
82
|
+
return (0, handlerHelpers_js_1.createPromptResponse)((0, textTemplates_js_1.createSimpleOperationText)({
|
|
83
|
+
operation: 'Fetch paginated list of referrals.',
|
|
84
|
+
parameters,
|
|
85
|
+
toolName: REFERRAL_TOOLS.FETCH_REFERRALS,
|
|
86
|
+
actionDescription: 'fetch referrals',
|
|
87
|
+
displayFormat: 'Display referrals in a table with address, join date, and rewards earned.',
|
|
88
|
+
}));
|
|
89
|
+
},
|
|
90
|
+
};
|
|
91
|
+
/**
|
|
92
|
+
* Fetch All Referrals - Get complete referral list
|
|
93
|
+
*/
|
|
94
|
+
exports.fetchAllReferralsPrompt = {
|
|
95
|
+
name: 'galachain-launchpad:fetch-all-referrals',
|
|
96
|
+
description: 'Fetch all referrals with automatic pagination',
|
|
97
|
+
arguments: [
|
|
98
|
+
{
|
|
99
|
+
name: 'address',
|
|
100
|
+
description: 'Wallet address (defaults to SDK wallet)',
|
|
101
|
+
required: false,
|
|
102
|
+
},
|
|
103
|
+
{
|
|
104
|
+
name: 'sortBy',
|
|
105
|
+
description: 'Sort field: joined (default: joined)',
|
|
106
|
+
required: false,
|
|
107
|
+
},
|
|
108
|
+
{
|
|
109
|
+
name: 'sortDir',
|
|
110
|
+
description: 'Sort direction: asc or desc (default: desc)',
|
|
111
|
+
required: false,
|
|
112
|
+
},
|
|
113
|
+
],
|
|
114
|
+
handler: (args) => {
|
|
115
|
+
if (args.address) {
|
|
116
|
+
(0, validation_js_1.validateAddress)(args.address, 'address');
|
|
117
|
+
}
|
|
118
|
+
const parameters = (0, prompt_factories_js_1.buildParameterObject)({}, [
|
|
119
|
+
[!!args.address, 'address', `Address: ${args.address}`],
|
|
120
|
+
[!!args.sortBy, 'sortBy', `Sort By: ${args.sortBy}`],
|
|
121
|
+
[!!args.sortDir, 'sortDir', `Sort Dir: ${args.sortDir}`],
|
|
122
|
+
]);
|
|
123
|
+
return (0, handlerHelpers_js_1.createPromptResponse)((0, textTemplates_js_1.createSimpleOperationText)({
|
|
124
|
+
operation: `Fetch all referrals with automatic pagination.
|
|
125
|
+
|
|
126
|
+
Returns the complete list of referred users without manual pagination.`,
|
|
127
|
+
parameters,
|
|
128
|
+
toolName: REFERRAL_TOOLS.FETCH_ALL_REFERRALS,
|
|
129
|
+
actionDescription: 'fetch all referrals',
|
|
130
|
+
displayFormat: 'Display all referrals with total count.',
|
|
131
|
+
}));
|
|
132
|
+
},
|
|
133
|
+
};
|
|
134
|
+
/**
|
|
135
|
+
* Fetch Referrals Summary - Get referral statistics
|
|
136
|
+
*/
|
|
137
|
+
exports.fetchReferralsSummaryPrompt = {
|
|
138
|
+
name: 'galachain-launchpad:fetch-referrals-summary',
|
|
139
|
+
description: 'Get referral program summary statistics',
|
|
140
|
+
arguments: [
|
|
141
|
+
{
|
|
142
|
+
name: 'address',
|
|
143
|
+
description: 'Wallet address (defaults to SDK wallet)',
|
|
144
|
+
required: false,
|
|
145
|
+
},
|
|
146
|
+
],
|
|
147
|
+
handler: (args) => {
|
|
148
|
+
if (args.address) {
|
|
149
|
+
(0, validation_js_1.validateAddress)(args.address, 'address');
|
|
150
|
+
}
|
|
151
|
+
const parameters = (0, prompt_factories_js_1.buildParameterObject)({}, [[!!args.address, 'address', `Address: ${args.address}`]]);
|
|
152
|
+
return (0, handlerHelpers_js_1.createPromptResponse)((0, textTemplates_js_1.createSimpleOperationText)({
|
|
153
|
+
operation: `Get referral program summary statistics.
|
|
154
|
+
|
|
155
|
+
Returns:
|
|
156
|
+
- Total referral count
|
|
157
|
+
- Rewards earned (past day, past month, all-time)
|
|
158
|
+
|
|
159
|
+
Perfect for dashboards and quick overviews.`,
|
|
160
|
+
parameters,
|
|
161
|
+
toolName: REFERRAL_TOOLS.FETCH_REFERRALS_SUMMARY,
|
|
162
|
+
actionDescription: 'fetch referral summary',
|
|
163
|
+
displayFormat: 'Display summary with total referrals and reward breakdowns.',
|
|
164
|
+
}));
|
|
165
|
+
},
|
|
166
|
+
};
|
|
167
|
+
// =============================================================================
|
|
168
|
+
// Export
|
|
169
|
+
// =============================================================================
|
|
170
|
+
exports.referralPrompts = [
|
|
171
|
+
exports.fetchReferralUrlPrompt,
|
|
172
|
+
exports.fetchReferralsPrompt,
|
|
173
|
+
exports.fetchAllReferralsPrompt,
|
|
174
|
+
exports.fetchReferralsSummaryPrompt,
|
|
175
|
+
];
|
|
176
|
+
//# sourceMappingURL=referrals.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"referrals.js","sourceRoot":"","sources":["../../src/prompts/referrals.ts"],"names":[],"mappings":";AAAA;;;;;;;GAOG;;;AAGH,0DAAyD;AACzD,iEAAiE;AACjE,+DAAqE;AACrE,+DAA6D;AAC7D,yEAA0E;AAE1E,sBAAsB;AACtB,MAAM,cAAc,GAAG;IACrB,kBAAkB,EAAE,mCAAmC;IACvD,eAAe,EAAE,gCAAgC;IACjD,mBAAmB,EAAE,oCAAoC;IACzD,uBAAuB,EAAE,wCAAwC;CACzD,CAAC;AAEX,gFAAgF;AAChF,mBAAmB;AACnB,gFAAgF;AAEhF;;GAEG;AACU,QAAA,sBAAsB,GAAc;IAC/C,IAAI,EAAE,wCAAwC;IAC9C,WAAW,EAAE,0CAA0C;IACvD,SAAS,EAAE,EAAE;IACb,OAAO,EAAE,GAAG,EAAE;QACZ,OAAO,IAAA,wCAAoB,EACzB,IAAA,4CAAyB,EAAC;YACxB,SAAS,EAAE;;;+BAGY;YACvB,UAAU,EAAE,EAAE;YACd,QAAQ,EAAE,cAAc,CAAC,kBAAkB;YAC3C,iBAAiB,EAAE,wBAAwB;YAC3C,aAAa,EAAE,6CAA6C;SAC7D,CAAC,CACH,CAAC;IACJ,CAAC;CACF,CAAC;AAEF;;GAEG;AACU,QAAA,oBAAoB,GAAc;IAC7C,IAAI,EAAE,qCAAqC;IAC3C,WAAW,EAAE,oEAAoE;IACjF,SAAS,EAAE;QACT;YACE,IAAI,EAAE,SAAS;YACf,WAAW,EAAE,yCAAyC;YACtD,QAAQ,EAAE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