## How to build coinbase transaction from bitcoin core?

1

1

I am coding a program that connects to bitcoin-qt as local server. For building the blockheader i need the merkleroot, to build the merkle root, i need the coinbase transaction (which is not provided when connecting directly to bitcoin-qt) i understand that i must use createrawtransaction to build it manullay as below:

createrawtransaction '[{"txid":"00000...000000000000","vout":0}]' '{"BTC ADRESS":6.5}'


My question is: In BTC ADRESS i put any adress that i choose from my bitcoin-qt wallet?

And if i double hash the given hex result returned to me, without adding any other transaction, this can be the merkleroot (with only the coinbase transaction) and use it to build the blockheader?