import { Query } from "./query";
import { Response } from "./response";
import { Transaction } from "./transaction";
import { TransactionResponse } from "./transaction_response";
export declare const protobufPackage = "proto";
/**
* Transactions and queries for the Schedule Service
*
* The Schedule Service allows transactions to be submitted without all the required signatures and
* allows anyone to provide the required signatures independently after a transaction has already
* been created. The transactions can be executed immediately when all required signatures are received
* or at a future date if Long Term Scheduled Transactions are enabled.
*
* Execution:
*
* Scheduled Transactions are executed in two different modes.
*
* 1. If Long Term Scheduled Transactions are enabled and wait_for_expiry was set to true on the
* ScheduleCreate, then the transaction will be executed at the expiration_time specified on the
* ScheduleCreate.
*
* 2. Otherwise Scheduled Transactions are executed once all required signatures are collected and witnessed.
* Every time new signature is provided, a check is performed on the "readiness" of the execution.
* The Scheduled Transaction will be executed immediately after the transaction that triggered it.
*
* NOTICE:
* A Scheduled Transaction being ready to execute, or even not ready to execute, at the time a ScheduleCreate or
* ScheduleSign comes in does not guarantee it will stay that way. Any number of things can happen over time that
* impact the transaction.
*
* For example, account keys can change, accounts can be deleted, and account balances can change.
*
* A particularly noteworthy case is if Long Term Scheduled Transactions are enabled and signature requirements for a Scheduled
* Transaction change such that existing signatures become sufficient to allow the transaction to go through. In this case the transaction
* will execute at expiration_time unless a ScheduleSign comes in to push it through.
*
* Transaction Record:
*
* If a Scheduled Transaction is executed immediately following the transaction that provided all required signatures,
* the timestamp of the Scheduled Transaction will be equal to consensusTimestamp + 1 nano, where
* consensusTimestamp is the timestamp of the transaction that triggered the execution.
*
* The Transaction ID of the Scheduled Transaction will have the scheduled property set to true and
* inherit the transactionValidStart and accountID from the ScheduleCreate transaction.
*
* The scheduleRef property of the transaction record will be populated with the ScheduleID of the
* Scheduled Transaction.
*
* Post execution:
*
* After execution, a Scheduled Transaction will remain in state and can be queried using GetScheduleInfo until expiration.
*
* Expiry:
*
* The expiration time of a schedule is controlled by it's expiration_time. If Long Term Scheduled Transactions are disabled,
* the expiration_time is always 30 minutes in the future.
*
* Once a given Scheduled Transaction expires, it will be removed from the ledger and any upcoming
* operation referring the ScheduleID will resolve to INVALID_SCHEDULE_ID.
*/
export interface ScheduleService {
/** Creates a new Schedule by submitting the transaction */
createSchedule(request: Transaction): Promise;
/** Signs a new Schedule by submitting the transaction */
signSchedule(request: Transaction): Promise;
/** Deletes a new Schedule by submitting the transaction */
deleteSchedule(request: Transaction): Promise;
/** Retrieves the metadata of a schedule entity */
getScheduleInfo(request: Query): Promise;
}
export declare const ScheduleServiceServiceName = "proto.ScheduleService";
export declare class ScheduleServiceClientImpl implements ScheduleService {
private readonly rpc;
private readonly service;
constructor(rpc: Rpc, opts?: {
service?: string;
});
createSchedule(request: Transaction): Promise;
signSchedule(request: Transaction): Promise;
deleteSchedule(request: Transaction): Promise;
getScheduleInfo(request: Query): Promise;
}
interface Rpc {
request(service: string, method: string, data: Uint8Array): Promise;
}
export {};
//# sourceMappingURL=schedule_service.d.ts.map