6

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

  • 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 Dec 13 '11 at 10:04
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 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.

  • I am using serial&desirial wallet object into to file. Thanks.. – Darkwave34 Dec 15 '11 at 12:13
  • 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 Dec 15 '11 at 16:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.