<p>It's a native segwit output. 0x00 signifies the segwit version (which is v0 in this case), 0x14 is the bytes to push and <code>2f82e61a98eb7027672760c691784d5fbccf7ce3</code> is the hash160 of the public key. Native segwit addresses uses bech32 encoding as defined in <a href="https://github.com/bitcoin/bips/blob/master/bip-0173.mediawiki" rel="nofollow noreferrer">BIP 173</a> and begin with <code>bc1</code>. Use <a href="https://github.com/bitcoin/bips/blob/master/bip-0173.mediawiki#Reference_implementations" rel="nofollow noreferrer">this</a> for reference implementations in various programming languages. The address associated with the locking script is thus <code>bc1q97pwvx5cadczwee8vrrfz7zdt77v7l8re20cz4</code></p>

CC BY-SA 4.0
2019-05-21T17:08:38.213Z
Are you sure? but the address you entered is wrong and is not in 
https://www.blockchain.com/
or
https://www.blockchain.com
Saeed
CC BY-SA 4.0
2019-05-21T17:20:01.247Z
@Saeed The address I have listed in the answer is correct. Most block explorers have still not implemented support for bech32 native segwit addresses. You can check the transaction containing the address here. Note the first output of the transaction. http://chainquery.com/bitcoin-api/getrawtransaction/0a9ac867a88cbfb60bdbf2a9063e4dffb374201490075e41057450ebbdf689e4/1
Ugam Kamat
CC BY-SA 4.0
2019-05-26T07:51:40.457Z
Thank you. it seems that the address you generated is valid, but I can't generate it with bech32 which you introduced before.
first I extract public key (2f82e61a98eb7027672760c691784d5fbccf7ce3 ) then encode it with sha256 and then encode it with RIPEMD160. at last, I give generated output to bech32 encoder and it generates a valid bitcoin address but it is not bc1q97pwvx5cadczwee8vrrfz7zdt77v7l8re20cz4 which you produced.
Saeed
CC BY-SA 4.0
2019-05-26T10:50:21.757Z
@Saeed `2f82e61a98eb7027672760c691784d5fbccf7ce3` is not the public key but the hash160 of the public key. So you do not have to calculate the hash again. Just bech32 encode `2f82e61a98eb7027672760c691784d5fbccf7ce3` using version 0.
Ugam Kamat
CC BY-SA 4.0
2019-05-21T15:32:11.780Z
2019-05-21T15:32:11.780Z
Ugam Kamat
<p>A few days ago, I got a BITCOIN traffic which contains some tx message.
some of tx messages contain witness data.
I want to produce all output addresses from transaction output scripts.
I extracted some of them, but in some cases, generated output address however seems to be valid,  but I can't track them in some sites like </p>

<p><a href="https://www.blockchain.com" rel="nofollow noreferrer">https://www.blockchain.com</a></p>

<p>as an example, in tx output script which is showed below, how I can extract True address?</p>

<pre><code>00142f82e61a98eb7027672760c691784d5fbccf7ce3
</code></pre>

<p>it seems a script which has op_code = 0x00 and push data length = 0x14.</p>

<transactions><bitcoin-core><blockchain><script><witness-data>
How to generate an output address from output scrips which start with 0x00?
Saeed
# How to generate an output address from output scrips which start with 0x00?

(Asked by: username_0 on 2019-05-21)

A few days ago, I got a BITCOIN traffic which contains some tx message.
some of tx messages contain witness data.
I want to produce all output addresses from transaction output scripts.
I extracted some of them, but in some cases, generated output address however seems to be valid, but I can't track them in some sites like

<https://www.blockchain.com>

as an example, in tx output script which is showed below, how I can extract True address?

```
00142f82e61a98eb7027672760c691784d5fbccf7ce3

```

it seems a script which has op\_code = 0x00 and push data length = 0x14.

**Tags:** transactions, bitcoin-core, blockchain, script, witness-data


---

## 1 answers

### Answer by username_1 on 2019-05-21. Score: 2 | Accepted answer

It's a native segwit output. 0x00 signifies the segwit version (which is v0 in this case), 0x14 is the bytes to push and `2f82e61a98eb7027672760c691784d5fbccf7ce3` is the hash160 of the public key. Native segwit addresses uses bech32 encoding as defined in [BIP 173](https://github.com/bitcoin/bips/blob/master/bip-0173.mediawiki) and begin with `bc1`. Use [this](https://github.com/bitcoin/bips/blob/master/bip-0173.mediawiki#Reference_implementations) for reference implementations in various programming languages. The address associated with the locking script is thus `bc1q97pwvx5cadczwee8vrrfz7zdt77v7l8re20cz4`

> **Comments:**
> **username_0**: Are you sure? but the address you entered is wrong and is not in  https://www.blockchain.com/ or https://www.blockchain.com  
> **username_1**: @username_0 The address I have listed in the answer is correct. Most block explorers have still not implemented support for bech32 native segwit addresses. You can check the transaction containing the address here. Note the first output of the transaction. http://chainquery.com/bitcoin-api/getrawtransaction/0a9ac867a88cbfb60bdbf2a9063e4dffb374201490075e41057450ebbdf689e4/1  
> **username_0**: Thank you. it seems that the address you generated is valid, but I can't generate it with bech32 which you introduced before. first I extract public key (2f82e61a98eb7027672760c691784d5fbccf7ce3 ) then encode it with sha256 and then encode it with RIPEMD160. at last, I give generated output to bech32 encoder and it generates a valid bitcoin address but it is not bc1q97pwvx5cadczwee8vrrfz7zdt77v7l8re20cz4 which you produced.  
> **username_1**: @username_0 `2f82e61a98eb7027672760c691784d5fbccf7ce3` is not the public key but the hash160 of the public key. So you do not have to calculate the hash again. Just bech32 encode `2f82e61a98eb7027672760c691784d5fbccf7ce3` using version 0.  

---

