import type { WalletProvider } from '../../walletProvider.types';
import type { WalletProviderEvents } from '../walletProviderEvents.types';
type CreateWalletProviderEventEmitterParams<R = void> = {
    /**
     * Callback responsible for removing the listeners from the external wallet provider event emitters
     * to the the Dynamic handlers that will emit the wallet provider events.
      * @instrumented
   */
    removeEventListeners: (params: {
        handleAccountsChanged: (params: {
            addresses: string[];
        }) => void;
        handleDisconnected: () => void;
        handleNetworkChanged: (params: {
            networkId: string;
        }) => void;
        /**
         * Value returned by setupEventListeners, particularly useful for cleaning up the event listeners
         */
        setupReturnValue: R;
    }) => void;
    /**
     * Callback responsible for connecting the external wallet provider event emitters
     * to the the Dynamic handlers that will emit the wallet provider events.
     *
     * @returns May return a value that will be later passed to removeEventListeners as `setupReturnValue`
     */
    setupEventListeners: (params: {
        handleAccountsChanged: (params: {
            addresses: string[];
        }) => void;
        handleDisconnected: () => void;
        handleNetworkChanged: (params: {
            networkId: string;
        }) => void;
    }) => R;
    /**
     * List of events that the wallet provider supports listening to.
     * Defaults to all events.
     */
    supportedEvents?: (keyof WalletProviderEvents)[];
};
/**
 * Takes a callback that registers handlers for the external wallet provider.
 * Returns both a getter of an eventEmitter that can be exposed via the wallet provider
 * and a callback that will be used to destroy the listeners.
  * @not-instrumented
 */
export declare const createWalletProviderEventEmitter: <R = void>({ removeEventListeners, setupEventListeners, supportedEvents, }: CreateWalletProviderEventEmitterParams<R>) => {
    cleanupEventEmitter: () => void;
    getEventEmitter: () => WalletProvider["events"];
};
export {};
//# sourceMappingURL=createWalletProviderEventEmitter.d.ts.map