@defisaver/positions-sdk 0.0.201-fluid-dev-4 → 0.0.201-fluid-dev-6

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 (95) hide show
  1. package/.mocharc.json +4 -4
  2. package/.nvmrc +1 -1
  3. package/README.md +69 -69
  4. package/cjs/config/contracts.d.ts +15 -0
  5. package/cjs/config/contracts.js +7 -2
  6. package/cjs/fluid/index.d.ts +14 -0
  7. package/cjs/fluid/index.js +32 -5
  8. package/cjs/helpers/morphoBlueHelpers/index.js +66 -66
  9. package/cjs/markets/fluid/index.d.ts +0 -6
  10. package/cjs/markets/fluid/index.js +57 -62
  11. package/cjs/services/priceService.d.ts +1 -0
  12. package/cjs/services/priceService.js +29 -1
  13. package/cjs/types/fluid.d.ts +1 -9
  14. package/cjs/types/fluid.js +0 -8
  15. package/esm/config/contracts.d.ts +15 -0
  16. package/esm/config/contracts.js +7 -2
  17. package/esm/fluid/index.d.ts +14 -0
  18. package/esm/fluid/index.js +32 -6
  19. package/esm/helpers/morphoBlueHelpers/index.js +66 -66
  20. package/esm/markets/fluid/index.d.ts +0 -6
  21. package/esm/markets/fluid/index.js +56 -57
  22. package/esm/services/priceService.d.ts +1 -0
  23. package/esm/services/priceService.js +27 -0
  24. package/esm/types/fluid.d.ts +1 -9
  25. package/esm/types/fluid.js +0 -8
  26. package/package.json +51 -51
  27. package/src/aaveV2/index.ts +227 -227
  28. package/src/aaveV3/index.ts +625 -625
  29. package/src/assets/index.ts +60 -60
  30. package/src/chickenBonds/index.ts +123 -123
  31. package/src/compoundV2/index.ts +220 -220
  32. package/src/compoundV3/index.ts +291 -291
  33. package/src/config/contracts.js +1122 -1117
  34. package/src/constants/index.ts +6 -6
  35. package/src/contracts.ts +134 -134
  36. package/src/curveUsd/index.ts +229 -229
  37. package/src/eulerV2/index.ts +303 -303
  38. package/src/exchange/index.ts +17 -17
  39. package/src/fluid/index.ts +329 -298
  40. package/src/helpers/aaveHelpers/index.ts +198 -198
  41. package/src/helpers/chickenBondsHelpers/index.ts +23 -23
  42. package/src/helpers/compoundHelpers/index.ts +246 -246
  43. package/src/helpers/curveUsdHelpers/index.ts +40 -40
  44. package/src/helpers/eulerHelpers/index.ts +232 -232
  45. package/src/helpers/fluidHelpers/index.ts +53 -53
  46. package/src/helpers/index.ts +11 -11
  47. package/src/helpers/liquityV2Helpers/index.ts +79 -79
  48. package/src/helpers/llamaLendHelpers/index.ts +53 -53
  49. package/src/helpers/makerHelpers/index.ts +94 -94
  50. package/src/helpers/morphoBlueHelpers/index.ts +365 -365
  51. package/src/helpers/sparkHelpers/index.ts +150 -150
  52. package/src/index.ts +52 -52
  53. package/src/liquity/index.ts +116 -116
  54. package/src/liquityV2/index.ts +227 -227
  55. package/src/llamaLend/index.ts +275 -275
  56. package/src/maker/index.ts +117 -117
  57. package/src/markets/aave/index.ts +152 -152
  58. package/src/markets/aave/marketAssets.ts +44 -44
  59. package/src/markets/compound/index.ts +213 -213
  60. package/src/markets/compound/marketsAssets.ts +82 -82
  61. package/src/markets/curveUsd/index.ts +69 -69
  62. package/src/markets/euler/index.ts +26 -26
  63. package/src/markets/fluid/index.ts +2002 -2005
  64. package/src/markets/index.ts +27 -27
  65. package/src/markets/liquityV2/index.ts +43 -43
  66. package/src/markets/llamaLend/contractAddresses.ts +141 -141
  67. package/src/markets/llamaLend/index.ts +235 -235
  68. package/src/markets/morphoBlue/index.ts +895 -895
  69. package/src/markets/spark/index.ts +29 -29
  70. package/src/markets/spark/marketAssets.ts +10 -10
  71. package/src/moneymarket/moneymarketCommonService.ts +80 -80
  72. package/src/morphoAaveV2/index.ts +256 -256
  73. package/src/morphoAaveV3/index.ts +631 -631
  74. package/src/morphoBlue/index.ts +202 -202
  75. package/src/multicall/index.ts +33 -33
  76. package/src/services/dsrService.ts +15 -15
  77. package/src/services/priceService.ts +91 -62
  78. package/src/services/utils.ts +59 -59
  79. package/src/setup.ts +8 -8
  80. package/src/spark/index.ts +461 -461
  81. package/src/staking/staking.ts +220 -220
  82. package/src/types/aave.ts +271 -271
  83. package/src/types/chickenBonds.ts +45 -45
  84. package/src/types/common.ts +84 -84
  85. package/src/types/compound.ts +131 -131
  86. package/src/types/curveUsd.ts +118 -118
  87. package/src/types/euler.ts +171 -171
  88. package/src/types/fluid.ts +263 -271
  89. package/src/types/index.ts +11 -11
  90. package/src/types/liquity.ts +30 -30
  91. package/src/types/liquityV2.ts +118 -118
  92. package/src/types/llamaLend.ts +155 -155
  93. package/src/types/maker.ts +50 -50
  94. package/src/types/morphoBlue.ts +192 -192
  95. package/src/types/spark.ts +131 -131
