/** * # Topic Information * Query response describing a topic of the Hedera Consensus Service (HCS). * * ### Keywords * The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", * "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this * document are to be interpreted as described in * [RFC2119](https://www.ietf.org/rfc/rfc2119) and clarified in * [RFC8174](https://www.ietf.org/rfc/rfc8174). */ syntax = "proto3"; package proto; /* * Copyright (C) 2018-2024 Hedera Hashgraph, LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ option java_package = "com.hederahashgraph.api.proto.java"; // <<>> This comment is special code for setting PBJ Compiler java package option java_multiple_files = true; import "basic_types.proto"; import "custom_fees.proto"; import "duration.proto"; import "timestamp.proto"; /** * A query response describing the current state of a topic for the Hedera * Consensus Service (HCS). */ message ConsensusTopicInfo { /** * A short description of this topic. *

* This value, if set, MUST NOT exceed `transaction.maxMemoUtf8Bytes` * (default 100) bytes when encoded as UTF-8. */ string memo = 1; /** * The latest running hash of the topic. *

* This 48-byte field is the output of a SHA-384 digest with input * data determined by the current version of the running hash algorithm * used by the network.
* All new transactions SHALL use algorithm version `3`.
* The bytes of each uint64 or uint32 encoded for the hash input * MUST be in Big-Endian format. *

*


* If the algorithm version is '3', then the input data to the * SHA-384 digest are, in order: *
    *
  1. The previous running hash of the topic (48 bytes)
  2. *
  3. The `topicRunningHashVersion` (8 bytes)
  4. *
  5. The payer account's shard (8 bytes)
  6. *
  7. The payer account's realm (8 bytes)
  8. *
  9. The payer account's number (8 bytes)
  10. *
  11. The topic's shard (8 bytes)
  12. *
  13. The topic's realm (8 bytes)
  14. *
  15. The topic's number (8 bytes)
  16. *
  17. The number of seconds since the epoch when the * `ConsensusSubmitMessage` reached consensus (8 bytes)
  18. *
  19. The number of nanoseconds within the second when the * `ConsensusSubmitMessage` reached consensus (4 bytes)
  20. *
  21. The `topicSequenceNumber` (8 bytes)
  22. *
  23. The output of a SHA-384 digest of the message bytes from the * `ConsensusSubmitMessage` (48 bytes)
  24. *
*/ bytes runningHash = 2; /** * A current sequence number (starting at 1 for the first message) * for messages on this topic. */ uint64 sequenceNumber = 3; /** * An expiration time for this topic, in seconds since the epoch. *

* For this purpose, `epoch` SHALL be the UNIX epoch * with 0 at `1970-01-01T00:00:00.000Z`. */ Timestamp expirationTime = 4; /** * A key that MUST sign any transaction to update or delete this topic. *

* If this value is not set (null) then the topic CANNOT be deleted, * modified, or updated. */ Key adminKey = 5; /** * A key that MUST sign any transaction to submit a message to this topic. *

* If this value is not set (null) then any account MAY submit messages to * this topic. */ Key submitKey = 6; /** * A duration, in seconds, to extend the `expirationTime` value when * this topic is automatically renewed. *

* If the `autoRenewAccount` value for this topic is set to a valid account * with sufficient HBAR balance to pay renewal fees when this topic * expires, the system SHALL automatically renew this topic, extending the * `expirationTime` value by the number of seconds described here.
* If, however, the `autoRenewAccount` lacks sufficient HBAR balance * to pay renewal fees when this topic expires, this topic SHALL be * deleted after the time period specified in the `AUTORENEW_GRACE_PERIOD` * configuration value. */ Duration autoRenewPeriod = 7; /** * An account that is designated to pay automatic renewal fees. *

* If this value is a valid account ID when this topic expires, * this account SHALL be charged the renewal fees for this topic, * if it holds sufficient HBAR balance. If the account does not hold * sufficient HBAR balance to pay renewal fees when necessary, then * this topic SHALL be deleted.
* If this value is not set (null), or is not a valid account ID, when * this topic expires, then this topic SHALL be deleted after the time * period specified in the `AUTORENEW_GRACE_PERIOD` configuration value. */ AccountID autoRenewAccount = 8; /** * A ledger ID of the network that generated this response. *

* This value SHALL identify the distributed ledger that responded to * this query. */ bytes ledger_id = 9; /** * Access control for update/delete of custom fees. *

* If unset, custom fees CANNOT be set for this topic.
* If not set when the topic is created, this field CANNOT be set via * update.
* If set when the topic is created, this field MAY be changed via update. */ Key fee_schedule_key = 10; /** * A set of keys.
* Keys in this list are permitted to submit messages to this topic without * paying custom fees associated with this topic. *

* If a topic submit message is signed by _any_ key included in this set, * custom fees SHALL NOT be charged for that transaction.
* `fee_exempt_key_list` MAY contain keys for accounts that are inactive, * deleted, or non-existent.
* If not set, there SHALL NOT be any fee-exempt keys. In particular, the * following keys SHALL NOT be implicitly or automatically added to this * list: `adminKey`, `submitKey`, `fee_schedule_key`. * A `fee_exempt_key_list` MUST NOT contain more than * `MAX_ENTRIES_FOR_FEE_EXEMPT_KEY_LIST` keys. * A `fee_exempt_key_list` MUST NOT contain any duplicate keys. */ repeated Key fee_exempt_key_list = 11; /** * A set of custom fee definitions.
* These are fees to be assessed for each submit to this topic. *

* Each fee defined in this set SHALL be evaluated for * each message submitted to this topic, and the resultant * total assessed fees SHALL be charged.
* Custom fees defined here SHALL be assessed in addition to the base * network and node fees. */ repeated FixedCustomFee custom_fees = 12; }