Skip to content

Latest commit

 

History

History
164 lines (96 loc) · 6.09 KB

create-status-list.md

File metadata and controls

164 lines (96 loc) · 6.09 KB
description
Create Status List 2021 Resource on cheqd.

Create Status List v2021

Users are able to create Verifiable Credential Status List v2021 entries on-ledger, in order to revoke or suspend Verifiable Credentials. This is a derivation from the core spec made by cheqd to support a more decentralized and resilient approach to storing Status Lists.

Step 1: Set up your account

Make sure you have set up your account with cheqd Studio and are logged in, using our guide below:

Set up your accountSet up your account with cheqd Studio and log in to start using the APIs.set-up-account.md

Step 2: Create a DID

Before you can create a Status List, you need to create a DID which is used to link the Status List on-ledger. Use the API in the page below to create a DID:

Create an Issuer DIDCreate a W3C conformant DID on cheqd using the did:cheqd DID Method.create-did.md

Step 3: Select the unencrypted Status List API

When creating a Status List, a user will have the following options:

/credential-status/create/encrypted

Using this API will encrypt the bitstring of the Status List, meaning that a set of Payment Conditions will need to be met in order to access the Status List contents.

/credential-status/create/unencrypted

Using this API will create a regular Status List on-ledger, where the contents of the Status List are visible to any users who queries the blockchain.

For the purpose of this tutorial, we will assume the user is creating an unencrypted Status List. For encrypted Status Lists, follow the tutorial here.

Step 4: Create unencrypted Status List

Using the /credential-status/create/unencrypted API, users have two options for creating an encrypted Status List on-ledger:

  1. Filling out a simple form using the application/x-www-url-form-encoded option within an API client of your choice.
  2. Compiling a Status List payload yourself using the application/json option within an API client of your choice.

{% swagger src="https://raw.githubusercontent.com/cheqd/credential-service/main/src/static/swagger-api.json" path="/credential-status/create/unencrypted" method="post" expanded="true" %} https://raw.githubusercontent.com/cheqd/credential-service/main/src/static/swagger-api.json {% endswagger %}

Option 1. Choose from a few variables and we will compile the Status List for you

This is the easiest way to create unencrypted Status Lists on cheqd and is recommended for users who are not overly familiar with compiling JSON objects.

Using the application/x-www-url-form-encoded option, users are able to choose between the following variables and options to create an unencrypted Status List on-ledger:

statusPurpose (required)
  • revocation (creates a Status List where each entry refers to revocation status)
  • suspension (creates a Status List where each entry refers to suspension status. Note that suspended Credentials may become unsuspended).
did (required)

Enter the Decentralized Identifier (DID) of the Status List publisher created in Step 2. For example:

did:cheqd:testnet:0ff9df5d-653b-4f77-a66c-0035abc34d63
statusListName (required)

This is the name of your Status List. This will also need to be kept consistent for all future updates of the same Status List. For example:

employmentCredentialRevocationList
length (optional)

The length of the Status List to be created. The default and minimum length is 140000 which is 16kb. For example:

140000
encoding (optional)

The encoding format of the encrypted StatusList DID-Linked Resource to be created.

  • base64url
  • base64
  • hex
statusListVersion (optional)

A user set value to represent the version of the Status List. For example:

1.0
alsoKnownAs (optional)

A user set field to assign a set of alternative URIs where the DID-Linked Resource can be fetched from. For example:

https://www.foo.com

Option 2. Publish a JSON payload yourself

Instead of using simple form variables, you can create an encrypted Status List using a JSON payload yourself using the application/json option on the Swagger UI.

Request format

An example of the JSON payload needed to be submitted is below:

{
  "did": "did:cheqd:testnet:7c2b990c-3d05-4ebf-91af-f4f4d0091d2e",
  "statusListName": "cheqd-employee-credentials",
  "length": 140000,
  "encoding": "base64url"
}

Step 5: Hit the API

Once the Issuer has populated the requisite information for the unencrypted Status List request, they can use the API below to submit it to the ledger.

{% swagger src="https://raw.githubusercontent.com/cheqd/credential-service/main/src/static/swagger-api.json" path="/credential-status/create/unencrypted" method="post" %} https://raw.githubusercontent.com/cheqd/credential-service/main/src/static/swagger-api.json {% endswagger %}