@defisaver/positions-sdk 0.0.30 → 0.0.32

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 (113) hide show
  1. package/README.md +63 -63
  2. package/cjs/config/contracts.d.ts +115 -0
  3. package/cjs/config/contracts.js +14 -0
  4. package/cjs/constants/index.d.ts +2 -0
  5. package/cjs/constants/index.js +3 -1
  6. package/cjs/contracts.d.ts +2 -0
  7. package/cjs/contracts.js +3 -1
  8. package/cjs/helpers/index.d.ts +1 -0
  9. package/cjs/helpers/index.js +2 -1
  10. package/cjs/helpers/morphoBlueHelpers/index.d.ts +7 -0
  11. package/cjs/helpers/morphoBlueHelpers/index.js +41 -0
  12. package/cjs/index.d.ts +2 -1
  13. package/cjs/index.js +3 -1
  14. package/cjs/markets/index.d.ts +1 -0
  15. package/cjs/markets/index.js +3 -1
  16. package/cjs/markets/morphoBlue/index.d.ts +6 -0
  17. package/cjs/markets/morphoBlue/index.js +24 -0
  18. package/cjs/morphoBlue/index.d.ts +5 -0
  19. package/cjs/morphoBlue/index.js +153 -0
  20. package/cjs/types/common.d.ts +1 -1
  21. package/cjs/types/contracts/generated/FeedRegistry.d.ts +182 -0
  22. package/cjs/types/contracts/generated/FeedRegistry.js +5 -0
  23. package/cjs/types/contracts/generated/MorphoBlueView.d.ts +122 -0
  24. package/cjs/types/contracts/generated/MorphoBlueView.js +5 -0
  25. package/cjs/types/contracts/generated/index.d.ts +2 -0
  26. package/cjs/types/index.d.ts +1 -0
  27. package/cjs/types/index.js +1 -0
  28. package/cjs/types/morphoBlue.d.ts +74 -0
  29. package/cjs/types/morphoBlue.js +7 -0
  30. package/esm/config/contracts.d.ts +115 -0
  31. package/esm/config/contracts.js +14 -0
  32. package/esm/constants/index.d.ts +2 -0
  33. package/esm/constants/index.js +2 -0
  34. package/esm/contracts.d.ts +2 -0
  35. package/esm/contracts.js +2 -0
  36. package/esm/helpers/index.d.ts +1 -0
  37. package/esm/helpers/index.js +1 -0
  38. package/esm/helpers/morphoBlueHelpers/index.d.ts +7 -0
  39. package/esm/helpers/morphoBlueHelpers/index.js +34 -0
  40. package/esm/index.d.ts +2 -1
  41. package/esm/index.js +2 -1
  42. package/esm/markets/index.d.ts +1 -0
  43. package/esm/markets/index.js +1 -0
  44. package/esm/markets/morphoBlue/index.d.ts +6 -0
  45. package/esm/markets/morphoBlue/index.js +19 -0
  46. package/esm/morphoBlue/index.d.ts +5 -0
  47. package/esm/morphoBlue/index.js +145 -0
  48. package/esm/types/common.d.ts +1 -1
  49. package/esm/types/contracts/generated/FeedRegistry.d.ts +182 -0
  50. package/esm/types/contracts/generated/FeedRegistry.js +4 -0
  51. package/esm/types/contracts/generated/MorphoBlueView.d.ts +122 -0
  52. package/esm/types/contracts/generated/MorphoBlueView.js +4 -0
  53. package/esm/types/contracts/generated/index.d.ts +2 -0
  54. package/esm/types/index.d.ts +1 -0
  55. package/esm/types/index.js +1 -0
  56. package/esm/types/morphoBlue.d.ts +74 -0
  57. package/esm/types/morphoBlue.js +4 -0
  58. package/package.json +40 -40
  59. package/src/aaveV2/index.ts +226 -226
  60. package/src/aaveV3/index.ts +561 -561
  61. package/src/assets/index.ts +60 -60
  62. package/src/chickenBonds/index.ts +123 -123
  63. package/src/compoundV2/index.ts +219 -219
  64. package/src/compoundV3/index.ts +275 -275
  65. package/src/config/contracts.js +690 -676
  66. package/src/constants/index.ts +6 -4
  67. package/src/contracts.ts +131 -127
  68. package/src/curveUsd/index.ts +228 -228
  69. package/src/exchange/index.ts +17 -17
  70. package/src/helpers/aaveHelpers/index.ts +134 -134
  71. package/src/helpers/chickenBondsHelpers/index.ts +23 -23
  72. package/src/helpers/compoundHelpers/index.ts +181 -181
  73. package/src/helpers/curveUsdHelpers/index.ts +32 -32
  74. package/src/helpers/index.ts +7 -6
  75. package/src/helpers/makerHelpers/index.ts +94 -94
  76. package/src/helpers/morphoBlueHelpers/index.ts +47 -0
  77. package/src/helpers/sparkHelpers/index.ts +106 -106
  78. package/src/index.ts +42 -40
  79. package/src/liquity/index.ts +116 -116
  80. package/src/maker/index.ts +101 -101
  81. package/src/markets/aave/index.ts +80 -80
  82. package/src/markets/aave/marketAssets.ts +24 -24
  83. package/src/markets/compound/index.ts +141 -141
  84. package/src/markets/compound/marketsAssets.ts +48 -48
  85. package/src/markets/curveUsd/index.ts +69 -69
  86. package/src/markets/index.ts +5 -4
  87. package/src/markets/morphoBlue/index.ts +21 -0
  88. package/src/markets/spark/index.ts +29 -29
  89. package/src/markets/spark/marketAssets.ts +10 -10
  90. package/src/moneymarket/moneymarketCommonService.ts +75 -75
  91. package/src/morphoAaveV2/index.ts +255 -255
  92. package/src/morphoAaveV3/index.ts +619 -619
  93. package/src/morphoBlue/index.ts +166 -0
  94. package/src/multicall/index.ts +22 -22
  95. package/src/services/dsrService.ts +15 -15
  96. package/src/services/priceService.ts +21 -21
  97. package/src/services/utils.ts +34 -34
  98. package/src/spark/index.ts +422 -422
  99. package/src/staking/staking.ts +167 -167
  100. package/src/types/aave.ts +256 -256
  101. package/src/types/chickenBonds.ts +45 -45
  102. package/src/types/common.ts +83 -83
  103. package/src/types/compound.ts +128 -128
  104. package/src/types/contracts/generated/FeedRegistry.ts +337 -0
  105. package/src/types/contracts/generated/MorphoBlueView.ts +171 -0
  106. package/src/types/contracts/generated/index.ts +2 -0
  107. package/src/types/curveUsd.ts +112 -112
  108. package/src/types/index.ts +8 -7
  109. package/src/types/liquity.ts +30 -30
  110. package/src/types/maker.ts +50 -50
  111. package/src/types/morphoBlue.ts +80 -0
  112. package/src/types/spark.ts +106 -106
  113. package/src/morpho/markets.ts +0 -39
