@defisaver/positions-sdk 2.1.12 → 2.1.13-dev-plasma-fluid
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.
- package/CLAUDE.md +32 -0
- package/cjs/config/contracts.d.ts +12 -0
- package/cjs/config/contracts.js +7 -3
- package/cjs/contracts.d.ts +100947 -134653
- package/cjs/fluid/index.js +44 -23
- package/cjs/markets/aave/marketAssets.js +1 -1
- package/cjs/markets/fluid/index.d.ts +46 -0
- package/cjs/markets/fluid/index.js +436 -1
- package/cjs/services/priceService.js +1 -1
- package/cjs/services/viem.d.ts +2 -3254
- package/cjs/staking/staking.js +4 -2
- package/cjs/types/fluid.d.ts +30 -1
- package/cjs/types/fluid.js +31 -1
- package/esm/config/contracts.d.ts +12 -0
- package/esm/config/contracts.js +7 -3
- package/esm/contracts.d.ts +100947 -134653
- package/esm/fluid/index.js +45 -24
- package/esm/markets/aave/marketAssets.js +1 -1
- package/esm/markets/fluid/index.d.ts +46 -0
- package/esm/markets/fluid/index.js +415 -1
- package/esm/services/priceService.js +2 -2
- package/esm/services/viem.d.ts +2 -3254
- package/esm/staking/staking.js +4 -2
- package/esm/types/fluid.d.ts +30 -1
- package/esm/types/fluid.js +30 -0
- package/package.json +1 -1
- package/src/config/contracts.ts +7 -3
- package/src/fluid/index.ts +58 -32
- package/src/markets/aave/marketAssets.ts +1 -1
- package/src/markets/fluid/index.ts +442 -2
- package/src/services/priceService.ts +3 -3
- package/src/staking/staking.ts +2 -1
- package/src/types/fluid.ts +32 -1
|
@@ -9,7 +9,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
9
9
|
};
|
|
10
10
|
import Dec from 'decimal.js';
|
|
11
11
|
import { getAssetInfo } from '@defisaver/tokens';
|
|
12
|
-
import {
|
|
12
|
+
import { BTCPriceFeedContractViem, COMPPriceFeedContractViem, ETHPriceFeedContractViem, USDCPriceFeedContractViem, WeETHPriceFeedContractViem, WstETHPriceFeedContractViem, } from '../contracts';
|
|
13
13
|
import { NetworkNumber } from '../types/common';
|
|
14
14
|
import { getEthAmountForDecimals } from './utils';
|
|
15
15
|
export const getEthPrice = (client) => __awaiter(void 0, void 0, void 0, function* () {
|
|
@@ -134,7 +134,7 @@ export const getChainlinkAssetAddress = (symbol, network) => {
|
|
|
134
134
|
// Chainlink only has BTC/USD feed so we use that for BTC derivatives
|
|
135
135
|
if (['WBTC', 'RENBTC'].includes(symbol === null || symbol === void 0 ? void 0 : symbol.toUpperCase()))
|
|
136
136
|
return '0xbBbBBBBbbBBBbbbBbbBbbbbBBbBbbbbBbBbbBBbB';
|
|
137
|
-
if ((symbol === null || symbol === void 0 ? void 0 : symbol.toUpperCase()) === 'WETH')
|
|
137
|
+
if ((symbol === null || symbol === void 0 ? void 0 : symbol.toUpperCase()) === 'WETH' && network !== NetworkNumber.Plasma)
|
|
138
138
|
return getAssetInfo('ETH').addresses[network];
|
|
139
139
|
return getAssetInfo(symbol).addresses[network];
|
|
140
140
|
};
|