Skip to content

Instantly share code, notes, and snippets.

@janfrode
Last active April 23, 2022 03:34
Show Gist options
  • Select an option

  • Save janfrode/f07f0a86bcea638aeb9c to your computer and use it in GitHub Desktop.

Select an option

Save janfrode/f07f0a86bcea638aeb9c to your computer and use it in GitHub Desktop.
Import onename.io bitcoin address into bitcoin-qt
As a bitcoin newbie, I had a hard time understanding how to import the bitcoin address given
at onename.io into bitcoin-qt. Too many formats involved.. The steps I ended up running to
accomplish this was:
Passphrase given to me on onename.io was something like:
the quick brown fox jumps over the lazy dog
and the public bitcoin address was:
17nMabiqPXrQBnNiLsqJkSKWDgR1aRnjnY
To get this into bitcoin-qt, I first launched a clean fedora container:
/usr/bin/docker run -i -t --rm=true fedora /bin/bash
Installed pip. characters and coinkit:
yum install python-pip
pip install coinkit
sha256 of my passphrase:
# echo -n "the quick brown fox jumps over the lazy dog" | sha256sum
05c6e08f1d9fdafa03147fcb8f82f124c76d2f70e3d989dc8aadb5e7d7450bec -
Convert to wallet format:
# python
>>> from coinkit import BitcoinKeypair
>>> hex_private_key = '05c6e08f1d9fdafa03147fcb8f82f124c76d2f70e3d989dc8aadb5e7d7450bec'
>>> keypair = BitcoinKeypair(hex_private_key)
>>> keypair.address()
'17nMabiqPXrQBnNiLsqJkSKWDgR1aRnjnY' # matches earlier mentioned public address, good
>>> keypair.wif_pk()
'5Hrq9HpNLUtpbstrWxjvk7ukTzogiMPCrTqrq72vRJ6zhg3LxRi'
Now in bitcoin-qt I clicked on "debug" - "console" and entered:
importprivkey 5Hrq9HpNLUtpbstrWxjvk7ukTzogiMPCrTqrq72vRJ6zhg3LxRi onenameprivkey
And success!
https://onename.io/janfrode
@rock217
Copy link

rock217 commented Apr 23, 2022

Stumbled upon this just now and looked up your txes. What a blast from the past!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment