You can try catching sender and recipient address with something like this:
Set<Transaction> transactionSet = bitcoin.wallet().getTransactions(false);
Iterator<Transaction> iterator = transactionSet.iterator();
while (iterator.hasNext()) {
Transaction transaction = iterator.next();
List<TransactionOutput> transactionOutputs = transaction.getOutputs();
for (TransactionOutput to : transactionOutputs) {
Address address = to.getAddressFromP2PKHScript(params);
if (address != null) {
if
(address.toString().equals("msZCnzzqqstKP5JRixNxPxw3oTgVuWxaVm")) {
System.out.println("getAddressFromP2PKHScript: " +
address.toString());
}
}
Address address1 = to.getAddressFromP2SH(params);
if (address1 != null) {
if
(address1.toString().equals("msZCnzzqqstKP5JRixNxPxw3oTgVuWxaVm")) {
System.out.println("getAddressFromP2SH: " +
address1.toString());
}
}
}
On Tuesday, February 28, 2017 at 6:37:47 AM UTC-3, [email protected] wrote:
>
> Hello,
>
> this question is asked before:
>
> https://groups.google.com/forum/#!searchin/bitcoinj/getconnectedoutput|sort:relevance/bitcoinj/WBnvPreSTjA/E0p5ueb7DgAJ
>
> Which is not answered thoruoghly.
>
--
You received this message because you are subscribed to the Google Groups
"bitcoinj" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.