Skip to main content

dydx_proto/opt/rustwide/workdir/src/
dydxprotocol.accountplus.rs

1// This file is @generated by prost-build.
2/// Account State
3#[derive(Clone, PartialEq, ::prost::Message)]
4pub struct AccountState {
5    #[prost(string, tag = "1")]
6    pub address: ::prost::alloc::string::String,
7    #[prost(message, optional, tag = "2")]
8    pub timestamp_nonce_details: ::core::option::Option<TimestampNonceDetails>,
9}
10impl ::prost::Name for AccountState {
11    const NAME: &'static str = "AccountState";
12    const PACKAGE: &'static str = "dydxprotocol.accountplus";
13    fn full_name() -> ::prost::alloc::string::String {
14        "dydxprotocol.accountplus.AccountState".into()
15    }
16    fn type_url() -> ::prost::alloc::string::String {
17        "/dydxprotocol.accountplus.AccountState".into()
18    }
19}
20/// Timestamp nonce details
21#[derive(Clone, PartialEq, ::prost::Message)]
22pub struct TimestampNonceDetails {
23    /// unsorted list of n most recent timestamp nonces
24    #[prost(uint64, repeated, tag = "1")]
25    pub timestamp_nonces: ::prost::alloc::vec::Vec<u64>,
26    /// max timestamp nonce that was ejected from list above
27    #[prost(uint64, tag = "2")]
28    pub max_ejected_nonce: u64,
29}
30impl ::prost::Name for TimestampNonceDetails {
31    const NAME: &'static str = "TimestampNonceDetails";
32    const PACKAGE: &'static str = "dydxprotocol.accountplus";
33    fn full_name() -> ::prost::alloc::string::String {
34        "dydxprotocol.accountplus.TimestampNonceDetails".into()
35    }
36    fn type_url() -> ::prost::alloc::string::String {
37        "/dydxprotocol.accountplus.TimestampNonceDetails".into()
38    }
39}
40/// AccountAuthenticator represents a foundational model for all authenticators.
41/// It provides extensibility by allowing concrete types to interpret and
42/// validate transactions based on the encapsulated data.
43#[derive(Clone, PartialEq, ::prost::Message)]
44pub struct AccountAuthenticator {
45    /// ID uniquely identifies the authenticator instance.
46    #[prost(uint64, tag = "1")]
47    pub id: u64,
48    /// Type specifies the category of the AccountAuthenticator.
49    /// This type information is essential for differentiating authenticators
50    /// and ensuring precise data retrieval from the storage layer.
51    #[prost(string, tag = "2")]
52    pub r#type: ::prost::alloc::string::String,
53    /// Config is a versatile field used in conjunction with the specific type of
54    /// account authenticator to facilitate complex authentication processes.
55    /// The interpretation of this field is overloaded, enabling multiple
56    /// authenticators to utilize it for their respective purposes.
57    #[prost(bytes = "vec", tag = "3")]
58    pub config: ::prost::alloc::vec::Vec<u8>,
59}
60impl ::prost::Name for AccountAuthenticator {
61    const NAME: &'static str = "AccountAuthenticator";
62    const PACKAGE: &'static str = "dydxprotocol.accountplus";
63    fn full_name() -> ::prost::alloc::string::String {
64        "dydxprotocol.accountplus.AccountAuthenticator".into()
65    }
66    fn type_url() -> ::prost::alloc::string::String {
67        "/dydxprotocol.accountplus.AccountAuthenticator".into()
68    }
69}
70/// Params defines the parameters for the module.
71#[derive(Clone, Copy, PartialEq, ::prost::Message)]
72pub struct Params {
73    /// IsSmartAccountActive defines the state of the authenticator.
74    /// If set to false, the authenticator module will not be used
75    /// and the classic cosmos sdk authentication will be used instead.
76    #[prost(bool, tag = "1")]
77    pub is_smart_account_active: bool,
78}
79impl ::prost::Name for Params {
80    const NAME: &'static str = "Params";
81    const PACKAGE: &'static str = "dydxprotocol.accountplus";
82    fn full_name() -> ::prost::alloc::string::String {
83        "dydxprotocol.accountplus.Params".into()
84    }
85    fn type_url() -> ::prost::alloc::string::String {
86        "/dydxprotocol.accountplus.Params".into()
87    }
88}
89/// AuthenticatorData represents a genesis exported account with Authenticators.
90/// The address is used as the key, and the account authenticators are stored in
91/// the authenticators field.
92#[derive(Clone, PartialEq, ::prost::Message)]
93pub struct AuthenticatorData {
94    /// address is an account address, one address can have many authenticators
95    #[prost(string, tag = "1")]
96    pub address: ::prost::alloc::string::String,
97    /// authenticators are the account's authenticators, these can be multiple
98    /// types including SignatureVerification, AllOfs, CosmWasmAuthenticators, etc
99    #[prost(message, repeated, tag = "2")]
100    pub authenticators: ::prost::alloc::vec::Vec<AccountAuthenticator>,
101}
102impl ::prost::Name for AuthenticatorData {
103    const NAME: &'static str = "AuthenticatorData";
104    const PACKAGE: &'static str = "dydxprotocol.accountplus";
105    fn full_name() -> ::prost::alloc::string::String {
106        "dydxprotocol.accountplus.AuthenticatorData".into()
107    }
108    fn type_url() -> ::prost::alloc::string::String {
109        "/dydxprotocol.accountplus.AuthenticatorData".into()
110    }
111}
112/// Module genesis state
113#[derive(Clone, PartialEq, ::prost::Message)]
114pub struct GenesisState {
115    #[prost(message, repeated, tag = "1")]
116    pub accounts: ::prost::alloc::vec::Vec<AccountState>,
117    /// params define the parameters for the authenticator module.
118    #[prost(message, optional, tag = "2")]
119    pub params: ::core::option::Option<Params>,
120    /// next_authenticator_id is the next available authenticator ID.
121    #[prost(uint64, tag = "3")]
122    pub next_authenticator_id: u64,
123    /// authenticator_data contains the data for multiple accounts, each with their
124    /// authenticators.
125    #[prost(message, repeated, tag = "4")]
126    pub authenticator_data: ::prost::alloc::vec::Vec<AuthenticatorData>,
127}
128impl ::prost::Name for GenesisState {
129    const NAME: &'static str = "GenesisState";
130    const PACKAGE: &'static str = "dydxprotocol.accountplus";
131    fn full_name() -> ::prost::alloc::string::String {
132        "dydxprotocol.accountplus.GenesisState".into()
133    }
134    fn type_url() -> ::prost::alloc::string::String {
135        "/dydxprotocol.accountplus.GenesisState".into()
136    }
137}
138/// AccountStateRequest is request type for the Query/AccountState RPC method.
139#[derive(Clone, PartialEq, ::prost::Message)]
140pub struct AccountStateRequest {
141    #[prost(string, tag = "1")]
142    pub address: ::prost::alloc::string::String,
143}
144impl ::prost::Name for AccountStateRequest {
145    const NAME: &'static str = "AccountStateRequest";
146    const PACKAGE: &'static str = "dydxprotocol.accountplus";
147    fn full_name() -> ::prost::alloc::string::String {
148        "dydxprotocol.accountplus.AccountStateRequest".into()
149    }
150    fn type_url() -> ::prost::alloc::string::String {
151        "/dydxprotocol.accountplus.AccountStateRequest".into()
152    }
153}
154/// AccountStateResponse is response type for the Query/GetAccountState RPC
155/// method.
156#[derive(Clone, PartialEq, ::prost::Message)]
157pub struct AccountStateResponse {
158    #[prost(message, optional, tag = "1")]
159    pub account_state: ::core::option::Option<AccountState>,
160}
161impl ::prost::Name for AccountStateResponse {
162    const NAME: &'static str = "AccountStateResponse";
163    const PACKAGE: &'static str = "dydxprotocol.accountplus";
164    fn full_name() -> ::prost::alloc::string::String {
165        "dydxprotocol.accountplus.AccountStateResponse".into()
166    }
167    fn type_url() -> ::prost::alloc::string::String {
168        "/dydxprotocol.accountplus.AccountStateResponse".into()
169    }
170}
171/// QueryParamsRequest is request type for the Query/Params RPC method.
172#[derive(Clone, Copy, PartialEq, ::prost::Message)]
173pub struct QueryParamsRequest {}
174impl ::prost::Name for QueryParamsRequest {
175    const NAME: &'static str = "QueryParamsRequest";
176    const PACKAGE: &'static str = "dydxprotocol.accountplus";
177    fn full_name() -> ::prost::alloc::string::String {
178        "dydxprotocol.accountplus.QueryParamsRequest".into()
179    }
180    fn type_url() -> ::prost::alloc::string::String {
181        "/dydxprotocol.accountplus.QueryParamsRequest".into()
182    }
183}
184/// QueryParamsResponse is response type for the Query/Params RPC method.
185#[derive(Clone, Copy, PartialEq, ::prost::Message)]
186pub struct QueryParamsResponse {
187    /// params holds all the parameters of this module.
188    #[prost(message, optional, tag = "1")]
189    pub params: ::core::option::Option<Params>,
190}
191impl ::prost::Name for QueryParamsResponse {
192    const NAME: &'static str = "QueryParamsResponse";
193    const PACKAGE: &'static str = "dydxprotocol.accountplus";
194    fn full_name() -> ::prost::alloc::string::String {
195        "dydxprotocol.accountplus.QueryParamsResponse".into()
196    }
197    fn type_url() -> ::prost::alloc::string::String {
198        "/dydxprotocol.accountplus.QueryParamsResponse".into()
199    }
200}
201/// MsgGetAuthenticatorsRequest defines the Msg/GetAuthenticators request type.
202#[derive(Clone, PartialEq, ::prost::Message)]
203pub struct GetAuthenticatorsRequest {
204    #[prost(string, tag = "1")]
205    pub account: ::prost::alloc::string::String,
206}
207impl ::prost::Name for GetAuthenticatorsRequest {
208    const NAME: &'static str = "GetAuthenticatorsRequest";
209    const PACKAGE: &'static str = "dydxprotocol.accountplus";
210    fn full_name() -> ::prost::alloc::string::String {
211        "dydxprotocol.accountplus.GetAuthenticatorsRequest".into()
212    }
213    fn type_url() -> ::prost::alloc::string::String {
214        "/dydxprotocol.accountplus.GetAuthenticatorsRequest".into()
215    }
216}
217/// MsgGetAuthenticatorsResponse defines the Msg/GetAuthenticators response type.
218#[derive(Clone, PartialEq, ::prost::Message)]
219pub struct GetAuthenticatorsResponse {
220    #[prost(message, repeated, tag = "1")]
221    pub account_authenticators: ::prost::alloc::vec::Vec<AccountAuthenticator>,
222}
223impl ::prost::Name for GetAuthenticatorsResponse {
224    const NAME: &'static str = "GetAuthenticatorsResponse";
225    const PACKAGE: &'static str = "dydxprotocol.accountplus";
226    fn full_name() -> ::prost::alloc::string::String {
227        "dydxprotocol.accountplus.GetAuthenticatorsResponse".into()
228    }
229    fn type_url() -> ::prost::alloc::string::String {
230        "/dydxprotocol.accountplus.GetAuthenticatorsResponse".into()
231    }
232}
233/// MsgGetAuthenticatorRequest defines the Msg/GetAuthenticator request type.
234#[derive(Clone, PartialEq, ::prost::Message)]
235pub struct GetAuthenticatorRequest {
236    #[prost(string, tag = "1")]
237    pub account: ::prost::alloc::string::String,
238    #[prost(uint64, tag = "2")]
239    pub authenticator_id: u64,
240}
241impl ::prost::Name for GetAuthenticatorRequest {
242    const NAME: &'static str = "GetAuthenticatorRequest";
243    const PACKAGE: &'static str = "dydxprotocol.accountplus";
244    fn full_name() -> ::prost::alloc::string::String {
245        "dydxprotocol.accountplus.GetAuthenticatorRequest".into()
246    }
247    fn type_url() -> ::prost::alloc::string::String {
248        "/dydxprotocol.accountplus.GetAuthenticatorRequest".into()
249    }
250}
251/// MsgGetAuthenticatorResponse defines the Msg/GetAuthenticator response type.
252#[derive(Clone, PartialEq, ::prost::Message)]
253pub struct GetAuthenticatorResponse {
254    #[prost(message, optional, tag = "1")]
255    pub account_authenticator: ::core::option::Option<AccountAuthenticator>,
256}
257impl ::prost::Name for GetAuthenticatorResponse {
258    const NAME: &'static str = "GetAuthenticatorResponse";
259    const PACKAGE: &'static str = "dydxprotocol.accountplus";
260    fn full_name() -> ::prost::alloc::string::String {
261        "dydxprotocol.accountplus.GetAuthenticatorResponse".into()
262    }
263    fn type_url() -> ::prost::alloc::string::String {
264        "/dydxprotocol.accountplus.GetAuthenticatorResponse".into()
265    }
266}
267/// Generated client implementations.
268pub mod query_client {
269    #![allow(
270        unused_variables,
271        dead_code,
272        missing_docs,
273        clippy::wildcard_imports,
274        clippy::let_unit_value,
275    )]
276    use tonic::codegen::*;
277    use tonic::codegen::http::Uri;
278    /// Query defines the gRPC querier service.
279    #[derive(Debug, Clone)]
280    pub struct QueryClient<T> {
281        inner: tonic::client::Grpc<T>,
282    }
283    #[cfg(feature = "grpc-transport")]
284    impl QueryClient<tonic::transport::Channel> {
285        /// Attempt to create a new client by connecting to a given endpoint.
286        pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
287        where
288            D: TryInto<tonic::transport::Endpoint>,
289            D::Error: Into<StdError>,
290        {
291            let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
292            Ok(Self::new(conn))
293        }
294    }
295    impl<T> QueryClient<T>
296    where
297        T: tonic::client::GrpcService<tonic::body::Body>,
298        T::Error: Into<StdError>,
299        T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static,
300        <T::ResponseBody as Body>::Error: Into<StdError> + std::marker::Send,
301    {
302        pub fn new(inner: T) -> Self {
303            let inner = tonic::client::Grpc::new(inner);
304            Self { inner }
305        }
306        pub fn with_origin(inner: T, origin: Uri) -> Self {
307            let inner = tonic::client::Grpc::with_origin(inner, origin);
308            Self { inner }
309        }
310        pub fn with_interceptor<F>(
311            inner: T,
312            interceptor: F,
313        ) -> QueryClient<InterceptedService<T, F>>
314        where
315            F: tonic::service::Interceptor,
316            T::ResponseBody: Default,
317            T: tonic::codegen::Service<
318                http::Request<tonic::body::Body>,
319                Response = http::Response<
320                    <T as tonic::client::GrpcService<tonic::body::Body>>::ResponseBody,
321                >,
322            >,
323            <T as tonic::codegen::Service<
324                http::Request<tonic::body::Body>,
325            >>::Error: Into<StdError> + std::marker::Send + std::marker::Sync,
326        {
327            QueryClient::new(InterceptedService::new(inner, interceptor))
328        }
329        /// Compress requests with the given encoding.
330        ///
331        /// This requires the server to support it otherwise it might respond with an
332        /// error.
333        #[must_use]
334        pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
335            self.inner = self.inner.send_compressed(encoding);
336            self
337        }
338        /// Enable decompressing responses.
339        #[must_use]
340        pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
341            self.inner = self.inner.accept_compressed(encoding);
342            self
343        }
344        /// Limits the maximum size of a decoded message.
345        ///
346        /// Default: `4MB`
347        #[must_use]
348        pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
349            self.inner = self.inner.max_decoding_message_size(limit);
350            self
351        }
352        /// Limits the maximum size of an encoded message.
353        ///
354        /// Default: `usize::MAX`
355        #[must_use]
356        pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
357            self.inner = self.inner.max_encoding_message_size(limit);
358            self
359        }
360        /// Parameters queries the parameters of the module.
361        pub async fn params(
362            &mut self,
363            request: impl tonic::IntoRequest<super::QueryParamsRequest>,
364        ) -> std::result::Result<
365            tonic::Response<super::QueryParamsResponse>,
366            tonic::Status,
367        > {
368            self.inner
369                .ready()
370                .await
371                .map_err(|e| {
372                    tonic::Status::unknown(
373                        format!("Service was not ready: {}", e.into()),
374                    )
375                })?;
376            let codec = tonic::codec::ProstCodec::default();
377            let path = http::uri::PathAndQuery::from_static(
378                "/dydxprotocol.accountplus.Query/Params",
379            );
380            let mut req = request.into_request();
381            req.extensions_mut()
382                .insert(GrpcMethod::new("dydxprotocol.accountplus.Query", "Params"));
383            self.inner.unary(req, path, codec).await
384        }
385        /// Queries a single authenticator by account and authenticator ID.
386        pub async fn get_authenticator(
387            &mut self,
388            request: impl tonic::IntoRequest<super::GetAuthenticatorRequest>,
389        ) -> std::result::Result<
390            tonic::Response<super::GetAuthenticatorResponse>,
391            tonic::Status,
392        > {
393            self.inner
394                .ready()
395                .await
396                .map_err(|e| {
397                    tonic::Status::unknown(
398                        format!("Service was not ready: {}", e.into()),
399                    )
400                })?;
401            let codec = tonic::codec::ProstCodec::default();
402            let path = http::uri::PathAndQuery::from_static(
403                "/dydxprotocol.accountplus.Query/GetAuthenticator",
404            );
405            let mut req = request.into_request();
406            req.extensions_mut()
407                .insert(
408                    GrpcMethod::new("dydxprotocol.accountplus.Query", "GetAuthenticator"),
409                );
410            self.inner.unary(req, path, codec).await
411        }
412        /// Queries all authenticators for a given account.
413        pub async fn get_authenticators(
414            &mut self,
415            request: impl tonic::IntoRequest<super::GetAuthenticatorsRequest>,
416        ) -> std::result::Result<
417            tonic::Response<super::GetAuthenticatorsResponse>,
418            tonic::Status,
419        > {
420            self.inner
421                .ready()
422                .await
423                .map_err(|e| {
424                    tonic::Status::unknown(
425                        format!("Service was not ready: {}", e.into()),
426                    )
427                })?;
428            let codec = tonic::codec::ProstCodec::default();
429            let path = http::uri::PathAndQuery::from_static(
430                "/dydxprotocol.accountplus.Query/GetAuthenticators",
431            );
432            let mut req = request.into_request();
433            req.extensions_mut()
434                .insert(
435                    GrpcMethod::new(
436                        "dydxprotocol.accountplus.Query",
437                        "GetAuthenticators",
438                    ),
439                );
440            self.inner.unary(req, path, codec).await
441        }
442        /// Queries for an account state (timestamp nonce).
443        pub async fn account_state(
444            &mut self,
445            request: impl tonic::IntoRequest<super::AccountStateRequest>,
446        ) -> std::result::Result<
447            tonic::Response<super::AccountStateResponse>,
448            tonic::Status,
449        > {
450            self.inner
451                .ready()
452                .await
453                .map_err(|e| {
454                    tonic::Status::unknown(
455                        format!("Service was not ready: {}", e.into()),
456                    )
457                })?;
458            let codec = tonic::codec::ProstCodec::default();
459            let path = http::uri::PathAndQuery::from_static(
460                "/dydxprotocol.accountplus.Query/AccountState",
461            );
462            let mut req = request.into_request();
463            req.extensions_mut()
464                .insert(
465                    GrpcMethod::new("dydxprotocol.accountplus.Query", "AccountState"),
466                );
467            self.inner.unary(req, path, codec).await
468        }
469    }
470}
471/// MsgAddAuthenticatorRequest defines the Msg/AddAuthenticator request type.
472#[derive(Clone, PartialEq, ::prost::Message)]
473pub struct MsgAddAuthenticator {
474    #[prost(string, tag = "1")]
475    pub sender: ::prost::alloc::string::String,
476    #[prost(string, tag = "2")]
477    pub authenticator_type: ::prost::alloc::string::String,
478    #[prost(bytes = "vec", tag = "3")]
479    pub data: ::prost::alloc::vec::Vec<u8>,
480}
481impl ::prost::Name for MsgAddAuthenticator {
482    const NAME: &'static str = "MsgAddAuthenticator";
483    const PACKAGE: &'static str = "dydxprotocol.accountplus";
484    fn full_name() -> ::prost::alloc::string::String {
485        "dydxprotocol.accountplus.MsgAddAuthenticator".into()
486    }
487    fn type_url() -> ::prost::alloc::string::String {
488        "/dydxprotocol.accountplus.MsgAddAuthenticator".into()
489    }
490}
491/// MsgAddAuthenticatorResponse defines the Msg/AddAuthenticator response type.
492#[derive(Clone, Copy, PartialEq, ::prost::Message)]
493pub struct MsgAddAuthenticatorResponse {
494    #[prost(bool, tag = "1")]
495    pub success: bool,
496}
497impl ::prost::Name for MsgAddAuthenticatorResponse {
498    const NAME: &'static str = "MsgAddAuthenticatorResponse";
499    const PACKAGE: &'static str = "dydxprotocol.accountplus";
500    fn full_name() -> ::prost::alloc::string::String {
501        "dydxprotocol.accountplus.MsgAddAuthenticatorResponse".into()
502    }
503    fn type_url() -> ::prost::alloc::string::String {
504        "/dydxprotocol.accountplus.MsgAddAuthenticatorResponse".into()
505    }
506}
507/// MsgRemoveAuthenticatorRequest defines the Msg/RemoveAuthenticator request
508/// type.
509#[derive(Clone, PartialEq, ::prost::Message)]
510pub struct MsgRemoveAuthenticator {
511    #[prost(string, tag = "1")]
512    pub sender: ::prost::alloc::string::String,
513    #[prost(uint64, tag = "2")]
514    pub id: u64,
515}
516impl ::prost::Name for MsgRemoveAuthenticator {
517    const NAME: &'static str = "MsgRemoveAuthenticator";
518    const PACKAGE: &'static str = "dydxprotocol.accountplus";
519    fn full_name() -> ::prost::alloc::string::String {
520        "dydxprotocol.accountplus.MsgRemoveAuthenticator".into()
521    }
522    fn type_url() -> ::prost::alloc::string::String {
523        "/dydxprotocol.accountplus.MsgRemoveAuthenticator".into()
524    }
525}
526/// MsgRemoveAuthenticatorResponse defines the Msg/RemoveAuthenticator response
527/// type.
528#[derive(Clone, Copy, PartialEq, ::prost::Message)]
529pub struct MsgRemoveAuthenticatorResponse {
530    #[prost(bool, tag = "1")]
531    pub success: bool,
532}
533impl ::prost::Name for MsgRemoveAuthenticatorResponse {
534    const NAME: &'static str = "MsgRemoveAuthenticatorResponse";
535    const PACKAGE: &'static str = "dydxprotocol.accountplus";
536    fn full_name() -> ::prost::alloc::string::String {
537        "dydxprotocol.accountplus.MsgRemoveAuthenticatorResponse".into()
538    }
539    fn type_url() -> ::prost::alloc::string::String {
540        "/dydxprotocol.accountplus.MsgRemoveAuthenticatorResponse".into()
541    }
542}
543/// MsgSetActiveState sets the active state of the module.
544#[derive(Clone, PartialEq, ::prost::Message)]
545pub struct MsgSetActiveState {
546    /// Authority is the address that may send this message.
547    #[prost(string, tag = "1")]
548    pub authority: ::prost::alloc::string::String,
549    #[prost(bool, tag = "2")]
550    pub active: bool,
551}
552impl ::prost::Name for MsgSetActiveState {
553    const NAME: &'static str = "MsgSetActiveState";
554    const PACKAGE: &'static str = "dydxprotocol.accountplus";
555    fn full_name() -> ::prost::alloc::string::String {
556        "dydxprotocol.accountplus.MsgSetActiveState".into()
557    }
558    fn type_url() -> ::prost::alloc::string::String {
559        "/dydxprotocol.accountplus.MsgSetActiveState".into()
560    }
561}
562/// MsgSetActiveStateResponse defines the Msg/SetActiveState response type.
563#[derive(Clone, Copy, PartialEq, ::prost::Message)]
564pub struct MsgSetActiveStateResponse {}
565impl ::prost::Name for MsgSetActiveStateResponse {
566    const NAME: &'static str = "MsgSetActiveStateResponse";
567    const PACKAGE: &'static str = "dydxprotocol.accountplus";
568    fn full_name() -> ::prost::alloc::string::String {
569        "dydxprotocol.accountplus.MsgSetActiveStateResponse".into()
570    }
571    fn type_url() -> ::prost::alloc::string::String {
572        "/dydxprotocol.accountplus.MsgSetActiveStateResponse".into()
573    }
574}
575/// TxExtension allows for additional authenticator-specific data in
576/// transactions.
577#[derive(Clone, PartialEq, ::prost::Message)]
578pub struct TxExtension {
579    /// selected_authenticators holds the authenticator_id for the chosen
580    /// authenticator per message.
581    #[prost(uint64, repeated, tag = "1")]
582    pub selected_authenticators: ::prost::alloc::vec::Vec<u64>,
583}
584impl ::prost::Name for TxExtension {
585    const NAME: &'static str = "TxExtension";
586    const PACKAGE: &'static str = "dydxprotocol.accountplus";
587    fn full_name() -> ::prost::alloc::string::String {
588        "dydxprotocol.accountplus.TxExtension".into()
589    }
590    fn type_url() -> ::prost::alloc::string::String {
591        "/dydxprotocol.accountplus.TxExtension".into()
592    }
593}
594/// Generated client implementations.
595pub mod msg_client {
596    #![allow(
597        unused_variables,
598        dead_code,
599        missing_docs,
600        clippy::wildcard_imports,
601        clippy::let_unit_value,
602    )]
603    use tonic::codegen::*;
604    use tonic::codegen::http::Uri;
605    /// Msg defines the Msg service.
606    #[derive(Debug, Clone)]
607    pub struct MsgClient<T> {
608        inner: tonic::client::Grpc<T>,
609    }
610    #[cfg(feature = "grpc-transport")]
611    impl MsgClient<tonic::transport::Channel> {
612        /// Attempt to create a new client by connecting to a given endpoint.
613        pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
614        where
615            D: TryInto<tonic::transport::Endpoint>,
616            D::Error: Into<StdError>,
617        {
618            let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
619            Ok(Self::new(conn))
620        }
621    }
622    impl<T> MsgClient<T>
623    where
624        T: tonic::client::GrpcService<tonic::body::Body>,
625        T::Error: Into<StdError>,
626        T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static,
627        <T::ResponseBody as Body>::Error: Into<StdError> + std::marker::Send,
628    {
629        pub fn new(inner: T) -> Self {
630            let inner = tonic::client::Grpc::new(inner);
631            Self { inner }
632        }
633        pub fn with_origin(inner: T, origin: Uri) -> Self {
634            let inner = tonic::client::Grpc::with_origin(inner, origin);
635            Self { inner }
636        }
637        pub fn with_interceptor<F>(
638            inner: T,
639            interceptor: F,
640        ) -> MsgClient<InterceptedService<T, F>>
641        where
642            F: tonic::service::Interceptor,
643            T::ResponseBody: Default,
644            T: tonic::codegen::Service<
645                http::Request<tonic::body::Body>,
646                Response = http::Response<
647                    <T as tonic::client::GrpcService<tonic::body::Body>>::ResponseBody,
648                >,
649            >,
650            <T as tonic::codegen::Service<
651                http::Request<tonic::body::Body>,
652            >>::Error: Into<StdError> + std::marker::Send + std::marker::Sync,
653        {
654            MsgClient::new(InterceptedService::new(inner, interceptor))
655        }
656        /// Compress requests with the given encoding.
657        ///
658        /// This requires the server to support it otherwise it might respond with an
659        /// error.
660        #[must_use]
661        pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
662            self.inner = self.inner.send_compressed(encoding);
663            self
664        }
665        /// Enable decompressing responses.
666        #[must_use]
667        pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
668            self.inner = self.inner.accept_compressed(encoding);
669            self
670        }
671        /// Limits the maximum size of a decoded message.
672        ///
673        /// Default: `4MB`
674        #[must_use]
675        pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
676            self.inner = self.inner.max_decoding_message_size(limit);
677            self
678        }
679        /// Limits the maximum size of an encoded message.
680        ///
681        /// Default: `usize::MAX`
682        #[must_use]
683        pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
684            self.inner = self.inner.max_encoding_message_size(limit);
685            self
686        }
687        /// AddAuthenticator adds an authenticator to an account.
688        pub async fn add_authenticator(
689            &mut self,
690            request: impl tonic::IntoRequest<super::MsgAddAuthenticator>,
691        ) -> std::result::Result<
692            tonic::Response<super::MsgAddAuthenticatorResponse>,
693            tonic::Status,
694        > {
695            self.inner
696                .ready()
697                .await
698                .map_err(|e| {
699                    tonic::Status::unknown(
700                        format!("Service was not ready: {}", e.into()),
701                    )
702                })?;
703            let codec = tonic::codec::ProstCodec::default();
704            let path = http::uri::PathAndQuery::from_static(
705                "/dydxprotocol.accountplus.Msg/AddAuthenticator",
706            );
707            let mut req = request.into_request();
708            req.extensions_mut()
709                .insert(
710                    GrpcMethod::new("dydxprotocol.accountplus.Msg", "AddAuthenticator"),
711                );
712            self.inner.unary(req, path, codec).await
713        }
714        /// RemoveAuthenticator removes an authenticator from an account.
715        pub async fn remove_authenticator(
716            &mut self,
717            request: impl tonic::IntoRequest<super::MsgRemoveAuthenticator>,
718        ) -> std::result::Result<
719            tonic::Response<super::MsgRemoveAuthenticatorResponse>,
720            tonic::Status,
721        > {
722            self.inner
723                .ready()
724                .await
725                .map_err(|e| {
726                    tonic::Status::unknown(
727                        format!("Service was not ready: {}", e.into()),
728                    )
729                })?;
730            let codec = tonic::codec::ProstCodec::default();
731            let path = http::uri::PathAndQuery::from_static(
732                "/dydxprotocol.accountplus.Msg/RemoveAuthenticator",
733            );
734            let mut req = request.into_request();
735            req.extensions_mut()
736                .insert(
737                    GrpcMethod::new(
738                        "dydxprotocol.accountplus.Msg",
739                        "RemoveAuthenticator",
740                    ),
741                );
742            self.inner.unary(req, path, codec).await
743        }
744        /// SetActiveState sets the active state of the authenticator.
745        /// Primarily used for circuit breaking.
746        pub async fn set_active_state(
747            &mut self,
748            request: impl tonic::IntoRequest<super::MsgSetActiveState>,
749        ) -> std::result::Result<
750            tonic::Response<super::MsgSetActiveStateResponse>,
751            tonic::Status,
752        > {
753            self.inner
754                .ready()
755                .await
756                .map_err(|e| {
757                    tonic::Status::unknown(
758                        format!("Service was not ready: {}", e.into()),
759                    )
760                })?;
761            let codec = tonic::codec::ProstCodec::default();
762            let path = http::uri::PathAndQuery::from_static(
763                "/dydxprotocol.accountplus.Msg/SetActiveState",
764            );
765            let mut req = request.into_request();
766            req.extensions_mut()
767                .insert(
768                    GrpcMethod::new("dydxprotocol.accountplus.Msg", "SetActiveState"),
769                );
770            self.inner.unary(req, path, codec).await
771        }
772    }
773}