This commit is contained in:
Raven Scott
2026-05-20 23:10:07 -04:00
parent dd384eb944
commit a2e7da7b5b
17 changed files with 391 additions and 15 deletions
@@ -1,28 +1,36 @@
# hyper-p2p-secret-stream-pair
**Status:** scaffold (`0.0.0-scaffold`) · **Protocol:** `secret-stream-pair/v1` · **Wave:** 8
In-process `@hyperswarm/secret-stream` pair for tests, RPC harnesses, and session-bridge handoff.
In-process SecretStream pair helper.
**Category:** Network transport
## Holepunch references (inspiration only)
**Composes with:** `hyper-p2p-session-bridge`, `hyper-p2p-rpc`
- `hyperswarm-secret-stream`
**Protocol:** `secret-stream-pair/v1`
> This module composes on Hyperswarm/Hypercore — it does **not** re-implement upstream packages.
## When to use
## Composes with
Local integration tests or tooling that need a connected encrypted stream pair without the public DHT.
- `hyper-p2p-session-bridge`
## When not to use
## Planned API
Production WAN transport (use Hyperswarm discovery + live connections instead).
- `constructor(opts)` — topic, optional keyPair
- `getStats()` — scaffold counters
- `ready()` — no-op until implemented
- Domain methods — throw `not implemented: scaffold` until Wave 8+ pass
## Quick start
## Layout
```js
const { createPair } = require('hyper-p2p-secret-stream-pair')
const { initiator, responder } = await createPair().open()
// use initiator / responder as duplex streams
```
`modules/network-transport/hyper-p2p-secret-stream-pair/`
## Docs
See [`modules/_shared/MODULE_SYSTEM.md`](../../_shared/MODULE_SYSTEM.md).
- [docs/api.md](docs/api.md)
- [docs/architecture.md](docs/architecture.md)
## Test
```bash
npm install && npm test
```