Giter Site home page Giter Site logo

blockchain-dev-tools's Introduction

blockchain-dev-tools

Blockchain Development Tools

Installation

virtualenv blockchain && cd blockchain
git clone https://github.com/chrisbagsrocks/blockchain-dev-tools.git && cd blockchain-dev-tools
./INSTALL.sh
cd ..
source bin/activate
pip install ecdsa

Alternatively, copy all of the *.py files except blockchain_fundamentals.py into the python bin folder, and the blockchain_fundamentals.py file into the python lib folder.

bits.py

Convert bits to and from compact or extended format

You must define "COIN" with two commands, COIN=examplecoin and export COIN

Then you can run:

./bits.py

usage: bits.py [-h] [-c] value

Example
./bits.py -c 0x1e0ffff0 
coming soon
./bits.py 486604799
bits value must be 4 bytes

bs58.py

distribution.py

hash160.py

hash256.py

msgprefixgen.py

Generates pchMessageStart prefixes

You must define "COIN" with two commands, COIN=examplecoin and export COIN

Then you can run:

./msgprefixgen.py

Example

./msgprefixgen.py
Mainnet
pchMessageStart[0] = 0x84;
pchMessageStart[1] = 0xde;
pchMessageStart[2] = 0xab;
pchMessageStart[3] = 0xd5;

Testnet
pchMessageStart[0] = 0xb0;
pchMessageStart[1] = 0xd1;
pchMessageStart[2] = 0xb6;
pchMessageStart[3] = 0xc8;

Regtest
pchMessageStart[0] = 0xcf;
pchMessageStart[1] = 0xbe;
pchMessageStart[2] = 0xc1;
pchMessageStart[3] = 0xab;

p2pkh.py

p2shp2wpkh.py

pubkey.py

Generate a Private and Public Key

First you need to generate a Private key and use that to generate a Public key. You can use many programs to do this, just make sure you are not using an online generator. That may put your project at risk if they log the private keys. Use something local, you can run the command:

openssl rand -hex 32 

which will output a secure 32-bit private key, which can be used to generate a public key :

with command ./pubkey.py -u YOUR PRIVATE KEY

You must define "COIN" with two commands, COIN=examplecoin and export COIN

reverse_endian.py

ripemd160.py

sha256.py

test.py

wif.py

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.