After registering a schema, a credential definition can be registered based on the schema. The credential definition, amongst more things, binds the schema to a specific issuer. Schemas can be reused between issuers, but a credential definition is specific to an issuer. In a credential definition revocation can also be specified. This section will not go in-depth about revocation.
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 is configured for the issuer.
To issue Verifiable Credentials, the issuer will have to first create a Schema and then a Credential Definition.
⚠️ Before you begin...
Make sure you've correctly configured .
In order to register a schema and credential definition, a DID must be added to the agent first. This can be done by calling agent.dids.create()
, but this does require an endorser DID to be present as the submitterDid
. This is optional, if you have created a DID from the agent before as described .
When you have a registered (or imported) a DID on the network and in your wallet, you can register a schema. Registering a schema requires four fields: issuerId
, name
, version
and attrNames
. It is important to note that the issuerId
must be the same as a DID in your wallet.
"DID-Linked Resources" are identified with a did:cheqd
Decentralized Identifier with a Universally Unique Identifier (UUID) 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.
Using the createResource cheqd api agents are able to create custom DID-Linked Resources, including:
Trust Registries
Status Lists
Logos associated with DIDs
Governance files
did
*
name
*
resourceType
*
id
*
data
* : Text, Base64 string or an object
alsoKnownAs
version
The resolveResource function in the cheqd API allows agents to resolve DID-Linked Resources in two ways:
By resourceId
By resourceName
and resourceType
Additionally, both conventions support the following query parameters:
To fetch a specific resource version: resourceUrl?version=<versionId>
To fetch the closest resource version for a given time: resourceUrl?resourceVersionTime=<epoch time>
resourceId
Understanding DLRs
More details about DID-Linked Resources on Cheqd.
Understanding AnonCreds
More details about AnonCreds Object Method.
Create Schema
Create an AnonCreds Schema.
Create Credential Definition
Create an AnonCreds Credential Definition