"use strict";
// Copyright 2024 IOTA Stiftung
// SPDX-License-Identifier: Apache-2.0
Object.defineProperty(exports, "__esModule", { value: true });
exports.UnpackError = exports.SerdeJsonError = exports.PrefixHexError = exports.BlockError = exports.WalletError = exports.ClientError = exports.ErrorBase = void 0;
class ErrorBase extends Error {
    constructor({ name, message, cause, }) {
        super();
        this.name = name;
        this.message = message;
        this.cause = cause;
    }
}
exports.ErrorBase = ErrorBase;
class ClientError extends ErrorBase {
}
exports.ClientError = ClientError;
class WalletError extends ErrorBase {
}
exports.WalletError = WalletError;
class BlockError extends ErrorBase {
    constructor(message) {
        super({ name: 'block', message });
    }
}
exports.BlockError = BlockError;
class PrefixHexError extends ErrorBase {
    constructor(message) {
        super({ name: 'prefixHex', message });
    }
}
exports.PrefixHexError = PrefixHexError;
class SerdeJsonError extends ErrorBase {
    constructor(message) {
        super({ name: 'serdeJson', message });
    }
}
exports.SerdeJsonError = SerdeJsonError;
class UnpackError extends ErrorBase {
    constructor(message) {
        super({ name: 'unpack', message });
    }
}
exports.UnpackError = UnpackError;
//# sourceMappingURL=error.js.map