@edgex-web/components 0.1.0-beta.6 → 0.1.0-beta.60

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.
Files changed (164) hide show
  1. package/dist/ccip-ZwjkC376.mjs +150 -0
  2. package/dist/ccip-ZwjkC376.mjs.map +1 -0
  3. package/dist/components/Deposit/index.d.ts +1 -8
  4. package/dist/components/Deposit/index.d.ts.map +1 -1
  5. package/dist/components/Deposit/src/DepositManager.d.ts +2 -0
  6. package/dist/components/Deposit/src/DepositManager.d.ts.map +1 -1
  7. package/dist/components/Deposit/src/components/evm/hooks/index.d.ts +3 -0
  8. package/dist/components/Deposit/src/components/evm/hooks/index.d.ts.map +1 -0
  9. package/dist/components/Deposit/src/components/evm/hooks/useApprove.d.ts +4 -0
  10. package/dist/components/Deposit/src/components/evm/hooks/useApprove.d.ts.map +1 -0
  11. package/dist/components/Deposit/src/components/evm/hooks/useDepositButtonState.d.ts +14 -0
  12. package/dist/components/Deposit/src/components/evm/hooks/useDepositButtonState.d.ts.map +1 -0
  13. package/dist/components/Deposit/src/components/evm/index.d.ts +6 -0
  14. package/dist/components/Deposit/src/components/evm/index.d.ts.map +1 -0
  15. package/dist/components/Deposit/src/components/evm/types/approve.d.ts +15 -0
  16. package/dist/components/Deposit/src/components/evm/types/approve.d.ts.map +1 -0
  17. package/dist/components/Deposit/src/components/evm/types/index.d.ts +15 -0
  18. package/dist/components/Deposit/src/components/evm/types/index.d.ts.map +1 -0
  19. package/dist/components/Deposit/src/components/evm/utils/format.d.ts +12 -0
  20. package/dist/components/Deposit/src/components/evm/utils/format.d.ts.map +1 -0
  21. package/dist/components/Deposit/src/components/evm/utils/index.d.ts +8 -0
  22. package/dist/components/Deposit/src/components/evm/utils/index.d.ts.map +1 -0
  23. package/dist/components/Deposit/src/components/mpc/index.d.ts +6 -0
  24. package/dist/components/Deposit/src/components/mpc/index.d.ts.map +1 -0
  25. package/dist/components/Deposit/src/components/mpc/types/index.d.ts +16 -0
  26. package/dist/components/Deposit/src/components/mpc/types/index.d.ts.map +1 -0
  27. package/dist/components/Deposit/src/constants/index.d.ts +4 -0
  28. package/dist/components/Deposit/src/constants/index.d.ts.map +1 -0
  29. package/dist/components/Deposit/src/hooks/useErc20BalanceOfWatcher.d.ts +14 -0
  30. package/dist/components/Deposit/src/hooks/useErc20BalanceOfWatcher.d.ts.map +1 -0
  31. package/dist/components/Deposit/src/hooks/useMulticallBalance.d.ts +68 -0
  32. package/dist/components/Deposit/src/hooks/useMulticallBalance.d.ts.map +1 -0
  33. package/dist/components/Deposit/src/index.d.ts +2 -2
  34. package/dist/components/Deposit/src/index.d.ts.map +1 -1
  35. package/dist/components/Deposit/src/utils.d.ts +7 -41
  36. package/dist/components/Deposit/src/utils.d.ts.map +1 -1
  37. package/dist/components/Deposit/types/index.d.ts +23 -35
  38. package/dist/components/Deposit/types/index.d.ts.map +1 -1
  39. package/dist/components/LoadingSpinner/LoadingSpinner.d.ts +19 -0
  40. package/dist/components/LoadingSpinner/LoadingSpinner.d.ts.map +1 -0
  41. package/dist/components/LoadingSpinner/index.d.ts +4 -0
  42. package/dist/components/LoadingSpinner/index.d.ts.map +1 -0
  43. package/dist/components/Provider/index.d.ts +6 -1
  44. package/dist/components/Provider/index.d.ts.map +1 -1
  45. package/dist/components/Tabs/index.d.ts +6 -0
  46. package/dist/components/Tabs/index.d.ts.map +1 -0
  47. package/dist/components/Tabs/src/Tab.d.ts +5 -0
  48. package/dist/components/Tabs/src/Tab.d.ts.map +1 -0
  49. package/dist/components/Tabs/src/Tabs.d.ts +5 -0
  50. package/dist/components/Tabs/src/Tabs.d.ts.map +1 -0
  51. package/dist/components/Tabs/src/TabsList.d.ts +5 -0
  52. package/dist/components/Tabs/src/TabsList.d.ts.map +1 -0
  53. package/dist/components/Tabs/src/TabsPanel.d.ts +5 -0
  54. package/dist/components/Tabs/src/TabsPanel.d.ts.map +1 -0
  55. package/dist/components/Tabs/src/context.d.ts +16 -0
  56. package/dist/components/Tabs/src/context.d.ts.map +1 -0
  57. package/dist/components/Tabs/src/index.d.ts +6 -0
  58. package/dist/components/Tabs/src/index.d.ts.map +1 -0
  59. package/dist/components/Tabs/types/index.d.ts +28 -0
  60. package/dist/components/Tabs/types/index.d.ts.map +1 -0
  61. package/dist/components/Tooltip/index.d.ts +3 -0
  62. package/dist/components/Tooltip/index.d.ts.map +1 -0
  63. package/dist/components/Tooltip/src/Tooltip.d.ts +5 -0
  64. package/dist/components/Tooltip/src/Tooltip.d.ts.map +1 -0
  65. package/dist/components/Tooltip/src/TooltipArrow.d.ts +5 -0
  66. package/dist/components/Tooltip/src/TooltipArrow.d.ts.map +1 -0
  67. package/dist/components/Tooltip/src/index.d.ts +3 -0
  68. package/dist/components/Tooltip/src/index.d.ts.map +1 -0
  69. package/dist/components/Tooltip/types/index.d.ts +52 -0
  70. package/dist/components/Tooltip/types/index.d.ts.map +1 -0
  71. package/dist/components/Withdraw/constants/index.d.ts +7 -0
  72. package/dist/components/Withdraw/constants/index.d.ts.map +1 -0
  73. package/dist/components/Withdraw/index.d.ts +6 -10
  74. package/dist/components/Withdraw/index.d.ts.map +1 -1
  75. package/dist/components/Withdraw/src/Speed.d.ts +10 -0
  76. package/dist/components/Withdraw/src/Speed.d.ts.map +1 -0
  77. package/dist/components/Withdraw/src/WithdrawManager.d.ts +12 -0
  78. package/dist/components/Withdraw/src/WithdrawManager.d.ts.map +1 -0
  79. package/dist/components/Withdraw/src/constants.d.ts +24 -0
  80. package/dist/components/Withdraw/src/constants.d.ts.map +1 -0
  81. package/dist/components/Withdraw/src/evm/WalletView.d.ts +25 -0
  82. package/dist/components/Withdraw/src/evm/WalletView.d.ts.map +1 -0
  83. package/dist/components/Withdraw/src/evm/index.d.ts +35 -0
  84. package/dist/components/Withdraw/src/evm/index.d.ts.map +1 -0
  85. package/dist/components/Withdraw/src/index.d.ts +5 -0
  86. package/dist/components/Withdraw/src/index.d.ts.map +1 -0
  87. package/dist/components/Withdraw/types/index.d.ts +74 -0
  88. package/dist/components/Withdraw/types/index.d.ts.map +1 -0
  89. package/dist/components/shared/components/SpeedLevel/ActiveSpeed.d.ts +5 -0
  90. package/dist/components/shared/components/SpeedLevel/ActiveSpeed.d.ts.map +1 -0
  91. package/dist/components/shared/components/SpeedLevel/InactiveSpeed.d.ts +5 -0
  92. package/dist/components/shared/components/SpeedLevel/InactiveSpeed.d.ts.map +1 -0
  93. package/dist/components/shared/components/SpeedLevel/index.d.ts +6 -0
  94. package/dist/components/shared/components/SpeedLevel/index.d.ts.map +1 -0
  95. package/dist/components/shared/components/SpeedLevel/types/index.d.ts +6 -0
  96. package/dist/components/shared/components/SpeedLevel/types/index.d.ts.map +1 -0
  97. package/dist/components/shared/components/selector/AssetTabs.d.ts +5 -0
  98. package/dist/components/shared/components/selector/AssetTabs.d.ts.map +1 -0
  99. package/dist/components/shared/components/selector/Chain.d.ts +5 -0
  100. package/dist/components/shared/components/selector/Chain.d.ts.map +1 -0
  101. package/dist/components/shared/components/selector/index.d.ts +5 -0
  102. package/dist/components/shared/components/selector/index.d.ts.map +1 -0
  103. package/dist/components/shared/components/selector/types/index.d.ts +38 -0
  104. package/dist/components/shared/components/selector/types/index.d.ts.map +1 -0
  105. package/dist/components/shared/constants/index.d.ts +3 -0
  106. package/dist/components/shared/constants/index.d.ts.map +1 -0
  107. package/dist/components/shared/hooks/index.d.ts +1 -0
  108. package/dist/components/shared/hooks/index.d.ts.map +1 -0
  109. package/dist/components/shared/types/index.d.ts +10 -0
  110. package/dist/components/shared/types/index.d.ts.map +1 -0
  111. package/dist/components/shared/utils/index.d.ts +23 -0
  112. package/dist/components/shared/utils/index.d.ts.map +1 -0
  113. package/dist/hooks/index.d.ts +2 -0
  114. package/dist/hooks/index.d.ts.map +1 -1
  115. package/dist/hooks/usePoolBalance.d.ts +20 -0
  116. package/dist/hooks/usePoolBalance.d.ts.map +1 -0
  117. package/dist/hooks/useTranslation.d.ts +147 -0
  118. package/dist/hooks/useTranslation.d.ts.map +1 -0
  119. package/dist/index-LUllFZkb.mjs +20236 -0
  120. package/dist/index-LUllFZkb.mjs.map +1 -0
  121. package/dist/index.d.ts +10 -3
  122. package/dist/index.d.ts.map +1 -1
  123. package/dist/index.esm.js +30 -6566
  124. package/dist/index.esm.js.map +1 -1
  125. package/dist/index.umd.js +85 -37
  126. package/dist/index.umd.js.map +1 -1
  127. package/dist/locales/en-US.d.ts +56 -0
  128. package/dist/locales/en-US.d.ts.map +1 -0
  129. package/dist/locales/index.d.ts +16 -0
  130. package/dist/locales/index.d.ts.map +1 -0
  131. package/dist/locales/ja-JP.d.ts +56 -0
  132. package/dist/locales/ja-JP.d.ts.map +1 -0
  133. package/dist/locales/ru-RU.d.ts +56 -0
  134. package/dist/locales/ru-RU.d.ts.map +1 -0
  135. package/dist/locales/zh-CN.d.ts +57 -0
  136. package/dist/locales/zh-CN.d.ts.map +1 -0
  137. package/dist/locales/zh-TW.d.ts +56 -0
  138. package/dist/locales/zh-TW.d.ts.map +1 -0
  139. package/dist/style.css +1 -0
  140. package/dist/types/index.d.ts +12 -1
  141. package/dist/types/index.d.ts.map +1 -1
  142. package/dist/utils/index.d.ts +14 -0
  143. package/dist/utils/index.d.ts.map +1 -0
  144. package/package.json +13 -7
  145. package/dist/components/Deposit/src/WalletProvider.d.ts +0 -23
  146. package/dist/components/Deposit/src/WalletProvider.d.ts.map +0 -1
  147. package/dist/components/Deposit/src/evm/WalletView.d.ts +0 -18
  148. package/dist/components/Deposit/src/evm/WalletView.d.ts.map +0 -1
  149. package/dist/components/Deposit/src/evm/index.d.ts +0 -25
  150. package/dist/components/Deposit/src/evm/index.d.ts.map +0 -1
  151. package/dist/components/Deposit/src/mpc/WalletView.d.ts +0 -12
  152. package/dist/components/Deposit/src/mpc/WalletView.d.ts.map +0 -1
  153. package/dist/components/Deposit/src/mpc/index.d.ts +0 -22
  154. package/dist/components/Deposit/src/mpc/index.d.ts.map +0 -1
  155. package/dist/components/Deposit/src/selector/Asset.d.ts +0 -20
  156. package/dist/components/Deposit/src/selector/Asset.d.ts.map +0 -1
  157. package/dist/components/Deposit/src/selector/Chain.d.ts +0 -16
  158. package/dist/components/Deposit/src/selector/Chain.d.ts.map +0 -1
  159. package/dist/components/Deposit/src/selector/index.d.ts +0 -14
  160. package/dist/components/Deposit/src/selector/index.d.ts.map +0 -1
  161. package/dist/components/Deposit/src/walletAdapters.d.ts +0 -67
  162. package/dist/components/Deposit/src/walletAdapters.d.ts.map +0 -1
  163. package/dist/components/Deposit/types/wallet-hooks.d.ts +0 -78
  164. package/dist/components/Deposit/types/wallet-hooks.d.ts.map +0 -1
