def SecretToASecret(secret, compressed=False): prefix = int_to_byte((addrtype+128)&255) if addrtype==48: #assuming Litecoin prefix = int_to_byte(128) vchIn = prefix + secret if compressed: vchIn += b'\01' return EncodeBase58Check(vchIn)
def SecretToASecret(secret, compressed=False): prefix = int_to_byte((addrtype + 128) & 255) if addrtype == 48: #assuming Litecoin prefix = int_to_byte(128) vchIn = prefix + secret if compressed: vchIn += b'\01' return EncodeBase58Check(vchIn)
def hash_160_to_bc_address(h160, v=None): if v==None: v=addrtype vh160 = int_to_byte(v) + h160 h = Hash(vh160) addr = vh160 + h[0:4] return b58encode(addr)
def hash_160_to_bc_address(h160, v=None): if v == None: v = addrtype vh160 = int_to_byte(v) + h160 h = Hash(vh160) addr = vh160 + h[0:4] return b58encode(addr)