Bitcoinj: Multiple wallets In my Java application I am now required to handle multiple bitcoin wallets (HD wallets?). This means sending and receiving BTC. Unfortunately bitcoin is quite new for me, so there are some questions:

Would it be possible to use BitcoinJ in order to do this? Is it performing well with hundrets of wallets (or more)? If not, what would be the alternative?

Regarding the workflow:
Of course the private key will stay on the user side and thus cannot be read by the application itself. Would it still be possible to raise events like "money received" without having the private key of the wallet?
I had the same doubt. I've done a little research in the library bitcoinj, and I think that it is possible to use multiple wallets at the same time. I recommend you first work with a single wallet so that you can understand a little how it works the library. I leave an example:

public class MainClass {
    private static final File BLOCKCHAIN_FILE = new File("block.dat");
    private static final NetworkParameters NET_PARAMS = MainNetParams.get();

    public static void main(String[] args) throws Exception {

        List&lt;Wallet&gt; wallets = getWallets();
        BlockStore blockStore = new SPVBlockStore(NET_PARAMS, BLOCKCHAIN_FILE);
        BlockChain blockChain = new BlockChain(NET_PARAMS, wallets, blockStore);
        PeerGroup peerGroup = new PeerGroup(NET_PARAMS, blockChain);

        for (Wallet w : wallets) {
            peerGroup.addWallet(w);
        }

        //Starting peerGroup;
        peerGroup.startAsync();

        //Start download blockchain
        peerGroup.downloadBlockChain();
    }

    public static List&lt;Wallet&gt; getWallets() throws UnreadableWalletException {

        List&lt;Wallet&gt; wallets = new ArrayList&lt;&gt;();
        for (int i = 0; i &lt; 5; i++) {
            Wallet w = Wallet.loadFromFile(new File("wallet_" + i + ".dat"), null);
            wallets.add(w);
        }

        return wallets;
    }
}