@defisaver/automation-sdk 3.3.15-liq-prot-2-dev → 3.3.16
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cjs/constants/index.js +9 -124
- package/cjs/index.d.ts +3 -4
- package/cjs/index.js +2 -6
- package/cjs/services/strategiesService.js +1 -148
- package/cjs/services/strategySubService.d.ts +2 -9
- package/cjs/services/strategySubService.js +1 -52
- package/cjs/services/strategySubService.test.js +67 -0
- package/cjs/services/subDataService.d.ts +3 -58
- package/cjs/services/subDataService.js +18 -164
- package/cjs/services/subDataService.test.js +168 -0
- package/cjs/services/triggerService.test.js +60 -0
- package/cjs/services/utils.d.ts +1 -3
- package/cjs/services/utils.js +1 -34
- package/cjs/services/utils.test.js +0 -25
- package/cjs/types/enums.d.ts +6 -33
- package/cjs/types/enums.js +3 -30
- package/esm/constants/index.js +9 -124
- package/esm/index.d.ts +3 -4
- package/esm/index.js +3 -7
- package/esm/services/strategiesService.js +1 -148
- package/esm/services/strategySubService.d.ts +2 -9
- package/esm/services/strategySubService.js +2 -53
- package/esm/services/strategySubService.test.js +67 -0
- package/esm/services/subDataService.d.ts +3 -58
- package/esm/services/subDataService.js +16 -162
- package/esm/services/subDataService.test.js +168 -0
- package/esm/services/triggerService.test.js +61 -1
- package/esm/services/utils.d.ts +1 -3
- package/esm/services/utils.js +1 -32
- package/esm/services/utils.test.js +2 -27
- package/esm/types/enums.d.ts +6 -33
- package/esm/types/enums.js +3 -30
- package/package.json +1 -1
- package/src/constants/index.ts +10 -126
- package/src/index.ts +6 -24
- package/src/services/strategiesService.ts +1 -212
- package/src/services/strategySubService.test.ts +84 -0
- package/src/services/strategySubService.ts +5 -149
- package/src/services/subDataService.test.ts +182 -0
- package/src/services/subDataService.ts +22 -229
- package/src/services/triggerService.test.ts +69 -0
- package/src/services/utils.test.ts +1 -32
- package/src/services/utils.ts +1 -32
- package/src/types/enums.ts +5 -30
|
@@ -1184,6 +1184,66 @@ describe('Feature: triggerService.ts', () => {
|
|
|
1184
1184
|
});
|
|
1185
1185
|
});
|
|
1186
1186
|
});
|
|
1187
|
+
describe('When testing triggerService.morphoBluePriceTrigger', () => {
|
|
1188
|
+
describe('encode()', () => {
|
|
1189
|
+
const examples = [
|
|
1190
|
+
[
|
|
1191
|
+
['0x000000000000000000000000870ac11d48b15db9a138cf899d20f13f79ba00bc0000000000000000000000007f39c581f595b53c5cb19bd0b3f8da6c935e2ca0000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc20000000000000000000000000000000000000000000000000000003a352944000000000000000000000000000000000000000000000000000000000000000001'],
|
|
1192
|
+
[
|
|
1193
|
+
web3Utils.toChecksumAddress('0x870aC11D48B15DB9a138Cf899d20F13F79Ba00BC'),
|
|
1194
|
+
web3Utils.toChecksumAddress('0x7f39C581F595B53c5cb19bD0b3f8dA6c935E2Ca0'),
|
|
1195
|
+
web3Utils.toChecksumAddress('0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2'),
|
|
1196
|
+
2500,
|
|
1197
|
+
enums_1.RatioState.UNDER,
|
|
1198
|
+
],
|
|
1199
|
+
],
|
|
1200
|
+
[
|
|
1201
|
+
['0x000000000000000000000000870ac11d48b15db9a138cf899d20f13f79ba00bc0000000000000000000000007f39c581f595b53c5cb19bd0b3f8da6c935e2ca0000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc20000000000000000000000000000000000000000000000000000005d21dba0000000000000000000000000000000000000000000000000000000000000000000'],
|
|
1202
|
+
[
|
|
1203
|
+
web3Utils.toChecksumAddress('0x870aC11D48B15DB9a138Cf899d20F13F79Ba00BC'),
|
|
1204
|
+
web3Utils.toChecksumAddress('0x7f39C581F595B53c5cb19bD0b3f8dA6c935E2Ca0'),
|
|
1205
|
+
web3Utils.toChecksumAddress('0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2'),
|
|
1206
|
+
4000,
|
|
1207
|
+
enums_1.RatioState.OVER,
|
|
1208
|
+
],
|
|
1209
|
+
],
|
|
1210
|
+
];
|
|
1211
|
+
examples.forEach(([expected, actual]) => {
|
|
1212
|
+
it(`Given ${actual} should return expected value: ${expected}`, () => {
|
|
1213
|
+
(0, chai_1.expect)(triggerService_1.morphoBluePriceTrigger.encode(...actual)).to.eql(expected);
|
|
1214
|
+
});
|
|
1215
|
+
});
|
|
1216
|
+
});
|
|
1217
|
+
describe('decode()', () => {
|
|
1218
|
+
const examples = [
|
|
1219
|
+
[
|
|
1220
|
+
{
|
|
1221
|
+
oracle: web3Utils.toChecksumAddress('0x870aC11D48B15DB9a138Cf899d20F13F79Ba00BC'),
|
|
1222
|
+
collateralToken: web3Utils.toChecksumAddress('0x7f39C581F595B53c5cb19bD0b3f8dA6c935E2Ca0'),
|
|
1223
|
+
loanToken: web3Utils.toChecksumAddress('0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2'),
|
|
1224
|
+
price: '2500',
|
|
1225
|
+
priceState: enums_1.RatioState.UNDER,
|
|
1226
|
+
},
|
|
1227
|
+
['0x000000000000000000000000870ac11d48b15db9a138cf899d20f13f79ba00bc0000000000000000000000007f39c581f595b53c5cb19bd0b3f8da6c935e2ca0000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc20000000000000000000000000000000000000000000000000000003a352944000000000000000000000000000000000000000000000000000000000000000001'],
|
|
1228
|
+
],
|
|
1229
|
+
[
|
|
1230
|
+
{
|
|
1231
|
+
oracle: web3Utils.toChecksumAddress('0x870aC11D48B15DB9a138Cf899d20F13F79Ba00BC'),
|
|
1232
|
+
collateralToken: web3Utils.toChecksumAddress('0x7f39C581F595B53c5cb19bD0b3f8dA6c935E2Ca0'),
|
|
1233
|
+
loanToken: web3Utils.toChecksumAddress('0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2'),
|
|
1234
|
+
price: '4000',
|
|
1235
|
+
priceState: enums_1.RatioState.OVER,
|
|
1236
|
+
},
|
|
1237
|
+
['0x000000000000000000000000870ac11d48b15db9a138cf899d20f13f79ba00bc0000000000000000000000007f39c581f595b53c5cb19bd0b3f8da6c935e2ca0000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc20000000000000000000000000000000000000000000000000000005d21dba0000000000000000000000000000000000000000000000000000000000000000000'],
|
|
1238
|
+
],
|
|
1239
|
+
];
|
|
1240
|
+
examples.forEach(([expected, actual]) => {
|
|
1241
|
+
it(`Given ${actual} should return expected value: ${JSON.stringify(expected)}`, () => {
|
|
1242
|
+
(0, chai_1.expect)(triggerService_1.morphoBluePriceTrigger.decode(actual)).to.eql(expected);
|
|
1243
|
+
});
|
|
1244
|
+
});
|
|
1245
|
+
});
|
|
1246
|
+
});
|
|
1187
1247
|
describe('When testing triggerService.aaveV4RatioTrigger', () => {
|
|
1188
1248
|
describe('encode()', () => {
|
|
1189
1249
|
const examples = [
|
package/cjs/services/utils.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { EthereumAddress } from '../types';
|
|
2
|
-
import {
|
|
2
|
+
import { ChainId, CloseStrategyType, CloseToAssetType, RatioState } from '../types/enums';
|
|
3
3
|
export declare function isDefined<T>(value: T): value is NonNullable<T>;
|
|
4
4
|
export declare function isUndefined(value: unknown): boolean;
|
|
5
5
|
export declare function compareAddresses(firstAddress: EthereumAddress, secondAddress: EthereumAddress): boolean;
|
|
@@ -28,5 +28,3 @@ export declare function getStopLossAndTakeProfitTypeByCloseStrategyType(closeStr
|
|
|
28
28
|
stopLossType: CloseToAssetType | undefined;
|
|
29
29
|
takeProfitType: CloseToAssetType | undefined;
|
|
30
30
|
};
|
|
31
|
-
export declare function getBundleIdsByNetwork(network: ChainId): typeof Bundles.MainnetIds | typeof Bundles.ArbitrumIds | typeof Bundles.BaseIds;
|
|
32
|
-
export declare function getCompoundV3LeverageManagementBundleId(network: ChainId, isEOA: boolean, isBoost: boolean): number;
|
package/cjs/services/utils.js
CHANGED
|
@@ -26,7 +26,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
26
26
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
27
27
|
};
|
|
28
28
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
|
-
exports.
|
|
29
|
+
exports.getStopLossAndTakeProfitTypeByCloseStrategyType = exports.getCloseStrategyType = exports.getPositionId = exports.getRatioStateInfoForAaveCloseStrategy = exports.requireAddresses = exports.requireAddress = exports.isEmptyBytes = exports.isRatioStateUnder = exports.isRatioStateOver = exports.weiToRatioPercentage = exports.ratioPercentageToWei = exports.encodeSubId = exports.compareSubHashes = exports.wethToEthByAddress = exports.wethToEth = exports.ethToWeth = exports.addToObjectIf = exports.addToArrayIf = exports.isAddress = exports.compareAddresses = exports.isUndefined = exports.isDefined = void 0;
|
|
30
30
|
const decimal_js_1 = __importDefault(require("decimal.js"));
|
|
31
31
|
const web3Utils = __importStar(require("web3-utils"));
|
|
32
32
|
const web3_eth_abi_1 = __importDefault(require("web3-eth-abi"));
|
|
@@ -188,36 +188,3 @@ function getStopLossAndTakeProfitTypeByCloseStrategyType(closeStrategyType) {
|
|
|
188
188
|
}
|
|
189
189
|
}
|
|
190
190
|
exports.getStopLossAndTakeProfitTypeByCloseStrategyType = getStopLossAndTakeProfitTypeByCloseStrategyType;
|
|
191
|
-
function getBundleIdsByNetwork(network) {
|
|
192
|
-
switch (Number(network)) {
|
|
193
|
-
case enums_1.ChainId.Ethereum:
|
|
194
|
-
return enums_1.Bundles.MainnetIds;
|
|
195
|
-
case enums_1.ChainId.Arbitrum:
|
|
196
|
-
return enums_1.Bundles.ArbitrumIds;
|
|
197
|
-
case enums_1.ChainId.Base:
|
|
198
|
-
return enums_1.Bundles.BaseIds;
|
|
199
|
-
default:
|
|
200
|
-
throw new Error(`Unsupported network ${network}`);
|
|
201
|
-
}
|
|
202
|
-
}
|
|
203
|
-
exports.getBundleIdsByNetwork = getBundleIdsByNetwork;
|
|
204
|
-
// Mainnet uses the V2 bundle ids; L2s use the original bundle ids.
|
|
205
|
-
function getCompoundV3LeverageManagementBundleId(network, isEOA, isBoost) {
|
|
206
|
-
switch (Number(network)) {
|
|
207
|
-
case enums_1.ChainId.Ethereum:
|
|
208
|
-
if (isEOA)
|
|
209
|
-
return isBoost ? enums_1.Bundles.MainnetIds.COMP_V3_EOA_BOOST_V2_BUNDLE : enums_1.Bundles.MainnetIds.COMP_V3_EOA_REPAY_V2_BUNDLE;
|
|
210
|
-
return isBoost ? enums_1.Bundles.MainnetIds.COMP_V3_SW_BOOST_V2_BUNDLE : enums_1.Bundles.MainnetIds.COMP_V3_SW_REPAY_V2_BUNDLE;
|
|
211
|
-
case enums_1.ChainId.Base:
|
|
212
|
-
if (isEOA)
|
|
213
|
-
return isBoost ? enums_1.Bundles.BaseIds.COMP_V3_EOA_BOOST : enums_1.Bundles.BaseIds.COMP_V3_EOA_REPAY;
|
|
214
|
-
return isBoost ? enums_1.Bundles.BaseIds.COMP_V3_SW_BOOST_BUNDLE : enums_1.Bundles.BaseIds.COMP_V3_SW_REPAY_BUNDLE;
|
|
215
|
-
case enums_1.ChainId.Arbitrum:
|
|
216
|
-
if (isEOA)
|
|
217
|
-
return isBoost ? enums_1.Bundles.ArbitrumIds.COMP_V3_EOA_BOOST : enums_1.Bundles.ArbitrumIds.COMP_V3_EOA_REPAY;
|
|
218
|
-
return isBoost ? enums_1.Bundles.ArbitrumIds.COMP_V3_SW_BOOST_BUNDLE : enums_1.Bundles.ArbitrumIds.COMP_V3_SW_REPAY_BUNDLE;
|
|
219
|
-
default:
|
|
220
|
-
throw new Error(`Compound V3 leverage management is not supported on network ${network}`);
|
|
221
|
-
}
|
|
222
|
-
}
|
|
223
|
-
exports.getCompoundV3LeverageManagementBundleId = getCompoundV3LeverageManagementBundleId;
|
|
@@ -296,29 +296,4 @@ describe('Feature: utils.ts', () => {
|
|
|
296
296
|
});
|
|
297
297
|
});
|
|
298
298
|
});
|
|
299
|
-
describe('When testing utils.getCompoundV3LeverageManagementBundleId()', () => {
|
|
300
|
-
// Mainnet uses the V2 bundle ids; L2s use the original bundle ids.
|
|
301
|
-
const examples = [
|
|
302
|
-
[enums_1.Bundles.MainnetIds.COMP_V3_SW_REPAY_V2_BUNDLE, [enums_1.ChainId.Ethereum, false, false]],
|
|
303
|
-
[enums_1.Bundles.MainnetIds.COMP_V3_SW_BOOST_V2_BUNDLE, [enums_1.ChainId.Ethereum, false, true]],
|
|
304
|
-
[enums_1.Bundles.MainnetIds.COMP_V3_EOA_REPAY_V2_BUNDLE, [enums_1.ChainId.Ethereum, true, false]],
|
|
305
|
-
[enums_1.Bundles.MainnetIds.COMP_V3_EOA_BOOST_V2_BUNDLE, [enums_1.ChainId.Ethereum, true, true]],
|
|
306
|
-
[enums_1.Bundles.BaseIds.COMP_V3_SW_REPAY_BUNDLE, [enums_1.ChainId.Base, false, false]],
|
|
307
|
-
[enums_1.Bundles.BaseIds.COMP_V3_SW_BOOST_BUNDLE, [enums_1.ChainId.Base, false, true]],
|
|
308
|
-
[enums_1.Bundles.BaseIds.COMP_V3_EOA_REPAY, [enums_1.ChainId.Base, true, false]],
|
|
309
|
-
[enums_1.Bundles.BaseIds.COMP_V3_EOA_BOOST, [enums_1.ChainId.Base, true, true]],
|
|
310
|
-
[enums_1.Bundles.ArbitrumIds.COMP_V3_SW_REPAY_BUNDLE, [enums_1.ChainId.Arbitrum, false, false]],
|
|
311
|
-
[enums_1.Bundles.ArbitrumIds.COMP_V3_SW_BOOST_BUNDLE, [enums_1.ChainId.Arbitrum, false, true]],
|
|
312
|
-
[enums_1.Bundles.ArbitrumIds.COMP_V3_EOA_REPAY, [enums_1.ChainId.Arbitrum, true, false]],
|
|
313
|
-
[enums_1.Bundles.ArbitrumIds.COMP_V3_EOA_BOOST, [enums_1.ChainId.Arbitrum, true, true]],
|
|
314
|
-
];
|
|
315
|
-
examples.forEach(([expected, actual]) => {
|
|
316
|
-
it(`Given ${actual} should return expected value: ${expected}`, () => {
|
|
317
|
-
(0, chai_1.expect)((0, utils_1.getCompoundV3LeverageManagementBundleId)(...actual)).to.equal(expected);
|
|
318
|
-
});
|
|
319
|
-
});
|
|
320
|
-
it(`Given ${enums_1.ChainId.Optimism} (unsupported) should throw an error`, () => {
|
|
321
|
-
(0, chai_1.expect)(() => (0, utils_1.getCompoundV3LeverageManagementBundleId)(enums_1.ChainId.Optimism, false, false)).to.throw(Error);
|
|
322
|
-
});
|
|
323
|
-
});
|
|
324
299
|
});
|
package/cjs/types/enums.d.ts
CHANGED
|
@@ -138,9 +138,7 @@ export declare namespace Strategies {
|
|
|
138
138
|
EoaBoostOnPrice = "eoa-boost-on-price",
|
|
139
139
|
EoaRepayOnPrice = "eoa-repay-on-price",
|
|
140
140
|
CollateralSwitch = "collateral-switch",
|
|
141
|
-
EoaCollateralSwitch = "eoa-collateral-switch"
|
|
142
|
-
LiquidationProtection = "liquidation-protection",
|
|
143
|
-
EoaLiquidationProtection = "liquidation-protection-eoa"
|
|
141
|
+
EoaCollateralSwitch = "eoa-collateral-switch"
|
|
144
142
|
}
|
|
145
143
|
enum IdOverrides {
|
|
146
144
|
TakeProfit = "take-profit",
|
|
@@ -151,9 +149,7 @@ export declare namespace Strategies {
|
|
|
151
149
|
LeverageManagement = "leverage-management",
|
|
152
150
|
EoaLeverageManagement = "leverage-management-eoa",
|
|
153
151
|
LeverageManagementOnPrice = "leverage-management-on-price",
|
|
154
|
-
EoaLeverageManagementOnPrice = "leverage-management-on-price-eoa"
|
|
155
|
-
LiquidationProtection = "liquidation-protection",
|
|
156
|
-
EoaLiquidationProtection = "liquidation-protection-eoa"
|
|
152
|
+
EoaLeverageManagementOnPrice = "leverage-management-on-price-eoa"
|
|
157
153
|
}
|
|
158
154
|
}
|
|
159
155
|
export declare namespace Bundles {
|
|
@@ -229,17 +225,7 @@ export declare namespace Bundles {
|
|
|
229
225
|
AAVE_V4_EOA_REPAY_ON_PRICE = 68,
|
|
230
226
|
AAVE_V4_EOA_BOOST_ON_PRICE = 69,
|
|
231
227
|
AAVE_V4_EOA_CLOSE = 70,
|
|
232
|
-
|
|
233
|
-
SPARK_SW_LIQUIDATION_PROTECTION = 72,
|
|
234
|
-
MAKER_SW_LIQUIDATION_PROTECTION = 75,
|
|
235
|
-
FLUID_T1_SW_LIQUIDATION_PROTECTION = 76,
|
|
236
|
-
AAVE_V4_SW_LIQUIDATION_PROTECTION = 77,
|
|
237
|
-
MORPHO_BLUE_SW_LIQUIDATION_PROTECTION = 78,
|
|
238
|
-
AAVE_V3_EOA_LIQUIDATION_PROTECTION = 79,
|
|
239
|
-
AAVE_V4_EOA_LIQUIDATION_PROTECTION = 80,
|
|
240
|
-
MORPHO_BLUE_EOA_LIQUIDATION_PROTECTION = 81,
|
|
241
|
-
COMP_V3_SW_LIQUIDATION_PROTECTION = 82,
|
|
242
|
-
COMP_V3_EOA_LIQUIDATION_PROTECTION = 83
|
|
228
|
+
MORPHO_BLUE_REPAY_ON_PRICE = 84
|
|
243
229
|
}
|
|
244
230
|
enum OptimismIds {
|
|
245
231
|
AAVE_V3_REPAY = 0,
|
|
@@ -252,9 +238,7 @@ export declare namespace Bundles {
|
|
|
252
238
|
AAVE_V3_EOA_BOOST = 7,
|
|
253
239
|
AAVE_V3_EOA_REPAY_ON_PRICE = 8,
|
|
254
240
|
AAVE_V3_EOA_BOOST_ON_PRICE = 9,
|
|
255
|
-
AAVE_V3_EOA_CLOSE = 10
|
|
256
|
-
AAVE_V3_SW_LIQUIDATION_PROTECTION = 11,
|
|
257
|
-
AAVE_V3_EOA_LIQUIDATION_PROTECTION = 12
|
|
241
|
+
AAVE_V3_EOA_CLOSE = 10
|
|
258
242
|
}
|
|
259
243
|
enum BaseIds {
|
|
260
244
|
AAVE_V3_REPAY = 0,
|
|
@@ -284,12 +268,7 @@ export declare namespace Bundles {
|
|
|
284
268
|
AAVE_V3_EOA_BOOST_ON_PRICE = 26,
|
|
285
269
|
AAVE_V3_EOA_CLOSE = 27,
|
|
286
270
|
MORPHO_BLUE_CLOSE = 28,
|
|
287
|
-
|
|
288
|
-
FLUID_T1_SW_LIQUIDATION_PROTECTION = 30,
|
|
289
|
-
COMP_V3_SW_LIQUIDATION_PROTECTION = 32,
|
|
290
|
-
COMP_V3_EOA_LIQUIDATION_PROTECTION = 33,
|
|
291
|
-
AAVE_V3_EOA_LIQUIDATION_PROTECTION = 34,
|
|
292
|
-
MORPHO_BLUE_SW_LIQUIDATION_PROTECTION = 35
|
|
271
|
+
MORPHO_BLUE_REPAY_ON_PRICE = 36
|
|
293
272
|
}
|
|
294
273
|
enum ArbitrumIds {
|
|
295
274
|
AAVE_V3_REPAY = 0,
|
|
@@ -321,12 +300,6 @@ export declare namespace Bundles {
|
|
|
321
300
|
MORPHO_BLUE_EOA_REPAY = 26,
|
|
322
301
|
MORPHO_BLUE_EOA_BOOST = 27,
|
|
323
302
|
MORPHO_BLUE_CLOSE = 28,
|
|
324
|
-
|
|
325
|
-
FLUID_T1_SW_LIQUIDATION_PROTECTION = 30,
|
|
326
|
-
MORPHO_BLUE_SW_LIQUIDATION_PROTECTION = 31,
|
|
327
|
-
COMP_V3_SW_LIQUIDATION_PROTECTION = 32,
|
|
328
|
-
COMP_V3_EOA_LIQUIDATION_PROTECTION = 33,
|
|
329
|
-
AAVE_V3_EOA_LIQUIDATION_PROTECTION = 34,
|
|
330
|
-
MORPHO_BLUE_EOA_LIQUIDATION_PROTECTION = 35
|
|
303
|
+
MORPHO_BLUE_REPAY_ON_PRICE = 36
|
|
331
304
|
}
|
|
332
305
|
}
|
package/cjs/types/enums.js
CHANGED
|
@@ -159,8 +159,6 @@ var Strategies;
|
|
|
159
159
|
Identifiers["EoaRepayOnPrice"] = "eoa-repay-on-price";
|
|
160
160
|
Identifiers["CollateralSwitch"] = "collateral-switch";
|
|
161
161
|
Identifiers["EoaCollateralSwitch"] = "eoa-collateral-switch";
|
|
162
|
-
Identifiers["LiquidationProtection"] = "liquidation-protection";
|
|
163
|
-
Identifiers["EoaLiquidationProtection"] = "liquidation-protection-eoa";
|
|
164
162
|
})(Identifiers = Strategies.Identifiers || (Strategies.Identifiers = {}));
|
|
165
163
|
let IdOverrides;
|
|
166
164
|
(function (IdOverrides) {
|
|
@@ -173,8 +171,6 @@ var Strategies;
|
|
|
173
171
|
IdOverrides["EoaLeverageManagement"] = "leverage-management-eoa";
|
|
174
172
|
IdOverrides["LeverageManagementOnPrice"] = "leverage-management-on-price";
|
|
175
173
|
IdOverrides["EoaLeverageManagementOnPrice"] = "leverage-management-on-price-eoa";
|
|
176
|
-
IdOverrides["LiquidationProtection"] = "liquidation-protection";
|
|
177
|
-
IdOverrides["EoaLiquidationProtection"] = "liquidation-protection-eoa";
|
|
178
174
|
})(IdOverrides = Strategies.IdOverrides || (Strategies.IdOverrides = {}));
|
|
179
175
|
})(Strategies = exports.Strategies || (exports.Strategies = {}));
|
|
180
176
|
var Bundles;
|
|
@@ -252,17 +248,7 @@ var Bundles;
|
|
|
252
248
|
MainnetIds[MainnetIds["AAVE_V4_EOA_REPAY_ON_PRICE"] = 68] = "AAVE_V4_EOA_REPAY_ON_PRICE";
|
|
253
249
|
MainnetIds[MainnetIds["AAVE_V4_EOA_BOOST_ON_PRICE"] = 69] = "AAVE_V4_EOA_BOOST_ON_PRICE";
|
|
254
250
|
MainnetIds[MainnetIds["AAVE_V4_EOA_CLOSE"] = 70] = "AAVE_V4_EOA_CLOSE";
|
|
255
|
-
MainnetIds[MainnetIds["
|
|
256
|
-
MainnetIds[MainnetIds["SPARK_SW_LIQUIDATION_PROTECTION"] = 72] = "SPARK_SW_LIQUIDATION_PROTECTION";
|
|
257
|
-
MainnetIds[MainnetIds["MAKER_SW_LIQUIDATION_PROTECTION"] = 75] = "MAKER_SW_LIQUIDATION_PROTECTION";
|
|
258
|
-
MainnetIds[MainnetIds["FLUID_T1_SW_LIQUIDATION_PROTECTION"] = 76] = "FLUID_T1_SW_LIQUIDATION_PROTECTION";
|
|
259
|
-
MainnetIds[MainnetIds["AAVE_V4_SW_LIQUIDATION_PROTECTION"] = 77] = "AAVE_V4_SW_LIQUIDATION_PROTECTION";
|
|
260
|
-
MainnetIds[MainnetIds["MORPHO_BLUE_SW_LIQUIDATION_PROTECTION"] = 78] = "MORPHO_BLUE_SW_LIQUIDATION_PROTECTION";
|
|
261
|
-
MainnetIds[MainnetIds["AAVE_V3_EOA_LIQUIDATION_PROTECTION"] = 79] = "AAVE_V3_EOA_LIQUIDATION_PROTECTION";
|
|
262
|
-
MainnetIds[MainnetIds["AAVE_V4_EOA_LIQUIDATION_PROTECTION"] = 80] = "AAVE_V4_EOA_LIQUIDATION_PROTECTION";
|
|
263
|
-
MainnetIds[MainnetIds["MORPHO_BLUE_EOA_LIQUIDATION_PROTECTION"] = 81] = "MORPHO_BLUE_EOA_LIQUIDATION_PROTECTION";
|
|
264
|
-
MainnetIds[MainnetIds["COMP_V3_SW_LIQUIDATION_PROTECTION"] = 82] = "COMP_V3_SW_LIQUIDATION_PROTECTION";
|
|
265
|
-
MainnetIds[MainnetIds["COMP_V3_EOA_LIQUIDATION_PROTECTION"] = 83] = "COMP_V3_EOA_LIQUIDATION_PROTECTION";
|
|
251
|
+
MainnetIds[MainnetIds["MORPHO_BLUE_REPAY_ON_PRICE"] = 84] = "MORPHO_BLUE_REPAY_ON_PRICE";
|
|
266
252
|
})(MainnetIds = Bundles.MainnetIds || (Bundles.MainnetIds = {}));
|
|
267
253
|
let OptimismIds;
|
|
268
254
|
(function (OptimismIds) {
|
|
@@ -277,8 +263,6 @@ var Bundles;
|
|
|
277
263
|
OptimismIds[OptimismIds["AAVE_V3_EOA_REPAY_ON_PRICE"] = 8] = "AAVE_V3_EOA_REPAY_ON_PRICE";
|
|
278
264
|
OptimismIds[OptimismIds["AAVE_V3_EOA_BOOST_ON_PRICE"] = 9] = "AAVE_V3_EOA_BOOST_ON_PRICE";
|
|
279
265
|
OptimismIds[OptimismIds["AAVE_V3_EOA_CLOSE"] = 10] = "AAVE_V3_EOA_CLOSE";
|
|
280
|
-
OptimismIds[OptimismIds["AAVE_V3_SW_LIQUIDATION_PROTECTION"] = 11] = "AAVE_V3_SW_LIQUIDATION_PROTECTION";
|
|
281
|
-
OptimismIds[OptimismIds["AAVE_V3_EOA_LIQUIDATION_PROTECTION"] = 12] = "AAVE_V3_EOA_LIQUIDATION_PROTECTION";
|
|
282
266
|
})(OptimismIds = Bundles.OptimismIds || (Bundles.OptimismIds = {}));
|
|
283
267
|
let BaseIds;
|
|
284
268
|
(function (BaseIds) {
|
|
@@ -309,12 +293,7 @@ var Bundles;
|
|
|
309
293
|
BaseIds[BaseIds["AAVE_V3_EOA_BOOST_ON_PRICE"] = 26] = "AAVE_V3_EOA_BOOST_ON_PRICE";
|
|
310
294
|
BaseIds[BaseIds["AAVE_V3_EOA_CLOSE"] = 27] = "AAVE_V3_EOA_CLOSE";
|
|
311
295
|
BaseIds[BaseIds["MORPHO_BLUE_CLOSE"] = 28] = "MORPHO_BLUE_CLOSE";
|
|
312
|
-
BaseIds[BaseIds["
|
|
313
|
-
BaseIds[BaseIds["FLUID_T1_SW_LIQUIDATION_PROTECTION"] = 30] = "FLUID_T1_SW_LIQUIDATION_PROTECTION";
|
|
314
|
-
BaseIds[BaseIds["COMP_V3_SW_LIQUIDATION_PROTECTION"] = 32] = "COMP_V3_SW_LIQUIDATION_PROTECTION";
|
|
315
|
-
BaseIds[BaseIds["COMP_V3_EOA_LIQUIDATION_PROTECTION"] = 33] = "COMP_V3_EOA_LIQUIDATION_PROTECTION";
|
|
316
|
-
BaseIds[BaseIds["AAVE_V3_EOA_LIQUIDATION_PROTECTION"] = 34] = "AAVE_V3_EOA_LIQUIDATION_PROTECTION";
|
|
317
|
-
BaseIds[BaseIds["MORPHO_BLUE_SW_LIQUIDATION_PROTECTION"] = 35] = "MORPHO_BLUE_SW_LIQUIDATION_PROTECTION";
|
|
296
|
+
BaseIds[BaseIds["MORPHO_BLUE_REPAY_ON_PRICE"] = 36] = "MORPHO_BLUE_REPAY_ON_PRICE";
|
|
318
297
|
})(BaseIds = Bundles.BaseIds || (Bundles.BaseIds = {}));
|
|
319
298
|
let ArbitrumIds;
|
|
320
299
|
(function (ArbitrumIds) {
|
|
@@ -347,12 +326,6 @@ var Bundles;
|
|
|
347
326
|
ArbitrumIds[ArbitrumIds["MORPHO_BLUE_EOA_REPAY"] = 26] = "MORPHO_BLUE_EOA_REPAY";
|
|
348
327
|
ArbitrumIds[ArbitrumIds["MORPHO_BLUE_EOA_BOOST"] = 27] = "MORPHO_BLUE_EOA_BOOST";
|
|
349
328
|
ArbitrumIds[ArbitrumIds["MORPHO_BLUE_CLOSE"] = 28] = "MORPHO_BLUE_CLOSE";
|
|
350
|
-
ArbitrumIds[ArbitrumIds["
|
|
351
|
-
ArbitrumIds[ArbitrumIds["FLUID_T1_SW_LIQUIDATION_PROTECTION"] = 30] = "FLUID_T1_SW_LIQUIDATION_PROTECTION";
|
|
352
|
-
ArbitrumIds[ArbitrumIds["MORPHO_BLUE_SW_LIQUIDATION_PROTECTION"] = 31] = "MORPHO_BLUE_SW_LIQUIDATION_PROTECTION";
|
|
353
|
-
ArbitrumIds[ArbitrumIds["COMP_V3_SW_LIQUIDATION_PROTECTION"] = 32] = "COMP_V3_SW_LIQUIDATION_PROTECTION";
|
|
354
|
-
ArbitrumIds[ArbitrumIds["COMP_V3_EOA_LIQUIDATION_PROTECTION"] = 33] = "COMP_V3_EOA_LIQUIDATION_PROTECTION";
|
|
355
|
-
ArbitrumIds[ArbitrumIds["AAVE_V3_EOA_LIQUIDATION_PROTECTION"] = 34] = "AAVE_V3_EOA_LIQUIDATION_PROTECTION";
|
|
356
|
-
ArbitrumIds[ArbitrumIds["MORPHO_BLUE_EOA_LIQUIDATION_PROTECTION"] = 35] = "MORPHO_BLUE_EOA_LIQUIDATION_PROTECTION";
|
|
329
|
+
ArbitrumIds[ArbitrumIds["MORPHO_BLUE_REPAY_ON_PRICE"] = 36] = "MORPHO_BLUE_REPAY_ON_PRICE";
|
|
357
330
|
})(ArbitrumIds = Bundles.ArbitrumIds || (Bundles.ArbitrumIds = {}));
|
|
358
331
|
})(Bundles = exports.Bundles || (exports.Bundles = {}));
|
package/esm/constants/index.js
CHANGED
|
@@ -543,59 +543,9 @@ export const MAINNET_BUNDLES_INFO = {
|
|
|
543
543
|
strategyId: Strategies.Identifiers.EoaCloseOnPrice,
|
|
544
544
|
protocol: PROTOCOLS.AaveV4,
|
|
545
545
|
},
|
|
546
|
-
[Bundles.MainnetIds.
|
|
547
|
-
strategyOrBundleId: Bundles.MainnetIds.
|
|
548
|
-
strategyId: Strategies.Identifiers.
|
|
549
|
-
protocol: PROTOCOLS.MakerDAO,
|
|
550
|
-
},
|
|
551
|
-
[Bundles.MainnetIds.AAVE_V3_SW_LIQUIDATION_PROTECTION]: {
|
|
552
|
-
strategyOrBundleId: Bundles.MainnetIds.AAVE_V3_SW_LIQUIDATION_PROTECTION,
|
|
553
|
-
strategyId: Strategies.Identifiers.LiquidationProtection,
|
|
554
|
-
protocol: PROTOCOLS.AaveV3,
|
|
555
|
-
},
|
|
556
|
-
[Bundles.MainnetIds.AAVE_V4_SW_LIQUIDATION_PROTECTION]: {
|
|
557
|
-
strategyOrBundleId: Bundles.MainnetIds.AAVE_V4_SW_LIQUIDATION_PROTECTION,
|
|
558
|
-
strategyId: Strategies.Identifiers.LiquidationProtection,
|
|
559
|
-
protocol: PROTOCOLS.AaveV4,
|
|
560
|
-
},
|
|
561
|
-
[Bundles.MainnetIds.SPARK_SW_LIQUIDATION_PROTECTION]: {
|
|
562
|
-
strategyOrBundleId: Bundles.MainnetIds.SPARK_SW_LIQUIDATION_PROTECTION,
|
|
563
|
-
strategyId: Strategies.Identifiers.LiquidationProtection,
|
|
564
|
-
protocol: PROTOCOLS.Spark,
|
|
565
|
-
},
|
|
566
|
-
[Bundles.MainnetIds.COMP_V3_SW_LIQUIDATION_PROTECTION]: {
|
|
567
|
-
strategyOrBundleId: Bundles.MainnetIds.COMP_V3_SW_LIQUIDATION_PROTECTION,
|
|
568
|
-
strategyId: Strategies.Identifiers.LiquidationProtection,
|
|
569
|
-
protocol: PROTOCOLS.CompoundV3,
|
|
570
|
-
},
|
|
571
|
-
[Bundles.MainnetIds.COMP_V3_EOA_LIQUIDATION_PROTECTION]: {
|
|
572
|
-
strategyOrBundleId: Bundles.MainnetIds.COMP_V3_EOA_LIQUIDATION_PROTECTION,
|
|
573
|
-
strategyId: Strategies.Identifiers.EoaLiquidationProtection,
|
|
574
|
-
protocol: PROTOCOLS.CompoundV3,
|
|
575
|
-
},
|
|
576
|
-
[Bundles.MainnetIds.MORPHO_BLUE_SW_LIQUIDATION_PROTECTION]: {
|
|
577
|
-
strategyOrBundleId: Bundles.MainnetIds.MORPHO_BLUE_SW_LIQUIDATION_PROTECTION,
|
|
578
|
-
strategyId: Strategies.Identifiers.LiquidationProtection,
|
|
579
|
-
protocol: PROTOCOLS.MorphoBlue,
|
|
580
|
-
},
|
|
581
|
-
[Bundles.MainnetIds.FLUID_T1_SW_LIQUIDATION_PROTECTION]: {
|
|
582
|
-
strategyOrBundleId: Bundles.MainnetIds.FLUID_T1_SW_LIQUIDATION_PROTECTION,
|
|
583
|
-
strategyId: Strategies.Identifiers.LiquidationProtection,
|
|
584
|
-
protocol: PROTOCOLS.FluidT1,
|
|
585
|
-
},
|
|
586
|
-
[Bundles.MainnetIds.AAVE_V3_EOA_LIQUIDATION_PROTECTION]: {
|
|
587
|
-
strategyOrBundleId: Bundles.MainnetIds.AAVE_V3_EOA_LIQUIDATION_PROTECTION,
|
|
588
|
-
strategyId: Strategies.Identifiers.EoaLiquidationProtection,
|
|
589
|
-
protocol: PROTOCOLS.AaveV3,
|
|
590
|
-
},
|
|
591
|
-
[Bundles.MainnetIds.AAVE_V4_EOA_LIQUIDATION_PROTECTION]: {
|
|
592
|
-
strategyOrBundleId: Bundles.MainnetIds.AAVE_V4_EOA_LIQUIDATION_PROTECTION,
|
|
593
|
-
strategyId: Strategies.Identifiers.EoaLiquidationProtection,
|
|
594
|
-
protocol: PROTOCOLS.AaveV4,
|
|
595
|
-
},
|
|
596
|
-
[Bundles.MainnetIds.MORPHO_BLUE_EOA_LIQUIDATION_PROTECTION]: {
|
|
597
|
-
strategyOrBundleId: Bundles.MainnetIds.MORPHO_BLUE_EOA_LIQUIDATION_PROTECTION,
|
|
598
|
-
strategyId: Strategies.Identifiers.EoaLiquidationProtection,
|
|
546
|
+
[Bundles.MainnetIds.MORPHO_BLUE_REPAY_ON_PRICE]: {
|
|
547
|
+
strategyOrBundleId: Bundles.MainnetIds.MORPHO_BLUE_REPAY_ON_PRICE,
|
|
548
|
+
strategyId: Strategies.Identifiers.RepayOnPrice,
|
|
599
549
|
protocol: PROTOCOLS.MorphoBlue,
|
|
600
550
|
},
|
|
601
551
|
};
|
|
@@ -655,16 +605,6 @@ export const OPTIMISM_BUNDLES_INFO = {
|
|
|
655
605
|
strategyId: Strategies.Identifiers.EoaCloseOnPrice,
|
|
656
606
|
protocol: PROTOCOLS.AaveV3,
|
|
657
607
|
},
|
|
658
|
-
[Bundles.OptimismIds.AAVE_V3_SW_LIQUIDATION_PROTECTION]: {
|
|
659
|
-
strategyOrBundleId: Bundles.OptimismIds.AAVE_V3_SW_LIQUIDATION_PROTECTION,
|
|
660
|
-
strategyId: Strategies.Identifiers.LiquidationProtection,
|
|
661
|
-
protocol: PROTOCOLS.AaveV3,
|
|
662
|
-
},
|
|
663
|
-
[Bundles.OptimismIds.AAVE_V3_EOA_LIQUIDATION_PROTECTION]: {
|
|
664
|
-
strategyOrBundleId: Bundles.OptimismIds.AAVE_V3_EOA_LIQUIDATION_PROTECTION,
|
|
665
|
-
strategyId: Strategies.Identifiers.EoaLiquidationProtection,
|
|
666
|
-
protocol: PROTOCOLS.AaveV3,
|
|
667
|
-
},
|
|
668
608
|
};
|
|
669
609
|
export const BASE_BUNDLES_INFO = {
|
|
670
610
|
[Bundles.BaseIds.AAVE_V3_REPAY]: {
|
|
@@ -802,36 +742,11 @@ export const BASE_BUNDLES_INFO = {
|
|
|
802
742
|
strategyId: Strategies.Identifiers.CloseOnPrice,
|
|
803
743
|
protocol: PROTOCOLS.MorphoBlue,
|
|
804
744
|
},
|
|
805
|
-
[Bundles.BaseIds.
|
|
806
|
-
strategyOrBundleId: Bundles.BaseIds.
|
|
807
|
-
strategyId: Strategies.Identifiers.
|
|
808
|
-
protocol: PROTOCOLS.AaveV3,
|
|
809
|
-
},
|
|
810
|
-
[Bundles.BaseIds.COMP_V3_SW_LIQUIDATION_PROTECTION]: {
|
|
811
|
-
strategyOrBundleId: Bundles.BaseIds.COMP_V3_SW_LIQUIDATION_PROTECTION,
|
|
812
|
-
strategyId: Strategies.Identifiers.LiquidationProtection,
|
|
813
|
-
protocol: PROTOCOLS.CompoundV3,
|
|
814
|
-
},
|
|
815
|
-
[Bundles.BaseIds.COMP_V3_EOA_LIQUIDATION_PROTECTION]: {
|
|
816
|
-
strategyOrBundleId: Bundles.BaseIds.COMP_V3_EOA_LIQUIDATION_PROTECTION,
|
|
817
|
-
strategyId: Strategies.Identifiers.EoaLiquidationProtection,
|
|
818
|
-
protocol: PROTOCOLS.CompoundV3,
|
|
819
|
-
},
|
|
820
|
-
[Bundles.BaseIds.MORPHO_BLUE_SW_LIQUIDATION_PROTECTION]: {
|
|
821
|
-
strategyOrBundleId: Bundles.BaseIds.MORPHO_BLUE_SW_LIQUIDATION_PROTECTION,
|
|
822
|
-
strategyId: Strategies.Identifiers.LiquidationProtection,
|
|
745
|
+
[Bundles.BaseIds.MORPHO_BLUE_REPAY_ON_PRICE]: {
|
|
746
|
+
strategyOrBundleId: Bundles.BaseIds.MORPHO_BLUE_REPAY_ON_PRICE,
|
|
747
|
+
strategyId: Strategies.Identifiers.RepayOnPrice,
|
|
823
748
|
protocol: PROTOCOLS.MorphoBlue,
|
|
824
749
|
},
|
|
825
|
-
[Bundles.BaseIds.FLUID_T1_SW_LIQUIDATION_PROTECTION]: {
|
|
826
|
-
strategyOrBundleId: Bundles.BaseIds.FLUID_T1_SW_LIQUIDATION_PROTECTION,
|
|
827
|
-
strategyId: Strategies.Identifiers.LiquidationProtection,
|
|
828
|
-
protocol: PROTOCOLS.FluidT1,
|
|
829
|
-
},
|
|
830
|
-
[Bundles.BaseIds.AAVE_V3_EOA_LIQUIDATION_PROTECTION]: {
|
|
831
|
-
strategyOrBundleId: Bundles.BaseIds.AAVE_V3_EOA_LIQUIDATION_PROTECTION,
|
|
832
|
-
strategyId: Strategies.Identifiers.EoaLiquidationProtection,
|
|
833
|
-
protocol: PROTOCOLS.AaveV3,
|
|
834
|
-
},
|
|
835
750
|
};
|
|
836
751
|
export const ARBITRUM_BUNDLES_INFO = {
|
|
837
752
|
[Bundles.ArbitrumIds.AAVE_V3_REPAY]: {
|
|
@@ -979,39 +894,9 @@ export const ARBITRUM_BUNDLES_INFO = {
|
|
|
979
894
|
strategyId: Strategies.Identifiers.CloseOnPrice,
|
|
980
895
|
protocol: PROTOCOLS.MorphoBlue,
|
|
981
896
|
},
|
|
982
|
-
[Bundles.ArbitrumIds.
|
|
983
|
-
strategyOrBundleId: Bundles.ArbitrumIds.
|
|
984
|
-
strategyId: Strategies.Identifiers.
|
|
985
|
-
protocol: PROTOCOLS.AaveV3,
|
|
986
|
-
},
|
|
987
|
-
[Bundles.ArbitrumIds.COMP_V3_SW_LIQUIDATION_PROTECTION]: {
|
|
988
|
-
strategyOrBundleId: Bundles.ArbitrumIds.COMP_V3_SW_LIQUIDATION_PROTECTION,
|
|
989
|
-
strategyId: Strategies.Identifiers.LiquidationProtection,
|
|
990
|
-
protocol: PROTOCOLS.CompoundV3,
|
|
991
|
-
},
|
|
992
|
-
[Bundles.ArbitrumIds.COMP_V3_EOA_LIQUIDATION_PROTECTION]: {
|
|
993
|
-
strategyOrBundleId: Bundles.ArbitrumIds.COMP_V3_EOA_LIQUIDATION_PROTECTION,
|
|
994
|
-
strategyId: Strategies.Identifiers.EoaLiquidationProtection,
|
|
995
|
-
protocol: PROTOCOLS.CompoundV3,
|
|
996
|
-
},
|
|
997
|
-
[Bundles.ArbitrumIds.MORPHO_BLUE_SW_LIQUIDATION_PROTECTION]: {
|
|
998
|
-
strategyOrBundleId: Bundles.ArbitrumIds.MORPHO_BLUE_SW_LIQUIDATION_PROTECTION,
|
|
999
|
-
strategyId: Strategies.Identifiers.LiquidationProtection,
|
|
1000
|
-
protocol: PROTOCOLS.MorphoBlue,
|
|
1001
|
-
},
|
|
1002
|
-
[Bundles.ArbitrumIds.FLUID_T1_SW_LIQUIDATION_PROTECTION]: {
|
|
1003
|
-
strategyOrBundleId: Bundles.ArbitrumIds.FLUID_T1_SW_LIQUIDATION_PROTECTION,
|
|
1004
|
-
strategyId: Strategies.Identifiers.LiquidationProtection,
|
|
1005
|
-
protocol: PROTOCOLS.FluidT1,
|
|
1006
|
-
},
|
|
1007
|
-
[Bundles.ArbitrumIds.AAVE_V3_EOA_LIQUIDATION_PROTECTION]: {
|
|
1008
|
-
strategyOrBundleId: Bundles.ArbitrumIds.AAVE_V3_EOA_LIQUIDATION_PROTECTION,
|
|
1009
|
-
strategyId: Strategies.Identifiers.EoaLiquidationProtection,
|
|
1010
|
-
protocol: PROTOCOLS.AaveV3,
|
|
1011
|
-
},
|
|
1012
|
-
[Bundles.ArbitrumIds.MORPHO_BLUE_EOA_LIQUIDATION_PROTECTION]: {
|
|
1013
|
-
strategyOrBundleId: Bundles.ArbitrumIds.MORPHO_BLUE_EOA_LIQUIDATION_PROTECTION,
|
|
1014
|
-
strategyId: Strategies.Identifiers.EoaLiquidationProtection,
|
|
897
|
+
[Bundles.ArbitrumIds.MORPHO_BLUE_REPAY_ON_PRICE]: {
|
|
898
|
+
strategyOrBundleId: Bundles.ArbitrumIds.MORPHO_BLUE_REPAY_ON_PRICE,
|
|
899
|
+
strategyId: Strategies.Identifiers.RepayOnPrice,
|
|
1015
900
|
protocol: PROTOCOLS.MorphoBlue,
|
|
1016
901
|
},
|
|
1017
902
|
};
|
package/esm/index.d.ts
CHANGED
|
@@ -13,13 +13,12 @@ import * as strategiesService from './services/strategiesService';
|
|
|
13
13
|
import * as constants from './constants';
|
|
14
14
|
import * as enums from './types/enums';
|
|
15
15
|
import type * as types from './types';
|
|
16
|
-
import { getRatioStateInfoForAaveCloseStrategy, compareSubHashes, encodeSubId, getCloseStrategyType
|
|
16
|
+
import { getRatioStateInfoForAaveCloseStrategy, compareSubHashes, encodeSubId, getCloseStrategyType } from './services/utils';
|
|
17
17
|
declare const utils: {
|
|
18
|
+
getRatioStateInfoForAaveCloseStrategy: typeof getRatioStateInfoForAaveCloseStrategy;
|
|
18
19
|
compareSubHashes: typeof compareSubHashes;
|
|
19
20
|
encodeSubId: typeof encodeSubId;
|
|
20
21
|
getCloseStrategyType: typeof getCloseStrategyType;
|
|
21
|
-
getCompoundV3LeverageManagementBundleId: typeof getCompoundV3LeverageManagementBundleId;
|
|
22
|
-
getRatioStateInfoForAaveCloseStrategy: typeof getRatioStateInfoForAaveCloseStrategy;
|
|
23
22
|
};
|
|
24
|
-
export {
|
|
23
|
+
export { LegacyMakerAutomation, LegacyAaveAutomation, LegacyCompoundAutomation, EthereumStrategies, OptimismStrategies, ArbitrumStrategies, BaseStrategies, triggerService, subDataService, strategySubService, utils, enums, constants, strategiesService, };
|
|
25
24
|
export type { types };
|
package/esm/index.js
CHANGED
|
@@ -16,12 +16,8 @@ import * as strategySubService from './services/strategySubService';
|
|
|
16
16
|
import * as strategiesService from './services/strategiesService';
|
|
17
17
|
import * as constants from './constants';
|
|
18
18
|
import * as enums from './types/enums';
|
|
19
|
-
import { getRatioStateInfoForAaveCloseStrategy, compareSubHashes, encodeSubId, getCloseStrategyType,
|
|
19
|
+
import { getRatioStateInfoForAaveCloseStrategy, compareSubHashes, encodeSubId, getCloseStrategyType, } from './services/utils';
|
|
20
20
|
const utils = {
|
|
21
|
-
compareSubHashes,
|
|
22
|
-
encodeSubId,
|
|
23
|
-
getCloseStrategyType,
|
|
24
|
-
getCompoundV3LeverageManagementBundleId,
|
|
25
|
-
getRatioStateInfoForAaveCloseStrategy,
|
|
21
|
+
getRatioStateInfoForAaveCloseStrategy, compareSubHashes, encodeSubId, getCloseStrategyType,
|
|
26
22
|
};
|
|
27
|
-
export {
|
|
23
|
+
export { LegacyMakerAutomation, LegacyAaveAutomation, LegacyCompoundAutomation, EthereumStrategies, OptimismStrategies, ArbitrumStrategies, BaseStrategies, triggerService, subDataService, strategySubService, utils, enums, constants, strategiesService, };
|