penumbra_sdk_proto/gen/
penumbra.core.component.shielded_pool.v1.rs

1// This file is @generated by prost-build.
2/// Configuration data for the shielded pool component.
3#[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/// Genesis data for the shielded pool component.
22#[derive(Clone, PartialEq, ::prost::Message)]
23pub struct GenesisContent {
24    #[prost(message, optional, tag = "1")]
25    pub shielded_pool_params: ::core::option::Option<ShieldedPoolParameters>,
26    /// The allocations present at genesis
27    #[prost(message, repeated, tag = "3")]
28    pub allocations: ::prost::alloc::vec::Vec<genesis_content::Allocation>,
29}
30/// Nested message and enum types in `GenesisContent`.
31pub 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/// The parameters which control how the FMD parameters evolve over time.
65#[derive(Clone, Copy, PartialEq, ::prost::Message)]
66pub struct FmdMetaParameters {
67    /// How much time users have to transition to new parameters.
68    #[prost(uint64, tag = "1")]
69    pub fmd_grace_period_blocks: u64,
70    /// The algorithm governing how the parameters change.
71    #[prost(oneof = "fmd_meta_parameters::Algorithm", tags = "2, 3")]
72    pub algorithm: ::core::option::Option<fmd_meta_parameters::Algorithm>,
73}
74/// Nested message and enum types in `FmdMetaParameters`.
75pub mod fmd_meta_parameters {
76    /// A sliding window algorithm for updating the parameters.
77    #[derive(Clone, Copy, PartialEq, ::prost::Message)]
78    pub struct AlgorithmSlidingWindow {
79        /// The window size, in terms of the number of update periods.
80        ///
81        /// The update period is 16 blocks, by default, but can change with governance.
82        #[prost(uint32, tag = "1")]
83        pub window_update_periods: u32,
84        /// The number of detections we aim to see per window.
85        #[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    /// The algorithm governing how the parameters change.
101    #[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/// Used to potentially store state for the FMD Meta Parameters algorithm.
120#[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}
125/// Nested message and enum types in `FmdMetaParametersAlgorithmState`.
126pub mod fmd_meta_parameters_algorithm_state {
127    /// The state used for the fixed algorithm.
128    #[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    /// The state used for the sliding window algorithm.
143    #[derive(Clone, Copy, PartialEq, ::prost::Message)]
144    pub struct SlidingWindowState {
145        /// The number of clues previously observed, approximately.
146        #[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/// Parameters for Fuzzy Message Detection
181#[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/// An encrypted note.
237/// 176 = 80(address) + 16(amount) + 32(asset ID) + 32(rseed) + 16(MAC) bytes.
238#[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/// The body of an output description, including only the minimal
254/// data required to scan and process the output.
255#[derive(Clone, PartialEq, ::prost::Message)]
256pub struct NotePayload {
257    /// The note commitment for the output note. 32 bytes.
258    #[prost(message, optional, tag = "1")]
259    pub note_commitment: ::core::option::Option<
260        super::super::super::super::crypto::tct::v1::StateCommitment,
261    >,
262    /// The encoding of an ephemeral public key. 32 bytes.
263    #[prost(bytes = "vec", tag = "2")]
264    pub ephemeral_key: ::prost::alloc::vec::Vec<u8>,
265    /// An encryption of the newly created note.
266    /// 176 = 80(address) + 16(amount) + 32(asset ID) + 32(rseed) + 16(MAC) bytes.
267    #[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/// A Penumbra ZK output proof.
281#[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/// A Penumbra ZK spend proof.
297#[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/// A Penumbra ZK nullifier derivation proof.
313#[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/// Spends a shielded note.
329#[derive(Clone, PartialEq, ::prost::Message)]
330pub struct Spend {
331    /// The effecting data of the spend.
332    #[prost(message, optional, tag = "1")]
333    pub body: ::core::option::Option<SpendBody>,
334    /// The authorizing signature for the spend.
335    #[prost(message, optional, tag = "2")]
336    pub auth_sig: ::core::option::Option<
337        super::super::super::super::crypto::decaf377_rdsa::v1::SpendAuthSignature,
338    >,
339    /// The proof that the spend is well-formed is authorizing data.
340    #[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/// ABCI Event recording a spend.
354#[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/// ABCI Event recording an output.
370#[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/// ABCI Event recording a clue.
388#[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/// The body of a spend description, containing only the effecting data
408/// describing changes to the ledger, and not the authorizing data that allows
409/// those changes to be performed.
410#[derive(Clone, PartialEq, ::prost::Message)]
411pub struct SpendBody {
412    /// A commitment to the value of the input note.
413    #[prost(message, optional, tag = "1")]
414    pub balance_commitment: ::core::option::Option<
415        super::super::super::asset::v1::BalanceCommitment,
416    >,
417    /// The nullifier of the input note.
418    #[prost(message, optional, tag = "6")]
419    pub nullifier: ::core::option::Option<super::super::sct::v1::Nullifier>,
420    /// The randomized validating key for the spend authorization signature.
421    #[prost(message, optional, tag = "4")]
422    pub rk: ::core::option::Option<
423        super::super::super::super::crypto::decaf377_rdsa::v1::SpendVerificationKey,
424    >,
425    /// An encryption of the commitment of the input note to the sender's OVK.
426    #[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}
444/// Nested message and enum types in `SpendView`.
445pub 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    /// The plaintext note we plan to spend.
499    #[prost(message, optional, tag = "1")]
500    pub note: ::core::option::Option<Note>,
501    /// The position of the note we plan to spend.
502    #[prost(uint64, tag = "2")]
503    pub position: u64,
504    /// The randomizer to use for the spend.
505    #[prost(bytes = "vec", tag = "3")]
506    pub randomizer: ::prost::alloc::vec::Vec<u8>,
507    /// The blinding factor to use for the value commitment.
508    #[prost(bytes = "vec", tag = "4")]
509    pub value_blinding: ::prost::alloc::vec::Vec<u8>,
510    /// The first blinding factor to use for the ZK spend proof.
511    #[prost(bytes = "vec", tag = "5")]
512    pub proof_blinding_r: ::prost::alloc::vec::Vec<u8>,
513    /// The second blinding factor to use for the ZK spend proof.
514    #[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/// Creates a new shielded note.
528#[derive(Clone, PartialEq, ::prost::Message)]
529pub struct Output {
530    /// The effecting data for the output.
531    #[prost(message, optional, tag = "1")]
532    pub body: ::core::option::Option<OutputBody>,
533    /// The output proof is authorizing data.
534    #[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/// The body of an output description, containing only the effecting data
548/// describing changes to the ledger, and not the authorizing data that allows
549/// those changes to be performed.
550#[derive(Clone, PartialEq, ::prost::Message)]
551pub struct OutputBody {
552    /// The minimal data required to scan and process the new output note.
553    #[prost(message, optional, tag = "1")]
554    pub note_payload: ::core::option::Option<NotePayload>,
555    /// A commitment to the value of the output note. 32 bytes.
556    #[prost(message, optional, tag = "2")]
557    pub balance_commitment: ::core::option::Option<
558        super::super::super::asset::v1::BalanceCommitment,
559    >,
560    /// An encrypted key for decrypting the memo.
561    #[prost(bytes = "vec", tag = "3")]
562    pub wrapped_memo_key: ::prost::alloc::vec::Vec<u8>,
563    /// The key material used for note encryption, wrapped in encryption to the
564    /// sender's outgoing viewing key. 48 bytes.
565    #[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}
583/// Nested message and enum types in `OutputView`.
584pub 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    /// The value to send to this output.
642    #[prost(message, optional, tag = "1")]
643    pub value: ::core::option::Option<super::super::super::asset::v1::Value>,
644    /// The destination address to send it to.
645    #[prost(message, optional, tag = "2")]
646    pub dest_address: ::core::option::Option<super::super::super::keys::v1::Address>,
647    /// The rseed to use for the new note.
648    #[prost(bytes = "vec", tag = "3")]
649    pub rseed: ::prost::alloc::vec::Vec<u8>,
650    /// The blinding factor to use for the value commitment.
651    #[prost(bytes = "vec", tag = "4")]
652    pub value_blinding: ::prost::alloc::vec::Vec<u8>,
653    /// The first blinding factor to use for the ZK output proof.
654    #[prost(bytes = "vec", tag = "5")]
655    pub proof_blinding_r: ::prost::alloc::vec::Vec<u8>,
656    /// The second blinding factor to use for the ZK output proof.
657    #[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/// Requests information on an asset by asset id
671#[derive(Clone, PartialEq, ::prost::Message)]
672pub struct AssetMetadataByIdRequest {
673    /// The asset id to request information on.
674    #[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    /// If present, information on the requested asset.
690    ///
691    /// If the requested asset was unknown, this field will not be present.
692    #[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/// Requests information on an asset by multiple asset ids
706#[derive(Clone, PartialEq, ::prost::Message)]
707pub struct AssetMetadataByIdsRequest {
708    /// The asset IDs to request information on. Note that node is neither required
709    /// nor expected to stream responses in the same order as this array.
710    #[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    /// A single asset metadata streamed from the node.
726    #[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/// Metadata about the packet associated with the transfer.
740///
741/// This allows identifying which specific packet is associated with the transfer.
742/// Implicitly, both ports are going to be "transfer".
743#[derive(Clone, PartialEq, ::prost::Message)]
744pub struct FungibleTokenTransferPacketMetadata {
745    /// The identifier for the channel on *this* chain.
746    #[prost(string, tag = "1")]
747    pub channel: ::prost::alloc::string::String,
748    /// Sequence number for the packet.
749    #[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    /// The value being transferred out of the chain.
767    #[prost(message, optional, tag = "1")]
768    pub value: ::core::option::Option<super::super::super::asset::v1::Value>,
769    /// The sending address on chain.
770    #[prost(message, optional, tag = "2")]
771    pub sender: ::core::option::Option<super::super::super::keys::v1::Address>,
772    /// The receiving address, which we don't assume anything about.
773    #[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    /// The value being refunded.
793    #[prost(message, optional, tag = "1")]
794    pub value: ::core::option::Option<super::super::super::asset::v1::Value>,
795    /// The sender being refunded.
796    #[prost(message, optional, tag = "2")]
797    pub sender: ::core::option::Option<super::super::super::keys::v1::Address>,
798    /// The address that attempted to receive the funds.
799    #[prost(string, tag = "3")]
800    pub receiver: ::prost::alloc::string::String,
801    /// Why the refund is happening.
802    #[prost(enumeration = "event_outbound_fungible_token_refund::Reason", tag = "4")]
803    pub reason: i32,
804    /// This will be the metadata for the packet for the transfer being refunded.
805    ///
806    /// This allows linking a refund to the transfer.
807    #[prost(message, optional, tag = "5")]
808    pub meta: ::core::option::Option<FungibleTokenTransferPacketMetadata>,
809}
810/// Nested message and enum types in `EventOutboundFungibleTokenRefund`.
811pub 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        /// No particular reason.
826        Unspecified = 0,
827        /// The transfer timed out.
828        Timeout = 1,
829        /// The transfer was acknowledged with an error.
830        Error = 2,
831    }
832    impl Reason {
833        /// String value of the enum field names used in the ProtoBuf definition.
834        ///
835        /// The values are not transformed in any way and thus are considered stable
836        /// (if the ProtoBuf definition does not change) and safe for programmatic use.
837        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        /// Creates an enum from field names used in the ProtoBuf definition.
845        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    /// The value being transferred in.
870    #[prost(message, optional, tag = "1")]
871    pub value: ::core::option::Option<super::super::super::asset::v1::Value>,
872    /// The sender on the counterparty chain.
873    #[prost(string, tag = "2")]
874    pub sender: ::prost::alloc::string::String,
875    /// The receiver on this chain.
876    #[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/// Generated client implementations.
894#[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    /// Query operations for the shielded pool component.
906    #[derive(Debug, Clone)]
907    pub struct QueryServiceClient<T> {
908        inner: tonic::client::Grpc<T>,
909    }
910    impl QueryServiceClient<tonic::transport::Channel> {
911        /// Attempt to create a new client by connecting to a given endpoint.
912        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        /// Compress requests with the given encoding.
956        ///
957        /// This requires the server to support it otherwise it might respond with an
958        /// error.
959        #[must_use]
960        pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
961            self.inner = self.inner.send_compressed(encoding);
962            self
963        }
964        /// Enable decompressing responses.
965        #[must_use]
966        pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
967            self.inner = self.inner.accept_compressed(encoding);
968            self
969        }
970        /// Limits the maximum size of a decoded message.
971        ///
972        /// Default: `4MB`
973        #[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        /// Limits the maximum size of an encoded message.
979        ///
980        /// Default: `usize::MAX`
981        #[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        /// Requests a stream of asset metadata, given an array of asset IDs. Responses
1016        /// may be streamed in a different order from that of the asset IDs in the
1017        /// request, and asset IDs unknown to the node will not receive any response
1018        /// objects -- that is, the number of responses may be smaller than the length
1019        /// of the asset IDs array.
1020        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/// Generated server implementations.
1052#[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    /// Generated trait containing gRPC methods that should be implemented for use with QueryServiceServer.
1063    #[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        /// Server streaming response type for the AssetMetadataByIds method.
1073        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        /// Requests a stream of asset metadata, given an array of asset IDs. Responses
1082        /// may be streamed in a different order from that of the asset IDs in the
1083        /// request, and asset IDs unknown to the node will not receive any response
1084        /// objects -- that is, the number of responses may be smaller than the length
1085        /// of the asset IDs array.
1086        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    /// Query operations for the shielded pool component.
1095    #[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        /// Enable decompressing requests with the given encoding.
1126        #[must_use]
1127        pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
1128            self.accept_compression_encodings.enable(encoding);
1129            self
1130        }
1131        /// Compress responses with the given encoding, if the client supports it.
1132        #[must_use]
1133        pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
1134            self.send_compression_encodings.enable(encoding);
1135            self
1136        }
1137        /// Limits the maximum size of a decoded message.
1138        ///
1139        /// Default: `4MB`
1140        #[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        /// Limits the maximum size of an encoded message.
1146        ///
1147        /// Default: `usize::MAX`
1148        #[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    /// Generated gRPC service name
1298    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}