@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 Core {
25
- fn get_status(&self, o: ::grpc::ServerHandlerContext, req: ::grpc::ServerRequestSingle<super::core::GetStatusRequest>, resp: ::grpc::ServerResponseUnarySink<super::core::GetStatusResponse>) -> ::grpc::Result<()>;
26
-
27
- fn get_block(&self, o: ::grpc::ServerHandlerContext, req: ::grpc::ServerRequestSingle<super::core::GetBlockRequest>, resp: ::grpc::ServerResponseUnarySink<super::core::GetBlockResponse>) -> ::grpc::Result<()>;
28
-
29
- fn broadcast_transaction(&self, o: ::grpc::ServerHandlerContext, req: ::grpc::ServerRequestSingle<super::core::BroadcastTransactionRequest>, resp: ::grpc::ServerResponseUnarySink<super::core::BroadcastTransactionResponse>) -> ::grpc::Result<()>;
30
-
31
- fn get_transaction(&self, o: ::grpc::ServerHandlerContext, req: ::grpc::ServerRequestSingle<super::core::GetTransactionRequest>, resp: ::grpc::ServerResponseUnarySink<super::core::GetTransactionResponse>) -> ::grpc::Result<()>;
32
-
33
- fn get_estimated_transaction_fee(&self, o: ::grpc::ServerHandlerContext, req: ::grpc::ServerRequestSingle<super::core::GetEstimatedTransactionFeeRequest>, resp: ::grpc::ServerResponseUnarySink<super::core::GetEstimatedTransactionFeeResponse>) -> ::grpc::Result<()>;
34
-
35
- fn subscribe_to_block_headers_with_chain_locks(&self, o: ::grpc::ServerHandlerContext, req: ::grpc::ServerRequestSingle<super::core::BlockHeadersWithChainLocksRequest>, resp: ::grpc::ServerResponseSink<super::core::BlockHeadersWithChainLocksResponse>) -> ::grpc::Result<()>;
36
-
37
- fn subscribe_to_transactions_with_proofs(&self, o: ::grpc::ServerHandlerContext, req: ::grpc::ServerRequestSingle<super::core::TransactionsWithProofsRequest>, resp: ::grpc::ServerResponseSink<super::core::TransactionsWithProofsResponse>) -> ::grpc::Result<()>;
38
- }
39
-
40
- // client
41
-
42
- pub struct CoreClient {
43
- grpc_client: ::std::sync::Arc<::grpc::Client>,
44
- }
45
-
46
- impl ::grpc::ClientStub for CoreClient {
47
- fn with_client(grpc_client: ::std::sync::Arc<::grpc::Client>) -> Self {
48
- CoreClient {
49
- grpc_client: grpc_client,
50
- }
51
- }
52
- }
53
-
54
- impl CoreClient {
55
- pub fn get_status(&self, o: ::grpc::RequestOptions, req: super::core::GetStatusRequest) -> ::grpc::SingleResponse<super::core::GetStatusResponse> {
56
- let descriptor = ::grpc::rt::ArcOrStatic::Static(&::grpc::rt::MethodDescriptor {
57
- name: ::grpc::rt::StringOrStatic::Static("/org.dash.platform.dapi.v0.Core/getStatus"),
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_block(&self, o: ::grpc::RequestOptions, req: super::core::GetBlockRequest) -> ::grpc::SingleResponse<super::core::GetBlockResponse> {
66
- let descriptor = ::grpc::rt::ArcOrStatic::Static(&::grpc::rt::MethodDescriptor {
67
- name: ::grpc::rt::StringOrStatic::Static("/org.dash.platform.dapi.v0.Core/getBlock"),
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 broadcast_transaction(&self, o: ::grpc::RequestOptions, req: super::core::BroadcastTransactionRequest) -> ::grpc::SingleResponse<super::core::BroadcastTransactionResponse> {
76
- let descriptor = ::grpc::rt::ArcOrStatic::Static(&::grpc::rt::MethodDescriptor {
77
- name: ::grpc::rt::StringOrStatic::Static("/org.dash.platform.dapi.v0.Core/broadcastTransaction"),
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_transaction(&self, o: ::grpc::RequestOptions, req: super::core::GetTransactionRequest) -> ::grpc::SingleResponse<super::core::GetTransactionResponse> {
86
- let descriptor = ::grpc::rt::ArcOrStatic::Static(&::grpc::rt::MethodDescriptor {
87
- name: ::grpc::rt::StringOrStatic::Static("/org.dash.platform.dapi.v0.Core/getTransaction"),
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_estimated_transaction_fee(&self, o: ::grpc::RequestOptions, req: super::core::GetEstimatedTransactionFeeRequest) -> ::grpc::SingleResponse<super::core::GetEstimatedTransactionFeeResponse> {
96
- let descriptor = ::grpc::rt::ArcOrStatic::Static(&::grpc::rt::MethodDescriptor {
97
- name: ::grpc::rt::StringOrStatic::Static("/org.dash.platform.dapi.v0.Core/getEstimatedTransactionFee"),
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 subscribe_to_block_headers_with_chain_locks(&self, o: ::grpc::RequestOptions, req: super::core::BlockHeadersWithChainLocksRequest) -> ::grpc::StreamingResponse<super::core::BlockHeadersWithChainLocksResponse> {
106
- let descriptor = ::grpc::rt::ArcOrStatic::Static(&::grpc::rt::MethodDescriptor {
107
- name: ::grpc::rt::StringOrStatic::Static("/org.dash.platform.dapi.v0.Core/subscribeToBlockHeadersWithChainLocks"),
108
- streaming: ::grpc::rt::GrpcStreaming::ServerStreaming,
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_server_streaming(o, req, descriptor)
113
- }
114
-
115
- pub fn subscribe_to_transactions_with_proofs(&self, o: ::grpc::RequestOptions, req: super::core::TransactionsWithProofsRequest) -> ::grpc::StreamingResponse<super::core::TransactionsWithProofsResponse> {
116
- let descriptor = ::grpc::rt::ArcOrStatic::Static(&::grpc::rt::MethodDescriptor {
117
- name: ::grpc::rt::StringOrStatic::Static("/org.dash.platform.dapi.v0.Core/subscribeToTransactionsWithProofs"),
118
- streaming: ::grpc::rt::GrpcStreaming::ServerStreaming,
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_server_streaming(o, req, descriptor)
123
- }
124
- }
125
-
126
- // server
127
-
128
- pub struct CoreServer;
129
-
130
-
131
- impl CoreServer {
132
- pub fn new_service_def<H : Core + '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.Core",
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.Core/getStatus"),
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).get_status(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.Core/getBlock"),
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_block(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.Core/broadcastTransaction"),
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).broadcast_transaction(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.Core/getTransaction"),
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_transaction(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.Core/getEstimatedTransactionFee"),
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_estimated_transaction_fee(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.Core/subscribeToBlockHeadersWithChainLocks"),
199
- streaming: ::grpc::rt::GrpcStreaming::ServerStreaming,
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::MethodHandlerServerStreaming::new(move |ctx, req, resp| (*handler_copy).subscribe_to_block_headers_with_chain_locks(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.Core/subscribeToTransactionsWithProofs"),
211
- streaming: ::grpc::rt::GrpcStreaming::ServerStreaming,
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::MethodHandlerServerStreaming::new(move |ctx, req, resp| (*handler_copy).subscribe_to_transactions_with_proofs(ctx, req, resp))
218
- },
219
- ),
220
- ],
221
- )
222
- }
223
- }
@@ -1,3 +0,0 @@
1
- // @generated
2
-
3
- pub mod core;
@@ -1,3 +0,0 @@
1
- // @generated
2
-
3
- pub mod platform;