forked from holzmaster/node-pr0gramm-miner
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathminer.js
executable file
·47 lines (44 loc) · 1.12 KB
/
miner.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
#!/usr/bin/env node
const yargs = require("yargs");
const XMR = require("./xmr");
const XMRUI = require("./ui");
const argv = yargs
.option("user", {
alias: "u",
description: "Username",
required: true,
type: "string",
})
.option("token", {
alias: "t",
description: "Token obtained via API endpoint",
required: true,
type: "string",
})
.option("threads", {
alias: "j",
description: "Number of threads to use",
default: 2,
type: "number",
})
.option("auto-redeem", {
alias: "a",
description: "Automatically redeem if possible.",
default: false,
type: "boolean",
})
.option("verbose", {
alias: "v",
description: "Print the status every second.",
default: false,
type: "boolean",
})
.help()
.argv;
const wsUrl = "ws://miner.pr0gramm.com:8044";
function main() {
const { user, token, threads, autoRedeem, verbose } = argv;
const xmr = new XMR(user, token, wsUrl, threads);
const ui = new XMRUI(xmr, autoRedeem, verbose);
}
main();