1#[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 #[prost(uint32, optional, tag = "2")]
10 pub input: ::core::option::Option<u32>,
11 #[prost(uint32, optional, tag = "3")]
13 pub result: ::core::option::Option<u32>,
14 #[prost(uint32, optional, tag = "4")]
16 pub subresult: ::core::option::Option<u32>,
17}
18pub 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 Gas = 1,
37 Input = 2,
40 Result = 3,
42 }
43 impl ArgumentKind {
44 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 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#[non_exhaustive]
70#[derive(Clone, PartialEq, ::prost::Message)]
71pub struct BalanceChange {
72 #[prost(string, optional, tag = "1")]
74 pub address: ::core::option::Option<::prost::alloc::string::String>,
75 #[prost(string, optional, tag = "2")]
77 pub coin_type: ::core::option::Option<::prost::alloc::string::String>,
78 #[prost(string, optional, tag = "3")]
80 pub amount: ::core::option::Option<::prost::alloc::string::String>,
81}
82#[non_exhaustive]
86#[derive(Clone, PartialEq, ::prost::Message)]
87pub struct Bcs {
88 #[prost(string, optional, tag = "1")]
90 pub name: ::core::option::Option<::prost::alloc::string::String>,
91 #[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 #[prost(uint64, optional, tag = "1")]
100 pub sequence_number: ::core::option::Option<u64>,
101 #[prost(string, optional, tag = "2")]
103 pub digest: ::core::option::Option<::prost::alloc::string::String>,
104 #[prost(message, optional, tag = "3")]
106 pub summary: ::core::option::Option<CheckpointSummary>,
107 #[prost(message, optional, tag = "4")]
110 pub signature: ::core::option::Option<ValidatorAggregatedSignature>,
111 #[prost(message, optional, tag = "5")]
113 pub contents: ::core::option::Option<CheckpointContents>,
114 #[prost(message, repeated, tag = "6")]
116 pub transactions: ::prost::alloc::vec::Vec<ExecutedTransaction>,
117}
118#[non_exhaustive]
120#[derive(Clone, PartialEq, ::prost::Message)]
121pub struct CheckpointContents {
122 #[prost(message, optional, tag = "1")]
124 pub bcs: ::core::option::Option<Bcs>,
125 #[prost(string, optional, tag = "2")]
127 pub digest: ::core::option::Option<::prost::alloc::string::String>,
128 #[prost(int32, optional, tag = "3")]
130 pub version: ::core::option::Option<i32>,
131 #[prost(message, repeated, tag = "4")]
133 pub transactions: ::prost::alloc::vec::Vec<CheckpointedTransactionInfo>,
134}
135#[non_exhaustive]
137#[derive(Clone, PartialEq, ::prost::Message)]
138pub struct CheckpointedTransactionInfo {
139 #[prost(string, optional, tag = "1")]
141 pub transaction: ::core::option::Option<::prost::alloc::string::String>,
142 #[prost(string, optional, tag = "2")]
144 pub effects: ::core::option::Option<::prost::alloc::string::String>,
145 #[prost(message, repeated, tag = "3")]
147 pub signatures: ::prost::alloc::vec::Vec<UserSignature>,
148}
149#[non_exhaustive]
169#[derive(Clone, PartialEq, ::prost::Message)]
170pub struct CheckpointSummary {
171 #[prost(message, optional, tag = "1")]
173 pub bcs: ::core::option::Option<Bcs>,
174 #[prost(string, optional, tag = "2")]
176 pub digest: ::core::option::Option<::prost::alloc::string::String>,
177 #[prost(uint64, optional, tag = "3")]
179 pub epoch: ::core::option::Option<u64>,
180 #[prost(uint64, optional, tag = "4")]
182 pub sequence_number: ::core::option::Option<u64>,
183 #[prost(uint64, optional, tag = "5")]
186 pub total_network_transactions: ::core::option::Option<u64>,
187 #[prost(string, optional, tag = "6")]
189 pub content_digest: ::core::option::Option<::prost::alloc::string::String>,
190 #[prost(string, optional, tag = "7")]
194 pub previous_digest: ::core::option::Option<::prost::alloc::string::String>,
195 #[prost(message, optional, tag = "8")]
198 pub epoch_rolling_gas_cost_summary: ::core::option::Option<GasCostSummary>,
199 #[prost(message, optional, tag = "9")]
203 pub timestamp: ::core::option::Option<::prost_types::Timestamp>,
204 #[prost(message, repeated, tag = "10")]
206 pub commitments: ::prost::alloc::vec::Vec<CheckpointCommitment>,
207 #[prost(message, optional, tag = "11")]
209 pub end_of_epoch_data: ::core::option::Option<EndOfEpochData>,
210 #[prost(bytes = "bytes", optional, tag = "12")]
215 pub version_specific_data: ::core::option::Option<::prost::bytes::Bytes>,
216}
217#[non_exhaustive]
219#[derive(Clone, PartialEq, ::prost::Message)]
220pub struct EndOfEpochData {
221 #[prost(message, repeated, tag = "1")]
223 pub next_epoch_committee: ::prost::alloc::vec::Vec<ValidatorCommitteeMember>,
224 #[prost(uint64, optional, tag = "2")]
226 pub next_epoch_protocol_version: ::core::option::Option<u64>,
227 #[prost(message, repeated, tag = "3")]
229 pub epoch_commitments: ::prost::alloc::vec::Vec<CheckpointCommitment>,
230}
231#[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}
244pub 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 EcmhLiveObjectSet = 1,
264 CheckpointArtifacts = 2,
266 }
267 impl CheckpointCommitmentKind {
268 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 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#[non_exhaustive]
292#[derive(Clone, PartialEq, ::prost::Message)]
293pub struct TransactionEffects {
294 #[prost(message, optional, tag = "1")]
296 pub bcs: ::core::option::Option<Bcs>,
297 #[prost(string, optional, tag = "2")]
299 pub digest: ::core::option::Option<::prost::alloc::string::String>,
300 #[prost(int32, optional, tag = "3")]
302 pub version: ::core::option::Option<i32>,
303 #[prost(message, optional, tag = "4")]
305 pub status: ::core::option::Option<ExecutionStatus>,
306 #[prost(uint64, optional, tag = "5")]
308 pub epoch: ::core::option::Option<u64>,
309 #[prost(message, optional, tag = "6")]
311 pub gas_used: ::core::option::Option<GasCostSummary>,
312 #[prost(string, optional, tag = "7")]
314 pub transaction_digest: ::core::option::Option<::prost::alloc::string::String>,
315 #[prost(message, optional, tag = "8")]
319 pub gas_object: ::core::option::Option<ChangedObject>,
320 #[prost(string, optional, tag = "9")]
323 pub events_digest: ::core::option::Option<::prost::alloc::string::String>,
324 #[prost(string, repeated, tag = "10")]
326 pub dependencies: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
327 #[prost(uint64, optional, tag = "11")]
329 pub lamport_version: ::core::option::Option<u64>,
330 #[prost(message, repeated, tag = "12")]
332 pub changed_objects: ::prost::alloc::vec::Vec<ChangedObject>,
333 #[prost(message, repeated, tag = "13")]
338 pub unchanged_consensus_objects: ::prost::alloc::vec::Vec<UnchangedConsensusObject>,
339 #[prost(string, optional, tag = "14")]
343 pub auxiliary_data_digest: ::core::option::Option<::prost::alloc::string::String>,
344}
345#[non_exhaustive]
347#[derive(Clone, PartialEq, ::prost::Message)]
348pub struct ChangedObject {
349 #[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 #[prost(uint64, optional, tag = "3")]
356 pub input_version: ::core::option::Option<u64>,
357 #[prost(string, optional, tag = "4")]
359 pub input_digest: ::core::option::Option<::prost::alloc::string::String>,
360 #[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 #[prost(uint64, optional, tag = "7")]
367 pub output_version: ::core::option::Option<u64>,
368 #[prost(string, optional, tag = "8")]
370 pub output_digest: ::core::option::Option<::prost::alloc::string::String>,
371 #[prost(message, optional, tag = "9")]
373 pub output_owner: ::core::option::Option<Owner>,
374 #[prost(enumeration = "changed_object::IdOperation", optional, tag = "10")]
376 pub id_operation: ::core::option::Option<i32>,
377 #[prost(string, optional, tag = "11")]
380 pub object_type: ::core::option::Option<::prost::alloc::string::String>,
381}
382pub 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 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 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 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 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 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 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#[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 #[prost(string, optional, tag = "2")]
523 pub object_id: ::core::option::Option<::prost::alloc::string::String>,
524 #[prost(uint64, optional, tag = "3")]
526 pub version: ::core::option::Option<u64>,
527 #[prost(string, optional, tag = "4")]
529 pub digest: ::core::option::Option<::prost::alloc::string::String>,
530 #[prost(string, optional, tag = "5")]
533 pub object_type: ::core::option::Option<::prost::alloc::string::String>,
534}
535pub 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 ReadOnlyRoot = 1,
554 MutateConsensusStreamEnded = 2,
556 ReadConsensusStreamEnded = 3,
558 Canceled = 4,
561 PerEpochConfig = 5,
565 }
566 impl UnchangedConsensusObjectKind {
567 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 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 #[prost(message, optional, tag = "2")]
602 pub committee: ::core::option::Option<ValidatorCommittee>,
603 #[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 #[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 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 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#[non_exhaustive]
654#[derive(Clone, PartialEq, ::prost::Message)]
655pub struct TransactionEvents {
656 #[prost(message, optional, tag = "1")]
658 pub bcs: ::core::option::Option<Bcs>,
659 #[prost(string, optional, tag = "2")]
661 pub digest: ::core::option::Option<::prost::alloc::string::String>,
662 #[prost(message, repeated, tag = "3")]
664 pub events: ::prost::alloc::vec::Vec<Event>,
665}
666#[non_exhaustive]
668#[derive(Clone, PartialEq, ::prost::Message)]
669pub struct Event {
670 #[prost(string, optional, tag = "1")]
673 pub package_id: ::core::option::Option<::prost::alloc::string::String>,
674 #[prost(string, optional, tag = "2")]
677 pub module: ::core::option::Option<::prost::alloc::string::String>,
678 #[prost(string, optional, tag = "3")]
680 pub sender: ::core::option::Option<::prost::alloc::string::String>,
681 #[prost(string, optional, tag = "4")]
683 pub event_type: ::core::option::Option<::prost::alloc::string::String>,
684 #[prost(message, optional, tag = "5")]
686 pub contents: ::core::option::Option<Bcs>,
687 #[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 #[prost(string, optional, tag = "1")]
696 pub digest: ::core::option::Option<::prost::alloc::string::String>,
697 #[prost(message, optional, tag = "2")]
699 pub transaction: ::core::option::Option<Transaction>,
700 #[prost(message, repeated, tag = "3")]
703 pub signatures: ::prost::alloc::vec::Vec<UserSignature>,
704 #[prost(message, optional, tag = "4")]
706 pub effects: ::core::option::Option<TransactionEffects>,
707 #[prost(message, optional, tag = "5")]
714 pub events: ::core::option::Option<TransactionEvents>,
715 #[prost(uint64, optional, tag = "6")]
717 pub checkpoint: ::core::option::Option<u64>,
718 #[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 #[prost(message, repeated, tag = "10")]
725 pub input_objects: ::prost::alloc::vec::Vec<Object>,
726 #[prost(message, repeated, tag = "11")]
728 pub output_objects: ::prost::alloc::vec::Vec<Object>,
729}
730#[non_exhaustive]
732#[derive(Clone, PartialEq, ::prost::Message)]
733pub struct ExecutionStatus {
734 #[prost(bool, optional, tag = "1")]
736 pub success: ::core::option::Option<bool>,
737 #[prost(message, optional, tag = "2")]
739 pub error: ::core::option::Option<ExecutionError>,
740}
741#[non_exhaustive]
743#[derive(Clone, PartialEq, ::prost::Message)]
744pub struct ExecutionError {
745 #[prost(string, optional, tag = "1")]
747 pub description: ::core::option::Option<::prost::alloc::string::String>,
748 #[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}
759pub 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 InsufficientGas = 1,
778 InvalidGasObject = 2,
780 InvariantViolation = 3,
782 FeatureNotYetSupported = 4,
784 ObjectTooBig = 5,
786 PackageTooBig = 6,
788 CircularObjectOwnership = 7,
790 InsufficientCoinBalance = 8,
792 CoinBalanceOverflow = 9,
794 PublishErrorNonZeroAddress = 10,
797 SuiMoveVerificationError = 11,
799 MovePrimitiveRuntimeError = 12,
803 MoveAbort = 13,
805 VmVerificationOrDeserializationError = 14,
807 VmInvariantViolation = 15,
809 FunctionNotFound = 16,
811 ArityMismatch = 17,
814 TypeArityMismatch = 18,
817 NonEntryFunctionInvoked = 19,
819 CommandArgumentError = 20,
821 TypeArgumentError = 21,
823 UnusedValueWithoutDrop = 22,
825 InvalidPublicFunctionReturnType = 23,
828 InvalidTransferObject = 24,
830 EffectsTooLarge = 25,
832 PublishUpgradeMissingDependency = 26,
834 PublishUpgradeDependencyDowngrade = 27,
840 PackageUpgradeError = 28,
842 WrittenObjectsTooLarge = 29,
844 CertificateDenied = 30,
846 SuiMoveVerificationTimedout = 31,
848 ConsensusObjectOperationNotAllowed = 32,
850 InputObjectDeleted = 33,
852 ExecutionCanceledDueToConsensusObjectCongestion = 34,
854 AddressDeniedForCoin = 35,
856 CoinTypeGlobalPause = 36,
858 ExecutionCanceledDueToRandomnessUnavailable = 37,
860 MoveVectorElemTooBig = 38,
861 MoveRawValueTooBig = 39,
862 InvalidLinkage = 40,
863 }
864 impl ExecutionErrorKind {
865 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 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 #[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 #[prost(message, optional, tag = "2")]
1025 pub location: ::core::option::Option<MoveLocation>,
1026 #[prost(message, optional, tag = "3")]
1028 pub clever_error: ::core::option::Option<CleverError>,
1029}
1030#[non_exhaustive]
1032#[derive(Clone, PartialEq, ::prost::Message)]
1033pub struct MoveLocation {
1034 #[prost(string, optional, tag = "1")]
1036 pub package: ::core::option::Option<::prost::alloc::string::String>,
1037 #[prost(string, optional, tag = "2")]
1039 pub module: ::core::option::Option<::prost::alloc::string::String>,
1040 #[prost(uint32, optional, tag = "3")]
1042 pub function: ::core::option::Option<u32>,
1043 #[prost(uint32, optional, tag = "4")]
1045 pub instruction: ::core::option::Option<u32>,
1046 #[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}
1064pub 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#[non_exhaustive]
1077#[derive(Clone, Copy, PartialEq, ::prost::Message)]
1078pub struct SizeError {
1079 #[prost(uint64, optional, tag = "1")]
1081 pub size: ::core::option::Option<u64>,
1082 #[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 #[prost(uint32, optional, tag = "1")]
1091 pub index: ::core::option::Option<u32>,
1092 #[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 #[prost(string, optional, tag = "1")]
1101 pub address: ::core::option::Option<::prost::alloc::string::String>,
1102 #[prost(string, optional, tag = "2")]
1104 pub coin_type: ::core::option::Option<::prost::alloc::string::String>,
1105}
1106#[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#[non_exhaustive]
1115#[derive(Clone, Copy, PartialEq, ::prost::Message)]
1116pub struct CommandArgumentError {
1117 #[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}
1129pub 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 TypeMismatch = 1,
1148 InvalidBcsBytes = 2,
1150 InvalidUsageOfPureArgument = 3,
1152 InvalidArgumentToPrivateEntryFunction = 4,
1155 IndexOutOfBounds = 5,
1159 SecondaryIndexOutOfBounds = 6,
1163 InvalidResultArity = 7,
1167 InvalidGasCoinUsage = 8,
1170 InvalidValueUsage = 9,
1175 InvalidObjectByValue = 10,
1177 InvalidObjectByMutRef = 11,
1179 ConsensusObjectOperationNotAllowed = 12,
1182 InvalidArgumentArity = 13,
1185 }
1186 impl CommandArgumentErrorKind {
1187 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 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#[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 #[prost(string, optional, tag = "2")]
1253 pub package_id: ::core::option::Option<::prost::alloc::string::String>,
1254 #[prost(string, optional, tag = "3")]
1256 pub digest: ::core::option::Option<::prost::alloc::string::String>,
1257 #[prost(uint32, optional, tag = "4")]
1259 pub policy: ::core::option::Option<u32>,
1260 #[prost(string, optional, tag = "5")]
1262 pub ticket_id: ::core::option::Option<::prost::alloc::string::String>,
1263}
1264pub 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 UnableToFetchPackage = 1,
1283 NotAPackage = 2,
1285 IncompatibleUpgrade = 3,
1287 DigestDoesNotMatch = 4,
1289 UnknownUpgradePolicy = 5,
1291 PackageIdDoesNotMatch = 6,
1293 }
1294 impl PackageUpgradeErrorKind {
1295 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 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#[non_exhaustive]
1327#[derive(Clone, Copy, PartialEq, ::prost::Message)]
1328pub struct TypeArgumentError {
1329 #[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}
1339pub 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 TypeNotFound = 1,
1358 ConstraintNotSatisfied = 2,
1360 }
1361 impl TypeArgumentErrorKind {
1362 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 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#[non_exhaustive]
1386#[derive(Clone, Copy, PartialEq, ::prost::Message)]
1387pub struct GasCostSummary {
1388 #[prost(uint64, optional, tag = "1")]
1390 pub computation_cost: ::core::option::Option<u64>,
1391 #[prost(uint64, optional, tag = "2")]
1393 pub storage_cost: ::core::option::Option<u64>,
1394 #[prost(uint64, optional, tag = "3")]
1397 pub storage_rebate: ::core::option::Option<u64>,
1398 #[prost(uint64, optional, tag = "4")]
1400 pub non_refundable_storage_fee: ::core::option::Option<u64>,
1401}
1402#[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 #[prost(bytes = "bytes", optional, tag = "2")]
1413 pub pure: ::core::option::Option<::prost::bytes::Bytes>,
1414 #[prost(string, optional, tag = "3")]
1416 pub object_id: ::core::option::Option<::prost::alloc::string::String>,
1417 #[prost(uint64, optional, tag = "4")]
1421 pub version: ::core::option::Option<u64>,
1422 #[prost(string, optional, tag = "5")]
1424 pub digest: ::core::option::Option<::prost::alloc::string::String>,
1425 #[prost(bool, optional, tag = "6")]
1428 pub mutable: ::core::option::Option<bool>,
1429 #[prost(message, optional, boxed, tag = "1000")]
1433 pub literal: ::core::option::Option<
1434 ::prost::alloc::boxed::Box<::prost_types::Value>,
1435 >,
1436}
1437pub 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 Pure = 1,
1456 ImmutableOrOwned = 2,
1458 Shared = 3,
1460 Receiving = 4,
1462 }
1463 impl InputKind {
1464 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 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 #[prost(string, optional, tag = "1")]
1501 pub chain_id: ::core::option::Option<::prost::alloc::string::String>,
1502 #[prost(string, optional, tag = "2")]
1506 pub chain: ::core::option::Option<::prost::alloc::string::String>,
1507 #[prost(uint64, optional, tag = "3")]
1509 pub epoch: ::core::option::Option<u64>,
1510 #[prost(uint64, optional, tag = "4")]
1512 pub checkpoint_height: ::core::option::Option<u64>,
1513 #[prost(message, optional, tag = "5")]
1515 pub timestamp: ::core::option::Option<::prost_types::Timestamp>,
1516 #[prost(uint64, optional, tag = "6")]
1518 pub lowest_available_checkpoint: ::core::option::Option<u64>,
1519 #[prost(uint64, optional, tag = "7")]
1521 pub lowest_available_checkpoint_objects: ::core::option::Option<u64>,
1522 #[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 #[prost(string, optional, tag = "1")]
1531 pub object_id: ::core::option::Option<::prost::alloc::string::String>,
1532 #[prost(uint64, optional, tag = "2")]
1536 pub version: ::core::option::Option<u64>,
1537 #[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 #[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}
1570pub 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 #[prost(string, optional, tag = "1")]
1586 pub digest: ::core::option::Option<::prost::alloc::string::String>,
1587 #[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 #[prost(string, repeated, tag = "1")]
1603 pub digests: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
1604 #[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}
1621pub 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 #[prost(message, optional, tag = "3")]
1638 pub read_mask: ::core::option::Option<::prost_types::FieldMask>,
1639 #[prost(oneof = "get_checkpoint_request::CheckpointId", tags = "1, 2")]
1641 pub checkpoint_id: ::core::option::Option<get_checkpoint_request::CheckpointId>,
1642}
1643pub mod get_checkpoint_request {
1645 #[non_exhaustive]
1647 #[derive(Clone, PartialEq, ::prost::Oneof)]
1648 pub enum CheckpointId {
1649 #[prost(uint64, tag = "1")]
1651 SequenceNumber(u64),
1652 #[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 #[prost(uint64, optional, tag = "1")]
1669 pub epoch: ::core::option::Option<u64>,
1670 #[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}
1681pub 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 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 #[must_use]
1746 pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
1747 self.inner = self.inner.send_compressed(encoding);
1748 self
1749 }
1750 #[must_use]
1752 pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
1753 self.inner = self.inner.accept_compressed(encoding);
1754 self
1755 }
1756 #[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 #[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 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}
1956pub 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 #[async_trait]
1968 pub trait LedgerService: std::marker::Send + std::marker::Sync + 'static {
1969 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 #[must_use]
2052 pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
2053 self.accept_compression_encodings.enable(encoding);
2054 self
2055 }
2056 #[must_use]
2058 pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
2059 self.send_compression_encodings.enable(encoding);
2060 self
2061 }
2062 #[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 #[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 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#[non_exhaustive]
2459#[derive(Clone, PartialEq, ::prost::Message)]
2460pub struct GetCoinInfoRequest {
2461 #[prost(string, optional, tag = "1")]
2463 pub coin_type: ::core::option::Option<::prost::alloc::string::String>,
2464}
2465#[non_exhaustive]
2467#[derive(Clone, PartialEq, ::prost::Message)]
2468pub struct GetCoinInfoResponse {
2469 #[prost(string, optional, tag = "1")]
2471 pub coin_type: ::core::option::Option<::prost::alloc::string::String>,
2472 #[prost(message, optional, tag = "2")]
2475 pub metadata: ::core::option::Option<CoinMetadata>,
2476 #[prost(message, optional, tag = "3")]
2479 pub treasury: ::core::option::Option<CoinTreasury>,
2480 #[prost(message, optional, tag = "4")]
2488 pub regulated_metadata: ::core::option::Option<RegulatedCoinMetadata>,
2489}
2490#[non_exhaustive]
2492#[derive(Clone, PartialEq, ::prost::Message)]
2493pub struct CoinMetadata {
2494 #[prost(string, optional, tag = "1")]
2497 pub id: ::core::option::Option<::prost::alloc::string::String>,
2498 #[prost(uint32, optional, tag = "2")]
2500 pub decimals: ::core::option::Option<u32>,
2501 #[prost(string, optional, tag = "3")]
2503 pub name: ::core::option::Option<::prost::alloc::string::String>,
2504 #[prost(string, optional, tag = "4")]
2506 pub symbol: ::core::option::Option<::prost::alloc::string::String>,
2507 #[prost(string, optional, tag = "5")]
2509 pub description: ::core::option::Option<::prost::alloc::string::String>,
2510 #[prost(string, optional, tag = "6")]
2512 pub icon_url: ::core::option::Option<::prost::alloc::string::String>,
2513 #[prost(string, optional, tag = "7")]
2517 pub metadata_cap_id: ::core::option::Option<::prost::alloc::string::String>,
2518 #[prost(enumeration = "coin_metadata::MetadataCapState", optional, tag = "8")]
2520 pub metadata_cap_state: ::core::option::Option<i32>,
2521}
2522pub mod coin_metadata {
2524 #[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 Unknown = 0,
2542 Claimed = 1,
2544 Unclaimed = 2,
2546 Deleted = 3,
2548 }
2549 impl MetadataCapState {
2550 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 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#[non_exhaustive]
2576#[derive(Clone, PartialEq, ::prost::Message)]
2577pub struct CoinTreasury {
2578 #[prost(string, optional, tag = "1")]
2580 pub id: ::core::option::Option<::prost::alloc::string::String>,
2581 #[prost(uint64, optional, tag = "2")]
2583 pub total_supply: ::core::option::Option<u64>,
2584 #[prost(enumeration = "coin_treasury::SupplyState", optional, tag = "3")]
2586 pub supply_state: ::core::option::Option<i32>,
2587}
2588pub mod coin_treasury {
2590 #[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 Unknown = 0,
2607 Fixed = 1,
2609 BurnOnly = 2,
2611 }
2612 impl SupplyState {
2613 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 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#[non_exhaustive]
2637#[derive(Clone, PartialEq, ::prost::Message)]
2638pub struct RegulatedCoinMetadata {
2639 #[prost(string, optional, tag = "1")]
2642 pub id: ::core::option::Option<::prost::alloc::string::String>,
2643 #[prost(string, optional, tag = "2")]
2645 pub coin_metadata_object: ::core::option::Option<::prost::alloc::string::String>,
2646 #[prost(string, optional, tag = "3")]
2648 pub deny_cap_object: ::core::option::Option<::prost::alloc::string::String>,
2649 #[prost(bool, optional, tag = "4")]
2651 pub allow_global_pause: ::core::option::Option<bool>,
2652 #[prost(uint32, optional, tag = "5")]
2654 pub variant: ::core::option::Option<u32>,
2655 #[prost(
2657 enumeration = "regulated_coin_metadata::CoinRegulatedState",
2658 optional,
2659 tag = "6"
2660 )]
2661 pub coin_regulated_state: ::core::option::Option<i32>,
2662}
2663pub mod regulated_coin_metadata {
2665 #[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 Unknown = 0,
2685 Regulated = 1,
2687 Unregulated = 2,
2689 }
2690 impl CoinRegulatedState {
2691 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 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#[non_exhaustive]
2715#[derive(Clone, PartialEq, ::prost::Message)]
2716pub struct GetBalanceRequest {
2717 #[prost(string, optional, tag = "1")]
2719 pub owner: ::core::option::Option<::prost::alloc::string::String>,
2720 #[prost(string, optional, tag = "2")]
2722 pub coin_type: ::core::option::Option<::prost::alloc::string::String>,
2723}
2724#[non_exhaustive]
2727#[derive(Clone, PartialEq, ::prost::Message)]
2728pub struct GetBalanceResponse {
2729 #[prost(message, optional, tag = "1")]
2731 pub balance: ::core::option::Option<Balance>,
2732}
2733#[non_exhaustive]
2735#[derive(Clone, PartialEq, ::prost::Message)]
2736pub struct ListBalancesRequest {
2737 #[prost(string, optional, tag = "1")]
2739 pub owner: ::core::option::Option<::prost::alloc::string::String>,
2740 #[prost(uint32, optional, tag = "2")]
2744 pub page_size: ::core::option::Option<u32>,
2745 #[prost(bytes = "bytes", optional, tag = "3")]
2751 pub page_token: ::core::option::Option<::prost::bytes::Bytes>,
2752}
2753#[non_exhaustive]
2756#[derive(Clone, PartialEq, ::prost::Message)]
2757pub struct ListBalancesResponse {
2758 #[prost(message, repeated, tag = "1")]
2760 pub balances: ::prost::alloc::vec::Vec<Balance>,
2761 #[prost(bytes = "bytes", optional, tag = "2")]
2764 pub next_page_token: ::core::option::Option<::prost::bytes::Bytes>,
2765}
2766#[non_exhaustive]
2768#[derive(Clone, PartialEq, ::prost::Message)]
2769pub struct Balance {
2770 #[prost(string, optional, tag = "1")]
2772 pub coin_type: ::core::option::Option<::prost::alloc::string::String>,
2773 #[prost(uint64, optional, tag = "3")]
2775 pub balance: ::core::option::Option<u64>,
2776}
2777#[non_exhaustive]
2779#[derive(Clone, PartialEq, ::prost::Message)]
2780pub struct ListDynamicFieldsRequest {
2781 #[prost(string, optional, tag = "1")]
2783 pub parent: ::core::option::Option<::prost::alloc::string::String>,
2784 #[prost(uint32, optional, tag = "2")]
2788 pub page_size: ::core::option::Option<u32>,
2789 #[prost(bytes = "bytes", optional, tag = "3")]
2795 pub page_token: ::core::option::Option<::prost::bytes::Bytes>,
2796 #[prost(message, optional, tag = "4")]
2799 pub read_mask: ::core::option::Option<::prost_types::FieldMask>,
2800}
2801#[non_exhaustive]
2803#[derive(Clone, PartialEq, ::prost::Message)]
2804pub struct ListDynamicFieldsResponse {
2805 #[prost(message, repeated, tag = "1")]
2807 pub dynamic_fields: ::prost::alloc::vec::Vec<DynamicField>,
2808 #[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 #[prost(string, optional, tag = "2")]
2820 pub parent: ::core::option::Option<::prost::alloc::string::String>,
2821 #[prost(string, optional, tag = "3")]
2823 pub field_id: ::core::option::Option<::prost::alloc::string::String>,
2824 #[prost(string, optional, tag = "4")]
2826 pub name_type: ::core::option::Option<::prost::alloc::string::String>,
2827 #[prost(bytes = "bytes", optional, tag = "5")]
2829 pub name_value: ::core::option::Option<::prost::bytes::Bytes>,
2830 #[prost(string, optional, tag = "6")]
2836 pub value_type: ::core::option::Option<::prost::alloc::string::String>,
2837 #[prost(string, optional, tag = "7")]
2843 pub dynamic_object_id: ::core::option::Option<::prost::alloc::string::String>,
2844 #[prost(message, optional, tag = "8")]
2846 pub object: ::core::option::Option<Object>,
2847}
2848pub 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 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 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 #[prost(message, optional, tag = "2")]
2898 pub read_mask: ::core::option::Option<::prost_types::FieldMask>,
2899 #[prost(
2901 enumeration = "simulate_transaction_request::TransactionChecks",
2902 optional,
2903 tag = "3"
2904 )]
2905 pub checks: ::core::option::Option<i32>,
2906 #[prost(bool, optional, tag = "4")]
2911 pub do_gas_selection: ::core::option::Option<bool>,
2912}
2913pub mod simulate_transaction_request {
2915 #[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 pub fn as_str_name(&self) -> &'static str {
2939 match self {
2940 Self::Enabled => "ENABLED",
2941 Self::Disabled => "DISABLED",
2942 }
2943 }
2944 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#[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 #[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 #[prost(string, optional, tag = "1")]
2987 pub owner: ::core::option::Option<::prost::alloc::string::String>,
2988 #[prost(uint32, optional, tag = "2")]
2992 pub page_size: ::core::option::Option<u32>,
2993 #[prost(bytes = "bytes", optional, tag = "3")]
2999 pub page_token: ::core::option::Option<::prost::bytes::Bytes>,
3000 #[prost(message, optional, tag = "4")]
3003 pub read_mask: ::core::option::Option<::prost_types::FieldMask>,
3004 #[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 #[prost(message, repeated, tag = "1")]
3020 pub objects: ::prost::alloc::vec::Vec<Object>,
3021 #[prost(bytes = "bytes", optional, tag = "2")]
3024 pub next_page_token: ::core::option::Option<::prost::bytes::Bytes>,
3025}
3026pub 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 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 #[must_use]
3091 pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
3092 self.inner = self.inner.send_compressed(encoding);
3093 self
3094 }
3095 #[must_use]
3097 pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
3098 self.inner = self.inner.accept_compressed(encoding);
3099 self
3100 }
3101 #[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 #[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}
3284pub 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 #[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 #[must_use]
3372 pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
3373 self.accept_compression_encodings.enable(encoding);
3374 self
3375 }
3376 #[must_use]
3378 pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
3379 self.send_compression_encodings.enable(encoding);
3380 self
3381 }
3382 #[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 #[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 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#[non_exhaustive]
3734#[derive(Clone, PartialEq, ::prost::Message)]
3735pub struct Package {
3736 #[prost(string, optional, tag = "1")]
3742 pub storage_id: ::core::option::Option<::prost::alloc::string::String>,
3743 #[prost(string, optional, tag = "2")]
3750 pub original_id: ::core::option::Option<::prost::alloc::string::String>,
3751 #[prost(uint64, optional, tag = "3")]
3753 pub version: ::core::option::Option<u64>,
3754 #[prost(message, repeated, tag = "4")]
3756 pub modules: ::prost::alloc::vec::Vec<Module>,
3757 #[prost(message, repeated, tag = "5")]
3760 pub type_origins: ::prost::alloc::vec::Vec<TypeOrigin>,
3761 #[prost(message, repeated, tag = "6")]
3765 pub linkage: ::prost::alloc::vec::Vec<Linkage>,
3766}
3767#[non_exhaustive]
3769#[derive(Clone, PartialEq, ::prost::Message)]
3770pub struct Module {
3771 #[prost(string, optional, tag = "1")]
3773 pub name: ::core::option::Option<::prost::alloc::string::String>,
3774 #[prost(bytes = "bytes", optional, tag = "2")]
3776 pub contents: ::core::option::Option<::prost::bytes::Bytes>,
3777 #[prost(message, repeated, tag = "3")]
3779 pub datatypes: ::prost::alloc::vec::Vec<DatatypeDescriptor>,
3780 #[prost(message, repeated, tag = "4")]
3782 pub functions: ::prost::alloc::vec::Vec<FunctionDescriptor>,
3783}
3784#[non_exhaustive]
3786#[derive(Clone, PartialEq, ::prost::Message)]
3787pub struct DatatypeDescriptor {
3788 #[prost(string, optional, tag = "1")]
3792 pub type_name: ::core::option::Option<::prost::alloc::string::String>,
3793 #[prost(string, optional, tag = "2")]
3797 pub defining_id: ::core::option::Option<::prost::alloc::string::String>,
3798 #[prost(string, optional, tag = "3")]
3800 pub module: ::core::option::Option<::prost::alloc::string::String>,
3801 #[prost(string, optional, tag = "4")]
3803 pub name: ::core::option::Option<::prost::alloc::string::String>,
3804 #[prost(enumeration = "Ability", repeated, tag = "5")]
3806 pub abilities: ::prost::alloc::vec::Vec<i32>,
3807 #[prost(message, repeated, tag = "6")]
3809 pub type_parameters: ::prost::alloc::vec::Vec<TypeParameter>,
3810 #[prost(enumeration = "datatype_descriptor::DatatypeKind", optional, tag = "7")]
3812 pub kind: ::core::option::Option<i32>,
3813 #[prost(message, repeated, tag = "8")]
3817 pub fields: ::prost::alloc::vec::Vec<FieldDescriptor>,
3818 #[prost(message, repeated, tag = "9")]
3822 pub variants: ::prost::alloc::vec::Vec<VariantDescriptor>,
3823}
3824pub 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 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 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#[non_exhaustive]
3869#[derive(Clone, PartialEq, ::prost::Message)]
3870pub struct TypeParameter {
3871 #[prost(enumeration = "Ability", repeated, tag = "1")]
3873 pub constraints: ::prost::alloc::vec::Vec<i32>,
3874 #[prost(bool, optional, tag = "2")]
3876 pub is_phantom: ::core::option::Option<bool>,
3877}
3878#[non_exhaustive]
3880#[derive(Clone, PartialEq, ::prost::Message)]
3881pub struct FieldDescriptor {
3882 #[prost(string, optional, tag = "1")]
3884 pub name: ::core::option::Option<::prost::alloc::string::String>,
3885 #[prost(uint32, optional, tag = "2")]
3887 pub position: ::core::option::Option<u32>,
3888 #[prost(message, optional, tag = "3")]
3890 pub r#type: ::core::option::Option<OpenSignatureBody>,
3891}
3892#[non_exhaustive]
3894#[derive(Clone, PartialEq, ::prost::Message)]
3895pub struct VariantDescriptor {
3896 #[prost(string, optional, tag = "1")]
3898 pub name: ::core::option::Option<::prost::alloc::string::String>,
3899 #[prost(uint32, optional, tag = "2")]
3901 pub position: ::core::option::Option<u32>,
3902 #[prost(message, repeated, tag = "3")]
3904 pub fields: ::prost::alloc::vec::Vec<FieldDescriptor>,
3905}
3906#[non_exhaustive]
3908#[derive(Clone, PartialEq, ::prost::Message)]
3909pub struct OpenSignatureBody {
3910 #[prost(enumeration = "open_signature_body::Type", optional, tag = "1")]
3912 pub r#type: ::core::option::Option<i32>,
3913 #[prost(string, optional, tag = "2")]
3915 pub type_name: ::core::option::Option<::prost::alloc::string::String>,
3916 #[prost(message, repeated, tag = "3")]
3918 pub type_parameter_instantiation: ::prost::alloc::vec::Vec<OpenSignatureBody>,
3919 #[prost(uint32, optional, tag = "4")]
3921 pub type_parameter: ::core::option::Option<u32>,
3922}
3923pub 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 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 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#[non_exhaustive]
3995#[derive(Clone, PartialEq, ::prost::Message)]
3996pub struct FunctionDescriptor {
3997 #[prost(string, optional, tag = "1")]
3999 pub name: ::core::option::Option<::prost::alloc::string::String>,
4000 #[prost(enumeration = "function_descriptor::Visibility", optional, tag = "5")]
4002 pub visibility: ::core::option::Option<i32>,
4003 #[prost(bool, optional, tag = "6")]
4005 pub is_entry: ::core::option::Option<bool>,
4006 #[prost(message, repeated, tag = "7")]
4008 pub type_parameters: ::prost::alloc::vec::Vec<TypeParameter>,
4009 #[prost(message, repeated, tag = "8")]
4011 pub parameters: ::prost::alloc::vec::Vec<OpenSignature>,
4012 #[prost(message, repeated, tag = "9")]
4014 pub returns: ::prost::alloc::vec::Vec<OpenSignature>,
4015}
4016pub 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 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 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#[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}
4071pub 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 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 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#[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#[non_exhaustive]
4127#[derive(Clone, PartialEq, ::prost::Message)]
4128pub struct Linkage {
4129 #[prost(string, optional, tag = "1")]
4131 pub original_id: ::core::option::Option<::prost::alloc::string::String>,
4132 #[prost(string, optional, tag = "2")]
4134 pub upgraded_id: ::core::option::Option<::prost::alloc::string::String>,
4135 #[prost(uint64, optional, tag = "3")]
4137 pub upgraded_version: ::core::option::Option<u64>,
4138}
4139#[non_exhaustive]
4141#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
4142#[repr(i32)]
4143pub enum Ability {
4144 Unknown = 0,
4145 Copy = 1,
4147 Drop = 2,
4149 Store = 3,
4151 Key = 4,
4153}
4154impl Ability {
4155 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 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 #[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 #[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 #[prost(string, optional, tag = "1")]
4199 pub package_id: ::core::option::Option<::prost::alloc::string::String>,
4200 #[prost(string, optional, tag = "2")]
4202 pub module_name: ::core::option::Option<::prost::alloc::string::String>,
4203 #[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 #[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 #[prost(string, optional, tag = "1")]
4219 pub package_id: ::core::option::Option<::prost::alloc::string::String>,
4220 #[prost(string, optional, tag = "2")]
4222 pub module_name: ::core::option::Option<::prost::alloc::string::String>,
4223 #[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 #[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 #[prost(string, optional, tag = "1")]
4239 pub package_id: ::core::option::Option<::prost::alloc::string::String>,
4240 #[prost(uint32, optional, tag = "2")]
4244 pub page_size: ::core::option::Option<u32>,
4245 #[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 #[prost(message, repeated, tag = "1")]
4258 pub versions: ::prost::alloc::vec::Vec<PackageVersion>,
4259 #[prost(bytes = "bytes", optional, tag = "2")]
4262 pub next_page_token: ::core::option::Option<::prost::bytes::Bytes>,
4263}
4264#[non_exhaustive]
4266#[derive(Clone, PartialEq, ::prost::Message)]
4267pub struct PackageVersion {
4268 #[prost(string, optional, tag = "1")]
4270 pub package_id: ::core::option::Option<::prost::alloc::string::String>,
4271 #[prost(uint64, optional, tag = "2")]
4273 pub version: ::core::option::Option<u64>,
4274}
4275pub 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 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 #[must_use]
4340 pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
4341 self.inner = self.inner.send_compressed(encoding);
4342 self
4343 }
4344 #[must_use]
4346 pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
4347 self.inner = self.inner.accept_compressed(encoding);
4348 self
4349 }
4350 #[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 #[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}
4475pub 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 #[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 #[must_use]
4549 pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
4550 self.accept_compression_encodings.enable(encoding);
4551 self
4552 }
4553 #[must_use]
4555 pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
4556 self.send_compression_encodings.enable(encoding);
4557 self
4558 }
4559 #[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 #[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 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 #[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 #[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 #[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 #[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 #[prost(string, optional, tag = "1")]
4858 pub id: ::core::option::Option<::prost::alloc::string::String>,
4859 #[prost(string, optional, tag = "2")]
4861 pub name: ::core::option::Option<::prost::alloc::string::String>,
4862 #[prost(string, optional, tag = "3")]
4870 pub registration_nft_id: ::core::option::Option<::prost::alloc::string::String>,
4871 #[prost(message, optional, tag = "4")]
4876 pub expiration_timestamp: ::core::option::Option<::prost_types::Timestamp>,
4877 #[prost(string, optional, tag = "5")]
4879 pub target_address: ::core::option::Option<::prost::alloc::string::String>,
4880 #[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}
4887pub 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 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 #[must_use]
4952 pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
4953 self.inner = self.inner.send_compressed(encoding);
4954 self
4955 }
4956 #[must_use]
4958 pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
4959 self.inner = self.inner.accept_compressed(encoding);
4960 self
4961 }
4962 #[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 #[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}
5030pub 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 #[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 #[must_use]
5090 pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
5091 self.accept_compression_encodings.enable(encoding);
5092 self
5093 }
5094 #[must_use]
5096 pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
5097 self.send_compression_encodings.enable(encoding);
5098 self
5099 }
5100 #[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 #[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 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#[non_exhaustive]
5267#[derive(Clone, PartialEq, ::prost::Message)]
5268pub struct Object {
5269 #[prost(message, optional, tag = "1")]
5271 pub bcs: ::core::option::Option<Bcs>,
5272 #[prost(string, optional, tag = "2")]
5274 pub object_id: ::core::option::Option<::prost::alloc::string::String>,
5275 #[prost(uint64, optional, tag = "3")]
5277 pub version: ::core::option::Option<u64>,
5278 #[prost(string, optional, tag = "4")]
5280 pub digest: ::core::option::Option<::prost::alloc::string::String>,
5281 #[prost(message, optional, tag = "5")]
5283 pub owner: ::core::option::Option<Owner>,
5284 #[prost(string, optional, tag = "6")]
5288 pub object_type: ::core::option::Option<::prost::alloc::string::String>,
5289 #[prost(bool, optional, tag = "7")]
5294 pub has_public_transfer: ::core::option::Option<bool>,
5295 #[prost(message, optional, tag = "8")]
5299 pub contents: ::core::option::Option<Bcs>,
5300 #[prost(message, optional, tag = "9")]
5302 pub package: ::core::option::Option<Package>,
5303 #[prost(string, optional, tag = "10")]
5305 pub previous_transaction: ::core::option::Option<::prost::alloc::string::String>,
5306 #[prost(uint64, optional, tag = "11")]
5310 pub storage_rebate: ::core::option::Option<u64>,
5311 #[prost(message, optional, boxed, tag = "100")]
5313 pub json: ::core::option::Option<::prost::alloc::boxed::Box<::prost_types::Value>>,
5314 #[prost(uint64, optional, tag = "101")]
5316 pub balance: ::core::option::Option<u64>,
5317}
5318#[non_exhaustive]
5320#[derive(Clone, PartialEq, ::prost::Message)]
5321pub struct ObjectReference {
5322 #[prost(string, optional, tag = "1")]
5324 pub object_id: ::core::option::Option<::prost::alloc::string::String>,
5325 #[prost(uint64, optional, tag = "2")]
5327 pub version: ::core::option::Option<u64>,
5328 #[prost(string, optional, tag = "3")]
5330 pub digest: ::core::option::Option<::prost::alloc::string::String>,
5331}
5332#[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 #[prost(string, optional, tag = "2")]
5340 pub address: ::core::option::Option<::prost::alloc::string::String>,
5341 #[prost(uint64, optional, tag = "3")]
5343 pub version: ::core::option::Option<u64>,
5344}
5345pub 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 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 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#[non_exhaustive]
5415#[derive(Clone, PartialEq, ::prost::Message)]
5416pub struct UserSignature {
5417 #[prost(message, optional, tag = "1")]
5422 pub bcs: ::core::option::Option<Bcs>,
5423 #[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}
5429pub mod user_signature {
5431 #[non_exhaustive]
5432 #[derive(Clone, PartialEq, ::prost::Oneof)]
5433 pub enum Signature {
5434 #[prost(message, tag = "3")]
5436 Simple(super::SimpleSignature),
5437 #[prost(message, tag = "4")]
5439 Multisig(super::MultisigAggregatedSignature),
5440 #[prost(message, tag = "5")]
5442 Zklogin(super::ZkLoginAuthenticator),
5443 #[prost(message, tag = "6")]
5445 Passkey(super::PasskeyAuthenticator),
5446 }
5447}
5448#[non_exhaustive]
5450#[derive(Clone, PartialEq, ::prost::Message)]
5451pub struct SimpleSignature {
5452 #[prost(enumeration = "SignatureScheme", optional, tag = "1")]
5454 pub scheme: ::core::option::Option<i32>,
5455 #[prost(bytes = "bytes", optional, tag = "2")]
5457 pub signature: ::core::option::Option<::prost::bytes::Bytes>,
5458 #[prost(bytes = "bytes", optional, tag = "3")]
5460 pub public_key: ::core::option::Option<::prost::bytes::Bytes>,
5461}
5462#[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 #[prost(string, optional, tag = "2")]
5470 pub address_seed: ::core::option::Option<::prost::alloc::string::String>,
5471}
5472#[non_exhaustive]
5474#[derive(Clone, PartialEq, ::prost::Message)]
5475pub struct MultisigMemberPublicKey {
5476 #[prost(enumeration = "SignatureScheme", optional, tag = "1")]
5478 pub scheme: ::core::option::Option<i32>,
5479 #[prost(bytes = "bytes", optional, tag = "2")]
5481 pub public_key: ::core::option::Option<::prost::bytes::Bytes>,
5482 #[prost(message, optional, tag = "3")]
5484 pub zklogin: ::core::option::Option<ZkLoginPublicIdentifier>,
5485}
5486#[non_exhaustive]
5488#[derive(Clone, PartialEq, ::prost::Message)]
5489pub struct MultisigMember {
5490 #[prost(message, optional, tag = "1")]
5492 pub public_key: ::core::option::Option<MultisigMemberPublicKey>,
5493 #[prost(uint32, optional, tag = "2")]
5495 pub weight: ::core::option::Option<u32>,
5496}
5497#[non_exhaustive]
5499#[derive(Clone, PartialEq, ::prost::Message)]
5500pub struct MultisigCommittee {
5501 #[prost(message, repeated, tag = "1")]
5503 pub members: ::prost::alloc::vec::Vec<MultisigMember>,
5504 #[prost(uint32, optional, tag = "2")]
5507 pub threshold: ::core::option::Option<u32>,
5508}
5509#[non_exhaustive]
5511#[derive(Clone, PartialEq, ::prost::Message)]
5512pub struct MultisigAggregatedSignature {
5513 #[prost(message, repeated, tag = "1")]
5517 pub signatures: ::prost::alloc::vec::Vec<MultisigMemberSignature>,
5518 #[prost(uint32, optional, tag = "2")]
5521 pub bitmap: ::core::option::Option<u32>,
5522 #[prost(uint32, repeated, tag = "3")]
5525 pub legacy_bitmap: ::prost::alloc::vec::Vec<u32>,
5526 #[prost(message, optional, tag = "4")]
5528 pub committee: ::core::option::Option<MultisigCommittee>,
5529}
5530#[non_exhaustive]
5532#[derive(Clone, PartialEq, ::prost::Message)]
5533pub struct MultisigMemberSignature {
5534 #[prost(enumeration = "SignatureScheme", optional, tag = "1")]
5536 pub scheme: ::core::option::Option<i32>,
5537 #[prost(bytes = "bytes", optional, tag = "2")]
5539 pub signature: ::core::option::Option<::prost::bytes::Bytes>,
5540 #[prost(message, optional, tag = "3")]
5542 pub zklogin: ::core::option::Option<ZkLoginAuthenticator>,
5543 #[prost(message, optional, tag = "4")]
5545 pub passkey: ::core::option::Option<PasskeyAuthenticator>,
5546}
5547#[non_exhaustive]
5549#[derive(Clone, PartialEq, ::prost::Message)]
5550pub struct ZkLoginAuthenticator {
5551 #[prost(message, optional, tag = "1")]
5553 pub inputs: ::core::option::Option<ZkLoginInputs>,
5554 #[prost(uint64, optional, tag = "2")]
5556 pub max_epoch: ::core::option::Option<u64>,
5557 #[prost(message, optional, tag = "3")]
5559 pub signature: ::core::option::Option<SimpleSignature>,
5560}
5561#[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 #[prost(string, optional, tag = "4")]
5573 pub address_seed: ::core::option::Option<::prost::alloc::string::String>,
5574}
5575#[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#[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#[non_exhaustive]
5597#[derive(Clone, PartialEq, ::prost::Message)]
5598pub struct CircomG1 {
5599 #[prost(string, optional, tag = "1")]
5601 pub e0: ::core::option::Option<::prost::alloc::string::String>,
5602 #[prost(string, optional, tag = "2")]
5604 pub e1: ::core::option::Option<::prost::alloc::string::String>,
5605 #[prost(string, optional, tag = "3")]
5607 pub e2: ::core::option::Option<::prost::alloc::string::String>,
5608}
5609#[non_exhaustive]
5611#[derive(Clone, PartialEq, ::prost::Message)]
5612pub struct CircomG2 {
5613 #[prost(string, optional, tag = "1")]
5615 pub e00: ::core::option::Option<::prost::alloc::string::String>,
5616 #[prost(string, optional, tag = "2")]
5618 pub e01: ::core::option::Option<::prost::alloc::string::String>,
5619 #[prost(string, optional, tag = "3")]
5621 pub e10: ::core::option::Option<::prost::alloc::string::String>,
5622 #[prost(string, optional, tag = "4")]
5624 pub e11: ::core::option::Option<::prost::alloc::string::String>,
5625 #[prost(string, optional, tag = "5")]
5627 pub e20: ::core::option::Option<::prost::alloc::string::String>,
5628 #[prost(string, optional, tag = "6")]
5630 pub e21: ::core::option::Option<::prost::alloc::string::String>,
5631}
5632#[non_exhaustive]
5639#[derive(Clone, PartialEq, ::prost::Message)]
5640pub struct PasskeyAuthenticator {
5641 #[prost(bytes = "bytes", optional, tag = "1")]
5646 pub authenticator_data: ::core::option::Option<::prost::bytes::Bytes>,
5647 #[prost(string, optional, tag = "2")]
5652 pub client_data_json: ::core::option::Option<::prost::alloc::string::String>,
5653 #[prost(message, optional, tag = "3")]
5655 pub signature: ::core::option::Option<SimpleSignature>,
5656}
5657#[non_exhaustive]
5659#[derive(Clone, PartialEq, ::prost::Message)]
5660pub struct ValidatorCommittee {
5661 #[prost(uint64, optional, tag = "1")]
5663 pub epoch: ::core::option::Option<u64>,
5664 #[prost(message, repeated, tag = "2")]
5666 pub members: ::prost::alloc::vec::Vec<ValidatorCommitteeMember>,
5667}
5668#[non_exhaustive]
5670#[derive(Clone, PartialEq, ::prost::Message)]
5671pub struct ValidatorCommitteeMember {
5672 #[prost(bytes = "bytes", optional, tag = "1")]
5674 pub public_key: ::core::option::Option<::prost::bytes::Bytes>,
5675 #[prost(uint64, optional, tag = "2")]
5677 pub weight: ::core::option::Option<u64>,
5678}
5679#[non_exhaustive]
5681#[derive(Clone, PartialEq, ::prost::Message)]
5682pub struct ValidatorAggregatedSignature {
5683 #[prost(uint64, optional, tag = "1")]
5688 pub epoch: ::core::option::Option<u64>,
5689 #[prost(bytes = "bytes", optional, tag = "2")]
5691 pub signature: ::core::option::Option<::prost::bytes::Bytes>,
5692 #[prost(uint32, repeated, tag = "3")]
5695 pub bitmap: ::prost::alloc::vec::Vec<u32>,
5696}
5697#[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 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 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 #[prost(message, optional, tag = "1")]
5754 pub message: ::core::option::Option<Bcs>,
5755 #[prost(message, optional, tag = "2")]
5757 pub signature: ::core::option::Option<UserSignature>,
5758 #[prost(string, optional, tag = "3")]
5764 pub address: ::core::option::Option<::prost::alloc::string::String>,
5765 #[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 #[prost(bool, optional, tag = "1")]
5775 pub is_valid: ::core::option::Option<bool>,
5776 #[prost(string, optional, tag = "2")]
5778 pub reason: ::core::option::Option<::prost::alloc::string::String>,
5779}
5780pub 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 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 #[must_use]
5847 pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
5848 self.inner = self.inner.send_compressed(encoding);
5849 self
5850 }
5851 #[must_use]
5853 pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
5854 self.inner = self.inner.accept_compressed(encoding);
5855 self
5856 }
5857 #[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 #[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 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}
5905pub 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 #[async_trait]
5917 pub trait SignatureVerificationService: std::marker::Send + std::marker::Sync + 'static {
5918 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 #[must_use]
5959 pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
5960 self.accept_compression_encodings.enable(encoding);
5961 self
5962 }
5963 #[must_use]
5965 pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
5966 self.send_compression_encodings.enable(encoding);
5967 self
5968 }
5969 #[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 #[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 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#[non_exhaustive]
6097#[derive(Clone, PartialEq, ::prost::Message)]
6098pub struct SubscribeCheckpointsRequest {
6099 #[prost(message, optional, tag = "1")]
6102 pub read_mask: ::core::option::Option<::prost_types::FieldMask>,
6103}
6104#[non_exhaustive]
6106#[derive(Clone, PartialEq, ::prost::Message)]
6107pub struct SubscribeCheckpointsResponse {
6108 #[prost(uint64, optional, tag = "1")]
6111 pub cursor: ::core::option::Option<u64>,
6112 #[prost(message, optional, tag = "2")]
6114 pub checkpoint: ::core::option::Option<Checkpoint>,
6115}
6116pub 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 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 #[must_use]
6181 pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
6182 self.inner = self.inner.send_compressed(encoding);
6183 self
6184 }
6185 #[must_use]
6187 pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
6188 self.inner = self.inner.accept_compressed(encoding);
6189 self
6190 }
6191 #[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 #[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 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}
6251pub 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 #[async_trait]
6263 pub trait SubscriptionService: std::marker::Send + std::marker::Sync + 'static {
6264 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 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 #[must_use]
6324 pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
6325 self.accept_compression_encodings.enable(encoding);
6326 self
6327 }
6328 #[must_use]
6330 pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
6331 self.send_compression_encodings.enable(encoding);
6332 self
6333 }
6334 #[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 #[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 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 #[prost(uint64, optional, tag = "1")]
6464 pub version: ::core::option::Option<u64>,
6465 #[prost(uint64, optional, tag = "2")]
6467 pub epoch: ::core::option::Option<u64>,
6468 #[prost(uint64, optional, tag = "3")]
6470 pub protocol_version: ::core::option::Option<u64>,
6471 #[prost(message, optional, tag = "4")]
6473 pub validators: ::core::option::Option<ValidatorSet>,
6474 #[prost(message, optional, tag = "5")]
6476 pub storage_fund: ::core::option::Option<StorageFund>,
6477 #[prost(message, optional, tag = "6")]
6479 pub parameters: ::core::option::Option<SystemParameters>,
6480 #[prost(uint64, optional, tag = "7")]
6482 pub reference_gas_price: ::core::option::Option<u64>,
6483 #[prost(message, repeated, tag = "8")]
6491 pub validator_report_records: ::prost::alloc::vec::Vec<ValidatorReportRecord>,
6492 #[prost(message, optional, tag = "9")]
6494 pub stake_subsidy: ::core::option::Option<StakeSubsidy>,
6495 #[prost(bool, optional, tag = "10")]
6502 pub safe_mode: ::core::option::Option<bool>,
6503 #[prost(uint64, optional, tag = "11")]
6505 pub safe_mode_storage_rewards: ::core::option::Option<u64>,
6506 #[prost(uint64, optional, tag = "12")]
6508 pub safe_mode_computation_rewards: ::core::option::Option<u64>,
6509 #[prost(uint64, optional, tag = "13")]
6511 pub safe_mode_storage_rebates: ::core::option::Option<u64>,
6512 #[prost(uint64, optional, tag = "14")]
6514 pub safe_mode_non_refundable_storage_fee: ::core::option::Option<u64>,
6515 #[prost(uint64, optional, tag = "15")]
6517 pub epoch_start_timestamp_ms: ::core::option::Option<u64>,
6518 #[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 #[prost(string, optional, tag = "1")]
6527 pub reported: ::core::option::Option<::prost::alloc::string::String>,
6528 #[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 #[prost(uint64, optional, tag = "1")]
6537 pub epoch_duration_ms: ::core::option::Option<u64>,
6538 #[prost(uint64, optional, tag = "2")]
6540 pub stake_subsidy_start_epoch: ::core::option::Option<u64>,
6541 #[prost(uint64, optional, tag = "3")]
6543 pub min_validator_count: ::core::option::Option<u64>,
6544 #[prost(uint64, optional, tag = "4")]
6547 pub max_validator_count: ::core::option::Option<u64>,
6548 #[prost(uint64, optional, tag = "5")]
6551 pub min_validator_joining_stake: ::core::option::Option<u64>,
6552 #[prost(uint64, optional, tag = "6")]
6557 pub validator_low_stake_threshold: ::core::option::Option<u64>,
6558 #[prost(uint64, optional, tag = "7")]
6562 pub validator_very_low_stake_threshold: ::core::option::Option<u64>,
6563 #[prost(uint64, optional, tag = "8")]
6566 pub validator_low_stake_grace_period: ::core::option::Option<u64>,
6567 #[prost(message, optional, tag = "9")]
6569 pub extra_fields: ::core::option::Option<MoveTable>,
6570}
6571#[non_exhaustive]
6573#[derive(Clone, PartialEq, ::prost::Message)]
6574pub struct MoveTable {
6575 #[prost(string, optional, tag = "1")]
6577 pub id: ::core::option::Option<::prost::alloc::string::String>,
6578 #[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 #[prost(uint64, optional, tag = "1")]
6587 pub balance: ::core::option::Option<u64>,
6588 #[prost(uint64, optional, tag = "2")]
6590 pub distribution_counter: ::core::option::Option<u64>,
6591 #[prost(uint64, optional, tag = "3")]
6594 pub current_distribution_amount: ::core::option::Option<u64>,
6595 #[prost(uint64, optional, tag = "4")]
6597 pub stake_subsidy_period_length: ::core::option::Option<u64>,
6598 #[prost(uint32, optional, tag = "5")]
6601 pub stake_subsidy_decrease_rate: ::core::option::Option<u32>,
6602 #[prost(message, optional, tag = "6")]
6604 pub extra_fields: ::core::option::Option<MoveTable>,
6605}
6606#[non_exhaustive]
6608#[derive(Clone, Copy, PartialEq, ::prost::Message)]
6609pub struct StorageFund {
6610 #[prost(uint64, optional, tag = "1")]
6616 pub total_object_storage_rebates: ::core::option::Option<u64>,
6617 #[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 #[prost(uint64, optional, tag = "1")]
6628 pub total_stake: ::core::option::Option<u64>,
6629 #[prost(message, repeated, tag = "2")]
6631 pub active_validators: ::prost::alloc::vec::Vec<Validator>,
6632 #[prost(message, optional, tag = "3")]
6637 pub pending_active_validators: ::core::option::Option<MoveTable>,
6638 #[prost(uint64, repeated, tag = "4")]
6641 pub pending_removals: ::prost::alloc::vec::Vec<u64>,
6642 #[prost(message, optional, tag = "5")]
6646 pub staking_pool_mappings: ::core::option::Option<MoveTable>,
6647 #[prost(message, optional, tag = "6")]
6653 pub inactive_validators: ::core::option::Option<MoveTable>,
6654 #[prost(message, optional, tag = "7")]
6662 pub validator_candidates: ::core::option::Option<MoveTable>,
6663 #[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 #[prost(message, optional, tag = "9")]
6671 pub extra_fields: ::core::option::Option<MoveTable>,
6672}
6673#[non_exhaustive]
6677#[derive(Clone, PartialEq, ::prost::Message)]
6678pub struct Validator {
6679 #[prost(string, optional, tag = "1")]
6681 pub name: ::core::option::Option<::prost::alloc::string::String>,
6682 #[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 #[prost(bytes = "bytes", optional, tag = "7")]
6695 pub protocol_public_key: ::core::option::Option<::prost::bytes::Bytes>,
6696 #[prost(bytes = "bytes", optional, tag = "8")]
6698 pub proof_of_possession: ::core::option::Option<::prost::bytes::Bytes>,
6699 #[prost(bytes = "bytes", optional, tag = "10")]
6702 pub network_public_key: ::core::option::Option<::prost::bytes::Bytes>,
6703 #[prost(bytes = "bytes", optional, tag = "12")]
6705 pub worker_public_key: ::core::option::Option<::prost::bytes::Bytes>,
6706 #[prost(string, optional, tag = "13")]
6708 pub network_address: ::core::option::Option<::prost::alloc::string::String>,
6709 #[prost(string, optional, tag = "14")]
6711 pub p2p_address: ::core::option::Option<::prost::alloc::string::String>,
6712 #[prost(string, optional, tag = "15")]
6714 pub primary_address: ::core::option::Option<::prost::alloc::string::String>,
6715 #[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 #[prost(message, optional, tag = "28")]
6742 pub metadata_extra_fields: ::core::option::Option<MoveTable>,
6743 #[prost(uint64, optional, tag = "29")]
6746 pub voting_power: ::core::option::Option<u64>,
6747 #[prost(string, optional, tag = "30")]
6749 pub operation_cap_id: ::core::option::Option<::prost::alloc::string::String>,
6750 #[prost(uint64, optional, tag = "31")]
6752 pub gas_price: ::core::option::Option<u64>,
6753 #[prost(message, optional, tag = "32")]
6755 pub staking_pool: ::core::option::Option<StakingPool>,
6756 #[prost(uint64, optional, tag = "33")]
6758 pub commission_rate: ::core::option::Option<u64>,
6759 #[prost(uint64, optional, tag = "34")]
6761 pub next_epoch_stake: ::core::option::Option<u64>,
6762 #[prost(uint64, optional, tag = "35")]
6764 pub next_epoch_gas_price: ::core::option::Option<u64>,
6765 #[prost(uint64, optional, tag = "36")]
6767 pub next_epoch_commission_rate: ::core::option::Option<u64>,
6768 #[prost(message, optional, tag = "37")]
6770 pub extra_fields: ::core::option::Option<MoveTable>,
6771}
6772#[non_exhaustive]
6774#[derive(Clone, PartialEq, ::prost::Message)]
6775pub struct StakingPool {
6776 #[prost(string, optional, tag = "1")]
6778 pub id: ::core::option::Option<::prost::alloc::string::String>,
6779 #[prost(uint64, optional, tag = "2")]
6782 pub activation_epoch: ::core::option::Option<u64>,
6783 #[prost(uint64, optional, tag = "3")]
6786 pub deactivation_epoch: ::core::option::Option<u64>,
6787 #[prost(uint64, optional, tag = "4")]
6790 pub sui_balance: ::core::option::Option<u64>,
6791 #[prost(uint64, optional, tag = "5")]
6793 pub rewards_pool: ::core::option::Option<u64>,
6794 #[prost(uint64, optional, tag = "6")]
6796 pub pool_token_balance: ::core::option::Option<u64>,
6797 #[prost(message, optional, tag = "7")]
6804 pub exchange_rates: ::core::option::Option<MoveTable>,
6805 #[prost(uint64, optional, tag = "8")]
6807 pub pending_stake: ::core::option::Option<u64>,
6808 #[prost(uint64, optional, tag = "9")]
6811 pub pending_total_sui_withdraw: ::core::option::Option<u64>,
6812 #[prost(uint64, optional, tag = "10")]
6814 pub pending_pool_token_withdraw: ::core::option::Option<u64>,
6815 #[prost(message, optional, tag = "11")]
6817 pub extra_fields: ::core::option::Option<MoveTable>,
6818}
6819#[non_exhaustive]
6821#[derive(Clone, PartialEq, ::prost::Message)]
6822pub struct Transaction {
6823 #[prost(message, optional, tag = "1")]
6825 pub bcs: ::core::option::Option<Bcs>,
6826 #[prost(string, optional, tag = "2")]
6828 pub digest: ::core::option::Option<::prost::alloc::string::String>,
6829 #[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#[non_exhaustive]
6843#[derive(Clone, PartialEq, ::prost::Message)]
6844pub struct GasPayment {
6845 #[prost(message, repeated, tag = "1")]
6847 pub objects: ::prost::alloc::vec::Vec<ObjectReference>,
6848 #[prost(string, optional, tag = "2")]
6850 pub owner: ::core::option::Option<::prost::alloc::string::String>,
6851 #[prost(uint64, optional, tag = "3")]
6855 pub price: ::core::option::Option<u64>,
6856 #[prost(uint64, optional, tag = "4")]
6858 pub budget: ::core::option::Option<u64>,
6859}
6860#[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}
6873pub 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 None = 1,
6892 Epoch = 2,
6895 }
6896 impl TransactionExpirationKind {
6897 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 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#[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}
6929pub mod transaction_kind {
6931 #[non_exhaustive]
6932 #[derive(Clone, PartialEq, ::prost::Oneof)]
6933 pub enum Kind {
6934 #[prost(message, tag = "2")]
6936 ProgrammableTransaction(super::ProgrammableTransaction),
6937 #[prost(message, tag = "3")]
6939 ProgrammableSystemTransaction(super::ProgrammableTransaction),
6940 #[prost(message, tag = "100")]
6945 ChangeEpoch(super::ChangeEpoch),
6946 #[prost(message, tag = "101")]
6951 Genesis(super::GenesisTransaction),
6952 #[prost(message, tag = "102")]
6954 ConsensusCommitPrologueV1(super::ConsensusCommitPrologue),
6955 #[prost(message, tag = "103")]
6957 AuthenticatorStateUpdate(super::AuthenticatorStateUpdate),
6958 #[prost(message, tag = "104")]
6961 EndOfEpoch(super::EndOfEpochTransaction),
6962 #[prost(message, tag = "105")]
6964 RandomnessStateUpdate(super::RandomnessStateUpdate),
6965 #[prost(message, tag = "106")]
6967 ConsensusCommitPrologueV2(super::ConsensusCommitPrologue),
6968 #[prost(message, tag = "107")]
6970 ConsensusCommitPrologueV3(super::ConsensusCommitPrologue),
6971 #[prost(message, tag = "108")]
6973 ConsensusCommitPrologueV4(super::ConsensusCommitPrologue),
6974 }
6975}
6976#[non_exhaustive]
6981#[derive(Clone, PartialEq, ::prost::Message)]
6982pub struct ProgrammableTransaction {
6983 #[prost(message, repeated, tag = "1")]
6985 pub inputs: ::prost::alloc::vec::Vec<Input>,
6986 #[prost(message, repeated, tag = "2")]
6989 pub commands: ::prost::alloc::vec::Vec<Command>,
6990}
6991#[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}
6998pub mod command {
7000 #[non_exhaustive]
7001 #[derive(Clone, PartialEq, ::prost::Oneof)]
7002 pub enum Command {
7003 #[prost(message, tag = "1")]
7005 MoveCall(super::MoveCall),
7006 #[prost(message, tag = "2")]
7011 TransferObjects(super::TransferObjects),
7012 #[prost(message, tag = "3")]
7015 SplitCoins(super::SplitCoins),
7016 #[prost(message, tag = "4")]
7019 MergeCoins(super::MergeCoins),
7020 #[prost(message, tag = "5")]
7023 Publish(super::Publish),
7024 #[prost(message, tag = "6")]
7028 MakeMoveVector(super::MakeMoveVector),
7029 #[prost(message, tag = "7")]
7037 Upgrade(super::Upgrade),
7038 }
7039}
7040#[non_exhaustive]
7045#[derive(Clone, PartialEq, ::prost::Message)]
7046pub struct MoveCall {
7047 #[prost(string, optional, tag = "1")]
7049 pub package: ::core::option::Option<::prost::alloc::string::String>,
7050 #[prost(string, optional, tag = "2")]
7052 pub module: ::core::option::Option<::prost::alloc::string::String>,
7053 #[prost(string, optional, tag = "3")]
7055 pub function: ::core::option::Option<::prost::alloc::string::String>,
7056 #[prost(string, repeated, tag = "4")]
7058 pub type_arguments: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
7059 #[prost(message, repeated, tag = "5")]
7061 pub arguments: ::prost::alloc::vec::Vec<Argument>,
7062}
7063#[non_exhaustive]
7065#[derive(Clone, PartialEq, ::prost::Message)]
7066pub struct TransferObjects {
7067 #[prost(message, repeated, tag = "1")]
7069 pub objects: ::prost::alloc::vec::Vec<Argument>,
7070 #[prost(message, optional, tag = "2")]
7072 pub address: ::core::option::Option<Argument>,
7073}
7074#[non_exhaustive]
7076#[derive(Clone, PartialEq, ::prost::Message)]
7077pub struct SplitCoins {
7078 #[prost(message, optional, tag = "1")]
7080 pub coin: ::core::option::Option<Argument>,
7081 #[prost(message, repeated, tag = "2")]
7083 pub amounts: ::prost::alloc::vec::Vec<Argument>,
7084}
7085#[non_exhaustive]
7087#[derive(Clone, PartialEq, ::prost::Message)]
7088pub struct MergeCoins {
7089 #[prost(message, optional, tag = "1")]
7091 pub coin: ::core::option::Option<Argument>,
7092 #[prost(message, repeated, tag = "2")]
7096 pub coins_to_merge: ::prost::alloc::vec::Vec<Argument>,
7097}
7098#[non_exhaustive]
7100#[derive(Clone, PartialEq, ::prost::Message)]
7101pub struct Publish {
7102 #[prost(bytes = "bytes", repeated, tag = "1")]
7104 pub modules: ::prost::alloc::vec::Vec<::prost::bytes::Bytes>,
7105 #[prost(string, repeated, tag = "2")]
7107 pub dependencies: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
7108}
7109#[non_exhaustive]
7111#[derive(Clone, PartialEq, ::prost::Message)]
7112pub struct MakeMoveVector {
7113 #[prost(string, optional, tag = "1")]
7118 pub element_type: ::core::option::Option<::prost::alloc::string::String>,
7119 #[prost(message, repeated, tag = "2")]
7121 pub elements: ::prost::alloc::vec::Vec<Argument>,
7122}
7123#[non_exhaustive]
7125#[derive(Clone, PartialEq, ::prost::Message)]
7126pub struct Upgrade {
7127 #[prost(bytes = "bytes", repeated, tag = "1")]
7129 pub modules: ::prost::alloc::vec::Vec<::prost::bytes::Bytes>,
7130 #[prost(string, repeated, tag = "2")]
7132 pub dependencies: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
7133 #[prost(string, optional, tag = "3")]
7135 pub package: ::core::option::Option<::prost::alloc::string::String>,
7136 #[prost(message, optional, tag = "4")]
7138 pub ticket: ::core::option::Option<Argument>,
7139}
7140#[non_exhaustive]
7142#[derive(Clone, PartialEq, ::prost::Message)]
7143pub struct RandomnessStateUpdate {
7144 #[prost(uint64, optional, tag = "1")]
7146 pub epoch: ::core::option::Option<u64>,
7147 #[prost(uint64, optional, tag = "2")]
7149 pub randomness_round: ::core::option::Option<u64>,
7150 #[prost(bytes = "bytes", optional, tag = "3")]
7152 pub random_bytes: ::core::option::Option<::prost::bytes::Bytes>,
7153 #[prost(uint64, optional, tag = "4")]
7155 pub randomness_object_initial_shared_version: ::core::option::Option<u64>,
7156}
7157#[non_exhaustive]
7159#[derive(Clone, PartialEq, ::prost::Message)]
7160pub struct ChangeEpoch {
7161 #[prost(uint64, optional, tag = "1")]
7163 pub epoch: ::core::option::Option<u64>,
7164 #[prost(uint64, optional, tag = "2")]
7166 pub protocol_version: ::core::option::Option<u64>,
7167 #[prost(uint64, optional, tag = "3")]
7169 pub storage_charge: ::core::option::Option<u64>,
7170 #[prost(uint64, optional, tag = "4")]
7172 pub computation_charge: ::core::option::Option<u64>,
7173 #[prost(uint64, optional, tag = "5")]
7175 pub storage_rebate: ::core::option::Option<u64>,
7176 #[prost(uint64, optional, tag = "6")]
7178 pub non_refundable_storage_fee: ::core::option::Option<u64>,
7179 #[prost(message, optional, tag = "7")]
7181 pub epoch_start_timestamp: ::core::option::Option<::prost_types::Timestamp>,
7182 #[prost(message, repeated, tag = "8")]
7188 pub system_packages: ::prost::alloc::vec::Vec<SystemPackage>,
7189}
7190#[non_exhaustive]
7192#[derive(Clone, PartialEq, ::prost::Message)]
7193pub struct SystemPackage {
7194 #[prost(uint64, optional, tag = "1")]
7196 pub version: ::core::option::Option<u64>,
7197 #[prost(bytes = "bytes", repeated, tag = "2")]
7199 pub modules: ::prost::alloc::vec::Vec<::prost::bytes::Bytes>,
7200 #[prost(string, repeated, tag = "3")]
7202 pub dependencies: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
7203}
7204#[non_exhaustive]
7206#[derive(Clone, PartialEq, ::prost::Message)]
7207pub struct GenesisTransaction {
7208 #[prost(message, repeated, tag = "1")]
7210 pub objects: ::prost::alloc::vec::Vec<Object>,
7211}
7212#[non_exhaustive]
7216#[derive(Clone, PartialEq, ::prost::Message)]
7217pub struct ConsensusCommitPrologue {
7218 #[prost(uint64, optional, tag = "1")]
7222 pub epoch: ::core::option::Option<u64>,
7223 #[prost(uint64, optional, tag = "2")]
7227 pub round: ::core::option::Option<u64>,
7228 #[prost(message, optional, tag = "3")]
7232 pub commit_timestamp: ::core::option::Option<::prost_types::Timestamp>,
7233 #[prost(string, optional, tag = "4")]
7237 pub consensus_commit_digest: ::core::option::Option<::prost::alloc::string::String>,
7238 #[prost(uint64, optional, tag = "5")]
7243 pub sub_dag_index: ::core::option::Option<u64>,
7244 #[prost(message, optional, tag = "6")]
7248 pub consensus_determined_version_assignments: ::core::option::Option<
7249 ConsensusDeterminedVersionAssignments,
7250 >,
7251 #[prost(string, optional, tag = "7")]
7256 pub additional_state_digest: ::core::option::Option<::prost::alloc::string::String>,
7257}
7258#[non_exhaustive]
7260#[derive(Clone, PartialEq, ::prost::Message)]
7261pub struct VersionAssignment {
7262 #[prost(string, optional, tag = "1")]
7264 pub object_id: ::core::option::Option<::prost::alloc::string::String>,
7265 #[prost(uint64, optional, tag = "2")]
7267 pub start_version: ::core::option::Option<u64>,
7268 #[prost(uint64, optional, tag = "3")]
7270 pub version: ::core::option::Option<u64>,
7271}
7272#[non_exhaustive]
7274#[derive(Clone, PartialEq, ::prost::Message)]
7275pub struct CanceledTransaction {
7276 #[prost(string, optional, tag = "1")]
7278 pub digest: ::core::option::Option<::prost::alloc::string::String>,
7279 #[prost(message, repeated, tag = "2")]
7281 pub version_assignments: ::prost::alloc::vec::Vec<VersionAssignment>,
7282}
7283#[non_exhaustive]
7285#[derive(Clone, PartialEq, ::prost::Message)]
7286pub struct ConsensusDeterminedVersionAssignments {
7287 #[prost(int32, optional, tag = "1")]
7289 pub version: ::core::option::Option<i32>,
7290 #[prost(message, repeated, tag = "3")]
7292 pub canceled_transactions: ::prost::alloc::vec::Vec<CanceledTransaction>,
7293}
7294#[non_exhaustive]
7296#[derive(Clone, PartialEq, ::prost::Message)]
7297pub struct AuthenticatorStateUpdate {
7298 #[prost(uint64, optional, tag = "1")]
7300 pub epoch: ::core::option::Option<u64>,
7301 #[prost(uint64, optional, tag = "2")]
7303 pub round: ::core::option::Option<u64>,
7304 #[prost(message, repeated, tag = "3")]
7306 pub new_active_jwks: ::prost::alloc::vec::Vec<ActiveJwk>,
7307 #[prost(uint64, optional, tag = "4")]
7309 pub authenticator_object_initial_shared_version: ::core::option::Option<u64>,
7310}
7311#[non_exhaustive]
7313#[derive(Clone, PartialEq, ::prost::Message)]
7314pub struct ActiveJwk {
7315 #[prost(message, optional, tag = "1")]
7317 pub id: ::core::option::Option<JwkId>,
7318 #[prost(message, optional, tag = "2")]
7320 pub jwk: ::core::option::Option<Jwk>,
7321 #[prost(uint64, optional, tag = "3")]
7323 pub epoch: ::core::option::Option<u64>,
7324}
7325#[non_exhaustive]
7327#[derive(Clone, PartialEq, ::prost::Message)]
7328pub struct JwkId {
7329 #[prost(string, optional, tag = "1")]
7331 pub iss: ::core::option::Option<::prost::alloc::string::String>,
7332 #[prost(string, optional, tag = "2")]
7334 pub kid: ::core::option::Option<::prost::alloc::string::String>,
7335}
7336#[non_exhaustive]
7342#[derive(Clone, PartialEq, ::prost::Message)]
7343pub struct Jwk {
7344 #[prost(string, optional, tag = "1")]
7346 pub kty: ::core::option::Option<::prost::alloc::string::String>,
7347 #[prost(string, optional, tag = "2")]
7349 pub e: ::core::option::Option<::prost::alloc::string::String>,
7350 #[prost(string, optional, tag = "3")]
7352 pub n: ::core::option::Option<::prost::alloc::string::String>,
7353 #[prost(string, optional, tag = "4")]
7355 pub alg: ::core::option::Option<::prost::alloc::string::String>,
7356}
7357#[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#[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}
7375pub mod end_of_epoch_transaction_kind {
7377 #[non_exhaustive]
7378 #[derive(Clone, PartialEq, ::prost::Oneof)]
7379 pub enum Kind {
7380 #[prost(message, tag = "2")]
7382 ChangeEpoch(super::ChangeEpoch),
7383 #[prost(message, tag = "3")]
7385 AuthenticatorStateExpire(super::AuthenticatorStateExpire),
7386 #[prost(message, tag = "4")]
7388 ExecutionTimeObservations(super::ExecutionTimeObservations),
7389 #[prost(message, tag = "200")]
7391 AuthenticatorStateCreate(()),
7392 #[prost(message, tag = "201")]
7394 RandomnessStateCreate(()),
7395 #[prost(message, tag = "202")]
7397 DenyListStateCreate(()),
7398 #[prost(string, tag = "203")]
7400 BridgeStateCreate(::prost::alloc::string::String),
7401 #[prost(uint64, tag = "204")]
7403 BridgeCommitteeInit(u64),
7404 #[prost(message, tag = "205")]
7406 AccumulatorRootCreate(()),
7407 #[prost(message, tag = "206")]
7409 CoinRegistryCreate(()),
7410 }
7411}
7412#[non_exhaustive]
7414#[derive(Clone, Copy, PartialEq, ::prost::Message)]
7415pub struct AuthenticatorStateExpire {
7416 #[prost(uint64, optional, tag = "1")]
7418 pub min_epoch: ::core::option::Option<u64>,
7419 #[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 #[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}
7448pub 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 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 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 #[prost(bytes = "bytes", optional, tag = "1")]
7511 pub validator: ::core::option::Option<::prost::bytes::Bytes>,
7512 #[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 #[prost(message, optional, tag = "1")]
7521 pub transaction: ::core::option::Option<Transaction>,
7522 #[prost(message, repeated, tag = "2")]
7525 pub signatures: ::prost::alloc::vec::Vec<UserSignature>,
7526 #[prost(message, optional, tag = "3")]
7529 pub read_mask: ::core::option::Option<::prost_types::FieldMask>,
7530}
7531#[non_exhaustive]
7533#[derive(Clone, PartialEq, ::prost::Message)]
7534pub struct ExecuteTransactionResponse {
7535 #[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#[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}
7548pub mod transaction_finality {
7550 #[non_exhaustive]
7551 #[derive(Clone, PartialEq, ::prost::Oneof)]
7552 pub enum Finality {
7553 #[prost(message, tag = "1")]
7556 Certified(super::ValidatorAggregatedSignature),
7557 #[prost(uint64, tag = "2")]
7559 Checkpointed(u64),
7560 #[prost(message, tag = "3")]
7563 QuorumExecuted(()),
7564 }
7565}
7566pub 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 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 #[must_use]
7633 pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
7634 self.inner = self.inner.send_compressed(encoding);
7635 self
7636 }
7637 #[must_use]
7639 pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
7640 self.inner = self.inner.accept_compressed(encoding);
7641 self
7642 }
7643 #[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 #[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}
7690pub 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 #[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 #[must_use]
7743 pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
7744 self.accept_compression_encodings.enable(encoding);
7745 self
7746 }
7747 #[must_use]
7749 pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
7750 self.send_compression_encodings.enable(encoding);
7751 self
7752 }
7753 #[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 #[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 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}