0.1.0 • Published 7 years ago

chainpro v0.1.0

Weekly downloads
6
License
MIT
Repository
github
Last release
7 years ago

Chainpro

Easy Blockchain implementation for JavaScript apps.

Build Status NPM Version NPM Downloads

Installation

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.

Quick Start

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

HTTP API

  • 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: /mine --data {"peer" : "ws://localhost:6002"} - add peer to you application.

Architecture

Architecture

To get more details check the post on Medium (WIP).

Change Log

This project adheres to Semantic Versioning. Every release is documented on the GitHub Releases page.

License

MIT