Files
lightwalletd/walletrpc/service_pb2_grpc.py
DanS ec1c479156 Increase block cache size to 400k for faster wallet sync
- Increase default cache-size from 40,000 to 400,000 blocks
- Add Python gRPC protobuf bindings for testing
2026-03-21 03:50:55 -05:00

404 lines
15 KiB
Python

# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
"""Client and server classes corresponding to protobuf-defined services."""
import grpc
import warnings
import compact_formats_pb2 as compact__formats__pb2
import service_pb2 as service__pb2
GRPC_GENERATED_VERSION = '1.78.0'
GRPC_VERSION = grpc.__version__
_version_not_supported = False
try:
from grpc._utilities import first_version_is_lower
_version_not_supported = first_version_is_lower(GRPC_VERSION, GRPC_GENERATED_VERSION)
except ImportError:
_version_not_supported = True
if _version_not_supported:
raise RuntimeError(
f'The grpc package installed is at version {GRPC_VERSION},'
+ ' but the generated code in service_pb2_grpc.py depends on'
+ f' grpcio>={GRPC_GENERATED_VERSION}.'
+ f' Please upgrade your grpc module to grpcio>={GRPC_GENERATED_VERSION}'
+ f' or downgrade your generated code using grpcio-tools<={GRPC_VERSION}.'
)
class CompactTxStreamerStub(object):
"""Missing associated documentation comment in .proto file."""
def __init__(self, channel):
"""Constructor.
Args:
channel: A grpc.Channel.
"""
self.GetLatestBlock = channel.unary_unary(
'/cash.z.wallet.sdk.rpc.CompactTxStreamer/GetLatestBlock',
request_serializer=service__pb2.ChainSpec.SerializeToString,
response_deserializer=service__pb2.BlockID.FromString,
_registered_method=True)
self.GetBlock = channel.unary_unary(
'/cash.z.wallet.sdk.rpc.CompactTxStreamer/GetBlock',
request_serializer=service__pb2.BlockID.SerializeToString,
response_deserializer=compact__formats__pb2.CompactBlock.FromString,
_registered_method=True)
self.GetBlockRange = channel.unary_stream(
'/cash.z.wallet.sdk.rpc.CompactTxStreamer/GetBlockRange',
request_serializer=service__pb2.BlockRange.SerializeToString,
response_deserializer=compact__formats__pb2.CompactBlock.FromString,
_registered_method=True)
self.GetTransaction = channel.unary_unary(
'/cash.z.wallet.sdk.rpc.CompactTxStreamer/GetTransaction',
request_serializer=service__pb2.TxFilter.SerializeToString,
response_deserializer=service__pb2.RawTransaction.FromString,
_registered_method=True)
self.SendTransaction = channel.unary_unary(
'/cash.z.wallet.sdk.rpc.CompactTxStreamer/SendTransaction',
request_serializer=service__pb2.RawTransaction.SerializeToString,
response_deserializer=service__pb2.SendResponse.FromString,
_registered_method=True)
self.GetAddressTxids = channel.unary_stream(
'/cash.z.wallet.sdk.rpc.CompactTxStreamer/GetAddressTxids',
request_serializer=service__pb2.TransparentAddressBlockFilter.SerializeToString,
response_deserializer=service__pb2.RawTransaction.FromString,
_registered_method=True)
self.GetLightdInfo = channel.unary_unary(
'/cash.z.wallet.sdk.rpc.CompactTxStreamer/GetLightdInfo',
request_serializer=service__pb2.Empty.SerializeToString,
response_deserializer=service__pb2.LightdInfo.FromString,
_registered_method=True)
self.GetCoinsupply = channel.unary_unary(
'/cash.z.wallet.sdk.rpc.CompactTxStreamer/GetCoinsupply',
request_serializer=service__pb2.Empty.SerializeToString,
response_deserializer=service__pb2.Coinsupply.FromString,
_registered_method=True)
class CompactTxStreamerServicer(object):
"""Missing associated documentation comment in .proto file."""
def GetLatestBlock(self, request, context):
"""Compact Blocks
"""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def GetBlock(self, request, context):
"""Missing associated documentation comment in .proto file."""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def GetBlockRange(self, request, context):
"""Missing associated documentation comment in .proto file."""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def GetTransaction(self, request, context):
"""Transactions
"""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def SendTransaction(self, request, context):
"""Missing associated documentation comment in .proto file."""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def GetAddressTxids(self, request, context):
"""t-Address support
"""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def GetLightdInfo(self, request, context):
"""Misc
"""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def GetCoinsupply(self, request, context):
"""Missing associated documentation comment in .proto file."""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def add_CompactTxStreamerServicer_to_server(servicer, server):
rpc_method_handlers = {
'GetLatestBlock': grpc.unary_unary_rpc_method_handler(
servicer.GetLatestBlock,
request_deserializer=service__pb2.ChainSpec.FromString,
response_serializer=service__pb2.BlockID.SerializeToString,
),
'GetBlock': grpc.unary_unary_rpc_method_handler(
servicer.GetBlock,
request_deserializer=service__pb2.BlockID.FromString,
response_serializer=compact__formats__pb2.CompactBlock.SerializeToString,
),
'GetBlockRange': grpc.unary_stream_rpc_method_handler(
servicer.GetBlockRange,
request_deserializer=service__pb2.BlockRange.FromString,
response_serializer=compact__formats__pb2.CompactBlock.SerializeToString,
),
'GetTransaction': grpc.unary_unary_rpc_method_handler(
servicer.GetTransaction,
request_deserializer=service__pb2.TxFilter.FromString,
response_serializer=service__pb2.RawTransaction.SerializeToString,
),
'SendTransaction': grpc.unary_unary_rpc_method_handler(
servicer.SendTransaction,
request_deserializer=service__pb2.RawTransaction.FromString,
response_serializer=service__pb2.SendResponse.SerializeToString,
),
'GetAddressTxids': grpc.unary_stream_rpc_method_handler(
servicer.GetAddressTxids,
request_deserializer=service__pb2.TransparentAddressBlockFilter.FromString,
response_serializer=service__pb2.RawTransaction.SerializeToString,
),
'GetLightdInfo': grpc.unary_unary_rpc_method_handler(
servicer.GetLightdInfo,
request_deserializer=service__pb2.Empty.FromString,
response_serializer=service__pb2.LightdInfo.SerializeToString,
),
'GetCoinsupply': grpc.unary_unary_rpc_method_handler(
servicer.GetCoinsupply,
request_deserializer=service__pb2.Empty.FromString,
response_serializer=service__pb2.Coinsupply.SerializeToString,
),
}
generic_handler = grpc.method_handlers_generic_handler(
'cash.z.wallet.sdk.rpc.CompactTxStreamer', rpc_method_handlers)
server.add_generic_rpc_handlers((generic_handler,))
server.add_registered_method_handlers('cash.z.wallet.sdk.rpc.CompactTxStreamer', rpc_method_handlers)
# This class is part of an EXPERIMENTAL API.
class CompactTxStreamer(object):
"""Missing associated documentation comment in .proto file."""
@staticmethod
def GetLatestBlock(request,
target,
options=(),
channel_credentials=None,
call_credentials=None,
insecure=False,
compression=None,
wait_for_ready=None,
timeout=None,
metadata=None):
return grpc.experimental.unary_unary(
request,
target,
'/cash.z.wallet.sdk.rpc.CompactTxStreamer/GetLatestBlock',
service__pb2.ChainSpec.SerializeToString,
service__pb2.BlockID.FromString,
options,
channel_credentials,
insecure,
call_credentials,
compression,
wait_for_ready,
timeout,
metadata,
_registered_method=True)
@staticmethod
def GetBlock(request,
target,
options=(),
channel_credentials=None,
call_credentials=None,
insecure=False,
compression=None,
wait_for_ready=None,
timeout=None,
metadata=None):
return grpc.experimental.unary_unary(
request,
target,
'/cash.z.wallet.sdk.rpc.CompactTxStreamer/GetBlock',
service__pb2.BlockID.SerializeToString,
compact__formats__pb2.CompactBlock.FromString,
options,
channel_credentials,
insecure,
call_credentials,
compression,
wait_for_ready,
timeout,
metadata,
_registered_method=True)
@staticmethod
def GetBlockRange(request,
target,
options=(),
channel_credentials=None,
call_credentials=None,
insecure=False,
compression=None,
wait_for_ready=None,
timeout=None,
metadata=None):
return grpc.experimental.unary_stream(
request,
target,
'/cash.z.wallet.sdk.rpc.CompactTxStreamer/GetBlockRange',
service__pb2.BlockRange.SerializeToString,
compact__formats__pb2.CompactBlock.FromString,
options,
channel_credentials,
insecure,
call_credentials,
compression,
wait_for_ready,
timeout,
metadata,
_registered_method=True)
@staticmethod
def GetTransaction(request,
target,
options=(),
channel_credentials=None,
call_credentials=None,
insecure=False,
compression=None,
wait_for_ready=None,
timeout=None,
metadata=None):
return grpc.experimental.unary_unary(
request,
target,
'/cash.z.wallet.sdk.rpc.CompactTxStreamer/GetTransaction',
service__pb2.TxFilter.SerializeToString,
service__pb2.RawTransaction.FromString,
options,
channel_credentials,
insecure,
call_credentials,
compression,
wait_for_ready,
timeout,
metadata,
_registered_method=True)
@staticmethod
def SendTransaction(request,
target,
options=(),
channel_credentials=None,
call_credentials=None,
insecure=False,
compression=None,
wait_for_ready=None,
timeout=None,
metadata=None):
return grpc.experimental.unary_unary(
request,
target,
'/cash.z.wallet.sdk.rpc.CompactTxStreamer/SendTransaction',
service__pb2.RawTransaction.SerializeToString,
service__pb2.SendResponse.FromString,
options,
channel_credentials,
insecure,
call_credentials,
compression,
wait_for_ready,
timeout,
metadata,
_registered_method=True)
@staticmethod
def GetAddressTxids(request,
target,
options=(),
channel_credentials=None,
call_credentials=None,
insecure=False,
compression=None,
wait_for_ready=None,
timeout=None,
metadata=None):
return grpc.experimental.unary_stream(
request,
target,
'/cash.z.wallet.sdk.rpc.CompactTxStreamer/GetAddressTxids',
service__pb2.TransparentAddressBlockFilter.SerializeToString,
service__pb2.RawTransaction.FromString,
options,
channel_credentials,
insecure,
call_credentials,
compression,
wait_for_ready,
timeout,
metadata,
_registered_method=True)
@staticmethod
def GetLightdInfo(request,
target,
options=(),
channel_credentials=None,
call_credentials=None,
insecure=False,
compression=None,
wait_for_ready=None,
timeout=None,
metadata=None):
return grpc.experimental.unary_unary(
request,
target,
'/cash.z.wallet.sdk.rpc.CompactTxStreamer/GetLightdInfo',
service__pb2.Empty.SerializeToString,
service__pb2.LightdInfo.FromString,
options,
channel_credentials,
insecure,
call_credentials,
compression,
wait_for_ready,
timeout,
metadata,
_registered_method=True)
@staticmethod
def GetCoinsupply(request,
target,
options=(),
channel_credentials=None,
call_credentials=None,
insecure=False,
compression=None,
wait_for_ready=None,
timeout=None,
metadata=None):
return grpc.experimental.unary_unary(
request,
target,
'/cash.z.wallet.sdk.rpc.CompactTxStreamer/GetCoinsupply',
service__pb2.Empty.SerializeToString,
service__pb2.Coinsupply.FromString,
options,
channel_credentials,
insecure,
call_credentials,
compression,
wait_for_ready,
timeout,
metadata,
_registered_method=True)