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
Returns
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
Returns
checkRevocationWithValidityTimeframe2024()
static
checkRevocationWithValidityTimeframe2024(credential
,issuer
,status_check
):void
Checks whether the credential status has been revoked.
Only supports RevocationTimeframe2024
.
Parameters
credential
issuer
IToCoreDocument
| CoreDocument
status_check
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
issuer
IToCoreDocument
| CoreDocument
validity_timeframe
undefined
| null
| Timestamp
status_check
Returns
void