Skip to main content

Get credential details

Returns detailed information on a credential.

Function

getCredential(
credentialId: CredentialListItem["id"]
): Promise<CredentialDetail>

Parameters

  • credentialId - The UUID of a credential.

Return value

export interface CredentialListItem {
id: string;
createdDate: string;
issuanceDate: string;
lastModified: string;
revocationDate?: string | null;
issuerDid?: string | null;
state: CredentialStateEnum;
schema: CredentialSchema;
role: CredentialRoleEnum;
suspendEndDate?: string | null;
}
export interface CredentialDetail extends CredentialListItem {
claims: Claim[];
redirectUri?: string | null;
lvvcIssuanceDate?: string | null;
mdocMsoValidity?: MdocMsoValidity;
}

Fields

  • claims - The set of claims being asserted in the credential. See the claims object guide for more information.

  • role - The role the system plays in relation to the credential.

    • [HOLDER, ISSUER, VERIFIER]
  • state - Represents the state of the credential.

    • [CREATED, PENDING, OFFERED, ACCEPTED, SUSPENDED, REJECTED, REVOKED, ERROR]
  • schema - Credential schema being used to issue the credential. This includes the layout properties of the credential, detailing how the credential should be displayed in the wallet. For details on credentials design, see the credentials designer guide.

  • lvvcIssuanceDate - Only for credentials issued using LVVC revocation method.

  • suspendEndDate - When the suspension will end, if a date was set by the issuer.

  • mdocMsoValidity - Validity details of an mdoc credential. See the mdoc validity guide.