import * as BigNumber from "bignumber.js";
import { Address, BinaryVoteResult, GetDaoProposalsConfig, Hash, SchemePermissions, SchemeWrapper, VoteConfig } from "../commonTypes";
import { ArcTransactionDataResult, ArcTransactionProposalResult, ArcTransactionResult, ContractWrapperBase, EventFetcherFactory } from "../contractWrapperBase";
import { ContractWrapperFactory } from "../contractWrapperFactory";
import { ExecuteProposalEventResult, NewProposalEventResult, RedeemEventResult, VoteProposalEventResult } from "./commonEventInterfaces";
export declare class GenesisProtocolWrapper extends ContractWrapperBase implements SchemeWrapper {
    name: string;
    friendlyName: string;
    factory: ContractWrapperFactory<GenesisProtocolWrapper>;
    /**
     * Events
     */
    NewProposal: EventFetcherFactory<NewProposalEventResult>;
    ExecuteProposal: EventFetcherFactory<GenesisProtocolExecuteProposalEventResult>;
    VoteProposal: EventFetcherFactory<VoteProposalEventResult>;
    Stake: EventFetcherFactory<StakeEventResult>;
    Redeem: EventFetcherFactory<RedeemEventResult>;
    RedeemDaoBounty: EventFetcherFactory<RedeemEventResult>;
    RedeemReputation: EventFetcherFactory<RedeemEventResult>;
    /**
     * Create a proposal
     * @param {ProposeVoteConfig} options
     * @returns Promise<ArcTransactionProposalResult>
     */
    propose(options?: 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} options
     * @returns Promise<ArcTransactionResult>
     */
    stake(options?: StakeConfig): Promise<ArcTransactionResult>;
    /**
     * Vote on a proposal
     * @param {VoteConfig} options
     * @returns Promise<ArcTransactionResult>
     */
    vote(options?: 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} options
     * @returns Promise<ArcTransactionResult>
     */
    voteWithSpecifiedAmounts(options?: VoteWithSpecifiedAmountsConfig): Promise<ArcTransactionResult>;
    /**
     * Redeem any tokens and reputation, excluding bounty, that are due the beneficiary from the outcome of the proposal.
     * @param {RedeemConfig} options
     * @returns Promise<ArcTransactionResult>
     */
    redeem(options?: RedeemConfig): Promise<ArcTransactionResult>;
    /**
     * Redeem any token bounty that are due the beneficiary from the outcome of the proposal.
     * @param {RedeemConfig} options
     * @returns Promise<ArcTransactionResult>
     */
    redeemDaoBounty(options?: RedeemConfig): Promise<ArcTransactionResult>;
    /**
     * Return whether a proposal should be shifted to the boosted phase.
     * @param {ShouldBoostConfig} options
     * @returns Promise<boolean>
     */
    shouldBoost(options?: ShouldBoostConfig): Promise<boolean>;
    /**
     * Return the current proposal score.
     * @param {GetScoreConfig} options
     * @returns Promise<BigNumber.BigNumber>
     */
    getScore(options?: 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} options
     */
    getThreshold(options?: GetThresholdConfig): Promise<BigNumber.BigNumber>;
    /**
     * Return the reputation amount to which the proposal proposer is entitled in the event that the proposal is approved.
     * @param {GetRedeemableReputationProposerConfig} options
     * @returns Promise<BigNumber.BigNumber>
     */
    getRedeemableReputationProposer(options?: GetRedeemableReputationProposerConfig): Promise<BigNumber.BigNumber>;
    /**
     * Return the token amount to which the voter is entitled in the event that the proposal is approved.
     * @param {GetRedeemableTokensVoterConfig} options
     * @returns Promise<BigNumber.BigNumber>
     */
    getRedeemableTokensVoter(options?: GetRedeemableTokensVoterConfig): Promise<BigNumber.BigNumber>;
    /**
     * Return the reputation amount to which the voter is entitled in the event that the proposal is approved.
     * @param {GetRedeemableReputationVoterConfig} options
     * @returns Promise<BigNumber.BigNumber>
     */
    getRedeemableReputationVoter(options?: GetRedeemableReputationVoterConfig): Promise<BigNumber.BigNumber>;
    /**
     * Return the token amount to which the given staker is entitled in the event that the proposal is approved.
     * @param {GetRedeemableRewardsStakerConfig} opts
     * @returns Promise<BigNumber.BigNumber>
     */
    getRedeemableTokensStaker(options?: GetRedeemableRewardsStakerConfig): Promise<BigNumber.BigNumber>;
    /**
     * Return the token amount of bounty to which the given staker is entitled in the event that the proposal is approved.
     * @param {GetRedeemableRewardsStakerConfig} opts
     * @returns Promise<BigNumber.BigNumber>
     */
    getRedeemableTokensStakerBounty(options?: GetRedeemableRewardsStakerConfig): Promise<BigNumber.BigNumber>;
    /**
     * Return the reputation amount to which the staker is entitled in the event that the proposal is approved.
     * @param {GetRedeemableReputationStakerConfig} options
     * @returns Promise<BigNumber.BigNumber>
     */
    getRedeemableReputationStaker(options?: GetRedeemableReputationStakerConfig): Promise<BigNumber.BigNumber>;
    /**
     * Return the current balances on this GenesisProtocol's staking and the given avatar's native tokens.
     * This can be useful, for example, if you want to know in advance whether the avatar has enough funds
     * at the moment to payout rewards to stakers and voters.
     * It also returns the respective tokens' truffle contracts.
     * @param options
     */
    getTokenBalances(options?: GetTokenBalancesOptions): Promise<GenesisProtocolDaoTokenBalances>;
    /**
     * Return the number of possible choices when voting for the proposal.
     * @param {GetNumberOfChoicesConfig} options
     * @returns Promise<number>
     */
    getNumberOfChoices(options?: GetNumberOfChoicesConfig): Promise<number>;
    /**
     * Return the vote and the amount of reputation of the voter committed to this proposal
     * @param {GetVoterInfoResult} options
     * @returns Promise<GetVoterInfoResult>
     */
    getVoterInfo(options?: GetVoterInfoConfig): Promise<GetVoterInfoResult>;
    /**
     * Returns the reputation currently voted on the given choice.
     * @param {GetVoteStatusConfig} options
     * @returns Promise<BigNumber.BigNumber>
     */
    getVoteStatus(options?: GetVoteStatusConfig): Promise<BigNumber.BigNumber>;
    /**
     * Return whether the proposal is in a votable state.
     * @param {IsVotableConfig} options
     * @returns Promise<boolean>
     */
    isVotable(options?: IsVotableConfig): Promise<boolean>;
    /**
     * Return the total votes, total staked, voter stakes and staker stakes for a given proposal
     * @param {GetProposalStatusConfig} options
     * @returns Promise<GetProposalStatusResult>
     */
    getProposalStatus(options?: GetProposalStatusConfig): Promise<GetProposalStatusResult>;
    /**
     * Return the DAO avatar address under which the proposal was made
     * @param {GetProposalAvatarConfig} options
     * @returns Promise<string>
     */
    getProposalAvatar(options?: GetProposalAvatarConfig): Promise<string>;
    /**
     * Return the score threshold params for the given DAO.
     * @param {GetScoreThresholdParamsConfig} options
     * @returns Promise<GetScoreThresholdParamsResult>
     */
    getScoreThresholdParams(options?: GetScoreThresholdParamsConfig): Promise<GetScoreThresholdParamsResult>;
    /**
     * Return the vote and stake amount for a given proposal and staker.
     * @param {GetStakerInfoConfig} options
     * @returns Promise<GetStakerInfoResult>
     */
    getStakerInfo(options?: GetStakerInfoConfig): Promise<GetStakerInfoResult>;
    /**
     * Return the amount stakes behind a given proposal and vote.
     * @param {GetVoteStakeConfig} options
     * @returns Promise<BigNumber.BigNumber>
     */
    getVoteStake(options?: GetVoteStakeConfig): Promise<BigNumber.BigNumber>;
    /**
     * Return the winningVote for a given proposal.
     * @param {GetWinningVoteConfig} options
     * @returns Promise<number>
     */
    getWinningVote(options?: GetWinningVoteConfig): Promise<number>;
    /**
     * Return the current state of a given proposal.
     * @param {GetStateConfig} options
     * @returns Promise<number>
     */
    getState(options?: GetStateConfig): Promise<ProposalState>;
    /**
     * Return all executed GenesisProtocol proposals created under the given avatar.
     * Filter by the optional proposalId.
     */
    getExecutedDaoProposals(options?: GetDaoProposalsConfig): Promise<Array<ExecutedGenesisProposal>>;
    /**
     * Set the contract parameters.
     * @param {GenesisProtocolParams} params
     * @returns parameters hash
     */
    setParameters(params: GenesisProtocolParams): Promise<ArcTransactionDataResult<Hash>>;
    getDefaultPermissions(): SchemePermissions;
    getSchemePermissions(avatarAddress: Address): Promise<SchemePermissions>;
    getSchemeParameters(avatarAddress: Address): Promise<GenesisProtocolParams>;
    getParameters(paramsHash: Hash): Promise<GenesisProtocolParams>;
    private _validateVote(vote, proposalId);
}
/**
 * defined just to add good type checking
 */
