Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

coin-hive-stratum

Package Overview
Dependencies
Maintainers
1
Versions
69
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

coin-hive-stratum - npm Package Compare versions

Comparing version 2.1.0 to 2.1.1

23

build/Proxy.js
"use strict";
var __assign = (this && this.__assign) || Object.assign || function(t) {
for (var s, i = 1, n = arguments.length; i < n; i++) {
s = arguments[i];
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
t[p] = s[p];
}
return t;
};
Object.defineProperty(exports, "__esModule", { value: true });

@@ -173,3 +165,3 @@ var WebSocket = require("ws");

var _this = this;
return __assign({}, Object.keys(this.connections).reduce(function (stats, key) { return ({
return Object.keys(this.connections).reduce(function (stats, key) { return ({
miners: stats.miners + _this.connections[key].reduce(function (miners, connection) { return miners + connection.miners.length; }, 0),

@@ -180,11 +172,3 @@ connections: stats.connections + _this.connections[key].filter(function (connection) { return !connection.donation; }).length

connections: 0
}), { raw: Object.keys(this.connections).reduce(function (raw, key) {
return (__assign({}, raw, (_a = {}, _a[key] = _this.connections[key].map(function (connection) { return ({
id: connection.id,
miners: connection.miners.map(function (miner) { return miner.id; }),
donations: connection.donations.map(function (donation) { return donation.id; }),
donation: connection.donation
}); }), _a)));
var _a;
}, {}) });
});
};

@@ -211,3 +195,4 @@ Proxy.prototype.kill = function () {

var availableConnection = connections.filter(function (connection) { return _this.isAvailable(connection); });
availableConnection.forEach(function (unusedConnection) {
var unusedConnections = availableConnection.slice(1);
unusedConnections.forEach(function (unusedConnection) {
console.log("purge", unusedConnection.id);

@@ -214,0 +199,0 @@ _this.connections[connectionId] = _this.connections[connectionId].filter(function (connection) { return connection.id !== unusedConnection.id; });

2

package.json
{
"name": "coin-hive-stratum",
"version": "2.1.0",
"version": "2.1.1",
"description": "proxy to use CoinHive miner on any stratum pool",

@@ -5,0 +5,0 @@ "main": "build",

@@ -211,7 +211,7 @@ import * as WebSocket from "ws";

purge() {
console.log("purging...");
Object.keys(this.connections).forEach(connectionId => {
const connections = this.connections[connectionId];
const availableConnection = connections.filter(connection => this.isAvailable(connection));
availableConnection.forEach(unusedConnection => {
const unusedConnections = availableConnection.slice(1);
unusedConnections.forEach(unusedConnection => {
console.log("purge", unusedConnection.id);

@@ -218,0 +218,0 @@ this.connections[connectionId] = this.connections[connectionId].filter(

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc