// Copyright 2024 IOTA Stiftung
// SPDX-License-Identifier: Apache-2.0
var __extends = (this && this.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
        return extendStatics(d, b);
    };
    return function (d, b) {
        if (typeof b !== "function" && b !== null)
            throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
var ErrorBase = /** @class */ (function (_super) {
    __extends(ErrorBase, _super);
    function ErrorBase(_a) {
        var name = _a.name, message = _a.message, cause = _a.cause;
        var _this = _super.call(this) || this;
        _this.name = name;
        _this.message = message;
        _this.cause = cause;
        return _this;
    }
    return ErrorBase;
}(Error));
export { ErrorBase };
var ClientError = /** @class */ (function (_super) {
    __extends(ClientError, _super);
    function ClientError() {
        return _super !== null && _super.apply(this, arguments) || this;
    }
    return ClientError;
}(ErrorBase));
export { ClientError };
var WalletError = /** @class */ (function (_super) {
    __extends(WalletError, _super);
    function WalletError() {
        return _super !== null && _super.apply(this, arguments) || this;
    }
    return WalletError;
}(ErrorBase));
export { WalletError };
var BlockError = /** @class */ (function (_super) {
    __extends(BlockError, _super);
    function BlockError(message) {
        return _super.call(this, { name: 'block', message: message }) || this;
    }
    return BlockError;
}(ErrorBase));
export { BlockError };
var PrefixHexError = /** @class */ (function (_super) {
    __extends(PrefixHexError, _super);
    function PrefixHexError(message) {
        return _super.call(this, { name: 'prefixHex', message: message }) || this;
    }
    return PrefixHexError;
}(ErrorBase));
export { PrefixHexError };
var SerdeJsonError = /** @class */ (function (_super) {
    __extends(SerdeJsonError, _super);
    function SerdeJsonError(message) {
        return _super.call(this, { name: 'serdeJson', message: message }) || this;
    }
    return SerdeJsonError;
}(ErrorBase));
export { SerdeJsonError };
var UnpackError = /** @class */ (function (_super) {
    __extends(UnpackError, _super);
    function UnpackError(message) {
        return _super.call(this, { name: 'unpack', message: message }) || this;
    }
    return UnpackError;
}(ErrorBase));
export { UnpackError };
//# sourceMappingURL=error.js.map