Skip to content

onerkiz/mnemonic-hunter

Repository files navigation

MnemonicHunter

The only web-based Bitcoin mnemonic scanner with a real-time dashboard and Bloom Filter engine.

Generate BIP-39 seed phrases, derive HD wallet addresses (BIP-32/44/84), and check them against 56+ million known funded Bitcoin addresses — all from your browser, running locally on your machine.

No API keys needed. No external calls. Fully offline.

Why This Exists

Every other Bitcoin mnemonic scanner is a CLI tool from 2015. They work, but:

  • No UI — you stare at terminal output
  • No statistics — you don't know your scan rate
  • No persistence — restart and lose everything
  • No Bloom Filter — or if they have one, no web dashboard

MnemonicHunter is the modern alternative: a full-stack web application with real-time WebSocket dashboard, parallel worker threads, SharedArrayBuffer-based Bloom Filter, and SQLite persistence.

How It Works

┌─────────────────────────────────────────────────────┐
│                  MnemonicHunter Engine               │
├─────────────────────────────────────────────────────┤
│                                                      │
│  1. LOAD: 56M+ Bitcoin addresses → Bloom Filter      │
│     ┌──────────────────────────────────────────┐     │
│     │  SharedArrayBuffer (128 MB)               │     │
│     │  13 hash functions (FNV-1a + MurmurHash)  │     │
│     │  False positive rate: 0.01%               │     │
│     └──────────────────────────────────────────┘     │
│                                                      │
│  2. SCAN: Worker threads generate mnemonics          │
│     ┌────────┐ ┌────────┐ ┌────────┐ ┌────────┐     │
│     │Worker 1│ │Worker 2│ │Worker 3│ │Worker N│     │
│     └───┬────┘ └───┬────┘ └───┬────┘ └───┬────┘     │
│         │          │          │          │           │
│         ▼          ▼          ▼          ▼           │
│     BIP-39 Mnemonic → BIP-32 HD Key → Address       │
│                                                      │
│  3. CHECK: Each address against Bloom Filter         │
│     bloom.has(address) → true/false (microseconds)   │
│                                                      │
│  4. MATCH: If Bloom Filter says "maybe yes"          │
│     → Save to SQLite + broadcast via WebSocket       │
│                                                      │
│  5. DASHBOARD: Real-time stats in your browser       │
│     → Speed, total scanned, matches, worker status   │
│                                                      │
└─────────────────────────────────────────────────────┘

Features

Bloom Filter Engine

  • SharedArrayBuffer: All worker threads read the same memory — zero copies, zero IPC overhead
  • 128 MB for 56M addresses with 0.01% false positive rate
  • 13 hash functions (FNV-1a + MurmurHash-inspired double hashing)
  • Streaming file loader — memory-efficient even for massive address lists
  • Supports both Bitcoin and Ethereum address databases

Multi-threaded Scanner

  • 8 parallel worker threads (configurable) using Node.js Worker Threads
  • Three scan modes:
    • Turbo: 1 address per mnemonic (fastest)
    • Balanced: 3 addresses (Legacy + SegWit + P2SH, index 0)
    • Full: 15 addresses (3 types x 5 indices)
  • BIP-39 mnemonic generation with @scure/bip39 (audited cryptography)
  • BIP-32/44/84 HD key derivation with @scure/bip32

Real-time Web Dashboard

  • WebSocket live updates every 500ms
  • Per-worker speed statistics
  • Total mnemonics scanned, addresses checked, matches found
  • Bloom Filter status (loaded count, memory size)
  • Scan mode switching without restart
  • Match history with mnemonic, address, derivation path, WIF

Persistence

  • SQLite via Prisma ORM — matches and counters survive restarts
  • Cumulative statistics across sessions (total lifetime scans)
  • JSONL backup file for matches
  • Counter auto-save every 30 seconds

Cryptography

All crypto operations use audited, production-grade libraries:

