Trust Registry Integration Guide
This guide provides step-by-step instructions for integrating a trust registry into any application using a series of API endpoints. This guide assumes a basic understanding of essential elements such as DIDs, JWTs, and specific configurations.
Download a sample Postman collection here.
Prerequisites
Before starting, ensure you have:
A DID for the convener (
did:dock:convener
) with associated profileA DID for the participant (
did:dock:pariticpant
) with associated profile
Step-by-Step Guide
1. Create a Trust Registry
Create a trust registry using the convener's DID and relevant metadata.
POST /trust-registries This endpoint creates a new trust registry with the provided metadata and convener DID.
Body:
Response:
2. Add Participants to the Trust Registry
Invite participants (e.g., issuers, verifiers) to the trust registry and assign schemas.
Note: Roles are automatically assigned based on the schemas allocated to a participant:
If a participant can only issue credentials using the assigned schemas, they are designated as an
issuer
.If a participant can only verify credentials using the assigned schemas, they are designated as a
verifier
.If a participant can both issue and verify, they are designated as a
verifier+issuer
. A participant without any assigned schemas will have averifier
role but will only be able to verify public schemas within the ecosystem.
POST /trust-registries/{trust_registry_id}/participants This endpoint invites a participant to the trust registry with specified schemas they are allowed to issue or verify. Will be called by the trust registry convener.
Body:
Note: An empty body will result in a verifier
role for the participant, allowing them only to verify public
schemas. Issuer and verifier schemas can be assigned in the invitation by adding the schema IDs to the request body.
Response:
Accept the invitation:
POST /trust-registries/invitations/accept This endpoint accepts an invitation to join a trust registry using a provided token. Will be called by a trust registry participant to join the registry.
Body:
Response:
Note:
The DID's profile name, description, and logo will be applied to the participant. The name and logo are required for DIDs that will be used as participants.
Invitations can be snoozed using
POST /trust-registries/invitations/snooze
Invitations can be declined using
POST /trust-registries/invitations/decline
Error Handling:
Attempting to reuse an invite token will result in an error.
Inviting a participant that already exists in the registry may also cause an error.
3. Retrieve Trust Registry Details
Retrieve details of the trust registry, including participants and schemas.
GET /trust-registries/{trust_registry_id} This endpoint retrieves detailed information about a specific trust registry. Useful for both the convener and participants to get an overview of the registry.
Response:
Note:
slug
can be used instead oftrust_registry_id
The public info about a trust registry is available at
GET /trust-registries/{trust_registry_id}/public
4. Update Trust Registry Metadata
Update the metadata of an existing trust registry.
PATCH /trust-registries/{trust_registry_id} This endpoint updates the metadata of an existing trust registry. Will be called by the convener to update details like the name, description, or governance framework.
Body:
Response:
5. Manage Trust Registry Participants
a. Update Participant Information
Update a participant's information within the registry.
PATCH /trust-registries/{trust_registry_id}/participants/{participant_id}/info This endpoint updates a participant’s information within the trust registry. It can be used only by the participant to update his own informations.
Body:
Response:
Note: The name and logo can be updated by modifying the associated DID profile's information.
b. Suspend/Unsuspend Participants
Suspend or unsuspend a participant's status within the registry.
PATCH /trust-registries/{trust_registry_id}/participants/{participant_id} This endpoint updates a participant’s information within the trust registry, such as their assigned schemas or their status (e.g., suspended or active).
Body:
Response:
c. Get all participants
Get a list of all participants in the trust registry
GET /trust-registries/{trust_registry_id}/participants This endpoint retrieves detailed information about the participants from the trust registry
Response:
6. Manage Schemas
a. Assign Schemas to Participants
Assign specific schemas to participants based on their roles.
PATCH /trust-registries/{trust_registry_id}/participants/{participant_id} This endpoint updates a participant’s information within the trust registry, such as their assigned schemas or their status (e.g., suspended or active). Will be called by the convener to manage participant roles and schemas.
Body:
Response:
b. Get Trust Registry Schemas
Retrieve schemas associated with the trust registry.
GET /trust-registries/{trust_registry_id}/schemas This endpoint retrieves the list of schemas associated with a specific trust registry, including participant counts and public visibility. Useful for both the convener and participants.
Response:
7. Manage Proof Templates
a. Assign Proof Templates to the Trust Registry
Assign proof templates to the trust registry to enable credential verification. This will allow the verifiers in the trust registry to use the proof-template
POST /trust-registries/{trust_registry_id}/proof-templates This endpoint assigns a proof template to the trust registry, enabling it for use in credential verification. Will be called by the convener.
Body:
Response:
b. Retrieve Proof Templates
Retrieve proof templates associated with the trust registry.
GET /trust-registries/{trust_registry_id}/proof-templates This endpoint retrieves the list of proof templates associated with the trust registry. Useful for both the convener and participants.
Response:
8. Delete Trust Registry Entities
a. Delete a Trust Registry Participant
Remove a participant from the trust registry.
DELETE /trust-registries/{trust_registry_id}/participants/{participant_id} This endpoint removes a participant from the trust registry. Will be called by the convener to manage the registry’s participants.
Response:
b. Delete a Trust Registry Proof Template
Remove a proof template from the trust registry.
DELETE /trust-registries/{trust_registry_id}/proof-templates/{template_id} This endpoint removes a proof template from the trust registry. Will be called by the convener to manage the registry’s proof templates.
Response:
c. Delete a Trust Registry
Delete the entire trust registry.
DELETE /trust-registries/{trust_registry_id} This endpoint deletes the entire trust registry. Will be called by the convener when the trust registry is no longer needed.
Response:
Last updated