Code Monkey home page Code Monkey logo

blockchain_p4's Introduction

How to run

npm install

Start Server by running

node server.js
Hapi is used for a server

End Point

User Registeration

POST localhost:8000/requestValidation

with a payload of to get the validation request

{
	"address":"1KC1C3HB8c9Cs2iTAKyscNShNjq5esYJss"
}

Then

POST localhost:8000/message-signature/validate

with a payload of

{
	"address":"1KC1C3HB8c9Cs2iTAKyscNShNjq5esYJss",
	"signature":"G79pPJGAxfm2dEG3UY52YIyJbyCQsuk4GJ9LXJ1jja7jey+6PJgSfOg/Slud3hhIjEgQAUpbtz62uTTEVGo54m8="
}

to validate message signature

Star Chain

GET

GET localhost:8000/block/20 // Get Block #20
GET localhost:8000/stars/address:1KC1C3HB8c9Cs2iTAKyscNShNjq5esYJss //GET Block where the address is 1KC1C3HB8c9Cs2iTAKyscNShNjq5esYJss
GET localhost:8000/stars/hash:a59e9e399bc17c2db32a7a87379a8012f2c8e08dd661d7c0a6a4845d4f3ffb9f //GET Block where the hash is a59e9e399bc17c2db32a7a87379a8012f2c8e08dd661d7c0a6a4845d4f3ffb9f

POST

POST localhost:8000/block // Add new star to the chain

POST body is type application/json with a payload of

{
    "address": "1KC1C3HB8c9Cs2iTAKyscNShNjq5esYJss", //address is a bitcoin address
    "star": {
        "dec": "-26° 29 24.9",
        "ra": "16h 29m 1.0s",
        "story": "Found star using https://www.google.com/sky/"
    }
}

blockchain_p4's People

Contributors

kunato avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.