Operation Library Standard
Mnemonic generation @scure/bip39 BIP-39
HD key derivation @scure/bip32 BIP-32/44/84
Elliptic curve tiny-secp256k1 secp256k1
Address encoding bs58, bech32 Base58Check, Bech32
Ethereum addresses ethereum-cryptography Keccak-256, EIP-55

Address Types

  • P2PKH (Legacy): addresses starting with 1...
  • P2WPKH (SegWit): addresses starting with bc1q...
  • Ethereum: addresses starting with 0x... (EIP-55 checksum)

Quick Start

Prerequisites

  • Node.js 20+ (or Bun)
  • A Bitcoin address database file (e.g., Bitcoin_addresses_LATEST.txt — one address per line)

Install

git clone https://github.com/onerkiz/mnemonic-hunter.git
cd mnemonic-hunter
npm install
cp .env.example .env
npx prisma db push

Run the Dashboard

npm run dev

Open http://localhost:3000 — the full scanner dashboard with wallet generation, brainwallet tools, and statistics.

Run the Engine (Standalone)

npm run engine:dev

The engine runs independently with 8 worker threads and a WebSocket server on port 3099. Connect any WebSocket client to ws://localhost:3099 for real-time stats.

Configuration

Edit .env:

DATABASE_URL="file:./dev.db"
NUM_WORKERS=8                              # parallel worker threads
WS_PORT=3099                               # WebSocket port for engine
ADDRESSES_FILE=./Bitcoin_addresses_LATEST.txt  # address database

Architecture

src/
├── engine/                  # Standalone scanning engine
│   ├── server.ts            # WebSocket server, worker management, state
│   ├── worker.ts            # Worker thread — mnemonic generation + bloom check
│   ├── bloom.ts             # SharedArrayBuffer Bloom Filter implementation
│   ├── crypto-native.ts     # Optimized wallet derivation functions
│   └── types.ts             # Shared type definitions
│
├── app/                     # Next.js web application
│   ├── page.tsx             # Main scanner dashboard
│   ├── engine/page.tsx      # Engine monitoring page
│   └── api/scanner/         # REST API endpoints
│       ├── generate/        # Wallet generation (offline)
│       ├── batch/           # Batch scanning
│       └── offline/         # Offline database management
│
├── lib/bitcoin/
│   ├── crypto.ts            # BIP-39/32 wallet generation, address encoding
│   ├── ethereum.ts          # Ethereum wallet generation (Keccak-256, EIP-55)
│   └── offline.ts           # Offline address set for quick lookups
│
├── components/ui/           # shadcn/ui component library
└── hooks/                   # React hooks (toast, mobile detection)

Understanding the Bloom Filter

A Bloom Filter is a probabilistic data structure that answers one question: "Is this item in the set?"

  • "No" → The item is definitely not in the set
  • "Yes" → The item is probably in the set (small chance of false positive)

For Bitcoin scanning, this means:

  1. Load 56M known funded addresses into the Bloom Filter (one-time, ~30 seconds)
  2. For each generated address, check bloom.has(address) — this takes microseconds
  3. If the filter says "no" → skip immediately (99.99% of addresses)
  4. If the filter says "yes" → record as a potential match for further verification

Without a Bloom Filter, you'd need to do a Set lookup against 56M entries or make an API call for every address. The Bloom Filter reduces this to a single hash computation in shared memory.

Why SharedArrayBuffer?

Normal ArrayBuffer would require copying 128 MB of data to each worker thread. With SharedArrayBuffer, all 8 workers read the same physical memory — zero copies, zero serialization, zero IPC. This is what makes the multi-threaded architecture practical.

Comparison with Other Tools

Feature MnemonicHunter brainflayer btcrecover Mizogg Tools
Web dashboard Yes No No No
Real-time stats WebSocket No No No
Bloom Filter Yes Yes No Partial
BIP-39 mnemonic Yes No Yes Yes
Brainwallet Yes Yes No Partial
Ethereum support Yes No No No
Multi-threaded Yes No Yes Yes
Persistence (DB) SQLite No No File
One-command install npm install make pip install pip install
Language TypeScript C Python Python

