This commit is contained in:
Raven Scott
2026-05-20 22:56:32 -04:00
parent b8c335adee
commit dd384eb944
321 changed files with 7484 additions and 3793 deletions
@@ -1,23 +1,26 @@
# hyper-p2p-encrypted-topic API
# API: hyper-p2p-encrypted-topic
**Status:** scaffold · **Protocol:** `encrypted-topic/v1`
**Protocol:** `encrypted-topic/v1` · **Export:** `HyperP2PEncryptedTopic`
## Class `HyperP2PEncryptedTopic`
## Methods
Scaffold stub — methods throw `not implemented: scaffold` until promoted to production tier.
### `registerTopic(...)`
### `constructor(opts?)`
Domain API.
### `getStats()`
### `encryptPayload(...)`
Returns `{ created, errors, protocol, tier: 'scaffold' }`.
Domain API.
### `ready()`
### `decryptPayload(...)`
Resolves immediately (no-op).
Domain API.
## Wire (planned)
| Message | Direction | Notes |
|---------|-----------|-------|
| TBD | gossip | Defined in implementation pass |
### `getStats()` / `ready()` / `close()`
Lifecycle helpers.
## P2P
Joins Hyperswarm when `topic` is set.
@@ -1,15 +1,11 @@
# hyper-p2p-encrypted-topic architecture
# Architecture: hyper-p2p-encrypted-topic
**Tier:** scaffold · **Category:** `trust-security`
## Wire messages
## Role
| type | fields | direction | behavior |
|------|--------|-----------|----------|
| `topic-register` | topicId, keyHint | gossip | Register |
Encrypted topic wrapper.
## State
## Composition
Uses `../../_shared/p2p-bare.js` for Hyperswarm + Protomux when implemented. Does **not** duplicate Holepunch core storage/transport.
## Holepunch boundary
Inspiration: n/a
In-memory structures; gossip via `initModuleSwarm` / `gossipSend` when P2P enabled.