Skip to content

Commit b50a09e

Browse files
committed
more details in command-line keyinfo
1 parent 055b6d7 commit b50a09e

File tree

1 file changed

+12
-3
lines changed

1 file changed

+12
-3
lines changed

pywallet.py

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/usr/bin/env python
22
#-*- coding: utf-8 -*-
3-
pywversion="2.0.5"
3+
pywversion="2.0.6"
44
never_update=False
55

66
#
@@ -2256,8 +2256,17 @@ def importprivkey(db, sec, label, reserve, keyishex, verbose=True):
22562256
addr = public_key_to_bc_address(public_key)
22572257

22582258
if verbose:
2259-
print "Address: %s" % addr
2260-
print "Privkey: %s" % SecretToASecret(secret, compressed)
2259+
print "Address (%s): %s"%(aversions[addrtype], addr)
2260+
print "Privkey (%s): %s"%(aversions[addrtype], SecretToASecret(secret, compressed))
2261+
print "Hexprivkey: %s"%(secret.encode('hex'))
2262+
print "Hash160: %s"%(bc_address_to_hash_160(addr).encode('hex'))
2263+
if compressed:
2264+
print "Pubkey: 04%.64x%.64x"%(pkey.pubkey.point.x(), pkey.pubkey.point.y())
2265+
else:
2266+
print "Pubkey: 0%d%.64x"%(2+(pkey.pubkey.point.y()&1), pkey.pubkey.point.x())
2267+
if int(secret.encode('hex'), 16)>_r:
2268+
print 'Beware, 0x%s is equivalent to 0x%.33x</b>'%(secret.encode('hex'), int(secret.encode('hex'), 16)-_r)
2269+
22612270

22622271

22632272
global crypter, passphrase, json_db

0 commit comments

Comments
 (0)