# @semaphore-protocol/utils

> A library to provide utility functions to the other Semaphore packages.

Latest version **4.14.3** (published 2026-07-08) · MIT license · 0 weekly downloads

## Install

```sh
npm install @semaphore-protocol/utils
pnpm add @semaphore-protocol/utils
yarn add @semaphore-protocol/utils
bun add @semaphore-protocol/utils
```

## Health

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

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

Warnings: low downloads.

## Facts

| | |
|---|---|
| Version | 4.14.3 |
| Published | 2026-07-08 |
| First published | 2024-02-28 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 1 |
| Unpacked size | 320.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1087 |
| Maintainers | vplasencia, johnguilding, errmac, nicoserranop |

## Links

- npm: https://www.npmjs.com/package/@semaphore-protocol/utils
- Repository: https://github.com/semaphore-protocol/semaphore
- Homepage: https://github.com/semaphore-protocol/semaphore/tree/main/packages/utils
- Issues: https://github.com/semaphore-protocol/semaphore.git/issues
- npm.io page: https://npm.io/package/@semaphore-protocol/utils

## Dependencies (1)

- [ethers](https://npm.io/package/ethers.md) ^6.13.4

## Recent versions

- 4.14.3 (latest) — 2026-07-08
- 4.14.2 — 2026-01-23
- 4.14.1 — 2026-01-19
- 4.14.0 — 2025-10-27
- 4.13.2 — 2025-10-13
- 4.13.1 — 2025-09-08
- 4.13.0 — 2025-08-27
- 4.13.0-beta.1 — 2025-07-23
- 4.13.0-beta.0 — 2025-07-22
- 4.12.1 — 2025-07-21
- 4.12.0 — 2025-07-17
- 4.11.1 — 2025-05-21
- 4.11.0 — 2025-05-20
- 4.10.0 — 2025-05-06
- 4.9.2 — 2025-03-31
- … 42 more at https://npm.io/package/@semaphore-protocol/utils/versions

## README

<p align="center">
    <h1 align="center">
        Semaphore utils
    </h1>
    <p align="center">A library to provide utility functions to the other Semaphore packages.</p>
</p>

<p align="center">
    <a href="https://github.com/semaphore-protocol">
        <img src="https://img.shields.io/badge/project-Semaphore-blue.svg?style=flat-square">
    </a>
    <a href="https://github.com/semaphore-protocol/semaphore/blob/main/LICENSE">
        <img alt="NPM license" src="https://img.shields.io/npm/l/%40semaphore-protocol%2Futils?style=flat-square">
    </a>
    <a href="https://www.npmjs.com/package/@semaphore-protocol/utils">
        <img alt="NPM version" src="https://img.shields.io/npm/v/@semaphore-protocol/utils?style=flat-square" />
    </a>
    <a href="https://npmjs.org/package/@semaphore-protocol/utils">
        <img alt="Downloads" src="https://img.shields.io/npm/dm/@semaphore-protocol/utils.svg?style=flat-square" />
    </a>
    <a href="https://js.semaphore.pse.dev/modules/_semaphore_protocol_utils">
        <img alt="Documentation typedoc" src="https://img.shields.io/badge/docs-typedoc-744C7C?style=flat-square">
    </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://github.com/semaphore-protocol/semaphore/blob/main/CONTRIBUTING.md">
            👥 Contributing
        </a>
        <span>&nbsp;&nbsp;|&nbsp;&nbsp;</span>
        <a href="https://github.com/semaphore-protocol/semaphore/blob/main/CODE_OF_CONDUCT.md">
            🤝 Code of conduct
        </a>
        <span>&nbsp;&nbsp;|&nbsp;&nbsp;</span>
        <a href="https://github.com/semaphore-protocol/semaphore/contribute">
            🔎 Issues
        </a>
        <span>&nbsp;&nbsp;|&nbsp;&nbsp;</span>
        <a href="https://semaphore.pse.dev/telegram">
            🗣️ Chat &amp; Support
        </a>
    </h4>
</div>

## 🛠 Install

### npm or yarn

Install the `@semaphore-protocol/utils` package with npm:

```bash
npm i @semaphore-protocol/utils
```

or yarn:

```bash
yarn add @semaphore-protocol/utils
```

## 📜 Usage

For more information on the functions and modules provided by `@semaphore-protocol/utils`, please refer to the [TypeDoc documentation](https://js.semaphore.pse.dev/modules/_semaphore_protocol_utils).

```typescript
// You can import functions/parameters from the main bundle.
import { supportedNetworks, decodeMessage } from "@semaphore-protocol/utils"

// Or by using conditional exports.
import supportedNetworks from "@semaphore-protocol/utils/supported-networks"
import decodeMessage from "@semaphore-protocol/utils/decode-message"
```

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