One a part of coinbase transaction is p2pkh ScriptPubKey (in accordance with the ebook i learn). Coinbase transaction right here refers back to the first transaction in a block , not Coinbase software program/firm.
Suppose i’ve all the information wanted to construct coinbase transaction (model,output,ect) besides the p2pkh ScriptPubKey , and i’ve my handle that i generate utilizing bitcoin rpc getnewaddress , how do i generate the p2pkh ScriptPubKey ?
Additional query : when i generate new handle utilizing bitcoin rpc getnewaddress , is the generated handle a public key or personal key ?
Sorry i am new to bitcoin, i actually do not know.