@web3jskit/walletkit 0.1.4 → 0.1.6

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 (168) hide show
  1. package/README.md +131 -152
  2. package/package.json +2 -2
  3. package/dist/package.json +0 -46
  4. package/dist/src/assets/svg/dataBase.d.ts +0 -4
  5. package/dist/src/assets/svg/dataBase.js +0 -5
  6. package/dist/src/assets/svg/dataBase.js.map +0 -1
  7. package/dist/src/assets/svg/metaMaskWallet.d.ts +0 -1
  8. package/dist/src/assets/svg/metaMaskWallet.js +0 -35
  9. package/dist/src/assets/svg/metaMaskWallet.js.map +0 -1
  10. package/dist/src/components/ConnectButton/ConnectedInfo.d.ts +0 -1
  11. package/dist/src/components/ConnectButton/ConnectedInfo.js +0 -13
  12. package/dist/src/components/ConnectButton/ConnectedInfo.js.map +0 -1
  13. package/dist/src/components/ConnectButton/index.d.ts +0 -8
  14. package/dist/src/components/ConnectButton/index.js +0 -16
  15. package/dist/src/components/ConnectButton/index.js.map +0 -1
  16. package/dist/src/components/Connecting/index.d.ts +0 -6
  17. package/dist/src/components/Connecting/index.js +0 -11
  18. package/dist/src/components/Connecting/index.js.map +0 -1
  19. package/dist/src/components/Connecting/style.d.ts +0 -2
  20. package/dist/src/components/Connecting/style.js +0 -52
  21. package/dist/src/components/Connecting/style.js.map +0 -1
  22. package/dist/src/components/GetWallet/index.d.ts +0 -7
  23. package/dist/src/components/GetWallet/index.js +0 -21
  24. package/dist/src/components/GetWallet/index.js.map +0 -1
  25. package/dist/src/components/GetWallet/style.d.ts +0 -2
  26. package/dist/src/components/GetWallet/style.js +0 -117
  27. package/dist/src/components/GetWallet/style.js.map +0 -1
  28. package/dist/src/components/Header/ModalHeader.d.ts +0 -8
  29. package/dist/src/components/Header/ModalHeader.js +0 -9
  30. package/dist/src/components/Header/ModalHeader.js.map +0 -1
  31. package/dist/src/components/Header/style.d.ts +0 -2
  32. package/dist/src/components/Header/style.js +0 -73
  33. package/dist/src/components/Header/style.js.map +0 -1
  34. package/dist/src/components/Icon/index.d.ts +0 -23
  35. package/dist/src/components/Icon/index.js +0 -48
  36. package/dist/src/components/Icon/index.js.map +0 -1
  37. package/dist/src/components/Introduce/index.d.ts +0 -6
  38. package/dist/src/components/Introduce/index.js +0 -10
  39. package/dist/src/components/Introduce/index.js.map +0 -1
  40. package/dist/src/components/Introduce/style.d.ts +0 -2
  41. package/dist/src/components/Introduce/style.js +0 -72
  42. package/dist/src/components/Introduce/style.js.map +0 -1
  43. package/dist/src/components/Modal/ConnectModal.d.ts +0 -7
  44. package/dist/src/components/Modal/ConnectModal.js +0 -114
  45. package/dist/src/components/Modal/ConnectModal.js.map +0 -1
  46. package/dist/src/components/Modal/WalletInfoModal.d.ts +0 -1
  47. package/dist/src/components/Modal/WalletInfoModal.js +0 -46
  48. package/dist/src/components/Modal/WalletInfoModal.js.map +0 -1
  49. package/dist/src/components/Modal/index.d.ts +0 -13
  50. package/dist/src/components/Modal/index.js +0 -52
  51. package/dist/src/components/Modal/index.js.map +0 -1
  52. package/dist/src/components/Modal/style.d.ts +0 -5
  53. package/dist/src/components/Modal/style.js +0 -186
  54. package/dist/src/components/Modal/style.js.map +0 -1
  55. package/dist/src/components/SVGs/backArrowSvg.d.ts +0 -2
  56. package/dist/src/components/SVGs/backArrowSvg.js +0 -4
  57. package/dist/src/components/SVGs/backArrowSvg.js.map +0 -1
  58. package/dist/src/components/SVGs/closeSvg.d.ts +0 -2
  59. package/dist/src/components/SVGs/closeSvg.js +0 -4
  60. package/dist/src/components/SVGs/closeSvg.js.map +0 -1
  61. package/dist/src/components/SVGs/copiedSvg.d.ts +0 -2
  62. package/dist/src/components/SVGs/copiedSvg.js +0 -4
  63. package/dist/src/components/SVGs/copiedSvg.js.map +0 -1
  64. package/dist/src/components/SVGs/copySvg.d.ts +0 -2
  65. package/dist/src/components/SVGs/copySvg.js +0 -4
  66. package/dist/src/components/SVGs/copySvg.js.map +0 -1
  67. package/dist/src/components/SVGs/exitSvg.d.ts +0 -2
  68. package/dist/src/components/SVGs/exitSvg.js +0 -4
  69. package/dist/src/components/SVGs/exitSvg.js.map +0 -1
  70. package/dist/src/components/SVGs/metamaskQrCode.d.ts +0 -2
  71. package/dist/src/components/SVGs/metamaskQrCode.js +0 -4
  72. package/dist/src/components/SVGs/metamaskQrCode.js.map +0 -1
  73. package/dist/src/components/SVGs/spinSvg.d.ts +0 -4
  74. package/dist/src/components/SVGs/spinSvg.js +0 -4
  75. package/dist/src/components/SVGs/spinSvg.js.map +0 -1
  76. package/dist/src/components/Text/index.d.ts +0 -18
  77. package/dist/src/components/Text/index.js +0 -32
  78. package/dist/src/components/Text/index.js.map +0 -1
  79. package/dist/src/components/WalletKitProvider/ChainProvider.d.ts +0 -12
  80. package/dist/src/components/WalletKitProvider/ChainProvider.js +0 -56
  81. package/dist/src/components/WalletKitProvider/ChainProvider.js.map +0 -1
  82. package/dist/src/components/WalletKitProvider/I18nProvider.d.ts +0 -13
  83. package/dist/src/components/WalletKitProvider/I18nProvider.js +0 -42
  84. package/dist/src/components/WalletKitProvider/I18nProvider.js.map +0 -1
  85. package/dist/src/components/WalletKitProvider/ThemeProvider.d.ts +0 -8
  86. package/dist/src/components/WalletKitProvider/ThemeProvider.js +0 -13
  87. package/dist/src/components/WalletKitProvider/ThemeProvider.js.map +0 -1
  88. package/dist/src/components/WalletKitProvider/index.d.ts +0 -16
  89. package/dist/src/components/WalletKitProvider/index.js +0 -14
  90. package/dist/src/components/WalletKitProvider/index.js.map +0 -1
  91. package/dist/src/components/WalletList/index.d.ts +0 -8
  92. package/dist/src/components/WalletList/index.js +0 -16
  93. package/dist/src/components/WalletList/index.js.map +0 -1
  94. package/dist/src/components/WalletList/style.d.ts +0 -2
  95. package/dist/src/components/WalletList/style.js +0 -102
  96. package/dist/src/components/WalletList/style.js.map +0 -1
  97. package/dist/src/components/WalletTriggerButton/index.d.ts +0 -11
  98. package/dist/src/components/WalletTriggerButton/index.js +0 -28
  99. package/dist/src/components/WalletTriggerButton/index.js.map +0 -1
  100. package/dist/src/components/WalletTriggerButton/style.d.ts +0 -2
  101. package/dist/src/components/WalletTriggerButton/style.js +0 -52
  102. package/dist/src/components/WalletTriggerButton/style.js.map +0 -1
  103. package/dist/src/errors/index.d.ts +0 -2
  104. package/dist/src/errors/index.js +0 -6
  105. package/dist/src/errors/index.js.map +0 -1
  106. package/dist/src/hooks/useWalletKit.d.ts +0 -70
  107. package/dist/src/hooks/useWalletKit.js +0 -38
  108. package/dist/src/hooks/useWalletKit.js.map +0 -1
  109. package/dist/src/index.d.ts +0 -8
  110. package/dist/src/index.js +0 -9
  111. package/dist/src/index.js.map +0 -1
  112. package/dist/src/locals/i18n.d.ts +0 -2
  113. package/dist/src/locals/i18n.js +0 -17
  114. package/dist/src/locals/i18n.js.map +0 -1
  115. package/dist/src/locals/languages/en.json +0 -30
  116. package/dist/src/locals/languages/zh.json +0 -30
  117. package/dist/src/locals/resources.d.ts +0 -66
  118. package/dist/src/locals/resources.js +0 -11
  119. package/dist/src/locals/resources.js.map +0 -1
  120. package/dist/src/modals/connectModal/index.d.ts +0 -0
  121. package/dist/src/modals/connectModal/index.js +0 -2
  122. package/dist/src/modals/connectModal/index.js.map +0 -1
  123. package/dist/src/stores/SlotsWalletStore.d.ts +0 -18
  124. package/dist/src/stores/SlotsWalletStore.js +0 -33
  125. package/dist/src/stores/SlotsWalletStore.js.map +0 -1
  126. package/dist/src/stores/index.d.ts +0 -27
  127. package/dist/src/stores/index.js +0 -25
  128. package/dist/src/stores/index.js.map +0 -1
  129. package/dist/src/stores/modalStore.d.ts +0 -17
  130. package/dist/src/stores/modalStore.js +0 -41
  131. package/dist/src/stores/modalStore.js.map +0 -1
  132. package/dist/src/styled/index.d.ts +0 -17
  133. package/dist/src/styled/index.js +0 -76
  134. package/dist/src/styled/index.js.map +0 -1
  135. package/dist/src/test/getwalletprovider.test.d.ts +0 -1
  136. package/dist/src/test/getwalletprovider.test.js +0 -10
  137. package/dist/src/test/getwalletprovider.test.js.map +0 -1
  138. package/dist/src/test/setup.d.ts +0 -1
  139. package/dist/src/test/setup.js +0 -7
  140. package/dist/src/test/setup.js.map +0 -1
  141. package/dist/src/theme/index.d.ts +0 -53
  142. package/dist/src/theme/index.js +0 -92
  143. package/dist/src/theme/index.js.map +0 -1
  144. package/dist/src/types/configType.d.ts +0 -2
  145. package/dist/src/types/configType.js +0 -2
  146. package/dist/src/types/configType.js.map +0 -1
  147. package/dist/src/types/error.d.ts +0 -7
  148. package/dist/src/types/error.js +0 -5
  149. package/dist/src/types/error.js.map +0 -1
  150. package/dist/src/types/slotsType.d.ts +0 -23
  151. package/dist/src/types/slotsType.js +0 -2
  152. package/dist/src/types/slotsType.js.map +0 -1
  153. package/dist/src/types/store.d.ts +0 -2
  154. package/dist/src/types/store.js +0 -2
  155. package/dist/src/types/store.js.map +0 -1
  156. package/dist/src/utils/formatter.d.ts +0 -1
  157. package/dist/src/utils/formatter.js +0 -6
  158. package/dist/src/utils/formatter.js.map +0 -1
  159. package/dist/src/utils/generateAvatar.d.ts +0 -4
  160. package/dist/src/utils/generateAvatar.js +0 -32
  161. package/dist/src/utils/generateAvatar.js.map +0 -1
  162. package/dist/src/wallets/GelWallet/index.d.ts +0 -0
  163. package/dist/src/wallets/GelWallet/index.js +0 -2
  164. package/dist/src/wallets/GelWallet/index.js.map +0 -1
  165. package/dist/src/wallets/SlotsWallets/index.d.ts +0 -3
  166. package/dist/src/wallets/SlotsWallets/index.js +0 -26
  167. package/dist/src/wallets/SlotsWallets/index.js.map +0 -1
  168. package/dist/tsconfig.build.tsbuildinfo +0 -1
