Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

credential-status

uport-project21.2kApache-2.03.0.4TypeScript support: included

credential status aggregator for did-jwt

Verifiable Credential, W3C, status check, revocation, credentialStatus, JWT

readme

credential-status

codecov

A status method aggregator for verifiable credentials.

Usage

Given a JWT credential that embeds a status property, it should call the appropriate status checking method and return its result. This library is meant to be used with did-jwt, as a status method aggregator called during the verification step.

Example:

A JWT with a status field in the payload.vc field:

{
  "credentialStatus": {
    "id": "mainnet:0xStatusRegistryAddress",
    "type": "EthrStatusRegistry2019"
  },
  "iss": "did:ethr:0x...",
  "vc": {
    //...
  }
  //...
}
import { EthrStatusRegistry } from 'ethr-status-registry'
import { Status } from 'credential-status'
//...other JWT verification inits

const status = new Status({
  ...new EthrStatusRegistry(config).asStatusMethod,
})

const verificationResult = await didJWT.verifyJWT(token, resolver)
const didDoc = verificationResult.doc

const result = await status.checkStatus(token, didDoc)
// result: { "revokedAt": "0x5348684" }

The individual methods used to check for the status need to implement a checkStatus method and are expected to use the provided issuer DID document to help generate a result.

Results

There is no standard format for the result of a status check. It is up to the method implementer to provide their own, and ultimately up to verifiers of credentials to determine which methods they support or accept.

Known methods

The only known implementation of a credential-status method is the ethr-status-registry which uses an ethereum smart contract to register revocations of credentials.

If you implement your own status check, feel free to submit a link to it here.

changelog

3.0.4 (2024-03-26)

Bug Fixes

  • deps: Update dependency did-jwt to v8.0.4 (8e452e9)

3.0.3 (2024-03-20)

Bug Fixes

  • deps: Update dependency did-jwt to v8.0.3 (37b9d04)

3.0.2 (2024-03-14)

Bug Fixes

  • deps: Update dependency did-jwt to v8.0.2 (c17657d)

3.0.1 (2024-02-28)

Bug Fixes

  • deps: Update dependency did-jwt to v8.0.1 (824814b)

3.0.0 (2024-01-26)

chore

  • deps: update tooling and export types (#59) (7235052)

BREAKING CHANGES

  • deps: the exports have changed, bumping major version for safety

2.0.6 (2023-08-09)

Bug Fixes

  • deps: Update did-dependencies (e7fae5f)

2.0.5 (2022-08-10)

Bug Fixes

2.0.4 (2022-08-02)

Bug Fixes

  • deps: Update dependency did-resolver to v4 (0e0884a)

2.0.3 (2022-06-08)

Bug Fixes

  • deps: bump did-jwt to v6 & did-resolver to 3.2.2 (#50) (4c10524)

2.0.2 (2022-05-12)

Bug Fixes

2.0.1 (2022-05-11)

Bug Fixes

2.0.0 (2022-02-16)

Features

  • add support for more credential formats (#39) (52f68fa), closes #38

BREAKING CHANGES

  • The method signature for StatusMethod requires support for both credential formats
  • The return type of StatusMethod is Promise<CredentialStatus> with the expectation to reject if there is a problem resolving the status.

1.2.4 (2022-01-19)

Bug Fixes

  • deps: upgrade DID dependencies (ec5cd9f)

1.2.3 (2022-01-19)

Bug Fixes

  • ci: upgrade CI/CD to gh workflows (f4e8e26)

1.2.2 (2021-01-20)

Bug Fixes

  • deps: bump dependencies and schedule autoupdates (#25) (7046e8c)

1.2.1 (2020-04-29)

Bug Fixes

  • deps: re-set did-jwt as a direct dependency (5fbfd4e)

1.2.0 (2020-04-29)

Features

  • rename status to crdentialStatus for credentials & presentations (be0b90d), closes #13

1.1.1 (2020-04-22)

Bug Fixes

  • build: fix path in package.json main attribute (ddc7c67)

1.1.0 (2020-01-16)

Bug Fixes

  • data type bug caused by json-ld (67c8a6d)
  • remove DIDDocument type redeclaration (e8abd40)

Features

  • require a DID document for status checks (4ba5e7b)

1.0.1 (2019-10-31)

Bug Fixes

  • declare ts types in package.json (9c4dba9)

1.0.0 (2019-10-31)

Features

  • implement basic status registry (bb8a3db)