impermax-sdk 2.1.456 → 2.1.458
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/lib/offchain/account/lendingPool/nftlp/offchainAccountNftlp.d.ts +1 -1
- package/lib/offchain/account/lendingPool/nftlp/offchainAccountNftlp.js +3 -1
- package/lib/offchain/account/lendingPool/nftlp/offchainAccountNftlpAeroCL.d.ts +2 -1
- package/lib/offchain/account/lendingPool/nftlp/offchainAccountNftlpAeroCL.js +4 -2
- package/lib/offchain/account/lendingPool/nftlp/offchainAccountNftlpGenericCL.d.ts +1 -1
- package/lib/offchain/account/lendingPool/nftlp/offchainAccountNftlpGenericCL.js +4 -2
- package/lib/offchain/account/lendingPool/nftlp/offchainAccountNftlpUniswapV3.d.ts +2 -1
- package/lib/offchain/account/lendingPool/nftlp/offchainAccountNftlpUniswapV3.js +4 -2
- package/lib/offchain/lendingPool/nftlp/offchainNftlpAeroCL.d.ts +1 -1
- package/lib/offchain/lendingPool/nftlp/offchainNftlpAeroCL.js +1 -1
- package/lib/onchain/account/lendingPool/nftlp/onchainAccountNftlp.d.ts +1 -1
- package/lib/onchain/account/lendingPool/nftlp/onchainAccountNftlp.js +3 -1
- package/lib/onchain/account/lendingPool/nftlp/onchainAccountNftlpGenericCL.d.ts +1 -1
- package/lib/onchain/account/lendingPool/nftlp/onchainAccountNftlpGenericCL.js +3 -1
- package/package.json +1 -1
|
@@ -6,7 +6,7 @@ export default abstract class OffchainAccountNftlp {
|
|
|
6
6
|
protected cache: {};
|
|
7
7
|
constructor(collateral: OffchainAccountCollateralV3);
|
|
8
8
|
getLendingPool: () => import("../offchainAccountLendingPoolV3").default;
|
|
9
|
-
getNftlp
|
|
9
|
+
getNftlp(): import("../../../..").OffchainNftlp;
|
|
10
10
|
cleanCache(): void;
|
|
11
11
|
abstract getTokenPositions(): Promise<Record<string, NftlpPosition>>;
|
|
12
12
|
abstract getPositionObject(tokenId: number): Promise<GenericPosition>;
|
|
@@ -4,9 +4,11 @@ class OffchainAccountNftlp {
|
|
|
4
4
|
constructor(collateral) {
|
|
5
5
|
this.cache = {};
|
|
6
6
|
this.getLendingPool = () => this.collateral.getLendingPool();
|
|
7
|
-
this.getNftlp = () => this.getLendingPool().getLendingPool().getNftlp();
|
|
8
7
|
this.collateral = collateral;
|
|
9
8
|
}
|
|
9
|
+
getNftlp() {
|
|
10
|
+
return this.getLendingPool().getLendingPool().getNftlp();
|
|
11
|
+
}
|
|
10
12
|
cleanCache() {
|
|
11
13
|
this.cache = {};
|
|
12
14
|
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import OffchainNftlpAeroCL from "../../../lendingPool/nftlp/offchainNftlpAeroCL";
|
|
1
2
|
import { AeroCLPositionData, UniswapV3PositionData } from "../../../offchainTypes";
|
|
2
3
|
import GenericCLPosition from "../../../../utils/position/cl";
|
|
3
4
|
import OffchainAccountNftlpGenericCL from "./offchainAccountNftlpGenericCL";
|
|
@@ -13,7 +14,7 @@ export default class OffchainAccountNftlpAeroCL extends OffchainAccountNftlpGene
|
|
|
13
14
|
[keys in number]: number;
|
|
14
15
|
};
|
|
15
16
|
};
|
|
16
|
-
getNftlp
|
|
17
|
+
getNftlp(): OffchainNftlpAeroCL;
|
|
17
18
|
protected getPositionData(tokenId: number): Promise<AeroCLPositionData>;
|
|
18
19
|
getNewlyEarnedReward(tokenId: number): Promise<number>;
|
|
19
20
|
getStoredUnclaimedReward(tokenId: number): Promise<number>;
|
|
@@ -8,8 +8,10 @@ class OffchainAccountNftlpAeroCL extends offchainAccountNftlpGenericCL_1.default
|
|
|
8
8
|
constructor() {
|
|
9
9
|
super(...arguments);
|
|
10
10
|
this.cache = {};
|
|
11
|
-
|
|
12
|
-
|
|
11
|
+
}
|
|
12
|
+
// Return as NFTLP Dex class
|
|
13
|
+
getNftlp() {
|
|
14
|
+
return super.getNftlp();
|
|
13
15
|
}
|
|
14
16
|
async getPositionData(tokenId) {
|
|
15
17
|
return await super.getPositionData(tokenId);
|
|
@@ -11,7 +11,7 @@ export default abstract class OffchainAccountNftlpGenericCL extends OffchainAcco
|
|
|
11
11
|
[keys in number]: Promise<GenericCLPosition>;
|
|
12
12
|
};
|
|
13
13
|
};
|
|
14
|
-
getNftlp
|
|
14
|
+
getNftlp(): OffchainNftlpGenericCL;
|
|
15
15
|
getTokenPositions(): Promise<Record<string, GenericCLNftlpPosition>>;
|
|
16
16
|
protected getPositionData(tokenId: number): Promise<GenericCLPositionData>;
|
|
17
17
|
getTickSpacing(tokenId: number): Promise<number>;
|
|
@@ -10,8 +10,10 @@ class OffchainAccountNftlpGenericCL extends offchainAccountNftlp_1.default {
|
|
|
10
10
|
constructor() {
|
|
11
11
|
super(...arguments);
|
|
12
12
|
this.cache = {};
|
|
13
|
-
|
|
14
|
-
|
|
13
|
+
}
|
|
14
|
+
// Return as NFTLP Dex class
|
|
15
|
+
getNftlp() {
|
|
16
|
+
return this.getLendingPool().getLendingPool().getNftlp();
|
|
15
17
|
}
|
|
16
18
|
// Returns all positions by token ID
|
|
17
19
|
async getTokenPositions() {
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import OffchainNftlpUniswapV3 from "../../../lendingPool/nftlp/offchainNftlpUniswapV3";
|
|
1
2
|
import { FeeAmounts, UniswapV3PositionData } from "../../../offchainTypes";
|
|
2
3
|
import GenericCLPosition from "../../../../utils/position/cl";
|
|
3
4
|
import OffchainAccountNftlpGenericCL from "./offchainAccountNftlpGenericCL";
|
|
@@ -13,7 +14,7 @@ export default class OffchainAccountNftlpUniswapV3 extends OffchainAccountNftlpG
|
|
|
13
14
|
[keys in number]: FeeAmounts;
|
|
14
15
|
};
|
|
15
16
|
};
|
|
16
|
-
getNftlp
|
|
17
|
+
getNftlp(): OffchainNftlpUniswapV3;
|
|
17
18
|
protected getPositionData(tokenId: number): Promise<UniswapV3PositionData>;
|
|
18
19
|
getNewlyEarnedFees(tokenId: number): Promise<FeeAmounts>;
|
|
19
20
|
getStoredUnclaimedFees(tokenId: number): Promise<FeeAmounts>;
|
|
@@ -8,8 +8,10 @@ class OffchainAccountNftlpUniswapV3 extends offchainAccountNftlpGenericCL_1.defa
|
|
|
8
8
|
constructor() {
|
|
9
9
|
super(...arguments);
|
|
10
10
|
this.cache = {};
|
|
11
|
-
|
|
12
|
-
|
|
11
|
+
}
|
|
12
|
+
// Return as NFTLP Dex class
|
|
13
|
+
getNftlp() {
|
|
14
|
+
return super.getNftlp();
|
|
13
15
|
}
|
|
14
16
|
async getPositionData(tokenId) {
|
|
15
17
|
return await super.getPositionData(tokenId);
|
|
@@ -7,6 +7,6 @@ export default class OffchainNftlpAeroCL extends OffchainNftlpGenericCL {
|
|
|
7
7
|
getNewAccountNftlpObject(accountCollateral: OffchainAccountCollateralV3): OffchainAccountNftlpAeroCL;
|
|
8
8
|
protected tickSpacings: () => number[];
|
|
9
9
|
initializeFullRangeRateAccurate(tickSpacing: number): Promise<number>;
|
|
10
|
-
getRewardsToken(): Promise<string
|
|
10
|
+
getRewardsToken(): Promise<string>;
|
|
11
11
|
getRewardsTokenPrice(): Promise<number>;
|
|
12
12
|
}
|
|
@@ -32,7 +32,7 @@ class OffchainNftlpAeroCL extends offchainNftlpGenericCL_1.default {
|
|
|
32
32
|
// TODO
|
|
33
33
|
}
|
|
34
34
|
async getRewardsToken() {
|
|
35
|
-
return
|
|
35
|
+
return "";
|
|
36
36
|
// TODO
|
|
37
37
|
//const nftlpData = await this.getNftlpData() as NftlpGenericCLData;
|
|
38
38
|
//return nftlpData.factory?.rewardsToken?.id
|
|
@@ -7,6 +7,6 @@ export default abstract class OnchainAccountNftlp {
|
|
|
7
7
|
protected cache: {};
|
|
8
8
|
constructor(collateral: OnchainAccountCollateralV3, nftlp: OnchainNftlp);
|
|
9
9
|
getLendingPool: () => OnchainAccountLendingPoolV3;
|
|
10
|
-
getNftlp
|
|
10
|
+
getNftlp(): OnchainNftlp;
|
|
11
11
|
cleanCache(): void;
|
|
12
12
|
}
|
|
@@ -4,10 +4,12 @@ class OnchainAccountNftlp {
|
|
|
4
4
|
constructor(collateral, nftlp) {
|
|
5
5
|
this.cache = {};
|
|
6
6
|
this.getLendingPool = () => this.collateral.getLendingPool();
|
|
7
|
-
this.getNftlp = () => this.nftlp;
|
|
8
7
|
this.collateral = collateral;
|
|
9
8
|
this.nftlp = nftlp;
|
|
10
9
|
}
|
|
10
|
+
getNftlp() {
|
|
11
|
+
return this.nftlp;
|
|
12
|
+
}
|
|
11
13
|
cleanCache() {
|
|
12
14
|
this.cache = {};
|
|
13
15
|
}
|
|
@@ -11,7 +11,7 @@ export default abstract class OnchainAccountNftlpGenericCL extends OnchainAccoun
|
|
|
11
11
|
[keys in number]: Promise<GenericCLPosition>;
|
|
12
12
|
};
|
|
13
13
|
};
|
|
14
|
-
getNftlp
|
|
14
|
+
getNftlp(): OnchainNftlpGenericCL;
|
|
15
15
|
protected abstract initializePositionData(tokenId: number): Promise<GenericCLPositionData>;
|
|
16
16
|
protected getPositionData(tokenId: number): Promise<GenericCLPositionData>;
|
|
17
17
|
abstract getTickSpacing(tokenId: number): Promise<number>;
|
|
@@ -10,7 +10,9 @@ class OnchainAccountNftlpGenericCL extends onchainAccountNftlp_1.default {
|
|
|
10
10
|
constructor() {
|
|
11
11
|
super(...arguments);
|
|
12
12
|
this.cache = {};
|
|
13
|
-
|
|
13
|
+
}
|
|
14
|
+
getNftlp() {
|
|
15
|
+
return super.getNftlp();
|
|
14
16
|
}
|
|
15
17
|
async getPositionData(tokenId) {
|
|
16
18
|
if (!this.cache.positionsData)
|