@defisaver/automation-sdk 3.3.11 → 3.3.12-strategies-refactor-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 (54) hide show
  1. package/cjs/automation/private/StrategiesAutomation.d.ts +2 -0
  2. package/cjs/automation/private/StrategiesAutomation.js +10 -1
  3. package/cjs/automation/private/StrategiesAutomation.test.js +25 -0
  4. package/cjs/constants/index.d.ts +1 -0
  5. package/cjs/constants/index.js +62 -1
  6. package/cjs/services/strategiesService.js +104 -0
  7. package/cjs/services/strategySubService.d.ts +11 -0
  8. package/cjs/services/strategySubService.js +61 -1
  9. package/cjs/services/strategySubService.test.js +96 -0
  10. package/cjs/services/subDataService.d.ts +333 -137
  11. package/cjs/services/subDataService.js +853 -537
  12. package/cjs/services/subDataService.test.js +157 -0
  13. package/cjs/services/triggerService.d.ts +29 -0
  14. package/cjs/services/triggerService.js +53 -1
  15. package/cjs/services/triggerService.test.js +84 -0
  16. package/cjs/services/utils.d.ts +1 -1
  17. package/cjs/services/utils.js +10 -2
  18. package/cjs/types/enums.d.ts +17 -3
  19. package/cjs/types/enums.js +14 -0
  20. package/cjs/types/index.d.ts +22 -1
  21. package/esm/automation/private/StrategiesAutomation.d.ts +2 -0
  22. package/esm/automation/private/StrategiesAutomation.js +10 -1
  23. package/esm/automation/private/StrategiesAutomation.test.js +25 -0
  24. package/esm/constants/index.d.ts +1 -0
  25. package/esm/constants/index.js +61 -0
  26. package/esm/services/strategiesService.js +105 -1
  27. package/esm/services/strategySubService.d.ts +11 -0
  28. package/esm/services/strategySubService.js +60 -0
  29. package/esm/services/strategySubService.test.js +97 -1
  30. package/esm/services/subDataService.d.ts +333 -137
  31. package/esm/services/subDataService.js +852 -537
  32. package/esm/services/subDataService.test.js +157 -0
  33. package/esm/services/triggerService.d.ts +29 -0
  34. package/esm/services/triggerService.js +52 -0
  35. package/esm/services/triggerService.test.js +85 -1
  36. package/esm/services/utils.d.ts +1 -1
  37. package/esm/services/utils.js +10 -2
  38. package/esm/types/enums.d.ts +17 -3
  39. package/esm/types/enums.js +14 -0
  40. package/esm/types/index.d.ts +22 -1
  41. package/package.json +2 -2
  42. package/src/automation/private/StrategiesAutomation.test.ts +40 -0
  43. package/src/automation/private/StrategiesAutomation.ts +11 -0
  44. package/src/constants/index.ts +62 -0
  45. package/src/services/strategiesService.ts +119 -1
  46. package/src/services/strategySubService.test.ts +124 -0
  47. package/src/services/strategySubService.ts +196 -0
  48. package/src/services/subDataService.test.ts +172 -0
  49. package/src/services/subDataService.ts +1100 -764
  50. package/src/services/triggerService.test.ts +97 -0
  51. package/src/services/triggerService.ts +74 -1
  52. package/src/services/utils.ts +15 -4
  53. package/src/types/enums.ts +14 -0
  54. package/src/types/index.ts +26 -0
@@ -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,11 +71,31 @@ 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;
42
90
  };
43
91
  };
92
+ export declare const liquityLeverageManagementSubDataWithoutSubProxy: {
93
+ encode(targetRatio: number, ratioState: RatioState): string[];
94
+ decode(subData: string[]): {
95
+ targetRatio: number;
96
+ ratioState: RatioState;
97
+ };
98
+ };
44
99
  export declare const liquityCloseSubData: {
45
100
  encode(closeToAssetAddr: EthereumAddress, chainId?: ChainId, collAddr?: EthereumAddress, debtAddr?: EthereumAddress): string[];
46
101
  decode(subData: string[]): {
@@ -48,12 +103,102 @@ export declare const liquityCloseSubData: {
48
103
  debtAddr: string;
49
104
  };
50
105
  };
106
+ export declare const liquityDsrPaybackSubData: {
107
+ encode: (targetRatio: number) => string[];
108
+ decode: (subData: string[]) => {
109
+ targetRatio: number;
110
+ };
111
+ };
112
+ export declare const liquityDsrSupplySubData: {
113
+ encode: (targetRatio: number) => string[];
114
+ decode: (subData: string[]) => {
115
+ targetRatio: number;
116
+ };
117
+ };
118
+ export declare const liquityDebtInFrontRepaySubData: {
119
+ encode: (targetRatioIncrease: number) => string[];
120
+ decode: (subData: string[]) => {
121
+ targetRatioIncrease: number;
122
+ };
123
+ };
124
+ /**
125
+ * __ __ ______ __ __ __ .___________.____ ____ ____ ____ ___
126
+ | | | | / __ \ | | | | | | | |\ \ / / \ \ / / |__ \
127
+ | | | | | | | | | | | | | | `---| |----` \ \/ / \ \/ / ) |
128
+ | | | | | | | | | | | | | | | | \_ _/ \ / / /
129
+ | `----.| | | `--' '--.| `--' | | | | | | | \ / / /_
130
+ |_______||__| \_____\_____\\______/ |__| |__| |__| \__/ |____|
131
+ */
132
+ export declare const liquityV2LeverageManagementSubData: {
133
+ encode: (market: EthereumAddress, troveId: string, collToken: EthereumAddress, boldToken: EthereumAddress, ratioState: RatioState, targetRatio: number) => string[];
134
+ decode: (subData: string[]) => {
135
+ market: string;
136
+ troveId: string;
137
+ collToken: string;
138
+ boldToken: string;
139
+ ratioState: RatioState;
140
+ targetRatio: number;
141
+ };
142
+ };
143
+ export declare const liquityV2CloseSubData: {
144
+ encode(market: EthereumAddress, troveId: string, collToken: EthereumAddress, boldToken: EthereumAddress, closeType: CloseStrategyType): string[];
145
+ decode(subData: string[]): {
146
+ market: EthereumAddress;
147
+ troveId: string;
148
+ collToken: EthereumAddress;
149
+ boldToken: EthereumAddress;
150
+ closeType: CloseStrategyType;
151
+ };
152
+ };
153
+ export declare const liquityV2LeverageManagementOnPriceSubData: {
154
+ encode(market: EthereumAddress, troveId: string, collToken: EthereumAddress, boldToken: EthereumAddress, targetRatio: number, isRepayOnPrice: boolean): string[];
155
+ decode(subData: string[]): {
156
+ market: EthereumAddress;
157
+ troveId: string;
158
+ collToken: EthereumAddress;
159
+ boldToken: EthereumAddress;
160
+ targetRatio: number;
161
+ };
162
+ };
163
+ export declare const liquityV2PaybackSubData: {
164
+ encode: (market: EthereumAddress, troveId: string, boldToken: EthereumAddress, targetRatio: number, ratioState: RatioState) => string[];
165
+ decode: (subData: string[]) => {
166
+ market: string;
167
+ troveId: string;
168
+ boldToken: string;
169
+ ratioState: RatioState;
170
+ targetRatio: number;
171
+ };
172
+ };
173
+ /**
174
+ ___ ___ ____ ____ _______ ____ ____ ___
175
+ / \ / \ \ \ / / | ____| \ \ / / |__ \
176
+ / ^ \ / ^ \ \ \/ / | |__ \ \/ / ) |
177
+ / /_\ \ / /_\ \ \ / | __| \ / / /
178
+ / _____ \ / _____ \ \ / | |____ \ / / /_
179
+ /__/ \__\ /__/ \__\ \__/ |_______| \__/ |____|
180
+ */
51
181
  export declare const aaveV2LeverageManagementSubData: {
52
182
  encode(triggerRepayRatio: number, triggerBoostRatio: number, targetBoostRatio: number, targetRepayRatio: number, boostEnabled: boolean): string[];
53
183
  decode(subData: string[]): {
54
184
  targetRatio: number;
55
185
  };
56
186
  };
187
+ export declare const aaveV2LeverageManagementSubDataWithoutSubProxy: {
188
+ encode(targetRatio: number, ratioState: RatioState): string[];
189
+ decode(subData: string[]): {
190
+ targetRatio: number;
191
+ ratioState: RatioState;
192
+ };
193
+ };
194
+ /**
195
+ ___ ___ ____ ____ _______ ____ ____ ____
196
+ / \ / \ \ \ / / | ____| \ \ / / |___ \
197
+ / ^ \ / ^ \ \ \/ / | |__ \ \/ / __) |
198
+ / /_\ \ / /_\ \ \ / | __| \ / |__ <
199
+ / _____ \ / _____ \ \ / | |____ \ / ___) |
200
+ /__/ \__\ /__/ \__\ \__/ |_______| \__/ |____/
201
+ */
57
202
  export declare const aaveV3LeverageManagementSubData: {
58
203
  decode(subData: string[]): {
59
204
  targetRatio: number;
@@ -110,48 +255,150 @@ export declare const aaveV3QuotePriceSubData: {
110
255
  debtAssetId: number;
111
256
  };
112
257
  };
258
+ export declare const aaveV3LeverageManagementOnPriceSubData: {
259
+ encode(collAsset: EthereumAddress, collAssetId: number, debtAsset: EthereumAddress, debtAssetId: number, marketAddr: EthereumAddress, targetRatio: number): string[];
260
+ decode(subData: string[]): {
261
+ collAsset: EthereumAddress;
262
+ collAssetId: number;
263
+ debtAsset: EthereumAddress;
264
+ debtAssetId: number;
265
+ marketAddr: EthereumAddress;
266
+ targetRatio: number;
267
+ };
268
+ };
269
+ /**
270
+ * ___ ___ ____ ____ _______ ____ ____ _ _
271
+ / \ / \ \ \ / / | ____| \ \ / / | || |
272
+ / ^ \ / ^ \ \ \/ / | |__ \ \/ / | || |_
273
+ / /_\ \ / /_\ \ \ / | __| \ / |__ _|
274
+ / _____ \ / _____ \ \ / | |____ \ / | |
275
+ /__/ \__\ /__/ \__\ \__/ |_______| \__/ |_|
276
+ */
277
+ export declare const aaveV4LeverageManagementSubData: {
278
+ encode: (spoke: EthereumAddress, owner: EthereumAddress, ratioState: RatioState, targetRatio: number) => string[];
279
+ decode: (subData: string[]) => {
280
+ spoke: string;
281
+ owner: string;
282
+ ratioState: RatioState;
283
+ targetRatio: number;
284
+ };
285
+ };
286
+ export declare const aaveV4LeverageManagementOnPriceSubData: {
287
+ encode: (spoke: EthereumAddress, owner: EthereumAddress, collAsset: EthereumAddress, collAssetId: number, debtAsset: EthereumAddress, debtAssetId: number, ratioState: RatioState, targetRatio: number) => string[];
288
+ decode: (subData: string[]) => {
289
+ spoke: string;
290
+ owner: string;
291
+ collAsset: string;
292
+ collAssetId: number;
293
+ debtAsset: string;
294
+ debtAssetId: number;
295
+ ratioState: RatioState;
296
+ targetRatio: number;
297
+ };
298
+ };
299
+ export declare const aaveV4CloseSubData: {
300
+ encode: (spoke: EthereumAddress, owner: EthereumAddress, collAsset: EthereumAddress, collAssetId: number, debtAsset: EthereumAddress, debtAssetId: number, closeType: CloseStrategyType) => string[];
301
+ decode: (subData: string[]) => {
302
+ spoke: string;
303
+ owner: string;
304
+ collAsset: string;
305
+ collAssetId: number;
306
+ debtAsset: string;
307
+ debtAssetId: number;
308
+ closeType: CloseStrategyType;
309
+ };
310
+ };
311
+ export declare const aaveV4CollateralSwitchSubData: {
312
+ encode: (spoke: EthereumAddress, owner: EthereumAddress, fromAsset: EthereumAddress, fromAssetId: number, toAsset: EthereumAddress, toAssetId: number, amountToSwitch: string) => string[];
313
+ decode: (subData: string[]) => {
314
+ spoke: string;
315
+ owner: string;
316
+ fromAsset: string;
317
+ fromAssetId: number;
318
+ toAsset: string;
319
+ toAssetId: number;
320
+ amountToSwitch: string;
321
+ };
322
+ };
323
+ /**
324
+ ______ ______ .___ ___. .______ ____ ____ ___
325
+ / | / __ \ | \/ | | _ \ \ \ / / |__ \
326
+ | ,----'| | | | | \ / | | |_) | \ \/ / ) |
327
+ | | | | | | | |\/| | | ___/ \ / / /
328
+ | `----.| `--' | | | | | | | \ / / /_
329
+ \______| \______/ |__| |__| | _| \__/ |____|
330
+ */
113
331
  export declare const compoundV2LeverageManagementSubData: {
114
332
  encode(triggerRepayRatio: number, triggerBoostRatio: number, targetBoostRatio: number, targetRepayRatio: number, boostEnabled: boolean): string[];
115
333
  decode(subData: string[]): {
116
334
  targetRatio: number;
117
335
  };
118
336
  };
337
+ export declare const compoundV2LeverageManagementSubDataWithoutSubProxy: {
338
+ encode(targetRatio: number, ratioState: RatioState): string[];
339
+ decode(subData: string[]): {
340
+ targetRatio: number;
341
+ ratioState: RatioState;
342
+ };
343
+ };
344
+ /**
345
+ ______ ______ .___ ___. .______ ____ ____ ____
346
+ / | / __ \ | \/ | | _ \ \ \ / / |___ \
347
+ | ,----'| | | | | \ / | | |_) | \ \/ / __) |
348
+ | | | | | | | |\/| | | ___/ \ / |__ <
349
+ | `----.| `--' | | | | | | | \ / ___) |
350
+ \______| \______/ |__| |__| | _| \__/ |____/
351
+ */
119
352
  export declare const compoundV3LeverageManagementSubData: {
120
353
  encode(market: EthereumAddress, baseToken: EthereumAddress, triggerRepayRatio: number, triggerBoostRatio: number, targetBoostRatio: number, targetRepayRatio: number, boostEnabled: boolean, isEOA: boolean): string[];
121
354
  decode(subData: string[]): {
122
355
  targetRatio: number;
123
356
  };
124
357
  };
125
- export declare const compoundV3L2LeverageManagementSubData: {
126
- encode(market: EthereumAddress, baseToken: EthereumAddress, triggerRepayRatio: number, triggerBoostRatio: number, targetBoostRatio: number, targetRepayRatio: number, boostEnabled: boolean, isEOA: boolean): string;
358
+ export declare const compoundV3LeverageManagementSubDataWithoutSubProxy: {
359
+ encode(market: EthereumAddress, baseToken: EthereumAddress, targetRatio: number, ratioState: RatioState): string[];
127
360
  decode(subData: string[]): {
361
+ market: EthereumAddress;
362
+ baseToken: EthereumAddress;
128
363
  targetRatio: number;
364
+ ratioState: RatioState;
129
365
  };
130
366
  };
131
- export declare const morphoAaveV2LeverageManagementSubData: {
132
- encode(triggerRepayRatio: number, triggerBoostRatio: number, targetBoostRatio: number, targetRepayRatio: number, boostEnabled: boolean): string[];
367
+ export declare const compoundV3L2LeverageManagementSubData: {
368
+ encode(market: EthereumAddress, baseToken: EthereumAddress, triggerRepayRatio: number, triggerBoostRatio: number, targetBoostRatio: number, targetRepayRatio: number, boostEnabled: boolean, isEOA: boolean): string;
133
369
  decode(subData: string[]): {
134
370
  targetRatio: number;
135
371
  };
136
372
  };
137
- export declare const cBondsRebondSubData: {
138
- encode(bondId: number | string): string[];
373
+ export declare const compoundV3LeverageManagementOnPriceSubData: {
374
+ encode(market: EthereumAddress, collToken: EthereumAddress, baseToken: EthereumAddress, targetRatio: number, ratioState: RatioState, user: EthereumAddress): string[];
139
375
  decode(subData: string[]): {
140
- bondId: string;
376
+ market: EthereumAddress;
377
+ collToken: EthereumAddress;
378
+ baseToken: EthereumAddress;
379
+ targetRatio: number;
380
+ ratioState: RatioState;
381
+ owner: EthereumAddress;
141
382
  };
142
383
  };
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;
384
+ export declare const compoundV3CloseSubData: {
385
+ encode(market: EthereumAddress, collToken: EthereumAddress, baseToken: EthereumAddress, closeType: CloseStrategyType, user: EthereumAddress): string[];
386
+ decode(subData: string[]): {
387
+ market: EthereumAddress;
388
+ collToken: EthereumAddress;
389
+ baseToken: EthereumAddress;
390
+ closeType: CloseStrategyType;
391
+ owner: EthereumAddress;
153
392
  };
154
393
  };
394
+ /**
395
+ __________ ___ ______ __ __ ___ .__ __. _______ _______
396
+ | ____\ \ / / / || | | | / \ | \ | | / _____|| ____|
397
+ | |__ \ V / | ,----'| |__| | / ^ \ | \| | | | __ | |__
398
+ | __| > < | | | __ | / /_\ \ | . ` | | | |_ | | __|
399
+ | |____ / . \ | `----.| | | | / _____ \ | |\ | | |__| | | |____
400
+ |_______/__/ \__\ \______||__| |__| /__/ \__\ |__| \__| \______| |_______|
401
+ */
155
402
  export declare const exchangeDcaSubData: {
156
403
  encode: (fromToken: EthereumAddress, toToken: EthereumAddress, amount: string, interval: number) => string[];
157
404
  decode: (subData: string[], chainId: ChainId) => {
@@ -169,6 +416,22 @@ export declare const exchangeLimitOrderSubData: {
169
416
  amount: string;
170
417
  };
171
418
  };
419
+ export declare const exchangeLimitOrderSubDataWithoutSubProxy: {
420
+ encode(fromToken: EthereumAddress, toToken: EthereumAddress, amount: string): string[];
421
+ decode: (subData: string[], chainId: ChainId) => {
422
+ fromToken: string;
423
+ toToken: string;
424
+ amount: string;
425
+ };
426
+ };
427
+ /**
428
+ _______..______ ___ .______ __ ___
429
+ / || _ \ / \ | _ \ | |/ /
430
+ | (----`| |_) | / ^ \ | |_) | | ' /
431
+ \ \ | ___/ / /_\ \ | / | <
432
+ .----) | | | / _____ \ | |\ \----.| . \
433
+ |_______/ | _| /__/ \__\ | _| `._____||__|\__\
434
+ */
172
435
  export declare const sparkLeverageManagementSubData: {
173
436
  decode(subData: string[]): {
174
437
  targetRatio: number;
@@ -181,24 +444,37 @@ export declare const sparkLeverageManagementSubDataWithoutSubProxy: {
181
444
  ratioState: RatioState;
182
445
  };
183
446
  };
184
- export declare const liquityDsrPaybackSubData: {
185
- encode: (targetRatio: number) => string[];
186
- decode: (subData: string[]) => {
187
- targetRatio: number;
447
+ export declare const sparkCloseGenericSubData: {
448
+ encode(collAsset: EthereumAddress, collAssetId: number, debtAsset: EthereumAddress, debtAssetId: number, closeType: CloseStrategyType, marketAddr: EthereumAddress, user: EthereumAddress): string[];
449
+ decode(subData: string[]): {
450
+ collAsset: EthereumAddress;
451
+ collAssetId: number;
452
+ debtAsset: EthereumAddress;
453
+ debtAssetId: number;
454
+ closeType: CloseStrategyType;
455
+ marketAddr: EthereumAddress;
456
+ owner: EthereumAddress;
188
457
  };
189
458
  };
190
- export declare const liquityDsrSupplySubData: {
191
- encode: (targetRatio: number) => string[];
192
- decode: (subData: string[]) => {
459
+ export declare const sparkLeverageManagementOnPriceSubData: {
460
+ encode(collAsset: EthereumAddress, collAssetId: number, debtAsset: EthereumAddress, debtAssetId: number, marketAddr: EthereumAddress, targetRatio: number): string[];
461
+ decode(subData: string[]): {
462
+ collAsset: EthereumAddress;
463
+ collAssetId: number;
464
+ debtAsset: EthereumAddress;
465
+ debtAssetId: number;
466
+ marketAddr: EthereumAddress;
193
467
  targetRatio: number;
194
468
  };
195
469
  };
196
- export declare const liquityDebtInFrontRepaySubData: {
197
- encode: (targetRatioIncrease: number) => string[];
198
- decode: (subData: string[]) => {
199
- targetRatioIncrease: number;
200
- };
201
- };
470
+ /**
471
+ ______ .______ ____ ____ __ __ _______. _______
472
+ / || _ \ \ \ / / | | | | / || \
473
+ | ,----'| |_) | \ \/ / | | | | | (----`| .--. |
474
+ | | | / \ / | | | | \ \ | | | |
475
+ | `----.| |\ \----. \ / | `--' | .----) | | '--' |
476
+ \______|| _| `._____| \__/ \______/ |_______/ |_______/
477
+ */
202
478
  export declare const crvUSDLeverageManagementSubData: {
203
479
  encode: (controllerAddr: EthereumAddress, ratioState: RatioState, targetRatio: number, collTokenAddr: EthereumAddress, crvUSDAddr: EthereumAddress) => string[];
204
480
  decode: (subData: string[]) => {
@@ -215,6 +491,14 @@ export declare const crvUSDPaybackSubData: {
215
491
  paybackAmount: string;
216
492
  };
217
493
  };
494
+ /**
495
+ .___ ___. ______ .______ .______ __ __ ______
496
+ | \/ | / __ \ | _ \ | _ \ | | | | / __ \
497
+ | \ / | | | | | | |_) | | |_) | | |__| | | | | |
498
+ | |\/| | | | | | | / | ___/ | __ | | | | |
499
+ | | | | | `--' | | |\ \----.| | | | | | | `--' |
500
+ |__| |__| \______/ | _| `._____|| _| |__| |__| \______/
501
+ */
218
502
  export declare const morphoBlueLeverageManagementSubData: {
219
503
  encode: (loanToken: EthereumAddress, collToken: EthereumAddress, oracle: EthereumAddress, irm: EthereumAddress, lltv: string, ratioState: RatioState, targetRatio: number, user: EthereumAddress, isEOA: boolean) => string[];
220
504
  decode: (subData: string[]) => {
@@ -227,48 +511,6 @@ export declare const morphoBlueLeverageManagementSubData: {
227
511
  targetRatio: number;
228
512
  };
229
513
  };
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
514
  export declare const morphoBlueLeverageManagementOnPriceSubData: {
273
515
  encode(loanToken: EthereumAddress, collToken: EthereumAddress, oracle: EthereumAddress, irm: EthereumAddress, lltv: string, targetRatio: number, user: EthereumAddress): string[];
274
516
  decode(subData: string[]): {
@@ -281,58 +523,6 @@ export declare const morphoBlueLeverageManagementOnPriceSubData: {
281
523
  user: string;
282
524
  };
283
525
  };
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
526
  export declare const morphoBlueCloseOnPriceSubData: {
337
527
  encode(loanToken: EthereumAddress, collToken: EthereumAddress, oracle: EthereumAddress, irm: EthereumAddress, lltv: string, user: EthereumAddress, closeType: CloseStrategyType): string[];
338
528
  decode(subData: string[]): {
@@ -345,14 +535,20 @@ export declare const morphoBlueCloseOnPriceSubData: {
345
535
  closeType: CloseStrategyType;
346
536
  };
347
537
  };
348
- export declare const sparkLeverageManagementOnPriceSubData: {
349
- encode(collAsset: EthereumAddress, collAssetId: number, debtAsset: EthereumAddress, debtAssetId: number, marketAddr: EthereumAddress, targetRatio: number): string[];
350
- decode(subData: string[]): {
351
- collAsset: EthereumAddress;
352
- collAssetId: number;
353
- debtAsset: EthereumAddress;
354
- debtAssetId: number;
355
- marketAddr: EthereumAddress;
538
+ /**
539
+ _______ __ __ __ __ _______
540
+ | ____|| | | | | | | | | \
541
+ | |__ | | | | | | | | | .--. |
542
+ | __| | | | | | | | | | | | |
543
+ | | | `----.| `--' | | | | '--' |
544
+ |__| |_______| \______/ |__| |_______/
545
+ */
546
+ export declare const fluidLeverageManagementSubData: {
547
+ encode: (nftId: string, vault: EthereumAddress, ratioState: RatioState, targetRatio: number) => string[];
548
+ decode: (subData: string[]) => {
549
+ nftId: string;
550
+ vault: string;
551
+ ratioState: RatioState;
356
552
  targetRatio: number;
357
553
  };
358
554
  };