def validate(tx_context):
    """Validate transaction context

    :param tx_context: transaction context
    :return: transaction context if no error
    :raises ValueError: Invalid transaction context

    """
    if not tx_context:
        raise ValueError("Missing transaction context object")

    if not tx_context.crypto:
        raise ValueError("Missing 'crypto' parameter "
                         "in the transaction context object")

    if not tx_context.user:
        raise ValueError("Missing 'user' parameter "
                         "in the transaction context object")

    if not tx_context.tx_prop_req:
        raise ValueError("Missing 'tx_prop_req' parameter "
                         "in the transaction context object")
    return tx_context