@defisaver/positions-sdk 2.1.158 → 2.1.159-shifter-v2-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 (118) hide show
  1. package/cjs/aaveV2/index.js +2 -0
  2. package/cjs/config/contracts.d.ts +516 -4
  3. package/cjs/config/contracts.js +17 -5
  4. package/cjs/contracts.d.ts +120 -0
  5. package/cjs/fluid/index.d.ts +5 -0
  6. package/cjs/fluid/index.js +36 -1
  7. package/cjs/helpers/aaveHelpers/index.js +3 -0
  8. package/cjs/helpers/aaveV4Helpers/index.js +1 -0
  9. package/cjs/helpers/compoundHelpers/index.js +2 -0
  10. package/cjs/helpers/curveUsdHelpers/index.js +2 -0
  11. package/cjs/helpers/fluidHelpers/index.js +1 -0
  12. package/cjs/helpers/liquityV2Helpers/index.js +1 -0
  13. package/cjs/helpers/llamaLendHelpers/index.js +2 -0
  14. package/cjs/helpers/makerHelpers/index.d.ts +1 -1
  15. package/cjs/helpers/makerHelpers/index.js +2 -2
  16. package/cjs/helpers/morphoBlueHelpers/index.js +2 -0
  17. package/cjs/helpers/morphoMidnightHelpers/index.js +2 -0
  18. package/cjs/helpers/sparkHelpers/index.js +1 -0
  19. package/cjs/liquity/index.js +8 -1
  20. package/cjs/maker/index.d.ts +7 -2
  21. package/cjs/maker/index.js +32 -12
  22. package/cjs/markets/index.d.ts +1 -0
  23. package/cjs/markets/index.js +3 -1
  24. package/cjs/markets/maker/index.d.ts +1 -0
  25. package/cjs/markets/maker/index.js +13 -0
  26. package/cjs/morphoMidnight/index.js +3 -0
  27. package/cjs/portfolio/index.d.ts +5 -1
  28. package/cjs/portfolio/index.js +276 -0
  29. package/cjs/savings/index.js +6 -6
  30. package/cjs/savings/morphoVaults/index.d.ts +15 -3
  31. package/cjs/savings/morphoVaults/index.js +97 -26
  32. package/cjs/types/aave.d.ts +2 -0
  33. package/cjs/types/aaveV4.d.ts +1 -0
  34. package/cjs/types/compound.d.ts +2 -0
  35. package/cjs/types/fluid.d.ts +1 -0
  36. package/cjs/types/liquity.d.ts +1 -0
  37. package/cjs/types/liquityV2.d.ts +2 -0
  38. package/cjs/types/maker.d.ts +1 -0
  39. package/cjs/types/morphoBlue.d.ts +2 -0
  40. package/cjs/types/morphoMidnight.d.ts +2 -0
  41. package/cjs/types/portfolio.d.ts +26 -10
  42. package/cjs/types/spark.d.ts +2 -0
  43. package/esm/aaveV2/index.js +2 -0
  44. package/esm/config/contracts.d.ts +516 -4
  45. package/esm/config/contracts.js +17 -5
  46. package/esm/contracts.d.ts +120 -0
  47. package/esm/fluid/index.d.ts +5 -0
  48. package/esm/fluid/index.js +33 -0
  49. package/esm/helpers/aaveHelpers/index.js +3 -0
  50. package/esm/helpers/aaveV4Helpers/index.js +1 -0
  51. package/esm/helpers/compoundHelpers/index.js +2 -0
  52. package/esm/helpers/curveUsdHelpers/index.js +2 -0
  53. package/esm/helpers/fluidHelpers/index.js +1 -0
  54. package/esm/helpers/liquityV2Helpers/index.js +1 -0
  55. package/esm/helpers/llamaLendHelpers/index.js +2 -0
  56. package/esm/helpers/makerHelpers/index.d.ts +1 -1
  57. package/esm/helpers/makerHelpers/index.js +2 -2
  58. package/esm/helpers/morphoBlueHelpers/index.js +2 -0
  59. package/esm/helpers/morphoMidnightHelpers/index.js +2 -0
  60. package/esm/helpers/sparkHelpers/index.js +1 -0
  61. package/esm/liquity/index.js +8 -1
  62. package/esm/maker/index.d.ts +7 -2
  63. package/esm/maker/index.js +31 -13
  64. package/esm/markets/index.d.ts +1 -0
  65. package/esm/markets/index.js +1 -0
  66. package/esm/markets/maker/index.d.ts +1 -0
  67. package/esm/markets/maker/index.js +10 -0
  68. package/esm/morphoMidnight/index.js +4 -1
  69. package/esm/portfolio/index.d.ts +5 -1
  70. package/esm/portfolio/index.js +278 -3
  71. package/esm/savings/index.js +6 -6
  72. package/esm/savings/morphoVaults/index.d.ts +15 -3
  73. package/esm/savings/morphoVaults/index.js +93 -24
  74. package/esm/types/aave.d.ts +2 -0
  75. package/esm/types/aaveV4.d.ts +1 -0
  76. package/esm/types/compound.d.ts +2 -0
  77. package/esm/types/fluid.d.ts +1 -0
  78. package/esm/types/liquity.d.ts +1 -0
  79. package/esm/types/liquityV2.d.ts +2 -0
  80. package/esm/types/maker.d.ts +1 -0
  81. package/esm/types/morphoBlue.d.ts +2 -0
  82. package/esm/types/morphoMidnight.d.ts +2 -0
  83. package/esm/types/portfolio.d.ts +26 -10
  84. package/esm/types/spark.d.ts +2 -0
  85. package/package.json +1 -1
  86. package/src/aaveV2/index.ts +2 -0
  87. package/src/config/contracts.ts +17 -5
  88. package/src/fluid/index.ts +40 -0
  89. package/src/helpers/aaveHelpers/index.ts +3 -0
  90. package/src/helpers/aaveV4Helpers/index.ts +1 -0
  91. package/src/helpers/compoundHelpers/index.ts +2 -0
  92. package/src/helpers/curveUsdHelpers/index.ts +2 -0
  93. package/src/helpers/fluidHelpers/index.ts +1 -0
  94. package/src/helpers/liquityV2Helpers/index.ts +1 -0
  95. package/src/helpers/llamaLendHelpers/index.ts +2 -0
  96. package/src/helpers/makerHelpers/index.ts +2 -1
  97. package/src/helpers/morphoBlueHelpers/index.ts +2 -0
  98. package/src/helpers/morphoMidnightHelpers/index.ts +2 -0
  99. package/src/helpers/sparkHelpers/index.ts +1 -0
  100. package/src/liquity/index.ts +8 -1
  101. package/src/maker/index.ts +62 -29
  102. package/src/markets/index.ts +2 -1
  103. package/src/markets/maker/index.ts +10 -0
  104. package/src/morphoMidnight/index.ts +4 -1
  105. package/src/portfolio/index.ts +259 -2
  106. package/src/savings/index.ts +6 -6
  107. package/src/savings/morphoVaults/index.ts +108 -27
  108. package/src/types/aave.ts +3 -0
  109. package/src/types/aaveV4.ts +1 -0
  110. package/src/types/compound.ts +2 -0
  111. package/src/types/fluid.ts +1 -0
  112. package/src/types/liquity.ts +2 -0
  113. package/src/types/liquityV2.ts +2 -0
  114. package/src/types/maker.ts +2 -0
  115. package/src/types/morphoBlue.ts +2 -0
  116. package/src/types/morphoMidnight.ts +2 -0
  117. package/src/types/portfolio.ts +31 -12
  118. package/src/types/spark.ts +2 -0
