Class DeleteScheduleExtensions
Extension methods for deleting scheduled transactions from the network.
Inherited Members
Namespace: Hiero
Assembly: Hiero.dll
Syntax
public static class DeleteScheduleExtensions
Methods
| Edit this page View SourceDeleteScheduleAsync(ConsensusClient, DeleteScheduleParams, Action<IConsensusContext>?)
Deletes an existing scheduled transaction from the network. Must be signed by the schedule's administrator key.
Declaration
public static Task<TransactionReceipt> DeleteScheduleAsync(this ConsensusClient client, DeleteScheduleParams deleteParams, Action<IConsensusContext>? configure = null)
Parameters
| Type | Name | Description |
|---|---|---|
| ConsensusClient | client | The Consensus Node Client orchestrating the request. |
| DeleteScheduleParams | deleteParams | The details of the schedule deletion request. |
| 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> | A transaction receipt indicating a successful operation. |
Examples
// Cancel a pending schedule before it executes. Only schedules
// created with an Administrator key can be deleted — and only by
// that admin. Once the schedule's inner transaction has executed
// or expired, deletion is not meaningful.
var receipt = await client.DeleteScheduleAsync(scheduleId);
Console.WriteLine($"Delete status: {receipt.Status}");
Exceptions
| Type | Condition |
|---|---|
| ArgumentOutOfRangeException | If required arguments are missing. |
| InvalidOperationException | If required context configuration is missing. |
| PrecheckException | If the gateway node 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 request as invalid or had missing data. |
DeleteScheduleAsync(ConsensusClient, EntityId, Action<IConsensusContext>?)
Deletes an existing scheduled transaction from the network. Must be signed by the schedule's administrator key.
Declaration
public static Task<TransactionReceipt> DeleteScheduleAsync(this ConsensusClient client, EntityId schedule, Action<IConsensusContext>? configure = null)
Parameters
| Type | Name | Description |
|---|---|---|
| ConsensusClient | client | The Consensus Node Client orchestrating the request. |
| EntityId | schedule | The address of the schedule entity to delete. |
| 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> | A transaction receipt indicating a successful operation. |
Examples
// Cancel a pending schedule before it executes. Only schedules
// created with an Administrator key can be deleted — and only by
// that admin. Once the schedule's inner transaction has executed
// or expired, deletion is not meaningful.
var receipt = await client.DeleteScheduleAsync(scheduleId);
Console.WriteLine($"Delete status: {receipt.Status}");
Exceptions
| Type | Condition |
|---|---|
| ArgumentOutOfRangeException | If required arguments are missing. |
| InvalidOperationException | If required context configuration is missing. |
| PrecheckException | If the gateway node 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 request as invalid or had missing data. |