Show / Hide Table of Contents

Class TransactionReceiptExtensions

Extension methods for retrieving transaction receipts from the network.

Inheritance
object
TransactionReceiptExtensions
Inherited Members
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
object.ToString()
Namespace: Hiero
Assembly: Hiero.dll
Syntax
public static class TransactionReceiptExtensions

Methods

| Edit this page View Source

GetAllReceiptsAsync(ConsensusClient, TransactionId, CancellationToken, Action<IConsensusContext>?)

Retrieves all known receipts from the network having the given transaction ID. The method will wait for the disposition of at least one receipt to be known. Receipts with failure codes do not cause an exception to be raised.

Declaration
public static Task<IReadOnlyList<TransactionReceipt>> GetAllReceiptsAsync(this ConsensusClient client, TransactionId transaction, CancellationToken cancellationToken = default, Action<IConsensusContext>? configure = null)
Parameters
Type Name Description
ConsensusClient client

The Consensus Node Client to query.

TransactionId transaction

TransactionId identifier of the receipt.

CancellationToken cancellationToken

Optional cancellation token.

Action<IConsensusContext> 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<IReadOnlyList<TransactionReceipt>>

A list of receipts having the identified transaction. The list may be empty or contain multiple entries.

Exceptions
Type Condition
ConsensusException

if the receipt is known to exist but has not reached consensus within the alloted time to wait for a return from this method or the network has been too busy to respond.

| Edit this page View Source

GetReceiptAsync(ConsensusClient, TransactionId, CancellationToken, Action<IConsensusContext>?)

Retrieves the receipt from the network matching the transaction id. Will wait for the disposition of the receipt to be known.

Declaration
public static Task<TransactionReceipt> GetReceiptAsync(this ConsensusClient client, TransactionId transaction, CancellationToken cancellationToken = default, Action<IConsensusContext>? configure = null)
Parameters
Type Name Description
ConsensusClient client

The Consensus Node Client to query.

TransactionId transaction

TransactionId identifier of the receipt.

CancellationToken cancellationToken

Optional cancellation token.

Action<IConsensusContext> 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<TransactionReceipt>

The receipt matching the transaction id, if found and marked successful, otherwise a TransactionException is thrown if not found or the receipt returns an error status.

Exceptions
Type Condition
TransactionException

If the network has no record of the transaction or request has invalid or had missing data.

  • Edit this page
  • View Source
In this article
Back to top .NET Client Library for Hiero Network and Hedera Hashgraph