return hash_160_to_bc_address(h160)
def hash_160_to_bc_address(h160):
+ if h160 == 'None': return 'None'
vh160 = chr(addrtype) + h160
h = Hash(vh160)
addr = vh160 + h[0:4]
return b58encode(addr)
def bc_address_to_hash_160(addr):
+ if addr == 'None': return 'None'
bytes = b58decode(addr, 25)
return bytes[1:21]