A very minimal implementation of a blockchain in Python. Please note that this is by no means intended to be use in a real scenario, the code used here is for educational purposes only.
- Possibility to add blocks to the chain
- Simple Proof of Work (PoW) algorithm
- Possibility to add transactions
- Possibility to mine new blocks
- Possibility to replace the chain with a new one
- Wallet management
- Sign transactions
- Peer to Peer communication
-
Check out the code
-
Install requirements
pipenv install
-
Start the server with:
pipenv run python -m flask run
-
Visit http://localhost/apidocs
The code is covered by tests, to run the tests please execute
pipenv run python -m unittest