@@ -0,0 +1,74 @@
1
+ import { WithdrawConfig, ChainInfo } from '../../../types';
2
+ import { Account } from '../../shared/types';
3
+
4
+ export interface WithdrawResult {
5
+ chainId: number;
6
+ tokenAddress: string;
7
+ amount: string;
8
+ txHash?: string;
9
+ }
10
+ export interface WithdrawProps {
11
+ isOpen: boolean;
12
+ isLoading?: boolean;
13
+ onClose: () => void;
14
+ config: WithdrawConfig;
15
+ children?: React.ReactNode;
16
+ currentActiveAccount: Account;
17
+ chains: ChainInfo[];
18
+ defaultChainId?: number;
19
+ defaultTokenAddress?: string;
20
+ defaultAmount?: string;
21
+ metadata?: {
22
+ multiChain?: {
23
+ minWithdraw: number;
24
+ };
25
+ };
26
+ currentEquity?: number;
27
+ platformBalance?: string;
28
+ fee?: string;
29
+ wagmiHooks?: {
30
+ useBalance: any;
31
+ useReadContract: any;
32
+ useAccount: any;
33
+ };
34
+ onWithdraw?: (withdrawInfo: {
35
+ amount: string;
36
+ chainId: number;
37
+ tokenAddress: string;
38
+ tokenSymbol: string;
39
+ receiverAddress?: string;
40
+ }) => void;
41
+ onChainChange?: (chainId: number) => void;
42
+ onTokenChange?: (tokenSymbol: string) => void;
43
+ onAmountChanged?: (amount: string) => void;
44
+ }
45
+ export interface OpenWithdrawOptions {
46
+ config?: WithdrawConfig;
47
+ currentActiveAccount: WithdrawProps['currentActiveAccount'];
48
+ chains: ChainInfo[];
49
+ defaultChainId?: number;
50
+ defaultTokenAddress?: string;
51
+ defaultAmount?: string;
52
+ metadata?: WithdrawProps['metadata'];
53
+ currentEquity?: number;
54
+ platformBalance?: string;
55
+ fee?: string;
56
+ wagmiHooks?: WithdrawProps['wagmiHooks'];
57
+ curSelectToken?: string;
58
+ currentActiveChain?: any;
59
+ withdrawAmount?: string;
60
+ onWithdraw?: WithdrawProps['onWithdraw'];
61
+ onChainChange?: (chainId: number) => void;
62
+ onTokenChange?: (tokenSymbol: string) => void;
63
+ onAmountChanged?: (amount: string) => void;
64
+ onClose?: () => void;
65
+ }
66
+ export interface WithdrawAPI {
67
+ openWithdraw: (options?: OpenWithdrawOptions) => void;
68
+ closeWithdraw: () => void;
69
+ updateWithdrawOptions: (options: Partial<OpenWithdrawOptions>) => void;
70
+ setWithdrawLoading: (loading: boolean) => void;
71
+ isOpen: () => boolean;
72
+ isLoading: () => boolean;
73
+ }
74
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/Withdraw/types/index.ts"],"names":[],"mappings":"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"}
@@ -0,0 +1,5 @@
1
+ import { FC } from 'react';
2
+
3
+ declare const ActiveSpeedIcon: FC;
4
+ export default ActiveSpeedIcon;
5
+ //# sourceMappingURL=ActiveSpeed.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ActiveSpeed.d.ts","sourceRoot":"","sources":["../../../../../src/components/shared/components/SpeedLevel/ActiveSpeed.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAAE,MAAM,OAAO,CAAA;AAE1B,QAAA,MAAM,eAAe,EAAE,EA2BtB,CAAA;AAED,eAAe,eAAe,CAAA"}
@@ -0,0 +1,5 @@
1
+ import { FC } from 'react';
2
+
3
+ declare const InactiveSpeedIcon: FC;
4
+ export default InactiveSpeedIcon;
5
+ //# sourceMappingURL=InactiveSpeed.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"InactiveSpeed.d.ts","sourceRoot":"","sources":["../../../../../src/components/shared/components/SpeedLevel/InactiveSpeed.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAAE,MAAM,OAAO,CAAA;AAE1B,QAAA,MAAM,iBAAiB,EAAE,EA2BxB,CAAA;AAED,eAAe,iBAAiB,CAAA"}
@@ -0,0 +1,6 @@
1
+ import { FC } from 'react';
2
+ import { WithdrawSpeedProps } from './types';
3
+
4
+ declare const SpeedLevel: FC<WithdrawSpeedProps>;
5
+ export default SpeedLevel;
6
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/shared/components/SpeedLevel/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAAE,MAAM,OAAO,CAAA;AAK1B,OAAO,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAA;AAE5C,QAAA,MAAM,UAAU,EAAE,EAAE,CAAC,kBAAkB,CAoBtC,CAAA;AAED,eAAe,UAAU,CAAA"}
@@ -0,0 +1,6 @@
1
+ export interface WithdrawSpeedProps {
2
+ selectedLevel: number;
3
+ maxLevel: number;
4
+ className?: string;
5
+ }
6
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/components/shared/components/SpeedLevel/types/index.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,kBAAkB;IACjC,aAAa,EAAE,MAAM,CAAA;IACrB,QAAQ,EAAE,MAAM,CAAA;IAChB,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB"}
@@ -0,0 +1,5 @@
1
+ import { FC } from 'react';
2
+ import { AssetTabsProps } from './types';
3
+
4
+ export declare const AssetTabs: FC<AssetTabsProps>;
5
+ //# sourceMappingURL=AssetTabs.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AssetTabs.d.ts","sourceRoot":"","sources":["../../../../../src/components/shared/components/selector/AssetTabs.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAAE,MAAM,OAAO,CAAA;AAE1B,OAAO,EAAE,cAAc,EAAE,MAAM,+CAA+C,CAAA;AAE9E,eAAO,MAAM,SAAS,EAAE,EAAE,CAAC,cAAc,CA2BxC,CAAA"}
@@ -0,0 +1,5 @@
1
+ import { FC } from 'react';
2
+ import { ChainSelectorProps } from './types';
3
+
4
+ export declare const ChainSelector: FC<ChainSelectorProps>;
5
+ //# sourceMappingURL=Chain.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Chain.d.ts","sourceRoot":"","sources":["../../../../../src/components/shared/components/selector/Chain.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAY,EAAE,EAAE,MAAM,OAAO,CAAA;AAUpC,OAAO,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAA;AAE5C,eAAO,MAAM,aAAa,EAAE,EAAE,CAAC,kBAAkB,CA8LhD,CAAA"}
@@ -0,0 +1,5 @@
1
+ import { FC } from 'react';
2
+ import { SelectorProps } from './types';
3
+
4
+ export declare const Selector: FC<SelectorProps>;
5
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/shared/components/selector/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAAmC,MAAM,OAAO,CAAA;AAI3D,OAAO,EACL,aAAa,EAEd,MAAM,+CAA+C,CAAA;AAOtD,eAAO,MAAM,QAAQ,EAAE,EAAE,CAAC,aAAa,CA4MtC,CAAA"}
@@ -0,0 +1,38 @@
1
+ import { ChainInfo } from '../../../../../types';
2
+ import { WalletType } from '../../../types';
3
+
4
+ /******************** Asset *********************/
5
+ export interface Asset {
6
+ token: string;
7
+ iconUrl?: string;
8
+ decimals: number;
9
+ tokenAddress: string;
10
+ symbol?: string;
11
+ }
12
+ export interface AssetTabsProps {
13
+ tokens: Asset[];
14
+ selectedToken: Asset;
15
+ onTokenChange: (token: Asset) => void;
16
+ }
17
+ /******************** Chain *********************/
18
+ export interface ChainSelectorProps {
19
+ chains: ChainInfo[];
20
+ selectedChain: ChainInfo;
21
+ onChainChange: (chain: ChainInfo) => void;
22
+ chainPoolBalances?: Record<number, string>;
23
+ disabled?: boolean;
24
+ className?: string;
25
+ walletType?: WalletType;
26
+ }
27
+ /******************** SelectorProps *********************/
28
+ export interface SelectorProps {
29
+ currentActiveChain: ChainInfo;
30
+ chainList: ChainInfo[];
31
+ onChainChange: (chainId: number) => void;
32
+ curSelectToken: string;
33
+ onTokenChange: (token: string) => void;
34
+ walletType?: WalletType;
35
+ chainPoolBalances?: Record<number, string>;
36
+ txType?: string;
37
+ }
38
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/components/shared/components/selector/types/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,SAAS,CAAA;AACnC,OAAO,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAA;AAEtD,kDAAkD;AAClD,MAAM,WAAW,KAAK;IACpB,KAAK,EAAE,MAAM,CAAA;IACb,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,QAAQ,EAAE,MAAM,CAAA;IAChB,YAAY,EAAE,MAAM,CAAA;IACpB,MAAM,CAAC,EAAE,MAAM,CAAA;CAChB;AAED,MAAM,WAAW,cAAc;IAC7B,MAAM,EAAE,KAAK,EAAE,CAAA;IACf,aAAa,EAAE,KAAK,CAAA;IACpB,aAAa,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,CAAA;CACtC;AAED,kDAAkD;AAClD,MAAM,WAAW,kBAAkB;IACjC,MAAM,EAAE,SAAS,EAAE,CAAA;IACnB,aAAa,EAAE,SAAS,CAAA;IACxB,aAAa,EAAE,CAAC,KAAK,EAAE,SAAS,KAAK,IAAI,CAAA;IACzC,iBAAiB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;IAC1C,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,UAAU,CAAC,EAAE,UAAU,CAAA;CACxB;AAED,0DAA0D;AAC1D,MAAM,WAAW,aAAa;IAC5B,kBAAkB,EAAE,SAAS,CAAA;IAC7B,SAAS,EAAE,SAAS,EAAE,CAAA;IACtB,aAAa,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAA;IAExC,cAAc,EAAE,MAAM,CAAA;IACtB,aAAa,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAA;IAEtC,UAAU,CAAC,EAAE,UAAU,CAAA;IAEvB,iBAAiB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;IAE1C,MAAM,CAAC,EAAE,MAAM,CAAA;CAChB"}
@@ -0,0 +1,3 @@
1
+ export declare const MPC: "MPC";
2
+ export declare const EVM: "EVM";
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/shared/constants/index.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,GAAG,EAAG,KAAc,CAAA;AAEjC,eAAO,MAAM,GAAG,EAAG,KAAc,CAAA"}
@@ -0,0 +1 @@
1
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/shared/hooks/index.ts"],"names":[],"mappings":""}
@@ -0,0 +1,10 @@
1
+ import { MPC, EVM } from '../constants';
2
+
3
+ export type WalletType = typeof MPC | typeof EVM;
4
+ export interface Account {
5
+ wallet: WalletType;
6
+ ethAddress: string;
7
+ accountId: string;
8
+ smartWalletAddress: string;
9
+ }
10
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/shared/types/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,GAAG,EAAE,MAAM,+BAA+B,CAAA;AAExD,MAAM,MAAM,UAAU,GAAG,OAAO,GAAG,GAAG,OAAO,GAAG,CAAA;AAEhD,MAAM,WAAW,OAAO;IACtB,MAAM,EAAE,UAAU,CAAA;IAClB,UAAU,EAAE,MAAM,CAAA;IAClB,SAAS,EAAE,MAAM,CAAA;IACjB,kBAAkB,EAAE,MAAM,CAAA;CAC3B"}
@@ -0,0 +1,23 @@
1
+ import { WalletType, Account } from '../types';
2
+
3
+ /**
4
+ * Normalize an incoming wallet type to the canonical constant (MPC or EVM).
5
+ * Case-insensitive by design: adjust the normalization to match constants' casing.
6
+ * If constants MPC/EVM are lowercase, prefer `wallet.toLowerCase()` here.
7
+ * @param wallet WalletType value to normalize
8
+ * @returns WalletType - canonical constant (MPC or EVM)
9
+ */
10
+ export declare const getWalletType: (wallet: WalletType) => WalletType;
11
+ /**
12
+ * Convenience predicate: whether the given account is an MPC wallet
13
+ * @param account Account
14
+ * @returns boolean
15
+ */
16
+ export declare const isMpcWalletType: (account: Account) => boolean;
17
+ /**
18
+ * Convenience predicate: whether the given account is an EVM wallet
19
+ * @param account Account
20
+ * @returns boolean
21
+ */
22
+ export declare const isEvmWalletType: (account: Account) => boolean;
23
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/shared/utils/index.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,UAAU,EAAE,OAAO,EAAE,MAAM,2BAA2B,CAAA;AAI/D;;;;;;GAMG;AACH,eAAO,MAAM,aAAa,GAAI,QAAQ,UAAU,KAAG,UAElD,CAAA;AAED;;;;GAIG;AACH,eAAO,MAAM,eAAe,GAAI,SAAS,OAAO,YAE/C,CAAA;AAED;;;;GAIG;AACH,eAAO,MAAM,eAAe,GAAI,SAAS,OAAO,YAE/C,CAAA"}
@@ -1,9 +1,11 @@
1
1
  import { DepositConfig, WithdrawConfig } from '../types';
