npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

credential-status

v3.0.4

Published

credential status aggregator for did-jwt

Downloads

55,118

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.