Verification templates
A verification template describes what you ask a holder to prove: which attributes, from which kind of credential. The formats you can use depend on the ecosystem (see Compatibility):
| Format | Ecosystems | Method |
|---|---|---|
| JSON-LD | EU Digital Identity | createVerificationTemplateJsonld |
| JSON-LD | cheqd, Indicio, Polygon | createVerificationTemplateJsonldRequest |
| SD-JWT | EU Digital Identity | createVerificationTemplateSdJwt |
| mDoc | EU Digital Identity | createVerificationTemplateMdoc |
| JWT-VC | Microsoft Entra | createVerificationTemplateJwtVc |
| AnonCreds | cheqd, Indicio | createVerificationTemplateAnoncreds |
- Get all verification templates
- Get organization verification templates
- Create verification template (JSON-LD)
- Create verification template (SD-JWT)
- Create verification template (mDoc)
- Create verification template (JWT-VC)
- Create verification template (AnonCreds)
- Update verification template
- Delete verification template
Get all verification templates
Lists the verification templates in your ecosystem. To list only one organization's templates, use Get organization verification templates.
EU Digital Identity
Microsoft Entra
cheqd
Indicio
Polygon
import { OpenIdEcosystem } from '@hovi/core-sdk';
const openid = new OpenIdEcosystem({
apiKey: '<YOUR_API_KEY>',
});
const templates = await openid.getAllVerificationTemplates({
organizationId: '<ORGANIZATION_ID>',
});
import { EntraEcosystem } from '@hovi/core-sdk';
const entra = new EntraEcosystem({
apiKey: '<YOUR_API_KEY>',
});
const templates = await entra.getAllVerificationTemplates({
organizationId: '<ORGANIZATION_ID>',
});
import { CheqdEcosystem } from '@hovi/core-sdk';
const cheqd = new CheqdEcosystem({
apiKey: '<YOUR_API_KEY>',
});
const templates = await cheqd.getAllVerificationTemplates({
organizationId: '<ORGANIZATION_ID>',
});
import { IndicioEcosystem } from '@hovi/core-sdk';
const indicio = new IndicioEcosystem({
apiKey: '<YOUR_API_KEY>',
});
const templates = await indicio.getAllVerificationTemplates({
organizationId: '<ORGANIZATION_ID>',
});
import { PrivadoEcosystem } from '@hovi/core-sdk';
const privado = new PrivadoEcosystem({
apiKey: '<YOUR_API_KEY>',
});
const templates = await privado.getAllVerificationTemplates({
organizationId: '<ORGANIZATION_ID>',
});
Params
| Parameter | Type | Description |
|---|---|---|
| organizationId | string (Required) | Your organization ID. |
| verificationTemplateId | string (Optional) | Return only this template. |
Get organization verification templates
Lists the verification templates of one organization.
EU Digital Identity
Microsoft Entra
cheqd
Indicio
Polygon
import { OpenIdEcosystem } from '@hovi/core-sdk';
const openid = new OpenIdEcosystem({
apiKey: '<YOUR_API_KEY>',
});
const templates = await openid.getOrganizationVerificationTemplates({
organizationId: '<ORGANIZATION_ID>',
});
import { EntraEcosystem } from '@hovi/core-sdk';
const entra = new EntraEcosystem({
apiKey: '<YOUR_API_KEY>',
});
const templates = await entra.getOrganizationVerificationTemplates({
organizationId: '<ORGANIZATION_ID>',
});
import { CheqdEcosystem } from '@hovi/core-sdk';
const cheqd = new CheqdEcosystem({
apiKey: '<YOUR_API_KEY>',
});
const templates = await cheqd.getOrganizationVerificationTemplates({
organizationId: '<ORGANIZATION_ID>',
});
import { IndicioEcosystem } from '@hovi/core-sdk';
const indicio = new IndicioEcosystem({
apiKey: '<YOUR_API_KEY>',
});
const templates = await indicio.getOrganizationVerificationTemplates({
organizationId: '<ORGANIZATION_ID>',
});
import { PrivadoEcosystem } from '@hovi/core-sdk';
const privado = new PrivadoEcosystem({
apiKey: '<YOUR_API_KEY>',
});
const templates = await privado.getOrganizationVerificationTemplates({
organizationId: '<ORGANIZATION_ID>',
});
Params
| Parameter | Type | Description |
|---|---|---|
| organizationId | string (Required) | Your organization ID. |
| verificationTemplateId | string (Optional) | Return only this template. |
Create verification template (JSON-LD)
Creates a verification template for JSON-LD (W3C) credentials. The method is createVerificationTemplateJsonld in EU Digital Identity and createVerificationTemplateJsonldRequest in cheqd, Indicio and Polygon.
EU Digital Identity
cheqd
Indicio
Polygon
import { OpenIdEcosystem } from '@hovi/core-sdk';
const openid = new OpenIdEcosystem({
apiKey: '<YOUR_API_KEY>',
});
const template = await openid.createVerificationTemplateJsonld({
organizationId: '<ORGANIZATION_ID>',
name: 'Employee check',
version: '1.0.0',
description: 'Checks an employee ID',
requestedAttributes: [
{ name: 'firstName', label: 'First name', type: 'string', description: 'Given name', required: true },
{ name: 'lastName', label: 'Last name', type: 'string', description: 'Family name', required: true },
],
restrictions: {
credentialTemplateId: '<CREDENTIAL_TEMPLATE_ID>',
},
});
import { CheqdEcosystem } from '@hovi/core-sdk';
const cheqd = new CheqdEcosystem({
apiKey: '<YOUR_API_KEY>',
});
const template = await cheqd.createVerificationTemplateJsonldRequest({
organizationId: '<ORGANIZATION_ID>',
name: 'Employee check',
version: '1.0.0',
description: 'Checks an employee ID',
requestedAttributes: [
{ name: 'firstName', label: 'First name', type: 'string', description: 'Given name', required: true },
{ name: 'lastName', label: 'Last name', type: 'string', description: 'Family name', required: true },
],
restrictions: {
credentialTemplateId: '<CREDENTIAL_TEMPLATE_ID>',
},
});
import { IndicioEcosystem } from '@hovi/core-sdk';
const indicio = new IndicioEcosystem({
apiKey: '<YOUR_API_KEY>',
});
const template = await indicio.createVerificationTemplateJsonldRequest({
organizationId: '<ORGANIZATION_ID>',
name: 'Employee check',
version: '1.0.0',
description: 'Checks an employee ID',
requestedAttributes: [
{ name: 'firstName', label: 'First name', type: 'string', description: 'Given name', required: true },
{ name: 'lastName', label: 'Last name', type: 'string', description: 'Family name', required: true },
],
restrictions: {
credentialTemplateId: '<CREDENTIAL_TEMPLATE_ID>',
},
});
import { PrivadoEcosystem } from '@hovi/core-sdk';
const privado = new PrivadoEcosystem({
apiKey: '<YOUR_API_KEY>',
});
const template = await privado.createVerificationTemplateJsonldRequest({
organizationId: '<ORGANIZATION_ID>',
name: 'Employee check',
version: '1.0.0',
description: 'Checks an employee ID',
requestedAttributes: [
{ name: 'firstName', label: 'First name', type: 'string', description: 'Given name', required: true },
{ name: 'lastName', label: 'Last name', type: 'string', description: 'Family name', required: true },
],
restrictions: {
credentialTemplateId: '<CREDENTIAL_TEMPLATE_ID>',
},
});
Params
| Parameter | Type | Description |
|---|---|---|
| organizationId | string (Required) | Your organization ID. |
| name | string (Required) | The name of the template. |
| version | string (Required) | The version of the template, for example 1.0.0. |
| description | string (Required) | A description of the template. |
| requestedAttributes | VerificationTemplateAttribute[] (Required) | The attributes to ask for. Each has a name, label, type, description and required flag. |
| categoryId | string (Optional) | The ID of a category for the template. |
| image | string (Optional) | A URL of the template's image. |
| restrictions | { issuerDid?, schemaType?, schemaUrl?, credentialTemplateId? } (Optional) | Accept only credentials that match these values, for example from one issuer or template. |
| conditions | Record<string, any>[] (Optional) | Polygon only: extra conditions on the attribute values. |
Create verification template (SD-JWT)
Creates a verification template for SD-JWT credentials.
EU Digital Identity
import { OpenIdEcosystem } from '@hovi/core-sdk';
const openid = new OpenIdEcosystem({
apiKey: '<YOUR_API_KEY>',
});
const template = await openid.createVerificationTemplateSdJwt({
organizationId: '<ORGANIZATION_ID>',
name: 'Employee check',
version: '1.0.0',
description: 'Checks an employee ID',
requestedAttributes: [
{ name: 'firstName', label: 'First name', type: 'string', description: 'Given name', required: true },
{ name: 'lastName', label: 'Last name', type: 'string', description: 'Family name', required: true },
],
restrictions: {
credentialTemplateId: '<CREDENTIAL_TEMPLATE_ID>',
},
limit_disclosure: true,
});
Params
| Parameter | Type | Description |
|---|---|---|
| organizationId | string (Required) | Your organization ID. |
| name | string (Required) | The name of the template. |
| version | string (Required) | The version of the template, for example 1.0.0. |
| description | string (Required) | A description of the template. |
| requestedAttributes | VerificationTemplateAttribute[] (Required) | The attributes to ask for. Each has a name, label, type, description and required flag. |
| categoryId | string (Optional) | The ID of a category for the template. |
| image | string (Optional) | A URL of the template's image. |
| restrictions | { credentialTemplateId?, schemaType?, issuerDid? } (Optional) | Accept only credentials that match these values. |
| limit_disclosure | boolean (Optional) | Ask the wallet to share only the requested attributes. |
Create verification template (mDoc)
Creates a verification template for mDoc credentials.
EU Digital Identity
import { OpenIdEcosystem } from '@hovi/core-sdk';
const openid = new OpenIdEcosystem({
apiKey: '<YOUR_API_KEY>',
});
const template = await openid.createVerificationTemplateMdoc({
organizationId: '<ORGANIZATION_ID>',
name: 'Employee check',
version: '1.0.0',
description: 'Checks an employee ID',
requestedAttributes: [
{ name: 'firstName', label: 'First name', type: 'string', description: 'Given name', required: true },
{ name: 'lastName', label: 'Last name', type: 'string', description: 'Family name', required: true },
],
restrictions: {
docType: 'com.example.employee.1',
},
});
Params
| Parameter | Type | Description |
|---|---|---|
| organizationId | string (Required) | Your organization ID. |
| name | string (Required) | The name of the template. |
| version | string (Required) | The version of the template, for example 1.0.0. |
| description | string (Required) | A description of the template. |
| requestedAttributes | VerificationTemplateAttribute[] (Optional) | The attributes to ask for. Each has a name, label, type, description and required flag. |
| categoryId | string (Optional) | The ID of a category for the template. |
| image | string (Optional) | A URL of the template's image. |
| restrictions | { credentialTemplateId?, docType?, namespace? } (Optional) | Accept only credentials that match these values. |
| limit_disclosure | boolean (Optional) | Ask the wallet to share only the requested attributes. |
Create verification template (JWT-VC)
Creates a verification template for Microsoft Entra Verified ID credentials.
Microsoft Entra
import { EntraEcosystem } from '@hovi/core-sdk';
const entra = new EntraEcosystem({
apiKey: '<YOUR_API_KEY>',
});
const template = await entra.createVerificationTemplateJwtVc({
organizationId: '<ORGANIZATION_ID>',
name: 'Employee check',
version: '1.0.0',
description: 'Checks an employee ID',
requestedAttributes: [
{ name: 'firstName', label: 'First name', type: 'string', description: 'Given name', required: true },
{ name: 'lastName', label: 'Last name', type: 'string', description: 'Family name', required: true },
],
restrictions: {
credentialTemplateId: '<CREDENTIAL_TEMPLATE_ID>',
},
});
Params
| Parameter | Type | Description |
|---|---|---|
| organizationId | string (Required) | Your organization ID. |
| name | string (Required) | The name of the template. |
| version | string (Required) | The version of the template, for example 1.0.0. |
| description | string (Required) | A description of the template. |
| requestedAttributes | VerificationTemplateAttribute[] (Required) | The attributes to ask for. Each has a name, label, type, description and required flag. |
| categoryId | string (Optional) | The ID of a category for the template. |
| image | string (Optional) | A URL of the template's image. |
| restrictions | { credentialTemplateId?, issuerDid? } (Optional) | Accept only credentials that match these values. |
Create verification template (AnonCreds)
Creates a verification template for AnonCreds credentials. Besides attributes, AnonCreds can check a predicate, for example "age is at least 18", without revealing the value.
cheqd
Indicio
import { CheqdEcosystem } from '@hovi/core-sdk';
const cheqd = new CheqdEcosystem({
apiKey: '<YOUR_API_KEY>',
});
const template = await cheqd.createVerificationTemplateAnoncreds({
organizationId: '<ORGANIZATION_ID>',
name: 'Employee check',
version: '1.0.0',
description: 'Checks an employee ID',
requestedAttributes: [
{ name: 'firstName', label: 'First name', type: 'string', description: 'Given name', required: true },
{ name: 'lastName', label: 'Last name', type: 'string', description: 'Family name', required: true },
],
requestedPredicates: [
{ name: 'age', p_type: '>=', p_value: 18 },
],
});
import { IndicioEcosystem } from '@hovi/core-sdk';
const indicio = new IndicioEcosystem({
apiKey: '<YOUR_API_KEY>',
});
const template = await indicio.createVerificationTemplateAnoncreds({
organizationId: '<ORGANIZATION_ID>',
name: 'Employee check',
version: '1.0.0',
description: 'Checks an employee ID',
requestedAttributes: [
{ name: 'firstName', label: 'First name', type: 'string', description: 'Given name', required: true },
{ name: 'lastName', label: 'Last name', type: 'string', description: 'Family name', required: true },
],
requestedPredicates: [
{ name: 'age', p_type: '>=', p_value: 18 },
],
});
Params
| Parameter | Type | Description |
|---|---|---|
| organizationId | string (Required) | Your organization ID. |
| name | string (Required) | The name of the template. |
| version | string (Required) | The version of the template, for example 1.0.0. |
| description | string (Required) | A description of the template. |
| requestedAttributes | VerificationTemplateAttribute[] (Optional) | The attributes to ask for. Each has a name, label, type, description and required flag. |
| requestedPredicates | { name, p_type, p_value }[] (Optional) | Conditions to prove without revealing the value, for example age >= 18. |
| restrictions | { issuer_id? }[] (Optional) | Accept only credentials from these issuers. |
| nonRevokeInterval | { from: number; to: number } (Optional) | The time range in which the credential must not be revoked. |
| categoryId | string (Optional) | The ID of a category for the template. |
| image | string (Optional) | A URL of the template's image. |
Update verification template
Changes a template's name, description, image or category. Only the fields you pass are changed.
EU Digital Identity
Microsoft Entra
cheqd
Indicio
Polygon
import { OpenIdEcosystem } from '@hovi/core-sdk';
const openid = new OpenIdEcosystem({
apiKey: '<YOUR_API_KEY>',
});
const result = await openid.updateVerificationTemplate({
organizationId: '<ORGANIZATION_ID>',
verificationTemplateId: '<VERIFICATION_TEMPLATE_ID>',
name: 'Employee check (v2)',
});
import { EntraEcosystem } from '@hovi/core-sdk';
const entra = new EntraEcosystem({
apiKey: '<YOUR_API_KEY>',
});
const result = await entra.updateVerificationTemplate({
organizationId: '<ORGANIZATION_ID>',
verificationTemplateId: '<VERIFICATION_TEMPLATE_ID>',
name: 'Employee check (v2)',
});
import { CheqdEcosystem } from '@hovi/core-sdk';
const cheqd = new CheqdEcosystem({
apiKey: '<YOUR_API_KEY>',
});
const result = await cheqd.updateVerificationTemplate({
organizationId: '<ORGANIZATION_ID>',
verificationTemplateId: '<VERIFICATION_TEMPLATE_ID>',
name: 'Employee check (v2)',
});
import { IndicioEcosystem } from '@hovi/core-sdk';
const indicio = new IndicioEcosystem({
apiKey: '<YOUR_API_KEY>',
});
const result = await indicio.updateVerificationTemplate({
organizationId: '<ORGANIZATION_ID>',
verificationTemplateId: '<VERIFICATION_TEMPLATE_ID>',
name: 'Employee check (v2)',
});
import { PrivadoEcosystem } from '@hovi/core-sdk';
const privado = new PrivadoEcosystem({
apiKey: '<YOUR_API_KEY>',
});
const result = await privado.updateVerificationTemplate({
organizationId: '<ORGANIZATION_ID>',
verificationTemplateId: '<VERIFICATION_TEMPLATE_ID>',
name: 'Employee check (v2)',
});
Params
| Parameter | Type | Description |
|---|---|---|
| organizationId | string (Required) | Your organization ID. |
| verificationTemplateId | string (Required) | The ID of the template to update. |
| name | string (Optional) | A new name for the template. |
| description | string (Optional) | A new description for the template. |
| categoryId | string (Optional) | The ID of a category for the template. |
| image | string (Optional) | A new URL of the template's image. |
Delete verification template
Deletes a verification template.
EU Digital Identity
Microsoft Entra
cheqd
Indicio
Polygon
import { OpenIdEcosystem } from '@hovi/core-sdk';
const openid = new OpenIdEcosystem({
apiKey: '<YOUR_API_KEY>',
});
const result = await openid.deleteVerificationTemplate({
organizationId: '<ORGANIZATION_ID>',
verificationTemplateId: '<VERIFICATION_TEMPLATE_ID>',
});
import { EntraEcosystem } from '@hovi/core-sdk';
const entra = new EntraEcosystem({
apiKey: '<YOUR_API_KEY>',
});
const result = await entra.deleteVerificationTemplate({
organizationId: '<ORGANIZATION_ID>',
verificationTemplateId: '<VERIFICATION_TEMPLATE_ID>',
});
import { CheqdEcosystem } from '@hovi/core-sdk';
const cheqd = new CheqdEcosystem({
apiKey: '<YOUR_API_KEY>',
});
const result = await cheqd.deleteVerificationTemplate({
organizationId: '<ORGANIZATION_ID>',
verificationTemplateId: '<VERIFICATION_TEMPLATE_ID>',
});
import { IndicioEcosystem } from '@hovi/core-sdk';
const indicio = new IndicioEcosystem({
apiKey: '<YOUR_API_KEY>',
});
const result = await indicio.deleteVerificationTemplate({
organizationId: '<ORGANIZATION_ID>',
verificationTemplateId: '<VERIFICATION_TEMPLATE_ID>',
});
import { PrivadoEcosystem } from '@hovi/core-sdk';
const privado = new PrivadoEcosystem({
apiKey: '<YOUR_API_KEY>',
});
const result = await privado.deleteVerificationTemplate({
organizationId: '<ORGANIZATION_ID>',
verificationTemplateId: '<VERIFICATION_TEMPLATE_ID>',
});
Params
| Parameter | Type | Description |
|---|---|---|
| organizationId | string (Required) | Your organization ID. |
| verificationTemplateId | string (Required) | The ID of the template to delete. |
- This can't be undone.