@orca-so/whirlpools-core 0.4.3 → 1.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,73 +1,73 @@
1
1
  /* tslint:disable */
2
2
  /* eslint-disable */
3
3
  export const memory: WebAssembly.Memory;
4
- export function getTickArrayStartTickIndex(a: number, b: number): number;
5
- export function tickIndexToSqrtPrice(a: number): number;
6
- export function sqrtPriceToTickIndex(a: number): number;
7
- export function getInitializableTickIndex(a: number, b: number, c: number): number;
8
- export function getPrevInitializableTickIndex(a: number, b: number): number;
9
- export function getNextInitializableTickIndex(a: number, b: number): number;
10
- export function isTickIndexInBounds(a: number): number;
11
- export function isTickInitializable(a: number, b: number): number;
12
- export function invertTickIndex(a: number): number;
13
- export function invertSqrtPrice(a: number): number;
14
- export function getFullRangeTickIndexes(a: number): number;
15
- export function orderTickIndexes(a: number, b: number): number;
16
- export function isFullRangeOnly(a: number): number;
17
- export function getTickIndexInArray(a: number, b: number, c: number, d: number): void;
18
- export function _TICK_ARRAY_NOT_EVENLY_SPACED(a: number): void;
19
- export function _TICK_INDEX_OUT_OF_BOUNDS(a: number): void;
20
- export function _INVALID_TICK_INDEX(a: number): void;
21
- export function _ARITHMETIC_OVERFLOW(a: number): void;
22
- export function _AMOUNT_EXCEEDS_MAX_U64(a: number): void;
23
- export function _SQRT_PRICE_OUT_OF_BOUNDS(a: number): void;
24
- export function _TICK_SEQUENCE_EMPTY(a: number): void;
25
- export function _SQRT_PRICE_LIMIT_OUT_OF_BOUNDS(a: number): void;
26
- export function _INVALID_SQRT_PRICE_LIMIT_DIRECTION(a: number): void;
27
- export function _ZERO_TRADABLE_AMOUNT(a: number): void;
28
- export function _INVALID_TIMESTAMP(a: number): void;
29
- export function _INVALID_TRANSFER_FEE(a: number): void;
30
- export function _INVALID_SLIPPAGE_TOLERANCE(a: number): void;
31
- export function _TICK_INDEX_NOT_IN_ARRAY(a: number): void;
32
- export function isPositionInRange(a: number, b: number, c: number): number;
33
- export function positionStatus(a: number, b: number, c: number): number;
34
- export function positionRatio(a: number, b: number, c: number): number;
35
- export function decreaseLiquidityQuote(a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number): void;
36
- export function decreaseLiquidityQuoteA(a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number): void;
37
- export function decreaseLiquidityQuoteB(a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number): void;
38
- export function increaseLiquidityQuote(a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number): void;
39
- export function increaseLiquidityQuoteA(a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number): void;
40
- export function increaseLiquidityQuoteB(a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number): void;
41
- export function tryGetAmountDeltaA(a: number, b: number, c: number, d: number, e: number): void;
42
- export function tryGetAmountDeltaB(a: number, b: number, c: number, d: number, e: number): void;
43
- export function tryGetNextSqrtPriceFromA(a: number, b: number, c: number, d: number, e: number): void;
44
- export function tryGetNextSqrtPriceFromB(a: number, b: number, c: number, d: number, e: number): void;
45
- export function tryApplyTransferFee(a: number, b: number, c: number): void;
46
- export function tryReverseApplyTransferFee(a: number, b: number, c: number): void;
47
- export function tryGetMaxAmountWithSlippageTolerance(a: number, b: number, c: number): void;
48
- export function tryGetMinAmountWithSlippageTolerance(a: number, b: number, c: number): void;
49
- export function tryApplySwapFee(a: number, b: number, c: number): void;
50
- export function tryReverseApplySwapFee(a: number, b: number, c: number): void;
51
- export function priceToSqrtPrice(a: number, b: number, c: number): number;
52
- export function sqrtPriceToPrice(a: number, b: number, c: number): number;
53
- export function invertPrice(a: number, b: number, c: number): number;
54
- export function tickIndexToPrice(a: number, b: number, c: number): number;
55
- export function priceToTickIndex(a: number, b: number, c: number): number;
56
- export function swapQuoteByInputToken(a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number): void;
57
- export function swapQuoteByOutputToken(a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number): void;
58
- export function collectFeesQuote(a: number, b: number, c: number, d: number, e: number, f: number, g: number): void;
59
- export function collectRewardsQuote(a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number): void;
60
- export function _POSITION_BUNDLE_SIZE(): number;
61
- export function _NUM_REWARDS(): number;
62
- export function _FEE_RATE_DENOMINATOR(): number;
63
- export function _TICK_ARRAY_SIZE(): number;
64
- export function _FULL_RANGE_ONLY_TICK_SPACING_THRESHOLD(): number;
65
- export function _MIN_TICK_INDEX(): number;
66
- export function _MAX_TICK_INDEX(): number;
67
- export function firstUnoccupiedPositionInBundle(a: number, b: number, c: number): void;
68
- export function isPositionBundleFull(a: number, b: number): number;
69
- export function isPositionBundleEmpty(a: number, b: number): number;
70
- export function __wbindgen_export_0(a: number, b: number): number;
71
- export function __wbindgen_export_1(a: number, b: number, c: number, d: number): number;
72
- export function __wbindgen_export_2(a: number): void;
73
- export function __wbindgen_add_to_stack_pointer(a: number): number;
4
+ export const decreaseLiquidityQuote: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number) => void;
5
+ export const decreaseLiquidityQuoteA: (a: number, b: bigint, c: number, d: number, e: number, f: number, g: number, h: number) => void;
6
+ export const decreaseLiquidityQuoteB: (a: number, b: bigint, c: number, d: number, e: number, f: number, g: number, h: number) => void;
7
+ export const increaseLiquidityQuote: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number) => void;
8
+ export const increaseLiquidityQuoteA: (a: number, b: bigint, c: number, d: number, e: number, f: number, g: number, h: number) => void;
9
+ export const increaseLiquidityQuoteB: (a: number, b: bigint, c: number, d: number, e: number, f: number, g: number, h: number) => void;
10
+ export const getTickArrayStartTickIndex: (a: number, b: number) => number;
11
+ export const tickIndexToSqrtPrice: (a: number) => number;
12
+ export const sqrtPriceToTickIndex: (a: number) => number;
13
+ export const getInitializableTickIndex: (a: number, b: number, c: number) => number;
14
+ export const getPrevInitializableTickIndex: (a: number, b: number) => number;
15
+ export const getNextInitializableTickIndex: (a: number, b: number) => number;
16
+ export const isTickIndexInBounds: (a: number) => number;
17
+ export const isTickInitializable: (a: number, b: number) => number;
18
+ export const invertTickIndex: (a: number) => number;
19
+ export const invertSqrtPrice: (a: number) => number;
20
+ export const getFullRangeTickIndexes: (a: number) => number;
21
+ export const orderTickIndexes: (a: number, b: number) => number;
22
+ export const isFullRangeOnly: (a: number) => number;
23
+ export const getTickIndexInArray: (a: number, b: number, c: number, d: number) => void;
24
+ export const tryGetAmountDeltaA: (a: number, b: number, c: number, d: number, e: number) => void;
25
+ export const tryGetAmountDeltaB: (a: number, b: number, c: number, d: number, e: number) => void;
26
+ export const tryGetNextSqrtPriceFromA: (a: number, b: number, c: number, d: bigint, e: number) => void;
27
+ export const tryGetNextSqrtPriceFromB: (a: number, b: number, c: number, d: bigint, e: number) => void;
28
+ export const tryApplyTransferFee: (a: number, b: bigint, c: number) => void;
29
+ export const tryReverseApplyTransferFee: (a: number, b: bigint, c: number) => void;
30
+ export const tryGetMaxAmountWithSlippageTolerance: (a: number, b: bigint, c: number) => void;
31
+ export const tryGetMinAmountWithSlippageTolerance: (a: number, b: bigint, c: number) => void;
32
+ export const tryApplySwapFee: (a: number, b: bigint, c: number) => void;
33
+ export const tryReverseApplySwapFee: (a: number, b: bigint, c: number) => void;
34
+ export const _FEE_RATE_DENOMINATOR: () => number;
35
+ export const _TICK_ARRAY_NOT_EVENLY_SPACED: (a: number) => void;
36
+ export const _TICK_INDEX_OUT_OF_BOUNDS: (a: number) => void;
37
+ export const _INVALID_TICK_INDEX: (a: number) => void;
38
+ export const _ARITHMETIC_OVERFLOW: (a: number) => void;
39
+ export const _AMOUNT_EXCEEDS_MAX_U64: (a: number) => void;
40
+ export const _SQRT_PRICE_OUT_OF_BOUNDS: (a: number) => void;
41
+ export const _TICK_SEQUENCE_EMPTY: (a: number) => void;
42
+ export const _SQRT_PRICE_LIMIT_OUT_OF_BOUNDS: (a: number) => void;
43
+ export const _INVALID_SQRT_PRICE_LIMIT_DIRECTION: (a: number) => void;
44
+ export const _ZERO_TRADABLE_AMOUNT: (a: number) => void;
45
+ export const _INVALID_TIMESTAMP: (a: number) => void;
46
+ export const _INVALID_TRANSFER_FEE: (a: number) => void;
47
+ export const _INVALID_SLIPPAGE_TOLERANCE: (a: number) => void;
48
+ export const _TICK_INDEX_NOT_IN_ARRAY: (a: number) => void;
49
+ export const isPositionInRange: (a: number, b: number, c: number) => number;
50
+ export const positionStatus: (a: number, b: number, c: number) => number;
51
+ export const positionRatio: (a: number, b: number, c: number) => number;
52
+ export const _NUM_REWARDS: () => number;
53
+ export const _TICK_ARRAY_SIZE: () => number;
54
+ export const _FULL_RANGE_ONLY_TICK_SPACING_THRESHOLD: () => number;
55
+ export const _MIN_TICK_INDEX: () => number;
56
+ export const _MAX_TICK_INDEX: () => number;
57
+ export const firstUnoccupiedPositionInBundle: (a: number, b: number) => number;
58
+ export const isPositionBundleFull: (a: number, b: number) => number;
59
+ export const isPositionBundleEmpty: (a: number, b: number) => number;
60
+ export const priceToSqrtPrice: (a: number, b: number, c: number) => number;
61
+ export const sqrtPriceToPrice: (a: number, b: number, c: number) => number;
62
+ export const invertPrice: (a: number, b: number, c: number) => number;
63
+ export const tickIndexToPrice: (a: number, b: number, c: number) => number;
64
+ export const priceToTickIndex: (a: number, b: number, c: number) => number;
65
+ export const _POSITION_BUNDLE_SIZE: () => number;
66
+ export const swapQuoteByInputToken: (a: number, b: bigint, c: number, d: number, e: number, f: number, g: number, h: number) => void;
67
+ export const swapQuoteByOutputToken: (a: number, b: bigint, c: number, d: number, e: number, f: number, g: number, h: number) => void;
68
+ export const collectFeesQuote: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => void;
69
+ export const collectRewardsQuote: (a: number, b: number, c: number, d: number, e: number, f: bigint, g: number, h: number, i: number) => void;
70
+ export const __wbindgen_export_0: (a: number, b: number) => number;
71
+ export const __wbindgen_export_1: (a: number, b: number, c: number, d: number) => number;
72
+ export const __wbindgen_export_2: (a: number) => void;
73
+ export const __wbindgen_add_to_stack_pointer: (a: number) => number;
@@ -1,5 +1,112 @@
1
1
  /* tslint:disable */
