Skip to content

Instantly share code, notes, and snippets.

@AbdussamadA
Created February 4, 2018 01:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save AbdussamadA/dd46a31033f2eb9e5189ed0b849c4be8 to your computer and use it in GitHub Desktop.
Save AbdussamadA/dd46a31033f2eb9e5189ed0b849c4be8 to your computer and use it in GitHub Desktop.
#!/usr/bin/python3
from electrum import bitcoin
import sys
if len( sys.argv ) > 2:
format,privkey,compressed=bitcoin.deserialize_privkey( sys.argv[1] )
print( bitcoin.serialize_privkey( privkey, compressed, sys.argv[2] ) )
else:
print( "Please provide arguments: Usage electrum-convert-privkey <privkey> <target_type>")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment