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

@verixyz/credential-w3c

v2.0.0

Published

verixyz plugin for working with W3C Verifiable Credentials & Presentations.

Downloads

3

Readme

Verixyz W3C credentials plugin

Verixyz package for working with W3C Verifiable Credentials & Presentations.

This package contains a plugin and a message handler for issuing and verifying Credentials and Presentations that adhere to W3C standards.

Classes

CredentialIssuer

A verixyz plugin that implements the ICredentialIssuer methods.

Constructors

  • (constructor)() Constructs a new instance of the CredentialIssuer class

Properties

  • methods: ICredentiallssuer
  • schema: any

Methods

  • createVerifiableCredential(args, context) Creates a Verifiable Credential. The payload, signer and format are chosen based on the args parameter.
  • createVerifiablePresentation(args, context) Creates a Verifiable Presentation. The payload, signer and format are chosen based on the args parameter.

W3cMessageHandler

An implementation of the AbstractMessageHandler .This plugin can handle incoming W3C Verifiable Credentials and Presentations and prepare them for internal storage as Message types.The current version can only handle JWT encoded

Methods

  • handle(message, context)

Interfaces

ICreateVerifiableCredentialArgs

Encapsulates the parameters required to create a W3C Verifiable Credential

Properties

  • credential: Partial The json payload of the Credential according to the canonical model The signer of the Credential is chosen based on the issuer.id property of the credential'@context', 'type' and 'issuanceDate' will be added automatically if omitted
  • proofFormat: EncodingFormat The desired format for the VerifiablePresentation to be created. Currently, only JWT is supported
  • removeOriginalFields: boolean Remove payload members during JWT-JSON transformation. Defaults to true. See https://www.w3.org/TR/vc-data-model/#jwt-encoding
  • save: boolean If this parameter is true, the resulting VerifiablePresentation is sent to the storage plugin to be saved

ICreateVerifiablePresentationArgs

Encapsulates the parameters required to create a W3C Verifiable Presentation

Properties

  • presentation: Partial The json payload of the Presentation according to the canonical model .The signer of the Presentation is chosen based on the holder property of the presentation'@context', 'type' and 'issuanceDate' will be added automatically if omitted
  • proofFormat: EncodingFormat The desired format for the VerifiablePresentation to be created. Currently, only JWT is supported
  • removeOriginalFields: boolean Remove payload members during JWT-JSON transformation. Defaults to true. See https://www.w3.org/TR/vc-data-model/#jwt-encoding
  • save: boolean If this parameter is true, the resulting VerifiablePresentation is sent to the storage plugin to be saved

ICredentialIssuer

The interface definition for a plugin that can generate Verifiable Credentials and Presentations

Methods

  • createVerifiableCredential(args, context) Creates a Verifiable Credential. The payload, signer and format are chosen based on the args parameter.
  • createVerifiablePresentation(args, context) Creates a Verifiable Presentation. The payload, signer and format are chosen based on the args parameter.

Variables

  • schema

Type Aliases

  • EncodingFormat The type of encoding to be used for the Verifiable Credential or Presentation to be generated. Only jwt is supported at the moment.