-
Notifications
You must be signed in to change notification settings - Fork 59
api_mining
o-u-p edited this page Dec 24, 2018
·
6 revisions
-
show command usage.
- JS Parameters
{ method: 'POST', url: 'http://127.0.0.1:8707/rpc/v3', headers: { 'Content-Type': 'application/json' }, body: { "jsonrpc": "3.0", "method": "{COMMAND}", "params": [ "test", "123456"], "id": 7 }, json: true };
-
Response (Example for shutdown)
{ "id": 7, "jsonrpc": "3.0", "result": "\nUsage: uc-cli shutdown [-h] [ADMINNAME] [ADMINAUTH] \n\n Info: stop ucd. \n\n Options (named):\n\n-h [--help] Get a description and instructions for this command.\n\n Arguments (positional):\n\n ADMINNAME admin name. \n ADMINAUTH admin password/authorization. \n"
}
-
start solo mining.
- JS Parameters
{ method: 'POST', url: 'http://127.0.0.1:8707/rpc/v3', headers: { 'Content-Type': 'application/json' }, body: { "jsonrpc": "3.0", "method":"startmining", "params":[ "snake02", "123456", "UcuW7wVu198Nuzok8eeMDUNEZQoGqQRRz5" ], "id": 7 }, json: true };
- Response
{ "id" : 7, "jsonrpc" : "3.0", "result" : "solo mining started at UcuW7wVu198Nuzok8eeMDUNEZQoGqQRRz5" }
`` ***
-
stop solo mining.
- JS Parameters
{ method: 'POST', url: 'http://127.0.0.1:8707/rpc/v3', headers: { 'Content-Type': 'application/json' }, body: { "jsonrpc": "3.0", "method":"stopmining", "params":[ "snake02", "123456" ], "id": 7 } json: true };
- Response
{ "id" : 7, "jsonrpc" : "3.0", "result" : "signal STOP sent." }
- JS Parameters
``
-
list miners .
- JS Parameters
{ method: 'POST', url: 'http://127.0.0.1:8707/rpc/v3', headers: { 'Content-Type': 'application/json' }, body: { "jsonrpc": "3.0", "method":"showminers", "id": 7 }, json: true };
- Response
{ "id" : 7, "jsonrpc" : "3.0", "result" : [ "UcuW7wVu198Nuzok8eeMDUNEZQoGqQRRz5", "URaJN6xB2vmFGQcXDkLkrDjaSxu9qJN4Zr", "UeBhVsr28ovcBS5DjxqXtHa3ueCP6o2FQi" ] }
- JS Parameters
``