@defisaver/automation-sdk 3.3.9 → 3.3.10-aave-v4-dev

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.
Files changed (42) hide show
  1. package/cjs/constants/index.js +55 -0
  2. package/cjs/services/ethereumService.js +21 -14
  3. package/cjs/services/strategiesService.js +101 -0
  4. package/cjs/services/strategySubService.d.ts +6 -0
  5. package/cjs/services/strategySubService.js +30 -1
  6. package/cjs/services/strategySubService.test.js +96 -0
  7. package/cjs/services/subDataService.d.ts +290 -132
  8. package/cjs/services/subDataService.js +607 -378
  9. package/cjs/services/subDataService.test.js +157 -0
  10. package/cjs/services/triggerService.d.ts +29 -0
  11. package/cjs/services/triggerService.js +55 -1
  12. package/cjs/services/triggerService.test.js +84 -0
  13. package/cjs/types/enums.d.ts +14 -2
  14. package/cjs/types/enums.js +12 -0
  15. package/cjs/types/index.d.ts +22 -1
  16. package/esm/constants/index.js +55 -0
  17. package/esm/services/ethereumService.js +21 -14
  18. package/esm/services/strategiesService.js +102 -1
  19. package/esm/services/strategySubService.d.ts +6 -0
  20. package/esm/services/strategySubService.js +29 -0
  21. package/esm/services/strategySubService.test.js +97 -1
  22. package/esm/services/subDataService.d.ts +290 -132
  23. package/esm/services/subDataService.js +606 -377
  24. package/esm/services/subDataService.test.js +157 -0
  25. package/esm/services/triggerService.d.ts +29 -0
  26. package/esm/services/triggerService.js +54 -0
  27. package/esm/services/triggerService.test.js +85 -1
  28. package/esm/types/enums.d.ts +14 -2
  29. package/esm/types/enums.js +12 -0
  30. package/esm/types/index.d.ts +22 -1
  31. package/package.json +1 -1
  32. package/src/constants/index.ts +55 -0
  33. package/src/services/ethereumService.ts +23 -16
  34. package/src/services/strategiesService.ts +116 -1
  35. package/src/services/strategySubService.test.ts +125 -0
  36. package/src/services/strategySubService.ts +118 -0
  37. package/src/services/subDataService.test.ts +173 -0
  38. package/src/services/subDataService.ts +980 -746
  39. package/src/services/triggerService.test.ts +99 -0
  40. package/src/services/triggerService.ts +76 -1
  41. package/src/types/enums.ts +12 -0
  42. package/src/types/index.ts +27 -1
@@ -1,6 +1,46 @@
1
1
  import type { EthereumAddress } from '../types';
2
2
  import type { CloseStrategyType, OrderType } from '../types/enums';
3
3
  import { ChainId, RatioState } from '../types/enums';
