<p>It's a Segwit output and hence does not have the address associated with it. The locking script for a Segwit transaction includes the witness version (0 in this case) and the redeem script (which is 43aac20a116e09ea4f7914be1c55e4c17aa600b7). Given that the length of the redeem script is 20-byte, this locking address is pay-to-witness public key hash (P2WPKH). Hence the redeem script is hash160 of the compressed public key.</p>

<p>Since Segwit was implemented with a soft fork, there are clients that have not fully updated their software. For those clients, the locking script will look in a way that anyone can spend the output. But for Segwit aware clients, they would realize that it is a Segwit transaction with 0 as the witness version.</p>

<p>You could create a pay-to-script-hash of the P2WPKH. By that I mean that you could embed the witness as a script and generate an address. What you need to do is take hash160 of (0x001443aac20a116e09ea4f7914be1c55e4c17aa600b7). The first byte 00 is the witness version, second byte (14) represents the bytes to push to the stack (20-bytes) and the rest is your witness. Then you can base58check encode it using a prefix of '0x05'</p>

<p>In the future it is expected that most clients will upgrade to Segwit. At that time, it is proposed that the address to be locked will be a base32encode of the script (0 43aac20a116e09ea4f7914be1c55e4c17aa600b7). The address will start with bc for mainnet, separated by 1 and then the encoded version including the checksum. This addresses are called Bech-32 address.</p>

<p>This is how the address will look. Refer <a href="https://github.com/bitcoin/bips/blob/master/bip-0173.mediawiki/" rel="noreferrer">BIP-173</a> for more details.</p>

<p>Mainnet P2WPKH: bc1qw508d6qejxtdg4y5r3zarvary0c5xw7kv8f3t4</p>

<p>Testnet P2WPKH: tb1qw508d6qejxtdg4y5r3zarvary0c5xw7kxpjzsx</p>

<p>Mainnet P2WSH: bc1qrp33g0q5c5txsp9arysrx4k6zdkfs4nce4xj0gdcccefvpysxf3qccfmv3</p>

<p>Testnet P2WSH: tb1qrp33g0q5c5txsp9arysrx4k6zdkfs4nce4xj0gdcccefvpysxf3q0sl5k7</p>

CC BY-SA 4.0
2019-01-06T13:06:11.943Z
2019-01-06T14:04:37.120Z
2019-01-06T14:04:37.120Z
Ugam Kamat
<p>Native segwit outputs (P2WSH and P2WPKH) do not currently have an address type, so there are no addresses for these outputs.</p>

CC BY-SA 3.0
2017-07-07T21:58:59.323Z
One has been proposed: https://github.com/bitcoin/bips/blob/master/bip-0173.mediawiki
Pieter Wuille
CC BY-SA 4.0
2019-07-10T10:05:45.073Z
This was correct when this answered was published but is no longer correct. See Ugam Kamat's answer instead.
Thorkil Værge
CC BY-SA 3.0
2017-07-07T21:36:47.313Z
2017-07-07T21:36:47.313Z
Ava Chow
<p>Is there an address associated with P2WSH scripts?<br>
for testnet txid =<code>6717c8971dccbf826790efc16fb357f1e225fed3448247b8556c9f13a6c0ce42</code>, i get:
<code>
"vout": [
    {
      "value": 0.05994165,
      "n": 0,
      "scriptPubKey": {
        "asm": "0 43aac20a116e09ea4f7914be1c55e4c17aa600b7",
        "hex": "001443aac20a116e09ea4f7914be1c55e4c17aa600b7",
        "type": "witness_v0_keyhash"
      }
    }
  ]
</code>
Is there no address associated with this?</p>

<segregated-witness><address-format><p2wsh>
P2WSH, witness_v0_scripthash: how to derive an address
Albert S
# P2WSH, witness_v0_scripthash: how to derive an address

(Asked by: username_0 on 2017-07-07)

Is there an address associated with P2WSH scripts?  
for testnet txid =`6717c8971dccbf826790efc16fb357f1e225fed3448247b8556c9f13a6c0ce42`, i get:
`"vout": [
{
"value": 0.05994165,
"n": 0,
"scriptPubKey": {
"asm": "0 43aac20a116e09ea4f7914be1c55e4c17aa600b7",
"hex": "001443aac20a116e09ea4f7914be1c55e4c17aa600b7",
"type": "witness_v0_keyhash"
}
}
]`
Is there no address associated with this?

**Tags:** segregated-witness, address-format, p2wsh


---

## 2 answers

### Answer by username_1 on 2019-01-06. Score: 9

It's a Segwit output and hence does not have the address associated with it. The locking script for a Segwit transaction includes the witness version (0 in this case) and the redeem script (which is 43aac20a116e09ea4f7914be1c55e4c17aa600b7). Given that the length of the redeem script is 20-byte, this locking address is pay-to-witness public key hash (P2WPKH). Hence the redeem script is hash160 of the compressed public key.

Since Segwit was implemented with a soft fork, there are clients that have not fully updated their software. For those clients, the locking script will look in a way that anyone can spend the output. But for Segwit aware clients, they would realize that it is a Segwit transaction with 0 as the witness version.

You could create a pay-to-script-hash of the P2WPKH. By that I mean that you could embed the witness as a script and generate an address. What you need to do is take hash160 of (0x001443aac20a116e09ea4f7914be1c55e4c17aa600b7). The first byte 00 is the witness version, second byte (14) represents the bytes to push to the stack (20-bytes) and the rest is your witness. Then you can base58check encode it using a prefix of '0x05'

In the future it is expected that most clients will upgrade to Segwit. At that time, it is proposed that the address to be locked will be a base32encode of the script (0 43aac20a116e09ea4f7914be1c55e4c17aa600b7). The address will start with bc for mainnet, separated by 1 and then the encoded version including the checksum. This addresses are called Bech-32 address.

This is how the address will look. Refer [BIP-173](https://github.com/bitcoin/bips/blob/master/bip-0173.mediawiki/) for more details.

Mainnet P2WPKH: bc1qw508d6qejxtdg4y5r3zarvary0c5xw7kv8f3t4

Testnet P2WPKH: tb1qw508d6qejxtdg4y5r3zarvary0c5xw7kxpjzsx

Mainnet P2WSH: bc1qrp33g0q5c5txsp9arysrx4k6zdkfs4nce4xj0gdcccefvpysxf3qccfmv3

Testnet P2WSH: tb1qrp33g0q5c5txsp9arysrx4k6zdkfs4nce4xj0gdcccefvpysxf3q0sl5k7


---

### Answer by username_2 on 2017-07-07. Score: 2

Native segwit outputs (P2WSH and P2WPKH) do not currently have an address type, so there are no addresses for these outputs.

> **Comments:**
> **username_3**: One has been proposed: https://github.com/bitcoin/bips/blob/master/bip-0173.mediawiki  
> **username_4**: This was correct when this answered was published but is no longer correct. See username_1 username_1's answer instead.  

---

