diff --git a/pywallet.py b/pywallet.py index 0ffb33b..aa249f6 100644 --- a/pywallet.py +++ b/pywallet.py @@ -2580,6 +2580,11 @@ def rnip_callback(a): public_key = k['pubkey'].decode('hex') crypter.SetIV(Hash(public_key)) secret = crypter.Decrypt(ckey) + + # some coins (e.g. NamecoinQ) store keys in serialized format + if len(secret) > 32: + secret = PrivKeyToSecret(secret) + compressed = public_key[0] != '\04'