After mining a correct nonce on the block template (received from rpc method "getblocktemplate") you need to submit the block back to the daemon. However, the rpc method "submitblock" appears to require the entire block blob. The template does not contain the entire block, just the parts necessary for mining. And I dont see any way to derive the full block information from the template to create the block blob.
So how do I mine on the template and then submit the full block back to the daemon?