# @libp2p/http-peer-id-auth

> An implementation of Peer ID Authentication over HTTP

Latest version **2.0.3** (published 2026-07-03) · Apache-2.0 OR MIT license · 0 weekly downloads

## Install

```sh
npm install @libp2p/http-peer-id-auth
pnpm add @libp2p/http-peer-id-auth
yarn add @libp2p/http-peer-id-auth
bun add @libp2p/http-peer-id-auth
```

## Health

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

Positive: has types; esm support; no vulnerabilities; has provenance; high quality score.

Warnings: low downloads.

## Facts

| | |
|---|---|
| Version | 2.0.3 |
| Published | 2026-07-03 |
| First published | 2025-05-28 |
| Weekly downloads | 0 |
| License | Apache-2.0 OR MIT |
| TypeScript types | bundled |
| Module format | ESM |
| Dependencies | 5 |
| Unpacked size | 1010.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Provenance | attested (GitHub Actions) |
| GitHub stars | 13 |
| Maintainers | daviddias, alanshaw, achingbrain, vascosantos, npm-service-account-libp2p, jacobheun |

## Links

- npm: https://www.npmjs.com/package/@libp2p/http-peer-id-auth
- Repository: https://github.com/libp2p/js-libp2p-http
- Homepage: https://github.com/libp2p/js-libp2p-http/tree/main/packages/http-peer-id-auth#readme
- Issues: https://github.com/libp2p/js-libp2p-http/issues
- npm.io page: https://npm.io/package/@libp2p/http-peer-id-auth

## Dependencies (5)

- [uint8arrays](https://npm.io/package/uint8arrays.md) ^6.1.1
- [uint8-varint](https://npm.io/package/uint8-varint.md) ^3.0.0
- [@libp2p/crypto](https://npm.io/package/@libp2p/crypto.md) ^5.1.15
- [@libp2p/peer-id](https://npm.io/package/@libp2p/peer-id.md) ^6.0.6
- [@libp2p/interface](https://npm.io/package/@libp2p/interface.md) ^3.2.0

## Recent versions

- 2.0.3 (latest) — 2026-07-03
- 2.0.2 — 2026-06-14
- 2.0.1 — 2026-04-28
- 2.0.0 — 2025-10-02
- 1.0.1 — 2025-06-27
- 1.0.0 — 2025-05-28
- 0.0.0 — 2025-05-28

## README

# @libp2p/http-client

# @libp2p/http-peer-id-auth

[![libp2p.io](https://img.shields.io/badge/project-libp2p-yellow.svg?style=flat-square)](http://libp2p.io/)
[![Discuss](https://img.shields.io/discourse/https/discuss.libp2p.io/posts.svg?style=flat-square)](https://discuss.libp2p.io)
[![codecov](https://img.shields.io/codecov/c/github/libp2p/js-libp2p-http.svg?style=flat-square)](https://codecov.io/gh/libp2p/js-libp2p-http)
[![CI](https://img.shields.io/github/actions/workflow/status/libp2p/js-libp2p-http/js-test-and-release.yml?branch=main\&style=flat-square)](https://github.com/libp2p/js-libp2p-http/actions/workflows/js-test-and-release.yml?query=branch%3Amain)

> An implementation of Peer ID Authentication over HTTP

# About

<!--

!IMPORTANT!

Everything in this README between "# About" and "# Install" is automatically
generated and will be overwritten the next time the doc generator is run.

To make changes to this section, please update the @packageDocumentation section
of src/index.js or src/index.ts

To experiment with formatting, please run "npm run docs" from the root of this
repo and examine the changes made.

-->

This is an implementation of the [Peer ID Auth](https://github.com/libp2p/specs/blob/master/http/peer-id-auth.md)
spec that allows clients and servers to exchange PeerIds.

# Install

```console
$ npm i @libp2p/http-peer-id-auth
```

## Browser `<script>` tag

Loading this module through a script tag will make its exports available as `Libp2pHttpPeerIdAuth` in the global namespace.

```html
<script src="https://unpkg.com/@libp2p/http-peer-id-auth/dist/index.min.js"></script>
```

# API Docs

- <https://libp2p.github.io/js-libp2p-http/modules/_libp2p_http-peer-id-auth.html>

# License

Licensed under either of

- Apache 2.0, ([LICENSE-APACHE](https://github.com/libp2p/js-libp2p-http/blob/main/packages/http-peer-id-auth/LICENSE-APACHE) / <http://www.apache.org/licenses/LICENSE-2.0>)
- MIT ([LICENSE-MIT](https://github.com/libp2p/js-libp2p-http/blob/main/packages/http-peer-id-auth/LICENSE-MIT) / <http://opensource.org/licenses/MIT>)

# Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

---
_Source: https://npm.io/package/@libp2p/http-peer-id-auth · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
