Skip to content
Doris Chia-ching Lin edited this page Dec 7, 2020 · 15 revisions

API Contract

GET /api/load-blocks

response-body
{
 [
  {
    "data": <str>,
    "previousHash": <str>,
    "hash": <str>,
    "nonce": <int>,
    "timeStamp": <str>,
    "workProven": <str>,
  },
  ...
 ]    
}

PUT /api/update-block

request-body
{
  "data":<str>
  "hash":<str>
}

POST /api/create-block

request-body
{
  "data": <str>
}

PUT /api/mine-block

request-body
{
  "hash": <str>
}

Clone this wiki locally