Skip to main content

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

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