mysterium-vpn-js
Version:
Javascript SDK for Mysterium node
25 lines (24 loc) • 960 B
JavaScript
;
/**
* Copyright (c) 2020 BlockDev AG
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
Object.defineProperty(exports, "__esModule", { value: true });
exports.parseConnectionStatistics = void 0;
const validation_1 = require("../fmt/validation");
// eslint-disable-next-line @typescript-eslint/no-explicit-any
function parseConnectionStatistics(data) {
(0, validation_1.validateMultiple)('ConnectionStatistics', data, [
{ name: 'bytesReceived', type: 'number' },
{ name: 'bytesSent', type: 'number' },
{ name: 'throughputSent', type: 'number' },
{ name: 'throughputReceived', type: 'number' },
{ name: 'duration', type: 'number' },
{ name: 'tokensSpent', type: 'number' },
{ name: 'spentTokens', type: 'object' },
]);
return data;
}
exports.parseConnectionStatistics = parseConnectionStatistics;