@@ -0,0 +1,182 @@
1
+ /// <reference types="node" />
2
+ import type BN from "bn.js";
3
+ import type { ContractOptions } from "web3-eth-contract";
4
+ import type { EventLog } from "web3-core";
5
+ import type { EventEmitter } from "events";
6
+ import type { Callback, NonPayableTransactionObject, BlockType, ContractEventLog, BaseContract } from "./types";
7
+ export interface EventOptions {
8
+ filter?: object;
9
+ fromBlock?: BlockType;
10
+ topics?: string[];
11
+ }
12
+ export declare namespace FeedRegistryInterface {
13
+ type PhaseStruct = [number | string | BN, number | string | BN, number | string | BN] | {
14
+ phaseId: number | string | BN;
15
+ startingAggregatorRoundId: number | string | BN;
16
+ endingAggregatorRoundId: number | string | BN;
17
+ };
18
+ type PhaseStructOutputArray = [string, string, string];
19
+ type PhaseStructOutputStruct = {
20
+ phaseId: string;
21
+ startingAggregatorRoundId: string;
22
+ endingAggregatorRoundId: string;
23
+ };
24
+ type PhaseStructOutput = PhaseStructOutputArray & PhaseStructOutputStruct;
25
+ }
26
+ export type AccessControllerSet = ContractEventLog<{
27
+ accessController: string;
28
+ sender: string;
29
+ 0: string;
30
+ 1: string;
31
+ }>;
32
+ export type FeedConfirmed = ContractEventLog<{
33
+ asset: string;
34
+ denomination: string;
35
+ latestAggregator: string;
36
+ previousAggregator: string;
37
+ nextPhaseId: string;
38
+ sender: string;
39
+ 0: string;
40
+ 1: string;
41
+ 2: string;
42
+ 3: string;
43
+ 4: string;
44
+ 5: string;
45
+ }>;
46
+ export type FeedProposed = ContractEventLog<{
47
+ asset: string;
48
+ denomination: string;
49
+ proposedAggregator: string;
50
+ currentAggregator: string;
51
+ sender: string;
52
+ 0: string;
53
+ 1: string;
54
+ 2: string;
55
+ 3: string;
56
+ 4: string;
57
+ }>;
58
+ export type OwnershipTransferRequested = ContractEventLog<{
59
+ from: string;
60
+ to: string;
61
+ 0: string;
62
+ 1: string;
63
+ }>;
64
+ export type OwnershipTransferred = ContractEventLog<{
65
+ from: string;
66
+ to: string;
67
+ 0: string;
68
+ 1: string;
69
+ }>;
70
+ export interface FeedRegistry extends BaseContract {
71
+ constructor(jsonInterface: any[], address?: string, options?: ContractOptions): FeedRegistry;
72
+ clone(): FeedRegistry;
73
+ methods: {
74
+ acceptOwnership(): NonPayableTransactionObject<void>;
75
+ confirmFeed(base: string, quote: string, aggregator: string): NonPayableTransactionObject<void>;
76
+ decimals(base: string, quote: string): NonPayableTransactionObject<string>;
77
+ description(base: string, quote: string): NonPayableTransactionObject<string>;
78
+ getAccessController(): NonPayableTransactionObject<string>;
79
+ getAnswer(base: string, quote: string, roundId: number | string | BN): NonPayableTransactionObject<string>;
80
+ getCurrentPhaseId(base: string, quote: string): NonPayableTransactionObject<string>;
81
+ getFeed(base: string, quote: string): NonPayableTransactionObject<string>;
82
+ getNextRoundId(base: string, quote: string, roundId: number | string | BN): NonPayableTransactionObject<string>;
83
+ getPhase(base: string, quote: string, phaseId: number | string | BN): NonPayableTransactionObject<FeedRegistryInterface.PhaseStructOutput>;
84
+ getPhaseFeed(base: string, quote: string, phaseId: number | string | BN): NonPayableTransactionObject<string>;
85
+ getPhaseRange(base: string, quote: string, phaseId: number | string | BN): NonPayableTransactionObject<[
86
+ string,
87
+ string
88
+ ] & {
89
+ startingRoundId: string;
90
+ endingRoundId: string;
91
+ }>;
92
+ getPreviousRoundId(base: string, quote: string, roundId: number | string | BN): NonPayableTransactionObject<string>;
93
+ getProposedFeed(base: string, quote: string): NonPayableTransactionObject<string>;
94
+ getRoundData(base: string, quote: string, _roundId: number | string | BN): NonPayableTransactionObject<[
95
+ string,
96
+ string,
97
+ string,
98
+ string,
99
+ string
100
+ ] & {
101
+ roundId: string;
102
+ answer: string;
103
+ startedAt: string;
104
+ updatedAt: string;
105
+ answeredInRound: string;
106
+ }>;
107
+ getRoundFeed(base: string, quote: string, roundId: number | string | BN): NonPayableTransactionObject<string>;
108
+ getTimestamp(base: string, quote: string, roundId: number | string | BN): NonPayableTransactionObject<string>;
109
+ isFeedEnabled(aggregator: string): NonPayableTransactionObject<boolean>;
110
+ latestAnswer(base: string, quote: string): NonPayableTransactionObject<string>;
111
+ latestRound(base: string, quote: string): NonPayableTransactionObject<string>;
112
+ latestRoundData(base: string, quote: string): NonPayableTransactionObject<[
113
+ string,
114
+ string,
115
+ string,
116
+ string,
117
+ string
118
+ ] & {
119
+ roundId: string;
120
+ answer: string;
121
+ startedAt: string;
122
+ updatedAt: string;
123
+ answeredInRound: string;
124
+ }>;
125
+ latestTimestamp(base: string, quote: string): NonPayableTransactionObject<string>;
126
+ owner(): NonPayableTransactionObject<string>;
127
+ proposeFeed(base: string, quote: string, aggregator: string): NonPayableTransactionObject<void>;
128
+ proposedGetRoundData(base: string, quote: string, roundId: number | string | BN): NonPayableTransactionObject<[
129
+ string,
130
+ string,
131
+ string,
132
+ string,
133
+ string
134
+ ] & {
135
+ id: string;
136
+ answer: string;
137
+ startedAt: string;
138
+ updatedAt: string;
139
+ answeredInRound: string;
140
+ }>;
141
+ proposedLatestRoundData(base: string, quote: string): NonPayableTransactionObject<[
142
+ string,
143
+ string,
144
+ string,
145
+ string,
146
+ string
147
+ ] & {
148
+ id: string;
149
+ answer: string;
150
+ startedAt: string;
151
+ updatedAt: string;
152
+ answeredInRound: string;
153
+ }>;
154
+ setAccessController(_accessController: string): NonPayableTransactionObject<void>;
155
+ transferOwnership(to: string): NonPayableTransactionObject<void>;
156
+ typeAndVersion(): NonPayableTransactionObject<string>;
157
+ version(base: string, quote: string): NonPayableTransactionObject<string>;
158
+ };
159
+ events: {
160
+ AccessControllerSet(cb?: Callback<AccessControllerSet>): EventEmitter;
161
+ AccessControllerSet(options?: EventOptions, cb?: Callback<AccessControllerSet>): EventEmitter;
162
+ FeedConfirmed(cb?: Callback<FeedConfirmed>): EventEmitter;
163
+ FeedConfirmed(options?: EventOptions, cb?: Callback<FeedConfirmed>): EventEmitter;
164
+ FeedProposed(cb?: Callback<FeedProposed>): EventEmitter;
165
+ FeedProposed(options?: EventOptions, cb?: Callback<FeedProposed>): EventEmitter;
166
+ OwnershipTransferRequested(cb?: Callback<OwnershipTransferRequested>): EventEmitter;
167
+ OwnershipTransferRequested(options?: EventOptions, cb?: Callback<OwnershipTransferRequested>): EventEmitter;
168
+ OwnershipTransferred(cb?: Callback<OwnershipTransferred>): EventEmitter;
169
+ OwnershipTransferred(options?: EventOptions, cb?: Callback<OwnershipTransferred>): EventEmitter;
170
+ allEvents(options?: EventOptions, cb?: Callback<EventLog>): EventEmitter;
171
+ };
172
+ once(event: "AccessControllerSet", cb: Callback<AccessControllerSet>): void;
173
+ once(event: "AccessControllerSet", options: EventOptions, cb: Callback<AccessControllerSet>): void;
174
+ once(event: "FeedConfirmed", cb: Callback<FeedConfirmed>): void;
175
+ once(event: "FeedConfirmed", options: EventOptions, cb: Callback<FeedConfirmed>): void;
176
+ once(event: "FeedProposed", cb: Callback<FeedProposed>): void;
177
+ once(event: "FeedProposed", options: EventOptions, cb: Callback<FeedProposed>): void;
178
+ once(event: "OwnershipTransferRequested", cb: Callback<OwnershipTransferRequested>): void;
179
+ once(event: "OwnershipTransferRequested", options: EventOptions, cb: Callback<OwnershipTransferRequested>): void;
180
+ once(event: "OwnershipTransferred", cb: Callback<OwnershipTransferred>): void;
181
+ once(event: "OwnershipTransferred", options: EventOptions, cb: Callback<OwnershipTransferred>): void;
182
+ }
@@ -0,0 +1,4 @@
1
+ /* Autogenerated file. Do not edit manually. */
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ export {};
@@ -0,0 +1,122 @@
1
+ /// <reference types="node" />
2
+ import type BN from "bn.js";
3
+ import type { ContractOptions } from "web3-eth-contract";
4
+ import type { EventLog } from "web3-core";
5
+ import type { EventEmitter } from "events";
6
+ import type { Callback, NonPayableTransactionObject, BlockType, BaseContract } from "./types";
7
+ export interface EventOptions {
8
+ filter?: object;
9
+ fromBlock?: BlockType;
10
+ topics?: string[];
11
+ }
12
+ export type MarketParamsStruct = [string, string, string, string, number | string | BN] | {
13
+ loanToken: string;
14
+ collateralToken: string;
15
+ oracle: string;
16
+ irm: string;
17
+ lltv: number | string | BN;
18
+ };
19
+ export type MarketParamsStructOutputArray = [
20
+ string,
21
+ string,
22
+ string,
23
+ string,
24
+ string
25
+ ];
26
+ export type MarketParamsStructOutputStruct = {
27
+ loanToken: string;
28
+ collateralToken: string;
29
+ oracle: string;
30
+ irm: string;
31
+ lltv: string;
32
+ };
33
+ export type MarketParamsStructOutput = MarketParamsStructOutputArray & MarketParamsStructOutputStruct;
34
+ export declare namespace MorphoBlueView {
35
+ type MarketInfoStruct = [
36
+ string | number[],
37
+ number | string | BN,
38
+ number | string | BN,
39
+ number | string | BN,
40
+ number | string | BN,
41
+ number | string | BN,
42
+ number | string | BN,
43
+ number | string | BN,
44
+ number | string | BN
45
+ ] | {
46
+ id: string | number[];
47
+ totalSupplyAssets: number | string | BN;
48
+ totalSupplyShares: number | string | BN;
49
+ totalBorrowAssets: number | string | BN;
50
+ totalBorrowShares: number | string | BN;
51
+ lastUpdate: number | string | BN;
52
+ fee: number | string | BN;
53
+ borrowRate: number | string | BN;
54
+ oracle: number | string | BN;
55
+ };
56
+ type MarketInfoStructOutputArray = [
57
+ string,
58
+ string,
59
+ string,
60
+ string,
61
+ string,
62
+ string,
63
+ string,
64
+ string,
65
+ string
66
+ ];
67
+ type MarketInfoStructOutputStruct = {
68
+ id: string;
69
+ totalSupplyAssets: string;
70
+ totalSupplyShares: string;
71
+ totalBorrowAssets: string;
72
+ totalBorrowShares: string;
73
+ lastUpdate: string;
74
+ fee: string;
75
+ borrowRate: string;
76
+ oracle: string;
77
+ };
78
+ type MarketInfoStructOutput = MarketInfoStructOutputArray & MarketInfoStructOutputStruct;
79
+ type PositionInfoStruct = [
80
+ number | string | BN,
81
+ number | string | BN,
82
+ number | string | BN,
83
+ number | string | BN,
84
+ number | string | BN
85
+ ] | {
86
+ supplyShares: number | string | BN;
87
+ suppliedInAssets: number | string | BN;
88
+ borrowShares: number | string | BN;
89
+ borrowedInAssets: number | string | BN;
90
+ collateral: number | string | BN;
91
+ };
92
+ type PositionInfoStructOutputArray = [
93
+ string,
94
+ string,
95
+ string,
96
+ string,
97
+ string
98
+ ];
99
+ type PositionInfoStructOutputStruct = {
100
+ supplyShares: string;
101
+ suppliedInAssets: string;
102
+ borrowShares: string;
103
+ borrowedInAssets: string;
104
+ collateral: string;
105
+ };
106
+ type PositionInfoStructOutput = PositionInfoStructOutputArray & PositionInfoStructOutputStruct;
107
+ }
108
+ export interface MorphoBlueView extends BaseContract {
109
+ constructor(jsonInterface: any[], address?: string, options?: ContractOptions): MorphoBlueView;
110
+ clone(): MorphoBlueView;
111
+ methods: {
112
+ MORPHO_BLUE_ADDRESS(): NonPayableTransactionObject<string>;
113
+ getMarketId(marketParams: MarketParamsStruct): NonPayableTransactionObject<string>;
114
+ getMarketInfo(marketParams: MarketParamsStruct): NonPayableTransactionObject<MorphoBlueView.MarketInfoStructOutput>;
115
+ getMarketInfoNotTuple(loanToken: string, collToken: string, oracle: string, irm: string, lltv: number | string | BN): NonPayableTransactionObject<MorphoBlueView.MarketInfoStructOutput>;
116
+ getUserInfo(marketParams: MarketParamsStruct, owner: string): NonPayableTransactionObject<MorphoBlueView.PositionInfoStructOutput>;
117
+ morphoBlue(): NonPayableTransactionObject<string>;
118
+ };
119
+ events: {
120
+ allEvents(options?: EventOptions, cb?: Callback<EventLog>): EventEmitter;
121
+ };
122
+ }
@@ -0,0 +1,4 @@
1
+ /* Autogenerated file. Do not edit manually. */
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ export {};
@@ -21,6 +21,7 @@ export type { CompoundLoanInfo } from "./CompoundLoanInfo";
21
21
  export type { Comptroller } from "./Comptroller";