@@ -1,16 +1,20 @@
1
- import { AaveV2PositionData, AaveV3PositionData, AaveVersions } from './aave';
2
- import { AaveV4AccountData, AaveV4SpokesType } from './aaveV4';
1
+ import {
2
+ AaveV2MarketData, AaveV2PositionData, AaveV3MarketData, AaveV3PositionData, AaveVersions,
3
+ } from './aave';
4
+ import { AaveV4AccountData, AaveV4SpokeData, AaveV4SpokesType } from './aaveV4';
3
5
  import { EthAddress } from './common';
4
- import { CompoundV2PositionData, CompoundV3PositionData, CompoundVersions } from './compound';
5
- import { CrvUSDUserData, CrvUSDVersions } from './curveUsd';
6
- import { FluidVaultData } from './fluid';
6
+ import {
7
+ CompoundV2MarketsData, CompoundV2PositionData, CompoundV3MarketsData, CompoundV3PositionData, CompoundVersions,
8
+ } from './compound';
9
+ import { CrvUSDGlobalMarketData, CrvUSDUserData, CrvUSDVersions } from './curveUsd';
10
+ import { FluidMarketData, FluidVaultData } from './fluid';
7
11
  import { LiquityTroveInfo } from './liquity';
8
- import { LiquityV2TroveData, LiquityV2Versions } from './liquityV2';
9
- import { LlamaLendUserData, LlamaLendVersionsType } from './llamaLend';
10
- import { CdpData } from './maker';
11
- import { MorphoBluePositionData, MorphoBlueVersions } from './morphoBlue';
12
- import { MorphoMidnightPositionData, MorphoMidnightVersions } from './morphoMidnight';
13
- import { SparkPositionData, SparkVersions } from './spark';
12
+ import { LiquityV2MarketData, LiquityV2TroveData, LiquityV2Versions } from './liquityV2';
13
+ import { LlamaLendGlobalMarketData, LlamaLendUserData, LlamaLendVersionsType } from './llamaLend';
14
+ import { CdpData, IlkInfo } from './maker';
15
+ import { MorphoBlueMarketInfo, MorphoBluePositionData, MorphoBlueVersions } from './morphoBlue';
16
+ import { MorphoMidnightMarketInfo, MorphoMidnightPositionData, MorphoMidnightVersions } from './morphoMidnight';
17
+ import { SparkMarketsData, SparkPositionData, SparkVersions } from './spark';
14
18
 
