A secure wallet management system built with NestJS and ethers.js.
- Secure wallet creation and management
- Private key encryption
- Transaction signing
- Balance checking
- User management
- Node.js (v14 or later)
- npm or yarn
- Clone the repository:
git clone <repository-url>
cd wallet-management
- Install dependencies:
npm install
- Configure environment variables:
- decrypt env.enc to > .env
- Update the values in
.env
with your own:- Generate secure encryption keys
- Add your Infura project ID or other RPC URL
Development mode:
npm run dev
Production mode:
npm run build
npm start
POST /wallet/create
- Create a new walletPOST /wallet/sign
- Sign a transactionGET /wallet/balance/:address
- Get wallet balance
POST /user/create
- Create a new userGET /user/:id
- Get user detailsGET /user/:id/balance
- Get user's wallet balance
- Private keys are encrypted using AES-256-CBC
- Encryption keys are stored in environment variables
- In production, use a secure key management service
- Implement proper authentication and authorization
- Use HTTPS in production
- Run tests:
npm test
- Lint code:
npm run lint
- Build:
npm run build
MIT