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.github.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
Default hostname and port is localhost:9090
.
/
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 /block-pool/blocks
GET /block-pool/block/:hash
POST /block-pool/block
POST /block-pool/next-block
DEL /block-pool/block/:hash
GET /block-pool/block/:hash/transaction/:id
GET /tx-pool/transactions
GET /tx-pool/transaction/:id
POST /tx-pool/transaction
PUT /tx-pool/transaction/:id
DEL /tx-pool/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
- Bitcoin White Paper
- bitcoin.org
- Mastering Bitcoin: Unlocking Digital Crypto-Currencies, Andreas M. Antonopoulos
- 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.