@gala-chain/launchpad-mcp-server 1.4.0 → 1.5.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.
Files changed (116) hide show
  1. package/.eslintrc.json +9 -1
  2. package/dist/constants/mcpToolNames.d.ts +159 -0
  3. package/dist/constants/mcpToolNames.d.ts.map +1 -0
  4. package/dist/constants/mcpToolNames.js +131 -0
  5. package/dist/constants/mcpToolNames.js.map +1 -0
  6. package/dist/prompts/__tests__/promptStructure.test.d.ts +7 -0
  7. package/dist/prompts/__tests__/promptStructure.test.d.ts.map +1 -0
  8. package/dist/prompts/__tests__/promptStructure.test.js +106 -0
  9. package/dist/prompts/__tests__/promptStructure.test.js.map +1 -0
  10. package/dist/prompts/__tests__/registry.test.d.ts +7 -0
  11. package/dist/prompts/__tests__/registry.test.d.ts.map +1 -0
  12. package/dist/prompts/__tests__/registry.test.js +119 -0
  13. package/dist/prompts/__tests__/registry.test.js.map +1 -0
  14. package/dist/prompts/analysis.d.ts.map +1 -1
  15. package/dist/prompts/analysis.js +97 -65
  16. package/dist/prompts/analysis.js.map +1 -1
  17. package/dist/prompts/index.d.ts +58 -1
  18. package/dist/prompts/index.d.ts.map +1 -1
  19. package/dist/prompts/index.js +83 -3
  20. package/dist/prompts/index.js.map +1 -1
  21. package/dist/prompts/portfolio.d.ts.map +1 -1
  22. package/dist/prompts/portfolio.js +80 -76
  23. package/dist/prompts/portfolio.js.map +1 -1
  24. package/dist/prompts/trading.d.ts.map +1 -1
  25. package/dist/prompts/trading.js +76 -139
  26. package/dist/prompts/trading.js.map +1 -1
  27. package/dist/prompts/utils/workflowTemplates.d.ts +103 -0
  28. package/dist/prompts/utils/workflowTemplates.d.ts.map +1 -0
  29. package/dist/prompts/utils/workflowTemplates.js +315 -0
  30. package/dist/prompts/utils/workflowTemplates.js.map +1 -0
  31. package/dist/schemas/common-schemas.d.ts +121 -16
  32. package/dist/schemas/common-schemas.d.ts.map +1 -1
  33. package/dist/schemas/common-schemas.js +122 -17
  34. package/dist/schemas/common-schemas.js.map +1 -1
  35. package/dist/scripts/test-all-prompts.d.ts +6 -0
  36. package/dist/scripts/test-all-prompts.d.ts.map +1 -0
  37. package/dist/scripts/test-all-prompts.js +158 -0
  38. package/dist/scripts/test-all-prompts.js.map +1 -0
  39. package/dist/server.js +1 -1
  40. package/dist/tools/balance/index.d.ts.map +1 -1
  41. package/dist/tools/balance/index.js +5 -4
  42. package/dist/tools/balance/index.js.map +1 -1
  43. package/dist/tools/creation/index.d.ts.map +1 -1
  44. package/dist/tools/creation/index.js +6 -11
  45. package/dist/tools/creation/index.js.map +1 -1
  46. package/dist/tools/index.d.ts +9 -2
  47. package/dist/tools/index.d.ts.map +1 -1
  48. package/dist/tools/index.js +58 -14
  49. package/dist/tools/index.js.map +1 -1
  50. package/dist/tools/pools/fetchPoolDetailsForCalculation.d.ts +2 -3
  51. package/dist/tools/pools/fetchPoolDetailsForCalculation.d.ts.map +1 -1
  52. package/dist/tools/pools/fetchPoolDetailsForCalculation.js +5 -17
  53. package/dist/tools/pools/fetchPoolDetailsForCalculation.js.map +1 -1
  54. package/dist/tools/pools/index.d.ts.map +1 -1
  55. package/dist/tools/pools/index.js +51 -137
  56. package/dist/tools/pools/index.js.map +1 -1
  57. package/dist/tools/social/index.d.ts.map +1 -1
  58. package/dist/tools/social/index.js +4 -3
  59. package/dist/tools/social/index.js.map +1 -1
  60. package/dist/tools/trading/index.d.ts.map +1 -1
  61. package/dist/tools/trading/index.js +7 -21
  62. package/dist/tools/trading/index.js.map +1 -1
  63. package/dist/tools/utils/createWallet.d.ts +2 -3
  64. package/dist/tools/utils/createWallet.d.ts.map +1 -1
  65. package/dist/tools/utils/createWallet.js +8 -13
  66. package/dist/tools/utils/createWallet.js.map +1 -1
  67. package/dist/tools/utils/getAddress.d.ts +2 -3
  68. package/dist/tools/utils/getAddress.d.ts.map +1 -1
  69. package/dist/tools/utils/getAddress.js +6 -13
  70. package/dist/tools/utils/getAddress.js.map +1 -1
  71. package/dist/tools/utils/getConfig.d.ts +2 -3
  72. package/dist/tools/utils/getConfig.d.ts.map +1 -1
  73. package/dist/tools/utils/getConfig.js +5 -13
  74. package/dist/tools/utils/getConfig.js.map +1 -1
  75. package/dist/tools/utils/getEthereumAddress.d.ts +2 -3
  76. package/dist/tools/utils/getEthereumAddress.d.ts.map +1 -1
  77. package/dist/tools/utils/getEthereumAddress.js +6 -13
  78. package/dist/tools/utils/getEthereumAddress.js.map +1 -1
  79. package/dist/tools/utils/getUrlByTokenName.d.ts +2 -3
  80. package/dist/tools/utils/getUrlByTokenName.d.ts.map +1 -1
  81. package/dist/tools/utils/getUrlByTokenName.js +6 -20
  82. package/dist/tools/utils/getUrlByTokenName.js.map +1 -1
  83. package/dist/tools/utils/isTokenGraduated.d.ts +2 -3
  84. package/dist/tools/utils/isTokenGraduated.d.ts.map +1 -1
  85. package/dist/tools/utils/isTokenGraduated.js +6 -17
  86. package/dist/tools/utils/isTokenGraduated.js.map +1 -1
  87. package/dist/utils/__tests__/validation.test.d.ts +7 -0
  88. package/dist/utils/__tests__/validation.test.d.ts.map +1 -0
  89. package/dist/utils/__tests__/validation.test.js +122 -0
  90. package/dist/utils/__tests__/validation.test.js.map +1 -0
  91. package/dist/utils/default-values.d.ts +147 -0
  92. package/dist/utils/default-values.d.ts.map +1 -0
  93. package/dist/utils/default-values.js +177 -0
  94. package/dist/utils/default-values.js.map +1 -0
  95. package/dist/utils/error-handler.d.ts +9 -2
  96. package/dist/utils/error-handler.d.ts.map +1 -1
  97. package/dist/utils/error-handler.js +14 -59
  98. package/dist/utils/error-handler.js.map +1 -1
  99. package/dist/utils/error-templates.d.ts +96 -0
  100. package/dist/utils/error-templates.d.ts.map +1 -0
  101. package/dist/utils/error-templates.js +244 -0
  102. package/dist/utils/error-templates.js.map +1 -0
  103. package/dist/utils/tool-factory.d.ts +154 -0
  104. package/dist/utils/tool-factory.d.ts.map +1 -0
  105. package/dist/utils/tool-factory.js +194 -0
  106. package/dist/utils/tool-factory.js.map +1 -0
  107. package/dist/utils/tool-registry.d.ts +92 -0
  108. package/dist/utils/tool-registry.d.ts.map +1 -0
  109. package/dist/utils/tool-registry.js +227 -0
  110. package/dist/utils/tool-registry.js.map +1 -0
  111. package/dist/utils/validation.d.ts +162 -0
  112. package/dist/utils/validation.d.ts.map +1 -0
  113. package/dist/utils/validation.js +276 -0
  114. package/dist/utils/validation.js.map +1 -0
  115. package/jest.integration.config.js +70 -0
  116. package/package.json +10 -6
