iota_grpc_types/proto/generated/
iota.grpc.v1.command.rs

1// Copyright (c) Mysten Labs, Inc.
2// Modifications Copyright (c) 2025 IOTA Stiftung
3// SPDX-License-Identifier: Apache-2.0
4
5// This file is @generated by prost-build.
6/// An argument to a programmable transaction command.
7#[non_exhaustive]
8#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
9pub struct Argument {
10    #[prost(oneof = "argument::Kind", tags = "1, 2, 3, 4")]
11    pub kind: ::core::option::Option<argument::Kind>,
12}
13/// Nested message and enum types in `Argument`.
14pub mod argument {
15    /// Unknown Argument kind.
16    #[non_exhaustive]
17    #[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
18    pub struct Unknown {}
19    /// The gas coin.
20    #[non_exhaustive]
21    #[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
22    pub struct GasCoin {}
23    /// One of the input objects or primitive values
24    /// (from `ProgrammableTransaction` inputs).
25    #[non_exhaustive]
26    #[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
27    pub struct Input {
28        /// Index of an input when `kind` is `Input`.
29        #[prost(uint32, optional, tag = "1")]
30        pub index: ::core::option::Option<u32>,
31    }
32    /// The result of another command (from `ProgrammableTransaction` commands).
33    #[non_exhaustive]
34    #[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
35    pub struct Result {
36        /// Index of a result when `kind` is `Result`.
37        #[prost(uint32, optional, tag = "1")]
38        pub index: ::core::option::Option<u32>,
39        /// Used to access a nested result when `kind` is `Result`.
40        #[prost(uint32, optional, tag = "2")]
41        pub nested_result_index: ::core::option::Option<u32>,
42    }
43    #[non_exhaustive]
44    #[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Oneof)]
45    pub enum Kind {
46        #[prost(message, tag = "1")]
47        Unknown(Unknown),
48        #[prost(message, tag = "2")]
49        GasCoin(GasCoin),
50        #[prost(message, tag = "3")]
51        Input(Input),
52        #[prost(message, tag = "4")]
53        Result(Result),
54    }
55}
56#[non_exhaustive]
57#[derive(Clone, PartialEq, ::prost::Message)]
58pub struct CommandOutput {
59    #[prost(message, optional, tag = "1")]
60    pub argument: ::core::option::Option<Argument>,
61    #[prost(message, optional, tag = "2")]
62    pub type_tag: ::core::option::Option<super::types::TypeTag>,
63    #[prost(message, optional, tag = "3")]
64    pub bcs: ::core::option::Option<super::bcs::BcsData>,
65    #[prost(message, optional, tag = "4")]
66    pub json: ::core::option::Option<::prost_types::Value>,
67}
68#[non_exhaustive]
69#[derive(Clone, PartialEq, ::prost::Message)]
70pub struct CommandOutputs {
71    #[prost(message, repeated, tag = "1")]
72    pub outputs: ::prost::alloc::vec::Vec<CommandOutput>,
73}
74/// An intermediate result/output from the execution of a single command
75#[non_exhaustive]
76#[derive(Clone, PartialEq, ::prost::Message)]
77pub struct CommandResult {
78    #[prost(message, optional, tag = "1")]
79    pub mutated_by_ref: ::core::option::Option<CommandOutputs>,
80    #[prost(message, optional, tag = "2")]
81    pub return_values: ::core::option::Option<CommandOutputs>,
82}
83#[non_exhaustive]
84#[derive(Clone, PartialEq, ::prost::Message)]
85pub struct CommandResults {
86    #[prost(message, repeated, tag = "1")]
87    pub results: ::prost::alloc::vec::Vec<CommandResult>,
88}