Giter VIP home page Giter VIP logo

py-vanitycash's Introduction

py-vanitycash

Python generator for vanity addresses for Bitcoin Cash (BCH)

How to generate vanity addresses

The address is generated as a "cashaddress" e.g. bitcoincash:qqqqqqq5y7z5p7k442mhjzge974qqdwd6v6yvzvzls
The first qqqqqqs are chosen when running the program:

python main.py -s qqqqqq -p 0

Installation (requires Python3)

pip install -r requirements.txt
python main.py

Multithreading

For now, just run multiple instances according to number of cores

Requirements

We thankfully use the following external libraries:

Performance

The program is not super fast since it has to derive a pubkey from a privkey and check the cashaddr against your search pattern.
Vanitygen does about 60 times better than the python program.

Corei5-4300U:

  • Pure python per CPU core -> ~10 H/s
  • C-implementation per CPU core -> ~5 kH/s

Accelerate with C library

The pubkey generation can be greatly accelerated if a C implementation is used. We support libbtc. To use use it

  • compile libbtc with CLI
  • set environtment variable
    • export libbtcpath="PATHTOLIBBTC"
    • export LD_LIBRARY_PATH=$libbtcpath/.libs:$LD_LIBRARY_PATH
  • now we need to compile a small wrapper around libbtc so python can use it with ctypes. In py-vanitycash gcc -shared -fPIC -std=gnu99 wraplibbtc.c -I $libbtcpath/include/ -o wrappedlibbtc.so -L $libbtcpath/.libs/ -lbtc
  • Run the main program with the -l or --uselibbtc option

py-vanitycash's People

Contributors

cbaus avatar mauhcs avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

py-vanitycash's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.