A web-based terminal for BIP47 Auth47 authentication protocol. This application allows users to authenticate their BIP47 payment codes using QR codes and wallet signatures.
- 🖥️ Terminal-style web interface
- 🔐 BIP47 Auth47 protocol implementation
- 📱 QR code generation for wallet scanning
- ⚡ Real-time authentication status
- 🚀 Ready for Railway deployment
- Install dependencies:
npm install- Start the server:
npm start- Open your browser:
http://localhost:3000
- Railway account
- Railway CLI installed (
npm install -g @railway/cli) - Git repository
- Login to Railway:
railway login- Initialize Railway project:
railway init- Set environment variables:
# Set your callback URL (Railway will provide this after first deploy)
railway variables set CALLBACK_URL=https://your-app-name.railway.app/callback
# Set production environment
railway variables set NODE_ENV=production- Deploy:
railway up- Get your Railway URL:
railway domain- Update CALLBACK_URL with your actual Railway URL:
railway variables set CALLBACK_URL=https://your-actual-app-name.railway.app/callback
railway up| Variable | Description | Default | Required |
|---|---|---|---|
PORT |
Server port | 3000 | No (Railway sets this) |
CALLBACK_URL |
Auth47 callback URL | http://localhost:3000/callback |
Yes (for production) |
NODE_ENV |
Environment | development | No |
- Generate Challenge: Click "Generate Auth QR Code" to create a new authentication challenge
- Scan with Wallet: Use Samourai Wallet or compatible BIP47 wallet to scan the QR code
- Automatic Verification: The app polls for verification status and displays results
- View Results: See the verified payment code and authentication status
GET /- Frontend interfaceGET /start-auth- Generate new authentication challengeGET /check-auth/:nonce- Check authentication status (polling)POST /verify- Verify wallet signature (called by wallet)GET /callback- Callback page for wallet redirectGET /health- Health check endpoint
bip47-terminal/
├── public/
│ ├── index.html # Main frontend interface
│ └── callback.html # Wallet callback page
├── server.js # Express server with BIP47 logic
├── package.json # Dependencies and scripts
├── railway.json # Railway deployment configuration
└── README.md # This file
- express - Web server framework
- cors - Cross-origin resource sharing
- @bitcoinerlab/secp256k1 - Bitcoin cryptography
- @samouraiwallet/bip47 - BIP47 payment code implementation
- @samouraiwallet/auth47 - Auth47 protocol utilities
- qrcode - QR code generation
- Authentication challenges expire after 5 minutes
- Each nonce can only be used once
- Signatures are verified using BIP47 notification keys
- All sensitive operations are server-side
-
"Invalid or expired nonce"
- The QR code may have expired (5-minute timeout)
- Try generating a new QR code
-
"Invalid signature"
- Ensure you're using a compatible BIP47 wallet
- Check that the wallet supports Auth47 protocol
-
Deployment issues
- Verify CALLBACK_URL is set correctly in Railway
- Check Railway logs for errors
# View logs
railway logs
# Check environment variables
railway variables list
# Restart service
railway restart- Fork the repository
- Create a feature branch
- Make your changes
- Test locally
- Deploy to Railway for testing
- Submit a pull request
MIT License - see LICENSE file for details
For issues with:
- BIP47 Protocol: Check Samourai Wallet documentation
- Railway Deployment: See Railway docs
- This Application: Create an issue in the repository