22
22
  export type { ETHPriceFeed } from "./ETHPriceFeed";
23
23
  export type { Erc20 } from "./Erc20";
24
+ export type { FeedRegistry } from "./FeedRegistry";
24
25
  export type { GHO } from "./GHO";
25
26
  export type { GhoDiscountRateStrategy } from "./GhoDiscountRateStrategy";
26
27
  export type { IAToken } from "./IAToken";
@@ -37,6 +38,7 @@ export type { McdView } from "./McdView";
37
38
  export type { MorphoAaveV2Proxy } from "./MorphoAaveV2Proxy";
38
39
  export type { MorphoAaveV2View } from "./MorphoAaveV2View";
39
40
  export type { MorphoAaveV3ProxyEthMarket } from "./MorphoAaveV3ProxyEthMarket";
41
+ export type { MorphoBlueView } from "./MorphoBlueView";
40
42
  export type { Pot } from "./Pot";
41
43
  export type { PriceFeed } from "./PriceFeed";
42
44
  export type { REth } from "./REth";
@@ -5,3 +5,4 @@ export * from './curveUsd';
5
5
  export * from './liquity';
6
6
  export * from './maker';
7
7
  export * from './chickenBonds';
8
+ export * from './morphoBlue';
@@ -5,3 +5,4 @@ export * from './curveUsd';
5
5
  export * from './liquity';
