@defisaver/automation-sdk 3.1.9 → 3.1.14-spark-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 (245) hide show
  1. package/.babelrc +3 -3
  2. package/.editorconfig +9 -9
  3. package/.env.dev +4 -4
  4. package/.eslintignore +6 -6
  5. package/.eslintrc.js +39 -39
  6. package/.mocharc.json +4 -4
  7. package/.nvmrc +1 -1
  8. package/README.md +46 -46
  9. package/cjs/abis/Erc20.json +223 -223
  10. package/cjs/abis/SubStorage.json +21 -21
  11. package/cjs/abis/UniMulticall.json +17 -17
  12. package/cjs/abis/index.d.ts +9 -9
  13. package/cjs/abis/index.js +30 -30
  14. package/cjs/abis/legacy_AaveV2Subscriptions.json +8 -8
  15. package/cjs/abis/legacy_AuthCheck.json +8 -8
  16. package/cjs/abis/legacy_CompoundV2Subscriptions.json +9 -9
  17. package/cjs/abis/legacy_MakerSubscriptions.json +9 -9
  18. package/cjs/automation/private/Automation.d.ts +12 -12
  19. package/cjs/automation/private/Automation.js +42 -42
  20. package/cjs/automation/private/LegacyAutomation.d.ts +25 -25
  21. package/cjs/automation/private/LegacyAutomation.js +118 -118
  22. package/cjs/automation/private/LegacyProtocol.d.ts +22 -22
  23. package/cjs/automation/private/LegacyProtocol.js +41 -41
  24. package/cjs/automation/private/LegacyProtocol.test.d.ts +1 -1
  25. package/cjs/automation/private/LegacyProtocol.test.js +25 -25
  26. package/cjs/automation/private/Protocol.d.ts +22 -22
  27. package/cjs/automation/private/Protocol.js +41 -41
  28. package/cjs/automation/private/Protocol.test.d.ts +1 -1
  29. package/cjs/automation/private/Protocol.test.js +25 -25
  30. package/cjs/automation/private/StrategiesAutomation.d.ts +35 -33
  31. package/cjs/automation/private/StrategiesAutomation.js +198 -181
  32. package/cjs/automation/private/StrategiesAutomation.test.d.ts +1 -1
  33. package/cjs/automation/private/StrategiesAutomation.test.js +696 -671
  34. package/cjs/automation/public/ArbitrumStrategies.d.ts +5 -5
  35. package/cjs/automation/public/ArbitrumStrategies.js +13 -13
  36. package/cjs/automation/public/BaseStrategies.d.ts +5 -5
  37. package/cjs/automation/public/BaseStrategies.js +13 -13
  38. package/cjs/automation/public/EthereumStrategies.d.ts +5 -5
  39. package/cjs/automation/public/EthereumStrategies.js +13 -13
  40. package/cjs/automation/public/OptimismStrategies.d.ts +5 -5
  41. package/cjs/automation/public/OptimismStrategies.js +13 -13
  42. package/cjs/automation/public/Strategies.test.d.ts +1 -1
  43. package/cjs/automation/public/Strategies.test.js +61 -61
  44. package/cjs/automation/public/legacy/LegacyAaveAutomation.d.ts +6 -6
  45. package/cjs/automation/public/legacy/LegacyAaveAutomation.js +20 -20
  46. package/cjs/automation/public/legacy/LegacyCompoundAutomation.d.ts +6 -6
  47. package/cjs/automation/public/legacy/LegacyCompoundAutomation.js +20 -20
  48. package/cjs/automation/public/legacy/LegacyMakerAutomation.d.ts +6 -6
  49. package/cjs/automation/public/legacy/LegacyMakerAutomation.js +20 -20
  50. package/cjs/configuration.d.ts +1 -1
  51. package/cjs/configuration.js +12 -12
  52. package/cjs/constants/index.d.ts +29 -28
  53. package/cjs/constants/index.js +905 -534
  54. package/cjs/index.d.ts +24 -23
  55. package/cjs/index.js +65 -65
  56. package/cjs/services/contractService.d.ts +12 -12
  57. package/cjs/services/contractService.js +54 -54
  58. package/cjs/services/ethereumService.d.ts +7 -7
  59. package/cjs/services/ethereumService.js +56 -49
  60. package/cjs/services/ethereumService.test.d.ts +1 -1
  61. package/cjs/services/ethereumService.test.js +245 -242
  62. package/cjs/services/strategiesService.d.ts +2 -2
  63. package/cjs/services/strategiesService.js +1173 -861
  64. package/cjs/services/strategiesService.test.d.ts +1 -1
  65. package/cjs/services/strategiesService.test.js +111 -110
  66. package/cjs/services/strategySubService.d.ts +129 -107
  67. package/cjs/services/strategySubService.js +414 -300
  68. package/cjs/services/strategySubService.test.d.ts +1 -1
  69. package/cjs/services/strategySubService.test.js +1812 -936
  70. package/cjs/services/subDataService.d.ts +527 -245
  71. package/cjs/services/subDataService.js +1219 -636
  72. package/cjs/services/subDataService.test.d.ts +1 -1
  73. package/cjs/services/subDataService.test.js +2427 -1282
  74. package/cjs/services/triggerService.d.ts +325 -226
  75. package/cjs/services/triggerService.js +616 -433
  76. package/cjs/services/triggerService.test.d.ts +1 -1
  77. package/cjs/services/triggerService.test.js +1317 -926
  78. package/cjs/services/utils.d.ts +30 -30
  79. package/cjs/services/utils.js +190 -182
  80. package/cjs/services/utils.test.d.ts +1 -1
  81. package/cjs/services/utils.test.js +299 -376
  82. package/cjs/types/contracts/generated/Erc20.d.ts +53 -53
  83. package/cjs/types/contracts/generated/Erc20.js +5 -5
  84. package/cjs/types/contracts/generated/Legacy_AaveV2Subscriptions.d.ts +129 -129
  85. package/cjs/types/contracts/generated/Legacy_AaveV2Subscriptions.js +5 -5
  86. package/cjs/types/contracts/generated/Legacy_AuthCheck.d.ts +20 -20
  87. package/cjs/types/contracts/generated/Legacy_AuthCheck.js +5 -5
  88. package/cjs/types/contracts/generated/Legacy_CompoundV2Subscriptions.d.ts +128 -128
  89. package/cjs/types/contracts/generated/Legacy_CompoundV2Subscriptions.js +5 -5
  90. package/cjs/types/contracts/generated/Legacy_MakerSubscriptions.d.ts +246 -246
  91. package/cjs/types/contracts/generated/Legacy_MakerSubscriptions.js +5 -5
  92. package/cjs/types/contracts/generated/SubStorage.d.ts +114 -114
  93. package/cjs/types/contracts/generated/SubStorage.js +5 -5
  94. package/cjs/types/contracts/generated/UniMulticall.d.ts +55 -55
  95. package/cjs/types/contracts/generated/UniMulticall.js +5 -5
  96. package/cjs/types/contracts/generated/index.d.ts +7 -7
  97. package/cjs/types/contracts/generated/index.js +2 -2
  98. package/cjs/types/contracts/generated/types.d.ts +54 -54
  99. package/cjs/types/contracts/generated/types.js +2 -2
  100. package/cjs/types/enums.d.ts +302 -219
  101. package/cjs/types/enums.js +328 -245
  102. package/cjs/types/index.d.ts +306 -248
  103. package/cjs/types/index.js +2 -2
  104. package/esm/abis/Erc20.json +223 -223
  105. package/esm/abis/SubStorage.json +21 -21
  106. package/esm/abis/UniMulticall.json +17 -17
  107. package/esm/abis/index.d.ts +9 -9
  108. package/esm/abis/index.js +18 -18
  109. package/esm/abis/legacy_AaveV2Subscriptions.json +8 -8
  110. package/esm/abis/legacy_AuthCheck.json +8 -8
  111. package/esm/abis/legacy_CompoundV2Subscriptions.json +9 -9
  112. package/esm/abis/legacy_MakerSubscriptions.json +9 -9
  113. package/esm/automation/private/Automation.d.ts +12 -12
  114. package/esm/automation/private/Automation.js +39 -39
  115. package/esm/automation/private/LegacyAutomation.d.ts +25 -25
  116. package/esm/automation/private/LegacyAutomation.js +112 -112
  117. package/esm/automation/private/LegacyProtocol.d.ts +22 -22
  118. package/esm/automation/private/LegacyProtocol.js +38 -38
  119. package/esm/automation/private/LegacyProtocol.test.d.ts +1 -1
  120. package/esm/automation/private/LegacyProtocol.test.js +20 -20
  121. package/esm/automation/private/Protocol.d.ts +22 -22
  122. package/esm/automation/private/Protocol.js +38 -38
  123. package/esm/automation/private/Protocol.test.d.ts +1 -1
  124. package/esm/automation/private/Protocol.test.js +20 -20
  125. package/esm/automation/private/StrategiesAutomation.d.ts +35 -33
  126. package/esm/automation/private/StrategiesAutomation.js +192 -175
  127. package/esm/automation/private/StrategiesAutomation.test.d.ts +1 -1
  128. package/esm/automation/private/StrategiesAutomation.test.js +691 -666
  129. package/esm/automation/public/ArbitrumStrategies.d.ts +5 -5
  130. package/esm/automation/public/ArbitrumStrategies.js +7 -7
  131. package/esm/automation/public/BaseStrategies.d.ts +5 -5
  132. package/esm/automation/public/BaseStrategies.js +7 -7
  133. package/esm/automation/public/EthereumStrategies.d.ts +5 -5
  134. package/esm/automation/public/EthereumStrategies.js +7 -7
  135. package/esm/automation/public/OptimismStrategies.d.ts +5 -5
  136. package/esm/automation/public/OptimismStrategies.js +7 -7
  137. package/esm/automation/public/Strategies.test.d.ts +1 -1
  138. package/esm/automation/public/Strategies.test.js +56 -56
  139. package/esm/automation/public/legacy/LegacyAaveAutomation.d.ts +6 -6
  140. package/esm/automation/public/legacy/LegacyAaveAutomation.js +14 -14
  141. package/esm/automation/public/legacy/LegacyCompoundAutomation.d.ts +6 -6
  142. package/esm/automation/public/legacy/LegacyCompoundAutomation.js +14 -14
  143. package/esm/automation/public/legacy/LegacyMakerAutomation.d.ts +6 -6
  144. package/esm/automation/public/legacy/LegacyMakerAutomation.js +14 -14
  145. package/esm/configuration.d.ts +1 -1
  146. package/esm/configuration.js +7 -7
  147. package/esm/constants/index.d.ts +29 -28
  148. package/esm/constants/index.js +899 -528
  149. package/esm/index.d.ts +24 -23
  150. package/esm/index.js +23 -23
  151. package/esm/services/contractService.d.ts +12 -12
  152. package/esm/services/contractService.js +45 -45
  153. package/esm/services/ethereumService.d.ts +7 -7
  154. package/esm/services/ethereumService.js +48 -41
  155. package/esm/services/ethereumService.test.d.ts +1 -1
  156. package/esm/services/ethereumService.test.js +240 -237
  157. package/esm/services/strategiesService.d.ts +2 -2
  158. package/esm/services/strategiesService.js +1143 -831
  159. package/esm/services/strategiesService.test.d.ts +1 -1
  160. package/esm/services/strategiesService.test.js +109 -108
  161. package/esm/services/strategySubService.d.ts +129 -107
  162. package/esm/services/strategySubService.js +385 -271
  163. package/esm/services/strategySubService.test.d.ts +1 -1
  164. package/esm/services/strategySubService.test.js +1784 -908
  165. package/esm/services/subDataService.d.ts +527 -245
  166. package/esm/services/subDataService.js +1213 -630
  167. package/esm/services/subDataService.test.d.ts +1 -1
  168. package/esm/services/subDataService.test.js +2399 -1254
  169. package/esm/services/triggerService.d.ts +325 -226
  170. package/esm/services/triggerService.js +587 -404
  171. package/esm/services/triggerService.test.d.ts +1 -1
  172. package/esm/services/triggerService.test.js +1292 -901
  173. package/esm/services/utils.d.ts +30 -30
  174. package/esm/services/utils.js +139 -131
  175. package/esm/services/utils.test.d.ts +1 -1
  176. package/esm/services/utils.test.js +297 -348
  177. package/esm/types/contracts/generated/Erc20.d.ts +53 -53
  178. package/esm/types/contracts/generated/Erc20.js +4 -4
  179. package/esm/types/contracts/generated/Legacy_AaveV2Subscriptions.d.ts +129 -129
  180. package/esm/types/contracts/generated/Legacy_AaveV2Subscriptions.js +4 -4
  181. package/esm/types/contracts/generated/Legacy_AuthCheck.d.ts +20 -20
  182. package/esm/types/contracts/generated/Legacy_AuthCheck.js +4 -4
  183. package/esm/types/contracts/generated/Legacy_CompoundV2Subscriptions.d.ts +128 -128
  184. package/esm/types/contracts/generated/Legacy_CompoundV2Subscriptions.js +4 -4
  185. package/esm/types/contracts/generated/Legacy_MakerSubscriptions.d.ts +246 -246
  186. package/esm/types/contracts/generated/Legacy_MakerSubscriptions.js +4 -4
  187. package/esm/types/contracts/generated/SubStorage.d.ts +114 -114
  188. package/esm/types/contracts/generated/SubStorage.js +4 -4
  189. package/esm/types/contracts/generated/UniMulticall.d.ts +55 -55
  190. package/esm/types/contracts/generated/UniMulticall.js +4 -4
  191. package/esm/types/contracts/generated/index.d.ts +7 -7
  192. package/esm/types/contracts/generated/index.js +1 -1
  193. package/esm/types/contracts/generated/types.d.ts +54 -54
  194. package/esm/types/contracts/generated/types.js +1 -1
  195. package/esm/types/enums.d.ts +302 -219
  196. package/esm/types/enums.js +325 -242
  197. package/esm/types/index.d.ts +306 -248
  198. package/esm/types/index.js +1 -1
  199. package/package.json +60 -61
  200. package/scripts/generateContractTypes.js +39 -39
  201. package/src/abis/Erc20.json +222 -222
  202. package/src/abis/SubStorage.json +21 -21
  203. package/src/abis/UniMulticall.json +17 -17
  204. package/src/abis/index.ts +28 -28
  205. package/src/abis/legacy_AaveV2Subscriptions.json +7 -7
  206. package/src/abis/legacy_AuthCheck.json +7 -7
  207. package/src/abis/legacy_CompoundV2Subscriptions.json +8 -8
  208. package/src/abis/legacy_MakerSubscriptions.json +8 -8
  209. package/src/automation/private/Automation.ts +44 -44
  210. package/src/automation/private/LegacyAutomation.ts +135 -135
  211. package/src/automation/private/LegacyProtocol.test.ts +23 -23
  212. package/src/automation/private/LegacyProtocol.ts +51 -51
  213. package/src/automation/private/Protocol.test.ts +23 -23
  214. package/src/automation/private/Protocol.ts +51 -51
  215. package/src/automation/private/StrategiesAutomation.test.ts +703 -663
  216. package/src/automation/private/StrategiesAutomation.ts +265 -242
  217. package/src/automation/public/ArbitrumStrategies.ts +10 -10
  218. package/src/automation/public/BaseStrategies.ts +10 -10
  219. package/src/automation/public/EthereumStrategies.ts +10 -10
  220. package/src/automation/public/OptimismStrategies.ts +10 -10
  221. package/src/automation/public/Strategies.test.ts +49 -49
  222. package/src/automation/public/legacy/LegacyAaveAutomation.ts +20 -20
  223. package/src/automation/public/legacy/LegacyCompoundAutomation.ts +20 -20
  224. package/src/automation/public/legacy/LegacyMakerAutomation.ts +20 -20
  225. package/src/configuration.ts +8 -8
  226. package/src/constants/index.ts +935 -563
  227. package/src/index.ts +41 -39
  228. package/src/services/contractService.ts +77 -77
  229. package/src/services/ethereumService.test.ts +260 -257
  230. package/src/services/ethereumService.ts +76 -69
  231. package/src/services/strategiesService.test.ts +106 -105
  232. package/src/services/strategiesService.ts +1473 -1111
  233. package/src/services/strategySubService.test.ts +2136 -1122
  234. package/src/services/strategySubService.ts +987 -617
  235. package/src/services/subDataService.test.ts +2630 -1387
  236. package/src/services/subDataService.ts +1631 -870
  237. package/src/services/triggerService.test.ts +1434 -1004
  238. package/src/services/triggerService.ts +819 -553
  239. package/src/services/utils.test.ts +371 -430
  240. package/src/services/utils.ts +173 -162
  241. package/src/types/enums.ts +322 -239
  242. package/src/types/index.ts +385 -312
  243. package/tsconfig.esm.json +8 -8
  244. package/tsconfig.json +22 -22
  245. package/umd/index.js +0 -34103
