# 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 raft_pb2 as raft__pb2
from . import rpc_pb2 as rpc__pb2
[docs]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.ChainStat = channel.unary_unary(
'/types.AergoRPCService/ChainStat',
request_serializer=rpc__pb2.Empty.SerializeToString,
response_deserializer=rpc__pb2.ChainStats.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.GetServerInfo = channel.unary_unary(
'/types.AergoRPCService/GetServerInfo',
request_serializer=rpc__pb2.KeyParams.SerializeToString,
response_deserializer=rpc__pb2.ServerInfo.FromString,
)
self.GetConsensusInfo = channel.unary_unary(
'/types.AergoRPCService/GetConsensusInfo',
request_serializer=rpc__pb2.Empty.SerializeToString,
response_deserializer=rpc__pb2.ConsensusInfo.FromString,
)
self.ChangeMembership = channel.unary_unary(
'/types.AergoRPCService/ChangeMembership',
request_serializer=raft__pb2.MembershipChange.SerializeToString,
response_deserializer=raft__pb2.MembershipChangeReply.FromString,
)
self.GetEnterpriseConfig = channel.unary_unary(
'/types.AergoRPCService/GetEnterpriseConfig',
request_serializer=rpc__pb2.EnterpriseConfigKey.SerializeToString,
response_deserializer=rpc__pb2.EnterpriseConfig.FromString,
)
self.GetConfChangeProgress = channel.unary_unary(
'/types.AergoRPCService/GetConfChangeProgress',
request_serializer=rpc__pb2.SingleBytes.SerializeToString,
response_deserializer=raft__pb2.ConfChangeProgress.FromString,
)
[docs]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.
"""
[docs] 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!')
[docs] 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!')
[docs] 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!')
[docs] 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!')
[docs] def ChainStat(self, request, context):
"""Returns current chain statistics
"""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
[docs] 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!')
[docs] 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!')
[docs] 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!')
[docs] 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!')
[docs] 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!')
[docs] 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!')
[docs] 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!')
[docs] 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!')
[docs] 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!')
[docs] 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!')
[docs] 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!')
[docs] 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!')
[docs] 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!')
[docs] 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!')
[docs] 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!')
[docs] 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!')
[docs] 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!')
[docs] 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!')
[docs] 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!')
[docs] 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!')
[docs] 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!')
[docs] 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!')
[docs] 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!')
[docs] 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!')
[docs] 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!')
[docs] 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!')
[docs] 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!')
[docs] 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!')
[docs] def GetServerInfo(self, request, context):
"""Returns configs and statuses of server
"""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
[docs] 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!')
[docs] def ChangeMembership(self, request, context):
"""Add & remove member of raft cluster
"""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
[docs] def GetEnterpriseConfig(self, request, context):
"""Returns enterprise config
"""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
[docs] def GetConfChangeProgress(self, request, context):
"""Return a status of changeCluster enterprise tx, queried by requestID
"""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
[docs]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,
),
'ChainStat': grpc.unary_unary_rpc_method_handler(
servicer.ChainStat,
request_deserializer=rpc__pb2.Empty.FromString,
response_serializer=rpc__pb2.ChainStats.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,
),
'GetServerInfo': grpc.unary_unary_rpc_method_handler(
servicer.GetServerInfo,
request_deserializer=rpc__pb2.KeyParams.FromString,
response_serializer=rpc__pb2.ServerInfo.SerializeToString,
),
'GetConsensusInfo': grpc.unary_unary_rpc_method_handler(
servicer.GetConsensusInfo,
request_deserializer=rpc__pb2.Empty.FromString,
response_serializer=rpc__pb2.ConsensusInfo.SerializeToString,
),
'ChangeMembership': grpc.unary_unary_rpc_method_handler(
servicer.ChangeMembership,
request_deserializer=raft__pb2.MembershipChange.FromString,
response_serializer=raft__pb2.MembershipChangeReply.SerializeToString,
),
'GetEnterpriseConfig': grpc.unary_unary_rpc_method_handler(
servicer.GetEnterpriseConfig,
request_deserializer=rpc__pb2.EnterpriseConfigKey.FromString,
response_serializer=rpc__pb2.EnterpriseConfig.SerializeToString,
),
'GetConfChangeProgress': grpc.unary_unary_rpc_method_handler(
servicer.GetConfChangeProgress,
request_deserializer=rpc__pb2.SingleBytes.FromString,
response_serializer=raft__pb2.ConfChangeProgress.SerializeToString,
),
}
generic_handler = grpc.method_handlers_generic_handler(
'types.AergoRPCService', rpc_method_handlers)
server.add_generic_rpc_handlers((generic_handler,))