impermax-sdk 1.1.32 → 1.1.34
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/borrowable.d.ts +3 -3
- package/lib/offchain/account/lendingPool/borrowable.js +5 -2
- package/lib/offchain/account/lendingPool/collateral.d.ts +3 -3
- package/lib/offchain/account/lendingPool/collateral.js +5 -2
- package/lib/offchain/account/lendingPool/index.d.ts +6 -5
- package/lib/offchain/lendingPool/borrowable.d.ts +3 -3
- package/lib/offchain/lendingPool/borrowable.js +5 -2
- package/lib/offchain/lendingPool/collateral.d.ts +3 -3
- package/lib/offchain/lendingPool/collateral.js +5 -2
- package/lib/offchain/lendingPool/index.d.ts +5 -4
- package/lib/onchain/account/interactions/lendingPool/borrowable.d.ts +4 -4
- package/lib/onchain/account/interactions/lendingPool/borrowable.js +5 -2
- package/lib/onchain/account/interactions/lendingPool/collateral.d.ts +4 -4
- package/lib/onchain/account/interactions/lendingPool/collateral.js +5 -2
- package/lib/onchain/account/interactions/lendingPool/index.d.ts +1 -1
- package/lib/onchain/account/interactions/lendingVault.d.ts +1 -1
- package/lib/onchain/account/interactions/poolToken.d.ts +1 -1
- package/lib/onchain/account/lendingPool/borrowable.d.ts +3 -3
- package/lib/onchain/account/lendingPool/borrowable.js +5 -2
- package/lib/onchain/account/lendingPool/collateral.d.ts +3 -3
- package/lib/onchain/account/lendingPool/collateral.js +5 -2
- package/lib/onchain/account/lendingPool/index.d.ts +1 -1
- package/lib/onchain/account/lendingVault.d.ts +1 -1
- package/lib/onchain/account/poolToken.d.ts +2 -2
- package/lib/onchain/impermaxFactory/lendingPool/borrowable.d.ts +5 -5
- package/lib/onchain/impermaxFactory/lendingPool/borrowable.js +5 -2
- package/lib/onchain/impermaxFactory/lendingPool/collateral.d.ts +4 -3
- package/lib/onchain/impermaxFactory/lendingPool/collateral.js +5 -2
- package/lib/onchain/impermaxFactory/lendingPool/index.d.ts +3 -3
- package/lib/onchain/poolToken.d.ts +1 -1
- package/package.json +1 -1
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { PoolTokenType } from '../../../config/types';
|
|
2
2
|
import LendingPool from './index';
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
export default class Borrowable extends
|
|
3
|
+
import PoolToken from '../poolToken';
|
|
4
|
+
import * as offchain from '../../index';
|
|
5
|
+
export default class Borrowable extends PoolToken {
|
|
6
6
|
accountLendingPool: LendingPool;
|
|
7
7
|
poolToken: offchain.lendingPool.Borrowable;
|
|
8
8
|
constructor(accountLendingPool: LendingPool, poolTokenType: PoolTokenType);
|
|
@@ -8,9 +8,12 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
8
8
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
9
|
});
|
|
10
10
|
};
|
|
11
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
12
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
13
|
+
};
|
|
11
14
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
const
|
|
13
|
-
class Borrowable extends
|
|
15
|
+
const poolToken_1 = __importDefault(require("../poolToken"));
|
|
16
|
+
class Borrowable extends poolToken_1.default {
|
|
14
17
|
constructor(accountLendingPool, poolTokenType) {
|
|
15
18
|
super();
|
|
16
19
|
this.accountLendingPool = accountLendingPool;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { CollateralPosition } from "../../types";
|
|
2
2
|
import { PoolTokenType } from '../../../config/types';
|
|
3
3
|
import LendingPool from './index';
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
export default class Collateral extends
|
|
4
|
+
import PoolToken from '../poolToken';
|
|
5
|
+
import * as offchain from '../../index';
|
|
6
|
+
export default class Collateral extends PoolToken {
|
|
7
7
|
accountLendingPool: LendingPool;
|
|
8
8
|
poolToken: offchain.lendingPool.Collateral;
|
|
9
9
|
constructor(accountLendingPool: LendingPool, poolTokenType: PoolTokenType);
|
|
@@ -8,10 +8,13 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
8
8
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
9
|
});
|
|
10
10
|
};
|
|
11
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
12
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
13
|
+
};
|
|
11
14
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
15
|
const types_1 = require("../../../config/types");
|
|
13
|
-
const
|
|
14
|
-
class Collateral extends
|
|
16
|
+
const poolToken_1 = __importDefault(require("../poolToken"));
|
|
17
|
+
class Collateral extends poolToken_1.default {
|
|
15
18
|
constructor(accountLendingPool, poolTokenType) {
|
|
16
19
|
super();
|
|
17
20
|
this.accountLendingPool = accountLendingPool;
|
|
@@ -2,19 +2,20 @@ import { PoolTokenType } from '../../../config/types';
|
|
|
2
2
|
import { UserData } from '../../types';
|
|
3
3
|
import Collateral from './collateral';
|
|
4
4
|
import Borrowable from './borrowable';
|
|
5
|
-
import
|
|
6
|
-
import
|
|
5
|
+
import Account from '../index';
|
|
6
|
+
import PoolToken from '../poolToken';
|
|
7
|
+
import * as offchain from "../../";
|
|
7
8
|
export { Borrowable, Collateral, };
|
|
8
9
|
export default class LendingPool {
|
|
9
|
-
account:
|
|
10
|
+
account: Account;
|
|
10
11
|
lendingPool: offchain.LendingPool;
|
|
11
12
|
accountPoolTokens: {
|
|
12
13
|
[PoolTokenType.Collateral]: Collateral;
|
|
13
14
|
[PoolTokenType.BorrowableA]: Borrowable;
|
|
14
15
|
[PoolTokenType.BorrowableB]: Borrowable;
|
|
15
16
|
};
|
|
16
|
-
constructor(account:
|
|
17
|
-
getAccountPoolToken(poolTokenType: PoolTokenType):
|
|
17
|
+
constructor(account: Account, lendingPool: offchain.LendingPool);
|
|
18
|
+
getAccountPoolToken(poolTokenType: PoolTokenType): PoolToken;
|
|
18
19
|
getUserData(): Promise<UserData | undefined>;
|
|
19
20
|
getBorrowerEquityValue(): Promise<number>;
|
|
20
21
|
}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { BorrowablePastData, PoolTokenData } from "../types";
|
|
2
2
|
import LendingPool from './';
|
|
3
3
|
import { PoolTokenType } from '../../config/types';
|
|
4
|
-
import
|
|
5
|
-
export default class Borrowable extends
|
|
4
|
+
import PoolToken from '../poolToken';
|
|
5
|
+
export default class Borrowable extends PoolToken {
|
|
6
6
|
lendingPool: LendingPool;
|
|
7
7
|
poolTokenType: PoolTokenType;
|
|
8
8
|
constructor(lendingPool: LendingPool, poolTokenType: PoolTokenType);
|
|
9
|
-
getOffchain: () =>
|
|
9
|
+
getOffchain: () => import("..").default;
|
|
10
10
|
getPoolTokenData(): Promise<PoolTokenData>;
|
|
11
11
|
getReserveFactor(): Promise<number>;
|
|
12
12
|
getKinkBorrowRate(): Promise<number>;
|
|
@@ -8,11 +8,14 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
8
8
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
9
|
});
|
|
10
10
|
};
|
|
11
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
12
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
13
|
+
};
|
|
11
14
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
15
|
const utils_1 = require("../../utils");
|
|
13
16
|
const imxes_1 = require("../../config/contracts/imxes");
|
|
14
|
-
const
|
|
15
|
-
class Borrowable extends
|
|
17
|
+
const poolToken_1 = __importDefault(require("../poolToken"));
|
|
18
|
+
class Borrowable extends poolToken_1.default {
|
|
16
19
|
constructor(lendingPool, poolTokenType) {
|
|
17
20
|
super();
|
|
18
21
|
this.getOffchain = () => this.lendingPool.offchain;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { PoolTokenData } from "../types";
|
|
2
2
|
import LendingPool from './';
|
|
3
3
|
import { Address, PoolTokenType } from '../../config/types';
|
|
4
|
-
import
|
|
5
|
-
export default class Collateral extends
|
|
4
|
+
import PoolToken from '../poolToken';
|
|
5
|
+
export default class Collateral extends PoolToken {
|
|
6
6
|
lendingPool: LendingPool;
|
|
7
7
|
poolTokenType: PoolTokenType;
|
|
8
8
|
constructor(lendingPool: LendingPool, poolTokenType: PoolTokenType);
|
|
9
|
-
getOffchain: () =>
|
|
9
|
+
getOffchain: () => import("..").default;
|
|
10
10
|
getPoolTokenData(): Promise<PoolTokenData>;
|
|
11
11
|
getName(): Promise<string>;
|
|
12
12
|
getSymbol(): Promise<string>;
|
|
@@ -8,10 +8,13 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
8
8
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
9
|
});
|
|
10
10
|
};
|
|
11
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
12
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
13
|
+
};
|
|
11
14
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
15
|
const types_1 = require("../../config/types");
|
|
13
|
-
const
|
|
14
|
-
class Collateral extends
|
|
16
|
+
const poolToken_1 = __importDefault(require("../poolToken"));
|
|
17
|
+
class Collateral extends poolToken_1.default {
|
|
15
18
|
constructor(lendingPool, poolTokenType) {
|
|
16
19
|
super();
|
|
17
20
|
this.getOffchain = () => this.lendingPool.offchain;
|
|
@@ -4,10 +4,11 @@ import { Farms } from '../../config/farms';
|
|
|
4
4
|
import { LendingPoolData, LendingPoolPastData } from '../types';
|
|
5
5
|
import Collateral from './collateral';
|
|
6
6
|
import Borrowable from './borrowable';
|
|
7
|
-
import
|
|
7
|
+
import Offchain from '../index';
|
|
8
|
+
import PoolToken from '../poolToken';
|
|
8
9
|
export { Borrowable, Collateral, };
|
|
9
10
|
export default class LendingPool {
|
|
10
|
-
offchain:
|
|
11
|
+
offchain: Offchain;
|
|
11
12
|
factory: Factory;
|
|
12
13
|
pairAddress: Address;
|
|
13
14
|
poolTokens: {
|
|
@@ -15,8 +16,8 @@ export default class LendingPool {
|
|
|
15
16
|
[PoolTokenType.BorrowableA]: Borrowable;
|
|
16
17
|
[PoolTokenType.BorrowableB]: Borrowable;
|
|
17
18
|
};
|
|
18
|
-
constructor(offchain:
|
|
19
|
-
getPoolToken(poolTokenType: PoolTokenType):
|
|
19
|
+
constructor(offchain: Offchain, factory: Factory, pairAddress: Address);
|
|
20
|
+
getPoolToken(poolTokenType: PoolTokenType): PoolToken;
|
|
20
21
|
getLendingPoolData(): Promise<LendingPoolData>;
|
|
21
22
|
getSafetyMargin(): Promise<number>;
|
|
22
23
|
getLiquidationIncentive(): Promise<number>;
|
|
@@ -2,13 +2,13 @@ import { PoolTokenType } from '../../../../config/types';
|
|
|
2
2
|
import LendingPool from './index';
|
|
3
3
|
import { PermitData } from '../../../types';
|
|
4
4
|
import { BigNumber } from 'ethers';
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
export default class Borrowable extends
|
|
5
|
+
import * as account from '../../index';
|
|
6
|
+
import PoolToken from '../poolToken';
|
|
7
|
+
export default class Borrowable extends PoolToken {
|
|
8
8
|
interactionsLendingPool: LendingPool;
|
|
9
9
|
accountPoolToken: account.lendingPool.Borrowable;
|
|
10
10
|
constructor(interactionsLendingPool: LendingPool, poolTokenType: PoolTokenType);
|
|
11
|
-
getInteractions: () => account.
|
|
11
|
+
getInteractions: () => account.interactions.default;
|
|
12
12
|
getAccountAddress: () => string;
|
|
13
13
|
getRouterContract: () => any;
|
|
14
14
|
borrow(amount: BigNumber, permitData: PermitData, onTransactionHash: Function): Promise<any>;
|
|
@@ -8,10 +8,13 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
8
8
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
9
|
});
|
|
10
10
|
};
|
|
11
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
12
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
13
|
+
};
|
|
11
14
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
15
|
const general_1 = require("../../../../config/general");
|
|
13
|
-
const
|
|
14
|
-
class Borrowable extends
|
|
16
|
+
const poolToken_1 = __importDefault(require("../poolToken"));
|
|
17
|
+
class Borrowable extends poolToken_1.default {
|
|
15
18
|
constructor(interactionsLendingPool, poolTokenType) {
|
|
16
19
|
super();
|
|
17
20
|
this.getInteractions = () => this.interactionsLendingPool.interactions;
|
|
@@ -2,13 +2,13 @@ import { PoolTokenType } from '../../../../config/types';
|
|
|
2
2
|
import LendingPool from './index';
|
|
3
3
|
import { PermitData } from '../../../types';
|
|
4
4
|
import { BigNumber } from 'ethers';
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
export default class Collateral extends
|
|
5
|
+
import * as account from '../../index';
|
|
6
|
+
import PoolToken from '../poolToken';
|
|
7
|
+
export default class Collateral extends PoolToken {
|
|
8
8
|
interactionsLendingPool: LendingPool;
|
|
9
9
|
accountPoolToken: account.lendingPool.Collateral;
|
|
10
10
|
constructor(interactionsLendingPool: LendingPool, poolTokenType: PoolTokenType);
|
|
11
|
-
getInteractions: () => account.
|
|
11
|
+
getInteractions: () => account.interactions.default;
|
|
12
12
|
getAccountAddress: () => string;
|
|
13
13
|
getRouterContract: () => any;
|
|
14
14
|
protected mint(amount: BigNumber, permitData: PermitData, onTransactionHash: Function): Promise<any>;
|
|
@@ -8,9 +8,12 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
8
8
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
9
|
});
|
|
10
10
|
};
|
|
11
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
12
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
13
|
+
};
|
|
11
14
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
const
|
|
13
|
-
class Collateral extends
|
|
15
|
+
const poolToken_1 = __importDefault(require("../poolToken"));
|
|
16
|
+
class Collateral extends poolToken_1.default {
|
|
14
17
|
constructor(interactionsLendingPool, poolTokenType) {
|
|
15
18
|
super();
|
|
16
19
|
this.getInteractions = () => this.interactionsLendingPool.interactions;
|
|
@@ -4,7 +4,7 @@ import { PoolTokenType } from '../../../../config/types';
|
|
|
4
4
|
import { PermitData } from '../../../types';
|
|
5
5
|
import Collateral from './collateral';
|
|
6
6
|
import Borrowable from './borrowable';
|
|
7
|
-
import
|
|
7
|
+
import * as account from '../../index';
|
|
8
8
|
export { Borrowable, Collateral, };
|
|
9
9
|
export default class LendingPool {
|
|
10
10
|
interactions: Interactions;
|
|
@@ -2,7 +2,7 @@ import { ethers, BigNumber } from "ethers";
|
|
|
2
2
|
import { ApprovalType, Contract, PermitData } from "../../types";
|
|
3
3
|
import { Address } from '../../../config/types';
|
|
4
4
|
import Interactions from './index';
|
|
5
|
-
import
|
|
5
|
+
import * as onchain from '../../index';
|
|
6
6
|
export default abstract class PoolToken {
|
|
7
7
|
accountPoolToken: onchain.account.PoolToken;
|
|
8
8
|
abstract getInteractions(): Interactions;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { PoolTokenType } from '../../../config/types';
|
|
2
2
|
import LendingPool from './index';
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
export default class Borrowable extends
|
|
3
|
+
import * as onchain from '../../index';
|
|
4
|
+
import PoolToken from '../poolToken';
|
|
5
|
+
export default class Borrowable extends PoolToken {
|
|
6
6
|
accountLendingPool: LendingPool;
|
|
7
7
|
poolToken: onchain.impermaxFactory.lendingPool.Borrowable;
|
|
8
8
|
borrowableCache: {
|
|
@@ -8,11 +8,14 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
8
8
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
9
|
});
|
|
10
10
|
};
|
|
11
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
12
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
13
|
+
};
|
|
11
14
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
15
|
const types_1 = require("../../types");
|
|
13
16
|
const types_2 = require("../../../config/types");
|
|
14
|
-
const
|
|
15
|
-
class Borrowable extends
|
|
17
|
+
const poolToken_1 = __importDefault(require("../poolToken"));
|
|
18
|
+
class Borrowable extends poolToken_1.default {
|
|
16
19
|
constructor(accountLendingPool, poolTokenType) {
|
|
17
20
|
super();
|
|
18
21
|
this.borrowableCache = {};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import LendingPool from './index';
|
|
2
2
|
import { PoolTokenType } from '../../../config/types';
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
export default class Collateral extends
|
|
3
|
+
import * as onchain from '../../index';
|
|
4
|
+
import PoolToken from '../poolToken';
|
|
5
|
+
export default class Collateral extends PoolToken {
|
|
6
6
|
accountLendingPool: LendingPool;
|
|
7
7
|
poolToken: onchain.impermaxFactory.lendingPool.Collateral;
|
|
8
8
|
collateralCache: {};
|
|
@@ -8,10 +8,13 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
8
8
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
9
|
});
|
|
10
10
|
};
|
|
11
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
12
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
13
|
+
};
|
|
11
14
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
15
|
const types_1 = require("../../types");
|
|
13
|
-
const
|
|
14
|
-
class Collateral extends
|
|
16
|
+
const poolToken_1 = __importDefault(require("../poolToken"));
|
|
17
|
+
class Collateral extends poolToken_1.default {
|
|
15
18
|
constructor(accountLendingPool, poolTokenType) {
|
|
16
19
|
super();
|
|
17
20
|
this.collateralCache = {};
|
|
@@ -3,7 +3,7 @@ import Account from "../index";
|
|
|
3
3
|
import Borrowable from "./borrowable";
|
|
4
4
|
import Collateral from "./collateral";
|
|
5
5
|
import { PoolTokenType } from '../../../config/types';
|
|
6
|
-
import
|
|
6
|
+
import * as onchain from '../../index';
|
|
7
7
|
export { Borrowable, Collateral, };
|
|
8
8
|
export default class LendingPool {
|
|
9
9
|
account: Account;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import Account from './';
|
|
2
|
-
import
|
|
2
|
+
import * as onchain from '../index';
|
|
3
3
|
export default abstract class PoolToken {
|
|
4
4
|
account: Account;
|
|
5
5
|
poolToken: onchain.PoolToken;
|
|
@@ -9,7 +9,7 @@ export default abstract class PoolToken {
|
|
|
9
9
|
};
|
|
10
10
|
cleanCache(): void;
|
|
11
11
|
getAccount: () => string;
|
|
12
|
-
getNetwrok: () => import("
|
|
12
|
+
getNetwrok: () => import("../..").Networks;
|
|
13
13
|
getEth: () => any;
|
|
14
14
|
getDust: () => number;
|
|
15
15
|
getUiMargin: () => number;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { Contract } from "../../types";
|
|
2
2
|
import { Address, PoolTokenType } from '../../../config/types';
|
|
3
3
|
import LendingPool from './index';
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
export default class Borrowable extends
|
|
4
|
+
import * as offchain from '../../../offchain';
|
|
5
|
+
import PoolToken from '../../poolToken';
|
|
6
|
+
export default class Borrowable extends PoolToken {
|
|
7
7
|
lendingPool: LendingPool;
|
|
8
8
|
borrowableCache: {
|
|
9
9
|
borrowTracker?: Promise<Address>;
|
|
@@ -14,9 +14,9 @@ export default class Borrowable extends onchain.PoolToken {
|
|
|
14
14
|
};
|
|
15
15
|
constructor(lendingPool: LendingPool, poolTokenType: PoolTokenType);
|
|
16
16
|
cleanCache(): void;
|
|
17
|
-
getContractHelper: () =>
|
|
17
|
+
getContractHelper: () => import("../..").ContractsHelper;
|
|
18
18
|
getPoolTokenAddress(): Promise<Address>;
|
|
19
|
-
getOffchainPoolToken(): Promise<
|
|
19
|
+
getOffchainPoolToken(): Promise<offchain.lendingPool.Borrowable>;
|
|
20
20
|
initializePoolToken(): Promise<Contract>;
|
|
21
21
|
initializeToken(): Promise<Contract>;
|
|
22
22
|
getPriceDenomLP(): Promise<number>;
|
|
@@ -8,10 +8,13 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
8
8
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
9
|
});
|
|
10
10
|
};
|
|
11
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
12
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
13
|
+
};
|
|
11
14
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
15
|
const types_1 = require("../../../config/types");
|
|
13
|
-
const
|
|
14
|
-
class Borrowable extends
|
|
16
|
+
const poolToken_1 = __importDefault(require("../../poolToken"));
|
|
17
|
+
class Borrowable extends poolToken_1.default {
|
|
15
18
|
constructor(lendingPool, poolTokenType) {
|
|
16
19
|
super();
|
|
17
20
|
this.borrowableCache = {};
|
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
import { Contract } from "../../types";
|
|
2
2
|
import LendingPool from './index';
|
|
3
3
|
import { Address, PoolTokenType } from '../../../config/types';
|
|
4
|
-
import
|
|
5
|
-
|
|
4
|
+
import * as offchain from '../../../offchain';
|
|
5
|
+
import PoolToken from '../../poolToken';
|
|
6
|
+
export default class Collateral extends PoolToken {
|
|
6
7
|
lendingPool: LendingPool;
|
|
7
8
|
collateralCache: {};
|
|
8
9
|
constructor(lendingPool: LendingPool, poolTokenType: PoolTokenType);
|
|
9
10
|
cleanCache(): void;
|
|
10
|
-
getContractHelper: () =>
|
|
11
|
+
getContractHelper: () => import("../..").ContractsHelper;
|
|
11
12
|
getPoolTokenAddress(): Promise<Address>;
|
|
12
13
|
getOffchainPoolToken(): Promise<offchain.lendingPool.Collateral>;
|
|
13
14
|
initializePoolToken(): Promise<Contract>;
|
|
@@ -8,9 +8,12 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
8
8
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
9
|
});
|
|
10
10
|
};
|
|
11
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
12
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
13
|
+
};
|
|
11
14
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
const
|
|
13
|
-
class Collateral extends
|
|
15
|
+
const poolToken_1 = __importDefault(require("../../poolToken"));
|
|
16
|
+
class Collateral extends poolToken_1.default {
|
|
14
17
|
constructor(lendingPool, poolTokenType) {
|
|
15
18
|
super();
|
|
16
19
|
this.collateralCache = {};
|
|
@@ -4,7 +4,7 @@ import { Contract } from "ethers";
|
|
|
4
4
|
import Collateral from "./collateral";
|
|
5
5
|
import Borrowable from "./borrowable";
|
|
6
6
|
import { Address, PoolTokenType } from '../../../config/types';
|
|
7
|
-
import
|
|
7
|
+
import PoolToken from '../../poolToken';
|
|
8
8
|
export { Borrowable, Collateral, };
|
|
9
9
|
export default class LendingPool {
|
|
10
10
|
factory: ImpermaxFactory;
|
|
@@ -35,8 +35,8 @@ export default class LendingPool {
|
|
|
35
35
|
pta: () => Borrowable;
|
|
36
36
|
ptb: () => Borrowable;
|
|
37
37
|
ptc: () => Collateral;
|
|
38
|
-
getPoolToken(poolTokenType: PoolTokenType):
|
|
39
|
-
getOffchainLendingPool(): Promise<import("
|
|
38
|
+
getPoolToken(poolTokenType: PoolTokenType): PoolToken;
|
|
39
|
+
getOffchainLendingPool(): Promise<import("../../..").OffchainLendingPool>;
|
|
40
40
|
private initializePoolTokenAddresses;
|
|
41
41
|
getPoolTokenAddresses(): Promise<{
|
|
42
42
|
collateral: string;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { BigNumber } from "ethers";
|
|
2
2
|
import { Contract } from "./types";
|
|
3
3
|
import { Address, PoolTokenType } from '../config/types';
|
|
4
|
-
import
|
|
4
|
+
import * as offchain from '../offchain';
|
|
5
5
|
export default abstract class PoolToken {
|
|
6
6
|
poolTokenType: PoolTokenType;
|
|
7
7
|
cache: {
|