@defisaver/positions-sdk 0.0.11 → 0.0.13
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/cjs/config/contracts.d.ts +183 -71
- package/cjs/config/contracts.js +16 -0
- package/cjs/markets/curveUsd/index.d.ts +2 -0
- package/cjs/markets/curveUsd/index.js +14 -1
- package/cjs/types/aave.d.ts +1 -1
- package/cjs/types/contracts/generated/CrvUSDtBTCAmm.d.ts +139 -0
- package/cjs/types/contracts/generated/CrvUSDtBTCAmm.js +5 -0
- package/cjs/types/contracts/generated/CrvUSDtBTCController.d.ts +204 -0
- package/cjs/types/contracts/generated/CrvUSDtBTCController.js +5 -0
- package/cjs/types/contracts/generated/index.d.ts +2 -0
- package/cjs/types/curveUsd.d.ts +2 -1
- package/cjs/types/curveUsd.js +1 -0
- package/cjs/types/spark.d.ts +1 -3
- package/esm/config/contracts.d.ts +183 -71
- package/esm/config/contracts.js +16 -0
- package/esm/markets/curveUsd/index.d.ts +2 -0
- package/esm/markets/curveUsd/index.js +12 -0
- package/esm/types/aave.d.ts +1 -1
- package/esm/types/contracts/generated/CrvUSDtBTCAmm.d.ts +139 -0
- package/esm/types/contracts/generated/CrvUSDtBTCAmm.js +4 -0
- package/esm/types/contracts/generated/CrvUSDtBTCController.d.ts +204 -0
- package/esm/types/contracts/generated/CrvUSDtBTCController.js +4 -0
- package/esm/types/contracts/generated/index.d.ts +2 -0
- package/esm/types/curveUsd.d.ts +2 -1
- package/esm/types/curveUsd.js +1 -0
- package/esm/types/spark.d.ts +1 -3
- package/package.json +40 -40
- package/src/aaveV2/index.ts +220 -220
- package/src/aaveV3/index.ts +550 -550
- package/src/assets/index.ts +60 -60
- package/src/chickenBonds/index.ts +123 -123
- package/src/compoundV2/index.ts +206 -206
- package/src/compoundV3/index.ts +269 -269
- package/src/config/contracts.js +635 -619
- package/src/constants/index.ts +3 -3
- package/src/contracts.ts +100 -100
- 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 +32 -32
- package/src/helpers/index.ts +5 -5
- package/src/helpers/makerHelpers/index.ts +94 -94
- package/src/helpers/sparkHelpers/index.ts +106 -106
- package/src/index.ts +40 -40
- package/src/liquity/index.ts +103 -103
- package/src/maker/index.ts +101 -101
- package/src/markets/aave/index.ts +80 -80
- package/src/markets/aave/marketAssets.ts +32 -32
- package/src/markets/compound/index.ts +85 -85
- package/src/markets/compound/marketsAssets.ts +35 -35
- package/src/markets/curveUsd/index.ts +56 -42
- package/src/markets/index.ts +3 -3
- package/src/markets/spark/index.ts +29 -29
- package/src/markets/spark/marketAssets.ts +9 -9
- package/src/moneymarket/moneymarketCommonService.ts +75 -75
- package/src/morpho/markets.ts +39 -39
- package/src/morphoAaveV2/index.ts +254 -254
- package/src/morphoAaveV3/index.ts +614 -614
- 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 +34 -34
- package/src/spark/index.ts +413 -413
- 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 +121 -121
- package/src/types/contracts/generated/CrvUSDtBTCAmm.ts +286 -0
- package/src/types/contracts/generated/CrvUSDtBTCController.ts +397 -0
- package/src/types/contracts/generated/index.ts +2 -0
- package/src/types/curveUsd.ts +111 -110
- package/src/types/index.ts +6 -6
- package/src/types/liquity.ts +29 -29
- package/src/types/maker.ts +50 -50
- package/src/types/spark.ts +106 -106
- package/yarn-error.log +64 -0
|
@@ -0,0 +1,397 @@
|
|
|
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 type UserState = ContractEventLog<{
|
|
25
|
+
user: string;
|
|
26
|
+
collateral: string;
|
|
27
|
+
debt: string;
|
|
28
|
+
n1: string;
|
|
29
|
+
n2: string;
|
|
30
|
+
liquidation_discount: string;
|
|
31
|
+
0: string;
|
|
32
|
+
1: string;
|
|
33
|
+
2: string;
|
|
34
|
+
3: string;
|
|
35
|
+
4: string;
|
|
36
|
+
5: string;
|
|
37
|
+
}>;
|
|
38
|
+
export type Borrow = ContractEventLog<{
|
|
39
|
+
user: string;
|
|
40
|
+
collateral_increase: string;
|
|
41
|
+
loan_increase: string;
|
|
42
|
+
0: string;
|
|
43
|
+
1: string;
|
|
44
|
+
2: string;
|
|
45
|
+
}>;
|
|
46
|
+
export type Repay = ContractEventLog<{
|
|
47
|
+
user: string;
|
|
48
|
+
collateral_decrease: string;
|
|
49
|
+
loan_decrease: string;
|
|
50
|
+
0: string;
|
|
51
|
+
1: string;
|
|
52
|
+
2: string;
|
|
53
|
+
}>;
|
|
54
|
+
export type RemoveCollateral = ContractEventLog<{
|
|
55
|
+
user: string;
|
|
56
|
+
collateral_decrease: string;
|
|
57
|
+
0: string;
|
|
58
|
+
1: string;
|
|
59
|
+
}>;
|
|
60
|
+
export type Liquidate = ContractEventLog<{
|
|
61
|
+
liquidator: string;
|
|
62
|
+
user: string;
|
|
63
|
+
collateral_received: string;
|
|
64
|
+
stablecoin_received: string;
|
|
65
|
+
debt: string;
|
|
66
|
+
0: string;
|
|
67
|
+
1: string;
|
|
68
|
+
2: string;
|
|
69
|
+
3: string;
|
|
70
|
+
4: string;
|
|
71
|
+
}>;
|
|
72
|
+
export type SetMonetaryPolicy = ContractEventLog<{
|
|
73
|
+
monetary_policy: string;
|
|
74
|
+
0: string;
|
|
75
|
+
}>;
|
|
76
|
+
export type SetBorrowingDiscounts = ContractEventLog<{
|
|
77
|
+
loan_discount: string;
|
|
78
|
+
liquidation_discount: string;
|
|
79
|
+
0: string;
|
|
80
|
+
1: string;
|
|
81
|
+
}>;
|
|
82
|
+
export type CollectFees = ContractEventLog<{
|
|
83
|
+
amount: string;
|
|
84
|
+
new_supply: string;
|
|
85
|
+
0: string;
|
|
86
|
+
1: string;
|
|
87
|
+
}>;
|
|
88
|
+
|
|
89
|
+
export interface CrvUSDtBTCController extends BaseContract {
|
|
90
|
+
constructor(
|
|
91
|
+
jsonInterface: any[],
|
|
92
|
+
address?: string,
|
|
93
|
+
options?: ContractOptions
|
|
94
|
+
): CrvUSDtBTCController;
|
|
95
|
+
clone(): CrvUSDtBTCController;
|
|
96
|
+
methods: {
|
|
97
|
+
factory(): NonPayableTransactionObject<string>;
|
|
98
|
+
|
|
99
|
+
amm(): NonPayableTransactionObject<string>;
|
|
100
|
+
|
|
101
|
+
collateral_token(): NonPayableTransactionObject<string>;
|
|
102
|
+
|
|
103
|
+
debt(user: string): NonPayableTransactionObject<string>;
|
|
104
|
+
|
|
105
|
+
loan_exists(user: string): NonPayableTransactionObject<boolean>;
|
|
106
|
+
|
|
107
|
+
total_debt(): NonPayableTransactionObject<string>;
|
|
108
|
+
|
|
109
|
+
max_borrowable(
|
|
110
|
+
collateral: number | string | BN,
|
|
111
|
+
N: number | string | BN
|
|
112
|
+
): NonPayableTransactionObject<string>;
|
|
113
|
+
|
|
114
|
+
min_collateral(
|
|
115
|
+
debt: number | string | BN,
|
|
116
|
+
N: number | string | BN
|
|
117
|
+
): NonPayableTransactionObject<string>;
|
|
118
|
+
|
|
119
|
+
calculate_debt_n1(
|
|
120
|
+
collateral: number | string | BN,
|
|
121
|
+
debt: number | string | BN,
|
|
122
|
+
N: number | string | BN
|
|
123
|
+
): NonPayableTransactionObject<string>;
|
|
124
|
+
|
|
125
|
+
create_loan(
|
|
126
|
+
collateral: number | string | BN,
|
|
127
|
+
debt: number | string | BN,
|
|
128
|
+
N: number | string | BN
|
|
129
|
+
): PayableTransactionObject<void>;
|
|
130
|
+
|
|
131
|
+
create_loan_extended(
|
|
132
|
+
collateral: number | string | BN,
|
|
133
|
+
debt: number | string | BN,
|
|
134
|
+
N: number | string | BN,
|
|
135
|
+
callbacker: string,
|
|
136
|
+
callback_args: number | string | BN[]
|
|
137
|
+
): PayableTransactionObject<void>;
|
|
138
|
+
|
|
139
|
+
"add_collateral(uint256)"(
|
|
140
|
+
collateral: number | string | BN
|
|
141
|
+
): PayableTransactionObject<void>;
|
|
142
|
+
|
|
143
|
+
"add_collateral(uint256,address)"(
|
|
144
|
+
collateral: number | string | BN,
|
|
145
|
+
_for: string
|
|
146
|
+
): PayableTransactionObject<void>;
|
|
147
|
+
|
|
148
|
+
"remove_collateral(uint256)"(
|
|
149
|
+
collateral: number | string | BN
|
|
150
|
+
): NonPayableTransactionObject<void>;
|
|
151
|
+
|
|
152
|
+
"remove_collateral(uint256,bool)"(
|
|
153
|
+
collateral: number | string | BN,
|
|
154
|
+
use_eth: boolean
|
|
155
|
+
): NonPayableTransactionObject<void>;
|
|
156
|
+
|
|
157
|
+
borrow_more(
|
|
158
|
+
collateral: number | string | BN,
|
|
159
|
+
debt: number | string | BN
|
|
160
|
+
): PayableTransactionObject<void>;
|
|
161
|
+
|
|
162
|
+
"repay(uint256)"(
|
|
163
|
+
_d_debt: number | string | BN
|
|
164
|
+
): PayableTransactionObject<void>;
|
|
165
|
+
|
|
166
|
+
"repay(uint256,address)"(
|
|
167
|
+
_d_debt: number | string | BN,
|
|
168
|
+
_for: string
|
|
169
|
+
): PayableTransactionObject<void>;
|
|
170
|
+
|
|
171
|
+
"repay(uint256,address,int256)"(
|
|
172
|
+
_d_debt: number | string | BN,
|
|
173
|
+
_for: string,
|
|
174
|
+
max_active_band: number | string | BN
|
|
175
|
+
): PayableTransactionObject<void>;
|
|
176
|
+
|
|
177
|
+
"repay(uint256,address,int256,bool)"(
|
|
178
|
+
_d_debt: number | string | BN,
|
|
179
|
+
_for: string,
|
|
180
|
+
max_active_band: number | string | BN,
|
|
181
|
+
use_eth: boolean
|
|
182
|
+
): PayableTransactionObject<void>;
|
|
183
|
+
|
|
184
|
+
repay_extended(
|
|
185
|
+
callbacker: string,
|
|
186
|
+
callback_args: number | string | BN[]
|
|
187
|
+
): NonPayableTransactionObject<void>;
|
|
188
|
+
|
|
189
|
+
"health_calculator(address,int256,int256,bool)"(
|
|
190
|
+
user: string,
|
|
191
|
+
d_collateral: number | string | BN,
|
|
192
|
+
d_debt: number | string | BN,
|
|
193
|
+
full: boolean
|
|
194
|
+
): NonPayableTransactionObject<string>;
|
|
195
|
+
|
|
196
|
+
"health_calculator(address,int256,int256,bool,uint256)"(
|
|
197
|
+
user: string,
|
|
198
|
+
d_collateral: number | string | BN,
|
|
199
|
+
d_debt: number | string | BN,
|
|
200
|
+
full: boolean,
|
|
201
|
+
N: number | string | BN
|
|
202
|
+
): NonPayableTransactionObject<string>;
|
|
203
|
+
|
|
204
|
+
"liquidate(address,uint256)"(
|
|
205
|
+
user: string,
|
|
206
|
+
min_x: number | string | BN
|
|
207
|
+
): NonPayableTransactionObject<void>;
|
|
208
|
+
|
|
209
|
+
"liquidate(address,uint256,bool)"(
|
|
210
|
+
user: string,
|
|
211
|
+
min_x: number | string | BN,
|
|
212
|
+
use_eth: boolean
|
|
213
|
+
): NonPayableTransactionObject<void>;
|
|
214
|
+
|
|
215
|
+
liquidate_extended(
|
|
216
|
+
user: string,
|
|
217
|
+
min_x: number | string | BN,
|
|
218
|
+
frac: number | string | BN,
|
|
219
|
+
use_eth: boolean,
|
|
220
|
+
callbacker: string,
|
|
221
|
+
callback_args: number | string | BN[]
|
|
222
|
+
): NonPayableTransactionObject<void>;
|
|
223
|
+
|
|
224
|
+
"tokens_to_liquidate(address)"(
|
|
225
|
+
user: string
|
|
226
|
+
): NonPayableTransactionObject<string>;
|
|
227
|
+
|
|
228
|
+
"tokens_to_liquidate(address,uint256)"(
|
|
229
|
+
user: string,
|
|
230
|
+
frac: number | string | BN
|
|
231
|
+
): NonPayableTransactionObject<string>;
|
|
232
|
+
|
|
233
|
+
"health(address)"(user: string): NonPayableTransactionObject<string>;
|
|
234
|
+
|
|
235
|
+
"health(address,bool)"(
|
|
236
|
+
user: string,
|
|
237
|
+
full: boolean
|
|
238
|
+
): NonPayableTransactionObject<string>;
|
|
239
|
+
|
|
240
|
+
"users_to_liquidate()"(): NonPayableTransactionObject<
|
|
241
|
+
[string, string, string, string, string] &
|
|
242
|
+
{ user: string; x: string; y: string; debt: string; health: string }[]
|
|
243
|
+
>;
|
|
244
|
+
|
|
245
|
+
"users_to_liquidate(uint256)"(
|
|
246
|
+
_from: number | string | BN
|
|
247
|
+
): NonPayableTransactionObject<
|
|
248
|
+
[string, string, string, string, string] &
|
|
249
|
+
{ user: string; x: string; y: string; debt: string; health: string }[]
|
|
250
|
+
>;
|
|
251
|
+
|
|
252
|
+
"users_to_liquidate(uint256,uint256)"(
|
|
253
|
+
_from: number | string | BN,
|
|
254
|
+
_limit: number | string | BN
|
|
255
|
+
): NonPayableTransactionObject<
|
|
256
|
+
[string, string, string, string, string] &
|
|
257
|
+
{ user: string; x: string; y: string; debt: string; health: string }[]
|
|
258
|
+
>;
|
|
259
|
+
|
|
260
|
+
amm_price(): NonPayableTransactionObject<string>;
|
|
261
|
+
|
|
262
|
+
user_prices(user: string): NonPayableTransactionObject<[string, string]>;
|
|
263
|
+
|
|
264
|
+
user_state(
|
|
265
|
+
user: string
|
|
266
|
+
): NonPayableTransactionObject<[string, string, string, string]>;
|
|
267
|
+
|
|
268
|
+
set_amm_fee(fee: number | string | BN): NonPayableTransactionObject<void>;
|
|
269
|
+
|
|
270
|
+
set_amm_admin_fee(
|
|
271
|
+
fee: number | string | BN
|
|
272
|
+
): NonPayableTransactionObject<void>;
|
|
273
|
+
|
|
274
|
+
set_monetary_policy(
|
|
275
|
+
monetary_policy: string
|
|
276
|
+
): NonPayableTransactionObject<void>;
|
|
277
|
+
|
|
278
|
+
set_borrowing_discounts(
|
|
279
|
+
loan_discount: number | string | BN,
|
|
280
|
+
liquidation_discount: number | string | BN
|
|
281
|
+
): NonPayableTransactionObject<void>;
|
|
282
|
+
|
|
283
|
+
set_callback(cb: string): NonPayableTransactionObject<void>;
|
|
284
|
+
|
|
285
|
+
admin_fees(): NonPayableTransactionObject<string>;
|
|
286
|
+
|
|
287
|
+
collect_fees(): NonPayableTransactionObject<string>;
|
|
288
|
+
|
|
289
|
+
liquidation_discounts(arg0: string): NonPayableTransactionObject<string>;
|
|
290
|
+
|
|
291
|
+
loans(arg0: number | string | BN): NonPayableTransactionObject<string>;
|
|
292
|
+
|
|
293
|
+
loan_ix(arg0: string): NonPayableTransactionObject<string>;
|
|
294
|
+
|
|
295
|
+
n_loans(): NonPayableTransactionObject<string>;
|
|
296
|
+
|
|
297
|
+
minted(): NonPayableTransactionObject<string>;
|
|
298
|
+
|
|
299
|
+
redeemed(): NonPayableTransactionObject<string>;
|
|
300
|
+
|
|
301
|
+
monetary_policy(): NonPayableTransactionObject<string>;
|
|
302
|
+
|
|
303
|
+
liquidation_discount(): NonPayableTransactionObject<string>;
|
|
304
|
+
|
|
305
|
+
loan_discount(): NonPayableTransactionObject<string>;
|
|
306
|
+
};
|
|
307
|
+
events: {
|
|
308
|
+
UserState(cb?: Callback<UserState>): EventEmitter;
|
|
309
|
+
UserState(options?: EventOptions, cb?: Callback<UserState>): EventEmitter;
|
|
310
|
+
|
|
311
|
+
Borrow(cb?: Callback<Borrow>): EventEmitter;
|
|
312
|
+
Borrow(options?: EventOptions, cb?: Callback<Borrow>): EventEmitter;
|
|
313
|
+
|
|
314
|
+
Repay(cb?: Callback<Repay>): EventEmitter;
|
|
315
|
+
Repay(options?: EventOptions, cb?: Callback<Repay>): EventEmitter;
|
|
316
|
+
|
|
317
|
+
RemoveCollateral(cb?: Callback<RemoveCollateral>): EventEmitter;
|
|
318
|
+
RemoveCollateral(
|
|
319
|
+
options?: EventOptions,
|
|
320
|
+
cb?: Callback<RemoveCollateral>
|
|
321
|
+
): EventEmitter;
|
|
322
|
+
|
|
323
|
+
Liquidate(cb?: Callback<Liquidate>): EventEmitter;
|
|
324
|
+
Liquidate(options?: EventOptions, cb?: Callback<Liquidate>): EventEmitter;
|
|
325
|
+
|
|
326
|
+
SetMonetaryPolicy(cb?: Callback<SetMonetaryPolicy>): EventEmitter;
|
|
327
|
+
SetMonetaryPolicy(
|
|
328
|
+
options?: EventOptions,
|
|
329
|
+
cb?: Callback<SetMonetaryPolicy>
|
|
330
|
+
): EventEmitter;
|
|
331
|
+
|
|
332
|
+
SetBorrowingDiscounts(cb?: Callback<SetBorrowingDiscounts>): EventEmitter;
|
|
333
|
+
SetBorrowingDiscounts(
|
|
334
|
+
options?: EventOptions,
|
|
335
|
+
cb?: Callback<SetBorrowingDiscounts>
|
|
336
|
+
): EventEmitter;
|
|
337
|
+
|
|
338
|
+
CollectFees(cb?: Callback<CollectFees>): EventEmitter;
|
|
339
|
+
CollectFees(
|
|
340
|
+
options?: EventOptions,
|
|
341
|
+
cb?: Callback<CollectFees>
|
|
342
|
+
): EventEmitter;
|
|
343
|
+
|
|
344
|
+
allEvents(options?: EventOptions, cb?: Callback<EventLog>): EventEmitter;
|
|
345
|
+
};
|
|
346
|
+
|
|
347
|
+
once(event: "UserState", cb: Callback<UserState>): void;
|
|
348
|
+
once(
|
|
349
|
+
event: "UserState",
|
|
350
|
+
options: EventOptions,
|
|
351
|
+
cb: Callback<UserState>
|
|
352
|
+
): void;
|
|
353
|
+
|
|
354
|
+
once(event: "Borrow", cb: Callback<Borrow>): void;
|
|
355
|
+
once(event: "Borrow", options: EventOptions, cb: Callback<Borrow>): void;
|
|
356
|
+
|
|
357
|
+
once(event: "Repay", cb: Callback<Repay>): void;
|
|
358
|
+
once(event: "Repay", options: EventOptions, cb: Callback<Repay>): void;
|
|
359
|
+
|
|
360
|
+
once(event: "RemoveCollateral", cb: Callback<RemoveCollateral>): void;
|
|
361
|
+
once(
|
|
362
|
+
event: "RemoveCollateral",
|
|
363
|
+
options: EventOptions,
|
|
364
|
+
cb: Callback<RemoveCollateral>
|
|
365
|
+
): void;
|
|
366
|
+
|
|
367
|
+
once(event: "Liquidate", cb: Callback<Liquidate>): void;
|
|
368
|
+
once(
|
|
369
|
+
event: "Liquidate",
|
|
370
|
+
options: EventOptions,
|
|
371
|
+
cb: Callback<Liquidate>
|
|
372
|
+
): void;
|
|
373
|
+
|
|
374
|
+
once(event: "SetMonetaryPolicy", cb: Callback<SetMonetaryPolicy>): void;
|
|
375
|
+
once(
|
|
376
|
+
event: "SetMonetaryPolicy",
|
|
377
|
+
options: EventOptions,
|
|
378
|
+
cb: Callback<SetMonetaryPolicy>
|
|
379
|
+
): void;
|
|
380
|
+
|
|
381
|
+
once(
|
|
382
|
+
event: "SetBorrowingDiscounts",
|
|
383
|
+
cb: Callback<SetBorrowingDiscounts>
|
|
384
|
+
): void;
|
|
385
|
+
once(
|
|
386
|
+
event: "SetBorrowingDiscounts",
|
|
387
|
+
options: EventOptions,
|
|
388
|
+
cb: Callback<SetBorrowingDiscounts>
|
|
389
|
+
): void;
|
|
390
|
+
|
|
391
|
+
once(event: "CollectFees", cb: Callback<CollectFees>): void;
|
|
392
|
+
once(
|
|
393
|
+
event: "CollectFees",
|
|
394
|
+
options: EventOptions,
|
|
395
|
+
cb: Callback<CollectFees>
|
|
396
|
+
): void;
|
|
397
|
+
}
|
|
@@ -59,6 +59,8 @@ export type { CrvUSDFactory } from "./CrvUSDFactory";
|
|
|
59
59
|
export type { CrvUSDView } from "./CrvUSDView";
|
|
60
60
|
export type { CrvUSDWBTCAmm } from "./CrvUSDWBTCAmm";
|
|
61
61
|
export type { CrvUSDWBTCController } from "./CrvUSDWBTCController";
|
|
62
|
+
export type { CrvUSDtBTCAmm } from "./CrvUSDtBTCAmm";
|
|
63
|
+
export type { CrvUSDtBTCController } from "./CrvUSDtBTCController";
|
|
62
64
|
export type { CrvUSDwstETHAmm } from "./CrvUSDwstETHAmm";
|
|
63
65
|
export type { CrvUSDwstETHController } from "./CrvUSDwstETHController";
|
|
64
66
|
export type { WstETH } from "./WstETH";
|
package/src/types/curveUsd.ts
CHANGED
|
@@ -1,111 +1,112 @@
|
|
|
1
|
-
import { NetworkNumber } from './common';
|
|
2
|
-
|
|
3
|
-
export enum CrvUSDVersions {
|
|
4
|
-
'wstETH' = 'wstETH',
|
|
5
|
-
'WBTC' = 'WBTC',
|
|
6
|
-
'ETH' = 'ETH',
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
1
|
+
import { NetworkNumber } from './common';
|
|
2
|
+
|
|
3
|
+
export enum CrvUSDVersions {
|
|
4
|
+
'wstETH' = 'wstETH',
|
|
5
|
+
'WBTC' = 'WBTC',
|
|
6
|
+
'ETH' = 'ETH',
|
|
7
|
+
'tBTC' = 'tBTC',
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export enum CrvUSDStatus {
|
|
11
|
+
Nonexistant = 'Nonexistant',
|
|
12
|
+
Safe = 'Safe',
|
|
13
|
+
Risk = 'Risk',
|
|
14
|
+
SoftLiquidating = 'SoftLiquidating',
|
|
15
|
+
SoftLiquidated = 'SoftLiquidated',
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export interface CrvUSDMarketData {
|
|
19
|
+
chainIds: NetworkNumber[],
|
|
20
|
+
label: string,
|
|
21
|
+
shortLabel: string,
|
|
22
|
+
value: CrvUSDVersions,
|
|
23
|
+
collAsset: string,
|
|
24
|
+
baseAsset: string,
|
|
25
|
+
controllerAddress: string,
|
|
26
|
+
ammAddress: string,
|
|
27
|
+
createCollAssets: string[],
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
export interface BandData {
|
|
31
|
+
id: string,
|
|
32
|
+
collAmount: string,
|
|
33
|
+
debtAmount: string,
|
|
34
|
+
lowPrice: string,
|
|
35
|
+
highPrice: string,
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
export interface UserBandData {
|
|
39
|
+
id: string,
|
|
40
|
+
collAmount: string,
|
|
41
|
+
debtAmount: string,
|
|
42
|
+
lowPrice: string,
|
|
43
|
+
highPrice: string,
|
|
44
|
+
userDebtAmount: string,
|
|
45
|
+
userCollAmount: string,
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
export interface CrvUSDGlobalMarketData {
|
|
49
|
+
collateral: string,
|
|
50
|
+
decimals: string,
|
|
51
|
+
activeBand: string,
|
|
52
|
+
totalDebt: string,
|
|
53
|
+
ammPrice: string,
|
|
54
|
+
basePrice: string,
|
|
55
|
+
oraclePrice: string,
|
|
56
|
+
minted: string,
|
|
57
|
+
redeemed: string,
|
|
58
|
+
monetaryPolicyRate: string,
|
|
59
|
+
ammRate: string,
|
|
60
|
+
minBand: string,
|
|
61
|
+
maxBand: string,
|
|
62
|
+
debtCeiling: string,
|
|
63
|
+
borrowRate: string,
|
|
64
|
+
futureBorrowRate: string,
|
|
65
|
+
leftToBorrow: string,
|
|
66
|
+
bands: BandData[],
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
export interface CrvUSDAggregatedPositionData {
|
|
70
|
+
ratio: string,
|
|
71
|
+
supplied: string,
|
|
72
|
+
suppliedUsd: string,
|
|
73
|
+
borrowedUsd: string,
|
|
74
|
+
borrowed: string,
|
|
75
|
+
safetyRatio: string,
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
export interface CrvUSDUsedAsset {
|
|
79
|
+
isSupplied: boolean,
|
|
80
|
+
supplied: string,
|
|
81
|
+
suppliedUsd: string,
|
|
82
|
+
borrowed: string,
|
|
83
|
+
borrowedUsd: string,
|
|
84
|
+
isBorrowed: boolean,
|
|
85
|
+
symbol: string,
|
|
86
|
+
collateral: boolean,
|
|
87
|
+
price: string,
|
|
88
|
+
interestRate?: string,
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
export interface CrvUSDUsedAssets {
|
|
92
|
+
[key: string]: CrvUSDUsedAsset,
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
export interface CrvUSDUserData {
|
|
96
|
+
debtAmount: string,
|
|
97
|
+
health: string,
|
|
98
|
+
healthPercent: string,
|
|
99
|
+
priceHigh: string,
|
|
100
|
+
priceLow: string,
|
|
101
|
+
liquidationDiscount: string,
|
|
102
|
+
numOfBands: string,
|
|
103
|
+
usedAssets: CrvUSDUsedAssets,
|
|
104
|
+
status: CrvUSDStatus,
|
|
105
|
+
ratio: string,
|
|
106
|
+
supplied: string,
|
|
107
|
+
suppliedUsd: string,
|
|
108
|
+
borrowedUsd: string,
|
|
109
|
+
borrowed: string,
|
|
110
|
+
safetyRatio: string,
|
|
111
|
+
userBands: UserBandData[],
|
|
111
112
|
}
|
package/src/types/index.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
export * from './aave';
|
|
2
|
-
export * from './compound';
|
|
3
|
-
export * from './spark';
|
|
4
|
-
export * from './curveUsd';
|
|
5
|
-
export * from './liquity';
|
|
6
|
-
export * from './maker';
|
|
1
|
+
export * from './aave';
|
|
2
|
+
export * from './compound';
|
|
3
|
+
export * from './spark';
|
|
4
|
+
export * from './curveUsd';
|
|
5
|
+
export * from './liquity';
|
|
6
|
+
export * from './maker';
|
|
7
7
|
export * from './chickenBonds';
|