@@ -0,0 +1,315 @@
1
+ "use strict";
2
+ /**
3
+ * Workflow Template Utilities
4
+ *
5
+ * Reusable templates for common workflow patterns in prompts.
6
+ * Reduces duplication and ensures consistency across slash commands.
7
+ */
8
+ Object.defineProperty(exports, "__esModule", { value: true });
9
+ exports.createTradingWorkflow = createTradingWorkflow;
10
+ exports.formatWorkflowSteps = formatWorkflowSteps;
11
+ exports.createConfirmationStep = createConfirmationStep;
12
+ exports.createVerificationStep = createVerificationStep;
13
+ exports.createPerformanceNote = createPerformanceNote;
14
+ exports.createCostBreakdown = createCostBreakdown;
15
+ exports.createBalanceCheckStep = createBalanceCheckStep;
16
+ exports.createAnalysisWorkflow = createAnalysisWorkflow;
17
+ exports.createPortfolioWorkflow = createPortfolioWorkflow;
18
+ const mcpToolNames_js_1 = require("../../constants/mcpToolNames.js");
19
+ /**
20
+ * Create a complete trading workflow with all standard steps
21
+ *
22
+ * @param config - Trading workflow configuration
23
+ * @returns Formatted workflow text with numbered steps
24
+ *
25
+ * @example
26
+ * ```typescript
27
+ * const workflow = createTradingWorkflow({
28
+ * operation: 'buy',
29
+ * tokenName: 'anime',
30
+ * amount: '100',
31
+ * amountType: 'gala',
32
+ * slippage: '1'
33
+ * });
34
+ * ```
35
+ */
36
+ function createTradingWorkflow(config) {
37
+ const { operation, tokenName, amount, amountType, slippage = '1' } = config;
38
+ switch (operation) {
39
+ case 'buy':
40
+ return createBuyWorkflow(tokenName, amount, amountType, slippage);
41
+ case 'sell':
42
+ return createSellWorkflow(tokenName, amount, slippage);
43
+ case 'graduate':
44
+ return createGraduationWorkflow(tokenName, slippage);
45
+ default:
46
+ throw new Error(`Unknown operation: ${operation}`);
47
+ }
48
+ }
49
+ /**
50
+ * Create buy tokens workflow
51
+ */
52
+ function createBuyWorkflow(tokenName, amount, amountType, slippage) {
53
+ const slippageFactor = parseFloat(slippage) / 100;
54
+ const typeParam = amountType === 'gala' ? 'native' : 'exact';
55
+ const amountLabel = amountType === 'gala' ? 'GALA to spend' : 'Tokens to buy';
56
+ return `Help me buy tokens on Gala Launchpad:
57
+
58
+ Token: ${tokenName}
59
+ ${amountLabel}: ${amount}
60
+ Slippage tolerance: ${slippage}%
61
+
62
+ Please follow this workflow:
63
+
64
+ 1. Calculate buy amount using ${mcpToolNames_js_1.MCP_TOOLS.CALCULATE_BUY_AMOUNT}:
65
+ - tokenName: "${tokenName}"
66
+ - amount: "${amount}"
67
+ - type: "${typeParam}" (${amountType === 'gala' ? 'spending GALA' : 'buying exact tokens'})
68
+
69
+ 2. Show me the breakdown:
70
+ - Tokens I'll receive
71
+ - Transaction fee
72
+ - Gas fee
73
+ - Reverse bonding curve fee
74
+ - Total cost
75
+
76
+ 3. Ask for confirmation before executing
77
+
78
+ 4. If I confirm, execute the buy using ${mcpToolNames_js_1.MCP_TOOLS.BUY_TOKENS} with:
79
+ - expectedAmount from calculation
80
+ - maxAcceptableReverseBondingCurveFee from calculation
81
+ - slippageToleranceFactor: ${slippageFactor}
82
+
83
+ 5. After purchase, show transaction ID and verify balance`;
84
+ }
85
+ /**
86
+ * Create sell tokens workflow
87
+ */
88
+ function createSellWorkflow(tokenName, amount, slippage) {
89
+ const slippageFactor = parseFloat(slippage) / 100;
90
+ return `Help me sell tokens on Gala Launchpad:
91
+
92
+ Token: ${tokenName}
93
+ Tokens to sell: ${amount}
94
+ Slippage tolerance: ${slippage}%
95
+
96
+ Please follow this workflow:
97
+
98
+ 1. Check my token balance using ${mcpToolNames_js_1.MCP_TOOLS.FETCH_TOKEN_BALANCE}
99
+
100
+ 2. Calculate sell amount using ${mcpToolNames_js_1.MCP_TOOLS.CALCULATE_SELL_AMOUNT}:
101
+ - tokenName: "${tokenName}"
102
+ - amount: "${amount}"
103
+ - type: "exact" (selling exact token amount)
104
+
105
+ 3. Show me the breakdown:
106
+ - GALA I'll receive
107
+ - Transaction fee
108
+ - Gas fee
109
+ - Reverse bonding curve fee
110
+ - Net proceeds
111
+
112
+ 4. Ask for confirmation before executing
113
+
114
+ 5. If I confirm, execute the sell using ${mcpToolNames_js_1.MCP_TOOLS.SELL_TOKENS} with:
115
+ - expectedAmount from calculation
116
+ - maxAcceptableReverseBondingCurveFee from calculation
117
+ - slippageToleranceFactor: ${slippageFactor}
118
+
119
+ 6. After sale, show transaction ID and verify updated balance`;
120
+ }
121
+ /**
122
+ * Create token graduation workflow
123
+ */
124
+ function createGraduationWorkflow(tokenName, slippage) {
125
+ const slippageFactor = parseFloat(slippage) / 100;
126
+ return `Help me graduate the token "${tokenName}" on Gala Launchpad:
127
+
128
+ Slippage tolerance: ${slippage}%
129
+
130
+ Please follow this workflow:
131
+
132
+ 1. Check if token is already graduated using ${mcpToolNames_js_1.MCP_TOOLS.FETCH_POOL_DETAILS}
133
+ - If saleStatus is "Completed", inform me it's already graduated
134
+
135
+ 2. Fetch optimized pool details using ${mcpToolNames_js_1.MCP_TOOLS.FETCH_POOL_DETAILS_FOR_CALCULATION}
136
+
137
+ 3. Calculate graduation cost using ${mcpToolNames_js_1.MCP_TOOLS.CALCULATE_BUY_AMOUNT_FOR_GRADUATION} with:
138
+ - calculateAmountMode: "local"
139
+ - currentSupply from pool details
140
+
141
+ 4. Show me the breakdown:
142
+ - GALA required to graduate: [amount field - this is GALA cost, NOT token quantity!]
143
+ - Transaction fee
144
+ - Gas fee
145
+ - Total cost
146
+
147
+ 5. Check my GALA balance using ${mcpToolNames_js_1.MCP_TOOLS.FETCH_GALA_BALANCE}
148
+ - Verify I have enough GALA for graduation
149
+
150
+ 6. Ask for confirmation before executing
151
+
152
+ 7. If I confirm, execute graduation using ${mcpToolNames_js_1.MCP_TOOLS.GRADUATE_TOKEN} with:
153
+ - tokenName: "${tokenName}"
154
+ - slippageToleranceFactor: ${slippageFactor}
155
+ - calculateAmountMode: "local"
156
+ - currentSupply from pool details (optimization!)
157
+
158
+ 8. After graduation:
159
+ - Show transaction ID
160
+ - Verify pool status changed to "Completed"
161
+ - Get frontend URL using ${mcpToolNames_js_1.MCP_TOOLS.GET_URL_BY_TOKEN_NAME}
162
+
163
+ IMPORTANT: The "amount" field in graduation calculations is GALA cost, not token quantity!`;
164
+ }
165
+ /**
166
+ * Format a list of steps with numbers
167
+ *
168
+ * @param steps - Array of step descriptions
169
+ * @returns Formatted steps with numbering
170
+ *
171
+ * @example
172
+ * ```typescript
173
+ * formatWorkflowSteps([
174
+ * 'Fetch pool details',
175
+ * 'Calculate price',
176
+ * 'Show results'
177
+ * ]);
178
+ * // Returns:
179
+ * // "1. Fetch pool details
180
+ * // 2. Calculate price
181
+ * // 3. Show results"
182
+ * ```
183
+ */
184
+ function formatWorkflowSteps(steps) {
185
+ return steps.map((step, index) => `${index + 1}. ${step}`).join('\n\n');
186
+ }
187
+ /**
188
+ * Create a standard confirmation step for destructive operations
189
+ *
190
+ * @param operation - Operation name (e.g., 'buy', 'sell', 'graduate')
191
+ * @returns Confirmation step text
192
+ */
193
+ function createConfirmationStep(operation) {
194
+ return `Ask for confirmation before executing the ${operation} operation`;
195
+ }
196
+ /**
197
+ * Create a standard verification step after transaction
198
+ *
199
+ * @param operation - Operation name
200
+ * @param verifications - Array of verification checks to perform
201
+ * @returns Verification step text
202
+ */
203
+ function createVerificationStep(operation, verifications) {
204
+ const checks = verifications
205
+ .map((check, index) => ` ${String.fromCharCode(97 + index)}. ${check}`)
206
+ .join('\n');
207
+ return `After ${operation} completes:\n${checks}`;
208
+ }
209
+ /**
210
+ * Create an optimized performance note for LOCAL calculations
211
+ *
212
+ * @returns Performance optimization guidance text
213
+ */
214
+ function createPerformanceNote() {
215
+ return `Use the performance optimization pattern from SDK v3.9.0 to minimize network calls.`;
216
+ }
217
+ /**
218
+ * Create a cost breakdown display template
219
+ *
220
+ * @param operation - Operation type for context
221
+ * @returns Cost breakdown template text
222
+ */
223
+ function createCostBreakdown(operation) {
224
+ switch (operation) {
225
+ case 'buy':
226
+ return `Show me the breakdown:
227
+ - Tokens I'll receive
228
+ - Transaction fee
229
+ - Gas fee
230
+ - Reverse bonding curve fee
231
+ - Total cost`;
232
+ case 'sell':
233
+ return `Show me the breakdown:
234
+ - GALA I'll receive
235
+ - Transaction fee
236
+ - Gas fee
237
+ - Reverse bonding curve fee
238
+ - Net proceeds`;
239
+ case 'graduate':
240
+ return `Show me the breakdown:
241
+ - GALA required to graduate
242
+ - Transaction fee
243
+ - Gas fee
244
+ - Total cost`;
245
+ }
246
+ }
247
+ /**
248
+ * Create a balance check step
249
+ *
250
+ * @param assetType - Type of asset to check ('GALA' or token name)
251
+ * @returns Balance check step text
252
+ */
253
+ function createBalanceCheckStep(assetType) {
254
+ if (assetType === 'GALA') {
255
+ return `Check my GALA balance using ${mcpToolNames_js_1.MCP_TOOLS.FETCH_GALA_BALANCE}`;
256
+ }
257
+ return `Check my ${assetType} token balance using ${mcpToolNames_js_1.MCP_TOOLS.FETCH_TOKEN_BALANCE}`;
258
+ }
259
+ /**
260
+ * Create analysis workflow for token evaluation
261
+ *
262
+ * @param tokenName - Token to analyze
263
+ * @returns Complete analysis workflow
264
+ */
265
+ function createAnalysisWorkflow(tokenName) {
266
+ return `Analyze the token "${tokenName}" using the Gala Launchpad MCP server:
267
+
268
+ 1. Fetch optimized pool details using ${mcpToolNames_js_1.MCP_TOOLS.FETCH_POOL_DETAILS_FOR_CALCULATION}
269
+ 2. Calculate current USD spot price using LOCAL mode with the currentSupply
270
+ 3. Calculate graduation cost using LOCAL mode with the currentSupply
271
+ 4. Show remaining tokens and pool status (saleStatus)
272
+ 5. Calculate pool progress percentage: (currentSupply / maxSupply * 100)
273
+
274
+ ${createPerformanceNote()}
275
+
276
+ Provide a brief analysis including:
277
+ - Current token price in USD
278
+ - Total GALA required to graduate the pool
279
+ - How close the token is to graduation (percentage)
280
+ - Whether this would be a good time to buy or wait`;
281
+ }
282
+ /**
283
+ * Create portfolio analysis workflow
284
+ *
285
+ * @returns Complete portfolio analysis workflow
286
+ */
287
+ function createPortfolioWorkflow() {
288
+ return `Analyze my complete Gala Launchpad portfolio:
289
+
290
+ 1. Get GALA balance using ${mcpToolNames_js_1.MCP_TOOLS.FETCH_GALA_BALANCE}
291
+
292
+ 2. Get all tokens I'm holding using ${mcpToolNames_js_1.MCP_TOOLS.FETCH_TOKENS_HELD}
293
+ - Use pagination if needed to get all tokens
294
+
295
+ 3. For each token, calculate USD value using optimized pattern:
296
+ a. Fetch pool details once: ${mcpToolNames_js_1.MCP_TOOLS.FETCH_POOL_DETAILS_FOR_CALCULATION}
297
+ b. Calculate spot price: ${mcpToolNames_js_1.MCP_TOOLS.FETCH_LAUNCHPAD_TOKEN_SPOT_PRICE} with LOCAL mode
298
+ c. Multiply token balance by spot price for USD value
299
+
300
+ 4. Calculate GALA USD value using ${mcpToolNames_js_1.MCP_TOOLS.FETCH_GALA_SPOT_PRICE}
301
+
302
+ 5. Present a comprehensive portfolio summary:
303
+ - GALA balance and USD value
304
+ - Each token holding with:
305
+ * Token name
306
+ * Balance
307
+ * USD spot price
308
+ * Total USD value
309
+ - Total portfolio value in USD
310
+ - Top 3 holdings by value
311
+ - Number of different tokens held
312
+
313
+ ${createPerformanceNote()}`;
314
+ }
315
+ //# sourceMappingURL=workflowTemplates.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"workflowTemplates.js","sourceRoot":"","sources":["../../../src/prompts/utils/workflowTemplates.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;AAgCH,sDAaC;AAwJD,kDAEC;AAQD,wDAEC;AASD,wDASC;AAOD,sDAEC;AAQD,kDAuBC;AAQD,wDAKC;AAQD,wDAgBC;AAOD,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
10
  */
