Author

Topic: Bitcoin Daemon - List Transactions (Read 3544 times)

full member
Activity: 224
Merit: 100
August 24, 2011, 05:36:22 PM
#8
yeah thats the best way i think. Now need to re-write the script to make a desposit address for each person with them choosing the payout address.... just gotta think of the best way to this. Have 1 account on the daemon for each round, and multiple addresses for each deposit, then match it to the payout address via mysql db?

legendary
Activity: 1199
Merit: 1012
August 24, 2011, 09:10:16 AM
#7
Also when displaying the transactions, is it best to display them from a mysql database, or directly from the api?. Maybe its best to run a script every 10 seconds that checks for new deposits and updates a database...

To my mind if you are using mysql database anyway, it is better to run the script which will update the database with new transactions. In this case your site won't depend on bitcoind (only the script will depend on it).
full member
Activity: 224
Merit: 100
August 24, 2011, 08:51:44 AM
#6
It seems like they must be getting the senders address another way. Realised bitcoinduit just asks for your payout address and asigns you a deposit address... but thats effort!


Also when displaying the transactions, is it best to display them from a mysql database, or directly from the api?. Maybe its best to run a script every 10 seconds that checks for new deposits and updates a database...
legendary
Activity: 1199
Merit: 1012
August 24, 2011, 08:43:26 AM
#5
Well the senders address gets listed on many sites like bitcoinduit, bitlotto.com and on the bitcoin app itself. I simply just need to list the transactions and their return addresses for a lotto game Smiley

Oh, now I see why they write something like "DO NOT SEND COINS FROM AN EWALLET.(Online service) Only send the 0.25 BTC from Bitcoin software running on your computer. If you send the BTC from an EWALLET, you will not get the winnings." Smiley

I am not sure, but I don't think they do it via standard bitcoin API. Probably they use jgarzik's patch I mentioned before or rely on blockexplorer.com as vv01f already mentioned Smiley Update: oh, didn't notice the link to Abe..
sr. member
Activity: 314
Merit: 250
August 24, 2011, 08:39:19 AM
#4
Like arsenische already mentioned. There can be both multiple receivers and senders, like in http://blockexplorer.com/tx/75c906e12f52e1eff5d0f59fbff5dd97a6448b3b04d6b018a09274aa01b9e2c1

So you can rely on blockexplorer and fetch senders (or just the first) from the transaction you received. Or reuse some reviewable code to inspect the blocks yourself: https://bitcointalk.org/index.php?topic=22785.0;all
full member
Activity: 224
Merit: 100
August 24, 2011, 08:30:33 AM
#3
Well the senders address gets listed on many sites like bitcoinduit, bitlotto.com and on the bitcoin app itself. I simply just need to list the transactions and their return addresses for a lotto game Smiley
legendary
Activity: 1199
Merit: 1012
August 24, 2011, 05:30:50 AM
#2
When i use List Transactions, it only returns the address the coins were sent to

I think this is done intentionally to prevent bad practices (in some cases the sender's address might not correspond to the sender, and the sender might want to receive bitcoins to a new unique address). Moreover in one transaction there can be several sender's addresses.

But if you really need it, I think it is possible to get it from blockexplorer.com or to use the getblock patch by jgarzik yourself. You can find the transaction in the block and get its inputs. Inputs reference the outputs of previous transactions (which contain the desired sender's addresses).
full member
Activity: 224
Merit: 100
August 24, 2011, 04:42:28 AM
#1
Hi,

When i use List Transactions, it only returns the address the coins were sent to, how do i list the sending addresses of the transactions?

I need it for my PHP game.

thanks
Jump to: