In short, no such RPCs exist, though there are a few related ones.
There is the “production” mining interface getblocktemplate
, which is used by mining software (pools, solo, …). It gathers transactions from the mempool to be included in a block, and gives information about it. It does not compute a coinbase transaction (to pay out the mining rewards), and thus also cannot determine the Merkle root (as that depends on the coinbase).
For testing purposes, there are “all-at-onces” RPCs like generatetoaddress
, which gather transactions, construct a coinbase transaction to pay out the reward, compute the Merkle root of the resulting transactions, and then grind the block nonce in order to construct a fully valid block.
It sounds like you’re looking for something in between, which is everything that generatetoaddress
does, but without the grinding. This doesn’t exist, and it doesn’t seem very useful to me. For production use, you want the coinbase to be constructed on the mining side (because modern ASICs are so fast that they need thousands of new coinbases per second, which just wouldn’t be feasible to do inside Bitcoin Core), and for testing purposes it generally suffices to either do everything at once, or do something so custom that the entire process is done within test code.