How to open bitcoin-qt wallet with bitcoinj

0 votes

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).

How to solve this?

Aug 24, 2018 in Blockchain by digger
• 26,740 points
718 views

1 answer to this question.

0 votes

I found this issue solved at the following link: https://bitcoin.stackexchange.com/questions/8463/open-bitcoin-qt-wallet-with-bitcoinj/8466?noredirect=1#8466 .Visit it and check if It solves your problem.

answered Aug 24, 2018 by slayer
• 29,370 points

Related Questions In Blockchain

0 votes
1 answer

How to check Bitcoin Wallet ?

This can be done using Extended Public ...READ MORE

answered Jul 13, 2018 in Blockchain by Perry
• 17,100 points
1,391 views
0 votes
0 answers

hd wallet bip44 in js - how to create an address for a chain other than bitcoin?

I have a small script basically taken ...READ MORE

Mar 2, 2022 in Blockchain by Aditya
• 7,680 points
1,001 views
+1 vote
0 answers

How to check a Bitcoin wallet balance from first generated address (m/44'/0'/0'/0/0)

Is there a way to check a ...READ MORE

Mar 4, 2022 in Blockchain by Soham
• 9,710 points
2,260 views
+1 vote
1 answer

Protocols used in a distributed/dlt system for the nodes to establish communication

yes all are over TCP/IP connections secured ...READ MORE

answered Aug 6, 2018 in Blockchain by aryya
• 7,460 points
1,461 views
0 votes
1 answer

Truffle tests not running after truffle init

This was a bug. They've fixed it. ...READ MORE

answered Sep 11, 2018 in Blockchain by Christine
• 15,790 points
1,947 views
0 votes
1 answer

Hyperledger Sawtooth vs Quorum in concurrency and speed Ask

Summary: Both should provide similar reliability of ...READ MORE

answered Sep 26, 2018 in IoT (Internet of Things) by Upasana
• 8,620 points
1,470 views
0 votes
1 answer

How to check history of blockchain.info wallet?

In the link you mentioned(https://blockchain.info/q), there are ...READ MORE

answered Jul 23, 2018 in Blockchain by slayer
• 29,370 points
1,891 views
0 votes
1 answer
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP