forked from 1EdTech/cert-schema
-
Notifications
You must be signed in to change notification settings - Fork 31
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(MultiSign): split MerkleProof2019 from Blockcerts context, defin…
…e other required contexts
- Loading branch information
1 parent
8b28336
commit a9c2b85
Showing
11 changed files
with
855 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,81 @@ | ||
{ | ||
"@context": { | ||
"id": "@id", | ||
"type": "@type", | ||
"@protected": true, | ||
"proof": { | ||
"@id": "https://w3id.org/security#proof", | ||
"@type": "@id", | ||
"@container": "@graph" | ||
}, | ||
"ChainedProof2021": { | ||
"@id": "https://w3id.org/security#ChainedProof2021", | ||
"@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": { | ||
"@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" | ||
}, | ||
"chainedProofType": { | ||
"@id": "https://w3id.org/security#chainedProofType", | ||
"@type": "@id" | ||
}, | ||
"previousProof": { | ||
"@id": "https://w3id.org/security#previousProof", | ||
"@type": "@id" | ||
} | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
{ | ||
"$schema": "http://json-schema.org/draft-07/schema#", | ||
"title": "Claim schema", | ||
"description": "Define how claims are associated with credentialSubject in Blockcerts.", | ||
"type": "object", | ||
"properties": { | ||
"type": { | ||
"type": "string", | ||
"description": "What is the nature of the claim", | ||
"examples": ["Diploma", "Id Card"] | ||
}, | ||
"id": { | ||
"type": "string", | ||
"description": "unique identifier of the claim" | ||
}, | ||
"name": { | ||
"type": "string", | ||
"description": "name of the claim" | ||
}, | ||
"description": { | ||
"type": "string", | ||
"description": "description of the claim" | ||
}, | ||
"criteria": { | ||
"type": "string", | ||
"description": "criteria to obtain the claim" | ||
} | ||
}, | ||
"required": [] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
{ | ||
"@context": { | ||
"id": "@id", | ||
"type": "@type", | ||
"bc": "https://w3id.org/blockcerts#", | ||
"cp": "https://w3id.org/chainpoint#", | ||
"vc": "https://www.w3.org/2018/credentials/v1", | ||
"schema": "https://schema.org/", | ||
"sec": "https://w3id.org/security#", | ||
"xsd": "http://www.w3.org/2001/XMLSchema#", | ||
|
||
"BlockcertsCredential": "bc:BlockcertsCredential", | ||
"introductionUrl": { "@id": "bc:introductionUrl", "@type": "@id" }, | ||
"metadata": "bc:metadata", | ||
"display": { | ||
"@id": "bc:display", | ||
"@context": { | ||
"id": "@id", | ||
"type": "@type", | ||
"contentMediaType": {"@id": "bc:contentMediaType"}, | ||
"contentEncoding": {"@id": "bc:contentEncoding"}, | ||
"content": {"@id": "bc:content"} | ||
} | ||
}, | ||
|
||
"CryptographicKey": "sec:Key", | ||
|
||
"domain": "sec:domain", | ||
"nonce": "sec:nonce", | ||
"proofValue": "sec:proofValue", | ||
"assertionMethod": {"@id": "sec:assertionMethod", "@type": "@id", "@container": "@set"}, | ||
"authentication": {"@id": "sec:authenticationMethod", "@type": "@id", "@container": "@set"}, | ||
"proofPurpose": {"@id": "sec:proofPurpose", "@type": "@vocab"}, | ||
"verificationMethod": {"@id": "sec:verificationMethod", "@type": "@id"}, | ||
"created": {"@id": "https://purl.org/dc/terms/created", "@type": "xsd:dateTime"}, | ||
"challenge": "sec:challenge", | ||
"expires": {"@id": "sec:expiration", "@type": "xsd:dateTime"}, | ||
|
||
"name": { "@id": "schema:name" }, | ||
"description": { "@id": "schema:description" }, | ||
"email": { "@id": "schema:email" }, | ||
"publicKey": { "@id": "sec:publicKey" }, | ||
"url": { "@id": "schema:url" }, | ||
"image": { "@id": "schema:image" }, | ||
"criteria": { "@id": "schema:criteria" }, | ||
"claim": { "@id": "schema:claim" } | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,230 @@ | ||
{ | ||
"@context": { | ||
"@version": 1.1, | ||
|
||
"id": "@id", | ||
"type": "@type", | ||
|
||
"VerifiableCredential": { | ||
"@id": "https://www.w3.org/2018/credentials#VerifiableCredential", | ||
"@context": { | ||
"@version": 1.1, | ||
|
||
"id": "@id", | ||
"type": "@type", | ||
|
||
"cred": "https://www.w3.org/2018/credentials#", | ||
"sec": "https://w3id.org/security#", | ||
"xsd": "http://www.w3.org/2001/XMLSchema#", | ||
|
||
"credentialSchema": { | ||
"@id": "cred:credentialSchema", | ||
"@type": "@id", | ||
"@context": { | ||
"@version": 1.1, | ||
|
||
"id": "@id", | ||
"type": "@type", | ||
|
||
"cred": "https://www.w3.org/2018/credentials#", | ||
|
||
"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"}, | ||
"refreshService": { | ||
"@id": "cred:refreshService", | ||
"@type": "@id", | ||
"@context": { | ||
"@version": 1.1, | ||
|
||
"id": "@id", | ||
"type": "@type", | ||
|
||
"cred": "https://www.w3.org/2018/credentials#", | ||
|
||
"ManualRefreshService2018": "cred:ManualRefreshService2018" | ||
} | ||
}, | ||
"termsOfUse": {"@id": "cred:termsOfUse", "@type": "@id"}, | ||
"validFrom": {"@id": "cred:validFrom", "@type": "xsd:dateTime"}, | ||
"validUntil": {"@id": "cred:validUntil", "@type": "xsd:dateTime"} | ||
} | ||
}, | ||
|
||
"VerifiablePresentation": { | ||
"@id": "https://www.w3.org/2018/credentials#VerifiablePresentation", | ||
"@context": { | ||
"@version": 1.1, | ||
|
||
"id": "@id", | ||
"type": "@type", | ||
|
||
"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"} | ||
} | ||
}, | ||
|
||
"EcdsaSecp256k1Signature2019": { | ||
"@id": "https://w3id.org/security#EcdsaSecp256k1Signature2019", | ||
"@context": { | ||
"@version": 1.1, | ||
|
||
"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, | ||
|
||
"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"} | ||
} | ||
}, | ||
|
||
"EcdsaSecp256r1Signature2019": { | ||
"@id": "https://w3id.org/security#EcdsaSecp256r1Signature2019", | ||
"@context": { | ||
"@version": 1.1, | ||
|
||
|
||
"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, | ||
|
||
|
||
"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"} | ||
} | ||
}, | ||
|
||
"Ed25519Signature2018": { | ||
"@id": "https://w3id.org/security#Ed25519Signature2018", | ||
"@context": { | ||
"@version": 1.1, | ||
|
||
|
||
"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, | ||
|
||
|
||
"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"} | ||
} | ||
}, | ||
|
||
"RsaSignature2018": { | ||
"@id": "https://w3id.org/security#RsaSignature2018", | ||
"@context": { | ||
"@version": 1.1, | ||
|
||
|
||
"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, | ||
|
||
|
||
"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"} | ||
} | ||
}, | ||
|
||
"proof": {"@id": "https://w3id.org/security#proof", "@type": "@id", "@container": "@graph"} | ||
} | ||
} |
Oops, something went wrong.