Skip to content

0x414854/Mnemonic_To_Wallet

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

6 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Static Badge Static Badge Static Badge

Mnemonic To Wallet

πŸ“œ Project Description

This project is a cryptographic wallet generator that creates secure mnemonics, derives cryptographic keys, and generates Bitcoin addresses. It ensures compliance with standards such as BIP-39 (mnemonics) and BIP-32 (HD wallets).
All generated data, including mnemonics, private keys, chain codes, and addresses, are securely stored in a SQLite database.

πŸ“š Table of Contents

✨ Features

  • 🎲 Custom Mnemonic Length Generation
    Generate mnemonics of various lengths (12 and 24 words).

  • πŸ”‘ Derive a secure seed from the mnemonic using a passphrase.

  • πŸ› οΈ Generate master private keys and chain codes based on BIP-32.

  • 🧠 Generate Bitcoin legacy addresses.

  • πŸ—„οΈ Save wallet information in a SQLite database
    mnemonic, seed, private key, chain code, and address.

  • ⚠️ Avoid duplicate mnemonics and addresses in the database.

  • πŸ“‘ Real-Time Display

  • πŸ“– Extensive logging for transparency and debugging.

  • πŸ“₯ Result Recording
    Automatic saving of found mnemonic, private key and wallet addresses.

πŸ› οΈ Prerequisites

  • Python 3.11

  • Required Python libraries (see Installation)

    • binascii
    • ecdsa
    • hashlib
    • hmac
    • python-dotenv
    • shadePy
    • tqdm

Installation

Make sure you have Python installed on your system before running the install command.

  1. Clone this repository

    git clone https://github.com/0x414854/Mnemonic_To_Wallet.git
    cd Mnemonic_To_Wallet
    
  2. Install dependencies

    pip install -r requirements.txt
  3. Create a .env file to define your environment variables

    BIP39_FILE = 'path/to/utils/bip39_words.txt'
    ALL_LEGACY_BTC_DB_WALLET_FILE = 'path/to/utils/legacy_btc_wallets.db' # This file contains all current Bitcoin legacy addresses (as of 01/07/2025)
    WALLETS_DB_FILE = 'path/to/utils/wallets.db'
    LOG_FILE = 'path/to/BTC_finder.log'
    RESULT_FILE = 'path/to/result_file.txt'
  4. Place your BIP-39 wordlist file (bip39_words.txt) in the specified path. You can obtain the file from here.

▢️ Usage

  • Run the script to generate wallet

    python3 mnemonicToWallet.py

The program will :

  • Generate a unique mnemonic
  • Derive the seed, master private key, and chain code
  • Generate the associated Bitcoin Legacy address
  • Save wallet information to the database and optionally a results file

πŸ” Security and Ethics

  • Educational Use Only
    This script is developed solely for educational and research purposes. It is not intended for use in any real-world financial or production environment.
  • No Responsibility
    The authors and contributors of this project disclaim all responsibility for any misuse or unintended consequences resulting from its use. Users are fully responsible for any actions performed using this script.
  • Do Not Use for Real Funds
    The wallets generated by this program are not secure and must never be used to store or manage actual cryptocurrency assets. Always rely on trusted and secure wallet solutions for real funds.
  • Sensitive Data Handling
    This program interacts with highly sensitive information, such as private keys and mnemonics. Users must take strict measures to ensure that such data is handled securely and is not exposed to unauthorized parties.
  • Ethical Use
    By using this script, you agree to act ethically and in compliance with all applicable laws and regulations. This includes avoiding unauthorized access to any systems or wallets that do not belong to you.

By proceeding with this project, you acknowledge that it is your responsibility to ensure its proper use, and that you accept all risks associated with handling sensitive cryptographic information.

Benchmarks

Here are the benchmark results for different functions, measured over various iterations :

Function Iterations Time (s)
GetUniqueMnemonic 1000 0.0045
GetUniqueMnemonic 5000 0.0312
GetUniqueMnemonic 10000 0.0452
GetUniqueMnemonic 20000 0.0828
GetUniqueMnemonic 50000 0.2086
GetUniqueMnemonic 100000 0.4129
---------------------------------- ------------ ------------------
mnemonic_to_seed 1000 0.9609
mnemonic_to_seed 5000 4.8118
mnemonic_to_seed 10000 9.5740
mnemonic_to_seed 20000 19.0043
mnemonic_to_seed 50000 47.5089
mnemonic_to_seed 100000 95.4491
---------------------------------- ------------ ------------------
seed_to_master_key 1000 0.0022
seed_to_master_key 5000 0.0111
seed_to_master_key 10000 0.0219
seed_to_master_key 20000 0.0434
seed_to_master_key 50000 0.1071
seed_to_master_key 100000 0.2126
---------------------------------- ------------ ------------------
generate_address_from_private_key 1000 0.4897
generate_address_from_private_key 5000 2.4067
generate_address_from_private_key 10000 4.8297
generate_address_from_private_key 20000 9.6731
generate_address_from_private_key 50000 24.3712
generate_address_from_private_key 100000 49.0640

