# @openid4vc/utils

> Shared utilities for the @openid4vc packages

Latest version **0.5.6** (published 2026-09-16) · Apache-2.0 license · 0 weekly downloads

## Install

```sh
npm install @openid4vc/utils
pnpm add @openid4vc/utils
yarn add @openid4vc/utils
bun add @openid4vc/utils
```

## Health

**Score 70/100 (B)** — status: active.

Positive: has types; esm support; no vulnerabilities; has provenance; recently updated; high maintenance score.

Warnings: low downloads; pre 1.0.

## Facts

| | |
|---|---|
| Version | 0.5.6 |
| Published | 2026-09-16 |
| First published | 2025-01-09 |
| Weekly downloads | 0 |
| License | Apache-2.0 |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 3 |
| Unpacked size | 59.5 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Provenance | attested (GitHub Actions) |
| GitHub stars | 7 |
| Author | Animo Solutions |
| Maintainers | timoglastra, openwalletfoundation |
| Keywords | openid4vc |

## Links

- npm: https://www.npmjs.com/package/@openid4vc/utils
- Repository: https://github.com/openwallet-foundation-labs/identity-common-ts
- Homepage: https://github.com/openwallet-foundation-labs/identity-common-ts/tree/main/packages/openid4vc-utils
- Issues: https://github.com/openwallet-foundation-labs/identity-common-ts/issues
- npm.io page: https://npm.io/package/@openid4vc/utils

## Dependencies (3)

- [zod](https://npm.io/package/zod.md) ^4.6.5
- [buffer](https://npm.io/package/buffer.md) ^6.0.3
- [zod-validation-error](https://npm.io/package/zod-validation-error.md) ^5.0.0

## Alternatives

- [@sindresorhus/slugify](https://npm.io/package/@sindresorhus/slugify.md) — 3.7M weekly downloads
- [solid-js](https://npm.io/package/solid-js.md) — 2.7M weekly downloads
- [expo-glass-effect](https://npm.io/package/expo-glass-effect.md) — 2.5M weekly downloads
- [nanoassert](https://npm.io/package/nanoassert.md) — 780.8K weekly downloads
- [@ffmpeg/ffmpeg](https://npm.io/package/@ffmpeg/ffmpeg.md) — 529.5K weekly downloads

## Recent versions

- 0.5.6 (latest) — 2026-09-16
- 0.5.6-alpha-20260922123038 (alpha) — 2026-09-22
- 0.5.7-alpha-20260922110620 — 2026-09-22
- 0.5.7-alpha-20260921121727 — 2026-09-21
- 0.5.7-alpha-20260920163617 — 2026-09-20
- 0.5.7-alpha-20260920143658 — 2026-09-20
- 0.5.7-alpha-20260920133054 — 2026-09-20
- 0.5.7-alpha-20260919211014 — 2026-09-19
- 0.5.7-alpha-20260919112629 — 2026-09-19
- 0.5.7-alpha-20260919100859 — 2026-09-19
- 0.5.7-alpha-20260919094428 — 2026-09-19
- 0.5.7-alpha-20260918081040 — 2026-09-18
- 0.5.7-alpha-20260918080827 — 2026-09-18
- 0.5.7-alpha-20260917172451 — 2026-09-17
- 0.5.7-alpha-20260917125442 — 2026-09-17
- … 249 more at https://npm.io/package/@openid4vc/utils/versions

## README

# @openid4vc/utils

[![npm version](https://img.shields.io/npm/v/@openid4vc/utils)](https://npmjs.com/package/@openid4vc/utils)
[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://github.com/openwallet-foundation-labs/identity-common-ts/blob/main/LICENSE)

Shared utilities used by the `@openid4vc/*` packages, such as encoding helpers, validation errors, and platform-agnostic `fetch`, `URL` and `URLSearchParams` wrappers.

This package is mostly used internally by [`@openid4vc/oauth2`](https://github.com/openwallet-foundation-labs/identity-common-ts/tree/main/packages/oauth2), [`@openid4vc/openid4vci`](https://github.com/openwallet-foundation-labs/identity-common-ts/tree/main/packages/openid4vci) and [`@openid4vc/openid4vp`](https://github.com/openwallet-foundation-labs/identity-common-ts/tree/main/packages/openid4vp).

This package was previously developed in the [oid4vc-ts](https://github.com/openwallet-foundation-labs/oid4vc-ts) repository. The `@openid4vc/*` packages are versioned together, separately from the other packages in this repository.

## Installation

```bash
# Using npm
npm install @openid4vc/utils

# Using pnpm
pnpm add @openid4vc/utils

# Using yarn
yarn add @openid4vc/utils
```

## Dependencies

- [buffer](https://www.npmjs.com/package/buffer)
- [zod](https://www.npmjs.com/package/zod)
- [zod-validation-error](https://www.npmjs.com/package/zod-validation-error)

## Platform Support

This library is **platform agnostic** and works in:

- ✅ Node.js (>=22)
- ✅ Browsers (modern browsers with ES2020 support)
- ✅ React Native

The environment must provide an implementation of `URL` and `URLSearchParams`. Platform-specific functionality such as hashing, generating random bytes and signing is provided through callbacks. If no global `fetch` is available in your environment, it also needs to be provided through the callbacks.

## Contributing

See the [Contributing Guide](https://github.com/openwallet-foundation-labs/identity-common-ts/blob/main/CONTRIBUTING.md) for details on how to contribute to this project.

## License

This project is licensed under the [Apache License Version 2.0](https://github.com/openwallet-foundation-labs/identity-common-ts/blob/main/LICENSE) (Apache-2.0).

## Credits

This library was initially created by [Animo](https://animo.id) as part of the [SPRIN-D EUDI Wallet Prototypes Funke](https://www.sprind.org/en/impulses/challenges/eudi-wallet-prototypes).

---
_Source: https://npm.io/package/@openid4vc/utils · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
