I am trying to open my bitcoin-qt wallet with bitcoinj. I have this simple code:
private static final File WALLET_FILE = new File("__PATH__");
public static void main(String[] args) {
Wallet wallet;
try {
wallet = Wallet.loadFromFile(WALLET_FILE);
} catch (IOException e) {
System.out.println("Couldn't open wallet: " + e);
return;
}
System.out.println("Balance: " + wallet.getBalance());
}
I get an error:
Couldn't open wallet: com.google.protobuf.InvalidProtocolBufferException: Protocol message contained an invalid tag (zero).
I check the status on bitcoin-qt and my wallet seems synchronize.
I am far from an expert in bitcoin, but I wonder if you know the solution.
apparently this is not possible, I asked the question on bitcoin stackechange and they told me it is not the same format: