fportantier / minichain

A really small and simple python implementation to teach and learn about blockchain.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

minichain

A really small and simple python implementation to teach and learn about blockchain.

  • blockchain.py: Contains the Blockchain class
  • web.py: Web API (Flask)
  • cmd_block_new: Creates a new block
  • cmd_block_get: Obtains a block by the index
  • cmd_chain_get: Obtains the whole chain

API Endpoints

|----------------------------------------------------| | Method Path Function | |------ ------------- ---------------------------| | GET / Show status | | GET /chain Returns the whole chain | | POST /block Creates a new block | | GET /block/last Returns the last block | | GET /block/ Returns a block by index |

GET /validate Validates the whole chain

About

A really small and simple python implementation to teach and learn about blockchain.

License:GNU General Public License v3.0


Languages

Language:Python 100.0%