import { Address, Hash } from "./commonTypes";
import { ContractWrapperBase } from "./contractWrapperBase";
import { ForgeOrgConfig, SchemesConfig } from "./wrappers/daoCreator";
/**
 * Helper class and factory for DAOs.
 */
export declare class DAO {
    /**
     * Returns the promise of a new DAO
     * @param {NewDaoConfig} options Configuration of the new DAO
     */
    static new(options: NewDaoConfig): Promise<DAO>;
    /**
     * Returns the promise of a DAO at the given address.  Throws an exception if not found.
     * @param avatarAddress The DAO's address
     */
    static at(avatarAddress: Address): Promise<DAO>;
    /**
     * Returns the promise of the DAOstack Genesis avatar address, or undefined if not found
     */
    static getGenesisDao(daoCreatorAddress?: Address): Promise<string>;
    /**
     * Return a promise of an array of avatar addresses for all of the DAOs created by the optionally-given
     * DaoCreator contract.  The default DaoCreator is the one deployed by
     * the running version of Arc.js.
     *
     * An alternative DaoCreator must implement an InitialSchemesSet event just like the
     * Arc DaoCreater.
     * @param options
     */
    static getDaos(options: GetDaosOptions): Promise<Array<Address>>;
    /**
     * TruffleContract for the DAO's Avatar
     */
    avatar: any;
    /**
     * TruffleContract for the DAO's controller (Controller or UController by default, see DAO.hasUController)
     */
    controller: any;
    /**
     * `true` if the DAO is using Arc's universal controller
     */
    hasUController: boolean;
    /**
     * TruffleContract for the DAO's native token (DAOToken by default)
     */
    token: any;
    /**
     * TruffleContract for the DAO's native reputation (Reputation)
     */
    reputation: any;
    /**
     * Returns the promise of all of the schemes registered into this DAO, as Array<DaoSchemeInfo>
     * @param name Optionally filter by the name of a scheme, like "SchemeRegistrar"
     */
    getSchemes(name?: string): Promise<Array<DaoSchemeInfo>>;
    /**
     * Returns the promise of all os the global constraints currently registered into this DAO,
     * as Array<DaoGlobalConstraintInfo>
     * @param name Optionally filter by the name of a global constraint, like "TokenCapGC"
     */
    getGlobalConstraints(name?: string): Promise<Array<DaoGlobalConstraintInfo>>;
    /**
     * Returns whether the scheme with the given address is registered to this DAO's controller
     */
    isSchemeRegistered(schemeAddress: Address): Promise<boolean>;
    /**
     * Returns whether the global constraint with the given address is registered to this DAO's controller
     */
    isGlobalConstraintRegistered(gc: Address): Promise<boolean>;
    /**
     * Returns the promise of the name of the DAO as stored in the Avatar
     * @return {Promise<string>}
     */
    getName(): Promise<string>;
    /**
     * Returns the promise of the  token name for the DAO as stored in the native token
     * @return {Promise<string>}
     */
    getTokenName(): Promise<string>;
    /**
     * Returns  the promise of the token symbol for the DAO as stored in the native token
     * @return {Promise<string>}
     */
    getTokenSymbol(): Promise<string>;
    /**
     * Returns promise of schemes currently in this DAO as Array<DaoSchemeInfo>
     */
    private _getSchemes();
    private _handleSchemeEvent(log, schemesMap);
    /**
     * Returns promise of global constraints currently in this DAO, as DaoGlobalConstraintInfo
     */
    private _getConstraints();
    private _handleConstraintEvent(log, constraintsMap);
}
export interface NewDaoConfig extends ForgeOrgConfig, SchemesConfig {
    /**
     * Address of a DaoCreator to use.  Default is the Arc DaoCreator supplied in this release of Arc.js.
     * If given, the current Arc.js wrapper class must be compatible with Arc contract at the given address.
     */
    daoCreatorAddress?: Address;
}
/**
 * Returned from DAO.getSchemes
 */
export interface DaoSchemeInfo {
    /**
     * Scheme address
     */
    address: string;
    /**
     * Wrapper class for the scheme if it was deployed by the running version of Arc.js
     */
    wrapper?: ContractWrapperBase;
}
/********************************
 * Returned from DAO.getGlobalConstraints
 */
export interface DaoGlobalConstraintInfo {
    /**
     * Global constraint address
     */
    address: string;
    /**
     * Wrapper class for the constraint if it was deployed by the running version of Arc.js
     */
    wrapper: ContractWrapperBase;
    /**
     * hash of the constraint parameters
     */
    paramsHash: string;
}
export interface ControllerAddGlobalConstraintsEventLogEntry {
    _globalConstraint: Address;
    _params: Hash;
}
export interface ControllerRegisterSchemeEventLogEntry {
    _scheme: Address;
}
export declare type PerDaoCallback = (avatarAddress: Address) => void | Promise<boolean>;
export interface GetDaosOptions {
    daoCreatorAddress?: Address;
    /**
     * Optional callback invoked after obtaining each avatar address.
     * Return nothing or a promise of whether to stop finding Daos at this point.
     */
    perDaoCallback?: PerDaoCallback;
}
