Privete Blockchain RESTful API with Node.js Framework.
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.
# LevelDB
# Crypto.js
# Express.js
# Body-parser
# compression
Open a command prompt or shell terminal after install node.js and execute:
npm install
npm api.js
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
Mohamed Omar
This project is licensed under the MIT License - see the LICENSE.md file for details
- Hat tip to anyone whose code was used
- Inspiration
- etc