UNPKG

2.07 kBJavaScriptView Raw
1"use strict";
2var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3 if (k2 === undefined) k2 = k;
4 Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
5}) : (function(o, m, k, k2) {
6 if (k2 === undefined) k2 = k;
7 o[k2] = m[k];
8}));
9var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
10 Object.defineProperty(o, "default", { enumerable: true, value: v });
11}) : function(o, v) {
12 o["default"] = v;
13});
14var __importStar = (this && this.__importStar) || function (mod) {
15 if (mod && mod.__esModule) return mod;
16 var result = {};
17 if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
18 __setModuleDefault(result, mod);
19 return result;
20};
21Object.defineProperty(exports, "__esModule", { value: true });
22exports.Bip44PathError = exports.PayloadLengthError = exports.MessageAsciiError = void 0;
23const LedgerHQErrors = __importStar(require("@ledgerhq/errors"));
24class MessageAsciiError extends LedgerHQErrors.TransportStatusError {
25 constructor() {
26 super({
27 statusText: `Message must contain printable ASCII characters.`,
28 statusCode: LedgerHQErrors.StatusCodes.INCORRECT_DATA,
29 });
30 }
31}
32exports.MessageAsciiError = MessageAsciiError;
33class PayloadLengthError extends LedgerHQErrors.TransportStatusError {
34 constructor(expected, limit) {
35 super({
36 statusText: `Payload length of ${expected} exceeds ${limit}.`,
37 statusCode: LedgerHQErrors.StatusCodes.INCORRECT_LENGTH,
38 });
39 }
40}
41exports.PayloadLengthError = PayloadLengthError;
42class Bip44PathError extends LedgerHQErrors.TransportStatusError {
43 constructor(path) {
44 super({
45 statusText: `Bip44 Path '${path}' is Invalid`,
46 statusCode: LedgerHQErrors.StatusCodes.INCORRECT_DATA,
47 });
48 }
49}
50exports.Bip44PathError = Bip44PathError;
51//# sourceMappingURL=errors.js.map
\No newline at end of file