@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,56 @@
1
+ export declare const enUS: {
2
+ deposit: {
3
+ title: string;
4
+ chain: string;
5
+ asset: string;
6
+ amount: string;
7
+ available: string;
8
+ equity: string;
9
+ confirmDeposit: string;
10
+ switchNetwork: string;
11
+ max: string;
12
+ arrivalTime: string;
13
+ minDeposit: string;
14
+ minDepositParsed: string;
15
+ maxDeposit: string;
16
+ depositTipFor25w: string;
17
+ depositAllTip: string;
18
+ enableSystemProWithToken: string;
19
+ enableTokenDesc: string;
20
+ enableWithToken: string;
21
+ arrivaltimeTooltip1: string;
22
+ arrivaltimeTooltip2: string;
23
+ arrivalEstimated: string;
24
+ availableDesc: string;
25
+ noPrivateKeyWalletWarning: string;
26
+ layerZeroDepositTip: string;
27
+ layerZeroDepositTipExceedPool: string;
28
+ layerZeroDepositTipGte200k: string;
29
+ layerZeroDepositButton: string;
30
+ };
31
+ withdraw: {
32
+ noticeDesc: string;
33
+ crossChainTips: string;
34
+ commonWithdraw: string;
35
+ withdraw: string;
36
+ speed: string;
37
+ confirmWithdraw: string;
38
+ speedNote: string;
39
+ speedNoteSpeed1: string;
40
+ speedNoteSpeed2: string;
41
+ speedNoteSpeed3: string;
42
+ receiverAddress: string;
43
+ fee: string;
44
+ feeRate: string;
45
+ withdrawlAmount: string;
46
+ amountToReceive: string;
47
+ invalidReceiverAddress: string;
48
+ availableDesc: string;
49
+ feeCalculationTip: string;
50
+ crossChainPoolBalance: string;
51
+ poolBalance: string;
52
+ poolBalanceInsufficientTip: string;
53
+ };
54
+ };
55
+ export default enUS;
56
+ //# sourceMappingURL=en-US.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"en-US.d.ts","sourceRoot":"","sources":["../../src/locales/en-US.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAqEhB,CAAA;AAED,eAAe,IAAI,CAAA"}
@@ -0,0 +1,16 @@
1
+ import { default as zhCN, TranslationKeys } from './zh-CN';
2
+ import { default as enUS } from './en-US';
3
+ import { default as jaJP } from './ja-JP';
4
+ import { default as ruRU } from './ru-RU';
5
+ import { default as zhTW } from './zh-TW';
6
+
7
+ export declare const SUPPORTED_LOCALES: readonly ["en-US", "ja-JP", "ru-RU", "zh-CN", "zh-TW"];
8
+ export type SupportedLocale = (typeof SUPPORTED_LOCALES)[number];
9
+ export declare const localeResources: Record<SupportedLocale, TranslationKeys>;
10
+ export declare const DEFAULT_LOCALE: SupportedLocale;
11
+ export declare const LOCALE_NAMES: Record<SupportedLocale, string>;
12
+ export declare const getLocaleResource: (locale: string) => TranslationKeys;
13
+ export declare const isSupportedLocale: (locale: string) => locale is SupportedLocale;
14
+ export { zhCN, enUS, jaJP, ruRU, zhTW };
15
+ export type { TranslationKeys };
16
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/locales/index.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,EAAE,EAAE,KAAK,eAAe,EAAE,MAAM,SAAS,CAAA;AACpD,OAAO,IAAI,MAAM,SAAS,CAAA;AAC1B,OAAO,IAAI,MAAM,SAAS,CAAA;AAC1B,OAAO,IAAI,MAAM,SAAS,CAAA;AAC1B,OAAO,IAAI,MAAM,SAAS,CAAA;AAG1B,eAAO,MAAM,iBAAiB,wDAMpB,CAAA;AACV,MAAM,MAAM,eAAe,GAAG,CAAC,OAAO,iBAAiB,CAAC,CAAC,MAAM,CAAC,CAAA;AAGhE,eAAO,MAAM,eAAe,EAAE,MAAM,CAAC,eAAe,EAAE,eAAe,CAMpE,CAAA;AAGD,eAAO,MAAM,cAAc,EAAE,eAAyB,CAAA;AAGtD,eAAO,MAAM,YAAY,EAAE,MAAM,CAAC,eAAe,EAAE,MAAM,CAMxD,CAAA;AAGD,eAAO,MAAM,iBAAiB,GAAI,QAAQ,MAAM,KAAG,eAKlD,CAAA;AAGD,eAAO,MAAM,iBAAiB,GAC5B,QAAQ,MAAM,KACb,MAAM,IAAI,eAEZ,CAAA;AAGD,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,CAAA;AACvC,YAAY,EAAE,eAAe,EAAE,CAAA"}
@@ -0,0 +1,56 @@
1
+ export declare const jaJP: {
2
+ deposit: {
3
+ title: string;
4
+ chain: string;
5
+ asset: string;
6
+ amount: string;
7
+ available: string;
8
+ equity: string;
9
+ confirmDeposit: string;
10
+ switchNetwork: string;
11
+ max: string;
12
+ arrivalTime: string;
13
+ minDeposit: string;
14
+ minDepositParsed: string;
15
+ maxDeposit: string;
16
+ depositTipFor25w: string;
17
+ depositAllTip: string;
18
+ enableSystemProWithToken: string;
19
+ enableTokenDesc: string;
20
+ enableWithToken: string;
21
+ arrivaltimeTooltip1: string;
22
+ arrivaltimeTooltip2: string;
23
+ arrivalEstimated: string;
24
+ availableDesc: string;
25
+ noPrivateKeyWalletWarning: string;
26
+ layerZeroDepositTip: string;
27
+ layerZeroDepositTipExceedPool: string;
28
+ layerZeroDepositTipGte200k: string;
29
+ layerZeroDepositButton: string;
30
+ };
31
+ withdraw: {
32
+ noticeDesc: string;
33
+ crossChainTips: string;
34
+ commonWithdraw: string;
35
+ withdraw: string;
36
+ speed: string;
37
+ confirmWithdraw: string;
38
+ speedNote: string;
39
+ speedNoteSpeed1: string;
40
+ speedNoteSpeed2: string;
41
+ speedNoteSpeed3: string;
42
+ receiverAddress: string;
43
+ fee: string;
44
+ feeRate: string;
45
+ withdrawlAmount: string;
46
+ amountToReceive: string;
47
+ invalidReceiverAddress: string;
48
+ availableDesc: string;
49
+ feeCalculationTip: string;
50
+ crossChainPoolBalance: string;
51
+ poolBalance: string;
52
+ poolBalanceInsufficientTip: string;
53
+ };
54
+ };
55
+ export default jaJP;
56
+ //# sourceMappingURL=ja-JP.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ja-JP.d.ts","sourceRoot":"","sources":["../../src/locales/ja-JP.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAqEhB,CAAA;AAED,eAAe,IAAI,CAAA"}
@@ -0,0 +1,56 @@
1
+ export declare const ruRU: {
2
+ deposit: {
3
+ title: string;
4
+ chain: string;
5
+ asset: string;
6
+ amount: string;
7
+ available: string;
8
+ equity: string;
9
+ confirmDeposit: string;
10
+ switchNetwork: string;
11
+ max: string;
12
+ arrivalTime: string;
13
+ minDeposit: string;
14
+ minDepositParsed: string;
15
+ maxDeposit: string;
16
+ depositTipFor25w: string;
17
+ depositAllTip: string;
18
+ enableSystemProWithToken: string;
19
+ enableTokenDesc: string;
20
+ enableWithToken: string;
21
+ arrivaltimeTooltip1: string;
22
+ arrivaltimeTooltip2: string;
23
+ arrivalEstimated: string;
24
+ availableDesc: string;
25
+ noPrivateKeyWalletWarning: string;
26
+ layerZeroDepositTip: string;
27
+ layerZeroDepositTipExceedPool: string;
28
+ layerZeroDepositTipGte200k: string;
29
+ layerZeroDepositButton: string;
30
+ };
31
+ withdraw: {
32
+ noticeDesc: string;
33
+ crossChainTips: string;
34
+ commonWithdraw: string;
35
+ withdraw: string;
36
+ speed: string;
37
+ confirmWithdraw: string;
38
+ speedNote: string;
39
+ speedNoteSpeed1: string;
40
+ speedNoteSpeed2: string;
41
+ speedNoteSpeed3: string;
42
+ receiverAddress: string;
43
+ fee: string;
44
+ feeRate: string;
45
+ withdrawlAmount: string;
46
+ amountToReceive: string;
47
+ invalidReceiverAddress: string;
48
+ availableDesc: string;
49
+ feeCalculationTip: string;
50
+ crossChainPoolBalance: string;
51
+ poolBalance: string;
52
+ poolBalanceInsufficientTip: string;
53
+ };
54
+ };
55
+ export default ruRU;
56
+ //# sourceMappingURL=ru-RU.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ru-RU.d.ts","sourceRoot":"","sources":["../../src/locales/ru-RU.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAsEhB,CAAA;AAED,eAAe,IAAI,CAAA"}
@@ -0,0 +1,57 @@
1
+ export declare const zhCN: {
2
+ deposit: {
3
+ title: string;
4
+ chain: string;
5
+ asset: string;
6
+ amount: string;
7
+ available: string;
8
+ equity: string;
9
+ confirmDeposit: string;
10
+ switchNetwork: string;
11
+ max: string;
12
+ arrivalTime: string;
13
+ minDeposit: string;
14
+ minDepositParsed: string;
15
+ maxDeposit: string;
16
+ depositTipFor25w: string;
17
+ depositAllTip: string;
18
+ enableSystemProWithToken: string;
19
+ enableTokenDesc: string;
20
+ enableWithToken: string;
21
+ arrivaltimeTooltip1: string;
22
+ arrivaltimeTooltip2: string;
23
+ arrivalEstimated: string;
24
+ availableDesc: string;
25
+ noPrivateKeyWalletWarning: string;
26
+ layerZeroDepositTip: string;
27
+ layerZeroDepositTipExceedPool: string;
28
+ layerZeroDepositTipGte200k: string;
29
+ layerZeroDepositButton: string;
30
+ };
31
+ withdraw: {
32
+ noticeDesc: string;
33
+ crossChainTips: string;
34
+ commonWithdraw: string;
35
+ withdraw: string;
36
+ speed: string;
37
+ confirmWithdraw: string;
38
+ speedNote: string;
39
+ speedNoteSpeed1: string;
40
+ speedNoteSpeed2: string;
41
+ speedNoteSpeed3: string;
42
+ receiverAddress: string;
43
+ fee: string;
44
+ feeRate: string;
45
+ withdrawlAmount: string;
46
+ amountToReceive: string;
47
+ invalidReceiverAddress: string;
48
+ availableDesc: string;
49
+ feeCalculationTip: string;
50
+ crossChainPoolBalance: string;
51
+ poolBalance: string;
52
+ poolBalanceInsufficientTip: string;
53
+ };
54
+ };
55
+ export default zhCN;
56
+ export type TranslationKeys = typeof zhCN;
57
+ //# sourceMappingURL=zh-CN.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"zh-CN.d.ts","sourceRoot":"","sources":["../../src/locales/zh-CN.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAmEhB,CAAA;AAED,eAAe,IAAI,CAAA;AACnB,MAAM,MAAM,eAAe,GAAG,OAAO,IAAI,CAAA"}
@@ -0,0 +1,56 @@
1
+ export declare const zhTW: {
2
+ deposit: {
3
+ title: string;
4
+ chain: string;
5
+ asset: string;
6
+ amount: string;
7
+ available: string;
8
+ equity: string;
9
+ confirmDeposit: string;
10
+ switchNetwork: string;
11
+ max: string;
12
+ arrivalTime: string;
13
+ minDeposit: string;
14
+ minDepositParsed: string;
15
+ maxDeposit: string;
16
+ depositTipFor25w: string;
17
+ depositAllTip: string;
18
+ enableSystemProWithToken: string;
19
+ enableTokenDesc: string;
20
+ enableWithToken: string;
21
+ arrivaltimeTooltip1: string;
22
+ arrivaltimeTooltip2: string;
23
+ arrivalEstimated: string;
24
+ availableDesc: string;
25
+ noPrivateKeyWalletWarning: string;
26
+ layerZeroDepositTip: string;
27
+ layerZeroDepositTipExceedPool: string;
28
+ layerZeroDepositTipGte200k: string;
29
+ layerZeroDepositButton: string;
30
+ };
31
+ withdraw: {
32
+ noticeDesc: string;
33
+ crossChainTips: string;
34
+ commonWithdraw: string;
35
+ withdraw: string;
36
+ speed: string;
37
+ confirmWithdraw: string;
38
+ speedNote: string;
39
+ speedNoteSpeed1: string;
40
+ speedNoteSpeed2: string;
41
+ speedNoteSpeed3: string;
42
+ receiverAddress: string;
43
+ fee: string;
44
+ feeRate: string;
45
+ withdrawlAmount: string;
46
+ amountToReceive: string;
47
+ invalidReceiverAddress: string;
48
+ availableDesc: string;
49
+ feeCalculationTip: string;
50
+ crossChainPoolBalance: string;
51
+ poolBalance: string;
52
+ poolBalanceInsufficientTip: string;
53
+ };
54
+ };
55
+ export default zhTW;
56
+ //# sourceMappingURL=zh-TW.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"zh-TW.d.ts","sourceRoot":"","sources":["../../src/locales/zh-TW.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAoEhB,CAAA;AAED,eAAe,IAAI,CAAA"}
package/dist/style.css ADDED
@@ -0,0 +1 @@
1
+ .loading{pointer-events:none;aspect-ratio:1;background-color:currentColor;width:1.5rem;display:inline-block;-webkit-mask-image:url("data:image/svg+xml,%3Csvg width=%2724%27 height=%2724%27 stroke=%27black%27 viewBox=%270 0 24 24%27 xmlns=%27http://www.w3.org/2000/svg%27%3E%3Cg transform-origin=%27center%27%3E%3Ccircle cx=%2712%27 cy=%2712%27 r=%279.5%27 fill=%27none%27 stroke-width=%273%27 stroke-linecap=%27round%27%3E%3CanimateTransform attributeName=%27transform%27 type=%27rotate%27 from=%270 12 12%27 to=%27360 12 12%27 dur=%272s%27 repeatCount=%27indefinite%27/%3E%3Canimate attributeName=%27stroke-dasharray%27 values=%270,150;42,150;42,150%27 keyTimes=%270;0.475;1%27 dur=%271.5s%27 repeatCount=%27indefinite%27/%3E%3Canimate attributeName=%27stroke-dashoffset%27 values=%270;-16;-59%27 keyTimes=%270;0.475;1%27 dur=%271.5s%27 repeatCount=%27indefinite%27/%3E%3C/circle%3E%3C/g%3E%3C/svg%3E");mask-image:url("data:image/svg+xml,%3Csvg width=%2724%27 height=%2724%27 stroke=%27black%27 viewBox=%270 0 24 24%27 xmlns=%27http://www.w3.org/2000/svg%27%3E%3Cg transform-origin=%27center%27%3E%3Ccircle cx=%2712%27 cy=%2712%27 r=%279.5%27 fill=%27none%27 stroke-width=%273%27 stroke-linecap=%27round%27%3E%3CanimateTransform attributeName=%27transform%27 type=%27rotate%27 from=%270 12 12%27 to=%27360 12 12%27 dur=%272s%27 repeatCount=%27indefinite%27/%3E%3Canimate attributeName=%27stroke-dasharray%27 values=%270,150;42,150;42,150%27 keyTimes=%270;0.475;1%27 dur=%271.5s%27 repeatCount=%27indefinite%27/%3E%3Canimate attributeName=%27stroke-dashoffset%27 values=%270;-16;-59%27 keyTimes=%270;0.475;1%27 dur=%271.5s%27 repeatCount=%27indefinite%27/%3E%3C/circle%3E%3C/g%3E%3C/svg%3E");-webkit-mask-position:center;mask-position:center;-webkit-mask-size:100%;mask-size:100%;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat}.loading-spinner{-webkit-mask-image:url("data:image/svg+xml,%3Csvg width=%2724%27 height=%2724%27 stroke=%27black%27 viewBox=%270 0 24 24%27 xmlns=%27http://www.w3.org/2000/svg%27%3E%3Cg transform-origin=%27center%27%3E%3Ccircle cx=%2712%27 cy=%2712%27 r=%279.5%27 fill=%27none%27 stroke-width=%273%27 stroke-linecap=%27round%27%3E%3CanimateTransform attributeName=%27transform%27 type=%27rotate%27 from=%270 12 12%27 to=%27360 12 12%27 dur=%272s%27 repeatCount=%27indefinite%27/%3E%3Canimate attributeName=%27stroke-dasharray%27 values=%270,150;42,150;42,150%27 keyTimes=%270;0.475;1%27 dur=%271.5s%27 repeatCount=%27indefinite%27/%3E%3Canimate attributeName=%27stroke-dashoffset%27 values=%270;-16;-59%27 keyTimes=%270;0.475;1%27 dur=%271.5s%27 repeatCount=%27indefinite%27/%3E%3C/circle%3E%3C/g%3E%3C/svg%3E");mask-image:url("data:image/svg+xml,%3Csvg width=%2724%27 height=%2724%27 stroke=%27black%27 viewBox=%270 0 24 24%27 xmlns=%27http://www.w3.org/2000/svg%27%3E%3Cg transform-origin=%27center%27%3E%3Ccircle cx=%2712%27 cy=%2712%27 r=%279.5%27 fill=%27none%27 stroke-width=%273%27 stroke-linecap=%27round%27%3E%3CanimateTransform attributeName=%27transform%27 type=%27rotate%27 from=%270 12 12%27 to=%27360 12 12%27 dur=%272s%27 repeatCount=%27indefinite%27/%3E%3Canimate attributeName=%27stroke-dasharray%27 values=%270,150;42,150;42,150%27 keyTimes=%270;0.475;1%27 dur=%271.5s%27 repeatCount=%27indefinite%27/%3E%3Canimate attributeName=%27stroke-dashoffset%27 values=%270;-16;-59%27 keyTimes=%270;0.475;1%27 dur=%271.5s%27 repeatCount=%27indefinite%27/%3E%3C/circle%3E%3C/g%3E%3C/svg%3E")}.loading-xs{width:1rem}.loading-sm{width:1.25rem}.loading-md{width:1.5rem}.loading-lg{width:2rem}.loading[aria-label]{position:relative}.loading[aria-label]:focus{outline:2px solid currentColor;outline-offset:2px}.loading.loading-primary{color:#3b82f6}.loading.loading-secondary{color:#6b7280}.loading.loading-success{color:#10b981}.loading.loading-warning{color:#f59e0b}.loading.loading-error{color:#ef4444}.loading.loading-inline{vertical-align:middle;margin:0 .25rem}.loading{will-change:transform;transform:translateZ(0)}@media (prefers-contrast: high){.loading{border:1px solid currentColor}}@media (prefers-reduced-motion: reduce){.loading{animation-duration:3s}}
@@ -1,6 +1,13 @@
1
+ import { SupportedLocale } from '../locales';
2
+
3
+ declare global {
4
+ interface Window {
5
+ ENV?: Record<string, string>;
6
+ }
7
+ }
1
8
  export interface ComponentConfig {
2
9
  theme?: 'light' | 'dark';
3
- locale?: string;
10
+ locale?: SupportedLocale | string;
4
11
  apiBaseUrl?: string;
5
12
  debug?: boolean;
6
13
  }
@@ -66,6 +73,7 @@ export interface TokenInfo {
66
73
  decimals: number;
67
74
  iconUrl: string;
68
75
  tokenAddress: string;
76
+ contractAddress?: string;
69
77
  balance?: {
70
78
  formatted: string;
71
79
  raw: string;
@@ -77,6 +85,8 @@ export interface TokenInfo {
77
85
  minDeposit?: string;
78
86
  maxDeposit?: string;
79
87
  isActive?: boolean;
88
+ withdrawEnable?: boolean;
89
+ pullOff?: boolean;
80
90
  }
81
91
  export interface ChainInfo {
82
92
  chainId: number;
@@ -85,6 +95,7 @@ export interface ChainInfo {
85
95
  blockTime: number;
86
96
  txConfirm: number;
87
97
  allowDeposit: boolean;
98
+ contractAddress?: string;
88
99
  tokenList: TokenInfo[];
89
100
  rpcUrl?: string;
90
101
  explorerUrl?: string;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AAEA,MAAM,WAAW,eAAe;IAC9B,KAAK,CAAC,EAAE,OAAO,GAAG,MAAM,CAAA;IACxB,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,KAAK,CAAC,EAAE,OAAO,CAAA;CAChB;AAED,MAAM,WAAW,aAAa;IAC5B,MAAM,EAAE,MAAM,CAAA;IACd,SAAS,CAAC,EAAE,CAAC,MAAM,EAAE,aAAa,KAAK,IAAI,CAAA;IAC3C,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,CAAA;IAChC,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAA;CACtB;AAED,MAAM,WAAW,cAAc;IAC7B,MAAM,EAAE,MAAM,CAAA;IACd,SAAS,CAAC,EAAE,CAAC,MAAM,EAAE,cAAc,KAAK,IAAI,CAAA;IAC5C,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,CAAA;IAChC,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAA;CACtB;AAED,MAAM,WAAW,aAAa;IAC5B,aAAa,EAAE,MAAM,CAAA;IACrB,MAAM,EAAE,MAAM,CAAA;IACd,MAAM,EAAE,MAAM,CAAA;IACd,MAAM,EAAE,SAAS,GAAG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AC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAAA;CAC9C;AAED,MAAM,WAAW,YAAY;IAC3B,SAAS,EAAE,OAAO,CAAA;IAClB,WAAW,EAAE,OAAO,CAAA;IACpB,YAAY,EAAE,OAAO,CAAA;IACrB,KAAK,EAAE,MAAM,GAAG,IAAI,CAAA;IACpB,MAAM,EAAE,MAAM,GAAG,IAAI,CAAA;CACtB;AAED,MAAM,WAAW,eAAe;IAC9B,MAAM,EAAE,MAAM,CAAA;IACd,eAAe,EAAE,MAAM,CAAA;IACvB,oBAAoB,EAAE,MAAM,CAAA;IAC5B,QAAQ,EAAE,MAAM,CAAA;CACjB"}
@@ -0,0 +1,14 @@
1
+ /**
2
+ * 格式化数字为千分位显示
3
+ * @param value - 要格式化的数字或字符串
4
+ * @param decimals - 保留的小数位数,默认为6位
5
+ * @returns 格式化后的字符串
6
+ *
7
+ * @example
8
+ * formatThousands(10001.123, 6) // "10,001.123000"
9
+ * formatThousands(10001.1234567, 6) // "10,001.123456"
10
+ * formatThousands("1000000", 2) // "1,000,000.00"
11
+ * formatThousands(0.123456789, 4) // "0.1234"
12
+ */
13
+ export declare const formatThousands: (value: number | string, decimals?: number) => string;
14
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":"AAGA;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,eAAe,GAC1B,OAAO,MAAM,GAAG,MAAM,EACtB,WAAU,MAAU,KACnB,MA8BF,CAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@edgex-web/components",
3
- "version": "0.1.0-beta.6",
3
+ "version": "0.1.0-beta.60",
4
4
  "description": "EdgeX Universal UI Components Library - Reusable React components for deposit, withdraw and other common UI patterns",
5
5
  "main": "dist/index.umd.js",
6
6
  "module": "dist/index.esm.js",
@@ -47,13 +47,17 @@
47
47
  },
48
48
  "peerDependencies": {
49
49
  "react": "^18.2.0",
50
- "react-dom": "^18.2.0"
50
+ "react-dom": "^18.2.0",
51
+ "viem": ">=2.18.0 <3",
52
+ "wagmi": ">=2.10.9 <3"
51
53
  },
52
54
  "devDependencies": {
55
+ "@tanstack/react-query": "^5.85.5",
53
56
  "@testing-library/jest-dom": "^6.1.5",
54
57
  "@testing-library/react": "^14.1.2",
55
58
  "@testing-library/user-event": "^14.5.1",
56
59
  "@types/react": "^18.2.43",
60
+ "@types/react-copy-to-clipboard": "^5.0.7",
57
61
  "@types/react-dom": "^18.2.17",
58
62
  "@typescript-eslint/eslint-plugin": "^6.14.0",
59
63
  "@typescript-eslint/parser": "^6.14.0",
@@ -61,6 +65,7 @@
61
65
  "@vitest/coverage-v8": "^1.0.4",
62
66
  "@vitest/ui": "^1.0.4",
63
67
  "autoprefixer": "^10.4.21",
68
+ "clsx": "^2.0.0",
64
69
  "eslint": "^8.55.0",
65
70
  "eslint-config-prettier": "^9.1.0",
66
71
  "eslint-plugin-react": "^7.33.2",
@@ -75,19 +80,20 @@
75
80
  "react-dom": "^18.2.0",
76
81
  "tailwindcss": "^3.4.17",
77
82
  "typescript": "^5.3.3",
83
+ "viem": "^2.34.0",
78
84
  "vite": "^5.0.8",
79
85
  "vite-plugin-dts": "^3.6.4",
80
- "vitest": "^1.0.4"
86
+ "vitest": "^1.0.4",
87
+ "wagmi": "^2.16.4"
81
88
  },
82
89
  "dependencies": {
90
+ "@floating-ui/react": "^0.27.16",
83
91
  "@headlessui/react": "^2.2.7",
84
92
  "@heroicons/react": "^2.2.0",
85
- "@tanstack/react-query": "^5.85.5",
86
- "clsx": "^2.0.0",
93
+ "bignumber.js": "^9.1.2",
87
94
  "lucide-react": "^0.540.0",
88
95
  "qrcode.react": "^4.2.0",
89
- "viem": "^2.34.0",
90
- "wagmi": "^2.16.4"
96
+ "react-copy-to-clipboard": "^5.1.0"
91
97
  },
92
98
  "lint-staged": {
93
99
  "*.{ts,tsx}": [
@@ -1,23 +0,0 @@
1
- import { default as React, ReactNode } from 'react';
2
- import { WalletHooks } from '../types/wallet-hooks';
3
-
4
- interface WalletProviderProps {
5
- children: ReactNode;
6
- walletHooks?: WalletHooks;
7
- useMockWallet?: boolean;
8
- }
9
- export declare const WalletProvider: React.FC<WalletProviderProps>;
10
- export declare const useWalletHooks: () => WalletHooks;
11
- export declare const useWalletAccount: () => import('..').AccountInfo;
12
- export declare const useWalletBalance: (config?: Parameters<WalletHooks["useBalance"]>[0]) => import('..').BalanceInfo;
13
- export declare const useWalletConnect: () => import('..').ConnectWalletResult;
14
- export declare const useWalletWriteContract: () => import('..').WriteContractResult;
15
- export declare const useWalletSwitchChain: () => import('..').SwitchChainResult;
16
- export declare const useWalletWaitForTransaction: () => import('..').TransactionWaitResult;
17
- export declare const useWalletReadContract: (config: Parameters<WalletHooks["useReadContract"]>[0]) => {
18
- data?: any;
19
- isLoading: boolean;
20
- error?: Error;
21
- };
22
- export {};
23
- //# sourceMappingURL=WalletProvider.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"WalletProvider.d.ts","sourceRoot":"","sources":["../../../../src/components/Deposit/src/WalletProvider.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,EAA6B,SAAS,EAAE,MAAM,OAAO,CAAA;AACnE,OAAO,EAAE,WAAW,EAAyB,MAAM,uBAAuB,CAAA;AAM1E,UAAU,mBAAmB;IAC3B,QAAQ,EAAE,SAAS,CAAA;IACnB,WAAW,CAAC,EAAE,WAAW,CAAA;IACzB,aAAa,CAAC,EAAE,OAAO,CAAA;CACxB;AAGD,eAAO,MAAM,cAAc,EAAE,KAAK,CAAC,EAAE,CAAC,mBAAmB,CAoBxD,CAAA;AAGD,eAAO,MAAM,cAAc,QAAO,WAWjC,CAAA;AAGD,eAAO,MAAM,gBAAgB,gCAG5B,CAAA;AAED,eAAO,MAAM,gBAAgB,GAAI,SAAS,UAAU,CAAC,WAAW,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,CAAC,6BAGjF,CAAA;AAED,eAAO,MAAM,gBAAgB,wCAG5B,CAAA;AAED,eAAO,MAAM,sBAAsB,wCAGlC,CAAA;AAED,eAAO,MAAM,oBAAoB,sCAGhC,CAAA;AAED,eAAO,MAAM,2BAA2B,0CAGvC,CAAA;AAED,eAAO,MAAM,qBAAqB,GAAI,QAAQ,UAAU,CAAC,WAAW,CAAC,iBAAiB,CAAC,CAAC,CAAC,CAAC,CAAC;;;;CAG1F,CAAA"}
@@ -1,18 +0,0 @@
1
- import { default as React } from 'react';
2
-
3
- interface EVMWalletViewProps {
4
- depositAmount: string;
5
- curSelectToken: string;
6
- curSelectTokenData: any;
7
- approved: boolean;
8
- currentActiveChain: any;
9
- currentEquity: number;
10
- amount: string;
11
- decimals: number;
12
- tokenBalance?: string;
13
- onDepositAmountChange: (amount: string) => void;
14
- onApprove: () => Promise<void>;
15
- }
16
- export declare const EVMWalletView: React.FC<EVMWalletViewProps>;
17
- export {};
18
- //# sourceMappingURL=WalletView.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"WalletView.d.ts","sourceRoot":"","sources":["../../../../../src/components/Deposit/src/evm/WalletView.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAA;AASzB,UAAU,kBAAkB;IAC1B,aAAa,EAAE,MAAM,CAAA;IACrB,cAAc,EAAE,MAAM,CAAA;IACtB,kBAAkB,EAAE,GAAG,CAAA;IACvB,QAAQ,EAAE,OAAO,CAAA;IACjB,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,qBAAqB,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,IAAI,CAAA;IAC/C,SAAS,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAA;CAC/B;AAED,eAAO,MAAM,aAAa,EAAE,KAAK,CAAC,EAAE,CAAC,kBAAkB,CAqItD,CAAA"}
@@ -1,25 +0,0 @@
1
- import { default as React } from 'react';
2
- import { ChainInfo } from '../../../../types';
3
-
4
- interface EVMDepositViewProps {
5
- chains: ChainInfo[];
6
- defaultChainId?: number;
7
- defaultTokenAddress?: string;
8
- defaultAmount?: string;
9
- walletAdapter: any;
10
- metadata?: any;
11
- currentEquity?: number;
12
- getTokenBalance?: (tokenAddress: string, chainId: number) => string | undefined;
13
- approved?: boolean;
14
- onApproved?: () => void | Promise<void>;
15
- onDeposit?: (depositInfo: {
16
- amount: string;
17
- chainId: number;
18
- tokenAddress: string;
19
- tokenSymbol: string;
20
- }) => void;
21
- onClose: () => void;
22
- }
23
- export declare const EVMDepositView: React.FC<EVMDepositViewProps>;
24
- export {};
25
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/Deposit/src/evm/index.tsx"],"names":[],"mappings":"AACA,OAAO,KAAyC,MAAM,OAAO,CAAA;AAI7D,OAAO,EAAE,SAAS,EAAE,MAAM,SAAS,CAAA;AAGnC,UAAU,mBAAmB;IAC3B,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;IAGtB,eAAe,CAAC,EAAE,CAChB,YAAY,EAAE,MAAM,EACpB,OAAO,EAAE,MAAM,KACZ,MAAM,GAAG,SAAS,CAAA;IAGvB,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,OAAO,EAAE,MAAM,IAAI,CAAA;CACpB;AAED,eAAO,MAAM,cAAc,EAAE,KAAK,CAAC,EAAE,CAAC,mBAAmB,CAwOxD,CAAA"}
@@ -1,12 +0,0 @@
1
- import { default as React } from 'react';
2
- import { WalletAdapter } from '../walletAdapters';
3
-
4
- interface MPCWalletViewProps {
5
- walletAdapter: WalletAdapter | null;
6
- curSelectToken: string;
7
- currentActiveChain: any;
8
- metadata: any;
9
- }
10
- export declare const MPCWalletView: React.FC<MPCWalletViewProps>;
11
- export {};
12
- //# sourceMappingURL=WalletView.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"WalletView.d.ts","sourceRoot":"","sources":["../../../../../src/components/Deposit/src/mpc/WalletView.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAA;AAGjD,UAAU,kBAAkB;IAC1B,aAAa,EAAE,aAAa,GAAG,IAAI,CAAA;IACnC,cAAc,EAAE,MAAM,CAAA;IACtB,kBAAkB,EAAE,GAAG,CAAA;IACvB,QAAQ,EAAE,GAAG,CAAA;CACd;AAED,eAAO,MAAM,aAAa,EAAE,KAAK,CAAC,EAAE,CAAC,kBAAkB,CAsItD,CAAA"}
@@ -1,22 +0,0 @@
1
- import { default as React } from 'react';
2
- import { ChainInfo } from '../../../../types';
3
-
4
- interface MPCDepositViewProps {
5
- chains: ChainInfo[];
6
- defaultChainId?: number;
7
- defaultTokenAddress?: string;
8
- defaultAmount?: string;
9
- walletAdapter: any;
10
- metadata?: any;
11
- currentEquity?: number;
12
- onDeposit?: (depositInfo: {
13
- amount: string;
14
- chainId: number;
15
- tokenAddress: string;
16
- tokenSymbol: string;
17
- }) => void;
18
- onClose: () => void;
19
- }
20
- export declare const MPCDepositView: React.FC<MPCDepositViewProps>;
21
- export {};
22
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/Deposit/src/mpc/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmB,MAAM,OAAO,CAAA;AAKvC,OAAO,EAAE,SAAS,EAAE,MAAM,SAAS,CAAA;AAEnC,UAAU,mBAAmB;IAC3B,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;IAGtB,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,OAAO,EAAE,MAAM,IAAI,CAAA;CACpB;AAED,eAAO,MAAM,cAAc,EAAE,KAAK,CAAC,EAAE,CAAC,mBAAmB,CAiGxD,CAAA"}
@@ -1,20 +0,0 @@
1
- import { default as React } from 'react';
2
-
3
- export interface Asset {
4
- token: string;
5
- iconUrl?: string;
6
- decimals: number;
7
- tokenAddress: string;
8
- symbol?: string;
9
- }
10
- interface AssetSelectorProps {
11
- tokens: Asset[];
12
- selectedToken: Asset;
13
- onTokenChange: (token: Asset) => void;
14
- disabled?: boolean;
15
- className?: string;
16
- walletType?: 'mpc' | 'evm';
17
- }
18
- export declare const AssetSelector: React.FC<AssetSelectorProps>;
19
- export {};
20
- //# sourceMappingURL=Asset.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Asset.d.ts","sourceRoot":"","sources":["../../../../../src/components/Deposit/src/selector/Asset.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmB,MAAM,OAAO,CAAA;AAKvC,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,UAAU,kBAAkB;IAC1B,MAAM,EAAE,KAAK,EAAE,CAAA;IACf,aAAa,EAAE,KAAK,CAAA;IACpB,aAAa,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,CAAA;IACrC,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,UAAU,CAAC,EAAE,KAAK,GAAG,KAAK,CAAA;CAC3B;AAED,eAAO,MAAM,aAAa,EAAE,KAAK,CAAC,EAAE,CAAC,kBAAkB,CAuItD,CAAA"}
@@ -1,16 +0,0 @@
1
- import { default as React } from 'react';
2
- import { ChainInfo } from '../../../../types';
3
-
4
- export interface Chain extends ChainInfo {
5
- }
6
- interface ChainSelectorProps {
7
- chains: ChainInfo[];
8
- selectedChain: ChainInfo;
9
- onChainChange: (chain: ChainInfo) => void;
10
- disabled?: boolean;
11
- className?: string;
12
- walletType?: 'mpc' | 'evm';
13
- }
14
- export declare const ChainSelector: React.FC<ChainSelectorProps>;
15
- export {};
16
- //# sourceMappingURL=Chain.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Chain.d.ts","sourceRoot":"","sources":["../../../../../src/components/Deposit/src/selector/Chain.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmB,MAAM,OAAO,CAAA;AAGvC,OAAO,EAAE,SAAS,EAAE,MAAM,SAAS,CAAA;AAGnC,MAAM,WAAW,KAAM,SAAQ,SAAS;CAAG;AAE3C,UAAU,kBAAkB;IAC1B,MAAM,EAAE,SAAS,EAAE,CAAA;IACnB,aAAa,EAAE,SAAS,CAAA;IACxB,aAAa,EAAE,CAAC,KAAK,EAAE,SAAS,KAAK,IAAI,CAAA;IACzC,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,UAAU,CAAC,EAAE,KAAK,GAAG,KAAK,CAAA;CAC3B;AAED,eAAO,MAAM,aAAa,EAAE,KAAK,CAAC,EAAE,CAAC,kBAAkB,CA8ItD,CAAA"}