Last active
July 8, 2019 02:30
-
-
Save SomberNight/7430aff37ca883fdabb2b46f40bb87b7 to your computer and use it in GitHub Desktop.
convert xprv
This file contains 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
import electrum | |
from electrum import bip32 | |
initial_xprv = '.......' # TODO fill in | |
target_xtype = 'p2wpkh' # TODO change? | |
_, depth, fingerprint, child_number, c, cK = bip32.deserialize_xprv(initial_xprv) | |
target_xprv = bip32.serialize_xprv(target_xtype, c, cK, depth, fingerprint, child_number) | |
print(target_xprv) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment