A python implementation of naivecoin. Uses python-p2p-network for the p2p server. WIP; Made for fun :) .
- Flask
pip install flask
- p2pnetwork
pip install p2pnetwork
python3 main.py
/blocks
- Returns a list of every block mined so far. - GET/mine_block
- Adds a block to the blockchain. - POST
Name | Content |
---|---|
data | < data : str > |
/peers
- Returns a list of every peer connected to this node. - GET/add_peer
- Connects with peer; receives host and port of peer as body. - POST
Name | Content |
---|---|
host | < host : str > |
port | < port : int > |