impermax-sdk 1.0.20 → 1.0.21

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.
@@ -12,7 +12,4 @@ export default class Account {
12
12
  getUserData(): Promise<FactoryIndex<UserData>>;
13
13
  getBorrowPositions(): Promise<FactoryIndex<Address[]>>;
14
14
  getSupplyPositions(): Promise<FactoryIndex<Address[]>>;
15
- getAccountTotalValueLocked(): Promise<number>;
16
- getAccountTotalValueSupplied(): Promise<number>;
17
- getAccountTotalValueBorrowed(): Promise<number>;
18
15
  }
@@ -13,7 +13,6 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
13
13
  };
14
14
  Object.defineProperty(exports, "__esModule", { value: true });
15
15
  const AccountLendingPool_1 = __importDefault(require("./AccountLendingPool"));
16
- const types_1 = require("../config/types");
17
16
  class Account {
18
17
  constructor(subgraph, account) {
19
18
  this.subgraph = subgraph;
@@ -60,52 +59,5 @@ class Account {
60
59
  return result;
61
60
  });
62
61
  }
63
- getAccountTotalValueLocked() {
64
- return __awaiter(this, void 0, void 0, function* () {
65
- const borrowPositions = yield this.getBorrowPositions();
66
- const supplyPositions = yield this.getSupplyPositions();
67
- let tvl = 0;
68
- for (const factory of Object.keys(borrowPositions)) {
69
- for (const uniswapV2PairAddress of borrowPositions[factory]) {
70
- const accountLendingPool = yield this.getAccountLendingPool(factory, uniswapV2PairAddress);
71
- tvl += yield accountLendingPool.getBorrowerEquityValue();
72
- }
73
- for (const uniswapV2PairAddress of supplyPositions[factory]) {
74
- const accountLendingPool = yield this.getAccountLendingPool(factory, uniswapV2PairAddress);
75
- tvl += yield accountLendingPool.accountPoolTokens[types_1.PoolTokenType.BorrowableA].getSuppliedValue();
76
- tvl += yield accountLendingPool.accountPoolTokens[types_1.PoolTokenType.BorrowableB].getSuppliedValue();
77
- }
78
- }
79
- return tvl;
80
- });
81
- }
82
- getAccountTotalValueSupplied() {
83
- return __awaiter(this, void 0, void 0, function* () {
84
- const supplyPositions = yield this.getSupplyPositions();
85
- let tvl = 0;
86
- for (const factory of Object.keys(supplyPositions)) {
87
- for (const uniswapV2PairAddress of supplyPositions[factory]) {
88
- const accountLendingPool = yield this.getAccountLendingPool(factory, uniswapV2PairAddress);
89
- tvl += yield accountLendingPool.accountPoolTokens[types_1.PoolTokenType.BorrowableA].getSuppliedValue();
90
- tvl += yield accountLendingPool.accountPoolTokens[types_1.PoolTokenType.BorrowableB].getSuppliedValue();
91
- }
92
- }
93
- return tvl;
94
- });
95
- }
96
- getAccountTotalValueBorrowed() {
97
- return __awaiter(this, void 0, void 0, function* () {
98
- const borrowPositions = yield this.getBorrowPositions();
99
- let tvl = 0;
100
- for (const factory of Object.keys(borrowPositions)) {
101
- for (const uniswapV2PairAddress of borrowPositions[factory]) {
102
- const accountLendingPool = yield this.getAccountLendingPool(factory, uniswapV2PairAddress);
103
- tvl += yield accountLendingPool.accountPoolTokens[types_1.PoolTokenType.BorrowableA].getBorrowedValue();
104
- tvl += yield accountLendingPool.accountPoolTokens[types_1.PoolTokenType.BorrowableB].getBorrowedValue();
105
- }
106
- }
107
- return tvl;
108
- });
109
- }
110
62
  }
111
63
  exports.default = Account;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "impermax-sdk",
3
- "version": "1.0.20",
3
+ "version": "1.0.21",
4
4
  "description": "",
5
5
  "main": "./lib/index.js",
6
6
  "module": "./lib/index.js",