Miner

miner_start

Start the CPU miner.
Private: Requires authentication.
Parameters: None
Curl Example:
1
curl -X POST --data '{"jsonrpc":"2.0","method":"miner_start", "id":21}'
Copied!

Console Example

1
> miner.start()
Copied!

Returns:

Boolean

Output:

1
{
2
"id": 21,
3
"jsonrpc": "2.0",
4
"result": true
5
}
Copied!

miner_stop

Stop the CPU miner.
Private: Requires authentication.
Parameters: None
Curl Example:
1
curl -X POST --data '{"jsonrpc":"2.0","method":"miner_stop", "id":21}'
Copied!

Console Example

1
> miner.stop()
Copied!

Returns:

Boolean

Output:

1
{
2
"id": 21,
3
"jsonrpc": "2.0",
4
"result": true
5
}
Copied!

miner_stop

Stop the CPU miner.
Parameters: None
Curl Example:
1
curl -X POST --data '{"jsonrpc":"2.0","method":"miner_stop", "id":21}'
Copied!

Console Example

1
> miner.stop()
Copied!

Returns:

Boolean

Output:

1
{
2
"id": 21,
3
"jsonrpc": "2.0",
4
"result": true
5
}
Copied!

miner_isMining

Checks whether the CPU miner is running.
Parameters: None
Curl Example:
1
curl -X POST --data '{"jsonrpc":"2.0","method":"miner_isMining", "id":21}'
Copied!

Console Example

1
> miner.isMining()
Copied!

Returns:

Boolean

Output:

1
{
2
"id": 21,
3
"jsonrpc": "2.0",
4
"result": true
5
}
Copied!

miner_setThreads

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:
1
curl -X POST --data '{"jsonrpc":"2.0","method":"miner_setThreads", "id":21}'
Copied!

Console Example

1
> miner.setThreads(3)
Copied!

Returns:

Boolean

Output:

1
{
2
"id": 21,
3
"jsonrpc": "2.0",
4
"result": true
5
}
Copied!

miner_getHashrate

Get the hashrate.
Parameters: None
Curl Example:
1
curl -X POST --data '{"jsonrpc":"2.0","method":"miner_getHashrate", "id":21}'
Copied!

Console Example

1
> miner.getHashrate()
Copied!

Returns:

Integer

Output:

1
{
2
"id": 21,
3
"jsonrpc": "2.0",
4
"result": 1000
5
}
Copied!