Static
createCreate a [StatusListCredential] with a specific purpose, e.g., for revocation.
A special [VerifiableCredential] instance that is a StatusListCredential.
Error If the status list credential cannot be created.
Example:
StatusListCredential.create({
statusListCredentialId : 'https://statuslistcred.com/123',
issuer : issuerDid.uri,
statusPurpose : StatusPurpose.revocation,
credentialsToDisable : [credWithCredStatus]
})
Private
Static
generatePrivate
Static
getRetrieves the value of a specific bit from a compressed base64 URL-encoded bitstring by decoding and decompressing a bitstring, then extracting a bit's value by its index.
A base64 URL-encoded string representing the compressed bitstring.
The zero-based index of the bit to retrieve from the decompressed bitstream.
True if the bit at the specified index is 1, false if it is 0.
Static
validateValidates if a given credential is part of the status list represented by a [VerifiableCredential].
The [VerifiableCredential] to be validated against the status list.
The [VerifiableCredential] representing the status list.
A [Boolean] indicating whether the credentialToValidate
is part of the status list.
This function checks if the given credentialToValidate
's status list index is present in the expanded status list derived from the statusListCredential
.
Example:
const isRevoked = StatusListCredential.validateCredentialInStatusList(credentialToCheck, statusListCred);
Private
Static
validateValidates that the status list entry index in all the given credentials are unique, and returns the unique index values.
The status purpose that all given credentials must match to.
An array of VerifiableCredential objects each contain a status list entry index.
An array of unique statusListIndex values.
If any validation fails.
StatusListCredential
represents a digitally verifiable status list credential according to the W3C Verifiable Credentials Status List v2021.When a status list is published, the result is a verifiable credential that encapsulates the status list.