Skip to main content
info
IOTA Identity for Rebased is currently in alpha and may still be subject to significant changes

JptCredentialValidatorUtils

@iota/identity-wasm API documentation


Class: JptCredentialValidatorUtils

Utility functions for validating JPT credentials.

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

credential

Credential

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

credential

Jpt

Returns

CoreDID


checkRevocationWithValidityTimeframe2024()

static checkRevocationWithValidityTimeframe2024(credential, issuer, status_check): void

Checks whether the credential status has been revoked.

Only supports RevocationTimeframe2024.

Parameters

credential

Credential

issuer

IToCoreDocument | CoreDocument

status_check

StatusCheck

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

credential

Credential

issuer

IToCoreDocument | CoreDocument

validity_timeframe

undefined | null | Timestamp

status_check

StatusCheck

Returns

void