/// <reference types="node" />
import { MessageType } from "../MessageType";
import { IWireMessage } from "./IWireMessage";
/**
 * This message is defined in BOLT #1 and is used for telling
 * a peer that something is incorrect. The message can indicate
 * which channel is in error, or if channelId is zero, it refers
 * to all channels.
 *
 * These message can indicate protocol violations or internal
 * errors that make channels unusable or that make further
 * communication unusable.
 */
export declare class ErrorMessage implements IWireMessage {
    /**
     * Deserializes an error message into an ErrorMessage
     * instance.
     */
    static deserialize(payload: Buffer): ErrorMessage;
    /**
     * Message type 17
     */
    type: MessageType;
    /**
     * channelId is used to indicate the failing channel. It
     * can have a value of 0 to indicate there is an error with
     * all channels.
     *
     * All error messsagees sent before (and including) the
     * funding_created messagee should use the temporary_channel_id
     * instead of the channel_id.
     */
    channelId: Buffer;
    /**
     * Data field may be empty. May contain the raw, hex-encoded
     * transaction in reply to a invalid signature check in
     * funding_created, funding_signed, closing_signed, or
     * commitment_signed messages.
     */
    data: Buffer;
    /**
     * Serialize the ErorrMessage into a Buffer that
     * can be send on the wire.
     */
    serialize(): Buffer;
}
