Updates
This commit is contained in:
@@ -1,23 +1,33 @@
|
||||
# hyper-p2p-peer-bootstrap-store API
|
||||
# API: hyper-p2p-peer-bootstrap-store
|
||||
|
||||
**Status:** scaffold · **Protocol:** `peer-bootstrap-store/v1`
|
||||
**Protocol:** `peer-bootstrap-store/v1`
|
||||
|
||||
## Class `HyperP2PPeerBootstrapStore`
|
||||
**Export:** `HyperP2PPeerBootstrapStore`
|
||||
|
||||
Scaffold stub — methods throw `not implemented: scaffold` until promoted to production tier.
|
||||
## Methods
|
||||
|
||||
### `constructor(opts?)`
|
||||
### `addBootstrap(peerId, hints = {})`
|
||||
|
||||
### `getStats()`
|
||||
- **Returns:** `{ peerId, hints, from, at }`
|
||||
|
||||
Returns `{ created, errors, protocol, tier: 'scaffold' }`.
|
||||
### `getBootstrap(peerId)`
|
||||
|
||||
### `ready()`
|
||||
- **Returns:** entry or `null`
|
||||
|
||||
Resolves immediately (no-op).
|
||||
### `allBootstraps()`
|
||||
|
||||
## Wire (planned)
|
||||
- **Returns:** `Array<entry>`
|
||||
|
||||
| Message | Direction | Notes |
|
||||
|---------|-----------|-------|
|
||||
| TBD | gossip | Defined in implementation pass |
|
||||
## Events
|
||||
|
||||
| Event | Payload |
|
||||
|-------|---------|
|
||||
| `add` | local entry |
|
||||
| `remote-add` | remote entry |
|
||||
| `closed` | — |
|
||||
|
||||
## Testing
|
||||
|
||||
```bash
|
||||
npm install && npm test
|
||||
```
|
||||
|
||||
@@ -1,15 +1,17 @@
|
||||
# hyper-p2p-peer-bootstrap-store architecture
|
||||
# Architecture: hyper-p2p-peer-bootstrap-store
|
||||
|
||||
**Tier:** scaffold · **Category:** `network-discovery`
|
||||
**Category:** network-discovery
|
||||
|
||||
## Role
|
||||
## Wire messages
|
||||
|
||||
Bootstrap peer store.
|
||||
| type | fields | direction | behavior |
|
||||
|------|--------|-----------|----------|
|
||||
| `bootstrap-add` | `peerId`, `hints`, `from`, `at` | gossip | LWW upsert per `peerId` |
|
||||
|
||||
## State model
|
||||
|
||||
- `_bootstraps`: `Map<peerId, entry>`
|
||||
|
||||
## Composition
|
||||
|
||||
Uses `../../_shared/p2p-bare.js` for Hyperswarm + Protomux when implemented. Does **not** duplicate Holepunch core storage/transport.
|
||||
|
||||
## Holepunch boundary
|
||||
|
||||
Inspiration: n/a
|
||||
Replicates dial hints across a gossip mesh topic.
|
||||
|
||||
Reference in New Issue
Block a user