Giter VIP home page Giter VIP logo

blockchain-in-scala's Introduction

Blockchain in Scala

Travis branch Coveralls github branch

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 APIs

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:

Default hostname and port is localhost:9090.

root

/

blockchain

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

block

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

transaction

GET  /tx-pool/transactions
GET  /tx-pool/transaction/:id
POST /tx-pool/transaction
PUT  /tx-pool/transaction/:id
DEL  /tx-pool/transaction/:id

network

GET  /network
POST /peer
GET  /peers
GET  /peers?names=name1,name2
GET  /peer/:name

generic

POST /generic/to-sha256
POST /generic/to-base64
POST /generic/from-base64
POST /generic/to-epoch-time
POST /generic/time-from-epoch

References

Todos

  • 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.

blockchain-in-scala's People

Contributors

fluency03 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.