How openwallet-foundation-labs/oid4vc-ts works
Project type and purpose
• This is a TypeScript monorepo (pnpm workspace) that publishes three related libraries under the “@openid4vc” scope plus a shared “utils” package.
• It implements OAuth 2.0 (client, authorization server, resource server) plus two OpenID extensions:
• OpenID for Verifiable Credential Issuance (openid4vci)
• OpenID for Verifiable Presentations (openid4vp)
• Each package exports classes and functions to be embedded in Node, browser or React Native apps.
File structure
• Root
• pnpm-workspace.yaml, package.json, tsconfig.json, Vite config, CI workflows
• .changeset folder—release notes for changeset-based versioning
• /packages
• /oauth2 — RFC-compliant OAuth 2.0 framework (AuthorizationServer, ResourceServer, Oauth2Client)
• /openid4vci — credential-issuance client + issuer flows, built atop OAuth 2.0
• /openid4vp — presentation request + response client + verifier, independent flows
• /utils — shared helpers (fetcher, error types, parsing, validation)
• Each package follows the same pattern: src/, __tests__/, tsconfig.json, package.json.
Insights from the README
• oauth2 implements core OAuth 2.0 RFCs (PKCE, DPoP, token introspection, pushed requests).
• openid4vci depends on oauth2 + utils to run the OpenID issuance flows.
• openid4vp depends on utils to perform the OpenID presentation flows (JAR, JARM, direct_post, dc_api).
• All packages are environment-agnostic: users provide fetch, crypto, random callbacks.
Summary
• External entities (Wallet, Issuer, Verifier, AuthZ Server) around the modules to show integration points
1) Shows internal module dependencies and
2) Illustrates the end-to-end data flows for each supported protocol