1#[derive(Clone, Copy, PartialEq, ::prost::Message)]
4pub struct ShieldedPoolParameters {
5 #[deprecated]
6 #[prost(message, optional, tag = "1")]
7 pub fixed_fmd_params: ::core::option::Option<FmdParameters>,
8 #[prost(message, optional, tag = "2")]
9 pub fmd_meta_params: ::core::option::Option<FmdMetaParameters>,
10}
11impl ::prost::Name for ShieldedPoolParameters {
12 const NAME: &'static str = "ShieldedPoolParameters";
13 const PACKAGE: &'static str = "penumbra.core.component.shielded_pool.v1";
14 fn full_name() -> ::prost::alloc::string::String {
15 "penumbra.core.component.shielded_pool.v1.ShieldedPoolParameters".into()
16 }
17 fn type_url() -> ::prost::alloc::string::String {
18 "/penumbra.core.component.shielded_pool.v1.ShieldedPoolParameters".into()
19 }
20}
21#[derive(Clone, PartialEq, ::prost::Message)]
23pub struct GenesisContent {
24 #[prost(message, optional, tag = "1")]
25 pub shielded_pool_params: ::core::option::Option<ShieldedPoolParameters>,
26 #[prost(message, repeated, tag = "3")]
28 pub allocations: ::prost::alloc::vec::Vec<genesis_content::Allocation>,
29}
30pub mod genesis_content {
32 #[derive(Clone, PartialEq, ::prost::Message)]
33 pub struct Allocation {
34 #[prost(message, optional, tag = "1")]
35 pub amount: ::core::option::Option<super::super::super::super::num::v1::Amount>,
36 #[prost(string, tag = "2")]
37 pub denom: ::prost::alloc::string::String,
38 #[prost(message, optional, tag = "3")]
39 pub address: ::core::option::Option<
40 super::super::super::super::keys::v1::Address,
41 >,
42 }
43 impl ::prost::Name for Allocation {
44 const NAME: &'static str = "Allocation";
45 const PACKAGE: &'static str = "penumbra.core.component.shielded_pool.v1";
46 fn full_name() -> ::prost::alloc::string::String {
47 "penumbra.core.component.shielded_pool.v1.GenesisContent.Allocation".into()
48 }
49 fn type_url() -> ::prost::alloc::string::String {
50 "/penumbra.core.component.shielded_pool.v1.GenesisContent.Allocation".into()
51 }
52 }
53}
54impl ::prost::Name for GenesisContent {
55 const NAME: &'static str = "GenesisContent";
56 const PACKAGE: &'static str = "penumbra.core.component.shielded_pool.v1";
57 fn full_name() -> ::prost::alloc::string::String {
58 "penumbra.core.component.shielded_pool.v1.GenesisContent".into()
59 }
60 fn type_url() -> ::prost::alloc::string::String {
61 "/penumbra.core.component.shielded_pool.v1.GenesisContent".into()
62 }
63}
64#[derive(Clone, Copy, PartialEq, ::prost::Message)]
66pub struct FmdMetaParameters {
67 #[prost(uint64, tag = "1")]
69 pub fmd_grace_period_blocks: u64,
70 #[prost(oneof = "fmd_meta_parameters::Algorithm", tags = "2, 3")]
72 pub algorithm: ::core::option::Option<fmd_meta_parameters::Algorithm>,
73}
74pub mod fmd_meta_parameters {
76 #[derive(Clone, Copy, PartialEq, ::prost::Message)]
78 pub struct AlgorithmSlidingWindow {
79 #[prost(uint32, tag = "1")]
83 pub window_update_periods: u32,
84 #[prost(uint32, tag = "2")]
86 pub targeted_detections_per_window: u32,
87 }
88 impl ::prost::Name for AlgorithmSlidingWindow {
89 const NAME: &'static str = "AlgorithmSlidingWindow";
90 const PACKAGE: &'static str = "penumbra.core.component.shielded_pool.v1";
91 fn full_name() -> ::prost::alloc::string::String {
92 "penumbra.core.component.shielded_pool.v1.FmdMetaParameters.AlgorithmSlidingWindow"
93 .into()
94 }
95 fn type_url() -> ::prost::alloc::string::String {
96 "/penumbra.core.component.shielded_pool.v1.FmdMetaParameters.AlgorithmSlidingWindow"
97 .into()
98 }
99 }
100 #[derive(Clone, Copy, PartialEq, ::prost::Oneof)]
102 pub enum Algorithm {
103 #[prost(uint32, tag = "2")]
104 FixedPrecisionBits(u32),
105 #[prost(message, tag = "3")]
106 SlidingWindow(AlgorithmSlidingWindow),
107 }
108}
109impl ::prost::Name for FmdMetaParameters {
110 const NAME: &'static str = "FmdMetaParameters";
111 const PACKAGE: &'static str = "penumbra.core.component.shielded_pool.v1";
112 fn full_name() -> ::prost::alloc::string::String {
113 "penumbra.core.component.shielded_pool.v1.FmdMetaParameters".into()
114 }
115 fn type_url() -> ::prost::alloc::string::String {
116 "/penumbra.core.component.shielded_pool.v1.FmdMetaParameters".into()
117 }
118}
119#[derive(Clone, Copy, PartialEq, ::prost::Message)]
121pub struct FmdMetaParametersAlgorithmState {
122 #[prost(oneof = "fmd_meta_parameters_algorithm_state::State", tags = "1, 2")]
123 pub state: ::core::option::Option<fmd_meta_parameters_algorithm_state::State>,
124}
125pub mod fmd_meta_parameters_algorithm_state {
127 #[derive(Clone, Copy, PartialEq, ::prost::Message)]
129 pub struct FixedState {}
130 impl ::prost::Name for FixedState {
131 const NAME: &'static str = "FixedState";
132 const PACKAGE: &'static str = "penumbra.core.component.shielded_pool.v1";
133 fn full_name() -> ::prost::alloc::string::String {
134 "penumbra.core.component.shielded_pool.v1.FmdMetaParametersAlgorithmState.FixedState"
135 .into()
136 }
137 fn type_url() -> ::prost::alloc::string::String {
138 "/penumbra.core.component.shielded_pool.v1.FmdMetaParametersAlgorithmState.FixedState"
139 .into()
140 }
141 }
142 #[derive(Clone, Copy, PartialEq, ::prost::Message)]
144 pub struct SlidingWindowState {
145 #[prost(uint32, tag = "1")]
147 pub approximate_clue_count: u32,
148 }
149 impl ::prost::Name for SlidingWindowState {
150 const NAME: &'static str = "SlidingWindowState";
151 const PACKAGE: &'static str = "penumbra.core.component.shielded_pool.v1";
152 fn full_name() -> ::prost::alloc::string::String {
153 "penumbra.core.component.shielded_pool.v1.FmdMetaParametersAlgorithmState.SlidingWindowState"
154 .into()
155 }
156 fn type_url() -> ::prost::alloc::string::String {
157 "/penumbra.core.component.shielded_pool.v1.FmdMetaParametersAlgorithmState.SlidingWindowState"
158 .into()
159 }
160 }
161 #[derive(Clone, Copy, PartialEq, ::prost::Oneof)]
162 pub enum State {
163 #[prost(message, tag = "1")]
164 Fixed(FixedState),
165 #[prost(message, tag = "2")]
166 SlidingWindow(SlidingWindowState),
167 }
168}
169impl ::prost::Name for FmdMetaParametersAlgorithmState {
170 const NAME: &'static str = "FmdMetaParametersAlgorithmState";
171 const PACKAGE: &'static str = "penumbra.core.component.shielded_pool.v1";
172 fn full_name() -> ::prost::alloc::string::String {
173 "penumbra.core.component.shielded_pool.v1.FmdMetaParametersAlgorithmState".into()
174 }
175 fn type_url() -> ::prost::alloc::string::String {
176 "/penumbra.core.component.shielded_pool.v1.FmdMetaParametersAlgorithmState"
177 .into()
178 }
179}
180#[derive(Clone, Copy, PartialEq, ::prost::Message)]
182pub struct FmdParameters {
183 #[prost(uint32, tag = "1")]
184 pub precision_bits: u32,
185 #[prost(uint64, tag = "2")]
186 pub as_of_block_height: u64,
187}
188impl ::prost::Name for FmdParameters {
189 const NAME: &'static str = "FmdParameters";
190 const PACKAGE: &'static str = "penumbra.core.component.shielded_pool.v1";
191 fn full_name() -> ::prost::alloc::string::String {
192 "penumbra.core.component.shielded_pool.v1.FmdParameters".into()
193 }
194 fn type_url() -> ::prost::alloc::string::String {
195 "/penumbra.core.component.shielded_pool.v1.FmdParameters".into()
196 }
197}
198#[derive(Clone, PartialEq, ::prost::Message)]
199pub struct Note {
200 #[prost(message, optional, tag = "1")]
201 pub value: ::core::option::Option<super::super::super::asset::v1::Value>,
202 #[prost(bytes = "vec", tag = "2")]
203 pub rseed: ::prost::alloc::vec::Vec<u8>,
204 #[prost(message, optional, tag = "3")]
205 pub address: ::core::option::Option<super::super::super::keys::v1::Address>,
206}
207impl ::prost::Name for Note {
208 const NAME: &'static str = "Note";
209 const PACKAGE: &'static str = "penumbra.core.component.shielded_pool.v1";
210 fn full_name() -> ::prost::alloc::string::String {
211 "penumbra.core.component.shielded_pool.v1.Note".into()
212 }
213 fn type_url() -> ::prost::alloc::string::String {
214 "/penumbra.core.component.shielded_pool.v1.Note".into()
215 }
216}
217#[derive(Clone, PartialEq, ::prost::Message)]
218pub struct NoteView {
219 #[prost(message, optional, tag = "1")]
220 pub value: ::core::option::Option<super::super::super::asset::v1::ValueView>,
221 #[prost(bytes = "vec", tag = "2")]
222 pub rseed: ::prost::alloc::vec::Vec<u8>,
223 #[prost(message, optional, tag = "3")]
224 pub address: ::core::option::Option<super::super::super::keys::v1::AddressView>,
225}
226impl ::prost::Name for NoteView {
227 const NAME: &'static str = "NoteView";
228 const PACKAGE: &'static str = "penumbra.core.component.shielded_pool.v1";
229 fn full_name() -> ::prost::alloc::string::String {
230 "penumbra.core.component.shielded_pool.v1.NoteView".into()
231 }
232 fn type_url() -> ::prost::alloc::string::String {
233 "/penumbra.core.component.shielded_pool.v1.NoteView".into()
234 }
235}
236#[derive(Clone, PartialEq, ::prost::Message)]
239pub struct NoteCiphertext {
240 #[prost(bytes = "vec", tag = "1")]
241 pub inner: ::prost::alloc::vec::Vec<u8>,
242}
243impl ::prost::Name for NoteCiphertext {
244 const NAME: &'static str = "NoteCiphertext";
245 const PACKAGE: &'static str = "penumbra.core.component.shielded_pool.v1";
246 fn full_name() -> ::prost::alloc::string::String {
247 "penumbra.core.component.shielded_pool.v1.NoteCiphertext".into()
248 }
249 fn type_url() -> ::prost::alloc::string::String {
250 "/penumbra.core.component.shielded_pool.v1.NoteCiphertext".into()
251 }
252}
253#[derive(Clone, PartialEq, ::prost::Message)]
256pub struct NotePayload {
257 #[prost(message, optional, tag = "1")]
259 pub note_commitment: ::core::option::Option<
260 super::super::super::super::crypto::tct::v1::StateCommitment,
261 >,
262 #[prost(bytes = "vec", tag = "2")]
264 pub ephemeral_key: ::prost::alloc::vec::Vec<u8>,
265 #[prost(message, optional, tag = "3")]
268 pub encrypted_note: ::core::option::Option<NoteCiphertext>,
269}
270impl ::prost::Name for NotePayload {
271 const NAME: &'static str = "NotePayload";
272 const PACKAGE: &'static str = "penumbra.core.component.shielded_pool.v1";
273 fn full_name() -> ::prost::alloc::string::String {
274 "penumbra.core.component.shielded_pool.v1.NotePayload".into()
275 }
276 fn type_url() -> ::prost::alloc::string::String {
277 "/penumbra.core.component.shielded_pool.v1.NotePayload".into()
278 }
279}
280#[derive(Clone, PartialEq, ::prost::Message)]
282pub struct ZkOutputProof {
283 #[prost(bytes = "vec", tag = "1")]
284 pub inner: ::prost::alloc::vec::Vec<u8>,
285}
286impl ::prost::Name for ZkOutputProof {
287 const NAME: &'static str = "ZKOutputProof";
288 const PACKAGE: &'static str = "penumbra.core.component.shielded_pool.v1";
289 fn full_name() -> ::prost::alloc::string::String {
290 "penumbra.core.component.shielded_pool.v1.ZKOutputProof".into()
291 }
292 fn type_url() -> ::prost::alloc::string::String {
293 "/penumbra.core.component.shielded_pool.v1.ZKOutputProof".into()
294 }
295}
296#[derive(Clone, PartialEq, ::prost::Message)]
298pub struct ZkSpendProof {
299 #[prost(bytes = "vec", tag = "1")]
300 pub inner: ::prost::alloc::vec::Vec<u8>,
301}
302impl ::prost::Name for ZkSpendProof {
303 const NAME: &'static str = "ZKSpendProof";
304 const PACKAGE: &'static str = "penumbra.core.component.shielded_pool.v1";
305 fn full_name() -> ::prost::alloc::string::String {
306 "penumbra.core.component.shielded_pool.v1.ZKSpendProof".into()
307 }
308 fn type_url() -> ::prost::alloc::string::String {
309 "/penumbra.core.component.shielded_pool.v1.ZKSpendProof".into()
310 }
311}
312#[derive(Clone, PartialEq, ::prost::Message)]
314pub struct ZkNullifierDerivationProof {
315 #[prost(bytes = "vec", tag = "1")]
316 pub inner: ::prost::alloc::vec::Vec<u8>,
317}
318impl ::prost::Name for ZkNullifierDerivationProof {
319 const NAME: &'static str = "ZKNullifierDerivationProof";
320 const PACKAGE: &'static str = "penumbra.core.component.shielded_pool.v1";
321 fn full_name() -> ::prost::alloc::string::String {
322 "penumbra.core.component.shielded_pool.v1.ZKNullifierDerivationProof".into()
323 }
324 fn type_url() -> ::prost::alloc::string::String {
325 "/penumbra.core.component.shielded_pool.v1.ZKNullifierDerivationProof".into()
326 }
327}
328#[derive(Clone, PartialEq, ::prost::Message)]
330pub struct Spend {
331 #[prost(message, optional, tag = "1")]
333 pub body: ::core::option::Option<SpendBody>,
334 #[prost(message, optional, tag = "2")]
336 pub auth_sig: ::core::option::Option<
337 super::super::super::super::crypto::decaf377_rdsa::v1::SpendAuthSignature,
338 >,
339 #[prost(message, optional, tag = "3")]
341 pub proof: ::core::option::Option<ZkSpendProof>,
342}
343impl ::prost::Name for Spend {
344 const NAME: &'static str = "Spend";
345 const PACKAGE: &'static str = "penumbra.core.component.shielded_pool.v1";
346 fn full_name() -> ::prost::alloc::string::String {
347 "penumbra.core.component.shielded_pool.v1.Spend".into()
348 }
349 fn type_url() -> ::prost::alloc::string::String {
350 "/penumbra.core.component.shielded_pool.v1.Spend".into()
351 }
352}
353#[derive(Clone, PartialEq, ::prost::Message)]
355pub struct EventSpend {
356 #[prost(message, optional, tag = "1")]
357 pub nullifier: ::core::option::Option<super::super::sct::v1::Nullifier>,
358}
359impl ::prost::Name for EventSpend {
360 const NAME: &'static str = "EventSpend";
361 const PACKAGE: &'static str = "penumbra.core.component.shielded_pool.v1";
362 fn full_name() -> ::prost::alloc::string::String {
363 "penumbra.core.component.shielded_pool.v1.EventSpend".into()
364 }
365 fn type_url() -> ::prost::alloc::string::String {
366 "/penumbra.core.component.shielded_pool.v1.EventSpend".into()
367 }
368}
369#[derive(Clone, PartialEq, ::prost::Message)]
371pub struct EventOutput {
372 #[prost(message, optional, tag = "1")]
373 pub note_commitment: ::core::option::Option<
374 super::super::super::super::crypto::tct::v1::StateCommitment,
375 >,
376}
377impl ::prost::Name for EventOutput {
378 const NAME: &'static str = "EventOutput";
379 const PACKAGE: &'static str = "penumbra.core.component.shielded_pool.v1";
380 fn full_name() -> ::prost::alloc::string::String {
381 "penumbra.core.component.shielded_pool.v1.EventOutput".into()
382 }
383 fn type_url() -> ::prost::alloc::string::String {
384 "/penumbra.core.component.shielded_pool.v1.EventOutput".into()
385 }
386}
387#[derive(Clone, PartialEq, ::prost::Message)]
389pub struct EventBroadcastClue {
390 #[prost(message, optional, tag = "1")]
391 pub clue: ::core::option::Option<
392 super::super::super::super::crypto::decaf377_fmd::v1::Clue,
393 >,
394 #[prost(message, optional, tag = "2")]
395 pub tx: ::core::option::Option<super::super::super::txhash::v1::TransactionId>,
396}
397impl ::prost::Name for EventBroadcastClue {
398 const NAME: &'static str = "EventBroadcastClue";
399 const PACKAGE: &'static str = "penumbra.core.component.shielded_pool.v1";
400 fn full_name() -> ::prost::alloc::string::String {
401 "penumbra.core.component.shielded_pool.v1.EventBroadcastClue".into()
402 }
403 fn type_url() -> ::prost::alloc::string::String {
404 "/penumbra.core.component.shielded_pool.v1.EventBroadcastClue".into()
405 }
406}
407#[derive(Clone, PartialEq, ::prost::Message)]
411pub struct SpendBody {
412 #[prost(message, optional, tag = "1")]
414 pub balance_commitment: ::core::option::Option<
415 super::super::super::asset::v1::BalanceCommitment,
416 >,
417 #[prost(message, optional, tag = "6")]
419 pub nullifier: ::core::option::Option<super::super::sct::v1::Nullifier>,
420 #[prost(message, optional, tag = "4")]
422 pub rk: ::core::option::Option<
423 super::super::super::super::crypto::decaf377_rdsa::v1::SpendVerificationKey,
424 >,
425 #[prost(bytes = "vec", tag = "7")]
427 pub encrypted_backref: ::prost::alloc::vec::Vec<u8>,
428}
429impl ::prost::Name for SpendBody {
430 const NAME: &'static str = "SpendBody";
431 const PACKAGE: &'static str = "penumbra.core.component.shielded_pool.v1";
432 fn full_name() -> ::prost::alloc::string::String {
433 "penumbra.core.component.shielded_pool.v1.SpendBody".into()
434 }
435 fn type_url() -> ::prost::alloc::string::String {
436 "/penumbra.core.component.shielded_pool.v1.SpendBody".into()
437 }
438}
439#[derive(Clone, PartialEq, ::prost::Message)]
440pub struct SpendView {
441 #[prost(oneof = "spend_view::SpendView", tags = "1, 2")]
442 pub spend_view: ::core::option::Option<spend_view::SpendView>,
443}
444pub mod spend_view {
446 #[derive(Clone, PartialEq, ::prost::Message)]
447 pub struct Visible {
448 #[prost(message, optional, tag = "1")]
449 pub spend: ::core::option::Option<super::Spend>,
450 #[prost(message, optional, tag = "2")]
451 pub note: ::core::option::Option<super::NoteView>,
452 }
453 impl ::prost::Name for Visible {
454 const NAME: &'static str = "Visible";
455 const PACKAGE: &'static str = "penumbra.core.component.shielded_pool.v1";
456 fn full_name() -> ::prost::alloc::string::String {
457 "penumbra.core.component.shielded_pool.v1.SpendView.Visible".into()
458 }
459 fn type_url() -> ::prost::alloc::string::String {
460 "/penumbra.core.component.shielded_pool.v1.SpendView.Visible".into()
461 }
462 }
463 #[derive(Clone, PartialEq, ::prost::Message)]
464 pub struct Opaque {
465 #[prost(message, optional, tag = "1")]
466 pub spend: ::core::option::Option<super::Spend>,
467 }
468 impl ::prost::Name for Opaque {
469 const NAME: &'static str = "Opaque";
470 const PACKAGE: &'static str = "penumbra.core.component.shielded_pool.v1";
471 fn full_name() -> ::prost::alloc::string::String {
472 "penumbra.core.component.shielded_pool.v1.SpendView.Opaque".into()
473 }
474 fn type_url() -> ::prost::alloc::string::String {
475 "/penumbra.core.component.shielded_pool.v1.SpendView.Opaque".into()
476 }
477 }
478 #[derive(Clone, PartialEq, ::prost::Oneof)]
479 pub enum SpendView {
480 #[prost(message, tag = "1")]
481 Visible(Visible),
482 #[prost(message, tag = "2")]
483 Opaque(Opaque),
484 }
485}
486impl ::prost::Name for SpendView {
487 const NAME: &'static str = "SpendView";
488 const PACKAGE: &'static str = "penumbra.core.component.shielded_pool.v1";
489 fn full_name() -> ::prost::alloc::string::String {
490 "penumbra.core.component.shielded_pool.v1.SpendView".into()
491 }
492 fn type_url() -> ::prost::alloc::string::String {
493 "/penumbra.core.component.shielded_pool.v1.SpendView".into()
494 }
495}
496#[derive(Clone, PartialEq, ::prost::Message)]
497pub struct SpendPlan {
498 #[prost(message, optional, tag = "1")]
500 pub note: ::core::option::Option<Note>,
501 #[prost(uint64, tag = "2")]
503 pub position: u64,
504 #[prost(bytes = "vec", tag = "3")]
506 pub randomizer: ::prost::alloc::vec::Vec<u8>,
507 #[prost(bytes = "vec", tag = "4")]
509 pub value_blinding: ::prost::alloc::vec::Vec<u8>,
510 #[prost(bytes = "vec", tag = "5")]
512 pub proof_blinding_r: ::prost::alloc::vec::Vec<u8>,
513 #[prost(bytes = "vec", tag = "6")]
515 pub proof_blinding_s: ::prost::alloc::vec::Vec<u8>,
516}
517impl ::prost::Name for SpendPlan {
518 const NAME: &'static str = "SpendPlan";
519 const PACKAGE: &'static str = "penumbra.core.component.shielded_pool.v1";
520 fn full_name() -> ::prost::alloc::string::String {
521 "penumbra.core.component.shielded_pool.v1.SpendPlan".into()
522 }
523 fn type_url() -> ::prost::alloc::string::String {
524 "/penumbra.core.component.shielded_pool.v1.SpendPlan".into()
525 }
526}
527#[derive(Clone, PartialEq, ::prost::Message)]
529pub struct Output {
530 #[prost(message, optional, tag = "1")]
532 pub body: ::core::option::Option<OutputBody>,
533 #[prost(message, optional, tag = "2")]
535 pub proof: ::core::option::Option<ZkOutputProof>,
536}
537impl ::prost::Name for Output {
538 const NAME: &'static str = "Output";
539 const PACKAGE: &'static str = "penumbra.core.component.shielded_pool.v1";
540 fn full_name() -> ::prost::alloc::string::String {
541 "penumbra.core.component.shielded_pool.v1.Output".into()
542 }
543 fn type_url() -> ::prost::alloc::string::String {
544 "/penumbra.core.component.shielded_pool.v1.Output".into()
545 }
546}
547#[derive(Clone, PartialEq, ::prost::Message)]
551pub struct OutputBody {
552 #[prost(message, optional, tag = "1")]
554 pub note_payload: ::core::option::Option<NotePayload>,
555 #[prost(message, optional, tag = "2")]
557 pub balance_commitment: ::core::option::Option<
558 super::super::super::asset::v1::BalanceCommitment,
559 >,
560 #[prost(bytes = "vec", tag = "3")]
562 pub wrapped_memo_key: ::prost::alloc::vec::Vec<u8>,
563 #[prost(bytes = "vec", tag = "4")]
566 pub ovk_wrapped_key: ::prost::alloc::vec::Vec<u8>,
567}
568impl ::prost::Name for OutputBody {
569 const NAME: &'static str = "OutputBody";
570 const PACKAGE: &'static str = "penumbra.core.component.shielded_pool.v1";
571 fn full_name() -> ::prost::alloc::string::String {
572 "penumbra.core.component.shielded_pool.v1.OutputBody".into()
573 }
574 fn type_url() -> ::prost::alloc::string::String {
575 "/penumbra.core.component.shielded_pool.v1.OutputBody".into()
576 }
577}
578#[derive(Clone, PartialEq, ::prost::Message)]
579pub struct OutputView {
580 #[prost(oneof = "output_view::OutputView", tags = "1, 2")]
581 pub output_view: ::core::option::Option<output_view::OutputView>,
582}
583pub mod output_view {
585 #[derive(Clone, PartialEq, ::prost::Message)]
586 pub struct Visible {
587 #[prost(message, optional, tag = "1")]
588 pub output: ::core::option::Option<super::Output>,
589 #[prost(message, optional, tag = "2")]
590 pub note: ::core::option::Option<super::NoteView>,
591 #[prost(message, optional, tag = "3")]
592 pub payload_key: ::core::option::Option<
593 super::super::super::super::keys::v1::PayloadKey,
594 >,
595 }
596 impl ::prost::Name for Visible {
597 const NAME: &'static str = "Visible";
598 const PACKAGE: &'static str = "penumbra.core.component.shielded_pool.v1";
599 fn full_name() -> ::prost::alloc::string::String {
600 "penumbra.core.component.shielded_pool.v1.OutputView.Visible".into()
601 }
602 fn type_url() -> ::prost::alloc::string::String {
603 "/penumbra.core.component.shielded_pool.v1.OutputView.Visible".into()
604 }
605 }
606 #[derive(Clone, PartialEq, ::prost::Message)]
607 pub struct Opaque {
608 #[prost(message, optional, tag = "1")]
609 pub output: ::core::option::Option<super::Output>,
610 }
611 impl ::prost::Name for Opaque {
612 const NAME: &'static str = "Opaque";
613 const PACKAGE: &'static str = "penumbra.core.component.shielded_pool.v1";
614 fn full_name() -> ::prost::alloc::string::String {
615 "penumbra.core.component.shielded_pool.v1.OutputView.Opaque".into()
616 }
617 fn type_url() -> ::prost::alloc::string::String {
618 "/penumbra.core.component.shielded_pool.v1.OutputView.Opaque".into()
619 }
620 }
621 #[derive(Clone, PartialEq, ::prost::Oneof)]
622 pub enum OutputView {
623 #[prost(message, tag = "1")]
624 Visible(Visible),
625 #[prost(message, tag = "2")]
626 Opaque(Opaque),
627 }
628}
629impl ::prost::Name for OutputView {
630 const NAME: &'static str = "OutputView";
631 const PACKAGE: &'static str = "penumbra.core.component.shielded_pool.v1";
632 fn full_name() -> ::prost::alloc::string::String {
633 "penumbra.core.component.shielded_pool.v1.OutputView".into()
634 }
635 fn type_url() -> ::prost::alloc::string::String {
636 "/penumbra.core.component.shielded_pool.v1.OutputView".into()
637 }
638}
639#[derive(Clone, PartialEq, ::prost::Message)]
640pub struct OutputPlan {
641 #[prost(message, optional, tag = "1")]
643 pub value: ::core::option::Option<super::super::super::asset::v1::Value>,
644 #[prost(message, optional, tag = "2")]
646 pub dest_address: ::core::option::Option<super::super::super::keys::v1::Address>,
647 #[prost(bytes = "vec", tag = "3")]
649 pub rseed: ::prost::alloc::vec::Vec<u8>,
650 #[prost(bytes = "vec", tag = "4")]
652 pub value_blinding: ::prost::alloc::vec::Vec<u8>,
653 #[prost(bytes = "vec", tag = "5")]
655 pub proof_blinding_r: ::prost::alloc::vec::Vec<u8>,
656 #[prost(bytes = "vec", tag = "6")]
658 pub proof_blinding_s: ::prost::alloc::vec::Vec<u8>,
659}
660impl ::prost::Name for OutputPlan {
661 const NAME: &'static str = "OutputPlan";
662 const PACKAGE: &'static str = "penumbra.core.component.shielded_pool.v1";
663 fn full_name() -> ::prost::alloc::string::String {
664 "penumbra.core.component.shielded_pool.v1.OutputPlan".into()
665 }
666 fn type_url() -> ::prost::alloc::string::String {
667 "/penumbra.core.component.shielded_pool.v1.OutputPlan".into()
668 }
669}
670#[derive(Clone, PartialEq, ::prost::Message)]
672pub struct AssetMetadataByIdRequest {
673 #[prost(message, optional, tag = "2")]
675 pub asset_id: ::core::option::Option<super::super::super::asset::v1::AssetId>,
676}
677impl ::prost::Name for AssetMetadataByIdRequest {
678 const NAME: &'static str = "AssetMetadataByIdRequest";
679 const PACKAGE: &'static str = "penumbra.core.component.shielded_pool.v1";
680 fn full_name() -> ::prost::alloc::string::String {
681 "penumbra.core.component.shielded_pool.v1.AssetMetadataByIdRequest".into()
682 }
683 fn type_url() -> ::prost::alloc::string::String {
684 "/penumbra.core.component.shielded_pool.v1.AssetMetadataByIdRequest".into()
685 }
686}
687#[derive(Clone, PartialEq, ::prost::Message)]
688pub struct AssetMetadataByIdResponse {
689 #[prost(message, optional, tag = "1")]
693 pub denom_metadata: ::core::option::Option<super::super::super::asset::v1::Metadata>,
694}
695impl ::prost::Name for AssetMetadataByIdResponse {
696 const NAME: &'static str = "AssetMetadataByIdResponse";
697 const PACKAGE: &'static str = "penumbra.core.component.shielded_pool.v1";
698 fn full_name() -> ::prost::alloc::string::String {
699 "penumbra.core.component.shielded_pool.v1.AssetMetadataByIdResponse".into()
700 }
701 fn type_url() -> ::prost::alloc::string::String {
702 "/penumbra.core.component.shielded_pool.v1.AssetMetadataByIdResponse".into()
703 }
704}
705#[derive(Clone, PartialEq, ::prost::Message)]
707pub struct AssetMetadataByIdsRequest {
708 #[prost(message, repeated, tag = "1")]
711 pub asset_id: ::prost::alloc::vec::Vec<super::super::super::asset::v1::AssetId>,
712}
713impl ::prost::Name for AssetMetadataByIdsRequest {
714 const NAME: &'static str = "AssetMetadataByIdsRequest";
715 const PACKAGE: &'static str = "penumbra.core.component.shielded_pool.v1";
716 fn full_name() -> ::prost::alloc::string::String {
717 "penumbra.core.component.shielded_pool.v1.AssetMetadataByIdsRequest".into()
718 }
719 fn type_url() -> ::prost::alloc::string::String {
720 "/penumbra.core.component.shielded_pool.v1.AssetMetadataByIdsRequest".into()
721 }
722}
723#[derive(Clone, PartialEq, ::prost::Message)]
724pub struct AssetMetadataByIdsResponse {
725 #[prost(message, optional, tag = "1")]
727 pub denom_metadata: ::core::option::Option<super::super::super::asset::v1::Metadata>,
728}
729impl ::prost::Name for AssetMetadataByIdsResponse {
730 const NAME: &'static str = "AssetMetadataByIdsResponse";
731 const PACKAGE: &'static str = "penumbra.core.component.shielded_pool.v1";
732 fn full_name() -> ::prost::alloc::string::String {
733 "penumbra.core.component.shielded_pool.v1.AssetMetadataByIdsResponse".into()
734 }
735 fn type_url() -> ::prost::alloc::string::String {
736 "/penumbra.core.component.shielded_pool.v1.AssetMetadataByIdsResponse".into()
737 }
738}
739#[derive(Clone, PartialEq, ::prost::Message)]
744pub struct FungibleTokenTransferPacketMetadata {
745 #[prost(string, tag = "1")]
747 pub channel: ::prost::alloc::string::String,
748 #[prost(uint64, tag = "2")]
750 pub sequence: u64,
751}
752impl ::prost::Name for FungibleTokenTransferPacketMetadata {
753 const NAME: &'static str = "FungibleTokenTransferPacketMetadata";
754 const PACKAGE: &'static str = "penumbra.core.component.shielded_pool.v1";
755 fn full_name() -> ::prost::alloc::string::String {
756 "penumbra.core.component.shielded_pool.v1.FungibleTokenTransferPacketMetadata"
757 .into()
758 }
759 fn type_url() -> ::prost::alloc::string::String {
760 "/penumbra.core.component.shielded_pool.v1.FungibleTokenTransferPacketMetadata"
761 .into()
762 }
763}
764#[derive(Clone, PartialEq, ::prost::Message)]
765pub struct EventOutboundFungibleTokenTransfer {
766 #[prost(message, optional, tag = "1")]
768 pub value: ::core::option::Option<super::super::super::asset::v1::Value>,
769 #[prost(message, optional, tag = "2")]
771 pub sender: ::core::option::Option<super::super::super::keys::v1::Address>,
772 #[prost(string, tag = "3")]
774 pub receiver: ::prost::alloc::string::String,
775 #[prost(message, optional, tag = "4")]
776 pub meta: ::core::option::Option<FungibleTokenTransferPacketMetadata>,
777}
778impl ::prost::Name for EventOutboundFungibleTokenTransfer {
779 const NAME: &'static str = "EventOutboundFungibleTokenTransfer";
780 const PACKAGE: &'static str = "penumbra.core.component.shielded_pool.v1";
781 fn full_name() -> ::prost::alloc::string::String {
782 "penumbra.core.component.shielded_pool.v1.EventOutboundFungibleTokenTransfer"
783 .into()
784 }
785 fn type_url() -> ::prost::alloc::string::String {
786 "/penumbra.core.component.shielded_pool.v1.EventOutboundFungibleTokenTransfer"
787 .into()
788 }
789}
790#[derive(Clone, PartialEq, ::prost::Message)]
791pub struct EventOutboundFungibleTokenRefund {
792 #[prost(message, optional, tag = "1")]
794 pub value: ::core::option::Option<super::super::super::asset::v1::Value>,
795 #[prost(message, optional, tag = "2")]
797 pub sender: ::core::option::Option<super::super::super::keys::v1::Address>,
798 #[prost(string, tag = "3")]
800 pub receiver: ::prost::alloc::string::String,
801 #[prost(enumeration = "event_outbound_fungible_token_refund::Reason", tag = "4")]
803 pub reason: i32,
804 #[prost(message, optional, tag = "5")]
808 pub meta: ::core::option::Option<FungibleTokenTransferPacketMetadata>,
809}
810pub mod event_outbound_fungible_token_refund {
812 #[derive(
813 Clone,
814 Copy,
815 Debug,
816 PartialEq,
817 Eq,
818 Hash,
819 PartialOrd,
820 Ord,
821 ::prost::Enumeration
822 )]
823 #[repr(i32)]
824 pub enum Reason {
825 Unspecified = 0,
827 Timeout = 1,
829 Error = 2,
831 }
832 impl Reason {
833 pub fn as_str_name(&self) -> &'static str {
838 match self {
839 Self::Unspecified => "REASON_UNSPECIFIED",
840 Self::Timeout => "REASON_TIMEOUT",
841 Self::Error => "REASON_ERROR",
842 }
843 }
844 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
846 match value {
847 "REASON_UNSPECIFIED" => Some(Self::Unspecified),
848 "REASON_TIMEOUT" => Some(Self::Timeout),
849 "REASON_ERROR" => Some(Self::Error),
850 _ => None,
851 }
852 }
853 }
854}
855impl ::prost::Name for EventOutboundFungibleTokenRefund {
856 const NAME: &'static str = "EventOutboundFungibleTokenRefund";
857 const PACKAGE: &'static str = "penumbra.core.component.shielded_pool.v1";
858 fn full_name() -> ::prost::alloc::string::String {
859 "penumbra.core.component.shielded_pool.v1.EventOutboundFungibleTokenRefund"
860 .into()
861 }
862 fn type_url() -> ::prost::alloc::string::String {
863 "/penumbra.core.component.shielded_pool.v1.EventOutboundFungibleTokenRefund"
864 .into()
865 }
866}
867#[derive(Clone, PartialEq, ::prost::Message)]
868pub struct EventInboundFungibleTokenTransfer {
869 #[prost(message, optional, tag = "1")]
871 pub value: ::core::option::Option<super::super::super::asset::v1::Value>,
872 #[prost(string, tag = "2")]
874 pub sender: ::prost::alloc::string::String,
875 #[prost(message, optional, tag = "3")]
877 pub receiver: ::core::option::Option<super::super::super::keys::v1::Address>,
878 #[prost(message, optional, tag = "4")]
879 pub meta: ::core::option::Option<FungibleTokenTransferPacketMetadata>,
880}
881impl ::prost::Name for EventInboundFungibleTokenTransfer {
882 const NAME: &'static str = "EventInboundFungibleTokenTransfer";
883 const PACKAGE: &'static str = "penumbra.core.component.shielded_pool.v1";
884 fn full_name() -> ::prost::alloc::string::String {
885 "penumbra.core.component.shielded_pool.v1.EventInboundFungibleTokenTransfer"
886 .into()
887 }
888 fn type_url() -> ::prost::alloc::string::String {
889 "/penumbra.core.component.shielded_pool.v1.EventInboundFungibleTokenTransfer"
890 .into()
891 }
892}
893#[cfg(feature = "rpc")]
895pub mod query_service_client {
896 #![allow(
897 unused_variables,
898 dead_code,
899 missing_docs,
900 clippy::wildcard_imports,
901 clippy::let_unit_value,
902 )]
903 use tonic::codegen::*;
904 use tonic::codegen::http::Uri;
905 #[derive(Debug, Clone)]
907 pub struct QueryServiceClient<T> {
908 inner: tonic::client::Grpc<T>,
909 }
910 impl QueryServiceClient<tonic::transport::Channel> {
911 pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
913 where
914 D: TryInto<tonic::transport::Endpoint>,
915 D::Error: Into<StdError>,
916 {
917 let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
918 Ok(Self::new(conn))
919 }
920 }
921 impl<T> QueryServiceClient<T>
922 where
923 T: tonic::client::GrpcService<tonic::body::BoxBody>,
924 T::Error: Into<StdError>,
925 T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static,
926 <T::ResponseBody as Body>::Error: Into<StdError> + std::marker::Send,
927 {
928 pub fn new(inner: T) -> Self {
929 let inner = tonic::client::Grpc::new(inner);
930 Self { inner }
931 }
932 pub fn with_origin(inner: T, origin: Uri) -> Self {
933 let inner = tonic::client::Grpc::with_origin(inner, origin);
934 Self { inner }
935 }
936 pub fn with_interceptor<F>(
937 inner: T,
938 interceptor: F,
939 ) -> QueryServiceClient<InterceptedService<T, F>>
940 where
941 F: tonic::service::Interceptor,
942 T::ResponseBody: Default,
943 T: tonic::codegen::Service<
944 http::Request<tonic::body::BoxBody>,
945 Response = http::Response<
946 <T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody,
947 >,
948 >,
949 <T as tonic::codegen::Service<
950 http::Request<tonic::body::BoxBody>,
951 >>::Error: Into<StdError> + std::marker::Send + std::marker::Sync,
952 {
953 QueryServiceClient::new(InterceptedService::new(inner, interceptor))
954 }
955 #[must_use]
960 pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
961 self.inner = self.inner.send_compressed(encoding);
962 self
963 }
964 #[must_use]
966 pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
967 self.inner = self.inner.accept_compressed(encoding);
968 self
969 }
970 #[must_use]
974 pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
975 self.inner = self.inner.max_decoding_message_size(limit);
976 self
977 }
978 #[must_use]
982 pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
983 self.inner = self.inner.max_encoding_message_size(limit);
984 self
985 }
986 pub async fn asset_metadata_by_id(
987 &mut self,
988 request: impl tonic::IntoRequest<super::AssetMetadataByIdRequest>,
989 ) -> std::result::Result<
990 tonic::Response<super::AssetMetadataByIdResponse>,
991 tonic::Status,
992 > {
993 self.inner
994 .ready()
995 .await
996 .map_err(|e| {
997 tonic::Status::unknown(
998 format!("Service was not ready: {}", e.into()),
999 )
1000 })?;
1001 let codec = tonic::codec::ProstCodec::default();
1002 let path = http::uri::PathAndQuery::from_static(
1003 "/penumbra.core.component.shielded_pool.v1.QueryService/AssetMetadataById",
1004 );
1005 let mut req = request.into_request();
1006 req.extensions_mut()
1007 .insert(
1008 GrpcMethod::new(
1009 "penumbra.core.component.shielded_pool.v1.QueryService",
1010 "AssetMetadataById",
1011 ),
1012 );
1013 self.inner.unary(req, path, codec).await
1014 }
1015 pub async fn asset_metadata_by_ids(
1021 &mut self,
1022 request: impl tonic::IntoRequest<super::AssetMetadataByIdsRequest>,
1023 ) -> std::result::Result<
1024 tonic::Response<tonic::codec::Streaming<super::AssetMetadataByIdsResponse>>,
1025 tonic::Status,
1026 > {
1027 self.inner
1028 .ready()
1029 .await
1030 .map_err(|e| {
1031 tonic::Status::unknown(
1032 format!("Service was not ready: {}", e.into()),
1033 )
1034 })?;
1035 let codec = tonic::codec::ProstCodec::default();
1036 let path = http::uri::PathAndQuery::from_static(
1037 "/penumbra.core.component.shielded_pool.v1.QueryService/AssetMetadataByIds",
1038 );
1039 let mut req = request.into_request();
1040 req.extensions_mut()
1041 .insert(
1042 GrpcMethod::new(
1043 "penumbra.core.component.shielded_pool.v1.QueryService",
1044 "AssetMetadataByIds",
1045 ),
1046 );
1047 self.inner.server_streaming(req, path, codec).await
1048 }
1049 }
1050}
1051#[cfg(feature = "rpc")]
1053pub mod query_service_server {
1054 #![allow(
1055 unused_variables,
1056 dead_code,
1057 missing_docs,
1058 clippy::wildcard_imports,
1059 clippy::let_unit_value,
1060 )]
1061 use tonic::codegen::*;
1062 #[async_trait]
1064 pub trait QueryService: std::marker::Send + std::marker::Sync + 'static {
1065 async fn asset_metadata_by_id(
1066 &self,
1067 request: tonic::Request<super::AssetMetadataByIdRequest>,
1068 ) -> std::result::Result<
1069 tonic::Response<super::AssetMetadataByIdResponse>,
1070 tonic::Status,
1071 >;
1072 type AssetMetadataByIdsStream: tonic::codegen::tokio_stream::Stream<
1074 Item = std::result::Result<
1075 super::AssetMetadataByIdsResponse,
1076 tonic::Status,
1077 >,
1078 >
1079 + std::marker::Send
1080 + 'static;
1081 async fn asset_metadata_by_ids(
1087 &self,
1088 request: tonic::Request<super::AssetMetadataByIdsRequest>,
1089 ) -> std::result::Result<
1090 tonic::Response<Self::AssetMetadataByIdsStream>,
1091 tonic::Status,
1092 >;
1093 }
1094 #[derive(Debug)]
1096 pub struct QueryServiceServer<T> {
1097 inner: Arc<T>,
1098 accept_compression_encodings: EnabledCompressionEncodings,
1099 send_compression_encodings: EnabledCompressionEncodings,
1100 max_decoding_message_size: Option<usize>,
1101 max_encoding_message_size: Option<usize>,
1102 }
1103 impl<T> QueryServiceServer<T> {
1104 pub fn new(inner: T) -> Self {
1105 Self::from_arc(Arc::new(inner))
1106 }
1107 pub fn from_arc(inner: Arc<T>) -> Self {
1108 Self {
1109 inner,
1110 accept_compression_encodings: Default::default(),
1111 send_compression_encodings: Default::default(),
1112 max_decoding_message_size: None,
1113 max_encoding_message_size: None,
1114 }
1115 }
1116 pub fn with_interceptor<F>(
1117 inner: T,
1118 interceptor: F,
1119 ) -> InterceptedService<Self, F>
1120 where
1121 F: tonic::service::Interceptor,
1122 {
1123 InterceptedService::new(Self::new(inner), interceptor)
1124 }
1125 #[must_use]
1127 pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
1128 self.accept_compression_encodings.enable(encoding);
1129 self
1130 }
1131 #[must_use]
1133 pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
1134 self.send_compression_encodings.enable(encoding);
1135 self
1136 }
1137 #[must_use]
1141 pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
1142 self.max_decoding_message_size = Some(limit);
1143 self
1144 }
1145 #[must_use]
1149 pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
1150 self.max_encoding_message_size = Some(limit);
1151 self
1152 }
1153 }
1154 impl<T, B> tonic::codegen::Service<http::Request<B>> for QueryServiceServer<T>
1155 where
1156 T: QueryService,
1157 B: Body + std::marker::Send + 'static,
1158 B::Error: Into<StdError> + std::marker::Send + 'static,
1159 {
1160 type Response = http::Response<tonic::body::BoxBody>;
1161 type Error = std::convert::Infallible;
1162 type Future = BoxFuture<Self::Response, Self::Error>;
1163 fn poll_ready(
1164 &mut self,
1165 _cx: &mut Context<'_>,
1166 ) -> Poll<std::result::Result<(), Self::Error>> {
1167 Poll::Ready(Ok(()))
1168 }
1169 fn call(&mut self, req: http::Request<B>) -> Self::Future {
1170 match req.uri().path() {
1171 "/penumbra.core.component.shielded_pool.v1.QueryService/AssetMetadataById" => {
1172 #[allow(non_camel_case_types)]
1173 struct AssetMetadataByIdSvc<T: QueryService>(pub Arc<T>);
1174 impl<
1175 T: QueryService,
1176 > tonic::server::UnaryService<super::AssetMetadataByIdRequest>
1177 for AssetMetadataByIdSvc<T> {
1178 type Response = super::AssetMetadataByIdResponse;
1179 type Future = BoxFuture<
1180 tonic::Response<Self::Response>,
1181 tonic::Status,
1182 >;
1183 fn call(
1184 &mut self,
1185 request: tonic::Request<super::AssetMetadataByIdRequest>,
1186 ) -> Self::Future {
1187 let inner = Arc::clone(&self.0);
1188 let fut = async move {
1189 <T as QueryService>::asset_metadata_by_id(&inner, request)
1190 .await
1191 };
1192 Box::pin(fut)
1193 }
1194 }
1195 let accept_compression_encodings = self.accept_compression_encodings;
1196 let send_compression_encodings = self.send_compression_encodings;
1197 let max_decoding_message_size = self.max_decoding_message_size;
1198 let max_encoding_message_size = self.max_encoding_message_size;
1199 let inner = self.inner.clone();
1200 let fut = async move {
1201 let method = AssetMetadataByIdSvc(inner);
1202 let codec = tonic::codec::ProstCodec::default();
1203 let mut grpc = tonic::server::Grpc::new(codec)
1204 .apply_compression_config(
1205 accept_compression_encodings,
1206 send_compression_encodings,
1207 )
1208 .apply_max_message_size_config(
1209 max_decoding_message_size,
1210 max_encoding_message_size,
1211 );
1212 let res = grpc.unary(method, req).await;
1213 Ok(res)
1214 };
1215 Box::pin(fut)
1216 }
1217 "/penumbra.core.component.shielded_pool.v1.QueryService/AssetMetadataByIds" => {
1218 #[allow(non_camel_case_types)]
1219 struct AssetMetadataByIdsSvc<T: QueryService>(pub Arc<T>);
1220 impl<
1221 T: QueryService,
1222 > tonic::server::ServerStreamingService<
1223 super::AssetMetadataByIdsRequest,
1224 > for AssetMetadataByIdsSvc<T> {
1225 type Response = super::AssetMetadataByIdsResponse;
1226 type ResponseStream = T::AssetMetadataByIdsStream;
1227 type Future = BoxFuture<
1228 tonic::Response<Self::ResponseStream>,
1229 tonic::Status,
1230 >;
1231 fn call(
1232 &mut self,
1233 request: tonic::Request<super::AssetMetadataByIdsRequest>,
1234 ) -> Self::Future {
1235 let inner = Arc::clone(&self.0);
1236 let fut = async move {
1237 <T as QueryService>::asset_metadata_by_ids(&inner, request)
1238 .await
1239 };
1240 Box::pin(fut)
1241 }
1242 }
1243 let accept_compression_encodings = self.accept_compression_encodings;
1244 let send_compression_encodings = self.send_compression_encodings;
1245 let max_decoding_message_size = self.max_decoding_message_size;
1246 let max_encoding_message_size = self.max_encoding_message_size;
1247 let inner = self.inner.clone();
1248 let fut = async move {
1249 let method = AssetMetadataByIdsSvc(inner);
1250 let codec = tonic::codec::ProstCodec::default();
1251 let mut grpc = tonic::server::Grpc::new(codec)
1252 .apply_compression_config(
1253 accept_compression_encodings,
1254 send_compression_encodings,
1255 )
1256 .apply_max_message_size_config(
1257 max_decoding_message_size,
1258 max_encoding_message_size,
1259 );
1260 let res = grpc.server_streaming(method, req).await;
1261 Ok(res)
1262 };
1263 Box::pin(fut)
1264 }
1265 _ => {
1266 Box::pin(async move {
1267 let mut response = http::Response::new(empty_body());
1268 let headers = response.headers_mut();
1269 headers
1270 .insert(
1271 tonic::Status::GRPC_STATUS,
1272 (tonic::Code::Unimplemented as i32).into(),
1273 );
1274 headers
1275 .insert(
1276 http::header::CONTENT_TYPE,
1277 tonic::metadata::GRPC_CONTENT_TYPE,
1278 );
1279 Ok(response)
1280 })
1281 }
1282 }
1283 }
1284 }
1285 impl<T> Clone for QueryServiceServer<T> {
1286 fn clone(&self) -> Self {
1287 let inner = self.inner.clone();
1288 Self {
1289 inner,
1290 accept_compression_encodings: self.accept_compression_encodings,
1291 send_compression_encodings: self.send_compression_encodings,
1292 max_decoding_message_size: self.max_decoding_message_size,
1293 max_encoding_message_size: self.max_encoding_message_size,
1294 }
1295 }
1296 }
1297 pub const SERVICE_NAME: &str = "penumbra.core.component.shielded_pool.v1.QueryService";
1299 impl<T> tonic::server::NamedService for QueryServiceServer<T> {
1300 const NAME: &'static str = SERVICE_NAME;
1301 }
1302}