Pages:
Author

Topic: [2 BTC Reward] How to find out, which address send me bitcoins via an API - page 2. (Read 15885 times)

member
Activity: 80
Merit: 10
BitcoinRaffle.co
Have a look at this transaction for someone who purchased 2 raffle tickets yesterday (0.02 BTC):

http://blockchain.info/tx-index/a1679b53884c61db994edc58ac1a9440952b88007efbd3dc692fcf327a5fad25?format=json

The 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.
full member
Activity: 143
Merit: 100
I've justed added a 2 BTC reward for the person who, gives me the tip to solve my problem.
full member
Activity: 143
Merit: 100
Might Armory help you do what you are trying to do?

 - https://bitcointalksearch.org/topic/m.864720

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.
legendary
Activity: 2506
Merit: 1010
Might Armory help you do what you are trying to do?

 - https://bitcointalksearch.org/topic/m.864720
full member
Activity: 143
Merit: 100
*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  Undecided


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.
legendary
Activity: 924
Merit: 1004
Firstbits: 1pirata
*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  Undecided
full member
Activity: 143
Merit: 100
*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.


Quote
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.
legendary
Activity: 924
Merit: 1004
Firstbits: 1pirata
*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 .

Quote
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.
full member
Activity: 143
Merit: 100
full member
Activity: 143
Merit: 100
Thank you for your Help anyway.

So I'm hoping rightnow, that somebody of you can help me to solve my problem.

Greetings,
Fredyy
hero member
Activity: 882
Merit: 1006

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.
full member
Activity: 143
Merit: 100
Hi,

i created a test address to see, whats happening with 1 transaction:

In bitcoin-qt the "From Field" of this Transaction is "Unknown".
On Blockchain in looks okay http://blockchain.info/address/13s7qNB3EaKhRtAqAPrQbhgiE6K3hBpPyA but the json output is a mess and shows me a lot of addresses i don't know and the value is totally wrong : http://blockchain.info/address/13s7qNB3EaKhRtAqAPrQbhgiE6K3hBpPyA?format=json

On Blockexplorer i could also find out, which address sent the bitcoins, but the website is horrible slow at the moment and i think i need a pretty responsive system so blockexplorer could not help me to continue http://blockexplorer.com/address/13s7qNB3EaKhRtAqAPrQbhgiE6K3hBpPyA

Quote
"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.
full member
Activity: 143
Merit: 100
Hi,

i created a test address to see, whats happening with 1 transaction:

In bitcoin-qt the "From Field" of this Transaction is "Unknown".
On Blockchain in looks okay http://blockchain.info/address/13s7qNB3EaKhRtAqAPrQbhgiE6K3hBpPyA but the json output is a mess and shows me a lot of addresses i don't know and the value is totally wrong : http://blockchain.info/address/13s7qNB3EaKhRtAqAPrQbhgiE6K3hBpPyA?format=json

On Blockexplorer i could also find out, which address sent the bitcoins, but the website is horrible slow at the moment and i think i need a pretty responsive system so blockexplorer could not help me to continue http://blockexplorer.com/address/13s7qNB3EaKhRtAqAPrQbhgiE6K3hBpPyA
member
Activity: 112
Merit: 10
Don't get eaten by wolves!
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
full member
Activity: 143
Merit: 100
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.
member
Activity: 112
Merit: 10
Don't get eaten by wolves!
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.
full member
Activity: 143
Merit: 100
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
Pages:
Jump to: