Skip to content

Commit d813a61

Browse files
committed
Update proto files for injective-core modules, injective-exchange explorer
1 parent 124f8d1 commit d813a61

File tree

13 files changed

+2606
-252
lines changed

13 files changed

+2606
-252
lines changed

pyinjective/proto/exchange/injective_explorer_rpc_pb2.py

Lines changed: 853 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 172 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,172 @@
1+
# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
2+
"""Client and server classes corresponding to protobuf-defined services."""
3+
import grpc
4+
5+
from exchange import injective_explorer_rpc_pb2 as exchange_dot_injective__explorer__rpc__pb2
6+
7+
8+
class InjectiveExplorerRPCStub(object):
9+
"""ExplorerRPC defines gRPC API of explorer data for e.g. Blockchain Explorer
10+
"""
11+
12+
def __init__(self, channel):
13+
"""Constructor.
14+
15+
Args:
16+
channel: A grpc.Channel.
17+
"""
18+
self.GetAccount = channel.unary_unary(
19+
'/injective_explorer_rpc.InjectiveExplorerRPC/GetAccount',
20+
request_serializer=exchange_dot_injective__explorer__rpc__pb2.GetAccountRequest.SerializeToString,
21+
response_deserializer=exchange_dot_injective__explorer__rpc__pb2.GetAccountResponse.FromString,
22+
)
23+
self.GetAccountTxs = channel.unary_unary(
24+
'/injective_explorer_rpc.InjectiveExplorerRPC/GetAccountTxs',
25+
request_serializer=exchange_dot_injective__explorer__rpc__pb2.GetAccountTxsRequest.SerializeToString,
26+
response_deserializer=exchange_dot_injective__explorer__rpc__pb2.GetAccountTxsResponse.FromString,
27+
)
28+
self.StreamTxs = channel.unary_stream(
29+
'/injective_explorer_rpc.InjectiveExplorerRPC/StreamTxs',
30+
request_serializer=exchange_dot_injective__explorer__rpc__pb2.StreamTxsRequest.SerializeToString,
31+
response_deserializer=exchange_dot_injective__explorer__rpc__pb2.StreamTxsResponse.FromString,
32+
)
33+
self.StreamBlocks = channel.unary_stream(
34+
'/injective_explorer_rpc.InjectiveExplorerRPC/StreamBlocks',
35+
request_serializer=exchange_dot_injective__explorer__rpc__pb2.StreamBlocksRequest.SerializeToString,
36+
response_deserializer=exchange_dot_injective__explorer__rpc__pb2.StreamBlocksResponse.FromString,
37+
)
38+
39+
40+
class InjectiveExplorerRPCServicer(object):
41+
"""ExplorerRPC defines gRPC API of explorer data for e.g. Blockchain Explorer
42+
"""
43+
44+
def GetAccount(self, request, context):
45+
"""GetAccount returns account information given an account address.
46+
"""
47+
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
48+
context.set_details('Method not implemented!')
49+
raise NotImplementedError('Method not implemented!')
50+
51+
def GetAccountTxs(self, request, context):
52+
"""GetAccountTxs returns tranctions involving in an account based upon params.
53+
"""
54+
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
55+
context.set_details('Method not implemented!')
56+
raise NotImplementedError('Method not implemented!')
57+
58+
def StreamTxs(self, request, context):
59+
"""StreamTxs returns transactions based upon the request params
60+
"""
61+
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
62+
context.set_details('Method not implemented!')
63+
raise NotImplementedError('Method not implemented!')
64+
65+
def StreamBlocks(self, request, context):
66+
"""StreamBlocks returns blocks based upon the request params
67+
"""
68+
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
69+
context.set_details('Method not implemented!')
70+
raise NotImplementedError('Method not implemented!')
71+
72+
73+
def add_InjectiveExplorerRPCServicer_to_server(servicer, server):
74+
rpc_method_handlers = {
75+
'GetAccount': grpc.unary_unary_rpc_method_handler(
76+
servicer.GetAccount,
77+
request_deserializer=exchange_dot_injective__explorer__rpc__pb2.GetAccountRequest.FromString,
78+
response_serializer=exchange_dot_injective__explorer__rpc__pb2.GetAccountResponse.SerializeToString,
79+
),
80+
'GetAccountTxs': grpc.unary_unary_rpc_method_handler(
81+
servicer.GetAccountTxs,
82+
request_deserializer=exchange_dot_injective__explorer__rpc__pb2.GetAccountTxsRequest.FromString,
83+
response_serializer=exchange_dot_injective__explorer__rpc__pb2.GetAccountTxsResponse.SerializeToString,
84+
),
85+
'StreamTxs': grpc.unary_stream_rpc_method_handler(
86+
servicer.StreamTxs,
87+
request_deserializer=exchange_dot_injective__explorer__rpc__pb2.StreamTxsRequest.FromString,
88+
response_serializer=exchange_dot_injective__explorer__rpc__pb2.StreamTxsResponse.SerializeToString,
89+
),
90+
'StreamBlocks': grpc.unary_stream_rpc_method_handler(
91+
servicer.StreamBlocks,
92+
request_deserializer=exchange_dot_injective__explorer__rpc__pb2.StreamBlocksRequest.FromString,
93+
response_serializer=exchange_dot_injective__explorer__rpc__pb2.StreamBlocksResponse.SerializeToString,
94+
),
95+
}
96+
generic_handler = grpc.method_handlers_generic_handler(
97+
'injective_explorer_rpc.InjectiveExplorerRPC', rpc_method_handlers)
98+
server.add_generic_rpc_handlers((generic_handler,))
99+
100+
101+
# This class is part of an EXPERIMENTAL API.
102+
class InjectiveExplorerRPC(object):
103+
"""ExplorerRPC defines gRPC API of explorer data for e.g. Blockchain Explorer
104+
"""
105+
106+
@staticmethod
107+
def GetAccount(request,
108+
target,
109+
options=(),
110+
channel_credentials=None,
111+
call_credentials=None,
112+
insecure=False,
113+
compression=None,
114+
wait_for_ready=None,
115+
timeout=None,
116+
metadata=None):
117+
return grpc.experimental.unary_unary(request, target, '/injective_explorer_rpc.InjectiveExplorerRPC/GetAccount',
118+
exchange_dot_injective__explorer__rpc__pb2.GetAccountRequest.SerializeToString,
119+
exchange_dot_injective__explorer__rpc__pb2.GetAccountResponse.FromString,
120+
options, channel_credentials,
121+
insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
122+
123+
@staticmethod
124+
def GetAccountTxs(request,
125+
target,
126+
options=(),
127+
channel_credentials=None,
128+
call_credentials=None,
129+
insecure=False,
130+
compression=None,
131+
wait_for_ready=None,
132+
timeout=None,
133+
metadata=None):
134+
return grpc.experimental.unary_unary(request, target, '/injective_explorer_rpc.InjectiveExplorerRPC/GetAccountTxs',
135+
exchange_dot_injective__explorer__rpc__pb2.GetAccountTxsRequest.SerializeToString,
136+
exchange_dot_injective__explorer__rpc__pb2.GetAccountTxsResponse.FromString,
137+
options, channel_credentials,
138+
insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
139+
140+
@staticmethod
141+
def StreamTxs(request,
142+
target,
143+
options=(),
144+
channel_credentials=None,
145+
call_credentials=None,
146+
insecure=False,
147+
compression=None,
148+
wait_for_ready=None,
149+
timeout=None,
150+
metadata=None):
151+
return grpc.experimental.unary_stream(request, target, '/injective_explorer_rpc.InjectiveExplorerRPC/StreamTxs',
152+
exchange_dot_injective__explorer__rpc__pb2.StreamTxsRequest.SerializeToString,
153+
exchange_dot_injective__explorer__rpc__pb2.StreamTxsResponse.FromString,
154+
options, channel_credentials,
155+
insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
156+
157+
@staticmethod
158+
def StreamBlocks(request,
159+
target,
160+
options=(),
161+
channel_credentials=None,
162+
call_credentials=None,
163+
insecure=False,
164+
compression=None,
165+
wait_for_ready=None,
166+
timeout=None,
167+
metadata=None):
168+
return grpc.experimental.unary_stream(request, target, '/injective_explorer_rpc.InjectiveExplorerRPC/StreamBlocks',
169+
exchange_dot_injective__explorer__rpc__pb2.StreamBlocksRequest.SerializeToString,
170+
exchange_dot_injective__explorer__rpc__pb2.StreamBlocksResponse.FromString,
171+
options, channel_credentials,
172+
insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

pyinjective/proto/injective/exchange/v1beta1/exchange_pb2.py

Lines changed: 104 additions & 24 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)