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 🙏

© 2026 – Pkg Stats / Ryan Hefner

@verii/verii-verification

v1.2.1

Published

Verii VC and VP Verification library

Downloads

2,194

Readme

Verii Verification Library

The Verii Verification Library provides utility functions for verifying Verifiable Credentials (VCs) and Verifiable Presentations (VPs) according to the Verii and Velocity Network specifications. It includes logic for cryptographic validation, protocol version support, and key resolution via DIDs.

📦 Installation

npm install @velocitycareerlabs/verii-verification

🚀 Main Entry Points

1. verifyCredentials

Verifies one or more Verifiable Credentials (VCs) in JWT format.

import { verifyCredentials } from '@velocitycareerlabs/verii-verification';

const credentials = [
  "eyJhbGciOiJFUzI1NiIsInR5cCI6IkpXVCJ9...", // JWT-encoded Verifiable Credential
];

// The KMS abstraction requires a exportKeyOrSecret function
const kms = {
    exportKeyOrSecret(keyId) {
        // ... exports the private key from the kms
    }
};

async function authenticator () {
    const token = authenticate()// Fetch an access token from an OAuth provider using the client_credential grant type
    return token
}

const config = {
    rootPublicKey: "0x899ef1cc48d17ee2701b25b14203d45e15bb01d07767450e9191ea71760d558a", // TRUST Root Private key
    revocationContractAddress: "0x742d35Cc6634C0532925a3b844Bc454e4438f44e", // DLT address for revocation address
    metadataRegistryContractAddress: "0x3f5CE5FBFe3E9af3971dD833D26BA9b5C936f0bE", // DLT address for VC metadata
    rpcProvider: initProvider("http://localhost:8545", authenticator),
    registrarUrl: "https://registrar.velocitynetwork.foundation",
}

const context = {
    kms,
    log, // a logger that exposes a pino logger
    config,
}

const verified = await verifyVeriiCredentials(
    {
        credentials,
        expectedHolderDid: "did:jwk:eyJrdHkiOiJFQyIsInVzZSI6InNpZyIsImNydiI6I...",
        relyingParty: { did: "did:web:example.com", dltOperatorKMSKeyId: "df9c4f12-3d79-4ab6-88ef-91b4eae45eaf" },
    },
    context
);

console.log(verified);
// [
//   { 
//     credential: 
//     { 
//       ... // The jwt's `payload.vc` value (ie. the unsigned jsonld representation of the VC) 
//     }, 
//     credentialChecks: {      
//       UNTAMPERED: 'PASS',
//       TRUSTED_ISSUER: 'PASS',
//       TRUSTED_HOLDER: 'PASS',
//       UNEXPIRED: 'PASS',
//       UNREVOKED: 'PASS' 
//     } 
//   },
//   ...
// ]

2. verifyVerifiablePresentationJwt

Verifies a Verifiable Presentation (VP) in JWT format, optionally using protocol-aware key resolution. Returns the unsigned VP.

Detailed protocol-v1/protocol-v2 rules, header requirements, and the mixed kid + jwk deprecation are documented in verify-presentation-jwt.README.md.

import { verifyVerifiablePresentationJwt } from '@velocitycareerlabs/verii-verification';

const vpJwt = "eyJhbGciOiJFUzI1NiIsInR5cCI6IkpXVCJ9...";

const result = await verifyVerifiablePresentationJwt(vpJwt, {
  vnfProtocolVersion: 2
});

console.log(result);
// {
//    ... // returns the JWT's payload.vp claim (ie. the unsigned jsonld representation of the VP)
// }

🛠 Dependencies

  • DID resolution via @verii/did-doc
  • JWT operations via @verii/jwt
  • Verii protocol version constants from @verii/vc-checks

Peer Dependencies

  • Pino logger from https://github.com/pinojs/pino

🧪 Error Handling

Malformed or unverifiable inputs will throw http-errors with structured metadata:

throw createError(400, "Malformed jwt_vp property", {
  errorCode: 'presentation_malformed',
});

📘 License

Licensed under the Apache 2.0 License. See LICENSE for details.