-
Notifications
You must be signed in to change notification settings - Fork 14
/
index.html
70 lines (57 loc) · 1.99 KB
/
index.html
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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
<!DOCTYPE html>
<html lang="en" dir="ltr">
<head>
<meta charset="utf-8">
<title>Webminer</title>
</head>
<body>
<div>
<label>Threads:</label>
<input id="threads" type="number" min="1" max="64" value="4" placeholder="Number of threads">
</div>
<div>
<label>Your wallet address:</label>
<input id="wallet" type="text" placeholder="Your Turtlecoin address" value="TRTLv198neLLCadgT3rzAnepD9aDf4MMC33MDMbkkELJcRAiZyH35fL3qG7xjJDSUCGCRJFWwxyvNDCwxy8kVpbFTsx654w8PEJ">
</div>
<div>
<label>Pool:</label>
<input id="pool" type="text" placeholder="Your favourite mining pool" value="trtl.pool.mine2gether.com">
</div>
<div>
<label>Port:</label>
<input id="port" type="number" placeholder="Your pools port" value="2225">
</div>
<div>
<label>Mining speed:</label>
<input id="speed" type="number" placeholder="Mining speed in percent" min="1" max="100" value="100">
</div>
<div>
<label>Worker name:</label>
<input id="workerName" type="text" placeholder="Your worker name" value="WebMiner">
</div>
<button onclick="updateValues();miner.start()"> Start </button>
<button onclick="miner.stop()"> Stop </button>
<script src='turtleminer.js'></script>
<script>
const config = {
pool: "trtl.pool.mine2gether.com", // pool url
port: 2225, // pool port
wallet: "TRTLv198neLLCadgT3rzAnepD9aDf4MMC33MDMbkkELJcRAiZyH35fL3qG7xjJDSUCGCRJFWwxyvNDCwxy8kVpbFTsx654w8PEJ", // your wallet address
speed: 100, // cpu speed/usage in %
threads: 4, // number of threads using for mining
workerName: "WebMiner" // the miner name also knows as 'password' for the pool, default 'x'
}
const miner = new TurtleMiner(config);
console.log(miner.dump());
miner.on("report", function(rep) {
console.log(rep);
});
function updateValues() { // updates values entered by user
for (let i in config) {
config[i] = document.getElementById(i).value;
miner[i] = document.getElementById(i).value;
}
}
</script>
</body>
</html>