I generate my Key Hash Using the Following Function

const getAddressKeyHash = (address) => {
  return toHex(

Now i need to revert this back to Bech32. Can someone help?

1 Answer 1


Hashing is a one way function; the purpose of it is to verify the authenticity of data, not to encrypt data.

If you hash a piece of data, it should be impossible to revert the hash back to it's original form; this is a key operating principle of any hash function.

Generally, when a key-hash is used there should be a point in the process where an associated public/private key is supplied, and is used in combination with the key-hash to perform some sort of true/false evaluation.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.