@kodiak-finance/orderly-vaults 2.8.18 → 2.8.19
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/dist/index.d.mts +92 -11
- package/dist/index.d.ts +92 -11
- package/dist/index.js +2924 -7
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +2920 -4
- package/dist/index.mjs.map +1 -1
- package/dist/styles.css +1 -1
- package/package.json +10 -10
package/dist/index.d.mts
CHANGED
|
@@ -7,26 +7,36 @@ interface VaultSupportedChain {
|
|
|
7
7
|
chain_name: string;
|
|
8
8
|
}
|
|
9
9
|
type VaultTimeRange = "24h" | "7d" | "30d" | "all_time";
|
|
10
|
+
type VaultStatus = "pre_launch" | "live" | "closing" | "closed";
|
|
10
11
|
interface VaultInfo {
|
|
11
12
|
vault_id: string;
|
|
12
13
|
vault_address: string;
|
|
13
|
-
vault_type:
|
|
14
|
+
vault_type: "protocol" | "community" | "user";
|
|
15
|
+
vault_name: string;
|
|
16
|
+
description: string;
|
|
17
|
+
sp_address: string;
|
|
18
|
+
sp_name: string | null;
|
|
19
|
+
asset: string;
|
|
20
|
+
vault_age: number | null;
|
|
21
|
+
status: VaultStatus;
|
|
22
|
+
vault_start_time: number;
|
|
14
23
|
performance_fee_rate: number;
|
|
15
24
|
supported_chains: VaultSupportedChain[];
|
|
16
25
|
tvl: number;
|
|
17
|
-
|
|
26
|
+
valid_hpr: number;
|
|
27
|
+
"30d_apy": number;
|
|
28
|
+
recovery_30d_apy: number;
|
|
29
|
+
lifetime_apy: number;
|
|
18
30
|
vault_lifetime_net_pnl: number;
|
|
19
31
|
lp_counts: number;
|
|
20
|
-
min_deposit_amount: number;
|
|
21
|
-
min_withdrawal_amount: number;
|
|
22
32
|
total_main_shares: number;
|
|
23
33
|
est_main_share_price: number;
|
|
34
|
+
lock_duration: number;
|
|
35
|
+
min_deposit_amount: number;
|
|
36
|
+
min_withdrawal_amount: number;
|
|
24
37
|
gate_threshold_pct: number;
|
|
25
38
|
gate_triggered: boolean;
|
|
26
|
-
lock_duration: number;
|
|
27
39
|
broker_id: string;
|
|
28
|
-
"30d_apr": number;
|
|
29
|
-
"30d_apy": number;
|
|
30
40
|
}
|
|
31
41
|
interface VaultLpPerformance {
|
|
32
42
|
time_range: VaultTimeRange;
|
|
@@ -42,6 +52,12 @@ interface VaultLpInfo {
|
|
|
42
52
|
available_main_shares: number;
|
|
43
53
|
potential_pnl: number;
|
|
44
54
|
}
|
|
55
|
+
interface VaultOverallInfo {
|
|
56
|
+
strategy_vaults_tvl: number;
|
|
57
|
+
strategy_vaults_lifetime_net_pnl: number;
|
|
58
|
+
strategy_vaults_count: number;
|
|
59
|
+
strategy_vaults_lp_count: number;
|
|
60
|
+
}
|
|
45
61
|
interface VaultOperation {
|
|
46
62
|
type: OperationType;
|
|
47
63
|
vault_id: string;
|
|
@@ -59,6 +75,12 @@ declare enum OperationType {
|
|
|
59
75
|
}
|
|
60
76
|
type VaultsPageConfig = {
|
|
61
77
|
headerImage?: React.ReactNode;
|
|
78
|
+
/**
|
|
79
|
+
* Custom broker_ids filter for overall vault info API.
|
|
80
|
+
* If not provided, defaults to "orderly,{current_broker_id}"
|
|
81
|
+
* @example "orderly,woofi_pro,aden"
|
|
82
|
+
*/
|
|
83
|
+
overallInfoBrokerIds?: string;
|
|
62
84
|
};
|
|
63
85
|
|
|
64
86
|
type VaultsPageProps = {
|
|
@@ -76,6 +98,17 @@ interface VaultLpPerformanceResponse {
|
|
|
76
98
|
interface VaultLpInfoResponse {
|
|
77
99
|
rows: VaultLpInfo[];
|
|
78
100
|
}
|
|
101
|
+
interface VaultOverallInfoResponse {
|
|
102
|
+
strategy_vaults_tvl: number;
|
|
103
|
+
strategy_vaults_lifetime_net_pnl: number;
|
|
104
|
+
strategy_vaults_count: number;
|
|
105
|
+
strategy_vaults_lp_count: number;
|
|
106
|
+
}
|
|
107
|
+
interface VaultInfoParams {
|
|
108
|
+
vault_id?: string;
|
|
109
|
+
status?: string;
|
|
110
|
+
broker_ids?: string;
|
|
111
|
+
}
|
|
79
112
|
interface VaultPerformanceParams {
|
|
80
113
|
vault_id: string;
|
|
81
114
|
time_range?: VaultTimeRange;
|
|
@@ -84,6 +117,9 @@ interface VaultLpInfoParams {
|
|
|
84
117
|
vault_id: string;
|
|
85
118
|
wallet_address: string;
|
|
86
119
|
}
|
|
120
|
+
interface VaultOverallInfoParams {
|
|
121
|
+
broker_ids?: string;
|
|
122
|
+
}
|
|
87
123
|
interface VaultOperationMessage {
|
|
88
124
|
payloadType: string;
|
|
89
125
|
nonce: string;
|
|
@@ -104,9 +140,10 @@ type VaultOperationRequest = {
|
|
|
104
140
|
/**
|
|
105
141
|
* Get vault information
|
|
106
142
|
* @param baseUrl - The base URL for the API endpoints
|
|
143
|
+
* @param params - Optional parameters including vault_id, status, and broker_ids filters
|
|
107
144
|
* @returns Promise<VaultInfoResponse> - Array of vault information
|
|
108
145
|
*/
|
|
109
|
-
declare function getVaultInfo(baseUrl: string): Promise<VaultInfoResponse>;
|
|
146
|
+
declare function getVaultInfo(baseUrl: string, params?: VaultInfoParams): Promise<VaultInfoResponse>;
|
|
110
147
|
/**
|
|
111
148
|
* Get vault LP performance data
|
|
112
149
|
* @param baseUrl - The base URL for the API endpoints
|
|
@@ -121,6 +158,13 @@ declare function getVaultLpPerformance(baseUrl: string, params: VaultPerformance
|
|
|
121
158
|
* @returns Promise<VaultLpInfoResponse> - Array of vault LP information
|
|
122
159
|
*/
|
|
123
160
|
declare function getVaultLpInfo(baseUrl: string, params: VaultLpInfoParams): Promise<VaultLpInfoResponse>;
|
|
161
|
+
/**
|
|
162
|
+
* Get overall statistics of all strategy vaults
|
|
163
|
+
* @param baseUrl - The base URL for the API endpoints
|
|
164
|
+
* @param params - Parameters including optional broker_ids filter
|
|
165
|
+
* @returns Promise<VaultOverallInfoResponse> - Overall statistics of all vaults
|
|
166
|
+
*/
|
|
167
|
+
declare function getVaultOverallInfo(baseUrl: string, params?: VaultOverallInfoParams): Promise<VaultOverallInfoResponse>;
|
|
124
168
|
|
|
125
169
|
interface VaultsState {
|
|
126
170
|
baseUrl: string;
|
|
@@ -129,6 +173,7 @@ interface VaultsState {
|
|
|
129
173
|
loading: boolean;
|
|
130
174
|
error: string | null;
|
|
131
175
|
lastUpdated: number | null;
|
|
176
|
+
params: VaultInfoParams | null;
|
|
132
177
|
};
|
|
133
178
|
vaultLpPerformance: {
|
|
134
179
|
data: Record<string, VaultLpPerformance[]>;
|
|
@@ -144,14 +189,23 @@ interface VaultsState {
|
|
|
144
189
|
lastUpdated: number | null;
|
|
145
190
|
params: VaultLpInfoParams | null;
|
|
146
191
|
};
|
|
192
|
+
vaultOverallInfo: {
|
|
193
|
+
data: VaultOverallInfo | null;
|
|
194
|
+
loading: boolean;
|
|
195
|
+
error: string | null;
|
|
196
|
+
lastUpdated: number | null;
|
|
197
|
+
params: VaultOverallInfoParams | null;
|
|
198
|
+
};
|
|
147
199
|
vaultsPageConfig: VaultsPageConfig | null;
|
|
148
200
|
setBaseUrl: (baseUrl: string) => void;
|
|
149
|
-
fetchVaultInfo: (baseUrl?: string) => Promise<void>;
|
|
201
|
+
fetchVaultInfo: (params?: VaultInfoParams, baseUrl?: string) => Promise<void>;
|
|
150
202
|
refreshVaultInfo: () => Promise<void>;
|
|
151
203
|
fetchVaultLpPerformance: (params: VaultPerformanceParams, baseUrl?: string) => Promise<void>;
|
|
152
204
|
refreshVaultLpPerformance: () => Promise<void>;
|
|
153
205
|
fetchVaultLpInfo: (params: VaultLpInfoParams, baseUrl?: string) => Promise<void>;
|
|
154
206
|
refreshVaultLpInfo: () => Promise<void>;
|
|
207
|
+
fetchVaultOverallInfo: (params?: VaultOverallInfoParams, baseUrl?: string) => Promise<void>;
|
|
208
|
+
refreshVaultOverallInfo: () => Promise<void>;
|
|
155
209
|
setVaultsPageConfig: (config: VaultsPageConfig) => void;
|
|
156
210
|
}
|
|
157
211
|
declare const useVaultsStore: zustand.UseBoundStore<zustand.StoreApi<VaultsState>>;
|
|
@@ -160,6 +214,7 @@ declare const useVaultInfoState: () => {
|
|
|
160
214
|
loading: boolean;
|
|
161
215
|
error: string | null;
|
|
162
216
|
lastUpdated: number | null;
|
|
217
|
+
params: VaultInfoParams | null;
|
|
163
218
|
};
|
|
164
219
|
declare const useVaultLpPerformanceState: () => {
|
|
165
220
|
data: Record<string, VaultLpPerformance[]>;
|
|
@@ -175,8 +230,15 @@ declare const useVaultLpInfoState: () => {
|
|
|
175
230
|
lastUpdated: number | null;
|
|
176
231
|
params: VaultLpInfoParams | null;
|
|
177
232
|
};
|
|
233
|
+
declare const useVaultOverallInfoState: () => {
|
|
234
|
+
data: VaultOverallInfo | null;
|
|
235
|
+
loading: boolean;
|
|
236
|
+
error: string | null;
|
|
237
|
+
lastUpdated: number | null;
|
|
238
|
+
params: VaultOverallInfoParams | null;
|
|
239
|
+
};
|
|
178
240
|
declare const useVaultInfoActions: () => {
|
|
179
|
-
fetchVaultInfo: (baseUrl?: string) => Promise<void>;
|
|
241
|
+
fetchVaultInfo: (params?: VaultInfoParams, baseUrl?: string) => Promise<void>;
|
|
180
242
|
refreshVaultInfo: () => Promise<void>;
|
|
181
243
|
};
|
|
182
244
|
declare const useVaultLpPerformanceActions: () => {
|
|
@@ -187,6 +249,10 @@ declare const useVaultLpInfoActions: () => {
|
|
|
187
249
|
fetchVaultLpInfo: (params: VaultLpInfoParams, baseUrl?: string) => Promise<void>;
|
|
188
250
|
refreshVaultLpInfo: () => Promise<void>;
|
|
189
251
|
};
|
|
252
|
+
declare const useVaultOverallInfoActions: () => {
|
|
253
|
+
fetchVaultOverallInfo: (params?: VaultOverallInfoParams, baseUrl?: string) => Promise<void>;
|
|
254
|
+
refreshVaultOverallInfo: () => Promise<void>;
|
|
255
|
+
};
|
|
190
256
|
declare const useVaultLpPerformanceById: (vaultId: string) => VaultLpPerformance[];
|
|
191
257
|
declare const useVaultLpInfoById: (vaultId: string) => VaultLpInfo[];
|
|
192
258
|
declare const useVaultLpPerformanceIds: () => string[];
|
|
@@ -200,6 +266,18 @@ declare const AllVaultsDesktop: FC<{
|
|
|
200
266
|
vaults: VaultInfo[];
|
|
201
267
|
}>;
|
|
202
268
|
|
|
269
|
+
type ViewMode = "grid" | "list";
|
|
270
|
+
interface ViewModeToggleProps {
|
|
271
|
+
mode: ViewMode;
|
|
272
|
+
onChange: (mode: ViewMode) => void;
|
|
273
|
+
}
|
|
274
|
+
declare const ViewModeToggle: FC<ViewModeToggleProps>;
|
|
275
|
+
|
|
276
|
+
interface VaultsListProps {
|
|
277
|
+
vaults: VaultInfo[];
|
|
278
|
+
}
|
|
279
|
+
declare const VaultsList: FC<VaultsListProps>;
|
|
280
|
+
|
|
203
281
|
type VaultCardWidgetProps = {
|
|
204
282
|
vault: VaultInfo;
|
|
205
283
|
};
|
|
@@ -223,14 +301,17 @@ declare const useVaultCardScript: (vault: VaultInfo) => {
|
|
|
223
301
|
availableBalance: number;
|
|
224
302
|
openVaultWebsite: () => void;
|
|
225
303
|
isWrongNetwork: boolean;
|
|
304
|
+
isButtonsDisabled: boolean;
|
|
226
305
|
};
|
|
227
306
|
type VaultCardScript = ReturnType<typeof useVaultCardScript>;
|
|
228
307
|
|
|
308
|
+
declare const formatAllTimeReturn: (status: VaultStatus, vaultAge: number | null, lifetimeApy: number) => string;
|
|
229
309
|
declare const VaultCard: FC<VaultCardScript>;
|
|
230
310
|
|
|
231
311
|
declare const ORDERLY_ICON = "https://oss.orderly.network/static/symbol_logo/ORDER.png";
|
|
232
312
|
declare const ORDERLY_VAULT_TITLE = "Orderly OmniVault";
|
|
233
313
|
declare const ORDERLY_VAULT_DESCRIPTION = "Earn passive yields effortlessly, no trading expertise required. OmniVault deploys market-making strategies, taking on liquidations, and accrue platform fees.";
|
|
314
|
+
declare const getBrokerIconUrl: (brokerId: string) => string;
|
|
234
315
|
|
|
235
316
|
declare const VaultsHeaderWidget: FC;
|
|
236
317
|
|
|
@@ -275,4 +356,4 @@ type LatestWithdrawWidgetProps = {
|
|
|
275
356
|
};
|
|
276
357
|
declare const LatestWithdrawWidget: FC<LatestWithdrawWidgetProps>;
|
|
277
358
|
|
|
278
|
-
export { AllVaultsDesktop, AllVaultsWidget, LatestDepositWidget, type LatestDepositWidgetProps, LatestWithdrawWidget, type LatestWithdrawWidgetProps, ORDERLY_ICON, ORDERLY_VAULT_DESCRIPTION, ORDERLY_VAULT_TITLE, OperationType, RoleType, VaultCard, type VaultCardScript, VaultCardWidget, type VaultCardWidgetProps, VaultDepositAndWithdraw, type VaultDepositAndWithdrawProps, VaultDepositAndWithdrawWithDialogId, VaultDepositAndWithdrawWithSheetId, VaultDepositWidget, type VaultInfo, type VaultInfoResponse, type VaultLpInfo, type VaultLpInfoParams, type VaultLpInfoResponse, type VaultLpPerformance, type VaultLpPerformanceResponse, type VaultOperation, type VaultOperationMessage, type VaultOperationRequest, type VaultPerformanceParams, type VaultSupportedChain, type VaultTimeRange, VaultWithdrawWidget, type VaultWithdrawWidgetProps, VaultsHeaderDesktop, type VaultsHeaderScript, VaultsHeaderWidget, VaultsIntroductionWidget, VaultsPage, type VaultsPageConfig, type VaultsPageProps, getVaultInfo, getVaultLpInfo, getVaultLpPerformance, useVaultCardScript, useVaultInfoActions, useVaultInfoState, useVaultLpInfoActions, useVaultLpInfoArray, useVaultLpInfoById, useVaultLpInfoIds, useVaultLpInfoState, useVaultLpPerformanceActions, useVaultLpPerformanceArray, useVaultLpPerformanceById, useVaultLpPerformanceIds, useVaultLpPerformanceState, useVaultsHeaderScript, useVaultsStore };
|
|
359
|
+
export { AllVaultsDesktop, AllVaultsWidget, LatestDepositWidget, type LatestDepositWidgetProps, LatestWithdrawWidget, type LatestWithdrawWidgetProps, ORDERLY_ICON, ORDERLY_VAULT_DESCRIPTION, ORDERLY_VAULT_TITLE, OperationType, RoleType, VaultCard, type VaultCardScript, VaultCardWidget, type VaultCardWidgetProps, VaultDepositAndWithdraw, type VaultDepositAndWithdrawProps, VaultDepositAndWithdrawWithDialogId, VaultDepositAndWithdrawWithSheetId, VaultDepositWidget, type VaultInfo, type VaultInfoParams, type VaultInfoResponse, type VaultLpInfo, type VaultLpInfoParams, type VaultLpInfoResponse, type VaultLpPerformance, type VaultLpPerformanceResponse, type VaultOperation, type VaultOperationMessage, type VaultOperationRequest, type VaultOverallInfo, type VaultOverallInfoParams, type VaultOverallInfoResponse, type VaultPerformanceParams, type VaultStatus, type VaultSupportedChain, type VaultTimeRange, VaultWithdrawWidget, type VaultWithdrawWidgetProps, VaultsHeaderDesktop, type VaultsHeaderScript, VaultsHeaderWidget, VaultsIntroductionWidget, VaultsList, VaultsPage, type VaultsPageConfig, type VaultsPageProps, type ViewMode, ViewModeToggle, formatAllTimeReturn, getBrokerIconUrl, getVaultInfo, getVaultLpInfo, getVaultLpPerformance, getVaultOverallInfo, useVaultCardScript, useVaultInfoActions, useVaultInfoState, useVaultLpInfoActions, useVaultLpInfoArray, useVaultLpInfoById, useVaultLpInfoIds, useVaultLpInfoState, useVaultLpPerformanceActions, useVaultLpPerformanceArray, useVaultLpPerformanceById, useVaultLpPerformanceIds, useVaultLpPerformanceState, useVaultOverallInfoActions, useVaultOverallInfoState, useVaultsHeaderScript, useVaultsStore };
|
package/dist/index.d.ts
CHANGED
|
@@ -7,26 +7,36 @@ interface VaultSupportedChain {
|
|
|
7
7
|
chain_name: string;
|
|
8
8
|
}
|
|
9
9
|
type VaultTimeRange = "24h" | "7d" | "30d" | "all_time";
|
|
10
|
+
type VaultStatus = "pre_launch" | "live" | "closing" | "closed";
|
|
10
11
|
interface VaultInfo {
|
|
11
12
|
vault_id: string;
|
|
12
13
|
vault_address: string;
|
|
13
|
-
vault_type:
|
|
14
|
+
vault_type: "protocol" | "community" | "user";
|
|
15
|
+
vault_name: string;
|
|
16
|
+
description: string;
|
|
17
|
+
sp_address: string;
|
|
18
|
+
sp_name: string | null;
|
|
19
|
+
asset: string;
|
|
20
|
+
vault_age: number | null;
|
|
21
|
+
status: VaultStatus;
|
|
22
|
+
vault_start_time: number;
|
|
14
23
|
performance_fee_rate: number;
|
|
15
24
|
supported_chains: VaultSupportedChain[];
|
|
16
25
|
tvl: number;
|
|
17
|
-
|
|
26
|
+
valid_hpr: number;
|
|
27
|
+
"30d_apy": number;
|
|
28
|
+
recovery_30d_apy: number;
|
|
29
|
+
lifetime_apy: number;
|
|
18
30
|
vault_lifetime_net_pnl: number;
|
|
19
31
|
lp_counts: number;
|
|
20
|
-
min_deposit_amount: number;
|
|
21
|
-
min_withdrawal_amount: number;
|
|
22
32
|
total_main_shares: number;
|
|
23
33
|
est_main_share_price: number;
|
|
34
|
+
lock_duration: number;
|
|
35
|
+
min_deposit_amount: number;
|
|
36
|
+
min_withdrawal_amount: number;
|
|
24
37
|
gate_threshold_pct: number;
|
|
25
38
|
gate_triggered: boolean;
|
|
26
|
-
lock_duration: number;
|
|
27
39
|
broker_id: string;
|
|
28
|
-
"30d_apr": number;
|
|
29
|
-
"30d_apy": number;
|
|
30
40
|
}
|
|
31
41
|
interface VaultLpPerformance {
|
|
32
42
|
time_range: VaultTimeRange;
|
|
@@ -42,6 +52,12 @@ interface VaultLpInfo {
|
|
|
42
52
|
available_main_shares: number;
|
|
43
53
|
potential_pnl: number;
|
|
44
54
|
}
|
|
55
|
+
interface VaultOverallInfo {
|
|
56
|
+
strategy_vaults_tvl: number;
|
|
57
|
+
strategy_vaults_lifetime_net_pnl: number;
|
|
58
|
+
strategy_vaults_count: number;
|
|
59
|
+
strategy_vaults_lp_count: number;
|
|
60
|
+
}
|
|
45
61
|
interface VaultOperation {
|
|
46
62
|
type: OperationType;
|
|
47
63
|
vault_id: string;
|
|
@@ -59,6 +75,12 @@ declare enum OperationType {
|
|
|
59
75
|
}
|
|
60
76
|
type VaultsPageConfig = {
|
|
61
77
|
headerImage?: React.ReactNode;
|
|
78
|
+
/**
|
|
79
|
+
* Custom broker_ids filter for overall vault info API.
|
|
80
|
+
* If not provided, defaults to "orderly,{current_broker_id}"
|
|
81
|
+
* @example "orderly,woofi_pro,aden"
|
|
82
|
+
*/
|
|
83
|
+
overallInfoBrokerIds?: string;
|
|
62
84
|
};
|
|
63
85
|
|
|
64
86
|
type VaultsPageProps = {
|
|
@@ -76,6 +98,17 @@ interface VaultLpPerformanceResponse {
|
|
|
76
98
|
interface VaultLpInfoResponse {
|
|
77
99
|
rows: VaultLpInfo[];
|
|
78
100
|
}
|
|
101
|
+
interface VaultOverallInfoResponse {
|
|
102
|
+
strategy_vaults_tvl: number;
|
|
103
|
+
strategy_vaults_lifetime_net_pnl: number;
|
|
104
|
+
strategy_vaults_count: number;
|
|
105
|
+
strategy_vaults_lp_count: number;
|
|
106
|
+
}
|
|
107
|
+
interface VaultInfoParams {
|
|
108
|
+
vault_id?: string;
|
|
109
|
+
status?: string;
|
|
110
|
+
broker_ids?: string;
|
|
111
|
+
}
|
|
79
112
|
interface VaultPerformanceParams {
|
|
80
113
|
vault_id: string;
|
|
81
114
|
time_range?: VaultTimeRange;
|
|
@@ -84,6 +117,9 @@ interface VaultLpInfoParams {
|
|
|
84
117
|
vault_id: string;
|
|
85
118
|
wallet_address: string;
|
|
86
119
|
}
|
|
120
|
+
interface VaultOverallInfoParams {
|
|
121
|
+
broker_ids?: string;
|
|
122
|
+
}
|
|
87
123
|
interface VaultOperationMessage {
|
|
88
124
|
payloadType: string;
|
|
89
125
|
nonce: string;
|
|
@@ -104,9 +140,10 @@ type VaultOperationRequest = {
|
|
|
104
140
|
/**
|
|
105
141
|
* Get vault information
|
|
106
142
|
* @param baseUrl - The base URL for the API endpoints
|
|
143
|
+
* @param params - Optional parameters including vault_id, status, and broker_ids filters
|
|
107
144
|
* @returns Promise<VaultInfoResponse> - Array of vault information
|
|
108
145
|
*/
|
|
109
|
-
declare function getVaultInfo(baseUrl: string): Promise<VaultInfoResponse>;
|
|
146
|
+
declare function getVaultInfo(baseUrl: string, params?: VaultInfoParams): Promise<VaultInfoResponse>;
|
|
110
147
|
/**
|
|
111
148
|
* Get vault LP performance data
|
|
112
149
|
* @param baseUrl - The base URL for the API endpoints
|
|
@@ -121,6 +158,13 @@ declare function getVaultLpPerformance(baseUrl: string, params: VaultPerformance
|
|
|
121
158
|
* @returns Promise<VaultLpInfoResponse> - Array of vault LP information
|
|
122
159
|
*/
|
|
123
160
|
declare function getVaultLpInfo(baseUrl: string, params: VaultLpInfoParams): Promise<VaultLpInfoResponse>;
|
|
161
|
+
/**
|
|
162
|
+
* Get overall statistics of all strategy vaults
|
|
163
|
+
* @param baseUrl - The base URL for the API endpoints
|
|
164
|
+
* @param params - Parameters including optional broker_ids filter
|
|
165
|
+
* @returns Promise<VaultOverallInfoResponse> - Overall statistics of all vaults
|
|
166
|
+
*/
|
|
167
|
+
declare function getVaultOverallInfo(baseUrl: string, params?: VaultOverallInfoParams): Promise<VaultOverallInfoResponse>;
|
|
124
168
|
|
|
125
169
|
interface VaultsState {
|
|
126
170
|
baseUrl: string;
|
|
@@ -129,6 +173,7 @@ interface VaultsState {
|
|
|
129
173
|
loading: boolean;
|
|
130
174
|
error: string | null;
|
|
131
175
|
lastUpdated: number | null;
|
|
176
|
+
params: VaultInfoParams | null;
|
|
132
177
|
};
|
|
133
178
|
vaultLpPerformance: {
|
|
134
179
|
data: Record<string, VaultLpPerformance[]>;
|
|
@@ -144,14 +189,23 @@ interface VaultsState {
|
|
|
144
189
|
lastUpdated: number | null;
|
|
145
190
|
params: VaultLpInfoParams | null;
|
|
146
191
|
};
|
|
192
|
+
vaultOverallInfo: {
|
|
193
|
+
data: VaultOverallInfo | null;
|
|
194
|
+
loading: boolean;
|
|
195
|
+
error: string | null;
|
|
196
|
+
lastUpdated: number | null;
|
|
197
|
+
params: VaultOverallInfoParams | null;
|
|
198
|
+
};
|
|
147
199
|
vaultsPageConfig: VaultsPageConfig | null;
|
|
148
200
|
setBaseUrl: (baseUrl: string) => void;
|
|
149
|
-
fetchVaultInfo: (baseUrl?: string) => Promise<void>;
|
|
201
|
+
fetchVaultInfo: (params?: VaultInfoParams, baseUrl?: string) => Promise<void>;
|
|
150
202
|
refreshVaultInfo: () => Promise<void>;
|
|
151
203
|
fetchVaultLpPerformance: (params: VaultPerformanceParams, baseUrl?: string) => Promise<void>;
|
|
152
204
|
refreshVaultLpPerformance: () => Promise<void>;
|
|
153
205
|
fetchVaultLpInfo: (params: VaultLpInfoParams, baseUrl?: string) => Promise<void>;
|
|
154
206
|
refreshVaultLpInfo: () => Promise<void>;
|
|
207
|
+
fetchVaultOverallInfo: (params?: VaultOverallInfoParams, baseUrl?: string) => Promise<void>;
|
|
208
|
+
refreshVaultOverallInfo: () => Promise<void>;
|
|
155
209
|
setVaultsPageConfig: (config: VaultsPageConfig) => void;
|
|
156
210
|
}
|
|
157
211
|
declare const useVaultsStore: zustand.UseBoundStore<zustand.StoreApi<VaultsState>>;
|
|
@@ -160,6 +214,7 @@ declare const useVaultInfoState: () => {
|
|
|
160
214
|
loading: boolean;
|
|
161
215
|
error: string | null;
|
|
162
216
|
lastUpdated: number | null;
|
|
217
|
+
params: VaultInfoParams | null;
|
|
163
218
|
};
|
|
164
219
|
declare const useVaultLpPerformanceState: () => {
|
|
165
220
|
data: Record<string, VaultLpPerformance[]>;
|
|
@@ -175,8 +230,15 @@ declare const useVaultLpInfoState: () => {
|
|
|
175
230
|
lastUpdated: number | null;
|
|
176
231
|
params: VaultLpInfoParams | null;
|
|
177
232
|
};
|
|
233
|
+
declare const useVaultOverallInfoState: () => {
|
|
234
|
+
data: VaultOverallInfo | null;
|
|
235
|
+
loading: boolean;
|
|
236
|
+
error: string | null;
|
|
237
|
+
lastUpdated: number | null;
|
|
238
|
+
params: VaultOverallInfoParams | null;
|
|
239
|
+
};
|
|
178
240
|
declare const useVaultInfoActions: () => {
|
|
179
|
-
fetchVaultInfo: (baseUrl?: string) => Promise<void>;
|
|
241
|
+
fetchVaultInfo: (params?: VaultInfoParams, baseUrl?: string) => Promise<void>;
|
|
180
242
|
refreshVaultInfo: () => Promise<void>;
|
|
181
243
|
};
|
|
182
244
|
declare const useVaultLpPerformanceActions: () => {
|
|
@@ -187,6 +249,10 @@ declare const useVaultLpInfoActions: () => {
|
|
|
187
249
|
fetchVaultLpInfo: (params: VaultLpInfoParams, baseUrl?: string) => Promise<void>;
|
|
188
250
|
refreshVaultLpInfo: () => Promise<void>;
|
|
189
251
|
};
|
|
252
|
+
declare const useVaultOverallInfoActions: () => {
|
|
253
|
+
fetchVaultOverallInfo: (params?: VaultOverallInfoParams, baseUrl?: string) => Promise<void>;
|
|
254
|
+
refreshVaultOverallInfo: () => Promise<void>;
|
|
255
|
+
};
|
|
190
256
|
declare const useVaultLpPerformanceById: (vaultId: string) => VaultLpPerformance[];
|
|
191
257
|
declare const useVaultLpInfoById: (vaultId: string) => VaultLpInfo[];
|
|
192
258
|
declare const useVaultLpPerformanceIds: () => string[];
|
|
@@ -200,6 +266,18 @@ declare const AllVaultsDesktop: FC<{
|
|
|
200
266
|
vaults: VaultInfo[];
|
|
201
267
|
}>;
|
|
202
268
|
|
|
269
|
+
type ViewMode = "grid" | "list";
|
|
270
|
+
interface ViewModeToggleProps {
|
|
271
|
+
mode: ViewMode;
|
|
272
|
+
onChange: (mode: ViewMode) => void;
|
|
273
|
+
}
|
|
274
|
+
declare const ViewModeToggle: FC<ViewModeToggleProps>;
|
|
275
|
+
|
|
276
|
+
interface VaultsListProps {
|
|
277
|
+
vaults: VaultInfo[];
|
|
278
|
+
}
|
|
279
|
+
declare const VaultsList: FC<VaultsListProps>;
|
|
280
|
+
|
|
203
281
|
type VaultCardWidgetProps = {
|
|
204
282
|
vault: VaultInfo;
|
|
205
283
|
};
|
|
@@ -223,14 +301,17 @@ declare const useVaultCardScript: (vault: VaultInfo) => {
|
|
|
223
301
|
availableBalance: number;
|
|
224
302
|
openVaultWebsite: () => void;
|
|
225
303
|
isWrongNetwork: boolean;
|
|
304
|
+
isButtonsDisabled: boolean;
|
|
226
305
|
};
|
|
227
306
|
type VaultCardScript = ReturnType<typeof useVaultCardScript>;
|
|
228
307
|
|
|
308
|
+
declare const formatAllTimeReturn: (status: VaultStatus, vaultAge: number | null, lifetimeApy: number) => string;
|
|
229
309
|
declare const VaultCard: FC<VaultCardScript>;
|
|
230
310
|
|
|
231
311
|
declare const ORDERLY_ICON = "https://oss.orderly.network/static/symbol_logo/ORDER.png";
|
|
232
312
|
declare const ORDERLY_VAULT_TITLE = "Orderly OmniVault";
|
|
233
313
|
declare const ORDERLY_VAULT_DESCRIPTION = "Earn passive yields effortlessly, no trading expertise required. OmniVault deploys market-making strategies, taking on liquidations, and accrue platform fees.";
|
|
314
|
+
declare const getBrokerIconUrl: (brokerId: string) => string;
|
|
234
315
|
|
|
235
316
|
declare const VaultsHeaderWidget: FC;
|
|
236
317
|
|
|
@@ -275,4 +356,4 @@ type LatestWithdrawWidgetProps = {
|
|
|
275
356
|
};
|
|
276
357
|
declare const LatestWithdrawWidget: FC<LatestWithdrawWidgetProps>;
|
|
277
358
|
|
|
278
|
-
export { AllVaultsDesktop, AllVaultsWidget, LatestDepositWidget, type LatestDepositWidgetProps, LatestWithdrawWidget, type LatestWithdrawWidgetProps, ORDERLY_ICON, ORDERLY_VAULT_DESCRIPTION, ORDERLY_VAULT_TITLE, OperationType, RoleType, VaultCard, type VaultCardScript, VaultCardWidget, type VaultCardWidgetProps, VaultDepositAndWithdraw, type VaultDepositAndWithdrawProps, VaultDepositAndWithdrawWithDialogId, VaultDepositAndWithdrawWithSheetId, VaultDepositWidget, type VaultInfo, type VaultInfoResponse, type VaultLpInfo, type VaultLpInfoParams, type VaultLpInfoResponse, type VaultLpPerformance, type VaultLpPerformanceResponse, type VaultOperation, type VaultOperationMessage, type VaultOperationRequest, type VaultPerformanceParams, type VaultSupportedChain, type VaultTimeRange, VaultWithdrawWidget, type VaultWithdrawWidgetProps, VaultsHeaderDesktop, type VaultsHeaderScript, VaultsHeaderWidget, VaultsIntroductionWidget, VaultsPage, type VaultsPageConfig, type VaultsPageProps, getVaultInfo, getVaultLpInfo, getVaultLpPerformance, useVaultCardScript, useVaultInfoActions, useVaultInfoState, useVaultLpInfoActions, useVaultLpInfoArray, useVaultLpInfoById, useVaultLpInfoIds, useVaultLpInfoState, useVaultLpPerformanceActions, useVaultLpPerformanceArray, useVaultLpPerformanceById, useVaultLpPerformanceIds, useVaultLpPerformanceState, useVaultsHeaderScript, useVaultsStore };
|
|
359
|
+
export { AllVaultsDesktop, AllVaultsWidget, LatestDepositWidget, type LatestDepositWidgetProps, LatestWithdrawWidget, type LatestWithdrawWidgetProps, ORDERLY_ICON, ORDERLY_VAULT_DESCRIPTION, ORDERLY_VAULT_TITLE, OperationType, RoleType, VaultCard, type VaultCardScript, VaultCardWidget, type VaultCardWidgetProps, VaultDepositAndWithdraw, type VaultDepositAndWithdrawProps, VaultDepositAndWithdrawWithDialogId, VaultDepositAndWithdrawWithSheetId, VaultDepositWidget, type VaultInfo, type VaultInfoParams, type VaultInfoResponse, type VaultLpInfo, type VaultLpInfoParams, type VaultLpInfoResponse, type VaultLpPerformance, type VaultLpPerformanceResponse, type VaultOperation, type VaultOperationMessage, type VaultOperationRequest, type VaultOverallInfo, type VaultOverallInfoParams, type VaultOverallInfoResponse, type VaultPerformanceParams, type VaultStatus, type VaultSupportedChain, type VaultTimeRange, VaultWithdrawWidget, type VaultWithdrawWidgetProps, VaultsHeaderDesktop, type VaultsHeaderScript, VaultsHeaderWidget, VaultsIntroductionWidget, VaultsList, VaultsPage, type VaultsPageConfig, type VaultsPageProps, type ViewMode, ViewModeToggle, formatAllTimeReturn, getBrokerIconUrl, getVaultInfo, getVaultLpInfo, getVaultLpPerformance, getVaultOverallInfo, useVaultCardScript, useVaultInfoActions, useVaultInfoState, useVaultLpInfoActions, useVaultLpInfoArray, useVaultLpInfoById, useVaultLpInfoIds, useVaultLpInfoState, useVaultLpPerformanceActions, useVaultLpPerformanceArray, useVaultLpPerformanceById, useVaultLpPerformanceIds, useVaultLpPerformanceState, useVaultOverallInfoActions, useVaultOverallInfoState, useVaultsHeaderScript, useVaultsStore };
|