• Welcome to forex.pm forex forum binary options trade. Please login or sign up.
 

How to build coinbase transaction from bitcoin core?

Started by Bitcoin, Feb 12, 2022, 04:20 am

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Bitcoin

How to build coinbase transaction from bitcoin core?

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?


Source: How to build coinbase transaction from bitcoin core?