@@ -1,245 +1,527 @@
1
- import type { EthereumAddress } from '../types';
2
- import type { CloseStrategyType, OrderType } from '../types/enums';
3
- import { ChainId, RatioState } from '../types/enums';
4
- export declare const makerRepayFromSavingsSubData: {
5
- encode(vaultId: number, targetRatioPercentage: number, chainId: ChainId, daiAddr?: EthereumAddress, mcdCdpManagerAddr?: EthereumAddress): string[];
6
- decode(subData: string[]): {
7
- vaultId: number;
8
- daiAddr: string;
9
- mcdManagerAddr: string;
10
- targetRatio: number;
11
- };
12
- };
13
- export declare const liquityRepayFromSavingsSubData: {
14
- decode(subData: string[]): {
15
- targetRatio: number;
16
- };
17
- };
18
- export declare const makerCloseSubData: {
19
- encode(vaultId: number, closeToAssetAddr: EthereumAddress, chainId: ChainId, daiAddr?: EthereumAddress, mcdCdpManagerAddr?: EthereumAddress): string[];
20
- decode(subData: string[]): {
21
- vaultId: number;
22
- closeToAssetAddr: EthereumAddress;
23
- };
24
- };
25
- export declare const makerLeverageManagementSubData: {
26
- decode: (subData: string[]) => {
27
- vaultId: number;
28
- targetRatio: number;
29
- };
30
- };
31
- export declare const liquityLeverageManagementSubData: {
32
- decode: (subData: string[]) => {
33
- targetRatio: number;
34
- };
35
- };
36
- export declare const liquityCloseSubData: {
37
- encode(closeToAssetAddr: EthereumAddress, chainId?: ChainId, collAddr?: EthereumAddress, debtAddr?: EthereumAddress): string[];
38
- decode(subData: string[]): {
39
- closeToAssetAddr: EthereumAddress;
40
- debtAddr: string;
41
- };
42
- };
43
- export declare const aaveV2LeverageManagementSubData: {
44
- encode(triggerRepayRatio: number, triggerBoostRatio: number, targetBoostRatio: number, targetRepayRatio: number, boostEnabled: boolean): string[];
45
- decode(subData: string[]): {
46
- targetRatio: number;
47
- };
48
- };
49
- export declare const aaveV3LeverageManagementSubData: {
50
- decode(subData: string[]): {
51
- targetRatio: number;
52
- };
53
- };
54
- export declare const aaveV3QuotePriceSubData: {
55
- encode(collAsset: EthereumAddress, collAssetId: number, debtAsset: EthereumAddress, debtAssetId: number, nullAddress?: EthereumAddress): string[];
56
- decode(subData: string[]): {
57
- collAsset: EthereumAddress;
58
- collAssetId: number;
59
- debtAsset: EthereumAddress;
60
- debtAssetId: number;
61
- };
62
- };
63
- export declare const compoundV2LeverageManagementSubData: {
64
- encode(triggerRepayRatio: number, triggerBoostRatio: number, targetBoostRatio: number, targetRepayRatio: number, boostEnabled: boolean): string[];
65
- decode(subData: string[]): {
66
- targetRatio: number;
67
- };
68
- };
69
- export declare const compoundV3LeverageManagementSubData: {
70
- encode(market: EthereumAddress, baseToken: EthereumAddress, triggerRepayRatio: number, triggerBoostRatio: number, targetBoostRatio: number, targetRepayRatio: number, boostEnabled: boolean, isEOA: boolean): string[];
71
- decode(subData: string[]): {
72
- targetRatio: number;
73
- };
74
- };
75
- export declare const compoundV3L2LeverageManagementSubData: {
76
- encode(market: EthereumAddress, baseToken: EthereumAddress, triggerRepayRatio: number, triggerBoostRatio: number, targetBoostRatio: number, targetRepayRatio: number, boostEnabled: boolean): string;
77
- decode(subData: string[]): {
78
- targetRatio: number;
79
- };
80
- };
81
- export declare const morphoAaveV2LeverageManagementSubData: {
82
- encode(triggerRepayRatio: number, triggerBoostRatio: number, targetBoostRatio: number, targetRepayRatio: number, boostEnabled: boolean): string[];
83
- decode(subData: string[]): {
84
- targetRatio: number;
85
- };
86
- };
87
- export declare const cBondsRebondSubData: {
88
- encode(bondId: number | string): string[];
89
- decode(subData: string[]): {
90
- bondId: string;
91
- };
92
- };
93
- export declare const liquityPaybackUsingChickenBondSubData: {
94
- /**
95
- * @param sourceId bondId or subId
96
- * @param sourceType 0 for bond, 1 for subId
97
- * @param chainId
98
- */
99
- encode: (sourceId: string, sourceType: number, chainId?: ChainId) => string[];
100
- decode: (subData: string[]) => {
101
- sourceId: string;
102
- sourceType: string;
103
- };
104
- };
105
- export declare const exchangeDcaSubData: {
106
- encode: (fromToken: EthereumAddress, toToken: EthereumAddress, amount: string, interval: number) => string[];
107
- decode: (subData: string[], chainId: ChainId) => {
108
- fromToken: string;
109
- toToken: string;
110
- amount: string;
111
- interval: string;
112
- };
113
- };
114
- export declare const exchangeLimitOrderSubData: {
115
- encode(fromToken: EthereumAddress, toToken: EthereumAddress, amount: string, targetPrice: string, goodUntil: string | number, orderType: OrderType): string[];
116
- decode: (subData: string[], chainId: ChainId) => {
117
- fromToken: string;
118
- toToken: string;
119
- amount: string;
120
- };
121
- };
122
- export declare const sparkLeverageManagementSubData: {
123
- decode(subData: string[]): {
124
- targetRatio: number;
125
- };
126
- };
127
- export declare const sparkQuotePriceSubData: {
128
- encode(collAsset: EthereumAddress, collAssetId: number, debtAsset: EthereumAddress, debtAssetId: number, nullAddress?: EthereumAddress): string[];
129
- decode(subData: string[]): {
130
- collAsset: EthereumAddress;
131
- collAssetId: number;
132
- debtAsset: EthereumAddress;
133
- debtAssetId: number;
134
- };
135
- };
136
- export declare const liquityDsrPaybackSubData: {
137
- encode: (targetRatio: number) => string[];
138
- decode: (subData: string[]) => {
139
- targetRatio: number;
140
- };
141
- };
142
- export declare const liquityDsrSupplySubData: {
143
- encode: (targetRatio: number) => string[];
144
- decode: (subData: string[]) => {
145
- targetRatio: number;
146
- };
147
- };
148
- export declare const liquityDebtInFrontRepaySubData: {
149
- encode: (targetRatioIncrease: number) => string[];
150
- decode: (subData: string[]) => {
151
- targetRatioIncrease: number;
152
- };
153
- };
154
- export declare const crvUSDLeverageManagementSubData: {
155
- encode: (controllerAddr: EthereumAddress, ratioState: RatioState, targetRatio: number, collTokenAddr: EthereumAddress, crvUSDAddr: EthereumAddress) => string[];
156
- decode: (subData: string[]) => {
157
- controller: string;
158
- targetRatio: number;
159
- };
160
- };
161
- export declare const crvUSDPaybackSubData: {
162
- encode: (controllerAddr: EthereumAddress, addressToPullTokensFrom: EthereumAddress, positionOwner: EthereumAddress, paybackAmount: string, crvUSDAddr: EthereumAddress) => string[];
163
- decode: (subData: string[]) => {
164
- controller: string;
165
- addressToPullTokensFrom: string;
166
- positionOwner: string;
167
- paybackAmount: string;
168
- };
169
- };
170
- export declare const morphoBlueLeverageManagementSubData: {
171
- encode: (loanToken: EthereumAddress, collToken: EthereumAddress, oracle: EthereumAddress, irm: EthereumAddress, lltv: string, ratioState: RatioState, targetRatio: number, user: EthereumAddress, isEOA: boolean) => string[];
172
- decode: (subData: string[]) => {
173
- loanToken: string;
174
- collToken: string;
175
- oracle: string;
176
- irm: string;
177
- lltv: string;
178
- user: string;
179
- targetRatio: number;
180
- };
181
- };
182
- export declare const aaveV3LeverageManagementOnPriceSubData: {
183
- encode(collAsset: EthereumAddress, collAssetId: number, debtAsset: EthereumAddress, debtAssetId: number, marketAddr: EthereumAddress, targetRatio: number): string[];
184
- decode(subData: string[]): {
185
- collAsset: EthereumAddress;
186
- collAssetId: number;
187
- debtAsset: EthereumAddress;
188
- debtAssetId: number;
189
- marketAddr: EthereumAddress;
190
- targetRatio: number;
191
- };
192
- };
193
- export declare const liquityV2LeverageManagementSubData: {
194
- encode: (market: EthereumAddress, troveId: string, collToken: EthereumAddress, boldToken: EthereumAddress, ratioState: RatioState, targetRatio: number) => string[];
195
- decode: (subData: string[]) => {
196
- market: string;
197
- troveId: string;
198
- collToken: string;
199
- boldToken: string;
200
- ratioState: RatioState;
201
- targetRatio: number;
202
- };
203
- };
204
- export declare const liquityV2CloseSubData: {
205
- encode(market: EthereumAddress, troveId: string, collToken: EthereumAddress, boldToken: EthereumAddress, closeType: CloseStrategyType): string[];
206
- decode(subData: string[]): {
207
- market: EthereumAddress;
208
- troveId: string;
209
- collToken: EthereumAddress;
210
- boldToken: EthereumAddress;
211
- closeType: CloseStrategyType;
212
- };
213
- };
214
- export declare const liquityV2LeverageManagementOnPriceSubData: {
215
- encode(market: EthereumAddress, troveId: string, collToken: EthereumAddress, boldToken: EthereumAddress, targetRatio: number, isRepayOnPrice: boolean): string[];
216
- decode(subData: string[]): {
217
- market: EthereumAddress;
218
- troveId: string;
219
- collToken: EthereumAddress;
220
- boldToken: EthereumAddress;
221
- targetRatio: number;
222
- };
223
- };
224
- export declare const morphoBlueLeverageManagementOnPriceSubData: {
225
- encode(loanToken: EthereumAddress, collToken: EthereumAddress, oracle: EthereumAddress, irm: EthereumAddress, lltv: string, targetRatio: number, user: EthereumAddress): string[];
226
- decode(subData: string[]): {
227
- loanToken: string;
228
- collToken: string;
229
- oracle: string;
230
- irm: string;
231
- lltv: string;
232
- targetRatio: number;
233
- user: string;
234
- };
235
- };
236
- export declare const liquityV2PaybackSubData: {
237
- encode: (market: EthereumAddress, troveId: string, boldToken: EthereumAddress, targetRatio: number, ratioState: RatioState) => string[];
238
- decode: (subData: string[]) => {
239
- market: string;
240
- troveId: string;
241
- boldToken: string;
242
- ratioState: RatioState;
243
- targetRatio: number;
244
- };
245
- };
1
+ import type { EthereumAddress } from '../types';
2
+ import type { CloseStrategyType, OrderType } from '../types/enums';
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
+ */
44
+ export declare const makerRepayFromSavingsSubData: {
45
+ encode(vaultId: number, targetRatioPercentage: number, chainId: ChainId, daiAddr?: EthereumAddress, mcdCdpManagerAddr?: EthereumAddress): string[];
46
+ decode(subData: string[]): {
47
+ vaultId: number;
48
+ daiAddr: string;
49
+ mcdManagerAddr: string;
50
+ targetRatio: number;
51
+ };
52
+ };
53
+ export declare const makerCloseSubData: {
54
+ encode(vaultId: number, closeToAssetAddr: EthereumAddress, chainId: ChainId, daiAddr?: EthereumAddress, mcdCdpManagerAddr?: EthereumAddress): string[];
55
+ decode(subData: string[]): {
56
+ vaultId: number;
57
+ closeToAssetAddr: EthereumAddress;
58
+ };
59
+ };
60
+ export declare const makerLeverageManagementSubData: {
61
+ decode: (subData: string[]) => {
62
+ vaultId: number;
63
+ targetRatio: number;
64
+ };
65
+ };
66
+ export declare const makerLeverageManagementWithoutSubProxy: {
67
+ encode(vaultId: number, targetRatio: number, daiAddr?: EthereumAddress): string[];
68
+ decode(subData: string[]): {
69
+ vaultId: number;
70
+ targetRatio: number;
71
+ daiAddr: string;
72
+ };
73
+ };
74
+ /**
75
+ __ __ ______ __ __ __ .___________.____ ____ ____ ____ __
76
+ | | | | / __ \ | | | | | | | |\ \ / / \ \ / / /_ |
77
+ | | | | | | | | | | | | | | `---| |----` \ \/ / \ \/ / | |
78
+ | | | | | | | | | | | | | | | | \_ _/ \ / | |
79
+ | `----.| | | `--' '--.| `--' | | | | | | | \ / | |
80
+ |_______||__| \_____\_____\\______/ |__| |__| |__| \__/ |_|
81
+ */
82
+ export declare const liquityRepayFromSavingsSubData: {
83
+ decode(subData: string[]): {
84
+ targetRatio: number;
85
+ };
86
+ };
87
+ export declare const liquityLeverageManagementSubData: {
88
+ decode: (subData: string[]) => {
89
+ targetRatio: number;
90
+ };
91
+ };
92
+ export declare const liquityCloseSubData: {
93
+ encode(closeToAssetAddr: EthereumAddress, chainId?: ChainId, collAddr?: EthereumAddress, debtAddr?: EthereumAddress): string[];
94
+ decode(subData: string[]): {
95
+ closeToAssetAddr: EthereumAddress;
96
+ debtAddr: string;
97
+ };
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
+ */
174
+ export declare const aaveV2LeverageManagementSubData: {
175
+ encode(triggerRepayRatio: number, triggerBoostRatio: number, targetBoostRatio: number, targetRepayRatio: number, boostEnabled: boolean): string[];
176
+ decode(subData: string[]): {
177
+ targetRatio: number;
178
+ };
179
+ };
180
+ /**
181
+ ___ ___ ____ ____ _______ ____ ____ ____
182
+ / \ / \ \ \ / / | ____| \ \ / / |___ \
183
+ / ^ \ / ^ \ \ \/ / | |__ \ \/ / __) |
184
+ / /_\ \ / /_\ \ \ / | __| \ / |__ <
185
+ / _____ \ / _____ \ \ / | |____ \ / ___) |
186
+ /__/ \__\ /__/ \__\ \__/ |_______| \__/ |____/
187
+ */
188
+ export declare const aaveV3LeverageManagementSubData: {
189
+ decode(subData: string[]): {
190
+ targetRatio: number;
191
+ };
192
+ };
193
+ export declare const aaveV3LeverageManagementSubDataWithoutSubProxy: {
194
+ encode(targetRatio: number, ratioState: RatioState, market: EthereumAddress, user: EthereumAddress, isGeneric: boolean): string[];
195
+ decode(subData: string[]): {
196
+ targetRatio: number;
197
+ ratioState: RatioState;
198
+ };
199
+ };
200
+ export declare const aaveV3LeverageManagementOnPriceGeneric: {
201
+ encode(collAsset: EthereumAddress, collAssetId: number, debtAsset: EthereumAddress, debtAssetId: number, marketAddr: EthereumAddress, targetRatio: number, user: EthereumAddress): string[];
202
+ decode(subData: string[]): {
203
+ collAsset: EthereumAddress;
204
+ collAssetId: number;
205
+ debtAsset: EthereumAddress;
206
+ debtAssetId: number;
207
+ marketAddr: EthereumAddress;
208
+ targetRatio: number;
209
+ owner: EthereumAddress;
210
+ };
211
+ };
212
+ export declare const aaveV3CloseGenericSubData: {
213
+ encode(collAsset: EthereumAddress, collAssetId: number, debtAsset: EthereumAddress, debtAssetId: number, closeType: CloseStrategyType, marketAddr: EthereumAddress, user: EthereumAddress): string[];
214
+ decode(subData: string[]): {
215
+ collAsset: EthereumAddress;
216
+ collAssetId: number;
217
+ debtAsset: EthereumAddress;
218
+ debtAssetId: number;
219
+ closeType: CloseStrategyType;
220
+ marketAddr: EthereumAddress;
221
+ owner: EthereumAddress;
222
+ };
223
+ };
224
+ export declare const aaveV3CollateralSwitchSubData: {
225
+ encode(fromAsset: EthereumAddress, fromAssetId: number, toAsset: EthereumAddress, toAssetId: number, marketAddr: EthereumAddress, amountToSwitch: string, useOnBehalf?: boolean): string[];
226
+ decode(subData: string[]): {
227
+ fromAsset: EthereumAddress;
228
+ fromAssetId: number;
229
+ toAsset: EthereumAddress;
230
+ toAssetId: number;
231
+ marketAddr: EthereumAddress;
232
+ amountToSwitch: string;
233
+ };
234
+ };
235
+ export declare const aaveV3QuotePriceSubData: {
236
+ encode(collAsset: EthereumAddress, collAssetId: number, debtAsset: EthereumAddress, debtAssetId: number, nullAddress?: EthereumAddress): string[];
237
+ decode(subData: string[]): {
238
+ collAsset: EthereumAddress;
239
+ collAssetId: number;
240
+ debtAsset: EthereumAddress;
241
+ debtAssetId: number;
242
+ };
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
+ */
317
+ export declare const compoundV2LeverageManagementSubData: {
318
+ encode(triggerRepayRatio: number, triggerBoostRatio: number, targetBoostRatio: number, targetRepayRatio: number, boostEnabled: boolean): string[];
319
+ decode(subData: string[]): {
320
+ targetRatio: number;
321
+ };
322
+ };
323
+ /**
324
+ ______ ______ .___ ___. .______ ____ ____ ____
325
+ / | / __ \ | \/ | | _ \ \ \ / / |___ \
326
+ | ,----'| | | | | \ / | | |_) | \ \/ / __) |
327
+ | | | | | | | |\/| | | ___/ \ / |__ <
328
+ | `----.| `--' | | | | | | | \ / ___) |
329
+ \______| \______/ |__| |__| | _| \__/ |____/
330
+ */
331
+ export declare const compoundV3LeverageManagementSubData: {
332
+ encode(market: EthereumAddress, baseToken: EthereumAddress, triggerRepayRatio: number, triggerBoostRatio: number, targetBoostRatio: number, targetRepayRatio: number, boostEnabled: boolean, isEOA: boolean): string[];
333
+ decode(subData: string[]): {
334
+ targetRatio: number;
335
+ };
336
+ };
337
+ export declare const compoundV3L2LeverageManagementSubData: {
338
+ encode(market: EthereumAddress, baseToken: EthereumAddress, triggerRepayRatio: number, triggerBoostRatio: number, targetBoostRatio: number, targetRepayRatio: number, boostEnabled: boolean, isEOA: boolean): string;
339
+ decode(subData: string[]): {
340
+ targetRatio: number;
341
+ };
342
+ };
343
+ export declare const compoundV3LeverageManagementOnPriceSubData: {
344
+ encode(market: EthereumAddress, collToken: EthereumAddress, baseToken: EthereumAddress, targetRatio: number, ratioState: RatioState, user: EthereumAddress): string[];
345
+ decode(subData: string[]): {
346
+ market: EthereumAddress;
347
+ collToken: EthereumAddress;
348
+ baseToken: EthereumAddress;
349
+ targetRatio: number;
350
+ ratioState: RatioState;
351
+ owner: EthereumAddress;
352
+ };
353
+ };
354
+ export declare const compoundV3CloseSubData: {
355
+ encode(market: EthereumAddress, collToken: EthereumAddress, baseToken: EthereumAddress, closeType: CloseStrategyType, user: EthereumAddress): string[];
356
+ decode(subData: string[]): {
357
+ market: EthereumAddress;
358
+ collToken: EthereumAddress;
359
+ baseToken: EthereumAddress;
360
+ closeType: CloseStrategyType;
361
+ owner: EthereumAddress;
362
+ };
363
+ };
364
+ /**
365
+ __________ ___ ______ __ __ ___ .__ __. _______ _______
366
+ | ____\ \ / / / || | | | / \ | \ | | / _____|| ____|
367
+ | |__ \ V / | ,----'| |__| | / ^ \ | \| | | | __ | |__
368
+ | __| > < | | | __ | / /_\ \ | . ` | | | |_ | | __|
369
+ | |____ / . \ | `----.| | | | / _____ \ | |\ | | |__| | | |____
370
+ |_______/__/ \__\ \______||__| |__| /__/ \__\ |__| \__| \______| |_______|
371
+ */
372
+ export declare const exchangeDcaSubData: {
373
+ encode: (fromToken: EthereumAddress, toToken: EthereumAddress, amount: string, interval: number) => string[];
374
+ decode: (subData: string[], chainId: ChainId) => {
375
+ fromToken: string;
376
+ toToken: string;
377
+ amount: string;
378
+ interval: string;
379
+ };
380
+ };
381
+ export declare const exchangeLimitOrderSubData: {
382
+ encode(fromToken: EthereumAddress, toToken: EthereumAddress, amount: string, targetPrice: string, goodUntil: string | number, orderType: OrderType): string[];
383
+ decode: (subData: string[], chainId: ChainId) => {
384
+ fromToken: string;
385
+ toToken: string;
386
+ amount: string;
387
+ };
388
+ };
389
+ /**
390
+ _______..______ ___ .______ __ ___
391
+ / || _ \ / \ | _ \ | |/ /
392
+ | (----`| |_) | / ^ \ | |_) | | ' /
393
+ \ \ | ___/ / /_\ \ | / | <
394
+ .----) | | | / _____ \ | |\ \----.| . \
395
+ |_______/ | _| /__/ \__\ | _| `._____||__|\__\
396
+ */
397
+ export declare const sparkLeverageManagementSubData: {
398
+ decode(subData: string[]): {
399
+ targetRatio: number;
400
+ };
401
+ };
402
+ export declare const sparkLeverageManagementSubDataWithoutSubProxy: {
403
+ encode(targetRatio: number, ratioState: RatioState): string[];
404
+ decode(subData: string[]): {
405
+ targetRatio: number;
406
+ ratioState: RatioState;
407
+ };
408
+ };
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;
419
+ };
420
+ };
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;
429
+ targetRatio: number;
430
+ };
431
+ };
432
+ export declare const sparkCollateralSwitchSubData: {
433
+ encode(fromAsset: EthereumAddress, fromAssetId: number, toAsset: EthereumAddress, toAssetId: number, marketAddr: EthereumAddress, amountToSwitch: string, useOnBehalf?: boolean): string[];
434
+ decode(subData: string[]): {
435
+ fromAsset: EthereumAddress;
436
+ fromAssetId: number;
437
+ toAsset: EthereumAddress;
438
+ toAssetId: number;
439
+ marketAddr: EthereumAddress;
440
+ amountToSwitch: string;
441
+ };
442
+ };
443
+ /**
444
+ ______ .______ ____ ____ __ __ _______. _______
445
+ / || _ \ \ \ / / | | | | / || \
446
+ | ,----'| |_) | \ \/ / | | | | | (----`| .--. |
447
+ | | | / \ / | | | | \ \ | | | |
448
+ | `----.| |\ \----. \ / | `--' | .----) | | '--' |
449
+ \______|| _| `._____| \__/ \______/ |_______/ |_______/
450
+ */
451
+ export declare const crvUSDLeverageManagementSubData: {
452
+ encode: (controllerAddr: EthereumAddress, ratioState: RatioState, targetRatio: number, collTokenAddr: EthereumAddress, crvUSDAddr: EthereumAddress) => string[];
453
+ decode: (subData: string[]) => {
454
+ controller: string;
455
+ targetRatio: number;
456
+ };
457
+ };
458
+ export declare const crvUSDPaybackSubData: {
459
+ encode: (controllerAddr: EthereumAddress, addressToPullTokensFrom: EthereumAddress, positionOwner: EthereumAddress, paybackAmount: string, crvUSDAddr: EthereumAddress) => string[];
460
+ decode: (subData: string[]) => {
461
+ controller: string;
462
+ addressToPullTokensFrom: string;
463
+ positionOwner: string;
464
+ paybackAmount: string;
465
+ };
466
+ };
467
+ /**
468
+ .___ ___. ______ .______ .______ __ __ ______
469
+ | \/ | / __ \ | _ \ | _ \ | | | | / __ \
470
+ | \ / | | | | | | |_) | | |_) | | |__| | | | | |
471
+ | |\/| | | | | | | / | ___/ | __ | | | | |
472
+ | | | | | `--' | | |\ \----.| | | | | | | `--' |
473
+ |__| |__| \______/ | _| `._____|| _| |__| |__| \______/
474
+ */
475
+ export declare const morphoBlueLeverageManagementSubData: {
476
+ encode: (loanToken: EthereumAddress, collToken: EthereumAddress, oracle: EthereumAddress, irm: EthereumAddress, lltv: string, ratioState: RatioState, targetRatio: number, user: EthereumAddress, isEOA: boolean) => string[];
477
+ decode: (subData: string[]) => {
478
+ loanToken: string;
479
+ collToken: string;
480
+ oracle: string;
481
+ irm: string;
482
+ lltv: string;
483
+ user: string;
484
+ targetRatio: number;
485
+ };
486
+ };
487
+ export declare const morphoBlueLeverageManagementOnPriceSubData: {
488
+ encode(loanToken: EthereumAddress, collToken: EthereumAddress, oracle: EthereumAddress, irm: EthereumAddress, lltv: string, targetRatio: number, user: EthereumAddress): string[];
489
+ decode(subData: string[]): {
490
+ loanToken: string;
491
+ collToken: string;
492
+ oracle: string;
493
+ irm: string;
494
+ lltv: string;
495
+ targetRatio: number;
496
+ user: string;
497
+ };
498
+ };
499
+ export declare const morphoBlueCloseOnPriceSubData: {
500
+ encode(loanToken: EthereumAddress, collToken: EthereumAddress, oracle: EthereumAddress, irm: EthereumAddress, lltv: string, user: EthereumAddress, closeType: CloseStrategyType): string[];
501
+ decode(subData: string[]): {
502
+ loanToken: string;
503
+ collToken: string;
504
+ oracle: string;
505
+ irm: string;
506
+ lltv: string;
507
+ user: string;
508
+ closeType: CloseStrategyType;
509
+ };
510
+ };
511
+ /**
512
+ _______ __ __ __ __ _______
513
+ | ____|| | | | | | | | | \
514
+ | |__ | | | | | | | | | .--. |
515
+ | __| | | | | | | | | | | | |
516
+ | | | `----.| `--' | | | | '--' |
517
+ |__| |_______| \______/ |__| |_______/
518
+ */
519
+ export declare const fluidLeverageManagementSubData: {
520
+ encode: (nftId: string, vault: EthereumAddress, ratioState: RatioState, targetRatio: number) => string[];
521
+ decode: (subData: string[]) => {
522
+ nftId: string;
523
+ vault: string;
524
+ ratioState: RatioState;
525
+ targetRatio: number;
526
+ };
527
+ };