@defisaver/sdk 1.3.18 → 1.3.21-aave-v4-dev

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (71) hide show
  1. package/esm/src/Strategy.d.ts +1 -0
  2. package/esm/src/Strategy.js +3 -0
  3. package/esm/src/actions/aavev4/AaveV4BorrowAction.d.ts +17 -0
  4. package/esm/src/actions/aavev4/AaveV4BorrowAction.js +26 -0
  5. package/esm/src/actions/aavev4/AaveV4CollateralSwitchAction.d.ts +16 -0
  6. package/esm/src/actions/aavev4/AaveV4CollateralSwitchAction.js +24 -0
  7. package/esm/src/actions/aavev4/AaveV4DelegateBorrowWithSigAction.d.ts +14 -0
  8. package/esm/src/actions/aavev4/AaveV4DelegateBorrowWithSigAction.js +19 -0
  9. package/esm/src/actions/aavev4/AaveV4DelegateSetUsingAsCollateralWithSigAction.d.ts +14 -0
  10. package/esm/src/actions/aavev4/AaveV4DelegateSetUsingAsCollateralWithSigAction.js +19 -0
  11. package/esm/src/actions/aavev4/AaveV4DelegateWithdrawWithSigAction.d.ts +14 -0
  12. package/esm/src/actions/aavev4/AaveV4DelegateWithdrawWithSigAction.js +19 -0
  13. package/esm/src/actions/aavev4/AaveV4PaybackAction.d.ts +23 -0
  14. package/esm/src/actions/aavev4/AaveV4PaybackAction.js +46 -0
  15. package/esm/src/actions/aavev4/AaveV4RefreshPremiumAction.d.ts +15 -0
  16. package/esm/src/actions/aavev4/AaveV4RefreshPremiumAction.js +22 -0
  17. package/esm/src/actions/aavev4/AaveV4SetUserManagersWithSigAction.d.ts +18 -0
  18. package/esm/src/actions/aavev4/AaveV4SetUserManagersWithSigAction.js +20 -0
  19. package/esm/src/actions/aavev4/AaveV4StoreRatioAction.d.ts +14 -0
  20. package/esm/src/actions/aavev4/AaveV4StoreRatioAction.js +20 -0
  21. package/esm/src/actions/aavev4/AaveV4SupplyAction.d.ts +25 -0
  22. package/esm/src/actions/aavev4/AaveV4SupplyAction.js +49 -0
  23. package/esm/src/actions/aavev4/AaveV4WithdrawAction.d.ts +17 -0
  24. package/esm/src/actions/aavev4/AaveV4WithdrawAction.js +26 -0
  25. package/esm/src/actions/aavev4/index.d.ts +11 -0
  26. package/esm/src/actions/aavev4/index.js +11 -0
  27. package/esm/src/actions/checkers/AaveV4RatioCheckAction.d.ts +16 -0
  28. package/esm/src/actions/checkers/AaveV4RatioCheckAction.js +24 -0
  29. package/esm/src/actions/checkers/SparkRatioCheckAction.js +1 -1
  30. package/esm/src/actions/checkers/SparkTargetRatioCheck.d.ts +14 -0
  31. package/esm/src/actions/checkers/SparkTargetRatioCheck.js +20 -0
  32. package/esm/src/actions/checkers/index.d.ts +2 -0
  33. package/esm/src/actions/checkers/index.js +2 -0
  34. package/esm/src/actions/index.d.ts +2 -1
  35. package/esm/src/actions/index.js +2 -1
  36. package/esm/src/addresses.d.ts +60 -0
  37. package/esm/src/addresses.js +11 -0
  38. package/esm/src/index.d.ts +240 -0
  39. package/esm/src/triggers/AaveV4QuotePriceRangeTrigger.d.ts +10 -0
  40. package/esm/src/triggers/AaveV4QuotePriceRangeTrigger.js +12 -0
  41. package/esm/src/triggers/AaveV4QuotePriceTrigger.d.ts +10 -0
  42. package/esm/src/triggers/AaveV4QuotePriceTrigger.js +12 -0
  43. package/esm/src/triggers/AaveV4RatioTrigger.d.ts +10 -0
  44. package/esm/src/triggers/AaveV4RatioTrigger.js +12 -0
  45. package/esm/src/triggers/index.d.ts +3 -0
  46. package/esm/src/triggers/index.js +3 -0
  47. package/package.json +1 -1
  48. package/src/Strategy.ts +4 -0
  49. package/src/actions/aavev4/AaveV4BorrowAction.ts +39 -0
  50. package/src/actions/aavev4/AaveV4CollateralSwitchAction.ts +36 -0
  51. package/src/actions/aavev4/AaveV4DelegateBorrowWithSigAction.ts +29 -0
  52. package/src/actions/aavev4/AaveV4DelegateSetUsingAsCollateralWithSigAction.ts +29 -0
  53. package/src/actions/aavev4/AaveV4DelegateWithdrawWithSigAction.ts +29 -0
  54. package/src/actions/aavev4/AaveV4PaybackAction.ts +51 -0
  55. package/src/actions/aavev4/AaveV4RefreshPremiumAction.ts +33 -0
  56. package/src/actions/aavev4/AaveV4SetUserManagersWithSigAction.ts +34 -0
  57. package/src/actions/aavev4/AaveV4StoreRatioAction.ts +30 -0
  58. package/src/actions/aavev4/AaveV4SupplyAction.ts +55 -0
  59. package/src/actions/aavev4/AaveV4WithdrawAction.ts +39 -0
  60. package/src/actions/aavev4/index.ts +11 -0
  61. package/src/actions/checkers/AaveV4RatioCheckAction.ts +36 -0
  62. package/src/actions/checkers/SparkRatioCheckAction.ts +1 -1
  63. package/src/actions/checkers/SparkTargetRatioCheck.ts +23 -0
  64. package/src/actions/checkers/index.ts +3 -1
  65. package/src/actions/index.ts +2 -0
  66. package/src/addresses.ts +12 -0
  67. package/src/triggers/AaveV4QuotePriceRangeTrigger.ts +25 -0
  68. package/src/triggers/AaveV4QuotePriceTrigger.ts +25 -0
  69. package/src/triggers/AaveV4RatioTrigger.ts +24 -0
  70. package/src/triggers/index.ts +4 -1
  71. package/umd/index.js +1133 -562
