Skip to content

With this system you can interact with a Private Blockchain to submit and retrieve blockchain data

License

Notifications You must be signed in to change notification settings

gtcabral/RestfullPrivateBlockchain

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

RestfullPrivateBlockchain

With this system, you can interact with a Private Blockchain to submit and retrieve blockchain data

Usage

Get Block by id

curl -X GET \
  http://localhost:8000/block/0 \
  -H 'Content-Type: application/x-www-form-urlencoded'

Post Block with a body value

curl -X POST \
  http://localhost:8000/block/ \
  -H 'Content-Type: application/x-www-form-urlencoded' \
  -d 'body=testing%20block'

Architecture

Local server

  1. Node.js - https://nodejs.org/en/
  2. Express - https://expressjs.com/
  3. Crypto-js - https://www.npmjs.com/package/crypto-js
  4. Body-parser - https://www.npmjs.com/package/body-parser
  5. LevelDB - http://leveldb.org/

Getting Started

To set up the project for review do the following:

  1. Download the project or clone the repository --> git clone https://github.com/gtcabral/RestfullPrivateBlockchain
  2. Install node.js (https://nodejs.org/en/download/)
  3. Run command npm install to install the project dependencies.
  4. Run command node app.js in the root directory.

Endpoints

GET Endpoints

Get block by ID

curl -X GET \
  http://localhost:8000/block/0 \
  -H 'Content-Type: application/x-www-form-urlencoded'

POST Endpoints

Post Block with a body value

curl -X POST \
  http://localhost:8000/block/ \
  -H 'Content-Type: application/x-www-form-urlencoded' \
  -d 'body=testing%20block'

About

With this system you can interact with a Private Blockchain to submit and retrieve blockchain data

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published