<p>An address is a human construct, and is meaningless to the p2p protocol - The p2p protocol is only concerned with Bitcoin Scripts.</p>

<p>If you have a raw tx object, you can attempt to find the address for an output by checking if the locking script (scriptPubKey) field matches the format for a known p2sh, p2pkh, p2wpkh, or p2pk address.</p>

<p>If it does, you can follow the respective base58 or bech32 encoding methods to convert it to an address. If it does not, then you have a non-standard output that does not correspond to an address.</p>

CC BY-SA 4.0
2019-07-04T12:03:33.333Z
2019-07-04T12:03:33.333Z
Raghav Sood
<p>does anyone here knows how to find the addresses from a tx object from the bitcoin protocol documentation on the peer to peer network??</p>

<p>in the document it says that tx message is only consist of version, flag, tx_incount, tx_in, tx_out count , tx_out, tx_witnesses, lock_time. so i am starting to doubt if there is a way to do it only through p2p network.</p>

<p>if so how do website such as blockchain.info knows the subject of a transaction?</p>

<p>thanks in advance</p>

<bitcoin-core><p2p><tcp>
Finding wallet address on peer 2 peer network
nicholas___
# Finding wallet address on peer 2 peer network

(Asked by: username_0 on 2019-07-04)

does anyone here knows how to find the addresses from a tx object from the bitcoin protocol documentation on the peer to peer network??

in the document it says that tx message is only consist of version, flag, tx\_incount, tx\_in, tx\_out count , tx\_out, tx\_witnesses, lock\_time. so i am starting to doubt if there is a way to do it only through p2p network.

if so how do website such as blockchain.info knows the subject of a transaction?

thanks in advance

**Tags:** bitcoin-core, p2p, tcp


---

## 1 answers

### Answer by username_1 on 2019-07-04. Score: 1 | Accepted answer

An address is a human construct, and is meaningless to the p2p protocol - The p2p protocol is only concerned with Bitcoin Scripts.

If you have a raw tx object, you can attempt to find the address for an output by checking if the locking script (scriptPubKey) field matches the format for a known p2sh, p2pkh, p2wpkh, or p2pk address.

If it does, you can follow the respective base58 or bech32 encoding methods to convert it to an address. If it does not, then you have a non-standard output that does not correspond to an address.


---

