import type { Address } from "abitype";
import type { Hex, SignableMessage, TransactionSerializable, TypedData, TypedDataDefinition } from "viem";
import type { Chain } from "../../chains/types.js";
import type { PreparedTransaction } from "../../transaction/prepare-transaction.js";
import type { SendTransactionResult } from "../../transaction/types.js";
import type { WalletEmitter } from "../wallet-emitter.js";
import type { CreateWalletArgs, WalletAutoConnectionOption, WalletConnectionOption, WalletId } from "../wallet-types.js";
export type SendTransactionOption = TransactionSerializable & {
    chainId: number;
};
export type SendRawTransactionOptions = {
    rawTransaction: Hex;
    chainId: number;
};
/**
 * Wallet interface
 */
export type Wallet<TWalletId extends WalletId = WalletId> = {
    id: TWalletId;
    getChain(): Chain | undefined;
    getAccount(): Account | undefined;
    autoConnect(options: WalletAutoConnectionOption<TWalletId>): Promise<Account>;
    connect(options: WalletConnectionOption<TWalletId>): Promise<Account>;
    disconnect(): Promise<void>;
    switchChain(chain: Chain): Promise<void>;
    subscribe: WalletEmitter<TWalletId>["subscribe"];
    getConfig: () => CreateWalletArgs<TWalletId>[1];
};
export type Account = {
    address: Address;
    sendTransaction: (tx: SendTransactionOption) => Promise<SendTransactionResult>;
    signMessage: ({ message }: {
        message: SignableMessage;
    }) => Promise<Hex>;
    signTypedData: <const typedData extends TypedData | Record<string, unknown>, primaryType extends keyof typedData | "EIP712Domain" = keyof typedData>(_typedData: TypedDataDefinition<typedData, primaryType>) => Promise<Hex>;
    estimateGas?: (tx: PreparedTransaction) => Promise<bigint>;
    signTransaction?: (tx: TransactionSerializable) => Promise<Hex>;
    sendBatchTransaction?: (txs: SendTransactionOption[]) => Promise<SendTransactionResult>;
    sendRawTransaction?: (tx: SendRawTransactionOptions) => Promise<SendTransactionResult>;
};
//# sourceMappingURL=wallet.d.ts.map