Bitcoin Forum
June 20, 2024, 10:59:43 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Find senders BTC address: using getrawtx decoderawtx..  (Read 918 times)
danystatic (OP)
Full Member
***
Offline Offline

Activity: 235
Merit: 100


View Profile
November 24, 2013, 06:29:44 PM
 #1

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?
maaku
Legendary
*
expert
Offline Offline

Activity: 905
Merit: 1011


View Profile
November 24, 2013, 07:49:09 PM
 #2

You can't. There is no way to do it. The blockchain does not hold that information.

I'm an independent developer working on bitcoin-core, making my living off community donations.
If you like my work, please consider donating yourself: 13snZ4ZyCzaL7358SmgvHGC9AxskqumNxP
mb300sd
Legendary
*
Offline Offline

Activity: 1260
Merit: 1000

Drunk Posts


View Profile WWW
November 25, 2013, 02:45:31 AM
 #3

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.

1D7FJWRzeKa4SLmTznd3JpeNU13L1ErEco
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!