2
As far as I see there are currently two methods of getting the sender's address in a Bitcoin transaction:
- Look up the input transaction and read the corresponding output address there (like this: How to findout the sender of a transaction)
- Convert the public key in the scriptSig to the address (like this: Why does gettransaction report me only the receiving address?)
Is one of those preferable over the other one?
Normally, senders aren't even aware of which address(es) they might be using for sending. Some wallet software may allow advanced users to specifically choose which sending address to use, but this is not normal. What information do you hope to discover using the sending address? – Greg Hewgill – 2014-04-08T11:09:24.940
@GregHewgill I'm thinking about online services which return the Bitcoins to the originating address, e.g. SatoshiDice. – Mark Goldenstein – 2014-04-08T11:12:38.280