# @zk-kit/utils

> Essential zero-knowledge utility library for JavaScript developers.

Latest version **1.4.1** (published 2025-03-30) · MIT license · 0 weekly downloads

## Install

```sh
npm install @zk-kit/utils
pnpm add @zk-kit/utils
yarn add @zk-kit/utils
bun add @zk-kit/utils
```

## Health

**Score 45/100 (D)** — status: stable.

Positive: has types; esm support; no vulnerabilities.

Warnings: low downloads.

Negative: stale.

## Facts

| | |
|---|---|
| Version | 1.4.1 |
| Published | 2025-03-30 |
| First published | 2023-12-21 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 2 |
| Unpacked size | 459.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 382 |
| Maintainers | cedoor, sripwoud, jeeiii |

## Links

- npm: https://www.npmjs.com/package/@zk-kit/utils
- Repository: git@github.com:privacy-scaling-explorations/zk-kit.git
- Homepage: https://github.com/privacy-scaling-explorations/zk-kit/tree/main/packages/utils
- Issues: https://github.com/privacy-scaling-explorations/zk-kit.git/issues
- npm.io page: https://npm.io/package/@zk-kit/utils

## Dependencies (2)

- [buffer](https://npm.io/package/buffer.md) ^6.0.3
- [ethers](https://npm.io/package/ethers.md) 6.13.5

## Recent versions

- 1.4.1 (latest) — 2025-03-30
- 1.4.0 — 2025-03-30
- 1.3.0 — 2025-01-31
- 1.2.1 — 2024-09-13
- 1.2.0 — 2024-06-13
- 1.1.0 — 2024-06-13
- 1.0.0 — 2024-05-20
- 1.0.0-beta.5 — 2024-05-20
- 1.0.0-beta.4 — 2024-04-24
- 1.0.0-beta.3 — 2024-04-23
- 1.0.0-beta.2 — 2024-04-18
- 1.0.0-beta.1 — 2024-04-16
- 1.0.0-beta — 2024-03-21
- 0.8.1 — 2024-03-15
- 0.8.0 — 2024-03-14
- … 7 more at https://npm.io/package/@zk-kit/utils/versions

## README

<p align="center">
    <h1 align="center">
        Utils
    </h1>
    <p align="center">Essential zero-knowledge utility library for JavaScript developers.</p>
</p>

<p align="center">
    <a href="https://github.com/privacy-scaling-explorations/zk-kit">
        <img src="https://img.shields.io/badge/project-zk--kit-blue.svg?style=flat-square">
    </a>
    <a href="https://github.com/privacy-scaling-explorations/zk-kit/tree/main/packages/utils/LICENSE">
        <img alt="NPM license" src="https://img.shields.io/npm/l/%40zk-kit%2Futils?style=flat-square">
    </a>
    <a href="https://www.npmjs.com/package/@zk-kit/utils">
        <img alt="NPM version" src="https://img.shields.io/npm/v/@zk-kit/utils?style=flat-square" />
    </a>
    <a href="https://npmjs.org/package/@zk-kit/utils">
        <img alt="Downloads" src="https://img.shields.io/npm/dm/@zk-kit/utils.svg?style=flat-square" />
    </a>
    <a href="https://bundlephobia.com/package/@zk-kit/utils">
        <img alt="npm bundle size (scoped)" src="https://img.shields.io/bundlephobia/minzip/@zk-kit/utils" />
    </a>
    <a href="https://eslint.org/">
        <img alt="Linter eslint" src="https://img.shields.io/badge/linter-eslint-8080f2?style=flat-square&logo=eslint" />
    </a>
    <a href="https://prettier.io/">
        <img alt="Code style prettier" src="https://img.shields.io/badge/code%20style-prettier-f8bc45?style=flat-square&logo=prettier" />
    </a>
</p>

<div align="center">
    <h4>
        <a href="https://appliedzkp.org/discord">
            🗣️ Chat &amp; Support
        </a>
        <span>&nbsp;&nbsp;|&nbsp;&nbsp;</span>
        <a href="https://zkkit.pse.dev/modules/_zk_kit_utils.html">
            📘 Docs
        </a>
    </h4>
</div>

> [!NOTE]  
> This library has been audited as part of the Semaphore V4 PSE audit: https://semaphore.pse.dev/Semaphore_4.0.0_Audit.pdf.

## 🛠 Install

### npm or yarn

Install the `@zk-kit/utils` package and its peer dependencies with npm:

```bash
npm i @zk-kit/utils
```

or yarn:

```bash
yarn add @zk-kit/utils
```

### CDN

You can also load it using a `script` tag using [unpkg](https://unpkg.com/):

```html
<script src="https://unpkg.com/@zk-kit/utils"></script>
```

or [JSDelivr](https://www.jsdelivr.com/):

```html
<script src="https://cdn.jsdelivr.net/npm/@zk-kit/utils"></script>
```

## 📜 Usage

```typescript
// You can import modules from the main bundle.
import { errorHandlers, typeChecks } from "@zk-kit/utils"

// Or by using conditional exports.
import { requireNumber } from "@zk-kit/utils/error-handlers"
import { isNumber } from "@zk-kit/utils/type-checks"
```

For more information on the functions provided by `@zk-kit/utils`, please refer to the [documentation](https://zkkit.pse.dev/modules/_zk_kit_utils.html).

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