@defisaver/sdk 1.2.16 → 1.2.17

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 (84) hide show
  1. package/esm/src/actions/basic/SendTokensAction.d.ts +1 -1
  2. package/esm/src/actions/basic/SendTokensAction.js +1 -1
  3. package/esm/src/actions/basic/SendTokensAndUnwrapAction.d.ts +15 -0
  4. package/esm/src/actions/basic/SendTokensAndUnwrapAction.js +31 -0
  5. package/esm/src/actions/basic/index.d.ts +1 -0
  6. package/esm/src/actions/basic/index.js +1 -0
  7. package/esm/src/actions/checkers/LiquityV2RatioCheckAction.d.ts +16 -0
  8. package/esm/src/actions/checkers/LiquityV2RatioCheckAction.js +24 -0
  9. package/esm/src/actions/checkers/LiquityV2TargetRatioCheckAction.d.ts +15 -0
  10. package/esm/src/actions/checkers/LiquityV2TargetRatioCheckAction.js +22 -0
  11. package/esm/src/actions/checkers/index.d.ts +2 -0
  12. package/esm/src/actions/checkers/index.js +2 -0
  13. package/esm/src/actions/index.d.ts +2 -1
  14. package/esm/src/actions/index.js +2 -1
  15. package/esm/src/actions/liquityV2/LiquityV2AdjustAction.d.ts +21 -0
  16. package/esm/src/actions/liquityV2/LiquityV2AdjustAction.js +54 -0
  17. package/esm/src/actions/liquityV2/LiquityV2AdjustInterestRateAction.d.ts +18 -0
  18. package/esm/src/actions/liquityV2/LiquityV2AdjustInterestRateAction.js +42 -0
  19. package/esm/src/actions/liquityV2/LiquityV2AdjustZombieTroveAction.d.ts +23 -0
  20. package/esm/src/actions/liquityV2/LiquityV2AdjustZombieTroveAction.js +62 -0
  21. package/esm/src/actions/liquityV2/LiquityV2BorrowAction.d.ts +17 -0
  22. package/esm/src/actions/liquityV2/LiquityV2BorrowAction.js +38 -0
  23. package/esm/src/actions/liquityV2/LiquityV2ClaimAction.d.ts +14 -0
  24. package/esm/src/actions/liquityV2/LiquityV2ClaimAction.js +26 -0
  25. package/esm/src/actions/liquityV2/LiquityV2CloseAction.d.ts +20 -0
  26. package/esm/src/actions/liquityV2/LiquityV2CloseAction.js +49 -0
  27. package/esm/src/actions/liquityV2/LiquityV2OpenAction.d.ts +29 -0
  28. package/esm/src/actions/liquityV2/LiquityV2OpenAction.js +86 -0
  29. package/esm/src/actions/liquityV2/LiquityV2PaybackAction.d.ts +20 -0
  30. package/esm/src/actions/liquityV2/LiquityV2PaybackAction.js +49 -0
  31. package/esm/src/actions/liquityV2/LiquityV2SPClaimCollAction.d.ts +14 -0
  32. package/esm/src/actions/liquityV2/LiquityV2SPClaimCollAction.js +26 -0
  33. package/esm/src/actions/liquityV2/LiquityV2SPDepositAction.d.ts +22 -0
  34. package/esm/src/actions/liquityV2/LiquityV2SPDepositAction.js +57 -0
  35. package/esm/src/actions/liquityV2/LiquityV2SPWithdrawAction.d.ts +17 -0
  36. package/esm/src/actions/liquityV2/LiquityV2SPWithdrawAction.js +38 -0
  37. package/esm/src/actions/liquityV2/LiquityV2SupplyAction.d.ts +22 -0
  38. package/esm/src/actions/liquityV2/LiquityV2SupplyAction.js +50 -0
  39. package/esm/src/actions/liquityV2/LiquityV2WithdrawAction.d.ts +16 -0
  40. package/esm/src/actions/liquityV2/LiquityV2WithdrawAction.js +34 -0
  41. package/esm/src/actions/liquityV2/index.d.ts +13 -0
  42. package/esm/src/actions/liquityV2/index.js +13 -0
  43. package/esm/src/addresses.d.ts +53 -1
  44. package/esm/src/addresses.js +15 -0
  45. package/esm/src/index.d.ts +212 -4
  46. package/esm/src/triggers/ClosePriceTrigger.d.ts +10 -0
  47. package/esm/src/triggers/ClosePriceTrigger.js +12 -0
  48. package/esm/src/triggers/LiquityRatioTrigger.js +1 -1
  49. package/esm/src/triggers/LiquityV2QuotePriceTrigger.d.ts +8 -0
  50. package/esm/src/triggers/LiquityV2QuotePriceTrigger.js +10 -0
  51. package/esm/src/triggers/LiquityV2RatioTrigger.d.ts +8 -0
  52. package/esm/src/triggers/LiquityV2RatioTrigger.js +10 -0
  53. package/esm/src/triggers/index.d.ts +3 -0
  54. package/esm/src/triggers/index.js +3 -0
  55. package/package.json +2 -2
  56. package/src/actions/basic/SendTokensAction.ts +1 -1
  57. package/src/actions/basic/SendTokensAndUnwrapAction.ts +38 -0
  58. package/src/actions/basic/index.ts +2 -1
  59. package/src/actions/checkers/LiquityV2RatioCheckAction.ts +32 -0
  60. package/src/actions/checkers/LiquityV2TargetRatioCheckAction.ts +30 -0
  61. package/src/actions/checkers/index.ts +3 -1
  62. package/src/actions/index.ts +2 -0
  63. package/src/actions/liquityV2/LiquityV2AdjustAction.ts +73 -0
  64. package/src/actions/liquityV2/LiquityV2AdjustInterestRateAction.ts +57 -0
  65. package/src/actions/liquityV2/LiquityV2AdjustZombieTroveAction.ts +82 -0
  66. package/src/actions/liquityV2/LiquityV2BorrowAction.ts +52 -0
  67. package/src/actions/liquityV2/LiquityV2ClaimAction.ts +37 -0
  68. package/src/actions/liquityV2/LiquityV2CloseAction.ts +53 -0
  69. package/src/actions/liquityV2/LiquityV2OpenAction.ts +101 -0
  70. package/src/actions/liquityV2/LiquityV2PaybackAction.ts +52 -0
  71. package/src/actions/liquityV2/LiquityV2SPClaimCollAction.ts +37 -0
  72. package/src/actions/liquityV2/LiquityV2SPDepositAction.ts +62 -0
  73. package/src/actions/liquityV2/LiquityV2SPWithdrawAction.ts +52 -0
  74. package/src/actions/liquityV2/LiquityV2SupplyAction.ts +57 -0
  75. package/src/actions/liquityV2/LiquityV2WithdrawAction.ts +47 -0
  76. package/src/actions/liquityV2/index.ts +13 -0
  77. package/src/addresses.ts +17 -0
  78. package/src/triggers/ClosePriceTrigger.ts +19 -0
  79. package/src/triggers/LiquityRatioTrigger.ts +1 -1
  80. package/src/triggers/LiquityV2QuotePriceTrigger.ts +17 -0
  81. package/src/triggers/LiquityV2RatioTrigger.ts +17 -0
  82. package/src/triggers/index.ts +3 -0
  83. package/test/actions/basic/SendTokensAndUnwrapAction.js +73 -0
  84. package/umd/index.js +1314 -569
