To issue Verifiable Credentials, the issuer will have to first create a Schema and then a Credential Definition.
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 of type anonCredsSchema
.
"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.
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 is configured for the issuer.
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
Schema identifier
"did:(method):2:schema_name:1.0"
Schema attribute names
Attribute name
"score"
Issuer Identifier of the credential definition or schema
"did:(method):WgWxqztrNooG92RXvxSTWv"
Schema name
"Example schema"
Schema version
"1.0"
Schema identifier
"did:(method):2:schema_name:1.0"
Create transaction for endorser (optional, default false). Use this for agents who don't specify an author role but want to create a transaction for an endorser to sign.
false
Connection identifier (optional) (this is an example). You can set this if you know the endorser's connection id you want to use. If not specified then the agent will attempt to find an endorser connection.
"3fa85f64-5717-4562-b3fc-2c963f66afa6"
Schema attribute names
Attribute name
"score"
Issuer Identifier of the credential definition or schema
"did:(method):WgWxqztrNooG92RXvxSTWv"
Schema name
"Example schema"
Schema version
"1.0"
Schema attribute names
Attribute name
"score"
Issuer Identifier of the credential definition or schema
"did:(method):WgWxqztrNooG92RXvxSTWv"
Schema name
"Example schema"
Schema version
"1.0"
Schema identifier
"did:(method):2:schema_name:1.0"
Issuer Identifier of the credential definition
"did:(method):WgWxqztrNooG92RXvxSTWv"
Schema identifier
"did:(method):2:schema_name:1.0"
Credential definition tag
"default"
Create transaction for endorser (optional, default false). Use this for agents who don't specify an author role but want to create a transaction for an endorser to sign.
false
Connection identifier (optional) (this is an example). You can set this if you know the endorser's connection id you want to use. If not specified then the agent will attempt to find an endorser connection.
"3fa85f64-5717-4562-b3fc-2c963f66afa6"
Maximum number of credential revocations per registry
1000
Support credential revocation
credential definition
Issuer Identifier of the credential definition or schema
"did:(method):WgWxqztrNooG92RXvxSTWv"
Schema identifier
"did:(method):2:schema_name:1.0"
The tag value passed in by the Issuer to an AnonCred's Credential Definition create and store implementation.
"default"
Primary value for credential definition
"0"
^[0-9]*$
"0"
^[0-9]*$
"0"
^[0-9]*$
"0"
^[0-9]*$
Revocation value for credential definition
"1 1F14F&ECB578F 2 095E45DDF417D"
"1 1D64716fCDC00C 1 0C781960FA66E3D3 2 095E45DDF417D"
"1 16675DAE54BFAE8 2 095E45DD417D"
"1 21E5EF9476EAF18 2 095E45DDF417D"
"1 236D1D99236090 2 095E45DDF417D"
"1 1C3AE8D1F1E277 2 095E45DDF417D"
"1 1B2A32CF3167 1 2490FEBF6EE55 1 0000000000000000"
"1 1D8549E8C0F8 2 095E45DDF417D"
"1 142CD5E5A7DC 1 153885BD903312 2 095E45DDF417D"
"1 0C430AAB2B4710 1 1CB3A0932EE7E 1 0000000000000000"
"1 153558BD903312 2 095E45DDF417D 1 0000000000000000"
credential definition id
"did:(method):3:CL:20:tag"
Credential definition identifier
"did:(method):3:CL:20:tag"
credential definition
Issuer Identifier of the credential definition or schema
"did:(method):WgWxqztrNooG92RXvxSTWv"
Schema identifier
"did:(method):2:schema_name:1.0"
The tag value passed in by the Issuer to an AnonCred's Credential Definition create and store implementation.
"default"
Primary value for credential definition
"0"
^[0-9]*$
"0"
^[0-9]*$
"0"
^[0-9]*$
"0"
^[0-9]*$
Revocation value for credential definition
"1 1F14F&ECB578F 2 095E45DDF417D"
"1 1D64716fCDC00C 1 0C781960FA66E3D3 2 095E45DDF417D"
"1 16675DAE54BFAE8 2 095E45DD417D"
"1 21E5EF9476EAF18 2 095E45DDF417D"
"1 236D1D99236090 2 095E45DDF417D"
"1 1C3AE8D1F1E277 2 095E45DDF417D"
"1 1B2A32CF3167 1 2490FEBF6EE55 1 0000000000000000"
"1 1D8549E8C0F8 2 095E45DDF417D"
"1 142CD5E5A7DC 1 153885BD903312 2 095E45DDF417D"
"1 0C430AAB2B4710 1 1CB3A0932EE7E 1 0000000000000000"
"1 153558BD903312 2 095E45DDF417D 1 0000000000000000"
credential definition id
"did:(method):3:CL:20:tag"