import { Address } from "./commonTypes";
import { IEventSubscription } from "./pubSubEventService";
/**
 * Watch for changes in the default account.
 *
 * For more information, see [Account Changes](/Configuration.md#accountchanges).
 */
export declare class AccountService {
    static AccountChangedEventTopic: string;
    static NetworkChangedEventTopic: string;
    /**
     * Initializes the system that watches for default account changes.
     *
     * `initiateAccountWatch` is called automatically by Arc.js when you pass `true`
     * for `watchForAccountChanges` to `InitializeArcJs`.  You may also call it manually yourself.
     *
     * Then you may request to be notified whenever the current account changes by calling
     * [AccountService.subscribeToAccountChanges](/arc.js/api/classes/AccountService#subscribeToAccountChanges)
     */
    static initiateAccountWatch(): Promise<void>;
    /**
     * Initializes the system that watches for blockchain network id changes.
     *
     * `initiateNetworkWatch` is called automatically by Arc.js when you pass `true`
     * for `watchForNetworkChanges` to `InitializeArcJs`.  You may also call it manually yourself.
     *
     * Then you may request to be notified whenever the current account changes by calling
     * [AccountService.subscribeToNetworkChanges](/arc.js/api/classes/AccountService#subscribeToNetworkChanges)
     *
     * When the network is found to have changed you should call `InitializeArcJs` so Arc.js will set
     * itself up with the new network and return to you a new `Web3` object.
     */
    static initiateNetworkWatch(): Promise<void>;
    /**
     * Turn off the system that watches for default account changes.
     */
    static endAccountWatch(): void;
    /**
     * Turn off the system that watches for default account changes.
     */
    static endNetworkWatch(): void;
    /**
     * Subscribe to be notified whenever the current account changes, like this:
     *
     * ```typescript
     * AccountService.subscribeToAccountChanges((account: Address): void => { ... });
     * ```
     * @param callback
     * @returns A subscription to the event.  Unsubscribe by calling `[theSubscription].unsubscribe()`.
     */
    static subscribeToAccountChanges(callback: (address: Address) => void): IEventSubscription;
    /**
     * Subscribe to be notified whenever the current network changes, like this:
     *
     * ```typescript
     * AccountService.subscribeToAccountChanges((networkId: number): void => { ... });
     * ```
     * @param callback
     * @returns A subscription to the event.  Unsubscribe by calling `[theSubscription].unsubscribe()`.
     */
    static subscribeToNetworkChanges(callback: (networkId: number) => void): IEventSubscription;
    private static currentAccount;
    private static currentNetworkId;
    private static accountChangedLock;
    private static accountChangedTimerId;
    private static networkChangedLock;
    private static networkChangedTimerId;
    private static getNetworkId;
}