11
11
  /**
12
12
  * Token name schema - used in 11+ tools
13
- * Generated from SDK tokenNameSchema
13
+ *
14
+ * @description Generated from SDK tokenNameSchema
15
+ * @pattern ^[a-zA-Z0-9]{3,20}$
16
+ * @minLength 3
17
+ * @maxLength 20
18
+ * @example "boba", "testtoken", "mytoken123"
14
19
  */
15
20
  export declare const TOKEN_NAME_SCHEMA: any;
16
21
  /**
17
22
  * Token symbol schema - used in creation tools
18
- * Generated from SDK tokenSymbolSchema
23
+ *
24
+ * @description Generated from SDK tokenSymbolSchema
25
+ * @pattern ^[A-Z]{1,8}$
26
+ * @minLength 1
27
+ * @maxLength 8
28
+ * @example "GALA", "TEST", "MTK"
19
29
  */
20
30
  export declare const TOKEN_SYMBOL_SCHEMA: any;
21
31
  /**
22
32
  * Token description schema
23
- * Generated from SDK tokenDescriptionSchema
33
+ *
34
+ * @description Generated from SDK tokenDescriptionSchema
35
+ * @minLength 1
36
+ * @maxLength 500
37
+ * @example "A revolutionary new token for decentralized gaming"
24
38
  */
