A simple blockchain framework that allows mining, adding new transactions and viewing the chain
Please install the following packages in comand prompt to begin:
- flask
python pip install Flask==0.12.2
- requests
python pip install requests==2.18.4
I used 4 endpoints:
- Create a new transaction to a block
/transactions/new
- Mine a new block
/mine
- Return the full Blockchain
You can use cURL or Postman to interact with the API over a network (I use Postman)
/chain
See below for example requests:
- When sending data to the server send in JSON format something like this:
{ "sender": "d4ee26eee15148ee92c6cd394edd974e", "recipient": "address-2", "amount": 100 }
After this using two nodes (created manually using different ports or using different machines) you can use the below as a get method:
/nodes/resolveIf one node has a chain that is longer, the shorter chain will get replaced by the Conensus Algorithm
- Connect on LinkedIn: Benjamin Holmes
- Project Link: https://github.com/holmesbenjamin/Blockchain-Framework


