@defisaver/positions-sdk 1.0.12 → 1.0.13-dev-2
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 +61 -21
- package/cjs/config/contracts.js +9 -1
- package/cjs/contracts.d.ts +1 -0
- package/cjs/contracts.js +2 -1
- package/cjs/liquityV2/index.js +17 -6
- package/cjs/markets/aave/marketAssets.js +1 -1
- package/cjs/markets/liquityV2/index.d.ts +6 -0
- package/cjs/markets/liquityV2/index.js +51 -4
- package/cjs/types/contracts/generated/LiquityV2LegacyView.d.ts +386 -0
- package/cjs/types/contracts/generated/LiquityV2LegacyView.js +5 -0
- package/cjs/types/contracts/generated/LiquityV2View.d.ts +4 -0
- package/cjs/types/contracts/generated/index.d.ts +1 -0
- package/cjs/types/liquityV2.d.ts +6 -1
- package/cjs/types/liquityV2.js +4 -0
- package/esm/config/contracts.d.ts +61 -21
- package/esm/config/contracts.js +9 -1
- package/esm/contracts.d.ts +1 -0
- package/esm/contracts.js +1 -0
- package/esm/liquityV2/index.js +18 -7
- package/esm/markets/aave/marketAssets.js +1 -1
- package/esm/markets/liquityV2/index.d.ts +6 -0
- package/esm/markets/liquityV2/index.js +46 -2
- package/esm/types/contracts/generated/LiquityV2LegacyView.d.ts +386 -0
- package/esm/types/contracts/generated/LiquityV2LegacyView.js +4 -0
- package/esm/types/contracts/generated/LiquityV2View.d.ts +4 -0
- package/esm/types/contracts/generated/index.d.ts +1 -0
- package/esm/types/liquityV2.d.ts +6 -1
- package/esm/types/liquityV2.js +4 -0
- package/package.json +3 -3
- package/src/config/contracts.js +9 -1
- package/src/contracts.ts +2 -0
- package/src/liquityV2/index.ts +20 -7
- package/src/markets/aave/marketAssets.ts +1 -1
- package/src/markets/liquityV2/index.ts +50 -2
- package/src/types/contracts/generated/LiquityV2LegacyView.ts +486 -0
- package/src/types/contracts/generated/LiquityV2View.ts +4 -0
- package/src/types/contracts/generated/index.ts +1 -0
- package/src/types/liquityV2.ts +6 -0
|
@@ -0,0 +1,386 @@
|
|
|
1
|
+
/// <reference types="node" />
|
|
2
|
+
import type BN from "bn.js";
|
|
3
|
+
import type { ContractOptions } from "web3-eth-contract";
|
|
4
|
+
import type { EventLog } from "web3-core";
|
|
5
|
+
import type { EventEmitter } from "events";
|
|
6
|
+
import type { Callback, NonPayableTransactionObject, BlockType, BaseContract } from "./types";
|
|
7
|
+
export interface EventOptions {
|
|
8
|
+
filter?: object;
|
|
9
|
+
fromBlock?: BlockType;
|
|
10
|
+
topics?: string[];
|
|
11
|
+
}
|
|
12
|
+
export declare namespace IBorrowerOperations {
|
|
13
|
+
type InterestBatchManagerStruct = [number | string | BN, number | string | BN, number | string | BN] | {
|
|
14
|
+
minInterestRate: number | string | BN;
|
|
15
|
+
maxInterestRate: number | string | BN;
|
|
16
|
+
minInterestRateChangePeriod: number | string | BN;
|
|
17
|
+
};
|
|
18
|
+
type InterestBatchManagerStructOutputArray = [string, string, string];
|
|
19
|
+
type InterestBatchManagerStructOutputStruct = {
|
|
20
|
+
minInterestRate: string;
|
|
21
|
+
maxInterestRate: string;
|
|
22
|
+
minInterestRateChangePeriod: string;
|
|
23
|
+
};
|
|
24
|
+
type InterestBatchManagerStructOutput = InterestBatchManagerStructOutputArray & InterestBatchManagerStructOutputStruct;
|
|
25
|
+
}
|
|
26
|
+
export declare namespace ITroveManager {
|
|
27
|
+
type LatestBatchDataStruct = [
|
|
28
|
+
number | string | BN,
|
|
29
|
+
number | string | BN,
|
|
30
|
+
number | string | BN,
|
|
31
|
+
number | string | BN,
|
|
32
|
+
number | string | BN,
|
|
33
|
+
number | string | BN,
|
|
34
|
+
number | string | BN,
|
|
35
|
+
number | string | BN,
|
|
36
|
+
number | string | BN,
|
|
37
|
+
number | string | BN,
|
|
38
|
+
number | string | BN
|
|
39
|
+
] | {
|
|
40
|
+
entireDebtWithoutRedistribution: number | string | BN;
|
|
41
|
+
entireCollWithoutRedistribution: number | string | BN;
|
|
42
|
+
accruedInterest: number | string | BN;
|
|
43
|
+
recordedDebt: number | string | BN;
|
|
44
|
+
annualInterestRate: number | string | BN;
|
|
45
|
+
weightedRecordedDebt: number | string | BN;
|
|
46
|
+
annualManagementFee: number | string | BN;
|
|
47
|
+
accruedManagementFee: number | string | BN;
|
|
48
|
+
weightedRecordedBatchManagementFee: number | string | BN;
|
|
49
|
+
lastDebtUpdateTime: number | string | BN;
|
|
50
|
+
lastInterestRateAdjTime: number | string | BN;
|
|
51
|
+
};
|
|
52
|
+
type LatestBatchDataStructOutputArray = [
|
|
53
|
+
string,
|
|
54
|
+
string,
|
|
55
|
+
string,
|
|
56
|
+
string,
|
|
57
|
+
string,
|
|
58
|
+
string,
|
|
59
|
+
string,
|
|
60
|
+
string,
|
|
61
|
+
string,
|
|
62
|
+
string,
|
|
63
|
+
string
|
|
64
|
+
];
|
|
65
|
+
type LatestBatchDataStructOutputStruct = {
|
|
66
|
+
entireDebtWithoutRedistribution: string;
|
|
67
|
+
entireCollWithoutRedistribution: string;
|
|
68
|
+
accruedInterest: string;
|
|
69
|
+
recordedDebt: string;
|
|
70
|
+
annualInterestRate: string;
|
|
71
|
+
weightedRecordedDebt: string;
|
|
72
|
+
annualManagementFee: string;
|
|
73
|
+
accruedManagementFee: string;
|
|
74
|
+
weightedRecordedBatchManagementFee: string;
|
|
75
|
+
lastDebtUpdateTime: string;
|
|
76
|
+
lastInterestRateAdjTime: string;
|
|
77
|
+
};
|
|
78
|
+
type LatestBatchDataStructOutput = LatestBatchDataStructOutputArray & LatestBatchDataStructOutputStruct;
|
|
79
|
+
}
|
|
80
|
+
export declare namespace LiquityV2View {
|
|
81
|
+
type MarketDataStruct = [
|
|
82
|
+
string,
|
|
83
|
+
number | string | BN,
|
|
84
|
+
number | string | BN,
|
|
85
|
+
number | string | BN,
|
|
86
|
+
number | string | BN,
|
|
87
|
+
number | string | BN,
|
|
88
|
+
number | string | BN,
|
|
89
|
+
number | string | BN,
|
|
90
|
+
string,
|
|
91
|
+
string,
|
|
92
|
+
string,
|
|
93
|
+
string,
|
|
94
|
+
string,
|
|
95
|
+
string,
|
|
96
|
+
string,
|
|
97
|
+
string,
|
|
98
|
+
string,
|
|
99
|
+
string,
|
|
100
|
+
number | string | BN,
|
|
101
|
+
boolean,
|
|
102
|
+
number | string | BN
|
|
103
|
+
] | {
|
|
104
|
+
market: string;
|
|
105
|
+
CCR: number | string | BN;
|
|
106
|
+
MCR: number | string | BN;
|
|
107
|
+
SCR: number | string | BN;
|
|
108
|
+
LIQUIDATION_PENALTY_SP: number | string | BN;
|
|
109
|
+
LIQUIDATION_PENALTY_REDISTRIBUTION: number | string | BN;
|
|
110
|
+
entireSystemColl: number | string | BN;
|
|
111
|
+
entireSystemDebt: number | string | BN;
|
|
112
|
+
collToken: string;
|
|
113
|
+
troveNFT: string;
|
|
114
|
+
borrowerOperations: string;
|
|
115
|
+
troveManager: string;
|
|
116
|
+
stabilityPool: string;
|
|
117
|
+
sortedTroves: string;
|
|
118
|
+
collSurplusPool: string;
|
|
119
|
+
activePool: string;
|
|
120
|
+
hintHelpers: string;
|
|
121
|
+
priceFeed: string;
|
|
122
|
+
collPrice: number | string | BN;
|
|
123
|
+
isShutDown: boolean;
|
|
124
|
+
boldDepositInSp: number | string | BN;
|
|
125
|
+
};
|
|
126
|
+
type MarketDataStructOutputArray = [
|
|
127
|
+
string,
|
|
128
|
+
string,
|
|
129
|
+
string,
|
|
130
|
+
string,
|
|
131
|
+
string,
|
|
132
|
+
string,
|
|
133
|
+
string,
|
|
134
|
+
string,
|
|
135
|
+
string,
|
|
136
|
+
string,
|
|
137
|
+
string,
|
|
138
|
+
string,
|
|
139
|
+
string,
|
|
140
|
+
string,
|
|
141
|
+
string,
|
|
142
|
+
string,
|
|
143
|
+
string,
|
|
144
|
+
string,
|
|
145
|
+
string,
|
|
146
|
+
boolean,
|
|
147
|
+
string
|
|
148
|
+
];
|
|
149
|
+
type MarketDataStructOutputStruct = {
|
|
150
|
+
market: string;
|
|
151
|
+
CCR: string;
|
|
152
|
+
MCR: string;
|
|
153
|
+
SCR: string;
|
|
154
|
+
LIQUIDATION_PENALTY_SP: string;
|
|
155
|
+
LIQUIDATION_PENALTY_REDISTRIBUTION: string;
|
|
156
|
+
entireSystemColl: string;
|
|
157
|
+
entireSystemDebt: string;
|
|
158
|
+
collToken: string;
|
|
159
|
+
troveNFT: string;
|
|
160
|
+
borrowerOperations: string;
|
|
161
|
+
troveManager: string;
|
|
162
|
+
stabilityPool: string;
|
|
163
|
+
sortedTroves: string;
|
|
164
|
+
collSurplusPool: string;
|
|
165
|
+
activePool: string;
|
|
166
|
+
hintHelpers: string;
|
|
167
|
+
priceFeed: string;
|
|
168
|
+
collPrice: string;
|
|
169
|
+
isShutDown: boolean;
|
|
170
|
+
boldDepositInSp: string;
|
|
171
|
+
};
|
|
172
|
+
type MarketDataStructOutput = MarketDataStructOutputArray & MarketDataStructOutputStruct;
|
|
173
|
+
type TroveDataStruct = [
|
|
174
|
+
number | string | BN,
|
|
175
|
+
string,
|
|
176
|
+
string,
|
|
177
|
+
number | string | BN,
|
|
178
|
+
number | string | BN,
|
|
179
|
+
number | string | BN,
|
|
180
|
+
number | string | BN,
|
|
181
|
+
number | string | BN,
|
|
182
|
+
number | string | BN,
|
|
183
|
+
string,
|
|
184
|
+
number | string | BN,
|
|
185
|
+
number | string | BN
|
|
186
|
+
] | {
|
|
187
|
+
troveId: number | string | BN;
|
|
188
|
+
owner: string;
|
|
189
|
+
collToken: string;
|
|
190
|
+
status: number | string | BN;
|
|
191
|
+
collAmount: number | string | BN;
|
|
192
|
+
debtAmount: number | string | BN;
|
|
193
|
+
collPrice: number | string | BN;
|
|
194
|
+
TCRatio: number | string | BN;
|
|
195
|
+
annualInterestRate: number | string | BN;
|
|
196
|
+
interestBatchManager: string;
|
|
197
|
+
batchDebtShares: number | string | BN;
|
|
198
|
+
lastInterestRateAdjTime: number | string | BN;
|
|
199
|
+
};
|
|
200
|
+
type TroveDataStructOutputArray = [
|
|
201
|
+
string,
|
|
202
|
+
string,
|
|
203
|
+
string,
|
|
204
|
+
string,
|
|
205
|
+
string,
|
|
206
|
+
string,
|
|
207
|
+
string,
|
|
208
|
+
string,
|
|
209
|
+
string,
|
|
210
|
+
string,
|
|
211
|
+
string,
|
|
212
|
+
string
|
|
213
|
+
];
|
|
214
|
+
type TroveDataStructOutputStruct = {
|
|
215
|
+
troveId: string;
|
|
216
|
+
owner: string;
|
|
217
|
+
collToken: string;
|
|
218
|
+
status: string;
|
|
219
|
+
collAmount: string;
|
|
220
|
+
debtAmount: string;
|
|
221
|
+
collPrice: string;
|
|
222
|
+
TCRatio: string;
|
|
223
|
+
annualInterestRate: string;
|
|
224
|
+
interestBatchManager: string;
|
|
225
|
+
batchDebtShares: string;
|
|
226
|
+
lastInterestRateAdjTime: string;
|
|
227
|
+
};
|
|
228
|
+
type TroveDataStructOutput = TroveDataStructOutputArray & TroveDataStructOutputStruct;
|
|
229
|
+
type ExistingTroveStruct = [number | string | BN, boolean] | {
|
|
230
|
+
troveId: number | string | BN;
|
|
231
|
+
ownedByUser: boolean;
|
|
232
|
+
};
|
|
233
|
+
type ExistingTroveStructOutputArray = [string, boolean];
|
|
234
|
+
type ExistingTroveStructOutputStruct = {
|
|
235
|
+
troveId: string;
|
|
236
|
+
ownedByUser: boolean;
|
|
237
|
+
};
|
|
238
|
+
type ExistingTroveStructOutput = ExistingTroveStructOutputArray & ExistingTroveStructOutputStruct;
|
|
239
|
+
}
|
|
240
|
+
export declare namespace IMultiTroveGetter {
|
|
241
|
+
type CombinedTroveDataStruct = [
|
|
242
|
+
number | string | BN,
|
|
243
|
+
number | string | BN,
|
|
244
|
+
number | string | BN,
|
|
245
|
+
number | string | BN,
|
|
246
|
+
number | string | BN,
|
|
247
|
+
number | string | BN,
|
|
248
|
+
number | string | BN,
|
|
249
|
+
string,
|
|
250
|
+
number | string | BN,
|
|
251
|
+
number | string | BN,
|
|
252
|
+
number | string | BN,
|
|
253
|
+
number | string | BN
|
|
254
|
+
] | {
|
|
255
|
+
id: number | string | BN;
|
|
256
|
+
debt: number | string | BN;
|
|
257
|
+
coll: number | string | BN;
|
|
258
|
+
stake: number | string | BN;
|
|
259
|
+
annualInterestRate: number | string | BN;
|
|
260
|
+
lastDebtUpdateTime: number | string | BN;
|
|
261
|
+
lastInterestRateAdjTime: number | string | BN;
|
|
262
|
+
interestBatchManager: string;
|
|
263
|
+
batchDebtShares: number | string | BN;
|
|
264
|
+
batchCollShares: number | string | BN;
|
|
265
|
+
snapshotETH: number | string | BN;
|
|
266
|
+
snapshotBoldDebt: number | string | BN;
|
|
267
|
+
};
|
|
268
|
+
type CombinedTroveDataStructOutputArray = [
|
|
269
|
+
string,
|
|
270
|
+
string,
|
|
271
|
+
string,
|
|
272
|
+
string,
|
|
273
|
+
string,
|
|
274
|
+
string,
|
|
275
|
+
string,
|
|
276
|
+
string,
|
|
277
|
+
string,
|
|
278
|
+
string,
|
|
279
|
+
string,
|
|
280
|
+
string
|
|
281
|
+
];
|
|
282
|
+
type CombinedTroveDataStructOutputStruct = {
|
|
283
|
+
id: string;
|
|
284
|
+
debt: string;
|
|
285
|
+
coll: string;
|
|
286
|
+
stake: string;
|
|
287
|
+
annualInterestRate: string;
|
|
288
|
+
lastDebtUpdateTime: string;
|
|
289
|
+
lastInterestRateAdjTime: string;
|
|
290
|
+
interestBatchManager: string;
|
|
291
|
+
batchDebtShares: string;
|
|
292
|
+
batchCollShares: string;
|
|
293
|
+
snapshotETH: string;
|
|
294
|
+
snapshotBoldDebt: string;
|
|
295
|
+
};
|
|
296
|
+
type CombinedTroveDataStructOutput = CombinedTroveDataStructOutputArray & CombinedTroveDataStructOutputStruct;
|
|
297
|
+
}
|
|
298
|
+
export interface LiquityV2LegacyView extends BaseContract {
|
|
299
|
+
constructor(jsonInterface: any[], address?: string, options?: ContractOptions): LiquityV2LegacyView;
|
|
300
|
+
clone(): LiquityV2LegacyView;
|
|
301
|
+
methods: {
|
|
302
|
+
findInsertPosition(_market: string, _interestRate: number | string | BN, _prevId: number | string | BN, _nextId: number | string | BN): NonPayableTransactionObject<[
|
|
303
|
+
string,
|
|
304
|
+
string
|
|
305
|
+
] & {
|
|
306
|
+
prevId: string;
|
|
307
|
+
nextId: string;
|
|
308
|
+
}>;
|
|
309
|
+
getApproxHint(_market: string, _collIndex: number | string | BN, _interestRate: number | string | BN, _numTrials: number | string | BN, _inputRandomSeed: number | string | BN): NonPayableTransactionObject<[
|
|
310
|
+
string,
|
|
311
|
+
string,
|
|
312
|
+
string
|
|
313
|
+
] & {
|
|
314
|
+
hintId: string;
|
|
315
|
+
diff: string;
|
|
316
|
+
latestRandomSeed: string;
|
|
317
|
+
}>;
|
|
318
|
+
getBatchManagerInfo(_market: string, _manager: string): NonPayableTransactionObject<[
|
|
319
|
+
IBorrowerOperations.InterestBatchManagerStructOutput,
|
|
320
|
+
ITroveManager.LatestBatchDataStructOutput
|
|
321
|
+
] & {
|
|
322
|
+
managerData: IBorrowerOperations.InterestBatchManagerStructOutput;
|
|
323
|
+
batchData: ITroveManager.LatestBatchDataStructOutput;
|
|
324
|
+
}>;
|
|
325
|
+
getDebtInFront(_market: string, _troveId: number | string | BN, _acc: number | string | BN, _iterations: number | string | BN): NonPayableTransactionObject<[
|
|
326
|
+
string,
|
|
327
|
+
string
|
|
328
|
+
] & {
|
|
329
|
+
next: string;
|
|
330
|
+
debt: string;
|
|
331
|
+
}>;
|
|
332
|
+
getDebtInFrontByInterestRate(_market: string, _troveId: number | string | BN, _acc: number | string | BN, _iterations: number | string | BN, _targetIR: number | string | BN): NonPayableTransactionObject<[
|
|
333
|
+
string,
|
|
334
|
+
string
|
|
335
|
+
] & {
|
|
336
|
+
next: string;
|
|
337
|
+
debt: string;
|
|
338
|
+
}>;
|
|
339
|
+
getDebtInFrontByTroveNum(_market: string, _numTroves: number | string | BN): NonPayableTransactionObject<string>;
|
|
340
|
+
getDepositorInfo(_market: string, _depositor: string): NonPayableTransactionObject<[
|
|
341
|
+
string,
|
|
342
|
+
string,
|
|
343
|
+
string
|
|
344
|
+
] & {
|
|
345
|
+
compoundedBOLD: string;
|
|
346
|
+
collGain: string;
|
|
347
|
+
boldGain: string;
|
|
348
|
+
}>;
|
|
349
|
+
getInsertPosition(_market: string, _collIndex: number | string | BN, _interestRate: number | string | BN, _numTrials: number | string | BN, _inputRandomSeed: number | string | BN): NonPayableTransactionObject<[
|
|
350
|
+
string,
|
|
351
|
+
string
|
|
352
|
+
] & {
|
|
353
|
+
prevId: string;
|
|
354
|
+
nextId: string;
|
|
355
|
+
}>;
|
|
356
|
+
getMarketData(_market: string): NonPayableTransactionObject<LiquityV2View.MarketDataStructOutput>;
|
|
357
|
+
getMultipleSortedTroves(_market: string, _startIdx: number | string | BN, _count: number | string | BN): NonPayableTransactionObject<IMultiTroveGetter.CombinedTroveDataStructOutput[]>;
|
|
358
|
+
getNumOfTrovesInFrontOfTrove(_market: string, _troveId: number | string | BN, _iterations: number | string | BN): NonPayableTransactionObject<[
|
|
359
|
+
string,
|
|
360
|
+
string
|
|
361
|
+
] & {
|
|
362
|
+
next: string;
|
|
363
|
+
numTroves: string;
|
|
364
|
+
}>;
|
|
365
|
+
getTroveInfo(_market: string, _troveId: number | string | BN): NonPayableTransactionObject<LiquityV2View.TroveDataStructOutput>;
|
|
366
|
+
getTrovePosition(_market: string, _collIndex: number | string | BN, _troveId: number | string | BN, _numTrials: number | string | BN, _inputRandomSeed: number | string | BN): NonPayableTransactionObject<[
|
|
367
|
+
string,
|
|
368
|
+
string
|
|
369
|
+
] & {
|
|
370
|
+
prevId: string;
|
|
371
|
+
nextId: string;
|
|
372
|
+
}>;
|
|
373
|
+
getUserTroves(_user: string, _market: string, _startIndex: number | string | BN, _endIndex: number | string | BN): NonPayableTransactionObject<[
|
|
374
|
+
LiquityV2View.ExistingTroveStructOutput[],
|
|
375
|
+
string
|
|
376
|
+
] & {
|
|
377
|
+
troves: LiquityV2View.ExistingTroveStructOutput[];
|
|
378
|
+
nextFreeTroveIndex: string;
|
|
379
|
+
}>;
|
|
380
|
+
isShutDown(_market: string): NonPayableTransactionObject<boolean>;
|
|
381
|
+
predictAdjustTroveUpfrontFee(_market: string, _collIndex: number | string | BN, _troveId: number | string | BN, _debtIncrease: number | string | BN): NonPayableTransactionObject<string>;
|
|
382
|
+
};
|
|
383
|
+
events: {
|
|
384
|
+
allEvents(options?: EventOptions, cb?: Callback<EventLog>): EventEmitter;
|
|
385
|
+
};
|
|
386
|
+
}
|
|
@@ -87,6 +87,7 @@ export declare namespace LiquityV2View {
|
|
|
87
87
|
number | string | BN,
|
|
88
88
|
number | string | BN,
|
|
89
89
|
number | string | BN,
|
|
90
|
+
number | string | BN,
|
|
90
91
|
string,
|
|
91
92
|
string,
|
|
92
93
|
string,
|
|
@@ -105,6 +106,7 @@ export declare namespace LiquityV2View {
|
|
|
105
106
|
CCR: number | string | BN;
|
|
106
107
|
MCR: number | string | BN;
|
|
107
108
|
SCR: number | string | BN;
|
|
109
|
+
BCR: number | string | BN;
|
|
108
110
|
LIQUIDATION_PENALTY_SP: number | string | BN;
|
|
109
111
|
LIQUIDATION_PENALTY_REDISTRIBUTION: number | string | BN;
|
|
110
112
|
entireSystemColl: number | string | BN;
|
|
@@ -143,6 +145,7 @@ export declare namespace LiquityV2View {
|
|
|
143
145
|
string,
|
|
144
146
|
string,
|
|
145
147
|
string,
|
|
148
|
+
string,
|
|
146
149
|
boolean,
|
|
147
150
|
string
|
|
148
151
|
];
|
|
@@ -151,6 +154,7 @@ export declare namespace LiquityV2View {
|
|
|
151
154
|
CCR: string;
|
|
152
155
|
MCR: string;
|
|
153
156
|
SCR: string;
|
|
157
|
+
BCR: string;
|
|
154
158
|
LIQUIDATION_PENALTY_SP: string;
|
|
155
159
|
LIQUIDATION_PENALTY_REDISTRIBUTION: string;
|
|
156
160
|
entireSystemColl: string;
|
|
@@ -38,6 +38,7 @@ export type { LendingPoolAddressesProvider } from "./LendingPoolAddressesProvide
|
|
|
38
38
|
export type { Lido } from "./Lido";
|
|
39
39
|
export type { LiquityActivePool } from "./LiquityActivePool";
|
|
40
40
|
export type { LiquityV2CollSurplusPool } from "./LiquityV2CollSurplusPool";
|
|
41
|
+
export type { LiquityV2LegacyView } from "./LiquityV2LegacyView";
|
|
41
42
|
export type { LiquityV2StabilityPool } from "./LiquityV2StabilityPool";
|
|
42
43
|
export type { LiquityV2TroveNFT } from "./LiquityV2TroveNFT";
|
|
43
44
|
export type { LiquityV2View } from "./LiquityV2View";
|
package/cjs/types/liquityV2.d.ts
CHANGED
|
@@ -2,7 +2,10 @@ import { EthAddress, NetworkNumber } from './common';
|
|
|
2
2
|
export declare enum LiquityV2Versions {
|
|
3
3
|
LiquityV2Eth = "liquityv2eth",
|
|
4
4
|
LiquityV2WstEth = "liquityv2wsteth",
|
|
5
|
-
LiquityV2REth = "liquityv2reth"
|
|
5
|
+
LiquityV2REth = "liquityv2reth",
|
|
6
|
+
LiquityV2EthLegacy = "liquityv2ethlegacy",
|
|
7
|
+
LiquityV2WstEthLegacy = "liquityv2wstethlegacy",
|
|
8
|
+
LiquityV2REthLegacy = "liquityv2rethlegacy"
|
|
6
9
|
}
|
|
7
10
|
export declare enum LIQUITY_V2_TROVE_STATUS_ENUM {
|
|
8
11
|
nonExistent = 0,
|
|
@@ -28,6 +31,7 @@ export interface LiquityV2MarketInfo {
|
|
|
28
31
|
collateralToken: string;
|
|
29
32
|
marketAddress: string;
|
|
30
33
|
protocolName: string;
|
|
34
|
+
isLegacy: boolean;
|
|
31
35
|
}
|
|
32
36
|
export interface LiquityV2AssetData {
|
|
33
37
|
symbol: string;
|
|
@@ -49,6 +53,7 @@ export interface InnerLiquityV2MarketData {
|
|
|
49
53
|
minCollRatio: string;
|
|
50
54
|
totalCollRatio: string;
|
|
51
55
|
criticalCollRatio: string;
|
|
56
|
+
batchCollRatio: string;
|
|
52
57
|
isUnderCollateralized: boolean;
|
|
53
58
|
hintHelperAddress: EthAddress;
|
|
54
59
|
troveNFTAddress: EthAddress;
|
package/cjs/types/liquityV2.js
CHANGED
|
@@ -6,6 +6,10 @@ var LiquityV2Versions;
|
|
|
6
6
|
LiquityV2Versions["LiquityV2Eth"] = "liquityv2eth";
|
|
7
7
|
LiquityV2Versions["LiquityV2WstEth"] = "liquityv2wsteth";
|
|
8
8
|
LiquityV2Versions["LiquityV2REth"] = "liquityv2reth";
|
|
9
|
+
// Legacy
|
|
10
|
+
LiquityV2Versions["LiquityV2EthLegacy"] = "liquityv2ethlegacy";
|
|
11
|
+
LiquityV2Versions["LiquityV2WstEthLegacy"] = "liquityv2wstethlegacy";
|
|
12
|
+
LiquityV2Versions["LiquityV2REthLegacy"] = "liquityv2rethlegacy";
|
|
9
13
|
})(LiquityV2Versions || (exports.LiquityV2Versions = LiquityV2Versions = {}));
|
|
10
14
|
var LIQUITY_V2_TROVE_STATUS_ENUM;
|
|
11
15
|
(function (LIQUITY_V2_TROVE_STATUS_ENUM) {
|
|
@@ -7618,7 +7618,7 @@ export namespace LlamaLendControllerAbi {
|
|
|
7618
7618
|
let networks_80: {};
|
|
7619
7619
|
export { networks_80 as networks };
|
|
7620
7620
|
}
|
|
7621
|
-
export namespace
|
|
7621
|
+
export namespace LiquityV2LegacyView {
|
|
7622
7622
|
let abi_81: ({
|
|
7623
7623
|
inputs: never[];
|
|
7624
7624
|
name: string;
|
|
@@ -7689,8 +7689,48 @@ export namespace LiquityV2View {
|
|
|
7689
7689
|
};
|
|
7690
7690
|
export { networks_81 as networks };
|
|
7691
7691
|
}
|
|
7692
|
-
export namespace
|
|
7692
|
+
export namespace LiquityV2View {
|
|
7693
7693
|
let abi_82: ({
|
|
7694
|
+
inputs: never[];
|
|
7695
|
+
name: string;
|
|
7696
|
+
type: string;
|
|
7697
|
+
outputs?: undefined;
|
|
7698
|
+
stateMutability?: undefined;
|
|
7699
|
+
} | {
|
|
7700
|
+
inputs: {
|
|
7701
|
+
internalType: string;
|
|
7702
|
+
name: string;
|
|
7703
|
+
type: string;
|
|
7704
|
+
}[];
|
|
7705
|
+
name: string;
|
|
7706
|
+
outputs: ({
|
|
7707
|
+
components: {
|
|
7708
|
+
internalType: string;
|
|
7709
|
+
name: string;
|
|
7710
|
+
type: string;
|
|
7711
|
+
}[];
|
|
7712
|
+
internalType: string;
|
|
7713
|
+
name: string;
|
|
7714
|
+
type: string;
|
|
7715
|
+
} | {
|
|
7716
|
+
internalType: string;
|
|
7717
|
+
name: string;
|
|
7718
|
+
type: string;
|
|
7719
|
+
components?: undefined;
|
|
7720
|
+
})[];
|
|
7721
|
+
stateMutability: string;
|
|
7722
|
+
type: string;
|
|
7723
|
+
})[];
|
|
7724
|
+
export { abi_82 as abi };
|
|
7725
|
+
let networks_82: {
|
|
7726
|
+
"1": {
|
|
7727
|
+
address: string;
|
|
7728
|
+
};
|
|
7729
|
+
};
|
|
7730
|
+
export { networks_82 as networks };
|
|
7731
|
+
}
|
|
7732
|
+
export namespace LiquityV2CollSurplusPool {
|
|
7733
|
+
let abi_83: ({
|
|
7694
7734
|
inputs: {
|
|
7695
7735
|
internalType: string;
|
|
7696
7736
|
name: string;
|
|
@@ -7729,12 +7769,12 @@ export namespace LiquityV2CollSurplusPool {
|
|
|
7729
7769
|
type: string;
|
|
7730
7770
|
anonymous?: undefined;
|
|
7731
7771
|
})[];
|
|
7732
|
-
export {
|
|
7733
|
-
let
|
|
7734
|
-
export {
|
|
7772
|
+
export { abi_83 as abi };
|
|
7773
|
+
let networks_83: {};
|
|
7774
|
+
export { networks_83 as networks };
|
|
7735
7775
|
}
|
|
7736
7776
|
export namespace LiquityV2TroveNFT {
|
|
7737
|
-
let
|
|
7777
|
+
let abi_84: ({
|
|
7738
7778
|
inputs: {
|
|
7739
7779
|
internalType: string;
|
|
7740
7780
|
name: string;
|
|
@@ -7773,12 +7813,12 @@ export namespace LiquityV2TroveNFT {
|
|
|
7773
7813
|
type: string;
|
|
7774
7814
|
anonymous?: undefined;
|
|
7775
7815
|
})[];
|
|
7776
|
-
export {
|
|
7777
|
-
let
|
|
7778
|
-
export {
|
|
7816
|
+
export { abi_84 as abi };
|
|
7817
|
+
let networks_84: {};
|
|
7818
|
+
export { networks_84 as networks };
|
|
7779
7819
|
}
|
|
7780
7820
|
export namespace EulerV2View {
|
|
7781
|
-
let
|
|
7821
|
+
let abi_85: ({
|
|
7782
7822
|
inputs: {
|
|
7783
7823
|
internalType: string;
|
|
7784
7824
|
name: string;
|
|
@@ -7841,16 +7881,16 @@ export namespace EulerV2View {
|
|
|
7841
7881
|
stateMutability: string;
|
|
7842
7882
|
type: string;
|
|
7843
7883
|
})[];
|
|
7844
|
-
export {
|
|
7845
|
-
let
|
|
7884
|
+
export { abi_85 as abi };
|
|
7885
|
+
let networks_85: {
|
|
7846
7886
|
"1": {
|
|
7847
7887
|
address: string;
|
|
7848
7888
|
};
|
|
7849
7889
|
};
|
|
7850
|
-
export {
|
|
7890
|
+
export { networks_85 as networks };
|
|
7851
7891
|
}
|
|
7852
7892
|
export namespace LiquityV2StabilityPool {
|
|
7853
|
-
let
|
|
7893
|
+
let abi_86: ({
|
|
7854
7894
|
inputs: {
|
|
7855
7895
|
internalType: string;
|
|
7856
7896
|
name: string;
|
|
@@ -7889,12 +7929,12 @@ export namespace LiquityV2StabilityPool {
|
|
|
7889
7929
|
type: string;
|
|
7890
7930
|
anonymous?: undefined;
|
|
7891
7931
|
})[];
|
|
7892
|
-
export {
|
|
7893
|
-
let
|
|
7894
|
-
export {
|
|
7932
|
+
export { abi_86 as abi };
|
|
7933
|
+
let networks_86: {};
|
|
7934
|
+
export { networks_86 as networks };
|
|
7895
7935
|
}
|
|
7896
7936
|
export namespace FluidView {
|
|
7897
|
-
let
|
|
7937
|
+
let abi_87: ({
|
|
7898
7938
|
inputs: {
|
|
7899
7939
|
internalType: string;
|
|
7900
7940
|
name: string;
|
|
@@ -7928,8 +7968,8 @@ export namespace FluidView {
|
|
|
7928
7968
|
stateMutability: string;
|
|
7929
7969
|
type: string;
|
|
7930
7970
|
})[];
|
|
7931
|
-
export {
|
|
7932
|
-
let
|
|
7971
|
+
export { abi_87 as abi };
|
|
7972
|
+
let networks_87: {
|
|
7933
7973
|
"1": {
|
|
7934
7974
|
address: string;
|
|
7935
7975
|
};
|
|
@@ -7940,5 +7980,5 @@ export namespace FluidView {
|
|
|
7940
7980
|
address: string;
|
|
7941
7981
|
};
|
|
7942
7982
|
};
|
|
7943
|
-
export {
|
|
7983
|
+
export { networks_87 as networks };
|
|
7944
7984
|
}
|