internal ConsensusSubmitMessageTransactionBody(Hashgraph.Address topic, ReadOnlyMemory <byte> message, bool isSegment, Hashgraph.TxId?parentTx, int segmentIndex, int segmentTotalCount) : this()
 {
     if (message.IsEmpty)
     {
         throw new ArgumentOutOfRangeException(nameof(message), "Topic Message can not be empty.");
     }
     TopicID   = new TopicID(topic);
     Message   = ByteString.CopyFrom(message.Span);
     ChunkInfo = isSegment ? createChunkInfo(parentTx, segmentIndex, segmentTotalCount) : null;
Example #2
0
 internal ConsensusUpdateTopicTransactionBody(UpdateTopicParams updateParameters) : this()
 {
     TopicID = new TopicID(updateParameters.Topic); if (updateParameters is null)
     {
         throw new ArgumentNullException(nameof(updateParameters), "Topic Update Parameters argument is missing. Please check that it is not null.");
     }
     if (updateParameters.Topic is null)
     {
         throw new ArgumentNullException(nameof(updateParameters.Topic), "Topic address is missing. Please check that it is not null.");
     }
     if (updateParameters.Memo is null &&
         updateParameters.Administrator is null &&
         updateParameters.Participant is null &&
         updateParameters.RenewPeriod is null &&
         updateParameters.RenewAccount is null)
     {
         throw new ArgumentException("The Topic Updates contain no update properties, it is blank.", nameof(updateParameters));
     }
     if (updateParameters.Memo != null)
     {
         Memo = updateParameters.Memo;
     }
     if (!(updateParameters.Administrator is null))
     {
         AdminKey = new Key(updateParameters.Administrator);
     }
     if (!(updateParameters.Participant is null))
     {
         SubmitKey = new Key(updateParameters.Participant);
     }
     if (updateParameters.RenewPeriod.HasValue)
     {
         AutoRenewPeriod = new Duration(updateParameters.RenewPeriod.Value);
     }
     if (!(updateParameters.RenewAccount is null))
     {
         AutoRenewAccount = new AccountID(updateParameters.RenewAccount);
     }
 }
Example #3
0
 internal ConsensusGetTopicInfoQuery(Address topic) : this()
 {
     TopicID = new TopicID(topic);
 }
Example #4
0
 internal CreateTopicReceipt FillProperties(TransactionID transactionId, CreateTopicReceipt receipt)
 {
     FillCommonProperties(transactionId, receipt);
     receipt.Topic = TopicID.ToAddress();
     return(receipt);
 }
Example #5
0
 internal ConsensusDeleteTopicTransactionBody(Address topic) : this()
 {
     TopicID = new TopicID(topic);
 }