def build_request(input_id, method, params=None):
        """
        Build a request dict from passed parameters

        Parameters
        ----------
        input_id : str
            The id of the request message to construct

        method : str
            rpc method to invoke

        params : dict, optional
            any parameters to pass to the rpc method
            Defaults to None.

        Returns
        -------
        dict
            The request object as a dict
        """
        request = {"method": method, "id": input_id}
        if params is not None:
            request["params"] = params
        return request

        Build a request dict from passed parameters

        Parameters
        ----------
        input_id : str
            The id of the request message to construct

        method : str
            rpc method to invoke

        params : dict, optional
            any parameters to pass to the rpc method
            Defaults to None.

        Returns
        -------
        dict
            The request object as a dict
        
electrum/plugins/jade/jadepy/jade.py