@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.
- package/dist/browser/orca_whirlpools_core_js_bindings.d.ts +159 -159
- package/dist/browser/orca_whirlpools_core_js_bindings_bg.js +378 -384
- package/dist/browser/orca_whirlpools_core_js_bindings_bg.wasm +0 -0
- package/dist/browser/orca_whirlpools_core_js_bindings_bg.wasm.d.ts +70 -70
- package/dist/nodejs/orca_whirlpools_core_js_bindings.d.ts +159 -159
- package/dist/nodejs/orca_whirlpools_core_js_bindings.js +378 -384
- package/dist/nodejs/orca_whirlpools_core_js_bindings_bg.wasm +0 -0
- package/dist/nodejs/orca_whirlpools_core_js_bindings_bg.wasm.d.ts +70 -70
- package/package.json +1 -1
|
Binary file
|
|
@@ -1,73 +1,73 @@
|
|
|
1
1
|
/* tslint:disable */
|
|
2
2
|
/* eslint-disable */
|
|
3
3
|
export const memory: WebAssembly.Memory;
|
|
4
|
-
export
|
|
5
|
-
export
|
|
6
|
-
export
|
|
7
|
-
export
|
|
8
|
-
export
|
|
9
|
-
export
|
|
10
|
-
export
|
|
11
|
-
export
|
|
12
|
-
export
|
|
13
|
-
export
|
|
14
|
-
export
|
|
15
|
-
export
|
|
16
|
-
export
|
|
17
|
-
export
|
|
18
|
-
export
|
|
19
|
-
export
|
|
20
|
-
export
|
|
21
|
-
export
|
|
22
|
-
export
|
|
23
|
-
export
|
|
24
|
-
export
|
|
25
|
-
export
|
|
26
|
-
export
|
|
27
|
-
export
|
|
28
|
-
export
|
|
29
|
-
export
|
|
30
|
-
export
|
|
31
|
-
export
|
|
32
|
-
export
|
|
33
|
-
export
|
|
34
|
-
export
|
|
35
|
-
export
|
|
36
|
-
export
|
|
37
|
-
export
|
|
38
|
-
export
|
|
39
|
-
export
|
|
40
|
-
export
|
|
41
|
-
export
|
|
42
|
-
export
|
|
43
|
-
export
|
|
44
|
-
export
|
|
45
|
-
export
|
|
46
|
-
export
|
|
47
|
-
export
|
|
48
|
-
export
|
|
49
|
-
export
|
|
50
|
-
export
|
|
51
|
-
export
|
|
52
|
-
export
|
|
53
|
-
export
|
|
54
|
-
export
|
|
55
|
-
export
|
|
56
|
-
export
|
|
57
|
-
export
|
|
58
|
-
export
|
|
59
|
-
export
|
|
60
|
-
export
|
|
61
|
-
export
|
|
62
|
-
export
|
|
63
|
-
export
|
|
64
|
-
export
|
|
65
|
-
export
|
|
66
|
-
export
|
|
67
|
-
export
|
|
68
|
-
export
|
|
69
|
-
export
|
|
70
|
-
export
|
|
71
|
-
export
|
|
72
|
-
export
|
|
73
|
-
export
|
|
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
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
tokenMaxIn: bigint;
|
|
617
|
-
tradeFee: bigint;
|
|
613
|
+
export interface TransferFee {
|
|
614
|
+
feeBps: number;
|
|
615
|
+
maxFee: bigint;
|
|
618
616
|
}
|
|
619
617
|
|
|
620
|
-
export interface
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
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
|
|
628
|
-
|
|
629
|
-
|
|
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
|
-
|