I'm trying to get unspent transaction using bitcoinj like here without using api calls. How can I do this?
Bitcoinj is only a library, but there is an experimental full verification mode that would allow this. https://bitcoinj.github.io/full-verification It is important to note it is not intended for production use and almost certainly contains chain splitting bugs.
Map<Sha256Hash, Transaction> unspentTxs = wallet.getTransactionPool(WalletTransaction.Pool.UNSPENT);