# libp2p-identify

> libp2p Identify Protocol

Latest version **0.7.6** (published 2019-03-20) · MIT license · 0 weekly downloads

> **Deprecated.** This package is deprecated.

## Install

```sh
npm install libp2p-identify
pnpm add libp2p-identify
yarn add libp2p-identify
bun add libp2p-identify
```

## Health

**Score 10/100 (F)** — status: deprecated.

Negative: deprecated.

## Facts

| | |
|---|---|
| Version | 0.7.6 |
| Published | 2019-03-20 |
| First published | 2016-06-27 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=6.0.0 |
| Dependencies | 6 |
| Unpacked size | 5.2 MB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 6 |
| Maintainers | daviddias |
| Keywords | IPFS, libp2p |

## Links

- npm: https://www.npmjs.com/package/libp2p-identify
- Repository: https://github.com/libp2p/js-libp2p-identify
- Homepage: https://github.com/libp2p/js-libp2p-identify#readme
- Issues: https://github.com/libp2p/js-libp2p-identify/issues
- npm.io page: https://npm.io/package/libp2p-identify

## Dependencies (6)

- [peer-id](https://npm.io/package/peer-id.md) ~0.12.2
- [protons](https://npm.io/package/protons.md) ^1.0.1
- [multiaddr](https://npm.io/package/multiaddr.md) ^6.0.4
- [peer-info](https://npm.io/package/peer-info.md) ~0.15.1
- [pull-stream](https://npm.io/package/pull-stream.md) ^3.6.9
- [pull-length-prefixed](https://npm.io/package/pull-length-prefixed.md) ^1.3.1

## Recent versions

- 0.7.6 (latest) — 2019-03-20
- 0.7.5 — 2019-01-10
- 0.7.4 — 2019-01-04
- 0.7.3 — 2018-11-26
- 0.7.2 — 2018-07-23
- 0.7.1 — 2018-04-30
- 0.7.0 — 2018-04-05
- 0.6.3 — 2018-01-28
- 0.6.2 — 2018-01-07
- 0.6.1 — 2017-09-07
- 0.6.0 — 2017-09-03
- 0.5.0 — 2017-07-22
- 0.4.2 — 2017-07-08
- 0.4.1 — 2017-04-06
- 0.4.0 — 2017-03-30
- … 9 more at https://npm.io/package/libp2p-identify/versions

## README

# js-libp2p-identify

[![](https://img.shields.io/badge/made%20by-Protocol%20Labs-blue.svg?style=flat-square)](http://protocol.ai)
[![](https://img.shields.io/badge/project-libp2p-yellow.svg?style=flat-square)](http://libp2p.io/)
[![](https://img.shields.io/badge/freenode-%23libp2p-yellow.svg?style=flat-square)](http://webchat.freenode.net/?channels=%23libp2p)
[![](https://img.shields.io/codecov/c/github/libp2p/js-libp2p-identify.svg?style=flat-square)](https://codecov.io/gh/libp2p/js-libp2p-identify)
[![](https://img.shields.io/travis/libp2p/js-libp2p-identify.svg?style=flat-square)](https://travis-ci.com/libp2p/js-libp2p-identify)
[![Dependency Status](https://david-dm.org/libp2p/js-libp2p-identify.svg?style=flat-square)](https://david-dm.org/libp2p/js-libp2p-identify)
[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square)](https://github.com/feross/standard)
![](https://img.shields.io/badge/npm-%3E%3D6.0.0-orange.svg?style=flat-square)
![](https://img.shields.io/badge/Node.js-%3E%3D10.0.0-orange.svg?style=flat-square)

> libp2p Identify Protocol

## Lead Maintainer

[Jacob Heun](https://github.com/jacobheun)

## Description

Identify is a STUN protocol, used by libp2p-swarm in order to broadcast and learn about the `ip:port` pairs a specific peer is available through and to know when a new stream muxer is established, so a conn can be reused.

## How does it work

Best way to understand the current design is through this issue: https://github.com/libp2p/js-libp2p-swarm/issues/78

### This module uses `pull-streams`

We expose a streaming interface based on `pull-streams`, rather then on the Node.js core streams implementation (aka Node.js streams). `pull-streams` offers us a better mechanism for error handling and flow control guarantees. If you would like to know more about why we did this, see the discussion at this [issue](https://github.com/ipfs/js-ipfs/issues/362).

You can learn more about pull-streams at:

- [The history of Node.js streams, nodebp April 2014](https://www.youtube.com/watch?v=g5ewQEuXjsQ)
- [The history of streams, 2016](http://dominictarr.com/post/145135293917/history-of-streams)
- [pull-streams, the simple streaming primitive](http://dominictarr.com/post/149248845122/pull-streams-pull-streams-are-a-very-simple)
- [pull-streams documentation](https://pull-stream.github.io/)

#### Converting `pull-streams` to Node.js Streams

If you are a Node.js streams user, you can convert a pull-stream to a Node.js stream using the module [`pull-stream-to-stream`](https://github.com/pull-stream/pull-stream-to-stream), giving you an instance of a Node.js stream that is linked to the pull-stream. For example:

```js
const pullToStream = require('pull-stream-to-stream')

const nodeStreamInstance = pullToStream(pullStreamInstance)
// nodeStreamInstance is an instance of a Node.js Stream
```

To learn more about this utility, visit https://pull-stream.github.io/#pull-stream-to-stream.

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