# hyper-p2p-autobase-fork-choice Registers Autobase view forks over gossip and picks the best by weight/version; align with `hyper-p2p-causal-consensus` for writer ordering. Hyperswarm gossip when `topic` is set. **Category:** Storage (Autobase) **Composes with:** `hyper-p2p-causal-consensus` **Protocol:** `autobase-fork-choice/v1` ## When to use Multiple Autobase views compete and peers must converge on one fork id. ## When not to use Single linear Autobase with no fork hints. ## Quick start ```js const { HyperP2PAutobaseForkChoice } = require('hyper-p2p-autobase-fork-choice') const topic = process.argv[2] // 64-char hex or string const mod = new HyperP2PAutobaseForkChoice({ topic }) await mod.ready() // joins swarm when topic set // ... application logic ... await mod.close() ``` ## Docs - [docs/api.md](docs/api.md) — constructor, methods, events, errors - [docs/architecture.md](docs/architecture.md) — wire types, state, composition - [../_shared/PRODUCTION.md](../../_shared/PRODUCTION.md) — production checklist - [../_shared/DOC_STANDARDS.md](../../_shared/DOC_STANDARDS.md) — documentation standards ## Test ```bash npm install && npm test ```