Documentation ¶
Index ¶
- Variables
- type Topic
- func (*Topic) Descriptor() ([]byte, []int)deprecated
- func (x *Topic) GetAdminKey() *services.Key
- func (x *Topic) GetAutoRenewAccountNumber() int64
- func (x *Topic) GetAutoRenewPeriod() int64
- func (x *Topic) GetDeleted() bool
- func (x *Topic) GetExpiry() int64
- func (x *Topic) GetMemo() string
- func (x *Topic) GetRunningHash() []byte
- func (x *Topic) GetSequenceNumber() int64
- func (x *Topic) GetSubmitKey() *services.Key
- func (x *Topic) GetTopicNumber() int64
- func (*Topic) ProtoMessage()
- func (x *Topic) ProtoReflect() protoreflect.Message
- func (x *Topic) Reset()
- func (x *Topic) String() string
Constants ¶
This section is empty.
Variables ¶
View Source
var File_state_consensus_topic_proto protoreflect.FileDescriptor
Functions ¶
This section is empty.
Types ¶
type Topic ¶
type Topic struct { // * // The topic's unique entity number in the Merkle state. TopicNumber int64 `protobuf:"varint,1,opt,name=topic_number,json=topicNumber,proto3" json:"topic_number,omitempty"` // * // The number of messages sent to the topic. SequenceNumber int64 `protobuf:"varint,2,opt,name=sequence_number,json=sequenceNumber,proto3" json:"sequence_number,omitempty"` // * // The topic's consensus expiration time in seconds since the epoch. Expiry int64 `protobuf:"varint,3,opt,name=expiry,proto3" json:"expiry,omitempty"` // * // The number of seconds for which the topic will be automatically renewed // upon expiring (if it has a valid auto-renew account). AutoRenewPeriod int64 `protobuf:"varint,4,opt,name=auto_renew_period,json=autoRenewPeriod,proto3" json:"auto_renew_period,omitempty"` // * // The number of the account (if any) that the network will attempt to charge for the // topic's auto-renewal upon expiration. AutoRenewAccountNumber int64 `` /* 132-byte string literal not displayed */ // * // Whether this topic is deleted. Deleted bool `protobuf:"varint,6,opt,name=deleted,proto3" json:"deleted,omitempty"` // * // When a topic is created, its running hash is initialized to 48 bytes of binary zeros. // For each submitted message, the topic's running hash is then updated to the output // of a particular SHA-384 digest whose input data include the previous running hash. // // See the TransactionReceipt.proto documentation for an exact description of the // data included in the SHA-384 digest used for the update. RunningHash []byte `protobuf:"bytes,7,opt,name=running_hash,json=runningHash,proto3" json:"running_hash,omitempty"` // * // An optional description of the topic with UTF-8 encoding up to 100 bytes. Memo string `protobuf:"bytes,8,opt,name=memo,proto3" json:"memo,omitempty"` // * // If present, enforces access control for updating or deleting the topic. // A topic without an admin key is immutable. AdminKey *services.Key `protobuf:"bytes,9,opt,name=admin_key,json=adminKey,proto3" json:"admin_key,omitempty"` // * // If present, enforces access control for message submission to the topic. SubmitKey *services.Key `protobuf:"bytes,10,opt,name=submit_key,json=submitKey,proto3" json:"submit_key,omitempty"` // contains filtered or unexported fields }
* First-draft representation of a Hedera Consensus Service topic in the network Merkle tree.
As with all network entities, a topic has a unique entity number, which is usually given along with the network's shard and realm in the form of a shard.realm.number id.
A topic consists of just two pieces of data:
- The total number of messages sent to the topic; and,
- The running hash of all those messages.
It also has several metadata elements:
- A consensus expiration time in seconds since the epoch.
- (Optional) The number of an auto-renew account, in the same shard and realm as the topic, that has signed a transaction allowing the network to use its balance to automatically extend the topic's expiration time when it passes.
- The number of seconds the network should automatically extend the topic's expiration by, if the topic has a valid auto-renew account, and is not deleted upon expiration.
- A boolean marking if the topic has been deleted.
- A memo string whose UTF-8 encoding is at most 100 bytes.
- (Optional) An admin key whose signature must be active for the topic's metadata to be updated.
- (Optional) A submit key whose signature must be active for the topic to receive a message.
func (*Topic) Descriptor
deprecated
func (*Topic) GetAdminKey ¶
func (*Topic) GetAutoRenewAccountNumber ¶
func (*Topic) GetAutoRenewPeriod ¶
func (*Topic) GetDeleted ¶
func (*Topic) GetRunningHash ¶
func (*Topic) GetSequenceNumber ¶
func (*Topic) GetSubmitKey ¶
func (*Topic) GetTopicNumber ¶
func (*Topic) ProtoMessage ¶
func (*Topic) ProtoMessage()
func (*Topic) ProtoReflect ¶
func (x *Topic) ProtoReflect() protoreflect.Message
Click to show internal directories.
Click to hide internal directories.