# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
import grpc

from . import account_pb2 as account__pb2
from . import blockchain_pb2 as blockchain__pb2
from . import metric_pb2 as metric__pb2
from . import rpc_pb2 as rpc__pb2


class AergoRPCServiceStub(object):
  """BlockService serves APIs that aergosvr provides.
  Some methods optionally contains context path if it is also provided by REST API.
  """

  def __init__(self, channel):
    """Constructor.

    Args:
      channel: A grpc.Channel.
    """
    self.NodeState = channel.unary_unary(
        '/types.AergoRPCService/NodeState',
        request_serializer=rpc__pb2.NodeReq.SerializeToString,
        response_deserializer=rpc__pb2.SingleBytes.FromString,
        )
    self.Metric = channel.unary_unary(
        '/types.AergoRPCService/Metric',
        request_serializer=metric__pb2.MetricsRequest.SerializeToString,
        response_deserializer=metric__pb2.Metrics.FromString,
        )
    self.Blockchain = channel.unary_unary(
        '/types.AergoRPCService/Blockchain',
        request_serializer=rpc__pb2.Empty.SerializeToString,
        response_deserializer=rpc__pb2.BlockchainStatus.FromString,
        )
    self.ListBlockHeaders = channel.unary_unary(
        '/types.AergoRPCService/ListBlockHeaders',
        request_serializer=rpc__pb2.ListParams.SerializeToString,
        response_deserializer=rpc__pb2.BlockHeaderList.FromString,
        )
    self.ListBlockStream = channel.unary_stream(
        '/types.AergoRPCService/ListBlockStream',
        request_serializer=rpc__pb2.Empty.SerializeToString,
        response_deserializer=blockchain__pb2.Block.FromString,
        )
    self.GetBlock = channel.unary_unary(
        '/types.AergoRPCService/GetBlock',
        request_serializer=rpc__pb2.SingleBytes.SerializeToString,
        response_deserializer=blockchain__pb2.Block.FromString,
        )
    self.GetTX = channel.unary_unary(
        '/types.AergoRPCService/GetTX',
        request_serializer=rpc__pb2.SingleBytes.SerializeToString,
        response_deserializer=blockchain__pb2.Tx.FromString,
        )
    self.GetBlockTX = channel.unary_unary(
        '/types.AergoRPCService/GetBlockTX',
        request_serializer=rpc__pb2.SingleBytes.SerializeToString,
        response_deserializer=blockchain__pb2.TxInBlock.FromString,
        )
    self.GetReceipt = channel.unary_unary(
        '/types.AergoRPCService/GetReceipt',
        request_serializer=rpc__pb2.SingleBytes.SerializeToString,
        response_deserializer=blockchain__pb2.Receipt.FromString,
        )
    self.GetABI = channel.unary_unary(
        '/types.AergoRPCService/GetABI',
        request_serializer=rpc__pb2.SingleBytes.SerializeToString,
        response_deserializer=blockchain__pb2.ABI.FromString,
        )
    self.SendTX = channel.unary_unary(
        '/types.AergoRPCService/SendTX',
        request_serializer=blockchain__pb2.Tx.SerializeToString,
        response_deserializer=rpc__pb2.CommitResult.FromString,
        )
    self.CommitTX = channel.unary_unary(
        '/types.AergoRPCService/CommitTX',
        request_serializer=blockchain__pb2.TxList.SerializeToString,
        response_deserializer=rpc__pb2.CommitResultList.FromString,
        )
    self.GetState = channel.unary_unary(
        '/types.AergoRPCService/GetState',
        request_serializer=rpc__pb2.SingleBytes.SerializeToString,
        response_deserializer=blockchain__pb2.State.FromString,
        )
    self.GetStateAndProof = channel.unary_unary(
        '/types.AergoRPCService/GetStateAndProof',
        request_serializer=rpc__pb2.AccountAndRoot.SerializeToString,
        response_deserializer=blockchain__pb2.StateProof.FromString,
        )
    self.CreateAccount = channel.unary_unary(
        '/types.AergoRPCService/CreateAccount',
        request_serializer=rpc__pb2.Personal.SerializeToString,
        response_deserializer=account__pb2.Account.FromString,
        )
    self.GetAccounts = channel.unary_unary(
        '/types.AergoRPCService/GetAccounts',
        request_serializer=rpc__pb2.Empty.SerializeToString,
        response_deserializer=account__pb2.AccountList.FromString,
        )
    self.LockAccount = channel.unary_unary(
        '/types.AergoRPCService/LockAccount',
        request_serializer=rpc__pb2.Personal.SerializeToString,
        response_deserializer=account__pb2.Account.FromString,
        )
    self.UnlockAccount = channel.unary_unary(
        '/types.AergoRPCService/UnlockAccount',
        request_serializer=rpc__pb2.Personal.SerializeToString,
        response_deserializer=account__pb2.Account.FromString,
        )
    self.ImportAccount = channel.unary_unary(
        '/types.AergoRPCService/ImportAccount',
        request_serializer=rpc__pb2.ImportFormat.SerializeToString,
        response_deserializer=account__pb2.Account.FromString,
        )
    self.ExportAccount = channel.unary_unary(
        '/types.AergoRPCService/ExportAccount',
        request_serializer=rpc__pb2.Personal.SerializeToString,
        response_deserializer=rpc__pb2.SingleBytes.FromString,
        )
    self.SignTX = channel.unary_unary(
        '/types.AergoRPCService/SignTX',
        request_serializer=blockchain__pb2.Tx.SerializeToString,
        response_deserializer=blockchain__pb2.Tx.FromString,
        )
    self.VerifyTX = channel.unary_unary(
        '/types.AergoRPCService/VerifyTX',
        request_serializer=blockchain__pb2.Tx.SerializeToString,
        response_deserializer=rpc__pb2.VerifyResult.FromString,
        )
    self.QueryContract = channel.unary_unary(
        '/types.AergoRPCService/QueryContract',
        request_serializer=blockchain__pb2.Query.SerializeToString,
        response_deserializer=rpc__pb2.SingleBytes.FromString,
        )
    self.QueryContractState = channel.unary_unary(
        '/types.AergoRPCService/QueryContractState',
        request_serializer=blockchain__pb2.StateQuery.SerializeToString,
        response_deserializer=blockchain__pb2.StateQueryProof.FromString,
        )
    self.GetPeers = channel.unary_unary(
        '/types.AergoRPCService/GetPeers',
        request_serializer=rpc__pb2.Empty.SerializeToString,
        response_deserializer=rpc__pb2.PeerList.FromString,
        )
    self.GetVotes = channel.unary_unary(
        '/types.AergoRPCService/GetVotes',
        request_serializer=rpc__pb2.SingleBytes.SerializeToString,
        response_deserializer=rpc__pb2.VoteList.FromString,
        )
    self.GetStaking = channel.unary_unary(
        '/types.AergoRPCService/GetStaking',
        request_serializer=rpc__pb2.SingleBytes.SerializeToString,
        response_deserializer=rpc__pb2.Staking.FromString,
        )


class AergoRPCServiceServicer(object):
  """BlockService serves APIs that aergosvr provides.
  Some methods optionally contains context path if it is also provided by REST API.
  """

  def NodeState(self, request, context):
    # missing associated documentation comment in .proto file
    pass
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')

  def Metric(self, request, context):
    # missing associated documentation comment in .proto file
    pass
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')

  def Blockchain(self, request, context):
    """option (google.api.http) = {
    get: "/blockchain"
    };
    """
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')

  def ListBlockHeaders(self, request, context):
    # missing associated documentation comment in .proto file
    pass
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')

  def ListBlockStream(self, request, context):
    # missing associated documentation comment in .proto file
    pass
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')

  def GetBlock(self, request, context):
    """option (google.api.http) = {
    get: "/blocks/{blockHash}"
    };    
    """
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')

  def GetTX(self, request, context):
    """option (google.api.http) = {
    get: "/transactions/{value}"
    };    
    """
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')

  def GetBlockTX(self, request, context):
    # missing associated documentation comment in .proto file
    pass
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')

  def GetReceipt(self, request, context):
    # missing associated documentation comment in .proto file
    pass
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')

  def GetABI(self, request, context):
    # missing associated documentation comment in .proto file
    pass
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')

  def SendTX(self, request, context):
    # missing associated documentation comment in .proto file
    pass
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')

  def CommitTX(self, request, context):
    """option (google.api.http) = {
    post: "/transactions"
    body: "transaction"
    };    
    """
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')

  def GetState(self, request, context):
    # missing associated documentation comment in .proto file
    pass
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')

  def GetStateAndProof(self, request, context):
    # missing associated documentation comment in .proto file
    pass
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')

  def CreateAccount(self, request, context):
    # missing associated documentation comment in .proto file
    pass
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')

  def GetAccounts(self, request, context):
    # missing associated documentation comment in .proto file
    pass
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')

  def LockAccount(self, request, context):
    # missing associated documentation comment in .proto file
    pass
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')

  def UnlockAccount(self, request, context):
    # missing associated documentation comment in .proto file
    pass
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')

  def ImportAccount(self, request, context):
    # missing associated documentation comment in .proto file
    pass
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')

  def ExportAccount(self, request, context):
    # missing associated documentation comment in .proto file
    pass
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')

  def SignTX(self, request, context):
    # missing associated documentation comment in .proto file
    pass
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')

  def VerifyTX(self, request, context):
    # missing associated documentation comment in .proto file
    pass
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')

  def QueryContract(self, request, context):
    # missing associated documentation comment in .proto file
    pass
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')

  def QueryContractState(self, request, context):
    # missing associated documentation comment in .proto file
    pass
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')

  def GetPeers(self, request, context):
    # missing associated documentation comment in .proto file
    pass
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')

  def GetVotes(self, request, context):
    # missing associated documentation comment in .proto file
    pass
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')

  def GetStaking(self, request, context):
    # missing associated documentation comment in .proto file
    pass
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')


