@gala-chain/launchpad-sdk 3.27.3 → 3.28.0
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 +12 -0
- package/README.md +149 -0
- package/dist/LaunchpadSDK.d.ts +100 -0
- package/dist/LaunchpadSDK.d.ts.map +1 -1
- package/dist/constants/pagination.d.ts +56 -0
- package/dist/constants/pagination.d.ts.map +1 -0
- package/dist/constants/query-fields.d.ts +51 -0
- package/dist/constants/query-fields.d.ts.map +1 -0
- package/dist/constants/version.generated.d.ts +1 -1
- package/dist/index.cjs.js +1 -1
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.esm.js +1 -1
- package/dist/index.js +1 -1
- package/dist/services/BaseService.d.ts +40 -0
- package/dist/services/BaseService.d.ts.map +1 -0
- package/dist/services/BundleService.d.ts +2 -3
- package/dist/services/BundleService.d.ts.map +1 -1
- package/dist/services/CommentService.d.ts +2 -3
- package/dist/services/CommentService.d.ts.map +1 -1
- package/dist/services/DexPoolService.d.ts +95 -0
- package/dist/services/DexPoolService.d.ts.map +1 -0
- package/dist/services/DexService.d.ts.map +1 -1
- package/dist/services/FaucetService.d.ts +2 -3
- package/dist/services/FaucetService.d.ts.map +1 -1
- package/dist/services/GalaChainService.d.ts +2 -3
- package/dist/services/GalaChainService.d.ts.map +1 -1
- package/dist/services/ImageService.d.ts +2 -3
- package/dist/services/ImageService.d.ts.map +1 -1
- package/dist/services/PoolService.d.ts +2 -3
- package/dist/services/PoolService.d.ts.map +1 -1
- package/dist/services/PriceHistoryService.d.ts.map +1 -1
- package/dist/services/TradeService.d.ts +2 -3
- package/dist/services/TradeService.d.ts.map +1 -1
- package/dist/services/UserService.d.ts +3 -3
- package/dist/services/UserService.d.ts.map +1 -1
- package/dist/types/dex-pool.dto.d.ts +174 -0
- package/dist/types/dex-pool.dto.d.ts.map +1 -0
- package/package.json +4 -2
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Base Service
|
|
3
|
+
*
|
|
4
|
+
* Abstract base class for all SDK services providing standardized Logger initialization
|
|
5
|
+
* and common service functionality.
|
|
6
|
+
*
|
|
7
|
+
* @category Services
|
|
8
|
+
* @since 3.23.0
|
|
9
|
+
*/
|
|
10
|
+
import { HttpClient } from '../utils/http';
|
|
11
|
+
import { Logger } from '../utils/Logger';
|
|
12
|
+
/**
|
|
13
|
+
* Abstract base class for SDK services
|
|
14
|
+
*
|
|
15
|
+
* Provides:
|
|
16
|
+
* - Standardized logger initialization with automatic context naming
|
|
17
|
+
* - HttpClient access for all services
|
|
18
|
+
* - Common initialization pattern across 18+ services
|
|
19
|
+
*
|
|
20
|
+
* @example
|
|
21
|
+
* ```typescript
|
|
22
|
+
* export class MyService extends BaseService {
|
|
23
|
+
* constructor(http: HttpClient, debugMode: boolean = false) {
|
|
24
|
+
* super(http, debugMode);
|
|
25
|
+
* // Service-specific initialization
|
|
26
|
+
* }
|
|
27
|
+
*
|
|
28
|
+
* myMethod() {
|
|
29
|
+
* // Logger is automatically available as this.logger
|
|
30
|
+
* this.logger.debug('Operation started');
|
|
31
|
+
* }
|
|
32
|
+
* }
|
|
33
|
+
* ```
|
|
34
|
+
*/
|
|
35
|
+
export declare abstract class BaseService {
|
|
36
|
+
protected readonly http: HttpClient;
|
|
37
|
+
protected readonly logger: Logger;
|
|
38
|
+
constructor(http: HttpClient, debugMode?: boolean);
|
|
39
|
+
}
|
|
40
|
+
//# sourceMappingURL=BaseService.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BaseService.d.ts","sourceRoot":"","sources":["../../src/services/BaseService.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AAEzC;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,8BAAsB,WAAW;IAGnB,SAAS,CAAC,QAAQ,CAAC,IAAI,EAAE,UAAU;IAF/C,SAAS,CAAC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;gBAEH,IAAI,EAAE,UAAU,EAAE,SAAS,GAAE,OAAe;CAO5E"}
|
|
@@ -29,6 +29,7 @@ import { HttpClient } from '../utils/http';
|
|
|
29
29
|
import type { ApiResponse } from '../types/common';
|
|
30
30
|
import { TokenResolverService } from './TokenResolverService';
|
|
31
31
|
import { BuyTokenOptions, SellTokenOptions } from '../types/options.dto';
|
|
32
|
+
import { BaseService } from './BaseService';
|
|
32
33
|
import { EIP712Domain, EIP712Types } from '../types/trade.dto';
|
|
33
34
|
/**
|
|
34
35
|
* Signed DTO structure with EIP-712 signature
|
|
@@ -53,15 +54,13 @@ export interface BundleTransactionData {
|
|
|
53
54
|
/**
|
|
54
55
|
* Service for handling bundle transaction submission and trading operations
|
|
55
56
|
*/
|
|
56
|
-
export declare class BundleService {
|
|
57
|
-
private httpClient;
|
|
57
|
+
export declare class BundleService extends BaseService {
|
|
58
58
|
private tokenResolver;
|
|
59
59
|
private walletProvider?;
|
|
60
60
|
private userAddress?;
|
|
61
61
|
private defaultSlippageToleranceFactor;
|
|
62
62
|
private defaultMaxAcceptableReverseBondingCurveFeeSlippageFactor;
|
|
63
63
|
private readonly bundleEndpoint;
|
|
64
|
-
private readonly logger;
|
|
65
64
|
private signatureService?;
|
|
66
65
|
private tokenKeyService?;
|
|
67
66
|
constructor(httpClient: HttpClient, tokenResolver: TokenResolverService, debugMode?: boolean, walletProvider?: unknown | undefined, userAddress?: string | undefined, defaultSlippageToleranceFactor?: number, defaultMaxAcceptableReverseBondingCurveFeeSlippageFactor?: number);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BundleService.d.ts","sourceRoot":"","sources":["../../src/services/BundleService.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AAEH,OAAO,EAAE,UAAU,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CAKtC"}
|
|
@@ -7,6 +7,7 @@
|
|
|
7
7
|
* @since 3.6.0
|
|
8
8
|
*/
|
|
9
9
|
import { HttpClient } from '../utils/http';
|
|
10
|
+
import { BaseService } from './BaseService';
|
|
10
11
|
import { CommentsResult } from '../types/comment.dto';
|
|
11
12
|
import { FetchCommentsOptions, PostCommentOptions } from '../types/options.dto';
|
|
12
13
|
import { PoolService } from './PoolService';
|
|
@@ -31,10 +32,8 @@ import { PoolService } from './PoolService';
|
|
|
31
32
|
* });
|
|
32
33
|
* ```
|
|
33
34
|
*/
|
|
34
|
-
export declare class CommentService {
|
|
35
|
-
private readonly http;
|
|
35
|
+
export declare class CommentService extends BaseService {
|
|
36
36
|
private readonly poolService;
|
|
37
|
-
private readonly logger;
|
|
38
37
|
constructor(http: HttpClient, poolService: PoolService, debugMode?: boolean);
|
|
39
38
|
/**
|
|
40
39
|
* Fetches comments for a token by its tokenName
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CommentService.d.ts","sourceRoot":"","sources":["../../src/services/CommentService.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"CommentService.d.ts","sourceRoot":"","sources":["../../src/services/CommentService.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAS3C,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAE5C,OAAO,EAEL,cAAc,EAKf,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EACL,oBAAoB,EACpB,kBAAkB,EAGnB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAE5C;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,qBAAa,cAAe,SAAQ,WAAW;IAG3C,OAAO,CAAC,QAAQ,CAAC,WAAW;gBAD5B,IAAI,EAAE,UAAU,EACC,WAAW,EAAE,WAAW,EACzC,SAAS,GAAE,OAAe;IAK5B;;;;;;;;;;OAUG;IACG,aAAa,CAAC,OAAO,EAAE,oBAAoB,GAAG,OAAO,CAAC,cAAc,CAAC;IA0D3E;;;;;;;;;;OAUG;IACG,WAAW,CAAC,OAAO,EAAE,kBAAkB,GAAG,OAAO,CAAC,IAAI,CAAC;CAwD9D"}
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* DEX Pool Discovery Service
|
|
3
|
+
*
|
|
4
|
+
* Service for querying and exploring GalaSwap DEX liquidity pools
|
|
5
|
+
* with pagination, filtering, and sorting capabilities.
|
|
6
|
+
*
|
|
7
|
+
* @packageDocumentation
|
|
8
|
+
*/
|
|
9
|
+
import { BaseService } from './BaseService';
|
|
10
|
+
import type { HttpClient } from '../utils/http';
|
|
11
|
+
import type { DexPoolsResult, FetchDexPoolsOptions } from '../types/dex-pool.dto';
|
|
12
|
+
/**
|
|
13
|
+
* Service for fetching and exploring DEX pools on GalaSwap
|
|
14
|
+
*
|
|
15
|
+
* Handles pagination, filtering, and sorting of liquidity pools
|
|
16
|
+
* across all graduated tokens and base tokens.
|
|
17
|
+
*
|
|
18
|
+
* @category GSwap
|
|
19
|
+
* @since 3.28.0
|
|
20
|
+
*/
|
|
21
|
+
export declare class DexPoolService extends BaseService {
|
|
22
|
+
/** Base URL for DEX backend API */
|
|
23
|
+
private readonly dexBackendBaseUrl;
|
|
24
|
+
/**
|
|
25
|
+
* Create a new DexPoolService instance
|
|
26
|
+
*
|
|
27
|
+
* @param http HttpClient for making API requests
|
|
28
|
+
* @param dexBackendBaseUrl Base URL for DEX backend API
|
|
29
|
+
* @param debugMode Enable debug logging
|
|
30
|
+
*/
|
|
31
|
+
constructor(http: HttpClient, dexBackendBaseUrl: string, debugMode?: boolean);
|
|
32
|
+
/**
|
|
33
|
+
* Fetch DEX pools with pagination and filtering
|
|
34
|
+
*
|
|
35
|
+
* Queries the DEX backend for available liquidity pools with support for:
|
|
36
|
+
* - Pagination (max 20 per page)
|
|
37
|
+
* - Sorting by TVL, 30-day volume, or 1-day volume
|
|
38
|
+
* - Search filtering by token symbols
|
|
39
|
+
*
|
|
40
|
+
* @param options Fetch options (all optional)
|
|
41
|
+
* @returns Promise resolving to paginated pool results
|
|
42
|
+
*
|
|
43
|
+
* @throws {Error} If HTTP request fails
|
|
44
|
+
* @throws {ValidationError} If sort options are invalid
|
|
45
|
+
*
|
|
46
|
+
* @example
|
|
47
|
+
* ```typescript
|
|
48
|
+
* // Fetch top 10 pools by volume
|
|
49
|
+
* const result = await dexPoolService.fetchDexPools({
|
|
50
|
+
* sortBy: 'volume1d',
|
|
51
|
+
* sortOrder: 'desc',
|
|
52
|
+
* limit: 10,
|
|
53
|
+
* page: 1
|
|
54
|
+
* });
|
|
55
|
+
*
|
|
56
|
+
* console.log(`Found ${result.total} total pools`);
|
|
57
|
+
* console.log(`Showing page ${result.page} of ${result.totalPages}`);
|
|
58
|
+
* ```
|
|
59
|
+
*
|
|
60
|
+
* @since 3.28.0
|
|
61
|
+
*/
|
|
62
|
+
fetchDexPools(options?: FetchDexPoolsOptions): Promise<DexPoolsResult>;
|
|
63
|
+
/**
|
|
64
|
+
* Fetch ALL DEX pools with automatic pagination
|
|
65
|
+
*
|
|
66
|
+
* Convenience method that automatically handles pagination to retrieve
|
|
67
|
+
* all available DEX pools. Uses maximum page size (20) for efficiency.
|
|
68
|
+
*
|
|
69
|
+
* This is useful when you need complete pool data regardless of result size.
|
|
70
|
+
* For large result sets, consider using fetchDexPools() with explicit pagination.
|
|
71
|
+
*
|
|
72
|
+
* @param options Fetch options (no pagination fields)
|
|
73
|
+
* @returns Promise resolving to all pools with flattened pagination
|
|
74
|
+
*
|
|
75
|
+
* @example
|
|
76
|
+
* ```typescript
|
|
77
|
+
* // Fetch all pools sorted by TVL
|
|
78
|
+
* const allPools = await dexPoolService.fetchAllDexPools({
|
|
79
|
+
* sortBy: 'tvl',
|
|
80
|
+
* sortOrder: 'desc'
|
|
81
|
+
* });
|
|
82
|
+
*
|
|
83
|
+
* console.log(`Total pools: ${allPools.total}`);
|
|
84
|
+
*
|
|
85
|
+
* // Find top GALA pools
|
|
86
|
+
* const galaPools = allPools.pools
|
|
87
|
+
* .filter(p => p.poolName.includes('GALA'))
|
|
88
|
+
* .slice(0, 10);
|
|
89
|
+
* ```
|
|
90
|
+
*
|
|
91
|
+
* @since 3.28.0
|
|
92
|
+
*/
|
|
93
|
+
fetchAllDexPools(options?: Omit<FetchDexPoolsOptions, 'page' | 'limit'>): Promise<DexPoolsResult>;
|
|
94
|
+
}
|
|
95
|
+
//# sourceMappingURL=DexPoolService.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DexPoolService.d.ts","sourceRoot":"","sources":["../../src/services/DexPoolService.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAChD,OAAO,KAAK,EACV,cAAc,EACd,oBAAoB,EACrB,MAAM,uBAAuB,CAAC;AAG/B;;;;;;;;GAQG;AACH,qBAAa,cAAe,SAAQ,WAAW;IAC7C,mCAAmC;IACnC,OAAO,CAAC,QAAQ,CAAC,iBAAiB,CAAS;IAE3C;;;;;;OAMG;gBAED,IAAI,EAAE,UAAU,EAChB,iBAAiB,EAAE,MAAM,EACzB,SAAS,GAAE,OAAe;IAM5B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA6BG;IACG,aAAa,CAAC,OAAO,GAAE,oBAAyB,GAAG,OAAO,CAAC,cAAc,CAAC;IAoEhF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA6BG;IACG,gBAAgB,CACpB,OAAO,GAAE,IAAI,CAAC,oBAAoB,EAAE,MAAM,GAAG,OAAO,CAAM,GACzD,OAAO,CAAC,cAAc,CAAC;CAuC3B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DexService.d.ts","sourceRoot":"","sources":["../../src/services/DexService.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAE3C,OAAO,EACL,cAAc,EACd,qBAAqB,EACtB,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAAE,yBAAyB,EAAE,yBAAyB,EAAE,MAAM,sBAAsB,CAAC;AAC5F,OAAO,EAAE,uBAAuB,EAAE,MAAM,wBAAwB,CAAC;
|
|
1
|
+
{"version":3,"file":"DexService.d.ts","sourceRoot":"","sources":["../../src/services/DexService.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAE3C,OAAO,EACL,cAAc,EACd,qBAAqB,EACtB,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAAE,yBAAyB,EAAE,yBAAyB,EAAE,MAAM,sBAAsB,CAAC;AAC5F,OAAO,EAAE,uBAAuB,EAAE,MAAM,wBAAwB,CAAC;AAWjE,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC1D,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAC;AAE/C;;;;;;;;;;;;;;;GAeG;AACH,qBAAa,UAAU;IAInB,OAAO,CAAC,QAAQ,CAAC,cAAc,CAAC;IAChC,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAC;IACvB,OAAO,CAAC,QAAQ,CAAC,gBAAgB,CAAC;IALpC,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAS;gBAGb,cAAc,CAAC,EAAE,UAAU,YAAA,EAC3B,KAAK,CAAC,EAAE,kBAAkB,YAAA,EAC1B,gBAAgB,CAAC,EAAE,gBAAgB,YAAA,EACpD,SAAS,GAAE,OAAe;IAK5B;;;;;;;;;;;;;;;;;;;;;;;OAuBG;IACG,eAAe,CAAC,MAAM,EAAE,yBAAyB,GAAG,OAAO,CAAC,cAAc,CAAC;IAkCjF;;;;;;;;;;;OAWG;YACW,uBAAuB;IAqGrC;;;;;;;OAOG;IACG,4BAA4B,CAChC,SAAS,EAAE,MAAM,EACjB,kBAAkB,EAAE,CAAC,OAAO,EAAE,yBAAyB,KAAK,OAAO,CAAC,uBAAuB,CAAC,EAC5F,gBAAgB,CAAC,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,OAAO,CAAC,GAAG,CAAC,GACrD,OAAO,CAAC,cAAc,CAAC;IA2E1B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAuCG;IACG,iBAAiB,CAAC,OAAO,EAAE,OAAO,GAAG,OAAO,CAAC,qBAAqB,CAAC;CAiD1E"}
|
|
@@ -7,6 +7,7 @@
|
|
|
7
7
|
* @since 3.6.0
|
|
8
8
|
*/
|
|
9
9
|
import { HttpClient } from '../utils/http';
|
|
10
|
+
import { BaseService } from './BaseService';
|
|
10
11
|
import { TransferFaucetsData } from '../types/user.dto';
|
|
11
12
|
/**
|
|
12
13
|
* Faucet Service Class
|
|
@@ -25,9 +26,7 @@ import { TransferFaucetsData } from '../types/user.dto';
|
|
|
25
26
|
* });
|
|
26
27
|
* ```
|
|
27
28
|
*/
|
|
28
|
-
export declare class FaucetService {
|
|
29
|
-
private readonly http;
|
|
30
|
-
private readonly logger;
|
|
29
|
+
export declare class FaucetService extends BaseService {
|
|
31
30
|
constructor(http: HttpClient, debugMode?: boolean);
|
|
32
31
|
/**
|
|
33
32
|
* Transfers faucets to a user address
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FaucetService.d.ts","sourceRoot":"","sources":["../../src/services/FaucetService.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"FaucetService.d.ts","sourceRoot":"","sources":["../../src/services/FaucetService.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAI3C,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EACL,mBAAmB,EAIpB,MAAM,mBAAmB,CAAC;AAE3B;;;;;;;;;;;;;;;;GAgBG;AACH,qBAAa,aAAc,SAAQ,WAAW;gBAChC,IAAI,EAAE,UAAU,EAAE,SAAS,GAAE,OAAe;IAIxD;;;;;;;;;;;;;;;OAeG;IACG,eAAe,CAAC,IAAI,EAAE,mBAAmB,GAAG,OAAO,CAAC,IAAI,CAAC;IAqB/D;;;;OAIG;IACH,OAAO,CAAC,2BAA2B;CAiBpC"}
|
|
@@ -48,19 +48,18 @@ import { TokenResolverService } from './TokenResolverService';
|
|
|
48
48
|
import { TokenClassKey } from '../types/common';
|
|
49
49
|
import type { TokenClass } from '@gala-chain/api';
|
|
50
50
|
import { Wallet } from 'ethers';
|
|
51
|
+
import { BaseService } from './BaseService';
|
|
51
52
|
import { FetchPoolDetailsData, InternalFetchPoolDetailsResponse } from '../types/trade.dto';
|
|
52
53
|
import { TokenBalanceResult } from '../types/user.dto';
|
|
53
54
|
import { TransferGalaData, TransferTokenData } from '../types/transfer.dto';
|
|
54
55
|
/**
|
|
55
56
|
* GalaChain Service for blockchain operations
|
|
56
57
|
*/
|
|
57
|
-
export declare class GalaChainService {
|
|
58
|
-
private readonly http;
|
|
58
|
+
export declare class GalaChainService extends BaseService {
|
|
59
59
|
private readonly wallet;
|
|
60
60
|
private readonly tokenResolver;
|
|
61
61
|
private readonly publicAxios?;
|
|
62
62
|
private readonly signatureHelper;
|
|
63
|
-
private readonly logger;
|
|
64
63
|
/**
|
|
65
64
|
* Initialize GalaChain Service
|
|
66
65
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GalaChainService.d.ts","sourceRoot":"","sources":["../../src/services/Gal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;;;;;;;;;;;;;OAoBG;IACG,YAAY,CAAC,IAAI,EAAE,gBAAgB,GAAG,OAAO,CAAC,MAAM,CAAC;IA4D3D;;;;;;;;;;;;;;;;;;;;;OAqBG;IACG,aAAa,CAAC,IAAI,EAAE,iBAAiB,GAAG,OAAO,CAAC,MAAM,CAAC;IAuF7D;;;;;;;;;;;;;;;;;;;;;;;OAuBG;IACG,oBAAoB,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,aAAa,CAAC;IA2BrE;;OAEG;IACH,OAAO,CAAC,wBAAwB;IAuBhC;;OAEG;IACH,OAAO,CAAC,yBAAyB;IA4CjC;;;OAGG;YACW,oBAAoB;IA0ClC;;;;OAIG;IACH,OAAO,CAAC,oCAAoC;IA2C5C;;;;;;;;;OASG;IACH,OAAO,CAAC,gCAAgC;IAmCxC;;OAEG;IACH,OAAO,CAAC,mBAAmB;CAiE5B"}
|
|
@@ -8,6 +8,7 @@
|
|
|
8
8
|
*/
|
|
9
9
|
import { HttpClient } from '../utils/http';
|
|
10
10
|
import { UploadImageByTokenNameOptions } from '../types/options.dto';
|
|
11
|
+
import { BaseService } from './BaseService';
|
|
11
12
|
/**
|
|
12
13
|
* Image Service Class
|
|
13
14
|
*
|
|
@@ -26,9 +27,7 @@ import { UploadImageByTokenNameOptions } from '../types/options.dto';
|
|
|
26
27
|
* });
|
|
27
28
|
* ```
|
|
28
29
|
*/
|
|
29
|
-
export declare class ImageService {
|
|
30
|
-
private readonly http;
|
|
31
|
-
private readonly logger;
|
|
30
|
+
export declare class ImageService extends BaseService {
|
|
32
31
|
constructor(http: HttpClient, debugMode?: boolean);
|
|
33
32
|
/**
|
|
34
33
|
* Uploads an image for a token pool
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ImageService.d.ts","sourceRoot":"","sources":["../../src/services/ImageService.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAM3C,OAAO,EAAE,6BAA6B,EAAE,MAAM,sBAAsB,CAAC;
|
|
1
|
+
{"version":3,"file":"ImageService.d.ts","sourceRoot":"","sources":["../../src/services/ImageService.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAM3C,OAAO,EAAE,6BAA6B,EAAE,MAAM,sBAAsB,CAAC;AAIrE,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAG5C;;;;;;;;;;;;;;;;;GAiBG;AACH,qBAAa,YAAa,SAAQ,WAAW;gBAC/B,IAAI,EAAE,UAAU,EAAE,SAAS,GAAE,OAAe;IAIxD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA8CG;IACG,sBAAsB,CAC1B,OAAO,EAAE,6BAA6B,GACrC,OAAO,CAAC,MAAM,CAAC;CA6CnB"}
|
|
@@ -8,6 +8,7 @@
|
|
|
8
8
|
* @since 3.6.0
|
|
9
9
|
*/
|
|
10
10
|
import { HttpClient } from '../utils/http';
|
|
11
|
+
import { BaseService } from './BaseService';
|
|
11
12
|
import { PoolsResult, CheckPoolOptions, GraphDataResult, TokenDistributionResult, TokenBadgesResult } from '../types/launchpad.dto';
|
|
12
13
|
import { FetchVolumeDataOptions, HasTokenBadgeOptions } from '../types/options.dto';
|
|
13
14
|
/**
|
|
@@ -31,9 +32,7 @@ import { FetchVolumeDataOptions, HasTokenBadgeOptions } from '../types/options.d
|
|
|
31
32
|
* const exists = await poolService.checkPool({ tokenName: 'mytoken' });
|
|
32
33
|
* ```
|
|
33
34
|
*/
|
|
34
|
-
export declare class PoolService {
|
|
35
|
-
private readonly http;
|
|
36
|
-
private readonly logger;
|
|
35
|
+
export declare class PoolService extends BaseService {
|
|
37
36
|
constructor(http: HttpClient, debugMode?: boolean);
|
|
38
37
|
/**
|
|
39
38
|
* Fetches a single page of pools (internal helper)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PoolService.d.ts","sourceRoot":"","sources":["../../src/services/PoolService.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"PoolService.d.ts","sourceRoot":"","sources":["../../src/services/PoolService.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAW3C,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAGL,WAAW,EAEX,gBAAgB,EAIhB,eAAe,EAEf,uBAAuB,EAEvB,iBAAiB,EAClB,MAAM,wBAAwB,CAAC;AAChC,OAAO,EACL,sBAAsB,EACtB,oBAAoB,EAErB,MAAM,sBAAsB,CAAC;AAE9B;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,qBAAa,WAAY,SAAQ,WAAW;gBAC9B,IAAI,EAAE,UAAU,EAAE,SAAS,GAAE,OAAe;IAIxD;;;OAGG;YACW,eAAe;IAoD7B;;;;OAIG;YACW,kBAAkB;IAuFhC;;;;;;;;;;;;;;;;;;;;;;;;OAwBG;IACG,UAAU,CACd,OAAO,GAAE;QACP,MAAM,CAAC,EAAE,MAAM,CAAC;QAChB,SAAS,CAAC,EAAE,MAAM,CAAC;QACnB,IAAI,CAAC,EAAE,QAAQ,GAAG,SAAS,CAAC;QAC5B,IAAI,CAAC,EAAE,MAAM,CAAC;QACd,KAAK,CAAC,EAAE,MAAM,CAAC;KACX,GACL,OAAO,CAAC,WAAW,CAAC;IA+IvB;;;;;;;;;;;;;;;;;;OAkBG;IACG,aAAa,CACjB,OAAO,CAAC,EAAE;QACR,MAAM,CAAC,EAAE,MAAM,CAAC;QAChB,SAAS,CAAC,EAAE,MAAM,CAAC;QACnB,IAAI,CAAC,EAAE,QAAQ,GAAG,SAAS,CAAC;KAC7B,GACA,OAAO,CAAC,WAAW,CAAC;IAIvB;;;;;OAKG;IACG,SAAS,CAAC,OAAO,EAAE,gBAAgB,GAAG,OAAO,CAAC,OAAO,CAAC;IAqC5D;;;;;OAKG;IACG,oBAAoB,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;IAW/D;;;;;OAKG;IACG,sBAAsB,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;IAW9D;;;;;OAKG;IACG,eAAe,CACnB,OAAO,EAAE,sBAAsB,GAC9B,OAAO,CAAC,eAAe,CAAC;IAiD3B;;;;;;;;OAQG;IACG,sBAAsB,CAC1B,SAAS,EAAE,MAAM,GAChB,OAAO,CAAC,uBAAuB,CAAC;IAwFnC;;;;;;;;OAQG;IACG,gBAAgB,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,iBAAiB,CAAC;IAwBrE;;;;;OAKG;IACG,aAAa,CAAC,OAAO,EAAE,oBAAoB,GAAG,OAAO,CAAC,OAAO,CAAC;IAkBpE;;;;;;;;;;;;;;;;OAgBG;IACG,uBAAuB,CAC3B,SAAS,EAAE,MAAM,GAChB,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC;CAuB1B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PriceHistoryService.d.ts","sourceRoot":"","sources":["../../src/services/PriceHistoryService.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;
|
|
1
|
+
{"version":3,"file":"PriceHistoryService.d.ts","sourceRoot":"","sources":["../../src/services/PriceHistoryService.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAKH,OAAO,EACL,wBAAwB,EACxB,kBAAkB,EAGnB,MAAM,2BAA2B,CAAC;AACnC,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAE3C,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAE9D;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,qBAAa,mBAAmB;IAC9B,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAS;IAChC,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAa;IACxC,OAAO,CAAC,QAAQ,CAAC,oBAAoB,CAAmC;IAExE;;;;;OAKG;gBACS,UAAU,CAAC,EAAE,UAAU,EAAE,SAAS,GAAE,OAAe,EAAE,oBAAoB,CAAC,EAAE,oBAAoB;IAM5G;;;;;;;;;;;;;;;;;;;OAmBG;IACG,6BAA6B,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;IA4EvE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA2DG;IACG,iBAAiB,CAAC,OAAO,EAAE,wBAAwB,GAAG,OAAO,CAAC,kBAAkB,CAAC;IAmFvF;;;OAGG;IACH,OAAO,CAAC,kCAAkC;IA+B1C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAoDG;IACG,oBAAoB,CACxB,OAAO,EAAE,IAAI,CAAC,wBAAwB,EAAE,MAAM,GAAG,OAAO,CAAC,GACxD,OAAO,CAAC,kBAAkB,CAAC;IA8C9B;;;;OAIG;IACH,OAAO,CAAC,eAAe;CA+CxB"}
|
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
* @category Services
|
|
7
7
|
* @since 3.6.0
|
|
8
8
|
*/
|
|
9
|
+
import { BaseService } from './BaseService';
|
|
9
10
|
import { HttpClient } from '../utils/http';
|
|
10
11
|
import { TradesResult } from '../types/trade.dto';
|
|
11
12
|
import { FetchTradesOptions } from '../types/options.dto';
|
|
@@ -31,9 +32,7 @@ import { FetchTradesOptions } from '../types/options.dto';
|
|
|
31
32
|
* });
|
|
32
33
|
* ```
|
|
33
34
|
*/
|
|
34
|
-
export declare class TradeService {
|
|
35
|
-
private readonly http;
|
|
36
|
-
private readonly logger;
|
|
35
|
+
export declare class TradeService extends BaseService {
|
|
37
36
|
constructor(http: HttpClient, debugMode?: boolean);
|
|
38
37
|
/**
|
|
39
38
|
* Gets trades for a token by its tokenName with pagination
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TradeService.d.ts","sourceRoot":"","sources":["../../src/services/TradeService.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAO3C,OAAO,EAEL,YAAY,EAEb,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,kBAAkB,EAAwB,MAAM,sBAAsB,CAAC;AAEhF;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,qBAAa,
|
|
1
|
+
{"version":3,"file":"TradeService.d.ts","sourceRoot":"","sources":["../../src/services/TradeService.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAO3C,OAAO,EAEL,YAAY,EAEb,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,kBAAkB,EAAwB,MAAM,sBAAsB,CAAC;AAEhF;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,qBAAa,YAAa,SAAQ,WAAW;gBAC/B,IAAI,EAAE,UAAU,EAAE,SAAS,GAAE,OAAe;IAIxD;;;;;;;;;OASG;IACG,WAAW,CAAC,OAAO,EAAE,kBAAkB,GAAG,OAAO,CAAC,YAAY,CAAC;CAuDtE"}
|
|
@@ -8,6 +8,7 @@
|
|
|
8
8
|
* @since 3.6.0
|
|
9
9
|
*/
|
|
10
10
|
import { HttpClient } from '../utils/http';
|
|
11
|
+
import { BaseService } from './BaseService';
|
|
11
12
|
import { GetTokenListOptions, UserTokenListResult, UpdateProfileData, UploadProfileImageOptions } from '../types/user.dto';
|
|
12
13
|
/**
|
|
13
14
|
* User Service Class
|
|
@@ -32,9 +33,8 @@ import { GetTokenListOptions, UserTokenListResult, UpdateProfileData, UploadProf
|
|
|
32
33
|
* });
|
|
33
34
|
* ```
|
|
34
35
|
*/
|
|
35
|
-
export declare class UserService {
|
|
36
|
-
|
|
37
|
-
constructor(http: HttpClient);
|
|
36
|
+
export declare class UserService extends BaseService {
|
|
37
|
+
constructor(http: HttpClient, debugMode?: boolean);
|
|
38
38
|
/**
|
|
39
39
|
* Fetches user profile information
|
|
40
40
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"UserService.d.ts","sourceRoot":"","sources":["../../src/services/UserService.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"UserService.d.ts","sourceRoot":"","sources":["../../src/services/UserService.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAU3C,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAE5C,OAAO,EACL,mBAAmB,EACnB,mBAAmB,EACnB,iBAAiB,EAEjB,yBAAyB,EAO1B,MAAM,mBAAmB,CAAC;AAO3B;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,qBAAa,WAAY,SAAQ,WAAW;gBAC9B,IAAI,EAAE,UAAU,EAAE,SAAS,GAAE,OAAe;IAIxD;;;;;;OAMG;IACG,YAAY,CAAC,OAAO,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,GAAG,CAAC;IAmBlD;;;;;;;;;;;OAWG;IACG,aAAa,CAAC,IAAI,EAAE,iBAAiB,GAAG,OAAO,CAAC,IAAI,CAAC;IAiD3D;;;;;;;OAOG;IACG,kBAAkB,CACtB,OAAO,EAAE,yBAAyB,GACjC,OAAO,CAAC,MAAM,CAAC;IA+ClB;;;;;;OAMG;IACG,cAAc,CAClB,OAAO,EAAE,mBAAmB,GAC3B,OAAO,CAAC,mBAAmB,CAAC;IAO/B;;;;;;OAMG;IACG,eAAe,CACnB,OAAO,EAAE,mBAAmB,GAC3B,OAAO,CAAC,mBAAmB,CAAC;IAO/B;;;;;OAKG;IACG,kBAAkB,CACtB,OAAO,GAAE;QAAE,IAAI,CAAC,EAAE,MAAM,CAAC;QAAC,KAAK,CAAC,EAAE,MAAM,CAAC;QAAC,MAAM,CAAC,EAAE,MAAM,CAAC;QAAC,SAAS,CAAC,EAAE,MAAM,CAAA;KAAO,GACnF,OAAO,CAAC,mBAAmB,CAAC;IAsB/B;;;;;;;;;;;;;;;;OAgBG;YACW,iBAAiB;IAmD/B;;;;OAIG;IACH,OAAO,CAAC,2BAA2B;IAuCnC;;;;OAIG;IACH,OAAO,CAAC,yBAAyB;IAkBjC;;;;OAIG;IACH,OAAO,CAAC,iCAAiC;CAW1C"}
|
|
@@ -0,0 +1,174 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* DEX Pool Discovery Types
|
|
3
|
+
*
|
|
4
|
+
* Types for querying and exploring GalaSwap DEX liquidity pools.
|
|
5
|
+
* Supports pagination, filtering, and sorting across all available pools.
|
|
6
|
+
*
|
|
7
|
+
* @packageDocumentation
|
|
8
|
+
*/
|
|
9
|
+
/**
|
|
10
|
+
* Complete DEX pool data structure (19 fields from backend)
|
|
11
|
+
*
|
|
12
|
+
* Represents a single liquidity pool on the GalaSwap DEX with full metrics.
|
|
13
|
+
*/
|
|
14
|
+
export interface DexPoolData {
|
|
15
|
+
/** Pool identifier (e.g., "GALA|Unit|none|none/GUSDC|Unit|none|none/10000") */
|
|
16
|
+
poolPair: string;
|
|
17
|
+
/** Unique pool hash identifier */
|
|
18
|
+
poolHash: string;
|
|
19
|
+
/** First token symbol (e.g., "GALA") */
|
|
20
|
+
token0: string;
|
|
21
|
+
/** Second token symbol (e.g., "GUSDC") */
|
|
22
|
+
token1: string;
|
|
23
|
+
/** First token image URL */
|
|
24
|
+
token0Image: string;
|
|
25
|
+
/** Second token image URL */
|
|
26
|
+
token1Image: string;
|
|
27
|
+
/** First token price in terms of second token */
|
|
28
|
+
token0Price: string;
|
|
29
|
+
/** Second token price in terms of first token */
|
|
30
|
+
token1Price: string;
|
|
31
|
+
/** Human-readable pool name (e.g., "GALA/GUSDC") */
|
|
32
|
+
poolName: string;
|
|
33
|
+
/** Fee tier as percentage string (e.g., "0.3", "1") */
|
|
34
|
+
fee: string;
|
|
35
|
+
/** 24-hour fees collected (USD) */
|
|
36
|
+
fee24h: number;
|
|
37
|
+
/** First token TVL (in token units) */
|
|
38
|
+
token0Tvl: number;
|
|
39
|
+
/** Second token TVL (in token units) */
|
|
40
|
+
token1Tvl: number;
|
|
41
|
+
/** First token TVL in USD */
|
|
42
|
+
token0TvlUsd: number;
|
|
43
|
+
/** Second token TVL in USD */
|
|
44
|
+
token1TvlUsd: number;
|
|
45
|
+
/** Total value locked in pool (USD) */
|
|
46
|
+
tvl: number;
|
|
47
|
+
/** 1-day trading volume (USD) */
|
|
48
|
+
volume1d: number;
|
|
49
|
+
/** 30-day trading volume (USD) */
|
|
50
|
+
volume30d: number;
|
|
51
|
+
/** Volume-to-TVL ratio (volume1d / tvl) */
|
|
52
|
+
dayPerTvl: number;
|
|
53
|
+
/** 1-day APR percentage (calculated from fees) */
|
|
54
|
+
apr1d: number;
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* Backend-validated sort field options
|
|
58
|
+
*
|
|
59
|
+
* Only these three fields can be used for sorting. The backend validates
|
|
60
|
+
* and rejects any other sortBy values.
|
|
61
|
+
*
|
|
62
|
+
* @see {@link FetchDexPoolsOptions}
|
|
63
|
+
*/
|
|
64
|
+
export type DexPoolSortBy = 'tvl' | 'volume30d' | 'volume1d';
|
|
65
|
+
/**
|
|
66
|
+
* Sort order direction
|
|
67
|
+
*
|
|
68
|
+
* Lowercase for user-facing SDK (converted to uppercase for backend API)
|
|
69
|
+
*/
|
|
70
|
+
export type DexPoolSortOrder = 'asc' | 'desc';
|
|
71
|
+
/**
|
|
72
|
+
* Options for fetching DEX pools with pagination and filtering
|
|
73
|
+
*
|
|
74
|
+
* Follows SDK standard pagination conventions matching other paginated methods
|
|
75
|
+
* like fetchPools(), fetchTrades(), etc.
|
|
76
|
+
*
|
|
77
|
+
* @example
|
|
78
|
+
* ```typescript
|
|
79
|
+
* // Fetch top 10 pools by volume
|
|
80
|
+
* const result = await sdk.fetchDexPools({
|
|
81
|
+
* sortBy: 'volume1d',
|
|
82
|
+
* sortOrder: 'desc',
|
|
83
|
+
* limit: 10,
|
|
84
|
+
* page: 1
|
|
85
|
+
* });
|
|
86
|
+
*
|
|
87
|
+
* // Search for GALA pools
|
|
88
|
+
* const galaPools = await sdk.fetchDexPools({
|
|
89
|
+
* search: 'GALA',
|
|
90
|
+
* limit: 20
|
|
91
|
+
* });
|
|
92
|
+
* ```
|
|
93
|
+
*/
|
|
94
|
+
export interface FetchDexPoolsOptions {
|
|
95
|
+
/**
|
|
96
|
+
* Search filter for token symbols in pool pair
|
|
97
|
+
*
|
|
98
|
+
* Performs fuzzy search (case-insensitive) across token symbols
|
|
99
|
+
* and pool names. Example: "GALA", "GUSDC", "GALA/GUSDC"
|
|
100
|
+
*
|
|
101
|
+
* @optional
|
|
102
|
+
*/
|
|
103
|
+
search?: string;
|
|
104
|
+
/**
|
|
105
|
+
* Field to sort results by
|
|
106
|
+
*
|
|
107
|
+
* Default: 'tvl' (total value locked)
|
|
108
|
+
* Backend-validated to only allow: 'tvl', 'volume30d', 'volume1d'
|
|
109
|
+
*
|
|
110
|
+
* @optional
|
|
111
|
+
*/
|
|
112
|
+
sortBy?: DexPoolSortBy;
|
|
113
|
+
/**
|
|
114
|
+
* Sort order direction
|
|
115
|
+
*
|
|
116
|
+
* Default: 'desc' (highest to lowest)
|
|
117
|
+
*
|
|
118
|
+
* @optional
|
|
119
|
+
*/
|
|
120
|
+
sortOrder?: DexPoolSortOrder;
|
|
121
|
+
/**
|
|
122
|
+
* Page number (1-based pagination)
|
|
123
|
+
*
|
|
124
|
+
* Default: 1
|
|
125
|
+
*
|
|
126
|
+
* @optional
|
|
127
|
+
*/
|
|
128
|
+
page?: number;
|
|
129
|
+
/**
|
|
130
|
+
* Number of results per page
|
|
131
|
+
*
|
|
132
|
+
* Default: 10
|
|
133
|
+
* Maximum enforced by backend: 20
|
|
134
|
+
*
|
|
135
|
+
* @optional
|
|
136
|
+
*/
|
|
137
|
+
limit?: number;
|
|
138
|
+
}
|
|
139
|
+
/**
|
|
140
|
+
* Clean result for paginated DEX pool queries
|
|
141
|
+
*
|
|
142
|
+
* Follows SDK standard pagination result structure with 7 metadata fields
|
|
143
|
+
* matching fetchPools(), fetchTrades(), fetchComments(), etc.
|
|
144
|
+
*
|
|
145
|
+
* @example
|
|
146
|
+
* ```typescript
|
|
147
|
+
* const result = await sdk.fetchDexPools({ limit: 20 });
|
|
148
|
+
*
|
|
149
|
+
* console.log(`Page ${result.page} of ${result.totalPages}`);
|
|
150
|
+
* console.log(`Total pools: ${result.total}`);
|
|
151
|
+
* console.log(`Pools in this page: ${result.pools.length}`);
|
|
152
|
+
*
|
|
153
|
+
* result.pools.forEach(pool => {
|
|
154
|
+
* console.log(`${pool.poolName}: $${pool.tvl.toFixed(2)} TVL`);
|
|
155
|
+
* });
|
|
156
|
+
* ```
|
|
157
|
+
*/
|
|
158
|
+
export interface DexPoolsResult {
|
|
159
|
+
/** Array of DEX pool data */
|
|
160
|
+
pools: DexPoolData[];
|
|
161
|
+
/** Current page number (1-based) */
|
|
162
|
+
page: number;
|
|
163
|
+
/** Number of items per page */
|
|
164
|
+
limit: number;
|
|
165
|
+
/** Total number of pools */
|
|
166
|
+
total: number;
|
|
167
|
+
/** Total number of pages */
|
|
168
|
+
totalPages: number;
|
|
169
|
+
/** Whether there are additional pages after current */
|
|
170
|
+
hasNext: boolean;
|
|
171
|
+
/** Whether there are pages before current */
|
|
172
|
+
hasPrevious: boolean;
|
|
173
|
+
}
|
|
174
|
+
//# sourceMappingURL=dex-pool.dto.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dex-pool.dto.d.ts","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AAM,WAAW,oBAAoB;IACnC;;;;;;;OAOG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB;;;;;;;OAOG;IACH,MAAM,CAAC,EAAE,aAAa,CAAC;IAEvB;;;;;;OAMG;IACH,SAAS,CAAC,EAAE,gBAAgB,CAAC;IAE7B;;;;;;OAMG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IAEd;;;;;;;OAOG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED;;;;;;;;;;;;;;;;;;GAkBG;AACH,MAAM,WAAW,cAAc;IAC7B,6BAA6B;IAC7B,KAAK,EAAE,WAAW,EAAE,CAAC;IAErB,oCAAoC;IACpC,IAAI,EAAE,MAAM,CAAC;IAEb,+BAA+B;IAC/B,KAAK,EAAE,MAAM,CAAC;IAEd,4BAA4B;IAC5B,KAAK,EAAE,MAAM,CAAC;IAEd,4BAA4B;IAC5B,UAAU,EAAE,MAAM,CAAC;IAEnB,uDAAuD;IACvD,OAAO,EAAE,OAAO,CAAC;IAEjB,6CAA6C;IAC7C,WAAW,EAAE,OAAO,CAAC;CACtB"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gala-chain/launchpad-sdk",
|
|
3
|
-
"version": "3.
|
|
4
|
-
"description": "TypeScript SDK for Gala Launchpad Backend API -
|
|
3
|
+
"version": "3.28.0",
|
|
4
|
+
"description": "TypeScript SDK for Gala Launchpad Backend API - 66 methods supporting optional wallet (read-only and full-access modes). Production-ready DeFi token launchpad integration with AgentConfig setup, GalaChain trading, GSwap DEX integration, price history, token creation, DEX pool discovery, and comprehensive user operations. Multi-format output (ESM, CJS, UMD).",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"module": "dist/index.esm.js",
|
|
7
7
|
"types": "dist/index.d.ts",
|
|
@@ -47,6 +47,8 @@
|
|
|
47
47
|
"demo:liquidity:detailed": "tsx examples/demo-liquidity-detailed.ts",
|
|
48
48
|
"demo:cache": "tsx examples/demo-cache.ts",
|
|
49
49
|
"demo:fetch-all-pools": "tsx examples/demo-fetch-all-pools.ts",
|
|
50
|
+
"demo:dex-trades": "tsx examples/demo-dex-trades.ts",
|
|
51
|
+
"demo:dex-pool-discovery": "tsx examples/demo-dex-pool-discovery.ts",
|
|
50
52
|
"lint": "eslint src tests scripts --ext .ts,.tsx --fix",
|
|
51
53
|
"lint:check": "eslint src tests scripts --ext .ts,.tsx",
|
|
52
54
|
"typecheck": "tsc --noEmit",
|