@defisaver/sdk 1.0.60 → 1.0.62

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 (82) hide show
  1. package/esm/src/actions/aave/AaveBorrowAction.js +8 -0
  2. package/esm/src/actions/basic/ApproveTokenAction.js +5 -0
  3. package/esm/src/actions/basic/CreateSubAction.js +2 -1
  4. package/esm/src/actions/basic/LSVSellAction.d.ts +23 -0
  5. package/esm/src/actions/basic/LSVSellAction.js +61 -0
  6. package/esm/src/actions/basic/UpdateSubAction.js +1 -1
  7. package/esm/src/actions/basic/index.d.ts +2 -1
  8. package/esm/src/actions/basic/index.js +2 -1
  9. package/esm/src/actions/checkers/AaveV2RatioCheckAction.d.ts +14 -0
  10. package/esm/src/actions/checkers/AaveV2RatioCheckAction.js +20 -0
  11. package/esm/src/actions/checkers/CompoundV2RatioCheckAction.d.ts +14 -0
  12. package/esm/src/actions/checkers/CompoundV2RatioCheckAction.js +20 -0
  13. package/esm/src/actions/checkers/CurveUsdCollRatioCheck.d.ts +15 -0
  14. package/esm/src/actions/checkers/CurveUsdCollRatioCheck.js +22 -0
  15. package/esm/src/actions/checkers/index.d.ts +4 -1
  16. package/esm/src/actions/checkers/index.js +4 -1
  17. package/esm/src/actions/curveusd/CurveUsdGetDebtAction.d.ts +8 -0
  18. package/esm/src/actions/curveusd/CurveUsdGetDebtAction.js +13 -0
  19. package/esm/src/actions/curveusd/index.d.ts +1 -0
  20. package/esm/src/actions/curveusd/index.js +1 -0
  21. package/esm/src/actions/flashloan/AaveV3FlashLoanCarryDebtAction.d.ts +18 -0
  22. package/esm/src/actions/flashloan/AaveV3FlashLoanCarryDebtAction.js +28 -0
  23. package/esm/src/actions/flashloan/index.d.ts +1 -0
  24. package/esm/src/actions/flashloan/index.js +1 -0
  25. package/esm/src/actions/index.d.ts +2 -1
  26. package/esm/src/actions/index.js +2 -1
  27. package/esm/src/actions/lsv/LSVBorrowAction.d.ts +14 -0
  28. package/esm/src/actions/lsv/LSVBorrowAction.js +19 -0
  29. package/esm/src/actions/lsv/LSVPaybackAction.d.ts +13 -0
  30. package/esm/src/actions/lsv/LSVPaybackAction.js +18 -0
  31. package/esm/src/actions/lsv/LSVSupplyAction.d.ts +15 -0
  32. package/esm/src/actions/lsv/LSVSupplyAction.js +21 -0
  33. package/esm/src/actions/lsv/LSVWithdrawAction.d.ts +15 -0
  34. package/esm/src/actions/lsv/LSVWithdrawAction.js +21 -0
  35. package/esm/src/actions/lsv/index.d.ts +4 -0
  36. package/esm/src/actions/lsv/index.js +4 -0
  37. package/esm/src/actions/morpho/aaveV3/MorphoAaveV3SetManagerAction.d.ts +14 -0
  38. package/esm/src/actions/morpho/aaveV3/MorphoAaveV3SetManagerAction.js +24 -0
  39. package/esm/src/actions/morpho/index.d.ts +1 -0
  40. package/esm/src/actions/morpho/index.js +1 -0
  41. package/esm/src/addresses.d.ts +43 -3
  42. package/esm/src/addresses.js +12 -0
  43. package/esm/src/index.d.ts +172 -12
  44. package/esm/src/triggers/AaveV2RatioTrigger.d.ts +10 -0
  45. package/esm/src/triggers/AaveV2RatioTrigger.js +12 -0
  46. package/esm/src/triggers/CurveUsdCollRatioTrigger.d.ts +10 -0
  47. package/esm/src/triggers/CurveUsdCollRatioTrigger.js +12 -0
  48. package/esm/src/triggers/index.d.ts +2 -0
  49. package/esm/src/triggers/index.js +2 -0
  50. package/esm/src/utils/curveusd-utils.d.ts +10 -0
  51. package/esm/src/utils/curveusd-utils.js +7 -3
  52. package/package.json +1 -1
  53. package/src/actions/aave/AaveBorrowAction.ts +9 -0
  54. package/src/actions/basic/ApproveTokenAction.ts +5 -0
  55. package/src/actions/basic/CreateSubAction.ts +3 -3
  56. package/src/actions/basic/LSVSellAction.ts +61 -0
  57. package/src/actions/basic/UpdateSubAction.ts +1 -1
  58. package/src/actions/basic/index.ts +2 -1
  59. package/src/actions/checkers/AaveV2RatioCheckAction.ts +23 -0
  60. package/src/actions/checkers/CompoundV2RatioCheckAction.ts +23 -0
  61. package/src/actions/checkers/CurveUsdCollRatioCheck.ts +25 -0
  62. package/src/actions/checkers/index.ts +4 -1
  63. package/src/actions/curveusd/CurveUsdGetDebtAction.ts +21 -0
  64. package/src/actions/curveusd/index.ts +2 -1
  65. package/src/actions/flashloan/AaveV3FlashLoanCarryDebtAction.ts +35 -0
  66. package/src/actions/flashloan/index.ts +1 -0
  67. package/src/actions/index.ts +2 -0
  68. package/src/actions/lsv/LSVBorrowAction.ts +21 -0
  69. package/src/actions/lsv/LSVPaybackAction.ts +20 -0
  70. package/src/actions/lsv/LSVSupplyAction.ts +23 -0
  71. package/src/actions/lsv/LSVWithdrawAction.ts +23 -0
  72. package/src/actions/lsv/index.ts +4 -0
  73. package/src/actions/morpho/aaveV3/MorphoAaveV3SetManagerAction.ts +32 -0
  74. package/src/actions/morpho/index.ts +1 -0
  75. package/src/addresses.ts +13 -0
  76. package/src/triggers/AaveV2RatioTrigger.ts +14 -0
  77. package/src/triggers/CurveUsdCollRatioTrigger.ts +14 -0
  78. package/src/triggers/index.ts +2 -0
  79. package/src/utils/basic-utils.ts +1 -1
  80. package/src/utils/curveusd-utils.ts +7 -3
  81. package/test/actions/basic/CreateSubAction.js +29 -0
  82. package/umd/index.js +1554 -1127
