import type { Address } from 'abitype';
import type { Account } from '../../accounts/types.js';
import type { ReadContractReturnType } from '../../actions/public/readContract.js';
import type { WatchContractEventParameters } from '../../actions/public/watchContractEvent.js';
import type { Client } from '../../clients/createClient.js';
import type { Transport } from '../../clients/transports/createTransport.js';
import type { Chain } from '../../types/chain.js';
import type { ExtractAbiItem, GetEventArgs } from '../../types/contract.js';
import type { Log as viem_Log } from '../../types/log.js';
import type { UnionOmit } from '../../types/utils.js';
import * as Abis from '../Abis.js';
import type { ReadParameters } from '../internal/types.js';
/**
 * Gets the nonce for an account and nonce key.
 *
 * @example
 * ```ts
 * import { createClient, http } from 'viem'
 * import { tempo } from 'tempo.ts/chains'
 * import { Actions } from 'tempo.ts/viem'
 *
 * const client = createClient({
 *   chain: tempo({ feeToken: '0x20c0000000000000000000000000000000000001' }),
 *   transport: http(),
 * })
 *
 * const nonce = await Actions.nonce.getNonce(client, {
 *   account: '0x...',
 *   nonceKey: 1n,
 * })
 * ```
 *
 * @param client - Client.
 * @param parameters - Parameters.
 * @returns The nonce value.
 */
export declare function getNonce<chain extends Chain | undefined, account extends Account | undefined>(client: Client<Transport, chain, account>, parameters: getNonce.Parameters): Promise<getNonce.ReturnValue>;
export declare namespace getNonce {
    type Parameters = ReadParameters & Args;
    type Args = {
        /** Account address. */
        account: Address;
        /** Nonce key (must be > 0, key 0 is reserved for protocol nonces). */
        nonceKey: bigint;
    };
    type ReturnValue = ReadContractReturnType<typeof Abis.nonce, 'getNonce', never>;
    /**
     * Defines a call to the `getNonce` function.
     *
     * Can be passed as a parameter to:
     * - [`estimateContractGas`](https://viem.sh/docs/contract/estimateContractGas): estimate the gas cost of the call
     * - [`simulateContract`](https://viem.sh/docs/contract/simulateContract): simulate the call
     * - [`multicall`](https://viem.sh/docs/contract/multicall): execute multiple calls in parallel
     *
     * @example
     * ```ts
     * import { createClient, http } from 'viem'
     * import { tempo } from 'tempo.ts/chains'
     * import { Actions } from 'tempo.ts/viem'
     *
     * const client = createClient({
     *   chain: tempo({ feeToken: '0x20c0000000000000000000000000000000000001' }),
     *   transport: http(),
     * })
     *
     * const result = await client.multicall({
     *   contracts: [
     *     Actions.nonce.getNonce.call({ account: '0x...', nonceKey: 1n }),
     *     Actions.nonce.getNonce.call({ account: '0x...', nonceKey: 2n }),
     *   ],
     * })
     * ```
     *
     * @param args - Arguments.
     * @returns The call.
     */
    function call(args: Args): {
        abi: [{
            readonly name: "getNonce";
            readonly type: "function";
            readonly stateMutability: "view";
            readonly inputs: readonly [{
                readonly type: "address";
                readonly name: "account";
            }, {
                readonly type: "uint256";
                readonly name: "nonceKey";
            }];
            readonly outputs: readonly [{
                readonly type: "uint64";
                readonly name: "nonce";
            }];
        }];
        functionName: "getNonce";
    } & {
        args: readonly [account: `0x${string}`, nonceKey: bigint];
    } & {
        address: Address;
    } & {
        data: import("../../index.js").Hex;
        to: Address;
    };
}
/**
 * @deprecated This function has been deprecated post-AllegroModerato. It will be removed in a future version.
 */