25
39
  export declare const TOKEN_DESCRIPTION_SCHEMA: any;
26
40
  /**
27
41
  * Private key schema - used in 18+ tools
28
- * Generated from SDK privateKeySchema
42
+ *
43
+ * @description Generated from SDK privateKeySchema
44
+ * @pattern ^0x[a-fA-F0-9]{64}$
45
+ * @example "0xabcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890"
46
+ * @security Sensitive - should never be logged or exposed
29
47
  */
30
48
  export declare const PRIVATE_KEY_SCHEMA: any;
31
49
  /**
32
50
  * Wallet address schema - supports both Ethereum (0x...) and GalaChain (eth|...) formats
33
- * Generated from SDK flexibleAddressSchema
51
+ *
52
+ * @description Generated from SDK flexibleAddressSchema
53
+ * @example "0x1234567890abcdef1234567890abcdef12345678"
54
+ * @example "eth|1234567890abcdef1234567890abcdef12345678"
34
55
  */
35
56
  export declare const ADDRESS_SCHEMA: any;
36
57
  /**
37
58
  * Decimal amount schema - used in trading and transfer tools
38
- * Generated from SDK positiveDecimalStringSchema
59
+ *
60
+ * @description Generated from SDK positiveDecimalStringSchema
61
+ * @pattern ^\d+(\.\d+)?$
62
+ * @example "100", "1.5", "0.001"
63
+ * @note Must be positive (greater than zero)
39
64
  */
