ChainSafe / js-libp2p-gossipsub

TypeScript implementation of Gossipsub
Apache License 2.0
151 stars 43 forks source link

feat: add service capabilities and dependencies definition #497

Closed achingbrain closed 4 months ago

achingbrain commented 4 months ago

The latest libp2p release allows services to declare their capabilities (what they provide to the node) and their dependencies (the capabilities they require other services to provide for the config to be "valid").

Adds the serviceCapabilities symbol property that says Gossipsub provides the @libp2p/pubsub capability and also the serviceDependencies symbol property that says it depends on some service providing the @libp2p/identify capability - this is required because Gossipsub uses network topologies to discover peers which requires the Identify protocol.