@gearbox-protocol/sdk 1.5.16 → 1.5.17

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.
@@ -29,6 +29,8 @@ export declare class CreditAccountData {
29
29
  calcBorrowAmountPlusInterestRate(currentCumulativeIndex: BigNumber): BigNumber;
30
30
  updateHealthFactor(creditManager: CreditManagerData, currentCumulativeIndex: BigNumber, priceOracle: PriceOracleData): void;
31
31
  get id(): string;
32
+ protected hash(): string;
33
+ protected static hash(creditManager: string, borrower: string): string;
32
34
  }
33
35
  export declare function sortBalances(balances: Record<string, BigNumber>, prices: Record<string, BigNumber>, tokens: Record<string, TokenData>): Array<[string, BigNumber]>;
34
36
  export declare function tokensAbcComparator(t1?: TokenData, t2?: TokenData): 1 | -1;
@@ -91,6 +91,12 @@ var CreditAccountData = /** @class */ (function () {
91
91
  enumerable: false,
92
92
  configurable: true
93
93
  });
94
+ CreditAccountData.prototype.hash = function () {
95
+ return CreditAccountData.hash(this.creditManager, this.borrower);
96
+ };
97
+ CreditAccountData.hash = function (creditManager, borrower) {
98
+ return "".concat(creditManager.toLowerCase(), ":").concat(borrower.toLowerCase());
99
+ };
94
100
  return CreditAccountData;
95
101
  }());
96
102
  exports.CreditAccountData = CreditAccountData;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gearbox-protocol/sdk",
3
- "version": "1.5.16",
3
+ "version": "1.5.17",
4
4
  "description": "Gearbox SDK",
5
5
  "main": "./lib/index.js",
6
6
  "types": "./lib/index.d.ts",