@defisaver/positions-sdk 2.1.173 → 2.1.175-looping-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.
- package/cjs/aaveV3/index.d.ts +2 -12
- package/cjs/aaveV3/sgho.d.ts +2 -16
- package/cjs/aaveV4/lend.d.ts +2 -43
- package/cjs/claiming/aaveV3.d.ts +2 -2
- package/cjs/claiming/ethena.d.ts +2 -1
- package/cjs/claiming/king.d.ts +2 -1
- package/cjs/claiming/spark.d.ts +2 -2
- package/cjs/config/contracts.d.ts +4 -4
- package/cjs/config/contracts.js +4 -4
- package/cjs/fluid/index.d.ts +5 -49
- package/cjs/liquity/index.d.ts +2 -12
- package/cjs/liquityV2/index.d.ts +8 -23
- package/cjs/liquityV2/index.js +37 -19
- package/cjs/portfolio/index.d.ts +16 -8
- package/cjs/portfolio/index.js +458 -520
- package/cjs/portfolio/lendingProtocols.d.ts +184 -0
- package/cjs/portfolio/lendingProtocols.js +196 -0
- package/cjs/savings/index.d.ts +8 -2
- package/cjs/savings/index.js +33 -4
- package/cjs/types/aave.d.ts +98 -2
- package/cjs/types/aaveV4.d.ts +44 -0
- package/cjs/types/compound.d.ts +26 -2
- package/cjs/types/curveUsd.d.ts +9 -1
- package/cjs/types/fluid.d.ts +13 -0
- package/cjs/types/index.d.ts +1 -0
- package/cjs/types/index.js +1 -0
- package/cjs/types/liquity.d.ts +12 -0
- package/cjs/types/liquityV2.d.ts +24 -0
- package/cjs/types/llamaLend.d.ts +12 -1
- package/cjs/types/morphoBlue.d.ts +2 -0
- package/cjs/types/portfolio.d.ts +125 -5
- package/cjs/types/savings/index.d.ts +9 -1
- package/cjs/types/spark.d.ts +21 -1
- package/cjs/umbrella/index.d.ts +2 -3
- package/esm/aaveV3/index.d.ts +2 -12
- package/esm/aaveV3/sgho.d.ts +2 -16
- package/esm/aaveV4/lend.d.ts +2 -43
- package/esm/claiming/aaveV3.d.ts +2 -2
- package/esm/claiming/aaveV3.js +1 -1
- package/esm/claiming/ethena.d.ts +2 -1
- package/esm/claiming/king.d.ts +2 -1
- package/esm/claiming/spark.d.ts +2 -2
- package/esm/claiming/spark.js +1 -1
- package/esm/config/contracts.d.ts +4 -4
- package/esm/config/contracts.js +4 -4
- package/esm/fluid/index.d.ts +5 -49
- package/esm/liquity/index.d.ts +2 -12
- package/esm/liquityV2/index.d.ts +8 -23
- package/esm/liquityV2/index.js +35 -18
- package/esm/portfolio/index.d.ts +16 -8
- package/esm/portfolio/index.js +458 -522
- package/esm/portfolio/lendingProtocols.d.ts +184 -0
- package/esm/portfolio/lendingProtocols.js +189 -0
- package/esm/savings/index.d.ts +8 -2
- package/esm/savings/index.js +31 -3
- package/esm/types/aave.d.ts +98 -2
- package/esm/types/aaveV4.d.ts +44 -0
- package/esm/types/compound.d.ts +26 -2
- package/esm/types/curveUsd.d.ts +9 -1
- package/esm/types/fluid.d.ts +13 -0
- package/esm/types/index.d.ts +1 -0
- package/esm/types/index.js +1 -0
- package/esm/types/liquity.d.ts +12 -0
- package/esm/types/liquityV2.d.ts +24 -0
- package/esm/types/llamaLend.d.ts +12 -1
- package/esm/types/morphoBlue.d.ts +2 -0
- package/esm/types/portfolio.d.ts +125 -5
- package/esm/types/savings/index.d.ts +9 -1
- package/esm/types/spark.d.ts +21 -1
- package/esm/umbrella/index.d.ts +2 -3
- package/package.json +1 -1
- package/src/aaveV3/index.ts +2 -1
- package/src/aaveV3/sgho.ts +2 -17
- package/src/aaveV4/lend.ts +2 -48
- package/src/claiming/aaveV3.ts +4 -2
- package/src/claiming/ethena.ts +5 -5
- package/src/claiming/king.ts +3 -3
- package/src/claiming/spark.ts +6 -4
- package/src/config/contracts.ts +4 -4
- package/src/fluid/index.ts +4 -3
- package/src/liquity/index.ts +2 -2
- package/src/liquityV2/index.ts +48 -22
- package/src/portfolio/index.ts +306 -331
- package/src/portfolio/lendingProtocols.ts +281 -0
- package/src/savings/index.ts +41 -4
- package/src/types/aave.ts +104 -1
- package/src/types/aaveV4.ts +49 -0
- package/src/types/compound.ts +38 -2
- package/src/types/curveUsd.ts +17 -1
- package/src/types/fluid.ts +14 -0
- package/src/types/index.ts +1 -0
- package/src/types/liquity.ts +13 -1
- package/src/types/liquityV2.ts +26 -1
- package/src/types/llamaLend.ts +19 -1
- package/src/types/morphoBlue.ts +3 -0
- package/src/types/portfolio.ts +151 -5
- package/src/types/savings/index.ts +12 -1
- package/src/types/spark.ts +25 -1
- package/src/umbrella/index.ts +2 -1
package/cjs/aaveV3/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Client } from 'viem';
|
|
2
|
-
import { AaveMarketInfo, AaveV3MarketData, AaveV3PositionData, AaveV3UsedAssets, EModeCategoryDataMapping } from '../types';
|
|
2
|
+
import { AaveMarketInfo, AaveV3MarketData, AaveV3PositionData, AaveV3UsedAssets, EModeCategoryDataMapping, StakeAaveData } from '../types';
|
|
3
3
|
import { Blockish, EthAddress, EthereumProvider, NetworkNumber, PositionBalances } from '../types/common';
|
|
4
4
|
import { getMeritCampaigns } from './merit';
|
|
5
5
|
import { getMerkleCampaigns } from './merkl';
|
|
@@ -76,17 +76,7 @@ export declare const getAaveV3AccountData: (provider: EthereumProvider, network:
|
|
|
76
76
|
export declare const getAaveV3FullPositionData: (provider: EthereumProvider, network: NetworkNumber, address: EthAddress, market: AaveMarketInfo) => Promise<AaveV3PositionData>;
|
|
77
77
|
export declare const REWARDABLE_ASSETS: readonly ["0x028171bCA77440897B824Ca71D1c56caC55b68A3", "0x6C3c78838c761c6Ac7bE9F59fe808ea2A6E4379d", "0xD37EE7e4f452C6638c96536e68090De8cBcdb583", "0x279AF5b99540c1A3A7E3CDd326e19659401eF99e", "0xBcca60bB61934080951369a648Fb03DF4F96263C", "0x619beb58998eD2278e08620f97007e1116D5D25b", "0x3Ed3B47Dd13EC9a98b44e6204A523E766B225811", "0x531842cEbbdD378f8ee36D171d6cC9C4fcf475Ec", "0x9ff58f4fFB29fA2266Ab25e75e2A8b3503311656", "0x9c39809Dec7F95F5e0713634a4D0701329B3b4d2", "0x030bA81f1c18d280636F32af80b9AAd02Cf0854e", "0xF63B34710400CAd3e044cFfDcAb00a0f32E33eCf", "0xa06bC25B5805d5F8d82847D191Cb4Af5A3e873E0", "0x0b8f12b1788BFdE65Aa1ca52E3e9F3Ba401be16D", "0x6C5024Cd4F8A59110119C56f8933403A539555EB", "0xdC6a3Ab17299D9C2A412B0e0a4C1f55446AE0817", "0x5165d24277cD063F5ac44Efd447B27025e888f37", "0x7EbD09022Be45AD993BAA1CEc61166Fcc8644d97", "0xF256CC7847E919FAc9B808cC216cAc87CCF2f47a", "0xfAFEDF95E21184E3d880bd56D4806c4b8d31c69A", "0xB9D7CB55f463405CDfBe4E90a6D2Df01C2B92BF1", "0x5BdB050A92CADcCfCDcCCBFC17204a1C9cC0Ab73", "0xc713e5E149D5D0715DcD1c156a020976e7E56B88", "0xba728eAd5e496BE00DCF66F650b6d7758eCB50f8", "0x101cc05f4A51C0319f570d5E146a8C625198e636", "0x01C0eb1f8c6F1C1bF74ae028697ce7AA2a8b0E92", "0xc9BC48c72154ef3e5425641a3c747242112a46AF", "0xB5385132EE8321977FfF44b60cDE9fE9AB0B4e6b", "0x272F97b7a56a387aE942350bBC7Df5700f8a4576", "0x13210D4Fe0d5402bd7Ecbc4B5bC5cFcA3b71adB0", "0x2e8f4bdbe3d47d7d7de490437aea9915d930f1a3", "0xfdb93b3b10936cf81fa59a02a7523b6e2149b2b7", "0xA361718326c15715591c299427c62086F69923D9", "0xbA429f7011c9fa04cDd46a2Da24dc0FF0aC6099c", "0xd4937682df3C8aEF4FE912A96A74121C0829E664", "0xfE8F19B17fFeF0fDbfe2671F248903055AFAA8Ca", "0x683923dB55Fead99A79Fa01A27EeC3cB19679cC3", "0xC2e10006AccAb7B45D9184FcF5b7EC7763f5BaAe", "0x8dAE6Cb04688C62d939ed9B68d32Bc62e49970b1", "0x00ad8eBF64F141f1C81e9f8f792d3d1631c6c684", "0x6F634c6135D2EBD550000ac92F494F9CB8183dAe", "0x4dDff5885a67E4EffeC55875a3977D7E60F82ae0"];
|
|
78
78
|
export declare const fetchYearlyMeritApyForStakingGho: () => Promise<string>;
|
|
79
|
-
export declare const getStakeAaveData: (provider: Client, network: NetworkNumber, address: EthAddress) => Promise<
|
|
80
|
-
activatedCooldown: string;
|
|
81
|
-
activatedCooldownAmount: string;
|
|
82
|
-
stkAaveRewardsBalance: string;
|
|
83
|
-
aaveRewardsBalance: string;
|
|
84
|
-
stkAaveBalance: string;
|
|
85
|
-
stkGhoBalance: string;
|
|
86
|
-
ghoMeritApy: string;
|
|
87
|
-
stkAaveApy: string;
|
|
88
|
-
sgho: import("./sgho").SghoData;
|
|
89
|
-
}>;
|
|
79
|
+
export declare const getStakeAaveData: (provider: Client, network: NetworkNumber, address: EthAddress) => Promise<StakeAaveData>;
|
|
90
80
|
export { getMeritCampaigns, getMerkleCampaigns, };
|
|
91
81
|
export { getSghoData } from './sgho';
|
|
92
82
|
export type { SghoData, SghoUserData } from './sgho';
|
package/cjs/aaveV3/sgho.d.ts
CHANGED
|
@@ -1,18 +1,4 @@
|
|
|
1
1
|
import { EthAddress, NetworkNumber } from '../types/common';
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
balance: string;
|
|
5
|
-
maxDeposit: string;
|
|
6
|
-
maxWithdraw: string;
|
|
7
|
-
underlyingBalance: string;
|
|
8
|
-
}
|
|
9
|
-
export interface SghoData {
|
|
10
|
-
totalAssets: string;
|
|
11
|
-
totalSupply: string;
|
|
12
|
-
supplyCap: string;
|
|
13
|
-
/** Target savings rate as an APY percent (e.g. "4.25" for 4.25%). */
|
|
14
|
-
targetRate: string;
|
|
15
|
-
paused: boolean;
|
|
16
|
-
user: SghoUserData;
|
|
17
|
-
}
|
|
2
|
+
import { SghoData } from '../types/aave';
|
|
3
|
+
export type { SghoData, SghoUserData } from '../types/aave';
|
|
18
4
|
export declare const getSghoData: (network: NetworkNumber, address?: EthAddress) => Promise<SghoData>;
|
package/cjs/aaveV4/lend.d.ts
CHANGED
|
@@ -1,53 +1,12 @@
|
|
|
1
1
|
import { EthAddress, EthereumProvider, NetworkNumber } from '../types/common';
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
assetId: string;
|
|
5
|
-
decimals: number;
|
|
6
|
-
spoke: EthAddress;
|
|
7
|
-
spokeActive: boolean;
|
|
8
|
-
spokeHalted: boolean;
|
|
9
|
-
spokeDepositCap: string;
|
|
10
|
-
spokeTotalAssets: string;
|
|
11
|
-
spokeTotalShares: string;
|
|
12
|
-
hub: EthAddress;
|
|
13
|
-
hubLiquidity: string;
|
|
14
|
-
hubDrawnRate: string;
|
|
15
|
-
convertToShares: string;
|
|
16
|
-
convertToAssets: string;
|
|
17
|
-
user: EthAddress;
|
|
18
|
-
userSuppliedAssets: string;
|
|
19
|
-
userSuppliedShares: string;
|
|
20
|
-
}
|
|
2
|
+
import { AaveV4TokenizationSpokeDataParsed } from '../types/aaveV4';
|
|
3
|
+
export type { AaveV4TokenizationSpokeData, AaveV4TokenizationSpokeDataParsed } from '../types/aaveV4';
|
|
21
4
|
export declare const AAVE_V4_TOKENIZED_SPOKES: Record<string, EthAddress>;
|
|
22
5
|
export declare const AAVE_V4_TOKENIZED_SPOKE_ADDRESSES: Partial<Record<NetworkNumber, EthAddress[]>>;
|
|
23
6
|
export type AaveV4TokenizedHubKey = 'CORE' | 'PLUS' | 'PRIME' | 'PAXOS';
|
|
24
7
|
export declare const aaveV4GetTokenizedHubKey: (hubNameOrKey?: string | null) => AaveV4TokenizedHubKey | null;
|
|
25
8
|
export declare const aaveV4GetTokenizedVaultKey: (symbol: string, hubNameOrKey?: string | null) => string | null;
|
|
26
9
|
export declare const aaveV4GetTokenizedVaultAddress: (network: NetworkNumber, symbol: string, hubNameOrKey?: string | null) => EthAddress | undefined;
|
|
27
|
-
/** Parsed tokenization spoke data with human-readable supplied amounts for display */
|
|
28
|
-
export interface AaveV4TokenizationSpokeDataParsed {
|
|
29
|
-
vaultAddress: EthAddress;
|
|
30
|
-
key: string | null;
|
|
31
|
-
symbol: string;
|
|
32
|
-
hubKey: string;
|
|
33
|
-
spokeActive: boolean;
|
|
34
|
-
spokeHalted: boolean;
|
|
35
|
-
/** Deposit cap in asset units (wei string) */
|
|
36
|
-
spokeDepositCap: string;
|
|
37
|
-
/** Total assets currently in spoke in asset units (wei string) */
|
|
38
|
-
spokeTotalAssets: string;
|
|
39
|
-
/** Available hub liquidity in asset units (wei string) */
|
|
40
|
-
hubLiquidity: string;
|
|
41
|
-
/** The conversion rate from assets to shares expressed in asset units. */
|
|
42
|
-
convertToShares: string;
|
|
43
|
-
userSuppliedAssetsEth: string;
|
|
44
|
-
userSuppliedSharesEth: string;
|
|
45
|
-
userSuppliedAssets: string;
|
|
46
|
-
userSuppliedShares: string;
|
|
47
|
-
underlyingAsset: EthAddress;
|
|
48
|
-
spoke: EthAddress;
|
|
49
|
-
decimals: number;
|
|
50
|
-
}
|
|
51
10
|
/**
|
|
52
11
|
* Fetches tokenization vault data for the given user via getTokenizationSpokesData.
|
|
53
12
|
* Returns parsed data including userSuppliedAssets in human-readable form for each vault.
|
package/cjs/claiming/aaveV3.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Client } from 'viem';
|
|
2
2
|
import { EthAddress, NetworkNumber } from '../types';
|
|
3
|
-
import { ClaimableToken, MerklRewardsClaimableToken } from '../types/claiming';
|
|
4
|
-
export declare function getUnclaimedRewardsForAllMarkets(provider: Client, network: NetworkNumber, walletAddress: EthAddress, marketAddress: EthAddress): Promise<
|
|
3
|
+
import { AaveRewardsClaimableToken, ClaimableToken, MerklRewardsClaimableToken } from '../types/claiming';
|
|
4
|
+
export declare function getUnclaimedRewardsForAllMarkets(provider: Client, network: NetworkNumber, walletAddress: EthAddress, marketAddress: EthAddress): Promise<AaveRewardsClaimableToken[]>;
|
|
5
5
|
export declare function getMerklUnclaimedRewards(account: EthAddress, network: NetworkNumber): Promise<MerklRewardsClaimableToken[]>;
|
|
6
6
|
export declare function getMeritUnclaimedRewards(account: EthAddress, network: NetworkNumber): Promise<ClaimableToken[]>;
|
package/cjs/claiming/ethena.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
1
|
import { EthAddress } from '../types/common';
|
|
2
|
+
import { EthenaAirdropClaimableToken } from '../types/claiming';
|
|
2
3
|
export declare const fetchEthenaAirdropReward: (address: EthAddress) => Promise<any>;
|
|
3
|
-
export declare const fetchEthenaAirdropRewards: (walletAddresses: EthAddress[]) => Promise<Record<string,
|
|
4
|
+
export declare const fetchEthenaAirdropRewards: (walletAddresses: EthAddress[]) => Promise<Record<string, EthenaAirdropClaimableToken[]>>;
|
package/cjs/claiming/king.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { Client } from 'viem';
|
|
2
2
|
import { EthAddress, NetworkNumber } from '../types/common';
|
|
3
|
+
import { KingRewardsClaimableToken } from '../types/claiming';
|
|
3
4
|
export declare const fetchKingRewards: (walletAddress: EthAddress) => Promise<any>;
|
|
4
|
-
export declare const getKingRewards: (provider: Client, network: NetworkNumber, walletAddresses: EthAddress[]) => Promise<Record<string,
|
|
5
|
+
export declare const getKingRewards: (provider: Client, network: NetworkNumber, walletAddresses: EthAddress[]) => Promise<Record<string, KingRewardsClaimableToken[]>>;
|
package/cjs/claiming/spark.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Client } from 'viem';
|
|
2
2
|
import { EthAddress, NetworkNumber } from '../types/common';
|
|
3
|
-
import { SparkRewardsClaimableToken } from '../types/claiming';
|
|
3
|
+
import { SparkAirdropClaimableToken, SparkRewardsClaimableToken } from '../types/claiming';
|
|
4
4
|
export declare const fetchSpkAirdropRewards: (walletAddress: EthAddress) => Promise<any>;
|
|
5
|
-
export declare const fetchSparkAirdropRewards: (provider: Client, network: NetworkNumber, walletAddresses: EthAddress[]) => Promise<Record<string,
|
|
5
|
+
export declare const fetchSparkAirdropRewards: (provider: Client, network: NetworkNumber, walletAddresses: EthAddress[]) => Promise<Record<string, SparkAirdropClaimableToken[]>>;
|
|
6
6
|
export declare const fetchSparkRewards: (provider: Client, network: NetworkNumber, walletAddress: EthAddress, marketAddress: EthAddress) => Promise<SparkRewardsClaimableToken[]>;
|
|
@@ -97839,16 +97839,16 @@ export declare const FluidView: {
|
|
|
97839
97839
|
}];
|
|
97840
97840
|
readonly networks: {
|
|
97841
97841
|
readonly "1": {
|
|
97842
|
-
readonly address: "
|
|
97842
|
+
readonly address: "0xDd71a9cd4902a0BA417e609b986FA6A96D465C57";
|
|
97843
97843
|
};
|
|
97844
97844
|
readonly "8453": {
|
|
97845
|
-
readonly address: "
|
|
97845
|
+
readonly address: "0x533C19808a1612c411fe8C1B5CBbee44bE1921B9";
|
|
97846
97846
|
};
|
|
97847
97847
|
readonly "9745": {
|
|
97848
|
-
readonly address: "
|
|
97848
|
+
readonly address: "0xBd2d2d4718C24B8D35168480553b1F5a11f9884b";
|
|
97849
97849
|
};
|
|
97850
97850
|
readonly "42161": {
|
|
97851
|
-
readonly address: "
|
|
97851
|
+
readonly address: "0xc63b7847202324E3F3746A2f1E275598e33D5404";
|
|
97852
97852
|
};
|
|
97853
97853
|
};
|
|
97854
97854
|
};
|
package/cjs/config/contracts.js
CHANGED
|
@@ -1223,10 +1223,10 @@ exports.LiquityV2StabilityPool = {
|
|
|
1223
1223
|
exports.FluidView = {
|
|
1224
1224
|
"abi": [{ "inputs": [{ "internalType": "address", "name": "_user", "type": "address" }], "name": "getAllUserEarnPositionsWithFTokens", "outputs": [{ "components": [{ "internalType": "uint256", "name": "fTokenShares", "type": "uint256" }, { "internalType": "uint256", "name": "underlyingAssets", "type": "uint256" }, { "internalType": "uint256", "name": "underlyingBalance", "type": "uint256" }, { "internalType": "uint256", "name": "allowance", "type": "uint256" }], "internalType": "struct FluidView.UserEarnPosition[]", "name": "userPositions", "type": "tuple[]" }, { "components": [{ "internalType": "address", "name": "tokenAddress", "type": "address" }, { "internalType": "bool", "name": "isNativeUnderlying", "type": "bool" }, { "internalType": "string", "name": "name", "type": "string" }, { "internalType": "string", "name": "symbol", "type": "string" }, { "internalType": "uint256", "name": "decimals", "type": "uint256" }, { "internalType": "address", "name": "asset", "type": "address" }, { "internalType": "uint256", "name": "totalAssets", "type": "uint256" }, { "internalType": "uint256", "name": "totalSupply", "type": "uint256" }, { "internalType": "uint256", "name": "convertToShares", "type": "uint256" }, { "internalType": "uint256", "name": "convertToAssets", "type": "uint256" }, { "internalType": "uint256", "name": "rewardsRate", "type": "uint256" }, { "internalType": "uint256", "name": "supplyRate", "type": "uint256" }, { "internalType": "uint256", "name": "withdrawable", "type": "uint256" }, { "internalType": "bool", "name": "modeWithInterest", "type": "bool" }, { "internalType": "uint256", "name": "expandPercent", "type": "uint256" }, { "internalType": "uint256", "name": "expandDuration", "type": "uint256" }], "internalType": "struct FluidView.FTokenData[]", "name": "fTokensData", "type": "tuple[]" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "_fToken", "type": "address" }], "name": "getFTokenData", "outputs": [{ "components": [{ "internalType": "address", "name": "tokenAddress", "type": "address" }, { "internalType": "bool", "name": "isNativeUnderlying", "type": "bool" }, { "internalType": "string", "name": "name", "type": "string" }, { "internalType": "string", "name": "symbol", "type": "string" }, { "internalType": "uint256", "name": "decimals", "type": "uint256" }, { "internalType": "address", "name": "asset", "type": "address" }, { "internalType": "uint256", "name": "totalAssets", "type": "uint256" }, { "internalType": "uint256", "name": "totalSupply", "type": "uint256" }, { "internalType": "uint256", "name": "convertToShares", "type": "uint256" }, { "internalType": "uint256", "name": "convertToAssets", "type": "uint256" }, { "internalType": "uint256", "name": "rewardsRate", "type": "uint256" }, { "internalType": "uint256", "name": "supplyRate", "type": "uint256" }, { "internalType": "uint256", "name": "withdrawable", "type": "uint256" }, { "internalType": "bool", "name": "modeWithInterest", "type": "bool" }, { "internalType": "uint256", "name": "expandPercent", "type": "uint256" }, { "internalType": "uint256", "name": "expandDuration", "type": "uint256" }], "internalType": "struct FluidView.FTokenData", "name": "fTokenData", "type": "tuple" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "uint256", "name": "_nftId", "type": "uint256" }], "name": "getPositionByNftId", "outputs": [{ "components": [{ "internalType": "uint256", "name": "nftId", "type": "uint256" }, { "internalType": "address", "name": "owner", "type": "address" }, { "internalType": "bool", "name": "isLiquidated", "type": "bool" }, { "internalType": "bool", "name": "isSupplyPosition", "type": "bool" }, { "internalType": "uint256", "name": "supply", "type": "uint256" }, { "internalType": "uint256", "name": "borrow", "type": "uint256" }, { "internalType": "uint256", "name": "ratio", "type": "uint256" }, { "internalType": "int256", "name": "tick", "type": "int256" }, { "internalType": "uint256", "name": "tickId", "type": "uint256" }], "internalType": "struct FluidView.UserPosition", "name": "position", "type": "tuple" }, { "components": [{ "internalType": "address", "name": "vault", "type": "address" }, { "internalType": "uint256", "name": "vaultId", "type": "uint256" }, { "internalType": "uint256", "name": "vaultType", "type": "uint256" }, { "internalType": "bool", "name": "isSmartColl", "type": "bool" }, { "internalType": "bool", "name": "isSmartDebt", "type": "bool" }, { "internalType": "address", "name": "supplyToken0", "type": "address" }, { "internalType": "address", "name": "supplyToken1", "type": "address" }, { "internalType": "address", "name": "borrowToken0", "type": "address" }, { "internalType": "address", "name": "borrowToken1", "type": "address" }, { "internalType": "uint256", "name": "supplyToken0Decimals", "type": "uint256" }, { "internalType": "uint256", "name": "supplyToken1Decimals", "type": "uint256" }, { "internalType": "uint256", "name": "borrowToken0Decimals", "type": "uint256" }, { "internalType": "uint256", "name": "borrowToken1Decimals", "type": "uint256" }, { "internalType": "uint16", "name": "collateralFactor", "type": "uint16" }, { "internalType": "uint16", "name": "liquidationThreshold", "type": "uint16" }, { "internalType": "uint16", "name": "liquidationMaxLimit", "type": "uint16" }, { "internalType": "uint16", "name": "withdrawalGap", "type": "uint16" }, { "internalType": "uint16", "name": "liquidationPenalty", "type": "uint16" }, { "internalType": "uint16", "name": "borrowFee", "type": "uint16" }, { "internalType": "address", "name": "oracle", "type": "address" }, { "internalType": "uint256", "name": "oraclePriceOperate", "type": "uint256" }, { "internalType": "uint256", "name": "oraclePriceLiquidate", "type": "uint256" }, { "internalType": "uint256", "name": "vaultSupplyExchangePrice", "type": "uint256" }, { "internalType": "uint256", "name": "vaultBorrowExchangePrice", "type": "uint256" }, { "internalType": "int256", "name": "supplyRateVault", "type": "int256" }, { "internalType": "int256", "name": "borrowRateVault", "type": "int256" }, { "internalType": "int256", "name": "rewardsOrFeeRateSupply", "type": "int256" }, { "internalType": "int256", "name": "rewardsOrFeeRateBorrow", "type": "int256" }, { "internalType": "uint256", "name": "totalPositions", "type": "uint256" }, { "internalType": "uint256", "name": "totalSupplyVault", "type": "uint256" }, { "internalType": "uint256", "name": "totalBorrowVault", "type": "uint256" }, { "internalType": "uint256", "name": "withdrawalLimit", "type": "uint256" }, { "internalType": "uint256", "name": "withdrawableUntilLimit", "type": "uint256" }, { "internalType": "uint256", "name": "withdrawable", "type": "uint256" }, { "internalType": "uint256", "name": "baseWithdrawalLimit", "type": "uint256" }, { "internalType": "uint256", "name": "withdrawExpandPercent", "type": "uint256" }, { "internalType": "uint256", "name": "withdrawExpandDuration", "type": "uint256" }, { "internalType": "uint256", "name": "borrowLimit", "type": "uint256" }, { "internalType": "uint256", "name": "borrowableUntilLimit", "type": "uint256" }, { "internalType": "uint256", "name": "borrowable", "type": "uint256" }, { "internalType": "uint256", "name": "borrowLimitUtilization", "type": "uint256" }, { "internalType": "uint256", "name": "maxBorrowLimit", "type": "uint256" }, { "internalType": "uint256", "name": "borrowExpandPercent", "type": "uint256" }, { "internalType": "uint256", "name": "borrowExpandDuration", "type": "uint256" }, { "internalType": "uint256", "name": "baseBorrowLimit", "type": "uint256" }, { "internalType": "uint256", "name": "minimumBorrowing", "type": "uint256" }, { "components": [{ "internalType": "address", "name": "dexPool", "type": "address" }, { "internalType": "uint256", "name": "dexId", "type": "uint256" }, { "internalType": "uint256", "name": "fee", "type": "uint256" }, { "internalType": "uint256", "name": "lastStoredPrice", "type": "uint256" }, { "internalType": "uint256", "name": "centerPrice", "type": "uint256" }, { "internalType": "uint256", "name": "token0Utilization", "type": "uint256" }, { "internalType": "uint256", "name": "token1Utilization", "type": "uint256" }, { "internalType": "uint256", "name": "totalSupplyShares", "type": "uint256" }, { "internalType": "uint256", "name": "maxSupplyShares", "type": "uint256" }, { "internalType": "uint256", "name": "token0Supplied", "type": "uint256" }, { "internalType": "uint256", "name": "token1Supplied", "type": "uint256" }, { "internalType": "uint256", "name": "sharesWithdrawable", "type": "uint256" }, { "internalType": "uint256", "name": "token0Withdrawable", "type": "uint256" }, { "internalType": "uint256", "name": "token1Withdrawable", "type": "uint256" }, { "internalType": "uint256", "name": "token0PerSupplyShare", "type": "uint256" }, { "internalType": "uint256", "name": "token1PerSupplyShare", "type": "uint256" }, { "internalType": "uint256", "name": "token0SupplyRate", "type": "uint256" }, { "internalType": "uint256", "name": "token1SupplyRate", "type": "uint256" }, { "internalType": "address", "name": "quoteToken", "type": "address" }, { "internalType": "uint256", "name": "quoteTokensPerShare", "type": "uint256" }, { "internalType": "uint256", "name": "supplyToken0Reserves", "type": "uint256" }, { "internalType": "uint256", "name": "supplyToken1Reserves", "type": "uint256" }], "internalType": "struct FluidView.DexSupplyData", "name": "dexSupplyData", "type": "tuple" }, { "components": [{ "internalType": "address", "name": "dexPool", "type": "address" }, { "internalType": "uint256", "name": "dexId", "type": "uint256" }, { "internalType": "uint256", "name": "fee", "type": "uint256" }, { "internalType": "uint256", "name": "lastStoredPrice", "type": "uint256" }, { "internalType": "uint256", "name": "centerPrice", "type": "uint256" }, { "internalType": "uint256", "name": "token0Utilization", "type": "uint256" }, { "internalType": "uint256", "name": "token1Utilization", "type": "uint256" }, { "internalType": "uint256", "name": "totalBorrowShares", "type": "uint256" }, { "internalType": "uint256", "name": "maxBorrowShares", "type": "uint256" }, { "internalType": "uint256", "name": "token0Borrowed", "type": "uint256" }, { "internalType": "uint256", "name": "token1Borrowed", "type": "uint256" }, { "internalType": "uint256", "name": "sharesBorrowable", "type": "uint256" }, { "internalType": "uint256", "name": "token0Borrowable", "type": "uint256" }, { "internalType": "uint256", "name": "token1Borrowable", "type": "uint256" }, { "internalType": "uint256", "name": "token0PerBorrowShare", "type": "uint256" }, { "internalType": "uint256", "name": "token1PerBorrowShare", "type": "uint256" }, { "internalType": "uint256", "name": "token0BorrowRate", "type": "uint256" }, { "internalType": "uint256", "name": "token1BorrowRate", "type": "uint256" }, { "internalType": "address", "name": "quoteToken", "type": "address" }, { "internalType": "uint256", "name": "quoteTokensPerShare", "type": "uint256" }, { "internalType": "uint256", "name": "borrowToken0Reserves", "type": "uint256" }, { "internalType": "uint256", "name": "borrowToken1Reserves", "type": "uint256" }], "internalType": "struct FluidView.DexBorrowData", "name": "dexBorrowData", "type": "tuple" }], "internalType": "struct FluidView.VaultData", "name": "vault", "type": "tuple" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "_fToken", "type": "address" }, { "internalType": "address", "name": "_user", "type": "address" }], "name": "getUserEarnPosition", "outputs": [{ "components": [{ "internalType": "uint256", "name": "fTokenShares", "type": "uint256" }, { "internalType": "uint256", "name": "underlyingAssets", "type": "uint256" }, { "internalType": "uint256", "name": "underlyingBalance", "type": "uint256" }, { "internalType": "uint256", "name": "allowance", "type": "uint256" }], "internalType": "struct FluidView.UserEarnPosition", "name": "", "type": "tuple" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "_fToken", "type": "address" }, { "internalType": "address", "name": "_user", "type": "address" }], "name": "getUserEarnPositionWithFToken", "outputs": [{ "components": [{ "internalType": "uint256", "name": "fTokenShares", "type": "uint256" }, { "internalType": "uint256", "name": "underlyingAssets", "type": "uint256" }, { "internalType": "uint256", "name": "underlyingBalance", "type": "uint256" }, { "internalType": "uint256", "name": "allowance", "type": "uint256" }], "internalType": "struct FluidView.UserEarnPosition", "name": "userPosition", "type": "tuple" }, { "components": [{ "internalType": "address", "name": "tokenAddress", "type": "address" }, { "internalType": "bool", "name": "isNativeUnderlying", "type": "bool" }, { "internalType": "string", "name": "name", "type": "string" }, { "internalType": "string", "name": "symbol", "type": "string" }, { "internalType": "uint256", "name": "decimals", "type": "uint256" }, { "internalType": "address", "name": "asset", "type": "address" }, { "internalType": "uint256", "name": "totalAssets", "type": "uint256" }, { "internalType": "uint256", "name": "totalSupply", "type": "uint256" }, { "internalType": "uint256", "name": "convertToShares", "type": "uint256" }, { "internalType": "uint256", "name": "convertToAssets", "type": "uint256" }, { "internalType": "uint256", "name": "rewardsRate", "type": "uint256" }, { "internalType": "uint256", "name": "supplyRate", "type": "uint256" }, { "internalType": "uint256", "name": "withdrawable", "type": "uint256" }, { "internalType": "bool", "name": "modeWithInterest", "type": "bool" }, { "internalType": "uint256", "name": "expandPercent", "type": "uint256" }, { "internalType": "uint256", "name": "expandDuration", "type": "uint256" }], "internalType": "struct FluidView.FTokenData", "name": "fTokenData", "type": "tuple" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "_user", "type": "address" }], "name": "getUserNftIds", "outputs": [{ "internalType": "uint256[]", "name": "", "type": "uint256[]" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "_user", "type": "address" }], "name": "getUserPositions", "outputs": [{ "components": [{ "internalType": "uint256", "name": "nftId", "type": "uint256" }, { "internalType": "address", "name": "owner", "type": "address" }, { "internalType": "bool", "name": "isLiquidated", "type": "bool" }, { "internalType": "bool", "name": "isSupplyPosition", "type": "bool" }, { "internalType": "uint256", "name": "supply", "type": "uint256" }, { "internalType": "uint256", "name": "borrow", "type": "uint256" }, { "internalType": "uint256", "name": "ratio", "type": "uint256" }, { "internalType": "int256", "name": "tick", "type": "int256" }, { "internalType": "uint256", "name": "tickId", "type": "uint256" }], "internalType": "struct FluidView.UserPosition[]", "name": "positions", "type": "tuple[]" }, { "components": [{ "internalType": "address", "name": "vault", "type": "address" }, { "internalType": "uint256", "name": "vaultId", "type": "uint256" }, { "internalType": "uint256", "name": "vaultType", "type": "uint256" }, { "internalType": "bool", "name": "isSmartColl", "type": "bool" }, { "internalType": "bool", "name": "isSmartDebt", "type": "bool" }, { "internalType": "address", "name": "supplyToken0", "type": "address" }, { "internalType": "address", "name": "supplyToken1", "type": "address" }, { "internalType": "address", "name": "borrowToken0", "type": "address" }, { "internalType": "address", "name": "borrowToken1", "type": "address" }, { "internalType": "uint256", "name": "supplyToken0Decimals", "type": "uint256" }, { "internalType": "uint256", "name": "supplyToken1Decimals", "type": "uint256" }, { "internalType": "uint256", "name": "borrowToken0Decimals", "type": "uint256" }, { "internalType": "uint256", "name": "borrowToken1Decimals", "type": "uint256" }, { "internalType": "uint16", "name": "collateralFactor", "type": "uint16" }, { "internalType": "uint16", "name": "liquidationThreshold", "type": "uint16" }, { "internalType": "uint16", "name": "liquidationMaxLimit", "type": "uint16" }, { "internalType": "uint16", "name": "withdrawalGap", "type": "uint16" }, { "internalType": "uint16", "name": "liquidationPenalty", "type": "uint16" }, { "internalType": "uint16", "name": "borrowFee", "type": "uint16" }, { "internalType": "address", "name": "oracle", "type": "address" }, { "internalType": "uint256", "name": "oraclePriceOperate", "type": "uint256" }, { "internalType": "uint256", "name": "oraclePriceLiquidate", "type": "uint256" }, { "internalType": "uint256", "name": "vaultSupplyExchangePrice", "type": "uint256" }, { "internalType": "uint256", "name": "vaultBorrowExchangePrice", "type": "uint256" }, { "internalType": "int256", "name": "supplyRateVault", "type": "int256" }, { "internalType": "int256", "name": "borrowRateVault", "type": "int256" }, { "internalType": "int256", "name": "rewardsOrFeeRateSupply", "type": "int256" }, { "internalType": "int256", "name": "rewardsOrFeeRateBorrow", "type": "int256" }, { "internalType": "uint256", "name": "totalPositions", "type": "uint256" }, { "internalType": "uint256", "name": "totalSupplyVault", "type": "uint256" }, { "internalType": "uint256", "name": "totalBorrowVault", "type": "uint256" }, { "internalType": "uint256", "name": "withdrawalLimit", "type": "uint256" }, { "internalType": "uint256", "name": "withdrawableUntilLimit", "type": "uint256" }, { "internalType": "uint256", "name": "withdrawable", "type": "uint256" }, { "internalType": "uint256", "name": "baseWithdrawalLimit", "type": "uint256" }, { "internalType": "uint256", "name": "withdrawExpandPercent", "type": "uint256" }, { "internalType": "uint256", "name": "withdrawExpandDuration", "type": "uint256" }, { "internalType": "uint256", "name": "borrowLimit", "type": "uint256" }, { "internalType": "uint256", "name": "borrowableUntilLimit", "type": "uint256" }, { "internalType": "uint256", "name": "borrowable", "type": "uint256" }, { "internalType": "uint256", "name": "borrowLimitUtilization", "type": "uint256" }, { "internalType": "uint256", "name": "maxBorrowLimit", "type": "uint256" }, { "internalType": "uint256", "name": "borrowExpandPercent", "type": "uint256" }, { "internalType": "uint256", "name": "borrowExpandDuration", "type": "uint256" }, { "internalType": "uint256", "name": "baseBorrowLimit", "type": "uint256" }, { "internalType": "uint256", "name": "minimumBorrowing", "type": "uint256" }, { "components": [{ "internalType": "address", "name": "dexPool", "type": "address" }, { "internalType": "uint256", "name": "dexId", "type": "uint256" }, { "internalType": "uint256", "name": "fee", "type": "uint256" }, { "internalType": "uint256", "name": "lastStoredPrice", "type": "uint256" }, { "internalType": "uint256", "name": "centerPrice", "type": "uint256" }, { "internalType": "uint256", "name": "token0Utilization", "type": "uint256" }, { "internalType": "uint256", "name": "token1Utilization", "type": "uint256" }, { "internalType": "uint256", "name": "totalSupplyShares", "type": "uint256" }, { "internalType": "uint256", "name": "maxSupplyShares", "type": "uint256" }, { "internalType": "uint256", "name": "token0Supplied", "type": "uint256" }, { "internalType": "uint256", "name": "token1Supplied", "type": "uint256" }, { "internalType": "uint256", "name": "sharesWithdrawable", "type": "uint256" }, { "internalType": "uint256", "name": "token0Withdrawable", "type": "uint256" }, { "internalType": "uint256", "name": "token1Withdrawable", "type": "uint256" }, { "internalType": "uint256", "name": "token0PerSupplyShare", "type": "uint256" }, { "internalType": "uint256", "name": "token1PerSupplyShare", "type": "uint256" }, { "internalType": "uint256", "name": "token0SupplyRate", "type": "uint256" }, { "internalType": "uint256", "name": "token1SupplyRate", "type": "uint256" }, { "internalType": "address", "name": "quoteToken", "type": "address" }, { "internalType": "uint256", "name": "quoteTokensPerShare", "type": "uint256" }, { "internalType": "uint256", "name": "supplyToken0Reserves", "type": "uint256" }, { "internalType": "uint256", "name": "supplyToken1Reserves", "type": "uint256" }], "internalType": "struct FluidView.DexSupplyData", "name": "dexSupplyData", "type": "tuple" }, { "components": [{ "internalType": "address", "name": "dexPool", "type": "address" }, { "internalType": "uint256", "name": "dexId", "type": "uint256" }, { "internalType": "uint256", "name": "fee", "type": "uint256" }, { "internalType": "uint256", "name": "lastStoredPrice", "type": "uint256" }, { "internalType": "uint256", "name": "centerPrice", "type": "uint256" }, { "internalType": "uint256", "name": "token0Utilization", "type": "uint256" }, { "internalType": "uint256", "name": "token1Utilization", "type": "uint256" }, { "internalType": "uint256", "name": "totalBorrowShares", "type": "uint256" }, { "internalType": "uint256", "name": "maxBorrowShares", "type": "uint256" }, { "internalType": "uint256", "name": "token0Borrowed", "type": "uint256" }, { "internalType": "uint256", "name": "token1Borrowed", "type": "uint256" }, { "internalType": "uint256", "name": "sharesBorrowable", "type": "uint256" }, { "internalType": "uint256", "name": "token0Borrowable", "type": "uint256" }, { "internalType": "uint256", "name": "token1Borrowable", "type": "uint256" }, { "internalType": "uint256", "name": "token0PerBorrowShare", "type": "uint256" }, { "internalType": "uint256", "name": "token1PerBorrowShare", "type": "uint256" }, { "internalType": "uint256", "name": "token0BorrowRate", "type": "uint256" }, { "internalType": "uint256", "name": "token1BorrowRate", "type": "uint256" }, { "internalType": "address", "name": "quoteToken", "type": "address" }, { "internalType": "uint256", "name": "quoteTokensPerShare", "type": "uint256" }, { "internalType": "uint256", "name": "borrowToken0Reserves", "type": "uint256" }, { "internalType": "uint256", "name": "borrowToken1Reserves", "type": "uint256" }], "internalType": "struct FluidView.DexBorrowData", "name": "dexBorrowData", "type": "tuple" }], "internalType": "struct FluidView.VaultData[]", "name": "vaults", "type": "tuple[]" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "_vault", "type": "address" }], "name": "getVaultData", "outputs": [{ "components": [{ "internalType": "address", "name": "vault", "type": "address" }, { "internalType": "uint256", "name": "vaultId", "type": "uint256" }, { "internalType": "uint256", "name": "vaultType", "type": "uint256" }, { "internalType": "bool", "name": "isSmartColl", "type": "bool" }, { "internalType": "bool", "name": "isSmartDebt", "type": "bool" }, { "internalType": "address", "name": "supplyToken0", "type": "address" }, { "internalType": "address", "name": "supplyToken1", "type": "address" }, { "internalType": "address", "name": "borrowToken0", "type": "address" }, { "internalType": "address", "name": "borrowToken1", "type": "address" }, { "internalType": "uint256", "name": "supplyToken0Decimals", "type": "uint256" }, { "internalType": "uint256", "name": "supplyToken1Decimals", "type": "uint256" }, { "internalType": "uint256", "name": "borrowToken0Decimals", "type": "uint256" }, { "internalType": "uint256", "name": "borrowToken1Decimals", "type": "uint256" }, { "internalType": "uint16", "name": "collateralFactor", "type": "uint16" }, { "internalType": "uint16", "name": "liquidationThreshold", "type": "uint16" }, { "internalType": "uint16", "name": "liquidationMaxLimit", "type": "uint16" }, { "internalType": "uint16", "name": "withdrawalGap", "type": "uint16" }, { "internalType": "uint16", "name": "liquidationPenalty", "type": "uint16" }, { "internalType": "uint16", "name": "borrowFee", "type": "uint16" }, { "internalType": "address", "name": "oracle", "type": "address" }, { "internalType": "uint256", "name": "oraclePriceOperate", "type": "uint256" }, { "internalType": "uint256", "name": "oraclePriceLiquidate", "type": "uint256" }, { "internalType": "uint256", "name": "vaultSupplyExchangePrice", "type": "uint256" }, { "internalType": "uint256", "name": "vaultBorrowExchangePrice", "type": "uint256" }, { "internalType": "int256", "name": "supplyRateVault", "type": "int256" }, { "internalType": "int256", "name": "borrowRateVault", "type": "int256" }, { "internalType": "int256", "name": "rewardsOrFeeRateSupply", "type": "int256" }, { "internalType": "int256", "name": "rewardsOrFeeRateBorrow", "type": "int256" }, { "internalType": "uint256", "name": "totalPositions", "type": "uint256" }, { "internalType": "uint256", "name": "totalSupplyVault", "type": "uint256" }, { "internalType": "uint256", "name": "totalBorrowVault", "type": "uint256" }, { "internalType": "uint256", "name": "withdrawalLimit", "type": "uint256" }, { "internalType": "uint256", "name": "withdrawableUntilLimit", "type": "uint256" }, { "internalType": "uint256", "name": "withdrawable", "type": "uint256" }, { "internalType": "uint256", "name": "baseWithdrawalLimit", "type": "uint256" }, { "internalType": "uint256", "name": "withdrawExpandPercent", "type": "uint256" }, { "internalType": "uint256", "name": "withdrawExpandDuration", "type": "uint256" }, { "internalType": "uint256", "name": "borrowLimit", "type": "uint256" }, { "internalType": "uint256", "name": "borrowableUntilLimit", "type": "uint256" }, { "internalType": "uint256", "name": "borrowable", "type": "uint256" }, { "internalType": "uint256", "name": "borrowLimitUtilization", "type": "uint256" }, { "internalType": "uint256", "name": "maxBorrowLimit", "type": "uint256" }, { "internalType": "uint256", "name": "borrowExpandPercent", "type": "uint256" }, { "internalType": "uint256", "name": "borrowExpandDuration", "type": "uint256" }, { "internalType": "uint256", "name": "baseBorrowLimit", "type": "uint256" }, { "internalType": "uint256", "name": "minimumBorrowing", "type": "uint256" }, { "components": [{ "internalType": "address", "name": "dexPool", "type": "address" }, { "internalType": "uint256", "name": "dexId", "type": "uint256" }, { "internalType": "uint256", "name": "fee", "type": "uint256" }, { "internalType": "uint256", "name": "lastStoredPrice", "type": "uint256" }, { "internalType": "uint256", "name": "centerPrice", "type": "uint256" }, { "internalType": "uint256", "name": "token0Utilization", "type": "uint256" }, { "internalType": "uint256", "name": "token1Utilization", "type": "uint256" }, { "internalType": "uint256", "name": "totalSupplyShares", "type": "uint256" }, { "internalType": "uint256", "name": "maxSupplyShares", "type": "uint256" }, { "internalType": "uint256", "name": "token0Supplied", "type": "uint256" }, { "internalType": "uint256", "name": "token1Supplied", "type": "uint256" }, { "internalType": "uint256", "name": "sharesWithdrawable", "type": "uint256" }, { "internalType": "uint256", "name": "token0Withdrawable", "type": "uint256" }, { "internalType": "uint256", "name": "token1Withdrawable", "type": "uint256" }, { "internalType": "uint256", "name": "token0PerSupplyShare", "type": "uint256" }, { "internalType": "uint256", "name": "token1PerSupplyShare", "type": "uint256" }, { "internalType": "uint256", "name": "token0SupplyRate", "type": "uint256" }, { "internalType": "uint256", "name": "token1SupplyRate", "type": "uint256" }, { "internalType": "address", "name": "quoteToken", "type": "address" }, { "internalType": "uint256", "name": "quoteTokensPerShare", "type": "uint256" }, { "internalType": "uint256", "name": "supplyToken0Reserves", "type": "uint256" }, { "internalType": "uint256", "name": "supplyToken1Reserves", "type": "uint256" }], "internalType": "struct FluidView.DexSupplyData", "name": "dexSupplyData", "type": "tuple" }, { "components": [{ "internalType": "address", "name": "dexPool", "type": "address" }, { "internalType": "uint256", "name": "dexId", "type": "uint256" }, { "internalType": "uint256", "name": "fee", "type": "uint256" }, { "internalType": "uint256", "name": "lastStoredPrice", "type": "uint256" }, { "internalType": "uint256", "name": "centerPrice", "type": "uint256" }, { "internalType": "uint256", "name": "token0Utilization", "type": "uint256" }, { "internalType": "uint256", "name": "token1Utilization", "type": "uint256" }, { "internalType": "uint256", "name": "totalBorrowShares", "type": "uint256" }, { "internalType": "uint256", "name": "maxBorrowShares", "type": "uint256" }, { "internalType": "uint256", "name": "token0Borrowed", "type": "uint256" }, { "internalType": "uint256", "name": "token1Borrowed", "type": "uint256" }, { "internalType": "uint256", "name": "sharesBorrowable", "type": "uint256" }, { "internalType": "uint256", "name": "token0Borrowable", "type": "uint256" }, { "internalType": "uint256", "name": "token1Borrowable", "type": "uint256" }, { "internalType": "uint256", "name": "token0PerBorrowShare", "type": "uint256" }, { "internalType": "uint256", "name": "token1PerBorrowShare", "type": "uint256" }, { "internalType": "uint256", "name": "token0BorrowRate", "type": "uint256" }, { "internalType": "uint256", "name": "token1BorrowRate", "type": "uint256" }, { "internalType": "address", "name": "quoteToken", "type": "address" }, { "internalType": "uint256", "name": "quoteTokensPerShare", "type": "uint256" }, { "internalType": "uint256", "name": "borrowToken0Reserves", "type": "uint256" }, { "internalType": "uint256", "name": "borrowToken1Reserves", "type": "uint256" }], "internalType": "struct FluidView.DexBorrowData", "name": "dexBorrowData", "type": "tuple" }], "internalType": "struct FluidView.VaultData", "name": "vaultData", "type": "tuple" }], "stateMutability": "view", "type": "function" }],
|
|
1225
1225
|
"networks": {
|
|
1226
|
-
"1": { "address": "
|
|
1227
|
-
"8453": { "address": "
|
|
1228
|
-
"9745": { "address": "
|
|
1229
|
-
"42161": { "address": "
|
|
1226
|
+
"1": { "address": "0xDd71a9cd4902a0BA417e609b986FA6A96D465C57" },
|
|
1227
|
+
"8453": { "address": "0x533C19808a1612c411fe8C1B5CBbee44bE1921B9" },
|
|
1228
|
+
"9745": { "address": "0xBd2d2d4718C24B8D35168480553b1F5a11f9884b" },
|
|
1229
|
+
"42161": { "address": "0xc63b7847202324E3F3746A2f1E275598e33D5404" }
|
|
1230
1230
|
}
|
|
1231
1231
|
};
|
|
1232
1232
|
exports.McdGetCdps = {
|
package/cjs/fluid/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Client, PublicClient } from 'viem';
|
|
2
2
|
import { EthAddress, EthereumProvider, NetworkNumber } from '../types/common';
|
|
3
|
-
import { FluidAssetsData, FluidMarketData, FluidMarketInfo, FluidUsedAssets, FluidVaultData, InnerFluidMarketData } from '../types';
|
|
3
|
+
import { FluidAssetsData, FluidEarnPositionData, FluidMarketData, FluidMarketInfo, FluidUsedAssets, FluidVaultData, InnerFluidMarketData } from '../types';
|
|
4
4
|
export { FluidMerklOpportunityType, buildFluidMerklRewardMap, getFluidMerklCampaigns, attachFluidMerklIncentives, } from './merkl';
|
|
5
5
|
export declare const EMPTY_USED_ASSET: {
|
|
6
6
|
isSupplied: boolean;
|
|
@@ -71,54 +71,10 @@ export declare const getFluidTokenData: (provider: EthereumProvider, network: Ne
|
|
|
71
71
|
depositRate: string;
|
|
72
72
|
withdrawRate: string;
|
|
73
73
|
}>;
|
|
74
|
-
export declare const _getFluidDepositData: (provider: Client, network: NetworkNumber, token: string, address: EthAddress) => Promise<
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
totalDeposited: string;
|
|
79
|
-
withdrawable: string;
|
|
80
|
-
apy: string;
|
|
81
|
-
depositRate: string;
|
|
82
|
-
withdrawRate: string;
|
|
83
|
-
deposited: string;
|
|
84
|
-
depositedShares: string;
|
|
85
|
-
}>;
|
|
86
|
-
export declare const getFluidDepositData: (provider: EthereumProvider, network: NetworkNumber, token: string, address: EthAddress) => Promise<{
|
|
87
|
-
fTokenAddress: string | undefined;
|
|
88
|
-
fTokenSymbol: string;
|
|
89
|
-
decimals: string;
|
|
90
|
-
totalDeposited: string;
|
|
91
|
-
withdrawable: string;
|
|
92
|
-
apy: string;
|
|
93
|
-
depositRate: string;
|
|
94
|
-
withdrawRate: string;
|
|
95
|
-
deposited: string;
|
|
96
|
-
depositedShares: string;
|
|
97
|
-
}>;
|
|
98
|
-
export declare const _getAllUserEarnPositionsWithFTokens: (provider: Client, network: NetworkNumber, user: EthAddress) => Promise<{
|
|
99
|
-
fTokenAddress: string | undefined;
|
|
100
|
-
fTokenSymbol: string;
|
|
101
|
-
decimals: string;
|
|
102
|
-
totalDeposited: string;
|
|
103
|
-
withdrawable: string;
|
|
104
|
-
apy: string;
|
|
105
|
-
depositRate: string;
|
|
106
|
-
withdrawRate: string;
|
|
107
|
-
deposited: string;
|
|
108
|
-
depositedShares: string;
|
|
109
|
-
}[]>;
|
|
110
|
-
export declare const getAllUserEarnPositionsWithFTokens: (provider: EthereumProvider, network: NetworkNumber, user: EthAddress) => Promise<{
|
|
111
|
-
fTokenAddress: string | undefined;
|
|
112
|
-
fTokenSymbol: string;
|
|
113
|
-
decimals: string;
|
|
114
|
-
totalDeposited: string;
|
|
115
|
-
withdrawable: string;
|
|
116
|
-
apy: string;
|
|
117
|
-
depositRate: string;
|
|
118
|
-
withdrawRate: string;
|
|
119
|
-
deposited: string;
|
|
120
|
-
depositedShares: string;
|
|
121
|
-
}[]>;
|
|
74
|
+
export declare const _getFluidDepositData: (provider: Client, network: NetworkNumber, token: string, address: EthAddress) => Promise<FluidEarnPositionData>;
|
|
75
|
+
export declare const getFluidDepositData: (provider: EthereumProvider, network: NetworkNumber, token: string, address: EthAddress) => Promise<FluidEarnPositionData>;
|
|
76
|
+
export declare const _getAllUserEarnPositionsWithFTokens: (provider: Client, network: NetworkNumber, user: EthAddress) => Promise<FluidEarnPositionData[]>;
|
|
77
|
+
export declare const getAllUserEarnPositionsWithFTokens: (provider: EthereumProvider, network: NetworkNumber, user: EthAddress) => Promise<FluidEarnPositionData[]>;
|
|
122
78
|
export declare const _getUserPositions: (provider: PublicClient, network: NetworkNumber, user: EthAddress) => Promise<{
|
|
123
79
|
marketData: FluidMarketData | undefined;
|
|
124
80
|
userData: {
|
package/cjs/liquity/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Client } from 'viem';
|
|
2
2
|
import { Blockish, EthAddress, EthereumProvider, NetworkNumber, PositionBalances } from '../types/common';
|
|
3
|
-
import { LiquityTroveInfo } from '../types';
|
|
3
|
+
import { LiquityStakingData, LiquityTroveInfo } from '../types';
|
|
4
4
|
export declare const LIQUITY_NORMAL_MODE_RATIO = 110;
|
|
5
5
|
export declare const LIQUITY_RECOVERY_MODE_RATIO = 150;
|
|
6
6
|
export declare const _getLiquityAccountBalances: (provider: Client, network: NetworkNumber, block: Blockish, addressMapping: boolean, address: EthAddress) => Promise<PositionBalances>;
|
|
@@ -8,14 +8,4 @@ export declare const getLiquityAccountBalances: (provider: EthereumProvider, net
|
|
|
8
8
|
export declare const getDebtInFront: (provider: EthereumProvider, address: EthAddress) => Promise<string>;
|
|
9
9
|
export declare const _getLiquityTroveInfo: (provider: Client, network: NetworkNumber, address: EthAddress) => Promise<LiquityTroveInfo>;
|
|
10
10
|
export declare const getLiquityTroveInfo: (provider: EthereumProvider, network: NetworkNumber, address: EthAddress) => Promise<LiquityTroveInfo>;
|
|
11
|
-
export declare const getLiquityStakingData: (provider: Client, network: NetworkNumber, address: EthAddress) => Promise<
|
|
12
|
-
totalLUSDDeposited: string;
|
|
13
|
-
totalLQTYStaked: string;
|
|
14
|
-
stakedLQTY: string;
|
|
15
|
-
stakedLUSDBalance: string;
|
|
16
|
-
rewardETH: string;
|
|
17
|
-
rewardLUSD: string;
|
|
18
|
-
stabilityRewardETH: string;
|
|
19
|
-
stabilityRewardLQTY: string;
|
|
20
|
-
showStakingBalances: boolean;
|
|
21
|
-
}>;
|
|
11
|
+
export declare const getLiquityStakingData: (provider: Client, network: NetworkNumber, address: EthAddress) => Promise<LiquityStakingData>;
|
package/cjs/liquityV2/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Client, PublicClient } from 'viem';
|
|
2
2
|
import { EthAddress, EthereumProvider, NetworkNumber } from '../types/common';
|
|
3
|
-
import { LiquityV2AssetsData, LiquityV2MarketData, LiquityV2MarketInfo, LiquityV2TroveData, LiquityV2Versions } from '../types';
|
|
3
|
+
import { LiquityV2AssetsData, LiquityV2MarketData, LiquityV2MarketInfo, LiquityV2SBoldYBoldData, LiquityV2StakingData, LiquityV2TroveData, LiquityV2Versions } from '../types';
|
|
4
4
|
export type SPYieldGainParameters = {
|
|
5
5
|
P: string;
|
|
6
6
|
aggWeightedDebtSum: string;
|
|
@@ -19,6 +19,11 @@ export declare const nftContractCreationBlockMapping: {
|
|
|
19
19
|
liquityv2wstethlegacy: number;
|
|
20
20
|
liquityv2rethlegacy: number;
|
|
21
21
|
};
|
|
22
|
+
/**
|
|
23
|
+
* The trove ids of several accounts in one market: the market's NFT transfers are read once for all of them, rather
|
|
24
|
+
* than once per account as _getLiquityV2UserTroveIds does.
|
|
25
|
+
*/
|
|
26
|
+
export declare const _getLiquityV2UsersTroveIds: (provider: PublicClient, network: NetworkNumber, selectedMarket: LiquityV2MarketInfo, troveNFTAddress: EthAddress, limitBlocksForEventFetching: boolean, accounts: EthAddress[]) => Promise<Record<EthAddress, string[]>>;
|
|
22
27
|
export declare const _getLiquityV2UserTroveIds: (provider: PublicClient, network: NetworkNumber, selectedMarket: LiquityV2MarketInfo, troveNFTAddress: EthAddress, limitBlocksForEventFetching: boolean, account: EthAddress) => Promise<{
|
|
23
28
|
troves: {
|
|
24
29
|
troveId: string;
|
|
@@ -52,25 +57,5 @@ export type sBoldYieldParameters = {
|
|
|
52
57
|
wsETH: string;
|
|
53
58
|
rETH: string;
|
|
54
59
|
};
|
|
55
|
-
export declare const getLiquityV2Staking: (provider: Client, network: NetworkNumber, market: LiquityV2Versions, user: EthAddress) => Promise<
|
|
56
|
-
|
|
57
|
-
stakedBOLDBalance: string;
|
|
58
|
-
stabilityRewardColl: string;
|
|
59
|
-
stabilityRewardYield: string;
|
|
60
|
-
showStakingBalances: boolean;
|
|
61
|
-
debtTokenBalance: string;
|
|
62
|
-
stabilityPoolApy: string;
|
|
63
|
-
}>;
|
|
64
|
-
export declare const getLiquitySAndYBold: (provider: Client, network: NetworkNumber, markets: any, user: EthAddress) => Promise<{
|
|
65
|
-
spApy: string;
|
|
66
|
-
yBoldApy: string;
|
|
67
|
-
totalBoldDepositedSBold: string;
|
|
68
|
-
boldRateSBold: string;
|
|
69
|
-
maxWithdrawSBold: string;
|
|
70
|
-
totalBoldDepositedYBold: string;
|
|
71
|
-
boldRateYBold: string;
|
|
72
|
-
maxWithdrawYBold: string;
|
|
73
|
-
sBoldBalance: string;
|
|
74
|
-
yBoldBalance: string;
|
|
75
|
-
stYBoldBalance: string;
|
|
76
|
-
}>;
|
|
60
|
+
export declare const getLiquityV2Staking: (provider: Client, network: NetworkNumber, market: LiquityV2Versions, user: EthAddress) => Promise<LiquityV2StakingData>;
|
|
61
|
+
export declare const getLiquitySAndYBold: (provider: Client, network: NetworkNumber, markets: any, user: EthAddress) => Promise<LiquityV2SBoldYBoldData>;
|
package/cjs/liquityV2/index.js
CHANGED
|
@@ -12,7 +12,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
12
12
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
13
13
|
};
|
|
14
14
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
-
exports.getLiquitySAndYBold = exports.getLiquityV2Staking = exports.getLiquityV2ClaimableCollateral = exports.getLiquityV2TroveData = exports._getLiquityV2TroveData = exports.getDebtInFrontForInterestRateLiquityV2 = exports.getDebtInFrontForInterestRateIncludingNewDebtLiquityV2 = exports.calculateDebtInFrontLiquityV2 = exports.getLiquityV2UserTroveIds = exports._getLiquityV2UserTroveIds = exports.nftContractCreationBlockMapping = exports.getLiquityV2MarketData = exports._getLiquityV2MarketData = void 0;
|
|
15
|
+
exports.getLiquitySAndYBold = exports.getLiquityV2Staking = exports.getLiquityV2ClaimableCollateral = exports.getLiquityV2TroveData = exports._getLiquityV2TroveData = exports.getDebtInFrontForInterestRateLiquityV2 = exports.getDebtInFrontForInterestRateIncludingNewDebtLiquityV2 = exports.calculateDebtInFrontLiquityV2 = exports.getLiquityV2UserTroveIds = exports._getLiquityV2UserTroveIds = exports._getLiquityV2UsersTroveIds = exports.nftContractCreationBlockMapping = exports.getLiquityV2MarketData = exports._getLiquityV2MarketData = void 0;
|
|
16
16
|
const decimal_js_1 = __importDefault(require("decimal.js"));
|
|
17
17
|
const memoizee_1 = __importDefault(require("memoizee"));
|
|
18
18
|
const tokens_1 = require("@defisaver/tokens");
|
|
@@ -130,36 +130,54 @@ exports.nftContractCreationBlockMapping = {
|
|
|
130
130
|
[types_1.LiquityV2Versions.LiquityV2WstEthLegacy]: 21686238,
|
|
131
131
|
[types_1.LiquityV2Versions.LiquityV2REthLegacy]: 21686257,
|
|
132
132
|
};
|
|
133
|
-
|
|
133
|
+
/** Every Transfer of a market's trove NFT since the contract was created (or, on a fork, in the last 1000 blocks). */
|
|
134
|
+
const getTroveTransfers = (provider, network, troveNFTAddress, limitBlocksForEventFetching, market) => __awaiter(void 0, void 0, void 0, function* () {
|
|
134
135
|
const nftContract = (0, contracts_1.createViemContractFromConfigFunc)('LiquityV2TroveNFT', troveNFTAddress)(provider, network);
|
|
135
136
|
const nftContractCreationBlock = exports.nftContractCreationBlockMapping[market];
|
|
136
137
|
const currentBlock = +(yield provider.getBlockNumber()).toString();
|
|
137
138
|
const _events = yield nftContract.getEvents.Transfer({}, { fromBlock: limitBlocksForEventFetching ? BigInt(currentBlock - 1000) : BigInt(nftContractCreationBlock) });
|
|
138
|
-
|
|
139
|
+
return _events.map((event) => ({
|
|
139
140
|
from: event.args.from, to: event.args.to, tokenId: event.args.tokenId.toString(), blockNumber: +(event.blockNumber.toString()),
|
|
140
141
|
}));
|
|
141
|
-
const userTransferredTroves = events.filter((event) => (0, utils_1.compareAddresses)(event.to, account));
|
|
142
|
-
// check if the last know transfer address is the user
|
|
143
|
-
userTransferredTroves.forEach((event, index) => {
|
|
144
|
-
const otherTransfers = events.filter((e) => event.blockNumber < e.blockNumber && e.tokenId === event.tokenId);
|
|
145
|
-
// @ts-ignore
|
|
146
|
-
userTransferredTroves[index].invalid = !!otherTransfers.length;
|
|
147
|
-
});
|
|
148
|
-
// @ts-ignore
|
|
149
|
-
return userTransferredTroves.filter((event) => !event.invalid).map((event) => ({ troveId: event.tokenId }));
|
|
150
142
|
});
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
143
|
+
/** The troves transferred to an account that it still holds: no later transfer of the same trove. */
|
|
144
|
+
const getAccountTransferredTroves = (events, account) => events
|
|
145
|
+
.filter((event) => (0, utils_1.compareAddresses)(event.to, account))
|
|
146
|
+
.filter((event) => !events.some((e) => event.blockNumber < e.blockNumber && e.tokenId === event.tokenId))
|
|
147
|
+
.map((event) => ({ troveId: event.tokenId }));
|
|
148
|
+
const getTransferredTroves = (provider, network, troveNFTAddress, limitBlocksForEventFetching, market, account) => __awaiter(void 0, void 0, void 0, function* () {
|
|
149
|
+
return (getAccountTransferredTroves(yield getTroveTransfers(provider, network, troveNFTAddress, limitBlocksForEventFetching, market), account));
|
|
150
|
+
});
|
|
151
|
+
/** The troves an account opened and still owns, then the ones transferred to it, each once. */
|
|
152
|
+
const mergeTroveIds = (userTroves, userTransferredTroves) => {
|
|
156
153
|
const troves = [...userTroves.map(({ troveId }) => ({ troveId })), ...userTransferredTroves];
|
|
157
154
|
const filteredTroves = troves.filter((value, index, self) => index === self.findIndex((t) => (t.troveId === value.troveId)));
|
|
158
155
|
const troveIds = filteredTroves.map((trove) => trove.troveId);
|
|
159
156
|
const troveIdsSet = new Set(troveIds);
|
|
160
157
|
const troveIdsArray = Array.from(troveIdsSet);
|
|
161
|
-
|
|
162
|
-
|
|
158
|
+
return troveIdsArray.map((troveId) => troves.find((trove) => trove.troveId === troveId));
|
|
159
|
+
};
|
|
160
|
+
/**
|
|
161
|
+
* The trove ids of several accounts in one market: the market's NFT transfers are read once for all of them, rather
|
|
162
|
+
* than once per account as _getLiquityV2UserTroveIds does.
|
|
163
|
+
*/
|
|
164
|
+
const _getLiquityV2UsersTroveIds = (provider, network, selectedMarket, troveNFTAddress, limitBlocksForEventFetching, accounts) => __awaiter(void 0, void 0, void 0, function* () {
|
|
165
|
+
const [userTroves, events] = yield Promise.all([
|
|
166
|
+
Promise.all(accounts.map((account) => getUserTroves(provider, network, selectedMarket.isLegacy, account, selectedMarket.marketAddress))),
|
|
167
|
+
getTroveTransfers(provider, network, troveNFTAddress, limitBlocksForEventFetching, selectedMarket.value),
|
|
168
|
+
]);
|
|
169
|
+
return Object.fromEntries(accounts.map((account, i) => [
|
|
170
|
+
account,
|
|
171
|
+
mergeTroveIds(userTroves[i].troves, getAccountTransferredTroves(events, account)).map(({ troveId }) => troveId),
|
|
172
|
+
]));
|
|
173
|
+
});
|
|
174
|
+
exports._getLiquityV2UsersTroveIds = _getLiquityV2UsersTroveIds;
|
|
175
|
+
const _getLiquityV2UserTroveIds = (provider, network, selectedMarket, troveNFTAddress, limitBlocksForEventFetching, account) => __awaiter(void 0, void 0, void 0, function* () {
|
|
176
|
+
const [{ troves: userTroves, nextFreeTroveIndex }, userTransferredTroves] = yield Promise.all([
|
|
177
|
+
getUserTroves(provider, network, selectedMarket.isLegacy, account, selectedMarket.marketAddress),
|
|
178
|
+
getTransferredTroves(provider, network, troveNFTAddress, limitBlocksForEventFetching, selectedMarket.value, account),
|
|
179
|
+
]);
|
|
180
|
+
return { troves: mergeTroveIds(userTroves, userTransferredTroves), nextFreeTroveIndex };
|
|
163
181
|
});
|
|
164
182
|
exports._getLiquityV2UserTroveIds = _getLiquityV2UserTroveIds;
|
|
165
183
|
const getLiquityV2UserTroveIds = (provider, network, selectedMarket, troveNFTAddress, limitBlocksForEventFetching, account) => __awaiter(void 0, void 0, void 0, function* () { return (0, exports._getLiquityV2UserTroveIds)((0, viem_1.getViemProvider)(provider, network), network, selectedMarket, troveNFTAddress, limitBlocksForEventFetching, account); });
|
package/cjs/portfolio/index.d.ts
CHANGED
|
@@ -1,14 +1,22 @@
|
|
|
1
1
|
import { EthAddress, EthereumProvider, NetworkNumber } from '../types/common';
|
|
2
|
-
import { PortfolioMarketsData, PortfolioPositionsData } from '../types';
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
2
|
+
import { PortfolioData, PortfolioDataOptions, PortfolioMarketsData, PortfolioMarketsResult, PortfolioPositionsData, PortfolioUserData, ShifterPortfolioMarketsData } from '../types';
|
|
3
|
+
/**
|
|
4
|
+
* Every market the portfolio reads on a network — the markets half of getPortfolioData, for a caller that keeps
|
|
5
|
+
* markets apart from what it reads per address (a cache shared by many addresses). A market that fails is left out
|
|
6
|
+
* of `markets` and named in `errors`.
|
|
7
|
+
*/
|
|
8
|
+
export declare function getPortfolioMarketsData(provider: EthereumProvider, network: NetworkNumber, defaultProvider: EthereumProvider, isSim?: boolean): Promise<PortfolioMarketsResult>;
|
|
9
|
+
/**
|
|
10
|
+
* What the portfolio reads per address — the other half of getPortfolioData — against `markets` from
|
|
11
|
+
* getPortfolioMarketsData. `markets` can be a promise: reads that do not need a market (Maker, Fluid, Liquity, staking,
|
|
12
|
+
* rewards) start at once, and each read on a market waits for it. A position on a market missing from `markets` is an
|
|
13
|
+
* entry with an error.
|
|
14
|
+
*/
|
|
15
|
+
export declare function getPortfolioUserData(provider: EthereumProvider, network: NetworkNumber, addresses: EthAddress[], markets: PortfolioMarketsData | Promise<PortfolioMarketsData>, isSim?: boolean, options?: PortfolioDataOptions): Promise<PortfolioUserData>;
|
|
16
|
+
export declare function getPortfolioData(provider: EthereumProvider, network: NetworkNumber, defaultProvider: EthereumProvider, addresses: EthAddress[], isSim?: boolean, options?: PortfolioDataOptions): Promise<PortfolioData>;
|
|
9
17
|
export declare function getShifterPortfolioData(provider: EthereumProvider, network: NetworkNumber, defaultProvider: EthereumProvider, addresses: EthAddress[], isSim?: boolean): Promise<{
|
|
10
18
|
positions: PortfolioPositionsData;
|
|
11
|
-
markets:
|
|
19
|
+
markets: ShifterPortfolioMarketsData;
|
|
12
20
|
}>;
|
|
13
21
|
export * from './discovery';
|
|
14
22
|
export { getWalletLendingSummaries } from './lendingSummaries';
|