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 🙏

© 2025 – Pkg Stats / Ryan Hefner

@openverifiable/open-verifiable-id-sdk

v0.0.5

Published

Open Verifiable ID SDK - Reference implementation for decentralized identity and verifiable credentials

Readme

🚀 Open Verifiable ID SDK

Reference implementation for decentralized identity and verifiable credentials based on W3C VC 2.0 and DIF standards

License: MIT TypeScript Cross-Platform Test Coverage

📋 Overview

The Open Verifiable ID SDK is a comprehensive TypeScript implementation of decentralized identity standards, designed to provide a secure, cross-platform foundation for verifiable credential operations. This SDK serves as the reference implementation for the Open Verifiable ecosystem.

✨ Key Features

  • 🌐 Cross-Platform: Native support for Node.js, Browser, and React Native
  • 🔐 W3C VC 2.0 Compliant: Full support for W3C Verifiable Credentials 2.0 with Data Integrity Proofs
  • 🏗️ Modular Architecture: Extensible agent system with plugin support
  • 🔒 Secure by Default: Hardware-backed key storage
  • 📱 Offline First: Full offline capability with intelligent sync
  • 🤝 Trust Registry: Local-first trust validation with community import
  • 🧪 Comprehensive Testing: 90%+ test coverage with cross-platform validation
  • 📦 End-to-End Workflows: Complete DID, QR code, and storage workflows

🏗️ Architecture

Based on 14 comprehensive ADRs, the SDK implements a 4-layer architecture:

┌─────────────────────────────────────────────────────────────┐
│                    Developer Tools Layer                    │
│  SDK Tools │ Type Generation │ Testing Framework │ LLM Docs │
├─────────────────────────────────────────────────────────────┤
│                    Integration Layer                        │
│ Trust Registry │ Schema Registry │ Storage Adapters │
├─────────────────────────────────────────────────────────────┤
│                       Agent Layer                          │
│   User Agent  │ Package Agent │ Parent Agent │ Service Agent│
├─────────────────────────────────────────────────────────────┤
│                    Core SDK Layer                          │
│ W3C VC 2.0 │ DID Management │ Secure Storage │ Crypto Ops  │
└─────────────────────────────────────────────────────────────┘

🚧 Implementation Status

Phase 1: Foundation (COMPLETED)

  • [x] Project Structure: Cross-platform monorepo with TypeScript
  • [x] Platform Detection: ADR-0013 compliant platform capabilities
  • [x] Type System: Comprehensive TypeScript definitions for all components
  • [x] Agent Architecture: ADR-0007 extensible agent system with plugin support
  • [x] Configuration System: Platform-aware SDK initialization
  • [x] W3C VC 2.0 Migration: Data Integrity Proofs implementation
  • [x] Secure Storage: Cross-platform encrypted storage (ADR-0006)
  • [x] DID Management: Enhanced multi-method DID operations
  • [x] Core Agent Implementation: UserAgent, PackageAgent, ParentAgent, ServiceAgent
  • [x] Comprehensive Testing: Unit tests, integration tests, and e2e workflows

🔄 Phase 2: Core Features (IN PROGRESS)

  • [ ] Trust Registry Client: Local-first trust validation (ADR-0002)
  • [ ] Revocation Checking: Credential revocation system (ADR-0003)
  • [ ] Schema Registry Integration: Type generation from schemas (ADR-0008)
  • [ ] CLI Tooling: Comprehensive command-line interface (ADR-0010)
  • [ ] Advanced Testing Framework: 90%+ coverage testing system (ADR-0009)

📋 Phase 3: Advanced Features (PLANNED)

  • [ ] Offline Caching: Intelligent credential caching and sync (ADR-0005)
  • [ ] Performance Optimization: Sub-2ms validation targets (ADR-0014)
  • [ ] Error Handling: Comprehensive error recovery (ADR-0012)

🛠️ Phase 4: Developer Experience (PLANNED)

  • [ ] LLM Integration: AI-friendly documentation and code generation (ADR-0011)
  • [ ] Cross-Platform Testing: Node.js, Browser, React Native validation (ADR-0013)
  • [ ] Documentation: Complete API documentation and examples
  • [ ] Community Testing: Open source validation and feedback

🚀 Quick Start

Installation

npm install @open-verifiable/id-sdk

Basic Usage

import { 
  PackageAgent,
  UserAgent,
  ParentAgent,
  ServiceAgent
} from '@open-verifiable/id-sdk';

// Create a package agent for software package identity
const packageAgent = new PackageAgent({
  packageName: '@my-org/my-package',
  packageVersion: '1.0.0'
});

await packageAgent.initialize();

// Create a DID
const { did } = await packageAgent.createDID('key', {
  alias: 'my-package-did'
});

// Issue a verifiable credential
const credential = await packageAgent.issueCredential({
  '@context': ['https://www.w3.org/ns/credentials/v2'],
  type: ['VerifiableCredential', 'PackageIdentityCredential'],
  issuer: did,
  credentialSubject: {
    id: 'pkg:npm/@my-org/my-package',
    name: '@my-org/my-package',
    version: '1.0.0',
    description: 'My awesome package'
  },
  validFrom: new Date().toISOString()
});

