import * as BigNumber from "bignumber.js";
import { Address, BinaryVoteResult, DefaultSchemePermissions, GetDaoProposalsConfig, Hash, SchemePermissions, SchemeWrapper, VoteConfig } from "../commonTypes";
import { ArcTransactionDataResult, ArcTransactionProposalResult, ArcTransactionResult, ContractWrapperBase, EventFetcherFactory } from "../contractWrapperBase";
import ContractWrapperFactory from "../contractWrapperFactory";
import { ExecuteProposalEventResult, NewProposalEventResult, RedeemReputationEventResult, VoteProposalEventResult } from "./commonEventInterfaces";
export declare class GenesisProtocolWrapper extends ContractWrapperBase implements SchemeWrapper {
    name: string;
    frendlyName: string;
    factory: ContractWrapperFactory<GenesisProtocolWrapper>;
    /**
     * Events
     */
    NewProposal: EventFetcherFactory<NewProposalEventResult>;
    ExecuteProposal: EventFetcherFactory<GenesisProtocolExecuteProposalEventResult>;
    VoteProposal: EventFetcherFactory<VoteProposalEventResult>;
    Stake: EventFetcherFactory<StakeEventResult>;
    Redeem: EventFetcherFactory<RedeemEventResult>;
    RedeemReputation: EventFetcherFactory<RedeemReputationEventResult>;
    /**
     * Create a proposal
     * @param {ProposeVoteConfig} options
     * @returns Promise<ArcTransactionProposalResult>
     */
    propose(opts?: ProposeVoteConfig): Promise<ArcTransactionProposalResult>;
    /**
     * Stake some tokens on the final outcome matching this vote.
     *
     * A transfer of tokens from the staker to this GenesisProtocol scheme
     * is automatically approved and executed on the token with which
     * this GenesisProtocol scheme was deployed.
     *
     * @param {StakeConfig} opts
     * @returns Promise<ArcTransactionResult>
     */
    stake(opts?: StakeConfig): Promise<ArcTransactionResult>;
    /**
     * Vote on a proposal
     * @param {VoteConfig} opts
     * @returns Promise<ArcTransactionResult>
     */
    vote(opts?: VoteConfig): Promise<ArcTransactionResult>;
    /**
     * Vote on a proposal, staking some reputation that the final outcome will match this vote.
     * Reputation of 0 will stake all the voter's reputation.
     * @param {VoteWithSpecifiedAmountsConfig} opts
     * @returns Promise<ArcTransactionResult>
     */
    voteWithSpecifiedAmounts(opts?: VoteWithSpecifiedAmountsConfig): Promise<ArcTransactionResult>;
    /**
     * Redeem any tokens and reputation that are due the beneficiary from the outcome of the proposal.
     * @param {RedeemConfig} opts
     * @returns Promise<ArcTransactionResult>
     */
    redeem(opts?: RedeemConfig): Promise<ArcTransactionResult>;
    /**
     * Return whether a proposal should be shifted to the boosted phase.
     * @param {ShouldBoostConfig} opts
     * @returns Promise<boolean>
     */
    shouldBoost(opts?: ShouldBoostConfig): Promise<boolean>;
    /**
     * Return the current proposal score.
     * @param {GetScoreConfig} opts
     * @returns Promise<BigNumber.BigNumber>
     */
    getScore(opts?: GetScoreConfig): Promise<BigNumber.BigNumber>;
    /**
     * Return the threshold that is required by a proposal to it shift it into boosted state.
     * The computation depends on the current number of boosted proposals in the DAO
     * as well as the GenesisProtocol parameters thresholdConstA and thresholdConstB.
     * @param {GetThresholdConfig} opts
     * @returns Promise<number>
     */
    getThreshold(opts?: GetThresholdConfig): Promise<number>;
    /**
     * Return the token amount to which the given staker is entitled in the event that the proposal is approved.
     * @param {GetRedeemableTokensStakerConfig} opts
     * @returns Promise<BigNumber.BigNumber>
     */
    getRedeemableTokensStaker(opts?: GetRedeemableTokensStakerConfig): Promise<BigNumber.BigNumber>;
    /**
     * Return the reputation amount to which the proposal proposer is entitled in the event that the proposal is approved.
     * @param {GetRedeemableReputationProposerConfig} opts
     * @returns Promise<BigNumber.BigNumber>
     */
    getRedeemableReputationProposer(opts?: GetRedeemableReputationProposerConfig): Promise<BigNumber.BigNumber>;
    /**
     * Return the token amount to which the voter is entitled in the event that the proposal is approved.
     * @param {GetRedeemableTokensVoterConfig} opts
     * @returns Promise<BigNumber.BigNumber>
     */
    getRedeemableTokensVoter(opts?: GetRedeemableTokensVoterConfig): Promise<BigNumber.BigNumber>;
    /**
     * Return the reputation amount to which the voter is entitled in the event that the proposal is approved.
     * @param {GetRedeemableReputationVoterConfig} opts
     * @returns Promise<BigNumber.BigNumber>
     */
    getRedeemableReputationVoter(opts?: GetRedeemableReputationVoterConfig): Promise<BigNumber.BigNumber>;
    /**
     * Return the reputation amount to which the staker is entitled in the event that the proposal is approved.
     * @param {GetRedeemableReputationStakerConfig} opts
     * @returns Promise<BigNumber.BigNumber>
     */
    getRedeemableReputationStaker(opts?: GetRedeemableReputationStakerConfig): Promise<BigNumber.BigNumber>;
    /**
     * Return the number of possible choices when voting for the proposal.
     * @param {GetNumberOfChoicesConfig} opts
     * @returns Promise<number>
     */
    getNumberOfChoices(opts?: GetNumberOfChoicesConfig): Promise<number>;
    /**
     * Return the vote and the amount of reputation of the voter committed to this proposal
     * @param {GetVoterInfoResult} opts
     * @returns Promise<GetVoterInfoResult>
     */
    getVoterInfo(opts?: GetVoterInfoConfig): Promise<GetVoterInfoResult>;
    /**
     * Returns the reputation currently voted on the given choice.
     * @param {GetVoteStatusConfig} opts
     * @returns Promise<BigNumber.BigNumber>
     */
    getVoteStatus(opts?: GetVoteStatusConfig): Promise<BigNumber.BigNumber>;
    /**
     * Return whether the proposal is in a votable state.
     * @param {IsVotableConfig} opts
     * @returns Promise<boolean>
     */
    isVotable(opts?: IsVotableConfig): Promise<boolean>;
    /**
     * Return the total votes, total staked, voter stakes and staker stakes for a given proposal
     * @param {GetProposalStatusConfig} opts
     * @returns Promise<GetProposalStatusResult>
     */
    getProposalStatus(opts?: GetProposalStatusConfig): Promise<GetProposalStatusResult>;
    /**
     * Return the DAO avatar address under which the proposal was made
     * @param {GetProposalAvatarConfig} opts
     * @returns Promise<string>
     */
    getProposalAvatar(opts?: GetProposalAvatarConfig): Promise<string>;
    /**
     * Return the score threshold params for the given DAO.
     * @param {GetScoreThresholdParamsConfig} opts
     * @returns Promise<GetScoreThresholdParamsResult>
     */
    getScoreThresholdParams(opts?: GetScoreThresholdParamsConfig): Promise<GetScoreThresholdParamsResult>;
    /**
     * Return the vote and stake amount for a given proposal and staker.
     * @param {GetStakerInfoConfig} opts
     * @returns Promise<GetStakerInfoResult>
     */
    getStakerInfo(opts?: GetStakerInfoConfig): Promise<GetStakerInfoResult>;
    /**
     * Return the amount stakes behind a given proposal and vote.
     * @param {GetVoteStakeConfig} opts
     * @returns Promise<BigNumber.BigNumber>
     */
    getVoteStake(opts?: GetVoteStakeConfig): Promise<BigNumber.BigNumber>;
    /**
     * Return the winningVote for a given proposal.
     * @param {GetWinningVoteConfig} opts
     * @returns Promise<number>
     */
    getWinningVote(opts?: GetWinningVoteConfig): Promise<number>;
    /**
     * Return the current state of a given proposal.
     * @param {GetStateConfig} opts
     * @returns Promise<number>
     */
    getState(opts?: GetStateConfig): Promise<ProposalState>;
    /**
     * Return all executed GenesisProtocol proposals created under the given avatar.
     * Filter by the optional proposalId.
     */
    getExecutedDaoProposals(opts?: GetDaoProposalsConfig): Promise<Array<ExecutedGenesisProposal>>;
    /**
     * Set the contract parameters.
     * @param {GenesisProtocolParams} params
     * @returns parameters hash
     */
    setParameters(params: GenesisProtocolParams): Promise<ArcTransactionDataResult<Hash>>;
    getDefaultPermissions(overrideValue?: SchemePermissions | DefaultSchemePermissions): SchemePermissions;
    getSchemePermissions(avatarAddress: Address): Promise<SchemePermissions>;
    getSchemeParameters(avatarAddress: Address): Promise<GenesisProtocolParams>;
    getParameters(paramsHash: Hash): Promise<GenesisProtocolParams>;
    private _validateVote(vote, proposalId);
}
export declare const GenesisProtocolFactory: ContractWrapperFactory<GenesisProtocolWrapper>;
export interface StakeEventResult {
    _amount: BigNumber.BigNumber;
    /**
     * indexed
     */
    _proposalId: Hash;
    _vote: number;
    /**
     * indexed
     */
    _voter: Address;
}
export interface RedeemEventResult {
    _amount: BigNumber.BigNumber;
    /**
     * indexed
     */
    _beneficiary: Address;
    /**
     * indexed
     */
    _proposalId: Hash;
}
export interface GenesisProtocolParams {
    /**
     * The percentage of the absolute vote that must be exceeded to result in a win.
     * Must be between 0 and 100.
     * Default is 50.
     */
    preBoostedVoteRequiredPercentage: number;
    /**
     * The time limit in seconds for a proposal to be in an absolute voting mode.
     * Default is 5184000 (two months).
     */
    preBoostedVotePeriodLimit: number;
    /**
     * The time limit in seconds for a proposal to be in an relative voting mode.
     * Default is 604800 (one week).
     */
    boostedVotePeriodLimit: number;
    /**
     * Constant A in the threshold calculation,in Wei. See [[GenesisProtocolWrapper.getThreshold]].
     * Default is 2, converted to Wei
     */
    thresholdConstA: BigNumber.BigNumber | string;
    /**
     * Constant B in the threshold calculation. See [[GenesisProtocolWrapper.getThreshold]].
     * Default is 10
     */
    thresholdConstB: number;
    /**
     * A floor on the staking fee which is normally computed using [[GenesisProtocolParams.stakerFeeRatioForVoters]].
     * Default is 0
     */
    minimumStakingFee: number;
    /**
     * The duration of the quietEndingPeriod, in seconds.
     * Default is 7200 (two hours)
     */
    quietEndingPeriod: number;
    /**
     * Constant A in the calculation of the proposer's reward, in Wei
     * See [[GenesisProtocolWrapper.getRedeemableReputationProposer]].
     * Default is 5, converted to Wei.
     */
    proposingRepRewardConstA: BigNumber.BigNumber | string;
    /**
     * Constant B in the calculation of the proposer's reward, in Wei
     * See [[GenesisProtocolWrapper.getRedeemableReputationProposer]].
     * Default is 5, converted to Wei.
     */
    proposingRepRewardConstB: BigNumber.BigNumber | string;
    /**
     * The percentage of a stake that is given to all voters.
     * Voters (pre and during boosting period) share this amount in proportion to their reputation.
     * Must be between 0 and 100.
     * Default is 1.
     */
    stakerFeeRatioForVoters: number;
    /**
     * The percentage of lost reputation, in proportion to voters' reputation.
     * Must be between 0 and 100.
     * Default is 80
     */
    votersGainRepRatioFromLostRep: number;
    /**
     * The percentage of reputation that is lost by pre-booster voters.
     * Must be between 0 and 100.
     * Default is 1
     */
    votersReputationLossRatio: number;
}
/**
 * Javascript version of the Arc ExecutableInterface,
 * for information purposes.
 */
