@edgex-web/components 0.1.0-beta.3 → 0.1.0-beta.31
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/ccip-DOFg6QiX.mjs +150 -0
- package/dist/ccip-DOFg6QiX.mjs.map +1 -0
- package/dist/components/Deposit/index.d.ts +4 -6
- package/dist/components/Deposit/index.d.ts.map +1 -1
- package/dist/components/Deposit/src/DepositManager.d.ts +2 -0
- package/dist/components/Deposit/src/DepositManager.d.ts.map +1 -1
- package/dist/components/Deposit/src/{EVMWalletView.d.ts → evm/WalletView.d.ts} +7 -7
- package/dist/components/Deposit/src/evm/WalletView.d.ts.map +1 -0
- package/dist/components/Deposit/src/evm/index.d.ts +33 -0
- package/dist/components/Deposit/src/evm/index.d.ts.map +1 -0
- package/dist/components/Deposit/src/hooks/useMulticallBalance.d.ts +69 -0
- package/dist/components/Deposit/src/hooks/useMulticallBalance.d.ts.map +1 -0
- package/dist/components/Deposit/src/index.d.ts.map +1 -1
- package/dist/components/Deposit/src/{MPCWalletView.d.ts → mpc/WalletView.d.ts} +3 -4
- package/dist/components/Deposit/src/mpc/WalletView.d.ts.map +1 -0
- package/dist/components/Deposit/src/mpc/index.d.ts +23 -0
- package/dist/components/Deposit/src/mpc/index.d.ts.map +1 -0
- package/dist/components/Deposit/src/selector/Asset.d.ts +19 -0
- package/dist/components/Deposit/src/selector/Asset.d.ts.map +1 -0
- package/dist/components/Deposit/src/selector/Chain.d.ts +16 -0
- package/dist/components/Deposit/src/selector/Chain.d.ts.map +1 -0
- package/dist/components/Deposit/src/selector/index.d.ts +14 -0
- package/dist/components/Deposit/src/selector/index.d.ts.map +1 -0
- package/dist/components/Deposit/src/utils.d.ts +62 -1
- package/dist/components/Deposit/src/utils.d.ts.map +1 -1
- package/dist/components/Deposit/src/walletAdapters.d.ts.map +1 -1
- package/dist/components/Deposit/test-arbitrum-token-limits.d.ts +5 -0
- package/dist/components/Deposit/test-arbitrum-token-limits.d.ts.map +1 -0
- package/dist/components/Deposit/test-arbitrum-unlimited.d.ts +5 -0
- package/dist/components/Deposit/test-arbitrum-unlimited.d.ts.map +1 -0
- package/dist/components/Deposit/types/index.d.ts +63 -49
- package/dist/components/Deposit/types/index.d.ts.map +1 -1
- package/dist/components/Deposit/utils/migrateDepositData.d.ts +42 -0
- package/dist/components/Deposit/utils/migrateDepositData.d.ts.map +1 -0
- package/dist/components/LoadingSpinner/LoadingSpinner.d.ts +19 -0
- package/dist/components/LoadingSpinner/LoadingSpinner.d.ts.map +1 -0
- package/dist/components/LoadingSpinner/index.d.ts +4 -0
- package/dist/components/LoadingSpinner/index.d.ts.map +1 -0
- package/dist/components/Provider/index.d.ts +6 -1
- package/dist/components/Provider/index.d.ts.map +1 -1
- package/dist/components/Tooltip/index.d.ts +3 -0
- package/dist/components/Tooltip/index.d.ts.map +1 -0
- package/dist/components/Tooltip/src/Tooltip.d.ts +5 -0
- package/dist/components/Tooltip/src/Tooltip.d.ts.map +1 -0
- package/dist/components/Tooltip/src/TooltipArrow.d.ts +5 -0
- package/dist/components/Tooltip/src/TooltipArrow.d.ts.map +1 -0
- package/dist/components/Tooltip/src/index.d.ts +3 -0
- package/dist/components/Tooltip/src/index.d.ts.map +1 -0
- package/dist/components/Tooltip/types/index.d.ts +52 -0
- package/dist/components/Tooltip/types/index.d.ts.map +1 -0
- package/dist/components/Withdraw/constants/index.d.ts +7 -0
- package/dist/components/Withdraw/constants/index.d.ts.map +1 -0
- package/dist/components/Withdraw/index.d.ts +6 -10
- package/dist/components/Withdraw/index.d.ts.map +1 -1
- package/dist/components/Withdraw/src/Speed.d.ts +10 -0
- package/dist/components/Withdraw/src/Speed.d.ts.map +1 -0
- package/dist/components/Withdraw/src/WithdrawManager.d.ts +12 -0
- package/dist/components/Withdraw/src/WithdrawManager.d.ts.map +1 -0
- package/dist/components/Withdraw/src/constants.d.ts +24 -0
- package/dist/components/Withdraw/src/constants.d.ts.map +1 -0
- package/dist/components/Withdraw/src/evm/WalletView.d.ts +22 -0
- package/dist/components/Withdraw/src/evm/WalletView.d.ts.map +1 -0
- package/dist/components/Withdraw/src/evm/index.d.ts +34 -0
- package/dist/components/Withdraw/src/evm/index.d.ts.map +1 -0
- package/dist/components/Withdraw/src/index.d.ts +5 -0
- package/dist/components/Withdraw/src/index.d.ts.map +1 -0
- package/dist/components/Withdraw/types/index.d.ts +83 -0
- package/dist/components/Withdraw/types/index.d.ts.map +1 -0
- package/dist/hooks/index.d.ts +1 -0
- package/dist/hooks/index.d.ts.map +1 -1
- package/dist/hooks/useTranslation.d.ts +135 -0
- package/dist/hooks/useTranslation.d.ts.map +1 -0
- package/dist/index-B_-QpzAE.mjs +20192 -0
- package/dist/index-B_-QpzAE.mjs.map +1 -0
- package/dist/index.d.ts +11 -4
- package/dist/index.d.ts.map +1 -1
- package/dist/index.esm.js +30 -7269
- package/dist/index.esm.js.map +1 -1
- package/dist/index.umd.js +99 -60
- package/dist/index.umd.js.map +1 -1
- package/dist/locales/en-US.d.ts +50 -0
- package/dist/locales/en-US.d.ts.map +1 -0
- package/dist/locales/index.d.ts +16 -0
- package/dist/locales/index.d.ts.map +1 -0
- package/dist/locales/ja-JP.d.ts +50 -0
- package/dist/locales/ja-JP.d.ts.map +1 -0
- package/dist/locales/ru-RU.d.ts +50 -0
- package/dist/locales/ru-RU.d.ts.map +1 -0
- package/dist/locales/zh-CN.d.ts +51 -0
- package/dist/locales/zh-CN.d.ts.map +1 -0
- package/dist/locales/zh-TW.d.ts +50 -0
- package/dist/locales/zh-TW.d.ts.map +1 -0
- package/dist/style.css +1 -0
- package/dist/types/index.d.ts +22 -11
- package/dist/types/index.d.ts.map +1 -1
- package/dist/utils/index.d.ts +14 -0
- package/dist/utils/index.d.ts.map +1 -0
- package/package.json +12 -5
- package/dist/components/Deposit/src/ChainSelector.d.ts +0 -35
- package/dist/components/Deposit/src/ChainSelector.d.ts.map +0 -1
- package/dist/components/Deposit/src/ChainTokenSelector.d.ts +0 -25
- package/dist/components/Deposit/src/ChainTokenSelector.d.ts.map +0 -1
- package/dist/components/Deposit/src/Deposit.d.ts +0 -17
- package/dist/components/Deposit/src/Deposit.d.ts.map +0 -1
- package/dist/components/Deposit/src/EVMWalletView.d.ts.map +0 -1
- package/dist/components/Deposit/src/MPCWalletView.d.ts.map +0 -1
- package/dist/components/Deposit/src/components.d.ts +0 -89
- package/dist/components/Deposit/src/components.d.ts.map +0 -1
|
@@ -1,11 +1,17 @@
|
|
|
1
|
-
import { DepositConfig } from '../../../types';
|
|
1
|
+
import { DepositConfig, ChainInfo } from '../../../types';
|
|
2
2
|
|
|
3
|
+
export interface DepositResult {
|
|
4
|
+
chainId: number;
|
|
5
|
+
tokenAddress: string;
|
|
6
|
+
amount: string;
|
|
7
|
+
txHash?: string;
|
|
8
|
+
}
|
|
3
9
|
export interface DepositProps {
|
|
4
10
|
isOpen: boolean;
|
|
11
|
+
isLoading?: boolean;
|
|
5
12
|
onClose: () => void;
|
|
6
13
|
config: DepositConfig;
|
|
7
14
|
children?: React.ReactNode;
|
|
8
|
-
isWalletConnected?: boolean;
|
|
9
15
|
currentActiveAccount?: {
|
|
10
16
|
wallet: 'mpc' | 'evm';
|
|
11
17
|
ethAddress: string;
|
|
@@ -15,76 +21,84 @@ export interface DepositProps {
|
|
|
15
21
|
smartWallet?: {
|
|
16
22
|
address: string;
|
|
17
23
|
};
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
tokenAddress: string;
|
|
23
|
-
}>;
|
|
24
|
-
chains?: Array<{
|
|
25
|
-
chainId: number;
|
|
26
|
-
chain: string;
|
|
27
|
-
chainIconUrl: string;
|
|
28
|
-
allowDeposit: boolean;
|
|
29
|
-
blockTime: number;
|
|
30
|
-
txConfirm: number;
|
|
31
|
-
}>;
|
|
32
|
-
currentActiveChain?: {
|
|
33
|
-
chainId: number;
|
|
34
|
-
chain: string;
|
|
35
|
-
blockTime: number;
|
|
36
|
-
txConfirm: number;
|
|
37
|
-
};
|
|
38
|
-
approved?: boolean;
|
|
39
|
-
depositAmount?: string;
|
|
40
|
-
curSelectToken?: string;
|
|
41
|
-
curSelectTokenData?: {
|
|
42
|
-
balance?: {
|
|
43
|
-
formatted: string;
|
|
44
|
-
};
|
|
45
|
-
allowance?: {
|
|
46
|
-
formatted: string;
|
|
47
|
-
};
|
|
48
|
-
};
|
|
24
|
+
chains: ChainInfo[];
|
|
25
|
+
defaultChainId?: number;
|
|
26
|
+
defaultTokenAddress?: string;
|
|
27
|
+
defaultAmount?: string;
|
|
49
28
|
metadata?: {
|
|
50
29
|
multiChain?: {
|
|
51
30
|
minDeposit: number;
|
|
52
31
|
};
|
|
53
32
|
};
|
|
54
33
|
currentEquity?: number;
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
34
|
+
platformBalance?: string;
|
|
35
|
+
wagmiHooks?: {
|
|
36
|
+
useBalance: any;
|
|
37
|
+
useReadContract: any;
|
|
38
|
+
useAccount: any;
|
|
39
|
+
};
|
|
40
|
+
approved?: boolean;
|
|
41
|
+
onApproved?: () => void | Promise<void>;
|
|
42
|
+
onDeposit?: (depositInfo: {
|
|
43
|
+
amount: string;
|
|
44
|
+
chainId: number;
|
|
45
|
+
tokenAddress: string;
|
|
46
|
+
tokenSymbol: string;
|
|
47
|
+
}) => void;
|
|
48
|
+
onCopy?: (address: string) => void;
|
|
58
49
|
onChainChange?: (chainId: number) => void;
|
|
59
|
-
|
|
60
|
-
onDeposit?: () => Promise<void>;
|
|
50
|
+
onTokenChange?: (tokenSymbol: string) => void;
|
|
61
51
|
}
|
|
62
52
|
export interface OpenDepositOptions {
|
|
63
53
|
config?: DepositConfig;
|
|
64
54
|
isWalletConnected?: boolean;
|
|
65
55
|
currentActiveAccount?: DepositProps['currentActiveAccount'];
|
|
66
56
|
smartWallet?: DepositProps['smartWallet'];
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
depositAmount?: string;
|
|
72
|
-
curSelectToken?: string;
|
|
73
|
-
curSelectTokenData?: DepositProps['curSelectTokenData'];
|
|
57
|
+
chains: ChainInfo[];
|
|
58
|
+
defaultChainId?: number;
|
|
59
|
+
defaultTokenAddress?: string;
|
|
60
|
+
defaultAmount?: string;
|
|
74
61
|
metadata?: DepositProps['metadata'];
|
|
75
62
|
currentEquity?: number;
|
|
63
|
+
platformBalance?: string;
|
|
64
|
+
wagmiHooks?: DepositProps['wagmiHooks'];
|
|
65
|
+
approved?: boolean;
|
|
66
|
+
onApproved?: () => void | Promise<void>;
|
|
67
|
+
curSelectToken?: string;
|
|
68
|
+
currentActiveChain?: any;
|
|
69
|
+
depositAmount?: string;
|
|
70
|
+
tokens?: any[];
|
|
71
|
+
curSelectTokenData?: any;
|
|
76
72
|
amount?: string;
|
|
77
|
-
|
|
73
|
+
onDeposit?: (depositInfo: {
|
|
74
|
+
amount: string;
|
|
75
|
+
chainId: number;
|
|
76
|
+
tokenAddress: string;
|
|
77
|
+
tokenSymbol: string;
|
|
78
|
+
}) => void;
|
|
79
|
+
onCopy?: (address: string) => void;
|
|
80
|
+
onClose?: () => void;
|
|
78
81
|
onTokenChange?: (token: string) => void;
|
|
79
82
|
onChainChange?: (chainId: number) => void;
|
|
83
|
+
onDepositAmountChange?: (amount: string) => void;
|
|
80
84
|
onApprove?: () => Promise<void>;
|
|
81
|
-
|
|
82
|
-
|
|
85
|
+
}
|
|
86
|
+
export interface DepositInternalState {
|
|
87
|
+
selectedChainId: number;
|
|
88
|
+
selectedTokenAddress: string;
|
|
89
|
+
amount: string;
|
|
90
|
+
isLoading: boolean;
|
|
91
|
+
error: string | null;
|
|
92
|
+
txHash: string | null;
|
|
93
|
+
selectedChain?: ChainInfo;
|
|
94
|
+
selectedToken?: ChainInfo['tokenList'][0];
|
|
83
95
|
}
|
|
84
96
|
export interface DepositAPI {
|
|
85
|
-
openDeposit: (options
|
|
97
|
+
openDeposit: (options: OpenDepositOptions) => void;
|
|
86
98
|
closeDeposit: () => void;
|
|
87
99
|
updateDepositOptions: (options: Partial<OpenDepositOptions>) => void;
|
|
100
|
+
setDepositLoading: (loading: boolean) => void;
|
|
88
101
|
isOpen: () => boolean;
|
|
102
|
+
isLoading: () => boolean;
|
|
89
103
|
}
|
|
90
104
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/Deposit/types/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,MAAM,SAAS,CAAA;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/Deposit/types/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,SAAS,CAAA;AAGlD,MAAM,WAAW,aAAa;IAC5B,OAAO,EAAE,MAAM,CAAA;IACf,YAAY,EAAE,MAAM,CAAA;IACpB,MAAM,EAAE,MAAM,CAAA;IACd,MAAM,CAAC,EAAE,MAAM,CAAA;CAChB;AAGD,MAAM,WAAW,YAAY;IAC3B,MAAM,EAAE,OAAO,CAAA;IACf,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB,OAAO,EAAE,MAAM,IAAI,CAAA;IACnB,MAAM,EAAE,aAAa,CAAA;IACrB,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IAG1B,oBAAoB,CAAC,EAAE;QACrB,MAAM,EAAE,KAAK,GAAG,KAAK,CAAA;QACrB,UAAU,EAAE,MAAM,CAAA;QAClB,SAAS,EAAE,MAAM,CAAA;QACjB,KAAK,EAAE,MAAM,CAAA;KACd,CAAA;IACD,WAAW,CAAC,EAAE;QACZ,OAAO,EAAE,MAAM,CAAA;KAChB,CAAA;IAGD,MAAM,EAAE,SAAS,EAAE,CAAA;IAGnB,cAAc,CAAC,EAAE,MAAM,CAAA;IACvB,mBAAmB,CAAC,EAAE,MAAM,CAAA;IAC5B,aAAa,CAAC,EAAE,MAAM,CAAA;IAGtB,QAAQ,CAAC,EAAE;QACT,UAAU,CAAC,EAAE;YACX,UAAU,EAAE,MAAM,CAAA;SACnB,CAAA;KACF,CAAA;IACD,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB,eAAe,CAAC,EAAE,MAAM,CAAA;IAGxB,UAAU,CAAC,EAAE;QACX,UAAU,EAAE,GAAG,CAAA;QACf,eAAe,EAAE,GAAG,CAAA;QACpB,UAAU,EAAE,GAAG,CAAA;KAChB,CAAA;IAGD,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,UAAU,CAAC,EAAE,MAAM,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAA;IAGvC,SAAS,CAAC,EAAE,CAAC,WAAW,EAAE;QACxB,MAAM,EAAE,MAAM,CAAA;QACd,OAAO,EAAE,MAAM,CAAA;QACf,YAAY,EAAE,MAAM,CAAA;QACpB,WAAW,EAAE,MAAM,CAAA;KACpB,KAAK,IAAI,CAAA;IACV,MAAM,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAA;IAClC,aAAa,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAA;IACzC,aAAa,CAAC,EAAE,CAAC,WAAW,EAAE,MAAM,KAAK,IAAI,CAAA;CAC9C;AAGD,MAAM,WAAW,kBAAkB;IAEjC,MAAM,CAAC,EAAE,aAAa,CAAA;IACtB,iBAAiB,CAAC,EAAE,OAAO,CAAA;IAC3B,oBAAoB,CAAC,EAAE,YAAY,CAAC,sBAAsB,CAAC,CAAA;IAC3D,WAAW,CAAC,EAAE,YAAY,CAAC,aAAa,CAAC,CAAA;IAGzC,MAAM,EAAE,SAAS,EAAE,CAAA;IAGnB,cAAc,CAAC,EAAE,MAAM,CAAA;IACvB,mBAAmB,CAAC,EAAE,MAAM,CAAA;IAC5B,aAAa,CAAC,EAAE,MAAM,CAAA;IAGtB,QAAQ,CAAC,EAAE,YAAY,CAAC,UAAU,CAAC,CAAA;IACnC,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB,eAAe,CAAC,EAAE,MAAM,CAAA;IAGxB,UAAU,CAAC,EAAE,YAAY,CAAC,YAAY,CAAC,CAAA;IAGvC,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,UAAU,CAAC,EAAE,MAAM,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAA;IAGvC,cAAc,CAAC,EAAE,MAAM,CAAA;IACvB,kBAAkB,CAAC,EAAE,GAAG,CAAA;IACxB,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB,MAAM,CAAC,EAAE,GAAG,EAAE,CAAA;IACd,kBAAkB,CAAC,EAAE,GAAG,CAAA;IACxB,MAAM,CAAC,EAAE,MAAM,CAAA;IAGf,SAAS,CAAC,EAAE,CAAC,WAAW,EAAE;QACxB,MAAM,EAAE,MAAM,CAAA;QACd,OAAO,EAAE,MAAM,CAAA;QACf,YAAY,EAAE,MAAM,CAAA;QACpB,WAAW,EAAE,MAAM,CAAA;KACpB,KAAK,IAAI,CAAA;IACV,MAAM,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAA;IAClC,OAAO,CAAC,EAAE,MAAM,IAAI,CAAA;IACpB,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAA;IACvC,aAAa,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAA;IACzC,qBAAqB,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,IAAI,CAAA;IAChD,SAAS,CAAC,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAA;CAChC;AAGD,MAAM,WAAW,oBAAoB;IACnC,eAAe,EAAE,MAAM,CAAA;IACvB,oBAAoB,EAAE,MAAM,CAAA;IAC5B,MAAM,EAAE,MAAM,CAAA;IACd,SAAS,EAAE,OAAO,CAAA;IAClB,KAAK,EAAE,MAAM,GAAG,IAAI,CAAA;IACpB,MAAM,EAAE,MAAM,GAAG,IAAI,CAAA;IAErB,aAAa,CAAC,EAAE,SAAS,CAAA;IACzB,aAAa,CAAC,EAAE,SAAS,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,CAAA;CAC1C;AAED,MAAM,WAAW,UAAU;IACzB,WAAW,EAAE,CAAC,OAAO,EAAE,kBAAkB,KAAK,IAAI,CAAA;IAClD,YAAY,EAAE,MAAM,IAAI,CAAA;IACxB,oBAAoB,EAAE,CAAC,OAAO,EAAE,OAAO,CAAC,kBAAkB,CAAC,KAAK,IAAI,CAAA;IACpE,iBAAiB,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK,IAAI,CAAA;IAC7C,MAAM,EAAE,MAAM,OAAO,CAAA;IACrB,SAAS,EAAE,MAAM,OAAO,CAAA;CACzB"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { ChainInfo } from '../../../types';
|
|
2
|
+
|
|
3
|
+
export interface LegacyChain {
|
|
4
|
+
chainId: number;
|
|
5
|
+
chain: string;
|
|
6
|
+
chainIconUrl: string;
|
|
7
|
+
allowDeposit: boolean;
|
|
8
|
+
blockTime: number;
|
|
9
|
+
txConfirm: number;
|
|
10
|
+
}
|
|
11
|
+
export interface LegacyToken {
|
|
12
|
+
token: string;
|
|
13
|
+
symbol: string;
|
|
14
|
+
decimals: number;
|
|
15
|
+
iconUrl: string;
|
|
16
|
+
tokenAddress: string;
|
|
17
|
+
chainId?: number;
|
|
18
|
+
balance?: {
|
|
19
|
+
formatted: string;
|
|
20
|
+
raw: string;
|
|
21
|
+
};
|
|
22
|
+
allowance?: {
|
|
23
|
+
formatted: string;
|
|
24
|
+
raw: string;
|
|
25
|
+
};
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Migrates legacy separate chains and tokens arrays to new chain-centric structure
|
|
29
|
+
*/
|
|
30
|
+
export declare function migrateLegacyData(legacyChains: LegacyChain[], legacyTokens: LegacyToken[]): ChainInfo[];
|
|
31
|
+
/**
|
|
32
|
+
* Validates migrated data structure
|
|
33
|
+
*/
|
|
34
|
+
export declare function validateMigratedData(chains: ChainInfo[]): {
|
|
35
|
+
isValid: boolean;
|
|
36
|
+
errors: string[];
|
|
37
|
+
};
|
|
38
|
+
/**
|
|
39
|
+
* Example usage function
|
|
40
|
+
*/
|
|
41
|
+
export declare function createExampleMigratedData(): ChainInfo[];
|
|
42
|
+
//# sourceMappingURL=migrateDepositData.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"migrateDepositData.d.ts","sourceRoot":"","sources":["../../../../src/components/Deposit/utils/migrateDepositData.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAa,MAAM,SAAS,CAAA;AAG9C,MAAM,WAAW,WAAW;IAC1B,OAAO,EAAE,MAAM,CAAA;IACf,KAAK,EAAE,MAAM,CAAA;IACb,YAAY,EAAE,MAAM,CAAA;IACpB,YAAY,EAAE,OAAO,CAAA;IACrB,SAAS,EAAE,MAAM,CAAA;IACjB,SAAS,EAAE,MAAM,CAAA;CAClB;AAED,MAAM,WAAW,WAAW;IAC1B,KAAK,EAAE,MAAM,CAAA;IACb,MAAM,EAAE,MAAM,CAAA;IACd,QAAQ,EAAE,MAAM,CAAA;IAChB,OAAO,EAAE,MAAM,CAAA;IACf,YAAY,EAAE,MAAM,CAAA;IACpB,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,OAAO,CAAC,EAAE;QACR,SAAS,EAAE,MAAM,CAAA;QACjB,GAAG,EAAE,MAAM,CAAA;KACZ,CAAA;IACD,SAAS,CAAC,EAAE;QACV,SAAS,EAAE,MAAM,CAAA;QACjB,GAAG,EAAE,MAAM,CAAA;KACZ,CAAA;CACF;AAED;;GAEG;AACH,wBAAgB,iBAAiB,CAC/B,YAAY,EAAE,WAAW,EAAE,EAC3B,YAAY,EAAE,WAAW,EAAE,GAC1B,SAAS,EAAE,CAQb;AAgID;;GAEG;AACH,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,SAAS,EAAE,GAAG;IACzD,OAAO,EAAE,OAAO,CAAA;IAChB,MAAM,EAAE,MAAM,EAAE,CAAA;CACjB,CA8CA;AAED;;GAEG;AACH,wBAAgB,yBAAyB,IAAI,SAAS,EAAE,CA0CvD"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
|
|
3
|
+
export type LoadingSpinnerSize = 'xs' | 'sm' | 'md' | 'lg';
|
|
4
|
+
export type LoadingSpinnerColor = 'primary' | 'secondary' | 'success' | 'warning' | 'error';
|
|
5
|
+
export interface LoadingSpinnerProps {
|
|
6
|
+
/** Size of the loading spinner */
|
|
7
|
+
size?: LoadingSpinnerSize;
|
|
8
|
+
/** Color variant of the loading spinner */
|
|
9
|
+
color?: LoadingSpinnerColor;
|
|
10
|
+
/** Additional CSS classes */
|
|
11
|
+
className?: string;
|
|
12
|
+
/** Accessible label for screen readers */
|
|
13
|
+
label?: string;
|
|
14
|
+
/** Whether to show the spinner inline with text */
|
|
15
|
+
inline?: boolean;
|
|
16
|
+
}
|
|
17
|
+
export declare const LoadingSpinner: React.FC<LoadingSpinnerProps>;
|
|
18
|
+
export default LoadingSpinner;
|
|
19
|
+
//# sourceMappingURL=LoadingSpinner.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"LoadingSpinner.d.ts","sourceRoot":"","sources":["../../../src/components/LoadingSpinner/LoadingSpinner.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,sBAAsB,CAAA;AAE7B,MAAM,MAAM,kBAAkB,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAA;AAC1D,MAAM,MAAM,mBAAmB,GAC3B,SAAS,GACT,WAAW,GACX,SAAS,GACT,SAAS,GACT,OAAO,CAAA;AAEX,MAAM,WAAW,mBAAmB;IAClC,kCAAkC;IAClC,IAAI,CAAC,EAAE,kBAAkB,CAAA;IACzB,2CAA2C;IAC3C,KAAK,CAAC,EAAE,mBAAmB,CAAA;IAC3B,6BAA6B;IAC7B,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,0CAA0C;IAC1C,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,mDAAmD;IACnD,MAAM,CAAC,EAAE,OAAO,CAAA;CACjB;AAED,eAAO,MAAM,cAAc,EAAE,KAAK,CAAC,EAAE,CAAC,mBAAmB,CAkBxD,CAAA;AAED,eAAe,cAAc,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/LoadingSpinner/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAA;AAC1D,YAAY,EACV,mBAAmB,EACnB,kBAAkB,EAClB,mBAAmB,GACpB,MAAM,kBAAkB,CAAA;AAGzB,OAAO,EAAE,cAAc,IAAI,YAAY,EAAE,MAAM,kBAAkB,CAAA"}
|
|
@@ -1,11 +1,16 @@
|
|
|
1
1
|
import { default as React, ReactNode } from 'react';
|
|
2
2
|
import { ComponentConfig } from '../../types';
|
|
3
|
+
import { TranslationKeys, SupportedLocale } from '../../locales';
|
|
3
4
|
|
|
4
5
|
interface ComponentProviderProps {
|
|
5
6
|
config: ComponentConfig;
|
|
6
7
|
children: ReactNode;
|
|
7
8
|
}
|
|
9
|
+
interface ComponentContextValue extends ComponentConfig {
|
|
10
|
+
translations: TranslationKeys;
|
|
11
|
+
currentLocale: SupportedLocale;
|
|
12
|
+
}
|
|
8
13
|
export declare const ComponentProvider: React.FC<ComponentProviderProps>;
|
|
9
|
-
export declare const useComponentConfig: () =>
|
|
14
|
+
export declare const useComponentConfig: () => ComponentContextValue;
|
|
10
15
|
export {};
|
|
11
16
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Provider/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAA6B,SAAS,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Provider/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAA6B,SAAS,EAAW,MAAM,OAAO,CAAA;AAC5E,OAAO,EAAE,eAAe,EAAE,MAAM,SAAS,CAAA;AACzC,OAAO,EAGL,KAAK,eAAe,EACpB,KAAK,eAAe,EAErB,MAAM,WAAW,CAAA;AAElB,UAAU,sBAAsB;IAC9B,MAAM,EAAE,eAAe,CAAA;IACvB,QAAQ,EAAE,SAAS,CAAA;CACpB;AAED,UAAU,qBAAsB,SAAQ,eAAe;IACrD,YAAY,EAAE,eAAe,CAAA;IAC7B,aAAa,EAAE,eAAe,CAAA;CAC/B;AAID,eAAO,MAAM,iBAAiB,EAAE,KAAK,CAAC,EAAE,CAAC,sBAAsB,CAwB9D,CAAA;AAED,eAAO,MAAM,kBAAkB,6BAM9B,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Tooltip/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,OAAO,CAAA;AAC/B,YAAY,EAAE,YAAY,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Tooltip.d.ts","sourceRoot":"","sources":["../../../../src/components/Tooltip/src/Tooltip.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmB,MAAM,OAAO,CAAA;AAgBvC,OAAO,EAAE,YAAY,EAAE,MAAM,UAAU,CAAA;AAGvC,eAAO,MAAM,OAAO,EAAE,KAAK,CAAC,EAAE,CAAC,YAAY,CA0F1C,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TooltipArrow.d.ts","sourceRoot":"","sources":["../../../../src/components/Tooltip/src/TooltipArrow.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,OAAO,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAA;AAE5C,eAAO,MAAM,YAAY,0FA0DxB,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/Tooltip/src/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AACnC,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAA"}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { Placement } from '@floating-ui/react';
|
|
3
|
+
|
|
4
|
+
export interface TooltipProps {
|
|
5
|
+
/**
|
|
6
|
+
* 触发 tooltip 的子元素
|
|
7
|
+
*/
|
|
8
|
+
children: ReactNode;
|
|
9
|
+
/**
|
|
10
|
+
* Tooltip 显示的内容
|
|
11
|
+
*/
|
|
12
|
+
content: ReactNode;
|
|
13
|
+
/**
|
|
14
|
+
* Tooltip 相对于触发元素的位置
|
|
15
|
+
* @default 'top'
|
|
16
|
+
*/
|
|
17
|
+
placement?: Placement;
|
|
18
|
+
/**
|
|
19
|
+
* 鼠标悬停延迟时间(毫秒)
|
|
20
|
+
* @default 200
|
|
21
|
+
*/
|
|
22
|
+
delay?: number;
|
|
23
|
+
/**
|
|
24
|
+
* 是否显示箭头
|
|
25
|
+
* @default true
|
|
26
|
+
*/
|
|
27
|
+
showArrow?: boolean;
|
|
28
|
+
/**
|
|
29
|
+
* 自定义 className
|
|
30
|
+
*/
|
|
31
|
+
className?: string;
|
|
32
|
+
/**
|
|
33
|
+
* 是否禁用 tooltip
|
|
34
|
+
* @default false
|
|
35
|
+
*/
|
|
36
|
+
disabled?: boolean;
|
|
37
|
+
/**
|
|
38
|
+
* 最大宽度
|
|
39
|
+
* @default 'max-w-xs'
|
|
40
|
+
*/
|
|
41
|
+
maxWidth?: string;
|
|
42
|
+
/**
|
|
43
|
+
* 触发方式
|
|
44
|
+
* @default ['hover', 'focus']
|
|
45
|
+
*/
|
|
46
|
+
trigger?: ('hover' | 'focus' | 'click')[];
|
|
47
|
+
}
|
|
48
|
+
export interface TooltipArrowProps {
|
|
49
|
+
placement: Placement;
|
|
50
|
+
className?: string;
|
|
51
|
+
}
|
|
52
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/Tooltip/types/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AACjC,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAA;AAE9C,MAAM,WAAW,YAAY;IAC3B;;OAEG;IACH,QAAQ,EAAE,SAAS,CAAA;IAEnB;;OAEG;IACH,OAAO,EAAE,SAAS,CAAA;IAElB;;;OAGG;IACH,SAAS,CAAC,EAAE,SAAS,CAAA;IAErB;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,CAAA;IAEd;;;OAGG;IACH,SAAS,CAAC,EAAE,OAAO,CAAA;IAEnB;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAA;IAElB;;;OAGG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAA;IAElB;;;OAGG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAA;IAEjB;;;OAGG;IACH,OAAO,CAAC,EAAE,CAAC,OAAO,GAAG,OAAO,GAAG,OAAO,CAAC,EAAE,CAAA;CAC1C;AAED,MAAM,WAAW,iBAAiB;IAChC,SAAS,EAAE,SAAS,CAAA;IACpB,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/Withdraw/constants/index.tsx"],"names":[],"mappings":"AAAA,qBAAa,KAAK;IAChB,MAAM,CAAC,IAAI,SAAI;IACf,MAAM,CAAC,MAAM,SAAI;IACjB,MAAM,CAAC,IAAI,SAAI;IACf,MAAM,CAAC,IAAI,SAAI;CAChB"}
|
|
@@ -1,11 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
config: WithdrawConfig;
|
|
8
|
-
}
|
|
9
|
-
export declare const Withdraw: React.FC<WithdrawProps>;
|
|
10
|
-
export {};
|
|
1
|
+
export { Withdraw } from './src/index';
|
|
2
|
+
export { WithdrawManager, openWithdraw, closeWithdraw, updateWithdrawOptions, setWithdrawLoading, isWithdrawLoading, useWithdraw, } from './src/WithdrawManager';
|
|
3
|
+
export { WithdrawView } from './src/evm/index';
|
|
4
|
+
export { WithdrawWalletView } from './src/evm/WalletView';
|
|
5
|
+
export { default as WithdrawSpeed } from './src/Speed';
|
|
6
|
+
export type { WithdrawProps, OpenWithdrawOptions, WithdrawAPI } from './types';
|
|
11
7
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Withdraw/index.
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Withdraw/index.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAA;AAGtC,OAAO,EACL,eAAe,EACf,YAAY,EACZ,aAAa,EACb,qBAAqB,EACrB,kBAAkB,EAClB,iBAAiB,EACjB,WAAW,GACZ,MAAM,uBAAuB,CAAA;AAG9B,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAA;AAC9C,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAA;AACzD,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,aAAa,CAAA;AAGtD,YAAY,EAAE,aAAa,EAAE,mBAAmB,EAAE,WAAW,EAAE,MAAM,SAAS,CAAA"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
|
|
3
|
+
interface WithdrawSpeedProps {
|
|
4
|
+
selectedLevel: number;
|
|
5
|
+
maxLevel: number;
|
|
6
|
+
className?: string;
|
|
7
|
+
}
|
|
8
|
+
declare const WithdrawSpeed: React.FC<WithdrawSpeedProps>;
|
|
9
|
+
export default WithdrawSpeed;
|
|
10
|
+
//# sourceMappingURL=Speed.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Speed.d.ts","sourceRoot":"","sources":["../../../../src/components/Withdraw/src/Speed.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,UAAU,kBAAkB;IAC1B,aAAa,EAAE,MAAM,CAAA;IACrB,QAAQ,EAAE,MAAM,CAAA;IAChB,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AA4DD,QAAA,MAAM,aAAa,EAAE,KAAK,CAAC,EAAE,CAAC,kBAAkB,CAiB/C,CAAA;AAED,eAAe,aAAa,CAAA"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { OpenWithdrawOptions, WithdrawAPI } from '../types';
|
|
3
|
+
|
|
4
|
+
export declare const WithdrawManager: React.ForwardRefExoticComponent<React.RefAttributes<WithdrawAPI>>;
|
|
5
|
+
export declare const openWithdraw: (options?: OpenWithdrawOptions) => void;
|
|
6
|
+
export declare const closeWithdraw: () => void;
|
|
7
|
+
export declare const updateWithdrawOptions: (options: Partial<OpenWithdrawOptions>) => void;
|
|
8
|
+
export declare const setWithdrawLoading: (loading: boolean) => void;
|
|
9
|
+
export declare const isWithdrawOpen: () => boolean;
|
|
10
|
+
export declare const isWithdrawLoading: () => boolean;
|
|
11
|
+
export declare const useWithdraw: () => WithdrawAPI;
|
|
12
|
+
//# sourceMappingURL=WithdrawManager.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"WithdrawManager.d.ts","sourceRoot":"","sources":["../../../../src/components/Withdraw/src/WithdrawManager.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAqD,MAAM,OAAO,CAAA;AAEzE,OAAO,EAAE,mBAAmB,EAAE,WAAW,EAAE,MAAM,UAAU,CAAA;AAS3D,eAAO,MAAM,eAAe,mEAqG1B,CAAA;AAKF,eAAO,MAAM,YAAY,GAAI,UAAU,mBAAmB,SAQzD,CAAA;AAED,eAAO,MAAM,aAAa,YAQzB,CAAA;AAED,eAAO,MAAM,qBAAqB,GAChC,SAAS,OAAO,CAAC,mBAAmB,CAAC,SAStC,CAAA;AAED,eAAO,MAAM,kBAAkB,GAAI,SAAS,OAAO,SAQlD,CAAA;AAED,eAAO,MAAM,cAAc,eAK1B,CAAA;AAED,eAAO,MAAM,iBAAiB,eAK7B,CAAA;AAGD,eAAO,MAAM,WAAW,QAAO,WAS9B,CAAA"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
export declare const ETH_CHAIN_IDS: {
|
|
2
|
+
readonly MAINNET: 1;
|
|
3
|
+
readonly SEPOLIA: 11155111;
|
|
4
|
+
};
|
|
5
|
+
export declare const ETH_CHAIN_ID_LIST: (1 | 11155111)[];
|
|
6
|
+
export declare const isEthChain: (chainId: number | string) => boolean;
|
|
7
|
+
export declare const UNLIMITED_DEPOSIT_CHAIN_IDS: {
|
|
8
|
+
readonly MAINNET: 1;
|
|
9
|
+
readonly SEPOLIA: 11155111;
|
|
10
|
+
readonly ARBITRUM: 42161;
|
|
11
|
+
readonly ARBITRUM_SEPOLIA: 421614;
|
|
12
|
+
};
|
|
13
|
+
export declare const UNLIMITED_DEPOSIT_CHAIN_ID_LIST: (1 | 42161 | 421614 | 11155111)[];
|
|
14
|
+
export declare const isUnlimitedDepositChain: (chainId: number | string) => boolean;
|
|
15
|
+
export declare const ARBITRUM_UNLIMITED_TOKENS: {
|
|
16
|
+
readonly USDT: true;
|
|
17
|
+
};
|
|
18
|
+
export declare const shouldShowDepositLimit: (chainId: number | string, tokenSymbol?: string) => boolean;
|
|
19
|
+
export declare const OTHER_CHAIN_IDS: {
|
|
20
|
+
readonly BNB_CHAIN: 56;
|
|
21
|
+
readonly POLYGON: 137;
|
|
22
|
+
readonly OPTIMISM: 10;
|
|
23
|
+
};
|
|
24
|
+
//# sourceMappingURL=constants.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../../src/components/Withdraw/src/constants.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,aAAa;;;CAGhB,CAAA;AAGV,eAAO,MAAM,iBAAiB,kBAA+B,CAAA;AAG7D,eAAO,MAAM,UAAU,GAAI,SAAS,MAAM,GAAG,MAAM,KAAG,OAMrD,CAAA;AAGD,eAAO,MAAM,2BAA2B;;;;;CAK9B,CAAA;AAGV,eAAO,MAAM,+BAA+B,mCAE3C,CAAA;AAGD,eAAO,MAAM,uBAAuB,GAAI,SAAS,MAAM,GAAG,MAAM,KAAG,OAMlE,CAAA;AAGD,eAAO,MAAM,yBAAyB;;CAI5B,CAAA;AAGV,eAAO,MAAM,sBAAsB,GACjC,SAAS,MAAM,GAAG,MAAM,EACxB,cAAc,MAAM,KACnB,OA0BF,CAAA;AAGD,eAAO,MAAM,eAAe;;;;CAIlB,CAAA"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
|
|
3
|
+
interface WithdrawWalletViewProps {
|
|
4
|
+
withdrawAmount: string;
|
|
5
|
+
curSelectToken: string;
|
|
6
|
+
curSelectTokenData: any;
|
|
7
|
+
currentActiveChain: any;
|
|
8
|
+
currentEquity: number;
|
|
9
|
+
amount: string;
|
|
10
|
+
decimals: number;
|
|
11
|
+
tokenBalance?: string;
|
|
12
|
+
platformBalance?: string;
|
|
13
|
+
fee?: string;
|
|
14
|
+
walletType?: 'evm' | 'mpc';
|
|
15
|
+
receiverAddress?: string;
|
|
16
|
+
onWithdrawAmountChange: (amount: string) => void;
|
|
17
|
+
onReceiverAddressChange?: (address: string) => void;
|
|
18
|
+
onAmountChanged?: (amount: string) => void;
|
|
19
|
+
}
|
|
20
|
+
export declare const WithdrawWalletView: React.FC<WithdrawWalletViewProps>;
|
|
21
|
+
export {};
|
|
22
|
+
//# sourceMappingURL=WalletView.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"WalletView.d.ts","sourceRoot":"","sources":["../../../../../src/components/Withdraw/src/evm/WalletView.tsx"],"names":[],"mappings":"AACA,OAAO,KAAkB,MAAM,OAAO,CAAA;AAetC,UAAU,uBAAuB;IAC/B,cAAc,EAAE,MAAM,CAAA;IACtB,cAAc,EAAE,MAAM,CAAA;IACtB,kBAAkB,EAAE,GAAG,CAAA;IACvB,kBAAkB,EAAE,GAAG,CAAA;IACvB,aAAa,EAAE,MAAM,CAAA;IACrB,MAAM,EAAE,MAAM,CAAA;IACd,QAAQ,EAAE,MAAM,CAAA;IAEhB,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,eAAe,CAAC,EAAE,MAAM,CAAA;IAExB,GAAG,CAAC,EAAE,MAAM,CAAA;IAEZ,UAAU,CAAC,EAAE,KAAK,GAAG,KAAK,CAAA;IAC1B,eAAe,CAAC,EAAE,MAAM,CAAA;IACxB,sBAAsB,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,IAAI,CAAA;IAChD,uBAAuB,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAA;IACnD,eAAe,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,IAAI,CAAA;CAC3C;AAED,eAAO,MAAM,kBAAkB,EAAE,KAAK,CAAC,EAAE,CAAC,uBAAuB,CA+OhE,CAAA"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { ChainInfo } from '../../../../types';
|
|
3
|
+
|
|
4
|
+
interface WithdrawViewProps {
|
|
5
|
+
chains: ChainInfo[];
|
|
6
|
+
defaultChainId?: number;
|
|
7
|
+
defaultTokenAddress?: string;
|
|
8
|
+
defaultAmount?: string;
|
|
9
|
+
walletAdapter: any;
|
|
10
|
+
metadata?: any;
|
|
11
|
+
currentEquity?: number;
|
|
12
|
+
platformBalance?: string;
|
|
13
|
+
fee?: string;
|
|
14
|
+
isLoading?: boolean;
|
|
15
|
+
wagmiHooks?: {
|
|
16
|
+
useBalance: any;
|
|
17
|
+
useReadContract: any;
|
|
18
|
+
useAccount: any;
|
|
19
|
+
};
|
|
20
|
+
onWithdraw?: (withdrawInfo: {
|
|
21
|
+
amount: string;
|
|
22
|
+
chainId: number;
|
|
23
|
+
tokenAddress: string;
|
|
24
|
+
tokenSymbol: string;
|
|
25
|
+
receiverAddress?: string;
|
|
26
|
+
}) => void;
|
|
27
|
+
onClose: () => void;
|
|
28
|
+
onChainChange?: (chainId: number) => void;
|
|
29
|
+
onTokenChange?: (tokenSymbol: string) => void;
|
|
30
|
+
onAmountChanged?: (amount: string) => void;
|
|
31
|
+
}
|
|
32
|
+
export declare const WithdrawView: React.FC<WithdrawViewProps>;
|
|
33
|
+
export {};
|
|
34
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/Withdraw/src/evm/index.tsx"],"names":[],"mappings":"AACA,OAAO,KAAyC,MAAM,OAAO,CAAA;AAK7D,OAAO,EAAE,SAAS,EAAE,MAAM,SAAS,CAAA;AASnC,UAAU,iBAAiB;IACzB,MAAM,EAAE,SAAS,EAAE,CAAA;IACnB,cAAc,CAAC,EAAE,MAAM,CAAA;IACvB,mBAAmB,CAAC,EAAE,MAAM,CAAA;IAC5B,aAAa,CAAC,EAAE,MAAM,CAAA;IAGtB,aAAa,EAAE,GAAG,CAAA;IAClB,QAAQ,CAAC,EAAE,GAAG,CAAA;IACd,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB,eAAe,CAAC,EAAE,MAAM,CAAA;IACxB,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,SAAS,CAAC,EAAE,OAAO,CAAA;IAGnB,UAAU,CAAC,EAAE;QACX,UAAU,EAAE,GAAG,CAAA;QACf,eAAe,EAAE,GAAG,CAAA;QACpB,UAAU,EAAE,GAAG,CAAA;KAChB,CAAA;IAGD,UAAU,CAAC,EAAE,CAAC,YAAY,EAAE;QAC1B,MAAM,EAAE,MAAM,CAAA;QACd,OAAO,EAAE,MAAM,CAAA;QACf,YAAY,EAAE,MAAM,CAAA;QACpB,WAAW,EAAE,MAAM,CAAA;QACnB,eAAe,CAAC,EAAE,MAAM,CAAA;KACzB,KAAK,IAAI,CAAA;IACV,OAAO,EAAE,MAAM,IAAI,CAAA;IACnB,aAAa,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAA;IACzC,aAAa,CAAC,EAAE,CAAC,WAAW,EAAE,MAAM,KAAK,IAAI,CAAA;IAC7C,eAAe,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,IAAI,CAAA;CAC3C;AAED,eAAO,MAAM,YAAY,EAAE,KAAK,CAAC,EAAE,CAAC,iBAAiB,CAoSpD,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/Withdraw/src/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAkB,MAAM,OAAO,CAAA;AAKtC,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAA;AASxC,eAAO,MAAM,QAAQ,EAAE,KAAK,CAAC,EAAE,CAAC,aAAa,CAqG5C,CAAA"}
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import { WithdrawConfig, ChainInfo } from '../../../types';
|
|
2
|
+
|
|
3
|
+
export interface WithdrawResult {
|
|
4
|
+
chainId: number;
|
|
5
|
+
tokenAddress: string;
|
|
6
|
+
amount: string;
|
|
7
|
+
txHash?: string;
|
|
8
|
+
}
|
|
9
|
+
export interface WithdrawProps {
|
|
10
|
+
isOpen: boolean;
|
|
11
|
+
isLoading?: boolean;
|
|
12
|
+
onClose: () => void;
|
|
13
|
+
config: WithdrawConfig;
|
|
14
|
+
children?: React.ReactNode;
|
|
15
|
+
currentActiveAccount?: {
|
|
16
|
+
wallet: 'mpc' | 'evm';
|
|
17
|
+
ethAddress: string;
|
|
18
|
+
accountId: string;
|
|
19
|
+
l2Key: string;
|
|
20
|
+
};
|
|
21
|
+
smartWallet?: {
|
|
22
|
+
address: string;
|
|
23
|
+
};
|
|
24
|
+
chains: ChainInfo[];
|
|
25
|
+
defaultChainId?: number;
|
|
26
|
+
defaultTokenAddress?: string;
|
|
27
|
+
defaultAmount?: string;
|
|
28
|
+
metadata?: {
|
|
29
|
+
multiChain?: {
|
|
30
|
+
minWithdraw: number;
|
|
31
|
+
};
|
|
32
|
+
};
|
|
33
|
+
currentEquity?: number;
|
|
34
|
+
platformBalance?: string;
|
|
35
|
+
fee?: string;
|
|
36
|
+
wagmiHooks?: {
|
|
37
|
+
useBalance: any;
|
|
38
|
+
useReadContract: any;
|
|
39
|
+
useAccount: any;
|
|
40
|
+
};
|
|
41
|
+
onWithdraw?: (withdrawInfo: {
|
|
42
|
+
amount: string;
|
|
43
|
+
chainId: number;
|
|
44
|
+
tokenAddress: string;
|
|
45
|
+
tokenSymbol: string;
|
|
46
|
+
receiverAddress?: string;
|
|
47
|
+
}) => void;
|
|
48
|
+
onChainChange?: (chainId: number) => void;
|
|
49
|
+
onTokenChange?: (tokenSymbol: string) => void;
|
|
50
|
+
onAmountChanged?: (amount: string) => void;
|
|
51
|
+
}
|
|
52
|
+
export interface OpenWithdrawOptions {
|
|
53
|
+
config?: WithdrawConfig;
|
|
54
|
+
isWalletConnected?: boolean;
|
|
55
|
+
currentActiveAccount?: WithdrawProps['currentActiveAccount'];
|
|
56
|
+
smartWallet?: WithdrawProps['smartWallet'];
|
|
57
|
+
chains: ChainInfo[];
|
|
58
|
+
defaultChainId?: number;
|
|
59
|
+
defaultTokenAddress?: string;
|
|
60
|
+
defaultAmount?: string;
|
|
61
|
+
metadata?: WithdrawProps['metadata'];
|
|
62
|
+
currentEquity?: number;
|
|
63
|
+
platformBalance?: string;
|
|
64
|
+
fee?: string;
|
|
65
|
+
wagmiHooks?: WithdrawProps['wagmiHooks'];
|
|
66
|
+
curSelectToken?: string;
|
|
67
|
+
currentActiveChain?: any;
|
|
68
|
+
withdrawAmount?: string;
|
|
69
|
+
onWithdraw?: WithdrawProps['onWithdraw'];
|
|
70
|
+
onChainChange?: (chainId: number) => void;
|
|
71
|
+
onTokenChange?: (tokenSymbol: string) => void;
|
|
72
|
+
onAmountChanged?: (amount: string) => void;
|
|
73
|
+
onClose?: () => void;
|
|
74
|
+
}
|
|
75
|
+
export interface WithdrawAPI {
|
|
76
|
+
openWithdraw: (options?: OpenWithdrawOptions) => void;
|
|
77
|
+
closeWithdraw: () => void;
|
|
78
|
+
updateWithdrawOptions: (options: Partial<OpenWithdrawOptions>) => void;
|
|
79
|
+
setWithdrawLoading: (loading: boolean) => void;
|
|
80
|
+
isOpen: () => boolean;
|
|
81
|
+
isLoading: () => boolean;
|
|
82
|
+
}
|
|
83
|
+
//# sourceMappingURL=index.d.ts.map
|