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

from hfc.protos.token import prover_pb2 as hfc_dot_protos_dot_token_dot_prover__pb2


class ProverStub(object):
  """Prover provides support to clients for the creation of FabToken transactions,
  and to query the ledger.
  """

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

    Args:
      channel: A grpc.Channel.
    """
    self.ProcessCommand = channel.unary_unary(
        '/token.Prover/ProcessCommand',
        request_serializer=hfc_dot_protos_dot_token_dot_prover__pb2.SignedCommand.SerializeToString,
        response_deserializer=hfc_dot_protos_dot_token_dot_prover__pb2.SignedCommandResponse.FromString,
        )


class ProverServicer(object):
  """Prover provides support to clients for the creation of FabToken transactions,
  and to query the ledger.
  """

  def ProcessCommand(self, request, context):
    """ProcessCommand processes the passed command ensuring proper access control.
    The returned response allows the client to understand if the
    operation was succeffully executed and if not, the response
    reports the reason of the failure.
    """
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')


def add_ProverServicer_to_server(servicer, server):
  rpc_method_handlers = {
      'ProcessCommand': grpc.unary_unary_rpc_method_handler(
          servicer.ProcessCommand,
          request_deserializer=hfc_dot_protos_dot_token_dot_prover__pb2.SignedCommand.FromString,
          response_serializer=hfc_dot_protos_dot_token_dot_prover__pb2.SignedCommandResponse.SerializeToString,
      ),
  }
  generic_handler = grpc.method_handlers_generic_handler(
      'token.Prover', rpc_method_handlers)
  server.add_generic_rpc_handlers((generic_handler,))
