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