@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
package/lib/types/staking.d.ts
CHANGED
|
@@ -1,28 +1,28 @@
|
|
|
1
1
|
import { IAddress, INormalizedNumber } from './web3';
|
|
2
2
|
export type IActiveStakingPosition = {
|
|
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
|
-
|
|
3
|
+
stakingToken: {
|
|
4
|
+
decimals: number;
|
|
5
|
+
symbol: string;
|
|
6
|
+
address: IAddress;
|
|
7
|
+
chain: number;
|
|
8
|
+
totalStaked: INormalizedNumber;
|
|
9
|
+
usd: INormalizedNumber;
|
|
10
|
+
totalSupply?: INormalizedNumber;
|
|
11
|
+
name: string;
|
|
12
|
+
};
|
|
13
|
+
rewardToken: {
|
|
14
|
+
decimals: number;
|
|
15
|
+
symbol: string;
|
|
16
|
+
address: IAddress;
|
|
17
|
+
chain: number;
|
|
18
|
+
redeemable: INormalizedNumber;
|
|
19
|
+
usd: INormalizedNumber;
|
|
20
|
+
name: string;
|
|
21
|
+
};
|
|
22
|
+
rewardDistributor: IAddress;
|
|
23
|
+
rewardPerSecond: INormalizedNumber;
|
|
24
|
+
apy?: number;
|
|
25
|
+
maxApy?: number;
|
|
26
|
+
chainId: number;
|
|
27
|
+
id: string;
|
|
28
28
|
};
|
package/lib/types/subgraph.d.ts
CHANGED
|
@@ -1,48 +1,48 @@
|
|
|
1
1
|
import { IAddress } from './web3';
|
|
2
2
|
export interface ISubgraphBase {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
3
|
+
id: string;
|
|
4
|
+
contractId_: IAddress;
|
|
5
|
+
timestamp_: string;
|
|
6
|
+
transactionHash_: IAddress;
|
|
7
|
+
block_number: string;
|
|
8
8
|
}
|
|
9
9
|
export interface ISubgraphUserHistoryItem extends ISubgraphBase {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
10
|
+
address: IAddress;
|
|
11
|
+
amount: string;
|
|
12
|
+
type: 'withdraw-request' | 'deposit' | 'withdraw-processed';
|
|
13
|
+
decimals?: number;
|
|
14
|
+
isInstant?: boolean;
|
|
15
15
|
}
|
|
16
16
|
export interface ISubgraphWithdrawProccessed extends ISubgraphBase {
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
17
|
+
processedOn: string;
|
|
18
|
+
requestedOn: string;
|
|
19
|
+
receiverAddr: IAddress;
|
|
20
|
+
assetsAmount: string;
|
|
21
21
|
}
|
|
22
22
|
export interface ISubgraphDeposit extends ISubgraphBase {
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
23
|
+
assets: string;
|
|
24
|
+
sender: IAddress;
|
|
25
|
+
shares: string;
|
|
26
|
+
owner: IAddress;
|
|
27
|
+
senderAddr?: IAddress;
|
|
28
|
+
amountIn?: string;
|
|
29
29
|
}
|
|
30
30
|
export interface ISubgraphWithdrawRequest extends ISubgraphBase {
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
31
|
+
day: string;
|
|
32
|
+
month: string;
|
|
33
|
+
year: string;
|
|
34
|
+
shares: string;
|
|
35
|
+
assets: string;
|
|
36
|
+
receiverAddr: IAddress;
|
|
37
|
+
ownerAddr: IAddress;
|
|
38
38
|
}
|
|
39
39
|
export interface ISubgraphWithdraw extends ISubgraphBase {
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
40
|
+
receiver: IAddress;
|
|
41
|
+
sender: string;
|
|
42
|
+
assets: string;
|
|
43
43
|
}
|
|
44
44
|
export interface ISubgraphTransfer extends ISubgraphBase {
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
45
|
+
from: IAddress;
|
|
46
|
+
to: IAddress;
|
|
47
|
+
value: string;
|
|
48
48
|
}
|
package/lib/types/vaults.d.ts
CHANGED
|
@@ -1,282 +1,269 @@
|
|
|
1
1
|
import { IAddress, INormalizedNumber } from './web3';
|
|
2
|
-
import {
|
|
3
|
-
IDebankProtocolExposure,
|
|
4
|
-
IDebankTokenExposure,
|
|
5
|
-
IOTCPosition,
|
|
6
|
-
IWSSubaccountCefi,
|
|
7
|
-
IWSSubaccountLoan,
|
|
8
|
-
IWSTokenEntry,
|
|
9
|
-
ITokenizedVaultOperator,
|
|
10
|
-
ITokenizedVaultEoaOperator,
|
|
11
|
-
IHIstoricalSnapshot,
|
|
12
|
-
} from './webserver';
|
|
2
|
+
import { IDebankProtocolExposure, IDebankTokenExposure, IOTCPosition, IWSSubaccountCefi, IWSSubaccountLoan, IWSTokenEntry, ITokenizedVaultOperator, ITokenizedVaultEoaOperator, IHIstoricalSnapshot } from './webserver';
|
|
13
3
|
import type { InterfaceAbi } from 'ethers';
|
|
14
4
|
export interface IVaultLoan {
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
5
|
+
vault: IAddress;
|
|
6
|
+
address: IAddress;
|
|
7
|
+
lender: IAddress;
|
|
8
|
+
borrower: IAddress;
|
|
9
|
+
state: string;
|
|
10
|
+
totalRepaid: number;
|
|
11
|
+
principalToken: IWSTokenEntry;
|
|
12
|
+
principalAmount: number;
|
|
13
|
+
interestAmount: number;
|
|
14
|
+
upcomingPayment: {
|
|
15
|
+
amount: number;
|
|
16
|
+
dueDate: string;
|
|
17
|
+
};
|
|
18
|
+
apr: number;
|
|
19
|
+
initialPrincipalAmount: number;
|
|
20
|
+
deployedDate: string;
|
|
21
|
+
paymentInterval: number;
|
|
22
|
+
isIdleCapital: boolean;
|
|
23
|
+
allocation: number;
|
|
34
24
|
}
|
|
35
25
|
export type IVaultUserHistoryItem = {
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
26
|
+
timestamp: number;
|
|
27
|
+
address: IAddress;
|
|
28
|
+
amount: INormalizedNumber;
|
|
29
|
+
pool: IAddress;
|
|
30
|
+
chainId: number;
|
|
31
|
+
type: 'withdraw-request' | 'deposit' | 'withdraw-processed';
|
|
32
|
+
transactionHash: IAddress;
|
|
43
33
|
};
|
|
44
34
|
export type IVaultRewards = {
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
35
|
+
points: string;
|
|
36
|
+
multiplier: number;
|
|
37
|
+
multipliers: {
|
|
38
|
+
value: number;
|
|
39
|
+
timestamp: number;
|
|
40
|
+
}[];
|
|
41
|
+
additionalPoints: string[];
|
|
52
42
|
};
|
|
53
43
|
export type IVaultExposureItem = {
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
44
|
+
amount: number;
|
|
45
|
+
chain: string;
|
|
46
|
+
decimals: number;
|
|
47
|
+
exposureType?: string;
|
|
48
|
+
id: string;
|
|
49
|
+
logoUrl?: string;
|
|
50
|
+
name: string;
|
|
51
|
+
protocol?: string;
|
|
52
|
+
symbol: string;
|
|
63
53
|
};
|
|
64
54
|
export type IExposurePerCategory = {
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
55
|
+
borrowing: IVaultExposureItem[];
|
|
56
|
+
supplying: IVaultExposureItem[];
|
|
57
|
+
lending: IWSSubaccountLoan[];
|
|
58
|
+
wallet: IVaultExposureItem[];
|
|
59
|
+
cefiBalance: number;
|
|
60
|
+
defiBalance: number;
|
|
61
|
+
walletBalance: number;
|
|
62
|
+
loanBalance: number;
|
|
73
63
|
};
|
|
74
64
|
export interface IVaultAllocations {
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
positions: any[];
|
|
87
|
-
}
|
|
88
|
-
>;
|
|
65
|
+
defi: IDebankProtocolExposure[];
|
|
66
|
+
tokens: IDebankTokenExposure[];
|
|
67
|
+
cefi: IWSSubaccountCefi[];
|
|
68
|
+
unfilteredTokens: IDebankTokenExposure[];
|
|
69
|
+
otc: Record<string, IOTCPosition>;
|
|
70
|
+
exposurePerCategory?: IExposurePerCategory;
|
|
71
|
+
netValue?: number;
|
|
72
|
+
defiPerBorrower: Record<`0x${string}`, {
|
|
73
|
+
exposure: any[];
|
|
74
|
+
positions: any[];
|
|
75
|
+
}>;
|
|
89
76
|
}
|
|
90
77
|
export interface IVaultApy {
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
78
|
+
apy: number;
|
|
79
|
+
explainer: string;
|
|
80
|
+
liquidApy: number;
|
|
81
|
+
pointsApy: number | null;
|
|
82
|
+
campaignApy: number | null;
|
|
83
|
+
rewardsClaimable: number;
|
|
84
|
+
rewardsCompounded: number;
|
|
85
|
+
underlyingApy: number;
|
|
99
86
|
}
|
|
100
87
|
export interface IVaultStrategist {
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
88
|
+
address: IAddress;
|
|
89
|
+
logo: string;
|
|
90
|
+
name: string;
|
|
91
|
+
type?: string;
|
|
105
92
|
}
|
|
106
93
|
export type IVaultVersion = 'evm-0' | 'evm-1' | 'evm-2' | 'sol-0' | 'sui-0';
|
|
107
94
|
export interface IVaultAdapterConfig {
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
95
|
+
lpTokenAddress?: IAddress;
|
|
96
|
+
isNativeTokenDeposit: boolean;
|
|
97
|
+
isWrappedTokenDeposit: boolean;
|
|
98
|
+
wrappedTokenAddress?: IAddress;
|
|
99
|
+
referralId?: IAddress | string;
|
|
100
|
+
abi?: InterfaceAbi;
|
|
101
|
+
wrapperAddress?: IAddress;
|
|
102
|
+
viewAdapter?: IAddress;
|
|
103
|
+
tokens?: IAddress[];
|
|
104
|
+
bridgeId?: number;
|
|
118
105
|
}
|
|
119
106
|
export interface IVault {
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
address: IAddress;
|
|
126
|
-
chainId: number;
|
|
127
|
-
name: string;
|
|
128
|
-
logoUrl: string;
|
|
129
|
-
receipt: {
|
|
107
|
+
max_drawdown?: number | null;
|
|
108
|
+
historical_apy?: Record<number, number> | null;
|
|
109
|
+
historical_snapshots?: IHIstoricalSnapshot[];
|
|
110
|
+
depositCap?: INormalizedNumber;
|
|
111
|
+
maxDepositAmount?: INormalizedNumber;
|
|
130
112
|
address: IAddress;
|
|
131
|
-
|
|
132
|
-
decimals: number;
|
|
133
|
-
};
|
|
134
|
-
description: string;
|
|
135
|
-
startDatetime: string;
|
|
136
|
-
status: 'active' | 'closed' | 'testing';
|
|
137
|
-
version: IVaultVersion;
|
|
138
|
-
tags: string[];
|
|
139
|
-
isFeatured: boolean;
|
|
140
|
-
isSpotlighted?: boolean;
|
|
141
|
-
isVisible: boolean;
|
|
142
|
-
reserveTarget: number;
|
|
143
|
-
reserveTolerance: number;
|
|
144
|
-
decimals: number;
|
|
145
|
-
totalAssets: INormalizedNumber;
|
|
146
|
-
totalSupply: INormalizedNumber;
|
|
147
|
-
maxSupply: INormalizedNumber;
|
|
148
|
-
operators: ITokenizedVaultOperator[];
|
|
149
|
-
eoa_operators: ITokenizedVaultEoaOperator[];
|
|
150
|
-
depositAssets: {
|
|
151
|
-
address: IAddress;
|
|
152
|
-
symbol: string;
|
|
153
|
-
decimals: number;
|
|
154
|
-
}[];
|
|
155
|
-
apy: IVaultApy;
|
|
156
|
-
operator: IAddress;
|
|
157
|
-
rewards: IVaultRewards;
|
|
158
|
-
strategists: IVaultStrategist[];
|
|
159
|
-
fees: {
|
|
160
|
-
management: number;
|
|
161
|
-
isManagementWaived: boolean;
|
|
162
|
-
performance: number;
|
|
163
|
-
isPerformanceWaived: boolean;
|
|
164
|
-
};
|
|
165
|
-
lagDuration: number;
|
|
166
|
-
maxDailyDrawdown: number;
|
|
167
|
-
risk: string;
|
|
168
|
-
isWithdrawalPaused: boolean;
|
|
169
|
-
isDepositPaused: boolean;
|
|
170
|
-
idleAssets: INormalizedNumber;
|
|
171
|
-
loans?: IVaultLoan[];
|
|
172
|
-
allocations?: IVaultAllocations;
|
|
173
|
-
position?: IVaultPosition;
|
|
174
|
-
linkOnly?: boolean;
|
|
175
|
-
composabilityIntegrations?: Array<{
|
|
113
|
+
chainId: number;
|
|
176
114
|
name: string;
|
|
177
|
-
description: string;
|
|
178
|
-
earningMultiplier: number;
|
|
179
|
-
protocolUrl: string;
|
|
180
115
|
logoUrl: string;
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
116
|
+
receipt: {
|
|
117
|
+
address: IAddress;
|
|
118
|
+
symbol: string;
|
|
119
|
+
decimals: number;
|
|
120
|
+
};
|
|
121
|
+
description: string;
|
|
122
|
+
startDatetime: string;
|
|
123
|
+
status: 'active' | 'closed' | 'testing';
|
|
124
|
+
version: IVaultVersion;
|
|
125
|
+
tags: string[];
|
|
126
|
+
isFeatured: boolean;
|
|
127
|
+
isSpotlighted?: boolean;
|
|
128
|
+
isVisible: boolean;
|
|
129
|
+
reserveTarget: number;
|
|
130
|
+
reserveTolerance: number;
|
|
131
|
+
decimals: number;
|
|
132
|
+
totalAssets: INormalizedNumber;
|
|
133
|
+
totalSupply: INormalizedNumber;
|
|
134
|
+
maxSupply: INormalizedNumber;
|
|
135
|
+
operators: ITokenizedVaultOperator[];
|
|
136
|
+
eoa_operators: ITokenizedVaultEoaOperator[];
|
|
137
|
+
depositAssets: {
|
|
138
|
+
address: IAddress;
|
|
139
|
+
symbol: string;
|
|
140
|
+
decimals: number;
|
|
141
|
+
}[];
|
|
142
|
+
apy: IVaultApy;
|
|
143
|
+
operator: IAddress;
|
|
144
|
+
rewards: IVaultRewards;
|
|
145
|
+
strategists: IVaultStrategist[];
|
|
146
|
+
fees: {
|
|
147
|
+
management: number;
|
|
148
|
+
isManagementWaived: boolean;
|
|
149
|
+
performance: number;
|
|
150
|
+
isPerformanceWaived: boolean;
|
|
151
|
+
};
|
|
152
|
+
lagDuration: number;
|
|
153
|
+
maxDailyDrawdown: number;
|
|
154
|
+
risk: string;
|
|
155
|
+
isWithdrawalPaused: boolean;
|
|
156
|
+
isDepositPaused: boolean;
|
|
157
|
+
idleAssets: INormalizedNumber;
|
|
158
|
+
loans?: IVaultLoan[];
|
|
159
|
+
allocations?: IVaultAllocations;
|
|
160
|
+
position?: IVaultPosition;
|
|
161
|
+
linkOnly?: boolean;
|
|
162
|
+
composabilityIntegrations?: Array<{
|
|
163
|
+
name: string;
|
|
164
|
+
description: string;
|
|
165
|
+
earningMultiplier: number;
|
|
166
|
+
protocolUrl: string;
|
|
167
|
+
logoUrl: string;
|
|
168
|
+
tokenizedVaultId: string;
|
|
169
|
+
id: string;
|
|
170
|
+
}>;
|
|
171
|
+
dailyPnlPerShare?: {
|
|
172
|
+
timestamp: string;
|
|
173
|
+
value: number;
|
|
174
|
+
}[];
|
|
175
|
+
enabled_historical_price_horizons?: number[];
|
|
176
|
+
latest_reported_tvl?: number | null;
|
|
190
177
|
}
|
|
191
178
|
export declare enum VaultRedemptionStatus {
|
|
192
|
-
|
|
193
|
-
|
|
179
|
+
AWAITING_COOLDOWN = "awaiting_cooldown",
|
|
180
|
+
READY_TO_CLAIM = "ready_to_claim"
|
|
194
181
|
}
|
|
195
182
|
export type IVaultAvailableRedemption = {
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
183
|
+
id: string;
|
|
184
|
+
hash: string;
|
|
185
|
+
timestamp: number;
|
|
186
|
+
receiver: IAddress;
|
|
187
|
+
day: INormalizedNumber;
|
|
188
|
+
month: INormalizedNumber;
|
|
189
|
+
year: INormalizedNumber;
|
|
190
|
+
amount: INormalizedNumber;
|
|
191
|
+
date: Date;
|
|
192
|
+
vault: IAddress;
|
|
193
|
+
status?: VaultRedemptionStatus;
|
|
207
194
|
};
|
|
208
195
|
export type IVaultRedemptionHistoryItem = {
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
196
|
+
receiver: IAddress;
|
|
197
|
+
amount: INormalizedNumber;
|
|
198
|
+
processed: Date;
|
|
199
|
+
requested: Date;
|
|
200
|
+
vault: IAddress;
|
|
214
201
|
};
|
|
215
202
|
export interface IVaultPosition {
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
203
|
+
vault: IAddress;
|
|
204
|
+
status: string;
|
|
205
|
+
availableRedemptions: IVaultAvailableRedemption[];
|
|
206
|
+
pendingRedemptions: IVaultAvailableRedemption[];
|
|
207
|
+
redeemable: INormalizedNumber;
|
|
208
|
+
walletBalance: INormalizedNumber;
|
|
222
209
|
}
|
|
223
210
|
export type IVaultOrderParam = 'asc' | 'desc';
|
|
224
211
|
export type IVaultHistoricalParams = {
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
212
|
+
daysAgo?: number;
|
|
213
|
+
order?: IVaultOrderParam;
|
|
214
|
+
interval?: 'days' | 'weeks' | 'months' | 'years';
|
|
228
215
|
};
|
|
229
216
|
export interface IVaultUserLifetimePnl {
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
217
|
+
tokenSymbol: string;
|
|
218
|
+
totalDeposited: INormalizedNumber;
|
|
219
|
+
totalDepositedUsd: number;
|
|
220
|
+
totalWithdrawn: INormalizedNumber;
|
|
221
|
+
totalWithdrawnUsd: number;
|
|
222
|
+
currentPositionValue: INormalizedNumber;
|
|
223
|
+
currentPositionValueUsd: number;
|
|
224
|
+
lifetimePnl: INormalizedNumber;
|
|
225
|
+
lifetimePnlUsd: number;
|
|
226
|
+
pnlPercentage: number;
|
|
240
227
|
}
|
|
241
228
|
export interface IVaultPnl {
|
|
242
|
-
|
|
243
|
-
|
|
229
|
+
totalPnl: INormalizedNumber;
|
|
230
|
+
pnlUsd: number;
|
|
244
231
|
}
|
|
245
232
|
export interface IVaultAnnualizedApy {
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
233
|
+
vaultAddress: IAddress;
|
|
234
|
+
liquidityApy: number;
|
|
235
|
+
annualizedApy: number;
|
|
236
|
+
hgETH7dLiquidAPY?: number;
|
|
237
|
+
hgETH30dLiquidAPY?: number;
|
|
238
|
+
liquidAPY7Day?: number;
|
|
239
|
+
liquidAPY30Day?: number;
|
|
253
240
|
}
|
|
254
241
|
export interface IVaultSummary {
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
242
|
+
vaultAddress: IAddress;
|
|
243
|
+
name: string;
|
|
244
|
+
type: string;
|
|
245
|
+
chain: string;
|
|
246
|
+
recentReturns: {
|
|
247
|
+
day: number;
|
|
248
|
+
week: number;
|
|
249
|
+
month: number;
|
|
250
|
+
};
|
|
264
251
|
}
|
|
265
252
|
export interface IVaultWithdrawals {
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
253
|
+
vaultAddress: IAddress;
|
|
254
|
+
chain: string;
|
|
255
|
+
totalWithdrawals: INormalizedNumber;
|
|
256
|
+
pendingQueue: Array<{
|
|
257
|
+
id: string;
|
|
258
|
+
amount: INormalizedNumber;
|
|
259
|
+
requestedAt: string;
|
|
260
|
+
estimatedCompletionDate: string;
|
|
261
|
+
receiver: IAddress;
|
|
262
|
+
}>;
|
|
276
263
|
}
|
|
277
264
|
export interface IVaultMetadataItem {
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
265
|
+
symbol: string;
|
|
266
|
+
subgraph: string;
|
|
267
|
+
address: string;
|
|
281
268
|
}
|
|
282
269
|
export type IVaultMetadata = Record<string, IVaultMetadataItem>;
|
package/lib/types/web3.d.ts
CHANGED
|
@@ -2,23 +2,23 @@ import { Signer, Provider } from 'ethers';
|
|
|
2
2
|
export type IAddress = `0x${string}`;
|
|
3
3
|
export type IChainId = number;
|
|
4
4
|
export type IChainObj = {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
5
|
+
chainId: number;
|
|
6
|
+
name: string;
|
|
7
|
+
explorer: string;
|
|
8
8
|
};
|
|
9
9
|
export type INormalizedNumber = {
|
|
10
|
-
|
|
11
|
-
|
|
10
|
+
normalized: string;
|
|
11
|
+
raw: string;
|
|
12
12
|
};
|
|
13
13
|
export type IExplorerType = 'tx' | 'address' | 'token';
|
|
14
14
|
export type IContractRunner = Signer | Provider;
|
|
15
15
|
export type IProvidersConfig = Partial<Record<IChainId, string>>;
|
|
16
16
|
export type IInfuraOptions = {
|
|
17
|
-
|
|
18
|
-
|
|
17
|
+
chainId: IChainId;
|
|
18
|
+
apiKey: string;
|
|
19
19
|
};
|
|
20
20
|
export type ISolanaNetwork = 'devnet' | 'mainnet-beta' | 'testnet' | 'localnet';
|
|
21
21
|
export interface ISolanaConfig {
|
|
22
|
-
|
|
23
|
-
|
|
22
|
+
rpcUrl: string;
|
|
23
|
+
network: ISolanaNetwork;
|
|
24
24
|
}
|