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

from routerrpc import router_pb2 as routerrpc_dot_router__pb2


class RouterStub(object):
  # missing associated documentation comment in .proto file
  pass

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

    Args:
      channel: A grpc.Channel.
    """
    self.SendPayment = channel.unary_unary(
        '/routerrpc.Router/SendPayment',
        request_serializer=routerrpc_dot_router__pb2.PaymentRequest.SerializeToString,
        response_deserializer=routerrpc_dot_router__pb2.PaymentResponse.FromString,
        )
    self.EstimateRouteFee = channel.unary_unary(
        '/routerrpc.Router/EstimateRouteFee',
        request_serializer=routerrpc_dot_router__pb2.RouteFeeRequest.SerializeToString,
        response_deserializer=routerrpc_dot_router__pb2.RouteFeeResponse.FromString,
        )


class RouterServicer(object):
  # missing associated documentation comment in .proto file
  pass

  def SendPayment(self, request, context):
    """*
    SendPayment attempts to route a payment described by the passed
    PaymentRequest to the final destination. If we are unable to route the
    payment, or cannot find a route that satisfies the constraints in the
    PaymentRequest, then an error will be returned. Otherwise, the payment
    pre-image, along with the final route will be returned.
    """
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')

  def EstimateRouteFee(self, request, context):
    """*
    EstimateRouteFee allows callers to obtain a lower bound w.r.t how much it
    may cost to send an HTLC to the target end destination.
    """
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')


def add_RouterServicer_to_server(servicer, server):
  rpc_method_handlers = {
      'SendPayment': grpc.unary_unary_rpc_method_handler(
          servicer.SendPayment,
          request_deserializer=routerrpc_dot_router__pb2.PaymentRequest.FromString,
          response_serializer=routerrpc_dot_router__pb2.PaymentResponse.SerializeToString,
      ),
      'EstimateRouteFee': grpc.unary_unary_rpc_method_handler(
          servicer.EstimateRouteFee,
          request_deserializer=routerrpc_dot_router__pb2.RouteFeeRequest.FromString,
          response_serializer=routerrpc_dot_router__pb2.RouteFeeResponse.SerializeToString,
      ),
  }
  generic_handler = grpc.method_handlers_generic_handler(
      'routerrpc.Router', rpc_method_handlers)
  server.add_generic_rpc_handlers((generic_handler,))
