docs.waku.org/docs/Concepts/content-topics.md
Danish Arora 397be651dc
chore: refactor ordering/naming of markdown files (#29)
* chore: rename md files and use config ordering

it is unfeasible to track the changes in files labelled as '1.md', '2.md', etc and
way easier when the files are named after their contents.

* fix: hint box render

* fix: markdown links
2022-12-23 16:59:16 +05:30

1.1 KiB

title
Content Topic and How to Choose One

A content topic is used for content based filtering and allows you to filter out the messages that your dApp processes, both when receiving live messages (Relay or Filter) or retrieving historical messages (Store).

The recommended format for content topics is as follows:

/{dapp-name}/{version}/{content-topic-name}/{encoding}

  • dapp-name: The name of your dApp, it must be unique to avoid conflict with other dApps.
  • version: We usually start at 1, useful when introducing breaking changes in your messages.
  • content-topic-name: The actual content topic name to use for filtering. If your dApp uses Waku for several features, you should use a content topic per feature.
  • encoding: The encoding format of the message, Protobuf is most often used: proto.

For example: Your dApp's name is SuperCrypto, it enables users to receive notifications and send private messages. You may want to use the following content topics:

  • /supercrypto/1/notification/proto
  • /supercrypto/1/private-message/proto