@dashevo/dapi-grpc 0.25.0-dev.9 → 0.25.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,223 +0,0 @@
1
- // This file is generated. Do not edit
2
- // @generated
3
-
4
- // https://github.com/Manishearth/rust-clippy/issues/702
5
- #![allow(unknown_lints)]
6
- #![allow(clippy::all)]
7
-
8
- #![cfg_attr(rustfmt, rustfmt_skip)]
9
-
10
- #![allow(box_pointers)]
11
- #![allow(dead_code)]
12
- #![allow(missing_docs)]
13
- #![allow(non_camel_case_types)]
14
- #![allow(non_snake_case)]
15
- #![allow(non_upper_case_globals)]
16
- #![allow(trivial_casts)]
17
- #![allow(unsafe_code)]
18
- #![allow(unused_imports)]
19
- #![allow(unused_results)]
20
-
21
-
22
- // server interface
23
-
24
- pub trait Platform {
25
- fn broadcast_state_transition(&self, o: ::grpc::ServerHandlerContext, req: ::grpc::ServerRequestSingle<super::platform::BroadcastStateTransitionRequest>, resp: ::grpc::ServerResponseUnarySink<super::platform::BroadcastStateTransitionResponse>) -> ::grpc::Result<()>;
26
-
27
- fn get_identity(&self, o: ::grpc::ServerHandlerContext, req: ::grpc::ServerRequestSingle<super::platform::GetIdentityRequest>, resp: ::grpc::ServerResponseUnarySink<super::platform::GetIdentityResponse>) -> ::grpc::Result<()>;
28
-
29
- fn get_data_contract(&self, o: ::grpc::ServerHandlerContext, req: ::grpc::ServerRequestSingle<super::platform::GetDataContractRequest>, resp: ::grpc::ServerResponseUnarySink<super::platform::GetDataContractResponse>) -> ::grpc::Result<()>;
30
-
31
- fn get_documents(&self, o: ::grpc::ServerHandlerContext, req: ::grpc::ServerRequestSingle<super::platform::GetDocumentsRequest>, resp: ::grpc::ServerResponseUnarySink<super::platform::GetDocumentsResponse>) -> ::grpc::Result<()>;
32
-
33
- fn get_identities_by_public_key_hashes(&self, o: ::grpc::ServerHandlerContext, req: ::grpc::ServerRequestSingle<super::platform::GetIdentitiesByPublicKeyHashesRequest>, resp: ::grpc::ServerResponseUnarySink<super::platform::GetIdentitiesByPublicKeyHashesResponse>) -> ::grpc::Result<()>;
34
-
35
- fn wait_for_state_transition_result(&self, o: ::grpc::ServerHandlerContext, req: ::grpc::ServerRequestSingle<super::platform::WaitForStateTransitionResultRequest>, resp: ::grpc::ServerResponseUnarySink<super::platform::WaitForStateTransitionResultResponse>) -> ::grpc::Result<()>;
36
-
37
- fn get_consensus_params(&self, o: ::grpc::ServerHandlerContext, req: ::grpc::ServerRequestSingle<super::platform::GetConsensusParamsRequest>, resp: ::grpc::ServerResponseUnarySink<super::platform::GetConsensusParamsResponse>) -> ::grpc::Result<()>;
38
- }
39
-
40
- // client
41
-
42
- pub struct PlatformClient {
43
- grpc_client: ::std::sync::Arc<::grpc::Client>,
44
- }
45
-
46
- impl ::grpc::ClientStub for PlatformClient {
47
- fn with_client(grpc_client: ::std::sync::Arc<::grpc::Client>) -> Self {
48
- PlatformClient {
49
- grpc_client: grpc_client,
50
- }
51
- }
52
- }
53
-
54
- impl PlatformClient {
55
- pub fn broadcast_state_transition(&self, o: ::grpc::RequestOptions, req: super::platform::BroadcastStateTransitionRequest) -> ::grpc::SingleResponse<super::platform::BroadcastStateTransitionResponse> {
56
- let descriptor = ::grpc::rt::ArcOrStatic::Static(&::grpc::rt::MethodDescriptor {
57
- name: ::grpc::rt::StringOrStatic::Static("/org.dash.platform.dapi.v0.Platform/broadcastStateTransition"),
58
- streaming: ::grpc::rt::GrpcStreaming::Unary,
59
- req_marshaller: ::grpc::rt::ArcOrStatic::Static(&::grpc_protobuf::MarshallerProtobuf),
60
- resp_marshaller: ::grpc::rt::ArcOrStatic::Static(&::grpc_protobuf::MarshallerProtobuf),
61
- });
62
- self.grpc_client.call_unary(o, req, descriptor)
63
- }
64
-
65
- pub fn get_identity(&self, o: ::grpc::RequestOptions, req: super::platform::GetIdentityRequest) -> ::grpc::SingleResponse<super::platform::GetIdentityResponse> {
66
- let descriptor = ::grpc::rt::ArcOrStatic::Static(&::grpc::rt::MethodDescriptor {
67
- name: ::grpc::rt::StringOrStatic::Static("/org.dash.platform.dapi.v0.Platform/getIdentity"),
68
- streaming: ::grpc::rt::GrpcStreaming::Unary,
69
- req_marshaller: ::grpc::rt::ArcOrStatic::Static(&::grpc_protobuf::MarshallerProtobuf),
70
- resp_marshaller: ::grpc::rt::ArcOrStatic::Static(&::grpc_protobuf::MarshallerProtobuf),
71
- });
72
- self.grpc_client.call_unary(o, req, descriptor)
73
- }
74
-
75
- pub fn get_data_contract(&self, o: ::grpc::RequestOptions, req: super::platform::GetDataContractRequest) -> ::grpc::SingleResponse<super::platform::GetDataContractResponse> {
76
- let descriptor = ::grpc::rt::ArcOrStatic::Static(&::grpc::rt::MethodDescriptor {
77
- name: ::grpc::rt::StringOrStatic::Static("/org.dash.platform.dapi.v0.Platform/getDataContract"),
78
- streaming: ::grpc::rt::GrpcStreaming::Unary,
79
- req_marshaller: ::grpc::rt::ArcOrStatic::Static(&::grpc_protobuf::MarshallerProtobuf),
80
- resp_marshaller: ::grpc::rt::ArcOrStatic::Static(&::grpc_protobuf::MarshallerProtobuf),
81
- });
82
- self.grpc_client.call_unary(o, req, descriptor)
83
- }
84
-
85
- pub fn get_documents(&self, o: ::grpc::RequestOptions, req: super::platform::GetDocumentsRequest) -> ::grpc::SingleResponse<super::platform::GetDocumentsResponse> {
86
- let descriptor = ::grpc::rt::ArcOrStatic::Static(&::grpc::rt::MethodDescriptor {
87
- name: ::grpc::rt::StringOrStatic::Static("/org.dash.platform.dapi.v0.Platform/getDocuments"),
88
- streaming: ::grpc::rt::GrpcStreaming::Unary,
89
- req_marshaller: ::grpc::rt::ArcOrStatic::Static(&::grpc_protobuf::MarshallerProtobuf),
90
- resp_marshaller: ::grpc::rt::ArcOrStatic::Static(&::grpc_protobuf::MarshallerProtobuf),
91
- });
92
- self.grpc_client.call_unary(o, req, descriptor)
93
- }
94
-
95
- pub fn get_identities_by_public_key_hashes(&self, o: ::grpc::RequestOptions, req: super::platform::GetIdentitiesByPublicKeyHashesRequest) -> ::grpc::SingleResponse<super::platform::GetIdentitiesByPublicKeyHashesResponse> {
96
- let descriptor = ::grpc::rt::ArcOrStatic::Static(&::grpc::rt::MethodDescriptor {
97
- name: ::grpc::rt::StringOrStatic::Static("/org.dash.platform.dapi.v0.Platform/getIdentitiesByPublicKeyHashes"),
98
- streaming: ::grpc::rt::GrpcStreaming::Unary,
99
- req_marshaller: ::grpc::rt::ArcOrStatic::Static(&::grpc_protobuf::MarshallerProtobuf),
100
- resp_marshaller: ::grpc::rt::ArcOrStatic::Static(&::grpc_protobuf::MarshallerProtobuf),
101
- });
102
- self.grpc_client.call_unary(o, req, descriptor)
103
- }
104
-
105
- pub fn wait_for_state_transition_result(&self, o: ::grpc::RequestOptions, req: super::platform::WaitForStateTransitionResultRequest) -> ::grpc::SingleResponse<super::platform::WaitForStateTransitionResultResponse> {
106
- let descriptor = ::grpc::rt::ArcOrStatic::Static(&::grpc::rt::MethodDescriptor {
107
- name: ::grpc::rt::StringOrStatic::Static("/org.dash.platform.dapi.v0.Platform/waitForStateTransitionResult"),
108
- streaming: ::grpc::rt::GrpcStreaming::Unary,
109
- req_marshaller: ::grpc::rt::ArcOrStatic::Static(&::grpc_protobuf::MarshallerProtobuf),
110
- resp_marshaller: ::grpc::rt::ArcOrStatic::Static(&::grpc_protobuf::MarshallerProtobuf),
111
- });
112
- self.grpc_client.call_unary(o, req, descriptor)
113
- }
114
-
115
- pub fn get_consensus_params(&self, o: ::grpc::RequestOptions, req: super::platform::GetConsensusParamsRequest) -> ::grpc::SingleResponse<super::platform::GetConsensusParamsResponse> {
116
- let descriptor = ::grpc::rt::ArcOrStatic::Static(&::grpc::rt::MethodDescriptor {
117
- name: ::grpc::rt::StringOrStatic::Static("/org.dash.platform.dapi.v0.Platform/getConsensusParams"),
118
- streaming: ::grpc::rt::GrpcStreaming::Unary,
119
- req_marshaller: ::grpc::rt::ArcOrStatic::Static(&::grpc_protobuf::MarshallerProtobuf),
120
- resp_marshaller: ::grpc::rt::ArcOrStatic::Static(&::grpc_protobuf::MarshallerProtobuf),
121
- });
122
- self.grpc_client.call_unary(o, req, descriptor)
123
- }
124
- }
125
-
126
- // server
127
-
128
- pub struct PlatformServer;
129
-
130
-
131
- impl PlatformServer {
132
- pub fn new_service_def<H : Platform + 'static + Sync + Send + 'static>(handler: H) -> ::grpc::rt::ServerServiceDefinition {
133
- let handler_arc = ::std::sync::Arc::new(handler);
134
- ::grpc::rt::ServerServiceDefinition::new("/org.dash.platform.dapi.v0.Platform",
135
- vec![
136
- ::grpc::rt::ServerMethod::new(
137
- ::grpc::rt::ArcOrStatic::Static(&::grpc::rt::MethodDescriptor {
138
- name: ::grpc::rt::StringOrStatic::Static("/org.dash.platform.dapi.v0.Platform/broadcastStateTransition"),
139
- streaming: ::grpc::rt::GrpcStreaming::Unary,
140
- req_marshaller: ::grpc::rt::ArcOrStatic::Static(&::grpc_protobuf::MarshallerProtobuf),
141
- resp_marshaller: ::grpc::rt::ArcOrStatic::Static(&::grpc_protobuf::MarshallerProtobuf),
142
- }),
143
- {
144
- let handler_copy = handler_arc.clone();
145
- ::grpc::rt::MethodHandlerUnary::new(move |ctx, req, resp| (*handler_copy).broadcast_state_transition(ctx, req, resp))
146
- },
147
- ),
148
- ::grpc::rt::ServerMethod::new(
149
- ::grpc::rt::ArcOrStatic::Static(&::grpc::rt::MethodDescriptor {
150
- name: ::grpc::rt::StringOrStatic::Static("/org.dash.platform.dapi.v0.Platform/getIdentity"),
151
- streaming: ::grpc::rt::GrpcStreaming::Unary,
152
- req_marshaller: ::grpc::rt::ArcOrStatic::Static(&::grpc_protobuf::MarshallerProtobuf),
153
- resp_marshaller: ::grpc::rt::ArcOrStatic::Static(&::grpc_protobuf::MarshallerProtobuf),
154
- }),
155
- {
156
- let handler_copy = handler_arc.clone();
157
- ::grpc::rt::MethodHandlerUnary::new(move |ctx, req, resp| (*handler_copy).get_identity(ctx, req, resp))
158
- },
159
- ),
160
- ::grpc::rt::ServerMethod::new(
161
- ::grpc::rt::ArcOrStatic::Static(&::grpc::rt::MethodDescriptor {
162
- name: ::grpc::rt::StringOrStatic::Static("/org.dash.platform.dapi.v0.Platform/getDataContract"),
163
- streaming: ::grpc::rt::GrpcStreaming::Unary,
164
- req_marshaller: ::grpc::rt::ArcOrStatic::Static(&::grpc_protobuf::MarshallerProtobuf),
165
- resp_marshaller: ::grpc::rt::ArcOrStatic::Static(&::grpc_protobuf::MarshallerProtobuf),
166
- }),
167
- {
168
- let handler_copy = handler_arc.clone();
169
- ::grpc::rt::MethodHandlerUnary::new(move |ctx, req, resp| (*handler_copy).get_data_contract(ctx, req, resp))
170
- },
171
- ),
172
- ::grpc::rt::ServerMethod::new(
173
- ::grpc::rt::ArcOrStatic::Static(&::grpc::rt::MethodDescriptor {
174
- name: ::grpc::rt::StringOrStatic::Static("/org.dash.platform.dapi.v0.Platform/getDocuments"),
175
- streaming: ::grpc::rt::GrpcStreaming::Unary,
176
- req_marshaller: ::grpc::rt::ArcOrStatic::Static(&::grpc_protobuf::MarshallerProtobuf),
177
- resp_marshaller: ::grpc::rt::ArcOrStatic::Static(&::grpc_protobuf::MarshallerProtobuf),
178
- }),
179
- {
180
- let handler_copy = handler_arc.clone();
181
- ::grpc::rt::MethodHandlerUnary::new(move |ctx, req, resp| (*handler_copy).get_documents(ctx, req, resp))
182
- },
183
- ),
184
- ::grpc::rt::ServerMethod::new(
185
- ::grpc::rt::ArcOrStatic::Static(&::grpc::rt::MethodDescriptor {
186
- name: ::grpc::rt::StringOrStatic::Static("/org.dash.platform.dapi.v0.Platform/getIdentitiesByPublicKeyHashes"),
187
- streaming: ::grpc::rt::GrpcStreaming::Unary,
188
- req_marshaller: ::grpc::rt::ArcOrStatic::Static(&::grpc_protobuf::MarshallerProtobuf),
189
- resp_marshaller: ::grpc::rt::ArcOrStatic::Static(&::grpc_protobuf::MarshallerProtobuf),
190
- }),
191
- {
192
- let handler_copy = handler_arc.clone();
193
- ::grpc::rt::MethodHandlerUnary::new(move |ctx, req, resp| (*handler_copy).get_identities_by_public_key_hashes(ctx, req, resp))
194
- },
195
- ),
196
- ::grpc::rt::ServerMethod::new(
197
- ::grpc::rt::ArcOrStatic::Static(&::grpc::rt::MethodDescriptor {
198
- name: ::grpc::rt::StringOrStatic::Static("/org.dash.platform.dapi.v0.Platform/waitForStateTransitionResult"),
199
- streaming: ::grpc::rt::GrpcStreaming::Unary,
200
- req_marshaller: ::grpc::rt::ArcOrStatic::Static(&::grpc_protobuf::MarshallerProtobuf),
201
- resp_marshaller: ::grpc::rt::ArcOrStatic::Static(&::grpc_protobuf::MarshallerProtobuf),
202
- }),
203
- {
204
- let handler_copy = handler_arc.clone();
205
- ::grpc::rt::MethodHandlerUnary::new(move |ctx, req, resp| (*handler_copy).wait_for_state_transition_result(ctx, req, resp))
206
- },
207
- ),
208
- ::grpc::rt::ServerMethod::new(
209
- ::grpc::rt::ArcOrStatic::Static(&::grpc::rt::MethodDescriptor {
210
- name: ::grpc::rt::StringOrStatic::Static("/org.dash.platform.dapi.v0.Platform/getConsensusParams"),
211
- streaming: ::grpc::rt::GrpcStreaming::Unary,
212
- req_marshaller: ::grpc::rt::ArcOrStatic::Static(&::grpc_protobuf::MarshallerProtobuf),
213
- resp_marshaller: ::grpc::rt::ArcOrStatic::Static(&::grpc_protobuf::MarshallerProtobuf),
214
- }),
215
- {
216
- let handler_copy = handler_arc.clone();
217
- ::grpc::rt::MethodHandlerUnary::new(move |ctx, req, resp| (*handler_copy).get_consensus_params(ctx, req, resp))
218
- },
219
- ),
220
- ],
221
- )
222
- }
223
- }