Skip to content

jibo-zz/blockchain_notary_service

Repository files navigation

Project Title

Privete Blockchain RESTful API with Node.js Framework.

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites

# LevelDB
# Crypto.js
# Express.js
# Body-parser
# compression

Getting started

Open a command prompt or shell terminal after install node.js and execute:

npm install

Testing

npm api.js

Endpoint description

1. Blockchain ID validation request

Method

POST

Endpoint

http://localhost:8000/requestValidation

Parameters

address - A bitcoin address, you can take it from your project1

Method

POST

Endpoint

http://localhost:8000/message-signature/validate

Parameters

address - The addres that you used in last step
signature - You can take it from the Electrum wallet (see below) or make it by code (see test/index.test.js)

Method

POST

Endpoint

http://localhost:8000/block

Parameters

address - The addres that you used in last step
star - Containing dec, ra and story (max 500 bytes)

Method

GET

Endpoint

http://localhost:8000/block/:height

Parameters

height - The height of block

Method

GET

Endpoint

http://localhost:8000/stars/address:address

Parameters

address - The address used so far

Method

GET

Endpoint

http://localhost:8000/stars/hash:hash

Parameters

hash - The hash of one block created before

Authors

Mohamed Omar

License

This project is licensed under the MIT License - see the LICENSE.md file for details

Acknowledgments

  • Hat tip to anyone whose code was used
  • Inspiration
  • etc

About

Build a Private Blockchain Notary Service

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published