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

@attestto/vc-sdk

v0.2.0

Published

Universal SDK for issuing and verifying W3C Verifiable Credentials — any schema, any DID method

Readme

vc-sdk

npm version

Universal W3C VC Data Model v2.0 TypeScript SDK

@attestto/vc-sdk is a foundational SDK for issuing and verifying Verifiable Credentials with zero native dependencies. Implements the full W3C VC Data Model v2.0 specification. Designed to be extended by domain-specific credential packages via a pluggable schema system. For full documentation, see attestto.org/docs.

Architecture

graph LR
    A["vc-sdk<br/>(core API)"]
    B["cr-vc-sdk<br/>(CR types)"]
    C["cr-vc-schemas<br/>(JSON-LD contexts)"]
    D["attestto-app<br/>(citizen wallet)"]
    E["attestto-verify<br/>(verification UI)"]
    
    A --> B
    A --> E
    B --> C
    B --> D
    A --> D

Quick start

Prerequisites

  • Node ≥ 18
  • npm or yarn

Install

npm install @attestto/vc-sdk

Try it

import { VCIssuer, VCVerifier, generateKeyPair } from '@attestto/vc-sdk'

// Generate keys (Ed25519 or ES256)
const keys = generateKeyPair()

// Create an issuer
const issuer = new VCIssuer({
  did: 'did:web:my-org.attestto.id',
  privateKey: keys.privateKey,
})

// Issue any credential — no type constraints
const vc = await issuer.issue({
  type: 'UniversityDegree',
  context: 'https://schemas.example.org/education/v1',
  subjectDid: 'did:web:student.attestto.id',
  claims: {
    degree: {
      name: 'Computer Science',
      level: 'Bachelor',
      university: 'Universidad de Costa Rica',
    },
  },
})

// Verify
const verifier = new VCVerifier()
const result = await verifier.verifyWithKey(vc, keys.publicKey, 'Ed25519', {
  expectedType: 'UniversityDegree',
  expectedIssuer: 'did:web:my-org.attestto.id',
})
console.log(result.valid) // true

API

VCIssuer

const issuer = new VCIssuer(config: IssuerConfig)
issuer.use(plugin: SchemaPlugin)          // Register domain schemas
const vc = await issuer.issue(options)     // Issue a signed VC

Core responsibilities: sign VCs with Ed25519 or ES256, manage DID/keyId, auto-inject schema context and property mapping via plugins.

VCVerifier

const verifier = new VCVerifier(config?: VerifierConfig)
const result = await verifier.verify(vc, options?)
const result = await verifier.verifyWithKey(vc, publicKey, algorithm, options?)

Validates signatures, expiration, proof format, and custom constraints. Returns { valid, checks, errors, warnings }.

generateKeyPair

const keys = generateKeyPair('Ed25519' | 'ES256')
// keys.publicKey: Uint8Array
// keys.privateKey: Uint8Array
// keys.algorithm: string

Generate cryptographic key pairs for issuance and verification.

SchemaPlugin

interface SchemaPlugin {
  context: string                    // JSON-LD context URL
  types: string[]                    // Credential types this plugin handles
  propertyMap?: Record<string, string>  // Map type → credentialSubject property
}

Register domain-specific schemas to auto-inject context and wrap claims:

issuer.use({
  context: 'https://schemas.attestto.org/cr/driving/v1',
  types: ['DrivingLicense', 'TheoreticalTestResult'],
  propertyMap: {
    DrivingLicense: 'license',
    TheoreticalTestResult: 'theoreticalTest',
  },
})

// Now issue — context and property wrapping are automatic
const vc = await issuer.issue({
  type: 'DrivingLicense',
  subjectDid: 'did:web:maria.attestto.id',
  claims: { licenseNumber: 'CR-2026-045678', categories: ['B'] },
})

Ecosystem

Full index: Attestto-com/attestto-open

| Repo | What | |---|---| | vc-sdk | This — universal VC SDK | | cr-vc-sdk | CR-specific SDK (TypeScript, typed wrappers) | | cr-vc-sdk-dotnet | CR-specific SDK (.NET 8) | | cr-vc-schemas | CR driving schemas (11 types) | | did-sns-spec | did:sns DID method spec | | did-sns-resolver | Universal Resolver driver for did:sns | | id-wallet-adapter | Wallet discovery protocol |

License

Apache 2.0