From ea708268662d087eb886ed1042159edae469df23 Mon Sep 17 00:00:00 2001 From: Huy Nguyen Date: Wed, 16 Oct 2024 17:49:36 +0700 Subject: [PATCH 1/3] docs: add Revoke a VC and Activate a VC docs --- .../basic-operations.md | 52 +++++++++++++++++++ 1 file changed, 52 insertions(+) diff --git a/documentation/docs/get-started/api-server-get-started/basic-operations.md b/documentation/docs/get-started/api-server-get-started/basic-operations.md index 7a54a432..628d028d 100644 --- a/documentation/docs/get-started/api-server-get-started/basic-operations.md +++ b/documentation/docs/get-started/api-server-get-started/basic-operations.md @@ -386,3 +386,55 @@ To get the rendered VC, you can try this endpoint [`/renderCredential`](http://l :::tip The document value is a string which is a encoded HTML string. You can use any online [Base64](https://www.base64decode.org/) tool out there to decode it. Good luck! ::: + +## Revoke a VC + +To revoke a VC, you will use the following API endpoint in the VCKit API: [`/agent/setBitstringStatus`](http://localhost:3332/agent/setBitstringStatus). + +### Request body: + +The request payload for updating the status of a VC should look like this: + +```json +{ + "statusListCredential": "http://localhost:3332/credentials/status/bitstring-status-list/26", // replace by your status list credential + "statusListVCIssuer": "did:web:example.com", // replace by your issuer + "statusPurpose": "revocation", + "index": 0, // replace by your index + "status": true // set to true to revoke +} +``` + +### Expected response: + +```json +{ + "status": true +} +``` + +## Activate a VC + +To activate a VC, you will use the following API endpoint in the VCKit API: [`/agent/setBitstringStatus`](http://localhost:3332/agent/setBitstringStatus). + +### Request body: + +The request payload for updating the status of a VC should look like this: + +```json +{ + "statusListCredential": "http://localhost:3332/credentials/status/bitstring-status-list/26", // replace by your status list credential + "statusListVCIssuer": "did:web:example.com", // replace by your issuer + "statusPurpose": "revocation", + "index": 0, // replace by your index + "status": false // set to false to activate +} +``` + +### Expected response: + +```json +{ + "status": false +} +``` \ No newline at end of file From efe3975aded8d0f2ec79568e234cd60f4fdc6c9e Mon Sep 17 00:00:00 2001 From: Huy Nguyen Date: Thu, 17 Oct 2024 09:58:34 +0700 Subject: [PATCH 2/3] docs: add documentation for revoking and activating a VC --- .../basic-operations.md | 28 ++++++++----------- 1 file changed, 12 insertions(+), 16 deletions(-) diff --git a/documentation/docs/get-started/api-server-get-started/basic-operations.md b/documentation/docs/get-started/api-server-get-started/basic-operations.md index 628d028d..1ef2a287 100644 --- a/documentation/docs/get-started/api-server-get-started/basic-operations.md +++ b/documentation/docs/get-started/api-server-get-started/basic-operations.md @@ -387,21 +387,19 @@ To get the rendered VC, you can try this endpoint [`/renderCredential`](http://l The document value is a string which is a encoded HTML string. You can use any online [Base64](https://www.base64decode.org/) tool out there to decode it. Good luck! ::: -## Revoke a VC +## Revoking a VC -To revoke a VC, you will use the following API endpoint in the VCKit API: [`/agent/setBitstringStatus`](http://localhost:3332/agent/setBitstringStatus). +To revoke a VC, use the following VCKit API endpoint: [/agent/setBitstringStatus](http://localhost:3332/agent/setBitstringStatus). ### Request body: -The request payload for updating the status of a VC should look like this: - ```json { - "statusListCredential": "http://localhost:3332/credentials/status/bitstring-status-list/26", // replace by your status list credential - "statusListVCIssuer": "did:web:example.com", // replace by your issuer + "statusListCredential": "http://localhost:3332/credentials/status/bitstring-status-list/26", + "statusListVCIssuer": "did:web:example.com", "statusPurpose": "revocation", - "index": 0, // replace by your index - "status": true // set to true to revoke + "index": 0, + "status": true } ``` @@ -413,21 +411,19 @@ The request payload for updating the status of a VC should look like this: } ``` -## Activate a VC +## Activating a VC -To activate a VC, you will use the following API endpoint in the VCKit API: [`/agent/setBitstringStatus`](http://localhost:3332/agent/setBitstringStatus). +To activate a VC, use the following VCKit API endpoint: [/agent/setBitstringStatus](http://localhost:3332/agent/setBitstringStatus). ### Request body: -The request payload for updating the status of a VC should look like this: - ```json { - "statusListCredential": "http://localhost:3332/credentials/status/bitstring-status-list/26", // replace by your status list credential - "statusListVCIssuer": "did:web:example.com", // replace by your issuer + "statusListCredential": "http://localhost:3332/credentials/status/bitstring-status-list/26", + "statusListVCIssuer": "did:web:example.com", "statusPurpose": "revocation", - "index": 0, // replace by your index - "status": false // set to false to activate + "index": 0, + "status": false } ``` From ebcacf021c84ec4b31e7437066498e9930c17076 Mon Sep 17 00:00:00 2001 From: Huy Nguyen Date: Tue, 22 Oct 2024 14:52:19 +0700 Subject: [PATCH 3/3] docs: add Issuing a status VC flow into documentation site. [skip ci] --- .../basic-operations.md | 27 +++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/documentation/docs/get-started/api-server-get-started/basic-operations.md b/documentation/docs/get-started/api-server-get-started/basic-operations.md index 5d02aa00..6faa1658 100644 --- a/documentation/docs/get-started/api-server-get-started/basic-operations.md +++ b/documentation/docs/get-started/api-server-get-started/basic-operations.md @@ -271,6 +271,33 @@ To get the rendered VC, you can try this endpoint [`/renderCredential`](http://l The document value is a string which is a encoded HTML string. You can use any online [Base64](https://www.base64decode.org/) tool out there to decode it. Good luck! ::: +## Issuing a status VC + +To issue a status VC, use the following VCKit API endpoint: [/agent/issueBitstringStatusList](http://localhost:3332/agent/issueBitstringStatusList). + +Once you have the status VC, you can inject it into the issuing VC payload. After issuing a VC with a status VC, the VC can now be revoked or activated, and its status is managed by the VC issuer. + +### Request body: + +```json +{ + "statusPurpose": "revocation", + "bitstringStatusIssuer": "did:web:example.com" +} +``` + +### Expected response: + +```json +{ + "id": "http://localhost:3332/credentials/status/bitstring-status-list/26#0", + "type": "BitstringStatusListEntry", + "statusPurpose": "revocation", + "statusListIndex": 0, + "statusListCredential": "http://localhost:3332/credentials/status/bitstring-status-list/26" +} +``` + ## Revoking a VC To revoke a VC, use the following VCKit API endpoint: [/agent/setBitstringStatus](http://localhost:3332/agent/setBitstringStatus).