Overview Β |Β Packages Β |Β Getting Started Β |Β Supported Environments Β |Β Contributing Β |Β 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 two main 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/JWT implementation with common validation methods | π Planned |
@owf/cose |
COSE/CWT implementation with common validation methods | π Planned |
@owf/x509 |
X.509 certificate parsing, creation, and verification | π Planned |
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-wrprc |
ETSI TS 119 475 Wallet-Relying Party Registration Certificates | β Available |
@owf/eudi-attestation-schema |
TS11 Catalogue of Attestations SchemaMeta | β Available |
@owf/eudi-certificates |
Registration and access certificate verification | π Planned |
@owf/eudi-sca |
TS12 Strong Customer Authentication Payments according to the latest to-be-added ARF | In Progess |
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
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
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-wrprcπ 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
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 for package management and Turborepo for task orchestration.
# 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
# Build all packages
pnpm build
# Run all tests
pnpm testAll build and test tasks run through Turborepo, which provides:
- Caching β tasks whose inputs haven't changed are skipped entirely (a cached full run completes in ~15ms)
- Parallelism β independent packages build and test concurrently
- Correct ordering β packages are always built before the packages that depend on them
| Task | Depends on | What it does |
|---|---|---|
build |
upstream build |
Compiles each package with tsdown (ESM + CJS + .d.ts) |
test |
upstream build |
Runs vitest tests for each package |
types:check |
upstream build |
Type-checks the workspace with tsc --noEmit |
esm:check |
local build |
Validates ESM import paths |
lint |
β | Linting (no build prerequisite) |
Run any task across all packages:
pnpm build # turbo run build
pnpm test # turbo run test
# Scope to a single package
npx turbo run build --filter=@owf/identity-common
npx turbo run test --filter=@owf/cryptoThe first run executes everything. Subsequent runs that find no changed inputs print FULL TURBO and finish instantly.
Turbo computes a hash for each task from its input files (src/**, package.json, tsconfig.json), the global config (tsconfig.json, vite.config.js), and the pnpm lockfile. If the hash matches a previously-stored result the task is restored from .turbo/cache/ without re-running.
The .turbo/ directory is intentionally not committed (.gitignore) β every developer gets their own local cache.
This library is platform agnostic and supports:
- β Node.js (>=20)
- β Browsers (modern browsers with ES2020 support)
- β React Native
Your environment must provide:
URLandURLSearchParamsimplementations- A global
fetchimplementation (or provide it via callbacks)
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:
- sd-jwt-js - SD-JWT implementation
- oid4vc-ts - OpenID4VC implementation
- 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, build config, and Turborepo wiring 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).