2
2
  /* eslint-disable */
3
+ export function _NUM_REWARDS(): number;
4
+ export function _TICK_ARRAY_SIZE(): number;
5
+ export function _FULL_RANGE_ONLY_TICK_SPACING_THRESHOLD(): number;
6
+ export function _MIN_TICK_INDEX(): number;
7
+ export function _MAX_TICK_INDEX(): number;
8
+ /**
9
+ * Get the first unoccupied position in a bundle
10
+ *
11
+ * # Arguments
12
+ * * `bundle` - The bundle to check
13
+ *
14
+ * # Returns
15
+ * * `u32` - The first unoccupied position (None if full)
16
+ */
17
+ export function firstUnoccupiedPositionInBundle(bitmap: Uint8Array): number | undefined;
18
+ /**
19
+ * Check whether a position bundle is full
20
+ * A position bundle can contain 256 positions
21
+ *
22
+ * # Arguments
23
+ * * `bundle` - The bundle to check
24
+ *
25
+ * # Returns
26
+ * * `bool` - Whether the bundle is full
27
+ */
28
+ export function isPositionBundleFull(bitmap: Uint8Array): boolean;
29
+ /**
30
+ * Check whether a position bundle is empty
31
+ *
32
+ * # Arguments
33
+ * * `bundle` - The bundle to check
34
+ *
35
+ * # Returns
36
+ * * `bool` - Whether the bundle is empty
37
+ */
38
+ export function isPositionBundleEmpty(bitmap: Uint8Array): boolean;
39
+ /**
40
+ * Convert a price into a sqrt priceX64
41
+ * IMPORTANT: floating point operations can reduce the precision of the result.
42
+ * Make sure to do these operations last and not to use the result for further calculations.
43
+ *
44
+ * # Parameters
45
+ * * `price` - The price to convert
46
+ * * `decimals_a` - The number of decimals of the base token
47
+ * * `decimals_b` - The number of decimals of the quote token
48
+ *
49
+ * # Returns
50
+ * * `u128` - The sqrt priceX64
51
+ */
52
+ export function priceToSqrtPrice(price: number, decimals_a: number, decimals_b: number): bigint;
53
+ /**
54
+ * Convert a sqrt priceX64 into a tick index
55
+ * IMPORTANT: floating point operations can reduce the precision of the result.
56
+ * Make sure to do these operations last and not to use the result for further calculations.
57
+ *
58
+ * # Parameters
59
+ * * `sqrt_price` - The sqrt priceX64 to convert
60
+ * * `decimals_a` - The number of decimals of the base token
61
+ * * `decimals_b` - The number of decimals of the quote token
62
+ *
63
+ * # Returns
64
+ * * `f64` - The decimal price
65
+ */
66
+ export function sqrtPriceToPrice(sqrt_price: bigint, decimals_a: number, decimals_b: number): number;
67
+ /**
68
+ * Invert a price
69
+ * IMPORTANT: floating point operations can reduce the precision of the result.
70
+ * Make sure to do these operations last and not to use the result for further calculations.
71
+ *
72
+ * # Parameters
73
+ * * `price` - The price to invert
74
+ * * `decimals_a` - The number of decimals of the base token
75
+ * * `decimals_b` - The number of decimals of the quote token
76
+ *
77
+ * # Returns
78
+ * * `f64` - The inverted price
79
+ */
80
+ export function invertPrice(price: number, decimals_a: number, decimals_b: number): number;
81
+ /**
82
+ * Convert a tick index into a price
83
+ * IMPORTANT: floating point operations can reduce the precision of the result.
84
+ * Make sure to do these operations last and not to use the result for further calculations.
85
+ *
86
+ * # Parameters
87
+ * * `tick_index` - The tick index to convert
88
+ * * `decimals_a` - The number of decimals of the base token
89
+ * * `decimals_b` - The number of decimals of the quote token
90
+ *
91
+ * # Returns
92
+ * * `f64` - The decimal price
93
+ */
94
+ export function tickIndexToPrice(tick_index: number, decimals_a: number, decimals_b: number): number;
95
+ /**
96
+ * Convert a price into a tick index
97
+ * IMPORTANT: floating point operations can reduce the precision of the result.
98
+ * Make sure to do these operations last and not to use the result for further calculations.
99
+ *
100
+ * # Parameters
101
+ * * `price` - The price to convert
102
+ * * `decimals_a` - The number of decimals of the base token
103
+ * * `decimals_b` - The number of decimals of the quote token
104
+ *
105
+ * # Returns
106
+ * * `i32` - The tick index
107
+ */
108
+ export function priceToTickIndex(price: number, decimals_a: number, decimals_b: number): number;
109
+ export function _POSITION_BUNDLE_SIZE(): number;
3
110
  /**
4
111
  * Get the first tick index in the tick array that contains the specified tick index.
5
112
  *
@@ -159,44 +266,7 @@ export function isFullRangeOnly(tick_spacing: number): boolean;
159
266
  * - A u32 integer representing the tick index in the tick array
160
267
  */
161
268
  export function getTickIndexInArray(tick_index: number, tick_array_start_index: number, tick_spacing: number): number;
162
- export function _POSITION_BUNDLE_SIZE(): number;
163
- export function _NUM_REWARDS(): number;
164
269
  export function _FEE_RATE_DENOMINATOR(): number;
165
- export function _TICK_ARRAY_SIZE(): number;
166
- export function _FULL_RANGE_ONLY_TICK_SPACING_THRESHOLD(): number;
167
- export function _MIN_TICK_INDEX(): number;
168
- export function _MAX_TICK_INDEX(): number;
169
- /**
170
- * Get the first unoccupied position in a bundle
171
- *
172
- * # Arguments
173
- * * `bundle` - The bundle to check
174
- *
175
- * # Returns
176
- * * `u32` - The first unoccupied position (None if full)
177
- */
178
- export function firstUnoccupiedPositionInBundle(bitmap: Uint8Array): number | undefined;
179
- /**
180
- * Check whether a position bundle is full
181
- * A position bundle can contain 256 positions
182
- *
183
- * # Arguments
184
- * * `bundle` - The bundle to check
185
- *
186
- * # Returns
187
- * * `bool` - Whether the bundle is full
188
- */
189
- export function isPositionBundleFull(bitmap: Uint8Array): boolean;
190
- /**
191
- * Check whether a position bundle is empty
192
- *
193
- * # Arguments
194
- * * `bundle` - The bundle to check
195
- *
196
- * # Returns
197
- * * `bool` - Whether the bundle is empty
198
- */
199
- export function isPositionBundleEmpty(bitmap: Uint8Array): boolean;
200
270
  export function _TICK_ARRAY_NOT_EVENLY_SPACED(): string;
