import { Address, Hash, SchemePermissions } from "../commonTypes";
import { BigNumber } from "bignumber.js";
import { ContractWrapperFactory } from "../contractWrapperFactory";
import { ArcTransactionDataResult, ArcTransactionProposalResult, ArcTransactionResult, IContractWrapperFactory, SchemeWrapper, StandardSchemeParams } from "../iContractWrapperBase";
import { ProposalGeneratorBase } from "../proposalGeneratorBase";
import { TxGeneratingFunctionOptions } from "../transactionService";
import { EntityFetcherFactory, EventFetcherFactory } from "../web3EventService";
import { ProposalDeletedEventResult, RedeemEventResult, SchemeProposalExecutedEventResult } from "./commonEventInterfaces";
export declare class ContributionRewardWrapper extends ProposalGeneratorBase implements SchemeWrapper {
    name: string;
    friendlyName: string;
    factory: IContractWrapperFactory<ContributionRewardWrapper>;
    /**
     * Events
     */
    NewContributionProposal: EventFetcherFactory<NewContributionProposalEventResult>;
    ProposalExecuted: EventFetcherFactory<SchemeProposalExecutedEventResult>;
    ProposalDeleted: EventFetcherFactory<ProposalDeletedEventResult>;
    RedeemReputation: EventFetcherFactory<RedeemEventResult>;
    RedeemEther: EventFetcherFactory<RedeemEventResult>;
    RedeemNativeToken: EventFetcherFactory<RedeemEventResult>;
    RedeemExternalToken: EventFetcherFactory<RedeemEventResult>;
    /**
     * Submit a proposal to reward a beneficiary for contributions to the DAO
     * @param {ProposeContributionRewardParams} options
     */
    proposeContributionReward(options?: ProposeContributionRewardParams): Promise<ArcTransactionProposalResult>;
    /**
     * Redeem the specified rewards for the beneficiary of the proposal
     * @param {ContributionRewardRedeemParams} opts
     */
    redeemContributionReward(options?: ContributionRewardRedeemParams): Promise<ArcTransactionResult>;
    /**
     * Redeem external token reward for the beneficiary of the proposal
     * @param {ContributionRewardSpecifiedRedemptionParams} options
     */
    redeemExternalToken(options?: ContributionRewardSpecifiedRedemptionParams): Promise<ArcTransactionResult>;
    /**
     * Redeem reputation reward for the beneficiary of the proposal
     * @param {ContributionRewardSpecifiedRedemptionParams} options
     */
    redeemReputation(options?: ContributionRewardSpecifiedRedemptionParams): Promise<ArcTransactionResult>;
    /**
     * Redeem native token reward for the beneficiary of the proposal
     * @param {ContributionRewardSpecifiedRedemptionParams} options
     */
    redeemNativeToken(options?: ContributionRewardSpecifiedRedemptionParams): Promise<ArcTransactionResult>;
    /**
     * Redeem ether reward for the beneficiary of the proposal
     * @param {ContributionRewardSpecifiedRedemptionParams} options
     */
    redeemEther(options?: ContributionRewardSpecifiedRedemptionParams): Promise<ArcTransactionResult>;
    /**
     * EntityFetcherFactory for votable ContributionProposals.
     * @param avatarAddress
     */
    getVotableProposals(avatarAddress: Address): Promise<EntityFetcherFactory<ContributionProposal, NewContributionProposalEventResult>>;
    /**
     * EntityFetcherFactory for executed ContributionProposals.
     * The Arc ContributionProposals contract retains the original proposal struct after execution.
     * @param avatarAddress
     */
    getExecutedProposals(avatarAddress: Address): EntityFetcherFactory<ContributionProposal, SchemeProposalExecutedEventResult>;
    /**
     * Return a list of `ProposalRewards` for executed (passed by vote) proposals
     * that have rewards waiting to be redeemed by the given beneficiary.
     * `ProposalRewards` includes the total amount redeemable, the amount
     * yet-to-be redeemed and where applicable, the amount that the Dao has available
     * to pay out.  The latter is useful for anticipating whether an attempt
     * to redeem would succeed.
     * @param {GetBeneficiaryRewardsParams} options
     */
    getBeneficiaryRewards(options?: GetBeneficiaryRewardsParams): Promise<Array<ProposalRewards>>;
    getParametersHash(params: ContributionRewardParams): Promise<Hash>;
    setParameters(params: ContributionRewardParams & TxGeneratingFunctionOptions): Promise<ArcTransactionDataResult<Hash>>;
    /**
     * Returns promise of a `ContributionProposal` for the given proposal id and avatar address.
     * @param avatarAddress
     * @param proposalId
     */
    getProposal(avatarAddress: Address, proposalId: Hash): Promise<ContributionProposal>;
    getDefaultPermissions(): SchemePermissions;
    getSchemePermissions(avatarAddress: Address): Promise<SchemePermissions>;
    getSchemeParameters(avatarAddress: Address): Promise<ContributionRewardParamsReturn>;
    getParameters(paramsHash: Hash): Promise<ContributionRewardParamsReturn>;
    protected hydrated(): void;
    private computeRemainingReward(proposalRewards, proposal, rewardName, avatarAddress, rewardType);
    private convertProposalPropsArrayToObject(propsArray, proposalId);
}
export declare enum RewardType {
    Reputation = 0,
    NativeToken = 1,
    Eth = 2,
    ExternalToken = 3,
}
export declare const ContributionRewardFactory: ContractWrapperFactory<ContributionRewardWrapper>;
export interface NewContributionProposalEventResult {
    /**
     * indexed
     */
    _avatar: Address;
    _beneficiary: Address;
    _contributionDescription: Hash;
    _externalToken: Address;
    /**
     * indexed
     */
    _intVoteInterface: Address;
    /**
     * indexed
     */
    _proposalId: Hash;
    _reputationChange: BigNumber;
    _rewards: Array<BigNumber>;
}
export interface ContributionProposal {
    proposalId: Hash;
    beneficiaryAddress: Address;
    contributionDescriptionHash: Hash;
    ethReward: BigNumber;
    executionTime: number;
    externalToken: Address;
    externalTokenReward: BigNumber;
    nativeTokenReward: BigNumber;
    numberOfPeriods: number;
    periodLength: number;
    reputationChange: BigNumber;
}
export interface ProposalRewards {
    /**
     * The amount of ETH the DAO currently has on hand to reward.
     */
    ethAvailableToReward: BigNumber;
    /**
     * The total ETH reward
     */
    ethReward: BigNumber;
    /**
     * The total unredeemed amount of ETH
     */
    ethRewardUnredeemed: BigNumber;
    /**
     * The currently-redeemable external token reward
     */
    ethRewardRedeemable: BigNumber;
    /**
     * The amount of external tokens the DAO currently has on hand to reward.
     */
    externalTokensAvailableToReward: BigNumber;
    /**
     * The total external token reward
     */
    externalTokenReward: BigNumber;
    /**
     * The total unredeemed number of external tokens
     */
    externalTokenRewardUnredeemed: BigNumber;
    /**
     * The currently-redeemable external token reward
     */
    externalTokenRewardRedeemable: BigNumber;
    /**
     * The total native token reward
     */
    nativeTokenReward: BigNumber;
    /**
     * The total unredeemed number of native tokens
     */
    nativeTokenRewardUnredeemed: BigNumber;
    /**
     * The currently-redeemable native token reward
     */
    nativeTokenRewardRedeemable: BigNumber;
    /**
     * The proposal Id
     */
    proposalId: Hash;
    /**
     * The total reputation reward
     */
    reputationChange: BigNumber;
    /**
     * The total unredeemed amount of reputation
     */
    reputationChangeUnredeemed: BigNumber;
    /**
     * The currently-redeemable reputation reward
     */
    reputationChangeRedeemable: BigNumber;
}
export interface ContributionRewardParams extends StandardSchemeParams {
    orgNativeTokenFee: BigNumber | string;
}
export interface ContributionRewardParamsReturn extends StandardSchemeParams {
    orgNativeTokenFee: BigNumber;
}
export interface ContributionRewardSpecifiedRedemptionParams {
    /**
     * The avatar under which the proposal was made
     */
    avatar: Address;
    /**
     * The reward proposal
     */
    proposalId: string;
}
export interface GetBeneficiaryRewardsParams {
    /**
     * The avatar under which the proposals were created
     */
    avatar: Address;
    /**
     * The agent who is to receive the rewards
     */
    beneficiaryAddress: string;
    /**
     * Optionally filter on the given proposalId
     */
    proposalId?: string;
}
export interface ProposeContributionRewardParams {
    /**
     * avatar address
     */
    avatar: Address;
    /**
     * description of the constraint
     */
    description: string;
    /**
     * Amount of reputation change requested, per period.
     * Can be negative.  In Wei. Default is 0;
     */
    reputationChange?: BigNumber | string;
    /**
     * Reward in tokens per period, in the DAO's native token.
     * Must be >= 0.
     * In Wei. Default is 0;
     */
    nativeTokenReward?: BigNumber | string;
    /**
     * Reward per period, in ethers.
     * Must be >= 0.
     * In Wei. Default is 0;
     */
    ethReward?: BigNumber | string;
    /**
     * Reward per period in the given external token.
     * Must be >= 0.
     * In Wei. Default is 0;
     */
    externalTokenReward?: BigNumber | string;
    /**
     * The number of blocks in a period.
     * Must be >= 0.  If zero then the rewards will be redeemable immediately
     * upon proposal execution.
     */
    periodLength: number;
    /**
     * Maximum number of periods that can be paid out.
     * Must be > 0.
     */
    numberOfPeriods: number;
    /**
     * The address of the external token (for externalTokenReward)
     * Only required when externalTokenReward is non-zero.
     */
    externalToken?: string;
    /**
     *  beneficiary address
     */
    beneficiaryAddress: string;
}
export interface ContributionRewardRedeemParams {
    /**
     * The reward proposal
     */
    proposalId: string;
    /**
     * The avatar under which the proposal was made
     */
    avatar: Address;
    /**
     * true to credit/debit reputation
     * Default is false
     */
    reputation?: boolean;
    /**
     * true to reward native tokens
     * Default is false
     */
    nativeTokens?: boolean;
    /**
     * true to reward ethers
     * Default is false
     */
    ethers?: boolean;
    /**
     * true to reward external tokens
     * Default is false
     */
    externalTokens?: boolean;
}
