Create a topic
A transaction that creates a new topic recognized by the Hedera network. The newly generated topic can be referenced by its topicId
. The topicId
is used to identify a unique topic to submit messages to. You can obtain the new topic ID by requesting the receipt of the transaction. All messages within a topic are sequenced with respect to one another and are provided a unique sequence number.
Private topic
You can also create a private topic where only authorized parties can submit messages to that topic. To create a private topic you would need to set the submitKey
property of the transaction. The submitKey
value is then shared with the authorized parties and is required to successfully submit messages to the private topic.
Topic Properties
Field | Description |
---|---|
Admin Key | Access control for updateTopic/deleteTopic. Anyone can increase the topic's expirationTime regardless of the adminKey. If no adminKey is specified, updateTopic may only be used to extend the topic's expirationTime, and deleteTopic is disallowed. |
Submit Key | Access control for submitMessage. If unspecified, no access control is performed to submit messages (all submissions are allowed). |
Topic Memo | Set a short publicly visible memo on the new topic and is stored with the topic. (100 bytes) |
Auto Renew Account | Optional account to be used at the topic's expirationTime to extend the life of the topic (once autoRenew functionality is supported by HAPI). The topic lifetime will be extended up to a maximum of the autoRenewPeriod or however long the topic can be extended using all funds on the account (whichever is the smaller duration/amount and if any extension is possible with the account's funds). |
Auto Renew Period | The initial lifetime of the topic and the amount of time to attempt to extend the topic's lifetime by automatically at the topic's expirationTime, if the autoRenewAccount is configured (once autoRenew functionality is supported by HAPI). |
Transaction Signing Requirements:
If an admin key is specified, the admin key must sign the transaction
If not admin key is specified the topic is immutable
If an auto renew account is specified, that account must also sign this transaction
Transaction Fees
Please see the transaction and query fees table for base transaction fee
Please use the Hedera fee estimator to estimate your transaction fee cost
Constructor | Description |
---|---|
| Initializes the ConsensusTopicCreateTransaction object |
Methods
Method | Type | Requirements |
---|---|---|
| PublicKey | Optional |
| PublicKey | Optional |
| String | Optional |
| AccountId | Optional |
| Duration | Optional |
Get transaction values
Method | Type | Requirements |
---|---|---|
| Key | Optional |
| Key | Optional |
| String | Optional |
| AccountId | Disabled |
| Duration | Disabled |
Last updated