package/README.md CHANGED
@@ -1,234 +1,213 @@
1
- # **WalletKit**
1
+ # WalletKit
2
+
3
+ **WalletKit** 是一个轻量级的多链钱包连接工具包,旨在帮助开发者快速集成支持多条链的钱包插件,如 MetaMask、Phantom、TronLink、Gel Wallet 等。它提供了便捷的状态管理、自定义 Hooks 和统一的 API,使 DApp 开发更简单高效。
2
4
 
3
5
  **WalletKit** is a lightweight, multi-chain compatible wallet connection toolkit designed to help developers quickly integrate wallet plugins that support multiple chains, such as MetaMask, Phantom, TronLink, Gel Wallet, and more. It provides convenient state management, custom hooks, and a unified API, making DApp development simpler and more efficient.
4
6
 
5
- ---
7
+ ## 架构 Architecture
8
+
9
+ WalletKit 由两个主要部分组成 / WalletKit consists of two main parts:
10
+
11
+ 1. **@web3jskit/wallethelper**: 底层钱包连接库,提供统一的钱包接口和状态管理 / Core wallet connection library providing unified wallet interfaces and state management
12
+
13
+ - 多链支持 / Multi-chain support (EVM, PUT, SOL, Tron, BTC)
14
+ - 钱包检测和连接 / Wallet detection and connection
15
+ - 统一的交易接口 / Unified transaction interface
16
+ - 状态管理 / State management
6
17
 
7
- ## **Installation**
18
+ 2. **@web3jskit/walletkit**: React 组件库,提供开箱即用的 UI 组件 / React component library providing ready-to-use UI components
19
+ - 钱包连接按钮 / Wallet connection button
20
+ - 钱包选择模态框 / Wallet selection modal
21
+ - 链切换组件 / Chain switching component
22
+ - 自定义 Hooks / Custom hooks
8
23
 
9
- Install via `npm` \ `yarn` \ `pnpm`:
24
+ ## 安装 Installation
25
+
26
+ 通过 npm、yarn 或 pnpm 安装 / Install via npm, yarn, or pnpm:
10
27
 
11
28
  ```bash
29
+ # npm
12
30
  npm install @web3jskit/walletkit
13
31
 
32
+ # yarn
14
33
  yarn add @web3jskit/walletkit
15
34
 
35
+ # pnpm
16
36
  pnpm add @web3jskit/walletkit
17
37
  ```
18
38
 
19
- ## **Quick Start**
39
+ ## 快速开始 Quick Start
20
40
 
21
- ### Import the Library
41
+ ### 1. 导入并初始化 Import and Initialize
22
42
 
