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 |
|---|---|
| ArgumentException | If required arguments are missing or invalid. |
| InvalidOperationException | If required context configuration is missing. |
| PrecheckException | If the gateway node refused the transaction. Only a code about the transaction itself proves it did not execute; any other code leaves the outcome unknown, so settle it by its transaction id on a mirror node rather than resubmitting it (see PrecheckException). |
| ConsensusException | If the outcome could not be confirmed: the transaction may have executed, so settle it by its transaction id on a mirror node rather than resubmitting it. |
| 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 |
|---|---|
| ArgumentException | If required arguments are missing or invalid. |
| InvalidOperationException | If required context configuration is missing. |
| PrecheckException | If the gateway node refused the transaction. Only a code about the transaction itself proves it did not execute; any other code leaves the outcome unknown, so settle it by its transaction id on a mirror node rather than resubmitting it (see PrecheckException). |
| ConsensusException | If the outcome could not be confirmed: the transaction may have executed, so settle it by its transaction id on a mirror node rather than resubmitting it. |
| TransactionException | If the network rejected the request as invalid or had missing data. |