import { AddressOrPair, SubmittableExtrinsic } from "@polkadot/api/types";
import { ISubmittableResult } from "@polkadot/types/types";
import { EventRecord, DispatchError } from "@polkadot/types/interfaces/system";
import { ApiPromise } from "@polkadot/api";
import { AugmentedEvent, ApiTypes } from "@polkadot/api/types";
import type { AnyTuple } from "@polkadot/types/types";
export interface TransactionAPI {
    setAccount(account: AddressOrPair): void;
    removeAccount(): void;
    getAccount(): AddressOrPair | undefined;
    sendLogged<T extends AnyTuple>(transaction: SubmittableExtrinsic<"promise">, successEventType?: AugmentedEvent<ApiTypes, T>, onlyInBlock?: boolean): Promise<ISubmittableResult>;
    /**
     * Builds a submittable extrinsic to send other extrinsic in batch.
     *
     * @param extrinsics An array of extrinsics to be submitted as batch.
     * @param atomic Whether the given extrinsics should be handled atomically or not.
     *   When true (default) all extrinsics will rollback if one fails (batchAll), otherwise allows partial successes (batch).
     * @returns A batch/batchAll submittable extrinsic.
     */
    buildBatchExtrinsic(extrinsics: SubmittableExtrinsic<"promise", ISubmittableResult>[], atomic?: boolean): SubmittableExtrinsic<"promise", ISubmittableResult>;
}
export declare class DefaultTransactionAPI implements TransactionAPI {
    api: ApiPromise;
    private account?;
    constructor(api: ApiPromise, account?: AddressOrPair | undefined);
    setAccount(account: AddressOrPair): void;
    removeAccount(): void;
    getAccount(): AddressOrPair | undefined;
    sendLogged<T extends AnyTuple>(transaction: SubmittableExtrinsic<"promise">, successEventType?: AugmentedEvent<ApiTypes, T>, onlyInBlock?: boolean): Promise<ISubmittableResult>;
    buildBatchExtrinsic(extrinsics: SubmittableExtrinsic<"promise", ISubmittableResult>[], atomic?: boolean): SubmittableExtrinsic<"promise", ISubmittableResult>;
    /**
     * Builds a submittable extrinsic to send other extrinsic in batch.
     *
     * @param api The ApiPromis instance to construct the batch extrinsic with.
     * @param extrinsics An array of extrinsics to be submitted as batch.
     * @param atomic Whether the given extrinsics should be handled atomically or not.
     *   When true (default) all extrinsics will rollback if one fails (batchAll), otherwise allows partial successes (batch).
     * @returns A batch/batchAll submittable extrinsic.
     */
    static buildBatchExtrinsic(api: ApiPromise, extrinsics: SubmittableExtrinsic<"promise", ISubmittableResult>[], atomic?: boolean): SubmittableExtrinsic<"promise", ISubmittableResult>;
    static sendLogged<T extends AnyTuple>(api: ApiPromise, account: AddressOrPair, transaction: SubmittableExtrinsic<"promise">, successEventType?: AugmentedEvent<ApiTypes, T>, onlyInBlock?: boolean): Promise<ISubmittableResult>;
    static printEvents(api: ApiPromise, events: EventRecord[]): void;
    static waitForEvent<T extends AnyTuple>(api: ApiPromise, event: AugmentedEvent<ApiTypes, T>, timeoutMs: number): Promise<boolean>;
    static isDispatchError(eventData: unknown): eventData is DispatchError;
    static doesArrayContainEvent<T extends AnyTuple>(events: EventRecord[], eventType: AugmentedEvent<ApiTypes, T>): boolean;
}
