import { Address } from "./commonTypes";
import { ContractWrapperBase } from "./contractWrapperBase";
import { ContractWrapperFactory } from "./contractWrapperFactory.js";
import { AbsoluteVoteWrapper } from "./wrappers/absoluteVote.js";
import { ContributionRewardWrapper } from "./wrappers/contributionReward.js";
import { DaoCreatorWrapper } from "./wrappers/daoCreator.js";
import { GenesisProtocolWrapper } from "./wrappers/genesisProtocol.js";
import { GlobalConstraintRegistrarWrapper } from "./wrappers/globalConstraintRegistrar.js";
import { SchemeRegistrarWrapper } from "./wrappers/schemeRegistrar.js";
import { TokenCapGCWrapper } from "./wrappers/tokenCapGC.js";
import { UpgradeSchemeWrapper } from "./wrappers/upgradeScheme.js";
import { VestingSchemeWrapper } from "./wrappers/vestingScheme.js";
import { VoteInOrganizationSchemeWrapper } from "./wrappers/voteInOrganizationScheme.js";
/**
 * An object with property names being a contract key and property value as the
 * corresponding wrapper factory (ContractWrapperFactory<TWrapper).
 */
export interface ArcWrapperFactories {
    AbsoluteVote: ContractWrapperFactory<AbsoluteVoteWrapper>;
    ContributionReward: ContractWrapperFactory<ContributionRewardWrapper>;
    DaoCreator: ContractWrapperFactory<DaoCreatorWrapper>;
    GenesisProtocol: ContractWrapperFactory<GenesisProtocolWrapper>;
    GlobalConstraintRegistrar: ContractWrapperFactory<GlobalConstraintRegistrarWrapper>;
    SchemeRegistrar: ContractWrapperFactory<SchemeRegistrarWrapper>;
    TokenCapGC: ContractWrapperFactory<TokenCapGCWrapper>;
    UpgradeScheme: ContractWrapperFactory<UpgradeSchemeWrapper>;
    VestingScheme: ContractWrapperFactory<VestingSchemeWrapper>;
    VoteInOrganizationScheme: ContractWrapperFactory<VoteInOrganizationSchemeWrapper>;
}
/**
 * An object with property names being a contract key and property value as the
 * corresponding wrapper.
 */
export interface ArcWrappers {
    AbsoluteVote: AbsoluteVoteWrapper;
    ContributionReward: ContributionRewardWrapper;
    DaoCreator: DaoCreatorWrapper;
    GenesisProtocol: GenesisProtocolWrapper;
    GlobalConstraintRegistrar: GlobalConstraintRegistrarWrapper;
    SchemeRegistrar: SchemeRegistrarWrapper;
    TokenCapGC: TokenCapGCWrapper;
    UpgradeScheme: UpgradeSchemeWrapper;
    VestingScheme: VestingSchemeWrapper;
    VoteInOrganizationScheme: VoteInOrganizationSchemeWrapper;
}
/**
 * Arc.js wrapper factories grouped by type.
 */
export interface ArcWrappersByType {
    /**
     * All wrapped contracts
     */
    allWrappers: Array<ContractWrapperBase>;
    /**
     * All wrapped schemes
     */
    schemes: Array<ContractWrapperBase>;
    /**
     * All wrapped schemes that can generate proposals
     */
    proposalGeneratingSchemes: Array<ContractWrapperBase>;
    /**
     * All wrapped voting machines
     */
    votingMachines: Array<ContractWrapperBase>;
    /**
     * All wrapped global constraints
     */
    globalConstraints: Array<ContractWrapperBase>;
    /**
     * Other types of wrappers
     */
    other: Array<ContractWrapperBase>;
}
/**
 * Service that provides access to Arc.js contract wrapper classes and class factories.
 */
export declare class WrapperService {
    /**
     * Wrappers by name, hydrated with contracts as deployed by the running version of Arc.js.
     */
    static wrappers: ArcWrappers;
    /**
     * Contract wrapper factories grouped by type
     */
    static wrappersByType: ArcWrappersByType;
    /**
     * Wrapper factories by name.  Use these when you want to do `.at()` or `.new()`.  You can also
     * use for `deployed()`, but the wrappers for deployed contracts are directly available from the
     * `wrappers` and `wrappersByType` properties.
     */
    static factories: ArcWrapperFactories;
    /**
     * Map of contract wrappers keyed by address.  For example:
     *
     * `const wrapper = WrapperService.wrappersByAddress.get(anAddress);`
     *
     * Currently only returns the wrappers for contracts that were deployed by the running
     * version of Arc.js.
     */
    static wrappersByAddress: Map<Address, ContractWrapperBase>;
    /**
     * initialize() must be called before any of the static properties will have values.
     * It is called by ArcInitialize(), which in tur must be invoked by any application using Arc.js.
     *
     * @param options
     */
    static initialize(options?: WrapperServiceInitializeOptions): Promise<void>;
    /**
     * Returns the promise of an Arc.js contract wrapper or undefined if not found.
     *
     * Most useful when you have both contract name and address and wish to most
     * efficiently return the associated wrapper, or undefined when not found.
     *
     * @param contractName - name of an Arc contract, like "SchemeRegistrar"
     * @param address - optional
     */
    static getContractWrapper(contractName: string, address?: string): Promise<ContractWrapperBase | undefined>;
    private static allWrappersFilter;
    private static noWrappersFilter;
}
export interface WrapperFilter {
    AbsoluteVote?: boolean;
    ContributionReward?: boolean;
    DaoCreator?: boolean;
    GenesisProtocol?: boolean;
    GlobalConstraintRegistrar?: boolean;
    SchemeRegistrar?: boolean;
    TokenCapGC?: boolean;
    UpgradeScheme?: boolean;
    VestingScheme?: boolean;
    VoteInOrganizationScheme?: boolean;
}
export interface WrapperServiceInitializeOptions {
    /**
     * Option filter to only initialize the contracts whose name is set to true.
     * Any that are omitted or set to false here will appear as `null` in
     * WrapperService.wrappers and WrapperService.wrappersByType,
     * and will not be available in WrapperService.wrappersByAddress.
     * But their factories will still be available in WrapperService.factories.
     */
    filter?: WrapperFilter;
}
/**
 * for quicker access to the contract wrappers
 */
export declare const ContractWrappers: ArcWrappers;
/**
 * for quicker access to the contract wrapper factories
 */
export declare const ContractWrapperFactories: ArcWrapperFactories;
/**
 * for quicker access to the contract wrapper types
 */
export declare const ContractWrappersByType: ArcWrappersByType;
/**
 * for quicker access to the contract wrappers by address
 */
export declare const ContractWrappersByAddress: Map<Address, ContractWrapperBase>;
