"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.isError = exports.getPath = exports.isNoErrorReturnCode = void 0;
const isNoErrorReturnCode = (code) => code === 0x9000;
exports.isNoErrorReturnCode = isNoErrorReturnCode;
const getPath = (path) => path && path.substr(0, 2) !== "m/" ? `m/${path}` : path;
exports.getPath = getPath;
const isError = (r) => {
    if (!(0, exports.isNoErrorReturnCode)(r.returnCode))
        throw new Error(`${r.returnCode} - ${r.errorMessage}`);
};
exports.isError = isError;
//# sourceMappingURL=common.js.map