@gala-chain/launchpad-sdk 3.31.2 → 4.0.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/API.md +524 -4
- package/CHANGELOG.md +92 -0
- package/EXAMPLES.md +845 -0
- package/README.md +421 -14
- package/dist/LaunchpadSDK.d.ts +435 -18
- package/dist/LaunchpadSDK.d.ts.map +1 -1
- package/dist/api/LaunchpadAPI.d.ts.map +1 -1
- package/dist/constants/version.generated.d.ts +1 -1
- package/dist/constants/version.generated.d.ts.map +1 -1
- package/dist/index.cjs.js +1 -1
- package/dist/index.d.ts +10 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.esm.js +1 -1
- package/dist/index.js +1 -1
- package/dist/services/CommentService.d.ts.map +1 -1
- package/dist/services/DexBackendClient.d.ts +46 -0
- package/dist/services/DexBackendClient.d.ts.map +1 -0
- package/dist/services/DexPoolService.d.ts +54 -12
- package/dist/services/DexPoolService.d.ts.map +1 -1
- package/dist/services/DexQuoteService.d.ts +288 -0
- package/dist/services/DexQuoteService.d.ts.map +1 -0
- package/dist/services/GSwapService.d.ts +468 -38
- package/dist/services/GSwapService.d.ts.map +1 -1
- package/dist/services/GalaChainGatewayClient.d.ts +89 -0
- package/dist/services/GalaChainGatewayClient.d.ts.map +1 -0
- package/dist/services/GalaChainService.d.ts +26 -0
- package/dist/services/GalaChainService.d.ts.map +1 -1
- package/dist/services/PoolStateManager.d.ts +176 -0
- package/dist/services/PoolStateManager.d.ts.map +1 -0
- package/dist/services/SignatureService.d.ts +13 -35
- package/dist/services/SignatureService.d.ts.map +1 -1
- package/dist/services/WebSocketService.d.ts +98 -0
- package/dist/services/WebSocketService.d.ts.map +1 -1
- package/dist/services/__mocks__/logger.mock.d.ts +17 -0
- package/dist/services/__mocks__/logger.mock.d.ts.map +1 -0
- package/dist/types/common.d.ts +2 -0
- package/dist/types/common.d.ts.map +1 -1
- package/dist/types/composite-pool.dto.d.ts +103 -0
- package/dist/types/composite-pool.dto.d.ts.map +1 -0
- package/dist/types/dex-pool.dto.d.ts +56 -5
- package/dist/types/dex-pool.dto.d.ts.map +1 -1
- package/dist/types/dto.d.ts +6 -6
- package/dist/types/dto.d.ts.map +1 -1
- package/dist/types/eip712-types.d.ts +140 -0
- package/dist/types/eip712-types.d.ts.map +1 -0
- package/dist/types/galachain-api.types.d.ts +206 -0
- package/dist/types/galachain-api.types.d.ts.map +1 -0
- package/dist/types/gswap-responses.types.d.ts +366 -0
- package/dist/types/gswap-responses.types.d.ts.map +1 -0
- package/dist/types/gswap.dto.d.ts +58 -3
- package/dist/types/gswap.dto.d.ts.map +1 -1
- package/dist/types/launchpad.dto.d.ts +57 -0
- package/dist/types/launchpad.dto.d.ts.map +1 -1
- package/dist/types/pool-state-delta.dto.d.ts +246 -0
- package/dist/types/pool-state-delta.dto.d.ts.map +1 -0
- package/dist/types/pool-state-manager-config.dto.d.ts +103 -0
- package/dist/types/pool-state-manager-config.dto.d.ts.map +1 -0
- package/dist/utils/auto-pagination.d.ts +74 -0
- package/dist/utils/auto-pagination.d.ts.map +1 -1
- package/dist/utils/bignumber-helpers.d.ts +75 -3
- package/dist/utils/bignumber-helpers.d.ts.map +1 -1
- package/dist/utils/bignumber-pool-cache.d.ts +169 -0
- package/dist/utils/bignumber-pool-cache.d.ts.map +1 -0
- package/dist/utils/composite-pool-converter.d.ts +121 -0
- package/dist/utils/composite-pool-converter.d.ts.map +1 -0
- package/dist/utils/errors.d.ts +86 -0
- package/dist/utils/errors.d.ts.map +1 -1
- package/dist/utils/http.d.ts.map +1 -1
- package/dist/utils/load-env.d.ts +31 -0
- package/dist/utils/load-env.d.ts.map +1 -0
- package/dist/utils/pool-pair-parser.d.ts +55 -0
- package/dist/utils/pool-pair-parser.d.ts.map +1 -0
- package/dist/utils/pool-state-validator.d.ts +207 -0
- package/dist/utils/pool-state-validator.d.ts.map +1 -0
- package/dist/utils/position-filters.d.ts +253 -0
- package/dist/utils/position-filters.d.ts.map +1 -0
- package/dist/utils/swap-delta-calculator.d.ts +231 -0
- package/dist/utils/swap-delta-calculator.d.ts.map +1 -0
- package/dist/utils/tick-crossing-handler.d.ts +250 -0
- package/dist/utils/tick-crossing-handler.d.ts.map +1 -0
- package/dist/utils/token-format-converter.d.ts +10 -3
- package/dist/utils/token-format-converter.d.ts.map +1 -1
- package/dist/utils/token-parser.d.ts +235 -0
- package/dist/utils/token-parser.d.ts.map +1 -0
- package/dist/utils/transfer-validation.d.ts.map +1 -1
- package/package.json +36 -15
|
@@ -0,0 +1,235 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Safe Token Parser - Comprehensive token format validation and parsing
|
|
3
|
+
*
|
|
4
|
+
* Handles STRICT parsing of token formats received from APIs:
|
|
5
|
+
* - Pipe-delimited: "GALA|Unit|none|none"
|
|
6
|
+
* - Dollar-delimited: "GALA$Unit$none$none"
|
|
7
|
+
* - Dollar with $ in collection: "$MUSIC$Unit$none$none" (parses from END)
|
|
8
|
+
*
|
|
9
|
+
* CRITICAL SECURITY NOTE:
|
|
10
|
+
* Plain strings like "GALA" are REJECTED by default - they are not valid token formats!
|
|
11
|
+
* Token formats MUST be explicitly delimited with | or $.
|
|
12
|
+
* This prevents dangerous assumptions about token structure.
|
|
13
|
+
*
|
|
14
|
+
* @packageDocumentation
|
|
15
|
+
*/
|
|
16
|
+
import type { TokenClassKey } from '../types/common';
|
|
17
|
+
/**
|
|
18
|
+
* PERFORMANCE CHARACTERISTICS:
|
|
19
|
+
*
|
|
20
|
+
* Fast-path (O(n) where n = token length):
|
|
21
|
+
* - Pipe-delimited tokens: Direct split() call, minimal string operations
|
|
22
|
+
* - Dollar-delimited tokens: Reverse algorithm, ~2x string operations
|
|
23
|
+
*
|
|
24
|
+
* Slow-path (format detection):
|
|
25
|
+
* - Plain strings without delimiters: Requires fallback logic
|
|
26
|
+
* - Type validation: Object instanceof checks for already-parsed tokens
|
|
27
|
+
*
|
|
28
|
+
* Recommendation: Pre-detect format when parsing large token batches:
|
|
29
|
+
* ```typescript
|
|
30
|
+
* import { isPipeDelimited, isDollarDelimited } from './token-parser';
|
|
31
|
+
*
|
|
32
|
+
* if (isPipeDelimited(token)) {
|
|
33
|
+
* return parsePipeDelimitedToken(token); // Fastest path
|
|
34
|
+
* } else if (isDollarDelimited(token)) {
|
|
35
|
+
* return parseDollarDelimitedTokenSafe(token); // Fast path
|
|
36
|
+
* }
|
|
37
|
+
* ```
|
|
38
|
+
*/
|
|
39
|
+
/**
|
|
40
|
+
* Parse token from ANY format (pipe/dollar delimited) into TokenClassKey
|
|
41
|
+
*
|
|
42
|
+
* Accepts:
|
|
43
|
+
* - Pipe format: "GALA|Unit|none|none"
|
|
44
|
+
* - Dollar format: "GALA$Unit$none$none"
|
|
45
|
+
* - Dollar with $ in collection: "$MUSIC$Unit$none$none"
|
|
46
|
+
* - TokenClassKey objects: { collection, category, type, additionalKey }
|
|
47
|
+
*
|
|
48
|
+
* REJECTS:
|
|
49
|
+
* - Plain strings like "GALA" (DANGEROUS - no delimiters!)
|
|
50
|
+
* - Null/undefined values
|
|
51
|
+
* - Invalid formats
|
|
52
|
+
*
|
|
53
|
+
* ⚠️ SECURITY ENFORCEMENT (v3.33.0+):
|
|
54
|
+
* Plain token strings are NO LONGER accepted. All tokens must use explicit delimiters.
|
|
55
|
+
* This is a breaking change to enforce secure token format validation.
|
|
56
|
+
*
|
|
57
|
+
* @param token Token string to parse
|
|
58
|
+
* @returns TokenClassKey with { collection, category, type, additionalKey }
|
|
59
|
+
* @throws ValidationError if format is invalid or if plain string is provided
|
|
60
|
+
*
|
|
61
|
+
* @example
|
|
62
|
+
* ```typescript
|
|
63
|
+
* // Pipe-delimited (RECOMMENDED)
|
|
64
|
+
* parseToken("GALA|Unit|none|none")
|
|
65
|
+
* // → { collection: "GALA", category: "Unit", type: "none", additionalKey: "none" }
|
|
66
|
+
*
|
|
67
|
+
* // Dollar-delimited
|
|
68
|
+
* parseToken("GALA$Unit$none$none")
|
|
69
|
+
* // → { collection: "GALA", category: "Unit", type: "none", additionalKey: "none" }
|
|
70
|
+
*
|
|
71
|
+
* // Dollar with $ in collection (EDGE CASE)
|
|
72
|
+
* parseToken("$MUSIC$Unit$none$none")
|
|
73
|
+
* // → { collection: "$MUSIC", category: "Unit", type: "none", additionalKey: "none" }
|
|
74
|
+
*
|
|
75
|
+
* // TokenClassKey object
|
|
76
|
+
* parseToken({ collection: "GALA", category: "Unit", type: "none", additionalKey: "none" })
|
|
77
|
+
* // → { collection: "GALA", category: "Unit", type: "none", additionalKey: "none" }
|
|
78
|
+
*
|
|
79
|
+
* // Plain string - PERMANENTLY REJECTED
|
|
80
|
+
* parseToken("GALA") // Throws ValidationError
|
|
81
|
+
* ```
|
|
82
|
+
*
|
|
83
|
+
* @since 3.32.0
|
|
84
|
+
* @updated 3.33.0 - Removed allowPlainStrings parameter, enforce strict delimiter-only parsing
|
|
85
|
+
*/
|
|
86
|
+
export declare function parseToken(token: string | TokenClassKey | undefined | null): TokenClassKey;
|
|
87
|
+
/**
|
|
88
|
+
* Parse pipe-delimited token: "GALA|Unit|none|none"
|
|
89
|
+
*
|
|
90
|
+
* @internal Used by parseToken()
|
|
91
|
+
* @throws ValidationError if format is invalid
|
|
92
|
+
*/
|
|
93
|
+
export declare function parsePipeDelimitedToken(token: string): TokenClassKey;
|
|
94
|
+
/**
|
|
95
|
+
* REVERSE-PARSING ALGORITHM FOR DOLLAR-DELIMITED TOKENS
|
|
96
|
+
*
|
|
97
|
+
* Problem: Tokens like "$MUSIC$Unit$none$none" contain $ in the collection name
|
|
98
|
+
* Standard left-to-right parsing fails because it can't distinguish where collection ends
|
|
99
|
+
*
|
|
100
|
+
* Solution: Parse from RIGHT-TO-LEFT
|
|
101
|
+
*
|
|
102
|
+
* ```
|
|
103
|
+
* Input token: "$MUSIC$Unit$none$none"
|
|
104
|
+
* [ 1 ][2 ][3 ][4 ] ← parts array (5 elements)
|
|
105
|
+
*
|
|
106
|
+
* Step 1: Split by '$'
|
|
107
|
+
* parts = ['', 'MUSIC', 'Unit', 'none', 'none']
|
|
108
|
+
*
|
|
109
|
+
* Step 2: Take last 3 parts (from right)
|
|
110
|
+
* category = parts[2] = 'Unit'
|
|
111
|
+
* type = parts[3] = 'none'
|
|
112
|
+
* additionalKey = parts[4] = 'none'
|
|
113
|
+
*
|
|
114
|
+
* Step 3: Everything BEFORE those 3 parts = collection (rejoin with '$')
|
|
115
|
+
* collectionParts = parts[0:2] = ['', 'MUSIC']
|
|
116
|
+
* collection = '$MUSIC' (rejoin with '$')
|
|
117
|
+
*
|
|
118
|
+
* Result: { collection: "$MUSIC", category: "Unit", type: "none", additionalKey: "none" } ✓
|
|
119
|
+
* ```
|
|
120
|
+
*
|
|
121
|
+
* Why this works:
|
|
122
|
+
* - Handles ANY number of $ characters in collection
|
|
123
|
+
* - Guarantees exactly 4 components (collection, category, type, additionalKey)
|
|
124
|
+
* - Clear error messages when format is invalid
|
|
125
|
+
*
|
|
126
|
+
* Edge cases handled:
|
|
127
|
+
* - "$MUSIC$Unit$none$none" → collection: "$MUSIC" ✓
|
|
128
|
+
* - "COLLECTION$WITH$DOLLARS$Unit$symbol$additionalKey" → works ✓
|
|
129
|
+
* - "NotEnoughParts$Unit$none" → throws ValidationError ✓
|
|
130
|
+
*
|
|
131
|
+
* Performance: O(n) where n = token length (single split + slice + rejoin operations)
|
|
132
|
+
*/
|
|
133
|
+
/**
|
|
134
|
+
* Parse dollar-delimited token: "GALA$Unit$none$none"
|
|
135
|
+
*
|
|
136
|
+
* ⚠️ CRITICAL: Handles edge case where $ is part of collection name
|
|
137
|
+
* Example: "$MUSIC$Unit$none$none" → { collection: "$MUSIC", ... }
|
|
138
|
+
*
|
|
139
|
+
* Solution: Parse from END backwards
|
|
140
|
+
* - Last 3 parts (from right): category, type, additionalKey
|
|
141
|
+
* - Everything else: collection
|
|
142
|
+
*
|
|
143
|
+
* @internal Used by parseToken()
|
|
144
|
+
* @throws ValidationError if format is invalid
|
|
145
|
+
*/
|
|
146
|
+
export declare function parseDollarDelimitedTokenSafe(token: string): TokenClassKey;
|
|
147
|
+
/**
|
|
148
|
+
* Check if token string is in pipe-delimited format
|
|
149
|
+
*
|
|
150
|
+
* @example
|
|
151
|
+
* ```typescript
|
|
152
|
+
* isPipeDelimited("GALA|Unit|none|none") // → true
|
|
153
|
+
* isPipeDelimited("GALA") // → false
|
|
154
|
+
* ```
|
|
155
|
+
*/
|
|
156
|
+
export declare function isPipeDelimited(token: string): boolean;
|
|
157
|
+
/**
|
|
158
|
+
* Check if token string is in dollar-delimited format
|
|
159
|
+
*
|
|
160
|
+
* @example
|
|
161
|
+
* ```typescript
|
|
162
|
+
* isDollarDelimited("GALA$Unit$none$none") // → true
|
|
163
|
+
* isDollarDelimited("$MUSIC$Unit$none$none") // → true
|
|
164
|
+
* isDollarDelimited("GALA") // → false
|
|
165
|
+
* ```
|
|
166
|
+
*/
|
|
167
|
+
export declare function isDollarDelimited(token: string): boolean;
|
|
168
|
+
/**
|
|
169
|
+
* Check if token is in ANY valid delimited format (pipe or dollar)
|
|
170
|
+
*
|
|
171
|
+
* @example
|
|
172
|
+
* ```typescript
|
|
173
|
+
* isDelimited("GALA|Unit|none|none") // → true
|
|
174
|
+
* isDelimited("GALA$Unit$none$none") // → true
|
|
175
|
+
* isDelimited("GALA") // → false
|
|
176
|
+
* ```
|
|
177
|
+
*/
|
|
178
|
+
export declare function isDelimited(token: string): boolean;
|
|
179
|
+
/**
|
|
180
|
+
* Check if a value is a valid token format (string OR TokenClassKey object)
|
|
181
|
+
*
|
|
182
|
+
* @param token Token to validate
|
|
183
|
+
* @returns true if token is valid format (pipe/dollar delimited OR TokenClassKey object)
|
|
184
|
+
*
|
|
185
|
+
* @example
|
|
186
|
+
* ```typescript
|
|
187
|
+
* isValidTokenFormat("GALA|Unit|none|none") // → true
|
|
188
|
+
* isValidTokenFormat("GALA$Unit$none$none") // → true
|
|
189
|
+
* isValidTokenFormat({ collection: "GALA", ... }) // → true
|
|
190
|
+
* isValidTokenFormat("GALA") // → false (plain string, not delimited)
|
|
191
|
+
* ```
|
|
192
|
+
*/
|
|
193
|
+
export declare function isValidTokenFormat(token: unknown): boolean;
|
|
194
|
+
/**
|
|
195
|
+
* Check if token is a plain symbol string (NOT a delimited format)
|
|
196
|
+
*
|
|
197
|
+
* Plain token symbols are simple strings like "GALA", "USDC", etc.
|
|
198
|
+
* These are REJECTED by default by parseToken() for security reasons.
|
|
199
|
+
* Use parseToken(symbol, true) to parse plain symbols.
|
|
200
|
+
*
|
|
201
|
+
* @param token Token to check
|
|
202
|
+
* @returns true if token is plain symbol (no delimiters)
|
|
203
|
+
*
|
|
204
|
+
* @example
|
|
205
|
+
* ```typescript
|
|
206
|
+
* isPlainTokenSymbol("GALA") // → true
|
|
207
|
+
* isPlainTokenSymbol("GALA|Unit|none|none") // → false
|
|
208
|
+
* isPlainTokenSymbol("GALA$Unit$none$none") // → false
|
|
209
|
+
* ```
|
|
210
|
+
*
|
|
211
|
+
* @security WARNING: Plain tokens are inherently ambiguous!
|
|
212
|
+
* Always use delimited formats when possible.
|
|
213
|
+
*/
|
|
214
|
+
export declare function isPlainTokenSymbol(token: unknown): boolean;
|
|
215
|
+
/**
|
|
216
|
+
* Type guard: Check if value is a TokenClassKey object
|
|
217
|
+
*
|
|
218
|
+
* @param token Value to check
|
|
219
|
+
* @returns true if token is a valid TokenClassKey object with all required properties
|
|
220
|
+
*
|
|
221
|
+
* @example
|
|
222
|
+
* ```typescript
|
|
223
|
+
* const value: string | TokenClassKey = getToken();
|
|
224
|
+
*
|
|
225
|
+
* if (isTokenClassKey(value)) {
|
|
226
|
+
* // TypeScript now knows value is TokenClassKey
|
|
227
|
+
* console.log(value.collection, value.category, value.type, value.additionalKey);
|
|
228
|
+
* } else {
|
|
229
|
+
* // value is string
|
|
230
|
+
* console.log(parseToken(value));
|
|
231
|
+
* }
|
|
232
|
+
* ```
|
|
233
|
+
*/
|
|
234
|
+
export declare function isTokenClassKey(token: unknown): token is TokenClassKey;
|
|
235
|
+
//# sourceMappingURL=token-parser.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"token-parser.d.ts","sourceRoot":"","sources":["../../src/utils/token-parser.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAGrD;;;;;;;;;;;;;;;;;;;;;GAqBG;AAEH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8CG;AACH,wBAAgB,UAAU,CACxB,KAAK,EAAE,MAAM,GAAG,aAAa,GAAG,SAAS,GAAG,IAAI,GAC/C,aAAa,CAyCf;AAED;;;;;GAKG;AACH,wBAAgB,uBAAuB,CAAC,KAAK,EAAE,MAAM,GAAG,aAAa,CA6CpE;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsCG;AAEH;;;;;;;;;;;;GAYG;AACH,wBAAgB,6BAA6B,CAAC,KAAK,EAAE,MAAM,GAAG,aAAa,CA8C1E;AA2DD;;;;;;;;GAQG;AACH,wBAAgB,eAAe,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAEtD;AAED;;;;;;;;;GASG;AACH,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAExD;AAED;;;;;;;;;GASG;AACH,wBAAgB,WAAW,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAElD;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,OAAO,GAAG,OAAO,CAe1D;AAED;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,OAAO,GAAG,OAAO,CAE1D;AAED;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,eAAe,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,aAAa,CAgBtE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"transfer-validation.d.ts","sourceRoot":"","sources":["../../src/utils/transfer-validation.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;
|
|
1
|
+
{"version":3,"file":"transfer-validation.d.ts","sourceRoot":"","sources":["../../src/utils/transfer-validation.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAOH;;;;;GAKG;AACH,qBAAa,wBAAwB;IACnC;;;;;;;;;;;;;;OAcG;IACH,MAAM,CAAC,cAAc,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI;IAc3C;;;;;;;;;;;;;;;;;;;;;;OAsBG;IACH,MAAM,CAAC,iBAAiB,CAAC,SAAS,EAAE,MAAM,GAAG,SAAS,GAAG,IAAI;CAqB9D"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gala-chain/launchpad-sdk",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "4.0.0",
|
|
4
4
|
"description": "TypeScript SDK for Gala Launchpad Backend API - 72 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, WebSocket event watchers, and comprehensive user operations. Multi-format output (ESM, CJS, UMD).",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"module": "dist/index.esm.js",
|
|
@@ -38,19 +38,39 @@
|
|
|
38
38
|
"test:watch": "jest --watch",
|
|
39
39
|
"test:coverage": "jest --coverage",
|
|
40
40
|
"test:ci": "jest --coverage --ci --watchAll=false",
|
|
41
|
-
"
|
|
42
|
-
"demo
|
|
43
|
-
"demo:
|
|
44
|
-
"demo:
|
|
45
|
-
"demo:
|
|
46
|
-
"demo:
|
|
47
|
-
"demo:liquidity
|
|
48
|
-
"demo:
|
|
49
|
-
"demo:
|
|
50
|
-
"demo:
|
|
51
|
-
"demo:
|
|
52
|
-
"demo:
|
|
53
|
-
"demo:
|
|
41
|
+
"test:integration": "jest --config jest.integration.config.js --forceExit",
|
|
42
|
+
"demo": "tsx examples/core/complete-sdk-demo.ts",
|
|
43
|
+
"demo:read-only": "tsx examples/core/read-only-operations.ts",
|
|
44
|
+
"demo:authenticated": "tsx examples/core/authenticated-operations.ts",
|
|
45
|
+
"demo:privatekey-override": "tsx examples/core/privatekey-override-pattern.ts",
|
|
46
|
+
"demo:trades": "tsx examples/bonding-curve/basic-trading.ts",
|
|
47
|
+
"demo:liquidity": "tsx examples/liquidity/positions-cli.ts",
|
|
48
|
+
"demo:liquidity:all": "tsx examples/liquidity/orchestrator.ts",
|
|
49
|
+
"demo:liquidity:detailed": "tsx examples/liquidity/detailed.ts",
|
|
50
|
+
"demo:liquidity:ticks": "tsx examples/liquidity/ticks.ts",
|
|
51
|
+
"demo:liquidity:portfolio": "tsx examples/liquidity/multi-position.ts",
|
|
52
|
+
"demo:liquidity:apr": "tsx examples/liquidity/apr-calculator.ts",
|
|
53
|
+
"demo:liquidity:errors": "tsx examples/liquidity/errors.ts",
|
|
54
|
+
"demo:liquidity:fetch-all": "tsx examples/liquidity/demo-fetch-all-positions.ts",
|
|
55
|
+
"demo:liquidity:positions-with-prices": "tsx examples/liquidity/demo-positions-with-chunked-pricing.ts",
|
|
56
|
+
"demo:cache": "tsx examples/utilities/demo-cache.ts",
|
|
57
|
+
"demo:dex": "tsx examples/dex/swap-workflow.ts",
|
|
58
|
+
"demo:dex:pools": "tsx examples/dex/pool-discovery.ts",
|
|
59
|
+
"demo:dex:pricing": "tsx examples/dex/pools-with-pricing.ts",
|
|
60
|
+
"demo:dex:quotes": "tsx examples/dex/quote-comparison.ts",
|
|
61
|
+
"demo:dex:roundtrip": "tsx examples/dex/demo-roundtrip-liquidity.ts",
|
|
62
|
+
"demo:watch": "tsx examples/monitoring/demo-watch-pools.ts",
|
|
63
|
+
"demo:watch:tokens": "tsx examples/monitoring/demo-watch-tokens.ts",
|
|
64
|
+
"demo:fees": "tsx examples/fees/demo-fee-generation-and-collection.ts",
|
|
65
|
+
"demo:fees:high-volume": "tsx examples/fees/demo-fees-high-volume.ts",
|
|
66
|
+
"demo:fees:test": "tsx examples/fees/complete-fee-test.ts",
|
|
67
|
+
"demo:fees:trade-collect": "tsx examples/fees/trade-and-collect-fees.ts",
|
|
68
|
+
"demo:liquidity:bundler-test": "tsx examples/liquidity/test-bundler-operations.ts",
|
|
69
|
+
"demo:liquidity:roundtrip-remove": "tsx examples/liquidity/demo-roundtrip-remove.ts",
|
|
70
|
+
"demo:liquidity:direct": "tsx examples/liquidity/demo-position-direct.ts",
|
|
71
|
+
"demo:token-supply": "tsx examples/utilities/demo-token-supply.ts",
|
|
72
|
+
"debug:websocket:stage": "ENVIRONMENT=stage tsx examples/debug/websocket-monitor.ts",
|
|
73
|
+
"debug:websocket:prod": "ENVIRONMENT=prod tsx examples/debug/websocket-monitor.ts",
|
|
54
74
|
"lint": "eslint src tests scripts --ext .ts,.tsx --fix",
|
|
55
75
|
"lint:check": "eslint src tests scripts --ext .ts,.tsx",
|
|
56
76
|
"typecheck": "tsc --noEmit",
|
|
@@ -139,6 +159,7 @@
|
|
|
139
159
|
"peerDependencies": {
|
|
140
160
|
"@gala-chain/api": "^2.4.3",
|
|
141
161
|
"@gala-chain/connect": "^2.4.3",
|
|
162
|
+
"@gala-chain/dex": "^1.0.26",
|
|
142
163
|
"axios": "^1.12.2",
|
|
143
164
|
"bignumber.js": "^9.1.2",
|
|
144
165
|
"ethers": "^6.15.0",
|
|
@@ -154,7 +175,7 @@
|
|
|
154
175
|
"dependencies": {
|
|
155
176
|
"@gala-chain/api": "^2.4.3",
|
|
156
177
|
"@gala-chain/connect": "^2.4.3",
|
|
157
|
-
"@gala-chain/
|
|
178
|
+
"@gala-chain/dex": "^1.0.26",
|
|
158
179
|
"@types/uuid": "^10.0.0",
|
|
159
180
|
"axios": "^1.12.2",
|
|
160
181
|
"bignumber.js": "^9.1.2",
|