Skip to content

Backend web3 wallet for a user-friendly web3 experience

Notifications You must be signed in to change notification settings

smartvin/OurWallet

Repository files navigation

OurWallet Management System

A secure wallet management system built with NestJS and ethers.js.

Features

  • Secure wallet creation and management
  • Private key encryption
  • Transaction signing
  • Balance checking
  • User management

Prerequisites

  • Node.js (v14 or later)
  • npm or yarn

Installation

  1. Clone the repository:
git clone <repository-url>
cd wallet-management
  1. Install dependencies:
npm install
  1. 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

Running the Application

Development mode:

npm run dev

Production mode:

npm run build
npm start

API Endpoints

Wallet Endpoints

  • POST /wallet/create - Create a new wallet
  • POST /wallet/sign - Sign a transaction
  • GET /wallet/balance/:address - Get wallet balance

User Endpoints

  • POST /user/create - Create a new user
  • GET /user/:id - Get user details
  • GET /user/:id/balance - Get user's wallet balance

Security Considerations

  • 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

Development

  • Run tests: npm test
  • Lint code: npm run lint
  • Build: npm run build

License

MIT

About

Backend web3 wallet for a user-friendly web3 experience

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published