@@ -15,3 +15,5 @@ export * from './LiquityV2RatioCheckAction';
15
15
  export * from './LiquityV2TargetRatioCheckAction';
16
16
  export * from './LiquityV2NewInterestRateCheckerAction';
17
17
  export * from './FluidRatioCheckAction';
18
+ export * from './SparkTargetRatioCheck';
19
+ export * from './AaveV4RatioCheckAction';
@@ -39,4 +39,5 @@ import * as etherfi from './etherfi';
39
39
  import * as fluid from './fluid';
40
40
  import * as pendle from './pendle';
41
41
  import * as umbrella from './umbrella';
42
- export { aave, maker, compound, basic, flashloan, uniswap, reflexer, dydx, uniswapV3, checkers, liquity, yearn, lido, insta, balancer, curve, guni, mstable, rari, aaveV3, convex, chickenBonds, compoundV3, morpho, bprotocol, lsv, spark, curveusd, morphoblue, summerfi, llamalend, merkl, eulerV2, sky, liquityV2, stkgho, renzo, etherfi, fluid, pendle, umbrella, };
42
+ import * as aaveV4 from './aavev4';
43
+ export { aave, maker, compound, basic, flashloan, uniswap, reflexer, dydx, uniswapV3, checkers, liquity, yearn, lido, insta, balancer, curve, guni, mstable, rari, aaveV3, convex, chickenBonds, compoundV3, morpho, bprotocol, lsv, spark, curveusd, morphoblue, summerfi, llamalend, merkl, eulerV2, sky, liquityV2, stkgho, renzo, etherfi, fluid, pendle, umbrella, aaveV4, };
@@ -39,4 +39,5 @@ import * as etherfi from './etherfi';
39
39
  import * as fluid from './fluid';
40
40
  import * as pendle from './pendle';
41
41
  import * as umbrella from './umbrella';
