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

from . import get_account_info_pb2 as org_dot_xrpl_dot_rpc_dot_v1_dot_get__account__info__pb2
from . import get_account_transaction_history_pb2 as org_dot_xrpl_dot_rpc_dot_v1_dot_get__account__transaction__history__pb2
from . import get_fee_pb2 as org_dot_xrpl_dot_rpc_dot_v1_dot_get__fee__pb2
from . import get_ledger_data_pb2 as org_dot_xrpl_dot_rpc_dot_v1_dot_get__ledger__data__pb2
from . import get_ledger_diff_pb2 as org_dot_xrpl_dot_rpc_dot_v1_dot_get__ledger__diff__pb2
from . import get_ledger_entry_pb2 as org_dot_xrpl_dot_rpc_dot_v1_dot_get__ledger__entry__pb2
from . import get_ledger_pb2 as org_dot_xrpl_dot_rpc_dot_v1_dot_get__ledger__pb2
from . import get_transaction_pb2 as org_dot_xrpl_dot_rpc_dot_v1_dot_get__transaction__pb2
from . import submit_pb2 as org_dot_xrpl_dot_rpc_dot_v1_dot_submit__pb2


class XRPLedgerAPIServiceStub(object):
    """RPCs available to interact with the XRP Ledger.
    The gRPC API mimics the JSON API. Refer to xrpl.org for documentation
    """

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

        Args:
            channel: A grpc.Channel.
        """
        self.GetAccountInfo = channel.unary_unary(
                '/org.xrpl.rpc.v1.XRPLedgerAPIService/GetAccountInfo',
                request_serializer=org_dot_xrpl_dot_rpc_dot_v1_dot_get__account__info__pb2.GetAccountInfoRequest.SerializeToString,
                response_deserializer=org_dot_xrpl_dot_rpc_dot_v1_dot_get__account__info__pb2.GetAccountInfoResponse.FromString,
                )
        self.GetFee = channel.unary_unary(
                '/org.xrpl.rpc.v1.XRPLedgerAPIService/GetFee',
                request_serializer=org_dot_xrpl_dot_rpc_dot_v1_dot_get__fee__pb2.GetFeeRequest.SerializeToString,
                response_deserializer=org_dot_xrpl_dot_rpc_dot_v1_dot_get__fee__pb2.GetFeeResponse.FromString,
                )
        self.SubmitTransaction = channel.unary_unary(
                '/org.xrpl.rpc.v1.XRPLedgerAPIService/SubmitTransaction',
                request_serializer=org_dot_xrpl_dot_rpc_dot_v1_dot_submit__pb2.SubmitTransactionRequest.SerializeToString,
                response_deserializer=org_dot_xrpl_dot_rpc_dot_v1_dot_submit__pb2.SubmitTransactionResponse.FromString,
                )
        self.GetTransaction = channel.unary_unary(
                '/org.xrpl.rpc.v1.XRPLedgerAPIService/GetTransaction',
                request_serializer=org_dot_xrpl_dot_rpc_dot_v1_dot_get__transaction__pb2.GetTransactionRequest.SerializeToString,
                response_deserializer=org_dot_xrpl_dot_rpc_dot_v1_dot_get__transaction__pb2.GetTransactionResponse.FromString,
                )
        self.GetAccountTransactionHistory = channel.unary_unary(
                '/org.xrpl.rpc.v1.XRPLedgerAPIService/GetAccountTransactionHistory',
                request_serializer=org_dot_xrpl_dot_rpc_dot_v1_dot_get__account__transaction__history__pb2.GetAccountTransactionHistoryRequest.SerializeToString,
                response_deserializer=org_dot_xrpl_dot_rpc_dot_v1_dot_get__account__transaction__history__pb2.GetAccountTransactionHistoryResponse.FromString,
                )
        self.GetLedger = channel.unary_unary(
                '/org.xrpl.rpc.v1.XRPLedgerAPIService/GetLedger',
                request_serializer=org_dot_xrpl_dot_rpc_dot_v1_dot_get__ledger__pb2.GetLedgerRequest.SerializeToString,
                response_deserializer=org_dot_xrpl_dot_rpc_dot_v1_dot_get__ledger__pb2.GetLedgerResponse.FromString,
                )
        self.GetLedgerEntry = channel.unary_unary(
                '/org.xrpl.rpc.v1.XRPLedgerAPIService/GetLedgerEntry',
                request_serializer=org_dot_xrpl_dot_rpc_dot_v1_dot_get__ledger__entry__pb2.GetLedgerEntryRequest.SerializeToString,
                response_deserializer=org_dot_xrpl_dot_rpc_dot_v1_dot_get__ledger__entry__pb2.GetLedgerEntryResponse.FromString,
                )
        self.GetLedgerData = channel.unary_unary(
                '/org.xrpl.rpc.v1.XRPLedgerAPIService/GetLedgerData',
                request_serializer=org_dot_xrpl_dot_rpc_dot_v1_dot_get__ledger__data__pb2.GetLedgerDataRequest.SerializeToString,
                response_deserializer=org_dot_xrpl_dot_rpc_dot_v1_dot_get__ledger__data__pb2.GetLedgerDataResponse.FromString,
                )
        self.GetLedgerDiff = channel.unary_unary(
                '/org.xrpl.rpc.v1.XRPLedgerAPIService/GetLedgerDiff',
                request_serializer=org_dot_xrpl_dot_rpc_dot_v1_dot_get__ledger__diff__pb2.GetLedgerDiffRequest.SerializeToString,
                response_deserializer=org_dot_xrpl_dot_rpc_dot_v1_dot_get__ledger__diff__pb2.GetLedgerDiffResponse.FromString,
                )


class XRPLedgerAPIServiceServicer(object):
    """RPCs available to interact with the XRP Ledger.
    The gRPC API mimics the JSON API. Refer to xrpl.org for documentation
    """

    def GetAccountInfo(self, request, context):
        """Get account info for an account on the XRP Ledger.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def GetFee(self, request, context):
        """Get the fee for a transaction on the XRP Ledger.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def SubmitTransaction(self, request, context):
        """Submit a signed transaction to the XRP Ledger.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def GetTransaction(self, request, context):
        """Get the status of a transaction
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def GetAccountTransactionHistory(self, request, context):
        """Get all validated transactions associated with a given account
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def GetLedger(self, request, context):
        """///////////////////////////////////////////////////////////////////////////
        The below methods do not mimic the JSON API exactly, and are mostly binary

        Get a specific ledger, optionally including transactions and any modified,
        added or deleted ledger objects
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def GetLedgerEntry(self, request, context):
        """Get a specific ledger object from a specific ledger
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def GetLedgerData(self, request, context):
        """Iterate through all ledger objects in a specific ledger
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def GetLedgerDiff(self, request, context):
        """Get all ledger objects that are different between the two specified
        ledgers. Note, this method has no JSON equivalent.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')


def add_XRPLedgerAPIServiceServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'GetAccountInfo': grpc.unary_unary_rpc_method_handler(
                    servicer.GetAccountInfo,
                    request_deserializer=org_dot_xrpl_dot_rpc_dot_v1_dot_get__account__info__pb2.GetAccountInfoRequest.FromString,
                    response_serializer=org_dot_xrpl_dot_rpc_dot_v1_dot_get__account__info__pb2.GetAccountInfoResponse.SerializeToString,
            ),
            'GetFee': grpc.unary_unary_rpc_method_handler(
                    servicer.GetFee,
                    request_deserializer=org_dot_xrpl_dot_rpc_dot_v1_dot_get__fee__pb2.GetFeeRequest.FromString,
                    response_serializer=org_dot_xrpl_dot_rpc_dot_v1_dot_get__fee__pb2.GetFeeResponse.SerializeToString,
            ),
            'SubmitTransaction': grpc.unary_unary_rpc_method_handler(
                    servicer.SubmitTransaction,
                    request_deserializer=org_dot_xrpl_dot_rpc_dot_v1_dot_submit__pb2.SubmitTransactionRequest.FromString,
                    response_serializer=org_dot_xrpl_dot_rpc_dot_v1_dot_submit__pb2.SubmitTransactionResponse.SerializeToString,
            ),
            'GetTransaction': grpc.unary_unary_rpc_method_handler(
                    servicer.GetTransaction,
                    request_deserializer=org_dot_xrpl_dot_rpc_dot_v1_dot_get__transaction__pb2.GetTransactionRequest.FromString,
                    response_serializer=org_dot_xrpl_dot_rpc_dot_v1_dot_get__transaction__pb2.GetTransactionResponse.SerializeToString,
            ),
            'GetAccountTransactionHistory': grpc.unary_unary_rpc_method_handler(
                    servicer.GetAccountTransactionHistory,
                    request_deserializer=org_dot_xrpl_dot_rpc_dot_v1_dot_get__account__transaction__history__pb2.GetAccountTransactionHistoryRequest.FromString,
                    response_serializer=org_dot_xrpl_dot_rpc_dot_v1_dot_get__account__transaction__history__pb2.GetAccountTransactionHistoryResponse.SerializeToString,
            ),
            'GetLedger': grpc.unary_unary_rpc_method_handler(
                    servicer.GetLedger,
                    request_deserializer=org_dot_xrpl_dot_rpc_dot_v1_dot_get__ledger__pb2.GetLedgerRequest.FromString,
                    response_serializer=org_dot_xrpl_dot_rpc_dot_v1_dot_get__ledger__pb2.GetLedgerResponse.SerializeToString,
            ),
            'GetLedgerEntry': grpc.unary_unary_rpc_method_handler(
                    servicer.GetLedgerEntry,
                    request_deserializer=org_dot_xrpl_dot_rpc_dot_v1_dot_get__ledger__entry__pb2.GetLedgerEntryRequest.FromString,
                    response_serializer=org_dot_xrpl_dot_rpc_dot_v1_dot_get__ledger__entry__pb2.GetLedgerEntryResponse.SerializeToString,
            ),
            'GetLedgerData': grpc.unary_unary_rpc_method_handler(
                    servicer.GetLedgerData,
                    request_deserializer=org_dot_xrpl_dot_rpc_dot_v1_dot_get__ledger__data__pb2.GetLedgerDataRequest.FromString,
                    response_serializer=org_dot_xrpl_dot_rpc_dot_v1_dot_get__ledger__data__pb2.GetLedgerDataResponse.SerializeToString,
            ),
            'GetLedgerDiff': grpc.unary_unary_rpc_method_handler(
                    servicer.GetLedgerDiff,
                    request_deserializer=org_dot_xrpl_dot_rpc_dot_v1_dot_get__ledger__diff__pb2.GetLedgerDiffRequest.FromString,
                    response_serializer=org_dot_xrpl_dot_rpc_dot_v1_dot_get__ledger__diff__pb2.GetLedgerDiffResponse.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'org.xrpl.rpc.v1.XRPLedgerAPIService', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))


 # This class is part of an EXPERIMENTAL API.