2
2
 
3
+ export { useTranslation, useTranslationWithLocale } from './useTranslation';
3
4
  export declare const useDeposit: () => {
4
5
  openDeposit: (config: DepositConfig) => void;
5
6
  };
6
7
  export declare const useWithdraw: () => {
7
8
  openWithdraw: (config: WithdrawConfig) => void;
8
9
  };
10
+ export * from './usePoolBalance';
9
11
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/hooks/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,SAAS,CAAA;AASvD,eAAO,MAAM,UAAU;0BACoB,aAAa;CAKvD,CAAA;AAED,eAAO,MAAM,WAAW;2BACoB,cAAc;CAKzD,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/hooks/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,SAAS,CAAA;AAGvD,OAAO,EAAE,cAAc,EAAE,wBAAwB,EAAE,MAAM,kBAAkB,CAAA;AAS3E,eAAO,MAAM,UAAU;0BACoB,aAAa;CAKvD,CAAA;AAED,eAAO,MAAM,WAAW;2BACoB,cAAc;CAKzD,CAAA;AAED,cAAc,kBAAkB,CAAA"}
@@ -0,0 +1,20 @@
1
+ export interface UsePoolBalanceParams {
2
+ bscRpcUrl?: string;
3
+ arbitrumRpcUrl?: string;
4
+ pollingInterval?: number;
5
+ }
6
+ /**
7
+ * usePoolBalance
8
+ * Reads pool balances for:
9
+ * - BNB_USDT (USDT on BSC, holder = BSC_POOL)
10
+ * - ARB_USDT (USDT on Arbitrum, holder = ARB_POOL_USDT)
11
+ * - ARB_USDC (USDC on Arbitrum, holder = ARB_POOL_USDC)
12
+ * Returns formatted strings; defaults to '0' if not available yet.
13
+ * In testnet environment, returns '99999' instead of real balances.
14
+ */
15
+ export declare function usePoolBalance(params?: UsePoolBalanceParams): {
16
+ BNB_USDT_BALANCE: string;
17
+ ARB_USDT_BALANCE: string;
18
+ ARB_USDC_BALANCE: string;
19
+ };
20
+ //# sourceMappingURL=usePoolBalance.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"usePoolBalance.d.ts","sourceRoot":"","sources":["../../src/hooks/usePoolBalance.ts"],"names":[],"mappings":"AAeA,MAAM,WAAW,oBAAoB;IACnC,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,cAAc,CAAC,EAAE,MAAM,CAAA;IACvB,eAAe,CAAC,EAAE,MAAM,CAAA;CACzB;AAaD;;;;;;;;GAQG;AACH,wBAAgB,cAAc,CAAC,MAAM,GAAE,oBAAyB;;;;EAyF/D"}
@@ -0,0 +1,147 @@
1
+ /**
2
+ * 多语言翻译 Hook
3
+ *
4
+ * @example
5
+ * ```tsx
6
+ * const { t, locale } = useTranslation()
7
+ *
8
+ * // 基础用法
9
+ * const title = t('deposit.title') // "充值" 或 "Deposit"
10
+ *
11
+ * // 参数化翻译(字符串参数)
12
+ * const enableText = t('deposit.enableSystemProWithToken', {
13
+ * token: 'USDT',
14
+ * network: 'Ethereum'
15
+ * }) // "Enable USDT on Ethereum" 或 "在Ethereum上启用USDT"
16
+ *
17
+ * // 参数化翻译(数字参数)
18
+ * const arrivalText = t('deposit.arrivaltimeTooltip1', {
19
+ * v: 10, // 数字会自动转换为字符串
20
+ * v1: 12
21
+ * }) // "您可以在约 10 分钟 (达到 12 个区块确认后) 提走已到账的资金"
22
+ * ```
23
+ */
24
+ export declare const useTranslation: () => {
25
+ t: (key: string, params?: Record<string, string | number>) => string;
26
+ translations: {
27
+ deposit: {
28
+ title: string;
29
+ chain: string;
30
+ asset: string;
31
+ amount: string;
32
+ available: string;
33
+ equity: string;
34
+ confirmDeposit: string;
35
+ switchNetwork: string;
36
+ max: string;
37
+ arrivalTime: string;
38
+ minDeposit: string;
39
+ minDepositParsed: string;
40
+ maxDeposit: string;
41
+ depositTipFor25w: string;
42
+ depositAllTip: string;
43
+ enableSystemProWithToken: string;
44
+ enableTokenDesc: string;
45
+ enableWithToken: string;
46
+ arrivaltimeTooltip1: string;
47
+ arrivaltimeTooltip2: string;
48
+ arrivalEstimated: string;
49
+ availableDesc: string;
50
+ noPrivateKeyWalletWarning: string;
51
+ layerZeroDepositTip: string;
52
+ layerZeroDepositTipExceedPool: string;
53
+ layerZeroDepositTipGte200k: string;
54
+ layerZeroDepositButton: string;
55
+ };
56
+ withdraw: {
57
+ noticeDesc: string;
58
+ crossChainTips: string;
59
+ commonWithdraw: string;
60
+ withdraw: string;
61
+ speed: string;
62
+ confirmWithdraw: string;
63
+ speedNote: string;
64
+ speedNoteSpeed1: string;
65
+ speedNoteSpeed2: string;
66
+ speedNoteSpeed3: string;
67
+ receiverAddress: string;
68
+ fee: string;
69
+ feeRate: string;
70
+ withdrawlAmount: string;
71
+ amountToReceive: string;
72
+ invalidReceiverAddress: string;
73
+ availableDesc: string;
74
+ feeCalculationTip: string;
75
+ crossChainPoolBalance: string;
76
+ poolBalance: string;
77
+ poolBalanceInsufficientTip: string;
78
+ };
79
+ };
80
+ locale: "en-US" | "ja-JP" | "ru-RU" | "zh-CN" | "zh-TW";
81
+ getTranslationObject: (key: string) => Record<string, any>;
82
+ hasTranslation: (key: string) => boolean;
83
+ };
84
+ /**
85
+ * 用于局部覆盖语言的 Hook
86
+ * @param localLocale - 局部语言设置
87
+ */
88
+ export declare const useTranslationWithLocale: (localLocale?: string) => {
89
+ t: (key: string, params?: Record<string, string | number>) => string;
90
+ translations: {
91
+ deposit: {
92
+ title: string;
93
+ chain: string;
94
+ asset: string;
95
+ amount: string;
96
+ available: string;
97
+ equity: string;
98
+ confirmDeposit: string;
99
+ switchNetwork: string;
100
+ max: string;
101
+ arrivalTime: string;
102
+ minDeposit: string;
103
+ minDepositParsed: string;
104
+ maxDeposit: string;
105
+ depositTipFor25w: string;
106
+ depositAllTip: string;
107
+ enableSystemProWithToken: string;
108
+ enableTokenDesc: string;
109
+ enableWithToken: string;
110
+ arrivaltimeTooltip1: string;
111
+ arrivaltimeTooltip2: string;
112
+ arrivalEstimated: string;
113
+ availableDesc: string;
114
+ noPrivateKeyWalletWarning: string;
115
+ layerZeroDepositTip: string;
116
+ layerZeroDepositTipExceedPool: string;
117
+ layerZeroDepositTipGte200k: string;
118
+ layerZeroDepositButton: string;
119
+ };
120
+ withdraw: {
121
+ noticeDesc: string;
122
+ crossChainTips: string;
123
+ commonWithdraw: string;
124
+ withdraw: string;
125
+ speed: string;
126
+ confirmWithdraw: string;
127
+ speedNote: string;
128
+ speedNoteSpeed1: string;
129
+ speedNoteSpeed2: string;
130
+ speedNoteSpeed3: string;
131
+ receiverAddress: string;
132
+ fee: string;
133
+ feeRate: string;
134
+ withdrawlAmount: string;
135
+ amountToReceive: string;
136
+ invalidReceiverAddress: string;
137
+ availableDesc: string;
138
+ feeCalculationTip: string;
139
+ crossChainPoolBalance: string;
140
+ poolBalance: string;
141
+ poolBalanceInsufficientTip: string;
142
+ };
143
+ };
144
+ locale: string;
145
+ };
146
+ export default useTranslation;
147
+ //# sourceMappingURL=useTranslation.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useTranslation.d.ts","sourceRoot":"","sources":["../../src/hooks/useTranslation.ts"],"names":[],"mappings":"AAGA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,eAAO,MAAM,cAAc;aAST,MAAM,WAAW,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAAC,KAAG,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;gCAyCtC,MAAM,KAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC;0BAyBlC,MAAM,KAAG,OAAO;CA0B9C,CAAA;AAED;;;GAGG;AACH,eAAO,MAAM,wBAAwB,GAAI,cAAc,MAAM;aAW3C,MAAM,WAAW,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAAC,KAAG,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAuC1E,CAAA;AAED,eAAe,cAAc,CAAA"}