Show / Hide Table of Contents

Class SubmitLargeMessageExtension

Extends the client functionality to include the orcestration of sending a large segmented consensus message.

Inheritance
Object
SubmitLargeMessageExtension
Inherited Members
Object.Equals(Object)
Object.Equals(Object, Object)
Object.GetHashCode()
Object.GetType()
Object.MemberwiseClone()
Object.ReferenceEquals(Object, Object)
Object.ToString()
Namespace: Hashgraph.Extensions
Assembly: Hashgraph.dll
Syntax
public static class SubmitLargeMessageExtension

Methods

| Improve this Doc View Source

SubmitLargeMessageAsync(Client, Address, ReadOnlyMemory<Byte>, Int32, Signatory, Action<IContext>)

Sends an HCS message of arbitrary size to the network by breaking the message into segments, submitting each segment in sequence. Manages the segment metadata internally, returning an array of receipts representing the transactions required to upload the entier message.

Declaration
public static async Task<SubmitMessageReceipt[]> SubmitLargeMessageAsync(this Client client, Address topic, ReadOnlyMemory<byte> message, int segmentSize, Signatory signatory = null, Action<IContext> configure = null)
Parameters
Type Name Description
Client client

A Hashgraph Client instance.

Address topic

The address of the topic for the message.

ReadOnlyMemory<Byte> message

The value of the message, may exceed the network limit size.

Int32 segmentSize

The maximum size of each segment. Must be under the current allowed size for transactions currently supported by the network. The method will break the message into as many segments as necessary to fulfill uploading the entire message.

Signatory signatory

The signatory containing any additional private keys or callbacks to meet the key signing requirements for participants.

Action<IContext> configure

Optional callback method providing an opportunity to modify the execution configuration for just this method call. It is executed prior to submitting the request to the network.

Returns
Type Description
Task<SubmitMessageReceipt[]>

An array of Submit Message Receipts indicating success, one for each segment uploaded. The Transaction ID of the first receipt matches the correlation transaction ID for the series of message segments as a whole.

Exceptions
Type Condition
ArgumentOutOfRangeException

If required arguments are missing.

InvalidOperationException

If required context configuration is missing.

PrecheckException

If the gateway node create rejected the request upon submission.

ConsensusException

If the network was unable to come to consensus before the duration of the transaction expired.

TransactionException

If the network rejected the create request as invalid or had missing data.

  • Improve this Doc
  • View Source
In This Article
Back to top .NET Client Library for Hedera Hashgraph