alewerner / tgsi_coin

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Build status

Project overview

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.

Project specification


Framework used

Express.js

Getting started

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

npm install

Testing

npm test

Running the project

Run this command:

nodejs  index.js

And wait the following message:

Listening on port8000

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

Example

2. Blockchain ID message signature validation

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

3. Certification registration

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

4. Get block by height

Method

GET

Endpoint

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

Parameters

height - The height of block

Example

6. Get block by address

Method

GET

Endpoint

http://localhost:8000/cert/address:address

Parameters

address - The address used so far

Example

5. Get block by hash

Method

GET

Endpoint

http://localhost:8000/cert/hash:hash

Parameters

hash - The hash of one block created before

Example

About


Languages

Language:JavaScript 100.0%