@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,246 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Pool State Delta Type Definitions
|
|
3
|
+
*
|
|
4
|
+
* Contract definitions for pool state management and swap delta calculations.
|
|
5
|
+
* These types enable efficient tracking of pool state changes without full refetches.
|
|
6
|
+
*
|
|
7
|
+
* @packageDocumentation
|
|
8
|
+
*/
|
|
9
|
+
import type { Pool, TickData } from '@gala-chain/dex';
|
|
10
|
+
/**
|
|
11
|
+
* Data extracted from GalaChain swap transaction events
|
|
12
|
+
*
|
|
13
|
+
* Represents the raw data available from a completed swap transaction on-chain.
|
|
14
|
+
* Used as input to calculate the delta changes to pool state.
|
|
15
|
+
*
|
|
16
|
+
* @category Pool State
|
|
17
|
+
*/
|
|
18
|
+
export interface SwapEventData {
|
|
19
|
+
/** Unique transaction identifier (UUID format) */
|
|
20
|
+
transactionId: string;
|
|
21
|
+
/** Transaction timestamp (milliseconds since epoch) */
|
|
22
|
+
timestamp: number;
|
|
23
|
+
/** Amount specified in the swap (can be negative for exactOutput swaps) */
|
|
24
|
+
amountSpecified: string;
|
|
25
|
+
/** True if swapping token0 for token1, false if swapping token1 for token0 */
|
|
26
|
+
zeroForOne: boolean;
|
|
27
|
+
/** True for exact input swaps, false for exact output swaps */
|
|
28
|
+
exactInput: boolean;
|
|
29
|
+
/**
|
|
30
|
+
* Optional: Actual amount0 from chain (for validation)
|
|
31
|
+
* Negative values indicate token0 was spent, positive indicates received
|
|
32
|
+
*/
|
|
33
|
+
actualAmount0?: string;
|
|
34
|
+
/**
|
|
35
|
+
* Optional: Actual amount1 from chain (for validation)
|
|
36
|
+
* Negative values indicate token1 was spent, positive indicates received
|
|
37
|
+
*/
|
|
38
|
+
actualAmount1?: string;
|
|
39
|
+
/**
|
|
40
|
+
* Optional: Final sqrtPrice from chain (for validation)
|
|
41
|
+
* Used to detect drift between calculated and actual pool state
|
|
42
|
+
*/
|
|
43
|
+
actualSqrtPrice?: string;
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* Complete result of applying a swap delta to cached pool state
|
|
47
|
+
*
|
|
48
|
+
* Contains all state changes from processing a swap event, including updated
|
|
49
|
+
* pool parameters, tick data modifications, token amounts, fees, and metadata.
|
|
50
|
+
*
|
|
51
|
+
* @category Pool State
|
|
52
|
+
*/
|
|
53
|
+
export interface SwapDeltaResult {
|
|
54
|
+
/** Updated pool object with new sqrtPrice, liquidity, and tick */
|
|
55
|
+
updatedPool: Pool;
|
|
56
|
+
/**
|
|
57
|
+
* Only ticks that changed during the swap
|
|
58
|
+
* Record key is tick index as string, value is updated TickData
|
|
59
|
+
*/
|
|
60
|
+
updatedTicks: Record<string, TickData>;
|
|
61
|
+
/**
|
|
62
|
+
* Token0 amount in the swap
|
|
63
|
+
* Negative if token0 was spent, positive if received
|
|
64
|
+
*/
|
|
65
|
+
amount0: BigNumber;
|
|
66
|
+
/**
|
|
67
|
+
* Token1 amount in the swap
|
|
68
|
+
* Negative if token1 was spent, positive if received
|
|
69
|
+
*/
|
|
70
|
+
amount1: BigNumber;
|
|
71
|
+
/** Fee collected in token0 during the swap */
|
|
72
|
+
feeAmount0: BigNumber;
|
|
73
|
+
/** Fee collected in token1 during the swap */
|
|
74
|
+
feeAmount1: BigNumber;
|
|
75
|
+
/**
|
|
76
|
+
* Array of tick indices that were crossed during the swap
|
|
77
|
+
* Ticks are crossed when price moves through a liquidity boundary
|
|
78
|
+
*/
|
|
79
|
+
ticksCrossed: number[];
|
|
80
|
+
/** Calculation metadata and diagnostics */
|
|
81
|
+
metadata: {
|
|
82
|
+
/** Time taken to calculate applySwapDelta (milliseconds) */
|
|
83
|
+
calculationTimeMs: number;
|
|
84
|
+
/** Number of iterations through the swap calculation loop */
|
|
85
|
+
swapSteps: number;
|
|
86
|
+
/** True if price reached sqrtPriceLimit before consuming all input */
|
|
87
|
+
priceHitLimit: boolean;
|
|
88
|
+
/**
|
|
89
|
+
* Optional: Drift percentage from actual on-chain data
|
|
90
|
+
* Only present if validation data (actualAmount0/1, actualSqrtPrice) was provided
|
|
91
|
+
* Represents % difference between calculated and actual values
|
|
92
|
+
*/
|
|
93
|
+
driftPercentage?: number;
|
|
94
|
+
};
|
|
95
|
+
}
|
|
96
|
+
/**
|
|
97
|
+
* Tracking information for cached pool state
|
|
98
|
+
*
|
|
99
|
+
* Maintains metadata about the pool cache state to determine when
|
|
100
|
+
* a full refetch is necessary vs. when delta updates are sufficient.
|
|
101
|
+
*
|
|
102
|
+
* @category Pool State
|
|
103
|
+
*/
|
|
104
|
+
export interface PoolStateMetadata {
|
|
105
|
+
/**
|
|
106
|
+
* Timestamp of last full fetchCompositePoolData call
|
|
107
|
+
* Milliseconds since epoch
|
|
108
|
+
*/
|
|
109
|
+
lastFullRefetch: number;
|
|
110
|
+
/**
|
|
111
|
+
* Count of swap deltas applied since last refetch
|
|
112
|
+
* Used to trigger refetch after N swaps to prevent drift accumulation
|
|
113
|
+
*/
|
|
114
|
+
swapsSinceRefetch: number;
|
|
115
|
+
/**
|
|
116
|
+
* Accumulated drift percentage across all swaps since refetch
|
|
117
|
+
* Sum of absolute drift values from validation checks
|
|
118
|
+
*/
|
|
119
|
+
cumulativeDrift: number;
|
|
120
|
+
/**
|
|
121
|
+
* Transaction IDs we've already processed
|
|
122
|
+
* Prevents duplicate processing of the same swap event
|
|
123
|
+
*/
|
|
124
|
+
processedTransactions: string[];
|
|
125
|
+
/**
|
|
126
|
+
* Hash of critical pool state for validation
|
|
127
|
+
* Used to detect external modifications to pool state
|
|
128
|
+
* Typically hash of: sqrtPrice + liquidity + tick + token0Balance + token1Balance
|
|
129
|
+
*/
|
|
130
|
+
stateHash: string;
|
|
131
|
+
}
|
|
132
|
+
/**
|
|
133
|
+
* Result of pool state validation checks
|
|
134
|
+
*
|
|
135
|
+
* Indicates whether cached pool state is still reliable or if a refetch is needed.
|
|
136
|
+
* Provides diagnostic information about detected drift and validation failures.
|
|
137
|
+
*
|
|
138
|
+
* @category Pool State
|
|
139
|
+
*/
|
|
140
|
+
export interface PoolStateValidationResult {
|
|
141
|
+
/** True if cached pool state passes validation checks */
|
|
142
|
+
isValid: boolean;
|
|
143
|
+
/**
|
|
144
|
+
* Percentage difference detected between calculated and actual values
|
|
145
|
+
* 0.001 = 0.1% drift
|
|
146
|
+
*/
|
|
147
|
+
driftPercentage: number;
|
|
148
|
+
/** True if a full refetch is recommended */
|
|
149
|
+
shouldRefetch: boolean;
|
|
150
|
+
/**
|
|
151
|
+
* Reason for refetch recommendation (if shouldRefetch is true)
|
|
152
|
+
* - 'drift': Accumulated drift exceeded threshold
|
|
153
|
+
* - 'swap-count': Too many swaps applied since refetch
|
|
154
|
+
* - 'time-elapsed': Too much time passed since refetch
|
|
155
|
+
* - 'tick-mismatch': Tick and price are inconsistent
|
|
156
|
+
* - 'manual': Manual validation failure
|
|
157
|
+
* - 'missing-tick-data': Required tick data not in cache
|
|
158
|
+
*/
|
|
159
|
+
refetchReason?: 'drift' | 'swap-count' | 'time-elapsed' | 'tick-mismatch' | 'manual' | 'missing-tick-data';
|
|
160
|
+
/**
|
|
161
|
+
* List of specific validation failures detected
|
|
162
|
+
* Empty array if no failures
|
|
163
|
+
*/
|
|
164
|
+
validationErrors: string[];
|
|
165
|
+
}
|
|
166
|
+
/**
|
|
167
|
+
* Internal state tracked during swap calculation
|
|
168
|
+
*
|
|
169
|
+
* Represents the mutable state that changes as the swap progresses
|
|
170
|
+
* through multiple tick boundaries.
|
|
171
|
+
*
|
|
172
|
+
* @internal
|
|
173
|
+
* @category Pool State
|
|
174
|
+
*/
|
|
175
|
+
export interface InternalSwapState {
|
|
176
|
+
/** Current square root price (Q64.96 format) */
|
|
177
|
+
sqrtPrice: BigNumber;
|
|
178
|
+
/** Current available liquidity */
|
|
179
|
+
liquidity: BigNumber;
|
|
180
|
+
/** Current tick index */
|
|
181
|
+
tick: number;
|
|
182
|
+
/**
|
|
183
|
+
* Remaining amount of the specified token to swap
|
|
184
|
+
* Decreases as swap progresses
|
|
185
|
+
*/
|
|
186
|
+
amountSpecifiedRemaining: BigNumber;
|
|
187
|
+
/**
|
|
188
|
+
* Accumulated output amount calculated so far
|
|
189
|
+
* Increases as swap progresses
|
|
190
|
+
*/
|
|
191
|
+
amountCalculated: BigNumber;
|
|
192
|
+
/** Global fee growth for token0 (or token1 depending on direction) */
|
|
193
|
+
feeGrowthGlobalX: BigNumber;
|
|
194
|
+
/** Accumulated protocol fees */
|
|
195
|
+
protocolFee: BigNumber;
|
|
196
|
+
}
|
|
197
|
+
/**
|
|
198
|
+
* Result of a single swap step calculation
|
|
199
|
+
*
|
|
200
|
+
* Represents the changes from moving from one tick boundary to the next
|
|
201
|
+
* (or to the target price if reached first).
|
|
202
|
+
*
|
|
203
|
+
* @internal
|
|
204
|
+
* @category Pool State
|
|
205
|
+
*/
|
|
206
|
+
export interface SwapStepResult {
|
|
207
|
+
/** Square root price at the start of this step */
|
|
208
|
+
sqrtPriceStart: BigNumber;
|
|
209
|
+
/** Next tick boundary index */
|
|
210
|
+
tickNext: number;
|
|
211
|
+
/** Square root price at the next tick (or target price) */
|
|
212
|
+
sqrtPriceNext: BigNumber;
|
|
213
|
+
/** True if the next tick boundary is initialized with liquidity */
|
|
214
|
+
initialised: boolean;
|
|
215
|
+
/** Output token amount for this step */
|
|
216
|
+
amountOut: BigNumber;
|
|
217
|
+
/** Input token amount for this step */
|
|
218
|
+
amountIn: BigNumber;
|
|
219
|
+
/** Fee amount collected in this step */
|
|
220
|
+
feeAmount: BigNumber;
|
|
221
|
+
}
|
|
222
|
+
/**
|
|
223
|
+
* Event data for crossing a tick boundary
|
|
224
|
+
*
|
|
225
|
+
* Tracks liquidity changes when price moves through a tick,
|
|
226
|
+
* which affects available liquidity for subsequent swap steps.
|
|
227
|
+
*
|
|
228
|
+
* @internal
|
|
229
|
+
* @category Pool State
|
|
230
|
+
*/
|
|
231
|
+
export interface TickCrossingEvent {
|
|
232
|
+
/** Tick index that was crossed */
|
|
233
|
+
tick: number;
|
|
234
|
+
/** Direction of crossing ('up' = price increased, 'down' = price decreased) */
|
|
235
|
+
direction: 'up' | 'down';
|
|
236
|
+
/**
|
|
237
|
+
* Net liquidity change at this tick
|
|
238
|
+
* Positive when crossing up, negative when crossing down
|
|
239
|
+
*/
|
|
240
|
+
liquidityNet: BigNumber;
|
|
241
|
+
/** Liquidity before crossing this tick */
|
|
242
|
+
liquidityBefore: BigNumber;
|
|
243
|
+
/** Liquidity after crossing this tick */
|
|
244
|
+
liquidityAfter: BigNumber;
|
|
245
|
+
}
|
|
246
|
+
//# sourceMappingURL=pool-state-delta.dto.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pool-state-delta.dto.d.ts","sourceRoot":"","sources":["../../src/types/pool-state-delta.dto.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAGtD;;;;;;;GAOG;AACH,MAAM,WAAW,aAAa;IAC5B,kDAAkD;IAClD,aAAa,EAAE,MAAM,CAAC;IAEtB,uDAAuD;IACvD,SAAS,EAAE,MAAM,CAAC;IAElB,2EAA2E;IAC3E,eAAe,EAAE,MAAM,CAAC;IAExB,8EAA8E;IAC9E,UAAU,EAAE,OAAO,CAAC;IAEpB,+DAA+D;IAC/D,UAAU,EAAE,OAAO,CAAC;IAEpB;;;OAGG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;IAEvB;;;OAGG;IACH,aAAa,CAAC,EAAE,M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|
+
*
|
|
4
|
+
* Configuration options for controlling PoolStateManager behavior,
|
|
5
|
+
* including drift thresholds, refetch triggers, and optimization flags.
|
|
6
|
+
*
|
|
7
|
+
* @packageDocumentation
|
|
8
|
+
*/
|
|
9
|
+
/**
|
|
10
|
+
* Configuration for PoolStateManager behavior
|
|
11
|
+
*
|
|
12
|
+
* Controls when cached pool state should be refreshed vs. updated with deltas,
|
|
13
|
+
* and enables performance/debugging optimizations.
|
|
14
|
+
*
|
|
15
|
+
* @category Pool State
|
|
16
|
+
* @example
|
|
17
|
+
* ```typescript
|
|
18
|
+
* const config: PoolStateManagerConfig = {
|
|
19
|
+
* maxDriftThreshold: 0.001, // 0.1% max drift before refetch
|
|
20
|
+
* refetchAfterSwaps: 20, // Refetch every 20 swaps
|
|
21
|
+
* refetchAfterMs: 120000, // Refetch every 2 minutes
|
|
22
|
+
* enableAggressiveValidation: true, // Validate on every swap
|
|
23
|
+
* enableBigNumberCache: true, // Cache BigNumber instances
|
|
24
|
+
* logDriftWarnings: true // Log when drift detected
|
|
25
|
+
* };
|
|
26
|
+
* ```
|
|
27
|
+
*/
|
|
28
|
+
export interface PoolStateManagerConfig {
|
|
29
|
+
/**
|
|
30
|
+
* Maximum allowable drift percentage before triggering refetch
|
|
31
|
+
*
|
|
32
|
+
* Drift is measured as the percentage difference between calculated
|
|
33
|
+
* pool state and actual on-chain state (when validation data is available).
|
|
34
|
+
*
|
|
35
|
+
* @example
|
|
36
|
+
* - 0.001 = 0.1% drift threshold (tight tolerance, frequent refetches)
|
|
37
|
+
* - 0.01 = 1.0% drift threshold (loose tolerance, fewer refetches)
|
|
38
|
+
*
|
|
39
|
+
* @default 0.001 (0.1%)
|
|
40
|
+
*/
|
|
41
|
+
maxDriftThreshold: number;
|
|
42
|
+
/**
|
|
43
|
+
* Trigger full refetch after this many swap deltas applied
|
|
44
|
+
*
|
|
45
|
+
* Prevents unbounded drift accumulation by forcing periodic refetches
|
|
46
|
+
* even if drift threshold hasn't been exceeded.
|
|
47
|
+
*
|
|
48
|
+
* @example
|
|
49
|
+
* - 20 = refetch after 20 swaps
|
|
50
|
+
* - 100 = refetch after 100 swaps (less frequent, more drift risk)
|
|
51
|
+
*
|
|
52
|
+
* @default 20
|
|
53
|
+
*/
|
|
54
|
+
refetchAfterSwaps: number;
|
|
55
|
+
/**
|
|
56
|
+
* Trigger full refetch after this many milliseconds elapsed
|
|
57
|
+
*
|
|
58
|
+
* Time-based refetch ensures cached data doesn't become stale
|
|
59
|
+
* even if swap volume is low.
|
|
60
|
+
*
|
|
61
|
+
* @example
|
|
62
|
+
* - 60000 = refetch every 1 minute
|
|
63
|
+
* - 120000 = refetch every 2 minutes
|
|
64
|
+
* - 300000 = refetch every 5 minutes
|
|
65
|
+
*
|
|
66
|
+
* @default 120000 (2 minutes)
|
|
67
|
+
*/
|
|
68
|
+
refetchAfterMs: number;
|
|
69
|
+
/**
|
|
70
|
+
* Enable validation on every swap delta application
|
|
71
|
+
*
|
|
72
|
+
* When true, compares calculated state against actual on-chain data
|
|
73
|
+
* (if available) after every swap. Slower but provides early drift detection.
|
|
74
|
+
*
|
|
75
|
+
* When false, only validates when refetch conditions are met.
|
|
76
|
+
*
|
|
77
|
+
* @default false (validate only on refetch conditions)
|
|
78
|
+
*/
|
|
79
|
+
enableAggressiveValidation: boolean;
|
|
80
|
+
/**
|
|
81
|
+
* Enable caching of BigNumber instances for performance
|
|
82
|
+
*
|
|
83
|
+
* When true, reuses BigNumber instances for common values (e.g., zero, one)
|
|
84
|
+
* to reduce garbage collection pressure in high-frequency trading scenarios.
|
|
85
|
+
*
|
|
86
|
+
* When false, creates new BigNumber instances every time.
|
|
87
|
+
*
|
|
88
|
+
* @default true
|
|
89
|
+
*/
|
|
90
|
+
enableBigNumberCache: boolean;
|
|
91
|
+
/**
|
|
92
|
+
* Enable logging of drift warnings
|
|
93
|
+
*
|
|
94
|
+
* When true, logs warning messages when drift is detected but still
|
|
95
|
+
* below the refetch threshold. Useful for monitoring cache health.
|
|
96
|
+
*
|
|
97
|
+
* When false, only logs when refetch is triggered.
|
|
98
|
+
*
|
|
99
|
+
* @default true
|
|
100
|
+
*/
|
|
101
|
+
logDriftWarnings: boolean;
|
|
102
|
+
}
|
|
103
|
+
//# sourceMappingURL=pool-state-manager-config.dto.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pool-state-manager-config.dto.d.ts","sourceRoot":"","sources":["../../src/types/pool-state-manager-config.dto.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH;;;;;;;;;;;;;;;;;;GAkBG;AACH,MAAM,WAAW,sBAAsB;IACrC;;;;;;;;;;;OAWG;IACH,iBAAiB,EAAE,MAAM,CAAC;IAE1B;;;;;;;;;;;OAWG;IACH,iBAAiB,EAAE,MAAM,CAAC;IAE1B;;;;;;;;;;;;OAYG;IACH,cAAc,EAAE,MAAM,CAAC;IAEvB;;;;;;;;;OASG;IACH,0BAA0B,EAAE,OAAO,CAAC;IAEpC;;;;;;;;;OASG;IACH,oBAAoB,EAAE,OAAO,CAAC;IAE9B;;;;;;;;;OASG;IACH,gBAAgB,EAAE,OAAO,CAAC;CAC3B"}
|
|
@@ -74,6 +74,80 @@ export interface AutoPaginationResult<T> {
|
|
|
74
74
|
* @since 3.32.0
|
|
75
75
|
*/
|
|
76
76
|
export declare function autoPaginate<T>(fetchFn: (page: number, limit: number) => Promise<PaginatedResult<T>>, options?: AutoPaginationOptions): Promise<AutoPaginationResult<T>>;
|
|
77
|
+
/**
|
|
78
|
+
* Result object from bookmark-based API calls
|
|
79
|
+
* Returned by fetchFn in autoPaginateWithBookmark
|
|
80
|
+
*/
|
|
81
|
+
export interface BookmarkPaginationResult<T> {
|
|
82
|
+
/** Array of items returned from this page */
|
|
83
|
+
items: T[];
|
|
84
|
+
/** Bookmark/cursor for fetching the next page
|
|
85
|
+
* - undefined: field was not present in API response
|
|
86
|
+
* - empty string "": API signals last page reached
|
|
87
|
+
* - non-empty string: bookmark to use for next request
|
|
88
|
+
*/
|
|
89
|
+
nextBookmark: string | undefined;
|
|
90
|
+
}
|
|
91
|
+
/**
|
|
92
|
+
* Options for bookmark-based auto-pagination
|
|
93
|
+
* Used for APIs that use cursor-based pagination (bookmarks) instead of page numbers
|
|
94
|
+
*/
|
|
95
|
+
export interface AutoPaginationWithBookmarkOptions {
|
|
96
|
+
/** Maximum number of pages to fetch (safety limit to prevent infinite loops) */
|
|
97
|
+
maxPages?: number;
|
|
98
|
+
/** Logger instance for debug output */
|
|
99
|
+
logger?: Logger;
|
|
100
|
+
/** Page size to use for each request */
|
|
101
|
+
pageSize?: number;
|
|
102
|
+
}
|
|
103
|
+
/**
|
|
104
|
+
* Bookmark-based auto-pagination handler
|
|
105
|
+
*
|
|
106
|
+
* Automatically iterates through all pages of bookmark-based paginated API results
|
|
107
|
+
* (cursor-based pagination) and combines them into a single array.
|
|
108
|
+
*
|
|
109
|
+
* Used for APIs that return bookmarks/cursors instead of page numbers (e.g., GSwap positions API).
|
|
110
|
+
* Handles common patterns like:
|
|
111
|
+
* - Safety limits to prevent infinite loops
|
|
112
|
+
* - Empty result detection
|
|
113
|
+
* - Debug logging of pagination progress
|
|
114
|
+
* - Proper bookmark extraction from API responses
|
|
115
|
+
* - Dual completion detection (no nextBookmark OR fewer items than requested)
|
|
116
|
+
*
|
|
117
|
+
* @typeParam T - Type of items being paginated
|
|
118
|
+
* @param fetchFn Function that fetches a single page and returns items with optional nextBookmark.
|
|
119
|
+
* Should return { items: T[], nextBookmark?: string }.
|
|
120
|
+
* If bookmark is undefined, fetches first page.
|
|
121
|
+
* @param options Pagination options (maxPages, logger, pageSize)
|
|
122
|
+
* @returns Promise<AutoPaginationResult> All items combined from all pages
|
|
123
|
+
*
|
|
124
|
+
* @example Basic usage with bookmark-returning API
|
|
125
|
+
* ```typescript
|
|
126
|
+
* const result = await autoPaginateWithBookmark(
|
|
127
|
+
* async (bookmark, pageSize) => {
|
|
128
|
+
* const response = await api.getPositions({ bookmark, limit: pageSize });
|
|
129
|
+
* return {
|
|
130
|
+
* items: response.positions,
|
|
131
|
+
* nextBookmark: response.metadata?.nextBookmark
|
|
132
|
+
* };
|
|
133
|
+
* },
|
|
134
|
+
* { maxPages: 1000, pageSize: 10, logger }
|
|
135
|
+
* );
|
|
136
|
+
* console.log(`Total fetched: ${result.items.length}`);
|
|
137
|
+
* ```
|
|
138
|
+
*
|
|
139
|
+
* @example Legacy: Returns items array directly (uses item count for completion)
|
|
140
|
+
* ```typescript
|
|
141
|
+
* const result = await autoPaginateWithBookmark(
|
|
142
|
+
* (bookmark, pageSize) => service.getPositions(walletAddress, pageSize, bookmark),
|
|
143
|
+
* { maxPages: 1000, pageSize: 10, logger }
|
|
144
|
+
* );
|
|
145
|
+
* ```
|
|
146
|
+
*
|
|
147
|
+
* @since 3.32.0
|
|
148
|
+
* @since 3.33.0 - Enhanced to support true bookmark-based pagination with BookmarkPaginationResult<T>
|
|
149
|
+
*/
|
|
150
|
+
export declare function autoPaginateWithBookmark<T>(fetchFn: (bookmark: string | undefined, pageSize: number) => Promise<BookmarkPaginationResult<T> | T[]>, options?: AutoPaginationWithBookmarkOptions): Promise<AutoPaginationResult<T>>;
|
|
77
151
|
/**
|
|
78
152
|
* Build paginated result object for returning combined auto-paginated data
|
|
79
153
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"auto-pagination.d.ts","sourceRoot":"","sources":["../../src/utils/auto-pagination.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAElC;;;GAGG;AACH,MAAM,WAAW,eAAe,CAAC,CAAC;IAChC,6CAA6C;IAC7C,KAAK,EAAE,CAAC,EAAE,CAAC;IACX,0BAA0B;IAC1B,IAAI,EAAE,MAAM,CAAC;IACb,uCAAuC;IACvC,KAAK,EAAE,MAAM,CAAC;IACd,gDAAgD;IAChD,KAAK,EAAE,MAAM,CAAC;IACd,sCAAsC;IACtC,UAAU,EAA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C;IAChB,wCAAwC;IACxC,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8CG;AACH,wBAAsB,wBAAwB,CAAC,CAAC,EAC9C,OAAO,EAAE,CAAC,QAAQ,EAAE,MAAM,GAAG,SAAS,EAAE,QAAQ,EAAE,MAAM,KAAK,OAAO,CAAC,wBAAwB,CAAC,CAAC,CAAC,GAAG,CAAC,EAAE,CAAC,EACvG,OAAO,GAAE,iCAAsC,GAC9C,OAAO,CAAC,oBAAoB,CAAC,CAAC,CAAC,CAAC,CAqHlC;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqDG;AACH,wBAAgB,oBAAoB,CAAC,CAAC,EACpC,KAAK,EAAE,CAAC,EAAE,EACV,KAAK,GAAE,MAAqB,EAC5B,QAAQ,GAAE,OAAO,GAAG,OAAO,GAAG,WAAW,GAAG,UAAU,GAAG,MAAgB,GACxE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAerB"}
|
|
@@ -88,11 +88,11 @@ export declare function calculateSlippageFactor(tolerance?: number): BigNumber;
|
|
|
88
88
|
/**
|
|
89
89
|
* Convert tick to sqrt ratio for liquidity calculations
|
|
90
90
|
*
|
|
91
|
-
*
|
|
92
|
-
*
|
|
91
|
+
* Re-exports tickToSqrtPrice from @gala-chain/dex for Uniswap V3 liquidity calculations.
|
|
92
|
+
* Maintained as a wrapper for backward compatibility.
|
|
93
93
|
*
|
|
94
94
|
* @param tick The tick value from the pool
|
|
95
|
-
* @returns Sqrt
|
|
95
|
+
* @returns Sqrt price in Q64.96 format
|
|
96
96
|
*
|
|
97
97
|
* @example
|
|
98
98
|
* ```typescript
|
|
@@ -100,8 +100,28 @@ export declare function calculateSlippageFactor(tolerance?: number): BigNumber;
|
|
|
100
100
|
* const upperSqrtRatio = tickToSqrtRatio(tickUpper);
|
|
101
101
|
* const liquidityNeeded = calculateLiquidity(lowerSqrtRatio, upperSqrtRatio, ...);
|
|
102
102
|
* ```
|
|
103
|
+
*
|
|
104
|
+
* @deprecated This is a wrapper around @gala-chain/dex's tickToSqrtPrice.
|
|
105
|
+
* Consider importing tickToSqrtPrice directly for new code.
|
|
103
106
|
*/
|
|
104
107
|
export declare function tickToSqrtRatio(tick: number): BigNumber;
|
|
108
|
+
/**
|
|
109
|
+
* Convert a price to tick (Uniswap V3 math)
|
|
110
|
+
*
|
|
111
|
+
* Calculates the tick index from a price using production-grade @gala-chain/dex math.
|
|
112
|
+
* Formula: tick = log_1.0001(price)
|
|
113
|
+
*
|
|
114
|
+
* @param price The price value to convert to a tick
|
|
115
|
+
* @returns Tick index (can be negative or positive)
|
|
116
|
+
*
|
|
117
|
+
* @example
|
|
118
|
+
* ```typescript
|
|
119
|
+
* const tick = priceToTick('1.5'); // Convert price 1.5 to tick
|
|
120
|
+
* const tickFloor = Math.floor(priceToTick('0.99')); // Round down for tickLower
|
|
121
|
+
* const tickCeil = Math.ceil(priceToTick('1.01')); // Round up for tickUpper
|
|
122
|
+
* ```
|
|
123
|
+
*/
|
|
124
|
+
export declare function priceToTick(price: string | number | BigNumber): number;
|
|
105
125
|
/**
|
|
106
126
|
* Invert a price (calculate 1 / price)
|
|
107
127
|
*
|
|
@@ -261,4 +281,56 @@ export declare function increaseByPercentage(value: string | number | BigNumber,
|
|
|
261
281
|
* ```
|
|
262
282
|
*/
|
|
263
283
|
export declare function decreaseByPercentage(value: string | number | BigNumber, percentage: number): BigNumber;
|
|
284
|
+
/**
|
|
285
|
+
* Validates that BigNumber values are strictly positive (> 0).
|
|
286
|
+
*
|
|
287
|
+
* Throws an error if any value is zero or negative. Provides clear error messages
|
|
288
|
+
* with parameter indices for debugging.
|
|
289
|
+
*
|
|
290
|
+
* @param values The values to validate
|
|
291
|
+
* @throws Error if any value is not positive
|
|
292
|
+
*
|
|
293
|
+
* @example
|
|
294
|
+
* ```typescript
|
|
295
|
+
* requirePositive(liquidity, amountIn); // Throws if either is <= 0
|
|
296
|
+
* requirePositive(amount); // Single value validation
|
|
297
|
+
* ```
|
|
298
|
+
*/
|
|
299
|
+
export declare function requirePositive(...values: BigNumber[]): void;
|
|
300
|
+
/**
|
|
301
|
+
* Validates that BigNumber values are non-negative (>= 0).
|
|
302
|
+
*
|
|
303
|
+
* Throws an error if any value is negative. Allows zero values, unlike requirePositive.
|
|
304
|
+
* Useful for optional amounts that default to zero.
|
|
305
|
+
*
|
|
306
|
+
* @param values The values to validate
|
|
307
|
+
* @throws Error if any value is negative
|
|
308
|
+
*
|
|
309
|
+
* @example
|
|
310
|
+
* ```typescript
|
|
311
|
+
* requireNonNegative(fees, collectedFees); // Allows zero but not negative
|
|
312
|
+
* ```
|
|
313
|
+
*/
|
|
314
|
+
export declare function requireNonNegative(...values: BigNumber[]): void;
|
|
315
|
+
/**
|
|
316
|
+
* Validates a BigNumber with a custom parameter name and optional context.
|
|
317
|
+
*
|
|
318
|
+
* Provides descriptive error messages for better debugging in specific use cases.
|
|
319
|
+
* Throws an error if value is not positive (> 0).
|
|
320
|
+
*
|
|
321
|
+
* @param value The value to validate
|
|
322
|
+
* @param paramName The parameter name for the error message
|
|
323
|
+
* @param context Optional additional context (e.g., "for swap operation")
|
|
324
|
+
* @throws Error with descriptive message if value is not positive
|
|
325
|
+
*
|
|
326
|
+
* @example
|
|
327
|
+
* ```typescript
|
|
328
|
+
* requirePositiveWithContext(amount, 'amountIn', 'for swap');
|
|
329
|
+
* // Throws: "amountIn must be positive for swap, got: 0"
|
|
330
|
+
*
|
|
331
|
+
* requirePositiveWithContext(liquidity, 'liquidity');
|
|
332
|
+
* // Throws: "liquidity must be positive, got: -1"
|
|
333
|
+
* ```
|
|
334
|
+
*/
|
|
335
|
+
export declare function requirePositiveWithContext(value: BigNumber, paramName: string, context?: string): void;
|
|
264
336
|
//# sourceMappingURL=bignumber-helpers.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bignumber-helpers.d.ts","sourceRoot":"","sources":["../../src/utils/bignumber-helpers.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,SAAS,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"bignumber-helpers.d.ts","sourceRoot":"","sources":["../../src/utils/bignumber-helpers.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,SAAS,MAAM,cAAc,CAAC;AAGrC;;;;;;;;;;;;GAYG;AACH,wBAAgB,WAAW,CACzB,KAAK,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,GAAG,IAAI,GAAG,SAAS,EACrD,YAAY,GAAE,MAAM,GAAG,MAAY,GAClC,SAAS,CAKX;AAED;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,gBAAgB,CAC9B,KAAK,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,GAAG,IAAI,GAAG,SAAS,EACrD,QAAQ,CAAC,EAAE,MAAM,GAChB,MAAM,CAER;AAED;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,wBAAgB,+BAA+B,CAC7C,eAAe,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,EAC5C,iBAAiB,GAAE,MAAa,GAC/B,SAAS,CAIX;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,uBAAuB,CAAC,SAAS,GAAE,MAAa,GAAG,SAAS,CAE3E;AAED;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,eAAe,CAAC,IAAI,EAAE,MAAM,GAAG,SAAS,CAGvD;AAED;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,WAAW,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,GAAG,MAAM,CAKtE;AAED;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,WAAW,CACzB,KAAK,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,EAClC,OAAO,GAAE,OAAe,GACvB,SAAS,GAAG,MAA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