@defisaver/positions-sdk 2.1.137 → 2.1.138

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 (76) hide show
  1. package/cjs/aaveV4/index.js +26 -10
  2. package/cjs/config/contracts.d.ts +0 -938
  3. package/cjs/config/contracts.js +1 -8
  4. package/cjs/contracts.d.ts +0 -23433
  5. package/cjs/contracts.js +2 -3
  6. package/cjs/helpers/index.d.ts +0 -1
  7. package/cjs/helpers/index.js +1 -2
  8. package/cjs/index.d.ts +1 -2
  9. package/cjs/index.js +1 -3
  10. package/cjs/markets/index.d.ts +0 -1
  11. package/cjs/markets/index.js +1 -3
  12. package/cjs/portfolio/discovery.d.ts +1 -1
  13. package/cjs/portfolio/discovery.js +1 -1
  14. package/cjs/portfolio/index.js +0 -32
  15. package/cjs/services/utils.d.ts +1 -0
  16. package/cjs/services/utils.js +3 -1
  17. package/cjs/staking/staking.js +1 -2
  18. package/cjs/types/aaveV4.d.ts +5 -0
  19. package/cjs/types/index.d.ts +0 -1
  20. package/cjs/types/index.js +0 -1
  21. package/cjs/types/portfolio.d.ts +0 -4
  22. package/esm/aaveV4/index.js +27 -11
  23. package/esm/config/contracts.d.ts +0 -938
  24. package/esm/config/contracts.js +0 -6
  25. package/esm/contracts.d.ts +0 -23433
  26. package/esm/contracts.js +0 -1
  27. package/esm/helpers/index.d.ts +0 -1
  28. package/esm/helpers/index.js +0 -1
  29. package/esm/index.d.ts +1 -2
  30. package/esm/index.js +1 -2
  31. package/esm/markets/index.d.ts +0 -1
  32. package/esm/markets/index.js +0 -1
  33. package/esm/portfolio/discovery.d.ts +1 -1
  34. package/esm/portfolio/discovery.js +1 -1
  35. package/esm/portfolio/index.js +1 -33
  36. package/esm/services/utils.d.ts +1 -0
  37. package/esm/services/utils.js +1 -0
  38. package/esm/staking/staking.js +1 -2
  39. package/esm/types/aaveV4.d.ts +5 -0
  40. package/esm/types/index.d.ts +0 -1
  41. package/esm/types/index.js +0 -1
  42. package/esm/types/portfolio.d.ts +0 -4
  43. package/package.json +1 -1
  44. package/src/aaveV4/index.ts +29 -11
  45. package/src/config/contracts.ts +0 -6
  46. package/src/contracts.ts +0 -1
  47. package/src/helpers/index.ts +0 -1
  48. package/src/index.ts +0 -2
  49. package/src/markets/index.ts +0 -1
  50. package/src/portfolio/discovery.ts +1 -1
  51. package/src/portfolio/index.ts +0 -33
  52. package/src/services/utils.ts +2 -0
  53. package/src/staking/staking.ts +1 -2
  54. package/src/types/aaveV4.ts +5 -0
  55. package/src/types/index.ts +0 -1
  56. package/src/types/portfolio.ts +0 -4
  57. package/cjs/eulerV2/index.d.ts +0 -47
  58. package/cjs/eulerV2/index.js +0 -225
  59. package/cjs/helpers/eulerHelpers/index.d.ts +0 -22
  60. package/cjs/helpers/eulerHelpers/index.js +0 -231
  61. package/cjs/markets/euler/index.d.ts +0 -8
  62. package/cjs/markets/euler/index.js +0 -30
  63. package/cjs/types/euler.d.ts +0 -153
  64. package/cjs/types/euler.js +0 -14
  65. package/esm/eulerV2/index.d.ts +0 -47
  66. package/esm/eulerV2/index.js +0 -215
  67. package/esm/helpers/eulerHelpers/index.d.ts +0 -22
  68. package/esm/helpers/eulerHelpers/index.js +0 -218
  69. package/esm/markets/euler/index.d.ts +0 -8
  70. package/esm/markets/euler/index.js +0 -24
  71. package/esm/types/euler.d.ts +0 -153
  72. package/esm/types/euler.js +0 -11
  73. package/src/eulerV2/index.ts +0 -331
  74. package/src/helpers/eulerHelpers/index.ts +0 -232
  75. package/src/markets/euler/index.ts +0 -27
  76. package/src/types/euler.ts +0 -178
