Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
prv_key = key.to_extended_key(include_prv=True)
pub_key = key.to_extended_key()
desc =' * [Chain m'
for c in chain:
if c&0x80000000:
desc = desc + '/%d\'' % (c & ~0x80000000)
else:
desc = desc + '/%d' % c
desc = desc + ']'
print desc
print ' * Identifier'
print ' * (hex): %s' % base58.hash_160(point_compress(key.point())).encode('hex')
print ' * (fpr): 0x%s' % key.fingerprint().encode('hex')
print ' * (main addr): %s' % key.address()
print ' * Secret key'
print ' * (hex): %s' % key.prvkey().encode('hex')
print ' * (wif): %s' % SecretToASecret(key.prvkey(), True)
print ' * Public key'
print ' * (hex): %s' % point_compress(key.point()).encode('hex')
print ' * Chain code'
print ' * (hex): %s' % key.chain().encode('hex')
print ' * Serialized'
print ' * (pub hex): %s' % base58.b58decode(pub_key, None).encode('hex')
print ' * (prv hex): %s' % base58.b58decode(prv_key, None).encode('hex')
print ' * (pub b58): %s' % pub_key
print ' * (prv b58): %s' % prv_key
desc = desc + '/%d\'' % (c & ~0x80000000)
else:
desc = desc + '/%d' % c
desc = desc + ']'
print desc
print ' * Identifier'
print ' * (hex): %s' % base58.hash_160(point_compress(key.point())).encode('hex')
print ' * (fpr): 0x%s' % key.fingerprint().encode('hex')
print ' * (main addr): %s' % key.address()
print ' * Secret key'
print ' * (hex): %s' % key.prvkey().encode('hex')
print ' * (wif): %s' % SecretToASecret(key.prvkey(), True)
print ' * Public key'
print ' * (hex): %s' % point_compress(key.point()).encode('hex')
print ' * Chain code'
print ' * (hex): %s' % key.chain().encode('hex')
print ' * Serialized'
print ' * (pub hex): %s' % base58.b58decode(pub_key, None).encode('hex')
print ' * (prv hex): %s' % base58.b58decode(prv_key, None).encode('hex')
print ' * (pub b58): %s' % pub_key
print ' * (prv b58): %s' % prv_key