diff --git a/certificate/certificate.json b/certificate/certificate.json new file mode 100644 index 0000000..7ec3ade --- /dev/null +++ b/certificate/certificate.json @@ -0,0 +1,24 @@ +{ + "ct": { + "v": "1.0", + "t": { + "ts": 1586915413, + "mod": "Biopanda Reagents RAPG-COV-019", + "id": "123456789ABCDEF", + "res": { + "c": true, + "igg": true, + "igm": false + } + }, + "id": { + "loc": "GB", + "type": "passport", + "id": "123456789" + }, + "auth": { + "aki": "keyid:F8:EF:7F:F2:CD:78:67:A8:DE:6F:8F:24:8D:88:F1:87:03:02:B3:EB" + } + }, + "sig": "MIGIAkIBlskn0ACL67/pD2aenrcKz7rt9RC0N1Tr+Q8BR2H3bswwAN9bDwyly978m3zSN+2fL284rcrbU2xp5eymMBPGhJcCQgCjhdwuMuWuiWF0eKPGK64T67OCkbrtwj+Eo0mn3sT+LbBhMl0ST9MyYy3G2QtoXR9GT9uCIWvGaWK5T5xb9l0emA==" +} diff --git a/certificate/certificate.schema.json b/certificate/certificate.schema.json new file mode 100644 index 0000000..2c28182 --- /dev/null +++ b/certificate/certificate.schema.json @@ -0,0 +1,140 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "$id": "https://cov-clear.com/certificate.schema.json", + "title": "Passport Document", + "description": "A cryptographically signed document containing details of an individual (the holder)'s medical test results.", + "type": "object", + "properties": { + "ct": { + "title": "Certificate Section", + "description": "Section containing all of the data relating to the medical test, the holder, and the authority that issued the certificate.", + "type": "object", + "properties": { + "v": { + "title": "Version", + "description": "Version of the cov-clear certificate schema to which this certificate conforms.", + "type": "string" + }, + "t": { + "title": "Test", + "description": "Section containing medical information about the test performed and its result.", + "type": "object", + "properties": { + "ts": { + "title": "Timestamp", + "description": "Timestamp for when the test was taken.", + "$comment": "This should be in unix timestamp format (seconds since epoch)", + "type": "number" + }, + "mod": { + "title": "Test model", + "description": "An identifier for a known model of medical test", + "$comment": "Whilst including a url here could be useful, a more compact value might be preferable.", + "type": "string", + "examples": [ + "Biopanda Reagents RAPG-COV-019", + "Randox Health COVID-19 HOME TESTING KIT" + ] + }, + "sn": { + "title": "Test Serial Number", + "description": "Serial number of the specific test unit used.", + "type": "string" + }, + "res": { + "title": "Test Results", + "description": "Detailed results of the mdeical test.", + "$comment": "Note that this schema only includes results for a standard lateral flow rapid diagnostic test (RDT). ", + "type": "object", + "properties": { + "c": { + "title": "Control Reading", + "description": "Output of the RDT's control line.", + "type": "boolean" + }, + "igg": { + "title": "IgG Reading", + "description": "Output of the RDT's IgG antibody line.", + "type": "boolean" + }, + "igm": { + "title": "IgM Reading", + "description": "Output of the RDT's IgM antibody line.", + "type": "boolean" + } + }, + "required": [ "c", "igg", "igm" ] + } + }, + "required": [ "ts", "mod", "res" ] + }, + "id": { + "title": "Identification", + "description": "Section identifying the identity document to which this certificate relates.", + "$comment": "The certificate holder should present the id document in order to prove ownership of the certificate", + "type": "object", + "properties": { + "loc": { + "title": "Document Locale", + "description": "An ISO-3166 country code representing the locale for which this identity document is valid.", + "type": "string", + "examples": [ + "GB", + "EE", + "US" + ] + }, + "type": { + "title": "Document Type", + "description": "Type of identity document.", + "type": "string", + "examples": [ + "Passport", + "Driving License", + "National Identity Card" + ] + }, + "id": { + "title": "Document ID", + "description": "Identifier for the document.", + "type": "string" + } + }, + "required": [ "loc", "type", "id" ] + }, + "auth": { + "title": "Authority", + "description": "Section containing details of the testing authority that performed the test and thus issued the certificate.", + "type": "object", + "properties": { + "aki": { + "title": "Authority Key Identifier", + "description": "ID for the public key corresponding to the private key with which this document was signed.", + "$comment": "This identifies the performer of the test, and acts as a quick way for a verifying application to identify the public key with which the signature can be verified", + "type": "string" + }, + "name": { + "title": "Name of the authority that performed the test", + "description": "Name of the authority that performed the test.", + "type": "string", + "examples": [ + "UK, South London Covid mobile testing station", + "EE, Saaremaa Immunity Testing Laboratory" + ] + } + }, + "required": [ "aki" ] + } + }, + "required": [ "v", "t", "id", "auth" ] + }, + "sig": { + "title": "Signature", + "description": "A base64 encoded X-bit signature for the ct section created using the signing authority's private key.", + "$comment": "Whitespace should be removed from the ct section (e.g. using jq . -c) prior to generating the signature.", + "$comment": "TODO(explain in more detail how to create certs etc).", + "type": "string" + } + }, + "required": [ "ct", "sig" ] +} diff --git a/certificate/out/README.md b/certificate/out/README.md new file mode 100644 index 0000000..1e33c00 --- /dev/null +++ b/certificate/out/README.md @@ -0,0 +1,23 @@ +# README + +## Top-level Schemas + +- [Passport Document](./certificate.md "A cryptographically signed document containing details of an individual (the holder)'s medical test results") – `https://cov-clear.com/certificate.schema.json` + +## Other Schemas + +### Objects + +- [Authority](./certificate-properties-certificate-section-properties-authority.md "Section containing details of the testing authority that performed the test and thus issued the certificate") – `https://cov-clear.com/certificate.schema.json#/properties/ct/properties/auth` +- [Certificate Section](./certificate-properties-certificate-section.md "Section containing all of the data relating to the medical test, the holder, and the authority that issued the certificate") – `https://cov-clear.com/certificate.schema.json#/properties/ct` +- [Identification](./certificate-properties-certificate-section-properties-identification.md "Section identifying the identity document to which this certificate relates") – `https://cov-clear.com/certificate.schema.json#/properties/ct/properties/id` +- [Test](./certificate-properties-certificate-section-properties-test.md "Section containing medical information about the test performed and its result") – `https://cov-clear.com/certificate.schema.json#/properties/ct/properties/t` +- [Test Results](./certificate-properties-certificate-section-properties-test-properties-test-results.md "Detailed results of the mdeical test") – `https://cov-clear.com/certificate.schema.json#/properties/ct/properties/t/properties/res` + +### Arrays + + + +## Version Note + +The schemas linked above follow the JSON Schema Spec version: `http://json-schema.org/draft-04/schema#` diff --git a/certificate/out/certificate-properties-certificate-section-properties-authority-properties-authority-key-identifier.md b/certificate/out/certificate-properties-certificate-section-properties-authority-properties-authority-key-identifier.md new file mode 100644 index 0000000..5cd673e --- /dev/null +++ b/certificate/out/certificate-properties-certificate-section-properties-authority-properties-authority-key-identifier.md @@ -0,0 +1,19 @@ +# Authority Key Identifier Schema + +```txt +https://cov-clear.com/certificate.schema.json#/properties/ct/properties/auth/properties/aki +``` + +ID for the public key corresponding to the private key with which this document was signed. + + +> This identifies the performer of the test, and acts as a quick way for a verifying application to identify the public key with which the signature can be verified +> + +| Abstract | Extensible | Status | Identifiable | Custom Properties | Additional Properties | Access Restrictions | Defined In | +| :------------------ | ---------- | -------------- | ----------------------- | :---------------- | --------------------- | ------------------- | --------------------------------------------------------------------------- | +| Can be instantiated | No | Unknown status | Unknown identifiability | Forbidden | Allowed | none | [certificate.schema.json\*](certificate.schema.json "open original schema") | + +## aki Type + +`string` ([Authority Key Identifier](certificate-properties-certificate-section-properties-authority-properties-authority-key-identifier.md)) diff --git a/certificate/out/certificate-properties-certificate-section-properties-authority-properties-name-of-the-authority-that-performed-the-test.md b/certificate/out/certificate-properties-certificate-section-properties-authority-properties-name-of-the-authority-that-performed-the-test.md new file mode 100644 index 0000000..4afaa35 --- /dev/null +++ b/certificate/out/certificate-properties-certificate-section-properties-authority-properties-name-of-the-authority-that-performed-the-test.md @@ -0,0 +1,26 @@ +# Name of the authority that performed the test Schema + +```txt +https://cov-clear.com/certificate.schema.json#/properties/ct/properties/auth/properties/name +``` + +Name of the authority that performed the test. + + +| Abstract | Extensible | Status | Identifiable | Custom Properties | Additional Properties | Access Restrictions | Defined In | +| :------------------ | ---------- | -------------- | ----------------------- | :---------------- | --------------------- | ------------------- | --------------------------------------------------------------------------- | +| Can be instantiated | No | Unknown status | Unknown identifiability | Forbidden | Allowed | none | [certificate.schema.json\*](certificate.schema.json "open original schema") | + +## name Type + +`string` ([Name of the authority that performed the test](certificate-properties-certificate-section-properties-authority-properties-name-of-the-authority-that-performed-the-test.md)) + +## name Examples + +```json +"UK, South London Covid mobile testing station" +``` + +```json +"EE, Saaremaa Immunity Testing Laboratory" +``` diff --git a/certificate/out/certificate-properties-certificate-section-properties-authority-properties.md b/certificate/out/certificate-properties-certificate-section-properties-authority-properties.md new file mode 100644 index 0000000..65050cb --- /dev/null +++ b/certificate/out/certificate-properties-certificate-section-properties-authority-properties.md @@ -0,0 +1,16 @@ +# Untitled undefined type in Passport Document Schema + +```txt +https://cov-clear.com/certificate.schema.json#/properties/ct/properties/auth/properties +``` + + + + +| Abstract | Extensible | Status | Identifiable | Custom Properties | Additional Properties | Access Restrictions | Defined In | +| :------------------ | ---------- | -------------- | ----------------------- | :---------------- | --------------------- | ------------------- | --------------------------------------------------------------------------- | +| Can be instantiated | No | Unknown status | Unknown identifiability | Forbidden | Allowed | none | [certificate.schema.json\*](certificate.schema.json "open original schema") | + +## properties Type + +unknown diff --git a/certificate/out/certificate-properties-certificate-section-properties-authority.md b/certificate/out/certificate-properties-certificate-section-properties-authority.md new file mode 100644 index 0000000..57f6c12 --- /dev/null +++ b/certificate/out/certificate-properties-certificate-section-properties-authority.md @@ -0,0 +1,68 @@ +# Authority Schema + +```txt +https://cov-clear.com/certificate.schema.json#/properties/ct/properties/auth +``` + +Section containing details of the testing authority that performed the test and thus issued the certificate. + + +| Abstract | Extensible | Status | Identifiable | Custom Properties | Additional Properties | Access Restrictions | Defined In | +| :------------------ | ---------- | -------------- | ------------ | :---------------- | --------------------- | ------------------- | --------------------------------------------------------------------------- | +| Can be instantiated | No | Unknown status | No | Forbidden | Allowed | none | [certificate.schema.json\*](certificate.schema.json "open original schema") | + +## auth Type + +`object` ([Authority](certificate-properties-certificate-section-properties-authority.md)) + +# Authority Properties + +| Property | Type | Required | Nullable | Defined by | +| :------------ | -------- | -------- | -------------- | :--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| [aki](#aki) | `string` | Required | cannot be null | [Passport Document](certificate-properties-certificate-section-properties-authority-properties-authority-key-identifier.md "https://cov-clear.com/certificate.schema.json#/properties/ct/properties/auth/properties/aki") | +| [name](#name) | `string` | Optional | cannot be null | [Passport Document](certificate-properties-certificate-section-properties-authority-properties-name-of-the-authority-that-performed-the-test.md "https://cov-clear.com/certificate.schema.json#/properties/ct/properties/auth/properties/name") | + +## aki + +ID for the public key corresponding to the private key with which this document was signed. + + +> This identifies the performer of the test, and acts as a quick way for a verifying application to identify the public key with which the signature can be verified +> + +`aki` + +- is required +- Type: `string` ([Authority Key Identifier](certificate-properties-certificate-section-properties-authority-properties-authority-key-identifier.md)) +- cannot be null +- defined in: [Passport Document](certificate-properties-certificate-section-properties-authority-properties-authority-key-identifier.md "https://cov-clear.com/certificate.schema.json#/properties/ct/properties/auth/properties/aki") + +### aki Type + +`string` ([Authority Key Identifier](certificate-properties-certificate-section-properties-authority-properties-authority-key-identifier.md)) + +## name + +Name of the authority that performed the test. + + +`name` + +- is optional +- Type: `string` ([Name of the authority that performed the test](certificate-properties-certificate-section-properties-authority-properties-name-of-the-authority-that-performed-the-test.md)) +- cannot be null +- defined in: [Passport Document](certificate-properties-certificate-section-properties-authority-properties-name-of-the-authority-that-performed-the-test.md "https://cov-clear.com/certificate.schema.json#/properties/ct/properties/auth/properties/name") + +### name Type + +`string` ([Name of the authority that performed the test](certificate-properties-certificate-section-properties-authority-properties-name-of-the-authority-that-performed-the-test.md)) + +### name Examples + +```json +"UK, South London Covid mobile testing station" +``` + +```json +"EE, Saaremaa Immunity Testing Laboratory" +``` diff --git a/certificate/out/certificate-properties-certificate-section-properties-identification-properties-document-id.md b/certificate/out/certificate-properties-certificate-section-properties-identification-properties-document-id.md new file mode 100644 index 0000000..028e88b --- /dev/null +++ b/certificate/out/certificate-properties-certificate-section-properties-identification-properties-document-id.md @@ -0,0 +1,16 @@ +# Document ID Schema + +```txt +https://cov-clear.com/certificate.schema.json#/properties/ct/properties/id/properties/id +``` + +Identifier for the document. + + +| Abstract | Extensible | Status | Identifiable | Custom Properties | Additional Properties | Access Restrictions | Defined In | +| :------------------ | ---------- | -------------- | ----------------------- | :---------------- | --------------------- | ------------------- | --------------------------------------------------------------------------- | +| Can be instantiated | No | Unknown status | Unknown identifiability | Forbidden | Allowed | none | [certificate.schema.json\*](certificate.schema.json "open original schema") | + +## id Type + +`string` ([Document ID](certificate-properties-certificate-section-properties-identification-properties-document-id.md)) diff --git a/certificate/out/certificate-properties-certificate-section-properties-identification-properties-document-locale.md b/certificate/out/certificate-properties-certificate-section-properties-identification-properties-document-locale.md new file mode 100644 index 0000000..5db8383 --- /dev/null +++ b/certificate/out/certificate-properties-certificate-section-properties-identification-properties-document-locale.md @@ -0,0 +1,30 @@ +# Document Locale Schema + +```txt +https://cov-clear.com/certificate.schema.json#/properties/ct/properties/id/properties/loc +``` + +An ISO-3166 country code representing the locale for which this identity document is valid. + + +| Abstract | Extensible | Status | Identifiable | Custom Properties | Additional Properties | Access Restrictions | Defined In | +| :------------------ | ---------- | -------------- | ----------------------- | :---------------- | --------------------- | ------------------- | --------------------------------------------------------------------------- | +| Can be instantiated | No | Unknown status | Unknown identifiability | Forbidden | Allowed | none | [certificate.schema.json\*](certificate.schema.json "open original schema") | + +## loc Type + +`string` ([Document Locale](certificate-properties-certificate-section-properties-identification-properties-document-locale.md)) + +## loc Examples + +```json +"GB" +``` + +```json +"EE" +``` + +```json +"US" +``` diff --git a/certificate/out/certificate-properties-certificate-section-properties-identification-properties-document-type.md b/certificate/out/certificate-properties-certificate-section-properties-identification-properties-document-type.md new file mode 100644 index 0000000..c4721e2 --- /dev/null +++ b/certificate/out/certificate-properties-certificate-section-properties-identification-properties-document-type.md @@ -0,0 +1,30 @@ +# Document Type Schema + +```txt +https://cov-clear.com/certificate.schema.json#/properties/ct/properties/id/properties/type +``` + +Type of identity document. + + +| Abstract | Extensible | Status | Identifiable | Custom Properties | Additional Properties | Access Restrictions | Defined In | +| :------------------ | ---------- | -------------- | ----------------------- | :---------------- | --------------------- | ------------------- | --------------------------------------------------------------------------- | +| Can be instantiated | No | Unknown status | Unknown identifiability | Forbidden | Allowed | none | [certificate.schema.json\*](certificate.schema.json "open original schema") | + +## type Type + +`string` ([Document Type](certificate-properties-certificate-section-properties-identification-properties-document-type.md)) + +## type Examples + +```json +"Passport" +``` + +```json +"Driving License" +``` + +```json +"National Identity Card" +``` diff --git a/certificate/out/certificate-properties-certificate-section-properties-identification-properties.md b/certificate/out/certificate-properties-certificate-section-properties-identification-properties.md new file mode 100644 index 0000000..a8c60dd --- /dev/null +++ b/certificate/out/certificate-properties-certificate-section-properties-identification-properties.md @@ -0,0 +1,16 @@ +# Untitled undefined type in Passport Document Schema + +```txt +https://cov-clear.com/certificate.schema.json#/properties/ct/properties/id/properties +``` + + + + +| Abstract | Extensible | Status | Identifiable | Custom Properties | Additional Properties | Access Restrictions | Defined In | +| :------------------ | ---------- | -------------- | ----------------------- | :---------------- | --------------------- | ------------------- | --------------------------------------------------------------------------- | +| Can be instantiated | No | Unknown status | Unknown identifiability | Forbidden | Allowed | none | [certificate.schema.json\*](certificate.schema.json "open original schema") | + +## properties Type + +unknown diff --git a/certificate/out/certificate-properties-certificate-section-properties-identification.md b/certificate/out/certificate-properties-certificate-section-properties-identification.md new file mode 100644 index 0000000..218a583 --- /dev/null +++ b/certificate/out/certificate-properties-certificate-section-properties-identification.md @@ -0,0 +1,103 @@ +# Identification Schema + +```txt +https://cov-clear.com/certificate.schema.json#/properties/ct/properties/id +``` + +Section identifying the identity document to which this certificate relates. + + +> The certificate holder should present the id document in order to prove ownership of the certificate +> + +| Abstract | Extensible | Status | Identifiable | Custom Properties | Additional Properties | Access Restrictions | Defined In | +| :------------------ | ---------- | -------------- | ------------ | :---------------- | --------------------- | ------------------- | --------------------------------------------------------------------------- | +| Can be instantiated | No | Unknown status | No | Forbidden | Allowed | none | [certificate.schema.json\*](certificate.schema.json "open original schema") | + +## id Type + +`object` ([Identification](certificate-properties-certificate-section-properties-identification.md)) + +# Identification Properties + +| Property | Type | Required | Nullable | Defined by | +| :------------ | -------- | -------- | -------------- | :----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| [loc](#loc) | `string` | Required | cannot be null | [Passport Document](certificate-properties-certificate-section-properties-identification-properties-document-locale.md "https://cov-clear.com/certificate.schema.json#/properties/ct/properties/id/properties/loc") | +| [type](#type) | `string` | Required | cannot be null | [Passport Document](certificate-properties-certificate-section-properties-identification-properties-document-type.md "https://cov-clear.com/certificate.schema.json#/properties/ct/properties/id/properties/type") | +| [id](#id) | `string` | Required | cannot be null | [Passport Document](certificate-properties-certificate-section-properties-identification-properties-document-id.md "https://cov-clear.com/certificate.schema.json#/properties/ct/properties/id/properties/id") | + +## loc + +An ISO-3166 country code representing the locale for which this identity document is valid. + + +`loc` + +- is required +- Type: `string` ([Document Locale](certificate-properties-certificate-section-properties-identification-properties-document-locale.md)) +- cannot be null +- defined in: [Passport Document](certificate-properties-certificate-section-properties-identification-properties-document-locale.md "https://cov-clear.com/certificate.schema.json#/properties/ct/properties/id/properties/loc") + +### loc Type + +`string` ([Document Locale](certificate-properties-certificate-section-properties-identification-properties-document-locale.md)) + +### loc Examples + +```json +"GB" +``` + +```json +"EE" +``` + +```json +"US" +``` + +## type + +Type of identity document. + + +`type` + +- is required +- Type: `string` ([Document Type](certificate-properties-certificate-section-properties-identification-properties-document-type.md)) +- cannot be null +- defined in: [Passport Document](certificate-properties-certificate-section-properties-identification-properties-document-type.md "https://cov-clear.com/certificate.schema.json#/properties/ct/properties/id/properties/type") + +### type Type + +`string` ([Document Type](certificate-properties-certificate-section-properties-identification-properties-document-type.md)) + +### type Examples + +```json +"Passport" +``` + +```json +"Driving License" +``` + +```json +"National Identity Card" +``` + +## id + +Identifier for the document. + + +`id` + +- is required +- Type: `string` ([Document ID](certificate-properties-certificate-section-properties-identification-properties-document-id.md)) +- cannot be null +- defined in: [Passport Document](certificate-properties-certificate-section-properties-identification-properties-document-id.md "https://cov-clear.com/certificate.schema.json#/properties/ct/properties/id/properties/id") + +### id Type + +`string` ([Document ID](certificate-properties-certificate-section-properties-identification-properties-document-id.md)) diff --git a/certificate/out/certificate-properties-certificate-section-properties-test-properties-test-model.md b/certificate/out/certificate-properties-certificate-section-properties-test-properties-test-model.md new file mode 100644 index 0000000..c6cbeaf --- /dev/null +++ b/certificate/out/certificate-properties-certificate-section-properties-test-properties-test-model.md @@ -0,0 +1,29 @@ +# Test model Schema + +```txt +https://cov-clear.com/certificate.schema.json#/properties/ct/properties/t/properties/mod +``` + +An identifier for a known model of medical test + + +> Whilst including a url here could be useful, a more compact value might be preferable. +> + +| Abstract | Extensible | Status | Identifiable | Custom Properties | Additional Properties | Access Restrictions | Defined In | +| :------------------ | ---------- | -------------- | ----------------------- | :---------------- | --------------------- | ------------------- | --------------------------------------------------------------------------- | +| Can be instantiated | No | Unknown status | Unknown identifiability | Forbidden | Allowed | none | [certificate.schema.json\*](certificate.schema.json "open original schema") | + +## mod Type + +`string` ([Test model](certificate-properties-certificate-section-properties-test-properties-test-model.md)) + +## mod Examples + +```json +"Biopanda Reagents RAPG-COV-019" +``` + +```json +"Randox Health COVID-19 HOME TESTING KIT" +``` diff --git a/certificate/out/certificate-properties-certificate-section-properties-test-properties-test-results-properties-control-reading.md b/certificate/out/certificate-properties-certificate-section-properties-test-properties-test-results-properties-control-reading.md new file mode 100644 index 0000000..dc9da4c --- /dev/null +++ b/certificate/out/certificate-properties-certificate-section-properties-test-properties-test-results-properties-control-reading.md @@ -0,0 +1,16 @@ +# Control Reading Schema + +```txt +https://cov-clear.com/certificate.schema.json#/properties/ct/properties/t/properties/res/properties/c +``` + +Output of the RDT's control line. + + +| Abstract | Extensible | Status | Identifiable | Custom Properties | Additional Properties | Access Restrictions | Defined In | +| :------------------ | ---------- | -------------- | ----------------------- | :---------------- | --------------------- | ------------------- | --------------------------------------------------------------------------- | +| Can be instantiated | No | Unknown status | Unknown identifiability | Forbidden | Allowed | none | [certificate.schema.json\*](certificate.schema.json "open original schema") | + +## c Type + +`boolean` ([Control Reading](certificate-properties-certificate-section-properties-test-properties-test-results-properties-control-reading.md)) diff --git a/certificate/out/certificate-properties-certificate-section-properties-test-properties-test-results-properties-igg-reading.md b/certificate/out/certificate-properties-certificate-section-properties-test-properties-test-results-properties-igg-reading.md new file mode 100644 index 0000000..440b1ff --- /dev/null +++ b/certificate/out/certificate-properties-certificate-section-properties-test-properties-test-results-properties-igg-reading.md @@ -0,0 +1,16 @@ +# IgG Reading Schema + +```txt +https://cov-clear.com/certificate.schema.json#/properties/ct/properties/t/properties/res/properties/igg +``` + +Output of the RDT's IgG antibody line. + + +| Abstract | Extensible | Status | Identifiable | Custom Properties | Additional Properties | Access Restrictions | Defined In | +| :------------------ | ---------- | -------------- | ----------------------- | :---------------- | --------------------- | ------------------- | --------------------------------------------------------------------------- | +| Can be instantiated | No | Unknown status | Unknown identifiability | Forbidden | Allowed | none | [certificate.schema.json\*](certificate.schema.json "open original schema") | + +## igg Type + +`boolean` ([IgG Reading](certificate-properties-certificate-section-properties-test-properties-test-results-properties-igg-reading.md)) diff --git a/certificate/out/certificate-properties-certificate-section-properties-test-properties-test-results-properties-igm-reading.md b/certificate/out/certificate-properties-certificate-section-properties-test-properties-test-results-properties-igm-reading.md new file mode 100644 index 0000000..a3d3ea8 --- /dev/null +++ b/certificate/out/certificate-properties-certificate-section-properties-test-properties-test-results-properties-igm-reading.md @@ -0,0 +1,16 @@ +# IgM Reading Schema + +```txt +https://cov-clear.com/certificate.schema.json#/properties/ct/properties/t/properties/res/properties/igm +``` + +Output of the RDT's IgM antibody line. + + +| Abstract | Extensible | Status | Identifiable | Custom Properties | Additional Properties | Access Restrictions | Defined In | +| :------------------ | ---------- | -------------- | ----------------------- | :---------------- | --------------------- | ------------------- | --------------------------------------------------------------------------- | +| Can be instantiated | No | Unknown status | Unknown identifiability | Forbidden | Allowed | none | [certificate.schema.json\*](certificate.schema.json "open original schema") | + +## igm Type + +`boolean` ([IgM Reading](certificate-properties-certificate-section-properties-test-properties-test-results-properties-igm-reading.md)) diff --git a/certificate/out/certificate-properties-certificate-section-properties-test-properties-test-results-properties.md b/certificate/out/certificate-properties-certificate-section-properties-test-properties-test-results-properties.md new file mode 100644 index 0000000..4647aeb --- /dev/null +++ b/certificate/out/certificate-properties-certificate-section-properties-test-properties-test-results-properties.md @@ -0,0 +1,16 @@ +# Untitled undefined type in Passport Document Schema + +```txt +https://cov-clear.com/certificate.schema.json#/properties/ct/properties/t/properties/res/properties +``` + + + + +| Abstract | Extensible | Status | Identifiable | Custom Properties | Additional Properties | Access Restrictions | Defined In | +| :------------------ | ---------- | -------------- | ----------------------- | :---------------- | --------------------- | ------------------- | --------------------------------------------------------------------------- | +| Can be instantiated | No | Unknown status | Unknown identifiability | Forbidden | Allowed | none | [certificate.schema.json\*](certificate.schema.json "open original schema") | + +## properties Type + +unknown diff --git a/certificate/out/certificate-properties-certificate-section-properties-test-properties-test-results.md b/certificate/out/certificate-properties-certificate-section-properties-test-properties-test-results.md new file mode 100644 index 0000000..053872d --- /dev/null +++ b/certificate/out/certificate-properties-certificate-section-properties-test-properties-test-results.md @@ -0,0 +1,75 @@ +# Test Results Schema + +```txt +https://cov-clear.com/certificate.schema.json#/properties/ct/properties/t/properties/res +``` + +Detailed results of the mdeical test. + + +> Note that this schema only includes results for a standard lateral flow rapid diagnostic test (RDT). +> + +| Abstract | Extensible | Status | Identifiable | Custom Properties | Additional Properties | Access Restrictions | Defined In | +| :------------------ | ---------- | -------------- | ------------ | :---------------- | --------------------- | ------------------- | --------------------------------------------------------------------------- | +| Can be instantiated | No | Unknown status | No | Forbidden | Allowed | none | [certificate.schema.json\*](certificate.schema.json "open original schema") | + +## res Type + +`object` ([Test Results](certificate-properties-certificate-section-properties-test-properties-test-results.md)) + +# Test Results Properties + +| Property | Type | Required | Nullable | Defined by | +| :---------- | --------- | -------- | -------------- | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| [c](#c) | `boolean` | Required | cannot be null | [Passport Document](certificate-properties-certificate-section-properties-test-properties-test-results-properties-control-reading.md "https://cov-clear.com/certificate.schema.json#/properties/ct/properties/t/properties/res/properties/c") | +| [igg](#igg) | `boolean` | Required | cannot be null | [Passport Document](certificate-properties-certificate-section-properties-test-properties-test-results-properties-igg-reading.md "https://cov-clear.com/certificate.schema.json#/properties/ct/properties/t/properties/res/properties/igg") | +| [igm](#igm) | `boolean` | Required | cannot be null | [Passport Document](certificate-properties-certificate-section-properties-test-properties-test-results-properties-igm-reading.md "https://cov-clear.com/certificate.schema.json#/properties/ct/properties/t/properties/res/properties/igm") | + +## c + +Output of the RDT's control line. + + +`c` + +- is required +- Type: `boolean` ([Control Reading](certificate-properties-certificate-section-properties-test-properties-test-results-properties-control-reading.md)) +- cannot be null +- defined in: [Passport Document](certificate-properties-certificate-section-properties-test-properties-test-results-properties-control-reading.md "https://cov-clear.com/certificate.schema.json#/properties/ct/properties/t/properties/res/properties/c") + +### c Type + +`boolean` ([Control Reading](certificate-properties-certificate-section-properties-test-properties-test-results-properties-control-reading.md)) + +## igg + +Output of the RDT's IgG antibody line. + + +`igg` + +- is required +- Type: `boolean` ([IgG Reading](certificate-properties-certificate-section-properties-test-properties-test-results-properties-igg-reading.md)) +- cannot be null +- defined in: [Passport Document](certificate-properties-certificate-section-properties-test-properties-test-results-properties-igg-reading.md "https://cov-clear.com/certificate.schema.json#/properties/ct/properties/t/properties/res/properties/igg") + +### igg Type + +`boolean` ([IgG Reading](certificate-properties-certificate-section-properties-test-properties-test-results-properties-igg-reading.md)) + +## igm + +Output of the RDT's IgM antibody line. + + +`igm` + +- is required +- Type: `boolean` ([IgM Reading](certificate-properties-certificate-section-properties-test-properties-test-results-properties-igm-reading.md)) +- cannot be null +- defined in: [Passport Document](certificate-properties-certificate-section-properties-test-properties-test-results-properties-igm-reading.md "https://cov-clear.com/certificate.schema.json#/properties/ct/properties/t/properties/res/properties/igm") + +### igm Type + +`boolean` ([IgM Reading](certificate-properties-certificate-section-properties-test-properties-test-results-properties-igm-reading.md)) diff --git a/certificate/out/certificate-properties-certificate-section-properties-test-properties-test-serial-number.md b/certificate/out/certificate-properties-certificate-section-properties-test-properties-test-serial-number.md new file mode 100644 index 0000000..704ec39 --- /dev/null +++ b/certificate/out/certificate-properties-certificate-section-properties-test-properties-test-serial-number.md @@ -0,0 +1,16 @@ +# Test Serial Number Schema + +```txt +https://cov-clear.com/certificate.schema.json#/properties/ct/properties/t/properties/sn +``` + +Serial number of the specific test unit used. + + +| Abstract | Extensible | Status | Identifiable | Custom Properties | Additional Properties | Access Restrictions | Defined In | +| :------------------ | ---------- | -------------- | ----------------------- | :---------------- | --------------------- | ------------------- | --------------------------------------------------------------------------- | +| Can be instantiated | No | Unknown status | Unknown identifiability | Forbidden | Allowed | none | [certificate.schema.json\*](certificate.schema.json "open original schema") | + +## sn Type + +`string` ([Test Serial Number](certificate-properties-certificate-section-properties-test-properties-test-serial-number.md)) diff --git a/certificate/out/certificate-properties-certificate-section-properties-test-properties-timestamp.md b/certificate/out/certificate-properties-certificate-section-properties-test-properties-timestamp.md new file mode 100644 index 0000000..3c8b405 --- /dev/null +++ b/certificate/out/certificate-properties-certificate-section-properties-test-properties-timestamp.md @@ -0,0 +1,19 @@ +# Timestamp Schema + +```txt +https://cov-clear.com/certificate.schema.json#/properties/ct/properties/t/properties/ts +``` + +Timestamp for when the test was taken. + + +> This should be in unix timestamp format (seconds since epoch) +> + +| Abstract | Extensible | Status | Identifiable | Custom Properties | Additional Properties | Access Restrictions | Defined In | +| :------------------ | ---------- | -------------- | ----------------------- | :---------------- | --------------------- | ------------------- | --------------------------------------------------------------------------- | +| Can be instantiated | No | Unknown status | Unknown identifiability | Forbidden | Allowed | none | [certificate.schema.json\*](certificate.schema.json "open original schema") | + +## ts Type + +`number` ([Timestamp](certificate-properties-certificate-section-properties-test-properties-timestamp.md)) diff --git a/certificate/out/certificate-properties-certificate-section-properties-test-properties.md b/certificate/out/certificate-properties-certificate-section-properties-test-properties.md new file mode 100644 index 0000000..271108a --- /dev/null +++ b/certificate/out/certificate-properties-certificate-section-properties-test-properties.md @@ -0,0 +1,16 @@ +# Untitled undefined type in Passport Document Schema + +```txt +https://cov-clear.com/certificate.schema.json#/properties/ct/properties/t/properties +``` + + + + +| Abstract | Extensible | Status | Identifiable | Custom Properties | Additional Properties | Access Restrictions | Defined In | +| :------------------ | ---------- | -------------- | ----------------------- | :---------------- | --------------------- | ------------------- | --------------------------------------------------------------------------- | +| Can be instantiated | No | Unknown status | Unknown identifiability | Forbidden | Allowed | none | [certificate.schema.json\*](certificate.schema.json "open original schema") | + +## properties Type + +unknown diff --git a/certificate/out/certificate-properties-certificate-section-properties-test.md b/certificate/out/certificate-properties-certificate-section-properties-test.md new file mode 100644 index 0000000..62f8045 --- /dev/null +++ b/certificate/out/certificate-properties-certificate-section-properties-test.md @@ -0,0 +1,108 @@ +# Test Schema + +```txt +https://cov-clear.com/certificate.schema.json#/properties/ct/properties/t +``` + +Section containing medical information about the test performed and its result. + + +| Abstract | Extensible | Status | Identifiable | Custom Properties | Additional Properties | Access Restrictions | Defined In | +| :------------------ | ---------- | -------------- | ------------ | :---------------- | --------------------- | ------------------- | --------------------------------------------------------------------------- | +| Can be instantiated | No | Unknown status | No | Forbidden | Allowed | none | [certificate.schema.json\*](certificate.schema.json "open original schema") | + +## t Type + +`object` ([Test](certificate-properties-certificate-section-properties-test.md)) + +# Test Properties + +| Property | Type | Required | Nullable | Defined by | +| :---------- | -------- | -------- | -------------- | :-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| [ts](#ts) | `number` | Required | cannot be null | [Passport Document](certificate-properties-certificate-section-properties-test-properties-timestamp.md "https://cov-clear.com/certificate.schema.json#/properties/ct/properties/t/properties/ts") | +| [mod](#mod) | `string` | Required | cannot be null | [Passport Document](certificate-properties-certificate-section-properties-test-properties-test-model.md "https://cov-clear.com/certificate.schema.json#/properties/ct/properties/t/properties/mod") | +| [sn](#sn) | `string` | Optional | cannot be null | [Passport Document](certificate-properties-certificate-section-properties-test-properties-test-serial-number.md "https://cov-clear.com/certificate.schema.json#/properties/ct/properties/t/properties/sn") | +| [res](#res) | `object` | Required | cannot be null | [Passport Document](certificate-properties-certificate-section-properties-test-properties-test-results.md "https://cov-clear.com/certificate.schema.json#/properties/ct/properties/t/properties/res") | + +## ts + +Timestamp for when the test was taken. + + +> This should be in unix timestamp format (seconds since epoch) +> + +`ts` + +- is required +- Type: `number` ([Timestamp](certificate-properties-certificate-section-properties-test-properties-timestamp.md)) +- cannot be null +- defined in: [Passport Document](certificate-properties-certificate-section-properties-test-properties-timestamp.md "https://cov-clear.com/certificate.schema.json#/properties/ct/properties/t/properties/ts") + +### ts Type + +`number` ([Timestamp](certificate-properties-certificate-section-properties-test-properties-timestamp.md)) + +## mod + +An identifier for a known model of medical test + + +> Whilst including a url here could be useful, a more compact value might be preferable. +> + +`mod` + +- is required +- Type: `string` ([Test model](certificate-properties-certificate-section-properties-test-properties-test-model.md)) +- cannot be null +- defined in: [Passport Document](certificate-properties-certificate-section-properties-test-properties-test-model.md "https://cov-clear.com/certificate.schema.json#/properties/ct/properties/t/properties/mod") + +### mod Type + +`string` ([Test model](certificate-properties-certificate-section-properties-test-properties-test-model.md)) + +### mod Examples + +```json +"Biopanda Reagents RAPG-COV-019" +``` + +```json +"Randox Health COVID-19 HOME TESTING KIT" +``` + +## sn + +Serial number of the specific test unit used. + + +`sn` + +- is optional +- Type: `string` ([Test Serial Number](certificate-properties-certificate-section-properties-test-properties-test-serial-number.md)) +- cannot be null +- defined in: [Passport Document](certificate-properties-certificate-section-properties-test-properties-test-serial-number.md "https://cov-clear.com/certificate.schema.json#/properties/ct/properties/t/properties/sn") + +### sn Type + +`string` ([Test Serial Number](certificate-properties-certificate-section-properties-test-properties-test-serial-number.md)) + +## res + +Detailed results of the mdeical test. + + +> Note that this schema only includes results for a standard lateral flow rapid diagnostic test (RDT). +> + +`res` + +- is required +- Type: `object` ([Test Results](certificate-properties-certificate-section-properties-test-properties-test-results.md)) +- cannot be null +- defined in: [Passport Document](certificate-properties-certificate-section-properties-test-properties-test-results.md "https://cov-clear.com/certificate.schema.json#/properties/ct/properties/t/properties/res") + +### res Type + +`object` ([Test Results](certificate-properties-certificate-section-properties-test-properties-test-results.md)) diff --git a/certificate/out/certificate-properties-certificate-section-properties-version.md b/certificate/out/certificate-properties-certificate-section-properties-version.md new file mode 100644 index 0000000..e8e3654 --- /dev/null +++ b/certificate/out/certificate-properties-certificate-section-properties-version.md @@ -0,0 +1,16 @@ +# Version Schema + +```txt +https://cov-clear.com/certificate.schema.json#/properties/ct/properties/v +``` + +Version of the cov-clear certificate schema to which this certificate conforms. + + +| Abstract | Extensible | Status | Identifiable | Custom Properties | Additional Properties | Access Restrictions | Defined In | +| :------------------ | ---------- | -------------- | ----------------------- | :---------------- | --------------------- | ------------------- | --------------------------------------------------------------------------- | +| Can be instantiated | No | Unknown status | Unknown identifiability | Forbidden | Allowed | none | [certificate.schema.json\*](certificate.schema.json "open original schema") | + +## v Type + +`string` ([Version](certificate-properties-certificate-section-properties-version.md)) diff --git a/certificate/out/certificate-properties-certificate-section-properties.md b/certificate/out/certificate-properties-certificate-section-properties.md new file mode 100644 index 0000000..6749d1e --- /dev/null +++ b/certificate/out/certificate-properties-certificate-section-properties.md @@ -0,0 +1,16 @@ +# Untitled undefined type in Passport Document Schema + +```txt +https://cov-clear.com/certificate.schema.json#/properties/ct/properties +``` + + + + +| Abstract | Extensible | Status | Identifiable | Custom Properties | Additional Properties | Access Restrictions | Defined In | +| :------------------ | ---------- | -------------- | ----------------------- | :---------------- | --------------------- | ------------------- | --------------------------------------------------------------------------- | +| Can be instantiated | No | Unknown status | Unknown identifiability | Forbidden | Allowed | none | [certificate.schema.json\*](certificate.schema.json "open original schema") | + +## properties Type + +unknown diff --git a/certificate/out/certificate-properties-certificate-section.md b/certificate/out/certificate-properties-certificate-section.md new file mode 100644 index 0000000..679ad2c --- /dev/null +++ b/certificate/out/certificate-properties-certificate-section.md @@ -0,0 +1,92 @@ +# Certificate Section Schema + +```txt +https://cov-clear.com/certificate.schema.json#/properties/ct +``` + +Section containing all of the data relating to the medical test, the holder, and the authority that issued the certificate. + + +| Abstract | Extensible | Status | Identifiable | Custom Properties | Additional Properties | Access Restrictions | Defined In | +| :------------------ | ---------- | -------------- | ------------ | :---------------- | --------------------- | ------------------- | --------------------------------------------------------------------------- | +| Can be instantiated | No | Unknown status | No | Forbidden | Allowed | none | [certificate.schema.json\*](certificate.schema.json "open original schema") | + +## ct Type + +`object` ([Certificate Section](certificate-properties-certificate-section.md)) + +# Certificate Section Properties + +| Property | Type | Required | Nullable | Defined by | +| :------------ | -------- | -------- | -------------- | :----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| [v](#v) | `string` | Required | cannot be null | [Passport Document](certificate-properties-certificate-section-properties-version.md "https://cov-clear.com/certificate.schema.json#/properties/ct/properties/v") | +| [t](#t) | `object` | Required | cannot be null | [Passport Document](certificate-properties-certificate-section-properties-test.md "https://cov-clear.com/certificate.schema.json#/properties/ct/properties/t") | +| [id](#id) | `object` | Required | cannot be null | [Passport Document](certificate-properties-certificate-section-properties-identification.md "https://cov-clear.com/certificate.schema.json#/properties/ct/properties/id") | +| [auth](#auth) | `object` | Required | cannot be null | [Passport Document](certificate-properties-certificate-section-properties-authority.md "https://cov-clear.com/certificate.schema.json#/properties/ct/properties/auth") | + +## v + +Version of the cov-clear certificate schema to which this certificate conforms. + + +`v` + +- is required +- Type: `string` ([Version](certificate-properties-certificate-section-properties-version.md)) +- cannot be null +- defined in: [Passport Document](certificate-properties-certificate-section-properties-version.md "https://cov-clear.com/certificate.schema.json#/properties/ct/properties/v") + +### v Type + +`string` ([Version](certificate-properties-certificate-section-properties-version.md)) + +## t + +Section containing medical information about the test performed and its result. + + +`t` + +- is required +- Type: `object` ([Test](certificate-properties-certificate-section-properties-test.md)) +- cannot be null +- defined in: [Passport Document](certificate-properties-certificate-section-properties-test.md "https://cov-clear.com/certificate.schema.json#/properties/ct/properties/t") + +### t Type + +`object` ([Test](certificate-properties-certificate-section-properties-test.md)) + +## id + +Section identifying the identity document to which this certificate relates. + + +> The certificate holder should present the id document in order to prove ownership of the certificate +> + +`id` + +- is required +- Type: `object` ([Identification](certificate-properties-certificate-section-properties-identification.md)) +- cannot be null +- defined in: [Passport Document](certificate-properties-certificate-section-properties-identification.md "https://cov-clear.com/certificate.schema.json#/properties/ct/properties/id") + +### id Type + +`object` ([Identification](certificate-properties-certificate-section-properties-identification.md)) + +## auth + +Section containing details of the testing authority that performed the test and thus issued the certificate. + + +`auth` + +- is required +- Type: `object` ([Authority](certificate-properties-certificate-section-properties-authority.md)) +- cannot be null +- defined in: [Passport Document](certificate-properties-certificate-section-properties-authority.md "https://cov-clear.com/certificate.schema.json#/properties/ct/properties/auth") + +### auth Type + +`object` ([Authority](certificate-properties-certificate-section-properties-authority.md)) diff --git a/certificate/out/certificate-properties-signature.md b/certificate/out/certificate-properties-signature.md new file mode 100644 index 0000000..ea301cf --- /dev/null +++ b/certificate/out/certificate-properties-signature.md @@ -0,0 +1,19 @@ +# Signature Schema + +```txt +https://cov-clear.com/certificate.schema.json#/properties/sig +``` + +A base64 encoded X-bit signature for the ct section created using the signing authority's private key. + + +> TODO(explain in more detail how to create certs etc). +> + +| Abstract | Extensible | Status | Identifiable | Custom Properties | Additional Properties | Access Restrictions | Defined In | +| :------------------ | ---------- | -------------- | ----------------------- | :---------------- | --------------------- | ------------------- | --------------------------------------------------------------------------- | +| Can be instantiated | No | Unknown status | Unknown identifiability | Forbidden | Allowed | none | [certificate.schema.json\*](certificate.schema.json "open original schema") | + +## sig Type + +`string` ([Signature](certificate-properties-signature.md)) diff --git a/certificate/out/certificate-properties.md b/certificate/out/certificate-properties.md new file mode 100644 index 0000000..828e0a2 --- /dev/null +++ b/certificate/out/certificate-properties.md @@ -0,0 +1,16 @@ +# Untitled undefined type in Passport Document Schema + +```txt +https://cov-clear.com/certificate.schema.json#/properties +``` + + + + +| Abstract | Extensible | Status | Identifiable | Custom Properties | Additional Properties | Access Restrictions | Defined In | +| :------------------ | ---------- | -------------- | ----------------------- | :---------------- | --------------------- | ------------------- | --------------------------------------------------------------------------- | +| Can be instantiated | No | Unknown status | Unknown identifiability | Forbidden | Allowed | none | [certificate.schema.json\*](certificate.schema.json "open original schema") | + +## properties Type + +unknown diff --git a/certificate/out/certificate.md b/certificate/out/certificate.md new file mode 100644 index 0000000..6700ce5 --- /dev/null +++ b/certificate/out/certificate.md @@ -0,0 +1,58 @@ +# Passport Document Schema + +```txt +https://cov-clear.com/certificate.schema.json +``` + +A cryptographically signed document containing details of an individual (the holder)'s medical test results. + + +| Abstract | Extensible | Status | Identifiable | Custom Properties | Additional Properties | Access Restrictions | Defined In | +| :------------------ | ---------- | -------------- | ------------ | :---------------- | --------------------- | ------------------- | ------------------------------------------------------------------------- | +| Can be instantiated | No | Unknown status | No | Forbidden | Allowed | none | [certificate.schema.json](certificate.schema.json "open original schema") | + +## Passport Document Type + +`object` ([Passport Document](certificate.md)) + +# Passport Document Properties + +| Property | Type | Required | Nullable | Defined by | +| :---------- | -------- | -------- | -------------- | :------------------------------------------------------------------------------------------------------------------------------------- | +| [ct](#ct) | `object` | Required | cannot be null | [Passport Document](certificate-properties-certificate-section.md "https://cov-clear.com/certificate.schema.json#/properties/ct") | +| [sig](#sig) | `string` | Required | cannot be null | [Passport Document](certificate-properties-signature.md "https://cov-clear.com/certificate.schema.json#/properties/sig") | + +## ct + +Section containing all of the data relating to the medical test, the holder, and the authority that issued the certificate. + + +`ct` + +- is required +- Type: `object` ([Certificate Section](certificate-properties-certificate-section.md)) +- cannot be null +- defined in: [Passport Document](certificate-properties-certificate-section.md "https://cov-clear.com/certificate.schema.json#/properties/ct") + +### ct Type + +`object` ([Certificate Section](certificate-properties-certificate-section.md)) + +## sig + +A base64 encoded X-bit signature for the ct section created using the signing authority's private key. + + +> TODO(explain in more detail how to create certs etc). +> + +`sig` + +- is required +- Type: `string` ([Signature](certificate-properties-signature.md)) +- cannot be null +- defined in: [Passport Document](certificate-properties-signature.md "https://cov-clear.com/certificate.schema.json#/properties/sig") + +### sig Type + +`string` ([Signature](certificate-properties-signature.md)) diff --git a/certificate/out/certificate.schema.json b/certificate/out/certificate.schema.json new file mode 100644 index 0000000..8396da6 --- /dev/null +++ b/certificate/out/certificate.schema.json @@ -0,0 +1 @@ +{"$schema":"http://json-schema.org/draft-04/schema#","$id":"https://cov-clear.com/certificate.schema.json","title":"Passport Document","description":"A cryptographically signed document containing details of an individual (the holder)'s medical test results.","type":"object","properties":{"ct":{"title":"Certificate Section","description":"Section containing all of the data relating to the medical test, the holder, and the authority that issued the certificate.","type":"object","properties":{"v":{"title":"Version","description":"Version of the cov-clear certificate schema to which this certificate conforms.","type":"string"},"t":{"title":"Test","description":"Section containing medical information about the test performed and its result.","type":"object","properties":{"ts":{"title":"Timestamp","description":"Timestamp for when the test was taken.","$comment":"This should be in unix timestamp format (seconds since epoch)","type":"number"},"mod":{"title":"Test model","description":"An identifier for a known model of medical test","$comment":"Whilst including a url here could be useful, a more compact value might be preferable.","type":"string","examples":["Biopanda Reagents RAPG-COV-019","Randox Health COVID-19 HOME TESTING KIT"]},"sn":{"title":"Test Serial Number","description":"Serial number of the specific test unit used.","type":"string"},"res":{"title":"Test Results","description":"Detailed results of the mdeical test.","$comment":"Note that this schema only includes results for a standard lateral flow rapid diagnostic test (RDT). ","type":"object","properties":{"c":{"title":"Control Reading","description":"Output of the RDT's control line.","type":"boolean"},"igg":{"title":"IgG Reading","description":"Output of the RDT's IgG antibody line.","type":"boolean"},"igm":{"title":"IgM Reading","description":"Output of the RDT's IgM antibody line.","type":"boolean"}},"required":["c","igg","igm"]}},"required":["ts","mod","res"]},"id":{"title":"Identification","description":"Section identifying the identity document to which this certificate relates.","$comment":"The certificate holder should present the id document in order to prove ownership of the certificate","type":"object","properties":{"loc":{"title":"Document Locale","description":"An ISO-3166 country code representing the locale for which this identity document is valid.","type":"string","examples":["GB","EE","US"]},"type":{"title":"Document Type","description":"Type of identity document.","type":"string","examples":["Passport","Driving License","National Identity Card"]},"id":{"title":"Document ID","description":"Identifier for the document.","type":"string"}},"required":["loc","type","id"]},"auth":{"title":"Authority","description":"Section containing details of the testing authority that performed the test and thus issued the certificate.","type":"object","properties":{"aki":{"title":"Authority Key Identifier","description":"ID for the public key corresponding to the private key with which this document was signed.","$comment":"This identifies the performer of the test, and acts as a quick way for a verifying application to identify the public key with which the signature can be verified","type":"string"},"name":{"title":"Name of the authority that performed the test","description":"Name of the authority that performed the test.","type":"string","examples":["UK, South London Covid mobile testing station","EE, Saaremaa Immunity Testing Laboratory"]}},"required":["aki"]}},"required":["v","t","id","auth"]},"sig":{"title":"Signature","description":"A base64 encoded X-bit signature for the ct section created using the signing authority's private key.","$comment":"TODO(explain in more detail how to create certs etc).","type":"string"}},"required":["ct","sig"]}