@gearbox-protocol/sdk 3.0.0-next.233 → 3.0.0-next.235

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.
@@ -96,15 +96,12 @@ export declare class CreditAccountData {
96
96
  readonly creditManager: Address;
97
97
  readonly creditFacade: Address;
98
98
  readonly underlyingToken: Address;
99
- readonly since: number;
100
99
  readonly expirationDate: number;
101
100
  readonly version: number;
102
- readonly cmName: string;
103
101
  readonly enabledTokenMask: bigint;
104
102
  readonly healthFactor: number;
105
103
  isDeleting: boolean;
106
104
  readonly baseBorrowRateWithoutFee: number;
107
- readonly borrowRateWithoutFee: number;
108
105
  readonly borrowedAmount: bigint;
109
106
  readonly accruedInterest: bigint;
110
107
  readonly accruedFees: bigint;
@@ -113,8 +110,6 @@ export declare class CreditAccountData {
113
110
  readonly totalValue: bigint;
114
111
  readonly totalValueUSD: bigint;
115
112
  readonly twvUSD: bigint;
116
- readonly cumulativeIndexLastUpdate: bigint;
117
- readonly cumulativeQuotaInterest: bigint;
118
113
  readonly activeBots: Record<Address, true>;
119
114
  readonly balances: Record<Address, bigint>;
120
115
  readonly collateralTokens: Array<Address>;
@@ -16,15 +16,12 @@ class CreditAccountData {
16
16
  creditManager;
17
17
  creditFacade;
18
18
  underlyingToken;
19
- since;
20
19
  expirationDate;
21
20
  version;
22
- cmName;
23
21
  enabledTokenMask;
24
22
  healthFactor;
25
23
  isDeleting;
26
24
  baseBorrowRateWithoutFee;
27
- borrowRateWithoutFee;
28
25
  borrowedAmount;
29
26
  accruedInterest;
30
27
  accruedFees;
@@ -33,8 +30,6 @@ class CreditAccountData {
33
30
  totalValue;
34
31
  totalValueUSD;
35
32
  twvUSD;
36
- cumulativeIndexLastUpdate;
37
- cumulativeQuotaInterest;
38
33
  activeBots;
39
34
  balances = {};
40
35
  collateralTokens = [];
@@ -49,10 +44,8 @@ class CreditAccountData {
49
44
  this.creditManager = payload.creditManager.toLowerCase();
50
45
  this.creditFacade = payload.creditFacade.toLowerCase();
51
46
  this.underlyingToken = payload.underlying.toLowerCase();
52
- this.since = Number(payload.since);
53
47
  this.expirationDate = Number(payload.expirationDate);
54
48
  this.version = Number(payload.cfVersion);
55
- this.cmName = payload.cmName;
56
49
  this.healthFactor = Number(payload.healthFactor || 0n);
57
50
  this.enabledTokenMask = payload.enabledTokensMask;
58
51
  this.isDeleting = false;
@@ -66,9 +59,6 @@ class CreditAccountData {
66
59
  this.totalValueUSD = payload.totalValueUSD;
67
60
  this.twvUSD = payload.twvUSD;
68
61
  this.baseBorrowRateWithoutFee = (0, formatter_1.rayToNumber)(payload.baseBorrowRate * sdk_gov_1.PERCENTAGE_DECIMALS * sdk_gov_1.PERCENTAGE_FACTOR);
69
- this.borrowRateWithoutFee = (0, formatter_1.rayToNumber)(payload.aggregatedBorrowRate * sdk_gov_1.PERCENTAGE_DECIMALS * sdk_gov_1.PERCENTAGE_FACTOR);
70
- this.cumulativeIndexLastUpdate = payload.cumulativeIndexLastUpdate;
71
- this.cumulativeQuotaInterest = payload.cumulativeQuotaInterest;
72
62
  this.activeBots = payload.activeBots.reduce((acc, b) => {
73
63
  const botLc = b.toLowerCase();
74
64
  acc[botLc] = true;
@@ -84,7 +74,6 @@ class CreditAccountData {
84
74
  isQuoted: b.isQuoted,
85
75
  quota: b.quota,
86
76
  quotaRate: BigInt(b.quotaRate) * sdk_gov_1.PERCENTAGE_DECIMALS,
87
- quotaCumulativeIndexLU: b.quotaCumulativeIndexLU,
88
77
  };
89
78
  if (!b.isForbidden) {
90
79
  this.balances[token] = balance.balance;
@@ -7,7 +7,6 @@ export interface CaTokenBalance {
7
7
  isQuoted: boolean;
8
8
  quota: bigint;
9
9
  quotaRate: bigint;
10
- quotaCumulativeIndexLU: bigint;
11
10
  }
12
11
  export interface CreditAccountDataPayload {
13
12
  isSuccessful: boolean;
@@ -15,12 +14,9 @@ export interface CreditAccountDataPayload {
15
14
  addr: Address;
16
15
  borrower: Address;
17
16
  creditManager: Address;
18
- cmName: string;
19
17
  creditFacade: Address;
20
18
  underlying: Address;
21
19
  debt: bigint;
22
- cumulativeIndexLastUpdate: bigint;
23
- cumulativeQuotaInterest: bigint;
24
20
  accruedInterest: bigint;
25
21
  accruedFees: bigint;
26
22
  totalDebtUSD: bigint;
@@ -30,7 +26,6 @@ export interface CreditAccountDataPayload {
30
26
  enabledTokensMask: bigint;
31
27
  healthFactor: bigint;
32
28
  baseBorrowRate: bigint;
33
- aggregatedBorrowRate: bigint;
34
29
  balances: readonly {
35
30
  token: Address;
36
31
  balance: bigint;
@@ -39,9 +34,7 @@ export interface CreditAccountDataPayload {
39
34
  isQuoted: boolean;
40
35
  quota: bigint;
41
36
  quotaRate: number;
42
- quotaCumulativeIndexLU: bigint;
43
37
  }[];
44
- since: bigint;
45
38
  cfVersion: bigint;
46
39
  expirationDate: number;
47
40
  activeBots: readonly Address[];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gearbox-protocol/sdk",
3
- "version": "3.0.0-next.233",
3
+ "version": "3.0.0-next.235",
4
4
  "description": "Gearbox SDK",
5
5
  "main": "./lib/index.js",
6
6
  "types": "./lib/index.d.ts",