Revocations
Below is the documentation for revoking credentials and updating the on-chain status list. It includes only the steps and endpoints explicitly provided.
1. Revoke a Credential
Endpoint
{credentialId}
: The UUID of the credential to revoke.Authentication: Use a valid client-secret bearer token.
Behavior
Sets the
revoked
flag totrue
for that credential in the database.On success, returns HTTP 200 with an empty response body.
Example Request
2. Publish (Update) the Revocation List
After one or more credentials have been revoked, you must publish an updated Bitstring Status List so that verifiers can see which credentials are no longer valid.
Endpoint
{listId}
: The identifier of the status list being updated (for example,1
for the default revocation list).Authentication: Use a valid client-secret bearer token.
Behavior
The service gathers all credentials marked as
revoked = true
from the database.It constructs a new bitstring where each bit position corresponds to a credential’s
statusListIndex
, setting bits to1
where credentials are revoked.That bitstring is compressed (gzip) and published on-chain as a
BitstringStatusListCredential
.On success, returns HTTP 200 with an empty response body.
Example Request
3. How Verifiers Check Revocation Status
Each issued credential includes a credentialStatus
entry in its JSON-LD, for example:
statusListCredential
: The on-chain URI of the Bitstring Status List Credential.statusListIndex
: The index (bit position) corresponding to this credential.
To verify a credential’s revocation status, a verifier would:
Read the
credentialStatus
object from the presented credential.Retrieve the
BitstringStatusListCredential
from the on-chain URI given instatusListCredential
.Decode its
encodedList
(a gzipped bitstring), then examine the bit atstatusListIndex
:
If the bit is
0
, the credential is still valid.If the bit is
1
, the credential has been revoked.
The exact method for fetching the on-chain JSON-LD and decoding the bitstring depends on your client implementation; no specific GET endpoint is defined here, because the status list lives externally (e.g., on a blockchain gateway or IPFS) at the URI embedded in the credential.
4. Extending to Other Status Purposes
To support additional purposes beyond revocation (e.g., suspension, hold):
Use a
status_lists
table keyed by(purpose, issuer_did)
.Assign each credential a
status_list_id
so it knows which list it belongs to.Issue or update each purpose-specific Bitstring Status List Credential with its own
statusPurpose
.Change endpoints accordingly (for example,
/api/v1/credentials/{id}/suspend
or/api/v1/blockchain/status-lists/{purpose}/{id}
).
Last updated