// Verify the credential
const verificationResult = await packageAgent.verifyCredential(credential);
console.log('Credential valid:', verificationResult.isValid);

End-to-End Workflows

The SDK includes comprehensive e2e workflow tests demonstrating real-world usage:

// DID Import and Credential Workflow
import { runDIDWorkflow } from '@open-verifiable/id-sdk/examples';

// Complete workflow: key validation → DID creation → credential issuance → verification → storage
await runDIDWorkflow();

// QR Code Credential Exchange
import { runQRWorkflow } from '@open-verifiable/id-sdk/examples';

// QR workflow: credential creation → QR generation → data encoding → decoding → verification
await runQRWorkflow();


// Storage and Backup
import { runStorageWorkflow } from '@open-verifiable/id-sdk/examples';

// Storage workflow: credential creation → storage → retrieval → backup → restore
await runStorageWorkflow();

Migration from Legacy SDKs

The SDK provides backward compatibility during the transition:

// Legacy SDK functions will be supported
import { 
  createDID,    // ✅ Backward compatible
  signVC,       // ✅ Backward compatible  
  verifyVC      // ✅ Backward compatible
} from '@openverifiable/open-verifiable-id-sdk';

// New SDK features
import { 
  TrustRegistryClient
} from '@openverifiable/open-verifiable-id-sdk';

🧪 Testing

The SDK includes a comprehensive test suite with 90%+ coverage:

Test Structure

tests/
├── unit/                    # Unit tests for individual components
│   ├── agents/             # Agent type tests
│   ├── did/                # DID management tests
│   ├── storage/            # Storage and encryption tests
│   └── credentialing/      # Credential operations tests
├── integration/            # Integration tests for component interactions
├── e2e/                   # End-to-end workflow tests
│   ├── did-workflow.test.ts      # Complete DID workflows
│   ├── qr-workflow.test.ts       # QR code exchange workflows
│   └── storage-workflow.test.ts  # Storage and backup workflows
├── security/              # Security and cryptographic tests
└── performance/           # Performance and benchmark tests

Running Tests

# Run all tests
npm test

# Run specific test suites
npm run test:unit
npm run test:integration
npm run test:e2e
npm run test:security
npm run test:performance

# Run with coverage
npm run test:coverage

# Run tests in watch mode
npm run test:watch

📚 Documentation

Architecture Decision Records (ADRs)

The SDK implementation is based on 14 comprehensive ADRs:

  • ADR-0001: W3C VC 2.0 Migration Strategy
  • ADR-0002: Trust Registry Client Integration
  • ADR-0003: Credential Revocation Checking
  • ADR-0005: Offline Credential Caching and Sync
  • ADR-0006: Secure Local Storage
  • ADR-0007: Agent Architecture and Extensibility
  • ADR-0009: Testing & Validation Strategy
  • ADR-0010: Developer Experience & CLI Tooling
  • ADR-0011: LLM Development Integration
  • ADR-0012: Error Handling & Recovery Strategy
  • ADR-0013: Cross-Platform Compatibility
  • ADR-0014: SDK Performance Optimization

Examples and Demos

🛠️ Development

Prerequisites

  • Node.js 18+
  • TypeScript 5.0+
  • Git

Setup

# Clone the repository
git clone https://github.com/open-verifiable/open-verifiable-id-sdk.git
cd open-verifiable-id-sdk

# Install dependencies
npm install

# Run type checking
npm run type-check

# Build for all platforms
npm run build

# Run tests
npm test

# Run e2e tests
npm run test:e2e

Platform-Specific Development

# Node.js development
npm run dev:node

# Browser development
npm run dev:browser

# Test on specific platforms
npm run test:node
npm run test:browser
npm run test:react-native

Scripts and Utilities

# Generate types from schemas
npm run generate:types

# Validate schemas
npm run validate:schemas

# Run ADR inventory
npm run inventory:adrs

🤝 Contributing

We welcome contributions from the community! Please see our Contributing Guidelines for details.

Development Status

This SDK has completed its core implementation and is ready for Phase 2 features. Current focus areas:

  1. Trust Registry: Local-first trust validation system
  2. Revocation Checking: Credential revocation and status checking
  3. Schema Registry: Integration with Open Verifiable Schema Registry
  4. CLI Tooling: Developer experience improvements
  5. Performance Optimization: Sub-2ms validation targets

Getting Involved

📄 License

This project is licensed under the MIT License - see the LICENSE file for details.

🙏 Acknowledgments

  • Open Verifiable Community: For governance and standards development
  • W3C Credentials Community Group: For W3C VC 2.0 specifications
  • DIF (Decentralized Identity Foundation): For interoperability standards
  • OriginVault Team: For the original implementation inspiration

🔗 Related Projects


Built with ❤️ by the Open Verifiable Community