<blockquote>
<p>Transaction Wallet-Address extraction</p>
</blockquote>
<p>There is nothing in the body of the question that asks about addresses. However I'll cover that: the blockchain does not contain addresses. It contains bitcoin locking scripts for which or from which an address can be calculated.</p>
<p>See <a href="https://bitcoin.stackexchange.com/q/19081/13866">parsing bitcoin input and output addresses from scripts</a><br />
and <a href="https://bitcoin.stackexchange.com/q/92957/13866">How to parse transaction script to address the correct way?</a></p>
<p>Note that wallets usually &quot;contain&quot; many addresses. None of which is really <em>the</em> wallet-address.</p>
<blockquote>
<p>I am confused about how I would go about getting sender(s) and receiver(s)</p>
</blockquote>
<p>The Bitcoin blockchain contains no information about senders or receivers in the common meanings of those words. It does not identify computers, devices, people or organisations</p>
<p>See <a href="https://bitcoin.stackexchange.com/q/113631/13866">In what format does a block store the transaction data?</a></p>
<blockquote>
<p>It is clear to me that if I have multiple inputs / outputs that there might be multiple senders / receiver</p>
</blockquote>
<p>True</p>
<blockquote>
<p>but how do I determine them?</p>
</blockquote>
<p>You can't</p>
<blockquote>
<p>If the transactions in the blk files don't allow for that then how do I figure out who sent who what?</p>
</blockquote>
<p>If you are a party to a transaction, then you will know because the receiver gives the sender an address of the receiver's. For example by showing them a barcode they can scan with a phone. The receiver usually chooses a new unique address for each transaction. Both parties can therefore associate the address with their real-world transaction including anything they know about the other party.</p>
<p>If you are not a party then you have to analyse patterns of spending in the blockchain - this is known as blockchain analytics. There are businesses you can pay to do this for you. There is no guarantee anyone can identify parties to a transaction.</p>
<blockquote>
<p>I do not need a 1 to 1 mapping of transactions, if 5 people combined sent 7 other 3 BTC that is perfectly fine for my purposes as well.</p>
</blockquote>
<p>In general, you can not determine the number of people involved. The blockchain has no mapping of inputs or outputs to people. You can only make informed guesses.</p>

CC BY-SA 4.0
2023-02-19T15:22:13.480Z
Thank you very much for your answer it is much appreciated!
TheEyeOfAr3s
CC BY-SA 4.0
2023-02-19T09:16:57.233Z
2023-02-19T10:21:12.963Z
2023-02-19T10:21:12.963Z
RedGrittyBrick
<p>When taking a look at the blk.dat files I am confused about how I would go about getting sender(s) and receiver(s). It is clear to me that if I have multiple inputs / outputs that there might be multiple senders / receivers but how do I determine them?</p>
<p>If the transactions in the blk files don't allow for that then how do I figure out who sent who what?</p>
<p>I do not need a 1 to 1 mapping of transactions, if 5 people combined sent 7 other 3 BTC that is perfectly fine for my purposes as well.</p>

<bitcoin-core><transactions><address><block>
Transaction Wallet-Address extraction
TheEyeOfAr3s
# Transaction Wallet-Address extraction

(Asked by: username_0 on 2023-02-18)

When taking a look at the blk.dat files I am confused about how I would go about getting sender(s) and receiver(s). It is clear to me that if I have multiple inputs / outputs that there might be multiple senders / receivers but how do I determine them?

If the transactions in the blk files don't allow for that then how do I figure out who sent who what?

I do not need a 1 to 1 mapping of transactions, if 5 people combined sent 7 other 3 BTC that is perfectly fine for my purposes as well.

**Tags:** bitcoin-core, transactions, address, block


---

## 1 answers

### Answer by username_1 on 2023-02-19. Score: 1 | Accepted answer

> Transaction Wallet-Address extraction

There is nothing in the body of the question that asks about addresses. However I'll cover that: the blockchain does not contain addresses. It contains bitcoin locking scripts for which or from which an address can be calculated.

See [parsing bitcoin input and output addresses from scripts](https://bitcoin.stackexchange.com/q/19081/13866)  
and [How to parse transaction script to address the correct way?](https://bitcoin.stackexchange.com/q/92957/13866)

Note that wallets usually "contain" many addresses. None of which is really *the* wallet-address.

> I am confused about how I would go about getting sender(s) and receiver(s)

The Bitcoin blockchain contains no information about senders or receivers in the common meanings of those words. It does not identify computers, devices, people or organisations

See [In what format does a block store the transaction data?](https://bitcoin.stackexchange.com/q/113631/13866)

> It is clear to me that if I have multiple inputs / outputs that there might be multiple senders / receiver

True

> but how do I determine them?

You can't

> If the transactions in the blk files don't allow for that then how do I figure out who sent who what?

If you are a party to a transaction, then you will know because the receiver gives the sender an address of the receiver's. For example by showing them a barcode they can scan with a phone. The receiver usually chooses a new unique address for each transaction. Both parties can therefore associate the address with their real-world transaction including anything they know about the other party.

If you are not a party then you have to analyse patterns of spending in the blockchain - this is known as blockchain analytics. There are businesses you can pay to do this for you. There is no guarantee anyone can identify parties to a transaction.

> I do not need a 1 to 1 mapping of transactions, if 5 people combined sent 7 other 3 BTC that is perfectly fine for my purposes as well.

In general, you can not determine the number of people involved. The blockchain has no mapping of inputs or outputs to people. You can only make informed guesses.

> **Comments:**
> **username_0**: Thank you very much for your answer it is much appreciated!  

---

