# 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):
  """*
  AergoRPCService is the main RPC service providing endpoints to interact 
  with the node and blockchain. If not otherwise noted, methods are unary requests.
  """

  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.GetChainInfo = channel.unary_unary(
        '/types.AergoRPCService/GetChainInfo',
        request_serializer=rpc__pb2.Empty.SerializeToString,
        response_deserializer=rpc__pb2.ChainInfo.FromString,
        )
    self.ListBlockHeaders = channel.unary_unary(
        '/types.AergoRPCService/ListBlockHeaders',
        request_serializer=rpc__pb2.ListParams.SerializeToString,
        response_deserializer=rpc__pb2.BlockHeaderList.FromString,
        )
    self.ListBlockMetadata = channel.unary_unary(
        '/types.AergoRPCService/ListBlockMetadata',
        request_serializer=rpc__pb2.ListParams.SerializeToString,
        response_deserializer=rpc__pb2.BlockMetadataList.FromString,
        )
    self.ListBlockStream = channel.unary_stream(
        '/types.AergoRPCService/ListBlockStream',
        request_serializer=rpc__pb2.Empty.SerializeToString,
        response_deserializer=blockchain__pb2.Block.FromString,
        )
    self.ListBlockMetadataStream = channel.unary_stream(
        '/types.AergoRPCService/ListBlockMetadataStream',
        request_serializer=rpc__pb2.Empty.SerializeToString,
        response_deserializer=rpc__pb2.BlockMetadata.FromString,
        )
    self.GetBlock = channel.unary_unary(
        '/types.AergoRPCService/GetBlock',
        request_serializer=rpc__pb2.SingleBytes.SerializeToString,
        response_deserializer=blockchain__pb2.Block.FromString,
        )
    self.GetBlockMetadata = channel.unary_unary(
        '/types.AergoRPCService/GetBlockMetadata',
        request_serializer=rpc__pb2.SingleBytes.SerializeToString,
        response_deserializer=rpc__pb2.BlockMetadata.FromString,
        )
    self.GetBlockBody = channel.unary_unary(
        '/types.AergoRPCService/GetBlockBody',
        request_serializer=rpc__pb2.BlockBodyParams.SerializeToString,
        response_deserializer=rpc__pb2.BlockBodyPaged.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.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.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.AccountProof.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.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.PeersParams.SerializeToString,
        response_deserializer=rpc__pb2.PeerList.FromString,
        )
    self.GetVotes = channel.unary_unary(
        '/types.AergoRPCService/GetVotes',
        request_serializer=rpc__pb2.VoteParams.SerializeToString,
        response_deserializer=rpc__pb2.VoteList.FromString,
        )
    self.GetAccountVotes = channel.unary_unary(
        '/types.AergoRPCService/GetAccountVotes',
        request_serializer=rpc__pb2.AccountAddress.SerializeToString,
        response_deserializer=rpc__pb2.AccountVoteInfo.FromString,
        )
    self.GetStaking = channel.unary_unary(
        '/types.AergoRPCService/GetStaking',
        request_serializer=rpc__pb2.AccountAddress.SerializeToString,
        response_deserializer=rpc__pb2.Staking.FromString,
        )
    self.GetNameInfo = channel.unary_unary(
        '/types.AergoRPCService/GetNameInfo',
        request_serializer=rpc__pb2.Name.SerializeToString,
        response_deserializer=rpc__pb2.NameInfo.FromString,
        )
    self.ListEventStream = channel.unary_stream(
        '/types.AergoRPCService/ListEventStream',
        request_serializer=blockchain__pb2.FilterInfo.SerializeToString,
        response_deserializer=blockchain__pb2.Event.FromString,
        )
    self.ListEvents = channel.unary_unary(
        '/types.AergoRPCService/ListEvents',
        request_serializer=blockchain__pb2.FilterInfo.SerializeToString,
        response_deserializer=rpc__pb2.EventList.FromString,
        )
    self.GetConsensusInfo = channel.unary_unary(
        '/types.AergoRPCService/GetConsensusInfo',
        request_serializer=rpc__pb2.Empty.SerializeToString,
        response_deserializer=rpc__pb2.ConsensusInfo.FromString,
        )