class XRPLedgerAPIService(object):
    """RPCs available to interact with the XRP Ledger.
    The gRPC API mimics the JSON API. Refer to xrpl.org for documentation
    """

    @staticmethod
    def GetAccountInfo(request,
            target,
            options=(),
            channel_credentials=None,
            call_credentials=None,
            compression=None,
            wait_for_ready=None,
            timeout=None,
            metadata=None):
        return grpc.experimental.unary_unary(request, target, '/org.xrpl.rpc.v1.XRPLedgerAPIService/GetAccountInfo',
            org_dot_xrpl_dot_rpc_dot_v1_dot_get__account__info__pb2.GetAccountInfoRequest.SerializeToString,
            org_dot_xrpl_dot_rpc_dot_v1_dot_get__account__info__pb2.GetAccountInfoResponse.FromString,
            options, channel_credentials,
            call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def GetFee(request,
            target,
            options=(),
            channel_credentials=None,
            call_credentials=None,
            compression=None,
            wait_for_ready=None,
            timeout=None,
            metadata=None):
        return grpc.experimental.unary_unary(request, target, '/org.xrpl.rpc.v1.XRPLedgerAPIService/GetFee',
            org_dot_xrpl_dot_rpc_dot_v1_dot_get__fee__pb2.GetFeeRequest.SerializeToString,
            org_dot_xrpl_dot_rpc_dot_v1_dot_get__fee__pb2.GetFeeResponse.FromString,
            options, channel_credentials,
            call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def SubmitTransaction(request,
            target,
            options=(),
            channel_credentials=None,
            call_credentials=None,
            compression=None,
            wait_for_ready=None,
            timeout=None,
            metadata=None):
        return grpc.experimental.unary_unary(request, target, '/org.xrpl.rpc.v1.XRPLedgerAPIService/SubmitTransaction',
            org_dot_xrpl_dot_rpc_dot_v1_dot_submit__pb2.SubmitTransactionRequest.SerializeToString,
            org_dot_xrpl_dot_rpc_dot_v1_dot_submit__pb2.SubmitTransactionResponse.FromString,
            options, channel_credentials,
            call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def GetTransaction(request,
            target,
            options=(),
            channel_credentials=None,
            call_credentials=None,
            compression=None,
            wait_for_ready=None,
            timeout=None,
            metadata=None):
        return grpc.experimental.unary_unary(request, target, '/org.xrpl.rpc.v1.XRPLedgerAPIService/GetTransaction',
            org_dot_xrpl_dot_rpc_dot_v1_dot_get__transaction__pb2.GetTransactionRequest.SerializeToString,
            org_dot_xrpl_dot_rpc_dot_v1_dot_get__transaction__pb2.GetTransactionResponse.FromString,
            options, channel_credentials,
            call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def GetAccountTransactionHistory(request,
            target,
            options=(),
            channel_credentials=None,
            call_credentials=None,
            compression=None,
            wait_for_ready=None,
            timeout=None,
            metadata=None):
        return grpc.experimental.unary_unary(request, target, '/org.xrpl.rpc.v1.XRPLedgerAPIService/GetAccountTransactionHistory',
            org_dot_xrpl_dot_rpc_dot_v1_dot_get__account__transaction__history__pb2.GetAccountTransactionHistoryRequest.SerializeToString,
            org_dot_xrpl_dot_rpc_dot_v1_dot_get__account__transaction__history__pb2.GetAccountTransactionHistoryResponse.FromString,
            options, channel_credentials,
            call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def GetLedger(request,
            target,
            options=(),
            channel_credentials=None,
            call_credentials=None,
            compression=None,
            wait_for_ready=None,
            timeout=None,
            metadata=None):
        return grpc.experimental.unary_unary(request, target, '/org.xrpl.rpc.v1.XRPLedgerAPIService/GetLedger',
            org_dot_xrpl_dot_rpc_dot_v1_dot_get__ledger__pb2.GetLedgerRequest.SerializeToString,
            org_dot_xrpl_dot_rpc_dot_v1_dot_get__ledger__pb2.GetLedgerResponse.FromString,
            options, channel_credentials,
            call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def GetLedgerEntry(request,
            target,
            options=(),
            channel_credentials=None,
            call_credentials=None,
            compression=None,
            wait_for_ready=None,
            timeout=None,
            metadata=None):
        return grpc.experimental.unary_unary(request, target, '/org.xrpl.rpc.v1.XRPLedgerAPIService/GetLedgerEntry',
            org_dot_xrpl_dot_rpc_dot_v1_dot_get__ledger__entry__pb2.GetLedgerEntryRequest.SerializeToString,
            org_dot_xrpl_dot_rpc_dot_v1_dot_get__ledger__entry__pb2.GetLedgerEntryResponse.FromString,
            options, channel_credentials,
            call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def GetLedgerData(request,
            target,
            options=(),
            channel_credentials=None,
            call_credentials=None,
            compression=None,
            wait_for_ready=None,
            timeout=None,
            metadata=None):
        return grpc.experimental.unary_unary(request, target, '/org.xrpl.rpc.v1.XRPLedgerAPIService/GetLedgerData',
            org_dot_xrpl_dot_rpc_dot_v1_dot_get__ledger__data__pb2.GetLedgerDataRequest.SerializeToString,
            org_dot_xrpl_dot_rpc_dot_v1_dot_get__ledger__data__pb2.GetLedgerDataResponse.FromString,
            options, channel_credentials,
            call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def GetLedgerDiff(request,
            target,
            options=(),
            channel_credentials=None,
            call_credentials=None,
            compression=None,
            wait_for_ready=None,
            timeout=None,
            metadata=None):
        return grpc.experimental.unary_unary(request, target, '/org.xrpl.rpc.v1.XRPLedgerAPIService/GetLedgerDiff',
            org_dot_xrpl_dot_rpc_dot_v1_dot_get__ledger__diff__pb2.GetLedgerDiffRequest.SerializeToString,
            org_dot_xrpl_dot_rpc_dot_v1_dot_get__ledger__diff__pb2.GetLedgerDiffResponse.FromString,
            options, channel_credentials,
            call_credentials, compression, wait_for_ready, timeout, metadata)
