@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/webserver.d.ts
CHANGED
|
@@ -1,561 +1,543 @@
|
|
|
1
1
|
import { IUserRoles } from './user';
|
|
2
2
|
import { IAddress } from './web3';
|
|
3
3
|
export type IHIstoricalSnapshot = {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
4
|
+
total_assets: number;
|
|
5
|
+
total_shares: number;
|
|
6
|
+
asset_share_ratio: number;
|
|
7
|
+
underlying_price: number;
|
|
8
|
+
snapshot_datetime: string;
|
|
9
|
+
block_id: number;
|
|
10
|
+
id: string;
|
|
11
|
+
tvl: number;
|
|
12
12
|
};
|
|
13
13
|
export interface IWSMonitorHeaders {
|
|
14
|
-
|
|
15
|
-
|
|
14
|
+
'x-user-id'?: string;
|
|
15
|
+
'x-environment'?: string;
|
|
16
16
|
}
|
|
17
17
|
export type IWSSubaccountPermission = {
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
18
|
+
name: string;
|
|
19
|
+
chain: number;
|
|
20
|
+
account_address?: string;
|
|
21
21
|
};
|
|
22
22
|
export type IWSSubaccountTwap = {
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
23
|
+
source_token: string;
|
|
24
|
+
dest_token: string;
|
|
25
|
+
subaccount_chain: number;
|
|
26
|
+
time_interval: number;
|
|
27
|
+
amount: number;
|
|
28
|
+
start_time?: string;
|
|
29
|
+
limit_price?: number;
|
|
30
|
+
number_of_orders: number;
|
|
31
|
+
complete_all_orders?: boolean;
|
|
32
|
+
slippage_tolerance?: number;
|
|
33
33
|
};
|
|
34
34
|
export type IWSSubaccountTwapHistoryItem = {
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
35
|
+
start_time: string;
|
|
36
|
+
time_interval: number;
|
|
37
|
+
source_token: string;
|
|
38
|
+
destination_token: string;
|
|
39
|
+
amount: number | null;
|
|
40
|
+
limit_price: number;
|
|
41
|
+
active: boolean;
|
|
42
|
+
number_of_orders: number;
|
|
43
|
+
complete_all_orders: boolean;
|
|
44
|
+
id: string;
|
|
45
|
+
updated_at: string;
|
|
46
|
+
created_at: string;
|
|
47
|
+
subaccount_id: string;
|
|
48
48
|
};
|
|
49
49
|
export type IWSSubaccountTwapFill = {
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
50
|
+
transaction_hash: string | null;
|
|
51
|
+
source_token: string;
|
|
52
|
+
destination_token: string;
|
|
53
|
+
source_amount_in: number | null;
|
|
54
|
+
destination_amount_out: number | null;
|
|
55
|
+
implied_price: number | null;
|
|
56
|
+
fee_amount: number | null;
|
|
57
|
+
id: string;
|
|
58
|
+
updated_at: string;
|
|
59
|
+
created_at: string;
|
|
60
|
+
twap_id: string;
|
|
61
|
+
fireblocks_transaction_id: string;
|
|
62
|
+
status: IWSFireblocksTxStatus;
|
|
63
|
+
message: string;
|
|
64
64
|
};
|
|
65
65
|
export type IWSSubaccountToken = {
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
66
|
+
address: string;
|
|
67
|
+
chain: number;
|
|
68
|
+
decimals: number;
|
|
69
|
+
discount_factor: number;
|
|
70
|
+
img_url: string | null;
|
|
71
|
+
price: number;
|
|
72
|
+
symbol: string;
|
|
73
|
+
token_type: number;
|
|
74
74
|
};
|
|
75
75
|
interface IWSSubaccountCefiAsset {
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
76
|
+
type: string;
|
|
77
|
+
name: string;
|
|
78
|
+
underlying: string;
|
|
79
|
+
symbol: string;
|
|
80
|
+
asset_type: string;
|
|
81
81
|
}
|
|
82
82
|
interface IWSSubaccountCefiSpotToken {
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
83
|
+
asset: IWSSubaccountCefiAsset;
|
|
84
|
+
value: number;
|
|
85
|
+
balance: number;
|
|
86
86
|
}
|
|
87
87
|
interface IWSSubaccountCefiDerivative {
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
88
|
+
value: number;
|
|
89
|
+
asset_type: string;
|
|
90
|
+
asset: IWSSubaccountCefiAsset;
|
|
91
|
+
units: number;
|
|
92
|
+
avg_cost: number;
|
|
93
|
+
entry_cost: number;
|
|
94
94
|
}
|
|
95
95
|
export interface IWSSubaccountCefi {
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
96
|
+
value: number;
|
|
97
|
+
name: string;
|
|
98
|
+
spot_tokens: IWSSubaccountCefiSpotToken[];
|
|
99
|
+
derivative_positions: IWSSubaccountCefiDerivative[];
|
|
100
100
|
}
|
|
101
101
|
export interface IWSSubaccountLoan {
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
102
|
+
address: IAddress;
|
|
103
|
+
lender: IAddress;
|
|
104
|
+
borrower: IAddress;
|
|
105
|
+
state: string;
|
|
106
|
+
total_repaid: number;
|
|
107
|
+
principal_token: IWSTokenEntry;
|
|
108
|
+
principal_amount: number;
|
|
109
|
+
interest_amount: number;
|
|
110
|
+
upcoming_payment: {
|
|
111
|
+
amount: number;
|
|
112
|
+
due_date: string;
|
|
113
|
+
};
|
|
114
|
+
apr: number;
|
|
115
|
+
initial_principal_amount: number;
|
|
116
|
+
deployed_date: string;
|
|
117
|
+
payment_interval: number;
|
|
118
|
+
lender_apr: number;
|
|
119
119
|
}
|
|
120
120
|
export type IWSMetricsPnlAttributes = {
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
121
|
+
pnl: number;
|
|
122
|
+
percent_return: number;
|
|
123
|
+
realized_apr: number;
|
|
124
124
|
} | null;
|
|
125
125
|
export type IWSMetricsPnl = {
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
126
|
+
id: string;
|
|
127
|
+
datetime: string | Date;
|
|
128
|
+
pnl: number;
|
|
129
|
+
pnl_vs_spot: number;
|
|
130
|
+
swaps_pnl: number;
|
|
131
|
+
timestamp: number;
|
|
132
|
+
debt_interest_owed: number;
|
|
133
|
+
credit_interest_owed: number;
|
|
134
|
+
total_account_value: number;
|
|
135
|
+
net_deposits: number;
|
|
136
|
+
net_deposits_pv: number;
|
|
137
|
+
hedger_pnl: number;
|
|
138
|
+
lifetime: IWSMetricsPnlAttributes;
|
|
139
|
+
lifetime_vs_spot: IWSMetricsPnlAttributes;
|
|
140
|
+
three_day: IWSMetricsPnlAttributes;
|
|
141
|
+
three_day_vs_spot: IWSMetricsPnlAttributes;
|
|
142
|
+
seven_day: IWSMetricsPnlAttributes;
|
|
143
|
+
seven_day_vs_spot: IWSMetricsPnlAttributes;
|
|
144
|
+
thirty_day: IWSMetricsPnlAttributes;
|
|
145
|
+
thirty_day_vs_spot: IWSMetricsPnlAttributes;
|
|
146
146
|
};
|
|
147
147
|
export type IWSMetricsStrategy = {
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
148
|
+
subaccount: string;
|
|
149
|
+
strategy: string;
|
|
150
|
+
datetime: string | Date;
|
|
151
|
+
chain_id: number;
|
|
152
|
+
estimated_apr: number;
|
|
153
|
+
strategy_pnl: number;
|
|
154
|
+
pending_rewards: number;
|
|
155
|
+
strategy_notional: number;
|
|
156
|
+
pnl_vs_spot: number;
|
|
157
|
+
pnl_vs_spot_3d: number;
|
|
158
|
+
pnl_vs_spot_7d: number;
|
|
159
|
+
pnl_vs_spot_30d: number;
|
|
160
|
+
realized_apr: number;
|
|
161
|
+
realized_apr_3d: number;
|
|
162
|
+
realized_apr_7d: number;
|
|
163
|
+
realized_apr_30d: number;
|
|
164
|
+
pool_weights: Record<string, number>;
|
|
165
|
+
lp_price: number;
|
|
166
|
+
strategy_name: string;
|
|
167
|
+
net_deposits: number;
|
|
168
168
|
};
|
|
169
169
|
export type IWSMetricsToken = {
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
170
|
+
subaccount: string;
|
|
171
|
+
strategy: string;
|
|
172
|
+
datetime: string | Date;
|
|
173
|
+
chain_id: number;
|
|
174
|
+
symbol: string;
|
|
175
|
+
units_held: number;
|
|
176
|
+
value_held: number;
|
|
177
|
+
units_implied: number;
|
|
178
|
+
value_implied: number;
|
|
179
|
+
collateral_posted_amount: number;
|
|
180
|
+
margin_posted_amount: number;
|
|
181
|
+
collateral_posted_value: number;
|
|
182
|
+
margin_posted_value: number;
|
|
183
|
+
pool_weight: number;
|
|
184
184
|
};
|
|
185
185
|
export type IWSMetricsTRS = {
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
186
|
+
datetime: string | Date;
|
|
187
|
+
reciever: string;
|
|
188
|
+
payer: string;
|
|
189
|
+
trs_address: string;
|
|
190
|
+
chain_id: number;
|
|
191
|
+
initial_underyling_price: number;
|
|
192
|
+
reference_underlying_price: number;
|
|
193
|
+
current_underlying_price: number;
|
|
194
|
+
required_reciever_margin: number;
|
|
195
|
+
required_payer_margin: number;
|
|
196
|
+
mark_to_market_pnl: number;
|
|
197
|
+
initial_margin: number;
|
|
198
|
+
swap_contract_units: number;
|
|
199
|
+
state: string;
|
|
200
|
+
direction: string;
|
|
201
|
+
underlying_token: string;
|
|
202
202
|
};
|
|
203
203
|
export type IWSMetricsHealthFactor = {
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
204
|
+
id: string;
|
|
205
|
+
datetime: string;
|
|
206
|
+
health_factor: number;
|
|
207
|
+
total_account_value: number;
|
|
208
|
+
total_equity_value: number;
|
|
209
|
+
total_loan_value: number;
|
|
210
|
+
total_loan_interest_amount: number;
|
|
211
|
+
total_pnl: number;
|
|
212
|
+
aggregate_payer_margin: number;
|
|
213
|
+
aggregate_receiver_margin: number;
|
|
214
|
+
intrest_paid: number;
|
|
215
|
+
total_net_deposits: number;
|
|
216
|
+
net_account_value: number;
|
|
217
|
+
life_time_apr: number;
|
|
218
|
+
percent_return: number;
|
|
219
|
+
margin_fraction: number;
|
|
220
|
+
maintenance_margin_fraction: number;
|
|
221
|
+
total_collateral_value: number;
|
|
222
|
+
total_pnl_3d: number;
|
|
223
|
+
total_pnl_7d: number;
|
|
224
|
+
total_pnl_30d: number;
|
|
225
|
+
realized_apr_3d: number;
|
|
226
|
+
realized_apr_7d: number;
|
|
227
|
+
realized_apr_30d: number;
|
|
228
228
|
};
|
|
229
229
|
export type IWSMetricsHedgerPnl = {
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
230
|
+
subaccount: string;
|
|
231
|
+
strategy: string;
|
|
232
|
+
datetime: string | Date;
|
|
233
|
+
chain_id: number;
|
|
234
|
+
symbol: string;
|
|
235
|
+
funding_payments: number;
|
|
236
|
+
fees: number;
|
|
237
|
+
unrealized: number;
|
|
238
|
+
realized: number;
|
|
239
|
+
pnl: number;
|
|
240
|
+
implied_delta: number;
|
|
241
|
+
hedge_delta: number;
|
|
242
|
+
oi_biased_implied_delta: number;
|
|
243
|
+
oi_bias: number;
|
|
244
244
|
};
|
|
245
245
|
export type IWSMetricsHedger = {
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
246
|
+
subaccount: string;
|
|
247
|
+
strategy: string;
|
|
248
|
+
datetime: string | Date;
|
|
249
|
+
chain_id: number;
|
|
250
|
+
strategy_notional: number;
|
|
251
|
+
strategy_pnl: number;
|
|
252
|
+
hedger_pnl: number;
|
|
253
|
+
trs_pnl: number;
|
|
254
|
+
realized_pnl: number;
|
|
255
|
+
unrealized_pnl: number;
|
|
256
|
+
fees: number;
|
|
257
|
+
funding: number;
|
|
258
|
+
corrections: number;
|
|
259
|
+
total_hedge_delta: number;
|
|
260
|
+
total_implied_delta: number;
|
|
261
|
+
net_pnl: number;
|
|
262
|
+
realized_apr_3d: number;
|
|
263
|
+
realized_apr_7d: number;
|
|
264
|
+
realized_apr_30d: number;
|
|
265
265
|
};
|
|
266
266
|
export type IWSMetricsTimeseries = {
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
267
|
+
aggregate_payer_margin: number;
|
|
268
|
+
aggregate_receiver_margin: number;
|
|
269
|
+
datetime: string | Date;
|
|
270
|
+
health_factor: number;
|
|
271
|
+
id: string;
|
|
272
|
+
intrest_paid: number;
|
|
273
|
+
life_time_apr: number;
|
|
274
|
+
maintenance_margin_fraction: number;
|
|
275
|
+
margin_fraction: number;
|
|
276
|
+
net_account_value: number;
|
|
277
|
+
percent_return: number;
|
|
278
|
+
realized_apr_3d: number | null;
|
|
279
|
+
realized_apr_7d: number | null;
|
|
280
|
+
realized_apr_30d: number | null;
|
|
281
|
+
total_account_value: number;
|
|
282
|
+
total_collateral_value: number;
|
|
283
|
+
total_equity_value: number;
|
|
284
|
+
total_loan_interest_amount: number;
|
|
285
|
+
total_loan_value: number;
|
|
286
|
+
total_net_deposits: number;
|
|
287
|
+
total_pnl: number;
|
|
288
|
+
total_pnl_3d: number | null;
|
|
289
|
+
total_pnl_7d: number | null;
|
|
290
|
+
total_pnl_30d: number | null;
|
|
291
291
|
};
|
|
292
292
|
export type IWSTokenEntry = {
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
293
|
+
symbol: string;
|
|
294
|
+
address: `0x${string}`;
|
|
295
|
+
decimals: number;
|
|
296
|
+
img_url?: string;
|
|
297
|
+
price?: number;
|
|
298
|
+
chain?: number;
|
|
299
|
+
balance?: number;
|
|
300
|
+
value?: number;
|
|
301
|
+
label?: string;
|
|
302
|
+
discount_factor?: string;
|
|
303
|
+
type?: string;
|
|
304
304
|
};
|
|
305
305
|
export type IWSTokenPrice = {
|
|
306
|
-
|
|
307
|
-
|
|
306
|
+
price: number;
|
|
307
|
+
dt: string;
|
|
308
308
|
};
|
|
309
309
|
export type IWSUserSubaccount = {
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
310
|
+
internal_name: string;
|
|
311
|
+
friendly_name: string;
|
|
312
|
+
address: string;
|
|
313
|
+
chains: {
|
|
314
|
+
chain_id: number;
|
|
315
|
+
name: string;
|
|
316
|
+
id: string;
|
|
317
|
+
}[];
|
|
318
|
+
status: string;
|
|
319
|
+
subaccount_type: string;
|
|
320
|
+
min_health_factor: number;
|
|
321
|
+
estimated_apr: number;
|
|
316
322
|
id: string;
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
min_health_factor: number;
|
|
321
|
-
estimated_apr: number;
|
|
322
|
-
id: string;
|
|
323
|
-
user_id: string;
|
|
324
|
-
implementation: string;
|
|
325
|
-
turnkey_address: string;
|
|
323
|
+
user_id: string;
|
|
324
|
+
implementation: string;
|
|
325
|
+
turnkey_address: string;
|
|
326
326
|
};
|
|
327
327
|
export type IWSUser = {
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
328
|
+
eoa: string;
|
|
329
|
+
full_name: string;
|
|
330
|
+
type_: IUserRoles;
|
|
331
|
+
nonce: string;
|
|
332
|
+
disabled: boolean;
|
|
333
|
+
id: string;
|
|
334
334
|
};
|
|
335
|
-
export type IWSFireblocksTxStatus =
|
|
336
|
-
| 'SUBMITTED'
|
|
337
|
-
| 'PENDING_AML_SCREENING'
|
|
338
|
-
| 'PENDING_AUTHORIZATION'
|
|
339
|
-
| 'QUEUED'
|
|
340
|
-
| 'PENDING_SIGNATURE'
|
|
341
|
-
| 'PENDING_3RD_PARTY_MANUAL_APPROVAL'
|
|
342
|
-
| 'PENDING_3RD_PARTY'
|
|
343
|
-
| 'BROADCASTING'
|
|
344
|
-
| 'CONFIRMING'
|
|
345
|
-
| 'COMPLETED'
|
|
346
|
-
| 'CANCELLING'
|
|
347
|
-
| 'BLOCKED'
|
|
348
|
-
| 'REJECTED'
|
|
349
|
-
| 'FAILED';
|
|
335
|
+
export type IWSFireblocksTxStatus = 'SUBMITTED' | 'PENDING_AML_SCREENING' | 'PENDING_AUTHORIZATION' | 'QUEUED' | 'PENDING_SIGNATURE' | 'PENDING_3RD_PARTY_MANUAL_APPROVAL' | 'PENDING_3RD_PARTY' | 'BROADCASTING' | 'CONFIRMING' | 'COMPLETED' | 'CANCELLING' | 'BLOCKED' | 'REJECTED' | 'FAILED';
|
|
350
336
|
export interface IWSIntegrationMorphoApy {
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
337
|
+
apy: number;
|
|
338
|
+
vault_positions: any[];
|
|
339
|
+
token: IWSTokenEntry;
|
|
354
340
|
}
|
|
355
341
|
export interface IWSVaultLoan {
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
342
|
+
address: IAddress;
|
|
343
|
+
lender: IAddress;
|
|
344
|
+
borrower: IAddress;
|
|
345
|
+
state: string;
|
|
346
|
+
total_repaid: number;
|
|
347
|
+
principal_token: IWSTokenEntry;
|
|
348
|
+
principal_amount: number;
|
|
349
|
+
interest_amount: number;
|
|
350
|
+
upcoming_payment: {
|
|
351
|
+
amount: number;
|
|
352
|
+
due_date: string;
|
|
353
|
+
};
|
|
354
|
+
apr: number;
|
|
355
|
+
initial_principal_amount: number;
|
|
356
|
+
deployed_date: string;
|
|
357
|
+
payment_interval: number;
|
|
372
358
|
}
|
|
373
359
|
export interface IDebankTokenExposure {
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
360
|
+
amount: number;
|
|
361
|
+
chain: string;
|
|
362
|
+
decimals: number;
|
|
363
|
+
id: IAddress;
|
|
364
|
+
logoUrl: string;
|
|
365
|
+
name: string;
|
|
366
|
+
symbol: string;
|
|
381
367
|
}
|
|
382
368
|
export interface IDebankProtocolExposure {
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
369
|
+
assetUsdValue: number;
|
|
370
|
+
chain: string;
|
|
371
|
+
debtUsdValue: number;
|
|
372
|
+
id: string;
|
|
373
|
+
logoUrl: string;
|
|
374
|
+
netUsdValue: number;
|
|
375
|
+
protocol: string;
|
|
376
|
+
siteUrl: string;
|
|
377
|
+
address: string;
|
|
378
|
+
tokenExposure: Record<string, string[] | string>;
|
|
379
|
+
protocolExposure: Record<string, string[] | string>;
|
|
394
380
|
}
|
|
395
381
|
export interface ITokenizedVaultSubaccount {
|
|
396
|
-
|
|
397
|
-
|
|
382
|
+
address: string;
|
|
383
|
+
strategist: ITokenizedVaultStrategist;
|
|
398
384
|
}
|
|
399
385
|
export type IOperatorTypeEnum = 'eoa' | 'subaccount';
|
|
400
386
|
export interface ITokenizedVaultOperator {
|
|
401
|
-
|
|
402
|
-
|
|
387
|
+
address: `0x${string}`;
|
|
388
|
+
operator_type: IOperatorTypeEnum;
|
|
403
389
|
}
|
|
404
390
|
export interface ITokenizedVaultEoaOperator {
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
391
|
+
address: string;
|
|
392
|
+
id: string;
|
|
393
|
+
name: string;
|
|
408
394
|
}
|
|
409
395
|
export interface ITokenizedVaultStrategist {
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
396
|
+
strategist_name: string;
|
|
397
|
+
strategist_logo: string;
|
|
398
|
+
id: string;
|
|
413
399
|
}
|
|
414
400
|
export interface IOTCTrade {
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
401
|
+
value: number;
|
|
402
|
+
payer: string;
|
|
403
|
+
receiver: string;
|
|
404
|
+
units: number;
|
|
405
|
+
price: number;
|
|
406
|
+
trade_name: string;
|
|
407
|
+
symbol: string;
|
|
408
|
+
strike: number;
|
|
409
|
+
expiry: string;
|
|
410
|
+
asset_type: string;
|
|
411
|
+
underlying: string;
|
|
412
|
+
average_cost: number;
|
|
427
413
|
}
|
|
428
414
|
export interface IOTCPosition {
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
415
|
+
value: number;
|
|
416
|
+
underlying: string;
|
|
417
|
+
settlement_type: string;
|
|
418
|
+
settlement_currency: string;
|
|
419
|
+
asset_type: string;
|
|
420
|
+
symbol: string;
|
|
421
|
+
trades: IOTCTrade[];
|
|
436
422
|
}
|
|
437
423
|
export interface ITokenizedVaultReward {
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
424
|
+
tokenizedvault_id: string;
|
|
425
|
+
id: string;
|
|
426
|
+
text: string;
|
|
427
|
+
img_url: string;
|
|
428
|
+
multiplier: number;
|
|
429
|
+
created_at: string;
|
|
430
|
+
start_datetime: string;
|
|
445
431
|
}
|
|
446
432
|
export interface ITokenizedVaultStrategist {
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
433
|
+
strategist_name: string;
|
|
434
|
+
strategist_logo: string;
|
|
435
|
+
id: string;
|
|
450
436
|
}
|
|
451
437
|
export interface ITokenizedVaultSubaccount {
|
|
452
|
-
|
|
453
|
-
|
|
438
|
+
address: string;
|
|
439
|
+
strategist: ITokenizedVaultStrategist;
|
|
454
440
|
}
|
|
455
441
|
export interface ITokenizedVaultReportedAPY {
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
442
|
+
apy: number;
|
|
443
|
+
underlying_apy: number;
|
|
444
|
+
liquid_apy: number;
|
|
445
|
+
points_apy: number | null;
|
|
446
|
+
rewards_compounded: number;
|
|
447
|
+
rewards_claimable: number;
|
|
448
|
+
explainer: string;
|
|
449
|
+
id: string;
|
|
450
|
+
tokenized_vault_id: string;
|
|
451
|
+
created_at: Date;
|
|
452
|
+
updated_at: Date;
|
|
467
453
|
}
|
|
468
454
|
export interface ITokenizedVaultReceiptTokenIntegration {
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
455
|
+
address: string;
|
|
456
|
+
chain: number;
|
|
457
|
+
token_class: string;
|
|
458
|
+
shorthand: string;
|
|
459
|
+
symbol: string;
|
|
460
|
+
tiingo_ticker: string;
|
|
461
|
+
img_url: string;
|
|
462
|
+
is_transferable: boolean;
|
|
463
|
+
id: string;
|
|
464
|
+
position_id: string;
|
|
465
|
+
stable_token_pair_id: string;
|
|
480
466
|
}
|
|
481
467
|
export interface IComposabilityIntegration {
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
468
|
+
name: string;
|
|
469
|
+
description: string;
|
|
470
|
+
earning_multiplier: number;
|
|
471
|
+
protocol_url: string;
|
|
472
|
+
logo_url: string;
|
|
473
|
+
tokenized_vault_id: string;
|
|
474
|
+
id: string;
|
|
489
475
|
}
|
|
490
476
|
export interface ITokenizedVault {
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
| '
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
historical_snapshots?: IHIstoricalSnapshot[];
|
|
535
|
-
max_drawdown: number | null;
|
|
536
|
-
daily_pnl_per_share: Record<string, number>;
|
|
537
|
-
latest_reported_tvl: number | null;
|
|
477
|
+
address: string;
|
|
478
|
+
yield_distributor: string;
|
|
479
|
+
chain: number;
|
|
480
|
+
enable_external_assets_update: boolean;
|
|
481
|
+
chain_type: string;
|
|
482
|
+
enabled_historical_price_horizons: any[];
|
|
483
|
+
description: string;
|
|
484
|
+
internal_type: 'lendingPool' | 'tokenizedVault' | 'tokenizedVaultV2' | 'multiAssetVault';
|
|
485
|
+
public_type: 'Lending' | 'Defi Yield' | 'Pre-deposit';
|
|
486
|
+
is_featured: boolean;
|
|
487
|
+
is_spotlighted?: boolean;
|
|
488
|
+
is_visible: boolean;
|
|
489
|
+
weekly_performance_fee_bps: number;
|
|
490
|
+
platform_fee_override: {
|
|
491
|
+
management_fee: number;
|
|
492
|
+
is_fee_waived: boolean;
|
|
493
|
+
};
|
|
494
|
+
start_datetime: Date;
|
|
495
|
+
vault_name: string;
|
|
496
|
+
vault_logo_url: string;
|
|
497
|
+
reserve_target: number;
|
|
498
|
+
reserve_tolerance: number;
|
|
499
|
+
status: 'active' | 'closed';
|
|
500
|
+
is_charge_fees_manual: boolean;
|
|
501
|
+
id: string;
|
|
502
|
+
receipt_token_symbol: string;
|
|
503
|
+
rewards: ITokenizedVaultReward[];
|
|
504
|
+
subaccounts: ITokenizedVaultSubaccount[];
|
|
505
|
+
reported_apy: ITokenizedVaultReportedAPY | null;
|
|
506
|
+
campaign_apy: number | null;
|
|
507
|
+
receipt_token_integrations: ITokenizedVaultReceiptTokenIntegration[];
|
|
508
|
+
hardcoded_strategists: ITokenizedVaultStrategist[];
|
|
509
|
+
max_daily_drawdown: number | null;
|
|
510
|
+
risk: string;
|
|
511
|
+
operators: ITokenizedVaultOperator[];
|
|
512
|
+
eoa_operators: ITokenizedVaultEoaOperator[];
|
|
513
|
+
composability_integrations?: IComposabilityIntegration[];
|
|
514
|
+
lagDuration: number;
|
|
515
|
+
historical_apy: Record<number, number> | null;
|
|
516
|
+
historical_snapshots?: IHIstoricalSnapshot[];
|
|
517
|
+
max_drawdown: number | null;
|
|
518
|
+
daily_pnl_per_share: Record<string, number>;
|
|
519
|
+
latest_reported_tvl: number | null;
|
|
538
520
|
}
|
|
539
521
|
export interface IWSVaultHistoricalApy {
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
522
|
+
data: {
|
|
523
|
+
labels: string[];
|
|
524
|
+
values: number[];
|
|
525
|
+
};
|
|
526
|
+
average_apy: number;
|
|
527
|
+
status: number;
|
|
528
|
+
error: string | null;
|
|
547
529
|
}
|
|
548
530
|
export interface IHistoricalTimeseriesPoint {
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
531
|
+
tvl: number | null;
|
|
532
|
+
daily_apy: number | null;
|
|
533
|
+
daily_pnl: number | null;
|
|
534
|
+
share_price: number | null;
|
|
535
|
+
total_assets: number | null;
|
|
536
|
+
total_shares: number | null;
|
|
537
|
+
asset_share_ratio: number | null;
|
|
538
|
+
missing: boolean;
|
|
557
539
|
}
|
|
558
540
|
export interface IHistoricalTimeseriesResponse {
|
|
559
|
-
|
|
541
|
+
data: Record<string, IHistoricalTimeseriesPoint>;
|
|
560
542
|
}
|
|
561
543
|
export {};
|