@defisaver/positions-sdk 0.0.33 → 0.0.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/README.md +63 -63
- package/cjs/markets/morphoBlue/index.d.ts +2 -0
- package/cjs/markets/morphoBlue/index.js +17 -1
- package/cjs/morphoBlue/index.js +6 -3
- package/cjs/types/morphoBlue.d.ts +2 -1
- package/cjs/types/morphoBlue.js +1 -0
- package/esm/markets/morphoBlue/index.d.ts +2 -0
- package/esm/markets/morphoBlue/index.js +15 -0
- package/esm/morphoBlue/index.js +6 -3
- package/esm/types/morphoBlue.d.ts +2 -1
- package/esm/types/morphoBlue.js +1 -0
- package/package.json +40 -40
- package/src/aaveV2/index.ts +226 -226
- package/src/aaveV3/index.ts +561 -561
- package/src/assets/index.ts +60 -60
- package/src/chickenBonds/index.ts +123 -123
- package/src/compoundV2/index.ts +219 -219
- package/src/compoundV3/index.ts +275 -275
- package/src/config/contracts.js +817 -817
- package/src/constants/index.ts +5 -5
- package/src/contracts.ts +124 -124
- package/src/curveUsd/index.ts +228 -228
- package/src/exchange/index.ts +17 -17
- package/src/helpers/aaveHelpers/index.ts +134 -134
- package/src/helpers/chickenBondsHelpers/index.ts +23 -23
- package/src/helpers/compoundHelpers/index.ts +181 -181
- package/src/helpers/curveUsdHelpers/index.ts +40 -40
- package/src/helpers/index.ts +6 -6
- package/src/helpers/makerHelpers/index.ts +94 -94
- package/src/helpers/morphoBlueHelpers/index.ts +46 -46
- package/src/helpers/sparkHelpers/index.ts +106 -106
- package/src/index.ts +42 -42
- package/src/liquity/index.ts +116 -116
- package/src/maker/index.ts +101 -101
- package/src/markets/aave/index.ts +80 -80
- package/src/markets/aave/marketAssets.ts +24 -24
- package/src/markets/compound/index.ts +141 -141
- package/src/markets/compound/marketsAssets.ts +48 -48
- package/src/markets/curveUsd/index.ts +69 -69
- package/src/markets/index.ts +4 -4
- package/src/markets/morphoBlue/index.ts +36 -20
- package/src/markets/spark/index.ts +29 -29
- package/src/markets/spark/marketAssets.ts +10 -10
- package/src/moneymarket/moneymarketCommonService.ts +75 -75
- package/src/morphoAaveV2/index.ts +255 -255
- package/src/morphoAaveV3/index.ts +619 -619
- package/src/morphoBlue/index.ts +170 -165
- package/src/multicall/index.ts +22 -22
- package/src/services/dsrService.ts +15 -15
- package/src/services/priceService.ts +21 -21
- package/src/services/utils.ts +47 -47
- package/src/spark/index.ts +422 -422
- package/src/staking/staking.ts +167 -167
- package/src/types/aave.ts +256 -256
- package/src/types/chickenBonds.ts +45 -45
- package/src/types/common.ts +83 -83
- package/src/types/compound.ts +128 -128
- package/src/types/curveUsd.ts +118 -118
- package/src/types/index.ts +7 -7
- package/src/types/liquity.ts +30 -30
- package/src/types/maker.ts +50 -50
- package/src/types/morphoBlue.ts +80 -79
- package/src/types/spark.ts +106 -106
- package/yarn-error.log +0 -64
package/README.md
CHANGED
|
@@ -1,63 +1,63 @@
|
|
|
1
|
-
# DeFi Saver Positions SDK
|
|
2
|
-
|
|
3
|
-
Supported protocols:
|
|
4
|
-
- [Maker](https://github.com/defisaver/defisaver-positions-sdk/tree/main/src/maker)
|
|
5
|
-
- [Spark](https://github.com/defisaver/defisaver-positions-sdk/tree/main/src/spark)
|
|
6
|
-
- [CrvUSD](https://github.com/defisaver/defisaver-positions-sdk/tree/main/src/curveUsd)
|
|
7
|
-
- [Aave V2](https://github.com/defisaver/defisaver-positions-sdk/tree/main/src/aaveV2)
|
|
8
|
-
- [Aave V3](https://github.com/defisaver/defisaver-positions-sdk/tree/main/src/aaveV3)
|
|
9
|
-
- [Morpho Aave V2](https://github.com/defisaver/defisaver-positions-sdk/tree/main/src/morphoAaveV2)
|
|
10
|
-
- [Morpho Aave V3](https://github.com/defisaver/defisaver-positions-sdk/tree/main/src/morphoAaveV3)
|
|
11
|
-
- [Compound V2](https://github.com/defisaver/defisaver-positions-sdk/tree/main/src/compoundV2)
|
|
12
|
-
- [Compound V3](https://github.com/defisaver/defisaver-positions-sdk/tree/main/src/compoundV3)
|
|
13
|
-
- [Liquity](https://github.com/defisaver/defisaver-positions-sdk/tree/main/src/liquity)
|
|
14
|
-
- [Chicken Bonds](https://github.com/defisaver/defisaver-positions-sdk/tree/main/src/chickenBonds)
|
|
15
|
-
|
|
16
|
-
## Setup
|
|
17
|
-
Supported Node version is v10.
|
|
18
|
-
|
|
19
|
-
- run `npm install` (first time)
|
|
20
|
-
- run `npm run build`
|
|
21
|
-
|
|
22
|
-
`build` command will generate contracts and build ejs and esm folders
|
|
23
|
-
|
|
24
|
-
## How to use
|
|
25
|
-
[All available imports](https://github.com/defisaver/defisaver-positions-sdk/blob/main/src/index.ts)
|
|
26
|
-
|
|
27
|
-
This is a Compound V3 example, and every other protocol is similar
|
|
28
|
-
```js
|
|
29
|
-
import Web3 from 'web3';
|
|
30
|
-
import { compoundV3 } from '@defisaver/positions-sdk';
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
// every protocol has market data and user data getters
|
|
34
|
-
const {
|
|
35
|
-
getCompoundV3MarketsData,
|
|
36
|
-
getCompoundV3AccountData,
|
|
37
|
-
} = compoundV3;
|
|
38
|
-
|
|
39
|
-
const provider = 'Your RPC provider';
|
|
40
|
-
const web3 = new Web3(provider);
|
|
41
|
-
|
|
42
|
-
const user = '0x123...';
|
|
43
|
-
|
|
44
|
-
const { assetsData } = await getCompoundV3MarketsData(
|
|
45
|
-
web3, // rpc for the network you are using (note: can be tenderly or any other testnet rpc)
|
|
46
|
-
1, // network
|
|
47
|
-
selectedMarket, // market object like in /src/markets/compound/index.ts
|
|
48
|
-
web3, // this must be mainnet rpc - used for getting prices onchain and calculating apys
|
|
49
|
-
);
|
|
50
|
-
|
|
51
|
-
const userData = await getCompoundV3AccountData(
|
|
52
|
-
web3,
|
|
53
|
-
1, // network
|
|
54
|
-
userAddress, // EOA or DSProxy
|
|
55
|
-
'', // proxy address of the user, or just empty string if checking for EOA
|
|
56
|
-
{
|
|
57
|
-
selectedMarket, // market object as in /src/markets/compound/index.ts
|
|
58
|
-
assetsData,
|
|
59
|
-
}
|
|
60
|
-
);
|
|
61
|
-
```
|
|
62
|
-
|
|
63
|
-
More examples found [here](https://github.com/defisaver/defisaver-positions-sdk/tree/main/tests)
|
|
1
|
+
# DeFi Saver Positions SDK
|
|
2
|
+
|
|
3
|
+
Supported protocols:
|
|
4
|
+
- [Maker](https://github.com/defisaver/defisaver-positions-sdk/tree/main/src/maker)
|
|
5
|
+
- [Spark](https://github.com/defisaver/defisaver-positions-sdk/tree/main/src/spark)
|
|
6
|
+
- [CrvUSD](https://github.com/defisaver/defisaver-positions-sdk/tree/main/src/curveUsd)
|
|
7
|
+
- [Aave V2](https://github.com/defisaver/defisaver-positions-sdk/tree/main/src/aaveV2)
|
|
8
|
+
- [Aave V3](https://github.com/defisaver/defisaver-positions-sdk/tree/main/src/aaveV3)
|
|
9
|
+
- [Morpho Aave V2](https://github.com/defisaver/defisaver-positions-sdk/tree/main/src/morphoAaveV2)
|
|
10
|
+
- [Morpho Aave V3](https://github.com/defisaver/defisaver-positions-sdk/tree/main/src/morphoAaveV3)
|
|
11
|
+
- [Compound V2](https://github.com/defisaver/defisaver-positions-sdk/tree/main/src/compoundV2)
|
|
12
|
+
- [Compound V3](https://github.com/defisaver/defisaver-positions-sdk/tree/main/src/compoundV3)
|
|
13
|
+
- [Liquity](https://github.com/defisaver/defisaver-positions-sdk/tree/main/src/liquity)
|
|
14
|
+
- [Chicken Bonds](https://github.com/defisaver/defisaver-positions-sdk/tree/main/src/chickenBonds)
|
|
15
|
+
|
|
16
|
+
## Setup
|
|
17
|
+
Supported Node version is v10.
|
|
18
|
+
|
|
19
|
+
- run `npm install` (first time)
|
|
20
|
+
- run `npm run build`
|
|
21
|
+
|
|
22
|
+
`build` command will generate contracts and build ejs and esm folders
|
|
23
|
+
|
|
24
|
+
## How to use
|
|
25
|
+
[All available imports](https://github.com/defisaver/defisaver-positions-sdk/blob/main/src/index.ts)
|
|
26
|
+
|
|
27
|
+
This is a Compound V3 example, and every other protocol is similar
|
|
28
|
+
```js
|
|
29
|
+
import Web3 from 'web3';
|
|
30
|
+
import { compoundV3 } from '@defisaver/positions-sdk';
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
// every protocol has market data and user data getters
|
|
34
|
+
const {
|
|
35
|
+
getCompoundV3MarketsData,
|
|
36
|
+
getCompoundV3AccountData,
|
|
37
|
+
} = compoundV3;
|
|
38
|
+
|
|
39
|
+
const provider = 'Your RPC provider';
|
|
40
|
+
const web3 = new Web3(provider);
|
|
41
|
+
|
|
42
|
+
const user = '0x123...';
|
|
43
|
+
|
|
44
|
+
const { assetsData } = await getCompoundV3MarketsData(
|
|
45
|
+
web3, // rpc for the network you are using (note: can be tenderly or any other testnet rpc)
|
|
46
|
+
1, // network
|
|
47
|
+
selectedMarket, // market object like in /src/markets/compound/index.ts
|
|
48
|
+
web3, // this must be mainnet rpc - used for getting prices onchain and calculating apys
|
|
49
|
+
);
|
|
50
|
+
|
|
51
|
+
const userData = await getCompoundV3AccountData(
|
|
52
|
+
web3,
|
|
53
|
+
1, // network
|
|
54
|
+
userAddress, // EOA or DSProxy
|
|
55
|
+
'', // proxy address of the user, or just empty string if checking for EOA
|
|
56
|
+
{
|
|
57
|
+
selectedMarket, // market object as in /src/markets/compound/index.ts
|
|
58
|
+
assetsData,
|
|
59
|
+
}
|
|
60
|
+
);
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
More examples found [here](https://github.com/defisaver/defisaver-positions-sdk/tree/main/tests)
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { MorphoBlueMarketData } from '../../types';
|
|
2
2
|
import { NetworkNumber } from '../../types/common';
|
|
3
3
|
export declare const MORPHO_BLUE_WSTETH_ETH: (networkId?: NetworkNumber) => MorphoBlueMarketData;
|
|
4
|
+
export declare const MORPHO_BLUE_WSTETH_USDC: (networkId?: NetworkNumber) => MorphoBlueMarketData;
|
|
4
5
|
export declare const MorphoBlueMarkets: (networkId: NetworkNumber) => {
|
|
5
6
|
readonly morphobluewstetheth: MorphoBlueMarketData;
|
|
7
|
+
readonly morphobluewstethusdc: MorphoBlueMarketData;
|
|
6
8
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.MorphoBlueMarkets = exports.MORPHO_BLUE_WSTETH_ETH = void 0;
|
|
3
|
+
exports.MorphoBlueMarkets = exports.MORPHO_BLUE_WSTETH_USDC = exports.MORPHO_BLUE_WSTETH_ETH = void 0;
|
|
4
4
|
const types_1 = require("../../types");
|
|
5
5
|
const common_1 = require("../../types/common");
|
|
6
6
|
const MORPHO_BLUE_WSTETH_ETH = (networkId = common_1.NetworkNumber.Eth) => ({
|
|
@@ -18,7 +18,23 @@ const MORPHO_BLUE_WSTETH_ETH = (networkId = common_1.NetworkNumber.Eth) => ({
|
|
|
18
18
|
protocolName: 'morpho-blue',
|
|
19
19
|
});
|
|
20
20
|
exports.MORPHO_BLUE_WSTETH_ETH = MORPHO_BLUE_WSTETH_ETH;
|
|
21
|
+
const MORPHO_BLUE_WSTETH_USDC = (networkId = common_1.NetworkNumber.Eth) => ({
|
|
22
|
+
chainIds: [1],
|
|
23
|
+
label: 'Morpho Blue',
|
|
24
|
+
shortLabel: 'wstETH/USDC',
|
|
25
|
+
value: types_1.MorphoBlueVersions.MorphoBlueWstEthUSDC,
|
|
26
|
+
url: 'default',
|
|
27
|
+
loanToken: '0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48',
|
|
28
|
+
collateralToken: '0x7f39C581F595B53c5cb19bD0b3f8dA6c935E2Ca0',
|
|
29
|
+
oracle: '0x48F7E36EB6B826B2dF4B2E630B62Cd25e89E40e2',
|
|
30
|
+
irm: '0x870aC11D48B15DB9a138Cf899d20F13F79Ba00BC',
|
|
31
|
+
lltv: 0.86,
|
|
32
|
+
// icon: SvgAdapter(protocolIcons.spark),
|
|
33
|
+
protocolName: 'morpho-blue',
|
|
34
|
+
});
|
|
35
|
+
exports.MORPHO_BLUE_WSTETH_USDC = MORPHO_BLUE_WSTETH_USDC;
|
|
21
36
|
const MorphoBlueMarkets = (networkId) => ({
|
|
22
37
|
[types_1.MorphoBlueVersions.MorphoBlueWstEthEth]: (0, exports.MORPHO_BLUE_WSTETH_ETH)(networkId),
|
|
38
|
+
[types_1.MorphoBlueVersions.MorphoBlueWstEthUSDC]: (0, exports.MORPHO_BLUE_WSTETH_USDC)(networkId),
|
|
23
39
|
});
|
|
24
40
|
exports.MorphoBlueMarkets = MorphoBlueMarkets;
|
package/cjs/morphoBlue/index.js
CHANGED
|
@@ -77,7 +77,10 @@ function getMorphoBlueMarketData(web3, network, selectedMarket, mainnetWeb3) {
|
|
|
77
77
|
const supplyRate = getSupplyRate(marketInfo.totalSupplyAssets, marketInfo.totalBorrowAssets, marketInfo.borrowRate, marketInfo.fee);
|
|
78
78
|
const compoundedBorrowRate = getBorrowRate(marketInfo.borrowRate, marketInfo.totalBorrowShares);
|
|
79
79
|
const utillization = new decimal_js_1.default(marketInfo.totalBorrowAssets).div(marketInfo.totalSupplyAssets).mul(100).toString();
|
|
80
|
-
const
|
|
80
|
+
const oracleScaleFactor = new decimal_js_1.default(36).add(loanTokenInfo.decimals).sub(collateralTokenInfo.decimals).toString();
|
|
81
|
+
const oracleScale = new decimal_js_1.default(10).pow(oracleScaleFactor).toString();
|
|
82
|
+
const scale = new decimal_js_1.default(10).pow(loanTokenInfo.decimals).toString();
|
|
83
|
+
const oracleRate = new decimal_js_1.default(marketInfo.oracle).div(oracleScale).toString();
|
|
81
84
|
const assetsData = {};
|
|
82
85
|
assetsData[(0, utils_1.wethToEth)(loanTokenInfo.symbol)] = {
|
|
83
86
|
symbol: (0, utils_1.wethToEth)(loanTokenInfo.symbol),
|
|
@@ -85,8 +88,8 @@ function getMorphoBlueMarketData(web3, network, selectedMarket, mainnetWeb3) {
|
|
|
85
88
|
price: new decimal_js_1.default(loanTokenPrice).div(1e8).toString(),
|
|
86
89
|
supplyRate: new decimal_js_1.default(supplyRate).div(constants_1.WAD).mul(100).toString(),
|
|
87
90
|
borrowRate: new decimal_js_1.default(compoundedBorrowRate).div(constants_1.WAD).mul(100).toString(),
|
|
88
|
-
totalSupply: new decimal_js_1.default(marketInfo.totalSupplyAssets).div(
|
|
89
|
-
totalBorrow: new decimal_js_1.default(marketInfo.totalBorrowAssets).div(
|
|
91
|
+
totalSupply: new decimal_js_1.default(marketInfo.totalSupplyAssets).div(scale).toString(),
|
|
92
|
+
totalBorrow: new decimal_js_1.default(marketInfo.totalBorrowAssets).div(scale).toString(),
|
|
90
93
|
};
|
|
91
94
|
assetsData[(0, utils_1.wethToEth)(collateralTokenInfo.symbol)] = {
|
|
92
95
|
symbol: (0, utils_1.wethToEth)(collateralTokenInfo.symbol),
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { MMUsedAssets, NetworkNumber } from './common';
|
|
2
2
|
export declare enum MorphoBlueVersions {
|
|
3
|
-
MorphoBlueWstEthEth = "morphobluewstetheth"
|
|
3
|
+
MorphoBlueWstEthEth = "morphobluewstetheth",
|
|
4
|
+
MorphoBlueWstEthUSDC = "morphobluewstethusdc"
|
|
4
5
|
}
|
|
5
6
|
export interface MorphoBlueMarketData {
|
|
6
7
|
chainIds: NetworkNumber[];
|
package/cjs/types/morphoBlue.js
CHANGED
|
@@ -4,4 +4,5 @@ exports.MorphoBlueVersions = void 0;
|
|
|
4
4
|
var MorphoBlueVersions;
|
|
5
5
|
(function (MorphoBlueVersions) {
|
|
6
6
|
MorphoBlueVersions["MorphoBlueWstEthEth"] = "morphobluewstetheth";
|
|
7
|
+
MorphoBlueVersions["MorphoBlueWstEthUSDC"] = "morphobluewstethusdc";
|
|
7
8
|
})(MorphoBlueVersions || (exports.MorphoBlueVersions = MorphoBlueVersions = {}));
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { MorphoBlueMarketData } from '../../types';
|
|
2
2
|
import { NetworkNumber } from '../../types/common';
|
|
3
3
|
export declare const MORPHO_BLUE_WSTETH_ETH: (networkId?: NetworkNumber) => MorphoBlueMarketData;
|
|
4
|
+
export declare const MORPHO_BLUE_WSTETH_USDC: (networkId?: NetworkNumber) => MorphoBlueMarketData;
|
|
4
5
|
export declare const MorphoBlueMarkets: (networkId: NetworkNumber) => {
|
|
5
6
|
readonly morphobluewstetheth: MorphoBlueMarketData;
|
|
7
|
+
readonly morphobluewstethusdc: MorphoBlueMarketData;
|
|
6
8
|
};
|
|
@@ -14,6 +14,21 @@ export const MORPHO_BLUE_WSTETH_ETH = (networkId = NetworkNumber.Eth) => ({
|
|
|
14
14
|
// icon: SvgAdapter(protocolIcons.spark),
|
|
15
15
|
protocolName: 'morpho-blue',
|
|
16
16
|
});
|
|
17
|
+
export const MORPHO_BLUE_WSTETH_USDC = (networkId = NetworkNumber.Eth) => ({
|
|
18
|
+
chainIds: [1],
|
|
19
|
+
label: 'Morpho Blue',
|
|
20
|
+
shortLabel: 'wstETH/USDC',
|
|
21
|
+
value: MorphoBlueVersions.MorphoBlueWstEthUSDC,
|
|
22
|
+
url: 'default',
|
|
23
|
+
loanToken: '0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48',
|
|
24
|
+
collateralToken: '0x7f39C581F595B53c5cb19bD0b3f8dA6c935E2Ca0',
|
|
25
|
+
oracle: '0x48F7E36EB6B826B2dF4B2E630B62Cd25e89E40e2',
|
|
26
|
+
irm: '0x870aC11D48B15DB9a138Cf899d20F13F79Ba00BC',
|
|
27
|
+
lltv: 0.86,
|
|
28
|
+
// icon: SvgAdapter(protocolIcons.spark),
|
|
29
|
+
protocolName: 'morpho-blue',
|
|
30
|
+
});
|
|
17
31
|
export const MorphoBlueMarkets = (networkId) => ({
|
|
18
32
|
[MorphoBlueVersions.MorphoBlueWstEthEth]: MORPHO_BLUE_WSTETH_ETH(networkId),
|
|
33
|
+
[MorphoBlueVersions.MorphoBlueWstEthUSDC]: MORPHO_BLUE_WSTETH_USDC(networkId),
|
|
19
34
|
});
|
package/esm/morphoBlue/index.js
CHANGED
|
@@ -71,7 +71,10 @@ export function getMorphoBlueMarketData(web3, network, selectedMarket, mainnetWe
|
|
|
71
71
|
const supplyRate = getSupplyRate(marketInfo.totalSupplyAssets, marketInfo.totalBorrowAssets, marketInfo.borrowRate, marketInfo.fee);
|
|
72
72
|
const compoundedBorrowRate = getBorrowRate(marketInfo.borrowRate, marketInfo.totalBorrowShares);
|
|
73
73
|
const utillization = new Dec(marketInfo.totalBorrowAssets).div(marketInfo.totalSupplyAssets).mul(100).toString();
|
|
74
|
-
const
|
|
74
|
+
const oracleScaleFactor = new Dec(36).add(loanTokenInfo.decimals).sub(collateralTokenInfo.decimals).toString();
|
|
75
|
+
const oracleScale = new Dec(10).pow(oracleScaleFactor).toString();
|
|
76
|
+
const scale = new Dec(10).pow(loanTokenInfo.decimals).toString();
|
|
77
|
+
const oracleRate = new Dec(marketInfo.oracle).div(oracleScale).toString();
|
|
75
78
|
const assetsData = {};
|
|
76
79
|
assetsData[wethToEth(loanTokenInfo.symbol)] = {
|
|
77
80
|
symbol: wethToEth(loanTokenInfo.symbol),
|
|
@@ -79,8 +82,8 @@ export function getMorphoBlueMarketData(web3, network, selectedMarket, mainnetWe
|
|
|
79
82
|
price: new Dec(loanTokenPrice).div(1e8).toString(),
|
|
80
83
|
supplyRate: new Dec(supplyRate).div(WAD).mul(100).toString(),
|
|
81
84
|
borrowRate: new Dec(compoundedBorrowRate).div(WAD).mul(100).toString(),
|
|
82
|
-
totalSupply: new Dec(marketInfo.totalSupplyAssets).div(
|
|
83
|
-
totalBorrow: new Dec(marketInfo.totalBorrowAssets).div(
|
|
85
|
+
totalSupply: new Dec(marketInfo.totalSupplyAssets).div(scale).toString(),
|
|
86
|
+
totalBorrow: new Dec(marketInfo.totalBorrowAssets).div(scale).toString(),
|
|
84
87
|
};
|
|
85
88
|
assetsData[wethToEth(collateralTokenInfo.symbol)] = {
|
|
86
89
|
symbol: wethToEth(collateralTokenInfo.symbol),
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { MMUsedAssets, NetworkNumber } from './common';
|
|
2
2
|
export declare enum MorphoBlueVersions {
|
|
3
|
-
MorphoBlueWstEthEth = "morphobluewstetheth"
|
|
3
|
+
MorphoBlueWstEthEth = "morphobluewstetheth",
|
|
4
|
+
MorphoBlueWstEthUSDC = "morphobluewstethusdc"
|
|
4
5
|
}
|
|
5
6
|
export interface MorphoBlueMarketData {
|
|
6
7
|
chainIds: NetworkNumber[];
|
package/esm/types/morphoBlue.js
CHANGED
package/package.json
CHANGED
|
@@ -1,40 +1,40 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@defisaver/positions-sdk",
|
|
3
|
-
"version": "0.0.
|
|
4
|
-
"description": "",
|
|
5
|
-
"main": "./cjs/index.js",
|
|
6
|
-
"module": "./esm/index.js",
|
|
7
|
-
"types": "./esm/index.d.ts",
|
|
8
|
-
"scripts": {
|
|
9
|
-
"build:esm": "rm -rf esm && tsc -p tsconfig.json",
|
|
10
|
-
"build:cjs": "rm -rf cjs && tsc -p tsconfig.cjs.json",
|
|
11
|
-
"build": "npm run generate-contracts && npm run build:cjs && npm run build:esm",
|
|
12
|
-
"dev": "npm run generate-contracts && tsc -p tsconfig.cjs.json --watch",
|
|
13
|
-
"lint": "eslint src/ --fix",
|
|
14
|
-
"generate-contracts": "node scripts/generateContracts.js",
|
|
15
|
-
"test": "mocha tests/*",
|
|
16
|
-
"build-test": "npm run build && mocha tests/*"
|
|
17
|
-
},
|
|
18
|
-
"keywords": [],
|
|
19
|
-
"author": "",
|
|
20
|
-
"license": "ISC",
|
|
21
|
-
"dependencies": {
|
|
22
|
-
"@defisaver/tokens": "^1.5.5",
|
|
23
|
-
"@ethersproject/bignumber": "^5.7.0",
|
|
24
|
-
"@morpho-org/morpho-aave-v3-sdk": "^1.5.3",
|
|
25
|
-
"decimal.js": "^10.4.3"
|
|
26
|
-
},
|
|
27
|
-
"devDependencies": {
|
|
28
|
-
"@defisaver/eslint-config": "^1.0.1",
|
|
29
|
-
"chai": "^4.3.8",
|
|
30
|
-
"dotenv": "^16.3.1",
|
|
31
|
-
"eslint": "^8.49.0",
|
|
32
|
-
"mocha": "^10.2.0",
|
|
33
|
-
"typechain": "^8.3.1",
|
|
34
|
-
"typechain-target-web3-v1-3mihai3": "^6.0.2",
|
|
35
|
-
"typescript": "^5.2.2"
|
|
36
|
-
},
|
|
37
|
-
"peerDependencies": {
|
|
38
|
-
"web3": "^1.10.2"
|
|
39
|
-
}
|
|
40
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "@defisaver/positions-sdk",
|
|
3
|
+
"version": "0.0.34",
|
|
4
|
+
"description": "",
|
|
5
|
+
"main": "./cjs/index.js",
|
|
6
|
+
"module": "./esm/index.js",
|
|
7
|
+
"types": "./esm/index.d.ts",
|
|
8
|
+
"scripts": {
|
|
9
|
+
"build:esm": "rm -rf esm && tsc -p tsconfig.json",
|
|
10
|
+
"build:cjs": "rm -rf cjs && tsc -p tsconfig.cjs.json",
|
|
11
|
+
"build": "npm run generate-contracts && npm run build:cjs && npm run build:esm",
|
|
12
|
+
"dev": "npm run generate-contracts && tsc -p tsconfig.cjs.json --watch",
|
|
13
|
+
"lint": "eslint src/ --fix",
|
|
14
|
+
"generate-contracts": "node scripts/generateContracts.js",
|
|
15
|
+
"test": "mocha tests/*",
|
|
16
|
+
"build-test": "npm run build && mocha tests/*"
|
|
17
|
+
},
|
|
18
|
+
"keywords": [],
|
|
19
|
+
"author": "",
|
|
20
|
+
"license": "ISC",
|
|
21
|
+
"dependencies": {
|
|
22
|
+
"@defisaver/tokens": "^1.5.5",
|
|
23
|
+
"@ethersproject/bignumber": "^5.7.0",
|
|
24
|
+
"@morpho-org/morpho-aave-v3-sdk": "^1.5.3",
|
|
25
|
+
"decimal.js": "^10.4.3"
|
|
26
|
+
},
|
|
27
|
+
"devDependencies": {
|
|
28
|
+
"@defisaver/eslint-config": "^1.0.1",
|
|
29
|
+
"chai": "^4.3.8",
|
|
30
|
+
"dotenv": "^16.3.1",
|
|
31
|
+
"eslint": "^8.49.0",
|
|
32
|
+
"mocha": "^10.2.0",
|
|
33
|
+
"typechain": "^8.3.1",
|
|
34
|
+
"typechain-target-web3-v1-3mihai3": "^6.0.2",
|
|
35
|
+
"typescript": "^5.2.2"
|
|
36
|
+
},
|
|
37
|
+
"peerDependencies": {
|
|
38
|
+
"web3": "^1.10.2"
|
|
39
|
+
}
|
|
40
|
+
}
|