penumbra_sdk_proto/gen/
penumbra.custody.threshold.v1.rs

1// This file is @generated by prost-build.
2/// A key one can use to verify signatures.
3///
4/// This key can also serve as a unique identifier for users.
5#[derive(Clone, PartialEq, ::prost::Message)]
6pub struct VerificationKey {
7    #[prost(bytes = "vec", tag = "1")]
8    pub inner: ::prost::alloc::vec::Vec<u8>,
9}
10impl ::prost::Name for VerificationKey {
11    const NAME: &'static str = "VerificationKey";
12    const PACKAGE: &'static str = "penumbra.custody.threshold.v1";
13    fn full_name() -> ::prost::alloc::string::String {
14        "penumbra.custody.threshold.v1.VerificationKey".into()
15    }
16    fn type_url() -> ::prost::alloc::string::String {
17        "/penumbra.custody.threshold.v1.VerificationKey".into()
18    }
19}
20/// A signature proving that a message was created by the owner of a verification key.
21#[derive(Clone, PartialEq, ::prost::Message)]
22pub struct Signature {
23    #[prost(bytes = "vec", tag = "1")]
24    pub inner: ::prost::alloc::vec::Vec<u8>,
25}
26impl ::prost::Name for Signature {
27    const NAME: &'static str = "Signature";
28    const PACKAGE: &'static str = "penumbra.custody.threshold.v1";
29    fn full_name() -> ::prost::alloc::string::String {
30        "penumbra.custody.threshold.v1.Signature".into()
31    }
32    fn type_url() -> ::prost::alloc::string::String {
33        "/penumbra.custody.threshold.v1.Signature".into()
34    }
35}
36/// The message the coordinator sends in round 1 of the signing protocol.
37#[derive(Clone, PartialEq, ::prost::Message)]
38pub struct CoordinatorRound1 {
39    #[prost(oneof = "coordinator_round1::Request", tags = "1, 2, 3")]
40    pub request: ::core::option::Option<coordinator_round1::Request>,
41}
42/// Nested message and enum types in `CoordinatorRound1`.
43pub mod coordinator_round1 {
44    #[derive(Clone, PartialEq, ::prost::Oneof)]
45    pub enum Request {
46        /// The plan that the coordinator would like the followers to sign.
47        #[prost(message, tag = "1")]
48        Plan(super::super::super::super::core::transaction::v1::TransactionPlan),
49        /// The validator definition the coordinator would like the followers to sign.
50        #[prost(message, tag = "2")]
51        ValidatorDefinition(
52            super::super::super::super::core::component::stake::v1::Validator,
53        ),
54        /// The validator vote the coordinator would like the followers to sign.
55        #[prost(message, tag = "3")]
56        ValidatorVote(
57            super::super::super::super::core::component::governance::v1::ValidatorVoteBody,
58        ),
59    }
60}
61impl ::prost::Name for CoordinatorRound1 {
62    const NAME: &'static str = "CoordinatorRound1";
63    const PACKAGE: &'static str = "penumbra.custody.threshold.v1";
64    fn full_name() -> ::prost::alloc::string::String {
65        "penumbra.custody.threshold.v1.CoordinatorRound1".into()
66    }
67    fn type_url() -> ::prost::alloc::string::String {
68        "/penumbra.custody.threshold.v1.CoordinatorRound1".into()
69    }
70}
71/// The message the coordinator sends in round 2 of the signing protocol.
72#[derive(Clone, PartialEq, ::prost::Message)]
73pub struct CoordinatorRound2 {
74    /// The underlying signing packages being sent to the followers, for each signature.
75    #[prost(message, repeated, tag = "1")]
76    pub signing_packages: ::prost::alloc::vec::Vec<
77        coordinator_round2::PartialSigningPackage,
78    >,
79}
80/// Nested message and enum types in `CoordinatorRound2`.
81pub mod coordinator_round2 {
82    /// A commitment along with a FROST identifier.
83    #[derive(Clone, PartialEq, ::prost::Message)]
84    pub struct IdentifiedCommitments {
85        /// The serialization of a FROST identifier.
86        #[prost(bytes = "vec", tag = "1")]
87        pub identifier: ::prost::alloc::vec::Vec<u8>,
88        /// The commitments this person has produced for this round of signing.
89        #[prost(message, optional, tag = "2")]
90        pub commitments: ::core::option::Option<
91            super::super::super::super::crypto::decaf377_frost::v1::SigningCommitments,
92        >,
93    }
94    impl ::prost::Name for IdentifiedCommitments {
95        const NAME: &'static str = "IdentifiedCommitments";
96        const PACKAGE: &'static str = "penumbra.custody.threshold.v1";
97        fn full_name() -> ::prost::alloc::string::String {
98            "penumbra.custody.threshold.v1.CoordinatorRound2.IdentifiedCommitments"
99                .into()
100        }
101        fn type_url() -> ::prost::alloc::string::String {
102            "/penumbra.custody.threshold.v1.CoordinatorRound2.IdentifiedCommitments"
103                .into()
104        }
105    }
106    /// A FROST signing package without a message.
107    ///
108    /// We structure things this way because the message is derived from the transaction plan.
109    /// FROST expects the signing package to include the identified commitments *and*
110    /// the message, but we have no need to include the message.
111    #[derive(Clone, PartialEq, ::prost::Message)]
112    pub struct PartialSigningPackage {
113        #[prost(message, repeated, tag = "1")]
114        pub all_commitments: ::prost::alloc::vec::Vec<IdentifiedCommitments>,
115    }
116    impl ::prost::Name for PartialSigningPackage {
117        const NAME: &'static str = "PartialSigningPackage";
118        const PACKAGE: &'static str = "penumbra.custody.threshold.v1";
119        fn full_name() -> ::prost::alloc::string::String {
120            "penumbra.custody.threshold.v1.CoordinatorRound2.PartialSigningPackage"
121                .into()
122        }
123        fn type_url() -> ::prost::alloc::string::String {
124            "/penumbra.custody.threshold.v1.CoordinatorRound2.PartialSigningPackage"
125                .into()
126        }
127    }
128}
129impl ::prost::Name for CoordinatorRound2 {
130    const NAME: &'static str = "CoordinatorRound2";
131    const PACKAGE: &'static str = "penumbra.custody.threshold.v1";
132    fn full_name() -> ::prost::alloc::string::String {
133        "penumbra.custody.threshold.v1.CoordinatorRound2".into()
134    }
135    fn type_url() -> ::prost::alloc::string::String {
136        "/penumbra.custody.threshold.v1.CoordinatorRound2".into()
137    }
138}
139/// The first message the followers send back to the coordinator when signing.
140#[derive(Clone, PartialEq, ::prost::Message)]
141pub struct FollowerRound1 {
142    #[prost(message, optional, tag = "1")]
143    pub inner: ::core::option::Option<follower_round1::Inner>,
144    /// The verification key identifying the sender.
145    #[prost(message, optional, tag = "2")]
146    pub pk: ::core::option::Option<VerificationKey>,
147    /// A signature over the proto-encoded bytes of inner.
148    #[prost(message, optional, tag = "3")]
149    pub sig: ::core::option::Option<Signature>,
150}
151/// Nested message and enum types in `FollowerRound1`.
152pub mod follower_round1 {
153    /// The inner message that will be signed by the follower.
154    #[derive(Clone, PartialEq, ::prost::Message)]
155    pub struct Inner {
156        /// One signing commitment pair for each signature requested by the plan, in order.
157        #[prost(message, repeated, tag = "1")]
158        pub commitments: ::prost::alloc::vec::Vec<
159            super::super::super::super::crypto::decaf377_frost::v1::SigningCommitments,
160        >,
161    }
162    impl ::prost::Name for Inner {
163        const NAME: &'static str = "Inner";
164        const PACKAGE: &'static str = "penumbra.custody.threshold.v1";
165        fn full_name() -> ::prost::alloc::string::String {
166            "penumbra.custody.threshold.v1.FollowerRound1.Inner".into()
167        }
168        fn type_url() -> ::prost::alloc::string::String {
169            "/penumbra.custody.threshold.v1.FollowerRound1.Inner".into()
170        }
171    }
172}
173impl ::prost::Name for FollowerRound1 {
174    const NAME: &'static str = "FollowerRound1";
175    const PACKAGE: &'static str = "penumbra.custody.threshold.v1";
176    fn full_name() -> ::prost::alloc::string::String {
177        "penumbra.custody.threshold.v1.FollowerRound1".into()
178    }
179    fn type_url() -> ::prost::alloc::string::String {
180        "/penumbra.custody.threshold.v1.FollowerRound1".into()
181    }
182}
183/// The second message the followers send back to the coordinator when signing.
184#[derive(Clone, PartialEq, ::prost::Message)]
185pub struct FollowerRound2 {
186    #[prost(message, optional, tag = "1")]
187    pub inner: ::core::option::Option<follower_round2::Inner>,
188    /// The verification key identifying the sender.
189    #[prost(message, optional, tag = "2")]
190    pub pk: ::core::option::Option<VerificationKey>,
191    /// A signature over the proto-encoded bytes of inner.
192    #[prost(message, optional, tag = "3")]
193    pub sig: ::core::option::Option<Signature>,
194}
195/// Nested message and enum types in `FollowerRound2`.
196pub mod follower_round2 {
197    /// The inner message that will be signed by the follower.
198    #[derive(Clone, PartialEq, ::prost::Message)]
199    pub struct Inner {
200        /// One share for each signature requested by the plan, in order.
201        #[prost(message, repeated, tag = "1")]
202        pub shares: ::prost::alloc::vec::Vec<
203            super::super::super::super::crypto::decaf377_frost::v1::SignatureShare,
204        >,
205    }
206    impl ::prost::Name for Inner {
207        const NAME: &'static str = "Inner";
208        const PACKAGE: &'static str = "penumbra.custody.threshold.v1";
209        fn full_name() -> ::prost::alloc::string::String {
210            "penumbra.custody.threshold.v1.FollowerRound2.Inner".into()
211        }
212        fn type_url() -> ::prost::alloc::string::String {
213            "/penumbra.custody.threshold.v1.FollowerRound2.Inner".into()
214        }
215    }
216}
217impl ::prost::Name for FollowerRound2 {
218    const NAME: &'static str = "FollowerRound2";
219    const PACKAGE: &'static str = "penumbra.custody.threshold.v1";
220    fn full_name() -> ::prost::alloc::string::String {
221        "penumbra.custody.threshold.v1.FollowerRound2".into()
222    }
223    fn type_url() -> ::prost::alloc::string::String {
224        "/penumbra.custody.threshold.v1.FollowerRound2".into()
225    }
226}
227/// The first message we broadcast in the DKG protocol.
228#[derive(Clone, PartialEq, ::prost::Message)]
229pub struct DkgRound1 {
230    /// The package we're sending to other people
231    #[prost(message, optional, tag = "1")]
232    pub pkg: ::core::option::Option<
233        super::super::super::crypto::decaf377_frost::v1::DkgRound1Package,
234    >,
235    /// A commitment to a share of the nullifier-deriving key
236    #[prost(bytes = "vec", tag = "2")]
237    pub nullifier_commitment: ::prost::alloc::vec::Vec<u8>,
238    /// An encryption key for the second round.
239    #[prost(bytes = "vec", tag = "3")]
240    pub epk: ::prost::alloc::vec::Vec<u8>,
241    /// A verification key establishing an identity for the sender of this message.
242    #[prost(bytes = "vec", tag = "4")]
243    pub vk: ::prost::alloc::vec::Vec<u8>,
244}
245impl ::prost::Name for DkgRound1 {
246    const NAME: &'static str = "DKGRound1";
247    const PACKAGE: &'static str = "penumbra.custody.threshold.v1";
248    fn full_name() -> ::prost::alloc::string::String {
249        "penumbra.custody.threshold.v1.DKGRound1".into()
250    }
251    fn type_url() -> ::prost::alloc::string::String {
252        "/penumbra.custody.threshold.v1.DKGRound1".into()
253    }
254}
255/// The second message we broadcast in the DKG protocol.
256#[derive(Clone, PartialEq, ::prost::Message)]
257pub struct DkgRound2 {
258    #[prost(message, optional, tag = "1")]
259    pub inner: ::core::option::Option<dkg_round2::Inner>,
260    /// The verification key identifying the sender.
261    #[prost(bytes = "vec", tag = "2")]
262    pub vk: ::prost::alloc::vec::Vec<u8>,
263    /// A signature over the proto-encoded inner message.
264    #[prost(bytes = "vec", tag = "3")]
265    pub sig: ::prost::alloc::vec::Vec<u8>,
266}
267/// Nested message and enum types in `DKGRound2`.
268pub mod dkg_round2 {
269    /// A round2 package, encrypted, along with an identifier for the recipient.
270    #[derive(Clone, PartialEq, ::prost::Message)]
271    pub struct TargetedPackage {
272        /// A verification key identifying the recipient.
273        #[prost(bytes = "vec", tag = "1")]
274        pub vk: ::prost::alloc::vec::Vec<u8>,
275        /// The ciphertext of an encrypted frost package for round 2.
276        #[prost(bytes = "vec", tag = "2")]
277        pub encrypted_package: ::prost::alloc::vec::Vec<u8>,
278    }
279    impl ::prost::Name for TargetedPackage {
280        const NAME: &'static str = "TargetedPackage";
281        const PACKAGE: &'static str = "penumbra.custody.threshold.v1";
282        fn full_name() -> ::prost::alloc::string::String {
283            "penumbra.custody.threshold.v1.DKGRound2.TargetedPackage".into()
284        }
285        fn type_url() -> ::prost::alloc::string::String {
286            "/penumbra.custody.threshold.v1.DKGRound2.TargetedPackage".into()
287        }
288    }
289    /// An inner message that will be signed.
290    #[derive(Clone, PartialEq, ::prost::Message)]
291    pub struct Inner {
292        /// Encrypted packages for each recipient.
293        #[prost(message, repeated, tag = "1")]
294        pub encrypted_packages: ::prost::alloc::vec::Vec<TargetedPackage>,
295        /// An opening of the share of the nullifier-deriving key commitment
296        #[prost(bytes = "vec", tag = "2")]
297        pub nullifier: ::prost::alloc::vec::Vec<u8>,
298    }
299    impl ::prost::Name for Inner {
300        const NAME: &'static str = "Inner";
301        const PACKAGE: &'static str = "penumbra.custody.threshold.v1";
302        fn full_name() -> ::prost::alloc::string::String {
303            "penumbra.custody.threshold.v1.DKGRound2.Inner".into()
304        }
305        fn type_url() -> ::prost::alloc::string::String {
306            "/penumbra.custody.threshold.v1.DKGRound2.Inner".into()
307        }
308    }
309}
310impl ::prost::Name for DkgRound2 {
311    const NAME: &'static str = "DKGRound2";
312    const PACKAGE: &'static str = "penumbra.custody.threshold.v1";
313    fn full_name() -> ::prost::alloc::string::String {
314        "penumbra.custody.threshold.v1.DKGRound2".into()
315    }
316    fn type_url() -> ::prost::alloc::string::String {
317        "/penumbra.custody.threshold.v1.DKGRound2".into()
318    }
319}