Skip to main content

concordium_rust_sdk/v2/generated/
concordium.v2.rs

1// This file is @generated by prost-build.
2/// An address of an account. Always 32 bytes.
3#[derive(Clone, PartialEq, ::prost::Message)]
4pub struct AccountAddress {
5    #[prost(bytes = "vec", tag = "1")]
6    pub value: ::prost::alloc::vec::Vec<u8>,
7}
8/// A memo which can be included as part of a transfer. Max size is 256 bytes.
9/// This message can occur starting from protocol version 2.
10#[derive(Clone, PartialEq, ::prost::Message)]
11pub struct Memo {
12    #[prost(bytes = "vec", tag = "1")]
13    pub value: ::prost::alloc::vec::Vec<u8>,
14}
15/// A message that contains no information.
16#[derive(Clone, Copy, PartialEq, ::prost::Message)]
17pub struct Empty {}
18/// Hash of a block. This is always 32 bytes long.
19#[derive(Clone, PartialEq, ::prost::Message)]
20pub struct BlockHash {
21    #[prost(bytes = "vec", tag = "1")]
22    pub value: ::prost::alloc::vec::Vec<u8>,
23}
24/// A SHA256 hash. This is always 32 bytes long.
25#[derive(Clone, PartialEq, ::prost::Message)]
26pub struct Sha256Hash {
27    #[prost(bytes = "vec", tag = "1")]
28    pub value: ::prost::alloc::vec::Vec<u8>,
29}
30/// Hash of a transaction. This is always 32 bytes long.
31#[derive(Clone, PartialEq, ::prost::Message)]
32pub struct TransactionHash {
33    #[prost(bytes = "vec", tag = "1")]
34    pub value: ::prost::alloc::vec::Vec<u8>,
35}
36/// Hash of the state after some block. This is always 32 bytes long.
37#[derive(Clone, PartialEq, ::prost::Message)]
38pub struct StateHash {
39    #[prost(bytes = "vec", tag = "1")]
40    pub value: ::prost::alloc::vec::Vec<u8>,
41}
42/// The absolute height of a block. This is the number of ancestors of a block
43/// since the genesis block. In particular, the chain genesis block has absolute
44/// height 0.
45#[derive(Clone, Copy, PartialEq, ::prost::Message)]
46pub struct AbsoluteBlockHeight {
47    #[prost(uint64, tag = "1")]
48    pub value: u64,
49}
50/// The height of a block relative to the last genesis. This differs from the
51/// absolute block height in that it counts height from the last protocol update.
52#[derive(Clone, Copy, PartialEq, ::prost::Message)]
53pub struct BlockHeight {
54    #[prost(uint64, tag = "1")]
55    pub value: u64,
56}
57/// The ID of a validator, which is the index of its account.
58#[derive(Clone, Copy, PartialEq, ::prost::Message)]
59pub struct BakerId {
60    #[prost(uint64, tag = "1")]
61    pub value: u64,
62}
63/// Index of the account in the account table. These are assigned sequentially
64/// in the order of creation of accounts. The first account has index 0.
65#[derive(Clone, Copy, PartialEq, ::prost::Message)]
66pub struct AccountIndex {
67    #[prost(uint64, tag = "1")]
68    pub value: u64,
69}
70/// A smart contract module reference. This is always 32 bytes long.
71#[derive(Clone, PartialEq, ::prost::Message)]
72pub struct ModuleRef {
73    #[prost(bytes = "vec", tag = "1")]
74    pub value: ::prost::alloc::vec::Vec<u8>,
75}
76/// Source bytes of a versioned smart contract module.
77#[derive(Clone, PartialEq, ::prost::Message)]
78pub struct VersionedModuleSource {
79    /// This field will not be extended in future versions of the API, instead new data versions will
80    /// use optional fields in `ModuleSourceV1`.
81    #[prost(oneof = "versioned_module_source::Module", tags = "1, 2")]
82    pub module: ::core::option::Option<versioned_module_source::Module>,
83}
84/// Nested message and enum types in `VersionedModuleSource`.
85pub mod versioned_module_source {
86    /// Source bytes of a smart contract v0 module.
87    #[derive(Clone, PartialEq, ::prost::Message)]
88    pub struct ModuleSourceV0 {
89        #[prost(bytes = "vec", tag = "1")]
90        pub value: ::prost::alloc::vec::Vec<u8>,
91    }
92    /// Source bytes of a smart contract v1 module.
93    #[derive(Clone, PartialEq, ::prost::Message)]
94    pub struct ModuleSourceV1 {
95        #[prost(bytes = "vec", tag = "1")]
96        pub value: ::prost::alloc::vec::Vec<u8>,
97    }
98    /// This field will not be extended in future versions of the API, instead new data versions will
99    /// use optional fields in `ModuleSourceV1`.
100    #[derive(Clone, PartialEq, ::prost::Oneof)]
101    pub enum Module {
102        #[prost(message, tag = "1")]
103        V0(ModuleSourceV0),
104        #[prost(message, tag = "2")]
105        V1(ModuleSourceV1),
106    }
107}
108/// Unix timestamp in milliseconds.
109#[derive(Clone, Copy, PartialEq, ::prost::Message)]
110pub struct Timestamp {
111    #[prost(uint64, tag = "1")]
112    pub value: u64,
113}
114/// An individual release of a locked balance.
115#[derive(Clone, PartialEq, ::prost::Message)]
116pub struct Release {
117    /// Effective time of the release in milliseconds since unix epoch.
118    #[prost(message, optional, tag = "1")]
119    pub timestamp: ::core::option::Option<Timestamp>,
120    /// Amount to be released.
121    #[prost(message, optional, tag = "2")]
122    pub amount: ::core::option::Option<Amount>,
123    /// List of transaction hashes that contribute a balance to this release.
124    #[prost(message, repeated, tag = "3")]
125    pub transactions: ::prost::alloc::vec::Vec<TransactionHash>,
126}
127/// A new individual release. Part of a single transfer with schedule transaction.
128#[derive(Clone, Copy, PartialEq, ::prost::Message)]
129pub struct NewRelease {
130    /// Effective time of the release in milliseconds since unix epoch.
131    #[prost(message, optional, tag = "1")]
132    pub timestamp: ::core::option::Option<Timestamp>,
133    /// Amount to be released.
134    #[prost(message, optional, tag = "2")]
135    pub amount: ::core::option::Option<Amount>,
136}
137/// State of the account's release schedule. This is the balance of the account
138/// that is owned by the account, but cannot be used until the release point.
139#[derive(Clone, PartialEq, ::prost::Message)]
140pub struct ReleaseSchedule {
141    /// Total amount locked in the release schedule.
142    #[prost(message, optional, tag = "1")]
143    pub total: ::core::option::Option<Amount>,
144    /// A list of releases, ordered by increasing timestamp.
145    #[prost(message, repeated, tag = "2")]
146    pub schedules: ::prost::alloc::vec::Vec<Release>,
147}
148/// An encrypted amount, in two chunks in "little endian limbs". That is, the
149/// first chunk represents the low 32 bits of an amount, and the second chunk
150/// represents the high 32 bits. The chunks are serialized in order and
151/// represented as a byte array.
152/// Always 192 bytes.
153#[derive(Clone, PartialEq, ::prost::Message)]
154pub struct EncryptedAmount {
155    #[prost(bytes = "vec", tag = "1")]
156    pub value: ::prost::alloc::vec::Vec<u8>,
157}
158#[derive(Clone, PartialEq, ::prost::Message)]
159pub struct EncryptedBalance {
160    /// Encrypted amount that is a result of this account's actions.
161    /// In particular this list includes the aggregate of
162    ///
163    /// - remaining amounts that result when transferring to public balance
164    /// - remaining amounts when transferring to another account
165    /// - encrypted amounts that are transferred from public balance
166    ///
167    /// When a transfer is made all of these must always be used.
168    #[prost(message, optional, tag = "1")]
169    pub self_amount: ::core::option::Option<EncryptedAmount>,
170    /// Starting index for incoming encrypted amounts. If an aggregated amount
171    /// is present then this index is associated with such an amount and the
172    /// list of incoming encrypted amounts starts at the index `start_index
173    /// + 1`.
174    #[prost(uint64, tag = "2")]
175    pub start_index: u64,
176    /// If present, the amount that has resulted from aggregating other amounts
177    /// If this field is present so is `num_aggregated`.
178    #[prost(message, optional, tag = "3")]
179    pub aggregated_amount: ::core::option::Option<EncryptedAmount>,
180    /// The number of aggregated amounts (must be at least 2 if present). This
181    /// field is present if and only if `aggregated_amount` is present.
182    #[prost(uint32, optional, tag = "4")]
183    pub num_aggregated: ::core::option::Option<u32>,
184    /// Amounts starting at `start_index` (or at `start_index + 1` if there is
185    /// an aggregated amount present). They are assumed to be numbered
186    /// sequentially. The length of this list is bounded by the maximum number
187    /// of incoming amounts on the accounts, which is currently 32. After
188    /// that aggregation kicks in.
189    #[prost(message, repeated, tag = "5")]
190    pub incoming_amounts: ::prost::alloc::vec::Vec<EncryptedAmount>,
191}
192/// Entity to which the account delegates a portion of its stake.
193#[derive(Clone, Copy, PartialEq, ::prost::Message)]
194pub struct DelegationTarget {
195    /// This field might be extended in future versions of the API.
196    #[prost(oneof = "delegation_target::Target", tags = "1, 2")]
197    pub target: ::core::option::Option<delegation_target::Target>,
198}
199/// Nested message and enum types in `DelegationTarget`.
200pub mod delegation_target {
201    /// This field might be extended in future versions of the API.
202    #[derive(Clone, Copy, PartialEq, ::prost::Oneof)]
203    pub enum Target {
204        /// Delegate passively, i.e., to no specific validator.
205        #[prost(message, tag = "1")]
206        Passive(super::Empty),
207        /// Delegate to a specific validator.
208        #[prost(message, tag = "2")]
209        Baker(super::BakerId),
210    }
211}
212/// Validator's public key used to check whether they won the lottery or not.
213#[derive(Clone, PartialEq, ::prost::Message)]
214pub struct BakerElectionVerifyKey {
215    #[prost(bytes = "vec", tag = "1")]
216    pub value: ::prost::alloc::vec::Vec<u8>,
217}
218/// Validator's public key used to check that they are indeed the ones who
219/// produced the block.
220#[derive(Clone, PartialEq, ::prost::Message)]
221pub struct BakerSignatureVerifyKey {
222    #[prost(bytes = "vec", tag = "1")]
223    pub value: ::prost::alloc::vec::Vec<u8>,
224}
225/// Validator's public key used to check signatures on finalization records.
226/// This is only used if the validator has sufficient stake to participate in
227/// finalization.
228#[derive(Clone, PartialEq, ::prost::Message)]
229pub struct BakerAggregationVerifyKey {
230    #[prost(bytes = "vec", tag = "1")]
231    pub value: ::prost::alloc::vec::Vec<u8>,
232}
233/// Information about a validator.
234#[derive(Clone, PartialEq, ::prost::Message)]
235pub struct BakerInfo {
236    /// Identity of the validator. This is actually the account index of
237    /// the account controlling the validator.
238    #[prost(message, optional, tag = "1")]
239    pub baker_id: ::core::option::Option<BakerId>,
240    /// Validator's public key used to check whether they won the lottery or not.
241    #[prost(message, optional, tag = "2")]
242    pub election_key: ::core::option::Option<BakerElectionVerifyKey>,
243    /// Validator's public key used to check that they are indeed the ones who
244    /// produced the block.
245    #[prost(message, optional, tag = "3")]
246    pub signature_key: ::core::option::Option<BakerSignatureVerifyKey>,
247    /// Validator's public key used to check signatures on finalization records.
248    /// This is only used if the validator has sufficient stake to participate in
249    /// finalization.
250    #[prost(message, optional, tag = "4")]
251    pub aggregation_key: ::core::option::Option<BakerAggregationVerifyKey>,
252}
253/// Pending change to the stake either of a validator or delegator.
254#[derive(Clone, Copy, PartialEq, ::prost::Message)]
255pub struct StakePendingChange {
256    /// This field will not be extended in future versions of the API, since it is not used starting
257    /// from Concordium Protocol Version 7.
258    #[prost(oneof = "stake_pending_change::Change", tags = "1, 2")]
259    pub change: ::core::option::Option<stake_pending_change::Change>,
260}
261/// Nested message and enum types in `StakePendingChange`.
262pub mod stake_pending_change {
263    #[derive(Clone, Copy, PartialEq, ::prost::Message)]
264    pub struct Reduce {
265        #[prost(message, optional, tag = "1")]
266        pub new_stake: ::core::option::Option<super::Amount>,
267        /// Unix timestamp in milliseconds when the change takes effect.
268        #[prost(message, optional, tag = "2")]
269        pub effective_time: ::core::option::Option<super::Timestamp>,
270    }
271    /// This field will not be extended in future versions of the API, since it is not used starting
272    /// from Concordium Protocol Version 7.
273    #[derive(Clone, Copy, PartialEq, ::prost::Oneof)]
274    pub enum Change {
275        #[prost(message, tag = "1")]
276        Reduce(Reduce),
277        /// Remove the stake. The value is a Unix timestamp of the effective time in
278        /// milliseconds.
279        #[prost(message, tag = "2")]
280        Remove(super::Timestamp),
281    }
282}
283/// A fraction of an amount with a precision of `1/100_000`.
284#[derive(Clone, Copy, PartialEq, ::prost::Message)]
285pub struct AmountFraction {
286    /// Must not exceed 100000.
287    #[prost(uint32, tag = "1")]
288    pub parts_per_hundred_thousand: u32,
289}
290/// Distribution of the rewards for the particular pool.
291#[derive(Clone, Copy, PartialEq, ::prost::Message)]
292pub struct CommissionRates {
293    /// Fraction of finalization rewards charged by the pool owner.
294    #[prost(message, optional, tag = "1")]
295    pub finalization: ::core::option::Option<AmountFraction>,
296    /// Fraction of block production rewards charged by the pool owner.
297    #[prost(message, optional, tag = "2")]
298    pub baking: ::core::option::Option<AmountFraction>,
299    /// Fraction of transaction rewards charged by the pool owner.
300    #[prost(message, optional, tag = "3")]
301    pub transaction: ::core::option::Option<AmountFraction>,
302}
303/// Additional information about a validator pool.
304/// This information is added with the introduction of delegation.
305#[derive(Clone, PartialEq, ::prost::Message)]
306pub struct BakerPoolInfo {
307    /// Whether the pool allows delegators.
308    #[prost(enumeration = "OpenStatus", tag = "1")]
309    pub open_status: i32,
310    /// The URL that links to the metadata about the pool.
311    #[prost(string, tag = "2")]
312    pub url: ::prost::alloc::string::String,
313    /// The commission rates charged by the pool owner.
314    #[prost(message, optional, tag = "3")]
315    pub commission_rates: ::core::option::Option<CommissionRates>,
316}
317/// Information about the account stake, if the account is either a validator or a
318/// delegator.
319#[derive(Clone, PartialEq, ::prost::Message)]
320pub struct AccountStakingInfo {
321    /// This field might be extended in future versions of the API.
322    #[prost(oneof = "account_staking_info::StakingInfo", tags = "1, 2")]
323    pub staking_info: ::core::option::Option<account_staking_info::StakingInfo>,
324}
325/// Nested message and enum types in `AccountStakingInfo`.
326pub mod account_staking_info {
327    #[derive(Clone, PartialEq, ::prost::Message)]
328    pub struct Baker {
329        /// Amount staked at present.
330        #[prost(message, optional, tag = "1")]
331        pub staked_amount: ::core::option::Option<super::Amount>,
332        /// A flag indicating whether rewards paid to the validator are automatically
333        /// restaked or not.
334        #[prost(bool, tag = "2")]
335        pub restake_earnings: bool,
336        /// Information about the validator that is staking.
337        #[prost(message, optional, tag = "3")]
338        pub baker_info: ::core::option::Option<super::BakerInfo>,
339        /// If present, any pending change to the delegated stake.
340        /// Starting from Concordium Protocol Version 7 this will never be present, due to changes for
341        /// the staking cooldown.
342        #[prost(message, optional, tag = "4")]
343        pub pending_change: ::core::option::Option<super::StakePendingChange>,
344        /// Present if the account is currently a validator, i.e., it is in the validator
345        /// committee of the current epoch.
346        #[prost(message, optional, tag = "5")]
347        pub pool_info: ::core::option::Option<super::BakerPoolInfo>,
348        /// A flag indicating whether the account is currently suspended or not. The
349        /// flag has a meaning from protocol version 8 onwards. In protocol version 8
350        /// it signals whether an account has been suspended and is not participating
351        /// in the consensus algorithm. For protocol version < 8 the flag will always
352        /// be set to false.
353        #[prost(bool, tag = "6")]
354        pub is_suspended: bool,
355    }
356    #[derive(Clone, Copy, PartialEq, ::prost::Message)]
357    pub struct Delegator {
358        /// The amount that the account delegates.
359        #[prost(message, optional, tag = "1")]
360        pub staked_amount: ::core::option::Option<super::Amount>,
361        /// Whether the earnings are automatically added to the staked amount.
362        #[prost(bool, tag = "2")]
363        pub restake_earnings: bool,
364        /// The entity to which the account delegates.
365        #[prost(message, optional, tag = "3")]
366        pub target: ::core::option::Option<super::DelegationTarget>,
367        /// If present, any pending change to the delegated stake.
368        #[prost(message, optional, tag = "4")]
369        pub pending_change: ::core::option::Option<super::StakePendingChange>,
370    }
371    /// This field might be extended in future versions of the API.
372    #[derive(Clone, PartialEq, ::prost::Oneof)]
373    pub enum StakingInfo {
374        /// The account is a validator.
375        #[prost(message, tag = "1")]
376        Baker(Baker),
377        /// The account is a delegator.
378        #[prost(message, tag = "2")]
379        Delegator(Delegator),
380    }
381}
382/// A sequence number that determines the ordering of transactions from the
383/// account. The minimum sequence number is 1.
384#[derive(Clone, Copy, PartialEq, ::prost::Message)]
385pub struct SequenceNumber {
386    /// The sequence number.
387    #[prost(uint64, tag = "1")]
388    pub value: u64,
389}
390/// A sequence number that determines the ordering of update transactions.
391/// Equivalent to `SequenceNumber` for account transactions.
392/// Update sequence numbers are per update type and the minimum value is 1.
393#[derive(Clone, Copy, PartialEq, ::prost::Message)]
394pub struct UpdateSequenceNumber {
395    /// The sequence number.
396    #[prost(uint64, tag = "1")]
397    pub value: u64,
398}
399/// An amount of microCCD.
400#[derive(Clone, Copy, PartialEq, ::prost::Message)]
401pub struct Amount {
402    #[prost(uint64, tag = "1")]
403    pub value: u64,
404}
405/// Index of a credential on an account.
406#[derive(Clone, Copy, PartialEq, ::prost::Message)]
407pub struct CredentialIndex {
408    #[prost(uint32, tag = "1")]
409    pub value: u32,
410}
411/// The number of signatures required to sign.
412#[derive(Clone, Copy, PartialEq, ::prost::Message)]
413pub struct SignatureThreshold {
414    #[prost(uint32, tag = "1")]
415    pub value: u32,
416}
417/// The number of credentials required to sign an account transaction.
418#[derive(Clone, Copy, PartialEq, ::prost::Message)]
419pub struct AccountThreshold {
420    #[prost(uint32, tag = "1")]
421    pub value: u32,
422}
423/// An account encryption key. Always 96 bytes.
424#[derive(Clone, PartialEq, ::prost::Message)]
425pub struct EncryptionKey {
426    #[prost(bytes = "vec", tag = "1")]
427    pub value: ::prost::alloc::vec::Vec<u8>,
428}
429/// An address of either a contract or an account.
430#[derive(Clone, PartialEq, ::prost::Message)]
431pub struct Address {
432    /// This field will not be extended in future versions of the API.
433    #[prost(oneof = "address::Type", tags = "1, 2")]
434    pub r#type: ::core::option::Option<address::Type>,
435}
436/// Nested message and enum types in `Address`.
437pub mod address {
438    /// This field will not be extended in future versions of the API.
439    #[derive(Clone, PartialEq, ::prost::Oneof)]
440    pub enum Type {
441        #[prost(message, tag = "1")]
442        Account(super::AccountAddress),
443        #[prost(message, tag = "2")]
444        Contract(super::ContractAddress),
445    }
446}
447/// A public key used to verify transaction signatures from an account.
448#[derive(Clone, PartialEq, ::prost::Message)]
449pub struct AccountVerifyKey {
450    /// This field might be extended in future versions of the API.
451    #[prost(oneof = "account_verify_key::Key", tags = "1")]
452    pub key: ::core::option::Option<account_verify_key::Key>,
453}
454/// Nested message and enum types in `AccountVerifyKey`.
455pub mod account_verify_key {
456    /// This field might be extended in future versions of the API.
457    #[derive(Clone, PartialEq, ::prost::Oneof)]
458    pub enum Key {
459        #[prost(bytes, tag = "1")]
460        Ed25519Key(::prost::alloc::vec::Vec<u8>),
461    }
462}
463/// Public keys of a single credential.
464#[derive(Clone, PartialEq, ::prost::Message)]
465pub struct CredentialPublicKeys {
466    #[prost(map = "uint32, message", tag = "1")]
467    pub keys: ::std::collections::HashMap<u32, AccountVerifyKey>,
468    #[prost(message, optional, tag = "2")]
469    pub threshold: ::core::option::Option<SignatureThreshold>,
470}
471/// A registration ID of a credential, derived from the secret PRF key and a
472/// nonce. This is always 48 bytes long.
473#[derive(Clone, PartialEq, ::prost::Message)]
474pub struct CredentialRegistrationId {
475    #[prost(bytes = "vec", tag = "1")]
476    pub value: ::prost::alloc::vec::Vec<u8>,
477}
478/// An index of the identity provider that identifies them uniquely in the
479/// context of a specific chain.
480#[derive(Clone, Copy, PartialEq, ::prost::Message)]
481pub struct IdentityProviderIdentity {
482    #[prost(uint32, tag = "1")]
483    pub value: u32,
484}
485/// Representation of the pair of a year and month.
486#[derive(Clone, Copy, PartialEq, ::prost::Message)]
487pub struct YearMonth {
488    #[prost(uint32, tag = "1")]
489    pub year: u32,
490    #[prost(uint32, tag = "2")]
491    pub month: u32,
492}
493/// Policy on a credential.
494#[derive(Clone, PartialEq, ::prost::Message)]
495pub struct Policy {
496    /// The year and month when the identity object from which the credential is
497    /// derived was created.
498    #[prost(message, optional, tag = "1")]
499    pub created_at: ::core::option::Option<YearMonth>,
500    /// The last year and month when the credential is still valid. After this
501    /// expires an account can no longer be created from the credential.
502    #[prost(message, optional, tag = "2")]
503    pub valid_to: ::core::option::Option<YearMonth>,
504    /// Mapping from attribute tags to attribute values. Attribute tags are always
505    /// representable in a single `u8`, attribute values are never more than 31
506    /// bytes in length.
507    #[prost(map = "uint32, bytes", tag = "3")]
508    pub attributes: ::std::collections::HashMap<u32, ::prost::alloc::vec::Vec<u8>>,
509}
510/// Values contained in an initial credential.
511#[derive(Clone, PartialEq, ::prost::Message)]
512pub struct InitialCredentialValues {
513    /// Public keys of the credential.
514    #[prost(message, optional, tag = "1")]
515    pub keys: ::core::option::Option<CredentialPublicKeys>,
516    /// Its registration ID.
517    #[prost(message, optional, tag = "2")]
518    pub cred_id: ::core::option::Option<CredentialRegistrationId>,
519    /// The identity provider who signed the identity object from which this
520    /// credential is derived.
521    #[prost(message, optional, tag = "3")]
522    pub ip_id: ::core::option::Option<IdentityProviderIdentity>,
523    /// Policy of this credential.
524    #[prost(message, optional, tag = "4")]
525    pub policy: ::core::option::Option<Policy>,
526}
527/// Data relating to a single anonymity revoker sent by the account holder to
528/// the chain.
529#[derive(Clone, PartialEq, ::prost::Message)]
530pub struct ChainArData {
531    /// Share of the encryption of IdCredPub.
532    #[prost(bytes = "vec", tag = "1")]
533    pub enc_id_cred_pub_share: ::prost::alloc::vec::Vec<u8>,
534}
535/// The number of anonymity revokers needed to revoke anonymity of a credential
536/// holder.
537#[derive(Clone, Copy, PartialEq, ::prost::Message)]
538pub struct ArThreshold {
539    #[prost(uint32, tag = "1")]
540    pub value: u32,
541}
542/// A single commitment in the G1 group of the BLS curve. This is always 48 bytes
543/// in length.
544#[derive(Clone, PartialEq, ::prost::Message)]
545pub struct Commitment {
546    #[prost(bytes = "vec", tag = "1")]
547    pub value: ::prost::alloc::vec::Vec<u8>,
548}
549/// Commitments that are part of a normal credential.
550#[derive(Clone, PartialEq, ::prost::Message)]
551pub struct CredentialCommitments {
552    /// Commitment to the PRF key.
553    #[prost(message, optional, tag = "1")]
554    pub prf: ::core::option::Option<Commitment>,
555    /// Commitment to the counter used to generate the credential registration id.
556    #[prost(message, optional, tag = "2")]
557    pub cred_counter: ::core::option::Option<Commitment>,
558    /// Commitment to the `max_accounts` value, which determines the maximum number
559    /// of credentials that may be created from the identity object.
560    #[prost(message, optional, tag = "3")]
561    pub max_accounts: ::core::option::Option<Commitment>,
562    /// Commitments to the attributes which have not been revealed in the policy.
563    #[prost(map = "uint32, message", tag = "4")]
564    pub attributes: ::std::collections::HashMap<u32, Commitment>,
565    /// List of commitments to the coefficients of the sharing polynomial. This
566    /// polynomial is used in a shared encryption of `id_cred_pub` among the
567    /// anonymity revokers.
568    #[prost(message, repeated, tag = "5")]
569    pub id_cred_sec_sharing_coeff: ::prost::alloc::vec::Vec<Commitment>,
570}
571/// Values contained in a normal (non-initial) credential.
572#[derive(Clone, PartialEq, ::prost::Message)]
573pub struct NormalCredentialValues {
574    /// Public keys of the credential.
575    #[prost(message, optional, tag = "1")]
576    pub keys: ::core::option::Option<CredentialPublicKeys>,
577    /// Its registration ID.
578    #[prost(message, optional, tag = "2")]
579    pub cred_id: ::core::option::Option<CredentialRegistrationId>,
580    /// The identity provider who signed the identity object from which this
581    /// credential is derived.
582    #[prost(message, optional, tag = "3")]
583    pub ip_id: ::core::option::Option<IdentityProviderIdentity>,
584    /// Policy of this credential.
585    #[prost(message, optional, tag = "4")]
586    pub policy: ::core::option::Option<Policy>,
587    /// The number of anonymity revokers that must work together to revoke the
588    /// anonymity of the credential holder.
589    #[prost(message, optional, tag = "5")]
590    pub ar_threshold: ::core::option::Option<ArThreshold>,
591    /// Mapping from anonymity revoker identities to revocation data for the given anonymity revoker.
592    #[prost(map = "uint32, message", tag = "6")]
593    pub ar_data: ::std::collections::HashMap<u32, ChainArData>,
594    /// Commitments to attributes which have not been revealed.
595    #[prost(message, optional, tag = "7")]
596    pub commitments: ::core::option::Option<CredentialCommitments>,
597}
598/// Credential that is part of an account.
599#[derive(Clone, PartialEq, ::prost::Message)]
600pub struct AccountCredential {
601    /// This field might be extended in future versions of the API.
602    #[prost(oneof = "account_credential::CredentialValues", tags = "1, 2")]
603    pub credential_values: ::core::option::Option<account_credential::CredentialValues>,
604}
605/// Nested message and enum types in `AccountCredential`.
606pub mod account_credential {
607    /// This field might be extended in future versions of the API.
608    #[derive(Clone, PartialEq, ::prost::Oneof)]
609    pub enum CredentialValues {
610        #[prost(message, tag = "1")]
611        Initial(super::InitialCredentialValues),
612        #[prost(message, tag = "2")]
613        Normal(super::NormalCredentialValues),
614    }
615}
616#[derive(Clone, Copy, PartialEq, ::prost::Message)]
617pub struct Cooldown {
618    /// The time in milliseconds since the Unix epoch when the cooldown period
619    /// ends.
620    #[prost(message, optional, tag = "1")]
621    pub end_time: ::core::option::Option<Timestamp>,
622    /// The amount that is in cooldown and set to be released at the end of the
623    /// cooldown period.
624    #[prost(message, optional, tag = "2")]
625    pub amount: ::core::option::Option<Amount>,
626    /// The status of the cooldown.
627    #[prost(enumeration = "cooldown::CooldownStatus", tag = "3")]
628    pub status: i32,
629}
630/// Nested message and enum types in `Cooldown`.
631pub mod cooldown {
632    /// The status of a cooldown. When stake is removed from a validator or delegator
633    /// (from protocol version 7) it first enters the pre-pre-cooldown state.
634    /// The next time the stake snaphot is taken (at the epoch transition before
635    /// a payday) it enters the pre-cooldown state. At the subsequent payday, it
636    /// enters the cooldown state. At the payday after the end of the cooldown
637    /// period, the stake is finally released.
638    ///
639    /// This type might be extended in future versions of the API.
640    #[derive(
641        Clone,
642        Copy,
643        Debug,
644        PartialEq,
645        Eq,
646        Hash,
647        PartialOrd,
648        Ord,
649        ::prost::Enumeration
650    )]
651    #[repr(i32)]
652    pub enum CooldownStatus {
653        /// The amount is in cooldown and will expire at the specified time, becoming available
654        /// at the subsequent pay day.
655        Cooldown = 0,
656        /// The amount will enter cooldown at the next pay day. The specified end time is
657        /// projected to be the end of the cooldown period, but the actual end time will be
658        /// determined at the payday, and may be different if the global cooldown period
659        /// changes.
660        PreCooldown = 1,
661        /// The amount will enter pre-cooldown at the next snapshot epoch (i.e. the epoch
662        /// transition before a pay day transition). As with pre-cooldown, the specified
663        /// end time is projected, but the actual end time will be determined later.
664        PrePreCooldown = 2,
665    }
666    impl CooldownStatus {
667        /// String value of the enum field names used in the ProtoBuf definition.
668        ///
669        /// The values are not transformed in any way and thus are considered stable
670        /// (if the ProtoBuf definition does not change) and safe for programmatic use.
671        pub fn as_str_name(&self) -> &'static str {
672            match self {
673                Self::Cooldown => "COOLDOWN",
674                Self::PreCooldown => "PRE_COOLDOWN",
675                Self::PrePreCooldown => "PRE_PRE_COOLDOWN",
676            }
677        }
678        /// Creates an enum from field names used in the ProtoBuf definition.
679        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
680            match value {
681                "COOLDOWN" => Some(Self::Cooldown),
682                "PRE_COOLDOWN" => Some(Self::PreCooldown),
683                "PRE_PRE_COOLDOWN" => Some(Self::PrePreCooldown),
684                _ => None,
685            }
686        }
687    }
688}
689/// The token state at the block level.
690#[derive(Clone, PartialEq, ::prost::Message)]
691pub struct TokenInfo {
692    /// The unique token id.
693    #[prost(message, optional, tag = "1")]
694    pub token_id: ::core::option::Option<plt::TokenId>,
695    /// The associated block level state.
696    #[prost(message, optional, tag = "2")]
697    pub token_state: ::core::option::Option<plt::TokenState>,
698}
699/// Information about the account at a particular point in time.
700#[derive(Clone, PartialEq, ::prost::Message)]
701pub struct AccountInfo {
702    /// Next sequence number to be used for transactions signed from this account.
703    #[prost(message, optional, tag = "1")]
704    pub sequence_number: ::core::option::Option<SequenceNumber>,
705    /// Current (unencrypted) balance of the account.
706    #[prost(message, optional, tag = "2")]
707    pub amount: ::core::option::Option<Amount>,
708    /// Release schedule for any locked up amount. This could be an empty
709    /// release schedule.
710    #[prost(message, optional, tag = "3")]
711    pub schedule: ::core::option::Option<ReleaseSchedule>,
712    /// Map of all currently active credentials on the account.
713    /// This includes public keys that can sign for the given credentials, as
714    /// well as any revealed attributes. This map always contains a credential
715    /// with index 0.
716    #[prost(map = "uint32, message", tag = "4")]
717    pub creds: ::std::collections::HashMap<u32, AccountCredential>,
718    /// Lower bound on how many credentials must sign any given transaction from
719    /// this account.
720    #[prost(message, optional, tag = "5")]
721    pub threshold: ::core::option::Option<AccountThreshold>,
722    /// The encrypted balance of the account.
723    #[prost(message, optional, tag = "6")]
724    pub encrypted_balance: ::core::option::Option<EncryptedBalance>,
725    /// The public key for sending encrypted balances to the account.
726    #[prost(message, optional, tag = "7")]
727    pub encryption_key: ::core::option::Option<EncryptionKey>,
728    /// Internal index of the account. Accounts on the chain get sequential
729    /// indices. These should generally not be used outside of the chain,
730    /// the account address is meant to be used to refer to accounts,
731    /// however the account index serves the role of the validator id, if the
732    /// account is a validator. Hence it is exposed here as well.
733    #[prost(message, optional, tag = "8")]
734    pub index: ::core::option::Option<AccountIndex>,
735    /// Present if the account is a validator or delegator. In that case
736    /// it is the information about the validator or delegator.
737    #[prost(message, optional, tag = "9")]
738    pub stake: ::core::option::Option<AccountStakingInfo>,
739    /// Canonical address of the account. This is derived from the first credential
740    /// that created the account.
741    #[prost(message, optional, tag = "10")]
742    pub address: ::core::option::Option<AccountAddress>,
743    /// The stake on the account that is in cooldown.
744    /// There can be multiple amounts in cooldown that expire at different times.
745    /// This was introduced in protocol version 7, and so is not present in
746    /// earlier protocol versions.
747    #[prost(message, repeated, tag = "11")]
748    pub cooldowns: ::prost::alloc::vec::Vec<Cooldown>,
749    /// The available (unencrypted) balance of CCD's of the account (i.e. that
750    /// can be transferred or used to pay for transactions). This is the balance
751    /// minus the locked amount. The locked amount is the maximum of the amount
752    /// in the release schedule and the total amount that is actively staked or in
753    /// cooldown (inactive stake). This was introduced in node version 7.0.
754    #[prost(message, optional, tag = "12")]
755    pub available_balance: ::core::option::Option<Amount>,
756    /// The protocol level tokens (PLT) held by the account.
757    #[prost(message, repeated, tag = "13")]
758    pub tokens: ::prost::alloc::vec::Vec<account_info::Token>,
759}
760/// Nested message and enum types in `AccountInfo`.
761pub mod account_info {
762    /// Protocol level token (PLT).
763    #[derive(Clone, PartialEq, ::prost::Message)]
764    pub struct Token {
765        /// The unique token id
766        #[prost(message, optional, tag = "1")]
767        pub token_id: ::core::option::Option<super::plt::TokenId>,
768        /// The associated token account level state
769        #[prost(message, optional, tag = "2")]
770        pub token_account_state: ::core::option::Option<super::plt::TokenAccountState>,
771    }
772}
773/// Input to queries which take a block as a parameter.
774#[derive(Clone, PartialEq, ::prost::Message)]
775pub struct BlockHashInput {
776    /// This field might be extended in future versions of the API.
777    #[prost(oneof = "block_hash_input::BlockHashInput", tags = "1, 2, 3, 4, 5")]
778    pub block_hash_input: ::core::option::Option<block_hash_input::BlockHashInput>,
779}
780/// Nested message and enum types in `BlockHashInput`.
781pub mod block_hash_input {
782    /// Request using a relative block height.
783    #[derive(Clone, Copy, PartialEq, ::prost::Message)]
784    pub struct RelativeHeight {
785        /// Genesis index to start from.
786        #[prost(message, optional, tag = "1")]
787        pub genesis_index: ::core::option::Option<super::GenesisIndex>,
788        /// Height starting from the genesis block at the genesis index.
789        #[prost(message, optional, tag = "2")]
790        pub height: ::core::option::Option<super::BlockHeight>,
791        /// Whether to return results only from the specified genesis index (`true`),
792        /// or allow results from more recent genesis indices as well (`false`).
793        #[prost(bool, tag = "3")]
794        pub restrict: bool,
795    }
796    /// This field might be extended in future versions of the API.
797    #[derive(Clone, PartialEq, ::prost::Oneof)]
798    pub enum BlockHashInput {
799        /// Query for the best block.
800        #[prost(message, tag = "1")]
801        Best(super::Empty),
802        /// Query for the last finalized block.
803        #[prost(message, tag = "2")]
804        LastFinal(super::Empty),
805        /// Query for the block specified by the hash. This hash should always be 32 bytes.
806        #[prost(message, tag = "3")]
807        Given(super::BlockHash),
808        /// Query for a block at absolute height, if a unique block can be identified at that height.
809        #[prost(message, tag = "4")]
810        AbsoluteHeight(super::AbsoluteBlockHeight),
811        /// Query for a block at height relative to a genesis index.
812        #[prost(message, tag = "5")]
813        RelativeHeight(RelativeHeight),
814    }
815}
816/// Input to queries which take an epoch as a parameter.
817#[derive(Clone, PartialEq, ::prost::Message)]
818pub struct EpochRequest {
819    /// This field might be extended in future versions of the API.
820    #[prost(oneof = "epoch_request::EpochRequestInput", tags = "1, 2")]
821    pub epoch_request_input: ::core::option::Option<epoch_request::EpochRequestInput>,
822}
823/// Nested message and enum types in `EpochRequest`.
824pub mod epoch_request {
825    /// Request an epoch by number at a given genesis index.
826    #[derive(Clone, Copy, PartialEq, ::prost::Message)]
827    pub struct RelativeEpoch {
828        /// The genesis index to query at. The query is restricted to this genesis index, and
829        /// will not return results for other indices even if the epoch number is out of bounds.
830        #[prost(message, optional, tag = "1")]
831        pub genesis_index: ::core::option::Option<super::GenesisIndex>,
832        /// The epoch number to query at.
833        #[prost(message, optional, tag = "2")]
834        pub epoch: ::core::option::Option<super::Epoch>,
835    }
836    /// This field might be extended in future versions of the API.
837    #[derive(Clone, PartialEq, ::prost::Oneof)]
838    pub enum EpochRequestInput {
839        /// Query by genesis index and epoch number.
840        #[prost(message, tag = "1")]
841        RelativeEpoch(RelativeEpoch),
842        /// Query for the epoch of a specified block.
843        #[prost(message, tag = "2")]
844        BlockHash(super::BlockHashInput),
845    }
846}
847/// Input to queries which take an account as a parameter.
848#[derive(Clone, PartialEq, ::prost::Message)]
849pub struct AccountIdentifierInput {
850    /// This field might be extended in future versions of the API.
851    #[prost(
852        oneof = "account_identifier_input::AccountIdentifierInput",
853        tags = "1, 2, 3"
854    )]
855    pub account_identifier_input: ::core::option::Option<
856        account_identifier_input::AccountIdentifierInput,
857    >,
858}
859/// Nested message and enum types in `AccountIdentifierInput`.
860pub mod account_identifier_input {
861    /// This field might be extended in future versions of the API.
862    #[derive(Clone, PartialEq, ::prost::Oneof)]
863    pub enum AccountIdentifierInput {
864        /// Identify the account by the address of the account.
865        #[prost(message, tag = "1")]
866        Address(super::AccountAddress),
867        /// Identify the account by the credential that belongs or has belonged to it.
868        #[prost(message, tag = "2")]
869        CredId(super::CredentialRegistrationId),
870        /// Identify the account via its index.
871        #[prost(message, tag = "3")]
872        AccountIndex(super::AccountIndex),
873    }
874}
875/// Request for account information.
876#[derive(Clone, PartialEq, ::prost::Message)]
877pub struct AccountInfoRequest {
878    /// Block in which to query the account information.
879    #[prost(message, optional, tag = "1")]
880    pub block_hash: ::core::option::Option<BlockHashInput>,
881    /// Specification of the account.
882    #[prost(message, optional, tag = "2")]
883    pub account_identifier: ::core::option::Option<AccountIdentifierInput>,
884}
885/// Request for token information.
886#[derive(Clone, PartialEq, ::prost::Message)]
887pub struct TokenInfoRequest {
888    /// Block in which to query the token information.
889    #[prost(message, optional, tag = "1")]
890    pub block_hash: ::core::option::Option<BlockHashInput>,
891    /// Specification of the token identifier.
892    #[prost(message, optional, tag = "2")]
893    pub token_id: ::core::option::Option<plt::TokenId>,
894}
895/// Information about a finalized block that is part of the streaming response.
896#[derive(Clone, PartialEq, ::prost::Message)]
897pub struct FinalizedBlockInfo {
898    /// Hash of the block.
899    #[prost(message, optional, tag = "1")]
900    pub hash: ::core::option::Option<BlockHash>,
901    /// Absolute height of the block, height 0 is the genesis block.
902    #[prost(message, optional, tag = "2")]
903    pub height: ::core::option::Option<AbsoluteBlockHeight>,
904}
905/// Request the ancestors for the given block.
906#[derive(Clone, PartialEq, ::prost::Message)]
907pub struct AncestorsRequest {
908    /// The block to get ancestors of.
909    #[prost(message, optional, tag = "1")]
910    pub block_hash: ::core::option::Option<BlockHashInput>,
911    /// The maximum number of ancestors returned.
912    #[prost(uint64, tag = "2")]
913    pub amount: u64,
914}
915/// Request for getting the source of a smart contract module.
916#[derive(Clone, PartialEq, ::prost::Message)]
917pub struct ModuleSourceRequest {
918    /// The block to be used for the query.
919    #[prost(message, optional, tag = "1")]
920    pub block_hash: ::core::option::Option<BlockHashInput>,
921    /// The reference of the module.
922    #[prost(message, optional, tag = "2")]
923    pub module_ref: ::core::option::Option<ModuleRef>,
924}
925/// Address of a smart contract instance.
926#[derive(Clone, Copy, PartialEq, ::prost::Message)]
927pub struct ContractAddress {
928    /// The index of the smart contract.
929    #[prost(uint64, tag = "1")]
930    pub index: u64,
931    /// The subindex of the smart contract instance.
932    /// Currently not used, so it is always 0.
933    #[prost(uint64, tag = "2")]
934    pub subindex: u64,
935}
936/// Request for getting information about a smart contract instance.
937#[derive(Clone, PartialEq, ::prost::Message)]
938pub struct InstanceInfoRequest {
939    /// The block to be used for the query.
940    #[prost(message, optional, tag = "1")]
941    pub block_hash: ::core::option::Option<BlockHashInput>,
942    /// The address of the smart contract instance.
943    #[prost(message, optional, tag = "2")]
944    pub address: ::core::option::Option<ContractAddress>,
945}
946/// Information about a smart contract instance.
947#[derive(Clone, PartialEq, ::prost::Message)]
948pub struct InstanceInfo {
949    /// The information depends on the smart contract version used by the instance.
950    ///
951    /// This field will not be extended in future versions of the API, instead new data versions will
952    /// use optional fields in `InstanceInfo.V1`.
953    #[prost(oneof = "instance_info::Version", tags = "1, 2")]
954    pub version: ::core::option::Option<instance_info::Version>,
955}
956/// Nested message and enum types in `InstanceInfo`.
957pub mod instance_info {
958    /// Version 0 smart contract instance information.
959    #[derive(Clone, PartialEq, ::prost::Message)]
960    pub struct V0 {
961        /// The state of the instance.
962        #[prost(message, optional, tag = "1")]
963        pub model: ::core::option::Option<super::ContractStateV0>,
964        /// The account address which deployed the instance.
965        #[prost(message, optional, tag = "2")]
966        pub owner: ::core::option::Option<super::AccountAddress>,
967        /// The amount of CCD tokens in the balance of the instance.
968        #[prost(message, optional, tag = "3")]
969        pub amount: ::core::option::Option<super::Amount>,
970        /// A list of endpoints exposed by the instance.
971        #[prost(message, repeated, tag = "4")]
972        pub methods: ::prost::alloc::vec::Vec<super::ReceiveName>,
973        /// The name of the smart contract of the instance.
974        #[prost(message, optional, tag = "5")]
975        pub name: ::core::option::Option<super::InitName>,
976        /// The module reference for the smart contract module of the instance.
977        #[prost(message, optional, tag = "6")]
978        pub source_module: ::core::option::Option<super::ModuleRef>,
979    }
980    /// Version 1 smart contract instance information.
981    #[derive(Clone, PartialEq, ::prost::Message)]
982    pub struct V1 {
983        /// The account address which deployed the instance.
984        #[prost(message, optional, tag = "2")]
985        pub owner: ::core::option::Option<super::AccountAddress>,
986        /// The amount of CCD tokens in the balance of the instance.
987        #[prost(message, optional, tag = "3")]
988        pub amount: ::core::option::Option<super::Amount>,
989        /// A list of endpoints exposed by the instance.
990        #[prost(message, repeated, tag = "4")]
991        pub methods: ::prost::alloc::vec::Vec<super::ReceiveName>,
992        /// The name of the smart contract of the instance.
993        #[prost(message, optional, tag = "5")]
994        pub name: ::core::option::Option<super::InitName>,
995        /// The module reference for the smart contract module of the instance.
996        #[prost(message, optional, tag = "6")]
997        pub source_module: ::core::option::Option<super::ModuleRef>,
998    }
999    /// The information depends on the smart contract version used by the instance.
1000    ///
1001    /// This field will not be extended in future versions of the API, instead new data versions will
1002    /// use optional fields in `InstanceInfo.V1`.
1003    #[derive(Clone, PartialEq, ::prost::Oneof)]
1004    pub enum Version {
1005        #[prost(message, tag = "1")]
1006        V0(V0),
1007        #[prost(message, tag = "2")]
1008        V1(V1),
1009    }
1010}
1011/// A smart contract instance key-value pair.
1012#[derive(Clone, PartialEq, ::prost::Message)]
1013pub struct InstanceStateKvPair {
1014    #[prost(bytes = "vec", tag = "1")]
1015    pub key: ::prost::alloc::vec::Vec<u8>,
1016    #[prost(bytes = "vec", tag = "2")]
1017    pub value: ::prost::alloc::vec::Vec<u8>,
1018}
1019/// Request for a specific key of a smart contract instance state.
1020#[derive(Clone, PartialEq, ::prost::Message)]
1021pub struct InstanceStateLookupRequest {
1022    /// The block to be used for the query.
1023    #[prost(message, optional, tag = "1")]
1024    pub block_hash: ::core::option::Option<BlockHashInput>,
1025    /// The address of the smart contract instance.
1026    #[prost(message, optional, tag = "2")]
1027    pub address: ::core::option::Option<ContractAddress>,
1028    /// Key to look up. If the instance is a V0 instance then this will not be used.
1029    #[prost(bytes = "vec", tag = "3")]
1030    pub key: ::prost::alloc::vec::Vec<u8>,
1031}
1032/// Value at the requested key of a smart contract instance state. For V0
1033/// contracts this will always be the entire state of the contract.
1034#[derive(Clone, PartialEq, ::prost::Message)]
1035pub struct InstanceStateValueAtKey {
1036    #[prost(bytes = "vec", tag = "1")]
1037    pub value: ::prost::alloc::vec::Vec<u8>,
1038}
1039/// The receive name of a smart contract function. Expected format:
1040/// `<contract_name>.<func_name>`. It must only consist of atmost 100 ASCII
1041/// alphanumeric or punctuation characters, and must contain a '.'.
1042#[derive(Clone, PartialEq, ::prost::Message)]
1043pub struct ReceiveName {
1044    #[prost(string, tag = "1")]
1045    pub value: ::prost::alloc::string::String,
1046}
1047/// The init name of a smart contract function. Expected format:
1048/// `init_<contract_name>`. It must only consist of atmost 100 ASCII alphanumeric
1049/// or punctuation characters, must not contain a '.' and must start with
1050/// 'init_'.
1051#[derive(Clone, PartialEq, ::prost::Message)]
1052pub struct InitName {
1053    #[prost(string, tag = "1")]
1054    pub value: ::prost::alloc::string::String,
1055}
1056/// Parameter to a smart contract initialization or invocation.
1057#[derive(Clone, PartialEq, ::prost::Message)]
1058pub struct Parameter {
1059    #[prost(bytes = "vec", tag = "1")]
1060    pub value: ::prost::alloc::vec::Vec<u8>,
1061}
1062/// A smart contract v0 state.
1063#[derive(Clone, PartialEq, ::prost::Message)]
1064pub struct ContractStateV0 {
1065    #[prost(bytes = "vec", tag = "1")]
1066    pub value: ::prost::alloc::vec::Vec<u8>,
1067}
1068/// Status of a block item known to the node.
1069#[derive(Clone, PartialEq, ::prost::Message)]
1070pub struct BlockItemStatus {
1071    /// This field might be extended in future versions of the API.
1072    #[prost(oneof = "block_item_status::Status", tags = "1, 2, 3")]
1073    pub status: ::core::option::Option<block_item_status::Status>,
1074}
1075/// Nested message and enum types in `BlockItemStatus`.
1076pub mod block_item_status {
1077    #[derive(Clone, PartialEq, ::prost::Message)]
1078    pub struct Committed {
1079        #[prost(message, repeated, tag = "1")]
1080        pub outcomes: ::prost::alloc::vec::Vec<super::BlockItemSummaryInBlock>,
1081    }
1082    #[derive(Clone, PartialEq, ::prost::Message)]
1083    pub struct Finalized {
1084        #[prost(message, optional, tag = "1")]
1085        pub outcome: ::core::option::Option<super::BlockItemSummaryInBlock>,
1086    }
1087    /// This field might be extended in future versions of the API.
1088    #[derive(Clone, PartialEq, ::prost::Oneof)]
1089    pub enum Status {
1090        /// Block item is received, but not yet in any blocks.
1091        #[prost(message, tag = "1")]
1092        Received(super::Empty),
1093        /// Block item is committed to one or more blocks. The outcomes are listed
1094        /// for each block. Note that in the vast majority of cases the outcome of a
1095        /// transaction should not be dependent on the block it is in, but this
1096        /// can in principle happen.
1097        #[prost(message, tag = "2")]
1098        Committed(Committed),
1099        /// Block item is finalized in the given block, with the given summary.
1100        #[prost(message, tag = "3")]
1101        Finalized(Finalized),
1102    }
1103}
1104/// A block item summary together with a block hash. Used in BlockItemStatus.
1105#[derive(Clone, PartialEq, ::prost::Message)]
1106pub struct BlockItemSummaryInBlock {
1107    /// The block hash.
1108    #[prost(message, optional, tag = "1")]
1109    pub block_hash: ::core::option::Option<BlockHash>,
1110    /// The block item summary.
1111    #[prost(message, optional, tag = "2")]
1112    pub outcome: ::core::option::Option<BlockItemSummary>,
1113}
1114/// Energy is used to count exact execution cost.
1115/// This cost is then converted to CCD amounts.
1116#[derive(Clone, Copy, PartialEq, ::prost::Message)]
1117pub struct Energy {
1118    #[prost(uint64, tag = "1")]
1119    pub value: u64,
1120}
1121/// A number representing a slot for producing a block.
1122#[derive(Clone, Copy, PartialEq, ::prost::Message)]
1123pub struct Slot {
1124    #[prost(uint64, tag = "1")]
1125    pub value: u64,
1126}
1127/// The response for getNextAccountSequenceNumber.
1128#[derive(Clone, Copy, PartialEq, ::prost::Message)]
1129pub struct NextAccountSequenceNumber {
1130    /// The best guess for the available account sequence number.
1131    #[prost(message, optional, tag = "1")]
1132    pub sequence_number: ::core::option::Option<SequenceNumber>,
1133    /// Whether the guess relies on any non-finalized transactions. If true all of the relevant transactions are finalized.
1134    #[prost(bool, tag = "2")]
1135    pub all_final: bool,
1136}
1137/// A duration of milliseconds.
1138#[derive(Clone, Copy, PartialEq, ::prost::Message)]
1139pub struct Duration {
1140    #[prost(uint64, tag = "1")]
1141    pub value: u64,
1142}
1143/// A reason for why a transaction was rejected. Rejected means included in a
1144/// block, but the desired action was not achieved. The only effect of a
1145/// rejected transaction is payment.
1146#[derive(Clone, PartialEq, ::prost::Message)]
1147pub struct RejectReason {
1148    /// This field might be extended in future versions of the API.
1149    #[prost(
1150        oneof = "reject_reason::Reason",
1151        tags = "1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56"
1152    )]
1153    pub reason: ::core::option::Option<reject_reason::Reason>,
1154}
1155/// Nested message and enum types in `RejectReason`.
1156pub mod reject_reason {
1157    #[derive(Clone, PartialEq, ::prost::Message)]
1158    pub struct InvalidInitMethod {
1159        #[prost(message, optional, tag = "1")]
1160        pub module_ref: ::core::option::Option<super::ModuleRef>,
1161        #[prost(message, optional, tag = "2")]
1162        pub init_name: ::core::option::Option<super::InitName>,
1163    }
1164    #[derive(Clone, PartialEq, ::prost::Message)]
1165    pub struct InvalidReceiveMethod {
1166        #[prost(message, optional, tag = "1")]
1167        pub module_ref: ::core::option::Option<super::ModuleRef>,
1168        #[prost(message, optional, tag = "2")]
1169        pub receive_name: ::core::option::Option<super::ReceiveName>,
1170    }
1171    #[derive(Clone, PartialEq, ::prost::Message)]
1172    pub struct AmountTooLarge {
1173        #[prost(message, optional, tag = "1")]
1174        pub address: ::core::option::Option<super::Address>,
1175        #[prost(message, optional, tag = "2")]
1176        pub amount: ::core::option::Option<super::Amount>,
1177    }
1178    #[derive(Clone, Copy, PartialEq, ::prost::Message)]
1179    pub struct RejectedInit {
1180        #[prost(int32, tag = "1")]
1181        pub reject_reason: i32,
1182    }
1183    #[derive(Clone, PartialEq, ::prost::Message)]
1184    pub struct RejectedReceive {
1185        #[prost(int32, tag = "1")]
1186        pub reject_reason: i32,
1187        #[prost(message, optional, tag = "2")]
1188        pub contract_address: ::core::option::Option<super::ContractAddress>,
1189        #[prost(message, optional, tag = "3")]
1190        pub receive_name: ::core::option::Option<super::ReceiveName>,
1191        #[prost(message, optional, tag = "4")]
1192        pub parameter: ::core::option::Option<super::Parameter>,
1193    }
1194    #[derive(Clone, PartialEq, ::prost::Message)]
1195    pub struct DuplicateCredIds {
1196        #[prost(message, repeated, tag = "1")]
1197        pub ids: ::prost::alloc::vec::Vec<super::CredentialRegistrationId>,
1198    }
1199    #[derive(Clone, PartialEq, ::prost::Message)]
1200    pub struct NonExistentCredIds {
1201        #[prost(message, repeated, tag = "1")]
1202        pub ids: ::prost::alloc::vec::Vec<super::CredentialRegistrationId>,
1203    }
1204    /// This field might be extended in future versions of the API.
1205    #[derive(Clone, PartialEq, ::prost::Oneof)]
1206    pub enum Reason {
1207        /// Raised while validating a Wasm module that is not well formed.
1208        #[prost(message, tag = "1")]
1209        ModuleNotWf(super::Empty),
1210        /// The smart contract module hash already exists.
1211        #[prost(message, tag = "2")]
1212        ModuleHashAlreadyExists(super::ModuleRef),
1213        /// Account does not exist.
1214        #[prost(message, tag = "3")]
1215        InvalidAccountReference(super::AccountAddress),
1216        /// Reference to a non-existing contract init method.
1217        #[prost(message, tag = "4")]
1218        InvalidInitMethod(InvalidInitMethod),
1219        /// Reference to a non-existing contract receive method.
1220        #[prost(message, tag = "5")]
1221        InvalidReceiveMethod(InvalidReceiveMethod),
1222        /// Reference to a non-existing smart contract module.
1223        #[prost(message, tag = "6")]
1224        InvalidModuleReference(super::ModuleRef),
1225        /// Contract instance does not exist.
1226        #[prost(message, tag = "7")]
1227        InvalidContractAddress(super::ContractAddress),
1228        /// Runtime exception occurred when running either the init or receive
1229        /// method.
1230        #[prost(message, tag = "8")]
1231        RuntimeFailure(super::Empty),
1232        /// When one wishes to transfer an amount from A to B but there
1233        /// are not enough funds on account/contract A to make this
1234        /// possible. The data are the from address and the amount to transfer.
1235        #[prost(message, tag = "9")]
1236        AmountTooLarge(AmountTooLarge),
1237        /// Serialization of the body failed.
1238        #[prost(message, tag = "10")]
1239        SerializationFailure(super::Empty),
1240        /// We ran of out energy to process this transaction.
1241        #[prost(message, tag = "11")]
1242        OutOfEnergy(super::Empty),
1243        /// Rejected due to contract logic in init function of a contract.
1244        #[prost(message, tag = "12")]
1245        RejectedInit(RejectedInit),
1246        /// Rejected due to contract logic in receive function of a contract.
1247        #[prost(message, tag = "13")]
1248        RejectedReceive(RejectedReceive),
1249        /// Proof that the validator owns relevant private keys is not valid.
1250        #[prost(message, tag = "14")]
1251        InvalidProof(super::Empty),
1252        /// Tried to add validator for an account that already has a validator.
1253        #[prost(message, tag = "15")]
1254        AlreadyABaker(super::BakerId),
1255        /// Tried to remove a validator for an account that has no validator.
1256        #[prost(message, tag = "16")]
1257        NotABaker(super::AccountAddress),
1258        /// The amount on the account was insufficient to cover the proposed stake.
1259        #[prost(message, tag = "17")]
1260        InsufficientBalanceForBakerStake(super::Empty),
1261        /// The amount provided is under the threshold required for becoming a validator.
1262        #[prost(message, tag = "18")]
1263        StakeUnderMinimumThresholdForBaking(super::Empty),
1264        /// The change could not be made because the validator is in cooldown for
1265        /// another change.
1266        #[prost(message, tag = "19")]
1267        BakerInCooldown(super::Empty),
1268        /// A validator with the given aggregation key already exists.
1269        #[prost(message, tag = "20")]
1270        DuplicateAggregationKey(super::BakerAggregationVerifyKey),
1271        /// Encountered credential ID that does not exist.
1272        #[prost(message, tag = "21")]
1273        NonExistentCredentialId(super::Empty),
1274        /// Attempted to add an account key to a key index already in use.
1275        #[prost(message, tag = "22")]
1276        KeyIndexAlreadyInUse(super::Empty),
1277        /// When the account threshold is updated, it must not exceed the amount of
1278        /// existing keys.
1279        #[prost(message, tag = "23")]
1280        InvalidAccountThreshold(super::Empty),
1281        /// When the credential key threshold is updated, it must not exceed the
1282        /// amount of existing keys.
1283        #[prost(message, tag = "24")]
1284        InvalidCredentialKeySignThreshold(super::Empty),
1285        /// Proof for an encrypted amount transfer did not validate.
1286        #[prost(message, tag = "25")]
1287        InvalidEncryptedAmountTransferProof(super::Empty),
1288        /// Proof for a secret to public transfer did not validate.
1289        #[prost(message, tag = "26")]
1290        InvalidTransferToPublicProof(super::Empty),
1291        /// Account tried to transfer an encrypted amount to itself, that's not
1292        /// allowed.
1293        #[prost(message, tag = "27")]
1294        EncryptedAmountSelfTransfer(super::AccountAddress),
1295        /// The provided index is below the start index or above `startIndex +
1296        /// length incomingAmounts`.
1297        #[prost(message, tag = "28")]
1298        InvalidIndexOnEncryptedTransfer(super::Empty),
1299        /// The transfer with schedule is going to send 0 tokens.
1300        #[prost(message, tag = "29")]
1301        ZeroScheduledAmount(super::Empty),
1302        /// The transfer with schedule has a non strictly increasing schedule.
1303        #[prost(message, tag = "30")]
1304        NonIncreasingSchedule(super::Empty),
1305        /// The first scheduled release in a transfer with schedule has already
1306        /// expired.
1307        #[prost(message, tag = "31")]
1308        FirstScheduledReleaseExpired(super::Empty),
1309        /// Account tried to transfer with schedule to itself, that's not allowed.
1310        #[prost(message, tag = "32")]
1311        ScheduledSelfTransfer(super::AccountAddress),
1312        /// At least one of the credentials was either malformed or its proof was
1313        /// incorrect.
1314        #[prost(message, tag = "33")]
1315        InvalidCredentials(super::Empty),
1316        /// Some of the credential IDs already exist or are duplicated in the
1317        /// transaction.
1318        #[prost(message, tag = "34")]
1319        DuplicateCredIds(DuplicateCredIds),
1320        /// A credential id that was to be removed is not part of the account.
1321        #[prost(message, tag = "35")]
1322        NonExistentCredIds(NonExistentCredIds),
1323        /// Attemp to remove the first credential.
1324        #[prost(message, tag = "36")]
1325        RemoveFirstCredential(super::Empty),
1326        /// The credential holder of the keys to be updated did not sign the
1327        /// transaction.
1328        #[prost(message, tag = "37")]
1329        CredentialHolderDidNotSign(super::Empty),
1330        /// Account is not allowed to have multiple credentials because it contains
1331        /// a non-zero encrypted transfer.
1332        #[prost(message, tag = "38")]
1333        NotAllowedMultipleCredentials(super::Empty),
1334        /// The account is not allowed to receive encrypted transfers because it has
1335        /// multiple credentials.
1336        #[prost(message, tag = "39")]
1337        NotAllowedToReceiveEncrypted(super::Empty),
1338        /// The account is not allowed to send encrypted transfers (or transfer
1339        /// from/to public to/from encrypted).
1340        #[prost(message, tag = "40")]
1341        NotAllowedToHandleEncrypted(super::Empty),
1342        /// A `ConfigureBaker` transaction is missing one or more arguments in order
1343        /// to add a validator.
1344        #[prost(message, tag = "41")]
1345        MissingBakerAddParameters(super::Empty),
1346        /// Finalization reward commission is not in the valid range for a validator.
1347        #[prost(message, tag = "42")]
1348        FinalizationRewardCommissionNotInRange(super::Empty),
1349        /// Block production reward commission is not in the valid range for a validator.
1350        #[prost(message, tag = "43")]
1351        BakingRewardCommissionNotInRange(super::Empty),
1352        /// Transaction fee commission is not in the valid range for a validator.
1353        #[prost(message, tag = "44")]
1354        TransactionFeeCommissionNotInRange(super::Empty),
1355        /// Tried to add validator for an account that already has a delegator.
1356        #[prost(message, tag = "45")]
1357        AlreadyADelegator(super::Empty),
1358        /// The amount on the account was insufficient to cover the proposed stake.
1359        #[prost(message, tag = "46")]
1360        InsufficientBalanceForDelegationStake(super::Empty),
1361        /// A configure delegation transaction is missing one or more arguments in
1362        /// order to add a delegator.
1363        #[prost(message, tag = "47")]
1364        MissingDelegationAddParameters(super::Empty),
1365        /// Delegation stake when adding a delegator was 0.
1366        #[prost(message, tag = "48")]
1367        InsufficientDelegationStake(super::Empty),
1368        /// Account is not a delegation account.
1369        #[prost(message, tag = "49")]
1370        DelegatorInCooldown(super::Empty),
1371        /// Account is not a delegation account.
1372        #[prost(message, tag = "50")]
1373        NotADelegator(super::AccountAddress),
1374        /// Delegation target is not a validator
1375        #[prost(message, tag = "51")]
1376        DelegationTargetNotABaker(super::BakerId),
1377        /// The amount would result in pool capital higher than the maximum
1378        /// threshold.
1379        #[prost(message, tag = "52")]
1380        StakeOverMaximumThresholdForPool(super::Empty),
1381        /// The amount would result in pool with a too high fraction of delegated
1382        /// capital.
1383        #[prost(message, tag = "53")]
1384        PoolWouldBecomeOverDelegated(super::Empty),
1385        /// The pool is not open to delegators.
1386        #[prost(message, tag = "54")]
1387        PoolClosed(super::Empty),
1388        /// The provided identifier does not match a token currently on chain.
1389        /// Introduced in protocol version 9.
1390        #[prost(message, tag = "55")]
1391        NonExistentTokenId(super::plt::TokenId),
1392        /// The token update transaction failed.
1393        /// Introduced in protocol version 9.
1394        #[prost(message, tag = "56")]
1395        TokenUpdateTransactionFailed(super::plt::TokenModuleRejectReason),
1396    }
1397}
1398/// Data generated as part of initializing a single contract instance.
1399#[derive(Clone, PartialEq, ::prost::Message)]
1400pub struct ContractInitializedEvent {
1401    /// Contract version.
1402    #[prost(enumeration = "ContractVersion", tag = "1")]
1403    pub contract_version: i32,
1404    /// Module with the source code of the contract.
1405    #[prost(message, optional, tag = "2")]
1406    pub origin_ref: ::core::option::Option<ModuleRef>,
1407    /// The newly assigned address of the contract.
1408    #[prost(message, optional, tag = "3")]
1409    pub address: ::core::option::Option<ContractAddress>,
1410    /// The amount the instance was initialized with.
1411    #[prost(message, optional, tag = "4")]
1412    pub amount: ::core::option::Option<Amount>,
1413    /// The name of the contract.
1414    #[prost(message, optional, tag = "5")]
1415    pub init_name: ::core::option::Option<InitName>,
1416    /// Any contract events that might have been genereated by the contract initialization.
1417    #[prost(message, repeated, tag = "6")]
1418    pub events: ::prost::alloc::vec::Vec<ContractEvent>,
1419    /// The parameter passed to the initializer.
1420    #[prost(message, optional, tag = "7")]
1421    pub parameter: ::core::option::Option<Parameter>,
1422}
1423/// An event generated by a smart contract.
1424#[derive(Clone, PartialEq, ::prost::Message)]
1425pub struct ContractEvent {
1426    #[prost(bytes = "vec", tag = "1")]
1427    pub value: ::prost::alloc::vec::Vec<u8>,
1428}
1429/// Data generated as part of updating a single contract instance.
1430/// In general a single Update transaction will
1431/// generate one or more of these events, together with possibly some transfers.
1432#[derive(Clone, PartialEq, ::prost::Message)]
1433pub struct InstanceUpdatedEvent {
1434    /// Contract version.
1435    #[prost(enumeration = "ContractVersion", tag = "1")]
1436    pub contract_version: i32,
1437    /// Address of the affected instance.
1438    #[prost(message, optional, tag = "2")]
1439    pub address: ::core::option::Option<ContractAddress>,
1440    /// The origin of the message to the smart contract. This can be
1441    /// either an account or a smart contract.
1442    #[prost(message, optional, tag = "3")]
1443    pub instigator: ::core::option::Option<Address>,
1444    /// The amount the method was invoked with.
1445    #[prost(message, optional, tag = "4")]
1446    pub amount: ::core::option::Option<Amount>,
1447    /// The parameter passed to the method.
1448    #[prost(message, optional, tag = "5")]
1449    pub parameter: ::core::option::Option<Parameter>,
1450    /// The name of the method that was executed.
1451    #[prost(message, optional, tag = "6")]
1452    pub receive_name: ::core::option::Option<ReceiveName>,
1453    /// Any contract events that might have been generated by the contract execution.
1454    #[prost(message, repeated, tag = "7")]
1455    pub events: ::prost::alloc::vec::Vec<ContractEvent>,
1456}
1457/// Effects produced by successful smart contract invocations.
1458/// A single invocation will produce a sequence of these effects.
1459#[derive(Clone, PartialEq, ::prost::Message)]
1460pub struct ContractTraceElement {
1461    /// This field might be extended in future versions of the API.
1462    #[prost(oneof = "contract_trace_element::Element", tags = "1, 2, 3, 4, 5")]
1463    pub element: ::core::option::Option<contract_trace_element::Element>,
1464}
1465/// Nested message and enum types in `ContractTraceElement`.
1466pub mod contract_trace_element {
1467    /// A contract transferred an amount of CCD to an account.
1468    #[derive(Clone, PartialEq, ::prost::Message)]
1469    pub struct Transferred {
1470        /// Sender contract.
1471        #[prost(message, optional, tag = "1")]
1472        pub sender: ::core::option::Option<super::ContractAddress>,
1473        /// Amount transferred.
1474        #[prost(message, optional, tag = "2")]
1475        pub amount: ::core::option::Option<super::Amount>,
1476        /// Receiver account.
1477        #[prost(message, optional, tag = "3")]
1478        pub receiver: ::core::option::Option<super::AccountAddress>,
1479    }
1480    /// A contract was interrupted.
1481    /// This occurs when a contract invokes another contract or makes a transfer to an account.
1482    #[derive(Clone, PartialEq, ::prost::Message)]
1483    pub struct Interrupted {
1484        /// The contract interrupted.
1485        #[prost(message, optional, tag = "1")]
1486        pub address: ::core::option::Option<super::ContractAddress>,
1487        /// The events generated up until the interruption.
1488        #[prost(message, repeated, tag = "2")]
1489        pub events: ::prost::alloc::vec::Vec<super::ContractEvent>,
1490    }
1491    /// A previously interrupted contract was resumed.
1492    #[derive(Clone, Copy, PartialEq, ::prost::Message)]
1493    pub struct Resumed {
1494        /// The contract resumed.
1495        #[prost(message, optional, tag = "1")]
1496        pub address: ::core::option::Option<super::ContractAddress>,
1497        /// Whether the action that caused the interruption (invoke contract or make transfer) was successful or not.
1498        #[prost(bool, tag = "2")]
1499        pub success: bool,
1500    }
1501    /// A previously interrupted contract was resumed.
1502    /// This message can occur starting from protocol version 5.
1503    #[derive(Clone, PartialEq, ::prost::Message)]
1504    pub struct Upgraded {
1505        /// The that was upgraded.
1506        #[prost(message, optional, tag = "1")]
1507        pub address: ::core::option::Option<super::ContractAddress>,
1508        /// The module from which the contract was upgraded.
1509        #[prost(message, optional, tag = "2")]
1510        pub from: ::core::option::Option<super::ModuleRef>,
1511        /// The module to which it was upgraded.
1512        #[prost(message, optional, tag = "3")]
1513        pub to: ::core::option::Option<super::ModuleRef>,
1514    }
1515    /// This field might be extended in future versions of the API.
1516    #[derive(Clone, PartialEq, ::prost::Oneof)]
1517    pub enum Element {
1518        /// A contract instance was updated.
1519        #[prost(message, tag = "1")]
1520        Updated(super::InstanceUpdatedEvent),
1521        /// A contract transferred an amount of CCD to an account.
1522        #[prost(message, tag = "2")]
1523        Transferred(Transferred),
1524        /// A contract was interrupted.
1525        /// This occurs when a contract invokes another contract or makes a transfer to an account.
1526        #[prost(message, tag = "3")]
1527        Interrupted(Interrupted),
1528        /// A previously interrupted contract was resumed.
1529        #[prost(message, tag = "4")]
1530        Resumed(Resumed),
1531        /// A contract was upgraded.
1532        /// This trace element can occur starting from protocol version 5.
1533        #[prost(message, tag = "5")]
1534        Upgraded(Upgraded),
1535    }
1536}
1537/// Result of a successful change of validator keys.
1538#[derive(Clone, PartialEq, ::prost::Message)]
1539pub struct BakerKeysEvent {
1540    /// ID of the validator whose keys were changed.
1541    #[prost(message, optional, tag = "1")]
1542    pub baker_id: ::core::option::Option<BakerId>,
1543    /// Account address of the validator.
1544    #[prost(message, optional, tag = "2")]
1545    pub account: ::core::option::Option<AccountAddress>,
1546    /// The new public key for verifying block signatures.
1547    #[prost(message, optional, tag = "3")]
1548    pub sign_key: ::core::option::Option<BakerSignatureVerifyKey>,
1549    /// The new public key for verifying whether the validator won the block
1550    /// lottery.
1551    #[prost(message, optional, tag = "4")]
1552    pub election_key: ::core::option::Option<BakerElectionVerifyKey>,
1553    /// The new public key for verifying finalization records.
1554    #[prost(message, optional, tag = "5")]
1555    pub aggregation_key: ::core::option::Option<BakerAggregationVerifyKey>,
1556}
1557/// The associated transaction type can no longer be created starting from protocol version 4.
1558/// Hence, this message does not occur anymore.
1559/// The functionality was replaced in protocol version 4 by the `BakerConfigured` transaction type.
1560#[derive(Clone, Copy, PartialEq, ::prost::Message)]
1561pub struct BakerStakeUpdatedData {
1562    /// Affected validator.
1563    #[prost(message, optional, tag = "1")]
1564    pub baker_id: ::core::option::Option<BakerId>,
1565    /// New stake.
1566    #[prost(message, optional, tag = "2")]
1567    pub new_stake: ::core::option::Option<Amount>,
1568    /// A boolean which indicates whether it increased
1569    /// (`true`) or decreased (`false`).
1570    #[prost(bool, tag = "3")]
1571    pub increased: bool,
1572}
1573/// Event generated when one or more encrypted amounts are consumed from the account.
1574#[derive(Clone, PartialEq, ::prost::Message)]
1575pub struct EncryptedAmountRemovedEvent {
1576    /// The affected account.
1577    #[prost(message, optional, tag = "1")]
1578    pub account: ::core::option::Option<AccountAddress>,
1579    /// The new self encrypted amount on the affected account.
1580    #[prost(message, optional, tag = "2")]
1581    pub new_amount: ::core::option::Option<EncryptedAmount>,
1582    /// The input encrypted amount that was removed.
1583    #[prost(message, optional, tag = "3")]
1584    pub input_amount: ::core::option::Option<EncryptedAmount>,
1585    /// The index indicating which amounts were used.
1586    #[prost(uint64, tag = "4")]
1587    pub up_to_index: u64,
1588}
1589/// Event generated when an account receives a new encrypted amount.
1590#[derive(Clone, PartialEq, ::prost::Message)]
1591pub struct NewEncryptedAmountEvent {
1592    /// The account onto which the amount was added.
1593    #[prost(message, optional, tag = "1")]
1594    pub receiver: ::core::option::Option<AccountAddress>,
1595    /// The index the amount was assigned.
1596    #[prost(uint64, tag = "2")]
1597    pub new_index: u64,
1598    /// The encrypted amount that was added.
1599    #[prost(message, optional, tag = "3")]
1600    pub encrypted_amount: ::core::option::Option<EncryptedAmount>,
1601}
1602#[derive(Clone, PartialEq, ::prost::Message)]
1603pub struct EncryptedSelfAmountAddedEvent {
1604    /// The affected account.
1605    #[prost(message, optional, tag = "1")]
1606    pub account: ::core::option::Option<AccountAddress>,
1607    /// The new self encrypted amount of the account.
1608    #[prost(message, optional, tag = "2")]
1609    pub new_amount: ::core::option::Option<EncryptedAmount>,
1610    /// The amount that was transferred from public to encrypted balance.
1611    #[prost(message, optional, tag = "3")]
1612    pub amount: ::core::option::Option<Amount>,
1613}
1614/// Data registered on the chain with a register data transaction.
1615#[derive(Clone, PartialEq, ::prost::Message)]
1616pub struct RegisteredData {
1617    #[prost(bytes = "vec", tag = "1")]
1618    pub value: ::prost::alloc::vec::Vec<u8>,
1619}
1620/// Events that may result from the `ConfigureBaker` transaction which adds, modify, or removes a validator pool starting in protocol version 4.
1621/// Before protocol version 4, distinct transaction types (`BakerAdded`, `BakerRemoved`, `BakerStakeUpdated`, `BakerRestakeEarningsUpdated`,
1622/// and `BakerKeysUpdated`) existed which emitted validator related events instead.
1623#[derive(Clone, PartialEq, ::prost::Message)]
1624pub struct BakerEvent {
1625    /// This field might be extended in future versions of the API.
1626    #[prost(
1627        oneof = "baker_event::Event",
1628        tags = "1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14"
1629    )]
1630    pub event: ::core::option::Option<baker_event::Event>,
1631}
1632/// Nested message and enum types in `BakerEvent`.
1633pub mod baker_event {
1634    /// A validator was added.
1635    /// This message/event is always accompanied by `BakerEvent::BakerSetRestakeEarnings`, and starting from protocol version 4 also `BakerEvent::BakerSetOpenStatus`,
1636    /// `BakerEvent::BakerSetMetadataURL`, `BakerEvent::BakerSetTransactionFeeCommission`, `BakerEvent::BakerSetBakingRewardCommission` and `BakerEvent::BakerSetFinalizationRewardCommission` events in the same transaction.
1637    #[derive(Clone, PartialEq, ::prost::Message)]
1638    pub struct BakerAdded {
1639        /// The keys with which the validator registered.
1640        #[prost(message, optional, tag = "1")]
1641        pub keys_event: ::core::option::Option<super::BakerKeysEvent>,
1642        /// The amount the account staked to become a validator. This amount is
1643        /// locked.
1644        #[prost(message, optional, tag = "2")]
1645        pub stake: ::core::option::Option<super::Amount>,
1646        /// Whether the validator will automatically add earnings to their stake or
1647        /// not.
1648        #[prost(bool, tag = "3")]
1649        pub restake_earnings: bool,
1650    }
1651    /// Validator stake increased.
1652    #[derive(Clone, Copy, PartialEq, ::prost::Message)]
1653    pub struct BakerStakeIncreased {
1654        /// Validator's id.
1655        #[prost(message, optional, tag = "1")]
1656        pub baker_id: ::core::option::Option<super::BakerId>,
1657        /// The new stake.
1658        #[prost(message, optional, tag = "2")]
1659        pub new_stake: ::core::option::Option<super::Amount>,
1660    }
1661    /// The validator's stake was decreased.
1662    /// The behavior of decreasing the stake of validators changed in protocol version 7
1663    /// (see <https://proposals.concordium.com/updates/P7.html> for more details).
1664    #[derive(Clone, Copy, PartialEq, ::prost::Message)]
1665    pub struct BakerStakeDecreased {
1666        /// Validator's id.
1667        #[prost(message, optional, tag = "1")]
1668        pub baker_id: ::core::option::Option<super::BakerId>,
1669        /// The new stake.
1670        #[prost(message, optional, tag = "2")]
1671        pub new_stake: ::core::option::Option<super::Amount>,
1672    }
1673    #[derive(Clone, Copy, PartialEq, ::prost::Message)]
1674    pub struct BakerRestakeEarningsUpdated {
1675        /// Validator's id.
1676        #[prost(message, optional, tag = "1")]
1677        pub baker_id: ::core::option::Option<super::BakerId>,
1678        /// The new value of the flag.
1679        #[prost(bool, tag = "2")]
1680        pub restake_earnings: bool,
1681    }
1682    /// Updated open status for a validator pool.
1683    /// This message can occur starting from protocol version 4.
1684    #[derive(Clone, Copy, PartialEq, ::prost::Message)]
1685    pub struct BakerSetOpenStatus {
1686        /// Validator's id.
1687        #[prost(message, optional, tag = "1")]
1688        pub baker_id: ::core::option::Option<super::BakerId>,
1689        /// The new open status.
1690        #[prost(enumeration = "super::OpenStatus", tag = "2")]
1691        pub open_status: i32,
1692    }
1693    /// Updated metadata url for a validator pool.
1694    /// This message can occur starting from protocol version 4.
1695    #[derive(Clone, PartialEq, ::prost::Message)]
1696    pub struct BakerSetMetadataUrl {
1697        /// Validator's id.
1698        #[prost(message, optional, tag = "1")]
1699        pub baker_id: ::core::option::Option<super::BakerId>,
1700        /// The URL.
1701        #[prost(string, tag = "2")]
1702        pub url: ::prost::alloc::string::String,
1703    }
1704    /// Updated transaction fee commission for a validator pool.
1705    /// This message can occur starting from protocol version 4.
1706    #[derive(Clone, Copy, PartialEq, ::prost::Message)]
1707    pub struct BakerSetTransactionFeeCommission {
1708        /// Validator's id.
1709        #[prost(message, optional, tag = "1")]
1710        pub baker_id: ::core::option::Option<super::BakerId>,
1711        /// The transaction fee commission.
1712        #[prost(message, optional, tag = "2")]
1713        pub transaction_fee_commission: ::core::option::Option<super::AmountFraction>,
1714    }
1715    /// Updated block production reward commission for validator pool.
1716    /// This message can occur starting from protocol version 4.
1717    #[derive(Clone, Copy, PartialEq, ::prost::Message)]
1718    pub struct BakerSetBakingRewardCommission {
1719        /// Validator's id
1720        #[prost(message, optional, tag = "1")]
1721        pub baker_id: ::core::option::Option<super::BakerId>,
1722        /// The block production reward commission
1723        #[prost(message, optional, tag = "2")]
1724        pub baking_reward_commission: ::core::option::Option<super::AmountFraction>,
1725    }
1726    /// Updated finalization reward commission for validator pool.
1727    /// This message can occur starting from protocol version 4.
1728    #[derive(Clone, Copy, PartialEq, ::prost::Message)]
1729    pub struct BakerSetFinalizationRewardCommission {
1730        /// Validator's id
1731        #[prost(message, optional, tag = "1")]
1732        pub baker_id: ::core::option::Option<super::BakerId>,
1733        /// The finalization reward commission
1734        #[prost(message, optional, tag = "2")]
1735        pub finalization_reward_commission: ::core::option::Option<
1736            super::AmountFraction,
1737        >,
1738    }
1739    /// Removed an existing delegator.
1740    /// An existing delegation was removed by a transaction sent from a delegator that switched its staking behavior to being a validator.
1741    /// If the account is a delegator in the current payday, it will remain so until the
1742    /// next payday with respect to staking reward payouts, although the delegation record will be removed from the account immediately.
1743    /// If the cause of the delegation removal is a transaction sent by the delegator that decreased the delegator's stake to 0,
1744    /// the `DelegationEvent::DelegationRemoved` is emitted instead of this event/message.
1745    /// This message can occur starting from protocol version 7.
1746    #[derive(Clone, Copy, PartialEq, ::prost::Message)]
1747    pub struct DelegationRemoved {
1748        /// Delegator's id.
1749        #[prost(message, optional, tag = "1")]
1750        pub delegator_id: ::core::option::Option<super::DelegatorId>,
1751    }
1752    /// The validator has been suspended by a transaction sent from the validator itself.
1753    /// If the validator is suspended by the protocol (e.g., due to inactivity), the `BlockSpecialEvent::ValidatorSuspended`
1754    /// event is emitted instead of this event.
1755    /// This message can occur starting from protocol version 8.
1756    #[derive(Clone, Copy, PartialEq, ::prost::Message)]
1757    pub struct BakerSuspended {
1758        /// Suspended validator's id
1759        #[prost(message, optional, tag = "1")]
1760        pub baker_id: ::core::option::Option<super::BakerId>,
1761    }
1762    /// A validator has been resumed by a transaction sent from the validator itself.
1763    /// This message can occur starting from protocol version 8.
1764    #[derive(Clone, Copy, PartialEq, ::prost::Message)]
1765    pub struct BakerResumed {
1766        /// The resumed validator's id
1767        #[prost(message, optional, tag = "1")]
1768        pub baker_id: ::core::option::Option<super::BakerId>,
1769    }
1770    /// This field might be extended in future versions of the API.
1771    #[derive(Clone, PartialEq, ::prost::Oneof)]
1772    pub enum Event {
1773        /// A validator was added.
1774        /// This event is always accompanied by `BakerEvent::BakerSetRestakeEarnings`, and starting from protocol version 4 also `BakerEvent::BakerSetOpenStatus`,
1775        /// `BakerEvent::BakerSetMetadataURL`, `BakerEvent::BakerSetTransactionFeeCommission`, `BakerEvent::BakerSetBakingRewardCommission` and `BakerEvent::BakerSetFinalizationRewardCommission` events in the same transaction.
1776        #[prost(message, tag = "1")]
1777        BakerAdded(BakerAdded),
1778        /// A validator was removed by a transaction sent by the validator that decreased the validator's own stake to 0.
1779        /// When a validator is removed, it results in its delegators targeting the pool to be moved to the passive delegation.
1780        /// The behavior of validators being removed changed in protocol version 7
1781        /// (see <https://proposals.concordium.com/updates/P7.html> for more details).
1782        /// If the cause of the validator removal is a transaction from an existing validator that switched its staking behavior to `delegation`,
1783        /// the `DelegationEvent::BakerRemoved` is emitted instead of this event.
1784        #[prost(message, tag = "2")]
1785        BakerRemoved(super::BakerId),
1786        /// The validator's stake was increased.
1787        #[prost(message, tag = "3")]
1788        BakerStakeIncreased(BakerStakeIncreased),
1789        /// The validator's stake was decreased.
1790        /// The behavior of decreasing the stake of validators changed in protocol version 7
1791        /// (see <https://proposals.concordium.com/updates/P7.html> for more details).
1792        #[prost(message, tag = "4")]
1793        BakerStakeDecreased(BakerStakeDecreased),
1794        /// The validator's setting for restaking earnings was updated.
1795        #[prost(message, tag = "5")]
1796        BakerRestakeEarningsUpdated(BakerRestakeEarningsUpdated),
1797        /// Validator keys were updated.
1798        #[prost(message, tag = "6")]
1799        BakerKeysUpdated(super::BakerKeysEvent),
1800        /// The validator's open status was updated.
1801        #[prost(message, tag = "7")]
1802        BakerSetOpenStatus(BakerSetOpenStatus),
1803        /// The validator's metadata URL was updated.
1804        #[prost(message, tag = "8")]
1805        BakerSetMetadataUrl(BakerSetMetadataUrl),
1806        /// The validator's transaction fee commission was updated.
1807        #[prost(message, tag = "9")]
1808        BakerSetTransactionFeeCommission(BakerSetTransactionFeeCommission),
1809        /// The validator's block production reward commission was updated.
1810        #[prost(message, tag = "10")]
1811        BakerSetBakingRewardCommission(BakerSetBakingRewardCommission),
1812        /// The validator's finalization reward commission was updated.
1813        #[prost(message, tag = "11")]
1814        BakerSetFinalizationRewardCommission(BakerSetFinalizationRewardCommission),
1815        /// An existing delegation was removed by a transaction sent from a delegator that switched its staking behavior to being a validator.
1816        /// This event is always accompanied by `BakerEvent::BakerAdded`, `BakerEvent::BakerSetRestakeEarnings`, and starting from protocol version 4 also `BakerEvent::BakerSetOpenStatus`,
1817        /// `BakerEvent::BakerSetMetadataURL`, `BakerEvent::BakerSetTransactionFeeCommission`, `BakerEvent::BakerSetBakingRewardCommission` and `BakerEvent::BakerSetFinalizationRewardCommission` events in the same transaction.
1818        /// If the account is a delegator in the current payday, it will remain so until the
1819        /// next payday with respect to staking reward payouts, although the delegation record will be removed from the account immediately.
1820        /// If the cause of the delegation removal is a transaction sent by the delegator that decreased the delegator's stake to 0,
1821        /// the `DelegationEvent::DelegationRemoved` is emitted instead of this event.
1822        /// This event was introduced in protocol version version 7.
1823        #[prost(message, tag = "12")]
1824        DelegationRemoved(DelegationRemoved),
1825        /// The validator has been suspended by a transaction sent from the validator itself.
1826        /// If the validator is suspended by the protocol (e.g., due to inactivity), the `BlockSpecialEvent::ValidatorSuspended`
1827        /// event is emitted instead of this event.
1828        /// This event can occur starting from protocol version 8.
1829        #[prost(message, tag = "13")]
1830        BakerSuspended(BakerSuspended),
1831        /// The validator has been resumed by a transaction sent from the validator itself.
1832        /// This event can occur starting from protocol version 8.
1833        #[prost(message, tag = "14")]
1834        BakerResumed(BakerResumed),
1835    }
1836}
1837/// The identifier for a delegator.
1838#[derive(Clone, Copy, PartialEq, ::prost::Message)]
1839pub struct DelegatorId {
1840    #[prost(message, optional, tag = "1")]
1841    pub id: ::core::option::Option<AccountIndex>,
1842}
1843/// Events that may result from the `ConfigureDelegation` transaction which adds, modify, or removes a delegator starting in protocol version 4.
1844/// There was no delegation feature before protocol version 4.
1845#[derive(Clone, Copy, PartialEq, ::prost::Message)]
1846pub struct DelegationEvent {
1847    /// This field might be extended in future versions of the API.
1848    #[prost(oneof = "delegation_event::Event", tags = "1, 2, 3, 4, 5, 6, 7")]
1849    pub event: ::core::option::Option<delegation_event::Event>,
1850}
1851/// Nested message and enum types in `DelegationEvent`.
1852pub mod delegation_event {
1853    #[derive(Clone, Copy, PartialEq, ::prost::Message)]
1854    pub struct DelegationStakeIncreased {
1855        /// Delegator's id
1856        #[prost(message, optional, tag = "1")]
1857        pub delegator_id: ::core::option::Option<super::DelegatorId>,
1858        /// New stake
1859        #[prost(message, optional, tag = "2")]
1860        pub new_stake: ::core::option::Option<super::Amount>,
1861    }
1862    #[derive(Clone, Copy, PartialEq, ::prost::Message)]
1863    pub struct DelegationStakeDecreased {
1864        /// Delegator's id
1865        #[prost(message, optional, tag = "1")]
1866        pub delegator_id: ::core::option::Option<super::DelegatorId>,
1867        /// New stake
1868        #[prost(message, optional, tag = "2")]
1869        pub new_stake: ::core::option::Option<super::Amount>,
1870    }
1871    #[derive(Clone, Copy, PartialEq, ::prost::Message)]
1872    pub struct DelegationSetRestakeEarnings {
1873        /// Delegator's id
1874        #[prost(message, optional, tag = "1")]
1875        pub delegator_id: ::core::option::Option<super::DelegatorId>,
1876        /// Whether earnings will be restaked
1877        #[prost(bool, tag = "2")]
1878        pub restake_earnings: bool,
1879    }
1880    #[derive(Clone, Copy, PartialEq, ::prost::Message)]
1881    pub struct DelegationSetDelegationTarget {
1882        /// Delegator's id
1883        #[prost(message, optional, tag = "1")]
1884        pub delegator_id: ::core::option::Option<super::DelegatorId>,
1885        /// New delegation target (either to a validator pool or passive delegation)
1886        #[prost(message, optional, tag = "2")]
1887        pub delegation_target: ::core::option::Option<super::DelegationTarget>,
1888    }
1889    /// This message can occur starting from protocol version 7.
1890    #[derive(Clone, Copy, PartialEq, ::prost::Message)]
1891    pub struct BakerRemoved {
1892        /// Validator's id
1893        #[prost(message, optional, tag = "1")]
1894        pub baker_id: ::core::option::Option<super::BakerId>,
1895    }
1896    /// This field might be extended in future versions of the API.
1897    #[derive(Clone, Copy, PartialEq, ::prost::Oneof)]
1898    pub enum Event {
1899        /// The delegator's stake increased.
1900        #[prost(message, tag = "1")]
1901        DelegationStakeIncreased(DelegationStakeIncreased),
1902        /// The delegator's stake decreased.
1903        #[prost(message, tag = "2")]
1904        DelegationStakeDecreased(DelegationStakeDecreased),
1905        /// The delegator's restaking setting was updated.
1906        #[prost(message, tag = "3")]
1907        DelegationSetRestakeEarnings(DelegationSetRestakeEarnings),
1908        /// The delegator's delegation target (either a validator pool or passive delegation) was updated by a transaction from the delegator.
1909        #[prost(message, tag = "4")]
1910        DelegationSetDelegationTarget(DelegationSetDelegationTarget),
1911        /// A delegator was added.
1912        /// This event is always accompanied by `DelegationEvent::DelegationSetDelegationTarget`, `DelegationEvent::DelegationSetRestakeEarnings `, and `DelegationEvent::DelegationStakeIncreased` events in the same transaction.
1913        #[prost(message, tag = "5")]
1914        DelegationAdded(super::DelegatorId),
1915        /// A delegator was removed by a transaction sent from the delegator that decreased the delegators's stake to 0.
1916        /// If the account is a delegator in the current payday, it will remain so until the
1917        /// next payday with respect to staking reward payouts, although the delegation record will be removed from the account immediately.
1918        /// If the cause of the delegation removal is a transaction sent from a delegator that switched its staking behavior to being a validator,
1919        /// the `BakerEvent::DelegationRemoved` is emitted instead of this event.
1920        #[prost(message, tag = "6")]
1921        DelegationRemoved(super::DelegatorId),
1922        /// An existing validator was removed by a transaction sent from an validator that switched its staking behavior to `delegation`.
1923        /// This event is always accompanied by `DelegationEvent::DelegationAdded`, `DelegationEvent::DelegationSetDelegationTarget`, `DelegationEvent::DelegationSetRestakeEarnings `, and `DelegationEvent::DelegationStakeIncreased` events in the same transaction.
1924        /// When a validator is removed, it results in its delegators targeting the pool to be moved to the passive delegation.
1925        /// The behavior of validators being removed changed in protocol version 7.
1926        /// (see <https://proposals.concordium.com/updates/P7.html> for more details).
1927        /// If the cause of the validator removal is a transaction that decreased the validator's own stake to 0,
1928        /// the `BakerEvent::BakerRemoved` is emitted instead of this event.
1929        /// This event can occur starting from protocol version 7.
1930        #[prost(message, tag = "7")]
1931        BakerRemoved(BakerRemoved),
1932    }
1933}
1934/// Effects of an account transaction. All variants except `None`
1935/// correspond to a unique transaction that was successful.
1936#[derive(Clone, PartialEq, ::prost::Message)]
1937pub struct AccountTransactionEffects {
1938    /// This field might be extended in future versions of the API.
1939    #[prost(
1940        oneof = "account_transaction_effects::Effect",
1941        tags = "1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20"
1942    )]
1943    pub effect: ::core::option::Option<account_transaction_effects::Effect>,
1944}
1945/// Nested message and enum types in `AccountTransactionEffects`.
1946pub mod account_transaction_effects {
1947    /// No effects other than payment from this transaction.
1948    /// The rejection reason indicates why the transaction failed.
1949    #[derive(Clone, PartialEq, ::prost::Message)]
1950    pub struct None {
1951        /// Transaction type of a failed transaction, if known.
1952        /// In case of serialization failure this will not be set.
1953        #[prost(enumeration = "super::TransactionType", optional, tag = "1")]
1954        pub transaction_type: ::core::option::Option<i32>,
1955        /// Reason for rejection of the transaction.
1956        #[prost(message, optional, tag = "2")]
1957        pub reject_reason: ::core::option::Option<super::RejectReason>,
1958    }
1959    /// A contract update transaction was issued and produced the given trace.
1960    /// This is the result of Update transaction.
1961    #[derive(Clone, PartialEq, ::prost::Message)]
1962    pub struct ContractUpdateIssued {
1963        #[prost(message, repeated, tag = "1")]
1964        pub effects: ::prost::alloc::vec::Vec<super::ContractTraceElement>,
1965    }
1966    /// A simple account to account transfer occurred. This is the result of a
1967    /// successful Transfer transaction.
1968    #[derive(Clone, PartialEq, ::prost::Message)]
1969    pub struct AccountTransfer {
1970        /// Amount that was transferred.
1971        #[prost(message, optional, tag = "1")]
1972        pub amount: ::core::option::Option<super::Amount>,
1973        /// Receiver account.
1974        #[prost(message, optional, tag = "2")]
1975        pub receiver: ::core::option::Option<super::AccountAddress>,
1976        /// Memo.
1977        /// This field can occur starting from protocol version 2.
1978        #[prost(message, optional, tag = "3")]
1979        pub memo: ::core::option::Option<super::Memo>,
1980    }
1981    /// A validator updated its stake. This is the result of a
1982    /// successful `UpdateBakerStake` transaction.
1983    /// The associated transaction type can no longer be created starting from protocol version 4.
1984    /// Hence, this message does not occur anymore.
1985    /// The functionality was replaced in protocol version 4 by the `BakerConfigured` transaction type.
1986    #[derive(Clone, Copy, PartialEq, ::prost::Message)]
1987    pub struct BakerStakeUpdated {
1988        /// If the stake was updated (that is, it changed and did not stay the
1989        /// same) then this is present, otherwise it is not present.
1990        #[prost(message, optional, tag = "1")]
1991        pub update: ::core::option::Option<super::BakerStakeUpdatedData>,
1992    }
1993    /// An encrypted amount was transferred. This is the result of a successful
1994    /// EncryptedAmountTransfer transaction.
1995    /// The associated transaction type can no longer be created starting from protocol 7.
1996    /// Hence, this message does not occur anymore.
1997    #[derive(Clone, PartialEq, ::prost::Message)]
1998    pub struct EncryptedAmountTransferred {
1999        #[prost(message, optional, tag = "1")]
2000        pub removed: ::core::option::Option<super::EncryptedAmountRemovedEvent>,
2001        #[prost(message, optional, tag = "2")]
2002        pub added: ::core::option::Option<super::NewEncryptedAmountEvent>,
2003        /// This field can occur starting from protocol version 2.
2004        #[prost(message, optional, tag = "3")]
2005        pub memo: ::core::option::Option<super::Memo>,
2006    }
2007    /// An account transferred part of its encrypted balance to its public
2008    /// balance. This is the result of a successful TransferToPublic transaction.
2009    #[derive(Clone, PartialEq, ::prost::Message)]
2010    pub struct TransferredToPublic {
2011        #[prost(message, optional, tag = "1")]
2012        pub removed: ::core::option::Option<super::EncryptedAmountRemovedEvent>,
2013        #[prost(message, optional, tag = "2")]
2014        pub amount: ::core::option::Option<super::Amount>,
2015    }
2016    /// A transfer with schedule was performed. This is the result of a
2017    /// successful TransferWithSchedule transaction.
2018    #[derive(Clone, PartialEq, ::prost::Message)]
2019    pub struct TransferredWithSchedule {
2020        /// Receiver account.
2021        #[prost(message, optional, tag = "1")]
2022        pub receiver: ::core::option::Option<super::AccountAddress>,
2023        /// The list of releases. Ordered by increasing timestamp.
2024        #[prost(message, repeated, tag = "2")]
2025        pub amount: ::prost::alloc::vec::Vec<super::NewRelease>,
2026        /// Optional memo.
2027        /// This field can occur starting from protocol version 2.
2028        #[prost(message, optional, tag = "3")]
2029        pub memo: ::core::option::Option<super::Memo>,
2030    }
2031    /// Account's credentials were updated. This is the result of a
2032    /// successful UpdateCredentials transaction.
2033    #[derive(Clone, PartialEq, ::prost::Message)]
2034    pub struct CredentialsUpdated {
2035        /// The credential ids that were added.
2036        #[prost(message, repeated, tag = "1")]
2037        pub new_cred_ids: ::prost::alloc::vec::Vec<super::CredentialRegistrationId>,
2038        /// The credentials that were removed.
2039        #[prost(message, repeated, tag = "2")]
2040        pub removed_cred_ids: ::prost::alloc::vec::Vec<super::CredentialRegistrationId>,
2041        /// The (possibly) updated account threshold.
2042        #[prost(message, optional, tag = "3")]
2043        pub new_threshold: ::core::option::Option<super::AccountThreshold>,
2044    }
2045    /// A validator was configured. The details of what happened are contained in
2046    /// the list of `BakerEvents`.
2047    /// The associated transaction type is available starting from protocol version 4 and replaces the existing transaction types and effects from earlier protocols (`BakerAdded`,
2048    /// `BakerRemoved`, `BakerStakeUpdated`, `BakerRestakeEarningsUpdated`, and `BakerKeysUpdated`).
2049    #[derive(Clone, PartialEq, ::prost::Message)]
2050    pub struct BakerConfigured {
2051        #[prost(message, repeated, tag = "1")]
2052        pub events: ::prost::alloc::vec::Vec<super::BakerEvent>,
2053    }
2054    /// An account configured delegation. The details of what happened are
2055    /// contained in the list of DelegationEvents.
2056    /// The associated transaction type is available starting from protocol version 4 and replaces the existing transaction types and effects from earlier protocols (`BakerAdded`,
2057    /// `BakerRemoved`, `BakerStakeUpdated`, `BakerRestakeEarningsUpdated`, and `BakerKeysUpdated`).
2058    #[derive(Clone, PartialEq, ::prost::Message)]
2059    pub struct DelegationConfigured {
2060        #[prost(message, repeated, tag = "1")]
2061        pub events: ::prost::alloc::vec::Vec<super::DelegationEvent>,
2062    }
2063    /// This field might be extended in future versions of the API.
2064    #[derive(Clone, PartialEq, ::prost::Oneof)]
2065    pub enum Effect {
2066        /// No effects other than payment from this transaction.
2067        /// The rejection reason indicates why the transaction failed.
2068        #[prost(message, tag = "1")]
2069        None(None),
2070        /// A smart contract module with the attached reference was deployed.
2071        #[prost(message, tag = "2")]
2072        ModuleDeployed(super::ModuleRef),
2073        /// A smart contract was initialized.
2074        #[prost(message, tag = "3")]
2075        ContractInitialized(super::ContractInitializedEvent),
2076        /// A smart contract instance updated was issued.
2077        #[prost(message, tag = "4")]
2078        ContractUpdateIssued(ContractUpdateIssued),
2079        /// A simple account to account transfer occurred.
2080        #[prost(message, tag = "5")]
2081        AccountTransfer(AccountTransfer),
2082        /// A validator was added.
2083        /// The associated transaction type can no longer be created starting from protocol version 4.
2084        /// Hence, this effect does not occur anymore.
2085        /// The functionality was replaced in protocol version 4 by the `BakerConfigured` transaction type.
2086        #[prost(message, tag = "6")]
2087        BakerAdded(super::baker_event::BakerAdded),
2088        /// A validator was removed.
2089        /// The associated transaction type can no longer be created starting from protocol version 4.
2090        /// Hence, this effect does not occur anymore.
2091        /// The functionality was replaced in protocol version 4 by the `BakerConfigured` transaction type.
2092        #[prost(message, tag = "7")]
2093        BakerRemoved(super::BakerId),
2094        /// A validator's stake was updated.
2095        /// The associated transaction type can no longer be created starting from protocol version 4.
2096        /// Hence, this effect does not occur anymore.
2097        /// The functionality was replaced in protocol version 4 by the `BakerConfigured` transaction type.
2098        #[prost(message, tag = "8")]
2099        BakerStakeUpdated(BakerStakeUpdated),
2100        /// A validator's restake earnings setting was updated.
2101        /// The associated transaction type can no longer be created starting from protocol version 4.
2102        /// Hence, this effect does not occur anymore.
2103        /// The functionality was replaced in protocol version 4 by the `BakerConfigured` transaction type.
2104        #[prost(message, tag = "9")]
2105        BakerRestakeEarningsUpdated(super::baker_event::BakerRestakeEarningsUpdated),
2106        /// A validator's keys were updated.
2107        /// The associated transaction type can no longer be created starting from protocol version 4.
2108        /// Hence, this effect does not occur anymore.
2109        /// The functionality was replaced in protocol version 4 by the `BakerConfigured` transaction type.
2110        #[prost(message, tag = "10")]
2111        BakerKeysUpdated(super::BakerKeysEvent),
2112        /// An encrypted amount was transferred.
2113        /// The associated transaction type can no longer be created starting from protocol 7.
2114        /// Hence, this effect does not occur anymore.
2115        #[prost(message, tag = "11")]
2116        EncryptedAmountTransferred(EncryptedAmountTransferred),
2117        /// An account transferred part of its public balance to its encrypted
2118        /// balance.
2119        /// The associated transaction type can no longer be created starting from protocol 7.
2120        /// Hence, this effect does not occur anymore.
2121        #[prost(message, tag = "12")]
2122        TransferredToEncrypted(super::EncryptedSelfAmountAddedEvent),
2123        /// An account transferred part of its encrypted balance to its public balance.
2124        #[prost(message, tag = "13")]
2125        TransferredToPublic(TransferredToPublic),
2126        /// A transfer with a release schedule was made.
2127        #[prost(message, tag = "14")]
2128        TransferredWithSchedule(TransferredWithSchedule),
2129        /// Keys of a specific credential were updated.
2130        #[prost(message, tag = "15")]
2131        CredentialKeysUpdated(super::CredentialRegistrationId),
2132        /// Account credentials were updated.
2133        #[prost(message, tag = "16")]
2134        CredentialsUpdated(CredentialsUpdated),
2135        /// Some data was registered on the chain.
2136        #[prost(message, tag = "17")]
2137        DataRegistered(super::RegisteredData),
2138        /// A validator was configured. The details of what happened are contained in a list of `BakerEvents`.
2139        /// The associated transaction type is available starting from protocol version 4 and replaces the existing transaction types and effects from earlier protocols (`BakerAdded`,
2140        /// `BakerRemoved`, `BakerStakeUpdated`, `BakerRestakeEarningsUpdated`, and `BakerKeysUpdated`).
2141        #[prost(message, tag = "18")]
2142        BakerConfigured(BakerConfigured),
2143        /// A delegator was configured. The details of what happened are contained in a list of DelegatorEvents.
2144        /// This transaction type is available starting from protocol version 4.
2145        #[prost(message, tag = "19")]
2146        DelegationConfigured(DelegationConfigured),
2147        /// Token update transaction effect.
2148        #[prost(message, tag = "20")]
2149        TokenUpdateEffect(super::plt::TokenEffect),
2150    }
2151}
2152/// Election difficulty parameter.
2153#[derive(Clone, Copy, PartialEq, ::prost::Message)]
2154pub struct ElectionDifficulty {
2155    #[prost(message, optional, tag = "1")]
2156    pub value: ::core::option::Option<AmountFraction>,
2157}
2158/// Parameters that determine timeouts in the consensus protocol used from protocol version 6.
2159#[derive(Clone, Copy, PartialEq, ::prost::Message)]
2160pub struct TimeoutParameters {
2161    /// The base value for triggering a timeout
2162    #[prost(message, optional, tag = "1")]
2163    pub timeout_base: ::core::option::Option<Duration>,
2164    /// Factor for increasing the timeout. Must be greater than 1.
2165    #[prost(message, optional, tag = "2")]
2166    pub timeout_increase: ::core::option::Option<Ratio>,
2167    /// Factor for decreasing the timeout. Must be between 0 and 1.
2168    #[prost(message, optional, tag = "3")]
2169    pub timeout_decrease: ::core::option::Option<Ratio>,
2170}
2171/// Finalization committee parameters used from protocol version 6
2172#[derive(Clone, Copy, PartialEq, ::prost::Message)]
2173pub struct FinalizationCommitteeParameters {
2174    /// The minimum size of a finalization committee before `finalizer_relative_stake_threshold` takes effect.
2175    #[prost(uint32, tag = "1")]
2176    pub minimum_finalizers: u32,
2177    /// The maximum size of a finalization committee.
2178    #[prost(uint32, tag = "2")]
2179    pub maximum_finalizers: u32,
2180    /// The threshold for determining the stake required for being eligible the finalization committee.
2181    /// The amount is given by `total stake in pools * finalizer_relative_stake_threshold`
2182    #[prost(message, optional, tag = "3")]
2183    pub finalizer_relative_stake_threshold: ::core::option::Option<AmountFraction>,
2184}
2185#[derive(Clone, Copy, PartialEq, ::prost::Message)]
2186pub struct ValidatorScoreParameters {
2187    /// The maximal number of missed rounds before a validator gets suspended.
2188    #[prost(uint64, tag = "1")]
2189    pub maximum_missed_rounds: u64,
2190}
2191/// Parameters for the consensus protocol used from protocol version 6.
2192#[derive(Clone, Copy, PartialEq, ::prost::Message)]
2193pub struct ConsensusParametersV1 {
2194    /// Parameters controlling round timeouts.
2195    #[prost(message, optional, tag = "1")]
2196    pub timeout_parameters: ::core::option::Option<TimeoutParameters>,
2197    /// Minimum time interval between blocks.
2198    #[prost(message, optional, tag = "2")]
2199    pub min_block_time: ::core::option::Option<Duration>,
2200    /// Maximum energy allowed per block.
2201    #[prost(message, optional, tag = "3")]
2202    pub block_energy_limit: ::core::option::Option<Energy>,
2203}
2204/// Represents an exchange rate.
2205#[derive(Clone, Copy, PartialEq, ::prost::Message)]
2206pub struct ExchangeRate {
2207    #[prost(message, optional, tag = "1")]
2208    pub value: ::core::option::Option<Ratio>,
2209}
2210/// Represents a ratio, i.e., 'numerator / denominator'.
2211#[derive(Clone, Copy, PartialEq, ::prost::Message)]
2212pub struct Ratio {
2213    /// The numerator.
2214    #[prost(uint64, tag = "1")]
2215    pub numerator: u64,
2216    /// The denominator.
2217    #[prost(uint64, tag = "2")]
2218    pub denominator: u64,
2219}
2220/// A public key used for chain updates.
2221#[derive(Clone, PartialEq, ::prost::Message)]
2222pub struct UpdatePublicKey {
2223    #[prost(bytes = "vec", tag = "1")]
2224    pub value: ::prost::alloc::vec::Vec<u8>,
2225}
2226/// The threshold for how many UpdatePublicKeys are need to make a certain chain update.
2227#[derive(Clone, Copy, PartialEq, ::prost::Message)]
2228pub struct UpdateKeysThreshold {
2229    /// Is ensured to be within between 1 and 2^16.
2230    #[prost(uint32, tag = "1")]
2231    pub value: u32,
2232}
2233/// Index of a key in an authorizations update payload.
2234#[derive(Clone, Copy, PartialEq, ::prost::Message)]
2235pub struct UpdateKeysIndex {
2236    #[prost(uint32, tag = "1")]
2237    pub value: u32,
2238}
2239/// Represents root or level 1 keys.
2240#[derive(Clone, PartialEq, ::prost::Message)]
2241pub struct HigherLevelKeys {
2242    /// The keys.
2243    #[prost(message, repeated, tag = "1")]
2244    pub keys: ::prost::alloc::vec::Vec<UpdatePublicKey>,
2245    /// The number of keys needed to make a chain update.
2246    #[prost(message, optional, tag = "2")]
2247    pub threshold: ::core::option::Option<UpdateKeysThreshold>,
2248}
2249/// An access structure which specifies which UpdatePublicKeys in a HigherLevelKeys that are allowed
2250/// to make chain update of a specific type. The threshold defines the minimum number of allowed keys needed
2251/// to make the actual update.
2252#[derive(Clone, PartialEq, ::prost::Message)]
2253pub struct AccessStructure {
2254    /// Unique indexes into the set of keys in AuthorizationV0.
2255    #[prost(message, repeated, tag = "1")]
2256    pub access_public_keys: ::prost::alloc::vec::Vec<UpdateKeysIndex>,
2257    /// Number of keys requred to authorize an update.
2258    #[prost(message, optional, tag = "2")]
2259    pub access_threshold: ::core::option::Option<UpdateKeysThreshold>,
2260}
2261/// The set of keys authorized for chain updates, together with access structures
2262/// determining which keys are authorized for which update types.
2263/// This is the payload of an update to authorization.
2264#[derive(Clone, PartialEq, ::prost::Message)]
2265pub struct AuthorizationsV0 {
2266    /// The set of keys authorized for chain updates.
2267    #[prost(message, repeated, tag = "1")]
2268    pub keys: ::prost::alloc::vec::Vec<UpdatePublicKey>,
2269    /// New emergency keys.
2270    #[prost(message, optional, tag = "2")]
2271    pub emergency: ::core::option::Option<AccessStructure>,
2272    /// New protocol update keys.
2273    #[prost(message, optional, tag = "3")]
2274    pub protocol: ::core::option::Option<AccessStructure>,
2275    /// Access structure for updating the consensus parameters.
2276    /// Previously, this was the election difficulty.
2277    #[prost(message, optional, tag = "4")]
2278    pub parameter_consensus: ::core::option::Option<AccessStructure>,
2279    /// Access structure for updating the euro per energy.
2280    #[prost(message, optional, tag = "5")]
2281    pub parameter_euro_per_energy: ::core::option::Option<AccessStructure>,
2282    /// Access structure for updating the micro CCD per euro.
2283    #[prost(message, optional, tag = "6")]
2284    pub parameter_micro_ccd_per_euro: ::core::option::Option<AccessStructure>,
2285    /// Access structure for updating the foundation account.
2286    #[prost(message, optional, tag = "7")]
2287    pub parameter_foundation_account: ::core::option::Option<AccessStructure>,
2288    /// Access structure for updating the mint distribution.
2289    #[prost(message, optional, tag = "8")]
2290    pub parameter_mint_distribution: ::core::option::Option<AccessStructure>,
2291    /// Access structure for updating the transaction fee distribution.
2292    #[prost(message, optional, tag = "9")]
2293    pub parameter_transaction_fee_distribution: ::core::option::Option<AccessStructure>,
2294    /// Access structure for updating the gas rewards.
2295    #[prost(message, optional, tag = "10")]
2296    pub parameter_gas_rewards: ::core::option::Option<AccessStructure>,
2297    /// Access structure for updating the pool parameters. For V0 this is only
2298    /// the validator stake threshold, for V1 there are more.
2299    #[prost(message, optional, tag = "11")]
2300    pub pool_parameters: ::core::option::Option<AccessStructure>,
2301    /// Access structure for adding new anonymity revokers.
2302    #[prost(message, optional, tag = "12")]
2303    pub add_anonymity_revoker: ::core::option::Option<AccessStructure>,
2304    /// Access structure for adding new identity providers.
2305    #[prost(message, optional, tag = "13")]
2306    pub add_identity_provider: ::core::option::Option<AccessStructure>,
2307}
2308/// The set of keys authorized for chain updates, together with access structures
2309/// determining which keys are authorized for which update types.
2310/// This is the payload of an update to authorization.
2311#[derive(Clone, PartialEq, ::prost::Message)]
2312pub struct AuthorizationsV1 {
2313    #[prost(message, optional, tag = "1")]
2314    pub v0: ::core::option::Option<AuthorizationsV0>,
2315    /// Access structure for updating the cooldown periods related to validation and delegation.
2316    #[prost(message, optional, tag = "2")]
2317    pub parameter_cooldown: ::core::option::Option<AccessStructure>,
2318    /// Access structure for updating the length of the reward period.
2319    #[prost(message, optional, tag = "3")]
2320    pub parameter_time: ::core::option::Option<AccessStructure>,
2321    /// Access structure for creating a protocol level token.
2322    /// This is present from protocol version 9.
2323    #[prost(message, optional, tag = "4")]
2324    pub create_plt: ::core::option::Option<AccessStructure>,
2325}
2326/// Description either of an anonymity revoker or identity provider.
2327/// Metadata that should be visible on the chain.
2328#[derive(Clone, PartialEq, ::prost::Message)]
2329pub struct Description {
2330    /// The name.
2331    #[prost(string, tag = "1")]
2332    pub name: ::prost::alloc::string::String,
2333    /// A link to more information about the anonymity revoker or identity provider.
2334    #[prost(string, tag = "2")]
2335    pub url: ::prost::alloc::string::String,
2336    /// A free form description of the revoker or provider.
2337    #[prost(string, tag = "3")]
2338    pub description: ::prost::alloc::string::String,
2339}
2340/// Information on a single anonymity revoker help by the identity provider.
2341/// Typically an identity provider will hold more than one.
2342#[derive(Clone, PartialEq, ::prost::Message)]
2343pub struct ArInfo {
2344    /// Unique identifier of the anonymity revoker.
2345    #[prost(message, optional, tag = "1")]
2346    pub identity: ::core::option::Option<ar_info::ArIdentity>,
2347    /// Description of the anonymity revoker.
2348    #[prost(message, optional, tag = "2")]
2349    pub description: ::core::option::Option<Description>,
2350    /// Elgamal encryption key of the anonymity revoker.
2351    #[prost(message, optional, tag = "3")]
2352    pub public_key: ::core::option::Option<ar_info::ArPublicKey>,
2353}
2354/// Nested message and enum types in `ArInfo`.
2355pub mod ar_info {
2356    /// Identity of the anonymity revoker on the chain. This defines their
2357    /// evaluateion point for secret sharing, and thus it cannot be 0.
2358    #[derive(Clone, Copy, PartialEq, ::prost::Message)]
2359    pub struct ArIdentity {
2360        #[prost(uint32, tag = "1")]
2361        pub value: u32,
2362    }
2363    /// Public key of an anonymity revoker.
2364    #[derive(Clone, PartialEq, ::prost::Message)]
2365    pub struct ArPublicKey {
2366        #[prost(bytes = "vec", tag = "1")]
2367        pub value: ::prost::alloc::vec::Vec<u8>,
2368    }
2369}
2370/// A succinct identifier of an identity provider on the chain.
2371/// In credential deployments, and other interactions with the chain this is
2372/// used to identify which identity provider is meant.
2373#[derive(Clone, Copy, PartialEq, ::prost::Message)]
2374pub struct IpIdentity {
2375    #[prost(uint32, tag = "1")]
2376    pub value: u32,
2377}
2378/// Public information about an identity provider.
2379#[derive(Clone, PartialEq, ::prost::Message)]
2380pub struct IpInfo {
2381    /// Unique identifier of the identity provider.
2382    #[prost(message, optional, tag = "1")]
2383    pub identity: ::core::option::Option<IpIdentity>,
2384    /// Description of the identity provider.
2385    #[prost(message, optional, tag = "2")]
2386    pub description: ::core::option::Option<Description>,
2387    /// Pointcheval-Sanders public key of the identity provider.
2388    #[prost(message, optional, tag = "3")]
2389    pub verify_key: ::core::option::Option<ip_info::IpVerifyKey>,
2390    /// Ed25519 public key of the identity provider.
2391    #[prost(message, optional, tag = "4")]
2392    pub cdi_verify_key: ::core::option::Option<ip_info::IpCdiVerifyKey>,
2393}
2394/// Nested message and enum types in `IpInfo`.
2395pub mod ip_info {
2396    /// Pointcheval-Sanders public key of the identity provider.
2397    #[derive(Clone, PartialEq, ::prost::Message)]
2398    pub struct IpVerifyKey {
2399        #[prost(bytes = "vec", tag = "1")]
2400        pub value: ::prost::alloc::vec::Vec<u8>,
2401    }
2402    /// Ed25519 public key of the identity provider.
2403    #[derive(Clone, PartialEq, ::prost::Message)]
2404    pub struct IpCdiVerifyKey {
2405        #[prost(bytes = "vec", tag = "1")]
2406        pub value: ::prost::alloc::vec::Vec<u8>,
2407    }
2408}
2409/// A duration in seconds.
2410#[derive(Clone, Copy, PartialEq, ::prost::Message)]
2411pub struct DurationSeconds {
2412    #[prost(uint64, tag = "1")]
2413    pub value: u64,
2414}
2415/// Inclusive range of amount fractions.
2416#[derive(Clone, Copy, PartialEq, ::prost::Message)]
2417pub struct InclusiveRangeAmountFraction {
2418    #[prost(message, optional, tag = "1")]
2419    pub min: ::core::option::Option<AmountFraction>,
2420    #[prost(message, optional, tag = "2")]
2421    pub max: ::core::option::Option<AmountFraction>,
2422}
2423/// Ranges of allowed commission values that pools may choose from.
2424#[derive(Clone, Copy, PartialEq, ::prost::Message)]
2425pub struct CommissionRanges {
2426    /// The range of allowed finalization commissions.
2427    #[prost(message, optional, tag = "1")]
2428    pub finalization: ::core::option::Option<InclusiveRangeAmountFraction>,
2429    /// The range of allowed validator commissions.
2430    #[prost(message, optional, tag = "2")]
2431    pub baking: ::core::option::Option<InclusiveRangeAmountFraction>,
2432    /// The range of allowed transaction commissions.
2433    #[prost(message, optional, tag = "3")]
2434    pub transaction: ::core::option::Option<InclusiveRangeAmountFraction>,
2435}
2436/// The capital bound is a chain parameter that is set to guarantee network decentralization by preventing
2437/// a single validator from gaining excessive power in the consensus protocol.
2438/// The capital bound is required to be set to a value greater than 0 (capital_bound > 0).
2439/// The value roughly describes the maximum proportion of the total stake in the protocol (from all validators including passive delegation)
2440/// to the stake of a validator that a validator can achieve where the total stake of the validator is considered effective
2441/// (meaning the validator's total stake is used for caculating the lottery power or finalizer weight in the consensus).
2442/// Once a validator passes this bound, some of the validator's total stake no longer contributes to the validator's effective stake.
2443/// Delegators are prevented from increasing their delegation to the pool
2444/// (via sending a `ConfigureDelegation` transaction) if that would cause the pool to exceed the capital bound cap.
2445/// See the comment at the `delegated_capital_cap` type for the exact formula.
2446#[derive(Clone, Copy, PartialEq, ::prost::Message)]
2447pub struct CapitalBound {
2448    #[prost(message, optional, tag = "1")]
2449    pub value: ::core::option::Option<AmountFraction>,
2450}
2451/// The leverage factor (leverage bound) is a chain parameter that is set to guarantee that each validator
2452/// has skin in the game with respect to its delegators by providing some of the CCD staked at the validator's pool from the validator's funds.
2453/// The leverage factor is required to be set to a value greater than or equal to 1 (1 <= leverage_factor).
2454/// The leverage factor is the maximum proportion of total stake of a validator (including the validator's own stake and the delegated
2455/// stake to the validator) to the validator's own stake (excluding delegated stake to the validator)
2456/// that a validator can achieve where the total stake of the validator is considered effective
2457/// (meaning the validator's total stake is used for caculating the lottery power or finalizer weight in the consensus).
2458/// Once a validator passes this bound, some of the validator's total stake no longer contributes to the validator's effective stake.
2459/// Delegators are prevented from increasing their delegation to the pool
2460/// (via sending a `ConfigureDelegation` transaction) if that would cause the pool to exceed the leverage bound cap.
2461/// See the comment at the `delegated_capital_cap` type for the exact formula.
2462#[derive(Clone, Copy, PartialEq, ::prost::Message)]
2463pub struct LeverageFactor {
2464    #[prost(message, optional, tag = "1")]
2465    pub value: ::core::option::Option<Ratio>,
2466}
2467/// A chain epoch.
2468#[derive(Clone, Copy, PartialEq, ::prost::Message)]
2469pub struct Epoch {
2470    #[prost(uint64, tag = "1")]
2471    pub value: u64,
2472}
2473/// A round.
2474#[derive(Clone, Copy, PartialEq, ::prost::Message)]
2475pub struct Round {
2476    #[prost(uint64, tag = "1")]
2477    pub value: u64,
2478}
2479/// Length of a reward period in epochs.
2480/// Must always be a strictly positive number.
2481#[derive(Clone, Copy, PartialEq, ::prost::Message)]
2482pub struct RewardPeriodLength {
2483    #[prost(message, optional, tag = "1")]
2484    pub value: ::core::option::Option<Epoch>,
2485}
2486/// A minting rate of CCD.
2487/// The value is `mantissa * 10^(-exponent)`.
2488#[derive(Clone, Copy, PartialEq, ::prost::Message)]
2489pub struct MintRate {
2490    #[prost(uint32, tag = "1")]
2491    pub mantissa: u32,
2492    /// This will never exceed 255 and can thus be stored in a single byte.
2493    #[prost(uint32, tag = "2")]
2494    pub exponent: u32,
2495}
2496#[derive(Clone, Copy, PartialEq, ::prost::Message)]
2497pub struct CooldownParametersCpv1 {
2498    /// Number of seconds that pool owners must cooldown
2499    /// when reducing their equity capital or closing the pool.
2500    #[prost(message, optional, tag = "1")]
2501    pub pool_owner_cooldown: ::core::option::Option<DurationSeconds>,
2502    /// Number of seconds that a delegator must cooldown
2503    /// when reducing their delegated stake.
2504    #[prost(message, optional, tag = "2")]
2505    pub delegator_cooldown: ::core::option::Option<DurationSeconds>,
2506}
2507/// Parameters related to staking pools.
2508#[derive(Clone, Copy, PartialEq, ::prost::Message)]
2509pub struct PoolParametersCpv1 {
2510    /// Fraction of finalization rewards charged by the passive delegation.
2511    #[prost(message, optional, tag = "1")]
2512    pub passive_finalization_commission: ::core::option::Option<AmountFraction>,
2513    /// Fraction of block production rewards charged by the passive delegation.
2514    #[prost(message, optional, tag = "2")]
2515    pub passive_baking_commission: ::core::option::Option<AmountFraction>,
2516    /// Fraction of transaction rewards charged by the L-pool.
2517    #[prost(message, optional, tag = "3")]
2518    pub passive_transaction_commission: ::core::option::Option<AmountFraction>,
2519    /// Bounds on the commission rates that may be charged by validators.
2520    #[prost(message, optional, tag = "4")]
2521    pub commission_bounds: ::core::option::Option<CommissionRanges>,
2522    /// Minimum equity capital required for a new validator.
2523    #[prost(message, optional, tag = "5")]
2524    pub minimum_equity_capital: ::core::option::Option<Amount>,
2525    /// Maximum fraction of the total staked capital of that a new validator can
2526    /// have.
2527    #[prost(message, optional, tag = "6")]
2528    pub capital_bound: ::core::option::Option<CapitalBound>,
2529    /// The maximum leverage that a validator can have as a ratio of total stake
2530    /// to equity capital.
2531    #[prost(message, optional, tag = "7")]
2532    pub leverage_bound: ::core::option::Option<LeverageFactor>,
2533}
2534/// The time parameters are introduced as of protocol version 4, and consist of
2535/// the reward period length and the mint rate per payday. These are coupled as
2536/// a change to either affects the overall rate of minting.
2537#[derive(Clone, Copy, PartialEq, ::prost::Message)]
2538pub struct TimeParametersCpv1 {
2539    #[prost(message, optional, tag = "1")]
2540    pub reward_period_length: ::core::option::Option<RewardPeriodLength>,
2541    #[prost(message, optional, tag = "2")]
2542    pub mint_per_payday: ::core::option::Option<MintRate>,
2543}
2544/// Mint distribution payload as it looks in protocol version 4 and onward.
2545#[derive(Clone, Copy, PartialEq, ::prost::Message)]
2546pub struct MintDistributionCpv1 {
2547    #[prost(message, optional, tag = "1")]
2548    pub baking_reward: ::core::option::Option<AmountFraction>,
2549    #[prost(message, optional, tag = "2")]
2550    pub finalization_reward: ::core::option::Option<AmountFraction>,
2551}
2552#[derive(Clone, PartialEq, ::prost::Message)]
2553pub struct ProtocolUpdate {
2554    /// A brief message about the update.
2555    #[prost(string, tag = "1")]
2556    pub message: ::prost::alloc::string::String,
2557    /// A URL of a document describing the update.
2558    #[prost(string, tag = "2")]
2559    pub specification_url: ::prost::alloc::string::String,
2560    /// SHA256 hash of the specification document.
2561    #[prost(message, optional, tag = "3")]
2562    pub specification_hash: ::core::option::Option<Sha256Hash>,
2563    /// Auxiliary data whose interpretation is defined by the new specification.
2564    #[prost(bytes = "vec", tag = "4")]
2565    pub specification_auxiliary_data: ::prost::alloc::vec::Vec<u8>,
2566}
2567/// The minting rate and the distribution of newly-minted CCD among validators,
2568/// finalizers, and the foundation account. It must be the case that
2569/// baking_reward + finalization_reward <= 1. The remaining amount is the
2570/// platform development charge.
2571#[derive(Clone, Copy, PartialEq, ::prost::Message)]
2572pub struct MintDistributionCpv0 {
2573    /// Mint rate per slot.
2574    #[prost(message, optional, tag = "1")]
2575    pub mint_per_slot: ::core::option::Option<MintRate>,
2576    /// The fraction of newly created CCD allocated to validator rewards.
2577    #[prost(message, optional, tag = "2")]
2578    pub baking_reward: ::core::option::Option<AmountFraction>,
2579    /// The fraction of newly created CCD allocated to finalization rewards.
2580    #[prost(message, optional, tag = "3")]
2581    pub finalization_reward: ::core::option::Option<AmountFraction>,
2582}
2583/// Parameters determining the distribution of transaction fees.
2584#[derive(Clone, Copy, PartialEq, ::prost::Message)]
2585pub struct TransactionFeeDistribution {
2586    /// The fraction allocated to the validator.
2587    #[prost(message, optional, tag = "1")]
2588    pub baker: ::core::option::Option<AmountFraction>,
2589    /// The fraction allocated to the GAS account.
2590    #[prost(message, optional, tag = "2")]
2591    pub gas_account: ::core::option::Option<AmountFraction>,
2592}
2593/// Distribution of gas rewards for chain parameters version 0 and 1.
2594#[derive(Clone, Copy, PartialEq, ::prost::Message)]
2595pub struct GasRewards {
2596    /// The fraction paid to the validator.
2597    #[prost(message, optional, tag = "1")]
2598    pub baker: ::core::option::Option<AmountFraction>,
2599    /// Fraction paid for including a finalization proof in a block.
2600    #[prost(message, optional, tag = "2")]
2601    pub finalization_proof: ::core::option::Option<AmountFraction>,
2602    /// Fraction paid for including each account creation transaction in a block.
2603    #[prost(message, optional, tag = "3")]
2604    pub account_creation: ::core::option::Option<AmountFraction>,
2605    /// Fraction paid for including an update transaction in a block.
2606    #[prost(message, optional, tag = "4")]
2607    pub chain_update: ::core::option::Option<AmountFraction>,
2608}
2609/// Distribution of gas rewards for chain parameters version 2.
2610#[derive(Clone, Copy, PartialEq, ::prost::Message)]
2611pub struct GasRewardsCpv2 {
2612    /// The fraction paid to the validator.
2613    #[prost(message, optional, tag = "1")]
2614    pub baker: ::core::option::Option<AmountFraction>,
2615    /// Fraction paid for including each account creation transaction in a block.
2616    #[prost(message, optional, tag = "3")]
2617    pub account_creation: ::core::option::Option<AmountFraction>,
2618    /// Fraction paid for including an update transaction in a block.
2619    #[prost(message, optional, tag = "4")]
2620    pub chain_update: ::core::option::Option<AmountFraction>,
2621}
2622/// Minimum stake needed to become a validator. This only applies to protocol version 1-3.
2623#[derive(Clone, Copy, PartialEq, ::prost::Message)]
2624pub struct BakerStakeThreshold {
2625    /// Minimum threshold required for registering as a validator.
2626    #[prost(message, optional, tag = "1")]
2627    pub baker_stake_threshold: ::core::option::Option<Amount>,
2628}
2629/// Root updates are the highest kind of key updates. They can update every other set of keys,
2630/// even themselves. They can only be performed by Root level keys.
2631#[derive(Clone, PartialEq, ::prost::Message)]
2632pub struct RootUpdate {
2633    /// This field will not be extended in future versions of the API, instead new data versions will
2634    /// use optional fields in either `HigherLevelKeys` or `AuthorizationsV1`.
2635    #[prost(oneof = "root_update::UpdateType", tags = "1, 2, 3, 4")]
2636    pub update_type: ::core::option::Option<root_update::UpdateType>,
2637}
2638/// Nested message and enum types in `RootUpdate`.
2639pub mod root_update {
2640    /// This field will not be extended in future versions of the API, instead new data versions will
2641    /// use optional fields in either `HigherLevelKeys` or `AuthorizationsV1`.
2642    #[derive(Clone, PartialEq, ::prost::Oneof)]
2643    pub enum UpdateType {
2644        /// The root keys were updated.
2645        #[prost(message, tag = "1")]
2646        RootKeysUpdate(super::HigherLevelKeys),
2647        /// The level 1 keys were updated.
2648        #[prost(message, tag = "2")]
2649        Level1KeysUpdate(super::HigherLevelKeys),
2650        /// The level 2 keys were updated.
2651        #[prost(message, tag = "3")]
2652        Level2KeysUpdateV0(super::AuthorizationsV0),
2653        /// The level 2 keys were updated. This is similar to `level_2_keys_update_v0` except that a few more keys can be updated.
2654        #[prost(message, tag = "4")]
2655        Level2KeysUpdateV1(super::AuthorizationsV1),
2656    }
2657}
2658/// Level 1 updates are the intermediate update kind.
2659/// They can update themselves or level 2 keys. They can only be performed by level 1 keys.
2660#[derive(Clone, PartialEq, ::prost::Message)]
2661pub struct Level1Update {
2662    /// This field will not be extended in future versions of the API, instead new data versions will
2663    /// use optional fields in either `HigherLevelKeys` or `AuthorizationsV1`.
2664    #[prost(oneof = "level1_update::UpdateType", tags = "1, 2, 3")]
2665    pub update_type: ::core::option::Option<level1_update::UpdateType>,
2666}
2667/// Nested message and enum types in `Level1Update`.
2668pub mod level1_update {
2669    /// This field will not be extended in future versions of the API, instead new data versions will
2670    /// use optional fields in either `HigherLevelKeys` or `AuthorizationsV1`.
2671    #[derive(Clone, PartialEq, ::prost::Oneof)]
2672    pub enum UpdateType {
2673        /// The level 1 keys were updated.
2674        #[prost(message, tag = "1")]
2675        Level1KeysUpdate(super::HigherLevelKeys),
2676        /// The level 2 keys were updated.
2677        #[prost(message, tag = "2")]
2678        Level2KeysUpdateV0(super::AuthorizationsV0),
2679        /// The level 2 keys were updated. This is similar to `level_2_keys_update_v0` except that a few more keys can be updated.
2680        #[prost(message, tag = "3")]
2681        Level2KeysUpdateV1(super::AuthorizationsV1),
2682    }
2683}
2684/// The payload of a chain update.
2685#[derive(Clone, PartialEq, ::prost::Message)]
2686pub struct UpdatePayload {
2687    /// This field might be extended in future versions of the API.
2688    #[prost(
2689        oneof = "update_payload::Payload",
2690        tags = "1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24"
2691    )]
2692    pub payload: ::core::option::Option<update_payload::Payload>,
2693}
2694/// Nested message and enum types in `UpdatePayload`.
2695pub mod update_payload {
2696    /// This field might be extended in future versions of the API.
2697    #[derive(Clone, PartialEq, ::prost::Oneof)]
2698    pub enum Payload {
2699        /// The protocol version was updated.
2700        #[prost(message, tag = "1")]
2701        ProtocolUpdate(super::ProtocolUpdate),
2702        /// The election difficulty was updated.
2703        #[prost(message, tag = "2")]
2704        ElectionDifficultyUpdate(super::ElectionDifficulty),
2705        /// The euro per energy exchange rate was updated.
2706        #[prost(message, tag = "3")]
2707        EuroPerEnergyUpdate(super::ExchangeRate),
2708        /// The microCCD per euro exchange rate was updated.
2709        #[prost(message, tag = "4")]
2710        MicroCcdPerEuroUpdate(super::ExchangeRate),
2711        /// The foundation account address was updated.
2712        #[prost(message, tag = "5")]
2713        FoundationAccountUpdate(super::AccountAddress),
2714        /// The mint distribution was updated.
2715        #[prost(message, tag = "6")]
2716        MintDistributionUpdate(super::MintDistributionCpv0),
2717        /// The transaction fee distribtuion was updated.
2718        #[prost(message, tag = "7")]
2719        TransactionFeeDistributionUpdate(super::TransactionFeeDistribution),
2720        /// The gas rewards were updated.
2721        #[prost(message, tag = "8")]
2722        GasRewardsUpdate(super::GasRewards),
2723        /// The minimum amount of CCD needed to be come a validator was updated.
2724        #[prost(message, tag = "9")]
2725        BakerStakeThresholdUpdate(super::BakerStakeThreshold),
2726        /// The root keys were updated.
2727        #[prost(message, tag = "10")]
2728        RootUpdate(super::RootUpdate),
2729        /// The level 1 keys were updated.
2730        #[prost(message, tag = "11")]
2731        Level1Update(super::Level1Update),
2732        /// An anonymity revoker was added.
2733        #[prost(message, tag = "12")]
2734        AddAnonymityRevokerUpdate(super::ArInfo),
2735        /// An identity provider was added.
2736        #[prost(message, tag = "13")]
2737        AddIdentityProviderUpdate(super::IpInfo),
2738        /// The cooldown parameters were updated.
2739        #[prost(message, tag = "14")]
2740        CooldownParametersCpv1Update(super::CooldownParametersCpv1),
2741        /// The pool parameters were updated.
2742        #[prost(message, tag = "15")]
2743        PoolParametersCpv1Update(super::PoolParametersCpv1),
2744        /// The time parameters were updated.
2745        #[prost(message, tag = "16")]
2746        TimeParametersCpv1Update(super::TimeParametersCpv1),
2747        /// The mint distribution was updated.
2748        #[prost(message, tag = "17")]
2749        MintDistributionCpv1Update(super::MintDistributionCpv1),
2750        /// The gas rewards were updated (chain parameters version 2).
2751        #[prost(message, tag = "18")]
2752        GasRewardsCpv2Update(super::GasRewardsCpv2),
2753        /// The consensus timeouts were updated (chain parameters version 2).
2754        #[prost(message, tag = "19")]
2755        TimeoutParametersUpdate(super::TimeoutParameters),
2756        /// The minimum time between blocks was updated (chain parameters version 2).
2757        #[prost(message, tag = "20")]
2758        MinBlockTimeUpdate(super::Duration),
2759        /// The block energy limit was updated (chain parameters version 2).
2760        #[prost(message, tag = "21")]
2761        BlockEnergyLimitUpdate(super::Energy),
2762        /// Finalization committee parameters (chain parameters version 2).
2763        #[prost(message, tag = "22")]
2764        FinalizationCommitteeParametersUpdate(super::FinalizationCommitteeParameters),
2765        /// Validator score parameters (chain parameters version 3)
2766        #[prost(message, tag = "23")]
2767        ValidatorScoreParametersUpdate(super::ValidatorScoreParameters),
2768        /// Create a new protocol-level token.
2769        #[prost(message, tag = "24")]
2770        CreatePltUpdate(super::plt::CreatePlt),
2771    }
2772}
2773/// Details about the sponsor of a transaction.
2774#[derive(Clone, PartialEq, ::prost::Message)]
2775pub struct SponsorDetails {
2776    /// The cost of the transaction. Paid by the sponsor.
2777    #[prost(message, optional, tag = "1")]
2778    pub cost: ::core::option::Option<Amount>,
2779    /// The sponsor of the transaction.
2780    #[prost(message, optional, tag = "2")]
2781    pub sponsor: ::core::option::Option<AccountAddress>,
2782}
2783/// Details about an account transaction.
2784#[derive(Clone, PartialEq, ::prost::Message)]
2785pub struct AccountTransactionDetails {
2786    /// The cost of the transaction. Paid by the sender. This will be zero if the
2787    /// transaction is sponsored.
2788    #[prost(message, optional, tag = "1")]
2789    pub cost: ::core::option::Option<Amount>,
2790    /// The sender of the transaction.
2791    #[prost(message, optional, tag = "2")]
2792    pub sender: ::core::option::Option<AccountAddress>,
2793    /// The effects of the transaction.
2794    #[prost(message, optional, tag = "3")]
2795    pub effects: ::core::option::Option<AccountTransactionEffects>,
2796    /// The optional sponsor details of the transaction.
2797    #[prost(message, optional, tag = "4")]
2798    pub sponsor: ::core::option::Option<SponsorDetails>,
2799}
2800/// Details of an account creation. These transactions are free, and we only
2801/// ever get a response for them if the account is created, hence no failure
2802/// cases.
2803#[derive(Clone, PartialEq, ::prost::Message)]
2804pub struct AccountCreationDetails {
2805    /// Whether this is an initial or normal account.
2806    #[prost(enumeration = "CredentialType", tag = "1")]
2807    pub credential_type: i32,
2808    /// Address of the newly created account.
2809    #[prost(message, optional, tag = "2")]
2810    pub address: ::core::option::Option<AccountAddress>,
2811    /// Credential registration ID of the first credential.
2812    #[prost(message, optional, tag = "3")]
2813    pub reg_id: ::core::option::Option<CredentialRegistrationId>,
2814}
2815/// Transaction time specified as seconds since unix epoch.
2816#[derive(Clone, Copy, PartialEq, ::prost::Message)]
2817pub struct TransactionTime {
2818    #[prost(uint64, tag = "1")]
2819    pub value: u64,
2820}
2821/// Details of an successful update instruction. These are free, and we only ever get a
2822/// response for them if the update is successfully enqueued, hence no failure
2823/// cases.
2824#[derive(Clone, PartialEq, ::prost::Message)]
2825pub struct UpdateDetails {
2826    /// The time at which the update will be effective.
2827    #[prost(message, optional, tag = "1")]
2828    pub effective_time: ::core::option::Option<TransactionTime>,
2829    /// The payload for the update.
2830    #[prost(message, optional, tag = "2")]
2831    pub payload: ::core::option::Option<UpdatePayload>,
2832}
2833/// Summary of the outcome of a block item in structured form.
2834/// The summary determines which transaction type it was.
2835#[derive(Clone, PartialEq, ::prost::Message)]
2836pub struct BlockItemSummary {
2837    /// Index of the transaction in the block where it is included.
2838    #[prost(message, optional, tag = "1")]
2839    pub index: ::core::option::Option<block_item_summary::TransactionIndex>,
2840    /// The amount of NRG the transaction cost.
2841    #[prost(message, optional, tag = "2")]
2842    pub energy_cost: ::core::option::Option<Energy>,
2843    /// Hash of the transaction.
2844    #[prost(message, optional, tag = "3")]
2845    pub hash: ::core::option::Option<TransactionHash>,
2846    /// Details that are specific to different transaction types.
2847    ///
2848    /// This field might be extended in future versions of the API.
2849    #[prost(oneof = "block_item_summary::Details", tags = "4, 5, 6, 7")]
2850    pub details: ::core::option::Option<block_item_summary::Details>,
2851}
2852/// Nested message and enum types in `BlockItemSummary`.
2853pub mod block_item_summary {
2854    #[derive(Clone, Copy, PartialEq, ::prost::Message)]
2855    pub struct TransactionIndex {
2856        #[prost(uint64, tag = "1")]
2857        pub value: u64,
2858    }
2859    /// Details that are specific to different transaction types.
2860    ///
2861    /// This field might be extended in future versions of the API.
2862    #[derive(Clone, PartialEq, ::prost::Oneof)]
2863    pub enum Details {
2864        /// Details about an account transaction.
2865        #[prost(message, tag = "4")]
2866        AccountTransaction(super::AccountTransactionDetails),
2867        /// Details about an account creation.
2868        #[prost(message, tag = "5")]
2869        AccountCreation(super::AccountCreationDetails),
2870        /// Details about a successful chain update.
2871        #[prost(message, tag = "6")]
2872        Update(super::UpdateDetails),
2873        /// Details about the creation of a protocol-level token.
2874        #[prost(message, tag = "7")]
2875        TokenCreation(super::plt::TokenCreationDetails),
2876    }
2877}
2878/// The number of chain restarts via a protocol update. An effected
2879/// protocol update instruction might not change the protocol version
2880/// specified in the previous field, but it always increments the genesis
2881/// index.
2882#[derive(Clone, Copy, PartialEq, ::prost::Message)]
2883pub struct GenesisIndex {
2884    #[prost(uint32, tag = "1")]
2885    pub value: u32,
2886}
2887/// The response for GetConsensusInfo.
2888#[derive(Clone, PartialEq, ::prost::Message)]
2889pub struct ConsensusInfo {
2890    /// Hash of the current best block.
2891    #[prost(message, optional, tag = "1")]
2892    pub best_block: ::core::option::Option<BlockHash>,
2893    /// Hash of the (original) genesis block.
2894    #[prost(message, optional, tag = "2")]
2895    pub genesis_block: ::core::option::Option<BlockHash>,
2896    /// Time of the (original) genesis block.
2897    #[prost(message, optional, tag = "3")]
2898    pub genesis_time: ::core::option::Option<Timestamp>,
2899    /// (Current) slot duration in milliseconds. Present only in protocol versions 1-5.
2900    #[prost(message, optional, tag = "4")]
2901    pub slot_duration: ::core::option::Option<Duration>,
2902    /// (Current) epoch duration in milliseconds.
2903    #[prost(message, optional, tag = "5")]
2904    pub epoch_duration: ::core::option::Option<Duration>,
2905    /// Hash of the last finalized block.
2906    #[prost(message, optional, tag = "6")]
2907    pub last_finalized_block: ::core::option::Option<BlockHash>,
2908    /// Absolute height of the best block.
2909    #[prost(message, optional, tag = "7")]
2910    pub best_block_height: ::core::option::Option<AbsoluteBlockHeight>,
2911    /// Absolute height of the last finalized block.
2912    #[prost(message, optional, tag = "8")]
2913    pub last_finalized_block_height: ::core::option::Option<AbsoluteBlockHeight>,
2914    /// Total number of blocks received.
2915    #[prost(uint32, tag = "9")]
2916    pub blocks_received_count: u32,
2917    /// The last time a block was received.
2918    #[prost(message, optional, tag = "10")]
2919    pub block_last_received_time: ::core::option::Option<Timestamp>,
2920    /// Exponential moving average latency between a block's slot time and received time.
2921    #[prost(double, tag = "11")]
2922    pub block_receive_latency_ema: f64,
2923    /// Standard deviation of exponential moving average latency between a block's slot time and received time.
2924    #[prost(double, tag = "12")]
2925    pub block_receive_latency_emsd: f64,
2926    /// Exponential moving average time between receiving blocks.
2927    #[prost(double, optional, tag = "13")]
2928    pub block_receive_period_ema: ::core::option::Option<f64>,
2929    /// Standard deviation of exponential moving average time between receiving blocks.
2930    #[prost(double, optional, tag = "14")]
2931    pub block_receive_period_emsd: ::core::option::Option<f64>,
2932    /// Total number of blocks received and verified.
2933    #[prost(uint32, tag = "15")]
2934    pub blocks_verified_count: u32,
2935    /// The last time a block was verified (added to the tree).
2936    #[prost(message, optional, tag = "16")]
2937    pub block_last_arrived_time: ::core::option::Option<Timestamp>,
2938    /// Exponential moving average latency between a block's slot time and its arrival.
2939    #[prost(double, tag = "17")]
2940    pub block_arrive_latency_ema: f64,
2941    /// Standard deviation of exponential moving average latency between a block's slot time and its arrival.
2942    #[prost(double, tag = "18")]
2943    pub block_arrive_latency_emsd: f64,
2944    /// Exponential moving average time between block arrivals.
2945    #[prost(double, optional, tag = "19")]
2946    pub block_arrive_period_ema: ::core::option::Option<f64>,
2947    /// Standard deviation of exponential moving average time between block arrivals.
2948    #[prost(double, optional, tag = "20")]
2949    pub block_arrive_period_emsd: ::core::option::Option<f64>,
2950    /// Exponential moving average number of transactions per block.
2951    #[prost(double, tag = "21")]
2952    pub transactions_per_block_ema: f64,
2953    /// Standard deviation of exponential moving average number of transactions per block.
2954    #[prost(double, tag = "22")]
2955    pub transactions_per_block_emsd: f64,
2956    /// Number of finalizations.
2957    #[prost(uint32, tag = "23")]
2958    pub finalization_count: u32,
2959    /// Time of last verified finalization.
2960    #[prost(message, optional, tag = "24")]
2961    pub last_finalized_time: ::core::option::Option<Timestamp>,
2962    /// Exponential moving average time between finalizations.
2963    #[prost(double, optional, tag = "25")]
2964    pub finalization_period_ema: ::core::option::Option<f64>,
2965    /// Standard deviation of exponential moving average time between finalizations.
2966    #[prost(double, optional, tag = "26")]
2967    pub finalization_period_emsd: ::core::option::Option<f64>,
2968    /// Currently active protocol version.
2969    #[prost(enumeration = "ProtocolVersion", tag = "27")]
2970    pub protocol_version: i32,
2971    /// The number of chain restarts via a protocol update. A completed
2972    /// protocol update instruction might not change the protocol version
2973    /// specified in the previous field, but it always increments the genesis
2974    /// index.
2975    #[prost(message, optional, tag = "28")]
2976    pub genesis_index: ::core::option::Option<GenesisIndex>,
2977    /// Block hash of the genesis block of current era, i.e., since the last protocol update.
2978    /// Initially this is equal to 'genesis_block'.
2979    #[prost(message, optional, tag = "29")]
2980    pub current_era_genesis_block: ::core::option::Option<BlockHash>,
2981    /// Time when the current era started.
2982    #[prost(message, optional, tag = "30")]
2983    pub current_era_genesis_time: ::core::option::Option<Timestamp>,
2984    /// The current duration to wait before a round times out. Present from protocol version 6.
2985    #[prost(message, optional, tag = "31")]
2986    pub current_timeout_duration: ::core::option::Option<Duration>,
2987    /// The current round. Present from protocol version 6.
2988    #[prost(message, optional, tag = "32")]
2989    pub current_round: ::core::option::Option<Round>,
2990    /// The current epoch. Present from protocol version 6.
2991    #[prost(message, optional, tag = "33")]
2992    pub current_epoch: ::core::option::Option<Epoch>,
2993    /// The first block in the epoch with timestamp at least this is considered to be the trigger block
2994    /// for the epoch transition. Present from protocol version 6.
2995    #[prost(message, optional, tag = "34")]
2996    pub trigger_block_time: ::core::option::Option<Timestamp>,
2997}
2998/// Information about an arrived block that is part of the streaming response.
2999#[derive(Clone, PartialEq, ::prost::Message)]
3000pub struct ArrivedBlockInfo {
3001    /// Hash of the block.
3002    #[prost(message, optional, tag = "1")]
3003    pub hash: ::core::option::Option<BlockHash>,
3004    /// Absolute height of the block, height 0 is the genesis block.
3005    #[prost(message, optional, tag = "2")]
3006    pub height: ::core::option::Option<AbsoluteBlockHeight>,
3007}
3008/// The response for GetCryptographicParameters.
3009#[derive(Clone, PartialEq, ::prost::Message)]
3010pub struct CryptographicParameters {
3011    /// A free-form string used to distinguish between different chains even if they share other parameters.
3012    #[prost(string, tag = "1")]
3013    pub genesis_string: ::prost::alloc::string::String,
3014    /// Generators for the bulletproofs.
3015    /// It is a serialized list of 256 group elements in the G1 group of the BLS12-381 curve.
3016    #[prost(bytes = "vec", tag = "2")]
3017    pub bulletproof_generators: ::prost::alloc::vec::Vec<u8>,
3018    /// A shared commitment key known to the chain and the account holder (and therefore it is public).
3019    /// The account holder uses this commitment key to generate commitments to values in the attribute list.
3020    /// It is a serialized pair of group elements  in the G1 group of the BLS12-381 curve.
3021    #[prost(bytes = "vec", tag = "3")]
3022    pub on_chain_commitment_key: ::prost::alloc::vec::Vec<u8>,
3023}
3024/// The response for GetBlockInfo.
3025#[derive(Clone, PartialEq, ::prost::Message)]
3026pub struct BlockInfo {
3027    /// Hash of the block.
3028    #[prost(message, optional, tag = "1")]
3029    pub hash: ::core::option::Option<BlockHash>,
3030    /// Absolute height of the block, height 0 is the genesis block.
3031    #[prost(message, optional, tag = "2")]
3032    pub height: ::core::option::Option<AbsoluteBlockHeight>,
3033    /// The parent block hash. For a re-genesis block, this will be the terminal block of the
3034    /// previous chain. For the initial genesis block, this will be the hash of the block itself.
3035    #[prost(message, optional, tag = "3")]
3036    pub parent_block: ::core::option::Option<BlockHash>,
3037    /// The last finalized block when this block was baked.
3038    #[prost(message, optional, tag = "4")]
3039    pub last_finalized_block: ::core::option::Option<BlockHash>,
3040    /// The genesis index for this block. This counts the number of protocol updates that have
3041    /// preceded this block, and defines the era of the block.
3042    #[prost(message, optional, tag = "5")]
3043    pub genesis_index: ::core::option::Option<GenesisIndex>,
3044    /// The height of this block relative to the (re)genesis block of its era.
3045    #[prost(message, optional, tag = "6")]
3046    pub era_block_height: ::core::option::Option<BlockHeight>,
3047    /// The time the block was received.
3048    #[prost(message, optional, tag = "7")]
3049    pub receive_time: ::core::option::Option<Timestamp>,
3050    /// The time the block was verified.
3051    #[prost(message, optional, tag = "8")]
3052    pub arrive_time: ::core::option::Option<Timestamp>,
3053    /// The slot number in which the block was baked. Present in protocol versions 1-5.
3054    #[prost(message, optional, tag = "9")]
3055    pub slot_number: ::core::option::Option<Slot>,
3056    /// The time of the slot in which the block was baked.
3057    #[prost(message, optional, tag = "10")]
3058    pub slot_time: ::core::option::Option<Timestamp>,
3059    /// The validator id of the account producing this block. Not provided for a genesis block.
3060    #[prost(message, optional, tag = "11")]
3061    pub baker: ::core::option::Option<BakerId>,
3062    /// Whether the block is finalized.
3063    #[prost(bool, tag = "12")]
3064    pub finalized: bool,
3065    /// The number of transactions in the block.
3066    #[prost(uint32, tag = "13")]
3067    pub transaction_count: u32,
3068    /// The energy cost of the transactions in the block.
3069    #[prost(message, optional, tag = "14")]
3070    pub transactions_energy_cost: ::core::option::Option<Energy>,
3071    /// The total byte size of all transactions in the block.
3072    #[prost(uint32, tag = "15")]
3073    pub transactions_size: u32,
3074    /// The hash of the block state after this block.
3075    #[prost(message, optional, tag = "16")]
3076    pub state_hash: ::core::option::Option<StateHash>,
3077    /// Protocol version to which the block belongs.
3078    #[prost(enumeration = "ProtocolVersion", tag = "17")]
3079    pub protocol_version: i32,
3080    /// Block round. Present from protocol version 6.
3081    #[prost(message, optional, tag = "18")]
3082    pub round: ::core::option::Option<Round>,
3083    /// Block epoch. Present from protocol version 6.
3084    #[prost(message, optional, tag = "19")]
3085    pub epoch: ::core::option::Option<Epoch>,
3086}
3087/// Request for GetPoolInfo.
3088#[derive(Clone, PartialEq, ::prost::Message)]
3089pub struct PoolInfoRequest {
3090    /// Block in which to query the pool information.
3091    #[prost(message, optional, tag = "1")]
3092    pub block_hash: ::core::option::Option<BlockHashInput>,
3093    /// The validator id of the pool owner.
3094    #[prost(message, optional, tag = "2")]
3095    pub baker: ::core::option::Option<BakerId>,
3096}
3097/// A pending change to a validator pool.
3098#[derive(Clone, Copy, PartialEq, ::prost::Message)]
3099pub struct PoolPendingChange {
3100    /// This field will not be extended in future versions of the API, since it is not used starting
3101    /// from Concordium Protocol Version 7.
3102    #[prost(oneof = "pool_pending_change::Change", tags = "1, 2")]
3103    pub change: ::core::option::Option<pool_pending_change::Change>,
3104}
3105/// Nested message and enum types in `PoolPendingChange`.
3106pub mod pool_pending_change {
3107    /// A reduction in validator equity capital is pending.
3108    #[derive(Clone, Copy, PartialEq, ::prost::Message)]
3109    pub struct Reduce {
3110        /// New validator equity capital.
3111        #[prost(message, optional, tag = "1")]
3112        pub reduced_equity_capital: ::core::option::Option<super::Amount>,
3113        /// Timestamp when the change takes effect.
3114        #[prost(message, optional, tag = "2")]
3115        pub effective_time: ::core::option::Option<super::Timestamp>,
3116    }
3117    /// Removal of the pool is pending.
3118    #[derive(Clone, Copy, PartialEq, ::prost::Message)]
3119    pub struct Remove {
3120        /// Timestamp when the change takes effect.
3121        #[prost(message, optional, tag = "1")]
3122        pub effective_time: ::core::option::Option<super::Timestamp>,
3123    }
3124    /// This field will not be extended in future versions of the API, since it is not used starting
3125    /// from Concordium Protocol Version 7.
3126    #[derive(Clone, Copy, PartialEq, ::prost::Oneof)]
3127    pub enum Change {
3128        #[prost(message, tag = "1")]
3129        Reduce(Reduce),
3130        #[prost(message, tag = "2")]
3131        Remove(Remove),
3132    }
3133}
3134/// Information about a validator pool in the current reward period.
3135#[derive(Clone, Copy, PartialEq, ::prost::Message)]
3136pub struct PoolCurrentPaydayInfo {
3137    /// The number of blocks baked in the current reward period.
3138    #[prost(uint64, tag = "1")]
3139    pub blocks_baked: u64,
3140    /// Whether the validator has contributed a finalization proof in the current reward period.
3141    #[prost(bool, tag = "2")]
3142    pub finalization_live: bool,
3143    /// The transaction fees accruing to the pool in the current reward period.
3144    #[prost(message, optional, tag = "3")]
3145    pub transaction_fees_earned: ::core::option::Option<Amount>,
3146    /// The effective stake of the validator in the current reward period.
3147    #[prost(message, optional, tag = "4")]
3148    pub effective_stake: ::core::option::Option<Amount>,
3149    /// The lottery power of the validator in the current reward period.
3150    #[prost(double, tag = "5")]
3151    pub lottery_power: f64,
3152    /// The effective equity capital of the validator for the current reward period.
3153    #[prost(message, optional, tag = "6")]
3154    pub baker_equity_capital: ::core::option::Option<Amount>,
3155    /// The effective delegated capital to the pool for the current reward period.
3156    #[prost(message, optional, tag = "7")]
3157    pub delegated_capital: ::core::option::Option<Amount>,
3158    /// The commission rates that apply for the current reward period.
3159    #[prost(message, optional, tag = "8")]
3160    pub commission_rates: ::core::option::Option<CommissionRates>,
3161    /// A flag indicating whether the pool owner is primed for suspension.
3162    /// Absent if the protocol version does not support validator suspension.
3163    #[prost(bool, optional, tag = "9")]
3164    pub is_primed_for_suspension: ::core::option::Option<bool>,
3165    /// The number of missed rounds in the current reward period.
3166    /// Absent if the protocol version does not support validator suspension.
3167    #[prost(uint64, optional, tag = "10")]
3168    pub missed_rounds: ::core::option::Option<u64>,
3169}
3170/// Type for the response of GetPoolInfo.
3171/// Contains information about a given pool at the end of a given block.
3172/// From protocol version 7, pool removal has immediate effect, however, the
3173/// pool may still be present for the current (and possibly next) reward period.
3174/// In this case, the `current_payday_info` field will be set, but the
3175/// `equity_capital`, `delegated_capital`, `delegated_capital_cap` and,
3176/// `pool_info` fields will all be absent. The `equity_pending_change` field
3177/// will also be absent, as stake changes are immediate.
3178#[derive(Clone, PartialEq, ::prost::Message)]
3179pub struct PoolInfoResponse {
3180    /// The validator id of the pool owner.
3181    #[prost(message, optional, tag = "1")]
3182    pub baker: ::core::option::Option<BakerId>,
3183    /// The account address of the pool owner.
3184    #[prost(message, optional, tag = "2")]
3185    pub address: ::core::option::Option<AccountAddress>,
3186    /// The equity capital provided by the pool owner. Absent if the pool is removed.
3187    #[prost(message, optional, tag = "3")]
3188    pub equity_capital: ::core::option::Option<Amount>,
3189    /// The capital delegated to the pool by other accounts. Absent if the pool is removed.
3190    #[prost(message, optional, tag = "4")]
3191    pub delegated_capital: ::core::option::Option<Amount>,
3192    /// The maximum amount that may be delegated to the pool, accounting for leverage and capital bounds.
3193    /// Absent if the pool is removed.
3194    ///
3195    /// leverage_bound_cap for pool p: Lₚ = λ * Cₚ - Cₚ = (λ - 1) * Cₚ
3196    /// capital_bound_cap for pool p: Bₚ = max (0, floor( (κ * (T - Dₚ) - Cₚ) / (1 - K) ))
3197    /// delegated_capital_cap for pool p = min (Lₚ, Bₚ)
3198    ///
3199    /// Where
3200    /// κ is the `CapitalBound`.
3201    /// λ is the `LeverageFactor`.
3202    /// T is the total staked capital on the whole chain (including passive
3203    /// delegation).
3204    /// Dₚ is the delegated capital of pool p.
3205    /// Cₚ is the equity capital (staked by the pool owner excluding delegated stake
3206    /// to the pool) of pool p.
3207    #[prost(message, optional, tag = "5")]
3208    pub delegated_capital_cap: ::core::option::Option<Amount>,
3209    /// The pool info associated with the pool: open status, metadata URL and commission rates.
3210    /// Absent if the pool is removed.
3211    #[prost(message, optional, tag = "6")]
3212    pub pool_info: ::core::option::Option<BakerPoolInfo>,
3213    /// Any pending change to the equity capital.
3214    /// This is not used from protocol version 7 onwards, as stake changes are immediate.
3215    #[prost(message, optional, tag = "7")]
3216    pub equity_pending_change: ::core::option::Option<PoolPendingChange>,
3217    /// Information of the pool in the current reward period.
3218    #[prost(message, optional, tag = "8")]
3219    pub current_payday_info: ::core::option::Option<PoolCurrentPaydayInfo>,
3220    /// Total capital staked across all pools, including passive delegation.
3221    #[prost(message, optional, tag = "9")]
3222    pub all_pool_total_capital: ::core::option::Option<Amount>,
3223    /// A flag indicating whether the pool owner is suspended.
3224    /// Absent if the protocol version does not support validator suspension (meaning prior protocol version 8) or the pool is removed.
3225    #[prost(bool, optional, tag = "10")]
3226    pub is_suspended: ::core::option::Option<bool>,
3227}
3228/// Type for the response of GetPassiveDelegationInfo.
3229/// Contains information about passive delegators at the end of a given block.
3230#[derive(Clone, Copy, PartialEq, ::prost::Message)]
3231pub struct PassiveDelegationInfo {
3232    /// The total capital delegated passively.
3233    #[prost(message, optional, tag = "1")]
3234    pub delegated_capital: ::core::option::Option<Amount>,
3235    /// The passive delegation commission rates.
3236    #[prost(message, optional, tag = "2")]
3237    pub commission_rates: ::core::option::Option<CommissionRates>,
3238    /// The transaction fees accruing to the passive delegators in the current reward period.
3239    #[prost(message, optional, tag = "3")]
3240    pub current_payday_transaction_fees_earned: ::core::option::Option<Amount>,
3241    /// The effective delegated capital of passive delegators for the current reward period.
3242    #[prost(message, optional, tag = "4")]
3243    pub current_payday_delegated_capital: ::core::option::Option<Amount>,
3244    /// Total capital staked across all pools, including passive delegation.
3245    #[prost(message, optional, tag = "5")]
3246    pub all_pool_total_capital: ::core::option::Option<Amount>,
3247}
3248/// Request for GetBlocksAtHeight.
3249#[derive(Clone, Copy, PartialEq, ::prost::Message)]
3250pub struct BlocksAtHeightRequest {
3251    /// This field might be extended in future versions of the API.
3252    #[prost(oneof = "blocks_at_height_request::BlocksAtHeight", tags = "1, 2")]
3253    pub blocks_at_height: ::core::option::Option<
3254        blocks_at_height_request::BlocksAtHeight,
3255    >,
3256}
3257/// Nested message and enum types in `BlocksAtHeightRequest`.
3258pub mod blocks_at_height_request {
3259    /// Request using an absolute block height.
3260    #[derive(Clone, Copy, PartialEq, ::prost::Message)]
3261    pub struct Absolute {
3262        /// The absolute block height.
3263        #[prost(message, optional, tag = "1")]
3264        pub height: ::core::option::Option<super::AbsoluteBlockHeight>,
3265    }
3266    /// Request using a relative block height.
3267    #[derive(Clone, Copy, PartialEq, ::prost::Message)]
3268    pub struct Relative {
3269        /// Genesis index to start from.
3270        #[prost(message, optional, tag = "1")]
3271        pub genesis_index: ::core::option::Option<super::GenesisIndex>,
3272        /// Height starting from the genesis block at the genesis index.
3273        #[prost(message, optional, tag = "2")]
3274        pub height: ::core::option::Option<super::BlockHeight>,
3275        /// Whether to return results only from the specified genesis index (`true`),
3276        /// or allow results from more recent genesis indices as well (`false`).
3277        #[prost(bool, tag = "3")]
3278        pub restrict: bool,
3279    }
3280    /// This field might be extended in future versions of the API.
3281    #[derive(Clone, Copy, PartialEq, ::prost::Oneof)]
3282    pub enum BlocksAtHeight {
3283        #[prost(message, tag = "1")]
3284        Absolute(Absolute),
3285        #[prost(message, tag = "2")]
3286        Relative(Relative),
3287    }
3288}
3289/// Response for GetBlocksAtHeight.
3290#[derive(Clone, PartialEq, ::prost::Message)]
3291pub struct BlocksAtHeightResponse {
3292    /// Live blocks at the given height.
3293    #[prost(message, repeated, tag = "1")]
3294    pub blocks: ::prost::alloc::vec::Vec<BlockHash>,
3295}
3296/// Type for the response of GetTokenomicsInfo.
3297/// Contains information related to tokenomics at the end of a given block.
3298#[derive(Clone, Copy, PartialEq, ::prost::Message)]
3299pub struct TokenomicsInfo {
3300    /// This field will not be extended in future versions of the API, instead new data versions will
3301    /// use optional fields in `TokenomicsInfo.V1`.
3302    #[prost(oneof = "tokenomics_info::Tokenomics", tags = "1, 2")]
3303    pub tokenomics: ::core::option::Option<tokenomics_info::Tokenomics>,
3304}
3305/// Nested message and enum types in `TokenomicsInfo`.
3306pub mod tokenomics_info {
3307    /// Version 0 tokenomics.
3308    #[derive(Clone, Copy, PartialEq, ::prost::Message)]
3309    pub struct V0 {
3310        /// The total CCD in existence.
3311        #[prost(message, optional, tag = "1")]
3312        pub total_amount: ::core::option::Option<super::Amount>,
3313        /// The total CCD in encrypted balances.
3314        #[prost(message, optional, tag = "2")]
3315        pub total_encrypted_amount: ::core::option::Option<super::Amount>,
3316        /// The amount in the block production reward account.
3317        #[prost(message, optional, tag = "3")]
3318        pub baking_reward_account: ::core::option::Option<super::Amount>,
3319        /// The amount in the finalization reward account.
3320        #[prost(message, optional, tag = "4")]
3321        pub finalization_reward_account: ::core::option::Option<super::Amount>,
3322        /// The amount in the GAS account.
3323        #[prost(message, optional, tag = "5")]
3324        pub gas_account: ::core::option::Option<super::Amount>,
3325        /// The protocol version.
3326        #[prost(enumeration = "super::ProtocolVersion", tag = "6")]
3327        pub protocol_version: i32,
3328    }
3329    /// Version 1 tokenomics.
3330    #[derive(Clone, Copy, PartialEq, ::prost::Message)]
3331    pub struct V1 {
3332        /// The total CCD in existence.
3333        #[prost(message, optional, tag = "1")]
3334        pub total_amount: ::core::option::Option<super::Amount>,
3335        /// The total CCD in encrypted balances.
3336        #[prost(message, optional, tag = "2")]
3337        pub total_encrypted_amount: ::core::option::Option<super::Amount>,
3338        /// The amount in the block production reward account.
3339        #[prost(message, optional, tag = "3")]
3340        pub baking_reward_account: ::core::option::Option<super::Amount>,
3341        /// The amount in the finalization reward account.
3342        #[prost(message, optional, tag = "4")]
3343        pub finalization_reward_account: ::core::option::Option<super::Amount>,
3344        /// The amount in the GAS account.
3345        #[prost(message, optional, tag = "5")]
3346        pub gas_account: ::core::option::Option<super::Amount>,
3347        /// The transaction reward fraction accruing to the foundation (to be paid at next payday).
3348        #[prost(message, optional, tag = "6")]
3349        pub foundation_transaction_rewards: ::core::option::Option<super::Amount>,
3350        /// The time of the next payday.
3351        #[prost(message, optional, tag = "7")]
3352        pub next_payday_time: ::core::option::Option<super::Timestamp>,
3353        /// The rate at which CCD will be minted (as a proportion of the total supply) at the next payday.
3354        #[prost(message, optional, tag = "8")]
3355        pub next_payday_mint_rate: ::core::option::Option<super::MintRate>,
3356        /// The total capital put up as stake by validators and delegators.
3357        #[prost(message, optional, tag = "9")]
3358        pub total_staked_capital: ::core::option::Option<super::Amount>,
3359        /// The protocol version.
3360        #[prost(enumeration = "super::ProtocolVersion", tag = "10")]
3361        pub protocol_version: i32,
3362    }
3363    /// This field will not be extended in future versions of the API, instead new data versions will
3364    /// use optional fields in `TokenomicsInfo.V1`.
3365    #[derive(Clone, Copy, PartialEq, ::prost::Oneof)]
3366    pub enum Tokenomics {
3367        #[prost(message, tag = "1")]
3368        V0(V0),
3369        #[prost(message, tag = "2")]
3370        V1(V1),
3371    }
3372}
3373/// Request for InvokeInstance.
3374#[derive(Clone, PartialEq, ::prost::Message)]
3375pub struct InvokeInstanceRequest {
3376    /// Block to invoke the contract. The invocation will be at the end of the given block.
3377    #[prost(message, optional, tag = "1")]
3378    pub block_hash: ::core::option::Option<BlockHashInput>,
3379    /// Invoker of the contract. If this is not supplied then the contract will be
3380    /// invoked by an account with address 0, no credentials and sufficient amount
3381    /// of CCD to cover the transfer amount. If given, the relevant address (either
3382    /// account or contract) must exist in the blockstate.
3383    #[prost(message, optional, tag = "2")]
3384    pub invoker: ::core::option::Option<Address>,
3385    /// Address of the contract instance to invoke.
3386    #[prost(message, optional, tag = "3")]
3387    pub instance: ::core::option::Option<ContractAddress>,
3388    /// Amount to invoke the smart contract instance with.
3389    #[prost(message, optional, tag = "4")]
3390    pub amount: ::core::option::Option<Amount>,
3391    /// The entrypoint of the smart contract instance to invoke.
3392    #[prost(message, optional, tag = "5")]
3393    pub entrypoint: ::core::option::Option<ReceiveName>,
3394    /// The parameter bytes to include in the invocation of the entrypoint.
3395    #[prost(message, optional, tag = "6")]
3396    pub parameter: ::core::option::Option<Parameter>,
3397    /// And what amount of energy to allow for execution. This cannot exceed
3398    /// `100_000_000_000`, but in practice it should be much less. The maximum
3399    /// block energy is typically in the range of a few million.
3400    #[prost(message, optional, tag = "7")]
3401    pub energy: ::core::option::Option<Energy>,
3402}
3403/// Response type for InvokeInstance.
3404#[derive(Clone, PartialEq, ::prost::Message)]
3405pub struct InvokeInstanceResponse {
3406    /// This field might be extended in future versions of the API.
3407    #[prost(oneof = "invoke_instance_response::Result", tags = "1, 2")]
3408    pub result: ::core::option::Option<invoke_instance_response::Result>,
3409}
3410/// Nested message and enum types in `InvokeInstanceResponse`.
3411pub mod invoke_instance_response {
3412    /// Contract execution failed.
3413    #[derive(Clone, PartialEq, ::prost::Message)]
3414    pub struct Failure {
3415        /// If invoking a V0 contract this is not provided, otherwise it is
3416        /// potentially return value produced by the call unless the call failed with
3417        /// out of energy or runtime error. If the V1 contract terminated with a
3418        /// logic error then the return value is present.
3419        #[prost(bytes = "vec", optional, tag = "1")]
3420        pub return_value: ::core::option::Option<::prost::alloc::vec::Vec<u8>>,
3421        /// Energy used by the execution.
3422        #[prost(message, optional, tag = "2")]
3423        pub used_energy: ::core::option::Option<super::Energy>,
3424        /// Contract execution failed for the given reason.
3425        #[prost(message, optional, tag = "3")]
3426        pub reason: ::core::option::Option<super::RejectReason>,
3427    }
3428    /// Contract execution succeeded.
3429    #[derive(Clone, PartialEq, ::prost::Message)]
3430    pub struct Success {
3431        /// If invoking a V0 contract this is absent. Otherwise it is the return
3432        /// value produced by the contract.
3433        #[prost(bytes = "vec", optional, tag = "1")]
3434        pub return_value: ::core::option::Option<::prost::alloc::vec::Vec<u8>>,
3435        /// Energy used by the execution.
3436        #[prost(message, optional, tag = "2")]
3437        pub used_energy: ::core::option::Option<super::Energy>,
3438        /// Effects produced by contract execution.
3439        #[prost(message, repeated, tag = "3")]
3440        pub effects: ::prost::alloc::vec::Vec<super::ContractTraceElement>,
3441    }
3442    /// This field might be extended in future versions of the API.
3443    #[derive(Clone, PartialEq, ::prost::Oneof)]
3444    pub enum Result {
3445        #[prost(message, tag = "1")]
3446        Success(Success),
3447        #[prost(message, tag = "2")]
3448        Failure(Failure),
3449    }
3450}
3451/// Request for GetPoolDelegators and GetPoolDelegatorsRewardPeriod.
3452#[derive(Clone, PartialEq, ::prost::Message)]
3453pub struct GetPoolDelegatorsRequest {
3454    /// Block in which to query the delegators.
3455    #[prost(message, optional, tag = "1")]
3456    pub block_hash: ::core::option::Option<BlockHashInput>,
3457    /// The validator id of the pool owner.
3458    #[prost(message, optional, tag = "2")]
3459    pub baker: ::core::option::Option<BakerId>,
3460}
3461/// Stream item for GetPoolDelegators and GetPassiveDelegators.
3462#[derive(Clone, PartialEq, ::prost::Message)]
3463pub struct DelegatorInfo {
3464    /// The delegator account address.
3465    #[prost(message, optional, tag = "1")]
3466    pub account: ::core::option::Option<AccountAddress>,
3467    /// The amount of stake currently staked to the pool.
3468    #[prost(message, optional, tag = "2")]
3469    pub stake: ::core::option::Option<Amount>,
3470    /// Pending change to the current stake of the delegator.
3471    #[prost(message, optional, tag = "3")]
3472    pub pending_change: ::core::option::Option<StakePendingChange>,
3473}
3474/// Stream item for GetPoolDelegatorsRewardPeriod and GetPassiveDelegatorsRewardPeriod.
3475#[derive(Clone, PartialEq, ::prost::Message)]
3476pub struct DelegatorRewardPeriodInfo {
3477    /// The delegator account address.
3478    #[prost(message, optional, tag = "1")]
3479    pub account: ::core::option::Option<AccountAddress>,
3480    /// The amount of stake currently staked to the pool.
3481    #[prost(message, optional, tag = "2")]
3482    pub stake: ::core::option::Option<Amount>,
3483}
3484/// Response type for GetBranches.
3485#[derive(Clone, PartialEq, ::prost::Message)]
3486pub struct Branch {
3487    /// The hash of the block.
3488    #[prost(message, optional, tag = "1")]
3489    pub block_hash: ::core::option::Option<BlockHash>,
3490    /// Further blocks branching of this block.
3491    #[prost(message, repeated, tag = "2")]
3492    pub children: ::prost::alloc::vec::Vec<Branch>,
3493}
3494/// The leadership election nonce is an unpredictable value updated once an
3495/// epoch to make sure that validators cannot predict too far in the future when
3496/// they will win the right to bake blocks.
3497#[derive(Clone, PartialEq, ::prost::Message)]
3498pub struct LeadershipElectionNonce {
3499    #[prost(bytes = "vec", tag = "1")]
3500    pub value: ::prost::alloc::vec::Vec<u8>,
3501}
3502/// Response type for GetElectionInfo.
3503/// Contains information related to validator election for a perticular block.
3504/// The `ElectionInfo` will be the same for all blocks in the same epoch.
3505/// Moreover, from protocol version 4, it is the same for all blocks in the same payday.
3506#[derive(Clone, PartialEq, ::prost::Message)]
3507pub struct ElectionInfo {
3508    /// Block production lottery election difficulty. Present only in protocol versions 1-5.
3509    #[prost(message, optional, tag = "1")]
3510    pub election_difficulty: ::core::option::Option<ElectionDifficulty>,
3511    /// Current leadership election nonce for the lottery.
3512    #[prost(message, optional, tag = "2")]
3513    pub election_nonce: ::core::option::Option<LeadershipElectionNonce>,
3514    /// List of the currently eligible validators.
3515    #[prost(message, repeated, tag = "3")]
3516    pub baker_election_info: ::prost::alloc::vec::Vec<election_info::Baker>,
3517}
3518/// Nested message and enum types in `ElectionInfo`.
3519pub mod election_info {
3520    #[derive(Clone, PartialEq, ::prost::Message)]
3521    pub struct Baker {
3522        /// The ID of the validator.
3523        #[prost(message, optional, tag = "1")]
3524        pub baker: ::core::option::Option<super::BakerId>,
3525        /// The account address of the validator.
3526        #[prost(message, optional, tag = "2")]
3527        pub account: ::core::option::Option<super::AccountAddress>,
3528        /// The lottery power of the validator, rounded to the nearest representable "double".
3529        #[prost(double, tag = "3")]
3530        pub lottery_power: f64,
3531    }
3532}
3533/// A protocol generated event that is not directly caused by a transaction. This
3534/// includes minting new CCD, rewarding different validators and delegators, etc.
3535#[derive(Clone, PartialEq, ::prost::Message)]
3536pub struct BlockSpecialEvent {
3537    /// This field might be extended in future versions of the API.
3538    #[prost(
3539        oneof = "block_special_event::Event",
3540        tags = "1, 2, 3, 4, 5, 6, 7, 8, 9, 10"
3541    )]
3542    pub event: ::core::option::Option<block_special_event::Event>,
3543}
3544/// Nested message and enum types in `BlockSpecialEvent`.
3545pub mod block_special_event {
3546    /// A representation of a mapping from an account address to an amount.
3547    #[derive(Clone, PartialEq, ::prost::Message)]
3548    pub struct AccountAmounts {
3549        #[prost(message, repeated, tag = "1")]
3550        pub entries: ::prost::alloc::vec::Vec<account_amounts::Entry>,
3551    }
3552    /// Nested message and enum types in `AccountAmounts`.
3553    pub mod account_amounts {
3554        /// The entry for the map.
3555        #[derive(Clone, PartialEq, ::prost::Message)]
3556        pub struct Entry {
3557            /// The key type
3558            #[prost(message, optional, tag = "1")]
3559            pub account: ::core::option::Option<super::super::AccountAddress>,
3560            /// The value type
3561            #[prost(message, optional, tag = "2")]
3562            pub amount: ::core::option::Option<super::super::Amount>,
3563        }
3564    }
3565    /// Rewards issued to each validator at the end of an epoch for producing blocks in the epoch,
3566    /// in proportion to the number of blocks they contributed. This only occurs in protocol versions
3567    /// 1 to 3. From protocol version 4, it is replaced by `PaydayPoolReward` and `PaydayAccountReward` messages.
3568    #[derive(Clone, PartialEq, ::prost::Message)]
3569    pub struct BakingRewards {
3570        /// The amount awarded to each validator.
3571        #[prost(message, optional, tag = "1")]
3572        pub baker_rewards: ::core::option::Option<AccountAmounts>,
3573        /// The remaining balance of the validator reward account.
3574        #[prost(message, optional, tag = "2")]
3575        pub remainder: ::core::option::Option<super::Amount>,
3576    }
3577    /// Minting of new CCDs.
3578    /// Starting from protocol version 4, this event occurs only in each payday block.
3579    /// Before protocol version 4, this event occured every block (slot).
3580    #[derive(Clone, PartialEq, ::prost::Message)]
3581    pub struct Mint {
3582        /// The amount allocated to the banking reward account.
3583        #[prost(message, optional, tag = "1")]
3584        pub mint_baking_reward: ::core::option::Option<super::Amount>,
3585        /// The amount allocated to the finalization reward account.
3586        #[prost(message, optional, tag = "2")]
3587        pub mint_finalization_reward: ::core::option::Option<super::Amount>,
3588        /// The amount allocated as the platform development charge.
3589        #[prost(message, optional, tag = "3")]
3590        pub mint_platform_development_charge: ::core::option::Option<super::Amount>,
3591        /// The account to which the platform development charge is paid.
3592        #[prost(message, optional, tag = "4")]
3593        pub foundation_account: ::core::option::Option<super::AccountAddress>,
3594    }
3595    /// Payment to each finalizer on inclusion of a finalization record in a block.
3596    #[derive(Clone, PartialEq, ::prost::Message)]
3597    pub struct FinalizationRewards {
3598        /// The amount awarded to each finalizer.
3599        #[prost(message, optional, tag = "1")]
3600        pub finalization_rewards: ::core::option::Option<AccountAmounts>,
3601        /// The remaining balance of the finalization reward account.
3602        #[prost(message, optional, tag = "2")]
3603        pub remainder: ::core::option::Option<super::Amount>,
3604    }
3605    /// Disbursement of fees from a block between the GAS account,
3606    /// the validator, and the foundation. It should always be that:
3607    ///
3608    /// ```transaction_fees + old_gas_account = new_gas_account + baker_reward + foundation_charge```
3609    #[derive(Clone, PartialEq, ::prost::Message)]
3610    pub struct BlockReward {
3611        /// The total fees paid for transactions in the block.
3612        #[prost(message, optional, tag = "1")]
3613        pub transaction_fees: ::core::option::Option<super::Amount>,
3614        /// The old balance of the GAS account.
3615        #[prost(message, optional, tag = "2")]
3616        pub old_gas_account: ::core::option::Option<super::Amount>,
3617        /// The new balance of the GAS account.
3618        #[prost(message, optional, tag = "3")]
3619        pub new_gas_account: ::core::option::Option<super::Amount>,
3620        /// The amount awarded to the validator.
3621        #[prost(message, optional, tag = "4")]
3622        pub baker_reward: ::core::option::Option<super::Amount>,
3623        /// The amount awarded to the foundation.
3624        #[prost(message, optional, tag = "5")]
3625        pub foundation_charge: ::core::option::Option<super::Amount>,
3626        /// The validator of the block, who receives the award.
3627        #[prost(message, optional, tag = "6")]
3628        pub baker: ::core::option::Option<super::AccountAddress>,
3629        /// The foundation account.
3630        #[prost(message, optional, tag = "7")]
3631        pub foundation_account: ::core::option::Option<super::AccountAddress>,
3632    }
3633    /// Foundation tax paid at a payday block starting from protocol version 4.
3634    #[derive(Clone, PartialEq, ::prost::Message)]
3635    pub struct PaydayFoundationReward {
3636        /// The account that got rewarded.
3637        #[prost(message, optional, tag = "1")]
3638        pub foundation_account: ::core::option::Option<super::AccountAddress>,
3639        /// The transaction fee reward at payday to the account.
3640        #[prost(message, optional, tag = "2")]
3641        pub development_charge: ::core::option::Option<super::Amount>,
3642    }
3643    /// Reward payment to the given account at a payday block starting from protocol version 4.
3644    /// When listed in a block summary, the delegated pool of the account is
3645    /// given by the last `PaydayPoolReward` outcome included before this outcome.
3646    ///
3647    /// For example:
3648    /// PaydayPoolReward to pool 1
3649    /// PaydayAccountReward to account 5
3650    /// PaydayAccountReward to account 6
3651    /// PaydayAccountReward to account 1 (is the payout to the validator itself)
3652    /// PaydayPoolReward to `None`
3653    /// PaydayAccountReward to account 10
3654    /// PaydayAccountReward to account 3
3655    /// Means 5, 6 are receiving rewards from delegating to validator 1 and 10, 3 are receiving rewards from passive
3656    /// delegation.
3657    #[derive(Clone, PartialEq, ::prost::Message)]
3658    pub struct PaydayAccountReward {
3659        /// The account that got rewarded.
3660        #[prost(message, optional, tag = "1")]
3661        pub account: ::core::option::Option<super::AccountAddress>,
3662        /// The transaction fee reward at payday to the account.
3663        #[prost(message, optional, tag = "2")]
3664        pub transaction_fees: ::core::option::Option<super::Amount>,
3665        /// The block production reward at payday to the account.
3666        #[prost(message, optional, tag = "3")]
3667        pub baker_reward: ::core::option::Option<super::Amount>,
3668        /// The finalization reward at payday to the account.
3669        #[prost(message, optional, tag = "4")]
3670        pub finalization_reward: ::core::option::Option<super::Amount>,
3671    }
3672    /// Amounts accrued to accounts for each baked block.
3673    #[derive(Clone, Copy, PartialEq, ::prost::Message)]
3674    pub struct BlockAccrueReward {
3675        /// The total fees paid for transactions in the block.
3676        #[prost(message, optional, tag = "1")]
3677        pub transaction_fees: ::core::option::Option<super::Amount>,
3678        /// The old balance of the GAS account.
3679        #[prost(message, optional, tag = "2")]
3680        pub old_gas_account: ::core::option::Option<super::Amount>,
3681        /// The new balance of the GAS account.
3682        #[prost(message, optional, tag = "3")]
3683        pub new_gas_account: ::core::option::Option<super::Amount>,
3684        /// The amount awarded to the validator.
3685        #[prost(message, optional, tag = "4")]
3686        pub baker_reward: ::core::option::Option<super::Amount>,
3687        /// The amount awarded to the passive delegators.
3688        #[prost(message, optional, tag = "5")]
3689        pub passive_reward: ::core::option::Option<super::Amount>,
3690        /// The amount awarded to the foundation.
3691        #[prost(message, optional, tag = "6")]
3692        pub foundation_charge: ::core::option::Option<super::Amount>,
3693        /// The validator of the block, who will receive the award.
3694        #[prost(message, optional, tag = "7")]
3695        pub baker: ::core::option::Option<super::BakerId>,
3696    }
3697    /// Payment distributed to a pool or passive delegators at a payday block starting from protocol version 4.
3698    /// When listed in a block summary, the reward distribution to the delagtors of the given pool is
3699    /// given by the following `PaydayAccountReward` outcomes included after this outcome.
3700    ///
3701    /// For example:
3702    /// PaydayPoolReward to pool 1
3703    /// PaydayAccountReward to account 5
3704    /// PaydayAccountReward to account 6
3705    /// PaydayAccountReward to account 1 (is the payout to the validator itself)
3706    /// PaydayPoolReward to `None`
3707    /// PaydayAccountReward to account 10
3708    /// PaydayAccountReward to account 3
3709    /// Means 5, 6 are receiving rewards from delegating to validator 1 and 10, 3 are receiving rewards from passive
3710    /// delegation.
3711    #[derive(Clone, Copy, PartialEq, ::prost::Message)]
3712    pub struct PaydayPoolReward {
3713        /// The pool owner (passive delegators when not present).
3714        #[prost(message, optional, tag = "1")]
3715        pub pool_owner: ::core::option::Option<super::BakerId>,
3716        /// Accrued transaction fees for pool.
3717        #[prost(message, optional, tag = "2")]
3718        pub transaction_fees: ::core::option::Option<super::Amount>,
3719        /// Accrued block production rewards for pool.
3720        #[prost(message, optional, tag = "3")]
3721        pub baker_reward: ::core::option::Option<super::Amount>,
3722        /// Accrued finalization rewards for pool.
3723        #[prost(message, optional, tag = "4")]
3724        pub finalization_reward: ::core::option::Option<super::Amount>,
3725    }
3726    /// The id of a validator that got suspended due to too many missed rounds.
3727    /// The message can occur starting from protocol version 8.
3728    #[derive(Clone, PartialEq, ::prost::Message)]
3729    pub struct ValidatorSuspended {
3730        /// The id of the suspended validator.
3731        #[prost(message, optional, tag = "1")]
3732        pub baker_id: ::core::option::Option<super::BakerId>,
3733        /// The account of the suspended validator.
3734        #[prost(message, optional, tag = "2")]
3735        pub account: ::core::option::Option<super::AccountAddress>,
3736    }
3737    /// The id of a validator that is primed for suspension at the next snapshot
3738    /// epoch due to too many missed rounds.
3739    /// The message can occur starting from protocol version 8.
3740    #[derive(Clone, PartialEq, ::prost::Message)]
3741    pub struct ValidatorPrimedForSuspension {
3742        /// The id of the primed validator.
3743        #[prost(message, optional, tag = "1")]
3744        pub baker_id: ::core::option::Option<super::BakerId>,
3745        /// The account of the primed validator.
3746        #[prost(message, optional, tag = "2")]
3747        pub account: ::core::option::Option<super::AccountAddress>,
3748    }
3749    /// This field might be extended in future versions of the API.
3750    #[derive(Clone, PartialEq, ::prost::Oneof)]
3751    pub enum Event {
3752        /// Rewards issued to each validator at the end of an epoch for producing blocks in the epoch,
3753        /// in proportion to the number of blocks they contributed. This only occurs in protocol versions
3754        /// 1 to 3. From protocol version 4, it is replaced by `PaydayPoolReward` and `PaydayAccountReward` messages.
3755        #[prost(message, tag = "1")]
3756        BakingRewards(BakingRewards),
3757        /// Minting of new CCDs.
3758        /// Starting from protocol version 4, this event occurs in each payday block.
3759        /// Before protocol version 4, this event occured every block (slot).
3760        #[prost(message, tag = "2")]
3761        Mint(Mint),
3762        #[prost(message, tag = "3")]
3763        FinalizationRewards(FinalizationRewards),
3764        #[prost(message, tag = "4")]
3765        BlockReward(BlockReward),
3766        /// Foundation rewards paid out at a payday block starting from protocol version 4.
3767        #[prost(message, tag = "5")]
3768        PaydayFoundationReward(PaydayFoundationReward),
3769        /// Reward payment to the given account at a payday block (from passive deleagtion or delegation to a validator or being a validator) starting from protocol version 4.
3770        /// When listed in a block summary, the delegated pool of the account is
3771        /// given by the last `PaydayPoolReward` outcome included before this outcome.
3772        #[prost(message, tag = "6")]
3773        PaydayAccountReward(PaydayAccountReward),
3774        #[prost(message, tag = "7")]
3775        BlockAccrueReward(BlockAccrueReward),
3776        /// Payment distributed to a pool or passive delegators at a payday block starting from protocol version 4.
3777        /// When listed in a block summary, the reward distribution to the delagtors of the given pool is
3778        /// given by the following `PaydayAccountReward` outcomes included after this outcome.
3779        #[prost(message, tag = "8")]
3780        PaydayPoolReward(PaydayPoolReward),
3781        /// The protocol suspends validators due to inactivity.
3782        /// If the validator is suspended  by a transaction sent from the validator itself, the `BakerEvent::BakerSuspended`
3783        /// event is emitted instead of this event.
3784        /// The event can occur starting from protocol version 8.
3785        #[prost(message, tag = "9")]
3786        ValidatorSuspended(ValidatorSuspended),
3787        /// The protocol primes validators for suspension due to inactivity.
3788        /// The event can occur starting from protocol version 8.
3789        #[prost(message, tag = "10")]
3790        ValidatorPrimedForSuspension(ValidatorPrimedForSuspension),
3791    }
3792}
3793/// A pending update.
3794#[derive(Clone, PartialEq, ::prost::Message)]
3795pub struct PendingUpdate {
3796    /// The effective time of the update.
3797    #[prost(message, optional, tag = "1")]
3798    pub effective_time: ::core::option::Option<TransactionTime>,
3799    /// The effect of the update.
3800    ///
3801    /// This field might be extended in future versions of the API.
3802    #[prost(
3803        oneof = "pending_update::Effect",
3804        tags = "2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26"
3805    )]
3806    pub effect: ::core::option::Option<pending_update::Effect>,
3807}
3808/// Nested message and enum types in `PendingUpdate`.
3809pub mod pending_update {
3810    /// The effect of the update.
3811    ///
3812    /// This field might be extended in future versions of the API.
3813    #[derive(Clone, PartialEq, ::prost::Oneof)]
3814    pub enum Effect {
3815        /// Updates to the root keys.
3816        #[prost(message, tag = "2")]
3817        RootKeys(super::HigherLevelKeys),
3818        /// Updates to the level 1 keys.
3819        #[prost(message, tag = "3")]
3820        Level1Keys(super::HigherLevelKeys),
3821        /// Updates to the level 2 keys.
3822        #[prost(message, tag = "4")]
3823        Level2KeysCpv0(super::AuthorizationsV0),
3824        /// Updates to the level 2 keys.
3825        #[prost(message, tag = "5")]
3826        Level2KeysCpv1(super::AuthorizationsV1),
3827        /// Protocol updates.
3828        #[prost(message, tag = "6")]
3829        Protocol(super::ProtocolUpdate),
3830        /// Updates to the election difficulty parameter.
3831        #[prost(message, tag = "7")]
3832        ElectionDifficulty(super::ElectionDifficulty),
3833        /// Updates to the euro:energy exchange rate.
3834        #[prost(message, tag = "8")]
3835        EuroPerEnergy(super::ExchangeRate),
3836        /// Updates to the CCD:EUR exchange rate.
3837        #[prost(message, tag = "9")]
3838        MicroCcdPerEuro(super::ExchangeRate),
3839        /// Updates to the foundation account.
3840        #[prost(message, tag = "10")]
3841        FoundationAccount(super::AccountAddress),
3842        /// Updates to the mint distribution. Is only relevant prior to protocol version 4.
3843        #[prost(message, tag = "11")]
3844        MintDistributionCpv0(super::MintDistributionCpv0),
3845        /// The mint distribution was updated. Introduced in protocol version 4.
3846        #[prost(message, tag = "12")]
3847        MintDistributionCpv1(super::MintDistributionCpv1),
3848        /// Updates to the transaction fee distribution.
3849        #[prost(message, tag = "13")]
3850        TransactionFeeDistribution(super::TransactionFeeDistribution),
3851        /// Updates to the GAS rewards.
3852        #[prost(message, tag = "14")]
3853        GasRewards(super::GasRewards),
3854        /// Updates validator stake threshold. Is only relevant prior to protocol version 4.
3855        #[prost(message, tag = "15")]
3856        PoolParametersCpv0(super::BakerStakeThreshold),
3857        /// Updates pool parameters. Introduced in protocol version 4.
3858        #[prost(message, tag = "16")]
3859        PoolParametersCpv1(super::PoolParametersCpv1),
3860        /// Adds a new anonymity revoker.
3861        #[prost(message, tag = "17")]
3862        AddAnonymityRevoker(super::ArInfo),
3863        /// Adds a new identity provider.
3864        #[prost(message, tag = "18")]
3865        AddIdentityProvider(super::IpInfo),
3866        /// Updates to cooldown parameters for chain parameters version 1 introduced in protocol version 4.
3867        #[prost(message, tag = "19")]
3868        CooldownParameters(super::CooldownParametersCpv1),
3869        /// Updates to time parameters for chain parameters version 1 introduced in protocol version 4.
3870        #[prost(message, tag = "20")]
3871        TimeParameters(super::TimeParametersCpv1),
3872        /// Updates to the GAS rewards effective from protocol version 6 (chain parameters version 2).
3873        #[prost(message, tag = "21")]
3874        GasRewardsCpv2(super::GasRewardsCpv2),
3875        /// Updates to the consensus timeouts for chain parameters version 2.
3876        #[prost(message, tag = "22")]
3877        TimeoutParameters(super::TimeoutParameters),
3878        /// Updates to the the minimum time between blocks for chain parameters version 2.
3879        #[prost(message, tag = "23")]
3880        MinBlockTime(super::Duration),
3881        /// Updates to the block energy limit for chain parameters version 2.
3882        #[prost(message, tag = "24")]
3883        BlockEnergyLimit(super::Energy),
3884        /// Updates to the finalization committee for for chain parameters version 2.
3885        #[prost(message, tag = "25")]
3886        FinalizationCommitteeParameters(super::FinalizationCommitteeParameters),
3887        /// Updates to the validator score parameters for chain parameters version 3.
3888        #[prost(message, tag = "26")]
3889        ValidatorScoreParameters(super::ValidatorScoreParameters),
3890    }
3891}
3892/// The response for `GetNextUpdateSequenceNumbers`.
3893#[derive(Clone, Copy, PartialEq, ::prost::Message)]
3894pub struct NextUpdateSequenceNumbers {
3895    /// Updates to the root keys.
3896    #[prost(message, optional, tag = "1")]
3897    pub root_keys: ::core::option::Option<SequenceNumber>,
3898    /// Updates to the level 1 keys.
3899    #[prost(message, optional, tag = "2")]
3900    pub level1_keys: ::core::option::Option<SequenceNumber>,
3901    /// Updates to the level 2 keys.
3902    #[prost(message, optional, tag = "3")]
3903    pub level2_keys: ::core::option::Option<SequenceNumber>,
3904    /// Protocol updates.
3905    #[prost(message, optional, tag = "4")]
3906    pub protocol: ::core::option::Option<SequenceNumber>,
3907    /// Updates to the election difficulty parameter.
3908    #[prost(message, optional, tag = "5")]
3909    pub election_difficulty: ::core::option::Option<SequenceNumber>,
3910    /// Updates to the euro:energy exchange rate.
3911    #[prost(message, optional, tag = "6")]
3912    pub euro_per_energy: ::core::option::Option<SequenceNumber>,
3913    /// Updates to the CCD:EUR exchange rate.
3914    #[prost(message, optional, tag = "7")]
3915    pub micro_ccd_per_euro: ::core::option::Option<SequenceNumber>,
3916    /// Updates to the foundation account.
3917    #[prost(message, optional, tag = "8")]
3918    pub foundation_account: ::core::option::Option<SequenceNumber>,
3919    /// Updates to the mint distribution.
3920    #[prost(message, optional, tag = "9")]
3921    pub mint_distribution: ::core::option::Option<SequenceNumber>,
3922    /// Updates to the transaction fee distribution.
3923    #[prost(message, optional, tag = "10")]
3924    pub transaction_fee_distribution: ::core::option::Option<SequenceNumber>,
3925    /// Updates to the GAS rewards.
3926    #[prost(message, optional, tag = "11")]
3927    pub gas_rewards: ::core::option::Option<SequenceNumber>,
3928    /// Updates pool parameters.
3929    #[prost(message, optional, tag = "12")]
3930    pub pool_parameters: ::core::option::Option<SequenceNumber>,
3931    /// Adds a new anonymity revoker.
3932    #[prost(message, optional, tag = "13")]
3933    pub add_anonymity_revoker: ::core::option::Option<SequenceNumber>,
3934    /// Adds a new identity provider.
3935    #[prost(message, optional, tag = "14")]
3936    pub add_identity_provider: ::core::option::Option<SequenceNumber>,
3937    /// Updates to cooldown parameters for chain parameters version 1 introduced in protocol version 4.
3938    #[prost(message, optional, tag = "15")]
3939    pub cooldown_parameters: ::core::option::Option<SequenceNumber>,
3940    /// Updates to time parameters for chain parameters version 1 introduced in protocol version 4.
3941    #[prost(message, optional, tag = "16")]
3942    pub time_parameters: ::core::option::Option<SequenceNumber>,
3943    /// Updates to the timeout parameters
3944    #[prost(message, optional, tag = "17")]
3945    pub timeout_parameters: ::core::option::Option<SequenceNumber>,
3946    /// Updates to the the minimum time between blocks for chain parameters version 2.
3947    #[prost(message, optional, tag = "18")]
3948    pub min_block_time: ::core::option::Option<SequenceNumber>,
3949    /// Updates to the block energy limit for chain parameters version 2.
3950    #[prost(message, optional, tag = "19")]
3951    pub block_energy_limit: ::core::option::Option<SequenceNumber>,
3952    /// Updates to the finalization committee parameters
3953    #[prost(message, optional, tag = "20")]
3954    pub finalization_committee_parameters: ::core::option::Option<SequenceNumber>,
3955    /// Updates to the validator score parameters for chain parameters version 3.
3956    #[prost(message, optional, tag = "21")]
3957    pub validator_score_parameters: ::core::option::Option<SequenceNumber>,
3958    /// Updates to the protocol level tokens. Introduced in protocol version 9.
3959    #[prost(message, optional, tag = "22")]
3960    pub protocol_level_tokens: ::core::option::Option<SequenceNumber>,
3961}
3962/// A request to send a new block item to the chain.
3963/// An IP address
3964#[derive(Clone, PartialEq, ::prost::Message)]
3965pub struct IpAddress {
3966    #[prost(string, tag = "1")]
3967    pub value: ::prost::alloc::string::String,
3968}
3969/// A port
3970/// Valid port numbers are expected thus
3971/// the value is expected to be in the range (0..u16::MAX).
3972#[derive(Clone, Copy, PartialEq, ::prost::Message)]
3973pub struct Port {
3974    #[prost(uint32, tag = "1")]
3975    pub value: u32,
3976}
3977/// A socket address consisting of
3978/// an IP + port.
3979#[derive(Clone, PartialEq, ::prost::Message)]
3980pub struct IpSocketAddress {
3981    #[prost(message, optional, tag = "1")]
3982    pub ip: ::core::option::Option<IpAddress>,
3983    #[prost(message, optional, tag = "2")]
3984    pub port: ::core::option::Option<Port>,
3985}
3986/// A peer id
3987/// An identifier that the peer wants to be
3988/// be recoknized by.
3989/// The underlying value is simply a u64.
3990/// Note. There is no authenticity of the peer id and
3991/// as such it is only used for logging purposes.
3992#[derive(Clone, PartialEq, ::prost::Message)]
3993pub struct PeerId {
3994    #[prost(string, tag = "1")]
3995    pub value: ::prost::alloc::string::String,
3996}
3997/// A banned peer
3998#[derive(Clone, PartialEq, ::prost::Message)]
3999pub struct BannedPeer {
4000    /// The IP address of the banned peer.
4001    #[prost(message, optional, tag = "1")]
4002    pub ip_address: ::core::option::Option<IpAddress>,
4003}
4004/// The banned peers given by their IP addresses.
4005#[derive(Clone, PartialEq, ::prost::Message)]
4006pub struct BannedPeers {
4007    #[prost(message, repeated, tag = "1")]
4008    pub peers: ::prost::alloc::vec::Vec<BannedPeer>,
4009}
4010/// A peer to ban specified by its IP.
4011/// Note. This will ban all peers located behind the
4012/// specified IP even though they are using different ports.
4013#[derive(Clone, PartialEq, ::prost::Message)]
4014pub struct PeerToBan {
4015    #[prost(message, optional, tag = "1")]
4016    pub ip_address: ::core::option::Option<IpAddress>,
4017}
4018/// Request to enable dumping of network packages.
4019#[derive(Clone, PartialEq, ::prost::Message)]
4020pub struct DumpRequest {
4021    /// Which file to dump the packages into.
4022    /// Requires a valid path.
4023    #[prost(string, tag = "1")]
4024    pub file: ::prost::alloc::string::String,
4025    /// Whether the node should dump raw packages.
4026    #[prost(bool, tag = "2")]
4027    pub raw: bool,
4028}
4029/// Peers and their associated network related statistics
4030#[derive(Clone, PartialEq, ::prost::Message)]
4031pub struct PeersInfo {
4032    #[prost(message, repeated, tag = "1")]
4033    pub peers: ::prost::alloc::vec::Vec<peers_info::Peer>,
4034}
4035/// Nested message and enum types in `PeersInfo`.
4036pub mod peers_info {
4037    /// A peer that the node is connected to.
4038    #[derive(Clone, PartialEq, ::prost::Message)]
4039    pub struct Peer {
4040        /// The identifier of the peer that it
4041        /// wishes to be identified by.
4042        #[prost(message, optional, tag = "1")]
4043        pub peer_id: ::core::option::Option<super::PeerId>,
4044        /// The port of the peer.
4045        #[prost(message, optional, tag = "2")]
4046        pub socket_address: ::core::option::Option<super::IpSocketAddress>,
4047        /// Network related statistics for the peer.
4048        #[prost(message, optional, tag = "3")]
4049        pub network_stats: ::core::option::Option<peer::NetworkStats>,
4050        /// Consensus related information of the peer.
4051        ///
4052        /// This field might be extended in future versions of the API.
4053        #[prost(oneof = "peer::ConsensusInfo", tags = "4, 5")]
4054        pub consensus_info: ::core::option::Option<peer::ConsensusInfo>,
4055    }
4056    /// Nested message and enum types in `Peer`.
4057    pub mod peer {
4058        /// Network statistics for the peer
4059        #[derive(Clone, Copy, PartialEq, ::prost::Message)]
4060        pub struct NetworkStats {
4061            /// The number of messages sent to the peer.
4062            /// Packets are blocks, transactions, catchup messages, finalization records
4063            /// and network messages such as pings and peer requests.
4064            #[prost(uint64, tag = "2")]
4065            pub packets_sent: u64,
4066            /// The number of messages received from the peer.
4067            /// Packets are blocks, transactions, catchup messages, finalization records
4068            /// and network messages such as pings and peer requests.
4069            #[prost(uint64, tag = "3")]
4070            pub packets_received: u64,
4071            /// The connection latency (i.e., ping time) in milliseconds.
4072            #[prost(uint64, tag = "4")]
4073            pub latency: u64,
4074        }
4075        /// This type might be extended in future versions of the API.
4076        #[derive(
4077            Clone,
4078            Copy,
4079            Debug,
4080            PartialEq,
4081            Eq,
4082            Hash,
4083            PartialOrd,
4084            Ord,
4085            ::prost::Enumeration
4086        )]
4087        #[repr(i32)]
4088        pub enum CatchupStatus {
4089            /// The peer does not have any data unknown to us. If we receive a message from the
4090            /// peer that refers to unknown data (e.g., an unknown block) the peer is marked as pending.
4091            Uptodate = 0,
4092            /// The peer might have some data unknown to us. A peer can be in this state either because
4093            /// it sent a message that refers to data unknown to us, or before we have established a baseline with it.
4094            /// The latter happens during node startup, as well as upon protocol updates until the initial catchup handshake
4095            /// completes.
4096            Pending = 1,
4097            /// The node is currently catching up by requesting blocks from this peer.
4098            /// There will be at most one peer with this status at a time.
4099            /// Once the peer has responded to the request, its status will be changed to:
4100            /// - 'UPTODATE' if the peer has no more data that is not known to us
4101            /// - 'PENDING' if the node has more data that is unknown to us.
4102            Catchingup = 2,
4103        }
4104        impl CatchupStatus {
4105            /// String value of the enum field names used in the ProtoBuf definition.
4106            ///
4107            /// The values are not transformed in any way and thus are considered stable
4108            /// (if the ProtoBuf definition does not change) and safe for programmatic use.
4109            pub fn as_str_name(&self) -> &'static str {
4110                match self {
4111                    Self::Uptodate => "UPTODATE",
4112                    Self::Pending => "PENDING",
4113                    Self::Catchingup => "CATCHINGUP",
4114                }
4115            }
4116            /// Creates an enum from field names used in the ProtoBuf definition.
4117            pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
4118                match value {
4119                    "UPTODATE" => Some(Self::Uptodate),
4120                    "PENDING" => Some(Self::Pending),
4121                    "CATCHINGUP" => Some(Self::Catchingup),
4122                    _ => None,
4123                }
4124            }
4125        }
4126        /// Consensus related information of the peer.
4127        ///
4128        /// This field might be extended in future versions of the API.
4129        #[derive(Clone, Copy, PartialEq, ::prost::Oneof)]
4130        pub enum ConsensusInfo {
4131            /// The peer is of type `Bootstrapper` is not participating in consensus
4132            /// and thus has no catchup status.
4133            #[prost(message, tag = "4")]
4134            Bootstrapper(super::super::Empty),
4135            /// The peer is a regular node and have
4136            /// an associated catchup status.
4137            #[prost(enumeration = "CatchupStatus", tag = "5")]
4138            NodeCatchupStatus(i32),
4139        }
4140    }
4141}
4142/// Node info response
4143/// Contains various information of the
4144/// enquired node.
4145#[derive(Clone, PartialEq, ::prost::Message)]
4146pub struct NodeInfo {
4147    /// The version of the node.
4148    #[prost(string, tag = "1")]
4149    pub peer_version: ::prost::alloc::string::String,
4150    /// local time of the node.
4151    #[prost(message, optional, tag = "3")]
4152    pub local_time: ::core::option::Option<Timestamp>,
4153    /// Number of milliseconds that the node
4154    /// has been alive.
4155    #[prost(message, optional, tag = "4")]
4156    pub peer_uptime: ::core::option::Option<Duration>,
4157    /// Information related to the p2p protocol.
4158    #[prost(message, optional, tag = "5")]
4159    pub network_info: ::core::option::Option<node_info::NetworkInfo>,
4160    /// Details of the node.
4161    ///
4162    /// This field might be extended in future versions of the API.
4163    #[prost(oneof = "node_info::Details", tags = "6, 7")]
4164    pub details: ::core::option::Option<node_info::Details>,
4165}
4166/// Nested message and enum types in `NodeInfo`.
4167pub mod node_info {
4168    /// Network related information of the node.
4169    #[derive(Clone, PartialEq, ::prost::Message)]
4170    pub struct NetworkInfo {
4171        /// The node id.
4172        #[prost(message, optional, tag = "1")]
4173        pub node_id: ::core::option::Option<super::PeerId>,
4174        /// Total number of packets sent by the node.
4175        #[prost(uint64, tag = "2")]
4176        pub peer_total_sent: u64,
4177        /// Total number of packets received by the node.
4178        #[prost(uint64, tag = "3")]
4179        pub peer_total_received: u64,
4180        /// Average outbound throughput in bytes per second.
4181        #[prost(uint64, tag = "4")]
4182        pub avg_bps_in: u64,
4183        /// Average inbound throughput in bytes per second.
4184        #[prost(uint64, tag = "5")]
4185        pub avg_bps_out: u64,
4186    }
4187    /// Consensus info for a node configured with validator keys.
4188    #[derive(Clone, Copy, PartialEq, ::prost::Message)]
4189    pub struct BakerConsensusInfo {
4190        #[prost(message, optional, tag = "1")]
4191        pub baker_id: ::core::option::Option<super::BakerId>,
4192        /// Status of the validator configured node.
4193        ///
4194        /// This field might be extended in future versions of the API.
4195        #[prost(oneof = "baker_consensus_info::Status", tags = "2, 3, 4")]
4196        pub status: ::core::option::Option<baker_consensus_info::Status>,
4197    }
4198    /// Nested message and enum types in `BakerConsensusInfo`.
4199    pub mod baker_consensus_info {
4200        /// Tagging message type for a node that
4201        /// is configured with validator keys and active in
4202        /// the current validation committee
4203        #[derive(Clone, Copy, PartialEq, ::prost::Message)]
4204        pub struct ActiveBakerCommitteeInfo {}
4205        /// Tagging message type for a node that
4206        /// is configured with validator keys and active in
4207        /// the current finalizer committee (and also validation committee).
4208        #[derive(Clone, Copy, PartialEq, ::prost::Message)]
4209        pub struct ActiveFinalizerCommitteeInfo {}
4210        /// The committee information of a node configured with
4211        /// validator keys but somehow the node is _not_ part of the
4212        /// current validation committee.
4213        ///
4214        /// This type might be extended in future versions of the API.
4215        #[derive(
4216            Clone,
4217            Copy,
4218            Debug,
4219            PartialEq,
4220            Eq,
4221            Hash,
4222            PartialOrd,
4223            Ord,
4224            ::prost::Enumeration
4225        )]
4226        #[repr(i32)]
4227        pub enum PassiveCommitteeInfo {
4228            /// The node is started with validator keys however it is currently not in the validation committee.
4229            /// The node is __not__ baking.
4230            NotInCommittee = 0,
4231            /// The account is registered as a validator but not in the current `Epoch`.
4232            /// The node is __not__ baking.
4233            AddedButNotActiveInCommittee = 1,
4234            /// The node has configured invalid validator keys i.e., the configured
4235            /// validator keys do not match the current keys on the validator account.
4236            /// The node is __not__ baking.
4237            AddedButWrongKeys = 2,
4238        }
4239        impl PassiveCommitteeInfo {
4240            /// String value of the enum field names used in the ProtoBuf definition.
4241            ///
4242            /// The values are not transformed in any way and thus are considered stable
4243            /// (if the ProtoBuf definition does not change) and safe for programmatic use.
4244            pub fn as_str_name(&self) -> &'static str {
4245                match self {
4246                    Self::NotInCommittee => "NOT_IN_COMMITTEE",
4247                    Self::AddedButNotActiveInCommittee => {
4248                        "ADDED_BUT_NOT_ACTIVE_IN_COMMITTEE"
4249                    }
4250                    Self::AddedButWrongKeys => "ADDED_BUT_WRONG_KEYS",
4251                }
4252            }
4253            /// Creates an enum from field names used in the ProtoBuf definition.
4254            pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
4255                match value {
4256                    "NOT_IN_COMMITTEE" => Some(Self::NotInCommittee),
4257                    "ADDED_BUT_NOT_ACTIVE_IN_COMMITTEE" => {
4258                        Some(Self::AddedButNotActiveInCommittee)
4259                    }
4260                    "ADDED_BUT_WRONG_KEYS" => Some(Self::AddedButWrongKeys),
4261                    _ => None,
4262                }
4263            }
4264        }
4265        /// Status of the validator configured node.
4266        ///
4267        /// This field might be extended in future versions of the API.
4268        #[derive(Clone, Copy, PartialEq, ::prost::Oneof)]
4269        pub enum Status {
4270            /// The node is currently not baking.
4271            #[prost(enumeration = "PassiveCommitteeInfo", tag = "2")]
4272            PassiveCommitteeInfo(i32),
4273            /// The node is configured with validator keys and
4274            /// is member of the validation committee.
4275            #[prost(message, tag = "3")]
4276            ActiveBakerCommitteeInfo(ActiveBakerCommitteeInfo),
4277            /// The node is configured with validator keys and
4278            /// is member of the validator and finalization committees.
4279            #[prost(message, tag = "4")]
4280            ActiveFinalizerCommitteeInfo(ActiveFinalizerCommitteeInfo),
4281        }
4282    }
4283    /// The node is a regular node.
4284    #[derive(Clone, Copy, PartialEq, ::prost::Message)]
4285    pub struct Node {
4286        /// This field might be extended in future versions of the API.
4287        #[prost(oneof = "node::ConsensusStatus", tags = "1, 2, 3")]
4288        pub consensus_status: ::core::option::Option<node::ConsensusStatus>,
4289    }
4290    /// Nested message and enum types in `Node`.
4291    pub mod node {
4292        /// This field might be extended in future versions of the API.
4293        #[derive(Clone, Copy, PartialEq, ::prost::Oneof)]
4294        pub enum ConsensusStatus {
4295            /// The node is not running consensus.
4296            /// This is the case only when the node is
4297            /// not supporting the protocol on the chain.
4298            /// The node does not process blocks.
4299            #[prost(message, tag = "1")]
4300            NotRunning(super::super::Empty),
4301            /// Consensus info for a node that is
4302            /// not configured with validator keys.
4303            /// The node is only processing blocks and
4304            /// relaying blocks and transactions and responding to
4305            /// catchup messages.
4306            #[prost(message, tag = "2")]
4307            Passive(super::super::Empty),
4308            /// The node is configured with validator credentials and consensus is running.
4309            #[prost(message, tag = "3")]
4310            Active(super::BakerConsensusInfo),
4311        }
4312    }
4313    /// Details of the node.
4314    ///
4315    /// This field might be extended in future versions of the API.
4316    #[derive(Clone, Copy, PartialEq, ::prost::Oneof)]
4317    pub enum Details {
4318        /// The node is a bootstrapper and is not running consensus.
4319        #[prost(message, tag = "6")]
4320        Bootstrapper(super::Empty),
4321        /// The node is a regular node and runs the consensus
4322        /// protocol.
4323        #[prost(message, tag = "7")]
4324        Node(Node),
4325    }
4326}
4327#[derive(Clone, PartialEq, ::prost::Message)]
4328pub struct SendBlockItemRequest {
4329    /// This field might be extended in future versions of the API.
4330    #[prost(oneof = "send_block_item_request::BlockItem", tags = "1, 2, 3, 4, 5")]
4331    pub block_item: ::core::option::Option<send_block_item_request::BlockItem>,
4332}
4333/// Nested message and enum types in `SendBlockItemRequest`.
4334pub mod send_block_item_request {
4335    /// This field might be extended in future versions of the API.
4336    #[derive(Clone, PartialEq, ::prost::Oneof)]
4337    pub enum BlockItem {
4338        /// Account transactions are messages which are signed and paid for by an account.
4339        #[prost(message, tag = "1")]
4340        AccountTransaction(super::AccountTransaction),
4341        /// Credential deployments create new accounts. They are not paid for
4342        /// directly by the sender. Instead, validators are rewarded by the protocol for
4343        /// including them.
4344        #[prost(message, tag = "2")]
4345        CredentialDeployment(super::CredentialDeployment),
4346        /// Update instructions are messages which can update the chain parameters. Including which keys are allowed
4347        /// to make future update instructions.
4348        #[prost(message, tag = "3")]
4349        UpdateInstruction(super::UpdateInstruction),
4350        /// Account transactions v1 are messages which are signed and paid for by
4351        /// either an account or a sponsor.
4352        #[prost(message, tag = "4")]
4353        AccountTransactionV1(super::AccountTransactionV1),
4354        /// A block item which has already been serialized to the format expected by the node.
4355        #[prost(bytes, tag = "5")]
4356        RawBlockItem(::prost::alloc::vec::Vec<u8>),
4357    }
4358}
4359/// Credential deployments create new accounts. They are not paid for
4360/// directly by the sender. Instead, validators are rewarded by the protocol for
4361/// including them.
4362#[derive(Clone, PartialEq, ::prost::Message)]
4363pub struct CredentialDeployment {
4364    #[prost(message, optional, tag = "1")]
4365    pub message_expiry: ::core::option::Option<TransactionTime>,
4366    /// The credential to be added.
4367    ///
4368    /// This field will not be extended in future versions of the API and the Concordium Node API will
4369    /// always output the `raw_payload` in queries.
4370    #[prost(oneof = "credential_deployment::Payload", tags = "2")]
4371    pub payload: ::core::option::Option<credential_deployment::Payload>,
4372}
4373/// Nested message and enum types in `CredentialDeployment`.
4374pub mod credential_deployment {
4375    /// The credential to be added.
4376    ///
4377    /// This field will not be extended in future versions of the API and the Concordium Node API will
4378    /// always output the `raw_payload` in queries.
4379    #[derive(Clone, PartialEq, ::prost::Oneof)]
4380    pub enum Payload {
4381        /// A raw payload, which is just the encoded payload.
4382        /// A typed variant might be added in the future.
4383        #[prost(bytes, tag = "2")]
4384        RawPayload(::prost::alloc::vec::Vec<u8>),
4385    }
4386}
4387/// A single signature. Used when sending block items to a node with
4388/// `SendBlockItem`.
4389#[derive(Clone, PartialEq, ::prost::Message)]
4390pub struct Signature {
4391    #[prost(bytes = "vec", tag = "1")]
4392    pub value: ::prost::alloc::vec::Vec<u8>,
4393}
4394/// A signature on an update instruction.
4395/// The type `UpdateKeysIndex` is not used directly, as messages cannot be keys in maps.
4396#[derive(Clone, PartialEq, ::prost::Message)]
4397pub struct SignatureMap {
4398    #[prost(map = "uint32, message", tag = "1")]
4399    pub signatures: ::std::collections::HashMap<u32, Signature>,
4400}
4401/// Wrapper for a map from indexes to signatures.
4402/// Needed because protobuf doesn't allow nested maps directly.
4403/// The keys in the SignatureMap must not exceed 2^8.
4404#[derive(Clone, PartialEq, ::prost::Message)]
4405pub struct AccountSignatureMap {
4406    #[prost(map = "uint32, message", tag = "1")]
4407    pub signatures: ::std::collections::HashMap<u32, Signature>,
4408}
4409#[derive(Clone, PartialEq, ::prost::Message)]
4410pub struct AccountTransactionSignature {
4411    /// A map from `CredentialIndex` to `SignatureMap`s.
4412    /// The type `CredentialIndex` is not used directly, as messages cannot be keys in maps.
4413    /// The map cannot contain more than 2^8 signatures.
4414    #[prost(map = "uint32, message", tag = "1")]
4415    pub signatures: ::std::collections::HashMap<u32, AccountSignatureMap>,
4416}
4417/// Account transaction signatures from the sender and optionally the sponsor of
4418/// the transaction.
4419#[derive(Clone, PartialEq, ::prost::Message)]
4420pub struct AccountTransactionV1Signatures {
4421    /// Signatures from the sender of the transaction.
4422    #[prost(message, optional, tag = "1")]
4423    pub sender_signatures: ::core::option::Option<AccountTransactionSignature>,
4424    /// The optional signature of the sponsor of the transaction.
4425    #[prost(message, optional, tag = "2")]
4426    pub sponsor_signatures: ::core::option::Option<AccountTransactionSignature>,
4427}
4428/// Header of an account transaction that contains basic data to check whether
4429/// the sender and the transaction are valid. The header is shared by all transaction types.
4430#[derive(Clone, PartialEq, ::prost::Message)]
4431pub struct AccountTransactionHeader {
4432    /// Sender of the transaction.
4433    #[prost(message, optional, tag = "1")]
4434    pub sender: ::core::option::Option<AccountAddress>,
4435    /// Sequence number of the transaction.
4436    #[prost(message, optional, tag = "2")]
4437    pub sequence_number: ::core::option::Option<SequenceNumber>,
4438    /// Maximum amount of energy the transaction can take to execute.
4439    #[prost(message, optional, tag = "3")]
4440    pub energy_amount: ::core::option::Option<Energy>,
4441    /// Latest time the transaction can included in a block.
4442    #[prost(message, optional, tag = "5")]
4443    pub expiry: ::core::option::Option<TransactionTime>,
4444}
4445/// Header v1 of an account transaction with support for sponsored transactions.
4446#[derive(Clone, PartialEq, ::prost::Message)]
4447pub struct AccountTransactionHeaderV1 {
4448    /// Sender of the transaction.
4449    #[prost(message, optional, tag = "1")]
4450    pub sender: ::core::option::Option<AccountAddress>,
4451    /// Sequence number of the transaction.
4452    #[prost(message, optional, tag = "2")]
4453    pub sequence_number: ::core::option::Option<SequenceNumber>,
4454    /// Maximum amount of energy the transaction can take to execute.
4455    #[prost(message, optional, tag = "3")]
4456    pub energy_amount: ::core::option::Option<Energy>,
4457    /// Latest time the transaction can included in a block.
4458    #[prost(message, optional, tag = "5")]
4459    pub expiry: ::core::option::Option<TransactionTime>,
4460    /// The optional address of the account that sponsors the transaction, i.e.
4461    /// pays the transaction fees associated with the execution.
4462    #[prost(message, optional, tag = "6")]
4463    pub sponsor: ::core::option::Option<AccountAddress>,
4464}
4465/// Data required to initialize a new contract instance.
4466#[derive(Clone, PartialEq, ::prost::Message)]
4467pub struct InitContractPayload {
4468    /// Amount of CCD to send to the instance.
4469    #[prost(message, optional, tag = "1")]
4470    pub amount: ::core::option::Option<Amount>,
4471    /// Reference to the module from which the instance will be created.
4472    #[prost(message, optional, tag = "2")]
4473    pub module_ref: ::core::option::Option<ModuleRef>,
4474    /// Name of the contract to initialize. This is expected to be in the format
4475    /// `init_name`.
4476    #[prost(message, optional, tag = "3")]
4477    pub init_name: ::core::option::Option<InitName>,
4478    /// Parameter to call the `init` of the contract with.
4479    #[prost(message, optional, tag = "4")]
4480    pub parameter: ::core::option::Option<Parameter>,
4481}
4482/// Data required to update a contract instance.
4483#[derive(Clone, PartialEq, ::prost::Message)]
4484pub struct UpdateContractPayload {
4485    /// Amount of CCD to send to the instance.
4486    #[prost(message, optional, tag = "1")]
4487    pub amount: ::core::option::Option<Amount>,
4488    /// Address of the instance to update.
4489    #[prost(message, optional, tag = "2")]
4490    pub address: ::core::option::Option<ContractAddress>,
4491    /// Name of the entrypoint to call to update the instance.
4492    /// This is expected to be in the format `contractName.entrypointName`.
4493    #[prost(message, optional, tag = "3")]
4494    pub receive_name: ::core::option::Option<ReceiveName>,
4495    /// Parameter to pass to the entrypoint.
4496    #[prost(message, optional, tag = "4")]
4497    pub parameter: ::core::option::Option<Parameter>,
4498}
4499/// Payload of a transfer between two accounts.
4500#[derive(Clone, PartialEq, ::prost::Message)]
4501pub struct TransferPayload {
4502    /// Amount of CCD to send.
4503    #[prost(message, optional, tag = "1")]
4504    pub amount: ::core::option::Option<Amount>,
4505    /// Receiver address.
4506    #[prost(message, optional, tag = "2")]
4507    pub receiver: ::core::option::Option<AccountAddress>,
4508}
4509/// Payload of a transfer between two accounts with a memo.
4510/// This message can occur starting from protocol version 2.
4511#[derive(Clone, PartialEq, ::prost::Message)]
4512pub struct TransferWithMemoPayload {
4513    /// Amount of CCD to send.
4514    #[prost(message, optional, tag = "1")]
4515    pub amount: ::core::option::Option<Amount>,
4516    /// Receiver address.
4517    #[prost(message, optional, tag = "2")]
4518    pub receiver: ::core::option::Option<AccountAddress>,
4519    /// Memo to include with the transfer.
4520    #[prost(message, optional, tag = "3")]
4521    pub memo: ::core::option::Option<Memo>,
4522}
4523/// The payload for an account transaction.
4524#[derive(Clone, PartialEq, ::prost::Message)]
4525pub struct AccountTransactionPayload {
4526    /// This field will not be extended in future versions of the API and the Concordium Node API will
4527    /// always output the `raw_payload` in queries.
4528    #[prost(
4529        oneof = "account_transaction_payload::Payload",
4530        tags = "1, 2, 3, 4, 5, 6, 7"
4531    )]
4532    pub payload: ::core::option::Option<account_transaction_payload::Payload>,
4533}
4534/// Nested message and enum types in `AccountTransactionPayload`.
4535pub mod account_transaction_payload {
4536    /// This field will not be extended in future versions of the API and the Concordium Node API will
4537    /// always output the `raw_payload` in queries.
4538    #[derive(Clone, PartialEq, ::prost::Oneof)]
4539    pub enum Payload {
4540        /// A pre-serialized payload in the binary serialization format defined
4541        /// by the protocol.
4542        #[prost(bytes, tag = "1")]
4543        RawPayload(::prost::alloc::vec::Vec<u8>),
4544        #[prost(message, tag = "2")]
4545        DeployModule(super::VersionedModuleSource),
4546        #[prost(message, tag = "3")]
4547        InitContract(super::InitContractPayload),
4548        #[prost(message, tag = "4")]
4549        UpdateContract(super::UpdateContractPayload),
4550        #[prost(message, tag = "5")]
4551        Transfer(super::TransferPayload),
4552        /// This payload can occur starting from protocol version 2.
4553        #[prost(message, tag = "6")]
4554        TransferWithMemo(super::TransferWithMemoPayload),
4555        #[prost(message, tag = "7")]
4556        RegisterData(super::RegisteredData),
4557    }
4558}
4559/// An unsigned account transaction. This is used with the
4560/// `GetTransactionSignHash` endpoint to obtain the message to sign.
4561#[derive(Clone, PartialEq, ::prost::Message)]
4562pub struct PreAccountTransaction {
4563    #[prost(message, optional, tag = "1")]
4564    pub header: ::core::option::Option<AccountTransactionHeader>,
4565    #[prost(message, optional, tag = "2")]
4566    pub payload: ::core::option::Option<AccountTransactionPayload>,
4567}
4568/// An unsigned account transaction v1. This is used with the
4569/// `GetTransactionSignHash` endpoint to obtain the message to sign.
4570#[derive(Clone, PartialEq, ::prost::Message)]
4571pub struct PreAccountTransactionV1 {
4572    #[prost(message, optional, tag = "1")]
4573    pub header: ::core::option::Option<AccountTransactionHeaderV1>,
4574    #[prost(message, optional, tag = "2")]
4575    pub payload: ::core::option::Option<AccountTransactionPayload>,
4576}
4577/// Account transactions are messages which are signed and paid for by the sender
4578/// account.
4579#[derive(Clone, PartialEq, ::prost::Message)]
4580pub struct AccountTransaction {
4581    #[prost(message, optional, tag = "1")]
4582    pub signature: ::core::option::Option<AccountTransactionSignature>,
4583    #[prost(message, optional, tag = "2")]
4584    pub header: ::core::option::Option<AccountTransactionHeader>,
4585    #[prost(message, optional, tag = "3")]
4586    pub payload: ::core::option::Option<AccountTransactionPayload>,
4587}
4588/// Account transactions v1 are messages which are signed and paid for by the sender
4589/// account or by the sponsor.
4590#[derive(Clone, PartialEq, ::prost::Message)]
4591pub struct AccountTransactionV1 {
4592    /// The signatures on the transaction by the source account and other
4593    /// relevant parties such as sponsors.
4594    #[prost(message, optional, tag = "1")]
4595    pub signatures: ::core::option::Option<AccountTransactionV1Signatures>,
4596    /// The transaction header data.
4597    #[prost(message, optional, tag = "2")]
4598    pub header: ::core::option::Option<AccountTransactionHeaderV1>,
4599    /// The account transaction payload.
4600    #[prost(message, optional, tag = "3")]
4601    pub payload: ::core::option::Option<AccountTransactionPayload>,
4602}
4603#[derive(Clone, Copy, PartialEq, ::prost::Message)]
4604pub struct UpdateInstructionHeader {
4605    #[prost(message, optional, tag = "1")]
4606    pub sequence_number: ::core::option::Option<UpdateSequenceNumber>,
4607    #[prost(message, optional, tag = "2")]
4608    pub effective_time: ::core::option::Option<TransactionTime>,
4609    #[prost(message, optional, tag = "3")]
4610    pub timeout: ::core::option::Option<TransactionTime>,
4611}
4612/// The payload for an UpdateInstruction.
4613#[derive(Clone, PartialEq, ::prost::Message)]
4614pub struct UpdateInstructionPayload {
4615    /// This field might be extended in future versions of the API.
4616    #[prost(oneof = "update_instruction_payload::Payload", tags = "3")]
4617    pub payload: ::core::option::Option<update_instruction_payload::Payload>,
4618}
4619/// Nested message and enum types in `UpdateInstructionPayload`.
4620pub mod update_instruction_payload {
4621    /// This field might be extended in future versions of the API.
4622    #[derive(Clone, PartialEq, ::prost::Oneof)]
4623    pub enum Payload {
4624        /// A raw payload encoded according to the format defined by the protocol.
4625        #[prost(bytes, tag = "3")]
4626        RawPayload(::prost::alloc::vec::Vec<u8>),
4627    }
4628}
4629#[derive(Clone, PartialEq, ::prost::Message)]
4630pub struct UpdateInstruction {
4631    /// A map from `UpdateKeysIndex` to `Signature`. Keys must not exceed 2^16.
4632    #[prost(message, optional, tag = "1")]
4633    pub signatures: ::core::option::Option<SignatureMap>,
4634    #[prost(message, optional, tag = "2")]
4635    pub header: ::core::option::Option<UpdateInstructionHeader>,
4636    #[prost(message, optional, tag = "3")]
4637    pub payload: ::core::option::Option<UpdateInstructionPayload>,
4638}
4639/// Signature on an account transaction is defined to be the signature on the
4640/// hash of the `PreAccountTransaction`.
4641#[derive(Clone, PartialEq, ::prost::Message)]
4642pub struct AccountTransactionSignHash {
4643    #[prost(bytes = "vec", tag = "1")]
4644    pub value: ::prost::alloc::vec::Vec<u8>,
4645}
4646/// The number of credential deployments allowed in a block. This in effect
4647/// determines the number of accounts that can be created in a block.
4648#[derive(Clone, Copy, PartialEq, ::prost::Message)]
4649pub struct CredentialsPerBlockLimit {
4650    #[prost(uint32, tag = "1")]
4651    pub value: u32,
4652}
4653/// Updatable chain parameters that apply to protocol versions 1-3.
4654#[derive(Clone, PartialEq, ::prost::Message)]
4655pub struct ChainParametersV0 {
4656    /// Election difficulty for consensus lottery.
4657    #[prost(message, optional, tag = "1")]
4658    pub election_difficulty: ::core::option::Option<ElectionDifficulty>,
4659    /// Euro per energy exchange rate.
4660    #[prost(message, optional, tag = "2")]
4661    pub euro_per_energy: ::core::option::Option<ExchangeRate>,
4662    /// Micro CCD per euro exchange rate.
4663    #[prost(message, optional, tag = "3")]
4664    pub micro_ccd_per_euro: ::core::option::Option<ExchangeRate>,
4665    /// Extra number of epochs before reduction in stake, or validator
4666    /// deregistration is completed.
4667    #[prost(message, optional, tag = "4")]
4668    pub baker_cooldown_epochs: ::core::option::Option<Epoch>,
4669    /// The limit for the number of account creations in a block.
4670    #[prost(message, optional, tag = "5")]
4671    pub account_creation_limit: ::core::option::Option<CredentialsPerBlockLimit>,
4672    /// Current mint distribution
4673    #[prost(message, optional, tag = "6")]
4674    pub mint_distribution: ::core::option::Option<MintDistributionCpv0>,
4675    /// Current transaction fee distribution.
4676    #[prost(message, optional, tag = "7")]
4677    pub transaction_fee_distribution: ::core::option::Option<TransactionFeeDistribution>,
4678    /// Current gas reward parameters.
4679    #[prost(message, optional, tag = "8")]
4680    pub gas_rewards: ::core::option::Option<GasRewards>,
4681    /// The foundation account.
4682    #[prost(message, optional, tag = "9")]
4683    pub foundation_account: ::core::option::Option<AccountAddress>,
4684    /// Minimum threshold for becoming a validator.
4685    #[prost(message, optional, tag = "10")]
4686    pub minimum_threshold_for_baking: ::core::option::Option<Amount>,
4687    /// Keys allowed to do root updates.
4688    #[prost(message, optional, tag = "11")]
4689    pub root_keys: ::core::option::Option<HigherLevelKeys>,
4690    /// Keys allowed to do level1 updates;
4691    #[prost(message, optional, tag = "12")]
4692    pub level1_keys: ::core::option::Option<HigherLevelKeys>,
4693    /// Keys allowed to do parameter updates.
4694    #[prost(message, optional, tag = "13")]
4695    pub level2_keys: ::core::option::Option<AuthorizationsV0>,
4696}
4697/// Updatable chain parameters that apply to protocol versions 4-5.
4698#[derive(Clone, PartialEq, ::prost::Message)]
4699pub struct ChainParametersV1 {
4700    /// Election difficulty for consensus lottery.
4701    #[prost(message, optional, tag = "1")]
4702    pub election_difficulty: ::core::option::Option<ElectionDifficulty>,
4703    /// Euro per energy exchange rate.
4704    #[prost(message, optional, tag = "2")]
4705    pub euro_per_energy: ::core::option::Option<ExchangeRate>,
4706    /// Micro CCD per euro exchange rate.
4707    #[prost(message, optional, tag = "3")]
4708    pub micro_ccd_per_euro: ::core::option::Option<ExchangeRate>,
4709    /// Extra number of epochs before reduction in stake, or validator
4710    /// deregistration is completed.
4711    #[prost(message, optional, tag = "4")]
4712    pub cooldown_parameters: ::core::option::Option<CooldownParametersCpv1>,
4713    /// Current time parameters.
4714    /// The time parameters indicates the mint rate and the
4715    /// reward period length, i.e. the time between paydays.
4716    #[prost(message, optional, tag = "5")]
4717    pub time_parameters: ::core::option::Option<TimeParametersCpv1>,
4718    /// The limit for the number of account creations in a block.
4719    #[prost(message, optional, tag = "6")]
4720    pub account_creation_limit: ::core::option::Option<CredentialsPerBlockLimit>,
4721    /// Current mint distribution
4722    #[prost(message, optional, tag = "7")]
4723    pub mint_distribution: ::core::option::Option<MintDistributionCpv1>,
4724    /// Current transaction fee distribution.
4725    #[prost(message, optional, tag = "8")]
4726    pub transaction_fee_distribution: ::core::option::Option<TransactionFeeDistribution>,
4727    /// Current gas reward parameters.
4728    #[prost(message, optional, tag = "9")]
4729    pub gas_rewards: ::core::option::Option<GasRewards>,
4730    /// The foundation account.
4731    #[prost(message, optional, tag = "10")]
4732    pub foundation_account: ::core::option::Option<AccountAddress>,
4733    /// Parameters governing validator pools and their commissions.
4734    #[prost(message, optional, tag = "11")]
4735    pub pool_parameters: ::core::option::Option<PoolParametersCpv1>,
4736    /// Keys allowed to do root updates.
4737    #[prost(message, optional, tag = "12")]
4738    pub root_keys: ::core::option::Option<HigherLevelKeys>,
4739    /// Keys allowed to do level1 updates;
4740    #[prost(message, optional, tag = "13")]
4741    pub level1_keys: ::core::option::Option<HigherLevelKeys>,
4742    /// Keys allowed to do parameter updates.
4743    #[prost(message, optional, tag = "14")]
4744    pub level2_keys: ::core::option::Option<AuthorizationsV1>,
4745}
4746/// Updatable chain parameters that apply to protocol versions 6.
4747#[derive(Clone, PartialEq, ::prost::Message)]
4748pub struct ChainParametersV2 {
4749    /// Consensus parameters.
4750    #[prost(message, optional, tag = "1")]
4751    pub consensus_parameters: ::core::option::Option<ConsensusParametersV1>,
4752    /// Euro per energy exchange rate.
4753    #[prost(message, optional, tag = "2")]
4754    pub euro_per_energy: ::core::option::Option<ExchangeRate>,
4755    /// Micro CCD per euro exchange rate.
4756    #[prost(message, optional, tag = "3")]
4757    pub micro_ccd_per_euro: ::core::option::Option<ExchangeRate>,
4758    /// Extra number of epochs before reduction in stake, or validator
4759    /// deregistration is completed.
4760    #[prost(message, optional, tag = "4")]
4761    pub cooldown_parameters: ::core::option::Option<CooldownParametersCpv1>,
4762    /// Current time parameters.
4763    /// The time parameters indicates the mint rate and the
4764    /// reward period length, i.e. the time between paydays.
4765    #[prost(message, optional, tag = "5")]
4766    pub time_parameters: ::core::option::Option<TimeParametersCpv1>,
4767    /// The limit for the number of account creations in a block.
4768    #[prost(message, optional, tag = "6")]
4769    pub account_creation_limit: ::core::option::Option<CredentialsPerBlockLimit>,
4770    /// Current mint distribution
4771    #[prost(message, optional, tag = "7")]
4772    pub mint_distribution: ::core::option::Option<MintDistributionCpv1>,
4773    /// Current transaction fee distribution.
4774    #[prost(message, optional, tag = "8")]
4775    pub transaction_fee_distribution: ::core::option::Option<TransactionFeeDistribution>,
4776    /// Current gas reward parameters.
4777    #[prost(message, optional, tag = "9")]
4778    pub gas_rewards: ::core::option::Option<GasRewardsCpv2>,
4779    /// The foundation account.
4780    #[prost(message, optional, tag = "10")]
4781    pub foundation_account: ::core::option::Option<AccountAddress>,
4782    /// Parameters governing validator pools and their commissions.
4783    #[prost(message, optional, tag = "11")]
4784    pub pool_parameters: ::core::option::Option<PoolParametersCpv1>,
4785    /// Keys allowed to do root updates.
4786    #[prost(message, optional, tag = "12")]
4787    pub root_keys: ::core::option::Option<HigherLevelKeys>,
4788    /// Keys allowed to do level1 updates;
4789    #[prost(message, optional, tag = "13")]
4790    pub level1_keys: ::core::option::Option<HigherLevelKeys>,
4791    /// Keys allowed to do parameter updates.
4792    #[prost(message, optional, tag = "14")]
4793    pub level2_keys: ::core::option::Option<AuthorizationsV1>,
4794    /// Finalization committee parameters
4795    #[prost(message, optional, tag = "15")]
4796    pub finalization_committee_parameters: ::core::option::Option<
4797        FinalizationCommitteeParameters,
4798    >,
4799}
4800/// Updatable chain parameters that apply to protocol versions 8.
4801#[derive(Clone, PartialEq, ::prost::Message)]
4802pub struct ChainParametersV3 {
4803    /// Consensus parameters.
4804    #[prost(message, optional, tag = "1")]
4805    pub consensus_parameters: ::core::option::Option<ConsensusParametersV1>,
4806    /// Euro per energy exchange rate.
4807    #[prost(message, optional, tag = "2")]
4808    pub euro_per_energy: ::core::option::Option<ExchangeRate>,
4809    /// Micro CCD per euro exchange rate.
4810    #[prost(message, optional, tag = "3")]
4811    pub micro_ccd_per_euro: ::core::option::Option<ExchangeRate>,
4812    /// Extra number of epochs before reduction in stake, or validator
4813    /// deregistration is completed.
4814    #[prost(message, optional, tag = "4")]
4815    pub cooldown_parameters: ::core::option::Option<CooldownParametersCpv1>,
4816    /// Current time parameters.
4817    /// The time parameters indicates the mint rate and the
4818    /// reward period length, i.e. the time between paydays.
4819    #[prost(message, optional, tag = "5")]
4820    pub time_parameters: ::core::option::Option<TimeParametersCpv1>,
4821    /// The limit for the number of account creations in a block.
4822    #[prost(message, optional, tag = "6")]
4823    pub account_creation_limit: ::core::option::Option<CredentialsPerBlockLimit>,
4824    /// Current mint distribution
4825    #[prost(message, optional, tag = "7")]
4826    pub mint_distribution: ::core::option::Option<MintDistributionCpv1>,
4827    /// Current transaction fee distribution.
4828    #[prost(message, optional, tag = "8")]
4829    pub transaction_fee_distribution: ::core::option::Option<TransactionFeeDistribution>,
4830    /// Current gas reward parameters.
4831    #[prost(message, optional, tag = "9")]
4832    pub gas_rewards: ::core::option::Option<GasRewardsCpv2>,
4833    /// The foundation account.
4834    #[prost(message, optional, tag = "10")]
4835    pub foundation_account: ::core::option::Option<AccountAddress>,
4836    /// Parameters governing validator pools and their commissions.
4837    #[prost(message, optional, tag = "11")]
4838    pub pool_parameters: ::core::option::Option<PoolParametersCpv1>,
4839    /// Keys allowed to do root updates.
4840    #[prost(message, optional, tag = "12")]
4841    pub root_keys: ::core::option::Option<HigherLevelKeys>,
4842    /// Keys allowed to do level1 updates;
4843    #[prost(message, optional, tag = "13")]
4844    pub level1_keys: ::core::option::Option<HigherLevelKeys>,
4845    /// Keys allowed to do parameter updates.
4846    #[prost(message, optional, tag = "14")]
4847    pub level2_keys: ::core::option::Option<AuthorizationsV1>,
4848    /// Finalization committee parameters
4849    #[prost(message, optional, tag = "15")]
4850    pub finalization_committee_parameters: ::core::option::Option<
4851        FinalizationCommitteeParameters,
4852    >,
4853    /// Validator score parameters
4854    #[prost(message, optional, tag = "16")]
4855    pub validator_score_parameters: ::core::option::Option<ValidatorScoreParameters>,
4856}
4857/// Chain parameters.
4858#[derive(Clone, PartialEq, ::prost::Message)]
4859pub struct ChainParameters {
4860    /// This field will not be extended in future versions of the API, instead new data versions will
4861    /// use optional fields in `ChainParametersV3`.
4862    #[prost(oneof = "chain_parameters::Parameters", tags = "1, 2, 3, 4")]
4863    pub parameters: ::core::option::Option<chain_parameters::Parameters>,
4864}
4865/// Nested message and enum types in `ChainParameters`.
4866pub mod chain_parameters {
4867    /// This field will not be extended in future versions of the API, instead new data versions will
4868    /// use optional fields in `ChainParametersV3`.
4869    #[derive(Clone, PartialEq, ::prost::Oneof)]
4870    pub enum Parameters {
4871        /// Chain parameters that apply when the block is a protocol version 1-3 block.
4872        #[prost(message, tag = "1")]
4873        V0(super::ChainParametersV0),
4874        /// Chain parameters that apply when the block is a protocol version 4-5 block.
4875        #[prost(message, tag = "2")]
4876        V1(super::ChainParametersV1),
4877        /// Chain parameters that apply when the block is a protocol version 6-7 block.
4878        #[prost(message, tag = "3")]
4879        V2(super::ChainParametersV2),
4880        /// Chain parameters that apply when the block is a protocol version 8- block.
4881        #[prost(message, tag = "4")]
4882        V3(super::ChainParametersV3),
4883    }
4884}
4885/// Details about a finalizer for the finalization round.
4886#[derive(Clone, Copy, PartialEq, ::prost::Message)]
4887pub struct FinalizationSummaryParty {
4888    /// Validator ID. Every finalizer is in particular a validator.
4889    #[prost(message, optional, tag = "1")]
4890    pub baker: ::core::option::Option<BakerId>,
4891    /// The weight of the finalizer in the committee. This is an "absolute" weight.
4892    #[prost(uint64, tag = "2")]
4893    pub weight: u64,
4894    /// Whether the finalizer's signature was present on the particular finalization record.
4895    #[prost(bool, tag = "3")]
4896    pub signed: bool,
4897}
4898/// Index of the finalization round. This increases on each successfully
4899/// completed finalization.
4900#[derive(Clone, Copy, PartialEq, ::prost::Message)]
4901pub struct FinalizationIndex {
4902    #[prost(uint64, tag = "1")]
4903    pub value: u64,
4904}
4905/// Details about a finalization record included in a block.
4906#[derive(Clone, PartialEq, ::prost::Message)]
4907pub struct FinalizationSummary {
4908    /// Block that was finalized by the finalization record.
4909    #[prost(message, optional, tag = "1")]
4910    pub block: ::core::option::Option<BlockHash>,
4911    /// Index of the finalization round that finalized the block.
4912    #[prost(message, optional, tag = "2")]
4913    pub index: ::core::option::Option<FinalizationIndex>,
4914    /// Finalization delay used for the finalization round.
4915    #[prost(message, optional, tag = "3")]
4916    pub delay: ::core::option::Option<BlockHeight>,
4917    /// List of all finalizers with information about whether they signed the
4918    /// finalization record or not.
4919    #[prost(message, repeated, tag = "4")]
4920    pub finalizers: ::prost::alloc::vec::Vec<FinalizationSummaryParty>,
4921}
4922/// Finalization summary that may or may not be part of the block.
4923#[derive(Clone, PartialEq, ::prost::Message)]
4924pub struct BlockFinalizationSummary {
4925    /// This field will not be extended in future versions of the API.
4926    #[prost(oneof = "block_finalization_summary::Summary", tags = "1, 2")]
4927    pub summary: ::core::option::Option<block_finalization_summary::Summary>,
4928}
4929/// Nested message and enum types in `BlockFinalizationSummary`.
4930pub mod block_finalization_summary {
4931    /// This field will not be extended in future versions of the API.
4932    #[derive(Clone, PartialEq, ::prost::Oneof)]
4933    pub enum Summary {
4934        /// There is no finalization data in the block.
4935        #[prost(message, tag = "1")]
4936        None(super::Empty),
4937        /// There is a single finalization record with the block.
4938        #[prost(message, tag = "2")]
4939        Record(super::FinalizationSummary),
4940    }
4941}
4942#[derive(Clone, PartialEq, ::prost::Message)]
4943pub struct BlockItem {
4944    /// The hash of the block item that identifies it to the chain.
4945    #[prost(message, optional, tag = "1")]
4946    pub hash: ::core::option::Option<TransactionHash>,
4947    /// This field might be extended in future versions of the API.
4948    #[prost(oneof = "block_item::BlockItem", tags = "2, 3, 4, 5, 6")]
4949    pub block_item: ::core::option::Option<block_item::BlockItem>,
4950}
4951/// Nested message and enum types in `BlockItem`.
4952pub mod block_item {
4953    /// This field might be extended in future versions of the API.
4954    #[derive(Clone, PartialEq, ::prost::Oneof)]
4955    pub enum BlockItem {
4956        /// Account transactions are messages which are signed and paid for by an account.
4957        #[prost(message, tag = "2")]
4958        AccountTransaction(super::AccountTransaction),
4959        /// Credential deployments create new accounts. They are not paid for
4960        /// directly by the sender. Instead, validators are rewarded by the protocol for
4961        /// including them.
4962        #[prost(message, tag = "3")]
4963        CredentialDeployment(super::CredentialDeployment),
4964        /// Update instructions are messages which can update the chain parameters. Including which keys are allowed
4965        /// to make future update instructions.
4966        #[prost(message, tag = "4")]
4967        UpdateInstruction(super::UpdateInstruction),
4968        /// Account transactions v1 are messages which are signed and paid for by
4969        /// either an account or a sponsor.
4970        #[prost(message, tag = "5")]
4971        AccountTransactionV1(super::AccountTransactionV1),
4972        /// A block item which has already been serialized to the format expected by the node.
4973        #[prost(bytes, tag = "6")]
4974        RawBlockItem(::prost::alloc::vec::Vec<u8>),
4975    }
4976}
4977/// Information about a particular validator with respect to
4978/// the current reward period. The below values are historical value from the last payday block.
4979#[derive(Clone, PartialEq, ::prost::Message)]
4980pub struct BakerRewardPeriodInfo {
4981    /// The validator id and public keys for the validator.
4982    #[prost(message, optional, tag = "1")]
4983    pub baker: ::core::option::Option<BakerInfo>,
4984    /// The effective stake of the validator for the consensus protocol.
4985    /// The returned amount accounts for delegation, capital bounds and leverage bounds.
4986    #[prost(message, optional, tag = "2")]
4987    pub effective_stake: ::core::option::Option<Amount>,
4988    /// The effective commission rate for the validator that applies for the reward period.
4989    #[prost(message, optional, tag = "3")]
4990    pub commission_rates: ::core::option::Option<CommissionRates>,
4991    /// The amount staked by the validator itself.
4992    #[prost(message, optional, tag = "4")]
4993    pub equity_capital: ::core::option::Option<Amount>,
4994    /// The total amount of capital delegated to this validator pool.
4995    #[prost(message, optional, tag = "5")]
4996    pub delegated_capital: ::core::option::Option<Amount>,
4997    /// Whether the validator is a finalizer or not.
4998    #[prost(bool, tag = "6")]
4999    pub is_finalizer: bool,
5000}
5001/// The signature of a 'QuorumCertificate' or 'QuorumMessage'.
5002#[derive(Clone, PartialEq, ::prost::Message)]
5003pub struct QuorumSignature {
5004    /// The bytes representing the raw aggregate signature.
5005    /// The bytes have a fixed length of 48 bytes.
5006    #[prost(bytes = "vec", tag = "1")]
5007    pub value: ::prost::alloc::vec::Vec<u8>,
5008}
5009/// A quorum certificate is the certificate that the
5010/// finalization comittee issues in order to certify a block.
5011/// A block must be certified before it will be part of the
5012/// authorative part of the chain.
5013#[derive(Clone, PartialEq, ::prost::Message)]
5014pub struct QuorumCertificate {
5015    /// The hash of the block that the quorum certificate refers to.
5016    #[prost(message, optional, tag = "1")]
5017    pub block_hash: ::core::option::Option<BlockHash>,
5018    /// The round of the block.
5019    #[prost(message, optional, tag = "2")]
5020    pub round: ::core::option::Option<Round>,
5021    /// The epoch of the block.
5022    #[prost(message, optional, tag = "3")]
5023    pub epoch: ::core::option::Option<Epoch>,
5024    /// The aggregated signature by the finalization committee on the block.
5025    #[prost(message, optional, tag = "4")]
5026    pub aggregate_signature: ::core::option::Option<QuorumSignature>,
5027    /// A list of the finalizers that formed the quorum certificate
5028    /// i.e., the ones who have contributed to the 'aggregate_siganture'.
5029    /// The finalizers are identified by their validator id as this is stable
5030    /// across protocols and epochs.
5031    #[prost(message, repeated, tag = "5")]
5032    pub signatories: ::prost::alloc::vec::Vec<BakerId>,
5033}
5034/// The finalizer round is a map from a 'Round'
5035/// to the list of finalizers (identified by their validator id) that signed
5036/// off the round.
5037#[derive(Clone, PartialEq, ::prost::Message)]
5038pub struct FinalizerRound {
5039    /// The round that was signed off.
5040    #[prost(message, optional, tag = "1")]
5041    pub round: ::core::option::Option<Round>,
5042    /// The finalizers (identified by their validator id) that
5043    /// signed off the in 'round'.
5044    #[prost(message, repeated, tag = "2")]
5045    pub finalizers: ::prost::alloc::vec::Vec<BakerId>,
5046}
5047/// The signature of a 'TimeoutCertificate'.
5048#[derive(Clone, PartialEq, ::prost::Message)]
5049pub struct TimeoutSignature {
5050    /// The bytes representing the raw aggregate signature.
5051    /// The bytes have a fixed length of 48 bytes.
5052    #[prost(bytes = "vec", tag = "1")]
5053    pub value: ::prost::alloc::vec::Vec<u8>,
5054}
5055/// A timeout certificate is the certificate that the
5056/// finalization committee issues when a round times out,
5057/// thus making it possible for the protocol to proceed to the
5058/// next round.
5059#[derive(Clone, PartialEq, ::prost::Message)]
5060pub struct TimeoutCertificate {
5061    /// The round that timed out.
5062    #[prost(message, optional, tag = "1")]
5063    pub round: ::core::option::Option<Round>,
5064    /// The minimum epoch of which signatures are included
5065    /// in the 'aggregate_signature'.
5066    #[prost(message, optional, tag = "2")]
5067    pub min_epoch: ::core::option::Option<Epoch>,
5068    /// The rounds of which finalizers have their best
5069    /// QCs in the 'min_epoch'.
5070    #[prost(message, repeated, tag = "3")]
5071    pub qc_rounds_first_epoch: ::prost::alloc::vec::Vec<FinalizerRound>,
5072    /// The rounds of which finalizers have their best
5073    /// QCs in the epoch 'min_epoch' + 1.
5074    #[prost(message, repeated, tag = "4")]
5075    pub qc_rounds_second_epoch: ::prost::alloc::vec::Vec<FinalizerRound>,
5076    /// The aggregated signature by the finalization committee that witnessed
5077    /// the 'round' timed out.
5078    #[prost(message, optional, tag = "5")]
5079    pub aggregate_signature: ::core::option::Option<TimeoutSignature>,
5080}
5081/// A proof that establishes that the successor block of
5082/// a 'EpochFinalizationEntry' is the immediate successor of
5083/// the finalized block.
5084#[derive(Clone, PartialEq, ::prost::Message)]
5085pub struct SuccessorProof {
5086    /// The proof represented as raw bytes.
5087    /// The bytes have a fixed length of 32 bytes.
5088    #[prost(bytes = "vec", tag = "1")]
5089    pub value: ::prost::alloc::vec::Vec<u8>,
5090}
5091/// The epoch finalization entry is the proof that
5092/// makes the protocol able to advance to a new epoch.
5093/// I.e. the 'EpochFinalizationEntry' is present if and only if
5094/// the block is the first block of a new 'Epoch'.
5095#[derive(Clone, PartialEq, ::prost::Message)]
5096pub struct EpochFinalizationEntry {
5097    /// The quorum certificate for the finalized block.
5098    #[prost(message, optional, tag = "1")]
5099    pub finalized_qc: ::core::option::Option<QuorumCertificate>,
5100    /// The quorum certificate for the block that finalizes
5101    /// the block that 'finalized_qc' points to.
5102    #[prost(message, optional, tag = "2")]
5103    pub successor_qc: ::core::option::Option<QuorumCertificate>,
5104    /// A proof that the successor block is an immediate
5105    /// successor of the finalized block.
5106    #[prost(message, optional, tag = "3")]
5107    pub successor_proof: ::core::option::Option<SuccessorProof>,
5108}
5109/// Certificates for a block for protocols supporting ConcordiumBFT.
5110#[derive(Clone, PartialEq, ::prost::Message)]
5111pub struct BlockCertificates {
5112    /// The quorum certificate. Is present if and only if the block is
5113    /// not a genesis block.
5114    #[prost(message, optional, tag = "1")]
5115    pub quorum_certificate: ::core::option::Option<QuorumCertificate>,
5116    /// The timeout certificate. Is present only if the round prior to the
5117    /// round of the block timed out.
5118    #[prost(message, optional, tag = "2")]
5119    pub timeout_certificate: ::core::option::Option<TimeoutCertificate>,
5120    /// The epoch finalization entry. Is present only if the block initiates
5121    /// a new epoch.
5122    #[prost(message, optional, tag = "3")]
5123    pub epoch_finalization_entry: ::core::option::Option<EpochFinalizationEntry>,
5124}
5125/// Details of which validator won the lottery in a given round in consensus version 1.
5126#[derive(Clone, Copy, PartialEq, ::prost::Message)]
5127pub struct WinningBaker {
5128    /// The round number.
5129    #[prost(message, optional, tag = "1")]
5130    pub round: ::core::option::Option<Round>,
5131    /// The validator that won the round.
5132    #[prost(message, optional, tag = "2")]
5133    pub winner: ::core::option::Option<BakerId>,
5134    /// True if the validator produced a block in this round on the finalized chain, and False otherwise.
5135    #[prost(bool, tag = "3")]
5136    pub present: bool,
5137}
5138/// An operation to dry run.  The first operation in a dry-run sequence should be
5139/// `load_block_state`: any other operation will be met with `NoState` until a
5140/// state is successfully loaded.
5141#[derive(Clone, PartialEq, ::prost::Message)]
5142pub struct DryRunRequest {
5143    /// This field might be extended in future versions of the API.
5144    #[prost(oneof = "dry_run_request::Request", tags = "1, 2, 3")]
5145    pub request: ::core::option::Option<dry_run_request::Request>,
5146}
5147/// Nested message and enum types in `DryRunRequest`.
5148pub mod dry_run_request {
5149    /// This field might be extended in future versions of the API.
5150    #[derive(Clone, PartialEq, ::prost::Oneof)]
5151    pub enum Request {
5152        /// Load the state of the specified block to use for subsequent requests.
5153        /// The state is taken at the end of execution of the block, and the block’s
5154        /// timestamp is used as the current timestamp.
5155        ///
5156        /// The energy cost for this operation is 2000.
5157        #[prost(message, tag = "1")]
5158        LoadBlockState(super::BlockHashInput),
5159        /// Run a query on the state.
5160        #[prost(message, tag = "2")]
5161        StateQuery(super::DryRunStateQuery),
5162        /// Run a (non-transaction) operation to modify the state.
5163        #[prost(message, tag = "3")]
5164        StateOperation(super::DryRunStateOperation),
5165    }
5166}
5167/// Run a query as part of a dry run. Queries do not update the block state.
5168#[derive(Clone, PartialEq, ::prost::Message)]
5169pub struct DryRunStateQuery {
5170    /// This field might be extended in future versions of the API.
5171    #[prost(oneof = "dry_run_state_query::Query", tags = "1, 2, 3")]
5172    pub query: ::core::option::Option<dry_run_state_query::Query>,
5173}
5174/// Nested message and enum types in `DryRunStateQuery`.
5175pub mod dry_run_state_query {
5176    /// This field might be extended in future versions of the API.
5177    #[derive(Clone, PartialEq, ::prost::Oneof)]
5178    pub enum Query {
5179        /// Look up information on a particular account.
5180        ///
5181        /// The energy cost for this query is 200.
5182        #[prost(message, tag = "1")]
5183        GetAccountInfo(super::AccountIdentifierInput),
5184        /// Look up information about a particular smart contract.
5185        ///
5186        /// The energy cost for this query is 200.
5187        #[prost(message, tag = "2")]
5188        GetInstanceInfo(super::ContractAddress),
5189        /// Invoke an entrypoint on a smart contract instance.
5190        /// No changes made to the state are retained at the completion of the operation.
5191        ///
5192        /// The energy cost for this query is 200 plus the energy used by the smart contract
5193        /// execution.
5194        #[prost(message, tag = "3")]
5195        InvokeInstance(super::DryRunInvokeInstance),
5196    }
5197}
5198/// Invoke an entrypoint on a smart contract instance.
5199#[derive(Clone, PartialEq, ::prost::Message)]
5200pub struct DryRunInvokeInstance {
5201    /// Invoker of the contract. If this is not supplied then the contract will be
5202    /// invoked by an account with address 0, no credentials and sufficient amount
5203    /// of CCD to cover the transfer amount. If given, the relevant address (either
5204    /// account or contract) must exist in the blockstate.
5205    #[prost(message, optional, tag = "1")]
5206    pub invoker: ::core::option::Option<Address>,
5207    /// Address of the contract instance to invoke.
5208    #[prost(message, optional, tag = "2")]
5209    pub instance: ::core::option::Option<ContractAddress>,
5210    /// Amount to invoke the smart contract instance with.
5211    #[prost(message, optional, tag = "3")]
5212    pub amount: ::core::option::Option<Amount>,
5213    /// The entrypoint of the smart contract instance to invoke.
5214    #[prost(message, optional, tag = "4")]
5215    pub entrypoint: ::core::option::Option<ReceiveName>,
5216    /// The parameter bytes to include in the invocation of the entrypoint.
5217    #[prost(message, optional, tag = "5")]
5218    pub parameter: ::core::option::Option<Parameter>,
5219    /// The maximum energy to allow for the invocation. Note that the node imposes an energy
5220    /// quota that is enforced in addition to this limit.
5221    #[prost(message, optional, tag = "6")]
5222    pub energy: ::core::option::Option<Energy>,
5223}
5224/// An operation that can update the state as part of a dry run.
5225#[derive(Clone, PartialEq, ::prost::Message)]
5226pub struct DryRunStateOperation {
5227    /// This field might be extended in future versions of the API.
5228    #[prost(oneof = "dry_run_state_operation::Operation", tags = "1, 2, 3")]
5229    pub operation: ::core::option::Option<dry_run_state_operation::Operation>,
5230}
5231/// Nested message and enum types in `DryRunStateOperation`.
5232pub mod dry_run_state_operation {
5233    /// This field might be extended in future versions of the API.
5234    #[derive(Clone, PartialEq, ::prost::Oneof)]
5235    pub enum Operation {
5236        /// Sets the current block time to the given timestamp for the purposes of future
5237        /// transactions.
5238        ///
5239        /// The energy cost of this operation is 50.
5240        #[prost(message, tag = "1")]
5241        SetTimestamp(super::Timestamp),
5242        /// Add a specified amount of newly-minted CCDs to a specified account.
5243        /// The amount cannot cause the total circulating supply to overflow.
5244        ///
5245        /// The energy cost of this operation is 400.
5246        #[prost(message, tag = "2")]
5247        MintToAccount(super::DryRunMintToAccount),
5248        /// Dry run a transaction, updating the state if it succeeds.
5249        ///
5250        /// The energy cost of this operation is 400 plus the energy used by executing the
5251        /// transaction.
5252        #[prost(message, tag = "3")]
5253        RunTransaction(super::DryRunTransaction),
5254    }
5255}
5256/// Mint a specified amount and credit it to the specified account as part of a dry run.
5257#[derive(Clone, PartialEq, ::prost::Message)]
5258pub struct DryRunMintToAccount {
5259    /// The account to mint to.
5260    #[prost(message, optional, tag = "1")]
5261    pub account: ::core::option::Option<AccountAddress>,
5262    /// The amount to mint and credit to the account.
5263    #[prost(message, optional, tag = "2")]
5264    pub amount: ::core::option::Option<Amount>,
5265}
5266/// Dry run an account transaction
5267#[derive(Clone, PartialEq, ::prost::Message)]
5268pub struct DryRunTransaction {
5269    /// The account to use as the sender of the transaction.
5270    #[prost(message, optional, tag = "1")]
5271    pub sender: ::core::option::Option<AccountAddress>,
5272    /// The energy limit set for executing the transaction.
5273    #[prost(message, optional, tag = "2")]
5274    pub energy_amount: ::core::option::Option<Energy>,
5275    /// The payload of the transaction.
5276    #[prost(message, optional, tag = "3")]
5277    pub payload: ::core::option::Option<AccountTransactionPayload>,
5278    /// Which credentials and keys should be treated as having signed the transaction.
5279    /// If none is given, then the transaction is treated as having one signature for credential 0,
5280    /// key 0. Therefore, this is only required when the transaction is from a multi-signature
5281    /// account. There are two reasons why you might want to specify signatures:
5282    ///    * The cost of the transaction depends on the number of signatures, so if you want to
5283    ///      get the correct cost for a multi-signature transaction, then specifying the signatures
5284    ///      supports this.
5285    ///    * When changing account keys on a multi-credential account, the transaction must be signed
5286    ///      by the credential whose keys are being changed.
5287    ///
5288    /// Note that the signature thresholds are not checked as part of the dry run. Duplicated
5289    /// signatures are only counted once.
5290    #[prost(message, repeated, tag = "4")]
5291    pub signatures: ::prost::alloc::vec::Vec<DryRunSignature>,
5292}
5293/// A dry run signature is a pair of a credential index and key index, identifying the credential
5294/// and key that is presumed to have signed the transaction. No actual cryptographic signature is
5295/// included.
5296#[derive(Clone, Copy, PartialEq, ::prost::Message)]
5297pub struct DryRunSignature {
5298    /// Credential index. Must not exceed 255.
5299    #[prost(uint32, tag = "1")]
5300    pub credential: u32,
5301    /// Key index. Must not exceed 255.
5302    #[prost(uint32, tag = "2")]
5303    pub key: u32,
5304}
5305/// A response to a `DryRunRequest`.
5306#[derive(Clone, PartialEq, ::prost::Message)]
5307pub struct DryRunResponse {
5308    /// The remaining available energy quota after the dry run operation.
5309    #[prost(message, optional, tag = "3")]
5310    pub quota_remaining: ::core::option::Option<Energy>,
5311    /// This field might be extended in future versions of the API.
5312    #[prost(oneof = "dry_run_response::Response", tags = "1, 2")]
5313    pub response: ::core::option::Option<dry_run_response::Response>,
5314}
5315/// Nested message and enum types in `DryRunResponse`.
5316pub mod dry_run_response {
5317    /// This field might be extended in future versions of the API.
5318    #[derive(Clone, PartialEq, ::prost::Oneof)]
5319    pub enum Response {
5320        /// The request produced an error. The request otherwise has no effect on the state.
5321        #[prost(message, tag = "1")]
5322        Error(super::DryRunErrorResponse),
5323        /// The request was successful.
5324        #[prost(message, tag = "2")]
5325        Success(super::DryRunSuccessResponse),
5326    }
5327}
5328#[derive(Clone, PartialEq, ::prost::Message)]
5329pub struct DryRunErrorResponse {
5330    /// This field might be extended in future versions of the API.
5331    #[prost(oneof = "dry_run_error_response::Error", tags = "1, 2, 3, 4, 5, 6, 8, 9")]
5332    pub error: ::core::option::Option<dry_run_error_response::Error>,
5333}
5334/// Nested message and enum types in `DryRunErrorResponse`.
5335pub mod dry_run_error_response {
5336    /// The current block state is undefined. It should be initialized with
5337    /// a 'load_block_state' request before any other operations.
5338    #[derive(Clone, Copy, PartialEq, ::prost::Message)]
5339    pub struct NoState {}
5340    /// The requested block was not found, so its state could not be loaded.
5341    #[derive(Clone, Copy, PartialEq, ::prost::Message)]
5342    pub struct BlockNotFound {}
5343    /// The specified account was not found.
5344    #[derive(Clone, Copy, PartialEq, ::prost::Message)]
5345    pub struct AccountNotFound {}
5346    /// The specified instance was not found.
5347    #[derive(Clone, Copy, PartialEq, ::prost::Message)]
5348    pub struct InstanceNotFound {}
5349    /// The amount that was requested to be minted would overflow the total supply.
5350    #[derive(Clone, Copy, PartialEq, ::prost::Message)]
5351    pub struct AmountOverLimit {
5352        /// The maximum amount that can be minted without overflowing the supply.
5353        #[prost(message, optional, tag = "1")]
5354        pub amount_limit: ::core::option::Option<super::Amount>,
5355    }
5356    /// The sender account for the transaction has insufficient balance to pay the preliminary fees
5357    /// for the transaction to be included in a block.
5358    #[derive(Clone, Copy, PartialEq, ::prost::Message)]
5359    pub struct BalanceInsufficient {
5360        /// The minimum balance required to perform the operation.
5361        #[prost(message, optional, tag = "1")]
5362        pub required_amount: ::core::option::Option<super::Amount>,
5363        /// The currently-available balance on the account to pay for the operation.
5364        #[prost(message, optional, tag = "2")]
5365        pub available_amount: ::core::option::Option<super::Amount>,
5366    }
5367    /// The energy made available for the transaction is insufficient to cover the basic processing
5368    /// required to include a transaction in a block.
5369    #[derive(Clone, Copy, PartialEq, ::prost::Message)]
5370    pub struct EnergyInsufficient {
5371        /// The minimum energy required for the transaction to be included in the chain.
5372        /// Note that, even if the energy supplied for the transaction is enough to prevent a
5373        /// `EnergyInsufficient`, the transaction can still be rejected for having
5374        /// insufficient energy. In that case, a `TransactionExecuted` response will be
5375        /// produced, but indicate the transaction was rejected.
5376        #[prost(message, optional, tag = "1")]
5377        pub energy_required: ::core::option::Option<super::Energy>,
5378    }
5379    /// Invoking the smart contract instance failed.
5380    #[derive(Clone, PartialEq, ::prost::Message)]
5381    pub struct InvokeFailure {
5382        /// If invoking a V0 contract this is not provided, otherwise it is
5383        /// potentially return value produced by the call unless the call failed with
5384        /// out of energy or runtime error. If the V1 contract terminated with a
5385        /// logic error then the return value is present.
5386        #[prost(bytes = "vec", optional, tag = "1")]
5387        pub return_value: ::core::option::Option<::prost::alloc::vec::Vec<u8>>,
5388        /// Energy used by the execution.
5389        #[prost(message, optional, tag = "2")]
5390        pub used_energy: ::core::option::Option<super::Energy>,
5391        /// Contract execution failed for the given reason.
5392        #[prost(message, optional, tag = "3")]
5393        pub reason: ::core::option::Option<super::RejectReason>,
5394    }
5395    /// This field might be extended in future versions of the API.
5396    #[derive(Clone, PartialEq, ::prost::Oneof)]
5397    pub enum Error {
5398        /// The current block state is undefined. It should be initialized with
5399        /// a 'load_block_state' request before any other operations.
5400        #[prost(message, tag = "1")]
5401        NoState(NoState),
5402        /// The requested block was not found, so its state could not be loaded.
5403        /// Response to 'load_block_state'.
5404        #[prost(message, tag = "2")]
5405        BlockNotFound(BlockNotFound),
5406        /// The specified account was not found.
5407        /// Response to 'get_account_info', 'mint_to_account' and 'run_transaction'.
5408        #[prost(message, tag = "3")]
5409        AccountNotFound(AccountNotFound),
5410        /// The specified instance was not found.
5411        /// Response to 'get_instance_info'.
5412        #[prost(message, tag = "4")]
5413        InstanceNotFound(InstanceNotFound),
5414        /// The amount to mint would overflow the total CCD supply.
5415        /// Response to 'mint_to_account'.
5416        #[prost(message, tag = "5")]
5417        AmountOverLimit(AmountOverLimit),
5418        /// The balance of the sender account is not sufficient to pay for the operation.
5419        /// Response to 'run_transaction'.
5420        #[prost(message, tag = "6")]
5421        BalanceInsufficient(BalanceInsufficient),
5422        /// The energy supplied for the transaction was not sufficient to perform the basic checks.
5423        /// Response to 'run_transaction'.
5424        #[prost(message, tag = "8")]
5425        EnergyInsufficient(EnergyInsufficient),
5426        /// The contract invocation failed.
5427        /// Response to 'invoke_instance'.
5428        #[prost(message, tag = "9")]
5429        InvokeFailed(InvokeFailure),
5430    }
5431}
5432/// The dry run operation completed successfully.
5433#[derive(Clone, PartialEq, ::prost::Message)]
5434pub struct DryRunSuccessResponse {
5435    /// This field might be extended in future versions of the API.
5436    #[prost(oneof = "dry_run_success_response::Response", tags = "1, 2, 3, 4, 5, 6, 7")]
5437    pub response: ::core::option::Option<dry_run_success_response::Response>,
5438}
5439/// Nested message and enum types in `DryRunSuccessResponse`.
5440pub mod dry_run_success_response {
5441    /// The block state at the specified block was successfully loaded.
5442    #[derive(Clone, PartialEq, ::prost::Message)]
5443    pub struct BlockStateLoaded {
5444        /// The timestamp of the block, taken to be the current timestamp.
5445        #[prost(message, optional, tag = "1")]
5446        pub current_timestamp: ::core::option::Option<super::Timestamp>,
5447        /// The hash of the block that was loaded.
5448        #[prost(message, optional, tag = "2")]
5449        pub block_hash: ::core::option::Option<super::BlockHash>,
5450        /// The protocol version at the specified block. The behavior of operations can vary across
5451        /// protocol versions.
5452        #[prost(enumeration = "super::ProtocolVersion", tag = "3")]
5453        pub protocol_version: i32,
5454    }
5455    /// The current apparent timestamp was updated to the specified value.
5456    #[derive(Clone, Copy, PartialEq, ::prost::Message)]
5457    pub struct TimestampSet {}
5458    /// The specified amount was minted to the specified account.
5459    #[derive(Clone, Copy, PartialEq, ::prost::Message)]
5460    pub struct MintedToAccount {}
5461    /// The transaction was executed.
5462    #[derive(Clone, PartialEq, ::prost::Message)]
5463    pub struct TransactionExecuted {
5464        /// The amount of energy actually expended in executing the transaction.
5465        #[prost(message, optional, tag = "1")]
5466        pub energy_cost: ::core::option::Option<super::Energy>,
5467        /// The details of the outcome of the transaction.
5468        #[prost(message, optional, tag = "2")]
5469        pub details: ::core::option::Option<super::AccountTransactionDetails>,
5470        /// If this is an invocation of a V1 contract that produced a return value, this is that
5471        /// value. Otherwise it is absent.
5472        #[prost(bytes = "vec", optional, tag = "3")]
5473        pub return_value: ::core::option::Option<::prost::alloc::vec::Vec<u8>>,
5474    }
5475    /// The smart contract instance was invoked successfully.
5476    #[derive(Clone, PartialEq, ::prost::Message)]
5477    pub struct InvokeSuccess {
5478        /// If invoking a V0 contract this is absent. Otherwise it is the return
5479        /// value produced by the contract.
5480        #[prost(bytes = "vec", optional, tag = "1")]
5481        pub return_value: ::core::option::Option<::prost::alloc::vec::Vec<u8>>,
5482        /// Energy used by the execution.
5483        #[prost(message, optional, tag = "2")]
5484        pub used_energy: ::core::option::Option<super::Energy>,
5485        /// Effects produced by contract execution.
5486        #[prost(message, repeated, tag = "3")]
5487        pub effects: ::prost::alloc::vec::Vec<super::ContractTraceElement>,
5488    }
5489    /// This field might be extended in future versions of the API.
5490    #[derive(Clone, PartialEq, ::prost::Oneof)]
5491    pub enum Response {
5492        /// The state from the specified block was successfully loaded.
5493        /// Response to 'load_block_state'.
5494        #[prost(message, tag = "1")]
5495        BlockStateLoaded(BlockStateLoaded),
5496        /// Details of the requested account.
5497        /// Response to 'get_account_info'.
5498        #[prost(message, tag = "2")]
5499        AccountInfo(super::AccountInfo),
5500        /// Details of the requested smart contract instance.
5501        /// Response to 'get_instance_info'.
5502        #[prost(message, tag = "3")]
5503        InstanceInfo(super::InstanceInfo),
5504        /// The smart contract instance was invoked successfully.
5505        #[prost(message, tag = "4")]
5506        InvokeSucceeded(InvokeSuccess),
5507        /// The current timestamp was set successfully.
5508        /// Response to 'set_timestamp'.
5509        #[prost(message, tag = "5")]
5510        TimestampSet(TimestampSet),
5511        /// The specified amount was minted and credited to the account.
5512        /// Response to 'mint_to_account'.
5513        #[prost(message, tag = "6")]
5514        MintedToAccount(MintedToAccount),
5515        /// The specified transaction was executed. Note that the transaction could still have
5516        /// been rejected.
5517        /// Response to 'run_transaction'.
5518        #[prost(message, tag = "7")]
5519        TransactionExecuted(TransactionExecuted),
5520    }
5521}
5522/// The index of a particular finalizer in the finalization committee.
5523#[derive(Clone, Copy, PartialEq, ::prost::Message)]
5524pub struct FinalizerIndex {
5525    #[prost(uint32, tag = "1")]
5526    pub value: u32,
5527}
5528/// The message that is multicast by a finalizer when validating and signing a block.
5529#[derive(Clone, PartialEq, ::prost::Message)]
5530pub struct QuorumMessage {
5531    /// Signature on the relevant quorum signature message.
5532    #[prost(message, optional, tag = "1")]
5533    pub signature: ::core::option::Option<QuorumSignature>,
5534    /// Hash of the block that is signed.
5535    #[prost(message, optional, tag = "2")]
5536    pub block: ::core::option::Option<BlockHash>,
5537    /// Index of the finalizer signing the message.
5538    #[prost(message, optional, tag = "3")]
5539    pub finalizer: ::core::option::Option<FinalizerIndex>,
5540    /// Round of the block.
5541    #[prost(message, optional, tag = "4")]
5542    pub round: ::core::option::Option<Round>,
5543    /// Epoch of the block.
5544    #[prost(message, optional, tag = "5")]
5545    pub epoch: ::core::option::Option<Epoch>,
5546}
5547#[derive(Clone, PartialEq, ::prost::Message)]
5548pub struct RawQuorumCertificate {
5549    /// The hash of the block that the quorum certificate refers to.
5550    #[prost(message, optional, tag = "1")]
5551    pub block_hash: ::core::option::Option<BlockHash>,
5552    /// The round of the block.
5553    #[prost(message, optional, tag = "2")]
5554    pub round: ::core::option::Option<Round>,
5555    /// The epoch of the block.
5556    #[prost(message, optional, tag = "3")]
5557    pub epoch: ::core::option::Option<Epoch>,
5558    /// The aggregated signature by the finalization committee on the block.
5559    #[prost(message, optional, tag = "4")]
5560    pub aggregate_signature: ::core::option::Option<QuorumSignature>,
5561    /// A list of the finalizers that formed the quorum certificate
5562    /// i.e., the ones who have contributed to the 'aggregate_signature'.
5563    /// The finalizers are identified by their finalizer index, which refers to the
5564    /// finalization committee for the epoch.
5565    #[prost(message, repeated, tag = "5")]
5566    pub signatories: ::prost::alloc::vec::Vec<FinalizerIndex>,
5567}
5568/// A (non-aggregate) signature of a validator. This is used to sign blocks produced by
5569/// the validator as well as some finalization messages.
5570#[derive(Clone, PartialEq, ::prost::Message)]
5571pub struct BlockSignature {
5572    #[prost(bytes = "vec", tag = "1")]
5573    pub value: ::prost::alloc::vec::Vec<u8>,
5574}
5575/// A timeout message including the sender's signature.
5576#[derive(Clone, PartialEq, ::prost::Message)]
5577pub struct TimeoutMessage {
5578    /// Index of the finalizer signing the message.
5579    #[prost(message, optional, tag = "1")]
5580    pub finalizer: ::core::option::Option<FinalizerIndex>,
5581    /// Round which timed out.
5582    #[prost(message, optional, tag = "2")]
5583    pub round: ::core::option::Option<Round>,
5584    /// Current epoch number of the finalizer sending the timeout message.
5585    /// This can be different from the epoch of the quorum certificate.
5586    #[prost(message, optional, tag = "3")]
5587    pub epoch: ::core::option::Option<Epoch>,
5588    /// Highest quorum certificate known to the finalizer at the time of timeout.
5589    #[prost(message, optional, tag = "4")]
5590    pub quorum_certificate: ::core::option::Option<RawQuorumCertificate>,
5591    /// Signature on the appropriate timeout signature message.
5592    #[prost(message, optional, tag = "5")]
5593    pub signature: ::core::option::Option<TimeoutSignature>,
5594    /// Signature of the finalizer on the timeout message as a whole.
5595    #[prost(message, optional, tag = "6")]
5596    pub message_signature: ::core::option::Option<BlockSignature>,
5597}
5598#[derive(Clone, PartialEq, ::prost::Message)]
5599pub struct RawFinalizerRound {
5600    /// The round that was signed off.
5601    #[prost(message, optional, tag = "1")]
5602    pub round: ::core::option::Option<Round>,
5603    /// The finalizers (identified by their 'FinalizerIndex') that
5604    /// signed off in 'round'.
5605    #[prost(message, repeated, tag = "2")]
5606    pub finalizers: ::prost::alloc::vec::Vec<FinalizerIndex>,
5607}
5608/// A timeout certificate is the certificate that the
5609/// finalization committee issues when a round times out,
5610/// thus making it possible for the protocol to proceed to the
5611/// next round.
5612#[derive(Clone, PartialEq, ::prost::Message)]
5613pub struct RawTimeoutCertificate {
5614    /// The round that timed out.
5615    #[prost(message, optional, tag = "1")]
5616    pub round: ::core::option::Option<Round>,
5617    /// The minimum epoch of which signatures are included
5618    /// in the 'aggregate_signature'.
5619    #[prost(message, optional, tag = "2")]
5620    pub min_epoch: ::core::option::Option<Epoch>,
5621    /// The rounds of which finalizers have their best
5622    /// QCs in the 'min_epoch'.
5623    #[prost(message, repeated, tag = "3")]
5624    pub qc_rounds_first_epoch: ::prost::alloc::vec::Vec<RawFinalizerRound>,
5625    /// The rounds of which finalizers have their best
5626    /// QCs in the epoch 'min_epoch' + 1.
5627    #[prost(message, repeated, tag = "4")]
5628    pub qc_rounds_second_epoch: ::prost::alloc::vec::Vec<RawFinalizerRound>,
5629    /// The aggregated signature by the finalization committee that witnessed
5630    /// the 'round' timed out.
5631    #[prost(message, optional, tag = "5")]
5632    pub aggregate_signature: ::core::option::Option<TimeoutSignature>,
5633}
5634#[derive(Clone, PartialEq, ::prost::Message)]
5635pub struct PersistentRoundStatus {
5636    /// The last signed quorum message by the node.
5637    #[prost(message, optional, tag = "1")]
5638    pub last_signed_quorum_message: ::core::option::Option<QuorumMessage>,
5639    /// The last signed timeout message by the node.
5640    #[prost(message, optional, tag = "2")]
5641    pub last_signed_timeout_message: ::core::option::Option<TimeoutMessage>,
5642    /// The last round the node baked in.
5643    #[prost(message, optional, tag = "3")]
5644    pub last_baked_round: ::core::option::Option<Round>,
5645    /// The latest timeout certificate seen by the node. May be absent if the node has seen a
5646    /// quorum certificate for a more recent round.
5647    #[prost(message, optional, tag = "4")]
5648    pub latest_timeout: ::core::option::Option<RawTimeoutCertificate>,
5649}
5650#[derive(Clone, PartialEq, ::prost::Message)]
5651pub struct RoundTimeout {
5652    /// Timeout certificate for the round that timed out.
5653    #[prost(message, optional, tag = "1")]
5654    pub timeout_certificate: ::core::option::Option<RawTimeoutCertificate>,
5655    /// The highest known quorum certificate when the round timed out.
5656    #[prost(message, optional, tag = "2")]
5657    pub quorum_certificate: ::core::option::Option<RawQuorumCertificate>,
5658}
5659#[derive(Clone, PartialEq, ::prost::Message)]
5660pub struct RawFinalizationEntry {
5661    /// The quorum certificate for the finalized block.
5662    #[prost(message, optional, tag = "1")]
5663    pub finalized_qc: ::core::option::Option<RawQuorumCertificate>,
5664    /// The quorum certificate for the block that finalizes
5665    /// the block that 'finalized_qc' points to.
5666    #[prost(message, optional, tag = "2")]
5667    pub successor_qc: ::core::option::Option<RawQuorumCertificate>,
5668    /// A proof that the successor block is an immediate
5669    /// successor of the finalized block.
5670    #[prost(message, optional, tag = "3")]
5671    pub successor_proof: ::core::option::Option<SuccessorProof>,
5672}
5673/// The current round status.
5674#[derive(Clone, PartialEq, ::prost::Message)]
5675pub struct RoundStatus {
5676    /// The current round from the perspective of the node.
5677    /// This should always be higher than the round of the highest certified block.
5678    /// If the previous round did not timeout, it should be one more than the round of
5679    /// the `highest_certified_block`. Otherwise, it should be one more than the round of
5680    /// the `previous_round_timeout`.
5681    #[prost(message, optional, tag = "1")]
5682    pub current_round: ::core::option::Option<Round>,
5683    /// The quorum certificate for the highest certified block.
5684    #[prost(message, optional, tag = "2")]
5685    pub highest_certified_block: ::core::option::Option<RawQuorumCertificate>,
5686    /// If the last round timed out, this is the timeout certificate for that round and
5687    /// the highest quorum certificate at the time the round timed out.
5688    #[prost(message, optional, tag = "3")]
5689    pub previous_round_timeout: ::core::option::Option<RoundTimeout>,
5690    /// Flag indicating whether the node should attempt to bake in the current round.
5691    /// This is set to true when the round is advanced, and set to false once the node has
5692    /// attempted to bake for the round.
5693    #[prost(bool, tag = "4")]
5694    pub round_eligible_to_bake: bool,
5695    /// The current epoch. This should either be the same as the epoch of the last finalized
5696    /// block (if its timestamp is before the trigger block time) or the next epoch from the last
5697    /// finalized block (if its timestamp is at least the trigger block time).
5698    #[prost(message, optional, tag = "5")]
5699    pub current_epoch: ::core::option::Option<Epoch>,
5700    /// If present, an epoch finalization entry for the epoch before `current_epoch`.
5701    /// An entry must be present if the current epoch is greater than the epoch of the last
5702    /// finalized block.
5703    #[prost(message, optional, tag = "6")]
5704    pub last_epoch_finalization_entry: ::core::option::Option<RawFinalizationEntry>,
5705    /// The current duration the node will wait before a round times out.
5706    #[prost(message, optional, tag = "7")]
5707    pub current_timeout: ::core::option::Option<Duration>,
5708}
5709#[derive(Clone, PartialEq, ::prost::Message)]
5710pub struct BlockTableSummary {
5711    /// The number of blocks in the dead block cache.
5712    #[prost(uint64, tag = "1")]
5713    pub dead_block_cache_size: u64,
5714    /// The blocks that are currently live (not dead and not finalized).
5715    #[prost(message, repeated, tag = "2")]
5716    pub live_blocks: ::prost::alloc::vec::Vec<BlockHash>,
5717}
5718/// A list of block hashes at a particular branch height.
5719#[derive(Clone, PartialEq, ::prost::Message)]
5720pub struct BranchBlocks {
5721    #[prost(message, repeated, tag = "1")]
5722    pub blocks_at_branch_height: ::prost::alloc::vec::Vec<BlockHash>,
5723}
5724#[derive(Clone, PartialEq, ::prost::Message)]
5725pub struct RoundExistingBlock {
5726    /// The round for which the node saw a block.
5727    #[prost(message, optional, tag = "1")]
5728    pub round: ::core::option::Option<Round>,
5729    /// The validator that baked the block.
5730    #[prost(message, optional, tag = "2")]
5731    pub baker: ::core::option::Option<BakerId>,
5732    /// The hash of the block.
5733    #[prost(message, optional, tag = "3")]
5734    pub block: ::core::option::Option<BlockHash>,
5735}
5736#[derive(Clone, Copy, PartialEq, ::prost::Message)]
5737pub struct RoundExistingQc {
5738    /// The round for which a QC was seen.
5739    #[prost(message, optional, tag = "1")]
5740    pub round: ::core::option::Option<Round>,
5741    /// The epoch of the QC.
5742    #[prost(message, optional, tag = "2")]
5743    pub epoch: ::core::option::Option<Epoch>,
5744}
5745/// The keys and stake of a specific validator.
5746#[derive(Clone, PartialEq, ::prost::Message)]
5747pub struct FullBakerInfo {
5748    /// The validator's identity.
5749    #[prost(message, optional, tag = "1")]
5750    pub baker_identity: ::core::option::Option<BakerId>,
5751    /// The validator's election verify key.
5752    #[prost(message, optional, tag = "2")]
5753    pub election_verify_key: ::core::option::Option<BakerElectionVerifyKey>,
5754    /// The validator's signature verify key.
5755    #[prost(message, optional, tag = "3")]
5756    pub signature_verify_key: ::core::option::Option<BakerSignatureVerifyKey>,
5757    /// The validator's aggregation verify key.
5758    #[prost(message, optional, tag = "4")]
5759    pub aggregation_verify_key: ::core::option::Option<BakerAggregationVerifyKey>,
5760    /// The stake of the validator.
5761    #[prost(message, optional, tag = "5")]
5762    pub stake: ::core::option::Option<Amount>,
5763}
5764/// The hash of the finalization committee, derived from the weights and aggregation
5765/// keys of the finalizers.
5766#[derive(Clone, PartialEq, ::prost::Message)]
5767pub struct FinalizationCommitteeHash {
5768    #[prost(bytes = "vec", tag = "1")]
5769    pub value: ::prost::alloc::vec::Vec<u8>,
5770}
5771#[derive(Clone, PartialEq, ::prost::Message)]
5772pub struct BakersAndFinalizers {
5773    /// The set of validators.
5774    #[prost(message, repeated, tag = "1")]
5775    pub bakers: ::prost::alloc::vec::Vec<FullBakerInfo>,
5776    /// The IDs of the validators that are finalizers.
5777    /// The order determines the finalizer index.
5778    #[prost(message, repeated, tag = "2")]
5779    pub finalizers: ::prost::alloc::vec::Vec<BakerId>,
5780    /// The total effective stake of the validators.
5781    #[prost(message, optional, tag = "3")]
5782    pub baker_total_stake: ::core::option::Option<Amount>,
5783    /// The total effective stake of the finalizers.
5784    #[prost(message, optional, tag = "4")]
5785    pub finalizer_total_stake: ::core::option::Option<Amount>,
5786    /// The hash of the finalization committee.
5787    #[prost(message, optional, tag = "5")]
5788    pub finalization_committee_hash: ::core::option::Option<FinalizationCommitteeHash>,
5789}
5790#[derive(Clone, PartialEq, ::prost::Message)]
5791pub struct EpochBakers {
5792    /// The validators and finalizers for the previous epoch.
5793    /// If the current epoch is 0, then this is the same as the validators for the current epoch.
5794    #[prost(message, optional, tag = "1")]
5795    pub previous_epoch_bakers: ::core::option::Option<BakersAndFinalizers>,
5796    /// The validators and finalizers for the current epoch.
5797    /// If this is absent, it should be treated as the same as the validators for the previous epoch.
5798    #[prost(message, optional, tag = "2")]
5799    pub current_epoch_bakers: ::core::option::Option<BakersAndFinalizers>,
5800    /// The validators and finalizers for the next epoch.
5801    /// If this is absent, it should be treated as the same as the validators for the current epoch.
5802    #[prost(message, optional, tag = "3")]
5803    pub next_epoch_bakers: ::core::option::Option<BakersAndFinalizers>,
5804    /// The first epoch of the next payday.
5805    #[prost(message, optional, tag = "4")]
5806    pub next_payday: ::core::option::Option<Epoch>,
5807}
5808#[derive(Clone, PartialEq, ::prost::Message)]
5809pub struct TimeoutMessages {
5810    /// The first epoch for which timeout messages are present.
5811    #[prost(message, optional, tag = "1")]
5812    pub first_epoch: ::core::option::Option<Epoch>,
5813    /// The timeout messages for the first epoch.
5814    /// There should always be at least one.
5815    #[prost(message, repeated, tag = "2")]
5816    pub first_epoch_timeouts: ::prost::alloc::vec::Vec<TimeoutMessage>,
5817    /// The timeout messages for `first_epoch + 1`.
5818    #[prost(message, repeated, tag = "3")]
5819    pub second_epoch_timeouts: ::prost::alloc::vec::Vec<TimeoutMessage>,
5820}
5821#[derive(Clone, PartialEq, ::prost::Message)]
5822pub struct AggregatedSignatures {
5823    /// The block hash for which the signatures are aggregated.
5824    #[prost(message, optional, tag = "1")]
5825    pub signed_block: ::core::option::Option<BlockHash>,
5826    /// The total weight of the finalizers that signed the block.
5827    #[prost(message, optional, tag = "2")]
5828    pub signature_weight: ::core::option::Option<Amount>,
5829    /// The aggregate signature of the finalizers.
5830    #[prost(message, optional, tag = "3")]
5831    pub aggregate_signature: ::core::option::Option<QuorumSignature>,
5832    /// The set of finalizers that have signed.
5833    #[prost(message, repeated, tag = "4")]
5834    pub signatories: ::prost::alloc::vec::Vec<FinalizerIndex>,
5835}
5836#[derive(Clone, PartialEq, ::prost::Message)]
5837pub struct QuorumMessages {
5838    /// The collected quorum messages for the current round.
5839    #[prost(message, repeated, tag = "1")]
5840    pub quorum_messages: ::prost::alloc::vec::Vec<QuorumMessage>,
5841    /// The current aggregate of the valid quorum messages.
5842    #[prost(message, repeated, tag = "2")]
5843    pub aggregated_signatures: ::prost::alloc::vec::Vec<AggregatedSignatures>,
5844}
5845#[derive(Clone, Copy, PartialEq, ::prost::Message)]
5846pub struct ConsensusDetailedStatusQuery {
5847    /// If specified, this determines the genesis index to get status for.
5848    /// If not specified, the status is returned for the latest genesis index.
5849    #[prost(message, optional, tag = "1")]
5850    pub genesis_index: ::core::option::Option<GenesisIndex>,
5851}
5852#[derive(Clone, PartialEq, ::prost::Message)]
5853pub struct ConsensusDetailedStatus {
5854    /// The hash of the genesis block.
5855    #[prost(message, optional, tag = "1")]
5856    pub genesis_block: ::core::option::Option<BlockHash>,
5857    /// The persisted elements of the round status.
5858    #[prost(message, optional, tag = "2")]
5859    pub persistent_round_status: ::core::option::Option<PersistentRoundStatus>,
5860    /// The status of the current round.
5861    #[prost(message, optional, tag = "3")]
5862    pub round_status: ::core::option::Option<RoundStatus>,
5863    /// The number of non-finalized transactions.
5864    #[prost(uint64, tag = "4")]
5865    pub non_finalized_transaction_count: u64,
5866    /// The purge counter for the transaction table.
5867    #[prost(int64, tag = "5")]
5868    pub transaction_table_purge_counter: i64,
5869    /// Summary of the block table.
5870    #[prost(message, optional, tag = "6")]
5871    pub block_table: ::core::option::Option<BlockTableSummary>,
5872    /// The live blocks organized by height after the last finalized block.
5873    #[prost(message, repeated, tag = "7")]
5874    pub branches: ::prost::alloc::vec::Vec<BranchBlocks>,
5875    /// Which validators the node has seen legally-signed blocks with live parents from in
5876    /// non-finalized rounds.
5877    #[prost(message, repeated, tag = "8")]
5878    pub round_existing_blocks: ::prost::alloc::vec::Vec<RoundExistingBlock>,
5879    /// Which non-finalized rounds the node has seen quorum certificates for.
5880    #[prost(message, repeated, tag = "9")]
5881    pub round_existing_qcs: ::prost::alloc::vec::Vec<RoundExistingQc>,
5882    /// The absolute block height of the genesis block of the era.
5883    #[prost(message, optional, tag = "10")]
5884    pub genesis_block_height: ::core::option::Option<AbsoluteBlockHeight>,
5885    /// The hash of the last finalized block.
5886    #[prost(message, optional, tag = "11")]
5887    pub last_finalized_block: ::core::option::Option<BlockHash>,
5888    /// The height of the last finalized block.
5889    #[prost(message, optional, tag = "12")]
5890    pub last_finalized_block_height: ::core::option::Option<BlockHeight>,
5891    /// Unless the last finalized block is the genesis block, this should be a finalization
5892    /// entry for the last finalized block.
5893    /// As this includes a quorum certificate for the last finalized block, that can be used
5894    /// to determine the epoch and round of the last finalized block.
5895    #[prost(message, optional, tag = "13")]
5896    pub latest_finalization_entry: ::core::option::Option<RawFinalizationEntry>,
5897    /// The validators and finalizers for the previous, current and next epoch, relative to the last
5898    /// finalized block.
5899    #[prost(message, optional, tag = "14")]
5900    pub epoch_bakers: ::core::option::Option<EpochBakers>,
5901    /// The timeout messages collected by the node for the current round.
5902    #[prost(message, optional, tag = "15")]
5903    pub timeout_messages: ::core::option::Option<TimeoutMessages>,
5904    /// If a protocol update has occurred, this is the hash of the terminal block.
5905    #[prost(message, optional, tag = "16")]
5906    pub terminal_block: ::core::option::Option<BlockHash>,
5907}
5908/// Indicates that an account is pending -- either a scheduled release or a cooldown -- and
5909/// when the first release or cooldown will elapse.
5910#[derive(Clone, Copy, PartialEq, ::prost::Message)]
5911pub struct AccountPending {
5912    #[prost(message, optional, tag = "1")]
5913    pub account_index: ::core::option::Option<AccountIndex>,
5914    #[prost(message, optional, tag = "2")]
5915    pub first_timestamp: ::core::option::Option<Timestamp>,
5916}
5917/// Information about how open the pool is to new delegators.
5918///
5919/// This type might be extended in future versions of the API.
5920#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
5921#[repr(i32)]
5922pub enum OpenStatus {
5923    OpenForAll = 0,
5924    ClosedForNew = 1,
5925    ClosedForAll = 2,
5926}
5927impl OpenStatus {
5928    /// String value of the enum field names used in the ProtoBuf definition.
5929    ///
5930    /// The values are not transformed in any way and thus are considered stable
5931    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
5932    pub fn as_str_name(&self) -> &'static str {
5933        match self {
5934            Self::OpenForAll => "OPEN_STATUS_OPEN_FOR_ALL",
5935            Self::ClosedForNew => "OPEN_STATUS_CLOSED_FOR_NEW",
5936            Self::ClosedForAll => "OPEN_STATUS_CLOSED_FOR_ALL",
5937        }
5938    }
5939    /// Creates an enum from field names used in the ProtoBuf definition.
5940    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
5941        match value {
5942            "OPEN_STATUS_OPEN_FOR_ALL" => Some(Self::OpenForAll),
5943            "OPEN_STATUS_CLOSED_FOR_NEW" => Some(Self::ClosedForNew),
5944            "OPEN_STATUS_CLOSED_FOR_ALL" => Some(Self::ClosedForAll),
5945            _ => None,
5946        }
5947    }
5948}
5949/// Version of smart contract.
5950///
5951/// This type might be extended in future versions of the API.
5952#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
5953#[repr(i32)]
5954pub enum ContractVersion {
5955    V0 = 0,
5956    V1 = 1,
5957}
5958impl ContractVersion {
5959    /// String value of the enum field names used in the ProtoBuf definition.
5960    ///
5961    /// The values are not transformed in any way and thus are considered stable
5962    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
5963    pub fn as_str_name(&self) -> &'static str {
5964        match self {
5965            Self::V0 => "V0",
5966            Self::V1 => "V1",
5967        }
5968    }
5969    /// Creates an enum from field names used in the ProtoBuf definition.
5970    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
5971        match value {
5972            "V0" => Some(Self::V0),
5973            "V1" => Some(Self::V1),
5974            _ => None,
5975        }
5976    }
5977}
5978/// The type of a credential.
5979///
5980/// This type might be extended in future versions of the API.
5981#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
5982#[repr(i32)]
5983pub enum CredentialType {
5984    /// An initial credential created by the identity provider.
5985    Initial = 0,
5986    /// A normal credential type created by the account.
5987    Normal = 1,
5988}
5989impl CredentialType {
5990    /// String value of the enum field names used in the ProtoBuf definition.
5991    ///
5992    /// The values are not transformed in any way and thus are considered stable
5993    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
5994    pub fn as_str_name(&self) -> &'static str {
5995        match self {
5996            Self::Initial => "CREDENTIAL_TYPE_INITIAL",
5997            Self::Normal => "CREDENTIAL_TYPE_NORMAL",
5998        }
5999    }
6000    /// Creates an enum from field names used in the ProtoBuf definition.
6001    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
6002        match value {
6003            "CREDENTIAL_TYPE_INITIAL" => Some(Self::Initial),
6004            "CREDENTIAL_TYPE_NORMAL" => Some(Self::Normal),
6005            _ => None,
6006        }
6007    }
6008}
6009/// The type of chain update.
6010///
6011/// This type might be extended in future versions of the API.
6012#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
6013#[repr(i32)]
6014pub enum UpdateType {
6015    UpdateProtocol = 0,
6016    UpdateElectionDifficulty = 1,
6017    UpdateEuroPerEnergy = 2,
6018    UpdateMicroCcdPerEuro = 3,
6019    UpdateFoundationAccount = 4,
6020    UpdateMintDistribution = 5,
6021    UpdateTransactionFeeDistribution = 6,
6022    UpdateGasRewards = 7,
6023    UpdatePoolParameters = 8,
6024    AddAnonymityRevoker = 9,
6025    AddIdentityProvider = 10,
6026    UpdateRootKeys = 11,
6027    UpdateLevel1Keys = 12,
6028    UpdateLevel2Keys = 13,
6029    UpdateCooldownParameters = 14,
6030    UpdateTimeParameters = 15,
6031    UpdateTimeoutParameters = 16,
6032    UpdateMinBlockTime = 17,
6033    UpdateBlockEnergyLimit = 18,
6034    UpdateFinalizationCommitteeParameters = 19,
6035    UpdateValidatorScoreParameters = 20,
6036    UpdateCreatePlt = 21,
6037}
6038impl UpdateType {
6039    /// String value of the enum field names used in the ProtoBuf definition.
6040    ///
6041    /// The values are not transformed in any way and thus are considered stable
6042    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
6043    pub fn as_str_name(&self) -> &'static str {
6044        match self {
6045            Self::UpdateProtocol => "UPDATE_PROTOCOL",
6046            Self::UpdateElectionDifficulty => "UPDATE_ELECTION_DIFFICULTY",
6047            Self::UpdateEuroPerEnergy => "UPDATE_EURO_PER_ENERGY",
6048            Self::UpdateMicroCcdPerEuro => "UPDATE_MICRO_CCD_PER_EURO",
6049            Self::UpdateFoundationAccount => "UPDATE_FOUNDATION_ACCOUNT",
6050            Self::UpdateMintDistribution => "UPDATE_MINT_DISTRIBUTION",
6051            Self::UpdateTransactionFeeDistribution => {
6052                "UPDATE_TRANSACTION_FEE_DISTRIBUTION"
6053            }
6054            Self::UpdateGasRewards => "UPDATE_GAS_REWARDS",
6055            Self::UpdatePoolParameters => "UPDATE_POOL_PARAMETERS",
6056            Self::AddAnonymityRevoker => "ADD_ANONYMITY_REVOKER",
6057            Self::AddIdentityProvider => "ADD_IDENTITY_PROVIDER",
6058            Self::UpdateRootKeys => "UPDATE_ROOT_KEYS",
6059            Self::UpdateLevel1Keys => "UPDATE_LEVEL1_KEYS",
6060            Self::UpdateLevel2Keys => "UPDATE_LEVEL2_KEYS",
6061            Self::UpdateCooldownParameters => "UPDATE_COOLDOWN_PARAMETERS",
6062            Self::UpdateTimeParameters => "UPDATE_TIME_PARAMETERS",
6063            Self::UpdateTimeoutParameters => "UPDATE_TIMEOUT_PARAMETERS",
6064            Self::UpdateMinBlockTime => "UPDATE_MIN_BLOCK_TIME",
6065            Self::UpdateBlockEnergyLimit => "UPDATE_BLOCK_ENERGY_LIMIT",
6066            Self::UpdateFinalizationCommitteeParameters => {
6067                "UPDATE_FINALIZATION_COMMITTEE_PARAMETERS"
6068            }
6069            Self::UpdateValidatorScoreParameters => "UPDATE_VALIDATOR_SCORE_PARAMETERS",
6070            Self::UpdateCreatePlt => "UPDATE_CREATE_PLT",
6071        }
6072    }
6073    /// Creates an enum from field names used in the ProtoBuf definition.
6074    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
6075        match value {
6076            "UPDATE_PROTOCOL" => Some(Self::UpdateProtocol),
6077            "UPDATE_ELECTION_DIFFICULTY" => Some(Self::UpdateElectionDifficulty),
6078            "UPDATE_EURO_PER_ENERGY" => Some(Self::UpdateEuroPerEnergy),
6079            "UPDATE_MICRO_CCD_PER_EURO" => Some(Self::UpdateMicroCcdPerEuro),
6080            "UPDATE_FOUNDATION_ACCOUNT" => Some(Self::UpdateFoundationAccount),
6081            "UPDATE_MINT_DISTRIBUTION" => Some(Self::UpdateMintDistribution),
6082            "UPDATE_TRANSACTION_FEE_DISTRIBUTION" => {
6083                Some(Self::UpdateTransactionFeeDistribution)
6084            }
6085            "UPDATE_GAS_REWARDS" => Some(Self::UpdateGasRewards),
6086            "UPDATE_POOL_PARAMETERS" => Some(Self::UpdatePoolParameters),
6087            "ADD_ANONYMITY_REVOKER" => Some(Self::AddAnonymityRevoker),
6088            "ADD_IDENTITY_PROVIDER" => Some(Self::AddIdentityProvider),
6089            "UPDATE_ROOT_KEYS" => Some(Self::UpdateRootKeys),
6090            "UPDATE_LEVEL1_KEYS" => Some(Self::UpdateLevel1Keys),
6091            "UPDATE_LEVEL2_KEYS" => Some(Self::UpdateLevel2Keys),
6092            "UPDATE_COOLDOWN_PARAMETERS" => Some(Self::UpdateCooldownParameters),
6093            "UPDATE_TIME_PARAMETERS" => Some(Self::UpdateTimeParameters),
6094            "UPDATE_TIMEOUT_PARAMETERS" => Some(Self::UpdateTimeoutParameters),
6095            "UPDATE_MIN_BLOCK_TIME" => Some(Self::UpdateMinBlockTime),
6096            "UPDATE_BLOCK_ENERGY_LIMIT" => Some(Self::UpdateBlockEnergyLimit),
6097            "UPDATE_FINALIZATION_COMMITTEE_PARAMETERS" => {
6098                Some(Self::UpdateFinalizationCommitteeParameters)
6099            }
6100            "UPDATE_VALIDATOR_SCORE_PARAMETERS" => {
6101                Some(Self::UpdateValidatorScoreParameters)
6102            }
6103            "UPDATE_CREATE_PLT" => Some(Self::UpdateCreatePlt),
6104            _ => None,
6105        }
6106    }
6107}
6108/// The type of transaction.
6109///
6110/// This type might be extended in future versions of the API.
6111#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
6112#[repr(i32)]
6113pub enum TransactionType {
6114    DeployModule = 0,
6115    InitContract = 1,
6116    Update = 2,
6117    Transfer = 3,
6118    /// Deprecated in protocol version 4.
6119    AddBaker = 4,
6120    /// Deprecated in protocol version 4.
6121    RemoveBaker = 5,
6122    /// Deprecated in protocol version 4.
6123    UpdateBakerStake = 6,
6124    /// Deprecated in protocol version 4.
6125    UpdateBakerRestakeEarnings = 7,
6126    /// Deprecated in protocol version 4.
6127    UpdateBakerKeys = 8,
6128    UpdateCredentialKeys = 9,
6129    /// Deprecated in protocol version 7.
6130    EncryptedAmountTransfer = 10,
6131    /// Deprecated in protocol version 7.
6132    TransferToEncrypted = 11,
6133    TransferToPublic = 12,
6134    TransferWithSchedule = 13,
6135    UpdateCredentials = 14,
6136    RegisterData = 15,
6137    /// Introduced in protocol version 2.
6138    TransferWithMemo = 16,
6139    /// Deprecated in protocol version 7.
6140    /// Introduced in protocol version 2.
6141    EncryptedAmountTransferWithMemo = 17,
6142    /// Introduced in protocol version 2.
6143    TransferWithScheduleAndMemo = 18,
6144    /// Introduced in protocol version 4.
6145    ConfigureBaker = 19,
6146    /// Introduced in protocol version 4.
6147    ConfigureDelegation = 20,
6148    /// Introduced in protocol version 9.
6149    TokenUpdate = 21,
6150}
6151impl TransactionType {
6152    /// String value of the enum field names used in the ProtoBuf definition.
6153    ///
6154    /// The values are not transformed in any way and thus are considered stable
6155    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
6156    pub fn as_str_name(&self) -> &'static str {
6157        match self {
6158            Self::DeployModule => "DEPLOY_MODULE",
6159            Self::InitContract => "INIT_CONTRACT",
6160            Self::Update => "UPDATE",
6161            Self::Transfer => "TRANSFER",
6162            Self::AddBaker => "ADD_BAKER",
6163            Self::RemoveBaker => "REMOVE_BAKER",
6164            Self::UpdateBakerStake => "UPDATE_BAKER_STAKE",
6165            Self::UpdateBakerRestakeEarnings => "UPDATE_BAKER_RESTAKE_EARNINGS",
6166            Self::UpdateBakerKeys => "UPDATE_BAKER_KEYS",
6167            Self::UpdateCredentialKeys => "UPDATE_CREDENTIAL_KEYS",
6168            Self::EncryptedAmountTransfer => "ENCRYPTED_AMOUNT_TRANSFER",
6169            Self::TransferToEncrypted => "TRANSFER_TO_ENCRYPTED",
6170            Self::TransferToPublic => "TRANSFER_TO_PUBLIC",
6171            Self::TransferWithSchedule => "TRANSFER_WITH_SCHEDULE",
6172            Self::UpdateCredentials => "UPDATE_CREDENTIALS",
6173            Self::RegisterData => "REGISTER_DATA",
6174            Self::TransferWithMemo => "TRANSFER_WITH_MEMO",
6175            Self::EncryptedAmountTransferWithMemo => {
6176                "ENCRYPTED_AMOUNT_TRANSFER_WITH_MEMO"
6177            }
6178            Self::TransferWithScheduleAndMemo => "TRANSFER_WITH_SCHEDULE_AND_MEMO",
6179            Self::ConfigureBaker => "CONFIGURE_BAKER",
6180            Self::ConfigureDelegation => "CONFIGURE_DELEGATION",
6181            Self::TokenUpdate => "TOKEN_UPDATE",
6182        }
6183    }
6184    /// Creates an enum from field names used in the ProtoBuf definition.
6185    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
6186        match value {
6187            "DEPLOY_MODULE" => Some(Self::DeployModule),
6188            "INIT_CONTRACT" => Some(Self::InitContract),
6189            "UPDATE" => Some(Self::Update),
6190            "TRANSFER" => Some(Self::Transfer),
6191            "ADD_BAKER" => Some(Self::AddBaker),
6192            "REMOVE_BAKER" => Some(Self::RemoveBaker),
6193            "UPDATE_BAKER_STAKE" => Some(Self::UpdateBakerStake),
6194            "UPDATE_BAKER_RESTAKE_EARNINGS" => Some(Self::UpdateBakerRestakeEarnings),
6195            "UPDATE_BAKER_KEYS" => Some(Self::UpdateBakerKeys),
6196            "UPDATE_CREDENTIAL_KEYS" => Some(Self::UpdateCredentialKeys),
6197            "ENCRYPTED_AMOUNT_TRANSFER" => Some(Self::EncryptedAmountTransfer),
6198            "TRANSFER_TO_ENCRYPTED" => Some(Self::TransferToEncrypted),
6199            "TRANSFER_TO_PUBLIC" => Some(Self::TransferToPublic),
6200            "TRANSFER_WITH_SCHEDULE" => Some(Self::TransferWithSchedule),
6201            "UPDATE_CREDENTIALS" => Some(Self::UpdateCredentials),
6202            "REGISTER_DATA" => Some(Self::RegisterData),
6203            "TRANSFER_WITH_MEMO" => Some(Self::TransferWithMemo),
6204            "ENCRYPTED_AMOUNT_TRANSFER_WITH_MEMO" => {
6205                Some(Self::EncryptedAmountTransferWithMemo)
6206            }
6207            "TRANSFER_WITH_SCHEDULE_AND_MEMO" => Some(Self::TransferWithScheduleAndMemo),
6208            "CONFIGURE_BAKER" => Some(Self::ConfigureBaker),
6209            "CONFIGURE_DELEGATION" => Some(Self::ConfigureDelegation),
6210            "TOKEN_UPDATE" => Some(Self::TokenUpdate),
6211            _ => None,
6212        }
6213    }
6214}
6215/// The different versions of the protocol.
6216///
6217/// This type might be extended in future versions of the API.
6218#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
6219#[repr(i32)]
6220pub enum ProtocolVersion {
6221    ProtocolVersion1 = 0,
6222    ProtocolVersion2 = 1,
6223    ProtocolVersion3 = 2,
6224    ProtocolVersion4 = 3,
6225    ProtocolVersion5 = 4,
6226    ProtocolVersion6 = 5,
6227    ProtocolVersion7 = 6,
6228    ProtocolVersion8 = 7,
6229    ProtocolVersion9 = 8,
6230    ProtocolVersion10 = 9,
6231}
6232impl ProtocolVersion {
6233    /// String value of the enum field names used in the ProtoBuf definition.
6234    ///
6235    /// The values are not transformed in any way and thus are considered stable
6236    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
6237    pub fn as_str_name(&self) -> &'static str {
6238        match self {
6239            Self::ProtocolVersion1 => "PROTOCOL_VERSION_1",
6240            Self::ProtocolVersion2 => "PROTOCOL_VERSION_2",
6241            Self::ProtocolVersion3 => "PROTOCOL_VERSION_3",
6242            Self::ProtocolVersion4 => "PROTOCOL_VERSION_4",
6243            Self::ProtocolVersion5 => "PROTOCOL_VERSION_5",
6244            Self::ProtocolVersion6 => "PROTOCOL_VERSION_6",
6245            Self::ProtocolVersion7 => "PROTOCOL_VERSION_7",
6246            Self::ProtocolVersion8 => "PROTOCOL_VERSION_8",
6247            Self::ProtocolVersion9 => "PROTOCOL_VERSION_9",
6248            Self::ProtocolVersion10 => "PROTOCOL_VERSION_10",
6249        }
6250    }
6251    /// Creates an enum from field names used in the ProtoBuf definition.
6252    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
6253        match value {
6254            "PROTOCOL_VERSION_1" => Some(Self::ProtocolVersion1),
6255            "PROTOCOL_VERSION_2" => Some(Self::ProtocolVersion2),
6256            "PROTOCOL_VERSION_3" => Some(Self::ProtocolVersion3),
6257            "PROTOCOL_VERSION_4" => Some(Self::ProtocolVersion4),
6258            "PROTOCOL_VERSION_5" => Some(Self::ProtocolVersion5),
6259            "PROTOCOL_VERSION_6" => Some(Self::ProtocolVersion6),
6260            "PROTOCOL_VERSION_7" => Some(Self::ProtocolVersion7),
6261            "PROTOCOL_VERSION_8" => Some(Self::ProtocolVersion8),
6262            "PROTOCOL_VERSION_9" => Some(Self::ProtocolVersion9),
6263            "PROTOCOL_VERSION_10" => Some(Self::ProtocolVersion10),
6264            _ => None,
6265        }
6266    }
6267}
6268/// Generated client implementations.
6269pub mod queries_client {
6270    #![allow(
6271        unused_variables,
6272        dead_code,
6273        missing_docs,
6274        clippy::wildcard_imports,
6275        clippy::let_unit_value,
6276    )]
6277    use tonic::codegen::*;
6278    use tonic::codegen::http::Uri;
6279    #[derive(Debug, Clone)]
6280    pub struct QueriesClient<T> {
6281        inner: tonic::client::Grpc<T>,
6282    }
6283    impl QueriesClient<tonic::transport::Channel> {
6284        /// Attempt to create a new client by connecting to a given endpoint.
6285        pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
6286        where
6287            D: TryInto<tonic::transport::Endpoint>,
6288            D::Error: Into<StdError>,
6289        {
6290            let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
6291            Ok(Self::new(conn))
6292        }
6293    }
6294    impl<T> QueriesClient<T>
6295    where
6296        T: tonic::client::GrpcService<tonic::body::BoxBody>,
6297        T::Error: Into<StdError>,
6298        T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static,
6299        <T::ResponseBody as Body>::Error: Into<StdError> + std::marker::Send,
6300    {
6301        pub fn new(inner: T) -> Self {
6302            let inner = tonic::client::Grpc::new(inner);
6303            Self { inner }
6304        }
6305        pub fn with_origin(inner: T, origin: Uri) -> Self {
6306            let inner = tonic::client::Grpc::with_origin(inner, origin);
6307            Self { inner }
6308        }
6309        pub fn with_interceptor<F>(
6310            inner: T,
6311            interceptor: F,
6312        ) -> QueriesClient<InterceptedService<T, F>>
6313        where
6314            F: tonic::service::Interceptor,
6315            T::ResponseBody: Default,
6316            T: tonic::codegen::Service<
6317                http::Request<tonic::body::BoxBody>,
6318                Response = http::Response<
6319                    <T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody,
6320                >,
6321            >,
6322            <T as tonic::codegen::Service<
6323                http::Request<tonic::body::BoxBody>,
6324            >>::Error: Into<StdError> + std::marker::Send + std::marker::Sync,
6325        {
6326            QueriesClient::new(InterceptedService::new(inner, interceptor))
6327        }
6328        /// Compress requests with the given encoding.
6329        ///
6330        /// This requires the server to support it otherwise it might respond with an
6331        /// error.
6332        #[must_use]
6333        pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
6334            self.inner = self.inner.send_compressed(encoding);
6335            self
6336        }
6337        /// Enable decompressing responses.
6338        #[must_use]
6339        pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
6340            self.inner = self.inner.accept_compressed(encoding);
6341            self
6342        }
6343        /// Limits the maximum size of a decoded message.
6344        ///
6345        /// Default: `4MB`
6346        #[must_use]
6347        pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
6348            self.inner = self.inner.max_decoding_message_size(limit);
6349            self
6350        }
6351        /// Limits the maximum size of an encoded message.
6352        ///
6353        /// Default: `usize::MAX`
6354        #[must_use]
6355        pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
6356            self.inner = self.inner.max_encoding_message_size(limit);
6357            self
6358        }
6359        /// Return a stream of blocks that arrive from the time the query is made onward.
6360        /// This can be used to listen for incoming blocks.
6361        pub async fn get_blocks(
6362            &mut self,
6363            request: impl tonic::IntoRequest<super::Empty>,
6364        ) -> std::result::Result<
6365            tonic::Response<tonic::codec::Streaming<super::ArrivedBlockInfo>>,
6366            tonic::Status,
6367        > {
6368            self.inner
6369                .ready()
6370                .await
6371                .map_err(|e| {
6372                    tonic::Status::unknown(
6373                        format!("Service was not ready: {}", e.into()),
6374                    )
6375                })?;
6376            let codec = tonic::codec::ProstCodec::default();
6377            let path = http::uri::PathAndQuery::from_static(
6378                "/concordium.v2.Queries/GetBlocks",
6379            );
6380            let mut req = request.into_request();
6381            req.extensions_mut()
6382                .insert(GrpcMethod::new("concordium.v2.Queries", "GetBlocks"));
6383            self.inner.server_streaming(req, path, codec).await
6384        }
6385        /// Return a stream of blocks that are finalized from the time the query is
6386        /// made onward. This can be used to listen for newly finalized blocks. Note
6387        /// that there is no guarantee that blocks will not be skipped if the client is
6388        /// too slow in processing the stream, however blocks will always be sent by
6389        /// increasing block height.
6390        pub async fn get_finalized_blocks(
6391            &mut self,
6392            request: impl tonic::IntoRequest<super::Empty>,
6393        ) -> std::result::Result<
6394            tonic::Response<tonic::codec::Streaming<super::FinalizedBlockInfo>>,
6395            tonic::Status,
6396        > {
6397            self.inner
6398                .ready()
6399                .await
6400                .map_err(|e| {
6401                    tonic::Status::unknown(
6402                        format!("Service was not ready: {}", e.into()),
6403                    )
6404                })?;
6405            let codec = tonic::codec::ProstCodec::default();
6406            let path = http::uri::PathAndQuery::from_static(
6407                "/concordium.v2.Queries/GetFinalizedBlocks",
6408            );
6409            let mut req = request.into_request();
6410            req.extensions_mut()
6411                .insert(GrpcMethod::new("concordium.v2.Queries", "GetFinalizedBlocks"));
6412            self.inner.server_streaming(req, path, codec).await
6413        }
6414        /// Retrieve the information about the given account in the given block.
6415        pub async fn get_account_info(
6416            &mut self,
6417            request: impl tonic::IntoRequest<super::AccountInfoRequest>,
6418        ) -> std::result::Result<tonic::Response<super::AccountInfo>, tonic::Status> {
6419            self.inner
6420                .ready()
6421                .await
6422                .map_err(|e| {
6423                    tonic::Status::unknown(
6424                        format!("Service was not ready: {}", e.into()),
6425                    )
6426                })?;
6427            let codec = tonic::codec::ProstCodec::default();
6428            let path = http::uri::PathAndQuery::from_static(
6429                "/concordium.v2.Queries/GetAccountInfo",
6430            );
6431            let mut req = request.into_request();
6432            req.extensions_mut()
6433                .insert(GrpcMethod::new("concordium.v2.Queries", "GetAccountInfo"));
6434            self.inner.unary(req, path, codec).await
6435        }
6436        /// Retrieve the information about the given token in the given block.
6437        pub async fn get_token_info(
6438            &mut self,
6439            request: impl tonic::IntoRequest<super::TokenInfoRequest>,
6440        ) -> std::result::Result<tonic::Response<super::TokenInfo>, tonic::Status> {
6441            self.inner
6442                .ready()
6443                .await
6444                .map_err(|e| {
6445                    tonic::Status::unknown(
6446                        format!("Service was not ready: {}", e.into()),
6447                    )
6448                })?;
6449            let codec = tonic::codec::ProstCodec::default();
6450            let path = http::uri::PathAndQuery::from_static(
6451                "/concordium.v2.Queries/GetTokenInfo",
6452            );
6453            let mut req = request.into_request();
6454            req.extensions_mut()
6455                .insert(GrpcMethod::new("concordium.v2.Queries", "GetTokenInfo"));
6456            self.inner.unary(req, path, codec).await
6457        }
6458        /// Retrieve the list of accounts that exist at the end of the given block.
6459        pub async fn get_account_list(
6460            &mut self,
6461            request: impl tonic::IntoRequest<super::BlockHashInput>,
6462        ) -> std::result::Result<
6463            tonic::Response<tonic::codec::Streaming<super::AccountAddress>>,
6464            tonic::Status,
6465        > {
6466            self.inner
6467                .ready()
6468                .await
6469                .map_err(|e| {
6470                    tonic::Status::unknown(
6471                        format!("Service was not ready: {}", e.into()),
6472                    )
6473                })?;
6474            let codec = tonic::codec::ProstCodec::default();
6475            let path = http::uri::PathAndQuery::from_static(
6476                "/concordium.v2.Queries/GetAccountList",
6477            );
6478            let mut req = request.into_request();
6479            req.extensions_mut()
6480                .insert(GrpcMethod::new("concordium.v2.Queries", "GetAccountList"));
6481            self.inner.server_streaming(req, path, codec).await
6482        }
6483        /// Retrieve the list of protocol level tokens that exist at the end of the
6484        /// given block.
6485        pub async fn get_token_list(
6486            &mut self,
6487            request: impl tonic::IntoRequest<super::BlockHashInput>,
6488        ) -> std::result::Result<
6489            tonic::Response<tonic::codec::Streaming<super::plt::TokenId>>,
6490            tonic::Status,
6491        > {
6492            self.inner
6493                .ready()
6494                .await
6495                .map_err(|e| {
6496                    tonic::Status::unknown(
6497                        format!("Service was not ready: {}", e.into()),
6498                    )
6499                })?;
6500            let codec = tonic::codec::ProstCodec::default();
6501            let path = http::uri::PathAndQuery::from_static(
6502                "/concordium.v2.Queries/GetTokenList",
6503            );
6504            let mut req = request.into_request();
6505            req.extensions_mut()
6506                .insert(GrpcMethod::new("concordium.v2.Queries", "GetTokenList"));
6507            self.inner.server_streaming(req, path, codec).await
6508        }
6509        /// Get a list of all smart contract modules. The stream will end
6510        /// when all modules that exist in the state at the end of the given
6511        /// block have been returned.
6512        pub async fn get_module_list(
6513            &mut self,
6514            request: impl tonic::IntoRequest<super::BlockHashInput>,
6515        ) -> std::result::Result<
6516            tonic::Response<tonic::codec::Streaming<super::ModuleRef>>,
6517            tonic::Status,
6518        > {
6519            self.inner
6520                .ready()
6521                .await
6522                .map_err(|e| {
6523                    tonic::Status::unknown(
6524                        format!("Service was not ready: {}", e.into()),
6525                    )
6526                })?;
6527            let codec = tonic::codec::ProstCodec::default();
6528            let path = http::uri::PathAndQuery::from_static(
6529                "/concordium.v2.Queries/GetModuleList",
6530            );
6531            let mut req = request.into_request();
6532            req.extensions_mut()
6533                .insert(GrpcMethod::new("concordium.v2.Queries", "GetModuleList"));
6534            self.inner.server_streaming(req, path, codec).await
6535        }
6536        /// Get a stream of ancestors for the provided block.
6537        /// Starting with the provided block itself, moving backwards until no more
6538        /// ancestors or the requested number of ancestors has been returned.
6539        pub async fn get_ancestors(
6540            &mut self,
6541            request: impl tonic::IntoRequest<super::AncestorsRequest>,
6542        ) -> std::result::Result<
6543            tonic::Response<tonic::codec::Streaming<super::BlockHash>>,
6544            tonic::Status,
6545        > {
6546            self.inner
6547                .ready()
6548                .await
6549                .map_err(|e| {
6550                    tonic::Status::unknown(
6551                        format!("Service was not ready: {}", e.into()),
6552                    )
6553                })?;
6554            let codec = tonic::codec::ProstCodec::default();
6555            let path = http::uri::PathAndQuery::from_static(
6556                "/concordium.v2.Queries/GetAncestors",
6557            );
6558            let mut req = request.into_request();
6559            req.extensions_mut()
6560                .insert(GrpcMethod::new("concordium.v2.Queries", "GetAncestors"));
6561            self.inner.server_streaming(req, path, codec).await
6562        }
6563        /// Get the source of a smart contract module.
6564        pub async fn get_module_source(
6565            &mut self,
6566            request: impl tonic::IntoRequest<super::ModuleSourceRequest>,
6567        ) -> std::result::Result<
6568            tonic::Response<super::VersionedModuleSource>,
6569            tonic::Status,
6570        > {
6571            self.inner
6572                .ready()
6573                .await
6574                .map_err(|e| {
6575                    tonic::Status::unknown(
6576                        format!("Service was not ready: {}", e.into()),
6577                    )
6578                })?;
6579            let codec = tonic::codec::ProstCodec::default();
6580            let path = http::uri::PathAndQuery::from_static(
6581                "/concordium.v2.Queries/GetModuleSource",
6582            );
6583            let mut req = request.into_request();
6584            req.extensions_mut()
6585                .insert(GrpcMethod::new("concordium.v2.Queries", "GetModuleSource"));
6586            self.inner.unary(req, path, codec).await
6587        }
6588        /// Get a list of addresses for all smart contract instances. The stream
6589        /// will end when all instances that exist in the state at the end of the
6590        /// given block has been returned.
6591        pub async fn get_instance_list(
6592            &mut self,
6593            request: impl tonic::IntoRequest<super::BlockHashInput>,
6594        ) -> std::result::Result<
6595            tonic::Response<tonic::codec::Streaming<super::ContractAddress>>,
6596            tonic::Status,
6597        > {
6598            self.inner
6599                .ready()
6600                .await
6601                .map_err(|e| {
6602                    tonic::Status::unknown(
6603                        format!("Service was not ready: {}", e.into()),
6604                    )
6605                })?;
6606            let codec = tonic::codec::ProstCodec::default();
6607            let path = http::uri::PathAndQuery::from_static(
6608                "/concordium.v2.Queries/GetInstanceList",
6609            );
6610            let mut req = request.into_request();
6611            req.extensions_mut()
6612                .insert(GrpcMethod::new("concordium.v2.Queries", "GetInstanceList"));
6613            self.inner.server_streaming(req, path, codec).await
6614        }
6615        /// Get info about a smart contract instance as it appears at the end of the
6616        /// given block.
6617        pub async fn get_instance_info(
6618            &mut self,
6619            request: impl tonic::IntoRequest<super::InstanceInfoRequest>,
6620        ) -> std::result::Result<tonic::Response<super::InstanceInfo>, tonic::Status> {
6621            self.inner
6622                .ready()
6623                .await
6624                .map_err(|e| {
6625                    tonic::Status::unknown(
6626                        format!("Service was not ready: {}", e.into()),
6627                    )
6628                })?;
6629            let codec = tonic::codec::ProstCodec::default();
6630            let path = http::uri::PathAndQuery::from_static(
6631                "/concordium.v2.Queries/GetInstanceInfo",
6632            );
6633            let mut req = request.into_request();
6634            req.extensions_mut()
6635                .insert(GrpcMethod::new("concordium.v2.Queries", "GetInstanceInfo"));
6636            self.inner.unary(req, path, codec).await
6637        }
6638        /// Get the exact state of a specific contract instance, streamed as a list of
6639        /// key-value pairs. The list is streamed in lexicographic order of keys.
6640        pub async fn get_instance_state(
6641            &mut self,
6642            request: impl tonic::IntoRequest<super::InstanceInfoRequest>,
6643        ) -> std::result::Result<
6644            tonic::Response<tonic::codec::Streaming<super::InstanceStateKvPair>>,
6645            tonic::Status,
6646        > {
6647            self.inner
6648                .ready()
6649                .await
6650                .map_err(|e| {
6651                    tonic::Status::unknown(
6652                        format!("Service was not ready: {}", e.into()),
6653                    )
6654                })?;
6655            let codec = tonic::codec::ProstCodec::default();
6656            let path = http::uri::PathAndQuery::from_static(
6657                "/concordium.v2.Queries/GetInstanceState",
6658            );
6659            let mut req = request.into_request();
6660            req.extensions_mut()
6661                .insert(GrpcMethod::new("concordium.v2.Queries", "GetInstanceState"));
6662            self.inner.server_streaming(req, path, codec).await
6663        }
6664        /// Get the value at a specific key of a contract state. In contrast to
6665        /// `GetInstanceState` this is more efficient, but requires the user to know
6666        /// the specific key to look for.
6667        pub async fn instance_state_lookup(
6668            &mut self,
6669            request: impl tonic::IntoRequest<super::InstanceStateLookupRequest>,
6670        ) -> std::result::Result<
6671            tonic::Response<super::InstanceStateValueAtKey>,
6672            tonic::Status,
6673        > {
6674            self.inner
6675                .ready()
6676                .await
6677                .map_err(|e| {
6678                    tonic::Status::unknown(
6679                        format!("Service was not ready: {}", e.into()),
6680                    )
6681                })?;
6682            let codec = tonic::codec::ProstCodec::default();
6683            let path = http::uri::PathAndQuery::from_static(
6684                "/concordium.v2.Queries/InstanceStateLookup",
6685            );
6686            let mut req = request.into_request();
6687            req.extensions_mut()
6688                .insert(GrpcMethod::new("concordium.v2.Queries", "InstanceStateLookup"));
6689            self.inner.unary(req, path, codec).await
6690        }
6691        /// Get the best guess as to what the next account sequence number should be.
6692        /// If all account transactions are finalized then this information is reliable.
6693        /// Otherwise this is the best guess, assuming all other transactions will be
6694        /// committed to blocks and eventually finalized.
6695        pub async fn get_next_account_sequence_number(
6696            &mut self,
6697            request: impl tonic::IntoRequest<super::AccountAddress>,
6698        ) -> std::result::Result<
6699            tonic::Response<super::NextAccountSequenceNumber>,
6700            tonic::Status,
6701        > {
6702            self.inner
6703                .ready()
6704                .await
6705                .map_err(|e| {
6706                    tonic::Status::unknown(
6707                        format!("Service was not ready: {}", e.into()),
6708                    )
6709                })?;
6710            let codec = tonic::codec::ProstCodec::default();
6711            let path = http::uri::PathAndQuery::from_static(
6712                "/concordium.v2.Queries/GetNextAccountSequenceNumber",
6713            );
6714            let mut req = request.into_request();
6715            req.extensions_mut()
6716                .insert(
6717                    GrpcMethod::new(
6718                        "concordium.v2.Queries",
6719                        "GetNextAccountSequenceNumber",
6720                    ),
6721                );
6722            self.inner.unary(req, path, codec).await
6723        }
6724        /// Get information about the current state of consensus.
6725        pub async fn get_consensus_info(
6726            &mut self,
6727            request: impl tonic::IntoRequest<super::Empty>,
6728        ) -> std::result::Result<tonic::Response<super::ConsensusInfo>, tonic::Status> {
6729            self.inner
6730                .ready()
6731                .await
6732                .map_err(|e| {
6733                    tonic::Status::unknown(
6734                        format!("Service was not ready: {}", e.into()),
6735                    )
6736                })?;
6737            let codec = tonic::codec::ProstCodec::default();
6738            let path = http::uri::PathAndQuery::from_static(
6739                "/concordium.v2.Queries/GetConsensusInfo",
6740            );
6741            let mut req = request.into_request();
6742            req.extensions_mut()
6743                .insert(GrpcMethod::new("concordium.v2.Queries", "GetConsensusInfo"));
6744            self.inner.unary(req, path, codec).await
6745        }
6746        /// Get the status of and information about a specific block item (transaction).
6747        pub async fn get_block_item_status(
6748            &mut self,
6749            request: impl tonic::IntoRequest<super::TransactionHash>,
6750        ) -> std::result::Result<
6751            tonic::Response<super::BlockItemStatus>,
6752            tonic::Status,
6753        > {
6754            self.inner
6755                .ready()
6756                .await
6757                .map_err(|e| {
6758                    tonic::Status::unknown(
6759                        format!("Service was not ready: {}", e.into()),
6760                    )
6761                })?;
6762            let codec = tonic::codec::ProstCodec::default();
6763            let path = http::uri::PathAndQuery::from_static(
6764                "/concordium.v2.Queries/GetBlockItemStatus",
6765            );
6766            let mut req = request.into_request();
6767            req.extensions_mut()
6768                .insert(GrpcMethod::new("concordium.v2.Queries", "GetBlockItemStatus"));
6769            self.inner.unary(req, path, codec).await
6770        }
6771        /// Get the cryptographic parameters in a given block.
6772        pub async fn get_cryptographic_parameters(
6773            &mut self,
6774            request: impl tonic::IntoRequest<super::BlockHashInput>,
6775        ) -> std::result::Result<
6776            tonic::Response<super::CryptographicParameters>,
6777            tonic::Status,
6778        > {
6779            self.inner
6780                .ready()
6781                .await
6782                .map_err(|e| {
6783                    tonic::Status::unknown(
6784                        format!("Service was not ready: {}", e.into()),
6785                    )
6786                })?;
6787            let codec = tonic::codec::ProstCodec::default();
6788            let path = http::uri::PathAndQuery::from_static(
6789                "/concordium.v2.Queries/GetCryptographicParameters",
6790            );
6791            let mut req = request.into_request();
6792            req.extensions_mut()
6793                .insert(
6794                    GrpcMethod::new(
6795                        "concordium.v2.Queries",
6796                        "GetCryptographicParameters",
6797                    ),
6798                );
6799            self.inner.unary(req, path, codec).await
6800        }
6801        /// Get information, such as height, timings, and transaction counts for the given block.
6802        pub async fn get_block_info(
6803            &mut self,
6804            request: impl tonic::IntoRequest<super::BlockHashInput>,
6805        ) -> std::result::Result<tonic::Response<super::BlockInfo>, tonic::Status> {
6806            self.inner
6807                .ready()
6808                .await
6809                .map_err(|e| {
6810                    tonic::Status::unknown(
6811                        format!("Service was not ready: {}", e.into()),
6812                    )
6813                })?;
6814            let codec = tonic::codec::ProstCodec::default();
6815            let path = http::uri::PathAndQuery::from_static(
6816                "/concordium.v2.Queries/GetBlockInfo",
6817            );
6818            let mut req = request.into_request();
6819            req.extensions_mut()
6820                .insert(GrpcMethod::new("concordium.v2.Queries", "GetBlockInfo"));
6821            self.inner.unary(req, path, codec).await
6822        }
6823        /// Get all the bakers at the end of the given block.
6824        pub async fn get_baker_list(
6825            &mut self,
6826            request: impl tonic::IntoRequest<super::BlockHashInput>,
6827        ) -> std::result::Result<
6828            tonic::Response<tonic::codec::Streaming<super::BakerId>>,
6829            tonic::Status,
6830        > {
6831            self.inner
6832                .ready()
6833                .await
6834                .map_err(|e| {
6835                    tonic::Status::unknown(
6836                        format!("Service was not ready: {}", e.into()),
6837                    )
6838                })?;
6839            let codec = tonic::codec::ProstCodec::default();
6840            let path = http::uri::PathAndQuery::from_static(
6841                "/concordium.v2.Queries/GetBakerList",
6842            );
6843            let mut req = request.into_request();
6844            req.extensions_mut()
6845                .insert(GrpcMethod::new("concordium.v2.Queries", "GetBakerList"));
6846            self.inner.server_streaming(req, path, codec).await
6847        }
6848        /// Get information about a given pool at the end of a given block.
6849        pub async fn get_pool_info(
6850            &mut self,
6851            request: impl tonic::IntoRequest<super::PoolInfoRequest>,
6852        ) -> std::result::Result<
6853            tonic::Response<super::PoolInfoResponse>,
6854            tonic::Status,
6855        > {
6856            self.inner
6857                .ready()
6858                .await
6859                .map_err(|e| {
6860                    tonic::Status::unknown(
6861                        format!("Service was not ready: {}", e.into()),
6862                    )
6863                })?;
6864            let codec = tonic::codec::ProstCodec::default();
6865            let path = http::uri::PathAndQuery::from_static(
6866                "/concordium.v2.Queries/GetPoolInfo",
6867            );
6868            let mut req = request.into_request();
6869            req.extensions_mut()
6870                .insert(GrpcMethod::new("concordium.v2.Queries", "GetPoolInfo"));
6871            self.inner.unary(req, path, codec).await
6872        }
6873        /// Get information about the passive delegators at the end of a given block.
6874        pub async fn get_passive_delegation_info(
6875            &mut self,
6876            request: impl tonic::IntoRequest<super::BlockHashInput>,
6877        ) -> std::result::Result<
6878            tonic::Response<super::PassiveDelegationInfo>,
6879            tonic::Status,
6880        > {
6881            self.inner
6882                .ready()
6883                .await
6884                .map_err(|e| {
6885                    tonic::Status::unknown(
6886                        format!("Service was not ready: {}", e.into()),
6887                    )
6888                })?;
6889            let codec = tonic::codec::ProstCodec::default();
6890            let path = http::uri::PathAndQuery::from_static(
6891                "/concordium.v2.Queries/GetPassiveDelegationInfo",
6892            );
6893            let mut req = request.into_request();
6894            req.extensions_mut()
6895                .insert(
6896                    GrpcMethod::new("concordium.v2.Queries", "GetPassiveDelegationInfo"),
6897                );
6898            self.inner.unary(req, path, codec).await
6899        }
6900        /// Get a list of live blocks at a given height.
6901        pub async fn get_blocks_at_height(
6902            &mut self,
6903            request: impl tonic::IntoRequest<super::BlocksAtHeightRequest>,
6904        ) -> std::result::Result<
6905            tonic::Response<super::BlocksAtHeightResponse>,
6906            tonic::Status,
6907        > {
6908            self.inner
6909                .ready()
6910                .await
6911                .map_err(|e| {
6912                    tonic::Status::unknown(
6913                        format!("Service was not ready: {}", e.into()),
6914                    )
6915                })?;
6916            let codec = tonic::codec::ProstCodec::default();
6917            let path = http::uri::PathAndQuery::from_static(
6918                "/concordium.v2.Queries/GetBlocksAtHeight",
6919            );
6920            let mut req = request.into_request();
6921            req.extensions_mut()
6922                .insert(GrpcMethod::new("concordium.v2.Queries", "GetBlocksAtHeight"));
6923            self.inner.unary(req, path, codec).await
6924        }
6925        /// Get information about tokenomics at the end of a given block.
6926        pub async fn get_tokenomics_info(
6927            &mut self,
6928            request: impl tonic::IntoRequest<super::BlockHashInput>,
6929        ) -> std::result::Result<tonic::Response<super::TokenomicsInfo>, tonic::Status> {
6930            self.inner
6931                .ready()
6932                .await
6933                .map_err(|e| {
6934                    tonic::Status::unknown(
6935                        format!("Service was not ready: {}", e.into()),
6936                    )
6937                })?;
6938            let codec = tonic::codec::ProstCodec::default();
6939            let path = http::uri::PathAndQuery::from_static(
6940                "/concordium.v2.Queries/GetTokenomicsInfo",
6941            );
6942            let mut req = request.into_request();
6943            req.extensions_mut()
6944                .insert(GrpcMethod::new("concordium.v2.Queries", "GetTokenomicsInfo"));
6945            self.inner.unary(req, path, codec).await
6946        }
6947        /// Run the smart contract entrypoint in a given context and in the state at
6948        /// the end of the given block.
6949        pub async fn invoke_instance(
6950            &mut self,
6951            request: impl tonic::IntoRequest<super::InvokeInstanceRequest>,
6952        ) -> std::result::Result<
6953            tonic::Response<super::InvokeInstanceResponse>,
6954            tonic::Status,
6955        > {
6956            self.inner
6957                .ready()
6958                .await
6959                .map_err(|e| {
6960                    tonic::Status::unknown(
6961                        format!("Service was not ready: {}", e.into()),
6962                    )
6963                })?;
6964            let codec = tonic::codec::ProstCodec::default();
6965            let path = http::uri::PathAndQuery::from_static(
6966                "/concordium.v2.Queries/InvokeInstance",
6967            );
6968            let mut req = request.into_request();
6969            req.extensions_mut()
6970                .insert(GrpcMethod::new("concordium.v2.Queries", "InvokeInstance"));
6971            self.inner.unary(req, path, codec).await
6972        }
6973        /// Get the registered delegators of a given pool at the end of a given block.
6974        /// In contrast to the `GetPoolDelegatorsRewardPeriod` which returns delegators
6975        /// that are fixed for the reward period of the block, this endpoint returns the
6976        /// list of delegators that are registered in the block. Any changes to delegators
6977        /// are immediately visible in this list.
6978        /// The stream will end when all the delegators has been returned.
6979        pub async fn get_pool_delegators(
6980            &mut self,
6981            request: impl tonic::IntoRequest<super::GetPoolDelegatorsRequest>,
6982        ) -> std::result::Result<
6983            tonic::Response<tonic::codec::Streaming<super::DelegatorInfo>>,
6984            tonic::Status,
6985        > {
6986            self.inner
6987                .ready()
6988                .await
6989                .map_err(|e| {
6990                    tonic::Status::unknown(
6991                        format!("Service was not ready: {}", e.into()),
6992                    )
6993                })?;
6994            let codec = tonic::codec::ProstCodec::default();
6995            let path = http::uri::PathAndQuery::from_static(
6996                "/concordium.v2.Queries/GetPoolDelegators",
6997            );
6998            let mut req = request.into_request();
6999            req.extensions_mut()
7000                .insert(GrpcMethod::new("concordium.v2.Queries", "GetPoolDelegators"));
7001            self.inner.server_streaming(req, path, codec).await
7002        }
7003        /// Get the fixed delegators of a given pool for the reward period of the given block.
7004        /// In contracts to the `GetPoolDelegators` which returns delegators registered
7005        /// for the given block, this endpoint returns the fixed delegators contributing
7006        /// stake in the reward period containing the given block.
7007        /// The stream will end when all the delegators has been returned.
7008        pub async fn get_pool_delegators_reward_period(
7009            &mut self,
7010            request: impl tonic::IntoRequest<super::GetPoolDelegatorsRequest>,
7011        ) -> std::result::Result<
7012            tonic::Response<tonic::codec::Streaming<super::DelegatorRewardPeriodInfo>>,
7013            tonic::Status,
7014        > {
7015            self.inner
7016                .ready()
7017                .await
7018                .map_err(|e| {
7019                    tonic::Status::unknown(
7020                        format!("Service was not ready: {}", e.into()),
7021                    )
7022                })?;
7023            let codec = tonic::codec::ProstCodec::default();
7024            let path = http::uri::PathAndQuery::from_static(
7025                "/concordium.v2.Queries/GetPoolDelegatorsRewardPeriod",
7026            );
7027            let mut req = request.into_request();
7028            req.extensions_mut()
7029                .insert(
7030                    GrpcMethod::new(
7031                        "concordium.v2.Queries",
7032                        "GetPoolDelegatorsRewardPeriod",
7033                    ),
7034                );
7035            self.inner.server_streaming(req, path, codec).await
7036        }
7037        /// Get the registered passive delegators at the end of a given block.
7038        /// In contrast to the `GetPassiveDelegatorsRewardPeriod` which returns delegators
7039        /// that are fixed for the reward period of the block, this endpoint returns the
7040        /// list of delegators that are registered in the block. Any changes to delegators
7041        /// are immediately visible in this list.
7042        /// The stream will end when all the delegators has been returned.
7043        pub async fn get_passive_delegators(
7044            &mut self,
7045            request: impl tonic::IntoRequest<super::BlockHashInput>,
7046        ) -> std::result::Result<
7047            tonic::Response<tonic::codec::Streaming<super::DelegatorInfo>>,
7048            tonic::Status,
7049        > {
7050            self.inner
7051                .ready()
7052                .await
7053                .map_err(|e| {
7054                    tonic::Status::unknown(
7055                        format!("Service was not ready: {}", e.into()),
7056                    )
7057                })?;
7058            let codec = tonic::codec::ProstCodec::default();
7059            let path = http::uri::PathAndQuery::from_static(
7060                "/concordium.v2.Queries/GetPassiveDelegators",
7061            );
7062            let mut req = request.into_request();
7063            req.extensions_mut()
7064                .insert(
7065                    GrpcMethod::new("concordium.v2.Queries", "GetPassiveDelegators"),
7066                );
7067            self.inner.server_streaming(req, path, codec).await
7068        }
7069        /// Get the fixed passive delegators for the reward period of the given block.
7070        /// In contracts to the `GetPassiveDelegators` which returns delegators registered
7071        /// for the given block, this endpoint returns the fixed delegators contributing
7072        /// stake in the reward period containing the given block.
7073        /// The stream will end when all the delegators has been returned.
7074        pub async fn get_passive_delegators_reward_period(
7075            &mut self,
7076            request: impl tonic::IntoRequest<super::BlockHashInput>,
7077        ) -> std::result::Result<
7078            tonic::Response<tonic::codec::Streaming<super::DelegatorRewardPeriodInfo>>,
7079            tonic::Status,
7080        > {
7081            self.inner
7082                .ready()
7083                .await
7084                .map_err(|e| {
7085                    tonic::Status::unknown(
7086                        format!("Service was not ready: {}", e.into()),
7087                    )
7088                })?;
7089            let codec = tonic::codec::ProstCodec::default();
7090            let path = http::uri::PathAndQuery::from_static(
7091                "/concordium.v2.Queries/GetPassiveDelegatorsRewardPeriod",
7092            );
7093            let mut req = request.into_request();
7094            req.extensions_mut()
7095                .insert(
7096                    GrpcMethod::new(
7097                        "concordium.v2.Queries",
7098                        "GetPassiveDelegatorsRewardPeriod",
7099                    ),
7100                );
7101            self.inner.server_streaming(req, path, codec).await
7102        }
7103        /// Get the current branches of blocks starting from and including the last finalized block.
7104        pub async fn get_branches(
7105            &mut self,
7106            request: impl tonic::IntoRequest<super::Empty>,
7107        ) -> std::result::Result<tonic::Response<super::Branch>, tonic::Status> {
7108            self.inner
7109                .ready()
7110                .await
7111                .map_err(|e| {
7112                    tonic::Status::unknown(
7113                        format!("Service was not ready: {}", e.into()),
7114                    )
7115                })?;
7116            let codec = tonic::codec::ProstCodec::default();
7117            let path = http::uri::PathAndQuery::from_static(
7118                "/concordium.v2.Queries/GetBranches",
7119            );
7120            let mut req = request.into_request();
7121            req.extensions_mut()
7122                .insert(GrpcMethod::new("concordium.v2.Queries", "GetBranches"));
7123            self.inner.unary(req, path, codec).await
7124        }
7125        /// Get information related to the baker election for a particular block.
7126        pub async fn get_election_info(
7127            &mut self,
7128            request: impl tonic::IntoRequest<super::BlockHashInput>,
7129        ) -> std::result::Result<tonic::Response<super::ElectionInfo>, tonic::Status> {
7130            self.inner
7131                .ready()
7132                .await
7133                .map_err(|e| {
7134                    tonic::Status::unknown(
7135                        format!("Service was not ready: {}", e.into()),
7136                    )
7137                })?;
7138            let codec = tonic::codec::ProstCodec::default();
7139            let path = http::uri::PathAndQuery::from_static(
7140                "/concordium.v2.Queries/GetElectionInfo",
7141            );
7142            let mut req = request.into_request();
7143            req.extensions_mut()
7144                .insert(GrpcMethod::new("concordium.v2.Queries", "GetElectionInfo"));
7145            self.inner.unary(req, path, codec).await
7146        }
7147        /// Get the identity providers registered as of the end of a given block.
7148        /// The stream will end when all the identity providers have been returned.
7149        pub async fn get_identity_providers(
7150            &mut self,
7151            request: impl tonic::IntoRequest<super::BlockHashInput>,
7152        ) -> std::result::Result<
7153            tonic::Response<tonic::codec::Streaming<super::IpInfo>>,
7154            tonic::Status,
7155        > {
7156            self.inner
7157                .ready()
7158                .await
7159                .map_err(|e| {
7160                    tonic::Status::unknown(
7161                        format!("Service was not ready: {}", e.into()),
7162                    )
7163                })?;
7164            let codec = tonic::codec::ProstCodec::default();
7165            let path = http::uri::PathAndQuery::from_static(
7166                "/concordium.v2.Queries/GetIdentityProviders",
7167            );
7168            let mut req = request.into_request();
7169            req.extensions_mut()
7170                .insert(
7171                    GrpcMethod::new("concordium.v2.Queries", "GetIdentityProviders"),
7172                );
7173            self.inner.server_streaming(req, path, codec).await
7174        }
7175        /// Get the anonymity revokers registered as of the end of a given block.
7176        /// The stream will end when all the anonymity revokers have been returned.
7177        pub async fn get_anonymity_revokers(
7178            &mut self,
7179            request: impl tonic::IntoRequest<super::BlockHashInput>,
7180        ) -> std::result::Result<
7181            tonic::Response<tonic::codec::Streaming<super::ArInfo>>,
7182            tonic::Status,
7183        > {
7184            self.inner
7185                .ready()
7186                .await
7187                .map_err(|e| {
7188                    tonic::Status::unknown(
7189                        format!("Service was not ready: {}", e.into()),
7190                    )
7191                })?;
7192            let codec = tonic::codec::ProstCodec::default();
7193            let path = http::uri::PathAndQuery::from_static(
7194                "/concordium.v2.Queries/GetAnonymityRevokers",
7195            );
7196            let mut req = request.into_request();
7197            req.extensions_mut()
7198                .insert(
7199                    GrpcMethod::new("concordium.v2.Queries", "GetAnonymityRevokers"),
7200                );
7201            self.inner.server_streaming(req, path, codec).await
7202        }
7203        /// Get a list of non-finalized transaction hashes for a given account. This
7204        /// endpoint is not expected to return a large amount of data in most cases,
7205        /// but in bad network condtions it might. The stream will end when all the
7206        /// non-finalized transaction hashes have been returned.
7207        pub async fn get_account_non_finalized_transactions(
7208            &mut self,
7209            request: impl tonic::IntoRequest<super::AccountAddress>,
7210        ) -> std::result::Result<
7211            tonic::Response<tonic::codec::Streaming<super::TransactionHash>>,
7212            tonic::Status,
7213        > {
7214            self.inner
7215                .ready()
7216                .await
7217                .map_err(|e| {
7218                    tonic::Status::unknown(
7219                        format!("Service was not ready: {}", e.into()),
7220                    )
7221                })?;
7222            let codec = tonic::codec::ProstCodec::default();
7223            let path = http::uri::PathAndQuery::from_static(
7224                "/concordium.v2.Queries/GetAccountNonFinalizedTransactions",
7225            );
7226            let mut req = request.into_request();
7227            req.extensions_mut()
7228                .insert(
7229                    GrpcMethod::new(
7230                        "concordium.v2.Queries",
7231                        "GetAccountNonFinalizedTransactions",
7232                    ),
7233                );
7234            self.inner.server_streaming(req, path, codec).await
7235        }
7236        /// Get a list of transaction events in a given block.
7237        /// The stream will end when all the transaction events for a given block have been returned.
7238        pub async fn get_block_transaction_events(
7239            &mut self,
7240            request: impl tonic::IntoRequest<super::BlockHashInput>,
7241        ) -> std::result::Result<
7242            tonic::Response<tonic::codec::Streaming<super::BlockItemSummary>>,
7243            tonic::Status,
7244        > {
7245            self.inner
7246                .ready()
7247                .await
7248                .map_err(|e| {
7249                    tonic::Status::unknown(
7250                        format!("Service was not ready: {}", e.into()),
7251                    )
7252                })?;
7253            let codec = tonic::codec::ProstCodec::default();
7254            let path = http::uri::PathAndQuery::from_static(
7255                "/concordium.v2.Queries/GetBlockTransactionEvents",
7256            );
7257            let mut req = request.into_request();
7258            req.extensions_mut()
7259                .insert(
7260                    GrpcMethod::new("concordium.v2.Queries", "GetBlockTransactionEvents"),
7261                );
7262            self.inner.server_streaming(req, path, codec).await
7263        }
7264        /// Get a list of special events in a given block. These are events generated
7265        /// by the protocol, such as minting and reward payouts. They are not directly
7266        /// generated by any transaction. The stream will end when all the special
7267        /// events for a given block have been returned.
7268        pub async fn get_block_special_events(
7269            &mut self,
7270            request: impl tonic::IntoRequest<super::BlockHashInput>,
7271        ) -> std::result::Result<
7272            tonic::Response<tonic::codec::Streaming<super::BlockSpecialEvent>>,
7273            tonic::Status,
7274        > {
7275            self.inner
7276                .ready()
7277                .await
7278                .map_err(|e| {
7279                    tonic::Status::unknown(
7280                        format!("Service was not ready: {}", e.into()),
7281                    )
7282                })?;
7283            let codec = tonic::codec::ProstCodec::default();
7284            let path = http::uri::PathAndQuery::from_static(
7285                "/concordium.v2.Queries/GetBlockSpecialEvents",
7286            );
7287            let mut req = request.into_request();
7288            req.extensions_mut()
7289                .insert(
7290                    GrpcMethod::new("concordium.v2.Queries", "GetBlockSpecialEvents"),
7291                );
7292            self.inner.server_streaming(req, path, codec).await
7293        }
7294        /// Get the pending updates to chain parameters at the end of a given block.
7295        /// The stream will end when all the pending updates for a given block have been returned.
7296        pub async fn get_block_pending_updates(
7297            &mut self,
7298            request: impl tonic::IntoRequest<super::BlockHashInput>,
7299        ) -> std::result::Result<
7300            tonic::Response<tonic::codec::Streaming<super::PendingUpdate>>,
7301            tonic::Status,
7302        > {
7303            self.inner
7304                .ready()
7305                .await
7306                .map_err(|e| {
7307                    tonic::Status::unknown(
7308                        format!("Service was not ready: {}", e.into()),
7309                    )
7310                })?;
7311            let codec = tonic::codec::ProstCodec::default();
7312            let path = http::uri::PathAndQuery::from_static(
7313                "/concordium.v2.Queries/GetBlockPendingUpdates",
7314            );
7315            let mut req = request.into_request();
7316            req.extensions_mut()
7317                .insert(
7318                    GrpcMethod::new("concordium.v2.Queries", "GetBlockPendingUpdates"),
7319                );
7320            self.inner.server_streaming(req, path, codec).await
7321        }
7322        /// Get next available sequence numbers for updating chain parameters after a given block.
7323        pub async fn get_next_update_sequence_numbers(
7324            &mut self,
7325            request: impl tonic::IntoRequest<super::BlockHashInput>,
7326        ) -> std::result::Result<
7327            tonic::Response<super::NextUpdateSequenceNumbers>,
7328            tonic::Status,
7329        > {
7330            self.inner
7331                .ready()
7332                .await
7333                .map_err(|e| {
7334                    tonic::Status::unknown(
7335                        format!("Service was not ready: {}", e.into()),
7336                    )
7337                })?;
7338            let codec = tonic::codec::ProstCodec::default();
7339            let path = http::uri::PathAndQuery::from_static(
7340                "/concordium.v2.Queries/GetNextUpdateSequenceNumbers",
7341            );
7342            let mut req = request.into_request();
7343            req.extensions_mut()
7344                .insert(
7345                    GrpcMethod::new(
7346                        "concordium.v2.Queries",
7347                        "GetNextUpdateSequenceNumbers",
7348                    ),
7349                );
7350            self.inner.unary(req, path, codec).await
7351        }
7352        /// Get all accounts that have scheduled releases, with the timestamp of the first pending
7353        /// scheduled release for that account. (Note, this only identifies accounts by index, and
7354        /// only indicates the first pending release for each account.)
7355        pub async fn get_scheduled_release_accounts(
7356            &mut self,
7357            request: impl tonic::IntoRequest<super::BlockHashInput>,
7358        ) -> std::result::Result<
7359            tonic::Response<tonic::codec::Streaming<super::AccountPending>>,
7360            tonic::Status,
7361        > {
7362            self.inner
7363                .ready()
7364                .await
7365                .map_err(|e| {
7366                    tonic::Status::unknown(
7367                        format!("Service was not ready: {}", e.into()),
7368                    )
7369                })?;
7370            let codec = tonic::codec::ProstCodec::default();
7371            let path = http::uri::PathAndQuery::from_static(
7372                "/concordium.v2.Queries/GetScheduledReleaseAccounts",
7373            );
7374            let mut req = request.into_request();
7375            req.extensions_mut()
7376                .insert(
7377                    GrpcMethod::new(
7378                        "concordium.v2.Queries",
7379                        "GetScheduledReleaseAccounts",
7380                    ),
7381                );
7382            self.inner.server_streaming(req, path, codec).await
7383        }
7384        /// Get all accounts that have stake in cooldown, with the timestamp of the first pending
7385        /// cooldown expiry for each account. (Note, this only identifies accounts by index,
7386        /// and only indicates the first pending cooldown for each account.)
7387        /// Prior to protocol version 7, the resulting stream will always be empty.
7388        pub async fn get_cooldown_accounts(
7389            &mut self,
7390            request: impl tonic::IntoRequest<super::BlockHashInput>,
7391        ) -> std::result::Result<
7392            tonic::Response<tonic::codec::Streaming<super::AccountPending>>,
7393            tonic::Status,
7394        > {
7395            self.inner
7396                .ready()
7397                .await
7398                .map_err(|e| {
7399                    tonic::Status::unknown(
7400                        format!("Service was not ready: {}", e.into()),
7401                    )
7402                })?;
7403            let codec = tonic::codec::ProstCodec::default();
7404            let path = http::uri::PathAndQuery::from_static(
7405                "/concordium.v2.Queries/GetCooldownAccounts",
7406            );
7407            let mut req = request.into_request();
7408            req.extensions_mut()
7409                .insert(GrpcMethod::new("concordium.v2.Queries", "GetCooldownAccounts"));
7410            self.inner.server_streaming(req, path, codec).await
7411        }
7412        /// Get all accounts that have stake in pre-cooldown.
7413        /// (This only identifies accounts by index.)
7414        /// Prior to protocol version 7, the resulting stream will always be empty.
7415        pub async fn get_pre_cooldown_accounts(
7416            &mut self,
7417            request: impl tonic::IntoRequest<super::BlockHashInput>,
7418        ) -> std::result::Result<
7419            tonic::Response<tonic::codec::Streaming<super::AccountIndex>>,
7420            tonic::Status,
7421        > {
7422            self.inner
7423                .ready()
7424                .await
7425                .map_err(|e| {
7426                    tonic::Status::unknown(
7427                        format!("Service was not ready: {}", e.into()),
7428                    )
7429                })?;
7430            let codec = tonic::codec::ProstCodec::default();
7431            let path = http::uri::PathAndQuery::from_static(
7432                "/concordium.v2.Queries/GetPreCooldownAccounts",
7433            );
7434            let mut req = request.into_request();
7435            req.extensions_mut()
7436                .insert(
7437                    GrpcMethod::new("concordium.v2.Queries", "GetPreCooldownAccounts"),
7438                );
7439            self.inner.server_streaming(req, path, codec).await
7440        }
7441        /// Get all accounts that have stake in pre-pre-cooldown.
7442        /// (This only identifies accounts by index.)
7443        /// Prior to protocol version 7, the resulting stream will always be empty.
7444        pub async fn get_pre_pre_cooldown_accounts(
7445            &mut self,
7446            request: impl tonic::IntoRequest<super::BlockHashInput>,
7447        ) -> std::result::Result<
7448            tonic::Response<tonic::codec::Streaming<super::AccountIndex>>,
7449            tonic::Status,
7450        > {
7451            self.inner
7452                .ready()
7453                .await
7454                .map_err(|e| {
7455                    tonic::Status::unknown(
7456                        format!("Service was not ready: {}", e.into()),
7457                    )
7458                })?;
7459            let codec = tonic::codec::ProstCodec::default();
7460            let path = http::uri::PathAndQuery::from_static(
7461                "/concordium.v2.Queries/GetPrePreCooldownAccounts",
7462            );
7463            let mut req = request.into_request();
7464            req.extensions_mut()
7465                .insert(
7466                    GrpcMethod::new("concordium.v2.Queries", "GetPrePreCooldownAccounts"),
7467                );
7468            self.inner.server_streaming(req, path, codec).await
7469        }
7470        /// Get the projected earliest time at which a particular baker will be required to bake a block.
7471        /// If the current consensus version is 0, this returns the status 'Unavailable', as the endpoint
7472        /// is only supported by consensus version 1.
7473        ///
7474        /// If the baker is not a baker for the current reward period, this returns a timestamp at the
7475        /// start of the next reward period. If the baker is a baker for the current reward period, the
7476        /// earliest win time is projected from the current round forward, assuming that each round after
7477        /// the last finalized round will take the minimum block time. (If blocks take longer, or timeouts
7478        /// occur, the actual time may be later, and the reported time in subsequent queries may reflect
7479        /// this.) At the end of an epoch (or if the baker is not projected to bake before the end of the
7480        /// epoch) the earliest win time for a (current) baker will be projected as the start of the next
7481        /// epoch. This is because the seed for the leader election is updated at the epoch boundary, and
7482        /// so the winners cannot be predicted beyond that. Note that in some circumstances the returned
7483        /// timestamp can be in the past, especially at the end of an epoch.
7484        pub async fn get_baker_earliest_win_time(
7485            &mut self,
7486            request: impl tonic::IntoRequest<super::BakerId>,
7487        ) -> std::result::Result<tonic::Response<super::Timestamp>, tonic::Status> {
7488            self.inner
7489                .ready()
7490                .await
7491                .map_err(|e| {
7492                    tonic::Status::unknown(
7493                        format!("Service was not ready: {}", e.into()),
7494                    )
7495                })?;
7496            let codec = tonic::codec::ProstCodec::default();
7497            let path = http::uri::PathAndQuery::from_static(
7498                "/concordium.v2.Queries/GetBakerEarliestWinTime",
7499            );
7500            let mut req = request.into_request();
7501            req.extensions_mut()
7502                .insert(
7503                    GrpcMethod::new("concordium.v2.Queries", "GetBakerEarliestWinTime"),
7504                );
7505            self.inner.unary(req, path, codec).await
7506        }
7507        /// Shut down the node.
7508        /// Return a GRPC error if the shutdown failed.
7509        pub async fn shutdown(
7510            &mut self,
7511            request: impl tonic::IntoRequest<super::Empty>,
7512        ) -> std::result::Result<tonic::Response<super::Empty>, tonic::Status> {
7513            self.inner
7514                .ready()
7515                .await
7516                .map_err(|e| {
7517                    tonic::Status::unknown(
7518                        format!("Service was not ready: {}", e.into()),
7519                    )
7520                })?;
7521            let codec = tonic::codec::ProstCodec::default();
7522            let path = http::uri::PathAndQuery::from_static(
7523                "/concordium.v2.Queries/Shutdown",
7524            );
7525            let mut req = request.into_request();
7526            req.extensions_mut()
7527                .insert(GrpcMethod::new("concordium.v2.Queries", "Shutdown"));
7528            self.inner.unary(req, path, codec).await
7529        }
7530        /// Suggest to a peer to connect to the submitted peer details.
7531        /// This, if successful, adds the peer to the list of given addresses.
7532        /// Otherwise return a GRPC error.
7533        /// Note. The peer might not be connected to instantly, in that case
7534        /// the node will try to establish the connection in near future. This
7535        /// function returns a GRPC status 'Ok' in this case.
7536        pub async fn peer_connect(
7537            &mut self,
7538            request: impl tonic::IntoRequest<super::IpSocketAddress>,
7539        ) -> std::result::Result<tonic::Response<super::Empty>, tonic::Status> {
7540            self.inner
7541                .ready()
7542                .await
7543                .map_err(|e| {
7544                    tonic::Status::unknown(
7545                        format!("Service was not ready: {}", e.into()),
7546                    )
7547                })?;
7548            let codec = tonic::codec::ProstCodec::default();
7549            let path = http::uri::PathAndQuery::from_static(
7550                "/concordium.v2.Queries/PeerConnect",
7551            );
7552            let mut req = request.into_request();
7553            req.extensions_mut()
7554                .insert(GrpcMethod::new("concordium.v2.Queries", "PeerConnect"));
7555            self.inner.unary(req, path, codec).await
7556        }
7557        /// Disconnect from the peer and remove them from the given addresses list
7558        /// if they are on it. Return if the request was processed successfully.
7559        /// Otherwise return a GRPC error.
7560        pub async fn peer_disconnect(
7561            &mut self,
7562            request: impl tonic::IntoRequest<super::IpSocketAddress>,
7563        ) -> std::result::Result<tonic::Response<super::Empty>, tonic::Status> {
7564            self.inner
7565                .ready()
7566                .await
7567                .map_err(|e| {
7568                    tonic::Status::unknown(
7569                        format!("Service was not ready: {}", e.into()),
7570                    )
7571                })?;
7572            let codec = tonic::codec::ProstCodec::default();
7573            let path = http::uri::PathAndQuery::from_static(
7574                "/concordium.v2.Queries/PeerDisconnect",
7575            );
7576            let mut req = request.into_request();
7577            req.extensions_mut()
7578                .insert(GrpcMethod::new("concordium.v2.Queries", "PeerDisconnect"));
7579            self.inner.unary(req, path, codec).await
7580        }
7581        /// Get a list of banned peers.
7582        pub async fn get_banned_peers(
7583            &mut self,
7584            request: impl tonic::IntoRequest<super::Empty>,
7585        ) -> std::result::Result<tonic::Response<super::BannedPeers>, tonic::Status> {
7586            self.inner
7587                .ready()
7588                .await
7589                .map_err(|e| {
7590                    tonic::Status::unknown(
7591                        format!("Service was not ready: {}", e.into()),
7592                    )
7593                })?;
7594            let codec = tonic::codec::ProstCodec::default();
7595            let path = http::uri::PathAndQuery::from_static(
7596                "/concordium.v2.Queries/GetBannedPeers",
7597            );
7598            let mut req = request.into_request();
7599            req.extensions_mut()
7600                .insert(GrpcMethod::new("concordium.v2.Queries", "GetBannedPeers"));
7601            self.inner.unary(req, path, codec).await
7602        }
7603        /// Ban the given peer.
7604        /// Returns a GRPC error if the action failed.
7605        pub async fn ban_peer(
7606            &mut self,
7607            request: impl tonic::IntoRequest<super::PeerToBan>,
7608        ) -> std::result::Result<tonic::Response<super::Empty>, tonic::Status> {
7609            self.inner
7610                .ready()
7611                .await
7612                .map_err(|e| {
7613                    tonic::Status::unknown(
7614                        format!("Service was not ready: {}", e.into()),
7615                    )
7616                })?;
7617            let codec = tonic::codec::ProstCodec::default();
7618            let path = http::uri::PathAndQuery::from_static(
7619                "/concordium.v2.Queries/BanPeer",
7620            );
7621            let mut req = request.into_request();
7622            req.extensions_mut()
7623                .insert(GrpcMethod::new("concordium.v2.Queries", "BanPeer"));
7624            self.inner.unary(req, path, codec).await
7625        }
7626        /// Unban the banned peer.
7627        /// Returns a GRPC error if the action failed.
7628        pub async fn unban_peer(
7629            &mut self,
7630            request: impl tonic::IntoRequest<super::BannedPeer>,
7631        ) -> std::result::Result<tonic::Response<super::Empty>, tonic::Status> {
7632            self.inner
7633                .ready()
7634                .await
7635                .map_err(|e| {
7636                    tonic::Status::unknown(
7637                        format!("Service was not ready: {}", e.into()),
7638                    )
7639                })?;
7640            let codec = tonic::codec::ProstCodec::default();
7641            let path = http::uri::PathAndQuery::from_static(
7642                "/concordium.v2.Queries/UnbanPeer",
7643            );
7644            let mut req = request.into_request();
7645            req.extensions_mut()
7646                .insert(GrpcMethod::new("concordium.v2.Queries", "UnbanPeer"));
7647            self.inner.unary(req, path, codec).await
7648        }
7649        /// Start dumping packages into the specified file.
7650        /// Only enabled if the node was built with the `network_dump` feature.
7651        /// Returns a GRPC error if the network dump failed to start.
7652        pub async fn dump_start(
7653            &mut self,
7654            request: impl tonic::IntoRequest<super::DumpRequest>,
7655        ) -> std::result::Result<tonic::Response<super::Empty>, tonic::Status> {
7656            self.inner
7657                .ready()
7658                .await
7659                .map_err(|e| {
7660                    tonic::Status::unknown(
7661                        format!("Service was not ready: {}", e.into()),
7662                    )
7663                })?;
7664            let codec = tonic::codec::ProstCodec::default();
7665            let path = http::uri::PathAndQuery::from_static(
7666                "/concordium.v2.Queries/DumpStart",
7667            );
7668            let mut req = request.into_request();
7669            req.extensions_mut()
7670                .insert(GrpcMethod::new("concordium.v2.Queries", "DumpStart"));
7671            self.inner.unary(req, path, codec).await
7672        }
7673        /// Stop dumping packages.
7674        /// Only enabled if the node was built with the `network_dump` feature.
7675        /// Returns a GRPC error if the network dump failed to be stopped.
7676        pub async fn dump_stop(
7677            &mut self,
7678            request: impl tonic::IntoRequest<super::Empty>,
7679        ) -> std::result::Result<tonic::Response<super::Empty>, tonic::Status> {
7680            self.inner
7681                .ready()
7682                .await
7683                .map_err(|e| {
7684                    tonic::Status::unknown(
7685                        format!("Service was not ready: {}", e.into()),
7686                    )
7687                })?;
7688            let codec = tonic::codec::ProstCodec::default();
7689            let path = http::uri::PathAndQuery::from_static(
7690                "/concordium.v2.Queries/DumpStop",
7691            );
7692            let mut req = request.into_request();
7693            req.extensions_mut()
7694                .insert(GrpcMethod::new("concordium.v2.Queries", "DumpStop"));
7695            self.inner.unary(req, path, codec).await
7696        }
7697        /// Get a list of the peers that the node is connected to
7698        /// and assoicated network related information for each peer.
7699        pub async fn get_peers_info(
7700            &mut self,
7701            request: impl tonic::IntoRequest<super::Empty>,
7702        ) -> std::result::Result<tonic::Response<super::PeersInfo>, tonic::Status> {
7703            self.inner
7704                .ready()
7705                .await
7706                .map_err(|e| {
7707                    tonic::Status::unknown(
7708                        format!("Service was not ready: {}", e.into()),
7709                    )
7710                })?;
7711            let codec = tonic::codec::ProstCodec::default();
7712            let path = http::uri::PathAndQuery::from_static(
7713                "/concordium.v2.Queries/GetPeersInfo",
7714            );
7715            let mut req = request.into_request();
7716            req.extensions_mut()
7717                .insert(GrpcMethod::new("concordium.v2.Queries", "GetPeersInfo"));
7718            self.inner.unary(req, path, codec).await
7719        }
7720        /// Get information about the node.
7721        /// The `NodeInfo` includes information of
7722        /// * Meta information such as the, version of the node, type of the node, uptime and the local time of the node.
7723        /// * NetworkInfo which yields data such as the node id, packets sent/received,
7724        ///   average bytes per second sent/received.
7725        /// * ConsensusInfo. The `ConsensusInfo` returned depends on if the node supports
7726        ///   the protocol on chain and whether the node is configured as a baker or not.
7727        pub async fn get_node_info(
7728            &mut self,
7729            request: impl tonic::IntoRequest<super::Empty>,
7730        ) -> std::result::Result<tonic::Response<super::NodeInfo>, tonic::Status> {
7731            self.inner
7732                .ready()
7733                .await
7734                .map_err(|e| {
7735                    tonic::Status::unknown(
7736                        format!("Service was not ready: {}", e.into()),
7737                    )
7738                })?;
7739            let codec = tonic::codec::ProstCodec::default();
7740            let path = http::uri::PathAndQuery::from_static(
7741                "/concordium.v2.Queries/GetNodeInfo",
7742            );
7743            let mut req = request.into_request();
7744            req.extensions_mut()
7745                .insert(GrpcMethod::new("concordium.v2.Queries", "GetNodeInfo"));
7746            self.inner.unary(req, path, codec).await
7747        }
7748        /// Send a block item. A block item is either an `AccountTransaction`, which is
7749        /// a transaction signed and paid for by an account, a `CredentialDeployment`,
7750        /// which creates a new account, or `UpdateInstruction`, which is an
7751        /// instruction to change some parameters of the chain. Update instructions can
7752        /// only be sent by the governance committee.
7753        ///
7754        /// Returns a hash of the block item, which can be used with
7755        /// `GetBlockItemStatus`.
7756        pub async fn send_block_item(
7757            &mut self,
7758            request: impl tonic::IntoRequest<super::SendBlockItemRequest>,
7759        ) -> std::result::Result<
7760            tonic::Response<super::TransactionHash>,
7761            tonic::Status,
7762        > {
7763            self.inner
7764                .ready()
7765                .await
7766                .map_err(|e| {
7767                    tonic::Status::unknown(
7768                        format!("Service was not ready: {}", e.into()),
7769                    )
7770                })?;
7771            let codec = tonic::codec::ProstCodec::default();
7772            let path = http::uri::PathAndQuery::from_static(
7773                "/concordium.v2.Queries/SendBlockItem",
7774            );
7775            let mut req = request.into_request();
7776            req.extensions_mut()
7777                .insert(GrpcMethod::new("concordium.v2.Queries", "SendBlockItem"));
7778            self.inner.unary(req, path, codec).await
7779        }
7780        /// Get the hash to be signed for an account transaction. The hash returned
7781        /// should be signed and the signatures included as an
7782        /// AccountTransactionSignature when calling `SendBlockItem`. This is provided as
7783        /// a convenience to support cases where the right SDK is not available for
7784        /// interacting with the node. If an SDK is available then it is strongly
7785        /// recommended to compute this hash off-line using it. That reduces the trust
7786        /// in the node, removes networking failure modes, and will perform better.
7787        pub async fn get_account_transaction_sign_hash(
7788            &mut self,
7789            request: impl tonic::IntoRequest<super::PreAccountTransaction>,
7790        ) -> std::result::Result<
7791            tonic::Response<super::AccountTransactionSignHash>,
7792            tonic::Status,
7793        > {
7794            self.inner
7795                .ready()
7796                .await
7797                .map_err(|e| {
7798                    tonic::Status::unknown(
7799                        format!("Service was not ready: {}", e.into()),
7800                    )
7801                })?;
7802            let codec = tonic::codec::ProstCodec::default();
7803            let path = http::uri::PathAndQuery::from_static(
7804                "/concordium.v2.Queries/GetAccountTransactionSignHash",
7805            );
7806            let mut req = request.into_request();
7807            req.extensions_mut()
7808                .insert(
7809                    GrpcMethod::new(
7810                        "concordium.v2.Queries",
7811                        "GetAccountTransactionSignHash",
7812                    ),
7813                );
7814            self.inner.unary(req, path, codec).await
7815        }
7816        /// Get the hash to be signed for an account transaction v1. The
7817        /// hash returned should be signed and the signatures included as an
7818        /// AccountTransactionV1Signatures when calling `SendBlockItem`. This is
7819        /// provided as a convenience to support cases where the right SDK is not
7820        /// available for interacting with the node. If an SDK is available then it is
7821        /// strongly recommended to compute this hash off-line using it. That reduces
7822        /// the trust in the node, removes networking failure modes, and will perform
7823        /// better.
7824        pub async fn get_account_transaction_v1_sign_hash(
7825            &mut self,
7826            request: impl tonic::IntoRequest<super::PreAccountTransactionV1>,
7827        ) -> std::result::Result<
7828            tonic::Response<super::AccountTransactionSignHash>,
7829            tonic::Status,
7830        > {
7831            self.inner
7832                .ready()
7833                .await
7834                .map_err(|e| {
7835                    tonic::Status::unknown(
7836                        format!("Service was not ready: {}", e.into()),
7837                    )
7838                })?;
7839            let codec = tonic::codec::ProstCodec::default();
7840            let path = http::uri::PathAndQuery::from_static(
7841                "/concordium.v2.Queries/GetAccountTransactionV1SignHash",
7842            );
7843            let mut req = request.into_request();
7844            req.extensions_mut()
7845                .insert(
7846                    GrpcMethod::new(
7847                        "concordium.v2.Queries",
7848                        "GetAccountTransactionV1SignHash",
7849                    ),
7850                );
7851            self.inner.unary(req, path, codec).await
7852        }
7853        /// Get the values of chain parameters in effect in the given block.
7854        pub async fn get_block_chain_parameters(
7855            &mut self,
7856            request: impl tonic::IntoRequest<super::BlockHashInput>,
7857        ) -> std::result::Result<
7858            tonic::Response<super::ChainParameters>,
7859            tonic::Status,
7860        > {
7861            self.inner
7862                .ready()
7863                .await
7864                .map_err(|e| {
7865                    tonic::Status::unknown(
7866                        format!("Service was not ready: {}", e.into()),
7867                    )
7868                })?;
7869            let codec = tonic::codec::ProstCodec::default();
7870            let path = http::uri::PathAndQuery::from_static(
7871                "/concordium.v2.Queries/GetBlockChainParameters",
7872            );
7873            let mut req = request.into_request();
7874            req.extensions_mut()
7875                .insert(
7876                    GrpcMethod::new("concordium.v2.Queries", "GetBlockChainParameters"),
7877                );
7878            self.inner.unary(req, path, codec).await
7879        }
7880        /// Get the summary of the finalization data in a given block.
7881        pub async fn get_block_finalization_summary(
7882            &mut self,
7883            request: impl tonic::IntoRequest<super::BlockHashInput>,
7884        ) -> std::result::Result<
7885            tonic::Response<super::BlockFinalizationSummary>,
7886            tonic::Status,
7887        > {
7888            self.inner
7889                .ready()
7890                .await
7891                .map_err(|e| {
7892                    tonic::Status::unknown(
7893                        format!("Service was not ready: {}", e.into()),
7894                    )
7895                })?;
7896            let codec = tonic::codec::ProstCodec::default();
7897            let path = http::uri::PathAndQuery::from_static(
7898                "/concordium.v2.Queries/GetBlockFinalizationSummary",
7899            );
7900            let mut req = request.into_request();
7901            req.extensions_mut()
7902                .insert(
7903                    GrpcMethod::new(
7904                        "concordium.v2.Queries",
7905                        "GetBlockFinalizationSummary",
7906                    ),
7907                );
7908            self.inner.unary(req, path, codec).await
7909        }
7910        /// Get the items of a block.
7911        pub async fn get_block_items(
7912            &mut self,
7913            request: impl tonic::IntoRequest<super::BlockHashInput>,
7914        ) -> std::result::Result<
7915            tonic::Response<tonic::codec::Streaming<super::BlockItem>>,
7916            tonic::Status,
7917        > {
7918            self.inner
7919                .ready()
7920                .await
7921                .map_err(|e| {
7922                    tonic::Status::unknown(
7923                        format!("Service was not ready: {}", e.into()),
7924                    )
7925                })?;
7926            let codec = tonic::codec::ProstCodec::default();
7927            let path = http::uri::PathAndQuery::from_static(
7928                "/concordium.v2.Queries/GetBlockItems",
7929            );
7930            let mut req = request.into_request();
7931            req.extensions_mut()
7932                .insert(GrpcMethod::new("concordium.v2.Queries", "GetBlockItems"));
7933            self.inner.server_streaming(req, path, codec).await
7934        }
7935        /// Get all bakers in the reward period of a block.
7936        /// This endpoint is only supported for protocol version 6 and onwards.
7937        /// If the protocol does not support the endpoint then an  'IllegalArgument' error is returned.
7938        pub async fn get_bakers_reward_period(
7939            &mut self,
7940            request: impl tonic::IntoRequest<super::BlockHashInput>,
7941        ) -> std::result::Result<
7942            tonic::Response<tonic::codec::Streaming<super::BakerRewardPeriodInfo>>,
7943            tonic::Status,
7944        > {
7945            self.inner
7946                .ready()
7947                .await
7948                .map_err(|e| {
7949                    tonic::Status::unknown(
7950                        format!("Service was not ready: {}", e.into()),
7951                    )
7952                })?;
7953            let codec = tonic::codec::ProstCodec::default();
7954            let path = http::uri::PathAndQuery::from_static(
7955                "/concordium.v2.Queries/GetBakersRewardPeriod",
7956            );
7957            let mut req = request.into_request();
7958            req.extensions_mut()
7959                .insert(
7960                    GrpcMethod::new("concordium.v2.Queries", "GetBakersRewardPeriod"),
7961                );
7962            self.inner.server_streaming(req, path, codec).await
7963        }
7964        /// For a non-genesis block, this returns the quorum certificate, a timeout
7965        /// certificate (if present) and epoch finalization entry (if present).
7966        /// Note that, if the block being pointed to is not a product of ConcordiumBFT,
7967        /// then the response will be a grpc error (invalid argument).
7968        /// If the endpoint is not enabled by the node, then an 'unimplemented' error
7969        /// will be returned.
7970        pub async fn get_block_certificates(
7971            &mut self,
7972            request: impl tonic::IntoRequest<super::BlockHashInput>,
7973        ) -> std::result::Result<
7974            tonic::Response<super::BlockCertificates>,
7975            tonic::Status,
7976        > {
7977            self.inner
7978                .ready()
7979                .await
7980                .map_err(|e| {
7981                    tonic::Status::unknown(
7982                        format!("Service was not ready: {}", e.into()),
7983                    )
7984                })?;
7985            let codec = tonic::codec::ProstCodec::default();
7986            let path = http::uri::PathAndQuery::from_static(
7987                "/concordium.v2.Queries/GetBlockCertificates",
7988            );
7989            let mut req = request.into_request();
7990            req.extensions_mut()
7991                .insert(
7992                    GrpcMethod::new("concordium.v2.Queries", "GetBlockCertificates"),
7993                );
7994            self.inner.unary(req, path, codec).await
7995        }
7996        /// Get the list of bakers that won the lottery in a particular historical epoch (i.e. the
7997        /// last finalized block is in a later epoch). This lists the winners for each round in the
7998        /// epoch, starting from the round after the last block in the previous epoch, running to
7999        /// the round before the first block in the next epoch. It also indicates if a block in each
8000        /// round was included in the finalized chain.
8001        ///
8002        /// The following error cases are possible:
8003        ///  * `NOT_FOUND` if the query specifies an unknown block.
8004        ///  * `UNAVAILABLE` if the query is for an epoch that is not finalized in the current genesis
8005        ///     index, or is for a future genesis index.
8006        ///  * `INVALID_ARGUMENT` if the query is for an epoch that is not finalized for a past genesis
8007        ///    index.
8008        ///  * `INVALID_ARGUMENT` if the query is for a genesis index at consensus version 0.
8009        ///  * `INVALID_ARGUMENT` if the input `EpochRequest` is malformed.
8010        ///  * `UNIMPLEMENTED` if the endpoint is disabled on the node.
8011        pub async fn get_winning_bakers_epoch(
8012            &mut self,
8013            request: impl tonic::IntoRequest<super::EpochRequest>,
8014        ) -> std::result::Result<
8015            tonic::Response<tonic::codec::Streaming<super::WinningBaker>>,
8016            tonic::Status,
8017        > {
8018            self.inner
8019                .ready()
8020                .await
8021                .map_err(|e| {
8022                    tonic::Status::unknown(
8023                        format!("Service was not ready: {}", e.into()),
8024                    )
8025                })?;
8026            let codec = tonic::codec::ProstCodec::default();
8027            let path = http::uri::PathAndQuery::from_static(
8028                "/concordium.v2.Queries/GetWinningBakersEpoch",
8029            );
8030            let mut req = request.into_request();
8031            req.extensions_mut()
8032                .insert(
8033                    GrpcMethod::new("concordium.v2.Queries", "GetWinningBakersEpoch"),
8034                );
8035            self.inner.server_streaming(req, path, codec).await
8036        }
8037        /// Get the block hash of the first finalized block in a specified epoch.
8038        ///
8039        /// The following error cases are possible:
8040        ///  * `NOT_FOUND` if the query specifies an unknown block.
8041        ///  * `UNAVAILABLE` if the query is for an epoch that is not finalized in the current genesis
8042        ///    index, or is for a future genesis index.
8043        ///  * `INVALID_ARGUMENT` if the query is for an epoch with no finalized blocks for a past genesis
8044        ///    index.
8045        ///  * `INVALID_ARGUMENT` if the input `EpochRequest` is malformed.
8046        ///  * `UNIMPLEMENTED` if the endpoint is disabled on the node.
8047        pub async fn get_first_block_epoch(
8048            &mut self,
8049            request: impl tonic::IntoRequest<super::EpochRequest>,
8050        ) -> std::result::Result<tonic::Response<super::BlockHash>, tonic::Status> {
8051            self.inner
8052                .ready()
8053                .await
8054                .map_err(|e| {
8055                    tonic::Status::unknown(
8056                        format!("Service was not ready: {}", e.into()),
8057                    )
8058                })?;
8059            let codec = tonic::codec::ProstCodec::default();
8060            let path = http::uri::PathAndQuery::from_static(
8061                "/concordium.v2.Queries/GetFirstBlockEpoch",
8062            );
8063            let mut req = request.into_request();
8064            req.extensions_mut()
8065                .insert(GrpcMethod::new("concordium.v2.Queries", "GetFirstBlockEpoch"));
8066            self.inner.unary(req, path, codec).await
8067        }
8068        /// Get the detailed status of the consensus. This is only available for consensus version 1.
8069        ///
8070        /// The following error cases are possible:
8071        ///  * `NOT_FOUND` if the query specifies an unknown genesis index.
8072        ///  * `INVALID_ARGUMENT` if the query specifies a genesis index at consensus version 0.
8073        ///  * `UNIMPLEMENTED` if the endpoint is disabled on the node.
8074        pub async fn get_consensus_detailed_status(
8075            &mut self,
8076            request: impl tonic::IntoRequest<super::ConsensusDetailedStatusQuery>,
8077        ) -> std::result::Result<
8078            tonic::Response<super::ConsensusDetailedStatus>,
8079            tonic::Status,
8080        > {
8081            self.inner
8082                .ready()
8083                .await
8084                .map_err(|e| {
8085                    tonic::Status::unknown(
8086                        format!("Service was not ready: {}", e.into()),
8087                    )
8088                })?;
8089            let codec = tonic::codec::ProstCodec::default();
8090            let path = http::uri::PathAndQuery::from_static(
8091                "/concordium.v2.Queries/GetConsensusDetailedStatus",
8092            );
8093            let mut req = request.into_request();
8094            req.extensions_mut()
8095                .insert(
8096                    GrpcMethod::new(
8097                        "concordium.v2.Queries",
8098                        "GetConsensusDetailedStatus",
8099                    ),
8100                );
8101            self.inner.unary(req, path, codec).await
8102        }
8103        /// Dry run a series of transactions and operations on a state derived from a specified block.
8104        /// The server should send a single `DryRunResponse` for each `DryRunRequest` received, unless
8105        /// the call fails with an error status code. If a request produces a `DryRunErrorResponse`, then
8106        /// the server will still process subsequent requests, just as if the request causing the error
8107        /// did not happen.
8108        ///
8109        /// The first request should be `load_block_at_state` to determine the block state that will be
8110        /// used for the dry run.
8111        ///
8112        /// The server associates each request with an energy cost, and limits the total energy that may
8113        /// be expended in a single invocation of `DryRun`. This limit is reported as `quota` in the
8114        /// initial metadata returned by the server. If executing an operation exceeds the limit,
8115        /// the server terminates the session with `RESOURCE_EXHAUSTED`.
8116        ///
8117        /// The server also imposes a timeout for a dry-run session to complete. The server reports
8118        /// the timeout duration in milliseconds in the initial metadata field `timeout`. If the session
8119        /// is not completed before the timeout elapses, the server terminates the session with
8120        /// `DEADLINE_EXCEEDED`.
8121        ///
8122        /// The following error cases are possible:
8123        ///  * `INVALID_ARGUMENT` if any `DryRunRequest` is malformed.
8124        ///  * `RESOURCE_EXHAUSTED` if the energy quota is exceeded.
8125        ///  * `DEADLINE_EXCEEDED` if the session does not complete before the server-imposed timeout.
8126        ///  * `RESOURCE_EXHAUSTED` if the server is not currently accepting new `DryRun` sessions.
8127        ///    (The server may impose a limit on the number of concurrent sessions.)
8128        ///  * `INTERNAL` if an interal server error occurs. This should not happen, and likely indicates
8129        ///    a bug.
8130        ///  * `UNIMPLEMENTED` if the endpoint is disabled on the node.
8131        pub async fn dry_run(
8132            &mut self,
8133            request: impl tonic::IntoStreamingRequest<Message = super::DryRunRequest>,
8134        ) -> std::result::Result<
8135            tonic::Response<tonic::codec::Streaming<super::DryRunResponse>>,
8136            tonic::Status,
8137        > {
8138            self.inner
8139                .ready()
8140                .await
8141                .map_err(|e| {
8142                    tonic::Status::unknown(
8143                        format!("Service was not ready: {}", e.into()),
8144                    )
8145                })?;
8146            let codec = tonic::codec::ProstCodec::default();
8147            let path = http::uri::PathAndQuery::from_static(
8148                "/concordium.v2.Queries/DryRun",
8149            );
8150            let mut req = request.into_streaming_request();
8151            req.extensions_mut()
8152                .insert(GrpcMethod::new("concordium.v2.Queries", "DryRun"));
8153            self.inner.streaming(req, path, codec).await
8154        }
8155    }
8156}