@kodiak-finance/orderly-ui-transfer 2.7.4
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 +478 -0
- package/dist/index.d.ts +478 -0
- package/dist/index.js +70 -0
- package/dist/index.js.map +1 -0
- package/dist/index.mjs +22 -0
- package/dist/index.mjs.map +1 -0
- package/dist/styles.css +1 -0
- package/package.json +51 -0
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,478 @@
|
|
|
1
|
+
import * as react from 'react';
|
|
2
|
+
import react__default, { FC, ReactNode } from 'react';
|
|
3
|
+
import { ConnectedChain, Chain, SubAccount } from '@kodiak-finance/orderly-hooks';
|
|
4
|
+
import { API, NetworkId, AssetHistoryStatusEnum } from '@kodiak-finance/orderly-types';
|
|
5
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
6
|
+
import { InputFormatter, InputProps } from '@kodiak-finance/orderly-ui';
|
|
7
|
+
|
|
8
|
+
type DST = {
|
|
9
|
+
symbol: string;
|
|
10
|
+
address?: string;
|
|
11
|
+
decimals?: number;
|
|
12
|
+
chainId?: number;
|
|
13
|
+
network?: string;
|
|
14
|
+
};
|
|
15
|
+
declare enum DepositAction {
|
|
16
|
+
Deposit = 0,
|
|
17
|
+
Approve = 1,
|
|
18
|
+
ApproveAndDeposit = 2
|
|
19
|
+
}
|
|
20
|
+
declare enum WithdrawTo {
|
|
21
|
+
/** withdraw to web3 wallet */
|
|
22
|
+
Wallet = "wallet",
|
|
23
|
+
/** withdraw to other account id */
|
|
24
|
+
Account = "accountId"
|
|
25
|
+
}
|
|
26
|
+
type InputStatus = "error" | "warning" | "success" | "default";
|
|
27
|
+
|
|
28
|
+
type Options$2 = {
|
|
29
|
+
isNativeToken: boolean;
|
|
30
|
+
allowance: string;
|
|
31
|
+
quantity: string;
|
|
32
|
+
maxQuantity: string;
|
|
33
|
+
};
|
|
34
|
+
declare function useActionType(options: Options$2): DepositAction.Deposit | DepositAction.ApproveAndDeposit;
|
|
35
|
+
|
|
36
|
+
type CurrentChain = Pick<ConnectedChain, "namespace"> & {
|
|
37
|
+
id: number;
|
|
38
|
+
info?: Chain;
|
|
39
|
+
};
|
|
40
|
+
declare function useChainSelect(): {
|
|
41
|
+
chains: API.NetworkInfos[];
|
|
42
|
+
currentChain: CurrentChain | null;
|
|
43
|
+
settingChain: boolean;
|
|
44
|
+
onChainChange: (chain: API.NetworkInfos) => Promise<void>;
|
|
45
|
+
};
|
|
46
|
+
|
|
47
|
+
type Options$1 = {
|
|
48
|
+
quantity: string;
|
|
49
|
+
allowance?: string;
|
|
50
|
+
approve: (quantity?: string) => Promise<any>;
|
|
51
|
+
deposit: () => Promise<any>;
|
|
52
|
+
onSuccess?: () => void;
|
|
53
|
+
customDeposit?: () => Promise<any>;
|
|
54
|
+
enableCustomDeposit?: boolean;
|
|
55
|
+
};
|
|
56
|
+
declare function useDepositAction(options: Options$1): {
|
|
57
|
+
submitting: boolean;
|
|
58
|
+
onApprove: () => Promise<void>;
|
|
59
|
+
onDeposit: () => Promise<void>;
|
|
60
|
+
onApproveAndDeposit: () => Promise<void>;
|
|
61
|
+
};
|
|
62
|
+
|
|
63
|
+
type Options = {
|
|
64
|
+
quantity: string;
|
|
65
|
+
maxQuantity: string | number;
|
|
66
|
+
};
|
|
67
|
+
declare function useInputStatus(options: Options): {
|
|
68
|
+
inputStatus: InputStatus;
|
|
69
|
+
hintMessage: string | undefined;
|
|
70
|
+
};
|
|
71
|
+
|
|
72
|
+
type DepositFormScriptReturn = ReturnType<typeof useDepositFormScript>;
|
|
73
|
+
type DepositFormScriptOptions = {
|
|
74
|
+
close?: () => void;
|
|
75
|
+
};
|
|
76
|
+
declare const useDepositFormScript: (options: DepositFormScriptOptions) => {
|
|
77
|
+
sourceToken: API.TokenInfo | undefined;
|
|
78
|
+
targetToken: API.TokenInfo | undefined;
|
|
79
|
+
sourceTokens: API.TokenInfo[];
|
|
80
|
+
targetTokens: API.TokenInfo[];
|
|
81
|
+
onSourceTokenChange: react.Dispatch<react.SetStateAction<API.TokenInfo | undefined>>;
|
|
82
|
+
onTargetTokenChange: react.Dispatch<react.SetStateAction<API.TokenInfo | undefined>>;
|
|
83
|
+
amount: number;
|
|
84
|
+
isNativeToken: boolean;
|
|
85
|
+
quantity: string;
|
|
86
|
+
collateralContributionQuantity: number;
|
|
87
|
+
maxQuantity: string;
|
|
88
|
+
indexPrice: number;
|
|
89
|
+
onQuantityChange: react.Dispatch<react.SetStateAction<string>>;
|
|
90
|
+
hintMessage: string | undefined;
|
|
91
|
+
inputStatus: InputStatus;
|
|
92
|
+
chains: API.NetworkInfos[];
|
|
93
|
+
currentChain: CurrentChain | null;
|
|
94
|
+
settingChain: boolean;
|
|
95
|
+
onChainChange: (chain: API.NetworkInfos) => Promise<void>;
|
|
96
|
+
actionType: DepositAction;
|
|
97
|
+
onDeposit: () => Promise<void>;
|
|
98
|
+
onApprove: () => Promise<void>;
|
|
99
|
+
onApproveAndDeposit: () => Promise<void>;
|
|
100
|
+
fetchBalance: (address: string, decimals?: number) => Promise<string>;
|
|
101
|
+
dst: {
|
|
102
|
+
symbol: string;
|
|
103
|
+
address: string | undefined;
|
|
104
|
+
decimals: number | undefined;
|
|
105
|
+
chainId: number;
|
|
106
|
+
network: string;
|
|
107
|
+
};
|
|
108
|
+
wrongNetwork: boolean;
|
|
109
|
+
balanceRevalidating: boolean;
|
|
110
|
+
loading: boolean;
|
|
111
|
+
disabled: boolean;
|
|
112
|
+
networkId: NetworkId;
|
|
113
|
+
fee: {
|
|
114
|
+
nativeSymbol: string | undefined;
|
|
115
|
+
dstGasFee: string;
|
|
116
|
+
feeQty: string;
|
|
117
|
+
feeAmount: string;
|
|
118
|
+
dp: number;
|
|
119
|
+
};
|
|
120
|
+
collateralRatio: number;
|
|
121
|
+
currentLTV: number;
|
|
122
|
+
nextLTV: number;
|
|
123
|
+
ltv_threshold: number | undefined;
|
|
124
|
+
negative_usdc_threshold: number | undefined;
|
|
125
|
+
isConvertThresholdLoading: boolean;
|
|
126
|
+
slippage: any;
|
|
127
|
+
onSlippageChange: (value: number) => void;
|
|
128
|
+
minimumReceived: string | number;
|
|
129
|
+
usdcToken: API.TokenInfo | undefined;
|
|
130
|
+
needSwap: boolean;
|
|
131
|
+
needCrossSwap: boolean;
|
|
132
|
+
swapPrice: number;
|
|
133
|
+
markPrice: number;
|
|
134
|
+
swapFee: {
|
|
135
|
+
nativeSymbol: string | undefined;
|
|
136
|
+
feeAmount: string;
|
|
137
|
+
feeQtys: {
|
|
138
|
+
value: string | number;
|
|
139
|
+
dp: number;
|
|
140
|
+
symbol?: string;
|
|
141
|
+
}[];
|
|
142
|
+
feeDetails: {
|
|
143
|
+
value: string | number;
|
|
144
|
+
title: string;
|
|
145
|
+
description: string;
|
|
146
|
+
dp: number;
|
|
147
|
+
symbol: string | undefined;
|
|
148
|
+
}[];
|
|
149
|
+
};
|
|
150
|
+
warningMessage: string | undefined;
|
|
151
|
+
targetQuantity: string;
|
|
152
|
+
targetQuantityLoading: boolean;
|
|
153
|
+
};
|
|
154
|
+
type UseDepositFeeReturn = ReturnType<typeof useDepositFee>;
|
|
155
|
+
declare function useDepositFee(options: {
|
|
156
|
+
nativeToken?: API.TokenInfo;
|
|
157
|
+
depositFee?: bigint;
|
|
158
|
+
}): {
|
|
159
|
+
nativeSymbol: string | undefined;
|
|
160
|
+
dstGasFee: string;
|
|
161
|
+
feeQty: string;
|
|
162
|
+
feeAmount: string;
|
|
163
|
+
dp: number;
|
|
164
|
+
};
|
|
165
|
+
|
|
166
|
+
declare const DepositForm: FC<DepositFormScriptReturn>;
|
|
167
|
+
|
|
168
|
+
type DepositFormWidgetProps = DepositFormScriptOptions;
|
|
169
|
+
declare const DepositFormWidget: FC<DepositFormWidgetProps>;
|
|
170
|
+
|
|
171
|
+
type WithdrawFormScriptReturn = ReturnType<typeof useWithdrawFormScript>;
|
|
172
|
+
type WithdrawFormScriptOptions = {
|
|
173
|
+
close?: () => void;
|
|
174
|
+
};
|
|
175
|
+
declare const useWithdrawFormScript: (options: WithdrawFormScriptOptions) => {
|
|
176
|
+
currentLTV: number;
|
|
177
|
+
nextLTV: number;
|
|
178
|
+
ltvWarningMessage: string;
|
|
179
|
+
withdrawTo: WithdrawTo;
|
|
180
|
+
setWithdrawTo: react.Dispatch<react.SetStateAction<WithdrawTo>>;
|
|
181
|
+
toAccountId: string;
|
|
182
|
+
setToAccountId: react.Dispatch<react.SetStateAction<string>>;
|
|
183
|
+
onTransfer: () => void;
|
|
184
|
+
internalWithdrawSubmitting: boolean;
|
|
185
|
+
toAccountIdInputStatus: InputStatus;
|
|
186
|
+
toAccountIdHintMessage: string | undefined;
|
|
187
|
+
walletName: string | undefined;
|
|
188
|
+
address: string | undefined;
|
|
189
|
+
quantity: string;
|
|
190
|
+
onQuantityChange: (qty: string) => void;
|
|
191
|
+
sourceToken: API.TokenInfo | undefined;
|
|
192
|
+
onSourceTokenChange: react.Dispatch<react.SetStateAction<API.TokenInfo | undefined>>;
|
|
193
|
+
sourceTokens: API.TokenInfo[];
|
|
194
|
+
inputStatus: InputStatus;
|
|
195
|
+
hintMessage: string | undefined;
|
|
196
|
+
amount: number;
|
|
197
|
+
balanceRevalidating: boolean;
|
|
198
|
+
maxQuantity: number;
|
|
199
|
+
disabled: boolean;
|
|
200
|
+
loading: boolean;
|
|
201
|
+
unsettledPnL: number;
|
|
202
|
+
wrongNetwork: boolean;
|
|
203
|
+
settingChain: boolean;
|
|
204
|
+
tokenChains: API.NetworkInfos[];
|
|
205
|
+
currentChain: CurrentChain | null;
|
|
206
|
+
onChainChange: (chain: API.NetworkInfos) => Promise<void>;
|
|
207
|
+
onWithdraw: () => Promise<void>;
|
|
208
|
+
chainVaultBalance: number | null;
|
|
209
|
+
fee: number;
|
|
210
|
+
crossChainWithdraw: boolean;
|
|
211
|
+
crossChainTrans: boolean;
|
|
212
|
+
showQty: string | number;
|
|
213
|
+
networkId: NetworkId;
|
|
214
|
+
checkIsBridgeless: boolean;
|
|
215
|
+
hasPositions: boolean;
|
|
216
|
+
onSettlePnl: () => Promise<any>;
|
|
217
|
+
brokerName: string;
|
|
218
|
+
qtyGreaterThanMaxAmount: boolean;
|
|
219
|
+
qtyGreaterThanVault: boolean;
|
|
220
|
+
vaultBalanceList: API.VaultBalance[] | undefined;
|
|
221
|
+
};
|
|
222
|
+
|
|
223
|
+
type WithdrawFormProps = WithdrawFormScriptReturn;
|
|
224
|
+
declare const WithdrawForm: react__default.FC<WithdrawFormProps>;
|
|
225
|
+
|
|
226
|
+
type WithdrawFormWidgetProps = WithdrawFormScriptOptions;
|
|
227
|
+
declare const WithdrawFormWidget: FC<WithdrawFormWidgetProps>;
|
|
228
|
+
|
|
229
|
+
declare const DepositAndWithdrawWithDialogId = "DepositAndWithdrawWithDialogId";
|
|
230
|
+
declare const DepositAndWithdrawWithSheetId = "DepositAndWithdrawWithSheetId";
|
|
231
|
+
type DepositAndWithdrawProps = {
|
|
232
|
+
activeTab?: "deposit" | "withdraw";
|
|
233
|
+
close?: () => void;
|
|
234
|
+
};
|
|
235
|
+
declare const DepositAndWithdraw: FC<DepositAndWithdrawProps>;
|
|
236
|
+
|
|
237
|
+
type UseSwapDepositFormScriptReturn = ReturnType<typeof useSwapDepositFormScript>;
|
|
238
|
+
type UseSwapDepositFormScriptOptions = {
|
|
239
|
+
onClose?: () => void;
|
|
240
|
+
};
|
|
241
|
+
declare const useSwapDepositFormScript: (options: UseSwapDepositFormScriptOptions) => {
|
|
242
|
+
token: API.TokenInfo | undefined;
|
|
243
|
+
tokens: API.TokenInfo[];
|
|
244
|
+
onTokenChange: react.Dispatch<react.SetStateAction<API.TokenInfo | undefined>>;
|
|
245
|
+
amount: number;
|
|
246
|
+
quantity: string;
|
|
247
|
+
maxQuantity: string;
|
|
248
|
+
swapQuantity: string;
|
|
249
|
+
onQuantityChange: react.Dispatch<react.SetStateAction<string>>;
|
|
250
|
+
hintMessage: string | undefined;
|
|
251
|
+
inputStatus: InputStatus;
|
|
252
|
+
chains: API.NetworkInfos[];
|
|
253
|
+
currentChain: CurrentChain | null;
|
|
254
|
+
settingChain: boolean;
|
|
255
|
+
onChainChange: (chain: API.NetworkInfos) => Promise<void>;
|
|
256
|
+
actionType: DepositAction;
|
|
257
|
+
onDeposit: () => Promise<void>;
|
|
258
|
+
onApprove: () => Promise<void>;
|
|
259
|
+
fetchBalance: (address: string, decimals?: number) => Promise<string>;
|
|
260
|
+
dst: {
|
|
261
|
+
symbol: string;
|
|
262
|
+
address: string | undefined;
|
|
263
|
+
decimals: number | undefined;
|
|
264
|
+
chainId: number;
|
|
265
|
+
network: string;
|
|
266
|
+
};
|
|
267
|
+
wrongNetwork: boolean;
|
|
268
|
+
balanceRevalidating: boolean;
|
|
269
|
+
loading: boolean;
|
|
270
|
+
disabled: boolean;
|
|
271
|
+
networkId: NetworkId;
|
|
272
|
+
slippage: any;
|
|
273
|
+
onSlippageChange: (value: number) => void;
|
|
274
|
+
needSwap: boolean;
|
|
275
|
+
needCrossSwap: boolean;
|
|
276
|
+
swapPrice: number;
|
|
277
|
+
swapRevalidating: boolean;
|
|
278
|
+
warningMessage: string;
|
|
279
|
+
fee: {
|
|
280
|
+
nativeSymbol: string | undefined;
|
|
281
|
+
feeAmount: string;
|
|
282
|
+
feeQtys: {
|
|
283
|
+
value: string | number;
|
|
284
|
+
dp: number;
|
|
285
|
+
symbol?: string;
|
|
286
|
+
}[];
|
|
287
|
+
feeDetails: {
|
|
288
|
+
value: string | number;
|
|
289
|
+
title: string;
|
|
290
|
+
description: string;
|
|
291
|
+
dp: number;
|
|
292
|
+
symbol: string | undefined;
|
|
293
|
+
}[];
|
|
294
|
+
};
|
|
295
|
+
};
|
|
296
|
+
|
|
297
|
+
declare const SwapDepositForm: FC<UseSwapDepositFormScriptReturn>;
|
|
298
|
+
|
|
299
|
+
type SwapDepositFormWidgetProps = UseSwapDepositFormScriptOptions;
|
|
300
|
+
declare const SwapDepositFormWidget: FC<SwapDepositFormWidgetProps>;
|
|
301
|
+
|
|
302
|
+
type TransferFormScriptReturn = ReturnType<typeof useTransferFormScript>;
|
|
303
|
+
type TransferFormScriptOptions = {
|
|
304
|
+
/** target sub account id */
|
|
305
|
+
toAccountId?: string;
|
|
306
|
+
token?: string;
|
|
307
|
+
close?: () => void;
|
|
308
|
+
};
|
|
309
|
+
declare const useTransferFormScript: (options: TransferFormScriptOptions) => {
|
|
310
|
+
networkId: NetworkId;
|
|
311
|
+
onTransfer: () => void;
|
|
312
|
+
quantity: string;
|
|
313
|
+
amount: number;
|
|
314
|
+
onQuantityChange: react.Dispatch<react.SetStateAction<string>>;
|
|
315
|
+
maxQuantity: number;
|
|
316
|
+
tokens: API.TokenInfo[];
|
|
317
|
+
token: API.TokenInfo;
|
|
318
|
+
onTokenChange: react.Dispatch<react.SetStateAction<API.TokenInfo>>;
|
|
319
|
+
disabled: boolean;
|
|
320
|
+
submitting: boolean;
|
|
321
|
+
hintMessage: string | undefined;
|
|
322
|
+
inputStatus: InputStatus;
|
|
323
|
+
hasPositions: boolean;
|
|
324
|
+
onSettlePnl: () => Promise<any>;
|
|
325
|
+
unsettledPnL: number | undefined;
|
|
326
|
+
toAccountAsset: number;
|
|
327
|
+
fromAccount: SubAccount | undefined;
|
|
328
|
+
toAccount: SubAccount | undefined;
|
|
329
|
+
fromAccounts: SubAccount[];
|
|
330
|
+
onFromAccountChange: (account: SubAccount) => void;
|
|
331
|
+
toAccounts: SubAccount[] | undefined;
|
|
332
|
+
onToAccountChange: (account: SubAccount) => void;
|
|
333
|
+
onExchange: () => void;
|
|
334
|
+
isMainAccount: boolean;
|
|
335
|
+
};
|
|
336
|
+
|
|
337
|
+
type TransferFormProps = TransferFormScriptReturn;
|
|
338
|
+
declare const TransferForm: FC<TransferFormProps>;
|
|
339
|
+
|
|
340
|
+
declare const TransferDialogId = "TransferDialogId";
|
|
341
|
+
declare const TransferSheetId = "TransferSheetId";
|
|
342
|
+
type TransferFormWidgetProps = TransferFormScriptOptions;
|
|
343
|
+
declare const TransferFormWidget: (props: TransferFormWidgetProps) => react_jsx_runtime.JSX.Element;
|
|
344
|
+
declare const TransferWidget: FC<TransferFormWidgetProps>;
|
|
345
|
+
|
|
346
|
+
type ConvertFormScriptReturn = ReturnType<typeof useConvertFormScript>;
|
|
347
|
+
interface ConvertFormScriptOptions {
|
|
348
|
+
token?: string;
|
|
349
|
+
close?: () => void;
|
|
350
|
+
}
|
|
351
|
+
declare const useConvertFormScript: (options: ConvertFormScriptOptions) => {
|
|
352
|
+
walletName: string | undefined;
|
|
353
|
+
address: string | undefined;
|
|
354
|
+
quantity: string;
|
|
355
|
+
onQuantityChange: (qty: string) => void;
|
|
356
|
+
token: API.Chain;
|
|
357
|
+
sourceTokens: API.Chain[];
|
|
358
|
+
onSourceTokenChange: react.Dispatch<react.SetStateAction<API.Chain | undefined>>;
|
|
359
|
+
targetToken: API.Chain | undefined;
|
|
360
|
+
balanceRevalidating: boolean;
|
|
361
|
+
maxQuantity: number;
|
|
362
|
+
disabled: boolean;
|
|
363
|
+
loading: boolean;
|
|
364
|
+
wrongNetwork: boolean;
|
|
365
|
+
onConvert: () => Promise<void>;
|
|
366
|
+
hasPositions: boolean;
|
|
367
|
+
onSettlePnl: () => Promise<any>;
|
|
368
|
+
networkId: NetworkId;
|
|
369
|
+
slippage: any;
|
|
370
|
+
onSlippageChange: (value: number) => void;
|
|
371
|
+
convertRate: string;
|
|
372
|
+
minimumReceived: number;
|
|
373
|
+
outAmounts: string;
|
|
374
|
+
isQuoteLoading: boolean;
|
|
375
|
+
currentLTV: number;
|
|
376
|
+
nextLTV: number;
|
|
377
|
+
};
|
|
378
|
+
|
|
379
|
+
type ConvertFormProps = ConvertFormScriptReturn;
|
|
380
|
+
declare const ConvertFormUI: react__default.FC<ConvertFormProps>;
|
|
381
|
+
|
|
382
|
+
declare const ConvertFormWidget: react__default.FC<ConvertFormScriptOptions>;
|
|
383
|
+
|
|
384
|
+
declare const getTokenByTokenList: (tokens?: API.TokenInfo[]) => API.TokenInfo;
|
|
385
|
+
declare const feeDecimalsOffset: (origin?: number) => number;
|
|
386
|
+
declare function checkIsAccountId(accountId: string): boolean;
|
|
387
|
+
declare function getTransferErrorMessage(errorCode: number): string;
|
|
388
|
+
|
|
389
|
+
type ChainSelectProps = {
|
|
390
|
+
chains: API.NetworkInfos[];
|
|
391
|
+
value: CurrentChain;
|
|
392
|
+
onValueChange: (chain: API.NetworkInfos) => Promise<void>;
|
|
393
|
+
wrongNetwork: boolean;
|
|
394
|
+
loading?: boolean;
|
|
395
|
+
};
|
|
396
|
+
declare const ChainSelect: React.FC<ChainSelectProps>;
|
|
397
|
+
|
|
398
|
+
type QuantityInputProps = {
|
|
399
|
+
token?: API.TokenInfo;
|
|
400
|
+
tokens?: API.TokenInfo[];
|
|
401
|
+
label?: string;
|
|
402
|
+
status?: InputStatus;
|
|
403
|
+
hintMessage?: string;
|
|
404
|
+
onValueChange?: (value: string) => void;
|
|
405
|
+
onTokenChange?: (token: any) => void;
|
|
406
|
+
fetchBalance?: (token: string, decimals: number) => Promise<any>;
|
|
407
|
+
loading?: boolean;
|
|
408
|
+
testId?: string;
|
|
409
|
+
formatters?: InputFormatter[];
|
|
410
|
+
vaultBalanceList?: API.VaultBalance[];
|
|
411
|
+
displayType?: "balance" | "vaultBalance";
|
|
412
|
+
} & Omit<InputProps, "onClear" | "suffix" | "onValueChange">;
|
|
413
|
+
declare const QuantityInput: FC<QuantityInputProps>;
|
|
414
|
+
|
|
415
|
+
type AvailableQuantityProps = {
|
|
416
|
+
token?: Partial<API.TokenInfo>;
|
|
417
|
+
amount?: number | string;
|
|
418
|
+
maxQuantity?: number | string;
|
|
419
|
+
onClick?: () => void;
|
|
420
|
+
loading?: boolean;
|
|
421
|
+
};
|
|
422
|
+
declare const AvailableQuantity: FC<AvailableQuantityProps>;
|
|
423
|
+
|
|
424
|
+
declare const Web3Wallet: FC;
|
|
425
|
+
|
|
426
|
+
declare const BrokerWallet: FC;
|
|
427
|
+
|
|
428
|
+
type ExchangeDividerProps = {
|
|
429
|
+
icon?: ReactNode;
|
|
430
|
+
};
|
|
431
|
+
declare const ExchangeDivider: FC<ExchangeDividerProps>;
|
|
432
|
+
|
|
433
|
+
interface SwapCoinProps {
|
|
434
|
+
className?: string;
|
|
435
|
+
sourceSymbol?: string;
|
|
436
|
+
targetSymbol?: string;
|
|
437
|
+
indexPrice: number | string;
|
|
438
|
+
precision?: number;
|
|
439
|
+
}
|
|
440
|
+
declare const SwapCoin: FC<SwapCoinProps>;
|
|
441
|
+
|
|
442
|
+
type ActionButtonProps = {
|
|
443
|
+
disabled?: boolean;
|
|
444
|
+
loading?: boolean;
|
|
445
|
+
actionType: DepositAction;
|
|
446
|
+
symbol?: string;
|
|
447
|
+
onDeposit?: () => void;
|
|
448
|
+
onApprove?: () => void;
|
|
449
|
+
onApproveAndDeposit?: () => void;
|
|
450
|
+
networkId?: NetworkId;
|
|
451
|
+
};
|
|
452
|
+
declare const ActionButton: react__default.FC<ActionButtonProps>;
|
|
453
|
+
|
|
454
|
+
declare const Fee: FC<Partial<UseDepositFeeReturn>>;
|
|
455
|
+
|
|
456
|
+
type DepositStatusScriptReturn = ReturnType<typeof useDepositStatusScript>;
|
|
457
|
+
declare function useDepositStatusScript(): {
|
|
458
|
+
pendingCount: number;
|
|
459
|
+
completedCount: number;
|
|
460
|
+
canTrade: boolean;
|
|
461
|
+
estimatedTime: string | number;
|
|
462
|
+
onClose: (status: AssetHistoryStatusEnum) => void;
|
|
463
|
+
};
|
|
464
|
+
|
|
465
|
+
type DepositStatusProps = {
|
|
466
|
+
className?: string;
|
|
467
|
+
classNames?: {
|
|
468
|
+
root?: string;
|
|
469
|
+
items?: string;
|
|
470
|
+
};
|
|
471
|
+
onClick?: () => void;
|
|
472
|
+
} & DepositStatusScriptReturn;
|
|
473
|
+
declare const DepositStatus: react__default.FC<DepositStatusProps>;
|
|
474
|
+
|
|
475
|
+
type DepositStatusWidgetProps = Pick<DepositStatusProps, "className" | "onClick">;
|
|
476
|
+
declare const DepositStatusWidget: react__default.FC<DepositStatusWidgetProps>;
|
|
477
|
+
|
|
478
|
+
export { ActionButton, AvailableQuantity, BrokerWallet, ChainSelect, type ConvertFormProps, ConvertFormUI, ConvertFormWidget, type CurrentChain, type DST, DepositAction, DepositAndWithdraw, type DepositAndWithdrawProps, DepositAndWithdrawWithDialogId, DepositAndWithdrawWithSheetId, DepositForm, type DepositFormScriptOptions, DepositFormWidget, type DepositFormWidgetProps, DepositStatus, DepositStatusWidget, ExchangeDivider, Fee, type InputStatus, QuantityInput, SwapCoin, SwapDepositForm, SwapDepositFormWidget, TransferDialogId, TransferForm, TransferFormWidget, type TransferFormWidgetProps, TransferSheetId, TransferWidget, Web3Wallet, WithdrawForm, type WithdrawFormScriptOptions, WithdrawFormWidget, type WithdrawFormWidgetProps, WithdrawTo, checkIsAccountId, feeDecimalsOffset, getTokenByTokenList, getTransferErrorMessage, useActionType, useChainSelect, useConvertFormScript as useConvertForm, useDepositAction, useDepositFormScript, useDepositStatusScript, useInputStatus, useSwapDepositFormScript, useTransferFormScript, useWithdrawFormScript };
|