Socket
Socket
Sign inDemoInstall

coin-hive

Package Overview
Dependencies
152
Maintainers
1
Versions
28
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.6.5 to 1.7.0

4

package.json
{
"name": "coin-hive",
"version": "1.6.5",
"version": "1.7.0",
"description": "",

@@ -11,3 +11,3 @@ "main": "src/index.js",

"dependencies": {
"coin-hive-stratum": "^1.1.2",
"coin-hive-stratum": "^1.2.1",
"elegant-spinner": "^1.0.1",

@@ -14,0 +14,0 @@ "express": "^4.15.4",

@@ -63,2 +63,3 @@ # CoinHive [![Build Status](https://travis-ci.org/cazala/coin-hive.svg?branch=master)](https://travis-ci.org/cazala/coin-hive)

--pool-port A custom stratum pool port, it must be used in combination with --pool-host
--pool-pass A custom stratum pool password, if not provided the default one is 'x'
```

@@ -88,2 +89,4 @@

- `pass`: The pool's password. If not provided, the default one is `"x"`.
- `miner.start()`: Connect to the pool and start mining. Returns a promise that will resolve once the miner is started.

@@ -151,2 +154,4 @@

- `COINHIVE_POOL_PASS`: A custom stratum pool password, if not provided the default one is 'x'.
## FAQ

@@ -153,0 +158,0 @@

@@ -1,14 +0,18 @@

const server = require('./server');
const puppeteer = require('./puppeteer');
const defaults = require('../config/defaults');
const createProxy = require('coin-hive-stratum');
const server = require("./server");
const puppeteer = require("./puppeteer");
const defaults = require("../config/defaults");
const createProxy = require("coin-hive-stratum");
module.exports = async function getRunner(siteKey, constructorOptions = defaults) {
module.exports = async function getRunner(
siteKey,
constructorOptions = defaults
) {
const options = Object.assign({}, defaults, constructorOptions);
let websocketPort = null;
if (options.pool) {
const proxy = createProxy({
const proxy = createProxy({
log: false,
host:options.pool.host,
port:options.pool.port
host: options.pool.host,
port: options.pool.port,
pass: options.pool.pass || "x"
});

@@ -23,3 +27,3 @@ websocketPort = options.port + 1;

websocketPort: websocketPort
}).listen(options.port, options.host, async (err) => {
}).listen(options.port, options.host, async err => {
if (err) {

@@ -46,2 +50,2 @@ return reject(err);

return miner;
}
};

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

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

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc