Code Monkey home page Code Monkey logo

blockchain's Introduction

Blockchain

First Cryptocurrency

This project is implemented to explore the basic concept of blockchain and cryptocurrency.I have created the 'needcoin' cryptocurrency using blockchain. It is very basic implementation where I explore the concept of :

  1. Blockchain

  2. Transactions

  3. Consensus

  4. Proof of work

  5. Decentralized the app

Project cointains 4 files that needs to be run as python program , it will run as a flask application on port 5000,5001,5002,5003

  1. User can call follwoing url to connect the nodes to the blockchain network

Request Url : http://127.0.0.1:5003/connect_node

Request Type : POST

Request Example: { "nodes": ["http://127.0.0.1:5000", "http://127.0.0.1:5001", "http://127.0.0.1:5002", "http://127.0.0.1:5003"]

}

  1. User can get the existing blockchain on the node through the url:

node_port :[5000,5001,5002,5003]

Request Url : http://127.0.0.1:{{node_port}}/get_chain

Request Type : GET

3)User can apply the consensus on the node by hitting the following url:

node_port :[5000,5001,5002,5003]

Request Url : http://127.0.0.1:{{node}}/replace_chain

Request Type : GET

  1. User can add the transaction by hitting the url on any node :

Request Url : http://127.0.0.1:{{node_port}}/add_transaction

Request Type : POST

Request Example: { "sender": "Mr A", "receiver": "Mr B", "amount": "10" }

  1. User can mine the block by hitting the url:

Request Url : http://127.0.0.1:{{node_port}}/mine_block

Request Type : POST

blockchain's People

Contributors

deekshanee avatar

Watchers

James Cloos avatar  avatar

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.