Wallet service for Mantis Exchange. Handles deposit address generation, on-chain deposit scanning, and withdrawal processing.
- Address generation — ETH/ERC-20 deposit addresses per user
- Deposit scanning — monitors blockchain for incoming transfers, credits balances
- Withdrawal processing — freeze → deduct → submit on-chain transaction
- QFC chain integration — connects to QFC node via EVM-compatible JSON-RPC
graph LR
U([User]) -->|Deposit| BC[QFC/ETH Chain]
BC -->|Scan blocks| W[mantis-wallet]
W -->|Credit balance| AC[mantis-account]
U -->|Withdraw request| GW[mantis-gateway]
GW --> W
W -->|Freeze + Deduct| AC
W -->|Send TX| BC
| Method | Path | Description |
|---|---|---|
| GET | /api/v1/wallet/deposit-address?user_id=...&chain=ETH |
Get/create deposit address |
| POST | /api/v1/wallet/withdraw |
Request withdrawal |
| GET | /internal/v1/withdrawals/pending |
List pending (admin) |
| PUT | /internal/v1/withdrawals/:id |
Approve/reject (admin) |
go build -o mantis-wallet ./cmd/wallet
ETH_NODE=http://localhost:8545 ./mantis-walletPart of Mantis Exchange
MIT License