pub type OwnedCreateGuardSignerWalletRequestView = ::buffa::view::OwnedView<
crate::proto::chain::guard::v1::__buffa::view::CreateGuardSignerWalletRequestView<
'static,
>,
>;
pub type OwnedCreateGuardSignerWalletResponseView = ::buffa::view::OwnedView<
crate::proto::chain::guard::v1::__buffa::view::CreateGuardSignerWalletResponseView<
'static,
>,
>;
pub type OwnedGetGuardSignerStatusRequestView = ::buffa::view::OwnedView<
crate::proto::chain::guard::v1::__buffa::view::GetGuardSignerStatusRequestView<
'static,
>,
>;
pub type OwnedGetGuardSignerStatusResponseView = ::buffa::view::OwnedView<
crate::proto::chain::guard::v1::__buffa::view::GetGuardSignerStatusResponseView<
'static,
>,
>;
pub type OwnedSignProtectedActionRequestView = ::buffa::view::OwnedView<
crate::proto::chain::guard::v1::__buffa::view::SignProtectedActionRequestView<
'static,
>,
>;
pub type OwnedSignProtectedActionResponseView = ::buffa::view::OwnedView<
crate::proto::chain::guard::v1::__buffa::view::SignProtectedActionResponseView<
'static,
>,
>;
pub type OwnedBatchSignProtectedActionsRequestView = ::buffa::view::OwnedView<
crate::proto::chain::guard::v1::__buffa::view::BatchSignProtectedActionsRequestView<
'static,
>,
>;
pub type OwnedBatchSignProtectedActionsResponseView = ::buffa::view::OwnedView<
crate::proto::chain::guard::v1::__buffa::view::BatchSignProtectedActionsResponseView<
'static,
>,
>;
pub type OwnedRotateGuardSignerWalletRequestView = ::buffa::view::OwnedView<
crate::proto::chain::guard::v1::__buffa::view::RotateGuardSignerWalletRequestView<
'static,
>,
>;
pub type OwnedRotateGuardSignerWalletResponseView = ::buffa::view::OwnedView<
crate::proto::chain::guard::v1::__buffa::view::RotateGuardSignerWalletResponseView<
'static,
>,
>;
pub type OwnedExportGuardSignerWalletRequestView = ::buffa::view::OwnedView<
crate::proto::chain::guard::v1::__buffa::view::ExportGuardSignerWalletRequestView<
'static,
>,
>;
pub type OwnedExportGuardSignerWalletResponseView = ::buffa::view::OwnedView<
crate::proto::chain::guard::v1::__buffa::view::ExportGuardSignerWalletResponseView<
'static,
>,
>;
impl ::connectrpc::Encodable<
crate::proto::chain::guard::v1::CreateGuardSignerWalletResponse,
>
for crate::proto::chain::guard::v1::__buffa::view::CreateGuardSignerWalletResponseView<
'_,
> {
fn encode(
&self,
codec: ::connectrpc::CodecFormat,
) -> ::std::result::Result<::buffa::bytes::Bytes, ::connectrpc::ConnectError> {
::connectrpc::__codegen::encode_view_body(self, codec)
}
}
impl ::connectrpc::Encodable<
crate::proto::chain::guard::v1::CreateGuardSignerWalletResponse,
>
for ::buffa::view::OwnedView<
crate::proto::chain::guard::v1::__buffa::view::CreateGuardSignerWalletResponseView<
'static,
>,
> {
fn encode(
&self,
codec: ::connectrpc::CodecFormat,
) -> ::std::result::Result<::buffa::bytes::Bytes, ::connectrpc::ConnectError> {
::connectrpc::__codegen::encode_view_body(self.reborrow(), codec)
}
}
impl ::connectrpc::Encodable<
crate::proto::chain::guard::v1::GetGuardSignerStatusResponse,
>
for crate::proto::chain::guard::v1::__buffa::view::GetGuardSignerStatusResponseView<'_> {
fn encode(
&self,
codec: ::connectrpc::CodecFormat,
) -> ::std::result::Result<::buffa::bytes::Bytes, ::connectrpc::ConnectError> {
::connectrpc::__codegen::encode_view_body(self, codec)
}
}
impl ::connectrpc::Encodable<
crate::proto::chain::guard::v1::GetGuardSignerStatusResponse,
>
for ::buffa::view::OwnedView<
crate::proto::chain::guard::v1::__buffa::view::GetGuardSignerStatusResponseView<
'static,
>,
> {
fn encode(
&self,
codec: ::connectrpc::CodecFormat,
) -> ::std::result::Result<::buffa::bytes::Bytes, ::connectrpc::ConnectError> {
::connectrpc::__codegen::encode_view_body(self.reborrow(), codec)
}
}
impl ::connectrpc::Encodable<crate::proto::chain::guard::v1::SignProtectedActionResponse>
for crate::proto::chain::guard::v1::__buffa::view::SignProtectedActionResponseView<'_> {
fn encode(
&self,
codec: ::connectrpc::CodecFormat,
) -> ::std::result::Result<::buffa::bytes::Bytes, ::connectrpc::ConnectError> {
::connectrpc::__codegen::encode_view_body(self, codec)
}
}
impl ::connectrpc::Encodable<crate::proto::chain::guard::v1::SignProtectedActionResponse>
for ::buffa::view::OwnedView<
crate::proto::chain::guard::v1::__buffa::view::SignProtectedActionResponseView<
'static,
>,
> {
fn encode(
&self,
codec: ::connectrpc::CodecFormat,
) -> ::std::result::Result<::buffa::bytes::Bytes, ::connectrpc::ConnectError> {
::connectrpc::__codegen::encode_view_body(self.reborrow(), codec)
}
}
impl ::connectrpc::Encodable<
crate::proto::chain::guard::v1::BatchSignProtectedActionsResponse,
>
for crate::proto::chain::guard::v1::__buffa::view::BatchSignProtectedActionsResponseView<
'_,
> {
fn encode(
&self,
codec: ::connectrpc::CodecFormat,
) -> ::std::result::Result<::buffa::bytes::Bytes, ::connectrpc::ConnectError> {
::connectrpc::__codegen::encode_view_body(self, codec)
}
}
impl ::connectrpc::Encodable<
crate::proto::chain::guard::v1::BatchSignProtectedActionsResponse,
>
for ::buffa::view::OwnedView<
crate::proto::chain::guard::v1::__buffa::view::BatchSignProtectedActionsResponseView<
'static,
>,
> {
fn encode(
&self,
codec: ::connectrpc::CodecFormat,
) -> ::std::result::Result<::buffa::bytes::Bytes, ::connectrpc::ConnectError> {
::connectrpc::__codegen::encode_view_body(self.reborrow(), codec)
}
}
impl ::connectrpc::Encodable<
crate::proto::chain::guard::v1::RotateGuardSignerWalletResponse,
>
for crate::proto::chain::guard::v1::__buffa::view::RotateGuardSignerWalletResponseView<
'_,
> {
fn encode(
&self,
codec: ::connectrpc::CodecFormat,
) -> ::std::result::Result<::buffa::bytes::Bytes, ::connectrpc::ConnectError> {
::connectrpc::__codegen::encode_view_body(self, codec)
}
}
impl ::connectrpc::Encodable<
crate::proto::chain::guard::v1::RotateGuardSignerWalletResponse,
>
for ::buffa::view::OwnedView<
crate::proto::chain::guard::v1::__buffa::view::RotateGuardSignerWalletResponseView<
'static,
>,
> {
fn encode(
&self,
codec: ::connectrpc::CodecFormat,
) -> ::std::result::Result<::buffa::bytes::Bytes, ::connectrpc::ConnectError> {
::connectrpc::__codegen::encode_view_body(self.reborrow(), codec)
}
}
impl ::connectrpc::Encodable<
crate::proto::chain::guard::v1::ExportGuardSignerWalletResponse,
>
for crate::proto::chain::guard::v1::__buffa::view::ExportGuardSignerWalletResponseView<
'_,
> {
fn encode(
&self,
codec: ::connectrpc::CodecFormat,
) -> ::std::result::Result<::buffa::bytes::Bytes, ::connectrpc::ConnectError> {
::connectrpc::__codegen::encode_view_body(self, codec)
}
}
impl ::connectrpc::Encodable<
crate::proto::chain::guard::v1::ExportGuardSignerWalletResponse,
>
for ::buffa::view::OwnedView<
crate::proto::chain::guard::v1::__buffa::view::ExportGuardSignerWalletResponseView<
'static,
>,
> {
fn encode(
&self,
codec: ::connectrpc::CodecFormat,
) -> ::std::result::Result<::buffa::bytes::Bytes, ::connectrpc::ConnectError> {
::connectrpc::__codegen::encode_view_body(self.reborrow(), codec)
}
}
pub const GUARD_SIGNER_SERVICE_SERVICE_NAME: &str = "chain.guard.v1.GuardSignerService";
pub const GUARD_SIGNER_SERVICE_CREATE_GUARD_SIGNER_WALLET_SPEC: ::connectrpc::Spec = ::connectrpc::Spec::server(
"/chain.guard.v1.GuardSignerService/CreateGuardSignerWallet",
::connectrpc::StreamType::Unary,
)
.with_idempotency_level(::connectrpc::IdempotencyLevel::Unknown);
pub const GUARD_SIGNER_SERVICE_GET_GUARD_SIGNER_STATUS_SPEC: ::connectrpc::Spec = ::connectrpc::Spec::server(
"/chain.guard.v1.GuardSignerService/GetGuardSignerStatus",
::connectrpc::StreamType::Unary,
)
.with_idempotency_level(::connectrpc::IdempotencyLevel::Unknown);
pub const GUARD_SIGNER_SERVICE_SIGN_PROTECTED_ACTION_SPEC: ::connectrpc::Spec = ::connectrpc::Spec::server(
"/chain.guard.v1.GuardSignerService/SignProtectedAction",
::connectrpc::StreamType::Unary,
)
.with_idempotency_level(::connectrpc::IdempotencyLevel::Unknown);
pub const GUARD_SIGNER_SERVICE_BATCH_SIGN_PROTECTED_ACTIONS_SPEC: ::connectrpc::Spec = ::connectrpc::Spec::server(
"/chain.guard.v1.GuardSignerService/BatchSignProtectedActions",
::connectrpc::StreamType::Unary,
)
.with_idempotency_level(::connectrpc::IdempotencyLevel::Unknown);
pub const GUARD_SIGNER_SERVICE_ROTATE_GUARD_SIGNER_WALLET_SPEC: ::connectrpc::Spec = ::connectrpc::Spec::server(
"/chain.guard.v1.GuardSignerService/RotateGuardSignerWallet",
::connectrpc::StreamType::Unary,
)
.with_idempotency_level(::connectrpc::IdempotencyLevel::Unknown);
pub const GUARD_SIGNER_SERVICE_EXPORT_GUARD_SIGNER_WALLET_SPEC: ::connectrpc::Spec = ::connectrpc::Spec::server(
"/chain.guard.v1.GuardSignerService/ExportGuardSignerWallet",
::connectrpc::StreamType::Unary,
)
.with_idempotency_level(::connectrpc::IdempotencyLevel::Unknown);
#[allow(clippy::type_complexity)]
pub trait GuardSignerService: Send + Sync + 'static {
fn create_guard_signer_wallet<'a>(
&'a self,
ctx: ::connectrpc::RequestContext,
request: ::connectrpc::ServiceRequest<
'_,
crate::proto::chain::guard::v1::CreateGuardSignerWalletRequest,
>,
) -> impl ::std::future::Future<
Output = ::connectrpc::ServiceResult<
impl ::connectrpc::Encodable<
crate::proto::chain::guard::v1::CreateGuardSignerWalletResponse,
> + Send + use<'a, Self>,
>,
> + Send;
fn get_guard_signer_status<'a>(
&'a self,
ctx: ::connectrpc::RequestContext,
request: ::connectrpc::ServiceRequest<
'_,
crate::proto::chain::guard::v1::GetGuardSignerStatusRequest,
>,
) -> impl ::std::future::Future<
Output = ::connectrpc::ServiceResult<
impl ::connectrpc::Encodable<
crate::proto::chain::guard::v1::GetGuardSignerStatusResponse,
> + Send + use<'a, Self>,
>,
> + Send;
fn sign_protected_action<'a>(
&'a self,
ctx: ::connectrpc::RequestContext,
request: ::connectrpc::ServiceRequest<
'_,
crate::proto::chain::guard::v1::SignProtectedActionRequest,
>,
) -> impl ::std::future::Future<
Output = ::connectrpc::ServiceResult<
impl ::connectrpc::Encodable<
crate::proto::chain::guard::v1::SignProtectedActionResponse,
> + Send + use<'a, Self>,
>,
> + Send;
fn batch_sign_protected_actions<'a>(
&'a self,
ctx: ::connectrpc::RequestContext,
request: ::connectrpc::ServiceRequest<
'_,
crate::proto::chain::guard::v1::BatchSignProtectedActionsRequest,
>,
) -> impl ::std::future::Future<
Output = ::connectrpc::ServiceResult<
impl ::connectrpc::Encodable<
crate::proto::chain::guard::v1::BatchSignProtectedActionsResponse,
> + Send + use<'a, Self>,
>,
> + Send;
fn rotate_guard_signer_wallet<'a>(
&'a self,
ctx: ::connectrpc::RequestContext,
request: ::connectrpc::ServiceRequest<
'_,
crate::proto::chain::guard::v1::RotateGuardSignerWalletRequest,
>,
) -> impl ::std::future::Future<
Output = ::connectrpc::ServiceResult<
impl ::connectrpc::Encodable<
crate::proto::chain::guard::v1::RotateGuardSignerWalletResponse,
> + Send + use<'a, Self>,
>,
> + Send;
fn export_guard_signer_wallet<'a>(
&'a self,
ctx: ::connectrpc::RequestContext,
request: ::connectrpc::ServiceRequest<
'_,
crate::proto::chain::guard::v1::ExportGuardSignerWalletRequest,
>,
) -> impl ::std::future::Future<
Output = ::connectrpc::ServiceResult<
impl ::connectrpc::Encodable<
crate::proto::chain::guard::v1::ExportGuardSignerWalletResponse,
> + Send + use<'a, Self>,
>,
> + Send;
}
pub trait GuardSignerServiceExt: GuardSignerService {
fn register(
self: ::std::sync::Arc<Self>,
router: ::connectrpc::Router,
) -> ::connectrpc::Router;
}
impl<S: GuardSignerService> GuardSignerServiceExt for S {
fn register(
self: ::std::sync::Arc<Self>,
router: ::connectrpc::Router,
) -> ::connectrpc::Router {
router
.route_view(
GUARD_SIGNER_SERVICE_SERVICE_NAME,
"CreateGuardSignerWallet",
{
let svc = ::std::sync::Arc::clone(&self);
::connectrpc::view_handler_fn(move |
ctx,
req: ::buffa::view::OwnedView<
crate::proto::chain::guard::v1::__buffa::view::CreateGuardSignerWalletRequestView<
'static,
>,
>,
format|
{
let svc = ::std::sync::Arc::clone(&svc);
async move {
let sreq = ::connectrpc::ServiceRequest::<
crate::proto::chain::guard::v1::CreateGuardSignerWalletRequest,
>::from_parts(req.reborrow(), req.bytes());
svc.create_guard_signer_wallet(ctx, sreq)
.await?
.encode::<
crate::proto::chain::guard::v1::CreateGuardSignerWalletResponse,
>(format)
}
})
},
)
.with_spec(GUARD_SIGNER_SERVICE_CREATE_GUARD_SIGNER_WALLET_SPEC)
.route_view(
GUARD_SIGNER_SERVICE_SERVICE_NAME,
"GetGuardSignerStatus",
{
let svc = ::std::sync::Arc::clone(&self);
::connectrpc::view_handler_fn(move |
ctx,
req: ::buffa::view::OwnedView<
crate::proto::chain::guard::v1::__buffa::view::GetGuardSignerStatusRequestView<
'static,
>,
>,
format|
{
let svc = ::std::sync::Arc::clone(&svc);
async move {
let sreq = ::connectrpc::ServiceRequest::<
crate::proto::chain::guard::v1::GetGuardSignerStatusRequest,
>::from_parts(req.reborrow(), req.bytes());
svc.get_guard_signer_status(ctx, sreq)
.await?
.encode::<
crate::proto::chain::guard::v1::GetGuardSignerStatusResponse,
>(format)
}
})
},
)
.with_spec(GUARD_SIGNER_SERVICE_GET_GUARD_SIGNER_STATUS_SPEC)
.route_view(
GUARD_SIGNER_SERVICE_SERVICE_NAME,
"SignProtectedAction",
{
let svc = ::std::sync::Arc::clone(&self);
::connectrpc::view_handler_fn(move |
ctx,
req: ::buffa::view::OwnedView<
crate::proto::chain::guard::v1::__buffa::view::SignProtectedActionRequestView<
'static,
>,
>,
format|
{
let svc = ::std::sync::Arc::clone(&svc);
async move {
let sreq = ::connectrpc::ServiceRequest::<
crate::proto::chain::guard::v1::SignProtectedActionRequest,
>::from_parts(req.reborrow(), req.bytes());
svc.sign_protected_action(ctx, sreq)
.await?
.encode::<
crate::proto::chain::guard::v1::SignProtectedActionResponse,
>(format)
}
})
},
)
.with_spec(GUARD_SIGNER_SERVICE_SIGN_PROTECTED_ACTION_SPEC)
.route_view(
GUARD_SIGNER_SERVICE_SERVICE_NAME,
"BatchSignProtectedActions",
{
let svc = ::std::sync::Arc::clone(&self);
::connectrpc::view_handler_fn(move |
ctx,
req: ::buffa::view::OwnedView<
crate::proto::chain::guard::v1::__buffa::view::BatchSignProtectedActionsRequestView<
'static,
>,
>,
format|
{
let svc = ::std::sync::Arc::clone(&svc);
async move {
let sreq = ::connectrpc::ServiceRequest::<
crate::proto::chain::guard::v1::BatchSignProtectedActionsRequest,
>::from_parts(req.reborrow(), req.bytes());
svc.batch_sign_protected_actions(ctx, sreq)
.await?
.encode::<
crate::proto::chain::guard::v1::BatchSignProtectedActionsResponse,
>(format)
}
})
},
)
.with_spec(GUARD_SIGNER_SERVICE_BATCH_SIGN_PROTECTED_ACTIONS_SPEC)
.route_view(
GUARD_SIGNER_SERVICE_SERVICE_NAME,
"RotateGuardSignerWallet",
{
let svc = ::std::sync::Arc::clone(&self);
::connectrpc::view_handler_fn(move |
ctx,
req: ::buffa::view::OwnedView<
crate::proto::chain::guard::v1::__buffa::view::RotateGuardSignerWalletRequestView<
'static,
>,
>,
format|
{
let svc = ::std::sync::Arc::clone(&svc);
async move {
let sreq = ::connectrpc::ServiceRequest::<
crate::proto::chain::guard::v1::RotateGuardSignerWalletRequest,
>::from_parts(req.reborrow(), req.bytes());
svc.rotate_guard_signer_wallet(ctx, sreq)
.await?
.encode::<
crate::proto::chain::guard::v1::RotateGuardSignerWalletResponse,
>(format)
}
})
},
)
.with_spec(GUARD_SIGNER_SERVICE_ROTATE_GUARD_SIGNER_WALLET_SPEC)
.route_view(
GUARD_SIGNER_SERVICE_SERVICE_NAME,
"ExportGuardSignerWallet",
{
let svc = ::std::sync::Arc::clone(&self);
::connectrpc::view_handler_fn(move |
ctx,
req: ::buffa::view::OwnedView<
crate::proto::chain::guard::v1::__buffa::view::ExportGuardSignerWalletRequestView<
'static,
>,
>,
format|
{
let svc = ::std::sync::Arc::clone(&svc);
async move {
let sreq = ::connectrpc::ServiceRequest::<
crate::proto::chain::guard::v1::ExportGuardSignerWalletRequest,
>::from_parts(req.reborrow(), req.bytes());
svc.export_guard_signer_wallet(ctx, sreq)
.await?
.encode::<
crate::proto::chain::guard::v1::ExportGuardSignerWalletResponse,
>(format)
}
})
},
)
.with_spec(GUARD_SIGNER_SERVICE_EXPORT_GUARD_SIGNER_WALLET_SPEC)
}
}
#[doc(hidden)]
pub struct GuardSignerServiceRegisterMarker;
impl<
S: GuardSignerService,
> ::connectrpc::ServiceRegister<GuardSignerServiceRegisterMarker>
for ::std::sync::Arc<S> {
fn register_service(self, router: ::connectrpc::Router) -> ::connectrpc::Router {
<S as GuardSignerServiceExt>::register(self, router)
}
}
pub struct GuardSignerServiceServer<T> {
inner: ::std::sync::Arc<T>,
}
impl<T: GuardSignerService> GuardSignerServiceServer<T> {
pub fn new(service: T) -> Self {
Self {
inner: ::std::sync::Arc::new(service),
}
}
pub fn from_arc(inner: ::std::sync::Arc<T>) -> Self {
Self { inner }
}
}
impl<T> Clone for GuardSignerServiceServer<T> {
fn clone(&self) -> Self {
Self {
inner: ::std::sync::Arc::clone(&self.inner),
}
}
}
impl<T: GuardSignerService> ::connectrpc::Dispatcher for GuardSignerServiceServer<T> {
#[inline]
fn lookup(
&self,
path: &str,
) -> Option<::connectrpc::dispatcher::codegen::MethodDescriptor> {
let method = path.strip_prefix("chain.guard.v1.GuardSignerService/")?;
match method {
"CreateGuardSignerWallet" => {
Some(
::connectrpc::dispatcher::codegen::MethodDescriptor::unary(false)
.with_spec(GUARD_SIGNER_SERVICE_CREATE_GUARD_SIGNER_WALLET_SPEC),
)
}
"GetGuardSignerStatus" => {
Some(
::connectrpc::dispatcher::codegen::MethodDescriptor::unary(false)
.with_spec(GUARD_SIGNER_SERVICE_GET_GUARD_SIGNER_STATUS_SPEC),
)
}
"SignProtectedAction" => {
Some(
::connectrpc::dispatcher::codegen::MethodDescriptor::unary(false)
.with_spec(GUARD_SIGNER_SERVICE_SIGN_PROTECTED_ACTION_SPEC),
)
}
"BatchSignProtectedActions" => {
Some(
::connectrpc::dispatcher::codegen::MethodDescriptor::unary(false)
.with_spec(
GUARD_SIGNER_SERVICE_BATCH_SIGN_PROTECTED_ACTIONS_SPEC,
),
)
}
"RotateGuardSignerWallet" => {
Some(
::connectrpc::dispatcher::codegen::MethodDescriptor::unary(false)
.with_spec(GUARD_SIGNER_SERVICE_ROTATE_GUARD_SIGNER_WALLET_SPEC),
)
}
"ExportGuardSignerWallet" => {
Some(
::connectrpc::dispatcher::codegen::MethodDescriptor::unary(false)
.with_spec(GUARD_SIGNER_SERVICE_EXPORT_GUARD_SIGNER_WALLET_SPEC),
)
}
_ => None,
}
}
fn call_unary(
&self,
path: &str,
ctx: ::connectrpc::RequestContext,
request: ::connectrpc::Payload,
format: ::connectrpc::CodecFormat,
) -> ::connectrpc::dispatcher::codegen::UnaryResult {
let Some(method) = path.strip_prefix("chain.guard.v1.GuardSignerService/") else {
return ::connectrpc::dispatcher::codegen::unimplemented_unary(path);
};
let _ = (&ctx, &request, &format);
match method {
"CreateGuardSignerWallet" => {
let svc = ::std::sync::Arc::clone(&self.inner);
Box::pin(async move {
let body = ::connectrpc::dispatcher::codegen::request_proto_bytes::<
crate::proto::chain::guard::v1::CreateGuardSignerWalletRequest,
>(request.encoded()?, format)?;
let req: crate::proto::chain::guard::v1::__buffa::view::CreateGuardSignerWalletRequestView<
'_,
> = ::connectrpc::dispatcher::codegen::decode_borrowed_request_view(
&body,
)?;
let req = ::connectrpc::ServiceRequest::<
crate::proto::chain::guard::v1::CreateGuardSignerWalletRequest,
>::from_parts(&req, &body);
svc.create_guard_signer_wallet(ctx, req)
.await?
.encode::<
crate::proto::chain::guard::v1::CreateGuardSignerWalletResponse,
>(format)
})
}
"GetGuardSignerStatus" => {
let svc = ::std::sync::Arc::clone(&self.inner);
Box::pin(async move {
let body = ::connectrpc::dispatcher::codegen::request_proto_bytes::<
crate::proto::chain::guard::v1::GetGuardSignerStatusRequest,
>(request.encoded()?, format)?;
let req: crate::proto::chain::guard::v1::__buffa::view::GetGuardSignerStatusRequestView<
'_,
> = ::connectrpc::dispatcher::codegen::decode_borrowed_request_view(
&body,
)?;
let req = ::connectrpc::ServiceRequest::<
crate::proto::chain::guard::v1::GetGuardSignerStatusRequest,
>::from_parts(&req, &body);
svc.get_guard_signer_status(ctx, req)
.await?
.encode::<
crate::proto::chain::guard::v1::GetGuardSignerStatusResponse,
>(format)
})
}
"SignProtectedAction" => {
let svc = ::std::sync::Arc::clone(&self.inner);
Box::pin(async move {
let body = ::connectrpc::dispatcher::codegen::request_proto_bytes::<
crate::proto::chain::guard::v1::SignProtectedActionRequest,
>(request.encoded()?, format)?;
let req: crate::proto::chain::guard::v1::__buffa::view::SignProtectedActionRequestView<
'_,
> = ::connectrpc::dispatcher::codegen::decode_borrowed_request_view(
&body,
)?;
let req = ::connectrpc::ServiceRequest::<
crate::proto::chain::guard::v1::SignProtectedActionRequest,
>::from_parts(&req, &body);
svc.sign_protected_action(ctx, req)
.await?
.encode::<
crate::proto::chain::guard::v1::SignProtectedActionResponse,
>(format)
})
}
"BatchSignProtectedActions" => {
let svc = ::std::sync::Arc::clone(&self.inner);
Box::pin(async move {
let body = ::connectrpc::dispatcher::codegen::request_proto_bytes::<
crate::proto::chain::guard::v1::BatchSignProtectedActionsRequest,
>(request.encoded()?, format)?;
let req: crate::proto::chain::guard::v1::__buffa::view::BatchSignProtectedActionsRequestView<
'_,
> = ::connectrpc::dispatcher::codegen::decode_borrowed_request_view(
&body,
)?;
let req = ::connectrpc::ServiceRequest::<
crate::proto::chain::guard::v1::BatchSignProtectedActionsRequest,
>::from_parts(&req, &body);
svc.batch_sign_protected_actions(ctx, req)
.await?
.encode::<
crate::proto::chain::guard::v1::BatchSignProtectedActionsResponse,
>(format)
})
}
"RotateGuardSignerWallet" => {
let svc = ::std::sync::Arc::clone(&self.inner);
Box::pin(async move {
let body = ::connectrpc::dispatcher::codegen::request_proto_bytes::<
crate::proto::chain::guard::v1::RotateGuardSignerWalletRequest,
>(request.encoded()?, format)?;
let req: crate::proto::chain::guard::v1::__buffa::view::RotateGuardSignerWalletRequestView<
'_,
> = ::connectrpc::dispatcher::codegen::decode_borrowed_request_view(
&body,
)?;
let req = ::connectrpc::ServiceRequest::<
crate::proto::chain::guard::v1::RotateGuardSignerWalletRequest,
>::from_parts(&req, &body);
svc.rotate_guard_signer_wallet(ctx, req)
.await?
.encode::<
crate::proto::chain::guard::v1::RotateGuardSignerWalletResponse,
>(format)
})
}
"ExportGuardSignerWallet" => {
let svc = ::std::sync::Arc::clone(&self.inner);
Box::pin(async move {
let body = ::connectrpc::dispatcher::codegen::request_proto_bytes::<
crate::proto::chain::guard::v1::ExportGuardSignerWalletRequest,
>(request.encoded()?, format)?;
let req: crate::proto::chain::guard::v1::__buffa::view::ExportGuardSignerWalletRequestView<
'_,
> = ::connectrpc::dispatcher::codegen::decode_borrowed_request_view(
&body,
)?;
let req = ::connectrpc::ServiceRequest::<
crate::proto::chain::guard::v1::ExportGuardSignerWalletRequest,
>::from_parts(&req, &body);
svc.export_guard_signer_wallet(ctx, req)
.await?
.encode::<
crate::proto::chain::guard::v1::ExportGuardSignerWalletResponse,
>(format)
})
}
_ => ::connectrpc::dispatcher::codegen::unimplemented_unary(path),
}
}
fn call_server_streaming(
&self,
path: &str,
ctx: ::connectrpc::RequestContext,
request: ::buffa::bytes::Bytes,
format: ::connectrpc::CodecFormat,
) -> ::connectrpc::dispatcher::codegen::StreamingResult {
let Some(method) = path.strip_prefix("chain.guard.v1.GuardSignerService/") else {
return ::connectrpc::dispatcher::codegen::unimplemented_streaming(path);
};
let _ = (&ctx, &request, &format);
match method {
_ => ::connectrpc::dispatcher::codegen::unimplemented_streaming(path),
}
}
fn call_client_streaming(
&self,
path: &str,
ctx: ::connectrpc::RequestContext,
requests: ::connectrpc::dispatcher::codegen::RequestStream,
format: ::connectrpc::CodecFormat,
) -> ::connectrpc::dispatcher::codegen::UnaryResult {
let Some(method) = path.strip_prefix("chain.guard.v1.GuardSignerService/") else {
return ::connectrpc::dispatcher::codegen::unimplemented_unary(path);
};
let _ = (&ctx, &requests, &format);
match method {
_ => ::connectrpc::dispatcher::codegen::unimplemented_unary(path),
}
}
fn call_bidi_streaming(
&self,
path: &str,
ctx: ::connectrpc::RequestContext,
requests: ::connectrpc::dispatcher::codegen::RequestStream,
format: ::connectrpc::CodecFormat,
) -> ::connectrpc::dispatcher::codegen::StreamingResult {
let Some(method) = path.strip_prefix("chain.guard.v1.GuardSignerService/") else {
return ::connectrpc::dispatcher::codegen::unimplemented_streaming(path);
};
let _ = (&ctx, &requests, &format);
match method {
_ => ::connectrpc::dispatcher::codegen::unimplemented_streaming(path),
}
}
}
#[derive(Clone)]
pub struct GuardSignerServiceClient<T> {
transport: T,
config: ::connectrpc::client::ClientConfig,
}
impl<T> GuardSignerServiceClient<T>
where
T: ::connectrpc::client::ClientTransport,
<T::ResponseBody as ::connectrpc::http_body::Body>::Error: ::std::fmt::Display,
{
pub fn new(transport: T, config: ::connectrpc::client::ClientConfig) -> Self {
Self { transport, config }
}
pub fn config(&self) -> &::connectrpc::client::ClientConfig {
&self.config
}
pub fn config_mut(&mut self) -> &mut ::connectrpc::client::ClientConfig {
&mut self.config
}
pub async fn create_guard_signer_wallet(
&self,
request: crate::proto::chain::guard::v1::CreateGuardSignerWalletRequest,
) -> Result<
::connectrpc::client::UnaryResponse<
::buffa::view::OwnedView<
crate::proto::chain::guard::v1::__buffa::view::CreateGuardSignerWalletResponseView<
'static,
>,
>,
>,
::connectrpc::ConnectError,
> {
self.create_guard_signer_wallet_with_options(
request,
::connectrpc::client::CallOptions::default(),
)
.await
}
pub async fn create_guard_signer_wallet_with_options(
&self,
request: crate::proto::chain::guard::v1::CreateGuardSignerWalletRequest,
options: ::connectrpc::client::CallOptions,
) -> Result<
::connectrpc::client::UnaryResponse<
::buffa::view::OwnedView<
crate::proto::chain::guard::v1::__buffa::view::CreateGuardSignerWalletResponseView<
'static,
>,
>,
>,
::connectrpc::ConnectError,
> {
::connectrpc::client::call_unary(
&self.transport,
&self.config,
GUARD_SIGNER_SERVICE_SERVICE_NAME,
"CreateGuardSignerWallet",
request,
options,
)
.await
}
pub async fn get_guard_signer_status(
&self,
request: crate::proto::chain::guard::v1::GetGuardSignerStatusRequest,
) -> Result<
::connectrpc::client::UnaryResponse<
::buffa::view::OwnedView<
crate::proto::chain::guard::v1::__buffa::view::GetGuardSignerStatusResponseView<
'static,
>,
>,
>,
::connectrpc::ConnectError,
> {
self.get_guard_signer_status_with_options(
request,
::connectrpc::client::CallOptions::default(),
)
.await
}
pub async fn get_guard_signer_status_with_options(
&self,
request: crate::proto::chain::guard::v1::GetGuardSignerStatusRequest,
options: ::connectrpc::client::CallOptions,
) -> Result<
::connectrpc::client::UnaryResponse<
::buffa::view::OwnedView<
crate::proto::chain::guard::v1::__buffa::view::GetGuardSignerStatusResponseView<
'static,
>,
>,
>,
::connectrpc::ConnectError,
> {
::connectrpc::client::call_unary(
&self.transport,
&self.config,
GUARD_SIGNER_SERVICE_SERVICE_NAME,
"GetGuardSignerStatus",
request,
options,
)
.await
}
pub async fn sign_protected_action(
&self,
request: crate::proto::chain::guard::v1::SignProtectedActionRequest,
) -> Result<
::connectrpc::client::UnaryResponse<
::buffa::view::OwnedView<
crate::proto::chain::guard::v1::__buffa::view::SignProtectedActionResponseView<
'static,
>,
>,
>,
::connectrpc::ConnectError,
> {
self.sign_protected_action_with_options(
request,
::connectrpc::client::CallOptions::default(),
)
.await
}
pub async fn sign_protected_action_with_options(
&self,
request: crate::proto::chain::guard::v1::SignProtectedActionRequest,
options: ::connectrpc::client::CallOptions,
) -> Result<
::connectrpc::client::UnaryResponse<
::buffa::view::OwnedView<
crate::proto::chain::guard::v1::__buffa::view::SignProtectedActionResponseView<
'static,
>,
>,
>,
::connectrpc::ConnectError,
> {
::connectrpc::client::call_unary(
&self.transport,
&self.config,
GUARD_SIGNER_SERVICE_SERVICE_NAME,
"SignProtectedAction",
request,
options,
)
.await
}
pub async fn batch_sign_protected_actions(
&self,
request: crate::proto::chain::guard::v1::BatchSignProtectedActionsRequest,
) -> Result<
::connectrpc::client::UnaryResponse<
::buffa::view::OwnedView<
crate::proto::chain::guard::v1::__buffa::view::BatchSignProtectedActionsResponseView<
'static,
>,
>,
>,
::connectrpc::ConnectError,
> {
self.batch_sign_protected_actions_with_options(
request,
::connectrpc::client::CallOptions::default(),
)
.await
}
pub async fn batch_sign_protected_actions_with_options(
&self,
request: crate::proto::chain::guard::v1::BatchSignProtectedActionsRequest,
options: ::connectrpc::client::CallOptions,
) -> Result<
::connectrpc::client::UnaryResponse<
::buffa::view::OwnedView<
crate::proto::chain::guard::v1::__buffa::view::BatchSignProtectedActionsResponseView<
'static,
>,
>,
>,
::connectrpc::ConnectError,
> {
::connectrpc::client::call_unary(
&self.transport,
&self.config,
GUARD_SIGNER_SERVICE_SERVICE_NAME,
"BatchSignProtectedActions",
request,
options,
)
.await
}
pub async fn rotate_guard_signer_wallet(
&self,
request: crate::proto::chain::guard::v1::RotateGuardSignerWalletRequest,
) -> Result<
::connectrpc::client::UnaryResponse<
::buffa::view::OwnedView<
crate::proto::chain::guard::v1::__buffa::view::RotateGuardSignerWalletResponseView<
'static,
>,
>,
>,
::connectrpc::ConnectError,
> {
self.rotate_guard_signer_wallet_with_options(
request,
::connectrpc::client::CallOptions::default(),
)
.await
}
pub async fn rotate_guard_signer_wallet_with_options(
&self,
request: crate::proto::chain::guard::v1::RotateGuardSignerWalletRequest,
options: ::connectrpc::client::CallOptions,
) -> Result<
::connectrpc::client::UnaryResponse<
::buffa::view::OwnedView<
crate::proto::chain::guard::v1::__buffa::view::RotateGuardSignerWalletResponseView<
'static,
>,
>,
>,
::connectrpc::ConnectError,
> {
::connectrpc::client::call_unary(
&self.transport,
&self.config,
GUARD_SIGNER_SERVICE_SERVICE_NAME,
"RotateGuardSignerWallet",
request,
options,
)
.await
}
pub async fn export_guard_signer_wallet(
&self,
request: crate::proto::chain::guard::v1::ExportGuardSignerWalletRequest,
) -> Result<
::connectrpc::client::UnaryResponse<
::buffa::view::OwnedView<
crate::proto::chain::guard::v1::__buffa::view::ExportGuardSignerWalletResponseView<
'static,
>,
>,
>,
::connectrpc::ConnectError,
> {
self.export_guard_signer_wallet_with_options(
request,
::connectrpc::client::CallOptions::default(),
)
.await
}
pub async fn export_guard_signer_wallet_with_options(
&self,
request: crate::proto::chain::guard::v1::ExportGuardSignerWalletRequest,
options: ::connectrpc::client::CallOptions,
) -> Result<
::connectrpc::client::UnaryResponse<
::buffa::view::OwnedView<
crate::proto::chain::guard::v1::__buffa::view::ExportGuardSignerWalletResponseView<
'static,
>,
>,
>,
::connectrpc::ConnectError,
> {
::connectrpc::client::call_unary(
&self.transport,
&self.config,
GUARD_SIGNER_SERVICE_SERVICE_NAME,
"ExportGuardSignerWallet",
request,
options,
)
.await
}
}