@gala-chain/launchpad-sdk 0.4.3 → 3.0.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 (135) hide show
  1. package/README.md +351 -77
  2. package/dist/examples/complete-sdk-demo.d.ts +22 -0
  3. package/dist/examples/complete-sdk-demo.d.ts.map +1 -0
  4. package/dist/index.cjs.js +1 -1
  5. package/dist/index.esm.js +1 -1
  6. package/dist/index.js +1 -1
  7. package/dist/src/LaunchpadSDK.d.ts +755 -0
  8. package/dist/src/LaunchpadSDK.d.ts.map +1 -0
  9. package/dist/{api → src/api}/LaunchpadAPI.d.ts +105 -67
  10. package/dist/src/api/LaunchpadAPI.d.ts.map +1 -0
  11. package/dist/{api → src/api}/dto/BondingCurveDTOs.d.ts +8 -5
  12. package/dist/src/api/dto/BondingCurveDTOs.d.ts.map +1 -0
  13. package/dist/src/api/dto/TransferTokenDto.d.ts +76 -0
  14. package/dist/src/api/dto/TransferTokenDto.d.ts.map +1 -0
  15. package/dist/src/auth/SignatureAuth.d.ts.map +1 -0
  16. package/dist/src/auth/types.d.ts.map +1 -0
  17. package/dist/src/config/environments.d.ts +45 -0
  18. package/dist/src/config/environments.d.ts.map +1 -0
  19. package/dist/{helpers → src/helpers}/sdk.d.ts +23 -13
  20. package/dist/src/helpers/sdk.d.ts.map +1 -0
  21. package/dist/src/helpers/wallet.d.ts.map +1 -0
  22. package/dist/src/index.d.ts +25 -0
  23. package/dist/src/index.d.ts.map +1 -0
  24. package/dist/src/services/BundleService.d.ts +197 -0
  25. package/dist/src/services/BundleService.d.ts.map +1 -0
  26. package/dist/src/services/DexService.d.ts +84 -0
  27. package/dist/src/services/DexService.d.ts.map +1 -0
  28. package/dist/src/services/GalaChainService.d.ts +254 -0
  29. package/dist/src/services/GalaChainService.d.ts.map +1 -0
  30. package/dist/src/services/LaunchpadService.d.ts +479 -0
  31. package/dist/src/services/LaunchpadService.d.ts.map +1 -0
  32. package/dist/src/services/SignatureService.d.ts.map +1 -0
  33. package/dist/src/services/TokenClassKeyService.d.ts.map +1 -0
  34. package/dist/src/services/TokenResolverService.d.ts +154 -0
  35. package/dist/src/services/TokenResolverService.d.ts.map +1 -0
  36. package/dist/src/services/WebSocketManager.d.ts.map +1 -0
  37. package/dist/{api → src}/services/WebSocketService.d.ts +4 -1
  38. package/dist/src/services/WebSocketService.d.ts.map +1 -0
  39. package/dist/{types → src/types}/comment.dto.d.ts +14 -5
  40. package/dist/src/types/comment.dto.d.ts.map +1 -0
  41. package/dist/{types → src/types}/common.d.ts +36 -1
  42. package/dist/src/types/common.d.ts.map +1 -0
  43. package/dist/{types → src/types}/dto.d.ts +19 -0
  44. package/dist/src/types/dto.d.ts.map +1 -0
  45. package/dist/{types → src/types}/launchpad.dto.d.ts +216 -30
  46. package/dist/src/types/launchpad.dto.d.ts.map +1 -0
  47. package/dist/{types → src/types}/launchpad.validation.d.ts +8 -8
  48. package/dist/src/types/launchpad.validation.d.ts.map +1 -0
  49. package/dist/src/types/options.dto.d.ts +281 -0
  50. package/dist/src/types/options.dto.d.ts.map +1 -0
  51. package/dist/src/types/result.types.d.ts +120 -0
  52. package/dist/src/types/result.types.d.ts.map +1 -0
  53. package/dist/{types → src/types}/trade.dto.d.ts +46 -19
  54. package/dist/src/types/trade.dto.d.ts.map +1 -0
  55. package/dist/src/types/transfer.dto.d.ts +161 -0
  56. package/dist/src/types/transfer.dto.d.ts.map +1 -0
  57. package/dist/{types → src/types}/user.dto.d.ts +98 -38
  58. package/dist/src/types/user.dto.d.ts.map +1 -0
  59. package/dist/src/types/websocket.types.d.ts +82 -0
  60. package/dist/src/types/websocket.types.d.ts.map +1 -0
  61. package/dist/src/utils/Logger.d.ts +136 -0
  62. package/dist/src/utils/Logger.d.ts.map +1 -0
  63. package/dist/src/utils/SignatureHelper.d.ts +77 -0
  64. package/dist/src/utils/SignatureHelper.d.ts.map +1 -0
  65. package/dist/src/utils/adapters.d.ts.map +1 -0
  66. package/dist/src/utils/agent-config.d.ts.map +1 -0
  67. package/dist/src/utils/date-utils.d.ts +39 -0
  68. package/dist/src/utils/date-utils.d.ts.map +1 -0
  69. package/dist/src/utils/http.d.ts.map +1 -0
  70. package/dist/src/utils/multipart.d.ts.map +1 -0
  71. package/dist/src/utils/number-utils.d.ts +57 -0
  72. package/dist/src/utils/number-utils.d.ts.map +1 -0
  73. package/dist/src/utils/precision-math.d.ts.map +1 -0
  74. package/dist/src/utils/slippage-utils.d.ts +70 -0
  75. package/dist/src/utils/slippage-utils.d.ts.map +1 -0
  76. package/dist/src/utils/tokenNormalizer.d.ts +111 -0
  77. package/dist/src/utils/tokenNormalizer.d.ts.map +1 -0
  78. package/dist/{utils → src/utils}/validation.d.ts +4 -4
  79. package/dist/src/utils/validation.d.ts.map +1 -0
  80. package/dist/{utils → src/utils}/wallet.d.ts +2 -2
  81. package/dist/src/utils/wallet.d.ts.map +1 -0
  82. package/package.json +10 -13
  83. package/dist/LaunchpadSDK.d.ts +0 -573
  84. package/dist/LaunchpadSDK.d.ts.map +0 -1
  85. package/dist/api/CommentAPI.d.ts +0 -119
  86. package/dist/api/CommentAPI.d.ts.map +0 -1
  87. package/dist/api/LaunchpadAPI.d.ts.map +0 -1
  88. package/dist/api/TradeAPI.d.ts +0 -164
  89. package/dist/api/TradeAPI.d.ts.map +0 -1
  90. package/dist/api/Trading.d.ts +0 -176
  91. package/dist/api/Trading.d.ts.map +0 -1
  92. package/dist/api/UserAPI.d.ts +0 -426
  93. package/dist/api/UserAPI.d.ts.map +0 -1
  94. package/dist/api/WebSocketAPI.d.ts +0 -156
  95. package/dist/api/WebSocketAPI.d.ts.map +0 -1
  96. package/dist/api/dto/BondingCurveDTOs.d.ts.map +0 -1
  97. package/dist/api/services/BundleService.d.ts +0 -105
  98. package/dist/api/services/BundleService.d.ts.map +0 -1
  99. package/dist/api/services/SignatureService.d.ts.map +0 -1
  100. package/dist/api/services/TokenClassKeyService.d.ts.map +0 -1
  101. package/dist/api/services/WebSocketManager.d.ts.map +0 -1
  102. package/dist/api/services/WebSocketService.d.ts.map +0 -1
  103. package/dist/auth/SignatureAuth.d.ts.map +0 -1
  104. package/dist/auth/types.d.ts.map +0 -1
  105. package/dist/helpers/sdk.d.ts.map +0 -1
  106. package/dist/helpers/wallet.d.ts.map +0 -1
  107. package/dist/index.d.ts +0 -49
  108. package/dist/index.d.ts.map +0 -1
  109. package/dist/types/comment.dto.d.ts.map +0 -1
  110. package/dist/types/common.d.ts.map +0 -1
  111. package/dist/types/dto.d.ts.map +0 -1
  112. package/dist/types/launchpad.dto.d.ts.map +0 -1
  113. package/dist/types/launchpad.validation.d.ts.map +0 -1
  114. package/dist/types/trade.dto.d.ts.map +0 -1
  115. package/dist/types/user.dto.d.ts.map +0 -1
  116. package/dist/utils/VaultCache.d.ts +0 -73
  117. package/dist/utils/VaultCache.d.ts.map +0 -1
  118. package/dist/utils/adapters.d.ts.map +0 -1
  119. package/dist/utils/agent-config.d.ts.map +0 -1
  120. package/dist/utils/http.d.ts.map +0 -1
  121. package/dist/utils/multipart.d.ts.map +0 -1
  122. package/dist/utils/precision-math.d.ts.map +0 -1
  123. package/dist/utils/validation.d.ts.map +0 -1
  124. package/dist/utils/wallet.d.ts.map +0 -1
  125. /package/dist/{auth → src/auth}/SignatureAuth.d.ts +0 -0
  126. /package/dist/{auth → src/auth}/types.d.ts +0 -0
  127. /package/dist/{helpers → src/helpers}/wallet.d.ts +0 -0
  128. /package/dist/{api → src}/services/SignatureService.d.ts +0 -0
  129. /package/dist/{api → src}/services/TokenClassKeyService.d.ts +0 -0
  130. /package/dist/{api → src}/services/WebSocketManager.d.ts +0 -0
  131. /package/dist/{utils → src/utils}/adapters.d.ts +0 -0
  132. /package/dist/{utils → src/utils}/agent-config.d.ts +0 -0
  133. /package/dist/{utils → src/utils}/http.d.ts +0 -0
  134. /package/dist/{utils → src/utils}/multipart.d.ts +0 -0
  135. /package/dist/{utils → src/utils}/precision-math.d.ts +0 -0