Math: Why This Is Safe to Share

The probability of randomly generating a funded Bitcoin address:

Total possible mnemonics:  2^128 = 340,282,366,920,938,463,463,374,607,431,768,211,456
Known funded addresses:    ~56,000,000
Probability per attempt:   1 in 6,076,470,000,000,000,000,000,000,000,000

At 10,000 mnemonics/second:
Time to find one match:    ~19,000,000,000,000,000,000,000 years
                           (19 sextillion years)
                           (1.4 trillion × age of the universe)

This tool is for education and research — understanding how Bitcoin key derivation, Bloom Filters, and multi-threaded scanning architectures work.

Disclaimer

This project is for educational and research purposes only. It demonstrates:

  • BIP-39/BIP-32 key derivation
  • Bloom Filter data structures
  • Multi-threaded worker architectures
  • Real-time WebSocket dashboards

The mathematics of Bitcoin make brute-force key discovery computationally infeasible. This tool exists to help developers and researchers understand how these systems work, not to compromise them.

Tech Stack

  • Frontend: Next.js 16, React 19, TypeScript, Tailwind CSS, shadcn/ui, Recharts
  • Engine: Node.js Worker Threads, SharedArrayBuffer, WebSocket
  • Database: Prisma ORM + SQLite
  • Crypto: @scure/bip32, @scure/bip39, tiny-secp256k1, ethereum-cryptography
  • UI: Real-time charts, QR code generation, dark theme

License

MIT — see LICENSE.


MnemonicHunter (TR)

Gercek zamanli dashboard ve Bloom Filter motoru ile web tabanli Bitcoin mnemonic tarayici.

BIP-39 seed phrase uret, HD cuzdan adresi turet (BIP-32/44/84), ve 56+ milyon bilinen Bitcoin adresine karsi kontrol et — hepsi tarayicinda, tamamen yerel.

Nasil Calisir

  1. Yukleme: 56M+ Bitcoin adresi Bloom Filter'a yuklenir (SharedArrayBuffer, 128 MB)
  2. Tarama: 8 paralel worker thread mnemonic uretir ve adres turetir
  3. Kontrol: Her adres Bloom Filter'dan gecer — mikrosaniye
  4. Esleme: Filter "evet" derse → SQLite'a kaydet + WebSocket ile dashboard'a bildir
  5. Dashboard: Hiz, toplam taranan, eslesmeler, worker durumu — canli

Kurulum

git clone https://github.com/onerkiz/mnemonic-hunter.git
cd mnemonic-hunter
npm install
cp .env.example .env
npx prisma db push
npm run dev        # Dashboard: http://localhost:3000
npm run engine:dev # Motor: ws://localhost:3099

Ozellikler

  • Bloom Filter: SharedArrayBuffer, 13 hash fonksiyonu, %0.01 false positive
  • 8 Worker Thread: Paralel mnemonic uretim + adres kontrolu
  • 3 Tarama Modu: Turbo (1 adres), Balanced (3 adres), Full (15 adres)
  • WebSocket Dashboard: 500ms'de bir canli guncelleme
  • SQLite Kalicilik: Yeniden baslatmada veri korunur
  • BTC + ETH: Her iki zincir icin adres uretimi

Neden Guvenli

Rastgele bir bakiyeli Bitcoin adresi bulma olasiligi: 1 / 6,076,470,000,000,000,000,000,000,000,000

Saniyede 10.000 mnemonic ile bir esleme bulmak icin gereken sure: 19 sekstilyon yil (evrenin yasinin 1.4 trilyon kati).

Bu arac egitim ve arastirma amaclidir.

About

Web-based Bitcoin mnemonic scanner with real-time dashboard and Bloom Filter engine. BIP-39/32/44/84 key derivation, multi-threaded workers, WebSocket stats, SQLite persistence. Fully offline.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages