📓HCS Topic Registry

You can now register private and public topics to the HCS topic registry for better search-ability.

Overview

The HCS Topic Registry introduces a standardized way to register Topic IDs on the Hedera network and detail the protocol (HCS-20, etc). This registry is public and allows for the indexed search of registered topics that are both private and public (with and without submitKeys).

Version 0.0.5 of the desktop app has the UI to register a new topic id to the network.

SCREEN SHOT

Registry Details

  • Public Topic ID for Registry: 0.0.4362300

  • New Command Introduced: register

register Command Syntax

To register a new topic, use the following JSON structure:

{
  "p": "hcs-20",
  "op": "register",
  "name": "YOUR_TOPIC_NAME",
  "metadata": "OPTIONAL_METADATA (HIP-412 compliant)",
  "private": BOOLEAN_VALUE,
  "t_id": "TOPIC_ID_TO_REGISTER",
  "m": "OPTIONAL_MEMO"
}

Fields Explanation

  • "p": Protocol, set to "hcs-20" or future protocol numbers.

  • "op": Operation type, set to "register" for registering a topic.

  • "name": Name of the topic, e.g., "H4NGRY".

  • "metadata": Metadata about the topic. Use HIP-412 compliant structure and host on a decentralized node solution ex: `ipfs://bafyreid745vrmonapq677deya5gbnw33zx7f4ijqmten4fmxy5oxnwte5q/metadata.json

  • "private": Boolean indicating if the topic is private (true) or public (false).

  • "topic_id": The unique identifier of the topic being registered, e.g., "0.0.123456".

  • "m": Optional memo field for any additional notes or descriptions.

Usage

  • For Public Topics: Set "private": false and provide the public topic_id.

  • For Private Topics: Set "private": true and ensure access control is properly configured.

  • name , metadata , m have a maximum character limit of 100 chars

Benefits

  • Search-ability: Topics registered in this registry will be easier to index and will be searchable, enhancing discoverability.

  • Standardization: Provides a uniform method for registering and managing topics on the HCS-20 standard.

  • Transparency: Facilitates transparency in topic management, especially for public topics.

Validation for register Command Attributes

1. Protocol (p)

  • Type: String

  • Requirement: Required

  • Validation: Must be 'hcs-20' or future protocol numbers, case insensitive.

2. Operation Type (op)

  • Type: String

  • Requirement: Required

  • Validation: Must be 'register', case insensitive.

3. Name (name)

  • Type: String

  • Requirement: Required

  • Validation: Must be a non-empty string. Maximum length is 100 characters.

4. Metadata (metadata)

  • Type: String (URL)

  • Requirement: Optional

  • Validation: If provided, it must be a valid URL. Recommended to be HIP-412 compliant and hosted on a decentralized node solution (e.g., IPFS). Maximum length is 100 characters.

5. Privacy Setting (private)

  • Type: Boolean

  • Requirement: Required

  • Validation: Must be either true or false. A true value indicates a private topic, while false indicates a public topic.

6. Topic ID (t_id)

  • Type: String

  • Requirement: Required

  • Validation: Must match the Hedera account ID format. Regular expression used for validation: ^(0|(?:[1-9]\d*))\.(0|(?:[1-9]\d*))\.(0|(?:[1-9]\d*))$.

7. Memo (m)

  • Type: String

  • Requirement: Optional

  • Validation: Any string value is accepted. Meant to add descriptions. Maximum length is 500 characters.

Additional Notes

  • For Public Topics: Set "private": false and provide the public topic_id.

  • For Private Topics: Set "private": true and ensure that access control is properly configured.


Last updated