@@ -0,0 +1 @@
1
+ {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AAmB,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC;IAQpE;;;OAGG;IACH,OAAO,CAAC,qBAAqB;IAiD7B;;;OAGG;IACH,OAAO,CAAC,4BAA4B;IAWpC;;;OAGG;YACW,yBAAyB;IAUvC;;;OAGG;YACW,mBAAmB;IAgEjC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA6BG;IACG,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC;IAsB9B;;;;;;;;;;;;;;;;;;;;;;;;OAwBG;IACH,MAAM,CAAC,UAAU,CAAC,KAAK,GAAE,OAAe,GAAG,IAAI;CAahD"}
@@ -5,8 +5,10 @@
5
5
  * file uploads, pool creation, data fetching, and analysis operations.
6
6
  */
7
7
  import { HttpClient } from '../utils/http';
8
- import { ImageUploadOptions, ImageUploadResponse, FetchPoolOptions, FetchPoolResponse, GetAmountResponse, CheckPoolOptions, CheckPoolResponse, GetGraphResponse, GetTokenDistributionResponse, CreateSaleData, CreateSaleResponse, GetTokenBadgesResponse } from '../types/launchpad.dto';
9
- import { CalculatePreMintData, CalculatePreMintResponse } from '../types/trade.dto';
8
+ import { TokenResolverService } from '../services/TokenResolverService';
9
+ import { FetchPoolOptions, PoolsResult, AmountCalculationResult, CheckPoolOptions, GraphDataResult, TokenDistributionResult, LaunchTokenData, TokenBadgesResult, TokenSpotPrice } from '../types/launchpad.dto';
10
+ import { CalculatePreMintData } from '../types/trade.dto';
11
+ import { FetchVolumeDataOptions, CalculateBuyAmountOptions, CalculateSellAmountOptions, HasTokenBadgeOptions, UploadImageByTokenNameOptions } from '../types/options.dto';
10
12
  /**
11
13
  * Launchpad API controller for pool creation and management operations
12
14
  *
@@ -34,8 +36,8 @@ import { CalculatePreMintData, CalculatePreMintResponse } from '../types/trade.d
34
36
  * tokenName: 'mytoken'
35
37
  * });
36
38
  *
37
- * // 2. Create the token sale
38
- * const sale = await sdk.launchpad.createSale({
39
+ * // 2. Launch the token
40
+ * const launch = await sdk.launchpad.launchToken({
39
41
  * tokenName: 'mytoken',
40
42
  * tokenSymbol: 'MTK',
41
43
  * tokenDescription: 'My awesome token',
@@ -48,8 +50,11 @@ import { CalculatePreMintData, CalculatePreMintResponse } from '../types/trade.d
48
50
  */
49
51
  export declare class LaunchpadAPI {
50
52
  private readonly http;
53
+ private readonly tokenResolver;
51
54
  private readonly bundleHttp?;
52
- constructor(http: HttpClient, bundleHttp?: HttpClient | undefined);
55
+ private readonly galaChainHttp?;
56
+ private readonly dexApiHttp?;
57
+ constructor(http: HttpClient, tokenResolver: TokenResolverService, bundleHttp?: HttpClient | undefined, galaChainHttp?: HttpClient | undefined, dexApiHttp?: HttpClient | undefined);
53
58
  /**
54
59
  * Uploads an image for a token pool
55
60
  *
@@ -117,51 +122,49 @@ export declare class LaunchpadAPI {
117
122
  * }
118
123
  * ```
119
124
  *
120
- * @see {@link createSale} - Create token sale using uploaded image
125
+ * @see {@link launchToken} - Launch token using uploaded image
121
126
  */
122
- uploadImageByTokenName(tokenName: string, options: ImageUploadOptions): Promise<ImageUploadResponse>;
127
+ uploadImageByTokenName(options: UploadImageByTokenNameOptions): Promise<string>;
123
128
  /**
124
129
  * Fetches pools with filtering and pagination
125
130
  *
126
131
  * ✅ VERIFIED: Real API payload confirmed - endpoint /launchpad/fetch-pool
127
132
  *
128
133
  * @param options Fetch options including type, search, and pagination
129
- * @returns Promise<FetchPoolResponse> Pool data with pagination
134
+ * @returns Promise<PoolsResult> Clean pool data with full pagination
130
135
  */
131
- fetchPools(options: FetchPoolOptions): Promise<FetchPoolResponse>;
136
+ private fetchPoolsFromAPI;
132
137
  /**
133
- * Calculates amount for trading operations (PRIVATE - Internal use only)
138
+ * Calculates amount for trading operations with hybrid approach
139
+ * Uses direct GalaChain for supported operations, falls back to backend for others
140
+ * (PRIVATE - Internal use only)
134
141
  *
135
142
  * @private
136
143
  * @param options Amount calculation options
137
- * @returns Promise<GetAmountResponse> Calculated amount
144
+ * @returns Promise<AmountCalculationResult> Clean calculated amount
138
145
  */
139
146
  private _getAmount;
140
147
  /**
141
148
  * Checks if a pool exists for given token name or symbol
142
149
  *
143
150
  * @param options Check options with token name and/or symbol
144
- * @returns Promise<CheckPoolResponse> Pool existence result
151
+ * @returns Promise<boolean> True if pool exists, false otherwise
145
152
  */
146
- checkPool(options: CheckPoolOptions): Promise<CheckPoolResponse>;
153
+ checkPool(options: CheckPoolOptions): Promise<boolean>;
147
154
  /**
148
- * Fetches graph data for a token
155
+ * Fetches volume data for a token
149
156
  *
150
157
  * ✅ VERIFIED: Real API payload confirmed - endpoint /launchpad/get-graph-data
151
158
  *
152
- * @param options Graph data options
153
- * @returns Promise<GetGraphResponse> Graph data points
159
+ * @param options Volume data options
160
+ * @returns Promise<GraphDataResult> Clean volume and price data points
154
161
  */
155
- getGraphDataByTokenName(tokenName: string, options?: {
156
- from: number;
157
- to: number;
158
- resolution: number;
159
- }): Promise<GetGraphResponse>;
162
+ fetchVolumeData(options: FetchVolumeDataOptions): Promise<GraphDataResult>;
160
163
  /**
161
164
  * Gets pools with flexible filtering options (unified method)
162
165
  *
163
166
  * @param options Filtering options including search, tokenName, type, pagination
164
- * @returns Promise<FetchPoolResponse> Filtered pools
167
+ * @returns Promise<PoolsResult> Filtered pools
165
168
  *
166
169
  * @example
167
170
  * ```typescript
@@ -178,13 +181,13 @@ export declare class LaunchpadAPI {
178
181
  * const tokenPools = await sdk.launchpad.getPools({ tokenName: 'ROCKETCH' });
179
182
  * ```
180
183
  */
181
- getPools(options?: {
184
+ fetchPools(options?: {
182
185
  search?: string;
183
186
  tokenName?: string;
184
187
  type?: 'recent' | 'popular';
185
188
  page?: number;
186
189
  limit?: number;
187
- }): Promise<FetchPoolResponse>;
190
+ }): Promise<PoolsResult>;
188
191
  /**
189
192
  * Checks if a token name is available (convenience method)
190
193
  *
@@ -206,28 +209,25 @@ export declare class LaunchpadAPI {
206
209
  * @param options Calculation options
207
210
  * @param options.amount Amount to calculate (GALA for 'native', tokens for 'exact')
208
211
  * @param options.type Calculation type: 'native' = GALA input, 'exact' = token output
209
- * @returns Promise<GetAmountResponse> Calculated amount
212
+ * @returns Promise<AmountCalculationResult> Calculated amount
210
213
  * @throws ValidationError if parameters are invalid or token not found
211
214
  *
212
215
  * @example
213
216
  * ```typescript
214
217
  * // Calculate tokens received when spending 1 GALA
215
218
  * const result = await sdk.launchpad.getBuyTokenAmount("dragnrkti", {
216
- * amount: "1000000000000000000", // 1 GALA in wei
219
+ * amount: "1", // 1 GALA
217
220
  * type: "native"
218
221
  * });
219
222
  *
220
223
  * // Calculate GALA cost for buying 100 tokens
221
224
  * const result = await sdk.launchpad.getBuyTokenAmount("dragnrkti", {
222
- * amount: "100000000000000000000", // 100 tokens in wei
225
+ * amount: "100", // 100 tokens
223
226
  * type: "exact"
224
227
  * });
225
228
  * ```
226
229
  */
227
- getBuyTokenAmount(tokenName: string, options: {
228
- amount: string;
229
- type: 'native' | 'exact';
230
- }): Promise<GetAmountResponse>;
230
+ calculateBuyAmount(options: CalculateBuyAmountOptions): Promise<AmountCalculationResult>;
231
231
  /**
232
232
  * Get sell token amount calculation with unified API (replaces getSellExactTokenAmountByTokenName/getSellWithNativeAmountByTokenName)
233
233
  *
@@ -235,28 +235,25 @@ export declare class LaunchpadAPI {
235
235
  * @param options Calculation options
236
236
  * @param options.amount Amount to calculate (tokens for 'exact', GALA for 'native')
237
237
  * @param options.type Calculation type: 'exact' = token input, 'native' = GALA output
238
- * @returns Promise<GetAmountResponse> Calculated amount
238
+ * @returns Promise<AmountCalculationResult> Calculated amount
239
239
  * @throws ValidationError if parameters are invalid or token not found
240
240
  *
241
241
  * @example
242
242
  * ```typescript
243
243
  * // Calculate GALA received when selling 50 tokens
244
244
  * const result = await sdk.launchpad.getSellTokenAmount("dragnrkti", {
245
- * amount: "50000000000000000000", // 50 tokens in wei
245
+ * amount: "50", // 50 tokens
246
246
  * type: "exact"
247
247
  * });
248
248
  *
249
249
  * // Calculate tokens needed to receive 0.5 GALA
250
250
  * const result = await sdk.launchpad.getSellTokenAmount("dragnrkti", {
251
- * amount: "500000000000000000", // 0.5 GALA in wei
251
+ * amount: "0.5", // 0.5 GALA
252
252
  * type: "native"
253
253
  * });
254
254
  * ```
255
255
  */
256
- getSellTokenAmount(tokenName: string, options: {
257
- amount: string;
258
- type: 'exact' | 'native';
259
- }): Promise<GetAmountResponse>;
256
+ calculateSellAmount(options: CalculateSellAmountOptions): Promise<AmountCalculationResult>;
260
257
  /**
261
258
  * Creates a new token sale using the bundle backend
262
259
  *
@@ -285,9 +282,9 @@ export declare class LaunchpadAPI {
285
282
  * @throws {Error} If sale creation fails due to network or signature issues
286
283
  * @since 1.0.0
287
284
  *
288
- * @example Create a sale with image upload
285
+ * @example Launch a token with image upload
289
286
  * ```typescript
290
- * const result = await sdk.launchpad.createTokenAndPool({
287
+ * const result = await sdk.launchpad.launchToken({
291
288
  * tokenName: 'mytoken',
292
289
  * tokenSymbol: 'MTK',
293
290
  * tokenDescription: 'My awesome token for trading',
@@ -297,13 +294,13 @@ export declare class LaunchpadAPI {
297
294
  * twitterUrl: 'https://twitter.com/mytoken'
298
295
  * });
299
296
  *
300
- * console.log('Sale created successfully!');
301
- * console.log('Sale ID:', result.data?.saleId);
297
+ * console.log('Token launched successfully!');
298
+ * console.log('Transaction ID:', result.data);
302
299
  * ```
303
300
  *
304
- * @example Create a sale with existing image URL
301
+ * @example Launch a token with existing image URL
305
302
  * ```typescript
306
- * const result = await sdk.launchpad.createTokenAndPool({
303
+ * const result = await sdk.launchpad.launchToken({
307
304
  * tokenName: 'simpletoken',
308
305
  * tokenSymbol: 'SIMPLE',
309
306
  * tokenDescription: 'A simple token',
@@ -313,9 +310,9 @@ export declare class LaunchpadAPI {
313
310
  * });
314
311
  * ```
315
312
  *
316
- * @example Minimal sale creation
313
+ * @example Minimal token launch
317
314
  * ```typescript
318
- * const result = await sdk.launchpad.createTokenAndPool({
315
+ * const result = await sdk.launchpad.launchToken({
319
316
  * tokenName: 'minimal',
320
317
  * tokenSymbol: 'MIN',
321
318
  * tokenDescription: 'Minimal token configuration',
@@ -324,7 +321,7 @@ export declare class LaunchpadAPI {
324
321
  * });
325
322
  * ```
326
323
  */
327
- createTokenAndPool(data: CreateSaleData): Promise<CreateSaleResponse>;
324
+ launchToken(data: LaunchTokenData): Promise<string>;
328
325
  /**
329
326
  * Get token distribution showing top holders
330
327
  *
@@ -340,7 +337,7 @@ export declare class LaunchpadAPI {
340
337
  * console.log('Top holders:', distribution.data?.holders);
341
338
  * ```
342
339
  */
343
- getTokenDistributionByTokenName(tokenName: string): Promise<GetTokenDistributionResponse>;
340
+ fetchTokenDistribution(tokenName: string): Promise<TokenDistributionResult>;
344
341
  /**
345
342
  * Gets badge achievements for a token
346
343
  *
@@ -350,7 +347,7 @@ export declare class LaunchpadAPI {
350
347
  * **Note**: This endpoint does not require authentication.
351
348
  *
352
349
  * @param tokenName The name of the token to get badges for
353
- * @returns Promise<GetTokenBadgesResponse> Badge information
350
+ * @returns Promise<TokenBadgesResult> Badge information
354
351
  *
355
352
  * @example
356
353
  * ```typescript
@@ -359,7 +356,7 @@ export declare class LaunchpadAPI {
359
356
  * console.log('Engagement badges:', badges.data?.engagementBadge);
360
357
  * ```
361
358
  */
362
- getTokenBadgesByTokenName(tokenName: string): Promise<GetTokenBadgesResponse>;
359
+ fetchTokenBadges(tokenName: string): Promise<TokenBadgesResult>;
363
360
  /**
364
361
  * Convenience method to check if a token has achieved a specific badge
365
362
  *
@@ -374,30 +371,30 @@ export declare class LaunchpadAPI {
374
371
  * const hasCrowdEngagement = await launchpad.hasTokenBadgeByTokenName('mytoken', 'engagement', 'CROWD');
375
372
  * ```
376
373
  */
377
- hasTokenBadgeByTokenName(tokenName: string, badgeType: 'volume' | 'engagement', badgeName: string): Promise<boolean>;
374
+ hasTokenBadgeByTokenName(options: HasTokenBadgeOptions): Promise<boolean>;
378
375
  /**
379
- * Calculates pre-mint token amounts using CallMemeTokenOut
376
+ * Calculates pre-mint token amounts using bonding curve calculations
380
377
  *
381
378
  * This method calculates how many tokens a user will receive for a given
382
- * amount of GALA during the token launch phase. Used when the initial buy
383
- * amount is greater than 0 in the launch form.
379
+ * amount of GALA during the token launch phase. Uses standard bonding curve
380
+ * math for consistent results with the rest of the trading system.
384
381
  *
385
- * **Note**: This endpoint does not require authentication and uses a fixed
386
- * vault address for pre-mint calculations.
382
+ * **Implementation Note**: Falls back to mathematical calculation since the
383
+ * original CallMemeTokenOut endpoint is not available on the backend.
387
384
  *
388
385
  * @param data Pre-mint calculation data
389
386
  * @returns Promise resolving to calculated token amounts and fees
390
387
  *
391
388
  * @example
392
389
  * ```typescript
393
- * const result = await launchpad.calculatePreMintTokens({
390
+ * const result = await launchpad.calculateInitialBuyAmount({
394
391
  * nativeTokenQuantity: '100' // 100 GALA
395
392
  * });
396
- * console.log('Tokens to receive:', result.Data.calculatedQuantity);
397
- * console.log('Fees:', result.Data.extraFees);
393
+ * console.log('Tokens to receive:', result.amount);
394
+ * console.log('Transaction fee:', result.transactionFee);
398
395
  * ```
399
396
  */
400
- getInitialBuyAmount(data: CalculatePreMintData): Promise<CalculatePreMintResponse>;
397
+ calculateInitialBuyAmount(data: CalculatePreMintData): Promise<AmountCalculationResult>;
401
398
  /**
402
399
  * Gets the authenticated user's address in backend format
403
400
  *
@@ -426,15 +423,56 @@ export declare class LaunchpadAPI {
426
423
  */
427
424
  validatePagination(options: FetchPoolOptions): void;
428
425
  /**
429
- * Resolves a token name to its vault address using cached resolution
426
+ * Fetch current USD spot prices for one or more DEX token symbols
430
427
  *
431
- * Uses the shared VaultCache for intelligent caching to eliminate
432
- * redundant API calls for the same tokenName.
428
+ * Uses the DEX API to retrieve current pricing information for tokens.
429
+ * Supports both single symbol and multiple symbol requests with comma-separated format.
433
430
  *
434
- * @private
435
- * @param tokenName Token name to resolve (e.g., 'dragnrkti', 'rocketri')
436
- * @returns Promise<string | null> Vault address if found, null otherwise
431
+ * @param symbols Single symbol string or array of symbols (e.g., 'GALA', ['GALA', 'SILK'])
432
+ * @returns Promise<TokenSpotPrice[]> Array of simplified token spot prices
433
+ *
434
+ * @example Single token price
435
+ * ```typescript
436
+ * const prices = await launchpadAPI.fetchTokenSpotPrice('GALA');
437
+ * console.log(prices[0].price); // 0.01463269
438
+ * console.log(prices[0].symbol); // 'GALA'
439
+ * ```
440
+ *
441
+ * @example Multiple token prices
442
+ * ```typescript
443
+ * const prices = await launchpadAPI.fetchTokenSpotPrice(['GALA', 'SILK', 'MUSIC']);
444
+ * prices.forEach(price => {
445
+ * console.log(`${price.symbol}: $${price.price}`);
446
+ * });
447
+ * ```
448
+ *
449
+ * @throws Error if DEX API client not configured
450
+ * @throws Error if no valid symbols provided
451
+ * @throws Error if API request fails
452
+ */
453
+ fetchTokenSpotPrice(symbols: string | string[]): Promise<TokenSpotPrice[]>;
454
+ /**
455
+ * Calculate spot price for a launchpad token in USD
456
+ *
457
+ * Calculates the USD price of a launchpad token by:
458
+ * 1. Determining how many tokens you get for 1 GALA using calculateBuyAmount
459
+ * 2. Getting the current GALA price in USD
460
+ * 3. Computing: GALA_price_USD / tokens_per_GALA
461
+ *
462
+ * @param tokenName Token name (e.g., 'dragnrkti', 'rocketri', 'unicornri')
463
+ * @returns Promise<TokenSpotPrice> Spot price with symbol and USD price
464
+ *
465
+ * @example
466
+ * ```typescript
467
+ * const price = await launchpadAPI.fetchLaunchpadTokenSpotPrice('dragnrkti');
468
+ * console.log(`${price.symbol}: $${price.price.toFixed(6)}`);
469
+ * // Output: DRAGNRKTI: $0.000123
470
+ * ```
471
+ *
472
+ * @throws Error if token not found
473
+ * @throws Error if price calculation fails
474
+ * @throws Error if GALA price unavailable
437
475
  */
438
- private resolveTokenNameToVault;
476
+ fetchLaunchpadTokenSpotPrice(tokenName: string): Promise<TokenSpotPrice>;
439
477
  }
440
478
  //# sourceMappingURL=LaunchpadAPI.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"LaunchpadAPI.d.ts","sourceRoot":"","sources":["../../../src/api/Launchpad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B,OAAO,CAAC,OAAO,CAAC;IAkBnB;;;;;;;;;;;;;;;;;;;;;OAqBG;IACG,yBAAyB,CAC7B,IAAI,EAAE,oBAAoB,GACzB,OAAO,CAAC,uBAAuB,CAAC;IA+DnC;;;;OAIG;IACH,UAAU,IAAI,MAAM;IAIpB;;;;;OAKG;IACH,uBAAuB,CAAC,eAAe,EAAE,MAAM,GAAG,MAAM;IAIxD;;;;;OAKG;IACH,iBAAiB,CAAC,SAAS,EAAE,MAAM,GAAG,IAAI;IAI1C;;;;;OAKG;IACH,kBAAkB,CAAC,OAAO,EAAE,gBAAgB,GAAG,IAAI;IAQnD;;;;;;;;;;;;;;;;;;;;;;;;;;;OA2BG;IACG,mBAAmB,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,EAAE,GAAG,OAAO,CAAC,cAAc,EAAE,CAAC;IA4ChF;;;;;;;;;;;;;;;;;;;;;OAqBG;IACG,4BAA4B,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,cAAc,CAAC;CA6C/E"}
@@ -65,10 +65,10 @@ export declare class BuyNativeDto extends ChainCallDTO {
65
65
  export declare class BuyExactDto extends ChainCallDTO {
66
66
  readonly vaultAddress: string;
67
67
  readonly tokenQuantity: string;
68
- readonly expectedGala: string;
68
+ readonly expectedNativeToken: string;
69
69
  readonly extraFees: IExtraFeesDTO;
70
70
  uniqueKey?: string;
71
- constructor(vaultAddress: string, tokenQuantity: string, expectedGala: string, extraFees?: IExtraFeesDTO);
71
+ constructor(vaultAddress: string, tokenQuantity: string, expectedNativeToken: string, extraFees?: IExtraFeesDTO);
72
72
  }
73
73
  /**
74
74
  * DTO for selling exact amount of tokens
@@ -79,6 +79,7 @@ export declare class BuyExactDto extends ChainCallDTO {
79
79
  * const dto = new SellExactDto(
80
80
  * 'service|Token$Unit$ANIME$eth:1234567890$launchpad',
81
81
  * '25.0',
82
+ * '9.5', // Expected minimum GALA to receive (for slippage protection)
82
83
  * { maxAcceptableReverseBondingCurveFee: '0.05' }
83
84
  * );
84
85
  * ```
@@ -86,9 +87,10 @@ export declare class BuyExactDto extends ChainCallDTO {
86
87
  export declare class SellExactDto extends ChainCallDTO {
87
88
  readonly vaultAddress: string;
88
89
  readonly tokenQuantity: string;
90
+ readonly expectedNativeToken: string;
89
91
  readonly extraFees: IExtraFeesDTO;
90
92
  uniqueKey?: string;
91
- constructor(vaultAddress: string, tokenQuantity: string, extraFees?: IExtraFeesDTO);
93
+ constructor(vaultAddress: string, tokenQuantity: string, expectedNativeToken?: string, extraFees?: IExtraFeesDTO);
92
94
  }
93
95
  /**
94
96
  * DTO for selling tokens to receive exact native (GALA) amount
@@ -105,9 +107,10 @@ export declare class SellExactDto extends ChainCallDTO {
105
107
  export declare class SellNativeDto extends ChainCallDTO {
106
108
  readonly vaultAddress: string;
107
109
  readonly nativeTokenQuantity: string;
108
- readonly expectedTokens: string;
110
+ readonly expectedToken: string;
111
+ readonly extraFees: IExtraFeesDTO;
109
112
  uniqueKey?: string;
110
- constructor(vaultAddress: string, nativeTokenQuantity: string, expectedTokens: string);
113
+ constructor(vaultAddress: string, nativeTokenQuantity: string, expectedToken: string, extraFees?: IExtraFeesDTO);
111
114
  }
112
115
  /**
113
116
  * Namespace export for convenient access to all bonding curve DTOs
@@ -0,0 +1 @@
1
+ {"version":3,"file":"BondingCurveDTOs.d.ts","sourceRoot":"","sources":["../../../../src/api/dto/BondingCurveDTOs.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAEH,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAGnD;;GAEG;AACH,MAAM,WAAW,aAAa;IAC5B,mCAAmC,EAAE,MAAM,CAAC;CAC7C;AAED;;;;;;;;;;;;GAYG;AACH,qBAAa,YAAa,SAAQ,YAAY;IAC5C,SAAgB,YAAY,EAAE,MAAM,CAAC;IACrC,SAAgB,mBAAmB,EAAE,MAAM,CAAC;IAC5C,SAAgB,aAAa,EAAE,MAAM,CAAC;IACtC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,aAA4D;CAY1E;AAED;;GAEG;AACH,eAAO,MAAM,gBAAgB;;;;;CAKnB,CAAC;AAEX;;GAEG;AACH,MAAM,MAAM,kBAAkB,GAAG;IAC/B,YAAY,EAAE,MAAM,CAAC;IACrB,mBAAmB,EAAE,MAAM,CAAC;CAC7B,CAAC;AAEF,MAAM,MAAM,iBAAiB,GAAG;IAC9B,YAAY,EAAE,MAAM,CAAC;IACrB,aAAa,EAAE,MAAM,CAAC;IACtB,SAAS,CAAC,EAAE,aAAa,CAAC;CAC3B,CAAC;AAEF,MAAM,MAAM,kBAAkB,GAAG;IAC/B,YAAY,EAAE,MAAM,CAAC;IACrB,aAAa,EAAE,MAAM,CAAC;IACtB,SAAS,CAAC,EAAE,aAAa,CAAC;CAC3B,CAAC;AAEF,MAAM,MAAM,mBAAmB,GAAG;IAChC,YAAY,EAAE,MAAM,CAAC;IACrB,mBAAmB,EAAE,MAAM,CAAC;CAC7B,CAAC"}
@@ -0,0 +1,76 @@
1
+ import { ChainCallDTO } from '@gala-chain/connect';
2
+ import { TokenClassKey } from '@gala-chain/api';
3
+ import { SignedPayload } from '../../utils/SignatureHelper';
4
+ /**
5
+ * DTO for transferring tokens on GalaChain with EIP-712 signature support
6
+ * Extends ChainCallDTO for proper blockchain transaction handling
7
+ */
8
+ export declare class TransferTokenDto extends ChainCallDTO {
9
+ readonly from: string;
10
+ readonly to: string;
11
+ readonly quantity: string;
12
+ readonly tokenInstance: {
13
+ collection: string;
14
+ category: string;
15
+ type: string;
16
+ additionalKey: string;
17
+ instance: string;
18
+ };
19
+ readonly uniqueKey: string;
20
+ readonly signature?: string;
21
+ readonly domain?: {
22
+ name: string;
23
+ chainId?: number;
24
+ verifyingContract?: string;
25
+ version?: string;
26
+ };
27
+ readonly types?: Record<string, Array<{
28
+ name: string;
29
+ type: string;
30
+ }>>;
31
+ readonly signerPublicKey?: string;
32
+ readonly prefix?: string;
33
+ constructor(data: {
34
+ from: string;
35
+ to: string;
36
+ quantity: string;
37
+ tokenInstance: {
38
+ collection: string;
39
+ category: string;
40
+ type: string;
41
+ additionalKey: string;
42
+ instance: string;
43
+ };
44
+ uniqueKey: string;
45
+ signedPayload?: SignedPayload;
46
+ });
47
+ /**
48
+ * Create TransferTokenDto from token class key components
49
+ */
50
+ static fromTokenClassKey(from: string, to: string, quantity: string, tokenClassKey: TokenClassKey | string, uniqueKey?: string): TransferTokenDto;
51
+ /**
52
+ * Create TransferTokenDto for GALA transfers
53
+ */
54
+ static forGALA(from: string, to: string, quantity: string, uniqueKey?: string): TransferTokenDto;
55
+ /**
56
+ * Get the token class key string representation
57
+ */
58
+ getTokenClassKey(): string;
59
+ /**
60
+ * Convert to the payload format expected for signing
61
+ */
62
+ toSigningPayload(): {
63
+ from: string;
64
+ to: string;
65
+ quantity: string;
66
+ tokenInstance: {
67
+ collection: string;
68
+ category: string;
69
+ type: string;
70
+ additionalKey: string;
71
+ instance: string;
72
+ };
73
+ uniqueKey: string;
74
+ };
75
+ }
76
+ //# sourceMappingURL=TransferTokenDto.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TransferTokenDto.d.ts","sourceRoot":"","sources":["../../../../src/api/dto/TransferTokenDto.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AACnD,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAE5D;;;GAGG;AACH,qBAAa,gBAAiB,SAAQ,YAAY;IAChD,SAAgB,IAAI,EAAE,MAAM,CAAC;IAC7B,SAAgB,EAAE,EAAE,MAAM,CAAC;IAC3B,SAAgB,QAAQ,EAAE,MAAM,CAAC;IACjC,SAAgB,aAAa,EAAE;QAC7B,UAAU,EAAE,MAAM,CAAC;QACnB,QAAQ,EAAE,MAAM,CAAC;QACjB,IAAI,EAAE,MAAM,CAAC;QACb,aAAa,EAAE,MAAM,CAAC;QACtB,QAAQ,EAAE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O,CAAC,MAAM,CAAC;IAc3E;;;;;;;;;;;;;;;;;OAiBG;IACG,uBAAuB,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,eAAe,CAAC;IAmCxE;;OAEG;IACH,OAAO,CAAC,cAAc;CAuBvB"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/auth/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAEhC;;GAEG;AACH,MAAM,WAAW,UAAU;IACzB,kDAAkD;IAClD,MAAM,EAAE,MAAM,CAAC;IACf,+EAA+E;IAC/E,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAED;;GAEG;AACH,MAAM,WAAW,eAAe;IAC9B,kCAAkC;IAClC,OAAO,EAAE,MAAM,CAAC;IAChB,8CAA8C;IAC9C,SAAS,EAAE,MAAM,CAAC;IAClB,kEAAkE;IAClE,OAAO,EAAE,MAAM,CAAC;IAChB,+CAA+C;IAC/C,SAAS,EAAE,MAAM,CAAC;CACnB;AAED;;GAEG;AACH,oBAAY,aAAa;IACvB,oBAAoB,yBAAyB;IAC7C,gBAAgB,qBAAqB;IACrC,eAAe,oBAAoB;IACnC,yBAAyB,8BAA8B;CACxD;AAED;;GAEG;AACH,qBAAa,SAAU,SAAQ,KAAK;aAEhB,IAAI,EAAE,aAAa;aAEnB,aAAa,CAAC,EAAE,KAAK;gBAFrB,IAAI,EAAE,aAAa,EACnC,OAAO,EAAE,MAAM,EACC,aAAa,CAAC,EAAE,KAAK,YAAA;CAKxC"}
@@ -0,0 +1,45 @@
1
+ /**
2
+ * Environment configuration for the Launchpad SDK
3
+ *
4
+ * Provides pre-configured URL sets for different environments to simplify SDK initialization.
5
+ */
6
+ /**
7
+ * Available environment types
8
+ */
9
+ export type Environment = 'PROD' | 'STAGE';
10
+ /**
11
+ * URL configuration for each environment
12
+ */
13
+ export interface EnvironmentConfig {
14
+ /** Main Launchpad API URL */
15
+ launchpadBaseUrl: string;
16
+ /** GalaChain Gateway URL */
17
+ galaChainBaseUrl: string;
18
+ /** Bundle service URL for transactions */
19
+ bundleBaseUrl: string;
20
+ /** WebSocket URL for transaction monitoring */
21
+ webSocketUrl: string;
22
+ /** DEX API URL for launchpad token balances */
23
+ dexApiBaseUrl: string;
24
+ }
25
+ /**
26
+ * Pre-configured URL sets for each environment
27
+ *
28
+ * These configurations are automatically applied when using the `env` parameter
29
+ * in SDK initialization, eliminating the need to manually specify all URLs.
30
+ */
31
+ export declare const ENVIRONMENT_URLS: Record<Environment, EnvironmentConfig>;
32
+ /**
33
+ * Gets the URL configuration for a specific environment
34
+ *
35
+ * @param env The environment to get configuration for
36
+ * @returns Complete URL configuration for the environment
37
+ *
38
+ * @example
39
+ * ```typescript
40
+ * const config = getEnvironmentConfig('PROD');
41
+ * console.log(config.launchpadBaseUrl); // 'https://lpad-backend-prod1.defi.gala.com'
42
+ * ```
43
+ */
44
+ export declare function getEnvironmentConfig(env: Environment): EnvironmentConfig;
45
+ //# sourceMappingURL=environments.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"environments.d.ts","sourceRoot":"","sources":["../../../src/config/environments.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH;;GAEG;AACH,MAAM,MAAM,WAAW,GAAG,MAAM,GAAG,OAAO,CAAC;AAE3C;;GAEG;AACH,MAAM,WAAW,iBAAiB;IAChC,6BAA6B;IAC7B,gBAAgB,EAAE,MAAM,CAAC;IACzB,4BAA4B;IAC5B,gBAAgB,EAAE,MAAM,CAAC;IACzB,0CAA0C;IAC1C,aAAa,EAAE,MAAM,CAAC;IACtB,+CAA+C;IAC/C,YAAY,EAAE,MAAM,CAAC;IACrB,+CAA+C;IAC/C,aAAa,EAAE,MAAM,CAAC;CACvB;AAED;;;;;GAKG;AACH,eAAO,MAAM,gBAAgB,EAAE,MAAM,CAAC,WAAW,EAAE,iBAAiB,CAgBnE,CAAC;AAEF;;;;;;;;;;;GAWG;AACH,wBAAgB,oBAAoB,CAAC,GAAG,EAAE,WAAW,GAAG,iBAAiB,CAExE"}