Skip to content
This repository was archived by the owner on Dec 20, 2024. It is now read-only.

Commit b6fb4c3

Browse files
authoredJan 22, 2024
Merge pull request #78 from docknetwork/DCKA-2117-API-Documentation-for-revocation-registries
Add revocation registry related api docs.
2 parents 664258a + d684ac5 commit b6fb4c3

File tree

1 file changed

+59
-1
lines changed

1 file changed

+59
-1
lines changed
 

Diff for: ‎source/index.html.md

+59-1
Original file line numberDiff line numberDiff line change
@@ -2609,6 +2609,10 @@ There can be multiple registries on the chain, and each registry has a unique id
26092609

26102610
For a detailed example of the registry workflow. Please refer [here](https://github.com/docknetwork/dock-api-js/blob/main/workflows/registryFlow.js).
26112611

2612+
<aside class="notice">
2613+
If you want to revoke BBS+ credentials, you must create a registry with type `DockVBAccumulator2022`. For revoking other credentials, you can use `StatusList2021Entry` or `CredentialStatusList2017`.
2614+
</aside>
2615+
26122616
## Create Registry
26132617

26142618
> <span class="highlight"><span class="nt">POST</span> /registries</span></span> REQUEST
@@ -2641,6 +2645,22 @@ curl --location --request POST https://api.dock.io/registries/ \
26412645

26422646
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.
26432647

2648+
Choosing the right revocation registry is essential. Here's a simplified overview of the available options:
2649+
- CredentialStatusList2017
2650+
- Only supports non-BBS+ credentials.
2651+
- Individual Tracking: Each entry is tracked separately, which means more ledger space is used for multiple entries.
2652+
- This registry is cost-effective for a single entry. However, managing several entries can be more expensive.
2653+
- Implements add-only policies.
2654+
- StatusList2021Entry
2655+
- Only supports non-BBS+ credentials.
2656+
- Recommended for most users.
2657+
- Collective Tracking: Manages all revocation entries together, making it less costly to revoke multiple credentials simultaneously.
2658+
- W3C Compliant.
2659+
- DockVBAccumulator2022
2660+
- Only supports BBS+ credentials.
2661+
- Utilizes an on-ledger accumulator for enhanced privacy.
2662+
- Offers more privacy than the W3C Status List 2021.
2663+
26442664
<h3 id="create-registry-parameters">Parameters</h3>
26452665

26462666
|Name|In|Type|Required|Description|
@@ -2653,7 +2673,7 @@ To create a registry, you have to create a `policy` object for which a DID is ne
26532673

26542674
|Parameter|Value|Description|
26552675
|---|---|---|
2656-
|type|StatusList2021Entry **or** CredentialStatusList2017|The type used in registry creation.|
2676+
|type|StatusList2021Entry **or** CredentialStatusList2017 **or** DockVBAccumulator2022|The type used in registry creation.|
26572677

26582678
> 200 Response
26592679
@@ -2943,6 +2963,44 @@ To check if an id is revoked or not, you can check its status with the registry
29432963
|402|[Payment required](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/402)|Transaction limit reached or upgrade required to proceed|[Error](#schemaerror)|
29442964
|400|[Server Error](https://datatracker.ietf.org/doc/html/rfc7231#section-6.6.1)|The request was unsuccessful, because you have not revoked or unrevoked the registered credential yet. Please try to revoke/unrevoke the registered credential and try again.|[Error](#schemaerror)|
29452965

2966+
## Get Revocation Status Witness
2967+
2968+
> <span class="highlight"><span class="na">GET</span> /revocationStatus/{regId}/{revId}/witness</span></span> REQUEST
2969+
2970+
```shell
2971+
2972+
curl --location --request GET https://api.dock.io/revocationStatus/{regId}/{revId} \
2973+
--header 'DOCK-API-TOKEN: API_KEY' \
2974+
--data-raw ''
2975+
2976+
```
2977+
2978+
The accumulator witness is utilized by the holder to generate a proof, which combines the witness with their revocation id associated with the credential id (`revId`) and the accumulator associated with the registry id (`regId`), allowing the verifier to validate the credential's status without directly accessing the revocation id on the blockchain.
2979+
2980+
<h3 id="get-revocation-status-parameters">Parameters</h3>
2981+
2982+
|Name|In|Type|Required|Description|
2983+
|---|---|---|---|---|
2984+
|regId|path|[Hex32](#schemahex32)|true|Revocation registry id.|
2985+
|revId|path|[Hex32](#schemahex32)|true|Credential revocation id.|
2986+
2987+
> 200 Response
2988+
2989+
```json
2990+
{
2991+
"value": "0x81aa308882b663491e2b42803ad0855b030d92a586bc378bc844e1e003c8098a23f0d7d75b4fdbfb4b42cfc42aca8ad3"
2992+
}
2993+
```
2994+
2995+
<h3 id="get-revocation-status-responses">Responses</h3>
2996+
2997+
|Status|Meaning|Description|Schema|
2998+
|---|---|---|---|
2999+
|200|[OK](https://tools.ietf.org/html/rfc7231#section-6.3.1)|The request was successful and will return the membership witness.|Inline|
3000+
|404|[Not Found](https://tools.ietf.org/html/rfc7231#section-6.5.4)|The request was unsuccessful, because the registry was not found.|[Error](#schemaerror)|
3001+
|402|[Payment required](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/402)|Transaction limit reached or upgrade required to proceed|[Error](#schemaerror)|
3002+
|400|[Server Error](https://datatracker.ietf.org/doc/html/rfc7231#section-6.6.1)|The request was unsuccessful, because you have not revoked or unrevoked the registered credential yet. Please try to revoke/unrevoke the registered credential and try again.|[Error](#schemaerror)|
3003+
29463004

29473005
<h1 id="credential-schemas">Credential Schemas</h1>
29483006

0 commit comments

Comments
 (0)
This repository has been archived.