23
43
  ```javascript
24
- import { getWalletKit } from '@web3jskit/walletkit';
25
- ```
26
-
27
- ## Core Features
44
+ import { WalletKitProvider, ConnectButton } from '@web3jskit/walletkit';
28
45
 
29
- ### 1. Get the List of Current Connectors
30
-
31
- Get the list of supported wallet connectors using the `getConnectors` method:
32
-
33
- ```javascript
34
- const connectors = walletKit.getConnectors();
35
- console.log(connectors);
36
- // Example output:
37
- // [
38
- // { name: 'MetaMask', icon: '🔗', provider: ... },
39
- // { name: 'Coinbase Wallet', icon: '💼', provider: ... },
40
- // ...
41
- // ]
46
+ function App() {
47
+ return (
48
+ <WalletKitProvider>
49
+ <ConnectButton />
50
+ {/* 其他组件 Other components */}
51
+ </WalletKitProvider>
52
+ );
53
+ }
42
54
  ```
43
55
 
44
- ### 2. Connect to a Wallet
45
-
46
- Use the `connect` method of a connector to connect to a wallet:
56
+ ### 2. 使用 Hooks Use Hooks
47
57
 
48
58
  ```javascript
49
- const connectors = walletKit.getConnectors();
50
-
51
- // Select a connector
52
- const connector = connectors[0];
53
-
54
- // Connect to the wallet
55
- const address = await connector.connect();
56
- console.log(address);
57
-
58
- // Check the current connection status
59
- console.log(walletKit.getConnectStatus()); // Output: "connected"
60
- ```
61
-
62
- ### 3. Use Custom Hook
63
-
64
- WalletKit provides a custom hook `useWalletKit`, which, combined with React state management, makes development simpler and more convenient.
65
-
66
- Using `useWalletKit`
67
-
68
- In a React project, import `useWalletKit` and use it directly:
59
+ import { useWalletKit } from '@web3jskit/walletkit';
69
60
 
70
- ```tsx
71
- 'use client';
72
- import { ChainType } from '@web3jskit/type';
73
- import { ConnectButton, useWalletKit, AppModal, WalletKitProvider } from '@web3jskit/walletkit';
74
-
75
- export default function WalletKitTest() {
61
+ function MyComponent() {
76
62
  const { openModal, currentChainType, setChainType, currentConnector, walletAddress, getProvider } = useWalletKit();
77
63
 
78
- const chainList = [ChainType.EVM, ChainType.PUT, ChainType.SOL, ChainType.Tron, ChainType.BTC];
79
-
80
- const handleConnect = async () => {
64
+ // 连接钱包 Connect wallet
65
+ const handleConnect = () => {
81
66
  openModal(AppModal.ConnectModal);
82
67
  };
83
68
 
69
+ // 断开连接 Disconnect
84
70
  const handleDisconnect = () => {
85
71
  currentConnector?.disconnect();
86
72
  };
87
73
 
88
- const handleGetProvider = async () => {
89
- const provider = await getProvider();
90
- console.log('provider', provider);
91
- };
92
-
93
74
  return (
94
- <WalletKitProvider>
95
- <ConnectButton />
96
- <div>
97
- <button onClick={() => handleConnect()}>连接钱包</button>
98
- <button onClick={() => handleDisconnect()}>断开链接</button>
99
- </div>
100
- <div>
101
- {chainList.map(chainType => (
102
- <button key={chainType} onClick={() => setChainType(chainType)}>
103
- 切换{chainType}
104
- </button>
105
- ))}
106
- </div>
107
- <div>
108
- <button onClick={() => handleGetProvider()}>获取Provider</button>
109
- </div>
110
- <div>当 前 链:{currentChainType}</div>
111
- <div>钱 包 名:{currentConnector?.name}</div>
112
- <div>钱包地址:{walletAddress}</div>
113
- </WalletKitProvider>
75
+ <div>
76
+ <div>Chain: {currentChainType}</div>
77
+ <div>Wallet: {currentConnector?.name}</div>
78
+ <div>Address: {walletAddress}</div>
79
+ </div>
114
80
  );
115
81
  }
116
82
  ```
117
83
 
118
- `useWalletKit` Return Values
84
+ ## 核心功能 Core Features
119
85
 
120
- | Property/Method | Description |
121
- | ------------------ | ----------------------------------------------------------- |
122
- | `currentChainType` | Current chain ID |
123
- | `getConnectors` | Method to get available connectors |
124
- | `currentConnector` | Current connector instance |
125
- | `connectStatus` | Current connection status (e.g., "connecting", "connected") |
126
- | `closeModal` | Method to close the wallet connection modal |
127
- | `provider` | Current provider instance |
128
- | `...` | ...Other methods and properties |
86
+ ### 1. 钱包连接 Wallet Connection
129
87
 
130
- ### 4. Switch Chain
88
+ ```javascript
89
+ const { currentConnector, connectStatus } = useWalletKit();
131
90
 
132
- Switch to a specified chain using the `setChainType` method:
91
+ // 连接钱包 Connect wallet
92
+ await currentConnector.connect();
133
93
 
134
- ```javascript
135
- await walletKit.setChainType(ChainType); // Switch to Ethereum Mainnet (ChainType)
136
- ```
94
+ // 断开连接 Disconnect
95
+ await currentConnector.disconnect();
137
96
 
138
- ### 5. State Management
97
+ // 监听状态 Listen to status
98
+ console.log(connectStatus); // 'connected' | 'connecting' | 'disconnected'
99
+ ```
139
100
 
140
- setChainType
141
- Get the current state:
101
+ ### 2. 链切换 Chain Switching
142
102
 
143
103
  ```javascript
144
- console.log(walletKit.getCurrentChain()); // Current chain information
145
- console.log(walletKit.getConnectStatus()); // Connection status (e.g., "connected", "disconnected")
146
- console.log(walletKit.getCurrentConnector()); // Current connector
147
- console.log(walletKit.getProvider()); // Current provider
104
+ const { setChainType, currentChainType } = useWalletKit();
105
+
106
+ // 切换链 Switch chain
107
+ await setChainType(ChainType.EVM);
148
108
  ```
149
109
 
150
- Listen for state changes:
110
+ ### 3. 交易操作 Transaction Operations
151
111
 
152
112
  ```javascript
153
- walletKit.on('connect', connector => {
154
- console.log(`${connector.name} connected`);
113
+ const { currentConnector } = useWalletKit();
114
+
115
+ // 签名消息 Sign message
116
+ const signature = await currentConnector.signMessage('Hello Web3');
117
+
118
+ // 发送交易 Send transaction
119
+ const txHash = await currentConnector.sendTransaction({
120
+ to: '0x...',
121
+ value: '0x...',
155
122
  });
156
123
 
157
- walletKit.on('disconnect', () => {
158
- console.log('Wallet disconnected');
124
+ // 合约调用 Contract call
125
+ const result = await currentConnector.writeContract({
126
+ address: '0x...',
127
+ abi: [...],
128
+ functionName: 'transfer',
129
+ args: [...],
159
130
  });
160
131
  ```
161
132
 
162
- Integrate into a React Project
163
-
164
- Quickly integrate into a DApp using the `useWalletKit` custom hook and React state management:
133
+ ## 支持的钱包 Supported Wallets
165
134
 
