#addresses #address #bitcoin #mine #mining #generate #miner

app bitcoin_address_miner

A utility for generating and mining Bitcoin addresses in Rust

3 releases

0.1.2 Nov 21, 2023
0.1.1 Nov 19, 2023
0.1.0 Nov 19, 2023

#8 in #miner

MIT license

26KB
50 lines

Bitcoin Address Miner

License: MIT Crates.io

Mine Bitcoin Addresses ⛏️🅰️🅱️🅾️

Overview

The Bitcoin Address Miner is a utility written in Rust that generates random BIP-32, Base58 P2PKH Bitcoin addresses and searches for addresses that start with a user-specified sequence of characters.
It utilizes multiple asynchronous threads to mine addresses concurrently.

  • Base58 P2PKH refers to a specific encoding format used in Bitcoin addresses:
  1. Base58 : This is a binary-to-text encoding scheme that is similar to Base64 but avoids using
    easily confused characters (like 0, O, I, and l) to make strings more legible.
    Base58 is commonly used in Bitcoin addresses to represent data in a human-readable format.
  2. P2PKH : This stands for "Pay to Public Key Hash." It is a standard transaction script in Bitcoin that specifies how funds can be spent.
    In a P2PKH transaction, the recipient's address is derived from the hash of their public key.

So, when you combine Base58 encoding with a P2PKH address, you get a format that looks like a string of characters, such as 1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa.
This is the well-known address associated with the first-ever Bitcoin transaction.

Scope

The Bitcoin Address Miner is designed for individuals interested in exploring Bitcoin address generation and conducting experiments related to address matching. Potential use cases include:

  • Educational Purposes: Learn about Bitcoin address generation, key pairs, and the structure of Bitcoin addresses.

  • Security Research: Test the robustness of address generation algorithms and study patterns in address creation.

  • Address Customization: Find Bitcoin addresses that start with specific characters for custom address creation.

Features

  • Generates random Bitcoin addresses.
  • Searches for addresses starting with a user-defined sequence of characters.
  • Utilizes multiple asynchronous threads for concurrent mining.
  • Prints matching addresses along with associated private and public keys.
  • Calculates and displays the elapsed time for each successful address mining.

Prerequisites

How to Use

  1. Clone the repository:
git clone https://github.com/r3drun3/bitcoin-address-miner
  1. Navigate to the project directory:
cd bitcoin-address-miner
  1. Build and run the program:
cargo build --release
cargo run
  1. Enter the starting letters for the address when prompted.
  2. The program will run multiple threads to mine addresses concurrently.
    Once a matching address is found, the program will display the address, private key, public key, and the elapsed time.

Example:

[BITCOIN KEY/ADDRESS MINING] 
 Enter the starting letters for the address: 
JoKe

 Starting mining...this may take many minutes (or even days) to complete
Found matching address: 1JoKesTr2vDhVaayJGwifva8hA9JaRKtFJ
Private Key: AF5E88FCC60EA189ADADCC694082CCC76066E096ADE33812B5A9914DA6C6FC73
Public Key: 023de08a1c546e14b87b62f26dee68f13894403c66b3878288eabed772abdda63d
Elapsed Time: 15.50 minutes

License

This utility is open-source and released under the MIT License

Dependencies

~9–16MB
~149K SLoC