@defisaver/positions-sdk 2.1.71-aave-v4-2-dev → 2.1.72-gho-plasma-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 (70) hide show
  1. package/cjs/config/contracts.d.ts +0 -1535
  2. package/cjs/config/contracts.js +0 -9
  3. package/cjs/contracts.d.ts +0 -32401
  4. package/cjs/contracts.js +1 -2
  5. package/cjs/helpers/index.d.ts +0 -1
  6. package/cjs/helpers/index.js +1 -2
  7. package/cjs/index.d.ts +1 -2
  8. package/cjs/index.js +1 -3
  9. package/cjs/markets/aave/marketAssets.js +1 -1
  10. package/cjs/markets/index.d.ts +0 -1
  11. package/cjs/markets/index.js +1 -3
  12. package/cjs/portfolio/index.js +0 -20
  13. package/cjs/staking/eligibility.d.ts +6 -0
  14. package/cjs/staking/eligibility.js +37 -19
  15. package/cjs/types/common.d.ts +2 -1
  16. package/cjs/types/common.js +1 -0
  17. package/cjs/types/index.d.ts +0 -1
  18. package/cjs/types/index.js +0 -1
  19. package/cjs/types/portfolio.d.ts +0 -4
  20. package/esm/config/contracts.d.ts +0 -1535
  21. package/esm/config/contracts.js +0 -8
  22. package/esm/contracts.d.ts +0 -32401
  23. package/esm/contracts.js +0 -1
  24. package/esm/helpers/index.d.ts +0 -1
  25. package/esm/helpers/index.js +0 -1
  26. package/esm/index.d.ts +1 -2
  27. package/esm/index.js +1 -2
  28. package/esm/markets/aave/marketAssets.js +1 -1
  29. package/esm/markets/index.d.ts +0 -1
  30. package/esm/markets/index.js +0 -1
  31. package/esm/portfolio/index.js +1 -21
  32. package/esm/staking/eligibility.d.ts +6 -0
  33. package/esm/staking/eligibility.js +35 -18
  34. package/esm/types/common.d.ts +2 -1
  35. package/esm/types/common.js +1 -0
  36. package/esm/types/index.d.ts +0 -1
  37. package/esm/types/index.js +0 -1
  38. package/esm/types/portfolio.d.ts +0 -4
  39. package/package.json +2 -2
  40. package/src/config/contracts.ts +1 -9
  41. package/src/contracts.ts +1 -3
  42. package/src/helpers/index.ts +0 -1
  43. package/src/index.ts +0 -2
  44. package/src/markets/aave/marketAssets.ts +1 -1
  45. package/src/markets/index.ts +1 -6
  46. package/src/portfolio/index.ts +0 -20
  47. package/src/staking/eligibility.ts +69 -15
  48. package/src/types/common.ts +1 -0
  49. package/src/types/index.ts +1 -2
  50. package/src/types/portfolio.ts +0 -4
  51. package/cjs/aaveV4/index.d.ts +0 -7
  52. package/cjs/aaveV4/index.js +0 -174
  53. package/cjs/helpers/aaveV4Helpers/index.d.ts +0 -13
  54. package/cjs/helpers/aaveV4Helpers/index.js +0 -117
  55. package/cjs/markets/aaveV4/index.d.ts +0 -28
  56. package/cjs/markets/aaveV4/index.js +0 -140
  57. package/cjs/types/aaveV4.d.ts +0 -145
  58. package/cjs/types/aaveV4.js +0 -19
  59. package/esm/aaveV4/index.d.ts +0 -7
  60. package/esm/aaveV4/index.js +0 -165
  61. package/esm/helpers/aaveV4Helpers/index.d.ts +0 -13
  62. package/esm/helpers/aaveV4Helpers/index.js +0 -108
  63. package/esm/markets/aaveV4/index.d.ts +0 -28
  64. package/esm/markets/aaveV4/index.js +0 -122
  65. package/esm/types/aaveV4.d.ts +0 -145
  66. package/esm/types/aaveV4.js +0 -16
  67. package/src/aaveV4/index.ts +0 -176
  68. package/src/helpers/aaveV4Helpers/index.ts +0 -128
  69. package/src/markets/aaveV4/index.ts +0 -149
  70. package/src/types/aaveV4.ts +0 -161
@@ -1,161 +0,0 @@
1
- import {
2
- EthAddress, IncentiveData, LeverageType, NetworkNumber,
3
- } from './common';
4
-
5
- export enum AaveV4HubsType {
6
- AaveV4CoreHub = 'aave_v4_core_hub',
7
- AaveV4PlusHub = 'aave_v4_plus_hub',
8
- AaveV4PrimeHub = 'aave_v4_prime_hub',
9
- }
10
-
11
- export enum AaveV4SpokesType {
12
- AaveV4BluechipSpoke = 'aave_v4_bluechip_spoke',
13
- AaveV4EthenaSpoke = 'aave_v4_ethena_spoke',
14
- AaveV4EtherfiSpoke = 'aave_v4_etherfi_spoke',
15
- AaveV4GoldSpoke = 'aave_v4_gold_spoke',
16
- AaveV4KelpSpoke = 'aave_v4_kelp_spoke',
17
- AaveV4LidoSpoke = 'aave_v4_lido_spoke',
18
- AaveV4MainSpoke = 'aave_v4_main_spoke',
19
- }
20
-
21
- export interface AaveV4HubInfo {
22
- chainIds: NetworkNumber[],
23
- label: string,
24
- value: AaveV4HubsType,
25
- address: EthAddress,
26
- }
27
-
28
- export interface AaveV4HubAssetOnChainData {
29
- assetId: number,
30
- drawnRate: bigint,
31
- }
32
-
33
- export interface AaveV4HubOnChainData {
34
- assets: Record<number, AaveV4HubAssetOnChainData>,
35
- }
36
-
37
- export interface AaveV4SpokeInfo {
38
- chainIds: NetworkNumber[],
39
- label: string,
40
- value: AaveV4SpokesType,
41
- url: string,
42
- address: EthAddress,
43
- hubs: EthAddress[],
44
- }
45
-
46
- export interface AaveV4SpokeData {
47
- assetsData: AaveV4AssetsData,
48
- oracle: EthAddress,
49
- oracleDecimals: number,
50
- address: EthAddress,
51
- }
52
-
53
- export interface AaveV4ReserveAssetOnChain {
54
- underlying: EthAddress,
55
- hub: EthAddress,
56
- assetId: number,
57
- decimals: number,
58
- paused: boolean,
59
- frozen: boolean,
60
- borrowable: boolean,
61
- collateralRisk: number,
62
- collateralFactor: number,
63
- maxLiquidationBonus: number,
64
- liquidationFee: number,
65
- price: bigint,
66
- totalSupplied: bigint,
67
- totalDrawn: bigint,
68
- totalPremium: bigint,
69
- totalDebt: bigint,
70
- supplyCap: bigint,
71
- borrowCap: bigint,
72
- deficitRay: bigint,
73
- spokeActive: boolean,
74
- spokeHalted: boolean
75
- }
76
-
77
- export interface AaveV4ReserveAssetData {
78
- symbol: string,
79
- underlying: EthAddress,
80
- hub: EthAddress,
81
- hubName: string,
82
- assetId: number,
83
- reserveId: number,
84
- paused: boolean,
85
- frozen: boolean,
86
- borrowable: boolean,
87
- collateralRisk: number,
88
- collateralFactor: number,
89
- liquidationFee: number,
90
- price: string,
91
- totalSupplied: string,
92
- totalDrawn: string,
93
- totalPremium: string,
94
- totalDebt: string,
95
- supplyCap: string,
96
- borrowCap: string,
97
- spokeActive: boolean,
98
- spokeHalted: boolean,
99
- drawnRate: string,
100
- supplyRate: string,
101
- supplyIncentives: IncentiveData[];
102
- borrowIncentives: IncentiveData[];
103
- canBeBorrowed: boolean;
104
- canBeSupplied: boolean;
105
- canBeWithdrawn: boolean;
106
- canBePayBacked: boolean;
107
- utilization: string;
108
- }
109
-
110
- export type AaveV4AssetsData = Record<string, AaveV4ReserveAssetData>;
111
-
112
- export interface AaveV4UsedReserveAsset {
113
- symbol: string,
114
- hubName: string,
115
- assetId: number,
116
- reserveId: number,
117
- supplied: string,
118
- suppliedUsd: string,
119
- drawn: string,
120
- drawnUsd: string,
121
- premium: string,
122
- premiumUsd: string,
123
- borrowed: string,
124
- borrowedUsd: string,
125
- isSupplied: boolean,
126
- isBorrowed: boolean,
127
- collateral: boolean,
128
- collateralFactor: number,
129
- }
130
-
131
- export interface AaveV4AggregatedPositionData {
132
- suppliedUsd: string,
133
- suppliedCollateralUsd: string,
134
- borrowLimitUsd: string,
135
- liquidationLimitUsd: string,
136
- borrowedUsd: string,
137
- drawnUsd: string,
138
- premiumUsd: string,
139
- leftToBorrowUsd: string,
140
- ratio: string,
141
- collRatio: string,
142
- liqRatio: string,
143
- liqPercent: string,
144
- leveragedType: LeverageType,
145
- leveragedAsset: string,
146
- liquidationPrice: string,
147
- minCollRatio: string,
148
- collLiquidationRatio: string,
149
- minHealthRatio: string,
150
- netApy: string,
151
- incentiveUsd: string,
152
- totalInterestUsd: string,
153
- currentVolatilePairRatio?: string,
154
- }
155
-
156
- export type AaveV4UsedReserveAssets = Record<string, AaveV4UsedReserveAsset>;
157
-
158
- export interface AaveV4AccountData extends AaveV4AggregatedPositionData {
159
- usedAssets: AaveV4UsedReserveAssets,
160
- healthFactor: string,
161
- }