Skip to content

justmoo/PrivateBlockchain-Notary-Service

Repository files navigation

Project 4: Build a Private Blockchain Notary Service

this is the 4th project BND from udacity

how to setup

1- Download the project or clone it.
2- Run command npm install to install the project dependencies.
3-Run command node app.js in the root directory.

Testing the project

  • after running the command node app.js you can go to localhost:8000/requestValidation and send your address , it should be a json obejct

{ "address":"1LNkG4AW6KEMA1xS987ah1jJaQimxcJe5m" }
- Then you will receive a message, sign the message using electrum and send the signature to localhost:8000/message-signature/validate the message should be like this
{ "address": "1LNkG4AW6KEMA1xS987ah1jJaQimxcJe5m", "signature": "H6/IJIWciBCVGiq+bDB5vk0m3M59n0o0Tc/pvoonTpP5c3jA1VOkjm6KWT2bCVWMoozu6kzlCK6mLpYGK54bMgw="

}

  • If the signature is valid it's gonna grant permission to add one block.

  • To add blocks to the blockchain you need to use POSTMAN or an alternative and POST to localhost:8000/block the formatting should be like this :
    { "address": "19xaiMqayaNrn3x7AjV5cU4Mk5f5prRVpL", "star": { "dec": "68° 52' 56.9", "ra": "16h 29m 1.0s", "story": "Found star using https://www.google.com/sky/" } }

  • To check all the blocks in the blockchain use localhost:8000/blocks

  • To check a certain block hash you can go to localhost:8000/stars/hash:[HASH]


for example : localhost:8000/stars/hash:dc0664f75de590b566aaa1f3ae10968540b1592794a2d2089788df4ad0821fa7
- To check a certain wallet address you can go to localhost:8000/stars/address:[ADDRESS]
for example : localhost:8000/stars/address:1LNkG4AW6KEMA1xS987ah1jJaQimxcJe5m

About

a blockchain that register stars with validation

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published