@@ -1,178 +0,0 @@
1
- import {
2
- EthAddress,
3
- IncentiveData,
4
- LeverageType,
5
- MMPositionData, NetworkNumber,
6
- } from './common';
7
-
8
- export enum EulerV2Versions {
9
- eUSDC2 = 'eUSDC-2',
10
- eWETH2 = 'eWETH-2',
11
- }
12
-
13
- export enum EulerV2VaultType {
14
- Escrow = 'Escrow',
15
- Governed = 'Governed',
16
- Ungoverned = 'Ungoverned',
17
- }
18
-
19
- export interface EulerV2Market {
20
- chainIds: NetworkNumber[],
21
- label: string,
22
- shortLabel: string,
23
- asset: string,
24
- value: EulerV2Versions,
25
- secondLabel: string,
26
- marketAddress: EthAddress,
27
- }
28
-
29
- export interface EulerV2PositionData extends MMPositionData {
30
- ratio: string,
31
- minRatio: string,
32
- suppliedUsd: string,
33
- borrowedUsd: string,
34
- borrowLimitUsd: string,
35
- incentiveUsd: string,
36
- totalInterestUsd: string,
37
- isSubscribedToAutomation?: boolean,
38
- automationResubscribeRequired?: boolean,
39
- }
40
-
41
- export interface EulerV2AssetData {
42
- vaultAddress: string,
43
- vaultSymbol: string
44
- sortIndex?: number
45
- liquidationRatio: string
46
- cash: string
47
- supplyCap: string
48
- assetAddress: string
49
- decimals: string
50
- symbol: string
51
- price: string
52
- borrowCap: string
53
- canBeBorrowed: boolean
54
- canBeSupplied: boolean
55
- supplyIncentives: IncentiveData[]
56
- borrowIncentives: IncentiveData[]
57
- totalBorrow: string
58
- collateralFactor: string
59
- borrowRate: string
60
- supplyRate: string
61
- utilization: string
62
- governorAdmin: string
63
- vaultType: EulerV2VaultType
64
- }
65
-
66
- export interface EulerV2UsedAsset {
67
- isSupplied: boolean
68
- isBorrowed: boolean
69
- supplied: string
70
- suppliedUsd: string
71
- borrowed: string
72
- borrowedUsd: string
73
- symbol: string
74
- collateral: boolean
75
- vaultAddress: string
76
- }
77
-
78
- export interface EulerV2MarketInfoData {
79
- name: string,
80
- symbol: string,
81
- decimals: string,
82
- vaultAddress: string,
83
- irm: string,
84
- creator: string,
85
- governorAdmin: string,
86
- unitOfAccount: string,
87
- unitOfAccountUsdPrice: string,
88
- isInUSD: boolean,
89
- oracle: string,
90
- collaterals: string[],
91
- isEscrow: boolean,
92
- isGoverned: boolean,
93
- vaultType: EulerV2VaultType,
94
- }
95
-
96
- export type EulerV2AssetsData = { [key: string]: EulerV2AssetData };
97
- export type EulerV2UsedAssets = { [key: string]: EulerV2UsedAsset };
98
-
99
-
100
- export interface EulerV2CollateralInfo {
101
- lltv: string
102
- borrowLtv: string
103
- totalBorrows: string
104
- cash: string
105
- supplyCap: string
106
- }
107
-
108
- export interface EulerV2MarketData {
109
- name: string
110
- symbol: string
111
- decimals: number
112
-
113
- totalSupplyShares: string
114
- cash: string
115
- totalBorrows: string
116
- totalAssets: string
117
- supplyCap: string
118
- borrowCap: string
119
-
120
- collaterals: string[]
121
-
122
- badDebtSocializationEnabled: boolean
123
-
124
- unitOfAccount: string
125
- oracle: string
126
- assetPrice: string
127
-
128
- interestRate: string
129
- irm: string
130
-
131
- creator: string
132
-
133
- governorAdmin: string
134
-
135
- interestFee: string
136
- }
137
-
138
- export interface EulerV2FullMarketData {
139
- marketData: EulerV2MarketInfoData
140
- assetsData: EulerV2AssetsData
141
- }
142
-
143
- export interface EulerV2AccountData {
144
- owner: string
145
- inLockDownMode: boolean
146
- inPermitDisabledMode: boolean
147
-
148
- borrowVault: string
149
- borrowAmountInUnit: string
150
-
151
- collaterals: string[] // all collaterals user has enabled on main evc contract (globally - not only collaterals for his borrow market)
152
- collateralAmountsInUnit: string[] // only amounts used as collateral for his debt (empty array if no debt)
153
- }
154
-
155
- export interface EulerV2AggregatedPositionData {
156
- suppliedUsd: string,
157
- suppliedCollateralUsd: string,
158
- borrowedUsd: string,
159
- borrowLimitUsd: string,
160
- liquidationLimitUsd: string,
161
- leftToBorrowUsd: string,
162
- ratio: string,
163
- collRatio: string,
164
- netApy: string,
165
- incentiveUsd: string,
166
- totalInterestUsd: string,
167
- liqRatio: string,
168
- liqPercent: string,
169
- leveragedType: LeverageType,
170
- leveragedAsset?: string,
171
- currentVolatilePairRatio?: string,
172
- liquidationPrice?: string,
173
- minRatio: string,
174
- minDebt: string,
175
- minCollRatio: string,
176
- collLiquidationRatio: string,
177
- exposure: string,
178
- }