class AergoRPCServiceServicer(object):
  """*
  AergoRPCService is the main RPC service providing endpoints to interact 
  with the node and blockchain. If not otherwise noted, methods are unary requests.
  """

  def NodeState(self, request, context):
    """Returns the current state of this node
    """
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')

  def Metric(self, request, context):
    """Returns node metrics according to request 
    """
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')

  def Blockchain(self, request, context):
    """Returns current blockchain status (best block's height and hash)
    """
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')

  def GetChainInfo(self, request, context):
    """Returns current blockchain's basic information
    """
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')

  def ListBlockHeaders(self, request, context):
    """Returns list of Blocks without body according to request
    """
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')

  def ListBlockMetadata(self, request, context):
    """Returns list of block metadata (hash, header, and number of transactions) according to request
    """
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')

  def ListBlockStream(self, request, context):
    """Returns a stream of new blocks as they get added to the blockchain
    """
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')

  def ListBlockMetadataStream(self, request, context):
    """Returns a stream of new block's metadata as they get added to the blockchain
    """
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')

  def GetBlock(self, request, context):
    """Return a single block incl. header and body, queried by hash or number
    """
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')

  def GetBlockMetadata(self, request, context):
    """Return a single block's metdata (hash, header, and number of transactions), queried by hash or number
    """
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')

  def GetBlockBody(self, request, context):
    """Return a single block's body, queried by hash or number and list parameters
    """
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')

  def GetTX(self, request, context):
    """Return a single transaction, queried by transaction hash
    """
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')

  def GetBlockTX(self, request, context):
    """Return information about transaction in block, queried by transaction hash
    """
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')

  def GetReceipt(self, request, context):
    """Return transaction receipt, queried by transaction hash
    """
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')

  def GetABI(self, request, context):
    """Return ABI stored at contract address
    """
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')

  def SendTX(self, request, context):
    """Sign and send a transaction from an unlocked account
    """
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')

  def SignTX(self, request, context):
    """Sign transaction with unlocked account
    """
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')

  def VerifyTX(self, request, context):
    """Verify validity of transaction
    """
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')

  def CommitTX(self, request, context):
    """Commit a signed transaction
    """
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')

  def GetState(self, request, context):
    """Return state of account
    """
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')

  def GetStateAndProof(self, request, context):
    """Return state of account, including merkle proof
    """
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')

  def CreateAccount(self, request, context):
    """Create a new account in this node
    """
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')

  def GetAccounts(self, request, context):
    """Return list of accounts in this node
    """
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')

  def LockAccount(self, request, context):
    """Lock account in this node
    """
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')

  def UnlockAccount(self, request, context):
    """Unlock account in this node
    """
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')

  def ImportAccount(self, request, context):
    """Import account to this node
    """
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')

  def ExportAccount(self, request, context):
    """Export account stored in this node
    """
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')

  def QueryContract(self, request, context):
    """Query a contract method
    """
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')

  def QueryContractState(self, request, context):
    """Query contract state
    """
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')

  def GetPeers(self, request, context):
    """Return list of peers of this node and their state
    """
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')

  def GetVotes(self, request, context):
    """Return result of vote
    """
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')

  def GetAccountVotes(self, request, context):
    """Return staking, voting info for account
    """
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')

  def GetStaking(self, request, context):
    """Return staking information
    """
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')

  def GetNameInfo(self, request, context):
    """Return name information
    """
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')

  def ListEventStream(self, request, context):
    """Returns a stream of event as they get added to the blockchain
    """
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')

  def ListEvents(self, request, context):
    """Returns list of event
    """
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')

  def GetConsensusInfo(self, request, context):
    """Returns status of consensus and bps
    """
    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,
      ),
      'GetChainInfo': grpc.unary_unary_rpc_method_handler(
          servicer.GetChainInfo,
          request_deserializer=rpc__pb2.Empty.FromString,
          response_serializer=rpc__pb2.ChainInfo.SerializeToString,
      ),
      'ListBlockHeaders': grpc.unary_unary_rpc_method_handler(
          servicer.ListBlockHeaders,
          request_deserializer=rpc__pb2.ListParams.FromString,
          response_serializer=rpc__pb2.BlockHeaderList.SerializeToString,
      ),
      'ListBlockMetadata': grpc.unary_unary_rpc_method_handler(
          servicer.ListBlockMetadata,
          request_deserializer=rpc__pb2.ListParams.FromString,
          response_serializer=rpc__pb2.BlockMetadataList.SerializeToString,
      ),
      'ListBlockStream': grpc.unary_stream_rpc_method_handler(
          servicer.ListBlockStream,
          request_deserializer=rpc__pb2.Empty.FromString,
          response_serializer=blockchain__pb2.Block.SerializeToString,
      ),
      'ListBlockMetadataStream': grpc.unary_stream_rpc_method_handler(
          servicer.ListBlockMetadataStream,
          request_deserializer=rpc__pb2.Empty.FromString,
          response_serializer=rpc__pb2.BlockMetadata.SerializeToString,
      ),
      'GetBlock': grpc.unary_unary_rpc_method_handler(
          servicer.GetBlock,
          request_deserializer=rpc__pb2.SingleBytes.FromString,
          response_serializer=blockchain__pb2.Block.SerializeToString,
      ),
      'GetBlockMetadata': grpc.unary_unary_rpc_method_handler(
          servicer.GetBlockMetadata,
          request_deserializer=rpc__pb2.SingleBytes.FromString,
          response_serializer=rpc__pb2.BlockMetadata.SerializeToString,
      ),
      'GetBlockBody': grpc.unary_unary_rpc_method_handler(
          servicer.GetBlockBody,
          request_deserializer=rpc__pb2.BlockBodyParams.FromString,
          response_serializer=rpc__pb2.BlockBodyPaged.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,
      ),
      '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,
      ),
      '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.AccountProof.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,
      ),
      '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.PeersParams.FromString,
          response_serializer=rpc__pb2.PeerList.SerializeToString,
      ),
      'GetVotes': grpc.unary_unary_rpc_method_handler(
          servicer.GetVotes,
          request_deserializer=rpc__pb2.VoteParams.FromString,
          response_serializer=rpc__pb2.VoteList.SerializeToString,
      ),
      'GetAccountVotes': grpc.unary_unary_rpc_method_handler(
          servicer.GetAccountVotes,
          request_deserializer=rpc__pb2.AccountAddress.FromString,
          response_serializer=rpc__pb2.AccountVoteInfo.SerializeToString,
      ),
      'GetStaking': grpc.unary_unary_rpc_method_handler(
          servicer.GetStaking,
          request_deserializer=rpc__pb2.AccountAddress.FromString,
          response_serializer=rpc__pb2.Staking.SerializeToString,
      ),
      'GetNameInfo': grpc.unary_unary_rpc_method_handler(
          servicer.GetNameInfo,
          request_deserializer=rpc__pb2.Name.FromString,
          response_serializer=rpc__pb2.NameInfo.SerializeToString,
      ),
      'ListEventStream': grpc.unary_stream_rpc_method_handler(
          servicer.ListEventStream,
          request_deserializer=blockchain__pb2.FilterInfo.FromString,
          response_serializer=blockchain__pb2.Event.SerializeToString,
      ),
      'ListEvents': grpc.unary_unary_rpc_method_handler(
          servicer.ListEvents,
          request_deserializer=blockchain__pb2.FilterInfo.FromString,
          response_serializer=rpc__pb2.EventList.SerializeToString,
      ),
      'GetConsensusInfo': grpc.unary_unary_rpc_method_handler(
          servicer.GetConsensusInfo,
          request_deserializer=rpc__pb2.Empty.FromString,
          response_serializer=rpc__pb2.ConsensusInfo.SerializeToString,
      ),
  }
  generic_handler = grpc.method_handlers_generic_handler(
      'types.AergoRPCService', rpc_method_handlers)
  server.add_generic_rpc_handlers((generic_handler,))
