Files
modules/network-transport/hyper-p2p-noise-session-wrap
2026-05-20 22:56:32 -04:00
..
2026-05-20 22:56:32 -04:00
2026-05-20 22:56:32 -04:00
2026-05-20 22:56:32 -04:00
2026-05-20 21:19:52 -04:00
2026-05-20 22:56:32 -04:00
2026-05-20 21:57:50 -04:00
2026-05-20 21:57:50 -04:00
2026-05-20 22:56:32 -04:00

hyper-p2p-noise-session-wrap

Local Noise session registry with optional gossip of open/close events.

Category: network-transport

Protocol: noise-session-wrap/v1

When to use

  • Track active Noise handshakes and session metadata in one process.
  • Coordinate session lifecycle across peers on a shared topic.

When not to use

  • You need the actual Noise crypto (use @hyperswarm/secret-stream / hyper-p2p-secret-stream-pair).
  • Sessions must persist across restarts (add external storage).

Quick start

const { HyperP2PNoiseSessionWrap } = require('hyper-p2p-noise-session-wrap')
const mod = new HyperP2PNoiseSessionWrap()
const s = mod.createSession({ remotePublicKey: 'abc123' })
console.log(mod.getSession(s.id))
mod.closeSession(s.id)
await mod.close()

Docs

Test

npm install && npm test