Giter VIP home page Giter VIP logo

kachcoin's Introduction

Pitcoin

Simple implementation of bitcoin. Bitcoin: A Peer-to-Peer Electronic Cash System

Getting Started

You need python 3.6.2 and pip 19.0.1 versions

~>> python3 --version
Python 3.6.2
~>> pip --version
pip 19.0.1

Prerequisites

First of all download my project from git repository:

~>> git clone https://github.com/kloffer/Kachkoin.git

Then:

~>> cd Kachkoin

To install all packages you need to run this cash system use:

~>> pip install -r requirements.txt

Using

Okay, now you can use this node. First of all run the rpc server. For communication of two nodes - run initializer.py at both Pictoin_1 and Pitcoin_2

~>> python3 initializer.py

Open a new terminal window and go to the current directory. Launch the command line interface to create you private key:

~>> python3 wallet_cli.py

Use the new command to generate a new private key and public address. Then use privtowif to save your private key in WIF format. This will further allow you to mine.

ScreenShot ScreenShot

Call the send command in wallet cli with two parameters - sender address and amount (Example of bitcoin address - 15Pdb6opS18FSfnQb3KjcbEU9sAwQPxHXN). Then broadcast transaction to the network:

ScreenShot

Okay, now you have two files: public_key and private_key.wif.

Open a new terminal window and go to the current directory. Run miner-cli to start mining.

~>> python3 miner_cli.py

To mine one block use command mine:

ScreenShot

Also you can run script premine.py. In this mode, the following actions occured:

  • Generation of three key pairs, which are saved to the separate file. -Genesis block launching -Using public addresses from generated keys above, mine ten (10) blocks, that -will contain different transactions between these addresses.
~>> python3 premine.py

Routes

/transaction/pendings - return pendings transactions

/chain - return all blockchain in JSON format

/chain/length - return length of blockchain

/block/last - return last block of blockchain in JSON format

/block?height= - return block of given height

/balance?addr=

- return the balance of given address

kachcoin's People

Contributors

ikachko avatar

Stargazers

 avatar

Watchers

 avatar

Forkers

alfathsurya

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.