Overview Β |Β Packages Β |Β Getting Started Β |Β Supported Environments Β |Β Contributing Β |Β Security Β |Β License
To avoid reinventing the wheel, many identity projects share common needs for data types and utility functions. Identity Common TypeScript provides a shared library of TypeScript types and utilities for identity-related projects, promoting consistency and reducing duplication across the ecosystem.
- πͺΆ Lightweight: Minimal dependencies to keep bundle sizes small
- π Platform Agnostic: Works in Node.js, browsers, and React Native
- π Reusable: Common utilities shared across identity solutions
- π€ Interoperable: Ensures compatibility between different identity projects
The project is organized into six main categories:
Note: All packages within a category are versioned and published together, so they always share the same version. Each category is versioned independently of the other categories.
Generic, reusable utilities that can be used across any identity solution:
| Package | Description | Status |
|---|---|---|
@owf/identity-common |
Base types, base64url utilities, and JWT decoding | β Available |
@owf/crypto |
Web Crypto API wrappers + SHA hash functions (@noble/hashes) |
β Available |
@owf/token-status-list |
Status list bitstring handling, JWT and CWT/CBOR transport | β Available |
@owf/jose |
JOSE (JWK, JWA, JWS, JWT and JWE) with strict, schema based parsing and verification | β Available |
@owf/cose |
COSE/CWT implementation with common validation methods | π Planned |
@owf/x509 |
X.509 certificate and CRL parsing, creation, verification and revocation checking | β Available |
@owf/openid-federation |
OpenID Federation 1.0 entity statements, trust chain resolution and metadata policies | β Available |
Tools specific to the European Digital Identity (EUDI) Wallet ecosystem:
| Package | Description | Status |
|---|---|---|
@owf/eudi-lote |
ETSI TS 119 602 Lists of Trusted Entities (LoTE) | β Available |
@owf/eudi-tl |
ETSI TS 119 612 XML Trusted Lists parsing and verification | β Available |
@owf/eudi-registration-certificate |
ETSI TS 119 475 Wallet-Relying Party Registration Certificates | β Available |
@owf/eudi-attestation-schema |
TS11 Catalogue of Attestations SchemaMeta | β Available |
@owf/eudi-access-certificate |
ETSI TS 119 411-8 wallet-relying party access certificates | β Available |
@owf/eudi-sca |
TS12 Strong Customer Authentication Payments according to the latest to-be-added ARF | In Progess |
Implementations of Selective Disclosure for JWTs (SD-JWT) and SD-JWT-based Verifiable Credentials (SD-JWT VC), previously developed in sd-jwt-js. The @sd-jwt/* packages are versioned separately from the @owf/* packages.
| Package | Description | Status |
|---|---|---|
@sd-jwt/core |
SD-JWT (RFC 9901) issuance, presentation, and verification | β Available |
@sd-jwt/sd-jwt-vc |
SD-JWT VC (draft-ietf-oauth-sd-jwt-vc) built on top of @sd-jwt/core |
β Available |
Implementation of ISO/IEC 18013-5 mDOC and mDL (mobile driving licence) documents, including the ISO/IEC 18013-7 and OpenID4VP presentation flows, previously developed in mdoc-ts. @owf/mdoc is versioned separately from the other @owf/* packages.
| Package | Description | Status |
|---|---|---|
@owf/mdoc |
ISO/IEC 18013-5 mDOC and mDL issuance, presentation, and verification | β Available |
Implementation of the Digital Credentials Query Language (DCQL) from OpenID4VP, previously developed in dcql-ts. dcql is versioned separately from the other packages.
| Package | Description | Status |
|---|---|---|
dcql |
Create, validate, and execute DCQL queries, and validate presentations against them | β Available |
Implementations of OAuth 2.0, OpenID for Verifiable Credential Issuance (OpenID4VCI) and OpenID for Verifiable Presentations (OpenID4VP), previously developed in oid4vc-ts. The @openid4vc/* packages are versioned together, separately from the other packages.
| Package | Description | Status |
|---|---|---|
@openid4vc/oauth2 |
OAuth 2.0 client, authorization server and resource server, including PAR, PKCE, DPoP, JAR and attestation-based client authentication | β Available |
@openid4vc/openid4vci |
OpenID4VCI issuer and client, from draft 11 up to 1.0 | β Available |
@openid4vc/openid4vp |
OpenID4VP verifier and client, from draft 18 up to 1.0 | β Available |
@openid4vc/utils |
Shared utilities for the @openid4vc/* packages |
β Available |
Note: While the EUDI Wallet is built on open standards (OpenID4VC, SD-JWT VC), it requires specific extensions for Trust, Payments, and document signing that are better suited in dedicated packages.
Base types (JwtPayload, JsonWebKey, Signer, Verifier, Hasher), base64url encode/decode, and JWT decoding.
npm install @owf/identity-commonπ View package documentation
JOSE (JWK, JWA, JWS, JWT and JWE) with strict, schema based parsing and verification. A token type is expressed as a zod schema, and signing and verification go through callbacks that sign and verify the exact bytes the library computed.
npm install @owf/joseπ View package documentation
Web Crypto API wrappers for signing, hashing, salt generation, and ES256/384/512 key pairs, plus SHA-256/384/512 hash functions powered by @noble/hashes.
npm install @owf/cryptoπ View package documentation
Status list implementation with bitstring handling, compression/decompression, JWT transport layer, and CWT/CBOR transport layer for Token Status Lists (draft-ietf-oauth-status-list).
npm install @owf/token-status-listπ View package documentation
Environment agnostic X.509 certificates and CRLs (RFC 5280): parsing, creation, signature verification and revocation checking. Signing and verification are callbacks, so private keys never enter the library.
npm install @owf/x509π View package documentation
OpenID Federation 1.0: create, fetch and validate entity configurations and subordinate statements, resolve and validate trust chains, and apply metadata policies. Previously developed as @openid-federation/core in openid-federation-ts.
npm install @owf/openid-federationπ View package documentation
SDK for creating, signing, and validating Lists of Trusted Entities (LoTE) per ETSI TS 119 602.
npm install @owf/eudi-loteπ View package documentation
Parsing, validation, and XAdES signature verification for ETSI TS 119 612 XML Trusted Lists, exposing normalized trust anchors. The XML counterpart of @owf/eudi-lote.
npm install @owf/eudi-tlπ View package documentation
SDK for creating, signing, and validating Wallet-Relying Party Registration Certificates (WRPRC) per ETSI TS 119 475 v1.2.1.
npm install @owf/eudi-registration-certificateπ View package documentation
The ETSI TS 119 411-8 profile for wallet-relying party access certificates on top of @owf/x509: parsing, profile validation and creation. Runs on servers, in browsers and in React Native.
npm install @owf/eudi-access-certificateπ View package documentation
SDK for creating, signing, and validating attestation schema metadata (SchemaMeta) per the EUDI TS11 Catalogue of Attestations specification.
npm install @owf/eudi-attestation-schemaπ View package documentation
Core library for SD-JWT (RFC 9901): encoding, decoding, selective disclosure, presentation, key binding, and verification.
npm install @sd-jwt/coreπ View package documentation
SD-JWT VC implementation built on top of @sd-jwt/core, with status list (revocation) and type metadata validation.
npm install @sd-jwt/sd-jwt-vcπ View package documentation
ISO/IEC 18013-5 mDOC and mDL: issue, hold, present, and verify CBOR encoded documents, with support for ISO/IEC 18013-7 and OpenID4VP session transcripts.
npm install @owf/mdocπ View package documentation
Digital Credentials Query Language (DCQL): create and validate queries, match them against credentials, and validate presentation results. Supports mso_mdoc, dc+sd-jwt and W3C VC formats, from OpenID4VP Draft 22 up to 1.0.
npm install dcqlπ View package documentation
OAuth 2.0 Authorization Framework implementation, including Pushed Authorization Requests, PKCE, DPoP, token introspection, JWT access tokens, resource indicators and attestation-based client authentication.
npm install @openid4vc/oauth2π View package documentation
OpenID for Verifiable Credential Issuance: authorization code and pre-authorized code flows, credential offers, signed issuer metadata, key attestations and presentation during issuance. Supports 1.0 with backwards compatibility down to draft 11.
npm install @openid4vc/openid4vciπ View package documentation
OpenID for Verifiable Presentations: signed and unsigned requests (JAR), direct_post, direct_post.jwt, dc_api and dc_api.jwt response modes, JARM and transaction data. Supports 1.0 with backwards compatibility down to draft 18.
npm install @openid4vc/openid4vpπ View package documentation
Install the packages you need:
# Using npm
npm install @owf/identity-common
# Using pnpm
pnpm add @owf/identity-common
# Using yarn
yarn add @owf/identity-commonThis monorepo uses pnpm workspaces.
# Clone the repository
git clone https://github.com/openwallet-foundation-labs/identity-common-ts.git
cd identity-common-ts
# Install dependencies (requires pnpm)
pnpm install
# Run all tests, or a subset
pnpm test
pnpm test packages/mdoc
# Type-check the workspace
pnpm types:check
# Build all packages with tsdown
pnpm buildWithin the workspace, packages export their TypeScript source, so tests, type checks, and examples run without a build. The built dist entrypoints are configured in publishConfig and only used for the published packages. See the Contributing Guide for all available scripts.
This library is platform agnostic and supports:
- β Node.js (>=22)
- β Browsers (modern browsers with ES2020 support)
- β React Native
Your environment must provide:
URLandURLSearchParamsimplementations- A global
fetchimplementation (or provide it via callbacks) - Global
TextEncoderandTextDecoderimplementations
When using these libraries in React Native you may need to add a polyfill for TextDecoder.
You can confirm this by checking if global.TextDecoder is available. It should be available for React Native > 0.85 or Expo SDK > 52.
If it is not available, make sure to add a polyfill like this one.
Because these libraries are platform agnostic, cryptographic operations and other platform-specific functionality must be provided via callbacks:
import { someFunction } from '@owf/identity-common'
// Provide platform-specific implementations
const result = await someFunction({
crypto: {
sha256: async (data) => { /* your implementation */ },
randomBytes: (length) => { /* your implementation */ },
},
fetch: globalThis.fetch, // if not globally available
})This library is designed to work with and support other OpenWallet Foundation projects:
- openid-federation-ts - OpenID Federation implementation
- credo-ts - Aries Framework JavaScript
- EUDIPLO - EUDI Wallet implementation
We welcome contributions! Whether you're:
- π Reporting bugs
- π‘ Suggesting features
- π Improving documentation
- π§ Submitting code changes
Please read our Contributing Guide to get started.
A script is provided to scaffold a new package with the correct structure and build config already in place:
pnpm create-package <name> # e.g. jose
pnpm create-package <name> --eudi # prefixes with eudi-See the guide for adding packages for details.
This project is licensed under the Apache License Version 2.0 (Apache-2.0).