This code explains the working of Crypto-currency.
The example code is in Python (version 2.7 or higher will work).
- import hashlib
- import flask
A cryptocurrency (or crypto currency) is a digital asset designed to work as a medium of exchange using cryptography to secure the transactions and to control the creation of additional units of the currency. Cryptocurrencies are classified as a subset of digital currencies and are also classified as a subset of alternative currencies and virtual currencies.
For more information, see
- After you have set up the python code, you need to send a POST request of transferring iCoins to someone.
curl "localhost:5000/request_transaction" \
-H "Content-Type: application/json" \
-d '{"from": "Akshay", "to":"Raghav", "amount": 10}'
- Now mine the block for verification by send a GET request.
curl localhost:5000/mine
- You can check all the blocks by sending a GET request.
curl localhost:5000/blocks
To run the code, type python iCoin.py
python iCoin.py