/// <reference types="node" />
import { Point, Scalar } from "@dedis/kyber";
import ByzCoinRPC from "../byzcoin/byzcoin-rpc";
import Instance, { InstanceID } from "../byzcoin/instance";
import Darc from "../darc/darc";
import Signer from "../darc/signer";
import { FinalStatement, PopPartyStruct } from "./proto";
export declare class PopPartyInstance extends Instance {
    private rpc;
    /**
     * Getter for the final statement. It throws if the party
     * is not finalized.
     *
     * @returns the final statement
     */
    readonly finalStatement: FinalStatement;
    static readonly contractID = "popParty";
    static readonly PRE_BARRIER = 1;
    static readonly SCANNING = 2;
    static readonly FINALIZED = 3;
    /**
     * Helper to create a PoP party darc
     *
     * @param darcIDs   Organizers darc instance IDs
     * @param desc      Description of the party
     * @returns the new darc
     */
    static preparePartyDarc(darcIDs: InstanceID[], desc: string): Darc;
    /**
     * Get a pop party from byzcoin
     *
     * @param bc    The RPC to use
     * @param iid   The instance ID of the party
     * @param waitMatch how many times to wait for a match - useful if its called just after an addTransactionAndWait.
     * @param interval how long to wait between two attempts in waitMatch.
     * @returns a promise that resolves with the party instance
     */
    static fromByzcoin(bc: ByzCoinRPC, iid: InstanceID, waitMatch?: number, interval?: number): Promise<PopPartyInstance>;
    popPartyStruct: PopPartyStruct;
    private tmpAttendees;
    constructor(rpc: ByzCoinRPC, inst: Instance);
    /**
     * Add an attendee to the party
     *
     * @param attendee The public key of the attendee
     */
    addAttendee(attendee: Point): void;
    /**
     * Remove an attendee from the party
     *
     * @param attendee The public key of the attendee
     */
    removeAttendee(attendee: Point): number;
    /**
     * Returns a copy of the list of all attendees.
     */
    getTmpAttendees(): Point[];
    /**
     * Start the party
     *
     * @param signers The list of signers for the transaction
     * @returns a promise that resolves with the state of the party
     */
    activateBarrier(signers: Signer[]): Promise<number>;
    /**
     * Finalize the party
     *
     * @param signers The list of signers for the transaction
     * @returns a promise that resolves with the state of the party
     */
    finalize(signers: Signer[]): Promise<number>;
    /**
     * Update the party data
     * @returns a promise that resolves with an updated instance
     */
    update(): Promise<PopPartyInstance>;
    /**
     * Mine coins for a person using either an existing coinIID, or a
     * new darc + a coin that yet has to be instantiated.
     *
     * @param secret The secret key of the miner
     * @param coinID The coin instance ID of the miner
     * @param newD A new darc that has not been instantiated yet
     */
    mine(secret: Scalar, coinID?: Buffer, newD?: Darc): Promise<void>;
}
