Show / Hide Table of Contents

Class BatchedTransactionParams

Submits a batch of transactions to the network for processing.

Inheritance
object
BatchedTransactionParams
Inherited Members
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.ReferenceEquals(object, object)
object.ToString()
Namespace: Hiero
Assembly: Hiero.dll
Syntax
public sealed class BatchedTransactionParams
Examples

Atomically execute a mix of transactions — either every inner transaction succeeds or the whole batch reverts:

// Atomic batch: every inner transaction either all succeeds or all
// fails. Pass any combination of TransactionParams subclasses. The
// batch is signed by every inner transaction's signatory plus the
// batch-level Signatory if set.
var receipt = await client.ExecuteAsync(new BatchedTransactionParams
{
    TransactionParams = new TransactionParams[]
    {
        new TransferParams
        {
            CryptoTransfers = new[]
            {
                new CryptoTransfer(sender1, -100_000_000),
                new CryptoTransfer(receiver, 100_000_000)
            }
        },
        new TransferParams
        {
            CryptoTransfers = new[]
            {
                new CryptoTransfer(sender2, -50_000_000),
                new CryptoTransfer(receiver, 50_000_000)
            }
        }
    }
});
Console.WriteLine($"Batch status: {receipt.Status}");

Properties

| Edit this page View Source

CancellationToken

Optional Cancellation token that interrupts the transaction submission process.

Declaration
public CancellationToken? CancellationToken { get; set; }
Property Value
Type Description
CancellationToken?
| Edit this page View Source

Endorsement

Optional explicit endorsement to be applied to the batch of transactions if not specified individually by each inner transaction. If not specified by either the batch transaction entry or this property, the default endorsement will be used, which match the signatories of the client's context.

Declaration
public Endorsement? Endorsement { get; set; }
Property Value
Type Description
Endorsement
| Edit this page View Source

Signatory

Additional private key, keys or signing callback method, particularly useful if setting the endorsement different from the payer's endorsement.

Declaration
public Signatory? Signatory { get; set; }
Property Value
Type Description
Signatory
| Edit this page View Source

TransactionParams

The list of individual transaction parameters to include in the batch.

Declaration
public IReadOnlyList<TransactionParams> TransactionParams { get; set; }
Property Value
Type Description
IReadOnlyList<TransactionParams>
  • Edit this page
  • View Source
In this article
Back to top .NET Client Library for Hiero Network and Hedera Hashgraph