<p>Native segwit version 0 outputs are specified in <a href="https://github.com/bitcoin/bips/blob/master/bip-0141.mediawiki" rel="nofollow noreferrer">BIP 141</a>. The address format for native segwit version 0 outputs is specified in <a href="https://github.com/bitcoin/bips/blob/master/bip-0173.mediawiki" rel="nofollow noreferrer">BIP 173</a>.</p>
<p>The BIPs include specifications of the respective standards, link to reference implementations, and either provide test vectors (BIP 173) or include tests in the reference implementation (BIP 141).</p>

CC BY-SA 4.0
2024-08-22T15:38:33.993Z
2024-08-22T15:38:33.993Z
Murch
<p>Here it is, with links to BIPs: <a href="https://en.bitcoin.it/wiki/Bech32" rel="nofollow noreferrer">https://en.bitcoin.it/wiki/Bech32</a></p>

CC BY-SA 4.0
2023-07-21T01:13:57.573Z
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
CC BY-SA 4.0
2023-07-09T12:11:53.207Z
2023-07-09T12:11:53.207Z
Putnik
<p>I Googled and found some BIPs but looking through bitcoincore.org, I could not find documentation on the process to generate a P2WPKH address.</p>
<p>Looking through other random articles, I see the process is roughly something like:</p>
<ol>
<li>Start with a compressed public key</li>
<li>Perform SHA-256 followed by RIPEMD-160 hashing on it</li>
<li>Add a witness version byte</li>
<li>Encode using Bech32</li>
</ol>
<p>Again, these are just random internet articles so not authoritative and may be missing steps and/or important details.</p>
<p>So where can I find something authoritative? If a source doesn't exist, how is one meant to implement the steps required to generate?</p>

CC BY-SA 4.0
2023-07-08T09:07:07.310Z
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
CC BY-SA 4.0
2023-07-21T01:14:50.990Z
@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
<address-generation><bech32-address><p2wpkh><documentation>
Is there authoritative documentation on how to generate a P2WPKH address?
Ash
# Is there authoritative documentation on how to generate a P2WPKH address?

(Asked by: username_0 on 2023-07-08)

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?

**Tags:** address-generation, bech32-address, p2wpkh, documentation

> **Comments:**
> **username_1**: 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.  
> **username_0**: @username_1 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.  

---

## 2 answers

### Answer by username_2 on 2024-08-22. Score: 0

Native segwit version 0 outputs are specified in [BIP 141](https://github.com/bitcoin/bips/blob/master/bip-0141.mediawiki). The address format for native segwit version 0 outputs is specified in [BIP 173](https://github.com/bitcoin/bips/blob/master/bip-0173.mediawiki).

The BIPs include specifications of the respective standards, link to reference implementations, and either provide test vectors (BIP 173) or include tests in the reference implementation (BIP 141).


---

### Answer by username_3 on 2023-07-09. Score: 0

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

> **Comments:**
> **username_0**: 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?  

---

