Class TransactionScheduling

Represents a transaction scheduling, which could be either immediate (standard), scheduled for a future era, or scheduled for a future timestamp.

Hierarchy

  • TransactionScheduling

Constructors

Properties

Represents scheduling to a future era with a specified eraID.

futureTimestamp?: FutureTimestampScheduling

Represents scheduling to a future timestamp with a specified timestamp.

standard?: object

Represents the standard (immediate) scheduling with no future scheduling.

Methods

  • Serializes the transaction scheduling into a byte array representation.

    Returns

    A Uint8Array representing the transaction scheduling.

    Returns Uint8Array

  • Converts the transaction scheduling into a JSON-compatible format.

    Returns

    The JSON representation of the transaction scheduling.

    Throws

    Error if the scheduling type is unknown.

    Returns unknown

  • Deserializes a Uint8Array into a TransactionScheduling instance.

    This method parses a byte array representation of a TransactionScheduling object, determines the type of scheduling based on the tag, and reconstructs the appropriate instance.

    Returns

    A TransactionScheduling instance based on the serialized data.

    Throws

    Error - If the byte array is invalid, missing required fields, or contains an unrecognized scheduling tag.

    Tags and Their Associated Schedulers:

    • TransactionSchedulingTag.Native: Represents a native scheduling target.
    • TransactionSchedulingTag.FutureEra: Represents a scheduling target tied to a future era.
    • TransactionSchedulingTag.FutureTimestamp: Represents a scheduling target tied to a future timestamp.

    Example

    const bytes = new Uint8Array([...]); // Provide valid TransactionScheduling bytes
    const scheduling = TransactionScheduling.fromBytes(bytes);
    console.log(scheduling); // Parsed TransactionScheduling instance

    Parameters

    • bytes: Uint8Array

      The byte array to be deserialized.

    Returns TransactionScheduling

Generated using TypeDoc