layer_climb_core/signing/
middleware.rs1pub mod logger;
2
3use crate::{prelude::*, querier::tx::AnyTxResponse};
4use logger::{SigningLoggerMiddlewareMapBody, SigningLoggerMiddlewareMapResp};
5
6pub enum SigningMiddlewareMapBody {
7 Logger(SigningLoggerMiddlewareMapBody),
8}
9
10impl SigningMiddlewareMapBody {
11 pub async fn map_body(
12 &self,
13 req: layer_climb_proto::tx::TxBody,
14 ) -> Result<layer_climb_proto::tx::TxBody> {
15 match self {
16 Self::Logger(m) => m.map_body(req).await,
17 }
18 }
19 pub fn default_list() -> Vec<Self> {
20 vec![
21 ]
23 }
24}
25
26pub enum SigningMiddlewareMapResp {
27 Logger(SigningLoggerMiddlewareMapResp),
28}
29
30impl SigningMiddlewareMapResp {
31 pub async fn map_resp(&self, resp: AnyTxResponse) -> Result<AnyTxResponse> {
32 match self {
33 Self::Logger(m) => m.map_resp(resp).await,
34 }
35 }
36 pub fn default_list() -> Vec<Self> {
37 vec![
38 ]
40 }
41}