Add docs for Hyperswarm, HyperDHT, and existing projects summary

This commit is contained in:
root
2026-02-19 08:36:28 +00:00
parent 18773cecf2
commit 8e6e6868de
3 changed files with 110 additions and 0 deletions
+41
View File
@@ -0,0 +1,41 @@
# HyperDHT
## Overview
Distributed Hash Table with holepunching for NAT traversal.
**Key Features:**
- UDP holepunching
- Noise crypto
- Mutable/immutable records
- Bootstrap nodes
Links: [GitHub](https://github.com/holepunchto/hyperdht), [Docs](https://docs.pears.com/building-blocks/hyperdht)
## Architecture
```
mermaid
graph TD
A[DHT Node] --> B[Announce/Lookup]
B --> C[Relay Nodes]
C --> D[Holepunch]
D --> E[Noise Stream]
```
## API Highlights
```js
const dht = new DHT()
const server = dht.createServer()
await server.listen(keyPair)
const sock = dht.connect(publicKey)
```
## Dependencies
- dht-rpc
- hyperswarm-secret-stream
## Use Cases
- Peer discovery
- Serverless rendezvous
+49
View File
@@ -0,0 +1,49 @@
# Hyperswarm
## Overview
High-level P2P swarm API for topic-based peer discovery and connection.
**Key Features:**
- Automatic holepunching via HyperDHT
- Client/server modes
- E2E encrypted Noise streams
- Firewall support
Links: [GitHub](https://github.com/holepunchto/hyperswarm), [Docs](https://docs.pears.com/building-blocks/hyperswarm)
## Architecture
```
mermaid
graph LR
A[Join Topic] --> B[HyperDHT Announce/Lookup]
B --> C[Noise Holepunch]
C --> D[Duplex Stream]
D --> E[Connection Event]
```
## API Highlights
```js
const swarm = new Hyperswarm()
const topic = Buffer.alloc(32).fill('beepboop')
swarm.join(topic)
swarm.on('connection', (sock) => { ... })
```
Methods: join(topic), leave, flush, joinPeer
## Dependencies
- hyperdht (^6.21.0)
- streamx
- b4a
## Use Cases
- P2P file sharing
- Multiplayer games
- Chat rooms
## Limitations
- Relies on DHT bootstrap nodes