@bsv/sdk
Version:
BSV Blockchain Software Development Kit
29 lines • 1.18 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.walletErrors = exports.WalletError = void 0;
class WalletError extends Error {
constructor(message, code = 1, stack) {
super(message);
this.isError = true;
this.code = code;
this.name = this.constructor.name;
if (stack !== undefined && stack !== null && stack !== '') {
this.stack = stack;
}
else {
Error.captureStackTrace(this, this.constructor);
}
}
}
exports.WalletError = WalletError;
// NOTE: Enum values must not exceed the UInt8 range (0–255)
var walletErrors;
(function (walletErrors) {
walletErrors[walletErrors["unknownError"] = 1] = "unknownError";
walletErrors[walletErrors["unsupportedAction"] = 2] = "unsupportedAction";
walletErrors[walletErrors["invalidHmac"] = 3] = "invalidHmac";
walletErrors[walletErrors["invalidSignature"] = 4] = "invalidSignature";
walletErrors[walletErrors["reviewActions"] = 5] = "reviewActions";
})(walletErrors || (exports.walletErrors = walletErrors = {}));
exports.default = WalletError;
//# sourceMappingURL=WalletError.js.map