Skip to main content
Version: 1.4

Class: JptCredentialValidatorUtils

identity_wasm.JptCredentialValidatorUtils

Utility functions for validating JPT credentials.

Table of contents

Constructors

Methods

Constructors

constructor

new JptCredentialValidatorUtils()

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


checkTimeframesWithValidityTimeframe2024

Static checkTimeframesWithValidityTimeframe2024(credential, validity_timeframe, status_check): void

Parameters

NameType
credentialCredential
validity_timeframeundefined | Timestamp
status_checkStatusCheck

Returns

void


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 | Timestamp
status_checkStatusCheck

Returns

void