@@ -148,6 +148,19 @@ declare const actionAddressesAllChains: {
148
148
  LiquityClaim: string;
149
149
  LiquityRedeem: string;
150
150
  LiquityAdjust: string;
151
+ LiquityV2Open: string;
152
+ LiquityV2Close: string;
153
+ LiquityV2Supply: string;
154
+ LiquityV2Withdraw: string;
155
+ LiquityV2Borrow: string;
156
+ LiquityV2Payback: string;
157
+ LiquityV2Claim: string;
158
+ LiquityV2Adjust: string;
159
+ LiquityV2AdjustInterestRate: string;
160
+ LiquityV2SPDeposit: string;
161
+ LiquityV2SPWithdraw: string;
162
+ LiquityV2SPClaimColl: string;
163
+ LiquityV2AdjustZombieTrove: string;
151
164
  BprotocolLiquitySPDeposit: string;
152
165
  BprotocolLiquitySPWithdraw: string;
153
166
  LidoStake: string;
@@ -396,6 +409,19 @@ declare const actionAddressesAllChains: {
396
409
  LiquityClaim?: undefined;
397
410
  LiquityRedeem?: undefined;
398
411
  LiquityAdjust?: undefined;
412
+ LiquityV2Open?: undefined;
413
+ LiquityV2Close?: undefined;
414
+ LiquityV2Supply?: undefined;
415
+ LiquityV2Withdraw?: undefined;
416
+ LiquityV2Borrow?: undefined;
417
+ LiquityV2Payback?: undefined;
418
+ LiquityV2Claim?: undefined;
419
+ LiquityV2Adjust?: undefined;
420
+ LiquityV2AdjustInterestRate?: undefined;
421
+ LiquityV2SPDeposit?: undefined;
422
+ LiquityV2SPWithdraw?: undefined;
423
+ LiquityV2SPClaimColl?: undefined;
424
+ LiquityV2AdjustZombieTrove?: undefined;
399
425
  BprotocolLiquitySPDeposit?: undefined;
400
426
  BprotocolLiquitySPWithdraw?: undefined;
401
427
  LidoStake?: undefined;
@@ -642,6 +668,19 @@ declare const actionAddressesAllChains: {
642
668
  LiquityClaim?: undefined;
643
669
  LiquityRedeem?: undefined;
644
670
  LiquityAdjust?: undefined;
671
+ LiquityV2Open?: undefined;
672
+ LiquityV2Close?: undefined;
673
+ LiquityV2Supply?: undefined;
674
+ LiquityV2Withdraw?: undefined;
675
+ LiquityV2Borrow?: undefined;
676
+ LiquityV2Payback?: undefined;
677
+ LiquityV2Claim?: undefined;
678
+ LiquityV2Adjust?: undefined;
679
+ LiquityV2AdjustInterestRate?: undefined;
680
+ LiquityV2SPDeposit?: undefined;
681
+ LiquityV2SPWithdraw?: undefined;
682
+ LiquityV2SPClaimColl?: undefined;
683
+ LiquityV2AdjustZombieTrove?: undefined;
645
684
  BprotocolLiquitySPDeposit?: undefined;
646
685
  BprotocolLiquitySPWithdraw?: undefined;
647
686
  LidoStake?: undefined;
@@ -739,6 +778,7 @@ declare const actionAddressesAllChains: {
739
778
  CreateSub: string;
740
779
  UpdateSub: string;
741
780
  MerklClaim: string;
781
+ GasFeeTakerL2: string;
742
782
  FLAaveV3: string;
743
783
  FLBalancer: string;
744
784
  FLUniV3: string;
@@ -877,6 +917,19 @@ declare const actionAddressesAllChains: {
877
917
  LiquityClaim?: undefined;
878
918
  LiquityRedeem?: undefined;
879
919
  LiquityAdjust?: undefined;
920
+ LiquityV2Open?: undefined;
921
+ LiquityV2Close?: undefined;
922
+ LiquityV2Supply?: undefined;
923
+ LiquityV2Withdraw?: undefined;
924
+ LiquityV2Borrow?: undefined;
925
+ LiquityV2Payback?: undefined;
926
+ LiquityV2Claim?: undefined;
927
+ LiquityV2Adjust?: undefined;
928
+ LiquityV2AdjustInterestRate?: undefined;
929
+ LiquityV2SPDeposit?: undefined;
930
+ LiquityV2SPWithdraw?: undefined;
931
+ LiquityV2SPClaimColl?: undefined;
932
+ LiquityV2AdjustZombieTrove?: undefined;
880
933
  BprotocolLiquitySPDeposit?: undefined;
881
934
  BprotocolLiquitySPWithdraw?: undefined;
882
935
  LidoStake?: undefined;
@@ -957,7 +1010,6 @@ declare const actionAddressesAllChains: {
957
1010
  EtherFiUnwrap?: undefined;
958
1011
  AaveV3DelegateCredit?: undefined;
959
1012
  AaveV3RatioTrigger?: undefined;
960
- GasFeeTakerL2?: undefined;
961
1013
  AaveV3RatioCheck?: undefined;
962
1014
  };
963
1015
  };
@@ -1098,6 +1150,19 @@ declare const actionAddresses: (chainId?: null) => {
1098
1150
  LiquityClaim: string;
1099
1151
  LiquityRedeem: string;
1100
1152
  LiquityAdjust: string;
1153
+ LiquityV2Open: string;
1154
+ LiquityV2Close: string;
1155
+ LiquityV2Supply: string;
1156
+ LiquityV2Withdraw: string;
1157
+ LiquityV2Borrow: string;
1158
+ LiquityV2Payback: string;
1159
+ LiquityV2Claim: string;
1160
+ LiquityV2Adjust: string;
1161
+ LiquityV2AdjustInterestRate: string;
1162
+ LiquityV2SPDeposit: string;
1163
+ LiquityV2SPWithdraw: string;
1164
+ LiquityV2SPClaimColl: string;
1165
+ LiquityV2AdjustZombieTrove: string;
1101
1166
  BprotocolLiquitySPDeposit: string;
1102
1167
  BprotocolLiquitySPWithdraw: string;
1103
1168
  LidoStake: string;
@@ -1346,6 +1411,19 @@ declare const actionAddresses: (chainId?: null) => {
1346
1411
  LiquityClaim?: undefined;
1347
1412
  LiquityRedeem?: undefined;
1348
1413
  LiquityAdjust?: undefined;
1414
+ LiquityV2Open?: undefined;
1415
+ LiquityV2Close?: undefined;
1416
+ LiquityV2Supply?: undefined;
1417
+ LiquityV2Withdraw?: undefined;
1418
+ LiquityV2Borrow?: undefined;
1419
+ LiquityV2Payback?: undefined;
1420
+ LiquityV2Claim?: undefined;
1421
+ LiquityV2Adjust?: undefined;
1422
+ LiquityV2AdjustInterestRate?: undefined;
1423
+ LiquityV2SPDeposit?: undefined;
1424
+ LiquityV2SPWithdraw?: undefined;
1425
+ LiquityV2SPClaimColl?: undefined;
1426
+ LiquityV2AdjustZombieTrove?: undefined;
1349
1427
  BprotocolLiquitySPDeposit?: undefined;
1350
1428
  BprotocolLiquitySPWithdraw?: undefined;
1351
1429
  LidoStake?: undefined;
@@ -1592,6 +1670,19 @@ declare const actionAddresses: (chainId?: null) => {
1592
1670
  LiquityClaim?: undefined;
1593
1671
  LiquityRedeem?: undefined;
1594
1672
  LiquityAdjust?: undefined;
1673
+ LiquityV2Open?: undefined;
1674
+ LiquityV2Close?: undefined;
1675
+ LiquityV2Supply?: undefined;
1676
+ LiquityV2Withdraw?: undefined;
1677
+ LiquityV2Borrow?: undefined;
1678
+ LiquityV2Payback?: undefined;
1679
+ LiquityV2Claim?: undefined;
1680
+ LiquityV2Adjust?: undefined;
1681
+ LiquityV2AdjustInterestRate?: undefined;
1682
+ LiquityV2SPDeposit?: undefined;
1683
+ LiquityV2SPWithdraw?: undefined;
1684
+ LiquityV2SPClaimColl?: undefined;
1685
+ LiquityV2AdjustZombieTrove?: undefined;
1595
1686
  BprotocolLiquitySPDeposit?: undefined;
1596
1687
  BprotocolLiquitySPWithdraw?: undefined;
1597
1688
  LidoStake?: undefined;
@@ -1689,6 +1780,7 @@ declare const actionAddresses: (chainId?: null) => {
1689
1780
  CreateSub: string;
1690
1781
  UpdateSub: string;
1691
1782
  MerklClaim: string;
1783
+ GasFeeTakerL2: string;
1692
1784
  FLAaveV3: string;
1693
1785
  FLBalancer: string;
1694
1786
  FLUniV3: string;
@@ -1827,6 +1919,19 @@ declare const actionAddresses: (chainId?: null) => {
1827
1919
  LiquityClaim?: undefined;
1828
1920
  LiquityRedeem?: undefined;
1829
1921
  LiquityAdjust?: undefined;
1922
+ LiquityV2Open?: undefined;
1923
+ LiquityV2Close?: undefined;
1924
+ LiquityV2Supply?: undefined;
1925
+ LiquityV2Withdraw?: undefined;
1926
+ LiquityV2Borrow?: undefined;
1927
+ LiquityV2Payback?: undefined;
1928
+ LiquityV2Claim?: undefined;
1929
+ LiquityV2Adjust?: undefined;
1930
+ LiquityV2AdjustInterestRate?: undefined;
1931
+ LiquityV2SPDeposit?: undefined;
1932
+ LiquityV2SPWithdraw?: undefined;
1933
+ LiquityV2SPClaimColl?: undefined;
1934
+ LiquityV2AdjustZombieTrove?: undefined;
1830
1935
  BprotocolLiquitySPDeposit?: undefined;
1831
1936
  BprotocolLiquitySPWithdraw?: undefined;
1832
1937
  LidoStake?: undefined;
@@ -1907,7 +2012,6 @@ declare const actionAddresses: (chainId?: null) => {
1907
2012
  EtherFiUnwrap?: undefined;
1908
2013
  AaveV3DelegateCredit?: undefined;
1909
2014
  AaveV3RatioTrigger?: undefined;
1910
- GasFeeTakerL2?: undefined;
1911
2015
  AaveV3RatioCheck?: undefined;
1912
2016
  };
1913
2017
  declare const otherAddressesAllChains: {
@@ -2191,6 +2295,19 @@ declare const _default: {
2191
2295
  LiquityClaim: string;
2192
2296
  LiquityRedeem: string;
2193
2297
  LiquityAdjust: string;
2298
+ LiquityV2Open: string;
2299
+ LiquityV2Close: string;
2300
+ LiquityV2Supply: string;
2301
+ LiquityV2Withdraw: string;
2302
+ LiquityV2Borrow: string;
2303
+ LiquityV2Payback: string;
2304
+ LiquityV2Claim: string;
2305
+ LiquityV2Adjust: string;
2306
+ LiquityV2AdjustInterestRate: string;
2307
+ LiquityV2SPDeposit: string;
2308
+ LiquityV2SPWithdraw: string;
2309
+ LiquityV2SPClaimColl: string;
2310
+ LiquityV2AdjustZombieTrove: string;
2194
2311
  BprotocolLiquitySPDeposit: string;
2195
2312
  BprotocolLiquitySPWithdraw: string;
2196
2313
  LidoStake: string;
@@ -2439,6 +2556,19 @@ declare const _default: {
2439
2556
  LiquityClaim?: undefined;
2440
2557
  LiquityRedeem?: undefined;
2441
2558
  LiquityAdjust?: undefined;
2559
+ LiquityV2Open?: undefined;
2560
+ LiquityV2Close?: undefined;
2561
+ LiquityV2Supply?: undefined;
2562
+ LiquityV2Withdraw?: undefined;
2563
+ LiquityV2Borrow?: undefined;
2564
+ LiquityV2Payback?: undefined;
2565
+ LiquityV2Claim?: undefined;
2566
+ LiquityV2Adjust?: undefined;
2567
+ LiquityV2AdjustInterestRate?: undefined;
2568
+ LiquityV2SPDeposit?: undefined;
2569
+ LiquityV2SPWithdraw?: undefined;
2570
+ LiquityV2SPClaimColl?: undefined;
2571
+ LiquityV2AdjustZombieTrove?: undefined;
2442
2572
  BprotocolLiquitySPDeposit?: undefined;
2443
2573
  BprotocolLiquitySPWithdraw?: undefined;
2444
2574
  LidoStake?: undefined;
@@ -2685,6 +2815,19 @@ declare const _default: {
2685
2815
  LiquityClaim?: undefined;
2686
2816
  LiquityRedeem?: undefined;
2687
2817
  LiquityAdjust?: undefined;
2818
+ LiquityV2Open?: undefined;
2819
+ LiquityV2Close?: undefined;
2820
+ LiquityV2Supply?: undefined;
2821
+ LiquityV2Withdraw?: undefined;
2822
+ LiquityV2Borrow?: undefined;
2823
+ LiquityV2Payback?: undefined;
2824
+ LiquityV2Claim?: undefined;
2825
+ LiquityV2Adjust?: undefined;
2826
+ LiquityV2AdjustInterestRate?: undefined;
2827
+ LiquityV2SPDeposit?: undefined;
2828
+ LiquityV2SPWithdraw?: undefined;
2829
+ LiquityV2SPClaimColl?: undefined;
2830
+ LiquityV2AdjustZombieTrove?: undefined;
2688
2831
  BprotocolLiquitySPDeposit?: undefined;
2689
2832
  BprotocolLiquitySPWithdraw?: undefined;
2690
2833
  LidoStake?: undefined;
@@ -2782,6 +2925,7 @@ declare const _default: {
2782
2925
  CreateSub: string;
2783
2926
  UpdateSub: string;
2784
2927
  MerklClaim: string;
2928
+ GasFeeTakerL2: string;
2785
2929
  FLAaveV3: string;
2786
2930
  FLBalancer: string;
2787
2931
  FLUniV3: string;
@@ -2920,6 +3064,19 @@ declare const _default: {
2920
3064
  LiquityClaim?: undefined;
2921
3065
  LiquityRedeem?: undefined;
2922
3066
  LiquityAdjust?: undefined;
3067
+ LiquityV2Open?: undefined;
3068
+ LiquityV2Close?: undefined;
3069
+ LiquityV2Supply?: undefined;
3070
+ LiquityV2Withdraw?: undefined;
3071
+ LiquityV2Borrow?: undefined;
3072
+ LiquityV2Payback?: undefined;
3073
+ LiquityV2Claim?: undefined;
3074
+ LiquityV2Adjust?: undefined;
3075
+ LiquityV2AdjustInterestRate?: undefined;
3076
+ LiquityV2SPDeposit?: undefined;
3077
+ LiquityV2SPWithdraw?: undefined;
3078
+ LiquityV2SPClaimColl?: undefined;
3079
+ LiquityV2AdjustZombieTrove?: undefined;
2923
3080
  BprotocolLiquitySPDeposit?: undefined;
2924
3081
  BprotocolLiquitySPWithdraw?: undefined;
2925
3082
  LidoStake?: undefined;
@@ -3000,7 +3157,6 @@ declare const _default: {
3000
3157
  EtherFiUnwrap?: undefined;
3001
3158
  AaveV3DelegateCredit?: undefined;
3002
3159
  AaveV3RatioTrigger?: undefined;
3003
- GasFeeTakerL2?: undefined;
3004
3160
  AaveV3RatioCheck?: undefined;
3005
3161
  };
3006
3162
  actionAddressesAllChains: {
@@ -3141,6 +3297,19 @@ declare const _default: {
3141
3297
  LiquityClaim: string;
3142
3298
  LiquityRedeem: string;
3143
3299
  LiquityAdjust: string;
3300
+ LiquityV2Open: string;
3301
+ LiquityV2Close: string;
3302
+ LiquityV2Supply: string;
3303
+ LiquityV2Withdraw: string;
3304
+ LiquityV2Borrow: string;
3305
+ LiquityV2Payback: string;
3306
+ LiquityV2Claim: string;
3307
+ LiquityV2Adjust: string;
3308
+ LiquityV2AdjustInterestRate: string;
3309
+ LiquityV2SPDeposit: string;
3310
+ LiquityV2SPWithdraw: string;
3311
+ LiquityV2SPClaimColl: string;
3312
+ LiquityV2AdjustZombieTrove: string;
3144
3313
  BprotocolLiquitySPDeposit: string;
3145
3314
  BprotocolLiquitySPWithdraw: string;
3146
3315
  LidoStake: string;
@@ -3389,6 +3558,19 @@ declare const _default: {
3389
3558
  LiquityClaim?: undefined;
3390
3559
  LiquityRedeem?: undefined;
3391
3560
  LiquityAdjust?: undefined;
3561
+ LiquityV2Open?: undefined;
3562
+ LiquityV2Close?: undefined;
3563
+ LiquityV2Supply?: undefined;
3564
+ LiquityV2Withdraw?: undefined;
3565
+ LiquityV2Borrow?: undefined;
3566
+ LiquityV2Payback?: undefined;
3567
+ LiquityV2Claim?: undefined;
3568
+ LiquityV2Adjust?: undefined;
3569
+ LiquityV2AdjustInterestRate?: undefined;
3570
+ LiquityV2SPDeposit?: undefined;
3571
+ LiquityV2SPWithdraw?: undefined;
3572
+ LiquityV2SPClaimColl?: undefined;
3573
+ LiquityV2AdjustZombieTrove?: undefined;
3392
3574
  BprotocolLiquitySPDeposit?: undefined;
3393
3575
  BprotocolLiquitySPWithdraw?: undefined;
3394
3576
  LidoStake?: undefined;
@@ -3635,6 +3817,19 @@ declare const _default: {
3635
3817
  LiquityClaim?: undefined;
3636
3818
  LiquityRedeem?: undefined;
3637
3819
  LiquityAdjust?: undefined;
3820
+ LiquityV2Open?: undefined;
3821
+ LiquityV2Close?: undefined;
3822
+ LiquityV2Supply?: undefined;
3823
+ LiquityV2Withdraw?: undefined;
3824
+ LiquityV2Borrow?: undefined;
3825
+ LiquityV2Payback?: undefined;
3826
+ LiquityV2Claim?: undefined;
3827
+ LiquityV2Adjust?: undefined;
3828
+ LiquityV2AdjustInterestRate?: undefined;
3829
+ LiquityV2SPDeposit?: undefined;
3830
+ LiquityV2SPWithdraw?: undefined;
3831
+ LiquityV2SPClaimColl?: undefined;
3832
+ LiquityV2AdjustZombieTrove?: undefined;
3638
3833
  BprotocolLiquitySPDeposit?: undefined;
3639
3834
  BprotocolLiquitySPWithdraw?: undefined;
3640
3835
  LidoStake?: undefined;
@@ -3732,6 +3927,7 @@ declare const _default: {
3732
3927
  CreateSub: string;
3733
3928
  UpdateSub: string;
3734
3929
  MerklClaim: string;
3930
+ GasFeeTakerL2: string;
3735
3931
  FLAaveV3: string;
3736
3932
  FLBalancer: string;
3737
3933
  FLUniV3: string;
@@ -3870,6 +4066,19 @@ declare const _default: {
3870
4066
  LiquityClaim?: undefined;
3871
4067
  LiquityRedeem?: undefined;
3872
4068
  LiquityAdjust?: undefined;
4069
+ LiquityV2Open?: undefined;
4070
+ LiquityV2Close?: undefined;
4071
+ LiquityV2Supply?: undefined;
4072
+ LiquityV2Withdraw?: undefined;
4073
+ LiquityV2Borrow?: undefined;
4074
+ LiquityV2Payback?: undefined;
4075
+ LiquityV2Claim?: undefined;
4076
+ LiquityV2Adjust?: undefined;
4077
+ LiquityV2AdjustInterestRate?: undefined;
4078
+ LiquityV2SPDeposit?: undefined;
4079
+ LiquityV2SPWithdraw?: undefined;
4080
+ LiquityV2SPClaimColl?: undefined;
4081
+ LiquityV2AdjustZombieTrove?: undefined;
3873
4082
  BprotocolLiquitySPDeposit?: undefined;
3874
4083
  BprotocolLiquitySPWithdraw?: undefined;
3875
4084
  LidoStake?: undefined;
@@ -3950,7 +4159,6 @@ declare const _default: {
3950
4159
  EtherFiUnwrap?: undefined;
3951
4160
  AaveV3DelegateCredit?: undefined;
3952
4161
  AaveV3RatioTrigger?: undefined;
3953
- GasFeeTakerL2?: undefined;
3954
4162
  AaveV3RatioCheck?: undefined;
3955
4163
  };
3956
4164
  };
@@ -0,0 +1,10 @@
1
+ import { Action } from '../Action';
2
+ import { EthAddress, uint256 } from '../types';
3
+ /**
4
+ *
5
+ *
6
+ * @category Triggers
7
+ */
8
+ export declare class ClosePriceTrigger extends Action {
9
+ constructor(token: EthAddress, lowerPrice: uint256, upperPrice: uint256);
10
+ }
@@ -0,0 +1,12 @@
1
+ import { Action } from '../Action';
2
+ import { getAddr } from '../addresses';
3
+ /**
4
+ *
5
+ *
6
+ * @category Triggers
7
+ */
8
+ export class ClosePriceTrigger extends Action {
9
+ constructor(token, lowerPrice, upperPrice) {
10
+ super('ClosePriceTrigger', getAddr('Empty'), ['address', 'uint256', 'uint256'], [token, lowerPrice, upperPrice]);
11
+ }
12
+ }
@@ -7,6 +7,6 @@ import { getAddr } from '../addresses';
7
7
  */
8
8
  export class LiquityRatioTrigger extends Action {
9
9
  constructor(troveOwner, ratio, state) {
10
- super('LiquityRatioTrigger', getAddr('Empty'), ['addresss', 'uint256', 'uint8'], [troveOwner, ratio, state]);
10
+ super('LiquityRatioTrigger', getAddr('Empty'), ['address', 'uint256', 'uint8'], [troveOwner, ratio, state]);
11
11
  }
12
12
  }
@@ -0,0 +1,8 @@
1
+ import { Action } from '../Action';
2
+ import { EthAddress, uint256, uint8 } from '../types';
3
+ /**
4
+ * @category Triggers
5
+ */
6
+ export declare class LiquityV2QuotePriceTrigger extends Action {
7
+ constructor(market: EthAddress, price: uint256, state: uint8);
8
+ }
@@ -0,0 +1,10 @@
1
+ import { Action } from '../Action';
2
+ import { getAddr } from '../addresses';
3
+ /**
4
+ * @category Triggers
5
+ */
6
+ export class LiquityV2QuotePriceTrigger extends Action {
7
+ constructor(market, price, state) {
8
+ super('LiquityV2QuotePriceTrigger', getAddr('Empty'), ['address', 'uint256', 'uint8'], [market, price, state]);
9
+ }
10
+ }
@@ -0,0 +1,8 @@
1
+ import { Action } from '../Action';
2
+ import { EthAddress, uint256, uint8 } from '../types';
3
+ /**
4
+ * @category Triggers
5
+ */
6
+ export declare class LiquityV2RatioTrigger extends Action {
7
+ constructor(market: EthAddress, troveId: uint256, ratio: uint256, state: uint8);
8
+ }
@@ -0,0 +1,10 @@
1
+ import { Action } from '../Action';
2
+ import { getAddr } from '../addresses';
3
+ /**
4
+ * @category Triggers
5
+ */
6
+ export class LiquityV2RatioTrigger extends Action {
7
+ constructor(market, troveId, ratio, state) {
8
+ super('LiquityV2RatioTrigger', getAddr('Empty'), ['address', 'uint256', 'uint256', 'uint8'], [market, troveId, ratio, state]);
9
+ }
10
+ }
@@ -20,3 +20,6 @@ export * from './CurveUsdCollRatioTrigger';
20
20
  export * from './CurveUsdHealthRatioTrigger';
21
21
  export * from './MorphoBlueRatioTrigger';
22
22
  export * from './OffchainPriceTrigger';
23
+ export * from './LiquityV2RatioTrigger';
24
+ export * from './ClosePriceTrigger';
25
+ export * from './LiquityV2QuotePriceTrigger';
@@ -20,3 +20,6 @@ export * from './CurveUsdCollRatioTrigger';
20
20
  export * from './CurveUsdHealthRatioTrigger';
21
21
  export * from './MorphoBlueRatioTrigger';
22
22
  export * from './OffchainPriceTrigger';
23
+ export * from './LiquityV2RatioTrigger';
24
+ export * from './ClosePriceTrigger';
25
+ export * from './LiquityV2QuotePriceTrigger';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@defisaver/sdk",
3
- "version": "1.2.16",
3
+ "version": "1.2.17",
4
4
  "description": "",
5
5
  "main": "./umd/index.js",
6
6
  "module": "./esm/src/index.js",
@@ -23,7 +23,7 @@
23
23
  "license": "ISC",
24
24
  "dependencies": {
25
25
  "@defisaver/eslint-config": "^1.0.0",
26
- "@defisaver/tokens": "^1.5.48",
26
+ "@defisaver/tokens": "^1.5.54",
27
27
  "@ethersproject/address": "^5.0.10",
28
28
  "@ethersproject/solidity": "^5.0.9",
29
29
  "@types/web3-eth-abi": "^1.2.2",
@@ -10,7 +10,7 @@ import { EthAddress, uint256 } from '../../types';
10
10
  */
11
11
  export class SendTokensAction extends Action {
12
12
  /**
13
- * @param tokens Token addressess
13
+ * @param tokens Token addresses
14
14
  * @param receivers Transfer recipients
15
15
  * @param amounts Transfer amounts (-1 for whole Recipe (DsProxy) balance)
16
16
  */
@@ -0,0 +1,38 @@
1
+ import { Action } from '../../Action';
2
+ import { getAddr } from '../../addresses';
3
+ import { EthAddress, uint256 } from '../../types';
4
+
5
+ /**
6
+ * Transfers specified tokens from user's wallet to specified addresses and unwraps for weth address
7
+ *
8
+ * @category BasicActions
9
+ */
10
+ export class SendTokensAndUnwrapAction extends Action {
11
+ /**
12
+ * @param tokens Token addresses
13
+ * @param receivers Transfer recipients
14
+ * @param amounts Transfer amounts
15
+ */
16
+ constructor(tokens: Array<EthAddress>, receivers: Array<EthAddress>, amounts:Array<uint256>) {
17
+ super(
18
+ 'SendTokensAndUnwrap',
19
+ getAddr('Empty'),
20
+ [
21
+ 'address[]',
22
+ 'address[]',
23
+ 'uint256[]',
24
+ ],
25
+ [tokens, receivers, amounts],
26
+ );
27
+ this.mappableArgs = [];
28
+ for (let i = 0; i < this.args[0].length; i++) {
29
+ this.mappableArgs.push(this.args[0][i]);
30
+ }
31
+ for (let i = 0; i < this.args[1].length; i++) {
32
+ this.mappableArgs.push(this.args[1][i]);
33
+ }
34
+ for (let i = 0; i < this.args[2].length; i++) {
35
+ this.mappableArgs.push(this.args[2][i]);
36
+ }
37
+ }
38
+ }
@@ -29,4 +29,5 @@ export * from './ExecuteSafeTxAction';
29
29
  export * from './RemoveTokenApprovalAction';
30
30
  export * from './PermitTokenAction';
31
31
  export * from './StarknetClaimAction';
32
- export * from './HandleAuthAction';
32
+ export * from './HandleAuthAction';
33
+ export * from './SendTokensAndUnwrapAction';
@@ -0,0 +1,32 @@
1
+ import { Action } from '../../Action';
2
+ import { getAddr } from '../../addresses';
3
+ import { uint8, uint256, EthAddress } from '../../types';
4
+
5
+ /**
6
+ * LiquityV2RatioCheckAction - Checks liquity ratio for user position and reverts if faulty
7
+ *
8
+ * @category Checkers
9
+ */
10
+ export class LiquityV2RatioCheckAction extends Action {
11
+ /**
12
+ * @param market Address of the market
13
+ * @param troveId Trove id of the user
14
+ * @param ratioState If it should lower/higher
15
+ * @param targetRatio The ratio user want to be at
16
+ */
17
+ constructor(market: EthAddress, troveId: uint256, ratioState:uint8, targetRatio:uint256) {
18
+ super(
19
+ 'LiquityV2RatioCheck',
20
+ getAddr('Empty'),
21
+ ['address', 'uint256', 'uint8', 'uint256'],
22
+ [market, troveId, ratioState, targetRatio],
23
+ );
24
+
25
+ this.mappableArgs = [
26
+ this.args[0],
27
+ this.args[1],
28
+ this.args[2],
29
+ this.args[3],
30
+ ];
31
+ }
32
+ }
@@ -0,0 +1,30 @@
1
+ import { Action } from '../../Action';
2
+ import { getAddr } from '../../addresses';
3
+ import { uint8, uint256, EthAddress } from '../../types';
4
+
5
+ /**
6
+ * LiquityV2TargetRatioCheckAction - Checks liquity target ratio for user position and reverts if faulty
7
+ *
8
+ * @category Checkers
9
+ */
10
+ export class LiquityV2TargetRatioCheckAction extends Action {
11
+ /**
12
+ * @param market Address of the market
13
+ * @param troveId Trove id of the user
14
+ * @param targetRatio The ratio user want to be at
15
+ */
16
+ constructor(market: EthAddress, troveId: uint256, targetRatio:uint256) {
17
+ super(
18
+ 'LiquityV2TargetRatioCheck',
19
+ getAddr('Empty'),
20
+ ['address', 'uint256', 'uint256'],
21
+ [market, troveId, targetRatio],
22
+ );
23
+
24
+ this.mappableArgs = [
25
+ this.args[0],
26
+ this.args[1],
27
+ this.args[2],
28
+ ];
29
+ }
30
+ }
@@ -9,4 +9,6 @@ export * from './SparkRatioCheckAction';
9
9
  export * from './LiquityRatioIncreaseCheckAction';
10
10
  export * from './CurveUsdCollRatioCheck';
11
11
  export * from './MorphoBlueRatioCheckAction';
12
- export * from './AaveV3OpenRatioCheckAction';
12
+ export * from './AaveV3OpenRatioCheckAction';
13
+ export * from './LiquityV2RatioCheckAction';
14
+ export * from './LiquityV2TargetRatioCheckAction';
@@ -31,6 +31,7 @@ import * as llamalend from './llamalend';
31
31
  import * as merkl from './merkl';
32
32
  import * as eulerV2 from './eulerV2';
33
33
  import * as sky from './sky';
34
+ import * as liquityV2 from './liquityV2';
34
35
  import * as stkgho from './stkgho';
35
36
  import * as renzo from './renzo';
36
37
  import * as etherfi from './etherfi';
@@ -69,6 +70,7 @@ export {
69
70
  merkl,
70
71
  eulerV2,
71
72
  sky,
73
+ liquityV2,
72
74
  stkgho,
73
75
  renzo,
74
76
  etherfi,