Skip to content

boatx/lamechain

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

53 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

lamechain

Naive block chain implementation in Python.

Inspired by

Usage

To create initial database in file chain.db with genesis block call:

python main.py init --file chain.db

To call operations on chain start local http server. To start server on address http://localhost:8888 call:

python main.py run --port 8888

To create new block:

curl --data 'data=Test' http://localhost:8888/blocks

Endpoints

Name Method Parameters Description
/blocks GET List blocks in chain
/blocks POST data -- data to use in blockchain Mine new block with test data

Requirements

  • python => 3.6