from typing import List, Optional, Protocol, Callable

class StateNetworkNode(Protocol):
    def node_id(self) -> str:
        ...

    def read_data(self, node_id: str, key: str) -> Optional[str]:
        ...

    def update_data(self, key: str, value: str) -> None:
        ...

    def peers(self) -> List[str]:
        ...

    def stop(self) -> None:
        ...

    def is_shut_down(self) -> bool:
        ...

    def send_to_node(self, node_id: str, data: bytes):
        ...

    def set_receive_cb(self, cb: Callable):
        ...
    
    def set_update_cb(self, cb: Callable):
        ...
    
    def set_disconnect_cb(self, cb: Callable):
        ...

    def receive_data(self, data: Callable):
        ...