Release v0.0.9
New Error handling procedures on verification. The return of the verify
and unpackAndVerify
methods now return an object with:
{
status: one of the error codes below.
contents: the body of the JWS, which is also the same object the user passed to the sign function.
issuer: issuer
raw: the JWS raw content (headerRaw, body, signature)
}
New ERROR codes for the status field
const NOT_SUPPORTED = "not_supported"; // QR Standard not supported by this algorithm
const INVALID_ENCODING = "invalid_encoding"; // could not decode Base45 for DCC, Base10 for SHC
const INVALID_COMPRESSION = "invalid_compression"; // could not decompress the byte array
const INVALID_SIGNING_FORMAT = "invalid_signing_format";// invalid COSE, JOSE, W3C VC Payload
const KID_NOT_INCLUDED = "kid_not_included"; // unable to resolve the issuer ID
const ISSUER_NOT_TRUSTED = "issuer_not_trusted"; // issuer is not found in the registry
const TERMINATED_KEYS = "terminated_keys"; // issuer was terminated by the registry
const EXPIRED_KEYS = "expired_keys"; // keys expired
const REVOKED_KEYS = "revoked_keys"; // keys were revoked by the issuer
const INVALID_SIGNATURE = "invalid_signature"; // signature doesn't match
const VERIFIED = "verified"; // Verified content.