A simplified Blockchain implementation in Scala based on the specifications of Bitcoin.
This project is still under development. APIs are not fully completed according to the cores.
Inspired by:
This project is meant to learn and understand Bitcoin and Blockchain. I personally also in the process of learning. So, what's a better the approach of learning it by building one ! Because of this is a continuous learning process, there might be something I do not understand earlier. Now when I understand it, the code will also be changed according. I am happy to discuss with you, which will make this learning process quicker and efficient.
Start the service, run this Class:
com.fluency03.blockchain.api.Server
REST API service is built on the open source projects akka and akka-http.
Please see the full API Documentation on Postman: blockchain-in-scala
Summary:
/
GET /blockchain
POST /blockchain
DEL /blockchain
GET /blockchain/validity
GET /blockchain/last-block
DEL /blockchain/last-block
POST /blockchain/new-block
POST /blockchain/next-block
GET /blockchain/block/:hash
GET /blockchain/block/:hash/transaction/:id
GET /blocks
GET /block/:hash
POST /block
DEL /block/:hash
GET /block/:hash/transaction/:id
GET /transactions
GET /transaction/:id
POST /transaction
PUT /transaction/:id
DEL /transaction/:id
GET /network
POST /peer
GET /peers
GET /peers?names=name1,name2
GET /peer/:name
POST /generic/to-sha256
POST /generic/to-base64
POST /generic/from-base64
POST /generic/to-epoch-time
POST /generic/time-from-epoch
- Complete APIs' Todos
- API tests
- Make states in actor persistent (using Akka Persistent)
- Concurrent collections?
- Make data distributed within cluster of peer (using Akka Cluster)
- Block propagation among peers
- etc.