def get_node_info(self) -> NodeInfo: """Gets information about the node. Note:: REST API: GET "/getNodeInfo" Returns: A `NodeInfo` object. """ res: pb.NodeInfoResponse = self._stub.GetNodeInfo(pb.EmptyRequest()) return NodeInfo().from_raw(res)
def get_chain_info(self) -> ChainInfo: """Gets information about the blockchain. Note: REST API: GET "/getChainInfo" Returns: A `ChainInfo` object. """ res: pb.ChainInfoResponse = self._stub.GetChainInfo(pb.EmptyRequest()) return ChainInfo().from_raw(res)
def get_gas_ratio(self) -> GasRatio: """Gets the gas ratio used on the blockchain. Note: REST API: GET "/getGasRatio" Returns: A `GasRatio` object. """ res: pb.GasRatioResponse = self._stub.GetGasRatio(pb.EmptyRequest()) return GasRatio().from_raw(res)
def get_ram_info(self) -> RAMInfo: """Gets information about the RAM on the blockchain. Note: REST API: GET "/getRAMInfo" Returns: A `RAMInfo` object. """ res: pb.RAMInfoResponse = self._stub.GetRAMInfo(pb.EmptyRequest()) return RAMInfo().from_raw(res)