@defisaver/positions-sdk 0.0.166-dev2-liquity-v2 → 0.0.166-dev3
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/.mocharc.json +4 -4
- package/.nvmrc +1 -1
- package/README.md +69 -69
- package/cjs/config/contracts.d.ts +32 -3
- package/cjs/config/contracts.js +3 -3
- package/cjs/contracts.d.ts +1 -1
- package/cjs/contracts.js +2 -2
- package/cjs/eulerV2/index.d.ts +41 -0
- package/cjs/eulerV2/index.js +214 -0
- package/cjs/helpers/eulerHelpers/index.d.ts +27 -0
- package/cjs/helpers/eulerHelpers/index.js +232 -0
- package/cjs/helpers/index.d.ts +1 -1
- package/cjs/helpers/index.js +2 -2
- package/cjs/index.d.ts +2 -2
- package/cjs/index.js +3 -3
- package/cjs/markets/euler/index.d.ts +8 -0
- package/cjs/markets/euler/index.js +30 -0
- package/cjs/markets/index.d.ts +1 -1
- package/cjs/markets/index.js +3 -3
- package/cjs/services/utils.d.ts +2 -0
- package/cjs/services/utils.js +4 -1
- package/cjs/types/contracts/generated/EulerV2View.d.ts +345 -0
- package/cjs/types/contracts/generated/index.d.ts +1 -1
- package/cjs/types/euler.d.ts +147 -0
- package/cjs/types/euler.js +14 -0
- package/cjs/types/index.d.ts +1 -1
- package/cjs/types/index.js +1 -1
- package/esm/config/contracts.d.ts +32 -3
- package/esm/config/contracts.js +3 -3
- package/esm/contracts.d.ts +1 -1
- package/esm/contracts.js +1 -1
- package/esm/eulerV2/index.d.ts +41 -0
- package/esm/eulerV2/index.js +206 -0
- package/esm/helpers/eulerHelpers/index.d.ts +27 -0
- package/esm/helpers/eulerHelpers/index.js +219 -0
- package/esm/helpers/index.d.ts +1 -1
- package/esm/helpers/index.js +1 -1
- package/esm/index.d.ts +2 -2
- package/esm/index.js +2 -2
- package/esm/markets/euler/index.d.ts +8 -0
- package/esm/markets/euler/index.js +24 -0
- package/esm/markets/index.d.ts +1 -1
- package/esm/markets/index.js +1 -1
- package/esm/services/utils.d.ts +2 -0
- package/esm/services/utils.js +2 -0
- package/esm/types/contracts/generated/EulerV2View.d.ts +345 -0
- package/esm/types/contracts/generated/index.d.ts +1 -1
- package/esm/types/euler.d.ts +147 -0
- package/esm/types/euler.js +11 -0
- package/esm/types/index.d.ts +1 -1
- package/esm/types/index.js +1 -1
- package/package.json +49 -49
- package/src/aaveV2/index.ts +227 -227
- package/src/aaveV3/index.ts +590 -590
- 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 +281 -281
- package/src/config/contracts.js +1040 -1040
- package/src/constants/index.ts +6 -6
- package/src/contracts.ts +130 -130
- package/src/curveUsd/index.ts +229 -229
- package/src/eulerV2/index.ts +297 -0
- package/src/exchange/index.ts +17 -17
- package/src/helpers/aaveHelpers/index.ts +194 -194
- package/src/helpers/chickenBondsHelpers/index.ts +23 -23
- package/src/helpers/compoundHelpers/index.ts +246 -246
- package/src/helpers/curveUsdHelpers/index.ts +40 -40
- package/src/helpers/eulerHelpers/index.ts +231 -0
- package/src/helpers/index.ts +9 -9
- package/src/helpers/llamaLendHelpers/index.ts +53 -53
- package/src/helpers/makerHelpers/index.ts +94 -94
- package/src/helpers/morphoBlueHelpers/index.ts +115 -115
- package/src/helpers/sparkHelpers/index.ts +150 -150
- package/src/index.ts +48 -48
- package/src/liquity/index.ts +116 -116
- package/src/llamaLend/index.ts +275 -275
- package/src/maker/index.ts +117 -117
- package/src/markets/aave/index.ts +152 -152
- package/src/markets/aave/marketAssets.ts +46 -46
- package/src/markets/compound/index.ts +173 -173
- package/src/markets/compound/marketsAssets.ts +64 -64
- package/src/markets/curveUsd/index.ts +69 -69
- package/src/markets/euler/index.ts +27 -0
- package/src/markets/index.ts +24 -23
- package/src/markets/llamaLend/contractAddresses.ts +141 -141
- package/src/markets/llamaLend/index.ts +235 -235
- package/src/markets/morphoBlue/index.ts +728 -728
- package/src/markets/spark/index.ts +29 -29
- package/src/markets/spark/marketAssets.ts +10 -10
- package/src/moneymarket/moneymarketCommonService.ts +80 -80
- package/src/morphoAaveV2/index.ts +256 -256
- package/src/morphoAaveV3/index.ts +630 -630
- package/src/morphoBlue/index.ts +171 -171
- 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 +57 -54
- package/src/setup.ts +8 -8
- package/src/spark/index.ts +424 -424
- package/src/staking/staking.ts +218 -218
- package/src/types/aave.ts +262 -262
- package/src/types/chickenBonds.ts +45 -45
- package/src/types/common.ts +84 -84
- package/src/types/compound.ts +129 -129
- package/src/types/contracts/generated/EulerV2View.ts +446 -0
- package/src/types/contracts/generated/index.ts +1 -1
- package/src/types/curveUsd.ts +118 -118
- package/src/types/euler.ts +170 -0
- package/src/types/index.ts +10 -10
- package/src/types/liquity.ts +30 -30
- package/src/types/llamaLend.ts +155 -155
- package/src/types/maker.ts +50 -50
- package/src/types/morphoBlue.ts +146 -146
- package/src/types/spark.ts +127 -127
- package/cjs/helpers/liquityV2Helpers/index.d.ts +0 -12
- package/cjs/helpers/liquityV2Helpers/index.js +0 -61
- package/cjs/liquityV2/index.d.ts +0 -10
- package/cjs/liquityV2/index.js +0 -98
- package/cjs/markets/liquityV2/index.d.ts +0 -8
- package/cjs/markets/liquityV2/index.js +0 -34
- package/cjs/types/contracts/generated/LiquityV2View.d.ts +0 -222
- package/cjs/types/liquityV2.d.ts +0 -81
- package/cjs/types/liquityV2.js +0 -8
- package/esm/helpers/liquityV2Helpers/index.d.ts +0 -12
- package/esm/helpers/liquityV2Helpers/index.js +0 -53
- package/esm/liquityV2/index.d.ts +0 -10
- package/esm/liquityV2/index.js +0 -90
- package/esm/markets/liquityV2/index.d.ts +0 -8
- package/esm/markets/liquityV2/index.js +0 -28
- package/esm/types/contracts/generated/LiquityV2View.d.ts +0 -222
- package/esm/types/liquityV2.d.ts +0 -81
- package/esm/types/liquityV2.js +0 -5
- package/src/helpers/liquityV2Helpers/index.ts +0 -78
- package/src/liquityV2/index.ts +0 -115
- package/src/markets/liquityV2/index.ts +0 -31
- package/src/types/contracts/generated/LiquityV2View.ts +0 -280
- package/src/types/liquityV2.ts +0 -87
- /package/cjs/types/contracts/generated/{LiquityV2View.js → EulerV2View.js} +0 -0
- /package/esm/types/contracts/generated/{LiquityV2View.js → EulerV2View.js} +0 -0
|
@@ -0,0 +1,446 @@
|
|
|
1
|
+
/* Autogenerated file. Do not edit manually. */
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
|
|
5
|
+
import type BN from "bn.js";
|
|
6
|
+
import type { ContractOptions } from "web3-eth-contract";
|
|
7
|
+
import type { EventLog } from "web3-core";
|
|
8
|
+
import type { EventEmitter } from "events";
|
|
9
|
+
import type {
|
|
10
|
+
Callback,
|
|
11
|
+
PayableTransactionObject,
|
|
12
|
+
NonPayableTransactionObject,
|
|
13
|
+
BlockType,
|
|
14
|
+
ContractEventLog,
|
|
15
|
+
BaseContract,
|
|
16
|
+
} from "./types";
|
|
17
|
+
|
|
18
|
+
export interface EventOptions {
|
|
19
|
+
filter?: object;
|
|
20
|
+
fromBlock?: BlockType;
|
|
21
|
+
topics?: string[];
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export declare namespace EulerV2View {
|
|
25
|
+
export type LiquidityChangeParamsStruct =
|
|
26
|
+
| [string, boolean, number | string | BN, number | string | BN]
|
|
27
|
+
| {
|
|
28
|
+
vault: string;
|
|
29
|
+
isBorrowOperation: boolean;
|
|
30
|
+
liquidityAdded: number | string | BN;
|
|
31
|
+
liquidityRemoved: number | string | BN;
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
export type LiquidityChangeParamsStructOutputArray = [
|
|
35
|
+
string,
|
|
36
|
+
boolean,
|
|
37
|
+
string,
|
|
38
|
+
string
|
|
39
|
+
];
|
|
40
|
+
export type LiquidityChangeParamsStructOutputStruct = {
|
|
41
|
+
vault: string;
|
|
42
|
+
isBorrowOperation: boolean;
|
|
43
|
+
liquidityAdded: string;
|
|
44
|
+
liquidityRemoved: string;
|
|
45
|
+
};
|
|
46
|
+
export type LiquidityChangeParamsStructOutput =
|
|
47
|
+
LiquidityChangeParamsStructOutputArray &
|
|
48
|
+
LiquidityChangeParamsStructOutputStruct;
|
|
49
|
+
|
|
50
|
+
export type UserCollateralInfoStruct =
|
|
51
|
+
| [
|
|
52
|
+
string,
|
|
53
|
+
boolean,
|
|
54
|
+
number | string | BN,
|
|
55
|
+
number | string | BN,
|
|
56
|
+
number | string | BN
|
|
57
|
+
]
|
|
58
|
+
| {
|
|
59
|
+
collateralVault: string;
|
|
60
|
+
usedInBorrow: boolean;
|
|
61
|
+
collateralAmountInUnit: number | string | BN;
|
|
62
|
+
collateralAmountInAsset: number | string | BN;
|
|
63
|
+
collateralAmountInUSD: number | string | BN;
|
|
64
|
+
};
|
|
65
|
+
|
|
66
|
+
export type UserCollateralInfoStructOutputArray = [
|
|
67
|
+
string,
|
|
68
|
+
boolean,
|
|
69
|
+
string,
|
|
70
|
+
string,
|
|
71
|
+
string
|
|
72
|
+
];
|
|
73
|
+
export type UserCollateralInfoStructOutputStruct = {
|
|
74
|
+
collateralVault: string;
|
|
75
|
+
usedInBorrow: boolean;
|
|
76
|
+
collateralAmountInUnit: string;
|
|
77
|
+
collateralAmountInAsset: string;
|
|
78
|
+
collateralAmountInUSD: string;
|
|
79
|
+
};
|
|
80
|
+
export type UserCollateralInfoStructOutput =
|
|
81
|
+
UserCollateralInfoStructOutputArray & UserCollateralInfoStructOutputStruct;
|
|
82
|
+
|
|
83
|
+
export type UserDataStruct =
|
|
84
|
+
| [
|
|
85
|
+
string,
|
|
86
|
+
string,
|
|
87
|
+
boolean,
|
|
88
|
+
boolean,
|
|
89
|
+
string,
|
|
90
|
+
number | string | BN,
|
|
91
|
+
number | string | BN,
|
|
92
|
+
EulerV2View.UserCollateralInfoStruct[]
|
|
93
|
+
]
|
|
94
|
+
| {
|
|
95
|
+
user: string;
|
|
96
|
+
owner: string;
|
|
97
|
+
inLockDownMode: boolean;
|
|
98
|
+
inPermitDisabledMode: boolean;
|
|
99
|
+
borrowVault: string;
|
|
100
|
+
borrowAmountInUnit: number | string | BN;
|
|
101
|
+
borrowAmountInAsset: number | string | BN;
|
|
102
|
+
collaterals: EulerV2View.UserCollateralInfoStruct[];
|
|
103
|
+
};
|
|
104
|
+
|
|
105
|
+
export type UserDataStructOutputArray = [
|
|
106
|
+
string,
|
|
107
|
+
string,
|
|
108
|
+
boolean,
|
|
109
|
+
boolean,
|
|
110
|
+
string,
|
|
111
|
+
string,
|
|
112
|
+
string,
|
|
113
|
+
EulerV2View.UserCollateralInfoStructOutput[]
|
|
114
|
+
];
|
|
115
|
+
export type UserDataStructOutputStruct = {
|
|
116
|
+
user: string;
|
|
117
|
+
owner: string;
|
|
118
|
+
inLockDownMode: boolean;
|
|
119
|
+
inPermitDisabledMode: boolean;
|
|
120
|
+
borrowVault: string;
|
|
121
|
+
borrowAmountInUnit: string;
|
|
122
|
+
borrowAmountInAsset: string;
|
|
123
|
+
collaterals: EulerV2View.UserCollateralInfoStructOutput[];
|
|
124
|
+
};
|
|
125
|
+
export type UserDataStructOutput = UserDataStructOutputArray &
|
|
126
|
+
UserDataStructOutputStruct;
|
|
127
|
+
|
|
128
|
+
export type CollateralInfoStruct =
|
|
129
|
+
| [
|
|
130
|
+
string,
|
|
131
|
+
string,
|
|
132
|
+
string,
|
|
133
|
+
string,
|
|
134
|
+
string,
|
|
135
|
+
boolean,
|
|
136
|
+
number | string | BN,
|
|
137
|
+
number | string | BN,
|
|
138
|
+
number | string | BN,
|
|
139
|
+
number | string | BN,
|
|
140
|
+
number | string | BN,
|
|
141
|
+
number | string | BN,
|
|
142
|
+
number | string | BN,
|
|
143
|
+
number | string | BN,
|
|
144
|
+
number | string | BN,
|
|
145
|
+
number | string | BN,
|
|
146
|
+
number | string | BN,
|
|
147
|
+
number | string | BN,
|
|
148
|
+
number | string | BN
|
|
149
|
+
]
|
|
150
|
+
| {
|
|
151
|
+
vaultAddr: string;
|
|
152
|
+
assetAddr: string;
|
|
153
|
+
vaultSymbol: string;
|
|
154
|
+
name: string;
|
|
155
|
+
governorAdmin: string;
|
|
156
|
+
isEscrowed: boolean;
|
|
157
|
+
decimals: number | string | BN;
|
|
158
|
+
sharePriceInUnit: number | string | BN;
|
|
159
|
+
assetPriceInUnit: number | string | BN;
|
|
160
|
+
cash: number | string | BN;
|
|
161
|
+
totalBorrows: number | string | BN;
|
|
162
|
+
supplyCap: number | string | BN;
|
|
163
|
+
borrowLTV: number | string | BN;
|
|
164
|
+
liquidationLTV: number | string | BN;
|
|
165
|
+
initialLiquidationLTV: number | string | BN;
|
|
166
|
+
targetTimestamp: number | string | BN;
|
|
167
|
+
rampDuration: number | string | BN;
|
|
168
|
+
interestFee: number | string | BN;
|
|
169
|
+
interestRate: number | string | BN;
|
|
170
|
+
};
|
|
171
|
+
|
|
172
|
+
export type CollateralInfoStructOutputArray = [
|
|
173
|
+
string,
|
|
174
|
+
string,
|
|
175
|
+
string,
|
|
176
|
+
string,
|
|
177
|
+
string,
|
|
178
|
+
boolean,
|
|
179
|
+
string,
|
|
180
|
+
string,
|
|
181
|
+
string,
|
|
182
|
+
string,
|
|
183
|
+
string,
|
|
184
|
+
string,
|
|
185
|
+
string,
|
|
186
|
+
string,
|
|
187
|
+
string,
|
|
188
|
+
string,
|
|
189
|
+
string,
|
|
190
|
+
string,
|
|
191
|
+
string
|
|
192
|
+
];
|
|
193
|
+
export type CollateralInfoStructOutputStruct = {
|
|
194
|
+
vaultAddr: string;
|
|
195
|
+
assetAddr: string;
|
|
196
|
+
vaultSymbol: string;
|
|
197
|
+
name: string;
|
|
198
|
+
governorAdmin: string;
|
|
199
|
+
isEscrowed: boolean;
|
|
200
|
+
decimals: string;
|
|
201
|
+
sharePriceInUnit: string;
|
|
202
|
+
assetPriceInUnit: string;
|
|
203
|
+
cash: string;
|
|
204
|
+
totalBorrows: string;
|
|
205
|
+
supplyCap: string;
|
|
206
|
+
borrowLTV: string;
|
|
207
|
+
liquidationLTV: string;
|
|
208
|
+
initialLiquidationLTV: string;
|
|
209
|
+
targetTimestamp: string;
|
|
210
|
+
rampDuration: string;
|
|
211
|
+
interestFee: string;
|
|
212
|
+
interestRate: string;
|
|
213
|
+
};
|
|
214
|
+
export type CollateralInfoStructOutput = CollateralInfoStructOutputArray &
|
|
215
|
+
CollateralInfoStructOutputStruct;
|
|
216
|
+
|
|
217
|
+
export type VaultInfoFullStruct =
|
|
218
|
+
| [
|
|
219
|
+
string,
|
|
220
|
+
string,
|
|
221
|
+
string,
|
|
222
|
+
string,
|
|
223
|
+
number | string | BN,
|
|
224
|
+
number | string | BN,
|
|
225
|
+
number | string | BN,
|
|
226
|
+
number | string | BN,
|
|
227
|
+
number | string | BN,
|
|
228
|
+
number | string | BN,
|
|
229
|
+
number | string | BN,
|
|
230
|
+
EulerV2View.CollateralInfoStruct[],
|
|
231
|
+
number | string | BN,
|
|
232
|
+
number | string | BN,
|
|
233
|
+
boolean,
|
|
234
|
+
string,
|
|
235
|
+
number | string | BN,
|
|
236
|
+
string,
|
|
237
|
+
number | string | BN,
|
|
238
|
+
number | string | BN,
|
|
239
|
+
number | string | BN,
|
|
240
|
+
string,
|
|
241
|
+
string,
|
|
242
|
+
string,
|
|
243
|
+
string,
|
|
244
|
+
number | string | BN
|
|
245
|
+
]
|
|
246
|
+
| {
|
|
247
|
+
vaultAddr: string;
|
|
248
|
+
assetAddr: string;
|
|
249
|
+
name: string;
|
|
250
|
+
symbol: string;
|
|
251
|
+
decimals: number | string | BN;
|
|
252
|
+
totalSupplyShares: number | string | BN;
|
|
253
|
+
cash: number | string | BN;
|
|
254
|
+
totalBorrows: number | string | BN;
|
|
255
|
+
totalAssets: number | string | BN;
|
|
256
|
+
supplyCap: number | string | BN;
|
|
257
|
+
borrowCap: number | string | BN;
|
|
258
|
+
collaterals: EulerV2View.CollateralInfoStruct[];
|
|
259
|
+
maxLiquidationDiscount: number | string | BN;
|
|
260
|
+
liquidationCoolOffTime: number | string | BN;
|
|
261
|
+
badDebtSocializationEnabled: boolean;
|
|
262
|
+
unitOfAccount: string;
|
|
263
|
+
unitOfAccountInUsd: number | string | BN;
|
|
264
|
+
oracle: string;
|
|
265
|
+
assetPriceInUnit: number | string | BN;
|
|
266
|
+
sharePriceInUnit: number | string | BN;
|
|
267
|
+
interestRate: number | string | BN;
|
|
268
|
+
irm: string;
|
|
269
|
+
balanceTrackerAddress: string;
|
|
270
|
+
creator: string;
|
|
271
|
+
governorAdmin: string;
|
|
272
|
+
interestFee: number | string | BN;
|
|
273
|
+
};
|
|
274
|
+
|
|
275
|
+
export type VaultInfoFullStructOutputArray = [
|
|
276
|
+
string,
|
|
277
|
+
string,
|
|
278
|
+
string,
|
|
279
|
+
string,
|
|
280
|
+
string,
|
|
281
|
+
string,
|
|
282
|
+
string,
|
|
283
|
+
string,
|
|
284
|
+
string,
|
|
285
|
+
string,
|
|
286
|
+
string,
|
|
287
|
+
EulerV2View.CollateralInfoStructOutput[],
|
|
288
|
+
string,
|
|
289
|
+
string,
|
|
290
|
+
boolean,
|
|
291
|
+
string,
|
|
292
|
+
string,
|
|
293
|
+
string,
|
|
294
|
+
string,
|
|
295
|
+
string,
|
|
296
|
+
string,
|
|
297
|
+
string,
|
|
298
|
+
string,
|
|
299
|
+
string,
|
|
300
|
+
string,
|
|
301
|
+
string
|
|
302
|
+
];
|
|
303
|
+
export type VaultInfoFullStructOutputStruct = {
|
|
304
|
+
vaultAddr: string;
|
|
305
|
+
assetAddr: string;
|
|
306
|
+
name: string;
|
|
307
|
+
symbol: string;
|
|
308
|
+
decimals: string;
|
|
309
|
+
totalSupplyShares: string;
|
|
310
|
+
cash: string;
|
|
311
|
+
totalBorrows: string;
|
|
312
|
+
totalAssets: string;
|
|
313
|
+
supplyCap: string;
|
|
314
|
+
borrowCap: string;
|
|
315
|
+
collaterals: EulerV2View.CollateralInfoStructOutput[];
|
|
316
|
+
maxLiquidationDiscount: string;
|
|
317
|
+
liquidationCoolOffTime: string;
|
|
318
|
+
badDebtSocializationEnabled: boolean;
|
|
319
|
+
unitOfAccount: string;
|
|
320
|
+
unitOfAccountInUsd: string;
|
|
321
|
+
oracle: string;
|
|
322
|
+
assetPriceInUnit: string;
|
|
323
|
+
sharePriceInUnit: string;
|
|
324
|
+
interestRate: string;
|
|
325
|
+
irm: string;
|
|
326
|
+
balanceTrackerAddress: string;
|
|
327
|
+
creator: string;
|
|
328
|
+
governorAdmin: string;
|
|
329
|
+
interestFee: string;
|
|
330
|
+
};
|
|
331
|
+
export type VaultInfoFullStructOutput = VaultInfoFullStructOutputArray &
|
|
332
|
+
VaultInfoFullStructOutputStruct;
|
|
333
|
+
}
|
|
334
|
+
|
|
335
|
+
export interface EulerV2View extends BaseContract {
|
|
336
|
+
constructor(
|
|
337
|
+
jsonInterface: any[],
|
|
338
|
+
address?: string,
|
|
339
|
+
options?: ContractOptions
|
|
340
|
+
): EulerV2View;
|
|
341
|
+
clone(): EulerV2View;
|
|
342
|
+
methods: {
|
|
343
|
+
USD(): NonPayableTransactionObject<string>;
|
|
344
|
+
|
|
345
|
+
feedRegistry(): NonPayableTransactionObject<string>;
|
|
346
|
+
|
|
347
|
+
fetchUsedAccounts(
|
|
348
|
+
_account: string,
|
|
349
|
+
_page: number | string | BN,
|
|
350
|
+
_perPage: number | string | BN
|
|
351
|
+
): NonPayableTransactionObject<
|
|
352
|
+
[string, string[]] & { owner: string; accounts: string[] }
|
|
353
|
+
>;
|
|
354
|
+
|
|
355
|
+
getAaveTokenPriceInETH(
|
|
356
|
+
_tokenAddr: string
|
|
357
|
+
): NonPayableTransactionObject<string>;
|
|
358
|
+
|
|
359
|
+
getAaveTokenPriceInUSD(
|
|
360
|
+
_tokenAddr: string
|
|
361
|
+
): NonPayableTransactionObject<string>;
|
|
362
|
+
|
|
363
|
+
getAaveV3TokenPriceInETH(
|
|
364
|
+
_tokenAddr: string
|
|
365
|
+
): NonPayableTransactionObject<string>;
|
|
366
|
+
|
|
367
|
+
getAaveV3TokenPriceInUSD(
|
|
368
|
+
_tokenAddr: string
|
|
369
|
+
): NonPayableTransactionObject<string>;
|
|
370
|
+
|
|
371
|
+
getAddrForChainlinkOracle(
|
|
372
|
+
_inputTokenAddr: string
|
|
373
|
+
): NonPayableTransactionObject<string>;
|
|
374
|
+
|
|
375
|
+
getApyAfterValuesEstimation(
|
|
376
|
+
params: EulerV2View.LiquidityChangeParamsStruct[]
|
|
377
|
+
): NonPayableTransactionObject<string[]>;
|
|
378
|
+
|
|
379
|
+
getChainlinkPriceInETH(
|
|
380
|
+
_inputTokenAddr: string
|
|
381
|
+
): NonPayableTransactionObject<string>;
|
|
382
|
+
|
|
383
|
+
getChainlinkPriceInUSD(
|
|
384
|
+
_inputTokenAddr: string,
|
|
385
|
+
_useFallback: boolean
|
|
386
|
+
): NonPayableTransactionObject<string>;
|
|
387
|
+
|
|
388
|
+
getPriceInETH(_inputTokenAddr: string): NonPayableTransactionObject<string>;
|
|
389
|
+
|
|
390
|
+
getPriceInUSD(_inputTokenAddr: string): NonPayableTransactionObject<string>;
|
|
391
|
+
|
|
392
|
+
"getRoundInfo(address,uint80,address)"(
|
|
393
|
+
_inputTokenAddr: string,
|
|
394
|
+
_roundId: number | string | BN,
|
|
395
|
+
aggregator: string
|
|
396
|
+
): NonPayableTransactionObject<
|
|
397
|
+
[string, string] & { updateTimestamp: string }
|
|
398
|
+
>;
|
|
399
|
+
|
|
400
|
+
"getRoundInfo(address,uint80)"(
|
|
401
|
+
_inputTokenAddr: string,
|
|
402
|
+
_roundId: number | string | BN
|
|
403
|
+
): NonPayableTransactionObject<
|
|
404
|
+
[string, string] & { updateTimestamp: string }
|
|
405
|
+
>;
|
|
406
|
+
|
|
407
|
+
getSparkTokenPriceInETH(
|
|
408
|
+
_tokenAddr: string
|
|
409
|
+
): NonPayableTransactionObject<string>;
|
|
410
|
+
|
|
411
|
+
getSparkTokenPriceInUSD(
|
|
412
|
+
_tokenAddr: string
|
|
413
|
+
): NonPayableTransactionObject<string>;
|
|
414
|
+
|
|
415
|
+
getUserData(
|
|
416
|
+
_user: string
|
|
417
|
+
): NonPayableTransactionObject<EulerV2View.UserDataStructOutput>;
|
|
418
|
+
|
|
419
|
+
getUsersData(
|
|
420
|
+
_users: string[]
|
|
421
|
+
): NonPayableTransactionObject<EulerV2View.UserDataStructOutput[]>;
|
|
422
|
+
|
|
423
|
+
getVaultCollaterals(
|
|
424
|
+
_vault: string
|
|
425
|
+
): NonPayableTransactionObject<EulerV2View.CollateralInfoStructOutput[]>;
|
|
426
|
+
|
|
427
|
+
getVaultInfoFull(
|
|
428
|
+
_vault: string
|
|
429
|
+
): NonPayableTransactionObject<EulerV2View.VaultInfoFullStructOutput>;
|
|
430
|
+
|
|
431
|
+
getVaultsInfosFull(
|
|
432
|
+
_vaults: string[]
|
|
433
|
+
): NonPayableTransactionObject<EulerV2View.VaultInfoFullStructOutput[]>;
|
|
434
|
+
|
|
435
|
+
getWBtcPrice(
|
|
436
|
+
_btcPrice: number | string | BN
|
|
437
|
+
): NonPayableTransactionObject<string>;
|
|
438
|
+
|
|
439
|
+
getWStEthPrice(
|
|
440
|
+
_stEthPrice: number | string | BN
|
|
441
|
+
): NonPayableTransactionObject<string>;
|
|
442
|
+
};
|
|
443
|
+
events: {
|
|
444
|
+
allEvents(options?: EventOptions, cb?: Callback<EventLog>): EventEmitter;
|
|
445
|
+
};
|
|
446
|
+
}
|
|
@@ -29,6 +29,7 @@ export type { CompoundLoanInfo } from "./CompoundLoanInfo";
|
|
|
29
29
|
export type { Comptroller } from "./Comptroller";
|
|
30
30
|
export type { ETHPriceFeed } from "./ETHPriceFeed";
|
|
31
31
|
export type { Erc20 } from "./Erc20";
|
|
32
|
+
export type { EulerV2View } from "./EulerV2View";
|
|
32
33
|
export type { FeedRegistry } from "./FeedRegistry";
|
|
33
34
|
export type { GHO } from "./GHO";
|
|
34
35
|
export type { GhoDiscountRateStrategy } from "./GhoDiscountRateStrategy";
|
|
@@ -37,7 +38,6 @@ export type { IVariableDebtToken } from "./IVariableDebtToken";
|
|
|
37
38
|
export type { LendingPoolAddressesProvider } from "./LendingPoolAddressesProvider";
|
|
38
39
|
export type { Lido } from "./Lido";
|
|
39
40
|
export type { LiquityActivePool } from "./LiquityActivePool";
|
|
40
|
-
export type { LiquityV2View } from "./LiquityV2View";
|
|
41
41
|
export type { LiquityView } from "./LiquityView";
|
|
42
42
|
export type { LlamaLendControllerAbi } from "./LlamaLendControllerAbi";
|
|
43
43
|
export type { LlamaLendView } from "./LlamaLendView";
|
package/src/types/curveUsd.ts
CHANGED
|
@@ -1,119 +1,119 @@
|
|
|
1
|
-
import { NetworkNumber } from './common';
|
|
2
|
-
|
|
3
|
-
export enum CrvUSDVersions {
|
|
4
|
-
'crvUSDwstETH' = 'wstETH',
|
|
5
|
-
'crvUSDWBTC' = 'WBTC',
|
|
6
|
-
'crvUSDETH' = 'ETH',
|
|
7
|
-
'crvUSDtBTC' = 'tBTC',
|
|
8
|
-
'crvUSDsfrxETH' = 'sfrxETH',
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
export enum CrvUSDStatus {
|
|
12
|
-
Nonexistant = 'Nonexistant',
|
|
13
|
-
Safe = 'Safe',
|
|
14
|
-
Risk = 'Risk',
|
|
15
|
-
SoftLiquidating = 'SoftLiquidating',
|
|
16
|
-
SoftLiquidated = 'SoftLiquidated',
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
export interface CrvUSDMarketData {
|
|
20
|
-
chainIds: NetworkNumber[],
|
|
21
|
-
label: string,
|
|
22
|
-
shortLabel: string,
|
|
23
|
-
value: CrvUSDVersions,
|
|
24
|
-
collAsset: string,
|
|
25
|
-
baseAsset: string,
|
|
26
|
-
controllerAddress: string,
|
|
27
|
-
ammAddress: string,
|
|
28
|
-
createCollAssets: string[],
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
export interface BandData {
|
|
32
|
-
id: string,
|
|
33
|
-
collAmount: string,
|
|
34
|
-
debtAmount: string,
|
|
35
|
-
lowPrice: string,
|
|
36
|
-
highPrice: string,
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
export interface UserBandData {
|
|
40
|
-
id: string,
|
|
41
|
-
collAmount: string,
|
|
42
|
-
debtAmount: string,
|
|
43
|
-
lowPrice: string,
|
|
44
|
-
highPrice: string,
|
|
45
|
-
userDebtAmount: string,
|
|
46
|
-
userCollAmount: string,
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
export interface CrvUSDGlobalMarketData {
|
|
50
|
-
collateral: string,
|
|
51
|
-
decimals: string,
|
|
52
|
-
activeBand: string,
|
|
53
|
-
totalDebt: string,
|
|
54
|
-
ammPrice: string,
|
|
55
|
-
basePrice: string,
|
|
56
|
-
oraclePrice: string,
|
|
57
|
-
minted: string,
|
|
58
|
-
redeemed: string,
|
|
59
|
-
monetaryPolicyRate: string,
|
|
60
|
-
ammRate: string,
|
|
61
|
-
minBand: string,
|
|
62
|
-
maxBand: string,
|
|
63
|
-
debtCeiling: string,
|
|
64
|
-
borrowRate: string,
|
|
65
|
-
futureBorrowRate: string,
|
|
66
|
-
leftToBorrow: string,
|
|
67
|
-
bands: BandData[],
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
export interface CrvUSDAggregatedPositionData {
|
|
71
|
-
ratio: string,
|
|
72
|
-
supplied: string,
|
|
73
|
-
suppliedUsd: string,
|
|
74
|
-
borrowedUsd: string,
|
|
75
|
-
borrowed: string,
|
|
76
|
-
safetyRatio: string,
|
|
77
|
-
borrowLimitUsd: string,
|
|
78
|
-
minAllowedRatio: number,
|
|
79
|
-
collFactor: string,
|
|
80
|
-
leveragedType: string,
|
|
81
|
-
leveragedAsset?: string,
|
|
82
|
-
liquidationPrice?: string,
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
export interface CrvUSDUsedAsset {
|
|
86
|
-
isSupplied: boolean,
|
|
87
|
-
supplied: string,
|
|
88
|
-
suppliedUsd: string,
|
|
89
|
-
borrowed: string,
|
|
90
|
-
borrowedUsd: string,
|
|
91
|
-
isBorrowed: boolean,
|
|
92
|
-
symbol: string,
|
|
93
|
-
collateral: boolean,
|
|
94
|
-
price: string,
|
|
95
|
-
interestRate?: string,
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
export interface CrvUSDUsedAssets {
|
|
99
|
-
[key: string]: CrvUSDUsedAsset,
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
export interface CrvUSDUserData {
|
|
103
|
-
debtAmount: string,
|
|
104
|
-
health: string,
|
|
105
|
-
healthPercent: string,
|
|
106
|
-
priceHigh: string,
|
|
107
|
-
priceLow: string,
|
|
108
|
-
liquidationDiscount: string,
|
|
109
|
-
numOfBands: string,
|
|
110
|
-
usedAssets: CrvUSDUsedAssets,
|
|
111
|
-
status: CrvUSDStatus,
|
|
112
|
-
ratio: string,
|
|
113
|
-
supplied: string,
|
|
114
|
-
suppliedUsd: string,
|
|
115
|
-
borrowedUsd: string,
|
|
116
|
-
borrowed: string,
|
|
117
|
-
safetyRatio: string,
|
|
118
|
-
userBands: UserBandData[],
|
|
1
|
+
import { NetworkNumber } from './common';
|
|
2
|
+
|
|
3
|
+
export enum CrvUSDVersions {
|
|
4
|
+
'crvUSDwstETH' = 'wstETH',
|
|
5
|
+
'crvUSDWBTC' = 'WBTC',
|
|
6
|
+
'crvUSDETH' = 'ETH',
|
|
7
|
+
'crvUSDtBTC' = 'tBTC',
|
|
8
|
+
'crvUSDsfrxETH' = 'sfrxETH',
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export enum CrvUSDStatus {
|
|
12
|
+
Nonexistant = 'Nonexistant',
|
|
13
|
+
Safe = 'Safe',
|
|
14
|
+
Risk = 'Risk',
|
|
15
|
+
SoftLiquidating = 'SoftLiquidating',
|
|
16
|
+
SoftLiquidated = 'SoftLiquidated',
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export interface CrvUSDMarketData {
|
|
20
|
+
chainIds: NetworkNumber[],
|
|
21
|
+
label: string,
|
|
22
|
+
shortLabel: string,
|
|
23
|
+
value: CrvUSDVersions,
|
|
24
|
+
collAsset: string,
|
|
25
|
+
baseAsset: string,
|
|
26
|
+
controllerAddress: string,
|
|
27
|
+
ammAddress: string,
|
|
28
|
+
createCollAssets: string[],
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
export interface BandData {
|
|
32
|
+
id: string,
|
|
33
|
+
collAmount: string,
|
|
34
|
+
debtAmount: string,
|
|
35
|
+
lowPrice: string,
|
|
36
|
+
highPrice: string,
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
export interface UserBandData {
|
|
40
|
+
id: string,
|
|
41
|
+
collAmount: string,
|
|
42
|
+
debtAmount: string,
|
|
43
|
+
lowPrice: string,
|
|
44
|
+
highPrice: string,
|
|
45
|
+
userDebtAmount: string,
|
|
46
|
+
userCollAmount: string,
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
export interface CrvUSDGlobalMarketData {
|
|
50
|
+
collateral: string,
|
|
51
|
+
decimals: string,
|
|
52
|
+
activeBand: string,
|
|
53
|
+
totalDebt: string,
|
|
54
|
+
ammPrice: string,
|
|
55
|
+
basePrice: string,
|
|
56
|
+
oraclePrice: string,
|
|
57
|
+
minted: string,
|
|
58
|
+
redeemed: string,
|
|
59
|
+
monetaryPolicyRate: string,
|
|
60
|
+
ammRate: string,
|
|
61
|
+
minBand: string,
|
|
62
|
+
maxBand: string,
|
|
63
|
+
debtCeiling: string,
|
|
64
|
+
borrowRate: string,
|
|
65
|
+
futureBorrowRate: string,
|
|
66
|
+
leftToBorrow: string,
|
|
67
|
+
bands: BandData[],
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
export interface CrvUSDAggregatedPositionData {
|
|
71
|
+
ratio: string,
|
|
72
|
+
supplied: string,
|
|
73
|
+
suppliedUsd: string,
|
|
74
|
+
borrowedUsd: string,
|
|
75
|
+
borrowed: string,
|
|
76
|
+
safetyRatio: string,
|
|
77
|
+
borrowLimitUsd: string,
|
|
78
|
+
minAllowedRatio: number,
|
|
79
|
+
collFactor: string,
|
|
80
|
+
leveragedType: string,
|
|
81
|
+
leveragedAsset?: string,
|
|
82
|
+
liquidationPrice?: string,
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
export interface CrvUSDUsedAsset {
|
|
86
|
+
isSupplied: boolean,
|
|
87
|
+
supplied: string,
|
|
88
|
+
suppliedUsd: string,
|
|
89
|
+
borrowed: string,
|
|
90
|
+
borrowedUsd: string,
|
|
91
|
+
isBorrowed: boolean,
|
|
92
|
+
symbol: string,
|
|
93
|
+
collateral: boolean,
|
|
94
|
+
price: string,
|
|
95
|
+
interestRate?: string,
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
export interface CrvUSDUsedAssets {
|
|
99
|
+
[key: string]: CrvUSDUsedAsset,
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
export interface CrvUSDUserData {
|
|
103
|
+
debtAmount: string,
|
|
104
|
+
health: string,
|
|
105
|
+
healthPercent: string,
|
|
106
|
+
priceHigh: string,
|
|
107
|
+
priceLow: string,
|
|
108
|
+
liquidationDiscount: string,
|
|
109
|
+
numOfBands: string,
|
|
110
|
+
usedAssets: CrvUSDUsedAssets,
|
|
111
|
+
status: CrvUSDStatus,
|
|
112
|
+
ratio: string,
|
|
113
|
+
supplied: string,
|
|
114
|
+
suppliedUsd: string,
|
|
115
|
+
borrowedUsd: string,
|
|
116
|
+
borrowed: string,
|
|
117
|
+
safetyRatio: string,
|
|
118
|
+
userBands: UserBandData[],
|
|
119
119
|
}
|