def public_key_to_bc_address(public_key):
- if public_key == 'None': return 'None'
h160 = hash_160(public_key)
return hash_160_to_bc_address(h160)
return b58encode(addr)
def bc_address_to_hash_160(addr):
+ if addr == 'None': return 'None'
bytes = b58decode(addr, 25)
return bytes[1:21]