A service that allows users to claim ownership of their favorite star in the night sky. It is the 4th project for Udacity's Blockchain Nanodegree program.
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.
Installing Node.js and NPM is pretty straightforward using the installer package available from the (Node.js® web site)[https://nodejs.org/en/].
Built with Express.js [https://expressjs.com/]
- Use NPM to initialize your project and create package.json to store project dependencies.
npm init
Note: the entry point is app.js
- Install crypto-js with --save flag to save dependency to our package.json file
npm install crypto-js --save
- Install level with --save flag
npm install level --save
- Install Express.js with --save flag
npm install express --save
- Install hex2ascii with --save flag
npm install hex2ascii --save
- Install bitcoinjs-message with --save flag
npm i bitcoinjs-message --save
- Install bitcoinjs-lib with --save flag
npm i bitcoinjs-lib --save OR npm i --ignore-scripts bitcoinjs-lib --save
To start the server:
node app.js
The sever will run on http://localhost:8000/
Below is an instruction of how to use Postman to test the endpoints:
- Get a block by height
- Get a block by hash
- Get blocks by address
- Register a new star's information in the chain
- Request validation for an address
Step 1) Install Electrum Wallet and copy the receiving address:
Step 2) Go to Postman and paste your receiving address in the body of request and click 'Send'
Step 3) Copy the message
from the JSON output and use Electrum Wallet to sign this message
Step 4) Copy the Signature
, address
, and message
, then paste them into the body of a request to /message-signature/validate
This project is licensed under the MIT License - see the LICENSE file for details
- Udacity Blockchain Nanodegree Program facilitators and mentors
- Express.js documentation