42
- export { aave, maker, compound, basic, flashloan, uniswap, reflexer, dydx, uniswapV3, checkers, liquity, yearn, lido, insta, balancer, curve, guni, mstable, rari, aaveV3, convex, chickenBonds, compoundV3, morpho, bprotocol, lsv, spark, curveusd, morphoblue, summerfi, llamalend, merkl, eulerV2, sky, liquityV2, stkgho, renzo, etherfi, fluid, pendle, umbrella, };
42
+ import * as aaveV4 from './aavev4';
43
+ export { aave, maker, compound, basic, flashloan, uniswap, reflexer, dydx, uniswapV3, checkers, liquity, yearn, lido, insta, balancer, curve, guni, mstable, rari, aaveV3, convex, chickenBonds, compoundV3, morpho, bprotocol, lsv, spark, curveusd, morphoblue, summerfi, llamalend, merkl, eulerV2, sky, liquityV2, stkgho, renzo, etherfi, fluid, pendle, umbrella, aaveV4, };
@@ -277,6 +277,16 @@ export declare const actionAddresses: {
277
277
  SFApproveTokens: string;
278
278
  SummerfiUnsub: string;
279
279
  SummerfiUnsubV2: string;
280
+ AaveV4Supply: string;
281
+ AaveV4Withdraw: string;
282
+ AaveV4Borrow: string;
283
+ AaveV4Payback: string;
284
+ AaveV4CollateralSwitch: string;
285
+ AaveV4RefreshPremium: string;
286
+ AaveV4SetUserManagersWithSig: string;
287
+ AaveV4DelegateWithdrawWithSig: string;
288
+ AaveV4DelegateBorrowWithSig: string;
289
+ AaveV4DelegateSetUsingAsCollateralWithSig: string;
280
290
  AaveV3DelegateCredit?: undefined;
281
291
  AaveV3RatioTrigger?: undefined;
282
292
  GasFeeTakerL2?: undefined;
@@ -563,6 +573,16 @@ export declare const actionAddresses: {
563
573
  UmbrellaClaimRewards?: undefined;
564
574
  UmbrellaStake?: undefined;
565
575
  UmbrellaUnstake?: undefined;
576
+ AaveV4Supply?: undefined;
577
+ AaveV4Withdraw?: undefined;
578
+ AaveV4Borrow?: undefined;
579
+ AaveV4Payback?: undefined;
580
+ AaveV4CollateralSwitch?: undefined;
581
+ AaveV4RefreshPremium?: undefined;
582
+ AaveV4SetUserManagersWithSig?: undefined;
583
+ AaveV4DelegateWithdrawWithSig?: undefined;
584
+ AaveV4DelegateBorrowWithSig?: undefined;
585
+ AaveV4DelegateSetUsingAsCollateralWithSig?: undefined;
566
586
  MorphoBlueView?: undefined;
567
587
  } | {
568
588
  DFSSell: string;
@@ -844,6 +864,16 @@ export declare const actionAddresses: {
844
864
  UmbrellaClaimRewards?: undefined;
845
865
  UmbrellaStake?: undefined;
846
866
  UmbrellaUnstake?: undefined;
867
+ AaveV4Supply?: undefined;
868
+ AaveV4Withdraw?: undefined;
869
+ AaveV4Borrow?: undefined;
870
+ AaveV4Payback?: undefined;
871
+ AaveV4CollateralSwitch?: undefined;
872
+ AaveV4RefreshPremium?: undefined;
873
+ AaveV4SetUserManagersWithSig?: undefined;
874
+ AaveV4DelegateWithdrawWithSig?: undefined;
875
+ AaveV4DelegateBorrowWithSig?: undefined;
876
+ AaveV4DelegateSetUsingAsCollateralWithSig?: undefined;
847
877
  AaveV3DelegateCredit?: undefined;
848
878
  AaveV3RatioTrigger?: undefined;
849
879
  } | {
@@ -1125,6 +1155,16 @@ export declare const actionAddresses: {
1125
1155
  UmbrellaClaimRewards?: undefined;
1126
1156
  UmbrellaStake?: undefined;
1127
1157
  UmbrellaUnstake?: undefined;
1158
+ AaveV4Supply?: undefined;
1159
+ AaveV4Withdraw?: undefined;
1160
+ AaveV4Borrow?: undefined;
1161
+ AaveV4Payback?: undefined;
1162
+ AaveV4CollateralSwitch?: undefined;
1163
+ AaveV4RefreshPremium?: undefined;
1164
+ AaveV4SetUserManagersWithSig?: undefined;
1165
+ AaveV4DelegateWithdrawWithSig?: undefined;
1166
+ AaveV4DelegateBorrowWithSig?: undefined;
1167
+ AaveV4DelegateSetUsingAsCollateralWithSig?: undefined;
1128
1168
  AaveV3DelegateCredit?: undefined;
1129
1169
  AaveV3RatioTrigger?: undefined;
1130
1170
  AaveV3RatioCheck?: undefined;
@@ -1406,6 +1446,16 @@ export declare const actionAddresses: {
1406
1446
  SFApproveTokens?: undefined;
1407
1447
  SummerfiUnsub?: undefined;
1408
1448
  SummerfiUnsubV2?: undefined;
1449
+ AaveV4Supply?: undefined;
1450
+ AaveV4Withdraw?: undefined;
1451
+ AaveV4Borrow?: undefined;
1452
+ AaveV4Payback?: undefined;
1453
+ AaveV4CollateralSwitch?: undefined;
1454
+ AaveV4RefreshPremium?: undefined;
1455
+ AaveV4SetUserManagersWithSig?: undefined;
1456
+ AaveV4DelegateWithdrawWithSig?: undefined;
1457
+ AaveV4DelegateBorrowWithSig?: undefined;
1458
+ AaveV4DelegateSetUsingAsCollateralWithSig?: undefined;
1409
1459
  AaveV3RatioTrigger?: undefined;
1410
1460
  GasFeeTakerL2?: undefined;
1411
1461
  AaveV3RatioCheck?: undefined;
@@ -1688,6 +1738,16 @@ export declare const actionAddresses: {
1688
1738
  SFApproveTokens?: undefined;
1689
1739
  SummerfiUnsub?: undefined;
1690
1740
  SummerfiUnsubV2?: undefined;
1741
+ AaveV4Supply?: undefined;
1742
+ AaveV4Withdraw?: undefined;
1743
+ AaveV4Borrow?: undefined;
1744
+ AaveV4Payback?: undefined;
1745
+ AaveV4CollateralSwitch?: undefined;
1746
+ AaveV4RefreshPremium?: undefined;
1747
+ AaveV4SetUserManagersWithSig?: undefined;
1748
+ AaveV4DelegateWithdrawWithSig?: undefined;
1749
+ AaveV4DelegateBorrowWithSig?: undefined;
1750
+ AaveV4DelegateSetUsingAsCollateralWithSig?: undefined;
1691
1751
  AaveV3RatioTrigger?: undefined;
1692
1752
  GasFeeTakerL2?: undefined;
1693
1753
  AaveV3RatioCheck?: undefined;
@@ -318,6 +318,17 @@ export const actionAddresses = {
318
318
  SFApproveTokens: '0x0aC29D44eeC8e8f3b010c2e8FC960957db0c8298',
319
319
  SummerfiUnsub: '0x926405D69b77A514ED974901095AcFf9e5131366',
320
320
  SummerfiUnsubV2: '0x5E805eD9B7581a9f1398F75833f9663a459F5E30',
321
+ // AaveV4
322
+ AaveV4Supply: '0x089c2b1DB0f68D94E67e8d969509D45B26fD0ceC',
323
+ AaveV4Withdraw: '0x563EC9e76b335A8218c04Ac4Ae9A58ae464CaAD6',
324
+ AaveV4Borrow: '0x2a560B72Fb88b9Bb90dd997CD94D7611740961B9',
325
+ AaveV4Payback: '0xEBafec920888E735e61353A8792cBd452B8406a0',
326
+ AaveV4CollateralSwitch: '0x742c8676E90958C8b8e264b70Ca0685c365Eec5f',
327
+ AaveV4RefreshPremium: '0xca7Cec8D88Bf495166CAeC045F0d467Aa4ceBE4E',
328
+ AaveV4SetUserManagersWithSig: '0x70CB26167153298aF397dF58200799A24B060b0d',
329
+ AaveV4DelegateWithdrawWithSig: '0x81864dBd69c46B19463eC7BEC6cE0B271126531a',
330
+ AaveV4DelegateBorrowWithSig: '0x9D68b41BB9f9e9Ac1E1ee49d3566CAd4624886BA',
331
+ AaveV4DelegateSetUsingAsCollateralWithSig: '0xF3D7C7e8F5154c669EAA0dE996cdE0575D7d3A00',
321
332
  },
322
333
  [NETWORKS.optimism.chainId]: {
323
334
  DFSSell: '0x9f234af5c10c136863a20865ba00b26951ab8269',
@@ -288,6 +288,16 @@ declare const actionAddressesAllChains: {
288
288
  SFApproveTokens: string;
289
289
  SummerfiUnsub: string;
290
290
  SummerfiUnsubV2: string;
291
+ AaveV4Supply: string;
292
+ AaveV4Withdraw: string;
293
+ AaveV4Borrow: string;
294
+ AaveV4Payback: string;
295
+ AaveV4CollateralSwitch: string;
296
+ AaveV4RefreshPremium: string;
297
+ AaveV4SetUserManagersWithSig: string;
298
+ AaveV4DelegateWithdrawWithSig: string;
299
+ AaveV4DelegateBorrowWithSig: string;
300
+ AaveV4DelegateSetUsingAsCollateralWithSig: string;
291
301
  AaveV3DelegateCredit?: undefined;
292
302
  AaveV3RatioTrigger?: undefined;
293
303
  GasFeeTakerL2?: undefined;
@@ -574,6 +584,16 @@ declare const actionAddressesAllChains: {
574
584
  UmbrellaClaimRewards?: undefined;
575
585
  UmbrellaStake?: undefined;
576
586
  UmbrellaUnstake?: undefined;
587
+ AaveV4Supply?: undefined;
588
+ AaveV4Withdraw?: undefined;
589
+ AaveV4Borrow?: undefined;
590
+ AaveV4Payback?: undefined;
591
+ AaveV4CollateralSwitch?: undefined;
592
+ AaveV4RefreshPremium?: undefined;
593
+ AaveV4SetUserManagersWithSig?: undefined;
594
+ AaveV4DelegateWithdrawWithSig?: undefined;
595
+ AaveV4DelegateBorrowWithSig?: undefined;
596
+ AaveV4DelegateSetUsingAsCollateralWithSig?: undefined;
577
597
  MorphoBlueView?: undefined;
578
598
  } | {
579
599
  DFSSell: string;
@@ -855,6 +875,16 @@ declare const actionAddressesAllChains: {
855
875
  UmbrellaClaimRewards?: undefined;
856
876
  UmbrellaStake?: undefined;
857
877
  UmbrellaUnstake?: undefined;
878
+ AaveV4Supply?: undefined;
879
+ AaveV4Withdraw?: undefined;
880
+ AaveV4Borrow?: undefined;
881
+ AaveV4Payback?: undefined;
882
+ AaveV4CollateralSwitch?: undefined;
883
+ AaveV4RefreshPremium?: undefined;
884
+ AaveV4SetUserManagersWithSig?: undefined;
885
+ AaveV4DelegateWithdrawWithSig?: undefined;
886
+ AaveV4DelegateBorrowWithSig?: undefined;
887
+ AaveV4DelegateSetUsingAsCollateralWithSig?: undefined;
858
888
  AaveV3DelegateCredit?: undefined;
859
889
  AaveV3RatioTrigger?: undefined;
860
890
  } | {
@@ -1136,6 +1166,16 @@ declare const actionAddressesAllChains: {
1136
1166
  UmbrellaClaimRewards?: undefined;
1137
1167
  UmbrellaStake?: undefined;
1138
1168
  UmbrellaUnstake?: undefined;
1169
+ AaveV4Supply?: undefined;
1170
+ AaveV4Withdraw?: undefined;
1171
+ AaveV4Borrow?: undefined;
1172
+ AaveV4Payback?: undefined;
1173
+ AaveV4CollateralSwitch?: undefined;
1174
+ AaveV4RefreshPremium?: undefined;
1175
+ AaveV4SetUserManagersWithSig?: undefined;
1176
+ AaveV4DelegateWithdrawWithSig?: undefined;
1177
+ AaveV4DelegateBorrowWithSig?: undefined;
1178
+ AaveV4DelegateSetUsingAsCollateralWithSig?: undefined;
1139
1179
  AaveV3DelegateCredit?: undefined;
1140
1180
  AaveV3RatioTrigger?: undefined;
1141
1181
  AaveV3RatioCheck?: undefined;
@@ -1417,6 +1457,16 @@ declare const actionAddressesAllChains: {
1417
1457
  SFApproveTokens?: undefined;
1418
1458
  SummerfiUnsub?: undefined;
1419
1459
  SummerfiUnsubV2?: undefined;
1460
+ AaveV4Supply?: undefined;
1461
+ AaveV4Withdraw?: undefined;
1462
+ AaveV4Borrow?: undefined;
1463
+ AaveV4Payback?: undefined;
1464
+ AaveV4CollateralSwitch?: undefined;
1465
+ AaveV4RefreshPremium?: undefined;
1466
+ AaveV4SetUserManagersWithSig?: undefined;
1467
+ AaveV4DelegateWithdrawWithSig?: undefined;
1468
+ AaveV4DelegateBorrowWithSig?: undefined;
1469
+ AaveV4DelegateSetUsingAsCollateralWithSig?: undefined;
1420
1470
  AaveV3RatioTrigger?: undefined;
1421
1471
  GasFeeTakerL2?: undefined;
1422
1472
  AaveV3RatioCheck?: undefined;
@@ -1699,6 +1749,16 @@ declare const actionAddressesAllChains: {
1699
1749
  SFApproveTokens?: undefined;
1700
1750
  SummerfiUnsub?: undefined;
1701
1751
  SummerfiUnsubV2?: undefined;
1752
+ AaveV4Supply?: undefined;
1753
+ AaveV4Withdraw?: undefined;
1754
+ AaveV4Borrow?: undefined;
1755
+ AaveV4Payback?: undefined;
1756
+ AaveV4CollateralSwitch?: undefined;
1757
+ AaveV4RefreshPremium?: undefined;
1758
+ AaveV4SetUserManagersWithSig?: undefined;
1759
+ AaveV4DelegateWithdrawWithSig?: undefined;
1760
+ AaveV4DelegateBorrowWithSig?: undefined;
1761
+ AaveV4DelegateSetUsingAsCollateralWithSig?: undefined;
1702
1762
  AaveV3RatioTrigger?: undefined;
1703
1763
  GasFeeTakerL2?: undefined;
1704
1764
  AaveV3RatioCheck?: undefined;
@@ -1982,6 +2042,16 @@ declare const actionAddresses: (chainId?: null) => {
1982
2042
  SFApproveTokens: string;
1983
2043
  SummerfiUnsub: string;
1984
2044
  SummerfiUnsubV2: string;
2045
+ AaveV4Supply: string;
2046
+ AaveV4Withdraw: string;
2047
+ AaveV4Borrow: string;
2048
+ AaveV4Payback: string;
2049
+ AaveV4CollateralSwitch: string;
2050
+ AaveV4RefreshPremium: string;
2051
+ AaveV4SetUserManagersWithSig: string;
2052
+ AaveV4DelegateWithdrawWithSig: string;
2053
+ AaveV4DelegateBorrowWithSig: string;
2054
+ AaveV4DelegateSetUsingAsCollateralWithSig: string;
1985
2055
  AaveV3DelegateCredit?: undefined;
1986
2056
  AaveV3RatioTrigger?: undefined;
1987
2057
  GasFeeTakerL2?: undefined;
@@ -2268,6 +2338,16 @@ declare const actionAddresses: (chainId?: null) => {
2268
2338
  UmbrellaClaimRewards?: undefined;
2269
2339
  UmbrellaStake?: undefined;
2270
2340
  UmbrellaUnstake?: undefined;
2341
+ AaveV4Supply?: undefined;
2342
+ AaveV4Withdraw?: undefined;
2343
+ AaveV4Borrow?: undefined;
2344
+ AaveV4Payback?: undefined;
2345
+ AaveV4CollateralSwitch?: undefined;
2346
+ AaveV4RefreshPremium?: undefined;
2347
+ AaveV4SetUserManagersWithSig?: undefined;
2348
+ AaveV4DelegateWithdrawWithSig?: undefined;
2349
+ AaveV4DelegateBorrowWithSig?: undefined;
2350
+ AaveV4DelegateSetUsingAsCollateralWithSig?: undefined;
2271
2351
  MorphoBlueView?: undefined;
2272
2352
  } | {
2273
2353
  DFSSell: string;
@@ -2549,6 +2629,16 @@ declare const actionAddresses: (chainId?: null) => {
2549
2629
  UmbrellaClaimRewards?: undefined;
2550
2630
  UmbrellaStake?: undefined;
2551
2631
  UmbrellaUnstake?: undefined;
2632
+ AaveV4Supply?: undefined;
2633
+ AaveV4Withdraw?: undefined;
2634
+ AaveV4Borrow?: undefined;
2635
+ AaveV4Payback?: undefined;
2636
+ AaveV4CollateralSwitch?: undefined;
2637
+ AaveV4RefreshPremium?: undefined;
2638
+ AaveV4SetUserManagersWithSig?: undefined;
2639
+ AaveV4DelegateWithdrawWithSig?: undefined;
2640
+ AaveV4DelegateBorrowWithSig?: undefined;
2641
+ AaveV4DelegateSetUsingAsCollateralWithSig?: undefined;
2552
2642
  AaveV3DelegateCredit?: undefined;
2553
2643
  AaveV3RatioTrigger?: undefined;
2554
2644
  } | {
@@ -2830,6 +2920,16 @@ declare const actionAddresses: (chainId?: null) => {
2830
2920
  UmbrellaClaimRewards?: undefined;
2831
2921
  UmbrellaStake?: undefined;
2832
2922
  UmbrellaUnstake?: undefined;
2923
+ AaveV4Supply?: undefined;
2924
+ AaveV4Withdraw?: undefined;
2925
+ AaveV4Borrow?: undefined;
2926
+ AaveV4Payback?: undefined;
2927
+ AaveV4CollateralSwitch?: undefined;
2928
+ AaveV4RefreshPremium?: undefined;
2929
+ AaveV4SetUserManagersWithSig?: undefined;
2930
+ AaveV4DelegateWithdrawWithSig?: undefined;
2931
+ AaveV4DelegateBorrowWithSig?: undefined;
2932
+ AaveV4DelegateSetUsingAsCollateralWithSig?: undefined;
2833
2933
  AaveV3DelegateCredit?: undefined;
2834
2934
  AaveV3RatioTrigger?: undefined;
2835
2935
  AaveV3RatioCheck?: undefined;
@@ -3111,6 +3211,16 @@ declare const actionAddresses: (chainId?: null) => {
3111
3211
  SFApproveTokens?: undefined;
3112
3212
  SummerfiUnsub?: undefined;
3113
3213
  SummerfiUnsubV2?: undefined;
3214
+ AaveV4Supply?: undefined;
3215
+ AaveV4Withdraw?: undefined;
3216
+ AaveV4Borrow?: undefined;
3217
+ AaveV4Payback?: undefined;
3218
+ AaveV4CollateralSwitch?: undefined;
3219
+ AaveV4RefreshPremium?: undefined;
3220
+ AaveV4SetUserManagersWithSig?: undefined;
3221
+ AaveV4DelegateWithdrawWithSig?: undefined;
3222
+ AaveV4DelegateBorrowWithSig?: undefined;
3223
+ AaveV4DelegateSetUsingAsCollateralWithSig?: undefined;
3114
3224
  AaveV3RatioTrigger?: undefined;
3115
3225
  GasFeeTakerL2?: undefined;
3116
3226
  AaveV3RatioCheck?: undefined;
@@ -3393,6 +3503,16 @@ declare const actionAddresses: (chainId?: null) => {
3393
3503
  SFApproveTokens?: undefined;
3394
3504
  SummerfiUnsub?: undefined;
3395
3505
  SummerfiUnsubV2?: undefined;
3506
+ AaveV4Supply?: undefined;
3507
+ AaveV4Withdraw?: undefined;
3508
+ AaveV4Borrow?: undefined;
3509
+ AaveV4Payback?: undefined;
3510
+ AaveV4CollateralSwitch?: undefined;
3511
+ AaveV4RefreshPremium?: undefined;
3512
+ AaveV4SetUserManagersWithSig?: undefined;
3513
+ AaveV4DelegateWithdrawWithSig?: undefined;
3514
+ AaveV4DelegateBorrowWithSig?: undefined;
3515
+ AaveV4DelegateSetUsingAsCollateralWithSig?: undefined;
3396
3516
  AaveV3RatioTrigger?: undefined;
3397
3517
  GasFeeTakerL2?: undefined;
3398
3518
  AaveV3RatioCheck?: undefined;
@@ -3913,6 +4033,16 @@ declare const _default: {
3913
4033
  SFApproveTokens: string;
3914
4034
  SummerfiUnsub: string;
3915
4035
  SummerfiUnsubV2: string;
4036
+ AaveV4Supply: string;
4037
+ AaveV4Withdraw: string;
4038
+ AaveV4Borrow: string;
4039
+ AaveV4Payback: string;
4040
+ AaveV4CollateralSwitch: string;
4041
+ AaveV4RefreshPremium: string;
4042
+ AaveV4SetUserManagersWithSig: string;
4043
+ AaveV4DelegateWithdrawWithSig: string;
4044
+ AaveV4DelegateBorrowWithSig: string;
4045
+ AaveV4DelegateSetUsingAsCollateralWithSig: string;
3916
4046
  AaveV3DelegateCredit?: undefined;
3917
4047
  AaveV3RatioTrigger?: undefined;
3918
4048
  GasFeeTakerL2?: undefined;
@@ -4199,6 +4329,16 @@ declare const _default: {
4199
4329
  UmbrellaClaimRewards?: undefined;
4200
4330
  UmbrellaStake?: undefined;
4201
4331
  UmbrellaUnstake?: undefined;
4332
+ AaveV4Supply?: undefined;
4333
+ AaveV4Withdraw?: undefined;
4334
+ AaveV4Borrow?: undefined;
4335
+ AaveV4Payback?: undefined;
4336
+ AaveV4CollateralSwitch?: undefined;
4337
+ AaveV4RefreshPremium?: undefined;
4338
+ AaveV4SetUserManagersWithSig?: undefined;
4339
+ AaveV4DelegateWithdrawWithSig?: undefined;
4340
+ AaveV4DelegateBorrowWithSig?: undefined;
4341
+ AaveV4DelegateSetUsingAsCollateralWithSig?: undefined;
4202
4342
  MorphoBlueView?: undefined;
4203
4343
  } | {
4204
4344
  DFSSell: string;
@@ -4480,6 +4620,16 @@ declare const _default: {
4480
4620
  UmbrellaClaimRewards?: undefined;
4481
4621
  UmbrellaStake?: undefined;
4482
4622
  UmbrellaUnstake?: undefined;
4623
+ AaveV4Supply?: undefined;
4624
+ AaveV4Withdraw?: undefined;
4625
+ AaveV4Borrow?: undefined;
4626
+ AaveV4Payback?: undefined;
4627
+ AaveV4CollateralSwitch?: undefined;
4628
+ AaveV4RefreshPremium?: undefined;
4629
+ AaveV4SetUserManagersWithSig?: undefined;
4630
+ AaveV4DelegateWithdrawWithSig?: undefined;
4631
+ AaveV4DelegateBorrowWithSig?: undefined;
4632
+ AaveV4DelegateSetUsingAsCollateralWithSig?: undefined;
4483
4633
  AaveV3DelegateCredit?: undefined;
4484
4634
  AaveV3RatioTrigger?: undefined;
4485
4635
  } | {
@@ -4761,6 +4911,16 @@ declare const _default: {
4761
4911
  UmbrellaClaimRewards?: undefined;
4762
4912
  UmbrellaStake?: undefined;
4763
4913
  UmbrellaUnstake?: undefined;
4914
+ AaveV4Supply?: undefined;
4915
+ AaveV4Withdraw?: undefined;
4916
+ AaveV4Borrow?: undefined;
4917
+ AaveV4Payback?: undefined;
4918
+ AaveV4CollateralSwitch?: undefined;
4919
+ AaveV4RefreshPremium?: undefined;
4920
+ AaveV4SetUserManagersWithSig?: undefined;
4921
+ AaveV4DelegateWithdrawWithSig?: undefined;
4922
+ AaveV4DelegateBorrowWithSig?: undefined;
4923
+ AaveV4DelegateSetUsingAsCollateralWithSig?: undefined;
4764
4924
  AaveV3DelegateCredit?: undefined;
4765
4925
  AaveV3RatioTrigger?: undefined;
4766
4926
  AaveV3RatioCheck?: undefined;
@@ -5042,6 +5202,16 @@ declare const _default: {
5042
5202
  SFApproveTokens?: undefined;
5043
5203
  SummerfiUnsub?: undefined;
5044
5204
  SummerfiUnsubV2?: undefined;
5205
+ AaveV4Supply?: undefined;
5206
+ AaveV4Withdraw?: undefined;
5207
+ AaveV4Borrow?: undefined;
5208
+ AaveV4Payback?: undefined;
5209
+ AaveV4CollateralSwitch?: undefined;
5210
+ AaveV4RefreshPremium?: undefined;
5211
+ AaveV4SetUserManagersWithSig?: undefined;
5212
+ AaveV4DelegateWithdrawWithSig?: undefined;
5213
+ AaveV4DelegateBorrowWithSig?: undefined;
5214
+ AaveV4DelegateSetUsingAsCollateralWithSig?: undefined;
5045
5215
  AaveV3RatioTrigger?: undefined;
5046
5216
  GasFeeTakerL2?: undefined;
5047
5217
  AaveV3RatioCheck?: undefined;
@@ -5324,6 +5494,16 @@ declare const _default: {
5324
5494
  SFApproveTokens?: undefined;
5325
5495
  SummerfiUnsub?: undefined;
5326
5496
  SummerfiUnsubV2?: undefined;
5497
+ AaveV4Supply?: undefined;
5498
+ AaveV4Withdraw?: undefined;
5499
+ AaveV4Borrow?: undefined;
5500
+ AaveV4Payback?: undefined;
5501
+ AaveV4CollateralSwitch?: undefined;
5502
+ AaveV4RefreshPremium?: undefined;
5503
+ AaveV4SetUserManagersWithSig?: undefined;
5504
+ AaveV4DelegateWithdrawWithSig?: undefined;
5505
+ AaveV4DelegateBorrowWithSig?: undefined;
5506
+ AaveV4DelegateSetUsingAsCollateralWithSig?: undefined;
5327
5507
  AaveV3RatioTrigger?: undefined;
5328
5508
  GasFeeTakerL2?: undefined;
5329
5509
  AaveV3RatioCheck?: undefined;
@@ -5607,6 +5787,16 @@ declare const _default: {
5607
5787
  SFApproveTokens: string;
5608
5788
  SummerfiUnsub: string;
5609
5789
  SummerfiUnsubV2: string;
5790
+ AaveV4Supply: string;
5791
+ AaveV4Withdraw: string;
5792
+ AaveV4Borrow: string;
5793
+ AaveV4Payback: string;
5794
+ AaveV4CollateralSwitch: string;
5795
+ AaveV4RefreshPremium: string;
5796
+ AaveV4SetUserManagersWithSig: string;
5797
+ AaveV4DelegateWithdrawWithSig: string;
5798
+ AaveV4DelegateBorrowWithSig: string;
5799
+ AaveV4DelegateSetUsingAsCollateralWithSig: string;
5610
5800
  AaveV3DelegateCredit?: undefined;
5611
5801
  AaveV3RatioTrigger?: undefined;
5612
5802
  GasFeeTakerL2?: undefined;
@@ -5893,6 +6083,16 @@ declare const _default: {
5893
6083
  UmbrellaClaimRewards?: undefined;
5894
6084
  UmbrellaStake?: undefined;
5895
6085
  UmbrellaUnstake?: undefined;
6086
+ AaveV4Supply?: undefined;
6087
+ AaveV4Withdraw?: undefined;
6088
+ AaveV4Borrow?: undefined;
6089
+ AaveV4Payback?: undefined;
6090
+ AaveV4CollateralSwitch?: undefined;
6091
+ AaveV4RefreshPremium?: undefined;
6092
+ AaveV4SetUserManagersWithSig?: undefined;
6093
+ AaveV4DelegateWithdrawWithSig?: undefined;
6094
+ AaveV4DelegateBorrowWithSig?: undefined;
6095
+ AaveV4DelegateSetUsingAsCollateralWithSig?: undefined;
5896
6096
  MorphoBlueView?: undefined;
5897
6097
  } | {
5898
6098
  DFSSell: string;
@@ -6174,6 +6374,16 @@ declare const _default: {
6174
6374
  UmbrellaClaimRewards?: undefined;
6175
6375
  UmbrellaStake?: undefined;
6176
6376
  UmbrellaUnstake?: undefined;
6377
+ AaveV4Supply?: undefined;
6378
+ AaveV4Withdraw?: undefined;
6379
+ AaveV4Borrow?: undefined;
6380
+ AaveV4Payback?: undefined;
6381
+ AaveV4CollateralSwitch?: undefined;
6382
+ AaveV4RefreshPremium?: undefined;
6383
+ AaveV4SetUserManagersWithSig?: undefined;
6384
+ AaveV4DelegateWithdrawWithSig?: undefined;
6385
+ AaveV4DelegateBorrowWithSig?: undefined;
6386
+ AaveV4DelegateSetUsingAsCollateralWithSig?: undefined;
6177
6387
  AaveV3DelegateCredit?: undefined;
6178
6388
  AaveV3RatioTrigger?: undefined;
6179
6389
  } | {
@@ -6455,6 +6665,16 @@ declare const _default: {
6455
6665
  UmbrellaClaimRewards?: undefined;
6456
6666
  UmbrellaStake?: undefined;
6457
6667
  UmbrellaUnstake?: undefined;
6668
+ AaveV4Supply?: undefined;
6669
+ AaveV4Withdraw?: undefined;
6670
+ AaveV4Borrow?: undefined;
6671
+ AaveV4Payback?: undefined;
6672
+ AaveV4CollateralSwitch?: undefined;
6673
+ AaveV4RefreshPremium?: undefined;
6674
+ AaveV4SetUserManagersWithSig?: undefined;
6675
+ AaveV4DelegateWithdrawWithSig?: undefined;
6676
+ AaveV4DelegateBorrowWithSig?: undefined;
6677
+ AaveV4DelegateSetUsingAsCollateralWithSig?: undefined;
6458
6678
  AaveV3DelegateCredit?: undefined;
6459
6679
  AaveV3RatioTrigger?: undefined;
6460
6680
  AaveV3RatioCheck?: undefined;
@@ -6736,6 +6956,16 @@ declare const _default: {
6736
6956
  SFApproveTokens?: undefined;
6737
6957
  SummerfiUnsub?: undefined;
6738
6958
  SummerfiUnsubV2?: undefined;
6959
+ AaveV4Supply?: undefined;
6960
+ AaveV4Withdraw?: undefined;
6961
+ AaveV4Borrow?: undefined;
6962
+ AaveV4Payback?: undefined;
6963
+ AaveV4CollateralSwitch?: undefined;
6964
+ AaveV4RefreshPremium?: undefined;
6965
+ AaveV4SetUserManagersWithSig?: undefined;
6966
+ AaveV4DelegateWithdrawWithSig?: undefined;
6967
+ AaveV4DelegateBorrowWithSig?: undefined;
6968
+ AaveV4DelegateSetUsingAsCollateralWithSig?: undefined;
6739
6969
  AaveV3RatioTrigger?: undefined;
6740
6970
  GasFeeTakerL2?: undefined;
6741
6971
  AaveV3RatioCheck?: undefined;
@@ -7018,6 +7248,16 @@ declare const _default: {
7018
7248
  SFApproveTokens?: undefined;
7019
7249
  SummerfiUnsub?: undefined;
7020
7250
  SummerfiUnsubV2?: undefined;
7251
+ AaveV4Supply?: undefined;
7252
+ AaveV4Withdraw?: undefined;
7253
+ AaveV4Borrow?: undefined;
7254
+ AaveV4Payback?: undefined;
7255
+ AaveV4CollateralSwitch?: undefined;
7256
+ AaveV4RefreshPremium?: undefined;
7257
+ AaveV4SetUserManagersWithSig?: undefined;
7258
+ AaveV4DelegateWithdrawWithSig?: undefined;
7259
+ AaveV4DelegateBorrowWithSig?: undefined;
7260
+ AaveV4DelegateSetUsingAsCollateralWithSig?: undefined;
7021
7261
  AaveV3RatioTrigger?: undefined;
7022
7262
  GasFeeTakerL2?: undefined;
7023
7263
  AaveV3RatioCheck?: undefined;
@@ -0,0 +1,10 @@
1
+ import { Action } from '../Action';
2
+ import { EthAddress, uint256 } from '../types';
3
+ /**
4
+ * AaveV4QuotePriceRangeTrigger - Verifies if current token price ratio for aaveV4 spoke is within a subbed price range.
5
+ *
6
+ * @category Triggers
7
+ */
8
+ export declare class AaveV4QuotePriceRangeTrigger extends Action {
9
+ constructor(spoke: EthAddress, baseTokenId: uint256, quoteTokenId: uint256, lowerPrice: uint256, upperPrice: uint256);
10
+ }
@@ -0,0 +1,12 @@
1
+ import { Action } from '../Action';
2
+ import { getAddr } from '../addresses';
3
+ /**
4
+ * AaveV4QuotePriceRangeTrigger - Verifies if current token price ratio for aaveV4 spoke is within a subbed price range.
5
+ *
6
+ * @category Triggers
7
+ */
8
+ export class AaveV4QuotePriceRangeTrigger extends Action {
9
+ constructor(spoke, baseTokenId, quoteTokenId, lowerPrice, upperPrice) {
10
+ super('AaveV4QuotePriceRangeTrigger', getAddr('Empty'), [['address', 'uint256', 'uint256', 'uint256', 'uint256']], [[spoke, baseTokenId, quoteTokenId, lowerPrice, upperPrice]]);
11
+ }
12
+ }
@@ -0,0 +1,10 @@
1
+ import { Action } from '../Action';
2
+ import { EthAddress, uint256, uint8 } from '../types';
3
+ /**
4
+ * AaveV4QuotePriceTrigger - Verifies if current token price ratio for aaveV4 spoke is over/under a subbed price ratio.
5
+ *
6
+ * @category Triggers
7
+ */
8
+ export declare class AaveV4QuotePriceTrigger extends Action {
9
+ constructor(spoke: EthAddress, baseTokenId: uint256, quoteTokenId: uint256, price: uint256, state: uint8);
10
+ }
@@ -0,0 +1,12 @@
1
+ import { Action } from '../Action';
2
+ import { getAddr } from '../addresses';
3
+ /**
4
+ * AaveV4QuotePriceTrigger - Verifies if current token price ratio for aaveV4 spoke is over/under a subbed price ratio.
5
+ *
6
+ * @category Triggers
7
+ */
8
+ export class AaveV4QuotePriceTrigger extends Action {
9
+ constructor(spoke, baseTokenId, quoteTokenId, price, state) {
10
+ super('AaveV4QuotePriceTrigger', getAddr('Empty'), [['address', 'uint256', 'uint256', 'uint256', 'uint8']], [[spoke, baseTokenId, quoteTokenId, price, state]]);
11
+ }
12
+ }
@@ -0,0 +1,10 @@
1
+ import { Action } from '../Action';
2
+ import { EthAddress, uint256, uint8 } from '../types';
3
+ /**
4
+ * AaveV4RatioTrigger - Triggers when the user's ratio is over/under a subbed ratio.
5
+ *
6
+ * @category Triggers
7
+ */
8
+ export declare class AaveV4RatioTrigger extends Action {
9
+ constructor(user: EthAddress, spoke: EthAddress, ratio: uint256, state: uint8);
10
+ }
@@ -0,0 +1,12 @@
1
+ import { Action } from '../Action';
2
+ import { getAddr } from '../addresses';
3
+ /**
4
+ * AaveV4RatioTrigger - Triggers when the user's ratio is over/under a subbed ratio.
5
+ *
6
+ * @category Triggers
7
+ */
8
+ export class AaveV4RatioTrigger extends Action {
9
+ constructor(user, spoke, ratio, state) {
10
+ super('AaveV4RatioTrigger', getAddr('Empty'), [['address', 'address', 'uint256', 'uint8']], [[user, spoke, ratio, state]]);
11
+ }
12
+ }
@@ -31,3 +31,6 @@ export * from './LiquityV2AdjustRateDebtInFrontTrigger';
31
31
  export * from './AaveV3QuotePriceRangeTrigger';
32
32
  export * from './SparkQuotePriceRangeTrigger';
33
33
  export * from './MorphoBluePriceRangeTrigger';
34
+ export * from './AaveV4QuotePriceTrigger';
35
+ export * from './AaveV4QuotePriceRangeTrigger';
36
+ export * from './AaveV4RatioTrigger';
@@ -31,3 +31,6 @@ export * from './LiquityV2AdjustRateDebtInFrontTrigger';
31
31
  export * from './AaveV3QuotePriceRangeTrigger';
32
32
  export * from './SparkQuotePriceRangeTrigger';
33
33
  export * from './MorphoBluePriceRangeTrigger';
34
+ export * from './AaveV4QuotePriceTrigger';
35
+ export * from './AaveV4QuotePriceRangeTrigger';
36
+ export * from './AaveV4RatioTrigger';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@defisaver/sdk",
3
- "version": "1.3.18",
3
+ "version": "1.3.21-aave-v4-dev",
4
4
  "description": "",
5
5
  "main": "./umd/index.js",
6
6
  "module": "./esm/src/index.js",
package/src/Strategy.ts CHANGED
@@ -36,6 +36,10 @@ export class Strategy {
36
36
  this.actions.push(newAction);
37
37
  }
38
38
 
39
+ addActions(newActions: Array<Action>) {
40
+ this.actions.push(...newActions);
41
+ }
42
+
39
43
  print() {
40
44
  console.log(`Name: ${this.name}`);
41
45
  console.log(`Slots: ${this.subSlots}`);