def to_bytes(pub: ECG) -> str: return bytes([2 + (pub.value[1].value % 2)]) + int_to_byte(pub.value[0].value)
def msgsig_to_bytes(v, r, s): return chr(v), int_to_byte(r), int_to_byte(s)
def gen_address(pub: ECG) -> str: x = int_to_byte(pub.value[0].value) y = int_to_byte(pub.value[1].value) return gen_address_from_bytes(x + y)