Fredyy (OP)
|
|
May 29, 2012, 01:19:05 PM Last edit: May 30, 2012, 03:00:09 PM by Fredyy |
|
Hi, I'm looking for a solution to find out, who send me bitcoins. Websites like http://www.satoshidice.com/ use exactly this, they get a transaction and find out where it came from. Is this done via the bitcoind api or via blockexplorer? How can i do this? Greetings, Fredyy
|
|
|
|
Kansattica
Member
Offline
Activity: 112
Merit: 10
Don't get eaten by wolves!
|
|
May 29, 2012, 01:21:26 PM |
|
You can always see the bitcoin address that the payment originated from, and this is what Satoshidice uses. If you're looking to track who sent you a payment, then I would suggest that you create a new address for each payment you want to recieve.
|
|
|
|
Fredyy (OP)
|
|
May 29, 2012, 01:26:40 PM |
|
The address where the bitcoins came from would be exactly what i need but i cant find out how to do this. Maybe i just didn't find the right api call until now.
|
|
|
|
Kansattica
Member
Offline
Activity: 112
Merit: 10
Don't get eaten by wolves!
|
|
May 29, 2012, 01:29:34 PM |
|
Try looking up the receiving address at http://blockexplorer.com/ or blockchain.info or looking under 'transactions' in the Bitcoin client. This should be able to tell you
|
|
|
|
|
Fredyy (OP)
|
|
May 29, 2012, 03:12:26 PM Last edit: May 29, 2012, 03:24:29 PM by Fredyy |
|
"inputs":[ { "prev_out":{ "type":0, "addr":"1PTmgodUdrxHsdYgnAPUydMRrLRV4iPupU", "value":80760000, "tx_index":7154573, "n":2 } }
You want the addr part, which is the input(s). Thats right, but the value is wrong, it should be 0.001 but not 80760000 Basically im want to create a backend similar to satoshidice, i need to get new transactions on a specific address and value and sender of this transactions. Everything but receiving the senders address could be easily be done via the bitcoin jsonrpc api.
|
|
|
|
Blazr
|
|
May 29, 2012, 04:03:10 PM |
|
Thats right, but the value is wrong, it should be 0.001 but not 80760000
Basically im want to create a backend similar to satoshidice, i need to get new transactions on a specific address and value and sender of this transactions. Everything but receiving the senders address could be easily be done via the bitcoin jsonrpc api.
The 80760000 is the total number of Satoshi's taken out of that address in the transaction. If you look on blockchain, you'll see there are many other recipients in that same transaction. There is a way of doing it with the Bitcoind RPC, but I'm not familiar enough with it to give advice. Hopefully somebody else can be of more help.
|
|
|
|
Fredyy (OP)
|
|
May 29, 2012, 05:16:39 PM |
|
Thank you for your Help anyway.
So I'm hoping rightnow, that somebody of you can help me to solve my problem.
Greetings, Fredyy
|
|
|
|
Fredyy (OP)
|
|
May 29, 2012, 07:21:04 PM |
|
*push*
|
|
|
|
paraipan
In memoriam
Legendary
Offline
Activity: 924
Merit: 1004
Firstbits: 1pirata
|
|
May 29, 2012, 07:27:21 PM |
|
*push*
why the bump ? the answer to you question would be they return the coins to sender, nothing more. Look at the warning on http://www.satoshidice.com . WARNING: Only use wallets that allow you to receive Bitcoin from the same address you sent from. If you're not sure, test with .001 Bitcoins. If you get nothing back, then your wallet is not compatible. It's not recommended in case a person uses web-wallets, and not a desktop client, because they don't associate addresses to any user but internal bitcoin accounts. In exchange the desktop wallet has control over all the input addresses so in theory is safe to send the coins to where they came from. Use the inputs of the transaction, when the coins came to your site, as destination but make sure you put a warning somewhere or else someone may lose some coins.
|
BTCitcoin: An Idea Worth Saving - Q&A with bitcoins on rugatu.com - Check my rep
|
|
|
Fredyy (OP)
|
|
May 29, 2012, 07:47:58 PM |
|
*push*
why the bump ? the answer to you question would be they return the coins to sender, nothing more. Look at the warning on http://www.satoshidice.com . Because i were afraid, that this thread is going to lose attention in this big forum. Yes, they return them to sender, but i see no reliable way to get the sender address via the bitcoind rpc api. WARNING: Only use wallets that allow you to receive Bitcoin from the same address you sent from. If you're not sure, test with .001 Bitcoins. If you get nothing back, then your wallet is not compatible. It's not recommended in case a person uses web-wallets, and not a desktop client, because they don't associate addresses to any user but internal bitcoin accounts. In exchange the desktop wallet has control over all the input addresses so in theory is safe to send the coins to where they came from. Use the inputs of the transaction, when the coins came to your site, as destination but make sure you put a warning somewhere or else someone may lose some coins. I see the problem, but as this is atm no public project, this should not be a problem.
|
|
|
|
paraipan
In memoriam
Legendary
Offline
Activity: 924
Merit: 1004
Firstbits: 1pirata
|
|
May 29, 2012, 08:08:58 PM |
|
*push*
why the bump ? the answer to you question would be they return the coins to sender, nothing more. Look at the warning on http://www.satoshidice.com . Because i were afraid, that this thread is going to lose attention in this big forum. Yes, they return them to sender, but i see no reliable way to get the sender address via the bitcoind rpc api. You're right there, i don't see it either. Tried getting the tx by hash, no inputs there. Then getting the block by hash and list all the tx's, no luck. Probably someone that has more extensive knowledge could bump in and shed some light on this because i'm clueless
|
BTCitcoin: An Idea Worth Saving - Q&A with bitcoins on rugatu.com - Check my rep
|
|
|
Fredyy (OP)
|
|
May 29, 2012, 09:12:01 PM |
|
*push*
why the bump ? the answer to you question would be they return the coins to sender, nothing more. Look at the warning on http://www.satoshidice.com . Because i were afraid, that this thread is going to lose attention in this big forum. Yes, they return them to sender, but i see no reliable way to get the sender address via the bitcoind rpc api. You're right there, i don't see it either. Tried getting the tx by hash, no inputs there. Then getting the block by hash and list all the tx's, no luck. Probably someone that has more extensive knowledge could bump in and shed some light on this because i'm clueless Even a try to complete use BlockChain seems to fail, because I can't find a way to get the bitcoin value of a transaction via their json api. But i would be a lot happier if there is a way, on which i have not to rely on an external provider.
|
|
|
|
Stephen Gornick
Legendary
Offline
Activity: 2506
Merit: 1010
|
|
May 30, 2012, 06:09:17 AM |
|
|
|
|
|
Fredyy (OP)
|
|
May 30, 2012, 01:18:47 PM |
|
Maybe this could help as a last alternative, but I've never worked before with python and would be happy if there were a php alternative to this.
|
|
|
|
Fredyy (OP)
|
|
May 30, 2012, 03:01:19 PM |
|
I've justed added a 2 BTC reward for the person who, gives me the tip to solve my problem.
|
|
|
|
bitcoinraffle.co
Member
Offline
Activity: 80
Merit: 10
BitcoinRaffle.co
|
|
May 30, 2012, 03:39:58 PM |
|
Have a look at this transaction for someone who purchased 2 raffle tickets yesterday (0.02 BTC): http://blockchain.info/tx-index/a1679b53884c61db994edc58ac1a9440952b88007efbd3dc692fcf327a5fad25?format=jsonThe prev_out: addr: is the field you want. In this case "17vBxXJUHVnCdDUvdG4ULUbEzipBRiPMyd" is the address that purchased the tickets. "1AfBK6SeZEeMehmZH831SbdAyrsWfRZUD9" is the raffle address. You mentioned the value in Satoshi is wrong. It is and almost always will be. Each transaction has two parts: an amount sent to you, and an amount sent back to the sender in the same transaction. In this case, the total is 100000000 Satoshi: 2000000 to me, and 98000000 back to the sender. Notice the same address "17vBxXJUHVnCdDUvdG4ULUbEzipBRiPMyd" received the 98000000 Satoshi. If you're still confused or need some PHP code that does this for you, just let me know.
|
|
|
|
Fredyy (OP)
|
|
May 30, 2012, 05:14:44 PM |
|
Have a look at this transaction for someone who purchased 2 raffle tickets yesterday (0.02 BTC): http://blockchain.info/tx-index/a1679b53884c61db994edc58ac1a9440952b88007efbd3dc692fcf327a5fad25?format=jsonThe prev_out: addr: is the field you want. In this case "17vBxXJUHVnCdDUvdG4ULUbEzipBRiPMyd" is the address that purchased the tickets. "1AfBK6SeZEeMehmZH831SbdAyrsWfRZUD9" is the raffle address. You mentioned the value in Satoshi is wrong. It is and almost always will be. Each transaction has two parts: an amount sent to you, and an amount sent back to the sender in the same transaction. In this case, the total is 100000000 Satoshi: 2000000 to me, and 98000000 back to the sender. Notice the same address "17vBxXJUHVnCdDUvdG4ULUbEzipBRiPMyd" received the 98000000 Satoshi. If you're still confused or need some PHP code that does this for you, just let me know. Would be great if you create a little sample for me, thank you for your help!
|
|
|
|
bitcoinraffle.co
Member
Offline
Activity: 80
Merit: 10
BitcoinRaffle.co
|
|
May 30, 2012, 06:57:46 PM |
|
I sent you a PM.
|
|
|
|
Xenland
Legendary
Offline
Activity: 980
Merit: 1003
I'm not just any shaman, I'm a Sha256man
|
|
May 30, 2012, 07:22:21 PM |
|
If you have the money and knowledge to run a 1.5gb server you can run Bitcoin-abe and then query SQL commands against it as if you are querying the Bitcoin blockchain so you can potentially get any transaction information you require.. Is that what your looking for?
|
|
|
|
|