@gala-chain/launchpad-sdk 3.27.2 → 3.27.4

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 CHANGED
@@ -1,5 +1,15 @@
1
1
  # Changelog
2
2
 
3
+ ## 3.27.3
4
+
5
+ ### Patch Changes
6
+
7
+ - fix: return raw price impact values with full precision instead of rounding to 2 decimals
8
+
9
+ Changed price impact return format from `.toFixed(2)` to `.toString()` to preserve the full
10
+ precision of GSwap SDK's price impact calculations. This allows consumers to see the actual price
11
+ impact values without rounding loss.
12
+
3
13
  ## 3.27.2
4
14
 
5
15
  ### Patch Changes
@@ -0,0 +1,56 @@
1
+ /**
2
+ * Pagination Constants
3
+ *
4
+ * Centralized pagination defaults and limits used across SDK services.
5
+ * Eliminates magic numbers and ensures consistency in pagination behavior.
6
+ *
7
+ * @category Constants
8
+ * @since 3.24.0
9
+ */
10
+ /**
11
+ * Default pagination values used across SDK services
12
+ *
13
+ * **Default Page:** 1 (first page)
14
+ * **Default Limit:** 10 (results per page)
15
+ * **Backend Max Page Size:** 20 (server's maximum page size)
16
+ * **Safety Max Pages:** 100 (maximum pages to auto-fetch)
17
+ *
18
+ * @example
19
+ * ```typescript
20
+ * import { PAGINATION_DEFAULTS } from '@gala-chain/launchpad-sdk';
21
+ *
22
+ * const page = options.page ?? PAGINATION_DEFAULTS.DEFAULT_PAGE;
23
+ * const limit = options.limit ?? PAGINATION_DEFAULTS.DEFAULT_LIMIT;
24
+ * ```
25
+ */
26
+ export declare const PAGINATION_DEFAULTS: {
27
+ /** Default starting page number for paginated queries */
28
+ readonly DEFAULT_PAGE: 1;
29
+ /** Default number of results per page */
30
+ readonly DEFAULT_LIMIT: 10;
31
+ /** Backend API's maximum page size limit */
32
+ readonly BACKEND_MAX_PAGE_SIZE: 20;
33
+ /** Safety limit for auto-pagination (prevents excessive API calls) */
34
+ readonly SAFETY_MAX_PAGES: 100;
35
+ };
36
+ /**
37
+ * Pool-specific fetch configuration
38
+ *
39
+ * **Max Concurrent Fetches:** 5 (parallel page requests)
40
+ * **Backend Page Size:** 20 (results per pool page)
41
+ *
42
+ * @example
43
+ * ```typescript
44
+ * import { POOL_FETCH_CONFIG } from '@gala-chain/launchpad-sdk';
45
+ *
46
+ * // Fetch multiple pool pages in parallel with concurrency limit
47
+ * const concurrencyLimit = POOL_FETCH_CONFIG.MAX_CONCURRENT_FETCHES;
48
+ * ```
49
+ */
50
+ export declare const POOL_FETCH_CONFIG: {
51
+ /** Maximum concurrent pool fetch requests for auto-pagination */
52
+ readonly MAX_CONCURRENT_FETCHES: 5;
53
+ /** Backend API's standard page size for pool results */
54
+ readonly BACKEND_PAGE_SIZE: 20;
55
+ };
56
+ //# sourceMappingURL=pagination.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pagination.d.ts","sourceRoot":"","sources":["../../src/constants/pagination.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH;;;;;;;;;;;;;;;GAeG;AACH,eAAO,MAAM,mBAAmB;IAC9B,yDAAyD;;IAGzD,yCAAyC;;IAGzC,4CAA4C;;IAG5C,sEAAsE;;CAE9D,CAAC;AAEX;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,iBAAiB;IAC5B,iEAAiE;;IAGjE,wDAAwD;;CAEhD,CAAC"}
@@ -0,0 +1,51 @@
1
+ /**
2
+ * Query Field Name Constants
3
+ *
4
+ * Centralized query parameter field names used in HTTP requests.
5
+ * Prevents typos and ensures consistency across all API queries.
6
+ *
7
+ * @category Constants
8
+ * @since 3.24.0
9
+ */
10
+ /**
11
+ * Standard query field names used in backend API requests
12
+ *
13
+ * These strings are used when building query parameters for API calls.
14
+ * Centralizing them prevents typos and ensures consistency.
15
+ *
16
+ * @example
17
+ * ```typescript
18
+ * import { QUERY_FIELD_NAMES } from '@gala-chain/launchpad-sdk';
19
+ *
20
+ * const queryParams = {
21
+ * [QUERY_FIELD_NAMES.PAGE]: 1,
22
+ * [QUERY_FIELD_NAMES.LIMIT]: 20,
23
+ * [QUERY_FIELD_NAMES.TOKEN_NAME]: 'anime'
24
+ * };
25
+ * ```
26
+ */
27
+ export declare const QUERY_FIELD_NAMES: {
28
+ /** Pagination: page number (usually 1-indexed) */
29
+ readonly PAGE: "page";
30
+ /** Pagination: results per page */
31
+ readonly LIMIT: "limit";
32
+ /** Filter: token name for lookups and searches */
33
+ readonly TOKEN_NAME: "tokenName";
34
+ /** Filter: vault address for token resolution */
35
+ readonly VAULT_ADDRESS: "vaultAddress";
36
+ /** Filter: user wallet address for balance/trade queries */
37
+ readonly USER_ADDRESS: "userAddress";
38
+ /** Filter: trade type (BUY or SELL) */
39
+ readonly TRADE_TYPE: "tradeType";
40
+ /** Filter: pool type (recent, popular) */
41
+ readonly POOL_TYPE: "type";
42
+ /** Filter: fuzzy search term */
43
+ readonly SEARCH: "search";
44
+ /** Sort: order direction (ASC, DESC) */
45
+ readonly SORT_ORDER: "sortOrder";
46
+ /** Filter: start date for time-range queries */
47
+ readonly START_DATE: "startDate";
48
+ /** Filter: end date for time-range queries */
49
+ readonly END_DATE: "endDate";
50
+ };
51
+ //# sourceMappingURL=query-fields.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"query-fields.d.ts","sourceRoot":"","sources":["../../src/constants/query-fields.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH;;;;;;;;;;;;;;;;GAgBG;AACH,eAAO,MAAM,iBAAiB;IAC5B,kDAAkD;;IAGlD,mCAAmC;;IAGnC,kDAAkD;;IAGlD,iDAAiD;;IAGjD,4DAA4D;;IAG5D,uCAAuC;;IAGvC,0CAA0C;;IAG1C,gCAAgC;;IAGhC,wCAAwC;;IAGxC,gDAAgD;;IAGhD,8CAA8C;;CAEtC,CAAC"}
@@ -3,5 +3,5 @@
3
3
  * This file is generated by scripts/inject-version.ts during build
4
4
  * DO NOT EDIT MANUALLY
5
5
  */
6
- export declare const SDK_VERSION = "3.27.2";
6
+ export declare const SDK_VERSION = "3.27.4";
7
7
  //# sourceMappingURL=version.generated.d.ts.map