Big News: Socket raises $60M Series C at a $1B valuation to secure software supply chains for AI-driven development.Announcement
Sign In

@digitalcredentials/ssi

Package Overview
Dependencies
Maintainers
9
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@digitalcredentials/ssi

Typescript types for the W3C Verifiable Credentials Data Model.

latest
Source
npmnpm
Version
5.5.0
Version published
Maintainers
9
Created
Source

SSI Types and Data Model (@digitalcredentials/ssi)

Node.js CI NPM Version

Typescript types for the W3C Verifiable Credentials Data Model, DID Core, cryptosuites, etc.

Table of Contents

Background

If you're implementing the Verifiable Credential specification in Typescript, chances are that you're using a type definition for VerifiableCredentials and VerifiablePresentations. Many VC-related projects (Sphereon's Veramo, LEF's LearnCard, Transmute's Verifiable Data) include the type definitions in their monorepos.

We saw a niche for a standalone library that exported just the type definitions, hence this repository.

See W3C Verifiable Credentials Data Model specification.

Inspired by / incorporates elements of other VC Typescript libraries:

  • https://github.com/Sphereon-Opensource/veramo (/packages/core/src/types/vc-data-model.ts)
  • https://github.com/transmute-industries/verifiable-data (/packages/vc.js/src/types/)
  • https://github.com/learningeconomy/LearnCard (/packages/learn-card-core/src/types/)
  • Existing type definitions in DCC libraries (in learner-credential-wallet and others)

Versioning

The version numbers of this npm module are meant to mirror the version numbers of the Verifiable Credentials Data Model specification. Developers are encouraged to specify which VC Data model version they're using. For example, currently, the VC DM 1.1 is the stable version:

"dependencies": {
   "@digitalcredentials/vc-data-model": "^1.1.0"
}

However, the VC DM 2.0 Working group is currently developing the second version of the specification (which will likely make breaking changes). So, in the future:

"dependencies": {
   "@digitalcredentials/ssi": "^3.0.0"
}

Install

  • Node.js 16+ is recommended.

NPM

To install via NPM:

npm install @digitalcredentials/ssi

Development

To install locally (for development):

git clone https://github.com/digitalcredentials/ssi.git
cd ssi
npm install

Usage

import { IVerifiableCredential, IVerifiablePresentation } from '@digitalcredentials/ssi'

// for example, in an Express route definition:
const vp = req.body.presentation as IVerifiablePresentation

Exported Types/Interfaces

  • IVerifiableCredential and IVerifiablePresentation
  • IOpenBadgeCredentialV3 (for OBv3 VCs)
  • IDidCoreDocument and its children, IDidDocument_v1_0 and IDidDocument_v1_1
  • IKeyPair and its children, such as IVerificationKeyPair2020 and IKeyAgreementKeyPair2020
  • ISigner
  • ... others (see individual exports in /src)
  • IZcap and related interfaces (IRootZcap, IDelegatedZcap, IZcapLike, and ICapabilityDelegationProof)

Contribute

PRs accepted.

If editing the Readme, please conform to the standard-readme specification.

License

MIT License © 2022-2025 Digital Credentials Consortium.

Keywords

dcc

FAQs

Package last updated on 31 May 2026

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts