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