<blockquote>
<p>If I was to search the blockchain for address X, then I see that it has two inputs in a transaction, X and Y.</p>
<p>I can safely assume that X and Y are owned by the same person?</p>
</blockquote>
<p>That's usually the case, but not always.  They could be owned by different people who have cooperated.  It is possible to do this in such a way that neither party reveals their private key to the other.</p>
<blockquote>
<p>Now if I look at all of the transactions for Y, and I see that it has a transaction with two outputs, Y and Z.</p>
<p>Then I can now assume that X, Y and Z are all owned by the same person, right?</p>
</blockquote>
<p>No, that's not a good assumption.  When a transaction has two outputs, there is no reason to think they both belong to the same person.  In fact, a more common case for two-output transactions is that one of the outputs is the &quot;real&quot; payment, and the other is &quot;change&quot; that goes back to another address belonging to the same person who sent the payment.  (See <a href="https://bitcoin.stackexchange.com/questions/736/how-does-change-work-in-a-bitcoin-transaction">How does change work in a bitcoin transaction?</a>)  However, there is no way to be sure which is which.</p>
<blockquote>
<p>If a wallet has 10 addresses, then could I not get all of those addresses using the above method?</p>
</blockquote>
<p>Nope.  If you continue in this way, you'll pull in a vast number of addresses belonging to different people who were paid by your initial target (and people who were paid by them, etc, etc).  You'll also miss any addresses from the wallet that have been used independently, if they've never appeared together in a transaction with any of the other ones you saw.</p>

CC BY-SA 3.0
2018-01-12T13:27:17.183Z
Thanks Nate for the clarification.

If we take out the possibility of a mixer and we can determine the change addresses. Can the assumptions not then be more feasible?
Kyle Graham
CC BY-SA 3.0
2018-01-12T14:52:09.373Z
It would be plausible to guess that *one* of the output addresses (namely, the change address) belongs to the same person as the inputs, assuming you can tell which of the outputs it is (though I know of no reliable way to do that).  It's nonsensical to assume that *all* the outputs belong to the same person as the inputs.  That would mean that nobody could ever transfer money to anyone else.
Nate Eldredge
CC BY-SA 3.0
2018-01-12T00:42:02.770Z
2018-01-12T00:42:02.770Z
2020-06-16T11:10:03.350Z
Nate Eldredge
<p>If I was to search the blockchain for address X, then I see that it has two inputs in a transaction, X and Y.</p>

<p>I can safely assume that X and Y are owned by the same person?</p>

<p>Now if I look at all of the transactions for Y, and I see that it has a transaction with two outputs, Y and Z.</p>

<p>Then I can now assume that X, Y and Z are all owned by the same person, right?</p>

<p>If a wallet has 10 addresses, then could I not get all of those addresses using the above method?</p>

<p>So I essentially assume that, all inputs and outputs belong to the same person for a given address lookup.</p>

<p>Also, if X is both on the input and the output, then it is safe to assume that X being on the output was just used as a change address.</p>

<transactions><blockchain><bitcoind><transaction-input>
Is there a way to get all addresses from an Wallet?
Kyle Graham
# Is there a way to get all addresses from an Wallet?

(Asked by: username_0 on 2018-01-12)

If I was to search the blockchain for address X, then I see that it has two inputs in a transaction, X and Y.

I can safely assume that X and Y are owned by the same person?

Now if I look at all of the transactions for Y, and I see that it has a transaction with two outputs, Y and Z.

Then I can now assume that X, Y and Z are all owned by the same person, right?

If a wallet has 10 addresses, then could I not get all of those addresses using the above method?

So I essentially assume that, all inputs and outputs belong to the same person for a given address lookup.

Also, if X is both on the input and the output, then it is safe to assume that X being on the output was just used as a change address.

**Tags:** transactions, blockchain, bitcoind, transaction-input


---

## 1 answers

### Answer by username_1 on 2018-01-12. Score: 1

> If I was to search the blockchain for address X, then I see that it has two inputs in a transaction, X and Y.
>
> I can safely assume that X and Y are owned by the same person?

That's usually the case, but not always. They could be owned by different people who have cooperated. It is possible to do this in such a way that neither party reveals their private key to the other.

> Now if I look at all of the transactions for Y, and I see that it has a transaction with two outputs, Y and Z.
>
> Then I can now assume that X, Y and Z are all owned by the same person, right?

No, that's not a good assumption. When a transaction has two outputs, there is no reason to think they both belong to the same person. In fact, a more common case for two-output transactions is that one of the outputs is the "real" payment, and the other is "change" that goes back to another address belonging to the same person who sent the payment. (See [How does change work in a bitcoin transaction?](https://bitcoin.stackexchange.com/questions/736/how-does-change-work-in-a-bitcoin-transaction)) However, there is no way to be sure which is which.

> If a wallet has 10 addresses, then could I not get all of those addresses using the above method?

Nope. If you continue in this way, you'll pull in a vast number of addresses belonging to different people who were paid by your initial target (and people who were paid by them, etc, etc). You'll also miss any addresses from the wallet that have been used independently, if they've never appeared together in a transaction with any of the other ones you saw.

> **Comments:**
> **username_0**: Thanks username_1 for the clarification.  If we take out the possibility of a mixer and we can determine the change addresses. Can the assumptions not then be more feasible?  
> **username_1**: It would be plausible to guess that *one* of the output addresses (namely, the change address) belongs to the same person as the inputs, assuming you can tell which of the outputs it is (though I know of no reliable way to do that).  It's nonsensical to assume that *all* the outputs belong to the same person as the inputs.  That would mean that nobody could ever transfer money to anyone else.  

---

