Take a look at pubsub on IPFS | IPFS Blog & News

We recently merged a simple, experimental pubsub implementation into IPFS. This implementation is just a beginning. It is far from the performance and security goals we will achieve in our long-term target. However, even this early implementation opens the doors to several useful and interesting new applications.


This is a companion discussion topic for the original entry at https://blog.ipfs.io/25-pubsub/

Will pubsub ever get custom validation hooks, rather than just keys on who can write to the topic. This way you could have more complex systems run on pubsub, with finer-grained control over what the protocols allow.

await libp2p.services.pubsub.registerTopicValidator(
  'my-topic',
  msg => function(){
     return signature_matches(msg) && validtimestamp(msg) // etc
  }
)

This would make it easier to prevent spam on public pubsubs, where anyone can write.