novitski / bitcoinj

Automatically exported from code.google.com/p/bitcoinj
Apache License 2.0
0 stars 0 forks source link

getting address to #405

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
hello , i m making some ecommerce system.

i can get money sents by overriding this method:

    @Override
    public synchronized void onCoinsReceived(Wallet w, Transaction tx, BigInteger prevBalance, BigInteger newBalance);

But , how can i get receiver address from Transaction object or any other 
object when , onCoinsReceived method called.

Original issue reported on code.google.com by kadir.ba...@gmail.com on 11 May 2013 at 7:16

GoogleCodeExporter commented 9 years ago
From Matt: This seems to be a common concern - perhaps the listener should get 
this as a part of onCoinsReceived...for now, I believe the only option is to go 
through each output int the transaction, check what type it is (pay to pubkey, 
pay to pubkeyhash(address) or other) and determine what address it is to from 
that.

Please use the mailing list for support requests. Opening bugs whenever you 
have a question about how to use the library is not the best way to do things.

Original comment by hearn@google.com on 13 May 2013 at 7:16