A secure CLI tool to generate paper wallets for multiple cryptocurrencies: Bitcoin, Ethereum, Solana, and Chainlink.
Built with Commander.js - the most popular Node.js CLI framework.
- π 100% Offline - Generate wallets without internet connection
- π― Multi-Currency - Bitcoin, Ethereum, Solana, Chainlink support
- π Plugin Architecture - Easy to add new blockchains
- β‘ Plugin Generator - Scaffold new plugins in 2 minutes with
yarn generate:plugin - π± QR Codes - Scannable QR codes for each address
- π Explorer Links - Direct links to blockchain explorers
- π§ͺ Dry-Run Mode - Test without generating real keys
- π BIP39/BIP44 - Industry-standard HD wallet generation
- π¨ Interactive CLI - Beautiful, user-friendly interface
- π Type-Safe - Full TypeScript support
For Users:
- π¦ Installation - Get started in 30 seconds
- π Usage Guide - Generate your first wallet
β οΈ Security Guide - Essential safety practices- π What Gets Generated - Understand the output
For Developers:
- π Plugin Generator - Add new blockchains (2 min setup!)
- π Plugin Development Guide - Complete API documentation
- ποΈ Plugin Architecture - Technical design patterns
- π€ Contributing Guide - How to contribute
Additional:
- π§ Development Setup - Local development
- π¦ Publishing Guide - npm publishing workflow
- π Additional Resources - Standards & documentation
A paper wallet is a physical document containing your cryptocurrency addresses and private keys, stored completely offline. Think of it as printing out your bank account information, but with cryptographic keys instead.
The name refers to the storage method, not the addresses themselves:
Digital Keys β Written/Printed on Paper β "Paper Wallet"
| Type | Storage | Example | Online? |
|---|---|---|---|
| Hot Wallet | Software, Online | MetaMask, Coinbase | β Yes |
| Hardware Wallet | USB Device | Ledger, Trezor | β No |
| Paper Wallet | Physical Paper | BitPaper output | β No |
- β 100% offline - Immune to hacking
- β No electronics - Can't fail or corrupt
- β Long-term storage - Works for decades
- β No batteries - Unlike hardware wallets
- β Low cost - Just paper and ink
β οΈ Physical damage (fire, water, deterioration)β οΈ Can be lost or stolen (like cash)β οΈ Not convenient for frequent transactionsβ οΈ Must manually type keys when spending
Important: Cryptocurrency addresses are generated using pure mathematics - they don't need to be "registered" on the blockchain!
Traditional Banking:
Bank assigns you account number β Stored in bank database β Now you can receive money
Cryptocurrency:
You generate address with math β No database entry β Can receive crypto immediately
1. Generate Random Number (256 bits of entropy)
β
2. Create Mnemonic Seed Phrase (24 words)
β
3. Derive Keys Using Elliptic Curve Cryptography
β
4. Generate Public Key from Private Key (one-way math)
β
5. Hash Public Key to Create Address (more one-way math)All of this happens locally on your computer. No internet. No blockchain interaction.
The blockchain only knows about your address when:
Before first transaction:
- Your address exists: Only in your wallet
- Blockchain record: None (address is "invisible")
After first transaction:
- Transaction broadcast to network
- Blockchain records: "0.001 BTC sent to YOUR_ADDRESS"
- Now your address appears on blockchain with balance
You sign transaction with private key
β Broadcast to network
β Blockchain verifies signature matches address
β Transaction processed
YES! 100% real. Here's why:
- Mathematically Valid - Generated using the same cryptographic standards as hardware wallets
- Blockchain-Ready - Will be accepted immediately when first used
- Industry Standard Libraries - Uses the same code as MetaMask, Ledger, and Trezor
- Can Hold Real Value - Send real cryptocurrency to them and it will be there
Bitcoin addresses: 2^160 = ~1.4 Γ 10^48 possible addresses
Ethereum addresses: 2^160 = ~1.4 Γ 10^48 possible addresses
Solana addresses: 2^256 = ~1.15 Γ 10^77 possible addresses
For comparison:
- Atoms in human body: ~7 Γ 10^27
- Stars in observable universe: ~10^24
- Grains of sand on Earth: ~7.5 Γ 10^18
There are more Bitcoin addresses than atoms in a million human bodies!
Technically yes, but practically... NEVER.
Probability of collision: ~1 in 10^48
You're more likely to:
β Win the lottery 6 times in a row
β Be struck by lightning 10 times in one day
β Find a specific atom in the universe
To get 50% chance of ONE collision:
- Need to generate: 2^80 addresses (1.2 septillion)
- At 1 billion/second: Would take 38 BILLION years
- Age of universe: 13.8 billion years
Historical evidence:
- Bitcoin launched: 2009
- Addresses generated: Billions+
- Collisions found: ZERO
The cryptographic security of address generation is rock solid! This is why wallets can generate addresses offline without checking if they "already exist."
READ BEFORE USING:
β οΈ Run this tool OFFLINE on a secure, air-gapped computerβ οΈ Never share private keys or seed phrases with anyoneβ οΈ Store paper wallets in a secure physical location (safe, vault)β οΈ Make backup copies and store in separate secure locationsβ οΈ Verify addresses before sending any fundsβ οΈ This tool is for educational/personal use only
npm install -g bitpaper
# or
yarn global add bitpaperThen run from anywhere:
bitpaper generateClone the repository and install dependencies:
git clone <repository-url>
cd bitpaper
yarn install
yarn buildThen use via yarn or link locally:
yarn link
bitpaper generateOr run directly:
node bin/cli.js generatebitpaper generateThis will show an interactive selection menu where you can choose which cryptocurrencies to generate (all are selected by default).
Interactive Example:
? Select cryptocurrencies to generate: (Press <space> to select, <a> to toggle all, <i> to invert selection)
β―β βΏ Bitcoin (BTC)
β β¦ Ethereum (ETH)
β β Solana (SOL)
β π Chainlink (LINK)
# Generate only Bitcoin and Ethereum
bitpaper generate --currencies bitcoin,ethereum
# Generate only Solana
bitpaper generate --currencies solana
# Mix and match
bitpaper generate --currencies bitcoin,solana,chainlinkChoose which address format(s) to display for currencies that support multiple formats (e.g., Bitcoin):
# Show only Legacy (P2PKH) addresses (starts with "1")
bitpaper generate --currencies bitcoin --format legacy
# Show only P2SH-SegWit addresses (starts with "3")
bitpaper generate --currencies bitcoin --format p2sh-segwit
# Show only Native SegWit addresses (starts with "bc1") - Most efficient
bitpaper generate --currencies bitcoin --format native-segwit
# Show all three formats (default)
bitpaper generate --currencies bitcoin --format allπ Format Support by Currency:
| Currency | Multiple Formats? | Notes |
|---|---|---|
| Bitcoin | β Yes | Legacy, P2SH-SegWit, Native SegWit |
| Ethereum | β No | Single format (ERC-20 standard) |
| Solana | β No | Single format (Ed25519 keypair) |
| Chainlink | β No | Uses Ethereum addresses (ERC-20) |
π‘ The --format option only affects currencies with multiple address formats. Other currencies will show a helpful message if --format is used.
Format Comparison:
| Format | Prefix | Fees | Compatibility | Use Case |
|---|---|---|---|---|
| Legacy (P2PKH) | 1 |
Higher | Maximum | Older wallets/exchanges |
| P2SH-SegWit | 3 |
Medium | Good | Backward-compatible SegWit |
| Native SegWit | bc1 |
Lowest | Modern | β Recommended for new users |
π‘ All three formats share the same private key - you can receive Bitcoin at any of them and access the funds with the same private key.
bitpaper generate --dry-runPerfect for:
- β Testing the CLI before real use
- β Seeing the output format
- β Demonstrations and screenshots
- β CI/CD pipeline testing
bitpaper generate --count 5Generate 5 wallet sets at once.
bitpaper generate --output wallets.txtImportant: After printing/backing up, securely delete the file:
shred -vfz -n 10 wallets.txt # Linux/Macbitpaper generate --no-warnings --no-instructionsbitpaper verify "word1 word2 word3 ... word24"Checks if a 24-word mnemonic phrase is valid.
bitpaper info# Generate 3 sets with only Bitcoin and Ethereum, save to file
bitpaper generate --count 3 --currencies bitcoin,ethereum --output wallets.txt
# Bitcoin with only Native SegWit format
bitpaper generate --currencies bitcoin --format native-segwit
# Dry-run with specific currencies
bitpaper generate --dry-run --currencies solana
# Multiple Bitcoin wallets with legacy format only
bitpaper generate --count 5 --currencies bitcoin --format legacy --output legacy-wallets.txt
# Non-interactive with no warnings and specific format
bitpaper generate --currencies bitcoin --format p2sh-segwit --no-warnings --no-instructionsbitpaper --help
bitpaper generate --helpWant to add support for a new blockchain? BitPaper makes it easy!
# Clone the repo
git clone https://github.com/yhauxell/bitpaper.git
cd bitpaper
yarn install
# Generate a new blockchain plugin
yarn generate:pluginThe interactive generator will create all necessary files and register your plugin automatically!
yarn generate:plugin # Generate new blockchain plugin
yarn build # Build the project
yarn dev # Run in development mode- Plugin Generator Guide - Step-by-step scaffolding guide
- Plugin Development Guide - Complete API documentation
- Contributing Guide - Contribution workflow
- Plugin Architecture - Technical design
- β Easy: Plugin generator handles all boilerplate
- β Fast: Create plugin scaffold in under 2 minutes
- β Type-safe: Full TypeScript support with interfaces
- β Documented: Comprehensive guides and examples
- β Impactful: Help users secure their crypto assets
See something missing? Open an issue or submit a PR!
Each wallet set includes:
- A master seed phrase that can recover ALL wallets
- MOST IMPORTANT - Store this securely!
- Can be used to restore wallets in any compatible wallet software
- Multiple Address Formats: Choose the format that works best for your wallet/exchange:
- Legacy (P2PKH): Starts with "1" - Maximum compatibility, higher fees
- P2SH-SegWit: Starts with "3" - SegWit with backward compatibility, medium fees
- Native SegWit (P2WPKH): Starts with "bc1" - β Recommended, lowest fees (~40% lower)
- All addresses are derived from the same private key
- Explorer Link: Direct link to Blockchair (check balance/transactions)
- QR Code: Scannable QR code for easy address sharing
- Private Key: For sending Bitcoin or importing to wallets
- WIF (Wallet Import Format): Alternative private key format
- Public Key: For verification
- Derivation Path:
m/44'/0'/0'/0/0
- Address: For receiving Ethereum
- Explorer Link: Direct link to Etherscan (check balance/transactions)
- QR Code: Scannable QR code for easy address sharing
- Private Key: For sending ETH or importing to MetaMask
- Public Key: For verification
- Works with all ERC-20 tokens
- Derivation Path:
m/44'/60'/0'/0/0
- Address: For receiving LINK tokens
- Explorer Link: Direct link to Etherscan (check balance/transactions)
- QR Code: Scannable QR code for easy address sharing
- Private Key: For sending LINK or importing to wallets
- Note: Uses Ethereum addresses (LINK is an ERC-20 token)
- Derivation Path:
m/44'/60'/0'/0/0
- Address: For receiving Solana
- Explorer Link: Direct link to Solscan (check balance/transactions)
- QR Code: Scannable QR code for easy address sharing
- Private Key: For sending SOL or importing to Phantom/Solflare
- Public Key: For verification
- Use the Address to receive funds
- Share using QR Code - Scan with wallet apps instead of typing manually
- Share the address publicly - it's safe
- Test with a small amount first
Each address includes a scannable QR code that makes receiving funds easier:
Benefits:
- β No typing errors
- β Fast and convenient
- β Works with all major wallet apps
- β Can be scanned from printed paper wallets
How to use:
- Open your wallet app (MetaMask, Phantom, etc.)
- Select "Send" or "Transfer"
- Click "Scan QR Code"
- Point your camera at the QR code on your paper wallet
- Confirm the transaction
For printing:
- QR codes print clearly on paper
- Use high-quality printer for best results
- Test scanning before storing away
You'll need the Private Key:
Bitcoin:
- Import the WIF or private key into any Bitcoin wallet
- Recommended: Bitcoin Core, Electrum, or hardware wallets
Ethereum & Chainlink:
- Import private key into MetaMask, MyEtherWallet, or similar
- For LINK: Add the token contract to your wallet
Solana:
- Import private key into Phantom, Solflare, or similar
- Or use the CLI:
solana-keygen recover
Instead of individual private keys, you can restore ALL wallets using the 24-word mnemonic:
- Bitcoin: Use BIP44 path
m/44'/0'/0'/0/0 - Ethereum: Use BIP44 path
m/44'/60'/0'/0/0 - Solana: Use first 32 bytes of seed
- Disconnect from internet - Run on an offline computer
- Use a clean system - Preferably a live USB OS like Tails
- Verify the code - Review the source before running
- Write down immediately - Have paper and pen ready
- Double-check - Verify you wrote everything correctly
- Don't take photos - Never digitally photograph private keys
- Store securely - Use a fireproof safe or safety deposit box
- Make multiple copies - Store in different secure locations
- Test with small amounts - Verify everything works before large transfers
- Delete digital files - Securely wipe any generated files:
shred -vfz -n 10 wallets.txt
- Use archival paper - Won't degrade over time
- Consider metal - Engrave keys on steel plates for fire/water resistance
- Protect from elements - Keep dry and away from heat/light
- Plan inheritance - Consider how heirs will access (secure instructions)
- β Don't generate wallets on an online computer
- β Don't store private keys in cloud storage
- β Don't take screenshots or photos
- β Don't email private keys to yourself
- β Don't use the same wallet for multiple purposes
- β Don't forget to make backup copies
- β Don't throw away the paper - it's your only access!
Always test with small amounts first:
- Generate a wallet
- Send a small test amount to the address
- Verify you can see the balance
- Try sending the test amount back
- Only then use for larger amounts
- BIP39: Mnemonic phrase generation (24 words, 256-bit entropy)
- BIP32: Hierarchical deterministic wallets
- BIP44: Multi-account hierarchy for deterministic wallets
- Bitcoin:
m/44'/0'/0'/0/0 - Ethereum:
m/44'/60'/0'/0/0
- Bitcoin:
- Bitcoin Address Formats:
- P2PKH: Legacy format (starts with "1")
- P2SH: Pay-to-Script-Hash, used for SegWit compatibility (starts with "3")
- P2WPKH: Native SegWit addresses (starts with "bc1", lowest fees)
- Commander.js: CLI framework (~25M weekly downloads)
- Chalk: Terminal styling
- Ora: Loading spinners
- bip39: Mnemonic generation
- bitcoinjs-lib: Bitcoin wallet generation
- ethers: Ethereum wallet generation
- @solana/web3.js: Solana wallet generation
- Uses Node.js
crypto.randomBytes()for secure random number generation - Requires system entropy for cryptographically secure keys
- Bitcoin: Mainnet (change
BITCOIN_NETWORKin code for testnet) - Ethereum: All EVM-compatible networks
- Solana: Mainnet-beta
- Chainlink: Ethereum mainnet (ERC-20)
yarn buildCompiles TypeScript to JavaScript in the dist/ directory.
yarn dev generate --count 1
# or use ts-node directly
yarn ts-node src/index.ts generatebitpaper/
βββ bin/
β βββ cli.js # Executable entry point
βββ src/
β βββ index.ts # Main CLI logic (Commander.js)
β βββ wallet-generator.ts # Wallet generation functions
β βββ ui.ts # UI/display functions
βββ dist/ # Compiled JavaScript (generated)
βββ package.json
βββ tsconfig.json
βββ LICENSE
βββ .npmignore
βββ README.md
This project uses GitHub Actions to automatically publish to npm when code is merged to main!
Setup (One-time):
- Create npm token at npmjs.com
- Add token as
NPM_TOKENsecret in GitHub repository settings - See GITHUB_SETUP.md for detailed instructions
To Publish a New Version:
# Bump version
yarn version --patch # or --minor, --major
# Push to GitHub
git push --follow-tags
# GitHub Actions will automatically publish to npm! πIf you prefer to publish manually:
Prerequisites:
- Create an npm account: https://www.npmjs.com/signup
- Login to npm:
npm login # or yarn login
Before publishing, make sure:
- β All tests pass (if you have tests)
- β
Build succeeds:
yarn build - β
Package contents are correct:
yarn pack --dry-run - β
Version number is updated in
package.json - β CHANGELOG is updated (if you have one)
- β README is up to date
- β Git repository is clean and pushed
# Build and create a test tarball
yarn pack
# Test installation from the tarball
npm install -g ./yausell-bitpaper-v1.0.0.tgz
# Test the CLI
bitpaper --help
# Uninstall test
npm uninstall -g bitpaperFollow Semantic Versioning:
# Patch release (1.0.0 -> 1.0.1) - bug fixes
yarn version --patch
# Minor release (1.0.0 -> 1.1.0) - new features
yarn version --minor
# Major release (1.0.0 -> 2.0.0) - breaking changes
yarn version --majorFor Public Scoped Package:
npm publish --access public
# or
yarn publish --access publicFor Unscoped Package (if you remove @yausell/ from the name):
npm publish
# or
yarn publish# Check on npm
npm view bitpaper
# Install and test
npm install -g bitpaper
bitpaper --helpWhen you make changes:
- Make your code changes
- Update version:
yarn version --patch(or --minor/--major) - Build:
yarn build - Publish:
yarn publish --access public
-
Use npm tags for pre-releases:
npm publish --tag beta --access public
-
Unpublish within 72 hours if you make a mistake:
npm unpublish bitpaper@1.0.0
-
Deprecate old versions instead of unpublishing:
npm deprecate bitpaper@1.0.0 "Please upgrade to 1.0.1"
BitPaper uses a plugin-based architecture that makes it easy to add support for new blockchains without modifying core files.
- β Self-contained: Each blockchain in its own plugin directory
- β Type-safe: Full TypeScript support with strict interfaces
- β Auto-discovered: Plugins are automatically registered
- β Extensible: Support for lifecycle hooks and custom features
- β No core changes: Add blockchains without touching existing code
Using the Plugin Generator (Recommended):
yarn generate:pluginThis interactive command will:
- β Prompt for blockchain details (name, symbol, icon, explorer URL, etc.)
- β Generate all necessary files with your configuration
- β
Auto-register the plugin in
src/plugins/index.ts - β Provide implementation guidance and next steps
Manual Setup:
-
Copy the plugin template:
cp -r src/plugins/_template src/plugins/cardano
-
Implement the
BlockchainProviderinterface:generateWallet(seed)- Create wallet from BIP39 seedgetExplorerUrl(address)- Return block explorer URLformatWalletInfo(wallet)- Format wallet displayvalidateAddress(address)- Validate address format
-
Register your plugin in
src/plugins/index.ts -
Build and test:
yarn build bitpaper generate --currencies cardano
Quick Start:
- Plugin Generator Guide - Interactive plugin scaffolding tool
- Command reference and usage
- Prompt explanations
- Troubleshooting tips
- Template customization
Complete Development Guide:
- Plugin Development Guide - Full implementation guide
- Complete API documentation
- Step-by-step tutorial with examples
- Best practices and security guidelines
- Testing strategies and workflows
- Advanced features (lifecycle hooks, testnet support)
Technical Documentation:
- Plugin Architecture - System design documentation
- Architecture overview and design patterns
- Core interfaces and components
- Plugin generator implementation
- Migration summary and benefits
Contributing:
- Contributing Guide - Contribution workflow
- Development setup
- Code style and conventions
- Pull request process
- Security guidelines
- Bitcoin (
src/plugins/bitcoin/) - Multi-format support (Legacy P2PKH, P2SH-SegWit, Native SegWit) - Ethereum (
src/plugins/ethereum/) - ERC-20 compatible - Solana (
src/plugins/solana/) - Ed25519 keypairs - Chainlink (
src/plugins/chainlink/) - ERC-20 token
We welcome blockchain integrations! Please ensure:
- β Follows plugin template structure
- β Includes proper error handling
- β Uses well-maintained dependencies
- β Tested thoroughly with dry-run and real generation
- β Documentation for unique features
Submit a PR to add your blockchain to BitPaper! π
- Plugin Generator Guide - Automated plugin scaffolding
- Plugin Development Guide - Complete development documentation
- Contributing Guide - How to contribute to the project
- Plugin Architecture - Technical design and patterns
- Publishing Guide - npm publishing workflow
- BIP39 Specification - Mnemonic code standard
- BIP32 Specification - Hierarchical Deterministic Wallets
- BIP44 Specification - Multi-Account Hierarchy
- SLIP-0044 - Registered coin types
- Bitcoin Paper Wallets - Bitcoin wiki
- Ethereum Private Keys - Ethereum docs
- Solana Key Pairs - Solana documentation
- Commander.js - CLI framework
- Plop - Plugin generator tool
- bitcoinjs-lib - Bitcoin library
- ethers.js - Ethereum library
This tool is provided as-is for educational purposes. Always:
- Test thoroughly before using with real funds
- Understand the risks of self-custody
- Consider hardware wallets for large amounts
- Consult with security professionals for high-value storage
MIT License - Use at your own risk.
Remember: With great power comes great responsibility. You are your own bank! π¦