Skip to main content

start_mining

Starts CPU mining directly inside the daemon process. This is a legacy plain-HTTP endpoint, not a JSON-RPC method — POST directly to /start_mining (not /json_rpc), and the body/response have no jsonrpc/method/id envelope.

caution

The daemon has no authentication on its RPC port. Anyone who can reach /start_mining can start consuming CPU on the machine running nirmatad — keep the RPC port bound to a trusted network (it's bound to 127.0.0.1 by default) if you don't want this exposed.

Request

POST http://127.0.0.1:11232/start_mining
{
"miner_address": "NiRqzHVJfBJUj1WBUvHTPzYAJ4cKA6PQb2ZR33ZmS4Zp7DDcUxUE29nAkMtLPfCPXwPUgvYRZZ9NM2gN4uRRP1e12wTGSCMzn",
"threads_count": 1
}

Request parameters

  • miner_address - the address that mined block rewards should be paid to.
  • threads_count - number of CPU threads to mine with.

Response

{
"status": "OK"
}

Response information

  • status - "OK" once mining has started.