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

from signrpc import signer_pb2 as signrpc_dot_signer__pb2
from walletrpc import walletkit_pb2 as walletrpc_dot_walletkit__pb2


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

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

    Args:
      channel: A grpc.Channel.
    """
    self.DeriveNextKey = channel.unary_unary(
        '/walletrpc.WalletKit/DeriveNextKey',
        request_serializer=walletrpc_dot_walletkit__pb2.KeyReq.SerializeToString,
        response_deserializer=signrpc_dot_signer__pb2.KeyDescriptor.FromString,
        )
    self.DeriveKey = channel.unary_unary(
        '/walletrpc.WalletKit/DeriveKey',
        request_serializer=signrpc_dot_signer__pb2.KeyLocator.SerializeToString,
        response_deserializer=signrpc_dot_signer__pb2.KeyDescriptor.FromString,
        )
    self.NextAddr = channel.unary_unary(
        '/walletrpc.WalletKit/NextAddr',
        request_serializer=walletrpc_dot_walletkit__pb2.AddrRequest.SerializeToString,
        response_deserializer=walletrpc_dot_walletkit__pb2.AddrResponse.FromString,
        )
    self.PublishTransaction = channel.unary_unary(
        '/walletrpc.WalletKit/PublishTransaction',
        request_serializer=walletrpc_dot_walletkit__pb2.Transaction.SerializeToString,
        response_deserializer=walletrpc_dot_walletkit__pb2.PublishResponse.FromString,
        )
    self.SendOutputs = channel.unary_unary(
        '/walletrpc.WalletKit/SendOutputs',
        request_serializer=walletrpc_dot_walletkit__pb2.SendOutputsRequest.SerializeToString,
        response_deserializer=walletrpc_dot_walletkit__pb2.SendOutputsResponse.FromString,
        )
    self.EstimateFee = channel.unary_unary(
        '/walletrpc.WalletKit/EstimateFee',
        request_serializer=walletrpc_dot_walletkit__pb2.EstimateFeeRequest.SerializeToString,
        response_deserializer=walletrpc_dot_walletkit__pb2.EstimateFeeResponse.FromString,
        )
    self.PendingSweeps = channel.unary_unary(
        '/walletrpc.WalletKit/PendingSweeps',
        request_serializer=walletrpc_dot_walletkit__pb2.PendingSweepsRequest.SerializeToString,
        response_deserializer=walletrpc_dot_walletkit__pb2.PendingSweepsResponse.FromString,
        )
    self.BumpFee = channel.unary_unary(
        '/walletrpc.WalletKit/BumpFee',
        request_serializer=walletrpc_dot_walletkit__pb2.BumpFeeRequest.SerializeToString,
        response_deserializer=walletrpc_dot_walletkit__pb2.BumpFeeResponse.FromString,
        )


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

  def DeriveNextKey(self, request, context):
    """*
    DeriveNextKey attempts to derive the *next* key within the key family
    (account in BIP43) specified. This method should return the next external
    child within this branch.
    """
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')

  def DeriveKey(self, request, context):
    """*
    DeriveKey attempts to derive an arbitrary key specified by the passed
    KeyLocator. 
    """
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')

  def NextAddr(self, request, context):
    """*
    NextAddr returns the next unused address within the wallet.
    """
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')

  def PublishTransaction(self, request, context):
    """*
    PublishTransaction attempts to publish the passed transaction to the
    network. Once this returns without an error, the wallet will continually
    attempt to re-broadcast the transaction on start up, until it enters the
    chain.
    """
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')

  def SendOutputs(self, request, context):
    """*
    SendOutputs is similar to the existing sendmany call in Bitcoind, and
    allows the caller to create a transaction that sends to several outputs at
    once. This is ideal when wanting to batch create a set of transactions.
    """
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')

  def EstimateFee(self, request, context):
    """*
    EstimateFee attempts to query the internal fee estimator of the wallet to
    determine the fee (in sat/kw) to attach to a transaction in order to
    achieve the confirmation target.
    """
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')

  def PendingSweeps(self, request, context):
    """
    PendingSweeps returns lists of on-chain outputs that lnd is currently
    attempting to sweep within its central batching engine. Outputs with similar
    fee rates are batched together in order to sweep them within a single
    transaction.

    NOTE: Some of the fields within PendingSweepsRequest are not guaranteed to
    remain supported. This is an advanced API that depends on the internals of
    the UtxoSweeper, so things may change.
    """
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')

  def BumpFee(self, request, context):
    """
    BumpFee bumps the fee of an arbitrary input within a transaction. This RPC
    takes a different approach than bitcoind's bumpfee command. lnd has a
    central batching engine in which inputs with similar fee rates are batched
    together to save on transaction fees. Due to this, we cannot rely on
    bumping the fee on a specific transaction, since transactions can change at
    any point with the addition of new inputs. The list of inputs that
    currently exist within lnd's central batching engine can be retrieved
    through the PendingSweeps RPC.

    When bumping the fee of an input that currently exists within lnd's central
    batching engine, a higher fee transaction will be created that replaces the
    lower fee transaction through the Replace-By-Fee (RBF) policy. If it

    This RPC also serves useful when wanting to perform a Child-Pays-For-Parent
    (CPFP), where the child transaction pays for its parent's fee. This can be
    done by specifying an outpoint within the low fee transaction that is under
    the control of the wallet.

    The fee preference can be expressed either as a specific fee rate or a delta
    of blocks in which the output should be swept on-chain within. If a fee
    preference is not explicitly specified, then an error is returned.

    Note that this RPC currently doesn't perform any validation checks on the
    fee preference being provided. For now, the responsibility of ensuring that
    the new fee preference is sufficient is delegated to the user.
    """
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')


def add_WalletKitServicer_to_server(servicer, server):
  rpc_method_handlers = {
      'DeriveNextKey': grpc.unary_unary_rpc_method_handler(
          servicer.DeriveNextKey,
          request_deserializer=walletrpc_dot_walletkit__pb2.KeyReq.FromString,
          response_serializer=signrpc_dot_signer__pb2.KeyDescriptor.SerializeToString,
      ),
      'DeriveKey': grpc.unary_unary_rpc_method_handler(
          servicer.DeriveKey,
          request_deserializer=signrpc_dot_signer__pb2.KeyLocator.FromString,
          response_serializer=signrpc_dot_signer__pb2.KeyDescriptor.SerializeToString,
      ),
      'NextAddr': grpc.unary_unary_rpc_method_handler(
          servicer.NextAddr,
          request_deserializer=walletrpc_dot_walletkit__pb2.AddrRequest.FromString,
          response_serializer=walletrpc_dot_walletkit__pb2.AddrResponse.SerializeToString,
      ),
      'PublishTransaction': grpc.unary_unary_rpc_method_handler(
          servicer.PublishTransaction,
          request_deserializer=walletrpc_dot_walletkit__pb2.Transaction.FromString,
          response_serializer=walletrpc_dot_walletkit__pb2.PublishResponse.SerializeToString,
      ),
      'SendOutputs': grpc.unary_unary_rpc_method_handler(
          servicer.SendOutputs,
          request_deserializer=walletrpc_dot_walletkit__pb2.SendOutputsRequest.FromString,
          response_serializer=walletrpc_dot_walletkit__pb2.SendOutputsResponse.SerializeToString,
      ),
      'EstimateFee': grpc.unary_unary_rpc_method_handler(
          servicer.EstimateFee,
          request_deserializer=walletrpc_dot_walletkit__pb2.EstimateFeeRequest.FromString,
          response_serializer=walletrpc_dot_walletkit__pb2.EstimateFeeResponse.SerializeToString,
      ),
      'PendingSweeps': grpc.unary_unary_rpc_method_handler(
          servicer.PendingSweeps,
          request_deserializer=walletrpc_dot_walletkit__pb2.PendingSweepsRequest.FromString,
          response_serializer=walletrpc_dot_walletkit__pb2.PendingSweepsResponse.SerializeToString,
      ),
      'BumpFee': grpc.unary_unary_rpc_method_handler(
          servicer.BumpFee,
          request_deserializer=walletrpc_dot_walletkit__pb2.BumpFeeRequest.FromString,
          response_serializer=walletrpc_dot_walletkit__pb2.BumpFeeResponse.SerializeToString,
      ),
  }
  generic_handler = grpc.method_handlers_generic_handler(
      'walletrpc.WalletKit', rpc_method_handlers)
  server.add_generic_rpc_handlers((generic_handler,))
