validateCredentialInStatusList

fun validateCredentialInStatusList(credentialToValidate: VerifiableCredential, statusListCredential: VerifiableCredential): Boolean

Validates if a given credential is part of the status list represented by a VerifiableCredential.

Return

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:

val isRevoked = validateCredentialInStatusList(credentialToCheck, statusListCred)

Parameters

credentialToValidate

The VerifiableCredential to be validated against the status list.

statusListCredential

The VerifiableCredential representing the status list.


fun validateCredentialInStatusList(credentialToValidate: VerifiableCredential, httpClient: <Error class: unknown class>? = null): Boolean

Validates if a given credential is part of the status list.

Return

A Boolean indicating whether the credentialToValidate is part of the status list.

Parameters

credentialToValidate

The VerifiableCredential to be validated against the status list.

httpClient

An optional HttpClient for fetching the status list credential. If not provided, a default HTTP client will be used.

Throws

If the status list credential cannot be fetched.

If the status list credential cannot be parsed.

This function fetches the status list credential from a URL present in the credentialToValidate. It supports using either a user-provided httpClient or a default client when no client is passed in. The function then checks if the given credentialToValidate's status list index is present in the expanded status list derived from the fetched status list credential.

Example:

val isRevoked = validateCredentialInStatusList(credentialToCheck)