pub fn parse_public_key(hex_str: &str) -> Result<PublicKey, String>
Parse a public key from hex string.