import BigNumber from "bignumber.js";
import { Address, Hash } from "./commonTypes";
import { IContractWrapper } from "./iContractWrapperBase";
import { TxGeneratingFunctionOptions } from "./transactionService";
import { EntityFetcherFactory, EventFetcherFilterObject } from "./web3EventService";
import { ForgeOrgConfig, InitialSchemesSetEventResult, SchemesConfig } from "./wrappers/daoCreator";
import { DaoTokenWrapper } from "./wrappers/daoToken";
import { ReputationWrapper } from "./wrappers/reputation";
/**
 * 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 & TxGeneratingFunctionOptions): Promise<DAO>;
    /**
     * Returns the promise of a DAO at the given address.  Returns undefined if not found.
     * @param avatarAddress The DAO avatar's address
     */
    static at(avatarAddress: Address): Promise<DAO>;
    /**
     * 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>>;
    /**
     * Return a promise of an EntityFetcherFactory to get/watch 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 Optional, default is `{}`.
     */
    static getDaoCreationEvents(options?: GetDaosOptions): Promise<EntityFetcherFactory<Address, InitialSchemesSetEventResult>>;
    /**
     * Truffle contract wrapper for the DAO's Avatar
     */
    avatar: any;
    /**
     * Truffle contract wrapper 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;
    /**
     * Truffle contract wrapper for the DAO's native token (DAOToken by default)
     */
    token: DaoTokenWrapper;
    /**
     * Truffle contract wrapper for the DAO's native reputation (Reputation)
     */
    reputation: ReputationWrapper;
    /**
     * the name of the DAO
     */
    name: string;
    /**
     * block in which avatar was created
     */
    blockNumber: number;
    /**
     * 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, filterParams?: any): 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 promise of an array of `Participant` representing accounts that currently have
     * greater-than-zero reputation with this DAO.  Optionally returns the current reputation
     * of each participant.
     * @param options
     */
    getParticipants(options?: GetParticipantsOptions): Promise<Array<Participant>>;
    /**
     * 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 a promise of the given account's native token balance.
     * @param agentAddress
     */
    getTokenBalance(agentAddress: Address): Promise<BigNumber>;
    /**
     * 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;
    /**
     * Returns promise of global constraints currently in this DAO, as DaoGlobalConstraintInfo
     */
    private _getConstraints;
    private _handleConstraintEvent;
}
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;
    /**
     * block # when the scheme was registered with the DAO controller
     */
    blockNumber: number;
    /**
     * tx when the scheme was registered with the DAO controller
     */
    transactionHash: Hash;
    /**
     * Wrapper class for the scheme if it was deployed by the running version of Arc.js
     */
    wrapper?: IContractWrapper;
}
/********************************
 * Returned from DAO.getGlobalConstraints
 */
export interface DaoGlobalConstraintInfo {
    /**
     * Global constraint address
     */
    address: string;
    /**
     * hash of the constraint parameters
     */
    paramsHash: string;
    /**
     * Wrapper class for the constraint if it was deployed by the running version of Arc.js
     */
    wrapper: IContractWrapper;
}
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;
}
export interface GetParticipantsOptions extends EventFetcherFilterObject {
    /**
     * optional address of a single participant to filter on
     */
    participantAddress?: Address;
    /**
     * true to retrieve and return the current reputation of each participant
     */
    returnReputations?: boolean;
}
export interface Participant {
    address: Address;
    reputation?: BigNumber;
}
