@gala-chain/launchpad-mcp-server 1.18.0 → 1.19.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/CHANGELOG.md +185 -0
- package/README.md +83 -3
- package/dist/generated/version.d.ts +1 -1
- package/dist/generated/version.js +1 -1
- package/dist/prompts/create-token.d.ts +15 -0
- package/dist/prompts/create-token.d.ts.map +1 -0
- package/dist/prompts/create-token.js +106 -0
- package/dist/prompts/create-token.js.map +1 -0
- package/dist/prompts/dex-trading.d.ts +18 -0
- package/dist/prompts/dex-trading.d.ts.map +1 -0
- package/dist/prompts/dex-trading.js +83 -0
- package/dist/prompts/dex-trading.js.map +1 -0
- package/dist/prompts/discover-tokens.d.ts +15 -0
- package/dist/prompts/discover-tokens.d.ts.map +1 -0
- package/dist/prompts/discover-tokens.js +78 -0
- package/dist/prompts/discover-tokens.js.map +1 -0
- package/dist/prompts/index.d.ts +9 -4
- package/dist/prompts/index.d.ts.map +1 -1
- package/dist/prompts/index.js +20 -3
- package/dist/prompts/index.js.map +1 -1
- package/dist/prompts/utils/workflowTemplates.d.ts +28 -0
- package/dist/prompts/utils/workflowTemplates.d.ts.map +1 -1
- package/dist/prompts/utils/workflowTemplates.js +136 -0
- package/dist/prompts/utils/workflowTemplates.js.map +1 -1
- package/dist/tools/dex/index.d.ts +14 -0
- package/dist/tools/dex/index.d.ts.map +1 -0
- package/dist/tools/dex/index.js +202 -0
- package/dist/tools/dex/index.js.map +1 -0
- package/dist/tools/index.d.ts +1 -1
- package/dist/tools/index.d.ts.map +1 -1
- package/dist/tools/index.js +18 -12
- package/dist/tools/index.js.map +1 -1
- package/dist/tools/utils/explainSdkUsage.d.ts.map +1 -1
- package/dist/tools/utils/explainSdkUsage.js +94 -1
- package/dist/tools/utils/explainSdkUsage.js.map +1 -1
- package/dist/utils/validation.d.ts +18 -0
- package/dist/utils/validation.d.ts.map +1 -1
- package/dist/utils/validation.js +35 -0
- package/dist/utils/validation.js.map +1 -1
- package/package.json +3 -3
- package/docs/AI-AGENT-PATTERNS.md +0 -555
- package/docs/CONSTRAINTS-REFERENCE.md +0 -454
- package/docs/PROMPT-TOOL-MAPPING.md +0 -352
- package/docs/examples/default-values-pattern.md +0 -240
- package/docs/examples/tool-factory-pattern.md +0 -217
- package/jest.config.js +0 -94
- package/src/__tests__/integration/fetchTokenDetails.integration.test.ts +0 -258
- package/src/__tests__/integration/poolTools.integration.test.ts +0 -185
- package/src/constants/mcpToolNames.ts +0 -141
- package/src/index.ts +0 -19
- package/src/prompts/__tests__/promptStructure.test.ts +0 -114
- package/src/prompts/__tests__/registry.test.ts +0 -145
- package/src/prompts/analysis.ts +0 -429
- package/src/prompts/index.ts +0 -127
- package/src/prompts/portfolio.ts +0 -242
- package/src/prompts/trading.ts +0 -191
- package/src/prompts/utility.ts +0 -43
- package/src/prompts/utils/workflowTemplates.ts +0 -344
- package/src/schemas/common-schemas.ts +0 -393
- package/src/scripts/test-all-prompts.ts +0 -184
- package/src/server.ts +0 -277
- package/src/tools/balance/index.ts +0 -174
- package/src/tools/creation/index.ts +0 -182
- package/src/tools/index.ts +0 -80
- package/src/tools/pools/fetchAllPools.ts +0 -47
- package/src/tools/pools/fetchAllPriceHistory.ts +0 -119
- package/src/tools/pools/fetchPoolDetails.ts +0 -27
- package/src/tools/pools/fetchPoolDetailsForCalculation.ts +0 -22
- package/src/tools/pools/fetchPools.ts +0 -47
- package/src/tools/pools/fetchPriceHistory.ts +0 -124
- package/src/tools/pools/fetchTokenDetails.ts +0 -77
- package/src/tools/pools/index.ts +0 -284
- package/src/tools/social/index.ts +0 -64
- package/src/tools/trading/index.ts +0 -605
- package/src/tools/transfers/index.ts +0 -75
- package/src/tools/utils/clearCache.ts +0 -36
- package/src/tools/utils/createWallet.ts +0 -19
- package/src/tools/utils/explainSdkUsage.ts +0 -1420
- package/src/tools/utils/getAddress.ts +0 -12
- package/src/tools/utils/getCacheInfo.ts +0 -14
- package/src/tools/utils/getConfig.ts +0 -11
- package/src/tools/utils/getEthereumAddress.ts +0 -12
- package/src/tools/utils/getUrlByTokenName.ts +0 -12
- package/src/tools/utils/getVersion.ts +0 -25
- package/src/tools/utils/getWallet.ts +0 -25
- package/src/tools/utils/hasWallet.ts +0 -15
- package/src/tools/utils/index.ts +0 -33
- package/src/tools/utils/isTokenGraduated.ts +0 -16
- package/src/tools/utils/setWallet.ts +0 -41
- package/src/types/mcp.ts +0 -72
- package/src/utils/__tests__/validation.test.ts +0 -147
- package/src/utils/constraints.ts +0 -155
- package/src/utils/default-values.ts +0 -208
- package/src/utils/error-handler.ts +0 -69
- package/src/utils/error-templates.ts +0 -273
- package/src/utils/response-formatter.ts +0 -51
- package/src/utils/tool-factory.ts +0 -257
- package/src/utils/tool-registry.ts +0 -296
- package/src/utils/validation.ts +0 -336
- package/tests/wallet-management-integration.test.ts +0 -284
- package/tsconfig.json +0 -23
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,190 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 1.19.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- 683396d: **New Slash Commands for Token Creation & Discovery (v1.19.0)**
|
|
8
|
+
|
|
9
|
+
Added two powerful new slash commands to the MCP server for guided token workflows:
|
|
10
|
+
|
|
11
|
+
### `/galachain-launchpad:create-token` - Token Creation Workflow
|
|
12
|
+
- **Purpose**: Guided, step-by-step token creation with validation and image upload
|
|
13
|
+
- **Arguments**:
|
|
14
|
+
- `tokenName` (required) - 3-20 alphanumeric characters with hyphens/underscores
|
|
15
|
+
- `tokenSymbol` (required) - 1-8 uppercase letters only
|
|
16
|
+
- `description` (required) - Token description
|
|
17
|
+
- `websiteUrl`, `twitterUrl`, `telegramUrl` (optional) - Social links (at least one required)
|
|
18
|
+
- `imagePath` (optional) - Path to token image file
|
|
19
|
+
- `preBuyGala` (optional) - Pre-buy amount in GALA
|
|
20
|
+
- **Validation**: Token name/symbol availability, URL format validation, required social links
|
|
21
|
+
- **Workflow Steps**:
|
|
22
|
+
1. Validate token name and symbol
|
|
23
|
+
2. Check name/symbol availability
|
|
24
|
+
3. Upload token image (optional)
|
|
25
|
+
4. Calculate pre-buy token quantity
|
|
26
|
+
5. Display launch fee
|
|
27
|
+
6. Guide through transaction execution
|
|
28
|
+
|
|
29
|
+
### `/galachain-launchpad:discover-tokens` - Token Discovery & Filtering
|
|
30
|
+
- **Purpose**: Discover and filter tokens with advanced search capabilities
|
|
31
|
+
- **Arguments**:
|
|
32
|
+
- `type` (optional) - Filter type: `recent` (default), `popular`, or `near-graduation`
|
|
33
|
+
- `limit` (optional, default: 10) - Max results (1-50)
|
|
34
|
+
- `minProgress` (optional) - Minimum graduation progress percentage (0-100)
|
|
35
|
+
- `maxPrice` (optional) - Maximum USD price filter
|
|
36
|
+
- **Use Cases**:
|
|
37
|
+
- Find new tokens: `type=recent limit=20`
|
|
38
|
+
- Find trending tokens: `type=popular limit=10`
|
|
39
|
+
- Find near-graduation pools: `type=near-graduation minProgress=85 limit=10`
|
|
40
|
+
- Find cheap tokens: `maxPrice=1.00 limit=20`
|
|
41
|
+
- **Workflow Steps**:
|
|
42
|
+
1. Filter pools by type and criteria
|
|
43
|
+
2. Calculate graduation progress for each
|
|
44
|
+
3. Fetch current prices
|
|
45
|
+
4. Display sortable results with metrics
|
|
46
|
+
5. Provide links for detailed analysis
|
|
47
|
+
|
|
48
|
+
### Implementation Details
|
|
49
|
+
- **Total Prompts**: 18 slash commands (4 trading, 5 portfolio, 6 analysis, 2 creation/discovery,
|
|
50
|
+
1 utility)
|
|
51
|
+
- **Test Coverage**: Updated all prompt structure and registry tests to validate 18 commands
|
|
52
|
+
- **Validation**: Comprehensive input validation for all arguments with clear error messages
|
|
53
|
+
- **Documentation**: Full documentation in README.md and CLAUDE.md with usage examples
|
|
54
|
+
|
|
55
|
+
### Test Results
|
|
56
|
+
- ✅ 146 unit tests passing
|
|
57
|
+
- ✅ All prompt structure validations passing
|
|
58
|
+
- ✅ Backward compatible with existing slash commands
|
|
59
|
+
- ✅ Build verification complete
|
|
60
|
+
|
|
61
|
+
### What's Included
|
|
62
|
+
- New prompt definitions with full argument validation
|
|
63
|
+
- Workflow template generation for both commands
|
|
64
|
+
- Integration with existing MCP tools
|
|
65
|
+
- Comprehensive documentation and examples
|
|
66
|
+
|
|
67
|
+
- 683396d: # v3.23.0: GalaSwap DEX Integration & Documentation
|
|
68
|
+
|
|
69
|
+
**🚀 Major Feature Release: Complete GalaSwap DEX Integration**
|
|
70
|
+
|
|
71
|
+
## Features
|
|
72
|
+
|
|
73
|
+
### GalaSwap DEX Trading Integration (v3.23.0+)
|
|
74
|
+
|
|
75
|
+
**5 New High-Level SDK Methods for DEX Trading:**
|
|
76
|
+
- `getSwapQuoteExactInput(fromToken, toToken, amount)` - Get quote for known spending
|
|
77
|
+
- `getSwapQuoteExactOutput(fromToken, toToken, amount)` - Get quote for known output
|
|
78
|
+
- `executeSwap(fromToken, toToken, inputAmount, estimatedOutput, feeTier, slippageTolerance)` -
|
|
79
|
+
Execute swaps with slippage protection
|
|
80
|
+
- `getSwapUserAssets(walletAddress)` - Query user token balances
|
|
81
|
+
- `getSwapPoolInfo(tokenA, tokenB)` - Get pool liquidity and fee information
|
|
82
|
+
|
|
83
|
+
**Architecture:**
|
|
84
|
+
- Three-layer design: LaunchpadSDK → GSwapService (wrapper) → @gala-chain/gswap-sdk (core)
|
|
85
|
+
- Automatic token format conversion (simple: "GALA" ↔ full: "GALA|Unit|none|none")
|
|
86
|
+
- Real-time WebSocket event monitoring for transaction confirmation
|
|
87
|
+
- Comprehensive slippage protection (configurable tolerance: 0.0001 to 1.0)
|
|
88
|
+
- Support for three fee tiers per pool: 500 (0.05%), 3000 (0.30%), 10000 (1.00%)
|
|
89
|
+
|
|
90
|
+
### 5 New MCP Tools
|
|
91
|
+
- `gala_launchpad_get_swap_quote_exact_input` - Get swap quote with known input
|
|
92
|
+
- `gala_launchpad_get_swap_quote_exact_output` - Get swap quote with known output
|
|
93
|
+
- `gala_launchpad_execute_swap` - Execute DEX swap with slippage protection
|
|
94
|
+
- `gala_launchpad_get_swap_user_assets` - Query wallet token balances
|
|
95
|
+
- `gala_launchpad_get_swap_pool_info` - Get DEX pool information
|
|
96
|
+
|
|
97
|
+
### 1 New MCP Slash Command
|
|
98
|
+
- `/galachain-launchpad:dex-swap tokenName=GALA toToken=GUSDC amount=100 slippage=1` - Guided DEX
|
|
99
|
+
swap workflow
|
|
100
|
+
|
|
101
|
+
### Comprehensive Test Coverage
|
|
102
|
+
- **gswap-service.test.ts** (45+ test cases) - Full GSwapService integration tests with mocked
|
|
103
|
+
GSwap SDK
|
|
104
|
+
- **token-format-converter.test.ts** (67+ test cases) - Bidirectional token format conversion
|
|
105
|
+
tests
|
|
106
|
+
- **dex-tools.test.ts** (40+ test cases per tool) - MCP tool configuration and schema validation
|
|
107
|
+
- **200+ total test cases** covering edge cases, error handling, and real-world scenarios
|
|
108
|
+
|
|
109
|
+
### Complete Documentation
|
|
110
|
+
|
|
111
|
+
**API.md (450+ lines):**
|
|
112
|
+
- Comprehensive API reference for all SDK methods
|
|
113
|
+
- DEX trading methods with examples
|
|
114
|
+
- Type definitions and error handling patterns
|
|
115
|
+
- Complete installation and usage guide
|
|
116
|
+
|
|
117
|
+
**CLAUDE.md Updates (250+ lines):**
|
|
118
|
+
- GalaSwap DEX Trading Methods section with architecture diagram
|
|
119
|
+
- Complete trading workflow examples
|
|
120
|
+
- Real-time monitoring via WebSocket
|
|
121
|
+
- Error handling patterns
|
|
122
|
+
- Performance characteristics
|
|
123
|
+
|
|
124
|
+
**gswap-integration.md (400+ lines):**
|
|
125
|
+
- Complete DEX integration guide
|
|
126
|
+
- Architecture overview with three-layer design
|
|
127
|
+
- 4 usage patterns: simple swap, pool info, portfolio tracking, real-time monitoring
|
|
128
|
+
- Token format handling and conversion
|
|
129
|
+
- Slippage protection strategies
|
|
130
|
+
- Fee tier analysis and optimization
|
|
131
|
+
- Troubleshooting and advanced topics
|
|
132
|
+
|
|
133
|
+
## Technical Improvements
|
|
134
|
+
|
|
135
|
+
### Token Format Converter Enhancement
|
|
136
|
+
|
|
137
|
+
Fixed edge cases revealed by comprehensive tests:
|
|
138
|
+
- Proper handling of already-formatted tokens (no double-processing)
|
|
139
|
+
- Object input support with TokenClassKey parsing
|
|
140
|
+
- Graceful null/undefined input handling
|
|
141
|
+
- Backward compatibility with old/new token formats
|
|
142
|
+
|
|
143
|
+
### Bundle Size Optimization
|
|
144
|
+
|
|
145
|
+
All formats remain well under 50 kB limit:
|
|
146
|
+
- ESM: 38.79 kB gzipped
|
|
147
|
+
- CommonJS: 38.89 kB gzipped
|
|
148
|
+
- UMD: 39.01 kB gzipped
|
|
149
|
+
|
|
150
|
+
GSwap SDK marked as external dependency (<1 KB bundle impact)
|
|
151
|
+
|
|
152
|
+
## Breaking Changes
|
|
153
|
+
|
|
154
|
+
None - fully backward compatible with v3.22.x
|
|
155
|
+
|
|
156
|
+
## Migration Guide
|
|
157
|
+
|
|
158
|
+
No migration needed. New methods are additive:
|
|
159
|
+
|
|
160
|
+
```typescript
|
|
161
|
+
import { createLaunchpadSDK } from '@gala-chain/launchpad-sdk';
|
|
162
|
+
|
|
163
|
+
const sdk = createLaunchpadSDK({ privateKey: process.env.PRIVATE_KEY });
|
|
164
|
+
|
|
165
|
+
// New DEX trading methods available
|
|
166
|
+
const quote = await sdk.getSwapQuoteExactInput('GALA', 'GUSDC', '100');
|
|
167
|
+
const result = await sdk.executeSwap(...);
|
|
168
|
+
|
|
169
|
+
// All existing bonding curve methods still work
|
|
170
|
+
await sdk.buyTokens('anime', '100', ...);
|
|
171
|
+
```
|
|
172
|
+
|
|
173
|
+
## Dependencies
|
|
174
|
+
- Added: @gala-chain/gswap-sdk@0.0.7 (marked as external)
|
|
175
|
+
- No breaking dependency changes
|
|
176
|
+
|
|
177
|
+
## Next Steps
|
|
178
|
+
- Try the new `/galachain-launchpad:dex-swap` slash command in Claude Desktop
|
|
179
|
+
- Explore 5 new DEX trading tools in MCP server
|
|
180
|
+
- Reference API.md for complete method signatures
|
|
181
|
+
- See gswap-integration.md for integration patterns
|
|
182
|
+
|
|
183
|
+
### Patch Changes
|
|
184
|
+
|
|
185
|
+
- Updated dependencies [683396d]
|
|
186
|
+
- @gala-chain/launchpad-sdk@3.24.0
|
|
187
|
+
|
|
3
188
|
## 1.18.0
|
|
4
189
|
|
|
5
190
|
### Minor Changes
|
package/README.md
CHANGED
|
@@ -4,8 +4,8 @@ MCP (Model Context Protocol) server for Gala Launchpad SDK - Enables AI agents t
|
|
|
4
4
|
|
|
5
5
|
## 🚀 Features
|
|
6
6
|
|
|
7
|
-
- **57 AI-accessible tools** for complete Gala Launchpad integration (includes 4 price history tools, 3 wallet management tools)
|
|
8
|
-
- **
|
|
7
|
+
- **57 AI-accessible tools** for complete Gala Launchpad integration (includes 4 price history tools, 3 wallet management tools, 5 GSwap DEX trading tools)
|
|
8
|
+
- **18 slash commands** (prompts) for quick access to common workflows
|
|
9
9
|
- **Type-safe** - Full TypeScript support with validated inputs
|
|
10
10
|
- **Production-ready** - Built on [@gala-chain/launchpad-sdk ](https://www.npmjs.com/package/@gala-chain/launchpad-sdk)
|
|
11
11
|
- **Easy setup** - Works with Claude Desktop and other MCP clients
|
|
@@ -238,6 +238,59 @@ const result2 = await gala_launchpad_graduate_token({
|
|
|
238
238
|
|
|
239
239
|
**Accuracy:** Local calculations match external (network) with <0.01% difference.
|
|
240
240
|
|
|
241
|
+
### GSwap DEX Trading (5 tools)
|
|
242
|
+
|
|
243
|
+
**Real-time DEX trading for graduated tokens with slippage protection:**
|
|
244
|
+
|
|
245
|
+
- `gala_launchpad_get_swap_quote_exact_input` - Get swap quote for exact input amount
|
|
246
|
+
- `gala_launchpad_get_swap_quote_exact_output` - Get swap quote for exact desired output
|
|
247
|
+
- `gala_launchpad_execute_swap` - Execute token swap on GalaSwap DEX with slippage protection
|
|
248
|
+
- `gala_launchpad_get_swap_user_assets` - Get user token balances across all DEX pools
|
|
249
|
+
- `gala_launchpad_get_swap_pool_info` - Get liquidity and fee tier information for token pairs
|
|
250
|
+
|
|
251
|
+
**Complete DEX Trading Workflow Example:**
|
|
252
|
+
|
|
253
|
+
```javascript
|
|
254
|
+
// Step 1: Get a quote (how much output for 100 GALA input?)
|
|
255
|
+
const quote = await gala_launchpad_get_swap_quote_exact_input({
|
|
256
|
+
fromToken: 'GALA',
|
|
257
|
+
toToken: 'GUSDC',
|
|
258
|
+
amount: '100'
|
|
259
|
+
});
|
|
260
|
+
// Returns: { estimatedOutput: "100.50", feeTier: 3000, priceImpact: "0.23", ... }
|
|
261
|
+
|
|
262
|
+
// Step 2: Check pool liquidity before large trades
|
|
263
|
+
const pool = await gala_launchpad_get_swap_pool_info({
|
|
264
|
+
tokenA: 'GALA',
|
|
265
|
+
tokenB: 'GUSDC'
|
|
266
|
+
});
|
|
267
|
+
// Returns: { liquidity: "5000000", feeTiers: [500, 3000, 10000], swapCount: 1234 }
|
|
268
|
+
|
|
269
|
+
// Step 3: Execute the swap with slippage protection
|
|
270
|
+
const result = await gala_launchpad_execute_swap({
|
|
271
|
+
fromToken: 'GALA',
|
|
272
|
+
toToken: 'GUSDC',
|
|
273
|
+
inputAmount: '100',
|
|
274
|
+
estimatedOutput: quote.estimatedOutput, // Use quoted amount!
|
|
275
|
+
feeTier: quote.feeTier, // Use quoted fee tier!
|
|
276
|
+
slippageTolerance: 0.01 // 1% slippage tolerance
|
|
277
|
+
});
|
|
278
|
+
// Returns: { transactionId: "...", status: "PENDING", outputAmount: "100.45" }
|
|
279
|
+
|
|
280
|
+
// Step 4: Check user portfolio after swap
|
|
281
|
+
const assets = await gala_launchpad_get_swap_user_assets({
|
|
282
|
+
walletAddress: 'eth|0x...'
|
|
283
|
+
});
|
|
284
|
+
// Returns: [{ symbol: 'GALA', balance: '900', decimals: 8 }, { symbol: 'GUSDC', balance: '100.45', decimals: 6 }]
|
|
285
|
+
```
|
|
286
|
+
|
|
287
|
+
**Key Characteristics:**
|
|
288
|
+
- ✅ **Real-time** - Integrated with unified WebSocket for instant transaction monitoring
|
|
289
|
+
- ✅ **Slippage Protection** - Automatic minimum output calculation
|
|
290
|
+
- ✅ **Multi-format tokens** - Supports simple names ('GALA') or full token IDs ('GALA|Unit|none|none')
|
|
291
|
+
- ✅ **Fee Tiers** - Automatic detection of available liquidity pools (0.05%, 0.3%, 1.0%)
|
|
292
|
+
- ✅ **Environment-aligned** - Uses same URLs as LaunchpadSDK (STAGE/PROD cannot be mixed)
|
|
293
|
+
|
|
241
294
|
#### 📊 Historical Price Analysis
|
|
242
295
|
|
|
243
296
|
**`gala_launchpad_fetch_price_history`** - Fetch historical price snapshots for DEX tokens
|
|
@@ -384,7 +437,7 @@ Ask Claude (or your AI assistant):
|
|
|
384
437
|
|
|
385
438
|
## ⚡ Slash Commands (Prompts)
|
|
386
439
|
|
|
387
|
-
The MCP server exposes **
|
|
440
|
+
The MCP server exposes **18 slash commands** that provide quick access to common Launchpad workflows (including 2 new discovery/creation commands in v1.19.0). These appear as `/galachain-launchpad:<<method>>` in Claude Desktop.
|
|
388
441
|
|
|
389
442
|
### Trading Commands (4 commands)
|
|
390
443
|
|
|
@@ -471,6 +524,33 @@ The MCP server exposes **14 slash commands** that provide quick access to common
|
|
|
471
524
|
- **Arguments**: `tokenName` (optional), `userAddress` (optional), `tradeType` (optional: BUY/SELL), `limit` (optional, default 20)
|
|
472
525
|
- **Example**: `/galachain-launchpad:trade-history tokenName=anime tradeType=BUY limit=10`
|
|
473
526
|
|
|
527
|
+
**`/galachain-launchpad:fetch-all-pools`**
|
|
528
|
+
- Fetch all available pools with auto-pagination
|
|
529
|
+
- **Arguments**: None
|
|
530
|
+
- Retrieves complete list of all token pools on Launchpad
|
|
531
|
+
|
|
532
|
+
### Creation & Discovery Commands (2 commands)
|
|
533
|
+
|
|
534
|
+
**`/galachain-launchpad:create-token`**
|
|
535
|
+
- Guided token creation workflow
|
|
536
|
+
- **Arguments**: `tokenName` (required), `tokenSymbol` (required), `description` (required), `websiteUrl` (optional), `twitterUrl` (optional), `telegramUrl` (optional), `imagePath` (optional), `preBuyGala` (optional)
|
|
537
|
+
- **Example**: `/galachain-launchpad:create-token tokenName=mytoken tokenSymbol=MTK description="My awesome token" websiteUrl=https://example.com`
|
|
538
|
+
- Validates availability, checks fees, uploads image, and guides through launch process
|
|
539
|
+
- **Note**: At least one social URL (website, Twitter, or Telegram) is required
|
|
540
|
+
|
|
541
|
+
**`/galachain-launchpad:discover-tokens`**
|
|
542
|
+
- Discover new tokens on Gala Launchpad
|
|
543
|
+
- **Arguments**: `type` (optional: recent/popular/near-graduation, default: recent), `limit` (optional, default: 10), `minProgress` (optional: graduation %), `maxPrice` (optional: max USD price)
|
|
544
|
+
- **Example**: `/galachain-launchpad:discover-tokens type=near-graduation minProgress=90 limit=10`
|
|
545
|
+
- Helps find investment opportunities with filtering and analysis
|
|
546
|
+
|
|
547
|
+
### Utility Commands (1 command)
|
|
548
|
+
|
|
549
|
+
**`/galachain-launchpad:version`**
|
|
550
|
+
- Display SDK and MCP server version information
|
|
551
|
+
- **Arguments**: None
|
|
552
|
+
- Shows current version numbers and release information
|
|
553
|
+
|
|
474
554
|
### Slash Command Benefits
|
|
475
555
|
|
|
476
556
|
✅ **Quick access** - Type `/galachain-launchpad:` to see all available commands
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Token Creation Prompts
|
|
3
|
+
*
|
|
4
|
+
* Slash commands for creating new tokens on Gala Launchpad
|
|
5
|
+
*/
|
|
6
|
+
import type { MCPPrompt } from '../types/mcp.js';
|
|
7
|
+
/**
|
|
8
|
+
* Create Token - Guided token creation workflow
|
|
9
|
+
*/
|
|
10
|
+
export declare const createTokenPrompt: MCPPrompt;
|
|
11
|
+
/**
|
|
12
|
+
* Export all token creation prompts
|
|
13
|
+
*/
|
|
14
|
+
export declare const creationPrompts: MCPPrompt[];
|
|
15
|
+
//# sourceMappingURL=create-token.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"create-token.d.ts","sourceRoot":"","sources":["../../src/prompts/create-token.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AASjD;;GAEG;AACH,eAAO,MAAM,iBAAiB,EAAE,SAmG/B,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,eAAe,EAAE,SAAS,EAAwB,CAAC"}
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Token Creation Prompts
|
|
4
|
+
*
|
|
5
|
+
* Slash commands for creating new tokens on Gala Launchpad
|
|
6
|
+
*/
|
|
7
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
+
exports.creationPrompts = exports.createTokenPrompt = void 0;
|
|
9
|
+
const workflowTemplates_js_1 = require("./utils/workflowTemplates.js");
|
|
10
|
+
const validation_js_1 = require("../utils/validation.js");
|
|
11
|
+
/**
|
|
12
|
+
* Create Token - Guided token creation workflow
|
|
13
|
+
*/
|
|
14
|
+
exports.createTokenPrompt = {
|
|
15
|
+
name: 'galachain-launchpad:create-token',
|
|
16
|
+
description: 'Guide user through creating a new token on Gala Launchpad with metadata, image upload, and optional pre-buy',
|
|
17
|
+
arguments: [
|
|
18
|
+
{
|
|
19
|
+
name: 'tokenName',
|
|
20
|
+
description: 'Name for the new token - must be 3-20 lowercase alphanumeric characters (e.g., "mytoken")',
|
|
21
|
+
required: true,
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
name: 'tokenSymbol',
|
|
25
|
+
description: 'Token symbol - must be 1-8 uppercase letters (e.g., "MTK")',
|
|
26
|
+
required: true,
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
name: 'description',
|
|
30
|
+
description: 'Token description - brief description of what the token is for (1-500 chars)',
|
|
31
|
+
required: true,
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
name: 'websiteUrl',
|
|
35
|
+
description: 'Optional website URL (e.g., "https://mytoken.com") - at least one social URL required',
|
|
36
|
+
required: false,
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
name: 'twitterUrl',
|
|
40
|
+
description: 'Optional Twitter profile URL (e.g., "https://twitter.com/mytoken") - at least one social URL required',
|
|
41
|
+
required: false,
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
name: 'telegramUrl',
|
|
45
|
+
description: 'Optional Telegram channel URL (e.g., "https://t.me/mytoken") - at least one social URL required',
|
|
46
|
+
required: false,
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
name: 'imagePath',
|
|
50
|
+
description: 'Optional path to token image file - will be uploaded to IPFS (e.g., "/path/to/image.png")',
|
|
51
|
+
required: false,
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
name: 'preBuyGala',
|
|
55
|
+
description: 'Optional GALA amount for initial token purchase (e.g., "100" for 100 GALA) - helps bootstrap liquidity',
|
|
56
|
+
required: false,
|
|
57
|
+
},
|
|
58
|
+
],
|
|
59
|
+
handler: (args) => {
|
|
60
|
+
// Validate inputs
|
|
61
|
+
(0, validation_js_1.validateTokenName)(args.tokenName);
|
|
62
|
+
(0, validation_js_1.validateTokenSymbol)(args.tokenSymbol);
|
|
63
|
+
// Validate at least one social URL
|
|
64
|
+
const hasSocialUrl = args.websiteUrl || args.twitterUrl || args.telegramUrl;
|
|
65
|
+
if (!hasSocialUrl) {
|
|
66
|
+
throw new Error('At least one social URL is required: websiteUrl, twitterUrl, or telegramUrl');
|
|
67
|
+
}
|
|
68
|
+
// Validate social URLs if provided
|
|
69
|
+
if (args.websiteUrl) {
|
|
70
|
+
(0, validation_js_1.validateUrl)(args.websiteUrl, 'websiteUrl');
|
|
71
|
+
}
|
|
72
|
+
if (args.twitterUrl) {
|
|
73
|
+
(0, validation_js_1.validateUrl)(args.twitterUrl, 'twitterUrl');
|
|
74
|
+
}
|
|
75
|
+
if (args.telegramUrl) {
|
|
76
|
+
(0, validation_js_1.validateUrl)(args.telegramUrl, 'telegramUrl');
|
|
77
|
+
}
|
|
78
|
+
// Validate pre-buy amount if provided
|
|
79
|
+
if (args.preBuyGala) {
|
|
80
|
+
(0, validation_js_1.validateNumericAmount)(args.preBuyGala, 'preBuyGala');
|
|
81
|
+
}
|
|
82
|
+
return [
|
|
83
|
+
{
|
|
84
|
+
role: 'user',
|
|
85
|
+
content: {
|
|
86
|
+
type: 'text',
|
|
87
|
+
text: (0, workflowTemplates_js_1.createCreateTokenWorkflow)({
|
|
88
|
+
tokenName: args.tokenName,
|
|
89
|
+
tokenSymbol: args.tokenSymbol,
|
|
90
|
+
description: args.description,
|
|
91
|
+
websiteUrl: args.websiteUrl,
|
|
92
|
+
twitterUrl: args.twitterUrl,
|
|
93
|
+
telegramUrl: args.telegramUrl,
|
|
94
|
+
imagePath: args.imagePath,
|
|
95
|
+
preBuyGala: args.preBuyGala,
|
|
96
|
+
}),
|
|
97
|
+
},
|
|
98
|
+
},
|
|
99
|
+
];
|
|
100
|
+
},
|
|
101
|
+
};
|
|
102
|
+
/**
|
|
103
|
+
* Export all token creation prompts
|
|
104
|
+
*/
|
|
105
|
+
exports.creationPrompts = [exports.createTokenPrompt];
|
|
106
|
+
//# sourceMappingURL=create-token.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"create-token.js","sourceRoot":"","sources":["../../src/prompts/create-token.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;;AAGH,uEAAyE;AACzE,0DAKgC;AAEhC;;GAEG;AACU,QAAA,iBAAiB,GAAc;IAC1C,IAAI,EAAE,kCAAkC;IACxC,WAAW,EACT,6GAA6G;IAC/G,SAAS,EAAE;QACT;YACE,IAAI,EAAE,WAAW;YACjB,WAAW,EACT,2FAA2F;YAC7F,QAAQ,EAAE,IAAI;SACf;QACD;YACE,IAAI,EAAE,aAAa;YACnB,WAAW,EAAE,4DAA4D;YACzE,QAAQ,EAAE,IAAI;SACf;QACD;YACE,IAAI,EAAE,aAAa;YACnB,WAAW,EAAE,8EAA8E;YAC3F,QAAQ,EAAE,IAAI;SACf;QACD;YACE,IAAI,EAAE,YAAY;YAClB,WAAW,EAAE,uFAAuF;YACpG,QAAQ,EAAE,KAAK;SAChB;QACD;YACE,IAAI,EAAE,YAAY;YAClB,WAAW,EACT,uGAAuG;YACzG,QAAQ,EAAE,KAAK;SAChB;QACD;YACE,IAAI,EAAE,aAAa;YACnB,WAAW,EACT,iGAAiG;YACnG,QAAQ,EAAE,KAAK;SAChB;QACD;YACE,IAAI,EAAE,WAAW;YACjB,WAAW,EACT,2FAA2F;YAC7F,QAAQ,EAAE,KAAK;SAChB;QACD;YACE,IAAI,EAAE,YAAY;YAClB,WAAW,EACT,wGAAwG;YAC1G,QAAQ,EAAE,KAAK;SAChB;KACF;IACD,OAAO,EAAE,CAAC,IAAI,EAAE,EAAE;QAChB,kBAAkB;QAClB,IAAA,iCAAiB,EAAC,IAAI,CAAC,SAAS,CAAC,CAAC;QAClC,IAAA,mCAAmB,EAAC,IAAI,CAAC,WAAW,CAAC,CAAC;QAEtC,mCAAmC;QACnC,MAAM,YAAY,GAAG,IAAI,CAAC,UAAU,IAAI,IAAI,CAAC,UAAU,IAAI,IAAI,CAAC,WAAW,CAAC;QAC5E,IAAI,CAAC,YAAY,EAAE,CAAC;YAClB,MAAM,IAAI,KAAK,CACb,6EAA6E,CAC9E,CAAC;QACJ,CAAC;QAED,mCAAmC;QACnC,IAAI,IAAI,CAAC,UAAU,EAAE,CAAC;YACpB,IAAA,2BAAW,EAAC,IAAI,CAAC,UAAU,EAAE,YAAY,CAAC,CAAC;QAC7C,CAAC;QACD,IAAI,IAAI,CAAC,UAAU,EAAE,CAAC;YACpB,IAAA,2BAAW,EAAC,IAAI,CAAC,UAAU,EAAE,YAAY,CAAC,CAAC;QAC7C,CAAC;QACD,IAAI,IAAI,CAAC,WAAW,EAAE,CAAC;YACrB,IAAA,2BAAW,EAAC,IAAI,CAAC,WAAW,EAAE,aAAa,CAAC,CAAC;QAC/C,CAAC;QAED,sCAAsC;QACtC,IAAI,IAAI,CAAC,UAAU,EAAE,CAAC;YACpB,IAAA,qCAAqB,EAAC,IAAI,CAAC,UAAU,EAAE,YAAY,CAAC,CAAC;QACvD,CAAC;QAED,OAAO;YACL;gBACE,IAAI,EAAE,MAAM;gBACZ,OAAO,EAAE;oBACP,IAAI,EAAE,MAAM;oBACZ,IAAI,EAAE,IAAA,gDAAyB,EAAC;wBAC9B,SAAS,EAAE,IAAI,CAAC,SAAS;wBACzB,WAAW,EAAE,IAAI,CAAC,WAAW;wBAC7B,WAAW,EAAE,IAAI,CAAC,WAAW;wBAC7B,UAAU,EAAE,IAAI,CAAC,UAAU;wBAC3B,UAAU,EAAE,IAAI,CAAC,UAAU;wBAC3B,WAAW,EAAE,IAAI,CAAC,WAAW;wBAC7B,SAAS,EAAE,IAAI,CAAC,SAAS;wBACzB,UAAU,EAAE,IAAI,CAAC,UAAU;qBAC5B,CAAC;iBACH;aACF;SACF,CAAC;IACJ,CAAC;CACF,CAAC;AAEF;;GAEG;AACU,QAAA,eAAe,GAAgB,CAAC,yBAAiB,CAAC,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* DEX Trading Prompts
|
|
3
|
+
*
|
|
4
|
+
* Slash commands for GalaSwap DEX trading operations (for graduated tokens)
|
|
5
|
+
*/
|
|
6
|
+
import type { MCPPrompt } from '../types/mcp.js';
|
|
7
|
+
/**
|
|
8
|
+
* DEX Swap - Guided swap workflow for graduated tokens
|
|
9
|
+
*
|
|
10
|
+
* This prompt guides users through swapping tokens on GalaSwap DEX.
|
|
11
|
+
* It's designed for tokens that have graduated from bonding curves.
|
|
12
|
+
*/
|
|
13
|
+
export declare const dexSwapPrompt: MCPPrompt;
|
|
14
|
+
/**
|
|
15
|
+
* Export all DEX trading prompts
|
|
16
|
+
*/
|
|
17
|
+
export declare const dexTradingPrompts: MCPPrompt[];
|
|
18
|
+
//# sourceMappingURL=dex-trading.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dex-trading.d.ts","sourceRoot":"","sources":["../../src/prompts/dex-trading.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAGjD;;;;;GAKG;AACH,eAAO,MAAM,aAAa,EAAE,SAiE3B,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,iBAAiB,EAAE,SAAS,EAAoB,CAAC"}
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* DEX Trading Prompts
|
|
4
|
+
*
|
|
5
|
+
* Slash commands for GalaSwap DEX trading operations (for graduated tokens)
|
|
6
|
+
*/
|
|
7
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
+
exports.dexTradingPrompts = exports.dexSwapPrompt = void 0;
|
|
9
|
+
const validation_js_1 = require("../utils/validation.js");
|
|
10
|
+
/**
|
|
11
|
+
* DEX Swap - Guided swap workflow for graduated tokens
|
|
12
|
+
*
|
|
13
|
+
* This prompt guides users through swapping tokens on GalaSwap DEX.
|
|
14
|
+
* It's designed for tokens that have graduated from bonding curves.
|
|
15
|
+
*/
|
|
16
|
+
exports.dexSwapPrompt = {
|
|
17
|
+
name: 'galachain-launchpad:dex-swap',
|
|
18
|
+
description: 'Execute a token swap on GalaSwap DEX for graduated tokens. Get a quote first, then execute with slippage protection.',
|
|
19
|
+
arguments: [
|
|
20
|
+
{
|
|
21
|
+
name: 'fromToken',
|
|
22
|
+
description: 'Source token symbol (e.g., GALA, GUSDC)',
|
|
23
|
+
required: true,
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
name: 'toToken',
|
|
27
|
+
description: 'Destination token symbol (e.g., GUSDC, GALA)',
|
|
28
|
+
required: true,
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
name: 'amount',
|
|
32
|
+
description: 'Amount to swap (e.g., 100)',
|
|
33
|
+
required: true,
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
name: 'slippage',
|
|
37
|
+
description: 'Slippage tolerance percentage (default: 1)',
|
|
38
|
+
required: false,
|
|
39
|
+
},
|
|
40
|
+
],
|
|
41
|
+
handler: (args) => {
|
|
42
|
+
// Validate inputs
|
|
43
|
+
(0, validation_js_1.validateNumericAmount)(args.amount, 'amount');
|
|
44
|
+
if (args.slippage) {
|
|
45
|
+
(0, validation_js_1.validateSlippage)(args.slippage);
|
|
46
|
+
}
|
|
47
|
+
const slippageValue = args.slippage || '1';
|
|
48
|
+
return [
|
|
49
|
+
{
|
|
50
|
+
role: 'user',
|
|
51
|
+
content: {
|
|
52
|
+
type: 'text',
|
|
53
|
+
text: `I want to swap tokens on GalaSwap DEX:
|
|
54
|
+
|
|
55
|
+
**Swap Details:**
|
|
56
|
+
- From Token: ${args.fromToken}
|
|
57
|
+
- To Token: ${args.toToken}
|
|
58
|
+
- Amount: ${args.amount} ${args.fromToken}
|
|
59
|
+
- Slippage Tolerance: ${slippageValue}%
|
|
60
|
+
|
|
61
|
+
**Workflow:**
|
|
62
|
+
1. Get a swap quote for ${args.amount} ${args.fromToken} → ${args.toToken}
|
|
63
|
+
2. Review the estimated output and price impact
|
|
64
|
+
3. Execute the swap with ${slippageValue}% slippage protection
|
|
65
|
+
|
|
66
|
+
Please use the following MCP tools to complete this workflow:
|
|
67
|
+
- gala_launchpad_get_swap_quote_exact_input: Get initial quote before swapping
|
|
68
|
+
- gala_launchpad_get_swap_quote_exact_output: Get quote for specific desired output
|
|
69
|
+
- gala_launchpad_execute_swap: Execute the swap after review
|
|
70
|
+
- gala_launchpad_get_swap_user_assets: Check wallet balances
|
|
71
|
+
- gala_launchpad_get_swap_pool_info: Get pool details and fee tiers
|
|
72
|
+
|
|
73
|
+
Please proceed with getting the quote first, then guide me through the execution.`,
|
|
74
|
+
},
|
|
75
|
+
},
|
|
76
|
+
];
|
|
77
|
+
},
|
|
78
|
+
};
|
|
79
|
+
/**
|
|
80
|
+
* Export all DEX trading prompts
|
|
81
|
+
*/
|
|
82
|
+
exports.dexTradingPrompts = [exports.dexSwapPrompt];
|
|
83
|
+
//# sourceMappingURL=dex-trading.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dex-trading.js","sourceRoot":"","sources":["../../src/prompts/dex-trading.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;;AAGH,0DAAiF;AAEjF;;;;;GAKG;AACU,QAAA,aAAa,GAAc;IACtC,IAAI,EAAE,8BAA8B;IACpC,WAAW,EACT,sHAAsH;IACxH,SAAS,EAAE;QACT;YACE,IAAI,EAAE,WAAW;YACjB,WAAW,EAAE,yCAAyC;YACtD,QAAQ,EAAE,IAAI;SACf;QACD;YACE,IAAI,EAAE,SAAS;YACf,WAAW,EAAE,8CAA8C;YAC3D,QAAQ,EAAE,IAAI;SACf;QACD;YACE,IAAI,EAAE,QAAQ;YACd,WAAW,EAAE,4BAA4B;YACzC,QAAQ,EAAE,IAAI;SACf;QACD;YACE,IAAI,EAAE,UAAU;YAChB,WAAW,EAAE,4CAA4C;YACzD,QAAQ,EAAE,KAAK;SAChB;KACF;IACD,OAAO,EAAE,CAAC,IAAI,EAAE,EAAE;QAChB,kBAAkB;QAClB,IAAA,qCAAqB,EAAC,IAAI,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC;QAC7C,IAAI,IAAI,CAAC,QAAQ,EAAE,CAAC;YAClB,IAAA,gCAAgB,EAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;QAClC,CAAC;QAED,MAAM,aAAa,GAAG,IAAI,CAAC,QAAQ,IAAI,GAAG,CAAC;QAE3C,OAAO;YACL;gBACE,IAAI,EAAE,MAAM;gBACZ,OAAO,EAAE;oBACP,IAAI,EAAE,MAAM;oBACZ,IAAI,EAAE;;;gBAGA,IAAI,CAAC,SAAS;cAChB,IAAI,CAAC,OAAO;YACd,IAAI,CAAC,MAAM,IAAI,IAAI,CAAC,SAAS;wBACjB,aAAa;;;0BAGX,IAAI,CAAC,MAAM,IAAI,IAAI,CAAC,SAAS,MAAM,IAAI,CAAC,OAAO;;2BAE9C,aAAa;;;;;;;;;kFAS0C;iBACzE;aACF;SACF,CAAC;IACJ,CAAC;CACF,CAAC;AAEF;;GAEG;AACU,QAAA,iBAAiB,GAAgB,CAAC,qBAAa,CAAC,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Token Discovery Prompts
|
|
3
|
+
*
|
|
4
|
+
* Slash commands for discovering and researching tokens on Gala Launchpad
|
|
5
|
+
*/
|
|
6
|
+
import type { MCPPrompt } from '../types/mcp.js';
|
|
7
|
+
/**
|
|
8
|
+
* Discover Tokens - Token discovery and exploration workflow
|
|
9
|
+
*/
|
|
10
|
+
export declare const discoverTokensPrompt: MCPPrompt;
|
|
11
|
+
/**
|
|
12
|
+
* Export all discovery prompts
|
|
13
|
+
*/
|
|
14
|
+
export declare const discoveryPrompts: MCPPrompt[];
|
|
15
|
+
//# sourceMappingURL=discover-tokens.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"discover-tokens.d.ts","sourceRoot":"","sources":["../../src/prompts/discover-tokens.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAIjD;;GAEG;AACH,eAAO,MAAM,oBAAoB,EAAE,SAmElC,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,gBAAgB,EAAE,SAAS,EAA2B,CAAC"}
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Token Discovery Prompts
|
|
4
|
+
*
|
|
5
|
+
* Slash commands for discovering and researching tokens on Gala Launchpad
|
|
6
|
+
*/
|
|
7
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
+
exports.discoveryPrompts = exports.discoverTokensPrompt = void 0;
|
|
9
|
+
const workflowTemplates_js_1 = require("./utils/workflowTemplates.js");
|
|
10
|
+
const validation_js_1 = require("../utils/validation.js");
|
|
11
|
+
/**
|
|
12
|
+
* Discover Tokens - Token discovery and exploration workflow
|
|
13
|
+
*/
|
|
14
|
+
exports.discoverTokensPrompt = {
|
|
15
|
+
name: 'galachain-launchpad:discover-tokens',
|
|
16
|
+
description: 'Discover new opportunities on Gala Launchpad - find recently launched tokens, popular tokens, or tokens near graduation',
|
|
17
|
+
arguments: [
|
|
18
|
+
{
|
|
19
|
+
name: 'type',
|
|
20
|
+
description: 'Type of discovery - "recent" for newly launched tokens (default), "popular" for most traded tokens, or "near-graduation" for tokens close to completing their bonding curve',
|
|
21
|
+
required: false,
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
name: 'limit',
|
|
25
|
+
description: 'Number of tokens to show (default: 10, max: 50)',
|
|
26
|
+
required: false,
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
name: 'minProgress',
|
|
30
|
+
description: 'Minimum graduation progress percentage - only for "near-graduation" type (e.g., "85" for 85%+ progress)',
|
|
31
|
+
required: false,
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
name: 'maxPrice',
|
|
35
|
+
description: 'Maximum USD price for tokens (e.g., "1.50" to find tokens under $1.50) - useful for finding low-cost tokens to accumulate',
|
|
36
|
+
required: false,
|
|
37
|
+
},
|
|
38
|
+
],
|
|
39
|
+
handler: (args) => {
|
|
40
|
+
// Parse and validate inputs
|
|
41
|
+
const type = (args.type || 'recent');
|
|
42
|
+
const limit = Math.min(Math.max(1, parseInt(args.limit || '10', 10)), 50);
|
|
43
|
+
// Validate type
|
|
44
|
+
if (!['recent', 'popular', 'near-graduation'].includes(type)) {
|
|
45
|
+
throw new Error('Type must be "recent", "popular", or "near-graduation"');
|
|
46
|
+
}
|
|
47
|
+
// Validate minProgress if provided
|
|
48
|
+
if (args.minProgress) {
|
|
49
|
+
const progress = parseInt(args.minProgress, 10);
|
|
50
|
+
if (isNaN(progress) || progress < 0 || progress > 100) {
|
|
51
|
+
throw new Error('minProgress must be a number between 0 and 100');
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
// Validate maxPrice if provided
|
|
55
|
+
if (args.maxPrice) {
|
|
56
|
+
(0, validation_js_1.validateNumericAmount)(args.maxPrice, 'maxPrice');
|
|
57
|
+
}
|
|
58
|
+
return [
|
|
59
|
+
{
|
|
60
|
+
role: 'user',
|
|
61
|
+
content: {
|
|
62
|
+
type: 'text',
|
|
63
|
+
text: (0, workflowTemplates_js_1.createDiscoverTokensWorkflow)({
|
|
64
|
+
type,
|
|
65
|
+
limit,
|
|
66
|
+
minProgress: args.minProgress,
|
|
67
|
+
maxPrice: args.maxPrice,
|
|
68
|
+
}),
|
|
69
|
+
},
|
|
70
|
+
},
|
|
71
|
+
];
|
|
72
|
+
},
|
|
73
|
+
};
|
|
74
|
+
/**
|
|
75
|
+
* Export all discovery prompts
|
|
76
|
+
*/
|
|
77
|
+
exports.discoveryPrompts = [exports.discoverTokensPrompt];
|
|
78
|
+
//# sourceMappingURL=discover-tokens.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"discover-tokens.js","sourceRoot":"","sources":["../../src/prompts/discover-tokens.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;;AAGH,uEAA4E;AAC5E,0DAA+D;AAE/D;;GAEG;AACU,QAAA,oBAAoB,GAAc;IAC7C,IAAI,EAAE,qCAAqC;IAC3C,WAAW,EACT,yHAAyH;IAC3H,SAAS,EAAE;QACT;YACE,IAAI,EAAE,MAAM;YACZ,WAAW,EACT,6KAA6K;YAC/K,QAAQ,EAAE,KAAK;SAChB;QACD;YACE,IAAI,EAAE,OAAO;YACb,WAAW,EAAE,iDAAiD;YAC9D,QAAQ,EAAE,KAAK;SAChB;QACD;YACE,IAAI,EAAE,aAAa;YACnB,WAAW,EACT,yGAAyG;YAC3G,QAAQ,EAAE,KAAK;SAChB;QACD;YACE,IAAI,EAAE,UAAU;YAChB,WAAW,EACT,2HAA2H;YAC7H,QAAQ,EAAE,KAAK;SAChB;KACF;IACD,OAAO,EAAE,CAAC,IAAI,EAAE,EAAE;QAChB,4BAA4B;QAC5B,MAAM,IAAI,GAAG,CAAC,IAAI,CAAC,IAAI,IAAI,QAAQ,CAA6C,CAAC;QACjF,MAAM,KAAK,GAAG,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,QAAQ,CAAC,IAAI,CAAC,KAAK,IAAI,IAAI,EAAE,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;QAE1E,gBAAgB;QAChB,IAAI,CAAC,CAAC,QAAQ,EAAE,SAAS,EAAE,iBAAiB,CAAC,CAAC,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC;YAC7D,MAAM,IAAI,KAAK,CAAC,wDAAwD,CAAC,CAAC;QAC5E,CAAC;QAED,mCAAmC;QACnC,IAAI,IAAI,CAAC,WAAW,EAAE,CAAC;YACrB,MAAM,QAAQ,GAAG,QAAQ,CAAC,IAAI,CAAC,WAAW,EAAE,EAAE,CAAC,CAAC;YAChD,IAAI,KAAK,CAAC,QAAQ,CAAC,IAAI,QAAQ,GAAG,CAAC,IAAI,QAAQ,GAAG,GAAG,EAAE,CAAC;gBACtD,MAAM,IAAI,KAAK,CAAC,gDAAgD,CAAC,CAAC;YACpE,CAAC;QACH,CAAC;QAED,gCAAgC;QAChC,IAAI,IAAI,CAAC,QAAQ,EAAE,CAAC;YAClB,IAAA,qCAAqB,EAAC,IAAI,CAAC,QAAQ,EAAE,UAAU,CAAC,CAAC;QACnD,CAAC;QAED,OAAO;YACL;gBACE,IAAI,EAAE,MAAM;gBACZ,OAAO,EAAE;oBACP,IAAI,EAAE,MAAM;oBACZ,IAAI,EAAE,IAAA,mDAA4B,EAAC;wBACjC,IAAI;wBACJ,KAAK;wBACL,WAAW,EAAE,IAAI,CAAC,WAAW;wBAC7B,QAAQ,EAAE,IAAI,CAAC,QAAQ;qBACxB,CAAC;iBACH;aACF;SACF,CAAC;IACJ,CAAC;CACF,CAAC;AAEF;;GAEG;AACU,QAAA,gBAAgB,GAAgB,CAAC,4BAAoB,CAAC,CAAC"}
|