import { ValidationContext } from "../validation/ValidationContext";
import { SendVoteorder } from "../protocol/SendVoteorder";
export declare abstract class Rule {
    rule: string;
    /**
     * Validates a voteorder.
     * @param voteorder - a voteorder
     * @param context - validation context (allows post loading, etc)
     * @throws ValidationException - when an voteorder is invalid according to this rule
     */
    abstract validate(voteorder: SendVoteorder, context: ValidationContext): Promise<void>;
    /**
     * Validates an unprototyped rule object. It checks weather it has all required properties,
     * if modes are correct, and so on.
     */
    abstract validateRuleObject(unprototypedRule: any): void;
    abstract type(): Rule.Type;
    abstract getDescription(): string;
}
export declare namespace Rule {
    enum Type {
        Tags = "tags",
        Authors = "authors",
        Weight = "weight",
        WeightForPeriod = "weight_for_period",
        CustomRPC = "custom_rpc",
        VotingPower = "voting_power",
        VotesCount = "votes_count",
        Voters = "voters",
        FirstPost = "first_post",
        Payout = "payout",
        AgeOfPost = "age_of_post",
        ExpirationDate = "expiration_date"
    }
}
export declare namespace Rule {
    /**
     * This is an TS 1.6+ TypeGuard as described here: https://www.typescriptlang.org/docs/handbook/advanced-types.html
     */
    function isRule(o: object): o is Rule;
}
