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?

2
  • 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. Jul 8, 2023 at 9: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, 2023 at 1:14

1 Answer 1

0

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

1
  • 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, 2023 at 1:13

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.