166
- ```tsx
167
- import React, { useEffect } from 'react';
168
- import { useWalletKit, WalletKitProvider } from '@web3jskit/walletkit';
135
+ - MetaMask (EVM)
136
+ - Phantom (SOL, BTC)
137
+ - TronLink (TRON)
138
+ - Gel Wallet (EVM, PUT, SOL)
139
+ - OKX Wallet (EVM)
140
+ - Trust Wallet (EVM)
141
+ - TokenPocket (EVM)
142
+ - Bitget Wallet (EVM)
143
+ - Coinbase Wallet (EVM)
169
144
 
170
- const WalletConnectButton: React.FC = () => {
171
- const { connectStatus, getConnectors, currentConnector } = useWalletKit();
172
-
173
- useEffect(() => {
174
- if (connectStatus === 'connected') {
175
- console.log(`Connected to ${currentConnector?.name}`);
176
- }
177
- }, [connectStatus, currentConnector]);
178
-
179
- const handleConnect = async () => {
180
- const connectors = getConnectors();
181
- if (connectors.length) {
182
- await connectors[0].connect();
183
- }
184
- };
145
+ ## API 参考 API Reference
185
146
 
186
- return;
187
- <WalletKitProvider>
188
- <button onClick={handleConnect}>{connectStatus === 'connected' ? 'Connected' : 'Connect Wallet'}</button>
189
- </WalletKitProvider>;
190
- };
147
+ ### useWalletKit Hook
191
148
 
192
- export default WalletConnectButton;
193
- ```
149
+ | 属性/方法 Property/Method | 描述 Description |
150
+ | ------------------------- | --------------------------------------- |
151
+ | `currentChainType` | 当前链类型 Current chain type |
152
+ | `setChainType` | 切换链类型 Switch chain type |
153
+ | `currentConnector` | 当前钱包连接器 Current wallet connector |
154
+ | `connectStatus` | 连接状态 Connection status |
155
+ | `walletAddress` | 钱包地址 Wallet address |
156
+ | `getProvider` | 获取 Provider Get provider |
157
+ | `openModal` | 打开模态框 Open modal |
158
+ | `closeModal` | 关闭模态框 Close modal |
194
159
 
195
- ## Supported Wallets
160
+ ### WalletConnector
196
161
 
197
- WalletKit supports the following wallets:
162
+ | 方法 Method | 描述 Description |
163
+ | ----------------------- | ------------------------- |
164
+ | `connect()` | 连接钱包 Connect wallet |
165
+ | `disconnect()` | 断开连接 Disconnect |
166
+ | `signMessage(message)` | 签名消息 Sign message |
167
+ | `sendTransaction(tx)` | 发送交易 Send transaction |
168
+ | `writeContract(params)` | 合约写入 Write contract |
169
+ | `readContract(params)` | 合约读取 Read contract |
198
170
 
199
- - MetaMask
200
- - Phantom
201
- - TronLink
202
- - Gel Wallet
203
- - More EVM-compatible wallets
171
+ ## 贡献指南 Contributing
204
172
 
205
- ## Contribution Guide
173
+ 欢迎提交 Issues 和功能请求!贡献步骤:
206
174
 
207
- We welcome issues and feature requests! You can contribute by following these steps:
175
+ We welcome issues and feature requests! Steps to contribute:
208
176
 
209
- 1. Fork this repository.
210
- 2. Create a new branch:
177
+ 1. Fork 本仓库 Fork this repository
178
+ 2. 创建功能分支 Create feature branch:
211
179
 
212
180
  ```bash
213
- git checkout -b feature/my-new-feature
181
+ git checkout -b feature/my-feature
214
182
  ```
215
183
 
216
- 3. Commit your changes:
184
+ 3. 提交更改 Commit changes:
217
185
 
218
186
  ```bash
219
187
  git commit -m "Add some feature"
220
188
  ```
221
189
 
222
- 4. Push the branch:
190
+ 4. 推送分支 Push branch:
223
191
 
224
192
  ```bash
225
- git push origin feature/my-new-feature
193
+ git push origin feature/my-feature
226
194
  ```
227
195
 
228
- 5. Submit a Pull Request.
196
+ 5. 提交 Pull Request Submit Pull Request
229
197
 
230
- ## License
198
+ ## 许可证 License
231
199
 
232
200
  MIT License
233
201
 
202
+ ## 联系我们 Contact Us
203
+
204
+ 如有问题或建议,请通过以下方式联系我们:
205
+
206
+ For questions or suggestions, please contact us:
207
+
208
+ - GitHub Issues
209
+ - Email: <support@web3jskit.com>
210
+
211
+ 希望你喜欢使用 WalletKit!
212
+
234
213
  Hope you enjoy using WalletKit! 😊
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@web3jskit/walletkit",
3
- "version": "0.1.4",
3
+ "version": "0.1.6",
4
4
  "description": "walletkit",
5
5
  "license": "MIT",
