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    /// Own-account Trading to Funding accepts recent MFA; external, cross-owner,
179    /// and delegated movements require a fresh single-use step-up.
180    ///
181    /// `'a` lets the response body borrow from `&self` (e.g. server-resident state).
182    ///
183    /// `request` is borrowed from the request body and is valid for the
184    /// duration of the call; message fields are read directly on it
185    /// (zero-copy). The response cannot borrow from `request` — use
186    /// `.to_owned_message()` (or copy the specific fields) for anything
187    /// returned, stored, or moved into `tokio::spawn`.
188    fn create_wallet_trading_withdraw<'a>(
189        &'a self,
190        ctx: ::connectrpc::RequestContext,
191        request: ::connectrpc::ServiceRequest<
192            '_,
193            crate::proto::chain::withdraw::v1::CreateWalletTradingWithdrawRequest,
194        >,
195    ) -> impl ::std::future::Future<
196        Output = ::connectrpc::ServiceResult<
197            impl ::connectrpc::Encodable<
198                crate::proto::chain::withdraw::v1::CreateWalletTradingWithdrawResponse,
199            > + Send + use<'a, Self>,
200        >,
201    > + Send;
202}
203/// Extension trait for registering a service implementation with a Router.
204///
205/// This trait is automatically implemented for all types that implement the service trait.
206/// Prefer [`Router::add_service`](::connectrpc::Router::add_service) for
207/// top-down registration; `register` remains available for compatibility
208/// and cases where the service-first call shape is more convenient.
209///
210/// # Example
211///
212/// ```rust,ignore
213/// use std::sync::Arc;
214///
215/// let service = Arc::new(MyServiceImpl);
216/// let router = service.register(Router::new());
217/// ```
218pub trait WithdrawServiceExt: WithdrawService {
219    /// Register this service implementation with a Router.
220    ///
221    /// Takes ownership of the `Arc<Self>` and returns a new Router with
222    /// this service's methods registered.
223    fn register(
224        self: ::std::sync::Arc<Self>,
225        router: ::connectrpc::Router,
226    ) -> ::connectrpc::Router;
227}
228impl<S: WithdrawService> WithdrawServiceExt for S {
229    fn register(
230        self: ::std::sync::Arc<Self>,
231        router: ::connectrpc::Router,
232    ) -> ::connectrpc::Router {
233        router
234            .route_view(
235                WITHDRAW_SERVICE_SERVICE_NAME,
236                "CreateTradingWithdraw",
237                {
238                    let svc = ::std::sync::Arc::clone(&self);
239                    ::connectrpc::view_handler_fn(move |
240                        ctx,
241                        req: ::buffa::view::OwnedView<
242                            crate::proto::chain::withdraw::v1::__buffa::view::CreateTradingWithdrawRequestView<
243                                'static,
244                            >,
245                        >,
246                        format|
247                    {
248                        let svc = ::std::sync::Arc::clone(&svc);
249                        async move {
250                            let sreq = ::connectrpc::ServiceRequest::<
251                                crate::proto::chain::withdraw::v1::CreateTradingWithdrawRequest,
252                            >::from_parts(req.reborrow(), req.bytes());
253                            svc.create_trading_withdraw(ctx, sreq)
254                                .await?
255                                .encode::<
256                                    crate::proto::chain::withdraw::v1::CreateTradingWithdrawResponse,
257                                >(format)
258                        }
259                    })
260                },
261            )
262            .with_spec(WITHDRAW_SERVICE_CREATE_TRADING_WITHDRAW_SPEC)
263            .route_view(
264                WITHDRAW_SERVICE_SERVICE_NAME,
265                "CreateWalletTradingWithdraw",
266                {
267                    let svc = ::std::sync::Arc::clone(&self);
268                    ::connectrpc::view_handler_fn(move |
269                        ctx,
270                        req: ::buffa::view::OwnedView<
271                            crate::proto::chain::withdraw::v1::__buffa::view::CreateWalletTradingWithdrawRequestView<
272                                'static,
273                            >,
274                        >,
275                        format|
276                    {
277                        let svc = ::std::sync::Arc::clone(&svc);
278                        async move {
279                            let sreq = ::connectrpc::ServiceRequest::<
280                                crate::proto::chain::withdraw::v1::CreateWalletTradingWithdrawRequest,
281                            >::from_parts(req.reborrow(), req.bytes());
282                            svc.create_wallet_trading_withdraw(ctx, sreq)
283                                .await?
284                                .encode::<
285                                    crate::proto::chain::withdraw::v1::CreateWalletTradingWithdrawResponse,
286                                >(format)
287                        }
288                    })
289                },
290            )
291            .with_spec(WITHDRAW_SERVICE_CREATE_WALLET_TRADING_WITHDRAW_SPEC)
292    }
293}
294/// Type-inference marker used by [`Router::add_service`](::connectrpc::Router::add_service).
295#[doc(hidden)]
296pub struct WithdrawServiceRegisterMarker;
297impl<S: WithdrawService> ::connectrpc::ServiceRegister<WithdrawServiceRegisterMarker>
298for ::std::sync::Arc<S> {
299    fn register_service(self, router: ::connectrpc::Router) -> ::connectrpc::Router {
300        <S as WithdrawServiceExt>::register(self, router)
301    }
302}
303/// Monomorphic dispatcher for `WithdrawService`.
304///
305/// 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.
306///
307/// # Example
308///
309/// ```rust,ignore
310/// use connectrpc::ConnectRpcService;
311///
312/// let server = WithdrawServiceServer::new(MyImpl);
313/// let service = ConnectRpcService::new(server);
314/// // hand `service` to axum/hyper as a fallback_service
315/// ```
316pub struct WithdrawServiceServer<T> {
317    inner: ::std::sync::Arc<T>,
318}
319impl<T: WithdrawService> WithdrawServiceServer<T> {
320    /// Wrap a service implementation in a monomorphic dispatcher.
321    pub fn new(service: T) -> Self {
322        Self {
323            inner: ::std::sync::Arc::new(service),
324        }
325    }
326    /// Wrap an already-`Arc`'d service implementation.
327    pub fn from_arc(inner: ::std::sync::Arc<T>) -> Self {
328        Self { inner }
329    }
330}
331impl<T> Clone for WithdrawServiceServer<T> {
332    fn clone(&self) -> Self {
333        Self {
334            inner: ::std::sync::Arc::clone(&self.inner),
335        }
336    }
337}
338impl<T: WithdrawService> ::connectrpc::Dispatcher for WithdrawServiceServer<T> {
339    #[inline]
340    fn lookup(
341        &self,
342        path: &str,
343    ) -> Option<::connectrpc::dispatcher::codegen::MethodDescriptor> {
344        let method = path.strip_prefix("chain.withdraw.v1.WithdrawService/")?;
345        match method {
346            "CreateTradingWithdraw" => {
347                Some(
348                    ::connectrpc::dispatcher::codegen::MethodDescriptor::unary(false)
349                        .with_spec(WITHDRAW_SERVICE_CREATE_TRADING_WITHDRAW_SPEC),
350                )
351            }
352            "CreateWalletTradingWithdraw" => {
353                Some(
354                    ::connectrpc::dispatcher::codegen::MethodDescriptor::unary(false)
355                        .with_spec(WITHDRAW_SERVICE_CREATE_WALLET_TRADING_WITHDRAW_SPEC),
356                )
357            }
358            _ => None,
359        }
360    }
361    fn call_unary(
362        &self,
363        path: &str,
364        ctx: ::connectrpc::RequestContext,
365        request: ::connectrpc::Payload,
366        format: ::connectrpc::CodecFormat,
367    ) -> ::connectrpc::dispatcher::codegen::UnaryResult {
368        let Some(method) = path.strip_prefix("chain.withdraw.v1.WithdrawService/") else {
369            return ::connectrpc::dispatcher::codegen::unimplemented_unary(path);
370        };
371        let _ = (&ctx, &request, &format);
372        match method {
373            "CreateTradingWithdraw" => {
374                let svc = ::std::sync::Arc::clone(&self.inner);
375                Box::pin(async move {
376                    let body = ::connectrpc::dispatcher::codegen::request_proto_bytes::<
377                        crate::proto::chain::withdraw::v1::CreateTradingWithdrawRequest,
378                    >(request.encoded()?, format)?;
379                    let req: crate::proto::chain::withdraw::v1::__buffa::view::CreateTradingWithdrawRequestView<
380                        '_,
381                    > = ::connectrpc::dispatcher::codegen::decode_borrowed_request_view(
382                        &body,
383                    )?;
384                    let req = ::connectrpc::ServiceRequest::<
385                        crate::proto::chain::withdraw::v1::CreateTradingWithdrawRequest,
386                    >::from_parts(&req, &body);
387                    svc.create_trading_withdraw(ctx, req)
388                        .await?
389                        .encode::<
390                            crate::proto::chain::withdraw::v1::CreateTradingWithdrawResponse,
391                        >(format)
392                })
393            }
394            "CreateWalletTradingWithdraw" => {
395                let svc = ::std::sync::Arc::clone(&self.inner);
396                Box::pin(async move {
397                    let body = ::connectrpc::dispatcher::codegen::request_proto_bytes::<
398                        crate::proto::chain::withdraw::v1::CreateWalletTradingWithdrawRequest,
399                    >(request.encoded()?, format)?;
400                    let req: crate::proto::chain::withdraw::v1::__buffa::view::CreateWalletTradingWithdrawRequestView<
401                        '_,
402                    > = ::connectrpc::dispatcher::codegen::decode_borrowed_request_view(
403                        &body,
404                    )?;
405                    let req = ::connectrpc::ServiceRequest::<
406                        crate::proto::chain::withdraw::v1::CreateWalletTradingWithdrawRequest,
407                    >::from_parts(&req, &body);
408                    svc.create_wallet_trading_withdraw(ctx, req)
409                        .await?
410                        .encode::<
411                            crate::proto::chain::withdraw::v1::CreateWalletTradingWithdrawResponse,
412                        >(format)
413                })
414            }
415            _ => ::connectrpc::dispatcher::codegen::unimplemented_unary(path),
416        }
417    }
418    fn call_server_streaming(
419        &self,
420        path: &str,
421        ctx: ::connectrpc::RequestContext,
422        request: ::buffa::bytes::Bytes,
423        format: ::connectrpc::CodecFormat,
424    ) -> ::connectrpc::dispatcher::codegen::StreamingResult {
425        let Some(method) = path.strip_prefix("chain.withdraw.v1.WithdrawService/") else {
426            return ::connectrpc::dispatcher::codegen::unimplemented_streaming(path);
427        };
428        let _ = (&ctx, &request, &format);
429        match method {
430            _ => ::connectrpc::dispatcher::codegen::unimplemented_streaming(path),
431        }
432    }
433    fn call_client_streaming(
434        &self,
435        path: &str,
436        ctx: ::connectrpc::RequestContext,
437        requests: ::connectrpc::dispatcher::codegen::RequestStream,
438        format: ::connectrpc::CodecFormat,
439    ) -> ::connectrpc::dispatcher::codegen::UnaryResult {
440        let Some(method) = path.strip_prefix("chain.withdraw.v1.WithdrawService/") else {
441            return ::connectrpc::dispatcher::codegen::unimplemented_unary(path);
442        };
443        let _ = (&ctx, &requests, &format);
444        match method {
445            _ => ::connectrpc::dispatcher::codegen::unimplemented_unary(path),
446        }
447    }
448    fn call_bidi_streaming(
449        &self,
450        path: &str,
451        ctx: ::connectrpc::RequestContext,
452        requests: ::connectrpc::dispatcher::codegen::RequestStream,
453        format: ::connectrpc::CodecFormat,
454    ) -> ::connectrpc::dispatcher::codegen::StreamingResult {
455        let Some(method) = path.strip_prefix("chain.withdraw.v1.WithdrawService/") else {
456            return ::connectrpc::dispatcher::codegen::unimplemented_streaming(path);
457        };
458        let _ = (&ctx, &requests, &format);
459        match method {
460            _ => ::connectrpc::dispatcher::codegen::unimplemented_streaming(path),
461        }
462    }
463}
464/// Client for this service.
465///
466/// Generic over `T: ClientTransport`. For **gRPC** (HTTP/2), use
467/// `Http2Connection` — it has honest `poll_ready` and composes with
468/// `tower::balance` for multi-connection load balancing. For **Connect
469/// over HTTP/1.1** (or unknown protocol), use `HttpClient`.
470///
471/// # Working with the response
472///
473/// Unary calls return [`UnaryResponse<OwnedView<FooView>>`](::connectrpc::client::UnaryResponse).
474/// [`view()`](::connectrpc::client::UnaryResponse::view) borrows the response
475/// message, so field access is zero-copy:
476///
477/// ```rust,ignore
478/// let resp = client.create_trading_withdraw(request).await?;
479/// let name: &str = resp.view().name;  // borrow into the response buffer
480/// ```
481///
482/// If you need the owned struct (e.g. to store or pass by value), use
483/// [`into_owned()`](::connectrpc::client::UnaryResponse::into_owned):
484///
485/// ```rust,ignore
486/// let owned = client.create_trading_withdraw(request).await?.into_owned();
487/// ```
488///
489/// [`into_view()`](::connectrpc::client::UnaryResponse::into_view) keeps the
490/// zero-copy decoded body (an `OwnedView`) without copying; field access on it
491/// goes through `.reborrow()`. Streaming responses yield one
492/// [`StreamMessage`](::connectrpc::StreamMessage) per received message from
493/// `.message().await` — read fields zero-copy through the generated accessor
494/// methods (`msg.name()`) or `.view()`, or convert with `.to_owned_message()`.
495#[derive(Clone)]
496pub struct WithdrawServiceClient<T> {
497    transport: T,
498    config: ::connectrpc::client::ClientConfig,
499}
500impl<T> WithdrawServiceClient<T>
501where
502    T: ::connectrpc::client::ClientTransport,
503    <T::ResponseBody as ::connectrpc::http_body::Body>::Error: ::std::fmt::Display,
504{
505    /// Create a new client with the given transport and configuration.
506    pub fn new(transport: T, config: ::connectrpc::client::ClientConfig) -> Self {
507        Self { transport, config }
508    }
509    /// Get the client configuration.
510    pub fn config(&self) -> &::connectrpc::client::ClientConfig {
511        &self.config
512    }
513    /// Get a mutable reference to the client configuration.
514    pub fn config_mut(&mut self) -> &mut ::connectrpc::client::ClientConfig {
515        &mut self.config
516    }
517    /// Call the CreateTradingWithdraw RPC. Sends a request to /chain.withdraw.v1.WithdrawService/CreateTradingWithdraw.
518    pub async fn create_trading_withdraw(
519        &self,
520        request: crate::proto::chain::withdraw::v1::CreateTradingWithdrawRequest,
521    ) -> Result<
522        ::connectrpc::client::UnaryResponse<
523            ::buffa::view::OwnedView<
524                crate::proto::chain::withdraw::v1::__buffa::view::CreateTradingWithdrawResponseView<
525                    'static,
526                >,
527            >,
528        >,
529        ::connectrpc::ConnectError,
530    > {
531        self.create_trading_withdraw_with_options(
532                request,
533                ::connectrpc::client::CallOptions::default(),
534            )
535            .await
536    }
537    /// Call the CreateTradingWithdraw RPC with explicit per-call options. Options override [`ClientConfig`](::connectrpc::client::ClientConfig) defaults.
538    pub async fn create_trading_withdraw_with_options(
539        &self,
540        request: crate::proto::chain::withdraw::v1::CreateTradingWithdrawRequest,
541        options: ::connectrpc::client::CallOptions,
542    ) -> Result<
543        ::connectrpc::client::UnaryResponse<
544            ::buffa::view::OwnedView<
545                crate::proto::chain::withdraw::v1::__buffa::view::CreateTradingWithdrawResponseView<
546                    'static,
547                >,
548            >,
549        >,
550        ::connectrpc::ConnectError,
551    > {
552        ::connectrpc::client::call_unary(
553                &self.transport,
554                &self.config,
555                WITHDRAW_SERVICE_SERVICE_NAME,
556                "CreateTradingWithdraw",
557                request,
558                options,
559            )
560            .await
561    }
562    /// Call the CreateWalletTradingWithdraw RPC. Sends a request to /chain.withdraw.v1.WithdrawService/CreateWalletTradingWithdraw.
563    pub async fn create_wallet_trading_withdraw(
564        &self,
565        request: crate::proto::chain::withdraw::v1::CreateWalletTradingWithdrawRequest,
566    ) -> Result<
567        ::connectrpc::client::UnaryResponse<
568            ::buffa::view::OwnedView<
569                crate::proto::chain::withdraw::v1::__buffa::view::CreateWalletTradingWithdrawResponseView<
570                    'static,
571                >,
572            >,
573        >,
574        ::connectrpc::ConnectError,
575    > {
576        self.create_wallet_trading_withdraw_with_options(
577                request,
578                ::connectrpc::client::CallOptions::default(),
579            )
580            .await
581    }
582    /// Call the CreateWalletTradingWithdraw RPC with explicit per-call options. Options override [`ClientConfig`](::connectrpc::client::ClientConfig) defaults.
583    pub async fn create_wallet_trading_withdraw_with_options(
584        &self,
585        request: crate::proto::chain::withdraw::v1::CreateWalletTradingWithdrawRequest,
586        options: ::connectrpc::client::CallOptions,
587    ) -> Result<
588        ::connectrpc::client::UnaryResponse<
589            ::buffa::view::OwnedView<
590                crate::proto::chain::withdraw::v1::__buffa::view::CreateWalletTradingWithdrawResponseView<
591                    'static,
592                >,
593            >,
594        >,
595        ::connectrpc::ConnectError,
596    > {
597        ::connectrpc::client::call_unary(
598                &self.transport,
599                &self.config,
600                WITHDRAW_SERVICE_SERVICE_NAME,
601                "CreateWalletTradingWithdraw",
602                request,
603                options,
604            )
605            .await
606    }
607}