4
+ /**
5
+ _______ _______ .______ .______ _______ ______ ___ .___________. _______ _______
6
+ | \ | ____|| _ \ | _ \ | ____| / | / \ | || ____|| \
7
+ | .--. || |__ | |_) | | |_) | | |__ | ,----' / ^ \ `---| |----`| |__ | .--. |
8
+ | | | || __| | ___/ | / | __| | | / /_\ \ | | | __| | | | |
9
+ | '--' || |____ | | | |\ \----.| |____ | `----./ _____ \ | | | |____ | '--' |
10
+ |_______/ |_______|| _| | _| `._____||_______| \______/__/ \__\ |__| |_______||_______/
11
+ */
12
+ export declare const morphoAaveV2LeverageManagementSubData: {
13
+ encode(triggerRepayRatio: number, triggerBoostRatio: number, targetBoostRatio: number, targetRepayRatio: number, boostEnabled: boolean): string[];
14
+ decode(subData: string[]): {
15
+ targetRatio: number;
16
+ };
17
+ };
18
+ export declare const cBondsRebondSubData: {
19
+ encode(bondId: number | string): string[];
20
+ decode(subData: string[]): {
21
+ bondId: string;
22
+ };
23
+ };
24
+ export declare const liquityPaybackUsingChickenBondSubData: {
25
+ /**
26
+ * @param sourceId bondId or subId
27
+ * @param sourceType 0 for bond, 1 for subId
28
+ * @param chainId
29
+ */
30
+ encode: (sourceId: string, sourceType: number, chainId?: ChainId) => string[];
31
+ decode: (subData: string[]) => {
32
+ sourceId: string;
33
+ sourceType: string;
34
+ };
35
+ };
36
+ /**
37
+ .___ ___. ___ __ ___ _______ .______
38
+ | \/ | / \ | |/ / | ____|| _ \
39
+ | \ / | / ^ \ | ' / | |__ | |_) |
40
+ | |\/| | / /_\ \ | < | __| | /
41
+ | | | | / _____ \ | . \ | |____ | |\ \----.
42
+ |__| |__| /__/ \__\ |__|\__\ |_______|| _| `._____|
43
+ */
4
44
  export declare const makerRepayFromSavingsSubData: {
5
45
  encode(vaultId: number, targetRatioPercentage: number, chainId: ChainId, daiAddr?: EthereumAddress, mcdCdpManagerAddr?: EthereumAddress): string[];
6
46
  decode(subData: string[]): {
@@ -10,11 +50,6 @@ export declare const makerRepayFromSavingsSubData: {
10
50
  targetRatio: number;
11
51
  };
12
52
  };
13
- export declare const liquityRepayFromSavingsSubData: {
14
- decode(subData: string[]): {
15
- targetRatio: number;
16
- };
17
- };
18
53
  export declare const makerCloseSubData: {
19
54
  encode(vaultId: number, closeToAssetAddr: EthereumAddress, chainId: ChainId, daiAddr?: EthereumAddress, mcdCdpManagerAddr?: EthereumAddress): string[];
20
55
  decode(subData: string[]): {
@@ -36,6 +71,19 @@ export declare const makerLeverageManagementWithoutSubProxy: {
36
71
  daiAddr: string;
37
72
  };
38
73
  };
74
+ /**
75
+ __ __ ______ __ __ __ .___________.____ ____ ____ ____ __
76
+ | | | | / __ \ | | | | | | | |\ \ / / \ \ / / /_ |
77
+ | | | | | | | | | | | | | | `---| |----` \ \/ / \ \/ / | |
78
+ | | | | | | | | | | | | | | | | \_ _/ \ / | |
79
+ | `----.| | | `--' '--.| `--' | | | | | | | \ / | |
80
+ |_______||__| \_____\_____\\______/ |__| |__| |__| \__/ |_|
81
+ */
82
+ export declare const liquityRepayFromSavingsSubData: {
83
+ decode(subData: string[]): {
84
+ targetRatio: number;
85
+ };
86
+ };
39
87
  export declare const liquityLeverageManagementSubData: {
40
88
  decode: (subData: string[]) => {
41
89
  targetRatio: number;
@@ -48,12 +96,95 @@ export declare const liquityCloseSubData: {
48
96
  debtAddr: string;
49
97
  };
50
98
  };
99
+ export declare const liquityDsrPaybackSubData: {
100
+ encode: (targetRatio: number) => string[];
101
+ decode: (subData: string[]) => {
102
+ targetRatio: number;
103
+ };
104
+ };
105
+ export declare const liquityDsrSupplySubData: {
106
+ encode: (targetRatio: number) => string[];
107
+ decode: (subData: string[]) => {
108
+ targetRatio: number;
109
+ };
110
+ };
111
+ export declare const liquityDebtInFrontRepaySubData: {
112
+ encode: (targetRatioIncrease: number) => string[];
113
+ decode: (subData: string[]) => {
114
+ targetRatioIncrease: number;
115
+ };
116
+ };
117
+ /**
118
+ * __ __ ______ __ __ __ .___________.____ ____ ____ ____ ___
119
+ | | | | / __ \ | | | | | | | |\ \ / / \ \ / / |__ \
120
+ | | | | | | | | | | | | | | `---| |----` \ \/ / \ \/ / ) |
121
+ | | | | | | | | | | | | | | | | \_ _/ \ / / /
122
+ | `----.| | | `--' '--.| `--' | | | | | | | \ / / /_
123
+ |_______||__| \_____\_____\\______/ |__| |__| |__| \__/ |____|
124
+ */
125
+ export declare const liquityV2LeverageManagementSubData: {
126
+ encode: (market: EthereumAddress, troveId: string, collToken: EthereumAddress, boldToken: EthereumAddress, ratioState: RatioState, targetRatio: number) => string[];
127
+ decode: (subData: string[]) => {
128
+ market: string;
129
+ troveId: string;
130
+ collToken: string;
131
+ boldToken: string;
132
+ ratioState: RatioState;
133
+ targetRatio: number;
134
+ };
135
+ };
136
+ export declare const liquityV2CloseSubData: {
137
+ encode(market: EthereumAddress, troveId: string, collToken: EthereumAddress, boldToken: EthereumAddress, closeType: CloseStrategyType): string[];
138
+ decode(subData: string[]): {
139
+ market: EthereumAddress;
140
+ troveId: string;
141
+ collToken: EthereumAddress;
142
+ boldToken: EthereumAddress;
143
+ closeType: CloseStrategyType;
144
+ };
145
+ };
146
+ export declare const liquityV2LeverageManagementOnPriceSubData: {
147
+ encode(market: EthereumAddress, troveId: string, collToken: EthereumAddress, boldToken: EthereumAddress, targetRatio: number, isRepayOnPrice: boolean): string[];
148
+ decode(subData: string[]): {
149
+ market: EthereumAddress;
150
+ troveId: string;
151
+ collToken: EthereumAddress;
152
+ boldToken: EthereumAddress;
153
+ targetRatio: number;
154
+ };
155
+ };
156
+ export declare const liquityV2PaybackSubData: {
157
+ encode: (market: EthereumAddress, troveId: string, boldToken: EthereumAddress, targetRatio: number, ratioState: RatioState) => string[];
158
+ decode: (subData: string[]) => {
159
+ market: string;
160
+ troveId: string;
161
+ boldToken: string;
162
+ ratioState: RatioState;
163
+ targetRatio: number;
164
+ };
165
+ };
166
+ /**
167
+ ___ ___ ____ ____ _______ ____ ____ ___
168
+ / \ / \ \ \ / / | ____| \ \ / / |__ \
169
+ / ^ \ / ^ \ \ \/ / | |__ \ \/ / ) |
170
+ / /_\ \ / /_\ \ \ / | __| \ / / /
171
+ / _____ \ / _____ \ \ / | |____ \ / / /_
172
+ /__/ \__\ /__/ \__\ \__/ |_______| \__/ |____|
173
+ */
51
174
  export declare const aaveV2LeverageManagementSubData: {
52
175
  encode(triggerRepayRatio: number, triggerBoostRatio: number, targetBoostRatio: number, targetRepayRatio: number, boostEnabled: boolean): string[];
53
176
  decode(subData: string[]): {
54
177
  targetRatio: number;
55
178
  };
56
179
  };
180
+ /**
181
+ ___ ___ ____ ____ _______ ____ ____ ____
182
+ / \ / \ \ \ / / | ____| \ \ / / |___ \
183
+ / ^ \ / ^ \ \ \/ / | |__ \ \/ / __) |
184
+ / /_\ \ / /_\ \ \ / | __| \ / |__ <
185
+ / _____ \ / _____ \ \ / | |____ \ / ___) |
186
+ /__/ \__\ /__/ \__\ \__/ |_______| \__/ |____/
187
+ */
57
188
  export declare const aaveV3LeverageManagementSubData: {
58
189
  decode(subData: string[]): {
59
190
  targetRatio: number;
@@ -110,12 +241,93 @@ export declare const aaveV3QuotePriceSubData: {
110
241
  debtAssetId: number;
111
242
  };
112
243
  };
244
+ export declare const aaveV3LeverageManagementOnPriceSubData: {
245
+ encode(collAsset: EthereumAddress, collAssetId: number, debtAsset: EthereumAddress, debtAssetId: number, marketAddr: EthereumAddress, targetRatio: number): string[];
246
+ decode(subData: string[]): {
247
+ collAsset: EthereumAddress;
248
+ collAssetId: number;
249
+ debtAsset: EthereumAddress;
250
+ debtAssetId: number;
251
+ marketAddr: EthereumAddress;
252
+ targetRatio: number;
253
+ };
254
+ };
255
+ /**
256
+ * ___ ___ ____ ____ _______ ____ ____ _ _
257
+ / \ / \ \ \ / / | ____| \ \ / / | || |
258
+ / ^ \ / ^ \ \ \/ / | |__ \ \/ / | || |_
259
+ / /_\ \ / /_\ \ \ / | __| \ / |__ _|
260
+ / _____ \ / _____ \ \ / | |____ \ / | |
261
+ /__/ \__\ /__/ \__\ \__/ |_______| \__/ |_|
262
+ */
263
+ export declare const aaveV4LeverageManagementSubData: {
264
+ encode: (spoke: EthereumAddress, owner: EthereumAddress, ratioState: RatioState, targetRatio: number) => string[];
265
+ decode: (subData: string[]) => {
266
+ spoke: string;
267
+ owner: string;
268
+ ratioState: RatioState;
269
+ targetRatio: number;
270
+ };
271
+ };
272
+ export declare const aaveV4LeverageManagementOnPriceSubData: {
273
+ encode: (spoke: EthereumAddress, owner: EthereumAddress, collAsset: EthereumAddress, collAssetId: number, debtAsset: EthereumAddress, debtAssetId: number, ratioState: RatioState, targetRatio: number) => string[];
274
+ decode: (subData: string[]) => {
275
+ spoke: string;
276
+ owner: string;
277
+ collAsset: string;
278
+ collAssetId: number;
279
+ debtAsset: string;
280
+ debtAssetId: number;
281
+ ratioState: RatioState;
282
+ targetRatio: number;
283
+ };
284
+ };
285
+ export declare const aaveV4CloseSubData: {
286
+ encode: (spoke: EthereumAddress, owner: EthereumAddress, collAsset: EthereumAddress, collAssetId: number, debtAsset: EthereumAddress, debtAssetId: number, closeType: CloseStrategyType) => string[];
287
+ decode: (subData: string[]) => {
288
+ spoke: string;
289
+ owner: string;
290
+ collAsset: string;
291
+ collAssetId: number;
292
+ debtAsset: string;
293
+ debtAssetId: number;
294
+ closeType: CloseStrategyType;
295
+ };
296
+ };
297
+ export declare const aaveV4CollateralSwitchSubData: {
298
+ encode: (spoke: EthereumAddress, owner: EthereumAddress, fromAsset: EthereumAddress, fromAssetId: number, toAsset: EthereumAddress, toAssetId: number, amountToSwitch: string) => string[];
299
+ decode: (subData: string[]) => {
300
+ spoke: string;
301
+ owner: string;
302
+ fromAsset: string;
303
+ fromAssetId: number;
304
+ toAsset: string;
305
+ toAssetId: number;
306
+ amountToSwitch: string;
307
+ };
308
+ };
309
+ /**
310
+ ______ ______ .___ ___. .______ ____ ____ ___
311
+ / | / __ \ | \/ | | _ \ \ \ / / |__ \
312
+ | ,----'| | | | | \ / | | |_) | \ \/ / ) |
313
+ | | | | | | | |\/| | | ___/ \ / / /
314
+ | `----.| `--' | | | | | | | \ / / /_
315
+ \______| \______/ |__| |__| | _| \__/ |____|
316
+ */
113
317
  export declare const compoundV2LeverageManagementSubData: {
114
318
  encode(triggerRepayRatio: number, triggerBoostRatio: number, targetBoostRatio: number, targetRepayRatio: number, boostEnabled: boolean): string[];
115
319
  decode(subData: string[]): {
116
320
  targetRatio: number;
117
321
  };
118
322
  };
323
+ /**
324
+ ______ ______ .___ ___. .______ ____ ____ ____
325
+ / | / __ \ | \/ | | _ \ \ \ / / |___ \
326
+ | ,----'| | | | | \ / | | |_) | \ \/ / __) |
327
+ | | | | | | | |\/| | | ___/ \ / |__ <
328
+ | `----.| `--' | | | | | | | \ / ___) |
329
+ \______| \______/ |__| |__| | _| \__/ |____/
330
+ */
119
331
  export declare const compoundV3LeverageManagementSubData: {
120
332
  encode(market: EthereumAddress, baseToken: EthereumAddress, triggerRepayRatio: number, triggerBoostRatio: number, targetBoostRatio: number, targetRepayRatio: number, boostEnabled: boolean, isEOA: boolean): string[];
121
333
  decode(subData: string[]): {
@@ -128,30 +340,35 @@ export declare const compoundV3L2LeverageManagementSubData: {
128
340
  targetRatio: number;
129
341
  };
130
342
  };
131
- export declare const morphoAaveV2LeverageManagementSubData: {
132
- encode(triggerRepayRatio: number, triggerBoostRatio: number, targetBoostRatio: number, targetRepayRatio: number, boostEnabled: boolean): string[];
343
+ export declare const compoundV3LeverageManagementOnPriceSubData: {
344
+ encode(market: EthereumAddress, collToken: EthereumAddress, baseToken: EthereumAddress, targetRatio: number, ratioState: RatioState, user: EthereumAddress): string[];
133
345
  decode(subData: string[]): {
346
+ market: EthereumAddress;
347
+ collToken: EthereumAddress;
348
+ baseToken: EthereumAddress;
134
349
  targetRatio: number;
350
+ ratioState: RatioState;
351
+ owner: EthereumAddress;
135
352
  };
136
353
  };
137
- export declare const cBondsRebondSubData: {
138
- encode(bondId: number | string): string[];
354
+ export declare const compoundV3CloseSubData: {
355
+ encode(market: EthereumAddress, collToken: EthereumAddress, baseToken: EthereumAddress, closeType: CloseStrategyType, user: EthereumAddress): string[];
139
356
  decode(subData: string[]): {
140
- bondId: string;
141
- };
142
- };
143
- export declare const liquityPaybackUsingChickenBondSubData: {
144
- /**
145
- * @param sourceId bondId or subId
146
- * @param sourceType 0 for bond, 1 for subId
147
- * @param chainId
148
- */
149
- encode: (sourceId: string, sourceType: number, chainId?: ChainId) => string[];
150
- decode: (subData: string[]) => {
151
- sourceId: string;
152
- sourceType: string;
357
+ market: EthereumAddress;
358
+ collToken: EthereumAddress;
359
+ baseToken: EthereumAddress;
360
+ closeType: CloseStrategyType;
361
+ owner: EthereumAddress;
153
362
  };
154
363
  };
364
+ /**
365
+ __________ ___ ______ __ __ ___ .__ __. _______ _______
366
+ | ____\ \ / / / || | | | / \ | \ | | / _____|| ____|
367
+ | |__ \ V / | ,----'| |__| | / ^ \ | \| | | | __ | |__
368
+ | __| > < | | | __ | / /_\ \ | . ` | | | |_ | | __|
369
+ | |____ / . \ | `----.| | | | / _____ \ | |\ | | |__| | | |____
370
+ |_______/__/ \__\ \______||__| |__| /__/ \__\ |__| \__| \______| |_______|
371
+ */
155
372
  export declare const exchangeDcaSubData: {
156
373
  encode: (fromToken: EthereumAddress, toToken: EthereumAddress, amount: string, interval: number) => string[];
157
374
  decode: (subData: string[], chainId: ChainId) => {
@@ -169,6 +386,14 @@ export declare const exchangeLimitOrderSubData: {
169
386
  amount: string;
170
387
  };
171
388
  };
389
+ /**
390
+ _______..______ ___ .______ __ ___
391
+ / || _ \ / \ | _ \ | |/ /
392
+ | (----`| |_) | / ^ \ | |_) | | ' /
393
+ \ \ | ___/ / /_\ \ | / | <
394
+ .----) | | | / _____ \ | |\ \----.| . \
395
+ |_______/ | _| /__/ \__\ | _| `._____||__|\__\
396
+ */
172
397
  export declare const sparkLeverageManagementSubData: {
173
398
  decode(subData: string[]): {
174
399
  targetRatio: number;
@@ -181,24 +406,26 @@ export declare const sparkLeverageManagementSubDataWithoutSubProxy: {
181
406
  ratioState: RatioState;
182
407
  };
183
408
  };
184
- export declare const liquityDsrPaybackSubData: {
185
- encode: (targetRatio: number) => string[];
186
- decode: (subData: string[]) => {
187
- targetRatio: number;
188
- };
189
- };
190
- export declare const liquityDsrSupplySubData: {
191
- encode: (targetRatio: number) => string[];
192
- decode: (subData: string[]) => {
193
- targetRatio: number;
194
- };
195
- };
196
- export declare const liquityDebtInFrontRepaySubData: {
197
- encode: (targetRatioIncrease: number) => string[];
198
- decode: (subData: string[]) => {
199
- targetRatioIncrease: number;
409
+ export declare const sparkCloseGenericSubData: {
410
+ encode(collAsset: EthereumAddress, collAssetId: number, debtAsset: EthereumAddress, debtAssetId: number, closeType: CloseStrategyType, marketAddr: EthereumAddress, user: EthereumAddress): string[];
411
+ decode(subData: string[]): {
412
+ collAsset: EthereumAddress;
413
+ collAssetId: number;
414
+ debtAsset: EthereumAddress;
415
+ debtAssetId: number;
416
+ closeType: CloseStrategyType;
417
+ marketAddr: EthereumAddress;
418
+ owner: EthereumAddress;
200
419
  };
201
420
  };
421
+ /**
422
+ ______ .______ ____ ____ __ __ _______. _______
423
+ / || _ \ \ \ / / | | | | / || \
424
+ | ,----'| |_) | \ \/ / | | | | | (----`| .--. |
425
+ | | | / \ / | | | | \ \ | | | |
426
+ | `----.| |\ \----. \ / | `--' | .----) | | '--' |
427
+ \______|| _| `._____| \__/ \______/ |_______/ |_______/
428
+ */
202
429
  export declare const crvUSDLeverageManagementSubData: {
203
430
  encode: (controllerAddr: EthereumAddress, ratioState: RatioState, targetRatio: number, collTokenAddr: EthereumAddress, crvUSDAddr: EthereumAddress) => string[];
204
431
  decode: (subData: string[]) => {
@@ -215,6 +442,14 @@ export declare const crvUSDPaybackSubData: {
215
442
  paybackAmount: string;
216
443
  };
217
444
  };
445
+ /**
446
+ .___ ___. ______ .______ .______ __ __ ______
447
+ | \/ | / __ \ | _ \ | _ \ | | | | / __ \
448
+ | \ / | | | | | | |_) | | |_) | | |__| | | | | |
449
+ | |\/| | | | | | | / | ___/ | __ | | | | |
450
+ | | | | | `--' | | |\ \----.| | | | | | | `--' |
451
+ |__| |__| \______/ | _| `._____|| _| |__| |__| \______/
452
+ */
218
453
  export declare const morphoBlueLeverageManagementSubData: {
219
454
  encode: (loanToken: EthereumAddress, collToken: EthereumAddress, oracle: EthereumAddress, irm: EthereumAddress, lltv: string, ratioState: RatioState, targetRatio: number, user: EthereumAddress, isEOA: boolean) => string[];
220
455
  decode: (subData: string[]) => {
@@ -227,48 +462,6 @@ export declare const morphoBlueLeverageManagementSubData: {
227
462
  targetRatio: number;
228
463
  };
229
464
  };
230
- export declare const aaveV3LeverageManagementOnPriceSubData: {
231
- encode(collAsset: EthereumAddress, collAssetId: number, debtAsset: EthereumAddress, debtAssetId: number, marketAddr: EthereumAddress, targetRatio: number): string[];
232
- decode(subData: string[]): {
233
- collAsset: EthereumAddress;
234
- collAssetId: number;
235
- debtAsset: EthereumAddress;
236
- debtAssetId: number;
237
- marketAddr: EthereumAddress;
238
- targetRatio: number;
239
- };
240
- };
241
- export declare const liquityV2LeverageManagementSubData: {
242
- encode: (market: EthereumAddress, troveId: string, collToken: EthereumAddress, boldToken: EthereumAddress, ratioState: RatioState, targetRatio: number) => string[];
243
- decode: (subData: string[]) => {
244
- market: string;
245
- troveId: string;
246
- collToken: string;
247
- boldToken: string;
248
- ratioState: RatioState;
249
- targetRatio: number;
250
- };
251
- };
252
- export declare const liquityV2CloseSubData: {
253
- encode(market: EthereumAddress, troveId: string, collToken: EthereumAddress, boldToken: EthereumAddress, closeType: CloseStrategyType): string[];
254
- decode(subData: string[]): {
255
- market: EthereumAddress;
256
- troveId: string;
257
- collToken: EthereumAddress;
258
- boldToken: EthereumAddress;
259
- closeType: CloseStrategyType;
260
- };
261
- };
262
- export declare const liquityV2LeverageManagementOnPriceSubData: {
263
- encode(market: EthereumAddress, troveId: string, collToken: EthereumAddress, boldToken: EthereumAddress, targetRatio: number, isRepayOnPrice: boolean): string[];
264
- decode(subData: string[]): {
265
- market: EthereumAddress;
266
- troveId: string;
267
- collToken: EthereumAddress;
268
- boldToken: EthereumAddress;
269
- targetRatio: number;
270
- };
271
- };
272
465
  export declare const morphoBlueLeverageManagementOnPriceSubData: {
273
466
  encode(loanToken: EthereumAddress, collToken: EthereumAddress, oracle: EthereumAddress, irm: EthereumAddress, lltv: string, targetRatio: number, user: EthereumAddress): string[];
274
467
  decode(subData: string[]): {
@@ -281,58 +474,6 @@ export declare const morphoBlueLeverageManagementOnPriceSubData: {
281
474
  user: string;
282
475
  };
283
476
  };
284
- export declare const liquityV2PaybackSubData: {
285
- encode: (market: EthereumAddress, troveId: string, boldToken: EthereumAddress, targetRatio: number, ratioState: RatioState) => string[];
286
- decode: (subData: string[]) => {
287
- market: string;
288
- troveId: string;
289
- boldToken: string;
290
- ratioState: RatioState;
291
- targetRatio: number;
292
- };
293
- };
294
- export declare const fluidLeverageManagementSubData: {
295
- encode: (nftId: string, vault: EthereumAddress, ratioState: RatioState, targetRatio: number) => string[];
296
- decode: (subData: string[]) => {
297
- nftId: string;
298
- vault: string;
299
- ratioState: RatioState;
300
- targetRatio: number;
301
- };
302
- };
303
- export declare const compoundV3LeverageManagementOnPriceSubData: {
304
- encode(market: EthereumAddress, collToken: EthereumAddress, baseToken: EthereumAddress, targetRatio: number, ratioState: RatioState, user: EthereumAddress): string[];
305
- decode(subData: string[]): {
306
- market: EthereumAddress;
307
- collToken: EthereumAddress;
308
- baseToken: EthereumAddress;
309
- targetRatio: number;
310
- ratioState: RatioState;
311
- owner: EthereumAddress;
312
- };
313
- };
314
- export declare const compoundV3CloseSubData: {
315
- encode(market: EthereumAddress, collToken: EthereumAddress, baseToken: EthereumAddress, closeType: CloseStrategyType, user: EthereumAddress): string[];
316
- decode(subData: string[]): {
317
- market: EthereumAddress;
318
- collToken: EthereumAddress;
319
- baseToken: EthereumAddress;
320
- closeType: CloseStrategyType;
321
- owner: EthereumAddress;
322
- };
323
- };
324
- export declare const sparkCloseGenericSubData: {
325
- encode(collAsset: EthereumAddress, collAssetId: number, debtAsset: EthereumAddress, debtAssetId: number, closeType: CloseStrategyType, marketAddr: EthereumAddress, user: EthereumAddress): string[];
326
- decode(subData: string[]): {
327
- collAsset: EthereumAddress;
328
- collAssetId: number;
329
- debtAsset: EthereumAddress;
330
- debtAssetId: number;
331
- closeType: CloseStrategyType;
332
- marketAddr: EthereumAddress;
333
- owner: EthereumAddress;
334
- };
335
- };
336
477
  export declare const morphoBlueCloseOnPriceSubData: {
337
478
  encode(loanToken: EthereumAddress, collToken: EthereumAddress, oracle: EthereumAddress, irm: EthereumAddress, lltv: string, user: EthereumAddress, closeType: CloseStrategyType): string[];
338
479
  decode(subData: string[]): {
@@ -345,3 +486,20 @@ export declare const morphoBlueCloseOnPriceSubData: {
345
486
  closeType: CloseStrategyType;
346
487
  };
347
488
  };
489
+ /**
490
+ _______ __ __ __ __ _______
491
+ | ____|| | | | | | | | | \
492
+ | |__ | | | | | | | | | .--. |
493
+ | __| | | | | | | | | | | | |
494
+ | | | `----.| `--' | | | | '--' |
495
+ |__| |_______| \______/ |__| |_______/
496
+ */
497
+ export declare const fluidLeverageManagementSubData: {
498
+ encode: (nftId: string, vault: EthereumAddress, ratioState: RatioState, targetRatio: number) => string[];
499
+ decode: (subData: string[]) => {
500
+ nftId: string;
501
+ vault: string;
502
+ ratioState: RatioState;
503
+ targetRatio: number;
504
+ };
505
+ };