Skip to content

Specifications

Bofu Chen edited this page Apr 26, 2020 · 1 revision

JSON Format of Data Record

When user records the health status and clicks the submit button, the app will generate a JSON file and its signature.

The content has to be sorted by key:

{
  "bodyTemperature": 36.2,
  "bodyTemperatureUnit": "°C",
  "condition": {
    "coughing": true,
    "headache": false,
    "runnyNose": false,
    "soreThroat": false
  },
  "locationStamp": {
    "accuracy": 0,
    "latitude": 51.50166,
    "longitude": -0.17563
  },
  "photos": [
    {
      "byteString": "<base64-string>"
      "tag": "biscuit"
    }
  ],
  "timestamp": 1586069760
}

Zip Structure

When user clicks the share button, MyLog14 generates a Zip file and uploads to the backend.

Without signatures:

1586069760.json
1586136060.json
...
verification.json

With signatures:

1586069760.json
1586069760.sig
1586136060.json
1586136060.sig
...
public_key
verification.json

verification.json

{
  "1586069760.json": "<block-hash>",
  "1586136060.json": "<block-hash>",
  ...
}

For IOTA, the block-hash is bundle hash like WJCKJTTHUEWFJYZ9EYOWLDUREGFNGAFKCEBJNSRYFQCKKOH9DAWSINHSMMB9BXLGOUJDGPUVRLJBHADKB.

Clone this wiki locally