From fab4d8c4d21e22b88517c44f8314f2277226c760 Mon Sep 17 00:00:00 2001 From: Holash Chand Date: Tue, 12 Mar 2024 14:23:17 +0530 Subject: [PATCH] added https://www.w3.org/ns/did/v1 response to support offline --- .../src/credentials/documents.ts | 59 ++++++++++++++++++- services/identity-service/src/vc/documents.ts | 57 ++++++++++++++++++ 2 files changed, 115 insertions(+), 1 deletion(-) diff --git a/services/credentials-service/src/credentials/documents.ts b/services/credentials-service/src/credentials/documents.ts index 1000a0f5d..71314f1ba 100644 --- a/services/credentials-service/src/credentials/documents.ts +++ b/services/credentials-service/src/credentials/documents.ts @@ -867,5 +867,62 @@ export const DOCUMENTS = { } } } - } + }, + "https://www.w3.org/ns/did/v1": { + "@context": { + "@protected": true, + "id": "@id", + "type": "@type", + "alsoKnownAs": { + "@id": "https://www.w3.org/ns/activitystreams#alsoKnownAs", + "@type": "@id" + }, + "assertionMethod": { + "@id": "https://w3id.org/security#assertionMethod", + "@type": "@id", + "@container": "@set" + }, + "authentication": { + "@id": "https://w3id.org/security#authenticationMethod", + "@type": "@id", + "@container": "@set" + }, + "capabilityDelegation": { + "@id": "https://w3id.org/security#capabilityDelegationMethod", + "@type": "@id", + "@container": "@set" + }, + "capabilityInvocation": { + "@id": "https://w3id.org/security#capabilityInvocationMethod", + "@type": "@id", + "@container": "@set" + }, + "controller": { + "@id": "https://w3id.org/security#controller", + "@type": "@id" + }, + "keyAgreement": { + "@id": "https://w3id.org/security#keyAgreementMethod", + "@type": "@id", + "@container": "@set" + }, + "service": { + "@id": "https://www.w3.org/ns/did#service", + "@type": "@id", + "@context": { + "@protected": true, + "id": "@id", + "type": "@type", + "serviceEndpoint": { + "@id": "https://www.w3.org/ns/did#serviceEndpoint", + "@type": "@id" + } + } + }, + "verificationMethod": { + "@id": "https://w3id.org/security#verificationMethod", + "@type": "@id" + } + } +} } diff --git a/services/identity-service/src/vc/documents.ts b/services/identity-service/src/vc/documents.ts index 5b586be67..8c0829ad2 100644 --- a/services/identity-service/src/vc/documents.ts +++ b/services/identity-service/src/vc/documents.ts @@ -867,5 +867,62 @@ export const DOCUMENTS = { } } } + }, + "https://www.w3.org/ns/did/v1": { + "@context": { + "@protected": true, + "id": "@id", + "type": "@type", + "alsoKnownAs": { + "@id": "https://www.w3.org/ns/activitystreams#alsoKnownAs", + "@type": "@id" + }, + "assertionMethod": { + "@id": "https://w3id.org/security#assertionMethod", + "@type": "@id", + "@container": "@set" + }, + "authentication": { + "@id": "https://w3id.org/security#authenticationMethod", + "@type": "@id", + "@container": "@set" + }, + "capabilityDelegation": { + "@id": "https://w3id.org/security#capabilityDelegationMethod", + "@type": "@id", + "@container": "@set" + }, + "capabilityInvocation": { + "@id": "https://w3id.org/security#capabilityInvocationMethod", + "@type": "@id", + "@container": "@set" + }, + "controller": { + "@id": "https://w3id.org/security#controller", + "@type": "@id" + }, + "keyAgreement": { + "@id": "https://w3id.org/security#keyAgreementMethod", + "@type": "@id", + "@container": "@set" + }, + "service": { + "@id": "https://www.w3.org/ns/did#service", + "@type": "@id", + "@context": { + "@protected": true, + "id": "@id", + "type": "@type", + "serviceEndpoint": { + "@id": "https://www.w3.org/ns/did#serviceEndpoint", + "@type": "@id" + } + } + }, + "verificationMethod": { + "@id": "https://w3id.org/security#verificationMethod", + "@type": "@id" + } + } } }