5

I am developing simple Bitcoin application using the bitcoinj library: The user enters the hash of a transaction and my application should return detailed information about that transaction.

How can I load that transaction? Is there a function like peer.getBlock() for transactions?

2

BitCoinJ is a Simplified Payment Verification (SPV) client library

This means that it only downloads the headers for transactions, and only those that are relevant to the private keys contained in its wallet only. This greatly reduces the blockchain download (very quick to get started), but at the cost of not seeing all the other transactions (reduced overall network security).

So, in short, you can't download an arbitrary transaction through BitCoinJ.

However, to answer your requirement have you considered just using the Blockchain.info API?

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.