Skip to content

syamdanda/blockchainDemo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

42 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

blockchainDemo

Demonstrating simple usecase for blockchain using JavaScript.

Scenario:

      Let's consider there is a Company ABC1 which is having one shared ODC/Room. This room is used by more than 2 companies to deploy their employees to work for ABC1 company.
      Now each vendor requires to request for a seatCode before deploying their employees to work there. This can be demonstrated as a simple blockchain network by using the current application.

APIs:

You can use the below APIs to see the app in action.


Get Blockchain get API
http://localhost:9009/seatCodeChain

Get Available seatcodes get API
http://localhost:9009/availableSeatCodes

Request a seatcode post API
http://localhost:9009/requestSeatCode

you need to send below requestObj
{	
   "companyCode": "COMPANY1",
   "empCode": "EMP1"
}

Mining seatcodes get API
http://localhost:9009/mining

This will confirm the seatcodes and also add few more seatcodes to be available for next requests.

About

Demonstrating simple blockchain using JavaScript

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published