diff --git a/packages/vc-handler-ld-local/contexts/did_v0.11.jsonld b/packages/vc-handler-ld-local/contexts/did_v0.11.jsonld deleted file mode 100644 index 646c00be2..000000000 --- a/packages/vc-handler-ld-local/contexts/did_v0.11.jsonld +++ /dev/null @@ -1,58 +0,0 @@ -{ - "@context": { - "@version": 1.1, - "id": "@id", - "type": "@type", - - "dc": "http://purl.org/dc/terms/", - "schema": "http://schema.org/", - "sec": "https://w3id.org/security#", - "didv": "https://w3id.org/did#", - "xsd": "http://www.w3.org/2001/XMLSchema#", - - "EcdsaSecp256k1Signature2019": "sec:EcdsaSecp256k1Signature2019", - "EcdsaSecp256k1VerificationKey2019": "sec:EcdsaSecp256k1VerificationKey2019", - "Ed25519Signature2018": "sec:Ed25519Signature2018", - "Ed25519VerificationKey2018": "sec:Ed25519VerificationKey2018", - "RsaSignature2018": "sec:RsaSignature2018", - "RsaVerificationKey2018": "sec:RsaVerificationKey2018", - "SchnorrSecp256k1Signature2019": "sec:SchnorrSecp256k1Signature2019", - "SchnorrSecp256k1VerificationKey2019": "sec:SchnorrSecp256k1VerificationKey2019", - "ServiceEndpointProxyService": "didv:ServiceEndpointProxyService", - - "allowedAction": "sec:allowedAction", - "assertionMethod": {"@id": "sec:assertionMethod", "@type": "@id", "@container": "@set"}, - "authentication": {"@id": "sec:authenticationMethod", "@type": "@id", "@container": "@set"}, - "capability": {"@id": "sec:capability", "@type": "@id"}, - "capabilityAction": "sec:capabilityAction", - "capabilityChain": {"@id": "sec:capabilityChain", "@type": "@id", "@container": "@list"}, - "capabilityDelegation": {"@id": "sec:capabilityDelegationMethod", "@type": "@id", "@container": "@set"}, - "capabilityInvocation": {"@id": "sec:capabilityInvocationMethod", "@type": "@id", "@container": "@set"}, - "capabilityStatusList": {"@id": "sec:capabilityStatusList", "@type": "@id"}, - "canonicalizationAlgorithm": "sec:canonicalizationAlgorithm", - "caveat": {"@id": "sec:caveat", "@type": "@id", "@container": "@set"}, - "challenge": "sec:challenge", - "controller": {"@id": "sec:controller", "@type": "@id"}, - "created": {"@id": "dc:created", "@type": "xsd:dateTime"}, - "creator": {"@id": "dc:creator", "@type": "@id"}, - "delegator": {"@id": "sec:delegator", "@type": "@id"}, - "domain": "sec:domain", - "expirationDate": {"@id": "sec:expiration", "@type": "xsd:dateTime"}, - "invocationTarget": {"@id": "sec:invocationTarget", "@type": "@id"}, - "invoker": {"@id": "sec:invoker", "@type": "@id"}, - "jws": "sec:jws", - "keyAgreement": {"@id": "sec:keyAgreementMethod", "@type": "@id", "@container": "@set"}, - "nonce": "sec:nonce", - "owner": {"@id": "sec:owner", "@type": "@id"}, - "proof": {"@id": "sec:proof", "@type": "@id", "@container": "@graph"}, - "proofPurpose": {"@id": "sec:proofPurpose", "@type": "@vocab"}, - "proofValue": "sec:proofValue", - "publicKey": {"@id": "sec:publicKey", "@type": "@id", "@container": "@set"}, - "publicKeyBase58": "sec:publicKeyBase58", - "publicKeyPem": "sec:publicKeyPem", - "revoked": {"@id": "sec:revoked", "@type": "xsd:dateTime"}, - "service": {"@id": "didv:service", "@type": "@id", "@container": "@set"}, - "serviceEndpoint": {"@id": "didv:serviceEndpoint", "@type": "@id"}, - "verificationMethod": {"@id": "sec:verificationMethod", "@type": "@id"} - } -} diff --git a/packages/vc-handler-ld-local/contexts/kyc-v1.jsonld b/packages/vc-handler-ld-local/contexts/kyc-v1.jsonld deleted file mode 100644 index 306d0174e..000000000 --- a/packages/vc-handler-ld-local/contexts/kyc-v1.jsonld +++ /dev/null @@ -1,8 +0,0 @@ -{ - "@context": { - "@version": 1.1, - "@protected": true, - "VerifiableKyc": "https://veramo.io/contexts/kyc#VerifiableKyc", - "name": "https://schema.org/name" - } -} diff --git a/packages/vc-handler-ld-local/contexts/lds-ecdsa-secp256k1-recovery2020-0.0.jsonld b/packages/vc-handler-ld-local/contexts/lds-ecdsa-secp256k1-recovery2020-0.0.jsonld deleted file mode 100644 index c79835e3c..000000000 --- a/packages/vc-handler-ld-local/contexts/lds-ecdsa-secp256k1-recovery2020-0.0.jsonld +++ /dev/null @@ -1,60 +0,0 @@ -{ - "@context": { - "@version": 1.1, - "id": "@id", - "type": "@type", - "esrs2020": "https://identity.foundation/EcdsaSecp256k1RecoverySignature2020#", - - "EcdsaSecp256k1RecoverySignature2020": { - "@id": "https://w3id.org/security#EcdsaSecp256k1RecoverySignature2020", - "@context": { - "@version": 1.1, - "@protected": true, - - "id": "@id", - "type": "@type", - - "sec": "https://w3id.org/security#", - "xsd": "http://www.w3.org/2001/XMLSchema#", - - "challenge": "sec:challenge", - "created": {"@id": "http://purl.org/dc/terms/created", "@type": "xsd:dateTime"}, - "domain": "sec:domain", - "expires": {"@id": "sec:expiration", "@type": "xsd:dateTime"}, - "jws": "sec:jws", - "nonce": "sec:nonce", - "proofPurpose": { - "@id": "sec:proofPurpose", - "@type": "@vocab", - "@context": { - "@version": 1.1, - "@protected": true, - - "id": "@id", - "type": "@type", - - "sec": "https://w3id.org/security#", - - "assertionMethod": {"@id": "sec:assertionMethod", "@type": "@id", "@container": "@set"}, - "authentication": {"@id": "sec:authenticationMethod", "@type": "@id", "@container": "@set"} - } - }, - "proofValue": "sec:proofValue", - "verificationMethod": {"@id": "sec:verificationMethod", "@type": "@id"} - } - }, - - "EcdsaSecp256k1RecoveryMethod2020": "esrs2020:EcdsaSecp256k1RecoveryMethod2020", - "publicKeyJwk": { - "@id": "esrs2020:publicKeyJwk", - "@type": "@json" - }, - "privateKeyJwk": { - "@id": "esrs2020:privateKeyJwk", - "@type": "@json" - }, - "publicKeyHex": "esrs2020:publicKeyHex", - "privateKeyHex": "esrs2020:privateKeyHex", - "ethereumAddress": "esrs2020:ethereumAddress" - } -} diff --git a/packages/vc-handler-ld-local/contexts/odrl.jsonld b/packages/vc-handler-ld-local/contexts/odrl.jsonld deleted file mode 100644 index e779e87f7..000000000 --- a/packages/vc-handler-ld-local/contexts/odrl.jsonld +++ /dev/null @@ -1,200 +0,0 @@ -{ - "@context": { - "odrl": "http://www.w3.org/ns/odrl/2/", - "rdf": "http://www.w3.org/1999/02/22-rdf-syntax-ns#", - "rdfs": "http://www.w3.org/2000/01/rdf-schema#", - "owl": "http://www.w3.org/2002/07/owl#", - "skos": "http://www.w3.org/2004/02/skos/core#", - "dct": "http://purl.org/dc/terms/", - "xsd": "http://www.w3.org/2001/XMLSchema#", - "vcard": "http://www.w3.org/2006/vcard/ns#", - "foaf": "http://xmlns.com/foaf/0.1/", - "schema": "http://schema.org/", - "cc": "http://creativecommons.org/ns#", - - "uid": "@id", - "type": "@type", - - "Policy": "odrl:Policy", - "Rule": "odrl:Rule", - "profile": {"@type": "@id", "@id": "odrl:profile"}, - - "inheritFrom": {"@type": "@id", "@id": "odrl:inheritFrom"}, - - "ConflictTerm": "odrl:ConflictTerm", - "conflict": {"@type": "@vocab", "@id": "odrl:conflict"}, - "perm": "odrl:perm", - "prohibit": "odrl:prohibit", - "invalid": "odrl:invalid", - - "Agreement": "odrl:Agreement", - "Assertion": "odrl:Assertion", - "Offer": "odrl:Offer", - "Privacy": "odrl:Privacy", - "Request": "odrl:Request", - "Set": "odrl:Set", - "Ticket": "odrl:Ticket", - - "Asset": "odrl:Asset", - "AssetCollection": "odrl:AssetCollection", - "relation": {"@type": "@id", "@id": "odrl:relation"}, - "hasPolicy": {"@type": "@id", "@id": "odrl:hasPolicy"}, - - "target": {"@type": "@id", "@id": "odrl:target"}, - "output": {"@type": "@id", "@id": "odrl:output"}, - - "partOf": {"@type": "@id", "@id": "odrl:partOf"}, - "source": {"@type": "@id", "@id": "odrl:source"}, - - "Party": "odrl:Party", - "PartyCollection": "odrl:PartyCollection", - "function": {"@type": "@vocab", "@id": "odrl:function"}, - "PartyScope": "odrl:PartyScope", - - "assignee": {"@type": "@id", "@id": "odrl:assignee"}, - "assigner": {"@type": "@id", "@id": "odrl:assigner"}, - "assigneeOf": {"@type": "@id", "@id": "odrl:assigneeOf"}, - "assignerOf": {"@type": "@id", "@id": "odrl:assignerOf"}, - "attributedParty": {"@type": "@id", "@id": "odrl:attributedParty"}, - "attributingParty": {"@type": "@id", "@id": "odrl:attributingParty"}, - "compensatedParty": {"@type": "@id", "@id": "odrl:compensatedParty"}, - "compensatingParty": {"@type": "@id", "@id": "odrl:compensatingParty"}, - "consentingParty": {"@type": "@id", "@id": "odrl:consentingParty"}, - "consentedParty": {"@type": "@id", "@id": "odrl:consentedParty"}, - "informedParty": {"@type": "@id", "@id": "odrl:informedParty"}, - "informingParty": {"@type": "@id", "@id": "odrl:informingParty"}, - "trackingParty": {"@type": "@id", "@id": "odrl:trackingParty"}, - "trackedParty": {"@type": "@id", "@id": "odrl:trackedParty"}, - "contractingParty": {"@type": "@id", "@id": "odrl:contractingParty"}, - "contractedParty": {"@type": "@id", "@id": "odrl:contractedParty"}, - - "Action": "odrl:Action", - "action": {"@type": "@vocab", "@id": "odrl:action"}, - "includedIn": {"@type": "@id", "@id": "odrl:includedIn"}, - "implies": {"@type": "@id", "@id": "odrl:implies"}, - - "Permission": "odrl:Permission", - "permission": {"@type": "@id", "@id": "odrl:permission"}, - - "Prohibition": "odrl:Prohibition", - "prohibition": {"@type": "@id", "@id": "odrl:prohibition"}, - - "obligation": {"@type": "@id", "@id": "odrl:obligation"}, - - "use": "odrl:use", - "grantUse": "odrl:grantUse", - "aggregate": "odrl:aggregate", - "annotate": "odrl:annotate", - "anonymize": "odrl:anonymize", - "archive": "odrl:archive", - "concurrentUse": "odrl:concurrentUse", - "derive": "odrl:derive", - "digitize": "odrl:digitize", - "display": "odrl:display", - "distribute": "odrl:distribute", - "execute": "odrl:execute", - "extract": "odrl:extract", - "give": "odrl:give", - "index": "odrl:index", - "install": "odrl:install", - "modify": "odrl:modify", - "move": "odrl:move", - "play": "odrl:play", - "present": "odrl:present", - "print": "odrl:print", - "read": "odrl:read", - "reproduce": "odrl:reproduce", - "sell": "odrl:sell", - "stream": "odrl:stream", - "textToSpeech": "odrl:textToSpeech", - "transfer": "odrl:transfer", - "transform": "odrl:transform", - "translate": "odrl:translate", - - "Duty": "odrl:Duty", - "duty": {"@type": "@id", "@id": "odrl:duty"}, - "consequence": {"@type": "@id", "@id": "odrl:consequence"}, - "remedy": {"@type": "@id", "@id": "odrl:remedy"}, - - "acceptTracking": "odrl:acceptTracking", - "attribute": "odrl:attribute", - "compensate": "odrl:compensate", - "delete": "odrl:delete", - "ensureExclusivity": "odrl:ensureExclusivity", - "include": "odrl:include", - "inform": "odrl:inform", - "nextPolicy": "odrl:nextPolicy", - "obtainConsent": "odrl:obtainConsent", - "reviewPolicy": "odrl:reviewPolicy", - "uninstall": "odrl:uninstall", - "watermark": "odrl:watermark", - - "Constraint": "odrl:Constraint", - "LogicalConstraint": "odrl:LogicalConstraint", - "constraint": {"@type": "@id", "@id": "odrl:constraint"}, - "refinement": {"@type": "@id", "@id": "odrl:refinement"}, - "Operator": "odrl:Operator", - "operator": {"@type": "@vocab", "@id": "odrl:operator"}, - "RightOperand": "odrl:RightOperand", - "rightOperand": "odrl:rightOperand", - "rightOperandReference":{"@type": "xsd:anyURI", "@id": "odrl:rightOperandReference"}, - "LeftOperand": "odrl:LeftOperand", - "leftOperand": {"@type": "@vocab", "@id": "odrl:leftOperand"}, - "unit": "odrl:unit", - "dataType": {"@type": "xsd:anyType", "@id": "odrl:datatype"}, - "status": "odrl:status", - - "absolutePosition": "odrl:absolutePosition", - "absoluteSpatialPosition": "odrl:absoluteSpatialPosition", - "absoluteTemporalPosition":"odrl:absoluteTemporalPosition", - "absoluteSize": "odrl:absoluteSize", - "count": "odrl:count", - "dateTime": "odrl:dateTime", - "delayPeriod": "odrl:delayPeriod", - "deliveryChannel": "odrl:deliveryChannel", - "elapsedTime": "odrl:elapsedTime", - "event": "odrl:event", - "fileFormat": "odrl:fileFormat", - "industry": "odrl:industry:", - "language": "odrl:language", - "media": "odrl:media", - "meteredTime": "odrl:meteredTime", - "payAmount": "odrl:payAmount", - "percentage": "odrl:percentage", - "product": "odrl:product", - "purpose": "odrl:purpose", - "recipient": "odrl:recipient", - "relativePosition": "odrl:relativePosition", - "relativeSpatialPosition": "odrl:relativeSpatialPosition", - "relativeTemporalPosition":"odrl:relativeTemporalPosition", - "relativeSize": "odrl:relativeSize", - "resolution": "odrl:resolution", - "spatial": "odrl:spatial", - "spatialCoordinates": "odrl:spatialCoordinates", - "systemDevice": "odrl:systemDevice", - "timeInterval": "odrl:timeInterval", - "unitOfCount": "odrl:unitOfCount", - "version": "odrl:version", - "virtualLocation": "odrl:virtualLocation", - - "eq": "odrl:eq", - "gt": "odrl:gt", - "gteq": "odrl:gteq", - "lt": "odrl:lt", - "lteq": "odrl:lteq", - "neq": "odrl:neg", - "isA": "odrl:isA", - "hasPart": "odrl:hasPart", - "isPartOf": "odrl:isPartOf", - "isAllOf": "odrl:isAllOf", - "isAnyOf": "odrl:isAnyOf", - "isNoneOf": "odrl:isNoneOf", - "or": "odrl:or", - "xone": "odrl:xone", - "and": "odrl:and", - "andSequence": "odrl:andSequence", - - "policyUsage": "odrl:policyUsage" - - } -} diff --git a/packages/vc-handler-ld-local/contexts/profile-v1.jsonld b/packages/vc-handler-ld-local/contexts/profile-v1.jsonld deleted file mode 100644 index 925515f8a..000000000 --- a/packages/vc-handler-ld-local/contexts/profile-v1.jsonld +++ /dev/null @@ -1,8 +0,0 @@ -{ - "@context": { - "@version": 1.1, - "@protected": true, - "Profile": "https://veramo.io/contexts/profile#Profile", - "name": "https://schema.org/name" - } -} diff --git a/packages/vc-handler-ld-local/contexts/socialmedia-v1.jsonld b/packages/vc-handler-ld-local/contexts/socialmedia-v1.jsonld deleted file mode 100644 index 50e0ed8c4..000000000 --- a/packages/vc-handler-ld-local/contexts/socialmedia-v1.jsonld +++ /dev/null @@ -1,7 +0,0 @@ -{ - "@context": { - "@version": 1.1, - "@protected": true, - "VerifableSocialMediaPosting": "https://veramo.io/contexts/socialmedia#VerifableSocialMediaPosting" - } -} diff --git a/packages/vc-handler-ld-local/contexts/w3_2018_credentials_examples_v1.jsonld b/packages/vc-handler-ld-local/contexts/w3_2018_credentials_examples_v1.jsonld deleted file mode 100644 index 173626c76..000000000 --- a/packages/vc-handler-ld-local/contexts/w3_2018_credentials_examples_v1.jsonld +++ /dev/null @@ -1,53 +0,0 @@ -{ - "@context": [{ - "@version": 1.1 - },"https://www.w3.org/ns/odrl.jsonld", { - "ex": "https://example.org/examples#", - "schema": "http://schema.org/", - "rdf": "http://www.w3.org/1999/02/22-rdf-syntax-ns#", - - "3rdPartyCorrelation": "ex:3rdPartyCorrelation", - "AllVerifiers": "ex:AllVerifiers", - "Archival": "ex:Archival", - "BachelorDegree": "ex:BachelorDegree", - "Child": "ex:Child", - "CLCredentialDefinition2019": "ex:CLCredentialDefinition2019", - "CLSignature2019": "ex:CLSignature2019", - "IssuerPolicy": "ex:IssuerPolicy", - "HolderPolicy": "ex:HolderPolicy", - "Mother": "ex:Mother", - "RelationshipCredential": "ex:RelationshipCredential", - "UniversityDegreeCredential": "ex:UniversityDegreeCredential", - "AlumniCredential": "ex:AlumniCredential", - "DisputeCredential": "ex:DisputeCredential", - "PrescriptionCredential": "ex:PrescriptionCredential", - "ZkpExampleSchema2018": "ex:ZkpExampleSchema2018", - - "issuerData": "ex:issuerData", - "attributes": "ex:attributes", - "signature": "ex:signature", - "signatureCorrectnessProof": "ex:signatureCorrectnessProof", - "primaryProof": "ex:primaryProof", - "nonRevocationProof": "ex:nonRevocationProof", - - "alumniOf": {"@id": "schema:alumniOf", "@type": "rdf:HTML"}, - "child": {"@id": "ex:child", "@type": "@id"}, - "degree": "ex:degree", - "degreeType": "ex:degreeType", - "degreeSchool": "ex:degreeSchool", - "college": "ex:college", - "name": {"@id": "schema:name", "@type": "rdf:HTML"}, - "givenName": "schema:givenName", - "familyName": "schema:familyName", - "parent": {"@id": "ex:parent", "@type": "@id"}, - "referenceId": "ex:referenceId", - "documentPresence": "ex:documentPresence", - "evidenceDocument": "ex:evidenceDocument", - "spouse": "schema:spouse", - "subjectPresence": "ex:subjectPresence", - "verifier": {"@id": "ex:verifier", "@type": "@id"}, - "currentStatus": "ex:currentStatus", - "statusReason": "ex:statusReason", - "prescription": "ex:prescription" - }] -} diff --git a/packages/vc-handler-ld-local/package.json b/packages/vc-handler-ld-local/package.json index 5b43b47f9..0486fcb18 100644 --- a/packages/vc-handler-ld-local/package.json +++ b/packages/vc-handler-ld-local/package.json @@ -10,8 +10,7 @@ } }, "scripts": { - "build": "tsc --build", - "build:copyfiles": "copyfiles contexts/*.* ./dist" + "build": "tsc" }, "dependencies": { "@sphereon/ssi-sdk-core": "^0.8.1-next.121", @@ -82,7 +81,6 @@ "files": [ "dist/**/*", "src/**/*", - "contexts", "README.md", "plugin.schema.json", "LICENSE" diff --git a/packages/vc-handler-ld-local/contexts/X25519KeyAgreementKey2019.jsonld b/packages/vc-handler-ld-local/src/contexts/X25519KeyAgreementKey2019.json similarity index 100% rename from packages/vc-handler-ld-local/contexts/X25519KeyAgreementKey2019.jsonld rename to packages/vc-handler-ld-local/src/contexts/X25519KeyAgreementKey2019.json diff --git a/packages/vc-handler-ld-local/contexts/bbs-bls-signature-2020-v1.jsonld b/packages/vc-handler-ld-local/src/contexts/bbs-bls-signature-2020-v1.json similarity index 100% rename from packages/vc-handler-ld-local/contexts/bbs-bls-signature-2020-v1.jsonld rename to packages/vc-handler-ld-local/src/contexts/bbs-bls-signature-2020-v1.json diff --git a/packages/vc-handler-ld-local/contexts/citizenship-v1.jsonld b/packages/vc-handler-ld-local/src/contexts/citizenship-v1.json similarity index 81% rename from packages/vc-handler-ld-local/contexts/citizenship-v1.jsonld rename to packages/vc-handler-ld-local/src/contexts/citizenship-v1.json index 4c8e0aefe..3f68759e8 100644 --- a/packages/vc-handler-ld-local/contexts/citizenship-v1.jsonld +++ b/packages/vc-handler-ld-local/src/contexts/citizenship-v1.json @@ -6,7 +6,7 @@ "name": "http://schema.org/name", "description": "http://schema.org/description", "identifier": "http://schema.org/identifier", - "image": {"@id": "http://schema.org/image", "@type": "@id"}, + "image": { "@id": "http://schema.org/image", "@type": "@id" }, "PermanentResidentCard": { "@id": "https://w3id.org/citizenship#PermanentResidentCard", @@ -20,7 +20,7 @@ "description": "http://schema.org/description", "name": "http://schema.org/name", "identifier": "http://schema.org/identifier", - "image": {"@id": "http://schema.org/image", "@type": "@id"} + "image": { "@id": "http://schema.org/image", "@type": "@id" } } }, @@ -38,14 +38,14 @@ "xsd": "http://www.w3.org/2001/XMLSchema#", "birthCountry": "ctzn:birthCountry", - "birthDate": {"@id": "schema:birthDate", "@type": "xsd:dateTime"}, + "birthDate": { "@id": "schema:birthDate", "@type": "xsd:dateTime" }, "commuterClassification": "ctzn:commuterClassification", "familyName": "schema:familyName", "gender": "schema:gender", "givenName": "schema:givenName", "lprCategory": "ctzn:lprCategory", "lprNumber": "ctzn:lprNumber", - "residentSince": {"@id": "ctzn:residentSince", "@type": "xsd:dateTime"} + "residentSince": { "@id": "ctzn:residentSince", "@type": "xsd:dateTime" } } }, diff --git a/packages/vc-handler-ld-local/src/contexts/did_v0.11.json b/packages/vc-handler-ld-local/src/contexts/did_v0.11.json new file mode 100644 index 000000000..17f589b95 --- /dev/null +++ b/packages/vc-handler-ld-local/src/contexts/did_v0.11.json @@ -0,0 +1,64 @@ +{ + "@context": { + "@version": 1.1, + "id": "@id", + "type": "@type", + + "dc": "http://purl.org/dc/terms/", + "schema": "http://schema.org/", + "sec": "https://w3id.org/security#", + "didv": "https://w3id.org/did#", + "xsd": "http://www.w3.org/2001/XMLSchema#", + + "EcdsaSecp256k1Signature2019": "sec:EcdsaSecp256k1Signature2019", + "EcdsaSecp256k1VerificationKey2019": "sec:EcdsaSecp256k1VerificationKey2019", + "Ed25519Signature2018": "sec:Ed25519Signature2018", + "Ed25519VerificationKey2018": "sec:Ed25519VerificationKey2018", + "Ed25519Signature2020": "sec:Ed25519Signature2020", + "Ed25519VerificationKey2020": "sec:Ed25519VerificationKey2020", + "JsonWebSignature2020": "sec:JsonWebSignature2020", + "JsonWebKey2020": "sec:JsonWebKey2020", + "RsaSignature2018": "sec:RsaSignature2018", + "RsaVerificationKey2018": "sec:RsaVerificationKey2018", + "SchnorrSecp256k1Signature2019": "sec:SchnorrSecp256k1Signature2019", + "SchnorrSecp256k1VerificationKey2019": "sec:SchnorrSecp256k1VerificationKey2019", + "ServiceEndpointProxyService": "didv:ServiceEndpointProxyService", + + "allowedAction": "sec:allowedAction", + "assertionMethod": { "@id": "sec:assertionMethod", "@type": "@id", "@container": "@set" }, + "authentication": { "@id": "sec:authenticationMethod", "@type": "@id", "@container": "@set" }, + "capability": { "@id": "sec:capability", "@type": "@id" }, + "capabilityAction": "sec:capabilityAction", + "capabilityChain": { "@id": "sec:capabilityChain", "@type": "@id", "@container": "@list" }, + "capabilityDelegation": { "@id": "sec:capabilityDelegationMethod", "@type": "@id", "@container": "@set" }, + "capabilityInvocation": { "@id": "sec:capabilityInvocationMethod", "@type": "@id", "@container": "@set" }, + "capabilityStatusList": { "@id": "sec:capabilityStatusList", "@type": "@id" }, + "canonicalizationAlgorithm": "sec:canonicalizationAlgorithm", + "caveat": { "@id": "sec:caveat", "@type": "@id", "@container": "@set" }, + "challenge": "sec:challenge", + "controller": { "@id": "sec:controller", "@type": "@id" }, + "created": { "@id": "dc:created", "@type": "xsd:dateTime" }, + "creator": { "@id": "dc:creator", "@type": "@id" }, + "delegator": { "@id": "sec:delegator", "@type": "@id" }, + "domain": "sec:domain", + "expirationDate": { "@id": "sec:expiration", "@type": "xsd:dateTime" }, + "invocationTarget": { "@id": "sec:invocationTarget", "@type": "@id" }, + "invoker": { "@id": "sec:invoker", "@type": "@id" }, + "jws": "sec:jws", + "keyAgreement": { "@id": "sec:keyAgreementMethod", "@type": "@id", "@container": "@set" }, + "nonce": "sec:nonce", + "owner": { "@id": "sec:owner", "@type": "@id" }, + "proof": { "@id": "sec:proof", "@type": "@id", "@container": "@graph" }, + "proofPurpose": { "@id": "sec:proofPurpose", "@type": "@vocab" }, + "proofValue": "sec:proofValue", + "publicKey": { "@id": "sec:publicKey", "@type": "@id", "@container": "@set" }, + "publicKeyBase58": "sec:publicKeyBase58", + "publicKeyMultibase": "sec:publicKeyMultibase", + "publicKeyJwk": "sec:publicKeyJwk", + "publicKeyPem": "sec:publicKeyPem", + "revoked": { "@id": "sec:revoked", "@type": "xsd:dateTime" }, + "service": { "@id": "didv:service", "@type": "@id", "@container": "@set" }, + "serviceEndpoint": { "@id": "didv:serviceEndpoint", "@type": "@id" }, + "verificationMethod": { "@id": "sec:verificationMethod", "@type": "@id" } + } +} diff --git a/packages/vc-handler-ld-local/contexts/ed25519-signature-2018-v1.jsonld b/packages/vc-handler-ld-local/src/contexts/ed25519-signature-2018-v1.json similarity index 100% rename from packages/vc-handler-ld-local/contexts/ed25519-signature-2018-v1.jsonld rename to packages/vc-handler-ld-local/src/contexts/ed25519-signature-2018-v1.json diff --git a/packages/vc-handler-ld-local/contexts/ed25519-signature-2020-v1.jsonld b/packages/vc-handler-ld-local/src/contexts/ed25519-signature-2020-v1.json similarity index 81% rename from packages/vc-handler-ld-local/contexts/ed25519-signature-2020-v1.jsonld rename to packages/vc-handler-ld-local/src/contexts/ed25519-signature-2020-v1.json index b74da8c0b..30efe998f 100644 --- a/packages/vc-handler-ld-local/contexts/ed25519-signature-2020-v1.jsonld +++ b/packages/vc-handler-ld-local/src/contexts/ed25519-signature-2020-v1.json @@ -9,24 +9,7 @@ "@container": "@graph" }, "Ed25519VerificationKey2020": { - "@id": "https://w3id.org/security#Ed25519VerificationKey2020", - "@context": { - "@protected": true, - "id": "@id", - "type": "@type", - "controller": { - "@id": "https://w3id.org/security#controller", - "@type": "@id" - }, - "revoked": { - "@id": "https://w3id.org/security#revoked", - "@type": "http://www.w3.org/2001/XMLSchema#dateTime" - }, - "publicKeyMultibase": { - "@id": "https://w3id.org/security#publicKeyMultibase", - "@type": "https://w3id.org/security#multibase" - } - } + "@id": "https://w3id.org/security#Ed25519VerificationKey2020" }, "Ed25519Signature2020": { "@id": "https://w3id.org/security#Ed25519Signature2020", @@ -49,6 +32,7 @@ "@id": "https://w3id.org/security#proofPurpose", "@type": "@vocab", "@context": { + "@version": 1.1, "@protected": true, "id": "@id", "type": "@type", diff --git a/packages/vc-handler-ld-local/src/contexts/eip712.json b/packages/vc-handler-ld-local/src/contexts/eip712.json new file mode 100644 index 000000000..995be0260 --- /dev/null +++ b/packages/vc-handler-ld-local/src/contexts/eip712.json @@ -0,0 +1,93 @@ +{ + "@context": { + "@version": 1.1, + "@protected": true, + "Eip712SchemaValidator2021": "https://w3id.org/security#Eip712SchemaValidator2021", + "EthereumEip712Signature2021": { + "@id": "https://w3id.org/security#EthereumEip712Signature2021", + "@context": { + "@version": 1.1, + "@protected": true, + "id": "@id", + "type": "@type", + "created": { + "@id": "http://purl.org/dc/terms/created", + "@type": "http://www.w3.org/2001/XMLSchema#dateTime" + }, + "domain": "https://w3id.org/security#domain", + "proofPurpose": { + "@id": "https://w3id.org/security#proofPurpose", + "@type": "@vocab", + "@context": { + "@version": 1.1, + "@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" + } + } + }, + "eip712Domain": { + "@id": "https://w3c-ccg.github.io/ethereum-eip712-signature-2021-spec/#eip712-domain", + "@context": { + "@version": 1.1, + "@protected": true, + "id": "@id", + "type": "@type", + "messageSchema": { + "@id": "https://w3c-ccg.github.io/ethereum-eip712-signature-2021-spec/#message-schema", + "@type": "@json" + }, + "primaryType": "https://w3c-ccg.github.io/ethereum-eip712-signature-2021-spec/#primary-type", + "domain": { + "@id": "https://w3c-ccg.github.io/ethereum-eip712-signature-2021-spec/#domain", + "@type": "@json" + } + } + }, + "eip712": { + "@id": "https://w3c-ccg.github.io/ethereum-eip712-signature-2021-spec/#eip712-domain", + "@context": { + "@version": 1.1, + "@protected": true, + "id": "@id", + "type": "@type", + "types": { + "@id": "https://w3c-ccg.github.io/ethereum-eip712-signature-2021-spec/#message-schema", + "@type": "@json" + }, + "primaryType": "https://w3c-ccg.github.io/ethereum-eip712-signature-2021-spec/#primary-type", + "domain": { + "@id": "https://w3c-ccg.github.io/ethereum-eip712-signature-2021-spec/#domain", + "@type": "@json" + } + } + }, + "proofValue": "https://w3id.org/security#proofValue", + "verificationMethod": { + "@id": "https://w3id.org/security#verificationMethod", + "@type": "@id" + }, + "canonicalizationHash": "https://w3id.org/security/suites/eip712sig-2021#canonicalizationHash" + } + } + } +} diff --git a/packages/vc-handler-ld-local/src/contexts/json-web-signature-2020-v1.json b/packages/vc-handler-ld-local/src/contexts/json-web-signature-2020-v1.json new file mode 100644 index 000000000..d17b90cda --- /dev/null +++ b/packages/vc-handler-ld-local/src/contexts/json-web-signature-2020-v1.json @@ -0,0 +1,71 @@ +{ + "@context": { + "@version": 1.1, + "id": "@id", + "type": "@type", + "@protected": true, + "JsonWebKey2020": { + "@id": "https://w3id.org/security#JsonWebKey2020" + }, + "JsonWebSignature2020": { + "@id": "https://w3id.org/security#JsonWebSignature2020", + "@context": { + "@version": 1.1, + "id": "@id", + "type": "@type", + "@protected": true, + "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": { + "@version": 1.1, + "@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" + } + } + } + } +} diff --git a/packages/vc-handler-ld-local/contexts/jws-2020-v1.jsonld b/packages/vc-handler-ld-local/src/contexts/jws-2020-v1.json similarity index 100% rename from packages/vc-handler-ld-local/contexts/jws-2020-v1.jsonld rename to packages/vc-handler-ld-local/src/contexts/jws-2020-v1.json diff --git a/packages/vc-handler-ld-local/src/contexts/kyc-v1.json b/packages/vc-handler-ld-local/src/contexts/kyc-v1.json new file mode 100644 index 000000000..6b1ac65a9 --- /dev/null +++ b/packages/vc-handler-ld-local/src/contexts/kyc-v1.json @@ -0,0 +1,8 @@ +{ + "@context": { + "@version": 1.1, + "@protected": true, + "VerifiableKyc": "https://veramo.io/contexts/kyc#VerifiableKyc", + "name": "https://schema.org/name" + } +} diff --git a/packages/vc-handler-ld-local/src/contexts/lds-ecdsa-secp256k1-recovery2020-0.0.json b/packages/vc-handler-ld-local/src/contexts/lds-ecdsa-secp256k1-recovery2020-0.0.json new file mode 100644 index 000000000..2da92bda4 --- /dev/null +++ b/packages/vc-handler-ld-local/src/contexts/lds-ecdsa-secp256k1-recovery2020-0.0.json @@ -0,0 +1,21 @@ +{ + "@context": { + "@version": 1.1, + "id": "@id", + "type": "@type", + "esrs2020": "https://identity.foundation/EcdsaSecp256k1RecoverySignature2020#", + "EcdsaSecp256k1RecoverySignature2020": "esrs2020:EcdsaSecp256k1RecoverySignature2020", + "EcdsaSecp256k1RecoveryMethod2020": "esrs2020:EcdsaSecp256k1RecoveryMethod2020", + "publicKeyJwk": { + "@id": "esrs2020:publicKeyJwk", + "@type": "@json" + }, + "privateKeyJwk": { + "@id": "esrs2020:privateKeyJwk", + "@type": "@json" + }, + "publicKeyHex": "esrs2020:publicKeyHex", + "privateKeyHex": "esrs2020:privateKeyHex", + "ethereumAddress": "esrs2020:ethereumAddress" + } +} diff --git a/packages/vc-handler-ld-local/src/contexts/odrl.json b/packages/vc-handler-ld-local/src/contexts/odrl.json new file mode 100644 index 000000000..ccf791337 --- /dev/null +++ b/packages/vc-handler-ld-local/src/contexts/odrl.json @@ -0,0 +1,199 @@ +{ + "@context": { + "odrl": "http://www.w3.org/ns/odrl/2/", + "rdf": "http://www.w3.org/1999/02/22-rdf-syntax-ns#", + "rdfs": "http://www.w3.org/2000/01/rdf-schema#", + "owl": "http://www.w3.org/2002/07/owl#", + "skos": "http://www.w3.org/2004/02/skos/core#", + "dct": "http://purl.org/dc/terms/", + "xsd": "http://www.w3.org/2001/XMLSchema#", + "vcard": "http://www.w3.org/2006/vcard/ns#", + "foaf": "http://xmlns.com/foaf/0.1/", + "schema": "http://schema.org/", + "cc": "http://creativecommons.org/ns#", + + "uid": "@id", + "type": "@type", + + "Policy": "odrl:Policy", + "Rule": "odrl:Rule", + "profile": { "@type": "@id", "@id": "odrl:profile" }, + + "inheritFrom": { "@type": "@id", "@id": "odrl:inheritFrom" }, + + "ConflictTerm": "odrl:ConflictTerm", + "conflict": { "@type": "@vocab", "@id": "odrl:conflict" }, + "perm": "odrl:perm", + "prohibit": "odrl:prohibit", + "invalid": "odrl:invalid", + + "Agreement": "odrl:Agreement", + "Assertion": "odrl:Assertion", + "Offer": "odrl:Offer", + "Privacy": "odrl:Privacy", + "Request": "odrl:Request", + "Set": "odrl:Set", + "Ticket": "odrl:Ticket", + + "Asset": "odrl:Asset", + "AssetCollection": "odrl:AssetCollection", + "relation": { "@type": "@id", "@id": "odrl:relation" }, + "hasPolicy": { "@type": "@id", "@id": "odrl:hasPolicy" }, + + "target": { "@type": "@id", "@id": "odrl:target" }, + "output": { "@type": "@id", "@id": "odrl:output" }, + + "partOf": { "@type": "@id", "@id": "odrl:partOf" }, + "source": { "@type": "@id", "@id": "odrl:source" }, + + "Party": "odrl:Party", + "PartyCollection": "odrl:PartyCollection", + "function": { "@type": "@vocab", "@id": "odrl:function" }, + "PartyScope": "odrl:PartyScope", + + "assignee": { "@type": "@id", "@id": "odrl:assignee" }, + "assigner": { "@type": "@id", "@id": "odrl:assigner" }, + "assigneeOf": { "@type": "@id", "@id": "odrl:assigneeOf" }, + "assignerOf": { "@type": "@id", "@id": "odrl:assignerOf" }, + "attributedParty": { "@type": "@id", "@id": "odrl:attributedParty" }, + "attributingParty": { "@type": "@id", "@id": "odrl:attributingParty" }, + "compensatedParty": { "@type": "@id", "@id": "odrl:compensatedParty" }, + "compensatingParty": { "@type": "@id", "@id": "odrl:compensatingParty" }, + "consentingParty": { "@type": "@id", "@id": "odrl:consentingParty" }, + "consentedParty": { "@type": "@id", "@id": "odrl:consentedParty" }, + "informedParty": { "@type": "@id", "@id": "odrl:informedParty" }, + "informingParty": { "@type": "@id", "@id": "odrl:informingParty" }, + "trackingParty": { "@type": "@id", "@id": "odrl:trackingParty" }, + "trackedParty": { "@type": "@id", "@id": "odrl:trackedParty" }, + "contractingParty": { "@type": "@id", "@id": "odrl:contractingParty" }, + "contractedParty": { "@type": "@id", "@id": "odrl:contractedParty" }, + + "Action": "odrl:Action", + "action": { "@type": "@vocab", "@id": "odrl:action" }, + "includedIn": { "@type": "@id", "@id": "odrl:includedIn" }, + "implies": { "@type": "@id", "@id": "odrl:implies" }, + + "Permission": "odrl:Permission", + "permission": { "@type": "@id", "@id": "odrl:permission" }, + + "Prohibition": "odrl:Prohibition", + "prohibition": { "@type": "@id", "@id": "odrl:prohibition" }, + + "obligation": { "@type": "@id", "@id": "odrl:obligation" }, + + "use": "odrl:use", + "grantUse": "odrl:grantUse", + "aggregate": "odrl:aggregate", + "annotate": "odrl:annotate", + "anonymize": "odrl:anonymize", + "archive": "odrl:archive", + "concurrentUse": "odrl:concurrentUse", + "derive": "odrl:derive", + "digitize": "odrl:digitize", + "display": "odrl:display", + "distribute": "odrl:distribute", + "execute": "odrl:execute", + "extract": "odrl:extract", + "give": "odrl:give", + "index": "odrl:index", + "install": "odrl:install", + "modify": "odrl:modify", + "move": "odrl:move", + "play": "odrl:play", + "present": "odrl:present", + "print": "odrl:print", + "read": "odrl:read", + "reproduce": "odrl:reproduce", + "sell": "odrl:sell", + "stream": "odrl:stream", + "textToSpeech": "odrl:textToSpeech", + "transfer": "odrl:transfer", + "transform": "odrl:transform", + "translate": "odrl:translate", + + "Duty": "odrl:Duty", + "duty": { "@type": "@id", "@id": "odrl:duty" }, + "consequence": { "@type": "@id", "@id": "odrl:consequence" }, + "remedy": { "@type": "@id", "@id": "odrl:remedy" }, + + "acceptTracking": "odrl:acceptTracking", + "attribute": "odrl:attribute", + "compensate": "odrl:compensate", + "delete": "odrl:delete", + "ensureExclusivity": "odrl:ensureExclusivity", + "include": "odrl:include", + "inform": "odrl:inform", + "nextPolicy": "odrl:nextPolicy", + "obtainConsent": "odrl:obtainConsent", + "reviewPolicy": "odrl:reviewPolicy", + "uninstall": "odrl:uninstall", + "watermark": "odrl:watermark", + + "Constraint": "odrl:Constraint", + "LogicalConstraint": "odrl:LogicalConstraint", + "constraint": { "@type": "@id", "@id": "odrl:constraint" }, + "refinement": { "@type": "@id", "@id": "odrl:refinement" }, + "Operator": "odrl:Operator", + "operator": { "@type": "@vocab", "@id": "odrl:operator" }, + "RightOperand": "odrl:RightOperand", + "rightOperand": "odrl:rightOperand", + "rightOperandReference": { "@type": "xsd:anyURI", "@id": "odrl:rightOperandReference" }, + "LeftOperand": "odrl:LeftOperand", + "leftOperand": { "@type": "@vocab", "@id": "odrl:leftOperand" }, + "unit": "odrl:unit", + "dataType": { "@type": "xsd:anyType", "@id": "odrl:datatype" }, + "status": "odrl:status", + + "absolutePosition": "odrl:absolutePosition", + "absoluteSpatialPosition": "odrl:absoluteSpatialPosition", + "absoluteTemporalPosition": "odrl:absoluteTemporalPosition", + "absoluteSize": "odrl:absoluteSize", + "count": "odrl:count", + "dateTime": "odrl:dateTime", + "delayPeriod": "odrl:delayPeriod", + "deliveryChannel": "odrl:deliveryChannel", + "elapsedTime": "odrl:elapsedTime", + "event": "odrl:event", + "fileFormat": "odrl:fileFormat", + "industry": "odrl:industry:", + "language": "odrl:language", + "media": "odrl:media", + "meteredTime": "odrl:meteredTime", + "payAmount": "odrl:payAmount", + "percentage": "odrl:percentage", + "product": "odrl:product", + "purpose": "odrl:purpose", + "recipient": "odrl:recipient", + "relativePosition": "odrl:relativePosition", + "relativeSpatialPosition": "odrl:relativeSpatialPosition", + "relativeTemporalPosition": "odrl:relativeTemporalPosition", + "relativeSize": "odrl:relativeSize", + "resolution": "odrl:resolution", + "spatial": "odrl:spatial", + "spatialCoordinates": "odrl:spatialCoordinates", + "systemDevice": "odrl:systemDevice", + "timeInterval": "odrl:timeInterval", + "unitOfCount": "odrl:unitOfCount", + "version": "odrl:version", + "virtualLocation": "odrl:virtualLocation", + + "eq": "odrl:eq", + "gt": "odrl:gt", + "gteq": "odrl:gteq", + "lt": "odrl:lt", + "lteq": "odrl:lteq", + "neq": "odrl:neg", + "isA": "odrl:isA", + "hasPart": "odrl:hasPart", + "isPartOf": "odrl:isPartOf", + "isAllOf": "odrl:isAllOf", + "isAnyOf": "odrl:isAnyOf", + "isNoneOf": "odrl:isNoneOf", + "or": "odrl:or", + "xone": "odrl:xone", + "and": "odrl:and", + "andSequence": "odrl:andSequence", + + "policyUsage": "odrl:policyUsage" + } +} diff --git a/packages/vc-handler-ld-local/src/contexts/profile-v1.json b/packages/vc-handler-ld-local/src/contexts/profile-v1.json new file mode 100644 index 000000000..727d17ed2 --- /dev/null +++ b/packages/vc-handler-ld-local/src/contexts/profile-v1.json @@ -0,0 +1,8 @@ +{ + "@context": { + "@version": 1.1, + "@protected": true, + "Profile": "https://veramo.io/contexts/profile#Profile", + "name": "https://schema.org/name" + } +} diff --git a/packages/vc-handler-ld-local/contexts/security_bbs_v1.jsonld b/packages/vc-handler-ld-local/src/contexts/security_bbs_v1.json similarity index 100% rename from packages/vc-handler-ld-local/contexts/security_bbs_v1.jsonld rename to packages/vc-handler-ld-local/src/contexts/security_bbs_v1.json diff --git a/packages/vc-handler-ld-local/contexts/security_context_v1.jsonld b/packages/vc-handler-ld-local/src/contexts/security_context_v1.json similarity index 100% rename from packages/vc-handler-ld-local/contexts/security_context_v1.jsonld rename to packages/vc-handler-ld-local/src/contexts/security_context_v1.json diff --git a/packages/vc-handler-ld-local/src/contexts/socialmedia-v1.json b/packages/vc-handler-ld-local/src/contexts/socialmedia-v1.json new file mode 100644 index 000000000..06a2c7b55 --- /dev/null +++ b/packages/vc-handler-ld-local/src/contexts/socialmedia-v1.json @@ -0,0 +1,7 @@ +{ + "@context": { + "@version": 1.1, + "@protected": true, + "VerifableSocialMediaPosting": "https://veramo.io/contexts/socialmedia#VerifableSocialMediaPosting" + } +} diff --git a/packages/vc-handler-ld-local/contexts/transmute_v1.jsonld b/packages/vc-handler-ld-local/src/contexts/transmute_v1.json similarity index 100% rename from packages/vc-handler-ld-local/contexts/transmute_v1.jsonld rename to packages/vc-handler-ld-local/src/contexts/transmute_v1.json diff --git a/packages/vc-handler-ld-local/contexts/vc-revocation-list-2020-v1.jsonld b/packages/vc-handler-ld-local/src/contexts/vc-revocation-list-2020-v1.json similarity index 60% rename from packages/vc-handler-ld-local/contexts/vc-revocation-list-2020-v1.jsonld rename to packages/vc-handler-ld-local/src/contexts/vc-revocation-list-2020-v1.json index 26fbbad55..d9e9bd4d2 100644 --- a/packages/vc-handler-ld-local/contexts/vc-revocation-list-2020-v1.jsonld +++ b/packages/vc-handler-ld-local/src/contexts/vc-revocation-list-2020-v1.json @@ -3,8 +3,7 @@ "@protected": true, "RevocationList2020Credential": { - "@id": - "https://w3id.org/vc-revocation-list-2020#RevocationList2020Credential", + "@id": "https://w3id.org/vc-revocation-list-2020#RevocationList2020Credential", "@context": { "@protected": true, @@ -17,8 +16,7 @@ }, "RevocationList2020": { - "@id": - "https://w3id.org/vc-revocation-list-2020#RevocationList2020", + "@id": "https://w3id.org/vc-revocation-list-2020#RevocationList2020", "@context": { "@protected": true, @@ -30,8 +28,7 @@ }, "RevocationList2020Status": { - "@id": - "https://w3id.org/vc-revocation-list-2020#RevocationList2020Status", + "@id": "https://w3id.org/vc-revocation-list-2020#RevocationList2020Status", "@context": { "@protected": true, @@ -39,12 +36,10 @@ "type": "@type", "revocationListCredential": { - "@id": - "https://w3id.org/vc-revocation-list-2020#revocationListCredential", + "@id": "https://w3id.org/vc-revocation-list-2020#revocationListCredential", "@type": "@id" }, - "revocationListIndex": - "https://w3id.org/vc-revocation-list-2020#revocationListIndex" + "revocationListIndex": "https://w3id.org/vc-revocation-list-2020#revocationListIndex" } } } diff --git a/packages/vc-handler-ld-local/src/contexts/veramo.io_contexts_profile_v1.json b/packages/vc-handler-ld-local/src/contexts/veramo.io_contexts_profile_v1.json new file mode 100644 index 000000000..727d17ed2 --- /dev/null +++ b/packages/vc-handler-ld-local/src/contexts/veramo.io_contexts_profile_v1.json @@ -0,0 +1,8 @@ +{ + "@context": { + "@version": 1.1, + "@protected": true, + "Profile": "https://veramo.io/contexts/profile#Profile", + "name": "https://schema.org/name" + } +} diff --git a/packages/vc-handler-ld-local/src/contexts/w3id.org_security_suites_ed25519-2018_v1.json b/packages/vc-handler-ld-local/src/contexts/w3id.org_security_suites_ed25519-2018_v1.json new file mode 100644 index 000000000..8f6eadfcc --- /dev/null +++ b/packages/vc-handler-ld-local/src/contexts/w3id.org_security_suites_ed25519-2018_v1.json @@ -0,0 +1,63 @@ +{ + "@context": [ + { + "@version": 1.1 + }, + "https://w3id.org/security/v1", + { + "AesKeyWrappingKey2019": "sec:AesKeyWrappingKey2019", + "DeleteKeyOperation": "sec:DeleteKeyOperation", + "DeriveSecretOperation": "sec:DeriveSecretOperation", + "EcdsaSecp256k1Signature2019": "sec:EcdsaSecp256k1Signature2019", + "EcdsaSecp256r1Signature2019": "sec:EcdsaSecp256r1Signature2019", + "EcdsaSecp256k1VerificationKey2019": "sec:EcdsaSecp256k1VerificationKey2019", + "EcdsaSecp256r1VerificationKey2019": "sec:EcdsaSecp256r1VerificationKey2019", + "Ed25519Signature2018": "sec:Ed25519Signature2018", + "Ed25519VerificationKey2018": "sec:Ed25519VerificationKey2018", + "EquihashProof2018": "sec:EquihashProof2018", + "ExportKeyOperation": "sec:ExportKeyOperation", + "GenerateKeyOperation": "sec:GenerateKeyOperation", + "KmsOperation": "sec:KmsOperation", + "RevokeKeyOperation": "sec:RevokeKeyOperation", + "RsaSignature2018": "sec:RsaSignature2018", + "RsaVerificationKey2018": "sec:RsaVerificationKey2018", + "Sha256HmacKey2019": "sec:Sha256HmacKey2019", + "SignOperation": "sec:SignOperation", + "UnwrapKeyOperation": "sec:UnwrapKeyOperation", + "VerifyOperation": "sec:VerifyOperation", + "WrapKeyOperation": "sec:WrapKeyOperation", + "X25519KeyAgreementKey2019": "sec:X25519KeyAgreementKey2019", + + "allowedAction": "sec:allowedAction", + "assertionMethod": { "@id": "sec:assertionMethod", "@type": "@id", "@container": "@set" }, + "authentication": { "@id": "sec:authenticationMethod", "@type": "@id", "@container": "@set" }, + "capability": { "@id": "sec:capability", "@type": "@id" }, + "capabilityAction": "sec:capabilityAction", + "capabilityChain": { "@id": "sec:capabilityChain", "@type": "@id", "@container": "@list" }, + "capabilityDelegation": { "@id": "sec:capabilityDelegationMethod", "@type": "@id", "@container": "@set" }, + "capabilityInvocation": { "@id": "sec:capabilityInvocationMethod", "@type": "@id", "@container": "@set" }, + "caveat": { "@id": "sec:caveat", "@type": "@id", "@container": "@set" }, + "challenge": "sec:challenge", + "ciphertext": "sec:ciphertext", + "controller": { "@id": "sec:controller", "@type": "@id" }, + "delegator": { "@id": "sec:delegator", "@type": "@id" }, + "equihashParameterK": { "@id": "sec:equihashParameterK", "@type": "xsd:integer" }, + "equihashParameterN": { "@id": "sec:equihashParameterN", "@type": "xsd:integer" }, + "invocationTarget": { "@id": "sec:invocationTarget", "@type": "@id" }, + "invoker": { "@id": "sec:invoker", "@type": "@id" }, + "jws": "sec:jws", + "keyAgreement": { "@id": "sec:keyAgreementMethod", "@type": "@id", "@container": "@set" }, + "kmsModule": { "@id": "sec:kmsModule" }, + "parentCapability": { "@id": "sec:parentCapability", "@type": "@id" }, + "plaintext": "sec:plaintext", + "proof": { "@id": "sec:proof", "@type": "@id", "@container": "@graph" }, + "proofPurpose": { "@id": "sec:proofPurpose", "@type": "@vocab" }, + "proofValue": "sec:proofValue", + "referenceId": "sec:referenceId", + "unwrappedKey": "sec:unwrappedKey", + "verificationMethod": { "@id": "sec:verificationMethod", "@type": "@id" }, + "verifyData": "sec:verifyData", + "wrappedKey": "sec:wrappedKey" + } + ] +} diff --git a/packages/vc-handler-ld-local/src/contexts/w3id.org_security_suites_secp256k1recovery-2020_v2.json b/packages/vc-handler-ld-local/src/contexts/w3id.org_security_suites_secp256k1recovery-2020_v2.json new file mode 100644 index 000000000..932a38f64 --- /dev/null +++ b/packages/vc-handler-ld-local/src/contexts/w3id.org_security_suites_secp256k1recovery-2020_v2.json @@ -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" + } + } + } + } +} diff --git a/packages/vc-handler-ld-local/src/contexts/w3id.org_security_suites_x25519-2019_v1.json b/packages/vc-handler-ld-local/src/contexts/w3id.org_security_suites_x25519-2019_v1.json new file mode 100644 index 000000000..d01bac010 --- /dev/null +++ b/packages/vc-handler-ld-local/src/contexts/w3id.org_security_suites_x25519-2019_v1.json @@ -0,0 +1,26 @@ +{ + "@context": { + "id": "@id", + "type": "@type", + "@protected": true, + "X25519KeyAgreementKey2019": { + "@id": "https://w3id.org/security#X25519KeyAgreementKey2019", + "@context": { + "@protected": true, + "id": "@id", + "type": "@type", + "controller": { + "@id": "https://w3id.org/security#controller", + "@type": "@id" + }, + "revoked": { + "@id": "https://w3id.org/security#revoked", + "@type": "http://www.w3.org/2001/XMLSchema#dateTime" + }, + "publicKeyBase58": { + "@id": "https://w3id.org/security#publicKeyBase58" + } + } + } + } +} diff --git a/packages/vc-handler-ld-local/src/contexts/w3id.org_security_v1.json b/packages/vc-handler-ld-local/src/contexts/w3id.org_security_v1.json new file mode 100644 index 000000000..ccb402459 --- /dev/null +++ b/packages/vc-handler-ld-local/src/contexts/w3id.org_security_v1.json @@ -0,0 +1,50 @@ +{ + "@context": { + "id": "@id", + "type": "@type", + + "dc": "http://purl.org/dc/terms/", + "sec": "https://w3id.org/security#", + "xsd": "http://www.w3.org/2001/XMLSchema#", + + "EcdsaKoblitzSignature2016": "sec:EcdsaKoblitzSignature2016", + "Ed25519Signature2018": "sec:Ed25519Signature2018", + "EncryptedMessage": "sec:EncryptedMessage", + "GraphSignature2012": "sec:GraphSignature2012", + "LinkedDataSignature2015": "sec:LinkedDataSignature2015", + "LinkedDataSignature2016": "sec:LinkedDataSignature2016", + "CryptographicKey": "sec:Key", + + "authenticationTag": "sec:authenticationTag", + "canonicalizationAlgorithm": "sec:canonicalizationAlgorithm", + "cipherAlgorithm": "sec:cipherAlgorithm", + "cipherData": "sec:cipherData", + "cipherKey": "sec:cipherKey", + "created": { "@id": "dc:created", "@type": "xsd:dateTime" }, + "creator": { "@id": "dc:creator", "@type": "@id" }, + "digestAlgorithm": "sec:digestAlgorithm", + "digestValue": "sec:digestValue", + "domain": "sec:domain", + "encryptionKey": "sec:encryptionKey", + "expiration": { "@id": "sec:expiration", "@type": "xsd:dateTime" }, + "expires": { "@id": "sec:expiration", "@type": "xsd:dateTime" }, + "initializationVector": "sec:initializationVector", + "iterationCount": "sec:iterationCount", + "nonce": "sec:nonce", + "normalizationAlgorithm": "sec:normalizationAlgorithm", + "owner": { "@id": "sec:owner", "@type": "@id" }, + "password": "sec:password", + "privateKey": { "@id": "sec:privateKey", "@type": "@id" }, + "privateKeyPem": "sec:privateKeyPem", + "publicKey": { "@id": "sec:publicKey", "@type": "@id" }, + "publicKeyBase58": "sec:publicKeyBase58", + "publicKeyPem": "sec:publicKeyPem", + "publicKeyWif": "sec:publicKeyWif", + "publicKeyService": { "@id": "sec:publicKeyService", "@type": "@id" }, + "revoked": { "@id": "sec:revoked", "@type": "xsd:dateTime" }, + "salt": "sec:salt", + "signature": "sec:signature", + "signatureAlgorithm": "sec:signingAlgorithm", + "signatureValue": "sec:signatureValue" + } +} diff --git a/packages/vc-handler-ld-local/src/contexts/w3id.org_security_v2.json b/packages/vc-handler-ld-local/src/contexts/w3id.org_security_v2.json new file mode 100644 index 000000000..8f6eadfcc --- /dev/null +++ b/packages/vc-handler-ld-local/src/contexts/w3id.org_security_v2.json @@ -0,0 +1,63 @@ +{ + "@context": [ + { + "@version": 1.1 + }, + "https://w3id.org/security/v1", + { + "AesKeyWrappingKey2019": "sec:AesKeyWrappingKey2019", + "DeleteKeyOperation": "sec:DeleteKeyOperation", + "DeriveSecretOperation": "sec:DeriveSecretOperation", + "EcdsaSecp256k1Signature2019": "sec:EcdsaSecp256k1Signature2019", + "EcdsaSecp256r1Signature2019": "sec:EcdsaSecp256r1Signature2019", + "EcdsaSecp256k1VerificationKey2019": "sec:EcdsaSecp256k1VerificationKey2019", + "EcdsaSecp256r1VerificationKey2019": "sec:EcdsaSecp256r1VerificationKey2019", + "Ed25519Signature2018": "sec:Ed25519Signature2018", + "Ed25519VerificationKey2018": "sec:Ed25519VerificationKey2018", + "EquihashProof2018": "sec:EquihashProof2018", + "ExportKeyOperation": "sec:ExportKeyOperation", + "GenerateKeyOperation": "sec:GenerateKeyOperation", + "KmsOperation": "sec:KmsOperation", + "RevokeKeyOperation": "sec:RevokeKeyOperation", + "RsaSignature2018": "sec:RsaSignature2018", + "RsaVerificationKey2018": "sec:RsaVerificationKey2018", + "Sha256HmacKey2019": "sec:Sha256HmacKey2019", + "SignOperation": "sec:SignOperation", + "UnwrapKeyOperation": "sec:UnwrapKeyOperation", + "VerifyOperation": "sec:VerifyOperation", + "WrapKeyOperation": "sec:WrapKeyOperation", + "X25519KeyAgreementKey2019": "sec:X25519KeyAgreementKey2019", + + "allowedAction": "sec:allowedAction", + "assertionMethod": { "@id": "sec:assertionMethod", "@type": "@id", "@container": "@set" }, + "authentication": { "@id": "sec:authenticationMethod", "@type": "@id", "@container": "@set" }, + "capability": { "@id": "sec:capability", "@type": "@id" }, + "capabilityAction": "sec:capabilityAction", + "capabilityChain": { "@id": "sec:capabilityChain", "@type": "@id", "@container": "@list" }, + "capabilityDelegation": { "@id": "sec:capabilityDelegationMethod", "@type": "@id", "@container": "@set" }, + "capabilityInvocation": { "@id": "sec:capabilityInvocationMethod", "@type": "@id", "@container": "@set" }, + "caveat": { "@id": "sec:caveat", "@type": "@id", "@container": "@set" }, + "challenge": "sec:challenge", + "ciphertext": "sec:ciphertext", + "controller": { "@id": "sec:controller", "@type": "@id" }, + "delegator": { "@id": "sec:delegator", "@type": "@id" }, + "equihashParameterK": { "@id": "sec:equihashParameterK", "@type": "xsd:integer" }, + "equihashParameterN": { "@id": "sec:equihashParameterN", "@type": "xsd:integer" }, + "invocationTarget": { "@id": "sec:invocationTarget", "@type": "@id" }, + "invoker": { "@id": "sec:invoker", "@type": "@id" }, + "jws": "sec:jws", + "keyAgreement": { "@id": "sec:keyAgreementMethod", "@type": "@id", "@container": "@set" }, + "kmsModule": { "@id": "sec:kmsModule" }, + "parentCapability": { "@id": "sec:parentCapability", "@type": "@id" }, + "plaintext": "sec:plaintext", + "proof": { "@id": "sec:proof", "@type": "@id", "@container": "@graph" }, + "proofPurpose": { "@id": "sec:proofPurpose", "@type": "@vocab" }, + "proofValue": "sec:proofValue", + "referenceId": "sec:referenceId", + "unwrappedKey": "sec:unwrappedKey", + "verificationMethod": { "@id": "sec:verificationMethod", "@type": "@id" }, + "verifyData": "sec:verifyData", + "wrappedKey": "sec:wrappedKey" + } + ] +} diff --git a/packages/vc-handler-ld-local/src/contexts/w3id.org_security_v3-unstable.json b/packages/vc-handler-ld-local/src/contexts/w3id.org_security_v3-unstable.json new file mode 100644 index 000000000..d450bc816 --- /dev/null +++ b/packages/vc-handler-ld-local/src/contexts/w3id.org_security_v3-unstable.json @@ -0,0 +1,722 @@ +{ + "@context": [ + { + "@version": 1.1, + "id": "@id", + "type": "@type", + "@protected": true, + "JsonWebKey2020": { + "@id": "https://w3id.org/security#JsonWebKey2020" + }, + "JsonWebSignature2020": { + "@id": "https://w3id.org/security#JsonWebSignature2020", + "@context": { + "@version": 1.1, + "id": "@id", + "type": "@type", + "@protected": true, + "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": { + "@version": 1.1, + "@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" + } + } + }, + "Ed25519VerificationKey2020": { + "@id": "https://w3id.org/security#Ed25519VerificationKey2020" + }, + "Ed25519Signature2020": { + "@id": "https://w3id.org/security#Ed25519Signature2020", + "@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" + }, + "nonce": "https://w3id.org/security#nonce", + "proofPurpose": { + "@id": "https://w3id.org/security#proofPurpose", + "@type": "@vocab", + "@context": { + "@version": 1.1, + "@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" + } + } + }, + "proofValue": { + "@id": "https://w3id.org/security#proofValue", + "@type": "https://w3id.org/security#multibase" + }, + "verificationMethod": { + "@id": "https://w3id.org/security#verificationMethod", + "@type": "@id" + } + } + }, + "publicKeyJwk": { + "@id": "https://w3id.org/security#publicKeyJwk", + "@type": "@json" + }, + "ethereumAddress": { + "@id": "https://w3id.org/security#ethereumAddress" + }, + "publicKeyHex": { + "@id": "https://w3id.org/security#publicKeyHex" + }, + "blockchainAccountId": { + "@id": "https://w3id.org/security#blockchainAccountId" + }, + "MerkleProof2019": { + "@id": "https://w3id.org/security#MerkleProof2019" + }, + "Bls12381G1Key2020": { + "@id": "https://w3id.org/security#Bls12381G1Key2020" + }, + "Bls12381G2Key2020": { + "@id": "https://w3id.org/security#Bls12381G2Key2020" + }, + "BbsBlsSignature2020": { + "@id": "https://w3id.org/security#BbsBlsSignature2020", + "@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", + "nonce": "https://w3id.org/security#nonce", + "proofPurpose": { + "@id": "https://w3id.org/security#proofPurpose", + "@type": "@vocab", + "@context": { + "@version": 1.1, + "@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" + } + } + }, + "proofValue": "https://w3id.org/security#proofValue", + "verificationMethod": { + "@id": "https://w3id.org/security#verificationMethod", + "@type": "@id" + } + } + }, + "BbsBlsSignatureProof2020": { + "@id": "https://w3id.org/security#BbsBlsSignatureProof2020", + "@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", + "nonce": "https://w3id.org/security#nonce", + "proofPurpose": { + "@id": "https://w3id.org/security#proofPurpose", + "@type": "@vocab", + "@context": { + "@version": 1.1, + "@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" + } + } + }, + "proofValue": "https://w3id.org/security#proofValue", + "verificationMethod": { + "@id": "https://w3id.org/security#verificationMethod", + "@type": "@id" + } + } + }, + + "EcdsaKoblitzSignature2016": "https://w3id.org/security#EcdsaKoblitzSignature2016", + "Ed25519Signature2018": { + "@id": "https://w3id.org/security#Ed25519Signature2018", + "@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": { + "@version": 1.1, + "@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" + } + } + }, + "proofValue": "https://w3id.org/security#proofValue", + "verificationMethod": { + "@id": "https://w3id.org/security#verificationMethod", + "@type": "@id" + } + } + }, + "EncryptedMessage": "https://w3id.org/security#EncryptedMessage", + "GraphSignature2012": "https://w3id.org/security#GraphSignature2012", + "LinkedDataSignature2015": "https://w3id.org/security#LinkedDataSignature2015", + "LinkedDataSignature2016": "https://w3id.org/security#LinkedDataSignature2016", + "CryptographicKey": "https://w3id.org/security#Key", + "authenticationTag": "https://w3id.org/security#authenticationTag", + "canonicalizationAlgorithm": "https://w3id.org/security#canonicalizationAlgorithm", + "cipherAlgorithm": "https://w3id.org/security#cipherAlgorithm", + "cipherData": "https://w3id.org/security#cipherData", + "cipherKey": "https://w3id.org/security#cipherKey", + "created": { + "@id": "http://purl.org/dc/terms/created", + "@type": "http://www.w3.org/2001/XMLSchema#dateTime" + }, + "creator": { + "@id": "http://purl.org/dc/terms/creator", + "@type": "@id" + }, + "digestAlgorithm": "https://w3id.org/security#digestAlgorithm", + "digestValue": "https://w3id.org/security#digestValue", + "domain": "https://w3id.org/security#domain", + "encryptionKey": "https://w3id.org/security#encryptionKey", + "expiration": { + "@id": "https://w3id.org/security#expiration", + "@type": "http://www.w3.org/2001/XMLSchema#dateTime" + }, + "expires": { + "@id": "https://w3id.org/security#expiration", + "@type": "http://www.w3.org/2001/XMLSchema#dateTime" + }, + "initializationVector": "https://w3id.org/security#initializationVector", + "iterationCount": "https://w3id.org/security#iterationCount", + "nonce": "https://w3id.org/security#nonce", + "normalizationAlgorithm": "https://w3id.org/security#normalizationAlgorithm", + "owner": "https://w3id.org/security#owner", + "password": "https://w3id.org/security#password", + "privateKey": "https://w3id.org/security#privateKey", + "privateKeyPem": "https://w3id.org/security#privateKeyPem", + "publicKey": "https://w3id.org/security#publicKey", + "publicKeyBase58": "https://w3id.org/security#publicKeyBase58", + "publicKeyPem": "https://w3id.org/security#publicKeyPem", + "publicKeyWif": "https://w3id.org/security#publicKeyWif", + "publicKeyService": "https://w3id.org/security#publicKeyService", + "revoked": { + "@id": "https://w3id.org/security#revoked", + "@type": "http://www.w3.org/2001/XMLSchema#dateTime" + }, + "salt": "https://w3id.org/security#salt", + "signature": "https://w3id.org/security#signature", + "signatureAlgorithm": "https://w3id.org/security#signingAlgorithm", + "signatureValue": "https://w3id.org/security#signatureValue", + "proofValue": "https://w3id.org/security#proofValue", + + "AesKeyWrappingKey2019": "https://w3id.org/security#AesKeyWrappingKey2019", + "DeleteKeyOperation": "https://w3id.org/security#DeleteKeyOperation", + "DeriveSecretOperation": "https://w3id.org/security#DeriveSecretOperation", + "EcdsaSecp256k1Signature2019": { + "@id": "https://w3id.org/security#EcdsaSecp256k1Signature2019", + "@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": { + "@version": 1.1, + "@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" + } + } + }, + "proofValue": "https://w3id.org/security#proofValue", + "verificationMethod": { + "@id": "https://w3id.org/security#verificationMethod", + "@type": "@id" + } + } + }, + "EcdsaSecp256r1Signature2019": { + "@id": "https://w3id.org/security#EcdsaSecp256r1Signature2019", + "@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": { + "@version": 1.1, + "@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" + } + } + }, + "proofValue": "https://w3id.org/security#proofValue", + "verificationMethod": { + "@id": "https://w3id.org/security#verificationMethod", + "@type": "@id" + } + } + }, + "EcdsaSecp256k1VerificationKey2019": "https://w3id.org/security#EcdsaSecp256k1VerificationKey2019", + "EcdsaSecp256r1VerificationKey2019": "https://w3id.org/security#EcdsaSecp256r1VerificationKey2019", + "Ed25519VerificationKey2018": "https://w3id.org/security#Ed25519VerificationKey2018", + "EquihashProof2018": "https://w3id.org/security#EquihashProof2018", + "ExportKeyOperation": "https://w3id.org/security#ExportKeyOperation", + "GenerateKeyOperation": "https://w3id.org/security#GenerateKeyOperation", + "KmsOperation": "https://w3id.org/security#KmsOperation", + "RevokeKeyOperation": "https://w3id.org/security#RevokeKeyOperation", + "RsaSignature2018": { + "@id": "https://w3id.org/security#RsaSignature2018", + "@context": { + "@protected": true, + + "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": { + "@version": 1.1, + "@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" + } + } + }, + "proofValue": "https://w3id.org/security#proofValue", + "verificationMethod": { + "@id": "https://w3id.org/security#verificationMethod", + "@type": "@id" + } + } + }, + "RsaVerificationKey2018": "https://w3id.org/security#RsaVerificationKey2018", + "Sha256HmacKey2019": "https://w3id.org/security#Sha256HmacKey2019", + "SignOperation": "https://w3id.org/security#SignOperation", + "UnwrapKeyOperation": "https://w3id.org/security#UnwrapKeyOperation", + "VerifyOperation": "https://w3id.org/security#VerifyOperation", + "WrapKeyOperation": "https://w3id.org/security#WrapKeyOperation", + "X25519KeyAgreementKey2019": "https://w3id.org/security#X25519KeyAgreementKey2019", + + "allowedAction": "https://w3id.org/security#allowedAction", + "assertionMethod": { + "@id": "https://w3id.org/security#assertionMethod", + "@type": "@id", + "@container": "@set" + }, + "authentication": { + "@id": "https://w3id.org/security#authenticationMethod", + "@type": "@id", + "@container": "@set" + }, + "capability": { + "@id": "https://w3id.org/security#capability", + "@type": "@id" + }, + "capabilityAction": "https://w3id.org/security#capabilityAction", + "capabilityChain": { + "@id": "https://w3id.org/security#capabilityChain", + "@type": "@id", + "@container": "@list" + }, + "capabilityDelegation": { + "@id": "https://w3id.org/security#capabilityDelegationMethod", + "@type": "@id", + "@container": "@set" + }, + "capabilityInvocation": { + "@id": "https://w3id.org/security#capabilityInvocationMethod", + "@type": "@id", + "@container": "@set" + }, + "caveat": { + "@id": "https://w3id.org/security#caveat", + "@type": "@id", + "@container": "@set" + }, + "challenge": "https://w3id.org/security#challenge", + "ciphertext": "https://w3id.org/security#ciphertext", + "controller": { + "@id": "https://w3id.org/security#controller", + "@type": "@id" + }, + "delegator": { + "@id": "https://w3id.org/security#delegator", + "@type": "@id" + }, + "equihashParameterK": { + "@id": "https://w3id.org/security#equihashParameterK", + "@type": "http://www.w3.org/2001/XMLSchema#:integer" + }, + "equihashParameterN": { + "@id": "https://w3id.org/security#equihashParameterN", + "@type": "http://www.w3.org/2001/XMLSchema#:integer" + }, + "invocationTarget": { + "@id": "https://w3id.org/security#invocationTarget", + "@type": "@id" + }, + "invoker": { + "@id": "https://w3id.org/security#invoker", + "@type": "@id" + }, + "jws": "https://w3id.org/security#jws", + "keyAgreement": { + "@id": "https://w3id.org/security#keyAgreementMethod", + "@type": "@id", + "@container": "@set" + }, + "kmsModule": { + "@id": "https://w3id.org/security#kmsModule" + }, + "parentCapability": { + "@id": "https://w3id.org/security#parentCapability", + "@type": "@id" + }, + "plaintext": "https://w3id.org/security#plaintext", + "proof": { + "@id": "https://w3id.org/security#proof", + "@type": "@id", + "@container": "@graph" + }, + "proofPurpose": { + "@id": "https://w3id.org/security#proofPurpose", + "@type": "@vocab", + "@context": { + "@version": 1.1, + "@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" + } + } + }, + "referenceId": "https://w3id.org/security#referenceId", + "unwrappedKey": "https://w3id.org/security#unwrappedKey", + "verificationMethod": { + "@id": "https://w3id.org/security#verificationMethod", + "@type": "@id" + }, + "verifyData": "https://w3id.org/security#verifyData", + "wrappedKey": "https://w3id.org/security#wrappedKey", + "x509CertificateChain": { + "@id": "https://w3id.org/security#x509CertificateChain", + "@type": "https://w3id.org/security#multibase", + "@container": "@list" + }, + "x509CertificateFingerprint": { + "@id": "https://w3id.org/security#x509CertificateFingerprint", + "@type": "https://w3id.org/security#multibase" + } + } + ] +} diff --git a/packages/vc-handler-ld-local/contexts/w3_2018_credentials_v1.jsonld b/packages/vc-handler-ld-local/src/contexts/www.w3.org_2018_credentials_v1.json similarity index 60% rename from packages/vc-handler-ld-local/contexts/w3_2018_credentials_v1.jsonld rename to packages/vc-handler-ld-local/src/contexts/www.w3.org_2018_credentials_v1.json index 26169278c..245742afb 100644 --- a/packages/vc-handler-ld-local/contexts/w3_2018_credentials_v1.jsonld +++ b/packages/vc-handler-ld-local/src/contexts/www.w3.org_2018_credentials_v1.json @@ -34,15 +34,15 @@ "JsonSchemaValidator2018": "cred:JsonSchemaValidator2018" } }, - "credentialStatus": {"@id": "cred:credentialStatus", "@type": "@id"}, - "credentialSubject": {"@id": "cred:credentialSubject", "@type": "@id"}, - "evidence": {"@id": "cred:evidence", "@type": "@id"}, - "expirationDate": {"@id": "cred:expirationDate", "@type": "xsd:dateTime"}, - "holder": {"@id": "cred:holder", "@type": "@id"}, - "issued": {"@id": "cred:issued", "@type": "xsd:dateTime"}, - "issuer": {"@id": "cred:issuer", "@type": "@id"}, - "issuanceDate": {"@id": "cred:issuanceDate", "@type": "xsd:dateTime"}, - "proof": {"@id": "sec:proof", "@type": "@id", "@container": "@graph"}, + "credentialStatus": { "@id": "cred:credentialStatus", "@type": "@id" }, + "credentialSubject": { "@id": "cred:credentialSubject", "@type": "@id" }, + "evidence": { "@id": "cred:evidence", "@type": "@id" }, + "expirationDate": { "@id": "cred:expirationDate", "@type": "xsd:dateTime" }, + "holder": { "@id": "cred:holder", "@type": "@id" }, + "issued": { "@id": "cred:issued", "@type": "xsd:dateTime" }, + "issuer": { "@id": "cred:issuer", "@type": "@id" }, + "issuanceDate": { "@id": "cred:issuanceDate", "@type": "xsd:dateTime" }, + "proof": { "@id": "sec:proof", "@type": "@id", "@container": "@graph" }, "refreshService": { "@id": "cred:refreshService", "@type": "@id", @@ -58,9 +58,9 @@ "ManualRefreshService2018": "cred:ManualRefreshService2018" } }, - "termsOfUse": {"@id": "cred:termsOfUse", "@type": "@id"}, - "validFrom": {"@id": "cred:validFrom", "@type": "xsd:dateTime"}, - "validUntil": {"@id": "cred:validUntil", "@type": "xsd:dateTime"} + "termsOfUse": { "@id": "cred:termsOfUse", "@type": "@id" }, + "validFrom": { "@id": "cred:validFrom", "@type": "xsd:dateTime" }, + "validUntil": { "@id": "cred:validUntil", "@type": "xsd:dateTime" } } }, @@ -76,9 +76,9 @@ "cred": "https://www.w3.org/2018/credentials#", "sec": "https://w3id.org/security#", - "holder": {"@id": "cred:holder", "@type": "@id"}, - "proof": {"@id": "sec:proof", "@type": "@id", "@container": "@graph"}, - "verifiableCredential": {"@id": "cred:verifiableCredential", "@type": "@id", "@container": "@graph"} + "holder": { "@id": "cred:holder", "@type": "@id" }, + "proof": { "@id": "sec:proof", "@type": "@id", "@container": "@graph" }, + "verifiableCredential": { "@id": "cred:verifiableCredential", "@type": "@id", "@container": "@graph" } } }, @@ -95,9 +95,9 @@ "xsd": "http://www.w3.org/2001/XMLSchema#", "challenge": "sec:challenge", - "created": {"@id": "http://purl.org/dc/terms/created", "@type": "xsd:dateTime"}, + "created": { "@id": "http://purl.org/dc/terms/created", "@type": "xsd:dateTime" }, "domain": "sec:domain", - "expires": {"@id": "sec:expiration", "@type": "xsd:dateTime"}, + "expires": { "@id": "sec:expiration", "@type": "xsd:dateTime" }, "jws": "sec:jws", "nonce": "sec:nonce", "proofPurpose": { @@ -112,12 +112,12 @@ "sec": "https://w3id.org/security#", - "assertionMethod": {"@id": "sec:assertionMethod", "@type": "@id", "@container": "@set"}, - "authentication": {"@id": "sec:authenticationMethod", "@type": "@id", "@container": "@set"} + "assertionMethod": { "@id": "sec:assertionMethod", "@type": "@id", "@container": "@set" }, + "authentication": { "@id": "sec:authenticationMethod", "@type": "@id", "@container": "@set" } } }, "proofValue": "sec:proofValue", - "verificationMethod": {"@id": "sec:verificationMethod", "@type": "@id"} + "verificationMethod": { "@id": "sec:verificationMethod", "@type": "@id" } } }, @@ -134,9 +134,9 @@ "xsd": "http://www.w3.org/2001/XMLSchema#", "challenge": "sec:challenge", - "created": {"@id": "http://purl.org/dc/terms/created", "@type": "xsd:dateTime"}, + "created": { "@id": "http://purl.org/dc/terms/created", "@type": "xsd:dateTime" }, "domain": "sec:domain", - "expires": {"@id": "sec:expiration", "@type": "xsd:dateTime"}, + "expires": { "@id": "sec:expiration", "@type": "xsd:dateTime" }, "jws": "sec:jws", "nonce": "sec:nonce", "proofPurpose": { @@ -151,12 +151,12 @@ "sec": "https://w3id.org/security#", - "assertionMethod": {"@id": "sec:assertionMethod", "@type": "@id", "@container": "@set"}, - "authentication": {"@id": "sec:authenticationMethod", "@type": "@id", "@container": "@set"} + "assertionMethod": { "@id": "sec:assertionMethod", "@type": "@id", "@container": "@set" }, + "authentication": { "@id": "sec:authenticationMethod", "@type": "@id", "@container": "@set" } } }, "proofValue": "sec:proofValue", - "verificationMethod": {"@id": "sec:verificationMethod", "@type": "@id"} + "verificationMethod": { "@id": "sec:verificationMethod", "@type": "@id" } } }, @@ -173,9 +173,9 @@ "xsd": "http://www.w3.org/2001/XMLSchema#", "challenge": "sec:challenge", - "created": {"@id": "http://purl.org/dc/terms/created", "@type": "xsd:dateTime"}, + "created": { "@id": "http://purl.org/dc/terms/created", "@type": "xsd:dateTime" }, "domain": "sec:domain", - "expires": {"@id": "sec:expiration", "@type": "xsd:dateTime"}, + "expires": { "@id": "sec:expiration", "@type": "xsd:dateTime" }, "jws": "sec:jws", "nonce": "sec:nonce", "proofPurpose": { @@ -190,12 +190,12 @@ "sec": "https://w3id.org/security#", - "assertionMethod": {"@id": "sec:assertionMethod", "@type": "@id", "@container": "@set"}, - "authentication": {"@id": "sec:authenticationMethod", "@type": "@id", "@container": "@set"} + "assertionMethod": { "@id": "sec:assertionMethod", "@type": "@id", "@container": "@set" }, + "authentication": { "@id": "sec:authenticationMethod", "@type": "@id", "@container": "@set" } } }, "proofValue": "sec:proofValue", - "verificationMethod": {"@id": "sec:verificationMethod", "@type": "@id"} + "verificationMethod": { "@id": "sec:verificationMethod", "@type": "@id" } } }, @@ -206,9 +206,9 @@ "@protected": true, "challenge": "sec:challenge", - "created": {"@id": "http://purl.org/dc/terms/created", "@type": "xsd:dateTime"}, + "created": { "@id": "http://purl.org/dc/terms/created", "@type": "xsd:dateTime" }, "domain": "sec:domain", - "expires": {"@id": "sec:expiration", "@type": "xsd:dateTime"}, + "expires": { "@id": "sec:expiration", "@type": "xsd:dateTime" }, "jws": "sec:jws", "nonce": "sec:nonce", "proofPurpose": { @@ -223,15 +223,15 @@ "sec": "https://w3id.org/security#", - "assertionMethod": {"@id": "sec:assertionMethod", "@type": "@id", "@container": "@set"}, - "authentication": {"@id": "sec:authenticationMethod", "@type": "@id", "@container": "@set"} + "assertionMethod": { "@id": "sec:assertionMethod", "@type": "@id", "@container": "@set" }, + "authentication": { "@id": "sec:authenticationMethod", "@type": "@id", "@container": "@set" } } }, "proofValue": "sec:proofValue", - "verificationMethod": {"@id": "sec:verificationMethod", "@type": "@id"} + "verificationMethod": { "@id": "sec:verificationMethod", "@type": "@id" } } }, - "proof": {"@id": "https://w3id.org/security#proof", "@type": "@id", "@container": "@graph"} + "proof": { "@id": "https://w3id.org/security#proof", "@type": "@id", "@container": "@graph" } } -} \ No newline at end of file +} diff --git a/packages/vc-handler-ld-local/src/contexts/www.w3.org_ns_did_v1.json b/packages/vc-handler-ld-local/src/contexts/www.w3.org_ns_did_v1.json new file mode 100644 index 000000000..b447d0108 --- /dev/null +++ b/packages/vc-handler-ld-local/src/contexts/www.w3.org_ns_did_v1.json @@ -0,0 +1,58 @@ +{ + "@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/packages/vc-handler-ld-local/src/ld-default-contexts.ts b/packages/vc-handler-ld-local/src/ld-default-contexts.ts index d9cc4e645..b7ec500bc 100644 --- a/packages/vc-handler-ld-local/src/ld-default-contexts.ts +++ b/packages/vc-handler-ld-local/src/ld-default-contexts.ts @@ -1,39 +1,35 @@ -import * as fs from 'fs' -import * as path from 'path' - -import { ContextDoc } from './types/types' - -async function _read(_path: string): Promise { - const contextDefinition = await fs.promises.readFile(path.join(__dirname, '../contexts', _path), { - encoding: 'utf8', - }) - return JSON.parse(contextDefinition) -} +const contextCredentialV1 = require('./contexts/www.w3.org_2018_credentials_v1.json') // assert { type: 'json' } +import contextDidV1 from './contexts/www.w3.org_ns_did_v1.json' //assert { type: 'json' } +import contextSecurityV1 from './contexts/w3id.org_security_v1.json' //assert { type: 'json' } +import contextSecurityV2 from './contexts/w3id.org_security_v2.json' //assert { type: 'json' } +import contextSecurityV3 from './contexts/w3id.org_security_v3-unstable.json' //assert { type: 'json' } +import contextSuitesEd25519_2018 from './contexts/w3id.org_security_suites_ed25519-2018_v1.json' //assert { type: 'json' } +import contextSuitesX25519 from './contexts/w3id.org_security_suites_x25519-2019_v1.json' //assert { type: 'json' } +import contextProfile from './contexts/veramo.io_contexts_profile_v1.json' //assert { type: 'json' } +import contextLdsEcdsaSecpRecovery2020_0 from './contexts/lds-ecdsa-secp256k1-recovery2020-0.0.json' // assert { type: 'json' } +import contextLdsEcdsaSecpRecovery2020_2 from './contexts/w3id.org_security_suites_secp256k1recovery-2020_v2.json' //assert { type: 'json' } +import contextSuitesSecp from './contexts/w3id.org_security_suites_secp256k1recovery-2020_v2.json' //assert { type: 'json' } +import contextSuitesEd25519_2020 from './contexts/ed25519-signature-2020-v1.json' //assert { type: 'json' } +import contextSuitesJws_2020 from './contexts/json-web-signature-2020-v1.json' // assert { type: 'json' } +import contextSuiteEip712 from './contexts/eip712.json' // assert { type: 'json' } /** * Provides a hardcoded map of common context definitions */ export const LdDefaultContexts = new Map([ - ['https://www.w3.org/2018/credentials/v1', _read('w3_2018_credentials_v1.jsonld')], - ['https://www.w3.org/ns/did/v1', _read('security_context_v1.jsonld')], - ['https://w3id.org/did/v0.11', _read('did_v0.11.jsonld')], - - ['https://veramo.io/contexts/socialmedia/v1', _read('socialmedia-v1.jsonld')], - ['https://veramo.io/contexts/kyc/v1', _read('kyc-v1.jsonld')], - ['https://veramo.io/contexts/profile/v1', _read('profile-v1.jsonld')], - ['https://ns.did.ai/transmute/v1', _read('transmute_v1.jsonld')], - [ - 'https://identity.foundation/EcdsaSecp256k1RecoverySignature2020/lds-ecdsa-secp256k1-recovery2020-0.0.jsonld', - _read('lds-ecdsa-secp256k1-recovery2020-0.0.jsonld'), - ], - ['https://w3id.org/security/suites/ed25519-2018/v1', _read('ed25519-signature-2018-v1.jsonld')], - ['https://w3id.org/security/suites/ed25519-2020/v1', _read('ed25519-signature-2020-v1.jsonld')], - ['https://w3id.org/security/suites/x25519-2019/v1', _read('X25519KeyAgreementKey2019.jsonld')], - ['https://w3id.org/security/suites/jws-2020/v1', _read('jws-2020-v1.jsonld')], - ['https://w3c.github.io/vc-jws-2020/contexts/v1/', _read('jws-2020-v1.jsonld')], - ['https://w3id.org/vc-revocation-list-2020/v1', _read('vc-revocation-list-2020-v1.jsonld')], - ['https://w3id.org/security/bbs/v1', _read('bbs-bls-signature-2020-v1.jsonld')], - ['https://www.w3.org/2018/credentials/examples/v1', _read('w3_2018_credentials_examples_v1.jsonld')], - ['https://www.w3.org/ns/odrl.jsonld', _read('odrl.jsonld')], - ['https://w3id.org/citizenship/v1', _read('citizenship-v1.jsonld')], + ['https://www.w3.org/2018/credentials/v1', contextCredentialV1], + ['https://www.w3.org/ns/did/v1', contextDidV1], + ['https://w3id.org/security/v1', contextSecurityV1], + ['https://w3id.org/security/v2', contextSecurityV2], + ['https://w3id.org/security/v3-unstable', contextSecurityV3], + ['https://w3id.org/security/suites/ed25519-2018/v1', contextSuitesEd25519_2018], + ['https://w3id.org/security/suites/x25519-2019/v1', contextSuitesX25519], + ['https://w3id.org/security/suites/ed25519-2020/v1', contextSuitesEd25519_2020], + ['https://w3id.org/security/suites/jws-2020/v1', contextSuitesJws_2020], + ['https://veramo.io/contexts/profile/v1', contextProfile], + ['https://identity.foundation/EcdsaSecp256k1RecoverySignature2020/lds-ecdsa-secp256k1-recovery2020-0.0.jsonld', contextLdsEcdsaSecpRecovery2020_0], + ['https://identity.foundation/EcdsaSecp256k1RecoverySignature2020/lds-ecdsa-secp256k1-recovery2020-2.0.jsonld', contextLdsEcdsaSecpRecovery2020_2], + ['https://w3id.org/security/suites/secp256k1recovery-2020/v2', contextSuitesSecp], + ['https://w3id.org/security/suites/eip712sig-2021', contextSuiteEip712], + ['https://w3c-ccg.github.io/ethereum-eip712-signature-2021-spec/', contextSuiteEip712], ]) diff --git a/packages/vc-handler-ld-local/tsconfig.json b/packages/vc-handler-ld-local/tsconfig.json index bfe46aac1..c7d266893 100644 --- a/packages/vc-handler-ld-local/tsconfig.json +++ b/packages/vc-handler-ld-local/tsconfig.json @@ -3,8 +3,11 @@ "compilerOptions": { "rootDir": "src", "outDir": "dist", - "esModuleInterop": true, - "declarationDir": "dist" + "declarationDir": "dist", + // https://github.com/transmute-industries/vc.js/issues/60 + "skipLibCheck": true, + "resolveJsonModule": true }, + "include": ["src/**/*.json", "src/**/*.ts"], "references": [{ "path": "../ssi-sdk-core" }, { "path": "../did-utils" }] }