import { Session } from "./../models";
/**
 * @class RpcError
 */
export declare class RpcError extends Error {
    /**
     * Creates a RpcError from an Error object
     * @param {Error} error - Error object.
     * @returns {RpcError} - RpcError object.
     * @memberof RpcError
     */
    static fromError(error: Error): RpcError;
    /**
     * Creates a RpcError from an Error object
     * @param {string} code - Error code
     * @param {string} data - Relay error data.
     * @returns {RpcError} - RpcError object.
     * @memberof RpcError
     */
    static fromRelayError(code: string, data: string): RpcError;
    /**
     *
     * Creates a RpcError object using a JSON string
     * @param {string} json - JSON string.
     * @returns {RpcError} - RpcError object.
     * @memberof RpcError
     */
    static fromJSON(json: string): RpcError;
    readonly code: string;
    readonly message: string;
    readonly session?: Session;
    readonly nodePubKey?: string;
    /**
     * RPC Error.
     * @constructor
     * @param {string} code - Error code.
     * @param {string} message - Error message.
     * @param {Session} session - Error message.
     * @param {string} nodePubKey - Error message.
     * @memberof RpcError
     */
    constructor(code: string, message: string, session?: Session, nodePubKey?: string);
    /**
     *
     * Creates a JSON object with the RpcError properties
     * @returns {JSON} - JSON Object.
     * @memberof RpcError
     */
    toJSON(): {
        code: string;
        message: string;
        session: {};
        node_public_key: string;
    };
}
