thank. but that's a little different. I will not be able to get the private key from such an address.
I found a JavaScript program that does exactly what I want.
Can anyone help with translating it to Java.
Very grateful in advance
So let me get your request straight:
- You have a brainwallet which is hashed to SHA256, and
- You want to make a public key out of this hash which is then hashed again with RIPEMD160, then converted into Witness Data bytes, because a Bech32 address takes a human readable part like "bc" and "tb", followed by a "1" always, then the witness version in the Bech32 number system (0="q", 1="p", etc) and then the 160-bit witness data
- and then finally encode it into Bech32 using these three parts (assume Witness version is 0 and HRP is "bc")
Is this correct?
I'm trying to get from an ordinary word
3 types of addresses and, accordingly, 3 private keys to them.
I already have 2 sets. It remains to get the segwit address (b1) and a private key to it
The JS code obviously does this. But I don’t know how. Probably as you wrote. Let's check))