def str_to_hex(input: str) -> str:
    """
    Convert a UTF-8-encoded string into hexadecimal encoding.
    XRPL uses hex strings as inputs in fields like `domain`
    in the `AccountSet` transaction.

    Args:
        input: UTF-8-encoded string to convert

    Returns:
        Input encoded as a hex string.
    """
    return input.encode("utf-8").hex()