1use massa_proto_rs::massa::api::v1 as grpc_api;
4
5use crate::private::{
6 add_staking_secret_keys, add_to_bootstrap_blacklist, add_to_bootstrap_whitelist,
7 add_to_peers_whitelist, allow_everyone_to_bootstrap, ban_nodes_by_ids, ban_nodes_by_ips,
8 get_bootstrap_blacklist, get_bootstrap_whitelist, get_mip_status, get_node_status,
9 get_peers_whitelist, remove_from_bootstrap_blacklist, remove_from_bootstrap_whitelist,
10 remove_from_peers_whitelist, remove_staking_addresses, shutdown_gracefully, sign_messages,
11 unban_nodes_by_ids, unban_nodes_by_ips,
12};
13use crate::public::{
14 execute_read_only_call, get_blocks, get_datastore_entries, get_endorsements,
15 get_next_block_best_parents, get_operations, get_sc_execution_events, get_selector_draws,
16 get_stakers, get_status, get_transactions_throughput, query_state, search_blocks,
17 search_endorsements, search_operations,
18};
19
20#[cfg(feature = "execution-trace")]
21use crate::public::{get_operation_abi_call_stacks, get_slot_abi_call_stacks, get_slot_transfers};
22use crate::stream::new_blocks::{new_blocks_server, NewBlocksServerStreamType};
23use crate::stream::new_endorsements::{new_endorsements_server, NewEndorsementsServerStreamType};
24use crate::stream::new_filled_blocks::{new_filled_blocks_server, NewFilledBlocksServerStreamType};
25use crate::stream::new_operations::{new_operations_server, NewOperationsServerStreamType};
26use crate::stream::new_slot_execution_outputs::{
27 new_slot_execution_outputs_server, NewSlotExecutionOutputsServerStreamType,
28};
29#[cfg(feature = "execution-trace")]
30use crate::stream::new_slot_transfers::new_slot_transfers;
31#[cfg(feature = "execution-info")]
32use crate::stream::new_transfers_info::new_transfer_info_server;
33use crate::stream::new_transfers_info::NewTransferInfoServerStreamType;
34
35use crate::server::{MassaPrivateGrpc, MassaPublicGrpc};
36use crate::stream::tx_throughput::{
37 transactions_throughput_server, TransactionsThroughputServerStreamType,
38};
39use crate::stream::{
40 new_blocks::{new_blocks, NewBlocksStreamType},
41 new_endorsements::{new_endorsements, NewEndorsementsStreamType},
42 new_filled_blocks::{new_filled_blocks, NewFilledBlocksStreamType},
43 new_operations::{new_operations, NewOperationsStreamType},
44 new_slot_abi_call_stacks::{new_slot_abi_call_stacks, NewSlotABICallStacksStreamType},
45 new_slot_execution_outputs::{new_slot_execution_outputs, NewSlotExecutionOutputsStreamType},
46 new_slot_transfers::NewSlotTransfersStreamType,
47 send_blocks::SendBlocksStreamType,
48 send_endorsements::{send_endorsements, SendEndorsementsStreamType},
49 send_operations::{send_operations, SendOperationsStreamType},
50 tx_throughput::{transactions_throughput, TransactionsThroughputStreamType},
51};
52
53#[tonic::async_trait]
54impl grpc_api::public_service_server::PublicService for MassaPublicGrpc {
55 async fn execute_read_only_call(
57 &self,
58 request: tonic::Request<grpc_api::ExecuteReadOnlyCallRequest>,
59 ) -> std::result::Result<tonic::Response<grpc_api::ExecuteReadOnlyCallResponse>, tonic::Status>
60 {
61 Ok(tonic::Response::new(execute_read_only_call(self, request)?))
62 }
63
64 #[cfg(feature = "execution-trace")]
65 async fn get_operation_abi_call_stacks(
66 &self,
67 request: tonic::Request<grpc_api::GetOperationAbiCallStacksRequest>,
68 ) -> std::result::Result<
69 tonic::Response<grpc_api::GetOperationAbiCallStacksResponse>,
70 tonic::Status,
71 > {
72 Ok(tonic::Response::new(get_operation_abi_call_stacks(
73 self, request,
74 )?))
75 }
76
77 #[cfg(not(feature = "execution-trace"))]
78 async fn get_operation_abi_call_stacks(
79 &self,
80 _request: tonic::Request<grpc_api::GetOperationAbiCallStacksRequest>,
81 ) -> std::result::Result<
82 tonic::Response<grpc_api::GetOperationAbiCallStacksResponse>,
83 tonic::Status,
84 > {
85 Err(tonic::Status::unimplemented("feature not enabled"))
86 }
87
88 #[cfg(feature = "execution-trace")]
89 async fn get_slot_abi_call_stacks(
90 &self,
91 request: tonic::Request<grpc_api::GetSlotAbiCallStacksRequest>,
92 ) -> std::result::Result<tonic::Response<grpc_api::GetSlotAbiCallStacksResponse>, tonic::Status>
93 {
94 Ok(tonic::Response::new(get_slot_abi_call_stacks(
95 self, request,
96 )?))
97 }
98
99 #[cfg(not(feature = "execution-trace"))]
100 async fn get_slot_abi_call_stacks(
101 &self,
102 _request: tonic::Request<grpc_api::GetSlotAbiCallStacksRequest>,
103 ) -> std::result::Result<tonic::Response<grpc_api::GetSlotAbiCallStacksResponse>, tonic::Status>
104 {
105 Err(tonic::Status::unimplemented("feature not enabled"))
106 }
107
108 #[cfg(feature = "execution-trace")]
109 async fn get_slot_transfers(
110 &self,
111 request: tonic::Request<grpc_api::GetSlotTransfersRequest>,
112 ) -> std::result::Result<tonic::Response<grpc_api::GetSlotTransfersResponse>, tonic::Status>
113 {
114 Ok(tonic::Response::new(get_slot_transfers(self, request)?))
115 }
116
117 #[cfg(not(feature = "execution-trace"))]
118 async fn get_slot_transfers(
119 &self,
120 _request: tonic::Request<grpc_api::GetSlotTransfersRequest>,
121 ) -> std::result::Result<tonic::Response<grpc_api::GetSlotTransfersResponse>, tonic::Status>
122 {
123 Err(tonic::Status::unimplemented("feature not enabled"))
124 }
125
126 async fn get_blocks(
128 &self,
129 request: tonic::Request<grpc_api::GetBlocksRequest>,
130 ) -> Result<tonic::Response<grpc_api::GetBlocksResponse>, tonic::Status> {
131 Ok(tonic::Response::new(get_blocks(self, request)?))
132 }
133
134 async fn get_datastore_entries(
136 &self,
137 request: tonic::Request<grpc_api::GetDatastoreEntriesRequest>,
138 ) -> Result<tonic::Response<grpc_api::GetDatastoreEntriesResponse>, tonic::Status> {
139 Ok(tonic::Response::new(get_datastore_entries(self, request)?))
140 }
141
142 async fn get_endorsements(
144 &self,
145 request: tonic::Request<grpc_api::GetEndorsementsRequest>,
146 ) -> Result<tonic::Response<grpc_api::GetEndorsementsResponse>, tonic::Status> {
147 Ok(tonic::Response::new(get_endorsements(self, request)?))
148 }
149
150 async fn get_stakers(
152 &self,
153 request: tonic::Request<grpc_api::GetStakersRequest>,
154 ) -> Result<tonic::Response<grpc_api::GetStakersResponse>, tonic::Status> {
155 Ok(tonic::Response::new(get_stakers(self, request)?))
156 }
157
158 async fn get_status(
160 &self,
161 request: tonic::Request<grpc_api::GetStatusRequest>,
162 ) -> Result<tonic::Response<grpc_api::GetStatusResponse>, tonic::Status> {
163 Ok(tonic::Response::new(get_status(self, request)?))
164 }
165
166 async fn get_next_block_best_parents(
168 &self,
169 request: tonic::Request<grpc_api::GetNextBlockBestParentsRequest>,
170 ) -> Result<tonic::Response<grpc_api::GetNextBlockBestParentsResponse>, tonic::Status> {
171 Ok(tonic::Response::new(get_next_block_best_parents(
172 self, request,
173 )?))
174 }
175
176 async fn get_operations(
178 &self,
179 request: tonic::Request<grpc_api::GetOperationsRequest>,
180 ) -> Result<tonic::Response<grpc_api::GetOperationsResponse>, tonic::Status> {
181 Ok(tonic::Response::new(get_operations(self, request)?))
182 }
183
184 async fn get_sc_execution_events(
186 &self,
187 request: tonic::Request<grpc_api::GetScExecutionEventsRequest>,
188 ) -> Result<tonic::Response<grpc_api::GetScExecutionEventsResponse>, tonic::Status> {
189 Ok(tonic::Response::new(get_sc_execution_events(
190 self, request,
191 )?))
192 }
193
194 async fn get_selector_draws(
196 &self,
197 request: tonic::Request<grpc_api::GetSelectorDrawsRequest>,
198 ) -> Result<tonic::Response<grpc_api::GetSelectorDrawsResponse>, tonic::Status> {
199 Ok(tonic::Response::new(get_selector_draws(self, request)?))
200 }
201
202 async fn get_transactions_throughput(
204 &self,
205 request: tonic::Request<grpc_api::GetTransactionsThroughputRequest>,
206 ) -> Result<tonic::Response<grpc_api::GetTransactionsThroughputResponse>, tonic::Status> {
207 Ok(tonic::Response::new(get_transactions_throughput(
208 self, request,
209 )?))
210 }
211
212 async fn query_state(
214 &self,
215 request: tonic::Request<grpc_api::QueryStateRequest>,
216 ) -> Result<tonic::Response<grpc_api::QueryStateResponse>, tonic::Status> {
217 Ok(tonic::Response::new(query_state(self, request)?))
218 }
219
220 async fn search_blocks(
222 &self,
223 request: tonic::Request<grpc_api::SearchBlocksRequest>,
224 ) -> Result<tonic::Response<grpc_api::SearchBlocksResponse>, tonic::Status> {
225 Ok(tonic::Response::new(search_blocks(self, request)?))
226 }
227
228 async fn search_endorsements(
230 &self,
231 request: tonic::Request<grpc_api::SearchEndorsementsRequest>,
232 ) -> Result<tonic::Response<grpc_api::SearchEndorsementsResponse>, tonic::Status> {
233 Ok(tonic::Response::new(search_endorsements(self, request)?))
234 }
235
236 async fn search_operations(
238 &self,
239 request: tonic::Request<grpc_api::SearchOperationsRequest>,
240 ) -> Result<tonic::Response<grpc_api::SearchOperationsResponse>, tonic::Status> {
241 Ok(tonic::Response::new(search_operations(self, request)?))
242 }
243
244 type NewBlocksStream = NewBlocksStreamType;
251
252 async fn new_blocks(
254 &self,
255 request: tonic::Request<tonic::Streaming<grpc_api::NewBlocksRequest>>,
256 ) -> Result<tonic::Response<Self::NewBlocksStream>, tonic::Status> {
257 Ok(tonic::Response::new(new_blocks(self, request).await?))
258 }
259
260 type NewBlocksServerStream = NewBlocksServerStreamType;
261 async fn new_blocks_server(
263 &self,
264 request: tonic::Request<grpc_api::NewBlocksServerRequest>,
265 ) -> Result<tonic::Response<Self::NewBlocksServerStream>, tonic::Status> {
266 Ok(tonic::Response::new(
267 new_blocks_server(self, request).await?,
268 ))
269 }
270
271 type NewEndorsementsStream = NewEndorsementsStreamType;
272
273 async fn new_endorsements(
275 &self,
276 request: tonic::Request<tonic::Streaming<grpc_api::NewEndorsementsRequest>>,
277 ) -> Result<tonic::Response<Self::NewEndorsementsStream>, tonic::Status> {
278 Ok(tonic::Response::new(new_endorsements(self, request).await?))
279 }
280
281 type NewEndorsementsServerStream = NewEndorsementsServerStreamType;
282
283 async fn new_endorsements_server(
285 &self,
286 request: tonic::Request<grpc_api::NewEndorsementsServerRequest>,
287 ) -> Result<tonic::Response<Self::NewEndorsementsServerStream>, tonic::Status> {
288 Ok(tonic::Response::new(
289 new_endorsements_server(self, request).await?,
290 ))
291 }
292
293 type NewFilledBlocksStream = NewFilledBlocksStreamType;
294
295 async fn new_filled_blocks(
297 &self,
298 request: tonic::Request<tonic::Streaming<grpc_api::NewFilledBlocksRequest>>,
299 ) -> Result<tonic::Response<Self::NewFilledBlocksStream>, tonic::Status> {
300 Ok(tonic::Response::new(
301 new_filled_blocks(self, request).await?,
302 ))
303 }
304
305 type NewFilledBlocksServerStream = NewFilledBlocksServerStreamType;
306
307 async fn new_filled_blocks_server(
308 &self,
309 request: tonic::Request<grpc_api::NewFilledBlocksServerRequest>,
310 ) -> Result<tonic::Response<Self::NewFilledBlocksServerStream>, tonic::Status> {
311 Ok(tonic::Response::new(
312 new_filled_blocks_server(self, request).await?,
313 ))
314 }
315
316 type NewOperationsStream = NewOperationsStreamType;
317
318 async fn new_operations(
320 &self,
321 request: tonic::Request<tonic::Streaming<grpc_api::NewOperationsRequest>>,
322 ) -> Result<tonic::Response<Self::NewOperationsStream>, tonic::Status> {
323 Ok(tonic::Response::new(new_operations(self, request).await?))
324 }
325
326 type NewOperationsServerStream = NewOperationsServerStreamType;
327
328 async fn new_operations_server(
330 &self,
331 request: tonic::Request<grpc_api::NewOperationsServerRequest>,
332 ) -> Result<tonic::Response<Self::NewOperationsServerStream>, tonic::Status> {
333 Ok(tonic::Response::new(
334 new_operations_server(self, request).await?,
335 ))
336 }
337
338 type NewSlotExecutionOutputsStream = NewSlotExecutionOutputsStreamType;
339
340 async fn new_slot_execution_outputs(
342 &self,
343 request: tonic::Request<tonic::Streaming<grpc_api::NewSlotExecutionOutputsRequest>>,
344 ) -> Result<tonic::Response<Self::NewSlotExecutionOutputsStream>, tonic::Status> {
345 Ok(tonic::Response::new(
346 new_slot_execution_outputs(self, request).await?,
347 ))
348 }
349
350 type NewSlotExecutionOutputsServerStream = NewSlotExecutionOutputsServerStreamType;
351
352 async fn new_slot_execution_outputs_server(
353 &self,
354 request: tonic::Request<grpc_api::NewSlotExecutionOutputsServerRequest>,
355 ) -> Result<tonic::Response<Self::NewSlotExecutionOutputsServerStream>, tonic::Status> {
356 Ok(tonic::Response::new(
357 new_slot_execution_outputs_server(self, request).await?,
358 ))
359 }
360
361 type NewSlotTransfersStream = NewSlotTransfersStreamType;
362
363 #[cfg(feature = "execution-trace")]
364 async fn new_slot_transfers(
366 &self,
367 request: tonic::Request<tonic::Streaming<grpc_api::NewSlotTransfersRequest>>,
368 ) -> Result<tonic::Response<Self::NewSlotTransfersStream>, tonic::Status> {
369 Ok(tonic::Response::new(
370 new_slot_transfers(self, request).await?,
371 ))
372 }
373
374 #[cfg(not(feature = "execution-trace"))]
375 async fn new_slot_transfers(
377 &self,
378 _request: tonic::Request<tonic::Streaming<grpc_api::NewSlotTransfersRequest>>,
379 ) -> Result<tonic::Response<Self::NewSlotTransfersStream>, tonic::Status> {
380 Err(tonic::Status::unimplemented("feature not enabled"))
381 }
382
383 type NewTransfersInfoServerStream = NewTransferInfoServerStreamType;
384
385 #[cfg(not(feature = "execution-info"))]
386 async fn new_transfers_info_server(
387 &self,
388 _request: tonic::Request<grpc_api::NewTransfersInfoServerRequest>,
389 ) -> std::result::Result<tonic::Response<Self::NewTransfersInfoServerStream>, tonic::Status>
390 {
391 Err(tonic::Status::unimplemented("feature not enabled"))
392 }
393
394 #[cfg(feature = "execution-info")]
395 async fn new_transfers_info_server(
396 &self,
397 request: tonic::Request<grpc_api::NewTransfersInfoServerRequest>,
398 ) -> std::result::Result<tonic::Response<Self::NewTransfersInfoServerStream>, tonic::Status>
399 {
400 Ok(tonic::Response::new(
401 new_transfer_info_server(self, request).await?,
402 ))
403 }
404
405 type NewSlotABICallStacksStream = NewSlotABICallStacksStreamType;
406
407 async fn new_slot_abi_call_stacks(
409 &self,
410 request: tonic::Request<tonic::Streaming<grpc_api::NewSlotAbiCallStacksRequest>>,
411 ) -> Result<tonic::Response<Self::NewSlotABICallStacksStream>, tonic::Status> {
412 if cfg!(feature = "execution-trace") {
413 Ok(tonic::Response::new(
414 new_slot_abi_call_stacks(self, request).await?,
415 ))
416 } else {
417 Err(tonic::Status::unimplemented("feature not enabled"))
418 }
419 }
420
421 type SendBlocksStream = SendBlocksStreamType;
422
423 async fn send_blocks(
425 &self,
426 _request: tonic::Request<tonic::Streaming<grpc_api::SendBlocksRequest>>,
427 ) -> Result<tonic::Response<Self::SendBlocksStream>, tonic::Status> {
428 Err(tonic::Status::unavailable("not available"))
429 }
431
432 type SendEndorsementsStream = SendEndorsementsStreamType;
433
434 async fn send_endorsements(
436 &self,
437 request: tonic::Request<tonic::Streaming<grpc_api::SendEndorsementsRequest>>,
438 ) -> Result<tonic::Response<Self::SendEndorsementsStream>, tonic::Status> {
439 Ok(tonic::Response::new(
440 send_endorsements(self, request).await?,
441 ))
442 }
443
444 type SendOperationsStream = SendOperationsStreamType;
445
446 async fn send_operations(
448 &self,
449 request: tonic::Request<tonic::Streaming<grpc_api::SendOperationsRequest>>,
450 ) -> Result<tonic::Response<Self::SendOperationsStream>, tonic::Status> {
451 Ok(tonic::Response::new(send_operations(self, request).await?))
452 }
453
454 type TransactionsThroughputStream = TransactionsThroughputStreamType;
455
456 async fn transactions_throughput(
458 &self,
459 request: tonic::Request<tonic::Streaming<grpc_api::TransactionsThroughputRequest>>,
460 ) -> Result<tonic::Response<Self::TransactionsThroughputStream>, tonic::Status> {
461 Ok(tonic::Response::new(
462 transactions_throughput(self, request).await?,
463 ))
464 }
465
466 type TransactionsThroughputServerStream = TransactionsThroughputServerStreamType;
467
468 async fn transactions_throughput_server(
469 &self,
470 request: tonic::Request<grpc_api::TransactionsThroughputServerRequest>,
471 ) -> Result<tonic::Response<Self::TransactionsThroughputServerStream>, tonic::Status> {
472 Ok(tonic::Response::new(
473 transactions_throughput_server(self, request).await?,
474 ))
475 }
476}
477
478#[tonic::async_trait]
479impl grpc_api::private_service_server::PrivateService for MassaPrivateGrpc {
480 async fn add_to_bootstrap_blacklist(
482 &self,
483 request: tonic::Request<grpc_api::AddToBootstrapBlacklistRequest>,
484 ) -> Result<tonic::Response<grpc_api::AddToBootstrapBlacklistResponse>, tonic::Status> {
485 Ok(tonic::Response::new(add_to_bootstrap_blacklist(
486 self, request,
487 )?))
488 }
489 async fn add_to_bootstrap_whitelist(
491 &self,
492 request: tonic::Request<grpc_api::AddToBootstrapWhitelistRequest>,
493 ) -> Result<tonic::Response<grpc_api::AddToBootstrapWhitelistResponse>, tonic::Status> {
494 Ok(tonic::Response::new(add_to_bootstrap_whitelist(
495 self, request,
496 )?))
497 }
498 async fn add_to_peers_whitelist(
501 &self,
502 request: tonic::Request<grpc_api::AddToPeersWhitelistRequest>,
503 ) -> Result<tonic::Response<grpc_api::AddToPeersWhitelistResponse>, tonic::Status> {
504 Ok(tonic::Response::new(add_to_peers_whitelist(self, request)?))
505 }
506 async fn add_staking_secret_keys(
508 &self,
509 request: tonic::Request<grpc_api::AddStakingSecretKeysRequest>,
510 ) -> Result<tonic::Response<grpc_api::AddStakingSecretKeysResponse>, tonic::Status> {
511 Ok(tonic::Response::new(add_staking_secret_keys(
512 self, request,
513 )?))
514 }
515 async fn ban_nodes_by_ids(
517 &self,
518 request: tonic::Request<grpc_api::BanNodesByIdsRequest>,
519 ) -> Result<tonic::Response<grpc_api::BanNodesByIdsResponse>, tonic::Status> {
520 Ok(tonic::Response::new(ban_nodes_by_ids(self, request)?))
521 }
522
523 async fn ban_nodes_by_ips(
525 &self,
526 request: tonic::Request<grpc_api::BanNodesByIpsRequest>,
527 ) -> Result<tonic::Response<grpc_api::BanNodesByIpsResponse>, tonic::Status> {
528 Ok(tonic::Response::new(ban_nodes_by_ips(self, request)?))
529 }
530
531 async fn get_bootstrap_blacklist(
533 &self,
534 request: tonic::Request<grpc_api::GetBootstrapBlacklistRequest>,
535 ) -> Result<tonic::Response<grpc_api::GetBootstrapBlacklistResponse>, tonic::Status> {
536 Ok(tonic::Response::new(get_bootstrap_blacklist(
537 self, request,
538 )?))
539 }
540 async fn get_bootstrap_whitelist(
542 &self,
543 request: tonic::Request<grpc_api::GetBootstrapWhitelistRequest>,
544 ) -> Result<tonic::Response<grpc_api::GetBootstrapWhitelistResponse>, tonic::Status> {
545 Ok(tonic::Response::new(get_bootstrap_whitelist(
546 self, request,
547 )?))
548 }
549 async fn get_mip_status(
551 &self,
552 request: tonic::Request<grpc_api::GetMipStatusRequest>,
553 ) -> Result<tonic::Response<grpc_api::GetMipStatusResponse>, tonic::Status> {
554 Ok(tonic::Response::new(get_mip_status(self, request)?))
555 }
556 async fn allow_everyone_to_bootstrap(
558 &self,
559 request: tonic::Request<grpc_api::AllowEveryoneToBootstrapRequest>,
560 ) -> Result<tonic::Response<grpc_api::AllowEveryoneToBootstrapResponse>, tonic::Status> {
561 Ok(tonic::Response::new(allow_everyone_to_bootstrap(
562 self, request,
563 )?))
564 }
565 async fn get_node_status(
567 &self,
568 request: tonic::Request<grpc_api::GetNodeStatusRequest>,
569 ) -> Result<tonic::Response<grpc_api::GetNodeStatusResponse>, tonic::Status> {
570 Ok(tonic::Response::new(get_node_status(self, request)?))
571 }
572 async fn get_peers_whitelist(
574 &self,
575 request: tonic::Request<grpc_api::GetPeersWhitelistRequest>,
576 ) -> Result<tonic::Response<grpc_api::GetPeersWhitelistResponse>, tonic::Status> {
577 Ok(tonic::Response::new(get_peers_whitelist(self, request)?))
578 }
579 async fn remove_from_bootstrap_blacklist(
581 &self,
582 request: tonic::Request<grpc_api::RemoveFromBootstrapBlacklistRequest>,
583 ) -> Result<tonic::Response<grpc_api::RemoveFromBootstrapBlacklistResponse>, tonic::Status>
584 {
585 Ok(tonic::Response::new(remove_from_bootstrap_blacklist(
586 self, request,
587 )?))
588 }
589 async fn remove_from_bootstrap_whitelist(
591 &self,
592 request: tonic::Request<grpc_api::RemoveFromBootstrapWhitelistRequest>,
593 ) -> Result<tonic::Response<grpc_api::RemoveFromBootstrapWhitelistResponse>, tonic::Status>
594 {
595 Ok(tonic::Response::new(remove_from_bootstrap_whitelist(
596 self, request,
597 )?))
598 }
599 async fn remove_from_peers_whitelist(
601 &self,
602 request: tonic::Request<grpc_api::RemoveFromPeersWhitelistRequest>,
603 ) -> Result<tonic::Response<grpc_api::RemoveFromPeersWhitelistResponse>, tonic::Status> {
604 Ok(tonic::Response::new(remove_from_peers_whitelist(
605 self, request,
606 )?))
607 }
608 async fn remove_staking_addresses(
610 &self,
611 request: tonic::Request<grpc_api::RemoveStakingAddressesRequest>,
612 ) -> Result<tonic::Response<grpc_api::RemoveStakingAddressesResponse>, tonic::Status> {
613 Ok(tonic::Response::new(remove_staking_addresses(
614 self, request,
615 )?))
616 }
617 async fn sign_messages(
619 &self,
620 request: tonic::Request<grpc_api::SignMessagesRequest>,
621 ) -> Result<tonic::Response<grpc_api::SignMessagesResponse>, tonic::Status> {
622 Ok(tonic::Response::new(sign_messages(self, request)?))
623 }
624 async fn shutdown_gracefully(
626 &self,
627 request: tonic::Request<grpc_api::ShutdownGracefullyRequest>,
628 ) -> Result<tonic::Response<grpc_api::ShutdownGracefullyResponse>, tonic::Status> {
629 Ok(tonic::Response::new(shutdown_gracefully(self, request)?))
630 }
631
632 async fn unban_nodes_by_ids(
634 &self,
635 request: tonic::Request<grpc_api::UnbanNodesByIdsRequest>,
636 ) -> Result<tonic::Response<grpc_api::UnbanNodesByIdsResponse>, tonic::Status> {
637 Ok(tonic::Response::new(unban_nodes_by_ids(self, request)?))
638 }
639
640 async fn unban_nodes_by_ips(
642 &self,
643 request: tonic::Request<grpc_api::UnbanNodesByIpsRequest>,
644 ) -> Result<tonic::Response<grpc_api::UnbanNodesByIpsResponse>, tonic::Status> {
645 Ok(tonic::Response::new(unban_nodes_by_ips(self, request)?))
646 }
647}