6
6
  "files": [
@@ -16,7 +16,7 @@
16
16
  "@react-spring/web": "^9.7.1",
17
17
  "@tanstack/react-query": "^5.0.0",
18
18
  "@web3jskit/type": "^1.1.6",
19
- "@web3jskit/wallethelper": "0.1.4",
19
+ "@web3jskit/wallethelper": "0.1.6",
20
20
  "copy-to-clipboard": "^3.3.3",
21
21
  "i18next": "^22.4.13",
22
22
  "i18next-browser-languagedetector": "^7.0.1",
package/dist/package.json DELETED
@@ -1,46 +0,0 @@
1
- {
2
- "name": "@web3jskit/walletkit",
3
- "version": "0.1.4",
4
- "description": "walletkit",
5
- "license": "MIT",
6
- "files": [
7
- "dist"
8
- ],
9
- "scripts": {
10
- "build": "tsc --build tsconfig.build.json",
11
- "watch": "tsc --watch"
12
- },
13
- "main": "./dist/src/index.js",
14
- "dependencies": {
15
- "@reach/dialog": "^0.18.0",
16
- "@react-spring/web": "^9.7.1",
17
- "@tanstack/react-query": "^5.0.0",
18
- "@web3jskit/type": "^1.1.6",
19
- "@web3jskit/wallethelper": "0.1.4",
20
- "copy-to-clipboard": "^3.3.3",
21
- "i18next": "^22.4.13",
22
- "i18next-browser-languagedetector": "^7.0.1",
23
- "i18next-xhr-backend": "^3.2.2",
24
- "lit": "^3.2.1",
25
- "react": "^18.3.1",
26
- "react-dom": "^18.3.1",
27
- "react-i18next": "^12.2.0",
28
- "react-qr-code": "^2.0.15",
29
- "styled-components": "^6.1.13",
30
- "zustand": "^4.3.9"
31
- },
32
- "devDependencies": {
33
- "@testing-library/jest-dom": "^6.2.0",
34
- "@testing-library/react": "^16.0.1",
35
- "@testing-library/user-event": "^14.5.2",
36
- "@types/react": "^18.3.1",
37
- "@types/react-dom": "^18.3.1",
38
- "@types/styled-components": "^5.1.34",
39
- "jsdom": "^25.0.0",
40
- "vitest": "2.0.5"
41
- },
42
- "peerDependencies": {
43
- "react": ">=18",
44
- "react-dom": ">=18"
45
- }
46
- }
@@ -1,4 +0,0 @@
1
- export declare const closeIcon = "data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIzMiIgaGVpZ2h0PSIzMiIgZmlsbD0iIzAwMDAwMCIgdmlld0JveD0iMCAwIDI1NiAyNTYiPgo8cGF0aCBkPSJNMjA1LjY2LDE5NC4zNGE4LDgsMCwwLDEtMTEuMzIsMTEuMzJMMTI4LDEzOS4zMSw2MS42NiwyMDUuNjZhOCw4LDAsMCwxLTExLjMyLTExLjMyTDExNi42OSwxMjgsNTAuMzQsNjEuNjZBOCw4LDAsMCwxLDYxLjY2LDUwLjM0TDEyOCwxMTYuNjlsNjYuMzQtNjYuMzVhOCw4LDAsMCwxLDExLjMyLDExLjMyTDEzOS4zMSwxMjhaIj48L3BhdGg+Cjwvc3ZnPg==";
2
- export declare const b = "data:image/svg+xml;base64,PHN2ZyB4bLjM0TDEyOCwxMTYuNjlsNjYuMzQtNjYuMzVhOCw4LDAsMCwxLDExLjMyLDExLjMyTDEzOS4zMSwxMjhaIj48L3BhdGg+Cjwvc3ZnPg==";
3
- export declare const chromeIcon = "data:image/svg+xml,<svg xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 78 78\"><path fill=\"url(%23a)\" d=\"M71.034 20.5a37.001 37.001 0 0 0-64.084 0l2.22 39.96L71.034 20.5Z\"/><path fill=\"url(%23b)\" d=\"M22.979 48.25 6.958 20.5A37 37 0 0 0 39 76l36.26-37-52.281 9.25Z\"/><path fill=\"url(%23c)\" d=\"M55.021 48.25 39 76a37.001 37.001 0 0 0 32.035-55.5H39l16.021 27.75Z\"/><path fill=\"%23fff\" d=\"M39 57.5a18.5 18.5 0 1 0 0-37 18.5 18.5 0 0 0 0 37Z\"/><path fill=\"%231A73E8\" d=\"M39 53.652a14.65 14.65 0 0 0 13.536-20.26A14.653 14.653 0 1 0 39 53.653Z\"/><defs><linearGradient id=\"a\" x1=\"6.958\" x2=\"71.034\" y1=\"25.125\" y2=\"25.125\" gradientUnits=\"userSpaceOnUse\"><stop stop-color=\"%23D93025\"/><stop offset=\"1\" stop-color=\"%23EA4335\"/></linearGradient><linearGradient id=\"b\" x1=\"43.003\" x2=\"10.961\" y1=\"73.684\" y2=\"18.184\" gradientUnits=\"userSpaceOnUse\"><stop stop-color=\"%231E8E3E\"/><stop offset=\"1\" stop-color=\"%2334A853\"/></linearGradient><linearGradient id=\"c\" x1=\"33.598\" x2=\"65.64\" y1=\"76\" y2=\"20.596\" gradientUnits=\"userSpaceOnUse\"><stop stop-color=\"%23FCC934\"/><stop offset=\"1\" stop-color=\"%23FBBC04\"/></linearGradient></defs></svg>";
4
- export declare const gel = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACQAAAAkCAYAAADhAJiYAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAALDSURBVHgB1Zg/aBNRHMe/1kIrRHJDwbSDSQbTrSkKupmDglOhzSDoolMGBzV0cRPpKFJI1w6tVbGLhEC7uIS4KbYmHSNyyVLtYhMSIRVB3++Sd17i3buX1z85P/C7u7z3cu97v/d7v3f3AGd0ZqvMDGa/j9k+de49DwkizPInIMLNjE6fjkwzOzhFMdwOOn3/45lBiLGLitgFGQMUwy3Pxcz7QAw3/Sw7PILDGA6KYSiKGY9omL0zhfPaKALBUau8WW9hY/kD9io1KKCfQdtVffNqO4VL8QuOdduFKu7NvIAKQ1AkoI241k2ENahCMfREpiENzVgoYJ5vPbiKxNyksG2j1sL3/R/mNfGz9QsySA0ZxcvLjyl28xGoQOJoCMulfc+2w5CgHbzdYlYW35nBS531srB0w/Qih7wUmw5JCVKOoa31XUcxxGsmtJdAUM67Qg/F4iFcToQxezfeVd6oHbqKIZqsjtrYvXr74TXTU/QgopQgjKHcl/sYDwctEVvrJXazOnbYtC6XvkEExd2VxEXmmXNIPb5uiaMHmRl75vo/oYe4GGJlsWDGDEfTNOi6jmKxiEql4li22fHERCRoxRSfdUqC7DTrh12/s9ms2Tl1HI1GXcsI0fD2ohzU5A2Zsn5RFpRMJpHJZMyzqKxfpIesFxqWdDrtWdYv0h6SzSNHReihzee7LAdNmdeURz6zTPu1WrfqG2a+6Q7YGHsDsM8kuuZ5jKcOEZ5rmc4W0advbrrWLy28tdIB5RsyN2g9o1cTEZ5D5jVlJ1k251BWPyrKs+yk+P8Eeb0y7FX/LpQ7gviggLZPCDcoqA0IPmcJWvUTczHHTjaW33eV0Yyyr4GcQq7suSAzinRYg3++y1aHOoL8Qo5f5DF47xh2ZRH4bLOB8NV2jN1TximKycNjhnNoR2QN7e234xZhoL2lpzt1/AfLekgsXhgSgQAAAABJRU5ErkJggg==";
@@ -1,5 +0,0 @@
1
- export const closeIcon = 'data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIzMiIgaGVpZ2h0PSIzMiIgZmlsbD0iIzAwMDAwMCIgdmlld0JveD0iMCAwIDI1NiAyNTYiPgo8cGF0aCBkPSJNMjA1LjY2LDE5NC4zNGE4LDgsMCwwLDEtMTEuMzIsMTEuMzJMMTI4LDEzOS4zMSw2MS42NiwyMDUuNjZhOCw4LDAsMCwxLTExLjMyLTExLjMyTDExNi42OSwxMjgsNTAuMzQsNjEuNjZBOCw4LDAsMCwxLDYxLjY2LDUwLjM0TDEyOCwxMTYuNjlsNjYuMzQtNjYuMzVhOCw4LDAsMCwxLDExLjMyLDExLjMyTDEzOS4zMSwxMjhaIj48L3BhdGg+Cjwvc3ZnPg==';
2
- export const b = 'data:image/svg+xml;base64,PHN2ZyB4bLjM0TDEyOCwxMTYuNjlsNjYuMzQtNjYuMzVhOCw4LDAsMCwxLDExLjMyLDExLjMyTDEzOS4zMSwxMjhaIj48L3BhdGg+Cjwvc3ZnPg==';
3
- export const chromeIcon = 'data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 78 78"><path fill="url(%23a)" d="M71.034 20.5a37.001 37.001 0 0 0-64.084 0l2.22 39.96L71.034 20.5Z"/><path fill="url(%23b)" d="M22.979 48.25 6.958 20.5A37 37 0 0 0 39 76l36.26-37-52.281 9.25Z"/><path fill="url(%23c)" d="M55.021 48.25 39 76a37.001 37.001 0 0 0 32.035-55.5H39l16.021 27.75Z"/><path fill="%23fff" d="M39 57.5a18.5 18.5 0 1 0 0-37 18.5 18.5 0 0 0 0 37Z"/><path fill="%231A73E8" d="M39 53.652a14.65 14.65 0 0 0 13.536-20.26A14.653 14.653 0 1 0 39 53.653Z"/><defs><linearGradient id="a" x1="6.958" x2="71.034" y1="25.125" y2="25.125" gradientUnits="userSpaceOnUse"><stop stop-color="%23D93025"/><stop offset="1" stop-color="%23EA4335"/></linearGradient><linearGradient id="b" x1="43.003" x2="10.961" y1="73.684" y2="18.184" gradientUnits="userSpaceOnUse"><stop stop-color="%231E8E3E"/><stop offset="1" stop-color="%2334A853"/></linearGradient><linearGradient id="c" x1="33.598" x2="65.64" y1="76" y2="20.596" gradientUnits="userSpaceOnUse"><stop stop-color="%23FCC934"/><stop offset="1" stop-color="%23FBBC04"/></linearGradient></defs></svg>';
4
- export const gel = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACQAAAAkCAYAAADhAJiYAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAALDSURBVHgB1Zg/aBNRHMe/1kIrRHJDwbSDSQbTrSkKupmDglOhzSDoolMGBzV0cRPpKFJI1w6tVbGLhEC7uIS4KbYmHSNyyVLtYhMSIRVB3++Sd17i3buX1z85P/C7u7z3cu97v/d7v3f3AGd0ZqvMDGa/j9k+de49DwkizPInIMLNjE6fjkwzOzhFMdwOOn3/45lBiLGLitgFGQMUwy3Pxcz7QAw3/Sw7PILDGA6KYSiKGY9omL0zhfPaKALBUau8WW9hY/kD9io1KKCfQdtVffNqO4VL8QuOdduFKu7NvIAKQ1AkoI241k2ENahCMfREpiENzVgoYJ5vPbiKxNyksG2j1sL3/R/mNfGz9QsySA0ZxcvLjyl28xGoQOJoCMulfc+2w5CgHbzdYlYW35nBS531srB0w/Qih7wUmw5JCVKOoa31XUcxxGsmtJdAUM67Qg/F4iFcToQxezfeVd6oHbqKIZqsjtrYvXr74TXTU/QgopQgjKHcl/sYDwctEVvrJXazOnbYtC6XvkEExd2VxEXmmXNIPb5uiaMHmRl75vo/oYe4GGJlsWDGDEfTNOi6jmKxiEql4li22fHERCRoxRSfdUqC7DTrh12/s9ms2Tl1HI1GXcsI0fD2ohzU5A2Zsn5RFpRMJpHJZMyzqKxfpIesFxqWdDrtWdYv0h6SzSNHReihzee7LAdNmdeURz6zTPu1WrfqG2a+6Q7YGHsDsM8kuuZ5jKcOEZ5rmc4W0advbrrWLy28tdIB5RsyN2g9o1cTEZ5D5jVlJ1k251BWPyrKs+yk+P8Eeb0y7FX/LpQ7gviggLZPCDcoqA0IPmcJWvUTczHHTjaW33eV0Yyyr4GcQq7suSAzinRYg3++y1aHOoL8Qo5f5DF47xh2ZRH4bLOB8NV2jN1TximKycNjhnNoR2QN7e234xZhoL2lpzt1/AfLekgsXhgSgQAAAABJRU5ErkJggg==';
5
- //# sourceMappingURL=dataBase.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"dataBase.js","sourceRoot":"","sources":["../../../../src/assets/svg/dataBase.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,SAAS,GACrB,4bAA4b,CAAC;AAE9b,MAAM,CAAC,MAAM,CAAC,GACb,6IAA6I,CAAC;AAE/I,MAAM,CAAC,MAAM,UAAU,GACtB,knCAAknC,CAAC;AAEpnC,MAAM,CAAC,MAAM,GAAG,GACf,wlCAAwlC,CAAC"}
@@ -1 +0,0 @@
1
- export declare const x: import("lit").TemplateResult<2>;
@@ -1,35 +0,0 @@
1
- import { svg } from 'lit';
2
- export const x = svg `<svg width="28" height="28" viewBox="0 0 28 28" fill="none" xmlns="http://www.w3.org/2000/svg">
3
- <rect width="28" height="28" fill="white"/>
4
- <path d="M24.0891 3.1199L15.3446 9.61456L16.9617 5.7828L24.0891 3.1199Z" fill="#E2761B" stroke="#E2761B" stroke-width="0.0878845" stroke-linecap="round" stroke-linejoin="round"/>
5
- <path d="M3.90207 3.1199L12.5763 9.67608L11.0383 5.7828L3.90207 3.1199Z" fill="#E4761B" stroke="#E4761B" stroke-width="0.0878845" stroke-linecap="round" stroke-linejoin="round"/>
6
- <path d="M20.9429 18.1745L18.6139 21.7426L23.597 23.1136L25.0295 18.2536L20.9429 18.1745Z" fill="#E4761B" stroke="#E4761B" stroke-width="0.0878845" stroke-linecap="round" stroke-linejoin="round"/>
7
- <path d="M2.97929 18.2536L4.40301 23.1136L9.38607 21.7426L7.05713 18.1745L2.97929 18.2536Z" fill="#E4761B" stroke="#E4761B" stroke-width="0.0878845" stroke-linecap="round" stroke-linejoin="round"/>
8
- <path d="M9.10483 12.1456L7.71626 14.2461L12.6642 14.4658L12.4884 9.14877L9.10483 12.1456Z" fill="#E4761B" stroke="#E4761B" stroke-width="0.0878845" stroke-linecap="round" stroke-linejoin="round"/>
9
- <path d="M18.8864 12.1456L15.4589 9.08725L15.3446 14.4658L20.2837 14.2461L18.8864 12.1456Z" fill="#E4761B" stroke="#E4761B" stroke-width="0.0878845" stroke-linecap="round" stroke-linejoin="round"/>
10
- <path d="M9.38606 21.7426L12.3566 20.2925L9.79033 18.2888L9.38606 21.7426Z" fill="#E4761B" stroke="#E4761B" stroke-width="0.0878845" stroke-linecap="round" stroke-linejoin="round"/>
11
- <path d="M15.6347 20.2925L18.6139 21.7426L18.2009 18.2888L15.6347 20.2925Z" fill="#E4761B" stroke="#E4761B" stroke-width="0.0878845" stroke-linecap="round" stroke-linejoin="round"/>
12
- <path d="M18.6139 21.7426L15.6347 20.2925L15.8719 22.2348L15.8456 23.0521L18.6139 21.7426Z" fill="#D7C1B3" stroke="#D7C1B3" stroke-width="0.0878845" stroke-linecap="round" stroke-linejoin="round"/>
13
- <path d="M9.38606 21.7426L12.1544 23.0521L12.1368 22.2348L12.3566 20.2925L9.38606 21.7426Z" fill="#D7C1B3" stroke="#D7C1B3" stroke-width="0.0878845" stroke-linecap="round" stroke-linejoin="round"/>
14
- <path d="M12.1984 17.0056L9.72002 16.2762L11.4689 15.4765L12.1984 17.0056Z" fill="#233447" stroke="#233447" stroke-width="0.0878845" stroke-linecap="round" stroke-linejoin="round"/>
15
- <path d="M15.7928 17.0056L16.5223 15.4765L18.28 16.2762L15.7928 17.0056Z" fill="#233447" stroke="#233447" stroke-width="0.0878845" stroke-linecap="round" stroke-linejoin="round"/>
16
- <path d="M9.38606 21.7426L9.80791 18.1745L7.05712 18.2536L9.38606 21.7426Z" fill="#CD6116" stroke="#CD6116" stroke-width="0.0878845" stroke-linecap="round" stroke-linejoin="round"/>
17
- <path d="M18.1921 18.1745L18.6139 21.7426L20.9429 18.2536L18.1921 18.1745Z" fill="#CD6116" stroke="#CD6116" stroke-width="0.0878845" stroke-linecap="round" stroke-linejoin="round"/>
18
- <path d="M20.2837 14.2461L15.3446 14.4658L15.8016 17.0057L16.5311 15.4765L18.2888 16.2762L20.2837 14.2461Z" fill="#CD6116" stroke="#CD6116" stroke-width="0.0878845" stroke-linecap="round" stroke-linejoin="round"/>
19
- <path d="M9.72002 16.2762L11.4777 15.4765L12.1984 17.0057L12.6642 14.4658L7.71626 14.2461L9.72002 16.2762Z" fill="#CD6116" stroke="#CD6116" stroke-width="0.0878845" stroke-linecap="round" stroke-linejoin="round"/>
20
- <path d="M7.71626 14.2461L9.79033 18.2888L9.72002 16.2762L7.71626 14.2461Z" fill="#E4751F" stroke="#E4751F" stroke-width="0.0878845" stroke-linecap="round" stroke-linejoin="round"/>
21
- <path d="M18.2888 16.2762L18.2009 18.2888L20.2837 14.2461L18.2888 16.2762Z" fill="#E4751F" stroke="#E4751F" stroke-width="0.0878845" stroke-linecap="round" stroke-linejoin="round"/>
22
- <path d="M12.6642 14.4658L12.1984 17.0057L12.7784 20.0025L12.9102 16.0565L12.6642 14.4658Z" fill="#E4751F" stroke="#E4751F" stroke-width="0.0878845" stroke-linecap="round" stroke-linejoin="round"/>
23
- <path d="M15.3446 14.4658L15.1073 16.0477L15.2128 20.0025L15.8016 17.0057L15.3446 14.4658Z" fill="#E4751F" stroke="#E4751F" stroke-width="0.0878845" stroke-linecap="round" stroke-linejoin="round"/>
24
- <path d="M15.8016 17.0056L15.2128 20.0025L15.6347 20.2925L18.2009 18.2888L18.2888 16.2762L15.8016 17.0056Z" fill="#F6851B" stroke="#F6851B" stroke-width="0.0878845" stroke-linecap="round" stroke-linejoin="round"/>
25
- <path d="M9.72002 16.2762L9.79033 18.2888L12.3566 20.2925L12.7784 20.0025L12.1984 17.0056L9.72002 16.2762Z" fill="#F6851B" stroke="#F6851B" stroke-width="0.0878845" stroke-linecap="round" stroke-linejoin="round"/>
26
- <path d="M15.8456 23.0521L15.8719 22.2348L15.6522 22.0414H12.339L12.1368 22.2348L12.1544 23.0521L9.38606 21.7426L10.3528 22.5336L12.3126 23.8958H15.6786L17.6472 22.5336L18.6139 21.7426L15.8456 23.0521Z" fill="#C0AD9E" stroke="#C0AD9E" stroke-width="0.0878845" stroke-linecap="round" stroke-linejoin="round"/>
27
- <path d="M15.6347 20.2925L15.2128 20.0025H12.7784L12.3566 20.2925L12.1368 22.2348L12.339 22.0414H15.6522L15.8719 22.2348L15.6347 20.2925Z" fill="#161616" stroke="#161616" stroke-width="0.0878845" stroke-linecap="round" stroke-linejoin="round"/>
28
- <path d="M24.4583 10.0364L25.2053 6.45072L24.0891 3.1199L15.6347 9.39485L18.8864 12.1456L23.4827 13.4903L24.5022 12.3038L24.0628 11.9874L24.7658 11.3459L24.221 10.924L24.924 10.3879L24.4583 10.0364Z" fill="#763D16" stroke="#763D16" stroke-width="0.0878845" stroke-linecap="round" stroke-linejoin="round"/>
29
- <path d="M2.79472 6.45072L3.54174 10.0364L3.06717 10.3879L3.77024 10.924L3.23415 11.3459L3.93722 11.9874L3.4978 12.3038L4.50847 13.4903L9.10483 12.1456L12.3566 9.39485L3.90207 3.1199L2.79472 6.45072Z" fill="#763D16" stroke="#763D16" stroke-width="0.0878845" stroke-linecap="round" stroke-linejoin="round"/>
30
- <path d="M23.4827 13.4903L18.8864 12.1456L20.2837 14.2461L18.2009 18.2888L20.9429 18.2536H25.0295L23.4827 13.4903Z" fill="#F6851B" stroke="#F6851B" stroke-width="0.0878845" stroke-linecap="round" stroke-linejoin="round"/>
31
- <path d="M9.10484 12.1456L4.50848 13.4903L2.97929 18.2536H7.05713L9.79033 18.2888L7.71626 14.2461L9.10484 12.1456Z" fill="#F6851B" stroke="#F6851B" stroke-width="0.0878845" stroke-linecap="round" stroke-linejoin="round"/>
32
- <path d="M15.3446 14.4658L15.6347 9.39485L16.9705 5.7828H11.0383L12.3566 9.39485L12.6642 14.4658L12.7696 16.0653L12.7784 20.0025H15.2128L15.2304 16.0653L15.3446 14.4658Z" fill="#F6851B" stroke="#F6851B" stroke-width="0.0878845" stroke-linecap="round" stroke-linejoin="round"/>
33
- </svg>
34
- `;
35
- //# sourceMappingURL=metaMaskWallet.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"metaMaskWallet.js","sourceRoot":"","sources":["../../../../src/assets/svg/metaMaskWallet.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAE1B,MAAM,CAAC,MAAM,CAAC,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAgCnB,CAAC"}
@@ -1 +0,0 @@
1
- export declare function ConnectedInfo({ avatar, walletAddress, onClick, className }: any): import("react/jsx-runtime").JSX.Element;
@@ -1,13 +0,0 @@
1
- 'use client';
2
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
- import { styled } from 'styled-components';
4
- import { formatAddress } from '../../utils/formatter';
5
- const WalletInfoButton = styled.button `
6
- display: flex;
7
- align-items: center;
8
- gap: 10px;
9
- `;
10
- export function ConnectedInfo({ avatar, walletAddress, onClick, className }) {
11
- return (_jsxs(WalletInfoButton, { className: className, onClick: () => onClick(), children: [avatar?.text, _jsx("span", { children: formatAddress(walletAddress) })] }));
12
- }
13
- //# sourceMappingURL=ConnectedInfo.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ConnectedInfo.js","sourceRoot":"","sources":["../../../../src/components/ConnectButton/ConnectedInfo.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AACb,OAAO,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAC3C,OAAO,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAEtD,MAAM,gBAAgB,GAAG,MAAM,CAAC,MAAM,CAAA;;;;CAIrC,CAAC;AAEF,MAAM,UAAU,aAAa,CAAC,EAAE,MAAM,EAAE,aAAa,EAAE,OAAO,EAAE,SAAS,EAAO;IAC/E,OAAO,CACN,MAAC,gBAAgB,IAAC,SAAS,EAAE,SAAS,EAAE,OAAO,EAAE,GAAG,EAAE,CAAC,OAAO,EAAE,aAC9D,MAAM,EAAE,IAAI,EACb,yBAAO,aAAa,CAAC,aAAa,CAAC,GAAQ,IACzB,CACnB,CAAC;AACH,CAAC"}
@@ -1,8 +0,0 @@
1
- interface ConnectButtonProps {
2
- text?: string;
3
- showAvatar?: boolean;
4
- className?: string;
5
- infoClass?: string;
6
- }
7
- export declare function ConnectButton(props: ConnectButtonProps): import("react/jsx-runtime").JSX.Element;
8
- export {};
@@ -1,16 +0,0 @@
1
- 'use client';
2
- import { jsx as _jsx } from "react/jsx-runtime";
3
- import { useTranslation } from 'react-i18next';
4
- import { useWalletKit } from '../../hooks/useWalletKit';
5
- import { ConnectedInfo } from './ConnectedInfo';
6
- export function ConnectButton(props) {
7
- const { t } = useTranslation();
8
- const { text = t('connectWallet'), showAvatar = true, className, infoClass } = props;
9
- const { avatar, connectStatus, walletAddress, connect, showWalletInfo } = useWalletKit();
10
- return (_jsx("div", { children: connectStatus === 'connected' ? (_jsx(ConnectedInfo, { className: infoClass, avatar: showAvatar ? avatar : undefined, walletAddress: walletAddress, onClick: () => {
11
- showWalletInfo();
12
- } })) : (_jsx("button", { className: className, onClick: () => {
13
- connect();
14
- }, children: text })) }));
15
- }
16
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/ConnectButton/index.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AACb,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAC/C,OAAO,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AACxD,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAShD,MAAM,UAAU,aAAa,CAAC,KAAyB;IACtD,MAAM,EAAE,CAAC,EAAE,GAAG,cAAc,EAAE,CAAC;IAE/B,MAAM,EAAE,IAAI,GAAG,CAAC,CAAC,eAAe,CAAC,EAAE,UAAU,GAAG,IAAI,EAAE,SAAS,EAAE,SAAS,EAAE,GAAG,KAAK,CAAC;IACrF,MAAM,EAAE,MAAM,EAAE,aAAa,EAAE,aAAa,EAAE,OAAO,EAAE,cAAc,EAAE,GAAG,YAAY,EAAE,CAAC;IAEzF,OAAO,CACN,wBACE,aAAa,KAAK,WAAW,CAAC,CAAC,CAAC,CAChC,KAAC,aAAa,IACb,SAAS,EAAE,SAAS,EACpB,MAAM,EAAE,UAAU,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,SAAS,EACvC,aAAa,EAAE,aAAa,EAC5B,OAAO,EAAE,GAAG,EAAE;gBACb,cAAc,EAAE,CAAC;YAClB,CAAC,GACA,CACF,CAAC,CAAC,CAAC,CACH,iBACC,SAAS,EAAE,SAAS,EACpB,OAAO,EAAE,GAAG,EAAE;gBACb,OAAO,EAAE,CAAC;YACX,CAAC,YAEA,IAAI,GACG,CACT,GACI,CACN,CAAC;AACH,CAAC"}
@@ -1,6 +0,0 @@
1
- interface ConnectingProps {
2
- wallet: any;
3
- onClose: () => void;
4
- }
5
- export declare function Connecting({ wallet, onClose }: ConnectingProps): import("react/jsx-runtime").JSX.Element;
6
- export {};
@@ -1,11 +0,0 @@
1
- 'use client';
2
- import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
3
- import { useTranslation } from 'react-i18next';
4
- import ModalHeader from '../Header/ModalHeader';
5
- import SpinSvg from '../SVGs/spinSvg';
6
- import ConnectingContainer from './style';
7
- export function Connecting({ wallet, onClose }) {
8
- const { t } = useTranslation();
9
- return (_jsxs(_Fragment, { children: [_jsx(ModalHeader, { className: "mainTitle", onClose: onClose }), _jsxs(ConnectingContainer, { children: [_jsx("div", { className: "logo", children: _jsx("img", { src: wallet?.icon, alt: wallet?.name }) }), _jsx("div", { className: "introduce", children: `${t('opening')} ${wallet?.name} ${t('title')}...` }), _jsx("div", { className: "detail", children: t('confirmConnection') }), _jsx(SpinSvg, { className: "loading" })] })] }));
10
- }
11
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/Connecting/index.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AACb,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAC/C,OAAO,WAAW,MAAM,uBAAuB,CAAC;AAChD,OAAO,OAAO,MAAM,iBAAiB,CAAC;AACtC,OAAO,mBAAmB,MAAM,SAAS,CAAC;AAO1C,MAAM,UAAU,UAAU,CAAC,EAAE,MAAM,EAAE,OAAO,EAAmB;IAC9D,MAAM,EAAE,CAAC,EAAE,GAAG,cAAc,EAAE,CAAC;IAE/B,OAAO,CACN,8BACC,KAAC,WAAW,IAAC,SAAS,EAAC,WAAW,EAAC,OAAO,EAAE,OAAO,GAAI,EACvD,MAAC,mBAAmB,eACnB,cAAK,SAAS,EAAC,MAAM,YACpB,cAAK,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,GAAG,EAAE,MAAM,EAAE,IAAI,GAAI,GACxC,EACN,cAAK,SAAS,EAAC,WAAW,YAAE,GAAG,CAAC,CAAC,SAAS,CAAC,IAAI,MAAM,EAAE,IAAI,IAAI,CAAC,CAAC,OAAO,CAAC,KAAK,GAAO,EACrF,cAAK,SAAS,EAAC,QAAQ,YAAE,CAAC,CAAC,mBAAmB,CAAC,GAAO,EACtD,KAAC,OAAO,IAAC,SAAS,EAAC,SAAS,GAAG,IACV,IACpB,CACH,CAAC;AACH,CAAC"}
@@ -1,2 +0,0 @@
1
- declare const ConnectingContainer: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
2
- export default ConnectingContainer;
@@ -1,52 +0,0 @@
1
- import { styled } from 'styled-components';
2
- const ConnectingContainer = styled.div `
3
- display: flex;
4
- flex-direction: column;
5
- align-items: center;
6
- margin-top: 72px;
7
- font-family: Manrope;
8
-
9
- .logo {
10
- img {
11
- width: 66px;
12
- height: 66px;
13
- }
14
- }
15
-
16
- .introduce {
17
- margin-top: 44px;
18
- font-size: 14px;
19
- font-weight: 700;
20
- line-height: 14px;
21
- color: ${({ theme }) => theme.textColor};
22
- }
23
-
24
- .detail {
25
- margin-top: 30px;
26
- font-size: 14px;
27
- font-weight: 700;
28
- line-height: 14px;
29
- color: ${({ theme }) => theme.textColor5};
30
- }
31
-
32
- .loading {
33
- margin-top: 24px;
34
- animation: spin 1s linear infinite;
35
-
36
- path {
37
- fill: ${({ theme }) => theme.spinColor};
38
- }
39
- }
40
-
41
- @keyframes spin {
42
- 100% {
43
- transform: rotate(360deg);
44
- }
45
- }
46
-
47
- @media (max-width: 768px) {
48
- margin-top: 36px;
49
- }
50
- `;
51
- export default ConnectingContainer;
52
- //# sourceMappingURL=style.js.map