sui_rpc/proto/generated/
sui.rpc.v2beta2.rs

1// This file is @generated by prost-build.
2/// An argument to a programmable transaction command.
3#[non_exhaustive]
4#[derive(Clone, Copy, PartialEq, ::prost::Message)]
5pub struct Argument {
6    #[prost(enumeration = "argument::ArgumentKind", optional, tag = "1")]
7    pub kind: ::core::option::Option<i32>,
8    /// Index of an input when `kind` is `INPUT`.
9    #[prost(uint32, optional, tag = "2")]
10    pub input: ::core::option::Option<u32>,
11    /// Index of a result when `kind` is `RESULT`.
12    #[prost(uint32, optional, tag = "3")]
13    pub result: ::core::option::Option<u32>,
14    /// Used to access a nested result when `kind` is `RESULT`.
15    #[prost(uint32, optional, tag = "4")]
16    pub subresult: ::core::option::Option<u32>,
17}
18/// Nested message and enum types in `Argument`.
19pub mod argument {
20    #[non_exhaustive]
21    #[derive(
22        Clone,
23        Copy,
24        Debug,
25        PartialEq,
26        Eq,
27        Hash,
28        PartialOrd,
29        Ord,
30        ::prost::Enumeration
31    )]
32    #[repr(i32)]
33    pub enum ArgumentKind {
34        Unknown = 0,
35        /// The gas coin.
36        Gas = 1,
37        /// One of the input objects or primitive values (from
38        /// `ProgrammableTransaction` inputs).
39        Input = 2,
40        /// The result of another command (from `ProgrammableTransaction` commands).
41        Result = 3,
42    }
43    impl ArgumentKind {
44        /// String value of the enum field names used in the ProtoBuf definition.
45        ///
46        /// The values are not transformed in any way and thus are considered stable
47        /// (if the ProtoBuf definition does not change) and safe for programmatic use.
48        pub fn as_str_name(&self) -> &'static str {
49            match self {
50                Self::Unknown => "ARGUMENT_KIND_UNKNOWN",
51                Self::Gas => "GAS",
52                Self::Input => "INPUT",
53                Self::Result => "RESULT",
54            }
55        }
56        /// Creates an enum from field names used in the ProtoBuf definition.
57        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
58            match value {
59                "ARGUMENT_KIND_UNKNOWN" => Some(Self::Unknown),
60                "GAS" => Some(Self::Gas),
61                "INPUT" => Some(Self::Input),
62                "RESULT" => Some(Self::Result),
63                _ => None,
64            }
65        }
66    }
67}
68/// The delta, or change, in balance for an address for a particular `Coin` type.
69#[non_exhaustive]
70#[derive(Clone, PartialEq, ::prost::Message)]
71pub struct BalanceChange {
72    /// The account address that is affected by this balance change event.
73    #[prost(string, optional, tag = "1")]
74    pub address: ::core::option::Option<::prost::alloc::string::String>,
75    /// The `Coin` type of this balance change event.
76    #[prost(string, optional, tag = "2")]
77    pub coin_type: ::core::option::Option<::prost::alloc::string::String>,
78    /// The amount or change in balance.
79    #[prost(string, optional, tag = "3")]
80    pub amount: ::core::option::Option<::prost::alloc::string::String>,
81}
82/// `Bcs` contains an arbitrary type that is serialized using the
83/// [BCS](<https://mystenlabs.github.io/sui-rust-sdk/sui_sdk_types/index.html#bcs>)
84/// format as well as a name that identifies the type of the serialized value.
85#[non_exhaustive]
86#[derive(Clone, PartialEq, ::prost::Message)]
87pub struct Bcs {
88    /// Name that identifies the type of the serialized value.
89    #[prost(string, optional, tag = "1")]
90    pub name: ::core::option::Option<::prost::alloc::string::String>,
91    /// Bytes of a BCS serialized value.
92    #[prost(bytes = "bytes", optional, tag = "2")]
93    pub value: ::core::option::Option<::prost::bytes::Bytes>,
94}
95#[non_exhaustive]
96#[derive(Clone, PartialEq, ::prost::Message)]
97pub struct Checkpoint {
98    /// The height of this checkpoint.
99    #[prost(uint64, optional, tag = "1")]
100    pub sequence_number: ::core::option::Option<u64>,
101    /// The digest of this Checkpoint's CheckpointSummary.
102    #[prost(string, optional, tag = "2")]
103    pub digest: ::core::option::Option<::prost::alloc::string::String>,
104    /// The `CheckpointSummary` for this checkpoint.
105    #[prost(message, optional, tag = "3")]
106    pub summary: ::core::option::Option<CheckpointSummary>,
107    /// An aggregated quorum signature from the validator committee that
108    /// certified this checkpoint.
109    #[prost(message, optional, tag = "4")]
110    pub signature: ::core::option::Option<ValidatorAggregatedSignature>,
111    /// The `CheckpointContents` for this checkpoint.
112    #[prost(message, optional, tag = "5")]
113    pub contents: ::core::option::Option<CheckpointContents>,
114    /// List of transactions included in this checkpoint.
115    #[prost(message, repeated, tag = "6")]
116    pub transactions: ::prost::alloc::vec::Vec<ExecutedTransaction>,
117}
118/// The committed to contents of a checkpoint.
119#[non_exhaustive]
120#[derive(Clone, PartialEq, ::prost::Message)]
121pub struct CheckpointContents {
122    /// This CheckpointContents serialized as BCS.
123    #[prost(message, optional, tag = "1")]
124    pub bcs: ::core::option::Option<Bcs>,
125    /// The digest of this CheckpointContents.
126    #[prost(string, optional, tag = "2")]
127    pub digest: ::core::option::Option<::prost::alloc::string::String>,
128    /// Version of this CheckpointContents
129    #[prost(int32, optional, tag = "3")]
130    pub version: ::core::option::Option<i32>,
131    /// Set of transactions committed to in this checkpoint.
132    #[prost(message, repeated, tag = "4")]
133    pub transactions: ::prost::alloc::vec::Vec<CheckpointedTransactionInfo>,
134}
135/// Transaction information committed to in a checkpoint.
136#[non_exhaustive]
137#[derive(Clone, PartialEq, ::prost::Message)]
138pub struct CheckpointedTransactionInfo {
139    /// Digest of the transaction.
140    #[prost(string, optional, tag = "1")]
141    pub transaction: ::core::option::Option<::prost::alloc::string::String>,
142    /// Digest of the effects.
143    #[prost(string, optional, tag = "2")]
144    pub effects: ::core::option::Option<::prost::alloc::string::String>,
145    /// Set of user signatures that authorized the transaction.
146    #[prost(message, repeated, tag = "3")]
147    pub signatures: ::prost::alloc::vec::Vec<UserSignature>,
148}
149/// A header for a checkpoint on the Sui blockchain.
150///
151/// On the Sui network, checkpoints define the history of the blockchain. They are quite similar to
152/// the concept of blocks used by other blockchains like Bitcoin or Ethereum. The Sui blockchain,
153/// however, forms checkpoints after transaction execution has already happened to provide a
154/// certified history of the chain, instead of being formed before execution.
155///
156/// Checkpoints commit to a variety of state, including but not limited to:
157/// - The hash of the previous checkpoint.
158/// - The set of transaction digests, their corresponding effects digests, as well as the set of
159///    user signatures that authorized its execution.
160/// - The objects produced by a transaction.
161/// - The set of live objects that make up the current state of the chain.
162/// - On epoch transitions, the next validator committee.
163///
164/// `CheckpointSummary`s themselves don't directly include all of the previous information but they
165/// are the top-level type by which all the information is committed to transitively via cryptographic
166/// hashes included in the summary. `CheckpointSummary`s are signed and certified by a quorum of
167/// the validator committee in a given epoch to allow verification of the chain's state.
168#[non_exhaustive]
169#[derive(Clone, PartialEq, ::prost::Message)]
170pub struct CheckpointSummary {
171    /// This CheckpointSummary serialized as BCS.
172    #[prost(message, optional, tag = "1")]
173    pub bcs: ::core::option::Option<Bcs>,
174    /// The digest of this CheckpointSummary.
175    #[prost(string, optional, tag = "2")]
176    pub digest: ::core::option::Option<::prost::alloc::string::String>,
177    /// Epoch that this checkpoint belongs to.
178    #[prost(uint64, optional, tag = "3")]
179    pub epoch: ::core::option::Option<u64>,
180    /// The height of this checkpoint.
181    #[prost(uint64, optional, tag = "4")]
182    pub sequence_number: ::core::option::Option<u64>,
183    /// Total number of transactions committed since genesis, including those in this
184    /// checkpoint.
185    #[prost(uint64, optional, tag = "5")]
186    pub total_network_transactions: ::core::option::Option<u64>,
187    /// The hash of the `CheckpointContents` for this checkpoint.
188    #[prost(string, optional, tag = "6")]
189    pub content_digest: ::core::option::Option<::prost::alloc::string::String>,
190    /// The hash of the previous `CheckpointSummary`.
191    ///
192    /// This will be `None` only for the first, or genesis, checkpoint.
193    #[prost(string, optional, tag = "7")]
194    pub previous_digest: ::core::option::Option<::prost::alloc::string::String>,
195    /// The running total gas costs of all transactions included in the current epoch so far
196    /// until this checkpoint.
197    #[prost(message, optional, tag = "8")]
198    pub epoch_rolling_gas_cost_summary: ::core::option::Option<GasCostSummary>,
199    /// Timestamp of the checkpoint - number of milliseconds from the Unix epoch
200    /// Checkpoint timestamps are monotonic, but not strongly monotonic - subsequent
201    /// checkpoints can have the same timestamp if they originate from the same underlining consensus commit.
202    #[prost(message, optional, tag = "9")]
203    pub timestamp: ::core::option::Option<::prost_types::Timestamp>,
204    /// Commitments to checkpoint-specific state.
205    #[prost(message, repeated, tag = "10")]
206    pub commitments: ::prost::alloc::vec::Vec<CheckpointCommitment>,
207    /// Extra data only present in the final checkpoint of an epoch.
208    #[prost(message, optional, tag = "11")]
209    pub end_of_epoch_data: ::core::option::Option<EndOfEpochData>,
210    /// `CheckpointSummary` is not an evolvable structure - it must be readable by any version of
211    /// the code. Therefore, to allow extensions to be added to `CheckpointSummary`,
212    /// opaque data can be added to checkpoints, which can be deserialized based on the current
213    /// protocol version.
214    #[prost(bytes = "bytes", optional, tag = "12")]
215    pub version_specific_data: ::core::option::Option<::prost::bytes::Bytes>,
216}
217/// Data, which when included in a `CheckpointSummary`, signals the end of an `Epoch`.
218#[non_exhaustive]
219#[derive(Clone, PartialEq, ::prost::Message)]
220pub struct EndOfEpochData {
221    /// The set of validators that will be in the `ValidatorCommittee` for the next epoch.
222    #[prost(message, repeated, tag = "1")]
223    pub next_epoch_committee: ::prost::alloc::vec::Vec<ValidatorCommitteeMember>,
224    /// The protocol version that is in effect during the next epoch.
225    #[prost(uint64, optional, tag = "2")]
226    pub next_epoch_protocol_version: ::core::option::Option<u64>,
227    /// Commitments to epoch specific state (live object set)
228    #[prost(message, repeated, tag = "3")]
229    pub epoch_commitments: ::prost::alloc::vec::Vec<CheckpointCommitment>,
230}
231/// A commitment made by a checkpoint.
232#[non_exhaustive]
233#[derive(Clone, PartialEq, ::prost::Message)]
234pub struct CheckpointCommitment {
235    #[prost(
236        enumeration = "checkpoint_commitment::CheckpointCommitmentKind",
237        optional,
238        tag = "1"
239    )]
240    pub kind: ::core::option::Option<i32>,
241    #[prost(string, optional, tag = "2")]
242    pub digest: ::core::option::Option<::prost::alloc::string::String>,
243}
244/// Nested message and enum types in `CheckpointCommitment`.
245pub mod checkpoint_commitment {
246    #[non_exhaustive]
247    #[derive(
248        Clone,
249        Copy,
250        Debug,
251        PartialEq,
252        Eq,
253        Hash,
254        PartialOrd,
255        Ord,
256        ::prost::Enumeration
257    )]
258    #[repr(i32)]
259    pub enum CheckpointCommitmentKind {
260        Unknown = 0,
261        /// An elliptic curve multiset hash attesting to the set of objects that
262        /// comprise the live state of the Sui blockchain.
263        EcmhLiveObjectSet = 1,
264        /// Digest of the checkpoint artifacts.
265        CheckpointArtifacts = 2,
266    }
267    impl CheckpointCommitmentKind {
268        /// String value of the enum field names used in the ProtoBuf definition.
269        ///
270        /// The values are not transformed in any way and thus are considered stable
271        /// (if the ProtoBuf definition does not change) and safe for programmatic use.
272        pub fn as_str_name(&self) -> &'static str {
273            match self {
274                Self::Unknown => "CHECKPOINT_COMMITMENT_KIND_UNKNOWN",
275                Self::EcmhLiveObjectSet => "ECMH_LIVE_OBJECT_SET",
276                Self::CheckpointArtifacts => "CHECKPOINT_ARTIFACTS",
277            }
278        }
279        /// Creates an enum from field names used in the ProtoBuf definition.
280        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
281            match value {
282                "CHECKPOINT_COMMITMENT_KIND_UNKNOWN" => Some(Self::Unknown),
283                "ECMH_LIVE_OBJECT_SET" => Some(Self::EcmhLiveObjectSet),
284                "CHECKPOINT_ARTIFACTS" => Some(Self::CheckpointArtifacts),
285                _ => None,
286            }
287        }
288    }
289}
290/// The effects of executing a transaction.
291#[non_exhaustive]
292#[derive(Clone, PartialEq, ::prost::Message)]
293pub struct TransactionEffects {
294    /// This TransactionEffects serialized as BCS.
295    #[prost(message, optional, tag = "1")]
296    pub bcs: ::core::option::Option<Bcs>,
297    /// The digest of this TransactionEffects.
298    #[prost(string, optional, tag = "2")]
299    pub digest: ::core::option::Option<::prost::alloc::string::String>,
300    /// Version of this TransactionEffects.
301    #[prost(int32, optional, tag = "3")]
302    pub version: ::core::option::Option<i32>,
303    /// The status of the execution.
304    #[prost(message, optional, tag = "4")]
305    pub status: ::core::option::Option<ExecutionStatus>,
306    /// The epoch when this transaction was executed.
307    #[prost(uint64, optional, tag = "5")]
308    pub epoch: ::core::option::Option<u64>,
309    /// The gas used by this transaction.
310    #[prost(message, optional, tag = "6")]
311    pub gas_used: ::core::option::Option<GasCostSummary>,
312    /// The transaction digest.
313    #[prost(string, optional, tag = "7")]
314    pub transaction_digest: ::core::option::Option<::prost::alloc::string::String>,
315    /// Information about the gas object. Also present in the `changed_objects` vector.
316    ///
317    /// System transaction that don't require gas will leave this as `None`.
318    #[prost(message, optional, tag = "8")]
319    pub gas_object: ::core::option::Option<ChangedObject>,
320    /// The digest of the events emitted during execution,
321    /// can be `None` if the transaction does not emit any event.
322    #[prost(string, optional, tag = "9")]
323    pub events_digest: ::core::option::Option<::prost::alloc::string::String>,
324    /// The set of transaction digests this transaction depends on.
325    #[prost(string, repeated, tag = "10")]
326    pub dependencies: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
327    /// The version number of all the written objects (excluding packages) by this transaction.
328    #[prost(uint64, optional, tag = "11")]
329    pub lamport_version: ::core::option::Option<u64>,
330    /// Objects whose state are changed by this transaction.
331    #[prost(message, repeated, tag = "12")]
332    pub changed_objects: ::prost::alloc::vec::Vec<ChangedObject>,
333    /// Consensus objects that are not mutated in this transaction. Unlike owned objects,
334    /// read-only consensus objects' version are not committed in the transaction,
335    /// and in order for a node to catch up and execute it without consensus sequencing,
336    /// the version needs to be committed in the effects.
337    #[prost(message, repeated, tag = "13")]
338    pub unchanged_consensus_objects: ::prost::alloc::vec::Vec<UnchangedConsensusObject>,
339    /// Auxiliary data that are not protocol-critical, generated as part of the effects but are stored separately.
340    /// Storing it separately allows us to avoid bloating the effects with data that are not critical.
341    /// It also provides more flexibility on the format and type of the data.
342    #[prost(string, optional, tag = "14")]
343    pub auxiliary_data_digest: ::core::option::Option<::prost::alloc::string::String>,
344}
345/// Input/output state of an object that was changed during execution.
346#[non_exhaustive]
347#[derive(Clone, PartialEq, ::prost::Message)]
348pub struct ChangedObject {
349    /// ID of the object.
350    #[prost(string, optional, tag = "1")]
351    pub object_id: ::core::option::Option<::prost::alloc::string::String>,
352    #[prost(enumeration = "changed_object::InputObjectState", optional, tag = "2")]
353    pub input_state: ::core::option::Option<i32>,
354    /// Version of the object before this transaction executed.
355    #[prost(uint64, optional, tag = "3")]
356    pub input_version: ::core::option::Option<u64>,
357    /// Digest of the object before this transaction executed.
358    #[prost(string, optional, tag = "4")]
359    pub input_digest: ::core::option::Option<::prost::alloc::string::String>,
360    /// Owner of the object before this transaction executed.
361    #[prost(message, optional, tag = "5")]
362    pub input_owner: ::core::option::Option<Owner>,
363    #[prost(enumeration = "changed_object::OutputObjectState", optional, tag = "6")]
364    pub output_state: ::core::option::Option<i32>,
365    /// Version of the object after this transaction executed.
366    #[prost(uint64, optional, tag = "7")]
367    pub output_version: ::core::option::Option<u64>,
368    /// Digest of the object after this transaction executed.
369    #[prost(string, optional, tag = "8")]
370    pub output_digest: ::core::option::Option<::prost::alloc::string::String>,
371    /// Owner of the object after this transaction executed.
372    #[prost(message, optional, tag = "9")]
373    pub output_owner: ::core::option::Option<Owner>,
374    /// What happened to an `ObjectId` during execution.
375    #[prost(enumeration = "changed_object::IdOperation", optional, tag = "10")]
376    pub id_operation: ::core::option::Option<i32>,
377    /// Type information is not provided by the effects structure but is instead
378    /// provided by an indexing layer
379    #[prost(string, optional, tag = "11")]
380    pub object_type: ::core::option::Option<::prost::alloc::string::String>,
381}
382/// Nested message and enum types in `ChangedObject`.
383pub mod changed_object {
384    #[non_exhaustive]
385    #[derive(
386        Clone,
387        Copy,
388        Debug,
389        PartialEq,
390        Eq,
391        Hash,
392        PartialOrd,
393        Ord,
394        ::prost::Enumeration
395    )]
396    #[repr(i32)]
397    pub enum InputObjectState {
398        Unknown = 0,
399        DoesNotExist = 1,
400        Exists = 2,
401    }
402    impl InputObjectState {
403        /// String value of the enum field names used in the ProtoBuf definition.
404        ///
405        /// The values are not transformed in any way and thus are considered stable
406        /// (if the ProtoBuf definition does not change) and safe for programmatic use.
407        pub fn as_str_name(&self) -> &'static str {
408            match self {
409                Self::Unknown => "INPUT_OBJECT_STATE_UNKNOWN",
410                Self::DoesNotExist => "INPUT_OBJECT_STATE_DOES_NOT_EXIST",
411                Self::Exists => "INPUT_OBJECT_STATE_EXISTS",
412            }
413        }
414        /// Creates an enum from field names used in the ProtoBuf definition.
415        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
416            match value {
417                "INPUT_OBJECT_STATE_UNKNOWN" => Some(Self::Unknown),
418                "INPUT_OBJECT_STATE_DOES_NOT_EXIST" => Some(Self::DoesNotExist),
419                "INPUT_OBJECT_STATE_EXISTS" => Some(Self::Exists),
420                _ => None,
421            }
422        }
423    }
424    #[non_exhaustive]
425    #[derive(
426        Clone,
427        Copy,
428        Debug,
429        PartialEq,
430        Eq,
431        Hash,
432        PartialOrd,
433        Ord,
434        ::prost::Enumeration
435    )]
436    #[repr(i32)]
437    pub enum OutputObjectState {
438        Unknown = 0,
439        DoesNotExist = 1,
440        ObjectWrite = 2,
441        PackageWrite = 3,
442    }
443    impl OutputObjectState {
444        /// String value of the enum field names used in the ProtoBuf definition.
445        ///
446        /// The values are not transformed in any way and thus are considered stable
447        /// (if the ProtoBuf definition does not change) and safe for programmatic use.
448        pub fn as_str_name(&self) -> &'static str {
449            match self {
450                Self::Unknown => "OUTPUT_OBJECT_STATE_UNKNOWN",
451                Self::DoesNotExist => "OUTPUT_OBJECT_STATE_DOES_NOT_EXIST",
452                Self::ObjectWrite => "OUTPUT_OBJECT_STATE_OBJECT_WRITE",
453                Self::PackageWrite => "OUTPUT_OBJECT_STATE_PACKAGE_WRITE",
454            }
455        }
456        /// Creates an enum from field names used in the ProtoBuf definition.
457        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
458            match value {
459                "OUTPUT_OBJECT_STATE_UNKNOWN" => Some(Self::Unknown),
460                "OUTPUT_OBJECT_STATE_DOES_NOT_EXIST" => Some(Self::DoesNotExist),
461                "OUTPUT_OBJECT_STATE_OBJECT_WRITE" => Some(Self::ObjectWrite),
462                "OUTPUT_OBJECT_STATE_PACKAGE_WRITE" => Some(Self::PackageWrite),
463                _ => None,
464            }
465        }
466    }
467    #[non_exhaustive]
468    #[derive(
469        Clone,
470        Copy,
471        Debug,
472        PartialEq,
473        Eq,
474        Hash,
475        PartialOrd,
476        Ord,
477        ::prost::Enumeration
478    )]
479    #[repr(i32)]
480    pub enum IdOperation {
481        Unknown = 0,
482        None = 1,
483        Created = 2,
484        Deleted = 3,
485    }
486    impl IdOperation {
487        /// String value of the enum field names used in the ProtoBuf definition.
488        ///
489        /// The values are not transformed in any way and thus are considered stable
490        /// (if the ProtoBuf definition does not change) and safe for programmatic use.
491        pub fn as_str_name(&self) -> &'static str {
492            match self {
493                Self::Unknown => "ID_OPERATION_UNKNOWN",
494                Self::None => "NONE",
495                Self::Created => "CREATED",
496                Self::Deleted => "DELETED",
497            }
498        }
499        /// Creates an enum from field names used in the ProtoBuf definition.
500        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
501            match value {
502                "ID_OPERATION_UNKNOWN" => Some(Self::Unknown),
503                "NONE" => Some(Self::None),
504                "CREATED" => Some(Self::Created),
505                "DELETED" => Some(Self::Deleted),
506                _ => None,
507            }
508        }
509    }
510}
511/// A consensus object that wasn't changed during execution.
512#[non_exhaustive]
513#[derive(Clone, PartialEq, ::prost::Message)]
514pub struct UnchangedConsensusObject {
515    #[prost(
516        enumeration = "unchanged_consensus_object::UnchangedConsensusObjectKind",
517        optional,
518        tag = "1"
519    )]
520    pub kind: ::core::option::Option<i32>,
521    /// ObjectId of the consensus object.
522    #[prost(string, optional, tag = "2")]
523    pub object_id: ::core::option::Option<::prost::alloc::string::String>,
524    /// Version of the consensus object.
525    #[prost(uint64, optional, tag = "3")]
526    pub version: ::core::option::Option<u64>,
527    /// Digest of the consensus object.
528    #[prost(string, optional, tag = "4")]
529    pub digest: ::core::option::Option<::prost::alloc::string::String>,
530    /// Type information is not provided by the effects structure but is instead
531    /// provided by an indexing layer
532    #[prost(string, optional, tag = "5")]
533    pub object_type: ::core::option::Option<::prost::alloc::string::String>,
534}
535/// Nested message and enum types in `UnchangedConsensusObject`.
536pub mod unchanged_consensus_object {
537    #[non_exhaustive]
538    #[derive(
539        Clone,
540        Copy,
541        Debug,
542        PartialEq,
543        Eq,
544        Hash,
545        PartialOrd,
546        Ord,
547        ::prost::Enumeration
548    )]
549    #[repr(i32)]
550    pub enum UnchangedConsensusObjectKind {
551        Unknown = 0,
552        /// Read-only consensus object from the input.
553        ReadOnlyRoot = 1,
554        /// Objects with ended consensus streams that appear mutably/owned in the input.
555        MutateConsensusStreamEnded = 2,
556        /// Objects with ended consensus streams objects that appear as read-only in the input.
557        ReadConsensusStreamEnded = 3,
558        /// Consensus objects that were congested and resulted in this transaction being
559        /// canceled.
560        Canceled = 4,
561        /// Read of a per-epoch config object that should remain the same during an
562        /// epoch. This optionally will indicate the sequence number of the config
563        /// object at the start of the epoch.
564        PerEpochConfig = 5,
565    }
566    impl UnchangedConsensusObjectKind {
567        /// String value of the enum field names used in the ProtoBuf definition.
568        ///
569        /// The values are not transformed in any way and thus are considered stable
570        /// (if the ProtoBuf definition does not change) and safe for programmatic use.
571        pub fn as_str_name(&self) -> &'static str {
572            match self {
573                Self::Unknown => "UNCHANGED_CONSENSUS_OBJECT_KIND_UNKNOWN",
574                Self::ReadOnlyRoot => "READ_ONLY_ROOT",
575                Self::MutateConsensusStreamEnded => "MUTATE_CONSENSUS_STREAM_ENDED",
576                Self::ReadConsensusStreamEnded => "READ_CONSENSUS_STREAM_ENDED",
577                Self::Canceled => "CANCELED",
578                Self::PerEpochConfig => "PER_EPOCH_CONFIG",
579            }
580        }
581        /// Creates an enum from field names used in the ProtoBuf definition.
582        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
583            match value {
584                "UNCHANGED_CONSENSUS_OBJECT_KIND_UNKNOWN" => Some(Self::Unknown),
585                "READ_ONLY_ROOT" => Some(Self::ReadOnlyRoot),
586                "MUTATE_CONSENSUS_STREAM_ENDED" => Some(Self::MutateConsensusStreamEnded),
587                "READ_CONSENSUS_STREAM_ENDED" => Some(Self::ReadConsensusStreamEnded),
588                "CANCELED" => Some(Self::Canceled),
589                "PER_EPOCH_CONFIG" => Some(Self::PerEpochConfig),
590                _ => None,
591            }
592        }
593    }
594}
595#[non_exhaustive]
596#[derive(Clone, PartialEq, ::prost::Message)]
597pub struct Epoch {
598    #[prost(uint64, optional, tag = "1")]
599    pub epoch: ::core::option::Option<u64>,
600    /// The committee governing this epoch.
601    #[prost(message, optional, tag = "2")]
602    pub committee: ::core::option::Option<ValidatorCommittee>,
603    /// Snapshot of Sui's SystemState (`0x3::sui_system::SystemState`) at the
604    /// beginning of the epoch, for past epochs, or the current state for the
605    /// current epoch.
606    #[prost(message, optional, boxed, tag = "3")]
607    pub system_state: ::core::option::Option<::prost::alloc::boxed::Box<SystemState>>,
608    #[prost(uint64, optional, tag = "4")]
609    pub first_checkpoint: ::core::option::Option<u64>,
610    #[prost(uint64, optional, tag = "5")]
611    pub last_checkpoint: ::core::option::Option<u64>,
612    #[prost(message, optional, tag = "6")]
613    pub start: ::core::option::Option<::prost_types::Timestamp>,
614    #[prost(message, optional, tag = "7")]
615    pub end: ::core::option::Option<::prost_types::Timestamp>,
616    /// Reference gas price denominated in MIST
617    #[prost(uint64, optional, tag = "8")]
618    pub reference_gas_price: ::core::option::Option<u64>,
619    #[prost(message, optional, tag = "9")]
620    pub protocol_config: ::core::option::Option<ProtocolConfig>,
621}
622#[non_exhaustive]
623#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
624#[repr(i32)]
625pub enum ErrorReason {
626    Unknown = 0,
627    FieldInvalid = 1,
628    FieldMissing = 2,
629}
630impl ErrorReason {
631    /// String value of the enum field names used in the ProtoBuf definition.
632    ///
633    /// The values are not transformed in any way and thus are considered stable
634    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
635    pub fn as_str_name(&self) -> &'static str {
636        match self {
637            Self::Unknown => "ERROR_REASON_UNKNOWN",
638            Self::FieldInvalid => "FIELD_INVALID",
639            Self::FieldMissing => "FIELD_MISSING",
640        }
641    }
642    /// Creates an enum from field names used in the ProtoBuf definition.
643    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
644        match value {
645            "ERROR_REASON_UNKNOWN" => Some(Self::Unknown),
646            "FIELD_INVALID" => Some(Self::FieldInvalid),
647            "FIELD_MISSING" => Some(Self::FieldMissing),
648            _ => None,
649        }
650    }
651}
652/// Events emitted during the successful execution of a transaction.
653#[non_exhaustive]
654#[derive(Clone, PartialEq, ::prost::Message)]
655pub struct TransactionEvents {
656    /// This TransactionEvents serialized as BCS.
657    #[prost(message, optional, tag = "1")]
658    pub bcs: ::core::option::Option<Bcs>,
659    /// The digest of this TransactionEvents.
660    #[prost(string, optional, tag = "2")]
661    pub digest: ::core::option::Option<::prost::alloc::string::String>,
662    /// Set of events emitted by a transaction.
663    #[prost(message, repeated, tag = "3")]
664    pub events: ::prost::alloc::vec::Vec<Event>,
665}
666/// An event.
667#[non_exhaustive]
668#[derive(Clone, PartialEq, ::prost::Message)]
669pub struct Event {
670    /// Package ID of the top-level function invoked by a `MoveCall` command that triggered this
671    /// event to be emitted.
672    #[prost(string, optional, tag = "1")]
673    pub package_id: ::core::option::Option<::prost::alloc::string::String>,
674    /// Module name of the top-level function invoked by a `MoveCall` command that triggered this
675    /// event to be emitted.
676    #[prost(string, optional, tag = "2")]
677    pub module: ::core::option::Option<::prost::alloc::string::String>,
678    /// Address of the account that sent the transaction where this event was emitted.
679    #[prost(string, optional, tag = "3")]
680    pub sender: ::core::option::Option<::prost::alloc::string::String>,
681    /// The type of the event emitted.
682    #[prost(string, optional, tag = "4")]
683    pub event_type: ::core::option::Option<::prost::alloc::string::String>,
684    /// BCS serialized bytes of the event.
685    #[prost(message, optional, tag = "5")]
686    pub contents: ::core::option::Option<Bcs>,
687    /// JSON rendering of the event.
688    #[prost(message, optional, boxed, tag = "6")]
689    pub json: ::core::option::Option<::prost::alloc::boxed::Box<::prost_types::Value>>,
690}
691#[non_exhaustive]
692#[derive(Clone, PartialEq, ::prost::Message)]
693pub struct ExecutedTransaction {
694    /// The digest of this Transaction.
695    #[prost(string, optional, tag = "1")]
696    pub digest: ::core::option::Option<::prost::alloc::string::String>,
697    /// The transaction itself.
698    #[prost(message, optional, tag = "2")]
699    pub transaction: ::core::option::Option<Transaction>,
700    /// List of user signatures that are used to authorize the
701    /// execution of this transaction.
702    #[prost(message, repeated, tag = "3")]
703    pub signatures: ::prost::alloc::vec::Vec<UserSignature>,
704    /// The `TransactionEffects` for this transaction.
705    #[prost(message, optional, tag = "4")]
706    pub effects: ::core::option::Option<TransactionEffects>,
707    /// The `TransactionEvents` for this transaction.
708    ///
709    /// This field might be empty, even if it was explicitly requested, if the
710    /// transaction didn't produce any events.
711    /// `sui.types.TransactionEffects.events_digest` is populated if the
712    /// transaction produced any events.
713    #[prost(message, optional, tag = "5")]
714    pub events: ::core::option::Option<TransactionEvents>,
715    /// The sequence number for the checkpoint that includes this transaction.
716    #[prost(uint64, optional, tag = "6")]
717    pub checkpoint: ::core::option::Option<u64>,
718    /// The Unix timestamp of the checkpoint that includes this transaction.
719    #[prost(message, optional, tag = "7")]
720    pub timestamp: ::core::option::Option<::prost_types::Timestamp>,
721    #[prost(message, repeated, tag = "8")]
722    pub balance_changes: ::prost::alloc::vec::Vec<BalanceChange>,
723    /// Set of input objects used during the execution of this transaction.
724    #[prost(message, repeated, tag = "10")]
725    pub input_objects: ::prost::alloc::vec::Vec<Object>,
726    /// Set of output objects produced from the execution of this transaction.
727    #[prost(message, repeated, tag = "11")]
728    pub output_objects: ::prost::alloc::vec::Vec<Object>,
729}
730/// The status of an executed transaction.
731#[non_exhaustive]
732#[derive(Clone, PartialEq, ::prost::Message)]
733pub struct ExecutionStatus {
734    /// Indicates if the transaction was successful or not.
735    #[prost(bool, optional, tag = "1")]
736    pub success: ::core::option::Option<bool>,
737    /// The error if `success` is false.
738    #[prost(message, optional, tag = "2")]
739    pub error: ::core::option::Option<ExecutionError>,
740}
741/// An error that can occur during the execution of a transaction.
742#[non_exhaustive]
743#[derive(Clone, PartialEq, ::prost::Message)]
744pub struct ExecutionError {
745    /// A human readable description of the error
746    #[prost(string, optional, tag = "1")]
747    pub description: ::core::option::Option<::prost::alloc::string::String>,
748    /// The command, if any, during which the error occurred.
749    #[prost(uint64, optional, tag = "2")]
750    pub command: ::core::option::Option<u64>,
751    #[prost(enumeration = "execution_error::ExecutionErrorKind", optional, tag = "3")]
752    pub kind: ::core::option::Option<i32>,
753    #[prost(
754        oneof = "execution_error::ErrorDetails",
755        tags = "4, 5, 6, 7, 8, 9, 10, 11, 12"
756    )]
757    pub error_details: ::core::option::Option<execution_error::ErrorDetails>,
758}
759/// Nested message and enum types in `ExecutionError`.
760pub mod execution_error {
761    #[non_exhaustive]
762    #[derive(
763        Clone,
764        Copy,
765        Debug,
766        PartialEq,
767        Eq,
768        Hash,
769        PartialOrd,
770        Ord,
771        ::prost::Enumeration
772    )]
773    #[repr(i32)]
774    pub enum ExecutionErrorKind {
775        Unknown = 0,
776        /// Insufficient gas.
777        InsufficientGas = 1,
778        /// Invalid `Gas` object.
779        InvalidGasObject = 2,
780        /// Invariant violation.
781        InvariantViolation = 3,
782        /// Attempted to use feature that is not supported yet.
783        FeatureNotYetSupported = 4,
784        /// Move object is larger than the maximum allowed size.
785        ObjectTooBig = 5,
786        /// Package is larger than the maximum allowed size.
787        PackageTooBig = 6,
788        /// Circular object ownership.
789        CircularObjectOwnership = 7,
790        /// Insufficient coin balance for requested operation.
791        InsufficientCoinBalance = 8,
792        /// Coin balance overflowed an u64.
793        CoinBalanceOverflow = 9,
794        /// Publish error, non-zero address.
795        /// The modules in the package must have their self-addresses set to zero.
796        PublishErrorNonZeroAddress = 10,
797        /// Sui Move bytecode verification error.
798        SuiMoveVerificationError = 11,
799        /// Error from a non-abort instruction.
800        /// Possible causes:
801        ///      Arithmetic error, stack overflow, max value depth, or similar.
802        MovePrimitiveRuntimeError = 12,
803        /// Move runtime abort.
804        MoveAbort = 13,
805        /// Bytecode verification error.
806        VmVerificationOrDeserializationError = 14,
807        /// MoveVm invariant violation.
808        VmInvariantViolation = 15,
809        /// Function not found.
810        FunctionNotFound = 16,
811        /// Parity mismatch for Move function.
812        /// The number of arguments does not match the number of parameters.
813        ArityMismatch = 17,
814        /// Type parity mismatch for Move function.
815        /// Mismatch between the number of actual versus expected type arguments.
816        TypeArityMismatch = 18,
817        /// Non-entry function invoked. Move Call must start with an entry function.
818        NonEntryFunctionInvoked = 19,
819        /// Invalid command argument.
820        CommandArgumentError = 20,
821        /// Type argument error.
822        TypeArgumentError = 21,
823        /// Unused result without the drop ability.
824        UnusedValueWithoutDrop = 22,
825        /// Invalid public Move function signature.
826        /// Unsupported return type for return value.
827        InvalidPublicFunctionReturnType = 23,
828        /// Invalid transfer object, object does not have public transfer.
829        InvalidTransferObject = 24,
830        /// Effects from the transaction are too large.
831        EffectsTooLarge = 25,
832        /// Publish or Upgrade is missing dependency.
833        PublishUpgradeMissingDependency = 26,
834        /// Publish or upgrade dependency downgrade.
835        ///
836        /// Indirect (transitive) dependency of published or upgraded package has been assigned an
837        /// on-chain version that is less than the version required by one of the package's
838        /// transitive dependencies.
839        PublishUpgradeDependencyDowngrade = 27,
840        /// Invalid package upgrade.
841        PackageUpgradeError = 28,
842        /// Indicates the transaction tried to write objects too large to storage.
843        WrittenObjectsTooLarge = 29,
844        /// Certificate is on the deny list.
845        CertificateDenied = 30,
846        /// Sui Move bytecode verification timed out.
847        SuiMoveVerificationTimedout = 31,
848        /// The requested consensus object operation is not allowed.
849        ConsensusObjectOperationNotAllowed = 32,
850        /// Requested consensus object has been deleted.
851        InputObjectDeleted = 33,
852        /// Certificate is canceled due to congestion on consensus objects.
853        ExecutionCanceledDueToConsensusObjectCongestion = 34,
854        /// Address is denied for this coin type.
855        AddressDeniedForCoin = 35,
856        /// Coin type is globally paused for use.
857        CoinTypeGlobalPause = 36,
858        /// Certificate is canceled because randomness could not be generated this epoch.
859        ExecutionCanceledDueToRandomnessUnavailable = 37,
860        MoveVectorElemTooBig = 38,
861        MoveRawValueTooBig = 39,
862        InvalidLinkage = 40,
863    }
864    impl ExecutionErrorKind {
865        /// String value of the enum field names used in the ProtoBuf definition.
866        ///
867        /// The values are not transformed in any way and thus are considered stable
868        /// (if the ProtoBuf definition does not change) and safe for programmatic use.
869        pub fn as_str_name(&self) -> &'static str {
870            match self {
871                Self::Unknown => "EXECUTION_ERROR_KIND_UNKNOWN",
872                Self::InsufficientGas => "INSUFFICIENT_GAS",
873                Self::InvalidGasObject => "INVALID_GAS_OBJECT",
874                Self::InvariantViolation => "INVARIANT_VIOLATION",
875                Self::FeatureNotYetSupported => "FEATURE_NOT_YET_SUPPORTED",
876                Self::ObjectTooBig => "OBJECT_TOO_BIG",
877                Self::PackageTooBig => "PACKAGE_TOO_BIG",
878                Self::CircularObjectOwnership => "CIRCULAR_OBJECT_OWNERSHIP",
879                Self::InsufficientCoinBalance => "INSUFFICIENT_COIN_BALANCE",
880                Self::CoinBalanceOverflow => "COIN_BALANCE_OVERFLOW",
881                Self::PublishErrorNonZeroAddress => "PUBLISH_ERROR_NON_ZERO_ADDRESS",
882                Self::SuiMoveVerificationError => "SUI_MOVE_VERIFICATION_ERROR",
883                Self::MovePrimitiveRuntimeError => "MOVE_PRIMITIVE_RUNTIME_ERROR",
884                Self::MoveAbort => "MOVE_ABORT",
885                Self::VmVerificationOrDeserializationError => {
886                    "VM_VERIFICATION_OR_DESERIALIZATION_ERROR"
887                }
888                Self::VmInvariantViolation => "VM_INVARIANT_VIOLATION",
889                Self::FunctionNotFound => "FUNCTION_NOT_FOUND",
890                Self::ArityMismatch => "ARITY_MISMATCH",
891                Self::TypeArityMismatch => "TYPE_ARITY_MISMATCH",
892                Self::NonEntryFunctionInvoked => "NON_ENTRY_FUNCTION_INVOKED",
893                Self::CommandArgumentError => "COMMAND_ARGUMENT_ERROR",
894                Self::TypeArgumentError => "TYPE_ARGUMENT_ERROR",
895                Self::UnusedValueWithoutDrop => "UNUSED_VALUE_WITHOUT_DROP",
896                Self::InvalidPublicFunctionReturnType => {
897                    "INVALID_PUBLIC_FUNCTION_RETURN_TYPE"
898                }
899                Self::InvalidTransferObject => "INVALID_TRANSFER_OBJECT",
900                Self::EffectsTooLarge => "EFFECTS_TOO_LARGE",
901                Self::PublishUpgradeMissingDependency => {
902                    "PUBLISH_UPGRADE_MISSING_DEPENDENCY"
903                }
904                Self::PublishUpgradeDependencyDowngrade => {
905                    "PUBLISH_UPGRADE_DEPENDENCY_DOWNGRADE"
906                }
907                Self::PackageUpgradeError => "PACKAGE_UPGRADE_ERROR",
908                Self::WrittenObjectsTooLarge => "WRITTEN_OBJECTS_TOO_LARGE",
909                Self::CertificateDenied => "CERTIFICATE_DENIED",
910                Self::SuiMoveVerificationTimedout => "SUI_MOVE_VERIFICATION_TIMEDOUT",
911                Self::ConsensusObjectOperationNotAllowed => {
912                    "CONSENSUS_OBJECT_OPERATION_NOT_ALLOWED"
913                }
914                Self::InputObjectDeleted => "INPUT_OBJECT_DELETED",
915                Self::ExecutionCanceledDueToConsensusObjectCongestion => {
916                    "EXECUTION_CANCELED_DUE_TO_CONSENSUS_OBJECT_CONGESTION"
917                }
918                Self::AddressDeniedForCoin => "ADDRESS_DENIED_FOR_COIN",
919                Self::CoinTypeGlobalPause => "COIN_TYPE_GLOBAL_PAUSE",
920                Self::ExecutionCanceledDueToRandomnessUnavailable => {
921                    "EXECUTION_CANCELED_DUE_TO_RANDOMNESS_UNAVAILABLE"
922                }
923                Self::MoveVectorElemTooBig => "MOVE_VECTOR_ELEM_TOO_BIG",
924                Self::MoveRawValueTooBig => "MOVE_RAW_VALUE_TOO_BIG",
925                Self::InvalidLinkage => "INVALID_LINKAGE",
926            }
927        }
928        /// Creates an enum from field names used in the ProtoBuf definition.
929        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
930            match value {
931                "EXECUTION_ERROR_KIND_UNKNOWN" => Some(Self::Unknown),
932                "INSUFFICIENT_GAS" => Some(Self::InsufficientGas),
933                "INVALID_GAS_OBJECT" => Some(Self::InvalidGasObject),
934                "INVARIANT_VIOLATION" => Some(Self::InvariantViolation),
935                "FEATURE_NOT_YET_SUPPORTED" => Some(Self::FeatureNotYetSupported),
936                "OBJECT_TOO_BIG" => Some(Self::ObjectTooBig),
937                "PACKAGE_TOO_BIG" => Some(Self::PackageTooBig),
938                "CIRCULAR_OBJECT_OWNERSHIP" => Some(Self::CircularObjectOwnership),
939                "INSUFFICIENT_COIN_BALANCE" => Some(Self::InsufficientCoinBalance),
940                "COIN_BALANCE_OVERFLOW" => Some(Self::CoinBalanceOverflow),
941                "PUBLISH_ERROR_NON_ZERO_ADDRESS" => {
942                    Some(Self::PublishErrorNonZeroAddress)
943                }
944                "SUI_MOVE_VERIFICATION_ERROR" => Some(Self::SuiMoveVerificationError),
945                "MOVE_PRIMITIVE_RUNTIME_ERROR" => Some(Self::MovePrimitiveRuntimeError),
946                "MOVE_ABORT" => Some(Self::MoveAbort),
947                "VM_VERIFICATION_OR_DESERIALIZATION_ERROR" => {
948                    Some(Self::VmVerificationOrDeserializationError)
949                }
950                "VM_INVARIANT_VIOLATION" => Some(Self::VmInvariantViolation),
951                "FUNCTION_NOT_FOUND" => Some(Self::FunctionNotFound),
952                "ARITY_MISMATCH" => Some(Self::ArityMismatch),
953                "TYPE_ARITY_MISMATCH" => Some(Self::TypeArityMismatch),
954                "NON_ENTRY_FUNCTION_INVOKED" => Some(Self::NonEntryFunctionInvoked),
955                "COMMAND_ARGUMENT_ERROR" => Some(Self::CommandArgumentError),
956                "TYPE_ARGUMENT_ERROR" => Some(Self::TypeArgumentError),
957                "UNUSED_VALUE_WITHOUT_DROP" => Some(Self::UnusedValueWithoutDrop),
958                "INVALID_PUBLIC_FUNCTION_RETURN_TYPE" => {
959                    Some(Self::InvalidPublicFunctionReturnType)
960                }
961                "INVALID_TRANSFER_OBJECT" => Some(Self::InvalidTransferObject),
962                "EFFECTS_TOO_LARGE" => Some(Self::EffectsTooLarge),
963                "PUBLISH_UPGRADE_MISSING_DEPENDENCY" => {
964                    Some(Self::PublishUpgradeMissingDependency)
965                }
966                "PUBLISH_UPGRADE_DEPENDENCY_DOWNGRADE" => {
967                    Some(Self::PublishUpgradeDependencyDowngrade)
968                }
969                "PACKAGE_UPGRADE_ERROR" => Some(Self::PackageUpgradeError),
970                "WRITTEN_OBJECTS_TOO_LARGE" => Some(Self::WrittenObjectsTooLarge),
971                "CERTIFICATE_DENIED" => Some(Self::CertificateDenied),
972                "SUI_MOVE_VERIFICATION_TIMEDOUT" => {
973                    Some(Self::SuiMoveVerificationTimedout)
974                }
975                "CONSENSUS_OBJECT_OPERATION_NOT_ALLOWED" => {
976                    Some(Self::ConsensusObjectOperationNotAllowed)
977                }
978                "INPUT_OBJECT_DELETED" => Some(Self::InputObjectDeleted),
979                "EXECUTION_CANCELED_DUE_TO_CONSENSUS_OBJECT_CONGESTION" => {
980                    Some(Self::ExecutionCanceledDueToConsensusObjectCongestion)
981                }
982                "ADDRESS_DENIED_FOR_COIN" => Some(Self::AddressDeniedForCoin),
983                "COIN_TYPE_GLOBAL_PAUSE" => Some(Self::CoinTypeGlobalPause),
984                "EXECUTION_CANCELED_DUE_TO_RANDOMNESS_UNAVAILABLE" => {
985                    Some(Self::ExecutionCanceledDueToRandomnessUnavailable)
986                }
987                "MOVE_VECTOR_ELEM_TOO_BIG" => Some(Self::MoveVectorElemTooBig),
988                "MOVE_RAW_VALUE_TOO_BIG" => Some(Self::MoveRawValueTooBig),
989                "INVALID_LINKAGE" => Some(Self::InvalidLinkage),
990                _ => None,
991            }
992        }
993    }
994    #[non_exhaustive]
995    #[derive(Clone, PartialEq, ::prost::Oneof)]
996    pub enum ErrorDetails {
997        #[prost(message, tag = "4")]
998        Abort(super::MoveAbort),
999        #[prost(message, tag = "5")]
1000        SizeError(super::SizeError),
1001        #[prost(message, tag = "6")]
1002        CommandArgumentError(super::CommandArgumentError),
1003        #[prost(message, tag = "7")]
1004        TypeArgumentError(super::TypeArgumentError),
1005        #[prost(message, tag = "8")]
1006        PackageUpgradeError(super::PackageUpgradeError),
1007        #[prost(message, tag = "9")]
1008        IndexError(super::IndexError),
1009        #[prost(string, tag = "10")]
1010        ObjectId(::prost::alloc::string::String),
1011        #[prost(message, tag = "11")]
1012        CoinDenyListError(super::CoinDenyListError),
1013        /// Set of objects that were congested, leading to the transaction's cancellation.
1014        #[prost(message, tag = "12")]
1015        CongestedObjects(super::CongestedObjects),
1016    }
1017}
1018#[non_exhaustive]
1019#[derive(Clone, PartialEq, ::prost::Message)]
1020pub struct MoveAbort {
1021    #[prost(uint64, optional, tag = "1")]
1022    pub abort_code: ::core::option::Option<u64>,
1023    /// Location in Move where the error occurred.
1024    #[prost(message, optional, tag = "2")]
1025    pub location: ::core::option::Option<MoveLocation>,
1026    /// Extra error information if abort code is a "Clever Error"
1027    #[prost(message, optional, tag = "3")]
1028    pub clever_error: ::core::option::Option<CleverError>,
1029}
1030/// Location in Move bytecode where an error occurred.
1031#[non_exhaustive]
1032#[derive(Clone, PartialEq, ::prost::Message)]
1033pub struct MoveLocation {
1034    /// The package ID.
1035    #[prost(string, optional, tag = "1")]
1036    pub package: ::core::option::Option<::prost::alloc::string::String>,
1037    /// The module name.
1038    #[prost(string, optional, tag = "2")]
1039    pub module: ::core::option::Option<::prost::alloc::string::String>,
1040    /// The function index.
1041    #[prost(uint32, optional, tag = "3")]
1042    pub function: ::core::option::Option<u32>,
1043    /// Offset of the instruction where the error occurred.
1044    #[prost(uint32, optional, tag = "4")]
1045    pub instruction: ::core::option::Option<u32>,
1046    /// The name of the function, if available.
1047    #[prost(string, optional, tag = "5")]
1048    pub function_name: ::core::option::Option<::prost::alloc::string::String>,
1049}
1050#[non_exhaustive]
1051#[derive(Clone, PartialEq, ::prost::Message)]
1052pub struct CleverError {
1053    #[prost(uint64, optional, tag = "1")]
1054    pub error_code: ::core::option::Option<u64>,
1055    #[prost(uint64, optional, tag = "2")]
1056    pub line_number: ::core::option::Option<u64>,
1057    #[prost(string, optional, tag = "3")]
1058    pub constant_name: ::core::option::Option<::prost::alloc::string::String>,
1059    #[prost(string, optional, tag = "4")]
1060    pub constant_type: ::core::option::Option<::prost::alloc::string::String>,
1061    #[prost(oneof = "clever_error::Value", tags = "5, 6")]
1062    pub value: ::core::option::Option<clever_error::Value>,
1063}
1064/// Nested message and enum types in `CleverError`.
1065pub mod clever_error {
1066    #[non_exhaustive]
1067    #[derive(Clone, PartialEq, ::prost::Oneof)]
1068    pub enum Value {
1069        #[prost(string, tag = "5")]
1070        Rendered(::prost::alloc::string::String),
1071        #[prost(bytes, tag = "6")]
1072        Raw(::prost::bytes::Bytes),
1073    }
1074}
1075/// A size error.
1076#[non_exhaustive]
1077#[derive(Clone, Copy, PartialEq, ::prost::Message)]
1078pub struct SizeError {
1079    /// The offending size.
1080    #[prost(uint64, optional, tag = "1")]
1081    pub size: ::core::option::Option<u64>,
1082    /// The maximum allowable size.
1083    #[prost(uint64, optional, tag = "2")]
1084    pub max_size: ::core::option::Option<u64>,
1085}
1086#[non_exhaustive]
1087#[derive(Clone, Copy, PartialEq, ::prost::Message)]
1088pub struct IndexError {
1089    /// Index of an input or result.
1090    #[prost(uint32, optional, tag = "1")]
1091    pub index: ::core::option::Option<u32>,
1092    /// Index of a subresult.
1093    #[prost(uint32, optional, tag = "2")]
1094    pub subresult: ::core::option::Option<u32>,
1095}
1096#[non_exhaustive]
1097#[derive(Clone, PartialEq, ::prost::Message)]
1098pub struct CoinDenyListError {
1099    /// Denied address.
1100    #[prost(string, optional, tag = "1")]
1101    pub address: ::core::option::Option<::prost::alloc::string::String>,
1102    /// Coin type.
1103    #[prost(string, optional, tag = "2")]
1104    pub coin_type: ::core::option::Option<::prost::alloc::string::String>,
1105}
1106/// Set of objects that were congested, leading to the transaction's cancellation.
1107#[non_exhaustive]
1108#[derive(Clone, PartialEq, ::prost::Message)]
1109pub struct CongestedObjects {
1110    #[prost(string, repeated, tag = "1")]
1111    pub objects: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
1112}
1113/// An error with an argument to a command.
1114#[non_exhaustive]
1115#[derive(Clone, Copy, PartialEq, ::prost::Message)]
1116pub struct CommandArgumentError {
1117    /// Position of the problematic argument.
1118    #[prost(uint32, optional, tag = "1")]
1119    pub argument: ::core::option::Option<u32>,
1120    #[prost(
1121        enumeration = "command_argument_error::CommandArgumentErrorKind",
1122        optional,
1123        tag = "2"
1124    )]
1125    pub kind: ::core::option::Option<i32>,
1126    #[prost(message, optional, tag = "3")]
1127    pub index_error: ::core::option::Option<IndexError>,
1128}
1129/// Nested message and enum types in `CommandArgumentError`.
1130pub mod command_argument_error {
1131    #[non_exhaustive]
1132    #[derive(
1133        Clone,
1134        Copy,
1135        Debug,
1136        PartialEq,
1137        Eq,
1138        Hash,
1139        PartialOrd,
1140        Ord,
1141        ::prost::Enumeration
1142    )]
1143    #[repr(i32)]
1144    pub enum CommandArgumentErrorKind {
1145        Unknown = 0,
1146        /// The type of the value does not match the expected type.
1147        TypeMismatch = 1,
1148        /// The argument cannot be deserialized into a value of the specified type.
1149        InvalidBcsBytes = 2,
1150        /// The argument cannot be instantiated from raw bytes.
1151        InvalidUsageOfPureArgument = 3,
1152        /// Invalid argument to private entry function.
1153        /// Private entry functions cannot take arguments from other Move functions.
1154        InvalidArgumentToPrivateEntryFunction = 4,
1155        /// Out of bounds access to input or results.
1156        ///
1157        /// `index` field will be set indicating the invalid index value.
1158        IndexOutOfBounds = 5,
1159        /// Out of bounds access to subresult.
1160        ///
1161        /// `index` and `subresult` fields will be set indicating the invalid index value.
1162        SecondaryIndexOutOfBounds = 6,
1163        /// Invalid usage of result.
1164        /// Expected a single result but found either no return value or multiple.
1165        /// `index` field will be set indicating the invalid index value.
1166        InvalidResultArity = 7,
1167        /// Invalid usage of gas coin.
1168        /// The gas coin can only be used by-value with a `TransferObject` command.
1169        InvalidGasCoinUsage = 8,
1170        /// Invalid usage of Move value.
1171        ///     - Mutably borrowed values require unique usage.
1172        ///     - Immutably borrowed values cannot be taken or borrowed mutably.
1173        ///     - Taken values cannot be used again.
1174        InvalidValueUsage = 9,
1175        /// Immutable objects cannot be passed by-value.
1176        InvalidObjectByValue = 10,
1177        /// Immutable objects cannot be passed by mutable reference, `&mut`.
1178        InvalidObjectByMutRef = 11,
1179        /// Consensus object operations such as wrapping, freezing, or converting to owned are not
1180        /// allowed.
1181        ConsensusObjectOperationNotAllowed = 12,
1182        /// Invalid argument arity. Expected a single argument but found a result that expanded to
1183        /// multiple arguments.
1184        InvalidArgumentArity = 13,
1185    }
1186    impl CommandArgumentErrorKind {
1187        /// String value of the enum field names used in the ProtoBuf definition.
1188        ///
1189        /// The values are not transformed in any way and thus are considered stable
1190        /// (if the ProtoBuf definition does not change) and safe for programmatic use.
1191        pub fn as_str_name(&self) -> &'static str {
1192            match self {
1193                Self::Unknown => "COMMAND_ARGUMENT_ERROR_KIND_UNKNOWN",
1194                Self::TypeMismatch => "TYPE_MISMATCH",
1195                Self::InvalidBcsBytes => "INVALID_BCS_BYTES",
1196                Self::InvalidUsageOfPureArgument => "INVALID_USAGE_OF_PURE_ARGUMENT",
1197                Self::InvalidArgumentToPrivateEntryFunction => {
1198                    "INVALID_ARGUMENT_TO_PRIVATE_ENTRY_FUNCTION"
1199                }
1200                Self::IndexOutOfBounds => "INDEX_OUT_OF_BOUNDS",
1201                Self::SecondaryIndexOutOfBounds => "SECONDARY_INDEX_OUT_OF_BOUNDS",
1202                Self::InvalidResultArity => "INVALID_RESULT_ARITY",
1203                Self::InvalidGasCoinUsage => "INVALID_GAS_COIN_USAGE",
1204                Self::InvalidValueUsage => "INVALID_VALUE_USAGE",
1205                Self::InvalidObjectByValue => "INVALID_OBJECT_BY_VALUE",
1206                Self::InvalidObjectByMutRef => "INVALID_OBJECT_BY_MUT_REF",
1207                Self::ConsensusObjectOperationNotAllowed => {
1208                    "CONSENSUS_OBJECT_OPERATION_NOT_ALLOWED"
1209                }
1210                Self::InvalidArgumentArity => "INVALID_ARGUMENT_ARITY",
1211            }
1212        }
1213        /// Creates an enum from field names used in the ProtoBuf definition.
1214        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1215            match value {
1216                "COMMAND_ARGUMENT_ERROR_KIND_UNKNOWN" => Some(Self::Unknown),
1217                "TYPE_MISMATCH" => Some(Self::TypeMismatch),
1218                "INVALID_BCS_BYTES" => Some(Self::InvalidBcsBytes),
1219                "INVALID_USAGE_OF_PURE_ARGUMENT" => {
1220                    Some(Self::InvalidUsageOfPureArgument)
1221                }
1222                "INVALID_ARGUMENT_TO_PRIVATE_ENTRY_FUNCTION" => {
1223                    Some(Self::InvalidArgumentToPrivateEntryFunction)
1224                }
1225                "INDEX_OUT_OF_BOUNDS" => Some(Self::IndexOutOfBounds),
1226                "SECONDARY_INDEX_OUT_OF_BOUNDS" => Some(Self::SecondaryIndexOutOfBounds),
1227                "INVALID_RESULT_ARITY" => Some(Self::InvalidResultArity),
1228                "INVALID_GAS_COIN_USAGE" => Some(Self::InvalidGasCoinUsage),
1229                "INVALID_VALUE_USAGE" => Some(Self::InvalidValueUsage),
1230                "INVALID_OBJECT_BY_VALUE" => Some(Self::InvalidObjectByValue),
1231                "INVALID_OBJECT_BY_MUT_REF" => Some(Self::InvalidObjectByMutRef),
1232                "CONSENSUS_OBJECT_OPERATION_NOT_ALLOWED" => {
1233                    Some(Self::ConsensusObjectOperationNotAllowed)
1234                }
1235                "INVALID_ARGUMENT_ARITY" => Some(Self::InvalidArgumentArity),
1236                _ => None,
1237            }
1238        }
1239    }
1240}
1241/// An error with upgrading a package.
1242#[non_exhaustive]
1243#[derive(Clone, PartialEq, ::prost::Message)]
1244pub struct PackageUpgradeError {
1245    #[prost(
1246        enumeration = "package_upgrade_error::PackageUpgradeErrorKind",
1247        optional,
1248        tag = "1"
1249    )]
1250    pub kind: ::core::option::Option<i32>,
1251    /// The Package Id.
1252    #[prost(string, optional, tag = "2")]
1253    pub package_id: ::core::option::Option<::prost::alloc::string::String>,
1254    /// A digest.
1255    #[prost(string, optional, tag = "3")]
1256    pub digest: ::core::option::Option<::prost::alloc::string::String>,
1257    /// The policy.
1258    #[prost(uint32, optional, tag = "4")]
1259    pub policy: ::core::option::Option<u32>,
1260    /// The ticket Id.
1261    #[prost(string, optional, tag = "5")]
1262    pub ticket_id: ::core::option::Option<::prost::alloc::string::String>,
1263}
1264/// Nested message and enum types in `PackageUpgradeError`.
1265pub mod package_upgrade_error {
1266    #[non_exhaustive]
1267    #[derive(
1268        Clone,
1269        Copy,
1270        Debug,
1271        PartialEq,
1272        Eq,
1273        Hash,
1274        PartialOrd,
1275        Ord,
1276        ::prost::Enumeration
1277    )]
1278    #[repr(i32)]
1279    pub enum PackageUpgradeErrorKind {
1280        Unknown = 0,
1281        /// Unable to fetch package.
1282        UnableToFetchPackage = 1,
1283        /// Object is not a package.
1284        NotAPackage = 2,
1285        /// Package upgrade is incompatible with previous version.
1286        IncompatibleUpgrade = 3,
1287        /// Digest in upgrade ticket and computed digest differ.
1288        DigestDoesNotMatch = 4,
1289        /// Upgrade policy is not valid.
1290        UnknownUpgradePolicy = 5,
1291        /// Package ID does not match `PackageId` in upgrade ticket.
1292        PackageIdDoesNotMatch = 6,
1293    }
1294    impl PackageUpgradeErrorKind {
1295        /// String value of the enum field names used in the ProtoBuf definition.
1296        ///
1297        /// The values are not transformed in any way and thus are considered stable
1298        /// (if the ProtoBuf definition does not change) and safe for programmatic use.
1299        pub fn as_str_name(&self) -> &'static str {
1300            match self {
1301                Self::Unknown => "PACKAGE_UPGRADE_ERROR_KIND_UNKNOWN",
1302                Self::UnableToFetchPackage => "UNABLE_TO_FETCH_PACKAGE",
1303                Self::NotAPackage => "NOT_A_PACKAGE",
1304                Self::IncompatibleUpgrade => "INCOMPATIBLE_UPGRADE",
1305                Self::DigestDoesNotMatch => "DIGEST_DOES_NOT_MATCH",
1306                Self::UnknownUpgradePolicy => "UNKNOWN_UPGRADE_POLICY",
1307                Self::PackageIdDoesNotMatch => "PACKAGE_ID_DOES_NOT_MATCH",
1308            }
1309        }
1310        /// Creates an enum from field names used in the ProtoBuf definition.
1311        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1312            match value {
1313                "PACKAGE_UPGRADE_ERROR_KIND_UNKNOWN" => Some(Self::Unknown),
1314                "UNABLE_TO_FETCH_PACKAGE" => Some(Self::UnableToFetchPackage),
1315                "NOT_A_PACKAGE" => Some(Self::NotAPackage),
1316                "INCOMPATIBLE_UPGRADE" => Some(Self::IncompatibleUpgrade),
1317                "DIGEST_DOES_NOT_MATCH" => Some(Self::DigestDoesNotMatch),
1318                "UNKNOWN_UPGRADE_POLICY" => Some(Self::UnknownUpgradePolicy),
1319                "PACKAGE_ID_DOES_NOT_MATCH" => Some(Self::PackageIdDoesNotMatch),
1320                _ => None,
1321            }
1322        }
1323    }
1324}
1325/// Type argument error.
1326#[non_exhaustive]
1327#[derive(Clone, Copy, PartialEq, ::prost::Message)]
1328pub struct TypeArgumentError {
1329    /// Index of the problematic type argument.
1330    #[prost(uint32, optional, tag = "1")]
1331    pub type_argument: ::core::option::Option<u32>,
1332    #[prost(
1333        enumeration = "type_argument_error::TypeArgumentErrorKind",
1334        optional,
1335        tag = "2"
1336    )]
1337    pub kind: ::core::option::Option<i32>,
1338}
1339/// Nested message and enum types in `TypeArgumentError`.
1340pub mod type_argument_error {
1341    #[non_exhaustive]
1342    #[derive(
1343        Clone,
1344        Copy,
1345        Debug,
1346        PartialEq,
1347        Eq,
1348        Hash,
1349        PartialOrd,
1350        Ord,
1351        ::prost::Enumeration
1352    )]
1353    #[repr(i32)]
1354    pub enum TypeArgumentErrorKind {
1355        Unknown = 0,
1356        /// A type was not found in the module specified.
1357        TypeNotFound = 1,
1358        /// A type provided did not match the specified constraint.
1359        ConstraintNotSatisfied = 2,
1360    }
1361    impl TypeArgumentErrorKind {
1362        /// String value of the enum field names used in the ProtoBuf definition.
1363        ///
1364        /// The values are not transformed in any way and thus are considered stable
1365        /// (if the ProtoBuf definition does not change) and safe for programmatic use.
1366        pub fn as_str_name(&self) -> &'static str {
1367            match self {
1368                Self::Unknown => "TYPE_ARGUMENT_ERROR_KIND_UNKNOWN",
1369                Self::TypeNotFound => "TYPE_NOT_FOUND",
1370                Self::ConstraintNotSatisfied => "CONSTRAINT_NOT_SATISFIED",
1371            }
1372        }
1373        /// Creates an enum from field names used in the ProtoBuf definition.
1374        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1375            match value {
1376                "TYPE_ARGUMENT_ERROR_KIND_UNKNOWN" => Some(Self::Unknown),
1377                "TYPE_NOT_FOUND" => Some(Self::TypeNotFound),
1378                "CONSTRAINT_NOT_SATISFIED" => Some(Self::ConstraintNotSatisfied),
1379                _ => None,
1380            }
1381        }
1382    }
1383}
1384/// Summary of gas charges.
1385#[non_exhaustive]
1386#[derive(Clone, Copy, PartialEq, ::prost::Message)]
1387pub struct GasCostSummary {
1388    /// Cost of computation/execution.
1389    #[prost(uint64, optional, tag = "1")]
1390    pub computation_cost: ::core::option::Option<u64>,
1391    /// Storage cost, it's the sum of all storage cost for all objects created or mutated.
1392    #[prost(uint64, optional, tag = "2")]
1393    pub storage_cost: ::core::option::Option<u64>,
1394    /// The amount of storage cost refunded to the user for all objects deleted or mutated in the
1395    /// transaction.
1396    #[prost(uint64, optional, tag = "3")]
1397    pub storage_rebate: ::core::option::Option<u64>,
1398    /// The fee for the rebate. The portion of the storage rebate kept by the system.
1399    #[prost(uint64, optional, tag = "4")]
1400    pub non_refundable_storage_fee: ::core::option::Option<u64>,
1401}
1402/// An input to a user transaction.
1403#[non_exhaustive]
1404#[derive(Clone, PartialEq, ::prost::Message)]
1405pub struct Input {
1406    #[prost(enumeration = "input::InputKind", optional, tag = "1")]
1407    pub kind: ::core::option::Option<i32>,
1408    /// A move value serialized as BCS.
1409    ///
1410    /// For normal operations this is required to be a move primitive type and not contain structs
1411    /// or objects.
1412    #[prost(bytes = "bytes", optional, tag = "2")]
1413    pub pure: ::core::option::Option<::prost::bytes::Bytes>,
1414    /// `ObjectId` of the object input.
1415    #[prost(string, optional, tag = "3")]
1416    pub object_id: ::core::option::Option<::prost::alloc::string::String>,
1417    /// Requested version of the input object when `kind` is `IMMUTABLE_OR_OWNED`
1418    /// or `RECEIVING` or if `kind` is `SHARED` this is the initial version of the
1419    /// object when it was shared
1420    #[prost(uint64, optional, tag = "4")]
1421    pub version: ::core::option::Option<u64>,
1422    /// The digest of this object.
1423    #[prost(string, optional, tag = "5")]
1424    pub digest: ::core::option::Option<::prost::alloc::string::String>,
1425    /// Controls whether the caller asks for a mutable reference to the shared
1426    /// object.
1427    #[prost(bool, optional, tag = "6")]
1428    pub mutable: ::core::option::Option<bool>,
1429    /// A literal value
1430    ///
1431    /// INPUT ONLY
1432    #[prost(message, optional, boxed, tag = "1000")]
1433    pub literal: ::core::option::Option<
1434        ::prost::alloc::boxed::Box<::prost_types::Value>,
1435    >,
1436}
1437/// Nested message and enum types in `Input`.
1438pub mod input {
1439    #[non_exhaustive]
1440    #[derive(
1441        Clone,
1442        Copy,
1443        Debug,
1444        PartialEq,
1445        Eq,
1446        Hash,
1447        PartialOrd,
1448        Ord,
1449        ::prost::Enumeration
1450    )]
1451    #[repr(i32)]
1452    pub enum InputKind {
1453        Unknown = 0,
1454        /// A move value serialized as BCS.
1455        Pure = 1,
1456        /// A Move object that is either immutable or address owned.
1457        ImmutableOrOwned = 2,
1458        /// A Move object whose owner is "Shared".
1459        Shared = 3,
1460        /// A Move object that is attempted to be received in this transaction.
1461        Receiving = 4,
1462    }
1463    impl InputKind {
1464        /// String value of the enum field names used in the ProtoBuf definition.
1465        ///
1466        /// The values are not transformed in any way and thus are considered stable
1467        /// (if the ProtoBuf definition does not change) and safe for programmatic use.
1468        pub fn as_str_name(&self) -> &'static str {
1469            match self {
1470                Self::Unknown => "INPUT_KIND_UNKNOWN",
1471                Self::Pure => "PURE",
1472                Self::ImmutableOrOwned => "IMMUTABLE_OR_OWNED",
1473                Self::Shared => "SHARED",
1474                Self::Receiving => "RECEIVING",
1475            }
1476        }
1477        /// Creates an enum from field names used in the ProtoBuf definition.
1478        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1479            match value {
1480                "INPUT_KIND_UNKNOWN" => Some(Self::Unknown),
1481                "PURE" => Some(Self::Pure),
1482                "IMMUTABLE_OR_OWNED" => Some(Self::ImmutableOrOwned),
1483                "SHARED" => Some(Self::Shared),
1484                "RECEIVING" => Some(Self::Receiving),
1485                _ => None,
1486            }
1487        }
1488    }
1489}
1490#[non_exhaustive]
1491#[derive(Clone, Copy, PartialEq, ::prost::Message)]
1492pub struct GetServiceInfoRequest {}
1493#[non_exhaustive]
1494#[derive(Clone, PartialEq, ::prost::Message)]
1495pub struct GetServiceInfoResponse {
1496    /// The chain identifier of the chain that this node is on.
1497    ///
1498    /// The chain identifier is the digest of the genesis checkpoint, the
1499    /// checkpoint with sequence number 0.
1500    #[prost(string, optional, tag = "1")]
1501    pub chain_id: ::core::option::Option<::prost::alloc::string::String>,
1502    /// Human-readable name of the chain that this node is on.
1503    ///
1504    /// This is intended to be a human-readable name like `mainnet`, `testnet`, and so on.
1505    #[prost(string, optional, tag = "2")]
1506    pub chain: ::core::option::Option<::prost::alloc::string::String>,
1507    /// Current epoch of the node based on its highest executed checkpoint.
1508    #[prost(uint64, optional, tag = "3")]
1509    pub epoch: ::core::option::Option<u64>,
1510    /// Checkpoint height of the most recently executed checkpoint.
1511    #[prost(uint64, optional, tag = "4")]
1512    pub checkpoint_height: ::core::option::Option<u64>,
1513    /// Unix timestamp of the most recently executed checkpoint.
1514    #[prost(message, optional, tag = "5")]
1515    pub timestamp: ::core::option::Option<::prost_types::Timestamp>,
1516    /// The lowest checkpoint for which checkpoints and transaction data are available.
1517    #[prost(uint64, optional, tag = "6")]
1518    pub lowest_available_checkpoint: ::core::option::Option<u64>,
1519    /// The lowest checkpoint for which object data is available.
1520    #[prost(uint64, optional, tag = "7")]
1521    pub lowest_available_checkpoint_objects: ::core::option::Option<u64>,
1522    /// Software version of the service. Similar to the `server` http header.
1523    #[prost(string, optional, tag = "8")]
1524    pub server: ::core::option::Option<::prost::alloc::string::String>,
1525}
1526#[non_exhaustive]
1527#[derive(Clone, PartialEq, ::prost::Message)]
1528pub struct GetObjectRequest {
1529    /// Required. The `ObjectId` of the requested object.
1530    #[prost(string, optional, tag = "1")]
1531    pub object_id: ::core::option::Option<::prost::alloc::string::String>,
1532    /// Request a specific version of the object.
1533    /// If no version is specified, and the object is live, then the latest
1534    /// version of the object is returned.
1535    #[prost(uint64, optional, tag = "2")]
1536    pub version: ::core::option::Option<u64>,
1537    /// Mask specifying which fields to read.
1538    /// If no mask is specified, defaults to `object_id,version,digest`.
1539    #[prost(message, optional, tag = "3")]
1540    pub read_mask: ::core::option::Option<::prost_types::FieldMask>,
1541}
1542#[non_exhaustive]
1543#[derive(Clone, PartialEq, ::prost::Message)]
1544pub struct GetObjectResponse {
1545    #[prost(message, optional, tag = "1")]
1546    pub object: ::core::option::Option<Object>,
1547}
1548#[non_exhaustive]
1549#[derive(Clone, PartialEq, ::prost::Message)]
1550pub struct BatchGetObjectsRequest {
1551    #[prost(message, repeated, tag = "1")]
1552    pub requests: ::prost::alloc::vec::Vec<GetObjectRequest>,
1553    /// Mask specifying which fields to read.
1554    /// If no mask is specified, defaults to `object_id,version,digest`.
1555    #[prost(message, optional, tag = "2")]
1556    pub read_mask: ::core::option::Option<::prost_types::FieldMask>,
1557}
1558#[non_exhaustive]
1559#[derive(Clone, PartialEq, ::prost::Message)]
1560pub struct BatchGetObjectsResponse {
1561    #[prost(message, repeated, tag = "1")]
1562    pub objects: ::prost::alloc::vec::Vec<GetObjectResult>,
1563}
1564#[non_exhaustive]
1565#[derive(Clone, PartialEq, ::prost::Message)]
1566pub struct GetObjectResult {
1567    #[prost(oneof = "get_object_result::Result", tags = "1, 2")]
1568    pub result: ::core::option::Option<get_object_result::Result>,
1569}
1570/// Nested message and enum types in `GetObjectResult`.
1571pub mod get_object_result {
1572    #[non_exhaustive]
1573    #[derive(Clone, PartialEq, ::prost::Oneof)]
1574    pub enum Result {
1575        #[prost(message, tag = "1")]
1576        Object(super::Object),
1577        #[prost(message, tag = "2")]
1578        Error(super::super::super::super::google::rpc::Status),
1579    }
1580}
1581#[non_exhaustive]
1582#[derive(Clone, PartialEq, ::prost::Message)]
1583pub struct GetTransactionRequest {
1584    /// Required. The digest of the requested transaction.
1585    #[prost(string, optional, tag = "1")]
1586    pub digest: ::core::option::Option<::prost::alloc::string::String>,
1587    /// Mask specifying which fields to read.
1588    /// If no mask is specified, defaults to `digest`.
1589    #[prost(message, optional, tag = "2")]
1590    pub read_mask: ::core::option::Option<::prost_types::FieldMask>,
1591}
1592#[non_exhaustive]
1593#[derive(Clone, PartialEq, ::prost::Message)]
1594pub struct GetTransactionResponse {
1595    #[prost(message, optional, tag = "1")]
1596    pub transaction: ::core::option::Option<ExecutedTransaction>,
1597}
1598#[non_exhaustive]
1599#[derive(Clone, PartialEq, ::prost::Message)]
1600pub struct BatchGetTransactionsRequest {
1601    /// Required. The digests of the requested transactions.
1602    #[prost(string, repeated, tag = "1")]
1603    pub digests: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
1604    /// Mask specifying which fields to read.
1605    /// If no mask is specified, defaults to `digest`.
1606    #[prost(message, optional, tag = "2")]
1607    pub read_mask: ::core::option::Option<::prost_types::FieldMask>,
1608}
1609#[non_exhaustive]
1610#[derive(Clone, PartialEq, ::prost::Message)]
1611pub struct BatchGetTransactionsResponse {
1612    #[prost(message, repeated, tag = "1")]
1613    pub transactions: ::prost::alloc::vec::Vec<GetTransactionResult>,
1614}
1615#[non_exhaustive]
1616#[derive(Clone, PartialEq, ::prost::Message)]
1617pub struct GetTransactionResult {
1618    #[prost(oneof = "get_transaction_result::Result", tags = "1, 2")]
1619    pub result: ::core::option::Option<get_transaction_result::Result>,
1620}
1621/// Nested message and enum types in `GetTransactionResult`.
1622pub mod get_transaction_result {
1623    #[non_exhaustive]
1624    #[derive(Clone, PartialEq, ::prost::Oneof)]
1625    pub enum Result {
1626        #[prost(message, tag = "1")]
1627        Transaction(super::ExecutedTransaction),
1628        #[prost(message, tag = "2")]
1629        Error(super::super::super::super::google::rpc::Status),
1630    }
1631}
1632#[non_exhaustive]
1633#[derive(Clone, PartialEq, ::prost::Message)]
1634pub struct GetCheckpointRequest {
1635    /// Mask specifying which fields to read.
1636    /// If no mask is specified, defaults to `sequence_number,digest`.
1637    #[prost(message, optional, tag = "3")]
1638    pub read_mask: ::core::option::Option<::prost_types::FieldMask>,
1639    /// If neither is provided, return the latest
1640    #[prost(oneof = "get_checkpoint_request::CheckpointId", tags = "1, 2")]
1641    pub checkpoint_id: ::core::option::Option<get_checkpoint_request::CheckpointId>,
1642}
1643/// Nested message and enum types in `GetCheckpointRequest`.
1644pub mod get_checkpoint_request {
1645    /// If neither is provided, return the latest
1646    #[non_exhaustive]
1647    #[derive(Clone, PartialEq, ::prost::Oneof)]
1648    pub enum CheckpointId {
1649        /// The sequence number of the requested checkpoint.
1650        #[prost(uint64, tag = "1")]
1651        SequenceNumber(u64),
1652        /// The digest of the requested checkpoint.
1653        #[prost(string, tag = "2")]
1654        Digest(::prost::alloc::string::String),
1655    }
1656}
1657#[non_exhaustive]
1658#[derive(Clone, PartialEq, ::prost::Message)]
1659pub struct GetCheckpointResponse {
1660    #[prost(message, optional, tag = "1")]
1661    pub checkpoint: ::core::option::Option<Checkpoint>,
1662}
1663#[non_exhaustive]
1664#[derive(Clone, PartialEq, ::prost::Message)]
1665pub struct GetEpochRequest {
1666    /// The requested epoch.
1667    /// If no epoch is provided the current epoch will be returned.
1668    #[prost(uint64, optional, tag = "1")]
1669    pub epoch: ::core::option::Option<u64>,
1670    /// Mask specifying which fields to read.
1671    /// If no mask is specified, defaults to `epoch`.
1672    #[prost(message, optional, tag = "2")]
1673    pub read_mask: ::core::option::Option<::prost_types::FieldMask>,
1674}
1675#[non_exhaustive]
1676#[derive(Clone, PartialEq, ::prost::Message)]
1677pub struct GetEpochResponse {
1678    #[prost(message, optional, tag = "1")]
1679    pub epoch: ::core::option::Option<Epoch>,
1680}
1681/// Generated client implementations.
1682pub mod ledger_service_client {
1683    #![allow(
1684        unused_variables,
1685        dead_code,
1686        missing_docs,
1687        clippy::wildcard_imports,
1688        clippy::let_unit_value,
1689    )]
1690    use tonic::codegen::*;
1691    use tonic::codegen::http::Uri;
1692    #[derive(Debug, Clone)]
1693    pub struct LedgerServiceClient<T> {
1694        inner: tonic::client::Grpc<T>,
1695    }
1696    impl LedgerServiceClient<tonic::transport::Channel> {
1697        /// Attempt to create a new client by connecting to a given endpoint.
1698        pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
1699        where
1700            D: TryInto<tonic::transport::Endpoint>,
1701            D::Error: Into<StdError>,
1702        {
1703            let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
1704            Ok(Self::new(conn))
1705        }
1706    }
1707    impl<T> LedgerServiceClient<T>
1708    where
1709        T: tonic::client::GrpcService<tonic::body::Body>,
1710        T::Error: Into<StdError>,
1711        T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static,
1712        <T::ResponseBody as Body>::Error: Into<StdError> + std::marker::Send,
1713    {
1714        pub fn new(inner: T) -> Self {
1715            let inner = tonic::client::Grpc::new(inner);
1716            Self { inner }
1717        }
1718        pub fn with_origin(inner: T, origin: Uri) -> Self {
1719            let inner = tonic::client::Grpc::with_origin(inner, origin);
1720            Self { inner }
1721        }
1722        pub fn with_interceptor<F>(
1723            inner: T,
1724            interceptor: F,
1725        ) -> LedgerServiceClient<InterceptedService<T, F>>
1726        where
1727            F: tonic::service::Interceptor,
1728            T::ResponseBody: Default,
1729            T: tonic::codegen::Service<
1730                http::Request<tonic::body::Body>,
1731                Response = http::Response<
1732                    <T as tonic::client::GrpcService<tonic::body::Body>>::ResponseBody,
1733                >,
1734            >,
1735            <T as tonic::codegen::Service<
1736                http::Request<tonic::body::Body>,
1737            >>::Error: Into<StdError> + std::marker::Send + std::marker::Sync,
1738        {
1739            LedgerServiceClient::new(InterceptedService::new(inner, interceptor))
1740        }
1741        /// Compress requests with the given encoding.
1742        ///
1743        /// This requires the server to support it otherwise it might respond with an
1744        /// error.
1745        #[must_use]
1746        pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
1747            self.inner = self.inner.send_compressed(encoding);
1748            self
1749        }
1750        /// Enable decompressing responses.
1751        #[must_use]
1752        pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
1753            self.inner = self.inner.accept_compressed(encoding);
1754            self
1755        }
1756        /// Limits the maximum size of a decoded message.
1757        ///
1758        /// Default: `4MB`
1759        #[must_use]
1760        pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
1761            self.inner = self.inner.max_decoding_message_size(limit);
1762            self
1763        }
1764        /// Limits the maximum size of an encoded message.
1765        ///
1766        /// Default: `usize::MAX`
1767        #[must_use]
1768        pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
1769            self.inner = self.inner.max_encoding_message_size(limit);
1770            self
1771        }
1772        /// Query the service for general information about its current state.
1773        pub async fn get_service_info(
1774            &mut self,
1775            request: impl tonic::IntoRequest<super::GetServiceInfoRequest>,
1776        ) -> std::result::Result<
1777            tonic::Response<super::GetServiceInfoResponse>,
1778            tonic::Status,
1779        > {
1780            self.inner
1781                .ready()
1782                .await
1783                .map_err(|e| {
1784                    tonic::Status::unknown(
1785                        format!("Service was not ready: {}", e.into()),
1786                    )
1787                })?;
1788            let codec = tonic::codec::ProstCodec::default();
1789            let path = http::uri::PathAndQuery::from_static(
1790                "/sui.rpc.v2beta2.LedgerService/GetServiceInfo",
1791            );
1792            let mut req = request.into_request();
1793            req.extensions_mut()
1794                .insert(
1795                    GrpcMethod::new("sui.rpc.v2beta2.LedgerService", "GetServiceInfo"),
1796                );
1797            self.inner.unary(req, path, codec).await
1798        }
1799        pub async fn get_object(
1800            &mut self,
1801            request: impl tonic::IntoRequest<super::GetObjectRequest>,
1802        ) -> std::result::Result<
1803            tonic::Response<super::GetObjectResponse>,
1804            tonic::Status,
1805        > {
1806            self.inner
1807                .ready()
1808                .await
1809                .map_err(|e| {
1810                    tonic::Status::unknown(
1811                        format!("Service was not ready: {}", e.into()),
1812                    )
1813                })?;
1814            let codec = tonic::codec::ProstCodec::default();
1815            let path = http::uri::PathAndQuery::from_static(
1816                "/sui.rpc.v2beta2.LedgerService/GetObject",
1817            );
1818            let mut req = request.into_request();
1819            req.extensions_mut()
1820                .insert(GrpcMethod::new("sui.rpc.v2beta2.LedgerService", "GetObject"));
1821            self.inner.unary(req, path, codec).await
1822        }
1823        pub async fn batch_get_objects(
1824            &mut self,
1825            request: impl tonic::IntoRequest<super::BatchGetObjectsRequest>,
1826        ) -> std::result::Result<
1827            tonic::Response<super::BatchGetObjectsResponse>,
1828            tonic::Status,
1829        > {
1830            self.inner
1831                .ready()
1832                .await
1833                .map_err(|e| {
1834                    tonic::Status::unknown(
1835                        format!("Service was not ready: {}", e.into()),
1836                    )
1837                })?;
1838            let codec = tonic::codec::ProstCodec::default();
1839            let path = http::uri::PathAndQuery::from_static(
1840                "/sui.rpc.v2beta2.LedgerService/BatchGetObjects",
1841            );
1842            let mut req = request.into_request();
1843            req.extensions_mut()
1844                .insert(
1845                    GrpcMethod::new("sui.rpc.v2beta2.LedgerService", "BatchGetObjects"),
1846                );
1847            self.inner.unary(req, path, codec).await
1848        }
1849        pub async fn get_transaction(
1850            &mut self,
1851            request: impl tonic::IntoRequest<super::GetTransactionRequest>,
1852        ) -> std::result::Result<
1853            tonic::Response<super::GetTransactionResponse>,
1854            tonic::Status,
1855        > {
1856            self.inner
1857                .ready()
1858                .await
1859                .map_err(|e| {
1860                    tonic::Status::unknown(
1861                        format!("Service was not ready: {}", e.into()),
1862                    )
1863                })?;
1864            let codec = tonic::codec::ProstCodec::default();
1865            let path = http::uri::PathAndQuery::from_static(
1866                "/sui.rpc.v2beta2.LedgerService/GetTransaction",
1867            );
1868            let mut req = request.into_request();
1869            req.extensions_mut()
1870                .insert(
1871                    GrpcMethod::new("sui.rpc.v2beta2.LedgerService", "GetTransaction"),
1872                );
1873            self.inner.unary(req, path, codec).await
1874        }
1875        pub async fn batch_get_transactions(
1876            &mut self,
1877            request: impl tonic::IntoRequest<super::BatchGetTransactionsRequest>,
1878        ) -> std::result::Result<
1879            tonic::Response<super::BatchGetTransactionsResponse>,
1880            tonic::Status,
1881        > {
1882            self.inner
1883                .ready()
1884                .await
1885                .map_err(|e| {
1886                    tonic::Status::unknown(
1887                        format!("Service was not ready: {}", e.into()),
1888                    )
1889                })?;
1890            let codec = tonic::codec::ProstCodec::default();
1891            let path = http::uri::PathAndQuery::from_static(
1892                "/sui.rpc.v2beta2.LedgerService/BatchGetTransactions",
1893            );
1894            let mut req = request.into_request();
1895            req.extensions_mut()
1896                .insert(
1897                    GrpcMethod::new(
1898                        "sui.rpc.v2beta2.LedgerService",
1899                        "BatchGetTransactions",
1900                    ),
1901                );
1902            self.inner.unary(req, path, codec).await
1903        }
1904        pub async fn get_checkpoint(
1905            &mut self,
1906            request: impl tonic::IntoRequest<super::GetCheckpointRequest>,
1907        ) -> std::result::Result<
1908            tonic::Response<super::GetCheckpointResponse>,
1909            tonic::Status,
1910        > {
1911            self.inner
1912                .ready()
1913                .await
1914                .map_err(|e| {
1915                    tonic::Status::unknown(
1916                        format!("Service was not ready: {}", e.into()),
1917                    )
1918                })?;
1919            let codec = tonic::codec::ProstCodec::default();
1920            let path = http::uri::PathAndQuery::from_static(
1921                "/sui.rpc.v2beta2.LedgerService/GetCheckpoint",
1922            );
1923            let mut req = request.into_request();
1924            req.extensions_mut()
1925                .insert(
1926                    GrpcMethod::new("sui.rpc.v2beta2.LedgerService", "GetCheckpoint"),
1927                );
1928            self.inner.unary(req, path, codec).await
1929        }
1930        pub async fn get_epoch(
1931            &mut self,
1932            request: impl tonic::IntoRequest<super::GetEpochRequest>,
1933        ) -> std::result::Result<
1934            tonic::Response<super::GetEpochResponse>,
1935            tonic::Status,
1936        > {
1937            self.inner
1938                .ready()
1939                .await
1940                .map_err(|e| {
1941                    tonic::Status::unknown(
1942                        format!("Service was not ready: {}", e.into()),
1943                    )
1944                })?;
1945            let codec = tonic::codec::ProstCodec::default();
1946            let path = http::uri::PathAndQuery::from_static(
1947                "/sui.rpc.v2beta2.LedgerService/GetEpoch",
1948            );
1949            let mut req = request.into_request();
1950            req.extensions_mut()
1951                .insert(GrpcMethod::new("sui.rpc.v2beta2.LedgerService", "GetEpoch"));
1952            self.inner.unary(req, path, codec).await
1953        }
1954    }
1955}
1956/// Generated server implementations.
1957pub mod ledger_service_server {
1958    #![allow(
1959        unused_variables,
1960        dead_code,
1961        missing_docs,
1962        clippy::wildcard_imports,
1963        clippy::let_unit_value,
1964    )]
1965    use tonic::codegen::*;
1966    /// Generated trait containing gRPC methods that should be implemented for use with LedgerServiceServer.
1967    #[async_trait]
1968    pub trait LedgerService: std::marker::Send + std::marker::Sync + 'static {
1969        /// Query the service for general information about its current state.
1970        async fn get_service_info(
1971            &self,
1972            request: tonic::Request<super::GetServiceInfoRequest>,
1973        ) -> std::result::Result<
1974            tonic::Response<super::GetServiceInfoResponse>,
1975            tonic::Status,
1976        >;
1977        async fn get_object(
1978            &self,
1979            request: tonic::Request<super::GetObjectRequest>,
1980        ) -> std::result::Result<
1981            tonic::Response<super::GetObjectResponse>,
1982            tonic::Status,
1983        >;
1984        async fn batch_get_objects(
1985            &self,
1986            request: tonic::Request<super::BatchGetObjectsRequest>,
1987        ) -> std::result::Result<
1988            tonic::Response<super::BatchGetObjectsResponse>,
1989            tonic::Status,
1990        >;
1991        async fn get_transaction(
1992            &self,
1993            request: tonic::Request<super::GetTransactionRequest>,
1994        ) -> std::result::Result<
1995            tonic::Response<super::GetTransactionResponse>,
1996            tonic::Status,
1997        >;
1998        async fn batch_get_transactions(
1999            &self,
2000            request: tonic::Request<super::BatchGetTransactionsRequest>,
2001        ) -> std::result::Result<
2002            tonic::Response<super::BatchGetTransactionsResponse>,
2003            tonic::Status,
2004        >;
2005        async fn get_checkpoint(
2006            &self,
2007            request: tonic::Request<super::GetCheckpointRequest>,
2008        ) -> std::result::Result<
2009            tonic::Response<super::GetCheckpointResponse>,
2010            tonic::Status,
2011        >;
2012        async fn get_epoch(
2013            &self,
2014            request: tonic::Request<super::GetEpochRequest>,
2015        ) -> std::result::Result<
2016            tonic::Response<super::GetEpochResponse>,
2017            tonic::Status,
2018        >;
2019    }
2020    #[derive(Debug)]
2021    pub struct LedgerServiceServer<T> {
2022        inner: Arc<T>,
2023        accept_compression_encodings: EnabledCompressionEncodings,
2024        send_compression_encodings: EnabledCompressionEncodings,
2025        max_decoding_message_size: Option<usize>,
2026        max_encoding_message_size: Option<usize>,
2027    }
2028    impl<T> LedgerServiceServer<T> {
2029        pub fn new(inner: T) -> Self {
2030            Self::from_arc(Arc::new(inner))
2031        }
2032        pub fn from_arc(inner: Arc<T>) -> Self {
2033            Self {
2034                inner,
2035                accept_compression_encodings: Default::default(),
2036                send_compression_encodings: Default::default(),
2037                max_decoding_message_size: None,
2038                max_encoding_message_size: None,
2039            }
2040        }
2041        pub fn with_interceptor<F>(
2042            inner: T,
2043            interceptor: F,
2044        ) -> InterceptedService<Self, F>
2045        where
2046            F: tonic::service::Interceptor,
2047        {
2048            InterceptedService::new(Self::new(inner), interceptor)
2049        }
2050        /// Enable decompressing requests with the given encoding.
2051        #[must_use]
2052        pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
2053            self.accept_compression_encodings.enable(encoding);
2054            self
2055        }
2056        /// Compress responses with the given encoding, if the client supports it.
2057        #[must_use]
2058        pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
2059            self.send_compression_encodings.enable(encoding);
2060            self
2061        }
2062        /// Limits the maximum size of a decoded message.
2063        ///
2064        /// Default: `4MB`
2065        #[must_use]
2066        pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
2067            self.max_decoding_message_size = Some(limit);
2068            self
2069        }
2070        /// Limits the maximum size of an encoded message.
2071        ///
2072        /// Default: `usize::MAX`
2073        #[must_use]
2074        pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
2075            self.max_encoding_message_size = Some(limit);
2076            self
2077        }
2078    }
2079    impl<T, B> tonic::codegen::Service<http::Request<B>> for LedgerServiceServer<T>
2080    where
2081        T: LedgerService,
2082        B: Body + std::marker::Send + 'static,
2083        B::Error: Into<StdError> + std::marker::Send + 'static,
2084    {
2085        type Response = http::Response<tonic::body::Body>;
2086        type Error = std::convert::Infallible;
2087        type Future = BoxFuture<Self::Response, Self::Error>;
2088        fn poll_ready(
2089            &mut self,
2090            _cx: &mut Context<'_>,
2091        ) -> Poll<std::result::Result<(), Self::Error>> {
2092            Poll::Ready(Ok(()))
2093        }
2094        fn call(&mut self, req: http::Request<B>) -> Self::Future {
2095            match req.uri().path() {
2096                "/sui.rpc.v2beta2.LedgerService/GetServiceInfo" => {
2097                    #[allow(non_camel_case_types)]
2098                    struct GetServiceInfoSvc<T: LedgerService>(pub Arc<T>);
2099                    impl<
2100                        T: LedgerService,
2101                    > tonic::server::UnaryService<super::GetServiceInfoRequest>
2102                    for GetServiceInfoSvc<T> {
2103                        type Response = super::GetServiceInfoResponse;
2104                        type Future = BoxFuture<
2105                            tonic::Response<Self::Response>,
2106                            tonic::Status,
2107                        >;
2108                        fn call(
2109                            &mut self,
2110                            request: tonic::Request<super::GetServiceInfoRequest>,
2111                        ) -> Self::Future {
2112                            let inner = Arc::clone(&self.0);
2113                            let fut = async move {
2114                                <T as LedgerService>::get_service_info(&inner, request)
2115                                    .await
2116                            };
2117                            Box::pin(fut)
2118                        }
2119                    }
2120                    let accept_compression_encodings = self.accept_compression_encodings;
2121                    let send_compression_encodings = self.send_compression_encodings;
2122                    let max_decoding_message_size = self.max_decoding_message_size;
2123                    let max_encoding_message_size = self.max_encoding_message_size;
2124                    let inner = self.inner.clone();
2125                    let fut = async move {
2126                        let method = GetServiceInfoSvc(inner);
2127                        let codec = tonic::codec::ProstCodec::default();
2128                        let mut grpc = tonic::server::Grpc::new(codec)
2129                            .apply_compression_config(
2130                                accept_compression_encodings,
2131                                send_compression_encodings,
2132                            )
2133                            .apply_max_message_size_config(
2134                                max_decoding_message_size,
2135                                max_encoding_message_size,
2136                            );
2137                        let res = grpc.unary(method, req).await;
2138                        Ok(res)
2139                    };
2140                    Box::pin(fut)
2141                }
2142                "/sui.rpc.v2beta2.LedgerService/GetObject" => {
2143                    #[allow(non_camel_case_types)]
2144                    struct GetObjectSvc<T: LedgerService>(pub Arc<T>);
2145                    impl<
2146                        T: LedgerService,
2147                    > tonic::server::UnaryService<super::GetObjectRequest>
2148                    for GetObjectSvc<T> {
2149                        type Response = super::GetObjectResponse;
2150                        type Future = BoxFuture<
2151                            tonic::Response<Self::Response>,
2152                            tonic::Status,
2153                        >;
2154                        fn call(
2155                            &mut self,
2156                            request: tonic::Request<super::GetObjectRequest>,
2157                        ) -> Self::Future {
2158                            let inner = Arc::clone(&self.0);
2159                            let fut = async move {
2160                                <T as LedgerService>::get_object(&inner, request).await
2161                            };
2162                            Box::pin(fut)
2163                        }
2164                    }
2165                    let accept_compression_encodings = self.accept_compression_encodings;
2166                    let send_compression_encodings = self.send_compression_encodings;
2167                    let max_decoding_message_size = self.max_decoding_message_size;
2168                    let max_encoding_message_size = self.max_encoding_message_size;
2169                    let inner = self.inner.clone();
2170                    let fut = async move {
2171                        let method = GetObjectSvc(inner);
2172                        let codec = tonic::codec::ProstCodec::default();
2173                        let mut grpc = tonic::server::Grpc::new(codec)
2174                            .apply_compression_config(
2175                                accept_compression_encodings,
2176                                send_compression_encodings,
2177                            )
2178                            .apply_max_message_size_config(
2179                                max_decoding_message_size,
2180                                max_encoding_message_size,
2181                            );
2182                        let res = grpc.unary(method, req).await;
2183                        Ok(res)
2184                    };
2185                    Box::pin(fut)
2186                }
2187                "/sui.rpc.v2beta2.LedgerService/BatchGetObjects" => {
2188                    #[allow(non_camel_case_types)]
2189                    struct BatchGetObjectsSvc<T: LedgerService>(pub Arc<T>);
2190                    impl<
2191                        T: LedgerService,
2192                    > tonic::server::UnaryService<super::BatchGetObjectsRequest>
2193                    for BatchGetObjectsSvc<T> {
2194                        type Response = super::BatchGetObjectsResponse;
2195                        type Future = BoxFuture<
2196                            tonic::Response<Self::Response>,
2197                            tonic::Status,
2198                        >;
2199                        fn call(
2200                            &mut self,
2201                            request: tonic::Request<super::BatchGetObjectsRequest>,
2202                        ) -> Self::Future {
2203                            let inner = Arc::clone(&self.0);
2204                            let fut = async move {
2205                                <T as LedgerService>::batch_get_objects(&inner, request)
2206                                    .await
2207                            };
2208                            Box::pin(fut)
2209                        }
2210                    }
2211                    let accept_compression_encodings = self.accept_compression_encodings;
2212                    let send_compression_encodings = self.send_compression_encodings;
2213                    let max_decoding_message_size = self.max_decoding_message_size;
2214                    let max_encoding_message_size = self.max_encoding_message_size;
2215                    let inner = self.inner.clone();
2216                    let fut = async move {
2217                        let method = BatchGetObjectsSvc(inner);
2218                        let codec = tonic::codec::ProstCodec::default();
2219                        let mut grpc = tonic::server::Grpc::new(codec)
2220                            .apply_compression_config(
2221                                accept_compression_encodings,
2222                                send_compression_encodings,
2223                            )
2224                            .apply_max_message_size_config(
2225                                max_decoding_message_size,
2226                                max_encoding_message_size,
2227                            );
2228                        let res = grpc.unary(method, req).await;
2229                        Ok(res)
2230                    };
2231                    Box::pin(fut)
2232                }
2233                "/sui.rpc.v2beta2.LedgerService/GetTransaction" => {
2234                    #[allow(non_camel_case_types)]
2235                    struct GetTransactionSvc<T: LedgerService>(pub Arc<T>);
2236                    impl<
2237                        T: LedgerService,
2238                    > tonic::server::UnaryService<super::GetTransactionRequest>
2239                    for GetTransactionSvc<T> {
2240                        type Response = super::GetTransactionResponse;
2241                        type Future = BoxFuture<
2242                            tonic::Response<Self::Response>,
2243                            tonic::Status,
2244                        >;
2245                        fn call(
2246                            &mut self,
2247                            request: tonic::Request<super::GetTransactionRequest>,
2248                        ) -> Self::Future {
2249                            let inner = Arc::clone(&self.0);
2250                            let fut = async move {
2251                                <T as LedgerService>::get_transaction(&inner, request).await
2252                            };
2253                            Box::pin(fut)
2254                        }
2255                    }
2256                    let accept_compression_encodings = self.accept_compression_encodings;
2257                    let send_compression_encodings = self.send_compression_encodings;
2258                    let max_decoding_message_size = self.max_decoding_message_size;
2259                    let max_encoding_message_size = self.max_encoding_message_size;
2260                    let inner = self.inner.clone();
2261                    let fut = async move {
2262                        let method = GetTransactionSvc(inner);
2263                        let codec = tonic::codec::ProstCodec::default();
2264                        let mut grpc = tonic::server::Grpc::new(codec)
2265                            .apply_compression_config(
2266                                accept_compression_encodings,
2267                                send_compression_encodings,
2268                            )
2269                            .apply_max_message_size_config(
2270                                max_decoding_message_size,
2271                                max_encoding_message_size,
2272                            );
2273                        let res = grpc.unary(method, req).await;
2274                        Ok(res)
2275                    };
2276                    Box::pin(fut)
2277                }
2278                "/sui.rpc.v2beta2.LedgerService/BatchGetTransactions" => {
2279                    #[allow(non_camel_case_types)]
2280                    struct BatchGetTransactionsSvc<T: LedgerService>(pub Arc<T>);
2281                    impl<
2282                        T: LedgerService,
2283                    > tonic::server::UnaryService<super::BatchGetTransactionsRequest>
2284                    for BatchGetTransactionsSvc<T> {
2285                        type Response = super::BatchGetTransactionsResponse;
2286                        type Future = BoxFuture<
2287                            tonic::Response<Self::Response>,
2288                            tonic::Status,
2289                        >;
2290                        fn call(
2291                            &mut self,
2292                            request: tonic::Request<super::BatchGetTransactionsRequest>,
2293                        ) -> Self::Future {
2294                            let inner = Arc::clone(&self.0);
2295                            let fut = async move {
2296                                <T as LedgerService>::batch_get_transactions(
2297                                        &inner,
2298                                        request,
2299                                    )
2300                                    .await
2301                            };
2302                            Box::pin(fut)
2303                        }
2304                    }
2305                    let accept_compression_encodings = self.accept_compression_encodings;
2306                    let send_compression_encodings = self.send_compression_encodings;
2307                    let max_decoding_message_size = self.max_decoding_message_size;
2308                    let max_encoding_message_size = self.max_encoding_message_size;
2309                    let inner = self.inner.clone();
2310                    let fut = async move {
2311                        let method = BatchGetTransactionsSvc(inner);
2312                        let codec = tonic::codec::ProstCodec::default();
2313                        let mut grpc = tonic::server::Grpc::new(codec)
2314                            .apply_compression_config(
2315                                accept_compression_encodings,
2316                                send_compression_encodings,
2317                            )
2318                            .apply_max_message_size_config(
2319                                max_decoding_message_size,
2320                                max_encoding_message_size,
2321                            );
2322                        let res = grpc.unary(method, req).await;
2323                        Ok(res)
2324                    };
2325                    Box::pin(fut)
2326                }
2327                "/sui.rpc.v2beta2.LedgerService/GetCheckpoint" => {
2328                    #[allow(non_camel_case_types)]
2329                    struct GetCheckpointSvc<T: LedgerService>(pub Arc<T>);
2330                    impl<
2331                        T: LedgerService,
2332                    > tonic::server::UnaryService<super::GetCheckpointRequest>
2333                    for GetCheckpointSvc<T> {
2334                        type Response = super::GetCheckpointResponse;
2335                        type Future = BoxFuture<
2336                            tonic::Response<Self::Response>,
2337                            tonic::Status,
2338                        >;
2339                        fn call(
2340                            &mut self,
2341                            request: tonic::Request<super::GetCheckpointRequest>,
2342                        ) -> Self::Future {
2343                            let inner = Arc::clone(&self.0);
2344                            let fut = async move {
2345                                <T as LedgerService>::get_checkpoint(&inner, request).await
2346                            };
2347                            Box::pin(fut)
2348                        }
2349                    }
2350                    let accept_compression_encodings = self.accept_compression_encodings;
2351                    let send_compression_encodings = self.send_compression_encodings;
2352                    let max_decoding_message_size = self.max_decoding_message_size;
2353                    let max_encoding_message_size = self.max_encoding_message_size;
2354                    let inner = self.inner.clone();
2355                    let fut = async move {
2356                        let method = GetCheckpointSvc(inner);
2357                        let codec = tonic::codec::ProstCodec::default();
2358                        let mut grpc = tonic::server::Grpc::new(codec)
2359                            .apply_compression_config(
2360                                accept_compression_encodings,
2361                                send_compression_encodings,
2362                            )
2363                            .apply_max_message_size_config(
2364                                max_decoding_message_size,
2365                                max_encoding_message_size,
2366                            );
2367                        let res = grpc.unary(method, req).await;
2368                        Ok(res)
2369                    };
2370                    Box::pin(fut)
2371                }
2372                "/sui.rpc.v2beta2.LedgerService/GetEpoch" => {
2373                    #[allow(non_camel_case_types)]
2374                    struct GetEpochSvc<T: LedgerService>(pub Arc<T>);
2375                    impl<
2376                        T: LedgerService,
2377                    > tonic::server::UnaryService<super::GetEpochRequest>
2378                    for GetEpochSvc<T> {
2379                        type Response = super::GetEpochResponse;
2380                        type Future = BoxFuture<
2381                            tonic::Response<Self::Response>,
2382                            tonic::Status,
2383                        >;
2384                        fn call(
2385                            &mut self,
2386                            request: tonic::Request<super::GetEpochRequest>,
2387                        ) -> Self::Future {
2388                            let inner = Arc::clone(&self.0);
2389                            let fut = async move {
2390                                <T as LedgerService>::get_epoch(&inner, request).await
2391                            };
2392                            Box::pin(fut)
2393                        }
2394                    }
2395                    let accept_compression_encodings = self.accept_compression_encodings;
2396                    let send_compression_encodings = self.send_compression_encodings;
2397                    let max_decoding_message_size = self.max_decoding_message_size;
2398                    let max_encoding_message_size = self.max_encoding_message_size;
2399                    let inner = self.inner.clone();
2400                    let fut = async move {
2401                        let method = GetEpochSvc(inner);
2402                        let codec = tonic::codec::ProstCodec::default();
2403                        let mut grpc = tonic::server::Grpc::new(codec)
2404                            .apply_compression_config(
2405                                accept_compression_encodings,
2406                                send_compression_encodings,
2407                            )
2408                            .apply_max_message_size_config(
2409                                max_decoding_message_size,
2410                                max_encoding_message_size,
2411                            );
2412                        let res = grpc.unary(method, req).await;
2413                        Ok(res)
2414                    };
2415                    Box::pin(fut)
2416                }
2417                _ => {
2418                    Box::pin(async move {
2419                        let mut response = http::Response::new(
2420                            tonic::body::Body::default(),
2421                        );
2422                        let headers = response.headers_mut();
2423                        headers
2424                            .insert(
2425                                tonic::Status::GRPC_STATUS,
2426                                (tonic::Code::Unimplemented as i32).into(),
2427                            );
2428                        headers
2429                            .insert(
2430                                http::header::CONTENT_TYPE,
2431                                tonic::metadata::GRPC_CONTENT_TYPE,
2432                            );
2433                        Ok(response)
2434                    })
2435                }
2436            }
2437        }
2438    }
2439    impl<T> Clone for LedgerServiceServer<T> {
2440        fn clone(&self) -> Self {
2441            let inner = self.inner.clone();
2442            Self {
2443                inner,
2444                accept_compression_encodings: self.accept_compression_encodings,
2445                send_compression_encodings: self.send_compression_encodings,
2446                max_decoding_message_size: self.max_decoding_message_size,
2447                max_encoding_message_size: self.max_encoding_message_size,
2448            }
2449        }
2450    }
2451    /// Generated gRPC service name
2452    pub const SERVICE_NAME: &str = "sui.rpc.v2beta2.LedgerService";
2453    impl<T> tonic::server::NamedService for LedgerServiceServer<T> {
2454        const NAME: &'static str = SERVICE_NAME;
2455    }
2456}
2457/// Request message for `NodeService.GetCoinInfo`.
2458#[non_exhaustive]
2459#[derive(Clone, PartialEq, ::prost::Message)]
2460pub struct GetCoinInfoRequest {
2461    /// The coin type to request information about
2462    #[prost(string, optional, tag = "1")]
2463    pub coin_type: ::core::option::Option<::prost::alloc::string::String>,
2464}
2465/// Response message for `NodeService.GetCoinInfo`.
2466#[non_exhaustive]
2467#[derive(Clone, PartialEq, ::prost::Message)]
2468pub struct GetCoinInfoResponse {
2469    /// Required. The coin type.
2470    #[prost(string, optional, tag = "1")]
2471    pub coin_type: ::core::option::Option<::prost::alloc::string::String>,
2472    /// This field will be populated with information about this coin
2473    /// type's `0x2::coin::CoinMetadata` if it exists and has not been wrapped.
2474    #[prost(message, optional, tag = "2")]
2475    pub metadata: ::core::option::Option<CoinMetadata>,
2476    /// This field will be populated with information about this coin
2477    /// type's `0x2::coin::TreasuryCap` if it exists and has not been wrapped.
2478    #[prost(message, optional, tag = "3")]
2479    pub treasury: ::core::option::Option<CoinTreasury>,
2480    /// If this coin type is a regulated coin, this field will be
2481    /// populated with information either from its Currency object
2482    /// in the CoinRegistry, or from its `0x2::coin::RegulatedCoinMetadata`
2483    /// object for coins that have not been migrated to the CoinRegistry
2484    ///
2485    /// If this coin is not known to be regulated, only the
2486    /// coin_regulated_state field will be populated.
2487    #[prost(message, optional, tag = "4")]
2488    pub regulated_metadata: ::core::option::Option<RegulatedCoinMetadata>,
2489}
2490/// Metadata for a coin type
2491#[non_exhaustive]
2492#[derive(Clone, PartialEq, ::prost::Message)]
2493pub struct CoinMetadata {
2494    /// ObjectId of the `0x2::coin::CoinMetadata` object or
2495    /// 0x2::sui::coin_registry::Currency object (when registered with CoinRegistry).
2496    #[prost(string, optional, tag = "1")]
2497    pub id: ::core::option::Option<::prost::alloc::string::String>,
2498    /// Number of decimal places to coin uses.
2499    #[prost(uint32, optional, tag = "2")]
2500    pub decimals: ::core::option::Option<u32>,
2501    /// Name for the token
2502    #[prost(string, optional, tag = "3")]
2503    pub name: ::core::option::Option<::prost::alloc::string::String>,
2504    /// Symbol for the token
2505    #[prost(string, optional, tag = "4")]
2506    pub symbol: ::core::option::Option<::prost::alloc::string::String>,
2507    /// Description of the token
2508    #[prost(string, optional, tag = "5")]
2509    pub description: ::core::option::Option<::prost::alloc::string::String>,
2510    /// URL for the token logo
2511    #[prost(string, optional, tag = "6")]
2512    pub icon_url: ::core::option::Option<::prost::alloc::string::String>,
2513    /// The MetadataCap ID if it has been claimed for this coin type.
2514    /// This capability allows updating the coin's metadata fields.
2515    /// Only populated when metadata is from CoinRegistry.
2516    #[prost(string, optional, tag = "7")]
2517    pub metadata_cap_id: ::core::option::Option<::prost::alloc::string::String>,
2518    /// State of the MetadataCap for this coin type.
2519    #[prost(enumeration = "coin_metadata::MetadataCapState", optional, tag = "8")]
2520    pub metadata_cap_state: ::core::option::Option<i32>,
2521}
2522/// Nested message and enum types in `CoinMetadata`.
2523pub mod coin_metadata {
2524    /// Information about the state of the coin's MetadataCap
2525    #[non_exhaustive]
2526    #[derive(
2527        Clone,
2528        Copy,
2529        Debug,
2530        PartialEq,
2531        Eq,
2532        Hash,
2533        PartialOrd,
2534        Ord,
2535        ::prost::Enumeration
2536    )]
2537    #[repr(i32)]
2538    pub enum MetadataCapState {
2539        /// Indicates the state of the MetadataCap is unknown.
2540        /// Set when the coin has not been migrated to the CoinRegistry.
2541        Unknown = 0,
2542        /// Indicates the MetadataCap has been claimed.
2543        Claimed = 1,
2544        /// Indicates the MetadataCap has not been claimed.
2545        Unclaimed = 2,
2546        /// Indicates the MetadataCap has been deleted.
2547        Deleted = 3,
2548    }
2549    impl MetadataCapState {
2550        /// String value of the enum field names used in the ProtoBuf definition.
2551        ///
2552        /// The values are not transformed in any way and thus are considered stable
2553        /// (if the ProtoBuf definition does not change) and safe for programmatic use.
2554        pub fn as_str_name(&self) -> &'static str {
2555            match self {
2556                Self::Unknown => "METADATA_CAP_STATE_UNKNOWN",
2557                Self::Claimed => "CLAIMED",
2558                Self::Unclaimed => "UNCLAIMED",
2559                Self::Deleted => "DELETED",
2560            }
2561        }
2562        /// Creates an enum from field names used in the ProtoBuf definition.
2563        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
2564            match value {
2565                "METADATA_CAP_STATE_UNKNOWN" => Some(Self::Unknown),
2566                "CLAIMED" => Some(Self::Claimed),
2567                "UNCLAIMED" => Some(Self::Unclaimed),
2568                "DELETED" => Some(Self::Deleted),
2569                _ => None,
2570            }
2571        }
2572    }
2573}
2574/// Information about a coin type's `0x2::coin::TreasuryCap` and its total available supply
2575#[non_exhaustive]
2576#[derive(Clone, PartialEq, ::prost::Message)]
2577pub struct CoinTreasury {
2578    /// ObjectId of the `0x2::coin::TreasuryCap` object.
2579    #[prost(string, optional, tag = "1")]
2580    pub id: ::core::option::Option<::prost::alloc::string::String>,
2581    /// Total available supply for this coin type.
2582    #[prost(uint64, optional, tag = "2")]
2583    pub total_supply: ::core::option::Option<u64>,
2584    /// Supply state indicating if the supply is fixed or can still be minted
2585    #[prost(enumeration = "coin_treasury::SupplyState", optional, tag = "3")]
2586    pub supply_state: ::core::option::Option<i32>,
2587}
2588/// Nested message and enum types in `CoinTreasury`.
2589pub mod coin_treasury {
2590    /// Supply state of a coin, matching the Move SupplyState enum
2591    #[non_exhaustive]
2592    #[derive(
2593        Clone,
2594        Copy,
2595        Debug,
2596        PartialEq,
2597        Eq,
2598        Hash,
2599        PartialOrd,
2600        Ord,
2601        ::prost::Enumeration
2602    )]
2603    #[repr(i32)]
2604    pub enum SupplyState {
2605        /// Supply is unknown or TreasuryCap still exists (minting still possible)
2606        Unknown = 0,
2607        /// Supply is fixed (TreasuryCap consumed, no more minting possible)
2608        Fixed = 1,
2609        /// Supply can only decrease (burning allowed, minting not allowed)
2610        BurnOnly = 2,
2611    }
2612    impl SupplyState {
2613        /// String value of the enum field names used in the ProtoBuf definition.
2614        ///
2615        /// The values are not transformed in any way and thus are considered stable
2616        /// (if the ProtoBuf definition does not change) and safe for programmatic use.
2617        pub fn as_str_name(&self) -> &'static str {
2618            match self {
2619                Self::Unknown => "SUPPLY_STATE_UNKNOWN",
2620                Self::Fixed => "FIXED",
2621                Self::BurnOnly => "BURN_ONLY",
2622            }
2623        }
2624        /// Creates an enum from field names used in the ProtoBuf definition.
2625        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
2626            match value {
2627                "SUPPLY_STATE_UNKNOWN" => Some(Self::Unknown),
2628                "FIXED" => Some(Self::Fixed),
2629                "BURN_ONLY" => Some(Self::BurnOnly),
2630                _ => None,
2631            }
2632        }
2633    }
2634}
2635/// Information about a regulated coin, which indicates that it makes use of the transfer deny list.
2636#[non_exhaustive]
2637#[derive(Clone, PartialEq, ::prost::Message)]
2638pub struct RegulatedCoinMetadata {
2639    /// ObjectId of the `0x2::coin::RegulatedCoinMetadata` object.
2640    /// Only present for coins that have not been migrated to CoinRegistry.
2641    #[prost(string, optional, tag = "1")]
2642    pub id: ::core::option::Option<::prost::alloc::string::String>,
2643    /// The ID of the coin's `CoinMetadata` or `CoinData` object.
2644    #[prost(string, optional, tag = "2")]
2645    pub coin_metadata_object: ::core::option::Option<::prost::alloc::string::String>,
2646    /// The ID of the coin's `DenyCap` object.
2647    #[prost(string, optional, tag = "3")]
2648    pub deny_cap_object: ::core::option::Option<::prost::alloc::string::String>,
2649    /// Whether the coin can be globally paused
2650    #[prost(bool, optional, tag = "4")]
2651    pub allow_global_pause: ::core::option::Option<bool>,
2652    /// Variant of the regulated coin metadata
2653    #[prost(uint32, optional, tag = "5")]
2654    pub variant: ::core::option::Option<u32>,
2655    /// Indicates the coin's regulated state.
2656    #[prost(
2657        enumeration = "regulated_coin_metadata::CoinRegulatedState",
2658        optional,
2659        tag = "6"
2660    )]
2661    pub coin_regulated_state: ::core::option::Option<i32>,
2662}
2663/// Nested message and enum types in `RegulatedCoinMetadata`.
2664pub mod regulated_coin_metadata {
2665    /// Indicates the state of the regulation of the coin.
2666    #[non_exhaustive]
2667    #[derive(
2668        Clone,
2669        Copy,
2670        Debug,
2671        PartialEq,
2672        Eq,
2673        Hash,
2674        PartialOrd,
2675        Ord,
2676        ::prost::Enumeration
2677    )]
2678    #[repr(i32)]
2679    pub enum CoinRegulatedState {
2680        /// Indicates the regulation state of the coin is unknown.
2681        /// This is set when a coin has not been migrated to the
2682        /// coin registry and has no `0x2::coin::RegulatedCoinMetadata`
2683        /// object.
2684        Unknown = 0,
2685        /// Indicates a coin is regulated. RegulatedCoinMetadata will be populated.
2686        Regulated = 1,
2687        /// Indicates a coin is unregulated.
2688        Unregulated = 2,
2689    }
2690    impl CoinRegulatedState {
2691        /// String value of the enum field names used in the ProtoBuf definition.
2692        ///
2693        /// The values are not transformed in any way and thus are considered stable
2694        /// (if the ProtoBuf definition does not change) and safe for programmatic use.
2695        pub fn as_str_name(&self) -> &'static str {
2696            match self {
2697                Self::Unknown => "COIN_REGULATED_STATE_UNKNOWN",
2698                Self::Regulated => "REGULATED",
2699                Self::Unregulated => "UNREGULATED",
2700            }
2701        }
2702        /// Creates an enum from field names used in the ProtoBuf definition.
2703        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
2704            match value {
2705                "COIN_REGULATED_STATE_UNKNOWN" => Some(Self::Unknown),
2706                "REGULATED" => Some(Self::Regulated),
2707                "UNREGULATED" => Some(Self::Unregulated),
2708                _ => None,
2709            }
2710        }
2711    }
2712}
2713/// Request message for `LiveDataService.GetBalance`.
2714#[non_exhaustive]
2715#[derive(Clone, PartialEq, ::prost::Message)]
2716pub struct GetBalanceRequest {
2717    /// Required. The owner's Sui address.
2718    #[prost(string, optional, tag = "1")]
2719    pub owner: ::core::option::Option<::prost::alloc::string::String>,
2720    /// Required. The type names for the coin (e.g., 0x2::sui::SUI).
2721    #[prost(string, optional, tag = "2")]
2722    pub coin_type: ::core::option::Option<::prost::alloc::string::String>,
2723}
2724/// Response message for `LiveDataService.GetBalance`.
2725/// Return the total coin balance for one coin type, owned by the address owner.
2726#[non_exhaustive]
2727#[derive(Clone, PartialEq, ::prost::Message)]
2728pub struct GetBalanceResponse {
2729    /// The balance information for the requested coin type.
2730    #[prost(message, optional, tag = "1")]
2731    pub balance: ::core::option::Option<Balance>,
2732}
2733/// Request message for `LiveDataService.ListBalances`.
2734#[non_exhaustive]
2735#[derive(Clone, PartialEq, ::prost::Message)]
2736pub struct ListBalancesRequest {
2737    /// Required. The owner's Sui address.
2738    #[prost(string, optional, tag = "1")]
2739    pub owner: ::core::option::Option<::prost::alloc::string::String>,
2740    /// The maximum number of balance entries to return. The service may return fewer than this value.
2741    /// If unspecified, at most `50` entries will be returned.
2742    /// The maximum value is `1000`; values above `1000` will be coerced to `1000`.
2743    #[prost(uint32, optional, tag = "2")]
2744    pub page_size: ::core::option::Option<u32>,
2745    /// A page token, received from a previous `ListBalances` call.
2746    /// Provide this to retrieve the subsequent page.
2747    ///
2748    /// When paginating, all other parameters provided to `ListBalances` must
2749    /// match the call that provided the page token.
2750    #[prost(bytes = "bytes", optional, tag = "3")]
2751    pub page_token: ::core::option::Option<::prost::bytes::Bytes>,
2752}
2753/// Response message for `LiveDataService.ListBalances`.
2754/// Return the total coin balance for all coin types, owned by the address owner.
2755#[non_exhaustive]
2756#[derive(Clone, PartialEq, ::prost::Message)]
2757pub struct ListBalancesResponse {
2758    /// The list of coin types and their respective balances.
2759    #[prost(message, repeated, tag = "1")]
2760    pub balances: ::prost::alloc::vec::Vec<Balance>,
2761    /// A token, which can be sent as `page_token` to retrieve the next page.
2762    /// If this field is omitted, there are no subsequent pages.
2763    #[prost(bytes = "bytes", optional, tag = "2")]
2764    pub next_page_token: ::core::option::Option<::prost::bytes::Bytes>,
2765}
2766/// Balance information for a specific coin type.
2767#[non_exhaustive]
2768#[derive(Clone, PartialEq, ::prost::Message)]
2769pub struct Balance {
2770    /// The type of the coin (e.g., 0x2::sui::SUI).
2771    #[prost(string, optional, tag = "1")]
2772    pub coin_type: ::core::option::Option<::prost::alloc::string::String>,
2773    /// Shows the total balance of the coin in its smallest unit.
2774    #[prost(uint64, optional, tag = "3")]
2775    pub balance: ::core::option::Option<u64>,
2776}
2777/// Request message for `NodeService.ListDynamicFields`
2778#[non_exhaustive]
2779#[derive(Clone, PartialEq, ::prost::Message)]
2780pub struct ListDynamicFieldsRequest {
2781    /// Required. The `UID` of the parent, which owns the collections of dynamic fields.
2782    #[prost(string, optional, tag = "1")]
2783    pub parent: ::core::option::Option<::prost::alloc::string::String>,
2784    /// The maximum number of dynamic fields to return. The service may return fewer than this value.
2785    /// If unspecified, at most `50` entries will be returned.
2786    /// The maximum value is `1000`; values above `1000` will be coerced to `1000`.
2787    #[prost(uint32, optional, tag = "2")]
2788    pub page_size: ::core::option::Option<u32>,
2789    /// A page token, received from a previous `ListDynamicFields` call.
2790    /// Provide this to retrieve the subsequent page.
2791    ///
2792    /// When paginating, all other parameters provided to `ListDynamicFields` must
2793    /// match the call that provided the page token.
2794    #[prost(bytes = "bytes", optional, tag = "3")]
2795    pub page_token: ::core::option::Option<::prost::bytes::Bytes>,
2796    /// Mask specifying which fields to read.
2797    /// If no mask is specified, defaults to `parent,field_id`.
2798    #[prost(message, optional, tag = "4")]
2799    pub read_mask: ::core::option::Option<::prost_types::FieldMask>,
2800}
2801/// Response message for `NodeService.ListDynamicFields`
2802#[non_exhaustive]
2803#[derive(Clone, PartialEq, ::prost::Message)]
2804pub struct ListDynamicFieldsResponse {
2805    /// Page of dynamic fields owned by the specified parent.
2806    #[prost(message, repeated, tag = "1")]
2807    pub dynamic_fields: ::prost::alloc::vec::Vec<DynamicField>,
2808    /// A token, which can be sent as `page_token` to retrieve the next page.
2809    /// If this field is omitted, there are no subsequent pages.
2810    #[prost(bytes = "bytes", optional, tag = "2")]
2811    pub next_page_token: ::core::option::Option<::prost::bytes::Bytes>,
2812}
2813#[non_exhaustive]
2814#[derive(Clone, PartialEq, ::prost::Message)]
2815pub struct DynamicField {
2816    #[prost(enumeration = "dynamic_field::DynamicFieldKind", optional, tag = "1")]
2817    pub kind: ::core::option::Option<i32>,
2818    /// ObjectId of this dynamic field's parent.
2819    #[prost(string, optional, tag = "2")]
2820    pub parent: ::core::option::Option<::prost::alloc::string::String>,
2821    /// ObjectId of this dynamic field.
2822    #[prost(string, optional, tag = "3")]
2823    pub field_id: ::core::option::Option<::prost::alloc::string::String>,
2824    /// The type of the dynamic field "name"
2825    #[prost(string, optional, tag = "4")]
2826    pub name_type: ::core::option::Option<::prost::alloc::string::String>,
2827    /// The serialized move value of "name"
2828    #[prost(bytes = "bytes", optional, tag = "5")]
2829    pub name_value: ::core::option::Option<::prost::bytes::Bytes>,
2830    /// The type of the dynamic field "value".
2831    ///
2832    /// If this is a dynamic object field then this is the type of the object
2833    /// itself (which is a child of this field), otherwise this is the type of the
2834    /// value of this field.
2835    #[prost(string, optional, tag = "6")]
2836    pub value_type: ::core::option::Option<::prost::alloc::string::String>,
2837    /// The ObjectId of the child object when a child is a dynamic
2838    /// object field.
2839    ///
2840    /// The presence or absence of this field can be used to determine if a child
2841    /// is a dynamic field or a dynamic child object
2842    #[prost(string, optional, tag = "7")]
2843    pub dynamic_object_id: ::core::option::Option<::prost::alloc::string::String>,
2844    /// The object itself when a child is a dynamic object field.
2845    #[prost(message, optional, tag = "8")]
2846    pub object: ::core::option::Option<Object>,
2847}
2848/// Nested message and enum types in `DynamicField`.
2849pub mod dynamic_field {
2850    #[non_exhaustive]
2851    #[derive(
2852        Clone,
2853        Copy,
2854        Debug,
2855        PartialEq,
2856        Eq,
2857        Hash,
2858        PartialOrd,
2859        Ord,
2860        ::prost::Enumeration
2861    )]
2862    #[repr(i32)]
2863    pub enum DynamicFieldKind {
2864        Unknown = 0,
2865        Field = 1,
2866        Object = 2,
2867    }
2868    impl DynamicFieldKind {
2869        /// String value of the enum field names used in the ProtoBuf definition.
2870        ///
2871        /// The values are not transformed in any way and thus are considered stable
2872        /// (if the ProtoBuf definition does not change) and safe for programmatic use.
2873        pub fn as_str_name(&self) -> &'static str {
2874            match self {
2875                Self::Unknown => "DYNAMIC_FIELD_KIND_UNKNOWN",
2876                Self::Field => "FIELD",
2877                Self::Object => "OBJECT",
2878            }
2879        }
2880        /// Creates an enum from field names used in the ProtoBuf definition.
2881        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
2882            match value {
2883                "DYNAMIC_FIELD_KIND_UNKNOWN" => Some(Self::Unknown),
2884                "FIELD" => Some(Self::Field),
2885                "OBJECT" => Some(Self::Object),
2886                _ => None,
2887            }
2888        }
2889    }
2890}
2891#[non_exhaustive]
2892#[derive(Clone, PartialEq, ::prost::Message)]
2893pub struct SimulateTransactionRequest {
2894    #[prost(message, optional, tag = "1")]
2895    pub transaction: ::core::option::Option<Transaction>,
2896    /// Mask specifying which fields to read.
2897    #[prost(message, optional, tag = "2")]
2898    pub read_mask: ::core::option::Option<::prost_types::FieldMask>,
2899    /// Specify whether checks should be ENABLED (default) or DISABLED while executing the transaction
2900    #[prost(
2901        enumeration = "simulate_transaction_request::TransactionChecks",
2902        optional,
2903        tag = "3"
2904    )]
2905    pub checks: ::core::option::Option<i32>,
2906    /// Perform gas selection based on a budget estimation and include the
2907    /// selected gas payment and budget in the response.
2908    ///
2909    /// This option will be ignored if `checks` is `DISABLED`.
2910    #[prost(bool, optional, tag = "4")]
2911    pub do_gas_selection: ::core::option::Option<bool>,
2912}
2913/// Nested message and enum types in `SimulateTransactionRequest`.
2914pub mod simulate_transaction_request {
2915    /// buf:lint:ignore ENUM_ZERO_VALUE_SUFFIX
2916    #[non_exhaustive]
2917    #[derive(
2918        Clone,
2919        Copy,
2920        Debug,
2921        PartialEq,
2922        Eq,
2923        Hash,
2924        PartialOrd,
2925        Ord,
2926        ::prost::Enumeration
2927    )]
2928    #[repr(i32)]
2929    pub enum TransactionChecks {
2930        Enabled = 0,
2931        Disabled = 1,
2932    }
2933    impl TransactionChecks {
2934        /// String value of the enum field names used in the ProtoBuf definition.
2935        ///
2936        /// The values are not transformed in any way and thus are considered stable
2937        /// (if the ProtoBuf definition does not change) and safe for programmatic use.
2938        pub fn as_str_name(&self) -> &'static str {
2939            match self {
2940                Self::Enabled => "ENABLED",
2941                Self::Disabled => "DISABLED",
2942            }
2943        }
2944        /// Creates an enum from field names used in the ProtoBuf definition.
2945        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
2946            match value {
2947                "ENABLED" => Some(Self::Enabled),
2948                "DISABLED" => Some(Self::Disabled),
2949                _ => None,
2950            }
2951        }
2952    }
2953}
2954#[non_exhaustive]
2955#[derive(Clone, PartialEq, ::prost::Message)]
2956pub struct SimulateTransactionResponse {
2957    #[prost(message, optional, tag = "1")]
2958    pub transaction: ::core::option::Option<ExecutedTransaction>,
2959    #[prost(message, repeated, tag = "2")]
2960    pub outputs: ::prost::alloc::vec::Vec<CommandResult>,
2961}
2962/// An intermediate result/output from the execution of a single command
2963#[non_exhaustive]
2964#[derive(Clone, PartialEq, ::prost::Message)]
2965pub struct CommandResult {
2966    #[prost(message, repeated, tag = "1")]
2967    pub return_values: ::prost::alloc::vec::Vec<CommandOutput>,
2968    #[prost(message, repeated, tag = "2")]
2969    pub mutated_by_ref: ::prost::alloc::vec::Vec<CommandOutput>,
2970}
2971#[non_exhaustive]
2972#[derive(Clone, PartialEq, ::prost::Message)]
2973pub struct CommandOutput {
2974    #[prost(message, optional, tag = "1")]
2975    pub argument: ::core::option::Option<Argument>,
2976    #[prost(message, optional, tag = "2")]
2977    pub value: ::core::option::Option<Bcs>,
2978    /// JSON rendering of the output.
2979    #[prost(message, optional, boxed, tag = "3")]
2980    pub json: ::core::option::Option<::prost::alloc::boxed::Box<::prost_types::Value>>,
2981}
2982#[non_exhaustive]
2983#[derive(Clone, PartialEq, ::prost::Message)]
2984pub struct ListOwnedObjectsRequest {
2985    /// Required. The address of the account that owns the objects.
2986    #[prost(string, optional, tag = "1")]
2987    pub owner: ::core::option::Option<::prost::alloc::string::String>,
2988    /// The maximum number of entries return. The service may return fewer than this value.
2989    /// If unspecified, at most `50` entries will be returned.
2990    /// The maximum value is `1000`; values above `1000` will be coerced to `1000`.
2991    #[prost(uint32, optional, tag = "2")]
2992    pub page_size: ::core::option::Option<u32>,
2993    /// A page token, received from a previous `ListOwnedObjects` call.
2994    /// Provide this to retrieve the subsequent page.
2995    ///
2996    /// When paginating, all other parameters provided to `ListOwnedObjects` must
2997    /// match the call that provided the page token.
2998    #[prost(bytes = "bytes", optional, tag = "3")]
2999    pub page_token: ::core::option::Option<::prost::bytes::Bytes>,
3000    /// Mask specifying which fields to read.
3001    /// If no mask is specified, defaults to `object_id,version,object_type`.
3002    #[prost(message, optional, tag = "4")]
3003    pub read_mask: ::core::option::Option<::prost_types::FieldMask>,
3004    /// Optional type filter to limit the types of objects listed.
3005    ///
3006    /// Providing an object type with no type params will return objects of that
3007    /// type with any type parameter, e.g. `0x2::coin::Coin` will return all
3008    /// `Coin<T>` objects regardless of the type parameter `T`. Providing a type
3009    /// with a type param will retrict the returned objects to only those objects
3010    /// that match the provided type parameters, e.g.
3011    /// `0x2::coin::Coin<0x2::sui::SUI>` will only return `Coin<SUI>` objects.
3012    #[prost(string, optional, tag = "5")]
3013    pub object_type: ::core::option::Option<::prost::alloc::string::String>,
3014}
3015#[non_exhaustive]
3016#[derive(Clone, PartialEq, ::prost::Message)]
3017pub struct ListOwnedObjectsResponse {
3018    /// Page of dynamic fields owned by the specified parent.
3019    #[prost(message, repeated, tag = "1")]
3020    pub objects: ::prost::alloc::vec::Vec<Object>,
3021    /// A token, which can be sent as `page_token` to retrieve the next page.
3022    /// If this field is omitted, there are no subsequent pages.
3023    #[prost(bytes = "bytes", optional, tag = "2")]
3024    pub next_page_token: ::core::option::Option<::prost::bytes::Bytes>,
3025}
3026/// Generated client implementations.
3027pub mod live_data_service_client {
3028    #![allow(
3029        unused_variables,
3030        dead_code,
3031        missing_docs,
3032        clippy::wildcard_imports,
3033        clippy::let_unit_value,
3034    )]
3035    use tonic::codegen::*;
3036    use tonic::codegen::http::Uri;
3037    #[derive(Debug, Clone)]
3038    pub struct LiveDataServiceClient<T> {
3039        inner: tonic::client::Grpc<T>,
3040    }
3041    impl LiveDataServiceClient<tonic::transport::Channel> {
3042        /// Attempt to create a new client by connecting to a given endpoint.
3043        pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
3044        where
3045            D: TryInto<tonic::transport::Endpoint>,
3046            D::Error: Into<StdError>,
3047        {
3048            let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
3049            Ok(Self::new(conn))
3050        }
3051    }
3052    impl<T> LiveDataServiceClient<T>
3053    where
3054        T: tonic::client::GrpcService<tonic::body::Body>,
3055        T::Error: Into<StdError>,
3056        T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static,
3057        <T::ResponseBody as Body>::Error: Into<StdError> + std::marker::Send,
3058    {
3059        pub fn new(inner: T) -> Self {
3060            let inner = tonic::client::Grpc::new(inner);
3061            Self { inner }
3062        }
3063        pub fn with_origin(inner: T, origin: Uri) -> Self {
3064            let inner = tonic::client::Grpc::with_origin(inner, origin);
3065            Self { inner }
3066        }
3067        pub fn with_interceptor<F>(
3068            inner: T,
3069            interceptor: F,
3070        ) -> LiveDataServiceClient<InterceptedService<T, F>>
3071        where
3072            F: tonic::service::Interceptor,
3073            T::ResponseBody: Default,
3074            T: tonic::codegen::Service<
3075                http::Request<tonic::body::Body>,
3076                Response = http::Response<
3077                    <T as tonic::client::GrpcService<tonic::body::Body>>::ResponseBody,
3078                >,
3079            >,
3080            <T as tonic::codegen::Service<
3081                http::Request<tonic::body::Body>,
3082            >>::Error: Into<StdError> + std::marker::Send + std::marker::Sync,
3083        {
3084            LiveDataServiceClient::new(InterceptedService::new(inner, interceptor))
3085        }
3086        /// Compress requests with the given encoding.
3087        ///
3088        /// This requires the server to support it otherwise it might respond with an
3089        /// error.
3090        #[must_use]
3091        pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
3092            self.inner = self.inner.send_compressed(encoding);
3093            self
3094        }
3095        /// Enable decompressing responses.
3096        #[must_use]
3097        pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
3098            self.inner = self.inner.accept_compressed(encoding);
3099            self
3100        }
3101        /// Limits the maximum size of a decoded message.
3102        ///
3103        /// Default: `4MB`
3104        #[must_use]
3105        pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
3106            self.inner = self.inner.max_decoding_message_size(limit);
3107            self
3108        }
3109        /// Limits the maximum size of an encoded message.
3110        ///
3111        /// Default: `usize::MAX`
3112        #[must_use]
3113        pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
3114            self.inner = self.inner.max_encoding_message_size(limit);
3115            self
3116        }
3117        pub async fn list_dynamic_fields(
3118            &mut self,
3119            request: impl tonic::IntoRequest<super::ListDynamicFieldsRequest>,
3120        ) -> std::result::Result<
3121            tonic::Response<super::ListDynamicFieldsResponse>,
3122            tonic::Status,
3123        > {
3124            self.inner
3125                .ready()
3126                .await
3127                .map_err(|e| {
3128                    tonic::Status::unknown(
3129                        format!("Service was not ready: {}", e.into()),
3130                    )
3131                })?;
3132            let codec = tonic::codec::ProstCodec::default();
3133            let path = http::uri::PathAndQuery::from_static(
3134                "/sui.rpc.v2beta2.LiveDataService/ListDynamicFields",
3135            );
3136            let mut req = request.into_request();
3137            req.extensions_mut()
3138                .insert(
3139                    GrpcMethod::new(
3140                        "sui.rpc.v2beta2.LiveDataService",
3141                        "ListDynamicFields",
3142                    ),
3143                );
3144            self.inner.unary(req, path, codec).await
3145        }
3146        pub async fn list_owned_objects(
3147            &mut self,
3148            request: impl tonic::IntoRequest<super::ListOwnedObjectsRequest>,
3149        ) -> std::result::Result<
3150            tonic::Response<super::ListOwnedObjectsResponse>,
3151            tonic::Status,
3152        > {
3153            self.inner
3154                .ready()
3155                .await
3156                .map_err(|e| {
3157                    tonic::Status::unknown(
3158                        format!("Service was not ready: {}", e.into()),
3159                    )
3160                })?;
3161            let codec = tonic::codec::ProstCodec::default();
3162            let path = http::uri::PathAndQuery::from_static(
3163                "/sui.rpc.v2beta2.LiveDataService/ListOwnedObjects",
3164            );
3165            let mut req = request.into_request();
3166            req.extensions_mut()
3167                .insert(
3168                    GrpcMethod::new(
3169                        "sui.rpc.v2beta2.LiveDataService",
3170                        "ListOwnedObjects",
3171                    ),
3172                );
3173            self.inner.unary(req, path, codec).await
3174        }
3175        pub async fn get_coin_info(
3176            &mut self,
3177            request: impl tonic::IntoRequest<super::GetCoinInfoRequest>,
3178        ) -> std::result::Result<
3179            tonic::Response<super::GetCoinInfoResponse>,
3180            tonic::Status,
3181        > {
3182            self.inner
3183                .ready()
3184                .await
3185                .map_err(|e| {
3186                    tonic::Status::unknown(
3187                        format!("Service was not ready: {}", e.into()),
3188                    )
3189                })?;
3190            let codec = tonic::codec::ProstCodec::default();
3191            let path = http::uri::PathAndQuery::from_static(
3192                "/sui.rpc.v2beta2.LiveDataService/GetCoinInfo",
3193            );
3194            let mut req = request.into_request();
3195            req.extensions_mut()
3196                .insert(
3197                    GrpcMethod::new("sui.rpc.v2beta2.LiveDataService", "GetCoinInfo"),
3198                );
3199            self.inner.unary(req, path, codec).await
3200        }
3201        pub async fn get_balance(
3202            &mut self,
3203            request: impl tonic::IntoRequest<super::GetBalanceRequest>,
3204        ) -> std::result::Result<
3205            tonic::Response<super::GetBalanceResponse>,
3206            tonic::Status,
3207        > {
3208            self.inner
3209                .ready()
3210                .await
3211                .map_err(|e| {
3212                    tonic::Status::unknown(
3213                        format!("Service was not ready: {}", e.into()),
3214                    )
3215                })?;
3216            let codec = tonic::codec::ProstCodec::default();
3217            let path = http::uri::PathAndQuery::from_static(
3218                "/sui.rpc.v2beta2.LiveDataService/GetBalance",
3219            );
3220            let mut req = request.into_request();
3221            req.extensions_mut()
3222                .insert(
3223                    GrpcMethod::new("sui.rpc.v2beta2.LiveDataService", "GetBalance"),
3224                );
3225            self.inner.unary(req, path, codec).await
3226        }
3227        pub async fn list_balances(
3228            &mut self,
3229            request: impl tonic::IntoRequest<super::ListBalancesRequest>,
3230        ) -> std::result::Result<
3231            tonic::Response<super::ListBalancesResponse>,
3232            tonic::Status,
3233        > {
3234            self.inner
3235                .ready()
3236                .await
3237                .map_err(|e| {
3238                    tonic::Status::unknown(
3239                        format!("Service was not ready: {}", e.into()),
3240                    )
3241                })?;
3242            let codec = tonic::codec::ProstCodec::default();
3243            let path = http::uri::PathAndQuery::from_static(
3244                "/sui.rpc.v2beta2.LiveDataService/ListBalances",
3245            );
3246            let mut req = request.into_request();
3247            req.extensions_mut()
3248                .insert(
3249                    GrpcMethod::new("sui.rpc.v2beta2.LiveDataService", "ListBalances"),
3250                );
3251            self.inner.unary(req, path, codec).await
3252        }
3253        pub async fn simulate_transaction(
3254            &mut self,
3255            request: impl tonic::IntoRequest<super::SimulateTransactionRequest>,
3256        ) -> std::result::Result<
3257            tonic::Response<super::SimulateTransactionResponse>,
3258            tonic::Status,
3259        > {
3260            self.inner
3261                .ready()
3262                .await
3263                .map_err(|e| {
3264                    tonic::Status::unknown(
3265                        format!("Service was not ready: {}", e.into()),
3266                    )
3267                })?;
3268            let codec = tonic::codec::ProstCodec::default();
3269            let path = http::uri::PathAndQuery::from_static(
3270                "/sui.rpc.v2beta2.LiveDataService/SimulateTransaction",
3271            );
3272            let mut req = request.into_request();
3273            req.extensions_mut()
3274                .insert(
3275                    GrpcMethod::new(
3276                        "sui.rpc.v2beta2.LiveDataService",
3277                        "SimulateTransaction",
3278                    ),
3279                );
3280            self.inner.unary(req, path, codec).await
3281        }
3282    }
3283}
3284/// Generated server implementations.
3285pub mod live_data_service_server {
3286    #![allow(
3287        unused_variables,
3288        dead_code,
3289        missing_docs,
3290        clippy::wildcard_imports,
3291        clippy::let_unit_value,
3292    )]
3293    use tonic::codegen::*;
3294    /// Generated trait containing gRPC methods that should be implemented for use with LiveDataServiceServer.
3295    #[async_trait]
3296    pub trait LiveDataService: std::marker::Send + std::marker::Sync + 'static {
3297        async fn list_dynamic_fields(
3298            &self,
3299            request: tonic::Request<super::ListDynamicFieldsRequest>,
3300        ) -> std::result::Result<
3301            tonic::Response<super::ListDynamicFieldsResponse>,
3302            tonic::Status,
3303        >;
3304        async fn list_owned_objects(
3305            &self,
3306            request: tonic::Request<super::ListOwnedObjectsRequest>,
3307        ) -> std::result::Result<
3308            tonic::Response<super::ListOwnedObjectsResponse>,
3309            tonic::Status,
3310        >;
3311        async fn get_coin_info(
3312            &self,
3313            request: tonic::Request<super::GetCoinInfoRequest>,
3314        ) -> std::result::Result<
3315            tonic::Response<super::GetCoinInfoResponse>,
3316            tonic::Status,
3317        >;
3318        async fn get_balance(
3319            &self,
3320            request: tonic::Request<super::GetBalanceRequest>,
3321        ) -> std::result::Result<
3322            tonic::Response<super::GetBalanceResponse>,
3323            tonic::Status,
3324        >;
3325        async fn list_balances(
3326            &self,
3327            request: tonic::Request<super::ListBalancesRequest>,
3328        ) -> std::result::Result<
3329            tonic::Response<super::ListBalancesResponse>,
3330            tonic::Status,
3331        >;
3332        async fn simulate_transaction(
3333            &self,
3334            request: tonic::Request<super::SimulateTransactionRequest>,
3335        ) -> std::result::Result<
3336            tonic::Response<super::SimulateTransactionResponse>,
3337            tonic::Status,
3338        >;
3339    }
3340    #[derive(Debug)]
3341    pub struct LiveDataServiceServer<T> {
3342        inner: Arc<T>,
3343        accept_compression_encodings: EnabledCompressionEncodings,
3344        send_compression_encodings: EnabledCompressionEncodings,
3345        max_decoding_message_size: Option<usize>,
3346        max_encoding_message_size: Option<usize>,
3347    }
3348    impl<T> LiveDataServiceServer<T> {
3349        pub fn new(inner: T) -> Self {
3350            Self::from_arc(Arc::new(inner))
3351        }
3352        pub fn from_arc(inner: Arc<T>) -> Self {
3353            Self {
3354                inner,
3355                accept_compression_encodings: Default::default(),
3356                send_compression_encodings: Default::default(),
3357                max_decoding_message_size: None,
3358                max_encoding_message_size: None,
3359            }
3360        }
3361        pub fn with_interceptor<F>(
3362            inner: T,
3363            interceptor: F,
3364        ) -> InterceptedService<Self, F>
3365        where
3366            F: tonic::service::Interceptor,
3367        {
3368            InterceptedService::new(Self::new(inner), interceptor)
3369        }
3370        /// Enable decompressing requests with the given encoding.
3371        #[must_use]
3372        pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
3373            self.accept_compression_encodings.enable(encoding);
3374            self
3375        }
3376        /// Compress responses with the given encoding, if the client supports it.
3377        #[must_use]
3378        pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
3379            self.send_compression_encodings.enable(encoding);
3380            self
3381        }
3382        /// Limits the maximum size of a decoded message.
3383        ///
3384        /// Default: `4MB`
3385        #[must_use]
3386        pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
3387            self.max_decoding_message_size = Some(limit);
3388            self
3389        }
3390        /// Limits the maximum size of an encoded message.
3391        ///
3392        /// Default: `usize::MAX`
3393        #[must_use]
3394        pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
3395            self.max_encoding_message_size = Some(limit);
3396            self
3397        }
3398    }
3399    impl<T, B> tonic::codegen::Service<http::Request<B>> for LiveDataServiceServer<T>
3400    where
3401        T: LiveDataService,
3402        B: Body + std::marker::Send + 'static,
3403        B::Error: Into<StdError> + std::marker::Send + 'static,
3404    {
3405        type Response = http::Response<tonic::body::Body>;
3406        type Error = std::convert::Infallible;
3407        type Future = BoxFuture<Self::Response, Self::Error>;
3408        fn poll_ready(
3409            &mut self,
3410            _cx: &mut Context<'_>,
3411        ) -> Poll<std::result::Result<(), Self::Error>> {
3412            Poll::Ready(Ok(()))
3413        }
3414        fn call(&mut self, req: http::Request<B>) -> Self::Future {
3415            match req.uri().path() {
3416                "/sui.rpc.v2beta2.LiveDataService/ListDynamicFields" => {
3417                    #[allow(non_camel_case_types)]
3418                    struct ListDynamicFieldsSvc<T: LiveDataService>(pub Arc<T>);
3419                    impl<
3420                        T: LiveDataService,
3421                    > tonic::server::UnaryService<super::ListDynamicFieldsRequest>
3422                    for ListDynamicFieldsSvc<T> {
3423                        type Response = super::ListDynamicFieldsResponse;
3424                        type Future = BoxFuture<
3425                            tonic::Response<Self::Response>,
3426                            tonic::Status,
3427                        >;
3428                        fn call(
3429                            &mut self,
3430                            request: tonic::Request<super::ListDynamicFieldsRequest>,
3431                        ) -> Self::Future {
3432                            let inner = Arc::clone(&self.0);
3433                            let fut = async move {
3434                                <T as LiveDataService>::list_dynamic_fields(&inner, request)
3435                                    .await
3436                            };
3437                            Box::pin(fut)
3438                        }
3439                    }
3440                    let accept_compression_encodings = self.accept_compression_encodings;
3441                    let send_compression_encodings = self.send_compression_encodings;
3442                    let max_decoding_message_size = self.max_decoding_message_size;
3443                    let max_encoding_message_size = self.max_encoding_message_size;
3444                    let inner = self.inner.clone();
3445                    let fut = async move {
3446                        let method = ListDynamicFieldsSvc(inner);
3447                        let codec = tonic::codec::ProstCodec::default();
3448                        let mut grpc = tonic::server::Grpc::new(codec)
3449                            .apply_compression_config(
3450                                accept_compression_encodings,
3451                                send_compression_encodings,
3452                            )
3453                            .apply_max_message_size_config(
3454                                max_decoding_message_size,
3455                                max_encoding_message_size,
3456                            );
3457                        let res = grpc.unary(method, req).await;
3458                        Ok(res)
3459                    };
3460                    Box::pin(fut)
3461                }
3462                "/sui.rpc.v2beta2.LiveDataService/ListOwnedObjects" => {
3463                    #[allow(non_camel_case_types)]
3464                    struct ListOwnedObjectsSvc<T: LiveDataService>(pub Arc<T>);
3465                    impl<
3466                        T: LiveDataService,
3467                    > tonic::server::UnaryService<super::ListOwnedObjectsRequest>
3468                    for ListOwnedObjectsSvc<T> {
3469                        type Response = super::ListOwnedObjectsResponse;
3470                        type Future = BoxFuture<
3471                            tonic::Response<Self::Response>,
3472                            tonic::Status,
3473                        >;
3474                        fn call(
3475                            &mut self,
3476                            request: tonic::Request<super::ListOwnedObjectsRequest>,
3477                        ) -> Self::Future {
3478                            let inner = Arc::clone(&self.0);
3479                            let fut = async move {
3480                                <T as LiveDataService>::list_owned_objects(&inner, request)
3481                                    .await
3482                            };
3483                            Box::pin(fut)
3484                        }
3485                    }
3486                    let accept_compression_encodings = self.accept_compression_encodings;
3487                    let send_compression_encodings = self.send_compression_encodings;
3488                    let max_decoding_message_size = self.max_decoding_message_size;
3489                    let max_encoding_message_size = self.max_encoding_message_size;
3490                    let inner = self.inner.clone();
3491                    let fut = async move {
3492                        let method = ListOwnedObjectsSvc(inner);
3493                        let codec = tonic::codec::ProstCodec::default();
3494                        let mut grpc = tonic::server::Grpc::new(codec)
3495                            .apply_compression_config(
3496                                accept_compression_encodings,
3497                                send_compression_encodings,
3498                            )
3499                            .apply_max_message_size_config(
3500                                max_decoding_message_size,
3501                                max_encoding_message_size,
3502                            );
3503                        let res = grpc.unary(method, req).await;
3504                        Ok(res)
3505                    };
3506                    Box::pin(fut)
3507                }
3508                "/sui.rpc.v2beta2.LiveDataService/GetCoinInfo" => {
3509                    #[allow(non_camel_case_types)]
3510                    struct GetCoinInfoSvc<T: LiveDataService>(pub Arc<T>);
3511                    impl<
3512                        T: LiveDataService,
3513                    > tonic::server::UnaryService<super::GetCoinInfoRequest>
3514                    for GetCoinInfoSvc<T> {
3515                        type Response = super::GetCoinInfoResponse;
3516                        type Future = BoxFuture<
3517                            tonic::Response<Self::Response>,
3518                            tonic::Status,
3519                        >;
3520                        fn call(
3521                            &mut self,
3522                            request: tonic::Request<super::GetCoinInfoRequest>,
3523                        ) -> Self::Future {
3524                            let inner = Arc::clone(&self.0);
3525                            let fut = async move {
3526                                <T as LiveDataService>::get_coin_info(&inner, request).await
3527                            };
3528                            Box::pin(fut)
3529                        }
3530                    }
3531                    let accept_compression_encodings = self.accept_compression_encodings;
3532                    let send_compression_encodings = self.send_compression_encodings;
3533                    let max_decoding_message_size = self.max_decoding_message_size;
3534                    let max_encoding_message_size = self.max_encoding_message_size;
3535                    let inner = self.inner.clone();
3536                    let fut = async move {
3537                        let method = GetCoinInfoSvc(inner);
3538                        let codec = tonic::codec::ProstCodec::default();
3539                        let mut grpc = tonic::server::Grpc::new(codec)
3540                            .apply_compression_config(
3541                                accept_compression_encodings,
3542                                send_compression_encodings,
3543                            )
3544                            .apply_max_message_size_config(
3545                                max_decoding_message_size,
3546                                max_encoding_message_size,
3547                            );
3548                        let res = grpc.unary(method, req).await;
3549                        Ok(res)
3550                    };
3551                    Box::pin(fut)
3552                }
3553                "/sui.rpc.v2beta2.LiveDataService/GetBalance" => {
3554                    #[allow(non_camel_case_types)]
3555                    struct GetBalanceSvc<T: LiveDataService>(pub Arc<T>);
3556                    impl<
3557                        T: LiveDataService,
3558                    > tonic::server::UnaryService<super::GetBalanceRequest>
3559                    for GetBalanceSvc<T> {
3560                        type Response = super::GetBalanceResponse;
3561                        type Future = BoxFuture<
3562                            tonic::Response<Self::Response>,
3563                            tonic::Status,
3564                        >;
3565                        fn call(
3566                            &mut self,
3567                            request: tonic::Request<super::GetBalanceRequest>,
3568                        ) -> Self::Future {
3569                            let inner = Arc::clone(&self.0);
3570                            let fut = async move {
3571                                <T as LiveDataService>::get_balance(&inner, request).await
3572                            };
3573                            Box::pin(fut)
3574                        }
3575                    }
3576                    let accept_compression_encodings = self.accept_compression_encodings;
3577                    let send_compression_encodings = self.send_compression_encodings;
3578                    let max_decoding_message_size = self.max_decoding_message_size;
3579                    let max_encoding_message_size = self.max_encoding_message_size;
3580                    let inner = self.inner.clone();
3581                    let fut = async move {
3582                        let method = GetBalanceSvc(inner);
3583                        let codec = tonic::codec::ProstCodec::default();
3584                        let mut grpc = tonic::server::Grpc::new(codec)
3585                            .apply_compression_config(
3586                                accept_compression_encodings,
3587                                send_compression_encodings,
3588                            )
3589                            .apply_max_message_size_config(
3590                                max_decoding_message_size,
3591                                max_encoding_message_size,
3592                            );
3593                        let res = grpc.unary(method, req).await;
3594                        Ok(res)
3595                    };
3596                    Box::pin(fut)
3597                }
3598                "/sui.rpc.v2beta2.LiveDataService/ListBalances" => {
3599                    #[allow(non_camel_case_types)]
3600                    struct ListBalancesSvc<T: LiveDataService>(pub Arc<T>);
3601                    impl<
3602                        T: LiveDataService,
3603                    > tonic::server::UnaryService<super::ListBalancesRequest>
3604                    for ListBalancesSvc<T> {
3605                        type Response = super::ListBalancesResponse;
3606                        type Future = BoxFuture<
3607                            tonic::Response<Self::Response>,
3608                            tonic::Status,
3609                        >;
3610                        fn call(
3611                            &mut self,
3612                            request: tonic::Request<super::ListBalancesRequest>,
3613                        ) -> Self::Future {
3614                            let inner = Arc::clone(&self.0);
3615                            let fut = async move {
3616                                <T as LiveDataService>::list_balances(&inner, request).await
3617                            };
3618                            Box::pin(fut)
3619                        }
3620                    }
3621                    let accept_compression_encodings = self.accept_compression_encodings;
3622                    let send_compression_encodings = self.send_compression_encodings;
3623                    let max_decoding_message_size = self.max_decoding_message_size;
3624                    let max_encoding_message_size = self.max_encoding_message_size;
3625                    let inner = self.inner.clone();
3626                    let fut = async move {
3627                        let method = ListBalancesSvc(inner);
3628                        let codec = tonic::codec::ProstCodec::default();
3629                        let mut grpc = tonic::server::Grpc::new(codec)
3630                            .apply_compression_config(
3631                                accept_compression_encodings,
3632                                send_compression_encodings,
3633                            )
3634                            .apply_max_message_size_config(
3635                                max_decoding_message_size,
3636                                max_encoding_message_size,
3637                            );
3638                        let res = grpc.unary(method, req).await;
3639                        Ok(res)
3640                    };
3641                    Box::pin(fut)
3642                }
3643                "/sui.rpc.v2beta2.LiveDataService/SimulateTransaction" => {
3644                    #[allow(non_camel_case_types)]
3645                    struct SimulateTransactionSvc<T: LiveDataService>(pub Arc<T>);
3646                    impl<
3647                        T: LiveDataService,
3648                    > tonic::server::UnaryService<super::SimulateTransactionRequest>
3649                    for SimulateTransactionSvc<T> {
3650                        type Response = super::SimulateTransactionResponse;
3651                        type Future = BoxFuture<
3652                            tonic::Response<Self::Response>,
3653                            tonic::Status,
3654                        >;
3655                        fn call(
3656                            &mut self,
3657                            request: tonic::Request<super::SimulateTransactionRequest>,
3658                        ) -> Self::Future {
3659                            let inner = Arc::clone(&self.0);
3660                            let fut = async move {
3661                                <T as LiveDataService>::simulate_transaction(
3662                                        &inner,
3663                                        request,
3664                                    )
3665                                    .await
3666                            };
3667                            Box::pin(fut)
3668                        }
3669                    }
3670                    let accept_compression_encodings = self.accept_compression_encodings;
3671                    let send_compression_encodings = self.send_compression_encodings;
3672                    let max_decoding_message_size = self.max_decoding_message_size;
3673                    let max_encoding_message_size = self.max_encoding_message_size;
3674                    let inner = self.inner.clone();
3675                    let fut = async move {
3676                        let method = SimulateTransactionSvc(inner);
3677                        let codec = tonic::codec::ProstCodec::default();
3678                        let mut grpc = tonic::server::Grpc::new(codec)
3679                            .apply_compression_config(
3680                                accept_compression_encodings,
3681                                send_compression_encodings,
3682                            )
3683                            .apply_max_message_size_config(
3684                                max_decoding_message_size,
3685                                max_encoding_message_size,
3686                            );
3687                        let res = grpc.unary(method, req).await;
3688                        Ok(res)
3689                    };
3690                    Box::pin(fut)
3691                }
3692                _ => {
3693                    Box::pin(async move {
3694                        let mut response = http::Response::new(
3695                            tonic::body::Body::default(),
3696                        );
3697                        let headers = response.headers_mut();
3698                        headers
3699                            .insert(
3700                                tonic::Status::GRPC_STATUS,
3701                                (tonic::Code::Unimplemented as i32).into(),
3702                            );
3703                        headers
3704                            .insert(
3705                                http::header::CONTENT_TYPE,
3706                                tonic::metadata::GRPC_CONTENT_TYPE,
3707                            );
3708                        Ok(response)
3709                    })
3710                }
3711            }
3712        }
3713    }
3714    impl<T> Clone for LiveDataServiceServer<T> {
3715        fn clone(&self) -> Self {
3716            let inner = self.inner.clone();
3717            Self {
3718                inner,
3719                accept_compression_encodings: self.accept_compression_encodings,
3720                send_compression_encodings: self.send_compression_encodings,
3721                max_decoding_message_size: self.max_decoding_message_size,
3722                max_encoding_message_size: self.max_encoding_message_size,
3723            }
3724        }
3725    }
3726    /// Generated gRPC service name
3727    pub const SERVICE_NAME: &str = "sui.rpc.v2beta2.LiveDataService";
3728    impl<T> tonic::server::NamedService for LiveDataServiceServer<T> {
3729        const NAME: &'static str = SERVICE_NAME;
3730    }
3731}
3732/// A Move Package
3733#[non_exhaustive]
3734#[derive(Clone, PartialEq, ::prost::Message)]
3735pub struct Package {
3736    /// The PackageId of this package
3737    ///
3738    /// A package's `storage_id` is the Sui ObjectId of the package on-chain.
3739    /// Outside of system packages the `storage_id` for every package version is
3740    /// different.
3741    #[prost(string, optional, tag = "1")]
3742    pub storage_id: ::core::option::Option<::prost::alloc::string::String>,
3743    /// The PackageId of the first published version of this package.
3744    ///
3745    /// A package's `original_id` (sometimes also called its `runtime_id`) is the
3746    /// `storage_id` of the first version of this package that has been published.
3747    /// The `original_id`/`runtime_id` is stable across all versions of the
3748    /// package and does not ever change.
3749    #[prost(string, optional, tag = "2")]
3750    pub original_id: ::core::option::Option<::prost::alloc::string::String>,
3751    /// The version of this package
3752    #[prost(uint64, optional, tag = "3")]
3753    pub version: ::core::option::Option<u64>,
3754    /// The modules defined by this package
3755    #[prost(message, repeated, tag = "4")]
3756    pub modules: ::prost::alloc::vec::Vec<Module>,
3757    /// List of datatype origins for mapping datatypes to a package version where
3758    /// it was first defined
3759    #[prost(message, repeated, tag = "5")]
3760    pub type_origins: ::prost::alloc::vec::Vec<TypeOrigin>,
3761    /// The package's transitive dependencies as a mapping from the package's
3762    /// runtime Id (the Id it is referred to by in other packages) to its
3763    /// storage Id (the Id it is loaded from on chain).
3764    #[prost(message, repeated, tag = "6")]
3765    pub linkage: ::prost::alloc::vec::Vec<Linkage>,
3766}
3767/// A Move Module.
3768#[non_exhaustive]
3769#[derive(Clone, PartialEq, ::prost::Message)]
3770pub struct Module {
3771    /// Name of this module.
3772    #[prost(string, optional, tag = "1")]
3773    pub name: ::core::option::Option<::prost::alloc::string::String>,
3774    /// Serialized bytecode of the module.
3775    #[prost(bytes = "bytes", optional, tag = "2")]
3776    pub contents: ::core::option::Option<::prost::bytes::Bytes>,
3777    /// List of DataTypes defined by this module.
3778    #[prost(message, repeated, tag = "3")]
3779    pub datatypes: ::prost::alloc::vec::Vec<DatatypeDescriptor>,
3780    /// List of Functions defined by this module.
3781    #[prost(message, repeated, tag = "4")]
3782    pub functions: ::prost::alloc::vec::Vec<FunctionDescriptor>,
3783}
3784/// Describes a Move Datatype.
3785#[non_exhaustive]
3786#[derive(Clone, PartialEq, ::prost::Message)]
3787pub struct DatatypeDescriptor {
3788    /// Fully qualified name of this Datatype.
3789    ///
3790    /// This is `<defining_id>::<module>::<name>`
3791    #[prost(string, optional, tag = "1")]
3792    pub type_name: ::core::option::Option<::prost::alloc::string::String>,
3793    /// PackageId of the package where this Datatype is defined.
3794    ///
3795    /// A type's `defining_id` is the `storage_id` of the package version that first introduced or added that type.
3796    #[prost(string, optional, tag = "2")]
3797    pub defining_id: ::core::option::Option<::prost::alloc::string::String>,
3798    /// Name of the module where this Datatype is defined
3799    #[prost(string, optional, tag = "3")]
3800    pub module: ::core::option::Option<::prost::alloc::string::String>,
3801    /// Name of this Datatype
3802    #[prost(string, optional, tag = "4")]
3803    pub name: ::core::option::Option<::prost::alloc::string::String>,
3804    /// This type's abilities
3805    #[prost(enumeration = "Ability", repeated, tag = "5")]
3806    pub abilities: ::prost::alloc::vec::Vec<i32>,
3807    /// Ability constraints and phantom status for this type's generic type parameters
3808    #[prost(message, repeated, tag = "6")]
3809    pub type_parameters: ::prost::alloc::vec::Vec<TypeParameter>,
3810    /// Indicates whether this datatype is a 'STRUCT' or an 'ENUM'
3811    #[prost(enumeration = "datatype_descriptor::DatatypeKind", optional, tag = "7")]
3812    pub kind: ::core::option::Option<i32>,
3813    /// Set of fields if this Datatype is a struct.
3814    ///
3815    /// The order of the entries is the order of how the fields are defined.
3816    #[prost(message, repeated, tag = "8")]
3817    pub fields: ::prost::alloc::vec::Vec<FieldDescriptor>,
3818    /// Set of variants if this Datatype is an enum.
3819    ///
3820    /// The order of the entries is the order of how the variants are defined.
3821    #[prost(message, repeated, tag = "9")]
3822    pub variants: ::prost::alloc::vec::Vec<VariantDescriptor>,
3823}
3824/// Nested message and enum types in `DatatypeDescriptor`.
3825pub mod datatype_descriptor {
3826    #[non_exhaustive]
3827    #[derive(
3828        Clone,
3829        Copy,
3830        Debug,
3831        PartialEq,
3832        Eq,
3833        Hash,
3834        PartialOrd,
3835        Ord,
3836        ::prost::Enumeration
3837    )]
3838    #[repr(i32)]
3839    pub enum DatatypeKind {
3840        Unknown = 0,
3841        Struct = 1,
3842        Enum = 2,
3843    }
3844    impl DatatypeKind {
3845        /// String value of the enum field names used in the ProtoBuf definition.
3846        ///
3847        /// The values are not transformed in any way and thus are considered stable
3848        /// (if the ProtoBuf definition does not change) and safe for programmatic use.
3849        pub fn as_str_name(&self) -> &'static str {
3850            match self {
3851                Self::Unknown => "DATATYPE_KIND_UNKNOWN",
3852                Self::Struct => "STRUCT",
3853                Self::Enum => "ENUM",
3854            }
3855        }
3856        /// Creates an enum from field names used in the ProtoBuf definition.
3857        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
3858            match value {
3859                "DATATYPE_KIND_UNKNOWN" => Some(Self::Unknown),
3860                "STRUCT" => Some(Self::Struct),
3861                "ENUM" => Some(Self::Enum),
3862                _ => None,
3863            }
3864        }
3865    }
3866}
3867/// A generic type parameter used in the declaration of a struct or enum.
3868#[non_exhaustive]
3869#[derive(Clone, PartialEq, ::prost::Message)]
3870pub struct TypeParameter {
3871    /// The type parameter constraints
3872    #[prost(enumeration = "Ability", repeated, tag = "1")]
3873    pub constraints: ::prost::alloc::vec::Vec<i32>,
3874    /// Whether the parameter is declared as phantom
3875    #[prost(bool, optional, tag = "2")]
3876    pub is_phantom: ::core::option::Option<bool>,
3877}
3878/// Descriptor of a field that belongs to a struct or enum variant
3879#[non_exhaustive]
3880#[derive(Clone, PartialEq, ::prost::Message)]
3881pub struct FieldDescriptor {
3882    /// Name of the field
3883    #[prost(string, optional, tag = "1")]
3884    pub name: ::core::option::Option<::prost::alloc::string::String>,
3885    /// Order or position of the field in the struct or enum variant definition.
3886    #[prost(uint32, optional, tag = "2")]
3887    pub position: ::core::option::Option<u32>,
3888    /// The type of the field
3889    #[prost(message, optional, tag = "3")]
3890    pub r#type: ::core::option::Option<OpenSignatureBody>,
3891}
3892/// Descriptor of an enum variant
3893#[non_exhaustive]
3894#[derive(Clone, PartialEq, ::prost::Message)]
3895pub struct VariantDescriptor {
3896    /// Name of the variant
3897    #[prost(string, optional, tag = "1")]
3898    pub name: ::core::option::Option<::prost::alloc::string::String>,
3899    /// Order or position of the variant in the enum definition.
3900    #[prost(uint32, optional, tag = "2")]
3901    pub position: ::core::option::Option<u32>,
3902    /// Set of fields defined by this variant.
3903    #[prost(message, repeated, tag = "3")]
3904    pub fields: ::prost::alloc::vec::Vec<FieldDescriptor>,
3905}
3906/// Representation of a type signature that could appear as a field type for a struct or enum
3907#[non_exhaustive]
3908#[derive(Clone, PartialEq, ::prost::Message)]
3909pub struct OpenSignatureBody {
3910    /// Type of this signature
3911    #[prost(enumeration = "open_signature_body::Type", optional, tag = "1")]
3912    pub r#type: ::core::option::Option<i32>,
3913    /// Fully qualified name of the datatype when `type` is `DATATYPE`
3914    #[prost(string, optional, tag = "2")]
3915    pub type_name: ::core::option::Option<::prost::alloc::string::String>,
3916    /// Set when `type` is `VECTOR` or `DATATYPE`
3917    #[prost(message, repeated, tag = "3")]
3918    pub type_parameter_instantiation: ::prost::alloc::vec::Vec<OpenSignatureBody>,
3919    /// Position of the type parameter as defined in the containing data type descriptor when `type` is `TYPE_PARAMETER`
3920    #[prost(uint32, optional, tag = "4")]
3921    pub type_parameter: ::core::option::Option<u32>,
3922}
3923/// Nested message and enum types in `OpenSignatureBody`.
3924pub mod open_signature_body {
3925    #[non_exhaustive]
3926    #[derive(
3927        Clone,
3928        Copy,
3929        Debug,
3930        PartialEq,
3931        Eq,
3932        Hash,
3933        PartialOrd,
3934        Ord,
3935        ::prost::Enumeration
3936    )]
3937    #[repr(i32)]
3938    pub enum Type {
3939        Unknown = 0,
3940        Address = 1,
3941        Bool = 2,
3942        U8 = 3,
3943        U16 = 4,
3944        U32 = 5,
3945        U64 = 6,
3946        U128 = 7,
3947        U256 = 8,
3948        Vector = 9,
3949        Datatype = 10,
3950        Parameter = 11,
3951    }
3952    impl Type {
3953        /// String value of the enum field names used in the ProtoBuf definition.
3954        ///
3955        /// The values are not transformed in any way and thus are considered stable
3956        /// (if the ProtoBuf definition does not change) and safe for programmatic use.
3957        pub fn as_str_name(&self) -> &'static str {
3958            match self {
3959                Self::Unknown => "TYPE_UNKNOWN",
3960                Self::Address => "ADDRESS",
3961                Self::Bool => "BOOL",
3962                Self::U8 => "U8",
3963                Self::U16 => "U16",
3964                Self::U32 => "U32",
3965                Self::U64 => "U64",
3966                Self::U128 => "U128",
3967                Self::U256 => "U256",
3968                Self::Vector => "VECTOR",
3969                Self::Datatype => "DATATYPE",
3970                Self::Parameter => "TYPE_PARAMETER",
3971            }
3972        }
3973        /// Creates an enum from field names used in the ProtoBuf definition.
3974        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
3975            match value {
3976                "TYPE_UNKNOWN" => Some(Self::Unknown),
3977                "ADDRESS" => Some(Self::Address),
3978                "BOOL" => Some(Self::Bool),
3979                "U8" => Some(Self::U8),
3980                "U16" => Some(Self::U16),
3981                "U32" => Some(Self::U32),
3982                "U64" => Some(Self::U64),
3983                "U128" => Some(Self::U128),
3984                "U256" => Some(Self::U256),
3985                "VECTOR" => Some(Self::Vector),
3986                "DATATYPE" => Some(Self::Datatype),
3987                "TYPE_PARAMETER" => Some(Self::Parameter),
3988                _ => None,
3989            }
3990        }
3991    }
3992}
3993/// Descriptor of a Move function
3994#[non_exhaustive]
3995#[derive(Clone, PartialEq, ::prost::Message)]
3996pub struct FunctionDescriptor {
3997    /// Name of the function
3998    #[prost(string, optional, tag = "1")]
3999    pub name: ::core::option::Option<::prost::alloc::string::String>,
4000    /// Whether the function is `public`, `private` or `public(friend)`
4001    #[prost(enumeration = "function_descriptor::Visibility", optional, tag = "5")]
4002    pub visibility: ::core::option::Option<i32>,
4003    /// Whether the function is marked `entry` or not.
4004    #[prost(bool, optional, tag = "6")]
4005    pub is_entry: ::core::option::Option<bool>,
4006    /// Ability constraints for type parameters
4007    #[prost(message, repeated, tag = "7")]
4008    pub type_parameters: ::prost::alloc::vec::Vec<TypeParameter>,
4009    /// Formal parameter types.
4010    #[prost(message, repeated, tag = "8")]
4011    pub parameters: ::prost::alloc::vec::Vec<OpenSignature>,
4012    /// Return types.
4013    #[prost(message, repeated, tag = "9")]
4014    pub returns: ::prost::alloc::vec::Vec<OpenSignature>,
4015}
4016/// Nested message and enum types in `FunctionDescriptor`.
4017pub mod function_descriptor {
4018    #[non_exhaustive]
4019    #[derive(
4020        Clone,
4021        Copy,
4022        Debug,
4023        PartialEq,
4024        Eq,
4025        Hash,
4026        PartialOrd,
4027        Ord,
4028        ::prost::Enumeration
4029    )]
4030    #[repr(i32)]
4031    pub enum Visibility {
4032        Unknown = 0,
4033        Private = 1,
4034        Public = 2,
4035        Friend = 3,
4036    }
4037    impl Visibility {
4038        /// String value of the enum field names used in the ProtoBuf definition.
4039        ///
4040        /// The values are not transformed in any way and thus are considered stable
4041        /// (if the ProtoBuf definition does not change) and safe for programmatic use.
4042        pub fn as_str_name(&self) -> &'static str {
4043            match self {
4044                Self::Unknown => "VISIBILITY_UNKNOWN",
4045                Self::Private => "PRIVATE",
4046                Self::Public => "PUBLIC",
4047                Self::Friend => "FRIEND",
4048            }
4049        }
4050        /// Creates an enum from field names used in the ProtoBuf definition.
4051        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
4052            match value {
4053                "VISIBILITY_UNKNOWN" => Some(Self::Unknown),
4054                "PRIVATE" => Some(Self::Private),
4055                "PUBLIC" => Some(Self::Public),
4056                "FRIEND" => Some(Self::Friend),
4057                _ => None,
4058            }
4059        }
4060    }
4061}
4062/// Representation of a type signature that could appear as a function parameter or return value.
4063#[non_exhaustive]
4064#[derive(Clone, PartialEq, ::prost::Message)]
4065pub struct OpenSignature {
4066    #[prost(enumeration = "open_signature::Reference", optional, tag = "1")]
4067    pub reference: ::core::option::Option<i32>,
4068    #[prost(message, optional, tag = "2")]
4069    pub body: ::core::option::Option<OpenSignatureBody>,
4070}
4071/// Nested message and enum types in `OpenSignature`.
4072pub mod open_signature {
4073    #[non_exhaustive]
4074    #[derive(
4075        Clone,
4076        Copy,
4077        Debug,
4078        PartialEq,
4079        Eq,
4080        Hash,
4081        PartialOrd,
4082        Ord,
4083        ::prost::Enumeration
4084    )]
4085    #[repr(i32)]
4086    pub enum Reference {
4087        Unknown = 0,
4088        Immutable = 1,
4089        Mutable = 2,
4090    }
4091    impl Reference {
4092        /// String value of the enum field names used in the ProtoBuf definition.
4093        ///
4094        /// The values are not transformed in any way and thus are considered stable
4095        /// (if the ProtoBuf definition does not change) and safe for programmatic use.
4096        pub fn as_str_name(&self) -> &'static str {
4097            match self {
4098                Self::Unknown => "REFERENCE_UNKNOWN",
4099                Self::Immutable => "IMMUTABLE",
4100                Self::Mutable => "MUTABLE",
4101            }
4102        }
4103        /// Creates an enum from field names used in the ProtoBuf definition.
4104        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
4105            match value {
4106                "REFERENCE_UNKNOWN" => Some(Self::Unknown),
4107                "IMMUTABLE" => Some(Self::Immutable),
4108                "MUTABLE" => Some(Self::Mutable),
4109                _ => None,
4110            }
4111        }
4112    }
4113}
4114/// Identifies a struct and the module it was defined in.
4115#[non_exhaustive]
4116#[derive(Clone, PartialEq, ::prost::Message)]
4117pub struct TypeOrigin {
4118    #[prost(string, optional, tag = "1")]
4119    pub module_name: ::core::option::Option<::prost::alloc::string::String>,
4120    #[prost(string, optional, tag = "2")]
4121    pub datatype_name: ::core::option::Option<::prost::alloc::string::String>,
4122    #[prost(string, optional, tag = "3")]
4123    pub package_id: ::core::option::Option<::prost::alloc::string::String>,
4124}
4125/// Upgraded package info for the linkage table.
4126#[non_exhaustive]
4127#[derive(Clone, PartialEq, ::prost::Message)]
4128pub struct Linkage {
4129    /// Id of the original package.
4130    #[prost(string, optional, tag = "1")]
4131    pub original_id: ::core::option::Option<::prost::alloc::string::String>,
4132    /// Id of the upgraded package.
4133    #[prost(string, optional, tag = "2")]
4134    pub upgraded_id: ::core::option::Option<::prost::alloc::string::String>,
4135    /// Version of the upgraded package.
4136    #[prost(uint64, optional, tag = "3")]
4137    pub upgraded_version: ::core::option::Option<u64>,
4138}
4139/// An `Ability` classifies what operations are permitted for a given type
4140#[non_exhaustive]
4141#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
4142#[repr(i32)]
4143pub enum Ability {
4144    Unknown = 0,
4145    /// Allows values of types with this ability to be copied
4146    Copy = 1,
4147    /// Allows values of types with this ability to be dropped.
4148    Drop = 2,
4149    /// Allows values of types with this ability to exist inside a struct in global storage
4150    Store = 3,
4151    /// Allows the type to serve as a key for global storage operations
4152    Key = 4,
4153}
4154impl Ability {
4155    /// String value of the enum field names used in the ProtoBuf definition.
4156    ///
4157    /// The values are not transformed in any way and thus are considered stable
4158    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
4159    pub fn as_str_name(&self) -> &'static str {
4160        match self {
4161            Self::Unknown => "ABILITY_UNKNOWN",
4162            Self::Copy => "COPY",
4163            Self::Drop => "DROP",
4164            Self::Store => "STORE",
4165            Self::Key => "KEY",
4166        }
4167    }
4168    /// Creates an enum from field names used in the ProtoBuf definition.
4169    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
4170        match value {
4171            "ABILITY_UNKNOWN" => Some(Self::Unknown),
4172            "COPY" => Some(Self::Copy),
4173            "DROP" => Some(Self::Drop),
4174            "STORE" => Some(Self::Store),
4175            "KEY" => Some(Self::Key),
4176            _ => None,
4177        }
4178    }
4179}
4180#[non_exhaustive]
4181#[derive(Clone, PartialEq, ::prost::Message)]
4182pub struct GetPackageRequest {
4183    /// Required. The `storage_id` of the requested package.
4184    #[prost(string, optional, tag = "1")]
4185    pub package_id: ::core::option::Option<::prost::alloc::string::String>,
4186}
4187#[non_exhaustive]
4188#[derive(Clone, PartialEq, ::prost::Message)]
4189pub struct GetPackageResponse {
4190    /// The package.
4191    #[prost(message, optional, tag = "1")]
4192    pub package: ::core::option::Option<Package>,
4193}
4194#[non_exhaustive]
4195#[derive(Clone, PartialEq, ::prost::Message)]
4196pub struct GetDatatypeRequest {
4197    /// Required. The `storage_id` of the requested package.
4198    #[prost(string, optional, tag = "1")]
4199    pub package_id: ::core::option::Option<::prost::alloc::string::String>,
4200    /// Required. The name of the requested module.
4201    #[prost(string, optional, tag = "2")]
4202    pub module_name: ::core::option::Option<::prost::alloc::string::String>,
4203    /// Required. The name of the requested datatype.
4204    #[prost(string, optional, tag = "3")]
4205    pub name: ::core::option::Option<::prost::alloc::string::String>,
4206}
4207#[non_exhaustive]
4208#[derive(Clone, PartialEq, ::prost::Message)]
4209pub struct GetDatatypeResponse {
4210    /// The datatype.
4211    #[prost(message, optional, tag = "1")]
4212    pub datatype: ::core::option::Option<DatatypeDescriptor>,
4213}
4214#[non_exhaustive]
4215#[derive(Clone, PartialEq, ::prost::Message)]
4216pub struct GetFunctionRequest {
4217    /// Required. The `storage_id` of the requested package.
4218    #[prost(string, optional, tag = "1")]
4219    pub package_id: ::core::option::Option<::prost::alloc::string::String>,
4220    /// Required. The name of the requested module.
4221    #[prost(string, optional, tag = "2")]
4222    pub module_name: ::core::option::Option<::prost::alloc::string::String>,
4223    /// Required. The name of the requested function.
4224    #[prost(string, optional, tag = "3")]
4225    pub name: ::core::option::Option<::prost::alloc::string::String>,
4226}
4227#[non_exhaustive]
4228#[derive(Clone, PartialEq, ::prost::Message)]
4229pub struct GetFunctionResponse {
4230    /// The function.
4231    #[prost(message, optional, tag = "1")]
4232    pub function: ::core::option::Option<FunctionDescriptor>,
4233}
4234#[non_exhaustive]
4235#[derive(Clone, PartialEq, ::prost::Message)]
4236pub struct ListPackageVersionsRequest {
4237    /// Required. The `storage_id` of any version of the package.
4238    #[prost(string, optional, tag = "1")]
4239    pub package_id: ::core::option::Option<::prost::alloc::string::String>,
4240    /// The maximum number of versions to return. The service may return fewer than this value.
4241    /// If unspecified, at most `1000` entries will be returned.
4242    /// The maximum value is `10000`; values above `10000` will be coerced to `10000`.
4243    #[prost(uint32, optional, tag = "2")]
4244    pub page_size: ::core::option::Option<u32>,
4245    /// A page token, received from a previous `ListPackageVersions` call.
4246    /// Provide this to retrieve the subsequent page.
4247    ///
4248    /// When paginating, all other parameters provided to `ListPackageVersions` must
4249    /// match the call that provided the page token.
4250    #[prost(bytes = "bytes", optional, tag = "3")]
4251    pub page_token: ::core::option::Option<::prost::bytes::Bytes>,
4252}
4253#[non_exhaustive]
4254#[derive(Clone, PartialEq, ::prost::Message)]
4255pub struct ListPackageVersionsResponse {
4256    /// List of all package versions, ordered by version.
4257    #[prost(message, repeated, tag = "1")]
4258    pub versions: ::prost::alloc::vec::Vec<PackageVersion>,
4259    /// A token, which can be sent as `page_token` to retrieve the next page.
4260    /// If this field is omitted, there are no subsequent pages.
4261    #[prost(bytes = "bytes", optional, tag = "2")]
4262    pub next_page_token: ::core::option::Option<::prost::bytes::Bytes>,
4263}
4264/// A simplified representation of a package version
4265#[non_exhaustive]
4266#[derive(Clone, PartialEq, ::prost::Message)]
4267pub struct PackageVersion {
4268    /// The storage ID of this package version
4269    #[prost(string, optional, tag = "1")]
4270    pub package_id: ::core::option::Option<::prost::alloc::string::String>,
4271    /// The version number
4272    #[prost(uint64, optional, tag = "2")]
4273    pub version: ::core::option::Option<u64>,
4274}
4275/// Generated client implementations.
4276pub mod move_package_service_client {
4277    #![allow(
4278        unused_variables,
4279        dead_code,
4280        missing_docs,
4281        clippy::wildcard_imports,
4282        clippy::let_unit_value,
4283    )]
4284    use tonic::codegen::*;
4285    use tonic::codegen::http::Uri;
4286    #[derive(Debug, Clone)]
4287    pub struct MovePackageServiceClient<T> {
4288        inner: tonic::client::Grpc<T>,
4289    }
4290    impl MovePackageServiceClient<tonic::transport::Channel> {
4291        /// Attempt to create a new client by connecting to a given endpoint.
4292        pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
4293        where
4294            D: TryInto<tonic::transport::Endpoint>,
4295            D::Error: Into<StdError>,
4296        {
4297            let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
4298            Ok(Self::new(conn))
4299        }
4300    }
4301    impl<T> MovePackageServiceClient<T>
4302    where
4303        T: tonic::client::GrpcService<tonic::body::Body>,
4304        T::Error: Into<StdError>,
4305        T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static,
4306        <T::ResponseBody as Body>::Error: Into<StdError> + std::marker::Send,
4307    {
4308        pub fn new(inner: T) -> Self {
4309            let inner = tonic::client::Grpc::new(inner);
4310            Self { inner }
4311        }
4312        pub fn with_origin(inner: T, origin: Uri) -> Self {
4313            let inner = tonic::client::Grpc::with_origin(inner, origin);
4314            Self { inner }
4315        }
4316        pub fn with_interceptor<F>(
4317            inner: T,
4318            interceptor: F,
4319        ) -> MovePackageServiceClient<InterceptedService<T, F>>
4320        where
4321            F: tonic::service::Interceptor,
4322            T::ResponseBody: Default,
4323            T: tonic::codegen::Service<
4324                http::Request<tonic::body::Body>,
4325                Response = http::Response<
4326                    <T as tonic::client::GrpcService<tonic::body::Body>>::ResponseBody,
4327                >,
4328            >,
4329            <T as tonic::codegen::Service<
4330                http::Request<tonic::body::Body>,
4331            >>::Error: Into<StdError> + std::marker::Send + std::marker::Sync,
4332        {
4333            MovePackageServiceClient::new(InterceptedService::new(inner, interceptor))
4334        }
4335        /// Compress requests with the given encoding.
4336        ///
4337        /// This requires the server to support it otherwise it might respond with an
4338        /// error.
4339        #[must_use]
4340        pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
4341            self.inner = self.inner.send_compressed(encoding);
4342            self
4343        }
4344        /// Enable decompressing responses.
4345        #[must_use]
4346        pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
4347            self.inner = self.inner.accept_compressed(encoding);
4348            self
4349        }
4350        /// Limits the maximum size of a decoded message.
4351        ///
4352        /// Default: `4MB`
4353        #[must_use]
4354        pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
4355            self.inner = self.inner.max_decoding_message_size(limit);
4356            self
4357        }
4358        /// Limits the maximum size of an encoded message.
4359        ///
4360        /// Default: `usize::MAX`
4361        #[must_use]
4362        pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
4363            self.inner = self.inner.max_encoding_message_size(limit);
4364            self
4365        }
4366        pub async fn get_package(
4367            &mut self,
4368            request: impl tonic::IntoRequest<super::GetPackageRequest>,
4369        ) -> std::result::Result<
4370            tonic::Response<super::GetPackageResponse>,
4371            tonic::Status,
4372        > {
4373            self.inner
4374                .ready()
4375                .await
4376                .map_err(|e| {
4377                    tonic::Status::unknown(
4378                        format!("Service was not ready: {}", e.into()),
4379                    )
4380                })?;
4381            let codec = tonic::codec::ProstCodec::default();
4382            let path = http::uri::PathAndQuery::from_static(
4383                "/sui.rpc.v2beta2.MovePackageService/GetPackage",
4384            );
4385            let mut req = request.into_request();
4386            req.extensions_mut()
4387                .insert(
4388                    GrpcMethod::new("sui.rpc.v2beta2.MovePackageService", "GetPackage"),
4389                );
4390            self.inner.unary(req, path, codec).await
4391        }
4392        pub async fn get_datatype(
4393            &mut self,
4394            request: impl tonic::IntoRequest<super::GetDatatypeRequest>,
4395        ) -> std::result::Result<
4396            tonic::Response<super::GetDatatypeResponse>,
4397            tonic::Status,
4398        > {
4399            self.inner
4400                .ready()
4401                .await
4402                .map_err(|e| {
4403                    tonic::Status::unknown(
4404                        format!("Service was not ready: {}", e.into()),
4405                    )
4406                })?;
4407            let codec = tonic::codec::ProstCodec::default();
4408            let path = http::uri::PathAndQuery::from_static(
4409                "/sui.rpc.v2beta2.MovePackageService/GetDatatype",
4410            );
4411            let mut req = request.into_request();
4412            req.extensions_mut()
4413                .insert(
4414                    GrpcMethod::new("sui.rpc.v2beta2.MovePackageService", "GetDatatype"),
4415                );
4416            self.inner.unary(req, path, codec).await
4417        }
4418        pub async fn get_function(
4419            &mut self,
4420            request: impl tonic::IntoRequest<super::GetFunctionRequest>,
4421        ) -> std::result::Result<
4422            tonic::Response<super::GetFunctionResponse>,
4423            tonic::Status,
4424        > {
4425            self.inner
4426                .ready()
4427                .await
4428                .map_err(|e| {
4429                    tonic::Status::unknown(
4430                        format!("Service was not ready: {}", e.into()),
4431                    )
4432                })?;
4433            let codec = tonic::codec::ProstCodec::default();
4434            let path = http::uri::PathAndQuery::from_static(
4435                "/sui.rpc.v2beta2.MovePackageService/GetFunction",
4436            );
4437            let mut req = request.into_request();
4438            req.extensions_mut()
4439                .insert(
4440                    GrpcMethod::new("sui.rpc.v2beta2.MovePackageService", "GetFunction"),
4441                );
4442            self.inner.unary(req, path, codec).await
4443        }
4444        pub async fn list_package_versions(
4445            &mut self,
4446            request: impl tonic::IntoRequest<super::ListPackageVersionsRequest>,
4447        ) -> std::result::Result<
4448            tonic::Response<super::ListPackageVersionsResponse>,
4449            tonic::Status,
4450        > {
4451            self.inner
4452                .ready()
4453                .await
4454                .map_err(|e| {
4455                    tonic::Status::unknown(
4456                        format!("Service was not ready: {}", e.into()),
4457                    )
4458                })?;
4459            let codec = tonic::codec::ProstCodec::default();
4460            let path = http::uri::PathAndQuery::from_static(
4461                "/sui.rpc.v2beta2.MovePackageService/ListPackageVersions",
4462            );
4463            let mut req = request.into_request();
4464            req.extensions_mut()
4465                .insert(
4466                    GrpcMethod::new(
4467                        "sui.rpc.v2beta2.MovePackageService",
4468                        "ListPackageVersions",
4469                    ),
4470                );
4471            self.inner.unary(req, path, codec).await
4472        }
4473    }
4474}
4475/// Generated server implementations.
4476pub mod move_package_service_server {
4477    #![allow(
4478        unused_variables,
4479        dead_code,
4480        missing_docs,
4481        clippy::wildcard_imports,
4482        clippy::let_unit_value,
4483    )]
4484    use tonic::codegen::*;
4485    /// Generated trait containing gRPC methods that should be implemented for use with MovePackageServiceServer.
4486    #[async_trait]
4487    pub trait MovePackageService: std::marker::Send + std::marker::Sync + 'static {
4488        async fn get_package(
4489            &self,
4490            request: tonic::Request<super::GetPackageRequest>,
4491        ) -> std::result::Result<
4492            tonic::Response<super::GetPackageResponse>,
4493            tonic::Status,
4494        >;
4495        async fn get_datatype(
4496            &self,
4497            request: tonic::Request<super::GetDatatypeRequest>,
4498        ) -> std::result::Result<
4499            tonic::Response<super::GetDatatypeResponse>,
4500            tonic::Status,
4501        >;
4502        async fn get_function(
4503            &self,
4504            request: tonic::Request<super::GetFunctionRequest>,
4505        ) -> std::result::Result<
4506            tonic::Response<super::GetFunctionResponse>,
4507            tonic::Status,
4508        >;
4509        async fn list_package_versions(
4510            &self,
4511            request: tonic::Request<super::ListPackageVersionsRequest>,
4512        ) -> std::result::Result<
4513            tonic::Response<super::ListPackageVersionsResponse>,
4514            tonic::Status,
4515        >;
4516    }
4517    #[derive(Debug)]
4518    pub struct MovePackageServiceServer<T> {
4519        inner: Arc<T>,
4520        accept_compression_encodings: EnabledCompressionEncodings,
4521        send_compression_encodings: EnabledCompressionEncodings,
4522        max_decoding_message_size: Option<usize>,
4523        max_encoding_message_size: Option<usize>,
4524    }
4525    impl<T> MovePackageServiceServer<T> {
4526        pub fn new(inner: T) -> Self {
4527            Self::from_arc(Arc::new(inner))
4528        }
4529        pub fn from_arc(inner: Arc<T>) -> Self {
4530            Self {
4531                inner,
4532                accept_compression_encodings: Default::default(),
4533                send_compression_encodings: Default::default(),
4534                max_decoding_message_size: None,
4535                max_encoding_message_size: None,
4536            }
4537        }
4538        pub fn with_interceptor<F>(
4539            inner: T,
4540            interceptor: F,
4541        ) -> InterceptedService<Self, F>
4542        where
4543            F: tonic::service::Interceptor,
4544        {
4545            InterceptedService::new(Self::new(inner), interceptor)
4546        }
4547        /// Enable decompressing requests with the given encoding.
4548        #[must_use]
4549        pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
4550            self.accept_compression_encodings.enable(encoding);
4551            self
4552        }
4553        /// Compress responses with the given encoding, if the client supports it.
4554        #[must_use]
4555        pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
4556            self.send_compression_encodings.enable(encoding);
4557            self
4558        }
4559        /// Limits the maximum size of a decoded message.
4560        ///
4561        /// Default: `4MB`
4562        #[must_use]
4563        pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
4564            self.max_decoding_message_size = Some(limit);
4565            self
4566        }
4567        /// Limits the maximum size of an encoded message.
4568        ///
4569        /// Default: `usize::MAX`
4570        #[must_use]
4571        pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
4572            self.max_encoding_message_size = Some(limit);
4573            self
4574        }
4575    }
4576    impl<T, B> tonic::codegen::Service<http::Request<B>> for MovePackageServiceServer<T>
4577    where
4578        T: MovePackageService,
4579        B: Body + std::marker::Send + 'static,
4580        B::Error: Into<StdError> + std::marker::Send + 'static,
4581    {
4582        type Response = http::Response<tonic::body::Body>;
4583        type Error = std::convert::Infallible;
4584        type Future = BoxFuture<Self::Response, Self::Error>;
4585        fn poll_ready(
4586            &mut self,
4587            _cx: &mut Context<'_>,
4588        ) -> Poll<std::result::Result<(), Self::Error>> {
4589            Poll::Ready(Ok(()))
4590        }
4591        fn call(&mut self, req: http::Request<B>) -> Self::Future {
4592            match req.uri().path() {
4593                "/sui.rpc.v2beta2.MovePackageService/GetPackage" => {
4594                    #[allow(non_camel_case_types)]
4595                    struct GetPackageSvc<T: MovePackageService>(pub Arc<T>);
4596                    impl<
4597                        T: MovePackageService,
4598                    > tonic::server::UnaryService<super::GetPackageRequest>
4599                    for GetPackageSvc<T> {
4600                        type Response = super::GetPackageResponse;
4601                        type Future = BoxFuture<
4602                            tonic::Response<Self::Response>,
4603                            tonic::Status,
4604                        >;
4605                        fn call(
4606                            &mut self,
4607                            request: tonic::Request<super::GetPackageRequest>,
4608                        ) -> Self::Future {
4609                            let inner = Arc::clone(&self.0);
4610                            let fut = async move {
4611                                <T as MovePackageService>::get_package(&inner, request)
4612                                    .await
4613                            };
4614                            Box::pin(fut)
4615                        }
4616                    }
4617                    let accept_compression_encodings = self.accept_compression_encodings;
4618                    let send_compression_encodings = self.send_compression_encodings;
4619                    let max_decoding_message_size = self.max_decoding_message_size;
4620                    let max_encoding_message_size = self.max_encoding_message_size;
4621                    let inner = self.inner.clone();
4622                    let fut = async move {
4623                        let method = GetPackageSvc(inner);
4624                        let codec = tonic::codec::ProstCodec::default();
4625                        let mut grpc = tonic::server::Grpc::new(codec)
4626                            .apply_compression_config(
4627                                accept_compression_encodings,
4628                                send_compression_encodings,
4629                            )
4630                            .apply_max_message_size_config(
4631                                max_decoding_message_size,
4632                                max_encoding_message_size,
4633                            );
4634                        let res = grpc.unary(method, req).await;
4635                        Ok(res)
4636                    };
4637                    Box::pin(fut)
4638                }
4639                "/sui.rpc.v2beta2.MovePackageService/GetDatatype" => {
4640                    #[allow(non_camel_case_types)]
4641                    struct GetDatatypeSvc<T: MovePackageService>(pub Arc<T>);
4642                    impl<
4643                        T: MovePackageService,
4644                    > tonic::server::UnaryService<super::GetDatatypeRequest>
4645                    for GetDatatypeSvc<T> {
4646                        type Response = super::GetDatatypeResponse;
4647                        type Future = BoxFuture<
4648                            tonic::Response<Self::Response>,
4649                            tonic::Status,
4650                        >;
4651                        fn call(
4652                            &mut self,
4653                            request: tonic::Request<super::GetDatatypeRequest>,
4654                        ) -> Self::Future {
4655                            let inner = Arc::clone(&self.0);
4656                            let fut = async move {
4657                                <T as MovePackageService>::get_datatype(&inner, request)
4658                                    .await
4659                            };
4660                            Box::pin(fut)
4661                        }
4662                    }
4663                    let accept_compression_encodings = self.accept_compression_encodings;
4664                    let send_compression_encodings = self.send_compression_encodings;
4665                    let max_decoding_message_size = self.max_decoding_message_size;
4666                    let max_encoding_message_size = self.max_encoding_message_size;
4667                    let inner = self.inner.clone();
4668                    let fut = async move {
4669                        let method = GetDatatypeSvc(inner);
4670                        let codec = tonic::codec::ProstCodec::default();
4671                        let mut grpc = tonic::server::Grpc::new(codec)
4672                            .apply_compression_config(
4673                                accept_compression_encodings,
4674                                send_compression_encodings,
4675                            )
4676                            .apply_max_message_size_config(
4677                                max_decoding_message_size,
4678                                max_encoding_message_size,
4679                            );
4680                        let res = grpc.unary(method, req).await;
4681                        Ok(res)
4682                    };
4683                    Box::pin(fut)
4684                }
4685                "/sui.rpc.v2beta2.MovePackageService/GetFunction" => {
4686                    #[allow(non_camel_case_types)]
4687                    struct GetFunctionSvc<T: MovePackageService>(pub Arc<T>);
4688                    impl<
4689                        T: MovePackageService,
4690                    > tonic::server::UnaryService<super::GetFunctionRequest>
4691                    for GetFunctionSvc<T> {
4692                        type Response = super::GetFunctionResponse;
4693                        type Future = BoxFuture<
4694                            tonic::Response<Self::Response>,
4695                            tonic::Status,
4696                        >;
4697                        fn call(
4698                            &mut self,
4699                            request: tonic::Request<super::GetFunctionRequest>,
4700                        ) -> Self::Future {
4701                            let inner = Arc::clone(&self.0);
4702                            let fut = async move {
4703                                <T as MovePackageService>::get_function(&inner, request)
4704                                    .await
4705                            };
4706                            Box::pin(fut)
4707                        }
4708                    }
4709                    let accept_compression_encodings = self.accept_compression_encodings;
4710                    let send_compression_encodings = self.send_compression_encodings;
4711                    let max_decoding_message_size = self.max_decoding_message_size;
4712                    let max_encoding_message_size = self.max_encoding_message_size;
4713                    let inner = self.inner.clone();
4714                    let fut = async move {
4715                        let method = GetFunctionSvc(inner);
4716                        let codec = tonic::codec::ProstCodec::default();
4717                        let mut grpc = tonic::server::Grpc::new(codec)
4718                            .apply_compression_config(
4719                                accept_compression_encodings,
4720                                send_compression_encodings,
4721                            )
4722                            .apply_max_message_size_config(
4723                                max_decoding_message_size,
4724                                max_encoding_message_size,
4725                            );
4726                        let res = grpc.unary(method, req).await;
4727                        Ok(res)
4728                    };
4729                    Box::pin(fut)
4730                }
4731                "/sui.rpc.v2beta2.MovePackageService/ListPackageVersions" => {
4732                    #[allow(non_camel_case_types)]
4733                    struct ListPackageVersionsSvc<T: MovePackageService>(pub Arc<T>);
4734                    impl<
4735                        T: MovePackageService,
4736                    > tonic::server::UnaryService<super::ListPackageVersionsRequest>
4737                    for ListPackageVersionsSvc<T> {
4738                        type Response = super::ListPackageVersionsResponse;
4739                        type Future = BoxFuture<
4740                            tonic::Response<Self::Response>,
4741                            tonic::Status,
4742                        >;
4743                        fn call(
4744                            &mut self,
4745                            request: tonic::Request<super::ListPackageVersionsRequest>,
4746                        ) -> Self::Future {
4747                            let inner = Arc::clone(&self.0);
4748                            let fut = async move {
4749                                <T as MovePackageService>::list_package_versions(
4750                                        &inner,
4751                                        request,
4752                                    )
4753                                    .await
4754                            };
4755                            Box::pin(fut)
4756                        }
4757                    }
4758                    let accept_compression_encodings = self.accept_compression_encodings;
4759                    let send_compression_encodings = self.send_compression_encodings;
4760                    let max_decoding_message_size = self.max_decoding_message_size;
4761                    let max_encoding_message_size = self.max_encoding_message_size;
4762                    let inner = self.inner.clone();
4763                    let fut = async move {
4764                        let method = ListPackageVersionsSvc(inner);
4765                        let codec = tonic::codec::ProstCodec::default();
4766                        let mut grpc = tonic::server::Grpc::new(codec)
4767                            .apply_compression_config(
4768                                accept_compression_encodings,
4769                                send_compression_encodings,
4770                            )
4771                            .apply_max_message_size_config(
4772                                max_decoding_message_size,
4773                                max_encoding_message_size,
4774                            );
4775                        let res = grpc.unary(method, req).await;
4776                        Ok(res)
4777                    };
4778                    Box::pin(fut)
4779                }
4780                _ => {
4781                    Box::pin(async move {
4782                        let mut response = http::Response::new(
4783                            tonic::body::Body::default(),
4784                        );
4785                        let headers = response.headers_mut();
4786                        headers
4787                            .insert(
4788                                tonic::Status::GRPC_STATUS,
4789                                (tonic::Code::Unimplemented as i32).into(),
4790                            );
4791                        headers
4792                            .insert(
4793                                http::header::CONTENT_TYPE,
4794                                tonic::metadata::GRPC_CONTENT_TYPE,
4795                            );
4796                        Ok(response)
4797                    })
4798                }
4799            }
4800        }
4801    }
4802    impl<T> Clone for MovePackageServiceServer<T> {
4803        fn clone(&self) -> Self {
4804            let inner = self.inner.clone();
4805            Self {
4806                inner,
4807                accept_compression_encodings: self.accept_compression_encodings,
4808                send_compression_encodings: self.send_compression_encodings,
4809                max_decoding_message_size: self.max_decoding_message_size,
4810                max_encoding_message_size: self.max_encoding_message_size,
4811            }
4812        }
4813    }
4814    /// Generated gRPC service name
4815    pub const SERVICE_NAME: &str = "sui.rpc.v2beta2.MovePackageService";
4816    impl<T> tonic::server::NamedService for MovePackageServiceServer<T> {
4817        const NAME: &'static str = SERVICE_NAME;
4818    }
4819}
4820#[non_exhaustive]
4821#[derive(Clone, PartialEq, ::prost::Message)]
4822pub struct LookupNameRequest {
4823    /// Required. The SuiNS name to lookup.
4824    ///
4825    /// Supports both `@name` as well as `name.sui` formats.
4826    #[prost(string, optional, tag = "1")]
4827    pub name: ::core::option::Option<::prost::alloc::string::String>,
4828}
4829#[non_exhaustive]
4830#[derive(Clone, PartialEq, ::prost::Message)]
4831pub struct LookupNameResponse {
4832    /// The record for the requested name
4833    #[prost(message, optional, tag = "1")]
4834    pub record: ::core::option::Option<NameRecord>,
4835}
4836#[non_exhaustive]
4837#[derive(Clone, PartialEq, ::prost::Message)]
4838pub struct ReverseLookupNameRequest {
4839    /// Required. The address to perform a reverse lookup for.
4840    #[prost(string, optional, tag = "1")]
4841    pub address: ::core::option::Option<::prost::alloc::string::String>,
4842}
4843#[non_exhaustive]
4844#[derive(Clone, PartialEq, ::prost::Message)]
4845pub struct ReverseLookupNameResponse {
4846    /// The record for the SuiNS name linked to the requested address
4847    #[prost(message, optional, tag = "1")]
4848    pub record: ::core::option::Option<NameRecord>,
4849}
4850#[non_exhaustive]
4851#[derive(Clone, PartialEq, ::prost::Message)]
4852pub struct NameRecord {
4853    /// Id of this record.
4854    ///
4855    /// Note that records are stored on chain as dynamic fields of the type
4856    /// `Field<Domain,NameRecord>`.
4857    #[prost(string, optional, tag = "1")]
4858    pub id: ::core::option::Option<::prost::alloc::string::String>,
4859    /// The SuiNS name of this record
4860    #[prost(string, optional, tag = "2")]
4861    pub name: ::core::option::Option<::prost::alloc::string::String>,
4862    /// The ID of the `RegistrationNFT` assigned to this record.
4863    ///
4864    /// The owner of the corrisponding `RegistrationNFT` has the rights to
4865    /// be able to change and adjust the `target_address` of this domain.
4866    ///
4867    /// It is possible that the ID changes if the record expires and is
4868    /// purchased by someone else.
4869    #[prost(string, optional, tag = "3")]
4870    pub registration_nft_id: ::core::option::Option<::prost::alloc::string::String>,
4871    /// Timestamp when the record expires.
4872    ///
4873    /// This is either the expiration of the record itself or the expiration of
4874    /// this record's parent if this is a leaf record.
4875    #[prost(message, optional, tag = "4")]
4876    pub expiration_timestamp: ::core::option::Option<::prost_types::Timestamp>,
4877    /// The target address that this name points to
4878    #[prost(string, optional, tag = "5")]
4879    pub target_address: ::core::option::Option<::prost::alloc::string::String>,
4880    /// Additional data which may be stored in a record
4881    #[prost(btree_map = "string, string", tag = "6")]
4882    pub data: ::prost::alloc::collections::BTreeMap<
4883        ::prost::alloc::string::String,
4884        ::prost::alloc::string::String,
4885    >,
4886}
4887/// Generated client implementations.
4888pub mod name_service_client {
4889    #![allow(
4890        unused_variables,
4891        dead_code,
4892        missing_docs,
4893        clippy::wildcard_imports,
4894        clippy::let_unit_value,
4895    )]
4896    use tonic::codegen::*;
4897    use tonic::codegen::http::Uri;
4898    #[derive(Debug, Clone)]
4899    pub struct NameServiceClient<T> {
4900        inner: tonic::client::Grpc<T>,
4901    }
4902    impl NameServiceClient<tonic::transport::Channel> {
4903        /// Attempt to create a new client by connecting to a given endpoint.
4904        pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
4905        where
4906            D: TryInto<tonic::transport::Endpoint>,
4907            D::Error: Into<StdError>,
4908        {
4909            let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
4910            Ok(Self::new(conn))
4911        }
4912    }
4913    impl<T> NameServiceClient<T>
4914    where
4915        T: tonic::client::GrpcService<tonic::body::Body>,
4916        T::Error: Into<StdError>,
4917        T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static,
4918        <T::ResponseBody as Body>::Error: Into<StdError> + std::marker::Send,
4919    {
4920        pub fn new(inner: T) -> Self {
4921            let inner = tonic::client::Grpc::new(inner);
4922            Self { inner }
4923        }
4924        pub fn with_origin(inner: T, origin: Uri) -> Self {
4925            let inner = tonic::client::Grpc::with_origin(inner, origin);
4926            Self { inner }
4927        }
4928        pub fn with_interceptor<F>(
4929            inner: T,
4930            interceptor: F,
4931        ) -> NameServiceClient<InterceptedService<T, F>>
4932        where
4933            F: tonic::service::Interceptor,
4934            T::ResponseBody: Default,
4935            T: tonic::codegen::Service<
4936                http::Request<tonic::body::Body>,
4937                Response = http::Response<
4938                    <T as tonic::client::GrpcService<tonic::body::Body>>::ResponseBody,
4939                >,
4940            >,
4941            <T as tonic::codegen::Service<
4942                http::Request<tonic::body::Body>,
4943            >>::Error: Into<StdError> + std::marker::Send + std::marker::Sync,
4944        {
4945            NameServiceClient::new(InterceptedService::new(inner, interceptor))
4946        }
4947        /// Compress requests with the given encoding.
4948        ///
4949        /// This requires the server to support it otherwise it might respond with an
4950        /// error.
4951        #[must_use]
4952        pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
4953            self.inner = self.inner.send_compressed(encoding);
4954            self
4955        }
4956        /// Enable decompressing responses.
4957        #[must_use]
4958        pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
4959            self.inner = self.inner.accept_compressed(encoding);
4960            self
4961        }
4962        /// Limits the maximum size of a decoded message.
4963        ///
4964        /// Default: `4MB`
4965        #[must_use]
4966        pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
4967            self.inner = self.inner.max_decoding_message_size(limit);
4968            self
4969        }
4970        /// Limits the maximum size of an encoded message.
4971        ///
4972        /// Default: `usize::MAX`
4973        #[must_use]
4974        pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
4975            self.inner = self.inner.max_encoding_message_size(limit);
4976            self
4977        }
4978        pub async fn lookup_name(
4979            &mut self,
4980            request: impl tonic::IntoRequest<super::LookupNameRequest>,
4981        ) -> std::result::Result<
4982            tonic::Response<super::LookupNameResponse>,
4983            tonic::Status,
4984        > {
4985            self.inner
4986                .ready()
4987                .await
4988                .map_err(|e| {
4989                    tonic::Status::unknown(
4990                        format!("Service was not ready: {}", e.into()),
4991                    )
4992                })?;
4993            let codec = tonic::codec::ProstCodec::default();
4994            let path = http::uri::PathAndQuery::from_static(
4995                "/sui.rpc.v2beta2.NameService/LookupName",
4996            );
4997            let mut req = request.into_request();
4998            req.extensions_mut()
4999                .insert(GrpcMethod::new("sui.rpc.v2beta2.NameService", "LookupName"));
5000            self.inner.unary(req, path, codec).await
5001        }
5002        pub async fn reverse_lookup_name(
5003            &mut self,
5004            request: impl tonic::IntoRequest<super::ReverseLookupNameRequest>,
5005        ) -> std::result::Result<
5006            tonic::Response<super::ReverseLookupNameResponse>,
5007            tonic::Status,
5008        > {
5009            self.inner
5010                .ready()
5011                .await
5012                .map_err(|e| {
5013                    tonic::Status::unknown(
5014                        format!("Service was not ready: {}", e.into()),
5015                    )
5016                })?;
5017            let codec = tonic::codec::ProstCodec::default();
5018            let path = http::uri::PathAndQuery::from_static(
5019                "/sui.rpc.v2beta2.NameService/ReverseLookupName",
5020            );
5021            let mut req = request.into_request();
5022            req.extensions_mut()
5023                .insert(
5024                    GrpcMethod::new("sui.rpc.v2beta2.NameService", "ReverseLookupName"),
5025                );
5026            self.inner.unary(req, path, codec).await
5027        }
5028    }
5029}
5030/// Generated server implementations.
5031pub mod name_service_server {
5032    #![allow(
5033        unused_variables,
5034        dead_code,
5035        missing_docs,
5036        clippy::wildcard_imports,
5037        clippy::let_unit_value,
5038    )]
5039    use tonic::codegen::*;
5040    /// Generated trait containing gRPC methods that should be implemented for use with NameServiceServer.
5041    #[async_trait]
5042    pub trait NameService: std::marker::Send + std::marker::Sync + 'static {
5043        async fn lookup_name(
5044            &self,
5045            request: tonic::Request<super::LookupNameRequest>,
5046        ) -> std::result::Result<
5047            tonic::Response<super::LookupNameResponse>,
5048            tonic::Status,
5049        >;
5050        async fn reverse_lookup_name(
5051            &self,
5052            request: tonic::Request<super::ReverseLookupNameRequest>,
5053        ) -> std::result::Result<
5054            tonic::Response<super::ReverseLookupNameResponse>,
5055            tonic::Status,
5056        >;
5057    }
5058    #[derive(Debug)]
5059    pub struct NameServiceServer<T> {
5060        inner: Arc<T>,
5061        accept_compression_encodings: EnabledCompressionEncodings,
5062        send_compression_encodings: EnabledCompressionEncodings,
5063        max_decoding_message_size: Option<usize>,
5064        max_encoding_message_size: Option<usize>,
5065    }
5066    impl<T> NameServiceServer<T> {
5067        pub fn new(inner: T) -> Self {
5068            Self::from_arc(Arc::new(inner))
5069        }
5070        pub fn from_arc(inner: Arc<T>) -> Self {
5071            Self {
5072                inner,
5073                accept_compression_encodings: Default::default(),
5074                send_compression_encodings: Default::default(),
5075                max_decoding_message_size: None,
5076                max_encoding_message_size: None,
5077            }
5078        }
5079        pub fn with_interceptor<F>(
5080            inner: T,
5081            interceptor: F,
5082        ) -> InterceptedService<Self, F>
5083        where
5084            F: tonic::service::Interceptor,
5085        {
5086            InterceptedService::new(Self::new(inner), interceptor)
5087        }
5088        /// Enable decompressing requests with the given encoding.
5089        #[must_use]
5090        pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
5091            self.accept_compression_encodings.enable(encoding);
5092            self
5093        }
5094        /// Compress responses with the given encoding, if the client supports it.
5095        #[must_use]
5096        pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
5097            self.send_compression_encodings.enable(encoding);
5098            self
5099        }
5100        /// Limits the maximum size of a decoded message.
5101        ///
5102        /// Default: `4MB`
5103        #[must_use]
5104        pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
5105            self.max_decoding_message_size = Some(limit);
5106            self
5107        }
5108        /// Limits the maximum size of an encoded message.
5109        ///
5110        /// Default: `usize::MAX`
5111        #[must_use]
5112        pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
5113            self.max_encoding_message_size = Some(limit);
5114            self
5115        }
5116    }
5117    impl<T, B> tonic::codegen::Service<http::Request<B>> for NameServiceServer<T>
5118    where
5119        T: NameService,
5120        B: Body + std::marker::Send + 'static,
5121        B::Error: Into<StdError> + std::marker::Send + 'static,
5122    {
5123        type Response = http::Response<tonic::body::Body>;
5124        type Error = std::convert::Infallible;
5125        type Future = BoxFuture<Self::Response, Self::Error>;
5126        fn poll_ready(
5127            &mut self,
5128            _cx: &mut Context<'_>,
5129        ) -> Poll<std::result::Result<(), Self::Error>> {
5130            Poll::Ready(Ok(()))
5131        }
5132        fn call(&mut self, req: http::Request<B>) -> Self::Future {
5133            match req.uri().path() {
5134                "/sui.rpc.v2beta2.NameService/LookupName" => {
5135                    #[allow(non_camel_case_types)]
5136                    struct LookupNameSvc<T: NameService>(pub Arc<T>);
5137                    impl<
5138                        T: NameService,
5139                    > tonic::server::UnaryService<super::LookupNameRequest>
5140                    for LookupNameSvc<T> {
5141                        type Response = super::LookupNameResponse;
5142                        type Future = BoxFuture<
5143                            tonic::Response<Self::Response>,
5144                            tonic::Status,
5145                        >;
5146                        fn call(
5147                            &mut self,
5148                            request: tonic::Request<super::LookupNameRequest>,
5149                        ) -> Self::Future {
5150                            let inner = Arc::clone(&self.0);
5151                            let fut = async move {
5152                                <T as NameService>::lookup_name(&inner, request).await
5153                            };
5154                            Box::pin(fut)
5155                        }
5156                    }
5157                    let accept_compression_encodings = self.accept_compression_encodings;
5158                    let send_compression_encodings = self.send_compression_encodings;
5159                    let max_decoding_message_size = self.max_decoding_message_size;
5160                    let max_encoding_message_size = self.max_encoding_message_size;
5161                    let inner = self.inner.clone();
5162                    let fut = async move {
5163                        let method = LookupNameSvc(inner);
5164                        let codec = tonic::codec::ProstCodec::default();
5165                        let mut grpc = tonic::server::Grpc::new(codec)
5166                            .apply_compression_config(
5167                                accept_compression_encodings,
5168                                send_compression_encodings,
5169                            )
5170                            .apply_max_message_size_config(
5171                                max_decoding_message_size,
5172                                max_encoding_message_size,
5173                            );
5174                        let res = grpc.unary(method, req).await;
5175                        Ok(res)
5176                    };
5177                    Box::pin(fut)
5178                }
5179                "/sui.rpc.v2beta2.NameService/ReverseLookupName" => {
5180                    #[allow(non_camel_case_types)]
5181                    struct ReverseLookupNameSvc<T: NameService>(pub Arc<T>);
5182                    impl<
5183                        T: NameService,
5184                    > tonic::server::UnaryService<super::ReverseLookupNameRequest>
5185                    for ReverseLookupNameSvc<T> {
5186                        type Response = super::ReverseLookupNameResponse;
5187                        type Future = BoxFuture<
5188                            tonic::Response<Self::Response>,
5189                            tonic::Status,
5190                        >;
5191                        fn call(
5192                            &mut self,
5193                            request: tonic::Request<super::ReverseLookupNameRequest>,
5194                        ) -> Self::Future {
5195                            let inner = Arc::clone(&self.0);
5196                            let fut = async move {
5197                                <T as NameService>::reverse_lookup_name(&inner, request)
5198                                    .await
5199                            };
5200                            Box::pin(fut)
5201                        }
5202                    }
5203                    let accept_compression_encodings = self.accept_compression_encodings;
5204                    let send_compression_encodings = self.send_compression_encodings;
5205                    let max_decoding_message_size = self.max_decoding_message_size;
5206                    let max_encoding_message_size = self.max_encoding_message_size;
5207                    let inner = self.inner.clone();
5208                    let fut = async move {
5209                        let method = ReverseLookupNameSvc(inner);
5210                        let codec = tonic::codec::ProstCodec::default();
5211                        let mut grpc = tonic::server::Grpc::new(codec)
5212                            .apply_compression_config(
5213                                accept_compression_encodings,
5214                                send_compression_encodings,
5215                            )
5216                            .apply_max_message_size_config(
5217                                max_decoding_message_size,
5218                                max_encoding_message_size,
5219                            );
5220                        let res = grpc.unary(method, req).await;
5221                        Ok(res)
5222                    };
5223                    Box::pin(fut)
5224                }
5225                _ => {
5226                    Box::pin(async move {
5227                        let mut response = http::Response::new(
5228                            tonic::body::Body::default(),
5229                        );
5230                        let headers = response.headers_mut();
5231                        headers
5232                            .insert(
5233                                tonic::Status::GRPC_STATUS,
5234                                (tonic::Code::Unimplemented as i32).into(),
5235                            );
5236                        headers
5237                            .insert(
5238                                http::header::CONTENT_TYPE,
5239                                tonic::metadata::GRPC_CONTENT_TYPE,
5240                            );
5241                        Ok(response)
5242                    })
5243                }
5244            }
5245        }
5246    }
5247    impl<T> Clone for NameServiceServer<T> {
5248        fn clone(&self) -> Self {
5249            let inner = self.inner.clone();
5250            Self {
5251                inner,
5252                accept_compression_encodings: self.accept_compression_encodings,
5253                send_compression_encodings: self.send_compression_encodings,
5254                max_decoding_message_size: self.max_decoding_message_size,
5255                max_encoding_message_size: self.max_encoding_message_size,
5256            }
5257        }
5258    }
5259    /// Generated gRPC service name
5260    pub const SERVICE_NAME: &str = "sui.rpc.v2beta2.NameService";
5261    impl<T> tonic::server::NamedService for NameServiceServer<T> {
5262        const NAME: &'static str = SERVICE_NAME;
5263    }
5264}
5265/// An object on the Sui blockchain.
5266#[non_exhaustive]
5267#[derive(Clone, PartialEq, ::prost::Message)]
5268pub struct Object {
5269    /// This Object serialized as BCS.
5270    #[prost(message, optional, tag = "1")]
5271    pub bcs: ::core::option::Option<Bcs>,
5272    /// `ObjectId` for this object.
5273    #[prost(string, optional, tag = "2")]
5274    pub object_id: ::core::option::Option<::prost::alloc::string::String>,
5275    /// Version of the object.
5276    #[prost(uint64, optional, tag = "3")]
5277    pub version: ::core::option::Option<u64>,
5278    /// The digest of this Object.
5279    #[prost(string, optional, tag = "4")]
5280    pub digest: ::core::option::Option<::prost::alloc::string::String>,
5281    /// Owner of the object.
5282    #[prost(message, optional, tag = "5")]
5283    pub owner: ::core::option::Option<Owner>,
5284    /// The type of this object.
5285    ///
5286    /// This will be 'package' for packages and a StructTag for move structs.
5287    #[prost(string, optional, tag = "6")]
5288    pub object_type: ::core::option::Option<::prost::alloc::string::String>,
5289    /// DEPRECATED this field is no longer used to determine whether a tx can transfer this
5290    /// object. Instead, it is always calculated from the objects type when loaded in execution.
5291    ///
5292    /// Only set for Move structs
5293    #[prost(bool, optional, tag = "7")]
5294    pub has_public_transfer: ::core::option::Option<bool>,
5295    /// BCS bytes of a Move struct value.
5296    ///
5297    /// Only set for Move structs
5298    #[prost(message, optional, tag = "8")]
5299    pub contents: ::core::option::Option<Bcs>,
5300    /// Package information for Move Packages
5301    #[prost(message, optional, tag = "9")]
5302    pub package: ::core::option::Option<Package>,
5303    /// The digest of the transaction that created or last mutated this object
5304    #[prost(string, optional, tag = "10")]
5305    pub previous_transaction: ::core::option::Option<::prost::alloc::string::String>,
5306    /// The amount of SUI to rebate if this object gets deleted.
5307    /// This number is re-calculated each time the object is mutated based on
5308    /// the present storage gas price.
5309    #[prost(uint64, optional, tag = "11")]
5310    pub storage_rebate: ::core::option::Option<u64>,
5311    /// JSON rendering of the object.
5312    #[prost(message, optional, boxed, tag = "100")]
5313    pub json: ::core::option::Option<::prost::alloc::boxed::Box<::prost_types::Value>>,
5314    /// Current balance if this object is a `0x2::coin::Coin<T>`
5315    #[prost(uint64, optional, tag = "101")]
5316    pub balance: ::core::option::Option<u64>,
5317}
5318/// Reference to an object.
5319#[non_exhaustive]
5320#[derive(Clone, PartialEq, ::prost::Message)]
5321pub struct ObjectReference {
5322    /// The object id of this object.
5323    #[prost(string, optional, tag = "1")]
5324    pub object_id: ::core::option::Option<::prost::alloc::string::String>,
5325    /// The version of this object.
5326    #[prost(uint64, optional, tag = "2")]
5327    pub version: ::core::option::Option<u64>,
5328    /// The digest of this object.
5329    #[prost(string, optional, tag = "3")]
5330    pub digest: ::core::option::Option<::prost::alloc::string::String>,
5331}
5332/// Enum of different types of ownership for an object.
5333#[non_exhaustive]
5334#[derive(Clone, PartialEq, ::prost::Message)]
5335pub struct Owner {
5336    #[prost(enumeration = "owner::OwnerKind", optional, tag = "1")]
5337    pub kind: ::core::option::Option<i32>,
5338    /// Address or ObjectId of the owner
5339    #[prost(string, optional, tag = "2")]
5340    pub address: ::core::option::Option<::prost::alloc::string::String>,
5341    /// The `initial_shared_version` if kind is `SHARED` or `start_version` if kind `CONSENSUS_ADDRESS`.
5342    #[prost(uint64, optional, tag = "3")]
5343    pub version: ::core::option::Option<u64>,
5344}
5345/// Nested message and enum types in `Owner`.
5346pub mod owner {
5347    #[non_exhaustive]
5348    #[derive(
5349        Clone,
5350        Copy,
5351        Debug,
5352        PartialEq,
5353        Eq,
5354        Hash,
5355        PartialOrd,
5356        Ord,
5357        ::prost::Enumeration
5358    )]
5359    #[repr(i32)]
5360    pub enum OwnerKind {
5361        Unknown = 0,
5362        Address = 1,
5363        Object = 2,
5364        Shared = 3,
5365        Immutable = 4,
5366        ConsensusAddress = 5,
5367    }
5368    impl OwnerKind {
5369        /// String value of the enum field names used in the ProtoBuf definition.
5370        ///
5371        /// The values are not transformed in any way and thus are considered stable
5372        /// (if the ProtoBuf definition does not change) and safe for programmatic use.
5373        pub fn as_str_name(&self) -> &'static str {
5374            match self {
5375                Self::Unknown => "OWNER_KIND_UNKNOWN",
5376                Self::Address => "ADDRESS",
5377                Self::Object => "OBJECT",
5378                Self::Shared => "SHARED",
5379                Self::Immutable => "IMMUTABLE",
5380                Self::ConsensusAddress => "CONSENSUS_ADDRESS",
5381            }
5382        }
5383        /// Creates an enum from field names used in the ProtoBuf definition.
5384        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
5385            match value {
5386                "OWNER_KIND_UNKNOWN" => Some(Self::Unknown),
5387                "ADDRESS" => Some(Self::Address),
5388                "OBJECT" => Some(Self::Object),
5389                "SHARED" => Some(Self::Shared),
5390                "IMMUTABLE" => Some(Self::Immutable),
5391                "CONSENSUS_ADDRESS" => Some(Self::ConsensusAddress),
5392                _ => None,
5393            }
5394        }
5395    }
5396}
5397#[non_exhaustive]
5398#[derive(Clone, PartialEq, ::prost::Message)]
5399pub struct ProtocolConfig {
5400    #[prost(uint64, optional, tag = "1")]
5401    pub protocol_version: ::core::option::Option<u64>,
5402    #[prost(btree_map = "string, bool", tag = "2")]
5403    pub feature_flags: ::prost::alloc::collections::BTreeMap<
5404        ::prost::alloc::string::String,
5405        bool,
5406    >,
5407    #[prost(btree_map = "string, string", tag = "3")]
5408    pub attributes: ::prost::alloc::collections::BTreeMap<
5409        ::prost::alloc::string::String,
5410        ::prost::alloc::string::String,
5411    >,
5412}
5413/// A signature from a user.
5414#[non_exhaustive]
5415#[derive(Clone, PartialEq, ::prost::Message)]
5416pub struct UserSignature {
5417    /// This signature serialized as as BCS.
5418    ///
5419    /// When provided as input this will support both the form that is length
5420    /// prefixed as well as not length prefixed.
5421    #[prost(message, optional, tag = "1")]
5422    pub bcs: ::core::option::Option<Bcs>,
5423    /// The signature scheme of this signature.
5424    #[prost(enumeration = "SignatureScheme", optional, tag = "2")]
5425    pub scheme: ::core::option::Option<i32>,
5426    #[prost(oneof = "user_signature::Signature", tags = "3, 4, 5, 6")]
5427    pub signature: ::core::option::Option<user_signature::Signature>,
5428}
5429/// Nested message and enum types in `UserSignature`.
5430pub mod user_signature {
5431    #[non_exhaustive]
5432    #[derive(Clone, PartialEq, ::prost::Oneof)]
5433    pub enum Signature {
5434        /// Simple signature if scheme is ed25519 | secp256k1 | secp256r1.
5435        #[prost(message, tag = "3")]
5436        Simple(super::SimpleSignature),
5437        /// The multisig aggregated signature if scheme is `MULTISIG`.
5438        #[prost(message, tag = "4")]
5439        Multisig(super::MultisigAggregatedSignature),
5440        /// The zklogin authenticator if scheme is `ZKLOGIN`.
5441        #[prost(message, tag = "5")]
5442        Zklogin(super::ZkLoginAuthenticator),
5443        /// The passkey authenticator if scheme is `PASSKEY`.
5444        #[prost(message, tag = "6")]
5445        Passkey(super::PasskeyAuthenticator),
5446    }
5447}
5448/// Either an ed25519, secp256k1 or secp256r1 signature
5449#[non_exhaustive]
5450#[derive(Clone, PartialEq, ::prost::Message)]
5451pub struct SimpleSignature {
5452    /// The signature scheme of this signature.
5453    #[prost(enumeration = "SignatureScheme", optional, tag = "1")]
5454    pub scheme: ::core::option::Option<i32>,
5455    /// Signature bytes
5456    #[prost(bytes = "bytes", optional, tag = "2")]
5457    pub signature: ::core::option::Option<::prost::bytes::Bytes>,
5458    /// Public key bytes
5459    #[prost(bytes = "bytes", optional, tag = "3")]
5460    pub public_key: ::core::option::Option<::prost::bytes::Bytes>,
5461}
5462/// Public key equivalent for zklogin authenticators.
5463#[non_exhaustive]
5464#[derive(Clone, PartialEq, ::prost::Message)]
5465pub struct ZkLoginPublicIdentifier {
5466    #[prost(string, optional, tag = "1")]
5467    pub iss: ::core::option::Option<::prost::alloc::string::String>,
5468    /// base10 encoded Bn254FieldElement
5469    #[prost(string, optional, tag = "2")]
5470    pub address_seed: ::core::option::Option<::prost::alloc::string::String>,
5471}
5472/// Set of valid public keys for multisig committee members.
5473#[non_exhaustive]
5474#[derive(Clone, PartialEq, ::prost::Message)]
5475pub struct MultisigMemberPublicKey {
5476    /// The signature scheme of this public key.
5477    #[prost(enumeration = "SignatureScheme", optional, tag = "1")]
5478    pub scheme: ::core::option::Option<i32>,
5479    /// Public key bytes if scheme is ed25519 | secp256k1 | secp256r1 | passkey.
5480    #[prost(bytes = "bytes", optional, tag = "2")]
5481    pub public_key: ::core::option::Option<::prost::bytes::Bytes>,
5482    /// A zklogin public identifier if scheme is zklogin.
5483    #[prost(message, optional, tag = "3")]
5484    pub zklogin: ::core::option::Option<ZkLoginPublicIdentifier>,
5485}
5486/// A member in a multisig committee.
5487#[non_exhaustive]
5488#[derive(Clone, PartialEq, ::prost::Message)]
5489pub struct MultisigMember {
5490    /// The public key of the committee member.
5491    #[prost(message, optional, tag = "1")]
5492    pub public_key: ::core::option::Option<MultisigMemberPublicKey>,
5493    /// The weight of this member's signature.
5494    #[prost(uint32, optional, tag = "2")]
5495    pub weight: ::core::option::Option<u32>,
5496}
5497/// A multisig committee.
5498#[non_exhaustive]
5499#[derive(Clone, PartialEq, ::prost::Message)]
5500pub struct MultisigCommittee {
5501    /// A list of committee members and their corresponding weight.
5502    #[prost(message, repeated, tag = "1")]
5503    pub members: ::prost::alloc::vec::Vec<MultisigMember>,
5504    /// The threshold of signatures needed to validate a signature from
5505    /// this committee.
5506    #[prost(uint32, optional, tag = "2")]
5507    pub threshold: ::core::option::Option<u32>,
5508}
5509/// Aggregated signature from members of a multisig committee.
5510#[non_exhaustive]
5511#[derive(Clone, PartialEq, ::prost::Message)]
5512pub struct MultisigAggregatedSignature {
5513    /// The plain signatures encoded with signature scheme.
5514    ///
5515    /// The signatures must be in the same order as they are listed in the committee.
5516    #[prost(message, repeated, tag = "1")]
5517    pub signatures: ::prost::alloc::vec::Vec<MultisigMemberSignature>,
5518    /// Bitmap indicating which committee members contributed to the
5519    /// signature.
5520    #[prost(uint32, optional, tag = "2")]
5521    pub bitmap: ::core::option::Option<u32>,
5522    /// If present, means this signature's on-chain format uses the old
5523    /// legacy multisig format.
5524    #[prost(uint32, repeated, tag = "3")]
5525    pub legacy_bitmap: ::prost::alloc::vec::Vec<u32>,
5526    /// The committee to use to validate this signature.
5527    #[prost(message, optional, tag = "4")]
5528    pub committee: ::core::option::Option<MultisigCommittee>,
5529}
5530/// A signature from a member of a multisig committee.
5531#[non_exhaustive]
5532#[derive(Clone, PartialEq, ::prost::Message)]
5533pub struct MultisigMemberSignature {
5534    /// The signature scheme of this signature.
5535    #[prost(enumeration = "SignatureScheme", optional, tag = "1")]
5536    pub scheme: ::core::option::Option<i32>,
5537    /// Signature bytes if scheme is ed25519 | secp256k1 | secp256r1.
5538    #[prost(bytes = "bytes", optional, tag = "2")]
5539    pub signature: ::core::option::Option<::prost::bytes::Bytes>,
5540    /// The zklogin authenticator if scheme is `ZKLOGIN`.
5541    #[prost(message, optional, tag = "3")]
5542    pub zklogin: ::core::option::Option<ZkLoginAuthenticator>,
5543    /// The passkey authenticator if scheme is `PASSKEY`.
5544    #[prost(message, optional, tag = "4")]
5545    pub passkey: ::core::option::Option<PasskeyAuthenticator>,
5546}
5547/// A zklogin authenticator.
5548#[non_exhaustive]
5549#[derive(Clone, PartialEq, ::prost::Message)]
5550pub struct ZkLoginAuthenticator {
5551    /// Zklogin proof and inputs required to perform proof verification.
5552    #[prost(message, optional, tag = "1")]
5553    pub inputs: ::core::option::Option<ZkLoginInputs>,
5554    /// Maximum epoch for which the proof is valid.
5555    #[prost(uint64, optional, tag = "2")]
5556    pub max_epoch: ::core::option::Option<u64>,
5557    /// User signature with the public key attested to by the provided proof.
5558    #[prost(message, optional, tag = "3")]
5559    pub signature: ::core::option::Option<SimpleSignature>,
5560}
5561/// A zklogin groth16 proof and the required inputs to perform proof verification.
5562#[non_exhaustive]
5563#[derive(Clone, PartialEq, ::prost::Message)]
5564pub struct ZkLoginInputs {
5565    #[prost(message, optional, tag = "1")]
5566    pub proof_points: ::core::option::Option<ZkLoginProof>,
5567    #[prost(message, optional, tag = "2")]
5568    pub iss_base64_details: ::core::option::Option<ZkLoginClaim>,
5569    #[prost(string, optional, tag = "3")]
5570    pub header_base64: ::core::option::Option<::prost::alloc::string::String>,
5571    /// base10 encoded Bn254FieldElement
5572    #[prost(string, optional, tag = "4")]
5573    pub address_seed: ::core::option::Option<::prost::alloc::string::String>,
5574}
5575/// A zklogin groth16 proof.
5576#[non_exhaustive]
5577#[derive(Clone, PartialEq, ::prost::Message)]
5578pub struct ZkLoginProof {
5579    #[prost(message, optional, tag = "1")]
5580    pub a: ::core::option::Option<CircomG1>,
5581    #[prost(message, optional, tag = "2")]
5582    pub b: ::core::option::Option<CircomG2>,
5583    #[prost(message, optional, tag = "3")]
5584    pub c: ::core::option::Option<CircomG1>,
5585}
5586/// A claim of the iss in a zklogin proof.
5587#[non_exhaustive]
5588#[derive(Clone, PartialEq, ::prost::Message)]
5589pub struct ZkLoginClaim {
5590    #[prost(string, optional, tag = "1")]
5591    pub value: ::core::option::Option<::prost::alloc::string::String>,
5592    #[prost(uint32, optional, tag = "2")]
5593    pub index_mod_4: ::core::option::Option<u32>,
5594}
5595/// A G1 point.
5596#[non_exhaustive]
5597#[derive(Clone, PartialEq, ::prost::Message)]
5598pub struct CircomG1 {
5599    /// base10 encoded Bn254FieldElement
5600    #[prost(string, optional, tag = "1")]
5601    pub e0: ::core::option::Option<::prost::alloc::string::String>,
5602    /// base10 encoded Bn254FieldElement
5603    #[prost(string, optional, tag = "2")]
5604    pub e1: ::core::option::Option<::prost::alloc::string::String>,
5605    /// base10 encoded Bn254FieldElement
5606    #[prost(string, optional, tag = "3")]
5607    pub e2: ::core::option::Option<::prost::alloc::string::String>,
5608}
5609/// A G2 point.
5610#[non_exhaustive]
5611#[derive(Clone, PartialEq, ::prost::Message)]
5612pub struct CircomG2 {
5613    /// base10 encoded Bn254FieldElement
5614    #[prost(string, optional, tag = "1")]
5615    pub e00: ::core::option::Option<::prost::alloc::string::String>,
5616    /// base10 encoded Bn254FieldElement
5617    #[prost(string, optional, tag = "2")]
5618    pub e01: ::core::option::Option<::prost::alloc::string::String>,
5619    /// base10 encoded Bn254FieldElement
5620    #[prost(string, optional, tag = "3")]
5621    pub e10: ::core::option::Option<::prost::alloc::string::String>,
5622    /// base10 encoded Bn254FieldElement
5623    #[prost(string, optional, tag = "4")]
5624    pub e11: ::core::option::Option<::prost::alloc::string::String>,
5625    /// base10 encoded Bn254FieldElement
5626    #[prost(string, optional, tag = "5")]
5627    pub e20: ::core::option::Option<::prost::alloc::string::String>,
5628    /// base10 encoded Bn254FieldElement
5629    #[prost(string, optional, tag = "6")]
5630    pub e21: ::core::option::Option<::prost::alloc::string::String>,
5631}
5632/// A passkey authenticator.
5633///
5634/// See
5635/// [struct.PasskeyAuthenticator](<https://mystenlabs.github.io/sui-rust-sdk/sui_sdk_types/struct.PasskeyAuthenticator.html#bcs>)
5636/// for more information on the requirements on the shape of the
5637/// `client_data_json` field.
5638#[non_exhaustive]
5639#[derive(Clone, PartialEq, ::prost::Message)]
5640pub struct PasskeyAuthenticator {
5641    /// Opaque authenticator data for this passkey signature.
5642    ///
5643    /// See [Authenticator Data](<https://www.w3.org/TR/webauthn-2/#sctn-authenticator-data>) for
5644    /// more information on this field.
5645    #[prost(bytes = "bytes", optional, tag = "1")]
5646    pub authenticator_data: ::core::option::Option<::prost::bytes::Bytes>,
5647    /// Structured, unparsed, JSON for this passkey signature.
5648    ///
5649    /// See [CollectedClientData](<https://www.w3.org/TR/webauthn-2/#dictdef-collectedclientdata>)
5650    /// for more information on this field.
5651    #[prost(string, optional, tag = "2")]
5652    pub client_data_json: ::core::option::Option<::prost::alloc::string::String>,
5653    /// A secp256r1 signature.
5654    #[prost(message, optional, tag = "3")]
5655    pub signature: ::core::option::Option<SimpleSignature>,
5656}
5657/// The validator set for a particular epoch.
5658#[non_exhaustive]
5659#[derive(Clone, PartialEq, ::prost::Message)]
5660pub struct ValidatorCommittee {
5661    /// The epoch where this committee governs.
5662    #[prost(uint64, optional, tag = "1")]
5663    pub epoch: ::core::option::Option<u64>,
5664    /// The committee members.
5665    #[prost(message, repeated, tag = "2")]
5666    pub members: ::prost::alloc::vec::Vec<ValidatorCommitteeMember>,
5667}
5668/// A member of a validator committee.
5669#[non_exhaustive]
5670#[derive(Clone, PartialEq, ::prost::Message)]
5671pub struct ValidatorCommitteeMember {
5672    /// The 96-byte Bls12381 public key for this validator.
5673    #[prost(bytes = "bytes", optional, tag = "1")]
5674    pub public_key: ::core::option::Option<::prost::bytes::Bytes>,
5675    /// voting weight this validator possesses.
5676    #[prost(uint64, optional, tag = "2")]
5677    pub weight: ::core::option::Option<u64>,
5678}
5679/// / An aggregated signature from multiple validators.
5680#[non_exhaustive]
5681#[derive(Clone, PartialEq, ::prost::Message)]
5682pub struct ValidatorAggregatedSignature {
5683    /// The epoch when this signature was produced.
5684    ///
5685    /// This can be used to lookup the `ValidatorCommittee` from this epoch
5686    /// to verify this signature.
5687    #[prost(uint64, optional, tag = "1")]
5688    pub epoch: ::core::option::Option<u64>,
5689    /// The 48-byte Bls12381 aggregated signature.
5690    #[prost(bytes = "bytes", optional, tag = "2")]
5691    pub signature: ::core::option::Option<::prost::bytes::Bytes>,
5692    /// Bitmap indicating which members of the committee contributed to
5693    /// this signature.
5694    #[prost(uint32, repeated, tag = "3")]
5695    pub bitmap: ::prost::alloc::vec::Vec<u32>,
5696}
5697/// Flag use to disambiguate the signature schemes supported by Sui.
5698///
5699/// Note: the enum values defined by this proto message exactly match their
5700/// expected BCS serialized values when serialized as a u8. See
5701/// [enum.SignatureScheme](<https://mystenlabs.github.io/sui-rust-sdk/sui_sdk_types/enum.SignatureScheme.html>)
5702/// for more information about signature schemes.
5703#[non_exhaustive]
5704#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
5705#[repr(i32)]
5706pub enum SignatureScheme {
5707    Ed25519 = 0,
5708    Secp256k1 = 1,
5709    Secp256r1 = 2,
5710    Multisig = 3,
5711    Bls12381 = 4,
5712    Zklogin = 5,
5713    Passkey = 6,
5714}
5715impl SignatureScheme {
5716    /// String value of the enum field names used in the ProtoBuf definition.
5717    ///
5718    /// The values are not transformed in any way and thus are considered stable
5719    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
5720    pub fn as_str_name(&self) -> &'static str {
5721        match self {
5722            Self::Ed25519 => "ED25519",
5723            Self::Secp256k1 => "SECP256K1",
5724            Self::Secp256r1 => "SECP256R1",
5725            Self::Multisig => "MULTISIG",
5726            Self::Bls12381 => "BLS12381",
5727            Self::Zklogin => "ZKLOGIN",
5728            Self::Passkey => "PASSKEY",
5729        }
5730    }
5731    /// Creates an enum from field names used in the ProtoBuf definition.
5732    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
5733        match value {
5734            "ED25519" => Some(Self::Ed25519),
5735            "SECP256K1" => Some(Self::Secp256k1),
5736            "SECP256R1" => Some(Self::Secp256r1),
5737            "MULTISIG" => Some(Self::Multisig),
5738            "BLS12381" => Some(Self::Bls12381),
5739            "ZKLOGIN" => Some(Self::Zklogin),
5740            "PASSKEY" => Some(Self::Passkey),
5741            _ => None,
5742        }
5743    }
5744}
5745#[non_exhaustive]
5746#[derive(Clone, PartialEq, ::prost::Message)]
5747pub struct VerifySignatureRequest {
5748    /// The message to verify against.
5749    ///
5750    /// Today the only supported message types are `PersonalMessage` and
5751    /// `TransactionData` and the `Bcs.name` must be set to indicate which type of
5752    /// message is being verified.
5753    #[prost(message, optional, tag = "1")]
5754    pub message: ::core::option::Option<Bcs>,
5755    /// The siganture to verify.
5756    #[prost(message, optional, tag = "2")]
5757    pub signature: ::core::option::Option<UserSignature>,
5758    /// Optional. Address to validate against the provided signature.
5759    ///
5760    /// If provided, this address will be compared against the the address derived
5761    /// from the provide signature and a successful response will only be returned
5762    /// if they match.
5763    #[prost(string, optional, tag = "3")]
5764    pub address: ::core::option::Option<::prost::alloc::string::String>,
5765    /// The set of JWKs to use when verifying Zklogin signatures.
5766    /// If this is empty the current set of valid JWKs stored onchain will be used
5767    #[prost(message, repeated, tag = "4")]
5768    pub jwks: ::prost::alloc::vec::Vec<ActiveJwk>,
5769}
5770#[non_exhaustive]
5771#[derive(Clone, PartialEq, ::prost::Message)]
5772pub struct VerifySignatureResponse {
5773    /// Indicates if the provided signature was valid given the requested parameters.
5774    #[prost(bool, optional, tag = "1")]
5775    pub is_valid: ::core::option::Option<bool>,
5776    /// If `is_valid` is `false`, this is the reason for why the signature verification failed.
5777    #[prost(string, optional, tag = "2")]
5778    pub reason: ::core::option::Option<::prost::alloc::string::String>,
5779}
5780/// Generated client implementations.
5781pub mod signature_verification_service_client {
5782    #![allow(
5783        unused_variables,
5784        dead_code,
5785        missing_docs,
5786        clippy::wildcard_imports,
5787        clippy::let_unit_value,
5788    )]
5789    use tonic::codegen::*;
5790    use tonic::codegen::http::Uri;
5791    #[derive(Debug, Clone)]
5792    pub struct SignatureVerificationServiceClient<T> {
5793        inner: tonic::client::Grpc<T>,
5794    }
5795    impl SignatureVerificationServiceClient<tonic::transport::Channel> {
5796        /// Attempt to create a new client by connecting to a given endpoint.
5797        pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
5798        where
5799            D: TryInto<tonic::transport::Endpoint>,
5800            D::Error: Into<StdError>,
5801        {
5802            let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
5803            Ok(Self::new(conn))
5804        }
5805    }
5806    impl<T> SignatureVerificationServiceClient<T>
5807    where
5808        T: tonic::client::GrpcService<tonic::body::Body>,
5809        T::Error: Into<StdError>,
5810        T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static,
5811        <T::ResponseBody as Body>::Error: Into<StdError> + std::marker::Send,
5812    {
5813        pub fn new(inner: T) -> Self {
5814            let inner = tonic::client::Grpc::new(inner);
5815            Self { inner }
5816        }
5817        pub fn with_origin(inner: T, origin: Uri) -> Self {
5818            let inner = tonic::client::Grpc::with_origin(inner, origin);
5819            Self { inner }
5820        }
5821        pub fn with_interceptor<F>(
5822            inner: T,
5823            interceptor: F,
5824        ) -> SignatureVerificationServiceClient<InterceptedService<T, F>>
5825        where
5826            F: tonic::service::Interceptor,
5827            T::ResponseBody: Default,
5828            T: tonic::codegen::Service<
5829                http::Request<tonic::body::Body>,
5830                Response = http::Response<
5831                    <T as tonic::client::GrpcService<tonic::body::Body>>::ResponseBody,
5832                >,
5833            >,
5834            <T as tonic::codegen::Service<
5835                http::Request<tonic::body::Body>,
5836            >>::Error: Into<StdError> + std::marker::Send + std::marker::Sync,
5837        {
5838            SignatureVerificationServiceClient::new(
5839                InterceptedService::new(inner, interceptor),
5840            )
5841        }
5842        /// Compress requests with the given encoding.
5843        ///
5844        /// This requires the server to support it otherwise it might respond with an
5845        /// error.
5846        #[must_use]
5847        pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
5848            self.inner = self.inner.send_compressed(encoding);
5849            self
5850        }
5851        /// Enable decompressing responses.
5852        #[must_use]
5853        pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
5854            self.inner = self.inner.accept_compressed(encoding);
5855            self
5856        }
5857        /// Limits the maximum size of a decoded message.
5858        ///
5859        /// Default: `4MB`
5860        #[must_use]
5861        pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
5862            self.inner = self.inner.max_decoding_message_size(limit);
5863            self
5864        }
5865        /// Limits the maximum size of an encoded message.
5866        ///
5867        /// Default: `usize::MAX`
5868        #[must_use]
5869        pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
5870            self.inner = self.inner.max_encoding_message_size(limit);
5871            self
5872        }
5873        /// Perform signature verification of a UserSignature against the provided message.
5874        pub async fn verify_signature(
5875            &mut self,
5876            request: impl tonic::IntoRequest<super::VerifySignatureRequest>,
5877        ) -> std::result::Result<
5878            tonic::Response<super::VerifySignatureResponse>,
5879            tonic::Status,
5880        > {
5881            self.inner
5882                .ready()
5883                .await
5884                .map_err(|e| {
5885                    tonic::Status::unknown(
5886                        format!("Service was not ready: {}", e.into()),
5887                    )
5888                })?;
5889            let codec = tonic::codec::ProstCodec::default();
5890            let path = http::uri::PathAndQuery::from_static(
5891                "/sui.rpc.v2beta2.SignatureVerificationService/VerifySignature",
5892            );
5893            let mut req = request.into_request();
5894            req.extensions_mut()
5895                .insert(
5896                    GrpcMethod::new(
5897                        "sui.rpc.v2beta2.SignatureVerificationService",
5898                        "VerifySignature",
5899                    ),
5900                );
5901            self.inner.unary(req, path, codec).await
5902        }
5903    }
5904}
5905/// Generated server implementations.
5906pub mod signature_verification_service_server {
5907    #![allow(
5908        unused_variables,
5909        dead_code,
5910        missing_docs,
5911        clippy::wildcard_imports,
5912        clippy::let_unit_value,
5913    )]
5914    use tonic::codegen::*;
5915    /// Generated trait containing gRPC methods that should be implemented for use with SignatureVerificationServiceServer.
5916    #[async_trait]
5917    pub trait SignatureVerificationService: std::marker::Send + std::marker::Sync + 'static {
5918        /// Perform signature verification of a UserSignature against the provided message.
5919        async fn verify_signature(
5920            &self,
5921            request: tonic::Request<super::VerifySignatureRequest>,
5922        ) -> std::result::Result<
5923            tonic::Response<super::VerifySignatureResponse>,
5924            tonic::Status,
5925        >;
5926    }
5927    #[derive(Debug)]
5928    pub struct SignatureVerificationServiceServer<T> {
5929        inner: Arc<T>,
5930        accept_compression_encodings: EnabledCompressionEncodings,
5931        send_compression_encodings: EnabledCompressionEncodings,
5932        max_decoding_message_size: Option<usize>,
5933        max_encoding_message_size: Option<usize>,
5934    }
5935    impl<T> SignatureVerificationServiceServer<T> {
5936        pub fn new(inner: T) -> Self {
5937            Self::from_arc(Arc::new(inner))
5938        }
5939        pub fn from_arc(inner: Arc<T>) -> Self {
5940            Self {
5941                inner,
5942                accept_compression_encodings: Default::default(),
5943                send_compression_encodings: Default::default(),
5944                max_decoding_message_size: None,
5945                max_encoding_message_size: None,
5946            }
5947        }
5948        pub fn with_interceptor<F>(
5949            inner: T,
5950            interceptor: F,
5951        ) -> InterceptedService<Self, F>
5952        where
5953            F: tonic::service::Interceptor,
5954        {
5955            InterceptedService::new(Self::new(inner), interceptor)
5956        }
5957        /// Enable decompressing requests with the given encoding.
5958        #[must_use]
5959        pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
5960            self.accept_compression_encodings.enable(encoding);
5961            self
5962        }
5963        /// Compress responses with the given encoding, if the client supports it.
5964        #[must_use]
5965        pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
5966            self.send_compression_encodings.enable(encoding);
5967            self
5968        }
5969        /// Limits the maximum size of a decoded message.
5970        ///
5971        /// Default: `4MB`
5972        #[must_use]
5973        pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
5974            self.max_decoding_message_size = Some(limit);
5975            self
5976        }
5977        /// Limits the maximum size of an encoded message.
5978        ///
5979        /// Default: `usize::MAX`
5980        #[must_use]
5981        pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
5982            self.max_encoding_message_size = Some(limit);
5983            self
5984        }
5985    }
5986    impl<T, B> tonic::codegen::Service<http::Request<B>>
5987    for SignatureVerificationServiceServer<T>
5988    where
5989        T: SignatureVerificationService,
5990        B: Body + std::marker::Send + 'static,
5991        B::Error: Into<StdError> + std::marker::Send + 'static,
5992    {
5993        type Response = http::Response<tonic::body::Body>;
5994        type Error = std::convert::Infallible;
5995        type Future = BoxFuture<Self::Response, Self::Error>;
5996        fn poll_ready(
5997            &mut self,
5998            _cx: &mut Context<'_>,
5999        ) -> Poll<std::result::Result<(), Self::Error>> {
6000            Poll::Ready(Ok(()))
6001        }
6002        fn call(&mut self, req: http::Request<B>) -> Self::Future {
6003            match req.uri().path() {
6004                "/sui.rpc.v2beta2.SignatureVerificationService/VerifySignature" => {
6005                    #[allow(non_camel_case_types)]
6006                    struct VerifySignatureSvc<T: SignatureVerificationService>(
6007                        pub Arc<T>,
6008                    );
6009                    impl<
6010                        T: SignatureVerificationService,
6011                    > tonic::server::UnaryService<super::VerifySignatureRequest>
6012                    for VerifySignatureSvc<T> {
6013                        type Response = super::VerifySignatureResponse;
6014                        type Future = BoxFuture<
6015                            tonic::Response<Self::Response>,
6016                            tonic::Status,
6017                        >;
6018                        fn call(
6019                            &mut self,
6020                            request: tonic::Request<super::VerifySignatureRequest>,
6021                        ) -> Self::Future {
6022                            let inner = Arc::clone(&self.0);
6023                            let fut = async move {
6024                                <T as SignatureVerificationService>::verify_signature(
6025                                        &inner,
6026                                        request,
6027                                    )
6028                                    .await
6029                            };
6030                            Box::pin(fut)
6031                        }
6032                    }
6033                    let accept_compression_encodings = self.accept_compression_encodings;
6034                    let send_compression_encodings = self.send_compression_encodings;
6035                    let max_decoding_message_size = self.max_decoding_message_size;
6036                    let max_encoding_message_size = self.max_encoding_message_size;
6037                    let inner = self.inner.clone();
6038                    let fut = async move {
6039                        let method = VerifySignatureSvc(inner);
6040                        let codec = tonic::codec::ProstCodec::default();
6041                        let mut grpc = tonic::server::Grpc::new(codec)
6042                            .apply_compression_config(
6043                                accept_compression_encodings,
6044                                send_compression_encodings,
6045                            )
6046                            .apply_max_message_size_config(
6047                                max_decoding_message_size,
6048                                max_encoding_message_size,
6049                            );
6050                        let res = grpc.unary(method, req).await;
6051                        Ok(res)
6052                    };
6053                    Box::pin(fut)
6054                }
6055                _ => {
6056                    Box::pin(async move {
6057                        let mut response = http::Response::new(
6058                            tonic::body::Body::default(),
6059                        );
6060                        let headers = response.headers_mut();
6061                        headers
6062                            .insert(
6063                                tonic::Status::GRPC_STATUS,
6064                                (tonic::Code::Unimplemented as i32).into(),
6065                            );
6066                        headers
6067                            .insert(
6068                                http::header::CONTENT_TYPE,
6069                                tonic::metadata::GRPC_CONTENT_TYPE,
6070                            );
6071                        Ok(response)
6072                    })
6073                }
6074            }
6075        }
6076    }
6077    impl<T> Clone for SignatureVerificationServiceServer<T> {
6078        fn clone(&self) -> Self {
6079            let inner = self.inner.clone();
6080            Self {
6081                inner,
6082                accept_compression_encodings: self.accept_compression_encodings,
6083                send_compression_encodings: self.send_compression_encodings,
6084                max_decoding_message_size: self.max_decoding_message_size,
6085                max_encoding_message_size: self.max_encoding_message_size,
6086            }
6087        }
6088    }
6089    /// Generated gRPC service name
6090    pub const SERVICE_NAME: &str = "sui.rpc.v2beta2.SignatureVerificationService";
6091    impl<T> tonic::server::NamedService for SignatureVerificationServiceServer<T> {
6092        const NAME: &'static str = SERVICE_NAME;
6093    }
6094}
6095/// Request message for SubscriptionService.SubscribeCheckpoints
6096#[non_exhaustive]
6097#[derive(Clone, PartialEq, ::prost::Message)]
6098pub struct SubscribeCheckpointsRequest {
6099    /// Optional. Mask for specifiying which parts of the
6100    /// SubscribeCheckpointsResponse should be returned.
6101    #[prost(message, optional, tag = "1")]
6102    pub read_mask: ::core::option::Option<::prost_types::FieldMask>,
6103}
6104/// Response message for SubscriptionService.SubscribeCheckpoints
6105#[non_exhaustive]
6106#[derive(Clone, PartialEq, ::prost::Message)]
6107pub struct SubscribeCheckpointsResponse {
6108    /// Required. The checkpoint sequence number and value of the current cursor
6109    /// into the checkpoint stream
6110    #[prost(uint64, optional, tag = "1")]
6111    pub cursor: ::core::option::Option<u64>,
6112    /// The requested data for this checkpoint
6113    #[prost(message, optional, tag = "2")]
6114    pub checkpoint: ::core::option::Option<Checkpoint>,
6115}
6116/// Generated client implementations.
6117pub mod subscription_service_client {
6118    #![allow(
6119        unused_variables,
6120        dead_code,
6121        missing_docs,
6122        clippy::wildcard_imports,
6123        clippy::let_unit_value,
6124    )]
6125    use tonic::codegen::*;
6126    use tonic::codegen::http::Uri;
6127    #[derive(Debug, Clone)]
6128    pub struct SubscriptionServiceClient<T> {
6129        inner: tonic::client::Grpc<T>,
6130    }
6131    impl SubscriptionServiceClient<tonic::transport::Channel> {
6132        /// Attempt to create a new client by connecting to a given endpoint.
6133        pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
6134        where
6135            D: TryInto<tonic::transport::Endpoint>,
6136            D::Error: Into<StdError>,
6137        {
6138            let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
6139            Ok(Self::new(conn))
6140        }
6141    }
6142    impl<T> SubscriptionServiceClient<T>
6143    where
6144        T: tonic::client::GrpcService<tonic::body::Body>,
6145        T::Error: Into<StdError>,
6146        T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static,
6147        <T::ResponseBody as Body>::Error: Into<StdError> + std::marker::Send,
6148    {
6149        pub fn new(inner: T) -> Self {
6150            let inner = tonic::client::Grpc::new(inner);
6151            Self { inner }
6152        }
6153        pub fn with_origin(inner: T, origin: Uri) -> Self {
6154            let inner = tonic::client::Grpc::with_origin(inner, origin);
6155            Self { inner }
6156        }
6157        pub fn with_interceptor<F>(
6158            inner: T,
6159            interceptor: F,
6160        ) -> SubscriptionServiceClient<InterceptedService<T, F>>
6161        where
6162            F: tonic::service::Interceptor,
6163            T::ResponseBody: Default,
6164            T: tonic::codegen::Service<
6165                http::Request<tonic::body::Body>,
6166                Response = http::Response<
6167                    <T as tonic::client::GrpcService<tonic::body::Body>>::ResponseBody,
6168                >,
6169            >,
6170            <T as tonic::codegen::Service<
6171                http::Request<tonic::body::Body>,
6172            >>::Error: Into<StdError> + std::marker::Send + std::marker::Sync,
6173        {
6174            SubscriptionServiceClient::new(InterceptedService::new(inner, interceptor))
6175        }
6176        /// Compress requests with the given encoding.
6177        ///
6178        /// This requires the server to support it otherwise it might respond with an
6179        /// error.
6180        #[must_use]
6181        pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
6182            self.inner = self.inner.send_compressed(encoding);
6183            self
6184        }
6185        /// Enable decompressing responses.
6186        #[must_use]
6187        pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
6188            self.inner = self.inner.accept_compressed(encoding);
6189            self
6190        }
6191        /// Limits the maximum size of a decoded message.
6192        ///
6193        /// Default: `4MB`
6194        #[must_use]
6195        pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
6196            self.inner = self.inner.max_decoding_message_size(limit);
6197            self
6198        }
6199        /// Limits the maximum size of an encoded message.
6200        ///
6201        /// Default: `usize::MAX`
6202        #[must_use]
6203        pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
6204            self.inner = self.inner.max_encoding_message_size(limit);
6205            self
6206        }
6207        /// Subscribe to the stream of checkpoints.
6208        ///
6209        /// This API provides a subscription to the checkpoint stream for the Sui
6210        /// blockchain. When a subscription is initialized the stream will begin with
6211        /// the latest executed checkpoint as seen by the server. Responses are
6212        /// guaranteed to return checkpoints in-order and without gaps. This enables
6213        /// clients to know exactly the last checkpoint they have processed and in the
6214        /// event the subscription terminates (either by the client/server or by the
6215        /// connection breaking), clients will be able to reinitailize a subscription
6216        /// and then leverage other APIs in order to request data for the checkpoints
6217        /// they missed.
6218        pub async fn subscribe_checkpoints(
6219            &mut self,
6220            request: impl tonic::IntoRequest<super::SubscribeCheckpointsRequest>,
6221        ) -> std::result::Result<
6222            tonic::Response<
6223                tonic::codec::Streaming<super::SubscribeCheckpointsResponse>,
6224            >,
6225            tonic::Status,
6226        > {
6227            self.inner
6228                .ready()
6229                .await
6230                .map_err(|e| {
6231                    tonic::Status::unknown(
6232                        format!("Service was not ready: {}", e.into()),
6233                    )
6234                })?;
6235            let codec = tonic::codec::ProstCodec::default();
6236            let path = http::uri::PathAndQuery::from_static(
6237                "/sui.rpc.v2beta2.SubscriptionService/SubscribeCheckpoints",
6238            );
6239            let mut req = request.into_request();
6240            req.extensions_mut()
6241                .insert(
6242                    GrpcMethod::new(
6243                        "sui.rpc.v2beta2.SubscriptionService",
6244                        "SubscribeCheckpoints",
6245                    ),
6246                );
6247            self.inner.server_streaming(req, path, codec).await
6248        }
6249    }
6250}
6251/// Generated server implementations.
6252pub mod subscription_service_server {
6253    #![allow(
6254        unused_variables,
6255        dead_code,
6256        missing_docs,
6257        clippy::wildcard_imports,
6258        clippy::let_unit_value,
6259    )]
6260    use tonic::codegen::*;
6261    /// Generated trait containing gRPC methods that should be implemented for use with SubscriptionServiceServer.
6262    #[async_trait]
6263    pub trait SubscriptionService: std::marker::Send + std::marker::Sync + 'static {
6264        /// Server streaming response type for the SubscribeCheckpoints method.
6265        type SubscribeCheckpointsStream: tonic::codegen::tokio_stream::Stream<
6266                Item = std::result::Result<
6267                    super::SubscribeCheckpointsResponse,
6268                    tonic::Status,
6269                >,
6270            >
6271            + std::marker::Send
6272            + 'static;
6273        /// Subscribe to the stream of checkpoints.
6274        ///
6275        /// This API provides a subscription to the checkpoint stream for the Sui
6276        /// blockchain. When a subscription is initialized the stream will begin with
6277        /// the latest executed checkpoint as seen by the server. Responses are
6278        /// guaranteed to return checkpoints in-order and without gaps. This enables
6279        /// clients to know exactly the last checkpoint they have processed and in the
6280        /// event the subscription terminates (either by the client/server or by the
6281        /// connection breaking), clients will be able to reinitailize a subscription
6282        /// and then leverage other APIs in order to request data for the checkpoints
6283        /// they missed.
6284        async fn subscribe_checkpoints(
6285            &self,
6286            request: tonic::Request<super::SubscribeCheckpointsRequest>,
6287        ) -> std::result::Result<
6288            tonic::Response<Self::SubscribeCheckpointsStream>,
6289            tonic::Status,
6290        >;
6291    }
6292    #[derive(Debug)]
6293    pub struct SubscriptionServiceServer<T> {
6294        inner: Arc<T>,
6295        accept_compression_encodings: EnabledCompressionEncodings,
6296        send_compression_encodings: EnabledCompressionEncodings,
6297        max_decoding_message_size: Option<usize>,
6298        max_encoding_message_size: Option<usize>,
6299    }
6300    impl<T> SubscriptionServiceServer<T> {
6301        pub fn new(inner: T) -> Self {
6302            Self::from_arc(Arc::new(inner))
6303        }
6304        pub fn from_arc(inner: Arc<T>) -> Self {
6305            Self {
6306                inner,
6307                accept_compression_encodings: Default::default(),
6308                send_compression_encodings: Default::default(),
6309                max_decoding_message_size: None,
6310                max_encoding_message_size: None,
6311            }
6312        }
6313        pub fn with_interceptor<F>(
6314            inner: T,
6315            interceptor: F,
6316        ) -> InterceptedService<Self, F>
6317        where
6318            F: tonic::service::Interceptor,
6319        {
6320            InterceptedService::new(Self::new(inner), interceptor)
6321        }
6322        /// Enable decompressing requests with the given encoding.
6323        #[must_use]
6324        pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
6325            self.accept_compression_encodings.enable(encoding);
6326            self
6327        }
6328        /// Compress responses with the given encoding, if the client supports it.
6329        #[must_use]
6330        pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
6331            self.send_compression_encodings.enable(encoding);
6332            self
6333        }
6334        /// Limits the maximum size of a decoded message.
6335        ///
6336        /// Default: `4MB`
6337        #[must_use]
6338        pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
6339            self.max_decoding_message_size = Some(limit);
6340            self
6341        }
6342        /// Limits the maximum size of an encoded message.
6343        ///
6344        /// Default: `usize::MAX`
6345        #[must_use]
6346        pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
6347            self.max_encoding_message_size = Some(limit);
6348            self
6349        }
6350    }
6351    impl<T, B> tonic::codegen::Service<http::Request<B>> for SubscriptionServiceServer<T>
6352    where
6353        T: SubscriptionService,
6354        B: Body + std::marker::Send + 'static,
6355        B::Error: Into<StdError> + std::marker::Send + 'static,
6356    {
6357        type Response = http::Response<tonic::body::Body>;
6358        type Error = std::convert::Infallible;
6359        type Future = BoxFuture<Self::Response, Self::Error>;
6360        fn poll_ready(
6361            &mut self,
6362            _cx: &mut Context<'_>,
6363        ) -> Poll<std::result::Result<(), Self::Error>> {
6364            Poll::Ready(Ok(()))
6365        }
6366        fn call(&mut self, req: http::Request<B>) -> Self::Future {
6367            match req.uri().path() {
6368                "/sui.rpc.v2beta2.SubscriptionService/SubscribeCheckpoints" => {
6369                    #[allow(non_camel_case_types)]
6370                    struct SubscribeCheckpointsSvc<T: SubscriptionService>(pub Arc<T>);
6371                    impl<
6372                        T: SubscriptionService,
6373                    > tonic::server::ServerStreamingService<
6374                        super::SubscribeCheckpointsRequest,
6375                    > for SubscribeCheckpointsSvc<T> {
6376                        type Response = super::SubscribeCheckpointsResponse;
6377                        type ResponseStream = T::SubscribeCheckpointsStream;
6378                        type Future = BoxFuture<
6379                            tonic::Response<Self::ResponseStream>,
6380                            tonic::Status,
6381                        >;
6382                        fn call(
6383                            &mut self,
6384                            request: tonic::Request<super::SubscribeCheckpointsRequest>,
6385                        ) -> Self::Future {
6386                            let inner = Arc::clone(&self.0);
6387                            let fut = async move {
6388                                <T as SubscriptionService>::subscribe_checkpoints(
6389                                        &inner,
6390                                        request,
6391                                    )
6392                                    .await
6393                            };
6394                            Box::pin(fut)
6395                        }
6396                    }
6397                    let accept_compression_encodings = self.accept_compression_encodings;
6398                    let send_compression_encodings = self.send_compression_encodings;
6399                    let max_decoding_message_size = self.max_decoding_message_size;
6400                    let max_encoding_message_size = self.max_encoding_message_size;
6401                    let inner = self.inner.clone();
6402                    let fut = async move {
6403                        let method = SubscribeCheckpointsSvc(inner);
6404                        let codec = tonic::codec::ProstCodec::default();
6405                        let mut grpc = tonic::server::Grpc::new(codec)
6406                            .apply_compression_config(
6407                                accept_compression_encodings,
6408                                send_compression_encodings,
6409                            )
6410                            .apply_max_message_size_config(
6411                                max_decoding_message_size,
6412                                max_encoding_message_size,
6413                            );
6414                        let res = grpc.server_streaming(method, req).await;
6415                        Ok(res)
6416                    };
6417                    Box::pin(fut)
6418                }
6419                _ => {
6420                    Box::pin(async move {
6421                        let mut response = http::Response::new(
6422                            tonic::body::Body::default(),
6423                        );
6424                        let headers = response.headers_mut();
6425                        headers
6426                            .insert(
6427                                tonic::Status::GRPC_STATUS,
6428                                (tonic::Code::Unimplemented as i32).into(),
6429                            );
6430                        headers
6431                            .insert(
6432                                http::header::CONTENT_TYPE,
6433                                tonic::metadata::GRPC_CONTENT_TYPE,
6434                            );
6435                        Ok(response)
6436                    })
6437                }
6438            }
6439        }
6440    }
6441    impl<T> Clone for SubscriptionServiceServer<T> {
6442        fn clone(&self) -> Self {
6443            let inner = self.inner.clone();
6444            Self {
6445                inner,
6446                accept_compression_encodings: self.accept_compression_encodings,
6447                send_compression_encodings: self.send_compression_encodings,
6448                max_decoding_message_size: self.max_decoding_message_size,
6449                max_encoding_message_size: self.max_encoding_message_size,
6450            }
6451        }
6452    }
6453    /// Generated gRPC service name
6454    pub const SERVICE_NAME: &str = "sui.rpc.v2beta2.SubscriptionService";
6455    impl<T> tonic::server::NamedService for SubscriptionServiceServer<T> {
6456        const NAME: &'static str = SERVICE_NAME;
6457    }
6458}
6459#[non_exhaustive]
6460#[derive(Clone, PartialEq, ::prost::Message)]
6461pub struct SystemState {
6462    /// The version of the system state data structure type.
6463    #[prost(uint64, optional, tag = "1")]
6464    pub version: ::core::option::Option<u64>,
6465    /// The epoch id
6466    #[prost(uint64, optional, tag = "2")]
6467    pub epoch: ::core::option::Option<u64>,
6468    /// The protocol version
6469    #[prost(uint64, optional, tag = "3")]
6470    pub protocol_version: ::core::option::Option<u64>,
6471    /// Information about the validators
6472    #[prost(message, optional, tag = "4")]
6473    pub validators: ::core::option::Option<ValidatorSet>,
6474    /// Storage Fund info
6475    #[prost(message, optional, tag = "5")]
6476    pub storage_fund: ::core::option::Option<StorageFund>,
6477    /// Set of system config parameters
6478    #[prost(message, optional, tag = "6")]
6479    pub parameters: ::core::option::Option<SystemParameters>,
6480    /// The reference gas price for this epoch
6481    #[prost(uint64, optional, tag = "7")]
6482    pub reference_gas_price: ::core::option::Option<u64>,
6483    /// A list of the records of validator reporting each other.
6484    ///
6485    /// There is an entry in this list for each validator that has been reported
6486    /// at least once. Each record contains all the validators that reported
6487    /// them. If a validator has never been reported they don't have a record in this list.
6488    /// This lists persists across epoch: a peer continues being in a reported state until the
6489    /// reporter doesn't explicitly remove their report.
6490    #[prost(message, repeated, tag = "8")]
6491    pub validator_report_records: ::prost::alloc::vec::Vec<ValidatorReportRecord>,
6492    /// Schedule of stake subsidies given out each epoch.
6493    #[prost(message, optional, tag = "9")]
6494    pub stake_subsidy: ::core::option::Option<StakeSubsidy>,
6495    /// Whether the system is running in a downgraded safe mode due to a non-recoverable bug.
6496    /// This is set whenever we failed to execute advance_epoch, and ended up executing advance_epoch_safe_mode.
6497    /// It can be reset once we are able to successfully execute advance_epoch.
6498    /// The rest of the fields starting with `safe_mode_` are accumulated during safe mode
6499    /// when advance_epoch_safe_mode is executed. They will eventually be processed once we
6500    /// are out of safe mode.
6501    #[prost(bool, optional, tag = "10")]
6502    pub safe_mode: ::core::option::Option<bool>,
6503    /// Storage rewards accumulated during safe_mode
6504    #[prost(uint64, optional, tag = "11")]
6505    pub safe_mode_storage_rewards: ::core::option::Option<u64>,
6506    /// Computation rewards accumulated during safe_mode
6507    #[prost(uint64, optional, tag = "12")]
6508    pub safe_mode_computation_rewards: ::core::option::Option<u64>,
6509    /// Storage rebates paid out during safe_mode
6510    #[prost(uint64, optional, tag = "13")]
6511    pub safe_mode_storage_rebates: ::core::option::Option<u64>,
6512    /// Nonrefundable storage fees accumulated during safe_mode
6513    #[prost(uint64, optional, tag = "14")]
6514    pub safe_mode_non_refundable_storage_fee: ::core::option::Option<u64>,
6515    /// Unix timestamp of when this this epoch started
6516    #[prost(uint64, optional, tag = "15")]
6517    pub epoch_start_timestamp_ms: ::core::option::Option<u64>,
6518    /// Any extra fields that's not defined statically.
6519    #[prost(message, optional, tag = "16")]
6520    pub extra_fields: ::core::option::Option<MoveTable>,
6521}
6522#[non_exhaustive]
6523#[derive(Clone, PartialEq, ::prost::Message)]
6524pub struct ValidatorReportRecord {
6525    /// The address of the validator being reported
6526    #[prost(string, optional, tag = "1")]
6527    pub reported: ::core::option::Option<::prost::alloc::string::String>,
6528    /// The list of validator (addresses) that are reporting on the validator specified by `reported`
6529    #[prost(string, repeated, tag = "2")]
6530    pub reporters: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
6531}
6532#[non_exhaustive]
6533#[derive(Clone, PartialEq, ::prost::Message)]
6534pub struct SystemParameters {
6535    /// The duration of an epoch, in milliseconds.
6536    #[prost(uint64, optional, tag = "1")]
6537    pub epoch_duration_ms: ::core::option::Option<u64>,
6538    /// The starting epoch in which stake subsidies start being paid out
6539    #[prost(uint64, optional, tag = "2")]
6540    pub stake_subsidy_start_epoch: ::core::option::Option<u64>,
6541    /// Minimum number of active validators at any moment.
6542    #[prost(uint64, optional, tag = "3")]
6543    pub min_validator_count: ::core::option::Option<u64>,
6544    /// Maximum number of active validators at any moment.
6545    /// We do not allow the number of validators in any epoch to go above this.
6546    #[prost(uint64, optional, tag = "4")]
6547    pub max_validator_count: ::core::option::Option<u64>,
6548    /// Deprecated.
6549    /// Lower-bound on the amount of stake required to become a validator.
6550    #[prost(uint64, optional, tag = "5")]
6551    pub min_validator_joining_stake: ::core::option::Option<u64>,
6552    /// Deprecated.
6553    /// Validators with stake amount below `validator_low_stake_threshold` are considered to
6554    /// have low stake and will be escorted out of the validator set after being below this
6555    /// threshold for more than `validator_low_stake_grace_period` number of epochs.
6556    #[prost(uint64, optional, tag = "6")]
6557    pub validator_low_stake_threshold: ::core::option::Option<u64>,
6558    /// Deprecated.
6559    /// Validators with stake below `validator_very_low_stake_threshold` will be removed
6560    /// immediately at epoch change, no grace period.
6561    #[prost(uint64, optional, tag = "7")]
6562    pub validator_very_low_stake_threshold: ::core::option::Option<u64>,
6563    /// A validator can have stake below `validator_low_stake_threshold`
6564    /// for this many epochs before being kicked out.
6565    #[prost(uint64, optional, tag = "8")]
6566    pub validator_low_stake_grace_period: ::core::option::Option<u64>,
6567    /// Any extra fields that are not defined statically.
6568    #[prost(message, optional, tag = "9")]
6569    pub extra_fields: ::core::option::Option<MoveTable>,
6570}
6571/// A message that represents a Move `0x2::table::Table` or `0x2::bag::Bag`
6572#[non_exhaustive]
6573#[derive(Clone, PartialEq, ::prost::Message)]
6574pub struct MoveTable {
6575    /// The UID of the table or bag
6576    #[prost(string, optional, tag = "1")]
6577    pub id: ::core::option::Option<::prost::alloc::string::String>,
6578    /// The size or number of key-value pairs in the table or bag
6579    #[prost(uint64, optional, tag = "2")]
6580    pub size: ::core::option::Option<u64>,
6581}
6582#[non_exhaustive]
6583#[derive(Clone, PartialEq, ::prost::Message)]
6584pub struct StakeSubsidy {
6585    /// Balance of SUI set aside for stake subsidies that will be drawn down over time.
6586    #[prost(uint64, optional, tag = "1")]
6587    pub balance: ::core::option::Option<u64>,
6588    /// Count of the number of times stake subsidies have been distributed.
6589    #[prost(uint64, optional, tag = "2")]
6590    pub distribution_counter: ::core::option::Option<u64>,
6591    /// The amount of stake subsidy to be drawn down per distribution.
6592    /// This amount decays and decreases over time.
6593    #[prost(uint64, optional, tag = "3")]
6594    pub current_distribution_amount: ::core::option::Option<u64>,
6595    /// Number of distributions to occur before the distribution amount decays.
6596    #[prost(uint64, optional, tag = "4")]
6597    pub stake_subsidy_period_length: ::core::option::Option<u64>,
6598    /// The rate at which the distribution amount decays at the end of each
6599    /// period. Expressed in basis points.
6600    #[prost(uint32, optional, tag = "5")]
6601    pub stake_subsidy_decrease_rate: ::core::option::Option<u32>,
6602    /// Any extra fields that's not defined statically.
6603    #[prost(message, optional, tag = "6")]
6604    pub extra_fields: ::core::option::Option<MoveTable>,
6605}
6606/// Struct representing the onchain storage fund.
6607#[non_exhaustive]
6608#[derive(Clone, Copy, PartialEq, ::prost::Message)]
6609pub struct StorageFund {
6610    /// This is the sum of `storage_rebate` of
6611    /// all objects currently stored on-chain. To maintain this invariant, the only inflow of this
6612    /// balance is storage charges collected from transactions, and the only outflow is storage rebates
6613    /// of transactions, including both the portion refunded to the transaction senders as well as
6614    /// the non-refundable portion taken out and put into `non_refundable_balance`.
6615    #[prost(uint64, optional, tag = "1")]
6616    pub total_object_storage_rebates: ::core::option::Option<u64>,
6617    /// Represents any remaining inflow of the storage fund that should not
6618    /// be taken out of the fund.
6619    #[prost(uint64, optional, tag = "2")]
6620    pub non_refundable_balance: ::core::option::Option<u64>,
6621}
6622#[non_exhaustive]
6623#[derive(Clone, PartialEq, ::prost::Message)]
6624pub struct ValidatorSet {
6625    /// Total amount of stake from all active validators at the beginning of the epoch.
6626    /// Written only once per epoch, in `advance_epoch` function.
6627    #[prost(uint64, optional, tag = "1")]
6628    pub total_stake: ::core::option::Option<u64>,
6629    /// The current list of active validators.
6630    #[prost(message, repeated, tag = "2")]
6631    pub active_validators: ::prost::alloc::vec::Vec<Validator>,
6632    /// List of new validator candidates added during the current epoch.
6633    /// They will be processed at the end of the epoch.
6634    ///
6635    /// key: u64 (index), value: 0x3::validator::Validator
6636    #[prost(message, optional, tag = "3")]
6637    pub pending_active_validators: ::core::option::Option<MoveTable>,
6638    /// Removal requests from the validators. Each element is an index
6639    /// pointing to `active_validators`.
6640    #[prost(uint64, repeated, tag = "4")]
6641    pub pending_removals: ::prost::alloc::vec::Vec<u64>,
6642    /// Mappings from staking pool's ID to the sui address of a validator.
6643    ///
6644    /// key: address (staking pool Id), value: address (sui address of the validator)
6645    #[prost(message, optional, tag = "5")]
6646    pub staking_pool_mappings: ::core::option::Option<MoveTable>,
6647    /// Mapping from a staking pool ID to the inactive validator that has that pool as its staking pool.
6648    /// When a validator is deactivated the validator is removed from `active_validators` it
6649    /// is added to this table so that stakers can continue to withdraw their stake from it.
6650    ///
6651    /// key: address (staking pool Id), value: 0x3::validator_wrapper::ValidatorWrapper
6652    #[prost(message, optional, tag = "6")]
6653    pub inactive_validators: ::core::option::Option<MoveTable>,
6654    /// Table storing preactive/candidate validators, mapping their addresses to their `Validator ` structs.
6655    /// When an address calls `request_add_validator_candidate`, they get added to this table and become a preactive
6656    /// validator.
6657    /// When the candidate has met the min stake requirement, they can call `request_add_validator` to
6658    /// officially add them to the active validator set `active_validators` next epoch.
6659    ///
6660    /// key: address (sui address of the validator), value: 0x3::validator_wrapper::ValidatorWrapper
6661    #[prost(message, optional, tag = "7")]
6662    pub validator_candidates: ::core::option::Option<MoveTable>,
6663    /// Table storing the number of epochs during which a validator's stake has been below the low stake threshold.
6664    #[prost(btree_map = "string, uint64", tag = "8")]
6665    pub at_risk_validators: ::prost::alloc::collections::BTreeMap<
6666        ::prost::alloc::string::String,
6667        u64,
6668    >,
6669    /// Any extra fields that's not defined statically.
6670    #[prost(message, optional, tag = "9")]
6671    pub extra_fields: ::core::option::Option<MoveTable>,
6672}
6673/// Definition of a Validator in the system contracts
6674///
6675/// Note: fields of ValidatorMetadata are flattened into this type
6676#[non_exhaustive]
6677#[derive(Clone, PartialEq, ::prost::Message)]
6678pub struct Validator {
6679    /// A unique human-readable name of this validator.
6680    #[prost(string, optional, tag = "1")]
6681    pub name: ::core::option::Option<::prost::alloc::string::String>,
6682    /// The Sui Address of the validator. This is the sender that created the Validator object,
6683    /// and also the address to send validator/coins to during withdraws.
6684    #[prost(string, optional, tag = "2")]
6685    pub address: ::core::option::Option<::prost::alloc::string::String>,
6686    #[prost(string, optional, tag = "3")]
6687    pub description: ::core::option::Option<::prost::alloc::string::String>,
6688    #[prost(string, optional, tag = "4")]
6689    pub image_url: ::core::option::Option<::prost::alloc::string::String>,
6690    #[prost(string, optional, tag = "5")]
6691    pub project_url: ::core::option::Option<::prost::alloc::string::String>,
6692    /// The public key bytes corresponding to the private key that the validator
6693    /// holds to sign transactions. For now, this is the same as AuthorityName.
6694    #[prost(bytes = "bytes", optional, tag = "7")]
6695    pub protocol_public_key: ::core::option::Option<::prost::bytes::Bytes>,
6696    /// This is a proof that the validator has ownership of the protocol private key
6697    #[prost(bytes = "bytes", optional, tag = "8")]
6698    pub proof_of_possession: ::core::option::Option<::prost::bytes::Bytes>,
6699    /// The public key bytes corresponding to the private key that the validator
6700    /// uses to establish TLS connections
6701    #[prost(bytes = "bytes", optional, tag = "10")]
6702    pub network_public_key: ::core::option::Option<::prost::bytes::Bytes>,
6703    /// The public key bytes correstponding to the Narwhal Worker
6704    #[prost(bytes = "bytes", optional, tag = "12")]
6705    pub worker_public_key: ::core::option::Option<::prost::bytes::Bytes>,
6706    /// The network address of the validator (could also contain extra info such as port, DNS and etc.).
6707    #[prost(string, optional, tag = "13")]
6708    pub network_address: ::core::option::Option<::prost::alloc::string::String>,
6709    /// The address of the validator used for p2p activities such as state sync (could also contain extra info such as port, DNS and etc.).
6710    #[prost(string, optional, tag = "14")]
6711    pub p2p_address: ::core::option::Option<::prost::alloc::string::String>,
6712    /// The address of the narwhal primary
6713    #[prost(string, optional, tag = "15")]
6714    pub primary_address: ::core::option::Option<::prost::alloc::string::String>,
6715    /// The address of the narwhal worker
6716    #[prost(string, optional, tag = "16")]
6717    pub worker_address: ::core::option::Option<::prost::alloc::string::String>,
6718    #[prost(bytes = "bytes", optional, tag = "18")]
6719    pub next_epoch_protocol_public_key: ::core::option::Option<::prost::bytes::Bytes>,
6720    #[prost(bytes = "bytes", optional, tag = "19")]
6721    pub next_epoch_proof_of_possession: ::core::option::Option<::prost::bytes::Bytes>,
6722    #[prost(bytes = "bytes", optional, tag = "21")]
6723    pub next_epoch_network_public_key: ::core::option::Option<::prost::bytes::Bytes>,
6724    #[prost(bytes = "bytes", optional, tag = "23")]
6725    pub next_epoch_worker_public_key: ::core::option::Option<::prost::bytes::Bytes>,
6726    #[prost(string, optional, tag = "24")]
6727    pub next_epoch_network_address: ::core::option::Option<
6728        ::prost::alloc::string::String,
6729    >,
6730    #[prost(string, optional, tag = "25")]
6731    pub next_epoch_p2p_address: ::core::option::Option<::prost::alloc::string::String>,
6732    #[prost(string, optional, tag = "26")]
6733    pub next_epoch_primary_address: ::core::option::Option<
6734        ::prost::alloc::string::String,
6735    >,
6736    #[prost(string, optional, tag = "27")]
6737    pub next_epoch_worker_address: ::core::option::Option<
6738        ::prost::alloc::string::String,
6739    >,
6740    /// Any extra fields that's not defined statically in the `ValidatorMetadata` struct
6741    #[prost(message, optional, tag = "28")]
6742    pub metadata_extra_fields: ::core::option::Option<MoveTable>,
6743    /// The voting power of this validator, which might be different from its
6744    /// stake amount.
6745    #[prost(uint64, optional, tag = "29")]
6746    pub voting_power: ::core::option::Option<u64>,
6747    /// The ID of this validator's current valid `UnverifiedValidatorOperationCap`
6748    #[prost(string, optional, tag = "30")]
6749    pub operation_cap_id: ::core::option::Option<::prost::alloc::string::String>,
6750    /// Gas price quote, updated only at end of epoch.
6751    #[prost(uint64, optional, tag = "31")]
6752    pub gas_price: ::core::option::Option<u64>,
6753    /// Staking pool for this validator.
6754    #[prost(message, optional, tag = "32")]
6755    pub staking_pool: ::core::option::Option<StakingPool>,
6756    /// Commission rate of the validator, in basis point.
6757    #[prost(uint64, optional, tag = "33")]
6758    pub commission_rate: ::core::option::Option<u64>,
6759    /// Total amount of stake that would be active in the next epoch.
6760    #[prost(uint64, optional, tag = "34")]
6761    pub next_epoch_stake: ::core::option::Option<u64>,
6762    /// This validator's gas price quote for the next epoch.
6763    #[prost(uint64, optional, tag = "35")]
6764    pub next_epoch_gas_price: ::core::option::Option<u64>,
6765    /// The commission rate of the validator starting the next epoch, in basis point.
6766    #[prost(uint64, optional, tag = "36")]
6767    pub next_epoch_commission_rate: ::core::option::Option<u64>,
6768    /// Any extra fields that's not defined statically.
6769    #[prost(message, optional, tag = "37")]
6770    pub extra_fields: ::core::option::Option<MoveTable>,
6771}
6772/// A staking pool embedded in each validator struct in the system state object.
6773#[non_exhaustive]
6774#[derive(Clone, PartialEq, ::prost::Message)]
6775pub struct StakingPool {
6776    /// UID of the StakingPool object
6777    #[prost(string, optional, tag = "1")]
6778    pub id: ::core::option::Option<::prost::alloc::string::String>,
6779    /// The epoch at which this pool became active.
6780    /// The value is `None` if the pool is pre-active and `Some(<epoch_number>)` if active or inactive.
6781    #[prost(uint64, optional, tag = "2")]
6782    pub activation_epoch: ::core::option::Option<u64>,
6783    /// The epoch at which this staking pool ceased to be active. `None` = {pre-active, active},
6784    /// `Some(<epoch_number>)` if in-active, and it was de-activated at epoch `<epoch_number>`.
6785    #[prost(uint64, optional, tag = "3")]
6786    pub deactivation_epoch: ::core::option::Option<u64>,
6787    /// The total number of SUI tokens in this pool, including the SUI in the rewards_pool, as well as in all the principal
6788    /// in the `StakedSui` object, updated at epoch boundaries.
6789    #[prost(uint64, optional, tag = "4")]
6790    pub sui_balance: ::core::option::Option<u64>,
6791    /// The epoch stake rewards will be added here at the end of each epoch.
6792    #[prost(uint64, optional, tag = "5")]
6793    pub rewards_pool: ::core::option::Option<u64>,
6794    /// Total number of pool tokens issued by the pool.
6795    #[prost(uint64, optional, tag = "6")]
6796    pub pool_token_balance: ::core::option::Option<u64>,
6797    /// Exchange rate history of previous epochs.
6798    ///
6799    /// The entries start from the `activation_epoch` of this pool and contains exchange rates at the beginning of each epoch,
6800    /// i.e., right after the rewards for the previous epoch have been deposited into the pool.
6801    ///
6802    /// key: u64 (epoch number), value: PoolTokenExchangeRate
6803    #[prost(message, optional, tag = "7")]
6804    pub exchange_rates: ::core::option::Option<MoveTable>,
6805    /// Pending stake amount for this epoch, emptied at epoch boundaries.
6806    #[prost(uint64, optional, tag = "8")]
6807    pub pending_stake: ::core::option::Option<u64>,
6808    /// Pending stake withdrawn during the current epoch, emptied at epoch boundaries.
6809    /// This includes both the principal and rewards SUI withdrawn.
6810    #[prost(uint64, optional, tag = "9")]
6811    pub pending_total_sui_withdraw: ::core::option::Option<u64>,
6812    /// Pending pool token withdrawn during the current epoch, emptied at epoch boundaries.
6813    #[prost(uint64, optional, tag = "10")]
6814    pub pending_pool_token_withdraw: ::core::option::Option<u64>,
6815    /// Any extra fields that's not defined statically.
6816    #[prost(message, optional, tag = "11")]
6817    pub extra_fields: ::core::option::Option<MoveTable>,
6818}
6819/// A transaction.
6820#[non_exhaustive]
6821#[derive(Clone, PartialEq, ::prost::Message)]
6822pub struct Transaction {
6823    /// This Transaction serialized as BCS.
6824    #[prost(message, optional, tag = "1")]
6825    pub bcs: ::core::option::Option<Bcs>,
6826    /// The digest of this Transaction.
6827    #[prost(string, optional, tag = "2")]
6828    pub digest: ::core::option::Option<::prost::alloc::string::String>,
6829    /// Version of this Transaction.
6830    #[prost(int32, optional, tag = "3")]
6831    pub version: ::core::option::Option<i32>,
6832    #[prost(message, optional, tag = "4")]
6833    pub kind: ::core::option::Option<TransactionKind>,
6834    #[prost(string, optional, tag = "5")]
6835    pub sender: ::core::option::Option<::prost::alloc::string::String>,
6836    #[prost(message, optional, tag = "6")]
6837    pub gas_payment: ::core::option::Option<GasPayment>,
6838    #[prost(message, optional, tag = "7")]
6839    pub expiration: ::core::option::Option<TransactionExpiration>,
6840}
6841/// Payment information for executing a transaction.
6842#[non_exhaustive]
6843#[derive(Clone, PartialEq, ::prost::Message)]
6844pub struct GasPayment {
6845    /// Set of gas objects to use for payment.
6846    #[prost(message, repeated, tag = "1")]
6847    pub objects: ::prost::alloc::vec::Vec<ObjectReference>,
6848    /// Owner of the gas objects, either the transaction sender or a sponsor.
6849    #[prost(string, optional, tag = "2")]
6850    pub owner: ::core::option::Option<::prost::alloc::string::String>,
6851    /// Gas unit price to use when charging for computation.
6852    ///
6853    /// Must be greater than or equal to the network's current RGP (reference gas price).
6854    #[prost(uint64, optional, tag = "3")]
6855    pub price: ::core::option::Option<u64>,
6856    /// Total budget willing to spend for the execution of a transaction.
6857    #[prost(uint64, optional, tag = "4")]
6858    pub budget: ::core::option::Option<u64>,
6859}
6860/// A TTL for a transaction.
6861#[non_exhaustive]
6862#[derive(Clone, Copy, PartialEq, ::prost::Message)]
6863pub struct TransactionExpiration {
6864    #[prost(
6865        enumeration = "transaction_expiration::TransactionExpirationKind",
6866        optional,
6867        tag = "1"
6868    )]
6869    pub kind: ::core::option::Option<i32>,
6870    #[prost(uint64, optional, tag = "2")]
6871    pub epoch: ::core::option::Option<u64>,
6872}
6873/// Nested message and enum types in `TransactionExpiration`.
6874pub mod transaction_expiration {
6875    #[non_exhaustive]
6876    #[derive(
6877        Clone,
6878        Copy,
6879        Debug,
6880        PartialEq,
6881        Eq,
6882        Hash,
6883        PartialOrd,
6884        Ord,
6885        ::prost::Enumeration
6886    )]
6887    #[repr(i32)]
6888    pub enum TransactionExpirationKind {
6889        Unknown = 0,
6890        /// The transaction has no expiration.
6891        None = 1,
6892        /// Validators won't sign and execute transaction unless the expiration epoch
6893        /// is greater than or equal to the current epoch.
6894        Epoch = 2,
6895    }
6896    impl TransactionExpirationKind {
6897        /// String value of the enum field names used in the ProtoBuf definition.
6898        ///
6899        /// The values are not transformed in any way and thus are considered stable
6900        /// (if the ProtoBuf definition does not change) and safe for programmatic use.
6901        pub fn as_str_name(&self) -> &'static str {
6902            match self {
6903                Self::Unknown => "TRANSACTION_EXPIRATION_KIND_UNKNOWN",
6904                Self::None => "NONE",
6905                Self::Epoch => "EPOCH",
6906            }
6907        }
6908        /// Creates an enum from field names used in the ProtoBuf definition.
6909        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
6910            match value {
6911                "TRANSACTION_EXPIRATION_KIND_UNKNOWN" => Some(Self::Unknown),
6912                "NONE" => Some(Self::None),
6913                "EPOCH" => Some(Self::Epoch),
6914                _ => None,
6915            }
6916        }
6917    }
6918}
6919/// Transaction type.
6920#[non_exhaustive]
6921#[derive(Clone, PartialEq, ::prost::Message)]
6922pub struct TransactionKind {
6923    #[prost(
6924        oneof = "transaction_kind::Kind",
6925        tags = "2, 3, 100, 101, 102, 103, 104, 105, 106, 107, 108"
6926    )]
6927    pub kind: ::core::option::Option<transaction_kind::Kind>,
6928}
6929/// Nested message and enum types in `TransactionKind`.
6930pub mod transaction_kind {
6931    #[non_exhaustive]
6932    #[derive(Clone, PartialEq, ::prost::Oneof)]
6933    pub enum Kind {
6934        /// A user transaction comprised of a list of native commands and Move calls.
6935        #[prost(message, tag = "2")]
6936        ProgrammableTransaction(super::ProgrammableTransaction),
6937        /// A system transaction comprised of a list of native commands and Move calls.
6938        #[prost(message, tag = "3")]
6939        ProgrammableSystemTransaction(super::ProgrammableTransaction),
6940        /// System transaction used to end an epoch.
6941        ///
6942        /// The `ChangeEpoch` variant is now deprecated (but the `ChangeEpoch` struct is still used by
6943        /// `EndOfEpochTransaction`).
6944        #[prost(message, tag = "100")]
6945        ChangeEpoch(super::ChangeEpoch),
6946        /// Transaction used to initialize the chain state.
6947        ///
6948        /// Only valid if in the genesis checkpoint (0) and if this is the very first transaction ever
6949        /// executed on the chain.
6950        #[prost(message, tag = "101")]
6951        Genesis(super::GenesisTransaction),
6952        /// V1 consensus commit update.
6953        #[prost(message, tag = "102")]
6954        ConsensusCommitPrologueV1(super::ConsensusCommitPrologue),
6955        /// Update set of valid JWKs used for zklogin.
6956        #[prost(message, tag = "103")]
6957        AuthenticatorStateUpdate(super::AuthenticatorStateUpdate),
6958        /// Set of operations to run at the end of the epoch to close out the current epoch and start
6959        /// the next one.
6960        #[prost(message, tag = "104")]
6961        EndOfEpoch(super::EndOfEpochTransaction),
6962        /// Randomness update.
6963        #[prost(message, tag = "105")]
6964        RandomnessStateUpdate(super::RandomnessStateUpdate),
6965        /// V2 consensus commit update.
6966        #[prost(message, tag = "106")]
6967        ConsensusCommitPrologueV2(super::ConsensusCommitPrologue),
6968        /// V3 consensus commit update.
6969        #[prost(message, tag = "107")]
6970        ConsensusCommitPrologueV3(super::ConsensusCommitPrologue),
6971        /// V4 consensus commit update.
6972        #[prost(message, tag = "108")]
6973        ConsensusCommitPrologueV4(super::ConsensusCommitPrologue),
6974    }
6975}
6976/// A user transaction.
6977///
6978/// Contains a series of native commands and Move calls where the results of one command can be
6979/// used in future commands.
6980#[non_exhaustive]
6981#[derive(Clone, PartialEq, ::prost::Message)]
6982pub struct ProgrammableTransaction {
6983    /// Input objects or primitive values.
6984    #[prost(message, repeated, tag = "1")]
6985    pub inputs: ::prost::alloc::vec::Vec<Input>,
6986    /// The commands to be executed sequentially. A failure in any command
6987    /// results in the failure of the entire transaction.
6988    #[prost(message, repeated, tag = "2")]
6989    pub commands: ::prost::alloc::vec::Vec<Command>,
6990}
6991/// A single command in a programmable transaction.
6992#[non_exhaustive]
6993#[derive(Clone, PartialEq, ::prost::Message)]
6994pub struct Command {
6995    #[prost(oneof = "command::Command", tags = "1, 2, 3, 4, 5, 6, 7")]
6996    pub command: ::core::option::Option<command::Command>,
6997}
6998/// Nested message and enum types in `Command`.
6999pub mod command {
7000    #[non_exhaustive]
7001    #[derive(Clone, PartialEq, ::prost::Oneof)]
7002    pub enum Command {
7003        /// A call to either an entry or a public Move function.
7004        #[prost(message, tag = "1")]
7005        MoveCall(super::MoveCall),
7006        /// `(Vec<forall T:key+store. T>, address)`
7007        /// It sends n-objects to the specified address. These objects must have store
7008        /// (public transfer) and either the previous owner must be an address or the object must
7009        /// be newly created.
7010        #[prost(message, tag = "2")]
7011        TransferObjects(super::TransferObjects),
7012        /// `(&mut Coin<T>, Vec<u64>)` -> `Vec<Coin<T>>`
7013        /// It splits off some amounts into new coins with those amounts.
7014        #[prost(message, tag = "3")]
7015        SplitCoins(super::SplitCoins),
7016        /// `(&mut Coin<T>, Vec<Coin<T>>)`
7017        /// It merges n-coins into the first coin.
7018        #[prost(message, tag = "4")]
7019        MergeCoins(super::MergeCoins),
7020        /// Publishes a Move package. It takes the package bytes and a list of the package's transitive
7021        /// dependencies to link against on chain.
7022        #[prost(message, tag = "5")]
7023        Publish(super::Publish),
7024        /// `forall T: Vec<T> -> vector<T>`
7025        /// Given n-values of the same type, it constructs a vector. For non-objects or an empty vector,
7026        /// the type tag must be specified.
7027        #[prost(message, tag = "6")]
7028        MakeMoveVector(super::MakeMoveVector),
7029        /// Upgrades a Move package.
7030        /// Takes (in order):
7031        /// 1. A vector of serialized modules for the package.
7032        /// 2. A vector of object ids for the transitive dependencies of the new package.
7033        /// 3. The object ID of the package being upgraded.
7034        /// 4. An argument holding the `UpgradeTicket` that must have been produced from an earlier command in the same
7035        ///     programmable transaction.
7036        #[prost(message, tag = "7")]
7037        Upgrade(super::Upgrade),
7038    }
7039}
7040/// Command to call a Move function.
7041///
7042/// Functions that can be called by a `MoveCall` command are those that have a function signature
7043/// that is either `entry` or `public` (which don't have a reference return type).
7044#[non_exhaustive]
7045#[derive(Clone, PartialEq, ::prost::Message)]
7046pub struct MoveCall {
7047    /// The package containing the module and function.
7048    #[prost(string, optional, tag = "1")]
7049    pub package: ::core::option::Option<::prost::alloc::string::String>,
7050    /// The specific module in the package containing the function.
7051    #[prost(string, optional, tag = "2")]
7052    pub module: ::core::option::Option<::prost::alloc::string::String>,
7053    /// The function to be called.
7054    #[prost(string, optional, tag = "3")]
7055    pub function: ::core::option::Option<::prost::alloc::string::String>,
7056    /// The type arguments to the function.
7057    #[prost(string, repeated, tag = "4")]
7058    pub type_arguments: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
7059    /// The arguments to the function.
7060    #[prost(message, repeated, tag = "5")]
7061    pub arguments: ::prost::alloc::vec::Vec<Argument>,
7062}
7063/// Command to transfer ownership of a set of objects to an address.
7064#[non_exhaustive]
7065#[derive(Clone, PartialEq, ::prost::Message)]
7066pub struct TransferObjects {
7067    /// Set of objects to transfer.
7068    #[prost(message, repeated, tag = "1")]
7069    pub objects: ::prost::alloc::vec::Vec<Argument>,
7070    /// The address to transfer ownership to.
7071    #[prost(message, optional, tag = "2")]
7072    pub address: ::core::option::Option<Argument>,
7073}
7074/// Command to split a single coin object into multiple coins.
7075#[non_exhaustive]
7076#[derive(Clone, PartialEq, ::prost::Message)]
7077pub struct SplitCoins {
7078    /// The coin to split.
7079    #[prost(message, optional, tag = "1")]
7080    pub coin: ::core::option::Option<Argument>,
7081    /// The amounts to split off.
7082    #[prost(message, repeated, tag = "2")]
7083    pub amounts: ::prost::alloc::vec::Vec<Argument>,
7084}
7085/// Command to merge multiple coins of the same type into a single coin.
7086#[non_exhaustive]
7087#[derive(Clone, PartialEq, ::prost::Message)]
7088pub struct MergeCoins {
7089    /// Coin to merge coins into.
7090    #[prost(message, optional, tag = "1")]
7091    pub coin: ::core::option::Option<Argument>,
7092    /// Set of coins to merge into `coin`.
7093    ///
7094    /// All listed coins must be of the same type and be the same type as `coin`
7095    #[prost(message, repeated, tag = "2")]
7096    pub coins_to_merge: ::prost::alloc::vec::Vec<Argument>,
7097}
7098/// Command to publish a new Move package.
7099#[non_exhaustive]
7100#[derive(Clone, PartialEq, ::prost::Message)]
7101pub struct Publish {
7102    /// The serialized Move modules.
7103    #[prost(bytes = "bytes", repeated, tag = "1")]
7104    pub modules: ::prost::alloc::vec::Vec<::prost::bytes::Bytes>,
7105    /// Set of packages that the to-be published package depends on.
7106    #[prost(string, repeated, tag = "2")]
7107    pub dependencies: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
7108}
7109/// Command to build a Move vector out of a set of individual elements.
7110#[non_exhaustive]
7111#[derive(Clone, PartialEq, ::prost::Message)]
7112pub struct MakeMoveVector {
7113    /// Type of the individual elements.
7114    ///
7115    /// This is required to be set when the type can't be inferred, for example when the set of
7116    /// provided arguments are all pure input values.
7117    #[prost(string, optional, tag = "1")]
7118    pub element_type: ::core::option::Option<::prost::alloc::string::String>,
7119    /// The set individual elements to build the vector with.
7120    #[prost(message, repeated, tag = "2")]
7121    pub elements: ::prost::alloc::vec::Vec<Argument>,
7122}
7123/// Command to upgrade an already published package.
7124#[non_exhaustive]
7125#[derive(Clone, PartialEq, ::prost::Message)]
7126pub struct Upgrade {
7127    /// The serialized Move modules.
7128    #[prost(bytes = "bytes", repeated, tag = "1")]
7129    pub modules: ::prost::alloc::vec::Vec<::prost::bytes::Bytes>,
7130    /// Set of packages that the to-be published package depends on.
7131    #[prost(string, repeated, tag = "2")]
7132    pub dependencies: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
7133    /// Package ID of the package to upgrade.
7134    #[prost(string, optional, tag = "3")]
7135    pub package: ::core::option::Option<::prost::alloc::string::String>,
7136    /// Ticket authorizing the upgrade.
7137    #[prost(message, optional, tag = "4")]
7138    pub ticket: ::core::option::Option<Argument>,
7139}
7140/// Randomness update.
7141#[non_exhaustive]
7142#[derive(Clone, PartialEq, ::prost::Message)]
7143pub struct RandomnessStateUpdate {
7144    /// Epoch of the randomness state update transaction.
7145    #[prost(uint64, optional, tag = "1")]
7146    pub epoch: ::core::option::Option<u64>,
7147    /// Randomness round of the update.
7148    #[prost(uint64, optional, tag = "2")]
7149    pub randomness_round: ::core::option::Option<u64>,
7150    /// Updated random bytes.
7151    #[prost(bytes = "bytes", optional, tag = "3")]
7152    pub random_bytes: ::core::option::Option<::prost::bytes::Bytes>,
7153    /// The initial version of the randomness object that it was shared at.
7154    #[prost(uint64, optional, tag = "4")]
7155    pub randomness_object_initial_shared_version: ::core::option::Option<u64>,
7156}
7157/// System transaction used to change the epoch.
7158#[non_exhaustive]
7159#[derive(Clone, PartialEq, ::prost::Message)]
7160pub struct ChangeEpoch {
7161    /// The next (to become) epoch ID.
7162    #[prost(uint64, optional, tag = "1")]
7163    pub epoch: ::core::option::Option<u64>,
7164    /// The protocol version in effect in the new epoch.
7165    #[prost(uint64, optional, tag = "2")]
7166    pub protocol_version: ::core::option::Option<u64>,
7167    /// The total amount of gas charged for storage during the epoch.
7168    #[prost(uint64, optional, tag = "3")]
7169    pub storage_charge: ::core::option::Option<u64>,
7170    /// The total amount of gas charged for computation during the epoch.
7171    #[prost(uint64, optional, tag = "4")]
7172    pub computation_charge: ::core::option::Option<u64>,
7173    /// The amount of storage rebate refunded to the txn senders.
7174    #[prost(uint64, optional, tag = "5")]
7175    pub storage_rebate: ::core::option::Option<u64>,
7176    /// The non-refundable storage fee.
7177    #[prost(uint64, optional, tag = "6")]
7178    pub non_refundable_storage_fee: ::core::option::Option<u64>,
7179    /// Unix timestamp when epoch started.
7180    #[prost(message, optional, tag = "7")]
7181    pub epoch_start_timestamp: ::core::option::Option<::prost_types::Timestamp>,
7182    /// System packages (specifically framework and Move stdlib) that are written before the new
7183    /// epoch starts. This tracks framework upgrades on chain. When executing the `ChangeEpoch` txn,
7184    /// the validator must write out the following modules.  Modules are provided with the version they
7185    /// will be upgraded to, their modules in serialized form (which include their package ID), and
7186    /// a list of their transitive dependencies.
7187    #[prost(message, repeated, tag = "8")]
7188    pub system_packages: ::prost::alloc::vec::Vec<SystemPackage>,
7189}
7190/// System package.
7191#[non_exhaustive]
7192#[derive(Clone, PartialEq, ::prost::Message)]
7193pub struct SystemPackage {
7194    /// Version of the package.
7195    #[prost(uint64, optional, tag = "1")]
7196    pub version: ::core::option::Option<u64>,
7197    /// Move modules.
7198    #[prost(bytes = "bytes", repeated, tag = "2")]
7199    pub modules: ::prost::alloc::vec::Vec<::prost::bytes::Bytes>,
7200    /// Package dependencies.
7201    #[prost(string, repeated, tag = "3")]
7202    pub dependencies: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
7203}
7204/// The genesis transaction.
7205#[non_exhaustive]
7206#[derive(Clone, PartialEq, ::prost::Message)]
7207pub struct GenesisTransaction {
7208    /// Set of genesis objects.
7209    #[prost(message, repeated, tag = "1")]
7210    pub objects: ::prost::alloc::vec::Vec<Object>,
7211}
7212/// Consensus commit prologue system transaction.
7213///
7214/// This message can represent V1, V2, and V3 prologue types.
7215#[non_exhaustive]
7216#[derive(Clone, PartialEq, ::prost::Message)]
7217pub struct ConsensusCommitPrologue {
7218    /// Epoch of the commit prologue transaction.
7219    ///
7220    /// Present in V1, V2, V3, V4.
7221    #[prost(uint64, optional, tag = "1")]
7222    pub epoch: ::core::option::Option<u64>,
7223    /// Consensus round of the commit.
7224    ///
7225    /// Present in V1, V2, V3, V4.
7226    #[prost(uint64, optional, tag = "2")]
7227    pub round: ::core::option::Option<u64>,
7228    /// Unix timestamp from consensus.
7229    ///
7230    /// Present in V1, V2, V3, V4.
7231    #[prost(message, optional, tag = "3")]
7232    pub commit_timestamp: ::core::option::Option<::prost_types::Timestamp>,
7233    /// Digest of consensus output.
7234    ///
7235    /// Present in V2, V3, V4.
7236    #[prost(string, optional, tag = "4")]
7237    pub consensus_commit_digest: ::core::option::Option<::prost::alloc::string::String>,
7238    /// The sub DAG index of the consensus commit. This field is populated if there
7239    /// are multiple consensus commits per round.
7240    ///
7241    /// Present in V3, V4.
7242    #[prost(uint64, optional, tag = "5")]
7243    pub sub_dag_index: ::core::option::Option<u64>,
7244    /// Stores consensus handler determined consensus object version assignments.
7245    ///
7246    /// Present in V3, V4.
7247    #[prost(message, optional, tag = "6")]
7248    pub consensus_determined_version_assignments: ::core::option::Option<
7249        ConsensusDeterminedVersionAssignments,
7250    >,
7251    /// Digest of any additional state computed by the consensus handler.
7252    /// Used to detect forking bugs as early as possible.
7253    ///
7254    /// Present in V4.
7255    #[prost(string, optional, tag = "7")]
7256    pub additional_state_digest: ::core::option::Option<::prost::alloc::string::String>,
7257}
7258/// Object version assignment from consensus.
7259#[non_exhaustive]
7260#[derive(Clone, PartialEq, ::prost::Message)]
7261pub struct VersionAssignment {
7262    /// `ObjectId` of the object.
7263    #[prost(string, optional, tag = "1")]
7264    pub object_id: ::core::option::Option<::prost::alloc::string::String>,
7265    /// start version of the consensus stream for this object
7266    #[prost(uint64, optional, tag = "2")]
7267    pub start_version: ::core::option::Option<u64>,
7268    /// Assigned version.
7269    #[prost(uint64, optional, tag = "3")]
7270    pub version: ::core::option::Option<u64>,
7271}
7272/// A transaction that was canceled.
7273#[non_exhaustive]
7274#[derive(Clone, PartialEq, ::prost::Message)]
7275pub struct CanceledTransaction {
7276    /// Digest of the canceled transaction.
7277    #[prost(string, optional, tag = "1")]
7278    pub digest: ::core::option::Option<::prost::alloc::string::String>,
7279    /// List of object version assignments.
7280    #[prost(message, repeated, tag = "2")]
7281    pub version_assignments: ::prost::alloc::vec::Vec<VersionAssignment>,
7282}
7283/// Version assignments performed by consensus.
7284#[non_exhaustive]
7285#[derive(Clone, PartialEq, ::prost::Message)]
7286pub struct ConsensusDeterminedVersionAssignments {
7287    /// Version of this message
7288    #[prost(int32, optional, tag = "1")]
7289    pub version: ::core::option::Option<i32>,
7290    /// Canceled transaction version assignment.
7291    #[prost(message, repeated, tag = "3")]
7292    pub canceled_transactions: ::prost::alloc::vec::Vec<CanceledTransaction>,
7293}
7294/// Update the set of valid JWKs.
7295#[non_exhaustive]
7296#[derive(Clone, PartialEq, ::prost::Message)]
7297pub struct AuthenticatorStateUpdate {
7298    /// Epoch of the authenticator state update transaction.
7299    #[prost(uint64, optional, tag = "1")]
7300    pub epoch: ::core::option::Option<u64>,
7301    /// Consensus round of the authenticator state update.
7302    #[prost(uint64, optional, tag = "2")]
7303    pub round: ::core::option::Option<u64>,
7304    /// Newly active JWKs.
7305    #[prost(message, repeated, tag = "3")]
7306    pub new_active_jwks: ::prost::alloc::vec::Vec<ActiveJwk>,
7307    /// The initial version of the authenticator object that it was shared at.
7308    #[prost(uint64, optional, tag = "4")]
7309    pub authenticator_object_initial_shared_version: ::core::option::Option<u64>,
7310}
7311/// A new JWK.
7312#[non_exhaustive]
7313#[derive(Clone, PartialEq, ::prost::Message)]
7314pub struct ActiveJwk {
7315    /// Identifier used to uniquely identify a JWK.
7316    #[prost(message, optional, tag = "1")]
7317    pub id: ::core::option::Option<JwkId>,
7318    /// The JWK.
7319    #[prost(message, optional, tag = "2")]
7320    pub jwk: ::core::option::Option<Jwk>,
7321    /// Most recent epoch in which the JWK was validated.
7322    #[prost(uint64, optional, tag = "3")]
7323    pub epoch: ::core::option::Option<u64>,
7324}
7325/// Key to uniquely identify a JWK.
7326#[non_exhaustive]
7327#[derive(Clone, PartialEq, ::prost::Message)]
7328pub struct JwkId {
7329    /// The issuer or identity of the OIDC provider.
7330    #[prost(string, optional, tag = "1")]
7331    pub iss: ::core::option::Option<::prost::alloc::string::String>,
7332    /// A key ID used to uniquely identify a key from an OIDC provider.
7333    #[prost(string, optional, tag = "2")]
7334    pub kid: ::core::option::Option<::prost::alloc::string::String>,
7335}
7336/// A JSON web key.
7337///
7338/// Struct that contains info for a JWK. A list of them for different kinds can
7339/// be retrieved from the JWK endpoint (for example, <<https://www.googleapis.com/oauth2/v3/certs>>).
7340/// The JWK is used to verify the JWT token.
7341#[non_exhaustive]
7342#[derive(Clone, PartialEq, ::prost::Message)]
7343pub struct Jwk {
7344    /// Key type parameter, <https://datatracker.ietf.org/doc/html/rfc7517#section-4.1.>
7345    #[prost(string, optional, tag = "1")]
7346    pub kty: ::core::option::Option<::prost::alloc::string::String>,
7347    /// RSA public exponent, <https://datatracker.ietf.org/doc/html/rfc7517#section-9.3.>
7348    #[prost(string, optional, tag = "2")]
7349    pub e: ::core::option::Option<::prost::alloc::string::String>,
7350    /// RSA modulus, <https://datatracker.ietf.org/doc/html/rfc7517#section-9.3.>
7351    #[prost(string, optional, tag = "3")]
7352    pub n: ::core::option::Option<::prost::alloc::string::String>,
7353    /// Algorithm parameter, <https://datatracker.ietf.org/doc/html/rfc7517#section-4.4.>
7354    #[prost(string, optional, tag = "4")]
7355    pub alg: ::core::option::Option<::prost::alloc::string::String>,
7356}
7357/// Set of operations run at the end of the epoch to close out the current epoch
7358/// and start the next one.
7359#[non_exhaustive]
7360#[derive(Clone, PartialEq, ::prost::Message)]
7361pub struct EndOfEpochTransaction {
7362    #[prost(message, repeated, tag = "1")]
7363    pub transactions: ::prost::alloc::vec::Vec<EndOfEpochTransactionKind>,
7364}
7365/// Operation run at the end of an epoch.
7366#[non_exhaustive]
7367#[derive(Clone, PartialEq, ::prost::Message)]
7368pub struct EndOfEpochTransactionKind {
7369    #[prost(
7370        oneof = "end_of_epoch_transaction_kind::Kind",
7371        tags = "2, 3, 4, 200, 201, 202, 203, 204, 205, 206"
7372    )]
7373    pub kind: ::core::option::Option<end_of_epoch_transaction_kind::Kind>,
7374}
7375/// Nested message and enum types in `EndOfEpochTransactionKind`.
7376pub mod end_of_epoch_transaction_kind {
7377    #[non_exhaustive]
7378    #[derive(Clone, PartialEq, ::prost::Oneof)]
7379    pub enum Kind {
7380        /// End the epoch and start the next one.
7381        #[prost(message, tag = "2")]
7382        ChangeEpoch(super::ChangeEpoch),
7383        /// Expire JWKs used for zklogin.
7384        #[prost(message, tag = "3")]
7385        AuthenticatorStateExpire(super::AuthenticatorStateExpire),
7386        /// Execution time observations from the committee to preserve cross epoch
7387        #[prost(message, tag = "4")]
7388        ExecutionTimeObservations(super::ExecutionTimeObservations),
7389        /// Create and initialize the authenticator object used for zklogin.
7390        #[prost(message, tag = "200")]
7391        AuthenticatorStateCreate(()),
7392        /// Create and initialize the randomness object.
7393        #[prost(message, tag = "201")]
7394        RandomnessStateCreate(()),
7395        /// Create and initialize the deny list object.
7396        #[prost(message, tag = "202")]
7397        DenyListStateCreate(()),
7398        /// Create and initialize the bridge object.
7399        #[prost(string, tag = "203")]
7400        BridgeStateCreate(::prost::alloc::string::String),
7401        /// Initialize the bridge committee.
7402        #[prost(uint64, tag = "204")]
7403        BridgeCommitteeInit(u64),
7404        /// Create the accumulator root object.
7405        #[prost(message, tag = "205")]
7406        AccumulatorRootCreate(()),
7407        /// Create and initialize the Coin Registry object.
7408        #[prost(message, tag = "206")]
7409        CoinRegistryCreate(()),
7410    }
7411}
7412/// Expire old JWKs.
7413#[non_exhaustive]
7414#[derive(Clone, Copy, PartialEq, ::prost::Message)]
7415pub struct AuthenticatorStateExpire {
7416    /// Expire JWKs that have a lower epoch than this.
7417    #[prost(uint64, optional, tag = "1")]
7418    pub min_epoch: ::core::option::Option<u64>,
7419    /// The initial version of the authenticator object that it was shared at.
7420    #[prost(uint64, optional, tag = "2")]
7421    pub authenticator_object_initial_shared_version: ::core::option::Option<u64>,
7422}
7423#[non_exhaustive]
7424#[derive(Clone, PartialEq, ::prost::Message)]
7425pub struct ExecutionTimeObservations {
7426    /// Version of this ExecutionTimeObservations
7427    #[prost(int32, optional, tag = "1")]
7428    pub version: ::core::option::Option<i32>,
7429    #[prost(message, repeated, tag = "2")]
7430    pub observations: ::prost::alloc::vec::Vec<ExecutionTimeObservation>,
7431}
7432#[non_exhaustive]
7433#[derive(Clone, PartialEq, ::prost::Message)]
7434pub struct ExecutionTimeObservation {
7435    #[prost(
7436        enumeration = "execution_time_observation::ExecutionTimeObservationKind",
7437        optional,
7438        tag = "1"
7439    )]
7440    pub kind: ::core::option::Option<i32>,
7441    #[prost(message, optional, tag = "2")]
7442    pub move_entry_point: ::core::option::Option<MoveCall>,
7443    #[prost(message, repeated, tag = "3")]
7444    pub validator_observations: ::prost::alloc::vec::Vec<
7445        ValidatorExecutionTimeObservation,
7446    >,
7447}
7448/// Nested message and enum types in `ExecutionTimeObservation`.
7449pub mod execution_time_observation {
7450    #[non_exhaustive]
7451    #[derive(
7452        Clone,
7453        Copy,
7454        Debug,
7455        PartialEq,
7456        Eq,
7457        Hash,
7458        PartialOrd,
7459        Ord,
7460        ::prost::Enumeration
7461    )]
7462    #[repr(i32)]
7463    pub enum ExecutionTimeObservationKind {
7464        Unknown = 0,
7465        MoveEntryPoint = 1,
7466        TransferObjects = 2,
7467        SplitCoins = 3,
7468        MergeCoins = 4,
7469        Publish = 5,
7470        MakeMoveVector = 6,
7471        Upgrade = 7,
7472    }
7473    impl ExecutionTimeObservationKind {
7474        /// String value of the enum field names used in the ProtoBuf definition.
7475        ///
7476        /// The values are not transformed in any way and thus are considered stable
7477        /// (if the ProtoBuf definition does not change) and safe for programmatic use.
7478        pub fn as_str_name(&self) -> &'static str {
7479            match self {
7480                Self::Unknown => "EXECUTION_TIME_OBSERVATION_KIND_UNKNOWN",
7481                Self::MoveEntryPoint => "MOVE_ENTRY_POINT",
7482                Self::TransferObjects => "TRANSFER_OBJECTS",
7483                Self::SplitCoins => "SPLIT_COINS",
7484                Self::MergeCoins => "MERGE_COINS",
7485                Self::Publish => "PUBLISH",
7486                Self::MakeMoveVector => "MAKE_MOVE_VECTOR",
7487                Self::Upgrade => "UPGRADE",
7488            }
7489        }
7490        /// Creates an enum from field names used in the ProtoBuf definition.
7491        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
7492            match value {
7493                "EXECUTION_TIME_OBSERVATION_KIND_UNKNOWN" => Some(Self::Unknown),
7494                "MOVE_ENTRY_POINT" => Some(Self::MoveEntryPoint),
7495                "TRANSFER_OBJECTS" => Some(Self::TransferObjects),
7496                "SPLIT_COINS" => Some(Self::SplitCoins),
7497                "MERGE_COINS" => Some(Self::MergeCoins),
7498                "PUBLISH" => Some(Self::Publish),
7499                "MAKE_MOVE_VECTOR" => Some(Self::MakeMoveVector),
7500                "UPGRADE" => Some(Self::Upgrade),
7501                _ => None,
7502            }
7503        }
7504    }
7505}
7506#[non_exhaustive]
7507#[derive(Clone, PartialEq, ::prost::Message)]
7508pub struct ValidatorExecutionTimeObservation {
7509    /// Bls12381 public key of the validator
7510    #[prost(bytes = "bytes", optional, tag = "1")]
7511    pub validator: ::core::option::Option<::prost::bytes::Bytes>,
7512    /// Duration of an execution observation
7513    #[prost(message, optional, tag = "2")]
7514    pub duration: ::core::option::Option<::prost_types::Duration>,
7515}
7516#[non_exhaustive]
7517#[derive(Clone, PartialEq, ::prost::Message)]
7518pub struct ExecuteTransactionRequest {
7519    /// The transaction to execute.
7520    #[prost(message, optional, tag = "1")]
7521    pub transaction: ::core::option::Option<Transaction>,
7522    /// Set of `UserSiganture`s authorizing the execution of the provided
7523    /// transaction.
7524    #[prost(message, repeated, tag = "2")]
7525    pub signatures: ::prost::alloc::vec::Vec<UserSignature>,
7526    /// Mask specifying which fields to read.
7527    /// If no mask is specified, defaults to `finality`.
7528    #[prost(message, optional, tag = "3")]
7529    pub read_mask: ::core::option::Option<::prost_types::FieldMask>,
7530}
7531/// Response message for `NodeService.ExecuteTransaction`.
7532#[non_exhaustive]
7533#[derive(Clone, PartialEq, ::prost::Message)]
7534pub struct ExecuteTransactionResponse {
7535    /// Indicates the finality of the executed transaction.
7536    #[prost(message, optional, tag = "1")]
7537    pub finality: ::core::option::Option<TransactionFinality>,
7538    #[prost(message, optional, tag = "2")]
7539    pub transaction: ::core::option::Option<ExecutedTransaction>,
7540}
7541/// Indicates the finality of the executed transaction.
7542#[non_exhaustive]
7543#[derive(Clone, PartialEq, ::prost::Message)]
7544pub struct TransactionFinality {
7545    #[prost(oneof = "transaction_finality::Finality", tags = "1, 2, 3")]
7546    pub finality: ::core::option::Option<transaction_finality::Finality>,
7547}
7548/// Nested message and enum types in `TransactionFinality`.
7549pub mod transaction_finality {
7550    #[non_exhaustive]
7551    #[derive(Clone, PartialEq, ::prost::Oneof)]
7552    pub enum Finality {
7553        /// A quorum certificate certifying that a transaction is final but might not
7554        /// be included in a checkpoint yet.
7555        #[prost(message, tag = "1")]
7556        Certified(super::ValidatorAggregatedSignature),
7557        /// Sequence number of the checkpoint that includes the transaction.
7558        #[prost(uint64, tag = "2")]
7559        Checkpointed(u64),
7560        /// Indicates that a quorum of validators has executed the transaction but
7561        /// that it might not be included in a checkpoint yet.
7562        #[prost(message, tag = "3")]
7563        QuorumExecuted(()),
7564    }
7565}
7566/// Generated client implementations.
7567pub mod transaction_execution_service_client {
7568    #![allow(
7569        unused_variables,
7570        dead_code,
7571        missing_docs,
7572        clippy::wildcard_imports,
7573        clippy::let_unit_value,
7574    )]
7575    use tonic::codegen::*;
7576    use tonic::codegen::http::Uri;
7577    #[derive(Debug, Clone)]
7578    pub struct TransactionExecutionServiceClient<T> {
7579        inner: tonic::client::Grpc<T>,
7580    }
7581    impl TransactionExecutionServiceClient<tonic::transport::Channel> {
7582        /// Attempt to create a new client by connecting to a given endpoint.
7583        pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
7584        where
7585            D: TryInto<tonic::transport::Endpoint>,
7586            D::Error: Into<StdError>,
7587        {
7588            let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
7589            Ok(Self::new(conn))
7590        }
7591    }
7592    impl<T> TransactionExecutionServiceClient<T>
7593    where
7594        T: tonic::client::GrpcService<tonic::body::Body>,
7595        T::Error: Into<StdError>,
7596        T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static,
7597        <T::ResponseBody as Body>::Error: Into<StdError> + std::marker::Send,
7598    {
7599        pub fn new(inner: T) -> Self {
7600            let inner = tonic::client::Grpc::new(inner);
7601            Self { inner }
7602        }
7603        pub fn with_origin(inner: T, origin: Uri) -> Self {
7604            let inner = tonic::client::Grpc::with_origin(inner, origin);
7605            Self { inner }
7606        }
7607        pub fn with_interceptor<F>(
7608            inner: T,
7609            interceptor: F,
7610        ) -> TransactionExecutionServiceClient<InterceptedService<T, F>>
7611        where
7612            F: tonic::service::Interceptor,
7613            T::ResponseBody: Default,
7614            T: tonic::codegen::Service<
7615                http::Request<tonic::body::Body>,
7616                Response = http::Response<
7617                    <T as tonic::client::GrpcService<tonic::body::Body>>::ResponseBody,
7618                >,
7619            >,
7620            <T as tonic::codegen::Service<
7621                http::Request<tonic::body::Body>,
7622            >>::Error: Into<StdError> + std::marker::Send + std::marker::Sync,
7623        {
7624            TransactionExecutionServiceClient::new(
7625                InterceptedService::new(inner, interceptor),
7626            )
7627        }
7628        /// Compress requests with the given encoding.
7629        ///
7630        /// This requires the server to support it otherwise it might respond with an
7631        /// error.
7632        #[must_use]
7633        pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
7634            self.inner = self.inner.send_compressed(encoding);
7635            self
7636        }
7637        /// Enable decompressing responses.
7638        #[must_use]
7639        pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
7640            self.inner = self.inner.accept_compressed(encoding);
7641            self
7642        }
7643        /// Limits the maximum size of a decoded message.
7644        ///
7645        /// Default: `4MB`
7646        #[must_use]
7647        pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
7648            self.inner = self.inner.max_decoding_message_size(limit);
7649            self
7650        }
7651        /// Limits the maximum size of an encoded message.
7652        ///
7653        /// Default: `usize::MAX`
7654        #[must_use]
7655        pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
7656            self.inner = self.inner.max_encoding_message_size(limit);
7657            self
7658        }
7659        pub async fn execute_transaction(
7660            &mut self,
7661            request: impl tonic::IntoRequest<super::ExecuteTransactionRequest>,
7662        ) -> std::result::Result<
7663            tonic::Response<super::ExecuteTransactionResponse>,
7664            tonic::Status,
7665        > {
7666            self.inner
7667                .ready()
7668                .await
7669                .map_err(|e| {
7670                    tonic::Status::unknown(
7671                        format!("Service was not ready: {}", e.into()),
7672                    )
7673                })?;
7674            let codec = tonic::codec::ProstCodec::default();
7675            let path = http::uri::PathAndQuery::from_static(
7676                "/sui.rpc.v2beta2.TransactionExecutionService/ExecuteTransaction",
7677            );
7678            let mut req = request.into_request();
7679            req.extensions_mut()
7680                .insert(
7681                    GrpcMethod::new(
7682                        "sui.rpc.v2beta2.TransactionExecutionService",
7683                        "ExecuteTransaction",
7684                    ),
7685                );
7686            self.inner.unary(req, path, codec).await
7687        }
7688    }
7689}
7690/// Generated server implementations.
7691pub mod transaction_execution_service_server {
7692    #![allow(
7693        unused_variables,
7694        dead_code,
7695        missing_docs,
7696        clippy::wildcard_imports,
7697        clippy::let_unit_value,
7698    )]
7699    use tonic::codegen::*;
7700    /// Generated trait containing gRPC methods that should be implemented for use with TransactionExecutionServiceServer.
7701    #[async_trait]
7702    pub trait TransactionExecutionService: std::marker::Send + std::marker::Sync + 'static {
7703        async fn execute_transaction(
7704            &self,
7705            request: tonic::Request<super::ExecuteTransactionRequest>,
7706        ) -> std::result::Result<
7707            tonic::Response<super::ExecuteTransactionResponse>,
7708            tonic::Status,
7709        >;
7710    }
7711    #[derive(Debug)]
7712    pub struct TransactionExecutionServiceServer<T> {
7713        inner: Arc<T>,
7714        accept_compression_encodings: EnabledCompressionEncodings,
7715        send_compression_encodings: EnabledCompressionEncodings,
7716        max_decoding_message_size: Option<usize>,
7717        max_encoding_message_size: Option<usize>,
7718    }
7719    impl<T> TransactionExecutionServiceServer<T> {
7720        pub fn new(inner: T) -> Self {
7721            Self::from_arc(Arc::new(inner))
7722        }
7723        pub fn from_arc(inner: Arc<T>) -> Self {
7724            Self {
7725                inner,
7726                accept_compression_encodings: Default::default(),
7727                send_compression_encodings: Default::default(),
7728                max_decoding_message_size: None,
7729                max_encoding_message_size: None,
7730            }
7731        }
7732        pub fn with_interceptor<F>(
7733            inner: T,
7734            interceptor: F,
7735        ) -> InterceptedService<Self, F>
7736        where
7737            F: tonic::service::Interceptor,
7738        {
7739            InterceptedService::new(Self::new(inner), interceptor)
7740        }
7741        /// Enable decompressing requests with the given encoding.
7742        #[must_use]
7743        pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
7744            self.accept_compression_encodings.enable(encoding);
7745            self
7746        }
7747        /// Compress responses with the given encoding, if the client supports it.
7748        #[must_use]
7749        pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
7750            self.send_compression_encodings.enable(encoding);
7751            self
7752        }
7753        /// Limits the maximum size of a decoded message.
7754        ///
7755        /// Default: `4MB`
7756        #[must_use]
7757        pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
7758            self.max_decoding_message_size = Some(limit);
7759            self
7760        }
7761        /// Limits the maximum size of an encoded message.
7762        ///
7763        /// Default: `usize::MAX`
7764        #[must_use]
7765        pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
7766            self.max_encoding_message_size = Some(limit);
7767            self
7768        }
7769    }
7770    impl<T, B> tonic::codegen::Service<http::Request<B>>
7771    for TransactionExecutionServiceServer<T>
7772    where
7773        T: TransactionExecutionService,
7774        B: Body + std::marker::Send + 'static,
7775        B::Error: Into<StdError> + std::marker::Send + 'static,
7776    {
7777        type Response = http::Response<tonic::body::Body>;
7778        type Error = std::convert::Infallible;
7779        type Future = BoxFuture<Self::Response, Self::Error>;
7780        fn poll_ready(
7781            &mut self,
7782            _cx: &mut Context<'_>,
7783        ) -> Poll<std::result::Result<(), Self::Error>> {
7784            Poll::Ready(Ok(()))
7785        }
7786        fn call(&mut self, req: http::Request<B>) -> Self::Future {
7787            match req.uri().path() {
7788                "/sui.rpc.v2beta2.TransactionExecutionService/ExecuteTransaction" => {
7789                    #[allow(non_camel_case_types)]
7790                    struct ExecuteTransactionSvc<T: TransactionExecutionService>(
7791                        pub Arc<T>,
7792                    );
7793                    impl<
7794                        T: TransactionExecutionService,
7795                    > tonic::server::UnaryService<super::ExecuteTransactionRequest>
7796                    for ExecuteTransactionSvc<T> {
7797                        type Response = super::ExecuteTransactionResponse;
7798                        type Future = BoxFuture<
7799                            tonic::Response<Self::Response>,
7800                            tonic::Status,
7801                        >;
7802                        fn call(
7803                            &mut self,
7804                            request: tonic::Request<super::ExecuteTransactionRequest>,
7805                        ) -> Self::Future {
7806                            let inner = Arc::clone(&self.0);
7807                            let fut = async move {
7808                                <T as TransactionExecutionService>::execute_transaction(
7809                                        &inner,
7810                                        request,
7811                                    )
7812                                    .await
7813                            };
7814                            Box::pin(fut)
7815                        }
7816                    }
7817                    let accept_compression_encodings = self.accept_compression_encodings;
7818                    let send_compression_encodings = self.send_compression_encodings;
7819                    let max_decoding_message_size = self.max_decoding_message_size;
7820                    let max_encoding_message_size = self.max_encoding_message_size;
7821                    let inner = self.inner.clone();
7822                    let fut = async move {
7823                        let method = ExecuteTransactionSvc(inner);
7824                        let codec = tonic::codec::ProstCodec::default();
7825                        let mut grpc = tonic::server::Grpc::new(codec)
7826                            .apply_compression_config(
7827                                accept_compression_encodings,
7828                                send_compression_encodings,
7829                            )
7830                            .apply_max_message_size_config(
7831                                max_decoding_message_size,
7832                                max_encoding_message_size,
7833                            );
7834                        let res = grpc.unary(method, req).await;
7835                        Ok(res)
7836                    };
7837                    Box::pin(fut)
7838                }
7839                _ => {
7840                    Box::pin(async move {
7841                        let mut response = http::Response::new(
7842                            tonic::body::Body::default(),
7843                        );
7844                        let headers = response.headers_mut();
7845                        headers
7846                            .insert(
7847                                tonic::Status::GRPC_STATUS,
7848                                (tonic::Code::Unimplemented as i32).into(),
7849                            );
7850                        headers
7851                            .insert(
7852                                http::header::CONTENT_TYPE,
7853                                tonic::metadata::GRPC_CONTENT_TYPE,
7854                            );
7855                        Ok(response)
7856                    })
7857                }
7858            }
7859        }
7860    }
7861    impl<T> Clone for TransactionExecutionServiceServer<T> {
7862        fn clone(&self) -> Self {
7863            let inner = self.inner.clone();
7864            Self {
7865                inner,
7866                accept_compression_encodings: self.accept_compression_encodings,
7867                send_compression_encodings: self.send_compression_encodings,
7868                max_decoding_message_size: self.max_decoding_message_size,
7869                max_encoding_message_size: self.max_encoding_message_size,
7870            }
7871        }
7872    }
7873    /// Generated gRPC service name
7874    pub const SERVICE_NAME: &str = "sui.rpc.v2beta2.TransactionExecutionService";
7875    impl<T> tonic::server::NamedService for TransactionExecutionServiceServer<T> {
7876        const NAME: &'static str = SERVICE_NAME;
7877    }
7878}