export declare function getNonceKeyCount<chain extends Chain | undefined, account extends Account | undefined>(client: Client<Transport, chain, account>, parameters: getNonceKeyCount.Parameters): Promise<getNonceKeyCount.ReturnValue>;
export declare namespace getNonceKeyCount {
    type Parameters = ReadParameters & Args;
    type Args = {
        /** Account address. */
        account: Address;
    };
    type ReturnValue = ReadContractReturnType<typeof Abis.nonce, 'getActiveNonceKeyCount', never>;
    /**
     * Defines a call to the `getNonceKeyCount` function.
     *
     * Can be passed as a parameter to:
     * - [`estimateContractGas`](https://viem.sh/docs/contract/estimateContractGas): estimate the gas cost of the call
     * - [`simulateContract`](https://viem.sh/docs/contract/simulateContract): simulate the call
     * - [`multicall`](https://viem.sh/docs/contract/multicall): execute multiple calls in parallel
     *
     * @example
     * ```ts
     * import { createClient, http } from 'viem'
     * import { tempo } from 'tempo.ts/chains'
     * import { Actions } from 'tempo.ts/viem'
     *
     * const client = createClient({
     *   chain: tempo({ feeToken: '0x20c0000000000000000000000000000000000001' }),
     *   transport: http(),
     * })
     *
     * const result = await client.multicall({
     *   contracts: [
     *     Actions.nonce.getNonceKeyCount.call({ account: '0x...' }),
     *     Actions.nonce.getNonceKeyCount.call({ account: '0x...' }),
     *   ],
     * })
     * ```
     *
     * @param args - Arguments.
     * @returns The call.
     */
    function call(args: Args): {
        abi: [{
            readonly name: "getActiveNonceKeyCount";
            readonly type: "function";
            readonly stateMutability: "view";
            readonly inputs: readonly [{
                readonly type: "address";
                readonly name: "account";
            }];
            readonly outputs: readonly [{
                readonly type: "uint256";
                readonly name: "count";
            }];
        }];
        functionName: "getActiveNonceKeyCount";
    } & {
        args: readonly [account: `0x${string}`];
    } & {
        address: Address;
    } & {
        data: import("../../index.js").Hex;
        to: Address;
    };
}
/**
 * @deprecated This function has been deprecated post-AllegroModerato. It will be removed in a future version.
 */
export declare function watchNonceIncremented<chain extends Chain | undefined, account extends Account | undefined>(client: Client<Transport, chain, account>, parameters: watchNonceIncremented.Parameters): import("../../actions/public/watchContractEvent.js").WatchContractEventReturnType;
export declare namespace watchNonceIncremented {
    type Args = GetEventArgs<typeof Abis.nonce, 'NonceIncremented', {
        IndexedOnly: false;
        Required: true;
    }>;
    type Log = viem_Log<bigint, number, false, ExtractAbiItem<typeof Abis.nonce, 'NonceIncremented'>, true>;
    type Parameters = UnionOmit<WatchContractEventParameters<typeof Abis.nonce, 'NonceIncremented', true>, 'abi' | 'address' | 'batch' | 'eventName' | 'onLogs' | 'strict'> & {
        /** Callback to invoke when a nonce is incremented. */
        onNonceIncremented: (args: Args, log: Log) => void;
    };
}
/**
 * Watches for active key count changed events.
 *
 * @example
 * ```ts
 * import { createClient, http } from 'viem'
 * import { tempo } from 'tempo.ts/chains'
 * import { Actions } from 'tempo.ts/viem'
 *
 * const client = createClient({
 *   chain: tempo({ feeToken: '0x20c0000000000000000000000000000000000001' }),
 *   transport: http(),
 * })
 *
 * const unwatch = Actions.nonce.watchActiveKeyCountChanged(client, {
 *   onActiveKeyCountChanged: (args, log) => {
 *     console.log('Active key count changed:', args)
 *   },
 * })
 * ```
 *
 * @param client - Client.
 * @param parameters - Parameters.
 * @returns A function to unsubscribe from the event.
 */
export declare function watchActiveKeyCountChanged<chain extends Chain | undefined, account extends Account | undefined>(client: Client<Transport, chain, account>, parameters: watchActiveKeyCountChanged.Parameters): import("../../actions/public/watchContractEvent.js").WatchContractEventReturnType;
export declare namespace watchActiveKeyCountChanged {
    type Args = GetEventArgs<typeof Abis.nonce, 'ActiveKeyCountChanged', {
        IndexedOnly: false;
        Required: true;
    }>;
    type Log = viem_Log<bigint, number, false, ExtractAbiItem<typeof Abis.nonce, 'ActiveKeyCountChanged'>, true>;
    type Parameters = UnionOmit<WatchContractEventParameters<typeof Abis.nonce, 'ActiveKeyCountChanged', true>, 'abi' | 'address' | 'batch' | 'eventName' | 'onLogs' | 'strict'> & {
        /** Callback to invoke when the active key count changes. */
        onActiveKeyCountChanged: (args: Args, log: Log) => void;
    };
}
//# sourceMappingURL=nonce.d.ts.map