Files
modules/network-discovery/hyper-p2p-topic-announcer
2026-05-20 22:56:32 -04:00
..
2026-05-20 22:56:32 -04:00
2026-05-20 22:56:32 -04:00
2026-05-20 22:56:32 -04:00
2026-05-20 21:19:52 -04:00
2026-05-20 22:56:32 -04:00
2026-05-20 21:57:50 -04:00
2026-05-20 21:57:50 -04:00
2026-05-20 22:56:32 -04:00

hyper-p2p-topic-announcer

Gossip topic announcements over a shared Hyperswarm topic.

Category: network-discovery

Composes with: hyper-p2p-presence

Protocol: topic-announcer/v1

When to use

Apps that publish which logical topics they host and need peers to discover those announcements on a shared swarm topic.

When not to use

Static topic lists baked into config, or apps with no P2P topic (skip ready() and use local-only announce/revoke).

Quick start

const { HyperP2PTopicAnnouncer } = require('hyper-p2p-topic-announcer')
const topic = process.argv[2]
const mod = new HyperP2PTopicAnnouncer({ topic })
await mod.ready()
mod.announce('my-app-v1', { region: 'eu' })
console.log(mod.list())
await mod.close()

Docs

Test

npm install && npm test