Skip to content

Instantly share code, notes, and snippets.

View bauerj's full-sized avatar
🍕
Focusing

Johann Bauer bauerj

🍕
Focusing
View GitHub Profile
@bauerj
bauerj / convert_xprv_type.py
Last active September 7, 2018 20:07 — forked from SomberNight/convert_xprv_type.py
convert xprv
from electrum import bitcoin
initial_xprv = 'xprv...' # TODO fill in
target_xtype = 'p2wpkh-p2sh'
_, depth, fingerprint, child_number, c, cK = bitcoin.deserialize_xprv(initial_xprv)
target_xprv = bitcoin.serialize_xprv(target_xtype, c, cK, depth, fingerprint, child_number)
print(target_xprv)

Keybase proof

I hereby claim:

  • I am bauerj on github.
  • I am bauerj (https://keybase.io/bauerj) on keybase.
  • I have a public key ASAWxxopq30HRYZ1YbTirgrhKGqiDK_vQRF-r6ztuKtRLwo

To claim this, I am signing this object: