Skip to content

Instantly share code, notes, and snippets.

@JimmyMow
Created August 11, 2016 21:16
Show Gist options
  • Save JimmyMow/ffca37891c8e58616d382f3a9ffeffb4 to your computer and use it in GitHub Desktop.
Save JimmyMow/ffca37891c8e58616d382f3a9ffeffb4 to your computer and use it in GitHub Desktop.
from two1.wallet import Two1Wallet
from two1.bitcoin.crypto import HDPublicKey
with open('{}/.two1/wallet/default_wallet.json'.format(expanduser('~'))) as data_file:
wallet_data = json.load(data_file)
wallet = Two1Wallet.import_from_mnemonic(mnemonic=wallet_data['master_seed'])
pubkey = wallet.get_payout_public_key()
privkey = wallet.get_private_for_public(pubkey)
# How can I turn the privkey object into a string in WIF format?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment