Easy Blockchain implementation for JavaScript apps.
To install the stable version:
npm install --save chainpro
This assumes you are using npm as your package manager.
If you don't, you can access these files on unpkg, download them, or point your package manager to them.
Set up two connected nodes:
HTTP_PORT=3001 P2P_PORT=6001 npm run dev
HTTP_PORT=3002 P2P_PORT=6002 P2P_PEERS=ws://localhost:6001 npm run dev
GET: /chain
- return current chain of your application.POST: /mine --data {"data": "Some block data"}
- create new block into the chain.GET: /peers
- return current peer list of your application.POST: /connect --data {"peer" : "ws://localhost:6002"}
- add peer to you application.
To get more details check the post on Medium.
This project adheres to Semantic Versioning. Every release is documented on the GitHub Releases page.
MIT