@defisaver/automation-sdk 3.3.11 → 3.3.12

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 +6 -0
  8. package/cjs/services/strategySubService.js +30 -1
  9. package/cjs/services/strategySubService.test.js +96 -0
  10. package/cjs/services/subDataService.d.ts +295 -137
  11. package/cjs/services/subDataService.js +639 -393
  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 +6 -0
  28. package/esm/services/strategySubService.js +29 -0
  29. package/esm/services/strategySubService.test.js +97 -1
  30. package/esm/services/subDataService.d.ts +295 -137
  31. package/esm/services/subDataService.js +639 -393
  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 +118 -0
  48. package/src/services/subDataService.test.ts +172 -0
  49. package/src/services/subDataService.ts +1031 -782
  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,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,37 @@ 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;
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;
188
419
  };
189
420
  };
190
- export declare const liquityDsrSupplySubData: {
191
- encode: (targetRatio: number) => string[];
192
- decode: (subData: string[]) => {
421
+ export declare const sparkLeverageManagementOnPriceSubData: {
422
+ encode(collAsset: EthereumAddress, collAssetId: number, debtAsset: EthereumAddress, debtAssetId: number, marketAddr: EthereumAddress, targetRatio: number): string[];
423
+ decode(subData: string[]): {
424
+ collAsset: EthereumAddress;
425
+ collAssetId: number;
426
+ debtAsset: EthereumAddress;
427
+ debtAssetId: number;
428
+ marketAddr: EthereumAddress;
193
429
  targetRatio: number;
194
430
  };
195
431
  };
196
- export declare const liquityDebtInFrontRepaySubData: {
197
- encode: (targetRatioIncrease: number) => string[];
198
- decode: (subData: string[]) => {
199
- targetRatioIncrease: number;
200
- };
201
- };
432
+ /**
433
+ ______ .______ ____ ____ __ __ _______. _______
434
+ / || _ \ \ \ / / | | | | / || \
435
+ | ,----'| |_) | \ \/ / | | | | | (----`| .--. |
436
+ | | | / \ / | | | | \ \ | | | |
437
+ | `----.| |\ \----. \ / | `--' | .----) | | '--' |
438
+ \______|| _| `._____| \__/ \______/ |_______/ |_______/
439
+ */
202
440
  export declare const crvUSDLeverageManagementSubData: {
203
441
  encode: (controllerAddr: EthereumAddress, ratioState: RatioState, targetRatio: number, collTokenAddr: EthereumAddress, crvUSDAddr: EthereumAddress) => string[];
204
442
  decode: (subData: string[]) => {
@@ -215,6 +453,14 @@ export declare const crvUSDPaybackSubData: {
215
453
  paybackAmount: string;
216
454
  };
217
455
  };
456
+ /**
457
+ .___ ___. ______ .______ .______ __ __ ______
458
+ | \/ | / __ \ | _ \ | _ \ | | | | / __ \
459
+ | \ / | | | | | | |_) | | |_) | | |__| | | | | |
460
+ | |\/| | | | | | | / | ___/ | __ | | | | |
461
+ | | | | | `--' | | |\ \----.| | | | | | | `--' |
462
+ |__| |__| \______/ | _| `._____|| _| |__| |__| \______/
463
+ */
218
464
  export declare const morphoBlueLeverageManagementSubData: {
219
465
  encode: (loanToken: EthereumAddress, collToken: EthereumAddress, oracle: EthereumAddress, irm: EthereumAddress, lltv: string, ratioState: RatioState, targetRatio: number, user: EthereumAddress, isEOA: boolean) => string[];
220
466
  decode: (subData: string[]) => {
@@ -227,48 +473,6 @@ export declare const morphoBlueLeverageManagementSubData: {
227
473
  targetRatio: number;
228
474
  };
229
475
  };
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
476
  export declare const morphoBlueLeverageManagementOnPriceSubData: {
273
477
  encode(loanToken: EthereumAddress, collToken: EthereumAddress, oracle: EthereumAddress, irm: EthereumAddress, lltv: string, targetRatio: number, user: EthereumAddress): string[];
274
478
  decode(subData: string[]): {
@@ -281,58 +485,6 @@ export declare const morphoBlueLeverageManagementOnPriceSubData: {
281
485
  user: string;
282
486
  };
283
487
  };
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
488
  export declare const morphoBlueCloseOnPriceSubData: {
337
489
  encode(loanToken: EthereumAddress, collToken: EthereumAddress, oracle: EthereumAddress, irm: EthereumAddress, lltv: string, user: EthereumAddress, closeType: CloseStrategyType): string[];
338
490
  decode(subData: string[]): {
@@ -345,14 +497,20 @@ export declare const morphoBlueCloseOnPriceSubData: {
345
497
  closeType: CloseStrategyType;
346
498
  };
347
499
  };
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;
500
+ /**
501
+ _______ __ __ __ __ _______
502
+ | ____|| | | | | | | | | \
503
+ | |__ | | | | | | | | | .--. |
504
+ | __| | | | | | | | | | | | |
505
+ | | | `----.| `--' | | | | '--' |
506
+ |__| |_______| \______/ |__| |_______/
507
+ */
508
+ export declare const fluidLeverageManagementSubData: {
509
+ encode: (nftId: string, vault: EthereumAddress, ratioState: RatioState, targetRatio: number) => string[];
510
+ decode: (subData: string[]) => {
511
+ nftId: string;
512
+ vault: string;
513
+ ratioState: RatioState;
356
514
  targetRatio: number;
357
515
  };
358
516
  };