@augustdigital/sdk 4.15.5-alpha.0 → 4.17.0-alpha.0
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/lib/abis/AddressResolver.d.ts +28 -40
- package/lib/abis/ChainlinkV3.d.ts +83 -109
- package/lib/abis/ERC20.d.ts +137 -191
- package/lib/abis/ERC20_Bytes32.d.ts +125 -178
- package/lib/abis/ERC4626.d.ts +341 -480
- package/lib/abis/ERC721.d.ts +213 -299
- package/lib/abis/FeeOracle.d.ts +112 -149
- package/lib/abis/LendingPool.d.ts +1293 -1702
- package/lib/abis/LendingPoolV2.d.ts +37 -42
- package/lib/abis/LendingPoolV3.d.ts +25 -29
- package/lib/abis/Loan.d.ts +768 -1007
- package/lib/abis/Multicall3.d.ts +30 -43
- package/lib/abis/PoolAdapter.d.ts +35 -46
- package/lib/abis/RewardDistributor.d.ts +33 -38
- package/lib/abis/SmartAccount.d.ts +16 -23
- package/lib/abis/TextResolver.d.ts +16 -23
- package/lib/abis/TokenizedVaultV2.d.ts +1292 -1684
- package/lib/abis/TokenizedVaultV2DepositWithPermit.d.ts +55 -62
- package/lib/abis/TokenizedVaultV2Receipt.d.ts +1463 -1934
- package/lib/abis/TokenizedVaultV2WhitelistedAssets.d.ts +250 -333
- package/lib/abis/UniversalResolverResolve.d.ts +69 -97
- package/lib/abis/UniversalSignatureValidator.d.ts +17 -23
- package/lib/abis/WrapperAdapter.d.ts +67 -89
- package/lib/adapters/evm/getters.d.ts +2 -8
- package/lib/adapters/evm/index.d.ts +15 -19
- package/lib/adapters/evm/utils.d.ts +2 -12
- package/lib/adapters/solana/constants.d.ts +17 -23
- package/lib/adapters/solana/getters.d.ts +1 -4
- package/lib/adapters/solana/idl/vault-idl.d.ts +279 -340
- package/lib/adapters/solana/index.d.ts +116 -212
- package/lib/adapters/solana/types.d.ts +50 -50
- package/lib/adapters/solana/utils.d.ts +78 -139
- package/lib/adapters/solana/vault.actions.d.ts +12 -37
- package/lib/adapters/sui/constants.d.ts +9 -9
- package/lib/adapters/sui/constants.js +8 -1
- package/lib/adapters/sui/constants.js.map +1 -1
- package/lib/adapters/sui/getters.d.ts +1 -3
- package/lib/adapters/sui/index.d.ts +21 -29
- package/lib/adapters/sui/transformer.d.ts +2 -6
- package/lib/adapters/sui/types.d.ts +56 -56
- package/lib/adapters/sui/utils.d.ts +1 -4
- package/lib/core/analytics/constants.d.ts +12 -0
- package/lib/core/analytics/constants.js +49 -0
- package/lib/core/analytics/constants.js.map +1 -0
- package/lib/core/analytics/index.d.ts +6 -0
- package/lib/core/analytics/index.js +31 -0
- package/lib/core/analytics/index.js.map +1 -0
- package/lib/core/analytics/instrumentation.d.ts +2 -0
- package/lib/core/analytics/instrumentation.js +150 -0
- package/lib/core/analytics/instrumentation.js.map +1 -0
- package/lib/core/analytics/metrics.d.ts +12 -0
- package/lib/core/analytics/metrics.js +133 -0
- package/lib/core/analytics/metrics.js.map +1 -0
- package/lib/core/analytics/sentry.d.ts +9 -0
- package/lib/core/analytics/sentry.js +166 -0
- package/lib/core/analytics/sentry.js.map +1 -0
- package/lib/core/analytics/types.d.ts +21 -0
- package/lib/core/analytics/types.js +3 -0
- package/lib/core/analytics/types.js.map +1 -0
- package/lib/core/analytics/user-identity.d.ts +8 -0
- package/lib/core/analytics/user-identity.js +82 -0
- package/lib/core/analytics/user-identity.js.map +1 -0
- package/lib/core/analytics/version.d.ts +1 -0
- package/lib/core/analytics/version.js +5 -0
- package/lib/core/analytics/version.js.map +1 -0
- package/lib/core/base.class.d.ts +25 -30
- package/lib/core/base.class.js +5 -1
- package/lib/core/base.class.js.map +1 -1
- package/lib/core/constants/adapters.d.ts +83 -111
- package/lib/core/constants/core.d.ts +69 -76
- package/lib/core/constants/vaults.d.ts +5 -63
- package/lib/core/constants/vaults.js +3 -3
- package/lib/core/constants/vaults.js.map +1 -1
- package/lib/core/constants/web3.d.ts +18 -19
- package/lib/core/fetcher.d.ts +17 -71
- package/lib/core/fetcher.js +20 -2
- package/lib/core/fetcher.js.map +1 -1
- package/lib/core/helpers/adapters.d.ts +2 -7
- package/lib/core/helpers/core.d.ts +8 -33
- package/lib/core/helpers/signer.d.ts +2 -6
- package/lib/core/helpers/vaults.d.ts +15 -38
- package/lib/core/helpers/web3.d.ts +19 -87
- package/lib/core/index.d.ts +1 -0
- package/lib/core/index.js +1 -0
- package/lib/core/index.js.map +1 -1
- package/lib/core/logger/index.d.ts +11 -11
- package/lib/core/logger/slack.d.ts +8 -9
- package/lib/index.d.ts +1 -61
- package/lib/main.d.ts +141 -158
- package/lib/main.js +3 -0
- package/lib/main.js.map +1 -1
- package/lib/modules/vaults/adapter.helpers.d.ts +38 -72
- package/lib/modules/vaults/fetcher.d.ts +69 -85
- package/lib/modules/vaults/getters.d.ts +100 -205
- package/lib/modules/vaults/index.d.ts +1 -6
- package/lib/modules/vaults/main.d.ts +131 -224
- package/lib/modules/vaults/main.js +8 -1
- package/lib/modules/vaults/main.js.map +1 -1
- package/lib/modules/vaults/read.actions.d.ts +2 -8
- package/lib/modules/vaults/utils.d.ts +19 -55
- package/lib/modules/vaults/write.actions.d.ts +14 -26
- package/lib/services/coingecko/fetcher.d.ts +1 -4
- package/lib/services/debank/fetcher.d.ts +1 -4
- package/lib/services/debank/utils.d.ts +27 -38
- package/lib/services/octavfi/fetcher.d.ts +1 -3
- package/lib/services/octavfi/types.d.ts +24 -24
- package/lib/services/octavfi/utils.d.ts +2 -6
- package/lib/services/subgraph/fetcher.d.ts +2 -12
- package/lib/services/subgraph/vaults.d.ts +9 -42
- package/lib/types/points.d.ts +26 -35
- package/lib/types/pools.d.ts +112 -149
- package/lib/types/staking.d.ts +25 -25
- package/lib/types/subgraph.d.ts +33 -33
- package/lib/types/vaults.d.ts +219 -232
- package/lib/types/web3.d.ts +9 -9
- package/lib/types/webserver.d.ts +448 -466
- package/package.json +16 -13
|
@@ -1,34 +1,22 @@
|
|
|
1
1
|
import { Signer, Wallet } from 'ethers';
|
|
2
2
|
import { IAddress } from '../../types';
|
|
3
3
|
export type IContractWriteOptions = {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
4
|
+
target: IAddress;
|
|
5
|
+
wallet: IAddress;
|
|
6
|
+
amount?: string | bigint | number;
|
|
7
|
+
wait?: boolean;
|
|
8
|
+
depositAsset?: IAddress;
|
|
9
|
+
chainId?: number;
|
|
10
|
+
poolName?: string;
|
|
11
|
+
isInstantRedeem?: boolean;
|
|
12
|
+
isDepositWithPermit?: boolean;
|
|
13
13
|
};
|
|
14
|
-
export declare function vaultApprove(
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
export declare function vaultDeposit(
|
|
19
|
-
signer: Signer | Wallet,
|
|
20
|
-
options: IContractWriteOptions,
|
|
21
|
-
): Promise<string>;
|
|
22
|
-
export declare function vaultRequestRedeem(
|
|
23
|
-
signer: Signer | Wallet,
|
|
24
|
-
options: IContractWriteOptions,
|
|
25
|
-
): Promise<string>;
|
|
26
|
-
export declare function vaultRedeem(
|
|
27
|
-
signer: Signer | Wallet,
|
|
28
|
-
options: IContractWriteOptions & {
|
|
14
|
+
export declare function vaultApprove(signer: Signer | Wallet, options: IContractWriteOptions): Promise<string>;
|
|
15
|
+
export declare function vaultDeposit(signer: Signer | Wallet, options: IContractWriteOptions): Promise<string>;
|
|
16
|
+
export declare function vaultRequestRedeem(signer: Signer | Wallet, options: IContractWriteOptions): Promise<string>;
|
|
17
|
+
export declare function vaultRedeem(signer: Signer | Wallet, options: IContractWriteOptions & {
|
|
29
18
|
year: string;
|
|
30
19
|
month: string;
|
|
31
20
|
day: string;
|
|
32
21
|
receiverIndex: string;
|
|
33
|
-
|
|
34
|
-
): Promise<string>;
|
|
22
|
+
}): Promise<string>;
|
|
@@ -1,5 +1,2 @@
|
|
|
1
1
|
import { IAddress, IWSMonitorHeaders } from '../../types';
|
|
2
|
-
export declare function fetchDebankResponse(
|
|
3
|
-
address: IAddress,
|
|
4
|
-
headers?: IWSMonitorHeaders,
|
|
5
|
-
): Promise<any>;
|
|
2
|
+
export declare function fetchDebankResponse(address: IAddress, headers?: IWSMonitorHeaders): Promise<any>;
|
|
@@ -1,43 +1,32 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
exposurePerCategory: any,
|
|
12
|
-
netValue: any,
|
|
13
|
-
): {
|
|
14
|
-
tokenMap: Record<string, string>;
|
|
15
|
-
protocolTokenMap: Record<string, string[]>;
|
|
16
|
-
protocolExposures: any;
|
|
17
|
-
tokenExposures: any;
|
|
18
|
-
loansExposure: {
|
|
19
|
-
exposure: any[];
|
|
20
|
-
positions: any[];
|
|
21
|
-
};
|
|
1
|
+
import { IAddress, IDebankProtocolExposure, IDebankTokenExposure } from '../../types';
|
|
2
|
+
export declare function parseVaultLevelDebank(debankRes: any, protocolExposure: IDebankProtocolExposure[], tokenExposure: IDebankTokenExposure[], borrower: IAddress, exposurePerCategory: any, netValue: any): {
|
|
3
|
+
tokenMap: Record<string, string>;
|
|
4
|
+
protocolTokenMap: Record<string, string[]>;
|
|
5
|
+
protocolExposures: any;
|
|
6
|
+
tokenExposures: any;
|
|
7
|
+
loansExposure: {
|
|
8
|
+
exposure: any[];
|
|
9
|
+
positions: any[];
|
|
10
|
+
};
|
|
22
11
|
};
|
|
23
12
|
export declare function getVaultExposure(debankResponse: any): {
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
13
|
+
borrowing_exposure: {
|
|
14
|
+
symbol: string;
|
|
15
|
+
chain: string;
|
|
16
|
+
amount: number;
|
|
17
|
+
}[];
|
|
18
|
+
supplying_exposure: {
|
|
19
|
+
symbol: string;
|
|
20
|
+
chain: string;
|
|
21
|
+
amount: number;
|
|
22
|
+
}[];
|
|
23
|
+
wallet_exposure: {
|
|
24
|
+
symbol: string;
|
|
25
|
+
chain: string;
|
|
26
|
+
amount: number;
|
|
27
|
+
}[];
|
|
39
28
|
};
|
|
40
29
|
export declare function parseLoanLevelDebank(debankRes: any): {
|
|
41
|
-
|
|
42
|
-
|
|
30
|
+
exposure: any[];
|
|
31
|
+
positions: any[];
|
|
43
32
|
};
|
|
@@ -1,34 +1,34 @@
|
|
|
1
1
|
import { IAddress } from '../../types';
|
|
2
2
|
export type IOctavfiEndpoint = 'portfolio';
|
|
3
3
|
export interface IOctavfiAsset {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
4
|
+
balance: string;
|
|
5
|
+
symbol: string;
|
|
6
|
+
price: string;
|
|
7
|
+
value: string;
|
|
8
|
+
contractAddress?: IAddress;
|
|
9
|
+
chain: string;
|
|
10
10
|
}
|
|
11
11
|
export interface IOctavfiProtocolBreakdown {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
12
|
+
key: string;
|
|
13
|
+
name: string;
|
|
14
|
+
value: string;
|
|
15
|
+
assets: IOctavfiAsset[];
|
|
16
16
|
}
|
|
17
17
|
export interface IOctavfiChainBreakdown {
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
18
|
+
key: string;
|
|
19
|
+
name: string;
|
|
20
|
+
value: string;
|
|
21
|
+
protocols: string[];
|
|
22
22
|
}
|
|
23
23
|
export interface IOctavfiPortfolio {
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
24
|
+
address: IAddress;
|
|
25
|
+
cashBalance: string;
|
|
26
|
+
dailyIncome: string;
|
|
27
|
+
dailyExpense: string;
|
|
28
|
+
fees: string;
|
|
29
|
+
feesFiat: string;
|
|
30
|
+
lastUpdated: string;
|
|
31
|
+
networth: string;
|
|
32
|
+
assetByProtocols: Record<string, IOctavfiProtocolBreakdown>;
|
|
33
|
+
chains: Record<string, IOctavfiChainBreakdown>;
|
|
34
34
|
}
|
|
@@ -1,7 +1,3 @@
|
|
|
1
1
|
import { IOctavfiPortfolio } from './types';
|
|
2
|
-
export declare function transformOctavfiToDebank(
|
|
3
|
-
|
|
4
|
-
): any;
|
|
5
|
-
export declare function transformOctavfiPortfoliosToDebank(
|
|
6
|
-
portfolios: IOctavfiPortfolio[],
|
|
7
|
-
): any[];
|
|
2
|
+
export declare function transformOctavfiToDebank(octavfiPortfolio: IOctavfiPortfolio | null | undefined): any;
|
|
3
|
+
export declare function transformOctavfiPortfoliosToDebank(portfolios: IOctavfiPortfolio[]): any[];
|
|
@@ -1,12 +1,2 @@
|
|
|
1
|
-
export declare function fetchSubgraph(
|
|
2
|
-
|
|
3
|
-
query: string,
|
|
4
|
-
apiKey?: string,
|
|
5
|
-
): Promise<Response>;
|
|
6
|
-
export declare function fetchSubgraphWithRetry(
|
|
7
|
-
graphUrl: string,
|
|
8
|
-
query: string,
|
|
9
|
-
apiKey?: string,
|
|
10
|
-
maxRetries?: number,
|
|
11
|
-
baseDelay?: number,
|
|
12
|
-
): Promise<Response>;
|
|
1
|
+
export declare function fetchSubgraph(graphUrl: string, query: string, apiKey?: string): Promise<Response>;
|
|
2
|
+
export declare function fetchSubgraphWithRetry(graphUrl: string, query: string, apiKey?: string, maxRetries?: number, baseDelay?: number): Promise<Response>;
|
|
@@ -1,43 +1,10 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
ISubgraphWithdrawRequest,
|
|
8
|
-
} from '../../types';
|
|
9
|
-
export declare function getSubgraphWithdrawRequests(
|
|
10
|
-
pool: IAddress,
|
|
11
|
-
provider: IContractRunner,
|
|
12
|
-
slackWebookUrl?: string,
|
|
13
|
-
): Promise<ISubgraphWithdrawRequest[]>;
|
|
14
|
-
export declare function getSubgraphWithdrawProccessed(
|
|
15
|
-
pool: IAddress,
|
|
16
|
-
provider: IContractRunner,
|
|
17
|
-
slackWebookUrl?: string,
|
|
18
|
-
): Promise<ISubgraphWithdrawProccessed[]>;
|
|
19
|
-
export declare function getSubgraphAllWithdrawals(
|
|
20
|
-
pool: IAddress,
|
|
21
|
-
provider: IContractRunner,
|
|
22
|
-
slackWebookUrl?: string,
|
|
23
|
-
): Promise<{
|
|
24
|
-
withdrawalRequesteds: ISubgraphWithdrawRequest[];
|
|
25
|
-
withdrawalProcesseds: ISubgraphWithdrawProccessed[];
|
|
1
|
+
import type { IAddress, IContractRunner, ISubgraphTransfer, ISubgraphUserHistoryItem, ISubgraphWithdrawProccessed, ISubgraphWithdrawRequest } from '../../types';
|
|
2
|
+
export declare function getSubgraphWithdrawRequests(pool: IAddress, provider: IContractRunner, slackWebookUrl?: string): Promise<ISubgraphWithdrawRequest[]>;
|
|
3
|
+
export declare function getSubgraphWithdrawProccessed(pool: IAddress, provider: IContractRunner, slackWebookUrl?: string): Promise<ISubgraphWithdrawProccessed[]>;
|
|
4
|
+
export declare function getSubgraphAllWithdrawals(pool: IAddress, provider: IContractRunner, slackWebookUrl?: string): Promise<{
|
|
5
|
+
withdrawalRequesteds: ISubgraphWithdrawRequest[];
|
|
6
|
+
withdrawalProcesseds: ISubgraphWithdrawProccessed[];
|
|
26
7
|
}>;
|
|
27
|
-
export declare function getSubgraphUserHistory(
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
pool: IAddress,
|
|
31
|
-
slackWebookUrl?: string,
|
|
32
|
-
): Promise<ISubgraphUserHistoryItem[]>;
|
|
33
|
-
export declare function getSubgraphVaultHistory(
|
|
34
|
-
provider: IContractRunner,
|
|
35
|
-
pool: IAddress,
|
|
36
|
-
slackWebookUrl?: string,
|
|
37
|
-
): Promise<ISubgraphUserHistoryItem[]>;
|
|
38
|
-
export declare function getSubgraphUserTransfers(
|
|
39
|
-
user: IAddress,
|
|
40
|
-
provider: IContractRunner,
|
|
41
|
-
pool: IAddress,
|
|
42
|
-
slackWebookUrl?: string,
|
|
43
|
-
): Promise<ISubgraphTransfer[]>;
|
|
8
|
+
export declare function getSubgraphUserHistory(user: IAddress, provider: IContractRunner, pool: IAddress, slackWebookUrl?: string): Promise<ISubgraphUserHistoryItem[]>;
|
|
9
|
+
export declare function getSubgraphVaultHistory(provider: IContractRunner, pool: IAddress, slackWebookUrl?: string): Promise<ISubgraphUserHistoryItem[]>;
|
|
10
|
+
export declare function getSubgraphUserTransfers(user: IAddress, provider: IContractRunner, pool: IAddress, slackWebookUrl?: string): Promise<ISubgraphTransfer[]>;
|
package/lib/types/points.d.ts
CHANGED
|
@@ -1,37 +1,28 @@
|
|
|
1
1
|
export interface IUserPoints {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
nativeAmountDeposited?: number;
|
|
29
|
-
}
|
|
30
|
-
>;
|
|
31
|
-
topVault?: {
|
|
32
|
-
lifetimeDeposit?: number;
|
|
33
|
-
address?: string;
|
|
34
|
-
} | null;
|
|
35
|
-
streak?: number;
|
|
36
|
-
rank?: number | null;
|
|
2
|
+
totalPoints?: number;
|
|
3
|
+
referralEarnings?: number;
|
|
4
|
+
pools?: Record<string, {
|
|
5
|
+
amountDepositedInUsd?: number;
|
|
6
|
+
nativeAmountDeposited?: number;
|
|
7
|
+
totalPoints?: number;
|
|
8
|
+
hasPendingRewards?: boolean;
|
|
9
|
+
}>;
|
|
10
|
+
external?: Record<string, {
|
|
11
|
+
protocol?: string;
|
|
12
|
+
externalName?: string;
|
|
13
|
+
amountDepositedInUsd?: number;
|
|
14
|
+
nativeAmountDeposited?: number;
|
|
15
|
+
totalPoints?: number;
|
|
16
|
+
}>;
|
|
17
|
+
referrals?: Record<string, {
|
|
18
|
+
totalPoints?: number;
|
|
19
|
+
amountDepositedInUsd?: number;
|
|
20
|
+
nativeAmountDeposited?: number;
|
|
21
|
+
}>;
|
|
22
|
+
topVault?: {
|
|
23
|
+
lifetimeDeposit?: number;
|
|
24
|
+
address?: string;
|
|
25
|
+
} | null;
|
|
26
|
+
streak?: number;
|
|
27
|
+
rank?: number | null;
|
|
37
28
|
}
|
package/lib/types/pools.d.ts
CHANGED
|
@@ -1,178 +1,141 @@
|
|
|
1
1
|
import { IAddress, INormalizedNumber } from './web3';
|
|
2
|
-
import {
|
|
3
|
-
IDebankProtocolExposure,
|
|
4
|
-
IDebankTokenExposure,
|
|
5
|
-
ITokenizedVaultStrategist,
|
|
6
|
-
IWSSubaccountCefi,
|
|
7
|
-
} from './webserver';
|
|
2
|
+
import { IDebankProtocolExposure, IDebankTokenExposure, ITokenizedVaultStrategist, IWSSubaccountCefi } from './webserver';
|
|
8
3
|
type ILabelValue = {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
4
|
+
label: string;
|
|
5
|
+
value: string;
|
|
6
|
+
usd: number;
|
|
12
7
|
};
|
|
13
8
|
export type IPoolLoan = {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
9
|
+
address: IAddress;
|
|
10
|
+
apr: number;
|
|
11
|
+
collateral: IAddress;
|
|
12
|
+
principal: INormalizedNumber;
|
|
13
|
+
allocation: number;
|
|
14
|
+
repaid: INormalizedNumber;
|
|
15
|
+
exposure?: ILabelValue[];
|
|
16
|
+
positions?: ILabelValue[];
|
|
17
|
+
idleCapital?: boolean;
|
|
23
18
|
};
|
|
24
19
|
export type IPoolRewards = {
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
20
|
+
upshift_points: string;
|
|
21
|
+
latestUpshiftPointMultiplier: number;
|
|
22
|
+
upshift_points_multipliers: {
|
|
23
|
+
multiplier: number;
|
|
24
|
+
timestamp: number;
|
|
25
|
+
}[];
|
|
26
|
+
additional_points: string[];
|
|
32
27
|
};
|
|
33
28
|
export type IPool = {
|
|
34
|
-
address: IAddress;
|
|
35
|
-
name: string;
|
|
36
|
-
logoUrl: string;
|
|
37
|
-
asset: IAddress;
|
|
38
|
-
loansOperator?: IAddress;
|
|
39
|
-
globalLoansAmount: INormalizedNumber;
|
|
40
|
-
symbol: string;
|
|
41
|
-
totalAssets?: INormalizedNumber;
|
|
42
|
-
totalSupply: INormalizedNumber;
|
|
43
|
-
maxSupply: INormalizedNumber;
|
|
44
|
-
decimals: number;
|
|
45
|
-
getTotalLoansDeployed: INormalizedNumber;
|
|
46
|
-
chainId: number;
|
|
47
|
-
withdrawalFee: INormalizedNumber;
|
|
48
|
-
loans?: IPoolLoan[];
|
|
49
|
-
collateral?: IAddress[];
|
|
50
|
-
apy?: number;
|
|
51
|
-
sUSDeAPY?: number;
|
|
52
|
-
leverageLoopAPR?: number;
|
|
53
|
-
leverage?: string;
|
|
54
|
-
managementFee?: number | undefined;
|
|
55
|
-
stakeAPY?: number;
|
|
56
|
-
idleAssets?: INormalizedNumber;
|
|
57
|
-
description?: string;
|
|
58
|
-
hardcodedStrategist?: string;
|
|
59
|
-
protocolExposure?: IDebankProtocolExposure[];
|
|
60
|
-
tokenExposure?: IDebankTokenExposure[];
|
|
61
|
-
cefiExposure?: IWSSubaccountCefi[];
|
|
62
|
-
vaultsSubAccWhitelist?: IAddress[];
|
|
63
|
-
internalType?: 'lendingPool' | 'tokenizedVault';
|
|
64
|
-
publicType?: 'Lending' | 'Defi Yield' | 'Pre-deposit';
|
|
65
|
-
strategist: ITokenizedVaultStrategist;
|
|
66
|
-
isFeatured?: boolean;
|
|
67
|
-
isVisible?: boolean;
|
|
68
|
-
rewards?: IPoolRewards;
|
|
69
|
-
};
|
|
70
|
-
export type IPoolWithUnderlying = IPool & {
|
|
71
|
-
underlying: {
|
|
72
29
|
address: IAddress;
|
|
30
|
+
name: string;
|
|
31
|
+
logoUrl: string;
|
|
32
|
+
asset: IAddress;
|
|
33
|
+
loansOperator?: IAddress;
|
|
34
|
+
globalLoansAmount: INormalizedNumber;
|
|
73
35
|
symbol: string;
|
|
36
|
+
totalAssets?: INormalizedNumber;
|
|
37
|
+
totalSupply: INormalizedNumber;
|
|
38
|
+
maxSupply: INormalizedNumber;
|
|
74
39
|
decimals: number;
|
|
75
|
-
|
|
76
|
-
|
|
40
|
+
getTotalLoansDeployed: INormalizedNumber;
|
|
41
|
+
chainId: number;
|
|
42
|
+
withdrawalFee: INormalizedNumber;
|
|
43
|
+
loans?: IPoolLoan[];
|
|
44
|
+
collateral?: IAddress[];
|
|
45
|
+
apy?: number;
|
|
46
|
+
sUSDeAPY?: number;
|
|
47
|
+
leverageLoopAPR?: number;
|
|
48
|
+
leverage?: string;
|
|
49
|
+
managementFee?: number | undefined;
|
|
50
|
+
stakeAPY?: number;
|
|
51
|
+
idleAssets?: INormalizedNumber;
|
|
52
|
+
description?: string;
|
|
53
|
+
hardcodedStrategist?: string;
|
|
54
|
+
protocolExposure?: IDebankProtocolExposure[];
|
|
55
|
+
tokenExposure?: IDebankTokenExposure[];
|
|
56
|
+
cefiExposure?: IWSSubaccountCefi[];
|
|
57
|
+
vaultsSubAccWhitelist?: IAddress[];
|
|
58
|
+
internalType?: 'lendingPool' | 'tokenizedVault';
|
|
59
|
+
publicType?: 'Lending' | 'Defi Yield' | 'Pre-deposit';
|
|
60
|
+
strategist: ITokenizedVaultStrategist;
|
|
61
|
+
isFeatured?: boolean;
|
|
62
|
+
isVisible?: boolean;
|
|
63
|
+
rewards?: IPoolRewards;
|
|
64
|
+
};
|
|
65
|
+
export type IPoolWithUnderlying = IPool & {
|
|
66
|
+
underlying: {
|
|
67
|
+
address: IAddress;
|
|
68
|
+
symbol: string;
|
|
69
|
+
decimals: number;
|
|
70
|
+
chain: number;
|
|
71
|
+
};
|
|
77
72
|
};
|
|
78
73
|
export interface ISubgraphFormattedPool {
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
address: IAddress;
|
|
91
|
-
managementFee: number;
|
|
92
|
-
underlying: {
|
|
74
|
+
decimals: number;
|
|
75
|
+
symbol: string;
|
|
76
|
+
name: string;
|
|
77
|
+
asset: IAddress;
|
|
78
|
+
totalSupply: INormalizedNumber;
|
|
79
|
+
totalAssets: INormalizedNumber;
|
|
80
|
+
maxSupply: INormalizedNumber;
|
|
81
|
+
globalLoansAmount: INormalizedNumber;
|
|
82
|
+
getTotalLoansDeployed: INormalizedNumber;
|
|
83
|
+
withdrawalFee: INormalizedNumber;
|
|
84
|
+
chainId: number;
|
|
93
85
|
address: IAddress;
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
86
|
+
managementFee: number;
|
|
87
|
+
underlying: {
|
|
88
|
+
address: IAddress;
|
|
89
|
+
chain: number;
|
|
90
|
+
};
|
|
91
|
+
loansOperator: IAddress;
|
|
92
|
+
loans: ISubgraphFormattedLoan[];
|
|
98
93
|
}
|
|
99
94
|
export interface ISubgraphFormattedLoan {
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
95
|
+
amount: INormalizedNumber;
|
|
96
|
+
address: IAddress;
|
|
97
|
+
apr: number;
|
|
98
|
+
collateral: IAddress;
|
|
99
|
+
repaid: INormalizedNumber;
|
|
100
|
+
borrower: IAddress;
|
|
106
101
|
}
|
|
107
102
|
export type IPoolWithPositions = IPoolWithUnderlying & {
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
103
|
+
token: IAddress;
|
|
104
|
+
position: string;
|
|
105
|
+
apy: number;
|
|
106
|
+
status: string;
|
|
107
|
+
availableRedemptions: IPoolAvailableRedemption[];
|
|
108
|
+
redeemable: INormalizedNumber;
|
|
109
|
+
walletBalance: string;
|
|
115
110
|
};
|
|
116
|
-
export type IPoolFunctions =
|
|
117
|
-
|
|
118
|
-
| 'symbol'
|
|
119
|
-
| 'name'
|
|
120
|
-
| 'asset'
|
|
121
|
-
| 'totalSupply'
|
|
122
|
-
| 'maxSupply'
|
|
123
|
-
| 'totalAssets'
|
|
124
|
-
| 'globalLoansAmount'
|
|
125
|
-
| 'loansOperator'
|
|
126
|
-
| 'getTotalLoansDeployed'
|
|
127
|
-
| 'withdrawalFee'
|
|
128
|
-
| 'lagDuration'
|
|
129
|
-
| 'withdrawalsPaused'
|
|
130
|
-
| 'assetsWhitelistAddress'
|
|
131
|
-
| 'getWhitelistedAssets'
|
|
132
|
-
| 'maxDepositAmount'
|
|
133
|
-
| 'getTotalAssets'
|
|
134
|
-
| 'lpTokenAddress'
|
|
135
|
-
| 'depositCap';
|
|
136
|
-
export type IPoolAction =
|
|
137
|
-
| 'deposit'
|
|
138
|
-
| 'withdraw'
|
|
139
|
-
| 'claim'
|
|
140
|
-
| 'stake'
|
|
141
|
-
| 'getReward'
|
|
142
|
-
| 'unstake';
|
|
111
|
+
export type IPoolFunctions = 'decimals' | 'symbol' | 'name' | 'asset' | 'totalSupply' | 'maxSupply' | 'totalAssets' | 'globalLoansAmount' | 'loansOperator' | 'getTotalLoansDeployed' | 'withdrawalFee' | 'lagDuration' | 'withdrawalsPaused' | 'assetsWhitelistAddress' | 'getWhitelistedAssets' | 'maxDepositAmount' | 'getTotalAssets' | 'lpTokenAddress' | 'depositCap';
|
|
112
|
+
export type IPoolAction = 'deposit' | 'withdraw' | 'claim' | 'stake' | 'getReward' | 'unstake';
|
|
143
113
|
export type IPoolModal = {
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
114
|
+
isOpen: boolean;
|
|
115
|
+
onClose: (e: any) => void;
|
|
116
|
+
type: IPoolAction;
|
|
117
|
+
mode?: 'light' | 'dark';
|
|
148
118
|
} & IPoolWithUnderlying;
|
|
149
119
|
export type IPoolAvailableRedemption = {
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
120
|
+
receiver: IAddress;
|
|
121
|
+
day: INormalizedNumber;
|
|
122
|
+
month: INormalizedNumber;
|
|
123
|
+
year: INormalizedNumber;
|
|
124
|
+
amount: INormalizedNumber;
|
|
125
|
+
date: Date;
|
|
126
|
+
pool: IAddress;
|
|
157
127
|
};
|
|
158
128
|
export type IPoolRedemptionHistoryItem = {
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
129
|
+
receiver: IAddress;
|
|
130
|
+
amount: INormalizedNumber;
|
|
131
|
+
processed: Date;
|
|
132
|
+
requested: Date;
|
|
133
|
+
pool: IAddress;
|
|
164
134
|
};
|
|
165
135
|
export type IPoolOrderParam = 'asc' | 'desc';
|
|
166
136
|
export type IPoolHistoricalParams = {
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
| 'years'
|
|
171
|
-
| 'quarters'
|
|
172
|
-
| 'months'
|
|
173
|
-
| 'weeks'
|
|
174
|
-
| 'days'
|
|
175
|
-
| 'hours'
|
|
176
|
-
| 'minutes';
|
|
137
|
+
order?: IPoolOrderParam;
|
|
138
|
+
start: Date;
|
|
139
|
+
interval?: 'years' | 'quarters' | 'months' | 'weeks' | 'days' | 'hours' | 'minutes';
|
|
177
140
|
};
|
|
178
141
|
export {};
|