Skip to content

Commit 94e2e69

Browse files
authored
Merge pull request #210 from exploreriii/publish-proto
test: publish proto2
2 parents 9693d90 + 83f46a5 commit 94e2e69

404 files changed

Lines changed: 18835 additions & 1 deletion

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ myenv/
1717

1818
# Generated protobuf files
1919
.protos
20-
src/hiero_sdk_python/hapi
2120

2221
# VS Code settings
2322
.vscode/

src/hiero_sdk_python/hapi/__init__.py

Whitespace-only changes.

src/hiero_sdk_python/hapi/mirror/__init__.py

Whitespace-only changes.

src/hiero_sdk_python/hapi/mirror/consensus_service_pb2.py

Lines changed: 42 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 105 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,105 @@
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+
import warnings
5+
from . import consensus_service_pb2 as mirror_dot_consensus__service__pb2
6+
7+
GRPC_GENERATED_VERSION = '1.76.0'
8+
GRPC_VERSION = grpc.__version__
9+
_version_not_supported = False
10+
11+
try:
12+
from grpc._utilities import first_version_is_lower
13+
_version_not_supported = first_version_is_lower(GRPC_VERSION, GRPC_GENERATED_VERSION)
14+
except ImportError:
15+
_version_not_supported = True
16+
17+
if _version_not_supported:
18+
raise RuntimeError(
19+
f'The grpc package installed is at version {GRPC_VERSION},'
20+
+ ' but the generated code in mirror/consensus_service_pb2_grpc.py depends on'
21+
+ f' grpcio>={GRPC_GENERATED_VERSION}.'
22+
+ f' Please upgrade your grpc module to grpcio>={GRPC_GENERATED_VERSION}'
23+
+ f' or downgrade your generated code using grpcio-tools<={GRPC_VERSION}.'
24+
)
25+
26+
27+
class ConsensusServiceStub(object):
28+
"""*
29+
The Mirror Service provides the ability to query a stream of Hedera Consensus Service (HCS)
30+
messages for an HCS Topic via a specific (possibly open-ended) time range.
31+
"""
32+
33+
def __init__(self, channel):
34+
"""Constructor.
35+
36+
Args:
37+
channel: A grpc.Channel.
38+
"""
39+
self.subscribeTopic = channel.unary_stream(
40+
'/com.hedera.mirror.api.proto.ConsensusService/subscribeTopic',
41+
request_serializer=mirror_dot_consensus__service__pb2.ConsensusTopicQuery.SerializeToString,
42+
response_deserializer=mirror_dot_consensus__service__pb2.ConsensusTopicResponse.FromString,
43+
_registered_method=True)
44+
45+
46+
class ConsensusServiceServicer(object):
47+
"""*
48+
The Mirror Service provides the ability to query a stream of Hedera Consensus Service (HCS)
49+
messages for an HCS Topic via a specific (possibly open-ended) time range.
50+
"""
51+
52+
def subscribeTopic(self, request, context):
53+
"""Missing associated documentation comment in .proto file."""
54+
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
55+
context.set_details('Method not implemented!')
56+
raise NotImplementedError('Method not implemented!')
57+
58+
59+
def add_ConsensusServiceServicer_to_server(servicer, server):
60+
rpc_method_handlers = {
61+
'subscribeTopic': grpc.unary_stream_rpc_method_handler(
62+
servicer.subscribeTopic,
63+
request_deserializer=mirror_dot_consensus__service__pb2.ConsensusTopicQuery.FromString,
64+
response_serializer=mirror_dot_consensus__service__pb2.ConsensusTopicResponse.SerializeToString,
65+
),
66+
}
67+
generic_handler = grpc.method_handlers_generic_handler(
68+
'com.hedera.mirror.api.proto.ConsensusService', rpc_method_handlers)
69+
server.add_generic_rpc_handlers((generic_handler,))
70+
server.add_registered_method_handlers('com.hedera.mirror.api.proto.ConsensusService', rpc_method_handlers)
71+
72+
73+
# This class is part of an EXPERIMENTAL API.
74+
class ConsensusService(object):
75+
"""*
76+
The Mirror Service provides the ability to query a stream of Hedera Consensus Service (HCS)
77+
messages for an HCS Topic via a specific (possibly open-ended) time range.
78+
"""
79+
80+
@staticmethod
81+
def subscribeTopic(request,
82+
target,
83+
options=(),
84+
channel_credentials=None,
85+
call_credentials=None,
86+
insecure=False,
87+
compression=None,
88+
wait_for_ready=None,
89+
timeout=None,
90+
metadata=None):
91+
return grpc.experimental.unary_stream(
92+
request,
93+
target,
94+
'/com.hedera.mirror.api.proto.ConsensusService/subscribeTopic',
95+
mirror_dot_consensus__service__pb2.ConsensusTopicQuery.SerializeToString,
96+
mirror_dot_consensus__service__pb2.ConsensusTopicResponse.FromString,
97+
options,
98+
channel_credentials,
99+
insecure,
100+
call_credentials,
101+
compression,
102+
wait_for_ready,
103+
timeout,
104+
metadata,
105+
_registered_method=True)

