How do I solo mine with bitcoind-rpc?
Unfortunately, the information presented on Bitcoin Wiki is misleading. All I had to do is to call getblocktemplate with
{
  rules: [&quot;segwit&quot;]
}

JSON object (it happened to be crucial to pass exactly a JSON object, not a string). And for the work completion all I needed to do is to send submitblock request.
Hope it helps someone who's also struggling to find any info about solo mining with
Bitcoin RPC.