diff --git a/src/main/java/foundation/identity/did/jsonld/DIDContexts.java b/src/main/java/foundation/identity/did/jsonld/DIDContexts.java index 905aa8e..aca7df6 100644 --- a/src/main/java/foundation/identity/did/jsonld/DIDContexts.java +++ b/src/main/java/foundation/identity/did/jsonld/DIDContexts.java @@ -18,6 +18,7 @@ public class DIDContexts { public static final URI JSONLD_CONTEXT_W3ID_DID_V1 = URI.create("https://w3id.org/did/v1"); public static final URI JSONLD_CONTEXT_W3ID_DID_V011 = URI.create("https://w3id.org/did/v0.11"); public static final URI JSONLD_CONTEXT_W3ID_VERESONE_V1 = URI.create("https://w3id.org/veres-one/v1"); + public static final URI JSONLD_CONTEXT_W3ID_SECP256K1RECOVERY2020_V2 = URI.create("https://w3id.org/security/suites/secp256k1recovery-2020/v2"); public static final Map CONTEXTS; public static final DocumentLoader DOCUMENT_LOADER; @@ -38,6 +39,8 @@ public class DIDContexts { JsonDocument.of(MediaType.JSON_LD, Objects.requireNonNull(DIDContexts.class.getResourceAsStream("diddocument-context-w3id-did-v011.jsonld")))); CONTEXTS.put(JSONLD_CONTEXT_W3ID_VERESONE_V1, JsonDocument.of(MediaType.JSON_LD, Objects.requireNonNull(DIDContexts.class.getResourceAsStream("diddocument-context-w3id-veresone-v1.jsonld")))); + CONTEXTS.put(JSONLD_CONTEXT_W3ID_SECP256K1RECOVERY2020_V2, + JsonDocument.of(MediaType.JSON_LD, Objects.requireNonNull(DIDContexts.class.getResourceAsStream("diddocument-context-w3id-secp256k1recovery2020-v2.jsonld")))); for (Map.Entry context : CONTEXTS.entrySet()) { context.getValue().setDocumentUrl(context.getKey()); diff --git a/src/main/resources/foundation/identity/did/jsonld/diddocument-context-w3id-secp256k1recovery2020-v2.jsonld b/src/main/resources/foundation/identity/did/jsonld/diddocument-context-w3id-secp256k1recovery2020-v2.jsonld new file mode 100644 index 0000000..932a38f --- /dev/null +++ b/src/main/resources/foundation/identity/did/jsonld/diddocument-context-w3id-secp256k1recovery2020-v2.jsonld @@ -0,0 +1,87 @@ +{ + "@context": { + "id": "@id", + "type": "@type", + "@protected": true, + "proof": { + "@id": "https://w3id.org/security#proof", + "@type": "@id", + "@container": "@graph" + }, + "EcdsaSecp256k1RecoveryMethod2020": { + "@id": "https://identity.foundation/EcdsaSecp256k1RecoverySignature2020#EcdsaSecp256k1RecoveryMethod2020", + "@context": { + "@protected": true, + "id": "@id", + "type": "@type", + "controller": { + "@id": "https://w3id.org/security#controller", + "@type": "@id" + }, + "blockchainAccountId": "https://w3id.org/security#blockchainAccountId", + "publicKeyJwk": { + "@id": "https://w3id.org/security#publicKeyJwk", + "@type": "@json" + } + } + }, + "EcdsaSecp256k1RecoverySignature2020": { + "@id": "https://identity.foundation/EcdsaSecp256k1RecoverySignature2020#EcdsaSecp256k1RecoverySignature2020", + "@context": { + "@protected": true, + "id": "@id", + "type": "@type", + "challenge": "https://w3id.org/security#challenge", + "created": { + "@id": "http://purl.org/dc/terms/created", + "@type": "http://www.w3.org/2001/XMLSchema#dateTime" + }, + "domain": "https://w3id.org/security#domain", + "expires": { + "@id": "https://w3id.org/security#expiration", + "@type": "http://www.w3.org/2001/XMLSchema#dateTime" + }, + "jws": "https://w3id.org/security#jws", + "nonce": "https://w3id.org/security#nonce", + "proofPurpose": { + "@id": "https://w3id.org/security#proofPurpose", + "@type": "@vocab", + "@context": { + "@protected": true, + "id": "@id", + "type": "@type", + "assertionMethod": { + "@id": "https://w3id.org/security#assertionMethod", + "@type": "@id", + "@container": "@set" + }, + "authentication": { + "@id": "https://w3id.org/security#authenticationMethod", + "@type": "@id", + "@container": "@set" + }, + "capabilityInvocation": { + "@id": "https://w3id.org/security#capabilityInvocationMethod", + "@type": "@id", + "@container": "@set" + }, + "capabilityDelegation": { + "@id": "https://w3id.org/security#capabilityDelegationMethod", + "@type": "@id", + "@container": "@set" + }, + "keyAgreement": { + "@id": "https://w3id.org/security#keyAgreementMethod", + "@type": "@id", + "@container": "@set" + } + } + }, + "verificationMethod": { + "@id": "https://w3id.org/security#verificationMethod", + "@type": "@id" + } + } + } + } +}