export interface ExecutableInterface {
    execute(proposalId: number, avatar: Address, vote: number): Promise<boolean>;
}
export interface ProposeVoteConfig {
    /**
     * The DAO's avatar under which the proposal is being made.
     */
    avatar: Address;
    /**
     * address of the agent making the proposal.
     * Default is the current default account.
     */
    proposer: string;
    /**
     * number of choices when voting.  Must be between 1 and 10.
     */
    numOfChoices: number;
    /**
     * contract that implements ExecutableInterface to invoke if/when the vote passes
     */
    executable: string;
}
export interface GetVoterInfoResult {
    vote: number;
    reputation: BigNumber.BigNumber;
}
export interface GetProposalStatusResult {
    /**
     * Amount of reputation voted
     */
    totalVotes: BigNumber.BigNumber;
    /**
     * Number of staked tokens currently redeemable by stakers
     */
    totalStakerStakes: BigNumber.BigNumber;
    /**
     * Total number of staked tokens currently redeemable by everyone
     */
    totalStaked: BigNumber.BigNumber;
    /**
     * Number of staked tokens set aside and redeemable for all voters (via the staking fee)
     */
    totalVoterStakes: BigNumber.BigNumber;
}
export interface GetScoreThresholdParamsResult {
    thresholdConstA: BigNumber.BigNumber;
    thresholdConstB: number;
}
export interface GetStakerInfoResult {
    vote: number;
    stake: BigNumber.BigNumber;
}
export interface StakeConfig {
    /**
     * token amount to stake on the outcome resulting in this vote, in Wei
     */
    amount: BigNumber.BigNumber | string;
    /**
     * stake on behalf of this agent
     */
    onBehalfOf?: Address;
    /**
     * unique hash of proposal index
     */
    proposalId: string;
    /**
     * the choice of vote. Can be 1 (YES) or 2 (NO).
     */
    vote: number;
}
export interface VoteWithSpecifiedAmountsConfig {
    /**
     * unique hash of proposal index
     */
    proposalId: string;
    /**
     * the choice of vote. Can be 1 (YES) or 2 (NO).
     */
    vote: number;
    /**
     * reputation to put behind this vote, in Wei
     */
    reputation: BigNumber.BigNumber | string;
}
export interface RedeemConfig {
    /**
     * unique hash of proposal index
     */
    proposalId: string;
    /**
     * agent to whom to award the proposal payoffs
     */
    beneficiaryAddress: Address;
}
export interface ShouldBoostConfig {
    /**
     * unique hash of proposal index
     */
    proposalId: string;
}
export interface GetScoreConfig {
    /**
     * unique hash of proposal index
     */
    proposalId: string;
}
export interface GetThresholdConfig {
    /**
     * the DAO's avatar address
     */
    avatar: Address;
    /**
     * unique hash of proposal index
     */
    proposalId: string;
}
/**
 * return the amount of tokens to which the staker will be entitled as an outcome of the proposal
 */
export interface GetRedeemableTokensStakerConfig {
    /**
     * unique hash of proposal index
     */
    proposalId: string;
    /**
     * the staker
     */
    beneficiaryAddress: Address;
}
/**
 * return the amount of reputation to which the proposer will be entitled as an outcome of the proposal
 */
export interface GetRedeemableReputationProposerConfig {
    /**
     * unique hash of proposal index
     */
    proposalId: string;
}
/**
 * return the amount of tokens to which the voter will be entitled as an outcome of the proposal
 */
export interface GetRedeemableTokensVoterConfig {
    /**
     * unique hash of proposal index
     */
    proposalId: string;
    /**
     * the voter
     */
    beneficiaryAddress: Address;
}
/**
 * return the amount of reputation to which the voter will be entitled as an outcome of the proposal
 */
export interface GetRedeemableReputationVoterConfig {
    /**
     * unique hash of proposal index
     */
    proposalId: string;
    /**
     * the voter
     */
    beneficiaryAddress: Address;
}
/**
 * return the amount of reputation to which the staker will be entitled as an outcome of the proposal
 */
export interface GetRedeemableReputationStakerConfig {
    /**
     * unique hash of proposal index
     */
    proposalId: string;
    /**
     * the staker
     */
    beneficiaryAddress: Address;
}
export interface GetNumberOfChoicesConfig {
    /**
     * unique hash of proposal index
     */
    proposalId: string;
}
export interface GetVoterInfoConfig {
    /**
     * unique hash of proposal index
     */
    proposalId: string;
    voter: string;
}
export interface GetVoteStatusConfig {
    /**
     * unique hash of proposal index
     */
    proposalId: string;
    /**
     * the choice of vote. Can be 1 (YES) or 2 (NO).
     */
    vote: number;
}
export interface IsVotableConfig {
    /**
     * unique hash of proposal index
     */
    proposalId: string;
}
export interface GetProposalStatusConfig {
    /**
     * unique hash of proposal index
     */
    proposalId: string;
}
export interface GetTotalReputationSupplyConfig {
    /**
     * unique hash of proposal index
     */
    proposalId: string;
}
export interface GetProposalAvatarConfig {
    /**
     * unique hash of proposal index
     */
    proposalId: string;
}
export interface GetScoreThresholdParamsConfig {
    /**
     * the DAO's avatar address
     */
    avatar: Address;
}
export interface GetStakerInfoConfig {
    /**
     * unique hash of proposal index
     */
    proposalId: string;
    /**
     * address of the staking agent
     */
    staker: string;
}
export interface GetVoteStakeConfig {
    /**
     * unique hash of proposal index
     */
    proposalId: string;
    /**
     * the choice of vote. Can be 1 (YES) or 2 (NO).
     */
    vote: number;
}
export interface GetWinningVoteConfig {
    /**
     * unique hash of proposal index
     */
    proposalId: string;
}
export interface GetStateConfig {
    /**
     * unique hash of proposal index
     */
    proposalId: string;
}
export declare enum ExecutionState {
    None = 0,
    PreBoostedTimeOut = 1,
    PreBoostedBarCrossed = 2,
    BoostedTimeOut = 3,
    BoostedBarCrossed = 4,
}
export interface GenesisProtocolExecuteProposalEventResult extends ExecuteProposalEventResult {
    /**
     * _executionState.toNumber() will give you a value from the enum `ExecutionState`
     */
    _executionState: BigNumber.BigNumber;
}
export interface ExecutedGenesisProposal {
    decision: BinaryVoteResult;
    proposalId: Hash;
    /**
     * total reputation in the DAO at the time the proposal is created in the voting machine
     */
    totalReputation: BigNumber.BigNumber;
    executionState: ExecutionState;
}
export declare enum ProposalState {
    None = 0,
    Closed = 1,
    Executed = 2,
    PreBoosted = 3,
    Boosted = 4,
    QuietEndingPeriod = 5,
}
