how do i convert bc1 address to hex? for coinbase transaction Im trying to create a coinbase transaction so that I can do some mining.
I have a bech32 bitcoin address, how do I convert that to hex so that I can include it in the coinbase transaction data?
example&gt; bc1quukrk3u6cgpjhyqvehcj0ruyk8990dpev0zn6h
Also, where are the parts of the address? network type, checksum.
And how would I do it with the other address types?
Thanks in advance!
BIP173 specifies the conversion from Bech32 segwit addresses to scriptPubKey. You probably want to use some reference software to do the decoding (there are several links in the BIP). If you need the details, it is approximately:

Split the address in a &quot;human readable part&quot; and a &quot;data part&quot;; the last '1' character in the address separates the two.
Convert the data part from characters to symbols (integers in range 0-31) using the character map in the BIP.
Verify the checksum (last 6 characters of the data part). I'll refer to the BIP for the details.
Interpret the symbols of the data part as follows:

One symbol: Witness version (number 0-16)
Variable number of symbol: witness program
The last 6 symbols: the checksum


Perform various sanity checks on the data sizes and ranges, also illustrated in the BIP.

The retrieved information (witness version and program) can the be converted to a scriptPubKey, as specified in BIP141. Namely, OP_n (where n is the witness version), followed by a push of the witness program. Note that OP_0 is 0x00, while OP_1-OP_16 are 0x51..0x60.
There is a proposed amendment called BIP350 which improves the checksum for witness versions higher than 0 (which are currently not in use, but may become in use following the activation of Taproot (BIP340-342).
This is how conversion from addresses to scriptPubKeys works for all transaction outputs, FWIW. It is entirely unrelated to coinbases.
Disclaimer: I'm a co-author of all the BIPs mentioned in this answer.