@orca-so/whirlpools-core 0.3.1 → 0.3.2
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 +63 -63
- package/dist/browser/orca_whirlpools_core_js_bindings.js +1 -2
- package/dist/browser/orca_whirlpools_core_js_bindings_bg.js +438 -247
- package/dist/browser/orca_whirlpools_core_js_bindings_bg.wasm +0 -0
- package/dist/browser/orca_whirlpools_core_js_bindings_bg.wasm.d.ts +26 -29
- package/dist/nodejs/orca_whirlpools_core_js_bindings.d.ts +63 -63
- package/dist/nodejs/orca_whirlpools_core_js_bindings.js +438 -249
- package/dist/nodejs/orca_whirlpools_core_js_bindings_bg.wasm +0 -0
- package/dist/nodejs/orca_whirlpools_core_js_bindings_bg.wasm.d.ts +26 -29
- package/package.json +2 -2
|
@@ -1,5 +1,36 @@
|
|
|
1
1
|
/* tslint:disable */
|
|
2
2
|
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* Get the first unoccupied position in a bundle
|
|
5
|
+
*
|
|
6
|
+
* # Arguments
|
|
7
|
+
* * `bundle` - The bundle to check
|
|
8
|
+
*
|
|
9
|
+
* # Returns
|
|
10
|
+
* * `u32` - The first unoccupied position (None if full)
|
|
11
|
+
*/
|
|
12
|
+
export function firstUnoccupiedPositionInBundle(bitmap: Uint8Array): number | undefined;
|
|
13
|
+
/**
|
|
14
|
+
* Check whether a position bundle is full
|
|
15
|
+
* A position bundle can contain 256 positions
|
|
16
|
+
*
|
|
17
|
+
* # Arguments
|
|
18
|
+
* * `bundle` - The bundle to check
|
|
19
|
+
*
|
|
20
|
+
* # Returns
|
|
21
|
+
* * `bool` - Whether the bundle is full
|
|
22
|
+
*/
|
|
23
|
+
export function isPositionBundleFull(bitmap: Uint8Array): boolean;
|
|
24
|
+
/**
|
|
25
|
+
* Check whether a position bundle is empty
|
|
26
|
+
*
|
|
27
|
+
* # Arguments
|
|
28
|
+
* * `bundle` - The bundle to check
|
|
29
|
+
*
|
|
30
|
+
* # Returns
|
|
31
|
+
* * `bool` - Whether the bundle is empty
|
|
32
|
+
*/
|
|
33
|
+
export function isPositionBundleEmpty(bitmap: Uint8Array): boolean;
|
|
3
34
|
/**
|
|
4
35
|
* Get the first tick index in the tick array that contains the specified tick index.
|
|
5
36
|
*
|
|
@@ -159,37 +190,6 @@ export function isFullRangeOnly(tick_spacing: number): boolean;
|
|
|
159
190
|
* - A u32 integer representing the tick index in the tick array
|
|
160
191
|
*/
|
|
161
192
|
export function getTickIndexInArray(tick_index: number, tick_array_start_index: number, tick_spacing: number): number;
|
|
162
|
-
/**
|
|
163
|
-
* Get the first unoccupied position in a bundle
|
|
164
|
-
*
|
|
165
|
-
* # Arguments
|
|
166
|
-
* * `bundle` - The bundle to check
|
|
167
|
-
*
|
|
168
|
-
* # Returns
|
|
169
|
-
* * `u32` - The first unoccupied position (None if full)
|
|
170
|
-
*/
|
|
171
|
-
export function firstUnoccupiedPositionInBundle(bitmap: Uint8Array): number | undefined;
|
|
172
|
-
/**
|
|
173
|
-
* Check whether a position bundle is full
|
|
174
|
-
* A position bundle can contain 256 positions
|
|
175
|
-
*
|
|
176
|
-
* # Arguments
|
|
177
|
-
* * `bundle` - The bundle to check
|
|
178
|
-
*
|
|
179
|
-
* # Returns
|
|
180
|
-
* * `bool` - Whether the bundle is full
|
|
181
|
-
*/
|
|
182
|
-
export function isPositionBundleFull(bitmap: Uint8Array): boolean;
|
|
183
|
-
/**
|
|
184
|
-
* Check whether a position bundle is empty
|
|
185
|
-
*
|
|
186
|
-
* # Arguments
|
|
187
|
-
* * `bundle` - The bundle to check
|
|
188
|
-
*
|
|
189
|
-
* # Returns
|
|
190
|
-
* * `bool` - Whether the bundle is empty
|
|
191
|
-
*/
|
|
192
|
-
export function isPositionBundleEmpty(bitmap: Uint8Array): boolean;
|
|
193
193
|
export function _POSITION_BUNDLE_SIZE(): number;
|
|
194
194
|
export function _TICK_ARRAY_NOT_EVENLY_SPACED(): number;
|
|
195
195
|
export function _TICK_INDEX_OUT_OF_BOUNDS(): number;
|
|
@@ -654,38 +654,6 @@ export interface CollectFeesQuote {
|
|
|
654
654
|
feeOwedB: bigint;
|
|
655
655
|
}
|
|
656
656
|
|
|
657
|
-
export interface TransferFee {
|
|
658
|
-
feeBps: number;
|
|
659
|
-
maxFee: bigint;
|
|
660
|
-
}
|
|
661
|
-
|
|
662
|
-
export interface TickArrayFacade {
|
|
663
|
-
startTickIndex: number;
|
|
664
|
-
ticks: TickFacade[];
|
|
665
|
-
}
|
|
666
|
-
|
|
667
|
-
export interface TickFacade {
|
|
668
|
-
initialized: boolean;
|
|
669
|
-
liquidityNet: bigint;
|
|
670
|
-
liquidityGross: bigint;
|
|
671
|
-
feeGrowthOutsideA: bigint;
|
|
672
|
-
feeGrowthOutsideB: bigint;
|
|
673
|
-
rewardGrowthsOutside: bigint[];
|
|
674
|
-
}
|
|
675
|
-
|
|
676
|
-
export interface TickRange {
|
|
677
|
-
tickLowerIndex: number;
|
|
678
|
-
tickUpperIndex: number;
|
|
679
|
-
}
|
|
680
|
-
|
|
681
|
-
export interface CollectRewardQuote {
|
|
682
|
-
rewardsOwed: bigint;
|
|
683
|
-
}
|
|
684
|
-
|
|
685
|
-
export interface CollectRewardsQuote {
|
|
686
|
-
rewards: CollectRewardQuote[];
|
|
687
|
-
}
|
|
688
|
-
|
|
689
657
|
export interface ExactOutSwapQuote {
|
|
690
658
|
tokenOut: bigint;
|
|
691
659
|
tokenEstIn: bigint;
|
|
@@ -718,3 +686,35 @@ export interface WhirlpoolFacade {
|
|
|
718
686
|
rewardInfos: WhirlpoolRewardInfoFacade[];
|
|
719
687
|
}
|
|
720
688
|
|
|
689
|
+
export interface TransferFee {
|
|
690
|
+
feeBps: number;
|
|
691
|
+
maxFee: bigint;
|
|
692
|
+
}
|
|
693
|
+
|
|
694
|
+
export interface TickArrayFacade {
|
|
695
|
+
startTickIndex: number;
|
|
696
|
+
ticks: TickFacade[];
|
|
697
|
+
}
|
|
698
|
+
|
|
699
|
+
export interface TickFacade {
|
|
700
|
+
initialized: boolean;
|
|
701
|
+
liquidityNet: bigint;
|
|
702
|
+
liquidityGross: bigint;
|
|
703
|
+
feeGrowthOutsideA: bigint;
|
|
704
|
+
feeGrowthOutsideB: bigint;
|
|
705
|
+
rewardGrowthsOutside: bigint[];
|
|
706
|
+
}
|
|
707
|
+
|
|
708
|
+
export interface TickRange {
|
|
709
|
+
tickLowerIndex: number;
|
|
710
|
+
tickUpperIndex: number;
|
|
711
|
+
}
|
|
712
|
+
|
|
713
|
+
export interface CollectRewardQuote {
|
|
714
|
+
rewardsOwed: bigint;
|
|
715
|
+
}
|
|
716
|
+
|
|
717
|
+
export interface CollectRewardsQuote {
|
|
718
|
+
rewards: CollectRewardQuote[];
|
|
719
|
+
}
|
|
720
|
+
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import * as wasm from "./orca_whirlpools_core_js_bindings_bg.wasm";
|
|
2
2
|
export * from "./orca_whirlpools_core_js_bindings_bg.js";
|
|
3
3
|
import { __wbg_set_wasm } from "./orca_whirlpools_core_js_bindings_bg.js";
|
|
4
|
-
__wbg_set_wasm(wasm);
|
|
5
|
-
wasm.__wbindgen_start();
|
|
4
|
+
__wbg_set_wasm(wasm);
|