1#[derive(Clone, PartialEq, ::prost::Message)]
4pub struct LqtCheckNullifierRequest {
5 #[prost(uint64, tag = "1")]
7 pub epoch_index: u64,
8 #[prost(message, optional, tag = "2")]
10 pub nullifier: ::core::option::Option<super::super::sct::v1::Nullifier>,
11}
12impl ::prost::Name for LqtCheckNullifierRequest {
13 const NAME: &'static str = "LqtCheckNullifierRequest";
14 const PACKAGE: &'static str = "penumbra.core.component.funding.v1";
15 fn full_name() -> ::prost::alloc::string::String {
16 "penumbra.core.component.funding.v1.LqtCheckNullifierRequest".into()
17 }
18 fn type_url() -> ::prost::alloc::string::String {
19 "/penumbra.core.component.funding.v1.LqtCheckNullifierRequest".into()
20 }
21}
22#[derive(Clone, PartialEq, ::prost::Message)]
24pub struct LqtCheckNullifierResponse {
25 #[prost(message, optional, tag = "1")]
28 pub transaction: ::core::option::Option<
29 super::super::super::txhash::v1::TransactionId,
30 >,
31 #[prost(bool, tag = "2")]
33 pub already_voted: bool,
34 #[prost(uint64, tag = "3")]
36 pub epoch_index: u64,
37}
38impl ::prost::Name for LqtCheckNullifierResponse {
39 const NAME: &'static str = "LqtCheckNullifierResponse";
40 const PACKAGE: &'static str = "penumbra.core.component.funding.v1";
41 fn full_name() -> ::prost::alloc::string::String {
42 "penumbra.core.component.funding.v1.LqtCheckNullifierResponse".into()
43 }
44 fn type_url() -> ::prost::alloc::string::String {
45 "/penumbra.core.component.funding.v1.LqtCheckNullifierResponse".into()
46 }
47}
48#[derive(Clone, Copy, PartialEq, ::prost::Message)]
50pub struct FundingParameters {
51 #[prost(message, optional, tag = "1")]
53 pub liquidity_tournament: ::core::option::Option<
54 funding_parameters::LiquidityTournament,
55 >,
56}
57pub mod funding_parameters {
59 #[derive(Clone, Copy, PartialEq, ::prost::Message)]
60 pub struct LiquidityTournament {
61 #[prost(uint64, tag = "1")]
65 pub gauge_threshold_percent: u64,
66 #[prost(uint64, tag = "2")]
70 pub max_positions: u64,
71 #[prost(uint64, tag = "3")]
75 pub max_delegators: u64,
76 #[prost(uint64, tag = "4")]
80 pub delegator_share_percent: u64,
81 }
82 impl ::prost::Name for LiquidityTournament {
83 const NAME: &'static str = "LiquidityTournament";
84 const PACKAGE: &'static str = "penumbra.core.component.funding.v1";
85 fn full_name() -> ::prost::alloc::string::String {
86 "penumbra.core.component.funding.v1.FundingParameters.LiquidityTournament"
87 .into()
88 }
89 fn type_url() -> ::prost::alloc::string::String {
90 "/penumbra.core.component.funding.v1.FundingParameters.LiquidityTournament"
91 .into()
92 }
93 }
94}
95impl ::prost::Name for FundingParameters {
96 const NAME: &'static str = "FundingParameters";
97 const PACKAGE: &'static str = "penumbra.core.component.funding.v1";
98 fn full_name() -> ::prost::alloc::string::String {
99 "penumbra.core.component.funding.v1.FundingParameters".into()
100 }
101 fn type_url() -> ::prost::alloc::string::String {
102 "/penumbra.core.component.funding.v1.FundingParameters".into()
103 }
104}
105#[derive(Clone, Copy, PartialEq, ::prost::Message)]
107pub struct GenesisContent {
108 #[prost(message, optional, tag = "1")]
109 pub funding_params: ::core::option::Option<FundingParameters>,
110}
111impl ::prost::Name for GenesisContent {
112 const NAME: &'static str = "GenesisContent";
113 const PACKAGE: &'static str = "penumbra.core.component.funding.v1";
114 fn full_name() -> ::prost::alloc::string::String {
115 "penumbra.core.component.funding.v1.GenesisContent".into()
116 }
117 fn type_url() -> ::prost::alloc::string::String {
118 "/penumbra.core.component.funding.v1.GenesisContent".into()
119 }
120}
121#[derive(Clone, PartialEq, ::prost::Message)]
123pub struct EventFundingStreamReward {
124 #[prost(string, tag = "1")]
129 pub recipient: ::prost::alloc::string::String,
130 #[prost(uint64, tag = "2")]
132 pub epoch_index: u64,
133 #[prost(message, optional, tag = "3")]
135 pub reward_amount: ::core::option::Option<super::super::super::num::v1::Amount>,
136}
137impl ::prost::Name for EventFundingStreamReward {
138 const NAME: &'static str = "EventFundingStreamReward";
139 const PACKAGE: &'static str = "penumbra.core.component.funding.v1";
140 fn full_name() -> ::prost::alloc::string::String {
141 "penumbra.core.component.funding.v1.EventFundingStreamReward".into()
142 }
143 fn type_url() -> ::prost::alloc::string::String {
144 "/penumbra.core.component.funding.v1.EventFundingStreamReward".into()
145 }
146}
147#[derive(Clone, PartialEq, ::prost::Message)]
149pub struct ActionLiquidityTournamentVote {
150 #[prost(message, optional, tag = "1")]
152 pub body: ::core::option::Option<LiquidityTournamentVoteBody>,
153 #[prost(message, optional, tag = "2")]
155 pub auth_sig: ::core::option::Option<
156 super::super::super::super::crypto::decaf377_rdsa::v1::SpendAuthSignature,
157 >,
158 #[prost(message, optional, tag = "3")]
160 pub proof: ::core::option::Option<ZkLiquidityTournamentVoteProof>,
161}
162impl ::prost::Name for ActionLiquidityTournamentVote {
163 const NAME: &'static str = "ActionLiquidityTournamentVote";
164 const PACKAGE: &'static str = "penumbra.core.component.funding.v1";
165 fn full_name() -> ::prost::alloc::string::String {
166 "penumbra.core.component.funding.v1.ActionLiquidityTournamentVote".into()
167 }
168 fn type_url() -> ::prost::alloc::string::String {
169 "/penumbra.core.component.funding.v1.ActionLiquidityTournamentVote".into()
170 }
171}
172#[derive(Clone, PartialEq, ::prost::Message)]
173pub struct LiquidityTournamentVoteBody {
174 #[prost(message, optional, tag = "1")]
176 pub incentivized: ::core::option::Option<super::super::super::asset::v1::Denom>,
177 #[prost(message, optional, tag = "2")]
179 pub rewards_recipient: ::core::option::Option<
180 super::super::super::keys::v1::Address,
181 >,
182 #[prost(uint64, tag = "3")]
184 pub start_position: u64,
185 #[prost(message, optional, tag = "4")]
189 pub value: ::core::option::Option<super::super::super::asset::v1::Value>,
190 #[prost(message, optional, tag = "5")]
192 pub nullifier: ::core::option::Option<super::super::sct::v1::Nullifier>,
193 #[prost(message, optional, tag = "6")]
195 pub rk: ::core::option::Option<
196 super::super::super::super::crypto::decaf377_rdsa::v1::SpendVerificationKey,
197 >,
198}
199impl ::prost::Name for LiquidityTournamentVoteBody {
200 const NAME: &'static str = "LiquidityTournamentVoteBody";
201 const PACKAGE: &'static str = "penumbra.core.component.funding.v1";
202 fn full_name() -> ::prost::alloc::string::String {
203 "penumbra.core.component.funding.v1.LiquidityTournamentVoteBody".into()
204 }
205 fn type_url() -> ::prost::alloc::string::String {
206 "/penumbra.core.component.funding.v1.LiquidityTournamentVoteBody".into()
207 }
208}
209#[derive(Clone, PartialEq, ::prost::Message)]
211pub struct ActionLiquidityTournamentVotePlan {
212 #[prost(message, optional, tag = "1")]
214 pub incentivized: ::core::option::Option<super::super::super::asset::v1::Denom>,
215 #[prost(message, optional, tag = "2")]
217 pub rewards_recipient: ::core::option::Option<
218 super::super::super::keys::v1::Address,
219 >,
220 #[prost(message, optional, tag = "3")]
222 pub staked_note: ::core::option::Option<super::super::shielded_pool::v1::Note>,
223 #[prost(uint64, tag = "4")]
225 pub staked_note_position: u64,
226 #[prost(uint64, tag = "5")]
228 pub start_position: u64,
229 #[prost(bytes = "vec", tag = "6")]
231 pub randomizer: ::prost::alloc::vec::Vec<u8>,
232 #[prost(bytes = "vec", tag = "7")]
233 pub proof_blinding_r: ::prost::alloc::vec::Vec<u8>,
234 #[prost(bytes = "vec", tag = "8")]
235 pub proof_blinding_s: ::prost::alloc::vec::Vec<u8>,
236}
237impl ::prost::Name for ActionLiquidityTournamentVotePlan {
238 const NAME: &'static str = "ActionLiquidityTournamentVotePlan";
239 const PACKAGE: &'static str = "penumbra.core.component.funding.v1";
240 fn full_name() -> ::prost::alloc::string::String {
241 "penumbra.core.component.funding.v1.ActionLiquidityTournamentVotePlan".into()
242 }
243 fn type_url() -> ::prost::alloc::string::String {
244 "/penumbra.core.component.funding.v1.ActionLiquidityTournamentVotePlan".into()
245 }
246}
247#[derive(Clone, PartialEq, ::prost::Message)]
249pub struct ZkLiquidityTournamentVoteProof {
250 #[prost(bytes = "vec", tag = "1")]
251 pub inner: ::prost::alloc::vec::Vec<u8>,
252}
253impl ::prost::Name for ZkLiquidityTournamentVoteProof {
254 const NAME: &'static str = "ZKLiquidityTournamentVoteProof";
255 const PACKAGE: &'static str = "penumbra.core.component.funding.v1";
256 fn full_name() -> ::prost::alloc::string::String {
257 "penumbra.core.component.funding.v1.ZKLiquidityTournamentVoteProof".into()
258 }
259 fn type_url() -> ::prost::alloc::string::String {
260 "/penumbra.core.component.funding.v1.ZKLiquidityTournamentVoteProof".into()
261 }
262}
263#[derive(Clone, PartialEq, ::prost::Message)]
264pub struct ActionLiquidityTournamentVoteView {
265 #[prost(
266 oneof = "action_liquidity_tournament_vote_view::LiquidityTournamentVote",
267 tags = "1, 2"
268 )]
269 pub liquidity_tournament_vote: ::core::option::Option<
270 action_liquidity_tournament_vote_view::LiquidityTournamentVote,
271 >,
272}
273pub mod action_liquidity_tournament_vote_view {
275 #[derive(Clone, PartialEq, ::prost::Message)]
277 pub struct Visible {
278 #[prost(message, optional, tag = "1")]
279 pub vote: ::core::option::Option<super::ActionLiquidityTournamentVote>,
280 #[prost(message, optional, tag = "2")]
281 pub note: ::core::option::Option<
282 super::super::super::shielded_pool::v1::NoteView,
283 >,
284 }
285 impl ::prost::Name for Visible {
286 const NAME: &'static str = "Visible";
287 const PACKAGE: &'static str = "penumbra.core.component.funding.v1";
288 fn full_name() -> ::prost::alloc::string::String {
289 "penumbra.core.component.funding.v1.ActionLiquidityTournamentVoteView.Visible"
290 .into()
291 }
292 fn type_url() -> ::prost::alloc::string::String {
293 "/penumbra.core.component.funding.v1.ActionLiquidityTournamentVoteView.Visible"
294 .into()
295 }
296 }
297 #[derive(Clone, PartialEq, ::prost::Message)]
298 pub struct Opaque {
299 #[prost(message, optional, tag = "1")]
300 pub vote: ::core::option::Option<super::ActionLiquidityTournamentVote>,
301 }
302 impl ::prost::Name for Opaque {
303 const NAME: &'static str = "Opaque";
304 const PACKAGE: &'static str = "penumbra.core.component.funding.v1";
305 fn full_name() -> ::prost::alloc::string::String {
306 "penumbra.core.component.funding.v1.ActionLiquidityTournamentVoteView.Opaque"
307 .into()
308 }
309 fn type_url() -> ::prost::alloc::string::String {
310 "/penumbra.core.component.funding.v1.ActionLiquidityTournamentVoteView.Opaque"
311 .into()
312 }
313 }
314 #[derive(Clone, PartialEq, ::prost::Oneof)]
315 pub enum LiquidityTournamentVote {
316 #[prost(message, tag = "1")]
317 Visible(Visible),
318 #[prost(message, tag = "2")]
319 Opaque(Opaque),
320 }
321}
322impl ::prost::Name for ActionLiquidityTournamentVoteView {
323 const NAME: &'static str = "ActionLiquidityTournamentVoteView";
324 const PACKAGE: &'static str = "penumbra.core.component.funding.v1";
325 fn full_name() -> ::prost::alloc::string::String {
326 "penumbra.core.component.funding.v1.ActionLiquidityTournamentVoteView".into()
327 }
328 fn type_url() -> ::prost::alloc::string::String {
329 "/penumbra.core.component.funding.v1.ActionLiquidityTournamentVoteView".into()
330 }
331}
332#[derive(Clone, PartialEq, ::prost::Message)]
333pub struct EventLqtDelegatorReward {
334 #[prost(uint64, tag = "1")]
336 pub epoch_index: u64,
337 #[prost(message, optional, tag = "2")]
339 pub reward_amount: ::core::option::Option<super::super::super::num::v1::Amount>,
340 #[prost(message, optional, tag = "3")]
342 pub delegation_tokens: ::core::option::Option<super::super::super::asset::v1::Value>,
343 #[prost(message, optional, tag = "4")]
345 pub address: ::core::option::Option<super::super::super::keys::v1::Address>,
346 #[prost(message, optional, tag = "5")]
348 pub incentivized_asset_id: ::core::option::Option<
349 super::super::super::asset::v1::AssetId,
350 >,
351}
352impl ::prost::Name for EventLqtDelegatorReward {
353 const NAME: &'static str = "EventLqtDelegatorReward";
354 const PACKAGE: &'static str = "penumbra.core.component.funding.v1";
355 fn full_name() -> ::prost::alloc::string::String {
356 "penumbra.core.component.funding.v1.EventLqtDelegatorReward".into()
357 }
358 fn type_url() -> ::prost::alloc::string::String {
359 "/penumbra.core.component.funding.v1.EventLqtDelegatorReward".into()
360 }
361}
362#[derive(Clone, PartialEq, ::prost::Message)]
363pub struct EventLqtPositionReward {
364 #[prost(uint64, tag = "1")]
366 pub epoch_index: u64,
367 #[prost(message, optional, tag = "2")]
369 pub reward_amount: ::core::option::Option<super::super::super::num::v1::Amount>,
370 #[prost(message, optional, tag = "3")]
372 pub position_id: ::core::option::Option<super::super::dex::v1::PositionId>,
373 #[prost(message, optional, tag = "4")]
375 pub incentivized_asset_id: ::core::option::Option<
376 super::super::super::asset::v1::AssetId,
377 >,
378 #[prost(message, optional, tag = "10")]
380 pub tournament_volume: ::core::option::Option<super::super::super::num::v1::Amount>,
381 #[prost(message, optional, tag = "11")]
383 pub position_volume: ::core::option::Option<super::super::super::num::v1::Amount>,
384}
385impl ::prost::Name for EventLqtPositionReward {
386 const NAME: &'static str = "EventLqtPositionReward";
387 const PACKAGE: &'static str = "penumbra.core.component.funding.v1";
388 fn full_name() -> ::prost::alloc::string::String {
389 "penumbra.core.component.funding.v1.EventLqtPositionReward".into()
390 }
391 fn type_url() -> ::prost::alloc::string::String {
392 "/penumbra.core.component.funding.v1.EventLqtPositionReward".into()
393 }
394}
395#[derive(Clone, PartialEq, ::prost::Message)]
396pub struct EventLqtVote {
397 #[prost(uint64, tag = "1")]
399 pub epoch_index: u64,
400 #[prost(message, optional, tag = "2")]
402 pub voting_power: ::core::option::Option<super::super::super::num::v1::Amount>,
403 #[prost(message, optional, tag = "3")]
405 pub incentivized_asset_id: ::core::option::Option<
406 super::super::super::asset::v1::AssetId,
407 >,
408 #[prost(message, optional, tag = "4")]
410 pub incentivized: ::core::option::Option<super::super::super::asset::v1::Denom>,
411 #[prost(message, optional, tag = "5")]
413 pub rewards_recipient: ::core::option::Option<
414 super::super::super::keys::v1::Address,
415 >,
416 #[prost(message, optional, tag = "6")]
418 pub tx_id: ::core::option::Option<super::super::super::txhash::v1::TransactionId>,
419}
420impl ::prost::Name for EventLqtVote {
421 const NAME: &'static str = "EventLqtVote";
422 const PACKAGE: &'static str = "penumbra.core.component.funding.v1";
423 fn full_name() -> ::prost::alloc::string::String {
424 "penumbra.core.component.funding.v1.EventLqtVote".into()
425 }
426 fn type_url() -> ::prost::alloc::string::String {
427 "/penumbra.core.component.funding.v1.EventLqtVote".into()
428 }
429}
430#[cfg(feature = "rpc")]
432pub mod funding_service_client {
433 #![allow(
434 unused_variables,
435 dead_code,
436 missing_docs,
437 clippy::wildcard_imports,
438 clippy::let_unit_value,
439 )]
440 use tonic::codegen::*;
441 use tonic::codegen::http::Uri;
442 #[derive(Debug, Clone)]
444 pub struct FundingServiceClient<T> {
445 inner: tonic::client::Grpc<T>,
446 }
447 impl FundingServiceClient<tonic::transport::Channel> {
448 pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
450 where
451 D: TryInto<tonic::transport::Endpoint>,
452 D::Error: Into<StdError>,
453 {
454 let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
455 Ok(Self::new(conn))
456 }
457 }
458 impl<T> FundingServiceClient<T>
459 where
460 T: tonic::client::GrpcService<tonic::body::BoxBody>,
461 T::Error: Into<StdError>,
462 T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static,
463 <T::ResponseBody as Body>::Error: Into<StdError> + std::marker::Send,
464 {
465 pub fn new(inner: T) -> Self {
466 let inner = tonic::client::Grpc::new(inner);
467 Self { inner }
468 }
469 pub fn with_origin(inner: T, origin: Uri) -> Self {
470 let inner = tonic::client::Grpc::with_origin(inner, origin);
471 Self { inner }
472 }
473 pub fn with_interceptor<F>(
474 inner: T,
475 interceptor: F,
476 ) -> FundingServiceClient<InterceptedService<T, F>>
477 where
478 F: tonic::service::Interceptor,
479 T::ResponseBody: Default,
480 T: tonic::codegen::Service<
481 http::Request<tonic::body::BoxBody>,
482 Response = http::Response<
483 <T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody,
484 >,
485 >,
486 <T as tonic::codegen::Service<
487 http::Request<tonic::body::BoxBody>,
488 >>::Error: Into<StdError> + std::marker::Send + std::marker::Sync,
489 {
490 FundingServiceClient::new(InterceptedService::new(inner, interceptor))
491 }
492 #[must_use]
497 pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
498 self.inner = self.inner.send_compressed(encoding);
499 self
500 }
501 #[must_use]
503 pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
504 self.inner = self.inner.accept_compressed(encoding);
505 self
506 }
507 #[must_use]
511 pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
512 self.inner = self.inner.max_decoding_message_size(limit);
513 self
514 }
515 #[must_use]
519 pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
520 self.inner = self.inner.max_encoding_message_size(limit);
521 self
522 }
523 pub async fn lqt_check_nullifier(
525 &mut self,
526 request: impl tonic::IntoRequest<super::LqtCheckNullifierRequest>,
527 ) -> std::result::Result<
528 tonic::Response<super::LqtCheckNullifierResponse>,
529 tonic::Status,
530 > {
531 self.inner
532 .ready()
533 .await
534 .map_err(|e| {
535 tonic::Status::unknown(
536 format!("Service was not ready: {}", e.into()),
537 )
538 })?;
539 let codec = tonic::codec::ProstCodec::default();
540 let path = http::uri::PathAndQuery::from_static(
541 "/penumbra.core.component.funding.v1.FundingService/LqtCheckNullifier",
542 );
543 let mut req = request.into_request();
544 req.extensions_mut()
545 .insert(
546 GrpcMethod::new(
547 "penumbra.core.component.funding.v1.FundingService",
548 "LqtCheckNullifier",
549 ),
550 );
551 self.inner.unary(req, path, codec).await
552 }
553 }
554}
555#[cfg(feature = "rpc")]
557pub mod funding_service_server {
558 #![allow(
559 unused_variables,
560 dead_code,
561 missing_docs,
562 clippy::wildcard_imports,
563 clippy::let_unit_value,
564 )]
565 use tonic::codegen::*;
566 #[async_trait]
568 pub trait FundingService: std::marker::Send + std::marker::Sync + 'static {
569 async fn lqt_check_nullifier(
571 &self,
572 request: tonic::Request<super::LqtCheckNullifierRequest>,
573 ) -> std::result::Result<
574 tonic::Response<super::LqtCheckNullifierResponse>,
575 tonic::Status,
576 >;
577 }
578 #[derive(Debug)]
580 pub struct FundingServiceServer<T> {
581 inner: Arc<T>,
582 accept_compression_encodings: EnabledCompressionEncodings,
583 send_compression_encodings: EnabledCompressionEncodings,
584 max_decoding_message_size: Option<usize>,
585 max_encoding_message_size: Option<usize>,
586 }
587 impl<T> FundingServiceServer<T> {
588 pub fn new(inner: T) -> Self {
589 Self::from_arc(Arc::new(inner))
590 }
591 pub fn from_arc(inner: Arc<T>) -> Self {
592 Self {
593 inner,
594 accept_compression_encodings: Default::default(),
595 send_compression_encodings: Default::default(),
596 max_decoding_message_size: None,
597 max_encoding_message_size: None,
598 }
599 }
600 pub fn with_interceptor<F>(
601 inner: T,
602 interceptor: F,
603 ) -> InterceptedService<Self, F>
604 where
605 F: tonic::service::Interceptor,
606 {
607 InterceptedService::new(Self::new(inner), interceptor)
608 }
609 #[must_use]
611 pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
612 self.accept_compression_encodings.enable(encoding);
613 self
614 }
615 #[must_use]
617 pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
618 self.send_compression_encodings.enable(encoding);
619 self
620 }
621 #[must_use]
625 pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
626 self.max_decoding_message_size = Some(limit);
627 self
628 }
629 #[must_use]
633 pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
634 self.max_encoding_message_size = Some(limit);
635 self
636 }
637 }
638 impl<T, B> tonic::codegen::Service<http::Request<B>> for FundingServiceServer<T>
639 where
640 T: FundingService,
641 B: Body + std::marker::Send + 'static,
642 B::Error: Into<StdError> + std::marker::Send + 'static,
643 {
644 type Response = http::Response<tonic::body::BoxBody>;
645 type Error = std::convert::Infallible;
646 type Future = BoxFuture<Self::Response, Self::Error>;
647 fn poll_ready(
648 &mut self,
649 _cx: &mut Context<'_>,
650 ) -> Poll<std::result::Result<(), Self::Error>> {
651 Poll::Ready(Ok(()))
652 }
653 fn call(&mut self, req: http::Request<B>) -> Self::Future {
654 match req.uri().path() {
655 "/penumbra.core.component.funding.v1.FundingService/LqtCheckNullifier" => {
656 #[allow(non_camel_case_types)]
657 struct LqtCheckNullifierSvc<T: FundingService>(pub Arc<T>);
658 impl<
659 T: FundingService,
660 > tonic::server::UnaryService<super::LqtCheckNullifierRequest>
661 for LqtCheckNullifierSvc<T> {
662 type Response = super::LqtCheckNullifierResponse;
663 type Future = BoxFuture<
664 tonic::Response<Self::Response>,
665 tonic::Status,
666 >;
667 fn call(
668 &mut self,
669 request: tonic::Request<super::LqtCheckNullifierRequest>,
670 ) -> Self::Future {
671 let inner = Arc::clone(&self.0);
672 let fut = async move {
673 <T as FundingService>::lqt_check_nullifier(&inner, request)
674 .await
675 };
676 Box::pin(fut)
677 }
678 }
679 let accept_compression_encodings = self.accept_compression_encodings;
680 let send_compression_encodings = self.send_compression_encodings;
681 let max_decoding_message_size = self.max_decoding_message_size;
682 let max_encoding_message_size = self.max_encoding_message_size;
683 let inner = self.inner.clone();
684 let fut = async move {
685 let method = LqtCheckNullifierSvc(inner);
686 let codec = tonic::codec::ProstCodec::default();
687 let mut grpc = tonic::server::Grpc::new(codec)
688 .apply_compression_config(
689 accept_compression_encodings,
690 send_compression_encodings,
691 )
692 .apply_max_message_size_config(
693 max_decoding_message_size,
694 max_encoding_message_size,
695 );
696 let res = grpc.unary(method, req).await;
697 Ok(res)
698 };
699 Box::pin(fut)
700 }
701 _ => {
702 Box::pin(async move {
703 let mut response = http::Response::new(empty_body());
704 let headers = response.headers_mut();
705 headers
706 .insert(
707 tonic::Status::GRPC_STATUS,
708 (tonic::Code::Unimplemented as i32).into(),
709 );
710 headers
711 .insert(
712 http::header::CONTENT_TYPE,
713 tonic::metadata::GRPC_CONTENT_TYPE,
714 );
715 Ok(response)
716 })
717 }
718 }
719 }
720 }
721 impl<T> Clone for FundingServiceServer<T> {
722 fn clone(&self) -> Self {
723 let inner = self.inner.clone();
724 Self {
725 inner,
726 accept_compression_encodings: self.accept_compression_encodings,
727 send_compression_encodings: self.send_compression_encodings,
728 max_decoding_message_size: self.max_decoding_message_size,
729 max_encoding_message_size: self.max_encoding_message_size,
730 }
731 }
732 }
733 pub const SERVICE_NAME: &str = "penumbra.core.component.funding.v1.FundingService";
735 impl<T> tonic::server::NamedService for FundingServiceServer<T> {
736 const NAME: &'static str = SERVICE_NAME;
737 }
738}