1pub type OwnedCreateGuardSignerWalletRequestView = ::buffa::view::OwnedView<
5 crate::proto::chain::guard::v1::__buffa::view::CreateGuardSignerWalletRequestView<
6 'static,
7 >,
8>;
9pub type OwnedCreateGuardSignerWalletResponseView = ::buffa::view::OwnedView<
11 crate::proto::chain::guard::v1::__buffa::view::CreateGuardSignerWalletResponseView<
12 'static,
13 >,
14>;
15pub type OwnedGetGuardSignerStatusRequestView = ::buffa::view::OwnedView<
17 crate::proto::chain::guard::v1::__buffa::view::GetGuardSignerStatusRequestView<
18 'static,
19 >,
20>;
21pub type OwnedGetGuardSignerStatusResponseView = ::buffa::view::OwnedView<
23 crate::proto::chain::guard::v1::__buffa::view::GetGuardSignerStatusResponseView<
24 'static,
25 >,
26>;
27pub type OwnedSignProtectedActionRequestView = ::buffa::view::OwnedView<
29 crate::proto::chain::guard::v1::__buffa::view::SignProtectedActionRequestView<
30 'static,
31 >,
32>;
33pub type OwnedSignProtectedActionResponseView = ::buffa::view::OwnedView<
35 crate::proto::chain::guard::v1::__buffa::view::SignProtectedActionResponseView<
36 'static,
37 >,
38>;
39pub type OwnedBatchSignProtectedActionsRequestView = ::buffa::view::OwnedView<
41 crate::proto::chain::guard::v1::__buffa::view::BatchSignProtectedActionsRequestView<
42 'static,
43 >,
44>;
45pub type OwnedBatchSignProtectedActionsResponseView = ::buffa::view::OwnedView<
47 crate::proto::chain::guard::v1::__buffa::view::BatchSignProtectedActionsResponseView<
48 'static,
49 >,
50>;
51pub type OwnedRotateGuardSignerWalletRequestView = ::buffa::view::OwnedView<
53 crate::proto::chain::guard::v1::__buffa::view::RotateGuardSignerWalletRequestView<
54 'static,
55 >,
56>;
57pub type OwnedRotateGuardSignerWalletResponseView = ::buffa::view::OwnedView<
59 crate::proto::chain::guard::v1::__buffa::view::RotateGuardSignerWalletResponseView<
60 'static,
61 >,
62>;
63pub type OwnedExportGuardSignerWalletRequestView = ::buffa::view::OwnedView<
65 crate::proto::chain::guard::v1::__buffa::view::ExportGuardSignerWalletRequestView<
66 'static,
67 >,
68>;
69pub type OwnedExportGuardSignerWalletResponseView = ::buffa::view::OwnedView<
71 crate::proto::chain::guard::v1::__buffa::view::ExportGuardSignerWalletResponseView<
72 'static,
73 >,
74>;
75impl ::connectrpc::Encodable<
76 crate::proto::chain::guard::v1::CreateGuardSignerWalletResponse,
77>
78for crate::proto::chain::guard::v1::__buffa::view::CreateGuardSignerWalletResponseView<
79 '_,
80> {
81 fn encode(
82 &self,
83 codec: ::connectrpc::CodecFormat,
84 ) -> ::std::result::Result<::buffa::bytes::Bytes, ::connectrpc::ConnectError> {
85 ::connectrpc::__codegen::encode_view_body(self, codec)
86 }
87}
88impl ::connectrpc::Encodable<
89 crate::proto::chain::guard::v1::CreateGuardSignerWalletResponse,
90>
91for ::buffa::view::OwnedView<
92 crate::proto::chain::guard::v1::__buffa::view::CreateGuardSignerWalletResponseView<
93 'static,
94 >,
95> {
96 fn encode(
97 &self,
98 codec: ::connectrpc::CodecFormat,
99 ) -> ::std::result::Result<::buffa::bytes::Bytes, ::connectrpc::ConnectError> {
100 ::connectrpc::__codegen::encode_view_body(self.reborrow(), codec)
101 }
102}
103impl ::connectrpc::Encodable<
104 crate::proto::chain::guard::v1::GetGuardSignerStatusResponse,
105>
106for crate::proto::chain::guard::v1::__buffa::view::GetGuardSignerStatusResponseView<'_> {
107 fn encode(
108 &self,
109 codec: ::connectrpc::CodecFormat,
110 ) -> ::std::result::Result<::buffa::bytes::Bytes, ::connectrpc::ConnectError> {
111 ::connectrpc::__codegen::encode_view_body(self, codec)
112 }
113}
114impl ::connectrpc::Encodable<
115 crate::proto::chain::guard::v1::GetGuardSignerStatusResponse,
116>
117for ::buffa::view::OwnedView<
118 crate::proto::chain::guard::v1::__buffa::view::GetGuardSignerStatusResponseView<
119 'static,
120 >,
121> {
122 fn encode(
123 &self,
124 codec: ::connectrpc::CodecFormat,
125 ) -> ::std::result::Result<::buffa::bytes::Bytes, ::connectrpc::ConnectError> {
126 ::connectrpc::__codegen::encode_view_body(self.reborrow(), codec)
127 }
128}
129impl ::connectrpc::Encodable<crate::proto::chain::guard::v1::SignProtectedActionResponse>
130for crate::proto::chain::guard::v1::__buffa::view::SignProtectedActionResponseView<'_> {
131 fn encode(
132 &self,
133 codec: ::connectrpc::CodecFormat,
134 ) -> ::std::result::Result<::buffa::bytes::Bytes, ::connectrpc::ConnectError> {
135 ::connectrpc::__codegen::encode_view_body(self, codec)
136 }
137}
138impl ::connectrpc::Encodable<crate::proto::chain::guard::v1::SignProtectedActionResponse>
139for ::buffa::view::OwnedView<
140 crate::proto::chain::guard::v1::__buffa::view::SignProtectedActionResponseView<
141 'static,
142 >,
143> {
144 fn encode(
145 &self,
146 codec: ::connectrpc::CodecFormat,
147 ) -> ::std::result::Result<::buffa::bytes::Bytes, ::connectrpc::ConnectError> {
148 ::connectrpc::__codegen::encode_view_body(self.reborrow(), codec)
149 }
150}
151impl ::connectrpc::Encodable<
152 crate::proto::chain::guard::v1::BatchSignProtectedActionsResponse,
153>
154for crate::proto::chain::guard::v1::__buffa::view::BatchSignProtectedActionsResponseView<
155 '_,
156> {
157 fn encode(
158 &self,
159 codec: ::connectrpc::CodecFormat,
160 ) -> ::std::result::Result<::buffa::bytes::Bytes, ::connectrpc::ConnectError> {
161 ::connectrpc::__codegen::encode_view_body(self, codec)
162 }
163}
164impl ::connectrpc::Encodable<
165 crate::proto::chain::guard::v1::BatchSignProtectedActionsResponse,
166>
167for ::buffa::view::OwnedView<
168 crate::proto::chain::guard::v1::__buffa::view::BatchSignProtectedActionsResponseView<
169 'static,
170 >,
171> {
172 fn encode(
173 &self,
174 codec: ::connectrpc::CodecFormat,
175 ) -> ::std::result::Result<::buffa::bytes::Bytes, ::connectrpc::ConnectError> {
176 ::connectrpc::__codegen::encode_view_body(self.reborrow(), codec)
177 }
178}
179impl ::connectrpc::Encodable<
180 crate::proto::chain::guard::v1::RotateGuardSignerWalletResponse,
181>
182for crate::proto::chain::guard::v1::__buffa::view::RotateGuardSignerWalletResponseView<
183 '_,
184> {
185 fn encode(
186 &self,
187 codec: ::connectrpc::CodecFormat,
188 ) -> ::std::result::Result<::buffa::bytes::Bytes, ::connectrpc::ConnectError> {
189 ::connectrpc::__codegen::encode_view_body(self, codec)
190 }
191}
192impl ::connectrpc::Encodable<
193 crate::proto::chain::guard::v1::RotateGuardSignerWalletResponse,
194>
195for ::buffa::view::OwnedView<
196 crate::proto::chain::guard::v1::__buffa::view::RotateGuardSignerWalletResponseView<
197 'static,
198 >,
199> {
200 fn encode(
201 &self,
202 codec: ::connectrpc::CodecFormat,
203 ) -> ::std::result::Result<::buffa::bytes::Bytes, ::connectrpc::ConnectError> {
204 ::connectrpc::__codegen::encode_view_body(self.reborrow(), codec)
205 }
206}
207impl ::connectrpc::Encodable<
208 crate::proto::chain::guard::v1::ExportGuardSignerWalletResponse,
209>
210for crate::proto::chain::guard::v1::__buffa::view::ExportGuardSignerWalletResponseView<
211 '_,
212> {
213 fn encode(
214 &self,
215 codec: ::connectrpc::CodecFormat,
216 ) -> ::std::result::Result<::buffa::bytes::Bytes, ::connectrpc::ConnectError> {
217 ::connectrpc::__codegen::encode_view_body(self, codec)
218 }
219}
220impl ::connectrpc::Encodable<
221 crate::proto::chain::guard::v1::ExportGuardSignerWalletResponse,
222>
223for ::buffa::view::OwnedView<
224 crate::proto::chain::guard::v1::__buffa::view::ExportGuardSignerWalletResponseView<
225 'static,
226 >,
227> {
228 fn encode(
229 &self,
230 codec: ::connectrpc::CodecFormat,
231 ) -> ::std::result::Result<::buffa::bytes::Bytes, ::connectrpc::ConnectError> {
232 ::connectrpc::__codegen::encode_view_body(self.reborrow(), codec)
233 }
234}
235pub const GUARD_SIGNER_SERVICE_SERVICE_NAME: &str = "chain.guard.v1.GuardSignerService";
237pub const GUARD_SIGNER_SERVICE_CREATE_GUARD_SIGNER_WALLET_SPEC: ::connectrpc::Spec = ::connectrpc::Spec::server(
242 "/chain.guard.v1.GuardSignerService/CreateGuardSignerWallet",
243 ::connectrpc::StreamType::Unary,
244 )
245 .with_idempotency_level(::connectrpc::IdempotencyLevel::Unknown);
246pub const GUARD_SIGNER_SERVICE_GET_GUARD_SIGNER_STATUS_SPEC: ::connectrpc::Spec = ::connectrpc::Spec::server(
251 "/chain.guard.v1.GuardSignerService/GetGuardSignerStatus",
252 ::connectrpc::StreamType::Unary,
253 )
254 .with_idempotency_level(::connectrpc::IdempotencyLevel::Unknown);
255pub const GUARD_SIGNER_SERVICE_SIGN_PROTECTED_ACTION_SPEC: ::connectrpc::Spec = ::connectrpc::Spec::server(
260 "/chain.guard.v1.GuardSignerService/SignProtectedAction",
261 ::connectrpc::StreamType::Unary,
262 )
263 .with_idempotency_level(::connectrpc::IdempotencyLevel::Unknown);
264pub const GUARD_SIGNER_SERVICE_BATCH_SIGN_PROTECTED_ACTIONS_SPEC: ::connectrpc::Spec = ::connectrpc::Spec::server(
269 "/chain.guard.v1.GuardSignerService/BatchSignProtectedActions",
270 ::connectrpc::StreamType::Unary,
271 )
272 .with_idempotency_level(::connectrpc::IdempotencyLevel::Unknown);
273pub const GUARD_SIGNER_SERVICE_ROTATE_GUARD_SIGNER_WALLET_SPEC: ::connectrpc::Spec = ::connectrpc::Spec::server(
278 "/chain.guard.v1.GuardSignerService/RotateGuardSignerWallet",
279 ::connectrpc::StreamType::Unary,
280 )
281 .with_idempotency_level(::connectrpc::IdempotencyLevel::Unknown);
282pub const GUARD_SIGNER_SERVICE_EXPORT_GUARD_SIGNER_WALLET_SPEC: ::connectrpc::Spec = ::connectrpc::Spec::server(
287 "/chain.guard.v1.GuardSignerService/ExportGuardSignerWallet",
288 ::connectrpc::StreamType::Unary,
289 )
290 .with_idempotency_level(::connectrpc::IdempotencyLevel::Unknown);
291#[allow(clippy::type_complexity)]
341pub trait GuardSignerService: Send + Sync + 'static {
342 fn create_guard_signer_wallet<'a>(
352 &'a self,
353 ctx: ::connectrpc::RequestContext,
354 request: ::connectrpc::ServiceRequest<
355 '_,
356 crate::proto::chain::guard::v1::CreateGuardSignerWalletRequest,
357 >,
358 ) -> impl ::std::future::Future<
359 Output = ::connectrpc::ServiceResult<
360 impl ::connectrpc::Encodable<
361 crate::proto::chain::guard::v1::CreateGuardSignerWalletResponse,
362 > + Send + use<'a, Self>,
363 >,
364 > + Send;
365 fn get_guard_signer_status<'a>(
375 &'a self,
376 ctx: ::connectrpc::RequestContext,
377 request: ::connectrpc::ServiceRequest<
378 '_,
379 crate::proto::chain::guard::v1::GetGuardSignerStatusRequest,
380 >,
381 ) -> impl ::std::future::Future<
382 Output = ::connectrpc::ServiceResult<
383 impl ::connectrpc::Encodable<
384 crate::proto::chain::guard::v1::GetGuardSignerStatusResponse,
385 > + Send + use<'a, Self>,
386 >,
387 > + Send;
388 fn sign_protected_action<'a>(
398 &'a self,
399 ctx: ::connectrpc::RequestContext,
400 request: ::connectrpc::ServiceRequest<
401 '_,
402 crate::proto::chain::guard::v1::SignProtectedActionRequest,
403 >,
404 ) -> impl ::std::future::Future<
405 Output = ::connectrpc::ServiceResult<
406 impl ::connectrpc::Encodable<
407 crate::proto::chain::guard::v1::SignProtectedActionResponse,
408 > + Send + use<'a, Self>,
409 >,
410 > + Send;
411 fn batch_sign_protected_actions<'a>(
421 &'a self,
422 ctx: ::connectrpc::RequestContext,
423 request: ::connectrpc::ServiceRequest<
424 '_,
425 crate::proto::chain::guard::v1::BatchSignProtectedActionsRequest,
426 >,
427 ) -> impl ::std::future::Future<
428 Output = ::connectrpc::ServiceResult<
429 impl ::connectrpc::Encodable<
430 crate::proto::chain::guard::v1::BatchSignProtectedActionsResponse,
431 > + Send + use<'a, Self>,
432 >,
433 > + Send;
434 fn rotate_guard_signer_wallet<'a>(
444 &'a self,
445 ctx: ::connectrpc::RequestContext,
446 request: ::connectrpc::ServiceRequest<
447 '_,
448 crate::proto::chain::guard::v1::RotateGuardSignerWalletRequest,
449 >,
450 ) -> impl ::std::future::Future<
451 Output = ::connectrpc::ServiceResult<
452 impl ::connectrpc::Encodable<
453 crate::proto::chain::guard::v1::RotateGuardSignerWalletResponse,
454 > + Send + use<'a, Self>,
455 >,
456 > + Send;
457 fn export_guard_signer_wallet<'a>(
467 &'a self,
468 ctx: ::connectrpc::RequestContext,
469 request: ::connectrpc::ServiceRequest<
470 '_,
471 crate::proto::chain::guard::v1::ExportGuardSignerWalletRequest,
472 >,
473 ) -> impl ::std::future::Future<
474 Output = ::connectrpc::ServiceResult<
475 impl ::connectrpc::Encodable<
476 crate::proto::chain::guard::v1::ExportGuardSignerWalletResponse,
477 > + Send + use<'a, Self>,
478 >,
479 > + Send;
480}
481pub trait GuardSignerServiceExt: GuardSignerService {
497 fn register(
502 self: ::std::sync::Arc<Self>,
503 router: ::connectrpc::Router,
504 ) -> ::connectrpc::Router;
505}
506impl<S: GuardSignerService> GuardSignerServiceExt for S {
507 fn register(
508 self: ::std::sync::Arc<Self>,
509 router: ::connectrpc::Router,
510 ) -> ::connectrpc::Router {
511 router
512 .route_view(
513 GUARD_SIGNER_SERVICE_SERVICE_NAME,
514 "CreateGuardSignerWallet",
515 {
516 let svc = ::std::sync::Arc::clone(&self);
517 ::connectrpc::view_handler_fn(move |
518 ctx,
519 req: ::buffa::view::OwnedView<
520 crate::proto::chain::guard::v1::__buffa::view::CreateGuardSignerWalletRequestView<
521 'static,
522 >,
523 >,
524 format|
525 {
526 let svc = ::std::sync::Arc::clone(&svc);
527 async move {
528 let sreq = ::connectrpc::ServiceRequest::<
529 crate::proto::chain::guard::v1::CreateGuardSignerWalletRequest,
530 >::from_parts(req.reborrow(), req.bytes());
531 svc.create_guard_signer_wallet(ctx, sreq)
532 .await?
533 .encode::<
534 crate::proto::chain::guard::v1::CreateGuardSignerWalletResponse,
535 >(format)
536 }
537 })
538 },
539 )
540 .with_spec(GUARD_SIGNER_SERVICE_CREATE_GUARD_SIGNER_WALLET_SPEC)
541 .route_view(
542 GUARD_SIGNER_SERVICE_SERVICE_NAME,
543 "GetGuardSignerStatus",
544 {
545 let svc = ::std::sync::Arc::clone(&self);
546 ::connectrpc::view_handler_fn(move |
547 ctx,
548 req: ::buffa::view::OwnedView<
549 crate::proto::chain::guard::v1::__buffa::view::GetGuardSignerStatusRequestView<
550 'static,
551 >,
552 >,
553 format|
554 {
555 let svc = ::std::sync::Arc::clone(&svc);
556 async move {
557 let sreq = ::connectrpc::ServiceRequest::<
558 crate::proto::chain::guard::v1::GetGuardSignerStatusRequest,
559 >::from_parts(req.reborrow(), req.bytes());
560 svc.get_guard_signer_status(ctx, sreq)
561 .await?
562 .encode::<
563 crate::proto::chain::guard::v1::GetGuardSignerStatusResponse,
564 >(format)
565 }
566 })
567 },
568 )
569 .with_spec(GUARD_SIGNER_SERVICE_GET_GUARD_SIGNER_STATUS_SPEC)
570 .route_view(
571 GUARD_SIGNER_SERVICE_SERVICE_NAME,
572 "SignProtectedAction",
573 {
574 let svc = ::std::sync::Arc::clone(&self);
575 ::connectrpc::view_handler_fn(move |
576 ctx,
577 req: ::buffa::view::OwnedView<
578 crate::proto::chain::guard::v1::__buffa::view::SignProtectedActionRequestView<
579 'static,
580 >,
581 >,
582 format|
583 {
584 let svc = ::std::sync::Arc::clone(&svc);
585 async move {
586 let sreq = ::connectrpc::ServiceRequest::<
587 crate::proto::chain::guard::v1::SignProtectedActionRequest,
588 >::from_parts(req.reborrow(), req.bytes());
589 svc.sign_protected_action(ctx, sreq)
590 .await?
591 .encode::<
592 crate::proto::chain::guard::v1::SignProtectedActionResponse,
593 >(format)
594 }
595 })
596 },
597 )
598 .with_spec(GUARD_SIGNER_SERVICE_SIGN_PROTECTED_ACTION_SPEC)
599 .route_view(
600 GUARD_SIGNER_SERVICE_SERVICE_NAME,
601 "BatchSignProtectedActions",
602 {
603 let svc = ::std::sync::Arc::clone(&self);
604 ::connectrpc::view_handler_fn(move |
605 ctx,
606 req: ::buffa::view::OwnedView<
607 crate::proto::chain::guard::v1::__buffa::view::BatchSignProtectedActionsRequestView<
608 'static,
609 >,
610 >,
611 format|
612 {
613 let svc = ::std::sync::Arc::clone(&svc);
614 async move {
615 let sreq = ::connectrpc::ServiceRequest::<
616 crate::proto::chain::guard::v1::BatchSignProtectedActionsRequest,
617 >::from_parts(req.reborrow(), req.bytes());
618 svc.batch_sign_protected_actions(ctx, sreq)
619 .await?
620 .encode::<
621 crate::proto::chain::guard::v1::BatchSignProtectedActionsResponse,
622 >(format)
623 }
624 })
625 },
626 )
627 .with_spec(GUARD_SIGNER_SERVICE_BATCH_SIGN_PROTECTED_ACTIONS_SPEC)
628 .route_view(
629 GUARD_SIGNER_SERVICE_SERVICE_NAME,
630 "RotateGuardSignerWallet",
631 {
632 let svc = ::std::sync::Arc::clone(&self);
633 ::connectrpc::view_handler_fn(move |
634 ctx,
635 req: ::buffa::view::OwnedView<
636 crate::proto::chain::guard::v1::__buffa::view::RotateGuardSignerWalletRequestView<
637 'static,
638 >,
639 >,
640 format|
641 {
642 let svc = ::std::sync::Arc::clone(&svc);
643 async move {
644 let sreq = ::connectrpc::ServiceRequest::<
645 crate::proto::chain::guard::v1::RotateGuardSignerWalletRequest,
646 >::from_parts(req.reborrow(), req.bytes());
647 svc.rotate_guard_signer_wallet(ctx, sreq)
648 .await?
649 .encode::<
650 crate::proto::chain::guard::v1::RotateGuardSignerWalletResponse,
651 >(format)
652 }
653 })
654 },
655 )
656 .with_spec(GUARD_SIGNER_SERVICE_ROTATE_GUARD_SIGNER_WALLET_SPEC)
657 .route_view(
658 GUARD_SIGNER_SERVICE_SERVICE_NAME,
659 "ExportGuardSignerWallet",
660 {
661 let svc = ::std::sync::Arc::clone(&self);
662 ::connectrpc::view_handler_fn(move |
663 ctx,
664 req: ::buffa::view::OwnedView<
665 crate::proto::chain::guard::v1::__buffa::view::ExportGuardSignerWalletRequestView<
666 'static,
667 >,
668 >,
669 format|
670 {
671 let svc = ::std::sync::Arc::clone(&svc);
672 async move {
673 let sreq = ::connectrpc::ServiceRequest::<
674 crate::proto::chain::guard::v1::ExportGuardSignerWalletRequest,
675 >::from_parts(req.reborrow(), req.bytes());
676 svc.export_guard_signer_wallet(ctx, sreq)
677 .await?
678 .encode::<
679 crate::proto::chain::guard::v1::ExportGuardSignerWalletResponse,
680 >(format)
681 }
682 })
683 },
684 )
685 .with_spec(GUARD_SIGNER_SERVICE_EXPORT_GUARD_SIGNER_WALLET_SPEC)
686 }
687}
688#[doc(hidden)]
690pub struct GuardSignerServiceRegisterMarker;
691impl<
692 S: GuardSignerService,
693> ::connectrpc::ServiceRegister<GuardSignerServiceRegisterMarker>
694for ::std::sync::Arc<S> {
695 fn register_service(self, router: ::connectrpc::Router) -> ::connectrpc::Router {
696 <S as GuardSignerServiceExt>::register(self, router)
697 }
698}
699pub struct GuardSignerServiceServer<T> {
713 inner: ::std::sync::Arc<T>,
714}
715impl<T: GuardSignerService> GuardSignerServiceServer<T> {
716 pub fn new(service: T) -> Self {
718 Self {
719 inner: ::std::sync::Arc::new(service),
720 }
721 }
722 pub fn from_arc(inner: ::std::sync::Arc<T>) -> Self {
724 Self { inner }
725 }
726}
727impl<T> Clone for GuardSignerServiceServer<T> {
728 fn clone(&self) -> Self {
729 Self {
730 inner: ::std::sync::Arc::clone(&self.inner),
731 }
732 }
733}
734impl<T: GuardSignerService> ::connectrpc::Dispatcher for GuardSignerServiceServer<T> {
735 #[inline]
736 fn lookup(
737 &self,
738 path: &str,
739 ) -> Option<::connectrpc::dispatcher::codegen::MethodDescriptor> {
740 let method = path.strip_prefix("chain.guard.v1.GuardSignerService/")?;
741 match method {
742 "CreateGuardSignerWallet" => {
743 Some(
744 ::connectrpc::dispatcher::codegen::MethodDescriptor::unary(false)
745 .with_spec(GUARD_SIGNER_SERVICE_CREATE_GUARD_SIGNER_WALLET_SPEC),
746 )
747 }
748 "GetGuardSignerStatus" => {
749 Some(
750 ::connectrpc::dispatcher::codegen::MethodDescriptor::unary(false)
751 .with_spec(GUARD_SIGNER_SERVICE_GET_GUARD_SIGNER_STATUS_SPEC),
752 )
753 }
754 "SignProtectedAction" => {
755 Some(
756 ::connectrpc::dispatcher::codegen::MethodDescriptor::unary(false)
757 .with_spec(GUARD_SIGNER_SERVICE_SIGN_PROTECTED_ACTION_SPEC),
758 )
759 }
760 "BatchSignProtectedActions" => {
761 Some(
762 ::connectrpc::dispatcher::codegen::MethodDescriptor::unary(false)
763 .with_spec(
764 GUARD_SIGNER_SERVICE_BATCH_SIGN_PROTECTED_ACTIONS_SPEC,
765 ),
766 )
767 }
768 "RotateGuardSignerWallet" => {
769 Some(
770 ::connectrpc::dispatcher::codegen::MethodDescriptor::unary(false)
771 .with_spec(GUARD_SIGNER_SERVICE_ROTATE_GUARD_SIGNER_WALLET_SPEC),
772 )
773 }
774 "ExportGuardSignerWallet" => {
775 Some(
776 ::connectrpc::dispatcher::codegen::MethodDescriptor::unary(false)
777 .with_spec(GUARD_SIGNER_SERVICE_EXPORT_GUARD_SIGNER_WALLET_SPEC),
778 )
779 }
780 _ => None,
781 }
782 }
783 fn call_unary(
784 &self,
785 path: &str,
786 ctx: ::connectrpc::RequestContext,
787 request: ::connectrpc::Payload,
788 format: ::connectrpc::CodecFormat,
789 ) -> ::connectrpc::dispatcher::codegen::UnaryResult {
790 let Some(method) = path.strip_prefix("chain.guard.v1.GuardSignerService/") else {
791 return ::connectrpc::dispatcher::codegen::unimplemented_unary(path);
792 };
793 let _ = (&ctx, &request, &format);
794 match method {
795 "CreateGuardSignerWallet" => {
796 let svc = ::std::sync::Arc::clone(&self.inner);
797 Box::pin(async move {
798 let body = ::connectrpc::dispatcher::codegen::request_proto_bytes::<
799 crate::proto::chain::guard::v1::CreateGuardSignerWalletRequest,
800 >(request.encoded()?, format)?;
801 let req: crate::proto::chain::guard::v1::__buffa::view::CreateGuardSignerWalletRequestView<
802 '_,
803 > = ::connectrpc::dispatcher::codegen::decode_borrowed_request_view(
804 &body,
805 )?;
806 let req = ::connectrpc::ServiceRequest::<
807 crate::proto::chain::guard::v1::CreateGuardSignerWalletRequest,
808 >::from_parts(&req, &body);
809 svc.create_guard_signer_wallet(ctx, req)
810 .await?
811 .encode::<
812 crate::proto::chain::guard::v1::CreateGuardSignerWalletResponse,
813 >(format)
814 })
815 }
816 "GetGuardSignerStatus" => {
817 let svc = ::std::sync::Arc::clone(&self.inner);
818 Box::pin(async move {
819 let body = ::connectrpc::dispatcher::codegen::request_proto_bytes::<
820 crate::proto::chain::guard::v1::GetGuardSignerStatusRequest,
821 >(request.encoded()?, format)?;
822 let req: crate::proto::chain::guard::v1::__buffa::view::GetGuardSignerStatusRequestView<
823 '_,
824 > = ::connectrpc::dispatcher::codegen::decode_borrowed_request_view(
825 &body,
826 )?;
827 let req = ::connectrpc::ServiceRequest::<
828 crate::proto::chain::guard::v1::GetGuardSignerStatusRequest,
829 >::from_parts(&req, &body);
830 svc.get_guard_signer_status(ctx, req)
831 .await?
832 .encode::<
833 crate::proto::chain::guard::v1::GetGuardSignerStatusResponse,
834 >(format)
835 })
836 }
837 "SignProtectedAction" => {
838 let svc = ::std::sync::Arc::clone(&self.inner);
839 Box::pin(async move {
840 let body = ::connectrpc::dispatcher::codegen::request_proto_bytes::<
841 crate::proto::chain::guard::v1::SignProtectedActionRequest,
842 >(request.encoded()?, format)?;
843 let req: crate::proto::chain::guard::v1::__buffa::view::SignProtectedActionRequestView<
844 '_,
845 > = ::connectrpc::dispatcher::codegen::decode_borrowed_request_view(
846 &body,
847 )?;
848 let req = ::connectrpc::ServiceRequest::<
849 crate::proto::chain::guard::v1::SignProtectedActionRequest,
850 >::from_parts(&req, &body);
851 svc.sign_protected_action(ctx, req)
852 .await?
853 .encode::<
854 crate::proto::chain::guard::v1::SignProtectedActionResponse,
855 >(format)
856 })
857 }
858 "BatchSignProtectedActions" => {
859 let svc = ::std::sync::Arc::clone(&self.inner);
860 Box::pin(async move {
861 let body = ::connectrpc::dispatcher::codegen::request_proto_bytes::<
862 crate::proto::chain::guard::v1::BatchSignProtectedActionsRequest,
863 >(request.encoded()?, format)?;
864 let req: crate::proto::chain::guard::v1::__buffa::view::BatchSignProtectedActionsRequestView<
865 '_,
866 > = ::connectrpc::dispatcher::codegen::decode_borrowed_request_view(
867 &body,
868 )?;
869 let req = ::connectrpc::ServiceRequest::<
870 crate::proto::chain::guard::v1::BatchSignProtectedActionsRequest,
871 >::from_parts(&req, &body);
872 svc.batch_sign_protected_actions(ctx, req)
873 .await?
874 .encode::<
875 crate::proto::chain::guard::v1::BatchSignProtectedActionsResponse,
876 >(format)
877 })
878 }
879 "RotateGuardSignerWallet" => {
880 let svc = ::std::sync::Arc::clone(&self.inner);
881 Box::pin(async move {
882 let body = ::connectrpc::dispatcher::codegen::request_proto_bytes::<
883 crate::proto::chain::guard::v1::RotateGuardSignerWalletRequest,
884 >(request.encoded()?, format)?;
885 let req: crate::proto::chain::guard::v1::__buffa::view::RotateGuardSignerWalletRequestView<
886 '_,
887 > = ::connectrpc::dispatcher::codegen::decode_borrowed_request_view(
888 &body,
889 )?;
890 let req = ::connectrpc::ServiceRequest::<
891 crate::proto::chain::guard::v1::RotateGuardSignerWalletRequest,
892 >::from_parts(&req, &body);
893 svc.rotate_guard_signer_wallet(ctx, req)
894 .await?
895 .encode::<
896 crate::proto::chain::guard::v1::RotateGuardSignerWalletResponse,
897 >(format)
898 })
899 }
900 "ExportGuardSignerWallet" => {
901 let svc = ::std::sync::Arc::clone(&self.inner);
902 Box::pin(async move {
903 let body = ::connectrpc::dispatcher::codegen::request_proto_bytes::<
904 crate::proto::chain::guard::v1::ExportGuardSignerWalletRequest,
905 >(request.encoded()?, format)?;
906 let req: crate::proto::chain::guard::v1::__buffa::view::ExportGuardSignerWalletRequestView<
907 '_,
908 > = ::connectrpc::dispatcher::codegen::decode_borrowed_request_view(
909 &body,
910 )?;
911 let req = ::connectrpc::ServiceRequest::<
912 crate::proto::chain::guard::v1::ExportGuardSignerWalletRequest,
913 >::from_parts(&req, &body);
914 svc.export_guard_signer_wallet(ctx, req)
915 .await?
916 .encode::<
917 crate::proto::chain::guard::v1::ExportGuardSignerWalletResponse,
918 >(format)
919 })
920 }
921 _ => ::connectrpc::dispatcher::codegen::unimplemented_unary(path),
922 }
923 }
924 fn call_server_streaming(
925 &self,
926 path: &str,
927 ctx: ::connectrpc::RequestContext,
928 request: ::buffa::bytes::Bytes,
929 format: ::connectrpc::CodecFormat,
930 ) -> ::connectrpc::dispatcher::codegen::StreamingResult {
931 let Some(method) = path.strip_prefix("chain.guard.v1.GuardSignerService/") else {
932 return ::connectrpc::dispatcher::codegen::unimplemented_streaming(path);
933 };
934 let _ = (&ctx, &request, &format);
935 match method {
936 _ => ::connectrpc::dispatcher::codegen::unimplemented_streaming(path),
937 }
938 }
939 fn call_client_streaming(
940 &self,
941 path: &str,
942 ctx: ::connectrpc::RequestContext,
943 requests: ::connectrpc::dispatcher::codegen::RequestStream,
944 format: ::connectrpc::CodecFormat,
945 ) -> ::connectrpc::dispatcher::codegen::UnaryResult {
946 let Some(method) = path.strip_prefix("chain.guard.v1.GuardSignerService/") else {
947 return ::connectrpc::dispatcher::codegen::unimplemented_unary(path);
948 };
949 let _ = (&ctx, &requests, &format);
950 match method {
951 _ => ::connectrpc::dispatcher::codegen::unimplemented_unary(path),
952 }
953 }
954 fn call_bidi_streaming(
955 &self,
956 path: &str,
957 ctx: ::connectrpc::RequestContext,
958 requests: ::connectrpc::dispatcher::codegen::RequestStream,
959 format: ::connectrpc::CodecFormat,
960 ) -> ::connectrpc::dispatcher::codegen::StreamingResult {
961 let Some(method) = path.strip_prefix("chain.guard.v1.GuardSignerService/") else {
962 return ::connectrpc::dispatcher::codegen::unimplemented_streaming(path);
963 };
964 let _ = (&ctx, &requests, &format);
965 match method {
966 _ => ::connectrpc::dispatcher::codegen::unimplemented_streaming(path),
967 }
968 }
969}
970#[derive(Clone)]
1002pub struct GuardSignerServiceClient<T> {
1003 transport: T,
1004 config: ::connectrpc::client::ClientConfig,
1005}
1006impl<T> GuardSignerServiceClient<T>
1007where
1008 T: ::connectrpc::client::ClientTransport,
1009 <T::ResponseBody as ::connectrpc::http_body::Body>::Error: ::std::fmt::Display,
1010{
1011 pub fn new(transport: T, config: ::connectrpc::client::ClientConfig) -> Self {
1013 Self { transport, config }
1014 }
1015 pub fn config(&self) -> &::connectrpc::client::ClientConfig {
1017 &self.config
1018 }
1019 pub fn config_mut(&mut self) -> &mut ::connectrpc::client::ClientConfig {
1021 &mut self.config
1022 }
1023 pub async fn create_guard_signer_wallet(
1025 &self,
1026 request: crate::proto::chain::guard::v1::CreateGuardSignerWalletRequest,
1027 ) -> Result<
1028 ::connectrpc::client::UnaryResponse<
1029 ::buffa::view::OwnedView<
1030 crate::proto::chain::guard::v1::__buffa::view::CreateGuardSignerWalletResponseView<
1031 'static,
1032 >,
1033 >,
1034 >,
1035 ::connectrpc::ConnectError,
1036 > {
1037 self.create_guard_signer_wallet_with_options(
1038 request,
1039 ::connectrpc::client::CallOptions::default(),
1040 )
1041 .await
1042 }
1043 pub async fn create_guard_signer_wallet_with_options(
1045 &self,
1046 request: crate::proto::chain::guard::v1::CreateGuardSignerWalletRequest,
1047 options: ::connectrpc::client::CallOptions,
1048 ) -> Result<
1049 ::connectrpc::client::UnaryResponse<
1050 ::buffa::view::OwnedView<
1051 crate::proto::chain::guard::v1::__buffa::view::CreateGuardSignerWalletResponseView<
1052 'static,
1053 >,
1054 >,
1055 >,
1056 ::connectrpc::ConnectError,
1057 > {
1058 ::connectrpc::client::call_unary(
1059 &self.transport,
1060 &self.config,
1061 GUARD_SIGNER_SERVICE_SERVICE_NAME,
1062 "CreateGuardSignerWallet",
1063 request,
1064 options,
1065 )
1066 .await
1067 }
1068 pub async fn get_guard_signer_status(
1070 &self,
1071 request: crate::proto::chain::guard::v1::GetGuardSignerStatusRequest,
1072 ) -> Result<
1073 ::connectrpc::client::UnaryResponse<
1074 ::buffa::view::OwnedView<
1075 crate::proto::chain::guard::v1::__buffa::view::GetGuardSignerStatusResponseView<
1076 'static,
1077 >,
1078 >,
1079 >,
1080 ::connectrpc::ConnectError,
1081 > {
1082 self.get_guard_signer_status_with_options(
1083 request,
1084 ::connectrpc::client::CallOptions::default(),
1085 )
1086 .await
1087 }
1088 pub async fn get_guard_signer_status_with_options(
1090 &self,
1091 request: crate::proto::chain::guard::v1::GetGuardSignerStatusRequest,
1092 options: ::connectrpc::client::CallOptions,
1093 ) -> Result<
1094 ::connectrpc::client::UnaryResponse<
1095 ::buffa::view::OwnedView<
1096 crate::proto::chain::guard::v1::__buffa::view::GetGuardSignerStatusResponseView<
1097 'static,
1098 >,
1099 >,
1100 >,
1101 ::connectrpc::ConnectError,
1102 > {
1103 ::connectrpc::client::call_unary(
1104 &self.transport,
1105 &self.config,
1106 GUARD_SIGNER_SERVICE_SERVICE_NAME,
1107 "GetGuardSignerStatus",
1108 request,
1109 options,
1110 )
1111 .await
1112 }
1113 pub async fn sign_protected_action(
1115 &self,
1116 request: crate::proto::chain::guard::v1::SignProtectedActionRequest,
1117 ) -> Result<
1118 ::connectrpc::client::UnaryResponse<
1119 ::buffa::view::OwnedView<
1120 crate::proto::chain::guard::v1::__buffa::view::SignProtectedActionResponseView<
1121 'static,
1122 >,
1123 >,
1124 >,
1125 ::connectrpc::ConnectError,
1126 > {
1127 self.sign_protected_action_with_options(
1128 request,
1129 ::connectrpc::client::CallOptions::default(),
1130 )
1131 .await
1132 }
1133 pub async fn sign_protected_action_with_options(
1135 &self,
1136 request: crate::proto::chain::guard::v1::SignProtectedActionRequest,
1137 options: ::connectrpc::client::CallOptions,
1138 ) -> Result<
1139 ::connectrpc::client::UnaryResponse<
1140 ::buffa::view::OwnedView<
1141 crate::proto::chain::guard::v1::__buffa::view::SignProtectedActionResponseView<
1142 'static,
1143 >,
1144 >,
1145 >,
1146 ::connectrpc::ConnectError,
1147 > {
1148 ::connectrpc::client::call_unary(
1149 &self.transport,
1150 &self.config,
1151 GUARD_SIGNER_SERVICE_SERVICE_NAME,
1152 "SignProtectedAction",
1153 request,
1154 options,
1155 )
1156 .await
1157 }
1158 pub async fn batch_sign_protected_actions(
1160 &self,
1161 request: crate::proto::chain::guard::v1::BatchSignProtectedActionsRequest,
1162 ) -> Result<
1163 ::connectrpc::client::UnaryResponse<
1164 ::buffa::view::OwnedView<
1165 crate::proto::chain::guard::v1::__buffa::view::BatchSignProtectedActionsResponseView<
1166 'static,
1167 >,
1168 >,
1169 >,
1170 ::connectrpc::ConnectError,
1171 > {
1172 self.batch_sign_protected_actions_with_options(
1173 request,
1174 ::connectrpc::client::CallOptions::default(),
1175 )
1176 .await
1177 }
1178 pub async fn batch_sign_protected_actions_with_options(
1180 &self,
1181 request: crate::proto::chain::guard::v1::BatchSignProtectedActionsRequest,
1182 options: ::connectrpc::client::CallOptions,
1183 ) -> Result<
1184 ::connectrpc::client::UnaryResponse<
1185 ::buffa::view::OwnedView<
1186 crate::proto::chain::guard::v1::__buffa::view::BatchSignProtectedActionsResponseView<
1187 'static,
1188 >,
1189 >,
1190 >,
1191 ::connectrpc::ConnectError,
1192 > {
1193 ::connectrpc::client::call_unary(
1194 &self.transport,
1195 &self.config,
1196 GUARD_SIGNER_SERVICE_SERVICE_NAME,
1197 "BatchSignProtectedActions",
1198 request,
1199 options,
1200 )
1201 .await
1202 }
1203 pub async fn rotate_guard_signer_wallet(
1205 &self,
1206 request: crate::proto::chain::guard::v1::RotateGuardSignerWalletRequest,
1207 ) -> Result<
1208 ::connectrpc::client::UnaryResponse<
1209 ::buffa::view::OwnedView<
1210 crate::proto::chain::guard::v1::__buffa::view::RotateGuardSignerWalletResponseView<
1211 'static,
1212 >,
1213 >,
1214 >,
1215 ::connectrpc::ConnectError,
1216 > {
1217 self.rotate_guard_signer_wallet_with_options(
1218 request,
1219 ::connectrpc::client::CallOptions::default(),
1220 )
1221 .await
1222 }
1223 pub async fn rotate_guard_signer_wallet_with_options(
1225 &self,
1226 request: crate::proto::chain::guard::v1::RotateGuardSignerWalletRequest,
1227 options: ::connectrpc::client::CallOptions,
1228 ) -> Result<
1229 ::connectrpc::client::UnaryResponse<
1230 ::buffa::view::OwnedView<
1231 crate::proto::chain::guard::v1::__buffa::view::RotateGuardSignerWalletResponseView<
1232 'static,
1233 >,
1234 >,
1235 >,
1236 ::connectrpc::ConnectError,
1237 > {
1238 ::connectrpc::client::call_unary(
1239 &self.transport,
1240 &self.config,
1241 GUARD_SIGNER_SERVICE_SERVICE_NAME,
1242 "RotateGuardSignerWallet",
1243 request,
1244 options,
1245 )
1246 .await
1247 }
1248 pub async fn export_guard_signer_wallet(
1250 &self,
1251 request: crate::proto::chain::guard::v1::ExportGuardSignerWalletRequest,
1252 ) -> Result<
1253 ::connectrpc::client::UnaryResponse<
1254 ::buffa::view::OwnedView<
1255 crate::proto::chain::guard::v1::__buffa::view::ExportGuardSignerWalletResponseView<
1256 'static,
1257 >,
1258 >,
1259 >,
1260 ::connectrpc::ConnectError,
1261 > {
1262 self.export_guard_signer_wallet_with_options(
1263 request,
1264 ::connectrpc::client::CallOptions::default(),
1265 )
1266 .await
1267 }
1268 pub async fn export_guard_signer_wallet_with_options(
1270 &self,
1271 request: crate::proto::chain::guard::v1::ExportGuardSignerWalletRequest,
1272 options: ::connectrpc::client::CallOptions,
1273 ) -> Result<
1274 ::connectrpc::client::UnaryResponse<
1275 ::buffa::view::OwnedView<
1276 crate::proto::chain::guard::v1::__buffa::view::ExportGuardSignerWalletResponseView<
1277 'static,
1278 >,
1279 >,
1280 >,
1281 ::connectrpc::ConnectError,
1282 > {
1283 ::connectrpc::client::call_unary(
1284 &self.transport,
1285 &self.config,
1286 GUARD_SIGNER_SERVICE_SERVICE_NAME,
1287 "ExportGuardSignerWallet",
1288 request,
1289 options,
1290 )
1291 .await
1292 }
1293}