Convert Casascius mini-private key into WIF format

in bitcoin •  7 years ago 

I decided to write this guide for anyone who, like myself, wants to convert the mini-private key from stored on the physical casascius coin, into the regular WIF format which can be imported into the Bitcoin Core client, and in the process, to avoid using an external service, such as Gemini.

The reason for not using a service was because I wanted to maintain control of my private keys, just in case. Seems reasonable enough?

In order to convert, I ended up writing a small Java function, which takes the mini-private key format as an input, and outputs the wif string as output. You can pull the project from github via the following link:

https://github.com/unk1911/BitcoinUtilities

If you wish you can include this project in your project as a dependency.

To invoke the conversion function, simply call: Casascius.miniToWif(miniPrivKey)

Once you get the private key, importing it into Bitcoin Core becomes trivial: simply open the debug console window and import using the 'importprivkey' command:

importprivkey "myPrivKey" "fromCasascius"

This will trigger the client to rescan, which could take 1-2 hours, and once completed, your coin will appear in the wallet.
Use the same coin for BTC, as well as the BCH and BTG forks.

For each fork/version, you need to create a separate wallet, preferably running in a different VM, you should plan on allocating at least 250GB of disk to each VM, and preferably use SSD to speed things up, it will take many hours to complete the full procedure.

Authors get paid when people like you upvote their post.
If you enjoyed what you read here, create your account today and start earning FREE STEEM!
Sort Order:  
  ·  7 years ago Reveal Comment

Congratulations @unk1911! You have completed some achievement on Steemit and have been rewarded with new badge(s) :

Award for the number of upvotes

Click on any badge to view your own Board of Honor on SteemitBoard.
For more information about SteemitBoard, click here

If you no longer want to receive notifications, reply to this comment with the word STOP

By upvoting this notification, you can help all Steemit users. Learn how here!