@gearbox-protocol/sdk 3.0.0-next.85 → 3.0.0-next.87
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.
|
@@ -55,11 +55,11 @@ export declare class CreditManagerData {
|
|
|
55
55
|
encodeOnDemandPriceUpdateV3(token: string, reserve: boolean, data: string): MultiCall;
|
|
56
56
|
}
|
|
57
57
|
export declare class ChartsCreditManagerData {
|
|
58
|
-
readonly id: string;
|
|
59
58
|
readonly address: string;
|
|
60
59
|
readonly underlyingToken: string;
|
|
61
60
|
readonly pool: string;
|
|
62
|
-
readonly
|
|
61
|
+
readonly version: number;
|
|
62
|
+
readonly name: string;
|
|
63
63
|
readonly borrowRate: number;
|
|
64
64
|
readonly borrowRateOld: number;
|
|
65
65
|
readonly borrowRateChange: number;
|
|
@@ -67,7 +67,6 @@ export declare class ChartsCreditManagerData {
|
|
|
67
67
|
readonly maxAmount: bigint;
|
|
68
68
|
readonly maxLeverageFactor: number;
|
|
69
69
|
readonly availableLiquidity: bigint;
|
|
70
|
-
readonly version: number;
|
|
71
70
|
readonly feeInterest: number;
|
|
72
71
|
readonly feeLiquidation: number;
|
|
73
72
|
readonly feeLiquidationExpired: number;
|
|
@@ -215,11 +215,11 @@ class CreditManagerData {
|
|
|
215
215
|
}
|
|
216
216
|
exports.CreditManagerData = CreditManagerData;
|
|
217
217
|
class ChartsCreditManagerData {
|
|
218
|
-
id;
|
|
219
218
|
address;
|
|
220
219
|
underlyingToken;
|
|
221
220
|
pool;
|
|
222
|
-
|
|
221
|
+
version;
|
|
222
|
+
name;
|
|
223
223
|
borrowRate;
|
|
224
224
|
borrowRateOld;
|
|
225
225
|
borrowRateChange;
|
|
@@ -227,7 +227,6 @@ class ChartsCreditManagerData {
|
|
|
227
227
|
maxAmount;
|
|
228
228
|
maxLeverageFactor; // for V1 only
|
|
229
229
|
availableLiquidity;
|
|
230
|
-
version;
|
|
231
230
|
feeInterest;
|
|
232
231
|
feeLiquidation;
|
|
233
232
|
feeLiquidationExpired;
|
|
@@ -256,12 +255,11 @@ class ChartsCreditManagerData {
|
|
|
256
255
|
totalLiquidatedAccountsChange;
|
|
257
256
|
liquidationThresholds;
|
|
258
257
|
constructor(payload) {
|
|
259
|
-
this.id = (payload.addr || "").toLowerCase();
|
|
260
258
|
this.address = (payload.addr || "").toLowerCase();
|
|
261
259
|
this.underlyingToken = (payload.underlyingToken || "").toLowerCase();
|
|
262
260
|
this.pool = (payload.poolAddress || "").toLowerCase();
|
|
263
261
|
this.version = payload.version || 2;
|
|
264
|
-
this.
|
|
262
|
+
this.name = payload.name || "";
|
|
265
263
|
this.borrowRate = Number(((0, sdk_gov_1.toBigInt)(payload.borrowRate || 0) *
|
|
266
264
|
((0, sdk_gov_1.toBigInt)(payload.feeInterest || 0) + sdk_gov_1.PERCENTAGE_FACTOR) *
|
|
267
265
|
sdk_gov_1.PERCENTAGE_DECIMALS) /
|
package/lib/core/pool.d.ts
CHANGED
|
@@ -46,11 +46,12 @@ interface CalculateBorrowRateProps {
|
|
|
46
46
|
availableLiquidity: bigint;
|
|
47
47
|
}
|
|
48
48
|
export declare class ChartsPoolData {
|
|
49
|
-
readonly id: string;
|
|
50
49
|
readonly address: string;
|
|
51
50
|
readonly underlyingToken: string;
|
|
52
51
|
readonly dieselToken: string;
|
|
53
|
-
readonly
|
|
52
|
+
readonly type: PoolType;
|
|
53
|
+
readonly version: number;
|
|
54
|
+
readonly name: string;
|
|
54
55
|
readonly addLiqCount: number;
|
|
55
56
|
readonly addedLiquidity: number;
|
|
56
57
|
readonly removeLiqCount: number;
|
package/lib/core/pool.js
CHANGED
|
@@ -137,11 +137,12 @@ class PoolData {
|
|
|
137
137
|
}
|
|
138
138
|
exports.PoolData = PoolData;
|
|
139
139
|
class ChartsPoolData {
|
|
140
|
-
id;
|
|
141
140
|
address;
|
|
142
141
|
underlyingToken;
|
|
143
142
|
dieselToken;
|
|
144
|
-
|
|
143
|
+
type;
|
|
144
|
+
version;
|
|
145
|
+
name;
|
|
145
146
|
addLiqCount;
|
|
146
147
|
addedLiquidity;
|
|
147
148
|
removeLiqCount;
|
|
@@ -188,11 +189,12 @@ class ChartsPoolData {
|
|
|
188
189
|
uniqueLPs;
|
|
189
190
|
uniqueLPsChange;
|
|
190
191
|
constructor(payload) {
|
|
191
|
-
this.id = (payload.addr || "").toLowerCase();
|
|
192
192
|
this.address = (payload.addr || "").toLowerCase();
|
|
193
193
|
this.underlyingToken = (payload.underlyingToken || "").toLowerCase();
|
|
194
194
|
this.dieselToken = (payload.dieselToken || "").toLowerCase();
|
|
195
|
-
this.
|
|
195
|
+
this.type = PoolData.getPoolType(payload.name || "");
|
|
196
|
+
this.version = payload.version || 1;
|
|
197
|
+
this.name = payload.name || "";
|
|
196
198
|
this.earned7D = payload.earned7D || 0;
|
|
197
199
|
this.earned7DInUSD = payload.earned7DInUSD || 0;
|
|
198
200
|
const expected = (0, sdk_gov_1.toBigInt)(payload.expectedLiquidity || 0);
|
package/lib/payload/pool.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gearbox-protocol/sdk",
|
|
3
|
-
"version": "3.0.0-next.
|
|
3
|
+
"version": "3.0.0-next.87",
|
|
4
4
|
"description": "Gearbox SDK",
|
|
5
5
|
"main": "./lib/index.js",
|
|
6
6
|
"types": "./lib/index.d.ts",
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
"test": "npx mocha -r ts-node/register -r dotenv/config src/**/*.spec.ts"
|
|
31
31
|
},
|
|
32
32
|
"dependencies": {
|
|
33
|
-
"@gearbox-protocol/sdk-gov": "^1.
|
|
33
|
+
"@gearbox-protocol/sdk-gov": "^1.16.0",
|
|
34
34
|
"axios": "^1.2.6",
|
|
35
35
|
"decimal.js-light": "^2.5.1",
|
|
36
36
|
"deep-eql": "^4.1.0",
|
|
@@ -42,13 +42,13 @@
|
|
|
42
42
|
"@commitlint/cli": "^17.6.3",
|
|
43
43
|
"@commitlint/config-conventional": "^17.0.3",
|
|
44
44
|
"@gearbox-protocol/core-v2": "1.19.0-base.17",
|
|
45
|
-
"@gearbox-protocol/core-v3": "^1.45.
|
|
45
|
+
"@gearbox-protocol/core-v3": "^1.45.8",
|
|
46
46
|
"@gearbox-protocol/eslint-config": "^1.4.1",
|
|
47
|
-
"@gearbox-protocol/integrations-v3": "^1.
|
|
47
|
+
"@gearbox-protocol/integrations-v3": "^1.27.2",
|
|
48
48
|
"@gearbox-protocol/oracles-v3": "^1.9.0",
|
|
49
49
|
"@gearbox-protocol/periphery-v3": "^1.3.12",
|
|
50
50
|
"@gearbox-protocol/prettier-config": "^1.4.1",
|
|
51
|
-
"@gearbox-protocol/router-v3": "^1.8.
|
|
51
|
+
"@gearbox-protocol/router-v3": "^1.8.2",
|
|
52
52
|
"@openzeppelin/contracts": "^4.9.3",
|
|
53
53
|
"@redstone-finance/evm-connector": "^0.3.6",
|
|
54
54
|
"@typechain/ethers-v5": "^10.1.0",
|