@@ -1,119 +1,119 @@
1
- import { EthAddress, NetworkNumber } from './common';
2
-
3
- export enum LiquityV2Versions {
4
- LiquityV2Eth = 'liquityv2eth',
5
- LiquityV2WstEth = 'liquityv2wsteth',
6
- LiquityV2REth = 'liquityv2reth',
7
- }
8
-
9
- export enum LIQUITY_V2_TROVE_STATUS_ENUM {
10
- nonExistent,
11
- active,
12
- closedByOwner,
13
- closedByLiquidation,
14
- zombie,
15
- }
16
-
17
- export const LIQUITY_V2_STATUS_MAPPING = {
18
- nonExistent: 'Non existent',
19
- active: 'Active',
20
- closedByOwner: 'Closed',
21
- closedByLiquidation: 'Liquidated',
22
- zombie: 'Zombie',
23
- };
24
-
25
- export interface LiquityV2MarketInfo {
26
- chainIds: NetworkNumber[],
27
- label: string,
28
- shortLabel: string,
29
- url: string,
30
- value: LiquityV2Versions,
31
- debtToken: string,
32
- collateralToken: string,
33
- marketAddress: string,
34
- protocolName: string,
35
- }
36
-
37
- export interface LiquityV2AssetData {
38
- symbol: string,
39
- address: string,
40
- price: string,
41
- incentiveSupplyApy?: string,
42
- incentiveSupplyToken?: string,
43
- totalSupply: string,
44
- totalBorrow: string,
45
- canBeSupplied: boolean,
46
- canBeBorrowed: boolean,
47
- leftToBorrowGlobal: string,
48
- leftToWithdrawGlobal: string,
49
- }
50
-
51
- export type LiquityV2AssetsData = { [key: string]: LiquityV2AssetData };
52
-
53
- export interface InnerLiquityV2MarketData {
54
- minCollRatio: string,
55
- totalCollRatio: string,
56
- criticalCollRatio: string,
57
- isUnderCollateralized: boolean,
58
- hintHelperAddress: EthAddress,
59
- troveNFTAddress: EthAddress,
60
- borrowerOperationsAddress: EthAddress,
61
- troveManagerAddress: EthAddress,
62
- stabilityPoolAddress: EthAddress,
63
- collSurplusPoolAddress: EthAddress,
64
- activePoolAddress: EthAddress,
65
- }
66
-
67
- export interface LiquityV2MarketData {
68
- assetsData: LiquityV2AssetsData,
69
- marketData: InnerLiquityV2MarketData,
70
- }
71
-
72
- export interface LiquityV2UsedAsset {
73
- symbol: string,
74
- collateral?: boolean,
75
- supplied: string,
76
- suppliedUsd: string,
77
- borrowed: string,
78
- borrowedUsd: string,
79
- isSupplied: boolean,
80
- isBorrowed: boolean,
81
- }
82
-
83
- export type LiquityV2UsedAssets = { [key: string]: LiquityV2UsedAsset };
84
-
85
- export interface LiquityV2AggregatedTroveData {
86
- suppliedUsd: string,
87
- borrowedUsd: string,
88
- borrowLimitUsd: string,
89
- leftToBorrowUsd: string,
90
- netApy: string,
91
- incentiveUsd: string,
92
- totalInterestUsd: string,
93
- leveragedType: string,
94
- leveragedAsset: string,
95
- liquidationPrice: string,
96
- ratio: string,
97
- collRatio: string,
98
- }
99
-
100
- export interface LiquityV2TroveData {
101
- usedAssets: LiquityV2UsedAssets,
102
- troveId: string,
103
- ratio: string,
104
- collRatio: string,
105
- interestRate: string,
106
- leftToBorrowUsd: string,
107
- borrowLimitUsd: string,
108
- suppliedUsd: string,
109
- borrowedUsd: string,
110
- netApy: string,
111
- incentiveUsd: string,
112
- totalInterestUsd: string,
113
- interestBatchManager: EthAddress,
114
- troveStatus: string,
115
- leveragedType: string,
116
- leveragedAsset: string,
117
- liquidationPrice: string,
118
- debtInFront: string,
1
+ import { EthAddress, NetworkNumber } from './common';
2
+
3
+ export enum LiquityV2Versions {
4
+ LiquityV2Eth = 'liquityv2eth',
5
+ LiquityV2WstEth = 'liquityv2wsteth',
6
+ LiquityV2REth = 'liquityv2reth',
7
+ }
8
+
9
+ export enum LIQUITY_V2_TROVE_STATUS_ENUM {
10
+ nonExistent,
11
+ active,
12
+ closedByOwner,
13
+ closedByLiquidation,
14
+ zombie,
15
+ }
16
+
17
+ export const LIQUITY_V2_STATUS_MAPPING = {
18
+ nonExistent: 'Non existent',
19
+ active: 'Active',
20
+ closedByOwner: 'Closed',
21
+ closedByLiquidation: 'Liquidated',
22
+ zombie: 'Zombie',
23
+ };
24
+
25
+ export interface LiquityV2MarketInfo {
26
+ chainIds: NetworkNumber[],
27
+ label: string,
28
+ shortLabel: string,
29
+ url: string,
30
+ value: LiquityV2Versions,
31
+ debtToken: string,
32
+ collateralToken: string,
33
+ marketAddress: string,
34
+ protocolName: string,
35
+ }
36
+
37
+ export interface LiquityV2AssetData {
38
+ symbol: string,
39
+ address: string,
40
+ price: string,
41
+ incentiveSupplyApy?: string,
42
+ incentiveSupplyToken?: string,
43
+ totalSupply: string,
44
+ totalBorrow: string,
45
+ canBeSupplied: boolean,
46
+ canBeBorrowed: boolean,
47
+ leftToBorrowGlobal: string,
48
+ leftToWithdrawGlobal: string,
49
+ }
50
+
51
+ export type LiquityV2AssetsData = { [key: string]: LiquityV2AssetData };
52
+
53
+ export interface InnerLiquityV2MarketData {
54
+ minCollRatio: string,
55
+ totalCollRatio: string,
56
+ criticalCollRatio: string,
57
+ isUnderCollateralized: boolean,
58
+ hintHelperAddress: EthAddress,
59
+ troveNFTAddress: EthAddress,
60
+ borrowerOperationsAddress: EthAddress,
61
+ troveManagerAddress: EthAddress,
62
+ stabilityPoolAddress: EthAddress,
63
+ collSurplusPoolAddress: EthAddress,
64
+ activePoolAddress: EthAddress,
65
+ }
66
+
67
+ export interface LiquityV2MarketData {
68
+ assetsData: LiquityV2AssetsData,
69
+ marketData: InnerLiquityV2MarketData,
70
+ }
71
+
72
+ export interface LiquityV2UsedAsset {
73
+ symbol: string,
74
+ collateral?: boolean,
75
+ supplied: string,
76
+ suppliedUsd: string,
77
+ borrowed: string,
78
+ borrowedUsd: string,
79
+ isSupplied: boolean,
80
+ isBorrowed: boolean,
81
+ }
82
+
83
+ export type LiquityV2UsedAssets = { [key: string]: LiquityV2UsedAsset };
84
+
85
+ export interface LiquityV2AggregatedTroveData {
86
+ suppliedUsd: string,
87
+ borrowedUsd: string,
88
+ borrowLimitUsd: string,
89
+ leftToBorrowUsd: string,
90
+ netApy: string,
91
+ incentiveUsd: string,
92
+ totalInterestUsd: string,
93
+ leveragedType: string,
94
+ leveragedAsset: string,
95
+ liquidationPrice: string,
96
+ ratio: string,
97
+ collRatio: string,
98
+ }
99
+
100
+ export interface LiquityV2TroveData {
101
+ usedAssets: LiquityV2UsedAssets,
102
+ troveId: string,
103
+ ratio: string,
104
+ collRatio: string,
105
+ interestRate: string,
106
+ leftToBorrowUsd: string,
107
+ borrowLimitUsd: string,
108
+ suppliedUsd: string,
109
+ borrowedUsd: string,
110
+ netApy: string,
111
+ incentiveUsd: string,
112
+ totalInterestUsd: string,
113
+ interestBatchManager: EthAddress,
114
+ troveStatus: string,
115
+ leveragedType: string,
116
+ leveragedAsset: string,
117
+ liquidationPrice: string,
118
+ debtInFront: string,
119
119
  }
@@ -1,155 +1,155 @@
1
- import { EthAddress, NetworkNumber } from './common';
2
- import { BandData, UserBandData } from './curveUsd';
3
-
4
- export enum LLVersionsEth {
5
- // long only
6
- LLWstethCrvusd = 'llamaLendwstETHcrvUSD',
7
- LLWstethCrvusd2 = 'llamaLendwstETHcrvUSD2',
8
- LLSusdeCrvusd = 'llamaLendsUSDecrvUSD',
9
- LLSusdeCrvusd2 = 'llamaLendsUSDecrvUSD2',
10
- LLWbtcCrvusd = 'llamaLendWBTCcrvUSD',
11
- // LLPufethCrvusd = 'llamaLendPufETHcrvUSD', // temp disabled
12
- LLUsdeCrvusd = 'llamaLendUSDecrvUSD',
13
- LLWethCrvusd2 = 'llamaLendWETHcrvUSD2',
14
- // long and short crv
15
- LLCrvCrvusd = 'llamaLendCRVcrvUSD',
16
- LLCrvusdCrv = 'llamaLendcrvUSDCRV',
17
- // long and short tbtc
18
- LLTbtcCrvusd = 'llamaLendTBTCcrvUSD',
19
- LLCrvusdTbtc = 'llamaLendcrvUSDTBTC',
20
- // long and short weth
21
- LLWethCrvusd = 'llamaLendWETHcrvUSD',
22
- LLCrvusdWeth = 'llamaLendcrvUSDWETH',
23
- }
24
-
25
- export enum LLVersionsArb {
26
- // long only
27
- LLArbCrvusd = 'llamaLendArbcrvUSD',
28
- LLArbCrvusd2 = 'llamaLendArbcrvUSD2',
29
- LLFxnCrvusd = 'llamaLendFXNcrvUSD',
30
- LLWbtcCrvusd = 'llamaLendWBTCcrvUSD',
31
- LLWbtcCrvusd2 = 'llamaLendWBTCcrvUSD2',
32
- LLCrvCrvusd = 'llamaLendCRVcrvUSD',
33
- LLWethCrvusd = 'llamaLendWETHcrvUSD',
34
- LLWethCrvusd2 = 'llamaLendWETHcrvUSD2',
35
- }
36
-
37
- export const LlamaLendVersions = {
38
- ...LLVersionsEth,
39
- ...LLVersionsArb,
40
- } as const;
41
-
42
- export type LlamaLendVersionsType = typeof LlamaLendVersions[keyof typeof LlamaLendVersions];
43
-
44
- export enum LlamaLendStatus {
45
- Nonexistant = 'Nonexistant',
46
- Safe = 'Safe',
47
- Risk = 'Risk',
48
- SoftLiquidating = 'SoftLiquidating',
49
- SoftLiquidated = 'SoftLiquidated',
50
- }
51
-
52
- export interface LlamaLendMarketData {
53
- chainIds: NetworkNumber[],
54
- label: string,
55
- shortLabel: string,
56
- value: LlamaLendVersionsType,
57
- collAsset: string,
58
- baseAsset: string,
59
- controllerAddress: string,
60
- vaultAddress: EthAddress,
61
- url: string,
62
- }
63
- export interface LlamaLendAssetData {
64
- symbol: string,
65
- address: string,
66
- price: string,
67
- supplyRate: string,
68
- borrowRate: string,
69
- totalSupply?: string,
70
- totalBorrow?: string,
71
- canBeSupplied?: boolean,
72
- canBeBorrowed?: boolean,
73
- shares?: string,
74
- }
75
-
76
- export type LlamaLendAssetsData = { [key: string]: LlamaLendAssetData };
77
-
78
- export interface LlamaLendGlobalMarketData {
79
- A:string,
80
- loanDiscount: string,
81
- activeBand: string,
82
- totalDebt: string,
83
- totalDebtSupplied:string,
84
- utilization:string,
85
- ammPrice: string,
86
- basePrice: string,
87
- oraclePrice: string,
88
- minted: string,
89
- redeemed: string,
90
- monetaryPolicyRate: string,
91
- ammRate: string,
92
- minBand: string,
93
- maxBand: string,
94
- borrowRate: string,
95
- lendRate: string,
96
- futureBorrowRate: string,
97
- leftToBorrow: string,
98
- bands: BandData[],
99
- assetsData: LlamaLendAssetsData,
100
- }
101
-
102
- export interface LlamaLendAggregatedPositionData {
103
- ratio: string,
104
- suppliedUsd: string,
105
- borrowedUsd: string,
106
- suppliedForYieldUsd: string,
107
- safetyRatio: string,
108
- borrowLimitUsd: string,
109
- minAllowedRatio: number,
110
- collFactor: string,
111
- leveragedType: string,
112
- leveragedAsset?: string,
113
- liquidationPrice?: string,
114
- netApy: string,
115
- incentiveUsd: string,
116
- totalInterestUsd: string,
117
- }
118
-
119
- export interface LlamaLendUsedAsset {
120
- isSupplied: boolean,
121
- supplied: string,
122
- suppliedUsd: string,
123
- borrowed: string,
124
- borrowedUsd: string,
125
- isBorrowed: boolean,
126
- symbol: string,
127
- collateral: boolean,
128
- price: string,
129
- interestRate?: string,
130
- suppliedForYield?: string,
131
- suppliedForYieldUsd?: string,
132
- shares?: string,
133
- }
134
-
135
- export interface LlamaLendUsedAssets {
136
- [key: string]: LlamaLendUsedAsset,
137
- }
138
-
139
- export interface LlamaLendUserData {
140
- debtAmount: string,
141
- health: string,
142
- healthPercent: string,
143
- priceHigh: string,
144
- priceLow: string,
145
- liquidationDiscount: string,
146
- numOfBands: string,
147
- usedAssets: LlamaLendUsedAssets,
148
- status: LlamaLendStatus,
149
- ratio: string,
150
- suppliedUsd: string,
151
- borrowedUsd: string,
152
- suppliedForYieldUsd: string,
153
- safetyRatio: string,
154
- userBands: UserBandData[],
155
- }
1
+ import { EthAddress, NetworkNumber } from './common';
2
+ import { BandData, UserBandData } from './curveUsd';
3
+
4
+ export enum LLVersionsEth {
5
+ // long only
6
+ LLWstethCrvusd = 'llamaLendwstETHcrvUSD',
7
+ LLWstethCrvusd2 = 'llamaLendwstETHcrvUSD2',
8
+ LLSusdeCrvusd = 'llamaLendsUSDecrvUSD',
9
+ LLSusdeCrvusd2 = 'llamaLendsUSDecrvUSD2',
10
+ LLWbtcCrvusd = 'llamaLendWBTCcrvUSD',
11
+ // LLPufethCrvusd = 'llamaLendPufETHcrvUSD', // temp disabled
12
+ LLUsdeCrvusd = 'llamaLendUSDecrvUSD',
13
+ LLWethCrvusd2 = 'llamaLendWETHcrvUSD2',
14
+ // long and short crv
15
+ LLCrvCrvusd = 'llamaLendCRVcrvUSD',
16
+ LLCrvusdCrv = 'llamaLendcrvUSDCRV',
17
+ // long and short tbtc
18
+ LLTbtcCrvusd = 'llamaLendTBTCcrvUSD',
19
+ LLCrvusdTbtc = 'llamaLendcrvUSDTBTC',
20
+ // long and short weth
21
+ LLWethCrvusd = 'llamaLendWETHcrvUSD',
22
+ LLCrvusdWeth = 'llamaLendcrvUSDWETH',
23
+ }
24
+
25
+ export enum LLVersionsArb {
26
+ // long only
27
+ LLArbCrvusd = 'llamaLendArbcrvUSD',
28
+ LLArbCrvusd2 = 'llamaLendArbcrvUSD2',
29
+ LLFxnCrvusd = 'llamaLendFXNcrvUSD',
30
+ LLWbtcCrvusd = 'llamaLendWBTCcrvUSD',
31
+ LLWbtcCrvusd2 = 'llamaLendWBTCcrvUSD2',
32
+ LLCrvCrvusd = 'llamaLendCRVcrvUSD',
33
+ LLWethCrvusd = 'llamaLendWETHcrvUSD',
34
+ LLWethCrvusd2 = 'llamaLendWETHcrvUSD2',
35
+ }
36
+
37
+ export const LlamaLendVersions = {
38
+ ...LLVersionsEth,
39
+ ...LLVersionsArb,
40
+ } as const;
41
+
42
+ export type LlamaLendVersionsType = typeof LlamaLendVersions[keyof typeof LlamaLendVersions];
43
+
44
+ export enum LlamaLendStatus {
45
+ Nonexistant = 'Nonexistant',
46
+ Safe = 'Safe',
47
+ Risk = 'Risk',
48
+ SoftLiquidating = 'SoftLiquidating',
49
+ SoftLiquidated = 'SoftLiquidated',
50
+ }
51
+
52
+ export interface LlamaLendMarketData {
53
+ chainIds: NetworkNumber[],
54
+ label: string,
55
+ shortLabel: string,
56
+ value: LlamaLendVersionsType,
57
+ collAsset: string,
58
+ baseAsset: string,
59
+ controllerAddress: string,
60
+ vaultAddress: EthAddress,
61
+ url: string,
62
+ }
63
+ export interface LlamaLendAssetData {
64
+ symbol: string,
65
+ address: string,
66
+ price: string,
67
+ supplyRate: string,
68
+ borrowRate: string,
69
+ totalSupply?: string,
70
+ totalBorrow?: string,
71
+ canBeSupplied?: boolean,
72
+ canBeBorrowed?: boolean,
73
+ shares?: string,
74
+ }
75
+
76
+ export type LlamaLendAssetsData = { [key: string]: LlamaLendAssetData };
77
+
78
+ export interface LlamaLendGlobalMarketData {
79
+ A:string,
80
+ loanDiscount: string,
81
+ activeBand: string,
82
+ totalDebt: string,
83
+ totalDebtSupplied:string,
84
+ utilization:string,
85
+ ammPrice: string,
86
+ basePrice: string,
87
+ oraclePrice: string,
88
+ minted: string,
89
+ redeemed: string,
90
+ monetaryPolicyRate: string,
91
+ ammRate: string,
92
+ minBand: string,
93
+ maxBand: string,
94
+ borrowRate: string,
95
+ lendRate: string,
96
+ futureBorrowRate: string,
97
+ leftToBorrow: string,
98
+ bands: BandData[],
99
+ assetsData: LlamaLendAssetsData,
100
+ }
101
+
102
+ export interface LlamaLendAggregatedPositionData {
103
+ ratio: string,
104
+ suppliedUsd: string,
105
+ borrowedUsd: string,
106
+ suppliedForYieldUsd: string,
107
+ safetyRatio: string,
108
+ borrowLimitUsd: string,
109
+ minAllowedRatio: number,
110
+ collFactor: string,
111
+ leveragedType: string,
112
+ leveragedAsset?: string,
113
+ liquidationPrice?: string,
114
+ netApy: string,
115
+ incentiveUsd: string,
116
+ totalInterestUsd: string,
117
+ }
118
+
119
+ export interface LlamaLendUsedAsset {
120
+ isSupplied: boolean,
121
+ supplied: string,
122
+ suppliedUsd: string,
123
+ borrowed: string,
124
+ borrowedUsd: string,
125
+ isBorrowed: boolean,
126
+ symbol: string,
127
+ collateral: boolean,
128
+ price: string,
129
+ interestRate?: string,
130
+ suppliedForYield?: string,
131
+ suppliedForYieldUsd?: string,
132
+ shares?: string,
133
+ }
134
+
135
+ export interface LlamaLendUsedAssets {
136
+ [key: string]: LlamaLendUsedAsset,
137
+ }
138
+
139
+ export interface LlamaLendUserData {
140
+ debtAmount: string,
141
+ health: string,
142
+ healthPercent: string,
143
+ priceHigh: string,
144
+ priceLow: string,
145
+ liquidationDiscount: string,
146
+ numOfBands: string,
147
+ usedAssets: LlamaLendUsedAssets,
148
+ status: LlamaLendStatus,
149
+ ratio: string,
150
+ suppliedUsd: string,
151
+ borrowedUsd: string,
152
+ suppliedForYieldUsd: string,
153
+ safetyRatio: string,
154
+ userBands: UserBandData[],
155
+ }
@@ -1,51 +1,51 @@
1
- import { EthAddress } from './common';
2
-
3
- export interface IlkInfo {
4
- ilkLabel: string;
5
- currentRate: string;
6
- futureRate: string;
7
- minDebt: string;
8
- globalDebtCeiling: string;
9
- globalDebtCurrent: string;
10
- assetPrice: string;
11
- liqRatio: string;
12
- liqPercent: number;
13
- stabilityFee: number;
14
- liquidationFee: string;
15
- creatableDebt: string;
16
- }
17
-
18
- export interface CdpData {
19
- owner: EthAddress,
20
- userAddress: EthAddress,
21
- id: string,
22
- urn: EthAddress,
23
- type: string,
24
- ilk: string,
25
- ilkLabel: string,
26
- asset: string,
27
- collateral: string,
28
- collateralUsd: string,
29
- futureDebt: string,
30
- debtDai: string,
31
- debtUsd: string,
32
- debtInAsset: string,
33
- debtAssetPrice: string,
34
- debtAssetMarketPrice: string,
35
- liquidationPrice: string,
36
- ratio: string,
37
- liqRatio: string,
38
- liqPercent: number,
39
- assetPrice: string,
40
- daiLabel: string,
41
- debtAsset: string,
42
- unclaimedCollateral: string,
43
- debtTooLow: boolean,
44
- minDebt: string,
45
- stabilityFee: number,
46
- creatableDebt: string,
47
- globalDebtCeiling: string,
48
- globalDebtCurrent: string,
49
- liquidationFee: string,
50
- lastUpdated: number,
1
+ import { EthAddress } from './common';
2
+
3
+ export interface IlkInfo {
4
+ ilkLabel: string;
5
+ currentRate: string;
6
+ futureRate: string;
7
+ minDebt: string;
8
+ globalDebtCeiling: string;
9
+ globalDebtCurrent: string;
10
+ assetPrice: string;
11
+ liqRatio: string;
12
+ liqPercent: number;
13
+ stabilityFee: number;
14
+ liquidationFee: string;
15
+ creatableDebt: string;
16
+ }
17
+
18
+ export interface CdpData {
19
+ owner: EthAddress,
20
+ userAddress: EthAddress,
21
+ id: string,
22
+ urn: EthAddress,
23
+ type: string,
24
+ ilk: string,
25
+ ilkLabel: string,
26
+ asset: string,
27
+ collateral: string,
28
+ collateralUsd: string,
29
+ futureDebt: string,
30
+ debtDai: string,
31
+ debtUsd: string,
32
+ debtInAsset: string,
33
+ debtAssetPrice: string,
34
+ debtAssetMarketPrice: string,
35
+ liquidationPrice: string,
36
+ ratio: string,
37
+ liqRatio: string,
38
+ liqPercent: number,
39
+ assetPrice: string,
40
+ daiLabel: string,
41
+ debtAsset: string,
42
+ unclaimedCollateral: string,
43
+ debtTooLow: boolean,
44
+ minDebt: string,
45
+ stabilityFee: number,
46
+ creatableDebt: string,
47
+ globalDebtCeiling: string,
48
+ globalDebtCurrent: string,
49
+ liquidationFee: string,
50
+ lastUpdated: number,
51
51
  }