-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update proto files for injective-core modules, injective-exchange exp…
…lorer
- Loading branch information
1 parent
124f8d1
commit d813a61
Showing
13 changed files
with
2,606 additions
and
252 deletions.
There are no files selected for viewing
853 changes: 853 additions & 0 deletions
853
pyinjective/proto/exchange/injective_explorer_rpc_pb2.py
Large diffs are not rendered by default.
Oops, something went wrong.
172 changes: 172 additions & 0 deletions
172
pyinjective/proto/exchange/injective_explorer_rpc_pb2_grpc.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,172 @@ | ||
# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! | ||
"""Client and server classes corresponding to protobuf-defined services.""" | ||
import grpc | ||
|
||
from exchange import injective_explorer_rpc_pb2 as exchange_dot_injective__explorer__rpc__pb2 | ||
|
||
|
||
class InjectiveExplorerRPCStub(object): | ||
"""ExplorerRPC defines gRPC API of explorer data for e.g. Blockchain Explorer | ||
""" | ||
|
||
def __init__(self, channel): | ||
"""Constructor. | ||
Args: | ||
channel: A grpc.Channel. | ||
""" | ||
self.GetAccount = channel.unary_unary( | ||
'/injective_explorer_rpc.InjectiveExplorerRPC/GetAccount', | ||
request_serializer=exchange_dot_injective__explorer__rpc__pb2.GetAccountRequest.SerializeToString, | ||
response_deserializer=exchange_dot_injective__explorer__rpc__pb2.GetAccountResponse.FromString, | ||
) | ||
self.GetAccountTxs = channel.unary_unary( | ||
'/injective_explorer_rpc.InjectiveExplorerRPC/GetAccountTxs', | ||
request_serializer=exchange_dot_injective__explorer__rpc__pb2.GetAccountTxsRequest.SerializeToString, | ||
response_deserializer=exchange_dot_injective__explorer__rpc__pb2.GetAccountTxsResponse.FromString, | ||
) | ||
self.StreamTxs = channel.unary_stream( | ||
'/injective_explorer_rpc.InjectiveExplorerRPC/StreamTxs', | ||
request_serializer=exchange_dot_injective__explorer__rpc__pb2.StreamTxsRequest.SerializeToString, | ||
response_deserializer=exchange_dot_injective__explorer__rpc__pb2.StreamTxsResponse.FromString, | ||
) | ||
self.StreamBlocks = channel.unary_stream( | ||
'/injective_explorer_rpc.InjectiveExplorerRPC/StreamBlocks', | ||
request_serializer=exchange_dot_injective__explorer__rpc__pb2.StreamBlocksRequest.SerializeToString, | ||
response_deserializer=exchange_dot_injective__explorer__rpc__pb2.StreamBlocksResponse.FromString, | ||
) | ||
|
||
|
||
class InjectiveExplorerRPCServicer(object): | ||
"""ExplorerRPC defines gRPC API of explorer data for e.g. Blockchain Explorer | ||
""" | ||
|
||
def GetAccount(self, request, context): | ||
"""GetAccount returns account information given an account address. | ||
""" | ||
context.set_code(grpc.StatusCode.UNIMPLEMENTED) | ||
context.set_details('Method not implemented!') | ||
raise NotImplementedError('Method not implemented!') | ||
|
||
def GetAccountTxs(self, request, context): | ||
"""GetAccountTxs returns tranctions involving in an account based upon params. | ||
""" | ||
context.set_code(grpc.StatusCode.UNIMPLEMENTED) | ||
context.set_details('Method not implemented!') | ||
raise NotImplementedError('Method not implemented!') | ||
|
||
def StreamTxs(self, request, context): | ||
"""StreamTxs returns transactions based upon the request params | ||
""" | ||
context.set_code(grpc.StatusCode.UNIMPLEMENTED) | ||
context.set_details('Method not implemented!') | ||
raise NotImplementedError('Method not implemented!') | ||
|
||
def StreamBlocks(self, request, context): | ||
"""StreamBlocks returns blocks based upon the request params | ||
""" | ||
context.set_code(grpc.StatusCode.UNIMPLEMENTED) | ||
context.set_details('Method not implemented!') | ||
raise NotImplementedError('Method not implemented!') | ||
|
||
|
||
def add_InjectiveExplorerRPCServicer_to_server(servicer, server): | ||
rpc_method_handlers = { | ||
'GetAccount': grpc.unary_unary_rpc_method_handler( | ||
servicer.GetAccount, | ||
request_deserializer=exchange_dot_injective__explorer__rpc__pb2.GetAccountRequest.FromString, | ||
response_serializer=exchange_dot_injective__explorer__rpc__pb2.GetAccountResponse.SerializeToString, | ||
), | ||
'GetAccountTxs': grpc.unary_unary_rpc_method_handler( | ||
servicer.GetAccountTxs, | ||
request_deserializer=exchange_dot_injective__explorer__rpc__pb2.GetAccountTxsRequest.FromString, | ||
response_serializer=exchange_dot_injective__explorer__rpc__pb2.GetAccountTxsResponse.SerializeToString, | ||
), | ||
'StreamTxs': grpc.unary_stream_rpc_method_handler( | ||
servicer.StreamTxs, | ||
request_deserializer=exchange_dot_injective__explorer__rpc__pb2.StreamTxsRequest.FromString, | ||
response_serializer=exchange_dot_injective__explorer__rpc__pb2.StreamTxsResponse.SerializeToString, | ||
), | ||
'StreamBlocks': grpc.unary_stream_rpc_method_handler( | ||
servicer.StreamBlocks, | ||
request_deserializer=exchange_dot_injective__explorer__rpc__pb2.StreamBlocksRequest.FromString, | ||
response_serializer=exchange_dot_injective__explorer__rpc__pb2.StreamBlocksResponse.SerializeToString, | ||
), | ||
} | ||
generic_handler = grpc.method_handlers_generic_handler( | ||
'injective_explorer_rpc.InjectiveExplorerRPC', rpc_method_handlers) | ||
server.add_generic_rpc_handlers((generic_handler,)) | ||
|
||
|
||
# This class is part of an EXPERIMENTAL API. | ||
class InjectiveExplorerRPC(object): | ||
"""ExplorerRPC defines gRPC API of explorer data for e.g. Blockchain Explorer | ||
""" | ||
|
||
@staticmethod | ||
def GetAccount(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, '/injective_explorer_rpc.InjectiveExplorerRPC/GetAccount', | ||
exchange_dot_injective__explorer__rpc__pb2.GetAccountRequest.SerializeToString, | ||
exchange_dot_injective__explorer__rpc__pb2.GetAccountResponse.FromString, | ||
options, channel_credentials, | ||
insecure, call_credentials, compression, wait_for_ready, timeout, metadata) | ||
|
||
@staticmethod | ||
def GetAccountTxs(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, '/injective_explorer_rpc.InjectiveExplorerRPC/GetAccountTxs', | ||
exchange_dot_injective__explorer__rpc__pb2.GetAccountTxsRequest.SerializeToString, | ||
exchange_dot_injective__explorer__rpc__pb2.GetAccountTxsResponse.FromString, | ||
options, channel_credentials, | ||
insecure, call_credentials, compression, wait_for_ready, timeout, metadata) | ||
|
||
@staticmethod | ||
def StreamTxs(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, '/injective_explorer_rpc.InjectiveExplorerRPC/StreamTxs', | ||
exchange_dot_injective__explorer__rpc__pb2.StreamTxsRequest.SerializeToString, | ||
exchange_dot_injective__explorer__rpc__pb2.StreamTxsResponse.FromString, | ||
options, channel_credentials, | ||
insecure, call_credentials, compression, wait_for_ready, timeout, metadata) | ||
|
||
@staticmethod | ||
def StreamBlocks(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, '/injective_explorer_rpc.InjectiveExplorerRPC/StreamBlocks', | ||
exchange_dot_injective__explorer__rpc__pb2.StreamBlocksRequest.SerializeToString, | ||
exchange_dot_injective__explorer__rpc__pb2.StreamBlocksResponse.FromString, | ||
options, channel_credentials, | ||
insecure, call_credentials, compression, wait_for_ready, timeout, metadata) |
128 changes: 104 additions & 24 deletions
128
pyinjective/proto/injective/exchange/v1beta1/exchange_pb2.py
Large diffs are not rendered by default.
Oops, something went wrong.
Oops, something went wrong.