11<h1 align =" center " >Java-Wallet</h1 >
22
33<p align =" center " >
4- <strong >生产级多链加密货币钱包后台系统 </strong >
4+ <strong >Production-grade multi-chain cryptocurrency wallet backend </strong >
55</p >
66
77<p align =" center " >
1616</p >
1717
1818<p align =" center " >
19- <a href =" https://t.me/GalaxySciTech " >Telegram</a > ·
20- <a href =" https://github.com/GalaxySciTech/java-wallet/issues " >Issues</a > ·
19+ <a href =" README_CN.md " >中文文档</a > ·
20+ <a href =" https://t.me/GalaxySciTech " >Telegram</a > ·
21+ <a href =" https://github.com/GalaxySciTech/java-wallet/issues " >Issues</a > ·
2122 <a href =" #quick-start " >Quick Start</a >
2223</p >
2324
2425---
2526
2627## Introduction
2728
28- Java-Wallet 是一套经过生产环境验证的多链加密货币钱包后台系统,曾稳定管理过数亿美元级别的交易。系统提供区块链地址生成、充值检测、提现处理和自动归集等核心功能,支持主流公链和代币。
29+ Java-Wallet is a battle-tested multi-chain cryptocurrency wallet backend that has safely managed hundreds of millions of dollars in transactions in production. It provides blockchain address generation, deposit detection, withdrawal processing, and automated fund sweeping across all major public chains.
2930
30- 核心签名组件 [ tokencore] ( https://github.com/GalaxySciTech/tokencore ) 支持全链离线签名,私钥全程本地运算,从不外泄。
31+ The core signing component [ tokencore] ( https://github.com/GalaxySciTech/tokencore ) performs all cryptographic operations locally — private keys never leave the process.
3132
3233### Supported Chains
3334
@@ -72,11 +73,11 @@ Java-Wallet 是一套经过生产环境验证的多链加密货币钱包后台
7273
7374| Module | Description |
7475| :-------| :------------|
75- | ** wallet-webapi** | REST API — 地址生成、充提币、管理后台、 Swagger 文档 |
76- | ** wallet-task** | 定时任务 — 区块同步、充值检测、自动归集、手续费补发 |
77- | ** wallet-hsm** | 密钥管理 — HD 钱包派生、离线签名、私钥导入导出 |
78- | ** wallet-common** | 公共层 — 业务逻辑、 RPC 客户端、缓存、工具类 |
79- | ** wallet-entity** | 数据层 — JPA 实体、Repository、 QueryDSL |
76+ | ** wallet-webapi** | REST API — address generation, deposits & withdrawals, admin dashboard, Swagger docs |
77+ | ** wallet-task** | Scheduled jobs — block syncing, deposit detection, auto-sweeping, fee top-up |
78+ | ** wallet-hsm** | Key management — HD wallet derivation, offline signing, key import/export |
79+ | ** wallet-common** | Shared layer — business logic, RPC clients, caching, utilities |
80+ | ** wallet-entity** | Data layer — JPA entities, repositories, QueryDSL |
8081
8182## Tech Stack
8283
@@ -100,109 +101,109 @@ Java-Wallet 是一套经过生产环境验证的多链加密货币钱包后台
100101
101102- JDK 17+
102103- MySQL 8.0+
103- - RabbitMQ 3.x( wallet-task 需要)
104+ - RabbitMQ 3.x (required by wallet-task)
104105
105- ### Docker Compose(推荐)
106+ ### Docker Compose (Recommended)
106107
107108``` bash
108109git clone https://github.com/GalaxySciTech/java-wallet.git
109110cd java-wallet
110111
111- cp .env.example .env # 编辑配置
112+ cp .env.example .env # edit with your settings
112113docker-compose up -d
113114```
114115
115- 服务启动后:
116+ Once running:
116117- ** API** : http://localhost:10001
117118- ** Swagger UI** : http://localhost:10001/swagger-ui.html
118- - ** RabbitMQ 管理 ** : http://localhost:15672
119+ - ** RabbitMQ Console ** : http://localhost:15672
119120
120121### Manual Setup
121122
122123``` bash
123- # 1. 配置环境变量(参考 .env.example)
124+ # 1. Set environment variables (see .env.example for full list)
124125export DB_URL=" jdbc:mysql://localhost:3306/wallet_db?useSSL=false&characterEncoding=UTF-8"
125126export DB_USERNAME=root
126127export DB_PASSWORD=your_password
127128
128- # 2. 构建
129+ # 2. Build
129130chmod +x gradlew
130131./gradlew build -x test
131132
132- # 3. 启动(分别在不同终端)
133+ # 3. Run each service in a separate terminal
133134./gradlew :wallet-webapi:bootRun
134135./gradlew :wallet-task:bootRun
135136./gradlew :wallet-hsm:bootRun
136137```
137138
138139## Configuration
139140
140- 所有敏感配置均通过环境变量注入,绝不硬编码。完整列表见 [ ` .env.example ` ] ( .env.example ) 。
141+ All sensitive values are injected via environment variables — nothing is hardcoded. See [ ` .env.example ` ] ( .env.example ) for the full list.
141142
142143| Variable | Service | Description |
143144| :---------| :--------| :------------|
144- | ` DB_URL ` | webapi, task | MySQL JDBC 连接 |
145- | ` DB_USERNAME ` / ` DB_PASSWORD ` | webapi, task | 数据库凭证 |
146- | ` RABBITMQ_HOST ` / ` RABBITMQ_PASSWORD ` | task | RabbitMQ 连接 |
147- | ` KEYSTORE_DIR ` / ` KEYSTORE_PASSWORD ` | hsm | 密钥库路径与密码 |
148- | ` XXL_JOB_ADMIN_ADDRESSES ` | task | xxl-job 调度中心 |
149- | ` WALLET_CRYPTO_PUSH_KEY ` | webapi | 充值推送 AES 加密密钥 |
145+ | ` DB_URL ` | webapi, task | MySQL JDBC connection URL |
146+ | ` DB_USERNAME ` / ` DB_PASSWORD ` | webapi, task | Database credentials |
147+ | ` RABBITMQ_HOST ` / ` RABBITMQ_PASSWORD ` | task | RabbitMQ connection |
148+ | ` KEYSTORE_DIR ` / ` KEYSTORE_PASSWORD ` | hsm | Keystore path and password |
149+ | ` XXL_JOB_ADMIN_ADDRESSES ` | task | xxl-job scheduler address |
150+ | ` WALLET_CRYPTO_PUSH_KEY ` | webapi | AES key for deposit push notifications |
150151
151152## API Reference
152153
153154### Wallet API ` /wallet/v1 `
154155
155156| Method | Endpoint | Description |
156157| :------:| :---------| :------------|
157- | POST | ` /get_address ` | 批量生成区块链地址 |
158- | POST | ` /send ` | 提现(指定 from 或自动从热钱包转出) |
159- | POST | ` /create_hot_address ` | 创建热钱包 / Gas 钱包 |
160- | POST | ` /export_wallet ` | 导出私钥或助记词 |
161- | POST | ` /import_wallet ` | 导入私钥或助记词 |
162- | GET | ` /get_hot_address ` | 查询热钱包地址 |
163- | GET | ` /check_address ` | 验证地址私钥是否存在 |
164- | GET | ` /get_transaction ` | 查询充提归集记录 |
165- | GET | ` /get_new_deposit ` | 获取新充值记录(拉取后标记已读) |
166- | GET | ` /check_tx_status ` | 查询链上交易状态 |
158+ | POST | ` /get_address ` | Generate new blockchain addresses in batch |
159+ | POST | ` /send ` | Withdraw (specify ` from ` or auto-select from hot wallet) |
160+ | POST | ` /create_hot_address ` | Create a hot wallet or gas wallet |
161+ | POST | ` /export_wallet ` | Export private key or mnemonic |
162+ | POST | ` /import_wallet ` | Import private key or mnemonic |
163+ | GET | ` /get_hot_address ` | Query hot wallet addresses |
164+ | GET | ` /check_address ` | Check if address private key exists |
165+ | GET | ` /get_transaction ` | Query deposit / withdrawal / sweep records |
166+ | GET | ` /get_new_deposit ` | Fetch new deposits (marked as read after fetch) |
167+ | GET | ` /check_tx_status ` | Check on-chain transaction status |
167168
168169### Blockchain API ` /block_chain/v1 `
169170
170171| Method | Endpoint | Description |
171172| :------:| :---------| :------------|
172- | GET | ` /get_transaction ` | 链上查询交易详情 |
173- | GET | ` /get_address_balance ` | 链上查询地址余额 |
174- | GET | ` /get_recommend_fee ` | 获取推荐手续费(低/中/高) |
175- | GET | ` /calculation_fee ` | 计算手续费 |
176- | GET | ` /get_support_token ` | 获取支持的币种列表 |
173+ | GET | ` /get_transaction ` | Query on-chain transaction details |
174+ | GET | ` /get_address_balance ` | Query on-chain address balance |
175+ | GET | ` /get_recommend_fee ` | Get recommended fees (slow / medium / fast) |
176+ | GET | ` /calculation_fee ` | Calculate transaction fee |
177+ | GET | ` /get_support_token ` | List all supported tokens |
177178
178179### Admin API ` /admin `
179180
180181| Method | Endpoint | Description |
181182| :------:| :---------| :------------|
182- | POST | ` /login ` | 管理员登录 |
183- | GET | ` /get_dashboard ` | 获取概览数据 |
184- | GET | ` /get_addr_list ` | 地址列表 |
185- | GET | ` /get_token_list ` | 代币列表 |
186- | POST | ` /edit_token ` | 编辑代币配置 |
187- | POST | ` /edit_config ` | 编辑系统配置 |
188- | POST | ` /edit_white ` | 编辑 IP 白名单 |
183+ | POST | ` /login ` | Admin login |
184+ | GET | ` /get_dashboard ` | Dashboard overview |
185+ | GET | ` /get_addr_list ` | Address list |
186+ | GET | ` /get_token_list ` | Token list |
187+ | POST | ` /edit_token ` | Edit token configuration |
188+ | POST | ` /edit_config ` | Edit system configuration |
189+ | POST | ` /edit_white ` | Edit IP whitelist |
189190
190- > 完整接口文档请启动服务后访问 Swagger UI。
191+ > Full interactive API docs are available at Swagger UI after starting the service.
191192
192193## Reliability
193194
194- Java-Wallet 已在生产环境中稳定运行,安全管理过数亿美元交易量。具备高可靠性、可扩展性和实用性。
195+ Java-Wallet has been running in production and has safely processed hundreds of millions of dollars in transactions. It is built for high reliability, scalability, and real-world utility.
195196
196197## Contact
197198
198- 如需技术支持、商业合作或搭建咨询,请通过 Telegram 联系:
199+ For technical support, business inquiries, or deployment consulting:
199200
200- ** [ @GalaxySciTech ] ( https://t.me/GalaxySciTech ) **
201+ ** [ @GalaxySciTech ] ( https://t.me/GalaxySciTech ) ** on Telegram
201202
202203## Disclaimer
203204
204- 使用本源代码进行的任何商业活动,由此产生的损失(无论是对自己还是他人)均由使用者自行承担,作者不承担任何责任。
205+ Any commercial use of this source code is at your own risk. The authors assume no liability for any losses incurred by yourself or others.
205206
206207## License
207208
208- 本项目按原样提供,详见仓库中的许可证文件。
209+ This project is provided as-is. See the repository for license details.
0 commit comments