Miner
Start the CPU miner.
Private: Requires authentication.
Parameters: None
Curl Example:
curl -X POST --data '{"jsonrpc":"2.0","method":"miner_start", "id":21}'
> miner.start()
Boolean
{
"id": 21,
"jsonrpc": "2.0",
"result": true
}
Stop the CPU miner.
Private: Requires authentication.
Parameters: None
Curl Example:
curl -X POST --data '{"jsonrpc":"2.0","method":"miner_stop", "id":21}'
> miner.stop()
Boolean
{
"id": 21,
"jsonrpc": "2.0",
"result": true
}
Stop the CPU miner.
Parameters: None
Curl Example:
curl -X POST --data '{"jsonrpc":"2.0","method":"miner_stop", "id":21}'
> miner.stop()
Boolean
{
"id": 21,
"jsonrpc": "2.0",
"result": true
}
Checks whether the CPU miner is running.
Parameters: None
Curl Example:
curl -X POST --data '{"jsonrpc":"2.0","method":"miner_isMining", "id":21}'
> miner.isMining()
Boolean
{
"id": 21,
"jsonrpc": "2.0",
"result": true
}
Set the number of miner threads. By default, it is set to the number of available CPUs on the machine.
Private: Requires authentication.
Parameters: None
Curl Example:
curl -X POST --data '{"jsonrpc":"2.0","method":"miner_setThreads", "id":21}'
> miner.setThreads(3)
Boolean
{
"id": 21,
"jsonrpc": "2.0",
"result": true
}
Get the hashrate.
Parameters: None
Curl Example:
curl -X POST --data '{"jsonrpc":"2.0","method":"miner_getHashrate", "id":21}'
> miner.getHashrate()
Integer
{
"id": 21,
"jsonrpc": "2.0",
"result": 1000
}
Last modified 4yr ago