Comparing version 1.6.1 to 1.6.2
{ | ||
"name": "coin-hive", | ||
"version": "1.6.1", | ||
"version": "1.6.2", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "main": "src/index.js", |
@@ -1,2 +0,2 @@ | ||
# Coin-Hive [![Build Status](https://travis-ci.org/cazala/coin-hive.svg?branch=master)](https://travis-ci.org/cazala/coin-hive) | ||
# CoinHive [![Build Status](https://travis-ci.org/cazala/coin-hive.svg?branch=master)](https://travis-ci.org/cazala/coin-hive) | ||
@@ -25,3 +25,3 @@ Mine cryptocurrency [Monero (XMR)](https://getmonero.org/) using [CoinHive](https://coinhive.com/) from node.js | ||
// Create miner | ||
const miner = await CoinHive('ZM4gjqQ0jh0jbZ3tZDByOXAjyotDbo00'); // Coin-Hive's Site Key | ||
const miner = await CoinHive('ZM4gjqQ0jh0jbZ3tZDByOXAjyotDbo00'); // CoinHive's Site Key | ||
@@ -68,3 +68,3 @@ // Start miner | ||
- `CoinHive(siteKey[, options])`: Returns a promise of a `Miner` instance. It requires a [Coin-Hive Site Key](https://coin-hive.com/settings/sites). The `options` object is optional and may contain the following properties: | ||
- `CoinHive(siteKey[, options])`: Returns a promise of a `Miner` instance. It requires a [CoinHive Site Key](https://coinhive.com/settings/sites). The `options` object is optional and may contain the following properties: | ||
@@ -113,3 +113,3 @@ - `username`: Set a username for the miner. See [CoinHive.User](https://coinhive.com/documentation/miner#coinhive-user). | ||
- `miner.rpc(methodName, argsArray)`: This method allows you to interact with the Coin-Hive miner instance. It returns a Promise that resolves the the value of the remote method that was called. The miner intance API can be [found here](https://coin-hive.com/documentation/miner#miner-is-running). Here's an example: | ||
- `miner.rpc(methodName, argsArray)`: This method allows you to interact with the CoinHive miner instance. It returns a Promise that resolves the the value of the remote method that was called. The miner intance API can be [found here](https://coin-hive.com/documentation/miner#miner-is-running). Here's an example: | ||
@@ -130,3 +130,3 @@ ```js | ||
- `COINHIVE_SITE_KEY`: Coin-Hive's Site Key | ||
- `COINHIVE_SITE_KEY`: CoinHive's Site Key | ||
@@ -155,3 +155,3 @@ - `COINHIVE_USERNAME`: Set a username to the miner. See [CoinHive.User](https://coinhive.com/documentation/miner#coinhive-user). | ||
**Can I run this on a different pool than CoinHive's?** | ||
#### Can I run this on a different pool than CoinHive's? | ||
@@ -161,5 +161,5 @@ Yes, you can run this on any pool based on the [Stratum Mining Protocol](https://en.bitcoin.it/wiki/Stratum_mining_protocol). | ||
```js | ||
const CoinHive = require('./src'); | ||
const CoinHive = require('coin-hive'); | ||
(async () => { | ||
const miner = await CoinHive('ZM4gjqQ0jh0jbZ3tZDByOXAjyotDbo00', { | ||
const miner = await CoinHive('<YOUR-MONERO-ADDRESS>', { | ||
pool: { | ||
@@ -186,9 +186,11 @@ host: 'xmr-eu1.nanopool.org', | ||
``` | ||
coin-hive ZM4gjqQ0jh0jbZ3tZDByOXAjyotDbo00 --pool-host=xmr-eu1.nanopool.org --pool-port=14444 | ||
coin-hive <YOUR-MONERO-ADDRESS> --pool-host=xmr-eu1.nanopool.org --pool-port=14444 | ||
``` | ||
**Can I run this on Heroku?** | ||
#### Can I run this on Heroku? | ||
Yes, but since Puppeteer requires some additional dependencies that aren't included on the Linux box that Heroku spins up for you, you need to go to your app's `Settings > Buildpacks` first and add this url: | ||
No, it violates the [TOS](https://www.heroku.com/policy/aup). | ||
Also, since Puppeteer requires some additional dependencies that aren't included on the Linux box that Heroku spins up for you, you need to go to your app's `Settings > Buildpacks` first and add this url: | ||
``` | ||
@@ -200,4 +202,42 @@ https://github.com/jontewks/puppeteer-heroku-buildpack | ||
**Which version of Node.js do I need?** | ||
#### Can I run this on Docker? | ||
Node v8+ | ||
You'll need to install the latest version of Chrome and Puppeteer's dependencies in your Dockerfile: | ||
``` | ||
FROM node:8-slim | ||
# Install latest chrome and puppeteer dependencies | ||
RUN wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add - &&\ | ||
sh -c 'echo "deb http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google-chrome.list' &&\ | ||
apt-get update &&\ | ||
apt-get install -y google-chrome-unstable | ||
# Install coin-hive | ||
RUN npm install -g coin-hive | ||
# Run coin-hive | ||
ENTRYPOINT coinhive <site-key> | ||
``` | ||
#### Which version of Node.js do I need? | ||
Node v8+ | ||
## Troubleshooting | ||
#### I'm having errors on Ubuntu/Debian | ||
Install these dependencies: | ||
``` | ||
sudo apt-get -y install gconf-service libasound2 libatk1.0-0 libc6 libcairo2 libcups2 libdbus-1-3 libexpat1 libfontconfig1 libgcc1 libgconf-2-4 libgdk-pixbuf2.0-0 libglib2.0-0 libgtk-3-0 libnspr4 libpango-1.0-0 libpangocairo-1.0-0 libstdc++6 libx11-6 libx11-xcb1 libxcb1 libxcomposite1 libxcursor1 libxdamage1 libxfixes3 libxi6 libxrandr2 libxrender1 libxss1 libxtst6 ca-certificates fonts-liberation libappindicator1 libnss3 lsb-release xdg-utils wget | ||
``` | ||
#### I'm getting an Error: EACCES: permission denied when installing the package | ||
Try installing the package using this: | ||
``` | ||
sudo npm i -g coin-hive --unsafe-perm=true --allow-root | ||
``` |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
23912
236
12
233