@smartdcc/duis-sign-wrap
Version:
Wrapper library for signing/validating DUIS
37 lines • 1.42 kB
JavaScript
;
/*
* Created on Thu Jul 21 2022
*
* Copyright (c) 2026 Smart DCC Limited
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
Object.defineProperty(exports, "__esModule", { value: true });
exports.signDuis = signDuis;
exports.validateDuis = validateDuis;
const server_1 = require("./server");
const tool_1 = require("./tool");
function signDuis(options) {
if (options.backend) {
return (0, server_1.makeSignDuisRequest)({ ...options, backend: options.backend });
}
return (0, tool_1.runTool)({ ...options, mode: 'sign' });
}
function validateDuis(options) {
if (options.backend) {
return (0, server_1.makeVerifyDuisRequest)({ ...options, backend: options.backend });
}
return (0, tool_1.runTool)({ ...options, mode: 'validate' });
}
//# sourceMappingURL=index.js.map