@@ -15,6 +15,7 @@ export declare const actionAddresses: {
15
15
  UpdateSub: string;
16
16
  TransferNFT: string;
17
17
  CreateSub: string;
18
+ ApproveToken: string;
18
19
  SDaiWrap: string;
19
20
  SDaiUnwrap: string;
20
21
  TokenizedVaultAdapter: string;
@@ -55,6 +56,11 @@ export declare const actionAddresses: {
55
56
  AaveV3Borrow: string;
56
57
  AaveV3ATokenPayback: string;
57
58
  AaveV3View: string;
59
+ LSVWithdraw: string;
60
+ LSVBorrow: string;
61
+ LSVSupply: string;
62
+ LSVPayback: string;
63
+ LSVSell: string;
58
64
  MorphoAaveV2Borrow: string;
59
65
  MorphoAaveV2Payback: string;
60
66
  MorphoAaveV2Supply: string;
@@ -64,6 +70,7 @@ export declare const actionAddresses: {
64
70
  MorphoAaveV3Payback: string;
65
71
  MorphoAaveV3Supply: string;
66
72
  MorphoAaveV3Withdraw: string;
73
+ MorphoAaveV3SetManager: string;
67
74
  SparkBorrow: string;
68
75
  SparkClaimRewards: string;
69
76
  SparkCollateralSwitch: string;
@@ -83,6 +90,7 @@ export declare const actionAddresses: {
83
90
  CompCollateralSwitch: string;
84
91
  FLAaveV2: string;
85
92
  FLAaveV3NoFee: string;
93
+ FLAaveV3CarryDebt: string;
86
94
  FLAaveV3: string;
87
95
  FLDyDx: string;
88
96
  FLMaker: string;
@@ -171,7 +179,9 @@ export declare const actionAddresses: {
171
179
  CurveUsdSwapper: string;
172
180
  CurveUsdSelfLiquidate: string;
173
181
  CurveUsdSelfLiquidateWithColl: string;
174
- ApproveToken?: undefined;
182
+ CurveUsdGetDebt: string;
183
+ CurveUsdCollRatioTrigger: string;
184
+ CurveUsdCollRatioCheck: string;
175
185
  AaveV3DelegateCredit?: undefined;
176
186
  AaveV3RatioTrigger?: undefined;
177
187
  GasFeeTakerL2?: undefined;
@@ -245,6 +255,11 @@ export declare const actionAddresses: {
245
255
  AaveClaimAAVE?: undefined;
246
256
  AaveClaimStkAave?: undefined;
247
257
  AaveV3View?: undefined;
258
+ LSVWithdraw?: undefined;
259
+ LSVBorrow?: undefined;
260
+ LSVSupply?: undefined;
261
+ LSVPayback?: undefined;
262
+ LSVSell?: undefined;
248
263
  MorphoAaveV2Borrow?: undefined;
249
264
  MorphoAaveV2Payback?: undefined;
250
265
  MorphoAaveV2Supply?: undefined;
@@ -254,6 +269,7 @@ export declare const actionAddresses: {
254
269
  MorphoAaveV3Payback?: undefined;
255
270
  MorphoAaveV3Supply?: undefined;
256
271
  MorphoAaveV3Withdraw?: undefined;
272
+ MorphoAaveV3SetManager?: undefined;
257
273
  SparkBorrow?: undefined;
258
274
  SparkClaimRewards?: undefined;
259
275
  SparkCollateralSwitch?: undefined;
@@ -272,6 +288,7 @@ export declare const actionAddresses: {
272
288
  CompGetDebt?: undefined;
273
289
  CompCollateralSwitch?: undefined;
274
290
  FLAaveV2?: undefined;
291
+ FLAaveV3CarryDebt?: undefined;
275
292
  FLDyDx?: undefined;
276
293
  FLMaker?: undefined;
277
294
  FLSpark?: undefined;
@@ -352,6 +369,9 @@ export declare const actionAddresses: {
352
369
  CurveUsdSwapper?: undefined;
353
370
  CurveUsdSelfLiquidate?: undefined;
354
371
  CurveUsdSelfLiquidateWithColl?: undefined;
372
+ CurveUsdGetDebt?: undefined;
373
+ CurveUsdCollRatioTrigger?: undefined;
374
+ CurveUsdCollRatioCheck?: undefined;
355
375
  } | {
356
376
  DFSSell: string;
357
377
  WrapEth: string;
@@ -395,6 +415,7 @@ export declare const actionAddresses: {
395
415
  UpdateSub?: undefined;
396
416
  TransferNFT?: undefined;
397
417
  CreateSub?: undefined;
418
+ ApproveToken?: undefined;
398
419
  SDaiWrap?: undefined;
399
420
  SDaiUnwrap?: undefined;
400
421
  McdGenerate?: undefined;
@@ -425,6 +446,11 @@ export declare const actionAddresses: {
425
446
  AaveClaimStkAave?: undefined;
426
447
  AaveV3ClaimRewards?: undefined;
427
448
  AaveV3View?: undefined;
449
+ LSVWithdraw?: undefined;
450
+ LSVBorrow?: undefined;
451
+ LSVSupply?: undefined;
452
+ LSVPayback?: undefined;
453
+ LSVSell?: undefined;
428
454
  MorphoAaveV2Borrow?: undefined;
429
455
  MorphoAaveV2Payback?: undefined;
430
456
  MorphoAaveV2Supply?: undefined;
@@ -434,6 +460,7 @@ export declare const actionAddresses: {
434
460
  MorphoAaveV3Payback?: undefined;
435
461
  MorphoAaveV3Supply?: undefined;
436
462
  MorphoAaveV3Withdraw?: undefined;
463
+ MorphoAaveV3SetManager?: undefined;
437
464
  SparkBorrow?: undefined;
438
465
  SparkClaimRewards?: undefined;
439
466
  SparkCollateralSwitch?: undefined;
@@ -452,6 +479,7 @@ export declare const actionAddresses: {
452
479
  CompGetDebt?: undefined;
453
480
  CompCollateralSwitch?: undefined;
454
481
  FLAaveV2?: undefined;
482
+ FLAaveV3CarryDebt?: undefined;
455
483
  FLDyDx?: undefined;
456
484
  FLMaker?: undefined;
457
485
  FLSpark?: undefined;
@@ -525,7 +553,9 @@ export declare const actionAddresses: {
525
553
  CurveUsdSwapper?: undefined;
526
554
  CurveUsdSelfLiquidate?: undefined;
527
555
  CurveUsdSelfLiquidateWithColl?: undefined;
528
- ApproveToken?: undefined;
556
+ CurveUsdGetDebt?: undefined;
557
+ CurveUsdCollRatioTrigger?: undefined;
558
+ CurveUsdCollRatioCheck?: undefined;
529
559
  AaveV3DelegateCredit?: undefined;
530
560
  AaveV3RatioTrigger?: undefined;
531
561
  } | {
@@ -564,6 +594,7 @@ export declare const actionAddresses: {
564
594
  UpdateSub?: undefined;
565
595
  TransferNFT?: undefined;
566
596
  CreateSub?: undefined;
597
+ ApproveToken?: undefined;
567
598
  SDaiWrap?: undefined;
568
599
  SDaiUnwrap?: undefined;
569
600
  TokenizedVaultAdapter?: undefined;
@@ -593,6 +624,11 @@ export declare const actionAddresses: {
593
624
  AaveUnstake?: undefined;
594
625
  AaveClaimAAVE?: undefined;
595
626
  AaveClaimStkAave?: undefined;
627
+ LSVWithdraw?: undefined;
628
+ LSVBorrow?: undefined;
629
+ LSVSupply?: undefined;
630
+ LSVPayback?: undefined;
631
+ LSVSell?: undefined;
596
632
  MorphoAaveV2Borrow?: undefined;
597
633
  MorphoAaveV2Payback?: undefined;
598
634
  MorphoAaveV2Supply?: undefined;
@@ -602,6 +638,7 @@ export declare const actionAddresses: {
602
638
  MorphoAaveV3Payback?: undefined;
603
639
  MorphoAaveV3Supply?: undefined;
604
640
  MorphoAaveV3Withdraw?: undefined;
641
+ MorphoAaveV3SetManager?: undefined;
605
642
  SparkBorrow?: undefined;
606
643
  SparkClaimRewards?: undefined;
607
644
  SparkCollateralSwitch?: undefined;
@@ -621,6 +658,7 @@ export declare const actionAddresses: {
621
658
  CompCollateralSwitch?: undefined;
622
659
  FLAaveV2?: undefined;
623
660
  FLAaveV3NoFee?: undefined;
661
+ FLAaveV3CarryDebt?: undefined;
624
662
  FLDyDx?: undefined;
625
663
  FLMaker?: undefined;
626
664
  FLSpark?: undefined;
@@ -699,7 +737,9 @@ export declare const actionAddresses: {
699
737
  CurveUsdSwapper?: undefined;
700
738
  CurveUsdSelfLiquidate?: undefined;
701
739
  CurveUsdSelfLiquidateWithColl?: undefined;
702
- ApproveToken?: undefined;
740
+ CurveUsdGetDebt?: undefined;
741
+ CurveUsdCollRatioTrigger?: undefined;
742
+ CurveUsdCollRatioCheck?: undefined;
703
743
  AaveV3DelegateCredit?: undefined;
704
744
  AaveV3RatioTrigger?: undefined;
705
745
  GasFeeTakerL2?: undefined;
@@ -16,6 +16,7 @@ export const actionAddresses = {
16
16
  UpdateSub: '0xF6Cb8f7e61a64075ec8FAC3f298745605E543233',
17
17
  TransferNFT: '0x861e893E1796F81248e75F06C0b09Abdc8fe2f6F',
18
18
  CreateSub: '0x7308e88BB21B934478E75bB6A2143b8cfDFf2961',
19
+ ApproveToken: '0xA4161cED7A29F0a3424e464a4a2dBf75888c5BF9',
19
20
  SDaiWrap: '0xac7Ac294F29d818D26Bd9DF86d36904B1Ed346Ae',
20
21
  SDaiUnwrap: '0xe8Cb536BB96075241c4bd8f1831A8577562F2B32',
21
22
  TokenizedVaultAdapter: '0x3944364Ce3a273D269707484F3a676fCa17E08b8',
@@ -62,6 +63,12 @@ export const actionAddresses = {
62
63
  AaveV3Borrow: '0x7079ba1Bd00EeFCD2a260BbD6D088230505e3858',
63
64
  AaveV3ATokenPayback: '0xDe5c012cd1878D86E91309593764895a3adb380E',
64
65
  AaveV3View: '0x9ECB0645b357fDD7B92789B91595160862Bd45d0',
66
+ // LSV action
67
+ LSVWithdraw: '0x0A4Ef5ADf759064b546441a50109eCbC2528A455',
68
+ LSVBorrow: '0x7dFB434527Fdb39854156cDBa9bF4799E36E7e82',
69
+ LSVSupply: '0x984c00DC098c98bed1CDfe2Ed786Fe1443da6671',
70
+ LSVPayback: '0x10749CE97583dBcEb54a083386CC8438C4e0FE65',
71
+ LSVSell: '0x0c1bb9A39d4A0EF4215Ade19Ce4F954E8419Dfd7',
65
72
  // morpho aave v2
66
73
  MorphoAaveV2Borrow: '0xa85C3E41Bf9F75a381927e1Aa9b00f77C4631109',
67
74
  MorphoAaveV2Payback: '0x5dd0E0835acbb08aa4A4599d70fB2d93969fa7b7',
@@ -73,6 +80,7 @@ export const actionAddresses = {
73
80
  MorphoAaveV3Payback: '0x36b8b968c81D97cBfAa642e206b634A6f378d287',
74
81
  MorphoAaveV3Supply: '0x51fA8FBc6F0aDEfe2FBA06104FCA39f5beD69291',
75
82
  MorphoAaveV3Withdraw: '0xdc3e74C4cD577275296ceFE36A3D082223AfF206',
83
+ MorphoAaveV3SetManager: '0x1082AE0565504E3617BD5b6E80f91B59b81a82D9',
76
84
  // spark
77
85
  SparkBorrow: '0x3E2C366065bA0f6f9936C2C6A802D72F250b27AA',
78
86
  SparkClaimRewards: '0x9C3E31f42a46676785C72401cD4F2287b355b003',
@@ -95,6 +103,7 @@ export const actionAddresses = {
95
103
  // flashloan
96
104
  FLAaveV2: '0xEA55576383C96A69B3E8beD51Ce0d0294001bc5F',
97
105
  FLAaveV3NoFee: '0xd9D8e68717Ce24CCbf162868aaad7E38d81b05d1',
106
+ FLAaveV3CarryDebt: '0x7BdD8ACE8a48B7032Df68B7f53E0D6D9Ea9411A7',
98
107
  FLAaveV3: '0x5021d70aB7D757D61E0230c472ff89b8B2B8705e',
99
108
  FLDyDx: '0x08AC78B418fCB0DDF1096533856A757C28d430d7',
100
109
  FLMaker: '0x672DE08e36A1698fD5e9E34045F81558dB4c1AFE',
@@ -200,6 +209,9 @@ export const actionAddresses = {
200
209
  CurveUsdSwapper: '0xFA8c594b903651F97b27aCADEa83b720cfD7F80b',
201
210
  CurveUsdSelfLiquidate: '0xd90d8a4955DfE9D4f45F7f60595313B0925ee1da',
202
211
  CurveUsdSelfLiquidateWithColl: '0x7cE305FC2A18c6820a533AD418dC0A549aFeDcAF',
212
+ CurveUsdGetDebt: '0x3Bb41d3f300dA758780fe7696bb4fB93cD7172fB',
213
+ CurveUsdCollRatioTrigger: '0xFCc610809b735BB13E583c5E46595457083D2b0c',
214
+ CurveUsdCollRatioCheck: '0x8c65f37ca216de1625886431249be13ead051388',
203
215
  },
204
216
  [NETWORKS.optimism.chainId]: {
205
217
  DFSSell: '0xC6c601fcAa870efd26C624F8c65fbc54cBe533b1',