Class TopicInfo

java.lang.Object
com.hedera.hashgraph.sdk.TopicInfo

public final class TopicInfo extends Object
Current state of a topic.
  • Field Details

    • topicId

      public final TopicId topicId
      The ID of the topic for which information is requested.
    • topicMemo

      public final String topicMemo
      Short publicly visible memo about the topic. No guarantee of uniqueness.
    • runningHash

      public final com.google.protobuf.ByteString runningHash
      SHA-384 running hash of (previousRunningHash, topicId, consensusTimestamp, sequenceNumber, message).
    • sequenceNumber

      public final long sequenceNumber
      Sequence number (starting at 1 for the first submitMessage) of messages on the topic.
    • expirationTime

      public final Instant expirationTime
      Effective consensus timestamp at (and after) which submitMessage calls will no longer succeed on the topic.
    • adminKey

      @Nullable public final Key adminKey
      Access control for update/delete of the topic. Null if there is no key.
    • submitKey

      @Nullable public final Key submitKey
      Access control for ConsensusService.submitMessage. Null if there is no key.
    • autoRenewPeriod

      public final Duration autoRenewPeriod
      If an auto-renew account is specified, when the topic expires, its lifetime will be extended by up to this duration (depending on the solvency of the auto-renew account). If the auto-renew account has no funds at all, the topic will be deleted instead.
    • autoRenewAccountId

      @Nullable public final AccountId autoRenewAccountId
      The account, if any, to charge for automatic renewal of the topic's lifetime upon expiry.
    • ledgerId

      public final LedgerId ledgerId
      The ledger ID the response was returned from; please see HIP-198 for the network-specific IDs.
    • feeScheduleKey

      public final Key feeScheduleKey
    • feeExemptKeys

      public final List<Key> feeExemptKeys
    • customFees

      public final List<CustomFixedFee> customFees
  • Method Details

    • fromProtobuf

      static TopicInfo fromProtobuf(ConsensusGetTopicInfoResponse topicInfoResponse)
      Create a topic info object from a protobuf.
      Parameters:
      topicInfoResponse - the protobuf
      Returns:
      the new topic info object
    • fromBytes

      public static TopicInfo fromBytes(byte[] bytes) throws com.google.protobuf.InvalidProtocolBufferException
      Create a topic info object from a byte array.
      Parameters:
      bytes - the byte array
      Returns:
      the new topic info object
      Throws:
      com.google.protobuf.InvalidProtocolBufferException - when there is an issue with the protobuf
    • toProtobuf

      Create the protobuf.
      Returns:
      the protobuf representation
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • toBytes

      public byte[] toBytes()
      Create the byte array.
      Returns:
      the byte array representation