import { AccountId, Address, ExtrinsicStatus, EventRecord, Hash, RuntimeDispatchInfo } from "../../types/interfaces";
import { AnyNumber, AnyU8a, Callback, IExtrinsic, IExtrinsicEra, IKeyringPair, SignatureOptions } from "../../types/types";
import { ApiTypes, Signer } from '../types';
import { Observable } from 'rxjs';
export interface SubmittableResultImpl {
    readonly events: EventRecord[];
    readonly status: ExtrinsicStatus;
    readonly isCompleted: boolean;
    readonly isError: boolean;
    readonly isFinalized: boolean;
    filterRecords(section: string, method: string): EventRecord[];
    findRecord(section: string, method: string): EventRecord | undefined;
}
export interface SubmittableResultValue {
    events?: EventRecord[];
    status: ExtrinsicStatus;
}
export declare type SubmittablePaymentResult<ApiType extends ApiTypes> = ApiType extends 'rxjs' ? Observable<RuntimeDispatchInfo> : Promise<RuntimeDispatchInfo>;
export declare type SubmittableResultResult<ApiType extends ApiTypes> = ApiType extends 'rxjs' ? Observable<SubmittableResultImpl> : Promise<Hash>;
export declare type SubmittableResultSubscription<ApiType extends ApiTypes> = ApiType extends 'rxjs' ? Observable<SubmittableResultImpl> : Promise<() => void>;
export declare type SubmittableThis<ApiType extends ApiTypes, THIS> = ApiType extends 'rxjs' ? Observable<THIS> : Promise<THIS>;
export interface SignerOptions {
    blockHash: AnyU8a;
    era?: IExtrinsicEra | number;
    nonce: AnyNumber;
    signer?: Signer;
    tip?: AnyNumber;
}
export declare type AddressOrPair = IKeyringPair | string | AccountId | Address;
export interface SubmittableExtrinsic<ApiType extends ApiTypes> extends IExtrinsic {
    paymentInfo(account: AddressOrPair, options?: Partial<SignerOptions>): SubmittablePaymentResult<ApiType>;
    send(): SubmittableResultResult<ApiType>;
    send(statusCb: Callback<SubmittableResultImpl>): SubmittableResultSubscription<ApiType>;
    sign(account: IKeyringPair, _options: Partial<SignatureOptions>): this;
    signAsync(account: AddressOrPair, _options: Partial<SignatureOptions>): SubmittableThis<ApiType, this>;
    signAndSend(account: AddressOrPair, options?: Partial<SignerOptions>): SubmittableResultResult<ApiType>;
    signAndSend(account: AddressOrPair, statusCb: Callback<SubmittableResultImpl>): SubmittableResultSubscription<ApiType>;
    signAndSend(account: AddressOrPair, options: Partial<SignerOptions>, statusCb?: Callback<SubmittableResultImpl>): SubmittableResultSubscription<ApiType>;
}
