From 2444bca356f67c0e88a760edd51a980b5a78bfa7 Mon Sep 17 00:00:00 2001 From: Alex Tweeddale Date: Tue, 15 Oct 2024 04:50:27 +0000 Subject: [PATCH] GITBOOK-327: change request with no subject merged in GitBook --- SUMMARY.md | 2 +- studio/trust-registries/README.md | 2 +- .../trust-registries/create-accreditation.md | 239 --------------- .../trust-registries/issue-accreditation.md | 289 ++++++++++++++++++ 4 files changed, 291 insertions(+), 241 deletions(-) delete mode 100644 studio/trust-registries/create-accreditation.md create mode 100644 studio/trust-registries/issue-accreditation.md diff --git a/SUMMARY.md b/SUMMARY.md index 319b7c0..27bf61f 100644 --- a/SUMMARY.md +++ b/SUMMARY.md @@ -48,7 +48,7 @@ * [TAO -> SubTAO](studio/trust-registries/verifiable-accreditation-trust-chain-model/tao-greater-than-subtao.md) * [TAO -> TI](studio/trust-registries/verifiable-accreditation-trust-chain-model/tao-greater-than-ti.md) * [Referencing Trust Registry within a Verifiable Credential](studio/trust-registries/verifiable-accreditation-trust-chain-model/referencing.md) - * [Create Verifiable Accreditation](studio/trust-registries/create-accreditation.md) + * [Issue Verifiable Accreditation](studio/trust-registries/issue-accreditation.md) * [🎋 Create Status Lists](studio/status-lists/README.md) * [Status List v2021](studio/status-lists/status-list-v2021/README.md) * [Create Status List v2021](studio/status-lists/status-list-v2021/create-status-list.md) diff --git a/studio/trust-registries/README.md b/studio/trust-registries/README.md index c2e9580..7e39a16 100644 --- a/studio/trust-registries/README.md +++ b/studio/trust-registries/README.md @@ -20,7 +20,7 @@ Learn about a data model below: Start building with our cheqd Studio APIs and configure a trust registry for your digital credential ecosystem: -
Create Verifiable AccreditationIssue Verifiable Accreditations between DIDs on the cheqd Network, to accredit the DID to perform a certain action.create-accreditation.md
+
Create Verifiable AccreditationIssue Verifiable Accreditations between DIDs on the cheqd Network, to accredit the DID to perform a certain action.issue-accreditation.md
## Extensions diff --git a/studio/trust-registries/create-accreditation.md b/studio/trust-registries/create-accreditation.md deleted file mode 100644 index 71e9399..0000000 --- a/studio/trust-registries/create-accreditation.md +++ /dev/null @@ -1,239 +0,0 @@ ---- -description: Issue Verifiable Accreditations as DID-Linked Resources ---- - -# Create Verifiable Accreditation - -Users are able to **issue Verifiable Accreditations as DID-Linked Resources on-ledger**, which may be used to **verify whether a particular recipient of an accreditation is accredited to issue a certain type of credential**, under the scope of a particular governance framework. This implementation on cheqd builds on the principles of the EBSI Trust Chain model, using DID-Linked Resources to create a more standardised format for storing, retrieving and dereferencing to trust registry entries. - -## Step 1: Set up your account - -Make sure you have set up your account with **cheqd Studio** and are logged in, using our guide below: - -
Set up your accountSet up your account with cheqd Studio and log in to start using the APIs.set-up-account.md
- -## Step 2: Create a DID - -Before you can create a Verifiable Accreditation, you need to create a DID which is used to link to one or multiple Verifiable Accreditations on-ledger. Use the API in the page below to create a DID: - -
Create an Issuer DIDCreate a W3C conformant DID on cheqd using the did:cheqd DID Method.create-did.md
- -## Step 3: Create your Verifiable Accreditation body and save the file locally - -Verifiable Accreditations are JSON objects that take the form of the Verifiable Credential data model. There are two types of Verifiable Accreditation: - -
TypeDescription
Verifiable Accreditation to AccreditThis Credential verifies that an organisation has the permissions needed to accredit other organisations for issuing a particular type of Verifiable Accredittion.
Verifiable Accreditation to AttestThis Credential verifies that an organisation has the permissions needed to issue Verifiable Credentials, defined by a particular schema.
- -For a trusted ecosystem, these attestations are required to trace the legitimacy of a credential issuer to a root-of-trust. - -
- -Example of Verifiable Accreditation to Accredit - -```json -{ - "@context": ["https://www.w3.org/2018/credentials/v1"], - "id": "urn:uuid:8568b525-a24e-4bc0-9d97-6a8459ec0130", - "type": [ - "VerifiableCredential", - "VerifiableAttestation", - "VerifiableAccreditation", - "VerifiableAccreditationToAccredit" - ], - "issuer": "did:cheqd:testnet:098c4f66-b461-4037-9cf0-c5db75b270c6", - "issuanceDate": "2021-11-01T00:00:00Z", - "validFrom": "2021-11-01T00:00:00Z", - "expirationDate": "2025-06-22T14:11:44Z", - "issued": "2020-06-22T14:11:44Z", - "credentialSubject": { - "id": "did:cheqd:testnet:e21b63d1-a771-4eb9-9452-869cd30fd622", - "accreditedFor": [ - { - "schemaId": "did:cheqd:testnet:098c4f66-b461-4037-9cf0-c5db75b270c6/resources/83eb0ed8-37d1-4ba6-9e0b-40d60676d4aa", - "types": [ - "VerifiableCredential", - "VerifiableAttestation", - "DiplomaCredential" - ] - } - ] - }, - "credentialStatus": { - "id": "did:cheqd:testnet:098c4f66-b461-4037-9cf0-c5db75b270c6?resourceName=accreditationStatus&resourceType=StatusList2021Revocation", - "type": "StatusList2021Revocation" - }, - "termsOfUse": [ - { - "id": "https://example.com/governance-framework/../..xyz", - "type": "GovernanceFramework" - } - ], - "credentialSchema": [ - { - "id": "did:cheqd:testnet:098c4f66-b461-4037-9cf0-c5db75b270c6/resources/83eb0ed8-37d1-4ba6-9e0b-40d60676d4aa", - "type": "FullJsonSchemaValidator2021" - } - ] -} - - -``` - -
- -
- -Example of Verifiable Accreditation to Attest - -```json -{ - "@context": ["https://www.w3.org/2018/credentials/v1"], - "id": "urn:uuid:8568b525-a24e-4bc0-9d97-6a8459ec0130", - "type": [ - "VerifiableCredential", - "VerifiableAttestation", - "VerifiableAccreditation", - "VerifiableAccreditationToAttest" - ], - "issuer": "did:cheqd:testnet:098c4f66-b461-4037-9cf0-c5db75b270c6", - "issuanceDate": "2021-11-01T00:00:00Z", - "validFrom": "2021-11-01T00:00:00Z", - "expirationDate": "2025-06-22T14:11:44Z", - "issued": "2020-06-22T14:11:44Z", - "credentialSubject": { - "id": "did:cheqd:testnet:e21b63d1-a771-4eb9-9452-869cd30fd622", - "reservedAttributeId": "15b49499-2a36-4c73-9f5b-7409b44ce7a3", - "accreditedFor": [ - { - "schemaId": "did:cheqd:testnet:098c4f66-b461-4037-9cf0-c5db75b270c6/resources/da4159f1-ff50-4a7c-b0cb-40d3a1f71003a", - "types": [ - "VerifiableCredential", - "VerifiableAttestation", - "DiplomaCredential" - ] - ] - }, - "credentialStatus": { - "id": "did:cheqd:testnet:098c4f66-b461-4037-9cf0-c5db75b270c6?resourceName=accreditationStatus&resourceType=StatusList2021Revocation", - "type": "StatusList2021Revocation" - }, - "termsOfUse": { - "type": "AccreditationPolicy", - "parentAccreditation": "did:cheqd:testnet:098c4f66-b461-4037-9cf0-c5db75b270c6/resources/da4159f1-ff50-4a7c-b0cb-40d3a1f71003a", - "rootAuthorisation": "did:cheqd:testnet:098c4f66-b461-4037-9cf0-c5db75b270c6/resources/da4159f1-ff50-4a7c-b0cb-40d3a1f71003a", - "trustFramework": "Name of the Governance Framework (GF)" - }, - "credentialSchema": [ - { - "id": "did:cheqd:testnet:098c4f66-b461-4037-9cf0-c5db75b270c6/resources/da4159f1-ff50-4a7c-b0cb-40d3a1f71003a", - "type": "FullJsonSchemaValidator2021" - } - ] -} - - -``` - -
- -Save this file locally and call it something like `verifiableAccreditation.json` - -{% hint style="info" %} -Note that each SON file must be **below \~45kb in size**. -{% endhint %} - -## Step 4: Encode the file - -Prepare a file with resource and encode it into `base64, base64url` or `hex`. On Unix systems, you can use the following command input: - -```bash -$ base64 -w 0 resource.json - -``` - -Expected output: - -```bash -$ base64 -w 0 resource.json -SGVsbG8sIHdvcmxk -``` - -## Step 5: Set the resource name and type - -DID-Linked Resources are grouped by having identical **names** and **types**. This means if you want to create a new version of the same Resource, you will need to **specify the same name and type in the following request**. - -For Verifiable Accreditations, the "type" MUST be either: **`"VerifiableAccreditationToAccredit"`** or **`"VerifiableAccreditationToAttest"`** - -For example: - -```json -{ - "data": "SGVsbG8sIHdvcmxk", - "encoding": "base64url", - "name": "OxfordUniversityAccreditation", - "type": "VerifiableAccreditationToAccredit" -} -``` - -## Step 6: Populate the request inputs and hit the API - -Ensure that you link this Verifiable Accreditation to the DID that you created in step 3. This will sign the resource with the same verification method keys in your DID Document, ensuring cryptographic integrity and Controllership of the Status List. - -As a DID-Linked Resource, the Verifiable Accreditation will have a **fully resolvable DID URL** which can be referenced within the body of Verifiable Credentials, and queried by verification policies to establish the status of the specific credential. - -{% swagger src="https://raw.githubusercontent.com/cheqd/credential-service/main/src/static/swagger-api.json" path="/resource/create/{did}" method="post" expanded="true" %} -[https://raw.githubusercontent.com/cheqd/credential-service/main/src/static/swagger-api.json](https://raw.githubusercontent.com/cheqd/credential-service/main/src/static/swagger-api.json) -{% endswagger %} - -## Step 7: Reference the Verifiable Accreditation - -Owing to the design of DID-Linked Resources, following the creation of the a Verifiable Accreditation, users are able to reference the **specific version**, or create a query to **always fetch the latest version** of the Accreditation. - -Using a DID Resolver or the search DID endpoint, users can find the DID URL and unique resourceId of the Verifiable Accreditation. The unique resourceId allows users to specify this exact version of the Accreditation. - -{% swagger src="https://raw.githubusercontent.com/cheqd/credential-service/main/src/static/swagger-api.json" path="/did/search/{did}" method="get" %} -[https://raw.githubusercontent.com/cheqd/credential-service/main/src/static/swagger-api.json](https://raw.githubusercontent.com/cheqd/credential-service/main/src/static/swagger-api.json) -{% endswagger %} - -In the DID Document Metadata, users should find "linkedResourceMetadata", like the following snippet: - -```json -"linkedResourceMetadata": [ - { - "resourceURI": "did:cheqd:testnet:0a5b94d0-a417-48ed-a6f5-4abc9e95888d/resources/4e1104f9-2ee9-4bde-adc2-ab8ba72b124a", - "resourceCollectionId": "0a5b94d0-a417-48ed-a6f5-4abc9e95888d", - "resourceId": "4e1104f9-2ee9-4bde-adc2-ab8ba72b124a", - "resourceName": "OxfordUniversityAccreditation", - "resourceType": "VerifiableAccreditationToAccredit", - "mediaType": "application/json", - "resourceVersion": "", - "created": "2023-03-24T12:13:45Z", - "checksum": "6819aaecd4073173b159fedf8077c38e14939d03d58e7f4e2a0ddfe034eb2ed4", - "previousVersionId": null, - "nextVersionId": null - } -``` - -### Specific version of the Verifiable Accreditation - -Here, the "`resourceURI`" specifies the DID URL of the specific Verifiable Accreditation that was created. - -### Latest version of the Verifiable Accreditation - -In order to **reference the latest version of the Verifiable Accreditation**, the following construction needs to be used: - -`did:cheqd::?resourceName=&resourceType=` - -For example: - -`did:cheqd:testnet:0a5b94d0-a417-48ed-a6f5-4abc9e95888d?resourceName=OxfordUniversityAccreditation&resourceType=VerifiableAccreditationToAccredit` - -### Verifiable Accreditation at specific point in time - -In order to **reference the Verifiable Accreditation at a particular point in time**, the following construction needs to be used: - -`did:cheqd::?resourceName=&resourceType=&resourceVerionTime=` - -For example: - -`did:cheqd:testnet:0a5b94d0-a417-48ed-a6f5-4abc9e95888d?resourceName=OxfordUniversityAccreditation&resourceType=VerifiableAccreditationToAccredit&resourceVersionTime=2023-02-22T06:58:18.61Z` diff --git a/studio/trust-registries/issue-accreditation.md b/studio/trust-registries/issue-accreditation.md new file mode 100644 index 0000000..4fca901 --- /dev/null +++ b/studio/trust-registries/issue-accreditation.md @@ -0,0 +1,289 @@ +--- +description: Issue Verifiable Accreditations as DID-Linked Resources +--- + +# Issue Verifiable Accreditation + +Users are able to **issue Verifiable Accreditations as DID-Linked Resources on-ledger**, which may be used to **verify whether a particular recipient of an accreditation is accredited to issue a certain type of credential**, under the scope of a particular governance framework. This implementation on cheqd builds on the principles of the EBSI Trust Chain model, using DID-Linked Resources to create a more standardised format for storing, retrieving and dereferencing to trust registry entries. + +## Step 1: Set up your account + +Make sure you have set up your account with **cheqd Studio** and are logged in, using our guide below: + +
Set up your accountSet up your account with cheqd Studio and log in to start using the APIs.set-up-account.md
+ +## Step 2: Create a DID + +Before you can create a Verifiable Accreditation, you need to create a DID which is used to link to one or multiple Verifiable Accreditations on-ledger. Use the API in the page below to create a DID: + +
Create an Issuer DIDCreate a W3C conformant DID on cheqd using the did:cheqd DID Method.create-did.md
+ +## Step 3: Choose the type of Accreditation + +Verifiable Accreditations are JSON objects that take the form of the Verifiable Credential data model. There are three types of Verifiable Accreditation: + +
TypeDescription
Verifiable Authorisation for Trust ChainThis Accreditation authorises the recipient to issue Accreditations with reference to a particular governance framework.
Verifiable Accreditation to AccreditThis Accreditation verifies that an organisation has the permissions needed to accredit other organisations for issuing a particular type of Verifiable Accredittion.
Verifiable Accreditation to AttestThis Accreditation verifies that an organisation has the permissions needed to issue Verifiable Credentials, defined by a particular schema.
+ +## Step 4: Compile the appropriate request format for the API + +For each accreditation type, the user will need to use a different request format for the API. + +### Verifiable Authorisation for Trust Chain + +
+ +Request format for Verifiable Authorisation for Trust Chain + +```json +{ + "issuerDid": "did:cheqd:testnet:b003df6f-ec8e-48dd-9a2b-7011c5cf0a5e", + "subjectDid": "did:cheqd:testnet:6af412d7-2f04-4e12-a424-e6719db487ad", + "schemas": [ + { + "type": "MuseumPassCredential", + "url": "https://resolver.cheqd.net/1.0/identifiers/did:cheqd:testnet:0a5b94d0-a417-48ed-a6f5-4abc9e95888d?resourceName=MuseumPassCredentialSchema&resourceType=JsonSchemaValidator2018" + } + ], + "format": "jwt", + "accreditationName": "authoriseAccreditationTest", + "trustFramework": "https://learn.cheqd.io/governance/start", + "trustFrameworkId": "cheqd Governance Framework" +} +``` + +
+ +
+ +Response format for Verifiable Authorisation for Trust Chain + +```json +{ + "@context": [ + "https://www.w3.org/2018/credentials/v1" + ], + "type": [ + "VerifiableCredential", + "VerifiableAuthorisationForTrustChain" + ], + "issuer": { + "id": "did:cheqd:testnet:b003df6f-ec8e-48dd-9a2b-7011c5cf0a5e" + }, + "credentialSubject": { + "accreditedFor": [ + { + "schemaId": "https://resolver.cheqd.net/1.0/identifiers/did:cheqd:testnet:0a5b94d0-a417-48ed-a6f5-4abc9e95888d?resourceName=MuseumPassCredentialSchema&resourceType=JsonSchemaValidator2018", + "type": "MuseumPassCredential" + } + ], + "id": "did:cheqd:testnet:6af412d7-2f04-4e12-a424-e6719db487ad" + }, + "issuanceDate": "2024-10-15T04:06:47.000Z", + "termsOfUse": { + "type": "VerifiableAuthorisationForTrustChain", + "trustFramework": "https://learn.cheqd.io/governance/start", + "trustFrameworkId": "cheqd Governance Framework" + }, + "proof": { + "type": "JwtProof2020", + "jwt": "eyJhbGciOiJFZERTQSIsInR5cCI6IkpXVCJ9.eyJ2YyI6eyJAY29udGV4dCI6WyJodHRwczovL3d3dy53My5vcmcvMjAxOC9jcmVkZW50aWFscy92MSJdLCJ0eXBlIjpbIlZlcmlmaWFibGVDcmVkZW50aWFsIiwiVmVyaWZpYWJsZUF1dGhvcmlzYXRpb25Gb3JUcnVzdENoYWluIl0sImNyZWRlbnRpYWxTdWJqZWN0Ijp7ImFjY3JlZGl0ZWRGb3IiOlt7InNjaGVtYUlkIjoiaHR0cHM6Ly9yZXNvbHZlci5jaGVxZC5uZXQvMS4wL2lkZW50aWZpZXJzL2RpZDpjaGVxZDp0ZXN0bmV0OjBhNWI5NGQwLWE0MTctNDhlZC1hNmY1LTRhYmM5ZTk1ODg4ZD9yZXNvdXJjZU5hbWU9TXVzZXVtUGFzc0NyZWRlbnRpYWxTY2hlbWEmcmVzb3VyY2VUeXBlPUpzb25TY2hlbWFWYWxpZGF0b3IyMDE4IiwidHlwZSI6Ik11c2V1bVBhc3NDcmVkZW50aWFsIn1dfSwidGVybXNPZlVzZSI6eyJ0eXBlIjoiVmVyaWZpYWJsZUF1dGhvcmlzYXRpb25Gb3JUcnVzdENoYWluIiwidHJ1c3RGcmFtZXdvcmsiOiJodHRwczovL2xlYXJuLmNoZXFkLmlvL2dvdmVybmFuY2Uvc3RhcnQiLCJ0cnVzdEZyYW1ld29ya0lkIjoiY2hlcWQgR292ZXJuYW5jZSBGcmFtZXdvcmsifX0sInN1YiI6ImRpZDpjaGVxZDp0ZXN0bmV0OjZhZjQxMmQ3LTJmMDQtNGUxMi1hNDI0LWU2NzE5ZGI0ODdhZCIsIm5iZiI6MTcyODk2NTIwNywiaXNzIjoiZGlkOmNoZXFkOnRlc3RuZXQ6YjAwM2RmNmYtZWM4ZS00OGRkLTlhMmItNzAxMWM1Y2YwYTVlIn0.6dKE9-y2Id852onu1_WnD6aJnDtxgFZcjCbCfQ8MT1ACsHY8ox5jiKP4QUJNmhwesLidC99Qa0uyCrUhvHc2Bg" + } +} +``` + +
+ +
Request ParameterRequiredDescription
"issuerDid"YesThe DID of the Issuer of the Accreditation
"subjectDid"YesThe DID of the Recipient of the Accreditation
"schemas"YesA schema or multiple schemas that the recipient is accredited to issue
"format"OptionalDefaults to "jwt" but may also be "json-ld"
"accreditationName"YesName of the accreditation which is used for chronological versioning of the accreditation.
"trustFramework"YesA URL that points to an Ecosystem Governance Framework
"trustFrameworkId"YesThe name of the Ecosystem Governance Framework
"credentialStatus"OptionalAn object detailing the status information of the Accreditation
+ +### Verifiable Accreditation to Accredit + +
+ +Request format for Verifiable Accreditation to Accredit + +```json +{ + "issuerDid": "did:cheqd:testnet:b003df6f-ec8e-48dd-9a2b-7011c5cf0a5e", + "subjectDid": "did:cheqd:testnet:6af412d7-2f04-4e12-a424-e6719db487ad", + "schemas": [ + { + "type": "MuseumPassCredential", + "url": "https://resolver.cheqd.net/1.0/identifiers/did:cheqd:testnet:0a5b94d0-a417-48ed-a6f5-4abc9e95888d?resourceName=MuseumPassCredentialSchema&resourceType=JsonSchemaValidator2018" + } + ], + "format": "jwt", + "accreditationName": "accreditationToAttestTest", + "parentAccreditation": "did:cheqd:testnet:15b74787-6e48-4fd5-8020-eab24e990578?resourceName=accreditAccreditation&resourceType=VerifiableAccreditationToAccredit", + "rootAuthorization": "did:cheqd:testnet:5RpEg66jhhbmASWPXJRWrA?resourceName=authorizeAccreditation&resourceType=VerifiableAuthorisationForTrustChain", +} +``` + +
+ +
+ +Response format for Verifiable Accreditation to Accredit + +```json +{ + "@context": [ + "https://www.w3.org/2018/credentials/v1" + ], + "type": [ + "VerifiableCredential", + "VerifiableAccreditationToAccredit" + ], + "issuer": { + "id": "did:cheqd:testnet:b003df6f-ec8e-48dd-9a2b-7011c5cf0a5e" + }, + "credentialSubject": { + "accreditedFor": [ + { + "schemaId": "https://resolver.cheqd.net/1.0/identifiers/did:cheqd:testnet:0a5b94d0-a417-48ed-a6f5-4abc9e95888d?resourceName=MuseumPassCredentialSchema&resourceType=JsonSchemaValidator2018", + "type": "MuseumPassCredential" + } + ], + "id": "did:cheqd:testnet:6af412d7-2f04-4e12-a424-e6719db487ad" + }, + "issuanceDate": "2024-10-15T04:06:47.000Z", + "termsOfUse": { + "type": "VerifiableAuthorisationForTrustChain", + "parentAccreditation": "did:cheqd:testnet:15b74787-6e48-4fd5-8020-eab24e990578?resourceName=accreditAccreditation&resourceType=VerifiableAccreditationToAccredit", + "rootAuthorization": "did:cheqd:testnet:5RpEg66jhhbmASWPXJRWrA?resourceName=authorizeAccreditation&resourceType=VerifiableAuthorisationForTrustChain", + }, + "proof": { + "type": "JwtProof2020", + "jwt": "eyJhbGciOiJFZERTQSIsInR5cCI6IkpXVCJ9.eyJ2YyI6eyJAY29udGV4dCI6WyJodHRwczovL3d3dy53My5vcmcvMjAxOC9jcmVkZW50aWFscy92MSJdLCJ0eXBlIjpbIlZlcmlmaWFibGVDcmVkZW50aWFsIiwiVmVyaWZpYWJsZUF1dGhvcmlzYXRpb25Gb3JUcnVzdENoYWluIl0sImNyZWRlbnRpYWxTdWJqZWN0Ijp7ImFjY3JlZGl0ZWRGb3IiOlt7InNjaGVtYUlkIjoiaHR0cHM6Ly9yZXNvbHZlci5jaGVxZC5uZXQvMS4wL2lkZW50aWZpZXJzL2RpZDpjaGVxZDp0ZXN0bmV0OjBhNWI5NGQwLWE0MTctNDhlZC1hNmY1LTRhYmM5ZTk1ODg4ZD9yZXNvdXJjZU5hbWU9TXVzZXVtUGFzc0NyZWRlbnRpYWxTY2hlbWEmcmVzb3VyY2VUeXBlPUpzb25TY2hlbWFWYWxpZGF0b3IyMDE4IiwidHlwZSI6Ik11c2V1bVBhc3NDcmVkZW50aWFsIn1dfSwidGVybXNPZlVzZSI6eyJ0eXBlIjoiVmVyaWZpYWJsZUF1dGhvcmlzYXRpb25Gb3JUcnVzdENoYWluIiwidHJ1c3RGcmFtZXdvcmsiOiJodHRwczovL2xlYXJuLmNoZXFkLmlvL2dvdmVybmFuY2Uvc3RhcnQiLCJ0cnVzdEZyYW1ld29ya0lkIjoiY2hlcWQgR292ZXJuYW5jZSBGcmFtZXdvcmsifX0sInN1YiI6ImRpZDpjaGVxZDp0ZXN0bmV0OjZhZjQxMmQ3LTJmMDQtNGUxMi1hNDI0LWU2NzE5ZGI0ODdhZCIsIm5iZiI6MTcyODk2NTIwNywiaXNzIjoiZGlkOmNoZXFkOnRlc3RuZXQ6YjAwM2RmNmYtZWM4ZS00OGRkLTlhMmItNzAxMWM1Y2YwYTVlIn0.6dKE9-y2Id852onu1_WnD6aJnDtxgFZcjCbCfQ8MT1ACsHY8ox5jiKP4QUJNmhwesLidC99Qa0uyCrUhvHc2Bg" + } +} +``` + +
+ +
Request ParameterRequiredDescription
"issuerDid"YesThe DID of the Issuer of the Accreditation
"subjectDid"YesThe DID of the Recipient of the Accreditation
"schemas"YesA schema or multiple schemas that the recipient is accredited to issue
"format"OptionalDefaults to "jwt" but may also be "json-ld"
"accreditationName"YesName of the accreditation which is used for chronological versioning of the accreditation.
"parentAccreditation"YesA URL or DID URL of Accreditation of the Issuer demonstrating capacity to issue this Accreditation.
"rootAuthorization"YesA URL or DID URL of the root authorization governing the ecosystem
"credentialStatus"OptionalAn object detailing the status information of the Accreditation
+ +For a trusted ecosystem, these attestations are required to trace the legitimacy of a credential issuer to a root-of-trust. + +### Verifiable Accreditation to Attest + +
+ +Request format for Verifiable Accreditation to Attest + +```json +{ + "issuerDid": "did:cheqd:testnet:b003df6f-ec8e-48dd-9a2b-7011c5cf0a5e", + "subjectDid": "did:cheqd:testnet:6af412d7-2f04-4e12-a424-e6719db487ad", + "schemas": [ + { + "type": "MuseumPassCredential", + "url": "https://resolver.cheqd.net/1.0/identifiers/did:cheqd:testnet:0a5b94d0-a417-48ed-a6f5-4abc9e95888d?resourceName=MuseumPassCredentialSchema&resourceType=JsonSchemaValidator2018" + } + ], + "format": "jwt", + "accreditationName": "accreditationToAttestTest", + "parentAccreditation": "did:cheqd:testnet:15b74787-6e48-4fd5-8020-eab24e990578?resourceName=accreditAccreditation&resourceType=VerifiableAccreditationToAccredit", + "rootAuthorization": "did:cheqd:testnet:5RpEg66jhhbmASWPXJRWrA?resourceName=authorizeAccreditation&resourceType=VerifiableAuthorisationForTrustChain", +} +``` + +
+ +
+ +Response format for Verifiable Accreditation to Attest + +```json +{ + "@context": [ + "https://www.w3.org/2018/credentials/v1" + ], + "type": [ + "VerifiableCredential", + "VerifiableAccreditationToAccredit" + ], + "issuer": { + "id": "did:cheqd:testnet:b003df6f-ec8e-48dd-9a2b-7011c5cf0a5e" + }, + "credentialSubject": { + "accreditedFor": [ + { + "schemaId": "https://resolver.cheqd.net/1.0/identifiers/did:cheqd:testnet:0a5b94d0-a417-48ed-a6f5-4abc9e95888d?resourceName=MuseumPassCredentialSchema&resourceType=JsonSchemaValidator2018", + "type": "MuseumPassCredential" + } + ], + "id": "did:cheqd:testnet:6af412d7-2f04-4e12-a424-e6719db487ad" + }, + "issuanceDate": "2024-10-15T04:06:47.000Z", + "termsOfUse": { + "type": "VerifiableAuthorisationForTrustChain", + "parentAccreditation": "did:cheqd:testnet:15b74787-6e48-4fd5-8020-eab24e990578?resourceName=accreditAccreditation&resourceType=VerifiableAccreditationToAccredit", + "rootAuthorization": "did:cheqd:testnet:5RpEg66jhhbmASWPXJRWrA?resourceName=authorizeAccreditation&resourceType=VerifiableAuthorisationForTrustChain", + }, + "proof": { + "type": "JwtProof2020", + "jwt": "eyJhbGciOiJFZERTQSIsInR5cCI6IkpXVCJ9.eyJ2YyI6eyJAY29udGV4dCI6WyJodHRwczovL3d3dy53My5vcmcvMjAxOC9jcmVkZW50aWFscy92MSJdLCJ0eXBlIjpbIlZlcmlmaWFibGVDcmVkZW50aWFsIiwiVmVyaWZpYWJsZUF1dGhvcmlzYXRpb25Gb3JUcnVzdENoYWluIl0sImNyZWRlbnRpYWxTdWJqZWN0Ijp7ImFjY3JlZGl0ZWRGb3IiOlt7InNjaGVtYUlkIjoiaHR0cHM6Ly9yZXNvbHZlci5jaGVxZC5uZXQvMS4wL2lkZW50aWZpZXJzL2RpZDpjaGVxZDp0ZXN0bmV0OjBhNWI5NGQwLWE0MTctNDhlZC1hNmY1LTRhYmM5ZTk1ODg4ZD9yZXNvdXJjZU5hbWU9TXVzZXVtUGFzc0NyZWRlbnRpYWxTY2hlbWEmcmVzb3VyY2VUeXBlPUpzb25TY2hlbWFWYWxpZGF0b3IyMDE4IiwidHlwZSI6Ik11c2V1bVBhc3NDcmVkZW50aWFsIn1dfSwidGVybXNPZlVzZSI6eyJ0eXBlIjoiVmVyaWZpYWJsZUF1dGhvcmlzYXRpb25Gb3JUcnVzdENoYWluIiwidHJ1c3RGcmFtZXdvcmsiOiJodHRwczovL2xlYXJuLmNoZXFkLmlvL2dvdmVybmFuY2Uvc3RhcnQiLCJ0cnVzdEZyYW1ld29ya0lkIjoiY2hlcWQgR292ZXJuYW5jZSBGcmFtZXdvcmsifX0sInN1YiI6ImRpZDpjaGVxZDp0ZXN0bmV0OjZhZjQxMmQ3LTJmMDQtNGUxMi1hNDI0LWU2NzE5ZGI0ODdhZCIsIm5iZiI6MTcyODk2NTIwNywiaXNzIjoiZGlkOmNoZXFkOnRlc3RuZXQ6YjAwM2RmNmYtZWM4ZS00OGRkLTlhMmItNzAxMWM1Y2YwYTVlIn0.6dKE9-y2Id852onu1_WnD6aJnDtxgFZcjCbCfQ8MT1ACsHY8ox5jiKP4QUJNmhwesLidC99Qa0uyCrUhvHc2Bg" + } +} +``` + +
+ +
Request ParameterRequiredDescription
"issuerDid"YesThe DID of the Issuer of the Accreditation
"subjectDid"YesThe DID of the Recipient of the Accreditation
"schemas"YesA schema or multiple schemas that the recipient is accredited to issue
"format"OptionalDefaults to "jwt" but may also be "json-ld"
"accreditationName"YesName of the accreditation which is used for chronological versioning of the accreditation.
"parentAccreditation"YesA URL or DID URL of Accreditation of the Issuer demonstrating capacity to issue this Accreditation.
"rootAuthorization"YesA URL or DID URL of the root authorization governing the ecosystem
"credentialStatus"OptionalAn object detailing the status information of the Accreditation
+ +For a trusted ecosystem, these attestations are required to trace the legitimacy of a credential issuer to a root-of-trust. + +## Step 5: Make request to the API + +{% swagger src="https://raw.githubusercontent.com/cheqd/studio/refs/heads/main/src/static/swagger-api.json" path="/trust-registry/accreditation/issue" method="post" %} +[https://raw.githubusercontent.com/cheqd/studio/refs/heads/main/src/static/swagger-api.json](https://raw.githubusercontent.com/cheqd/studio/refs/heads/main/src/static/swagger-api.json) +{% endswagger %} + +## Step 7: Reference the Verifiable Accreditation + +Owing to the design of DID-Linked Resources, following the creation of the a Verifiable Accreditation, users are able to reference the **specific version**, or create a query to **always fetch the latest version** of the Accreditation. + +Using a DID Resolver or the search DID endpoint, users can find the DID URL and unique resourceId of the Verifiable Accreditation. The unique resourceId allows users to specify this exact version of the Accreditation. + +In the DID Document Metadata, users should find "linkedResourceMetadata", like the following snippet: + +```json +"linkedResourceMetadata": [ + { + "resourceURI": "did:cheqd:testnet:0a5b94d0-a417-48ed-a6f5-4abc9e95888d/resources/4e1104f9-2ee9-4bde-adc2-ab8ba72b124a", + "resourceCollectionId": "0a5b94d0-a417-48ed-a6f5-4abc9e95888d", + "resourceId": "4e1104f9-2ee9-4bde-adc2-ab8ba72b124a", + "resourceName": "OxfordUniversityAccreditation", + "resourceType": "VerifiableAccreditationToAccredit", + "mediaType": "application/json", + "resourceVersion": "", + "created": "2023-03-24T12:13:45Z", + "checksum": "6819aaecd4073173b159fedf8077c38e14939d03d58e7f4e2a0ddfe034eb2ed4", + "previousVersionId": null, + "nextVersionId": null + } +``` + +### Specific version of the Verifiable Accreditation + +Here, the "`resourceURI`" specifies the DID URL of the specific Verifiable Accreditation that was created. + +### Latest version of the Verifiable Accreditation + +In order to **reference the latest version of the Verifiable Accreditation**, the following construction needs to be used: + +`did:cheqd::?resourceName=&resourceType=` + +For example: + +`did:cheqd:testnet:0a5b94d0-a417-48ed-a6f5-4abc9e95888d?resourceName=OxfordUniversityAccreditation&resourceType=VerifiableAccreditationToAccredit` + +### Verifiable Accreditation at specific point in time + +In order to **reference the Verifiable Accreditation at a particular point in time**, the following construction needs to be used: + +`did:cheqd::?resourceName=&resourceType=&resourceVerionTime=` + +For example: + +`did:cheqd:testnet:0a5b94d0-a417-48ed-a6f5-4abc9e95888d?resourceName=OxfordUniversityAccreditation&resourceType=VerifiableAccreditationToAccredit&resourceVersionTime=2023-02-22T06:58:18.61Z`