15
19
  export interface PortfolioProtocolData<T> {
16
20
  error: string,
@@ -62,4 +66,19 @@ export interface PortfolioPositionsDataForAddress {
62
66
 
63
67
  export interface PortfolioPositionsData {
64
68
  [key: EthAddress]: PortfolioPositionsDataForAddress;
65
- }
69
+ }
70
+ export interface PortfolioMarketsData {
71
+ morphoMarketsData: Record<string, MorphoBlueMarketInfo>;
72
+ morphoMidnightMarketsData: Record<string, MorphoMidnightMarketInfo>;
73
+ compoundV3MarketsData: Record<string, CompoundV3MarketsData>;
74
+ sparkMarketsData: Record<string, SparkMarketsData>;
75
+ aaveV3MarketsData: Record<string, AaveV3MarketData>;
76
+ aaveV2MarketsData: Record<string, AaveV2MarketData>;
77
+ compoundV2MarketsData: Record<string, CompoundV2MarketsData>;
78
+ crvUsdMarketsData: Record<string, CrvUSDGlobalMarketData>;
79
+ llamaLendMarketsData: Record<string, LlamaLendGlobalMarketData>;
80
+ liquityV2MarketsData: Record<string, LiquityV2MarketData>;
81
+ aaveV4SpokesData: Record<string, AaveV4SpokeData>;
82
+ fluidMarketsData: Record<string, FluidMarketData>;
83
+ makerMarketsData: Record<string, IlkInfo>;
84
+ }
@@ -99,6 +99,7 @@ export interface SparkAggregatedPositionData {
99
99
  leftToBorrowUsd: string,
100
100
  ratio: string,
101
101
  collRatio: string,
102
+ safetyRatio: string,
102
103
  netApy: string,
103
104
  incentiveUsd: string,
104
105
  totalInterestUsd: string,
@@ -119,6 +120,7 @@ export interface SparkPositionData extends MMPositionData {
119
120
  ratio: string,
120
121
  minRatio: string,
121
122
  collRatio: string,
123
+ safetyRatio?: string,
122
124
  suppliedUsd: string,
123
125
  borrowedUsd: string,
124
126
  borrowLimitUsd: string,