src/hiero_sdk_python/hapi/mirror/mirror_network_service_pb2.py

Lines changed: 39 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 107 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,107 @@
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+
import warnings
5+
from . import mirror_network_service_pb2 as mirror_dot_mirror__network__service__pb2
6+
from ..services import basic_types_pb2 as services_dot_basic__types__pb2
7+
8+
GRPC_GENERATED_VERSION = '1.76.0'
9+
GRPC_VERSION = grpc.__version__
10+
_version_not_supported = False
11+
12+
try:
13+
from grpc._utilities import first_version_is_lower
14+
_version_not_supported = first_version_is_lower(GRPC_VERSION, GRPC_GENERATED_VERSION)
15+
except ImportError:
16+
_version_not_supported = True
17+
18+
if _version_not_supported:
19+
raise RuntimeError(
20+
f'The grpc package installed is at version {GRPC_VERSION},'
21+
+ ' but the generated code in mirror/mirror_network_service_pb2_grpc.py depends on'
22+
+ f' grpcio>={GRPC_GENERATED_VERSION}.'
23+
+ f' Please upgrade your grpc module to grpcio>={GRPC_GENERATED_VERSION}'
24+
+ f' or downgrade your generated code using grpcio-tools<={GRPC_VERSION}.'
25+
)
26+
27+
28+
class NetworkServiceStub(object):
29+
"""*
30+
Provides cross network APIs like address book queries
31+
"""
32+
33+
def __init__(self, channel):
34+
"""Constructor.
35+
36+
Args:
37+
channel: A grpc.Channel.
38+
"""
39+
self.getNodes = channel.unary_stream(
40+
'/com.hedera.mirror.api.proto.NetworkService/getNodes',
41+
request_serializer=mirror_dot_mirror__network__service__pb2.AddressBookQuery.SerializeToString,
42+
response_deserializer=services_dot_basic__types__pb2.NodeAddress.FromString,
43+
_registered_method=True)
44+
45+
46+
class NetworkServiceServicer(object):
47+
"""*
48+
Provides cross network APIs like address book queries
49+
"""
50+
51+
def getNodes(self, request, context):
52+
"""
53+
Query for an address book and return its nodes. The nodes are returned in ascending order by node ID. The
54+
response is not guaranteed to be a byte-for-byte equivalent to the NodeAddress in the Hedera file on
55+
the network since it is reconstructed from a normalized database table.
56+
"""
57+
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
58+
context.set_details('Method not implemented!')
59+
raise NotImplementedError('Method not implemented!')
60+
61+
62+
def add_NetworkServiceServicer_to_server(servicer, server):
63+
rpc_method_handlers = {
64+
'getNodes': grpc.unary_stream_rpc_method_handler(
65+
servicer.getNodes,
66+
request_deserializer=mirror_dot_mirror__network__service__pb2.AddressBookQuery.FromString,
67+
response_serializer=services_dot_basic__types__pb2.NodeAddress.SerializeToString,
68+
),
69+
}
70+
generic_handler = grpc.method_handlers_generic_handler(
71+
'com.hedera.mirror.api.proto.NetworkService', rpc_method_handlers)
72+
server.add_generic_rpc_handlers((generic_handler,))
73+
server.add_registered_method_handlers('com.hedera.mirror.api.proto.NetworkService', rpc_method_handlers)
74+
75+
76+
# This class is part of an EXPERIMENTAL API.
77+
class NetworkService(object):
78+
"""*
79+
Provides cross network APIs like address book queries
80+
"""
81+
82+
@staticmethod
83+
def getNodes(request,
84+
target,
85+
options=(),
86+
channel_credentials=None,
87+
call_credentials=None,
88+
insecure=False,
89+
compression=None,
90+
wait_for_ready=None,
91+
timeout=None,
92+
metadata=None):
93+
return grpc.experimental.unary_stream(
94+
request,
95+
target,
96+
'/com.hedera.mirror.api.proto.NetworkService/getNodes',
97+
mirror_dot_mirror__network__service__pb2.AddressBookQuery.SerializeToString,
98+
services_dot_basic__types__pb2.NodeAddress.FromString,
99+
options,
100+
channel_credentials,
101+
insecure,
102+
call_credentials,
103+
compression,
104+
wait_for_ready,
105+
timeout,
106+
metadata,
107+
_registered_method=True)

src/hiero_sdk_python/hapi/platform/__init__.py

Whitespace-only changes.

src/hiero_sdk_python/hapi/platform/event/__init__.py

Whitespace-only changes.

src/hiero_sdk_python/hapi/platform/event/event_consensus_data_pb2.py

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

0 commit comments

Comments
 (0)