1

I configured bitcoinj library so I can connect to network, replay blockchain, create addresses, receive and send bitcoins. I using FullPrunedDatabase as block store.

I'm still missing how to find all transaction in this wallet. I'm also interested how to compute confirmed and unconfirmed balance on single address. I know this one was asked here before,How to get balance from a specific address in bitcoinj?, but I cannot figure out how to use CoinSelector

  • I found get wallet.getTransaction(hash) , but still missing get all .. – Pavel Niedoba Feb 21 '16 at 19:38
1

Use Wallet.getTransactions(boolean). This returns a Set<Transaction>:

boolean includeDeadTransactions = true;
Set<Transaction> transactions = wallet.getTransactions(includeDeadTransactions);

for (Transaction t : transactions) {
    //Do something
}
  • Thanks, I have already found transaction hash map on wallet class, so i can get the list. BTW. now I'm trying to get list of change addresses which seems to be more difficult, because of protected and private access. Iwill create new question. – Pavel Niedoba Feb 23 '16 at 1:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.