-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcommands.js
More file actions
61 lines (61 loc) · 1.13 KB
/
commands.js
File metadata and controls
61 lines (61 loc) · 1.13 KB
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
module.exports = {
pool: {
subscribe: function(rpcCount) {
return {
"id": rpcCount,
"method": "mining.extranonce.subscribe",
"params": []
};
},
authorize: function(username, rpcCount) {
return {
"params": [username, "password"],
"id": rpcCount,
"method": "mining.authorize"
}
},
login: function(username, id) {
return {
"method": "login",
"jsonrpc": "2.0",
"params": {
"login": username,
"pass": "x",
"agent": "hitlist/proxy"
},
"id": id
}
}
},
miner: {
ok: function(rpcCount) {
return {
"id": rpcCount,
"jsonrpc": "2.0",
"error": null,
"result": {
"status": "OK"
}
}
},
newJob: function(jobParams) {
return {
"jsonrpc": "2.0",
"method": "job",
"params": jobParams
};
},
start: function(id, job) {
return {
"id": 1,
"jsonrpc": "2.0",
"error": null,
"result": {
"id": id,
"job": job,
"status": "OK"
}
}
}
}
};