A modern web-based wallet interface for Nockchain, built with Flask (backend) and Vite + Vanilla JS (frontend).
- Balance Management: View all your notes with detailed information
- Transaction History: Track all your transactions with status updates (created/signed/sent)
- Multi-Signer Support: Automatically filters history by wallet address
- Multi-Note Transactions: Manually select notes or let the wallet auto-select them
- Smart Sorting: Sort notes by block height or amount (ascending/descending)
- Transaction Flow: Create, sign, and send transactions with confirmation steps
- Key Management: Export and import wallet keys
- Real-time Updates: Automatic balance refresh after transactions
- Transaction Verification: Automatic verification of transaction file creation
- Responsive UI: Clean, modern interface with dark mode
π³ We STRONGLY recommend using Docker for deployment!
Docker provides:
- β Consistent environment across all platforms
- β Automatic dependency management
- β Isolated wallet service
- β Easy updates and maintenance
- β Better security isolation
π See DOCKER.md for Docker installation and usage instructions.
Manual installation is possible but requires careful setup of Rust, system dependencies, and environment configuration. Docker handles all of this automatically.
nock-dev-wallet/
βββ docker-compose.yml # Docker orchestration
βββ DOCKER.md # Docker deployment guide
βββ backend/ # Flask REST API
β βββ app.py # Main application
β βββ Dockerfile # Backend container config
β βββ txs/ # Transaction files
β βββ wallet_history.json # Transaction history
β βββ .env # Backend configuration
β βββ requirements.txt
βββ frontend/ # Vite + Vanilla JS
β βββ main.js # Main application logic
β βββ index.html # UI structure
β βββ style.css # Tailwind CSS
β βββ Dockerfile # Frontend container config
β βββ .env # Frontend configuration
βββ wallet/ # Nockchain wallet service
β βββ Dockerfile # Wallet container config
β βββ nockchain-wallet # Wallet binary
βββ README.md
βββββββββββββββββββ
β Frontend β (Port 5173)
β Vite + Vanilla β
ββββββββββ¬βββββββββ
β
β HTTP API
βΌ
βββββββββββββββββββ
β Backend β (Port 5007)
β Flask REST API β
ββββββββββ¬βββββββββ
β
β Docker exec
βΌ
βββββββββββββββββββ
β Nockchain Walletβ
β CLI Service β
βββββββββββββββββββ
β
β Shared Volumes
βΌ
ββββββββββββββββ
β Wallet Data β
β Transaction β
β Files β
ββββββββββββββββ
# Clone the repository
git clone https://github.com/yourusername/nock-dev-wallet.git
cd nock-dev-wallet
# Build and start all services
docker-compose up -d
# View logs
docker-compose logs -f
# Access the wallet
# Frontend: http://localhost:5173
# Backend API: http://localhost:5007That's it! See DOCKER.md for detailed Docker instructions.
β οΈ Manual installation is not recommended. Use Docker instead.
If you still want to proceed with manual installation:
- Python 3.8+
- Node.js 16+ and npm
- Rust and Cargo (for building nockchain-wallet)
- nockchain-wallet CLI installed and configured
- Git
sudo apt update
sudo apt install clang llvm-dev libclang-dev make protobuf-compiler
β οΈ Consider using Docker instead - see DOCKER.md
# Install rustup (Rust toolchain installer)
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
# Follow the on-screen instructions, then:
source $HOME/.cargo/envOption 1 : Build from source - Recommended
# Clone the Nockchain repository
git clone https://github.com/zorp-corp/nockchain.git
cd nockchain
# Copy the example environment file
cp .env_example .env
# Install hoonc (Hoon compiler)
make install-hoonc
export PATH="$HOME/.cargo/bin:$PATH"
# Install nockchain-wallet
make install-nockchain-wallet
export PATH="$HOME/.cargo/bin:$PATH"
# Verify installation
nockchain-wallet --helpImportant: Add this line to your ~/.bashrc or ~/.zshrc to make the wallet permanently available:
export PATH="$HOME/.cargo/bin:$PATH"Then reload your shell:
source ~/.bashrc # or source ~/.zshrcOption 2 : Use binary provided in wallet folder
# Clone the Nockchain repository
git clone https://github.com/vectrozz/nock-wallet.git
cd ~/nock-wallet/walletecho 'export PATH="$HOME/nock-wallet/wallet:$PATH"' >> ~/.bashrcsource ~/.bashrc# Navigate back to your projects directory
cd ~ # or wherever you keep your projects
# Clone the wallet web interface
git clone https://github.com/yourusername/nock-dev-wallet.git
cd nock-dev-wallet# Navigate to backend directory
cd backend
# Create Python virtual environment
python3 -m venv nock-env
# Activate virtual environment
source nock-env/bin/activate
# Install dependencies
pip install -r requirements.txt
# Create .env file (optional - uses defaults if not present)
cat > .env << EOF
FLASK_HOST=0.0.0.0
FLASK_PORT=5007
FLASK_DEBUG=True
EOF
# Run the Flask application
python3 app.pyThe backend will start on http://localhost:5007
Open a new terminal (keep the backend running):
# Navigate to frontend directory
cd nock-dev-wallet/frontend
# Install dependencies
npm install
# Create .env file (optional - uses defaults if not present)
cat > .env << EOF
VITE_API_BASE_URL=http://localhost:5007
EOF
# Run the development server
npm run devThe frontend will start on http://localhost:5173 (or another port if 5173 is busy)
- Click "π Update Balance" to fetch your wallet notes
- View total balance and individual notes
- Click on any note to expand and see full details
- Click the "π Transaction History" tab
- View all transactions from your current wallet
- Click any transaction to expand and see full details
- Status badges show transaction state:
- π‘ CREATED: Transaction created but not signed
- π΅ SIGNED: Transaction signed and ready to send
- π’ SENT: Transaction broadcast to network
Use the sort buttons above the notes list:
- Block Height: Sort by blockchain block height
- Amount: Sort by note value
- Click the same button to toggle ascending/descending (arrow direction indicates order)
- Click "πΈ Send Transaction"
- Enter recipient public key
- Enter amount in Nock
- Adjust fee if needed (default: 10 nick)
- Click "Create Transaction"
- Review transaction details
- Click "Sign & Send"
- Check the boxes next to notes you want to use
- Click "πΈ Send Selected"
- The amount field will be pre-filled with (total selected - fee)
- Enter recipient public key
- Click "Create Transaction"
- Review and confirm
- Export Keys: Click "π€ Export Keys" to download a backup
- Import Keys: Click "π₯ Import Keys" and select a
.exportfile
FLASK_HOST=0.0.0.0 # Server host (0.0.0.0 for all interfaces)
FLASK_PORT=5007 # Server port
FLASK_DEBUG=True # Debug mode (set to False in production)
NOCKCHAIN_WALLET_HOST= # Set to service name if using DockerVITE_API_BASE_URL=http://localhost:5007 # Backend API URLNote: If running on a different machine or network, change localhost to your server's IP address (e.g., http://192.168.1.108:5007).
GET /api/balance- Fetch wallet balance and notesGET /api/wallet-info- Get wallet public key and modeGET /api/transaction-history- Get transaction history (filtered by current wallet)POST /api/create-transaction- Create a new transactionPOST /api/sign-transaction- Sign a transactionPOST /api/send-transaction- Broadcast transaction to networkPOST /api/show-transaction- View transaction detailsGET /api/export-keys- Export wallet keysPOST /api/import-keys- Import wallet keys
# Start services
docker-compose up -d
# View logs
docker-compose logs -f backend
docker-compose logs -f frontend
# Rebuild after code changes
docker-compose build backend
docker-compose restart backend
# Stop services
docker-compose downcd backend
source nock-env/bin/activate
python3 app.pyThe Flask app will auto-reload on code changes when FLASK_DEBUG=True.
cd frontend
npm run devVite provides hot module replacement (HMR) for instant updates.
cd frontend
npm run buildThis creates optimized files in the dist/ directory.
- Never commit
.envfiles (they're in.gitignore) - Keep your
keys.exportfiles secure and backed up - Use appropriate fees to ensure transaction priority (default: 10 nick)
- Always verify transaction details before signing
- Store your wallet keys in a secure location
- Use Docker volumes for persistent wallet data
- Transaction history is filtered by wallet address for multi-wallet security
See DOCKER.md troubleshooting section.
# Ensure Cargo bin is in your PATH
export PATH="$HOME/.cargo/bin:$PATH"
# Verify installation
nockchain-wallet --help
# If still not working, reinstall:
cd nockchain
make install-nockchain-wallet- Check if port 5007 is already in use:
lsof -i :5007 - Verify
nockchain-walletCLI is installed and in PATH (manual install) - Check Python virtual environment is activated:
which python3should show the venv path - In Docker mode, ensure wallet container is healthy:
docker-compose ps
- Verify backend is running (check terminal output)
- Check
VITE_API_BASE_URLin frontend.env - Ensure no firewall is blocking the connection
- Check CORS settings if accessing from different domain
- Ensure sufficient balance (amount + fee)
- Verify recipient address is valid (must be a valid Nockchain public key)
- Check selected notes have enough funds
- Verify
nockchain-walletCLI is working:nockchain-wallet list-notes - Check backend logs for detailed error messages
- Check transaction file verification in logs
- History is filtered by current wallet's public key
- If you don't see transactions, verify the wallet address matches
- Import keys may change the active wallet and affect history visibility
- Check
wallet_history.jsonfor raw transaction data
# Ensure all system dependencies are installed
sudo apt update
sudo apt install clang llvm-dev libclang-dev make protobuf-compiler
# Update Rust to latest stable
rustup update stable
# Clean and rebuild
cd nockchain
cargo clean
make install-hoonc
make install-nockchain-wallet- Docker First: Always prefer Docker deployment for easier management
- First Time Setup: After installing nockchain-wallet, initialize it with
nockchain-wallet init - Network Selection: Use
--client privateflag if connecting to a private node - Transaction Fees: Higher fees may result in faster transaction processing
- Multiple Notes: The wallet automatically selects the optimal combination of notes for transactions
- Transaction Verification: The wallet verifies that transaction files are created with the correct hash
- History Tracking: All transactions are logged with status, signer info, and timestamps
- Docker Deployment Guide - START HERE
- Nockchain Repository
- Rust Installation Guide
- Flask Documentation
- Vite Documentation
- Docker Documentation
MIT License - See LICENSE file for details
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
For issues and questions:
- Open an issue on GitHub
- Check existing issues for solutions
- Provide detailed error messages and steps to reproduce
- Include Docker logs if using Docker deployment
Built with β€οΈ for the Nockchain community
π³ Remember: Use Docker for the best experience! See DOCKER.md