Convert proposer_address from Tendermint RPC to bech32?

Hi,

I’ve been stuck on this one for a while. On the /blockchain endpoint for the Tendermint RPC, it returns the proposer_address as a base64 encoded string. I want to turn this into the cosmosvaloper address but have been unable to figure it out. I’ve tried numerous stuff like amino encoding and then bech32 encoding on top like the docs suggest but I’m never able to get the validators address.

Anyone have any ideas on how to do this? Seems like it should be simple, not sure what I’m missing!

The proposer address field should be a hex encoding of the 20-byte address. You can copy it into any bech32 generator and use the tag/prefix “cosmos” to get the right bech32 address. There should be no amino involved in addresses.