Class ScheduleParams
Parameters for creating a scheduled transaction on the network. The inner transaction will be held by the network and executed when all required signatures are collected, or optionally delayed until the specified expiration time.
Inherited Members
Namespace: Hiero
Assembly: Hiero.dll
Syntax
public sealed class ScheduleParams
Examples
Schedule a HBAR transfer with a 1-hour expiration. The schedule executes
automatically as soon as the inner transfer's signing requirements are
satisfied; otherwise it drops at Expiration:
var receipt = await client.ScheduleAsync(new ScheduleParams
{
Transaction = new TransferParams
{
CryptoTransfers = new[]
{
new CryptoTransfer(sender, -amount),
new CryptoTransfer(recipient, amount)
}
},
Memo = "Scheduled transfer from Hiero SDK sample",
Expiration = new ConsensusTimeStamp(DateTime.UtcNow.AddHours(1))
});
Console.WriteLine($"Schedule created: {receipt.Schedule}");
Properties
| Edit this page View SourceAdministrator
Optional administrator endorsement (key) for the schedule. When set, this key must sign any request to delete the schedule before it executes or expires.
Declaration
public Endorsement? Administrator { get; set; }
Property Value
| Type | Description |
|---|---|
| Endorsement |
CancellationToken
Optional cancellation token. Cancelling stops the client waiting; it cannot recall a transaction already sent. Cancelled after the send, the outcome is unknown: settle it by its transaction id on a mirror node rather than resubmitting it.
Declaration
public CancellationToken? CancellationToken { get; set; }
Property Value
| Type | Description |
|---|---|
| CancellationToken? |
DelayExecution
When set to
true
, the scheduled transaction will not execute until the expiration time, even if all required signatures are collected before then.
Declaration
public bool DelayExecution { get; set; }
Property Value
| Type | Description |
|---|---|
| bool |
Expiration
Optional expiration time for the schedule. If the scheduled transaction has not been executed by this time, it will be removed from the network.
Declaration
public ConsensusTimeStamp? Expiration { get; set; }
Property Value
| Type | Description |
|---|---|
| ConsensusTimeStamp? |
Memo
Optional memo describing the scheduled transaction. Limited to 100 bytes by the network.
Declaration
public string? Memo { get; set; }
Property Value
| Type | Description |
|---|---|
| string |
Payer
Optional account that will pay for the execution of the scheduled transaction when it triggers. If not set, the payer of the schedule create transaction will be used.
Declaration
public EntityId? Payer { get; set; }
Property Value
| Type | Description |
|---|---|
| EntityId |
Signatory
Additional private key, keys or signing callback method required to authorize the schedule creation.
Declaration
public Signatory? Signatory { get; set; }
Property Value
| Type | Description |
|---|---|
| Signatory |
Transaction
The transaction to schedule for future execution. This can be any supported transaction type that implements the schedulable transaction interface.
Declaration
public TransactionParams Transaction { get; set; }
Property Value
| Type | Description |
|---|---|
| TransactionParams |