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)
Ejemplo n.º 2
0
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)
Ejemplo n.º 4
0
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)