def privatekey_to_publickey(private_key_bin: bytes) -> bytes:
    """ Returns public key in bitcoins 'bin' encoding. """
    if not ishash(private_key_bin):
        raise ValueError('private_key_bin format mismatch. maybe hex encoded?')
    return keys.PrivateKey(private_key_bin).public_key.to_bytes()
def privatekey_to_publickey ( private_key_bin : bytes ) -> bytes : if not ishash ( private_key_bin ) : raise ValueError ( 'private_key_bin format mismatch. maybe hex encoded?' ) return keys . PrivateKey ( private_key_bin ) . public_key . to_bytes ( )
Returns public key in bitcoins 'bin' encoding.