Notes

  • Times are measured in seconds (s) and correspond to the total time taken for each number of iterations.
  • The benchmarks were conducted using the benchmarks.py script with the timeit module.
  • These results may vary depending on the performance of the machine used.

Instructions to Update Benchmarks

  • Run the benchmark script

    python3 tests/benchmarks.py

πŸ›£οΈ Roadmap

  • Add Segwit Address (P2WPKH) & SegWit Wrapped (P2SH-P2WPKH)
  • Add other chains
    • ETH
    • SOL
  • Update README automatically with benchmark results
  • βœ… Add a check on the generated address against all the addresses
  • βœ… Add Logging
  • βœ… Benchmark performance metrics
  • βœ… Create README
  • βœ… Ensure 'GetUniqueMnemonic()' skips mnemonics already in 'wallets.db' to avoid duplicates
  • βœ… Generate mnemonics of various lengths (12 - 24)
  • βœ… Implement tests
  • βœ… Save all information in the DB (sqlite)

🌳 Tree Directory

.
β”œβ”€β”€ (.env)
β”œβ”€β”€ .gitignore
β”œβ”€β”€ LICENSE
β”œβ”€β”€ (Found.txt)
β”œβ”€β”€ mnemonicToWallet.py
β”œβ”€β”€ README.md
β”œβ”€β”€ requirements.txt
β”œβ”€β”€ πŸ“ logs/
    └── BTC_Finder.log
└── πŸ“ utils/
Β Β Β Β  β”œβ”€β”€ (1_addresses.db)
Β Β Β Β  β”œβ”€β”€ (wallets.db)
Β Β Β Β  └── wordsBIP39.txt

🀝 Contributions

Contributions are welcome ! Feel free to open issues or submit pull requests.

πŸ’– Support the Project

⭐ Giving it a star on GitHub ⭐

Your support makes a huge difference ! This project is maintained with the energy, time, and passion of its contributors.
If you enjoy this project or want to help sustain its development, consider making a donation.

Why Donate ? 🫢

  • Help cover development and hardware costs.
  • Contribute to new features and improvements.
  • Support an open-source project to keep it free and accessible to everyone.
  • Enable the purchase of better hardware to create a computational pool for solving bitcoin puzzles.

Cryptocurrency Wallets πŸͺ™

You can donate using the following cryptocurrency addresses:

  • Bitcoin (BTC) : bc1q6n3ufauzjqgxztkklj3734cp0f7evqq3djh4ne
  • Ethereum (ETH) : 0x24800123e8D51F1d596c6Abe4B5DB5A10837Fe8e
  • Bittensor (TAO) : 5CrG7bKratZVocnxj66FF23AMVvqKHf7RSHfz49csEtJ2CuG
  • Dogecoin (DOGE) : DJQnasX39Unat3vkmyBMgp4H6Kfd4wFumF
  • Solana (SOL) : Gj9JkpFqdSabag8RiiNTmLaCiZrcxYa6pc4y599vft15

USDT (Tether)

  • Binance Smart Chain (BEP-20) : 0x24800123e8D51F1d596c6Abe4B5DB5A10837Fe8e
  • Ethereum (ERC-20) : 0x24800123e8D51F1d596c6Abe4B5DB5A10837Fe8e
  • Tron (TRC-20) : THHcEQ8zG3ZnUXoHdBmCdpZ3AAqhoDbMpW
  • Solana (SPL) : Gj9JkpFqdSabag8RiiNTmLaCiZrcxYa6pc4y599vft15

USDC (USD Coin)

  • Binance Smart Chain (BEP-20): 0x24800123e8D51F1d596c6Abe4B5DB5A10837Fe8e
  • Ethereum (ERC-20): 0x24800123e8D51F1d596c6Abe4B5DB5A10837Fe8e
  • Solana (SPL): Gj9JkpFqdSabag8RiiNTmLaCiZrcxYa6pc4y599vft15

πŸ’¬ A Big Thank You

Thank you so much for your generosity. Your support truly means the world to us and motivates us to keep improving this project. πŸ™

➑️ Take action now ! Every contribution, big or small, makes a huge impact.

πŸ“„ License

This project is licensed under the MIT License.

πŸ‘€ Author

0x414854

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages