src/fnpb/node.py
def _exec_command(self, cli_command: str, command: str) -> Optional[Dict[str, str]]:
        """Executes bitcoin or lighting command on the SSH client.

        Args:
            command: The command to execute, which must return valid JSON response.
                https://stackoverflow.com/questions/39491420/python-jsonexpecting-property-name-enclosed-in-double-quotes
            layer: The layer, bitcoin or lightning (default).
        Returns:
            A JSOn response of the bitcoin or lightning command or None.
        """
        command = f"{cli_command} {command}"
        stdin, stdout, stderr = self.ssh_client.exec_command(command)
        stdin.close()
        s = "".join(stdout.readlines())
        s = s.strip()
        s = s.replace("\'", "\"")
        data = json.loads(s)
        return data
Executes bitcoin or lighting command on the SSH client.

        Args:
            command: The command to execute, which must return valid JSON response.
                https://stackoverflow.com/questions/39491420/python-jsonexpecting-property-name-enclosed-in-double-quotes
            layer: The layer, bitcoin or lightning (default).
        Returns:
            A JSOn response of the bitcoin or lightning command or None.
        
Executes bitcoin or lighting command on the SSH client.
Executes bitcoin or lighting command on the SSH client .
def _exec_command(self, cli_command: str, command: str) -> Optional[Dict[str, str]]:
        command = f"{cli_command} {command}"
        stdin, stdout, stderr = self.ssh_client.exec_command(command)
        stdin.close()
        s = "".join(stdout.readlines())
        s = s.strip()
        s = s.replace("\'", "\"")
        data = json.loads(s)
        return data
def _exec_command ( self , cli_command : str , command : str ) -> Optional [ Dict [ str , str ] ] : command = f"{cli_command} {command}" stdin , stdout , stderr = self . ssh_client . exec_command ( command ) stdin . close ( ) s = "" . join ( stdout . readlines ( ) ) s = s . strip ( ) s = s . replace ( "\'" , "\"" ) data = json . loads ( s ) return data
Executes bitcoin or lighting command on the SSH client.
Executes bitcoin or lighting command on the SSH client .
"""Executes bitcoin or lighting command on the SSH client.

        Args:
            command: The command to execute, which must return valid JSON response.
                https://stackoverflow.com/questions/39491420/python-jsonexpecting-property-name-enclosed-in-double-quotes
            layer: The layer, bitcoin or lightning (default).
        Returns:
            A JSOn response of the bitcoin or lightning command or None.
        """
A JSOn response of the bitcoin or lightning command or None.
A JSOn response of the bitcoin or lightning command or None .
self
cli_command
str
command
str
The command to execute, which must return valid JSON response.
The command to execute which must return valid JSON response .
layer
The layer, bitcoin or lightning (default).
The layer bitcoin or lightning ( default ) .