Skip to content

Instantly share code, notes, and snippets.

@seanwu1105
Last active November 5, 2020 03:06
Show Gist options
  • Save seanwu1105/46d6405426e7c1152a34a96716b5953e to your computer and use it in GitHub Desktop.
Save seanwu1105/46d6405426e7c1152a34a96716b5953e to your computer and use it in GitHub Desktop.
Information Schema for Capture with Numbers Backend
{
"$schema": "http://json-schema.org/draft-07/schema",
"type": "object",
"description": "Assertion provided by Starling Capture.",
"examples": [
{
"proof": {
"hash": "b08714406df079733fdbc0566aa28ff4b20abd13e3a2042ddd214bc4d4f81f7c",
"mimeType": "image/jpeg",
"timestamp": 1600177819743
},
"information": [
{
"provider": "InfoSnapshot",
"name": "Accelerometer",
"value": "[-0.45742935, -0.24427836, 9.867265]"
},
{
"provider": "InfoSnapshot",
"name": "Board",
"value": "sdm845"
},
{
"provider": "InfoSnapshot",
"name": "Brand",
"value": "htc"
},
{
"provider": "InfoSnapshot",
"name": "Current GPS Accuracy",
"value": "14.589"
},
{
"provider": "InfoSnapshot",
"name": "Current GPS Address",
"value": "No. 77, Jinshan North Road, Zhongzheng District, Taipei City, Taiwan 100"
},
{
"provider": "InfoSnapshot",
"name": "Current GPS Altitude",
"value": "33.29999923706055"
},
{
"provider": "InfoSnapshot",
"name": "Current GPS Bearing",
"value": "12.869383"
},
{
"provider": "InfoSnapshot",
"name": "Current GPS Latitude",
"value": "25.045234"
},
{
"provider": "InfoSnapshot",
"name": "Current GPS Longitude",
"value": "121.530795"
},
{
"provider": "InfoSnapshot",
"name": "Current GPS Speed",
"value": "0.2225263"
},
{
"provider": "InfoSnapshot",
"name": "Current GPS Timestamp",
"value": "2020-09-15T13:50:25.143Z"
},
{
"provider": "InfoSnapshot",
"name": "Device Build Fingerprint",
"value": "htc/exodugl_00709/htc_exodugl:9/PQ2A.190205.003/1109191.2:user/release-keys"
},
{
"provider": "InfoSnapshot",
"name": "Device Build ID",
"value": "PQ2A.190205.003 release-keys"
},
{
"provider": "InfoSnapshot",
"name": "Device Build Tags",
"value": "release-keys"
},
{
"provider": "InfoSnapshot",
"name": "Device Build Time",
"value": "4/12/20 9:33 PM"
},
{
"provider": "InfoSnapshot",
"name": "Device Build Type",
"value": "user"
},
{
"provider": "InfoSnapshot",
"name": "Device Name",
"value": "htc_exodugl"
},
{
"provider": "InfoSnapshot",
"name": "End Product Name",
"value": "EXODUS 1"
},
{
"provider": "InfoSnapshot",
"name": "Game Rotation Vector",
"value": "[-0.015714759, 0.00931755, -0.35154086, 0.9360089]"
},
{
"provider": "InfoSnapshot",
"name": "Geomagnetic Rotation Vector",
"value": "[-0.020919714, 0.012455453, 0.48639238, 0.8734064, 0.0]"
},
{
"provider": "InfoSnapshot",
"name": "Gravity",
"value": "[0.0121178655, -0.3620169, 9.800009]"
},
{
"provider": "InfoSnapshot",
"name": "Gyroscope",
"value": "[-0.007457235, -0.02982894, -5.3262745E-4]"
},
{
"provider": "InfoSnapshot",
"name": "Hardware",
"value": "htc_exo"
},
{
"provider": "InfoSnapshot",
"name": "Hash of Android ID",
"value": "9992474903565e71169fb4f9f9fdeb4bcb5bfd51e5b98b36d9f71dd668784e03"
},
{
"provider": "InfoSnapshot",
"name": "Last Known GPS Accuracy",
"value": "14.5"
},
{
"provider": "InfoSnapshot",
"name": "Last Known GPS Address",
"value": "No. 6, Lane 75, Section 3, Kangning Road, Neihu District, Taipei City, Taiwan 114"
},
{
"provider": "InfoSnapshot",
"name": "Last Known GPS Altitude",
"value": "33.29999923706055"
},
{
"provider": "InfoSnapshot",
"name": "Last Known GPS Bearing",
"value": "0.0"
},
{
"provider": "InfoSnapshot",
"name": "Last Known GPS Latitude",
"value": "25.045234"
},
{
"provider": "InfoSnapshot",
"name": "Last Known GPS Longitude",
"value": "121.530795"
},
{
"provider": "InfoSnapshot",
"name": "Last Known GPS Speed",
"value": "0.0"
},
{
"provider": "InfoSnapshot",
"name": "Last Known GPS Timestamp",
"value": "2020-09-15T13:50:14.895Z"
},
{
"provider": "InfoSnapshot",
"name": "Light",
"value": "[228.0, 0.0, 0.0]"
},
{
"provider": "InfoSnapshot",
"name": "Linear Accelerometer",
"value": "[-0.40301508, 0.1677741, 0.0517125]"
},
{
"provider": "InfoSnapshot",
"name": "Magnetic Field",
"value": "[86.019165, 53.57798, -159.657]"
},
{
"provider": "InfoSnapshot",
"name": "Manufacturer",
"value": "HTC"
},
{
"provider": "InfoSnapshot",
"name": "Overall Product Name",
"value": "exodugl_00709"
},
{
"provider": "InfoSnapshot",
"name": "Rotation Vector",
"value": "[-0.017490063, 0.004150845, -0.15707165, 0.98742664, 0.0]"
},
{
"provider": "InfoSnapshot",
"name": "Timestamp",
"value": "2020-09-15T13:50:30.203Z"
}
]
}
],
"required": [
"proof",
"information"
],
"properties": {
"proof": {
"$ref": "#/definitions/proof"
},
"information": {
"type": "array",
"items": {
"$ref": "#/definitions/info"
},
"allOf": [
{
"contains": {
"type": "object",
"required": [
"provider",
"name",
"value"
],
"properties": {
"provider": {
"type": "string"
},
"name": {
"type": "string",
"pattern": "^Current GPS Latitude$"
},
"value": {
"type": "string"
}
}
}
},
{
"contains": {
"type": "object",
"required": [
"provider",
"name",
"value"
],
"properties": {
"provider": {
"type": "string"
},
"name": {
"type": "string",
"pattern": "^Current GPS Longitude$"
},
"value": {
"type": "string"
}
}
}
},
{
"contains": {
"type": "object",
"required": [
"provider",
"name",
"value"
],
"properties": {
"provider": {
"type": "string"
},
"name": {
"type": "string",
"pattern": "^Timestamp$"
},
"value": {
"type": "string"
}
}
}
}
]
}
},
"definitions": {
"proof": {
"type": "object",
"required": [
"hash",
"mimeType",
"timestamp"
],
"properties": {
"hash": {
"type": "string"
},
"mimeType": {
"type": "string"
},
"timestamp": {
"type": "integer"
}
}
},
"info": {
"type": "object",
"required": [
"provider",
"name",
"value"
],
"properties": {
"provider": {
"type": "string"
},
"name": {
"type": "string"
},
"value": {
"type": "string"
}
}
}
}
}
{
"hash": "abcdef",
"timestamp": 123456,
"mimeType": "image/png",
"exif": {
"location": {...
}
},
"android-built-in": {
"location": {...
}
}
/* schema: additionalProperties */
}
{
"hash": "abcdef",
"timestamp": 123456,
"mimeType": "image/png",
"location": {
"latitude": 123.123,
"longitude": 123.123,
"soruce": "android built-in"
},
"location": {
"latitude": 123.123,
"longitude": 123.123,
"soruce": "exif"
}
/* schema: additionalProperties */
}
{
"hash": "abcdef",
"timestamp": 123456,
"mimeType": "image/png",
"information": [
{
"id": "location.latitude",
"value": 123.123
},
{
"id": "location.exif.latitude",
"value": 123.120
},
{
"id": "location.cai.latitude",
"value": 123.120
}
]
}
// Things to concern:
// 1. CAI
// 2. Data Model for Backend API
//
// Backend Data Model
// Json for data transfer
// CAI
// API
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment