# hyperpunch

> new holepuncher

Latest version **0.0.6** (published 2021-04-15) · MIT license · 0 weekly downloads

## Install

```sh
npm install hyperpunch
pnpm add hyperpunch
yarn add hyperpunch
bun add hyperpunch
```

Provides the command `hyperpunch`.

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.6 |
| Published | 2021-04-15 |
| First published | 2021-04-06 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 7 |
| Unpacked size | 47.1 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Mathias Buus |
| Maintainers | mafintosh |

## Links

- npm: https://www.npmjs.com/package/hyperpunch
- npm.io page: https://npm.io/package/hyperpunch

## Dependencies (7)

- [utp-native](https://npm.io/package/utp-native.md) ^2.4.0
- [noise-protocol](https://npm.io/package/noise-protocol.md) ^3.0.1
- [signal-promise](https://npm.io/package/signal-promise.md) ^1.0.3
- [compact-encoding](https://npm.io/package/compact-encoding.md) ^2.1.0
- [sodium-universal](https://npm.io/package/sodium-universal.md) ^3.0.4
- [noise-secret-stream](https://npm.io/package/noise-secret-stream.md) ^2.0.1
- [sodium-secretstream](https://npm.io/package/sodium-secretstream.md) ^1.0.0

## Recent versions

- 0.0.6 (latest) — 2021-04-15
- 0.0.5 — 2021-04-07
- 0.0.4 — 2021-04-07
- 0.0.3 — 2021-04-07
- 0.0.2 — 2021-04-06
- 0.0.1 — 2021-04-06
- 0.0.0 — 2021-04-06

## README

# hyperpunch

Note, that the API is still under development so subject to changes

``` js
const { Client } = require('hyperpunch')

const c = new Client([
  'bootstrap1.hyperdht.org',
  'bootstrap2.hyperdht.org'
])

// to join the swarm and accept connections on a public key:
await c.join(keyPair)

c.on('connection', function (noiseStream) {
  // emitted when a new connection is accepted
  // noiseStream is a NoiseSecretStream instance
})

// to connect to a public key to
const noiseStream = c.connect(publicKey, localKeyPair)

noiseStream.on('open', function () {
  console.log('stream is fully open')
})

noiseStream.write(Buffer.from('hello world'))
```

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