40
65
  export declare const DECIMAL_AMOUNT_SCHEMA: any;
41
66
  /**
42
67
  * Pre-buy quantity schema - used in token creation
43
- * Generated from SDK nonNegativeDecimalStringSchema
68
+ *
69
+ * @description Generated from SDK nonNegativeDecimalStringSchema
70
+ * @pattern ^\d+(\.\d+)?$
71
+ * @example "0", "100", "1500.5"
72
+ * @note Can be zero or positive (non-negative)
44
73
  */
45
74
  export declare const PRE_BUY_QUANTITY_SCHEMA: any;
46
75
  /**
47
76
  * Integer amount schema - used in token transfers
48
- * Pattern: positive integer string
77
+ *
78
+ * @description Manual schema (not from SDK primitives)
79
+ * @pattern ^[0-9]+$
80
+ * @example "100", "1000", "5000000"
81
+ * @note Integer only (no decimals) - for token transfer operations
49
82
  */
50
83
  export declare const INTEGER_AMOUNT_SCHEMA: {
51
84
  type: "string";
@@ -54,42 +87,81 @@ export declare const INTEGER_AMOUNT_SCHEMA: {
54
87
  };
55
88
  /**
56
89
  * URL schema - used for social URLs and token images
57
- * Generated from SDK urlSchema
90
+ *
91
+ * @description Generated from SDK urlSchema
92
+ * @pattern ^https?:\/\/
93
+ * @format uri
94
+ * @example "https://example.com", "https://twitter.com/username"
95
+ * @note Must start with http:// or https://
58
96
  */
59
97
  export declare const URL_SCHEMA: any;
60
98
  /**
61
99
  * Comment message schema
62
- * Generated from SDK commentMessageSchema
100
+ *
101
+ * @description Generated from SDK commentMessageSchema
102
+ * @minLength 1
103
+ * @maxLength 500
104
+ * @example "Great token!", "Looking forward to this project"
63
105
  */
64
106
  export declare const COMMENT_MESSAGE_SCHEMA: any;
65
107
  /**
66
108
  * Profile name schema
67
- * Generated from SDK fullNameSchema
109
+ *
110
+ * @description Generated from SDK fullNameSchema
111
+ * @pattern ^[a-zA-Z\s]+$
112
+ * @minLength 1
113
+ * @maxLength 100
114
+ * @example "John Doe", "Alice Smith"
115
+ * @note Only letters and spaces allowed
68
116
  */
69
117
  export declare const FULL_NAME_SCHEMA: any;
70
118
  /**
71
119
  * Search query schema - used in user tools
72
- * Generated from SDK searchQuerySchema
120
+ *
121
+ * @description Generated from SDK searchQuerySchema
122
+ * @minLength 1
123
+ * @maxLength 100
124
+ * @example "dragon", "test", "my token"
125
+ * @note Fuzzy match - case-insensitive, partial matching
73
126
  */
74
127
  export declare const SEARCH_SCHEMA: any;
75
128
  /**
76
129
  * Transaction ID schema - used for getBundlerTransactionResult
77
- * Generated from SDK transactionIdSchema
130
+ *
131
+ * @description Generated from SDK transactionIdSchema
132
+ * @pattern ^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$
133
+ * @format uuid
134
+ * @example "550e8400-e29b-41d4-a716-446655440000"
135
+ * @note UUID v4 format - returned from buy(), sell(), launchToken()
78
136
  */
79
137
  export declare const TRANSACTION_ID_SCHEMA: any;
80
138
  /**
81
139
  * Idempotency key schema - used in transfer tools
82
- * Generated from SDK uniqueKeySchema
140
+ *
141
+ * @description Generated from SDK uniqueKeySchema
142
+ * @pattern ^galaconnect-operation-[a-z0-9-]+$
143
+ * @example "galaconnect-operation-abc123-def456"
144
+ * @note Prevents duplicate transactions - optional but recommended
83
145
  */
84
146
  export declare const UNIQUE_KEY_SCHEMA: any;
85
147
  /**
86
148
  * Date-time schema - used in trade and volume queries
87
- * Generated from SDK isoDateStringSchema
149
+ *
150
+ * @description Generated from SDK isoDateStringSchema
151
+ * @format date-time
152
+ * @example "2024-01-15T14:30:25", "2024-01-15T14:30:25Z"
153
+ * @note ISO 8601 format
88
154
  */
89
155
  export declare const DATE_TIME_SCHEMA: any;
90
156
  /**
91
157
  * Page number schema - used in ~15 tools
92
- * Generated from SDK pageNumberSchema
158
+ *
159
+ * @description Generated from SDK pageNumberSchema
160
+ * @type number
161
+ * @minimum 1
162
+ * @maximum 1000
163
+ * @example 1, 2, 50
164
+ * @note Default: 1 (first page)
93
165
  */
94
166
  export declare const PAGE_SCHEMA: any;
95
167
  /**
@@ -108,6 +180,13 @@ export declare function createLimitSchema(operationType: 'trade' | 'user' | 'poo
108
180
  };
109
181
  /**
110
182
  * Slippage tolerance factor schema
183
+ *
184
+ * @description Manual schema (not from SDK primitives)
185
+ * @type number
186
+ * @minimum 0
187
+ * @maximum 1
188
+ * @example 0.01 (1%), 0.05 (5%), 0.1 (10%)
189
+ * @note Decimal format - protects against price movements during transaction
111
190
  */
112
191
  export declare const SLIPPAGE_TOLERANCE_SCHEMA: {
113
192
  type: "number";
@@ -117,6 +196,13 @@ export declare const SLIPPAGE_TOLERANCE_SCHEMA: {
117
196
  };
118
197
  /**
119
198
  * Reverse bonding curve fee slippage schema
199
+ *
200
+ * @description Manual schema (not from SDK primitives)
201
+ * @type number
202
+ * @minimum 0
203
+ * @maximum 1
204
+ * @example 0.01 (1% - default), 0.02 (2%), 0.05 (5%)
205
+ * @note Applied to maxAcceptableReverseBondingCurveFee for additional protection
120
206
  */
121
207
  export declare const RBC_FEE_SLIPPAGE_SCHEMA: {
122
208
  type: "number";
@@ -126,6 +212,12 @@ export declare const RBC_FEE_SLIPPAGE_SCHEMA: {
126
212
  };
127
213
  /**
128
214
  * Sort order schema
215
+ *
216
+ * @description Manual schema (not from SDK primitives)
217
+ * @type string
218
+ * @enum ['ASC', 'DESC']
219
+ * @example "ASC" (oldest first), "DESC" (newest first - default)
220
+ * @note Default: DESC (descending, newest first)
129
221
  */
130
222
  export declare const SORT_ORDER_SCHEMA: {
131
223
  type: "string";
@@ -134,6 +226,13 @@ export declare const SORT_ORDER_SCHEMA: {
134
226
  };
135
227
  /**
136
228
  * Calculation mode schema - for calculateAmountMode parameter
229
+ *
230
+ * @description Manual schema (not from SDK primitives)
231
+ * @type string
232
+ * @enum ['local', 'external']
233
+ * @example "local" (instant client-side), "external" (network-based GalaChain)
234
+ * @note Default: SDK's calculateAmountMode setting
235
+ * @note Local mode: <1ms, 99.99% accurate | External mode: ~200ms, 100% accurate
137
236
  */
138
237
  export declare const CALCULATION_MODE_SCHEMA: {
139
238
  type: "string";
@@ -142,6 +241,12 @@ export declare const CALCULATION_MODE_SCHEMA: {
142
241
  };
143
242
  /**
144
243
  * Current supply schema - for performance optimization
244
+ *
245
+ * @description Extends DECIMAL_AMOUNT_SCHEMA
246
+ * @pattern ^\d+(\.\d+)?$
247
+ * @example "1000000", "5000000.5"
248
+ * @note Performance optimization: provide to avoid fetching pool details twice
249
+ * @note Only used in local calculation mode - auto-fetched if missing
145
250
  */
146
251
  export declare const CURRENT_SUPPLY_SCHEMA: any;
147
252
  //# sourceMappingURL=common-schemas.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"common-schemas.d.ts","sourceRoot":"","sources":["../../src/schemas/common-schemas.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAkDH;;;GAGG;AACH,eAAO,MAAM,iBAAiB,KAA6C,CAAC;AAE5E;;;GAGG;AACH,eAAO,MAAM,mBAAmB,KAAiD,CAAC;AAElF;;;GAGG;AACH,eAAO,MAAM,wBAAwB,KAGpC,CAAC;AAMF;;;GAGG;AACH,eAAO,MAAM,kBAAkB,KAG9B,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,cAAc,KAAuD,CAAC;AAMnF;;;GAGG;AACH,eAAO,MAAM,qBAAqB,KAGjC,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,uBAAuB,KAGnC,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,qBAAqB;;;;CAIjC,CAAC;AAMF;;;GAGG;AACH,eAAO,MAAM,UAAU,KAAyB,CAAC;AAEjD;;;GAGG;AACH,eAAO,MAAM,sBAAsB,KAGlC,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,gBAAgB,KAA2C,CAAC;AAEzE;;;GAGG;AACH,eAAO,MAAM,aAAa,KAGzB,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,qBAAqB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