/// <reference types="node" />
import { Properties } from "protobufjs/light";
import ByzCoinRPC from "./byzcoin-rpc";
import Proof from "./proof";
export declare type InstanceID = Buffer;
/**
 * Instance with basic information
 */
export default class Instance {
    /**
     * Create an instance from a proof
     * @param id the instance-id to extract
     * @param p The proof
     * @returns the instance
     */
    static fromProof(id: InstanceID, p: Proof): Instance;
    /**
     * Create an instance after requesting its proof to byzcoin
     * @param rpc   The RPC to use
     * @param iid    The ID of the instance
     * @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 the instance if it exists
     */
    static fromByzcoin(rpc: ByzCoinRPC, iid: InstanceID, waitMatch?: number, interval?: number): Promise<Instance>;
    /**
     * Returns an instance from a previously toBytes() call.
     * @param buf
     */
    static fromBytes(buf: Buffer): Instance;
    /**
     * Returns the instanceID given a contract and a preID
     * @param contractID
     * @param preID
     */
    static calcInstID(contractID: string, preID: Buffer): InstanceID;
    readonly id: InstanceID;
    readonly contractID: string;
    darcID: InstanceID;
    data: Buffer;
    constructor(init: Properties<Instance> | Instance);
    /**
     * Returns a byte representation of the Instance.
     */
    toBytes(): Buffer;
}
