/// <reference types="node" />
import Signer from "../../darc/signer";
import ByzCoinRPC from "../byzcoin-rpc";
import Instance, { InstanceID } from "../instance";
export default class ValueInstance extends Instance {
    private rpc;
    static readonly contractID = "value";
    static readonly commandUpdate = "update";
    static readonly argumentValue = "value";
    /**
     * Spawn a value instance from a darc id
     *
     * @param bc        The RPC to use
     * @param darcID    The darc instance ID
     * @param signers   The list of signers for the transaction
     * @param value     The value to be put in the value instance
     * @param preID     Can be used to set the InstanceID of the value
     * @returns a promise that resolves with the new instance
     */
    static spawn(bc: ByzCoinRPC, darcID: InstanceID, signers: Signer[], value: Buffer, preID?: Buffer): Promise<ValueInstance>;
    /**
     * Create returns a ValueInstance from the given parameters.
     * @param bc
     * @param valueID
     * @param darcID
     * @param value
     */
    static create(bc: ByzCoinRPC, valueID: InstanceID, darcID: InstanceID, value: Buffer): ValueInstance;
    /**
     * Initializes using an existing ValueInstance from ByzCoin
     * @param bc    The RPC to use
     * @param iid   The instance ID
     * @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 coin instance
     */
    static fromByzcoin(bc: ByzCoinRPC, iid: InstanceID, waitMatch?: number, interval?: number): Promise<ValueInstance>;
    _value: Buffer;
    /**
     * @return value of the instance
     */
    readonly value: Buffer;
    /**
     * Constructs a new ValueInstance. If the instance is not of type ValueInstance,
     * an error will be thrown.
     *
     * @param rpc a working RPC instance
     * @param inst an instance representing a ValueInstance
     */
    constructor(rpc: ByzCoinRPC, inst: Instance);
    /**
     * Update the value
     *
     * @param signers   The list of signers for the transaction
     * @param value     The new value to be set
     * @param wait      Number of blocks to wait for inclusion
     */
    updateValue(signers: Signer[], value: Buffer, wait?: number): Promise<void>;
    /**
     * Update the data of this instance
     *
     * @returns the updated instance
     */
    update(): Promise<ValueInstance>;
}
