import { Chain, PublicClient, Transport, Account, Client, WalletActions } from 'viem';
import { C as ContractWrite } from './getContract-93922960.js';

type TransactionQueueOptions<chain extends Chain> = {
    /**
     * `publicClient` can be provided to be used in place of the extended viem client for making public action calls
     * (`getChainId`, `getTransactionCount`, `simulateContract`, `call`). This helps in cases where the extended
     * viem client is a smart account client, like in [permissionless.js](https://github.com/pimlicolabs/permissionless.js),
     * where the transport is the bundler, not an RPC.
     */
    publicClient?: PublicClient<Transport, chain>;
    /**
     * Adjust the number of concurrent calls to the mempool. This defaults to `1` to ensure transactions are ordered
     * and nonces are handled properly. Any number greater than that is likely to see nonce errors and/or transactions
     * arriving out of order, but this may be an acceptable trade-off for some applications that can safely retry.
     * @default 1
     */
    queueConcurrency?: number;
};
declare function transactionQueue<chain extends Chain, account extends Account>(opts?: TransactionQueueOptions<chain>): (client: Client<Transport, chain, account>) => Pick<WalletActions<chain, account>, "writeContract" | "sendTransaction">;

type WriteObserverParameters = {
    onWrite: (write: ContractWrite) => void;
};
declare function writeObserver<TChain extends Chain, TAccount extends Account>({ onWrite, }: WriteObserverParameters): (client: Client<Transport, TChain, TAccount>) => Pick<WalletActions<TChain, TAccount>, "writeContract">;

export { TransactionQueueOptions, transactionQueue, writeObserver };
