Get hex string for a public address If I want to watch a public address, I need the hex string for that address, because the importpubkey command only takes a hex input. How can I convert a  base 58 address to a hex string using the bitcoin core?
You cannot generate public key from a bitcoin address. From bitcoin address, all you can get is the hash160. Following reference, this can be done through base58 decoding, going from Step 9 -> Step 8. So you get same output as from Step 4 along with checksum at the end.

Basically you have two alternatives:


If you have the private key, generate the public key and use importpubkey
Use importaddress