Polkadot Apps
    Preparing search index...
    • Create a 32-byte topic hash from a human-readable string.

      Uses blake2b-256 to hash the UTF-8 encoded string into a deterministic 32-byte topic identifier. Statements are tagged with topics so subscribers can filter efficiently on the network.

      Parameters

      • name: string

        A human-readable topic name (e.g., "ss-webrtc", "my-app").

      Returns TopicHash

      A branded 32-byte topic hash.

      const topic = createTopic("ss-webrtc");
      // Use in subscriptions and publish options