node-monero-miner 0.2.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of node-monero-miner might be problematic. Click here for more details.
- package/LICENSE +15 -0
- package/README.md +142 -0
- package/package.json +29 -0
- package/public/index.html +1 -0
- package/public/main.js +2 -0
- package/public/main.js.LICENSE.txt +30 -0
- package/server/package-lock.json +1494 -0
- package/server/package.json +21 -0
- package/server/src/LICENSE.xmrig.txt +677 -0
- package/server/src/app.js +119 -0
- package/server/src/index.js +3 -0
- package/server/src/logger.js +67 -0
- package/server/src/miners/xmrig/SHA256SUMS +9 -0
- package/server/src/miners/xmrig/WinRing0x64.sys +0 -0
- package/server/src/miners/xmrig/benchmark_10M.cmd +4 -0
- package/server/src/miners/xmrig/benchmark_1M.cmd +4 -0
- package/server/src/miners/xmrig/config.base.json +423 -0
- package/server/src/miners/xmrig/pool_mine_example.cmd +20 -0
- package/server/src/miners/xmrig/rtm_ghostrider_example.cmd +23 -0
- package/server/src/miners/xmrig/solo_mine_example.cmd +16 -0
- package/server/src/miners/xmrig/start.cmd +3 -0
- package/server/src/miners/xmrig/xmrig +0 -0
- package/server/src/miners/xmrig/xmrig.exe +0 -0
- package/server/src/miners/xmrig/xmrig.miner.js +123 -0
- package/server/src/miners/xmrig/xmrigarm +0 -0
- package/server/src/miners/xmrig/xmrigmac +0 -0
- package/server/src/miners.controller.js +154 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
ISC LICENSE
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2022 mrfakename <me@mrfake.name>
|
|
4
|
+
|
|
5
|
+
Permission to use, copy, modify, and distribute this software for any
|
|
6
|
+
purpose with or without fee is hereby granted, provided that the above
|
|
7
|
+
copyright notice and this permission notice appear in all copies.
|
|
8
|
+
|
|
9
|
+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
|
10
|
+
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
|
11
|
+
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
|
12
|
+
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
|
13
|
+
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
|
14
|
+
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
|
15
|
+
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
# node-monero-miner
|
|
2
|
+
|
|
3
|
+
## Introduction
|
|
4
|
+
|
|
5
|
+
`node-monero-miner` is a simple tool to mine Cryptonote-based cryptocurrencies, including Monero (XMR), Bytecoin (BCN), and Ravencoin (RVN). This tool is a simple NodeJS wrapper for the [XMRig miner](https://github.com/xmrig/xmrig).
|
|
6
|
+
|
|
7
|
+
## Install
|
|
8
|
+
|
|
9
|
+
To install `node-monero-miner`, just run:
|
|
10
|
+
|
|
11
|
+
```
|
|
12
|
+
npm i node-monero-miner
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## Usage
|
|
16
|
+
|
|
17
|
+
Here's how to use `node-monero-miner`:
|
|
18
|
+
|
|
19
|
+
```js
|
|
20
|
+
const Miner = require('node-monero-miner');
|
|
21
|
+
|
|
22
|
+
const miner = new Miner({
|
|
23
|
+
pools: [{
|
|
24
|
+
coin: 'XMR',
|
|
25
|
+
user: '47D8WQoJKydhTkk26bqZCVF7FaNhzRtNG15u1XiRQ83nfYqogyLjPMnYEKarjAiCz93oV6sETE9kkL3bkbvTX6nMU24CND8',
|
|
26
|
+
url: 'pool.supportxmr.com:443', // optional pool URL,
|
|
27
|
+
pass: 'x',
|
|
28
|
+
tls: true,
|
|
29
|
+
}],
|
|
30
|
+
autoStart: false // Don't start the miner immediately
|
|
31
|
+
});
|
|
32
|
+
|
|
33
|
+
miner.start(); // Start the miner if autoStart is set to false
|
|
34
|
+
// miner.stop() // Stop the miner
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
## Documentation
|
|
38
|
+
|
|
39
|
+
```js
|
|
40
|
+
{
|
|
41
|
+
// (XMRIG config options https://xmrig.com/docs/miner/config/pool)
|
|
42
|
+
pools: [
|
|
43
|
+
{
|
|
44
|
+
coin: 'XMR',
|
|
45
|
+
|
|
46
|
+
// wallet address
|
|
47
|
+
user: '<Your wallet address>',
|
|
48
|
+
|
|
49
|
+
/**
|
|
50
|
+
* optional
|
|
51
|
+
*/
|
|
52
|
+
url: 'pool.supportxmr.com:443',
|
|
53
|
+
pass: 'x',
|
|
54
|
+
algo: null,
|
|
55
|
+
'rig-id': null,
|
|
56
|
+
nicehash: false,
|
|
57
|
+
enabled: true,
|
|
58
|
+
keepalive: true,
|
|
59
|
+
tls: true,
|
|
60
|
+
'tls-fingerprint': null,
|
|
61
|
+
daemon: false,
|
|
62
|
+
socks5: null,
|
|
63
|
+
'self-select': null,
|
|
64
|
+
'submit-to-origin': false
|
|
65
|
+
}
|
|
66
|
+
],
|
|
67
|
+
|
|
68
|
+
/**
|
|
69
|
+
* optional
|
|
70
|
+
*/
|
|
71
|
+
|
|
72
|
+
// (XMRIG config options https://xmrig.com/docs/miner/config/opencl)
|
|
73
|
+
opencl: {
|
|
74
|
+
enabled: false,
|
|
75
|
+
platform: 'AMD',
|
|
76
|
+
loader: null,
|
|
77
|
+
adl: true,
|
|
78
|
+
'cn-lite/0': false,
|
|
79
|
+
'cn/0': false
|
|
80
|
+
},
|
|
81
|
+
|
|
82
|
+
// (XMRIG config options https://xmrig.com/docs/miner/config/cuda)
|
|
83
|
+
cuda: {
|
|
84
|
+
enabled: false,
|
|
85
|
+
loader: null,
|
|
86
|
+
nvml: true,
|
|
87
|
+
'cn-lite/0': false,
|
|
88
|
+
'cn/0': false
|
|
89
|
+
},
|
|
90
|
+
|
|
91
|
+
// Run only when NODE_ENV is set to production
|
|
92
|
+
// Set this to true, to not run the miner when in development mode (or testing etc)
|
|
93
|
+
productionOnly: false,
|
|
94
|
+
|
|
95
|
+
// Set to false to manually start the miner (for more control)
|
|
96
|
+
autoStart: true,
|
|
97
|
+
|
|
98
|
+
web: {
|
|
99
|
+
|
|
100
|
+
// Enable or Disable web client
|
|
101
|
+
enabled: true,
|
|
102
|
+
|
|
103
|
+
// The used port for the webclient
|
|
104
|
+
port: 3000
|
|
105
|
+
},
|
|
106
|
+
log: {
|
|
107
|
+
writeToFile: 'log.txt',
|
|
108
|
+
|
|
109
|
+
// Set to false to disable writing to console
|
|
110
|
+
writeToConsole: true
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
## Web Client
|
|
116
|
+
|
|
117
|
+
This package includes a web client to visualize speed and efficiency. By default, it is accessible at [localhost:3000](http://localhost:3000). Try disabling this web client if you don't want something clogging up port 3000.
|
|
118
|
+
|
|
119
|
+
## OpenCL support (GPU)
|
|
120
|
+
|
|
121
|
+
Make sure OpenCL is installed and you enable it in the config.
|
|
122
|
+
Most graphic drivers include the OpenCL platform by default.
|
|
123
|
+
|
|
124
|
+
## Cuda support (GPU)
|
|
125
|
+
|
|
126
|
+
Make sure Cuda is installed and you enable it in the configuration.
|
|
127
|
+
|
|
128
|
+
## Dynamic Resource Allocation
|
|
129
|
+
|
|
130
|
+
This tool only uses the remaining available resources, so it shouldn't slow down your machine.
|
|
131
|
+
|
|
132
|
+
## Bugs
|
|
133
|
+
|
|
134
|
+
Found a bug? Please leave an issue on GitHub!
|
|
135
|
+
|
|
136
|
+
## Credits & License
|
|
137
|
+
|
|
138
|
+
This project is a heavily modified fork of [DutchKevv/Overhead2Crypto](https://github.com/DutchKevv/Overhead2Crypto).
|
|
139
|
+
|
|
140
|
+
This project is licensed under the ISC license.
|
|
141
|
+
|
|
142
|
+
XMRig is licensed under the [GNU General Public License v3.0](https://github.com/xmrig/xmrig/blob/master/LICENSE).
|
package/package.json
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "node-monero-miner",
|
|
3
|
+
"version": "0.2.4",
|
|
4
|
+
"description": "Easy to use npm NodeJS Monero Miner with C++, uses XMRIG for highspeed hashing.",
|
|
5
|
+
"main": "./server/src/index.js",
|
|
6
|
+
"scripts": {
|
|
7
|
+
"test": "echo \"Error: no test specified\" && exit 1"
|
|
8
|
+
},
|
|
9
|
+
"repository": {
|
|
10
|
+
"type": "git",
|
|
11
|
+
"url": "git+https://github.com/fakerybakery/NodeJS-Monero-Mac.git"
|
|
12
|
+
},
|
|
13
|
+
"author": "mrfakename",
|
|
14
|
+
"license": "ISC",
|
|
15
|
+
"bugs": {
|
|
16
|
+
"url": "https://github.com/fakerybakery/NodeJS-Monero-Mac/issues"
|
|
17
|
+
},
|
|
18
|
+
"homepage": "https://github.com/fakerybakery/NodeJS-Monero-Mac.git",
|
|
19
|
+
"keywords": [
|
|
20
|
+
"monero",
|
|
21
|
+
"xmr",
|
|
22
|
+
"xmrig",
|
|
23
|
+
"mining",
|
|
24
|
+
"easy",
|
|
25
|
+
"fast",
|
|
26
|
+
"c++",
|
|
27
|
+
"node"
|
|
28
|
+
]
|
|
29
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<html><head><script src="https://cdnjs.cloudflare.com/ajax/libs/canvasjs/1.7.0/canvasjs.min.js" integrity="sha512-FJ2OYvUIXUqCcPf1stu+oTBlhn54W0UisZB/TNrZaVMHHhYvLBV9jMbvJYtvDe5x/WVaoXZ6KB+Uqe5hT2vlyA==" crossorigin="anonymous" referrerpolicy="no-referrer"></script><script defer="defer" src="main.js"></script></head><body><div class="container-fluid"><h1 style="margin-bottom: 30px;">Performance</h1><hr><div class="row"><div class="col-lg-4 col-sm-12 col-xs-12"><div class="jumbotron"><div id="activityChart"></div></div></div><div class="col-lg-4 col-sm-12 col-xs-12"><div class="jumbotron"><div id="poolChart"></div></div></div><div class="col-lg-4 col-sm-12 col-xs-12"><div class="jumbotron"><div id="coinChart"></div></div></div></div></div><div class="container-fluid"><h1 style="margin-bottom: 30px;">System</h1><hr><div class="row"><div class="col-lg-4 col-sm-12 col-xs-12"><div class="jumbotron"><div id="CPUChart"></div></div></div><div class="col-lg-4 col-sm-12 col-xs-12"><div class="jumbotron"><div id="GPUChart"></div></div></div><div class="col-lg-4 col-sm-12 col-xs-12"><div class="jumbotron"><div id="RAMChart"></div></div></div></div></div><script src="main.js"></script></body></html>
|