export declare class GenesisProtocolFactoryType extends ContractWrapperFactory<GenesisProtocolWrapper> {
    /**
     * Migrate a new instance of GenesisProtocol.
     * @param stakingTokenAddress The token that will be used when staking.  Typically
     * is the token of the DAO that is going to use this GenesisProtocol.
     */
    new(stakingTokenAddress: Address): Promise<GenesisProtocolWrapper>;
}
export declare const GenesisProtocolFactory: GenesisProtocolFactoryType;
export interface StakeEventResult {
    _amount: BigNumber.BigNumber;
    /**
     * indexed
     */
    _proposalId: Hash;
    _vote: number;
    /**
     * indexed
     */
    _voter: Address;
}
export interface GenesisProtocolParams {
    /**
     * The time limit in seconds for a proposal to be in relative voting mode.
     * Default is 259200 (three days).
     */
    boostedVotePeriodLimit: number;
    /**
     * Multiple of a winning stake to be rewarded as bounty.
     * Must be greater than stakerFeeRatioForVoters and less than 2*stakerFeeRatioForVoters.
     */
    daoBountyConst: number;
    /**
     * Upper bound on the total bounty amount on a proposal.
     */
    daoBountyLimit: BigNumber.BigNumber | string;
    /**
     * A floor on the staking fee which is normally computed using
     * [[GenesisProtocolParams.stakerFeeRatioForVoters]], in Wei.
     * Default is 0.
     */
    minimumStakingFee: BigNumber.BigNumber | string;
    /**
     * The time limit in seconds for a proposal to be in absolute voting mode.
     * Default is 1814400 (three weeks).
     */
    preBoostedVotePeriodLimit: number;
    /**
     * 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;
    /**
     * Constant A in the calculation of the proposer's reward.
     * See [[GenesisProtocolWrapper.getRedeemableReputationProposer]].
     * Must be between 0 and 100000000.
     * Default is 5.
     */
    proposingRepRewardConstA: number;
    /**
     * Constant B in the calculation of the proposer's reward.
     * See [[GenesisProtocolWrapper.getRedeemableReputationProposer]].
     * Must be between 0 and 100000000.
     * Default is 5.
     */
    proposingRepRewardConstB: number;
    /**
     * The duration of the quietEndingPeriod, in seconds.
     * Default is 86400 (one day).
     */
    quietEndingPeriod: number;
    /**
     * 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 50.
     */
    stakerFeeRatioForVoters: number;
    /**
     * Constant A in the threshold calculation,in Wei. See [[GenesisProtocolWrapper.getThreshold]].
     * Must be between 0 and 100000000 (converted to Wei).
     * Default is 7, converted to Wei.
     */
    thresholdConstA: BigNumber.BigNumber | string;
    /**
     * Constant B in the threshold calculation. See [[GenesisProtocolWrapper.getThreshold]].
     * Must be greater than zero and less than or equal to 100000000.
     * Default is 3.
     */
    thresholdConstB: number;
    /**
     * The percentage of losing pre-boosted voters' lost reputation (see votersReputationLossRatio)
     * rewarded to winning pre-boosted voters.
     * Must be between 0 and 100.
     * Default is 80.
     */
    votersGainRepRatioFromLostRep: number;
    /**
     * The percentage of reputation deducted from losing pre-boosted 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;
    /**
     * Optional 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 bounty or staked tokens to which the staker will be entitled as an outcome of the proposal
 */
export interface GetRedeemableRewardsStakerConfig {
    /**
     * 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,
}
export interface GetTokenBalancesOptions {
    avatarAddress: Address;
}
export interface GenesisProtocolDaoTokenBalances {
    /**
     * The native token's truffle contract
     */
    nativeToken: any;
    /**
     * The avatar's balance off native tokens, in Wei
     */
    nativeTokenBalance: BigNumber.BigNumber;
    /**
     * The standard token's truffle contract
     */
    stakingToken: any;
    /**
     * The avatar's balance of staking tokens, in Wei
     */
    stakingTokenBalance: BigNumber.BigNumber;
}
export declare const GetDefaultGenesisProtocolParameters: () => Promise<GenesisProtocolParams>;
