Bitcoin Forum
May 28, 2024, 11:59:07 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: How to find address where bitcoin came from  (Read 1816 times)
hamburger (OP)
Full Member
***
Offline Offline

Activity: 241
Merit: 107



View Profile WWW
August 05, 2012, 07:48:56 PM
 #1

Hi,

How do I find the address and transaction id where the bitcoin came from that is send to my address - using php and bitcoind?

Tnx,

Hamburger

Datacoin : DHZ6H91fsDoBHbdqED3ysCJJ2TUh3zRMZD
Krugercoin : Yz3A9sTMp2yh5QLuAL8YQyvS5PdjHRHkkf
gweedo
Legendary
*
Offline Offline

Activity: 1498
Merit: 1000


View Profile
August 05, 2012, 08:08:10 PM
 #2

Use need to make JSON-RPC calls using these commands https://en.bitcoin.it/wiki/Original_Bitcoin_client/API_Calls_list
Pieter Wuille
Legendary
*
qt
Offline Offline

Activity: 1072
Merit: 1178


View Profile WWW
August 05, 2012, 08:10:44 PM
 #3

Bitcoin transactions do not have a well-defined 'from' address.

Every transactions consumes some coins, combines them, splits them again in new coins, and assigns a rule about who can spend those new coins. Those rules can (but do not necessarily) correspond to an address.

It is possible to look up the coins consumed by a transaction, and check which addresses those were assigned to, though.

There is no guarantee that there is just one, there is no guarantee that there is one at all, and there is also no guarantee that sending something to those addresses will end up at the sender of the original transaction.

If you need a refund address for a transaction, the best practice is to just ask for a refund address from the customer/peer/...

I do Bitcoin stuff.
hamburger (OP)
Full Member
***
Offline Offline

Activity: 241
Merit: 107



View Profile WWW
August 05, 2012, 08:51:25 PM
 #4

@gweedo

Tnx, but it is not there.

@Pieter Wuille

Tnx, I have notice this and also picked it up for blockchain.info on this while looking around for a solution. It seems that it should not be a problem as long as I do not reuse the the receiving address on my side.

I will in the mean time use a manual process until someone could assist me with this.

Datacoin : DHZ6H91fsDoBHbdqED3ysCJJ2TUh3zRMZD
Krugercoin : Yz3A9sTMp2yh5QLuAL8YQyvS5PdjHRHkkf
gweedo
Legendary
*
Offline Offline

Activity: 1498
Merit: 1000


View Profile
August 05, 2012, 09:42:33 PM
 #5

@gweedo

Tnx, but it is not there.

@Pieter Wuille

Tnx, I have notice this and also picked it up for blockchain.info on this while looking around for a solution. It seems that it should not be a problem as long as I do not reuse the the receiving address on my side.

I will in the mean time use a manual process until someone could assist me with this.

no but the standard practice is to have many different address so those become unique so you can easily track transactions that are made to your wallet.
Sergio_Demian_Lerner
Hero Member
*****
expert
Offline Offline

Activity: 554
Merit: 632


View Profile WWW
August 05, 2012, 11:31:49 PM
 #6

no but the standard practice is to have many different address so those become unique so you can easily track transactions that are made to your wallet.

With Destination Address Anonymization (https://bitcointalk.org/index.php?topic=98737.0) you don't need to. You can give each client an unique number k. This has the additional benefit that your address is always the same and the user can save it in his address book, as normal.
hamburger (OP)
Full Member
***
Offline Offline

Activity: 241
Merit: 107



View Profile WWW
August 06, 2012, 04:13:27 AM
 #7

@gweedo
@Sergio_Demian_Lerner

Tnx for your input, providing a new address to a user and understanding the different address per transaction is not a problem - I just would like to send bitcoin back to the same address where it came from instead of asking the user for a generated address from their wallet.

Datacoin : DHZ6H91fsDoBHbdqED3ysCJJ2TUh3zRMZD
Krugercoin : Yz3A9sTMp2yh5QLuAL8YQyvS5PdjHRHkkf
mem
Hero Member
*****
Offline Offline

Activity: 644
Merit: 501


Herp Derp PTY LTD


View Profile
August 06, 2012, 03:13:14 PM
 #8

@gweedo
@Sergio_Demian_Lerner

Tnx for your input, providing a new address to a user and understanding the different address per transaction is not a problem - I just would like to send bitcoin back to the same address where it came from instead of asking the user for a generated address from their wallet.


he wants a satoshidice style payout system I believe.
Im not sure how they do it (abe ?) but I do know you can look up the information using the blockchain.info json api

hamburger (OP)
Full Member
***
Offline Offline

Activity: 241
Merit: 107



View Profile WWW
August 06, 2012, 07:57:52 PM
 #9

he wants a satoshidice style payout system I believe.
Im not sure how they do it (abe ?) but I do know you can look up the information using the blockchain.info json api

I have no idea what the satoshidice style payout system is. - (Checked the site http://www.satoshidice.com/, they also mention it "WARNING: Only use wallets that allow you to receive Bitcoin from the same address you sent from.")

I saw this idea on a site (could be bitlotto or raffle site) that said you must send the bitcoin from an address that you can receive from but not using a site like www.instawallet.org to send the bitcoin from. I like the way it is presented on blockchain.info but I do not want to rely on another party to provide me with the info.

I've changed my process to allow the user to manually enter their bitcoin address (allowing for mistakes) and the user will have to wait for 6 confirmations to complete the process.


Datacoin : DHZ6H91fsDoBHbdqED3ysCJJ2TUh3zRMZD
Krugercoin : Yz3A9sTMp2yh5QLuAL8YQyvS5PdjHRHkkf
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!