@aurigami/sdk 0.1.6 → 0.2.3
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/dist/BlockchainEntity.d.ts +6 -7
- package/dist/MoneyMarket.d.ts +25 -12
- package/dist/SDK.d.ts +15 -9
- package/dist/constants.d.ts +19 -2
- package/dist/decimals.d.ts +1 -0
- package/dist/dummy.d.ts +6 -5
- package/dist/helpers.d.ts +9 -0
- package/dist/index.d.ts +4 -1
- package/dist/priceFetcher.d.ts +18 -0
- package/dist/sdk.cjs.development.js +2210 -312
- package/dist/sdk.cjs.development.js.map +1 -1
- package/dist/sdk.cjs.production.min.js +1 -1
- package/dist/sdk.cjs.production.min.js.map +1 -1
- package/dist/sdk.esm.js +2184 -310
- package/dist/sdk.esm.js.map +1 -1
- package/dist/token.d.ts +7 -0
- package/dist/tokenAmount.d.ts +8 -0
- package/dist/types.d.ts +23 -11
- package/package.json +8 -7
- package/src/BlockchainEntity.ts +13 -10
- package/src/MoneyMarket.ts +178 -47
- package/src/SDK.ts +163 -72
- package/src/abis/IUniswapV2Pair.json +663 -0
- package/src/abis/Oracle.json +247 -0
- package/src/abis/dummy.json +3 -0
- package/src/constants.ts +75 -8
- package/src/decimals.ts +18 -0
- package/src/dummy.ts +30 -44
- package/src/helpers.ts +37 -0
- package/src/index.ts +4 -4
- package/src/priceFetcher.ts +108 -0
- package/src/token.ts +21 -0
- package/src/tokenAmount.ts +29 -0
- package/src/types.ts +26 -12
package/src/types.ts
CHANGED
|
@@ -1,12 +1,26 @@
|
|
|
1
1
|
import type { providers, Signer } from 'ethers';
|
|
2
|
-
import {
|
|
2
|
+
import { TokenAmount } from './tokenAmount';
|
|
3
3
|
|
|
4
|
-
export
|
|
4
|
+
export enum ComptrollerRewardType {
|
|
5
|
+
PLY = 0,
|
|
6
|
+
AURORA
|
|
7
|
+
};
|
|
8
|
+
export type NetworkConnection = {
|
|
9
|
+
provider: providers.Provider,
|
|
10
|
+
signer?: Signer
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export type Address = string;
|
|
14
|
+
|
|
15
|
+
export type CurrencyAmount = {
|
|
16
|
+
currency: string,
|
|
17
|
+
amount: string
|
|
18
|
+
};
|
|
5
19
|
|
|
6
20
|
export type MoneyMarketDetails = {
|
|
7
21
|
auTokenAddress: string;
|
|
8
|
-
totalTokenDeposited:
|
|
9
|
-
totalTokenBorrowed:
|
|
22
|
+
totalTokenDeposited: TokenAmount;
|
|
23
|
+
totalTokenBorrowed: TokenAmount;
|
|
10
24
|
depositApy: number;
|
|
11
25
|
depositPlyApy: number;
|
|
12
26
|
borrowApy: number;
|
|
@@ -17,8 +31,8 @@ export type MoneyMarketDetails = {
|
|
|
17
31
|
export type UserDetails = {
|
|
18
32
|
markets: UserMarketDetails[];
|
|
19
33
|
borrowLimit: CurrencyAmount;
|
|
20
|
-
accruedPly:
|
|
21
|
-
lockedPly:
|
|
34
|
+
accruedPly: TokenAmount;
|
|
35
|
+
lockedPly: TokenAmount;
|
|
22
36
|
borrowableAmount: CurrencyAmount;
|
|
23
37
|
};
|
|
24
38
|
|
|
@@ -35,13 +49,13 @@ export type PlyAuroraPool = {
|
|
|
35
49
|
|
|
36
50
|
export type UserMarketDetails = {
|
|
37
51
|
market: string;
|
|
38
|
-
depositBalance:
|
|
39
|
-
borrowBalance:
|
|
52
|
+
depositBalance: TokenAmount;
|
|
53
|
+
borrowBalance: TokenAmount;
|
|
40
54
|
isCollateral: boolean;
|
|
41
|
-
maxWithdrawableAmount:
|
|
55
|
+
maxWithdrawableAmount: TokenAmount;
|
|
42
56
|
};
|
|
43
57
|
|
|
44
58
|
export type PlyAuroraPoolDetails = {
|
|
45
|
-
totalStakedLiquidity:
|
|
46
|
-
apy:
|
|
47
|
-
};
|
|
59
|
+
totalStakedLiquidity: TokenAmount;
|
|
60
|
+
apy: string;
|
|
61
|
+
};
|