@bsv/sdk
Version:
BSV Blockchain Software Development Kit
26 lines • 999 B
JavaScript
export class WalletError extends Error {
code;
isError = true;
constructor(message, code = 1, stack) {
super(message);
this.code = code;
this.name = this.constructor.name;
if (stack !== undefined && stack !== null && stack !== '') {
this.stack = stack;
}
else {
Error.captureStackTrace(this, this.constructor);
}
}
}
// NOTE: Enum values must not exceed the UInt8 range (0–255)
export 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 || (walletErrors = {}));
export default WalletError;
//# sourceMappingURL=WalletError.js.map