Created
August 11, 2016 21:16
-
-
Save JimmyMow/ffca37891c8e58616d382f3a9ffeffb4 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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