<p>BitcoinSharp does not use the same format that the standard Bitcoin client uses for its wallet file.</p>

<p>BitcoinSharp simply serializes the Wallet object into Binary and writes it to a file whereas the standard Bitcoin client writes its wallet.dat file in a BerkeleyDB format, so the two are not compatible.</p>

<p>You could use something like <a href="https://github.com/jackjack-jj/pywallet">pywallet</a> to export the keys from wallet.dat and then manually add them to BitcoinSharp's Wallet object, but you won't be able to directly read a wallet.dat.</p>

CC BY-SA 3.0
2011-12-15T12:13:54.950Z
I am using serial&desirial wallet object into to file. Thanks..
Darkwave34
CC BY-SA 3.0
2011-12-15T16:55:36.767Z
Not sure I understand the comment, could you rephrase? It doesn't matter what method you're using to open or read the file, Bitcoin's wallet.dat and BitcoinSharp's wallet file are not in the same format - one cannot read or write to the other.
David Perry
CC BY-SA 3.0
2011-12-13T14:23:57.940Z
2011-12-13T14:23:57.940Z
David Perry
<p>I use BitcoinSharp with C#.net. I try to reading my wallet.dat (dont encrpyt). And some error : "The input stream is not a valid binary format. The starting contents (in bytes) are: 00-00-00-00-01-00-00-00-00-00-00-00-62-31-05-00-09 .." </p>

<p>Have any Idea ? </p>

<p>Thanks..</p>

CC BY-SA 3.0
2011-12-13T10:04:15.590Z
Can you reproduce this with a fresh test wallet? Perhaps you can post a link to such a wallet here, to help reproduce it? Also, perhaps Bitcoin SE isn't the best place to ask this - try contacting the developers of BitcoinSharp.
ripper234
<wallet>
Read wallet.dat error?
Darkwave34
# Read wallet.dat error?

(Asked by: username_0 on 2011-12-13)

I use BitcoinSharp with C#.net. I try to reading my wallet.dat (dont encrpyt). And some error : "The input stream is not a valid binary format. The starting contents (in bytes) are: 00-00-00-00-01-00-00-00-00-00-00-00-62-31-05-00-09 .."

Have any Idea ?

Thanks..

**Tags:** wallet

> **Comments:**
> **username_1**: Can you reproduce this with a fresh test wallet? Perhaps you can post a link to such a wallet here, to help reproduce it? Also, perhaps Bitcoin SE isn't the best place to ask this - try contacting the developers of BitcoinSharp.  

---

## 1 answers

### Answer by username_2 on 2011-12-13. Score: 5

BitcoinSharp does not use the same format that the standard Bitcoin client uses for its wallet file.

BitcoinSharp simply serializes the Wallet object into Binary and writes it to a file whereas the standard Bitcoin client writes its wallet.dat file in a BerkeleyDB format, so the two are not compatible.

You could use something like [pywallet](https://github.com/jackjack-jj/pywallet) to export the keys from wallet.dat and then manually add them to BitcoinSharp's Wallet object, but you won't be able to directly read a wallet.dat.

> **Comments:**
> **username_0**: I am using serial&desirial wallet object into to file. Thanks..  
> **username_2**: Not sure I understand the comment, could you rephrase? It doesn't matter what method you're using to open or read the file, Bitcoin's wallet.dat and BitcoinSharp's wallet file are not in the same format - one cannot read or write to the other.  

---

