Skip to main content

polyester/gen/connect/
chain.withdraw.v1.rs

1// @generated by connectrpc-codegen. DO NOT EDIT.
2
3///Shorthand for `OwnedView<CreateTradingWithdrawRequestView<'static>>`.
4pub type OwnedCreateTradingWithdrawRequestView = ::buffa::view::OwnedView<
5    crate::proto::chain::withdraw::v1::__buffa::view::CreateTradingWithdrawRequestView<
6        'static,
7    >,
8>;
9///Shorthand for `OwnedView<CreateTradingWithdrawResponseView<'static>>`.
10pub type OwnedCreateTradingWithdrawResponseView = ::buffa::view::OwnedView<
11    crate::proto::chain::withdraw::v1::__buffa::view::CreateTradingWithdrawResponseView<
12        'static,
13    >,
14>;
15///Shorthand for `OwnedView<CreateWalletTradingWithdrawRequestView<'static>>`.
16pub type OwnedCreateWalletTradingWithdrawRequestView = ::buffa::view::OwnedView<
17    crate::proto::chain::withdraw::v1::__buffa::view::CreateWalletTradingWithdrawRequestView<
18        'static,
19    >,
20>;
21///Shorthand for `OwnedView<CreateWalletTradingWithdrawResponseView<'static>>`.
22pub type OwnedCreateWalletTradingWithdrawResponseView = ::buffa::view::OwnedView<
23    crate::proto::chain::withdraw::v1::__buffa::view::CreateWalletTradingWithdrawResponseView<
24        'static,
25    >,
26>;
27impl ::connectrpc::Encodable<
28    crate::proto::chain::withdraw::v1::CreateTradingWithdrawResponse,
29>
30for crate::proto::chain::withdraw::v1::__buffa::view::CreateTradingWithdrawResponseView<
31    '_,
32> {
33    fn encode(
34        &self,
35        codec: ::connectrpc::CodecFormat,
36    ) -> ::std::result::Result<::buffa::bytes::Bytes, ::connectrpc::ConnectError> {
37        ::connectrpc::__codegen::encode_view_body(self, codec)
38    }
39}
40impl ::connectrpc::Encodable<
41    crate::proto::chain::withdraw::v1::CreateTradingWithdrawResponse,
42>
43for ::buffa::view::OwnedView<
44    crate::proto::chain::withdraw::v1::__buffa::view::CreateTradingWithdrawResponseView<
45        'static,
46    >,
47> {
48    fn encode(
49        &self,
50        codec: ::connectrpc::CodecFormat,
51    ) -> ::std::result::Result<::buffa::bytes::Bytes, ::connectrpc::ConnectError> {
52        ::connectrpc::__codegen::encode_view_body(self.reborrow(), codec)
53    }
54}
55impl ::connectrpc::Encodable<
56    crate::proto::chain::withdraw::v1::CreateWalletTradingWithdrawResponse,
57>
58for crate::proto::chain::withdraw::v1::__buffa::view::CreateWalletTradingWithdrawResponseView<
59    '_,
60> {
61    fn encode(
62        &self,
63        codec: ::connectrpc::CodecFormat,
64    ) -> ::std::result::Result<::buffa::bytes::Bytes, ::connectrpc::ConnectError> {
65        ::connectrpc::__codegen::encode_view_body(self, codec)
66    }
67}
68impl ::connectrpc::Encodable<
69    crate::proto::chain::withdraw::v1::CreateWalletTradingWithdrawResponse,
70>
71for ::buffa::view::OwnedView<
72    crate::proto::chain::withdraw::v1::__buffa::view::CreateWalletTradingWithdrawResponseView<
73        'static,
74    >,
75> {
76    fn encode(
77        &self,
78        codec: ::connectrpc::CodecFormat,
79    ) -> ::std::result::Result<::buffa::bytes::Bytes, ::connectrpc::ConnectError> {
80        ::connectrpc::__codegen::encode_view_body(self.reborrow(), codec)
81    }
82}
83/// Full service name for this service.
84pub const WITHDRAW_SERVICE_SERVICE_NAME: &str = "chain.withdraw.v1.WithdrawService";
85/// Static [`Spec`](::connectrpc::Spec) for the server-side `CreateTradingWithdraw` RPC.
86///
87/// The dispatcher surfaces this on
88/// [`RequestContext::spec`](::connectrpc::RequestContext::spec).
89pub const WITHDRAW_SERVICE_CREATE_TRADING_WITHDRAW_SPEC: ::connectrpc::Spec = ::connectrpc::Spec::server(
90        "/chain.withdraw.v1.WithdrawService/CreateTradingWithdraw",
91        ::connectrpc::StreamType::Unary,
92    )
93    .with_idempotency_level(::connectrpc::IdempotencyLevel::Unknown);
94/// Static [`Spec`](::connectrpc::Spec) for the server-side `CreateWalletTradingWithdraw` RPC.
95///
96/// The dispatcher surfaces this on
97/// [`RequestContext::spec`](::connectrpc::RequestContext::spec).
98pub const WITHDRAW_SERVICE_CREATE_WALLET_TRADING_WITHDRAW_SPEC: ::connectrpc::Spec = ::connectrpc::Spec::server(
99        "/chain.withdraw.v1.WithdrawService/CreateWalletTradingWithdraw",
100        ::connectrpc::StreamType::Unary,
101    )
102    .with_idempotency_level(::connectrpc::IdempotencyLevel::Unknown);
103/// WithdrawService manages authenticated chain-facing withdraw request intake.
104///
105/// # Implementing handlers
106///
107/// Implement methods with plain `async fn`; the returned future satisfies
108/// the `Send` bound automatically.
109///
110/// **Unary and server-streaming requests** arrive as
111/// [`ServiceRequest<'_, Req>`](::connectrpc::ServiceRequest): a zero-copy
112/// view of the request plus its body, valid for the duration of the call.
113/// Fields are read directly (`request.name` is a `&str` into the decoded
114/// buffer) and the borrow may be held across `.await` points. Anything
115/// that must outlive the call — `tokio::spawn`, channels, server state,
116/// or data captured by a returned response stream — takes owned data:
117/// call `request.to_owned_message()` (or copy the specific fields)
118/// first.
119///
120/// **Client-streaming and bidi requests** arrive as
121/// [`InboundStream<Req>`](::connectrpc::InboundStream) — a
122/// `ServiceStream` of [`StreamMessage`](::connectrpc::StreamMessage)s.
123/// Each item owns its decoded buffer and is `Send + 'static`, so items
124/// can be buffered or moved into spawned tasks; read fields zero-copy
125/// through the generated accessor methods (`item.name()`) or `.view()`,
126/// convert with `.to_owned_message()`, or yield an item back unchanged —
127/// `StreamMessage<M>` implements `Encodable<M>`.
128///
129/// Request types resolved through `extern_path` (e.g. well-known types
130/// from another crate) use the same wrappers; the crate that owns the
131/// type must be generated with buffa ≥ 0.8.0 and views enabled so the
132/// backing `HasMessageView` impl exists.
133///
134/// The `impl Encodable<Out>` return bound accepts the owned `Out`, the
135/// generated `OutView<'_>` / `OwnedOutView`,
136/// [`MaybeBorrowed`](::connectrpc::MaybeBorrowed), or
137/// [`PreEncoded`](::connectrpc::PreEncoded) for handlers that encode a
138/// non-`'static` view internally and pass the bytes across the handler
139/// boundary. View bodies are not emitted for output types mapped via
140/// `extern_path` (the impl would be an orphan); return owned for
141/// WKT/extern outputs.
142///
143/// Server-streaming and bidi-streaming methods return
144/// `ServiceStream<impl Encodable<Out> + Send + use<Self>>`. The
145/// `use<Self>` precise-capturing clause excludes `&self`'s lifetime and
146/// the request's lifetime (unary methods use `use<'a, Self>` and may
147/// borrow from `&self`), so stream items must be `'static` and cannot
148/// borrow from the request. To stream view-encoded data, encode each
149/// item inside the stream body and yield
150/// [`PreEncoded`](::connectrpc::PreEncoded) — see its `# Streaming
151/// example` doc.
152#[allow(clippy::type_complexity)]
153pub trait WithdrawService: Send + Sync + 'static {
154    /// Create or return one durable withdraw from Trading.
155    ///
156    /// `'a` lets the response body borrow from `&self` (e.g. server-resident state).
157    ///
158    /// `request` is borrowed from the request body and is valid for the
159    /// duration of the call; message fields are read directly on it
160    /// (zero-copy). The response cannot borrow from `request` — use
161    /// `.to_owned_message()` (or copy the specific fields) for anything
162    /// returned, stored, or moved into `tokio::spawn`.
163    fn create_trading_withdraw<'a>(
164        &'a self,
165        ctx: ::connectrpc::RequestContext,
166        request: ::connectrpc::ServiceRequest<
167            '_,
168            crate::proto::chain::withdraw::v1::CreateTradingWithdrawRequest,
169        >,
170    ) -> impl ::std::future::Future<
171        Output = ::connectrpc::ServiceResult<
172            impl ::connectrpc::Encodable<
173                crate::proto::chain::withdraw::v1::CreateTradingWithdrawResponse,
174            > + Send + use<'a, Self>,
175        >,
176    > + Send;
177    /// Create or return one wallet/JWT withdraw from Trading.
178    ///
179    /// `'a` lets the response body borrow from `&self` (e.g. server-resident state).
180    ///
181    /// `request` is borrowed from the request body and is valid for the
182    /// duration of the call; message fields are read directly on it
183    /// (zero-copy). The response cannot borrow from `request` — use
184    /// `.to_owned_message()` (or copy the specific fields) for anything
185    /// returned, stored, or moved into `tokio::spawn`.
186    fn create_wallet_trading_withdraw<'a>(
187        &'a self,
188        ctx: ::connectrpc::RequestContext,
189        request: ::connectrpc::ServiceRequest<
190            '_,
191            crate::proto::chain::withdraw::v1::CreateWalletTradingWithdrawRequest,
192        >,
193    ) -> impl ::std::future::Future<
194        Output = ::connectrpc::ServiceResult<
195            impl ::connectrpc::Encodable<
196                crate::proto::chain::withdraw::v1::CreateWalletTradingWithdrawResponse,
197            > + Send + use<'a, Self>,
198        >,
199    > + Send;
200}
201/// Extension trait for registering a service implementation with a Router.
202///
203/// This trait is automatically implemented for all types that implement the service trait.
204/// Prefer [`Router::add_service`](::connectrpc::Router::add_service) for
205/// top-down registration; `register` remains available for compatibility
206/// and cases where the service-first call shape is more convenient.
207///
208/// # Example
209///
210/// ```rust,ignore
211/// use std::sync::Arc;
212///
213/// let service = Arc::new(MyServiceImpl);
214/// let router = service.register(Router::new());
215/// ```
216pub trait WithdrawServiceExt: WithdrawService {
217    /// Register this service implementation with a Router.
218    ///
219    /// Takes ownership of the `Arc<Self>` and returns a new Router with
220    /// this service's methods registered.
221    fn register(
222        self: ::std::sync::Arc<Self>,
223        router: ::connectrpc::Router,
224    ) -> ::connectrpc::Router;
225}
226impl<S: WithdrawService> WithdrawServiceExt for S {
227    fn register(
228        self: ::std::sync::Arc<Self>,
229        router: ::connectrpc::Router,
230    ) -> ::connectrpc::Router {
231        router
232            .route_view(
233                WITHDRAW_SERVICE_SERVICE_NAME,
234                "CreateTradingWithdraw",
235                {
236                    let svc = ::std::sync::Arc::clone(&self);
237                    ::connectrpc::view_handler_fn(move |
238                        ctx,
239                        req: ::buffa::view::OwnedView<
240                            crate::proto::chain::withdraw::v1::__buffa::view::CreateTradingWithdrawRequestView<
241                                'static,
242                            >,
243                        >,
244                        format|
245                    {
246                        let svc = ::std::sync::Arc::clone(&svc);
247                        async move {
248                            let sreq = ::connectrpc::ServiceRequest::<
249                                crate::proto::chain::withdraw::v1::CreateTradingWithdrawRequest,
250                            >::from_parts(req.reborrow(), req.bytes());
251                            svc.create_trading_withdraw(ctx, sreq)
252                                .await?
253                                .encode::<
254                                    crate::proto::chain::withdraw::v1::CreateTradingWithdrawResponse,
255                                >(format)
256                        }
257                    })
258                },
259            )
260            .with_spec(WITHDRAW_SERVICE_CREATE_TRADING_WITHDRAW_SPEC)
261            .route_view(
262                WITHDRAW_SERVICE_SERVICE_NAME,
263                "CreateWalletTradingWithdraw",
264                {
265                    let svc = ::std::sync::Arc::clone(&self);
266                    ::connectrpc::view_handler_fn(move |
267                        ctx,
268                        req: ::buffa::view::OwnedView<
269                            crate::proto::chain::withdraw::v1::__buffa::view::CreateWalletTradingWithdrawRequestView<
270                                'static,
271                            >,
272                        >,
273                        format|
274                    {
275                        let svc = ::std::sync::Arc::clone(&svc);
276                        async move {
277                            let sreq = ::connectrpc::ServiceRequest::<
278                                crate::proto::chain::withdraw::v1::CreateWalletTradingWithdrawRequest,
279                            >::from_parts(req.reborrow(), req.bytes());
280                            svc.create_wallet_trading_withdraw(ctx, sreq)
281                                .await?
282                                .encode::<
283                                    crate::proto::chain::withdraw::v1::CreateWalletTradingWithdrawResponse,
284                                >(format)
285                        }
286                    })
287                },
288            )
289            .with_spec(WITHDRAW_SERVICE_CREATE_WALLET_TRADING_WITHDRAW_SPEC)
290    }
291}
292/// Type-inference marker used by [`Router::add_service`](::connectrpc::Router::add_service).
293#[doc(hidden)]
294pub struct WithdrawServiceRegisterMarker;
295impl<S: WithdrawService> ::connectrpc::ServiceRegister<WithdrawServiceRegisterMarker>
296for ::std::sync::Arc<S> {
297    fn register_service(self, router: ::connectrpc::Router) -> ::connectrpc::Router {
298        <S as WithdrawServiceExt>::register(self, router)
299    }
300}
301/// Monomorphic dispatcher for `WithdrawService`.
302///
303/// Unlike `.register(Router)` which type-erases each method into an `Arc<dyn ErasedHandler>` stored in a `HashMap`, this struct dispatches via a compile-time `match` on method name: no vtable, no hash lookup.
304///
305/// # Example
306///
307/// ```rust,ignore
308/// use connectrpc::ConnectRpcService;
309///
310/// let server = WithdrawServiceServer::new(MyImpl);
311/// let service = ConnectRpcService::new(server);
312/// // hand `service` to axum/hyper as a fallback_service
313/// ```
314pub struct WithdrawServiceServer<T> {
315    inner: ::std::sync::Arc<T>,
316}
317impl<T: WithdrawService> WithdrawServiceServer<T> {
318    /// Wrap a service implementation in a monomorphic dispatcher.
319    pub fn new(service: T) -> Self {
320        Self {
321            inner: ::std::sync::Arc::new(service),
322        }
323    }
324    /// Wrap an already-`Arc`'d service implementation.
325    pub fn from_arc(inner: ::std::sync::Arc<T>) -> Self {
326        Self { inner }
327    }
328}
329impl<T> Clone for WithdrawServiceServer<T> {
330    fn clone(&self) -> Self {
331        Self {
332            inner: ::std::sync::Arc::clone(&self.inner),
333        }
334    }
335}
336impl<T: WithdrawService> ::connectrpc::Dispatcher for WithdrawServiceServer<T> {
337    #[inline]
338    fn lookup(
339        &self,
340        path: &str,
341    ) -> Option<::connectrpc::dispatcher::codegen::MethodDescriptor> {
342        let method = path.strip_prefix("chain.withdraw.v1.WithdrawService/")?;
343        match method {
344            "CreateTradingWithdraw" => {
345                Some(
346                    ::connectrpc::dispatcher::codegen::MethodDescriptor::unary(false)
347                        .with_spec(WITHDRAW_SERVICE_CREATE_TRADING_WITHDRAW_SPEC),
348                )
349            }
350            "CreateWalletTradingWithdraw" => {
351                Some(
352                    ::connectrpc::dispatcher::codegen::MethodDescriptor::unary(false)
353                        .with_spec(WITHDRAW_SERVICE_CREATE_WALLET_TRADING_WITHDRAW_SPEC),
354                )
355            }
356            _ => None,
357        }
358    }
359    fn call_unary(
360        &self,
361        path: &str,
362        ctx: ::connectrpc::RequestContext,
363        request: ::connectrpc::Payload,
364        format: ::connectrpc::CodecFormat,
365    ) -> ::connectrpc::dispatcher::codegen::UnaryResult {
366        let Some(method) = path.strip_prefix("chain.withdraw.v1.WithdrawService/") else {
367            return ::connectrpc::dispatcher::codegen::unimplemented_unary(path);
368        };
369        let _ = (&ctx, &request, &format);
370        match method {
371            "CreateTradingWithdraw" => {
372                let svc = ::std::sync::Arc::clone(&self.inner);
373                Box::pin(async move {
374                    let body = ::connectrpc::dispatcher::codegen::request_proto_bytes::<
375                        crate::proto::chain::withdraw::v1::CreateTradingWithdrawRequest,
376                    >(request.encoded()?, format)?;
377                    let req: crate::proto::chain::withdraw::v1::__buffa::view::CreateTradingWithdrawRequestView<
378                        '_,
379                    > = ::connectrpc::dispatcher::codegen::decode_borrowed_request_view(
380                        &body,
381                    )?;
382                    let req = ::connectrpc::ServiceRequest::<
383                        crate::proto::chain::withdraw::v1::CreateTradingWithdrawRequest,
384                    >::from_parts(&req, &body);
385                    svc.create_trading_withdraw(ctx, req)
386                        .await?
387                        .encode::<
388                            crate::proto::chain::withdraw::v1::CreateTradingWithdrawResponse,
389                        >(format)
390                })
391            }
392            "CreateWalletTradingWithdraw" => {
393                let svc = ::std::sync::Arc::clone(&self.inner);
394                Box::pin(async move {
395                    let body = ::connectrpc::dispatcher::codegen::request_proto_bytes::<
396                        crate::proto::chain::withdraw::v1::CreateWalletTradingWithdrawRequest,
397                    >(request.encoded()?, format)?;
398                    let req: crate::proto::chain::withdraw::v1::__buffa::view::CreateWalletTradingWithdrawRequestView<
399                        '_,
400                    > = ::connectrpc::dispatcher::codegen::decode_borrowed_request_view(
401                        &body,
402                    )?;
403                    let req = ::connectrpc::ServiceRequest::<
404                        crate::proto::chain::withdraw::v1::CreateWalletTradingWithdrawRequest,
405                    >::from_parts(&req, &body);
406                    svc.create_wallet_trading_withdraw(ctx, req)
407                        .await?
408                        .encode::<
409                            crate::proto::chain::withdraw::v1::CreateWalletTradingWithdrawResponse,
410                        >(format)
411                })
412            }
413            _ => ::connectrpc::dispatcher::codegen::unimplemented_unary(path),
414        }
415    }
416    fn call_server_streaming(
417        &self,
418        path: &str,
419        ctx: ::connectrpc::RequestContext,
420        request: ::buffa::bytes::Bytes,
421        format: ::connectrpc::CodecFormat,
422    ) -> ::connectrpc::dispatcher::codegen::StreamingResult {
423        let Some(method) = path.strip_prefix("chain.withdraw.v1.WithdrawService/") else {
424            return ::connectrpc::dispatcher::codegen::unimplemented_streaming(path);
425        };
426        let _ = (&ctx, &request, &format);
427        match method {
428            _ => ::connectrpc::dispatcher::codegen::unimplemented_streaming(path),
429        }
430    }
431    fn call_client_streaming(
432        &self,
433        path: &str,
434        ctx: ::connectrpc::RequestContext,
435        requests: ::connectrpc::dispatcher::codegen::RequestStream,
436        format: ::connectrpc::CodecFormat,
437    ) -> ::connectrpc::dispatcher::codegen::UnaryResult {
438        let Some(method) = path.strip_prefix("chain.withdraw.v1.WithdrawService/") else {
439            return ::connectrpc::dispatcher::codegen::unimplemented_unary(path);
440        };
441        let _ = (&ctx, &requests, &format);
442        match method {
443            _ => ::connectrpc::dispatcher::codegen::unimplemented_unary(path),
444        }
445    }
446    fn call_bidi_streaming(
447        &self,
448        path: &str,
449        ctx: ::connectrpc::RequestContext,
450        requests: ::connectrpc::dispatcher::codegen::RequestStream,
451        format: ::connectrpc::CodecFormat,
452    ) -> ::connectrpc::dispatcher::codegen::StreamingResult {
453        let Some(method) = path.strip_prefix("chain.withdraw.v1.WithdrawService/") else {
454            return ::connectrpc::dispatcher::codegen::unimplemented_streaming(path);
455        };
456        let _ = (&ctx, &requests, &format);
457        match method {
458            _ => ::connectrpc::dispatcher::codegen::unimplemented_streaming(path),
459        }
460    }
461}
462/// Client for this service.
463///
464/// Generic over `T: ClientTransport`. For **gRPC** (HTTP/2), use
465/// `Http2Connection` — it has honest `poll_ready` and composes with
466/// `tower::balance` for multi-connection load balancing. For **Connect
467/// over HTTP/1.1** (or unknown protocol), use `HttpClient`.
468///
469/// # Working with the response
470///
471/// Unary calls return [`UnaryResponse<OwnedView<FooView>>`](::connectrpc::client::UnaryResponse).
472/// [`view()`](::connectrpc::client::UnaryResponse::view) borrows the response
473/// message, so field access is zero-copy:
474///
475/// ```rust,ignore
476/// let resp = client.create_trading_withdraw(request).await?;
477/// let name: &str = resp.view().name;  // borrow into the response buffer
478/// ```
479///
480/// If you need the owned struct (e.g. to store or pass by value), use
481/// [`into_owned()`](::connectrpc::client::UnaryResponse::into_owned):
482///
483/// ```rust,ignore
484/// let owned = client.create_trading_withdraw(request).await?.into_owned();
485/// ```
486///
487/// [`into_view()`](::connectrpc::client::UnaryResponse::into_view) keeps the
488/// zero-copy decoded body (an `OwnedView`) without copying; field access on it
489/// goes through `.reborrow()`. Streaming responses yield one
490/// [`StreamMessage`](::connectrpc::StreamMessage) per received message from
491/// `.message().await` — read fields zero-copy through the generated accessor
492/// methods (`msg.name()`) or `.view()`, or convert with `.to_owned_message()`.
493#[derive(Clone)]
494pub struct WithdrawServiceClient<T> {
495    transport: T,
496    config: ::connectrpc::client::ClientConfig,
497}
498impl<T> WithdrawServiceClient<T>
499where
500    T: ::connectrpc::client::ClientTransport,
501    <T::ResponseBody as ::connectrpc::http_body::Body>::Error: ::std::fmt::Display,
502{
503    /// Create a new client with the given transport and configuration.
504    pub fn new(transport: T, config: ::connectrpc::client::ClientConfig) -> Self {
505        Self { transport, config }
506    }
507    /// Get the client configuration.
508    pub fn config(&self) -> &::connectrpc::client::ClientConfig {
509        &self.config
510    }
511    /// Get a mutable reference to the client configuration.
512    pub fn config_mut(&mut self) -> &mut ::connectrpc::client::ClientConfig {
513        &mut self.config
514    }
515    /// Call the CreateTradingWithdraw RPC. Sends a request to /chain.withdraw.v1.WithdrawService/CreateTradingWithdraw.
516    pub async fn create_trading_withdraw(
517        &self,
518        request: crate::proto::chain::withdraw::v1::CreateTradingWithdrawRequest,
519    ) -> Result<
520        ::connectrpc::client::UnaryResponse<
521            ::buffa::view::OwnedView<
522                crate::proto::chain::withdraw::v1::__buffa::view::CreateTradingWithdrawResponseView<
523                    'static,
524                >,
525            >,
526        >,
527        ::connectrpc::ConnectError,
528    > {
529        self.create_trading_withdraw_with_options(
530                request,
531                ::connectrpc::client::CallOptions::default(),
532            )
533            .await
534    }
535    /// Call the CreateTradingWithdraw RPC with explicit per-call options. Options override [`ClientConfig`](::connectrpc::client::ClientConfig) defaults.
536    pub async fn create_trading_withdraw_with_options(
537        &self,
538        request: crate::proto::chain::withdraw::v1::CreateTradingWithdrawRequest,
539        options: ::connectrpc::client::CallOptions,
540    ) -> Result<
541        ::connectrpc::client::UnaryResponse<
542            ::buffa::view::OwnedView<
543                crate::proto::chain::withdraw::v1::__buffa::view::CreateTradingWithdrawResponseView<
544                    'static,
545                >,
546            >,
547        >,
548        ::connectrpc::ConnectError,
549    > {
550        ::connectrpc::client::call_unary(
551                &self.transport,
552                &self.config,
553                WITHDRAW_SERVICE_SERVICE_NAME,
554                "CreateTradingWithdraw",
555                request,
556                options,
557            )
558            .await
559    }
560    /// Call the CreateWalletTradingWithdraw RPC. Sends a request to /chain.withdraw.v1.WithdrawService/CreateWalletTradingWithdraw.
561    pub async fn create_wallet_trading_withdraw(
562        &self,
563        request: crate::proto::chain::withdraw::v1::CreateWalletTradingWithdrawRequest,
564    ) -> Result<
565        ::connectrpc::client::UnaryResponse<
566            ::buffa::view::OwnedView<
567                crate::proto::chain::withdraw::v1::__buffa::view::CreateWalletTradingWithdrawResponseView<
568                    'static,
569                >,
570            >,
571        >,
572        ::connectrpc::ConnectError,
573    > {
574        self.create_wallet_trading_withdraw_with_options(
575                request,
576                ::connectrpc::client::CallOptions::default(),
577            )
578            .await
579    }
580    /// Call the CreateWalletTradingWithdraw RPC with explicit per-call options. Options override [`ClientConfig`](::connectrpc::client::ClientConfig) defaults.
581    pub async fn create_wallet_trading_withdraw_with_options(
582        &self,
583        request: crate::proto::chain::withdraw::v1::CreateWalletTradingWithdrawRequest,
584        options: ::connectrpc::client::CallOptions,
585    ) -> Result<
586        ::connectrpc::client::UnaryResponse<
587            ::buffa::view::OwnedView<
588                crate::proto::chain::withdraw::v1::__buffa::view::CreateWalletTradingWithdrawResponseView<
589                    'static,
590                >,
591            >,
592        >,
593        ::connectrpc::ConnectError,
594    > {
595        ::connectrpc::client::call_unary(
596                &self.transport,
597                &self.config,
598                WITHDRAW_SERVICE_SERVICE_NAME,
599                "CreateWalletTradingWithdraw",
600                request,
601                options,
602            )
603            .await
604    }
605}