From 31e787ace8d8dd93d733e171a64039fe0a1c4071 Mon Sep 17 00:00:00 2001 From: icetrust0212 Date: Wed, 3 Apr 2024 23:09:05 -0400 Subject: [PATCH 1/4] add schema for zkpass --- credential/zkpass/v0.1.0/icon.svg | 1 + credential/zkpass/v0.1.0/schema.json | 93 ++++++++++++++++++++++++++++ 2 files changed, 94 insertions(+) create mode 100644 credential/zkpass/v0.1.0/icon.svg create mode 100644 credential/zkpass/v0.1.0/schema.json diff --git a/credential/zkpass/v0.1.0/icon.svg b/credential/zkpass/v0.1.0/icon.svg new file mode 100644 index 0000000..98eea91 --- /dev/null +++ b/credential/zkpass/v0.1.0/icon.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/credential/zkpass/v0.1.0/schema.json b/credential/zkpass/v0.1.0/schema.json new file mode 100644 index 0000000..763512d --- /dev/null +++ b/credential/zkpass/v0.1.0/schema.json @@ -0,0 +1,93 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://common.schemas.verida.io/credential/zkpass/v0.1.0/schema.json", + "title": "Schema for ZKPass", + "description": "A schema for zkpass credential", + "type": "object", + "appearance": { + "style": { + "color": "#4bbf95", + "icon": "./icon.svg" + } + }, + "database": { + "name": "zkpass_credentials", + "indexes": { + "taskId": ["taskId"] + } + }, + "allOf": [ + { + "$ref": "https://common.schemas.verida.io/core/base/schema.json" + }, + { + "properties": { + "taskId": { + "title": "Task ID", + "description": "Unique id of the task allocated by the allocator node", + "type": "string" + }, + "publicFields": { + "title": "ZkPass PublicFields", + "description": "Values of public fields defined in schema", + "type": "array", + "items": { + "type": "object" + } + }, + "allocatorAddress": { + "title": "Allocator Address", + "description": "The address of the allocator node", + "type": "string" + }, + "publicFieldsHash": { + "title": "PublicFields", + "description": "Hash of public field values", + "type": "string" + }, + "allocatorSignature": { + "title": "Allocator Signature", + "description": "Signature of the task meta data by the allocator node", + "type": "string" + }, + "uHash": { + "title": "UHash", + "description": "Hash value of user unique id in the data source", + "type": "string" + }, + "validatorAddress": { + "title": "ValidatorAddress", + "description": "The address of the validator node", + "type": "string" + }, + "validatorSignature": { + "title": "Validator Signature", + "description": "The signature of the verification result by the allocator node", + "type": "string" + }, + "zkPassSchemaId": { + "title": "ZkPass Schema ID", + "description": "The schema ID that added in the project", + "type": "string" + }, + "zkPassSchemaLabel": { + "title": "Schema Label", + "description": "The schema label that added in the project", + "type": "string" + } + }, + "required": [ + "taskId", + "publicFields", + "publicFieldsHash", + "allocatorSignature", + "allocatorSignature", + "uHash", + "validatorAddress", + "validatorSignature", + "zkPassSchemaId", + "zkPassSchemaLabel" + ] + } + ] +} \ No newline at end of file From 7373bcd045494ff5f27f17749e6c2518c7b15921 Mon Sep 17 00:00:00 2001 From: icetrust0212 Date: Thu, 4 Apr 2024 07:32:08 -0400 Subject: [PATCH 2/4] remove public fields in required fields --- credential/zkpass/v0.1.0/schema.json | 2 -- 1 file changed, 2 deletions(-) diff --git a/credential/zkpass/v0.1.0/schema.json b/credential/zkpass/v0.1.0/schema.json index 763512d..7a65b23 100644 --- a/credential/zkpass/v0.1.0/schema.json +++ b/credential/zkpass/v0.1.0/schema.json @@ -78,8 +78,6 @@ }, "required": [ "taskId", - "publicFields", - "publicFieldsHash", "allocatorSignature", "allocatorSignature", "uHash", From 91a48378064b0797be7cc7a18563a361e2870fe0 Mon Sep 17 00:00:00 2001 From: icetrust0212 Date: Thu, 4 Apr 2024 18:20:38 -0400 Subject: [PATCH 3/4] fix according to review --- credential/zkpass/v0.1.0/schema.json | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/credential/zkpass/v0.1.0/schema.json b/credential/zkpass/v0.1.0/schema.json index 7a65b23..227d662 100644 --- a/credential/zkpass/v0.1.0/schema.json +++ b/credential/zkpass/v0.1.0/schema.json @@ -10,15 +10,9 @@ "icon": "./icon.svg" } }, - "database": { - "name": "zkpass_credentials", - "indexes": { - "taskId": ["taskId"] - } - }, "allOf": [ { - "$ref": "https://common.schemas.verida.io/core/base/schema.json" + "$ref": "https://core.schemas.verida.io/base/latest/schema.json" }, { "properties": { @@ -28,11 +22,11 @@ "type": "string" }, "publicFields": { - "title": "ZkPass PublicFields", + "title": "zkPass PublicFields", "description": "Values of public fields defined in schema", "type": "array", "items": { - "type": "object" + "type": "string" } }, "allocatorAddress": { @@ -66,7 +60,7 @@ "type": "string" }, "zkPassSchemaId": { - "title": "ZkPass Schema ID", + "title": "zkPass Schema ID", "description": "The schema ID that added in the project", "type": "string" }, @@ -74,17 +68,23 @@ "title": "Schema Label", "description": "The schema label that added in the project", "type": "string" + }, + "did": { + "title": "Verida Did", + "description": "Digital id of Verida network", + "type": "string" } }, "required": [ "taskId", - "allocatorSignature", + "allocatorAddress", "allocatorSignature", "uHash", "validatorAddress", "validatorSignature", "zkPassSchemaId", - "zkPassSchemaLabel" + "zkPassSchemaLabel", + "did" ] } ] From aae9eb99ade4b3c2e8a32cc11ca92f7c5a7b68cf Mon Sep 17 00:00:00 2001 From: icetrust0212 Date: Thu, 4 Apr 2024 22:01:22 -0400 Subject: [PATCH 4/4] update description --- credential/zkpass/v0.1.0/schema.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/credential/zkpass/v0.1.0/schema.json b/credential/zkpass/v0.1.0/schema.json index 227d662..2eb1a8d 100644 --- a/credential/zkpass/v0.1.0/schema.json +++ b/credential/zkpass/v0.1.0/schema.json @@ -71,7 +71,7 @@ }, "did": { "title": "Verida Did", - "description": "Digital id of Verida network", + "description": "Decentralized Identifier on the Verida network", "type": "string" } },