@defisaver/positions-sdk 0.0.23 → 0.0.24
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/.yarn/releases/yarn-1.22.1.cjs +147386 -0
- package/.yarn/releases/yarn-1.22.1.js +147386 -0
- package/.yarnrc.yml +1 -0
- package/cjs/helpers/curveUsdHelpers/index.js +0 -1
- package/cjs/markets/curveUsd/index.js +15 -15
- package/cjs/types/curveUsd.d.ts +5 -6
- package/cjs/types/curveUsd.js +5 -5
- package/esm/helpers/curveUsdHelpers/index.js +0 -1
- package/esm/markets/curveUsd/index.js +15 -15
- package/esm/types/curveUsd.d.ts +5 -6
- package/esm/types/curveUsd.js +5 -5
- package/package-lock.json +12896 -0
- package/package.json +4 -4
- package/src/helpers/curveUsdHelpers/index.ts +0 -1
- package/src/markets/curveUsd/index.ts +15 -15
- package/src/types/curveUsd.ts +5 -6
- package/yarn-error.log +0 -64
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@defisaver/positions-sdk",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.24",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "./cjs/index.js",
|
|
6
6
|
"module": "./esm/index.js",
|
|
@@ -19,10 +19,10 @@
|
|
|
19
19
|
"author": "",
|
|
20
20
|
"license": "ISC",
|
|
21
21
|
"dependencies": {
|
|
22
|
-
"@defisaver/tokens": "^1.5.
|
|
23
|
-
"
|
|
22
|
+
"@defisaver/tokens": "^1.5.5",
|
|
23
|
+
"@ethersproject/bignumber": "^5.7.0",
|
|
24
24
|
"@morpho-org/morpho-aave-v3-sdk": "^1.5.3",
|
|
25
|
-
"
|
|
25
|
+
"decimal.js": "^10.4.3"
|
|
26
26
|
},
|
|
27
27
|
"devDependencies": {
|
|
28
28
|
"@defisaver/eslint-config": "^1.0.1",
|
|
@@ -4,9 +4,9 @@ import { NetworkNumber } from '../../types/common';
|
|
|
4
4
|
|
|
5
5
|
export const CRVUSD_WSTETH_MARKET = (networkId: NetworkNumber): CrvUSDMarketData => ({
|
|
6
6
|
chainIds: [1],
|
|
7
|
-
label: '
|
|
7
|
+
label: 'wstETH',
|
|
8
8
|
shortLabel: 'wstETH',
|
|
9
|
-
value: CrvUSDVersions.
|
|
9
|
+
value: CrvUSDVersions.wstETH,
|
|
10
10
|
collAsset: 'wstETH',
|
|
11
11
|
baseAsset: 'crvUSD',
|
|
12
12
|
controllerAddress: getConfigContractAddress('crvUSDwstETHController', networkId),
|
|
@@ -15,9 +15,9 @@ export const CRVUSD_WSTETH_MARKET = (networkId: NetworkNumber): CrvUSDMarketData
|
|
|
15
15
|
});
|
|
16
16
|
export const CRVUSD_ETH_MARKET = (networkId: NetworkNumber): CrvUSDMarketData => ({
|
|
17
17
|
chainIds: [1],
|
|
18
|
-
label: '
|
|
18
|
+
label: 'ETH',
|
|
19
19
|
shortLabel: 'ETH',
|
|
20
|
-
value: CrvUSDVersions.
|
|
20
|
+
value: CrvUSDVersions.ETH,
|
|
21
21
|
collAsset: 'ETH',
|
|
22
22
|
baseAsset: 'crvUSD',
|
|
23
23
|
controllerAddress: getConfigContractAddress('crvUSDETHController', networkId),
|
|
@@ -26,9 +26,9 @@ export const CRVUSD_ETH_MARKET = (networkId: NetworkNumber): CrvUSDMarketData =>
|
|
|
26
26
|
});
|
|
27
27
|
export const CRVUSD_WBTC_MARKET = (networkId: NetworkNumber): CrvUSDMarketData => ({
|
|
28
28
|
chainIds: [1],
|
|
29
|
-
label: '
|
|
29
|
+
label: 'WBTC',
|
|
30
30
|
shortLabel: 'WBTC',
|
|
31
|
-
value: CrvUSDVersions.
|
|
31
|
+
value: CrvUSDVersions.WBTC,
|
|
32
32
|
collAsset: 'WBTC',
|
|
33
33
|
baseAsset: 'crvUSD',
|
|
34
34
|
controllerAddress: getConfigContractAddress('crvUSDWBTCController', networkId),
|
|
@@ -38,9 +38,9 @@ export const CRVUSD_WBTC_MARKET = (networkId: NetworkNumber): CrvUSDMarketData =
|
|
|
38
38
|
|
|
39
39
|
export const CRVUSD_TBTC_MARKET = (networkId: NetworkNumber): CrvUSDMarketData => ({
|
|
40
40
|
chainIds: [1],
|
|
41
|
-
label: '
|
|
41
|
+
label: 'tBTC',
|
|
42
42
|
shortLabel: 'tBTC',
|
|
43
|
-
value: CrvUSDVersions.
|
|
43
|
+
value: CrvUSDVersions.tBTC,
|
|
44
44
|
collAsset: 'tBTC',
|
|
45
45
|
baseAsset: 'crvUSD',
|
|
46
46
|
controllerAddress: getConfigContractAddress('crvUSDtBTCController', networkId),
|
|
@@ -50,9 +50,9 @@ export const CRVUSD_TBTC_MARKET = (networkId: NetworkNumber): CrvUSDMarketData =
|
|
|
50
50
|
|
|
51
51
|
export const CRVUSD_SFRXETH_MARKET = (networkId: NetworkNumber): CrvUSDMarketData => ({
|
|
52
52
|
chainIds: [1],
|
|
53
|
-
label: '
|
|
53
|
+
label: 'sfrxETH',
|
|
54
54
|
shortLabel: 'sfrxETH',
|
|
55
|
-
value: CrvUSDVersions.
|
|
55
|
+
value: CrvUSDVersions.sfrxETH,
|
|
56
56
|
collAsset: 'sfrxETH',
|
|
57
57
|
baseAsset: 'crvUSD',
|
|
58
58
|
controllerAddress: getConfigContractAddress('crvUSDsfrxETHController', networkId),
|
|
@@ -62,9 +62,9 @@ export const CRVUSD_SFRXETH_MARKET = (networkId: NetworkNumber): CrvUSDMarketDat
|
|
|
62
62
|
|
|
63
63
|
|
|
64
64
|
export const CrvUsdMarkets = (networkId: NetworkNumber) => ({
|
|
65
|
-
[CrvUSDVersions.
|
|
66
|
-
[CrvUSDVersions.
|
|
67
|
-
[CrvUSDVersions.
|
|
68
|
-
[CrvUSDVersions.
|
|
69
|
-
[CrvUSDVersions.
|
|
65
|
+
[CrvUSDVersions.wstETH]: CRVUSD_WSTETH_MARKET(networkId),
|
|
66
|
+
[CrvUSDVersions.ETH]: CRVUSD_ETH_MARKET(networkId),
|
|
67
|
+
[CrvUSDVersions.WBTC]: CRVUSD_WBTC_MARKET(networkId),
|
|
68
|
+
[CrvUSDVersions.tBTC]: CRVUSD_TBTC_MARKET(networkId),
|
|
69
|
+
[CrvUSDVersions.sfrxETH]: CRVUSD_SFRXETH_MARKET(networkId),
|
|
70
70
|
}) as const;
|
package/src/types/curveUsd.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { NetworkNumber } from './common';
|
|
2
2
|
|
|
3
3
|
export enum CrvUSDVersions {
|
|
4
|
-
'
|
|
5
|
-
'
|
|
6
|
-
'
|
|
7
|
-
'
|
|
8
|
-
'
|
|
4
|
+
'wstETH' = 'wstETH',
|
|
5
|
+
'WBTC' = 'WBTC',
|
|
6
|
+
'ETH' = 'ETH',
|
|
7
|
+
'tBTC' = 'tBTC',
|
|
8
|
+
'sfrxETH' = 'sfrxETH',
|
|
9
9
|
}
|
|
10
10
|
|
|
11
11
|
export enum CrvUSDStatus {
|
|
@@ -74,7 +74,6 @@ export interface CrvUSDAggregatedPositionData {
|
|
|
74
74
|
borrowedUsd: string,
|
|
75
75
|
borrowed: string,
|
|
76
76
|
safetyRatio: string,
|
|
77
|
-
borrowLimitUsd: string,
|
|
78
77
|
}
|
|
79
78
|
|
|
80
79
|
export interface CrvUSDUsedAsset {
|
package/yarn-error.log
DELETED
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
Arguments:
|
|
2
|
-
/Users/stefan/.nvm/versions/node/v14.19.0/bin/node /usr/local/Cellar/yarn/1.22.19/libexec/bin/yarn.js
|
|
3
|
-
|
|
4
|
-
PATH:
|
|
5
|
-
/Users/stefan/.nvm/versions/node/v14.19.0/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Applications/VMware Fusion.app/Contents/Public:/usr/local/go/bin:/Users/stefan/WebstormProjects/defisaver-positions-sdk/node_modules/.bin:/usr/local/go
|
|
6
|
-
|
|
7
|
-
Yarn version:
|
|
8
|
-
1.22.19
|
|
9
|
-
|
|
10
|
-
Node version:
|
|
11
|
-
14.19.0
|
|
12
|
-
|
|
13
|
-
Platform:
|
|
14
|
-
darwin x64
|
|
15
|
-
|
|
16
|
-
Trace:
|
|
17
|
-
Error: incorrect data check
|
|
18
|
-
at Zlib.zlibOnError [as onerror] (zlib.js:187:17)
|
|
19
|
-
|
|
20
|
-
npm manifest:
|
|
21
|
-
{
|
|
22
|
-
"name": "defisaver-positions-sdk",
|
|
23
|
-
"version": "0.0.1",
|
|
24
|
-
"description": "",
|
|
25
|
-
"main": "./cjs/index.js",
|
|
26
|
-
"module": "./esm/src/index.js",
|
|
27
|
-
"types": "./esm/src/index.d.ts",
|
|
28
|
-
"scripts": {
|
|
29
|
-
"build:esm": "rm -rf esm && tsc -p tsconfig.json",
|
|
30
|
-
"build:cjs": "rm -rf cjs && tsc -p tsconfig.cjs.json",
|
|
31
|
-
"build": "npm run build:cjs && npm run build:esm",
|
|
32
|
-
"dev": "tsc -p tsconfig.cjs.json --watch",
|
|
33
|
-
"lint": "eslint src/ --fix",
|
|
34
|
-
"generate-contracts": "node scripts/generateContracts.js",
|
|
35
|
-
"test": "mocha tests/*",
|
|
36
|
-
"build-test": "npm run build && mocha tests/*"
|
|
37
|
-
},
|
|
38
|
-
"keywords": [],
|
|
39
|
-
"author": "",
|
|
40
|
-
"license": "ISC",
|
|
41
|
-
"dependencies": {
|
|
42
|
-
"@defisaver/tokens": "^1.4.56",
|
|
43
|
-
"decimal.js": "^10.4.3"
|
|
44
|
-
},
|
|
45
|
-
"devDependencies": {
|
|
46
|
-
"@defisaver/eslint-config": "^1.0.1",
|
|
47
|
-
"chai": "^4.3.8",
|
|
48
|
-
"dotenv": "^16.3.1",
|
|
49
|
-
"eslint": "^8.49.0",
|
|
50
|
-
"mocha": "^10.2.0",
|
|
51
|
-
"typechain": "^8.3.1",
|
|
52
|
-
"typechain-target-web3-v1-3mihai3": "^6.0.2",
|
|
53
|
-
"typescript": "^5.2.2"
|
|
54
|
-
},
|
|
55
|
-
"peerDependencies": {
|
|
56
|
-
"web3": "^1.10.2"
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
yarn manifest:
|
|
61
|
-
No manifest
|
|
62
|
-
|
|
63
|
-
Lockfile:
|
|
64
|
-
No lockfile
|