201
271
  export function _TICK_INDEX_OUT_OF_BOUNDS(): string;
202
272
  export function _INVALID_TICK_INDEX(): string;
@@ -412,76 +482,6 @@ export function swapQuoteByInputToken(token_in: bigint, specified_token_a: boole
412
482
  * The exact input or output amount for the swap transaction.
413
483
  */
414
484
  export function swapQuoteByOutputToken(token_out: bigint, specified_token_a: boolean, slippage_tolerance_bps: number, whirlpool: WhirlpoolFacade, tick_arrays: TickArrayFacade[], transfer_fee_a?: TransferFee, transfer_fee_b?: TransferFee): ExactOutSwapQuote;
415
- /**
416
- * Convert a price into a sqrt priceX64
417
- * IMPORTANT: floating point operations can reduce the precision of the result.
418
- * Make sure to do these operations last and not to use the result for further calculations.
419
- *
420
- * # Parameters
421
- * * `price` - The price to convert
422
- * * `decimals_a` - The number of decimals of the base token
423
- * * `decimals_b` - The number of decimals of the quote token
424
- *
425
- * # Returns
426
- * * `u128` - The sqrt priceX64
427
- */
428
- export function priceToSqrtPrice(price: number, decimals_a: number, decimals_b: number): bigint;
429
- /**
430
- * Convert a sqrt priceX64 into a tick index
431
- * IMPORTANT: floating point operations can reduce the precision of the result.
432
- * Make sure to do these operations last and not to use the result for further calculations.
433
- *
434
- * # Parameters
435
- * * `sqrt_price` - The sqrt priceX64 to convert
436
- * * `decimals_a` - The number of decimals of the base token
437
- * * `decimals_b` - The number of decimals of the quote token
438
- *
439
- * # Returns
440
- * * `f64` - The decimal price
441
- */
442
- export function sqrtPriceToPrice(sqrt_price: bigint, decimals_a: number, decimals_b: number): number;
443
- /**
444
- * Invert a price
445
- * IMPORTANT: floating point operations can reduce the precision of the result.
446
- * Make sure to do these operations last and not to use the result for further calculations.
447
- *
448
- * # Parameters
449
- * * `price` - The price to invert
450
- * * `decimals_a` - The number of decimals of the base token
451
- * * `decimals_b` - The number of decimals of the quote token
452
- *
453
- * # Returns
454
- * * `f64` - The inverted price
455
- */
456
- export function invertPrice(price: number, decimals_a: number, decimals_b: number): number;
457
- /**
458
- * Convert a tick index into a price
459
- * IMPORTANT: floating point operations can reduce the precision of the result.
460
- * Make sure to do these operations last and not to use the result for further calculations.
461
- *
462
- * # Parameters
463
- * * `tick_index` - The tick index to convert
464
- * * `decimals_a` - The number of decimals of the base token
465
- * * `decimals_b` - The number of decimals of the quote token
466
- *
467
- * # Returns
468
- * * `f64` - The decimal price
469
- */
470
- export function tickIndexToPrice(tick_index: number, decimals_a: number, decimals_b: number): number;
471
- /**
472
- * Convert a price into a tick index
473
- * IMPORTANT: floating point operations can reduce the precision of the result.
474
- * Make sure to do these operations last and not to use the result for further calculations.
475
- *
476
- * # Parameters
477
- * * `price` - The price to convert
478
- * * `decimals_a` - The number of decimals of the base token
479
- * * `decimals_b` - The number of decimals of the quote token
480
- *
481
- * # Returns
482
- * * `i32` - The tick index
483
- */
484
- export function priceToTickIndex(price: number, decimals_a: number, decimals_b: number): number;
485
485
  /**
486
486
  * Calculate fees owed for a position
487
487
  *
@@ -610,23 +610,30 @@ export function increaseLiquidityQuoteB(token_amount_b: bigint, slippage_toleran
610
610
  * - `CollectRewardsQuote`: The rewards owed for the 3 reward tokens.
611
611
  */
612
612
  export function collectRewardsQuote(whirlpool: WhirlpoolFacade, position: PositionFacade, tick_lower: TickFacade, tick_upper: TickFacade, current_timestamp: bigint, transfer_fee_1?: TransferFee, transfer_fee_2?: TransferFee, transfer_fee_3?: TransferFee): CollectRewardsQuote;
613
- export interface ExactOutSwapQuote {
614
- tokenOut: bigint;
615
- tokenEstIn: bigint;
616
- tokenMaxIn: bigint;
617
- tradeFee: bigint;
613
+ export interface TransferFee {
614
+ feeBps: number;
615
+ maxFee: bigint;
618
616
  }
619
617
 
620
- export interface ExactInSwapQuote {
621
- tokenIn: bigint;
622
- tokenEstOut: bigint;
623
- tokenMinOut: bigint;
624
- tradeFee: bigint;
618
+ export interface IncreaseLiquidityQuote {
619
+ liquidityDelta: bigint;
620
+ tokenEstA: bigint;
621
+ tokenEstB: bigint;
622
+ tokenMaxA: bigint;
623
+ tokenMaxB: bigint;
625
624
  }
626
625
 
627
- export interface TransferFee {
628
- feeBps: number;
629
- maxFee: bigint;
626
+ export interface DecreaseLiquidityQuote {
627
+ liquidityDelta: bigint;
628
+ tokenEstA: bigint;
629
+ tokenEstB: bigint;
630
+ tokenMinA: bigint;
631
+ tokenMinB: bigint;
632
+ }
633
+
634
+ export interface CollectFeesQuote {
635
+ feeOwedA: bigint;
636
+ feeOwedB: bigint;
630
637
  }
631
638
 
632
639
  export interface TickArrayFacade {
@@ -648,6 +655,38 @@ export interface TickRange {
648
655
  tickUpperIndex: number;
649
656
  }
650
657
 
658
+ export interface ExactOutSwapQuote {
659
+ tokenOut: bigint;
660
+ tokenEstIn: bigint;
661
+ tokenMaxIn: bigint;
662
+ tradeFee: bigint;
663
+ }
664
+
665
+ export interface ExactInSwapQuote {
666
+ tokenIn: bigint;
667
+ tokenEstOut: bigint;
668
+ tokenMinOut: bigint;
669
+ tradeFee: bigint;
670
+ }
671
+
672
+ export interface WhirlpoolRewardInfoFacade {
673
+ emissionsPerSecondX64: bigint;
674
+ growthGlobalX64: bigint;
675
+ }
676
+
677
+ export interface WhirlpoolFacade {
678
+ tickSpacing: number;
679
+ feeRate: number;
680
+ protocolFeeRate: number;
681
+ liquidity: bigint;
682
+ sqrtPrice: bigint;
683
+ tickCurrentIndex: number;
684
+ feeGrowthGlobalA: bigint;
685
+ feeGrowthGlobalB: bigint;
686
+ rewardLastUpdatedTimestamp: bigint;
687
+ rewardInfos: WhirlpoolRewardInfoFacade[];
688
+ }
689
+
651
690
  export interface CollectRewardQuote {
652
691
  rewardsOwed: bigint;
653
692
  }
@@ -679,42 +718,3 @@ export interface PositionRatio {
679
718
  ratioB: number;
680
719
  }
681
720
 
682
- export interface WhirlpoolRewardInfoFacade {
683
- emissionsPerSecondX64: bigint;
684
- growthGlobalX64: bigint;
685
- }
686
-
687
- export interface WhirlpoolFacade {
688
- tickSpacing: number;
689
- feeRate: number;
690
- protocolFeeRate: number;
691
- liquidity: bigint;
692
- sqrtPrice: bigint;
693
- tickCurrentIndex: number;
694
- feeGrowthGlobalA: bigint;
695
- feeGrowthGlobalB: bigint;
696
- rewardLastUpdatedTimestamp: bigint;
697
- rewardInfos: WhirlpoolRewardInfoFacade[];
698
- }
699
-
700
- export interface IncreaseLiquidityQuote {
701
- liquidityDelta: bigint;
702
- tokenEstA: bigint;
703
- tokenEstB: bigint;
704
- tokenMaxA: bigint;
705
- tokenMaxB: bigint;
706
- }
707
-
708
- export interface DecreaseLiquidityQuote {
709
- liquidityDelta: bigint;
710
- tokenEstA: bigint;
711
- tokenEstB: bigint;
712
- tokenMinA: bigint;
713
- tokenMinB: bigint;
714
- }
715
-
716
- export interface CollectFeesQuote {
717
- feeOwedA: bigint;
718
- feeOwedB: bigint;
719
- }
720
-