6
6
  export * from './maker';
7
7
  export * from './chickenBonds';
8
+ export * from './morphoBlue';
@@ -0,0 +1,74 @@
1
+ import { MMUsedAssets, NetworkNumber } from './common';
2
+ export declare enum MorphoBlueVersions {
3
+ MorphoBlueWstEthEth = "morphobluewstetheth"
4
+ }
5
+ export interface MorphoBlueMarketData {
6
+ chainIds: NetworkNumber[];
7
+ label: string;
8
+ shortLabel: string;
9
+ url: string;
10
+ value: MorphoBlueVersions;
11
+ loanToken: string;
12
+ collateralToken: string;
13
+ oracle: string;
14
+ irm: string;
15
+ lltv: number | string;
16
+ protocolName: string;
17
+ }
18
+ export interface MorphoBlueAssetData {
19
+ symbol: string;
20
+ address: string;
21
+ price: string;
22
+ supplyRate: string;
23
+ borrowRate: string;
24
+ incentiveSupplyApy?: string;
25
+ incentiveSupplyToken?: string;
26
+ totalSupply?: string;
27
+ totalBorrow?: string;
28
+ }
29
+ export type MorphoBlueAssetsData = {
30
+ [key: string]: MorphoBlueAssetData;
31
+ };
32
+ export interface MorphoBlueMarketInfo {
33
+ id: string;
34
+ fee: string;
35
+ loanToken: string;
36
+ collateralToken: string;
37
+ utillization: string;
38
+ oracle: string;
39
+ lltv: string;
40
+ assetsData: MorphoBlueAssetsData;
41
+ }
42
+ export interface MorphoBlueAggregatedPositionData {
43
+ suppliedUsd: string;
44
+ suppliedCollateralUsd: string;
45
+ borrowedUsd: string;
46
+ borrowLimitUsd: string;
47
+ liquidationLimitUsd: string;
48
+ leftToBorrowUsd: string;
49
+ netApy: string;
50
+ incentiveUsd: string;
51
+ totalInterestUsd: string;
52
+ ltv: string;
53
+ leveragedType: string;
54
+ leveragedAsset?: string;
55
+ leveragedLsdAssetRatio?: string;
56
+ liquidationPrice?: string;
57
+ }
58
+ export interface MorphoBluePositionData {
59
+ usedAssets: MMUsedAssets;
60
+ suppliedUsd: string;
61
+ suppliedCollateralUsd: string;
62
+ borrowedUsd: string;
63
+ borrowLimitUsd: string;
64
+ liquidationLimitUsd: string;
65
+ leftToBorrowUsd: string;
66
+ netApy: string;
67
+ incentiveUsd: string;
68
+ totalInterestUsd: string;
69
+ ltv: string;
70
+ leveragedType: string;
71
+ leveragedAsset?: string;
72
+ leveragedLsdAssetRatio?: string;
73
+ liquidationPrice?: string;
74
+ }
@@ -0,0 +1,4 @@
1
+ export var MorphoBlueVersions;
2
+ (function (MorphoBlueVersions) {
3
+ MorphoBlueVersions["MorphoBlueWstEthEth"] = "morphobluewstetheth";
4
+ })(MorphoBlueVersions || (MorphoBlueVersions = {}));
package/package.json CHANGED
@@ -1,40 +1,40 @@
1
- {
2
- "name": "@defisaver/positions-sdk",
3
- "version": "0.0.30",
4
- "description": "",
5
- "main": "./cjs/index.js",
6
- "module": "./esm/index.js",
7
- "types": "./esm/index.d.ts",
8
- "scripts": {
9
- "build:esm": "rm -rf esm && tsc -p tsconfig.json",
10
- "build:cjs": "rm -rf cjs && tsc -p tsconfig.cjs.json",
11
- "build": "npm run generate-contracts && npm run build:cjs && npm run build:esm",
12
- "dev": "npm run generate-contracts && tsc -p tsconfig.cjs.json --watch",
13
- "lint": "eslint src/ --fix",
14
- "generate-contracts": "node scripts/generateContracts.js",
15
- "test": "mocha tests/*",
16
- "build-test": "npm run build && mocha tests/*"
17
- },
18
- "keywords": [],
19
- "author": "",
20
- "license": "ISC",
21
- "dependencies": {
22
- "@defisaver/tokens": "^1.5.5",
23
- "@ethersproject/bignumber": "^5.7.0",
24
- "@morpho-org/morpho-aave-v3-sdk": "^1.5.3",
25
- "decimal.js": "^10.4.3"
26
- },
27
- "devDependencies": {
28
- "@defisaver/eslint-config": "^1.0.1",
29
- "chai": "^4.3.8",
30
- "dotenv": "^16.3.1",
31
- "eslint": "^8.49.0",
32
- "mocha": "^10.2.0",
33
- "typechain": "^8.3.1",
34
- "typechain-target-web3-v1-3mihai3": "^6.0.2",
35
- "typescript": "^5.2.2"
36
- },
37
- "peerDependencies": {
38
- "web3": "^1.10.2"
39
- }
40
- }
1
+ {
2
+ "name": "@defisaver/positions-sdk",
3
+ "version": "0.0.32",
4
+ "description": "",
5
+ "main": "./cjs/index.js",
6
+ "module": "./esm/index.js",
7
+ "types": "./esm/index.d.ts",
8
+ "scripts": {
9
+ "build:esm": "rm -rf esm && tsc -p tsconfig.json",
10
+ "build:cjs": "rm -rf cjs && tsc -p tsconfig.cjs.json",
11
+ "build": "npm run generate-contracts && npm run build:cjs && npm run build:esm",
12
+ "dev": "npm run generate-contracts && tsc -p tsconfig.cjs.json --watch",
13
+ "lint": "eslint src/ --fix",
14
+ "generate-contracts": "node scripts/generateContracts.js",
15
+ "test": "mocha tests/*",
16
+ "build-test": "npm run build && mocha tests/*"
17
+ },
18
+ "keywords": [],
19
+ "author": "",
20
+ "license": "ISC",
21
+ "dependencies": {
22
+ "@defisaver/tokens": "^1.5.5",
23
+ "@ethersproject/bignumber": "^5.7.0",
24
+ "@morpho-org/morpho-aave-v3-sdk": "^1.5.3",
25
+ "decimal.js": "^10.4.3"
26
+ },
27
+ "devDependencies": {
28
+ "@defisaver/eslint-config": "^1.0.1",
29
+ "chai": "^4.3.8",
30
+ "dotenv": "^16.3.1",
31
+ "eslint": "^8.49.0",
32
+ "mocha": "^10.2.0",
33
+ "typechain": "^8.3.1",
34
+ "typechain-target-web3-v1-3mihai3": "^6.0.2",
35
+ "typescript": "^5.2.2"
36
+ },
37
+ "peerDependencies": {
38
+ "web3": "^1.10.2"
39
+ }
40
+ }