Your web service will provide a few new features to your users. The goal is to allow users to notarize document/certification ownership using their blockchain identity.
Express.js
Open a command prompt or shell terminal after install node.js and execute:
npm install
npm test
Run this command:
nodejs index.js
And wait the following message:
Listening on port8000
Method
POST
Endpoint
http://localhost:8000/requestValidation
Parameters
address - A bitcoin address, you can take it from your project1
Example
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)
Example
Method
POST
Endpoint
http://localhost:8000/block
Parameters
address - The addres that you used in last step
cert - Containing the hash of the document (max 500 bytes)
Example
Method
GET
Endpoint
http://localhost:8000/block/:height
Parameters
height - The height of block
Example
Method
GET
Endpoint
http://localhost:8000/cert/address:address
Parameters
address - The address used so far
Example
Method
GET
Endpoint
http://localhost:8000/cert/hash:hash
Parameters
hash - The hash of one block created before
Example