1

I Googled and found some BIPs but looking through bitcoincore.org, I could not find documentation on the process to generate a P2WPKH address.

Looking through other random articles, I see the process is roughly something like:

  1. Start with a compressed public key
  2. Perform SHA-256 followed by RIPEMD-160 hashing on it
  3. Add a witness version byte
  4. Encode using Bech32

Again, these are just random internet articles so not authoritative and may be missing steps and/or important details.

So where can I find something authoritative? If a source doesn't exist, how is one meant to implement the steps required to generate?

Vojtěch Strnad
  • 8,292
  • 2
  • 12
  • 40
Ash
  • 111
  • 1
  • 3
    BIP141 and BIP173 should provide a complete specification on how to create and encode P2WPKH outputs. If there isn't a specific problem you're facing, your question might get closed for being too vague. – Vojtěch Strnad Jul 08 '23 at 09:07
  • @VojtěchStrnad Thank you. I think I did read one of those but couldn't formulate the complete picture. Maybe the other has the missing info I need. Will take a look. – Ash Jul 21 '23 at 01:14

1 Answers1

0

Here it is, with links to BIPs: https://en.bitcoin.it/wiki/Bech32

Putnik
  • 63
  • 7
  • Thanks. I should've mentioned, I did read through that before I posted the question, but wasn't sure on the site's authoritativeness. Any thoughts? – Ash Jul 21 '23 at 01:13