def add_AergoRPCServiceServicer_to_server(servicer, server):
  rpc_method_handlers = {
      'NodeState': grpc.unary_unary_rpc_method_handler(
          servicer.NodeState,
          request_deserializer=rpc__pb2.NodeReq.FromString,
          response_serializer=rpc__pb2.SingleBytes.SerializeToString,
      ),
      'Metric': grpc.unary_unary_rpc_method_handler(
          servicer.Metric,
          request_deserializer=metric__pb2.MetricsRequest.FromString,
          response_serializer=metric__pb2.Metrics.SerializeToString,
      ),
      'Blockchain': grpc.unary_unary_rpc_method_handler(
          servicer.Blockchain,
          request_deserializer=rpc__pb2.Empty.FromString,
          response_serializer=rpc__pb2.BlockchainStatus.SerializeToString,
      ),
      'ListBlockHeaders': grpc.unary_unary_rpc_method_handler(
          servicer.ListBlockHeaders,
          request_deserializer=rpc__pb2.ListParams.FromString,
          response_serializer=rpc__pb2.BlockHeaderList.SerializeToString,
      ),
      'ListBlockStream': grpc.unary_stream_rpc_method_handler(
          servicer.ListBlockStream,
          request_deserializer=rpc__pb2.Empty.FromString,
          response_serializer=blockchain__pb2.Block.SerializeToString,
      ),
      'GetBlock': grpc.unary_unary_rpc_method_handler(
          servicer.GetBlock,
          request_deserializer=rpc__pb2.SingleBytes.FromString,
          response_serializer=blockchain__pb2.Block.SerializeToString,
      ),
      'GetTX': grpc.unary_unary_rpc_method_handler(
          servicer.GetTX,
          request_deserializer=rpc__pb2.SingleBytes.FromString,
          response_serializer=blockchain__pb2.Tx.SerializeToString,
      ),
      'GetBlockTX': grpc.unary_unary_rpc_method_handler(
          servicer.GetBlockTX,
          request_deserializer=rpc__pb2.SingleBytes.FromString,
          response_serializer=blockchain__pb2.TxInBlock.SerializeToString,
      ),
      'GetReceipt': grpc.unary_unary_rpc_method_handler(
          servicer.GetReceipt,
          request_deserializer=rpc__pb2.SingleBytes.FromString,
          response_serializer=blockchain__pb2.Receipt.SerializeToString,
      ),
      'GetABI': grpc.unary_unary_rpc_method_handler(
          servicer.GetABI,
          request_deserializer=rpc__pb2.SingleBytes.FromString,
          response_serializer=blockchain__pb2.ABI.SerializeToString,
      ),
      'SendTX': grpc.unary_unary_rpc_method_handler(
          servicer.SendTX,
          request_deserializer=blockchain__pb2.Tx.FromString,
          response_serializer=rpc__pb2.CommitResult.SerializeToString,
      ),
      'CommitTX': grpc.unary_unary_rpc_method_handler(
          servicer.CommitTX,
          request_deserializer=blockchain__pb2.TxList.FromString,
          response_serializer=rpc__pb2.CommitResultList.SerializeToString,
      ),
      'GetState': grpc.unary_unary_rpc_method_handler(
          servicer.GetState,
          request_deserializer=rpc__pb2.SingleBytes.FromString,
          response_serializer=blockchain__pb2.State.SerializeToString,
      ),
      'GetStateAndProof': grpc.unary_unary_rpc_method_handler(
          servicer.GetStateAndProof,
          request_deserializer=rpc__pb2.AccountAndRoot.FromString,
          response_serializer=blockchain__pb2.StateProof.SerializeToString,
      ),
      'CreateAccount': grpc.unary_unary_rpc_method_handler(
          servicer.CreateAccount,
          request_deserializer=rpc__pb2.Personal.FromString,
          response_serializer=account__pb2.Account.SerializeToString,
      ),
      'GetAccounts': grpc.unary_unary_rpc_method_handler(
          servicer.GetAccounts,
          request_deserializer=rpc__pb2.Empty.FromString,
          response_serializer=account__pb2.AccountList.SerializeToString,
      ),
      'LockAccount': grpc.unary_unary_rpc_method_handler(
          servicer.LockAccount,
          request_deserializer=rpc__pb2.Personal.FromString,
          response_serializer=account__pb2.Account.SerializeToString,
      ),
      'UnlockAccount': grpc.unary_unary_rpc_method_handler(
          servicer.UnlockAccount,
          request_deserializer=rpc__pb2.Personal.FromString,
          response_serializer=account__pb2.Account.SerializeToString,
      ),
      'ImportAccount': grpc.unary_unary_rpc_method_handler(
          servicer.ImportAccount,
          request_deserializer=rpc__pb2.ImportFormat.FromString,
          response_serializer=account__pb2.Account.SerializeToString,
      ),
      'ExportAccount': grpc.unary_unary_rpc_method_handler(
          servicer.ExportAccount,
          request_deserializer=rpc__pb2.Personal.FromString,
          response_serializer=rpc__pb2.SingleBytes.SerializeToString,
      ),
      'SignTX': grpc.unary_unary_rpc_method_handler(
          servicer.SignTX,
          request_deserializer=blockchain__pb2.Tx.FromString,
          response_serializer=blockchain__pb2.Tx.SerializeToString,
      ),
      'VerifyTX': grpc.unary_unary_rpc_method_handler(
          servicer.VerifyTX,
          request_deserializer=blockchain__pb2.Tx.FromString,
          response_serializer=rpc__pb2.VerifyResult.SerializeToString,
      ),
      'QueryContract': grpc.unary_unary_rpc_method_handler(
          servicer.QueryContract,
          request_deserializer=blockchain__pb2.Query.FromString,
          response_serializer=rpc__pb2.SingleBytes.SerializeToString,
      ),
      'QueryContractState': grpc.unary_unary_rpc_method_handler(
          servicer.QueryContractState,
          request_deserializer=blockchain__pb2.StateQuery.FromString,
          response_serializer=blockchain__pb2.StateQueryProof.SerializeToString,
      ),
      'GetPeers': grpc.unary_unary_rpc_method_handler(
          servicer.GetPeers,
          request_deserializer=rpc__pb2.Empty.FromString,
          response_serializer=rpc__pb2.PeerList.SerializeToString,
      ),
      'GetVotes': grpc.unary_unary_rpc_method_handler(
          servicer.GetVotes,
          request_deserializer=rpc__pb2.SingleBytes.FromString,
          response_serializer=rpc__pb2.VoteList.SerializeToString,
      ),
      'GetStaking': grpc.unary_unary_rpc_method_handler(
          servicer.GetStaking,
          request_deserializer=rpc__pb2.SingleBytes.FromString,
          response_serializer=rpc__pb2.Staking.SerializeToString,
      ),
  }
  generic_handler = grpc.method_handlers_generic_handler(
      'types.AergoRPCService', rpc_method_handlers)
  server.add_generic_rpc_handlers((generic_handler,))
