Registries

Revocation means deleting or updating a credential. Truvera's credential revocation is managed with a revocation registry.

There can be multiple registries on the chain, and each registry has a unique id. It is recommended that the revocation authority create a new registry for each credential type. Truvera Workspace allows you to create, delete, and revoke/unrevoke the credential. You can retrieve a specified registry as well as a list of all registries created by the user.

For a detailed example of the registry workflow. Please refer here.

If you want to revoke ZKP credentials, you must create a registry with type `DockVBAccumulator2022`. For revoking other credentials, you can use `StatusList2021Entry`.

Create Registry

To create a registry, you have to create a policy object for which a DID is needed. It is advised that the DID is registered on the chain first. Otherwise, someone can look at the registry and register the DID, thus gaining control of the registry.

Choosing the right revocation registry is essential. Here's a simplified overview of the available options:

  • StatusList2021Entry

    • Only supports non-ZKP credentials.

    • Recommended for most users.

    • Collective Tracking: Manages all revocation entries together, making it less costly to revoke multiple credentials simultaneously.

    • W3C Compliant.

  • DockVBAccumulator2022

    • Only supports ZKP credentials.

    • Utilizes an on-ledger accumulator for enhanced privacy.

    • Offers more privacy than the W3C Status List 2021.

CredentialStatusList2017 (Deprecated)

  • Only supports non-ZKP credentials.

  • Individual Tracking: Each entry is tracked separately, which means more ledger space is used for multiple entries.

  • This registry is cost-effective for a single entry. However, managing several entries can be more expensive.

  • Implements add-only policies.

Parameters

Name
In
Type
Required
Description

addOnly

body

boolean

false

True/false options. The default value is "false".

policy

body

true

The DIDs which control this registry. You must own a DID listed here to use the registry. Only one policy supported as of now: OneOf DID in list.

type

body

string

false

Specifies which type of registry to create. Defaults to StatusList2021Entry.

List Registries

Return a list of all registries created by the user. The list is returned with the registry id and policy of the revocation registry.

For now, only one policy is supported, and each registry is owned by a single DID.

Parameters

Name
In
Type
Required
Description

offset

query

integer

false

How many items to offset by for pagination

limit

query

integer

false

How many items to return at one time (max 64)

Get Registry

Get the details of an existing registry, such as policy, add-only status, when it was last updated, and controller(s). You need only supply the revocation registry id that was returned upon revocation registry creation.

Parameters

Name
In
Type
Required
Description

id

path

true

Revocation registry id.

Revoke/Unrevoke Credential

Credential revocation is managed with on-chain revocation registries. To revoke a credential, its id (or hash of its id) must be added to the credential. It is advised to have one revocation registry per credential type. Revoking an already revoked credential has no effect.

Similar to the replay protection mechanism for DIDs, the last modified block number is kept for each registry, which is updated each time a credential is revoked or unrevoked. Unrevoking an unrevoked credential has no effect.

In this API, simply add Revoke/Unrevoke into the action parameter and input the desired credential ids.

Parameters

Name
In
Type
Required
Description

id

path

true

Revocation registry id.

action

body

string

false

The action taken, either revoke or unrevoke. The default value is "revoke"

credentialIds

body

array

true

The list of credential ids to act upon.

Enumerated Values

Parameter
Value
Description

action

revoke or unrevoke

Action to take on the registry.

Delete Registry

A registry can be deleted, leading to all the corresponding revocation ids being deleted as well. This requires the signature from the owner, similar to the other updates.

Parameters

Name
In
Type
Required
Description

id

path

true

Revocation registry id.

Last updated