Skip to main content
Version: 1.5

Class: JptCredentialValidatorUtils

identity_wasm.JptCredentialValidatorUtils

Utility functions for validating JPT credentials.

Table of contents​

Methods​

Methods​

extractIssuer​

▸ Static extractIssuer(credential): CoreDID

Utility for extracting the issuer field of a Credential as a DID.

Errors

Fails if the issuer field is not a valid DID.

Parameters​

NameType
credentialCredential

Returns​

CoreDID


extractIssuerFromIssuedJpt​

▸ Static extractIssuerFromIssuedJpt(credential): CoreDID

Utility for extracting the issuer field of a credential in JPT representation as DID.

Errors

If the JPT decoding fails or the issuer field is not a valid DID.

Parameters​

NameType
credentialJpt

Returns​

CoreDID


checkRevocationWithValidityTimeframe2024​

▸ Static checkRevocationWithValidityTimeframe2024(credential, issuer, status_check): void

Checks whether the credential status has been revoked.

Only supports RevocationTimeframe2024.

Parameters​

NameType
credentialCredential
issuerIToCoreDocument | CoreDocument
status_checkStatusCheck

Returns​

void


checkTimeframesAndRevocationWithValidityTimeframe2024​

▸ Static checkTimeframesAndRevocationWithValidityTimeframe2024(credential, issuer, validity_timeframe, status_check): void

Checks whether the credential status has been revoked or the timeframe interval is INVALID

Only supports RevocationTimeframe2024.

Parameters​

NameType
credentialCredential
issuerIToCoreDocument | CoreDocument
validity_timeframeundefined | null | Timestamp
status_checkStatusCheck

Returns​

void