-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
GITBOOK-344: change request with no subject merged in GitBook
- Loading branch information
1 parent
24a327c
commit 70331c6
Showing
9 changed files
with
160 additions
and
11 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
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
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
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
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
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,8 @@ | ||
# DID-Linked Resources | ||
|
||
**"DID-Linked Resources"** are identified with a [`did:cheqd` Decentralized Identifier](https://docs.cheqd.io/product/architecture/adr-list/adr-002-did-linked-resources) with a [Universally Unique Identifier (UUID)](https://www.uuidgenerator.net/) that acts as a permanently-accessible link to fetch the resources from the cheqd ledger. We refer to this as the "**resource ID**". Through the "**resource ID**" or a set of DID URL query parameters, applications are able to persistently access a digital resource on the cheqd network. | ||
|
||
## Get started | ||
|
||
<table data-view="cards"><thead><tr><th></th><th></th><th></th><th data-hidden data-card-target data-type="content-ref"></th></tr></thead><tbody><tr><td><mark style="color:blue;"><strong>Understanding DLRs</strong></mark></td><td>More details about DID-Linked Resources on Cheqd.</td><td></td><td><a href="../../../studio/did-linked-resources/understanding-dlrs/">understanding-dlrs</a></td></tr><tr><td><mark style="color:blue;"><strong>Understanding AnonCreds</strong></mark></td><td>More details about AnonCreds Object Method.</td><td></td><td><a href="../../../advanced/anoncreds/">anoncreds</a></td></tr><tr><td><mark style="color:blue;"><strong>Create Schema</strong></mark></td><td>Create an AnonCreds Schema.</td><td></td><td><a href="create-anoncreds-schema.md">create-anoncreds-schema.md</a></td></tr><tr><td><mark style="color:blue;"><strong>Create Credential Definition</strong></mark></td><td>Create an AnonCreds Credential Definition</td><td></td><td><a href="create-anoncreds-credential-definition.md">create-anoncreds-credential-definition.md</a></td></tr></tbody></table> | ||
|
48 changes: 48 additions & 0 deletions
48
sdk/aca-py/did-linked-resources/create-anoncreds-credential-definition.md
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 @@ | ||
# Create AnonCreds Credential Definition | ||
|
||
## Create Credential Definition | ||
|
||
The request body must contain the `credential_definition` object with the Issuer DID and the Schema ID created in the previous steps. | ||
|
||
To enable revocation, the `options` must contain the revocation flag, and the size of the revocation registry. Also, ensure that a [Tails Server](https://github.com/bcgov/indy-tails-server) is configured for the issuer. | ||
|
||
{% swagger src="../../../.gitbook/assets/swagger.json" path="/anoncreds/credential-definition" method="post" %} | ||
[swagger.json](../../../.gitbook/assets/swagger.json) | ||
{% endswagger %} | ||
|
||
## Request Body | ||
|
||
<details> | ||
|
||
<summary>credential_definition (mandatory)</summary> | ||
|
||
"issuerId": DID of the Issuer. | ||
|
||
"schemaId": The AnonCreds Schema ID created by the Issuer (must be of the same DID). | ||
|
||
"tag": Additional Name to identify the Credential Definition. | ||
|
||
</details> | ||
|
||
<details> | ||
|
||
<summary>options (optional)</summary> | ||
|
||
"support\_revocation": Boolean value to indicate that the Credential can be revoked or not. (Tails server must be configured if this is set to \`true\`) | ||
|
||
"revocation\_registry\_size": Maximum size of the Revocation Registry. | ||
|
||
</details> | ||
|
||
## Check the new Credential Definition | ||
|
||
{% swagger src="../../../.gitbook/assets/swagger.json" path="/anoncreds/credential-definition/{cred_def_id}" method="get" %} | ||
[swagger.json](../../../.gitbook/assets/swagger.json) | ||
{% endswagger %} | ||
|
||
|
||
|
||
|
||
|
||
|
||
|
48 changes: 48 additions & 0 deletions
48
sdk/aca-py/did-linked-resources/create-anoncreds-schema.md
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 @@ | ||
# Create AnonCreds Schema | ||
|
||
To issue Verifiable Credentials, the issuer will have to first create a Schema and then a Credential Definition. | ||
|
||
## Create Schema | ||
|
||
The request body must contain the `schema` object, which defines the attributes, name and version of the Schema. This will create a [DID-Linked Resource](https://docs.cheqd.io/product/sdk/veramo-plugin/did-linked-resources) of type `anonCredsSchema`. | ||
|
||
{% swagger src="../../../.gitbook/assets/swagger.json" path="/anoncreds/schema" method="post" %} | ||
[swagger.json](../../../.gitbook/assets/swagger.json) | ||
{% endswagger %} | ||
|
||
## Request Body | ||
|
||
<details> | ||
|
||
<summary>options (optional)</summary> | ||
|
||
Optional Key-Value pairs of additional options. | ||
|
||
</details> | ||
|
||
<details> | ||
|
||
<summary>schema (mandatory)</summary> | ||
|
||
"attrNames": Array of attributes for the schema definition. | ||
|
||
"issuerId": Issuer DID, use the did created by the Issuer. | ||
|
||
"name": Name of the Schema | ||
|
||
"version": Version of the Schema (To update existing Schema, use same name and different version) | ||
|
||
</details> | ||
|
||
## Check the new Schema | ||
|
||
{% swagger src="../../../.gitbook/assets/swagger.json" path="/anoncreds/schema/{schema_id}" method="get" %} | ||
[swagger.json](../../../.gitbook/assets/swagger.json) | ||
{% endswagger %} | ||
|
||
|
||
|
||
|
||
|
||
|
||
|
46 changes: 38 additions & 8 deletions
46
...ca-py/verifiable-credentials-and-presentations/issue-a-verifiable-credential.md
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 |
---|---|---|
@@ -1,12 +1,42 @@ | ||
# Issue a Verifiable Credential | ||
|
||
After creating cheqd DIDs, you can issue verifiable credentials using the ACA-Py agent. Here's how: | ||
Using the `/issue-credential-2.0` API endpoints, it is possible to issue Verifiable Credentials, signed by a cheqd DID, in a few clicks or lines of code. By following the following steps, you can effectively issue verifiable credentials using ACA-Py integrated with the cheqd ecosystem. | ||
|
||
## Step 1: Create a Connection with Holder | ||
|
||
Use any supported method to create a connection with the Holder of the credential. Automated [out-of-band protocol](https://identity.foundation/didcomm-messaging/spec/#out-of-band-messages) is recommended. | ||
|
||
## Step 2: Prepare Credential Offer | ||
|
||
Generate a credential offer using the `/issue-credential-2.0/send-offer` API. This offer is sent to the holder, informing them about the available credential and its attributes. | ||
|
||
{% swagger src="../../../.gitbook/assets/swagger.json" path="/issue-credential-2.0/send-offer" method="post" %} | ||
[swagger.json](../../../.gitbook/assets/swagger.json) | ||
{% endswagger %} | ||
|
||
## Step 3: Holder accepts credential offer | ||
|
||
The Holder has to retrieve the credential exchange id, and call this API to accept the offer. | ||
|
||
{% swagger src="../../../.gitbook/assets/swagger.json" path="/issue-credential/records/{cred_ex_id}/send-request" method="post" %} | ||
[swagger.json](../../../.gitbook/assets/swagger.json) | ||
{% endswagger %} | ||
|
||
## Step 4: Issue Credential | ||
|
||
Once the credential request is received and validated, issue the credential using the `/issue-credential-2.0/records/<exchange-id>/issue` API endpoint. | ||
|
||
{% swagger src="../../../.gitbook/assets/swagger.json" path="/issue-credential-2.0/records/{cred_ex_id}/issue" method="post" %} | ||
[swagger.json](../../../.gitbook/assets/swagger.json) | ||
{% endswagger %} | ||
|
||
## Step 5: Holder stores Credential | ||
|
||
The Holder has to store the issued credential into their wallet using the following API. | ||
|
||
{% swagger src="../../../.gitbook/assets/swagger.json" path="/issue-credential-2.0/records/{cred_ex_id}/store" method="post" %} | ||
[swagger.json](../../../.gitbook/assets/swagger.json) | ||
{% endswagger %} | ||
|
||
|
||
1. **Create a Schema**: Create as Anoncreds Schema with the newly created DID as `issuerId` using the API `POST /anoncreds/schema`. This will create a [DID-Linked Resource](../../veramo-plugin/did-linked-resources/) of type `anonCredsSchema`. | ||
2. **Create a Credential Definition**: Using the Schema ID from the previous step, create an Anoncreds Credential Definition using the API `POST /anoncreds/credential-definition`. Here you can pass the `support_revocation` option. Ensure that a [Tails Server](https://github.com/bcgov/indy-tails-server) is configured for the issuer.  | ||
3. **Create Connection with Holder:** Use any supported method to create the connection with the holder of the credential. Automated [out-of-band protocol](https://identity.foundation/didcomm-messaging/spec/#out-of-band-messages) recommended. | ||
4. **Prepare Credential Offer**: Generate a credential offer using the `/issue-credential-2.0/send-offer` API. This offer is sent to the holder, informing them about the available credential and its attributes. | ||
5. **Receive Credential Request**: Wait for the holder to respond with a credential request, which will include proof of possession of the necessary private keys. | ||
6. **Issue Credential**: Once the credential request is received and validated, issue the credential using the `/issue-credential-2.0/records/<exchange-id>/issue` API endpoint. | ||
|
||
By following these steps, you can effectively issue verifiable credentials using ACA-Py integrated with the cheqd ecosystem. |