コード例 #1
0
ファイル: iost.py プロジェクト: quiz42/pyost
    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)
コード例 #2
0
ファイル: iost.py プロジェクト: quiz42/pyost
    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)
コード例 #3
0
ファイル: iost.py プロジェクト: quiz42/pyost
    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)
コード例 #4
0
ファイル: iost.py プロジェクト: quiz42/pyost
    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)