Post
Topic
Board Development & Technical Discussion
Re: Base58 (P2SH) to Bech32 (P2WPKH) Converter
by
suzanne5223
on 19/02/2021, 19:21:32 UTC
This raises another question for me. Just how to get Bitcoin Addresses in (P2WPKH) format from ripemd160 hash?
I am not familiar with the Bech32 package. Are there any examples of generating [ripemd160 hash> Addresses]

I think you need the public key as you are once told using the hash160 public key which is also the ripemd160(sha256(publickey)) and add 0 Uint8 to the output of bech32 words.
You are going to use bech32 encode it with the prefix bc for bitcoin.
As it was illustrated on https://stackoverflow.com/questions/63670096/how-to-generate-bech32-address-from-the-public-key-bitcoin