Author

Topic: Find senders BTC address: using getrawtx decoderawtx.. (Read 936 times)

legendary
Activity: 1260
Merit: 1000
Drunk Posts
Use getrawtx to get the whole transaction sending you coins

decode tx to get spent outputs going into it

use getrawtx to get those and match outputs to address

your transaction may have multiple source addresses.
legendary
Activity: 905
Merit: 1012
You can't. There is no way to do it. The blockchain does not hold that information.
full member
Activity: 235
Merit: 100
I am receiving BTC from couple of friends now !! Smiley looking to do a  btc-startup

please some advice or help...

Note: using jsonRPCClient and PHP (the basic process could be similar to others lang..  I believe)

The website asks them to POST their address before sending, because I am not able to extract automatically the Senders Address.

1.  Create a new address for each sender, using ->getnewaddress('payments');

2.  Then I listen for payment with -->getreceivedbyaddress()
     This way I do not obtain any information about the Tx

3. Find the txid  ?? how?

4. While a better method is found, using ->listtransactions() to read a received tx

5. I can see the senders address is inside this array, How can I be sure I extract the "correct" senders address without comparing it with the one POSTed via the website?
Jump to: