mysterium-vpn-js
Version:
Javascript SDK for Mysterium node
19 lines (18 loc) • 667 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.parseNatTypeResponse = void 0;
/**
* Copyright (c) 2021 BlockDev AG
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
const validation_1 = require("../fmt/validation");
function parseNatTypeResponse(data) {
(0, validation_1.validate)('NatStatusResponse', data, { name: 'type', type: 'string' });
if (data.error) {
(0, validation_1.validate)('NatStatusResponse', data, { name: 'error', type: 'string' });
}
return data;
}
exports.parseNatTypeResponse = parseNatTypeResponse;