near_openapi_types/
lib.rs

1//! This crate provides types for the Near OpenAPI specification.
2//!
3//! Used in [near-openapi-client](https://docs.rs/near-openapi-client/latest/near_openapi_client/)
4pub use near_account_id::AccountId;
5pub use near_gas::NearGas;
6pub use near_token::NearToken;
7#[allow(unused_imports)]
8use progenitor_client::{encode_path, ClientHooks, OperationInfo, RequestBuilderExt};
9#[allow(unused_imports)]
10pub use progenitor_client::{ByteStream, ClientInfo, Error, ResponseValue};
11
12#[doc = r" Error types."]
13pub mod error {
14    #[doc = r" Error from a `TryFrom` or `FromStr` implementation."]
15    pub struct ConversionError(::std::borrow::Cow<'static, str>);
16    impl ::std::error::Error for ConversionError {}
17    impl ::std::fmt::Display for ConversionError {
18        fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> Result<(), ::std::fmt::Error> {
19            ::std::fmt::Display::fmt(&self.0, f)
20        }
21    }
22    impl ::std::fmt::Debug for ConversionError {
23        fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> Result<(), ::std::fmt::Error> {
24            ::std::fmt::Debug::fmt(&self.0, f)
25        }
26    }
27    impl From<&'static str> for ConversionError {
28        fn from(value: &'static str) -> Self {
29            Self(value.into())
30        }
31    }
32    impl From<String> for ConversionError {
33        fn from(value: String) -> Self {
34            Self(value.into())
35        }
36    }
37}
38#[doc = "Access key provides limited access to an account. Each access key belongs to some account and\nis identified by a unique (within the account) public key. One account may have large number of\naccess keys. Access keys allow to act on behalf of the account by restricting transactions\nthat can be issued.\n`account_id,public_key` is a key in the state"]
39#[doc = r""]
40#[doc = r" <details><summary>JSON schema</summary>"]
41#[doc = r""]
42#[doc = r" ```json"]
43#[doc = "{"]
44#[doc = "  \"description\": \"Access key provides limited access to an account. Each access key belongs to some account and\\nis identified by a unique (within the account) public key. One account may have large number of\\naccess keys. Access keys allow to act on behalf of the account by restricting transactions\\nthat can be issued.\\n`account_id,public_key` is a key in the state\","]
45#[doc = "  \"type\": \"object\","]
46#[doc = "  \"required\": ["]
47#[doc = "    \"nonce\","]
48#[doc = "    \"permission\""]
49#[doc = "  ],"]
50#[doc = "  \"properties\": {"]
51#[doc = "    \"nonce\": {"]
52#[doc = "      \"description\": \"Nonce for this access key, used for tx nonce generation. When access key is created, nonce\\nis set to `(block_height - 1) * 1e6` to avoid tx hash collision on access key re-creation.\\nSee <https://github.com/near/nearcore/issues/3779> for more details.\","]
53#[doc = "      \"type\": \"integer\","]
54#[doc = "      \"format\": \"uint64\","]
55#[doc = "      \"minimum\": 0.0"]
56#[doc = "    },"]
57#[doc = "    \"permission\": {"]
58#[doc = "      \"description\": \"Defines permissions for this access key.\","]
59#[doc = "      \"allOf\": ["]
60#[doc = "        {"]
61#[doc = "          \"$ref\": \"#/components/schemas/AccessKeyPermission\""]
62#[doc = "        }"]
63#[doc = "      ]"]
64#[doc = "    }"]
65#[doc = "  }"]
66#[doc = "}"]
67#[doc = r" ```"]
68#[doc = r" </details>"]
69#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
70pub struct AccessKey {
71    #[doc = "Nonce for this access key, used for tx nonce generation. When access key is created, nonce\nis set to `(block_height - 1) * 1e6` to avoid tx hash collision on access key re-creation.\nSee <https://github.com/near/nearcore/issues/3779> for more details."]
72    pub nonce: u64,
73    #[doc = "Defines permissions for this access key."]
74    pub permission: AccessKeyPermission,
75}
76impl ::std::convert::From<&AccessKey> for AccessKey {
77    fn from(value: &AccessKey) -> Self {
78        value.clone()
79    }
80}
81#[doc = "Describes the cost of creating an access key."]
82#[doc = r""]
83#[doc = r" <details><summary>JSON schema</summary>"]
84#[doc = r""]
85#[doc = r" ```json"]
86#[doc = "{"]
87#[doc = "  \"description\": \"Describes the cost of creating an access key.\","]
88#[doc = "  \"type\": \"object\","]
89#[doc = "  \"required\": ["]
90#[doc = "    \"full_access_cost\","]
91#[doc = "    \"function_call_cost\","]
92#[doc = "    \"function_call_cost_per_byte\""]
93#[doc = "  ],"]
94#[doc = "  \"properties\": {"]
95#[doc = "    \"full_access_cost\": {"]
96#[doc = "      \"description\": \"Base cost of creating a full access access-key.\","]
97#[doc = "      \"allOf\": ["]
98#[doc = "        {"]
99#[doc = "          \"$ref\": \"#/components/schemas/Fee\""]
100#[doc = "        }"]
101#[doc = "      ]"]
102#[doc = "    },"]
103#[doc = "    \"function_call_cost\": {"]
104#[doc = "      \"description\": \"Base cost of creating an access-key restricted to specific functions.\","]
105#[doc = "      \"allOf\": ["]
106#[doc = "        {"]
107#[doc = "          \"$ref\": \"#/components/schemas/Fee\""]
108#[doc = "        }"]
109#[doc = "      ]"]
110#[doc = "    },"]
111#[doc = "    \"function_call_cost_per_byte\": {"]
112#[doc = "      \"description\": \"Cost per byte of method_names of creating a restricted access-key.\","]
113#[doc = "      \"allOf\": ["]
114#[doc = "        {"]
115#[doc = "          \"$ref\": \"#/components/schemas/Fee\""]
116#[doc = "        }"]
117#[doc = "      ]"]
118#[doc = "    }"]
119#[doc = "  }"]
120#[doc = "}"]
121#[doc = r" ```"]
122#[doc = r" </details>"]
123#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
124pub struct AccessKeyCreationConfigView {
125    #[doc = "Base cost of creating a full access access-key."]
126    pub full_access_cost: Fee,
127    #[doc = "Base cost of creating an access-key restricted to specific functions."]
128    pub function_call_cost: Fee,
129    #[doc = "Cost per byte of method_names of creating a restricted access-key."]
130    pub function_call_cost_per_byte: Fee,
131}
132impl ::std::convert::From<&AccessKeyCreationConfigView> for AccessKeyCreationConfigView {
133    fn from(value: &AccessKeyCreationConfigView) -> Self {
134        value.clone()
135    }
136}
137#[doc = "Describes information about an access key including the public key."]
138#[doc = r""]
139#[doc = r" <details><summary>JSON schema</summary>"]
140#[doc = r""]
141#[doc = r" ```json"]
142#[doc = "{"]
143#[doc = "  \"description\": \"Describes information about an access key including the public key.\","]
144#[doc = "  \"type\": \"object\","]
145#[doc = "  \"required\": ["]
146#[doc = "    \"access_key\","]
147#[doc = "    \"public_key\""]
148#[doc = "  ],"]
149#[doc = "  \"properties\": {"]
150#[doc = "    \"access_key\": {"]
151#[doc = "      \"$ref\": \"#/components/schemas/AccessKeyView\""]
152#[doc = "    },"]
153#[doc = "    \"public_key\": {"]
154#[doc = "      \"$ref\": \"#/components/schemas/PublicKey\""]
155#[doc = "    }"]
156#[doc = "  }"]
157#[doc = "}"]
158#[doc = r" ```"]
159#[doc = r" </details>"]
160#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
161pub struct AccessKeyInfoView {
162    pub access_key: AccessKeyView,
163    pub public_key: PublicKey,
164}
165impl ::std::convert::From<&AccessKeyInfoView> for AccessKeyInfoView {
166    fn from(value: &AccessKeyInfoView) -> Self {
167        value.clone()
168    }
169}
170#[doc = "Lists access keys"]
171#[doc = r""]
172#[doc = r" <details><summary>JSON schema</summary>"]
173#[doc = r""]
174#[doc = r" ```json"]
175#[doc = "{"]
176#[doc = "  \"description\": \"Lists access keys\","]
177#[doc = "  \"type\": \"object\","]
178#[doc = "  \"required\": ["]
179#[doc = "    \"keys\""]
180#[doc = "  ],"]
181#[doc = "  \"properties\": {"]
182#[doc = "    \"keys\": {"]
183#[doc = "      \"type\": \"array\","]
184#[doc = "      \"items\": {"]
185#[doc = "        \"$ref\": \"#/components/schemas/AccessKeyInfoView\""]
186#[doc = "      }"]
187#[doc = "    }"]
188#[doc = "  }"]
189#[doc = "}"]
190#[doc = r" ```"]
191#[doc = r" </details>"]
192#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
193pub struct AccessKeyList {
194    pub keys: ::std::vec::Vec<AccessKeyInfoView>,
195}
196impl ::std::convert::From<&AccessKeyList> for AccessKeyList {
197    fn from(value: &AccessKeyList) -> Self {
198        value.clone()
199    }
200}
201#[doc = "Defines permissions for AccessKey"]
202#[doc = r""]
203#[doc = r" <details><summary>JSON schema</summary>"]
204#[doc = r""]
205#[doc = r" ```json"]
206#[doc = "{"]
207#[doc = "  \"description\": \"Defines permissions for AccessKey\","]
208#[doc = "  \"oneOf\": ["]
209#[doc = "    {"]
210#[doc = "      \"type\": \"object\","]
211#[doc = "      \"required\": ["]
212#[doc = "        \"FunctionCall\""]
213#[doc = "      ],"]
214#[doc = "      \"properties\": {"]
215#[doc = "        \"FunctionCall\": {"]
216#[doc = "          \"$ref\": \"#/components/schemas/FunctionCallPermission\""]
217#[doc = "        }"]
218#[doc = "      },"]
219#[doc = "      \"additionalProperties\": false"]
220#[doc = "    },"]
221#[doc = "    {"]
222#[doc = "      \"description\": \"Grants full access to the account.\\nNOTE: It's used to replace account-level public keys.\","]
223#[doc = "      \"type\": \"string\","]
224#[doc = "      \"enum\": ["]
225#[doc = "        \"FullAccess\""]
226#[doc = "      ]"]
227#[doc = "    }"]
228#[doc = "  ]"]
229#[doc = "}"]
230#[doc = r" ```"]
231#[doc = r" </details>"]
232#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
233pub enum AccessKeyPermission {
234    FunctionCall(FunctionCallPermission),
235    #[doc = "Grants full access to the account.\nNOTE: It's used to replace account-level public keys."]
236    FullAccess,
237}
238impl ::std::convert::From<&Self> for AccessKeyPermission {
239    fn from(value: &AccessKeyPermission) -> Self {
240        value.clone()
241    }
242}
243impl ::std::convert::From<FunctionCallPermission> for AccessKeyPermission {
244    fn from(value: FunctionCallPermission) -> Self {
245        Self::FunctionCall(value)
246    }
247}
248#[doc = "Describes the permission scope for an access key. Whether it is a function call or a full access key."]
249#[doc = r""]
250#[doc = r" <details><summary>JSON schema</summary>"]
251#[doc = r""]
252#[doc = r" ```json"]
253#[doc = "{"]
254#[doc = "  \"description\": \"Describes the permission scope for an access key. Whether it is a function call or a full access key.\","]
255#[doc = "  \"oneOf\": ["]
256#[doc = "    {"]
257#[doc = "      \"type\": \"string\","]
258#[doc = "      \"enum\": ["]
259#[doc = "        \"FullAccess\""]
260#[doc = "      ]"]
261#[doc = "    },"]
262#[doc = "    {"]
263#[doc = "      \"type\": \"object\","]
264#[doc = "      \"required\": ["]
265#[doc = "        \"FunctionCall\""]
266#[doc = "      ],"]
267#[doc = "      \"properties\": {"]
268#[doc = "        \"FunctionCall\": {"]
269#[doc = "          \"type\": \"object\","]
270#[doc = "          \"required\": ["]
271#[doc = "            \"method_names\","]
272#[doc = "            \"receiver_id\""]
273#[doc = "          ],"]
274#[doc = "          \"properties\": {"]
275#[doc = "            \"allowance\": {"]
276#[doc = "              \"anyOf\": ["]
277#[doc = "                {"]
278#[doc = "                  \"$ref\": \"#/components/schemas/NearToken\""]
279#[doc = "                },"]
280#[doc = "                {"]
281#[doc = "                  \"type\": \"null\""]
282#[doc = "                }"]
283#[doc = "              ]"]
284#[doc = "            },"]
285#[doc = "            \"method_names\": {"]
286#[doc = "              \"type\": \"array\","]
287#[doc = "              \"items\": {"]
288#[doc = "                \"type\": \"string\""]
289#[doc = "              }"]
290#[doc = "            },"]
291#[doc = "            \"receiver_id\": {"]
292#[doc = "              \"type\": \"string\""]
293#[doc = "            }"]
294#[doc = "          }"]
295#[doc = "        }"]
296#[doc = "      },"]
297#[doc = "      \"additionalProperties\": false"]
298#[doc = "    }"]
299#[doc = "  ]"]
300#[doc = "}"]
301#[doc = r" ```"]
302#[doc = r" </details>"]
303#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
304pub enum AccessKeyPermissionView {
305    FullAccess,
306    FunctionCall {
307        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
308        allowance: ::std::option::Option<NearToken>,
309        method_names: ::std::vec::Vec<::std::string::String>,
310        receiver_id: ::std::string::String,
311    },
312}
313impl ::std::convert::From<&Self> for AccessKeyPermissionView {
314    fn from(value: &AccessKeyPermissionView) -> Self {
315        value.clone()
316    }
317}
318#[doc = "Describes access key permission scope and nonce."]
319#[doc = r""]
320#[doc = r" <details><summary>JSON schema</summary>"]
321#[doc = r""]
322#[doc = r" ```json"]
323#[doc = "{"]
324#[doc = "  \"description\": \"Describes access key permission scope and nonce.\","]
325#[doc = "  \"type\": \"object\","]
326#[doc = "  \"required\": ["]
327#[doc = "    \"nonce\","]
328#[doc = "    \"permission\""]
329#[doc = "  ],"]
330#[doc = "  \"properties\": {"]
331#[doc = "    \"nonce\": {"]
332#[doc = "      \"type\": \"integer\","]
333#[doc = "      \"format\": \"uint64\","]
334#[doc = "      \"minimum\": 0.0"]
335#[doc = "    },"]
336#[doc = "    \"permission\": {"]
337#[doc = "      \"$ref\": \"#/components/schemas/AccessKeyPermissionView\""]
338#[doc = "    }"]
339#[doc = "  }"]
340#[doc = "}"]
341#[doc = r" ```"]
342#[doc = r" </details>"]
343#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
344pub struct AccessKeyView {
345    pub nonce: u64,
346    pub permission: AccessKeyPermissionView,
347}
348impl ::std::convert::From<&AccessKeyView> for AccessKeyView {
349    fn from(value: &AccessKeyView) -> Self {
350        value.clone()
351    }
352}
353#[doc = "`AccountChangesByBlockIdChangesType`"]
354#[doc = r""]
355#[doc = r" <details><summary>JSON schema</summary>"]
356#[doc = r""]
357#[doc = r" ```json"]
358#[doc = "{"]
359#[doc = "  \"type\": \"string\","]
360#[doc = "  \"enum\": ["]
361#[doc = "    \"account_changes\""]
362#[doc = "  ]"]
363#[doc = "}"]
364#[doc = r" ```"]
365#[doc = r" </details>"]
366#[derive(
367    :: serde :: Deserialize,
368    :: serde :: Serialize,
369    Clone,
370    Copy,
371    Debug,
372    Eq,
373    Hash,
374    Ord,
375    PartialEq,
376    PartialOrd,
377)]
378pub enum AccountChangesByBlockIdChangesType {
379    #[serde(rename = "account_changes")]
380    AccountChanges,
381}
382impl ::std::convert::From<&Self> for AccountChangesByBlockIdChangesType {
383    fn from(value: &AccountChangesByBlockIdChangesType) -> Self {
384        value.clone()
385    }
386}
387impl ::std::fmt::Display for AccountChangesByBlockIdChangesType {
388    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
389        match *self {
390            Self::AccountChanges => f.write_str("account_changes"),
391        }
392    }
393}
394impl ::std::str::FromStr for AccountChangesByBlockIdChangesType {
395    type Err = self::error::ConversionError;
396    fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
397        match value {
398            "account_changes" => Ok(Self::AccountChanges),
399            _ => Err("invalid value".into()),
400        }
401    }
402}
403impl ::std::convert::TryFrom<&str> for AccountChangesByBlockIdChangesType {
404    type Error = self::error::ConversionError;
405    fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
406        value.parse()
407    }
408}
409impl ::std::convert::TryFrom<&::std::string::String> for AccountChangesByBlockIdChangesType {
410    type Error = self::error::ConversionError;
411    fn try_from(
412        value: &::std::string::String,
413    ) -> ::std::result::Result<Self, self::error::ConversionError> {
414        value.parse()
415    }
416}
417impl ::std::convert::TryFrom<::std::string::String> for AccountChangesByBlockIdChangesType {
418    type Error = self::error::ConversionError;
419    fn try_from(
420        value: ::std::string::String,
421    ) -> ::std::result::Result<Self, self::error::ConversionError> {
422        value.parse()
423    }
424}
425#[doc = "`AccountChangesByFinalityChangesType`"]
426#[doc = r""]
427#[doc = r" <details><summary>JSON schema</summary>"]
428#[doc = r""]
429#[doc = r" ```json"]
430#[doc = "{"]
431#[doc = "  \"type\": \"string\","]
432#[doc = "  \"enum\": ["]
433#[doc = "    \"account_changes\""]
434#[doc = "  ]"]
435#[doc = "}"]
436#[doc = r" ```"]
437#[doc = r" </details>"]
438#[derive(
439    :: serde :: Deserialize,
440    :: serde :: Serialize,
441    Clone,
442    Copy,
443    Debug,
444    Eq,
445    Hash,
446    Ord,
447    PartialEq,
448    PartialOrd,
449)]
450pub enum AccountChangesByFinalityChangesType {
451    #[serde(rename = "account_changes")]
452    AccountChanges,
453}
454impl ::std::convert::From<&Self> for AccountChangesByFinalityChangesType {
455    fn from(value: &AccountChangesByFinalityChangesType) -> Self {
456        value.clone()
457    }
458}
459impl ::std::fmt::Display for AccountChangesByFinalityChangesType {
460    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
461        match *self {
462            Self::AccountChanges => f.write_str("account_changes"),
463        }
464    }
465}
466impl ::std::str::FromStr for AccountChangesByFinalityChangesType {
467    type Err = self::error::ConversionError;
468    fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
469        match value {
470            "account_changes" => Ok(Self::AccountChanges),
471            _ => Err("invalid value".into()),
472        }
473    }
474}
475impl ::std::convert::TryFrom<&str> for AccountChangesByFinalityChangesType {
476    type Error = self::error::ConversionError;
477    fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
478        value.parse()
479    }
480}
481impl ::std::convert::TryFrom<&::std::string::String> for AccountChangesByFinalityChangesType {
482    type Error = self::error::ConversionError;
483    fn try_from(
484        value: &::std::string::String,
485    ) -> ::std::result::Result<Self, self::error::ConversionError> {
486        value.parse()
487    }
488}
489impl ::std::convert::TryFrom<::std::string::String> for AccountChangesByFinalityChangesType {
490    type Error = self::error::ConversionError;
491    fn try_from(
492        value: ::std::string::String,
493    ) -> ::std::result::Result<Self, self::error::ConversionError> {
494        value.parse()
495    }
496}
497#[doc = "`AccountChangesBySyncCheckpointChangesType`"]
498#[doc = r""]
499#[doc = r" <details><summary>JSON schema</summary>"]
500#[doc = r""]
501#[doc = r" ```json"]
502#[doc = "{"]
503#[doc = "  \"type\": \"string\","]
504#[doc = "  \"enum\": ["]
505#[doc = "    \"account_changes\""]
506#[doc = "  ]"]
507#[doc = "}"]
508#[doc = r" ```"]
509#[doc = r" </details>"]
510#[derive(
511    :: serde :: Deserialize,
512    :: serde :: Serialize,
513    Clone,
514    Copy,
515    Debug,
516    Eq,
517    Hash,
518    Ord,
519    PartialEq,
520    PartialOrd,
521)]
522pub enum AccountChangesBySyncCheckpointChangesType {
523    #[serde(rename = "account_changes")]
524    AccountChanges,
525}
526impl ::std::convert::From<&Self> for AccountChangesBySyncCheckpointChangesType {
527    fn from(value: &AccountChangesBySyncCheckpointChangesType) -> Self {
528        value.clone()
529    }
530}
531impl ::std::fmt::Display for AccountChangesBySyncCheckpointChangesType {
532    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
533        match *self {
534            Self::AccountChanges => f.write_str("account_changes"),
535        }
536    }
537}
538impl ::std::str::FromStr for AccountChangesBySyncCheckpointChangesType {
539    type Err = self::error::ConversionError;
540    fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
541        match value {
542            "account_changes" => Ok(Self::AccountChanges),
543            _ => Err("invalid value".into()),
544        }
545    }
546}
547impl ::std::convert::TryFrom<&str> for AccountChangesBySyncCheckpointChangesType {
548    type Error = self::error::ConversionError;
549    fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
550        value.parse()
551    }
552}
553impl ::std::convert::TryFrom<&::std::string::String> for AccountChangesBySyncCheckpointChangesType {
554    type Error = self::error::ConversionError;
555    fn try_from(
556        value: &::std::string::String,
557    ) -> ::std::result::Result<Self, self::error::ConversionError> {
558        value.parse()
559    }
560}
561impl ::std::convert::TryFrom<::std::string::String> for AccountChangesBySyncCheckpointChangesType {
562    type Error = self::error::ConversionError;
563    fn try_from(
564        value: ::std::string::String,
565    ) -> ::std::result::Result<Self, self::error::ConversionError> {
566        value.parse()
567    }
568}
569#[doc = "The structure describes configuration for creation of new accounts."]
570#[doc = r""]
571#[doc = r" <details><summary>JSON schema</summary>"]
572#[doc = r""]
573#[doc = r" ```json"]
574#[doc = "{"]
575#[doc = "  \"description\": \"The structure describes configuration for creation of new accounts.\","]
576#[doc = "  \"type\": \"object\","]
577#[doc = "  \"required\": ["]
578#[doc = "    \"min_allowed_top_level_account_length\","]
579#[doc = "    \"registrar_account_id\""]
580#[doc = "  ],"]
581#[doc = "  \"properties\": {"]
582#[doc = "    \"min_allowed_top_level_account_length\": {"]
583#[doc = "      \"description\": \"The minimum length of the top-level account ID that is allowed to be created by any account.\","]
584#[doc = "      \"type\": \"integer\","]
585#[doc = "      \"format\": \"uint8\","]
586#[doc = "      \"maximum\": 255.0,"]
587#[doc = "      \"minimum\": 0.0"]
588#[doc = "    },"]
589#[doc = "    \"registrar_account_id\": {"]
590#[doc = "      \"description\": \"The account ID of the account registrar. This account ID allowed to create top-level\\naccounts of any valid length.\","]
591#[doc = "      \"allOf\": ["]
592#[doc = "        {"]
593#[doc = "          \"$ref\": \"#/components/schemas/AccountId\""]
594#[doc = "        }"]
595#[doc = "      ]"]
596#[doc = "    }"]
597#[doc = "  }"]
598#[doc = "}"]
599#[doc = r" ```"]
600#[doc = r" </details>"]
601#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
602pub struct AccountCreationConfigView {
603    #[doc = "The minimum length of the top-level account ID that is allowed to be created by any account."]
604    pub min_allowed_top_level_account_length: u8,
605    #[doc = "The account ID of the account registrar. This account ID allowed to create top-level\naccounts of any valid length."]
606    pub registrar_account_id: AccountId,
607}
608impl ::std::convert::From<&AccountCreationConfigView> for AccountCreationConfigView {
609    fn from(value: &AccountCreationConfigView) -> Self {
610        value.clone()
611    }
612}
613#[doc = "AccountData is a piece of global state that a validator\nsigns and broadcasts to the network.\n\nIt is essentially the data that a validator wants to share with the network.\nAll the nodes in the network are collecting the account data\nbroadcasted by the validators.\nSince the number of the validators is bounded and their\nidentity is known (and the maximal size of allowed AccountData is bounded)\nthe global state that is distributed in the form of AccountData is bounded\nas well.\nFind more information in the docs [here](https://github.com/near/nearcore/blob/560f7fc8f4b3106e0d5d46050688610b1f104ac6/chain/client/src/client.rs#L2232)"]
614#[doc = r""]
615#[doc = r" <details><summary>JSON schema</summary>"]
616#[doc = r""]
617#[doc = r" ```json"]
618#[doc = "{"]
619#[doc = "  \"description\": \"AccountData is a piece of global state that a validator\\nsigns and broadcasts to the network.\\n\\nIt is essentially the data that a validator wants to share with the network.\\nAll the nodes in the network are collecting the account data\\nbroadcasted by the validators.\\nSince the number of the validators is bounded and their\\nidentity is known (and the maximal size of allowed AccountData is bounded)\\nthe global state that is distributed in the form of AccountData is bounded\\nas well.\\nFind more information in the docs [here](https://github.com/near/nearcore/blob/560f7fc8f4b3106e0d5d46050688610b1f104ac6/chain/client/src/client.rs#L2232)\","]
620#[doc = "  \"type\": \"object\","]
621#[doc = "  \"required\": ["]
622#[doc = "    \"account_key\","]
623#[doc = "    \"peer_id\","]
624#[doc = "    \"proxies\","]
625#[doc = "    \"timestamp\""]
626#[doc = "  ],"]
627#[doc = "  \"properties\": {"]
628#[doc = "    \"account_key\": {"]
629#[doc = "      \"description\": \"Account key of the validator signing this AccountData.\","]
630#[doc = "      \"allOf\": ["]
631#[doc = "        {"]
632#[doc = "          \"$ref\": \"#/components/schemas/PublicKey\""]
633#[doc = "        }"]
634#[doc = "      ]"]
635#[doc = "    },"]
636#[doc = "    \"peer_id\": {"]
637#[doc = "      \"description\": \"ID of the node that handles the account key (aka validator key).\","]
638#[doc = "      \"allOf\": ["]
639#[doc = "        {"]
640#[doc = "          \"$ref\": \"#/components/schemas/PublicKey\""]
641#[doc = "        }"]
642#[doc = "      ]"]
643#[doc = "    },"]
644#[doc = "    \"proxies\": {"]
645#[doc = "      \"description\": \"Proxy nodes that are directly connected to the validator node\\n(this list may include the validator node itself).\\nTIER1 nodes should connect to one of the proxies to sent TIER1\\nmessages to the validator.\","]
646#[doc = "      \"type\": \"array\","]
647#[doc = "      \"items\": {"]
648#[doc = "        \"$ref\": \"#/components/schemas/Tier1ProxyView\""]
649#[doc = "      }"]
650#[doc = "    },"]
651#[doc = "    \"timestamp\": {"]
652#[doc = "      \"description\": \"UTC timestamp of when the AccountData has been signed.\","]
653#[doc = "      \"type\": \"string\""]
654#[doc = "    }"]
655#[doc = "  }"]
656#[doc = "}"]
657#[doc = r" ```"]
658#[doc = r" </details>"]
659#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
660pub struct AccountDataView {
661    #[doc = "Account key of the validator signing this AccountData."]
662    pub account_key: PublicKey,
663    #[doc = "ID of the node that handles the account key (aka validator key)."]
664    pub peer_id: PublicKey,
665    #[doc = "Proxy nodes that are directly connected to the validator node\n(this list may include the validator node itself).\nTIER1 nodes should connect to one of the proxies to sent TIER1\nmessages to the validator."]
666    pub proxies: ::std::vec::Vec<Tier1ProxyView>,
667    #[doc = "UTC timestamp of when the AccountData has been signed."]
668    pub timestamp: ::std::string::String,
669}
670impl ::std::convert::From<&AccountDataView> for AccountDataView {
671    fn from(value: &AccountDataView) -> Self {
672        value.clone()
673    }
674}
675#[doc = "`AccountIdValidityRulesVersion`"]
676#[doc = r""]
677#[doc = r" <details><summary>JSON schema</summary>"]
678#[doc = r""]
679#[doc = r" ```json"]
680#[doc = "{"]
681#[doc = "  \"type\": \"integer\","]
682#[doc = "  \"format\": \"uint8\","]
683#[doc = "  \"maximum\": 255.0,"]
684#[doc = "  \"minimum\": 0.0"]
685#[doc = "}"]
686#[doc = r" ```"]
687#[doc = r" </details>"]
688#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
689#[serde(transparent)]
690pub struct AccountIdValidityRulesVersion(pub u8);
691impl ::std::ops::Deref for AccountIdValidityRulesVersion {
692    type Target = u8;
693    fn deref(&self) -> &u8 {
694        &self.0
695    }
696}
697impl ::std::convert::From<AccountIdValidityRulesVersion> for u8 {
698    fn from(value: AccountIdValidityRulesVersion) -> Self {
699        value.0
700    }
701}
702impl ::std::convert::From<&AccountIdValidityRulesVersion> for AccountIdValidityRulesVersion {
703    fn from(value: &AccountIdValidityRulesVersion) -> Self {
704        value.clone()
705    }
706}
707impl ::std::convert::From<u8> for AccountIdValidityRulesVersion {
708    fn from(value: u8) -> Self {
709        Self(value)
710    }
711}
712impl ::std::str::FromStr for AccountIdValidityRulesVersion {
713    type Err = <u8 as ::std::str::FromStr>::Err;
714    fn from_str(value: &str) -> ::std::result::Result<Self, Self::Err> {
715        Ok(Self(value.parse()?))
716    }
717}
718impl ::std::convert::TryFrom<&str> for AccountIdValidityRulesVersion {
719    type Error = <u8 as ::std::str::FromStr>::Err;
720    fn try_from(value: &str) -> ::std::result::Result<Self, Self::Error> {
721        value.parse()
722    }
723}
724impl ::std::convert::TryFrom<&String> for AccountIdValidityRulesVersion {
725    type Error = <u8 as ::std::str::FromStr>::Err;
726    fn try_from(value: &String) -> ::std::result::Result<Self, Self::Error> {
727        value.parse()
728    }
729}
730impl ::std::convert::TryFrom<String> for AccountIdValidityRulesVersion {
731    type Error = <u8 as ::std::str::FromStr>::Err;
732    fn try_from(value: String) -> ::std::result::Result<Self, Self::Error> {
733        value.parse()
734    }
735}
736impl ::std::fmt::Display for AccountIdValidityRulesVersion {
737    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
738        self.0.fmt(f)
739    }
740}
741#[doc = "Account info for validators"]
742#[doc = r""]
743#[doc = r" <details><summary>JSON schema</summary>"]
744#[doc = r""]
745#[doc = r" ```json"]
746#[doc = "{"]
747#[doc = "  \"description\": \"Account info for validators\","]
748#[doc = "  \"type\": \"object\","]
749#[doc = "  \"required\": ["]
750#[doc = "    \"account_id\","]
751#[doc = "    \"amount\","]
752#[doc = "    \"public_key\""]
753#[doc = "  ],"]
754#[doc = "  \"properties\": {"]
755#[doc = "    \"account_id\": {"]
756#[doc = "      \"$ref\": \"#/components/schemas/AccountId\""]
757#[doc = "    },"]
758#[doc = "    \"amount\": {"]
759#[doc = "      \"$ref\": \"#/components/schemas/NearToken\""]
760#[doc = "    },"]
761#[doc = "    \"public_key\": {"]
762#[doc = "      \"$ref\": \"#/components/schemas/PublicKey\""]
763#[doc = "    }"]
764#[doc = "  }"]
765#[doc = "}"]
766#[doc = r" ```"]
767#[doc = r" </details>"]
768#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
769pub struct AccountInfo {
770    pub account_id: AccountId,
771    pub amount: NearToken,
772    pub public_key: PublicKey,
773}
774impl ::std::convert::From<&AccountInfo> for AccountInfo {
775    fn from(value: &AccountInfo) -> Self {
776        value.clone()
777    }
778}
779#[doc = "A view of the account"]
780#[doc = r""]
781#[doc = r" <details><summary>JSON schema</summary>"]
782#[doc = r""]
783#[doc = r" ```json"]
784#[doc = "{"]
785#[doc = "  \"description\": \"A view of the account\","]
786#[doc = "  \"type\": \"object\","]
787#[doc = "  \"required\": ["]
788#[doc = "    \"amount\","]
789#[doc = "    \"code_hash\","]
790#[doc = "    \"locked\","]
791#[doc = "    \"storage_usage\""]
792#[doc = "  ],"]
793#[doc = "  \"properties\": {"]
794#[doc = "    \"amount\": {"]
795#[doc = "      \"$ref\": \"#/components/schemas/NearToken\""]
796#[doc = "    },"]
797#[doc = "    \"code_hash\": {"]
798#[doc = "      \"$ref\": \"#/components/schemas/CryptoHash\""]
799#[doc = "    },"]
800#[doc = "    \"global_contract_account_id\": {"]
801#[doc = "      \"anyOf\": ["]
802#[doc = "        {"]
803#[doc = "          \"$ref\": \"#/components/schemas/AccountId\""]
804#[doc = "        },"]
805#[doc = "        {"]
806#[doc = "          \"type\": \"null\""]
807#[doc = "        }"]
808#[doc = "      ]"]
809#[doc = "    },"]
810#[doc = "    \"global_contract_hash\": {"]
811#[doc = "      \"anyOf\": ["]
812#[doc = "        {"]
813#[doc = "          \"$ref\": \"#/components/schemas/CryptoHash\""]
814#[doc = "        },"]
815#[doc = "        {"]
816#[doc = "          \"type\": \"null\""]
817#[doc = "        }"]
818#[doc = "      ]"]
819#[doc = "    },"]
820#[doc = "    \"locked\": {"]
821#[doc = "      \"$ref\": \"#/components/schemas/NearToken\""]
822#[doc = "    },"]
823#[doc = "    \"storage_paid_at\": {"]
824#[doc = "      \"description\": \"TODO(2271): deprecated.\","]
825#[doc = "      \"default\": 0,"]
826#[doc = "      \"type\": \"integer\","]
827#[doc = "      \"format\": \"uint64\","]
828#[doc = "      \"minimum\": 0.0"]
829#[doc = "    },"]
830#[doc = "    \"storage_usage\": {"]
831#[doc = "      \"type\": \"integer\","]
832#[doc = "      \"format\": \"uint64\","]
833#[doc = "      \"minimum\": 0.0"]
834#[doc = "    }"]
835#[doc = "  }"]
836#[doc = "}"]
837#[doc = r" ```"]
838#[doc = r" </details>"]
839#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
840pub struct AccountView {
841    pub amount: NearToken,
842    pub code_hash: CryptoHash,
843    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
844    pub global_contract_account_id: ::std::option::Option<AccountId>,
845    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
846    pub global_contract_hash: ::std::option::Option<CryptoHash>,
847    pub locked: NearToken,
848    #[doc = "TODO(2271): deprecated."]
849    #[serde(default)]
850    pub storage_paid_at: u64,
851    pub storage_usage: u64,
852}
853impl ::std::convert::From<&AccountView> for AccountView {
854    fn from(value: &AccountView) -> Self {
855        value.clone()
856    }
857}
858#[doc = "Account ID with its public key."]
859#[doc = r""]
860#[doc = r" <details><summary>JSON schema</summary>"]
861#[doc = r""]
862#[doc = r" ```json"]
863#[doc = "{"]
864#[doc = "  \"description\": \"Account ID with its public key.\","]
865#[doc = "  \"type\": \"object\","]
866#[doc = "  \"required\": ["]
867#[doc = "    \"account_id\","]
868#[doc = "    \"public_key\""]
869#[doc = "  ],"]
870#[doc = "  \"properties\": {"]
871#[doc = "    \"account_id\": {"]
872#[doc = "      \"$ref\": \"#/components/schemas/AccountId\""]
873#[doc = "    },"]
874#[doc = "    \"public_key\": {"]
875#[doc = "      \"$ref\": \"#/components/schemas/PublicKey\""]
876#[doc = "    }"]
877#[doc = "  }"]
878#[doc = "}"]
879#[doc = r" ```"]
880#[doc = r" </details>"]
881#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
882pub struct AccountWithPublicKey {
883    pub account_id: AccountId,
884    pub public_key: PublicKey,
885}
886impl ::std::convert::From<&AccountWithPublicKey> for AccountWithPublicKey {
887    fn from(value: &AccountWithPublicKey) -> Self {
888        value.clone()
889    }
890}
891#[doc = "Describes the cost of creating a specific action, `Action`. Includes all variants."]
892#[doc = r""]
893#[doc = r" <details><summary>JSON schema</summary>"]
894#[doc = r""]
895#[doc = r" ```json"]
896#[doc = "{"]
897#[doc = "  \"description\": \"Describes the cost of creating a specific action, `Action`. Includes all variants.\","]
898#[doc = "  \"type\": \"object\","]
899#[doc = "  \"required\": ["]
900#[doc = "    \"add_key_cost\","]
901#[doc = "    \"create_account_cost\","]
902#[doc = "    \"delegate_cost\","]
903#[doc = "    \"delete_account_cost\","]
904#[doc = "    \"delete_key_cost\","]
905#[doc = "    \"deploy_contract_cost\","]
906#[doc = "    \"deploy_contract_cost_per_byte\","]
907#[doc = "    \"function_call_cost\","]
908#[doc = "    \"function_call_cost_per_byte\","]
909#[doc = "    \"stake_cost\","]
910#[doc = "    \"transfer_cost\""]
911#[doc = "  ],"]
912#[doc = "  \"properties\": {"]
913#[doc = "    \"add_key_cost\": {"]
914#[doc = "      \"description\": \"Base cost of adding a key.\","]
915#[doc = "      \"allOf\": ["]
916#[doc = "        {"]
917#[doc = "          \"$ref\": \"#/components/schemas/AccessKeyCreationConfigView\""]
918#[doc = "        }"]
919#[doc = "      ]"]
920#[doc = "    },"]
921#[doc = "    \"create_account_cost\": {"]
922#[doc = "      \"description\": \"Base cost of creating an account.\","]
923#[doc = "      \"allOf\": ["]
924#[doc = "        {"]
925#[doc = "          \"$ref\": \"#/components/schemas/Fee\""]
926#[doc = "        }"]
927#[doc = "      ]"]
928#[doc = "    },"]
929#[doc = "    \"delegate_cost\": {"]
930#[doc = "      \"description\": \"Base cost for processing a delegate action.\\n\\nThis is on top of the costs for the actions inside the delegate action.\","]
931#[doc = "      \"allOf\": ["]
932#[doc = "        {"]
933#[doc = "          \"$ref\": \"#/components/schemas/Fee\""]
934#[doc = "        }"]
935#[doc = "      ]"]
936#[doc = "    },"]
937#[doc = "    \"delete_account_cost\": {"]
938#[doc = "      \"description\": \"Base cost of deleting an account.\","]
939#[doc = "      \"allOf\": ["]
940#[doc = "        {"]
941#[doc = "          \"$ref\": \"#/components/schemas/Fee\""]
942#[doc = "        }"]
943#[doc = "      ]"]
944#[doc = "    },"]
945#[doc = "    \"delete_key_cost\": {"]
946#[doc = "      \"description\": \"Base cost of deleting a key.\","]
947#[doc = "      \"allOf\": ["]
948#[doc = "        {"]
949#[doc = "          \"$ref\": \"#/components/schemas/Fee\""]
950#[doc = "        }"]
951#[doc = "      ]"]
952#[doc = "    },"]
953#[doc = "    \"deploy_contract_cost\": {"]
954#[doc = "      \"description\": \"Base cost of deploying a contract.\","]
955#[doc = "      \"allOf\": ["]
956#[doc = "        {"]
957#[doc = "          \"$ref\": \"#/components/schemas/Fee\""]
958#[doc = "        }"]
959#[doc = "      ]"]
960#[doc = "    },"]
961#[doc = "    \"deploy_contract_cost_per_byte\": {"]
962#[doc = "      \"description\": \"Cost per byte of deploying a contract.\","]
963#[doc = "      \"allOf\": ["]
964#[doc = "        {"]
965#[doc = "          \"$ref\": \"#/components/schemas/Fee\""]
966#[doc = "        }"]
967#[doc = "      ]"]
968#[doc = "    },"]
969#[doc = "    \"function_call_cost\": {"]
970#[doc = "      \"description\": \"Base cost of calling a function.\","]
971#[doc = "      \"allOf\": ["]
972#[doc = "        {"]
973#[doc = "          \"$ref\": \"#/components/schemas/Fee\""]
974#[doc = "        }"]
975#[doc = "      ]"]
976#[doc = "    },"]
977#[doc = "    \"function_call_cost_per_byte\": {"]
978#[doc = "      \"description\": \"Cost per byte of method name and arguments of calling a function.\","]
979#[doc = "      \"allOf\": ["]
980#[doc = "        {"]
981#[doc = "          \"$ref\": \"#/components/schemas/Fee\""]
982#[doc = "        }"]
983#[doc = "      ]"]
984#[doc = "    },"]
985#[doc = "    \"stake_cost\": {"]
986#[doc = "      \"description\": \"Base cost of staking.\","]
987#[doc = "      \"allOf\": ["]
988#[doc = "        {"]
989#[doc = "          \"$ref\": \"#/components/schemas/Fee\""]
990#[doc = "        }"]
991#[doc = "      ]"]
992#[doc = "    },"]
993#[doc = "    \"transfer_cost\": {"]
994#[doc = "      \"description\": \"Base cost of making a transfer.\","]
995#[doc = "      \"allOf\": ["]
996#[doc = "        {"]
997#[doc = "          \"$ref\": \"#/components/schemas/Fee\""]
998#[doc = "        }"]
999#[doc = "      ]"]
1000#[doc = "    }"]
1001#[doc = "  }"]
1002#[doc = "}"]
1003#[doc = r" ```"]
1004#[doc = r" </details>"]
1005#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
1006pub struct ActionCreationConfigView {
1007    #[doc = "Base cost of adding a key."]
1008    pub add_key_cost: AccessKeyCreationConfigView,
1009    #[doc = "Base cost of creating an account."]
1010    pub create_account_cost: Fee,
1011    #[doc = "Base cost for processing a delegate action.\n\nThis is on top of the costs for the actions inside the delegate action."]
1012    pub delegate_cost: Fee,
1013    #[doc = "Base cost of deleting an account."]
1014    pub delete_account_cost: Fee,
1015    #[doc = "Base cost of deleting a key."]
1016    pub delete_key_cost: Fee,
1017    #[doc = "Base cost of deploying a contract."]
1018    pub deploy_contract_cost: Fee,
1019    #[doc = "Cost per byte of deploying a contract."]
1020    pub deploy_contract_cost_per_byte: Fee,
1021    #[doc = "Base cost of calling a function."]
1022    pub function_call_cost: Fee,
1023    #[doc = "Cost per byte of method name and arguments of calling a function."]
1024    pub function_call_cost_per_byte: Fee,
1025    #[doc = "Base cost of staking."]
1026    pub stake_cost: Fee,
1027    #[doc = "Base cost of making a transfer."]
1028    pub transfer_cost: Fee,
1029}
1030impl ::std::convert::From<&ActionCreationConfigView> for ActionCreationConfigView {
1031    fn from(value: &ActionCreationConfigView) -> Self {
1032        value.clone()
1033    }
1034}
1035#[doc = "An error happened during Action execution"]
1036#[doc = r""]
1037#[doc = r" <details><summary>JSON schema</summary>"]
1038#[doc = r""]
1039#[doc = r" ```json"]
1040#[doc = "{"]
1041#[doc = "  \"description\": \"An error happened during Action execution\","]
1042#[doc = "  \"type\": \"object\","]
1043#[doc = "  \"required\": ["]
1044#[doc = "    \"kind\""]
1045#[doc = "  ],"]
1046#[doc = "  \"properties\": {"]
1047#[doc = "    \"index\": {"]
1048#[doc = "      \"description\": \"Index of the failed action in the transaction.\\nAction index is not defined if ActionError.kind is `ActionErrorKind::LackBalanceForState`\","]
1049#[doc = "      \"type\": ["]
1050#[doc = "        \"integer\","]
1051#[doc = "        \"null\""]
1052#[doc = "      ],"]
1053#[doc = "      \"format\": \"uint64\","]
1054#[doc = "      \"minimum\": 0.0"]
1055#[doc = "    },"]
1056#[doc = "    \"kind\": {"]
1057#[doc = "      \"description\": \"The kind of ActionError happened\","]
1058#[doc = "      \"allOf\": ["]
1059#[doc = "        {"]
1060#[doc = "          \"$ref\": \"#/components/schemas/ActionErrorKind\""]
1061#[doc = "        }"]
1062#[doc = "      ]"]
1063#[doc = "    }"]
1064#[doc = "  }"]
1065#[doc = "}"]
1066#[doc = r" ```"]
1067#[doc = r" </details>"]
1068#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
1069pub struct ActionError {
1070    #[doc = "Index of the failed action in the transaction.\nAction index is not defined if ActionError.kind is `ActionErrorKind::LackBalanceForState`"]
1071    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
1072    pub index: ::std::option::Option<u64>,
1073    #[doc = "The kind of ActionError happened"]
1074    pub kind: ActionErrorKind,
1075}
1076impl ::std::convert::From<&ActionError> for ActionError {
1077    fn from(value: &ActionError) -> Self {
1078        value.clone()
1079    }
1080}
1081#[doc = "`ActionErrorKind`"]
1082#[doc = r""]
1083#[doc = r" <details><summary>JSON schema</summary>"]
1084#[doc = r""]
1085#[doc = r" ```json"]
1086#[doc = "{"]
1087#[doc = "  \"oneOf\": ["]
1088#[doc = "    {"]
1089#[doc = "      \"description\": \"Happens when CreateAccount action tries to create an account with account_id which is already exists in the storage\","]
1090#[doc = "      \"type\": \"object\","]
1091#[doc = "      \"required\": ["]
1092#[doc = "        \"AccountAlreadyExists\""]
1093#[doc = "      ],"]
1094#[doc = "      \"properties\": {"]
1095#[doc = "        \"AccountAlreadyExists\": {"]
1096#[doc = "          \"type\": \"object\","]
1097#[doc = "          \"required\": ["]
1098#[doc = "            \"account_id\""]
1099#[doc = "          ],"]
1100#[doc = "          \"properties\": {"]
1101#[doc = "            \"account_id\": {"]
1102#[doc = "              \"$ref\": \"#/components/schemas/AccountId\""]
1103#[doc = "            }"]
1104#[doc = "          }"]
1105#[doc = "        }"]
1106#[doc = "      },"]
1107#[doc = "      \"additionalProperties\": false"]
1108#[doc = "    },"]
1109#[doc = "    {"]
1110#[doc = "      \"description\": \"Happens when TX receiver_id doesn't exist (but action is not Action::CreateAccount)\","]
1111#[doc = "      \"type\": \"object\","]
1112#[doc = "      \"required\": ["]
1113#[doc = "        \"AccountDoesNotExist\""]
1114#[doc = "      ],"]
1115#[doc = "      \"properties\": {"]
1116#[doc = "        \"AccountDoesNotExist\": {"]
1117#[doc = "          \"type\": \"object\","]
1118#[doc = "          \"required\": ["]
1119#[doc = "            \"account_id\""]
1120#[doc = "          ],"]
1121#[doc = "          \"properties\": {"]
1122#[doc = "            \"account_id\": {"]
1123#[doc = "              \"$ref\": \"#/components/schemas/AccountId\""]
1124#[doc = "            }"]
1125#[doc = "          }"]
1126#[doc = "        }"]
1127#[doc = "      },"]
1128#[doc = "      \"additionalProperties\": false"]
1129#[doc = "    },"]
1130#[doc = "    {"]
1131#[doc = "      \"description\": \"A top-level account ID can only be created by registrar.\","]
1132#[doc = "      \"type\": \"object\","]
1133#[doc = "      \"required\": ["]
1134#[doc = "        \"CreateAccountOnlyByRegistrar\""]
1135#[doc = "      ],"]
1136#[doc = "      \"properties\": {"]
1137#[doc = "        \"CreateAccountOnlyByRegistrar\": {"]
1138#[doc = "          \"type\": \"object\","]
1139#[doc = "          \"required\": ["]
1140#[doc = "            \"account_id\","]
1141#[doc = "            \"predecessor_id\","]
1142#[doc = "            \"registrar_account_id\""]
1143#[doc = "          ],"]
1144#[doc = "          \"properties\": {"]
1145#[doc = "            \"account_id\": {"]
1146#[doc = "              \"$ref\": \"#/components/schemas/AccountId\""]
1147#[doc = "            },"]
1148#[doc = "            \"predecessor_id\": {"]
1149#[doc = "              \"$ref\": \"#/components/schemas/AccountId\""]
1150#[doc = "            },"]
1151#[doc = "            \"registrar_account_id\": {"]
1152#[doc = "              \"$ref\": \"#/components/schemas/AccountId\""]
1153#[doc = "            }"]
1154#[doc = "          }"]
1155#[doc = "        }"]
1156#[doc = "      },"]
1157#[doc = "      \"additionalProperties\": false"]
1158#[doc = "    },"]
1159#[doc = "    {"]
1160#[doc = "      \"description\": \"A newly created account must be under a namespace of the creator account\","]
1161#[doc = "      \"type\": \"object\","]
1162#[doc = "      \"required\": ["]
1163#[doc = "        \"CreateAccountNotAllowed\""]
1164#[doc = "      ],"]
1165#[doc = "      \"properties\": {"]
1166#[doc = "        \"CreateAccountNotAllowed\": {"]
1167#[doc = "          \"type\": \"object\","]
1168#[doc = "          \"required\": ["]
1169#[doc = "            \"account_id\","]
1170#[doc = "            \"predecessor_id\""]
1171#[doc = "          ],"]
1172#[doc = "          \"properties\": {"]
1173#[doc = "            \"account_id\": {"]
1174#[doc = "              \"$ref\": \"#/components/schemas/AccountId\""]
1175#[doc = "            },"]
1176#[doc = "            \"predecessor_id\": {"]
1177#[doc = "              \"$ref\": \"#/components/schemas/AccountId\""]
1178#[doc = "            }"]
1179#[doc = "          }"]
1180#[doc = "        }"]
1181#[doc = "      },"]
1182#[doc = "      \"additionalProperties\": false"]
1183#[doc = "    },"]
1184#[doc = "    {"]
1185#[doc = "      \"description\": \"Administrative actions like `DeployContract`, `Stake`, `AddKey`, `DeleteKey`. can be proceed only if sender=receiver\\nor the first TX action is a `CreateAccount` action\","]
1186#[doc = "      \"type\": \"object\","]
1187#[doc = "      \"required\": ["]
1188#[doc = "        \"ActorNoPermission\""]
1189#[doc = "      ],"]
1190#[doc = "      \"properties\": {"]
1191#[doc = "        \"ActorNoPermission\": {"]
1192#[doc = "          \"type\": \"object\","]
1193#[doc = "          \"required\": ["]
1194#[doc = "            \"account_id\","]
1195#[doc = "            \"actor_id\""]
1196#[doc = "          ],"]
1197#[doc = "          \"properties\": {"]
1198#[doc = "            \"account_id\": {"]
1199#[doc = "              \"$ref\": \"#/components/schemas/AccountId\""]
1200#[doc = "            },"]
1201#[doc = "            \"actor_id\": {"]
1202#[doc = "              \"$ref\": \"#/components/schemas/AccountId\""]
1203#[doc = "            }"]
1204#[doc = "          }"]
1205#[doc = "        }"]
1206#[doc = "      },"]
1207#[doc = "      \"additionalProperties\": false"]
1208#[doc = "    },"]
1209#[doc = "    {"]
1210#[doc = "      \"description\": \"Account tries to remove an access key that doesn't exist\","]
1211#[doc = "      \"type\": \"object\","]
1212#[doc = "      \"required\": ["]
1213#[doc = "        \"DeleteKeyDoesNotExist\""]
1214#[doc = "      ],"]
1215#[doc = "      \"properties\": {"]
1216#[doc = "        \"DeleteKeyDoesNotExist\": {"]
1217#[doc = "          \"type\": \"object\","]
1218#[doc = "          \"required\": ["]
1219#[doc = "            \"account_id\","]
1220#[doc = "            \"public_key\""]
1221#[doc = "          ],"]
1222#[doc = "          \"properties\": {"]
1223#[doc = "            \"account_id\": {"]
1224#[doc = "              \"$ref\": \"#/components/schemas/AccountId\""]
1225#[doc = "            },"]
1226#[doc = "            \"public_key\": {"]
1227#[doc = "              \"$ref\": \"#/components/schemas/PublicKey\""]
1228#[doc = "            }"]
1229#[doc = "          }"]
1230#[doc = "        }"]
1231#[doc = "      },"]
1232#[doc = "      \"additionalProperties\": false"]
1233#[doc = "    },"]
1234#[doc = "    {"]
1235#[doc = "      \"description\": \"The public key is already used for an existing access key\","]
1236#[doc = "      \"type\": \"object\","]
1237#[doc = "      \"required\": ["]
1238#[doc = "        \"AddKeyAlreadyExists\""]
1239#[doc = "      ],"]
1240#[doc = "      \"properties\": {"]
1241#[doc = "        \"AddKeyAlreadyExists\": {"]
1242#[doc = "          \"type\": \"object\","]
1243#[doc = "          \"required\": ["]
1244#[doc = "            \"account_id\","]
1245#[doc = "            \"public_key\""]
1246#[doc = "          ],"]
1247#[doc = "          \"properties\": {"]
1248#[doc = "            \"account_id\": {"]
1249#[doc = "              \"$ref\": \"#/components/schemas/AccountId\""]
1250#[doc = "            },"]
1251#[doc = "            \"public_key\": {"]
1252#[doc = "              \"$ref\": \"#/components/schemas/PublicKey\""]
1253#[doc = "            }"]
1254#[doc = "          }"]
1255#[doc = "        }"]
1256#[doc = "      },"]
1257#[doc = "      \"additionalProperties\": false"]
1258#[doc = "    },"]
1259#[doc = "    {"]
1260#[doc = "      \"description\": \"Account is staking and can not be deleted\","]
1261#[doc = "      \"type\": \"object\","]
1262#[doc = "      \"required\": ["]
1263#[doc = "        \"DeleteAccountStaking\""]
1264#[doc = "      ],"]
1265#[doc = "      \"properties\": {"]
1266#[doc = "        \"DeleteAccountStaking\": {"]
1267#[doc = "          \"type\": \"object\","]
1268#[doc = "          \"required\": ["]
1269#[doc = "            \"account_id\""]
1270#[doc = "          ],"]
1271#[doc = "          \"properties\": {"]
1272#[doc = "            \"account_id\": {"]
1273#[doc = "              \"$ref\": \"#/components/schemas/AccountId\""]
1274#[doc = "            }"]
1275#[doc = "          }"]
1276#[doc = "        }"]
1277#[doc = "      },"]
1278#[doc = "      \"additionalProperties\": false"]
1279#[doc = "    },"]
1280#[doc = "    {"]
1281#[doc = "      \"description\": \"ActionReceipt can't be completed, because the remaining balance will not be enough to cover storage.\","]
1282#[doc = "      \"type\": \"object\","]
1283#[doc = "      \"required\": ["]
1284#[doc = "        \"LackBalanceForState\""]
1285#[doc = "      ],"]
1286#[doc = "      \"properties\": {"]
1287#[doc = "        \"LackBalanceForState\": {"]
1288#[doc = "          \"type\": \"object\","]
1289#[doc = "          \"required\": ["]
1290#[doc = "            \"account_id\","]
1291#[doc = "            \"amount\""]
1292#[doc = "          ],"]
1293#[doc = "          \"properties\": {"]
1294#[doc = "            \"account_id\": {"]
1295#[doc = "              \"description\": \"An account which needs balance\","]
1296#[doc = "              \"allOf\": ["]
1297#[doc = "                {"]
1298#[doc = "                  \"$ref\": \"#/components/schemas/AccountId\""]
1299#[doc = "                }"]
1300#[doc = "              ]"]
1301#[doc = "            },"]
1302#[doc = "            \"amount\": {"]
1303#[doc = "              \"description\": \"Balance required to complete an action.\","]
1304#[doc = "              \"allOf\": ["]
1305#[doc = "                {"]
1306#[doc = "                  \"$ref\": \"#/components/schemas/NearToken\""]
1307#[doc = "                }"]
1308#[doc = "              ]"]
1309#[doc = "            }"]
1310#[doc = "          }"]
1311#[doc = "        }"]
1312#[doc = "      },"]
1313#[doc = "      \"additionalProperties\": false"]
1314#[doc = "    },"]
1315#[doc = "    {"]
1316#[doc = "      \"description\": \"Account is not yet staked, but tries to unstake\","]
1317#[doc = "      \"type\": \"object\","]
1318#[doc = "      \"required\": ["]
1319#[doc = "        \"TriesToUnstake\""]
1320#[doc = "      ],"]
1321#[doc = "      \"properties\": {"]
1322#[doc = "        \"TriesToUnstake\": {"]
1323#[doc = "          \"type\": \"object\","]
1324#[doc = "          \"required\": ["]
1325#[doc = "            \"account_id\""]
1326#[doc = "          ],"]
1327#[doc = "          \"properties\": {"]
1328#[doc = "            \"account_id\": {"]
1329#[doc = "              \"$ref\": \"#/components/schemas/AccountId\""]
1330#[doc = "            }"]
1331#[doc = "          }"]
1332#[doc = "        }"]
1333#[doc = "      },"]
1334#[doc = "      \"additionalProperties\": false"]
1335#[doc = "    },"]
1336#[doc = "    {"]
1337#[doc = "      \"description\": \"The account doesn't have enough balance to increase the stake.\","]
1338#[doc = "      \"type\": \"object\","]
1339#[doc = "      \"required\": ["]
1340#[doc = "        \"TriesToStake\""]
1341#[doc = "      ],"]
1342#[doc = "      \"properties\": {"]
1343#[doc = "        \"TriesToStake\": {"]
1344#[doc = "          \"type\": \"object\","]
1345#[doc = "          \"required\": ["]
1346#[doc = "            \"account_id\","]
1347#[doc = "            \"balance\","]
1348#[doc = "            \"locked\","]
1349#[doc = "            \"stake\""]
1350#[doc = "          ],"]
1351#[doc = "          \"properties\": {"]
1352#[doc = "            \"account_id\": {"]
1353#[doc = "              \"$ref\": \"#/components/schemas/AccountId\""]
1354#[doc = "            },"]
1355#[doc = "            \"balance\": {"]
1356#[doc = "              \"$ref\": \"#/components/schemas/NearToken\""]
1357#[doc = "            },"]
1358#[doc = "            \"locked\": {"]
1359#[doc = "              \"$ref\": \"#/components/schemas/NearToken\""]
1360#[doc = "            },"]
1361#[doc = "            \"stake\": {"]
1362#[doc = "              \"$ref\": \"#/components/schemas/NearToken\""]
1363#[doc = "            }"]
1364#[doc = "          }"]
1365#[doc = "        }"]
1366#[doc = "      },"]
1367#[doc = "      \"additionalProperties\": false"]
1368#[doc = "    },"]
1369#[doc = "    {"]
1370#[doc = "      \"type\": \"object\","]
1371#[doc = "      \"required\": ["]
1372#[doc = "        \"InsufficientStake\""]
1373#[doc = "      ],"]
1374#[doc = "      \"properties\": {"]
1375#[doc = "        \"InsufficientStake\": {"]
1376#[doc = "          \"type\": \"object\","]
1377#[doc = "          \"required\": ["]
1378#[doc = "            \"account_id\","]
1379#[doc = "            \"minimum_stake\","]
1380#[doc = "            \"stake\""]
1381#[doc = "          ],"]
1382#[doc = "          \"properties\": {"]
1383#[doc = "            \"account_id\": {"]
1384#[doc = "              \"$ref\": \"#/components/schemas/AccountId\""]
1385#[doc = "            },"]
1386#[doc = "            \"minimum_stake\": {"]
1387#[doc = "              \"$ref\": \"#/components/schemas/NearToken\""]
1388#[doc = "            },"]
1389#[doc = "            \"stake\": {"]
1390#[doc = "              \"$ref\": \"#/components/schemas/NearToken\""]
1391#[doc = "            }"]
1392#[doc = "          }"]
1393#[doc = "        }"]
1394#[doc = "      },"]
1395#[doc = "      \"additionalProperties\": false"]
1396#[doc = "    },"]
1397#[doc = "    {"]
1398#[doc = "      \"description\": \"An error occurred during a `FunctionCall` Action, parameter is debug message.\","]
1399#[doc = "      \"type\": \"object\","]
1400#[doc = "      \"required\": ["]
1401#[doc = "        \"FunctionCallError\""]
1402#[doc = "      ],"]
1403#[doc = "      \"properties\": {"]
1404#[doc = "        \"FunctionCallError\": {"]
1405#[doc = "          \"$ref\": \"#/components/schemas/FunctionCallError\""]
1406#[doc = "        }"]
1407#[doc = "      },"]
1408#[doc = "      \"additionalProperties\": false"]
1409#[doc = "    },"]
1410#[doc = "    {"]
1411#[doc = "      \"description\": \"Error occurs when a new `ActionReceipt` created by the `FunctionCall` action fails\\nreceipt validation.\","]
1412#[doc = "      \"type\": \"object\","]
1413#[doc = "      \"required\": ["]
1414#[doc = "        \"NewReceiptValidationError\""]
1415#[doc = "      ],"]
1416#[doc = "      \"properties\": {"]
1417#[doc = "        \"NewReceiptValidationError\": {"]
1418#[doc = "          \"$ref\": \"#/components/schemas/ReceiptValidationError\""]
1419#[doc = "        }"]
1420#[doc = "      },"]
1421#[doc = "      \"additionalProperties\": false"]
1422#[doc = "    },"]
1423#[doc = "    {"]
1424#[doc = "      \"description\": \"Error occurs when a `CreateAccount` action is called on a NEAR-implicit or ETH-implicit account.\\nSee NEAR-implicit account creation NEP: <https://github.com/nearprotocol/NEPs/pull/71>.\\nAlso, see ETH-implicit account creation NEP: <https://github.com/near/NEPs/issues/518>.\\n\\nTODO(#8598): This error is named very poorly. A better name would be\\n`OnlyNamedAccountCreationAllowed`.\","]
1425#[doc = "      \"type\": \"object\","]
1426#[doc = "      \"required\": ["]
1427#[doc = "        \"OnlyImplicitAccountCreationAllowed\""]
1428#[doc = "      ],"]
1429#[doc = "      \"properties\": {"]
1430#[doc = "        \"OnlyImplicitAccountCreationAllowed\": {"]
1431#[doc = "          \"type\": \"object\","]
1432#[doc = "          \"required\": ["]
1433#[doc = "            \"account_id\""]
1434#[doc = "          ],"]
1435#[doc = "          \"properties\": {"]
1436#[doc = "            \"account_id\": {"]
1437#[doc = "              \"$ref\": \"#/components/schemas/AccountId\""]
1438#[doc = "            }"]
1439#[doc = "          }"]
1440#[doc = "        }"]
1441#[doc = "      },"]
1442#[doc = "      \"additionalProperties\": false"]
1443#[doc = "    },"]
1444#[doc = "    {"]
1445#[doc = "      \"description\": \"Delete account whose state is large is temporarily banned.\","]
1446#[doc = "      \"type\": \"object\","]
1447#[doc = "      \"required\": ["]
1448#[doc = "        \"DeleteAccountWithLargeState\""]
1449#[doc = "      ],"]
1450#[doc = "      \"properties\": {"]
1451#[doc = "        \"DeleteAccountWithLargeState\": {"]
1452#[doc = "          \"type\": \"object\","]
1453#[doc = "          \"required\": ["]
1454#[doc = "            \"account_id\""]
1455#[doc = "          ],"]
1456#[doc = "          \"properties\": {"]
1457#[doc = "            \"account_id\": {"]
1458#[doc = "              \"$ref\": \"#/components/schemas/AccountId\""]
1459#[doc = "            }"]
1460#[doc = "          }"]
1461#[doc = "        }"]
1462#[doc = "      },"]
1463#[doc = "      \"additionalProperties\": false"]
1464#[doc = "    },"]
1465#[doc = "    {"]
1466#[doc = "      \"description\": \"Signature does not match the provided actions and given signer public key.\","]
1467#[doc = "      \"type\": \"string\","]
1468#[doc = "      \"enum\": ["]
1469#[doc = "        \"DelegateActionInvalidSignature\""]
1470#[doc = "      ]"]
1471#[doc = "    },"]
1472#[doc = "    {"]
1473#[doc = "      \"description\": \"Receiver of the transaction doesn't match Sender of the delegate action\","]
1474#[doc = "      \"type\": \"object\","]
1475#[doc = "      \"required\": ["]
1476#[doc = "        \"DelegateActionSenderDoesNotMatchTxReceiver\""]
1477#[doc = "      ],"]
1478#[doc = "      \"properties\": {"]
1479#[doc = "        \"DelegateActionSenderDoesNotMatchTxReceiver\": {"]
1480#[doc = "          \"type\": \"object\","]
1481#[doc = "          \"required\": ["]
1482#[doc = "            \"receiver_id\","]
1483#[doc = "            \"sender_id\""]
1484#[doc = "          ],"]
1485#[doc = "          \"properties\": {"]
1486#[doc = "            \"receiver_id\": {"]
1487#[doc = "              \"$ref\": \"#/components/schemas/AccountId\""]
1488#[doc = "            },"]
1489#[doc = "            \"sender_id\": {"]
1490#[doc = "              \"$ref\": \"#/components/schemas/AccountId\""]
1491#[doc = "            }"]
1492#[doc = "          }"]
1493#[doc = "        }"]
1494#[doc = "      },"]
1495#[doc = "      \"additionalProperties\": false"]
1496#[doc = "    },"]
1497#[doc = "    {"]
1498#[doc = "      \"description\": \"Delegate action has expired. `max_block_height` is less than actual block height.\","]
1499#[doc = "      \"type\": \"string\","]
1500#[doc = "      \"enum\": ["]
1501#[doc = "        \"DelegateActionExpired\""]
1502#[doc = "      ]"]
1503#[doc = "    },"]
1504#[doc = "    {"]
1505#[doc = "      \"description\": \"The given public key doesn't exist for Sender account\","]
1506#[doc = "      \"type\": \"object\","]
1507#[doc = "      \"required\": ["]
1508#[doc = "        \"DelegateActionAccessKeyError\""]
1509#[doc = "      ],"]
1510#[doc = "      \"properties\": {"]
1511#[doc = "        \"DelegateActionAccessKeyError\": {"]
1512#[doc = "          \"$ref\": \"#/components/schemas/InvalidAccessKeyError\""]
1513#[doc = "        }"]
1514#[doc = "      },"]
1515#[doc = "      \"additionalProperties\": false"]
1516#[doc = "    },"]
1517#[doc = "    {"]
1518#[doc = "      \"description\": \"DelegateAction nonce must be greater sender[public_key].nonce\","]
1519#[doc = "      \"type\": \"object\","]
1520#[doc = "      \"required\": ["]
1521#[doc = "        \"DelegateActionInvalidNonce\""]
1522#[doc = "      ],"]
1523#[doc = "      \"properties\": {"]
1524#[doc = "        \"DelegateActionInvalidNonce\": {"]
1525#[doc = "          \"type\": \"object\","]
1526#[doc = "          \"required\": ["]
1527#[doc = "            \"ak_nonce\","]
1528#[doc = "            \"delegate_nonce\""]
1529#[doc = "          ],"]
1530#[doc = "          \"properties\": {"]
1531#[doc = "            \"ak_nonce\": {"]
1532#[doc = "              \"type\": \"integer\","]
1533#[doc = "              \"format\": \"uint64\","]
1534#[doc = "              \"minimum\": 0.0"]
1535#[doc = "            },"]
1536#[doc = "            \"delegate_nonce\": {"]
1537#[doc = "              \"type\": \"integer\","]
1538#[doc = "              \"format\": \"uint64\","]
1539#[doc = "              \"minimum\": 0.0"]
1540#[doc = "            }"]
1541#[doc = "          }"]
1542#[doc = "        }"]
1543#[doc = "      },"]
1544#[doc = "      \"additionalProperties\": false"]
1545#[doc = "    },"]
1546#[doc = "    {"]
1547#[doc = "      \"description\": \"DelegateAction nonce is larger than the upper bound given by the block height\","]
1548#[doc = "      \"type\": \"object\","]
1549#[doc = "      \"required\": ["]
1550#[doc = "        \"DelegateActionNonceTooLarge\""]
1551#[doc = "      ],"]
1552#[doc = "      \"properties\": {"]
1553#[doc = "        \"DelegateActionNonceTooLarge\": {"]
1554#[doc = "          \"type\": \"object\","]
1555#[doc = "          \"required\": ["]
1556#[doc = "            \"delegate_nonce\","]
1557#[doc = "            \"upper_bound\""]
1558#[doc = "          ],"]
1559#[doc = "          \"properties\": {"]
1560#[doc = "            \"delegate_nonce\": {"]
1561#[doc = "              \"type\": \"integer\","]
1562#[doc = "              \"format\": \"uint64\","]
1563#[doc = "              \"minimum\": 0.0"]
1564#[doc = "            },"]
1565#[doc = "            \"upper_bound\": {"]
1566#[doc = "              \"type\": \"integer\","]
1567#[doc = "              \"format\": \"uint64\","]
1568#[doc = "              \"minimum\": 0.0"]
1569#[doc = "            }"]
1570#[doc = "          }"]
1571#[doc = "        }"]
1572#[doc = "      },"]
1573#[doc = "      \"additionalProperties\": false"]
1574#[doc = "    },"]
1575#[doc = "    {"]
1576#[doc = "      \"type\": \"object\","]
1577#[doc = "      \"required\": ["]
1578#[doc = "        \"GlobalContractDoesNotExist\""]
1579#[doc = "      ],"]
1580#[doc = "      \"properties\": {"]
1581#[doc = "        \"GlobalContractDoesNotExist\": {"]
1582#[doc = "          \"type\": \"object\","]
1583#[doc = "          \"required\": ["]
1584#[doc = "            \"identifier\""]
1585#[doc = "          ],"]
1586#[doc = "          \"properties\": {"]
1587#[doc = "            \"identifier\": {"]
1588#[doc = "              \"$ref\": \"#/components/schemas/GlobalContractIdentifier\""]
1589#[doc = "            }"]
1590#[doc = "          }"]
1591#[doc = "        }"]
1592#[doc = "      },"]
1593#[doc = "      \"additionalProperties\": false"]
1594#[doc = "    }"]
1595#[doc = "  ]"]
1596#[doc = "}"]
1597#[doc = r" ```"]
1598#[doc = r" </details>"]
1599#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
1600pub enum ActionErrorKind {
1601    #[doc = "Happens when CreateAccount action tries to create an account with account_id which is already exists in the storage"]
1602    AccountAlreadyExists { account_id: AccountId },
1603    #[doc = "Happens when TX receiver_id doesn't exist (but action is not Action::CreateAccount)"]
1604    AccountDoesNotExist { account_id: AccountId },
1605    #[doc = "A top-level account ID can only be created by registrar."]
1606    CreateAccountOnlyByRegistrar {
1607        account_id: AccountId,
1608        predecessor_id: AccountId,
1609        registrar_account_id: AccountId,
1610    },
1611    #[doc = "A newly created account must be under a namespace of the creator account"]
1612    CreateAccountNotAllowed {
1613        account_id: AccountId,
1614        predecessor_id: AccountId,
1615    },
1616    #[doc = "Administrative actions like `DeployContract`, `Stake`, `AddKey`, `DeleteKey`. can be proceed only if sender=receiver\nor the first TX action is a `CreateAccount` action"]
1617    ActorNoPermission {
1618        account_id: AccountId,
1619        actor_id: AccountId,
1620    },
1621    #[doc = "Account tries to remove an access key that doesn't exist"]
1622    DeleteKeyDoesNotExist {
1623        account_id: AccountId,
1624        public_key: PublicKey,
1625    },
1626    #[doc = "The public key is already used for an existing access key"]
1627    AddKeyAlreadyExists {
1628        account_id: AccountId,
1629        public_key: PublicKey,
1630    },
1631    #[doc = "Account is staking and can not be deleted"]
1632    DeleteAccountStaking { account_id: AccountId },
1633    #[doc = "ActionReceipt can't be completed, because the remaining balance will not be enough to cover storage."]
1634    LackBalanceForState {
1635        #[doc = "An account which needs balance"]
1636        account_id: AccountId,
1637        #[doc = "Balance required to complete an action."]
1638        amount: NearToken,
1639    },
1640    #[doc = "Account is not yet staked, but tries to unstake"]
1641    TriesToUnstake { account_id: AccountId },
1642    #[doc = "The account doesn't have enough balance to increase the stake."]
1643    TriesToStake {
1644        account_id: AccountId,
1645        balance: NearToken,
1646        locked: NearToken,
1647        stake: NearToken,
1648    },
1649    InsufficientStake {
1650        account_id: AccountId,
1651        minimum_stake: NearToken,
1652        stake: NearToken,
1653    },
1654    #[doc = "An error occurred during a `FunctionCall` Action, parameter is debug message."]
1655    FunctionCallError(FunctionCallError),
1656    #[doc = "Error occurs when a new `ActionReceipt` created by the `FunctionCall` action fails\nreceipt validation."]
1657    NewReceiptValidationError(ReceiptValidationError),
1658    #[doc = "Error occurs when a `CreateAccount` action is called on a NEAR-implicit or ETH-implicit account.\nSee NEAR-implicit account creation NEP: <https://github.com/nearprotocol/NEPs/pull/71>.\nAlso, see ETH-implicit account creation NEP: <https://github.com/near/NEPs/issues/518>.\n\nTODO(#8598): This error is named very poorly. A better name would be\n`OnlyNamedAccountCreationAllowed`."]
1659    OnlyImplicitAccountCreationAllowed { account_id: AccountId },
1660    #[doc = "Delete account whose state is large is temporarily banned."]
1661    DeleteAccountWithLargeState { account_id: AccountId },
1662    #[doc = "Signature does not match the provided actions and given signer public key."]
1663    DelegateActionInvalidSignature,
1664    #[doc = "Receiver of the transaction doesn't match Sender of the delegate action"]
1665    DelegateActionSenderDoesNotMatchTxReceiver {
1666        receiver_id: AccountId,
1667        sender_id: AccountId,
1668    },
1669    #[doc = "Delegate action has expired. `max_block_height` is less than actual block height."]
1670    DelegateActionExpired,
1671    #[doc = "The given public key doesn't exist for Sender account"]
1672    DelegateActionAccessKeyError(InvalidAccessKeyError),
1673    #[doc = "DelegateAction nonce must be greater sender[public_key].nonce"]
1674    DelegateActionInvalidNonce { ak_nonce: u64, delegate_nonce: u64 },
1675    #[doc = "DelegateAction nonce is larger than the upper bound given by the block height"]
1676    DelegateActionNonceTooLarge {
1677        delegate_nonce: u64,
1678        upper_bound: u64,
1679    },
1680    GlobalContractDoesNotExist {
1681        identifier: GlobalContractIdentifier,
1682    },
1683}
1684impl ::std::convert::From<&Self> for ActionErrorKind {
1685    fn from(value: &ActionErrorKind) -> Self {
1686        value.clone()
1687    }
1688}
1689impl ::std::convert::From<FunctionCallError> for ActionErrorKind {
1690    fn from(value: FunctionCallError) -> Self {
1691        Self::FunctionCallError(value)
1692    }
1693}
1694impl ::std::convert::From<ReceiptValidationError> for ActionErrorKind {
1695    fn from(value: ReceiptValidationError) -> Self {
1696        Self::NewReceiptValidationError(value)
1697    }
1698}
1699impl ::std::convert::From<InvalidAccessKeyError> for ActionErrorKind {
1700    fn from(value: InvalidAccessKeyError) -> Self {
1701        Self::DelegateActionAccessKeyError(value)
1702    }
1703}
1704#[doc = "`ActionView`"]
1705#[doc = r""]
1706#[doc = r" <details><summary>JSON schema</summary>"]
1707#[doc = r""]
1708#[doc = r" ```json"]
1709#[doc = "{"]
1710#[doc = "  \"oneOf\": ["]
1711#[doc = "    {"]
1712#[doc = "      \"type\": \"string\","]
1713#[doc = "      \"enum\": ["]
1714#[doc = "        \"CreateAccount\""]
1715#[doc = "      ]"]
1716#[doc = "    },"]
1717#[doc = "    {"]
1718#[doc = "      \"type\": \"object\","]
1719#[doc = "      \"required\": ["]
1720#[doc = "        \"DeployContract\""]
1721#[doc = "      ],"]
1722#[doc = "      \"properties\": {"]
1723#[doc = "        \"DeployContract\": {"]
1724#[doc = "          \"type\": \"object\","]
1725#[doc = "          \"required\": ["]
1726#[doc = "            \"code\""]
1727#[doc = "          ],"]
1728#[doc = "          \"properties\": {"]
1729#[doc = "            \"code\": {"]
1730#[doc = "              \"type\": \"string\","]
1731#[doc = "              \"format\": \"bytes\""]
1732#[doc = "            }"]
1733#[doc = "          }"]
1734#[doc = "        }"]
1735#[doc = "      },"]
1736#[doc = "      \"additionalProperties\": false"]
1737#[doc = "    },"]
1738#[doc = "    {"]
1739#[doc = "      \"type\": \"object\","]
1740#[doc = "      \"required\": ["]
1741#[doc = "        \"FunctionCall\""]
1742#[doc = "      ],"]
1743#[doc = "      \"properties\": {"]
1744#[doc = "        \"FunctionCall\": {"]
1745#[doc = "          \"type\": \"object\","]
1746#[doc = "          \"required\": ["]
1747#[doc = "            \"args\","]
1748#[doc = "            \"deposit\","]
1749#[doc = "            \"gas\","]
1750#[doc = "            \"method_name\""]
1751#[doc = "          ],"]
1752#[doc = "          \"properties\": {"]
1753#[doc = "            \"args\": {"]
1754#[doc = "              \"$ref\": \"#/components/schemas/FunctionArgs\""]
1755#[doc = "            },"]
1756#[doc = "            \"deposit\": {"]
1757#[doc = "              \"$ref\": \"#/components/schemas/NearToken\""]
1758#[doc = "            },"]
1759#[doc = "            \"gas\": {"]
1760#[doc = "              \"$ref\": \"#/components/schemas/NearGas\""]
1761#[doc = "            },"]
1762#[doc = "            \"method_name\": {"]
1763#[doc = "              \"type\": \"string\""]
1764#[doc = "            }"]
1765#[doc = "          }"]
1766#[doc = "        }"]
1767#[doc = "      },"]
1768#[doc = "      \"additionalProperties\": false"]
1769#[doc = "    },"]
1770#[doc = "    {"]
1771#[doc = "      \"type\": \"object\","]
1772#[doc = "      \"required\": ["]
1773#[doc = "        \"Transfer\""]
1774#[doc = "      ],"]
1775#[doc = "      \"properties\": {"]
1776#[doc = "        \"Transfer\": {"]
1777#[doc = "          \"type\": \"object\","]
1778#[doc = "          \"required\": ["]
1779#[doc = "            \"deposit\""]
1780#[doc = "          ],"]
1781#[doc = "          \"properties\": {"]
1782#[doc = "            \"deposit\": {"]
1783#[doc = "              \"$ref\": \"#/components/schemas/NearToken\""]
1784#[doc = "            }"]
1785#[doc = "          }"]
1786#[doc = "        }"]
1787#[doc = "      },"]
1788#[doc = "      \"additionalProperties\": false"]
1789#[doc = "    },"]
1790#[doc = "    {"]
1791#[doc = "      \"type\": \"object\","]
1792#[doc = "      \"required\": ["]
1793#[doc = "        \"Stake\""]
1794#[doc = "      ],"]
1795#[doc = "      \"properties\": {"]
1796#[doc = "        \"Stake\": {"]
1797#[doc = "          \"type\": \"object\","]
1798#[doc = "          \"required\": ["]
1799#[doc = "            \"public_key\","]
1800#[doc = "            \"stake\""]
1801#[doc = "          ],"]
1802#[doc = "          \"properties\": {"]
1803#[doc = "            \"public_key\": {"]
1804#[doc = "              \"$ref\": \"#/components/schemas/PublicKey\""]
1805#[doc = "            },"]
1806#[doc = "            \"stake\": {"]
1807#[doc = "              \"$ref\": \"#/components/schemas/NearToken\""]
1808#[doc = "            }"]
1809#[doc = "          }"]
1810#[doc = "        }"]
1811#[doc = "      },"]
1812#[doc = "      \"additionalProperties\": false"]
1813#[doc = "    },"]
1814#[doc = "    {"]
1815#[doc = "      \"type\": \"object\","]
1816#[doc = "      \"required\": ["]
1817#[doc = "        \"AddKey\""]
1818#[doc = "      ],"]
1819#[doc = "      \"properties\": {"]
1820#[doc = "        \"AddKey\": {"]
1821#[doc = "          \"type\": \"object\","]
1822#[doc = "          \"required\": ["]
1823#[doc = "            \"access_key\","]
1824#[doc = "            \"public_key\""]
1825#[doc = "          ],"]
1826#[doc = "          \"properties\": {"]
1827#[doc = "            \"access_key\": {"]
1828#[doc = "              \"$ref\": \"#/components/schemas/AccessKeyView\""]
1829#[doc = "            },"]
1830#[doc = "            \"public_key\": {"]
1831#[doc = "              \"$ref\": \"#/components/schemas/PublicKey\""]
1832#[doc = "            }"]
1833#[doc = "          }"]
1834#[doc = "        }"]
1835#[doc = "      },"]
1836#[doc = "      \"additionalProperties\": false"]
1837#[doc = "    },"]
1838#[doc = "    {"]
1839#[doc = "      \"type\": \"object\","]
1840#[doc = "      \"required\": ["]
1841#[doc = "        \"DeleteKey\""]
1842#[doc = "      ],"]
1843#[doc = "      \"properties\": {"]
1844#[doc = "        \"DeleteKey\": {"]
1845#[doc = "          \"type\": \"object\","]
1846#[doc = "          \"required\": ["]
1847#[doc = "            \"public_key\""]
1848#[doc = "          ],"]
1849#[doc = "          \"properties\": {"]
1850#[doc = "            \"public_key\": {"]
1851#[doc = "              \"$ref\": \"#/components/schemas/PublicKey\""]
1852#[doc = "            }"]
1853#[doc = "          }"]
1854#[doc = "        }"]
1855#[doc = "      },"]
1856#[doc = "      \"additionalProperties\": false"]
1857#[doc = "    },"]
1858#[doc = "    {"]
1859#[doc = "      \"type\": \"object\","]
1860#[doc = "      \"required\": ["]
1861#[doc = "        \"DeleteAccount\""]
1862#[doc = "      ],"]
1863#[doc = "      \"properties\": {"]
1864#[doc = "        \"DeleteAccount\": {"]
1865#[doc = "          \"type\": \"object\","]
1866#[doc = "          \"required\": ["]
1867#[doc = "            \"beneficiary_id\""]
1868#[doc = "          ],"]
1869#[doc = "          \"properties\": {"]
1870#[doc = "            \"beneficiary_id\": {"]
1871#[doc = "              \"$ref\": \"#/components/schemas/AccountId\""]
1872#[doc = "            }"]
1873#[doc = "          }"]
1874#[doc = "        }"]
1875#[doc = "      },"]
1876#[doc = "      \"additionalProperties\": false"]
1877#[doc = "    },"]
1878#[doc = "    {"]
1879#[doc = "      \"type\": \"object\","]
1880#[doc = "      \"required\": ["]
1881#[doc = "        \"Delegate\""]
1882#[doc = "      ],"]
1883#[doc = "      \"properties\": {"]
1884#[doc = "        \"Delegate\": {"]
1885#[doc = "          \"type\": \"object\","]
1886#[doc = "          \"required\": ["]
1887#[doc = "            \"delegate_action\","]
1888#[doc = "            \"signature\""]
1889#[doc = "          ],"]
1890#[doc = "          \"properties\": {"]
1891#[doc = "            \"delegate_action\": {"]
1892#[doc = "              \"$ref\": \"#/components/schemas/DelegateAction\""]
1893#[doc = "            },"]
1894#[doc = "            \"signature\": {"]
1895#[doc = "              \"$ref\": \"#/components/schemas/Signature\""]
1896#[doc = "            }"]
1897#[doc = "          }"]
1898#[doc = "        }"]
1899#[doc = "      },"]
1900#[doc = "      \"additionalProperties\": false"]
1901#[doc = "    },"]
1902#[doc = "    {"]
1903#[doc = "      \"type\": \"object\","]
1904#[doc = "      \"required\": ["]
1905#[doc = "        \"DeployGlobalContract\""]
1906#[doc = "      ],"]
1907#[doc = "      \"properties\": {"]
1908#[doc = "        \"DeployGlobalContract\": {"]
1909#[doc = "          \"type\": \"object\","]
1910#[doc = "          \"required\": ["]
1911#[doc = "            \"code\""]
1912#[doc = "          ],"]
1913#[doc = "          \"properties\": {"]
1914#[doc = "            \"code\": {"]
1915#[doc = "              \"type\": \"string\","]
1916#[doc = "              \"format\": \"bytes\""]
1917#[doc = "            }"]
1918#[doc = "          }"]
1919#[doc = "        }"]
1920#[doc = "      },"]
1921#[doc = "      \"additionalProperties\": false"]
1922#[doc = "    },"]
1923#[doc = "    {"]
1924#[doc = "      \"type\": \"object\","]
1925#[doc = "      \"required\": ["]
1926#[doc = "        \"DeployGlobalContractByAccountId\""]
1927#[doc = "      ],"]
1928#[doc = "      \"properties\": {"]
1929#[doc = "        \"DeployGlobalContractByAccountId\": {"]
1930#[doc = "          \"type\": \"object\","]
1931#[doc = "          \"required\": ["]
1932#[doc = "            \"code\""]
1933#[doc = "          ],"]
1934#[doc = "          \"properties\": {"]
1935#[doc = "            \"code\": {"]
1936#[doc = "              \"type\": \"string\","]
1937#[doc = "              \"format\": \"bytes\""]
1938#[doc = "            }"]
1939#[doc = "          }"]
1940#[doc = "        }"]
1941#[doc = "      },"]
1942#[doc = "      \"additionalProperties\": false"]
1943#[doc = "    },"]
1944#[doc = "    {"]
1945#[doc = "      \"type\": \"object\","]
1946#[doc = "      \"required\": ["]
1947#[doc = "        \"UseGlobalContract\""]
1948#[doc = "      ],"]
1949#[doc = "      \"properties\": {"]
1950#[doc = "        \"UseGlobalContract\": {"]
1951#[doc = "          \"type\": \"object\","]
1952#[doc = "          \"required\": ["]
1953#[doc = "            \"code_hash\""]
1954#[doc = "          ],"]
1955#[doc = "          \"properties\": {"]
1956#[doc = "            \"code_hash\": {"]
1957#[doc = "              \"$ref\": \"#/components/schemas/CryptoHash\""]
1958#[doc = "            }"]
1959#[doc = "          }"]
1960#[doc = "        }"]
1961#[doc = "      },"]
1962#[doc = "      \"additionalProperties\": false"]
1963#[doc = "    },"]
1964#[doc = "    {"]
1965#[doc = "      \"type\": \"object\","]
1966#[doc = "      \"required\": ["]
1967#[doc = "        \"UseGlobalContractByAccountId\""]
1968#[doc = "      ],"]
1969#[doc = "      \"properties\": {"]
1970#[doc = "        \"UseGlobalContractByAccountId\": {"]
1971#[doc = "          \"type\": \"object\","]
1972#[doc = "          \"required\": ["]
1973#[doc = "            \"account_id\""]
1974#[doc = "          ],"]
1975#[doc = "          \"properties\": {"]
1976#[doc = "            \"account_id\": {"]
1977#[doc = "              \"$ref\": \"#/components/schemas/AccountId\""]
1978#[doc = "            }"]
1979#[doc = "          }"]
1980#[doc = "        }"]
1981#[doc = "      },"]
1982#[doc = "      \"additionalProperties\": false"]
1983#[doc = "    },"]
1984#[doc = "    {"]
1985#[doc = "      \"type\": \"object\","]
1986#[doc = "      \"required\": ["]
1987#[doc = "        \"DeterministicStateInit\""]
1988#[doc = "      ],"]
1989#[doc = "      \"properties\": {"]
1990#[doc = "        \"DeterministicStateInit\": {"]
1991#[doc = "          \"type\": \"object\","]
1992#[doc = "          \"required\": ["]
1993#[doc = "            \"code\","]
1994#[doc = "            \"data\","]
1995#[doc = "            \"deposit\""]
1996#[doc = "          ],"]
1997#[doc = "          \"properties\": {"]
1998#[doc = "            \"code\": {"]
1999#[doc = "              \"$ref\": \"#/components/schemas/GlobalContractIdentifierView\""]
2000#[doc = "            },"]
2001#[doc = "            \"data\": {"]
2002#[doc = "              \"type\": \"object\","]
2003#[doc = "              \"additionalProperties\": {"]
2004#[doc = "                \"type\": \"string\""]
2005#[doc = "              }"]
2006#[doc = "            },"]
2007#[doc = "            \"deposit\": {"]
2008#[doc = "              \"$ref\": \"#/components/schemas/NearToken\""]
2009#[doc = "            }"]
2010#[doc = "          }"]
2011#[doc = "        }"]
2012#[doc = "      },"]
2013#[doc = "      \"additionalProperties\": false"]
2014#[doc = "    }"]
2015#[doc = "  ]"]
2016#[doc = "}"]
2017#[doc = r" ```"]
2018#[doc = r" </details>"]
2019#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
2020pub enum ActionView {
2021    CreateAccount,
2022    DeployContract {
2023        code: ::std::string::String,
2024    },
2025    FunctionCall {
2026        args: FunctionArgs,
2027        deposit: NearToken,
2028        gas: NearGas,
2029        method_name: ::std::string::String,
2030    },
2031    Transfer {
2032        deposit: NearToken,
2033    },
2034    Stake {
2035        public_key: PublicKey,
2036        stake: NearToken,
2037    },
2038    AddKey {
2039        access_key: AccessKeyView,
2040        public_key: PublicKey,
2041    },
2042    DeleteKey {
2043        public_key: PublicKey,
2044    },
2045    DeleteAccount {
2046        beneficiary_id: AccountId,
2047    },
2048    Delegate {
2049        delegate_action: DelegateAction,
2050        signature: Signature,
2051    },
2052    DeployGlobalContract {
2053        code: ::std::string::String,
2054    },
2055    DeployGlobalContractByAccountId {
2056        code: ::std::string::String,
2057    },
2058    UseGlobalContract {
2059        code_hash: CryptoHash,
2060    },
2061    UseGlobalContractByAccountId {
2062        account_id: AccountId,
2063    },
2064    DeterministicStateInit {
2065        code: GlobalContractIdentifierView,
2066        data: ::std::collections::HashMap<::std::string::String, ::std::string::String>,
2067        deposit: NearToken,
2068    },
2069}
2070impl ::std::convert::From<&Self> for ActionView {
2071    fn from(value: &ActionView) -> Self {
2072        value.clone()
2073    }
2074}
2075#[doc = "Describes the error for validating a list of actions."]
2076#[doc = r""]
2077#[doc = r" <details><summary>JSON schema</summary>"]
2078#[doc = r""]
2079#[doc = r" ```json"]
2080#[doc = "{"]
2081#[doc = "  \"description\": \"Describes the error for validating a list of actions.\","]
2082#[doc = "  \"oneOf\": ["]
2083#[doc = "    {"]
2084#[doc = "      \"description\": \"The delete action must be a final action in transaction\","]
2085#[doc = "      \"type\": \"string\","]
2086#[doc = "      \"enum\": ["]
2087#[doc = "        \"DeleteActionMustBeFinal\""]
2088#[doc = "      ]"]
2089#[doc = "    },"]
2090#[doc = "    {"]
2091#[doc = "      \"description\": \"The total prepaid gas (for all given actions) exceeded the limit.\","]
2092#[doc = "      \"type\": \"object\","]
2093#[doc = "      \"required\": ["]
2094#[doc = "        \"TotalPrepaidGasExceeded\""]
2095#[doc = "      ],"]
2096#[doc = "      \"properties\": {"]
2097#[doc = "        \"TotalPrepaidGasExceeded\": {"]
2098#[doc = "          \"type\": \"object\","]
2099#[doc = "          \"required\": ["]
2100#[doc = "            \"limit\","]
2101#[doc = "            \"total_prepaid_gas\""]
2102#[doc = "          ],"]
2103#[doc = "          \"properties\": {"]
2104#[doc = "            \"limit\": {"]
2105#[doc = "              \"$ref\": \"#/components/schemas/NearGas\""]
2106#[doc = "            },"]
2107#[doc = "            \"total_prepaid_gas\": {"]
2108#[doc = "              \"$ref\": \"#/components/schemas/NearGas\""]
2109#[doc = "            }"]
2110#[doc = "          }"]
2111#[doc = "        }"]
2112#[doc = "      },"]
2113#[doc = "      \"additionalProperties\": false"]
2114#[doc = "    },"]
2115#[doc = "    {"]
2116#[doc = "      \"description\": \"The number of actions exceeded the given limit.\","]
2117#[doc = "      \"type\": \"object\","]
2118#[doc = "      \"required\": ["]
2119#[doc = "        \"TotalNumberOfActionsExceeded\""]
2120#[doc = "      ],"]
2121#[doc = "      \"properties\": {"]
2122#[doc = "        \"TotalNumberOfActionsExceeded\": {"]
2123#[doc = "          \"type\": \"object\","]
2124#[doc = "          \"required\": ["]
2125#[doc = "            \"limit\","]
2126#[doc = "            \"total_number_of_actions\""]
2127#[doc = "          ],"]
2128#[doc = "          \"properties\": {"]
2129#[doc = "            \"limit\": {"]
2130#[doc = "              \"type\": \"integer\","]
2131#[doc = "              \"format\": \"uint64\","]
2132#[doc = "              \"minimum\": 0.0"]
2133#[doc = "            },"]
2134#[doc = "            \"total_number_of_actions\": {"]
2135#[doc = "              \"type\": \"integer\","]
2136#[doc = "              \"format\": \"uint64\","]
2137#[doc = "              \"minimum\": 0.0"]
2138#[doc = "            }"]
2139#[doc = "          }"]
2140#[doc = "        }"]
2141#[doc = "      },"]
2142#[doc = "      \"additionalProperties\": false"]
2143#[doc = "    },"]
2144#[doc = "    {"]
2145#[doc = "      \"description\": \"The total number of bytes of the method names exceeded the limit in a Add Key action.\","]
2146#[doc = "      \"type\": \"object\","]
2147#[doc = "      \"required\": ["]
2148#[doc = "        \"AddKeyMethodNamesNumberOfBytesExceeded\""]
2149#[doc = "      ],"]
2150#[doc = "      \"properties\": {"]
2151#[doc = "        \"AddKeyMethodNamesNumberOfBytesExceeded\": {"]
2152#[doc = "          \"type\": \"object\","]
2153#[doc = "          \"required\": ["]
2154#[doc = "            \"limit\","]
2155#[doc = "            \"total_number_of_bytes\""]
2156#[doc = "          ],"]
2157#[doc = "          \"properties\": {"]
2158#[doc = "            \"limit\": {"]
2159#[doc = "              \"type\": \"integer\","]
2160#[doc = "              \"format\": \"uint64\","]
2161#[doc = "              \"minimum\": 0.0"]
2162#[doc = "            },"]
2163#[doc = "            \"total_number_of_bytes\": {"]
2164#[doc = "              \"type\": \"integer\","]
2165#[doc = "              \"format\": \"uint64\","]
2166#[doc = "              \"minimum\": 0.0"]
2167#[doc = "            }"]
2168#[doc = "          }"]
2169#[doc = "        }"]
2170#[doc = "      },"]
2171#[doc = "      \"additionalProperties\": false"]
2172#[doc = "    },"]
2173#[doc = "    {"]
2174#[doc = "      \"description\": \"The length of some method name exceeded the limit in a Add Key action.\","]
2175#[doc = "      \"type\": \"object\","]
2176#[doc = "      \"required\": ["]
2177#[doc = "        \"AddKeyMethodNameLengthExceeded\""]
2178#[doc = "      ],"]
2179#[doc = "      \"properties\": {"]
2180#[doc = "        \"AddKeyMethodNameLengthExceeded\": {"]
2181#[doc = "          \"type\": \"object\","]
2182#[doc = "          \"required\": ["]
2183#[doc = "            \"length\","]
2184#[doc = "            \"limit\""]
2185#[doc = "          ],"]
2186#[doc = "          \"properties\": {"]
2187#[doc = "            \"length\": {"]
2188#[doc = "              \"type\": \"integer\","]
2189#[doc = "              \"format\": \"uint64\","]
2190#[doc = "              \"minimum\": 0.0"]
2191#[doc = "            },"]
2192#[doc = "            \"limit\": {"]
2193#[doc = "              \"type\": \"integer\","]
2194#[doc = "              \"format\": \"uint64\","]
2195#[doc = "              \"minimum\": 0.0"]
2196#[doc = "            }"]
2197#[doc = "          }"]
2198#[doc = "        }"]
2199#[doc = "      },"]
2200#[doc = "      \"additionalProperties\": false"]
2201#[doc = "    },"]
2202#[doc = "    {"]
2203#[doc = "      \"description\": \"Integer overflow during a compute.\","]
2204#[doc = "      \"type\": \"string\","]
2205#[doc = "      \"enum\": ["]
2206#[doc = "        \"IntegerOverflow\""]
2207#[doc = "      ]"]
2208#[doc = "    },"]
2209#[doc = "    {"]
2210#[doc = "      \"description\": \"Invalid account ID.\","]
2211#[doc = "      \"type\": \"object\","]
2212#[doc = "      \"required\": ["]
2213#[doc = "        \"InvalidAccountId\""]
2214#[doc = "      ],"]
2215#[doc = "      \"properties\": {"]
2216#[doc = "        \"InvalidAccountId\": {"]
2217#[doc = "          \"type\": \"object\","]
2218#[doc = "          \"required\": ["]
2219#[doc = "            \"account_id\""]
2220#[doc = "          ],"]
2221#[doc = "          \"properties\": {"]
2222#[doc = "            \"account_id\": {"]
2223#[doc = "              \"type\": \"string\""]
2224#[doc = "            }"]
2225#[doc = "          }"]
2226#[doc = "        }"]
2227#[doc = "      },"]
2228#[doc = "      \"additionalProperties\": false"]
2229#[doc = "    },"]
2230#[doc = "    {"]
2231#[doc = "      \"description\": \"The size of the contract code exceeded the limit in a DeployContract action.\","]
2232#[doc = "      \"type\": \"object\","]
2233#[doc = "      \"required\": ["]
2234#[doc = "        \"ContractSizeExceeded\""]
2235#[doc = "      ],"]
2236#[doc = "      \"properties\": {"]
2237#[doc = "        \"ContractSizeExceeded\": {"]
2238#[doc = "          \"type\": \"object\","]
2239#[doc = "          \"required\": ["]
2240#[doc = "            \"limit\","]
2241#[doc = "            \"size\""]
2242#[doc = "          ],"]
2243#[doc = "          \"properties\": {"]
2244#[doc = "            \"limit\": {"]
2245#[doc = "              \"type\": \"integer\","]
2246#[doc = "              \"format\": \"uint64\","]
2247#[doc = "              \"minimum\": 0.0"]
2248#[doc = "            },"]
2249#[doc = "            \"size\": {"]
2250#[doc = "              \"type\": \"integer\","]
2251#[doc = "              \"format\": \"uint64\","]
2252#[doc = "              \"minimum\": 0.0"]
2253#[doc = "            }"]
2254#[doc = "          }"]
2255#[doc = "        }"]
2256#[doc = "      },"]
2257#[doc = "      \"additionalProperties\": false"]
2258#[doc = "    },"]
2259#[doc = "    {"]
2260#[doc = "      \"description\": \"The length of the method name exceeded the limit in a Function Call action.\","]
2261#[doc = "      \"type\": \"object\","]
2262#[doc = "      \"required\": ["]
2263#[doc = "        \"FunctionCallMethodNameLengthExceeded\""]
2264#[doc = "      ],"]
2265#[doc = "      \"properties\": {"]
2266#[doc = "        \"FunctionCallMethodNameLengthExceeded\": {"]
2267#[doc = "          \"type\": \"object\","]
2268#[doc = "          \"required\": ["]
2269#[doc = "            \"length\","]
2270#[doc = "            \"limit\""]
2271#[doc = "          ],"]
2272#[doc = "          \"properties\": {"]
2273#[doc = "            \"length\": {"]
2274#[doc = "              \"type\": \"integer\","]
2275#[doc = "              \"format\": \"uint64\","]
2276#[doc = "              \"minimum\": 0.0"]
2277#[doc = "            },"]
2278#[doc = "            \"limit\": {"]
2279#[doc = "              \"type\": \"integer\","]
2280#[doc = "              \"format\": \"uint64\","]
2281#[doc = "              \"minimum\": 0.0"]
2282#[doc = "            }"]
2283#[doc = "          }"]
2284#[doc = "        }"]
2285#[doc = "      },"]
2286#[doc = "      \"additionalProperties\": false"]
2287#[doc = "    },"]
2288#[doc = "    {"]
2289#[doc = "      \"description\": \"The length of the arguments exceeded the limit in a Function Call action.\","]
2290#[doc = "      \"type\": \"object\","]
2291#[doc = "      \"required\": ["]
2292#[doc = "        \"FunctionCallArgumentsLengthExceeded\""]
2293#[doc = "      ],"]
2294#[doc = "      \"properties\": {"]
2295#[doc = "        \"FunctionCallArgumentsLengthExceeded\": {"]
2296#[doc = "          \"type\": \"object\","]
2297#[doc = "          \"required\": ["]
2298#[doc = "            \"length\","]
2299#[doc = "            \"limit\""]
2300#[doc = "          ],"]
2301#[doc = "          \"properties\": {"]
2302#[doc = "            \"length\": {"]
2303#[doc = "              \"type\": \"integer\","]
2304#[doc = "              \"format\": \"uint64\","]
2305#[doc = "              \"minimum\": 0.0"]
2306#[doc = "            },"]
2307#[doc = "            \"limit\": {"]
2308#[doc = "              \"type\": \"integer\","]
2309#[doc = "              \"format\": \"uint64\","]
2310#[doc = "              \"minimum\": 0.0"]
2311#[doc = "            }"]
2312#[doc = "          }"]
2313#[doc = "        }"]
2314#[doc = "      },"]
2315#[doc = "      \"additionalProperties\": false"]
2316#[doc = "    },"]
2317#[doc = "    {"]
2318#[doc = "      \"description\": \"An attempt to stake with a public key that is not convertible to ristretto.\","]
2319#[doc = "      \"type\": \"object\","]
2320#[doc = "      \"required\": ["]
2321#[doc = "        \"UnsuitableStakingKey\""]
2322#[doc = "      ],"]
2323#[doc = "      \"properties\": {"]
2324#[doc = "        \"UnsuitableStakingKey\": {"]
2325#[doc = "          \"type\": \"object\","]
2326#[doc = "          \"required\": ["]
2327#[doc = "            \"public_key\""]
2328#[doc = "          ],"]
2329#[doc = "          \"properties\": {"]
2330#[doc = "            \"public_key\": {"]
2331#[doc = "              \"$ref\": \"#/components/schemas/PublicKey\""]
2332#[doc = "            }"]
2333#[doc = "          }"]
2334#[doc = "        }"]
2335#[doc = "      },"]
2336#[doc = "      \"additionalProperties\": false"]
2337#[doc = "    },"]
2338#[doc = "    {"]
2339#[doc = "      \"description\": \"The attached amount of gas in a FunctionCall action has to be a positive number.\","]
2340#[doc = "      \"type\": \"string\","]
2341#[doc = "      \"enum\": ["]
2342#[doc = "        \"FunctionCallZeroAttachedGas\""]
2343#[doc = "      ]"]
2344#[doc = "    },"]
2345#[doc = "    {"]
2346#[doc = "      \"description\": \"There should be the only one DelegateAction\","]
2347#[doc = "      \"type\": \"string\","]
2348#[doc = "      \"enum\": ["]
2349#[doc = "        \"DelegateActionMustBeOnlyOne\""]
2350#[doc = "      ]"]
2351#[doc = "    },"]
2352#[doc = "    {"]
2353#[doc = "      \"description\": \"The transaction includes a feature that the current protocol version\\ndoes not support.\\n\\nNote: we stringify the protocol feature name instead of using\\n`ProtocolFeature` here because we don't want to leak the internals of\\nthat type into observable borsh serialization.\","]
2354#[doc = "      \"type\": \"object\","]
2355#[doc = "      \"required\": ["]
2356#[doc = "        \"UnsupportedProtocolFeature\""]
2357#[doc = "      ],"]
2358#[doc = "      \"properties\": {"]
2359#[doc = "        \"UnsupportedProtocolFeature\": {"]
2360#[doc = "          \"type\": \"object\","]
2361#[doc = "          \"required\": ["]
2362#[doc = "            \"protocol_feature\","]
2363#[doc = "            \"version\""]
2364#[doc = "          ],"]
2365#[doc = "          \"properties\": {"]
2366#[doc = "            \"protocol_feature\": {"]
2367#[doc = "              \"type\": \"string\""]
2368#[doc = "            },"]
2369#[doc = "            \"version\": {"]
2370#[doc = "              \"type\": \"integer\","]
2371#[doc = "              \"format\": \"uint32\","]
2372#[doc = "              \"minimum\": 0.0"]
2373#[doc = "            }"]
2374#[doc = "          }"]
2375#[doc = "        }"]
2376#[doc = "      },"]
2377#[doc = "      \"additionalProperties\": false"]
2378#[doc = "    },"]
2379#[doc = "    {"]
2380#[doc = "      \"type\": \"object\","]
2381#[doc = "      \"required\": ["]
2382#[doc = "        \"InvalidDeterministicStateInitReceiver\""]
2383#[doc = "      ],"]
2384#[doc = "      \"properties\": {"]
2385#[doc = "        \"InvalidDeterministicStateInitReceiver\": {"]
2386#[doc = "          \"type\": \"object\","]
2387#[doc = "          \"required\": ["]
2388#[doc = "            \"derived_id\","]
2389#[doc = "            \"receiver_id\""]
2390#[doc = "          ],"]
2391#[doc = "          \"properties\": {"]
2392#[doc = "            \"derived_id\": {"]
2393#[doc = "              \"$ref\": \"#/components/schemas/AccountId\""]
2394#[doc = "            },"]
2395#[doc = "            \"receiver_id\": {"]
2396#[doc = "              \"$ref\": \"#/components/schemas/AccountId\""]
2397#[doc = "            }"]
2398#[doc = "          }"]
2399#[doc = "        }"]
2400#[doc = "      },"]
2401#[doc = "      \"additionalProperties\": false"]
2402#[doc = "    },"]
2403#[doc = "    {"]
2404#[doc = "      \"type\": \"object\","]
2405#[doc = "      \"required\": ["]
2406#[doc = "        \"DeterministicStateInitKeyLengthExceeded\""]
2407#[doc = "      ],"]
2408#[doc = "      \"properties\": {"]
2409#[doc = "        \"DeterministicStateInitKeyLengthExceeded\": {"]
2410#[doc = "          \"type\": \"object\","]
2411#[doc = "          \"required\": ["]
2412#[doc = "            \"length\","]
2413#[doc = "            \"limit\""]
2414#[doc = "          ],"]
2415#[doc = "          \"properties\": {"]
2416#[doc = "            \"length\": {"]
2417#[doc = "              \"type\": \"integer\","]
2418#[doc = "              \"format\": \"uint64\","]
2419#[doc = "              \"minimum\": 0.0"]
2420#[doc = "            },"]
2421#[doc = "            \"limit\": {"]
2422#[doc = "              \"type\": \"integer\","]
2423#[doc = "              \"format\": \"uint64\","]
2424#[doc = "              \"minimum\": 0.0"]
2425#[doc = "            }"]
2426#[doc = "          }"]
2427#[doc = "        }"]
2428#[doc = "      },"]
2429#[doc = "      \"additionalProperties\": false"]
2430#[doc = "    },"]
2431#[doc = "    {"]
2432#[doc = "      \"type\": \"object\","]
2433#[doc = "      \"required\": ["]
2434#[doc = "        \"DeterministicStateInitValueLengthExceeded\""]
2435#[doc = "      ],"]
2436#[doc = "      \"properties\": {"]
2437#[doc = "        \"DeterministicStateInitValueLengthExceeded\": {"]
2438#[doc = "          \"type\": \"object\","]
2439#[doc = "          \"required\": ["]
2440#[doc = "            \"length\","]
2441#[doc = "            \"limit\""]
2442#[doc = "          ],"]
2443#[doc = "          \"properties\": {"]
2444#[doc = "            \"length\": {"]
2445#[doc = "              \"type\": \"integer\","]
2446#[doc = "              \"format\": \"uint64\","]
2447#[doc = "              \"minimum\": 0.0"]
2448#[doc = "            },"]
2449#[doc = "            \"limit\": {"]
2450#[doc = "              \"type\": \"integer\","]
2451#[doc = "              \"format\": \"uint64\","]
2452#[doc = "              \"minimum\": 0.0"]
2453#[doc = "            }"]
2454#[doc = "          }"]
2455#[doc = "        }"]
2456#[doc = "      },"]
2457#[doc = "      \"additionalProperties\": false"]
2458#[doc = "    }"]
2459#[doc = "  ]"]
2460#[doc = "}"]
2461#[doc = r" ```"]
2462#[doc = r" </details>"]
2463#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
2464pub enum ActionsValidationError {
2465    #[doc = "The delete action must be a final action in transaction"]
2466    DeleteActionMustBeFinal,
2467    #[doc = "The total prepaid gas (for all given actions) exceeded the limit."]
2468    TotalPrepaidGasExceeded {
2469        limit: NearGas,
2470        total_prepaid_gas: NearGas,
2471    },
2472    #[doc = "The number of actions exceeded the given limit."]
2473    TotalNumberOfActionsExceeded {
2474        limit: u64,
2475        total_number_of_actions: u64,
2476    },
2477    #[doc = "The total number of bytes of the method names exceeded the limit in a Add Key action."]
2478    AddKeyMethodNamesNumberOfBytesExceeded {
2479        limit: u64,
2480        total_number_of_bytes: u64,
2481    },
2482    #[doc = "The length of some method name exceeded the limit in a Add Key action."]
2483    AddKeyMethodNameLengthExceeded {
2484        length: u64,
2485        limit: u64,
2486    },
2487    #[doc = "Integer overflow during a compute."]
2488    IntegerOverflow,
2489    #[doc = "Invalid account ID."]
2490    InvalidAccountId {
2491        account_id: ::std::string::String,
2492    },
2493    #[doc = "The size of the contract code exceeded the limit in a DeployContract action."]
2494    ContractSizeExceeded {
2495        limit: u64,
2496        size: u64,
2497    },
2498    #[doc = "The length of the method name exceeded the limit in a Function Call action."]
2499    FunctionCallMethodNameLengthExceeded {
2500        length: u64,
2501        limit: u64,
2502    },
2503    #[doc = "The length of the arguments exceeded the limit in a Function Call action."]
2504    FunctionCallArgumentsLengthExceeded {
2505        length: u64,
2506        limit: u64,
2507    },
2508    #[doc = "An attempt to stake with a public key that is not convertible to ristretto."]
2509    UnsuitableStakingKey {
2510        public_key: PublicKey,
2511    },
2512    #[doc = "The attached amount of gas in a FunctionCall action has to be a positive number."]
2513    FunctionCallZeroAttachedGas,
2514    #[doc = "There should be the only one DelegateAction"]
2515    DelegateActionMustBeOnlyOne,
2516    #[doc = "The transaction includes a feature that the current protocol version\ndoes not support.\n\nNote: we stringify the protocol feature name instead of using\n`ProtocolFeature` here because we don't want to leak the internals of\nthat type into observable borsh serialization."]
2517    UnsupportedProtocolFeature {
2518        protocol_feature: ::std::string::String,
2519        version: u32,
2520    },
2521    InvalidDeterministicStateInitReceiver {
2522        derived_id: AccountId,
2523        receiver_id: AccountId,
2524    },
2525    DeterministicStateInitKeyLengthExceeded {
2526        length: u64,
2527        limit: u64,
2528    },
2529    DeterministicStateInitValueLengthExceeded {
2530        length: u64,
2531        limit: u64,
2532    },
2533}
2534impl ::std::convert::From<&Self> for ActionsValidationError {
2535    fn from(value: &ActionsValidationError) -> Self {
2536        value.clone()
2537    }
2538}
2539#[doc = "An action that adds key with public key associated"]
2540#[doc = r""]
2541#[doc = r" <details><summary>JSON schema</summary>"]
2542#[doc = r""]
2543#[doc = r" ```json"]
2544#[doc = "{"]
2545#[doc = "  \"description\": \"An action that adds key with public key associated\","]
2546#[doc = "  \"type\": \"object\","]
2547#[doc = "  \"required\": ["]
2548#[doc = "    \"access_key\","]
2549#[doc = "    \"public_key\""]
2550#[doc = "  ],"]
2551#[doc = "  \"properties\": {"]
2552#[doc = "    \"access_key\": {"]
2553#[doc = "      \"description\": \"An access key with the permission\","]
2554#[doc = "      \"allOf\": ["]
2555#[doc = "        {"]
2556#[doc = "          \"$ref\": \"#/components/schemas/AccessKey\""]
2557#[doc = "        }"]
2558#[doc = "      ]"]
2559#[doc = "    },"]
2560#[doc = "    \"public_key\": {"]
2561#[doc = "      \"description\": \"A public key which will be associated with an access_key\","]
2562#[doc = "      \"allOf\": ["]
2563#[doc = "        {"]
2564#[doc = "          \"$ref\": \"#/components/schemas/PublicKey\""]
2565#[doc = "        }"]
2566#[doc = "      ]"]
2567#[doc = "    }"]
2568#[doc = "  }"]
2569#[doc = "}"]
2570#[doc = r" ```"]
2571#[doc = r" </details>"]
2572#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
2573pub struct AddKeyAction {
2574    #[doc = "An access key with the permission"]
2575    pub access_key: AccessKey,
2576    #[doc = "A public key which will be associated with an access_key"]
2577    pub public_key: PublicKey,
2578}
2579impl ::std::convert::From<&AddKeyAction> for AddKeyAction {
2580    fn from(value: &AddKeyAction) -> Self {
2581        value.clone()
2582    }
2583}
2584#[doc = "`AllAccessKeyChangesByBlockIdChangesType`"]
2585#[doc = r""]
2586#[doc = r" <details><summary>JSON schema</summary>"]
2587#[doc = r""]
2588#[doc = r" ```json"]
2589#[doc = "{"]
2590#[doc = "  \"type\": \"string\","]
2591#[doc = "  \"enum\": ["]
2592#[doc = "    \"all_access_key_changes\""]
2593#[doc = "  ]"]
2594#[doc = "}"]
2595#[doc = r" ```"]
2596#[doc = r" </details>"]
2597#[derive(
2598    :: serde :: Deserialize,
2599    :: serde :: Serialize,
2600    Clone,
2601    Copy,
2602    Debug,
2603    Eq,
2604    Hash,
2605    Ord,
2606    PartialEq,
2607    PartialOrd,
2608)]
2609pub enum AllAccessKeyChangesByBlockIdChangesType {
2610    #[serde(rename = "all_access_key_changes")]
2611    AllAccessKeyChanges,
2612}
2613impl ::std::convert::From<&Self> for AllAccessKeyChangesByBlockIdChangesType {
2614    fn from(value: &AllAccessKeyChangesByBlockIdChangesType) -> Self {
2615        value.clone()
2616    }
2617}
2618impl ::std::fmt::Display for AllAccessKeyChangesByBlockIdChangesType {
2619    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
2620        match *self {
2621            Self::AllAccessKeyChanges => f.write_str("all_access_key_changes"),
2622        }
2623    }
2624}
2625impl ::std::str::FromStr for AllAccessKeyChangesByBlockIdChangesType {
2626    type Err = self::error::ConversionError;
2627    fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
2628        match value {
2629            "all_access_key_changes" => Ok(Self::AllAccessKeyChanges),
2630            _ => Err("invalid value".into()),
2631        }
2632    }
2633}
2634impl ::std::convert::TryFrom<&str> for AllAccessKeyChangesByBlockIdChangesType {
2635    type Error = self::error::ConversionError;
2636    fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
2637        value.parse()
2638    }
2639}
2640impl ::std::convert::TryFrom<&::std::string::String> for AllAccessKeyChangesByBlockIdChangesType {
2641    type Error = self::error::ConversionError;
2642    fn try_from(
2643        value: &::std::string::String,
2644    ) -> ::std::result::Result<Self, self::error::ConversionError> {
2645        value.parse()
2646    }
2647}
2648impl ::std::convert::TryFrom<::std::string::String> for AllAccessKeyChangesByBlockIdChangesType {
2649    type Error = self::error::ConversionError;
2650    fn try_from(
2651        value: ::std::string::String,
2652    ) -> ::std::result::Result<Self, self::error::ConversionError> {
2653        value.parse()
2654    }
2655}
2656#[doc = "`AllAccessKeyChangesByFinalityChangesType`"]
2657#[doc = r""]
2658#[doc = r" <details><summary>JSON schema</summary>"]
2659#[doc = r""]
2660#[doc = r" ```json"]
2661#[doc = "{"]
2662#[doc = "  \"type\": \"string\","]
2663#[doc = "  \"enum\": ["]
2664#[doc = "    \"all_access_key_changes\""]
2665#[doc = "  ]"]
2666#[doc = "}"]
2667#[doc = r" ```"]
2668#[doc = r" </details>"]
2669#[derive(
2670    :: serde :: Deserialize,
2671    :: serde :: Serialize,
2672    Clone,
2673    Copy,
2674    Debug,
2675    Eq,
2676    Hash,
2677    Ord,
2678    PartialEq,
2679    PartialOrd,
2680)]
2681pub enum AllAccessKeyChangesByFinalityChangesType {
2682    #[serde(rename = "all_access_key_changes")]
2683    AllAccessKeyChanges,
2684}
2685impl ::std::convert::From<&Self> for AllAccessKeyChangesByFinalityChangesType {
2686    fn from(value: &AllAccessKeyChangesByFinalityChangesType) -> Self {
2687        value.clone()
2688    }
2689}
2690impl ::std::fmt::Display for AllAccessKeyChangesByFinalityChangesType {
2691    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
2692        match *self {
2693            Self::AllAccessKeyChanges => f.write_str("all_access_key_changes"),
2694        }
2695    }
2696}
2697impl ::std::str::FromStr for AllAccessKeyChangesByFinalityChangesType {
2698    type Err = self::error::ConversionError;
2699    fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
2700        match value {
2701            "all_access_key_changes" => Ok(Self::AllAccessKeyChanges),
2702            _ => Err("invalid value".into()),
2703        }
2704    }
2705}
2706impl ::std::convert::TryFrom<&str> for AllAccessKeyChangesByFinalityChangesType {
2707    type Error = self::error::ConversionError;
2708    fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
2709        value.parse()
2710    }
2711}
2712impl ::std::convert::TryFrom<&::std::string::String> for AllAccessKeyChangesByFinalityChangesType {
2713    type Error = self::error::ConversionError;
2714    fn try_from(
2715        value: &::std::string::String,
2716    ) -> ::std::result::Result<Self, self::error::ConversionError> {
2717        value.parse()
2718    }
2719}
2720impl ::std::convert::TryFrom<::std::string::String> for AllAccessKeyChangesByFinalityChangesType {
2721    type Error = self::error::ConversionError;
2722    fn try_from(
2723        value: ::std::string::String,
2724    ) -> ::std::result::Result<Self, self::error::ConversionError> {
2725        value.parse()
2726    }
2727}
2728#[doc = "`AllAccessKeyChangesBySyncCheckpointChangesType`"]
2729#[doc = r""]
2730#[doc = r" <details><summary>JSON schema</summary>"]
2731#[doc = r""]
2732#[doc = r" ```json"]
2733#[doc = "{"]
2734#[doc = "  \"type\": \"string\","]
2735#[doc = "  \"enum\": ["]
2736#[doc = "    \"all_access_key_changes\""]
2737#[doc = "  ]"]
2738#[doc = "}"]
2739#[doc = r" ```"]
2740#[doc = r" </details>"]
2741#[derive(
2742    :: serde :: Deserialize,
2743    :: serde :: Serialize,
2744    Clone,
2745    Copy,
2746    Debug,
2747    Eq,
2748    Hash,
2749    Ord,
2750    PartialEq,
2751    PartialOrd,
2752)]
2753pub enum AllAccessKeyChangesBySyncCheckpointChangesType {
2754    #[serde(rename = "all_access_key_changes")]
2755    AllAccessKeyChanges,
2756}
2757impl ::std::convert::From<&Self> for AllAccessKeyChangesBySyncCheckpointChangesType {
2758    fn from(value: &AllAccessKeyChangesBySyncCheckpointChangesType) -> Self {
2759        value.clone()
2760    }
2761}
2762impl ::std::fmt::Display for AllAccessKeyChangesBySyncCheckpointChangesType {
2763    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
2764        match *self {
2765            Self::AllAccessKeyChanges => f.write_str("all_access_key_changes"),
2766        }
2767    }
2768}
2769impl ::std::str::FromStr for AllAccessKeyChangesBySyncCheckpointChangesType {
2770    type Err = self::error::ConversionError;
2771    fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
2772        match value {
2773            "all_access_key_changes" => Ok(Self::AllAccessKeyChanges),
2774            _ => Err("invalid value".into()),
2775        }
2776    }
2777}
2778impl ::std::convert::TryFrom<&str> for AllAccessKeyChangesBySyncCheckpointChangesType {
2779    type Error = self::error::ConversionError;
2780    fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
2781        value.parse()
2782    }
2783}
2784impl ::std::convert::TryFrom<&::std::string::String>
2785    for AllAccessKeyChangesBySyncCheckpointChangesType
2786{
2787    type Error = self::error::ConversionError;
2788    fn try_from(
2789        value: &::std::string::String,
2790    ) -> ::std::result::Result<Self, self::error::ConversionError> {
2791        value.parse()
2792    }
2793}
2794impl ::std::convert::TryFrom<::std::string::String>
2795    for AllAccessKeyChangesBySyncCheckpointChangesType
2796{
2797    type Error = self::error::ConversionError;
2798    fn try_from(
2799        value: ::std::string::String,
2800    ) -> ::std::result::Result<Self, self::error::ConversionError> {
2801        value.parse()
2802    }
2803}
2804#[doc = "`AllGasKeyChangesByBlockIdChangesType`"]
2805#[doc = r""]
2806#[doc = r" <details><summary>JSON schema</summary>"]
2807#[doc = r""]
2808#[doc = r" ```json"]
2809#[doc = "{"]
2810#[doc = "  \"type\": \"string\","]
2811#[doc = "  \"enum\": ["]
2812#[doc = "    \"all_gas_key_changes\""]
2813#[doc = "  ]"]
2814#[doc = "}"]
2815#[doc = r" ```"]
2816#[doc = r" </details>"]
2817#[derive(
2818    :: serde :: Deserialize,
2819    :: serde :: Serialize,
2820    Clone,
2821    Copy,
2822    Debug,
2823    Eq,
2824    Hash,
2825    Ord,
2826    PartialEq,
2827    PartialOrd,
2828)]
2829pub enum AllGasKeyChangesByBlockIdChangesType {
2830    #[serde(rename = "all_gas_key_changes")]
2831    AllGasKeyChanges,
2832}
2833impl ::std::convert::From<&Self> for AllGasKeyChangesByBlockIdChangesType {
2834    fn from(value: &AllGasKeyChangesByBlockIdChangesType) -> Self {
2835        value.clone()
2836    }
2837}
2838impl ::std::fmt::Display for AllGasKeyChangesByBlockIdChangesType {
2839    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
2840        match *self {
2841            Self::AllGasKeyChanges => f.write_str("all_gas_key_changes"),
2842        }
2843    }
2844}
2845impl ::std::str::FromStr for AllGasKeyChangesByBlockIdChangesType {
2846    type Err = self::error::ConversionError;
2847    fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
2848        match value {
2849            "all_gas_key_changes" => Ok(Self::AllGasKeyChanges),
2850            _ => Err("invalid value".into()),
2851        }
2852    }
2853}
2854impl ::std::convert::TryFrom<&str> for AllGasKeyChangesByBlockIdChangesType {
2855    type Error = self::error::ConversionError;
2856    fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
2857        value.parse()
2858    }
2859}
2860impl ::std::convert::TryFrom<&::std::string::String> for AllGasKeyChangesByBlockIdChangesType {
2861    type Error = self::error::ConversionError;
2862    fn try_from(
2863        value: &::std::string::String,
2864    ) -> ::std::result::Result<Self, self::error::ConversionError> {
2865        value.parse()
2866    }
2867}
2868impl ::std::convert::TryFrom<::std::string::String> for AllGasKeyChangesByBlockIdChangesType {
2869    type Error = self::error::ConversionError;
2870    fn try_from(
2871        value: ::std::string::String,
2872    ) -> ::std::result::Result<Self, self::error::ConversionError> {
2873        value.parse()
2874    }
2875}
2876#[doc = "`AllGasKeyChangesByFinalityChangesType`"]
2877#[doc = r""]
2878#[doc = r" <details><summary>JSON schema</summary>"]
2879#[doc = r""]
2880#[doc = r" ```json"]
2881#[doc = "{"]
2882#[doc = "  \"type\": \"string\","]
2883#[doc = "  \"enum\": ["]
2884#[doc = "    \"all_gas_key_changes\""]
2885#[doc = "  ]"]
2886#[doc = "}"]
2887#[doc = r" ```"]
2888#[doc = r" </details>"]
2889#[derive(
2890    :: serde :: Deserialize,
2891    :: serde :: Serialize,
2892    Clone,
2893    Copy,
2894    Debug,
2895    Eq,
2896    Hash,
2897    Ord,
2898    PartialEq,
2899    PartialOrd,
2900)]
2901pub enum AllGasKeyChangesByFinalityChangesType {
2902    #[serde(rename = "all_gas_key_changes")]
2903    AllGasKeyChanges,
2904}
2905impl ::std::convert::From<&Self> for AllGasKeyChangesByFinalityChangesType {
2906    fn from(value: &AllGasKeyChangesByFinalityChangesType) -> Self {
2907        value.clone()
2908    }
2909}
2910impl ::std::fmt::Display for AllGasKeyChangesByFinalityChangesType {
2911    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
2912        match *self {
2913            Self::AllGasKeyChanges => f.write_str("all_gas_key_changes"),
2914        }
2915    }
2916}
2917impl ::std::str::FromStr for AllGasKeyChangesByFinalityChangesType {
2918    type Err = self::error::ConversionError;
2919    fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
2920        match value {
2921            "all_gas_key_changes" => Ok(Self::AllGasKeyChanges),
2922            _ => Err("invalid value".into()),
2923        }
2924    }
2925}
2926impl ::std::convert::TryFrom<&str> for AllGasKeyChangesByFinalityChangesType {
2927    type Error = self::error::ConversionError;
2928    fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
2929        value.parse()
2930    }
2931}
2932impl ::std::convert::TryFrom<&::std::string::String> for AllGasKeyChangesByFinalityChangesType {
2933    type Error = self::error::ConversionError;
2934    fn try_from(
2935        value: &::std::string::String,
2936    ) -> ::std::result::Result<Self, self::error::ConversionError> {
2937        value.parse()
2938    }
2939}
2940impl ::std::convert::TryFrom<::std::string::String> for AllGasKeyChangesByFinalityChangesType {
2941    type Error = self::error::ConversionError;
2942    fn try_from(
2943        value: ::std::string::String,
2944    ) -> ::std::result::Result<Self, self::error::ConversionError> {
2945        value.parse()
2946    }
2947}
2948#[doc = "`AllGasKeyChangesBySyncCheckpointChangesType`"]
2949#[doc = r""]
2950#[doc = r" <details><summary>JSON schema</summary>"]
2951#[doc = r""]
2952#[doc = r" ```json"]
2953#[doc = "{"]
2954#[doc = "  \"type\": \"string\","]
2955#[doc = "  \"enum\": ["]
2956#[doc = "    \"all_gas_key_changes\""]
2957#[doc = "  ]"]
2958#[doc = "}"]
2959#[doc = r" ```"]
2960#[doc = r" </details>"]
2961#[derive(
2962    :: serde :: Deserialize,
2963    :: serde :: Serialize,
2964    Clone,
2965    Copy,
2966    Debug,
2967    Eq,
2968    Hash,
2969    Ord,
2970    PartialEq,
2971    PartialOrd,
2972)]
2973pub enum AllGasKeyChangesBySyncCheckpointChangesType {
2974    #[serde(rename = "all_gas_key_changes")]
2975    AllGasKeyChanges,
2976}
2977impl ::std::convert::From<&Self> for AllGasKeyChangesBySyncCheckpointChangesType {
2978    fn from(value: &AllGasKeyChangesBySyncCheckpointChangesType) -> Self {
2979        value.clone()
2980    }
2981}
2982impl ::std::fmt::Display for AllGasKeyChangesBySyncCheckpointChangesType {
2983    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
2984        match *self {
2985            Self::AllGasKeyChanges => f.write_str("all_gas_key_changes"),
2986        }
2987    }
2988}
2989impl ::std::str::FromStr for AllGasKeyChangesBySyncCheckpointChangesType {
2990    type Err = self::error::ConversionError;
2991    fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
2992        match value {
2993            "all_gas_key_changes" => Ok(Self::AllGasKeyChanges),
2994            _ => Err("invalid value".into()),
2995        }
2996    }
2997}
2998impl ::std::convert::TryFrom<&str> for AllGasKeyChangesBySyncCheckpointChangesType {
2999    type Error = self::error::ConversionError;
3000    fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
3001        value.parse()
3002    }
3003}
3004impl ::std::convert::TryFrom<&::std::string::String>
3005    for AllGasKeyChangesBySyncCheckpointChangesType
3006{
3007    type Error = self::error::ConversionError;
3008    fn try_from(
3009        value: &::std::string::String,
3010    ) -> ::std::result::Result<Self, self::error::ConversionError> {
3011        value.parse()
3012    }
3013}
3014impl ::std::convert::TryFrom<::std::string::String>
3015    for AllGasKeyChangesBySyncCheckpointChangesType
3016{
3017    type Error = self::error::ConversionError;
3018    fn try_from(
3019        value: ::std::string::String,
3020    ) -> ::std::result::Result<Self, self::error::ConversionError> {
3021        value.parse()
3022    }
3023}
3024#[doc = "`BandwidthRequest` describes the size of receipts that a shard would like to send to another shard.\nWhen a shard wants to send a lot of receipts to another shard, it needs to create a request and wait\nfor a bandwidth grant from the bandwidth scheduler."]
3025#[doc = r""]
3026#[doc = r" <details><summary>JSON schema</summary>"]
3027#[doc = r""]
3028#[doc = r" ```json"]
3029#[doc = "{"]
3030#[doc = "  \"description\": \"`BandwidthRequest` describes the size of receipts that a shard would like to send to another shard.\\nWhen a shard wants to send a lot of receipts to another shard, it needs to create a request and wait\\nfor a bandwidth grant from the bandwidth scheduler.\","]
3031#[doc = "  \"type\": \"object\","]
3032#[doc = "  \"required\": ["]
3033#[doc = "    \"requested_values_bitmap\","]
3034#[doc = "    \"to_shard\""]
3035#[doc = "  ],"]
3036#[doc = "  \"properties\": {"]
3037#[doc = "    \"requested_values_bitmap\": {"]
3038#[doc = "      \"description\": \"Bitmap which describes what values of bandwidth are requested.\","]
3039#[doc = "      \"allOf\": ["]
3040#[doc = "        {"]
3041#[doc = "          \"$ref\": \"#/components/schemas/BandwidthRequestBitmap\""]
3042#[doc = "        }"]
3043#[doc = "      ]"]
3044#[doc = "    },"]
3045#[doc = "    \"to_shard\": {"]
3046#[doc = "      \"description\": \"Requesting bandwidth to this shard.\","]
3047#[doc = "      \"type\": \"integer\","]
3048#[doc = "      \"format\": \"uint16\","]
3049#[doc = "      \"maximum\": 65535.0,"]
3050#[doc = "      \"minimum\": 0.0"]
3051#[doc = "    }"]
3052#[doc = "  }"]
3053#[doc = "}"]
3054#[doc = r" ```"]
3055#[doc = r" </details>"]
3056#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
3057pub struct BandwidthRequest {
3058    #[doc = "Bitmap which describes what values of bandwidth are requested."]
3059    pub requested_values_bitmap: BandwidthRequestBitmap,
3060    #[doc = "Requesting bandwidth to this shard."]
3061    pub to_shard: u16,
3062}
3063impl ::std::convert::From<&BandwidthRequest> for BandwidthRequest {
3064    fn from(value: &BandwidthRequest) -> Self {
3065        value.clone()
3066    }
3067}
3068#[doc = "Bitmap which describes which values from the predefined list are being requested.\nThe nth bit is set to 1 when the nth value from the list is being requested."]
3069#[doc = r""]
3070#[doc = r" <details><summary>JSON schema</summary>"]
3071#[doc = r""]
3072#[doc = r" ```json"]
3073#[doc = "{"]
3074#[doc = "  \"description\": \"Bitmap which describes which values from the predefined list are being requested.\\nThe nth bit is set to 1 when the nth value from the list is being requested.\","]
3075#[doc = "  \"type\": \"object\","]
3076#[doc = "  \"required\": ["]
3077#[doc = "    \"data\""]
3078#[doc = "  ],"]
3079#[doc = "  \"properties\": {"]
3080#[doc = "    \"data\": {"]
3081#[doc = "      \"type\": \"array\","]
3082#[doc = "      \"items\": {"]
3083#[doc = "        \"type\": \"integer\","]
3084#[doc = "        \"format\": \"uint8\","]
3085#[doc = "        \"maximum\": 255.0,"]
3086#[doc = "        \"minimum\": 0.0"]
3087#[doc = "      },"]
3088#[doc = "      \"maxItems\": 5,"]
3089#[doc = "      \"minItems\": 5"]
3090#[doc = "    }"]
3091#[doc = "  }"]
3092#[doc = "}"]
3093#[doc = r" ```"]
3094#[doc = r" </details>"]
3095#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
3096pub struct BandwidthRequestBitmap {
3097    pub data: [u8; 5usize],
3098}
3099impl ::std::convert::From<&BandwidthRequestBitmap> for BandwidthRequestBitmap {
3100    fn from(value: &BandwidthRequestBitmap) -> Self {
3101        value.clone()
3102    }
3103}
3104#[doc = "A list of shard's bandwidth requests.\nDescribes how much the shard would like to send to other shards."]
3105#[doc = r""]
3106#[doc = r" <details><summary>JSON schema</summary>"]
3107#[doc = r""]
3108#[doc = r" ```json"]
3109#[doc = "{"]
3110#[doc = "  \"description\": \"A list of shard's bandwidth requests.\\nDescribes how much the shard would like to send to other shards.\","]
3111#[doc = "  \"oneOf\": ["]
3112#[doc = "    {"]
3113#[doc = "      \"type\": \"object\","]
3114#[doc = "      \"required\": ["]
3115#[doc = "        \"V1\""]
3116#[doc = "      ],"]
3117#[doc = "      \"properties\": {"]
3118#[doc = "        \"V1\": {"]
3119#[doc = "          \"$ref\": \"#/components/schemas/BandwidthRequestsV1\""]
3120#[doc = "        }"]
3121#[doc = "      },"]
3122#[doc = "      \"additionalProperties\": false"]
3123#[doc = "    }"]
3124#[doc = "  ]"]
3125#[doc = "}"]
3126#[doc = r" ```"]
3127#[doc = r" </details>"]
3128#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
3129pub enum BandwidthRequests {
3130    V1(BandwidthRequestsV1),
3131}
3132impl ::std::convert::From<&Self> for BandwidthRequests {
3133    fn from(value: &BandwidthRequests) -> Self {
3134        value.clone()
3135    }
3136}
3137impl ::std::convert::From<BandwidthRequestsV1> for BandwidthRequests {
3138    fn from(value: BandwidthRequestsV1) -> Self {
3139        Self::V1(value)
3140    }
3141}
3142#[doc = "Version 1 of [`BandwidthRequest`]."]
3143#[doc = r""]
3144#[doc = r" <details><summary>JSON schema</summary>"]
3145#[doc = r""]
3146#[doc = r" ```json"]
3147#[doc = "{"]
3148#[doc = "  \"description\": \"Version 1 of [`BandwidthRequest`].\","]
3149#[doc = "  \"type\": \"object\","]
3150#[doc = "  \"required\": ["]
3151#[doc = "    \"requests\""]
3152#[doc = "  ],"]
3153#[doc = "  \"properties\": {"]
3154#[doc = "    \"requests\": {"]
3155#[doc = "      \"type\": \"array\","]
3156#[doc = "      \"items\": {"]
3157#[doc = "        \"$ref\": \"#/components/schemas/BandwidthRequest\""]
3158#[doc = "      }"]
3159#[doc = "    }"]
3160#[doc = "  }"]
3161#[doc = "}"]
3162#[doc = r" ```"]
3163#[doc = r" </details>"]
3164#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
3165pub struct BandwidthRequestsV1 {
3166    pub requests: ::std::vec::Vec<BandwidthRequest>,
3167}
3168impl ::std::convert::From<&BandwidthRequestsV1> for BandwidthRequestsV1 {
3169    fn from(value: &BandwidthRequestsV1) -> Self {
3170        value.clone()
3171    }
3172}
3173#[doc = "A part of a state for the current head of a light client. More info [here](https://nomicon.io/ChainSpec/LightClient)."]
3174#[doc = r""]
3175#[doc = r" <details><summary>JSON schema</summary>"]
3176#[doc = r""]
3177#[doc = r" ```json"]
3178#[doc = "{"]
3179#[doc = "  \"description\": \"A part of a state for the current head of a light client. More info [here](https://nomicon.io/ChainSpec/LightClient).\","]
3180#[doc = "  \"type\": \"object\","]
3181#[doc = "  \"required\": ["]
3182#[doc = "    \"block_merkle_root\","]
3183#[doc = "    \"epoch_id\","]
3184#[doc = "    \"height\","]
3185#[doc = "    \"next_bp_hash\","]
3186#[doc = "    \"next_epoch_id\","]
3187#[doc = "    \"outcome_root\","]
3188#[doc = "    \"prev_state_root\","]
3189#[doc = "    \"timestamp\","]
3190#[doc = "    \"timestamp_nanosec\""]
3191#[doc = "  ],"]
3192#[doc = "  \"properties\": {"]
3193#[doc = "    \"block_merkle_root\": {"]
3194#[doc = "      \"description\": \"The merkle root of all the block hashes\","]
3195#[doc = "      \"allOf\": ["]
3196#[doc = "        {"]
3197#[doc = "          \"$ref\": \"#/components/schemas/CryptoHash\""]
3198#[doc = "        }"]
3199#[doc = "      ]"]
3200#[doc = "    },"]
3201#[doc = "    \"epoch_id\": {"]
3202#[doc = "      \"description\": \"The epoch to which the block that is the current known head belongs\","]
3203#[doc = "      \"allOf\": ["]
3204#[doc = "        {"]
3205#[doc = "          \"$ref\": \"#/components/schemas/CryptoHash\""]
3206#[doc = "        }"]
3207#[doc = "      ]"]
3208#[doc = "    },"]
3209#[doc = "    \"height\": {"]
3210#[doc = "      \"type\": \"integer\","]
3211#[doc = "      \"format\": \"uint64\","]
3212#[doc = "      \"minimum\": 0.0"]
3213#[doc = "    },"]
3214#[doc = "    \"next_bp_hash\": {"]
3215#[doc = "      \"description\": \"The hash of the block producers set for the next epoch\","]
3216#[doc = "      \"allOf\": ["]
3217#[doc = "        {"]
3218#[doc = "          \"$ref\": \"#/components/schemas/CryptoHash\""]
3219#[doc = "        }"]
3220#[doc = "      ]"]
3221#[doc = "    },"]
3222#[doc = "    \"next_epoch_id\": {"]
3223#[doc = "      \"description\": \"The epoch that will follow the current epoch\","]
3224#[doc = "      \"allOf\": ["]
3225#[doc = "        {"]
3226#[doc = "          \"$ref\": \"#/components/schemas/CryptoHash\""]
3227#[doc = "        }"]
3228#[doc = "      ]"]
3229#[doc = "    },"]
3230#[doc = "    \"outcome_root\": {"]
3231#[doc = "      \"$ref\": \"#/components/schemas/CryptoHash\""]
3232#[doc = "    },"]
3233#[doc = "    \"prev_state_root\": {"]
3234#[doc = "      \"$ref\": \"#/components/schemas/CryptoHash\""]
3235#[doc = "    },"]
3236#[doc = "    \"timestamp\": {"]
3237#[doc = "      \"description\": \"Legacy json number. Should not be used.\","]
3238#[doc = "      \"type\": \"integer\","]
3239#[doc = "      \"format\": \"uint64\","]
3240#[doc = "      \"minimum\": 0.0"]
3241#[doc = "    },"]
3242#[doc = "    \"timestamp_nanosec\": {"]
3243#[doc = "      \"type\": \"string\""]
3244#[doc = "    }"]
3245#[doc = "  }"]
3246#[doc = "}"]
3247#[doc = r" ```"]
3248#[doc = r" </details>"]
3249#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
3250pub struct BlockHeaderInnerLiteView {
3251    #[doc = "The merkle root of all the block hashes"]
3252    pub block_merkle_root: CryptoHash,
3253    #[doc = "The epoch to which the block that is the current known head belongs"]
3254    pub epoch_id: CryptoHash,
3255    pub height: u64,
3256    #[doc = "The hash of the block producers set for the next epoch"]
3257    pub next_bp_hash: CryptoHash,
3258    #[doc = "The epoch that will follow the current epoch"]
3259    pub next_epoch_id: CryptoHash,
3260    pub outcome_root: CryptoHash,
3261    pub prev_state_root: CryptoHash,
3262    #[doc = "Legacy json number. Should not be used."]
3263    pub timestamp: u64,
3264    pub timestamp_nanosec: ::std::string::String,
3265}
3266impl ::std::convert::From<&BlockHeaderInnerLiteView> for BlockHeaderInnerLiteView {
3267    fn from(value: &BlockHeaderInnerLiteView) -> Self {
3268        value.clone()
3269    }
3270}
3271#[doc = "Contains main info about the block."]
3272#[doc = r""]
3273#[doc = r" <details><summary>JSON schema</summary>"]
3274#[doc = r""]
3275#[doc = r" ```json"]
3276#[doc = "{"]
3277#[doc = "  \"description\": \"Contains main info about the block.\","]
3278#[doc = "  \"type\": \"object\","]
3279#[doc = "  \"required\": ["]
3280#[doc = "    \"approvals\","]
3281#[doc = "    \"block_merkle_root\","]
3282#[doc = "    \"challenges_result\","]
3283#[doc = "    \"challenges_root\","]
3284#[doc = "    \"chunk_headers_root\","]
3285#[doc = "    \"chunk_mask\","]
3286#[doc = "    \"chunk_receipts_root\","]
3287#[doc = "    \"chunk_tx_root\","]
3288#[doc = "    \"chunks_included\","]
3289#[doc = "    \"epoch_id\","]
3290#[doc = "    \"gas_price\","]
3291#[doc = "    \"hash\","]
3292#[doc = "    \"height\","]
3293#[doc = "    \"last_ds_final_block\","]
3294#[doc = "    \"last_final_block\","]
3295#[doc = "    \"latest_protocol_version\","]
3296#[doc = "    \"next_bp_hash\","]
3297#[doc = "    \"next_epoch_id\","]
3298#[doc = "    \"outcome_root\","]
3299#[doc = "    \"prev_hash\","]
3300#[doc = "    \"prev_state_root\","]
3301#[doc = "    \"random_value\","]
3302#[doc = "    \"signature\","]
3303#[doc = "    \"timestamp\","]
3304#[doc = "    \"timestamp_nanosec\","]
3305#[doc = "    \"total_supply\","]
3306#[doc = "    \"validator_proposals\""]
3307#[doc = "  ],"]
3308#[doc = "  \"properties\": {"]
3309#[doc = "    \"approvals\": {"]
3310#[doc = "      \"type\": \"array\","]
3311#[doc = "      \"items\": {"]
3312#[doc = "        \"anyOf\": ["]
3313#[doc = "          {"]
3314#[doc = "            \"$ref\": \"#/components/schemas/Signature\""]
3315#[doc = "          },"]
3316#[doc = "          {"]
3317#[doc = "            \"type\": \"null\""]
3318#[doc = "          }"]
3319#[doc = "        ]"]
3320#[doc = "      }"]
3321#[doc = "    },"]
3322#[doc = "    \"block_body_hash\": {"]
3323#[doc = "      \"anyOf\": ["]
3324#[doc = "        {"]
3325#[doc = "          \"$ref\": \"#/components/schemas/CryptoHash\""]
3326#[doc = "        },"]
3327#[doc = "        {"]
3328#[doc = "          \"type\": \"null\""]
3329#[doc = "        }"]
3330#[doc = "      ]"]
3331#[doc = "    },"]
3332#[doc = "    \"block_merkle_root\": {"]
3333#[doc = "      \"$ref\": \"#/components/schemas/CryptoHash\""]
3334#[doc = "    },"]
3335#[doc = "    \"block_ordinal\": {"]
3336#[doc = "      \"type\": ["]
3337#[doc = "        \"integer\","]
3338#[doc = "        \"null\""]
3339#[doc = "      ],"]
3340#[doc = "      \"format\": \"uint64\","]
3341#[doc = "      \"minimum\": 0.0"]
3342#[doc = "    },"]
3343#[doc = "    \"challenges_result\": {"]
3344#[doc = "      \"type\": \"array\","]
3345#[doc = "      \"items\": {"]
3346#[doc = "        \"$ref\": \"#/components/schemas/SlashedValidator\""]
3347#[doc = "      }"]
3348#[doc = "    },"]
3349#[doc = "    \"challenges_root\": {"]
3350#[doc = "      \"$ref\": \"#/components/schemas/CryptoHash\""]
3351#[doc = "    },"]
3352#[doc = "    \"chunk_endorsements\": {"]
3353#[doc = "      \"type\": ["]
3354#[doc = "        \"array\","]
3355#[doc = "        \"null\""]
3356#[doc = "      ],"]
3357#[doc = "      \"items\": {"]
3358#[doc = "        \"type\": \"array\","]
3359#[doc = "        \"items\": {"]
3360#[doc = "          \"type\": \"integer\","]
3361#[doc = "          \"format\": \"uint8\","]
3362#[doc = "          \"maximum\": 255.0,"]
3363#[doc = "          \"minimum\": 0.0"]
3364#[doc = "        }"]
3365#[doc = "      }"]
3366#[doc = "    },"]
3367#[doc = "    \"chunk_headers_root\": {"]
3368#[doc = "      \"$ref\": \"#/components/schemas/CryptoHash\""]
3369#[doc = "    },"]
3370#[doc = "    \"chunk_mask\": {"]
3371#[doc = "      \"type\": \"array\","]
3372#[doc = "      \"items\": {"]
3373#[doc = "        \"type\": \"boolean\""]
3374#[doc = "      }"]
3375#[doc = "    },"]
3376#[doc = "    \"chunk_receipts_root\": {"]
3377#[doc = "      \"$ref\": \"#/components/schemas/CryptoHash\""]
3378#[doc = "    },"]
3379#[doc = "    \"chunk_tx_root\": {"]
3380#[doc = "      \"$ref\": \"#/components/schemas/CryptoHash\""]
3381#[doc = "    },"]
3382#[doc = "    \"chunks_included\": {"]
3383#[doc = "      \"type\": \"integer\","]
3384#[doc = "      \"format\": \"uint64\","]
3385#[doc = "      \"minimum\": 0.0"]
3386#[doc = "    },"]
3387#[doc = "    \"epoch_id\": {"]
3388#[doc = "      \"$ref\": \"#/components/schemas/CryptoHash\""]
3389#[doc = "    },"]
3390#[doc = "    \"epoch_sync_data_hash\": {"]
3391#[doc = "      \"anyOf\": ["]
3392#[doc = "        {"]
3393#[doc = "          \"$ref\": \"#/components/schemas/CryptoHash\""]
3394#[doc = "        },"]
3395#[doc = "        {"]
3396#[doc = "          \"type\": \"null\""]
3397#[doc = "        }"]
3398#[doc = "      ]"]
3399#[doc = "    },"]
3400#[doc = "    \"gas_price\": {"]
3401#[doc = "      \"$ref\": \"#/components/schemas/NearToken\""]
3402#[doc = "    },"]
3403#[doc = "    \"hash\": {"]
3404#[doc = "      \"$ref\": \"#/components/schemas/CryptoHash\""]
3405#[doc = "    },"]
3406#[doc = "    \"height\": {"]
3407#[doc = "      \"type\": \"integer\","]
3408#[doc = "      \"format\": \"uint64\","]
3409#[doc = "      \"minimum\": 0.0"]
3410#[doc = "    },"]
3411#[doc = "    \"last_ds_final_block\": {"]
3412#[doc = "      \"$ref\": \"#/components/schemas/CryptoHash\""]
3413#[doc = "    },"]
3414#[doc = "    \"last_final_block\": {"]
3415#[doc = "      \"$ref\": \"#/components/schemas/CryptoHash\""]
3416#[doc = "    },"]
3417#[doc = "    \"latest_protocol_version\": {"]
3418#[doc = "      \"type\": \"integer\","]
3419#[doc = "      \"format\": \"uint32\","]
3420#[doc = "      \"minimum\": 0.0"]
3421#[doc = "    },"]
3422#[doc = "    \"next_bp_hash\": {"]
3423#[doc = "      \"$ref\": \"#/components/schemas/CryptoHash\""]
3424#[doc = "    },"]
3425#[doc = "    \"next_epoch_id\": {"]
3426#[doc = "      \"$ref\": \"#/components/schemas/CryptoHash\""]
3427#[doc = "    },"]
3428#[doc = "    \"outcome_root\": {"]
3429#[doc = "      \"$ref\": \"#/components/schemas/CryptoHash\""]
3430#[doc = "    },"]
3431#[doc = "    \"prev_hash\": {"]
3432#[doc = "      \"description\": \"The hash of the previous Block\","]
3433#[doc = "      \"allOf\": ["]
3434#[doc = "        {"]
3435#[doc = "          \"$ref\": \"#/components/schemas/CryptoHash\""]
3436#[doc = "        }"]
3437#[doc = "      ]"]
3438#[doc = "    },"]
3439#[doc = "    \"prev_height\": {"]
3440#[doc = "      \"type\": ["]
3441#[doc = "        \"integer\","]
3442#[doc = "        \"null\""]
3443#[doc = "      ],"]
3444#[doc = "      \"format\": \"uint64\","]
3445#[doc = "      \"minimum\": 0.0"]
3446#[doc = "    },"]
3447#[doc = "    \"prev_state_root\": {"]
3448#[doc = "      \"$ref\": \"#/components/schemas/CryptoHash\""]
3449#[doc = "    },"]
3450#[doc = "    \"random_value\": {"]
3451#[doc = "      \"$ref\": \"#/components/schemas/CryptoHash\""]
3452#[doc = "    },"]
3453#[doc = "    \"rent_paid\": {"]
3454#[doc = "      \"description\": \"TODO(2271): deprecated.\","]
3455#[doc = "      \"default\": \"0\","]
3456#[doc = "      \"allOf\": ["]
3457#[doc = "        {"]
3458#[doc = "          \"$ref\": \"#/components/schemas/NearToken\""]
3459#[doc = "        }"]
3460#[doc = "      ]"]
3461#[doc = "    },"]
3462#[doc = "    \"signature\": {"]
3463#[doc = "      \"description\": \"Signature of the block producer.\","]
3464#[doc = "      \"allOf\": ["]
3465#[doc = "        {"]
3466#[doc = "          \"$ref\": \"#/components/schemas/Signature\""]
3467#[doc = "        }"]
3468#[doc = "      ]"]
3469#[doc = "    },"]
3470#[doc = "    \"timestamp\": {"]
3471#[doc = "      \"description\": \"Legacy json number. Should not be used.\","]
3472#[doc = "      \"type\": \"integer\","]
3473#[doc = "      \"format\": \"uint64\","]
3474#[doc = "      \"minimum\": 0.0"]
3475#[doc = "    },"]
3476#[doc = "    \"timestamp_nanosec\": {"]
3477#[doc = "      \"type\": \"string\""]
3478#[doc = "    },"]
3479#[doc = "    \"total_supply\": {"]
3480#[doc = "      \"$ref\": \"#/components/schemas/NearToken\""]
3481#[doc = "    },"]
3482#[doc = "    \"validator_proposals\": {"]
3483#[doc = "      \"type\": \"array\","]
3484#[doc = "      \"items\": {"]
3485#[doc = "        \"$ref\": \"#/components/schemas/ValidatorStakeView\""]
3486#[doc = "      }"]
3487#[doc = "    },"]
3488#[doc = "    \"validator_reward\": {"]
3489#[doc = "      \"description\": \"TODO(2271): deprecated.\","]
3490#[doc = "      \"default\": \"0\","]
3491#[doc = "      \"allOf\": ["]
3492#[doc = "        {"]
3493#[doc = "          \"$ref\": \"#/components/schemas/NearToken\""]
3494#[doc = "        }"]
3495#[doc = "      ]"]
3496#[doc = "    }"]
3497#[doc = "  }"]
3498#[doc = "}"]
3499#[doc = r" ```"]
3500#[doc = r" </details>"]
3501#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
3502pub struct BlockHeaderView {
3503    pub approvals: ::std::vec::Vec<::std::option::Option<Signature>>,
3504    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
3505    pub block_body_hash: ::std::option::Option<CryptoHash>,
3506    pub block_merkle_root: CryptoHash,
3507    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
3508    pub block_ordinal: ::std::option::Option<u64>,
3509    pub challenges_result: ::std::vec::Vec<SlashedValidator>,
3510    pub challenges_root: CryptoHash,
3511    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
3512    pub chunk_endorsements: ::std::option::Option<::std::vec::Vec<::std::vec::Vec<u8>>>,
3513    pub chunk_headers_root: CryptoHash,
3514    pub chunk_mask: ::std::vec::Vec<bool>,
3515    pub chunk_receipts_root: CryptoHash,
3516    pub chunk_tx_root: CryptoHash,
3517    pub chunks_included: u64,
3518    pub epoch_id: CryptoHash,
3519    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
3520    pub epoch_sync_data_hash: ::std::option::Option<CryptoHash>,
3521    pub gas_price: NearToken,
3522    pub hash: CryptoHash,
3523    pub height: u64,
3524    pub last_ds_final_block: CryptoHash,
3525    pub last_final_block: CryptoHash,
3526    pub latest_protocol_version: u32,
3527    pub next_bp_hash: CryptoHash,
3528    pub next_epoch_id: CryptoHash,
3529    pub outcome_root: CryptoHash,
3530    #[doc = "The hash of the previous Block"]
3531    pub prev_hash: CryptoHash,
3532    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
3533    pub prev_height: ::std::option::Option<u64>,
3534    pub prev_state_root: CryptoHash,
3535    pub random_value: CryptoHash,
3536    #[doc = "TODO(2271): deprecated."]
3537    #[serde(default = "defaults::block_header_view_rent_paid")]
3538    pub rent_paid: NearToken,
3539    #[doc = "Signature of the block producer."]
3540    pub signature: Signature,
3541    #[doc = "Legacy json number. Should not be used."]
3542    pub timestamp: u64,
3543    pub timestamp_nanosec: ::std::string::String,
3544    pub total_supply: NearToken,
3545    pub validator_proposals: ::std::vec::Vec<ValidatorStakeView>,
3546    #[doc = "TODO(2271): deprecated."]
3547    #[serde(default = "defaults::block_header_view_validator_reward")]
3548    pub validator_reward: NearToken,
3549}
3550impl ::std::convert::From<&BlockHeaderView> for BlockHeaderView {
3551    fn from(value: &BlockHeaderView) -> Self {
3552        value.clone()
3553    }
3554}
3555#[doc = "`BlockId`"]
3556#[doc = r""]
3557#[doc = r" <details><summary>JSON schema</summary>"]
3558#[doc = r""]
3559#[doc = r" ```json"]
3560#[doc = "{"]
3561#[doc = "  \"anyOf\": ["]
3562#[doc = "    {"]
3563#[doc = "      \"title\": \"block_height\","]
3564#[doc = "      \"type\": \"integer\","]
3565#[doc = "      \"format\": \"uint64\","]
3566#[doc = "      \"minimum\": 0.0"]
3567#[doc = "    },"]
3568#[doc = "    {"]
3569#[doc = "      \"$ref\": \"#/components/schemas/CryptoHash\""]
3570#[doc = "    }"]
3571#[doc = "  ]"]
3572#[doc = "}"]
3573#[doc = r" ```"]
3574#[doc = r" </details>"]
3575#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
3576#[serde(untagged)]
3577pub enum BlockId {
3578    BlockHeight(u64),
3579    CryptoHash(CryptoHash),
3580}
3581impl ::std::convert::From<&Self> for BlockId {
3582    fn from(value: &BlockId) -> Self {
3583        value.clone()
3584    }
3585}
3586impl ::std::fmt::Display for BlockId {
3587    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
3588        match self {
3589            Self::BlockHeight(x) => x.fmt(f),
3590            Self::CryptoHash(x) => x.fmt(f),
3591        }
3592    }
3593}
3594impl ::std::convert::From<u64> for BlockId {
3595    fn from(value: u64) -> Self {
3596        Self::BlockHeight(value)
3597    }
3598}
3599impl ::std::convert::From<CryptoHash> for BlockId {
3600    fn from(value: CryptoHash) -> Self {
3601        Self::CryptoHash(value)
3602    }
3603}
3604#[doc = "Height and hash of a block"]
3605#[doc = r""]
3606#[doc = r" <details><summary>JSON schema</summary>"]
3607#[doc = r""]
3608#[doc = r" ```json"]
3609#[doc = "{"]
3610#[doc = "  \"description\": \"Height and hash of a block\","]
3611#[doc = "  \"type\": \"object\","]
3612#[doc = "  \"required\": ["]
3613#[doc = "    \"hash\","]
3614#[doc = "    \"height\""]
3615#[doc = "  ],"]
3616#[doc = "  \"properties\": {"]
3617#[doc = "    \"hash\": {"]
3618#[doc = "      \"$ref\": \"#/components/schemas/CryptoHash\""]
3619#[doc = "    },"]
3620#[doc = "    \"height\": {"]
3621#[doc = "      \"type\": \"integer\","]
3622#[doc = "      \"format\": \"uint64\","]
3623#[doc = "      \"minimum\": 0.0"]
3624#[doc = "    }"]
3625#[doc = "  }"]
3626#[doc = "}"]
3627#[doc = r" ```"]
3628#[doc = r" </details>"]
3629#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
3630pub struct BlockStatusView {
3631    pub hash: CryptoHash,
3632    pub height: u64,
3633}
3634impl ::std::convert::From<&BlockStatusView> for BlockStatusView {
3635    fn from(value: &BlockStatusView) -> Self {
3636        value.clone()
3637    }
3638}
3639#[doc = "`CallFunctionByBlockIdRequestType`"]
3640#[doc = r""]
3641#[doc = r" <details><summary>JSON schema</summary>"]
3642#[doc = r""]
3643#[doc = r" ```json"]
3644#[doc = "{"]
3645#[doc = "  \"type\": \"string\","]
3646#[doc = "  \"enum\": ["]
3647#[doc = "    \"call_function\""]
3648#[doc = "  ]"]
3649#[doc = "}"]
3650#[doc = r" ```"]
3651#[doc = r" </details>"]
3652#[derive(
3653    :: serde :: Deserialize,
3654    :: serde :: Serialize,
3655    Clone,
3656    Copy,
3657    Debug,
3658    Eq,
3659    Hash,
3660    Ord,
3661    PartialEq,
3662    PartialOrd,
3663)]
3664pub enum CallFunctionByBlockIdRequestType {
3665    #[serde(rename = "call_function")]
3666    CallFunction,
3667}
3668impl ::std::convert::From<&Self> for CallFunctionByBlockIdRequestType {
3669    fn from(value: &CallFunctionByBlockIdRequestType) -> Self {
3670        value.clone()
3671    }
3672}
3673impl ::std::fmt::Display for CallFunctionByBlockIdRequestType {
3674    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
3675        match *self {
3676            Self::CallFunction => f.write_str("call_function"),
3677        }
3678    }
3679}
3680impl ::std::str::FromStr for CallFunctionByBlockIdRequestType {
3681    type Err = self::error::ConversionError;
3682    fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
3683        match value {
3684            "call_function" => Ok(Self::CallFunction),
3685            _ => Err("invalid value".into()),
3686        }
3687    }
3688}
3689impl ::std::convert::TryFrom<&str> for CallFunctionByBlockIdRequestType {
3690    type Error = self::error::ConversionError;
3691    fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
3692        value.parse()
3693    }
3694}
3695impl ::std::convert::TryFrom<&::std::string::String> for CallFunctionByBlockIdRequestType {
3696    type Error = self::error::ConversionError;
3697    fn try_from(
3698        value: &::std::string::String,
3699    ) -> ::std::result::Result<Self, self::error::ConversionError> {
3700        value.parse()
3701    }
3702}
3703impl ::std::convert::TryFrom<::std::string::String> for CallFunctionByBlockIdRequestType {
3704    type Error = self::error::ConversionError;
3705    fn try_from(
3706        value: ::std::string::String,
3707    ) -> ::std::result::Result<Self, self::error::ConversionError> {
3708        value.parse()
3709    }
3710}
3711#[doc = "`CallFunctionByFinalityRequestType`"]
3712#[doc = r""]
3713#[doc = r" <details><summary>JSON schema</summary>"]
3714#[doc = r""]
3715#[doc = r" ```json"]
3716#[doc = "{"]
3717#[doc = "  \"type\": \"string\","]
3718#[doc = "  \"enum\": ["]
3719#[doc = "    \"call_function\""]
3720#[doc = "  ]"]
3721#[doc = "}"]
3722#[doc = r" ```"]
3723#[doc = r" </details>"]
3724#[derive(
3725    :: serde :: Deserialize,
3726    :: serde :: Serialize,
3727    Clone,
3728    Copy,
3729    Debug,
3730    Eq,
3731    Hash,
3732    Ord,
3733    PartialEq,
3734    PartialOrd,
3735)]
3736pub enum CallFunctionByFinalityRequestType {
3737    #[serde(rename = "call_function")]
3738    CallFunction,
3739}
3740impl ::std::convert::From<&Self> for CallFunctionByFinalityRequestType {
3741    fn from(value: &CallFunctionByFinalityRequestType) -> Self {
3742        value.clone()
3743    }
3744}
3745impl ::std::fmt::Display for CallFunctionByFinalityRequestType {
3746    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
3747        match *self {
3748            Self::CallFunction => f.write_str("call_function"),
3749        }
3750    }
3751}
3752impl ::std::str::FromStr for CallFunctionByFinalityRequestType {
3753    type Err = self::error::ConversionError;
3754    fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
3755        match value {
3756            "call_function" => Ok(Self::CallFunction),
3757            _ => Err("invalid value".into()),
3758        }
3759    }
3760}
3761impl ::std::convert::TryFrom<&str> for CallFunctionByFinalityRequestType {
3762    type Error = self::error::ConversionError;
3763    fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
3764        value.parse()
3765    }
3766}
3767impl ::std::convert::TryFrom<&::std::string::String> for CallFunctionByFinalityRequestType {
3768    type Error = self::error::ConversionError;
3769    fn try_from(
3770        value: &::std::string::String,
3771    ) -> ::std::result::Result<Self, self::error::ConversionError> {
3772        value.parse()
3773    }
3774}
3775impl ::std::convert::TryFrom<::std::string::String> for CallFunctionByFinalityRequestType {
3776    type Error = self::error::ConversionError;
3777    fn try_from(
3778        value: ::std::string::String,
3779    ) -> ::std::result::Result<Self, self::error::ConversionError> {
3780        value.parse()
3781    }
3782}
3783#[doc = "`CallFunctionBySyncCheckpointRequestType`"]
3784#[doc = r""]
3785#[doc = r" <details><summary>JSON schema</summary>"]
3786#[doc = r""]
3787#[doc = r" ```json"]
3788#[doc = "{"]
3789#[doc = "  \"type\": \"string\","]
3790#[doc = "  \"enum\": ["]
3791#[doc = "    \"call_function\""]
3792#[doc = "  ]"]
3793#[doc = "}"]
3794#[doc = r" ```"]
3795#[doc = r" </details>"]
3796#[derive(
3797    :: serde :: Deserialize,
3798    :: serde :: Serialize,
3799    Clone,
3800    Copy,
3801    Debug,
3802    Eq,
3803    Hash,
3804    Ord,
3805    PartialEq,
3806    PartialOrd,
3807)]
3808pub enum CallFunctionBySyncCheckpointRequestType {
3809    #[serde(rename = "call_function")]
3810    CallFunction,
3811}
3812impl ::std::convert::From<&Self> for CallFunctionBySyncCheckpointRequestType {
3813    fn from(value: &CallFunctionBySyncCheckpointRequestType) -> Self {
3814        value.clone()
3815    }
3816}
3817impl ::std::fmt::Display for CallFunctionBySyncCheckpointRequestType {
3818    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
3819        match *self {
3820            Self::CallFunction => f.write_str("call_function"),
3821        }
3822    }
3823}
3824impl ::std::str::FromStr for CallFunctionBySyncCheckpointRequestType {
3825    type Err = self::error::ConversionError;
3826    fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
3827        match value {
3828            "call_function" => Ok(Self::CallFunction),
3829            _ => Err("invalid value".into()),
3830        }
3831    }
3832}
3833impl ::std::convert::TryFrom<&str> for CallFunctionBySyncCheckpointRequestType {
3834    type Error = self::error::ConversionError;
3835    fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
3836        value.parse()
3837    }
3838}
3839impl ::std::convert::TryFrom<&::std::string::String> for CallFunctionBySyncCheckpointRequestType {
3840    type Error = self::error::ConversionError;
3841    fn try_from(
3842        value: &::std::string::String,
3843    ) -> ::std::result::Result<Self, self::error::ConversionError> {
3844        value.parse()
3845    }
3846}
3847impl ::std::convert::TryFrom<::std::string::String> for CallFunctionBySyncCheckpointRequestType {
3848    type Error = self::error::ConversionError;
3849    fn try_from(
3850        value: ::std::string::String,
3851    ) -> ::std::result::Result<Self, self::error::ConversionError> {
3852        value.parse()
3853    }
3854}
3855#[doc = "A result returned by contract method"]
3856#[doc = r""]
3857#[doc = r" <details><summary>JSON schema</summary>"]
3858#[doc = r""]
3859#[doc = r" ```json"]
3860#[doc = "{"]
3861#[doc = "  \"description\": \"A result returned by contract method\","]
3862#[doc = "  \"type\": \"object\","]
3863#[doc = "  \"required\": ["]
3864#[doc = "    \"logs\","]
3865#[doc = "    \"result\""]
3866#[doc = "  ],"]
3867#[doc = "  \"properties\": {"]
3868#[doc = "    \"logs\": {"]
3869#[doc = "      \"type\": \"array\","]
3870#[doc = "      \"items\": {"]
3871#[doc = "        \"type\": \"string\""]
3872#[doc = "      }"]
3873#[doc = "    },"]
3874#[doc = "    \"result\": {"]
3875#[doc = "      \"type\": \"array\","]
3876#[doc = "      \"items\": {"]
3877#[doc = "        \"type\": \"integer\","]
3878#[doc = "        \"format\": \"uint8\","]
3879#[doc = "        \"maximum\": 255.0,"]
3880#[doc = "        \"minimum\": 0.0"]
3881#[doc = "      }"]
3882#[doc = "    }"]
3883#[doc = "  }"]
3884#[doc = "}"]
3885#[doc = r" ```"]
3886#[doc = r" </details>"]
3887#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
3888pub struct CallResult {
3889    pub logs: ::std::vec::Vec<::std::string::String>,
3890    pub result: ::std::vec::Vec<u8>,
3891}
3892impl ::std::convert::From<&CallResult> for CallResult {
3893    fn from(value: &CallResult) -> Self {
3894        value.clone()
3895    }
3896}
3897#[doc = "Status of the [catchup](https://near.github.io/nearcore/architecture/how/sync.html#catchup) process"]
3898#[doc = r""]
3899#[doc = r" <details><summary>JSON schema</summary>"]
3900#[doc = r""]
3901#[doc = r" ```json"]
3902#[doc = "{"]
3903#[doc = "  \"description\": \"Status of the [catchup](https://near.github.io/nearcore/architecture/how/sync.html#catchup) process\","]
3904#[doc = "  \"type\": \"object\","]
3905#[doc = "  \"required\": ["]
3906#[doc = "    \"blocks_to_catchup\","]
3907#[doc = "    \"shard_sync_status\","]
3908#[doc = "    \"sync_block_hash\","]
3909#[doc = "    \"sync_block_height\""]
3910#[doc = "  ],"]
3911#[doc = "  \"properties\": {"]
3912#[doc = "    \"blocks_to_catchup\": {"]
3913#[doc = "      \"type\": \"array\","]
3914#[doc = "      \"items\": {"]
3915#[doc = "        \"$ref\": \"#/components/schemas/BlockStatusView\""]
3916#[doc = "      }"]
3917#[doc = "    },"]
3918#[doc = "    \"shard_sync_status\": {"]
3919#[doc = "      \"type\": \"object\","]
3920#[doc = "      \"additionalProperties\": false"]
3921#[doc = "    },"]
3922#[doc = "    \"sync_block_hash\": {"]
3923#[doc = "      \"$ref\": \"#/components/schemas/CryptoHash\""]
3924#[doc = "    },"]
3925#[doc = "    \"sync_block_height\": {"]
3926#[doc = "      \"type\": \"integer\","]
3927#[doc = "      \"format\": \"uint64\","]
3928#[doc = "      \"minimum\": 0.0"]
3929#[doc = "    }"]
3930#[doc = "  }"]
3931#[doc = "}"]
3932#[doc = r" ```"]
3933#[doc = r" </details>"]
3934#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
3935pub struct CatchupStatusView {
3936    pub blocks_to_catchup: ::std::vec::Vec<BlockStatusView>,
3937    pub shard_sync_status: CatchupStatusViewShardSyncStatus,
3938    pub sync_block_hash: CryptoHash,
3939    pub sync_block_height: u64,
3940}
3941impl ::std::convert::From<&CatchupStatusView> for CatchupStatusView {
3942    fn from(value: &CatchupStatusView) -> Self {
3943        value.clone()
3944    }
3945}
3946#[doc = "`CatchupStatusViewShardSyncStatus`"]
3947#[doc = r""]
3948#[doc = r" <details><summary>JSON schema</summary>"]
3949#[doc = r""]
3950#[doc = r" ```json"]
3951#[doc = "{"]
3952#[doc = "  \"type\": \"object\","]
3953#[doc = "  \"additionalProperties\": false"]
3954#[doc = "}"]
3955#[doc = r" ```"]
3956#[doc = r" </details>"]
3957#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
3958#[serde(deny_unknown_fields)]
3959pub struct CatchupStatusViewShardSyncStatus {}
3960impl ::std::convert::From<&CatchupStatusViewShardSyncStatus> for CatchupStatusViewShardSyncStatus {
3961    fn from(value: &CatchupStatusViewShardSyncStatus) -> Self {
3962        value.clone()
3963    }
3964}
3965impl ::std::default::Default for CatchupStatusViewShardSyncStatus {
3966    fn default() -> Self {
3967        Self {}
3968    }
3969}
3970#[doc = "Config for the Chunk Distribution Network feature.\nThis allows nodes to push and pull chunks from a central stream.\nThe two benefits of this approach are: (1) less request/response traffic\non the peer-to-peer network and (2) lower latency for RPC nodes indexing the chain."]
3971#[doc = r""]
3972#[doc = r" <details><summary>JSON schema</summary>"]
3973#[doc = r""]
3974#[doc = r" ```json"]
3975#[doc = "{"]
3976#[doc = "  \"description\": \"Config for the Chunk Distribution Network feature.\\nThis allows nodes to push and pull chunks from a central stream.\\nThe two benefits of this approach are: (1) less request/response traffic\\non the peer-to-peer network and (2) lower latency for RPC nodes indexing the chain.\","]
3977#[doc = "  \"type\": \"object\","]
3978#[doc = "  \"required\": ["]
3979#[doc = "    \"enabled\","]
3980#[doc = "    \"uris\""]
3981#[doc = "  ],"]
3982#[doc = "  \"properties\": {"]
3983#[doc = "    \"enabled\": {"]
3984#[doc = "      \"type\": \"boolean\""]
3985#[doc = "    },"]
3986#[doc = "    \"uris\": {"]
3987#[doc = "      \"$ref\": \"#/components/schemas/ChunkDistributionUris\""]
3988#[doc = "    }"]
3989#[doc = "  }"]
3990#[doc = "}"]
3991#[doc = r" ```"]
3992#[doc = r" </details>"]
3993#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
3994pub struct ChunkDistributionNetworkConfig {
3995    pub enabled: bool,
3996    pub uris: ChunkDistributionUris,
3997}
3998impl ::std::convert::From<&ChunkDistributionNetworkConfig> for ChunkDistributionNetworkConfig {
3999    fn from(value: &ChunkDistributionNetworkConfig) -> Self {
4000        value.clone()
4001    }
4002}
4003#[doc = "URIs for the Chunk Distribution Network feature."]
4004#[doc = r""]
4005#[doc = r" <details><summary>JSON schema</summary>"]
4006#[doc = r""]
4007#[doc = r" ```json"]
4008#[doc = "{"]
4009#[doc = "  \"description\": \"URIs for the Chunk Distribution Network feature.\","]
4010#[doc = "  \"type\": \"object\","]
4011#[doc = "  \"required\": ["]
4012#[doc = "    \"get\","]
4013#[doc = "    \"set\""]
4014#[doc = "  ],"]
4015#[doc = "  \"properties\": {"]
4016#[doc = "    \"get\": {"]
4017#[doc = "      \"description\": \"URI for pulling chunks from the stream.\","]
4018#[doc = "      \"type\": \"string\""]
4019#[doc = "    },"]
4020#[doc = "    \"set\": {"]
4021#[doc = "      \"description\": \"URI for publishing chunks to the stream.\","]
4022#[doc = "      \"type\": \"string\""]
4023#[doc = "    }"]
4024#[doc = "  }"]
4025#[doc = "}"]
4026#[doc = r" ```"]
4027#[doc = r" </details>"]
4028#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
4029pub struct ChunkDistributionUris {
4030    #[doc = "URI for pulling chunks from the stream."]
4031    pub get: ::std::string::String,
4032    #[doc = "URI for publishing chunks to the stream."]
4033    pub set: ::std::string::String,
4034}
4035impl ::std::convert::From<&ChunkDistributionUris> for ChunkDistributionUris {
4036    fn from(value: &ChunkDistributionUris) -> Self {
4037        value.clone()
4038    }
4039}
4040#[doc = "Contains main info about the chunk."]
4041#[doc = r""]
4042#[doc = r" <details><summary>JSON schema</summary>"]
4043#[doc = r""]
4044#[doc = r" ```json"]
4045#[doc = "{"]
4046#[doc = "  \"description\": \"Contains main info about the chunk.\","]
4047#[doc = "  \"type\": \"object\","]
4048#[doc = "  \"required\": ["]
4049#[doc = "    \"balance_burnt\","]
4050#[doc = "    \"chunk_hash\","]
4051#[doc = "    \"encoded_length\","]
4052#[doc = "    \"encoded_merkle_root\","]
4053#[doc = "    \"gas_limit\","]
4054#[doc = "    \"gas_used\","]
4055#[doc = "    \"height_created\","]
4056#[doc = "    \"height_included\","]
4057#[doc = "    \"outcome_root\","]
4058#[doc = "    \"outgoing_receipts_root\","]
4059#[doc = "    \"prev_block_hash\","]
4060#[doc = "    \"prev_state_root\","]
4061#[doc = "    \"shard_id\","]
4062#[doc = "    \"signature\","]
4063#[doc = "    \"tx_root\","]
4064#[doc = "    \"validator_proposals\""]
4065#[doc = "  ],"]
4066#[doc = "  \"properties\": {"]
4067#[doc = "    \"balance_burnt\": {"]
4068#[doc = "      \"$ref\": \"#/components/schemas/NearToken\""]
4069#[doc = "    },"]
4070#[doc = "    \"bandwidth_requests\": {"]
4071#[doc = "      \"anyOf\": ["]
4072#[doc = "        {"]
4073#[doc = "          \"$ref\": \"#/components/schemas/BandwidthRequests\""]
4074#[doc = "        },"]
4075#[doc = "        {"]
4076#[doc = "          \"type\": \"null\""]
4077#[doc = "        }"]
4078#[doc = "      ]"]
4079#[doc = "    },"]
4080#[doc = "    \"chunk_hash\": {"]
4081#[doc = "      \"$ref\": \"#/components/schemas/CryptoHash\""]
4082#[doc = "    },"]
4083#[doc = "    \"congestion_info\": {"]
4084#[doc = "      \"anyOf\": ["]
4085#[doc = "        {"]
4086#[doc = "          \"$ref\": \"#/components/schemas/CongestionInfoView\""]
4087#[doc = "        },"]
4088#[doc = "        {"]
4089#[doc = "          \"type\": \"null\""]
4090#[doc = "        }"]
4091#[doc = "      ]"]
4092#[doc = "    },"]
4093#[doc = "    \"encoded_length\": {"]
4094#[doc = "      \"type\": \"integer\","]
4095#[doc = "      \"format\": \"uint64\","]
4096#[doc = "      \"minimum\": 0.0"]
4097#[doc = "    },"]
4098#[doc = "    \"encoded_merkle_root\": {"]
4099#[doc = "      \"$ref\": \"#/components/schemas/CryptoHash\""]
4100#[doc = "    },"]
4101#[doc = "    \"gas_limit\": {"]
4102#[doc = "      \"$ref\": \"#/components/schemas/NearGas\""]
4103#[doc = "    },"]
4104#[doc = "    \"gas_used\": {"]
4105#[doc = "      \"$ref\": \"#/components/schemas/NearGas\""]
4106#[doc = "    },"]
4107#[doc = "    \"height_created\": {"]
4108#[doc = "      \"type\": \"integer\","]
4109#[doc = "      \"format\": \"uint64\","]
4110#[doc = "      \"minimum\": 0.0"]
4111#[doc = "    },"]
4112#[doc = "    \"height_included\": {"]
4113#[doc = "      \"type\": \"integer\","]
4114#[doc = "      \"format\": \"uint64\","]
4115#[doc = "      \"minimum\": 0.0"]
4116#[doc = "    },"]
4117#[doc = "    \"outcome_root\": {"]
4118#[doc = "      \"$ref\": \"#/components/schemas/CryptoHash\""]
4119#[doc = "    },"]
4120#[doc = "    \"outgoing_receipts_root\": {"]
4121#[doc = "      \"$ref\": \"#/components/schemas/CryptoHash\""]
4122#[doc = "    },"]
4123#[doc = "    \"prev_block_hash\": {"]
4124#[doc = "      \"$ref\": \"#/components/schemas/CryptoHash\""]
4125#[doc = "    },"]
4126#[doc = "    \"prev_state_root\": {"]
4127#[doc = "      \"$ref\": \"#/components/schemas/CryptoHash\""]
4128#[doc = "    },"]
4129#[doc = "    \"rent_paid\": {"]
4130#[doc = "      \"description\": \"TODO(2271): deprecated.\","]
4131#[doc = "      \"default\": \"0\","]
4132#[doc = "      \"allOf\": ["]
4133#[doc = "        {"]
4134#[doc = "          \"$ref\": \"#/components/schemas/NearToken\""]
4135#[doc = "        }"]
4136#[doc = "      ]"]
4137#[doc = "    },"]
4138#[doc = "    \"shard_id\": {"]
4139#[doc = "      \"$ref\": \"#/components/schemas/ShardId\""]
4140#[doc = "    },"]
4141#[doc = "    \"signature\": {"]
4142#[doc = "      \"$ref\": \"#/components/schemas/Signature\""]
4143#[doc = "    },"]
4144#[doc = "    \"tx_root\": {"]
4145#[doc = "      \"$ref\": \"#/components/schemas/CryptoHash\""]
4146#[doc = "    },"]
4147#[doc = "    \"validator_proposals\": {"]
4148#[doc = "      \"type\": \"array\","]
4149#[doc = "      \"items\": {"]
4150#[doc = "        \"$ref\": \"#/components/schemas/ValidatorStakeView\""]
4151#[doc = "      }"]
4152#[doc = "    },"]
4153#[doc = "    \"validator_reward\": {"]
4154#[doc = "      \"description\": \"TODO(2271): deprecated.\","]
4155#[doc = "      \"default\": \"0\","]
4156#[doc = "      \"allOf\": ["]
4157#[doc = "        {"]
4158#[doc = "          \"$ref\": \"#/components/schemas/NearToken\""]
4159#[doc = "        }"]
4160#[doc = "      ]"]
4161#[doc = "    }"]
4162#[doc = "  }"]
4163#[doc = "}"]
4164#[doc = r" ```"]
4165#[doc = r" </details>"]
4166#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
4167pub struct ChunkHeaderView {
4168    pub balance_burnt: NearToken,
4169    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
4170    pub bandwidth_requests: ::std::option::Option<BandwidthRequests>,
4171    pub chunk_hash: CryptoHash,
4172    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
4173    pub congestion_info: ::std::option::Option<CongestionInfoView>,
4174    pub encoded_length: u64,
4175    pub encoded_merkle_root: CryptoHash,
4176    pub gas_limit: NearGas,
4177    pub gas_used: NearGas,
4178    pub height_created: u64,
4179    pub height_included: u64,
4180    pub outcome_root: CryptoHash,
4181    pub outgoing_receipts_root: CryptoHash,
4182    pub prev_block_hash: CryptoHash,
4183    pub prev_state_root: CryptoHash,
4184    #[doc = "TODO(2271): deprecated."]
4185    #[serde(default = "defaults::chunk_header_view_rent_paid")]
4186    pub rent_paid: NearToken,
4187    pub shard_id: ShardId,
4188    pub signature: Signature,
4189    pub tx_root: CryptoHash,
4190    pub validator_proposals: ::std::vec::Vec<ValidatorStakeView>,
4191    #[doc = "TODO(2271): deprecated."]
4192    #[serde(default = "defaults::chunk_header_view_validator_reward")]
4193    pub validator_reward: NearToken,
4194}
4195impl ::std::convert::From<&ChunkHeaderView> for ChunkHeaderView {
4196    fn from(value: &ChunkHeaderView) -> Self {
4197        value.clone()
4198    }
4199}
4200#[doc = "Configuration for a cloud-based archival reader."]
4201#[doc = r""]
4202#[doc = r" <details><summary>JSON schema</summary>"]
4203#[doc = r""]
4204#[doc = r" ```json"]
4205#[doc = "{"]
4206#[doc = "  \"description\": \"Configuration for a cloud-based archival reader.\","]
4207#[doc = "  \"type\": \"object\","]
4208#[doc = "  \"required\": ["]
4209#[doc = "    \"cloud_storage\""]
4210#[doc = "  ],"]
4211#[doc = "  \"properties\": {"]
4212#[doc = "    \"cloud_storage\": {"]
4213#[doc = "      \"description\": \"Configures the external storage used by the archival node.\","]
4214#[doc = "      \"allOf\": ["]
4215#[doc = "        {"]
4216#[doc = "          \"$ref\": \"#/components/schemas/CloudStorageConfig\""]
4217#[doc = "        }"]
4218#[doc = "      ]"]
4219#[doc = "    }"]
4220#[doc = "  }"]
4221#[doc = "}"]
4222#[doc = r" ```"]
4223#[doc = r" </details>"]
4224#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
4225pub struct CloudArchivalReaderConfig {
4226    #[doc = "Configures the external storage used by the archival node."]
4227    pub cloud_storage: CloudStorageConfig,
4228}
4229impl ::std::convert::From<&CloudArchivalReaderConfig> for CloudArchivalReaderConfig {
4230    fn from(value: &CloudArchivalReaderConfig) -> Self {
4231        value.clone()
4232    }
4233}
4234#[doc = "Configuration for a cloud-based archival writer. If this config is present, the writer is enabled and\nwrites chunk-related data based on the tracked shards. This config also controls additional archival\nbehavior such as block data and polling interval."]
4235#[doc = r""]
4236#[doc = r" <details><summary>JSON schema</summary>"]
4237#[doc = r""]
4238#[doc = r" ```json"]
4239#[doc = "{"]
4240#[doc = "  \"description\": \"Configuration for a cloud-based archival writer. If this config is present, the writer is enabled and\\nwrites chunk-related data based on the tracked shards. This config also controls additional archival\\nbehavior such as block data and polling interval.\","]
4241#[doc = "  \"type\": \"object\","]
4242#[doc = "  \"required\": ["]
4243#[doc = "    \"cloud_storage\""]
4244#[doc = "  ],"]
4245#[doc = "  \"properties\": {"]
4246#[doc = "    \"archive_block_data\": {"]
4247#[doc = "      \"description\": \"Determines whether block-related data should be written to cloud storage.\","]
4248#[doc = "      \"default\": false,"]
4249#[doc = "      \"type\": \"boolean\""]
4250#[doc = "    },"]
4251#[doc = "    \"cloud_storage\": {"]
4252#[doc = "      \"description\": \"Configures the external storage used by the archival node.\","]
4253#[doc = "      \"allOf\": ["]
4254#[doc = "        {"]
4255#[doc = "          \"$ref\": \"#/components/schemas/CloudStorageConfig\""]
4256#[doc = "        }"]
4257#[doc = "      ]"]
4258#[doc = "    },"]
4259#[doc = "    \"polling_interval\": {"]
4260#[doc = "      \"description\": \"Interval at which the system checks for new blocks or chunks to archive.\","]
4261#[doc = "      \"default\": {"]
4262#[doc = "        \"nanos\": 0,"]
4263#[doc = "        \"secs\": 1"]
4264#[doc = "      },"]
4265#[doc = "      \"allOf\": ["]
4266#[doc = "        {"]
4267#[doc = "          \"$ref\": \"#/components/schemas/DurationAsStdSchemaProvider\""]
4268#[doc = "        }"]
4269#[doc = "      ]"]
4270#[doc = "    }"]
4271#[doc = "  }"]
4272#[doc = "}"]
4273#[doc = r" ```"]
4274#[doc = r" </details>"]
4275#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
4276pub struct CloudArchivalWriterConfig {
4277    #[doc = "Determines whether block-related data should be written to cloud storage."]
4278    #[serde(default)]
4279    pub archive_block_data: bool,
4280    #[doc = "Configures the external storage used by the archival node."]
4281    pub cloud_storage: CloudStorageConfig,
4282    #[doc = "Interval at which the system checks for new blocks or chunks to archive."]
4283    #[serde(default = "defaults::cloud_archival_writer_config_polling_interval")]
4284    pub polling_interval: DurationAsStdSchemaProvider,
4285}
4286impl ::std::convert::From<&CloudArchivalWriterConfig> for CloudArchivalWriterConfig {
4287    fn from(value: &CloudArchivalWriterConfig) -> Self {
4288        value.clone()
4289    }
4290}
4291#[doc = "Configures the external storage used by the archival node."]
4292#[doc = r""]
4293#[doc = r" <details><summary>JSON schema</summary>"]
4294#[doc = r""]
4295#[doc = r" ```json"]
4296#[doc = "{"]
4297#[doc = "  \"description\": \"Configures the external storage used by the archival node.\","]
4298#[doc = "  \"type\": \"object\","]
4299#[doc = "  \"required\": ["]
4300#[doc = "    \"storage\""]
4301#[doc = "  ],"]
4302#[doc = "  \"properties\": {"]
4303#[doc = "    \"credentials_file\": {"]
4304#[doc = "      \"description\": \"Location of a json file with credentials allowing access to the bucket.\","]
4305#[doc = "      \"type\": ["]
4306#[doc = "        \"string\","]
4307#[doc = "        \"null\""]
4308#[doc = "      ]"]
4309#[doc = "    },"]
4310#[doc = "    \"storage\": {"]
4311#[doc = "      \"description\": \"The storage to persist the archival data.\","]
4312#[doc = "      \"allOf\": ["]
4313#[doc = "        {"]
4314#[doc = "          \"$ref\": \"#/components/schemas/ExternalStorageLocation\""]
4315#[doc = "        }"]
4316#[doc = "      ]"]
4317#[doc = "    }"]
4318#[doc = "  }"]
4319#[doc = "}"]
4320#[doc = r" ```"]
4321#[doc = r" </details>"]
4322#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
4323pub struct CloudStorageConfig {
4324    #[doc = "Location of a json file with credentials allowing access to the bucket."]
4325    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
4326    pub credentials_file: ::std::option::Option<::std::string::String>,
4327    #[doc = "The storage to persist the archival data."]
4328    pub storage: ExternalStorageLocation,
4329}
4330impl ::std::convert::From<&CloudStorageConfig> for CloudStorageConfig {
4331    fn from(value: &CloudStorageConfig) -> Self {
4332        value.clone()
4333    }
4334}
4335#[doc = "`CompilationError`"]
4336#[doc = r""]
4337#[doc = r" <details><summary>JSON schema</summary>"]
4338#[doc = r""]
4339#[doc = r" ```json"]
4340#[doc = "{"]
4341#[doc = "  \"oneOf\": ["]
4342#[doc = "    {"]
4343#[doc = "      \"type\": \"object\","]
4344#[doc = "      \"required\": ["]
4345#[doc = "        \"CodeDoesNotExist\""]
4346#[doc = "      ],"]
4347#[doc = "      \"properties\": {"]
4348#[doc = "        \"CodeDoesNotExist\": {"]
4349#[doc = "          \"type\": \"object\","]
4350#[doc = "          \"required\": ["]
4351#[doc = "            \"account_id\""]
4352#[doc = "          ],"]
4353#[doc = "          \"properties\": {"]
4354#[doc = "            \"account_id\": {"]
4355#[doc = "              \"$ref\": \"#/components/schemas/AccountId\""]
4356#[doc = "            }"]
4357#[doc = "          }"]
4358#[doc = "        }"]
4359#[doc = "      },"]
4360#[doc = "      \"additionalProperties\": false"]
4361#[doc = "    },"]
4362#[doc = "    {"]
4363#[doc = "      \"type\": \"object\","]
4364#[doc = "      \"required\": ["]
4365#[doc = "        \"PrepareError\""]
4366#[doc = "      ],"]
4367#[doc = "      \"properties\": {"]
4368#[doc = "        \"PrepareError\": {"]
4369#[doc = "          \"$ref\": \"#/components/schemas/PrepareError\""]
4370#[doc = "        }"]
4371#[doc = "      },"]
4372#[doc = "      \"additionalProperties\": false"]
4373#[doc = "    },"]
4374#[doc = "    {"]
4375#[doc = "      \"description\": \"This is for defense in depth.\\nWe expect our runtime-independent preparation code to fully catch all invalid wasms,\\nbut, if it ever misses something we’ll emit this error\","]
4376#[doc = "      \"type\": \"object\","]
4377#[doc = "      \"required\": ["]
4378#[doc = "        \"WasmerCompileError\""]
4379#[doc = "      ],"]
4380#[doc = "      \"properties\": {"]
4381#[doc = "        \"WasmerCompileError\": {"]
4382#[doc = "          \"type\": \"object\","]
4383#[doc = "          \"required\": ["]
4384#[doc = "            \"msg\""]
4385#[doc = "          ],"]
4386#[doc = "          \"properties\": {"]
4387#[doc = "            \"msg\": {"]
4388#[doc = "              \"type\": \"string\""]
4389#[doc = "            }"]
4390#[doc = "          }"]
4391#[doc = "        }"]
4392#[doc = "      },"]
4393#[doc = "      \"additionalProperties\": false"]
4394#[doc = "    }"]
4395#[doc = "  ]"]
4396#[doc = "}"]
4397#[doc = r" ```"]
4398#[doc = r" </details>"]
4399#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
4400pub enum CompilationError {
4401    CodeDoesNotExist {
4402        account_id: AccountId,
4403    },
4404    PrepareError(PrepareError),
4405    #[doc = "This is for defense in depth.\nWe expect our runtime-independent preparation code to fully catch all invalid wasms,\nbut, if it ever misses something we’ll emit this error"]
4406    WasmerCompileError {
4407        msg: ::std::string::String,
4408    },
4409}
4410impl ::std::convert::From<&Self> for CompilationError {
4411    fn from(value: &CompilationError) -> Self {
4412        value.clone()
4413    }
4414}
4415impl ::std::convert::From<PrepareError> for CompilationError {
4416    fn from(value: PrepareError) -> Self {
4417        Self::PrepareError(value)
4418    }
4419}
4420#[doc = "The configuration for congestion control. More info about congestion [here](https://near.github.io/nearcore/architecture/how/receipt-congestion.html?highlight=congestion#receipt-congestion)"]
4421#[doc = r""]
4422#[doc = r" <details><summary>JSON schema</summary>"]
4423#[doc = r""]
4424#[doc = r" ```json"]
4425#[doc = "{"]
4426#[doc = "  \"description\": \"The configuration for congestion control. More info about congestion [here](https://near.github.io/nearcore/architecture/how/receipt-congestion.html?highlight=congestion#receipt-congestion)\","]
4427#[doc = "  \"type\": \"object\","]
4428#[doc = "  \"required\": ["]
4429#[doc = "    \"allowed_shard_outgoing_gas\","]
4430#[doc = "    \"max_congestion_incoming_gas\","]
4431#[doc = "    \"max_congestion_memory_consumption\","]
4432#[doc = "    \"max_congestion_missed_chunks\","]
4433#[doc = "    \"max_congestion_outgoing_gas\","]
4434#[doc = "    \"max_outgoing_gas\","]
4435#[doc = "    \"max_tx_gas\","]
4436#[doc = "    \"min_outgoing_gas\","]
4437#[doc = "    \"min_tx_gas\","]
4438#[doc = "    \"outgoing_receipts_big_size_limit\","]
4439#[doc = "    \"outgoing_receipts_usual_size_limit\","]
4440#[doc = "    \"reject_tx_congestion_threshold\""]
4441#[doc = "  ],"]
4442#[doc = "  \"properties\": {"]
4443#[doc = "    \"allowed_shard_outgoing_gas\": {"]
4444#[doc = "      \"description\": \"How much gas the chosen allowed shard can send to a 100% congested shard.\\n\\nSee [`CongestionControlConfig`] for more details.\","]
4445#[doc = "      \"allOf\": ["]
4446#[doc = "        {"]
4447#[doc = "          \"$ref\": \"#/components/schemas/NearGas\""]
4448#[doc = "        }"]
4449#[doc = "      ]"]
4450#[doc = "    },"]
4451#[doc = "    \"max_congestion_incoming_gas\": {"]
4452#[doc = "      \"description\": \"How much gas in delayed receipts of a shard is 100% incoming congestion.\\n\\nSee [`CongestionControlConfig`] for more details.\","]
4453#[doc = "      \"allOf\": ["]
4454#[doc = "        {"]
4455#[doc = "          \"$ref\": \"#/components/schemas/NearGas\""]
4456#[doc = "        }"]
4457#[doc = "      ]"]
4458#[doc = "    },"]
4459#[doc = "    \"max_congestion_memory_consumption\": {"]
4460#[doc = "      \"description\": \"How much memory space of all delayed and buffered receipts in a shard is\\nconsidered 100% congested.\\n\\nSee [`CongestionControlConfig`] for more details.\","]
4461#[doc = "      \"type\": \"integer\","]
4462#[doc = "      \"format\": \"uint64\","]
4463#[doc = "      \"minimum\": 0.0"]
4464#[doc = "    },"]
4465#[doc = "    \"max_congestion_missed_chunks\": {"]
4466#[doc = "      \"description\": \"How many missed chunks in a row in a shard is considered 100% congested.\","]
4467#[doc = "      \"type\": \"integer\","]
4468#[doc = "      \"format\": \"uint64\","]
4469#[doc = "      \"minimum\": 0.0"]
4470#[doc = "    },"]
4471#[doc = "    \"max_congestion_outgoing_gas\": {"]
4472#[doc = "      \"description\": \"How much gas in outgoing buffered receipts of a shard is 100% congested.\\n\\nOutgoing congestion contributes to overall congestion, which reduces how\\nmuch other shards are allowed to forward to this shard.\","]
4473#[doc = "      \"allOf\": ["]
4474#[doc = "        {"]
4475#[doc = "          \"$ref\": \"#/components/schemas/NearGas\""]
4476#[doc = "        }"]
4477#[doc = "      ]"]
4478#[doc = "    },"]
4479#[doc = "    \"max_outgoing_gas\": {"]
4480#[doc = "      \"description\": \"The maximum amount of gas attached to receipts a shard can forward to\\nanother shard per chunk.\\n\\nSee [`CongestionControlConfig`] for more details.\","]
4481#[doc = "      \"allOf\": ["]
4482#[doc = "        {"]
4483#[doc = "          \"$ref\": \"#/components/schemas/NearGas\""]
4484#[doc = "        }"]
4485#[doc = "      ]"]
4486#[doc = "    },"]
4487#[doc = "    \"max_tx_gas\": {"]
4488#[doc = "      \"description\": \"The maximum amount of gas in a chunk spent on converting new transactions to\\nreceipts.\\n\\nSee [`CongestionControlConfig`] for more details.\","]
4489#[doc = "      \"allOf\": ["]
4490#[doc = "        {"]
4491#[doc = "          \"$ref\": \"#/components/schemas/NearGas\""]
4492#[doc = "        }"]
4493#[doc = "      ]"]
4494#[doc = "    },"]
4495#[doc = "    \"min_outgoing_gas\": {"]
4496#[doc = "      \"description\": \"The minimum gas each shard can send to a shard that is not fully congested.\\n\\nSee [`CongestionControlConfig`] for more details.\","]
4497#[doc = "      \"allOf\": ["]
4498#[doc = "        {"]
4499#[doc = "          \"$ref\": \"#/components/schemas/NearGas\""]
4500#[doc = "        }"]
4501#[doc = "      ]"]
4502#[doc = "    },"]
4503#[doc = "    \"min_tx_gas\": {"]
4504#[doc = "      \"description\": \"The minimum amount of gas in a chunk spent on converting new transactions\\nto receipts, as long as the receiving shard is not congested.\\n\\nSee [`CongestionControlConfig`] for more details.\","]
4505#[doc = "      \"allOf\": ["]
4506#[doc = "        {"]
4507#[doc = "          \"$ref\": \"#/components/schemas/NearGas\""]
4508#[doc = "        }"]
4509#[doc = "      ]"]
4510#[doc = "    },"]
4511#[doc = "    \"outgoing_receipts_big_size_limit\": {"]
4512#[doc = "      \"description\": \"Large size limit for outgoing receipts to a shard, used when it's safe\\nto send a lot of receipts without making the state witness too large.\\nIt limits the total sum of outgoing receipts, not individual receipts.\","]
4513#[doc = "      \"type\": \"integer\","]
4514#[doc = "      \"format\": \"uint64\","]
4515#[doc = "      \"minimum\": 0.0"]
4516#[doc = "    },"]
4517#[doc = "    \"outgoing_receipts_usual_size_limit\": {"]
4518#[doc = "      \"description\": \"The standard size limit for outgoing receipts aimed at a single shard.\\nThis limit is pretty small to keep the size of source_receipt_proofs under control.\\nIt limits the total sum of outgoing receipts, not individual receipts.\","]
4519#[doc = "      \"type\": \"integer\","]
4520#[doc = "      \"format\": \"uint64\","]
4521#[doc = "      \"minimum\": 0.0"]
4522#[doc = "    },"]
4523#[doc = "    \"reject_tx_congestion_threshold\": {"]
4524#[doc = "      \"description\": \"How much congestion a shard can tolerate before it stops all shards from\\naccepting new transactions with the receiver set to the congested shard.\","]
4525#[doc = "      \"type\": \"number\","]
4526#[doc = "      \"format\": \"double\""]
4527#[doc = "    }"]
4528#[doc = "  }"]
4529#[doc = "}"]
4530#[doc = r" ```"]
4531#[doc = r" </details>"]
4532#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
4533pub struct CongestionControlConfigView {
4534    #[doc = "How much gas the chosen allowed shard can send to a 100% congested shard.\n\nSee [`CongestionControlConfig`] for more details."]
4535    pub allowed_shard_outgoing_gas: NearGas,
4536    #[doc = "How much gas in delayed receipts of a shard is 100% incoming congestion.\n\nSee [`CongestionControlConfig`] for more details."]
4537    pub max_congestion_incoming_gas: NearGas,
4538    #[doc = "How much memory space of all delayed and buffered receipts in a shard is\nconsidered 100% congested.\n\nSee [`CongestionControlConfig`] for more details."]
4539    pub max_congestion_memory_consumption: u64,
4540    #[doc = "How many missed chunks in a row in a shard is considered 100% congested."]
4541    pub max_congestion_missed_chunks: u64,
4542    #[doc = "How much gas in outgoing buffered receipts of a shard is 100% congested.\n\nOutgoing congestion contributes to overall congestion, which reduces how\nmuch other shards are allowed to forward to this shard."]
4543    pub max_congestion_outgoing_gas: NearGas,
4544    #[doc = "The maximum amount of gas attached to receipts a shard can forward to\nanother shard per chunk.\n\nSee [`CongestionControlConfig`] for more details."]
4545    pub max_outgoing_gas: NearGas,
4546    #[doc = "The maximum amount of gas in a chunk spent on converting new transactions to\nreceipts.\n\nSee [`CongestionControlConfig`] for more details."]
4547    pub max_tx_gas: NearGas,
4548    #[doc = "The minimum gas each shard can send to a shard that is not fully congested.\n\nSee [`CongestionControlConfig`] for more details."]
4549    pub min_outgoing_gas: NearGas,
4550    #[doc = "The minimum amount of gas in a chunk spent on converting new transactions\nto receipts, as long as the receiving shard is not congested.\n\nSee [`CongestionControlConfig`] for more details."]
4551    pub min_tx_gas: NearGas,
4552    #[doc = "Large size limit for outgoing receipts to a shard, used when it's safe\nto send a lot of receipts without making the state witness too large.\nIt limits the total sum of outgoing receipts, not individual receipts."]
4553    pub outgoing_receipts_big_size_limit: u64,
4554    #[doc = "The standard size limit for outgoing receipts aimed at a single shard.\nThis limit is pretty small to keep the size of source_receipt_proofs under control.\nIt limits the total sum of outgoing receipts, not individual receipts."]
4555    pub outgoing_receipts_usual_size_limit: u64,
4556    pub reject_tx_congestion_threshold: f64,
4557}
4558impl ::std::convert::From<&CongestionControlConfigView> for CongestionControlConfigView {
4559    fn from(value: &CongestionControlConfigView) -> Self {
4560        value.clone()
4561    }
4562}
4563#[doc = "Stores the congestion level of a shard. More info about congestion [here](https://near.github.io/nearcore/architecture/how/receipt-congestion.html?highlight=congestion#receipt-congestion)"]
4564#[doc = r""]
4565#[doc = r" <details><summary>JSON schema</summary>"]
4566#[doc = r""]
4567#[doc = r" ```json"]
4568#[doc = "{"]
4569#[doc = "  \"description\": \"Stores the congestion level of a shard. More info about congestion [here](https://near.github.io/nearcore/architecture/how/receipt-congestion.html?highlight=congestion#receipt-congestion)\","]
4570#[doc = "  \"type\": \"object\","]
4571#[doc = "  \"required\": ["]
4572#[doc = "    \"allowed_shard\","]
4573#[doc = "    \"buffered_receipts_gas\","]
4574#[doc = "    \"delayed_receipts_gas\","]
4575#[doc = "    \"receipt_bytes\""]
4576#[doc = "  ],"]
4577#[doc = "  \"properties\": {"]
4578#[doc = "    \"allowed_shard\": {"]
4579#[doc = "      \"type\": \"integer\","]
4580#[doc = "      \"format\": \"uint16\","]
4581#[doc = "      \"maximum\": 65535.0,"]
4582#[doc = "      \"minimum\": 0.0"]
4583#[doc = "    },"]
4584#[doc = "    \"buffered_receipts_gas\": {"]
4585#[doc = "      \"type\": \"string\""]
4586#[doc = "    },"]
4587#[doc = "    \"delayed_receipts_gas\": {"]
4588#[doc = "      \"type\": \"string\""]
4589#[doc = "    },"]
4590#[doc = "    \"receipt_bytes\": {"]
4591#[doc = "      \"type\": \"integer\","]
4592#[doc = "      \"format\": \"uint64\","]
4593#[doc = "      \"minimum\": 0.0"]
4594#[doc = "    }"]
4595#[doc = "  }"]
4596#[doc = "}"]
4597#[doc = r" ```"]
4598#[doc = r" </details>"]
4599#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
4600pub struct CongestionInfoView {
4601    pub allowed_shard: u16,
4602    pub buffered_receipts_gas: ::std::string::String,
4603    pub delayed_receipts_gas: ::std::string::String,
4604    pub receipt_bytes: u64,
4605}
4606impl ::std::convert::From<&CongestionInfoView> for CongestionInfoView {
4607    fn from(value: &CongestionInfoView) -> Self {
4608        value.clone()
4609    }
4610}
4611#[doc = "`ContractCodeChangesByBlockIdChangesType`"]
4612#[doc = r""]
4613#[doc = r" <details><summary>JSON schema</summary>"]
4614#[doc = r""]
4615#[doc = r" ```json"]
4616#[doc = "{"]
4617#[doc = "  \"type\": \"string\","]
4618#[doc = "  \"enum\": ["]
4619#[doc = "    \"contract_code_changes\""]
4620#[doc = "  ]"]
4621#[doc = "}"]
4622#[doc = r" ```"]
4623#[doc = r" </details>"]
4624#[derive(
4625    :: serde :: Deserialize,
4626    :: serde :: Serialize,
4627    Clone,
4628    Copy,
4629    Debug,
4630    Eq,
4631    Hash,
4632    Ord,
4633    PartialEq,
4634    PartialOrd,
4635)]
4636pub enum ContractCodeChangesByBlockIdChangesType {
4637    #[serde(rename = "contract_code_changes")]
4638    ContractCodeChanges,
4639}
4640impl ::std::convert::From<&Self> for ContractCodeChangesByBlockIdChangesType {
4641    fn from(value: &ContractCodeChangesByBlockIdChangesType) -> Self {
4642        value.clone()
4643    }
4644}
4645impl ::std::fmt::Display for ContractCodeChangesByBlockIdChangesType {
4646    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
4647        match *self {
4648            Self::ContractCodeChanges => f.write_str("contract_code_changes"),
4649        }
4650    }
4651}
4652impl ::std::str::FromStr for ContractCodeChangesByBlockIdChangesType {
4653    type Err = self::error::ConversionError;
4654    fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
4655        match value {
4656            "contract_code_changes" => Ok(Self::ContractCodeChanges),
4657            _ => Err("invalid value".into()),
4658        }
4659    }
4660}
4661impl ::std::convert::TryFrom<&str> for ContractCodeChangesByBlockIdChangesType {
4662    type Error = self::error::ConversionError;
4663    fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
4664        value.parse()
4665    }
4666}
4667impl ::std::convert::TryFrom<&::std::string::String> for ContractCodeChangesByBlockIdChangesType {
4668    type Error = self::error::ConversionError;
4669    fn try_from(
4670        value: &::std::string::String,
4671    ) -> ::std::result::Result<Self, self::error::ConversionError> {
4672        value.parse()
4673    }
4674}
4675impl ::std::convert::TryFrom<::std::string::String> for ContractCodeChangesByBlockIdChangesType {
4676    type Error = self::error::ConversionError;
4677    fn try_from(
4678        value: ::std::string::String,
4679    ) -> ::std::result::Result<Self, self::error::ConversionError> {
4680        value.parse()
4681    }
4682}
4683#[doc = "`ContractCodeChangesByFinalityChangesType`"]
4684#[doc = r""]
4685#[doc = r" <details><summary>JSON schema</summary>"]
4686#[doc = r""]
4687#[doc = r" ```json"]
4688#[doc = "{"]
4689#[doc = "  \"type\": \"string\","]
4690#[doc = "  \"enum\": ["]
4691#[doc = "    \"contract_code_changes\""]
4692#[doc = "  ]"]
4693#[doc = "}"]
4694#[doc = r" ```"]
4695#[doc = r" </details>"]
4696#[derive(
4697    :: serde :: Deserialize,
4698    :: serde :: Serialize,
4699    Clone,
4700    Copy,
4701    Debug,
4702    Eq,
4703    Hash,
4704    Ord,
4705    PartialEq,
4706    PartialOrd,
4707)]
4708pub enum ContractCodeChangesByFinalityChangesType {
4709    #[serde(rename = "contract_code_changes")]
4710    ContractCodeChanges,
4711}
4712impl ::std::convert::From<&Self> for ContractCodeChangesByFinalityChangesType {
4713    fn from(value: &ContractCodeChangesByFinalityChangesType) -> Self {
4714        value.clone()
4715    }
4716}
4717impl ::std::fmt::Display for ContractCodeChangesByFinalityChangesType {
4718    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
4719        match *self {
4720            Self::ContractCodeChanges => f.write_str("contract_code_changes"),
4721        }
4722    }
4723}
4724impl ::std::str::FromStr for ContractCodeChangesByFinalityChangesType {
4725    type Err = self::error::ConversionError;
4726    fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
4727        match value {
4728            "contract_code_changes" => Ok(Self::ContractCodeChanges),
4729            _ => Err("invalid value".into()),
4730        }
4731    }
4732}
4733impl ::std::convert::TryFrom<&str> for ContractCodeChangesByFinalityChangesType {
4734    type Error = self::error::ConversionError;
4735    fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
4736        value.parse()
4737    }
4738}
4739impl ::std::convert::TryFrom<&::std::string::String> for ContractCodeChangesByFinalityChangesType {
4740    type Error = self::error::ConversionError;
4741    fn try_from(
4742        value: &::std::string::String,
4743    ) -> ::std::result::Result<Self, self::error::ConversionError> {
4744        value.parse()
4745    }
4746}
4747impl ::std::convert::TryFrom<::std::string::String> for ContractCodeChangesByFinalityChangesType {
4748    type Error = self::error::ConversionError;
4749    fn try_from(
4750        value: ::std::string::String,
4751    ) -> ::std::result::Result<Self, self::error::ConversionError> {
4752        value.parse()
4753    }
4754}
4755#[doc = "`ContractCodeChangesBySyncCheckpointChangesType`"]
4756#[doc = r""]
4757#[doc = r" <details><summary>JSON schema</summary>"]
4758#[doc = r""]
4759#[doc = r" ```json"]
4760#[doc = "{"]
4761#[doc = "  \"type\": \"string\","]
4762#[doc = "  \"enum\": ["]
4763#[doc = "    \"contract_code_changes\""]
4764#[doc = "  ]"]
4765#[doc = "}"]
4766#[doc = r" ```"]
4767#[doc = r" </details>"]
4768#[derive(
4769    :: serde :: Deserialize,
4770    :: serde :: Serialize,
4771    Clone,
4772    Copy,
4773    Debug,
4774    Eq,
4775    Hash,
4776    Ord,
4777    PartialEq,
4778    PartialOrd,
4779)]
4780pub enum ContractCodeChangesBySyncCheckpointChangesType {
4781    #[serde(rename = "contract_code_changes")]
4782    ContractCodeChanges,
4783}
4784impl ::std::convert::From<&Self> for ContractCodeChangesBySyncCheckpointChangesType {
4785    fn from(value: &ContractCodeChangesBySyncCheckpointChangesType) -> Self {
4786        value.clone()
4787    }
4788}
4789impl ::std::fmt::Display for ContractCodeChangesBySyncCheckpointChangesType {
4790    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
4791        match *self {
4792            Self::ContractCodeChanges => f.write_str("contract_code_changes"),
4793        }
4794    }
4795}
4796impl ::std::str::FromStr for ContractCodeChangesBySyncCheckpointChangesType {
4797    type Err = self::error::ConversionError;
4798    fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
4799        match value {
4800            "contract_code_changes" => Ok(Self::ContractCodeChanges),
4801            _ => Err("invalid value".into()),
4802        }
4803    }
4804}
4805impl ::std::convert::TryFrom<&str> for ContractCodeChangesBySyncCheckpointChangesType {
4806    type Error = self::error::ConversionError;
4807    fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
4808        value.parse()
4809    }
4810}
4811impl ::std::convert::TryFrom<&::std::string::String>
4812    for ContractCodeChangesBySyncCheckpointChangesType
4813{
4814    type Error = self::error::ConversionError;
4815    fn try_from(
4816        value: &::std::string::String,
4817    ) -> ::std::result::Result<Self, self::error::ConversionError> {
4818        value.parse()
4819    }
4820}
4821impl ::std::convert::TryFrom<::std::string::String>
4822    for ContractCodeChangesBySyncCheckpointChangesType
4823{
4824    type Error = self::error::ConversionError;
4825    fn try_from(
4826        value: ::std::string::String,
4827    ) -> ::std::result::Result<Self, self::error::ConversionError> {
4828        value.parse()
4829    }
4830}
4831#[doc = "A view of the contract code."]
4832#[doc = r""]
4833#[doc = r" <details><summary>JSON schema</summary>"]
4834#[doc = r""]
4835#[doc = r" ```json"]
4836#[doc = "{"]
4837#[doc = "  \"description\": \"A view of the contract code.\","]
4838#[doc = "  \"type\": \"object\","]
4839#[doc = "  \"required\": ["]
4840#[doc = "    \"code_base64\","]
4841#[doc = "    \"hash\""]
4842#[doc = "  ],"]
4843#[doc = "  \"properties\": {"]
4844#[doc = "    \"code_base64\": {"]
4845#[doc = "      \"type\": \"string\""]
4846#[doc = "    },"]
4847#[doc = "    \"hash\": {"]
4848#[doc = "      \"$ref\": \"#/components/schemas/CryptoHash\""]
4849#[doc = "    }"]
4850#[doc = "  }"]
4851#[doc = "}"]
4852#[doc = r" ```"]
4853#[doc = r" </details>"]
4854#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
4855pub struct ContractCodeView {
4856    pub code_base64: ::std::string::String,
4857    pub hash: CryptoHash,
4858}
4859impl ::std::convert::From<&ContractCodeView> for ContractCodeView {
4860    fn from(value: &ContractCodeView) -> Self {
4861        value.clone()
4862    }
4863}
4864#[doc = "Shows gas profile. More info [here](https://near.github.io/nearcore/architecture/gas/gas_profile.html?highlight=WASM_HOST_COST#example-transaction-gas-profile)."]
4865#[doc = r""]
4866#[doc = r" <details><summary>JSON schema</summary>"]
4867#[doc = r""]
4868#[doc = r" ```json"]
4869#[doc = "{"]
4870#[doc = "  \"description\": \"Shows gas profile. More info [here](https://near.github.io/nearcore/architecture/gas/gas_profile.html?highlight=WASM_HOST_COST#example-transaction-gas-profile).\","]
4871#[doc = "  \"type\": \"object\","]
4872#[doc = "  \"required\": ["]
4873#[doc = "    \"cost\","]
4874#[doc = "    \"cost_category\","]
4875#[doc = "    \"gas_used\""]
4876#[doc = "  ],"]
4877#[doc = "  \"properties\": {"]
4878#[doc = "    \"cost\": {"]
4879#[doc = "      \"type\": \"string\""]
4880#[doc = "    },"]
4881#[doc = "    \"cost_category\": {"]
4882#[doc = "      \"description\": \"Either ACTION_COST or WASM_HOST_COST.\","]
4883#[doc = "      \"type\": \"string\""]
4884#[doc = "    },"]
4885#[doc = "    \"gas_used\": {"]
4886#[doc = "      \"type\": \"string\""]
4887#[doc = "    }"]
4888#[doc = "  }"]
4889#[doc = "}"]
4890#[doc = r" ```"]
4891#[doc = r" </details>"]
4892#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
4893pub struct CostGasUsed {
4894    pub cost: ::std::string::String,
4895    #[doc = "Either ACTION_COST or WASM_HOST_COST."]
4896    pub cost_category: ::std::string::String,
4897    pub gas_used: ::std::string::String,
4898}
4899impl ::std::convert::From<&CostGasUsed> for CostGasUsed {
4900    fn from(value: &CostGasUsed) -> Self {
4901        value.clone()
4902    }
4903}
4904#[doc = "Create account action"]
4905#[doc = r""]
4906#[doc = r" <details><summary>JSON schema</summary>"]
4907#[doc = r""]
4908#[doc = r" ```json"]
4909#[doc = "{"]
4910#[doc = "  \"description\": \"Create account action\","]
4911#[doc = "  \"type\": \"object\""]
4912#[doc = "}"]
4913#[doc = r" ```"]
4914#[doc = r" </details>"]
4915#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
4916#[serde(transparent)]
4917pub struct CreateAccountAction(pub ::serde_json::Map<::std::string::String, ::serde_json::Value>);
4918impl ::std::ops::Deref for CreateAccountAction {
4919    type Target = ::serde_json::Map<::std::string::String, ::serde_json::Value>;
4920    fn deref(&self) -> &::serde_json::Map<::std::string::String, ::serde_json::Value> {
4921        &self.0
4922    }
4923}
4924impl ::std::convert::From<CreateAccountAction>
4925    for ::serde_json::Map<::std::string::String, ::serde_json::Value>
4926{
4927    fn from(value: CreateAccountAction) -> Self {
4928        value.0
4929    }
4930}
4931impl ::std::convert::From<&CreateAccountAction> for CreateAccountAction {
4932    fn from(value: &CreateAccountAction) -> Self {
4933        value.clone()
4934    }
4935}
4936impl ::std::convert::From<::serde_json::Map<::std::string::String, ::serde_json::Value>>
4937    for CreateAccountAction
4938{
4939    fn from(value: ::serde_json::Map<::std::string::String, ::serde_json::Value>) -> Self {
4940        Self(value)
4941    }
4942}
4943#[doc = "`CryptoHash`"]
4944#[doc = r""]
4945#[doc = r" <details><summary>JSON schema</summary>"]
4946#[doc = r""]
4947#[doc = r" ```json"]
4948#[doc = "{"]
4949#[doc = "  \"type\": \"string\""]
4950#[doc = "}"]
4951#[doc = r" ```"]
4952#[doc = r" </details>"]
4953#[derive(
4954    :: serde :: Deserialize,
4955    :: serde :: Serialize,
4956    Clone,
4957    Debug,
4958    Eq,
4959    Hash,
4960    Ord,
4961    PartialEq,
4962    PartialOrd,
4963)]
4964#[serde(transparent)]
4965pub struct CryptoHash(pub ::std::string::String);
4966impl ::std::ops::Deref for CryptoHash {
4967    type Target = ::std::string::String;
4968    fn deref(&self) -> &::std::string::String {
4969        &self.0
4970    }
4971}
4972impl ::std::convert::From<CryptoHash> for ::std::string::String {
4973    fn from(value: CryptoHash) -> Self {
4974        value.0
4975    }
4976}
4977impl ::std::convert::From<&CryptoHash> for CryptoHash {
4978    fn from(value: &CryptoHash) -> Self {
4979        value.clone()
4980    }
4981}
4982impl ::std::convert::From<::std::string::String> for CryptoHash {
4983    fn from(value: ::std::string::String) -> Self {
4984        Self(value)
4985    }
4986}
4987impl ::std::str::FromStr for CryptoHash {
4988    type Err = ::std::convert::Infallible;
4989    fn from_str(value: &str) -> ::std::result::Result<Self, Self::Err> {
4990        Ok(Self(value.to_string()))
4991    }
4992}
4993impl ::std::fmt::Display for CryptoHash {
4994    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
4995        self.0.fmt(f)
4996    }
4997}
4998#[doc = "Describes information about the current epoch validator"]
4999#[doc = r""]
5000#[doc = r" <details><summary>JSON schema</summary>"]
5001#[doc = r""]
5002#[doc = r" ```json"]
5003#[doc = "{"]
5004#[doc = "  \"description\": \"Describes information about the current epoch validator\","]
5005#[doc = "  \"type\": \"object\","]
5006#[doc = "  \"required\": ["]
5007#[doc = "    \"account_id\","]
5008#[doc = "    \"is_slashed\","]
5009#[doc = "    \"num_expected_blocks\","]
5010#[doc = "    \"num_produced_blocks\","]
5011#[doc = "    \"public_key\","]
5012#[doc = "    \"shards\","]
5013#[doc = "    \"stake\""]
5014#[doc = "  ],"]
5015#[doc = "  \"properties\": {"]
5016#[doc = "    \"account_id\": {"]
5017#[doc = "      \"$ref\": \"#/components/schemas/AccountId\""]
5018#[doc = "    },"]
5019#[doc = "    \"is_slashed\": {"]
5020#[doc = "      \"type\": \"boolean\""]
5021#[doc = "    },"]
5022#[doc = "    \"num_expected_blocks\": {"]
5023#[doc = "      \"type\": \"integer\","]
5024#[doc = "      \"format\": \"uint64\","]
5025#[doc = "      \"minimum\": 0.0"]
5026#[doc = "    },"]
5027#[doc = "    \"num_expected_chunks\": {"]
5028#[doc = "      \"default\": 0,"]
5029#[doc = "      \"type\": \"integer\","]
5030#[doc = "      \"format\": \"uint64\","]
5031#[doc = "      \"minimum\": 0.0"]
5032#[doc = "    },"]
5033#[doc = "    \"num_expected_chunks_per_shard\": {"]
5034#[doc = "      \"description\": \"Number of chunks this validator was expected to produce in each shard.\\nEach entry in the array corresponds to the shard in the `shards_produced` array.\","]
5035#[doc = "      \"default\": [],"]
5036#[doc = "      \"type\": \"array\","]
5037#[doc = "      \"items\": {"]
5038#[doc = "        \"type\": \"integer\","]
5039#[doc = "        \"format\": \"uint64\","]
5040#[doc = "        \"minimum\": 0.0"]
5041#[doc = "      }"]
5042#[doc = "    },"]
5043#[doc = "    \"num_expected_endorsements\": {"]
5044#[doc = "      \"default\": 0,"]
5045#[doc = "      \"type\": \"integer\","]
5046#[doc = "      \"format\": \"uint64\","]
5047#[doc = "      \"minimum\": 0.0"]
5048#[doc = "    },"]
5049#[doc = "    \"num_expected_endorsements_per_shard\": {"]
5050#[doc = "      \"description\": \"Number of chunks this validator was expected to validate and endorse in each shard.\\nEach entry in the array corresponds to the shard in the `shards_endorsed` array.\","]
5051#[doc = "      \"default\": [],"]
5052#[doc = "      \"type\": \"array\","]
5053#[doc = "      \"items\": {"]
5054#[doc = "        \"type\": \"integer\","]
5055#[doc = "        \"format\": \"uint64\","]
5056#[doc = "        \"minimum\": 0.0"]
5057#[doc = "      }"]
5058#[doc = "    },"]
5059#[doc = "    \"num_produced_blocks\": {"]
5060#[doc = "      \"type\": \"integer\","]
5061#[doc = "      \"format\": \"uint64\","]
5062#[doc = "      \"minimum\": 0.0"]
5063#[doc = "    },"]
5064#[doc = "    \"num_produced_chunks\": {"]
5065#[doc = "      \"default\": 0,"]
5066#[doc = "      \"type\": \"integer\","]
5067#[doc = "      \"format\": \"uint64\","]
5068#[doc = "      \"minimum\": 0.0"]
5069#[doc = "    },"]
5070#[doc = "    \"num_produced_chunks_per_shard\": {"]
5071#[doc = "      \"default\": [],"]
5072#[doc = "      \"type\": \"array\","]
5073#[doc = "      \"items\": {"]
5074#[doc = "        \"type\": \"integer\","]
5075#[doc = "        \"format\": \"uint64\","]
5076#[doc = "        \"minimum\": 0.0"]
5077#[doc = "      }"]
5078#[doc = "    },"]
5079#[doc = "    \"num_produced_endorsements\": {"]
5080#[doc = "      \"default\": 0,"]
5081#[doc = "      \"type\": \"integer\","]
5082#[doc = "      \"format\": \"uint64\","]
5083#[doc = "      \"minimum\": 0.0"]
5084#[doc = "    },"]
5085#[doc = "    \"num_produced_endorsements_per_shard\": {"]
5086#[doc = "      \"default\": [],"]
5087#[doc = "      \"type\": \"array\","]
5088#[doc = "      \"items\": {"]
5089#[doc = "        \"type\": \"integer\","]
5090#[doc = "        \"format\": \"uint64\","]
5091#[doc = "        \"minimum\": 0.0"]
5092#[doc = "      }"]
5093#[doc = "    },"]
5094#[doc = "    \"public_key\": {"]
5095#[doc = "      \"$ref\": \"#/components/schemas/PublicKey\""]
5096#[doc = "    },"]
5097#[doc = "    \"shards\": {"]
5098#[doc = "      \"description\": \"Shards this validator is assigned to as chunk producer in the current epoch.\","]
5099#[doc = "      \"type\": \"array\","]
5100#[doc = "      \"items\": {"]
5101#[doc = "        \"$ref\": \"#/components/schemas/ShardId\""]
5102#[doc = "      }"]
5103#[doc = "    },"]
5104#[doc = "    \"shards_endorsed\": {"]
5105#[doc = "      \"description\": \"Shards this validator is assigned to as chunk validator in the current epoch.\","]
5106#[doc = "      \"default\": [],"]
5107#[doc = "      \"type\": \"array\","]
5108#[doc = "      \"items\": {"]
5109#[doc = "        \"$ref\": \"#/components/schemas/ShardId\""]
5110#[doc = "      }"]
5111#[doc = "    },"]
5112#[doc = "    \"stake\": {"]
5113#[doc = "      \"$ref\": \"#/components/schemas/NearToken\""]
5114#[doc = "    }"]
5115#[doc = "  }"]
5116#[doc = "}"]
5117#[doc = r" ```"]
5118#[doc = r" </details>"]
5119#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
5120pub struct CurrentEpochValidatorInfo {
5121    pub account_id: AccountId,
5122    pub is_slashed: bool,
5123    pub num_expected_blocks: u64,
5124    #[serde(default)]
5125    pub num_expected_chunks: u64,
5126    #[doc = "Number of chunks this validator was expected to produce in each shard.\nEach entry in the array corresponds to the shard in the `shards_produced` array."]
5127    #[serde(default, skip_serializing_if = "::std::vec::Vec::is_empty")]
5128    pub num_expected_chunks_per_shard: ::std::vec::Vec<u64>,
5129    #[serde(default)]
5130    pub num_expected_endorsements: u64,
5131    #[doc = "Number of chunks this validator was expected to validate and endorse in each shard.\nEach entry in the array corresponds to the shard in the `shards_endorsed` array."]
5132    #[serde(default, skip_serializing_if = "::std::vec::Vec::is_empty")]
5133    pub num_expected_endorsements_per_shard: ::std::vec::Vec<u64>,
5134    pub num_produced_blocks: u64,
5135    #[serde(default)]
5136    pub num_produced_chunks: u64,
5137    #[serde(default, skip_serializing_if = "::std::vec::Vec::is_empty")]
5138    pub num_produced_chunks_per_shard: ::std::vec::Vec<u64>,
5139    #[serde(default)]
5140    pub num_produced_endorsements: u64,
5141    #[serde(default, skip_serializing_if = "::std::vec::Vec::is_empty")]
5142    pub num_produced_endorsements_per_shard: ::std::vec::Vec<u64>,
5143    pub public_key: PublicKey,
5144    #[doc = "Shards this validator is assigned to as chunk producer in the current epoch."]
5145    pub shards: ::std::vec::Vec<ShardId>,
5146    #[doc = "Shards this validator is assigned to as chunk validator in the current epoch."]
5147    #[serde(default, skip_serializing_if = "::std::vec::Vec::is_empty")]
5148    pub shards_endorsed: ::std::vec::Vec<ShardId>,
5149    pub stake: NearToken,
5150}
5151impl ::std::convert::From<&CurrentEpochValidatorInfo> for CurrentEpochValidatorInfo {
5152    fn from(value: &CurrentEpochValidatorInfo) -> Self {
5153        value.clone()
5154    }
5155}
5156#[doc = "`DataChangesByBlockIdChangesType`"]
5157#[doc = r""]
5158#[doc = r" <details><summary>JSON schema</summary>"]
5159#[doc = r""]
5160#[doc = r" ```json"]
5161#[doc = "{"]
5162#[doc = "  \"type\": \"string\","]
5163#[doc = "  \"enum\": ["]
5164#[doc = "    \"data_changes\""]
5165#[doc = "  ]"]
5166#[doc = "}"]
5167#[doc = r" ```"]
5168#[doc = r" </details>"]
5169#[derive(
5170    :: serde :: Deserialize,
5171    :: serde :: Serialize,
5172    Clone,
5173    Copy,
5174    Debug,
5175    Eq,
5176    Hash,
5177    Ord,
5178    PartialEq,
5179    PartialOrd,
5180)]
5181pub enum DataChangesByBlockIdChangesType {
5182    #[serde(rename = "data_changes")]
5183    DataChanges,
5184}
5185impl ::std::convert::From<&Self> for DataChangesByBlockIdChangesType {
5186    fn from(value: &DataChangesByBlockIdChangesType) -> Self {
5187        value.clone()
5188    }
5189}
5190impl ::std::fmt::Display for DataChangesByBlockIdChangesType {
5191    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
5192        match *self {
5193            Self::DataChanges => f.write_str("data_changes"),
5194        }
5195    }
5196}
5197impl ::std::str::FromStr for DataChangesByBlockIdChangesType {
5198    type Err = self::error::ConversionError;
5199    fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
5200        match value {
5201            "data_changes" => Ok(Self::DataChanges),
5202            _ => Err("invalid value".into()),
5203        }
5204    }
5205}
5206impl ::std::convert::TryFrom<&str> for DataChangesByBlockIdChangesType {
5207    type Error = self::error::ConversionError;
5208    fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
5209        value.parse()
5210    }
5211}
5212impl ::std::convert::TryFrom<&::std::string::String> for DataChangesByBlockIdChangesType {
5213    type Error = self::error::ConversionError;
5214    fn try_from(
5215        value: &::std::string::String,
5216    ) -> ::std::result::Result<Self, self::error::ConversionError> {
5217        value.parse()
5218    }
5219}
5220impl ::std::convert::TryFrom<::std::string::String> for DataChangesByBlockIdChangesType {
5221    type Error = self::error::ConversionError;
5222    fn try_from(
5223        value: ::std::string::String,
5224    ) -> ::std::result::Result<Self, self::error::ConversionError> {
5225        value.parse()
5226    }
5227}
5228#[doc = "`DataChangesByFinalityChangesType`"]
5229#[doc = r""]
5230#[doc = r" <details><summary>JSON schema</summary>"]
5231#[doc = r""]
5232#[doc = r" ```json"]
5233#[doc = "{"]
5234#[doc = "  \"type\": \"string\","]
5235#[doc = "  \"enum\": ["]
5236#[doc = "    \"data_changes\""]
5237#[doc = "  ]"]
5238#[doc = "}"]
5239#[doc = r" ```"]
5240#[doc = r" </details>"]
5241#[derive(
5242    :: serde :: Deserialize,
5243    :: serde :: Serialize,
5244    Clone,
5245    Copy,
5246    Debug,
5247    Eq,
5248    Hash,
5249    Ord,
5250    PartialEq,
5251    PartialOrd,
5252)]
5253pub enum DataChangesByFinalityChangesType {
5254    #[serde(rename = "data_changes")]
5255    DataChanges,
5256}
5257impl ::std::convert::From<&Self> for DataChangesByFinalityChangesType {
5258    fn from(value: &DataChangesByFinalityChangesType) -> Self {
5259        value.clone()
5260    }
5261}
5262impl ::std::fmt::Display for DataChangesByFinalityChangesType {
5263    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
5264        match *self {
5265            Self::DataChanges => f.write_str("data_changes"),
5266        }
5267    }
5268}
5269impl ::std::str::FromStr for DataChangesByFinalityChangesType {
5270    type Err = self::error::ConversionError;
5271    fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
5272        match value {
5273            "data_changes" => Ok(Self::DataChanges),
5274            _ => Err("invalid value".into()),
5275        }
5276    }
5277}
5278impl ::std::convert::TryFrom<&str> for DataChangesByFinalityChangesType {
5279    type Error = self::error::ConversionError;
5280    fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
5281        value.parse()
5282    }
5283}
5284impl ::std::convert::TryFrom<&::std::string::String> for DataChangesByFinalityChangesType {
5285    type Error = self::error::ConversionError;
5286    fn try_from(
5287        value: &::std::string::String,
5288    ) -> ::std::result::Result<Self, self::error::ConversionError> {
5289        value.parse()
5290    }
5291}
5292impl ::std::convert::TryFrom<::std::string::String> for DataChangesByFinalityChangesType {
5293    type Error = self::error::ConversionError;
5294    fn try_from(
5295        value: ::std::string::String,
5296    ) -> ::std::result::Result<Self, self::error::ConversionError> {
5297        value.parse()
5298    }
5299}
5300#[doc = "`DataChangesBySyncCheckpointChangesType`"]
5301#[doc = r""]
5302#[doc = r" <details><summary>JSON schema</summary>"]
5303#[doc = r""]
5304#[doc = r" ```json"]
5305#[doc = "{"]
5306#[doc = "  \"type\": \"string\","]
5307#[doc = "  \"enum\": ["]
5308#[doc = "    \"data_changes\""]
5309#[doc = "  ]"]
5310#[doc = "}"]
5311#[doc = r" ```"]
5312#[doc = r" </details>"]
5313#[derive(
5314    :: serde :: Deserialize,
5315    :: serde :: Serialize,
5316    Clone,
5317    Copy,
5318    Debug,
5319    Eq,
5320    Hash,
5321    Ord,
5322    PartialEq,
5323    PartialOrd,
5324)]
5325pub enum DataChangesBySyncCheckpointChangesType {
5326    #[serde(rename = "data_changes")]
5327    DataChanges,
5328}
5329impl ::std::convert::From<&Self> for DataChangesBySyncCheckpointChangesType {
5330    fn from(value: &DataChangesBySyncCheckpointChangesType) -> Self {
5331        value.clone()
5332    }
5333}
5334impl ::std::fmt::Display for DataChangesBySyncCheckpointChangesType {
5335    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
5336        match *self {
5337            Self::DataChanges => f.write_str("data_changes"),
5338        }
5339    }
5340}
5341impl ::std::str::FromStr for DataChangesBySyncCheckpointChangesType {
5342    type Err = self::error::ConversionError;
5343    fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
5344        match value {
5345            "data_changes" => Ok(Self::DataChanges),
5346            _ => Err("invalid value".into()),
5347        }
5348    }
5349}
5350impl ::std::convert::TryFrom<&str> for DataChangesBySyncCheckpointChangesType {
5351    type Error = self::error::ConversionError;
5352    fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
5353        value.parse()
5354    }
5355}
5356impl ::std::convert::TryFrom<&::std::string::String> for DataChangesBySyncCheckpointChangesType {
5357    type Error = self::error::ConversionError;
5358    fn try_from(
5359        value: &::std::string::String,
5360    ) -> ::std::result::Result<Self, self::error::ConversionError> {
5361        value.parse()
5362    }
5363}
5364impl ::std::convert::TryFrom<::std::string::String> for DataChangesBySyncCheckpointChangesType {
5365    type Error = self::error::ConversionError;
5366    fn try_from(
5367        value: ::std::string::String,
5368    ) -> ::std::result::Result<Self, self::error::ConversionError> {
5369        value.parse()
5370    }
5371}
5372#[doc = "The fees settings for a data receipt creation"]
5373#[doc = r""]
5374#[doc = r" <details><summary>JSON schema</summary>"]
5375#[doc = r""]
5376#[doc = r" ```json"]
5377#[doc = "{"]
5378#[doc = "  \"description\": \"The fees settings for a data receipt creation\","]
5379#[doc = "  \"type\": \"object\","]
5380#[doc = "  \"required\": ["]
5381#[doc = "    \"base_cost\","]
5382#[doc = "    \"cost_per_byte\""]
5383#[doc = "  ],"]
5384#[doc = "  \"properties\": {"]
5385#[doc = "    \"base_cost\": {"]
5386#[doc = "      \"description\": \"Base cost of creating a data receipt.\\nBoth `send` and `exec` costs are burned when a new receipt has input dependencies. The gas\\nis charged for each input dependency. The dependencies are specified when a receipt is\\ncreated using `promise_then` and `promise_batch_then`.\\nNOTE: Any receipt with output dependencies will produce data receipts. Even if it fails.\\nEven if the last action is not a function call (in case of success it will return empty\\nvalue).\","]
5387#[doc = "      \"allOf\": ["]
5388#[doc = "        {"]
5389#[doc = "          \"$ref\": \"#/components/schemas/Fee\""]
5390#[doc = "        }"]
5391#[doc = "      ]"]
5392#[doc = "    },"]
5393#[doc = "    \"cost_per_byte\": {"]
5394#[doc = "      \"description\": \"Additional cost per byte sent.\\nBoth `send` and `exec` costs are burned when a function call finishes execution and returns\\n`N` bytes of data to every output dependency. For each output dependency the cost is\\n`(send(sir) + exec()) * N`.\","]
5395#[doc = "      \"allOf\": ["]
5396#[doc = "        {"]
5397#[doc = "          \"$ref\": \"#/components/schemas/Fee\""]
5398#[doc = "        }"]
5399#[doc = "      ]"]
5400#[doc = "    }"]
5401#[doc = "  }"]
5402#[doc = "}"]
5403#[doc = r" ```"]
5404#[doc = r" </details>"]
5405#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
5406pub struct DataReceiptCreationConfigView {
5407    #[doc = "Base cost of creating a data receipt.\nBoth `send` and `exec` costs are burned when a new receipt has input dependencies. The gas\nis charged for each input dependency. The dependencies are specified when a receipt is\ncreated using `promise_then` and `promise_batch_then`.\nNOTE: Any receipt with output dependencies will produce data receipts. Even if it fails.\nEven if the last action is not a function call (in case of success it will return empty\nvalue)."]
5408    pub base_cost: Fee,
5409    #[doc = "Additional cost per byte sent.\nBoth `send` and `exec` costs are burned when a function call finishes execution and returns\n`N` bytes of data to every output dependency. For each output dependency the cost is\n`(send(sir) + exec()) * N`."]
5410    pub cost_per_byte: Fee,
5411}
5412impl ::std::convert::From<&DataReceiptCreationConfigView> for DataReceiptCreationConfigView {
5413    fn from(value: &DataReceiptCreationConfigView) -> Self {
5414        value.clone()
5415    }
5416}
5417#[doc = "`DataReceiverView`"]
5418#[doc = r""]
5419#[doc = r" <details><summary>JSON schema</summary>"]
5420#[doc = r""]
5421#[doc = r" ```json"]
5422#[doc = "{"]
5423#[doc = "  \"type\": \"object\","]
5424#[doc = "  \"required\": ["]
5425#[doc = "    \"data_id\","]
5426#[doc = "    \"receiver_id\""]
5427#[doc = "  ],"]
5428#[doc = "  \"properties\": {"]
5429#[doc = "    \"data_id\": {"]
5430#[doc = "      \"$ref\": \"#/components/schemas/CryptoHash\""]
5431#[doc = "    },"]
5432#[doc = "    \"receiver_id\": {"]
5433#[doc = "      \"$ref\": \"#/components/schemas/AccountId\""]
5434#[doc = "    }"]
5435#[doc = "  }"]
5436#[doc = "}"]
5437#[doc = r" ```"]
5438#[doc = r" </details>"]
5439#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
5440pub struct DataReceiverView {
5441    pub data_id: CryptoHash,
5442    pub receiver_id: AccountId,
5443}
5444impl ::std::convert::From<&DataReceiverView> for DataReceiverView {
5445    fn from(value: &DataReceiverView) -> Self {
5446        value.clone()
5447    }
5448}
5449#[doc = "This action allows to execute the inner actions behalf of the defined sender."]
5450#[doc = r""]
5451#[doc = r" <details><summary>JSON schema</summary>"]
5452#[doc = r""]
5453#[doc = r" ```json"]
5454#[doc = "{"]
5455#[doc = "  \"description\": \"This action allows to execute the inner actions behalf of the defined sender.\","]
5456#[doc = "  \"type\": \"object\","]
5457#[doc = "  \"required\": ["]
5458#[doc = "    \"actions\","]
5459#[doc = "    \"max_block_height\","]
5460#[doc = "    \"nonce\","]
5461#[doc = "    \"public_key\","]
5462#[doc = "    \"receiver_id\","]
5463#[doc = "    \"sender_id\""]
5464#[doc = "  ],"]
5465#[doc = "  \"properties\": {"]
5466#[doc = "    \"actions\": {"]
5467#[doc = "      \"description\": \"List of actions to be executed.\\n\\nWith the meta transactions MVP defined in NEP-366, nested\\nDelegateActions are not allowed. A separate type is used to enforce it.\","]
5468#[doc = "      \"type\": \"array\","]
5469#[doc = "      \"items\": {"]
5470#[doc = "        \"$ref\": \"#/components/schemas/NonDelegateAction\""]
5471#[doc = "      }"]
5472#[doc = "    },"]
5473#[doc = "    \"max_block_height\": {"]
5474#[doc = "      \"description\": \"The maximal height of the block in the blockchain below which the given DelegateAction is valid.\","]
5475#[doc = "      \"type\": \"integer\","]
5476#[doc = "      \"format\": \"uint64\","]
5477#[doc = "      \"minimum\": 0.0"]
5478#[doc = "    },"]
5479#[doc = "    \"nonce\": {"]
5480#[doc = "      \"description\": \"Nonce to ensure that the same delegate action is not sent twice by a\\nrelayer and should match for given account's `public_key`.\\nAfter this action is processed it will increment.\","]
5481#[doc = "      \"type\": \"integer\","]
5482#[doc = "      \"format\": \"uint64\","]
5483#[doc = "      \"minimum\": 0.0"]
5484#[doc = "    },"]
5485#[doc = "    \"public_key\": {"]
5486#[doc = "      \"description\": \"Public key used to sign this delegated action.\","]
5487#[doc = "      \"allOf\": ["]
5488#[doc = "        {"]
5489#[doc = "          \"$ref\": \"#/components/schemas/PublicKey\""]
5490#[doc = "        }"]
5491#[doc = "      ]"]
5492#[doc = "    },"]
5493#[doc = "    \"receiver_id\": {"]
5494#[doc = "      \"description\": \"Receiver of the delegated actions.\","]
5495#[doc = "      \"allOf\": ["]
5496#[doc = "        {"]
5497#[doc = "          \"$ref\": \"#/components/schemas/AccountId\""]
5498#[doc = "        }"]
5499#[doc = "      ]"]
5500#[doc = "    },"]
5501#[doc = "    \"sender_id\": {"]
5502#[doc = "      \"description\": \"Signer of the delegated actions\","]
5503#[doc = "      \"allOf\": ["]
5504#[doc = "        {"]
5505#[doc = "          \"$ref\": \"#/components/schemas/AccountId\""]
5506#[doc = "        }"]
5507#[doc = "      ]"]
5508#[doc = "    }"]
5509#[doc = "  }"]
5510#[doc = "}"]
5511#[doc = r" ```"]
5512#[doc = r" </details>"]
5513#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
5514pub struct DelegateAction {
5515    #[doc = "List of actions to be executed.\n\nWith the meta transactions MVP defined in NEP-366, nested\nDelegateActions are not allowed. A separate type is used to enforce it."]
5516    pub actions: ::std::vec::Vec<NonDelegateAction>,
5517    #[doc = "The maximal height of the block in the blockchain below which the given DelegateAction is valid."]
5518    pub max_block_height: u64,
5519    #[doc = "Nonce to ensure that the same delegate action is not sent twice by a\nrelayer and should match for given account's `public_key`.\nAfter this action is processed it will increment."]
5520    pub nonce: u64,
5521    #[doc = "Public key used to sign this delegated action."]
5522    pub public_key: PublicKey,
5523    #[doc = "Receiver of the delegated actions."]
5524    pub receiver_id: AccountId,
5525    #[doc = "Signer of the delegated actions"]
5526    pub sender_id: AccountId,
5527}
5528impl ::std::convert::From<&DelegateAction> for DelegateAction {
5529    fn from(value: &DelegateAction) -> Self {
5530        value.clone()
5531    }
5532}
5533#[doc = "`DeleteAccountAction`"]
5534#[doc = r""]
5535#[doc = r" <details><summary>JSON schema</summary>"]
5536#[doc = r""]
5537#[doc = r" ```json"]
5538#[doc = "{"]
5539#[doc = "  \"type\": \"object\","]
5540#[doc = "  \"required\": ["]
5541#[doc = "    \"beneficiary_id\""]
5542#[doc = "  ],"]
5543#[doc = "  \"properties\": {"]
5544#[doc = "    \"beneficiary_id\": {"]
5545#[doc = "      \"$ref\": \"#/components/schemas/AccountId\""]
5546#[doc = "    }"]
5547#[doc = "  }"]
5548#[doc = "}"]
5549#[doc = r" ```"]
5550#[doc = r" </details>"]
5551#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
5552pub struct DeleteAccountAction {
5553    pub beneficiary_id: AccountId,
5554}
5555impl ::std::convert::From<&DeleteAccountAction> for DeleteAccountAction {
5556    fn from(value: &DeleteAccountAction) -> Self {
5557        value.clone()
5558    }
5559}
5560#[doc = "`DeleteKeyAction`"]
5561#[doc = r""]
5562#[doc = r" <details><summary>JSON schema</summary>"]
5563#[doc = r""]
5564#[doc = r" ```json"]
5565#[doc = "{"]
5566#[doc = "  \"type\": \"object\","]
5567#[doc = "  \"required\": ["]
5568#[doc = "    \"public_key\""]
5569#[doc = "  ],"]
5570#[doc = "  \"properties\": {"]
5571#[doc = "    \"public_key\": {"]
5572#[doc = "      \"description\": \"A public key associated with the access_key to be deleted.\","]
5573#[doc = "      \"allOf\": ["]
5574#[doc = "        {"]
5575#[doc = "          \"$ref\": \"#/components/schemas/PublicKey\""]
5576#[doc = "        }"]
5577#[doc = "      ]"]
5578#[doc = "    }"]
5579#[doc = "  }"]
5580#[doc = "}"]
5581#[doc = r" ```"]
5582#[doc = r" </details>"]
5583#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
5584pub struct DeleteKeyAction {
5585    #[doc = "A public key associated with the access_key to be deleted."]
5586    pub public_key: PublicKey,
5587}
5588impl ::std::convert::From<&DeleteKeyAction> for DeleteKeyAction {
5589    fn from(value: &DeleteKeyAction) -> Self {
5590        value.clone()
5591    }
5592}
5593#[doc = "Deploy contract action"]
5594#[doc = r""]
5595#[doc = r" <details><summary>JSON schema</summary>"]
5596#[doc = r""]
5597#[doc = r" ```json"]
5598#[doc = "{"]
5599#[doc = "  \"description\": \"Deploy contract action\","]
5600#[doc = "  \"type\": \"object\","]
5601#[doc = "  \"required\": ["]
5602#[doc = "    \"code\""]
5603#[doc = "  ],"]
5604#[doc = "  \"properties\": {"]
5605#[doc = "    \"code\": {"]
5606#[doc = "      \"description\": \"WebAssembly binary\","]
5607#[doc = "      \"type\": \"string\""]
5608#[doc = "    }"]
5609#[doc = "  }"]
5610#[doc = "}"]
5611#[doc = r" ```"]
5612#[doc = r" </details>"]
5613#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
5614pub struct DeployContractAction {
5615    #[doc = "WebAssembly binary"]
5616    pub code: ::std::string::String,
5617}
5618impl ::std::convert::From<&DeployContractAction> for DeployContractAction {
5619    fn from(value: &DeployContractAction) -> Self {
5620        value.clone()
5621    }
5622}
5623#[doc = "Deploy global contract action"]
5624#[doc = r""]
5625#[doc = r" <details><summary>JSON schema</summary>"]
5626#[doc = r""]
5627#[doc = r" ```json"]
5628#[doc = "{"]
5629#[doc = "  \"description\": \"Deploy global contract action\","]
5630#[doc = "  \"type\": \"object\","]
5631#[doc = "  \"required\": ["]
5632#[doc = "    \"code\","]
5633#[doc = "    \"deploy_mode\""]
5634#[doc = "  ],"]
5635#[doc = "  \"properties\": {"]
5636#[doc = "    \"code\": {"]
5637#[doc = "      \"description\": \"WebAssembly binary\","]
5638#[doc = "      \"type\": \"string\""]
5639#[doc = "    },"]
5640#[doc = "    \"deploy_mode\": {"]
5641#[doc = "      \"$ref\": \"#/components/schemas/GlobalContractDeployMode\""]
5642#[doc = "    }"]
5643#[doc = "  }"]
5644#[doc = "}"]
5645#[doc = r" ```"]
5646#[doc = r" </details>"]
5647#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
5648pub struct DeployGlobalContractAction {
5649    #[doc = "WebAssembly binary"]
5650    pub code: ::std::string::String,
5651    pub deploy_mode: GlobalContractDeployMode,
5652}
5653impl ::std::convert::From<&DeployGlobalContractAction> for DeployGlobalContractAction {
5654    fn from(value: &DeployGlobalContractAction) -> Self {
5655        value.clone()
5656    }
5657}
5658#[doc = "`DetailedDebugStatus`"]
5659#[doc = r""]
5660#[doc = r" <details><summary>JSON schema</summary>"]
5661#[doc = r""]
5662#[doc = r" ```json"]
5663#[doc = "{"]
5664#[doc = "  \"type\": \"object\","]
5665#[doc = "  \"required\": ["]
5666#[doc = "    \"block_production_delay_millis\","]
5667#[doc = "    \"catchup_status\","]
5668#[doc = "    \"current_head_status\","]
5669#[doc = "    \"current_header_head_status\","]
5670#[doc = "    \"network_info\","]
5671#[doc = "    \"sync_status\""]
5672#[doc = "  ],"]
5673#[doc = "  \"properties\": {"]
5674#[doc = "    \"block_production_delay_millis\": {"]
5675#[doc = "      \"type\": \"integer\","]
5676#[doc = "      \"format\": \"uint64\","]
5677#[doc = "      \"minimum\": 0.0"]
5678#[doc = "    },"]
5679#[doc = "    \"catchup_status\": {"]
5680#[doc = "      \"type\": \"array\","]
5681#[doc = "      \"items\": {"]
5682#[doc = "        \"$ref\": \"#/components/schemas/CatchupStatusView\""]
5683#[doc = "      }"]
5684#[doc = "    },"]
5685#[doc = "    \"current_head_status\": {"]
5686#[doc = "      \"$ref\": \"#/components/schemas/BlockStatusView\""]
5687#[doc = "    },"]
5688#[doc = "    \"current_header_head_status\": {"]
5689#[doc = "      \"$ref\": \"#/components/schemas/BlockStatusView\""]
5690#[doc = "    },"]
5691#[doc = "    \"network_info\": {"]
5692#[doc = "      \"$ref\": \"#/components/schemas/NetworkInfoView\""]
5693#[doc = "    },"]
5694#[doc = "    \"sync_status\": {"]
5695#[doc = "      \"type\": \"string\""]
5696#[doc = "    }"]
5697#[doc = "  }"]
5698#[doc = "}"]
5699#[doc = r" ```"]
5700#[doc = r" </details>"]
5701#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
5702pub struct DetailedDebugStatus {
5703    pub block_production_delay_millis: u64,
5704    pub catchup_status: ::std::vec::Vec<CatchupStatusView>,
5705    pub current_head_status: BlockStatusView,
5706    pub current_header_head_status: BlockStatusView,
5707    pub network_info: NetworkInfoView,
5708    pub sync_status: ::std::string::String,
5709}
5710impl ::std::convert::From<&DetailedDebugStatus> for DetailedDebugStatus {
5711    fn from(value: &DetailedDebugStatus) -> Self {
5712        value.clone()
5713    }
5714}
5715#[doc = "`DeterministicAccountStateInit`"]
5716#[doc = r""]
5717#[doc = r" <details><summary>JSON schema</summary>"]
5718#[doc = r""]
5719#[doc = r" ```json"]
5720#[doc = "{"]
5721#[doc = "  \"oneOf\": ["]
5722#[doc = "    {"]
5723#[doc = "      \"type\": \"object\","]
5724#[doc = "      \"required\": ["]
5725#[doc = "        \"V1\""]
5726#[doc = "      ],"]
5727#[doc = "      \"properties\": {"]
5728#[doc = "        \"V1\": {"]
5729#[doc = "          \"$ref\": \"#/components/schemas/DeterministicAccountStateInitV1\""]
5730#[doc = "        }"]
5731#[doc = "      },"]
5732#[doc = "      \"additionalProperties\": false"]
5733#[doc = "    }"]
5734#[doc = "  ]"]
5735#[doc = "}"]
5736#[doc = r" ```"]
5737#[doc = r" </details>"]
5738#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
5739pub enum DeterministicAccountStateInit {
5740    V1(DeterministicAccountStateInitV1),
5741}
5742impl ::std::convert::From<&Self> for DeterministicAccountStateInit {
5743    fn from(value: &DeterministicAccountStateInit) -> Self {
5744        value.clone()
5745    }
5746}
5747impl ::std::convert::From<DeterministicAccountStateInitV1> for DeterministicAccountStateInit {
5748    fn from(value: DeterministicAccountStateInitV1) -> Self {
5749        Self::V1(value)
5750    }
5751}
5752#[doc = "`DeterministicAccountStateInitV1`"]
5753#[doc = r""]
5754#[doc = r" <details><summary>JSON schema</summary>"]
5755#[doc = r""]
5756#[doc = r" ```json"]
5757#[doc = "{"]
5758#[doc = "  \"type\": \"object\","]
5759#[doc = "  \"required\": ["]
5760#[doc = "    \"code\","]
5761#[doc = "    \"data\""]
5762#[doc = "  ],"]
5763#[doc = "  \"properties\": {"]
5764#[doc = "    \"code\": {"]
5765#[doc = "      \"$ref\": \"#/components/schemas/GlobalContractIdentifier\""]
5766#[doc = "    },"]
5767#[doc = "    \"data\": {"]
5768#[doc = "      \"type\": \"object\","]
5769#[doc = "      \"additionalProperties\": {"]
5770#[doc = "        \"type\": \"string\""]
5771#[doc = "      }"]
5772#[doc = "    }"]
5773#[doc = "  }"]
5774#[doc = "}"]
5775#[doc = r" ```"]
5776#[doc = r" </details>"]
5777#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
5778pub struct DeterministicAccountStateInitV1 {
5779    pub code: GlobalContractIdentifier,
5780    pub data: ::std::collections::HashMap<::std::string::String, ::std::string::String>,
5781}
5782impl ::std::convert::From<&DeterministicAccountStateInitV1> for DeterministicAccountStateInitV1 {
5783    fn from(value: &DeterministicAccountStateInitV1) -> Self {
5784        value.clone()
5785    }
5786}
5787#[doc = "`DeterministicStateInitAction`"]
5788#[doc = r""]
5789#[doc = r" <details><summary>JSON schema</summary>"]
5790#[doc = r""]
5791#[doc = r" ```json"]
5792#[doc = "{"]
5793#[doc = "  \"type\": \"object\","]
5794#[doc = "  \"required\": ["]
5795#[doc = "    \"deposit\","]
5796#[doc = "    \"state_init\""]
5797#[doc = "  ],"]
5798#[doc = "  \"properties\": {"]
5799#[doc = "    \"deposit\": {"]
5800#[doc = "      \"$ref\": \"#/components/schemas/NearToken\""]
5801#[doc = "    },"]
5802#[doc = "    \"state_init\": {"]
5803#[doc = "      \"$ref\": \"#/components/schemas/DeterministicAccountStateInit\""]
5804#[doc = "    }"]
5805#[doc = "  }"]
5806#[doc = "}"]
5807#[doc = r" ```"]
5808#[doc = r" </details>"]
5809#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
5810pub struct DeterministicStateInitAction {
5811    pub deposit: NearToken,
5812    pub state_init: DeterministicAccountStateInit,
5813}
5814impl ::std::convert::From<&DeterministicStateInitAction> for DeterministicStateInitAction {
5815    fn from(value: &DeterministicStateInitAction) -> Self {
5816        value.clone()
5817    }
5818}
5819#[doc = "`Direction`"]
5820#[doc = r""]
5821#[doc = r" <details><summary>JSON schema</summary>"]
5822#[doc = r""]
5823#[doc = r" ```json"]
5824#[doc = "{"]
5825#[doc = "  \"type\": \"string\","]
5826#[doc = "  \"enum\": ["]
5827#[doc = "    \"Left\","]
5828#[doc = "    \"Right\""]
5829#[doc = "  ]"]
5830#[doc = "}"]
5831#[doc = r" ```"]
5832#[doc = r" </details>"]
5833#[derive(
5834    :: serde :: Deserialize,
5835    :: serde :: Serialize,
5836    Clone,
5837    Copy,
5838    Debug,
5839    Eq,
5840    Hash,
5841    Ord,
5842    PartialEq,
5843    PartialOrd,
5844)]
5845pub enum Direction {
5846    Left,
5847    Right,
5848}
5849impl ::std::convert::From<&Self> for Direction {
5850    fn from(value: &Direction) -> Self {
5851        value.clone()
5852    }
5853}
5854impl ::std::fmt::Display for Direction {
5855    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
5856        match *self {
5857            Self::Left => f.write_str("Left"),
5858            Self::Right => f.write_str("Right"),
5859        }
5860    }
5861}
5862impl ::std::str::FromStr for Direction {
5863    type Err = self::error::ConversionError;
5864    fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
5865        match value {
5866            "Left" => Ok(Self::Left),
5867            "Right" => Ok(Self::Right),
5868            _ => Err("invalid value".into()),
5869        }
5870    }
5871}
5872impl ::std::convert::TryFrom<&str> for Direction {
5873    type Error = self::error::ConversionError;
5874    fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
5875        value.parse()
5876    }
5877}
5878impl ::std::convert::TryFrom<&::std::string::String> for Direction {
5879    type Error = self::error::ConversionError;
5880    fn try_from(
5881        value: &::std::string::String,
5882    ) -> ::std::result::Result<Self, self::error::ConversionError> {
5883        value.parse()
5884    }
5885}
5886impl ::std::convert::TryFrom<::std::string::String> for Direction {
5887    type Error = self::error::ConversionError;
5888    fn try_from(
5889        value: ::std::string::String,
5890    ) -> ::std::result::Result<Self, self::error::ConversionError> {
5891        value.parse()
5892    }
5893}
5894#[doc = "Configures how to dump state to external storage."]
5895#[doc = r""]
5896#[doc = r" <details><summary>JSON schema</summary>"]
5897#[doc = r""]
5898#[doc = r" ```json"]
5899#[doc = "{"]
5900#[doc = "  \"description\": \"Configures how to dump state to external storage.\","]
5901#[doc = "  \"type\": \"object\","]
5902#[doc = "  \"required\": ["]
5903#[doc = "    \"location\""]
5904#[doc = "  ],"]
5905#[doc = "  \"properties\": {"]
5906#[doc = "    \"credentials_file\": {"]
5907#[doc = "      \"description\": \"Location of a json file with credentials allowing access to the bucket.\","]
5908#[doc = "      \"type\": ["]
5909#[doc = "        \"string\","]
5910#[doc = "        \"null\""]
5911#[doc = "      ]"]
5912#[doc = "    },"]
5913#[doc = "    \"iteration_delay\": {"]
5914#[doc = "      \"description\": \"How often to check if a new epoch has started.\\nFeel free to set to `None`, defaults are sensible.\","]
5915#[doc = "      \"anyOf\": ["]
5916#[doc = "        {"]
5917#[doc = "          \"$ref\": \"#/components/schemas/DurationAsStdSchemaProvider\""]
5918#[doc = "        },"]
5919#[doc = "        {"]
5920#[doc = "          \"type\": \"null\""]
5921#[doc = "        }"]
5922#[doc = "      ]"]
5923#[doc = "    },"]
5924#[doc = "    \"location\": {"]
5925#[doc = "      \"description\": \"Specifies where to write the obtained state parts.\","]
5926#[doc = "      \"allOf\": ["]
5927#[doc = "        {"]
5928#[doc = "          \"$ref\": \"#/components/schemas/ExternalStorageLocation\""]
5929#[doc = "        }"]
5930#[doc = "      ]"]
5931#[doc = "    },"]
5932#[doc = "    \"restart_dump_for_shards\": {"]
5933#[doc = "      \"description\": \"Use in case a node that dumps state to the external storage\\ngets in trouble.\","]
5934#[doc = "      \"type\": ["]
5935#[doc = "        \"array\","]
5936#[doc = "        \"null\""]
5937#[doc = "      ],"]
5938#[doc = "      \"items\": {"]
5939#[doc = "        \"$ref\": \"#/components/schemas/ShardId\""]
5940#[doc = "      }"]
5941#[doc = "    }"]
5942#[doc = "  }"]
5943#[doc = "}"]
5944#[doc = r" ```"]
5945#[doc = r" </details>"]
5946#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
5947pub struct DumpConfig {
5948    #[doc = "Location of a json file with credentials allowing access to the bucket."]
5949    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
5950    pub credentials_file: ::std::option::Option<::std::string::String>,
5951    #[doc = "How often to check if a new epoch has started.\nFeel free to set to `None`, defaults are sensible."]
5952    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
5953    pub iteration_delay: ::std::option::Option<DurationAsStdSchemaProvider>,
5954    #[doc = "Specifies where to write the obtained state parts."]
5955    pub location: ExternalStorageLocation,
5956    #[doc = "Use in case a node that dumps state to the external storage\ngets in trouble."]
5957    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
5958    pub restart_dump_for_shards: ::std::option::Option<::std::vec::Vec<ShardId>>,
5959}
5960impl ::std::convert::From<&DumpConfig> for DumpConfig {
5961    fn from(value: &DumpConfig) -> Self {
5962        value.clone()
5963    }
5964}
5965#[doc = "`DurationAsStdSchemaProvider`"]
5966#[doc = r""]
5967#[doc = r" <details><summary>JSON schema</summary>"]
5968#[doc = r""]
5969#[doc = r" ```json"]
5970#[doc = "{"]
5971#[doc = "  \"type\": \"object\","]
5972#[doc = "  \"required\": ["]
5973#[doc = "    \"nanos\","]
5974#[doc = "    \"secs\""]
5975#[doc = "  ],"]
5976#[doc = "  \"properties\": {"]
5977#[doc = "    \"nanos\": {"]
5978#[doc = "      \"type\": \"integer\","]
5979#[doc = "      \"format\": \"int32\""]
5980#[doc = "    },"]
5981#[doc = "    \"secs\": {"]
5982#[doc = "      \"type\": \"integer\","]
5983#[doc = "      \"format\": \"int64\""]
5984#[doc = "    }"]
5985#[doc = "  }"]
5986#[doc = "}"]
5987#[doc = r" ```"]
5988#[doc = r" </details>"]
5989#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
5990pub struct DurationAsStdSchemaProvider {
5991    pub nanos: i32,
5992    pub secs: i64,
5993}
5994impl ::std::convert::From<&DurationAsStdSchemaProvider> for DurationAsStdSchemaProvider {
5995    fn from(value: &DurationAsStdSchemaProvider) -> Self {
5996        value.clone()
5997    }
5998}
5999#[doc = "Epoch identifier -- wrapped hash, to make it easier to distinguish.\nEpochId of epoch T is the hash of last block in T-2\nEpochId of first two epochs is 0"]
6000#[doc = r""]
6001#[doc = r" <details><summary>JSON schema</summary>"]
6002#[doc = r""]
6003#[doc = r" ```json"]
6004#[doc = "{"]
6005#[doc = "  \"description\": \"Epoch identifier -- wrapped hash, to make it easier to distinguish.\\nEpochId of epoch T is the hash of last block in T-2\\nEpochId of first two epochs is 0\","]
6006#[doc = "  \"allOf\": ["]
6007#[doc = "    {"]
6008#[doc = "      \"$ref\": \"#/components/schemas/CryptoHash\""]
6009#[doc = "    }"]
6010#[doc = "  ]"]
6011#[doc = "}"]
6012#[doc = r" ```"]
6013#[doc = r" </details>"]
6014#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
6015#[serde(transparent)]
6016pub struct EpochId(pub CryptoHash);
6017impl ::std::ops::Deref for EpochId {
6018    type Target = CryptoHash;
6019    fn deref(&self) -> &CryptoHash {
6020        &self.0
6021    }
6022}
6023impl ::std::convert::From<EpochId> for CryptoHash {
6024    fn from(value: EpochId) -> Self {
6025        value.0
6026    }
6027}
6028impl ::std::convert::From<&EpochId> for EpochId {
6029    fn from(value: &EpochId) -> Self {
6030        value.clone()
6031    }
6032}
6033impl ::std::convert::From<CryptoHash> for EpochId {
6034    fn from(value: CryptoHash) -> Self {
6035        Self(value)
6036    }
6037}
6038impl ::std::str::FromStr for EpochId {
6039    type Err = <CryptoHash as ::std::str::FromStr>::Err;
6040    fn from_str(value: &str) -> ::std::result::Result<Self, Self::Err> {
6041        Ok(Self(value.parse()?))
6042    }
6043}
6044impl ::std::convert::TryFrom<&str> for EpochId {
6045    type Error = <CryptoHash as ::std::str::FromStr>::Err;
6046    fn try_from(value: &str) -> ::std::result::Result<Self, Self::Error> {
6047        value.parse()
6048    }
6049}
6050impl ::std::convert::TryFrom<&String> for EpochId {
6051    type Error = <CryptoHash as ::std::str::FromStr>::Err;
6052    fn try_from(value: &String) -> ::std::result::Result<Self, Self::Error> {
6053        value.parse()
6054    }
6055}
6056impl ::std::convert::TryFrom<String> for EpochId {
6057    type Error = <CryptoHash as ::std::str::FromStr>::Err;
6058    fn try_from(value: String) -> ::std::result::Result<Self, Self::Error> {
6059        value.parse()
6060    }
6061}
6062impl ::std::fmt::Display for EpochId {
6063    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
6064        self.0.fmt(f)
6065    }
6066}
6067#[doc = "`EpochSyncConfig`"]
6068#[doc = r""]
6069#[doc = r" <details><summary>JSON schema</summary>"]
6070#[doc = r""]
6071#[doc = r" ```json"]
6072#[doc = "{"]
6073#[doc = "  \"type\": \"object\","]
6074#[doc = "  \"required\": ["]
6075#[doc = "    \"epoch_sync_horizon\","]
6076#[doc = "    \"timeout_for_epoch_sync\""]
6077#[doc = "  ],"]
6078#[doc = "  \"properties\": {"]
6079#[doc = "    \"disable_epoch_sync_for_bootstrapping\": {"]
6080#[doc = "      \"description\": \"If true, even if the node started from genesis, it will not perform epoch sync.\\nThere should be no reason to set this flag in production, because on both mainnet\\nand testnet it would be infeasible to catch up from genesis without epoch sync.\","]
6081#[doc = "      \"default\": false,"]
6082#[doc = "      \"type\": \"boolean\""]
6083#[doc = "    },"]
6084#[doc = "    \"epoch_sync_horizon\": {"]
6085#[doc = "      \"description\": \"This serves as two purposes: (1) the node will not epoch sync and instead resort to\\nheader sync, if the genesis block is within this many blocks from the current block;\\n(2) the node will reject an epoch sync proof if the provided proof is for an epoch\\nthat is more than this many blocks behind the current block.\","]
6086#[doc = "      \"type\": \"integer\","]
6087#[doc = "      \"format\": \"uint64\","]
6088#[doc = "      \"minimum\": 0.0"]
6089#[doc = "    },"]
6090#[doc = "    \"ignore_epoch_sync_network_requests\": {"]
6091#[doc = "      \"description\": \"If true, the node will ignore epoch sync requests from the network. It is strongly\\nrecommended not to set this flag, because it will prevent other nodes from\\nbootstrapping. This flag is only included as a kill-switch and may be removed in a\\nfuture release. Please note that epoch sync requests are heavily rate limited and\\ncached, and therefore should not affect the performance of the node or introduce\\nany non-negligible increase in network traffic.\","]
6092#[doc = "      \"default\": false,"]
6093#[doc = "      \"type\": \"boolean\""]
6094#[doc = "    },"]
6095#[doc = "    \"timeout_for_epoch_sync\": {"]
6096#[doc = "      \"description\": \"Timeout for epoch sync requests. The node will continue retrying indefinitely even\\nif this timeout is exceeded.\","]
6097#[doc = "      \"allOf\": ["]
6098#[doc = "        {"]
6099#[doc = "          \"$ref\": \"#/components/schemas/DurationAsStdSchemaProvider\""]
6100#[doc = "        }"]
6101#[doc = "      ]"]
6102#[doc = "    }"]
6103#[doc = "  }"]
6104#[doc = "}"]
6105#[doc = r" ```"]
6106#[doc = r" </details>"]
6107#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
6108pub struct EpochSyncConfig {
6109    #[doc = "If true, even if the node started from genesis, it will not perform epoch sync.\nThere should be no reason to set this flag in production, because on both mainnet\nand testnet it would be infeasible to catch up from genesis without epoch sync."]
6110    #[serde(default)]
6111    pub disable_epoch_sync_for_bootstrapping: bool,
6112    #[doc = "This serves as two purposes: (1) the node will not epoch sync and instead resort to\nheader sync, if the genesis block is within this many blocks from the current block;\n(2) the node will reject an epoch sync proof if the provided proof is for an epoch\nthat is more than this many blocks behind the current block."]
6113    pub epoch_sync_horizon: u64,
6114    #[doc = "If true, the node will ignore epoch sync requests from the network. It is strongly\nrecommended not to set this flag, because it will prevent other nodes from\nbootstrapping. This flag is only included as a kill-switch and may be removed in a\nfuture release. Please note that epoch sync requests are heavily rate limited and\ncached, and therefore should not affect the performance of the node or introduce\nany non-negligible increase in network traffic."]
6115    #[serde(default)]
6116    pub ignore_epoch_sync_network_requests: bool,
6117    #[doc = "Timeout for epoch sync requests. The node will continue retrying indefinitely even\nif this timeout is exceeded."]
6118    pub timeout_for_epoch_sync: DurationAsStdSchemaProvider,
6119}
6120impl ::std::convert::From<&EpochSyncConfig> for EpochSyncConfig {
6121    fn from(value: &EpochSyncConfig) -> Self {
6122        value.clone()
6123    }
6124}
6125#[doc = "`ExecutionMetadataView`"]
6126#[doc = r""]
6127#[doc = r" <details><summary>JSON schema</summary>"]
6128#[doc = r""]
6129#[doc = r" ```json"]
6130#[doc = "{"]
6131#[doc = "  \"type\": \"object\","]
6132#[doc = "  \"required\": ["]
6133#[doc = "    \"version\""]
6134#[doc = "  ],"]
6135#[doc = "  \"properties\": {"]
6136#[doc = "    \"gas_profile\": {"]
6137#[doc = "      \"type\": ["]
6138#[doc = "        \"array\","]
6139#[doc = "        \"null\""]
6140#[doc = "      ],"]
6141#[doc = "      \"items\": {"]
6142#[doc = "        \"$ref\": \"#/components/schemas/CostGasUsed\""]
6143#[doc = "      }"]
6144#[doc = "    },"]
6145#[doc = "    \"version\": {"]
6146#[doc = "      \"type\": \"integer\","]
6147#[doc = "      \"format\": \"uint32\","]
6148#[doc = "      \"minimum\": 0.0"]
6149#[doc = "    }"]
6150#[doc = "  }"]
6151#[doc = "}"]
6152#[doc = r" ```"]
6153#[doc = r" </details>"]
6154#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
6155pub struct ExecutionMetadataView {
6156    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
6157    pub gas_profile: ::std::option::Option<::std::vec::Vec<CostGasUsed>>,
6158    pub version: u32,
6159}
6160impl ::std::convert::From<&ExecutionMetadataView> for ExecutionMetadataView {
6161    fn from(value: &ExecutionMetadataView) -> Self {
6162        value.clone()
6163    }
6164}
6165#[doc = "`ExecutionOutcomeView`"]
6166#[doc = r""]
6167#[doc = r" <details><summary>JSON schema</summary>"]
6168#[doc = r""]
6169#[doc = r" ```json"]
6170#[doc = "{"]
6171#[doc = "  \"type\": \"object\","]
6172#[doc = "  \"required\": ["]
6173#[doc = "    \"executor_id\","]
6174#[doc = "    \"gas_burnt\","]
6175#[doc = "    \"logs\","]
6176#[doc = "    \"receipt_ids\","]
6177#[doc = "    \"status\","]
6178#[doc = "    \"tokens_burnt\""]
6179#[doc = "  ],"]
6180#[doc = "  \"properties\": {"]
6181#[doc = "    \"executor_id\": {"]
6182#[doc = "      \"description\": \"The id of the account on which the execution happens. For transaction this is signer_id,\\nfor receipt this is receiver_id.\","]
6183#[doc = "      \"allOf\": ["]
6184#[doc = "        {"]
6185#[doc = "          \"$ref\": \"#/components/schemas/AccountId\""]
6186#[doc = "        }"]
6187#[doc = "      ]"]
6188#[doc = "    },"]
6189#[doc = "    \"gas_burnt\": {"]
6190#[doc = "      \"description\": \"The amount of the gas burnt by the given transaction or receipt.\","]
6191#[doc = "      \"allOf\": ["]
6192#[doc = "        {"]
6193#[doc = "          \"$ref\": \"#/components/schemas/NearGas\""]
6194#[doc = "        }"]
6195#[doc = "      ]"]
6196#[doc = "    },"]
6197#[doc = "    \"logs\": {"]
6198#[doc = "      \"description\": \"Logs from this transaction or receipt.\","]
6199#[doc = "      \"type\": \"array\","]
6200#[doc = "      \"items\": {"]
6201#[doc = "        \"type\": \"string\""]
6202#[doc = "      }"]
6203#[doc = "    },"]
6204#[doc = "    \"metadata\": {"]
6205#[doc = "      \"description\": \"Execution metadata, versioned\","]
6206#[doc = "      \"default\": {"]
6207#[doc = "        \"version\": 1"]
6208#[doc = "      },"]
6209#[doc = "      \"allOf\": ["]
6210#[doc = "        {"]
6211#[doc = "          \"$ref\": \"#/components/schemas/ExecutionMetadataView\""]
6212#[doc = "        }"]
6213#[doc = "      ]"]
6214#[doc = "    },"]
6215#[doc = "    \"receipt_ids\": {"]
6216#[doc = "      \"description\": \"Receipt IDs generated by this transaction or receipt.\","]
6217#[doc = "      \"type\": \"array\","]
6218#[doc = "      \"items\": {"]
6219#[doc = "        \"$ref\": \"#/components/schemas/CryptoHash\""]
6220#[doc = "      }"]
6221#[doc = "    },"]
6222#[doc = "    \"status\": {"]
6223#[doc = "      \"description\": \"Execution status. Contains the result in case of successful execution.\","]
6224#[doc = "      \"allOf\": ["]
6225#[doc = "        {"]
6226#[doc = "          \"$ref\": \"#/components/schemas/ExecutionStatusView\""]
6227#[doc = "        }"]
6228#[doc = "      ]"]
6229#[doc = "    },"]
6230#[doc = "    \"tokens_burnt\": {"]
6231#[doc = "      \"description\": \"The amount of tokens burnt corresponding to the burnt gas amount.\\nThis value doesn't always equal to the `gas_burnt` multiplied by the gas price, because\\nthe prepaid gas price might be lower than the actual gas price and it creates a deficit.\\n`tokens_burnt` also contains the penalty subtracted from refunds, while\\n`gas_burnt` only contains the gas that we actually burn for the execution.\","]
6232#[doc = "      \"allOf\": ["]
6233#[doc = "        {"]
6234#[doc = "          \"$ref\": \"#/components/schemas/NearToken\""]
6235#[doc = "        }"]
6236#[doc = "      ]"]
6237#[doc = "    }"]
6238#[doc = "  }"]
6239#[doc = "}"]
6240#[doc = r" ```"]
6241#[doc = r" </details>"]
6242#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
6243pub struct ExecutionOutcomeView {
6244    #[doc = "The id of the account on which the execution happens. For transaction this is signer_id,\nfor receipt this is receiver_id."]
6245    pub executor_id: AccountId,
6246    #[doc = "The amount of the gas burnt by the given transaction or receipt."]
6247    pub gas_burnt: NearGas,
6248    #[doc = "Logs from this transaction or receipt."]
6249    pub logs: ::std::vec::Vec<::std::string::String>,
6250    #[doc = "Execution metadata, versioned"]
6251    #[serde(default = "defaults::execution_outcome_view_metadata")]
6252    pub metadata: ExecutionMetadataView,
6253    #[doc = "Receipt IDs generated by this transaction or receipt."]
6254    pub receipt_ids: ::std::vec::Vec<CryptoHash>,
6255    #[doc = "Execution status. Contains the result in case of successful execution."]
6256    pub status: ExecutionStatusView,
6257    #[doc = "The amount of tokens burnt corresponding to the burnt gas amount.\nThis value doesn't always equal to the `gas_burnt` multiplied by the gas price, because\nthe prepaid gas price might be lower than the actual gas price and it creates a deficit.\n`tokens_burnt` also contains the penalty subtracted from refunds, while\n`gas_burnt` only contains the gas that we actually burn for the execution."]
6258    pub tokens_burnt: NearToken,
6259}
6260impl ::std::convert::From<&ExecutionOutcomeView> for ExecutionOutcomeView {
6261    fn from(value: &ExecutionOutcomeView) -> Self {
6262        value.clone()
6263    }
6264}
6265#[doc = "`ExecutionOutcomeWithIdView`"]
6266#[doc = r""]
6267#[doc = r" <details><summary>JSON schema</summary>"]
6268#[doc = r""]
6269#[doc = r" ```json"]
6270#[doc = "{"]
6271#[doc = "  \"type\": \"object\","]
6272#[doc = "  \"required\": ["]
6273#[doc = "    \"block_hash\","]
6274#[doc = "    \"id\","]
6275#[doc = "    \"outcome\","]
6276#[doc = "    \"proof\""]
6277#[doc = "  ],"]
6278#[doc = "  \"properties\": {"]
6279#[doc = "    \"block_hash\": {"]
6280#[doc = "      \"$ref\": \"#/components/schemas/CryptoHash\""]
6281#[doc = "    },"]
6282#[doc = "    \"id\": {"]
6283#[doc = "      \"$ref\": \"#/components/schemas/CryptoHash\""]
6284#[doc = "    },"]
6285#[doc = "    \"outcome\": {"]
6286#[doc = "      \"$ref\": \"#/components/schemas/ExecutionOutcomeView\""]
6287#[doc = "    },"]
6288#[doc = "    \"proof\": {"]
6289#[doc = "      \"type\": \"array\","]
6290#[doc = "      \"items\": {"]
6291#[doc = "        \"$ref\": \"#/components/schemas/MerklePathItem\""]
6292#[doc = "      }"]
6293#[doc = "    }"]
6294#[doc = "  }"]
6295#[doc = "}"]
6296#[doc = r" ```"]
6297#[doc = r" </details>"]
6298#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
6299pub struct ExecutionOutcomeWithIdView {
6300    pub block_hash: CryptoHash,
6301    pub id: CryptoHash,
6302    pub outcome: ExecutionOutcomeView,
6303    pub proof: ::std::vec::Vec<MerklePathItem>,
6304}
6305impl ::std::convert::From<&ExecutionOutcomeWithIdView> for ExecutionOutcomeWithIdView {
6306    fn from(value: &ExecutionOutcomeWithIdView) -> Self {
6307        value.clone()
6308    }
6309}
6310#[doc = "`ExecutionStatusView`"]
6311#[doc = r""]
6312#[doc = r" <details><summary>JSON schema</summary>"]
6313#[doc = r""]
6314#[doc = r" ```json"]
6315#[doc = "{"]
6316#[doc = "  \"oneOf\": ["]
6317#[doc = "    {"]
6318#[doc = "      \"description\": \"The execution is pending or unknown.\","]
6319#[doc = "      \"type\": \"string\","]
6320#[doc = "      \"enum\": ["]
6321#[doc = "        \"Unknown\""]
6322#[doc = "      ]"]
6323#[doc = "    },"]
6324#[doc = "    {"]
6325#[doc = "      \"description\": \"The execution has failed.\","]
6326#[doc = "      \"type\": \"object\","]
6327#[doc = "      \"required\": ["]
6328#[doc = "        \"Failure\""]
6329#[doc = "      ],"]
6330#[doc = "      \"properties\": {"]
6331#[doc = "        \"Failure\": {"]
6332#[doc = "          \"$ref\": \"#/components/schemas/TxExecutionError\""]
6333#[doc = "        }"]
6334#[doc = "      },"]
6335#[doc = "      \"additionalProperties\": false"]
6336#[doc = "    },"]
6337#[doc = "    {"]
6338#[doc = "      \"description\": \"The final action succeeded and returned some value or an empty vec encoded in base64.\","]
6339#[doc = "      \"type\": \"object\","]
6340#[doc = "      \"required\": ["]
6341#[doc = "        \"SuccessValue\""]
6342#[doc = "      ],"]
6343#[doc = "      \"properties\": {"]
6344#[doc = "        \"SuccessValue\": {"]
6345#[doc = "          \"type\": \"string\""]
6346#[doc = "        }"]
6347#[doc = "      },"]
6348#[doc = "      \"additionalProperties\": false"]
6349#[doc = "    },"]
6350#[doc = "    {"]
6351#[doc = "      \"description\": \"The final action of the receipt returned a promise or the signed transaction was converted\\nto a receipt. Contains the receipt_id of the generated receipt.\","]
6352#[doc = "      \"type\": \"object\","]
6353#[doc = "      \"required\": ["]
6354#[doc = "        \"SuccessReceiptId\""]
6355#[doc = "      ],"]
6356#[doc = "      \"properties\": {"]
6357#[doc = "        \"SuccessReceiptId\": {"]
6358#[doc = "          \"$ref\": \"#/components/schemas/CryptoHash\""]
6359#[doc = "        }"]
6360#[doc = "      },"]
6361#[doc = "      \"additionalProperties\": false"]
6362#[doc = "    }"]
6363#[doc = "  ]"]
6364#[doc = "}"]
6365#[doc = r" ```"]
6366#[doc = r" </details>"]
6367#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
6368pub enum ExecutionStatusView {
6369    #[doc = "The execution is pending or unknown."]
6370    Unknown,
6371    #[doc = "The execution has failed."]
6372    Failure(TxExecutionError),
6373    #[doc = "The final action succeeded and returned some value or an empty vec encoded in base64."]
6374    SuccessValue(::std::string::String),
6375    #[doc = "The final action of the receipt returned a promise or the signed transaction was converted\nto a receipt. Contains the receipt_id of the generated receipt."]
6376    SuccessReceiptId(CryptoHash),
6377}
6378impl ::std::convert::From<&Self> for ExecutionStatusView {
6379    fn from(value: &ExecutionStatusView) -> Self {
6380        value.clone()
6381    }
6382}
6383impl ::std::convert::From<TxExecutionError> for ExecutionStatusView {
6384    fn from(value: TxExecutionError) -> Self {
6385        Self::Failure(value)
6386    }
6387}
6388impl ::std::convert::From<CryptoHash> for ExecutionStatusView {
6389    fn from(value: CryptoHash) -> Self {
6390        Self::SuccessReceiptId(value)
6391    }
6392}
6393#[doc = "Typed view of ExtCostsConfig to preserve JSON output field names in protocol\nconfig RPC output."]
6394#[doc = r""]
6395#[doc = r" <details><summary>JSON schema</summary>"]
6396#[doc = r""]
6397#[doc = r" ```json"]
6398#[doc = "{"]
6399#[doc = "  \"description\": \"Typed view of ExtCostsConfig to preserve JSON output field names in protocol\\nconfig RPC output.\","]
6400#[doc = "  \"type\": \"object\","]
6401#[doc = "  \"required\": ["]
6402#[doc = "    \"alt_bn128_g1_multiexp_base\","]
6403#[doc = "    \"alt_bn128_g1_multiexp_element\","]
6404#[doc = "    \"alt_bn128_g1_sum_base\","]
6405#[doc = "    \"alt_bn128_g1_sum_element\","]
6406#[doc = "    \"alt_bn128_pairing_check_base\","]
6407#[doc = "    \"alt_bn128_pairing_check_element\","]
6408#[doc = "    \"base\","]
6409#[doc = "    \"bls12381_g1_multiexp_base\","]
6410#[doc = "    \"bls12381_g1_multiexp_element\","]
6411#[doc = "    \"bls12381_g2_multiexp_base\","]
6412#[doc = "    \"bls12381_g2_multiexp_element\","]
6413#[doc = "    \"bls12381_map_fp2_to_g2_base\","]
6414#[doc = "    \"bls12381_map_fp2_to_g2_element\","]
6415#[doc = "    \"bls12381_map_fp_to_g1_base\","]
6416#[doc = "    \"bls12381_map_fp_to_g1_element\","]
6417#[doc = "    \"bls12381_p1_decompress_base\","]
6418#[doc = "    \"bls12381_p1_decompress_element\","]
6419#[doc = "    \"bls12381_p1_sum_base\","]
6420#[doc = "    \"bls12381_p1_sum_element\","]
6421#[doc = "    \"bls12381_p2_decompress_base\","]
6422#[doc = "    \"bls12381_p2_decompress_element\","]
6423#[doc = "    \"bls12381_p2_sum_base\","]
6424#[doc = "    \"bls12381_p2_sum_element\","]
6425#[doc = "    \"bls12381_pairing_base\","]
6426#[doc = "    \"bls12381_pairing_element\","]
6427#[doc = "    \"contract_compile_base\","]
6428#[doc = "    \"contract_compile_bytes\","]
6429#[doc = "    \"contract_loading_base\","]
6430#[doc = "    \"contract_loading_bytes\","]
6431#[doc = "    \"ecrecover_base\","]
6432#[doc = "    \"ed25519_verify_base\","]
6433#[doc = "    \"ed25519_verify_byte\","]
6434#[doc = "    \"keccak256_base\","]
6435#[doc = "    \"keccak256_byte\","]
6436#[doc = "    \"keccak512_base\","]
6437#[doc = "    \"keccak512_byte\","]
6438#[doc = "    \"log_base\","]
6439#[doc = "    \"log_byte\","]
6440#[doc = "    \"promise_and_base\","]
6441#[doc = "    \"promise_and_per_promise\","]
6442#[doc = "    \"promise_return\","]
6443#[doc = "    \"read_cached_trie_node\","]
6444#[doc = "    \"read_memory_base\","]
6445#[doc = "    \"read_memory_byte\","]
6446#[doc = "    \"read_register_base\","]
6447#[doc = "    \"read_register_byte\","]
6448#[doc = "    \"ripemd160_base\","]
6449#[doc = "    \"ripemd160_block\","]
6450#[doc = "    \"sha256_base\","]
6451#[doc = "    \"sha256_byte\","]
6452#[doc = "    \"storage_has_key_base\","]
6453#[doc = "    \"storage_has_key_byte\","]
6454#[doc = "    \"storage_iter_create_from_byte\","]
6455#[doc = "    \"storage_iter_create_prefix_base\","]
6456#[doc = "    \"storage_iter_create_prefix_byte\","]
6457#[doc = "    \"storage_iter_create_range_base\","]
6458#[doc = "    \"storage_iter_create_to_byte\","]
6459#[doc = "    \"storage_iter_next_base\","]
6460#[doc = "    \"storage_iter_next_key_byte\","]
6461#[doc = "    \"storage_iter_next_value_byte\","]
6462#[doc = "    \"storage_large_read_overhead_base\","]
6463#[doc = "    \"storage_large_read_overhead_byte\","]
6464#[doc = "    \"storage_read_base\","]
6465#[doc = "    \"storage_read_key_byte\","]
6466#[doc = "    \"storage_read_value_byte\","]
6467#[doc = "    \"storage_remove_base\","]
6468#[doc = "    \"storage_remove_key_byte\","]
6469#[doc = "    \"storage_remove_ret_value_byte\","]
6470#[doc = "    \"storage_write_base\","]
6471#[doc = "    \"storage_write_evicted_byte\","]
6472#[doc = "    \"storage_write_key_byte\","]
6473#[doc = "    \"storage_write_value_byte\","]
6474#[doc = "    \"touching_trie_node\","]
6475#[doc = "    \"utf16_decoding_base\","]
6476#[doc = "    \"utf16_decoding_byte\","]
6477#[doc = "    \"utf8_decoding_base\","]
6478#[doc = "    \"utf8_decoding_byte\","]
6479#[doc = "    \"validator_stake_base\","]
6480#[doc = "    \"validator_total_stake_base\","]
6481#[doc = "    \"write_memory_base\","]
6482#[doc = "    \"write_memory_byte\","]
6483#[doc = "    \"write_register_base\","]
6484#[doc = "    \"write_register_byte\","]
6485#[doc = "    \"yield_create_base\","]
6486#[doc = "    \"yield_create_byte\","]
6487#[doc = "    \"yield_resume_base\","]
6488#[doc = "    \"yield_resume_byte\""]
6489#[doc = "  ],"]
6490#[doc = "  \"properties\": {"]
6491#[doc = "    \"alt_bn128_g1_multiexp_base\": {"]
6492#[doc = "      \"description\": \"Base cost for multiexp\","]
6493#[doc = "      \"allOf\": ["]
6494#[doc = "        {"]
6495#[doc = "          \"$ref\": \"#/components/schemas/NearGas\""]
6496#[doc = "        }"]
6497#[doc = "      ]"]
6498#[doc = "    },"]
6499#[doc = "    \"alt_bn128_g1_multiexp_element\": {"]
6500#[doc = "      \"description\": \"Per element cost for multiexp\","]
6501#[doc = "      \"allOf\": ["]
6502#[doc = "        {"]
6503#[doc = "          \"$ref\": \"#/components/schemas/NearGas\""]
6504#[doc = "        }"]
6505#[doc = "      ]"]
6506#[doc = "    },"]
6507#[doc = "    \"alt_bn128_g1_sum_base\": {"]
6508#[doc = "      \"description\": \"Base cost for sum\","]
6509#[doc = "      \"allOf\": ["]
6510#[doc = "        {"]
6511#[doc = "          \"$ref\": \"#/components/schemas/NearGas\""]
6512#[doc = "        }"]
6513#[doc = "      ]"]
6514#[doc = "    },"]
6515#[doc = "    \"alt_bn128_g1_sum_element\": {"]
6516#[doc = "      \"description\": \"Per element cost for sum\","]
6517#[doc = "      \"allOf\": ["]
6518#[doc = "        {"]
6519#[doc = "          \"$ref\": \"#/components/schemas/NearGas\""]
6520#[doc = "        }"]
6521#[doc = "      ]"]
6522#[doc = "    },"]
6523#[doc = "    \"alt_bn128_pairing_check_base\": {"]
6524#[doc = "      \"description\": \"Base cost for pairing check\","]
6525#[doc = "      \"allOf\": ["]
6526#[doc = "        {"]
6527#[doc = "          \"$ref\": \"#/components/schemas/NearGas\""]
6528#[doc = "        }"]
6529#[doc = "      ]"]
6530#[doc = "    },"]
6531#[doc = "    \"alt_bn128_pairing_check_element\": {"]
6532#[doc = "      \"description\": \"Per element cost for pairing check\","]
6533#[doc = "      \"allOf\": ["]
6534#[doc = "        {"]
6535#[doc = "          \"$ref\": \"#/components/schemas/NearGas\""]
6536#[doc = "        }"]
6537#[doc = "      ]"]
6538#[doc = "    },"]
6539#[doc = "    \"base\": {"]
6540#[doc = "      \"description\": \"Base cost for calling a host function.\","]
6541#[doc = "      \"allOf\": ["]
6542#[doc = "        {"]
6543#[doc = "          \"$ref\": \"#/components/schemas/NearGas\""]
6544#[doc = "        }"]
6545#[doc = "      ]"]
6546#[doc = "    },"]
6547#[doc = "    \"bls12381_g1_multiexp_base\": {"]
6548#[doc = "      \"$ref\": \"#/components/schemas/NearGas\""]
6549#[doc = "    },"]
6550#[doc = "    \"bls12381_g1_multiexp_element\": {"]
6551#[doc = "      \"$ref\": \"#/components/schemas/NearGas\""]
6552#[doc = "    },"]
6553#[doc = "    \"bls12381_g2_multiexp_base\": {"]
6554#[doc = "      \"$ref\": \"#/components/schemas/NearGas\""]
6555#[doc = "    },"]
6556#[doc = "    \"bls12381_g2_multiexp_element\": {"]
6557#[doc = "      \"$ref\": \"#/components/schemas/NearGas\""]
6558#[doc = "    },"]
6559#[doc = "    \"bls12381_map_fp2_to_g2_base\": {"]
6560#[doc = "      \"$ref\": \"#/components/schemas/NearGas\""]
6561#[doc = "    },"]
6562#[doc = "    \"bls12381_map_fp2_to_g2_element\": {"]
6563#[doc = "      \"$ref\": \"#/components/schemas/NearGas\""]
6564#[doc = "    },"]
6565#[doc = "    \"bls12381_map_fp_to_g1_base\": {"]
6566#[doc = "      \"$ref\": \"#/components/schemas/NearGas\""]
6567#[doc = "    },"]
6568#[doc = "    \"bls12381_map_fp_to_g1_element\": {"]
6569#[doc = "      \"$ref\": \"#/components/schemas/NearGas\""]
6570#[doc = "    },"]
6571#[doc = "    \"bls12381_p1_decompress_base\": {"]
6572#[doc = "      \"$ref\": \"#/components/schemas/NearGas\""]
6573#[doc = "    },"]
6574#[doc = "    \"bls12381_p1_decompress_element\": {"]
6575#[doc = "      \"$ref\": \"#/components/schemas/NearGas\""]
6576#[doc = "    },"]
6577#[doc = "    \"bls12381_p1_sum_base\": {"]
6578#[doc = "      \"$ref\": \"#/components/schemas/NearGas\""]
6579#[doc = "    },"]
6580#[doc = "    \"bls12381_p1_sum_element\": {"]
6581#[doc = "      \"$ref\": \"#/components/schemas/NearGas\""]
6582#[doc = "    },"]
6583#[doc = "    \"bls12381_p2_decompress_base\": {"]
6584#[doc = "      \"$ref\": \"#/components/schemas/NearGas\""]
6585#[doc = "    },"]
6586#[doc = "    \"bls12381_p2_decompress_element\": {"]
6587#[doc = "      \"$ref\": \"#/components/schemas/NearGas\""]
6588#[doc = "    },"]
6589#[doc = "    \"bls12381_p2_sum_base\": {"]
6590#[doc = "      \"$ref\": \"#/components/schemas/NearGas\""]
6591#[doc = "    },"]
6592#[doc = "    \"bls12381_p2_sum_element\": {"]
6593#[doc = "      \"$ref\": \"#/components/schemas/NearGas\""]
6594#[doc = "    },"]
6595#[doc = "    \"bls12381_pairing_base\": {"]
6596#[doc = "      \"$ref\": \"#/components/schemas/NearGas\""]
6597#[doc = "    },"]
6598#[doc = "    \"bls12381_pairing_element\": {"]
6599#[doc = "      \"$ref\": \"#/components/schemas/NearGas\""]
6600#[doc = "    },"]
6601#[doc = "    \"contract_compile_base\": {"]
6602#[doc = "      \"$ref\": \"#/components/schemas/NearGas\""]
6603#[doc = "    },"]
6604#[doc = "    \"contract_compile_bytes\": {"]
6605#[doc = "      \"$ref\": \"#/components/schemas/NearGas\""]
6606#[doc = "    },"]
6607#[doc = "    \"contract_loading_base\": {"]
6608#[doc = "      \"description\": \"Base cost of loading a pre-compiled contract\","]
6609#[doc = "      \"allOf\": ["]
6610#[doc = "        {"]
6611#[doc = "          \"$ref\": \"#/components/schemas/NearGas\""]
6612#[doc = "        }"]
6613#[doc = "      ]"]
6614#[doc = "    },"]
6615#[doc = "    \"contract_loading_bytes\": {"]
6616#[doc = "      \"description\": \"Cost per byte of loading a pre-compiled contract\","]
6617#[doc = "      \"allOf\": ["]
6618#[doc = "        {"]
6619#[doc = "          \"$ref\": \"#/components/schemas/NearGas\""]
6620#[doc = "        }"]
6621#[doc = "      ]"]
6622#[doc = "    },"]
6623#[doc = "    \"ecrecover_base\": {"]
6624#[doc = "      \"description\": \"Cost of calling ecrecover\","]
6625#[doc = "      \"allOf\": ["]
6626#[doc = "        {"]
6627#[doc = "          \"$ref\": \"#/components/schemas/NearGas\""]
6628#[doc = "        }"]
6629#[doc = "      ]"]
6630#[doc = "    },"]
6631#[doc = "    \"ed25519_verify_base\": {"]
6632#[doc = "      \"description\": \"Cost of getting ed25519 base\","]
6633#[doc = "      \"allOf\": ["]
6634#[doc = "        {"]
6635#[doc = "          \"$ref\": \"#/components/schemas/NearGas\""]
6636#[doc = "        }"]
6637#[doc = "      ]"]
6638#[doc = "    },"]
6639#[doc = "    \"ed25519_verify_byte\": {"]
6640#[doc = "      \"description\": \"Cost of getting ed25519 per byte\","]
6641#[doc = "      \"allOf\": ["]
6642#[doc = "        {"]
6643#[doc = "          \"$ref\": \"#/components/schemas/NearGas\""]
6644#[doc = "        }"]
6645#[doc = "      ]"]
6646#[doc = "    },"]
6647#[doc = "    \"keccak256_base\": {"]
6648#[doc = "      \"description\": \"Cost of getting sha256 base\","]
6649#[doc = "      \"allOf\": ["]
6650#[doc = "        {"]
6651#[doc = "          \"$ref\": \"#/components/schemas/NearGas\""]
6652#[doc = "        }"]
6653#[doc = "      ]"]
6654#[doc = "    },"]
6655#[doc = "    \"keccak256_byte\": {"]
6656#[doc = "      \"description\": \"Cost of getting sha256 per byte\","]
6657#[doc = "      \"allOf\": ["]
6658#[doc = "        {"]
6659#[doc = "          \"$ref\": \"#/components/schemas/NearGas\""]
6660#[doc = "        }"]
6661#[doc = "      ]"]
6662#[doc = "    },"]
6663#[doc = "    \"keccak512_base\": {"]
6664#[doc = "      \"description\": \"Cost of getting sha256 base\","]
6665#[doc = "      \"allOf\": ["]
6666#[doc = "        {"]
6667#[doc = "          \"$ref\": \"#/components/schemas/NearGas\""]
6668#[doc = "        }"]
6669#[doc = "      ]"]
6670#[doc = "    },"]
6671#[doc = "    \"keccak512_byte\": {"]
6672#[doc = "      \"description\": \"Cost of getting sha256 per byte\","]
6673#[doc = "      \"allOf\": ["]
6674#[doc = "        {"]
6675#[doc = "          \"$ref\": \"#/components/schemas/NearGas\""]
6676#[doc = "        }"]
6677#[doc = "      ]"]
6678#[doc = "    },"]
6679#[doc = "    \"log_base\": {"]
6680#[doc = "      \"description\": \"Cost for calling logging.\","]
6681#[doc = "      \"allOf\": ["]
6682#[doc = "        {"]
6683#[doc = "          \"$ref\": \"#/components/schemas/NearGas\""]
6684#[doc = "        }"]
6685#[doc = "      ]"]
6686#[doc = "    },"]
6687#[doc = "    \"log_byte\": {"]
6688#[doc = "      \"description\": \"Cost for logging per byte\","]
6689#[doc = "      \"allOf\": ["]
6690#[doc = "        {"]
6691#[doc = "          \"$ref\": \"#/components/schemas/NearGas\""]
6692#[doc = "        }"]
6693#[doc = "      ]"]
6694#[doc = "    },"]
6695#[doc = "    \"promise_and_base\": {"]
6696#[doc = "      \"description\": \"Cost for calling `promise_and`\","]
6697#[doc = "      \"allOf\": ["]
6698#[doc = "        {"]
6699#[doc = "          \"$ref\": \"#/components/schemas/NearGas\""]
6700#[doc = "        }"]
6701#[doc = "      ]"]
6702#[doc = "    },"]
6703#[doc = "    \"promise_and_per_promise\": {"]
6704#[doc = "      \"description\": \"Cost for calling `promise_and` for each promise\","]
6705#[doc = "      \"allOf\": ["]
6706#[doc = "        {"]
6707#[doc = "          \"$ref\": \"#/components/schemas/NearGas\""]
6708#[doc = "        }"]
6709#[doc = "      ]"]
6710#[doc = "    },"]
6711#[doc = "    \"promise_return\": {"]
6712#[doc = "      \"description\": \"Cost for calling `promise_return`\","]
6713#[doc = "      \"allOf\": ["]
6714#[doc = "        {"]
6715#[doc = "          \"$ref\": \"#/components/schemas/NearGas\""]
6716#[doc = "        }"]
6717#[doc = "      ]"]
6718#[doc = "    },"]
6719#[doc = "    \"read_cached_trie_node\": {"]
6720#[doc = "      \"description\": \"Cost for reading trie node from memory\","]
6721#[doc = "      \"allOf\": ["]
6722#[doc = "        {"]
6723#[doc = "          \"$ref\": \"#/components/schemas/NearGas\""]
6724#[doc = "        }"]
6725#[doc = "      ]"]
6726#[doc = "    },"]
6727#[doc = "    \"read_memory_base\": {"]
6728#[doc = "      \"description\": \"Base cost for guest memory read\","]
6729#[doc = "      \"allOf\": ["]
6730#[doc = "        {"]
6731#[doc = "          \"$ref\": \"#/components/schemas/NearGas\""]
6732#[doc = "        }"]
6733#[doc = "      ]"]
6734#[doc = "    },"]
6735#[doc = "    \"read_memory_byte\": {"]
6736#[doc = "      \"description\": \"Cost for guest memory read\","]
6737#[doc = "      \"allOf\": ["]
6738#[doc = "        {"]
6739#[doc = "          \"$ref\": \"#/components/schemas/NearGas\""]
6740#[doc = "        }"]
6741#[doc = "      ]"]
6742#[doc = "    },"]
6743#[doc = "    \"read_register_base\": {"]
6744#[doc = "      \"description\": \"Base cost for reading from register\","]
6745#[doc = "      \"allOf\": ["]
6746#[doc = "        {"]
6747#[doc = "          \"$ref\": \"#/components/schemas/NearGas\""]
6748#[doc = "        }"]
6749#[doc = "      ]"]
6750#[doc = "    },"]
6751#[doc = "    \"read_register_byte\": {"]
6752#[doc = "      \"description\": \"Cost for reading byte from register\","]
6753#[doc = "      \"allOf\": ["]
6754#[doc = "        {"]
6755#[doc = "          \"$ref\": \"#/components/schemas/NearGas\""]
6756#[doc = "        }"]
6757#[doc = "      ]"]
6758#[doc = "    },"]
6759#[doc = "    \"ripemd160_base\": {"]
6760#[doc = "      \"description\": \"Cost of getting ripemd160 base\","]
6761#[doc = "      \"allOf\": ["]
6762#[doc = "        {"]
6763#[doc = "          \"$ref\": \"#/components/schemas/NearGas\""]
6764#[doc = "        }"]
6765#[doc = "      ]"]
6766#[doc = "    },"]
6767#[doc = "    \"ripemd160_block\": {"]
6768#[doc = "      \"description\": \"Cost of getting ripemd160 per message block\","]
6769#[doc = "      \"allOf\": ["]
6770#[doc = "        {"]
6771#[doc = "          \"$ref\": \"#/components/schemas/NearGas\""]
6772#[doc = "        }"]
6773#[doc = "      ]"]
6774#[doc = "    },"]
6775#[doc = "    \"sha256_base\": {"]
6776#[doc = "      \"description\": \"Cost of getting sha256 base\","]
6777#[doc = "      \"allOf\": ["]
6778#[doc = "        {"]
6779#[doc = "          \"$ref\": \"#/components/schemas/NearGas\""]
6780#[doc = "        }"]
6781#[doc = "      ]"]
6782#[doc = "    },"]
6783#[doc = "    \"sha256_byte\": {"]
6784#[doc = "      \"description\": \"Cost of getting sha256 per byte\","]
6785#[doc = "      \"allOf\": ["]
6786#[doc = "        {"]
6787#[doc = "          \"$ref\": \"#/components/schemas/NearGas\""]
6788#[doc = "        }"]
6789#[doc = "      ]"]
6790#[doc = "    },"]
6791#[doc = "    \"storage_has_key_base\": {"]
6792#[doc = "      \"description\": \"Storage trie check for key existence cost base\","]
6793#[doc = "      \"allOf\": ["]
6794#[doc = "        {"]
6795#[doc = "          \"$ref\": \"#/components/schemas/NearGas\""]
6796#[doc = "        }"]
6797#[doc = "      ]"]
6798#[doc = "    },"]
6799#[doc = "    \"storage_has_key_byte\": {"]
6800#[doc = "      \"description\": \"Storage trie check for key existence per key byte\","]
6801#[doc = "      \"allOf\": ["]
6802#[doc = "        {"]
6803#[doc = "          \"$ref\": \"#/components/schemas/NearGas\""]
6804#[doc = "        }"]
6805#[doc = "      ]"]
6806#[doc = "    },"]
6807#[doc = "    \"storage_iter_create_from_byte\": {"]
6808#[doc = "      \"description\": \"Create trie range iterator cost per byte of from key.\","]
6809#[doc = "      \"allOf\": ["]
6810#[doc = "        {"]
6811#[doc = "          \"$ref\": \"#/components/schemas/NearGas\""]
6812#[doc = "        }"]
6813#[doc = "      ]"]
6814#[doc = "    },"]
6815#[doc = "    \"storage_iter_create_prefix_base\": {"]
6816#[doc = "      \"description\": \"Create trie prefix iterator cost base\","]
6817#[doc = "      \"allOf\": ["]
6818#[doc = "        {"]
6819#[doc = "          \"$ref\": \"#/components/schemas/NearGas\""]
6820#[doc = "        }"]
6821#[doc = "      ]"]
6822#[doc = "    },"]
6823#[doc = "    \"storage_iter_create_prefix_byte\": {"]
6824#[doc = "      \"description\": \"Create trie prefix iterator cost per byte.\","]
6825#[doc = "      \"allOf\": ["]
6826#[doc = "        {"]
6827#[doc = "          \"$ref\": \"#/components/schemas/NearGas\""]
6828#[doc = "        }"]
6829#[doc = "      ]"]
6830#[doc = "    },"]
6831#[doc = "    \"storage_iter_create_range_base\": {"]
6832#[doc = "      \"description\": \"Create trie range iterator cost base\","]
6833#[doc = "      \"allOf\": ["]
6834#[doc = "        {"]
6835#[doc = "          \"$ref\": \"#/components/schemas/NearGas\""]
6836#[doc = "        }"]
6837#[doc = "      ]"]
6838#[doc = "    },"]
6839#[doc = "    \"storage_iter_create_to_byte\": {"]
6840#[doc = "      \"description\": \"Create trie range iterator cost per byte of to key.\","]
6841#[doc = "      \"allOf\": ["]
6842#[doc = "        {"]
6843#[doc = "          \"$ref\": \"#/components/schemas/NearGas\""]
6844#[doc = "        }"]
6845#[doc = "      ]"]
6846#[doc = "    },"]
6847#[doc = "    \"storage_iter_next_base\": {"]
6848#[doc = "      \"description\": \"Trie iterator per key base cost\","]
6849#[doc = "      \"allOf\": ["]
6850#[doc = "        {"]
6851#[doc = "          \"$ref\": \"#/components/schemas/NearGas\""]
6852#[doc = "        }"]
6853#[doc = "      ]"]
6854#[doc = "    },"]
6855#[doc = "    \"storage_iter_next_key_byte\": {"]
6856#[doc = "      \"description\": \"Trie iterator next key byte cost\","]
6857#[doc = "      \"allOf\": ["]
6858#[doc = "        {"]
6859#[doc = "          \"$ref\": \"#/components/schemas/NearGas\""]
6860#[doc = "        }"]
6861#[doc = "      ]"]
6862#[doc = "    },"]
6863#[doc = "    \"storage_iter_next_value_byte\": {"]
6864#[doc = "      \"description\": \"Trie iterator next key byte cost\","]
6865#[doc = "      \"allOf\": ["]
6866#[doc = "        {"]
6867#[doc = "          \"$ref\": \"#/components/schemas/NearGas\""]
6868#[doc = "        }"]
6869#[doc = "      ]"]
6870#[doc = "    },"]
6871#[doc = "    \"storage_large_read_overhead_base\": {"]
6872#[doc = "      \"description\": \"Storage trie read key overhead base cost, when doing large reads\","]
6873#[doc = "      \"allOf\": ["]
6874#[doc = "        {"]
6875#[doc = "          \"$ref\": \"#/components/schemas/NearGas\""]
6876#[doc = "        }"]
6877#[doc = "      ]"]
6878#[doc = "    },"]
6879#[doc = "    \"storage_large_read_overhead_byte\": {"]
6880#[doc = "      \"description\": \"Storage trie read key overhead  per-byte cost, when doing large reads\","]
6881#[doc = "      \"allOf\": ["]
6882#[doc = "        {"]
6883#[doc = "          \"$ref\": \"#/components/schemas/NearGas\""]
6884#[doc = "        }"]
6885#[doc = "      ]"]
6886#[doc = "    },"]
6887#[doc = "    \"storage_read_base\": {"]
6888#[doc = "      \"description\": \"Storage trie read key base cost\","]
6889#[doc = "      \"allOf\": ["]
6890#[doc = "        {"]
6891#[doc = "          \"$ref\": \"#/components/schemas/NearGas\""]
6892#[doc = "        }"]
6893#[doc = "      ]"]
6894#[doc = "    },"]
6895#[doc = "    \"storage_read_key_byte\": {"]
6896#[doc = "      \"description\": \"Storage trie read key per byte cost\","]
6897#[doc = "      \"allOf\": ["]
6898#[doc = "        {"]
6899#[doc = "          \"$ref\": \"#/components/schemas/NearGas\""]
6900#[doc = "        }"]
6901#[doc = "      ]"]
6902#[doc = "    },"]
6903#[doc = "    \"storage_read_value_byte\": {"]
6904#[doc = "      \"description\": \"Storage trie read value cost per byte cost\","]
6905#[doc = "      \"allOf\": ["]
6906#[doc = "        {"]
6907#[doc = "          \"$ref\": \"#/components/schemas/NearGas\""]
6908#[doc = "        }"]
6909#[doc = "      ]"]
6910#[doc = "    },"]
6911#[doc = "    \"storage_remove_base\": {"]
6912#[doc = "      \"description\": \"Remove key from trie base cost\","]
6913#[doc = "      \"allOf\": ["]
6914#[doc = "        {"]
6915#[doc = "          \"$ref\": \"#/components/schemas/NearGas\""]
6916#[doc = "        }"]
6917#[doc = "      ]"]
6918#[doc = "    },"]
6919#[doc = "    \"storage_remove_key_byte\": {"]
6920#[doc = "      \"description\": \"Remove key from trie per byte cost\","]
6921#[doc = "      \"allOf\": ["]
6922#[doc = "        {"]
6923#[doc = "          \"$ref\": \"#/components/schemas/NearGas\""]
6924#[doc = "        }"]
6925#[doc = "      ]"]
6926#[doc = "    },"]
6927#[doc = "    \"storage_remove_ret_value_byte\": {"]
6928#[doc = "      \"description\": \"Remove key from trie ret value byte cost\","]
6929#[doc = "      \"allOf\": ["]
6930#[doc = "        {"]
6931#[doc = "          \"$ref\": \"#/components/schemas/NearGas\""]
6932#[doc = "        }"]
6933#[doc = "      ]"]
6934#[doc = "    },"]
6935#[doc = "    \"storage_write_base\": {"]
6936#[doc = "      \"description\": \"Storage trie write key base cost\","]
6937#[doc = "      \"allOf\": ["]
6938#[doc = "        {"]
6939#[doc = "          \"$ref\": \"#/components/schemas/NearGas\""]
6940#[doc = "        }"]
6941#[doc = "      ]"]
6942#[doc = "    },"]
6943#[doc = "    \"storage_write_evicted_byte\": {"]
6944#[doc = "      \"description\": \"Storage trie write cost per byte of evicted value.\","]
6945#[doc = "      \"allOf\": ["]
6946#[doc = "        {"]
6947#[doc = "          \"$ref\": \"#/components/schemas/NearGas\""]
6948#[doc = "        }"]
6949#[doc = "      ]"]
6950#[doc = "    },"]
6951#[doc = "    \"storage_write_key_byte\": {"]
6952#[doc = "      \"description\": \"Storage trie write key per byte cost\","]
6953#[doc = "      \"allOf\": ["]
6954#[doc = "        {"]
6955#[doc = "          \"$ref\": \"#/components/schemas/NearGas\""]
6956#[doc = "        }"]
6957#[doc = "      ]"]
6958#[doc = "    },"]
6959#[doc = "    \"storage_write_value_byte\": {"]
6960#[doc = "      \"description\": \"Storage trie write value per byte cost\","]
6961#[doc = "      \"allOf\": ["]
6962#[doc = "        {"]
6963#[doc = "          \"$ref\": \"#/components/schemas/NearGas\""]
6964#[doc = "        }"]
6965#[doc = "      ]"]
6966#[doc = "    },"]
6967#[doc = "    \"touching_trie_node\": {"]
6968#[doc = "      \"description\": \"Cost per reading trie node from DB\","]
6969#[doc = "      \"allOf\": ["]
6970#[doc = "        {"]
6971#[doc = "          \"$ref\": \"#/components/schemas/NearGas\""]
6972#[doc = "        }"]
6973#[doc = "      ]"]
6974#[doc = "    },"]
6975#[doc = "    \"utf16_decoding_base\": {"]
6976#[doc = "      \"description\": \"Base cost of decoding utf16. It's used for `log_utf16`.\","]
6977#[doc = "      \"allOf\": ["]
6978#[doc = "        {"]
6979#[doc = "          \"$ref\": \"#/components/schemas/NearGas\""]
6980#[doc = "        }"]
6981#[doc = "      ]"]
6982#[doc = "    },"]
6983#[doc = "    \"utf16_decoding_byte\": {"]
6984#[doc = "      \"description\": \"Cost per byte of decoding utf16. It's used for `log_utf16`.\","]
6985#[doc = "      \"allOf\": ["]
6986#[doc = "        {"]
6987#[doc = "          \"$ref\": \"#/components/schemas/NearGas\""]
6988#[doc = "        }"]
6989#[doc = "      ]"]
6990#[doc = "    },"]
6991#[doc = "    \"utf8_decoding_base\": {"]
6992#[doc = "      \"description\": \"Base cost of decoding utf8. It's used for `log_utf8` and `panic_utf8`.\","]
6993#[doc = "      \"allOf\": ["]
6994#[doc = "        {"]
6995#[doc = "          \"$ref\": \"#/components/schemas/NearGas\""]
6996#[doc = "        }"]
6997#[doc = "      ]"]
6998#[doc = "    },"]
6999#[doc = "    \"utf8_decoding_byte\": {"]
7000#[doc = "      \"description\": \"Cost per byte of decoding utf8. It's used for `log_utf8` and `panic_utf8`.\","]
7001#[doc = "      \"allOf\": ["]
7002#[doc = "        {"]
7003#[doc = "          \"$ref\": \"#/components/schemas/NearGas\""]
7004#[doc = "        }"]
7005#[doc = "      ]"]
7006#[doc = "    },"]
7007#[doc = "    \"validator_stake_base\": {"]
7008#[doc = "      \"description\": \"Cost of calling `validator_stake`.\","]
7009#[doc = "      \"allOf\": ["]
7010#[doc = "        {"]
7011#[doc = "          \"$ref\": \"#/components/schemas/NearGas\""]
7012#[doc = "        }"]
7013#[doc = "      ]"]
7014#[doc = "    },"]
7015#[doc = "    \"validator_total_stake_base\": {"]
7016#[doc = "      \"description\": \"Cost of calling `validator_total_stake`.\","]
7017#[doc = "      \"allOf\": ["]
7018#[doc = "        {"]
7019#[doc = "          \"$ref\": \"#/components/schemas/NearGas\""]
7020#[doc = "        }"]
7021#[doc = "      ]"]
7022#[doc = "    },"]
7023#[doc = "    \"write_memory_base\": {"]
7024#[doc = "      \"description\": \"Base cost for guest memory write\","]
7025#[doc = "      \"allOf\": ["]
7026#[doc = "        {"]
7027#[doc = "          \"$ref\": \"#/components/schemas/NearGas\""]
7028#[doc = "        }"]
7029#[doc = "      ]"]
7030#[doc = "    },"]
7031#[doc = "    \"write_memory_byte\": {"]
7032#[doc = "      \"description\": \"Cost for guest memory write per byte\","]
7033#[doc = "      \"allOf\": ["]
7034#[doc = "        {"]
7035#[doc = "          \"$ref\": \"#/components/schemas/NearGas\""]
7036#[doc = "        }"]
7037#[doc = "      ]"]
7038#[doc = "    },"]
7039#[doc = "    \"write_register_base\": {"]
7040#[doc = "      \"description\": \"Base cost for writing into register\","]
7041#[doc = "      \"allOf\": ["]
7042#[doc = "        {"]
7043#[doc = "          \"$ref\": \"#/components/schemas/NearGas\""]
7044#[doc = "        }"]
7045#[doc = "      ]"]
7046#[doc = "    },"]
7047#[doc = "    \"write_register_byte\": {"]
7048#[doc = "      \"description\": \"Cost for writing byte into register\","]
7049#[doc = "      \"allOf\": ["]
7050#[doc = "        {"]
7051#[doc = "          \"$ref\": \"#/components/schemas/NearGas\""]
7052#[doc = "        }"]
7053#[doc = "      ]"]
7054#[doc = "    },"]
7055#[doc = "    \"yield_create_base\": {"]
7056#[doc = "      \"description\": \"Base cost for creating a yield promise.\","]
7057#[doc = "      \"allOf\": ["]
7058#[doc = "        {"]
7059#[doc = "          \"$ref\": \"#/components/schemas/NearGas\""]
7060#[doc = "        }"]
7061#[doc = "      ]"]
7062#[doc = "    },"]
7063#[doc = "    \"yield_create_byte\": {"]
7064#[doc = "      \"description\": \"Per byte cost of arguments and method name.\","]
7065#[doc = "      \"allOf\": ["]
7066#[doc = "        {"]
7067#[doc = "          \"$ref\": \"#/components/schemas/NearGas\""]
7068#[doc = "        }"]
7069#[doc = "      ]"]
7070#[doc = "    },"]
7071#[doc = "    \"yield_resume_base\": {"]
7072#[doc = "      \"description\": \"Base cost for resuming a yield receipt.\","]
7073#[doc = "      \"allOf\": ["]
7074#[doc = "        {"]
7075#[doc = "          \"$ref\": \"#/components/schemas/NearGas\""]
7076#[doc = "        }"]
7077#[doc = "      ]"]
7078#[doc = "    },"]
7079#[doc = "    \"yield_resume_byte\": {"]
7080#[doc = "      \"description\": \"Per byte cost of resume payload.\","]
7081#[doc = "      \"allOf\": ["]
7082#[doc = "        {"]
7083#[doc = "          \"$ref\": \"#/components/schemas/NearGas\""]
7084#[doc = "        }"]
7085#[doc = "      ]"]
7086#[doc = "    }"]
7087#[doc = "  }"]
7088#[doc = "}"]
7089#[doc = r" ```"]
7090#[doc = r" </details>"]
7091#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
7092pub struct ExtCostsConfigView {
7093    #[doc = "Base cost for multiexp"]
7094    pub alt_bn128_g1_multiexp_base: NearGas,
7095    #[doc = "Per element cost for multiexp"]
7096    pub alt_bn128_g1_multiexp_element: NearGas,
7097    #[doc = "Base cost for sum"]
7098    pub alt_bn128_g1_sum_base: NearGas,
7099    #[doc = "Per element cost for sum"]
7100    pub alt_bn128_g1_sum_element: NearGas,
7101    #[doc = "Base cost for pairing check"]
7102    pub alt_bn128_pairing_check_base: NearGas,
7103    #[doc = "Per element cost for pairing check"]
7104    pub alt_bn128_pairing_check_element: NearGas,
7105    #[doc = "Base cost for calling a host function."]
7106    pub base: NearGas,
7107    pub bls12381_g1_multiexp_base: NearGas,
7108    pub bls12381_g1_multiexp_element: NearGas,
7109    pub bls12381_g2_multiexp_base: NearGas,
7110    pub bls12381_g2_multiexp_element: NearGas,
7111    pub bls12381_map_fp2_to_g2_base: NearGas,
7112    pub bls12381_map_fp2_to_g2_element: NearGas,
7113    pub bls12381_map_fp_to_g1_base: NearGas,
7114    pub bls12381_map_fp_to_g1_element: NearGas,
7115    pub bls12381_p1_decompress_base: NearGas,
7116    pub bls12381_p1_decompress_element: NearGas,
7117    pub bls12381_p1_sum_base: NearGas,
7118    pub bls12381_p1_sum_element: NearGas,
7119    pub bls12381_p2_decompress_base: NearGas,
7120    pub bls12381_p2_decompress_element: NearGas,
7121    pub bls12381_p2_sum_base: NearGas,
7122    pub bls12381_p2_sum_element: NearGas,
7123    pub bls12381_pairing_base: NearGas,
7124    pub bls12381_pairing_element: NearGas,
7125    pub contract_compile_base: NearGas,
7126    pub contract_compile_bytes: NearGas,
7127    #[doc = "Base cost of loading a pre-compiled contract"]
7128    pub contract_loading_base: NearGas,
7129    #[doc = "Cost per byte of loading a pre-compiled contract"]
7130    pub contract_loading_bytes: NearGas,
7131    #[doc = "Cost of calling ecrecover"]
7132    pub ecrecover_base: NearGas,
7133    #[doc = "Cost of getting ed25519 base"]
7134    pub ed25519_verify_base: NearGas,
7135    #[doc = "Cost of getting ed25519 per byte"]
7136    pub ed25519_verify_byte: NearGas,
7137    #[doc = "Cost of getting sha256 base"]
7138    pub keccak256_base: NearGas,
7139    #[doc = "Cost of getting sha256 per byte"]
7140    pub keccak256_byte: NearGas,
7141    #[doc = "Cost of getting sha256 base"]
7142    pub keccak512_base: NearGas,
7143    #[doc = "Cost of getting sha256 per byte"]
7144    pub keccak512_byte: NearGas,
7145    #[doc = "Cost for calling logging."]
7146    pub log_base: NearGas,
7147    #[doc = "Cost for logging per byte"]
7148    pub log_byte: NearGas,
7149    #[doc = "Cost for calling `promise_and`"]
7150    pub promise_and_base: NearGas,
7151    #[doc = "Cost for calling `promise_and` for each promise"]
7152    pub promise_and_per_promise: NearGas,
7153    #[doc = "Cost for calling `promise_return`"]
7154    pub promise_return: NearGas,
7155    #[doc = "Cost for reading trie node from memory"]
7156    pub read_cached_trie_node: NearGas,
7157    #[doc = "Base cost for guest memory read"]
7158    pub read_memory_base: NearGas,
7159    #[doc = "Cost for guest memory read"]
7160    pub read_memory_byte: NearGas,
7161    #[doc = "Base cost for reading from register"]
7162    pub read_register_base: NearGas,
7163    #[doc = "Cost for reading byte from register"]
7164    pub read_register_byte: NearGas,
7165    #[doc = "Cost of getting ripemd160 base"]
7166    pub ripemd160_base: NearGas,
7167    #[doc = "Cost of getting ripemd160 per message block"]
7168    pub ripemd160_block: NearGas,
7169    #[doc = "Cost of getting sha256 base"]
7170    pub sha256_base: NearGas,
7171    #[doc = "Cost of getting sha256 per byte"]
7172    pub sha256_byte: NearGas,
7173    #[doc = "Storage trie check for key existence cost base"]
7174    pub storage_has_key_base: NearGas,
7175    #[doc = "Storage trie check for key existence per key byte"]
7176    pub storage_has_key_byte: NearGas,
7177    #[doc = "Create trie range iterator cost per byte of from key."]
7178    pub storage_iter_create_from_byte: NearGas,
7179    #[doc = "Create trie prefix iterator cost base"]
7180    pub storage_iter_create_prefix_base: NearGas,
7181    #[doc = "Create trie prefix iterator cost per byte."]
7182    pub storage_iter_create_prefix_byte: NearGas,
7183    #[doc = "Create trie range iterator cost base"]
7184    pub storage_iter_create_range_base: NearGas,
7185    #[doc = "Create trie range iterator cost per byte of to key."]
7186    pub storage_iter_create_to_byte: NearGas,
7187    #[doc = "Trie iterator per key base cost"]
7188    pub storage_iter_next_base: NearGas,
7189    #[doc = "Trie iterator next key byte cost"]
7190    pub storage_iter_next_key_byte: NearGas,
7191    #[doc = "Trie iterator next key byte cost"]
7192    pub storage_iter_next_value_byte: NearGas,
7193    #[doc = "Storage trie read key overhead base cost, when doing large reads"]
7194    pub storage_large_read_overhead_base: NearGas,
7195    #[doc = "Storage trie read key overhead  per-byte cost, when doing large reads"]
7196    pub storage_large_read_overhead_byte: NearGas,
7197    #[doc = "Storage trie read key base cost"]
7198    pub storage_read_base: NearGas,
7199    #[doc = "Storage trie read key per byte cost"]
7200    pub storage_read_key_byte: NearGas,
7201    #[doc = "Storage trie read value cost per byte cost"]
7202    pub storage_read_value_byte: NearGas,
7203    #[doc = "Remove key from trie base cost"]
7204    pub storage_remove_base: NearGas,
7205    #[doc = "Remove key from trie per byte cost"]
7206    pub storage_remove_key_byte: NearGas,
7207    #[doc = "Remove key from trie ret value byte cost"]
7208    pub storage_remove_ret_value_byte: NearGas,
7209    #[doc = "Storage trie write key base cost"]
7210    pub storage_write_base: NearGas,
7211    #[doc = "Storage trie write cost per byte of evicted value."]
7212    pub storage_write_evicted_byte: NearGas,
7213    #[doc = "Storage trie write key per byte cost"]
7214    pub storage_write_key_byte: NearGas,
7215    #[doc = "Storage trie write value per byte cost"]
7216    pub storage_write_value_byte: NearGas,
7217    #[doc = "Cost per reading trie node from DB"]
7218    pub touching_trie_node: NearGas,
7219    #[doc = "Base cost of decoding utf16. It's used for `log_utf16`."]
7220    pub utf16_decoding_base: NearGas,
7221    #[doc = "Cost per byte of decoding utf16. It's used for `log_utf16`."]
7222    pub utf16_decoding_byte: NearGas,
7223    #[doc = "Base cost of decoding utf8. It's used for `log_utf8` and `panic_utf8`."]
7224    pub utf8_decoding_base: NearGas,
7225    #[doc = "Cost per byte of decoding utf8. It's used for `log_utf8` and `panic_utf8`."]
7226    pub utf8_decoding_byte: NearGas,
7227    #[doc = "Cost of calling `validator_stake`."]
7228    pub validator_stake_base: NearGas,
7229    #[doc = "Cost of calling `validator_total_stake`."]
7230    pub validator_total_stake_base: NearGas,
7231    #[doc = "Base cost for guest memory write"]
7232    pub write_memory_base: NearGas,
7233    #[doc = "Cost for guest memory write per byte"]
7234    pub write_memory_byte: NearGas,
7235    #[doc = "Base cost for writing into register"]
7236    pub write_register_base: NearGas,
7237    #[doc = "Cost for writing byte into register"]
7238    pub write_register_byte: NearGas,
7239    #[doc = "Base cost for creating a yield promise."]
7240    pub yield_create_base: NearGas,
7241    #[doc = "Per byte cost of arguments and method name."]
7242    pub yield_create_byte: NearGas,
7243    #[doc = "Base cost for resuming a yield receipt."]
7244    pub yield_resume_base: NearGas,
7245    #[doc = "Per byte cost of resume payload."]
7246    pub yield_resume_byte: NearGas,
7247}
7248impl ::std::convert::From<&ExtCostsConfigView> for ExtCostsConfigView {
7249    fn from(value: &ExtCostsConfigView) -> Self {
7250        value.clone()
7251    }
7252}
7253#[doc = "`ExternalStorageConfig`"]
7254#[doc = r""]
7255#[doc = r" <details><summary>JSON schema</summary>"]
7256#[doc = r""]
7257#[doc = r" ```json"]
7258#[doc = "{"]
7259#[doc = "  \"type\": \"object\","]
7260#[doc = "  \"required\": ["]
7261#[doc = "    \"location\""]
7262#[doc = "  ],"]
7263#[doc = "  \"properties\": {"]
7264#[doc = "    \"external_storage_fallback_threshold\": {"]
7265#[doc = "      \"description\": \"The number of attempts the node will make to obtain a part from peers in\\nthe network before it fetches from external storage.\","]
7266#[doc = "      \"default\": 3,"]
7267#[doc = "      \"type\": \"integer\","]
7268#[doc = "      \"format\": \"uint64\","]
7269#[doc = "      \"minimum\": 0.0"]
7270#[doc = "    },"]
7271#[doc = "    \"location\": {"]
7272#[doc = "      \"description\": \"Location of state parts.\","]
7273#[doc = "      \"allOf\": ["]
7274#[doc = "        {"]
7275#[doc = "          \"$ref\": \"#/components/schemas/ExternalStorageLocation\""]
7276#[doc = "        }"]
7277#[doc = "      ]"]
7278#[doc = "    },"]
7279#[doc = "    \"num_concurrent_requests\": {"]
7280#[doc = "      \"description\": \"When fetching state parts from external storage, throttle fetch requests\\nto this many concurrent requests.\","]
7281#[doc = "      \"default\": 25,"]
7282#[doc = "      \"type\": \"integer\","]
7283#[doc = "      \"format\": \"uint8\","]
7284#[doc = "      \"maximum\": 255.0,"]
7285#[doc = "      \"minimum\": 0.0"]
7286#[doc = "    },"]
7287#[doc = "    \"num_concurrent_requests_during_catchup\": {"]
7288#[doc = "      \"description\": \"During catchup, the node will use a different number of concurrent requests\\nto reduce the performance impact of state sync.\","]
7289#[doc = "      \"default\": 5,"]
7290#[doc = "      \"type\": \"integer\","]
7291#[doc = "      \"format\": \"uint8\","]
7292#[doc = "      \"maximum\": 255.0,"]
7293#[doc = "      \"minimum\": 0.0"]
7294#[doc = "    }"]
7295#[doc = "  }"]
7296#[doc = "}"]
7297#[doc = r" ```"]
7298#[doc = r" </details>"]
7299#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
7300pub struct ExternalStorageConfig {
7301    #[doc = "The number of attempts the node will make to obtain a part from peers in\nthe network before it fetches from external storage."]
7302    #[serde(default = "defaults::default_u64::<u64, 3>")]
7303    pub external_storage_fallback_threshold: u64,
7304    #[doc = "Location of state parts."]
7305    pub location: ExternalStorageLocation,
7306    #[doc = "When fetching state parts from external storage, throttle fetch requests\nto this many concurrent requests."]
7307    #[serde(default = "defaults::default_u64::<u8, 25>")]
7308    pub num_concurrent_requests: u8,
7309    #[doc = "During catchup, the node will use a different number of concurrent requests\nto reduce the performance impact of state sync."]
7310    #[serde(default = "defaults::default_u64::<u8, 5>")]
7311    pub num_concurrent_requests_during_catchup: u8,
7312}
7313impl ::std::convert::From<&ExternalStorageConfig> for ExternalStorageConfig {
7314    fn from(value: &ExternalStorageConfig) -> Self {
7315        value.clone()
7316    }
7317}
7318#[doc = "`ExternalStorageLocation`"]
7319#[doc = r""]
7320#[doc = r" <details><summary>JSON schema</summary>"]
7321#[doc = r""]
7322#[doc = r" ```json"]
7323#[doc = "{"]
7324#[doc = "  \"oneOf\": ["]
7325#[doc = "    {"]
7326#[doc = "      \"type\": \"object\","]
7327#[doc = "      \"required\": ["]
7328#[doc = "        \"S3\""]
7329#[doc = "      ],"]
7330#[doc = "      \"properties\": {"]
7331#[doc = "        \"S3\": {"]
7332#[doc = "          \"type\": \"object\","]
7333#[doc = "          \"required\": ["]
7334#[doc = "            \"bucket\","]
7335#[doc = "            \"region\""]
7336#[doc = "          ],"]
7337#[doc = "          \"properties\": {"]
7338#[doc = "            \"bucket\": {"]
7339#[doc = "              \"description\": \"Location of state dumps on S3.\","]
7340#[doc = "              \"type\": \"string\""]
7341#[doc = "            },"]
7342#[doc = "            \"region\": {"]
7343#[doc = "              \"description\": \"Data may only be available in certain locations.\","]
7344#[doc = "              \"type\": \"string\""]
7345#[doc = "            }"]
7346#[doc = "          }"]
7347#[doc = "        }"]
7348#[doc = "      },"]
7349#[doc = "      \"additionalProperties\": false"]
7350#[doc = "    },"]
7351#[doc = "    {"]
7352#[doc = "      \"type\": \"object\","]
7353#[doc = "      \"required\": ["]
7354#[doc = "        \"Filesystem\""]
7355#[doc = "      ],"]
7356#[doc = "      \"properties\": {"]
7357#[doc = "        \"Filesystem\": {"]
7358#[doc = "          \"type\": \"object\","]
7359#[doc = "          \"required\": ["]
7360#[doc = "            \"root_dir\""]
7361#[doc = "          ],"]
7362#[doc = "          \"properties\": {"]
7363#[doc = "            \"root_dir\": {"]
7364#[doc = "              \"type\": \"string\""]
7365#[doc = "            }"]
7366#[doc = "          }"]
7367#[doc = "        }"]
7368#[doc = "      },"]
7369#[doc = "      \"additionalProperties\": false"]
7370#[doc = "    },"]
7371#[doc = "    {"]
7372#[doc = "      \"type\": \"object\","]
7373#[doc = "      \"required\": ["]
7374#[doc = "        \"GCS\""]
7375#[doc = "      ],"]
7376#[doc = "      \"properties\": {"]
7377#[doc = "        \"GCS\": {"]
7378#[doc = "          \"type\": \"object\","]
7379#[doc = "          \"required\": ["]
7380#[doc = "            \"bucket\""]
7381#[doc = "          ],"]
7382#[doc = "          \"properties\": {"]
7383#[doc = "            \"bucket\": {"]
7384#[doc = "              \"type\": \"string\""]
7385#[doc = "            }"]
7386#[doc = "          }"]
7387#[doc = "        }"]
7388#[doc = "      },"]
7389#[doc = "      \"additionalProperties\": false"]
7390#[doc = "    }"]
7391#[doc = "  ]"]
7392#[doc = "}"]
7393#[doc = r" ```"]
7394#[doc = r" </details>"]
7395#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
7396pub enum ExternalStorageLocation {
7397    S3 {
7398        #[doc = "Location of state dumps on S3."]
7399        bucket: ::std::string::String,
7400        #[doc = "Data may only be available in certain locations."]
7401        region: ::std::string::String,
7402    },
7403    Filesystem {
7404        root_dir: ::std::string::String,
7405    },
7406    #[serde(rename = "GCS")]
7407    Gcs {
7408        bucket: ::std::string::String,
7409    },
7410}
7411impl ::std::convert::From<&Self> for ExternalStorageLocation {
7412    fn from(value: &ExternalStorageLocation) -> Self {
7413        value.clone()
7414    }
7415}
7416#[doc = "Costs associated with an object that can only be sent over the network (and executed\nby the receiver).\nNOTE: `send_sir` or `send_not_sir` fees are usually burned when the item is being created.\nAnd `execution` fee is burned when the item is being executed."]
7417#[doc = r""]
7418#[doc = r" <details><summary>JSON schema</summary>"]
7419#[doc = r""]
7420#[doc = r" ```json"]
7421#[doc = "{"]
7422#[doc = "  \"description\": \"Costs associated with an object that can only be sent over the network (and executed\\nby the receiver).\\nNOTE: `send_sir` or `send_not_sir` fees are usually burned when the item is being created.\\nAnd `execution` fee is burned when the item is being executed.\","]
7423#[doc = "  \"type\": \"object\","]
7424#[doc = "  \"required\": ["]
7425#[doc = "    \"execution\","]
7426#[doc = "    \"send_not_sir\","]
7427#[doc = "    \"send_sir\""]
7428#[doc = "  ],"]
7429#[doc = "  \"properties\": {"]
7430#[doc = "    \"execution\": {"]
7431#[doc = "      \"description\": \"Fee for executing the object.\","]
7432#[doc = "      \"allOf\": ["]
7433#[doc = "        {"]
7434#[doc = "          \"$ref\": \"#/components/schemas/NearGas\""]
7435#[doc = "        }"]
7436#[doc = "      ]"]
7437#[doc = "    },"]
7438#[doc = "    \"send_not_sir\": {"]
7439#[doc = "      \"description\": \"Fee for sending an object potentially across the shards.\","]
7440#[doc = "      \"allOf\": ["]
7441#[doc = "        {"]
7442#[doc = "          \"$ref\": \"#/components/schemas/NearGas\""]
7443#[doc = "        }"]
7444#[doc = "      ]"]
7445#[doc = "    },"]
7446#[doc = "    \"send_sir\": {"]
7447#[doc = "      \"description\": \"Fee for sending an object from the sender to itself, guaranteeing that it does not leave\\nthe shard.\","]
7448#[doc = "      \"allOf\": ["]
7449#[doc = "        {"]
7450#[doc = "          \"$ref\": \"#/components/schemas/NearGas\""]
7451#[doc = "        }"]
7452#[doc = "      ]"]
7453#[doc = "    }"]
7454#[doc = "  }"]
7455#[doc = "}"]
7456#[doc = r" ```"]
7457#[doc = r" </details>"]
7458#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
7459pub struct Fee {
7460    #[doc = "Fee for executing the object."]
7461    pub execution: NearGas,
7462    #[doc = "Fee for sending an object potentially across the shards."]
7463    pub send_not_sir: NearGas,
7464    #[doc = "Fee for sending an object from the sender to itself, guaranteeing that it does not leave\nthe shard."]
7465    pub send_sir: NearGas,
7466}
7467impl ::std::convert::From<&Fee> for Fee {
7468    fn from(value: &Fee) -> Self {
7469        value.clone()
7470    }
7471}
7472#[doc = "Execution outcome of the transaction and all the subsequent receipts.\nCould be not finalized yet"]
7473#[doc = r""]
7474#[doc = r" <details><summary>JSON schema</summary>"]
7475#[doc = r""]
7476#[doc = r" ```json"]
7477#[doc = "{"]
7478#[doc = "  \"description\": \"Execution outcome of the transaction and all the subsequent receipts.\\nCould be not finalized yet\","]
7479#[doc = "  \"type\": \"object\","]
7480#[doc = "  \"required\": ["]
7481#[doc = "    \"receipts_outcome\","]
7482#[doc = "    \"status\","]
7483#[doc = "    \"transaction\","]
7484#[doc = "    \"transaction_outcome\""]
7485#[doc = "  ],"]
7486#[doc = "  \"properties\": {"]
7487#[doc = "    \"receipts_outcome\": {"]
7488#[doc = "      \"description\": \"The execution outcome of receipts.\","]
7489#[doc = "      \"type\": \"array\","]
7490#[doc = "      \"items\": {"]
7491#[doc = "        \"$ref\": \"#/components/schemas/ExecutionOutcomeWithIdView\""]
7492#[doc = "      }"]
7493#[doc = "    },"]
7494#[doc = "    \"status\": {"]
7495#[doc = "      \"description\": \"Execution status defined by chain.rs:get_final_transaction_result\\nFinalExecutionStatus::NotStarted - the tx is not converted to the receipt yet\\nFinalExecutionStatus::Started - we have at least 1 receipt, but the first leaf receipt_id (using dfs) hasn't finished the execution\\nFinalExecutionStatus::Failure - the result of the first leaf receipt_id\\nFinalExecutionStatus::SuccessValue - the result of the first leaf receipt_id\","]
7496#[doc = "      \"allOf\": ["]
7497#[doc = "        {"]
7498#[doc = "          \"$ref\": \"#/components/schemas/FinalExecutionStatus\""]
7499#[doc = "        }"]
7500#[doc = "      ]"]
7501#[doc = "    },"]
7502#[doc = "    \"transaction\": {"]
7503#[doc = "      \"description\": \"Signed Transaction\","]
7504#[doc = "      \"allOf\": ["]
7505#[doc = "        {"]
7506#[doc = "          \"$ref\": \"#/components/schemas/SignedTransactionView\""]
7507#[doc = "        }"]
7508#[doc = "      ]"]
7509#[doc = "    },"]
7510#[doc = "    \"transaction_outcome\": {"]
7511#[doc = "      \"description\": \"The execution outcome of the signed transaction.\","]
7512#[doc = "      \"allOf\": ["]
7513#[doc = "        {"]
7514#[doc = "          \"$ref\": \"#/components/schemas/ExecutionOutcomeWithIdView\""]
7515#[doc = "        }"]
7516#[doc = "      ]"]
7517#[doc = "    }"]
7518#[doc = "  }"]
7519#[doc = "}"]
7520#[doc = r" ```"]
7521#[doc = r" </details>"]
7522#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
7523pub struct FinalExecutionOutcomeView {
7524    #[doc = "The execution outcome of receipts."]
7525    pub receipts_outcome: ::std::vec::Vec<ExecutionOutcomeWithIdView>,
7526    #[doc = "Execution status defined by chain.rs:get_final_transaction_result\nFinalExecutionStatus::NotStarted - the tx is not converted to the receipt yet\nFinalExecutionStatus::Started - we have at least 1 receipt, but the first leaf receipt_id (using dfs) hasn't finished the execution\nFinalExecutionStatus::Failure - the result of the first leaf receipt_id\nFinalExecutionStatus::SuccessValue - the result of the first leaf receipt_id"]
7527    pub status: FinalExecutionStatus,
7528    #[doc = "Signed Transaction"]
7529    pub transaction: SignedTransactionView,
7530    #[doc = "The execution outcome of the signed transaction."]
7531    pub transaction_outcome: ExecutionOutcomeWithIdView,
7532}
7533impl ::std::convert::From<&FinalExecutionOutcomeView> for FinalExecutionOutcomeView {
7534    fn from(value: &FinalExecutionOutcomeView) -> Self {
7535        value.clone()
7536    }
7537}
7538#[doc = "Final execution outcome of the transaction and all of subsequent the receipts. Also includes\nthe generated receipt."]
7539#[doc = r""]
7540#[doc = r" <details><summary>JSON schema</summary>"]
7541#[doc = r""]
7542#[doc = r" ```json"]
7543#[doc = "{"]
7544#[doc = "  \"description\": \"Final execution outcome of the transaction and all of subsequent the receipts. Also includes\\nthe generated receipt.\","]
7545#[doc = "  \"type\": \"object\","]
7546#[doc = "  \"required\": ["]
7547#[doc = "    \"receipts\","]
7548#[doc = "    \"receipts_outcome\","]
7549#[doc = "    \"status\","]
7550#[doc = "    \"transaction\","]
7551#[doc = "    \"transaction_outcome\""]
7552#[doc = "  ],"]
7553#[doc = "  \"properties\": {"]
7554#[doc = "    \"receipts\": {"]
7555#[doc = "      \"description\": \"Receipts generated from the transaction\","]
7556#[doc = "      \"type\": \"array\","]
7557#[doc = "      \"items\": {"]
7558#[doc = "        \"$ref\": \"#/components/schemas/ReceiptView\""]
7559#[doc = "      }"]
7560#[doc = "    },"]
7561#[doc = "    \"receipts_outcome\": {"]
7562#[doc = "      \"description\": \"The execution outcome of receipts.\","]
7563#[doc = "      \"type\": \"array\","]
7564#[doc = "      \"items\": {"]
7565#[doc = "        \"$ref\": \"#/components/schemas/ExecutionOutcomeWithIdView\""]
7566#[doc = "      }"]
7567#[doc = "    },"]
7568#[doc = "    \"status\": {"]
7569#[doc = "      \"description\": \"Execution status defined by chain.rs:get_final_transaction_result\\nFinalExecutionStatus::NotStarted - the tx is not converted to the receipt yet\\nFinalExecutionStatus::Started - we have at least 1 receipt, but the first leaf receipt_id (using dfs) hasn't finished the execution\\nFinalExecutionStatus::Failure - the result of the first leaf receipt_id\\nFinalExecutionStatus::SuccessValue - the result of the first leaf receipt_id\","]
7570#[doc = "      \"allOf\": ["]
7571#[doc = "        {"]
7572#[doc = "          \"$ref\": \"#/components/schemas/FinalExecutionStatus\""]
7573#[doc = "        }"]
7574#[doc = "      ]"]
7575#[doc = "    },"]
7576#[doc = "    \"transaction\": {"]
7577#[doc = "      \"description\": \"Signed Transaction\","]
7578#[doc = "      \"allOf\": ["]
7579#[doc = "        {"]
7580#[doc = "          \"$ref\": \"#/components/schemas/SignedTransactionView\""]
7581#[doc = "        }"]
7582#[doc = "      ]"]
7583#[doc = "    },"]
7584#[doc = "    \"transaction_outcome\": {"]
7585#[doc = "      \"description\": \"The execution outcome of the signed transaction.\","]
7586#[doc = "      \"allOf\": ["]
7587#[doc = "        {"]
7588#[doc = "          \"$ref\": \"#/components/schemas/ExecutionOutcomeWithIdView\""]
7589#[doc = "        }"]
7590#[doc = "      ]"]
7591#[doc = "    }"]
7592#[doc = "  }"]
7593#[doc = "}"]
7594#[doc = r" ```"]
7595#[doc = r" </details>"]
7596#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
7597pub struct FinalExecutionOutcomeWithReceiptView {
7598    #[doc = "Receipts generated from the transaction"]
7599    pub receipts: ::std::vec::Vec<ReceiptView>,
7600    #[doc = "The execution outcome of receipts."]
7601    pub receipts_outcome: ::std::vec::Vec<ExecutionOutcomeWithIdView>,
7602    #[doc = "Execution status defined by chain.rs:get_final_transaction_result\nFinalExecutionStatus::NotStarted - the tx is not converted to the receipt yet\nFinalExecutionStatus::Started - we have at least 1 receipt, but the first leaf receipt_id (using dfs) hasn't finished the execution\nFinalExecutionStatus::Failure - the result of the first leaf receipt_id\nFinalExecutionStatus::SuccessValue - the result of the first leaf receipt_id"]
7603    pub status: FinalExecutionStatus,
7604    #[doc = "Signed Transaction"]
7605    pub transaction: SignedTransactionView,
7606    #[doc = "The execution outcome of the signed transaction."]
7607    pub transaction_outcome: ExecutionOutcomeWithIdView,
7608}
7609impl ::std::convert::From<&FinalExecutionOutcomeWithReceiptView>
7610    for FinalExecutionOutcomeWithReceiptView
7611{
7612    fn from(value: &FinalExecutionOutcomeWithReceiptView) -> Self {
7613        value.clone()
7614    }
7615}
7616#[doc = "`FinalExecutionStatus`"]
7617#[doc = r""]
7618#[doc = r" <details><summary>JSON schema</summary>"]
7619#[doc = r""]
7620#[doc = r" ```json"]
7621#[doc = "{"]
7622#[doc = "  \"oneOf\": ["]
7623#[doc = "    {"]
7624#[doc = "      \"description\": \"The execution has not yet started.\","]
7625#[doc = "      \"type\": \"string\","]
7626#[doc = "      \"enum\": ["]
7627#[doc = "        \"NotStarted\""]
7628#[doc = "      ]"]
7629#[doc = "    },"]
7630#[doc = "    {"]
7631#[doc = "      \"description\": \"The execution has started and still going.\","]
7632#[doc = "      \"type\": \"string\","]
7633#[doc = "      \"enum\": ["]
7634#[doc = "        \"Started\""]
7635#[doc = "      ]"]
7636#[doc = "    },"]
7637#[doc = "    {"]
7638#[doc = "      \"description\": \"The execution has failed with the given error.\","]
7639#[doc = "      \"type\": \"object\","]
7640#[doc = "      \"required\": ["]
7641#[doc = "        \"Failure\""]
7642#[doc = "      ],"]
7643#[doc = "      \"properties\": {"]
7644#[doc = "        \"Failure\": {"]
7645#[doc = "          \"$ref\": \"#/components/schemas/TxExecutionError\""]
7646#[doc = "        }"]
7647#[doc = "      },"]
7648#[doc = "      \"additionalProperties\": false"]
7649#[doc = "    },"]
7650#[doc = "    {"]
7651#[doc = "      \"description\": \"The execution has succeeded and returned some value or an empty vec encoded in base64.\","]
7652#[doc = "      \"type\": \"object\","]
7653#[doc = "      \"required\": ["]
7654#[doc = "        \"SuccessValue\""]
7655#[doc = "      ],"]
7656#[doc = "      \"properties\": {"]
7657#[doc = "        \"SuccessValue\": {"]
7658#[doc = "          \"type\": \"string\""]
7659#[doc = "        }"]
7660#[doc = "      },"]
7661#[doc = "      \"additionalProperties\": false"]
7662#[doc = "    }"]
7663#[doc = "  ]"]
7664#[doc = "}"]
7665#[doc = r" ```"]
7666#[doc = r" </details>"]
7667#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
7668pub enum FinalExecutionStatus {
7669    #[doc = "The execution has not yet started."]
7670    NotStarted,
7671    #[doc = "The execution has started and still going."]
7672    Started,
7673    #[doc = "The execution has failed with the given error."]
7674    Failure(TxExecutionError),
7675    #[doc = "The execution has succeeded and returned some value or an empty vec encoded in base64."]
7676    SuccessValue(::std::string::String),
7677}
7678impl ::std::convert::From<&Self> for FinalExecutionStatus {
7679    fn from(value: &FinalExecutionStatus) -> Self {
7680        value.clone()
7681    }
7682}
7683impl ::std::convert::From<TxExecutionError> for FinalExecutionStatus {
7684    fn from(value: TxExecutionError) -> Self {
7685        Self::Failure(value)
7686    }
7687}
7688#[doc = "Different types of finality."]
7689#[doc = r""]
7690#[doc = r" <details><summary>JSON schema</summary>"]
7691#[doc = r""]
7692#[doc = r" ```json"]
7693#[doc = "{"]
7694#[doc = "  \"description\": \"Different types of finality.\","]
7695#[doc = "  \"type\": \"string\","]
7696#[doc = "  \"enum\": ["]
7697#[doc = "    \"optimistic\","]
7698#[doc = "    \"near-final\","]
7699#[doc = "    \"final\""]
7700#[doc = "  ]"]
7701#[doc = "}"]
7702#[doc = r" ```"]
7703#[doc = r" </details>"]
7704#[derive(
7705    :: serde :: Deserialize,
7706    :: serde :: Serialize,
7707    Clone,
7708    Copy,
7709    Debug,
7710    Eq,
7711    Hash,
7712    Ord,
7713    PartialEq,
7714    PartialOrd,
7715)]
7716pub enum Finality {
7717    #[serde(rename = "optimistic")]
7718    Optimistic,
7719    #[serde(rename = "near-final")]
7720    NearFinal,
7721    #[serde(rename = "final")]
7722    Final,
7723}
7724impl ::std::convert::From<&Self> for Finality {
7725    fn from(value: &Finality) -> Self {
7726        value.clone()
7727    }
7728}
7729impl ::std::fmt::Display for Finality {
7730    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
7731        match *self {
7732            Self::Optimistic => f.write_str("optimistic"),
7733            Self::NearFinal => f.write_str("near-final"),
7734            Self::Final => f.write_str("final"),
7735        }
7736    }
7737}
7738impl ::std::str::FromStr for Finality {
7739    type Err = self::error::ConversionError;
7740    fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
7741        match value {
7742            "optimistic" => Ok(Self::Optimistic),
7743            "near-final" => Ok(Self::NearFinal),
7744            "final" => Ok(Self::Final),
7745            _ => Err("invalid value".into()),
7746        }
7747    }
7748}
7749impl ::std::convert::TryFrom<&str> for Finality {
7750    type Error = self::error::ConversionError;
7751    fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
7752        value.parse()
7753    }
7754}
7755impl ::std::convert::TryFrom<&::std::string::String> for Finality {
7756    type Error = self::error::ConversionError;
7757    fn try_from(
7758        value: &::std::string::String,
7759    ) -> ::std::result::Result<Self, self::error::ConversionError> {
7760        value.parse()
7761    }
7762}
7763impl ::std::convert::TryFrom<::std::string::String> for Finality {
7764    type Error = self::error::ConversionError;
7765    fn try_from(
7766        value: ::std::string::String,
7767    ) -> ::std::result::Result<Self, self::error::ConversionError> {
7768        value.parse()
7769    }
7770}
7771#[doc = "This type is used to mark function arguments.\n\nNOTE: The main reason for this to exist (except the type-safety) is that the value is\ntransparently serialized and deserialized as a base64-encoded string when serde is used\n(serde_json)."]
7772#[doc = r""]
7773#[doc = r" <details><summary>JSON schema</summary>"]
7774#[doc = r""]
7775#[doc = r" ```json"]
7776#[doc = "{"]
7777#[doc = "  \"description\": \"This type is used to mark function arguments.\\n\\nNOTE: The main reason for this to exist (except the type-safety) is that the value is\\ntransparently serialized and deserialized as a base64-encoded string when serde is used\\n(serde_json).\","]
7778#[doc = "  \"type\": \"string\","]
7779#[doc = "  \"format\": \"bytes\""]
7780#[doc = "}"]
7781#[doc = r" ```"]
7782#[doc = r" </details>"]
7783#[derive(
7784    :: serde :: Deserialize,
7785    :: serde :: Serialize,
7786    Clone,
7787    Debug,
7788    Eq,
7789    Hash,
7790    Ord,
7791    PartialEq,
7792    PartialOrd,
7793)]
7794#[serde(transparent)]
7795pub struct FunctionArgs(pub ::std::string::String);
7796impl ::std::ops::Deref for FunctionArgs {
7797    type Target = ::std::string::String;
7798    fn deref(&self) -> &::std::string::String {
7799        &self.0
7800    }
7801}
7802impl ::std::convert::From<FunctionArgs> for ::std::string::String {
7803    fn from(value: FunctionArgs) -> Self {
7804        value.0
7805    }
7806}
7807impl ::std::convert::From<&FunctionArgs> for FunctionArgs {
7808    fn from(value: &FunctionArgs) -> Self {
7809        value.clone()
7810    }
7811}
7812impl ::std::convert::From<::std::string::String> for FunctionArgs {
7813    fn from(value: ::std::string::String) -> Self {
7814        Self(value)
7815    }
7816}
7817impl ::std::str::FromStr for FunctionArgs {
7818    type Err = ::std::convert::Infallible;
7819    fn from_str(value: &str) -> ::std::result::Result<Self, Self::Err> {
7820        Ok(Self(value.to_string()))
7821    }
7822}
7823impl ::std::fmt::Display for FunctionArgs {
7824    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
7825        self.0.fmt(f)
7826    }
7827}
7828#[doc = "`FunctionCallAction`"]
7829#[doc = r""]
7830#[doc = r" <details><summary>JSON schema</summary>"]
7831#[doc = r""]
7832#[doc = r" ```json"]
7833#[doc = "{"]
7834#[doc = "  \"type\": \"object\","]
7835#[doc = "  \"required\": ["]
7836#[doc = "    \"args\","]
7837#[doc = "    \"deposit\","]
7838#[doc = "    \"gas\","]
7839#[doc = "    \"method_name\""]
7840#[doc = "  ],"]
7841#[doc = "  \"properties\": {"]
7842#[doc = "    \"args\": {"]
7843#[doc = "      \"type\": \"string\""]
7844#[doc = "    },"]
7845#[doc = "    \"deposit\": {"]
7846#[doc = "      \"$ref\": \"#/components/schemas/NearToken\""]
7847#[doc = "    },"]
7848#[doc = "    \"gas\": {"]
7849#[doc = "      \"$ref\": \"#/components/schemas/NearGas\""]
7850#[doc = "    },"]
7851#[doc = "    \"method_name\": {"]
7852#[doc = "      \"type\": \"string\""]
7853#[doc = "    }"]
7854#[doc = "  }"]
7855#[doc = "}"]
7856#[doc = r" ```"]
7857#[doc = r" </details>"]
7858#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
7859pub struct FunctionCallAction {
7860    pub args: ::std::string::String,
7861    pub deposit: NearToken,
7862    pub gas: NearGas,
7863    pub method_name: ::std::string::String,
7864}
7865impl ::std::convert::From<&FunctionCallAction> for FunctionCallAction {
7866    fn from(value: &FunctionCallAction) -> Self {
7867        value.clone()
7868    }
7869}
7870#[doc = "Serializable version of `near-vm-runner::FunctionCallError`.\n\nMust never reorder/remove elements, can only add new variants at the end (but do that very\ncarefully). It describes stable serialization format, and only used by serialization logic."]
7871#[doc = r""]
7872#[doc = r" <details><summary>JSON schema</summary>"]
7873#[doc = r""]
7874#[doc = r" ```json"]
7875#[doc = "{"]
7876#[doc = "  \"description\": \"Serializable version of `near-vm-runner::FunctionCallError`.\\n\\nMust never reorder/remove elements, can only add new variants at the end (but do that very\\ncarefully). It describes stable serialization format, and only used by serialization logic.\","]
7877#[doc = "  \"oneOf\": ["]
7878#[doc = "    {"]
7879#[doc = "      \"type\": \"string\","]
7880#[doc = "      \"enum\": ["]
7881#[doc = "        \"WasmUnknownError\","]
7882#[doc = "        \"_EVMError\""]
7883#[doc = "      ]"]
7884#[doc = "    },"]
7885#[doc = "    {"]
7886#[doc = "      \"description\": \"Wasm compilation error\","]
7887#[doc = "      \"type\": \"object\","]
7888#[doc = "      \"required\": ["]
7889#[doc = "        \"CompilationError\""]
7890#[doc = "      ],"]
7891#[doc = "      \"properties\": {"]
7892#[doc = "        \"CompilationError\": {"]
7893#[doc = "          \"$ref\": \"#/components/schemas/CompilationError\""]
7894#[doc = "        }"]
7895#[doc = "      },"]
7896#[doc = "      \"additionalProperties\": false"]
7897#[doc = "    },"]
7898#[doc = "    {"]
7899#[doc = "      \"description\": \"Wasm binary env link error\\n\\nNote: this is only to deserialize old data, use execution error for new data\","]
7900#[doc = "      \"type\": \"object\","]
7901#[doc = "      \"required\": ["]
7902#[doc = "        \"LinkError\""]
7903#[doc = "      ],"]
7904#[doc = "      \"properties\": {"]
7905#[doc = "        \"LinkError\": {"]
7906#[doc = "          \"type\": \"object\","]
7907#[doc = "          \"required\": ["]
7908#[doc = "            \"msg\""]
7909#[doc = "          ],"]
7910#[doc = "          \"properties\": {"]
7911#[doc = "            \"msg\": {"]
7912#[doc = "              \"type\": \"string\""]
7913#[doc = "            }"]
7914#[doc = "          }"]
7915#[doc = "        }"]
7916#[doc = "      },"]
7917#[doc = "      \"additionalProperties\": false"]
7918#[doc = "    },"]
7919#[doc = "    {"]
7920#[doc = "      \"description\": \"Import/export resolve error\","]
7921#[doc = "      \"type\": \"object\","]
7922#[doc = "      \"required\": ["]
7923#[doc = "        \"MethodResolveError\""]
7924#[doc = "      ],"]
7925#[doc = "      \"properties\": {"]
7926#[doc = "        \"MethodResolveError\": {"]
7927#[doc = "          \"$ref\": \"#/components/schemas/MethodResolveError\""]
7928#[doc = "        }"]
7929#[doc = "      },"]
7930#[doc = "      \"additionalProperties\": false"]
7931#[doc = "    },"]
7932#[doc = "    {"]
7933#[doc = "      \"description\": \"A trap happened during execution of a binary\\n\\nNote: this is only to deserialize old data, use execution error for new data\","]
7934#[doc = "      \"type\": \"object\","]
7935#[doc = "      \"required\": ["]
7936#[doc = "        \"WasmTrap\""]
7937#[doc = "      ],"]
7938#[doc = "      \"properties\": {"]
7939#[doc = "        \"WasmTrap\": {"]
7940#[doc = "          \"$ref\": \"#/components/schemas/WasmTrap\""]
7941#[doc = "        }"]
7942#[doc = "      },"]
7943#[doc = "      \"additionalProperties\": false"]
7944#[doc = "    },"]
7945#[doc = "    {"]
7946#[doc = "      \"description\": \"Note: this is only to deserialize old data, use execution error for new data\","]
7947#[doc = "      \"type\": \"object\","]
7948#[doc = "      \"required\": ["]
7949#[doc = "        \"HostError\""]
7950#[doc = "      ],"]
7951#[doc = "      \"properties\": {"]
7952#[doc = "        \"HostError\": {"]
7953#[doc = "          \"$ref\": \"#/components/schemas/HostError\""]
7954#[doc = "        }"]
7955#[doc = "      },"]
7956#[doc = "      \"additionalProperties\": false"]
7957#[doc = "    },"]
7958#[doc = "    {"]
7959#[doc = "      \"type\": \"object\","]
7960#[doc = "      \"required\": ["]
7961#[doc = "        \"ExecutionError\""]
7962#[doc = "      ],"]
7963#[doc = "      \"properties\": {"]
7964#[doc = "        \"ExecutionError\": {"]
7965#[doc = "          \"type\": \"string\""]
7966#[doc = "        }"]
7967#[doc = "      },"]
7968#[doc = "      \"additionalProperties\": false"]
7969#[doc = "    }"]
7970#[doc = "  ]"]
7971#[doc = "}"]
7972#[doc = r" ```"]
7973#[doc = r" </details>"]
7974#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
7975pub enum FunctionCallError {
7976    WasmUnknownError,
7977    #[serde(rename = "_EVMError")]
7978    EvmError,
7979    #[doc = "Wasm compilation error"]
7980    CompilationError(CompilationError),
7981    #[doc = "Wasm binary env link error\n\nNote: this is only to deserialize old data, use execution error for new data"]
7982    LinkError {
7983        msg: ::std::string::String,
7984    },
7985    #[doc = "Import/export resolve error"]
7986    MethodResolveError(MethodResolveError),
7987    #[doc = "A trap happened during execution of a binary\n\nNote: this is only to deserialize old data, use execution error for new data"]
7988    WasmTrap(WasmTrap),
7989    #[doc = "Note: this is only to deserialize old data, use execution error for new data"]
7990    HostError(HostError),
7991    ExecutionError(::std::string::String),
7992}
7993impl ::std::convert::From<&Self> for FunctionCallError {
7994    fn from(value: &FunctionCallError) -> Self {
7995        value.clone()
7996    }
7997}
7998impl ::std::convert::From<CompilationError> for FunctionCallError {
7999    fn from(value: CompilationError) -> Self {
8000        Self::CompilationError(value)
8001    }
8002}
8003impl ::std::convert::From<MethodResolveError> for FunctionCallError {
8004    fn from(value: MethodResolveError) -> Self {
8005        Self::MethodResolveError(value)
8006    }
8007}
8008impl ::std::convert::From<WasmTrap> for FunctionCallError {
8009    fn from(value: WasmTrap) -> Self {
8010        Self::WasmTrap(value)
8011    }
8012}
8013impl ::std::convert::From<HostError> for FunctionCallError {
8014    fn from(value: HostError) -> Self {
8015        Self::HostError(value)
8016    }
8017}
8018#[doc = "Grants limited permission to make transactions with FunctionCallActions\nThe permission can limit the allowed balance to be spent on the prepaid gas.\nIt also restrict the account ID of the receiver for this function call.\nIt also can restrict the method name for the allowed function calls."]
8019#[doc = r""]
8020#[doc = r" <details><summary>JSON schema</summary>"]
8021#[doc = r""]
8022#[doc = r" ```json"]
8023#[doc = "{"]
8024#[doc = "  \"description\": \"Grants limited permission to make transactions with FunctionCallActions\\nThe permission can limit the allowed balance to be spent on the prepaid gas.\\nIt also restrict the account ID of the receiver for this function call.\\nIt also can restrict the method name for the allowed function calls.\","]
8025#[doc = "  \"type\": \"object\","]
8026#[doc = "  \"required\": ["]
8027#[doc = "    \"method_names\","]
8028#[doc = "    \"receiver_id\""]
8029#[doc = "  ],"]
8030#[doc = "  \"properties\": {"]
8031#[doc = "    \"allowance\": {"]
8032#[doc = "      \"description\": \"Allowance is a balance limit to use by this access key to pay for function call gas and\\ntransaction fees. When this access key is used, both account balance and the allowance is\\ndecreased by the same value.\\n`None` means unlimited allowance.\\nNOTE: To change or increase the allowance, the old access key needs to be deleted and a new\\naccess key should be created.\","]
8033#[doc = "      \"anyOf\": ["]
8034#[doc = "        {"]
8035#[doc = "          \"$ref\": \"#/components/schemas/NearToken\""]
8036#[doc = "        },"]
8037#[doc = "        {"]
8038#[doc = "          \"type\": \"null\""]
8039#[doc = "        }"]
8040#[doc = "      ]"]
8041#[doc = "    },"]
8042#[doc = "    \"method_names\": {"]
8043#[doc = "      \"description\": \"A list of method names that can be used. The access key only allows transactions with the\\nfunction call of one of the given method names.\\nEmpty list means any method name can be used.\","]
8044#[doc = "      \"type\": \"array\","]
8045#[doc = "      \"items\": {"]
8046#[doc = "        \"type\": \"string\""]
8047#[doc = "      }"]
8048#[doc = "    },"]
8049#[doc = "    \"receiver_id\": {"]
8050#[doc = "      \"description\": \"The access key only allows transactions with the given receiver's account id.\","]
8051#[doc = "      \"type\": \"string\""]
8052#[doc = "    }"]
8053#[doc = "  }"]
8054#[doc = "}"]
8055#[doc = r" ```"]
8056#[doc = r" </details>"]
8057#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
8058pub struct FunctionCallPermission {
8059    #[doc = "Allowance is a balance limit to use by this access key to pay for function call gas and\ntransaction fees. When this access key is used, both account balance and the allowance is\ndecreased by the same value.\n`None` means unlimited allowance.\nNOTE: To change or increase the allowance, the old access key needs to be deleted and a new\naccess key should be created."]
8060    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
8061    pub allowance: ::std::option::Option<NearToken>,
8062    #[doc = "A list of method names that can be used. The access key only allows transactions with the\nfunction call of one of the given method names.\nEmpty list means any method name can be used."]
8063    pub method_names: ::std::vec::Vec<::std::string::String>,
8064    #[doc = "The access key only allows transactions with the given receiver's account id."]
8065    pub receiver_id: ::std::string::String,
8066}
8067impl ::std::convert::From<&FunctionCallPermission> for FunctionCallPermission {
8068    fn from(value: &FunctionCallPermission) -> Self {
8069        value.clone()
8070    }
8071}
8072#[doc = "`GasKeyView`"]
8073#[doc = r""]
8074#[doc = r" <details><summary>JSON schema</summary>"]
8075#[doc = r""]
8076#[doc = r" ```json"]
8077#[doc = "{"]
8078#[doc = "  \"type\": \"object\","]
8079#[doc = "  \"required\": ["]
8080#[doc = "    \"balance\","]
8081#[doc = "    \"num_nonces\","]
8082#[doc = "    \"permission\""]
8083#[doc = "  ],"]
8084#[doc = "  \"properties\": {"]
8085#[doc = "    \"balance\": {"]
8086#[doc = "      \"$ref\": \"#/components/schemas/NearToken\""]
8087#[doc = "    },"]
8088#[doc = "    \"num_nonces\": {"]
8089#[doc = "      \"type\": \"integer\","]
8090#[doc = "      \"format\": \"uint32\","]
8091#[doc = "      \"minimum\": 0.0"]
8092#[doc = "    },"]
8093#[doc = "    \"permission\": {"]
8094#[doc = "      \"$ref\": \"#/components/schemas/AccessKeyPermissionView\""]
8095#[doc = "    }"]
8096#[doc = "  }"]
8097#[doc = "}"]
8098#[doc = r" ```"]
8099#[doc = r" </details>"]
8100#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
8101pub struct GasKeyView {
8102    pub balance: NearToken,
8103    pub num_nonces: u32,
8104    pub permission: AccessKeyPermissionView,
8105}
8106impl ::std::convert::From<&GasKeyView> for GasKeyView {
8107    fn from(value: &GasKeyView) -> Self {
8108        value.clone()
8109    }
8110}
8111#[doc = "Configuration for garbage collection."]
8112#[doc = r""]
8113#[doc = r" <details><summary>JSON schema</summary>"]
8114#[doc = r""]
8115#[doc = r" ```json"]
8116#[doc = "{"]
8117#[doc = "  \"description\": \"Configuration for garbage collection.\","]
8118#[doc = "  \"type\": \"object\","]
8119#[doc = "  \"properties\": {"]
8120#[doc = "    \"gc_blocks_limit\": {"]
8121#[doc = "      \"description\": \"Maximum number of blocks to garbage collect at every garbage collection\\ncall.\","]
8122#[doc = "      \"default\": 2,"]
8123#[doc = "      \"type\": \"integer\","]
8124#[doc = "      \"format\": \"uint64\","]
8125#[doc = "      \"minimum\": 0.0"]
8126#[doc = "    },"]
8127#[doc = "    \"gc_fork_clean_step\": {"]
8128#[doc = "      \"description\": \"Maximum number of height to go through at each garbage collection step\\nwhen cleaning forks during garbage collection.\","]
8129#[doc = "      \"default\": 100,"]
8130#[doc = "      \"type\": \"integer\","]
8131#[doc = "      \"format\": \"uint64\","]
8132#[doc = "      \"minimum\": 0.0"]
8133#[doc = "    },"]
8134#[doc = "    \"gc_num_epochs_to_keep\": {"]
8135#[doc = "      \"description\": \"Number of epochs for which we keep store data.\","]
8136#[doc = "      \"default\": 5,"]
8137#[doc = "      \"type\": \"integer\","]
8138#[doc = "      \"format\": \"uint64\","]
8139#[doc = "      \"minimum\": 0.0"]
8140#[doc = "    },"]
8141#[doc = "    \"gc_step_period\": {"]
8142#[doc = "      \"description\": \"How often gc should be run\","]
8143#[doc = "      \"default\": {"]
8144#[doc = "        \"nanos\": 500000000,"]
8145#[doc = "        \"secs\": 0"]
8146#[doc = "      },"]
8147#[doc = "      \"allOf\": ["]
8148#[doc = "        {"]
8149#[doc = "          \"$ref\": \"#/components/schemas/DurationAsStdSchemaProvider\""]
8150#[doc = "        }"]
8151#[doc = "      ]"]
8152#[doc = "    }"]
8153#[doc = "  }"]
8154#[doc = "}"]
8155#[doc = r" ```"]
8156#[doc = r" </details>"]
8157#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
8158pub struct GcConfig {
8159    #[doc = "Maximum number of blocks to garbage collect at every garbage collection\ncall."]
8160    #[serde(default = "defaults::default_u64::<u64, 2>")]
8161    pub gc_blocks_limit: u64,
8162    #[doc = "Maximum number of height to go through at each garbage collection step\nwhen cleaning forks during garbage collection."]
8163    #[serde(default = "defaults::default_u64::<u64, 100>")]
8164    pub gc_fork_clean_step: u64,
8165    #[doc = "Number of epochs for which we keep store data."]
8166    #[serde(default = "defaults::default_u64::<u64, 5>")]
8167    pub gc_num_epochs_to_keep: u64,
8168    #[doc = "How often gc should be run"]
8169    #[serde(default = "defaults::gc_config_gc_step_period")]
8170    pub gc_step_period: DurationAsStdSchemaProvider,
8171}
8172impl ::std::convert::From<&GcConfig> for GcConfig {
8173    fn from(value: &GcConfig) -> Self {
8174        value.clone()
8175    }
8176}
8177impl ::std::default::Default for GcConfig {
8178    fn default() -> Self {
8179        Self {
8180            gc_blocks_limit: defaults::default_u64::<u64, 2>(),
8181            gc_fork_clean_step: defaults::default_u64::<u64, 100>(),
8182            gc_num_epochs_to_keep: defaults::default_u64::<u64, 5>(),
8183            gc_step_period: defaults::gc_config_gc_step_period(),
8184        }
8185    }
8186}
8187#[doc = "`GenesisConfig`"]
8188#[doc = r""]
8189#[doc = r" <details><summary>JSON schema</summary>"]
8190#[doc = r""]
8191#[doc = r" ```json"]
8192#[doc = "{"]
8193#[doc = "  \"type\": \"object\","]
8194#[doc = "  \"required\": ["]
8195#[doc = "    \"avg_hidden_validator_seats_per_shard\","]
8196#[doc = "    \"block_producer_kickout_threshold\","]
8197#[doc = "    \"chain_id\","]
8198#[doc = "    \"chunk_producer_kickout_threshold\","]
8199#[doc = "    \"dynamic_resharding\","]
8200#[doc = "    \"epoch_length\","]
8201#[doc = "    \"fishermen_threshold\","]
8202#[doc = "    \"gas_limit\","]
8203#[doc = "    \"gas_price_adjustment_rate\","]
8204#[doc = "    \"genesis_height\","]
8205#[doc = "    \"genesis_time\","]
8206#[doc = "    \"max_gas_price\","]
8207#[doc = "    \"max_inflation_rate\","]
8208#[doc = "    \"min_gas_price\","]
8209#[doc = "    \"num_block_producer_seats\","]
8210#[doc = "    \"num_block_producer_seats_per_shard\","]
8211#[doc = "    \"num_blocks_per_year\","]
8212#[doc = "    \"protocol_reward_rate\","]
8213#[doc = "    \"protocol_treasury_account\","]
8214#[doc = "    \"protocol_version\","]
8215#[doc = "    \"total_supply\","]
8216#[doc = "    \"transaction_validity_period\","]
8217#[doc = "    \"validators\""]
8218#[doc = "  ],"]
8219#[doc = "  \"properties\": {"]
8220#[doc = "    \"avg_hidden_validator_seats_per_shard\": {"]
8221#[doc = "      \"description\": \"Expected number of hidden validators per shard.\","]
8222#[doc = "      \"type\": \"array\","]
8223#[doc = "      \"items\": {"]
8224#[doc = "        \"type\": \"integer\","]
8225#[doc = "        \"format\": \"uint64\","]
8226#[doc = "        \"minimum\": 0.0"]
8227#[doc = "      }"]
8228#[doc = "    },"]
8229#[doc = "    \"block_producer_kickout_threshold\": {"]
8230#[doc = "      \"description\": \"Threshold for kicking out block producers, between 0 and 100.\","]
8231#[doc = "      \"type\": \"integer\","]
8232#[doc = "      \"format\": \"uint8\","]
8233#[doc = "      \"maximum\": 255.0,"]
8234#[doc = "      \"minimum\": 0.0"]
8235#[doc = "    },"]
8236#[doc = "    \"chain_id\": {"]
8237#[doc = "      \"description\": \"ID of the blockchain. This must be unique for every blockchain.\\nIf your testnet blockchains do not have unique chain IDs, you will have a bad time.\","]
8238#[doc = "      \"type\": \"string\""]
8239#[doc = "    },"]
8240#[doc = "    \"chunk_producer_assignment_changes_limit\": {"]
8241#[doc = "      \"description\": \"Limits the number of shard changes in chunk producer assignments,\\nif algorithm is able to choose assignment with better balance of\\nnumber of chunk producers for shards.\","]
8242#[doc = "      \"default\": 5,"]
8243#[doc = "      \"type\": \"integer\","]
8244#[doc = "      \"format\": \"uint64\","]
8245#[doc = "      \"minimum\": 0.0"]
8246#[doc = "    },"]
8247#[doc = "    \"chunk_producer_kickout_threshold\": {"]
8248#[doc = "      \"description\": \"Threshold for kicking out chunk producers, between 0 and 100.\","]
8249#[doc = "      \"type\": \"integer\","]
8250#[doc = "      \"format\": \"uint8\","]
8251#[doc = "      \"maximum\": 255.0,"]
8252#[doc = "      \"minimum\": 0.0"]
8253#[doc = "    },"]
8254#[doc = "    \"chunk_validator_only_kickout_threshold\": {"]
8255#[doc = "      \"description\": \"Threshold for kicking out nodes which are only chunk validators, between 0 and 100.\","]
8256#[doc = "      \"default\": 80,"]
8257#[doc = "      \"type\": \"integer\","]
8258#[doc = "      \"format\": \"uint8\","]
8259#[doc = "      \"maximum\": 255.0,"]
8260#[doc = "      \"minimum\": 0.0"]
8261#[doc = "    },"]
8262#[doc = "    \"dynamic_resharding\": {"]
8263#[doc = "      \"description\": \"Enable dynamic re-sharding.\","]
8264#[doc = "      \"type\": \"boolean\""]
8265#[doc = "    },"]
8266#[doc = "    \"epoch_length\": {"]
8267#[doc = "      \"description\": \"Epoch length counted in block heights.\","]
8268#[doc = "      \"type\": \"integer\","]
8269#[doc = "      \"format\": \"uint64\","]
8270#[doc = "      \"minimum\": 0.0"]
8271#[doc = "    },"]
8272#[doc = "    \"fishermen_threshold\": {"]
8273#[doc = "      \"description\": \"Fishermen stake threshold.\","]
8274#[doc = "      \"allOf\": ["]
8275#[doc = "        {"]
8276#[doc = "          \"$ref\": \"#/components/schemas/NearToken\""]
8277#[doc = "        }"]
8278#[doc = "      ]"]
8279#[doc = "    },"]
8280#[doc = "    \"gas_limit\": {"]
8281#[doc = "      \"description\": \"Initial gas limit.\","]
8282#[doc = "      \"allOf\": ["]
8283#[doc = "        {"]
8284#[doc = "          \"$ref\": \"#/components/schemas/NearGas\""]
8285#[doc = "        }"]
8286#[doc = "      ]"]
8287#[doc = "    },"]
8288#[doc = "    \"gas_price_adjustment_rate\": {"]
8289#[doc = "      \"description\": \"Gas price adjustment rate\","]
8290#[doc = "      \"type\": \"array\","]
8291#[doc = "      \"items\": {"]
8292#[doc = "        \"type\": \"integer\","]
8293#[doc = "        \"format\": \"int32\""]
8294#[doc = "      },"]
8295#[doc = "      \"maxItems\": 2,"]
8296#[doc = "      \"minItems\": 2"]
8297#[doc = "    },"]
8298#[doc = "    \"genesis_height\": {"]
8299#[doc = "      \"description\": \"Height of genesis block.\","]
8300#[doc = "      \"type\": \"integer\","]
8301#[doc = "      \"format\": \"uint64\","]
8302#[doc = "      \"minimum\": 0.0"]
8303#[doc = "    },"]
8304#[doc = "    \"genesis_time\": {"]
8305#[doc = "      \"description\": \"Official time of blockchain start.\","]
8306#[doc = "      \"type\": \"string\","]
8307#[doc = "      \"format\": \"date-time\""]
8308#[doc = "    },"]
8309#[doc = "    \"max_gas_price\": {"]
8310#[doc = "      \"$ref\": \"#/components/schemas/NearToken\""]
8311#[doc = "    },"]
8312#[doc = "    \"max_inflation_rate\": {"]
8313#[doc = "      \"description\": \"Maximum inflation on the total supply every epoch.\","]
8314#[doc = "      \"type\": \"array\","]
8315#[doc = "      \"items\": {"]
8316#[doc = "        \"type\": \"integer\","]
8317#[doc = "        \"format\": \"int32\""]
8318#[doc = "      },"]
8319#[doc = "      \"maxItems\": 2,"]
8320#[doc = "      \"minItems\": 2"]
8321#[doc = "    },"]
8322#[doc = "    \"max_kickout_stake_perc\": {"]
8323#[doc = "      \"description\": \"Max stake percentage of the validators we will kick out.\","]
8324#[doc = "      \"default\": 100,"]
8325#[doc = "      \"type\": \"integer\","]
8326#[doc = "      \"format\": \"uint8\","]
8327#[doc = "      \"maximum\": 255.0,"]
8328#[doc = "      \"minimum\": 0.0"]
8329#[doc = "    },"]
8330#[doc = "    \"min_gas_price\": {"]
8331#[doc = "      \"description\": \"Minimum gas price. It is also the initial gas price.\","]
8332#[doc = "      \"allOf\": ["]
8333#[doc = "        {"]
8334#[doc = "          \"$ref\": \"#/components/schemas/NearToken\""]
8335#[doc = "        }"]
8336#[doc = "      ]"]
8337#[doc = "    },"]
8338#[doc = "    \"minimum_stake_divisor\": {"]
8339#[doc = "      \"description\": \"The minimum stake required for staking is last seat price divided by this number.\","]
8340#[doc = "      \"default\": 10,"]
8341#[doc = "      \"type\": \"integer\","]
8342#[doc = "      \"format\": \"uint64\","]
8343#[doc = "      \"minimum\": 0.0"]
8344#[doc = "    },"]
8345#[doc = "    \"minimum_stake_ratio\": {"]
8346#[doc = "      \"description\": \"The lowest ratio s/s_total any block producer can have.\\nSee <https://github.com/near/NEPs/pull/167> for details\","]
8347#[doc = "      \"default\": ["]
8348#[doc = "        1,"]
8349#[doc = "        6250"]
8350#[doc = "      ],"]
8351#[doc = "      \"type\": \"array\","]
8352#[doc = "      \"items\": {"]
8353#[doc = "        \"type\": \"integer\","]
8354#[doc = "        \"format\": \"int32\""]
8355#[doc = "      },"]
8356#[doc = "      \"maxItems\": 2,"]
8357#[doc = "      \"minItems\": 2"]
8358#[doc = "    },"]
8359#[doc = "    \"minimum_validators_per_shard\": {"]
8360#[doc = "      \"description\": \"The minimum number of validators each shard must have\","]
8361#[doc = "      \"default\": 1,"]
8362#[doc = "      \"type\": \"integer\","]
8363#[doc = "      \"format\": \"uint64\","]
8364#[doc = "      \"minimum\": 0.0"]
8365#[doc = "    },"]
8366#[doc = "    \"num_block_producer_seats\": {"]
8367#[doc = "      \"description\": \"Number of block producer seats at genesis.\","]
8368#[doc = "      \"type\": \"integer\","]
8369#[doc = "      \"format\": \"uint64\","]
8370#[doc = "      \"minimum\": 0.0"]
8371#[doc = "    },"]
8372#[doc = "    \"num_block_producer_seats_per_shard\": {"]
8373#[doc = "      \"description\": \"Defines number of shards and number of block producer seats per each shard at genesis.\\nNote: not used with protocol_feature_chunk_only_producers -- replaced by minimum_validators_per_shard\\nNote: not used before as all block producers produce chunks for all shards\","]
8374#[doc = "      \"type\": \"array\","]
8375#[doc = "      \"items\": {"]
8376#[doc = "        \"type\": \"integer\","]
8377#[doc = "        \"format\": \"uint64\","]
8378#[doc = "        \"minimum\": 0.0"]
8379#[doc = "      }"]
8380#[doc = "    },"]
8381#[doc = "    \"num_blocks_per_year\": {"]
8382#[doc = "      \"description\": \"Expected number of blocks per year\","]
8383#[doc = "      \"type\": \"integer\","]
8384#[doc = "      \"format\": \"uint64\","]
8385#[doc = "      \"minimum\": 0.0"]
8386#[doc = "    },"]
8387#[doc = "    \"num_chunk_only_producer_seats\": {"]
8388#[doc = "      \"description\": \"Deprecated.\","]
8389#[doc = "      \"default\": 300,"]
8390#[doc = "      \"type\": \"integer\","]
8391#[doc = "      \"format\": \"uint64\","]
8392#[doc = "      \"minimum\": 0.0"]
8393#[doc = "    },"]
8394#[doc = "    \"num_chunk_producer_seats\": {"]
8395#[doc = "      \"description\": \"Number of chunk producers.\\nDon't mess it up with chunk-only producers feature which is deprecated.\","]
8396#[doc = "      \"default\": 100,"]
8397#[doc = "      \"type\": \"integer\","]
8398#[doc = "      \"format\": \"uint64\","]
8399#[doc = "      \"minimum\": 0.0"]
8400#[doc = "    },"]
8401#[doc = "    \"num_chunk_validator_seats\": {"]
8402#[doc = "      \"default\": 300,"]
8403#[doc = "      \"type\": \"integer\","]
8404#[doc = "      \"format\": \"uint64\","]
8405#[doc = "      \"minimum\": 0.0"]
8406#[doc = "    },"]
8407#[doc = "    \"online_max_threshold\": {"]
8408#[doc = "      \"description\": \"Online maximum threshold above which validator gets full reward.\","]
8409#[doc = "      \"default\": ["]
8410#[doc = "        99,"]
8411#[doc = "        100"]
8412#[doc = "      ],"]
8413#[doc = "      \"type\": \"array\","]
8414#[doc = "      \"items\": {"]
8415#[doc = "        \"type\": \"integer\","]
8416#[doc = "        \"format\": \"int32\""]
8417#[doc = "      },"]
8418#[doc = "      \"maxItems\": 2,"]
8419#[doc = "      \"minItems\": 2"]
8420#[doc = "    },"]
8421#[doc = "    \"online_min_threshold\": {"]
8422#[doc = "      \"description\": \"Online minimum threshold below which validator doesn't receive reward.\","]
8423#[doc = "      \"default\": ["]
8424#[doc = "        9,"]
8425#[doc = "        10"]
8426#[doc = "      ],"]
8427#[doc = "      \"type\": \"array\","]
8428#[doc = "      \"items\": {"]
8429#[doc = "        \"type\": \"integer\","]
8430#[doc = "        \"format\": \"int32\""]
8431#[doc = "      },"]
8432#[doc = "      \"maxItems\": 2,"]
8433#[doc = "      \"minItems\": 2"]
8434#[doc = "    },"]
8435#[doc = "    \"protocol_reward_rate\": {"]
8436#[doc = "      \"description\": \"Protocol treasury rate\","]
8437#[doc = "      \"type\": \"array\","]
8438#[doc = "      \"items\": {"]
8439#[doc = "        \"type\": \"integer\","]
8440#[doc = "        \"format\": \"int32\""]
8441#[doc = "      },"]
8442#[doc = "      \"maxItems\": 2,"]
8443#[doc = "      \"minItems\": 2"]
8444#[doc = "    },"]
8445#[doc = "    \"protocol_treasury_account\": {"]
8446#[doc = "      \"description\": \"Protocol treasury account\","]
8447#[doc = "      \"allOf\": ["]
8448#[doc = "        {"]
8449#[doc = "          \"$ref\": \"#/components/schemas/AccountId\""]
8450#[doc = "        }"]
8451#[doc = "      ]"]
8452#[doc = "    },"]
8453#[doc = "    \"protocol_upgrade_stake_threshold\": {"]
8454#[doc = "      \"description\": \"Threshold of stake that needs to indicate that they ready for upgrade.\","]
8455#[doc = "      \"default\": ["]
8456#[doc = "        4,"]
8457#[doc = "        5"]
8458#[doc = "      ],"]
8459#[doc = "      \"type\": \"array\","]
8460#[doc = "      \"items\": {"]
8461#[doc = "        \"type\": \"integer\","]
8462#[doc = "        \"format\": \"int32\""]
8463#[doc = "      },"]
8464#[doc = "      \"maxItems\": 2,"]
8465#[doc = "      \"minItems\": 2"]
8466#[doc = "    },"]
8467#[doc = "    \"protocol_version\": {"]
8468#[doc = "      \"description\": \"Protocol version that this genesis works with.\","]
8469#[doc = "      \"type\": \"integer\","]
8470#[doc = "      \"format\": \"uint32\","]
8471#[doc = "      \"minimum\": 0.0"]
8472#[doc = "    },"]
8473#[doc = "    \"shard_layout\": {"]
8474#[doc = "      \"description\": \"Layout information regarding how to split accounts to shards\","]
8475#[doc = "      \"default\": {"]
8476#[doc = "        \"V2\": {"]
8477#[doc = "          \"boundary_accounts\": [],"]
8478#[doc = "          \"id_to_index_map\": {"]
8479#[doc = "            \"0\": 0"]
8480#[doc = "          },"]
8481#[doc = "          \"index_to_id_map\": {"]
8482#[doc = "            \"0\": 0"]
8483#[doc = "          },"]
8484#[doc = "          \"shard_ids\": ["]
8485#[doc = "            0"]
8486#[doc = "          ],"]
8487#[doc = "          \"version\": 0"]
8488#[doc = "        }"]
8489#[doc = "      },"]
8490#[doc = "      \"allOf\": ["]
8491#[doc = "        {"]
8492#[doc = "          \"$ref\": \"#/components/schemas/ShardLayout\""]
8493#[doc = "        }"]
8494#[doc = "      ]"]
8495#[doc = "    },"]
8496#[doc = "    \"shuffle_shard_assignment_for_chunk_producers\": {"]
8497#[doc = "      \"description\": \"If true, shuffle the chunk producers across shards. In other words, if\\nthe shard assignments were `[S_0, S_1, S_2, S_3]` where `S_i` represents\\nthe set of chunk producers for shard `i`, if this flag were true, the\\nshard assignments might become, for example, `[S_2, S_0, S_3, S_1]`.\","]
8498#[doc = "      \"default\": false,"]
8499#[doc = "      \"type\": \"boolean\""]
8500#[doc = "    },"]
8501#[doc = "    \"target_validator_mandates_per_shard\": {"]
8502#[doc = "      \"description\": \"Number of target chunk validator mandates for each shard.\","]
8503#[doc = "      \"default\": 68,"]
8504#[doc = "      \"type\": \"integer\","]
8505#[doc = "      \"format\": \"uint64\","]
8506#[doc = "      \"minimum\": 0.0"]
8507#[doc = "    },"]
8508#[doc = "    \"total_supply\": {"]
8509#[doc = "      \"description\": \"Total supply of tokens at genesis.\","]
8510#[doc = "      \"allOf\": ["]
8511#[doc = "        {"]
8512#[doc = "          \"$ref\": \"#/components/schemas/NearToken\""]
8513#[doc = "        }"]
8514#[doc = "      ]"]
8515#[doc = "    },"]
8516#[doc = "    \"transaction_validity_period\": {"]
8517#[doc = "      \"description\": \"Number of blocks for which a given transaction is valid\","]
8518#[doc = "      \"type\": \"integer\","]
8519#[doc = "      \"format\": \"uint64\","]
8520#[doc = "      \"minimum\": 0.0"]
8521#[doc = "    },"]
8522#[doc = "    \"use_production_config\": {"]
8523#[doc = "      \"description\": \"This is only for test purposes. We hard code some configs for mainnet and testnet\\nin AllEpochConfig, and we want to have a way to test that code path. This flag is for that.\\nIf set to true, the node will use the same config override path as mainnet and testnet.\","]
8524#[doc = "      \"default\": false,"]
8525#[doc = "      \"type\": \"boolean\""]
8526#[doc = "    },"]
8527#[doc = "    \"validators\": {"]
8528#[doc = "      \"description\": \"List of initial validators.\","]
8529#[doc = "      \"type\": \"array\","]
8530#[doc = "      \"items\": {"]
8531#[doc = "        \"$ref\": \"#/components/schemas/AccountInfo\""]
8532#[doc = "      }"]
8533#[doc = "    }"]
8534#[doc = "  }"]
8535#[doc = "}"]
8536#[doc = r" ```"]
8537#[doc = r" </details>"]
8538#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
8539pub struct GenesisConfig {
8540    #[doc = "Expected number of hidden validators per shard."]
8541    pub avg_hidden_validator_seats_per_shard: ::std::vec::Vec<u64>,
8542    #[doc = "Threshold for kicking out block producers, between 0 and 100."]
8543    pub block_producer_kickout_threshold: u8,
8544    #[doc = "ID of the blockchain. This must be unique for every blockchain.\nIf your testnet blockchains do not have unique chain IDs, you will have a bad time."]
8545    pub chain_id: ::std::string::String,
8546    #[doc = "Limits the number of shard changes in chunk producer assignments,\nif algorithm is able to choose assignment with better balance of\nnumber of chunk producers for shards."]
8547    #[serde(default = "defaults::default_u64::<u64, 5>")]
8548    pub chunk_producer_assignment_changes_limit: u64,
8549    #[doc = "Threshold for kicking out chunk producers, between 0 and 100."]
8550    pub chunk_producer_kickout_threshold: u8,
8551    #[doc = "Threshold for kicking out nodes which are only chunk validators, between 0 and 100."]
8552    #[serde(default = "defaults::default_u64::<u8, 80>")]
8553    pub chunk_validator_only_kickout_threshold: u8,
8554    #[doc = "Enable dynamic re-sharding."]
8555    pub dynamic_resharding: bool,
8556    #[doc = "Epoch length counted in block heights."]
8557    pub epoch_length: u64,
8558    #[doc = "Fishermen stake threshold."]
8559    pub fishermen_threshold: NearToken,
8560    #[doc = "Initial gas limit."]
8561    pub gas_limit: NearGas,
8562    #[doc = "Gas price adjustment rate"]
8563    pub gas_price_adjustment_rate: [i32; 2usize],
8564    #[doc = "Height of genesis block."]
8565    pub genesis_height: u64,
8566    #[doc = "Official time of blockchain start."]
8567    pub genesis_time: ::chrono::DateTime<::chrono::offset::Utc>,
8568    pub max_gas_price: NearToken,
8569    #[doc = "Maximum inflation on the total supply every epoch."]
8570    pub max_inflation_rate: [i32; 2usize],
8571    #[doc = "Max stake percentage of the validators we will kick out."]
8572    #[serde(default = "defaults::default_u64::<u8, 100>")]
8573    pub max_kickout_stake_perc: u8,
8574    #[doc = "Minimum gas price. It is also the initial gas price."]
8575    pub min_gas_price: NearToken,
8576    #[doc = "The minimum stake required for staking is last seat price divided by this number."]
8577    #[serde(default = "defaults::default_u64::<u64, 10>")]
8578    pub minimum_stake_divisor: u64,
8579    #[doc = "The lowest ratio s/s_total any block producer can have.\nSee <https://github.com/near/NEPs/pull/167> for details"]
8580    #[serde(default = "defaults::genesis_config_minimum_stake_ratio")]
8581    pub minimum_stake_ratio: [i32; 2usize],
8582    #[doc = "The minimum number of validators each shard must have"]
8583    #[serde(default = "defaults::default_u64::<u64, 1>")]
8584    pub minimum_validators_per_shard: u64,
8585    #[doc = "Number of block producer seats at genesis."]
8586    pub num_block_producer_seats: u64,
8587    #[doc = "Defines number of shards and number of block producer seats per each shard at genesis.\nNote: not used with protocol_feature_chunk_only_producers -- replaced by minimum_validators_per_shard\nNote: not used before as all block producers produce chunks for all shards"]
8588    pub num_block_producer_seats_per_shard: ::std::vec::Vec<u64>,
8589    #[doc = "Expected number of blocks per year"]
8590    pub num_blocks_per_year: u64,
8591    #[doc = "Deprecated."]
8592    #[serde(default = "defaults::default_u64::<u64, 300>")]
8593    pub num_chunk_only_producer_seats: u64,
8594    #[doc = "Number of chunk producers.\nDon't mess it up with chunk-only producers feature which is deprecated."]
8595    #[serde(default = "defaults::default_u64::<u64, 100>")]
8596    pub num_chunk_producer_seats: u64,
8597    #[serde(default = "defaults::default_u64::<u64, 300>")]
8598    pub num_chunk_validator_seats: u64,
8599    #[doc = "Online maximum threshold above which validator gets full reward."]
8600    #[serde(default = "defaults::genesis_config_online_max_threshold")]
8601    pub online_max_threshold: [i32; 2usize],
8602    #[doc = "Online minimum threshold below which validator doesn't receive reward."]
8603    #[serde(default = "defaults::genesis_config_online_min_threshold")]
8604    pub online_min_threshold: [i32; 2usize],
8605    #[doc = "Protocol treasury rate"]
8606    pub protocol_reward_rate: [i32; 2usize],
8607    #[doc = "Protocol treasury account"]
8608    pub protocol_treasury_account: AccountId,
8609    #[doc = "Threshold of stake that needs to indicate that they ready for upgrade."]
8610    #[serde(default = "defaults::genesis_config_protocol_upgrade_stake_threshold")]
8611    pub protocol_upgrade_stake_threshold: [i32; 2usize],
8612    #[doc = "Protocol version that this genesis works with."]
8613    pub protocol_version: u32,
8614    #[doc = "Layout information regarding how to split accounts to shards"]
8615    #[serde(default = "defaults::genesis_config_shard_layout")]
8616    pub shard_layout: ShardLayout,
8617    #[doc = "If true, shuffle the chunk producers across shards. In other words, if\nthe shard assignments were `[S_0, S_1, S_2, S_3]` where `S_i` represents\nthe set of chunk producers for shard `i`, if this flag were true, the\nshard assignments might become, for example, `[S_2, S_0, S_3, S_1]`."]
8618    #[serde(default)]
8619    pub shuffle_shard_assignment_for_chunk_producers: bool,
8620    #[doc = "Number of target chunk validator mandates for each shard."]
8621    #[serde(default = "defaults::default_u64::<u64, 68>")]
8622    pub target_validator_mandates_per_shard: u64,
8623    #[doc = "Total supply of tokens at genesis."]
8624    pub total_supply: NearToken,
8625    #[doc = "Number of blocks for which a given transaction is valid"]
8626    pub transaction_validity_period: u64,
8627    #[doc = "This is only for test purposes. We hard code some configs for mainnet and testnet\nin AllEpochConfig, and we want to have a way to test that code path. This flag is for that.\nIf set to true, the node will use the same config override path as mainnet and testnet."]
8628    #[serde(default)]
8629    pub use_production_config: bool,
8630    #[doc = "List of initial validators."]
8631    pub validators: ::std::vec::Vec<AccountInfo>,
8632}
8633impl ::std::convert::From<&GenesisConfig> for GenesisConfig {
8634    fn from(value: &GenesisConfig) -> Self {
8635        value.clone()
8636    }
8637}
8638#[doc = "`GenesisConfigRequest`"]
8639#[doc = r""]
8640#[doc = r" <details><summary>JSON schema</summary>"]
8641#[doc = r""]
8642#[doc = r" ```json"]
8643#[doc = "{"]
8644#[doc = "  \"title\": \"GenesisConfigRequest\","]
8645#[doc = "  \"type\": \"null\""]
8646#[doc = "}"]
8647#[doc = r" ```"]
8648#[doc = r" </details>"]
8649#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
8650#[serde(transparent)]
8651pub struct GenesisConfigRequest(pub ());
8652impl ::std::ops::Deref for GenesisConfigRequest {
8653    type Target = ();
8654    fn deref(&self) -> &() {
8655        &self.0
8656    }
8657}
8658impl ::std::convert::From<GenesisConfigRequest> for () {
8659    fn from(value: GenesisConfigRequest) -> Self {
8660        value.0
8661    }
8662}
8663impl ::std::convert::From<&GenesisConfigRequest> for GenesisConfigRequest {
8664    fn from(value: &GenesisConfigRequest) -> Self {
8665        value.clone()
8666    }
8667}
8668impl ::std::convert::From<()> for GenesisConfigRequest {
8669    fn from(value: ()) -> Self {
8670        Self(value)
8671    }
8672}
8673#[doc = "`GlobalContractDeployMode`"]
8674#[doc = r""]
8675#[doc = r" <details><summary>JSON schema</summary>"]
8676#[doc = r""]
8677#[doc = r" ```json"]
8678#[doc = "{"]
8679#[doc = "  \"oneOf\": ["]
8680#[doc = "    {"]
8681#[doc = "      \"description\": \"Contract is deployed under its code hash.\\nUsers will be able reference it by that hash.\\nThis effectively makes the contract immutable.\","]
8682#[doc = "      \"type\": \"string\","]
8683#[doc = "      \"enum\": ["]
8684#[doc = "        \"CodeHash\""]
8685#[doc = "      ]"]
8686#[doc = "    },"]
8687#[doc = "    {"]
8688#[doc = "      \"description\": \"Contract is deployed under the owner account id.\\nUsers will be able reference it by that account id.\\nThis allows the owner to update the contract for all its users.\","]
8689#[doc = "      \"type\": \"string\","]
8690#[doc = "      \"enum\": ["]
8691#[doc = "        \"AccountId\""]
8692#[doc = "      ]"]
8693#[doc = "    }"]
8694#[doc = "  ]"]
8695#[doc = "}"]
8696#[doc = r" ```"]
8697#[doc = r" </details>"]
8698#[derive(
8699    :: serde :: Deserialize,
8700    :: serde :: Serialize,
8701    Clone,
8702    Copy,
8703    Debug,
8704    Eq,
8705    Hash,
8706    Ord,
8707    PartialEq,
8708    PartialOrd,
8709)]
8710pub enum GlobalContractDeployMode {
8711    #[doc = "Contract is deployed under its code hash.\nUsers will be able reference it by that hash.\nThis effectively makes the contract immutable."]
8712    CodeHash,
8713    #[doc = "Contract is deployed under the owner account id.\nUsers will be able reference it by that account id.\nThis allows the owner to update the contract for all its users."]
8714    AccountId,
8715}
8716impl ::std::convert::From<&Self> for GlobalContractDeployMode {
8717    fn from(value: &GlobalContractDeployMode) -> Self {
8718        value.clone()
8719    }
8720}
8721impl ::std::fmt::Display for GlobalContractDeployMode {
8722    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
8723        match *self {
8724            Self::CodeHash => f.write_str("CodeHash"),
8725            Self::AccountId => f.write_str("AccountId"),
8726        }
8727    }
8728}
8729impl ::std::str::FromStr for GlobalContractDeployMode {
8730    type Err = self::error::ConversionError;
8731    fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
8732        match value {
8733            "CodeHash" => Ok(Self::CodeHash),
8734            "AccountId" => Ok(Self::AccountId),
8735            _ => Err("invalid value".into()),
8736        }
8737    }
8738}
8739impl ::std::convert::TryFrom<&str> for GlobalContractDeployMode {
8740    type Error = self::error::ConversionError;
8741    fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
8742        value.parse()
8743    }
8744}
8745impl ::std::convert::TryFrom<&::std::string::String> for GlobalContractDeployMode {
8746    type Error = self::error::ConversionError;
8747    fn try_from(
8748        value: &::std::string::String,
8749    ) -> ::std::result::Result<Self, self::error::ConversionError> {
8750        value.parse()
8751    }
8752}
8753impl ::std::convert::TryFrom<::std::string::String> for GlobalContractDeployMode {
8754    type Error = self::error::ConversionError;
8755    fn try_from(
8756        value: ::std::string::String,
8757    ) -> ::std::result::Result<Self, self::error::ConversionError> {
8758        value.parse()
8759    }
8760}
8761#[doc = "`GlobalContractIdentifier`"]
8762#[doc = r""]
8763#[doc = r" <details><summary>JSON schema</summary>"]
8764#[doc = r""]
8765#[doc = r" ```json"]
8766#[doc = "{"]
8767#[doc = "  \"oneOf\": ["]
8768#[doc = "    {"]
8769#[doc = "      \"type\": \"object\","]
8770#[doc = "      \"required\": ["]
8771#[doc = "        \"CodeHash\""]
8772#[doc = "      ],"]
8773#[doc = "      \"properties\": {"]
8774#[doc = "        \"CodeHash\": {"]
8775#[doc = "          \"$ref\": \"#/components/schemas/CryptoHash\""]
8776#[doc = "        }"]
8777#[doc = "      },"]
8778#[doc = "      \"additionalProperties\": false"]
8779#[doc = "    },"]
8780#[doc = "    {"]
8781#[doc = "      \"type\": \"object\","]
8782#[doc = "      \"required\": ["]
8783#[doc = "        \"AccountId\""]
8784#[doc = "      ],"]
8785#[doc = "      \"properties\": {"]
8786#[doc = "        \"AccountId\": {"]
8787#[doc = "          \"$ref\": \"#/components/schemas/AccountId\""]
8788#[doc = "        }"]
8789#[doc = "      },"]
8790#[doc = "      \"additionalProperties\": false"]
8791#[doc = "    }"]
8792#[doc = "  ]"]
8793#[doc = "}"]
8794#[doc = r" ```"]
8795#[doc = r" </details>"]
8796#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
8797pub enum GlobalContractIdentifier {
8798    CodeHash(CryptoHash),
8799    AccountId(AccountId),
8800}
8801impl ::std::convert::From<&Self> for GlobalContractIdentifier {
8802    fn from(value: &GlobalContractIdentifier) -> Self {
8803        value.clone()
8804    }
8805}
8806impl ::std::convert::From<CryptoHash> for GlobalContractIdentifier {
8807    fn from(value: CryptoHash) -> Self {
8808        Self::CodeHash(value)
8809    }
8810}
8811impl ::std::convert::From<AccountId> for GlobalContractIdentifier {
8812    fn from(value: AccountId) -> Self {
8813        Self::AccountId(value)
8814    }
8815}
8816#[doc = "`GlobalContractIdentifierView`"]
8817#[doc = r""]
8818#[doc = r" <details><summary>JSON schema</summary>"]
8819#[doc = r""]
8820#[doc = r" ```json"]
8821#[doc = "{"]
8822#[doc = "  \"anyOf\": ["]
8823#[doc = "    {"]
8824#[doc = "      \"$ref\": \"#/components/schemas/CryptoHash\""]
8825#[doc = "    },"]
8826#[doc = "    {"]
8827#[doc = "      \"$ref\": \"#/components/schemas/AccountId\""]
8828#[doc = "    }"]
8829#[doc = "  ]"]
8830#[doc = "}"]
8831#[doc = r" ```"]
8832#[doc = r" </details>"]
8833#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
8834pub struct GlobalContractIdentifierView {
8835    #[serde(
8836        flatten,
8837        default,
8838        skip_serializing_if = "::std::option::Option::is_none"
8839    )]
8840    pub subtype_0: ::std::option::Option<CryptoHash>,
8841    #[serde(
8842        flatten,
8843        default,
8844        skip_serializing_if = "::std::option::Option::is_none"
8845    )]
8846    pub subtype_1: ::std::option::Option<AccountId>,
8847}
8848impl ::std::convert::From<&GlobalContractIdentifierView> for GlobalContractIdentifierView {
8849    fn from(value: &GlobalContractIdentifierView) -> Self {
8850        value.clone()
8851    }
8852}
8853impl ::std::default::Default for GlobalContractIdentifierView {
8854    fn default() -> Self {
8855        Self {
8856            subtype_0: Default::default(),
8857            subtype_1: Default::default(),
8858        }
8859    }
8860}
8861#[doc = "`HostError`"]
8862#[doc = r""]
8863#[doc = r" <details><summary>JSON schema</summary>"]
8864#[doc = r""]
8865#[doc = r" ```json"]
8866#[doc = "{"]
8867#[doc = "  \"oneOf\": ["]
8868#[doc = "    {"]
8869#[doc = "      \"description\": \"String encoding is bad UTF-16 sequence\","]
8870#[doc = "      \"type\": \"string\","]
8871#[doc = "      \"enum\": ["]
8872#[doc = "        \"BadUTF16\""]
8873#[doc = "      ]"]
8874#[doc = "    },"]
8875#[doc = "    {"]
8876#[doc = "      \"description\": \"String encoding is bad UTF-8 sequence\","]
8877#[doc = "      \"type\": \"string\","]
8878#[doc = "      \"enum\": ["]
8879#[doc = "        \"BadUTF8\""]
8880#[doc = "      ]"]
8881#[doc = "    },"]
8882#[doc = "    {"]
8883#[doc = "      \"description\": \"Exceeded the prepaid gas\","]
8884#[doc = "      \"type\": \"string\","]
8885#[doc = "      \"enum\": ["]
8886#[doc = "        \"GasExceeded\""]
8887#[doc = "      ]"]
8888#[doc = "    },"]
8889#[doc = "    {"]
8890#[doc = "      \"description\": \"Exceeded the maximum amount of gas allowed to burn per contract\","]
8891#[doc = "      \"type\": \"string\","]
8892#[doc = "      \"enum\": ["]
8893#[doc = "        \"GasLimitExceeded\""]
8894#[doc = "      ]"]
8895#[doc = "    },"]
8896#[doc = "    {"]
8897#[doc = "      \"description\": \"Exceeded the account balance\","]
8898#[doc = "      \"type\": \"string\","]
8899#[doc = "      \"enum\": ["]
8900#[doc = "        \"BalanceExceeded\""]
8901#[doc = "      ]"]
8902#[doc = "    },"]
8903#[doc = "    {"]
8904#[doc = "      \"description\": \"Tried to call an empty method name\","]
8905#[doc = "      \"type\": \"string\","]
8906#[doc = "      \"enum\": ["]
8907#[doc = "        \"EmptyMethodName\""]
8908#[doc = "      ]"]
8909#[doc = "    },"]
8910#[doc = "    {"]
8911#[doc = "      \"description\": \"Smart contract panicked\","]
8912#[doc = "      \"type\": \"object\","]
8913#[doc = "      \"required\": ["]
8914#[doc = "        \"GuestPanic\""]
8915#[doc = "      ],"]
8916#[doc = "      \"properties\": {"]
8917#[doc = "        \"GuestPanic\": {"]
8918#[doc = "          \"type\": \"object\","]
8919#[doc = "          \"required\": ["]
8920#[doc = "            \"panic_msg\""]
8921#[doc = "          ],"]
8922#[doc = "          \"properties\": {"]
8923#[doc = "            \"panic_msg\": {"]
8924#[doc = "              \"type\": \"string\""]
8925#[doc = "            }"]
8926#[doc = "          }"]
8927#[doc = "        }"]
8928#[doc = "      },"]
8929#[doc = "      \"additionalProperties\": false"]
8930#[doc = "    },"]
8931#[doc = "    {"]
8932#[doc = "      \"description\": \"IntegerOverflow happened during a contract execution\","]
8933#[doc = "      \"type\": \"string\","]
8934#[doc = "      \"enum\": ["]
8935#[doc = "        \"IntegerOverflow\""]
8936#[doc = "      ]"]
8937#[doc = "    },"]
8938#[doc = "    {"]
8939#[doc = "      \"description\": \"`promise_idx` does not correspond to existing promises\","]
8940#[doc = "      \"type\": \"object\","]
8941#[doc = "      \"required\": ["]
8942#[doc = "        \"InvalidPromiseIndex\""]
8943#[doc = "      ],"]
8944#[doc = "      \"properties\": {"]
8945#[doc = "        \"InvalidPromiseIndex\": {"]
8946#[doc = "          \"type\": \"object\","]
8947#[doc = "          \"required\": ["]
8948#[doc = "            \"promise_idx\""]
8949#[doc = "          ],"]
8950#[doc = "          \"properties\": {"]
8951#[doc = "            \"promise_idx\": {"]
8952#[doc = "              \"type\": \"integer\","]
8953#[doc = "              \"format\": \"uint64\","]
8954#[doc = "              \"minimum\": 0.0"]
8955#[doc = "            }"]
8956#[doc = "          }"]
8957#[doc = "        }"]
8958#[doc = "      },"]
8959#[doc = "      \"additionalProperties\": false"]
8960#[doc = "    },"]
8961#[doc = "    {"]
8962#[doc = "      \"description\": \"Actions can only be appended to non-joint promise.\","]
8963#[doc = "      \"type\": \"string\","]
8964#[doc = "      \"enum\": ["]
8965#[doc = "        \"CannotAppendActionToJointPromise\""]
8966#[doc = "      ]"]
8967#[doc = "    },"]
8968#[doc = "    {"]
8969#[doc = "      \"description\": \"Returning joint promise is currently prohibited\","]
8970#[doc = "      \"type\": \"string\","]
8971#[doc = "      \"enum\": ["]
8972#[doc = "        \"CannotReturnJointPromise\""]
8973#[doc = "      ]"]
8974#[doc = "    },"]
8975#[doc = "    {"]
8976#[doc = "      \"description\": \"Accessed invalid promise result index\","]
8977#[doc = "      \"type\": \"object\","]
8978#[doc = "      \"required\": ["]
8979#[doc = "        \"InvalidPromiseResultIndex\""]
8980#[doc = "      ],"]
8981#[doc = "      \"properties\": {"]
8982#[doc = "        \"InvalidPromiseResultIndex\": {"]
8983#[doc = "          \"type\": \"object\","]
8984#[doc = "          \"required\": ["]
8985#[doc = "            \"result_idx\""]
8986#[doc = "          ],"]
8987#[doc = "          \"properties\": {"]
8988#[doc = "            \"result_idx\": {"]
8989#[doc = "              \"type\": \"integer\","]
8990#[doc = "              \"format\": \"uint64\","]
8991#[doc = "              \"minimum\": 0.0"]
8992#[doc = "            }"]
8993#[doc = "          }"]
8994#[doc = "        }"]
8995#[doc = "      },"]
8996#[doc = "      \"additionalProperties\": false"]
8997#[doc = "    },"]
8998#[doc = "    {"]
8999#[doc = "      \"description\": \"Accessed invalid register id\","]
9000#[doc = "      \"type\": \"object\","]
9001#[doc = "      \"required\": ["]
9002#[doc = "        \"InvalidRegisterId\""]
9003#[doc = "      ],"]
9004#[doc = "      \"properties\": {"]
9005#[doc = "        \"InvalidRegisterId\": {"]
9006#[doc = "          \"type\": \"object\","]
9007#[doc = "          \"required\": ["]
9008#[doc = "            \"register_id\""]
9009#[doc = "          ],"]
9010#[doc = "          \"properties\": {"]
9011#[doc = "            \"register_id\": {"]
9012#[doc = "              \"type\": \"integer\","]
9013#[doc = "              \"format\": \"uint64\","]
9014#[doc = "              \"minimum\": 0.0"]
9015#[doc = "            }"]
9016#[doc = "          }"]
9017#[doc = "        }"]
9018#[doc = "      },"]
9019#[doc = "      \"additionalProperties\": false"]
9020#[doc = "    },"]
9021#[doc = "    {"]
9022#[doc = "      \"description\": \"Iterator `iterator_index` was invalidated after its creation by performing a mutable operation on trie\","]
9023#[doc = "      \"type\": \"object\","]
9024#[doc = "      \"required\": ["]
9025#[doc = "        \"IteratorWasInvalidated\""]
9026#[doc = "      ],"]
9027#[doc = "      \"properties\": {"]
9028#[doc = "        \"IteratorWasInvalidated\": {"]
9029#[doc = "          \"type\": \"object\","]
9030#[doc = "          \"required\": ["]
9031#[doc = "            \"iterator_index\""]
9032#[doc = "          ],"]
9033#[doc = "          \"properties\": {"]
9034#[doc = "            \"iterator_index\": {"]
9035#[doc = "              \"type\": \"integer\","]
9036#[doc = "              \"format\": \"uint64\","]
9037#[doc = "              \"minimum\": 0.0"]
9038#[doc = "            }"]
9039#[doc = "          }"]
9040#[doc = "        }"]
9041#[doc = "      },"]
9042#[doc = "      \"additionalProperties\": false"]
9043#[doc = "    },"]
9044#[doc = "    {"]
9045#[doc = "      \"description\": \"Accessed memory outside the bounds\","]
9046#[doc = "      \"type\": \"string\","]
9047#[doc = "      \"enum\": ["]
9048#[doc = "        \"MemoryAccessViolation\""]
9049#[doc = "      ]"]
9050#[doc = "    },"]
9051#[doc = "    {"]
9052#[doc = "      \"description\": \"VM Logic returned an invalid receipt index\","]
9053#[doc = "      \"type\": \"object\","]
9054#[doc = "      \"required\": ["]
9055#[doc = "        \"InvalidReceiptIndex\""]
9056#[doc = "      ],"]
9057#[doc = "      \"properties\": {"]
9058#[doc = "        \"InvalidReceiptIndex\": {"]
9059#[doc = "          \"type\": \"object\","]
9060#[doc = "          \"required\": ["]
9061#[doc = "            \"receipt_index\""]
9062#[doc = "          ],"]
9063#[doc = "          \"properties\": {"]
9064#[doc = "            \"receipt_index\": {"]
9065#[doc = "              \"type\": \"integer\","]
9066#[doc = "              \"format\": \"uint64\","]
9067#[doc = "              \"minimum\": 0.0"]
9068#[doc = "            }"]
9069#[doc = "          }"]
9070#[doc = "        }"]
9071#[doc = "      },"]
9072#[doc = "      \"additionalProperties\": false"]
9073#[doc = "    },"]
9074#[doc = "    {"]
9075#[doc = "      \"description\": \"Iterator index `iterator_index` does not exist\","]
9076#[doc = "      \"type\": \"object\","]
9077#[doc = "      \"required\": ["]
9078#[doc = "        \"InvalidIteratorIndex\""]
9079#[doc = "      ],"]
9080#[doc = "      \"properties\": {"]
9081#[doc = "        \"InvalidIteratorIndex\": {"]
9082#[doc = "          \"type\": \"object\","]
9083#[doc = "          \"required\": ["]
9084#[doc = "            \"iterator_index\""]
9085#[doc = "          ],"]
9086#[doc = "          \"properties\": {"]
9087#[doc = "            \"iterator_index\": {"]
9088#[doc = "              \"type\": \"integer\","]
9089#[doc = "              \"format\": \"uint64\","]
9090#[doc = "              \"minimum\": 0.0"]
9091#[doc = "            }"]
9092#[doc = "          }"]
9093#[doc = "        }"]
9094#[doc = "      },"]
9095#[doc = "      \"additionalProperties\": false"]
9096#[doc = "    },"]
9097#[doc = "    {"]
9098#[doc = "      \"description\": \"VM Logic returned an invalid account id\","]
9099#[doc = "      \"type\": \"string\","]
9100#[doc = "      \"enum\": ["]
9101#[doc = "        \"InvalidAccountId\""]
9102#[doc = "      ]"]
9103#[doc = "    },"]
9104#[doc = "    {"]
9105#[doc = "      \"description\": \"VM Logic returned an invalid method name\","]
9106#[doc = "      \"type\": \"string\","]
9107#[doc = "      \"enum\": ["]
9108#[doc = "        \"InvalidMethodName\""]
9109#[doc = "      ]"]
9110#[doc = "    },"]
9111#[doc = "    {"]
9112#[doc = "      \"description\": \"VM Logic provided an invalid public key\","]
9113#[doc = "      \"type\": \"string\","]
9114#[doc = "      \"enum\": ["]
9115#[doc = "        \"InvalidPublicKey\""]
9116#[doc = "      ]"]
9117#[doc = "    },"]
9118#[doc = "    {"]
9119#[doc = "      \"description\": \"`method_name` is not allowed in view calls\","]
9120#[doc = "      \"type\": \"object\","]
9121#[doc = "      \"required\": ["]
9122#[doc = "        \"ProhibitedInView\""]
9123#[doc = "      ],"]
9124#[doc = "      \"properties\": {"]
9125#[doc = "        \"ProhibitedInView\": {"]
9126#[doc = "          \"type\": \"object\","]
9127#[doc = "          \"required\": ["]
9128#[doc = "            \"method_name\""]
9129#[doc = "          ],"]
9130#[doc = "          \"properties\": {"]
9131#[doc = "            \"method_name\": {"]
9132#[doc = "              \"type\": \"string\""]
9133#[doc = "            }"]
9134#[doc = "          }"]
9135#[doc = "        }"]
9136#[doc = "      },"]
9137#[doc = "      \"additionalProperties\": false"]
9138#[doc = "    },"]
9139#[doc = "    {"]
9140#[doc = "      \"description\": \"The total number of logs will exceed the limit.\","]
9141#[doc = "      \"type\": \"object\","]
9142#[doc = "      \"required\": ["]
9143#[doc = "        \"NumberOfLogsExceeded\""]
9144#[doc = "      ],"]
9145#[doc = "      \"properties\": {"]
9146#[doc = "        \"NumberOfLogsExceeded\": {"]
9147#[doc = "          \"type\": \"object\","]
9148#[doc = "          \"required\": ["]
9149#[doc = "            \"limit\""]
9150#[doc = "          ],"]
9151#[doc = "          \"properties\": {"]
9152#[doc = "            \"limit\": {"]
9153#[doc = "              \"type\": \"integer\","]
9154#[doc = "              \"format\": \"uint64\","]
9155#[doc = "              \"minimum\": 0.0"]
9156#[doc = "            }"]
9157#[doc = "          }"]
9158#[doc = "        }"]
9159#[doc = "      },"]
9160#[doc = "      \"additionalProperties\": false"]
9161#[doc = "    },"]
9162#[doc = "    {"]
9163#[doc = "      \"description\": \"The storage key length exceeded the limit.\","]
9164#[doc = "      \"type\": \"object\","]
9165#[doc = "      \"required\": ["]
9166#[doc = "        \"KeyLengthExceeded\""]
9167#[doc = "      ],"]
9168#[doc = "      \"properties\": {"]
9169#[doc = "        \"KeyLengthExceeded\": {"]
9170#[doc = "          \"type\": \"object\","]
9171#[doc = "          \"required\": ["]
9172#[doc = "            \"length\","]
9173#[doc = "            \"limit\""]
9174#[doc = "          ],"]
9175#[doc = "          \"properties\": {"]
9176#[doc = "            \"length\": {"]
9177#[doc = "              \"type\": \"integer\","]
9178#[doc = "              \"format\": \"uint64\","]
9179#[doc = "              \"minimum\": 0.0"]
9180#[doc = "            },"]
9181#[doc = "            \"limit\": {"]
9182#[doc = "              \"type\": \"integer\","]
9183#[doc = "              \"format\": \"uint64\","]
9184#[doc = "              \"minimum\": 0.0"]
9185#[doc = "            }"]
9186#[doc = "          }"]
9187#[doc = "        }"]
9188#[doc = "      },"]
9189#[doc = "      \"additionalProperties\": false"]
9190#[doc = "    },"]
9191#[doc = "    {"]
9192#[doc = "      \"description\": \"The storage value length exceeded the limit.\","]
9193#[doc = "      \"type\": \"object\","]
9194#[doc = "      \"required\": ["]
9195#[doc = "        \"ValueLengthExceeded\""]
9196#[doc = "      ],"]
9197#[doc = "      \"properties\": {"]
9198#[doc = "        \"ValueLengthExceeded\": {"]
9199#[doc = "          \"type\": \"object\","]
9200#[doc = "          \"required\": ["]
9201#[doc = "            \"length\","]
9202#[doc = "            \"limit\""]
9203#[doc = "          ],"]
9204#[doc = "          \"properties\": {"]
9205#[doc = "            \"length\": {"]
9206#[doc = "              \"type\": \"integer\","]
9207#[doc = "              \"format\": \"uint64\","]
9208#[doc = "              \"minimum\": 0.0"]
9209#[doc = "            },"]
9210#[doc = "            \"limit\": {"]
9211#[doc = "              \"type\": \"integer\","]
9212#[doc = "              \"format\": \"uint64\","]
9213#[doc = "              \"minimum\": 0.0"]
9214#[doc = "            }"]
9215#[doc = "          }"]
9216#[doc = "        }"]
9217#[doc = "      },"]
9218#[doc = "      \"additionalProperties\": false"]
9219#[doc = "    },"]
9220#[doc = "    {"]
9221#[doc = "      \"description\": \"The total log length exceeded the limit.\","]
9222#[doc = "      \"type\": \"object\","]
9223#[doc = "      \"required\": ["]
9224#[doc = "        \"TotalLogLengthExceeded\""]
9225#[doc = "      ],"]
9226#[doc = "      \"properties\": {"]
9227#[doc = "        \"TotalLogLengthExceeded\": {"]
9228#[doc = "          \"type\": \"object\","]
9229#[doc = "          \"required\": ["]
9230#[doc = "            \"length\","]
9231#[doc = "            \"limit\""]
9232#[doc = "          ],"]
9233#[doc = "          \"properties\": {"]
9234#[doc = "            \"length\": {"]
9235#[doc = "              \"type\": \"integer\","]
9236#[doc = "              \"format\": \"uint64\","]
9237#[doc = "              \"minimum\": 0.0"]
9238#[doc = "            },"]
9239#[doc = "            \"limit\": {"]
9240#[doc = "              \"type\": \"integer\","]
9241#[doc = "              \"format\": \"uint64\","]
9242#[doc = "              \"minimum\": 0.0"]
9243#[doc = "            }"]
9244#[doc = "          }"]
9245#[doc = "        }"]
9246#[doc = "      },"]
9247#[doc = "      \"additionalProperties\": false"]
9248#[doc = "    },"]
9249#[doc = "    {"]
9250#[doc = "      \"description\": \"The maximum number of promises within a FunctionCall exceeded the limit.\","]
9251#[doc = "      \"type\": \"object\","]
9252#[doc = "      \"required\": ["]
9253#[doc = "        \"NumberPromisesExceeded\""]
9254#[doc = "      ],"]
9255#[doc = "      \"properties\": {"]
9256#[doc = "        \"NumberPromisesExceeded\": {"]
9257#[doc = "          \"type\": \"object\","]
9258#[doc = "          \"required\": ["]
9259#[doc = "            \"limit\","]
9260#[doc = "            \"number_of_promises\""]
9261#[doc = "          ],"]
9262#[doc = "          \"properties\": {"]
9263#[doc = "            \"limit\": {"]
9264#[doc = "              \"type\": \"integer\","]
9265#[doc = "              \"format\": \"uint64\","]
9266#[doc = "              \"minimum\": 0.0"]
9267#[doc = "            },"]
9268#[doc = "            \"number_of_promises\": {"]
9269#[doc = "              \"type\": \"integer\","]
9270#[doc = "              \"format\": \"uint64\","]
9271#[doc = "              \"minimum\": 0.0"]
9272#[doc = "            }"]
9273#[doc = "          }"]
9274#[doc = "        }"]
9275#[doc = "      },"]
9276#[doc = "      \"additionalProperties\": false"]
9277#[doc = "    },"]
9278#[doc = "    {"]
9279#[doc = "      \"description\": \"The maximum number of input data dependencies exceeded the limit.\","]
9280#[doc = "      \"type\": \"object\","]
9281#[doc = "      \"required\": ["]
9282#[doc = "        \"NumberInputDataDependenciesExceeded\""]
9283#[doc = "      ],"]
9284#[doc = "      \"properties\": {"]
9285#[doc = "        \"NumberInputDataDependenciesExceeded\": {"]
9286#[doc = "          \"type\": \"object\","]
9287#[doc = "          \"required\": ["]
9288#[doc = "            \"limit\","]
9289#[doc = "            \"number_of_input_data_dependencies\""]
9290#[doc = "          ],"]
9291#[doc = "          \"properties\": {"]
9292#[doc = "            \"limit\": {"]
9293#[doc = "              \"type\": \"integer\","]
9294#[doc = "              \"format\": \"uint64\","]
9295#[doc = "              \"minimum\": 0.0"]
9296#[doc = "            },"]
9297#[doc = "            \"number_of_input_data_dependencies\": {"]
9298#[doc = "              \"type\": \"integer\","]
9299#[doc = "              \"format\": \"uint64\","]
9300#[doc = "              \"minimum\": 0.0"]
9301#[doc = "            }"]
9302#[doc = "          }"]
9303#[doc = "        }"]
9304#[doc = "      },"]
9305#[doc = "      \"additionalProperties\": false"]
9306#[doc = "    },"]
9307#[doc = "    {"]
9308#[doc = "      \"description\": \"The returned value length exceeded the limit.\","]
9309#[doc = "      \"type\": \"object\","]
9310#[doc = "      \"required\": ["]
9311#[doc = "        \"ReturnedValueLengthExceeded\""]
9312#[doc = "      ],"]
9313#[doc = "      \"properties\": {"]
9314#[doc = "        \"ReturnedValueLengthExceeded\": {"]
9315#[doc = "          \"type\": \"object\","]
9316#[doc = "          \"required\": ["]
9317#[doc = "            \"length\","]
9318#[doc = "            \"limit\""]
9319#[doc = "          ],"]
9320#[doc = "          \"properties\": {"]
9321#[doc = "            \"length\": {"]
9322#[doc = "              \"type\": \"integer\","]
9323#[doc = "              \"format\": \"uint64\","]
9324#[doc = "              \"minimum\": 0.0"]
9325#[doc = "            },"]
9326#[doc = "            \"limit\": {"]
9327#[doc = "              \"type\": \"integer\","]
9328#[doc = "              \"format\": \"uint64\","]
9329#[doc = "              \"minimum\": 0.0"]
9330#[doc = "            }"]
9331#[doc = "          }"]
9332#[doc = "        }"]
9333#[doc = "      },"]
9334#[doc = "      \"additionalProperties\": false"]
9335#[doc = "    },"]
9336#[doc = "    {"]
9337#[doc = "      \"description\": \"The contract size for DeployContract action exceeded the limit.\","]
9338#[doc = "      \"type\": \"object\","]
9339#[doc = "      \"required\": ["]
9340#[doc = "        \"ContractSizeExceeded\""]
9341#[doc = "      ],"]
9342#[doc = "      \"properties\": {"]
9343#[doc = "        \"ContractSizeExceeded\": {"]
9344#[doc = "          \"type\": \"object\","]
9345#[doc = "          \"required\": ["]
9346#[doc = "            \"limit\","]
9347#[doc = "            \"size\""]
9348#[doc = "          ],"]
9349#[doc = "          \"properties\": {"]
9350#[doc = "            \"limit\": {"]
9351#[doc = "              \"type\": \"integer\","]
9352#[doc = "              \"format\": \"uint64\","]
9353#[doc = "              \"minimum\": 0.0"]
9354#[doc = "            },"]
9355#[doc = "            \"size\": {"]
9356#[doc = "              \"type\": \"integer\","]
9357#[doc = "              \"format\": \"uint64\","]
9358#[doc = "              \"minimum\": 0.0"]
9359#[doc = "            }"]
9360#[doc = "          }"]
9361#[doc = "        }"]
9362#[doc = "      },"]
9363#[doc = "      \"additionalProperties\": false"]
9364#[doc = "    },"]
9365#[doc = "    {"]
9366#[doc = "      \"description\": \"The host function was deprecated.\","]
9367#[doc = "      \"type\": \"object\","]
9368#[doc = "      \"required\": ["]
9369#[doc = "        \"Deprecated\""]
9370#[doc = "      ],"]
9371#[doc = "      \"properties\": {"]
9372#[doc = "        \"Deprecated\": {"]
9373#[doc = "          \"type\": \"object\","]
9374#[doc = "          \"required\": ["]
9375#[doc = "            \"method_name\""]
9376#[doc = "          ],"]
9377#[doc = "          \"properties\": {"]
9378#[doc = "            \"method_name\": {"]
9379#[doc = "              \"type\": \"string\""]
9380#[doc = "            }"]
9381#[doc = "          }"]
9382#[doc = "        }"]
9383#[doc = "      },"]
9384#[doc = "      \"additionalProperties\": false"]
9385#[doc = "    },"]
9386#[doc = "    {"]
9387#[doc = "      \"description\": \"General errors for ECDSA recover.\","]
9388#[doc = "      \"type\": \"object\","]
9389#[doc = "      \"required\": ["]
9390#[doc = "        \"ECRecoverError\""]
9391#[doc = "      ],"]
9392#[doc = "      \"properties\": {"]
9393#[doc = "        \"ECRecoverError\": {"]
9394#[doc = "          \"type\": \"object\","]
9395#[doc = "          \"required\": ["]
9396#[doc = "            \"msg\""]
9397#[doc = "          ],"]
9398#[doc = "          \"properties\": {"]
9399#[doc = "            \"msg\": {"]
9400#[doc = "              \"type\": \"string\""]
9401#[doc = "            }"]
9402#[doc = "          }"]
9403#[doc = "        }"]
9404#[doc = "      },"]
9405#[doc = "      \"additionalProperties\": false"]
9406#[doc = "    },"]
9407#[doc = "    {"]
9408#[doc = "      \"description\": \"Invalid input to alt_bn128 family of functions (e.g., point which isn't\\non the curve).\","]
9409#[doc = "      \"type\": \"object\","]
9410#[doc = "      \"required\": ["]
9411#[doc = "        \"AltBn128InvalidInput\""]
9412#[doc = "      ],"]
9413#[doc = "      \"properties\": {"]
9414#[doc = "        \"AltBn128InvalidInput\": {"]
9415#[doc = "          \"type\": \"object\","]
9416#[doc = "          \"required\": ["]
9417#[doc = "            \"msg\""]
9418#[doc = "          ],"]
9419#[doc = "          \"properties\": {"]
9420#[doc = "            \"msg\": {"]
9421#[doc = "              \"type\": \"string\""]
9422#[doc = "            }"]
9423#[doc = "          }"]
9424#[doc = "        }"]
9425#[doc = "      },"]
9426#[doc = "      \"additionalProperties\": false"]
9427#[doc = "    },"]
9428#[doc = "    {"]
9429#[doc = "      \"description\": \"Invalid input to ed25519 signature verification function (e.g. signature cannot be\\nderived from bytes).\","]
9430#[doc = "      \"type\": \"object\","]
9431#[doc = "      \"required\": ["]
9432#[doc = "        \"Ed25519VerifyInvalidInput\""]
9433#[doc = "      ],"]
9434#[doc = "      \"properties\": {"]
9435#[doc = "        \"Ed25519VerifyInvalidInput\": {"]
9436#[doc = "          \"type\": \"object\","]
9437#[doc = "          \"required\": ["]
9438#[doc = "            \"msg\""]
9439#[doc = "          ],"]
9440#[doc = "          \"properties\": {"]
9441#[doc = "            \"msg\": {"]
9442#[doc = "              \"type\": \"string\""]
9443#[doc = "            }"]
9444#[doc = "          }"]
9445#[doc = "        }"]
9446#[doc = "      },"]
9447#[doc = "      \"additionalProperties\": false"]
9448#[doc = "    }"]
9449#[doc = "  ]"]
9450#[doc = "}"]
9451#[doc = r" ```"]
9452#[doc = r" </details>"]
9453#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
9454pub enum HostError {
9455    #[doc = "String encoding is bad UTF-16 sequence"]
9456    #[serde(rename = "BadUTF16")]
9457    BadUtf16,
9458    #[doc = "String encoding is bad UTF-8 sequence"]
9459    #[serde(rename = "BadUTF8")]
9460    BadUtf8,
9461    #[doc = "Exceeded the prepaid gas"]
9462    GasExceeded,
9463    #[doc = "Exceeded the maximum amount of gas allowed to burn per contract"]
9464    GasLimitExceeded,
9465    #[doc = "Exceeded the account balance"]
9466    BalanceExceeded,
9467    #[doc = "Tried to call an empty method name"]
9468    EmptyMethodName,
9469    #[doc = "Smart contract panicked"]
9470    GuestPanic { panic_msg: ::std::string::String },
9471    #[doc = "IntegerOverflow happened during a contract execution"]
9472    IntegerOverflow,
9473    #[doc = "`promise_idx` does not correspond to existing promises"]
9474    InvalidPromiseIndex { promise_idx: u64 },
9475    #[doc = "Actions can only be appended to non-joint promise."]
9476    CannotAppendActionToJointPromise,
9477    #[doc = "Returning joint promise is currently prohibited"]
9478    CannotReturnJointPromise,
9479    #[doc = "Accessed invalid promise result index"]
9480    InvalidPromiseResultIndex { result_idx: u64 },
9481    #[doc = "Accessed invalid register id"]
9482    InvalidRegisterId { register_id: u64 },
9483    #[doc = "Iterator `iterator_index` was invalidated after its creation by performing a mutable operation on trie"]
9484    IteratorWasInvalidated { iterator_index: u64 },
9485    #[doc = "Accessed memory outside the bounds"]
9486    MemoryAccessViolation,
9487    #[doc = "VM Logic returned an invalid receipt index"]
9488    InvalidReceiptIndex { receipt_index: u64 },
9489    #[doc = "Iterator index `iterator_index` does not exist"]
9490    InvalidIteratorIndex { iterator_index: u64 },
9491    #[doc = "VM Logic returned an invalid account id"]
9492    InvalidAccountId,
9493    #[doc = "VM Logic returned an invalid method name"]
9494    InvalidMethodName,
9495    #[doc = "VM Logic provided an invalid public key"]
9496    InvalidPublicKey,
9497    #[doc = "`method_name` is not allowed in view calls"]
9498    ProhibitedInView { method_name: ::std::string::String },
9499    #[doc = "The total number of logs will exceed the limit."]
9500    NumberOfLogsExceeded { limit: u64 },
9501    #[doc = "The storage key length exceeded the limit."]
9502    KeyLengthExceeded { length: u64, limit: u64 },
9503    #[doc = "The storage value length exceeded the limit."]
9504    ValueLengthExceeded { length: u64, limit: u64 },
9505    #[doc = "The total log length exceeded the limit."]
9506    TotalLogLengthExceeded { length: u64, limit: u64 },
9507    #[doc = "The maximum number of promises within a FunctionCall exceeded the limit."]
9508    NumberPromisesExceeded { limit: u64, number_of_promises: u64 },
9509    #[doc = "The maximum number of input data dependencies exceeded the limit."]
9510    NumberInputDataDependenciesExceeded {
9511        limit: u64,
9512        number_of_input_data_dependencies: u64,
9513    },
9514    #[doc = "The returned value length exceeded the limit."]
9515    ReturnedValueLengthExceeded { length: u64, limit: u64 },
9516    #[doc = "The contract size for DeployContract action exceeded the limit."]
9517    ContractSizeExceeded { limit: u64, size: u64 },
9518    #[doc = "The host function was deprecated."]
9519    Deprecated { method_name: ::std::string::String },
9520    #[doc = "General errors for ECDSA recover."]
9521    #[serde(rename = "ECRecoverError")]
9522    EcRecoverError { msg: ::std::string::String },
9523    #[doc = "Invalid input to alt_bn128 family of functions (e.g., point which isn't\non the curve)."]
9524    AltBn128InvalidInput { msg: ::std::string::String },
9525    #[doc = "Invalid input to ed25519 signature verification function (e.g. signature cannot be\nderived from bytes)."]
9526    Ed25519VerifyInvalidInput { msg: ::std::string::String },
9527}
9528impl ::std::convert::From<&Self> for HostError {
9529    fn from(value: &HostError) -> Self {
9530        value.clone()
9531    }
9532}
9533#[doc = "`InvalidAccessKeyError`"]
9534#[doc = r""]
9535#[doc = r" <details><summary>JSON schema</summary>"]
9536#[doc = r""]
9537#[doc = r" ```json"]
9538#[doc = "{"]
9539#[doc = "  \"oneOf\": ["]
9540#[doc = "    {"]
9541#[doc = "      \"description\": \"The access key identified by the `public_key` doesn't exist for the account\","]
9542#[doc = "      \"type\": \"object\","]
9543#[doc = "      \"required\": ["]
9544#[doc = "        \"AccessKeyNotFound\""]
9545#[doc = "      ],"]
9546#[doc = "      \"properties\": {"]
9547#[doc = "        \"AccessKeyNotFound\": {"]
9548#[doc = "          \"type\": \"object\","]
9549#[doc = "          \"required\": ["]
9550#[doc = "            \"account_id\","]
9551#[doc = "            \"public_key\""]
9552#[doc = "          ],"]
9553#[doc = "          \"properties\": {"]
9554#[doc = "            \"account_id\": {"]
9555#[doc = "              \"$ref\": \"#/components/schemas/AccountId\""]
9556#[doc = "            },"]
9557#[doc = "            \"public_key\": {"]
9558#[doc = "              \"$ref\": \"#/components/schemas/PublicKey\""]
9559#[doc = "            }"]
9560#[doc = "          }"]
9561#[doc = "        }"]
9562#[doc = "      },"]
9563#[doc = "      \"additionalProperties\": false"]
9564#[doc = "    },"]
9565#[doc = "    {"]
9566#[doc = "      \"description\": \"Transaction `receiver_id` doesn't match the access key receiver_id\","]
9567#[doc = "      \"type\": \"object\","]
9568#[doc = "      \"required\": ["]
9569#[doc = "        \"ReceiverMismatch\""]
9570#[doc = "      ],"]
9571#[doc = "      \"properties\": {"]
9572#[doc = "        \"ReceiverMismatch\": {"]
9573#[doc = "          \"type\": \"object\","]
9574#[doc = "          \"required\": ["]
9575#[doc = "            \"ak_receiver\","]
9576#[doc = "            \"tx_receiver\""]
9577#[doc = "          ],"]
9578#[doc = "          \"properties\": {"]
9579#[doc = "            \"ak_receiver\": {"]
9580#[doc = "              \"type\": \"string\""]
9581#[doc = "            },"]
9582#[doc = "            \"tx_receiver\": {"]
9583#[doc = "              \"$ref\": \"#/components/schemas/AccountId\""]
9584#[doc = "            }"]
9585#[doc = "          }"]
9586#[doc = "        }"]
9587#[doc = "      },"]
9588#[doc = "      \"additionalProperties\": false"]
9589#[doc = "    },"]
9590#[doc = "    {"]
9591#[doc = "      \"description\": \"Transaction method name isn't allowed by the access key\","]
9592#[doc = "      \"type\": \"object\","]
9593#[doc = "      \"required\": ["]
9594#[doc = "        \"MethodNameMismatch\""]
9595#[doc = "      ],"]
9596#[doc = "      \"properties\": {"]
9597#[doc = "        \"MethodNameMismatch\": {"]
9598#[doc = "          \"type\": \"object\","]
9599#[doc = "          \"required\": ["]
9600#[doc = "            \"method_name\""]
9601#[doc = "          ],"]
9602#[doc = "          \"properties\": {"]
9603#[doc = "            \"method_name\": {"]
9604#[doc = "              \"type\": \"string\""]
9605#[doc = "            }"]
9606#[doc = "          }"]
9607#[doc = "        }"]
9608#[doc = "      },"]
9609#[doc = "      \"additionalProperties\": false"]
9610#[doc = "    },"]
9611#[doc = "    {"]
9612#[doc = "      \"description\": \"Transaction requires a full permission access key.\","]
9613#[doc = "      \"type\": \"string\","]
9614#[doc = "      \"enum\": ["]
9615#[doc = "        \"RequiresFullAccess\""]
9616#[doc = "      ]"]
9617#[doc = "    },"]
9618#[doc = "    {"]
9619#[doc = "      \"description\": \"Access Key does not have enough allowance to cover transaction cost\","]
9620#[doc = "      \"type\": \"object\","]
9621#[doc = "      \"required\": ["]
9622#[doc = "        \"NotEnoughAllowance\""]
9623#[doc = "      ],"]
9624#[doc = "      \"properties\": {"]
9625#[doc = "        \"NotEnoughAllowance\": {"]
9626#[doc = "          \"type\": \"object\","]
9627#[doc = "          \"required\": ["]
9628#[doc = "            \"account_id\","]
9629#[doc = "            \"allowance\","]
9630#[doc = "            \"cost\","]
9631#[doc = "            \"public_key\""]
9632#[doc = "          ],"]
9633#[doc = "          \"properties\": {"]
9634#[doc = "            \"account_id\": {"]
9635#[doc = "              \"$ref\": \"#/components/schemas/AccountId\""]
9636#[doc = "            },"]
9637#[doc = "            \"allowance\": {"]
9638#[doc = "              \"$ref\": \"#/components/schemas/NearToken\""]
9639#[doc = "            },"]
9640#[doc = "            \"cost\": {"]
9641#[doc = "              \"$ref\": \"#/components/schemas/NearToken\""]
9642#[doc = "            },"]
9643#[doc = "            \"public_key\": {"]
9644#[doc = "              \"$ref\": \"#/components/schemas/PublicKey\""]
9645#[doc = "            }"]
9646#[doc = "          }"]
9647#[doc = "        }"]
9648#[doc = "      },"]
9649#[doc = "      \"additionalProperties\": false"]
9650#[doc = "    },"]
9651#[doc = "    {"]
9652#[doc = "      \"description\": \"Having a deposit with a function call action is not allowed with a function call access key.\","]
9653#[doc = "      \"type\": \"string\","]
9654#[doc = "      \"enum\": ["]
9655#[doc = "        \"DepositWithFunctionCall\""]
9656#[doc = "      ]"]
9657#[doc = "    }"]
9658#[doc = "  ]"]
9659#[doc = "}"]
9660#[doc = r" ```"]
9661#[doc = r" </details>"]
9662#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
9663pub enum InvalidAccessKeyError {
9664    #[doc = "The access key identified by the `public_key` doesn't exist for the account"]
9665    AccessKeyNotFound {
9666        account_id: AccountId,
9667        public_key: PublicKey,
9668    },
9669    #[doc = "Transaction `receiver_id` doesn't match the access key receiver_id"]
9670    ReceiverMismatch {
9671        ak_receiver: ::std::string::String,
9672        tx_receiver: AccountId,
9673    },
9674    #[doc = "Transaction method name isn't allowed by the access key"]
9675    MethodNameMismatch { method_name: ::std::string::String },
9676    #[doc = "Transaction requires a full permission access key."]
9677    RequiresFullAccess,
9678    #[doc = "Access Key does not have enough allowance to cover transaction cost"]
9679    NotEnoughAllowance {
9680        account_id: AccountId,
9681        allowance: NearToken,
9682        cost: NearToken,
9683        public_key: PublicKey,
9684    },
9685    #[doc = "Having a deposit with a function call action is not allowed with a function call access key."]
9686    DepositWithFunctionCall,
9687}
9688impl ::std::convert::From<&Self> for InvalidAccessKeyError {
9689    fn from(value: &InvalidAccessKeyError) -> Self {
9690        value.clone()
9691    }
9692}
9693#[doc = "An error happened during TX execution"]
9694#[doc = r""]
9695#[doc = r" <details><summary>JSON schema</summary>"]
9696#[doc = r""]
9697#[doc = r" ```json"]
9698#[doc = "{"]
9699#[doc = "  \"description\": \"An error happened during TX execution\","]
9700#[doc = "  \"oneOf\": ["]
9701#[doc = "    {"]
9702#[doc = "      \"description\": \"Happens if a wrong AccessKey used or AccessKey has not enough permissions\","]
9703#[doc = "      \"type\": \"object\","]
9704#[doc = "      \"required\": ["]
9705#[doc = "        \"InvalidAccessKeyError\""]
9706#[doc = "      ],"]
9707#[doc = "      \"properties\": {"]
9708#[doc = "        \"InvalidAccessKeyError\": {"]
9709#[doc = "          \"$ref\": \"#/components/schemas/InvalidAccessKeyError\""]
9710#[doc = "        }"]
9711#[doc = "      },"]
9712#[doc = "      \"additionalProperties\": false"]
9713#[doc = "    },"]
9714#[doc = "    {"]
9715#[doc = "      \"description\": \"TX signer_id is not a valid [`AccountId`]\","]
9716#[doc = "      \"type\": \"object\","]
9717#[doc = "      \"required\": ["]
9718#[doc = "        \"InvalidSignerId\""]
9719#[doc = "      ],"]
9720#[doc = "      \"properties\": {"]
9721#[doc = "        \"InvalidSignerId\": {"]
9722#[doc = "          \"type\": \"object\","]
9723#[doc = "          \"required\": ["]
9724#[doc = "            \"signer_id\""]
9725#[doc = "          ],"]
9726#[doc = "          \"properties\": {"]
9727#[doc = "            \"signer_id\": {"]
9728#[doc = "              \"type\": \"string\""]
9729#[doc = "            }"]
9730#[doc = "          }"]
9731#[doc = "        }"]
9732#[doc = "      },"]
9733#[doc = "      \"additionalProperties\": false"]
9734#[doc = "    },"]
9735#[doc = "    {"]
9736#[doc = "      \"description\": \"TX signer_id is not found in a storage\","]
9737#[doc = "      \"type\": \"object\","]
9738#[doc = "      \"required\": ["]
9739#[doc = "        \"SignerDoesNotExist\""]
9740#[doc = "      ],"]
9741#[doc = "      \"properties\": {"]
9742#[doc = "        \"SignerDoesNotExist\": {"]
9743#[doc = "          \"type\": \"object\","]
9744#[doc = "          \"required\": ["]
9745#[doc = "            \"signer_id\""]
9746#[doc = "          ],"]
9747#[doc = "          \"properties\": {"]
9748#[doc = "            \"signer_id\": {"]
9749#[doc = "              \"$ref\": \"#/components/schemas/AccountId\""]
9750#[doc = "            }"]
9751#[doc = "          }"]
9752#[doc = "        }"]
9753#[doc = "      },"]
9754#[doc = "      \"additionalProperties\": false"]
9755#[doc = "    },"]
9756#[doc = "    {"]
9757#[doc = "      \"description\": \"Transaction nonce must be strictly greater than `account[access_key].nonce`.\","]
9758#[doc = "      \"type\": \"object\","]
9759#[doc = "      \"required\": ["]
9760#[doc = "        \"InvalidNonce\""]
9761#[doc = "      ],"]
9762#[doc = "      \"properties\": {"]
9763#[doc = "        \"InvalidNonce\": {"]
9764#[doc = "          \"type\": \"object\","]
9765#[doc = "          \"required\": ["]
9766#[doc = "            \"ak_nonce\","]
9767#[doc = "            \"tx_nonce\""]
9768#[doc = "          ],"]
9769#[doc = "          \"properties\": {"]
9770#[doc = "            \"ak_nonce\": {"]
9771#[doc = "              \"type\": \"integer\","]
9772#[doc = "              \"format\": \"uint64\","]
9773#[doc = "              \"minimum\": 0.0"]
9774#[doc = "            },"]
9775#[doc = "            \"tx_nonce\": {"]
9776#[doc = "              \"type\": \"integer\","]
9777#[doc = "              \"format\": \"uint64\","]
9778#[doc = "              \"minimum\": 0.0"]
9779#[doc = "            }"]
9780#[doc = "          }"]
9781#[doc = "        }"]
9782#[doc = "      },"]
9783#[doc = "      \"additionalProperties\": false"]
9784#[doc = "    },"]
9785#[doc = "    {"]
9786#[doc = "      \"description\": \"Transaction nonce is larger than the upper bound given by the block height\","]
9787#[doc = "      \"type\": \"object\","]
9788#[doc = "      \"required\": ["]
9789#[doc = "        \"NonceTooLarge\""]
9790#[doc = "      ],"]
9791#[doc = "      \"properties\": {"]
9792#[doc = "        \"NonceTooLarge\": {"]
9793#[doc = "          \"type\": \"object\","]
9794#[doc = "          \"required\": ["]
9795#[doc = "            \"tx_nonce\","]
9796#[doc = "            \"upper_bound\""]
9797#[doc = "          ],"]
9798#[doc = "          \"properties\": {"]
9799#[doc = "            \"tx_nonce\": {"]
9800#[doc = "              \"type\": \"integer\","]
9801#[doc = "              \"format\": \"uint64\","]
9802#[doc = "              \"minimum\": 0.0"]
9803#[doc = "            },"]
9804#[doc = "            \"upper_bound\": {"]
9805#[doc = "              \"type\": \"integer\","]
9806#[doc = "              \"format\": \"uint64\","]
9807#[doc = "              \"minimum\": 0.0"]
9808#[doc = "            }"]
9809#[doc = "          }"]
9810#[doc = "        }"]
9811#[doc = "      },"]
9812#[doc = "      \"additionalProperties\": false"]
9813#[doc = "    },"]
9814#[doc = "    {"]
9815#[doc = "      \"description\": \"TX receiver_id is not a valid AccountId\","]
9816#[doc = "      \"type\": \"object\","]
9817#[doc = "      \"required\": ["]
9818#[doc = "        \"InvalidReceiverId\""]
9819#[doc = "      ],"]
9820#[doc = "      \"properties\": {"]
9821#[doc = "        \"InvalidReceiverId\": {"]
9822#[doc = "          \"type\": \"object\","]
9823#[doc = "          \"required\": ["]
9824#[doc = "            \"receiver_id\""]
9825#[doc = "          ],"]
9826#[doc = "          \"properties\": {"]
9827#[doc = "            \"receiver_id\": {"]
9828#[doc = "              \"type\": \"string\""]
9829#[doc = "            }"]
9830#[doc = "          }"]
9831#[doc = "        }"]
9832#[doc = "      },"]
9833#[doc = "      \"additionalProperties\": false"]
9834#[doc = "    },"]
9835#[doc = "    {"]
9836#[doc = "      \"description\": \"TX signature is not valid\","]
9837#[doc = "      \"type\": \"string\","]
9838#[doc = "      \"enum\": ["]
9839#[doc = "        \"InvalidSignature\""]
9840#[doc = "      ]"]
9841#[doc = "    },"]
9842#[doc = "    {"]
9843#[doc = "      \"description\": \"Account does not have enough balance to cover TX cost\","]
9844#[doc = "      \"type\": \"object\","]
9845#[doc = "      \"required\": ["]
9846#[doc = "        \"NotEnoughBalance\""]
9847#[doc = "      ],"]
9848#[doc = "      \"properties\": {"]
9849#[doc = "        \"NotEnoughBalance\": {"]
9850#[doc = "          \"type\": \"object\","]
9851#[doc = "          \"required\": ["]
9852#[doc = "            \"balance\","]
9853#[doc = "            \"cost\","]
9854#[doc = "            \"signer_id\""]
9855#[doc = "          ],"]
9856#[doc = "          \"properties\": {"]
9857#[doc = "            \"balance\": {"]
9858#[doc = "              \"$ref\": \"#/components/schemas/NearToken\""]
9859#[doc = "            },"]
9860#[doc = "            \"cost\": {"]
9861#[doc = "              \"$ref\": \"#/components/schemas/NearToken\""]
9862#[doc = "            },"]
9863#[doc = "            \"signer_id\": {"]
9864#[doc = "              \"$ref\": \"#/components/schemas/AccountId\""]
9865#[doc = "            }"]
9866#[doc = "          }"]
9867#[doc = "        }"]
9868#[doc = "      },"]
9869#[doc = "      \"additionalProperties\": false"]
9870#[doc = "    },"]
9871#[doc = "    {"]
9872#[doc = "      \"description\": \"Signer account doesn't have enough balance after transaction.\","]
9873#[doc = "      \"type\": \"object\","]
9874#[doc = "      \"required\": ["]
9875#[doc = "        \"LackBalanceForState\""]
9876#[doc = "      ],"]
9877#[doc = "      \"properties\": {"]
9878#[doc = "        \"LackBalanceForState\": {"]
9879#[doc = "          \"type\": \"object\","]
9880#[doc = "          \"required\": ["]
9881#[doc = "            \"amount\","]
9882#[doc = "            \"signer_id\""]
9883#[doc = "          ],"]
9884#[doc = "          \"properties\": {"]
9885#[doc = "            \"amount\": {"]
9886#[doc = "              \"description\": \"Required balance to cover the state.\","]
9887#[doc = "              \"allOf\": ["]
9888#[doc = "                {"]
9889#[doc = "                  \"$ref\": \"#/components/schemas/NearToken\""]
9890#[doc = "                }"]
9891#[doc = "              ]"]
9892#[doc = "            },"]
9893#[doc = "            \"signer_id\": {"]
9894#[doc = "              \"description\": \"An account which doesn't have enough balance to cover storage.\","]
9895#[doc = "              \"allOf\": ["]
9896#[doc = "                {"]
9897#[doc = "                  \"$ref\": \"#/components/schemas/AccountId\""]
9898#[doc = "                }"]
9899#[doc = "              ]"]
9900#[doc = "            }"]
9901#[doc = "          }"]
9902#[doc = "        }"]
9903#[doc = "      },"]
9904#[doc = "      \"additionalProperties\": false"]
9905#[doc = "    },"]
9906#[doc = "    {"]
9907#[doc = "      \"description\": \"An integer overflow occurred during transaction cost estimation.\","]
9908#[doc = "      \"type\": \"string\","]
9909#[doc = "      \"enum\": ["]
9910#[doc = "        \"CostOverflow\""]
9911#[doc = "      ]"]
9912#[doc = "    },"]
9913#[doc = "    {"]
9914#[doc = "      \"description\": \"Transaction parent block hash doesn't belong to the current chain\","]
9915#[doc = "      \"type\": \"string\","]
9916#[doc = "      \"enum\": ["]
9917#[doc = "        \"InvalidChain\""]
9918#[doc = "      ]"]
9919#[doc = "    },"]
9920#[doc = "    {"]
9921#[doc = "      \"description\": \"Transaction has expired\","]
9922#[doc = "      \"type\": \"string\","]
9923#[doc = "      \"enum\": ["]
9924#[doc = "        \"Expired\""]
9925#[doc = "      ]"]
9926#[doc = "    },"]
9927#[doc = "    {"]
9928#[doc = "      \"description\": \"An error occurred while validating actions of a Transaction.\","]
9929#[doc = "      \"type\": \"object\","]
9930#[doc = "      \"required\": ["]
9931#[doc = "        \"ActionsValidation\""]
9932#[doc = "      ],"]
9933#[doc = "      \"properties\": {"]
9934#[doc = "        \"ActionsValidation\": {"]
9935#[doc = "          \"$ref\": \"#/components/schemas/ActionsValidationError\""]
9936#[doc = "        }"]
9937#[doc = "      },"]
9938#[doc = "      \"additionalProperties\": false"]
9939#[doc = "    },"]
9940#[doc = "    {"]
9941#[doc = "      \"description\": \"The size of serialized transaction exceeded the limit.\","]
9942#[doc = "      \"type\": \"object\","]
9943#[doc = "      \"required\": ["]
9944#[doc = "        \"TransactionSizeExceeded\""]
9945#[doc = "      ],"]
9946#[doc = "      \"properties\": {"]
9947#[doc = "        \"TransactionSizeExceeded\": {"]
9948#[doc = "          \"type\": \"object\","]
9949#[doc = "          \"required\": ["]
9950#[doc = "            \"limit\","]
9951#[doc = "            \"size\""]
9952#[doc = "          ],"]
9953#[doc = "          \"properties\": {"]
9954#[doc = "            \"limit\": {"]
9955#[doc = "              \"type\": \"integer\","]
9956#[doc = "              \"format\": \"uint64\","]
9957#[doc = "              \"minimum\": 0.0"]
9958#[doc = "            },"]
9959#[doc = "            \"size\": {"]
9960#[doc = "              \"type\": \"integer\","]
9961#[doc = "              \"format\": \"uint64\","]
9962#[doc = "              \"minimum\": 0.0"]
9963#[doc = "            }"]
9964#[doc = "          }"]
9965#[doc = "        }"]
9966#[doc = "      },"]
9967#[doc = "      \"additionalProperties\": false"]
9968#[doc = "    },"]
9969#[doc = "    {"]
9970#[doc = "      \"description\": \"Transaction version is invalid.\","]
9971#[doc = "      \"type\": \"string\","]
9972#[doc = "      \"enum\": ["]
9973#[doc = "        \"InvalidTransactionVersion\""]
9974#[doc = "      ]"]
9975#[doc = "    },"]
9976#[doc = "    {"]
9977#[doc = "      \"type\": \"object\","]
9978#[doc = "      \"required\": ["]
9979#[doc = "        \"StorageError\""]
9980#[doc = "      ],"]
9981#[doc = "      \"properties\": {"]
9982#[doc = "        \"StorageError\": {"]
9983#[doc = "          \"$ref\": \"#/components/schemas/StorageError\""]
9984#[doc = "        }"]
9985#[doc = "      },"]
9986#[doc = "      \"additionalProperties\": false"]
9987#[doc = "    },"]
9988#[doc = "    {"]
9989#[doc = "      \"description\": \"The receiver shard of the transaction is too congested to accept new\\ntransactions at the moment.\","]
9990#[doc = "      \"type\": \"object\","]
9991#[doc = "      \"required\": ["]
9992#[doc = "        \"ShardCongested\""]
9993#[doc = "      ],"]
9994#[doc = "      \"properties\": {"]
9995#[doc = "        \"ShardCongested\": {"]
9996#[doc = "          \"type\": \"object\","]
9997#[doc = "          \"required\": ["]
9998#[doc = "            \"congestion_level\","]
9999#[doc = "            \"shard_id\""]
10000#[doc = "          ],"]
10001#[doc = "          \"properties\": {"]
10002#[doc = "            \"congestion_level\": {"]
10003#[doc = "              \"description\": \"A value between 0 (no congestion) and 1 (max congestion).\","]
10004#[doc = "              \"type\": \"number\","]
10005#[doc = "              \"format\": \"double\""]
10006#[doc = "            },"]
10007#[doc = "            \"shard_id\": {"]
10008#[doc = "              \"description\": \"The congested shard.\","]
10009#[doc = "              \"type\": \"integer\","]
10010#[doc = "              \"format\": \"uint32\","]
10011#[doc = "              \"minimum\": 0.0"]
10012#[doc = "            }"]
10013#[doc = "          }"]
10014#[doc = "        }"]
10015#[doc = "      },"]
10016#[doc = "      \"additionalProperties\": false"]
10017#[doc = "    },"]
10018#[doc = "    {"]
10019#[doc = "      \"description\": \"The receiver shard of the transaction missed several chunks and rejects\\nnew transaction until it can make progress again.\","]
10020#[doc = "      \"type\": \"object\","]
10021#[doc = "      \"required\": ["]
10022#[doc = "        \"ShardStuck\""]
10023#[doc = "      ],"]
10024#[doc = "      \"properties\": {"]
10025#[doc = "        \"ShardStuck\": {"]
10026#[doc = "          \"type\": \"object\","]
10027#[doc = "          \"required\": ["]
10028#[doc = "            \"missed_chunks\","]
10029#[doc = "            \"shard_id\""]
10030#[doc = "          ],"]
10031#[doc = "          \"properties\": {"]
10032#[doc = "            \"missed_chunks\": {"]
10033#[doc = "              \"description\": \"The number of blocks since the last included chunk of the shard.\","]
10034#[doc = "              \"type\": \"integer\","]
10035#[doc = "              \"format\": \"uint64\","]
10036#[doc = "              \"minimum\": 0.0"]
10037#[doc = "            },"]
10038#[doc = "            \"shard_id\": {"]
10039#[doc = "              \"description\": \"The shard that fails making progress.\","]
10040#[doc = "              \"type\": \"integer\","]
10041#[doc = "              \"format\": \"uint32\","]
10042#[doc = "              \"minimum\": 0.0"]
10043#[doc = "            }"]
10044#[doc = "          }"]
10045#[doc = "        }"]
10046#[doc = "      },"]
10047#[doc = "      \"additionalProperties\": false"]
10048#[doc = "    }"]
10049#[doc = "  ]"]
10050#[doc = "}"]
10051#[doc = r" ```"]
10052#[doc = r" </details>"]
10053#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
10054pub enum InvalidTxError {
10055    #[doc = "Happens if a wrong AccessKey used or AccessKey has not enough permissions"]
10056    InvalidAccessKeyError(InvalidAccessKeyError),
10057    #[doc = "TX signer_id is not a valid [`AccountId`]"]
10058    InvalidSignerId {
10059        signer_id: ::std::string::String,
10060    },
10061    #[doc = "TX signer_id is not found in a storage"]
10062    SignerDoesNotExist {
10063        signer_id: AccountId,
10064    },
10065    #[doc = "Transaction nonce must be strictly greater than `account[access_key].nonce`."]
10066    InvalidNonce {
10067        ak_nonce: u64,
10068        tx_nonce: u64,
10069    },
10070    #[doc = "Transaction nonce is larger than the upper bound given by the block height"]
10071    NonceTooLarge {
10072        tx_nonce: u64,
10073        upper_bound: u64,
10074    },
10075    #[doc = "TX receiver_id is not a valid AccountId"]
10076    InvalidReceiverId {
10077        receiver_id: ::std::string::String,
10078    },
10079    #[doc = "TX signature is not valid"]
10080    InvalidSignature,
10081    #[doc = "Account does not have enough balance to cover TX cost"]
10082    NotEnoughBalance {
10083        balance: NearToken,
10084        cost: NearToken,
10085        signer_id: AccountId,
10086    },
10087    #[doc = "Signer account doesn't have enough balance after transaction."]
10088    LackBalanceForState {
10089        #[doc = "Required balance to cover the state."]
10090        amount: NearToken,
10091        #[doc = "An account which doesn't have enough balance to cover storage."]
10092        signer_id: AccountId,
10093    },
10094    #[doc = "An integer overflow occurred during transaction cost estimation."]
10095    CostOverflow,
10096    #[doc = "Transaction parent block hash doesn't belong to the current chain"]
10097    InvalidChain,
10098    #[doc = "Transaction has expired"]
10099    Expired,
10100    #[doc = "An error occurred while validating actions of a Transaction."]
10101    ActionsValidation(ActionsValidationError),
10102    #[doc = "The size of serialized transaction exceeded the limit."]
10103    TransactionSizeExceeded {
10104        limit: u64,
10105        size: u64,
10106    },
10107    #[doc = "Transaction version is invalid."]
10108    InvalidTransactionVersion,
10109    StorageError(StorageError),
10110    #[doc = "The receiver shard of the transaction is too congested to accept new\ntransactions at the moment."]
10111    ShardCongested {
10112        congestion_level: f64,
10113        #[doc = "The congested shard."]
10114        shard_id: u32,
10115    },
10116    #[doc = "The receiver shard of the transaction missed several chunks and rejects\nnew transaction until it can make progress again."]
10117    ShardStuck {
10118        #[doc = "The number of blocks since the last included chunk of the shard."]
10119        missed_chunks: u64,
10120        #[doc = "The shard that fails making progress."]
10121        shard_id: u32,
10122    },
10123}
10124impl ::std::convert::From<&Self> for InvalidTxError {
10125    fn from(value: &InvalidTxError) -> Self {
10126        value.clone()
10127    }
10128}
10129impl ::std::convert::From<InvalidAccessKeyError> for InvalidTxError {
10130    fn from(value: InvalidAccessKeyError) -> Self {
10131        Self::InvalidAccessKeyError(value)
10132    }
10133}
10134impl ::std::convert::From<ActionsValidationError> for InvalidTxError {
10135    fn from(value: ActionsValidationError) -> Self {
10136        Self::ActionsValidation(value)
10137    }
10138}
10139impl ::std::convert::From<StorageError> for InvalidTxError {
10140    fn from(value: StorageError) -> Self {
10141        Self::StorageError(value)
10142    }
10143}
10144#[doc = "`JsonRpcRequestForBlock`"]
10145#[doc = r""]
10146#[doc = r" <details><summary>JSON schema</summary>"]
10147#[doc = r""]
10148#[doc = r" ```json"]
10149#[doc = "{"]
10150#[doc = "  \"title\": \"JsonRpcRequest_for_block\","]
10151#[doc = "  \"type\": \"object\","]
10152#[doc = "  \"required\": ["]
10153#[doc = "    \"id\","]
10154#[doc = "    \"jsonrpc\","]
10155#[doc = "    \"method\","]
10156#[doc = "    \"params\""]
10157#[doc = "  ],"]
10158#[doc = "  \"properties\": {"]
10159#[doc = "    \"id\": {"]
10160#[doc = "      \"type\": \"string\""]
10161#[doc = "    },"]
10162#[doc = "    \"jsonrpc\": {"]
10163#[doc = "      \"type\": \"string\""]
10164#[doc = "    },"]
10165#[doc = "    \"method\": {"]
10166#[doc = "      \"type\": \"string\","]
10167#[doc = "      \"enum\": ["]
10168#[doc = "        \"block\""]
10169#[doc = "      ]"]
10170#[doc = "    },"]
10171#[doc = "    \"params\": {"]
10172#[doc = "      \"$ref\": \"#/components/schemas/RpcBlockRequest\""]
10173#[doc = "    }"]
10174#[doc = "  }"]
10175#[doc = "}"]
10176#[doc = r" ```"]
10177#[doc = r" </details>"]
10178#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
10179pub struct JsonRpcRequestForBlock {
10180    pub id: ::std::string::String,
10181    pub jsonrpc: ::std::string::String,
10182    pub method: JsonRpcRequestForBlockMethod,
10183    pub params: RpcBlockRequest,
10184}
10185impl ::std::convert::From<&JsonRpcRequestForBlock> for JsonRpcRequestForBlock {
10186    fn from(value: &JsonRpcRequestForBlock) -> Self {
10187        value.clone()
10188    }
10189}
10190#[doc = "`JsonRpcRequestForBlockEffects`"]
10191#[doc = r""]
10192#[doc = r" <details><summary>JSON schema</summary>"]
10193#[doc = r""]
10194#[doc = r" ```json"]
10195#[doc = "{"]
10196#[doc = "  \"title\": \"JsonRpcRequest_for_block_effects\","]
10197#[doc = "  \"type\": \"object\","]
10198#[doc = "  \"required\": ["]
10199#[doc = "    \"id\","]
10200#[doc = "    \"jsonrpc\","]
10201#[doc = "    \"method\","]
10202#[doc = "    \"params\""]
10203#[doc = "  ],"]
10204#[doc = "  \"properties\": {"]
10205#[doc = "    \"id\": {"]
10206#[doc = "      \"type\": \"string\""]
10207#[doc = "    },"]
10208#[doc = "    \"jsonrpc\": {"]
10209#[doc = "      \"type\": \"string\""]
10210#[doc = "    },"]
10211#[doc = "    \"method\": {"]
10212#[doc = "      \"type\": \"string\","]
10213#[doc = "      \"enum\": ["]
10214#[doc = "        \"block_effects\""]
10215#[doc = "      ]"]
10216#[doc = "    },"]
10217#[doc = "    \"params\": {"]
10218#[doc = "      \"$ref\": \"#/components/schemas/RpcStateChangesInBlockRequest\""]
10219#[doc = "    }"]
10220#[doc = "  }"]
10221#[doc = "}"]
10222#[doc = r" ```"]
10223#[doc = r" </details>"]
10224#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
10225pub struct JsonRpcRequestForBlockEffects {
10226    pub id: ::std::string::String,
10227    pub jsonrpc: ::std::string::String,
10228    pub method: JsonRpcRequestForBlockEffectsMethod,
10229    pub params: RpcStateChangesInBlockRequest,
10230}
10231impl ::std::convert::From<&JsonRpcRequestForBlockEffects> for JsonRpcRequestForBlockEffects {
10232    fn from(value: &JsonRpcRequestForBlockEffects) -> Self {
10233        value.clone()
10234    }
10235}
10236#[doc = "`JsonRpcRequestForBlockEffectsMethod`"]
10237#[doc = r""]
10238#[doc = r" <details><summary>JSON schema</summary>"]
10239#[doc = r""]
10240#[doc = r" ```json"]
10241#[doc = "{"]
10242#[doc = "  \"type\": \"string\","]
10243#[doc = "  \"enum\": ["]
10244#[doc = "    \"block_effects\""]
10245#[doc = "  ]"]
10246#[doc = "}"]
10247#[doc = r" ```"]
10248#[doc = r" </details>"]
10249#[derive(
10250    :: serde :: Deserialize,
10251    :: serde :: Serialize,
10252    Clone,
10253    Copy,
10254    Debug,
10255    Eq,
10256    Hash,
10257    Ord,
10258    PartialEq,
10259    PartialOrd,
10260)]
10261pub enum JsonRpcRequestForBlockEffectsMethod {
10262    #[serde(rename = "block_effects")]
10263    BlockEffects,
10264}
10265impl ::std::convert::From<&Self> for JsonRpcRequestForBlockEffectsMethod {
10266    fn from(value: &JsonRpcRequestForBlockEffectsMethod) -> Self {
10267        value.clone()
10268    }
10269}
10270impl ::std::fmt::Display for JsonRpcRequestForBlockEffectsMethod {
10271    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
10272        match *self {
10273            Self::BlockEffects => f.write_str("block_effects"),
10274        }
10275    }
10276}
10277impl ::std::str::FromStr for JsonRpcRequestForBlockEffectsMethod {
10278    type Err = self::error::ConversionError;
10279    fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
10280        match value {
10281            "block_effects" => Ok(Self::BlockEffects),
10282            _ => Err("invalid value".into()),
10283        }
10284    }
10285}
10286impl ::std::convert::TryFrom<&str> for JsonRpcRequestForBlockEffectsMethod {
10287    type Error = self::error::ConversionError;
10288    fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
10289        value.parse()
10290    }
10291}
10292impl ::std::convert::TryFrom<&::std::string::String> for JsonRpcRequestForBlockEffectsMethod {
10293    type Error = self::error::ConversionError;
10294    fn try_from(
10295        value: &::std::string::String,
10296    ) -> ::std::result::Result<Self, self::error::ConversionError> {
10297        value.parse()
10298    }
10299}
10300impl ::std::convert::TryFrom<::std::string::String> for JsonRpcRequestForBlockEffectsMethod {
10301    type Error = self::error::ConversionError;
10302    fn try_from(
10303        value: ::std::string::String,
10304    ) -> ::std::result::Result<Self, self::error::ConversionError> {
10305        value.parse()
10306    }
10307}
10308#[doc = "`JsonRpcRequestForBlockMethod`"]
10309#[doc = r""]
10310#[doc = r" <details><summary>JSON schema</summary>"]
10311#[doc = r""]
10312#[doc = r" ```json"]
10313#[doc = "{"]
10314#[doc = "  \"type\": \"string\","]
10315#[doc = "  \"enum\": ["]
10316#[doc = "    \"block\""]
10317#[doc = "  ]"]
10318#[doc = "}"]
10319#[doc = r" ```"]
10320#[doc = r" </details>"]
10321#[derive(
10322    :: serde :: Deserialize,
10323    :: serde :: Serialize,
10324    Clone,
10325    Copy,
10326    Debug,
10327    Eq,
10328    Hash,
10329    Ord,
10330    PartialEq,
10331    PartialOrd,
10332)]
10333pub enum JsonRpcRequestForBlockMethod {
10334    #[serde(rename = "block")]
10335    Block,
10336}
10337impl ::std::convert::From<&Self> for JsonRpcRequestForBlockMethod {
10338    fn from(value: &JsonRpcRequestForBlockMethod) -> Self {
10339        value.clone()
10340    }
10341}
10342impl ::std::fmt::Display for JsonRpcRequestForBlockMethod {
10343    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
10344        match *self {
10345            Self::Block => f.write_str("block"),
10346        }
10347    }
10348}
10349impl ::std::str::FromStr for JsonRpcRequestForBlockMethod {
10350    type Err = self::error::ConversionError;
10351    fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
10352        match value {
10353            "block" => Ok(Self::Block),
10354            _ => Err("invalid value".into()),
10355        }
10356    }
10357}
10358impl ::std::convert::TryFrom<&str> for JsonRpcRequestForBlockMethod {
10359    type Error = self::error::ConversionError;
10360    fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
10361        value.parse()
10362    }
10363}
10364impl ::std::convert::TryFrom<&::std::string::String> for JsonRpcRequestForBlockMethod {
10365    type Error = self::error::ConversionError;
10366    fn try_from(
10367        value: &::std::string::String,
10368    ) -> ::std::result::Result<Self, self::error::ConversionError> {
10369        value.parse()
10370    }
10371}
10372impl ::std::convert::TryFrom<::std::string::String> for JsonRpcRequestForBlockMethod {
10373    type Error = self::error::ConversionError;
10374    fn try_from(
10375        value: ::std::string::String,
10376    ) -> ::std::result::Result<Self, self::error::ConversionError> {
10377        value.parse()
10378    }
10379}
10380#[doc = "`JsonRpcRequestForBroadcastTxAsync`"]
10381#[doc = r""]
10382#[doc = r" <details><summary>JSON schema</summary>"]
10383#[doc = r""]
10384#[doc = r" ```json"]
10385#[doc = "{"]
10386#[doc = "  \"title\": \"JsonRpcRequest_for_broadcast_tx_async\","]
10387#[doc = "  \"type\": \"object\","]
10388#[doc = "  \"required\": ["]
10389#[doc = "    \"id\","]
10390#[doc = "    \"jsonrpc\","]
10391#[doc = "    \"method\","]
10392#[doc = "    \"params\""]
10393#[doc = "  ],"]
10394#[doc = "  \"properties\": {"]
10395#[doc = "    \"id\": {"]
10396#[doc = "      \"type\": \"string\""]
10397#[doc = "    },"]
10398#[doc = "    \"jsonrpc\": {"]
10399#[doc = "      \"type\": \"string\""]
10400#[doc = "    },"]
10401#[doc = "    \"method\": {"]
10402#[doc = "      \"type\": \"string\","]
10403#[doc = "      \"enum\": ["]
10404#[doc = "        \"broadcast_tx_async\""]
10405#[doc = "      ]"]
10406#[doc = "    },"]
10407#[doc = "    \"params\": {"]
10408#[doc = "      \"$ref\": \"#/components/schemas/RpcSendTransactionRequest\""]
10409#[doc = "    }"]
10410#[doc = "  }"]
10411#[doc = "}"]
10412#[doc = r" ```"]
10413#[doc = r" </details>"]
10414#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
10415pub struct JsonRpcRequestForBroadcastTxAsync {
10416    pub id: ::std::string::String,
10417    pub jsonrpc: ::std::string::String,
10418    pub method: JsonRpcRequestForBroadcastTxAsyncMethod,
10419    pub params: RpcSendTransactionRequest,
10420}
10421impl ::std::convert::From<&JsonRpcRequestForBroadcastTxAsync>
10422    for JsonRpcRequestForBroadcastTxAsync
10423{
10424    fn from(value: &JsonRpcRequestForBroadcastTxAsync) -> Self {
10425        value.clone()
10426    }
10427}
10428#[doc = "`JsonRpcRequestForBroadcastTxAsyncMethod`"]
10429#[doc = r""]
10430#[doc = r" <details><summary>JSON schema</summary>"]
10431#[doc = r""]
10432#[doc = r" ```json"]
10433#[doc = "{"]
10434#[doc = "  \"type\": \"string\","]
10435#[doc = "  \"enum\": ["]
10436#[doc = "    \"broadcast_tx_async\""]
10437#[doc = "  ]"]
10438#[doc = "}"]
10439#[doc = r" ```"]
10440#[doc = r" </details>"]
10441#[derive(
10442    :: serde :: Deserialize,
10443    :: serde :: Serialize,
10444    Clone,
10445    Copy,
10446    Debug,
10447    Eq,
10448    Hash,
10449    Ord,
10450    PartialEq,
10451    PartialOrd,
10452)]
10453pub enum JsonRpcRequestForBroadcastTxAsyncMethod {
10454    #[serde(rename = "broadcast_tx_async")]
10455    BroadcastTxAsync,
10456}
10457impl ::std::convert::From<&Self> for JsonRpcRequestForBroadcastTxAsyncMethod {
10458    fn from(value: &JsonRpcRequestForBroadcastTxAsyncMethod) -> Self {
10459        value.clone()
10460    }
10461}
10462impl ::std::fmt::Display for JsonRpcRequestForBroadcastTxAsyncMethod {
10463    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
10464        match *self {
10465            Self::BroadcastTxAsync => f.write_str("broadcast_tx_async"),
10466        }
10467    }
10468}
10469impl ::std::str::FromStr for JsonRpcRequestForBroadcastTxAsyncMethod {
10470    type Err = self::error::ConversionError;
10471    fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
10472        match value {
10473            "broadcast_tx_async" => Ok(Self::BroadcastTxAsync),
10474            _ => Err("invalid value".into()),
10475        }
10476    }
10477}
10478impl ::std::convert::TryFrom<&str> for JsonRpcRequestForBroadcastTxAsyncMethod {
10479    type Error = self::error::ConversionError;
10480    fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
10481        value.parse()
10482    }
10483}
10484impl ::std::convert::TryFrom<&::std::string::String> for JsonRpcRequestForBroadcastTxAsyncMethod {
10485    type Error = self::error::ConversionError;
10486    fn try_from(
10487        value: &::std::string::String,
10488    ) -> ::std::result::Result<Self, self::error::ConversionError> {
10489        value.parse()
10490    }
10491}
10492impl ::std::convert::TryFrom<::std::string::String> for JsonRpcRequestForBroadcastTxAsyncMethod {
10493    type Error = self::error::ConversionError;
10494    fn try_from(
10495        value: ::std::string::String,
10496    ) -> ::std::result::Result<Self, self::error::ConversionError> {
10497        value.parse()
10498    }
10499}
10500#[doc = "`JsonRpcRequestForBroadcastTxCommit`"]
10501#[doc = r""]
10502#[doc = r" <details><summary>JSON schema</summary>"]
10503#[doc = r""]
10504#[doc = r" ```json"]
10505#[doc = "{"]
10506#[doc = "  \"title\": \"JsonRpcRequest_for_broadcast_tx_commit\","]
10507#[doc = "  \"type\": \"object\","]
10508#[doc = "  \"required\": ["]
10509#[doc = "    \"id\","]
10510#[doc = "    \"jsonrpc\","]
10511#[doc = "    \"method\","]
10512#[doc = "    \"params\""]
10513#[doc = "  ],"]
10514#[doc = "  \"properties\": {"]
10515#[doc = "    \"id\": {"]
10516#[doc = "      \"type\": \"string\""]
10517#[doc = "    },"]
10518#[doc = "    \"jsonrpc\": {"]
10519#[doc = "      \"type\": \"string\""]
10520#[doc = "    },"]
10521#[doc = "    \"method\": {"]
10522#[doc = "      \"type\": \"string\","]
10523#[doc = "      \"enum\": ["]
10524#[doc = "        \"broadcast_tx_commit\""]
10525#[doc = "      ]"]
10526#[doc = "    },"]
10527#[doc = "    \"params\": {"]
10528#[doc = "      \"$ref\": \"#/components/schemas/RpcSendTransactionRequest\""]
10529#[doc = "    }"]
10530#[doc = "  }"]
10531#[doc = "}"]
10532#[doc = r" ```"]
10533#[doc = r" </details>"]
10534#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
10535pub struct JsonRpcRequestForBroadcastTxCommit {
10536    pub id: ::std::string::String,
10537    pub jsonrpc: ::std::string::String,
10538    pub method: JsonRpcRequestForBroadcastTxCommitMethod,
10539    pub params: RpcSendTransactionRequest,
10540}
10541impl ::std::convert::From<&JsonRpcRequestForBroadcastTxCommit>
10542    for JsonRpcRequestForBroadcastTxCommit
10543{
10544    fn from(value: &JsonRpcRequestForBroadcastTxCommit) -> Self {
10545        value.clone()
10546    }
10547}
10548#[doc = "`JsonRpcRequestForBroadcastTxCommitMethod`"]
10549#[doc = r""]
10550#[doc = r" <details><summary>JSON schema</summary>"]
10551#[doc = r""]
10552#[doc = r" ```json"]
10553#[doc = "{"]
10554#[doc = "  \"type\": \"string\","]
10555#[doc = "  \"enum\": ["]
10556#[doc = "    \"broadcast_tx_commit\""]
10557#[doc = "  ]"]
10558#[doc = "}"]
10559#[doc = r" ```"]
10560#[doc = r" </details>"]
10561#[derive(
10562    :: serde :: Deserialize,
10563    :: serde :: Serialize,
10564    Clone,
10565    Copy,
10566    Debug,
10567    Eq,
10568    Hash,
10569    Ord,
10570    PartialEq,
10571    PartialOrd,
10572)]
10573pub enum JsonRpcRequestForBroadcastTxCommitMethod {
10574    #[serde(rename = "broadcast_tx_commit")]
10575    BroadcastTxCommit,
10576}
10577impl ::std::convert::From<&Self> for JsonRpcRequestForBroadcastTxCommitMethod {
10578    fn from(value: &JsonRpcRequestForBroadcastTxCommitMethod) -> Self {
10579        value.clone()
10580    }
10581}
10582impl ::std::fmt::Display for JsonRpcRequestForBroadcastTxCommitMethod {
10583    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
10584        match *self {
10585            Self::BroadcastTxCommit => f.write_str("broadcast_tx_commit"),
10586        }
10587    }
10588}
10589impl ::std::str::FromStr for JsonRpcRequestForBroadcastTxCommitMethod {
10590    type Err = self::error::ConversionError;
10591    fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
10592        match value {
10593            "broadcast_tx_commit" => Ok(Self::BroadcastTxCommit),
10594            _ => Err("invalid value".into()),
10595        }
10596    }
10597}
10598impl ::std::convert::TryFrom<&str> for JsonRpcRequestForBroadcastTxCommitMethod {
10599    type Error = self::error::ConversionError;
10600    fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
10601        value.parse()
10602    }
10603}
10604impl ::std::convert::TryFrom<&::std::string::String> for JsonRpcRequestForBroadcastTxCommitMethod {
10605    type Error = self::error::ConversionError;
10606    fn try_from(
10607        value: &::std::string::String,
10608    ) -> ::std::result::Result<Self, self::error::ConversionError> {
10609        value.parse()
10610    }
10611}
10612impl ::std::convert::TryFrom<::std::string::String> for JsonRpcRequestForBroadcastTxCommitMethod {
10613    type Error = self::error::ConversionError;
10614    fn try_from(
10615        value: ::std::string::String,
10616    ) -> ::std::result::Result<Self, self::error::ConversionError> {
10617        value.parse()
10618    }
10619}
10620#[doc = "`JsonRpcRequestForChanges`"]
10621#[doc = r""]
10622#[doc = r" <details><summary>JSON schema</summary>"]
10623#[doc = r""]
10624#[doc = r" ```json"]
10625#[doc = "{"]
10626#[doc = "  \"title\": \"JsonRpcRequest_for_changes\","]
10627#[doc = "  \"type\": \"object\","]
10628#[doc = "  \"required\": ["]
10629#[doc = "    \"id\","]
10630#[doc = "    \"jsonrpc\","]
10631#[doc = "    \"method\","]
10632#[doc = "    \"params\""]
10633#[doc = "  ],"]
10634#[doc = "  \"properties\": {"]
10635#[doc = "    \"id\": {"]
10636#[doc = "      \"type\": \"string\""]
10637#[doc = "    },"]
10638#[doc = "    \"jsonrpc\": {"]
10639#[doc = "      \"type\": \"string\""]
10640#[doc = "    },"]
10641#[doc = "    \"method\": {"]
10642#[doc = "      \"type\": \"string\","]
10643#[doc = "      \"enum\": ["]
10644#[doc = "        \"changes\""]
10645#[doc = "      ]"]
10646#[doc = "    },"]
10647#[doc = "    \"params\": {"]
10648#[doc = "      \"$ref\": \"#/components/schemas/RpcStateChangesInBlockByTypeRequest\""]
10649#[doc = "    }"]
10650#[doc = "  }"]
10651#[doc = "}"]
10652#[doc = r" ```"]
10653#[doc = r" </details>"]
10654#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
10655pub struct JsonRpcRequestForChanges {
10656    pub id: ::std::string::String,
10657    pub jsonrpc: ::std::string::String,
10658    pub method: JsonRpcRequestForChangesMethod,
10659    pub params: RpcStateChangesInBlockByTypeRequest,
10660}
10661impl ::std::convert::From<&JsonRpcRequestForChanges> for JsonRpcRequestForChanges {
10662    fn from(value: &JsonRpcRequestForChanges) -> Self {
10663        value.clone()
10664    }
10665}
10666#[doc = "`JsonRpcRequestForChangesMethod`"]
10667#[doc = r""]
10668#[doc = r" <details><summary>JSON schema</summary>"]
10669#[doc = r""]
10670#[doc = r" ```json"]
10671#[doc = "{"]
10672#[doc = "  \"type\": \"string\","]
10673#[doc = "  \"enum\": ["]
10674#[doc = "    \"changes\""]
10675#[doc = "  ]"]
10676#[doc = "}"]
10677#[doc = r" ```"]
10678#[doc = r" </details>"]
10679#[derive(
10680    :: serde :: Deserialize,
10681    :: serde :: Serialize,
10682    Clone,
10683    Copy,
10684    Debug,
10685    Eq,
10686    Hash,
10687    Ord,
10688    PartialEq,
10689    PartialOrd,
10690)]
10691pub enum JsonRpcRequestForChangesMethod {
10692    #[serde(rename = "changes")]
10693    Changes,
10694}
10695impl ::std::convert::From<&Self> for JsonRpcRequestForChangesMethod {
10696    fn from(value: &JsonRpcRequestForChangesMethod) -> Self {
10697        value.clone()
10698    }
10699}
10700impl ::std::fmt::Display for JsonRpcRequestForChangesMethod {
10701    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
10702        match *self {
10703            Self::Changes => f.write_str("changes"),
10704        }
10705    }
10706}
10707impl ::std::str::FromStr for JsonRpcRequestForChangesMethod {
10708    type Err = self::error::ConversionError;
10709    fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
10710        match value {
10711            "changes" => Ok(Self::Changes),
10712            _ => Err("invalid value".into()),
10713        }
10714    }
10715}
10716impl ::std::convert::TryFrom<&str> for JsonRpcRequestForChangesMethod {
10717    type Error = self::error::ConversionError;
10718    fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
10719        value.parse()
10720    }
10721}
10722impl ::std::convert::TryFrom<&::std::string::String> for JsonRpcRequestForChangesMethod {
10723    type Error = self::error::ConversionError;
10724    fn try_from(
10725        value: &::std::string::String,
10726    ) -> ::std::result::Result<Self, self::error::ConversionError> {
10727        value.parse()
10728    }
10729}
10730impl ::std::convert::TryFrom<::std::string::String> for JsonRpcRequestForChangesMethod {
10731    type Error = self::error::ConversionError;
10732    fn try_from(
10733        value: ::std::string::String,
10734    ) -> ::std::result::Result<Self, self::error::ConversionError> {
10735        value.parse()
10736    }
10737}
10738#[doc = "`JsonRpcRequestForChunk`"]
10739#[doc = r""]
10740#[doc = r" <details><summary>JSON schema</summary>"]
10741#[doc = r""]
10742#[doc = r" ```json"]
10743#[doc = "{"]
10744#[doc = "  \"title\": \"JsonRpcRequest_for_chunk\","]
10745#[doc = "  \"type\": \"object\","]
10746#[doc = "  \"required\": ["]
10747#[doc = "    \"id\","]
10748#[doc = "    \"jsonrpc\","]
10749#[doc = "    \"method\","]
10750#[doc = "    \"params\""]
10751#[doc = "  ],"]
10752#[doc = "  \"properties\": {"]
10753#[doc = "    \"id\": {"]
10754#[doc = "      \"type\": \"string\""]
10755#[doc = "    },"]
10756#[doc = "    \"jsonrpc\": {"]
10757#[doc = "      \"type\": \"string\""]
10758#[doc = "    },"]
10759#[doc = "    \"method\": {"]
10760#[doc = "      \"type\": \"string\","]
10761#[doc = "      \"enum\": ["]
10762#[doc = "        \"chunk\""]
10763#[doc = "      ]"]
10764#[doc = "    },"]
10765#[doc = "    \"params\": {"]
10766#[doc = "      \"$ref\": \"#/components/schemas/RpcChunkRequest\""]
10767#[doc = "    }"]
10768#[doc = "  }"]
10769#[doc = "}"]
10770#[doc = r" ```"]
10771#[doc = r" </details>"]
10772#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
10773pub struct JsonRpcRequestForChunk {
10774    pub id: ::std::string::String,
10775    pub jsonrpc: ::std::string::String,
10776    pub method: JsonRpcRequestForChunkMethod,
10777    pub params: RpcChunkRequest,
10778}
10779impl ::std::convert::From<&JsonRpcRequestForChunk> for JsonRpcRequestForChunk {
10780    fn from(value: &JsonRpcRequestForChunk) -> Self {
10781        value.clone()
10782    }
10783}
10784#[doc = "`JsonRpcRequestForChunkMethod`"]
10785#[doc = r""]
10786#[doc = r" <details><summary>JSON schema</summary>"]
10787#[doc = r""]
10788#[doc = r" ```json"]
10789#[doc = "{"]
10790#[doc = "  \"type\": \"string\","]
10791#[doc = "  \"enum\": ["]
10792#[doc = "    \"chunk\""]
10793#[doc = "  ]"]
10794#[doc = "}"]
10795#[doc = r" ```"]
10796#[doc = r" </details>"]
10797#[derive(
10798    :: serde :: Deserialize,
10799    :: serde :: Serialize,
10800    Clone,
10801    Copy,
10802    Debug,
10803    Eq,
10804    Hash,
10805    Ord,
10806    PartialEq,
10807    PartialOrd,
10808)]
10809pub enum JsonRpcRequestForChunkMethod {
10810    #[serde(rename = "chunk")]
10811    Chunk,
10812}
10813impl ::std::convert::From<&Self> for JsonRpcRequestForChunkMethod {
10814    fn from(value: &JsonRpcRequestForChunkMethod) -> Self {
10815        value.clone()
10816    }
10817}
10818impl ::std::fmt::Display for JsonRpcRequestForChunkMethod {
10819    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
10820        match *self {
10821            Self::Chunk => f.write_str("chunk"),
10822        }
10823    }
10824}
10825impl ::std::str::FromStr for JsonRpcRequestForChunkMethod {
10826    type Err = self::error::ConversionError;
10827    fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
10828        match value {
10829            "chunk" => Ok(Self::Chunk),
10830            _ => Err("invalid value".into()),
10831        }
10832    }
10833}
10834impl ::std::convert::TryFrom<&str> for JsonRpcRequestForChunkMethod {
10835    type Error = self::error::ConversionError;
10836    fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
10837        value.parse()
10838    }
10839}
10840impl ::std::convert::TryFrom<&::std::string::String> for JsonRpcRequestForChunkMethod {
10841    type Error = self::error::ConversionError;
10842    fn try_from(
10843        value: &::std::string::String,
10844    ) -> ::std::result::Result<Self, self::error::ConversionError> {
10845        value.parse()
10846    }
10847}
10848impl ::std::convert::TryFrom<::std::string::String> for JsonRpcRequestForChunkMethod {
10849    type Error = self::error::ConversionError;
10850    fn try_from(
10851        value: ::std::string::String,
10852    ) -> ::std::result::Result<Self, self::error::ConversionError> {
10853        value.parse()
10854    }
10855}
10856#[doc = "`JsonRpcRequestForClientConfig`"]
10857#[doc = r""]
10858#[doc = r" <details><summary>JSON schema</summary>"]
10859#[doc = r""]
10860#[doc = r" ```json"]
10861#[doc = "{"]
10862#[doc = "  \"title\": \"JsonRpcRequest_for_client_config\","]
10863#[doc = "  \"type\": \"object\","]
10864#[doc = "  \"required\": ["]
10865#[doc = "    \"id\","]
10866#[doc = "    \"jsonrpc\","]
10867#[doc = "    \"method\","]
10868#[doc = "    \"params\""]
10869#[doc = "  ],"]
10870#[doc = "  \"properties\": {"]
10871#[doc = "    \"id\": {"]
10872#[doc = "      \"type\": \"string\""]
10873#[doc = "    },"]
10874#[doc = "    \"jsonrpc\": {"]
10875#[doc = "      \"type\": \"string\""]
10876#[doc = "    },"]
10877#[doc = "    \"method\": {"]
10878#[doc = "      \"type\": \"string\","]
10879#[doc = "      \"enum\": ["]
10880#[doc = "        \"client_config\""]
10881#[doc = "      ]"]
10882#[doc = "    },"]
10883#[doc = "    \"params\": {"]
10884#[doc = "      \"$ref\": \"#/components/schemas/RpcClientConfigRequest\""]
10885#[doc = "    }"]
10886#[doc = "  }"]
10887#[doc = "}"]
10888#[doc = r" ```"]
10889#[doc = r" </details>"]
10890#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
10891pub struct JsonRpcRequestForClientConfig {
10892    pub id: ::std::string::String,
10893    pub jsonrpc: ::std::string::String,
10894    pub method: JsonRpcRequestForClientConfigMethod,
10895    pub params: RpcClientConfigRequest,
10896}
10897impl ::std::convert::From<&JsonRpcRequestForClientConfig> for JsonRpcRequestForClientConfig {
10898    fn from(value: &JsonRpcRequestForClientConfig) -> Self {
10899        value.clone()
10900    }
10901}
10902#[doc = "`JsonRpcRequestForClientConfigMethod`"]
10903#[doc = r""]
10904#[doc = r" <details><summary>JSON schema</summary>"]
10905#[doc = r""]
10906#[doc = r" ```json"]
10907#[doc = "{"]
10908#[doc = "  \"type\": \"string\","]
10909#[doc = "  \"enum\": ["]
10910#[doc = "    \"client_config\""]
10911#[doc = "  ]"]
10912#[doc = "}"]
10913#[doc = r" ```"]
10914#[doc = r" </details>"]
10915#[derive(
10916    :: serde :: Deserialize,
10917    :: serde :: Serialize,
10918    Clone,
10919    Copy,
10920    Debug,
10921    Eq,
10922    Hash,
10923    Ord,
10924    PartialEq,
10925    PartialOrd,
10926)]
10927pub enum JsonRpcRequestForClientConfigMethod {
10928    #[serde(rename = "client_config")]
10929    ClientConfig,
10930}
10931impl ::std::convert::From<&Self> for JsonRpcRequestForClientConfigMethod {
10932    fn from(value: &JsonRpcRequestForClientConfigMethod) -> Self {
10933        value.clone()
10934    }
10935}
10936impl ::std::fmt::Display for JsonRpcRequestForClientConfigMethod {
10937    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
10938        match *self {
10939            Self::ClientConfig => f.write_str("client_config"),
10940        }
10941    }
10942}
10943impl ::std::str::FromStr for JsonRpcRequestForClientConfigMethod {
10944    type Err = self::error::ConversionError;
10945    fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
10946        match value {
10947            "client_config" => Ok(Self::ClientConfig),
10948            _ => Err("invalid value".into()),
10949        }
10950    }
10951}
10952impl ::std::convert::TryFrom<&str> for JsonRpcRequestForClientConfigMethod {
10953    type Error = self::error::ConversionError;
10954    fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
10955        value.parse()
10956    }
10957}
10958impl ::std::convert::TryFrom<&::std::string::String> for JsonRpcRequestForClientConfigMethod {
10959    type Error = self::error::ConversionError;
10960    fn try_from(
10961        value: &::std::string::String,
10962    ) -> ::std::result::Result<Self, self::error::ConversionError> {
10963        value.parse()
10964    }
10965}
10966impl ::std::convert::TryFrom<::std::string::String> for JsonRpcRequestForClientConfigMethod {
10967    type Error = self::error::ConversionError;
10968    fn try_from(
10969        value: ::std::string::String,
10970    ) -> ::std::result::Result<Self, self::error::ConversionError> {
10971        value.parse()
10972    }
10973}
10974#[doc = "`JsonRpcRequestForExperimentalChanges`"]
10975#[doc = r""]
10976#[doc = r" <details><summary>JSON schema</summary>"]
10977#[doc = r""]
10978#[doc = r" ```json"]
10979#[doc = "{"]
10980#[doc = "  \"title\": \"JsonRpcRequest_for_EXPERIMENTAL_changes\","]
10981#[doc = "  \"type\": \"object\","]
10982#[doc = "  \"required\": ["]
10983#[doc = "    \"id\","]
10984#[doc = "    \"jsonrpc\","]
10985#[doc = "    \"method\","]
10986#[doc = "    \"params\""]
10987#[doc = "  ],"]
10988#[doc = "  \"properties\": {"]
10989#[doc = "    \"id\": {"]
10990#[doc = "      \"type\": \"string\""]
10991#[doc = "    },"]
10992#[doc = "    \"jsonrpc\": {"]
10993#[doc = "      \"type\": \"string\""]
10994#[doc = "    },"]
10995#[doc = "    \"method\": {"]
10996#[doc = "      \"type\": \"string\","]
10997#[doc = "      \"enum\": ["]
10998#[doc = "        \"EXPERIMENTAL_changes\""]
10999#[doc = "      ]"]
11000#[doc = "    },"]
11001#[doc = "    \"params\": {"]
11002#[doc = "      \"$ref\": \"#/components/schemas/RpcStateChangesInBlockByTypeRequest\""]
11003#[doc = "    }"]
11004#[doc = "  }"]
11005#[doc = "}"]
11006#[doc = r" ```"]
11007#[doc = r" </details>"]
11008#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
11009pub struct JsonRpcRequestForExperimentalChanges {
11010    pub id: ::std::string::String,
11011    pub jsonrpc: ::std::string::String,
11012    pub method: JsonRpcRequestForExperimentalChangesMethod,
11013    pub params: RpcStateChangesInBlockByTypeRequest,
11014}
11015impl ::std::convert::From<&JsonRpcRequestForExperimentalChanges>
11016    for JsonRpcRequestForExperimentalChanges
11017{
11018    fn from(value: &JsonRpcRequestForExperimentalChanges) -> Self {
11019        value.clone()
11020    }
11021}
11022#[doc = "`JsonRpcRequestForExperimentalChangesInBlock`"]
11023#[doc = r""]
11024#[doc = r" <details><summary>JSON schema</summary>"]
11025#[doc = r""]
11026#[doc = r" ```json"]
11027#[doc = "{"]
11028#[doc = "  \"title\": \"JsonRpcRequest_for_EXPERIMENTAL_changes_in_block\","]
11029#[doc = "  \"type\": \"object\","]
11030#[doc = "  \"required\": ["]
11031#[doc = "    \"id\","]
11032#[doc = "    \"jsonrpc\","]
11033#[doc = "    \"method\","]
11034#[doc = "    \"params\""]
11035#[doc = "  ],"]
11036#[doc = "  \"properties\": {"]
11037#[doc = "    \"id\": {"]
11038#[doc = "      \"type\": \"string\""]
11039#[doc = "    },"]
11040#[doc = "    \"jsonrpc\": {"]
11041#[doc = "      \"type\": \"string\""]
11042#[doc = "    },"]
11043#[doc = "    \"method\": {"]
11044#[doc = "      \"type\": \"string\","]
11045#[doc = "      \"enum\": ["]
11046#[doc = "        \"EXPERIMENTAL_changes_in_block\""]
11047#[doc = "      ]"]
11048#[doc = "    },"]
11049#[doc = "    \"params\": {"]
11050#[doc = "      \"$ref\": \"#/components/schemas/RpcStateChangesInBlockRequest\""]
11051#[doc = "    }"]
11052#[doc = "  }"]
11053#[doc = "}"]
11054#[doc = r" ```"]
11055#[doc = r" </details>"]
11056#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
11057pub struct JsonRpcRequestForExperimentalChangesInBlock {
11058    pub id: ::std::string::String,
11059    pub jsonrpc: ::std::string::String,
11060    pub method: JsonRpcRequestForExperimentalChangesInBlockMethod,
11061    pub params: RpcStateChangesInBlockRequest,
11062}
11063impl ::std::convert::From<&JsonRpcRequestForExperimentalChangesInBlock>
11064    for JsonRpcRequestForExperimentalChangesInBlock
11065{
11066    fn from(value: &JsonRpcRequestForExperimentalChangesInBlock) -> Self {
11067        value.clone()
11068    }
11069}
11070#[doc = "`JsonRpcRequestForExperimentalChangesInBlockMethod`"]
11071#[doc = r""]
11072#[doc = r" <details><summary>JSON schema</summary>"]
11073#[doc = r""]
11074#[doc = r" ```json"]
11075#[doc = "{"]
11076#[doc = "  \"type\": \"string\","]
11077#[doc = "  \"enum\": ["]
11078#[doc = "    \"EXPERIMENTAL_changes_in_block\""]
11079#[doc = "  ]"]
11080#[doc = "}"]
11081#[doc = r" ```"]
11082#[doc = r" </details>"]
11083#[derive(
11084    :: serde :: Deserialize,
11085    :: serde :: Serialize,
11086    Clone,
11087    Copy,
11088    Debug,
11089    Eq,
11090    Hash,
11091    Ord,
11092    PartialEq,
11093    PartialOrd,
11094)]
11095pub enum JsonRpcRequestForExperimentalChangesInBlockMethod {
11096    #[serde(rename = "EXPERIMENTAL_changes_in_block")]
11097    ExperimentalChangesInBlock,
11098}
11099impl ::std::convert::From<&Self> for JsonRpcRequestForExperimentalChangesInBlockMethod {
11100    fn from(value: &JsonRpcRequestForExperimentalChangesInBlockMethod) -> Self {
11101        value.clone()
11102    }
11103}
11104impl ::std::fmt::Display for JsonRpcRequestForExperimentalChangesInBlockMethod {
11105    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
11106        match *self {
11107            Self::ExperimentalChangesInBlock => f.write_str("EXPERIMENTAL_changes_in_block"),
11108        }
11109    }
11110}
11111impl ::std::str::FromStr for JsonRpcRequestForExperimentalChangesInBlockMethod {
11112    type Err = self::error::ConversionError;
11113    fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
11114        match value {
11115            "EXPERIMENTAL_changes_in_block" => Ok(Self::ExperimentalChangesInBlock),
11116            _ => Err("invalid value".into()),
11117        }
11118    }
11119}
11120impl ::std::convert::TryFrom<&str> for JsonRpcRequestForExperimentalChangesInBlockMethod {
11121    type Error = self::error::ConversionError;
11122    fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
11123        value.parse()
11124    }
11125}
11126impl ::std::convert::TryFrom<&::std::string::String>
11127    for JsonRpcRequestForExperimentalChangesInBlockMethod
11128{
11129    type Error = self::error::ConversionError;
11130    fn try_from(
11131        value: &::std::string::String,
11132    ) -> ::std::result::Result<Self, self::error::ConversionError> {
11133        value.parse()
11134    }
11135}
11136impl ::std::convert::TryFrom<::std::string::String>
11137    for JsonRpcRequestForExperimentalChangesInBlockMethod
11138{
11139    type Error = self::error::ConversionError;
11140    fn try_from(
11141        value: ::std::string::String,
11142    ) -> ::std::result::Result<Self, self::error::ConversionError> {
11143        value.parse()
11144    }
11145}
11146#[doc = "`JsonRpcRequestForExperimentalChangesMethod`"]
11147#[doc = r""]
11148#[doc = r" <details><summary>JSON schema</summary>"]
11149#[doc = r""]
11150#[doc = r" ```json"]
11151#[doc = "{"]
11152#[doc = "  \"type\": \"string\","]
11153#[doc = "  \"enum\": ["]
11154#[doc = "    \"EXPERIMENTAL_changes\""]
11155#[doc = "  ]"]
11156#[doc = "}"]
11157#[doc = r" ```"]
11158#[doc = r" </details>"]
11159#[derive(
11160    :: serde :: Deserialize,
11161    :: serde :: Serialize,
11162    Clone,
11163    Copy,
11164    Debug,
11165    Eq,
11166    Hash,
11167    Ord,
11168    PartialEq,
11169    PartialOrd,
11170)]
11171pub enum JsonRpcRequestForExperimentalChangesMethod {
11172    #[serde(rename = "EXPERIMENTAL_changes")]
11173    ExperimentalChanges,
11174}
11175impl ::std::convert::From<&Self> for JsonRpcRequestForExperimentalChangesMethod {
11176    fn from(value: &JsonRpcRequestForExperimentalChangesMethod) -> Self {
11177        value.clone()
11178    }
11179}
11180impl ::std::fmt::Display for JsonRpcRequestForExperimentalChangesMethod {
11181    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
11182        match *self {
11183            Self::ExperimentalChanges => f.write_str("EXPERIMENTAL_changes"),
11184        }
11185    }
11186}
11187impl ::std::str::FromStr for JsonRpcRequestForExperimentalChangesMethod {
11188    type Err = self::error::ConversionError;
11189    fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
11190        match value {
11191            "EXPERIMENTAL_changes" => Ok(Self::ExperimentalChanges),
11192            _ => Err("invalid value".into()),
11193        }
11194    }
11195}
11196impl ::std::convert::TryFrom<&str> for JsonRpcRequestForExperimentalChangesMethod {
11197    type Error = self::error::ConversionError;
11198    fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
11199        value.parse()
11200    }
11201}
11202impl ::std::convert::TryFrom<&::std::string::String>
11203    for JsonRpcRequestForExperimentalChangesMethod
11204{
11205    type Error = self::error::ConversionError;
11206    fn try_from(
11207        value: &::std::string::String,
11208    ) -> ::std::result::Result<Self, self::error::ConversionError> {
11209        value.parse()
11210    }
11211}
11212impl ::std::convert::TryFrom<::std::string::String> for JsonRpcRequestForExperimentalChangesMethod {
11213    type Error = self::error::ConversionError;
11214    fn try_from(
11215        value: ::std::string::String,
11216    ) -> ::std::result::Result<Self, self::error::ConversionError> {
11217        value.parse()
11218    }
11219}
11220#[doc = "`JsonRpcRequestForExperimentalCongestionLevel`"]
11221#[doc = r""]
11222#[doc = r" <details><summary>JSON schema</summary>"]
11223#[doc = r""]
11224#[doc = r" ```json"]
11225#[doc = "{"]
11226#[doc = "  \"title\": \"JsonRpcRequest_for_EXPERIMENTAL_congestion_level\","]
11227#[doc = "  \"type\": \"object\","]
11228#[doc = "  \"required\": ["]
11229#[doc = "    \"id\","]
11230#[doc = "    \"jsonrpc\","]
11231#[doc = "    \"method\","]
11232#[doc = "    \"params\""]
11233#[doc = "  ],"]
11234#[doc = "  \"properties\": {"]
11235#[doc = "    \"id\": {"]
11236#[doc = "      \"type\": \"string\""]
11237#[doc = "    },"]
11238#[doc = "    \"jsonrpc\": {"]
11239#[doc = "      \"type\": \"string\""]
11240#[doc = "    },"]
11241#[doc = "    \"method\": {"]
11242#[doc = "      \"type\": \"string\","]
11243#[doc = "      \"enum\": ["]
11244#[doc = "        \"EXPERIMENTAL_congestion_level\""]
11245#[doc = "      ]"]
11246#[doc = "    },"]
11247#[doc = "    \"params\": {"]
11248#[doc = "      \"$ref\": \"#/components/schemas/RpcCongestionLevelRequest\""]
11249#[doc = "    }"]
11250#[doc = "  }"]
11251#[doc = "}"]
11252#[doc = r" ```"]
11253#[doc = r" </details>"]
11254#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
11255pub struct JsonRpcRequestForExperimentalCongestionLevel {
11256    pub id: ::std::string::String,
11257    pub jsonrpc: ::std::string::String,
11258    pub method: JsonRpcRequestForExperimentalCongestionLevelMethod,
11259    pub params: RpcCongestionLevelRequest,
11260}
11261impl ::std::convert::From<&JsonRpcRequestForExperimentalCongestionLevel>
11262    for JsonRpcRequestForExperimentalCongestionLevel
11263{
11264    fn from(value: &JsonRpcRequestForExperimentalCongestionLevel) -> Self {
11265        value.clone()
11266    }
11267}
11268#[doc = "`JsonRpcRequestForExperimentalCongestionLevelMethod`"]
11269#[doc = r""]
11270#[doc = r" <details><summary>JSON schema</summary>"]
11271#[doc = r""]
11272#[doc = r" ```json"]
11273#[doc = "{"]
11274#[doc = "  \"type\": \"string\","]
11275#[doc = "  \"enum\": ["]
11276#[doc = "    \"EXPERIMENTAL_congestion_level\""]
11277#[doc = "  ]"]
11278#[doc = "}"]
11279#[doc = r" ```"]
11280#[doc = r" </details>"]
11281#[derive(
11282    :: serde :: Deserialize,
11283    :: serde :: Serialize,
11284    Clone,
11285    Copy,
11286    Debug,
11287    Eq,
11288    Hash,
11289    Ord,
11290    PartialEq,
11291    PartialOrd,
11292)]
11293pub enum JsonRpcRequestForExperimentalCongestionLevelMethod {
11294    #[serde(rename = "EXPERIMENTAL_congestion_level")]
11295    ExperimentalCongestionLevel,
11296}
11297impl ::std::convert::From<&Self> for JsonRpcRequestForExperimentalCongestionLevelMethod {
11298    fn from(value: &JsonRpcRequestForExperimentalCongestionLevelMethod) -> Self {
11299        value.clone()
11300    }
11301}
11302impl ::std::fmt::Display for JsonRpcRequestForExperimentalCongestionLevelMethod {
11303    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
11304        match *self {
11305            Self::ExperimentalCongestionLevel => f.write_str("EXPERIMENTAL_congestion_level"),
11306        }
11307    }
11308}
11309impl ::std::str::FromStr for JsonRpcRequestForExperimentalCongestionLevelMethod {
11310    type Err = self::error::ConversionError;
11311    fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
11312        match value {
11313            "EXPERIMENTAL_congestion_level" => Ok(Self::ExperimentalCongestionLevel),
11314            _ => Err("invalid value".into()),
11315        }
11316    }
11317}
11318impl ::std::convert::TryFrom<&str> for JsonRpcRequestForExperimentalCongestionLevelMethod {
11319    type Error = self::error::ConversionError;
11320    fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
11321        value.parse()
11322    }
11323}
11324impl ::std::convert::TryFrom<&::std::string::String>
11325    for JsonRpcRequestForExperimentalCongestionLevelMethod
11326{
11327    type Error = self::error::ConversionError;
11328    fn try_from(
11329        value: &::std::string::String,
11330    ) -> ::std::result::Result<Self, self::error::ConversionError> {
11331        value.parse()
11332    }
11333}
11334impl ::std::convert::TryFrom<::std::string::String>
11335    for JsonRpcRequestForExperimentalCongestionLevelMethod
11336{
11337    type Error = self::error::ConversionError;
11338    fn try_from(
11339        value: ::std::string::String,
11340    ) -> ::std::result::Result<Self, self::error::ConversionError> {
11341        value.parse()
11342    }
11343}
11344#[doc = "`JsonRpcRequestForExperimentalGenesisConfig`"]
11345#[doc = r""]
11346#[doc = r" <details><summary>JSON schema</summary>"]
11347#[doc = r""]
11348#[doc = r" ```json"]
11349#[doc = "{"]
11350#[doc = "  \"title\": \"JsonRpcRequest_for_EXPERIMENTAL_genesis_config\","]
11351#[doc = "  \"type\": \"object\","]
11352#[doc = "  \"required\": ["]
11353#[doc = "    \"id\","]
11354#[doc = "    \"jsonrpc\","]
11355#[doc = "    \"method\","]
11356#[doc = "    \"params\""]
11357#[doc = "  ],"]
11358#[doc = "  \"properties\": {"]
11359#[doc = "    \"id\": {"]
11360#[doc = "      \"type\": \"string\""]
11361#[doc = "    },"]
11362#[doc = "    \"jsonrpc\": {"]
11363#[doc = "      \"type\": \"string\""]
11364#[doc = "    },"]
11365#[doc = "    \"method\": {"]
11366#[doc = "      \"type\": \"string\","]
11367#[doc = "      \"enum\": ["]
11368#[doc = "        \"EXPERIMENTAL_genesis_config\""]
11369#[doc = "      ]"]
11370#[doc = "    },"]
11371#[doc = "    \"params\": {"]
11372#[doc = "      \"$ref\": \"#/components/schemas/GenesisConfigRequest\""]
11373#[doc = "    }"]
11374#[doc = "  }"]
11375#[doc = "}"]
11376#[doc = r" ```"]
11377#[doc = r" </details>"]
11378#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
11379pub struct JsonRpcRequestForExperimentalGenesisConfig {
11380    pub id: ::std::string::String,
11381    pub jsonrpc: ::std::string::String,
11382    pub method: JsonRpcRequestForExperimentalGenesisConfigMethod,
11383    pub params: GenesisConfigRequest,
11384}
11385impl ::std::convert::From<&JsonRpcRequestForExperimentalGenesisConfig>
11386    for JsonRpcRequestForExperimentalGenesisConfig
11387{
11388    fn from(value: &JsonRpcRequestForExperimentalGenesisConfig) -> Self {
11389        value.clone()
11390    }
11391}
11392#[doc = "`JsonRpcRequestForExperimentalGenesisConfigMethod`"]
11393#[doc = r""]
11394#[doc = r" <details><summary>JSON schema</summary>"]
11395#[doc = r""]
11396#[doc = r" ```json"]
11397#[doc = "{"]
11398#[doc = "  \"type\": \"string\","]
11399#[doc = "  \"enum\": ["]
11400#[doc = "    \"EXPERIMENTAL_genesis_config\""]
11401#[doc = "  ]"]
11402#[doc = "}"]
11403#[doc = r" ```"]
11404#[doc = r" </details>"]
11405#[derive(
11406    :: serde :: Deserialize,
11407    :: serde :: Serialize,
11408    Clone,
11409    Copy,
11410    Debug,
11411    Eq,
11412    Hash,
11413    Ord,
11414    PartialEq,
11415    PartialOrd,
11416)]
11417pub enum JsonRpcRequestForExperimentalGenesisConfigMethod {
11418    #[serde(rename = "EXPERIMENTAL_genesis_config")]
11419    ExperimentalGenesisConfig,
11420}
11421impl ::std::convert::From<&Self> for JsonRpcRequestForExperimentalGenesisConfigMethod {
11422    fn from(value: &JsonRpcRequestForExperimentalGenesisConfigMethod) -> Self {
11423        value.clone()
11424    }
11425}
11426impl ::std::fmt::Display for JsonRpcRequestForExperimentalGenesisConfigMethod {
11427    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
11428        match *self {
11429            Self::ExperimentalGenesisConfig => f.write_str("EXPERIMENTAL_genesis_config"),
11430        }
11431    }
11432}
11433impl ::std::str::FromStr for JsonRpcRequestForExperimentalGenesisConfigMethod {
11434    type Err = self::error::ConversionError;
11435    fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
11436        match value {
11437            "EXPERIMENTAL_genesis_config" => Ok(Self::ExperimentalGenesisConfig),
11438            _ => Err("invalid value".into()),
11439        }
11440    }
11441}
11442impl ::std::convert::TryFrom<&str> for JsonRpcRequestForExperimentalGenesisConfigMethod {
11443    type Error = self::error::ConversionError;
11444    fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
11445        value.parse()
11446    }
11447}
11448impl ::std::convert::TryFrom<&::std::string::String>
11449    for JsonRpcRequestForExperimentalGenesisConfigMethod
11450{
11451    type Error = self::error::ConversionError;
11452    fn try_from(
11453        value: &::std::string::String,
11454    ) -> ::std::result::Result<Self, self::error::ConversionError> {
11455        value.parse()
11456    }
11457}
11458impl ::std::convert::TryFrom<::std::string::String>
11459    for JsonRpcRequestForExperimentalGenesisConfigMethod
11460{
11461    type Error = self::error::ConversionError;
11462    fn try_from(
11463        value: ::std::string::String,
11464    ) -> ::std::result::Result<Self, self::error::ConversionError> {
11465        value.parse()
11466    }
11467}
11468#[doc = "`JsonRpcRequestForExperimentalLightClientBlockProof`"]
11469#[doc = r""]
11470#[doc = r" <details><summary>JSON schema</summary>"]
11471#[doc = r""]
11472#[doc = r" ```json"]
11473#[doc = "{"]
11474#[doc = "  \"title\": \"JsonRpcRequest_for_EXPERIMENTAL_light_client_block_proof\","]
11475#[doc = "  \"type\": \"object\","]
11476#[doc = "  \"required\": ["]
11477#[doc = "    \"id\","]
11478#[doc = "    \"jsonrpc\","]
11479#[doc = "    \"method\","]
11480#[doc = "    \"params\""]
11481#[doc = "  ],"]
11482#[doc = "  \"properties\": {"]
11483#[doc = "    \"id\": {"]
11484#[doc = "      \"type\": \"string\""]
11485#[doc = "    },"]
11486#[doc = "    \"jsonrpc\": {"]
11487#[doc = "      \"type\": \"string\""]
11488#[doc = "    },"]
11489#[doc = "    \"method\": {"]
11490#[doc = "      \"type\": \"string\","]
11491#[doc = "      \"enum\": ["]
11492#[doc = "        \"EXPERIMENTAL_light_client_block_proof\""]
11493#[doc = "      ]"]
11494#[doc = "    },"]
11495#[doc = "    \"params\": {"]
11496#[doc = "      \"$ref\": \"#/components/schemas/RpcLightClientBlockProofRequest\""]
11497#[doc = "    }"]
11498#[doc = "  }"]
11499#[doc = "}"]
11500#[doc = r" ```"]
11501#[doc = r" </details>"]
11502#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
11503pub struct JsonRpcRequestForExperimentalLightClientBlockProof {
11504    pub id: ::std::string::String,
11505    pub jsonrpc: ::std::string::String,
11506    pub method: JsonRpcRequestForExperimentalLightClientBlockProofMethod,
11507    pub params: RpcLightClientBlockProofRequest,
11508}
11509impl ::std::convert::From<&JsonRpcRequestForExperimentalLightClientBlockProof>
11510    for JsonRpcRequestForExperimentalLightClientBlockProof
11511{
11512    fn from(value: &JsonRpcRequestForExperimentalLightClientBlockProof) -> Self {
11513        value.clone()
11514    }
11515}
11516#[doc = "`JsonRpcRequestForExperimentalLightClientBlockProofMethod`"]
11517#[doc = r""]
11518#[doc = r" <details><summary>JSON schema</summary>"]
11519#[doc = r""]
11520#[doc = r" ```json"]
11521#[doc = "{"]
11522#[doc = "  \"type\": \"string\","]
11523#[doc = "  \"enum\": ["]
11524#[doc = "    \"EXPERIMENTAL_light_client_block_proof\""]
11525#[doc = "  ]"]
11526#[doc = "}"]
11527#[doc = r" ```"]
11528#[doc = r" </details>"]
11529#[derive(
11530    :: serde :: Deserialize,
11531    :: serde :: Serialize,
11532    Clone,
11533    Copy,
11534    Debug,
11535    Eq,
11536    Hash,
11537    Ord,
11538    PartialEq,
11539    PartialOrd,
11540)]
11541pub enum JsonRpcRequestForExperimentalLightClientBlockProofMethod {
11542    #[serde(rename = "EXPERIMENTAL_light_client_block_proof")]
11543    ExperimentalLightClientBlockProof,
11544}
11545impl ::std::convert::From<&Self> for JsonRpcRequestForExperimentalLightClientBlockProofMethod {
11546    fn from(value: &JsonRpcRequestForExperimentalLightClientBlockProofMethod) -> Self {
11547        value.clone()
11548    }
11549}
11550impl ::std::fmt::Display for JsonRpcRequestForExperimentalLightClientBlockProofMethod {
11551    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
11552        match *self {
11553            Self::ExperimentalLightClientBlockProof => {
11554                f.write_str("EXPERIMENTAL_light_client_block_proof")
11555            }
11556        }
11557    }
11558}
11559impl ::std::str::FromStr for JsonRpcRequestForExperimentalLightClientBlockProofMethod {
11560    type Err = self::error::ConversionError;
11561    fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
11562        match value {
11563            "EXPERIMENTAL_light_client_block_proof" => Ok(Self::ExperimentalLightClientBlockProof),
11564            _ => Err("invalid value".into()),
11565        }
11566    }
11567}
11568impl ::std::convert::TryFrom<&str> for JsonRpcRequestForExperimentalLightClientBlockProofMethod {
11569    type Error = self::error::ConversionError;
11570    fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
11571        value.parse()
11572    }
11573}
11574impl ::std::convert::TryFrom<&::std::string::String>
11575    for JsonRpcRequestForExperimentalLightClientBlockProofMethod
11576{
11577    type Error = self::error::ConversionError;
11578    fn try_from(
11579        value: &::std::string::String,
11580    ) -> ::std::result::Result<Self, self::error::ConversionError> {
11581        value.parse()
11582    }
11583}
11584impl ::std::convert::TryFrom<::std::string::String>
11585    for JsonRpcRequestForExperimentalLightClientBlockProofMethod
11586{
11587    type Error = self::error::ConversionError;
11588    fn try_from(
11589        value: ::std::string::String,
11590    ) -> ::std::result::Result<Self, self::error::ConversionError> {
11591        value.parse()
11592    }
11593}
11594#[doc = "`JsonRpcRequestForExperimentalLightClientProof`"]
11595#[doc = r""]
11596#[doc = r" <details><summary>JSON schema</summary>"]
11597#[doc = r""]
11598#[doc = r" ```json"]
11599#[doc = "{"]
11600#[doc = "  \"title\": \"JsonRpcRequest_for_EXPERIMENTAL_light_client_proof\","]
11601#[doc = "  \"type\": \"object\","]
11602#[doc = "  \"required\": ["]
11603#[doc = "    \"id\","]
11604#[doc = "    \"jsonrpc\","]
11605#[doc = "    \"method\","]
11606#[doc = "    \"params\""]
11607#[doc = "  ],"]
11608#[doc = "  \"properties\": {"]
11609#[doc = "    \"id\": {"]
11610#[doc = "      \"type\": \"string\""]
11611#[doc = "    },"]
11612#[doc = "    \"jsonrpc\": {"]
11613#[doc = "      \"type\": \"string\""]
11614#[doc = "    },"]
11615#[doc = "    \"method\": {"]
11616#[doc = "      \"type\": \"string\","]
11617#[doc = "      \"enum\": ["]
11618#[doc = "        \"EXPERIMENTAL_light_client_proof\""]
11619#[doc = "      ]"]
11620#[doc = "    },"]
11621#[doc = "    \"params\": {"]
11622#[doc = "      \"$ref\": \"#/components/schemas/RpcLightClientExecutionProofRequest\""]
11623#[doc = "    }"]
11624#[doc = "  }"]
11625#[doc = "}"]
11626#[doc = r" ```"]
11627#[doc = r" </details>"]
11628#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
11629pub struct JsonRpcRequestForExperimentalLightClientProof {
11630    pub id: ::std::string::String,
11631    pub jsonrpc: ::std::string::String,
11632    pub method: JsonRpcRequestForExperimentalLightClientProofMethod,
11633    pub params: RpcLightClientExecutionProofRequest,
11634}
11635impl ::std::convert::From<&JsonRpcRequestForExperimentalLightClientProof>
11636    for JsonRpcRequestForExperimentalLightClientProof
11637{
11638    fn from(value: &JsonRpcRequestForExperimentalLightClientProof) -> Self {
11639        value.clone()
11640    }
11641}
11642#[doc = "`JsonRpcRequestForExperimentalLightClientProofMethod`"]
11643#[doc = r""]
11644#[doc = r" <details><summary>JSON schema</summary>"]
11645#[doc = r""]
11646#[doc = r" ```json"]
11647#[doc = "{"]
11648#[doc = "  \"type\": \"string\","]
11649#[doc = "  \"enum\": ["]
11650#[doc = "    \"EXPERIMENTAL_light_client_proof\""]
11651#[doc = "  ]"]
11652#[doc = "}"]
11653#[doc = r" ```"]
11654#[doc = r" </details>"]
11655#[derive(
11656    :: serde :: Deserialize,
11657    :: serde :: Serialize,
11658    Clone,
11659    Copy,
11660    Debug,
11661    Eq,
11662    Hash,
11663    Ord,
11664    PartialEq,
11665    PartialOrd,
11666)]
11667pub enum JsonRpcRequestForExperimentalLightClientProofMethod {
11668    #[serde(rename = "EXPERIMENTAL_light_client_proof")]
11669    ExperimentalLightClientProof,
11670}
11671impl ::std::convert::From<&Self> for JsonRpcRequestForExperimentalLightClientProofMethod {
11672    fn from(value: &JsonRpcRequestForExperimentalLightClientProofMethod) -> Self {
11673        value.clone()
11674    }
11675}
11676impl ::std::fmt::Display for JsonRpcRequestForExperimentalLightClientProofMethod {
11677    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
11678        match *self {
11679            Self::ExperimentalLightClientProof => f.write_str("EXPERIMENTAL_light_client_proof"),
11680        }
11681    }
11682}
11683impl ::std::str::FromStr for JsonRpcRequestForExperimentalLightClientProofMethod {
11684    type Err = self::error::ConversionError;
11685    fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
11686        match value {
11687            "EXPERIMENTAL_light_client_proof" => Ok(Self::ExperimentalLightClientProof),
11688            _ => Err("invalid value".into()),
11689        }
11690    }
11691}
11692impl ::std::convert::TryFrom<&str> for JsonRpcRequestForExperimentalLightClientProofMethod {
11693    type Error = self::error::ConversionError;
11694    fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
11695        value.parse()
11696    }
11697}
11698impl ::std::convert::TryFrom<&::std::string::String>
11699    for JsonRpcRequestForExperimentalLightClientProofMethod
11700{
11701    type Error = self::error::ConversionError;
11702    fn try_from(
11703        value: &::std::string::String,
11704    ) -> ::std::result::Result<Self, self::error::ConversionError> {
11705        value.parse()
11706    }
11707}
11708impl ::std::convert::TryFrom<::std::string::String>
11709    for JsonRpcRequestForExperimentalLightClientProofMethod
11710{
11711    type Error = self::error::ConversionError;
11712    fn try_from(
11713        value: ::std::string::String,
11714    ) -> ::std::result::Result<Self, self::error::ConversionError> {
11715        value.parse()
11716    }
11717}
11718#[doc = "`JsonRpcRequestForExperimentalMaintenanceWindows`"]
11719#[doc = r""]
11720#[doc = r" <details><summary>JSON schema</summary>"]
11721#[doc = r""]
11722#[doc = r" ```json"]
11723#[doc = "{"]
11724#[doc = "  \"title\": \"JsonRpcRequest_for_EXPERIMENTAL_maintenance_windows\","]
11725#[doc = "  \"type\": \"object\","]
11726#[doc = "  \"required\": ["]
11727#[doc = "    \"id\","]
11728#[doc = "    \"jsonrpc\","]
11729#[doc = "    \"method\","]
11730#[doc = "    \"params\""]
11731#[doc = "  ],"]
11732#[doc = "  \"properties\": {"]
11733#[doc = "    \"id\": {"]
11734#[doc = "      \"type\": \"string\""]
11735#[doc = "    },"]
11736#[doc = "    \"jsonrpc\": {"]
11737#[doc = "      \"type\": \"string\""]
11738#[doc = "    },"]
11739#[doc = "    \"method\": {"]
11740#[doc = "      \"type\": \"string\","]
11741#[doc = "      \"enum\": ["]
11742#[doc = "        \"EXPERIMENTAL_maintenance_windows\""]
11743#[doc = "      ]"]
11744#[doc = "    },"]
11745#[doc = "    \"params\": {"]
11746#[doc = "      \"$ref\": \"#/components/schemas/RpcMaintenanceWindowsRequest\""]
11747#[doc = "    }"]
11748#[doc = "  }"]
11749#[doc = "}"]
11750#[doc = r" ```"]
11751#[doc = r" </details>"]
11752#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
11753pub struct JsonRpcRequestForExperimentalMaintenanceWindows {
11754    pub id: ::std::string::String,
11755    pub jsonrpc: ::std::string::String,
11756    pub method: JsonRpcRequestForExperimentalMaintenanceWindowsMethod,
11757    pub params: RpcMaintenanceWindowsRequest,
11758}
11759impl ::std::convert::From<&JsonRpcRequestForExperimentalMaintenanceWindows>
11760    for JsonRpcRequestForExperimentalMaintenanceWindows
11761{
11762    fn from(value: &JsonRpcRequestForExperimentalMaintenanceWindows) -> Self {
11763        value.clone()
11764    }
11765}
11766#[doc = "`JsonRpcRequestForExperimentalMaintenanceWindowsMethod`"]
11767#[doc = r""]
11768#[doc = r" <details><summary>JSON schema</summary>"]
11769#[doc = r""]
11770#[doc = r" ```json"]
11771#[doc = "{"]
11772#[doc = "  \"type\": \"string\","]
11773#[doc = "  \"enum\": ["]
11774#[doc = "    \"EXPERIMENTAL_maintenance_windows\""]
11775#[doc = "  ]"]
11776#[doc = "}"]
11777#[doc = r" ```"]
11778#[doc = r" </details>"]
11779#[derive(
11780    :: serde :: Deserialize,
11781    :: serde :: Serialize,
11782    Clone,
11783    Copy,
11784    Debug,
11785    Eq,
11786    Hash,
11787    Ord,
11788    PartialEq,
11789    PartialOrd,
11790)]
11791pub enum JsonRpcRequestForExperimentalMaintenanceWindowsMethod {
11792    #[serde(rename = "EXPERIMENTAL_maintenance_windows")]
11793    ExperimentalMaintenanceWindows,
11794}
11795impl ::std::convert::From<&Self> for JsonRpcRequestForExperimentalMaintenanceWindowsMethod {
11796    fn from(value: &JsonRpcRequestForExperimentalMaintenanceWindowsMethod) -> Self {
11797        value.clone()
11798    }
11799}
11800impl ::std::fmt::Display for JsonRpcRequestForExperimentalMaintenanceWindowsMethod {
11801    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
11802        match *self {
11803            Self::ExperimentalMaintenanceWindows => f.write_str("EXPERIMENTAL_maintenance_windows"),
11804        }
11805    }
11806}
11807impl ::std::str::FromStr for JsonRpcRequestForExperimentalMaintenanceWindowsMethod {
11808    type Err = self::error::ConversionError;
11809    fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
11810        match value {
11811            "EXPERIMENTAL_maintenance_windows" => Ok(Self::ExperimentalMaintenanceWindows),
11812            _ => Err("invalid value".into()),
11813        }
11814    }
11815}
11816impl ::std::convert::TryFrom<&str> for JsonRpcRequestForExperimentalMaintenanceWindowsMethod {
11817    type Error = self::error::ConversionError;
11818    fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
11819        value.parse()
11820    }
11821}
11822impl ::std::convert::TryFrom<&::std::string::String>
11823    for JsonRpcRequestForExperimentalMaintenanceWindowsMethod
11824{
11825    type Error = self::error::ConversionError;
11826    fn try_from(
11827        value: &::std::string::String,
11828    ) -> ::std::result::Result<Self, self::error::ConversionError> {
11829        value.parse()
11830    }
11831}
11832impl ::std::convert::TryFrom<::std::string::String>
11833    for JsonRpcRequestForExperimentalMaintenanceWindowsMethod
11834{
11835    type Error = self::error::ConversionError;
11836    fn try_from(
11837        value: ::std::string::String,
11838    ) -> ::std::result::Result<Self, self::error::ConversionError> {
11839        value.parse()
11840    }
11841}
11842#[doc = "`JsonRpcRequestForExperimentalProtocolConfig`"]
11843#[doc = r""]
11844#[doc = r" <details><summary>JSON schema</summary>"]
11845#[doc = r""]
11846#[doc = r" ```json"]
11847#[doc = "{"]
11848#[doc = "  \"title\": \"JsonRpcRequest_for_EXPERIMENTAL_protocol_config\","]
11849#[doc = "  \"type\": \"object\","]
11850#[doc = "  \"required\": ["]
11851#[doc = "    \"id\","]
11852#[doc = "    \"jsonrpc\","]
11853#[doc = "    \"method\","]
11854#[doc = "    \"params\""]
11855#[doc = "  ],"]
11856#[doc = "  \"properties\": {"]
11857#[doc = "    \"id\": {"]
11858#[doc = "      \"type\": \"string\""]
11859#[doc = "    },"]
11860#[doc = "    \"jsonrpc\": {"]
11861#[doc = "      \"type\": \"string\""]
11862#[doc = "    },"]
11863#[doc = "    \"method\": {"]
11864#[doc = "      \"type\": \"string\","]
11865#[doc = "      \"enum\": ["]
11866#[doc = "        \"EXPERIMENTAL_protocol_config\""]
11867#[doc = "      ]"]
11868#[doc = "    },"]
11869#[doc = "    \"params\": {"]
11870#[doc = "      \"$ref\": \"#/components/schemas/RpcProtocolConfigRequest\""]
11871#[doc = "    }"]
11872#[doc = "  }"]
11873#[doc = "}"]
11874#[doc = r" ```"]
11875#[doc = r" </details>"]
11876#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
11877pub struct JsonRpcRequestForExperimentalProtocolConfig {
11878    pub id: ::std::string::String,
11879    pub jsonrpc: ::std::string::String,
11880    pub method: JsonRpcRequestForExperimentalProtocolConfigMethod,
11881    pub params: RpcProtocolConfigRequest,
11882}
11883impl ::std::convert::From<&JsonRpcRequestForExperimentalProtocolConfig>
11884    for JsonRpcRequestForExperimentalProtocolConfig
11885{
11886    fn from(value: &JsonRpcRequestForExperimentalProtocolConfig) -> Self {
11887        value.clone()
11888    }
11889}
11890#[doc = "`JsonRpcRequestForExperimentalProtocolConfigMethod`"]
11891#[doc = r""]
11892#[doc = r" <details><summary>JSON schema</summary>"]
11893#[doc = r""]
11894#[doc = r" ```json"]
11895#[doc = "{"]
11896#[doc = "  \"type\": \"string\","]
11897#[doc = "  \"enum\": ["]
11898#[doc = "    \"EXPERIMENTAL_protocol_config\""]
11899#[doc = "  ]"]
11900#[doc = "}"]
11901#[doc = r" ```"]
11902#[doc = r" </details>"]
11903#[derive(
11904    :: serde :: Deserialize,
11905    :: serde :: Serialize,
11906    Clone,
11907    Copy,
11908    Debug,
11909    Eq,
11910    Hash,
11911    Ord,
11912    PartialEq,
11913    PartialOrd,
11914)]
11915pub enum JsonRpcRequestForExperimentalProtocolConfigMethod {
11916    #[serde(rename = "EXPERIMENTAL_protocol_config")]
11917    ExperimentalProtocolConfig,
11918}
11919impl ::std::convert::From<&Self> for JsonRpcRequestForExperimentalProtocolConfigMethod {
11920    fn from(value: &JsonRpcRequestForExperimentalProtocolConfigMethod) -> Self {
11921        value.clone()
11922    }
11923}
11924impl ::std::fmt::Display for JsonRpcRequestForExperimentalProtocolConfigMethod {
11925    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
11926        match *self {
11927            Self::ExperimentalProtocolConfig => f.write_str("EXPERIMENTAL_protocol_config"),
11928        }
11929    }
11930}
11931impl ::std::str::FromStr for JsonRpcRequestForExperimentalProtocolConfigMethod {
11932    type Err = self::error::ConversionError;
11933    fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
11934        match value {
11935            "EXPERIMENTAL_protocol_config" => Ok(Self::ExperimentalProtocolConfig),
11936            _ => Err("invalid value".into()),
11937        }
11938    }
11939}
11940impl ::std::convert::TryFrom<&str> for JsonRpcRequestForExperimentalProtocolConfigMethod {
11941    type Error = self::error::ConversionError;
11942    fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
11943        value.parse()
11944    }
11945}
11946impl ::std::convert::TryFrom<&::std::string::String>
11947    for JsonRpcRequestForExperimentalProtocolConfigMethod
11948{
11949    type Error = self::error::ConversionError;
11950    fn try_from(
11951        value: &::std::string::String,
11952    ) -> ::std::result::Result<Self, self::error::ConversionError> {
11953        value.parse()
11954    }
11955}
11956impl ::std::convert::TryFrom<::std::string::String>
11957    for JsonRpcRequestForExperimentalProtocolConfigMethod
11958{
11959    type Error = self::error::ConversionError;
11960    fn try_from(
11961        value: ::std::string::String,
11962    ) -> ::std::result::Result<Self, self::error::ConversionError> {
11963        value.parse()
11964    }
11965}
11966#[doc = "`JsonRpcRequestForExperimentalReceipt`"]
11967#[doc = r""]
11968#[doc = r" <details><summary>JSON schema</summary>"]
11969#[doc = r""]
11970#[doc = r" ```json"]
11971#[doc = "{"]
11972#[doc = "  \"title\": \"JsonRpcRequest_for_EXPERIMENTAL_receipt\","]
11973#[doc = "  \"type\": \"object\","]
11974#[doc = "  \"required\": ["]
11975#[doc = "    \"id\","]
11976#[doc = "    \"jsonrpc\","]
11977#[doc = "    \"method\","]
11978#[doc = "    \"params\""]
11979#[doc = "  ],"]
11980#[doc = "  \"properties\": {"]
11981#[doc = "    \"id\": {"]
11982#[doc = "      \"type\": \"string\""]
11983#[doc = "    },"]
11984#[doc = "    \"jsonrpc\": {"]
11985#[doc = "      \"type\": \"string\""]
11986#[doc = "    },"]
11987#[doc = "    \"method\": {"]
11988#[doc = "      \"type\": \"string\","]
11989#[doc = "      \"enum\": ["]
11990#[doc = "        \"EXPERIMENTAL_receipt\""]
11991#[doc = "      ]"]
11992#[doc = "    },"]
11993#[doc = "    \"params\": {"]
11994#[doc = "      \"$ref\": \"#/components/schemas/RpcReceiptRequest\""]
11995#[doc = "    }"]
11996#[doc = "  }"]
11997#[doc = "}"]
11998#[doc = r" ```"]
11999#[doc = r" </details>"]
12000#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
12001pub struct JsonRpcRequestForExperimentalReceipt {
12002    pub id: ::std::string::String,
12003    pub jsonrpc: ::std::string::String,
12004    pub method: JsonRpcRequestForExperimentalReceiptMethod,
12005    pub params: RpcReceiptRequest,
12006}
12007impl ::std::convert::From<&JsonRpcRequestForExperimentalReceipt>
12008    for JsonRpcRequestForExperimentalReceipt
12009{
12010    fn from(value: &JsonRpcRequestForExperimentalReceipt) -> Self {
12011        value.clone()
12012    }
12013}
12014#[doc = "`JsonRpcRequestForExperimentalReceiptMethod`"]
12015#[doc = r""]
12016#[doc = r" <details><summary>JSON schema</summary>"]
12017#[doc = r""]
12018#[doc = r" ```json"]
12019#[doc = "{"]
12020#[doc = "  \"type\": \"string\","]
12021#[doc = "  \"enum\": ["]
12022#[doc = "    \"EXPERIMENTAL_receipt\""]
12023#[doc = "  ]"]
12024#[doc = "}"]
12025#[doc = r" ```"]
12026#[doc = r" </details>"]
12027#[derive(
12028    :: serde :: Deserialize,
12029    :: serde :: Serialize,
12030    Clone,
12031    Copy,
12032    Debug,
12033    Eq,
12034    Hash,
12035    Ord,
12036    PartialEq,
12037    PartialOrd,
12038)]
12039pub enum JsonRpcRequestForExperimentalReceiptMethod {
12040    #[serde(rename = "EXPERIMENTAL_receipt")]
12041    ExperimentalReceipt,
12042}
12043impl ::std::convert::From<&Self> for JsonRpcRequestForExperimentalReceiptMethod {
12044    fn from(value: &JsonRpcRequestForExperimentalReceiptMethod) -> Self {
12045        value.clone()
12046    }
12047}
12048impl ::std::fmt::Display for JsonRpcRequestForExperimentalReceiptMethod {
12049    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
12050        match *self {
12051            Self::ExperimentalReceipt => f.write_str("EXPERIMENTAL_receipt"),
12052        }
12053    }
12054}
12055impl ::std::str::FromStr for JsonRpcRequestForExperimentalReceiptMethod {
12056    type Err = self::error::ConversionError;
12057    fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
12058        match value {
12059            "EXPERIMENTAL_receipt" => Ok(Self::ExperimentalReceipt),
12060            _ => Err("invalid value".into()),
12061        }
12062    }
12063}
12064impl ::std::convert::TryFrom<&str> for JsonRpcRequestForExperimentalReceiptMethod {
12065    type Error = self::error::ConversionError;
12066    fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
12067        value.parse()
12068    }
12069}
12070impl ::std::convert::TryFrom<&::std::string::String>
12071    for JsonRpcRequestForExperimentalReceiptMethod
12072{
12073    type Error = self::error::ConversionError;
12074    fn try_from(
12075        value: &::std::string::String,
12076    ) -> ::std::result::Result<Self, self::error::ConversionError> {
12077        value.parse()
12078    }
12079}
12080impl ::std::convert::TryFrom<::std::string::String> for JsonRpcRequestForExperimentalReceiptMethod {
12081    type Error = self::error::ConversionError;
12082    fn try_from(
12083        value: ::std::string::String,
12084    ) -> ::std::result::Result<Self, self::error::ConversionError> {
12085        value.parse()
12086    }
12087}
12088#[doc = "`JsonRpcRequestForExperimentalSplitStorageInfo`"]
12089#[doc = r""]
12090#[doc = r" <details><summary>JSON schema</summary>"]
12091#[doc = r""]
12092#[doc = r" ```json"]
12093#[doc = "{"]
12094#[doc = "  \"title\": \"JsonRpcRequest_for_EXPERIMENTAL_split_storage_info\","]
12095#[doc = "  \"type\": \"object\","]
12096#[doc = "  \"required\": ["]
12097#[doc = "    \"id\","]
12098#[doc = "    \"jsonrpc\","]
12099#[doc = "    \"method\","]
12100#[doc = "    \"params\""]
12101#[doc = "  ],"]
12102#[doc = "  \"properties\": {"]
12103#[doc = "    \"id\": {"]
12104#[doc = "      \"type\": \"string\""]
12105#[doc = "    },"]
12106#[doc = "    \"jsonrpc\": {"]
12107#[doc = "      \"type\": \"string\""]
12108#[doc = "    },"]
12109#[doc = "    \"method\": {"]
12110#[doc = "      \"type\": \"string\","]
12111#[doc = "      \"enum\": ["]
12112#[doc = "        \"EXPERIMENTAL_split_storage_info\""]
12113#[doc = "      ]"]
12114#[doc = "    },"]
12115#[doc = "    \"params\": {"]
12116#[doc = "      \"$ref\": \"#/components/schemas/RpcSplitStorageInfoRequest\""]
12117#[doc = "    }"]
12118#[doc = "  }"]
12119#[doc = "}"]
12120#[doc = r" ```"]
12121#[doc = r" </details>"]
12122#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
12123pub struct JsonRpcRequestForExperimentalSplitStorageInfo {
12124    pub id: ::std::string::String,
12125    pub jsonrpc: ::std::string::String,
12126    pub method: JsonRpcRequestForExperimentalSplitStorageInfoMethod,
12127    pub params: RpcSplitStorageInfoRequest,
12128}
12129impl ::std::convert::From<&JsonRpcRequestForExperimentalSplitStorageInfo>
12130    for JsonRpcRequestForExperimentalSplitStorageInfo
12131{
12132    fn from(value: &JsonRpcRequestForExperimentalSplitStorageInfo) -> Self {
12133        value.clone()
12134    }
12135}
12136#[doc = "`JsonRpcRequestForExperimentalSplitStorageInfoMethod`"]
12137#[doc = r""]
12138#[doc = r" <details><summary>JSON schema</summary>"]
12139#[doc = r""]
12140#[doc = r" ```json"]
12141#[doc = "{"]
12142#[doc = "  \"type\": \"string\","]
12143#[doc = "  \"enum\": ["]
12144#[doc = "    \"EXPERIMENTAL_split_storage_info\""]
12145#[doc = "  ]"]
12146#[doc = "}"]
12147#[doc = r" ```"]
12148#[doc = r" </details>"]
12149#[derive(
12150    :: serde :: Deserialize,
12151    :: serde :: Serialize,
12152    Clone,
12153    Copy,
12154    Debug,
12155    Eq,
12156    Hash,
12157    Ord,
12158    PartialEq,
12159    PartialOrd,
12160)]
12161pub enum JsonRpcRequestForExperimentalSplitStorageInfoMethod {
12162    #[serde(rename = "EXPERIMENTAL_split_storage_info")]
12163    ExperimentalSplitStorageInfo,
12164}
12165impl ::std::convert::From<&Self> for JsonRpcRequestForExperimentalSplitStorageInfoMethod {
12166    fn from(value: &JsonRpcRequestForExperimentalSplitStorageInfoMethod) -> Self {
12167        value.clone()
12168    }
12169}
12170impl ::std::fmt::Display for JsonRpcRequestForExperimentalSplitStorageInfoMethod {
12171    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
12172        match *self {
12173            Self::ExperimentalSplitStorageInfo => f.write_str("EXPERIMENTAL_split_storage_info"),
12174        }
12175    }
12176}
12177impl ::std::str::FromStr for JsonRpcRequestForExperimentalSplitStorageInfoMethod {
12178    type Err = self::error::ConversionError;
12179    fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
12180        match value {
12181            "EXPERIMENTAL_split_storage_info" => Ok(Self::ExperimentalSplitStorageInfo),
12182            _ => Err("invalid value".into()),
12183        }
12184    }
12185}
12186impl ::std::convert::TryFrom<&str> for JsonRpcRequestForExperimentalSplitStorageInfoMethod {
12187    type Error = self::error::ConversionError;
12188    fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
12189        value.parse()
12190    }
12191}
12192impl ::std::convert::TryFrom<&::std::string::String>
12193    for JsonRpcRequestForExperimentalSplitStorageInfoMethod
12194{
12195    type Error = self::error::ConversionError;
12196    fn try_from(
12197        value: &::std::string::String,
12198    ) -> ::std::result::Result<Self, self::error::ConversionError> {
12199        value.parse()
12200    }
12201}
12202impl ::std::convert::TryFrom<::std::string::String>
12203    for JsonRpcRequestForExperimentalSplitStorageInfoMethod
12204{
12205    type Error = self::error::ConversionError;
12206    fn try_from(
12207        value: ::std::string::String,
12208    ) -> ::std::result::Result<Self, self::error::ConversionError> {
12209        value.parse()
12210    }
12211}
12212#[doc = "`JsonRpcRequestForExperimentalTxStatus`"]
12213#[doc = r""]
12214#[doc = r" <details><summary>JSON schema</summary>"]
12215#[doc = r""]
12216#[doc = r" ```json"]
12217#[doc = "{"]
12218#[doc = "  \"title\": \"JsonRpcRequest_for_EXPERIMENTAL_tx_status\","]
12219#[doc = "  \"type\": \"object\","]
12220#[doc = "  \"required\": ["]
12221#[doc = "    \"id\","]
12222#[doc = "    \"jsonrpc\","]
12223#[doc = "    \"method\","]
12224#[doc = "    \"params\""]
12225#[doc = "  ],"]
12226#[doc = "  \"properties\": {"]
12227#[doc = "    \"id\": {"]
12228#[doc = "      \"type\": \"string\""]
12229#[doc = "    },"]
12230#[doc = "    \"jsonrpc\": {"]
12231#[doc = "      \"type\": \"string\""]
12232#[doc = "    },"]
12233#[doc = "    \"method\": {"]
12234#[doc = "      \"type\": \"string\","]
12235#[doc = "      \"enum\": ["]
12236#[doc = "        \"EXPERIMENTAL_tx_status\""]
12237#[doc = "      ]"]
12238#[doc = "    },"]
12239#[doc = "    \"params\": {"]
12240#[doc = "      \"$ref\": \"#/components/schemas/RpcTransactionStatusRequest\""]
12241#[doc = "    }"]
12242#[doc = "  }"]
12243#[doc = "}"]
12244#[doc = r" ```"]
12245#[doc = r" </details>"]
12246#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
12247pub struct JsonRpcRequestForExperimentalTxStatus {
12248    pub id: ::std::string::String,
12249    pub jsonrpc: ::std::string::String,
12250    pub method: JsonRpcRequestForExperimentalTxStatusMethod,
12251    pub params: RpcTransactionStatusRequest,
12252}
12253impl ::std::convert::From<&JsonRpcRequestForExperimentalTxStatus>
12254    for JsonRpcRequestForExperimentalTxStatus
12255{
12256    fn from(value: &JsonRpcRequestForExperimentalTxStatus) -> Self {
12257        value.clone()
12258    }
12259}
12260#[doc = "`JsonRpcRequestForExperimentalTxStatusMethod`"]
12261#[doc = r""]
12262#[doc = r" <details><summary>JSON schema</summary>"]
12263#[doc = r""]
12264#[doc = r" ```json"]
12265#[doc = "{"]
12266#[doc = "  \"type\": \"string\","]
12267#[doc = "  \"enum\": ["]
12268#[doc = "    \"EXPERIMENTAL_tx_status\""]
12269#[doc = "  ]"]
12270#[doc = "}"]
12271#[doc = r" ```"]
12272#[doc = r" </details>"]
12273#[derive(
12274    :: serde :: Deserialize,
12275    :: serde :: Serialize,
12276    Clone,
12277    Copy,
12278    Debug,
12279    Eq,
12280    Hash,
12281    Ord,
12282    PartialEq,
12283    PartialOrd,
12284)]
12285pub enum JsonRpcRequestForExperimentalTxStatusMethod {
12286    #[serde(rename = "EXPERIMENTAL_tx_status")]
12287    ExperimentalTxStatus,
12288}
12289impl ::std::convert::From<&Self> for JsonRpcRequestForExperimentalTxStatusMethod {
12290    fn from(value: &JsonRpcRequestForExperimentalTxStatusMethod) -> Self {
12291        value.clone()
12292    }
12293}
12294impl ::std::fmt::Display for JsonRpcRequestForExperimentalTxStatusMethod {
12295    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
12296        match *self {
12297            Self::ExperimentalTxStatus => f.write_str("EXPERIMENTAL_tx_status"),
12298        }
12299    }
12300}
12301impl ::std::str::FromStr for JsonRpcRequestForExperimentalTxStatusMethod {
12302    type Err = self::error::ConversionError;
12303    fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
12304        match value {
12305            "EXPERIMENTAL_tx_status" => Ok(Self::ExperimentalTxStatus),
12306            _ => Err("invalid value".into()),
12307        }
12308    }
12309}
12310impl ::std::convert::TryFrom<&str> for JsonRpcRequestForExperimentalTxStatusMethod {
12311    type Error = self::error::ConversionError;
12312    fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
12313        value.parse()
12314    }
12315}
12316impl ::std::convert::TryFrom<&::std::string::String>
12317    for JsonRpcRequestForExperimentalTxStatusMethod
12318{
12319    type Error = self::error::ConversionError;
12320    fn try_from(
12321        value: &::std::string::String,
12322    ) -> ::std::result::Result<Self, self::error::ConversionError> {
12323        value.parse()
12324    }
12325}
12326impl ::std::convert::TryFrom<::std::string::String>
12327    for JsonRpcRequestForExperimentalTxStatusMethod
12328{
12329    type Error = self::error::ConversionError;
12330    fn try_from(
12331        value: ::std::string::String,
12332    ) -> ::std::result::Result<Self, self::error::ConversionError> {
12333        value.parse()
12334    }
12335}
12336#[doc = "`JsonRpcRequestForExperimentalValidatorsOrdered`"]
12337#[doc = r""]
12338#[doc = r" <details><summary>JSON schema</summary>"]
12339#[doc = r""]
12340#[doc = r" ```json"]
12341#[doc = "{"]
12342#[doc = "  \"title\": \"JsonRpcRequest_for_EXPERIMENTAL_validators_ordered\","]
12343#[doc = "  \"type\": \"object\","]
12344#[doc = "  \"required\": ["]
12345#[doc = "    \"id\","]
12346#[doc = "    \"jsonrpc\","]
12347#[doc = "    \"method\","]
12348#[doc = "    \"params\""]
12349#[doc = "  ],"]
12350#[doc = "  \"properties\": {"]
12351#[doc = "    \"id\": {"]
12352#[doc = "      \"type\": \"string\""]
12353#[doc = "    },"]
12354#[doc = "    \"jsonrpc\": {"]
12355#[doc = "      \"type\": \"string\""]
12356#[doc = "    },"]
12357#[doc = "    \"method\": {"]
12358#[doc = "      \"type\": \"string\","]
12359#[doc = "      \"enum\": ["]
12360#[doc = "        \"EXPERIMENTAL_validators_ordered\""]
12361#[doc = "      ]"]
12362#[doc = "    },"]
12363#[doc = "    \"params\": {"]
12364#[doc = "      \"$ref\": \"#/components/schemas/RpcValidatorsOrderedRequest\""]
12365#[doc = "    }"]
12366#[doc = "  }"]
12367#[doc = "}"]
12368#[doc = r" ```"]
12369#[doc = r" </details>"]
12370#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
12371pub struct JsonRpcRequestForExperimentalValidatorsOrdered {
12372    pub id: ::std::string::String,
12373    pub jsonrpc: ::std::string::String,
12374    pub method: JsonRpcRequestForExperimentalValidatorsOrderedMethod,
12375    pub params: RpcValidatorsOrderedRequest,
12376}
12377impl ::std::convert::From<&JsonRpcRequestForExperimentalValidatorsOrdered>
12378    for JsonRpcRequestForExperimentalValidatorsOrdered
12379{
12380    fn from(value: &JsonRpcRequestForExperimentalValidatorsOrdered) -> Self {
12381        value.clone()
12382    }
12383}
12384#[doc = "`JsonRpcRequestForExperimentalValidatorsOrderedMethod`"]
12385#[doc = r""]
12386#[doc = r" <details><summary>JSON schema</summary>"]
12387#[doc = r""]
12388#[doc = r" ```json"]
12389#[doc = "{"]
12390#[doc = "  \"type\": \"string\","]
12391#[doc = "  \"enum\": ["]
12392#[doc = "    \"EXPERIMENTAL_validators_ordered\""]
12393#[doc = "  ]"]
12394#[doc = "}"]
12395#[doc = r" ```"]
12396#[doc = r" </details>"]
12397#[derive(
12398    :: serde :: Deserialize,
12399    :: serde :: Serialize,
12400    Clone,
12401    Copy,
12402    Debug,
12403    Eq,
12404    Hash,
12405    Ord,
12406    PartialEq,
12407    PartialOrd,
12408)]
12409pub enum JsonRpcRequestForExperimentalValidatorsOrderedMethod {
12410    #[serde(rename = "EXPERIMENTAL_validators_ordered")]
12411    ExperimentalValidatorsOrdered,
12412}
12413impl ::std::convert::From<&Self> for JsonRpcRequestForExperimentalValidatorsOrderedMethod {
12414    fn from(value: &JsonRpcRequestForExperimentalValidatorsOrderedMethod) -> Self {
12415        value.clone()
12416    }
12417}
12418impl ::std::fmt::Display for JsonRpcRequestForExperimentalValidatorsOrderedMethod {
12419    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
12420        match *self {
12421            Self::ExperimentalValidatorsOrdered => f.write_str("EXPERIMENTAL_validators_ordered"),
12422        }
12423    }
12424}
12425impl ::std::str::FromStr for JsonRpcRequestForExperimentalValidatorsOrderedMethod {
12426    type Err = self::error::ConversionError;
12427    fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
12428        match value {
12429            "EXPERIMENTAL_validators_ordered" => Ok(Self::ExperimentalValidatorsOrdered),
12430            _ => Err("invalid value".into()),
12431        }
12432    }
12433}
12434impl ::std::convert::TryFrom<&str> for JsonRpcRequestForExperimentalValidatorsOrderedMethod {
12435    type Error = self::error::ConversionError;
12436    fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
12437        value.parse()
12438    }
12439}
12440impl ::std::convert::TryFrom<&::std::string::String>
12441    for JsonRpcRequestForExperimentalValidatorsOrderedMethod
12442{
12443    type Error = self::error::ConversionError;
12444    fn try_from(
12445        value: &::std::string::String,
12446    ) -> ::std::result::Result<Self, self::error::ConversionError> {
12447        value.parse()
12448    }
12449}
12450impl ::std::convert::TryFrom<::std::string::String>
12451    for JsonRpcRequestForExperimentalValidatorsOrderedMethod
12452{
12453    type Error = self::error::ConversionError;
12454    fn try_from(
12455        value: ::std::string::String,
12456    ) -> ::std::result::Result<Self, self::error::ConversionError> {
12457        value.parse()
12458    }
12459}
12460#[doc = "`JsonRpcRequestForGasPrice`"]
12461#[doc = r""]
12462#[doc = r" <details><summary>JSON schema</summary>"]
12463#[doc = r""]
12464#[doc = r" ```json"]
12465#[doc = "{"]
12466#[doc = "  \"title\": \"JsonRpcRequest_for_gas_price\","]
12467#[doc = "  \"type\": \"object\","]
12468#[doc = "  \"required\": ["]
12469#[doc = "    \"id\","]
12470#[doc = "    \"jsonrpc\","]
12471#[doc = "    \"method\","]
12472#[doc = "    \"params\""]
12473#[doc = "  ],"]
12474#[doc = "  \"properties\": {"]
12475#[doc = "    \"id\": {"]
12476#[doc = "      \"type\": \"string\""]
12477#[doc = "    },"]
12478#[doc = "    \"jsonrpc\": {"]
12479#[doc = "      \"type\": \"string\""]
12480#[doc = "    },"]
12481#[doc = "    \"method\": {"]
12482#[doc = "      \"type\": \"string\","]
12483#[doc = "      \"enum\": ["]
12484#[doc = "        \"gas_price\""]
12485#[doc = "      ]"]
12486#[doc = "    },"]
12487#[doc = "    \"params\": {"]
12488#[doc = "      \"$ref\": \"#/components/schemas/RpcGasPriceRequest\""]
12489#[doc = "    }"]
12490#[doc = "  }"]
12491#[doc = "}"]
12492#[doc = r" ```"]
12493#[doc = r" </details>"]
12494#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
12495pub struct JsonRpcRequestForGasPrice {
12496    pub id: ::std::string::String,
12497    pub jsonrpc: ::std::string::String,
12498    pub method: JsonRpcRequestForGasPriceMethod,
12499    pub params: RpcGasPriceRequest,
12500}
12501impl ::std::convert::From<&JsonRpcRequestForGasPrice> for JsonRpcRequestForGasPrice {
12502    fn from(value: &JsonRpcRequestForGasPrice) -> Self {
12503        value.clone()
12504    }
12505}
12506#[doc = "`JsonRpcRequestForGasPriceMethod`"]
12507#[doc = r""]
12508#[doc = r" <details><summary>JSON schema</summary>"]
12509#[doc = r""]
12510#[doc = r" ```json"]
12511#[doc = "{"]
12512#[doc = "  \"type\": \"string\","]
12513#[doc = "  \"enum\": ["]
12514#[doc = "    \"gas_price\""]
12515#[doc = "  ]"]
12516#[doc = "}"]
12517#[doc = r" ```"]
12518#[doc = r" </details>"]
12519#[derive(
12520    :: serde :: Deserialize,
12521    :: serde :: Serialize,
12522    Clone,
12523    Copy,
12524    Debug,
12525    Eq,
12526    Hash,
12527    Ord,
12528    PartialEq,
12529    PartialOrd,
12530)]
12531pub enum JsonRpcRequestForGasPriceMethod {
12532    #[serde(rename = "gas_price")]
12533    GasPrice,
12534}
12535impl ::std::convert::From<&Self> for JsonRpcRequestForGasPriceMethod {
12536    fn from(value: &JsonRpcRequestForGasPriceMethod) -> Self {
12537        value.clone()
12538    }
12539}
12540impl ::std::fmt::Display for JsonRpcRequestForGasPriceMethod {
12541    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
12542        match *self {
12543            Self::GasPrice => f.write_str("gas_price"),
12544        }
12545    }
12546}
12547impl ::std::str::FromStr for JsonRpcRequestForGasPriceMethod {
12548    type Err = self::error::ConversionError;
12549    fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
12550        match value {
12551            "gas_price" => Ok(Self::GasPrice),
12552            _ => Err("invalid value".into()),
12553        }
12554    }
12555}
12556impl ::std::convert::TryFrom<&str> for JsonRpcRequestForGasPriceMethod {
12557    type Error = self::error::ConversionError;
12558    fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
12559        value.parse()
12560    }
12561}
12562impl ::std::convert::TryFrom<&::std::string::String> for JsonRpcRequestForGasPriceMethod {
12563    type Error = self::error::ConversionError;
12564    fn try_from(
12565        value: &::std::string::String,
12566    ) -> ::std::result::Result<Self, self::error::ConversionError> {
12567        value.parse()
12568    }
12569}
12570impl ::std::convert::TryFrom<::std::string::String> for JsonRpcRequestForGasPriceMethod {
12571    type Error = self::error::ConversionError;
12572    fn try_from(
12573        value: ::std::string::String,
12574    ) -> ::std::result::Result<Self, self::error::ConversionError> {
12575        value.parse()
12576    }
12577}
12578#[doc = "`JsonRpcRequestForGenesisConfig`"]
12579#[doc = r""]
12580#[doc = r" <details><summary>JSON schema</summary>"]
12581#[doc = r""]
12582#[doc = r" ```json"]
12583#[doc = "{"]
12584#[doc = "  \"title\": \"JsonRpcRequest_for_genesis_config\","]
12585#[doc = "  \"type\": \"object\","]
12586#[doc = "  \"required\": ["]
12587#[doc = "    \"id\","]
12588#[doc = "    \"jsonrpc\","]
12589#[doc = "    \"method\","]
12590#[doc = "    \"params\""]
12591#[doc = "  ],"]
12592#[doc = "  \"properties\": {"]
12593#[doc = "    \"id\": {"]
12594#[doc = "      \"type\": \"string\""]
12595#[doc = "    },"]
12596#[doc = "    \"jsonrpc\": {"]
12597#[doc = "      \"type\": \"string\""]
12598#[doc = "    },"]
12599#[doc = "    \"method\": {"]
12600#[doc = "      \"type\": \"string\","]
12601#[doc = "      \"enum\": ["]
12602#[doc = "        \"genesis_config\""]
12603#[doc = "      ]"]
12604#[doc = "    },"]
12605#[doc = "    \"params\": {"]
12606#[doc = "      \"$ref\": \"#/components/schemas/GenesisConfigRequest\""]
12607#[doc = "    }"]
12608#[doc = "  }"]
12609#[doc = "}"]
12610#[doc = r" ```"]
12611#[doc = r" </details>"]
12612#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
12613pub struct JsonRpcRequestForGenesisConfig {
12614    pub id: ::std::string::String,
12615    pub jsonrpc: ::std::string::String,
12616    pub method: JsonRpcRequestForGenesisConfigMethod,
12617    pub params: GenesisConfigRequest,
12618}
12619impl ::std::convert::From<&JsonRpcRequestForGenesisConfig> for JsonRpcRequestForGenesisConfig {
12620    fn from(value: &JsonRpcRequestForGenesisConfig) -> Self {
12621        value.clone()
12622    }
12623}
12624#[doc = "`JsonRpcRequestForGenesisConfigMethod`"]
12625#[doc = r""]
12626#[doc = r" <details><summary>JSON schema</summary>"]
12627#[doc = r""]
12628#[doc = r" ```json"]
12629#[doc = "{"]
12630#[doc = "  \"type\": \"string\","]
12631#[doc = "  \"enum\": ["]
12632#[doc = "    \"genesis_config\""]
12633#[doc = "  ]"]
12634#[doc = "}"]
12635#[doc = r" ```"]
12636#[doc = r" </details>"]
12637#[derive(
12638    :: serde :: Deserialize,
12639    :: serde :: Serialize,
12640    Clone,
12641    Copy,
12642    Debug,
12643    Eq,
12644    Hash,
12645    Ord,
12646    PartialEq,
12647    PartialOrd,
12648)]
12649pub enum JsonRpcRequestForGenesisConfigMethod {
12650    #[serde(rename = "genesis_config")]
12651    GenesisConfig,
12652}
12653impl ::std::convert::From<&Self> for JsonRpcRequestForGenesisConfigMethod {
12654    fn from(value: &JsonRpcRequestForGenesisConfigMethod) -> Self {
12655        value.clone()
12656    }
12657}
12658impl ::std::fmt::Display for JsonRpcRequestForGenesisConfigMethod {
12659    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
12660        match *self {
12661            Self::GenesisConfig => f.write_str("genesis_config"),
12662        }
12663    }
12664}
12665impl ::std::str::FromStr for JsonRpcRequestForGenesisConfigMethod {
12666    type Err = self::error::ConversionError;
12667    fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
12668        match value {
12669            "genesis_config" => Ok(Self::GenesisConfig),
12670            _ => Err("invalid value".into()),
12671        }
12672    }
12673}
12674impl ::std::convert::TryFrom<&str> for JsonRpcRequestForGenesisConfigMethod {
12675    type Error = self::error::ConversionError;
12676    fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
12677        value.parse()
12678    }
12679}
12680impl ::std::convert::TryFrom<&::std::string::String> for JsonRpcRequestForGenesisConfigMethod {
12681    type Error = self::error::ConversionError;
12682    fn try_from(
12683        value: &::std::string::String,
12684    ) -> ::std::result::Result<Self, self::error::ConversionError> {
12685        value.parse()
12686    }
12687}
12688impl ::std::convert::TryFrom<::std::string::String> for JsonRpcRequestForGenesisConfigMethod {
12689    type Error = self::error::ConversionError;
12690    fn try_from(
12691        value: ::std::string::String,
12692    ) -> ::std::result::Result<Self, self::error::ConversionError> {
12693        value.parse()
12694    }
12695}
12696#[doc = "`JsonRpcRequestForHealth`"]
12697#[doc = r""]
12698#[doc = r" <details><summary>JSON schema</summary>"]
12699#[doc = r""]
12700#[doc = r" ```json"]
12701#[doc = "{"]
12702#[doc = "  \"title\": \"JsonRpcRequest_for_health\","]
12703#[doc = "  \"type\": \"object\","]
12704#[doc = "  \"required\": ["]
12705#[doc = "    \"id\","]
12706#[doc = "    \"jsonrpc\","]
12707#[doc = "    \"method\","]
12708#[doc = "    \"params\""]
12709#[doc = "  ],"]
12710#[doc = "  \"properties\": {"]
12711#[doc = "    \"id\": {"]
12712#[doc = "      \"type\": \"string\""]
12713#[doc = "    },"]
12714#[doc = "    \"jsonrpc\": {"]
12715#[doc = "      \"type\": \"string\""]
12716#[doc = "    },"]
12717#[doc = "    \"method\": {"]
12718#[doc = "      \"type\": \"string\","]
12719#[doc = "      \"enum\": ["]
12720#[doc = "        \"health\""]
12721#[doc = "      ]"]
12722#[doc = "    },"]
12723#[doc = "    \"params\": {"]
12724#[doc = "      \"$ref\": \"#/components/schemas/RpcHealthRequest\""]
12725#[doc = "    }"]
12726#[doc = "  }"]
12727#[doc = "}"]
12728#[doc = r" ```"]
12729#[doc = r" </details>"]
12730#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
12731pub struct JsonRpcRequestForHealth {
12732    pub id: ::std::string::String,
12733    pub jsonrpc: ::std::string::String,
12734    pub method: JsonRpcRequestForHealthMethod,
12735    pub params: RpcHealthRequest,
12736}
12737impl ::std::convert::From<&JsonRpcRequestForHealth> for JsonRpcRequestForHealth {
12738    fn from(value: &JsonRpcRequestForHealth) -> Self {
12739        value.clone()
12740    }
12741}
12742#[doc = "`JsonRpcRequestForHealthMethod`"]
12743#[doc = r""]
12744#[doc = r" <details><summary>JSON schema</summary>"]
12745#[doc = r""]
12746#[doc = r" ```json"]
12747#[doc = "{"]
12748#[doc = "  \"type\": \"string\","]
12749#[doc = "  \"enum\": ["]
12750#[doc = "    \"health\""]
12751#[doc = "  ]"]
12752#[doc = "}"]
12753#[doc = r" ```"]
12754#[doc = r" </details>"]
12755#[derive(
12756    :: serde :: Deserialize,
12757    :: serde :: Serialize,
12758    Clone,
12759    Copy,
12760    Debug,
12761    Eq,
12762    Hash,
12763    Ord,
12764    PartialEq,
12765    PartialOrd,
12766)]
12767pub enum JsonRpcRequestForHealthMethod {
12768    #[serde(rename = "health")]
12769    Health,
12770}
12771impl ::std::convert::From<&Self> for JsonRpcRequestForHealthMethod {
12772    fn from(value: &JsonRpcRequestForHealthMethod) -> Self {
12773        value.clone()
12774    }
12775}
12776impl ::std::fmt::Display for JsonRpcRequestForHealthMethod {
12777    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
12778        match *self {
12779            Self::Health => f.write_str("health"),
12780        }
12781    }
12782}
12783impl ::std::str::FromStr for JsonRpcRequestForHealthMethod {
12784    type Err = self::error::ConversionError;
12785    fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
12786        match value {
12787            "health" => Ok(Self::Health),
12788            _ => Err("invalid value".into()),
12789        }
12790    }
12791}
12792impl ::std::convert::TryFrom<&str> for JsonRpcRequestForHealthMethod {
12793    type Error = self::error::ConversionError;
12794    fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
12795        value.parse()
12796    }
12797}
12798impl ::std::convert::TryFrom<&::std::string::String> for JsonRpcRequestForHealthMethod {
12799    type Error = self::error::ConversionError;
12800    fn try_from(
12801        value: &::std::string::String,
12802    ) -> ::std::result::Result<Self, self::error::ConversionError> {
12803        value.parse()
12804    }
12805}
12806impl ::std::convert::TryFrom<::std::string::String> for JsonRpcRequestForHealthMethod {
12807    type Error = self::error::ConversionError;
12808    fn try_from(
12809        value: ::std::string::String,
12810    ) -> ::std::result::Result<Self, self::error::ConversionError> {
12811        value.parse()
12812    }
12813}
12814#[doc = "`JsonRpcRequestForLightClientProof`"]
12815#[doc = r""]
12816#[doc = r" <details><summary>JSON schema</summary>"]
12817#[doc = r""]
12818#[doc = r" ```json"]
12819#[doc = "{"]
12820#[doc = "  \"title\": \"JsonRpcRequest_for_light_client_proof\","]
12821#[doc = "  \"type\": \"object\","]
12822#[doc = "  \"required\": ["]
12823#[doc = "    \"id\","]
12824#[doc = "    \"jsonrpc\","]
12825#[doc = "    \"method\","]
12826#[doc = "    \"params\""]
12827#[doc = "  ],"]
12828#[doc = "  \"properties\": {"]
12829#[doc = "    \"id\": {"]
12830#[doc = "      \"type\": \"string\""]
12831#[doc = "    },"]
12832#[doc = "    \"jsonrpc\": {"]
12833#[doc = "      \"type\": \"string\""]
12834#[doc = "    },"]
12835#[doc = "    \"method\": {"]
12836#[doc = "      \"type\": \"string\","]
12837#[doc = "      \"enum\": ["]
12838#[doc = "        \"light_client_proof\""]
12839#[doc = "      ]"]
12840#[doc = "    },"]
12841#[doc = "    \"params\": {"]
12842#[doc = "      \"$ref\": \"#/components/schemas/RpcLightClientExecutionProofRequest\""]
12843#[doc = "    }"]
12844#[doc = "  }"]
12845#[doc = "}"]
12846#[doc = r" ```"]
12847#[doc = r" </details>"]
12848#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
12849pub struct JsonRpcRequestForLightClientProof {
12850    pub id: ::std::string::String,
12851    pub jsonrpc: ::std::string::String,
12852    pub method: JsonRpcRequestForLightClientProofMethod,
12853    pub params: RpcLightClientExecutionProofRequest,
12854}
12855impl ::std::convert::From<&JsonRpcRequestForLightClientProof>
12856    for JsonRpcRequestForLightClientProof
12857{
12858    fn from(value: &JsonRpcRequestForLightClientProof) -> Self {
12859        value.clone()
12860    }
12861}
12862#[doc = "`JsonRpcRequestForLightClientProofMethod`"]
12863#[doc = r""]
12864#[doc = r" <details><summary>JSON schema</summary>"]
12865#[doc = r""]
12866#[doc = r" ```json"]
12867#[doc = "{"]
12868#[doc = "  \"type\": \"string\","]
12869#[doc = "  \"enum\": ["]
12870#[doc = "    \"light_client_proof\""]
12871#[doc = "  ]"]
12872#[doc = "}"]
12873#[doc = r" ```"]
12874#[doc = r" </details>"]
12875#[derive(
12876    :: serde :: Deserialize,
12877    :: serde :: Serialize,
12878    Clone,
12879    Copy,
12880    Debug,
12881    Eq,
12882    Hash,
12883    Ord,
12884    PartialEq,
12885    PartialOrd,
12886)]
12887pub enum JsonRpcRequestForLightClientProofMethod {
12888    #[serde(rename = "light_client_proof")]
12889    LightClientProof,
12890}
12891impl ::std::convert::From<&Self> for JsonRpcRequestForLightClientProofMethod {
12892    fn from(value: &JsonRpcRequestForLightClientProofMethod) -> Self {
12893        value.clone()
12894    }
12895}
12896impl ::std::fmt::Display for JsonRpcRequestForLightClientProofMethod {
12897    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
12898        match *self {
12899            Self::LightClientProof => f.write_str("light_client_proof"),
12900        }
12901    }
12902}
12903impl ::std::str::FromStr for JsonRpcRequestForLightClientProofMethod {
12904    type Err = self::error::ConversionError;
12905    fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
12906        match value {
12907            "light_client_proof" => Ok(Self::LightClientProof),
12908            _ => Err("invalid value".into()),
12909        }
12910    }
12911}
12912impl ::std::convert::TryFrom<&str> for JsonRpcRequestForLightClientProofMethod {
12913    type Error = self::error::ConversionError;
12914    fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
12915        value.parse()
12916    }
12917}
12918impl ::std::convert::TryFrom<&::std::string::String> for JsonRpcRequestForLightClientProofMethod {
12919    type Error = self::error::ConversionError;
12920    fn try_from(
12921        value: &::std::string::String,
12922    ) -> ::std::result::Result<Self, self::error::ConversionError> {
12923        value.parse()
12924    }
12925}
12926impl ::std::convert::TryFrom<::std::string::String> for JsonRpcRequestForLightClientProofMethod {
12927    type Error = self::error::ConversionError;
12928    fn try_from(
12929        value: ::std::string::String,
12930    ) -> ::std::result::Result<Self, self::error::ConversionError> {
12931        value.parse()
12932    }
12933}
12934#[doc = "`JsonRpcRequestForMaintenanceWindows`"]
12935#[doc = r""]
12936#[doc = r" <details><summary>JSON schema</summary>"]
12937#[doc = r""]
12938#[doc = r" ```json"]
12939#[doc = "{"]
12940#[doc = "  \"title\": \"JsonRpcRequest_for_maintenance_windows\","]
12941#[doc = "  \"type\": \"object\","]
12942#[doc = "  \"required\": ["]
12943#[doc = "    \"id\","]
12944#[doc = "    \"jsonrpc\","]
12945#[doc = "    \"method\","]
12946#[doc = "    \"params\""]
12947#[doc = "  ],"]
12948#[doc = "  \"properties\": {"]
12949#[doc = "    \"id\": {"]
12950#[doc = "      \"type\": \"string\""]
12951#[doc = "    },"]
12952#[doc = "    \"jsonrpc\": {"]
12953#[doc = "      \"type\": \"string\""]
12954#[doc = "    },"]
12955#[doc = "    \"method\": {"]
12956#[doc = "      \"type\": \"string\","]
12957#[doc = "      \"enum\": ["]
12958#[doc = "        \"maintenance_windows\""]
12959#[doc = "      ]"]
12960#[doc = "    },"]
12961#[doc = "    \"params\": {"]
12962#[doc = "      \"$ref\": \"#/components/schemas/RpcMaintenanceWindowsRequest\""]
12963#[doc = "    }"]
12964#[doc = "  }"]
12965#[doc = "}"]
12966#[doc = r" ```"]
12967#[doc = r" </details>"]
12968#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
12969pub struct JsonRpcRequestForMaintenanceWindows {
12970    pub id: ::std::string::String,
12971    pub jsonrpc: ::std::string::String,
12972    pub method: JsonRpcRequestForMaintenanceWindowsMethod,
12973    pub params: RpcMaintenanceWindowsRequest,
12974}
12975impl ::std::convert::From<&JsonRpcRequestForMaintenanceWindows>
12976    for JsonRpcRequestForMaintenanceWindows
12977{
12978    fn from(value: &JsonRpcRequestForMaintenanceWindows) -> Self {
12979        value.clone()
12980    }
12981}
12982#[doc = "`JsonRpcRequestForMaintenanceWindowsMethod`"]
12983#[doc = r""]
12984#[doc = r" <details><summary>JSON schema</summary>"]
12985#[doc = r""]
12986#[doc = r" ```json"]
12987#[doc = "{"]
12988#[doc = "  \"type\": \"string\","]
12989#[doc = "  \"enum\": ["]
12990#[doc = "    \"maintenance_windows\""]
12991#[doc = "  ]"]
12992#[doc = "}"]
12993#[doc = r" ```"]
12994#[doc = r" </details>"]
12995#[derive(
12996    :: serde :: Deserialize,
12997    :: serde :: Serialize,
12998    Clone,
12999    Copy,
13000    Debug,
13001    Eq,
13002    Hash,
13003    Ord,
13004    PartialEq,
13005    PartialOrd,
13006)]
13007pub enum JsonRpcRequestForMaintenanceWindowsMethod {
13008    #[serde(rename = "maintenance_windows")]
13009    MaintenanceWindows,
13010}
13011impl ::std::convert::From<&Self> for JsonRpcRequestForMaintenanceWindowsMethod {
13012    fn from(value: &JsonRpcRequestForMaintenanceWindowsMethod) -> Self {
13013        value.clone()
13014    }
13015}
13016impl ::std::fmt::Display for JsonRpcRequestForMaintenanceWindowsMethod {
13017    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
13018        match *self {
13019            Self::MaintenanceWindows => f.write_str("maintenance_windows"),
13020        }
13021    }
13022}
13023impl ::std::str::FromStr for JsonRpcRequestForMaintenanceWindowsMethod {
13024    type Err = self::error::ConversionError;
13025    fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
13026        match value {
13027            "maintenance_windows" => Ok(Self::MaintenanceWindows),
13028            _ => Err("invalid value".into()),
13029        }
13030    }
13031}
13032impl ::std::convert::TryFrom<&str> for JsonRpcRequestForMaintenanceWindowsMethod {
13033    type Error = self::error::ConversionError;
13034    fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
13035        value.parse()
13036    }
13037}
13038impl ::std::convert::TryFrom<&::std::string::String> for JsonRpcRequestForMaintenanceWindowsMethod {
13039    type Error = self::error::ConversionError;
13040    fn try_from(
13041        value: &::std::string::String,
13042    ) -> ::std::result::Result<Self, self::error::ConversionError> {
13043        value.parse()
13044    }
13045}
13046impl ::std::convert::TryFrom<::std::string::String> for JsonRpcRequestForMaintenanceWindowsMethod {
13047    type Error = self::error::ConversionError;
13048    fn try_from(
13049        value: ::std::string::String,
13050    ) -> ::std::result::Result<Self, self::error::ConversionError> {
13051        value.parse()
13052    }
13053}
13054#[doc = "`JsonRpcRequestForNetworkInfo`"]
13055#[doc = r""]
13056#[doc = r" <details><summary>JSON schema</summary>"]
13057#[doc = r""]
13058#[doc = r" ```json"]
13059#[doc = "{"]
13060#[doc = "  \"title\": \"JsonRpcRequest_for_network_info\","]
13061#[doc = "  \"type\": \"object\","]
13062#[doc = "  \"required\": ["]
13063#[doc = "    \"id\","]
13064#[doc = "    \"jsonrpc\","]
13065#[doc = "    \"method\","]
13066#[doc = "    \"params\""]
13067#[doc = "  ],"]
13068#[doc = "  \"properties\": {"]
13069#[doc = "    \"id\": {"]
13070#[doc = "      \"type\": \"string\""]
13071#[doc = "    },"]
13072#[doc = "    \"jsonrpc\": {"]
13073#[doc = "      \"type\": \"string\""]
13074#[doc = "    },"]
13075#[doc = "    \"method\": {"]
13076#[doc = "      \"type\": \"string\","]
13077#[doc = "      \"enum\": ["]
13078#[doc = "        \"network_info\""]
13079#[doc = "      ]"]
13080#[doc = "    },"]
13081#[doc = "    \"params\": {"]
13082#[doc = "      \"$ref\": \"#/components/schemas/RpcNetworkInfoRequest\""]
13083#[doc = "    }"]
13084#[doc = "  }"]
13085#[doc = "}"]
13086#[doc = r" ```"]
13087#[doc = r" </details>"]
13088#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
13089pub struct JsonRpcRequestForNetworkInfo {
13090    pub id: ::std::string::String,
13091    pub jsonrpc: ::std::string::String,
13092    pub method: JsonRpcRequestForNetworkInfoMethod,
13093    pub params: RpcNetworkInfoRequest,
13094}
13095impl ::std::convert::From<&JsonRpcRequestForNetworkInfo> for JsonRpcRequestForNetworkInfo {
13096    fn from(value: &JsonRpcRequestForNetworkInfo) -> Self {
13097        value.clone()
13098    }
13099}
13100#[doc = "`JsonRpcRequestForNetworkInfoMethod`"]
13101#[doc = r""]
13102#[doc = r" <details><summary>JSON schema</summary>"]
13103#[doc = r""]
13104#[doc = r" ```json"]
13105#[doc = "{"]
13106#[doc = "  \"type\": \"string\","]
13107#[doc = "  \"enum\": ["]
13108#[doc = "    \"network_info\""]
13109#[doc = "  ]"]
13110#[doc = "}"]
13111#[doc = r" ```"]
13112#[doc = r" </details>"]
13113#[derive(
13114    :: serde :: Deserialize,
13115    :: serde :: Serialize,
13116    Clone,
13117    Copy,
13118    Debug,
13119    Eq,
13120    Hash,
13121    Ord,
13122    PartialEq,
13123    PartialOrd,
13124)]
13125pub enum JsonRpcRequestForNetworkInfoMethod {
13126    #[serde(rename = "network_info")]
13127    NetworkInfo,
13128}
13129impl ::std::convert::From<&Self> for JsonRpcRequestForNetworkInfoMethod {
13130    fn from(value: &JsonRpcRequestForNetworkInfoMethod) -> Self {
13131        value.clone()
13132    }
13133}
13134impl ::std::fmt::Display for JsonRpcRequestForNetworkInfoMethod {
13135    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
13136        match *self {
13137            Self::NetworkInfo => f.write_str("network_info"),
13138        }
13139    }
13140}
13141impl ::std::str::FromStr for JsonRpcRequestForNetworkInfoMethod {
13142    type Err = self::error::ConversionError;
13143    fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
13144        match value {
13145            "network_info" => Ok(Self::NetworkInfo),
13146            _ => Err("invalid value".into()),
13147        }
13148    }
13149}
13150impl ::std::convert::TryFrom<&str> for JsonRpcRequestForNetworkInfoMethod {
13151    type Error = self::error::ConversionError;
13152    fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
13153        value.parse()
13154    }
13155}
13156impl ::std::convert::TryFrom<&::std::string::String> for JsonRpcRequestForNetworkInfoMethod {
13157    type Error = self::error::ConversionError;
13158    fn try_from(
13159        value: &::std::string::String,
13160    ) -> ::std::result::Result<Self, self::error::ConversionError> {
13161        value.parse()
13162    }
13163}
13164impl ::std::convert::TryFrom<::std::string::String> for JsonRpcRequestForNetworkInfoMethod {
13165    type Error = self::error::ConversionError;
13166    fn try_from(
13167        value: ::std::string::String,
13168    ) -> ::std::result::Result<Self, self::error::ConversionError> {
13169        value.parse()
13170    }
13171}
13172#[doc = "`JsonRpcRequestForNextLightClientBlock`"]
13173#[doc = r""]
13174#[doc = r" <details><summary>JSON schema</summary>"]
13175#[doc = r""]
13176#[doc = r" ```json"]
13177#[doc = "{"]
13178#[doc = "  \"title\": \"JsonRpcRequest_for_next_light_client_block\","]
13179#[doc = "  \"type\": \"object\","]
13180#[doc = "  \"required\": ["]
13181#[doc = "    \"id\","]
13182#[doc = "    \"jsonrpc\","]
13183#[doc = "    \"method\","]
13184#[doc = "    \"params\""]
13185#[doc = "  ],"]
13186#[doc = "  \"properties\": {"]
13187#[doc = "    \"id\": {"]
13188#[doc = "      \"type\": \"string\""]
13189#[doc = "    },"]
13190#[doc = "    \"jsonrpc\": {"]
13191#[doc = "      \"type\": \"string\""]
13192#[doc = "    },"]
13193#[doc = "    \"method\": {"]
13194#[doc = "      \"type\": \"string\","]
13195#[doc = "      \"enum\": ["]
13196#[doc = "        \"next_light_client_block\""]
13197#[doc = "      ]"]
13198#[doc = "    },"]
13199#[doc = "    \"params\": {"]
13200#[doc = "      \"$ref\": \"#/components/schemas/RpcLightClientNextBlockRequest\""]
13201#[doc = "    }"]
13202#[doc = "  }"]
13203#[doc = "}"]
13204#[doc = r" ```"]
13205#[doc = r" </details>"]
13206#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
13207pub struct JsonRpcRequestForNextLightClientBlock {
13208    pub id: ::std::string::String,
13209    pub jsonrpc: ::std::string::String,
13210    pub method: JsonRpcRequestForNextLightClientBlockMethod,
13211    pub params: RpcLightClientNextBlockRequest,
13212}
13213impl ::std::convert::From<&JsonRpcRequestForNextLightClientBlock>
13214    for JsonRpcRequestForNextLightClientBlock
13215{
13216    fn from(value: &JsonRpcRequestForNextLightClientBlock) -> Self {
13217        value.clone()
13218    }
13219}
13220#[doc = "`JsonRpcRequestForNextLightClientBlockMethod`"]
13221#[doc = r""]
13222#[doc = r" <details><summary>JSON schema</summary>"]
13223#[doc = r""]
13224#[doc = r" ```json"]
13225#[doc = "{"]
13226#[doc = "  \"type\": \"string\","]
13227#[doc = "  \"enum\": ["]
13228#[doc = "    \"next_light_client_block\""]
13229#[doc = "  ]"]
13230#[doc = "}"]
13231#[doc = r" ```"]
13232#[doc = r" </details>"]
13233#[derive(
13234    :: serde :: Deserialize,
13235    :: serde :: Serialize,
13236    Clone,
13237    Copy,
13238    Debug,
13239    Eq,
13240    Hash,
13241    Ord,
13242    PartialEq,
13243    PartialOrd,
13244)]
13245pub enum JsonRpcRequestForNextLightClientBlockMethod {
13246    #[serde(rename = "next_light_client_block")]
13247    NextLightClientBlock,
13248}
13249impl ::std::convert::From<&Self> for JsonRpcRequestForNextLightClientBlockMethod {
13250    fn from(value: &JsonRpcRequestForNextLightClientBlockMethod) -> Self {
13251        value.clone()
13252    }
13253}
13254impl ::std::fmt::Display for JsonRpcRequestForNextLightClientBlockMethod {
13255    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
13256        match *self {
13257            Self::NextLightClientBlock => f.write_str("next_light_client_block"),
13258        }
13259    }
13260}
13261impl ::std::str::FromStr for JsonRpcRequestForNextLightClientBlockMethod {
13262    type Err = self::error::ConversionError;
13263    fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
13264        match value {
13265            "next_light_client_block" => Ok(Self::NextLightClientBlock),
13266            _ => Err("invalid value".into()),
13267        }
13268    }
13269}
13270impl ::std::convert::TryFrom<&str> for JsonRpcRequestForNextLightClientBlockMethod {
13271    type Error = self::error::ConversionError;
13272    fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
13273        value.parse()
13274    }
13275}
13276impl ::std::convert::TryFrom<&::std::string::String>
13277    for JsonRpcRequestForNextLightClientBlockMethod
13278{
13279    type Error = self::error::ConversionError;
13280    fn try_from(
13281        value: &::std::string::String,
13282    ) -> ::std::result::Result<Self, self::error::ConversionError> {
13283        value.parse()
13284    }
13285}
13286impl ::std::convert::TryFrom<::std::string::String>
13287    for JsonRpcRequestForNextLightClientBlockMethod
13288{
13289    type Error = self::error::ConversionError;
13290    fn try_from(
13291        value: ::std::string::String,
13292    ) -> ::std::result::Result<Self, self::error::ConversionError> {
13293        value.parse()
13294    }
13295}
13296#[doc = "`JsonRpcRequestForQuery`"]
13297#[doc = r""]
13298#[doc = r" <details><summary>JSON schema</summary>"]
13299#[doc = r""]
13300#[doc = r" ```json"]
13301#[doc = "{"]
13302#[doc = "  \"title\": \"JsonRpcRequest_for_query\","]
13303#[doc = "  \"type\": \"object\","]
13304#[doc = "  \"required\": ["]
13305#[doc = "    \"id\","]
13306#[doc = "    \"jsonrpc\","]
13307#[doc = "    \"method\","]
13308#[doc = "    \"params\""]
13309#[doc = "  ],"]
13310#[doc = "  \"properties\": {"]
13311#[doc = "    \"id\": {"]
13312#[doc = "      \"type\": \"string\""]
13313#[doc = "    },"]
13314#[doc = "    \"jsonrpc\": {"]
13315#[doc = "      \"type\": \"string\""]
13316#[doc = "    },"]
13317#[doc = "    \"method\": {"]
13318#[doc = "      \"type\": \"string\","]
13319#[doc = "      \"enum\": ["]
13320#[doc = "        \"query\""]
13321#[doc = "      ]"]
13322#[doc = "    },"]
13323#[doc = "    \"params\": {"]
13324#[doc = "      \"$ref\": \"#/components/schemas/RpcQueryRequest\""]
13325#[doc = "    }"]
13326#[doc = "  }"]
13327#[doc = "}"]
13328#[doc = r" ```"]
13329#[doc = r" </details>"]
13330#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
13331pub struct JsonRpcRequestForQuery {
13332    pub id: ::std::string::String,
13333    pub jsonrpc: ::std::string::String,
13334    pub method: JsonRpcRequestForQueryMethod,
13335    pub params: RpcQueryRequest,
13336}
13337impl ::std::convert::From<&JsonRpcRequestForQuery> for JsonRpcRequestForQuery {
13338    fn from(value: &JsonRpcRequestForQuery) -> Self {
13339        value.clone()
13340    }
13341}
13342#[doc = "`JsonRpcRequestForQueryMethod`"]
13343#[doc = r""]
13344#[doc = r" <details><summary>JSON schema</summary>"]
13345#[doc = r""]
13346#[doc = r" ```json"]
13347#[doc = "{"]
13348#[doc = "  \"type\": \"string\","]
13349#[doc = "  \"enum\": ["]
13350#[doc = "    \"query\""]
13351#[doc = "  ]"]
13352#[doc = "}"]
13353#[doc = r" ```"]
13354#[doc = r" </details>"]
13355#[derive(
13356    :: serde :: Deserialize,
13357    :: serde :: Serialize,
13358    Clone,
13359    Copy,
13360    Debug,
13361    Eq,
13362    Hash,
13363    Ord,
13364    PartialEq,
13365    PartialOrd,
13366)]
13367pub enum JsonRpcRequestForQueryMethod {
13368    #[serde(rename = "query")]
13369    Query,
13370}
13371impl ::std::convert::From<&Self> for JsonRpcRequestForQueryMethod {
13372    fn from(value: &JsonRpcRequestForQueryMethod) -> Self {
13373        value.clone()
13374    }
13375}
13376impl ::std::fmt::Display for JsonRpcRequestForQueryMethod {
13377    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
13378        match *self {
13379            Self::Query => f.write_str("query"),
13380        }
13381    }
13382}
13383impl ::std::str::FromStr for JsonRpcRequestForQueryMethod {
13384    type Err = self::error::ConversionError;
13385    fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
13386        match value {
13387            "query" => Ok(Self::Query),
13388            _ => Err("invalid value".into()),
13389        }
13390    }
13391}
13392impl ::std::convert::TryFrom<&str> for JsonRpcRequestForQueryMethod {
13393    type Error = self::error::ConversionError;
13394    fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
13395        value.parse()
13396    }
13397}
13398impl ::std::convert::TryFrom<&::std::string::String> for JsonRpcRequestForQueryMethod {
13399    type Error = self::error::ConversionError;
13400    fn try_from(
13401        value: &::std::string::String,
13402    ) -> ::std::result::Result<Self, self::error::ConversionError> {
13403        value.parse()
13404    }
13405}
13406impl ::std::convert::TryFrom<::std::string::String> for JsonRpcRequestForQueryMethod {
13407    type Error = self::error::ConversionError;
13408    fn try_from(
13409        value: ::std::string::String,
13410    ) -> ::std::result::Result<Self, self::error::ConversionError> {
13411        value.parse()
13412    }
13413}
13414#[doc = "`JsonRpcRequestForSendTx`"]
13415#[doc = r""]
13416#[doc = r" <details><summary>JSON schema</summary>"]
13417#[doc = r""]
13418#[doc = r" ```json"]
13419#[doc = "{"]
13420#[doc = "  \"title\": \"JsonRpcRequest_for_send_tx\","]
13421#[doc = "  \"type\": \"object\","]
13422#[doc = "  \"required\": ["]
13423#[doc = "    \"id\","]
13424#[doc = "    \"jsonrpc\","]
13425#[doc = "    \"method\","]
13426#[doc = "    \"params\""]
13427#[doc = "  ],"]
13428#[doc = "  \"properties\": {"]
13429#[doc = "    \"id\": {"]
13430#[doc = "      \"type\": \"string\""]
13431#[doc = "    },"]
13432#[doc = "    \"jsonrpc\": {"]
13433#[doc = "      \"type\": \"string\""]
13434#[doc = "    },"]
13435#[doc = "    \"method\": {"]
13436#[doc = "      \"type\": \"string\","]
13437#[doc = "      \"enum\": ["]
13438#[doc = "        \"send_tx\""]
13439#[doc = "      ]"]
13440#[doc = "    },"]
13441#[doc = "    \"params\": {"]
13442#[doc = "      \"$ref\": \"#/components/schemas/RpcSendTransactionRequest\""]
13443#[doc = "    }"]
13444#[doc = "  }"]
13445#[doc = "}"]
13446#[doc = r" ```"]
13447#[doc = r" </details>"]
13448#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
13449pub struct JsonRpcRequestForSendTx {
13450    pub id: ::std::string::String,
13451    pub jsonrpc: ::std::string::String,
13452    pub method: JsonRpcRequestForSendTxMethod,
13453    pub params: RpcSendTransactionRequest,
13454}
13455impl ::std::convert::From<&JsonRpcRequestForSendTx> for JsonRpcRequestForSendTx {
13456    fn from(value: &JsonRpcRequestForSendTx) -> Self {
13457        value.clone()
13458    }
13459}
13460#[doc = "`JsonRpcRequestForSendTxMethod`"]
13461#[doc = r""]
13462#[doc = r" <details><summary>JSON schema</summary>"]
13463#[doc = r""]
13464#[doc = r" ```json"]
13465#[doc = "{"]
13466#[doc = "  \"type\": \"string\","]
13467#[doc = "  \"enum\": ["]
13468#[doc = "    \"send_tx\""]
13469#[doc = "  ]"]
13470#[doc = "}"]
13471#[doc = r" ```"]
13472#[doc = r" </details>"]
13473#[derive(
13474    :: serde :: Deserialize,
13475    :: serde :: Serialize,
13476    Clone,
13477    Copy,
13478    Debug,
13479    Eq,
13480    Hash,
13481    Ord,
13482    PartialEq,
13483    PartialOrd,
13484)]
13485pub enum JsonRpcRequestForSendTxMethod {
13486    #[serde(rename = "send_tx")]
13487    SendTx,
13488}
13489impl ::std::convert::From<&Self> for JsonRpcRequestForSendTxMethod {
13490    fn from(value: &JsonRpcRequestForSendTxMethod) -> Self {
13491        value.clone()
13492    }
13493}
13494impl ::std::fmt::Display for JsonRpcRequestForSendTxMethod {
13495    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
13496        match *self {
13497            Self::SendTx => f.write_str("send_tx"),
13498        }
13499    }
13500}
13501impl ::std::str::FromStr for JsonRpcRequestForSendTxMethod {
13502    type Err = self::error::ConversionError;
13503    fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
13504        match value {
13505            "send_tx" => Ok(Self::SendTx),
13506            _ => Err("invalid value".into()),
13507        }
13508    }
13509}
13510impl ::std::convert::TryFrom<&str> for JsonRpcRequestForSendTxMethod {
13511    type Error = self::error::ConversionError;
13512    fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
13513        value.parse()
13514    }
13515}
13516impl ::std::convert::TryFrom<&::std::string::String> for JsonRpcRequestForSendTxMethod {
13517    type Error = self::error::ConversionError;
13518    fn try_from(
13519        value: &::std::string::String,
13520    ) -> ::std::result::Result<Self, self::error::ConversionError> {
13521        value.parse()
13522    }
13523}
13524impl ::std::convert::TryFrom<::std::string::String> for JsonRpcRequestForSendTxMethod {
13525    type Error = self::error::ConversionError;
13526    fn try_from(
13527        value: ::std::string::String,
13528    ) -> ::std::result::Result<Self, self::error::ConversionError> {
13529        value.parse()
13530    }
13531}
13532#[doc = "`JsonRpcRequestForStatus`"]
13533#[doc = r""]
13534#[doc = r" <details><summary>JSON schema</summary>"]
13535#[doc = r""]
13536#[doc = r" ```json"]
13537#[doc = "{"]
13538#[doc = "  \"title\": \"JsonRpcRequest_for_status\","]
13539#[doc = "  \"type\": \"object\","]
13540#[doc = "  \"required\": ["]
13541#[doc = "    \"id\","]
13542#[doc = "    \"jsonrpc\","]
13543#[doc = "    \"method\","]
13544#[doc = "    \"params\""]
13545#[doc = "  ],"]
13546#[doc = "  \"properties\": {"]
13547#[doc = "    \"id\": {"]
13548#[doc = "      \"type\": \"string\""]
13549#[doc = "    },"]
13550#[doc = "    \"jsonrpc\": {"]
13551#[doc = "      \"type\": \"string\""]
13552#[doc = "    },"]
13553#[doc = "    \"method\": {"]
13554#[doc = "      \"type\": \"string\","]
13555#[doc = "      \"enum\": ["]
13556#[doc = "        \"status\""]
13557#[doc = "      ]"]
13558#[doc = "    },"]
13559#[doc = "    \"params\": {"]
13560#[doc = "      \"$ref\": \"#/components/schemas/RpcStatusRequest\""]
13561#[doc = "    }"]
13562#[doc = "  }"]
13563#[doc = "}"]
13564#[doc = r" ```"]
13565#[doc = r" </details>"]
13566#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
13567pub struct JsonRpcRequestForStatus {
13568    pub id: ::std::string::String,
13569    pub jsonrpc: ::std::string::String,
13570    pub method: JsonRpcRequestForStatusMethod,
13571    pub params: RpcStatusRequest,
13572}
13573impl ::std::convert::From<&JsonRpcRequestForStatus> for JsonRpcRequestForStatus {
13574    fn from(value: &JsonRpcRequestForStatus) -> Self {
13575        value.clone()
13576    }
13577}
13578#[doc = "`JsonRpcRequestForStatusMethod`"]
13579#[doc = r""]
13580#[doc = r" <details><summary>JSON schema</summary>"]
13581#[doc = r""]
13582#[doc = r" ```json"]
13583#[doc = "{"]
13584#[doc = "  \"type\": \"string\","]
13585#[doc = "  \"enum\": ["]
13586#[doc = "    \"status\""]
13587#[doc = "  ]"]
13588#[doc = "}"]
13589#[doc = r" ```"]
13590#[doc = r" </details>"]
13591#[derive(
13592    :: serde :: Deserialize,
13593    :: serde :: Serialize,
13594    Clone,
13595    Copy,
13596    Debug,
13597    Eq,
13598    Hash,
13599    Ord,
13600    PartialEq,
13601    PartialOrd,
13602)]
13603pub enum JsonRpcRequestForStatusMethod {
13604    #[serde(rename = "status")]
13605    Status,
13606}
13607impl ::std::convert::From<&Self> for JsonRpcRequestForStatusMethod {
13608    fn from(value: &JsonRpcRequestForStatusMethod) -> Self {
13609        value.clone()
13610    }
13611}
13612impl ::std::fmt::Display for JsonRpcRequestForStatusMethod {
13613    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
13614        match *self {
13615            Self::Status => f.write_str("status"),
13616        }
13617    }
13618}
13619impl ::std::str::FromStr for JsonRpcRequestForStatusMethod {
13620    type Err = self::error::ConversionError;
13621    fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
13622        match value {
13623            "status" => Ok(Self::Status),
13624            _ => Err("invalid value".into()),
13625        }
13626    }
13627}
13628impl ::std::convert::TryFrom<&str> for JsonRpcRequestForStatusMethod {
13629    type Error = self::error::ConversionError;
13630    fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
13631        value.parse()
13632    }
13633}
13634impl ::std::convert::TryFrom<&::std::string::String> for JsonRpcRequestForStatusMethod {
13635    type Error = self::error::ConversionError;
13636    fn try_from(
13637        value: &::std::string::String,
13638    ) -> ::std::result::Result<Self, self::error::ConversionError> {
13639        value.parse()
13640    }
13641}
13642impl ::std::convert::TryFrom<::std::string::String> for JsonRpcRequestForStatusMethod {
13643    type Error = self::error::ConversionError;
13644    fn try_from(
13645        value: ::std::string::String,
13646    ) -> ::std::result::Result<Self, self::error::ConversionError> {
13647        value.parse()
13648    }
13649}
13650#[doc = "`JsonRpcRequestForTx`"]
13651#[doc = r""]
13652#[doc = r" <details><summary>JSON schema</summary>"]
13653#[doc = r""]
13654#[doc = r" ```json"]
13655#[doc = "{"]
13656#[doc = "  \"title\": \"JsonRpcRequest_for_tx\","]
13657#[doc = "  \"type\": \"object\","]
13658#[doc = "  \"required\": ["]
13659#[doc = "    \"id\","]
13660#[doc = "    \"jsonrpc\","]
13661#[doc = "    \"method\","]
13662#[doc = "    \"params\""]
13663#[doc = "  ],"]
13664#[doc = "  \"properties\": {"]
13665#[doc = "    \"id\": {"]
13666#[doc = "      \"type\": \"string\""]
13667#[doc = "    },"]
13668#[doc = "    \"jsonrpc\": {"]
13669#[doc = "      \"type\": \"string\""]
13670#[doc = "    },"]
13671#[doc = "    \"method\": {"]
13672#[doc = "      \"type\": \"string\","]
13673#[doc = "      \"enum\": ["]
13674#[doc = "        \"tx\""]
13675#[doc = "      ]"]
13676#[doc = "    },"]
13677#[doc = "    \"params\": {"]
13678#[doc = "      \"$ref\": \"#/components/schemas/RpcTransactionStatusRequest\""]
13679#[doc = "    }"]
13680#[doc = "  }"]
13681#[doc = "}"]
13682#[doc = r" ```"]
13683#[doc = r" </details>"]
13684#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
13685pub struct JsonRpcRequestForTx {
13686    pub id: ::std::string::String,
13687    pub jsonrpc: ::std::string::String,
13688    pub method: JsonRpcRequestForTxMethod,
13689    pub params: RpcTransactionStatusRequest,
13690}
13691impl ::std::convert::From<&JsonRpcRequestForTx> for JsonRpcRequestForTx {
13692    fn from(value: &JsonRpcRequestForTx) -> Self {
13693        value.clone()
13694    }
13695}
13696#[doc = "`JsonRpcRequestForTxMethod`"]
13697#[doc = r""]
13698#[doc = r" <details><summary>JSON schema</summary>"]
13699#[doc = r""]
13700#[doc = r" ```json"]
13701#[doc = "{"]
13702#[doc = "  \"type\": \"string\","]
13703#[doc = "  \"enum\": ["]
13704#[doc = "    \"tx\""]
13705#[doc = "  ]"]
13706#[doc = "}"]
13707#[doc = r" ```"]
13708#[doc = r" </details>"]
13709#[derive(
13710    :: serde :: Deserialize,
13711    :: serde :: Serialize,
13712    Clone,
13713    Copy,
13714    Debug,
13715    Eq,
13716    Hash,
13717    Ord,
13718    PartialEq,
13719    PartialOrd,
13720)]
13721pub enum JsonRpcRequestForTxMethod {
13722    #[serde(rename = "tx")]
13723    Tx,
13724}
13725impl ::std::convert::From<&Self> for JsonRpcRequestForTxMethod {
13726    fn from(value: &JsonRpcRequestForTxMethod) -> Self {
13727        value.clone()
13728    }
13729}
13730impl ::std::fmt::Display for JsonRpcRequestForTxMethod {
13731    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
13732        match *self {
13733            Self::Tx => f.write_str("tx"),
13734        }
13735    }
13736}
13737impl ::std::str::FromStr for JsonRpcRequestForTxMethod {
13738    type Err = self::error::ConversionError;
13739    fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
13740        match value {
13741            "tx" => Ok(Self::Tx),
13742            _ => Err("invalid value".into()),
13743        }
13744    }
13745}
13746impl ::std::convert::TryFrom<&str> for JsonRpcRequestForTxMethod {
13747    type Error = self::error::ConversionError;
13748    fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
13749        value.parse()
13750    }
13751}
13752impl ::std::convert::TryFrom<&::std::string::String> for JsonRpcRequestForTxMethod {
13753    type Error = self::error::ConversionError;
13754    fn try_from(
13755        value: &::std::string::String,
13756    ) -> ::std::result::Result<Self, self::error::ConversionError> {
13757        value.parse()
13758    }
13759}
13760impl ::std::convert::TryFrom<::std::string::String> for JsonRpcRequestForTxMethod {
13761    type Error = self::error::ConversionError;
13762    fn try_from(
13763        value: ::std::string::String,
13764    ) -> ::std::result::Result<Self, self::error::ConversionError> {
13765        value.parse()
13766    }
13767}
13768#[doc = "`JsonRpcRequestForValidators`"]
13769#[doc = r""]
13770#[doc = r" <details><summary>JSON schema</summary>"]
13771#[doc = r""]
13772#[doc = r" ```json"]
13773#[doc = "{"]
13774#[doc = "  \"title\": \"JsonRpcRequest_for_validators\","]
13775#[doc = "  \"type\": \"object\","]
13776#[doc = "  \"required\": ["]
13777#[doc = "    \"id\","]
13778#[doc = "    \"jsonrpc\","]
13779#[doc = "    \"method\","]
13780#[doc = "    \"params\""]
13781#[doc = "  ],"]
13782#[doc = "  \"properties\": {"]
13783#[doc = "    \"id\": {"]
13784#[doc = "      \"type\": \"string\""]
13785#[doc = "    },"]
13786#[doc = "    \"jsonrpc\": {"]
13787#[doc = "      \"type\": \"string\""]
13788#[doc = "    },"]
13789#[doc = "    \"method\": {"]
13790#[doc = "      \"type\": \"string\","]
13791#[doc = "      \"enum\": ["]
13792#[doc = "        \"validators\""]
13793#[doc = "      ]"]
13794#[doc = "    },"]
13795#[doc = "    \"params\": {"]
13796#[doc = "      \"$ref\": \"#/components/schemas/RpcValidatorRequest\""]
13797#[doc = "    }"]
13798#[doc = "  }"]
13799#[doc = "}"]
13800#[doc = r" ```"]
13801#[doc = r" </details>"]
13802#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
13803pub struct JsonRpcRequestForValidators {
13804    pub id: ::std::string::String,
13805    pub jsonrpc: ::std::string::String,
13806    pub method: JsonRpcRequestForValidatorsMethod,
13807    pub params: RpcValidatorRequest,
13808}
13809impl ::std::convert::From<&JsonRpcRequestForValidators> for JsonRpcRequestForValidators {
13810    fn from(value: &JsonRpcRequestForValidators) -> Self {
13811        value.clone()
13812    }
13813}
13814#[doc = "`JsonRpcRequestForValidatorsMethod`"]
13815#[doc = r""]
13816#[doc = r" <details><summary>JSON schema</summary>"]
13817#[doc = r""]
13818#[doc = r" ```json"]
13819#[doc = "{"]
13820#[doc = "  \"type\": \"string\","]
13821#[doc = "  \"enum\": ["]
13822#[doc = "    \"validators\""]
13823#[doc = "  ]"]
13824#[doc = "}"]
13825#[doc = r" ```"]
13826#[doc = r" </details>"]
13827#[derive(
13828    :: serde :: Deserialize,
13829    :: serde :: Serialize,
13830    Clone,
13831    Copy,
13832    Debug,
13833    Eq,
13834    Hash,
13835    Ord,
13836    PartialEq,
13837    PartialOrd,
13838)]
13839pub enum JsonRpcRequestForValidatorsMethod {
13840    #[serde(rename = "validators")]
13841    Validators,
13842}
13843impl ::std::convert::From<&Self> for JsonRpcRequestForValidatorsMethod {
13844    fn from(value: &JsonRpcRequestForValidatorsMethod) -> Self {
13845        value.clone()
13846    }
13847}
13848impl ::std::fmt::Display for JsonRpcRequestForValidatorsMethod {
13849    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
13850        match *self {
13851            Self::Validators => f.write_str("validators"),
13852        }
13853    }
13854}
13855impl ::std::str::FromStr for JsonRpcRequestForValidatorsMethod {
13856    type Err = self::error::ConversionError;
13857    fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
13858        match value {
13859            "validators" => Ok(Self::Validators),
13860            _ => Err("invalid value".into()),
13861        }
13862    }
13863}
13864impl ::std::convert::TryFrom<&str> for JsonRpcRequestForValidatorsMethod {
13865    type Error = self::error::ConversionError;
13866    fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
13867        value.parse()
13868    }
13869}
13870impl ::std::convert::TryFrom<&::std::string::String> for JsonRpcRequestForValidatorsMethod {
13871    type Error = self::error::ConversionError;
13872    fn try_from(
13873        value: &::std::string::String,
13874    ) -> ::std::result::Result<Self, self::error::ConversionError> {
13875        value.parse()
13876    }
13877}
13878impl ::std::convert::TryFrom<::std::string::String> for JsonRpcRequestForValidatorsMethod {
13879    type Error = self::error::ConversionError;
13880    fn try_from(
13881        value: ::std::string::String,
13882    ) -> ::std::result::Result<Self, self::error::ConversionError> {
13883        value.parse()
13884    }
13885}
13886#[doc = "`JsonRpcResponseForArrayOfRangeOfUint64AndRpcError`"]
13887#[doc = r""]
13888#[doc = r" <details><summary>JSON schema</summary>"]
13889#[doc = r""]
13890#[doc = r" ```json"]
13891#[doc = "{"]
13892#[doc = "  \"title\": \"JsonRpcResponse_for_Array_of_Range_of_uint64_and_RpcError\","]
13893#[doc = "  \"type\": \"object\","]
13894#[doc = "  \"oneOf\": ["]
13895#[doc = "    {"]
13896#[doc = "      \"type\": \"object\","]
13897#[doc = "      \"required\": ["]
13898#[doc = "        \"result\""]
13899#[doc = "      ],"]
13900#[doc = "      \"properties\": {"]
13901#[doc = "        \"result\": {"]
13902#[doc = "          \"type\": \"array\","]
13903#[doc = "          \"items\": {"]
13904#[doc = "            \"$ref\": \"#/components/schemas/Range_of_uint64\""]
13905#[doc = "          }"]
13906#[doc = "        }"]
13907#[doc = "      }"]
13908#[doc = "    },"]
13909#[doc = "    {"]
13910#[doc = "      \"type\": \"object\","]
13911#[doc = "      \"required\": ["]
13912#[doc = "        \"error\""]
13913#[doc = "      ],"]
13914#[doc = "      \"properties\": {"]
13915#[doc = "        \"error\": {"]
13916#[doc = "          \"$ref\": \"#/components/schemas/RpcError\""]
13917#[doc = "        }"]
13918#[doc = "      }"]
13919#[doc = "    }"]
13920#[doc = "  ],"]
13921#[doc = "  \"required\": ["]
13922#[doc = "    \"id\","]
13923#[doc = "    \"jsonrpc\""]
13924#[doc = "  ],"]
13925#[doc = "  \"properties\": {"]
13926#[doc = "    \"id\": {"]
13927#[doc = "      \"type\": \"string\""]
13928#[doc = "    },"]
13929#[doc = "    \"jsonrpc\": {"]
13930#[doc = "      \"type\": \"string\""]
13931#[doc = "    }"]
13932#[doc = "  }"]
13933#[doc = "}"]
13934#[doc = r" ```"]
13935#[doc = r" </details>"]
13936#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
13937#[serde(untagged)]
13938pub enum JsonRpcResponseForArrayOfRangeOfUint64AndRpcError {
13939    Variant0 {
13940        id: ::std::string::String,
13941        jsonrpc: ::std::string::String,
13942        result: ::std::vec::Vec<RangeOfUint64>,
13943    },
13944    Variant1 {
13945        error: RpcError,
13946        id: ::std::string::String,
13947        jsonrpc: ::std::string::String,
13948    },
13949}
13950impl ::std::convert::From<&Self> for JsonRpcResponseForArrayOfRangeOfUint64AndRpcError {
13951    fn from(value: &JsonRpcResponseForArrayOfRangeOfUint64AndRpcError) -> Self {
13952        value.clone()
13953    }
13954}
13955#[doc = "`JsonRpcResponseForArrayOfValidatorStakeViewAndRpcError`"]
13956#[doc = r""]
13957#[doc = r" <details><summary>JSON schema</summary>"]
13958#[doc = r""]
13959#[doc = r" ```json"]
13960#[doc = "{"]
13961#[doc = "  \"title\": \"JsonRpcResponse_for_Array_of_ValidatorStakeView_and_RpcError\","]
13962#[doc = "  \"type\": \"object\","]
13963#[doc = "  \"oneOf\": ["]
13964#[doc = "    {"]
13965#[doc = "      \"type\": \"object\","]
13966#[doc = "      \"required\": ["]
13967#[doc = "        \"result\""]
13968#[doc = "      ],"]
13969#[doc = "      \"properties\": {"]
13970#[doc = "        \"result\": {"]
13971#[doc = "          \"type\": \"array\","]
13972#[doc = "          \"items\": {"]
13973#[doc = "            \"$ref\": \"#/components/schemas/ValidatorStakeView\""]
13974#[doc = "          }"]
13975#[doc = "        }"]
13976#[doc = "      }"]
13977#[doc = "    },"]
13978#[doc = "    {"]
13979#[doc = "      \"type\": \"object\","]
13980#[doc = "      \"required\": ["]
13981#[doc = "        \"error\""]
13982#[doc = "      ],"]
13983#[doc = "      \"properties\": {"]
13984#[doc = "        \"error\": {"]
13985#[doc = "          \"$ref\": \"#/components/schemas/RpcError\""]
13986#[doc = "        }"]
13987#[doc = "      }"]
13988#[doc = "    }"]
13989#[doc = "  ],"]
13990#[doc = "  \"required\": ["]
13991#[doc = "    \"id\","]
13992#[doc = "    \"jsonrpc\""]
13993#[doc = "  ],"]
13994#[doc = "  \"properties\": {"]
13995#[doc = "    \"id\": {"]
13996#[doc = "      \"type\": \"string\""]
13997#[doc = "    },"]
13998#[doc = "    \"jsonrpc\": {"]
13999#[doc = "      \"type\": \"string\""]
14000#[doc = "    }"]
14001#[doc = "  }"]
14002#[doc = "}"]
14003#[doc = r" ```"]
14004#[doc = r" </details>"]
14005#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
14006#[serde(untagged)]
14007pub enum JsonRpcResponseForArrayOfValidatorStakeViewAndRpcError {
14008    Variant0 {
14009        id: ::std::string::String,
14010        jsonrpc: ::std::string::String,
14011        result: ::std::vec::Vec<ValidatorStakeView>,
14012    },
14013    Variant1 {
14014        error: RpcError,
14015        id: ::std::string::String,
14016        jsonrpc: ::std::string::String,
14017    },
14018}
14019impl ::std::convert::From<&Self> for JsonRpcResponseForArrayOfValidatorStakeViewAndRpcError {
14020    fn from(value: &JsonRpcResponseForArrayOfValidatorStakeViewAndRpcError) -> Self {
14021        value.clone()
14022    }
14023}
14024#[doc = "`JsonRpcResponseForCryptoHashAndRpcError`"]
14025#[doc = r""]
14026#[doc = r" <details><summary>JSON schema</summary>"]
14027#[doc = r""]
14028#[doc = r" ```json"]
14029#[doc = "{"]
14030#[doc = "  \"title\": \"JsonRpcResponse_for_CryptoHash_and_RpcError\","]
14031#[doc = "  \"type\": \"object\","]
14032#[doc = "  \"oneOf\": ["]
14033#[doc = "    {"]
14034#[doc = "      \"type\": \"object\","]
14035#[doc = "      \"required\": ["]
14036#[doc = "        \"result\""]
14037#[doc = "      ],"]
14038#[doc = "      \"properties\": {"]
14039#[doc = "        \"result\": {"]
14040#[doc = "          \"$ref\": \"#/components/schemas/CryptoHash\""]
14041#[doc = "        }"]
14042#[doc = "      }"]
14043#[doc = "    },"]
14044#[doc = "    {"]
14045#[doc = "      \"type\": \"object\","]
14046#[doc = "      \"required\": ["]
14047#[doc = "        \"error\""]
14048#[doc = "      ],"]
14049#[doc = "      \"properties\": {"]
14050#[doc = "        \"error\": {"]
14051#[doc = "          \"$ref\": \"#/components/schemas/RpcError\""]
14052#[doc = "        }"]
14053#[doc = "      }"]
14054#[doc = "    }"]
14055#[doc = "  ],"]
14056#[doc = "  \"required\": ["]
14057#[doc = "    \"id\","]
14058#[doc = "    \"jsonrpc\""]
14059#[doc = "  ],"]
14060#[doc = "  \"properties\": {"]
14061#[doc = "    \"id\": {"]
14062#[doc = "      \"type\": \"string\""]
14063#[doc = "    },"]
14064#[doc = "    \"jsonrpc\": {"]
14065#[doc = "      \"type\": \"string\""]
14066#[doc = "    }"]
14067#[doc = "  }"]
14068#[doc = "}"]
14069#[doc = r" ```"]
14070#[doc = r" </details>"]
14071#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
14072#[serde(untagged)]
14073pub enum JsonRpcResponseForCryptoHashAndRpcError {
14074    Variant0 {
14075        id: ::std::string::String,
14076        jsonrpc: ::std::string::String,
14077        result: CryptoHash,
14078    },
14079    Variant1 {
14080        error: RpcError,
14081        id: ::std::string::String,
14082        jsonrpc: ::std::string::String,
14083    },
14084}
14085impl ::std::convert::From<&Self> for JsonRpcResponseForCryptoHashAndRpcError {
14086    fn from(value: &JsonRpcResponseForCryptoHashAndRpcError) -> Self {
14087        value.clone()
14088    }
14089}
14090#[doc = "`JsonRpcResponseForGenesisConfigAndRpcError`"]
14091#[doc = r""]
14092#[doc = r" <details><summary>JSON schema</summary>"]
14093#[doc = r""]
14094#[doc = r" ```json"]
14095#[doc = "{"]
14096#[doc = "  \"title\": \"JsonRpcResponse_for_GenesisConfig_and_RpcError\","]
14097#[doc = "  \"type\": \"object\","]
14098#[doc = "  \"oneOf\": ["]
14099#[doc = "    {"]
14100#[doc = "      \"type\": \"object\","]
14101#[doc = "      \"required\": ["]
14102#[doc = "        \"result\""]
14103#[doc = "      ],"]
14104#[doc = "      \"properties\": {"]
14105#[doc = "        \"result\": {"]
14106#[doc = "          \"$ref\": \"#/components/schemas/GenesisConfig\""]
14107#[doc = "        }"]
14108#[doc = "      }"]
14109#[doc = "    },"]
14110#[doc = "    {"]
14111#[doc = "      \"type\": \"object\","]
14112#[doc = "      \"required\": ["]
14113#[doc = "        \"error\""]
14114#[doc = "      ],"]
14115#[doc = "      \"properties\": {"]
14116#[doc = "        \"error\": {"]
14117#[doc = "          \"$ref\": \"#/components/schemas/RpcError\""]
14118#[doc = "        }"]
14119#[doc = "      }"]
14120#[doc = "    }"]
14121#[doc = "  ],"]
14122#[doc = "  \"required\": ["]
14123#[doc = "    \"id\","]
14124#[doc = "    \"jsonrpc\""]
14125#[doc = "  ],"]
14126#[doc = "  \"properties\": {"]
14127#[doc = "    \"id\": {"]
14128#[doc = "      \"type\": \"string\""]
14129#[doc = "    },"]
14130#[doc = "    \"jsonrpc\": {"]
14131#[doc = "      \"type\": \"string\""]
14132#[doc = "    }"]
14133#[doc = "  }"]
14134#[doc = "}"]
14135#[doc = r" ```"]
14136#[doc = r" </details>"]
14137#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
14138#[serde(untagged)]
14139pub enum JsonRpcResponseForGenesisConfigAndRpcError {
14140    Variant0 {
14141        id: ::std::string::String,
14142        jsonrpc: ::std::string::String,
14143        result: GenesisConfig,
14144    },
14145    Variant1 {
14146        error: RpcError,
14147        id: ::std::string::String,
14148        jsonrpc: ::std::string::String,
14149    },
14150}
14151impl ::std::convert::From<&Self> for JsonRpcResponseForGenesisConfigAndRpcError {
14152    fn from(value: &JsonRpcResponseForGenesisConfigAndRpcError) -> Self {
14153        value.clone()
14154    }
14155}
14156#[doc = "`JsonRpcResponseForNullableRpcHealthResponseAndRpcError`"]
14157#[doc = r""]
14158#[doc = r" <details><summary>JSON schema</summary>"]
14159#[doc = r""]
14160#[doc = r" ```json"]
14161#[doc = "{"]
14162#[doc = "  \"title\": \"JsonRpcResponse_for_Nullable_RpcHealthResponse_and_RpcError\","]
14163#[doc = "  \"type\": \"object\","]
14164#[doc = "  \"oneOf\": ["]
14165#[doc = "    {"]
14166#[doc = "      \"type\": \"object\","]
14167#[doc = "      \"required\": ["]
14168#[doc = "        \"result\""]
14169#[doc = "      ],"]
14170#[doc = "      \"properties\": {"]
14171#[doc = "        \"result\": {"]
14172#[doc = "          \"anyOf\": ["]
14173#[doc = "            {"]
14174#[doc = "              \"$ref\": \"#/components/schemas/RpcHealthResponse\""]
14175#[doc = "            },"]
14176#[doc = "            {"]
14177#[doc = "              \"type\": \"null\""]
14178#[doc = "            }"]
14179#[doc = "          ]"]
14180#[doc = "        }"]
14181#[doc = "      }"]
14182#[doc = "    },"]
14183#[doc = "    {"]
14184#[doc = "      \"type\": \"object\","]
14185#[doc = "      \"required\": ["]
14186#[doc = "        \"error\""]
14187#[doc = "      ],"]
14188#[doc = "      \"properties\": {"]
14189#[doc = "        \"error\": {"]
14190#[doc = "          \"$ref\": \"#/components/schemas/RpcError\""]
14191#[doc = "        }"]
14192#[doc = "      }"]
14193#[doc = "    }"]
14194#[doc = "  ],"]
14195#[doc = "  \"required\": ["]
14196#[doc = "    \"id\","]
14197#[doc = "    \"jsonrpc\""]
14198#[doc = "  ],"]
14199#[doc = "  \"properties\": {"]
14200#[doc = "    \"id\": {"]
14201#[doc = "      \"type\": \"string\""]
14202#[doc = "    },"]
14203#[doc = "    \"jsonrpc\": {"]
14204#[doc = "      \"type\": \"string\""]
14205#[doc = "    }"]
14206#[doc = "  }"]
14207#[doc = "}"]
14208#[doc = r" ```"]
14209#[doc = r" </details>"]
14210#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
14211#[serde(untagged)]
14212pub enum JsonRpcResponseForNullableRpcHealthResponseAndRpcError {
14213    Variant0 {
14214        id: ::std::string::String,
14215        jsonrpc: ::std::string::String,
14216        result: ::std::option::Option<RpcHealthResponse>,
14217    },
14218    Variant1 {
14219        error: RpcError,
14220        id: ::std::string::String,
14221        jsonrpc: ::std::string::String,
14222    },
14223}
14224impl ::std::convert::From<&Self> for JsonRpcResponseForNullableRpcHealthResponseAndRpcError {
14225    fn from(value: &JsonRpcResponseForNullableRpcHealthResponseAndRpcError) -> Self {
14226        value.clone()
14227    }
14228}
14229#[doc = "`JsonRpcResponseForRpcBlockResponseAndRpcError`"]
14230#[doc = r""]
14231#[doc = r" <details><summary>JSON schema</summary>"]
14232#[doc = r""]
14233#[doc = r" ```json"]
14234#[doc = "{"]
14235#[doc = "  \"title\": \"JsonRpcResponse_for_RpcBlockResponse_and_RpcError\","]
14236#[doc = "  \"type\": \"object\","]
14237#[doc = "  \"oneOf\": ["]
14238#[doc = "    {"]
14239#[doc = "      \"type\": \"object\","]
14240#[doc = "      \"required\": ["]
14241#[doc = "        \"result\""]
14242#[doc = "      ],"]
14243#[doc = "      \"properties\": {"]
14244#[doc = "        \"result\": {"]
14245#[doc = "          \"$ref\": \"#/components/schemas/RpcBlockResponse\""]
14246#[doc = "        }"]
14247#[doc = "      }"]
14248#[doc = "    },"]
14249#[doc = "    {"]
14250#[doc = "      \"type\": \"object\","]
14251#[doc = "      \"required\": ["]
14252#[doc = "        \"error\""]
14253#[doc = "      ],"]
14254#[doc = "      \"properties\": {"]
14255#[doc = "        \"error\": {"]
14256#[doc = "          \"$ref\": \"#/components/schemas/RpcError\""]
14257#[doc = "        }"]
14258#[doc = "      }"]
14259#[doc = "    }"]
14260#[doc = "  ],"]
14261#[doc = "  \"required\": ["]
14262#[doc = "    \"id\","]
14263#[doc = "    \"jsonrpc\""]
14264#[doc = "  ],"]
14265#[doc = "  \"properties\": {"]
14266#[doc = "    \"id\": {"]
14267#[doc = "      \"type\": \"string\""]
14268#[doc = "    },"]
14269#[doc = "    \"jsonrpc\": {"]
14270#[doc = "      \"type\": \"string\""]
14271#[doc = "    }"]
14272#[doc = "  }"]
14273#[doc = "}"]
14274#[doc = r" ```"]
14275#[doc = r" </details>"]
14276#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
14277#[serde(untagged)]
14278pub enum JsonRpcResponseForRpcBlockResponseAndRpcError {
14279    Variant0 {
14280        id: ::std::string::String,
14281        jsonrpc: ::std::string::String,
14282        result: RpcBlockResponse,
14283    },
14284    Variant1 {
14285        error: RpcError,
14286        id: ::std::string::String,
14287        jsonrpc: ::std::string::String,
14288    },
14289}
14290impl ::std::convert::From<&Self> for JsonRpcResponseForRpcBlockResponseAndRpcError {
14291    fn from(value: &JsonRpcResponseForRpcBlockResponseAndRpcError) -> Self {
14292        value.clone()
14293    }
14294}
14295#[doc = "`JsonRpcResponseForRpcChunkResponseAndRpcError`"]
14296#[doc = r""]
14297#[doc = r" <details><summary>JSON schema</summary>"]
14298#[doc = r""]
14299#[doc = r" ```json"]
14300#[doc = "{"]
14301#[doc = "  \"title\": \"JsonRpcResponse_for_RpcChunkResponse_and_RpcError\","]
14302#[doc = "  \"type\": \"object\","]
14303#[doc = "  \"oneOf\": ["]
14304#[doc = "    {"]
14305#[doc = "      \"type\": \"object\","]
14306#[doc = "      \"required\": ["]
14307#[doc = "        \"result\""]
14308#[doc = "      ],"]
14309#[doc = "      \"properties\": {"]
14310#[doc = "        \"result\": {"]
14311#[doc = "          \"$ref\": \"#/components/schemas/RpcChunkResponse\""]
14312#[doc = "        }"]
14313#[doc = "      }"]
14314#[doc = "    },"]
14315#[doc = "    {"]
14316#[doc = "      \"type\": \"object\","]
14317#[doc = "      \"required\": ["]
14318#[doc = "        \"error\""]
14319#[doc = "      ],"]
14320#[doc = "      \"properties\": {"]
14321#[doc = "        \"error\": {"]
14322#[doc = "          \"$ref\": \"#/components/schemas/RpcError\""]
14323#[doc = "        }"]
14324#[doc = "      }"]
14325#[doc = "    }"]
14326#[doc = "  ],"]
14327#[doc = "  \"required\": ["]
14328#[doc = "    \"id\","]
14329#[doc = "    \"jsonrpc\""]
14330#[doc = "  ],"]
14331#[doc = "  \"properties\": {"]
14332#[doc = "    \"id\": {"]
14333#[doc = "      \"type\": \"string\""]
14334#[doc = "    },"]
14335#[doc = "    \"jsonrpc\": {"]
14336#[doc = "      \"type\": \"string\""]
14337#[doc = "    }"]
14338#[doc = "  }"]
14339#[doc = "}"]
14340#[doc = r" ```"]
14341#[doc = r" </details>"]
14342#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
14343#[serde(untagged)]
14344pub enum JsonRpcResponseForRpcChunkResponseAndRpcError {
14345    Variant0 {
14346        id: ::std::string::String,
14347        jsonrpc: ::std::string::String,
14348        result: RpcChunkResponse,
14349    },
14350    Variant1 {
14351        error: RpcError,
14352        id: ::std::string::String,
14353        jsonrpc: ::std::string::String,
14354    },
14355}
14356impl ::std::convert::From<&Self> for JsonRpcResponseForRpcChunkResponseAndRpcError {
14357    fn from(value: &JsonRpcResponseForRpcChunkResponseAndRpcError) -> Self {
14358        value.clone()
14359    }
14360}
14361#[doc = "`JsonRpcResponseForRpcClientConfigResponseAndRpcError`"]
14362#[doc = r""]
14363#[doc = r" <details><summary>JSON schema</summary>"]
14364#[doc = r""]
14365#[doc = r" ```json"]
14366#[doc = "{"]
14367#[doc = "  \"title\": \"JsonRpcResponse_for_RpcClientConfigResponse_and_RpcError\","]
14368#[doc = "  \"type\": \"object\","]
14369#[doc = "  \"oneOf\": ["]
14370#[doc = "    {"]
14371#[doc = "      \"type\": \"object\","]
14372#[doc = "      \"required\": ["]
14373#[doc = "        \"result\""]
14374#[doc = "      ],"]
14375#[doc = "      \"properties\": {"]
14376#[doc = "        \"result\": {"]
14377#[doc = "          \"$ref\": \"#/components/schemas/RpcClientConfigResponse\""]
14378#[doc = "        }"]
14379#[doc = "      }"]
14380#[doc = "    },"]
14381#[doc = "    {"]
14382#[doc = "      \"type\": \"object\","]
14383#[doc = "      \"required\": ["]
14384#[doc = "        \"error\""]
14385#[doc = "      ],"]
14386#[doc = "      \"properties\": {"]
14387#[doc = "        \"error\": {"]
14388#[doc = "          \"$ref\": \"#/components/schemas/RpcError\""]
14389#[doc = "        }"]
14390#[doc = "      }"]
14391#[doc = "    }"]
14392#[doc = "  ],"]
14393#[doc = "  \"required\": ["]
14394#[doc = "    \"id\","]
14395#[doc = "    \"jsonrpc\""]
14396#[doc = "  ],"]
14397#[doc = "  \"properties\": {"]
14398#[doc = "    \"id\": {"]
14399#[doc = "      \"type\": \"string\""]
14400#[doc = "    },"]
14401#[doc = "    \"jsonrpc\": {"]
14402#[doc = "      \"type\": \"string\""]
14403#[doc = "    }"]
14404#[doc = "  }"]
14405#[doc = "}"]
14406#[doc = r" ```"]
14407#[doc = r" </details>"]
14408#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
14409#[serde(untagged)]
14410pub enum JsonRpcResponseForRpcClientConfigResponseAndRpcError {
14411    Variant0 {
14412        id: ::std::string::String,
14413        jsonrpc: ::std::string::String,
14414        result: RpcClientConfigResponse,
14415    },
14416    Variant1 {
14417        error: RpcError,
14418        id: ::std::string::String,
14419        jsonrpc: ::std::string::String,
14420    },
14421}
14422impl ::std::convert::From<&Self> for JsonRpcResponseForRpcClientConfigResponseAndRpcError {
14423    fn from(value: &JsonRpcResponseForRpcClientConfigResponseAndRpcError) -> Self {
14424        value.clone()
14425    }
14426}
14427#[doc = "`JsonRpcResponseForRpcCongestionLevelResponseAndRpcError`"]
14428#[doc = r""]
14429#[doc = r" <details><summary>JSON schema</summary>"]
14430#[doc = r""]
14431#[doc = r" ```json"]
14432#[doc = "{"]
14433#[doc = "  \"title\": \"JsonRpcResponse_for_RpcCongestionLevelResponse_and_RpcError\","]
14434#[doc = "  \"type\": \"object\","]
14435#[doc = "  \"oneOf\": ["]
14436#[doc = "    {"]
14437#[doc = "      \"type\": \"object\","]
14438#[doc = "      \"required\": ["]
14439#[doc = "        \"result\""]
14440#[doc = "      ],"]
14441#[doc = "      \"properties\": {"]
14442#[doc = "        \"result\": {"]
14443#[doc = "          \"$ref\": \"#/components/schemas/RpcCongestionLevelResponse\""]
14444#[doc = "        }"]
14445#[doc = "      }"]
14446#[doc = "    },"]
14447#[doc = "    {"]
14448#[doc = "      \"type\": \"object\","]
14449#[doc = "      \"required\": ["]
14450#[doc = "        \"error\""]
14451#[doc = "      ],"]
14452#[doc = "      \"properties\": {"]
14453#[doc = "        \"error\": {"]
14454#[doc = "          \"$ref\": \"#/components/schemas/RpcError\""]
14455#[doc = "        }"]
14456#[doc = "      }"]
14457#[doc = "    }"]
14458#[doc = "  ],"]
14459#[doc = "  \"required\": ["]
14460#[doc = "    \"id\","]
14461#[doc = "    \"jsonrpc\""]
14462#[doc = "  ],"]
14463#[doc = "  \"properties\": {"]
14464#[doc = "    \"id\": {"]
14465#[doc = "      \"type\": \"string\""]
14466#[doc = "    },"]
14467#[doc = "    \"jsonrpc\": {"]
14468#[doc = "      \"type\": \"string\""]
14469#[doc = "    }"]
14470#[doc = "  }"]
14471#[doc = "}"]
14472#[doc = r" ```"]
14473#[doc = r" </details>"]
14474#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
14475#[serde(untagged)]
14476pub enum JsonRpcResponseForRpcCongestionLevelResponseAndRpcError {
14477    Variant0 {
14478        id: ::std::string::String,
14479        jsonrpc: ::std::string::String,
14480        result: RpcCongestionLevelResponse,
14481    },
14482    Variant1 {
14483        error: RpcError,
14484        id: ::std::string::String,
14485        jsonrpc: ::std::string::String,
14486    },
14487}
14488impl ::std::convert::From<&Self> for JsonRpcResponseForRpcCongestionLevelResponseAndRpcError {
14489    fn from(value: &JsonRpcResponseForRpcCongestionLevelResponseAndRpcError) -> Self {
14490        value.clone()
14491    }
14492}
14493#[doc = "`JsonRpcResponseForRpcGasPriceResponseAndRpcError`"]
14494#[doc = r""]
14495#[doc = r" <details><summary>JSON schema</summary>"]
14496#[doc = r""]
14497#[doc = r" ```json"]
14498#[doc = "{"]
14499#[doc = "  \"title\": \"JsonRpcResponse_for_RpcGasPriceResponse_and_RpcError\","]
14500#[doc = "  \"type\": \"object\","]
14501#[doc = "  \"oneOf\": ["]
14502#[doc = "    {"]
14503#[doc = "      \"type\": \"object\","]
14504#[doc = "      \"required\": ["]
14505#[doc = "        \"result\""]
14506#[doc = "      ],"]
14507#[doc = "      \"properties\": {"]
14508#[doc = "        \"result\": {"]
14509#[doc = "          \"$ref\": \"#/components/schemas/RpcGasPriceResponse\""]
14510#[doc = "        }"]
14511#[doc = "      }"]
14512#[doc = "    },"]
14513#[doc = "    {"]
14514#[doc = "      \"type\": \"object\","]
14515#[doc = "      \"required\": ["]
14516#[doc = "        \"error\""]
14517#[doc = "      ],"]
14518#[doc = "      \"properties\": {"]
14519#[doc = "        \"error\": {"]
14520#[doc = "          \"$ref\": \"#/components/schemas/RpcError\""]
14521#[doc = "        }"]
14522#[doc = "      }"]
14523#[doc = "    }"]
14524#[doc = "  ],"]
14525#[doc = "  \"required\": ["]
14526#[doc = "    \"id\","]
14527#[doc = "    \"jsonrpc\""]
14528#[doc = "  ],"]
14529#[doc = "  \"properties\": {"]
14530#[doc = "    \"id\": {"]
14531#[doc = "      \"type\": \"string\""]
14532#[doc = "    },"]
14533#[doc = "    \"jsonrpc\": {"]
14534#[doc = "      \"type\": \"string\""]
14535#[doc = "    }"]
14536#[doc = "  }"]
14537#[doc = "}"]
14538#[doc = r" ```"]
14539#[doc = r" </details>"]
14540#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
14541#[serde(untagged)]
14542pub enum JsonRpcResponseForRpcGasPriceResponseAndRpcError {
14543    Variant0 {
14544        id: ::std::string::String,
14545        jsonrpc: ::std::string::String,
14546        result: RpcGasPriceResponse,
14547    },
14548    Variant1 {
14549        error: RpcError,
14550        id: ::std::string::String,
14551        jsonrpc: ::std::string::String,
14552    },
14553}
14554impl ::std::convert::From<&Self> for JsonRpcResponseForRpcGasPriceResponseAndRpcError {
14555    fn from(value: &JsonRpcResponseForRpcGasPriceResponseAndRpcError) -> Self {
14556        value.clone()
14557    }
14558}
14559#[doc = "`JsonRpcResponseForRpcLightClientBlockProofResponseAndRpcError`"]
14560#[doc = r""]
14561#[doc = r" <details><summary>JSON schema</summary>"]
14562#[doc = r""]
14563#[doc = r" ```json"]
14564#[doc = "{"]
14565#[doc = "  \"title\": \"JsonRpcResponse_for_RpcLightClientBlockProofResponse_and_RpcError\","]
14566#[doc = "  \"type\": \"object\","]
14567#[doc = "  \"oneOf\": ["]
14568#[doc = "    {"]
14569#[doc = "      \"type\": \"object\","]
14570#[doc = "      \"required\": ["]
14571#[doc = "        \"result\""]
14572#[doc = "      ],"]
14573#[doc = "      \"properties\": {"]
14574#[doc = "        \"result\": {"]
14575#[doc = "          \"$ref\": \"#/components/schemas/RpcLightClientBlockProofResponse\""]
14576#[doc = "        }"]
14577#[doc = "      }"]
14578#[doc = "    },"]
14579#[doc = "    {"]
14580#[doc = "      \"type\": \"object\","]
14581#[doc = "      \"required\": ["]
14582#[doc = "        \"error\""]
14583#[doc = "      ],"]
14584#[doc = "      \"properties\": {"]
14585#[doc = "        \"error\": {"]
14586#[doc = "          \"$ref\": \"#/components/schemas/RpcError\""]
14587#[doc = "        }"]
14588#[doc = "      }"]
14589#[doc = "    }"]
14590#[doc = "  ],"]
14591#[doc = "  \"required\": ["]
14592#[doc = "    \"id\","]
14593#[doc = "    \"jsonrpc\""]
14594#[doc = "  ],"]
14595#[doc = "  \"properties\": {"]
14596#[doc = "    \"id\": {"]
14597#[doc = "      \"type\": \"string\""]
14598#[doc = "    },"]
14599#[doc = "    \"jsonrpc\": {"]
14600#[doc = "      \"type\": \"string\""]
14601#[doc = "    }"]
14602#[doc = "  }"]
14603#[doc = "}"]
14604#[doc = r" ```"]
14605#[doc = r" </details>"]
14606#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
14607#[serde(untagged)]
14608pub enum JsonRpcResponseForRpcLightClientBlockProofResponseAndRpcError {
14609    Variant0 {
14610        id: ::std::string::String,
14611        jsonrpc: ::std::string::String,
14612        result: RpcLightClientBlockProofResponse,
14613    },
14614    Variant1 {
14615        error: RpcError,
14616        id: ::std::string::String,
14617        jsonrpc: ::std::string::String,
14618    },
14619}
14620impl ::std::convert::From<&Self> for JsonRpcResponseForRpcLightClientBlockProofResponseAndRpcError {
14621    fn from(value: &JsonRpcResponseForRpcLightClientBlockProofResponseAndRpcError) -> Self {
14622        value.clone()
14623    }
14624}
14625#[doc = "`JsonRpcResponseForRpcLightClientExecutionProofResponseAndRpcError`"]
14626#[doc = r""]
14627#[doc = r" <details><summary>JSON schema</summary>"]
14628#[doc = r""]
14629#[doc = r" ```json"]
14630#[doc = "{"]
14631#[doc = "  \"title\": \"JsonRpcResponse_for_RpcLightClientExecutionProofResponse_and_RpcError\","]
14632#[doc = "  \"type\": \"object\","]
14633#[doc = "  \"oneOf\": ["]
14634#[doc = "    {"]
14635#[doc = "      \"type\": \"object\","]
14636#[doc = "      \"required\": ["]
14637#[doc = "        \"result\""]
14638#[doc = "      ],"]
14639#[doc = "      \"properties\": {"]
14640#[doc = "        \"result\": {"]
14641#[doc = "          \"$ref\": \"#/components/schemas/RpcLightClientExecutionProofResponse\""]
14642#[doc = "        }"]
14643#[doc = "      }"]
14644#[doc = "    },"]
14645#[doc = "    {"]
14646#[doc = "      \"type\": \"object\","]
14647#[doc = "      \"required\": ["]
14648#[doc = "        \"error\""]
14649#[doc = "      ],"]
14650#[doc = "      \"properties\": {"]
14651#[doc = "        \"error\": {"]
14652#[doc = "          \"$ref\": \"#/components/schemas/RpcError\""]
14653#[doc = "        }"]
14654#[doc = "      }"]
14655#[doc = "    }"]
14656#[doc = "  ],"]
14657#[doc = "  \"required\": ["]
14658#[doc = "    \"id\","]
14659#[doc = "    \"jsonrpc\""]
14660#[doc = "  ],"]
14661#[doc = "  \"properties\": {"]
14662#[doc = "    \"id\": {"]
14663#[doc = "      \"type\": \"string\""]
14664#[doc = "    },"]
14665#[doc = "    \"jsonrpc\": {"]
14666#[doc = "      \"type\": \"string\""]
14667#[doc = "    }"]
14668#[doc = "  }"]
14669#[doc = "}"]
14670#[doc = r" ```"]
14671#[doc = r" </details>"]
14672#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
14673#[serde(untagged)]
14674pub enum JsonRpcResponseForRpcLightClientExecutionProofResponseAndRpcError {
14675    Variant0 {
14676        id: ::std::string::String,
14677        jsonrpc: ::std::string::String,
14678        result: RpcLightClientExecutionProofResponse,
14679    },
14680    Variant1 {
14681        error: RpcError,
14682        id: ::std::string::String,
14683        jsonrpc: ::std::string::String,
14684    },
14685}
14686impl ::std::convert::From<&Self>
14687    for JsonRpcResponseForRpcLightClientExecutionProofResponseAndRpcError
14688{
14689    fn from(value: &JsonRpcResponseForRpcLightClientExecutionProofResponseAndRpcError) -> Self {
14690        value.clone()
14691    }
14692}
14693#[doc = "`JsonRpcResponseForRpcLightClientNextBlockResponseAndRpcError`"]
14694#[doc = r""]
14695#[doc = r" <details><summary>JSON schema</summary>"]
14696#[doc = r""]
14697#[doc = r" ```json"]
14698#[doc = "{"]
14699#[doc = "  \"title\": \"JsonRpcResponse_for_RpcLightClientNextBlockResponse_and_RpcError\","]
14700#[doc = "  \"type\": \"object\","]
14701#[doc = "  \"oneOf\": ["]
14702#[doc = "    {"]
14703#[doc = "      \"type\": \"object\","]
14704#[doc = "      \"required\": ["]
14705#[doc = "        \"result\""]
14706#[doc = "      ],"]
14707#[doc = "      \"properties\": {"]
14708#[doc = "        \"result\": {"]
14709#[doc = "          \"$ref\": \"#/components/schemas/RpcLightClientNextBlockResponse\""]
14710#[doc = "        }"]
14711#[doc = "      }"]
14712#[doc = "    },"]
14713#[doc = "    {"]
14714#[doc = "      \"type\": \"object\","]
14715#[doc = "      \"required\": ["]
14716#[doc = "        \"error\""]
14717#[doc = "      ],"]
14718#[doc = "      \"properties\": {"]
14719#[doc = "        \"error\": {"]
14720#[doc = "          \"$ref\": \"#/components/schemas/RpcError\""]
14721#[doc = "        }"]
14722#[doc = "      }"]
14723#[doc = "    }"]
14724#[doc = "  ],"]
14725#[doc = "  \"required\": ["]
14726#[doc = "    \"id\","]
14727#[doc = "    \"jsonrpc\""]
14728#[doc = "  ],"]
14729#[doc = "  \"properties\": {"]
14730#[doc = "    \"id\": {"]
14731#[doc = "      \"type\": \"string\""]
14732#[doc = "    },"]
14733#[doc = "    \"jsonrpc\": {"]
14734#[doc = "      \"type\": \"string\""]
14735#[doc = "    }"]
14736#[doc = "  }"]
14737#[doc = "}"]
14738#[doc = r" ```"]
14739#[doc = r" </details>"]
14740#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
14741#[serde(untagged)]
14742pub enum JsonRpcResponseForRpcLightClientNextBlockResponseAndRpcError {
14743    Variant0 {
14744        id: ::std::string::String,
14745        jsonrpc: ::std::string::String,
14746        result: RpcLightClientNextBlockResponse,
14747    },
14748    Variant1 {
14749        error: RpcError,
14750        id: ::std::string::String,
14751        jsonrpc: ::std::string::String,
14752    },
14753}
14754impl ::std::convert::From<&Self> for JsonRpcResponseForRpcLightClientNextBlockResponseAndRpcError {
14755    fn from(value: &JsonRpcResponseForRpcLightClientNextBlockResponseAndRpcError) -> Self {
14756        value.clone()
14757    }
14758}
14759#[doc = "`JsonRpcResponseForRpcNetworkInfoResponseAndRpcError`"]
14760#[doc = r""]
14761#[doc = r" <details><summary>JSON schema</summary>"]
14762#[doc = r""]
14763#[doc = r" ```json"]
14764#[doc = "{"]
14765#[doc = "  \"title\": \"JsonRpcResponse_for_RpcNetworkInfoResponse_and_RpcError\","]
14766#[doc = "  \"type\": \"object\","]
14767#[doc = "  \"oneOf\": ["]
14768#[doc = "    {"]
14769#[doc = "      \"type\": \"object\","]
14770#[doc = "      \"required\": ["]
14771#[doc = "        \"result\""]
14772#[doc = "      ],"]
14773#[doc = "      \"properties\": {"]
14774#[doc = "        \"result\": {"]
14775#[doc = "          \"$ref\": \"#/components/schemas/RpcNetworkInfoResponse\""]
14776#[doc = "        }"]
14777#[doc = "      }"]
14778#[doc = "    },"]
14779#[doc = "    {"]
14780#[doc = "      \"type\": \"object\","]
14781#[doc = "      \"required\": ["]
14782#[doc = "        \"error\""]
14783#[doc = "      ],"]
14784#[doc = "      \"properties\": {"]
14785#[doc = "        \"error\": {"]
14786#[doc = "          \"$ref\": \"#/components/schemas/RpcError\""]
14787#[doc = "        }"]
14788#[doc = "      }"]
14789#[doc = "    }"]
14790#[doc = "  ],"]
14791#[doc = "  \"required\": ["]
14792#[doc = "    \"id\","]
14793#[doc = "    \"jsonrpc\""]
14794#[doc = "  ],"]
14795#[doc = "  \"properties\": {"]
14796#[doc = "    \"id\": {"]
14797#[doc = "      \"type\": \"string\""]
14798#[doc = "    },"]
14799#[doc = "    \"jsonrpc\": {"]
14800#[doc = "      \"type\": \"string\""]
14801#[doc = "    }"]
14802#[doc = "  }"]
14803#[doc = "}"]
14804#[doc = r" ```"]
14805#[doc = r" </details>"]
14806#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
14807#[serde(untagged)]
14808pub enum JsonRpcResponseForRpcNetworkInfoResponseAndRpcError {
14809    Variant0 {
14810        id: ::std::string::String,
14811        jsonrpc: ::std::string::String,
14812        result: RpcNetworkInfoResponse,
14813    },
14814    Variant1 {
14815        error: RpcError,
14816        id: ::std::string::String,
14817        jsonrpc: ::std::string::String,
14818    },
14819}
14820impl ::std::convert::From<&Self> for JsonRpcResponseForRpcNetworkInfoResponseAndRpcError {
14821    fn from(value: &JsonRpcResponseForRpcNetworkInfoResponseAndRpcError) -> Self {
14822        value.clone()
14823    }
14824}
14825#[doc = "`JsonRpcResponseForRpcProtocolConfigResponseAndRpcError`"]
14826#[doc = r""]
14827#[doc = r" <details><summary>JSON schema</summary>"]
14828#[doc = r""]
14829#[doc = r" ```json"]
14830#[doc = "{"]
14831#[doc = "  \"title\": \"JsonRpcResponse_for_RpcProtocolConfigResponse_and_RpcError\","]
14832#[doc = "  \"type\": \"object\","]
14833#[doc = "  \"oneOf\": ["]
14834#[doc = "    {"]
14835#[doc = "      \"type\": \"object\","]
14836#[doc = "      \"required\": ["]
14837#[doc = "        \"result\""]
14838#[doc = "      ],"]
14839#[doc = "      \"properties\": {"]
14840#[doc = "        \"result\": {"]
14841#[doc = "          \"$ref\": \"#/components/schemas/RpcProtocolConfigResponse\""]
14842#[doc = "        }"]
14843#[doc = "      }"]
14844#[doc = "    },"]
14845#[doc = "    {"]
14846#[doc = "      \"type\": \"object\","]
14847#[doc = "      \"required\": ["]
14848#[doc = "        \"error\""]
14849#[doc = "      ],"]
14850#[doc = "      \"properties\": {"]
14851#[doc = "        \"error\": {"]
14852#[doc = "          \"$ref\": \"#/components/schemas/RpcError\""]
14853#[doc = "        }"]
14854#[doc = "      }"]
14855#[doc = "    }"]
14856#[doc = "  ],"]
14857#[doc = "  \"required\": ["]
14858#[doc = "    \"id\","]
14859#[doc = "    \"jsonrpc\""]
14860#[doc = "  ],"]
14861#[doc = "  \"properties\": {"]
14862#[doc = "    \"id\": {"]
14863#[doc = "      \"type\": \"string\""]
14864#[doc = "    },"]
14865#[doc = "    \"jsonrpc\": {"]
14866#[doc = "      \"type\": \"string\""]
14867#[doc = "    }"]
14868#[doc = "  }"]
14869#[doc = "}"]
14870#[doc = r" ```"]
14871#[doc = r" </details>"]
14872#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
14873#[serde(untagged)]
14874pub enum JsonRpcResponseForRpcProtocolConfigResponseAndRpcError {
14875    Variant0 {
14876        id: ::std::string::String,
14877        jsonrpc: ::std::string::String,
14878        result: RpcProtocolConfigResponse,
14879    },
14880    Variant1 {
14881        error: RpcError,
14882        id: ::std::string::String,
14883        jsonrpc: ::std::string::String,
14884    },
14885}
14886impl ::std::convert::From<&Self> for JsonRpcResponseForRpcProtocolConfigResponseAndRpcError {
14887    fn from(value: &JsonRpcResponseForRpcProtocolConfigResponseAndRpcError) -> Self {
14888        value.clone()
14889    }
14890}
14891#[doc = "`JsonRpcResponseForRpcQueryResponseAndRpcError`"]
14892#[doc = r""]
14893#[doc = r" <details><summary>JSON schema</summary>"]
14894#[doc = r""]
14895#[doc = r" ```json"]
14896#[doc = "{"]
14897#[doc = "  \"title\": \"JsonRpcResponse_for_RpcQueryResponse_and_RpcError\","]
14898#[doc = "  \"type\": \"object\","]
14899#[doc = "  \"oneOf\": ["]
14900#[doc = "    {"]
14901#[doc = "      \"type\": \"object\","]
14902#[doc = "      \"required\": ["]
14903#[doc = "        \"result\""]
14904#[doc = "      ],"]
14905#[doc = "      \"properties\": {"]
14906#[doc = "        \"result\": {"]
14907#[doc = "          \"$ref\": \"#/components/schemas/RpcQueryResponse\""]
14908#[doc = "        }"]
14909#[doc = "      }"]
14910#[doc = "    },"]
14911#[doc = "    {"]
14912#[doc = "      \"type\": \"object\","]
14913#[doc = "      \"required\": ["]
14914#[doc = "        \"error\""]
14915#[doc = "      ],"]
14916#[doc = "      \"properties\": {"]
14917#[doc = "        \"error\": {"]
14918#[doc = "          \"$ref\": \"#/components/schemas/RpcError\""]
14919#[doc = "        }"]
14920#[doc = "      }"]
14921#[doc = "    }"]
14922#[doc = "  ],"]
14923#[doc = "  \"required\": ["]
14924#[doc = "    \"id\","]
14925#[doc = "    \"jsonrpc\""]
14926#[doc = "  ],"]
14927#[doc = "  \"properties\": {"]
14928#[doc = "    \"id\": {"]
14929#[doc = "      \"type\": \"string\""]
14930#[doc = "    },"]
14931#[doc = "    \"jsonrpc\": {"]
14932#[doc = "      \"type\": \"string\""]
14933#[doc = "    }"]
14934#[doc = "  }"]
14935#[doc = "}"]
14936#[doc = r" ```"]
14937#[doc = r" </details>"]
14938#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
14939#[serde(untagged)]
14940pub enum JsonRpcResponseForRpcQueryResponseAndRpcError {
14941    Variant0 {
14942        id: ::std::string::String,
14943        jsonrpc: ::std::string::String,
14944        result: RpcQueryResponse,
14945    },
14946    Variant1 {
14947        error: RpcError,
14948        id: ::std::string::String,
14949        jsonrpc: ::std::string::String,
14950    },
14951}
14952impl ::std::convert::From<&Self> for JsonRpcResponseForRpcQueryResponseAndRpcError {
14953    fn from(value: &JsonRpcResponseForRpcQueryResponseAndRpcError) -> Self {
14954        value.clone()
14955    }
14956}
14957#[doc = "`JsonRpcResponseForRpcReceiptResponseAndRpcError`"]
14958#[doc = r""]
14959#[doc = r" <details><summary>JSON schema</summary>"]
14960#[doc = r""]
14961#[doc = r" ```json"]
14962#[doc = "{"]
14963#[doc = "  \"title\": \"JsonRpcResponse_for_RpcReceiptResponse_and_RpcError\","]
14964#[doc = "  \"type\": \"object\","]
14965#[doc = "  \"oneOf\": ["]
14966#[doc = "    {"]
14967#[doc = "      \"type\": \"object\","]
14968#[doc = "      \"required\": ["]
14969#[doc = "        \"result\""]
14970#[doc = "      ],"]
14971#[doc = "      \"properties\": {"]
14972#[doc = "        \"result\": {"]
14973#[doc = "          \"$ref\": \"#/components/schemas/RpcReceiptResponse\""]
14974#[doc = "        }"]
14975#[doc = "      }"]
14976#[doc = "    },"]
14977#[doc = "    {"]
14978#[doc = "      \"type\": \"object\","]
14979#[doc = "      \"required\": ["]
14980#[doc = "        \"error\""]
14981#[doc = "      ],"]
14982#[doc = "      \"properties\": {"]
14983#[doc = "        \"error\": {"]
14984#[doc = "          \"$ref\": \"#/components/schemas/RpcError\""]
14985#[doc = "        }"]
14986#[doc = "      }"]
14987#[doc = "    }"]
14988#[doc = "  ],"]
14989#[doc = "  \"required\": ["]
14990#[doc = "    \"id\","]
14991#[doc = "    \"jsonrpc\""]
14992#[doc = "  ],"]
14993#[doc = "  \"properties\": {"]
14994#[doc = "    \"id\": {"]
14995#[doc = "      \"type\": \"string\""]
14996#[doc = "    },"]
14997#[doc = "    \"jsonrpc\": {"]
14998#[doc = "      \"type\": \"string\""]
14999#[doc = "    }"]
15000#[doc = "  }"]
15001#[doc = "}"]
15002#[doc = r" ```"]
15003#[doc = r" </details>"]
15004#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
15005#[serde(untagged)]
15006pub enum JsonRpcResponseForRpcReceiptResponseAndRpcError {
15007    Variant0 {
15008        id: ::std::string::String,
15009        jsonrpc: ::std::string::String,
15010        result: RpcReceiptResponse,
15011    },
15012    Variant1 {
15013        error: RpcError,
15014        id: ::std::string::String,
15015        jsonrpc: ::std::string::String,
15016    },
15017}
15018impl ::std::convert::From<&Self> for JsonRpcResponseForRpcReceiptResponseAndRpcError {
15019    fn from(value: &JsonRpcResponseForRpcReceiptResponseAndRpcError) -> Self {
15020        value.clone()
15021    }
15022}
15023#[doc = "`JsonRpcResponseForRpcSplitStorageInfoResponseAndRpcError`"]
15024#[doc = r""]
15025#[doc = r" <details><summary>JSON schema</summary>"]
15026#[doc = r""]
15027#[doc = r" ```json"]
15028#[doc = "{"]
15029#[doc = "  \"title\": \"JsonRpcResponse_for_RpcSplitStorageInfoResponse_and_RpcError\","]
15030#[doc = "  \"type\": \"object\","]
15031#[doc = "  \"oneOf\": ["]
15032#[doc = "    {"]
15033#[doc = "      \"type\": \"object\","]
15034#[doc = "      \"required\": ["]
15035#[doc = "        \"result\""]
15036#[doc = "      ],"]
15037#[doc = "      \"properties\": {"]
15038#[doc = "        \"result\": {"]
15039#[doc = "          \"$ref\": \"#/components/schemas/RpcSplitStorageInfoResponse\""]
15040#[doc = "        }"]
15041#[doc = "      }"]
15042#[doc = "    },"]
15043#[doc = "    {"]
15044#[doc = "      \"type\": \"object\","]
15045#[doc = "      \"required\": ["]
15046#[doc = "        \"error\""]
15047#[doc = "      ],"]
15048#[doc = "      \"properties\": {"]
15049#[doc = "        \"error\": {"]
15050#[doc = "          \"$ref\": \"#/components/schemas/RpcError\""]
15051#[doc = "        }"]
15052#[doc = "      }"]
15053#[doc = "    }"]
15054#[doc = "  ],"]
15055#[doc = "  \"required\": ["]
15056#[doc = "    \"id\","]
15057#[doc = "    \"jsonrpc\""]
15058#[doc = "  ],"]
15059#[doc = "  \"properties\": {"]
15060#[doc = "    \"id\": {"]
15061#[doc = "      \"type\": \"string\""]
15062#[doc = "    },"]
15063#[doc = "    \"jsonrpc\": {"]
15064#[doc = "      \"type\": \"string\""]
15065#[doc = "    }"]
15066#[doc = "  }"]
15067#[doc = "}"]
15068#[doc = r" ```"]
15069#[doc = r" </details>"]
15070#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
15071#[serde(untagged)]
15072pub enum JsonRpcResponseForRpcSplitStorageInfoResponseAndRpcError {
15073    Variant0 {
15074        id: ::std::string::String,
15075        jsonrpc: ::std::string::String,
15076        result: RpcSplitStorageInfoResponse,
15077    },
15078    Variant1 {
15079        error: RpcError,
15080        id: ::std::string::String,
15081        jsonrpc: ::std::string::String,
15082    },
15083}
15084impl ::std::convert::From<&Self> for JsonRpcResponseForRpcSplitStorageInfoResponseAndRpcError {
15085    fn from(value: &JsonRpcResponseForRpcSplitStorageInfoResponseAndRpcError) -> Self {
15086        value.clone()
15087    }
15088}
15089#[doc = "`JsonRpcResponseForRpcStateChangesInBlockByTypeResponseAndRpcError`"]
15090#[doc = r""]
15091#[doc = r" <details><summary>JSON schema</summary>"]
15092#[doc = r""]
15093#[doc = r" ```json"]
15094#[doc = "{"]
15095#[doc = "  \"title\": \"JsonRpcResponse_for_RpcStateChangesInBlockByTypeResponse_and_RpcError\","]
15096#[doc = "  \"type\": \"object\","]
15097#[doc = "  \"oneOf\": ["]
15098#[doc = "    {"]
15099#[doc = "      \"type\": \"object\","]
15100#[doc = "      \"required\": ["]
15101#[doc = "        \"result\""]
15102#[doc = "      ],"]
15103#[doc = "      \"properties\": {"]
15104#[doc = "        \"result\": {"]
15105#[doc = "          \"$ref\": \"#/components/schemas/RpcStateChangesInBlockByTypeResponse\""]
15106#[doc = "        }"]
15107#[doc = "      }"]
15108#[doc = "    },"]
15109#[doc = "    {"]
15110#[doc = "      \"type\": \"object\","]
15111#[doc = "      \"required\": ["]
15112#[doc = "        \"error\""]
15113#[doc = "      ],"]
15114#[doc = "      \"properties\": {"]
15115#[doc = "        \"error\": {"]
15116#[doc = "          \"$ref\": \"#/components/schemas/RpcError\""]
15117#[doc = "        }"]
15118#[doc = "      }"]
15119#[doc = "    }"]
15120#[doc = "  ],"]
15121#[doc = "  \"required\": ["]
15122#[doc = "    \"id\","]
15123#[doc = "    \"jsonrpc\""]
15124#[doc = "  ],"]
15125#[doc = "  \"properties\": {"]
15126#[doc = "    \"id\": {"]
15127#[doc = "      \"type\": \"string\""]
15128#[doc = "    },"]
15129#[doc = "    \"jsonrpc\": {"]
15130#[doc = "      \"type\": \"string\""]
15131#[doc = "    }"]
15132#[doc = "  }"]
15133#[doc = "}"]
15134#[doc = r" ```"]
15135#[doc = r" </details>"]
15136#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
15137#[serde(untagged)]
15138pub enum JsonRpcResponseForRpcStateChangesInBlockByTypeResponseAndRpcError {
15139    Variant0 {
15140        id: ::std::string::String,
15141        jsonrpc: ::std::string::String,
15142        result: RpcStateChangesInBlockByTypeResponse,
15143    },
15144    Variant1 {
15145        error: RpcError,
15146        id: ::std::string::String,
15147        jsonrpc: ::std::string::String,
15148    },
15149}
15150impl ::std::convert::From<&Self>
15151    for JsonRpcResponseForRpcStateChangesInBlockByTypeResponseAndRpcError
15152{
15153    fn from(value: &JsonRpcResponseForRpcStateChangesInBlockByTypeResponseAndRpcError) -> Self {
15154        value.clone()
15155    }
15156}
15157#[doc = "`JsonRpcResponseForRpcStateChangesInBlockResponseAndRpcError`"]
15158#[doc = r""]
15159#[doc = r" <details><summary>JSON schema</summary>"]
15160#[doc = r""]
15161#[doc = r" ```json"]
15162#[doc = "{"]
15163#[doc = "  \"title\": \"JsonRpcResponse_for_RpcStateChangesInBlockResponse_and_RpcError\","]
15164#[doc = "  \"type\": \"object\","]
15165#[doc = "  \"oneOf\": ["]
15166#[doc = "    {"]
15167#[doc = "      \"type\": \"object\","]
15168#[doc = "      \"required\": ["]
15169#[doc = "        \"result\""]
15170#[doc = "      ],"]
15171#[doc = "      \"properties\": {"]
15172#[doc = "        \"result\": {"]
15173#[doc = "          \"$ref\": \"#/components/schemas/RpcStateChangesInBlockResponse\""]
15174#[doc = "        }"]
15175#[doc = "      }"]
15176#[doc = "    },"]
15177#[doc = "    {"]
15178#[doc = "      \"type\": \"object\","]
15179#[doc = "      \"required\": ["]
15180#[doc = "        \"error\""]
15181#[doc = "      ],"]
15182#[doc = "      \"properties\": {"]
15183#[doc = "        \"error\": {"]
15184#[doc = "          \"$ref\": \"#/components/schemas/RpcError\""]
15185#[doc = "        }"]
15186#[doc = "      }"]
15187#[doc = "    }"]
15188#[doc = "  ],"]
15189#[doc = "  \"required\": ["]
15190#[doc = "    \"id\","]
15191#[doc = "    \"jsonrpc\""]
15192#[doc = "  ],"]
15193#[doc = "  \"properties\": {"]
15194#[doc = "    \"id\": {"]
15195#[doc = "      \"type\": \"string\""]
15196#[doc = "    },"]
15197#[doc = "    \"jsonrpc\": {"]
15198#[doc = "      \"type\": \"string\""]
15199#[doc = "    }"]
15200#[doc = "  }"]
15201#[doc = "}"]
15202#[doc = r" ```"]
15203#[doc = r" </details>"]
15204#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
15205#[serde(untagged)]
15206pub enum JsonRpcResponseForRpcStateChangesInBlockResponseAndRpcError {
15207    Variant0 {
15208        id: ::std::string::String,
15209        jsonrpc: ::std::string::String,
15210        result: RpcStateChangesInBlockResponse,
15211    },
15212    Variant1 {
15213        error: RpcError,
15214        id: ::std::string::String,
15215        jsonrpc: ::std::string::String,
15216    },
15217}
15218impl ::std::convert::From<&Self> for JsonRpcResponseForRpcStateChangesInBlockResponseAndRpcError {
15219    fn from(value: &JsonRpcResponseForRpcStateChangesInBlockResponseAndRpcError) -> Self {
15220        value.clone()
15221    }
15222}
15223#[doc = "`JsonRpcResponseForRpcStatusResponseAndRpcError`"]
15224#[doc = r""]
15225#[doc = r" <details><summary>JSON schema</summary>"]
15226#[doc = r""]
15227#[doc = r" ```json"]
15228#[doc = "{"]
15229#[doc = "  \"title\": \"JsonRpcResponse_for_RpcStatusResponse_and_RpcError\","]
15230#[doc = "  \"type\": \"object\","]
15231#[doc = "  \"oneOf\": ["]
15232#[doc = "    {"]
15233#[doc = "      \"type\": \"object\","]
15234#[doc = "      \"required\": ["]
15235#[doc = "        \"result\""]
15236#[doc = "      ],"]
15237#[doc = "      \"properties\": {"]
15238#[doc = "        \"result\": {"]
15239#[doc = "          \"$ref\": \"#/components/schemas/RpcStatusResponse\""]
15240#[doc = "        }"]
15241#[doc = "      }"]
15242#[doc = "    },"]
15243#[doc = "    {"]
15244#[doc = "      \"type\": \"object\","]
15245#[doc = "      \"required\": ["]
15246#[doc = "        \"error\""]
15247#[doc = "      ],"]
15248#[doc = "      \"properties\": {"]
15249#[doc = "        \"error\": {"]
15250#[doc = "          \"$ref\": \"#/components/schemas/RpcError\""]
15251#[doc = "        }"]
15252#[doc = "      }"]
15253#[doc = "    }"]
15254#[doc = "  ],"]
15255#[doc = "  \"required\": ["]
15256#[doc = "    \"id\","]
15257#[doc = "    \"jsonrpc\""]
15258#[doc = "  ],"]
15259#[doc = "  \"properties\": {"]
15260#[doc = "    \"id\": {"]
15261#[doc = "      \"type\": \"string\""]
15262#[doc = "    },"]
15263#[doc = "    \"jsonrpc\": {"]
15264#[doc = "      \"type\": \"string\""]
15265#[doc = "    }"]
15266#[doc = "  }"]
15267#[doc = "}"]
15268#[doc = r" ```"]
15269#[doc = r" </details>"]
15270#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
15271#[serde(untagged)]
15272pub enum JsonRpcResponseForRpcStatusResponseAndRpcError {
15273    Variant0 {
15274        id: ::std::string::String,
15275        jsonrpc: ::std::string::String,
15276        result: RpcStatusResponse,
15277    },
15278    Variant1 {
15279        error: RpcError,
15280        id: ::std::string::String,
15281        jsonrpc: ::std::string::String,
15282    },
15283}
15284impl ::std::convert::From<&Self> for JsonRpcResponseForRpcStatusResponseAndRpcError {
15285    fn from(value: &JsonRpcResponseForRpcStatusResponseAndRpcError) -> Self {
15286        value.clone()
15287    }
15288}
15289#[doc = "`JsonRpcResponseForRpcTransactionResponseAndRpcError`"]
15290#[doc = r""]
15291#[doc = r" <details><summary>JSON schema</summary>"]
15292#[doc = r""]
15293#[doc = r" ```json"]
15294#[doc = "{"]
15295#[doc = "  \"title\": \"JsonRpcResponse_for_RpcTransactionResponse_and_RpcError\","]
15296#[doc = "  \"type\": \"object\","]
15297#[doc = "  \"oneOf\": ["]
15298#[doc = "    {"]
15299#[doc = "      \"type\": \"object\","]
15300#[doc = "      \"required\": ["]
15301#[doc = "        \"result\""]
15302#[doc = "      ],"]
15303#[doc = "      \"properties\": {"]
15304#[doc = "        \"result\": {"]
15305#[doc = "          \"$ref\": \"#/components/schemas/RpcTransactionResponse\""]
15306#[doc = "        }"]
15307#[doc = "      }"]
15308#[doc = "    },"]
15309#[doc = "    {"]
15310#[doc = "      \"type\": \"object\","]
15311#[doc = "      \"required\": ["]
15312#[doc = "        \"error\""]
15313#[doc = "      ],"]
15314#[doc = "      \"properties\": {"]
15315#[doc = "        \"error\": {"]
15316#[doc = "          \"$ref\": \"#/components/schemas/RpcError\""]
15317#[doc = "        }"]
15318#[doc = "      }"]
15319#[doc = "    }"]
15320#[doc = "  ],"]
15321#[doc = "  \"required\": ["]
15322#[doc = "    \"id\","]
15323#[doc = "    \"jsonrpc\""]
15324#[doc = "  ],"]
15325#[doc = "  \"properties\": {"]
15326#[doc = "    \"id\": {"]
15327#[doc = "      \"type\": \"string\""]
15328#[doc = "    },"]
15329#[doc = "    \"jsonrpc\": {"]
15330#[doc = "      \"type\": \"string\""]
15331#[doc = "    }"]
15332#[doc = "  }"]
15333#[doc = "}"]
15334#[doc = r" ```"]
15335#[doc = r" </details>"]
15336#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
15337#[serde(untagged)]
15338pub enum JsonRpcResponseForRpcTransactionResponseAndRpcError {
15339    Variant0 {
15340        id: ::std::string::String,
15341        jsonrpc: ::std::string::String,
15342        result: RpcTransactionResponse,
15343    },
15344    Variant1 {
15345        error: RpcError,
15346        id: ::std::string::String,
15347        jsonrpc: ::std::string::String,
15348    },
15349}
15350impl ::std::convert::From<&Self> for JsonRpcResponseForRpcTransactionResponseAndRpcError {
15351    fn from(value: &JsonRpcResponseForRpcTransactionResponseAndRpcError) -> Self {
15352        value.clone()
15353    }
15354}
15355#[doc = "`JsonRpcResponseForRpcValidatorResponseAndRpcError`"]
15356#[doc = r""]
15357#[doc = r" <details><summary>JSON schema</summary>"]
15358#[doc = r""]
15359#[doc = r" ```json"]
15360#[doc = "{"]
15361#[doc = "  \"title\": \"JsonRpcResponse_for_RpcValidatorResponse_and_RpcError\","]
15362#[doc = "  \"type\": \"object\","]
15363#[doc = "  \"oneOf\": ["]
15364#[doc = "    {"]
15365#[doc = "      \"type\": \"object\","]
15366#[doc = "      \"required\": ["]
15367#[doc = "        \"result\""]
15368#[doc = "      ],"]
15369#[doc = "      \"properties\": {"]
15370#[doc = "        \"result\": {"]
15371#[doc = "          \"$ref\": \"#/components/schemas/RpcValidatorResponse\""]
15372#[doc = "        }"]
15373#[doc = "      }"]
15374#[doc = "    },"]
15375#[doc = "    {"]
15376#[doc = "      \"type\": \"object\","]
15377#[doc = "      \"required\": ["]
15378#[doc = "        \"error\""]
15379#[doc = "      ],"]
15380#[doc = "      \"properties\": {"]
15381#[doc = "        \"error\": {"]
15382#[doc = "          \"$ref\": \"#/components/schemas/RpcError\""]
15383#[doc = "        }"]
15384#[doc = "      }"]
15385#[doc = "    }"]
15386#[doc = "  ],"]
15387#[doc = "  \"required\": ["]
15388#[doc = "    \"id\","]
15389#[doc = "    \"jsonrpc\""]
15390#[doc = "  ],"]
15391#[doc = "  \"properties\": {"]
15392#[doc = "    \"id\": {"]
15393#[doc = "      \"type\": \"string\""]
15394#[doc = "    },"]
15395#[doc = "    \"jsonrpc\": {"]
15396#[doc = "      \"type\": \"string\""]
15397#[doc = "    }"]
15398#[doc = "  }"]
15399#[doc = "}"]
15400#[doc = r" ```"]
15401#[doc = r" </details>"]
15402#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
15403#[serde(untagged)]
15404pub enum JsonRpcResponseForRpcValidatorResponseAndRpcError {
15405    Variant0 {
15406        id: ::std::string::String,
15407        jsonrpc: ::std::string::String,
15408        result: RpcValidatorResponse,
15409    },
15410    Variant1 {
15411        error: RpcError,
15412        id: ::std::string::String,
15413        jsonrpc: ::std::string::String,
15414    },
15415}
15416impl ::std::convert::From<&Self> for JsonRpcResponseForRpcValidatorResponseAndRpcError {
15417    fn from(value: &JsonRpcResponseForRpcValidatorResponseAndRpcError) -> Self {
15418        value.clone()
15419    }
15420}
15421#[doc = "Information about a Producer: its account name, peer_id and a list of connected peers that\nthe node can use to send message for this producer."]
15422#[doc = r""]
15423#[doc = r" <details><summary>JSON schema</summary>"]
15424#[doc = r""]
15425#[doc = r" ```json"]
15426#[doc = "{"]
15427#[doc = "  \"description\": \"Information about a Producer: its account name, peer_id and a list of connected peers that\\nthe node can use to send message for this producer.\","]
15428#[doc = "  \"type\": \"object\","]
15429#[doc = "  \"required\": ["]
15430#[doc = "    \"account_id\","]
15431#[doc = "    \"peer_id\""]
15432#[doc = "  ],"]
15433#[doc = "  \"properties\": {"]
15434#[doc = "    \"account_id\": {"]
15435#[doc = "      \"$ref\": \"#/components/schemas/AccountId\""]
15436#[doc = "    },"]
15437#[doc = "    \"next_hops\": {"]
15438#[doc = "      \"type\": ["]
15439#[doc = "        \"array\","]
15440#[doc = "        \"null\""]
15441#[doc = "      ],"]
15442#[doc = "      \"items\": {"]
15443#[doc = "        \"$ref\": \"#/components/schemas/PublicKey\""]
15444#[doc = "      }"]
15445#[doc = "    },"]
15446#[doc = "    \"peer_id\": {"]
15447#[doc = "      \"$ref\": \"#/components/schemas/PublicKey\""]
15448#[doc = "    }"]
15449#[doc = "  }"]
15450#[doc = "}"]
15451#[doc = r" ```"]
15452#[doc = r" </details>"]
15453#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
15454pub struct KnownProducerView {
15455    pub account_id: AccountId,
15456    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
15457    pub next_hops: ::std::option::Option<::std::vec::Vec<PublicKey>>,
15458    pub peer_id: PublicKey,
15459}
15460impl ::std::convert::From<&KnownProducerView> for KnownProducerView {
15461    fn from(value: &KnownProducerView) -> Self {
15462        value.clone()
15463    }
15464}
15465#[doc = "`LightClientBlockLiteView`"]
15466#[doc = r""]
15467#[doc = r" <details><summary>JSON schema</summary>"]
15468#[doc = r""]
15469#[doc = r" ```json"]
15470#[doc = "{"]
15471#[doc = "  \"type\": \"object\","]
15472#[doc = "  \"required\": ["]
15473#[doc = "    \"inner_lite\","]
15474#[doc = "    \"inner_rest_hash\","]
15475#[doc = "    \"prev_block_hash\""]
15476#[doc = "  ],"]
15477#[doc = "  \"properties\": {"]
15478#[doc = "    \"inner_lite\": {"]
15479#[doc = "      \"$ref\": \"#/components/schemas/BlockHeaderInnerLiteView\""]
15480#[doc = "    },"]
15481#[doc = "    \"inner_rest_hash\": {"]
15482#[doc = "      \"$ref\": \"#/components/schemas/CryptoHash\""]
15483#[doc = "    },"]
15484#[doc = "    \"prev_block_hash\": {"]
15485#[doc = "      \"$ref\": \"#/components/schemas/CryptoHash\""]
15486#[doc = "    }"]
15487#[doc = "  }"]
15488#[doc = "}"]
15489#[doc = r" ```"]
15490#[doc = r" </details>"]
15491#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
15492pub struct LightClientBlockLiteView {
15493    pub inner_lite: BlockHeaderInnerLiteView,
15494    pub inner_rest_hash: CryptoHash,
15495    pub prev_block_hash: CryptoHash,
15496}
15497impl ::std::convert::From<&LightClientBlockLiteView> for LightClientBlockLiteView {
15498    fn from(value: &LightClientBlockLiteView) -> Self {
15499        value.clone()
15500    }
15501}
15502#[doc = "Describes limits for VM and Runtime.\nTODO #4139: consider switching to strongly-typed wrappers instead of raw quantities"]
15503#[doc = r""]
15504#[doc = r" <details><summary>JSON schema</summary>"]
15505#[doc = r""]
15506#[doc = r" ```json"]
15507#[doc = "{"]
15508#[doc = "  \"description\": \"Describes limits for VM and Runtime.\\nTODO #4139: consider switching to strongly-typed wrappers instead of raw quantities\","]
15509#[doc = "  \"type\": \"object\","]
15510#[doc = "  \"required\": ["]
15511#[doc = "    \"initial_memory_pages\","]
15512#[doc = "    \"max_actions_per_receipt\","]
15513#[doc = "    \"max_arguments_length\","]
15514#[doc = "    \"max_contract_size\","]
15515#[doc = "    \"max_gas_burnt\","]
15516#[doc = "    \"max_length_method_name\","]
15517#[doc = "    \"max_length_returned_data\","]
15518#[doc = "    \"max_length_storage_key\","]
15519#[doc = "    \"max_length_storage_value\","]
15520#[doc = "    \"max_memory_pages\","]
15521#[doc = "    \"max_number_bytes_method_names\","]
15522#[doc = "    \"max_number_input_data_dependencies\","]
15523#[doc = "    \"max_number_logs\","]
15524#[doc = "    \"max_number_registers\","]
15525#[doc = "    \"max_promises_per_function_call_action\","]
15526#[doc = "    \"max_receipt_size\","]
15527#[doc = "    \"max_register_size\","]
15528#[doc = "    \"max_stack_height\","]
15529#[doc = "    \"max_total_log_length\","]
15530#[doc = "    \"max_total_prepaid_gas\","]
15531#[doc = "    \"max_transaction_size\","]
15532#[doc = "    \"max_yield_payload_size\","]
15533#[doc = "    \"per_receipt_storage_proof_size_limit\","]
15534#[doc = "    \"registers_memory_limit\","]
15535#[doc = "    \"yield_timeout_length_in_blocks\""]
15536#[doc = "  ],"]
15537#[doc = "  \"properties\": {"]
15538#[doc = "    \"account_id_validity_rules_version\": {"]
15539#[doc = "      \"description\": \"Whether to enforce account_id well-formed-ness where it wasn't enforced\\nhistorically.\","]
15540#[doc = "      \"default\": 0,"]
15541#[doc = "      \"allOf\": ["]
15542#[doc = "        {"]
15543#[doc = "          \"$ref\": \"#/components/schemas/AccountIdValidityRulesVersion\""]
15544#[doc = "        }"]
15545#[doc = "      ]"]
15546#[doc = "    },"]
15547#[doc = "    \"initial_memory_pages\": {"]
15548#[doc = "      \"description\": \"The initial number of memory pages.\\nNOTE: It's not a limiter itself, but it's a value we use for initial_memory_pages.\","]
15549#[doc = "      \"type\": \"integer\","]
15550#[doc = "      \"format\": \"uint32\","]
15551#[doc = "      \"minimum\": 0.0"]
15552#[doc = "    },"]
15553#[doc = "    \"max_actions_per_receipt\": {"]
15554#[doc = "      \"description\": \"Max number of actions per receipt.\","]
15555#[doc = "      \"type\": \"integer\","]
15556#[doc = "      \"format\": \"uint64\","]
15557#[doc = "      \"minimum\": 0.0"]
15558#[doc = "    },"]
15559#[doc = "    \"max_arguments_length\": {"]
15560#[doc = "      \"description\": \"Max length of arguments in a function call action.\","]
15561#[doc = "      \"type\": \"integer\","]
15562#[doc = "      \"format\": \"uint64\","]
15563#[doc = "      \"minimum\": 0.0"]
15564#[doc = "    },"]
15565#[doc = "    \"max_contract_size\": {"]
15566#[doc = "      \"description\": \"Max contract size\","]
15567#[doc = "      \"type\": \"integer\","]
15568#[doc = "      \"format\": \"uint64\","]
15569#[doc = "      \"minimum\": 0.0"]
15570#[doc = "    },"]
15571#[doc = "    \"max_elements_per_contract_table\": {"]
15572#[doc = "      \"description\": \"If present, stores max number of elements in a single contract's table\","]
15573#[doc = "      \"type\": ["]
15574#[doc = "        \"integer\","]
15575#[doc = "        \"null\""]
15576#[doc = "      ],"]
15577#[doc = "      \"format\": \"uint\","]
15578#[doc = "      \"minimum\": 0.0"]
15579#[doc = "    },"]
15580#[doc = "    \"max_functions_number_per_contract\": {"]
15581#[doc = "      \"description\": \"If present, stores max number of functions in one contract\","]
15582#[doc = "      \"type\": ["]
15583#[doc = "        \"integer\","]
15584#[doc = "        \"null\""]
15585#[doc = "      ],"]
15586#[doc = "      \"format\": \"uint64\","]
15587#[doc = "      \"minimum\": 0.0"]
15588#[doc = "    },"]
15589#[doc = "    \"max_gas_burnt\": {"]
15590#[doc = "      \"description\": \"Max amount of gas that can be used, excluding gas attached to promises.\","]
15591#[doc = "      \"allOf\": ["]
15592#[doc = "        {"]
15593#[doc = "          \"$ref\": \"#/components/schemas/NearGas\""]
15594#[doc = "        }"]
15595#[doc = "      ]"]
15596#[doc = "    },"]
15597#[doc = "    \"max_length_method_name\": {"]
15598#[doc = "      \"description\": \"Max length of any method name (without terminating character).\","]
15599#[doc = "      \"type\": \"integer\","]
15600#[doc = "      \"format\": \"uint64\","]
15601#[doc = "      \"minimum\": 0.0"]
15602#[doc = "    },"]
15603#[doc = "    \"max_length_returned_data\": {"]
15604#[doc = "      \"description\": \"Max length of returned data\","]
15605#[doc = "      \"type\": \"integer\","]
15606#[doc = "      \"format\": \"uint64\","]
15607#[doc = "      \"minimum\": 0.0"]
15608#[doc = "    },"]
15609#[doc = "    \"max_length_storage_key\": {"]
15610#[doc = "      \"description\": \"Max storage key size\","]
15611#[doc = "      \"type\": \"integer\","]
15612#[doc = "      \"format\": \"uint64\","]
15613#[doc = "      \"minimum\": 0.0"]
15614#[doc = "    },"]
15615#[doc = "    \"max_length_storage_value\": {"]
15616#[doc = "      \"description\": \"Max storage value size\","]
15617#[doc = "      \"type\": \"integer\","]
15618#[doc = "      \"format\": \"uint64\","]
15619#[doc = "      \"minimum\": 0.0"]
15620#[doc = "    },"]
15621#[doc = "    \"max_locals_per_contract\": {"]
15622#[doc = "      \"description\": \"If present, stores max number of locals declared globally in one contract\","]
15623#[doc = "      \"type\": ["]
15624#[doc = "        \"integer\","]
15625#[doc = "        \"null\""]
15626#[doc = "      ],"]
15627#[doc = "      \"format\": \"uint64\","]
15628#[doc = "      \"minimum\": 0.0"]
15629#[doc = "    },"]
15630#[doc = "    \"max_memory_pages\": {"]
15631#[doc = "      \"description\": \"What is the maximal memory pages amount is allowed to have for a contract.\","]
15632#[doc = "      \"type\": \"integer\","]
15633#[doc = "      \"format\": \"uint32\","]
15634#[doc = "      \"minimum\": 0.0"]
15635#[doc = "    },"]
15636#[doc = "    \"max_number_bytes_method_names\": {"]
15637#[doc = "      \"description\": \"Max total length of all method names (including terminating character) for a function call\\npermission access key.\","]
15638#[doc = "      \"type\": \"integer\","]
15639#[doc = "      \"format\": \"uint64\","]
15640#[doc = "      \"minimum\": 0.0"]
15641#[doc = "    },"]
15642#[doc = "    \"max_number_input_data_dependencies\": {"]
15643#[doc = "      \"description\": \"Max number of input data dependencies\","]
15644#[doc = "      \"type\": \"integer\","]
15645#[doc = "      \"format\": \"uint64\","]
15646#[doc = "      \"minimum\": 0.0"]
15647#[doc = "    },"]
15648#[doc = "    \"max_number_logs\": {"]
15649#[doc = "      \"description\": \"Maximum number of log entries.\","]
15650#[doc = "      \"type\": \"integer\","]
15651#[doc = "      \"format\": \"uint64\","]
15652#[doc = "      \"minimum\": 0.0"]
15653#[doc = "    },"]
15654#[doc = "    \"max_number_registers\": {"]
15655#[doc = "      \"description\": \"Maximum number of registers that can be used simultaneously.\\n\\nNote that due to an implementation quirk [read: a bug] in VMLogic, if we\\nhave this number of registers, no subsequent writes to the registers\\nwill succeed even if they replace an existing register.\","]
15656#[doc = "      \"type\": \"integer\","]
15657#[doc = "      \"format\": \"uint64\","]
15658#[doc = "      \"minimum\": 0.0"]
15659#[doc = "    },"]
15660#[doc = "    \"max_promises_per_function_call_action\": {"]
15661#[doc = "      \"description\": \"Max number of promises that a function call can create\","]
15662#[doc = "      \"type\": \"integer\","]
15663#[doc = "      \"format\": \"uint64\","]
15664#[doc = "      \"minimum\": 0.0"]
15665#[doc = "    },"]
15666#[doc = "    \"max_receipt_size\": {"]
15667#[doc = "      \"description\": \"Max receipt size\","]
15668#[doc = "      \"type\": \"integer\","]
15669#[doc = "      \"format\": \"uint64\","]
15670#[doc = "      \"minimum\": 0.0"]
15671#[doc = "    },"]
15672#[doc = "    \"max_register_size\": {"]
15673#[doc = "      \"description\": \"Maximum number of bytes that can be stored in a single register.\","]
15674#[doc = "      \"type\": \"integer\","]
15675#[doc = "      \"format\": \"uint64\","]
15676#[doc = "      \"minimum\": 0.0"]
15677#[doc = "    },"]
15678#[doc = "    \"max_stack_height\": {"]
15679#[doc = "      \"description\": \"How tall the stack is allowed to grow?\\n\\nSee <https://wiki.parity.io/WebAssembly-StackHeight> to find out how the stack frame cost\\nis calculated.\","]
15680#[doc = "      \"type\": \"integer\","]
15681#[doc = "      \"format\": \"uint32\","]
15682#[doc = "      \"minimum\": 0.0"]
15683#[doc = "    },"]
15684#[doc = "    \"max_tables_per_contract\": {"]
15685#[doc = "      \"description\": \"If present, stores max number of tables declared globally in one contract\","]
15686#[doc = "      \"type\": ["]
15687#[doc = "        \"integer\","]
15688#[doc = "        \"null\""]
15689#[doc = "      ],"]
15690#[doc = "      \"format\": \"uint32\","]
15691#[doc = "      \"minimum\": 0.0"]
15692#[doc = "    },"]
15693#[doc = "    \"max_total_log_length\": {"]
15694#[doc = "      \"description\": \"Maximum total length in bytes of all log messages.\","]
15695#[doc = "      \"type\": \"integer\","]
15696#[doc = "      \"format\": \"uint64\","]
15697#[doc = "      \"minimum\": 0.0"]
15698#[doc = "    },"]
15699#[doc = "    \"max_total_prepaid_gas\": {"]
15700#[doc = "      \"description\": \"Max total prepaid gas for all function call actions per receipt.\","]
15701#[doc = "      \"allOf\": ["]
15702#[doc = "        {"]
15703#[doc = "          \"$ref\": \"#/components/schemas/NearGas\""]
15704#[doc = "        }"]
15705#[doc = "      ]"]
15706#[doc = "    },"]
15707#[doc = "    \"max_transaction_size\": {"]
15708#[doc = "      \"description\": \"Max transaction size\","]
15709#[doc = "      \"type\": \"integer\","]
15710#[doc = "      \"format\": \"uint64\","]
15711#[doc = "      \"minimum\": 0.0"]
15712#[doc = "    },"]
15713#[doc = "    \"max_yield_payload_size\": {"]
15714#[doc = "      \"description\": \"Maximum number of bytes for payload passed over a yield resume.\","]
15715#[doc = "      \"type\": \"integer\","]
15716#[doc = "      \"format\": \"uint64\","]
15717#[doc = "      \"minimum\": 0.0"]
15718#[doc = "    },"]
15719#[doc = "    \"per_receipt_storage_proof_size_limit\": {"]
15720#[doc = "      \"description\": \"Hard limit on the size of storage proof generated while executing a single receipt.\","]
15721#[doc = "      \"type\": \"integer\","]
15722#[doc = "      \"format\": \"uint\","]
15723#[doc = "      \"minimum\": 0.0"]
15724#[doc = "    },"]
15725#[doc = "    \"registers_memory_limit\": {"]
15726#[doc = "      \"description\": \"Limit of memory used by registers.\","]
15727#[doc = "      \"type\": \"integer\","]
15728#[doc = "      \"format\": \"uint64\","]
15729#[doc = "      \"minimum\": 0.0"]
15730#[doc = "    },"]
15731#[doc = "    \"yield_timeout_length_in_blocks\": {"]
15732#[doc = "      \"description\": \"Number of blocks after which a yielded promise times out.\","]
15733#[doc = "      \"type\": \"integer\","]
15734#[doc = "      \"format\": \"uint64\","]
15735#[doc = "      \"minimum\": 0.0"]
15736#[doc = "    }"]
15737#[doc = "  }"]
15738#[doc = "}"]
15739#[doc = r" ```"]
15740#[doc = r" </details>"]
15741#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
15742pub struct LimitConfig {
15743    #[doc = "Whether to enforce account_id well-formed-ness where it wasn't enforced\nhistorically."]
15744    #[serde(default = "defaults::limit_config_account_id_validity_rules_version")]
15745    pub account_id_validity_rules_version: AccountIdValidityRulesVersion,
15746    #[doc = "The initial number of memory pages.\nNOTE: It's not a limiter itself, but it's a value we use for initial_memory_pages."]
15747    pub initial_memory_pages: u32,
15748    #[doc = "Max number of actions per receipt."]
15749    pub max_actions_per_receipt: u64,
15750    #[doc = "Max length of arguments in a function call action."]
15751    pub max_arguments_length: u64,
15752    #[doc = "Max contract size"]
15753    pub max_contract_size: u64,
15754    #[doc = "If present, stores max number of elements in a single contract's table"]
15755    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
15756    pub max_elements_per_contract_table: ::std::option::Option<u32>,
15757    #[doc = "If present, stores max number of functions in one contract"]
15758    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
15759    pub max_functions_number_per_contract: ::std::option::Option<u64>,
15760    #[doc = "Max amount of gas that can be used, excluding gas attached to promises."]
15761    pub max_gas_burnt: NearGas,
15762    #[doc = "Max length of any method name (without terminating character)."]
15763    pub max_length_method_name: u64,
15764    #[doc = "Max length of returned data"]
15765    pub max_length_returned_data: u64,
15766    #[doc = "Max storage key size"]
15767    pub max_length_storage_key: u64,
15768    #[doc = "Max storage value size"]
15769    pub max_length_storage_value: u64,
15770    #[doc = "If present, stores max number of locals declared globally in one contract"]
15771    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
15772    pub max_locals_per_contract: ::std::option::Option<u64>,
15773    #[doc = "What is the maximal memory pages amount is allowed to have for a contract."]
15774    pub max_memory_pages: u32,
15775    #[doc = "Max total length of all method names (including terminating character) for a function call\npermission access key."]
15776    pub max_number_bytes_method_names: u64,
15777    #[doc = "Max number of input data dependencies"]
15778    pub max_number_input_data_dependencies: u64,
15779    #[doc = "Maximum number of log entries."]
15780    pub max_number_logs: u64,
15781    #[doc = "Maximum number of registers that can be used simultaneously.\n\nNote that due to an implementation quirk [read: a bug] in VMLogic, if we\nhave this number of registers, no subsequent writes to the registers\nwill succeed even if they replace an existing register."]
15782    pub max_number_registers: u64,
15783    #[doc = "Max number of promises that a function call can create"]
15784    pub max_promises_per_function_call_action: u64,
15785    #[doc = "Max receipt size"]
15786    pub max_receipt_size: u64,
15787    #[doc = "Maximum number of bytes that can be stored in a single register."]
15788    pub max_register_size: u64,
15789    #[doc = "How tall the stack is allowed to grow?\n\nSee <https://wiki.parity.io/WebAssembly-StackHeight> to find out how the stack frame cost\nis calculated."]
15790    pub max_stack_height: u32,
15791    #[doc = "If present, stores max number of tables declared globally in one contract"]
15792    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
15793    pub max_tables_per_contract: ::std::option::Option<u32>,
15794    #[doc = "Maximum total length in bytes of all log messages."]
15795    pub max_total_log_length: u64,
15796    #[doc = "Max total prepaid gas for all function call actions per receipt."]
15797    pub max_total_prepaid_gas: NearGas,
15798    #[doc = "Max transaction size"]
15799    pub max_transaction_size: u64,
15800    #[doc = "Maximum number of bytes for payload passed over a yield resume."]
15801    pub max_yield_payload_size: u64,
15802    #[doc = "Hard limit on the size of storage proof generated while executing a single receipt."]
15803    pub per_receipt_storage_proof_size_limit: u32,
15804    #[doc = "Limit of memory used by registers."]
15805    pub registers_memory_limit: u64,
15806    #[doc = "Number of blocks after which a yielded promise times out."]
15807    pub yield_timeout_length_in_blocks: u64,
15808}
15809impl ::std::convert::From<&LimitConfig> for LimitConfig {
15810    fn from(value: &LimitConfig) -> Self {
15811        value.clone()
15812    }
15813}
15814#[doc = "`LogSummaryStyle`"]
15815#[doc = r""]
15816#[doc = r" <details><summary>JSON schema</summary>"]
15817#[doc = r""]
15818#[doc = r" ```json"]
15819#[doc = "{"]
15820#[doc = "  \"type\": \"string\","]
15821#[doc = "  \"enum\": ["]
15822#[doc = "    \"plain\","]
15823#[doc = "    \"colored\""]
15824#[doc = "  ]"]
15825#[doc = "}"]
15826#[doc = r" ```"]
15827#[doc = r" </details>"]
15828#[derive(
15829    :: serde :: Deserialize,
15830    :: serde :: Serialize,
15831    Clone,
15832    Copy,
15833    Debug,
15834    Eq,
15835    Hash,
15836    Ord,
15837    PartialEq,
15838    PartialOrd,
15839)]
15840pub enum LogSummaryStyle {
15841    #[serde(rename = "plain")]
15842    Plain,
15843    #[serde(rename = "colored")]
15844    Colored,
15845}
15846impl ::std::convert::From<&Self> for LogSummaryStyle {
15847    fn from(value: &LogSummaryStyle) -> Self {
15848        value.clone()
15849    }
15850}
15851impl ::std::fmt::Display for LogSummaryStyle {
15852    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
15853        match *self {
15854            Self::Plain => f.write_str("plain"),
15855            Self::Colored => f.write_str("colored"),
15856        }
15857    }
15858}
15859impl ::std::str::FromStr for LogSummaryStyle {
15860    type Err = self::error::ConversionError;
15861    fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
15862        match value {
15863            "plain" => Ok(Self::Plain),
15864            "colored" => Ok(Self::Colored),
15865            _ => Err("invalid value".into()),
15866        }
15867    }
15868}
15869impl ::std::convert::TryFrom<&str> for LogSummaryStyle {
15870    type Error = self::error::ConversionError;
15871    fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
15872        value.parse()
15873    }
15874}
15875impl ::std::convert::TryFrom<&::std::string::String> for LogSummaryStyle {
15876    type Error = self::error::ConversionError;
15877    fn try_from(
15878        value: &::std::string::String,
15879    ) -> ::std::result::Result<Self, self::error::ConversionError> {
15880        value.parse()
15881    }
15882}
15883impl ::std::convert::TryFrom<::std::string::String> for LogSummaryStyle {
15884    type Error = self::error::ConversionError;
15885    fn try_from(
15886        value: ::std::string::String,
15887    ) -> ::std::result::Result<Self, self::error::ConversionError> {
15888        value.parse()
15889    }
15890}
15891#[doc = "`MerklePathItem`"]
15892#[doc = r""]
15893#[doc = r" <details><summary>JSON schema</summary>"]
15894#[doc = r""]
15895#[doc = r" ```json"]
15896#[doc = "{"]
15897#[doc = "  \"type\": \"object\","]
15898#[doc = "  \"required\": ["]
15899#[doc = "    \"direction\","]
15900#[doc = "    \"hash\""]
15901#[doc = "  ],"]
15902#[doc = "  \"properties\": {"]
15903#[doc = "    \"direction\": {"]
15904#[doc = "      \"$ref\": \"#/components/schemas/Direction\""]
15905#[doc = "    },"]
15906#[doc = "    \"hash\": {"]
15907#[doc = "      \"$ref\": \"#/components/schemas/CryptoHash\""]
15908#[doc = "    }"]
15909#[doc = "  }"]
15910#[doc = "}"]
15911#[doc = r" ```"]
15912#[doc = r" </details>"]
15913#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
15914pub struct MerklePathItem {
15915    pub direction: Direction,
15916    pub hash: CryptoHash,
15917}
15918impl ::std::convert::From<&MerklePathItem> for MerklePathItem {
15919    fn from(value: &MerklePathItem) -> Self {
15920        value.clone()
15921    }
15922}
15923#[doc = "`MethodResolveError`"]
15924#[doc = r""]
15925#[doc = r" <details><summary>JSON schema</summary>"]
15926#[doc = r""]
15927#[doc = r" ```json"]
15928#[doc = "{"]
15929#[doc = "  \"type\": \"string\","]
15930#[doc = "  \"enum\": ["]
15931#[doc = "    \"MethodEmptyName\","]
15932#[doc = "    \"MethodNotFound\","]
15933#[doc = "    \"MethodInvalidSignature\""]
15934#[doc = "  ]"]
15935#[doc = "}"]
15936#[doc = r" ```"]
15937#[doc = r" </details>"]
15938#[derive(
15939    :: serde :: Deserialize,
15940    :: serde :: Serialize,
15941    Clone,
15942    Copy,
15943    Debug,
15944    Eq,
15945    Hash,
15946    Ord,
15947    PartialEq,
15948    PartialOrd,
15949)]
15950pub enum MethodResolveError {
15951    MethodEmptyName,
15952    MethodNotFound,
15953    MethodInvalidSignature,
15954}
15955impl ::std::convert::From<&Self> for MethodResolveError {
15956    fn from(value: &MethodResolveError) -> Self {
15957        value.clone()
15958    }
15959}
15960impl ::std::fmt::Display for MethodResolveError {
15961    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
15962        match *self {
15963            Self::MethodEmptyName => f.write_str("MethodEmptyName"),
15964            Self::MethodNotFound => f.write_str("MethodNotFound"),
15965            Self::MethodInvalidSignature => f.write_str("MethodInvalidSignature"),
15966        }
15967    }
15968}
15969impl ::std::str::FromStr for MethodResolveError {
15970    type Err = self::error::ConversionError;
15971    fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
15972        match value {
15973            "MethodEmptyName" => Ok(Self::MethodEmptyName),
15974            "MethodNotFound" => Ok(Self::MethodNotFound),
15975            "MethodInvalidSignature" => Ok(Self::MethodInvalidSignature),
15976            _ => Err("invalid value".into()),
15977        }
15978    }
15979}
15980impl ::std::convert::TryFrom<&str> for MethodResolveError {
15981    type Error = self::error::ConversionError;
15982    fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
15983        value.parse()
15984    }
15985}
15986impl ::std::convert::TryFrom<&::std::string::String> for MethodResolveError {
15987    type Error = self::error::ConversionError;
15988    fn try_from(
15989        value: &::std::string::String,
15990    ) -> ::std::result::Result<Self, self::error::ConversionError> {
15991        value.parse()
15992    }
15993}
15994impl ::std::convert::TryFrom<::std::string::String> for MethodResolveError {
15995    type Error = self::error::ConversionError;
15996    fn try_from(
15997        value: ::std::string::String,
15998    ) -> ::std::result::Result<Self, self::error::ConversionError> {
15999        value.parse()
16000    }
16001}
16002#[doc = "`MissingTrieValue`"]
16003#[doc = r""]
16004#[doc = r" <details><summary>JSON schema</summary>"]
16005#[doc = r""]
16006#[doc = r" ```json"]
16007#[doc = "{"]
16008#[doc = "  \"type\": \"object\","]
16009#[doc = "  \"required\": ["]
16010#[doc = "    \"context\","]
16011#[doc = "    \"hash\""]
16012#[doc = "  ],"]
16013#[doc = "  \"properties\": {"]
16014#[doc = "    \"context\": {"]
16015#[doc = "      \"$ref\": \"#/components/schemas/MissingTrieValueContext\""]
16016#[doc = "    },"]
16017#[doc = "    \"hash\": {"]
16018#[doc = "      \"$ref\": \"#/components/schemas/CryptoHash\""]
16019#[doc = "    }"]
16020#[doc = "  }"]
16021#[doc = "}"]
16022#[doc = r" ```"]
16023#[doc = r" </details>"]
16024#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
16025pub struct MissingTrieValue {
16026    pub context: MissingTrieValueContext,
16027    pub hash: CryptoHash,
16028}
16029impl ::std::convert::From<&MissingTrieValue> for MissingTrieValue {
16030    fn from(value: &MissingTrieValue) -> Self {
16031        value.clone()
16032    }
16033}
16034#[doc = "Contexts in which `StorageError::MissingTrieValue` error might occur."]
16035#[doc = r""]
16036#[doc = r" <details><summary>JSON schema</summary>"]
16037#[doc = r""]
16038#[doc = r" ```json"]
16039#[doc = "{"]
16040#[doc = "  \"description\": \"Contexts in which `StorageError::MissingTrieValue` error might occur.\","]
16041#[doc = "  \"oneOf\": ["]
16042#[doc = "    {"]
16043#[doc = "      \"description\": \"Missing trie value when reading from TrieIterator.\","]
16044#[doc = "      \"type\": \"string\","]
16045#[doc = "      \"enum\": ["]
16046#[doc = "        \"TrieIterator\""]
16047#[doc = "      ]"]
16048#[doc = "    },"]
16049#[doc = "    {"]
16050#[doc = "      \"description\": \"Missing trie value when reading from TriePrefetchingStorage.\","]
16051#[doc = "      \"type\": \"string\","]
16052#[doc = "      \"enum\": ["]
16053#[doc = "        \"TriePrefetchingStorage\""]
16054#[doc = "      ]"]
16055#[doc = "    },"]
16056#[doc = "    {"]
16057#[doc = "      \"description\": \"Missing trie value when reading from TrieMemoryPartialStorage.\","]
16058#[doc = "      \"type\": \"string\","]
16059#[doc = "      \"enum\": ["]
16060#[doc = "        \"TrieMemoryPartialStorage\""]
16061#[doc = "      ]"]
16062#[doc = "    },"]
16063#[doc = "    {"]
16064#[doc = "      \"description\": \"Missing trie value when reading from TrieStorage.\","]
16065#[doc = "      \"type\": \"string\","]
16066#[doc = "      \"enum\": ["]
16067#[doc = "        \"TrieStorage\""]
16068#[doc = "      ]"]
16069#[doc = "    }"]
16070#[doc = "  ]"]
16071#[doc = "}"]
16072#[doc = r" ```"]
16073#[doc = r" </details>"]
16074#[derive(
16075    :: serde :: Deserialize,
16076    :: serde :: Serialize,
16077    Clone,
16078    Copy,
16079    Debug,
16080    Eq,
16081    Hash,
16082    Ord,
16083    PartialEq,
16084    PartialOrd,
16085)]
16086pub enum MissingTrieValueContext {
16087    #[doc = "Missing trie value when reading from TrieIterator."]
16088    TrieIterator,
16089    #[doc = "Missing trie value when reading from TriePrefetchingStorage."]
16090    TriePrefetchingStorage,
16091    #[doc = "Missing trie value when reading from TrieMemoryPartialStorage."]
16092    TrieMemoryPartialStorage,
16093    #[doc = "Missing trie value when reading from TrieStorage."]
16094    TrieStorage,
16095}
16096impl ::std::convert::From<&Self> for MissingTrieValueContext {
16097    fn from(value: &MissingTrieValueContext) -> Self {
16098        value.clone()
16099    }
16100}
16101impl ::std::fmt::Display for MissingTrieValueContext {
16102    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
16103        match *self {
16104            Self::TrieIterator => f.write_str("TrieIterator"),
16105            Self::TriePrefetchingStorage => f.write_str("TriePrefetchingStorage"),
16106            Self::TrieMemoryPartialStorage => f.write_str("TrieMemoryPartialStorage"),
16107            Self::TrieStorage => f.write_str("TrieStorage"),
16108        }
16109    }
16110}
16111impl ::std::str::FromStr for MissingTrieValueContext {
16112    type Err = self::error::ConversionError;
16113    fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
16114        match value {
16115            "TrieIterator" => Ok(Self::TrieIterator),
16116            "TriePrefetchingStorage" => Ok(Self::TriePrefetchingStorage),
16117            "TrieMemoryPartialStorage" => Ok(Self::TrieMemoryPartialStorage),
16118            "TrieStorage" => Ok(Self::TrieStorage),
16119            _ => Err("invalid value".into()),
16120        }
16121    }
16122}
16123impl ::std::convert::TryFrom<&str> for MissingTrieValueContext {
16124    type Error = self::error::ConversionError;
16125    fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
16126        value.parse()
16127    }
16128}
16129impl ::std::convert::TryFrom<&::std::string::String> for MissingTrieValueContext {
16130    type Error = self::error::ConversionError;
16131    fn try_from(
16132        value: &::std::string::String,
16133    ) -> ::std::result::Result<Self, self::error::ConversionError> {
16134        value.parse()
16135    }
16136}
16137impl ::std::convert::TryFrom<::std::string::String> for MissingTrieValueContext {
16138    type Error = self::error::ConversionError;
16139    fn try_from(
16140        value: ::std::string::String,
16141    ) -> ::std::result::Result<Self, self::error::ConversionError> {
16142        value.parse()
16143    }
16144}
16145#[doc = "`MutableConfigValue`"]
16146#[doc = r""]
16147#[doc = r" <details><summary>JSON schema</summary>"]
16148#[doc = r""]
16149#[doc = r" ```json"]
16150#[doc = "{"]
16151#[doc = "  \"type\": \"string\""]
16152#[doc = "}"]
16153#[doc = r" ```"]
16154#[doc = r" </details>"]
16155#[derive(
16156    :: serde :: Deserialize,
16157    :: serde :: Serialize,
16158    Clone,
16159    Debug,
16160    Eq,
16161    Hash,
16162    Ord,
16163    PartialEq,
16164    PartialOrd,
16165)]
16166#[serde(transparent)]
16167pub struct MutableConfigValue(pub ::std::string::String);
16168impl ::std::ops::Deref for MutableConfigValue {
16169    type Target = ::std::string::String;
16170    fn deref(&self) -> &::std::string::String {
16171        &self.0
16172    }
16173}
16174impl ::std::convert::From<MutableConfigValue> for ::std::string::String {
16175    fn from(value: MutableConfigValue) -> Self {
16176        value.0
16177    }
16178}
16179impl ::std::convert::From<&MutableConfigValue> for MutableConfigValue {
16180    fn from(value: &MutableConfigValue) -> Self {
16181        value.clone()
16182    }
16183}
16184impl ::std::convert::From<::std::string::String> for MutableConfigValue {
16185    fn from(value: ::std::string::String) -> Self {
16186        Self(value)
16187    }
16188}
16189impl ::std::str::FromStr for MutableConfigValue {
16190    type Err = ::std::convert::Infallible;
16191    fn from_str(value: &str) -> ::std::result::Result<Self, Self::Err> {
16192        Ok(Self(value.to_string()))
16193    }
16194}
16195impl ::std::fmt::Display for MutableConfigValue {
16196    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
16197        self.0.fmt(f)
16198    }
16199}
16200#[doc = "`NetworkInfoView`"]
16201#[doc = r""]
16202#[doc = r" <details><summary>JSON schema</summary>"]
16203#[doc = r""]
16204#[doc = r" ```json"]
16205#[doc = "{"]
16206#[doc = "  \"type\": \"object\","]
16207#[doc = "  \"required\": ["]
16208#[doc = "    \"connected_peers\","]
16209#[doc = "    \"known_producers\","]
16210#[doc = "    \"num_connected_peers\","]
16211#[doc = "    \"peer_max_count\","]
16212#[doc = "    \"tier1_accounts_data\","]
16213#[doc = "    \"tier1_accounts_keys\","]
16214#[doc = "    \"tier1_connections\""]
16215#[doc = "  ],"]
16216#[doc = "  \"properties\": {"]
16217#[doc = "    \"connected_peers\": {"]
16218#[doc = "      \"type\": \"array\","]
16219#[doc = "      \"items\": {"]
16220#[doc = "        \"$ref\": \"#/components/schemas/PeerInfoView\""]
16221#[doc = "      }"]
16222#[doc = "    },"]
16223#[doc = "    \"known_producers\": {"]
16224#[doc = "      \"type\": \"array\","]
16225#[doc = "      \"items\": {"]
16226#[doc = "        \"$ref\": \"#/components/schemas/KnownProducerView\""]
16227#[doc = "      }"]
16228#[doc = "    },"]
16229#[doc = "    \"num_connected_peers\": {"]
16230#[doc = "      \"type\": \"integer\","]
16231#[doc = "      \"format\": \"uint\","]
16232#[doc = "      \"minimum\": 0.0"]
16233#[doc = "    },"]
16234#[doc = "    \"peer_max_count\": {"]
16235#[doc = "      \"type\": \"integer\","]
16236#[doc = "      \"format\": \"uint32\","]
16237#[doc = "      \"minimum\": 0.0"]
16238#[doc = "    },"]
16239#[doc = "    \"tier1_accounts_data\": {"]
16240#[doc = "      \"type\": \"array\","]
16241#[doc = "      \"items\": {"]
16242#[doc = "        \"$ref\": \"#/components/schemas/AccountDataView\""]
16243#[doc = "      }"]
16244#[doc = "    },"]
16245#[doc = "    \"tier1_accounts_keys\": {"]
16246#[doc = "      \"type\": \"array\","]
16247#[doc = "      \"items\": {"]
16248#[doc = "        \"$ref\": \"#/components/schemas/PublicKey\""]
16249#[doc = "      }"]
16250#[doc = "    },"]
16251#[doc = "    \"tier1_connections\": {"]
16252#[doc = "      \"type\": \"array\","]
16253#[doc = "      \"items\": {"]
16254#[doc = "        \"$ref\": \"#/components/schemas/PeerInfoView\""]
16255#[doc = "      }"]
16256#[doc = "    }"]
16257#[doc = "  }"]
16258#[doc = "}"]
16259#[doc = r" ```"]
16260#[doc = r" </details>"]
16261#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
16262pub struct NetworkInfoView {
16263    pub connected_peers: ::std::vec::Vec<PeerInfoView>,
16264    pub known_producers: ::std::vec::Vec<KnownProducerView>,
16265    pub num_connected_peers: u32,
16266    pub peer_max_count: u32,
16267    pub tier1_accounts_data: ::std::vec::Vec<AccountDataView>,
16268    pub tier1_accounts_keys: ::std::vec::Vec<PublicKey>,
16269    pub tier1_connections: ::std::vec::Vec<PeerInfoView>,
16270}
16271impl ::std::convert::From<&NetworkInfoView> for NetworkInfoView {
16272    fn from(value: &NetworkInfoView) -> Self {
16273        value.clone()
16274    }
16275}
16276#[doc = "`NextEpochValidatorInfo`"]
16277#[doc = r""]
16278#[doc = r" <details><summary>JSON schema</summary>"]
16279#[doc = r""]
16280#[doc = r" ```json"]
16281#[doc = "{"]
16282#[doc = "  \"type\": \"object\","]
16283#[doc = "  \"required\": ["]
16284#[doc = "    \"account_id\","]
16285#[doc = "    \"public_key\","]
16286#[doc = "    \"shards\","]
16287#[doc = "    \"stake\""]
16288#[doc = "  ],"]
16289#[doc = "  \"properties\": {"]
16290#[doc = "    \"account_id\": {"]
16291#[doc = "      \"$ref\": \"#/components/schemas/AccountId\""]
16292#[doc = "    },"]
16293#[doc = "    \"public_key\": {"]
16294#[doc = "      \"$ref\": \"#/components/schemas/PublicKey\""]
16295#[doc = "    },"]
16296#[doc = "    \"shards\": {"]
16297#[doc = "      \"type\": \"array\","]
16298#[doc = "      \"items\": {"]
16299#[doc = "        \"$ref\": \"#/components/schemas/ShardId\""]
16300#[doc = "      }"]
16301#[doc = "    },"]
16302#[doc = "    \"stake\": {"]
16303#[doc = "      \"$ref\": \"#/components/schemas/NearToken\""]
16304#[doc = "    }"]
16305#[doc = "  }"]
16306#[doc = "}"]
16307#[doc = r" ```"]
16308#[doc = r" </details>"]
16309#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
16310pub struct NextEpochValidatorInfo {
16311    pub account_id: AccountId,
16312    pub public_key: PublicKey,
16313    pub shards: ::std::vec::Vec<ShardId>,
16314    pub stake: NearToken,
16315}
16316impl ::std::convert::From<&NextEpochValidatorInfo> for NextEpochValidatorInfo {
16317    fn from(value: &NextEpochValidatorInfo) -> Self {
16318        value.clone()
16319    }
16320}
16321#[doc = "An Action that can be included in a transaction or receipt, excluding delegate actions. This type represents all possible action types except DelegateAction to prevent infinite recursion in meta-transactions."]
16322#[doc = r""]
16323#[doc = r" <details><summary>JSON schema</summary>"]
16324#[doc = r""]
16325#[doc = r" ```json"]
16326#[doc = "{"]
16327#[doc = "  \"description\": \"An Action that can be included in a transaction or receipt, excluding delegate actions. This type represents all possible action types except DelegateAction to prevent infinite recursion in meta-transactions.\","]
16328#[doc = "  \"oneOf\": ["]
16329#[doc = "    {"]
16330#[doc = "      \"description\": \"Create an (sub)account using a transaction `receiver_id` as an ID for\\na new account ID must pass validation rules described here\\n<http://nomicon.io/Primitives/Account.html>.\","]
16331#[doc = "      \"type\": \"object\","]
16332#[doc = "      \"required\": ["]
16333#[doc = "        \"CreateAccount\""]
16334#[doc = "      ],"]
16335#[doc = "      \"properties\": {"]
16336#[doc = "        \"CreateAccount\": {"]
16337#[doc = "          \"$ref\": \"#/components/schemas/CreateAccountAction\""]
16338#[doc = "        }"]
16339#[doc = "      },"]
16340#[doc = "      \"additionalProperties\": false"]
16341#[doc = "    },"]
16342#[doc = "    {"]
16343#[doc = "      \"description\": \"Sets a Wasm code to a receiver_id\","]
16344#[doc = "      \"type\": \"object\","]
16345#[doc = "      \"required\": ["]
16346#[doc = "        \"DeployContract\""]
16347#[doc = "      ],"]
16348#[doc = "      \"properties\": {"]
16349#[doc = "        \"DeployContract\": {"]
16350#[doc = "          \"$ref\": \"#/components/schemas/DeployContractAction\""]
16351#[doc = "        }"]
16352#[doc = "      },"]
16353#[doc = "      \"additionalProperties\": false"]
16354#[doc = "    },"]
16355#[doc = "    {"]
16356#[doc = "      \"type\": \"object\","]
16357#[doc = "      \"required\": ["]
16358#[doc = "        \"FunctionCall\""]
16359#[doc = "      ],"]
16360#[doc = "      \"properties\": {"]
16361#[doc = "        \"FunctionCall\": {"]
16362#[doc = "          \"$ref\": \"#/components/schemas/FunctionCallAction\""]
16363#[doc = "        }"]
16364#[doc = "      },"]
16365#[doc = "      \"additionalProperties\": false"]
16366#[doc = "    },"]
16367#[doc = "    {"]
16368#[doc = "      \"type\": \"object\","]
16369#[doc = "      \"required\": ["]
16370#[doc = "        \"Transfer\""]
16371#[doc = "      ],"]
16372#[doc = "      \"properties\": {"]
16373#[doc = "        \"Transfer\": {"]
16374#[doc = "          \"$ref\": \"#/components/schemas/TransferAction\""]
16375#[doc = "        }"]
16376#[doc = "      },"]
16377#[doc = "      \"additionalProperties\": false"]
16378#[doc = "    },"]
16379#[doc = "    {"]
16380#[doc = "      \"type\": \"object\","]
16381#[doc = "      \"required\": ["]
16382#[doc = "        \"Stake\""]
16383#[doc = "      ],"]
16384#[doc = "      \"properties\": {"]
16385#[doc = "        \"Stake\": {"]
16386#[doc = "          \"$ref\": \"#/components/schemas/StakeAction\""]
16387#[doc = "        }"]
16388#[doc = "      },"]
16389#[doc = "      \"additionalProperties\": false"]
16390#[doc = "    },"]
16391#[doc = "    {"]
16392#[doc = "      \"type\": \"object\","]
16393#[doc = "      \"required\": ["]
16394#[doc = "        \"AddKey\""]
16395#[doc = "      ],"]
16396#[doc = "      \"properties\": {"]
16397#[doc = "        \"AddKey\": {"]
16398#[doc = "          \"$ref\": \"#/components/schemas/AddKeyAction\""]
16399#[doc = "        }"]
16400#[doc = "      },"]
16401#[doc = "      \"additionalProperties\": false"]
16402#[doc = "    },"]
16403#[doc = "    {"]
16404#[doc = "      \"type\": \"object\","]
16405#[doc = "      \"required\": ["]
16406#[doc = "        \"DeleteKey\""]
16407#[doc = "      ],"]
16408#[doc = "      \"properties\": {"]
16409#[doc = "        \"DeleteKey\": {"]
16410#[doc = "          \"$ref\": \"#/components/schemas/DeleteKeyAction\""]
16411#[doc = "        }"]
16412#[doc = "      },"]
16413#[doc = "      \"additionalProperties\": false"]
16414#[doc = "    },"]
16415#[doc = "    {"]
16416#[doc = "      \"type\": \"object\","]
16417#[doc = "      \"required\": ["]
16418#[doc = "        \"DeleteAccount\""]
16419#[doc = "      ],"]
16420#[doc = "      \"properties\": {"]
16421#[doc = "        \"DeleteAccount\": {"]
16422#[doc = "          \"$ref\": \"#/components/schemas/DeleteAccountAction\""]
16423#[doc = "        }"]
16424#[doc = "      },"]
16425#[doc = "      \"additionalProperties\": false"]
16426#[doc = "    },"]
16427#[doc = "    {"]
16428#[doc = "      \"type\": \"object\","]
16429#[doc = "      \"required\": ["]
16430#[doc = "        \"DeployGlobalContract\""]
16431#[doc = "      ],"]
16432#[doc = "      \"properties\": {"]
16433#[doc = "        \"DeployGlobalContract\": {"]
16434#[doc = "          \"$ref\": \"#/components/schemas/DeployGlobalContractAction\""]
16435#[doc = "        }"]
16436#[doc = "      },"]
16437#[doc = "      \"additionalProperties\": false"]
16438#[doc = "    },"]
16439#[doc = "    {"]
16440#[doc = "      \"type\": \"object\","]
16441#[doc = "      \"required\": ["]
16442#[doc = "        \"UseGlobalContract\""]
16443#[doc = "      ],"]
16444#[doc = "      \"properties\": {"]
16445#[doc = "        \"UseGlobalContract\": {"]
16446#[doc = "          \"$ref\": \"#/components/schemas/UseGlobalContractAction\""]
16447#[doc = "        }"]
16448#[doc = "      },"]
16449#[doc = "      \"additionalProperties\": false"]
16450#[doc = "    },"]
16451#[doc = "    {"]
16452#[doc = "      \"type\": \"object\","]
16453#[doc = "      \"required\": ["]
16454#[doc = "        \"DeterministicStateInit\""]
16455#[doc = "      ],"]
16456#[doc = "      \"properties\": {"]
16457#[doc = "        \"DeterministicStateInit\": {"]
16458#[doc = "          \"$ref\": \"#/components/schemas/DeterministicStateInitAction\""]
16459#[doc = "        }"]
16460#[doc = "      },"]
16461#[doc = "      \"additionalProperties\": false"]
16462#[doc = "    }"]
16463#[doc = "  ]"]
16464#[doc = "}"]
16465#[doc = r" ```"]
16466#[doc = r" </details>"]
16467#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
16468pub enum NonDelegateAction {
16469    #[doc = "Create an (sub)account using a transaction `receiver_id` as an ID for\na new account ID must pass validation rules described here\n<http://nomicon.io/Primitives/Account.html>."]
16470    CreateAccount(CreateAccountAction),
16471    #[doc = "Sets a Wasm code to a receiver_id"]
16472    DeployContract(DeployContractAction),
16473    FunctionCall(FunctionCallAction),
16474    Transfer(TransferAction),
16475    Stake(StakeAction),
16476    AddKey(AddKeyAction),
16477    DeleteKey(DeleteKeyAction),
16478    DeleteAccount(DeleteAccountAction),
16479    DeployGlobalContract(DeployGlobalContractAction),
16480    UseGlobalContract(UseGlobalContractAction),
16481    DeterministicStateInit(DeterministicStateInitAction),
16482}
16483impl ::std::convert::From<&Self> for NonDelegateAction {
16484    fn from(value: &NonDelegateAction) -> Self {
16485        value.clone()
16486    }
16487}
16488impl ::std::convert::From<CreateAccountAction> for NonDelegateAction {
16489    fn from(value: CreateAccountAction) -> Self {
16490        Self::CreateAccount(value)
16491    }
16492}
16493impl ::std::convert::From<DeployContractAction> for NonDelegateAction {
16494    fn from(value: DeployContractAction) -> Self {
16495        Self::DeployContract(value)
16496    }
16497}
16498impl ::std::convert::From<FunctionCallAction> for NonDelegateAction {
16499    fn from(value: FunctionCallAction) -> Self {
16500        Self::FunctionCall(value)
16501    }
16502}
16503impl ::std::convert::From<TransferAction> for NonDelegateAction {
16504    fn from(value: TransferAction) -> Self {
16505        Self::Transfer(value)
16506    }
16507}
16508impl ::std::convert::From<StakeAction> for NonDelegateAction {
16509    fn from(value: StakeAction) -> Self {
16510        Self::Stake(value)
16511    }
16512}
16513impl ::std::convert::From<AddKeyAction> for NonDelegateAction {
16514    fn from(value: AddKeyAction) -> Self {
16515        Self::AddKey(value)
16516    }
16517}
16518impl ::std::convert::From<DeleteKeyAction> for NonDelegateAction {
16519    fn from(value: DeleteKeyAction) -> Self {
16520        Self::DeleteKey(value)
16521    }
16522}
16523impl ::std::convert::From<DeleteAccountAction> for NonDelegateAction {
16524    fn from(value: DeleteAccountAction) -> Self {
16525        Self::DeleteAccount(value)
16526    }
16527}
16528impl ::std::convert::From<DeployGlobalContractAction> for NonDelegateAction {
16529    fn from(value: DeployGlobalContractAction) -> Self {
16530        Self::DeployGlobalContract(value)
16531    }
16532}
16533impl ::std::convert::From<UseGlobalContractAction> for NonDelegateAction {
16534    fn from(value: UseGlobalContractAction) -> Self {
16535        Self::UseGlobalContract(value)
16536    }
16537}
16538impl ::std::convert::From<DeterministicStateInitAction> for NonDelegateAction {
16539    fn from(value: DeterministicStateInitAction) -> Self {
16540        Self::DeterministicStateInit(value)
16541    }
16542}
16543#[doc = "Peer id is the public key."]
16544#[doc = r""]
16545#[doc = r" <details><summary>JSON schema</summary>"]
16546#[doc = r""]
16547#[doc = r" ```json"]
16548#[doc = "{"]
16549#[doc = "  \"description\": \"Peer id is the public key.\","]
16550#[doc = "  \"allOf\": ["]
16551#[doc = "    {"]
16552#[doc = "      \"$ref\": \"#/components/schemas/PublicKey\""]
16553#[doc = "    }"]
16554#[doc = "  ]"]
16555#[doc = "}"]
16556#[doc = r" ```"]
16557#[doc = r" </details>"]
16558#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
16559#[serde(transparent)]
16560pub struct PeerId(pub PublicKey);
16561impl ::std::ops::Deref for PeerId {
16562    type Target = PublicKey;
16563    fn deref(&self) -> &PublicKey {
16564        &self.0
16565    }
16566}
16567impl ::std::convert::From<PeerId> for PublicKey {
16568    fn from(value: PeerId) -> Self {
16569        value.0
16570    }
16571}
16572impl ::std::convert::From<&PeerId> for PeerId {
16573    fn from(value: &PeerId) -> Self {
16574        value.clone()
16575    }
16576}
16577impl ::std::convert::From<PublicKey> for PeerId {
16578    fn from(value: PublicKey) -> Self {
16579        Self(value)
16580    }
16581}
16582impl ::std::str::FromStr for PeerId {
16583    type Err = <PublicKey as ::std::str::FromStr>::Err;
16584    fn from_str(value: &str) -> ::std::result::Result<Self, Self::Err> {
16585        Ok(Self(value.parse()?))
16586    }
16587}
16588impl ::std::convert::TryFrom<&str> for PeerId {
16589    type Error = <PublicKey as ::std::str::FromStr>::Err;
16590    fn try_from(value: &str) -> ::std::result::Result<Self, Self::Error> {
16591        value.parse()
16592    }
16593}
16594impl ::std::convert::TryFrom<&String> for PeerId {
16595    type Error = <PublicKey as ::std::str::FromStr>::Err;
16596    fn try_from(value: &String) -> ::std::result::Result<Self, Self::Error> {
16597        value.parse()
16598    }
16599}
16600impl ::std::convert::TryFrom<String> for PeerId {
16601    type Error = <PublicKey as ::std::str::FromStr>::Err;
16602    fn try_from(value: String) -> ::std::result::Result<Self, Self::Error> {
16603        value.parse()
16604    }
16605}
16606impl ::std::fmt::Display for PeerId {
16607    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
16608        self.0.fmt(f)
16609    }
16610}
16611#[doc = "`PeerInfoView`"]
16612#[doc = r""]
16613#[doc = r" <details><summary>JSON schema</summary>"]
16614#[doc = r""]
16615#[doc = r" ```json"]
16616#[doc = "{"]
16617#[doc = "  \"type\": \"object\","]
16618#[doc = "  \"required\": ["]
16619#[doc = "    \"addr\","]
16620#[doc = "    \"archival\","]
16621#[doc = "    \"connection_established_time_millis\","]
16622#[doc = "    \"is_highest_block_invalid\","]
16623#[doc = "    \"is_outbound_peer\","]
16624#[doc = "    \"last_time_peer_requested_millis\","]
16625#[doc = "    \"last_time_received_message_millis\","]
16626#[doc = "    \"nonce\","]
16627#[doc = "    \"peer_id\","]
16628#[doc = "    \"received_bytes_per_sec\","]
16629#[doc = "    \"sent_bytes_per_sec\","]
16630#[doc = "    \"tracked_shards\""]
16631#[doc = "  ],"]
16632#[doc = "  \"properties\": {"]
16633#[doc = "    \"account_id\": {"]
16634#[doc = "      \"anyOf\": ["]
16635#[doc = "        {"]
16636#[doc = "          \"$ref\": \"#/components/schemas/AccountId\""]
16637#[doc = "        },"]
16638#[doc = "        {"]
16639#[doc = "          \"type\": \"null\""]
16640#[doc = "        }"]
16641#[doc = "      ]"]
16642#[doc = "    },"]
16643#[doc = "    \"addr\": {"]
16644#[doc = "      \"type\": \"string\""]
16645#[doc = "    },"]
16646#[doc = "    \"archival\": {"]
16647#[doc = "      \"type\": \"boolean\""]
16648#[doc = "    },"]
16649#[doc = "    \"block_hash\": {"]
16650#[doc = "      \"anyOf\": ["]
16651#[doc = "        {"]
16652#[doc = "          \"$ref\": \"#/components/schemas/CryptoHash\""]
16653#[doc = "        },"]
16654#[doc = "        {"]
16655#[doc = "          \"type\": \"null\""]
16656#[doc = "        }"]
16657#[doc = "      ]"]
16658#[doc = "    },"]
16659#[doc = "    \"connection_established_time_millis\": {"]
16660#[doc = "      \"type\": \"integer\","]
16661#[doc = "      \"format\": \"uint64\","]
16662#[doc = "      \"minimum\": 0.0"]
16663#[doc = "    },"]
16664#[doc = "    \"height\": {"]
16665#[doc = "      \"type\": ["]
16666#[doc = "        \"integer\","]
16667#[doc = "        \"null\""]
16668#[doc = "      ],"]
16669#[doc = "      \"format\": \"uint64\","]
16670#[doc = "      \"minimum\": 0.0"]
16671#[doc = "    },"]
16672#[doc = "    \"is_highest_block_invalid\": {"]
16673#[doc = "      \"type\": \"boolean\""]
16674#[doc = "    },"]
16675#[doc = "    \"is_outbound_peer\": {"]
16676#[doc = "      \"type\": \"boolean\""]
16677#[doc = "    },"]
16678#[doc = "    \"last_time_peer_requested_millis\": {"]
16679#[doc = "      \"type\": \"integer\","]
16680#[doc = "      \"format\": \"uint64\","]
16681#[doc = "      \"minimum\": 0.0"]
16682#[doc = "    },"]
16683#[doc = "    \"last_time_received_message_millis\": {"]
16684#[doc = "      \"type\": \"integer\","]
16685#[doc = "      \"format\": \"uint64\","]
16686#[doc = "      \"minimum\": 0.0"]
16687#[doc = "    },"]
16688#[doc = "    \"nonce\": {"]
16689#[doc = "      \"description\": \"Connection nonce.\","]
16690#[doc = "      \"type\": \"integer\","]
16691#[doc = "      \"format\": \"uint64\","]
16692#[doc = "      \"minimum\": 0.0"]
16693#[doc = "    },"]
16694#[doc = "    \"peer_id\": {"]
16695#[doc = "      \"$ref\": \"#/components/schemas/PublicKey\""]
16696#[doc = "    },"]
16697#[doc = "    \"received_bytes_per_sec\": {"]
16698#[doc = "      \"type\": \"integer\","]
16699#[doc = "      \"format\": \"uint64\","]
16700#[doc = "      \"minimum\": 0.0"]
16701#[doc = "    },"]
16702#[doc = "    \"sent_bytes_per_sec\": {"]
16703#[doc = "      \"type\": \"integer\","]
16704#[doc = "      \"format\": \"uint64\","]
16705#[doc = "      \"minimum\": 0.0"]
16706#[doc = "    },"]
16707#[doc = "    \"tracked_shards\": {"]
16708#[doc = "      \"type\": \"array\","]
16709#[doc = "      \"items\": {"]
16710#[doc = "        \"$ref\": \"#/components/schemas/ShardId\""]
16711#[doc = "      }"]
16712#[doc = "    }"]
16713#[doc = "  }"]
16714#[doc = "}"]
16715#[doc = r" ```"]
16716#[doc = r" </details>"]
16717#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
16718pub struct PeerInfoView {
16719    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
16720    pub account_id: ::std::option::Option<AccountId>,
16721    pub addr: ::std::string::String,
16722    pub archival: bool,
16723    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
16724    pub block_hash: ::std::option::Option<CryptoHash>,
16725    pub connection_established_time_millis: u64,
16726    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
16727    pub height: ::std::option::Option<u64>,
16728    pub is_highest_block_invalid: bool,
16729    pub is_outbound_peer: bool,
16730    pub last_time_peer_requested_millis: u64,
16731    pub last_time_received_message_millis: u64,
16732    #[doc = "Connection nonce."]
16733    pub nonce: u64,
16734    pub peer_id: PublicKey,
16735    pub received_bytes_per_sec: u64,
16736    pub sent_bytes_per_sec: u64,
16737    pub tracked_shards: ::std::vec::Vec<ShardId>,
16738}
16739impl ::std::convert::From<&PeerInfoView> for PeerInfoView {
16740    fn from(value: &PeerInfoView) -> Self {
16741        value.clone()
16742    }
16743}
16744#[doc = "Error that can occur while preparing or executing Wasm smart-contract."]
16745#[doc = r""]
16746#[doc = r" <details><summary>JSON schema</summary>"]
16747#[doc = r""]
16748#[doc = r" ```json"]
16749#[doc = "{"]
16750#[doc = "  \"description\": \"Error that can occur while preparing or executing Wasm smart-contract.\","]
16751#[doc = "  \"oneOf\": ["]
16752#[doc = "    {"]
16753#[doc = "      \"description\": \"Error happened while serializing the module.\","]
16754#[doc = "      \"type\": \"string\","]
16755#[doc = "      \"enum\": ["]
16756#[doc = "        \"Serialization\""]
16757#[doc = "      ]"]
16758#[doc = "    },"]
16759#[doc = "    {"]
16760#[doc = "      \"description\": \"Error happened while deserializing the module.\","]
16761#[doc = "      \"type\": \"string\","]
16762#[doc = "      \"enum\": ["]
16763#[doc = "        \"Deserialization\""]
16764#[doc = "      ]"]
16765#[doc = "    },"]
16766#[doc = "    {"]
16767#[doc = "      \"description\": \"Internal memory declaration has been found in the module.\","]
16768#[doc = "      \"type\": \"string\","]
16769#[doc = "      \"enum\": ["]
16770#[doc = "        \"InternalMemoryDeclared\""]
16771#[doc = "      ]"]
16772#[doc = "    },"]
16773#[doc = "    {"]
16774#[doc = "      \"description\": \"Gas instrumentation failed.\\n\\nThis most likely indicates the module isn't valid.\","]
16775#[doc = "      \"type\": \"string\","]
16776#[doc = "      \"enum\": ["]
16777#[doc = "        \"GasInstrumentation\""]
16778#[doc = "      ]"]
16779#[doc = "    },"]
16780#[doc = "    {"]
16781#[doc = "      \"description\": \"Stack instrumentation failed.\\n\\nThis  most likely indicates the module isn't valid.\","]
16782#[doc = "      \"type\": \"string\","]
16783#[doc = "      \"enum\": ["]
16784#[doc = "        \"StackHeightInstrumentation\""]
16785#[doc = "      ]"]
16786#[doc = "    },"]
16787#[doc = "    {"]
16788#[doc = "      \"description\": \"Error happened during instantiation.\\n\\nThis might indicate that `start` function trapped, or module isn't\\ninstantiable and/or un-linkable.\","]
16789#[doc = "      \"type\": \"string\","]
16790#[doc = "      \"enum\": ["]
16791#[doc = "        \"Instantiate\""]
16792#[doc = "      ]"]
16793#[doc = "    },"]
16794#[doc = "    {"]
16795#[doc = "      \"description\": \"Error creating memory.\","]
16796#[doc = "      \"type\": \"string\","]
16797#[doc = "      \"enum\": ["]
16798#[doc = "        \"Memory\""]
16799#[doc = "      ]"]
16800#[doc = "    },"]
16801#[doc = "    {"]
16802#[doc = "      \"description\": \"Contract contains too many functions.\","]
16803#[doc = "      \"type\": \"string\","]
16804#[doc = "      \"enum\": ["]
16805#[doc = "        \"TooManyFunctions\""]
16806#[doc = "      ]"]
16807#[doc = "    },"]
16808#[doc = "    {"]
16809#[doc = "      \"description\": \"Contract contains too many locals.\","]
16810#[doc = "      \"type\": \"string\","]
16811#[doc = "      \"enum\": ["]
16812#[doc = "        \"TooManyLocals\""]
16813#[doc = "      ]"]
16814#[doc = "    },"]
16815#[doc = "    {"]
16816#[doc = "      \"description\": \"Contract contains too many tables.\","]
16817#[doc = "      \"type\": \"string\","]
16818#[doc = "      \"enum\": ["]
16819#[doc = "        \"TooManyTables\""]
16820#[doc = "      ]"]
16821#[doc = "    },"]
16822#[doc = "    {"]
16823#[doc = "      \"description\": \"Contract contains too many table elements.\","]
16824#[doc = "      \"type\": \"string\","]
16825#[doc = "      \"enum\": ["]
16826#[doc = "        \"TooManyTableElements\""]
16827#[doc = "      ]"]
16828#[doc = "    }"]
16829#[doc = "  ]"]
16830#[doc = "}"]
16831#[doc = r" ```"]
16832#[doc = r" </details>"]
16833#[derive(
16834    :: serde :: Deserialize,
16835    :: serde :: Serialize,
16836    Clone,
16837    Copy,
16838    Debug,
16839    Eq,
16840    Hash,
16841    Ord,
16842    PartialEq,
16843    PartialOrd,
16844)]
16845pub enum PrepareError {
16846    #[doc = "Error happened while serializing the module."]
16847    Serialization,
16848    #[doc = "Error happened while deserializing the module."]
16849    Deserialization,
16850    #[doc = "Internal memory declaration has been found in the module."]
16851    InternalMemoryDeclared,
16852    #[doc = "Gas instrumentation failed.\n\nThis most likely indicates the module isn't valid."]
16853    GasInstrumentation,
16854    #[doc = "Stack instrumentation failed.\n\nThis  most likely indicates the module isn't valid."]
16855    StackHeightInstrumentation,
16856    #[doc = "Error happened during instantiation.\n\nThis might indicate that `start` function trapped, or module isn't\ninstantiable and/or un-linkable."]
16857    Instantiate,
16858    #[doc = "Error creating memory."]
16859    Memory,
16860    #[doc = "Contract contains too many functions."]
16861    TooManyFunctions,
16862    #[doc = "Contract contains too many locals."]
16863    TooManyLocals,
16864    #[doc = "Contract contains too many tables."]
16865    TooManyTables,
16866    #[doc = "Contract contains too many table elements."]
16867    TooManyTableElements,
16868}
16869impl ::std::convert::From<&Self> for PrepareError {
16870    fn from(value: &PrepareError) -> Self {
16871        value.clone()
16872    }
16873}
16874impl ::std::fmt::Display for PrepareError {
16875    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
16876        match *self {
16877            Self::Serialization => f.write_str("Serialization"),
16878            Self::Deserialization => f.write_str("Deserialization"),
16879            Self::InternalMemoryDeclared => f.write_str("InternalMemoryDeclared"),
16880            Self::GasInstrumentation => f.write_str("GasInstrumentation"),
16881            Self::StackHeightInstrumentation => f.write_str("StackHeightInstrumentation"),
16882            Self::Instantiate => f.write_str("Instantiate"),
16883            Self::Memory => f.write_str("Memory"),
16884            Self::TooManyFunctions => f.write_str("TooManyFunctions"),
16885            Self::TooManyLocals => f.write_str("TooManyLocals"),
16886            Self::TooManyTables => f.write_str("TooManyTables"),
16887            Self::TooManyTableElements => f.write_str("TooManyTableElements"),
16888        }
16889    }
16890}
16891impl ::std::str::FromStr for PrepareError {
16892    type Err = self::error::ConversionError;
16893    fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
16894        match value {
16895            "Serialization" => Ok(Self::Serialization),
16896            "Deserialization" => Ok(Self::Deserialization),
16897            "InternalMemoryDeclared" => Ok(Self::InternalMemoryDeclared),
16898            "GasInstrumentation" => Ok(Self::GasInstrumentation),
16899            "StackHeightInstrumentation" => Ok(Self::StackHeightInstrumentation),
16900            "Instantiate" => Ok(Self::Instantiate),
16901            "Memory" => Ok(Self::Memory),
16902            "TooManyFunctions" => Ok(Self::TooManyFunctions),
16903            "TooManyLocals" => Ok(Self::TooManyLocals),
16904            "TooManyTables" => Ok(Self::TooManyTables),
16905            "TooManyTableElements" => Ok(Self::TooManyTableElements),
16906            _ => Err("invalid value".into()),
16907        }
16908    }
16909}
16910impl ::std::convert::TryFrom<&str> for PrepareError {
16911    type Error = self::error::ConversionError;
16912    fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
16913        value.parse()
16914    }
16915}
16916impl ::std::convert::TryFrom<&::std::string::String> for PrepareError {
16917    type Error = self::error::ConversionError;
16918    fn try_from(
16919        value: &::std::string::String,
16920    ) -> ::std::result::Result<Self, self::error::ConversionError> {
16921        value.parse()
16922    }
16923}
16924impl ::std::convert::TryFrom<::std::string::String> for PrepareError {
16925    type Error = self::error::ConversionError;
16926    fn try_from(
16927        value: ::std::string::String,
16928    ) -> ::std::result::Result<Self, self::error::ConversionError> {
16929        value.parse()
16930    }
16931}
16932#[doc = "Configures whether the node checks the next or the next next epoch for network version compatibility."]
16933#[doc = r""]
16934#[doc = r" <details><summary>JSON schema</summary>"]
16935#[doc = r""]
16936#[doc = r" ```json"]
16937#[doc = "{"]
16938#[doc = "  \"description\": \"Configures whether the node checks the next or the next next epoch for network version compatibility.\","]
16939#[doc = "  \"type\": \"string\","]
16940#[doc = "  \"enum\": ["]
16941#[doc = "    \"Next\","]
16942#[doc = "    \"NextNext\""]
16943#[doc = "  ]"]
16944#[doc = "}"]
16945#[doc = r" ```"]
16946#[doc = r" </details>"]
16947#[derive(
16948    :: serde :: Deserialize,
16949    :: serde :: Serialize,
16950    Clone,
16951    Copy,
16952    Debug,
16953    Eq,
16954    Hash,
16955    Ord,
16956    PartialEq,
16957    PartialOrd,
16958)]
16959pub enum ProtocolVersionCheckConfig {
16960    Next,
16961    NextNext,
16962}
16963impl ::std::convert::From<&Self> for ProtocolVersionCheckConfig {
16964    fn from(value: &ProtocolVersionCheckConfig) -> Self {
16965        value.clone()
16966    }
16967}
16968impl ::std::fmt::Display for ProtocolVersionCheckConfig {
16969    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
16970        match *self {
16971            Self::Next => f.write_str("Next"),
16972            Self::NextNext => f.write_str("NextNext"),
16973        }
16974    }
16975}
16976impl ::std::str::FromStr for ProtocolVersionCheckConfig {
16977    type Err = self::error::ConversionError;
16978    fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
16979        match value {
16980            "Next" => Ok(Self::Next),
16981            "NextNext" => Ok(Self::NextNext),
16982            _ => Err("invalid value".into()),
16983        }
16984    }
16985}
16986impl ::std::convert::TryFrom<&str> for ProtocolVersionCheckConfig {
16987    type Error = self::error::ConversionError;
16988    fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
16989        value.parse()
16990    }
16991}
16992impl ::std::convert::TryFrom<&::std::string::String> for ProtocolVersionCheckConfig {
16993    type Error = self::error::ConversionError;
16994    fn try_from(
16995        value: &::std::string::String,
16996    ) -> ::std::result::Result<Self, self::error::ConversionError> {
16997        value.parse()
16998    }
16999}
17000impl ::std::convert::TryFrom<::std::string::String> for ProtocolVersionCheckConfig {
17001    type Error = self::error::ConversionError;
17002    fn try_from(
17003        value: ::std::string::String,
17004    ) -> ::std::result::Result<Self, self::error::ConversionError> {
17005        value.parse()
17006    }
17007}
17008#[doc = "`PublicKey`"]
17009#[doc = r""]
17010#[doc = r" <details><summary>JSON schema</summary>"]
17011#[doc = r""]
17012#[doc = r" ```json"]
17013#[doc = "{"]
17014#[doc = "  \"type\": \"string\""]
17015#[doc = "}"]
17016#[doc = r" ```"]
17017#[doc = r" </details>"]
17018#[derive(
17019    :: serde :: Deserialize,
17020    :: serde :: Serialize,
17021    Clone,
17022    Debug,
17023    Eq,
17024    Hash,
17025    Ord,
17026    PartialEq,
17027    PartialOrd,
17028)]
17029#[serde(transparent)]
17030pub struct PublicKey(pub ::std::string::String);
17031impl ::std::ops::Deref for PublicKey {
17032    type Target = ::std::string::String;
17033    fn deref(&self) -> &::std::string::String {
17034        &self.0
17035    }
17036}
17037impl ::std::convert::From<PublicKey> for ::std::string::String {
17038    fn from(value: PublicKey) -> Self {
17039        value.0
17040    }
17041}
17042impl ::std::convert::From<&PublicKey> for PublicKey {
17043    fn from(value: &PublicKey) -> Self {
17044        value.clone()
17045    }
17046}
17047impl ::std::convert::From<::std::string::String> for PublicKey {
17048    fn from(value: ::std::string::String) -> Self {
17049        Self(value)
17050    }
17051}
17052impl ::std::str::FromStr for PublicKey {
17053    type Err = ::std::convert::Infallible;
17054    fn from_str(value: &str) -> ::std::result::Result<Self, Self::Err> {
17055        Ok(Self(value.to_string()))
17056    }
17057}
17058impl ::std::fmt::Display for PublicKey {
17059    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
17060        self.0.fmt(f)
17061    }
17062}
17063#[doc = "`RangeOfUint64`"]
17064#[doc = r""]
17065#[doc = r" <details><summary>JSON schema</summary>"]
17066#[doc = r""]
17067#[doc = r" ```json"]
17068#[doc = "{"]
17069#[doc = "  \"type\": \"object\","]
17070#[doc = "  \"required\": ["]
17071#[doc = "    \"end\","]
17072#[doc = "    \"start\""]
17073#[doc = "  ],"]
17074#[doc = "  \"properties\": {"]
17075#[doc = "    \"end\": {"]
17076#[doc = "      \"type\": \"integer\","]
17077#[doc = "      \"format\": \"uint64\","]
17078#[doc = "      \"minimum\": 0.0"]
17079#[doc = "    },"]
17080#[doc = "    \"start\": {"]
17081#[doc = "      \"type\": \"integer\","]
17082#[doc = "      \"format\": \"uint64\","]
17083#[doc = "      \"minimum\": 0.0"]
17084#[doc = "    }"]
17085#[doc = "  }"]
17086#[doc = "}"]
17087#[doc = r" ```"]
17088#[doc = r" </details>"]
17089#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
17090pub struct RangeOfUint64 {
17091    pub end: u64,
17092    pub start: u64,
17093}
17094impl ::std::convert::From<&RangeOfUint64> for RangeOfUint64 {
17095    fn from(value: &RangeOfUint64) -> Self {
17096        value.clone()
17097    }
17098}
17099#[doc = "`ReceiptEnumView`"]
17100#[doc = r""]
17101#[doc = r" <details><summary>JSON schema</summary>"]
17102#[doc = r""]
17103#[doc = r" ```json"]
17104#[doc = "{"]
17105#[doc = "  \"oneOf\": ["]
17106#[doc = "    {"]
17107#[doc = "      \"type\": \"object\","]
17108#[doc = "      \"required\": ["]
17109#[doc = "        \"Action\""]
17110#[doc = "      ],"]
17111#[doc = "      \"properties\": {"]
17112#[doc = "        \"Action\": {"]
17113#[doc = "          \"type\": \"object\","]
17114#[doc = "          \"required\": ["]
17115#[doc = "            \"actions\","]
17116#[doc = "            \"gas_price\","]
17117#[doc = "            \"input_data_ids\","]
17118#[doc = "            \"output_data_receivers\","]
17119#[doc = "            \"signer_id\","]
17120#[doc = "            \"signer_public_key\""]
17121#[doc = "          ],"]
17122#[doc = "          \"properties\": {"]
17123#[doc = "            \"actions\": {"]
17124#[doc = "              \"type\": \"array\","]
17125#[doc = "              \"items\": {"]
17126#[doc = "                \"$ref\": \"#/components/schemas/ActionView\""]
17127#[doc = "              }"]
17128#[doc = "            },"]
17129#[doc = "            \"gas_price\": {"]
17130#[doc = "              \"$ref\": \"#/components/schemas/NearToken\""]
17131#[doc = "            },"]
17132#[doc = "            \"input_data_ids\": {"]
17133#[doc = "              \"type\": \"array\","]
17134#[doc = "              \"items\": {"]
17135#[doc = "                \"$ref\": \"#/components/schemas/CryptoHash\""]
17136#[doc = "              }"]
17137#[doc = "            },"]
17138#[doc = "            \"is_promise_yield\": {"]
17139#[doc = "              \"default\": false,"]
17140#[doc = "              \"type\": \"boolean\""]
17141#[doc = "            },"]
17142#[doc = "            \"output_data_receivers\": {"]
17143#[doc = "              \"type\": \"array\","]
17144#[doc = "              \"items\": {"]
17145#[doc = "                \"$ref\": \"#/components/schemas/DataReceiverView\""]
17146#[doc = "              }"]
17147#[doc = "            },"]
17148#[doc = "            \"signer_id\": {"]
17149#[doc = "              \"$ref\": \"#/components/schemas/AccountId\""]
17150#[doc = "            },"]
17151#[doc = "            \"signer_public_key\": {"]
17152#[doc = "              \"$ref\": \"#/components/schemas/PublicKey\""]
17153#[doc = "            }"]
17154#[doc = "          }"]
17155#[doc = "        }"]
17156#[doc = "      },"]
17157#[doc = "      \"additionalProperties\": false"]
17158#[doc = "    },"]
17159#[doc = "    {"]
17160#[doc = "      \"type\": \"object\","]
17161#[doc = "      \"required\": ["]
17162#[doc = "        \"Data\""]
17163#[doc = "      ],"]
17164#[doc = "      \"properties\": {"]
17165#[doc = "        \"Data\": {"]
17166#[doc = "          \"type\": \"object\","]
17167#[doc = "          \"required\": ["]
17168#[doc = "            \"data_id\""]
17169#[doc = "          ],"]
17170#[doc = "          \"properties\": {"]
17171#[doc = "            \"data\": {"]
17172#[doc = "              \"type\": ["]
17173#[doc = "                \"string\","]
17174#[doc = "                \"null\""]
17175#[doc = "              ]"]
17176#[doc = "            },"]
17177#[doc = "            \"data_id\": {"]
17178#[doc = "              \"$ref\": \"#/components/schemas/CryptoHash\""]
17179#[doc = "            },"]
17180#[doc = "            \"is_promise_resume\": {"]
17181#[doc = "              \"default\": false,"]
17182#[doc = "              \"type\": \"boolean\""]
17183#[doc = "            }"]
17184#[doc = "          }"]
17185#[doc = "        }"]
17186#[doc = "      },"]
17187#[doc = "      \"additionalProperties\": false"]
17188#[doc = "    },"]
17189#[doc = "    {"]
17190#[doc = "      \"type\": \"object\","]
17191#[doc = "      \"required\": ["]
17192#[doc = "        \"GlobalContractDistribution\""]
17193#[doc = "      ],"]
17194#[doc = "      \"properties\": {"]
17195#[doc = "        \"GlobalContractDistribution\": {"]
17196#[doc = "          \"type\": \"object\","]
17197#[doc = "          \"required\": ["]
17198#[doc = "            \"already_delivered_shards\","]
17199#[doc = "            \"code\","]
17200#[doc = "            \"id\","]
17201#[doc = "            \"target_shard\""]
17202#[doc = "          ],"]
17203#[doc = "          \"properties\": {"]
17204#[doc = "            \"already_delivered_shards\": {"]
17205#[doc = "              \"type\": \"array\","]
17206#[doc = "              \"items\": {"]
17207#[doc = "                \"$ref\": \"#/components/schemas/ShardId\""]
17208#[doc = "              }"]
17209#[doc = "            },"]
17210#[doc = "            \"code\": {"]
17211#[doc = "              \"type\": \"string\""]
17212#[doc = "            },"]
17213#[doc = "            \"id\": {"]
17214#[doc = "              \"$ref\": \"#/components/schemas/GlobalContractIdentifier\""]
17215#[doc = "            },"]
17216#[doc = "            \"target_shard\": {"]
17217#[doc = "              \"$ref\": \"#/components/schemas/ShardId\""]
17218#[doc = "            }"]
17219#[doc = "          }"]
17220#[doc = "        }"]
17221#[doc = "      },"]
17222#[doc = "      \"additionalProperties\": false"]
17223#[doc = "    }"]
17224#[doc = "  ]"]
17225#[doc = "}"]
17226#[doc = r" ```"]
17227#[doc = r" </details>"]
17228#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
17229pub enum ReceiptEnumView {
17230    Action {
17231        actions: ::std::vec::Vec<ActionView>,
17232        gas_price: NearToken,
17233        input_data_ids: ::std::vec::Vec<CryptoHash>,
17234        #[serde(default)]
17235        is_promise_yield: bool,
17236        output_data_receivers: ::std::vec::Vec<DataReceiverView>,
17237        signer_id: AccountId,
17238        signer_public_key: PublicKey,
17239    },
17240    Data {
17241        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
17242        data: ::std::option::Option<::std::string::String>,
17243        data_id: CryptoHash,
17244        #[serde(default)]
17245        is_promise_resume: bool,
17246    },
17247    GlobalContractDistribution {
17248        already_delivered_shards: ::std::vec::Vec<ShardId>,
17249        code: ::std::string::String,
17250        id: GlobalContractIdentifier,
17251        target_shard: ShardId,
17252    },
17253}
17254impl ::std::convert::From<&Self> for ReceiptEnumView {
17255    fn from(value: &ReceiptEnumView) -> Self {
17256        value.clone()
17257    }
17258}
17259#[doc = "Describes the error for validating a receipt."]
17260#[doc = r""]
17261#[doc = r" <details><summary>JSON schema</summary>"]
17262#[doc = r""]
17263#[doc = r" ```json"]
17264#[doc = "{"]
17265#[doc = "  \"description\": \"Describes the error for validating a receipt.\","]
17266#[doc = "  \"oneOf\": ["]
17267#[doc = "    {"]
17268#[doc = "      \"description\": \"The `predecessor_id` of a Receipt is not valid.\","]
17269#[doc = "      \"type\": \"object\","]
17270#[doc = "      \"required\": ["]
17271#[doc = "        \"InvalidPredecessorId\""]
17272#[doc = "      ],"]
17273#[doc = "      \"properties\": {"]
17274#[doc = "        \"InvalidPredecessorId\": {"]
17275#[doc = "          \"type\": \"object\","]
17276#[doc = "          \"required\": ["]
17277#[doc = "            \"account_id\""]
17278#[doc = "          ],"]
17279#[doc = "          \"properties\": {"]
17280#[doc = "            \"account_id\": {"]
17281#[doc = "              \"type\": \"string\""]
17282#[doc = "            }"]
17283#[doc = "          }"]
17284#[doc = "        }"]
17285#[doc = "      },"]
17286#[doc = "      \"additionalProperties\": false"]
17287#[doc = "    },"]
17288#[doc = "    {"]
17289#[doc = "      \"description\": \"The `receiver_id` of a Receipt is not valid.\","]
17290#[doc = "      \"type\": \"object\","]
17291#[doc = "      \"required\": ["]
17292#[doc = "        \"InvalidReceiverId\""]
17293#[doc = "      ],"]
17294#[doc = "      \"properties\": {"]
17295#[doc = "        \"InvalidReceiverId\": {"]
17296#[doc = "          \"type\": \"object\","]
17297#[doc = "          \"required\": ["]
17298#[doc = "            \"account_id\""]
17299#[doc = "          ],"]
17300#[doc = "          \"properties\": {"]
17301#[doc = "            \"account_id\": {"]
17302#[doc = "              \"type\": \"string\""]
17303#[doc = "            }"]
17304#[doc = "          }"]
17305#[doc = "        }"]
17306#[doc = "      },"]
17307#[doc = "      \"additionalProperties\": false"]
17308#[doc = "    },"]
17309#[doc = "    {"]
17310#[doc = "      \"description\": \"The `signer_id` of an ActionReceipt is not valid.\","]
17311#[doc = "      \"type\": \"object\","]
17312#[doc = "      \"required\": ["]
17313#[doc = "        \"InvalidSignerId\""]
17314#[doc = "      ],"]
17315#[doc = "      \"properties\": {"]
17316#[doc = "        \"InvalidSignerId\": {"]
17317#[doc = "          \"type\": \"object\","]
17318#[doc = "          \"required\": ["]
17319#[doc = "            \"account_id\""]
17320#[doc = "          ],"]
17321#[doc = "          \"properties\": {"]
17322#[doc = "            \"account_id\": {"]
17323#[doc = "              \"type\": \"string\""]
17324#[doc = "            }"]
17325#[doc = "          }"]
17326#[doc = "        }"]
17327#[doc = "      },"]
17328#[doc = "      \"additionalProperties\": false"]
17329#[doc = "    },"]
17330#[doc = "    {"]
17331#[doc = "      \"description\": \"The `receiver_id` of a DataReceiver within an ActionReceipt is not valid.\","]
17332#[doc = "      \"type\": \"object\","]
17333#[doc = "      \"required\": ["]
17334#[doc = "        \"InvalidDataReceiverId\""]
17335#[doc = "      ],"]
17336#[doc = "      \"properties\": {"]
17337#[doc = "        \"InvalidDataReceiverId\": {"]
17338#[doc = "          \"type\": \"object\","]
17339#[doc = "          \"required\": ["]
17340#[doc = "            \"account_id\""]
17341#[doc = "          ],"]
17342#[doc = "          \"properties\": {"]
17343#[doc = "            \"account_id\": {"]
17344#[doc = "              \"type\": \"string\""]
17345#[doc = "            }"]
17346#[doc = "          }"]
17347#[doc = "        }"]
17348#[doc = "      },"]
17349#[doc = "      \"additionalProperties\": false"]
17350#[doc = "    },"]
17351#[doc = "    {"]
17352#[doc = "      \"description\": \"The length of the returned data exceeded the limit in a DataReceipt.\","]
17353#[doc = "      \"type\": \"object\","]
17354#[doc = "      \"required\": ["]
17355#[doc = "        \"ReturnedValueLengthExceeded\""]
17356#[doc = "      ],"]
17357#[doc = "      \"properties\": {"]
17358#[doc = "        \"ReturnedValueLengthExceeded\": {"]
17359#[doc = "          \"type\": \"object\","]
17360#[doc = "          \"required\": ["]
17361#[doc = "            \"length\","]
17362#[doc = "            \"limit\""]
17363#[doc = "          ],"]
17364#[doc = "          \"properties\": {"]
17365#[doc = "            \"length\": {"]
17366#[doc = "              \"type\": \"integer\","]
17367#[doc = "              \"format\": \"uint64\","]
17368#[doc = "              \"minimum\": 0.0"]
17369#[doc = "            },"]
17370#[doc = "            \"limit\": {"]
17371#[doc = "              \"type\": \"integer\","]
17372#[doc = "              \"format\": \"uint64\","]
17373#[doc = "              \"minimum\": 0.0"]
17374#[doc = "            }"]
17375#[doc = "          }"]
17376#[doc = "        }"]
17377#[doc = "      },"]
17378#[doc = "      \"additionalProperties\": false"]
17379#[doc = "    },"]
17380#[doc = "    {"]
17381#[doc = "      \"description\": \"The number of input data dependencies exceeds the limit in an ActionReceipt.\","]
17382#[doc = "      \"type\": \"object\","]
17383#[doc = "      \"required\": ["]
17384#[doc = "        \"NumberInputDataDependenciesExceeded\""]
17385#[doc = "      ],"]
17386#[doc = "      \"properties\": {"]
17387#[doc = "        \"NumberInputDataDependenciesExceeded\": {"]
17388#[doc = "          \"type\": \"object\","]
17389#[doc = "          \"required\": ["]
17390#[doc = "            \"limit\","]
17391#[doc = "            \"number_of_input_data_dependencies\""]
17392#[doc = "          ],"]
17393#[doc = "          \"properties\": {"]
17394#[doc = "            \"limit\": {"]
17395#[doc = "              \"type\": \"integer\","]
17396#[doc = "              \"format\": \"uint64\","]
17397#[doc = "              \"minimum\": 0.0"]
17398#[doc = "            },"]
17399#[doc = "            \"number_of_input_data_dependencies\": {"]
17400#[doc = "              \"type\": \"integer\","]
17401#[doc = "              \"format\": \"uint64\","]
17402#[doc = "              \"minimum\": 0.0"]
17403#[doc = "            }"]
17404#[doc = "          }"]
17405#[doc = "        }"]
17406#[doc = "      },"]
17407#[doc = "      \"additionalProperties\": false"]
17408#[doc = "    },"]
17409#[doc = "    {"]
17410#[doc = "      \"description\": \"An error occurred while validating actions of an ActionReceipt.\","]
17411#[doc = "      \"type\": \"object\","]
17412#[doc = "      \"required\": ["]
17413#[doc = "        \"ActionsValidation\""]
17414#[doc = "      ],"]
17415#[doc = "      \"properties\": {"]
17416#[doc = "        \"ActionsValidation\": {"]
17417#[doc = "          \"$ref\": \"#/components/schemas/ActionsValidationError\""]
17418#[doc = "        }"]
17419#[doc = "      },"]
17420#[doc = "      \"additionalProperties\": false"]
17421#[doc = "    },"]
17422#[doc = "    {"]
17423#[doc = "      \"description\": \"Receipt is bigger than the limit.\","]
17424#[doc = "      \"type\": \"object\","]
17425#[doc = "      \"required\": ["]
17426#[doc = "        \"ReceiptSizeExceeded\""]
17427#[doc = "      ],"]
17428#[doc = "      \"properties\": {"]
17429#[doc = "        \"ReceiptSizeExceeded\": {"]
17430#[doc = "          \"type\": \"object\","]
17431#[doc = "          \"required\": ["]
17432#[doc = "            \"limit\","]
17433#[doc = "            \"size\""]
17434#[doc = "          ],"]
17435#[doc = "          \"properties\": {"]
17436#[doc = "            \"limit\": {"]
17437#[doc = "              \"type\": \"integer\","]
17438#[doc = "              \"format\": \"uint64\","]
17439#[doc = "              \"minimum\": 0.0"]
17440#[doc = "            },"]
17441#[doc = "            \"size\": {"]
17442#[doc = "              \"type\": \"integer\","]
17443#[doc = "              \"format\": \"uint64\","]
17444#[doc = "              \"minimum\": 0.0"]
17445#[doc = "            }"]
17446#[doc = "          }"]
17447#[doc = "        }"]
17448#[doc = "      },"]
17449#[doc = "      \"additionalProperties\": false"]
17450#[doc = "    }"]
17451#[doc = "  ]"]
17452#[doc = "}"]
17453#[doc = r" ```"]
17454#[doc = r" </details>"]
17455#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
17456pub enum ReceiptValidationError {
17457    #[doc = "The `predecessor_id` of a Receipt is not valid."]
17458    InvalidPredecessorId { account_id: ::std::string::String },
17459    #[doc = "The `receiver_id` of a Receipt is not valid."]
17460    InvalidReceiverId { account_id: ::std::string::String },
17461    #[doc = "The `signer_id` of an ActionReceipt is not valid."]
17462    InvalidSignerId { account_id: ::std::string::String },
17463    #[doc = "The `receiver_id` of a DataReceiver within an ActionReceipt is not valid."]
17464    InvalidDataReceiverId { account_id: ::std::string::String },
17465    #[doc = "The length of the returned data exceeded the limit in a DataReceipt."]
17466    ReturnedValueLengthExceeded { length: u64, limit: u64 },
17467    #[doc = "The number of input data dependencies exceeds the limit in an ActionReceipt."]
17468    NumberInputDataDependenciesExceeded {
17469        limit: u64,
17470        number_of_input_data_dependencies: u64,
17471    },
17472    #[doc = "An error occurred while validating actions of an ActionReceipt."]
17473    ActionsValidation(ActionsValidationError),
17474    #[doc = "Receipt is bigger than the limit."]
17475    ReceiptSizeExceeded { limit: u64, size: u64 },
17476}
17477impl ::std::convert::From<&Self> for ReceiptValidationError {
17478    fn from(value: &ReceiptValidationError) -> Self {
17479        value.clone()
17480    }
17481}
17482impl ::std::convert::From<ActionsValidationError> for ReceiptValidationError {
17483    fn from(value: ActionsValidationError) -> Self {
17484        Self::ActionsValidation(value)
17485    }
17486}
17487#[doc = "`ReceiptView`"]
17488#[doc = r""]
17489#[doc = r" <details><summary>JSON schema</summary>"]
17490#[doc = r""]
17491#[doc = r" ```json"]
17492#[doc = "{"]
17493#[doc = "  \"type\": \"object\","]
17494#[doc = "  \"required\": ["]
17495#[doc = "    \"predecessor_id\","]
17496#[doc = "    \"receipt\","]
17497#[doc = "    \"receipt_id\","]
17498#[doc = "    \"receiver_id\""]
17499#[doc = "  ],"]
17500#[doc = "  \"properties\": {"]
17501#[doc = "    \"predecessor_id\": {"]
17502#[doc = "      \"$ref\": \"#/components/schemas/AccountId\""]
17503#[doc = "    },"]
17504#[doc = "    \"priority\": {"]
17505#[doc = "      \"default\": 0,"]
17506#[doc = "      \"type\": \"integer\","]
17507#[doc = "      \"format\": \"uint64\","]
17508#[doc = "      \"minimum\": 0.0"]
17509#[doc = "    },"]
17510#[doc = "    \"receipt\": {"]
17511#[doc = "      \"$ref\": \"#/components/schemas/ReceiptEnumView\""]
17512#[doc = "    },"]
17513#[doc = "    \"receipt_id\": {"]
17514#[doc = "      \"$ref\": \"#/components/schemas/CryptoHash\""]
17515#[doc = "    },"]
17516#[doc = "    \"receiver_id\": {"]
17517#[doc = "      \"$ref\": \"#/components/schemas/AccountId\""]
17518#[doc = "    }"]
17519#[doc = "  }"]
17520#[doc = "}"]
17521#[doc = r" ```"]
17522#[doc = r" </details>"]
17523#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
17524pub struct ReceiptView {
17525    pub predecessor_id: AccountId,
17526    #[serde(default)]
17527    pub priority: u64,
17528    pub receipt: ReceiptEnumView,
17529    pub receipt_id: CryptoHash,
17530    pub receiver_id: AccountId,
17531}
17532impl ::std::convert::From<&ReceiptView> for ReceiptView {
17533    fn from(value: &ReceiptView) -> Self {
17534        value.clone()
17535    }
17536}
17537#[doc = "`RpcBlockRequest`"]
17538#[doc = r""]
17539#[doc = r" <details><summary>JSON schema</summary>"]
17540#[doc = r""]
17541#[doc = r" ```json"]
17542#[doc = "{"]
17543#[doc = "  \"title\": \"RpcBlockRequest\","]
17544#[doc = "  \"type\": \"object\","]
17545#[doc = "  \"oneOf\": ["]
17546#[doc = "    {"]
17547#[doc = "      \"type\": \"object\","]
17548#[doc = "      \"required\": ["]
17549#[doc = "        \"block_id\""]
17550#[doc = "      ],"]
17551#[doc = "      \"properties\": {"]
17552#[doc = "        \"block_id\": {"]
17553#[doc = "          \"$ref\": \"#/components/schemas/BlockId\""]
17554#[doc = "        }"]
17555#[doc = "      }"]
17556#[doc = "    },"]
17557#[doc = "    {"]
17558#[doc = "      \"type\": \"object\","]
17559#[doc = "      \"required\": ["]
17560#[doc = "        \"finality\""]
17561#[doc = "      ],"]
17562#[doc = "      \"properties\": {"]
17563#[doc = "        \"finality\": {"]
17564#[doc = "          \"$ref\": \"#/components/schemas/Finality\""]
17565#[doc = "        }"]
17566#[doc = "      }"]
17567#[doc = "    },"]
17568#[doc = "    {"]
17569#[doc = "      \"type\": \"object\","]
17570#[doc = "      \"required\": ["]
17571#[doc = "        \"sync_checkpoint\""]
17572#[doc = "      ],"]
17573#[doc = "      \"properties\": {"]
17574#[doc = "        \"sync_checkpoint\": {"]
17575#[doc = "          \"$ref\": \"#/components/schemas/SyncCheckpoint\""]
17576#[doc = "        }"]
17577#[doc = "      }"]
17578#[doc = "    }"]
17579#[doc = "  ]"]
17580#[doc = "}"]
17581#[doc = r" ```"]
17582#[doc = r" </details>"]
17583#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
17584pub enum RpcBlockRequest {
17585    #[serde(rename = "block_id")]
17586    BlockId(BlockId),
17587    #[serde(rename = "finality")]
17588    Finality(Finality),
17589    #[serde(rename = "sync_checkpoint")]
17590    SyncCheckpoint(SyncCheckpoint),
17591}
17592impl ::std::convert::From<&Self> for RpcBlockRequest {
17593    fn from(value: &RpcBlockRequest) -> Self {
17594        value.clone()
17595    }
17596}
17597impl ::std::convert::From<BlockId> for RpcBlockRequest {
17598    fn from(value: BlockId) -> Self {
17599        Self::BlockId(value)
17600    }
17601}
17602impl ::std::convert::From<Finality> for RpcBlockRequest {
17603    fn from(value: Finality) -> Self {
17604        Self::Finality(value)
17605    }
17606}
17607impl ::std::convert::From<SyncCheckpoint> for RpcBlockRequest {
17608    fn from(value: SyncCheckpoint) -> Self {
17609        Self::SyncCheckpoint(value)
17610    }
17611}
17612#[doc = "`RpcBlockResponse`"]
17613#[doc = r""]
17614#[doc = r" <details><summary>JSON schema</summary>"]
17615#[doc = r""]
17616#[doc = r" ```json"]
17617#[doc = "{"]
17618#[doc = "  \"type\": \"object\","]
17619#[doc = "  \"required\": ["]
17620#[doc = "    \"author\","]
17621#[doc = "    \"chunks\","]
17622#[doc = "    \"header\""]
17623#[doc = "  ],"]
17624#[doc = "  \"properties\": {"]
17625#[doc = "    \"author\": {"]
17626#[doc = "      \"description\": \"The AccountId of the author of the Block\","]
17627#[doc = "      \"allOf\": ["]
17628#[doc = "        {"]
17629#[doc = "          \"$ref\": \"#/components/schemas/AccountId\""]
17630#[doc = "        }"]
17631#[doc = "      ]"]
17632#[doc = "    },"]
17633#[doc = "    \"chunks\": {"]
17634#[doc = "      \"type\": \"array\","]
17635#[doc = "      \"items\": {"]
17636#[doc = "        \"$ref\": \"#/components/schemas/ChunkHeaderView\""]
17637#[doc = "      }"]
17638#[doc = "    },"]
17639#[doc = "    \"header\": {"]
17640#[doc = "      \"$ref\": \"#/components/schemas/BlockHeaderView\""]
17641#[doc = "    }"]
17642#[doc = "  }"]
17643#[doc = "}"]
17644#[doc = r" ```"]
17645#[doc = r" </details>"]
17646#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
17647pub struct RpcBlockResponse {
17648    #[doc = "The AccountId of the author of the Block"]
17649    pub author: AccountId,
17650    pub chunks: ::std::vec::Vec<ChunkHeaderView>,
17651    pub header: BlockHeaderView,
17652}
17653impl ::std::convert::From<&RpcBlockResponse> for RpcBlockResponse {
17654    fn from(value: &RpcBlockResponse) -> Self {
17655        value.clone()
17656    }
17657}
17658#[doc = "`RpcChunkRequest`"]
17659#[doc = r""]
17660#[doc = r" <details><summary>JSON schema</summary>"]
17661#[doc = r""]
17662#[doc = r" ```json"]
17663#[doc = "{"]
17664#[doc = "  \"title\": \"RpcChunkRequest\","]
17665#[doc = "  \"type\": \"object\","]
17666#[doc = "  \"anyOf\": ["]
17667#[doc = "    {"]
17668#[doc = "      \"title\": \"block_shard_id\","]
17669#[doc = "      \"type\": \"object\","]
17670#[doc = "      \"required\": ["]
17671#[doc = "        \"block_id\","]
17672#[doc = "        \"shard_id\""]
17673#[doc = "      ],"]
17674#[doc = "      \"properties\": {"]
17675#[doc = "        \"block_id\": {"]
17676#[doc = "          \"$ref\": \"#/components/schemas/BlockId\""]
17677#[doc = "        },"]
17678#[doc = "        \"shard_id\": {"]
17679#[doc = "          \"$ref\": \"#/components/schemas/ShardId\""]
17680#[doc = "        }"]
17681#[doc = "      }"]
17682#[doc = "    },"]
17683#[doc = "    {"]
17684#[doc = "      \"title\": \"chunk_hash\","]
17685#[doc = "      \"type\": \"object\","]
17686#[doc = "      \"required\": ["]
17687#[doc = "        \"chunk_id\""]
17688#[doc = "      ],"]
17689#[doc = "      \"properties\": {"]
17690#[doc = "        \"chunk_id\": {"]
17691#[doc = "          \"$ref\": \"#/components/schemas/CryptoHash\""]
17692#[doc = "        }"]
17693#[doc = "      }"]
17694#[doc = "    }"]
17695#[doc = "  ]"]
17696#[doc = "}"]
17697#[doc = r" ```"]
17698#[doc = r" </details>"]
17699#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
17700#[serde(untagged)]
17701pub enum RpcChunkRequest {
17702    BlockShardId {
17703        block_id: BlockId,
17704        shard_id: ShardId,
17705    },
17706    ChunkHash {
17707        chunk_id: CryptoHash,
17708    },
17709}
17710impl ::std::convert::From<&Self> for RpcChunkRequest {
17711    fn from(value: &RpcChunkRequest) -> Self {
17712        value.clone()
17713    }
17714}
17715#[doc = "`RpcChunkResponse`"]
17716#[doc = r""]
17717#[doc = r" <details><summary>JSON schema</summary>"]
17718#[doc = r""]
17719#[doc = r" ```json"]
17720#[doc = "{"]
17721#[doc = "  \"type\": \"object\","]
17722#[doc = "  \"required\": ["]
17723#[doc = "    \"author\","]
17724#[doc = "    \"header\","]
17725#[doc = "    \"receipts\","]
17726#[doc = "    \"transactions\""]
17727#[doc = "  ],"]
17728#[doc = "  \"properties\": {"]
17729#[doc = "    \"author\": {"]
17730#[doc = "      \"$ref\": \"#/components/schemas/AccountId\""]
17731#[doc = "    },"]
17732#[doc = "    \"header\": {"]
17733#[doc = "      \"$ref\": \"#/components/schemas/ChunkHeaderView\""]
17734#[doc = "    },"]
17735#[doc = "    \"receipts\": {"]
17736#[doc = "      \"type\": \"array\","]
17737#[doc = "      \"items\": {"]
17738#[doc = "        \"$ref\": \"#/components/schemas/ReceiptView\""]
17739#[doc = "      }"]
17740#[doc = "    },"]
17741#[doc = "    \"transactions\": {"]
17742#[doc = "      \"type\": \"array\","]
17743#[doc = "      \"items\": {"]
17744#[doc = "        \"$ref\": \"#/components/schemas/SignedTransactionView\""]
17745#[doc = "      }"]
17746#[doc = "    }"]
17747#[doc = "  }"]
17748#[doc = "}"]
17749#[doc = r" ```"]
17750#[doc = r" </details>"]
17751#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
17752pub struct RpcChunkResponse {
17753    pub author: AccountId,
17754    pub header: ChunkHeaderView,
17755    pub receipts: ::std::vec::Vec<ReceiptView>,
17756    pub transactions: ::std::vec::Vec<SignedTransactionView>,
17757}
17758impl ::std::convert::From<&RpcChunkResponse> for RpcChunkResponse {
17759    fn from(value: &RpcChunkResponse) -> Self {
17760        value.clone()
17761    }
17762}
17763#[doc = "`RpcClientConfigRequest`"]
17764#[doc = r""]
17765#[doc = r" <details><summary>JSON schema</summary>"]
17766#[doc = r""]
17767#[doc = r" ```json"]
17768#[doc = "{"]
17769#[doc = "  \"title\": \"RpcClientConfigRequest\","]
17770#[doc = "  \"type\": \"null\""]
17771#[doc = "}"]
17772#[doc = r" ```"]
17773#[doc = r" </details>"]
17774#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
17775#[serde(transparent)]
17776pub struct RpcClientConfigRequest(pub ());
17777impl ::std::ops::Deref for RpcClientConfigRequest {
17778    type Target = ();
17779    fn deref(&self) -> &() {
17780        &self.0
17781    }
17782}
17783impl ::std::convert::From<RpcClientConfigRequest> for () {
17784    fn from(value: RpcClientConfigRequest) -> Self {
17785        value.0
17786    }
17787}
17788impl ::std::convert::From<&RpcClientConfigRequest> for RpcClientConfigRequest {
17789    fn from(value: &RpcClientConfigRequest) -> Self {
17790        value.clone()
17791    }
17792}
17793impl ::std::convert::From<()> for RpcClientConfigRequest {
17794    fn from(value: ()) -> Self {
17795        Self(value)
17796    }
17797}
17798#[doc = "ClientConfig where some fields can be updated at runtime."]
17799#[doc = r""]
17800#[doc = r" <details><summary>JSON schema</summary>"]
17801#[doc = r""]
17802#[doc = r" ```json"]
17803#[doc = "{"]
17804#[doc = "  \"description\": \"ClientConfig where some fields can be updated at runtime.\","]
17805#[doc = "  \"type\": \"object\","]
17806#[doc = "  \"required\": ["]
17807#[doc = "    \"archive\","]
17808#[doc = "    \"block_fetch_horizon\","]
17809#[doc = "    \"block_header_fetch_horizon\","]
17810#[doc = "    \"block_production_tracking_delay\","]
17811#[doc = "    \"catchup_step_period\","]
17812#[doc = "    \"chain_id\","]
17813#[doc = "    \"chunk_request_retry_period\","]
17814#[doc = "    \"chunk_validation_threads\","]
17815#[doc = "    \"chunk_wait_mult\","]
17816#[doc = "    \"client_background_migration_threads\","]
17817#[doc = "    \"doomslug_step_period\","]
17818#[doc = "    \"enable_multiline_logging\","]
17819#[doc = "    \"enable_statistics_export\","]
17820#[doc = "    \"epoch_length\","]
17821#[doc = "    \"epoch_sync\","]
17822#[doc = "    \"expected_shutdown\","]
17823#[doc = "    \"gc\","]
17824#[doc = "    \"header_sync_expected_height_per_second\","]
17825#[doc = "    \"header_sync_initial_timeout\","]
17826#[doc = "    \"header_sync_progress_timeout\","]
17827#[doc = "    \"header_sync_stall_ban_timeout\","]
17828#[doc = "    \"log_summary_period\","]
17829#[doc = "    \"log_summary_style\","]
17830#[doc = "    \"max_block_production_delay\","]
17831#[doc = "    \"max_block_wait_delay\","]
17832#[doc = "    \"min_block_production_delay\","]
17833#[doc = "    \"min_num_peers\","]
17834#[doc = "    \"num_block_producer_seats\","]
17835#[doc = "    \"orphan_state_witness_max_size\","]
17836#[doc = "    \"orphan_state_witness_pool_size\","]
17837#[doc = "    \"produce_chunk_add_transactions_time_limit\","]
17838#[doc = "    \"produce_empty_blocks\","]
17839#[doc = "    \"protocol_version_check\","]
17840#[doc = "    \"resharding_config\","]
17841#[doc = "    \"save_invalid_witnesses\","]
17842#[doc = "    \"save_latest_witnesses\","]
17843#[doc = "    \"save_trie_changes\","]
17844#[doc = "    \"save_tx_outcomes\","]
17845#[doc = "    \"save_untracked_partial_chunks_parts\","]
17846#[doc = "    \"skip_sync_wait\","]
17847#[doc = "    \"state_request_server_threads\","]
17848#[doc = "    \"state_request_throttle_period\","]
17849#[doc = "    \"state_requests_per_throttle_period\","]
17850#[doc = "    \"state_sync\","]
17851#[doc = "    \"state_sync_enabled\","]
17852#[doc = "    \"state_sync_external_backoff\","]
17853#[doc = "    \"state_sync_external_timeout\","]
17854#[doc = "    \"state_sync_p2p_timeout\","]
17855#[doc = "    \"state_sync_retry_backoff\","]
17856#[doc = "    \"sync_check_period\","]
17857#[doc = "    \"sync_height_threshold\","]
17858#[doc = "    \"sync_max_block_requests\","]
17859#[doc = "    \"sync_step_period\","]
17860#[doc = "    \"tracked_shards_config\","]
17861#[doc = "    \"transaction_request_handler_threads\","]
17862#[doc = "    \"ttl_account_id_router\","]
17863#[doc = "    \"tx_routing_height_horizon\","]
17864#[doc = "    \"version\","]
17865#[doc = "    \"view_client_threads\""]
17866#[doc = "  ],"]
17867#[doc = "  \"properties\": {"]
17868#[doc = "    \"archive\": {"]
17869#[doc = "      \"description\": \"Not clear old data, set `true` for archive nodes.\","]
17870#[doc = "      \"type\": \"boolean\""]
17871#[doc = "    },"]
17872#[doc = "    \"block_fetch_horizon\": {"]
17873#[doc = "      \"description\": \"Horizon at which instead of fetching block, fetch full state.\","]
17874#[doc = "      \"type\": \"integer\","]
17875#[doc = "      \"format\": \"uint64\","]
17876#[doc = "      \"minimum\": 0.0"]
17877#[doc = "    },"]
17878#[doc = "    \"block_header_fetch_horizon\": {"]
17879#[doc = "      \"description\": \"Behind this horizon header fetch kicks in.\","]
17880#[doc = "      \"type\": \"integer\","]
17881#[doc = "      \"format\": \"uint64\","]
17882#[doc = "      \"minimum\": 0.0"]
17883#[doc = "    },"]
17884#[doc = "    \"block_production_tracking_delay\": {"]
17885#[doc = "      \"description\": \"Duration to check for producing / skipping block.\","]
17886#[doc = "      \"type\": \"array\","]
17887#[doc = "      \"items\": {"]
17888#[doc = "        \"type\": \"integer\","]
17889#[doc = "        \"format\": \"uint64\","]
17890#[doc = "        \"minimum\": 0.0"]
17891#[doc = "      },"]
17892#[doc = "      \"maxItems\": 2,"]
17893#[doc = "      \"minItems\": 2"]
17894#[doc = "    },"]
17895#[doc = "    \"catchup_step_period\": {"]
17896#[doc = "      \"description\": \"Time between check to perform catchup.\","]
17897#[doc = "      \"type\": \"array\","]
17898#[doc = "      \"items\": {"]
17899#[doc = "        \"type\": \"integer\","]
17900#[doc = "        \"format\": \"uint64\","]
17901#[doc = "        \"minimum\": 0.0"]
17902#[doc = "      },"]
17903#[doc = "      \"maxItems\": 2,"]
17904#[doc = "      \"minItems\": 2"]
17905#[doc = "    },"]
17906#[doc = "    \"chain_id\": {"]
17907#[doc = "      \"description\": \"Chain id for status.\","]
17908#[doc = "      \"type\": \"string\""]
17909#[doc = "    },"]
17910#[doc = "    \"chunk_distribution_network\": {"]
17911#[doc = "      \"description\": \"Optional config for the Chunk Distribution Network feature.\\nIf set to `None` then this node does not participate in the Chunk Distribution Network.\\nNodes not participating will still function fine, but possibly with higher\\nlatency due to the need of requesting chunks over the peer-to-peer network.\","]
17912#[doc = "      \"anyOf\": ["]
17913#[doc = "        {"]
17914#[doc = "          \"$ref\": \"#/components/schemas/ChunkDistributionNetworkConfig\""]
17915#[doc = "        },"]
17916#[doc = "        {"]
17917#[doc = "          \"type\": \"null\""]
17918#[doc = "        }"]
17919#[doc = "      ]"]
17920#[doc = "    },"]
17921#[doc = "    \"chunk_request_retry_period\": {"]
17922#[doc = "      \"description\": \"Time between checking to re-request chunks.\","]
17923#[doc = "      \"type\": \"array\","]
17924#[doc = "      \"items\": {"]
17925#[doc = "        \"type\": \"integer\","]
17926#[doc = "        \"format\": \"uint64\","]
17927#[doc = "        \"minimum\": 0.0"]
17928#[doc = "      },"]
17929#[doc = "      \"maxItems\": 2,"]
17930#[doc = "      \"minItems\": 2"]
17931#[doc = "    },"]
17932#[doc = "    \"chunk_validation_threads\": {"]
17933#[doc = "      \"description\": \"Number of threads for ChunkValidationActor pool.\","]
17934#[doc = "      \"type\": \"integer\","]
17935#[doc = "      \"format\": \"uint\","]
17936#[doc = "      \"minimum\": 0.0"]
17937#[doc = "    },"]
17938#[doc = "    \"chunk_wait_mult\": {"]
17939#[doc = "      \"description\": \"Multiplier for the wait time for all chunks to be received.\","]
17940#[doc = "      \"type\": \"array\","]
17941#[doc = "      \"items\": {"]
17942#[doc = "        \"type\": \"integer\","]
17943#[doc = "        \"format\": \"int32\""]
17944#[doc = "      },"]
17945#[doc = "      \"maxItems\": 2,"]
17946#[doc = "      \"minItems\": 2"]
17947#[doc = "    },"]
17948#[doc = "    \"client_background_migration_threads\": {"]
17949#[doc = "      \"description\": \"Number of threads to execute background migration work in client.\","]
17950#[doc = "      \"type\": \"integer\","]
17951#[doc = "      \"format\": \"uint\","]
17952#[doc = "      \"minimum\": 0.0"]
17953#[doc = "    },"]
17954#[doc = "    \"cloud_archival_reader\": {"]
17955#[doc = "      \"description\": \"Configuration for a cloud-based archival reader.\","]
17956#[doc = "      \"anyOf\": ["]
17957#[doc = "        {"]
17958#[doc = "          \"$ref\": \"#/components/schemas/CloudArchivalReaderConfig\""]
17959#[doc = "        },"]
17960#[doc = "        {"]
17961#[doc = "          \"type\": \"null\""]
17962#[doc = "        }"]
17963#[doc = "      ]"]
17964#[doc = "    },"]
17965#[doc = "    \"cloud_archival_writer\": {"]
17966#[doc = "      \"description\": \"Configuration for a cloud-based archival writer. If this config is present, the writer is enabled and\\nwrites chunk-related data based on the tracked shards.\","]
17967#[doc = "      \"anyOf\": ["]
17968#[doc = "        {"]
17969#[doc = "          \"$ref\": \"#/components/schemas/CloudArchivalWriterConfig\""]
17970#[doc = "        },"]
17971#[doc = "        {"]
17972#[doc = "          \"type\": \"null\""]
17973#[doc = "        }"]
17974#[doc = "      ]"]
17975#[doc = "    },"]
17976#[doc = "    \"doomslug_step_period\": {"]
17977#[doc = "      \"description\": \"Time between running doomslug timer.\","]
17978#[doc = "      \"type\": \"array\","]
17979#[doc = "      \"items\": {"]
17980#[doc = "        \"type\": \"integer\","]
17981#[doc = "        \"format\": \"uint64\","]
17982#[doc = "        \"minimum\": 0.0"]
17983#[doc = "      },"]
17984#[doc = "      \"maxItems\": 2,"]
17985#[doc = "      \"minItems\": 2"]
17986#[doc = "    },"]
17987#[doc = "    \"enable_multiline_logging\": {"]
17988#[doc = "      \"type\": \"boolean\""]
17989#[doc = "    },"]
17990#[doc = "    \"enable_statistics_export\": {"]
17991#[doc = "      \"description\": \"Re-export storage layer statistics as prometheus metrics.\","]
17992#[doc = "      \"type\": \"boolean\""]
17993#[doc = "    },"]
17994#[doc = "    \"epoch_length\": {"]
17995#[doc = "      \"description\": \"Epoch length.\","]
17996#[doc = "      \"type\": \"integer\","]
17997#[doc = "      \"format\": \"uint64\","]
17998#[doc = "      \"minimum\": 0.0"]
17999#[doc = "    },"]
18000#[doc = "    \"epoch_sync\": {"]
18001#[doc = "      \"description\": \"Options for epoch sync.\","]
18002#[doc = "      \"allOf\": ["]
18003#[doc = "        {"]
18004#[doc = "          \"$ref\": \"#/components/schemas/EpochSyncConfig\""]
18005#[doc = "        }"]
18006#[doc = "      ]"]
18007#[doc = "    },"]
18008#[doc = "    \"expected_shutdown\": {"]
18009#[doc = "      \"description\": \"Graceful shutdown at expected block height.\","]
18010#[doc = "      \"allOf\": ["]
18011#[doc = "        {"]
18012#[doc = "          \"$ref\": \"#/components/schemas/MutableConfigValue\""]
18013#[doc = "        }"]
18014#[doc = "      ]"]
18015#[doc = "    },"]
18016#[doc = "    \"gc\": {"]
18017#[doc = "      \"description\": \"Garbage collection configuration.\","]
18018#[doc = "      \"allOf\": ["]
18019#[doc = "        {"]
18020#[doc = "          \"$ref\": \"#/components/schemas/GCConfig\""]
18021#[doc = "        }"]
18022#[doc = "      ]"]
18023#[doc = "    },"]
18024#[doc = "    \"header_sync_expected_height_per_second\": {"]
18025#[doc = "      \"description\": \"Expected increase of header head height per second during header sync\","]
18026#[doc = "      \"type\": \"integer\","]
18027#[doc = "      \"format\": \"uint64\","]
18028#[doc = "      \"minimum\": 0.0"]
18029#[doc = "    },"]
18030#[doc = "    \"header_sync_initial_timeout\": {"]
18031#[doc = "      \"description\": \"How much time to wait after initial header sync\","]
18032#[doc = "      \"type\": \"array\","]
18033#[doc = "      \"items\": {"]
18034#[doc = "        \"type\": \"integer\","]
18035#[doc = "        \"format\": \"uint64\","]
18036#[doc = "        \"minimum\": 0.0"]
18037#[doc = "      },"]
18038#[doc = "      \"maxItems\": 2,"]
18039#[doc = "      \"minItems\": 2"]
18040#[doc = "    },"]
18041#[doc = "    \"header_sync_progress_timeout\": {"]
18042#[doc = "      \"description\": \"How much time to wait after some progress is made in header sync\","]
18043#[doc = "      \"type\": \"array\","]
18044#[doc = "      \"items\": {"]
18045#[doc = "        \"type\": \"integer\","]
18046#[doc = "        \"format\": \"uint64\","]
18047#[doc = "        \"minimum\": 0.0"]
18048#[doc = "      },"]
18049#[doc = "      \"maxItems\": 2,"]
18050#[doc = "      \"minItems\": 2"]
18051#[doc = "    },"]
18052#[doc = "    \"header_sync_stall_ban_timeout\": {"]
18053#[doc = "      \"description\": \"How much time to wait before banning a peer in header sync if sync is too slow\","]
18054#[doc = "      \"type\": \"array\","]
18055#[doc = "      \"items\": {"]
18056#[doc = "        \"type\": \"integer\","]
18057#[doc = "        \"format\": \"uint64\","]
18058#[doc = "        \"minimum\": 0.0"]
18059#[doc = "      },"]
18060#[doc = "      \"maxItems\": 2,"]
18061#[doc = "      \"minItems\": 2"]
18062#[doc = "    },"]
18063#[doc = "    \"log_summary_period\": {"]
18064#[doc = "      \"description\": \"Period between logging summary information.\","]
18065#[doc = "      \"type\": \"array\","]
18066#[doc = "      \"items\": {"]
18067#[doc = "        \"type\": \"integer\","]
18068#[doc = "        \"format\": \"uint64\","]
18069#[doc = "        \"minimum\": 0.0"]
18070#[doc = "      },"]
18071#[doc = "      \"maxItems\": 2,"]
18072#[doc = "      \"minItems\": 2"]
18073#[doc = "    },"]
18074#[doc = "    \"log_summary_style\": {"]
18075#[doc = "      \"description\": \"Enable coloring of the logs\","]
18076#[doc = "      \"allOf\": ["]
18077#[doc = "        {"]
18078#[doc = "          \"$ref\": \"#/components/schemas/LogSummaryStyle\""]
18079#[doc = "        }"]
18080#[doc = "      ]"]
18081#[doc = "    },"]
18082#[doc = "    \"max_block_production_delay\": {"]
18083#[doc = "      \"description\": \"Maximum wait for approvals before producing block.\","]
18084#[doc = "      \"type\": \"array\","]
18085#[doc = "      \"items\": {"]
18086#[doc = "        \"type\": \"integer\","]
18087#[doc = "        \"format\": \"uint64\","]
18088#[doc = "        \"minimum\": 0.0"]
18089#[doc = "      },"]
18090#[doc = "      \"maxItems\": 2,"]
18091#[doc = "      \"minItems\": 2"]
18092#[doc = "    },"]
18093#[doc = "    \"max_block_wait_delay\": {"]
18094#[doc = "      \"description\": \"Maximum duration before skipping given height.\","]
18095#[doc = "      \"type\": \"array\","]
18096#[doc = "      \"items\": {"]
18097#[doc = "        \"type\": \"integer\","]
18098#[doc = "        \"format\": \"uint64\","]
18099#[doc = "        \"minimum\": 0.0"]
18100#[doc = "      },"]
18101#[doc = "      \"maxItems\": 2,"]
18102#[doc = "      \"minItems\": 2"]
18103#[doc = "    },"]
18104#[doc = "    \"max_gas_burnt_view\": {"]
18105#[doc = "      \"description\": \"Max burnt gas per view method.  If present, overrides value stored in\\ngenesis file.  The value only affects the RPCs without influencing the\\nprotocol thus changing it per-node doesn’t affect the blockchain.\","]
18106#[doc = "      \"anyOf\": ["]
18107#[doc = "        {"]
18108#[doc = "          \"$ref\": \"#/components/schemas/NearGas\""]
18109#[doc = "        },"]
18110#[doc = "        {"]
18111#[doc = "          \"type\": \"null\""]
18112#[doc = "        }"]
18113#[doc = "      ]"]
18114#[doc = "    },"]
18115#[doc = "    \"min_block_production_delay\": {"]
18116#[doc = "      \"description\": \"Minimum duration before producing block.\","]
18117#[doc = "      \"type\": \"array\","]
18118#[doc = "      \"items\": {"]
18119#[doc = "        \"type\": \"integer\","]
18120#[doc = "        \"format\": \"uint64\","]
18121#[doc = "        \"minimum\": 0.0"]
18122#[doc = "      },"]
18123#[doc = "      \"maxItems\": 2,"]
18124#[doc = "      \"minItems\": 2"]
18125#[doc = "    },"]
18126#[doc = "    \"min_num_peers\": {"]
18127#[doc = "      \"description\": \"Minimum number of peers to start syncing.\","]
18128#[doc = "      \"type\": \"integer\","]
18129#[doc = "      \"format\": \"uint\","]
18130#[doc = "      \"minimum\": 0.0"]
18131#[doc = "    },"]
18132#[doc = "    \"num_block_producer_seats\": {"]
18133#[doc = "      \"description\": \"Number of block producer seats\","]
18134#[doc = "      \"type\": \"integer\","]
18135#[doc = "      \"format\": \"uint64\","]
18136#[doc = "      \"minimum\": 0.0"]
18137#[doc = "    },"]
18138#[doc = "    \"orphan_state_witness_max_size\": {"]
18139#[doc = "      \"description\": \"Maximum size of state witnesses in the OrphanStateWitnessPool.\\n\\nWe keep only orphan witnesses which are smaller than this size.\\nThis limits the maximum memory usage of OrphanStateWitnessPool.\","]
18140#[doc = "      \"type\": \"integer\","]
18141#[doc = "      \"format\": \"uint64\","]
18142#[doc = "      \"minimum\": 0.0"]
18143#[doc = "    },"]
18144#[doc = "    \"orphan_state_witness_pool_size\": {"]
18145#[doc = "      \"description\": \"OrphanStateWitnessPool keeps instances of ChunkStateWitness which can't be processed\\nbecause the previous block isn't available. The witnesses wait in the pool until the\\nrequired block appears. This variable controls how many witnesses can be stored in the pool.\","]
18146#[doc = "      \"type\": \"integer\","]
18147#[doc = "      \"format\": \"uint\","]
18148#[doc = "      \"minimum\": 0.0"]
18149#[doc = "    },"]
18150#[doc = "    \"produce_chunk_add_transactions_time_limit\": {"]
18151#[doc = "      \"description\": \"Limit the time of adding transactions to a chunk.\\nA node produces a chunk by adding transactions from the transaction pool until\\nsome limit is reached. This time limit ensures that adding transactions won't take\\nlonger than the specified duration, which helps to produce the chunk quickly.\","]
18152#[doc = "      \"type\": \"string\""]
18153#[doc = "    },"]
18154#[doc = "    \"produce_empty_blocks\": {"]
18155#[doc = "      \"description\": \"Produce empty blocks, use `false` for testing.\","]
18156#[doc = "      \"type\": \"boolean\""]
18157#[doc = "    },"]
18158#[doc = "    \"protocol_version_check\": {"]
18159#[doc = "      \"description\": \"Determines whether client should exit if the protocol version is not supported\\nfor the next or next next epoch.\","]
18160#[doc = "      \"allOf\": ["]
18161#[doc = "        {"]
18162#[doc = "          \"$ref\": \"#/components/schemas/ProtocolVersionCheckConfig\""]
18163#[doc = "        }"]
18164#[doc = "      ]"]
18165#[doc = "    },"]
18166#[doc = "    \"resharding_config\": {"]
18167#[doc = "      \"$ref\": \"#/components/schemas/MutableConfigValue\""]
18168#[doc = "    },"]
18169#[doc = "    \"rpc_addr\": {"]
18170#[doc = "      \"description\": \"Listening rpc port for status.\","]
18171#[doc = "      \"type\": ["]
18172#[doc = "        \"string\","]
18173#[doc = "        \"null\""]
18174#[doc = "      ]"]
18175#[doc = "    },"]
18176#[doc = "    \"save_invalid_witnesses\": {"]
18177#[doc = "      \"description\": \"Save observed instances of invalid ChunkStateWitness to the database in DBCol::InvalidChunkStateWitnesses.\\nSaving invalid witnesses is useful for analysis and debugging.\\nThis option can cause extra load on the database and is not recommended for production use.\","]
18178#[doc = "      \"type\": \"boolean\""]
18179#[doc = "    },"]
18180#[doc = "    \"save_latest_witnesses\": {"]
18181#[doc = "      \"description\": \"Save observed instances of ChunkStateWitness to the database in DBCol::LatestChunkStateWitnesses.\\nSaving the latest witnesses is useful for analysis and debugging.\\nThis option can cause extra load on the database and is not recommended for production use.\","]
18182#[doc = "      \"type\": \"boolean\""]
18183#[doc = "    },"]
18184#[doc = "    \"save_trie_changes\": {"]
18185#[doc = "      \"description\": \"save_trie_changes should be set to true iff\\n- archive if false - non-archival nodes need trie changes to perform garbage collection\\n- archive is true, cold_store is configured and migration to split_storage is finished - node\\nworking in split storage mode needs trie changes in order to do garbage collection on hot.\","]
18186#[doc = "      \"type\": \"boolean\""]
18187#[doc = "    },"]
18188#[doc = "    \"save_tx_outcomes\": {"]
18189#[doc = "      \"description\": \"Whether to persist transaction outcomes to disk or not.\","]
18190#[doc = "      \"type\": \"boolean\""]
18191#[doc = "    },"]
18192#[doc = "    \"save_untracked_partial_chunks_parts\": {"]
18193#[doc = "      \"description\": \"Whether to persist partial chunk parts for untracked shards or not.\","]
18194#[doc = "      \"type\": \"boolean\""]
18195#[doc = "    },"]
18196#[doc = "    \"skip_sync_wait\": {"]
18197#[doc = "      \"description\": \"Skip waiting for sync (for testing or single node testnet).\","]
18198#[doc = "      \"type\": \"boolean\""]
18199#[doc = "    },"]
18200#[doc = "    \"state_request_server_threads\": {"]
18201#[doc = "      \"description\": \"Number of threads for StateRequestActor pool.\","]
18202#[doc = "      \"type\": \"integer\","]
18203#[doc = "      \"format\": \"uint\","]
18204#[doc = "      \"minimum\": 0.0"]
18205#[doc = "    },"]
18206#[doc = "    \"state_request_throttle_period\": {"]
18207#[doc = "      \"description\": \"Number of seconds between state requests for view client.\\nThrottling window for state requests (headers and parts).\","]
18208#[doc = "      \"type\": \"array\","]
18209#[doc = "      \"items\": {"]
18210#[doc = "        \"type\": \"integer\","]
18211#[doc = "        \"format\": \"uint64\","]
18212#[doc = "        \"minimum\": 0.0"]
18213#[doc = "      },"]
18214#[doc = "      \"maxItems\": 2,"]
18215#[doc = "      \"minItems\": 2"]
18216#[doc = "    },"]
18217#[doc = "    \"state_requests_per_throttle_period\": {"]
18218#[doc = "      \"description\": \"Maximum number of state requests served per throttle period\","]
18219#[doc = "      \"type\": \"integer\","]
18220#[doc = "      \"format\": \"uint\","]
18221#[doc = "      \"minimum\": 0.0"]
18222#[doc = "    },"]
18223#[doc = "    \"state_sync\": {"]
18224#[doc = "      \"description\": \"Options for syncing state.\","]
18225#[doc = "      \"allOf\": ["]
18226#[doc = "        {"]
18227#[doc = "          \"$ref\": \"#/components/schemas/StateSyncConfig\""]
18228#[doc = "        }"]
18229#[doc = "      ]"]
18230#[doc = "    },"]
18231#[doc = "    \"state_sync_enabled\": {"]
18232#[doc = "      \"description\": \"Whether to use the State Sync mechanism.\\nIf disabled, the node will do Block Sync instead of State Sync.\","]
18233#[doc = "      \"type\": \"boolean\""]
18234#[doc = "    },"]
18235#[doc = "    \"state_sync_external_backoff\": {"]
18236#[doc = "      \"description\": \"Additional waiting period after a failed request to external storage\","]
18237#[doc = "      \"type\": \"array\","]
18238#[doc = "      \"items\": {"]
18239#[doc = "        \"type\": \"integer\","]
18240#[doc = "        \"format\": \"uint64\","]
18241#[doc = "        \"minimum\": 0.0"]
18242#[doc = "      },"]
18243#[doc = "      \"maxItems\": 2,"]
18244#[doc = "      \"minItems\": 2"]
18245#[doc = "    },"]
18246#[doc = "    \"state_sync_external_timeout\": {"]
18247#[doc = "      \"description\": \"How long to wait for a response from centralized state sync\","]
18248#[doc = "      \"type\": \"array\","]
18249#[doc = "      \"items\": {"]
18250#[doc = "        \"type\": \"integer\","]
18251#[doc = "        \"format\": \"uint64\","]
18252#[doc = "        \"minimum\": 0.0"]
18253#[doc = "      },"]
18254#[doc = "      \"maxItems\": 2,"]
18255#[doc = "      \"minItems\": 2"]
18256#[doc = "    },"]
18257#[doc = "    \"state_sync_p2p_timeout\": {"]
18258#[doc = "      \"description\": \"How long to wait for a response from p2p state sync\","]
18259#[doc = "      \"type\": \"array\","]
18260#[doc = "      \"items\": {"]
18261#[doc = "        \"type\": \"integer\","]
18262#[doc = "        \"format\": \"uint64\","]
18263#[doc = "        \"minimum\": 0.0"]
18264#[doc = "      },"]
18265#[doc = "      \"maxItems\": 2,"]
18266#[doc = "      \"minItems\": 2"]
18267#[doc = "    },"]
18268#[doc = "    \"state_sync_retry_backoff\": {"]
18269#[doc = "      \"description\": \"How long to wait after a failed state sync request\","]
18270#[doc = "      \"type\": \"array\","]
18271#[doc = "      \"items\": {"]
18272#[doc = "        \"type\": \"integer\","]
18273#[doc = "        \"format\": \"uint64\","]
18274#[doc = "        \"minimum\": 0.0"]
18275#[doc = "      },"]
18276#[doc = "      \"maxItems\": 2,"]
18277#[doc = "      \"minItems\": 2"]
18278#[doc = "    },"]
18279#[doc = "    \"sync_check_period\": {"]
18280#[doc = "      \"description\": \"How often to check that we are not out of sync.\","]
18281#[doc = "      \"type\": \"array\","]
18282#[doc = "      \"items\": {"]
18283#[doc = "        \"type\": \"integer\","]
18284#[doc = "        \"format\": \"uint64\","]
18285#[doc = "        \"minimum\": 0.0"]
18286#[doc = "      },"]
18287#[doc = "      \"maxItems\": 2,"]
18288#[doc = "      \"minItems\": 2"]
18289#[doc = "    },"]
18290#[doc = "    \"sync_height_threshold\": {"]
18291#[doc = "      \"description\": \"Sync height threshold: below this difference in height don't start syncing.\","]
18292#[doc = "      \"type\": \"integer\","]
18293#[doc = "      \"format\": \"uint64\","]
18294#[doc = "      \"minimum\": 0.0"]
18295#[doc = "    },"]
18296#[doc = "    \"sync_max_block_requests\": {"]
18297#[doc = "      \"description\": \"Maximum number of block requests to send to peers to sync\","]
18298#[doc = "      \"type\": \"integer\","]
18299#[doc = "      \"format\": \"uint\","]
18300#[doc = "      \"minimum\": 0.0"]
18301#[doc = "    },"]
18302#[doc = "    \"sync_step_period\": {"]
18303#[doc = "      \"description\": \"While syncing, how long to check for each step.\","]
18304#[doc = "      \"type\": \"array\","]
18305#[doc = "      \"items\": {"]
18306#[doc = "        \"type\": \"integer\","]
18307#[doc = "        \"format\": \"uint64\","]
18308#[doc = "        \"minimum\": 0.0"]
18309#[doc = "      },"]
18310#[doc = "      \"maxItems\": 2,"]
18311#[doc = "      \"minItems\": 2"]
18312#[doc = "    },"]
18313#[doc = "    \"tracked_shards_config\": {"]
18314#[doc = "      \"$ref\": \"#/components/schemas/TrackedShardsConfig\""]
18315#[doc = "    },"]
18316#[doc = "    \"transaction_pool_size_limit\": {"]
18317#[doc = "      \"description\": \"Limit of the size of per-shard transaction pool measured in bytes. If not set, the size\\nwill be unbounded.\","]
18318#[doc = "      \"type\": ["]
18319#[doc = "        \"integer\","]
18320#[doc = "        \"null\""]
18321#[doc = "      ],"]
18322#[doc = "      \"format\": \"uint64\","]
18323#[doc = "      \"minimum\": 0.0"]
18324#[doc = "    },"]
18325#[doc = "    \"transaction_request_handler_threads\": {"]
18326#[doc = "      \"type\": \"integer\","]
18327#[doc = "      \"format\": \"uint\","]
18328#[doc = "      \"minimum\": 0.0"]
18329#[doc = "    },"]
18330#[doc = "    \"trie_viewer_state_size_limit\": {"]
18331#[doc = "      \"description\": \"Upper bound of the byte size of contract state that is still viewable. None is no limit\","]
18332#[doc = "      \"type\": ["]
18333#[doc = "        \"integer\","]
18334#[doc = "        \"null\""]
18335#[doc = "      ],"]
18336#[doc = "      \"format\": \"uint64\","]
18337#[doc = "      \"minimum\": 0.0"]
18338#[doc = "    },"]
18339#[doc = "    \"ttl_account_id_router\": {"]
18340#[doc = "      \"description\": \"Time to persist Accounts Id in the router without removing them.\","]
18341#[doc = "      \"type\": \"array\","]
18342#[doc = "      \"items\": {"]
18343#[doc = "        \"type\": \"integer\","]
18344#[doc = "        \"format\": \"uint64\","]
18345#[doc = "        \"minimum\": 0.0"]
18346#[doc = "      },"]
18347#[doc = "      \"maxItems\": 2,"]
18348#[doc = "      \"minItems\": 2"]
18349#[doc = "    },"]
18350#[doc = "    \"tx_routing_height_horizon\": {"]
18351#[doc = "      \"description\": \"If the node is not a chunk producer within that many blocks, then route\\nto upcoming chunk producers.\","]
18352#[doc = "      \"type\": \"integer\","]
18353#[doc = "      \"format\": \"uint64\","]
18354#[doc = "      \"minimum\": 0.0"]
18355#[doc = "    },"]
18356#[doc = "    \"version\": {"]
18357#[doc = "      \"description\": \"Version of the binary.\","]
18358#[doc = "      \"allOf\": ["]
18359#[doc = "        {"]
18360#[doc = "          \"$ref\": \"#/components/schemas/Version\""]
18361#[doc = "        }"]
18362#[doc = "      ]"]
18363#[doc = "    },"]
18364#[doc = "    \"view_client_threads\": {"]
18365#[doc = "      \"description\": \"Number of threads for ViewClientActor pool.\","]
18366#[doc = "      \"type\": \"integer\","]
18367#[doc = "      \"format\": \"uint\","]
18368#[doc = "      \"minimum\": 0.0"]
18369#[doc = "    }"]
18370#[doc = "  }"]
18371#[doc = "}"]
18372#[doc = r" ```"]
18373#[doc = r" </details>"]
18374#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
18375pub struct RpcClientConfigResponse {
18376    #[doc = "Not clear old data, set `true` for archive nodes."]
18377    pub archive: bool,
18378    #[doc = "Horizon at which instead of fetching block, fetch full state."]
18379    pub block_fetch_horizon: u64,
18380    #[doc = "Behind this horizon header fetch kicks in."]
18381    pub block_header_fetch_horizon: u64,
18382    #[doc = "Duration to check for producing / skipping block."]
18383    pub block_production_tracking_delay: [u64; 2usize],
18384    #[doc = "Time between check to perform catchup."]
18385    pub catchup_step_period: [u64; 2usize],
18386    #[doc = "Chain id for status."]
18387    pub chain_id: ::std::string::String,
18388    #[doc = "Optional config for the Chunk Distribution Network feature.\nIf set to `None` then this node does not participate in the Chunk Distribution Network.\nNodes not participating will still function fine, but possibly with higher\nlatency due to the need of requesting chunks over the peer-to-peer network."]
18389    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
18390    pub chunk_distribution_network: ::std::option::Option<ChunkDistributionNetworkConfig>,
18391    #[doc = "Time between checking to re-request chunks."]
18392    pub chunk_request_retry_period: [u64; 2usize],
18393    #[doc = "Number of threads for ChunkValidationActor pool."]
18394    pub chunk_validation_threads: u32,
18395    #[doc = "Multiplier for the wait time for all chunks to be received."]
18396    pub chunk_wait_mult: [i32; 2usize],
18397    #[doc = "Number of threads to execute background migration work in client."]
18398    pub client_background_migration_threads: u32,
18399    #[doc = "Configuration for a cloud-based archival reader."]
18400    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
18401    pub cloud_archival_reader: ::std::option::Option<CloudArchivalReaderConfig>,
18402    #[doc = "Configuration for a cloud-based archival writer. If this config is present, the writer is enabled and\nwrites chunk-related data based on the tracked shards."]
18403    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
18404    pub cloud_archival_writer: ::std::option::Option<CloudArchivalWriterConfig>,
18405    #[doc = "Time between running doomslug timer."]
18406    pub doomslug_step_period: [u64; 2usize],
18407    pub enable_multiline_logging: bool,
18408    #[doc = "Re-export storage layer statistics as prometheus metrics."]
18409    pub enable_statistics_export: bool,
18410    #[doc = "Epoch length."]
18411    pub epoch_length: u64,
18412    #[doc = "Options for epoch sync."]
18413    pub epoch_sync: EpochSyncConfig,
18414    #[doc = "Graceful shutdown at expected block height."]
18415    pub expected_shutdown: MutableConfigValue,
18416    #[doc = "Garbage collection configuration."]
18417    pub gc: GcConfig,
18418    #[doc = "Expected increase of header head height per second during header sync"]
18419    pub header_sync_expected_height_per_second: u64,
18420    #[doc = "How much time to wait after initial header sync"]
18421    pub header_sync_initial_timeout: [u64; 2usize],
18422    #[doc = "How much time to wait after some progress is made in header sync"]
18423    pub header_sync_progress_timeout: [u64; 2usize],
18424    #[doc = "How much time to wait before banning a peer in header sync if sync is too slow"]
18425    pub header_sync_stall_ban_timeout: [u64; 2usize],
18426    #[doc = "Period between logging summary information."]
18427    pub log_summary_period: [u64; 2usize],
18428    #[doc = "Enable coloring of the logs"]
18429    pub log_summary_style: LogSummaryStyle,
18430    #[doc = "Maximum wait for approvals before producing block."]
18431    pub max_block_production_delay: [u64; 2usize],
18432    #[doc = "Maximum duration before skipping given height."]
18433    pub max_block_wait_delay: [u64; 2usize],
18434    #[doc = "Max burnt gas per view method.  If present, overrides value stored in\ngenesis file.  The value only affects the RPCs without influencing the\nprotocol thus changing it per-node doesn’t affect the blockchain."]
18435    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
18436    pub max_gas_burnt_view: ::std::option::Option<NearGas>,
18437    #[doc = "Minimum duration before producing block."]
18438    pub min_block_production_delay: [u64; 2usize],
18439    #[doc = "Minimum number of peers to start syncing."]
18440    pub min_num_peers: u32,
18441    #[doc = "Number of block producer seats"]
18442    pub num_block_producer_seats: u64,
18443    #[doc = "Maximum size of state witnesses in the OrphanStateWitnessPool.\n\nWe keep only orphan witnesses which are smaller than this size.\nThis limits the maximum memory usage of OrphanStateWitnessPool."]
18444    pub orphan_state_witness_max_size: u64,
18445    #[doc = "OrphanStateWitnessPool keeps instances of ChunkStateWitness which can't be processed\nbecause the previous block isn't available. The witnesses wait in the pool until the\nrequired block appears. This variable controls how many witnesses can be stored in the pool."]
18446    pub orphan_state_witness_pool_size: u32,
18447    #[doc = "Limit the time of adding transactions to a chunk.\nA node produces a chunk by adding transactions from the transaction pool until\nsome limit is reached. This time limit ensures that adding transactions won't take\nlonger than the specified duration, which helps to produce the chunk quickly."]
18448    pub produce_chunk_add_transactions_time_limit: ::std::string::String,
18449    #[doc = "Produce empty blocks, use `false` for testing."]
18450    pub produce_empty_blocks: bool,
18451    #[doc = "Determines whether client should exit if the protocol version is not supported\nfor the next or next next epoch."]
18452    pub protocol_version_check: ProtocolVersionCheckConfig,
18453    pub resharding_config: MutableConfigValue,
18454    #[doc = "Listening rpc port for status."]
18455    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
18456    pub rpc_addr: ::std::option::Option<::std::string::String>,
18457    #[doc = "Save observed instances of invalid ChunkStateWitness to the database in DBCol::InvalidChunkStateWitnesses.\nSaving invalid witnesses is useful for analysis and debugging.\nThis option can cause extra load on the database and is not recommended for production use."]
18458    pub save_invalid_witnesses: bool,
18459    #[doc = "Save observed instances of ChunkStateWitness to the database in DBCol::LatestChunkStateWitnesses.\nSaving the latest witnesses is useful for analysis and debugging.\nThis option can cause extra load on the database and is not recommended for production use."]
18460    pub save_latest_witnesses: bool,
18461    #[doc = "save_trie_changes should be set to true iff\n- archive if false - non-archival nodes need trie changes to perform garbage collection\n- archive is true, cold_store is configured and migration to split_storage is finished - node\nworking in split storage mode needs trie changes in order to do garbage collection on hot."]
18462    pub save_trie_changes: bool,
18463    #[doc = "Whether to persist transaction outcomes to disk or not."]
18464    pub save_tx_outcomes: bool,
18465    #[doc = "Whether to persist partial chunk parts for untracked shards or not."]
18466    pub save_untracked_partial_chunks_parts: bool,
18467    #[doc = "Skip waiting for sync (for testing or single node testnet)."]
18468    pub skip_sync_wait: bool,
18469    #[doc = "Number of threads for StateRequestActor pool."]
18470    pub state_request_server_threads: u32,
18471    #[doc = "Number of seconds between state requests for view client.\nThrottling window for state requests (headers and parts)."]
18472    pub state_request_throttle_period: [u64; 2usize],
18473    #[doc = "Maximum number of state requests served per throttle period"]
18474    pub state_requests_per_throttle_period: u32,
18475    #[doc = "Options for syncing state."]
18476    pub state_sync: StateSyncConfig,
18477    #[doc = "Whether to use the State Sync mechanism.\nIf disabled, the node will do Block Sync instead of State Sync."]
18478    pub state_sync_enabled: bool,
18479    #[doc = "Additional waiting period after a failed request to external storage"]
18480    pub state_sync_external_backoff: [u64; 2usize],
18481    #[doc = "How long to wait for a response from centralized state sync"]
18482    pub state_sync_external_timeout: [u64; 2usize],
18483    #[doc = "How long to wait for a response from p2p state sync"]
18484    pub state_sync_p2p_timeout: [u64; 2usize],
18485    #[doc = "How long to wait after a failed state sync request"]
18486    pub state_sync_retry_backoff: [u64; 2usize],
18487    #[doc = "How often to check that we are not out of sync."]
18488    pub sync_check_period: [u64; 2usize],
18489    #[doc = "Sync height threshold: below this difference in height don't start syncing."]
18490    pub sync_height_threshold: u64,
18491    #[doc = "Maximum number of block requests to send to peers to sync"]
18492    pub sync_max_block_requests: u32,
18493    #[doc = "While syncing, how long to check for each step."]
18494    pub sync_step_period: [u64; 2usize],
18495    pub tracked_shards_config: TrackedShardsConfig,
18496    #[doc = "Limit of the size of per-shard transaction pool measured in bytes. If not set, the size\nwill be unbounded."]
18497    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
18498    pub transaction_pool_size_limit: ::std::option::Option<u64>,
18499    pub transaction_request_handler_threads: u32,
18500    #[doc = "Upper bound of the byte size of contract state that is still viewable. None is no limit"]
18501    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
18502    pub trie_viewer_state_size_limit: ::std::option::Option<u64>,
18503    #[doc = "Time to persist Accounts Id in the router without removing them."]
18504    pub ttl_account_id_router: [u64; 2usize],
18505    #[doc = "If the node is not a chunk producer within that many blocks, then route\nto upcoming chunk producers."]
18506    pub tx_routing_height_horizon: u64,
18507    #[doc = "Version of the binary."]
18508    pub version: Version,
18509    #[doc = "Number of threads for ViewClientActor pool."]
18510    pub view_client_threads: u32,
18511}
18512impl ::std::convert::From<&RpcClientConfigResponse> for RpcClientConfigResponse {
18513    fn from(value: &RpcClientConfigResponse) -> Self {
18514        value.clone()
18515    }
18516}
18517#[doc = "`RpcCongestionLevelRequest`"]
18518#[doc = r""]
18519#[doc = r" <details><summary>JSON schema</summary>"]
18520#[doc = r""]
18521#[doc = r" ```json"]
18522#[doc = "{"]
18523#[doc = "  \"title\": \"RpcCongestionLevelRequest\","]
18524#[doc = "  \"type\": \"object\","]
18525#[doc = "  \"anyOf\": ["]
18526#[doc = "    {"]
18527#[doc = "      \"title\": \"block_shard_id\","]
18528#[doc = "      \"type\": \"object\","]
18529#[doc = "      \"required\": ["]
18530#[doc = "        \"block_id\","]
18531#[doc = "        \"shard_id\""]
18532#[doc = "      ],"]
18533#[doc = "      \"properties\": {"]
18534#[doc = "        \"block_id\": {"]
18535#[doc = "          \"$ref\": \"#/components/schemas/BlockId\""]
18536#[doc = "        },"]
18537#[doc = "        \"shard_id\": {"]
18538#[doc = "          \"$ref\": \"#/components/schemas/ShardId\""]
18539#[doc = "        }"]
18540#[doc = "      }"]
18541#[doc = "    },"]
18542#[doc = "    {"]
18543#[doc = "      \"title\": \"chunk_hash\","]
18544#[doc = "      \"type\": \"object\","]
18545#[doc = "      \"required\": ["]
18546#[doc = "        \"chunk_id\""]
18547#[doc = "      ],"]
18548#[doc = "      \"properties\": {"]
18549#[doc = "        \"chunk_id\": {"]
18550#[doc = "          \"$ref\": \"#/components/schemas/CryptoHash\""]
18551#[doc = "        }"]
18552#[doc = "      }"]
18553#[doc = "    }"]
18554#[doc = "  ]"]
18555#[doc = "}"]
18556#[doc = r" ```"]
18557#[doc = r" </details>"]
18558#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
18559#[serde(untagged)]
18560pub enum RpcCongestionLevelRequest {
18561    BlockShardId {
18562        block_id: BlockId,
18563        shard_id: ShardId,
18564    },
18565    ChunkHash {
18566        chunk_id: CryptoHash,
18567    },
18568}
18569impl ::std::convert::From<&Self> for RpcCongestionLevelRequest {
18570    fn from(value: &RpcCongestionLevelRequest) -> Self {
18571        value.clone()
18572    }
18573}
18574#[doc = "`RpcCongestionLevelResponse`"]
18575#[doc = r""]
18576#[doc = r" <details><summary>JSON schema</summary>"]
18577#[doc = r""]
18578#[doc = r" ```json"]
18579#[doc = "{"]
18580#[doc = "  \"type\": \"object\","]
18581#[doc = "  \"required\": ["]
18582#[doc = "    \"congestion_level\""]
18583#[doc = "  ],"]
18584#[doc = "  \"properties\": {"]
18585#[doc = "    \"congestion_level\": {"]
18586#[doc = "      \"type\": \"number\","]
18587#[doc = "      \"format\": \"double\""]
18588#[doc = "    }"]
18589#[doc = "  }"]
18590#[doc = "}"]
18591#[doc = r" ```"]
18592#[doc = r" </details>"]
18593#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
18594pub struct RpcCongestionLevelResponse {
18595    pub congestion_level: f64,
18596}
18597impl ::std::convert::From<&RpcCongestionLevelResponse> for RpcCongestionLevelResponse {
18598    fn from(value: &RpcCongestionLevelResponse) -> Self {
18599        value.clone()
18600    }
18601}
18602#[doc = "This struct may be returned from JSON RPC server in case of error\nIt is expected that this struct has impl From<_> all other RPC errors\nlike [RpcBlockError](crate::types::blocks::RpcBlockError)"]
18603#[doc = r""]
18604#[doc = r" <details><summary>JSON schema</summary>"]
18605#[doc = r""]
18606#[doc = r" ```json"]
18607#[doc = "{"]
18608#[doc = "  \"description\": \"This struct may be returned from JSON RPC server in case of error\\nIt is expected that this struct has impl From<_> all other RPC errors\\nlike [RpcBlockError](crate::types::blocks::RpcBlockError)\","]
18609#[doc = "  \"type\": \"object\","]
18610#[doc = "  \"oneOf\": ["]
18611#[doc = "    {"]
18612#[doc = "      \"type\": \"object\","]
18613#[doc = "      \"required\": ["]
18614#[doc = "        \"cause\","]
18615#[doc = "        \"name\""]
18616#[doc = "      ],"]
18617#[doc = "      \"properties\": {"]
18618#[doc = "        \"cause\": {"]
18619#[doc = "          \"$ref\": \"#/components/schemas/RpcRequestValidationErrorKind\""]
18620#[doc = "        },"]
18621#[doc = "        \"name\": {"]
18622#[doc = "          \"type\": \"string\","]
18623#[doc = "          \"enum\": ["]
18624#[doc = "            \"REQUEST_VALIDATION_ERROR\""]
18625#[doc = "          ]"]
18626#[doc = "        }"]
18627#[doc = "      }"]
18628#[doc = "    },"]
18629#[doc = "    {"]
18630#[doc = "      \"type\": \"object\","]
18631#[doc = "      \"required\": ["]
18632#[doc = "        \"cause\","]
18633#[doc = "        \"name\""]
18634#[doc = "      ],"]
18635#[doc = "      \"properties\": {"]
18636#[doc = "        \"cause\": {},"]
18637#[doc = "        \"name\": {"]
18638#[doc = "          \"type\": \"string\","]
18639#[doc = "          \"enum\": ["]
18640#[doc = "            \"HANDLER_ERROR\""]
18641#[doc = "          ]"]
18642#[doc = "        }"]
18643#[doc = "      }"]
18644#[doc = "    },"]
18645#[doc = "    {"]
18646#[doc = "      \"type\": \"object\","]
18647#[doc = "      \"required\": ["]
18648#[doc = "        \"cause\","]
18649#[doc = "        \"name\""]
18650#[doc = "      ],"]
18651#[doc = "      \"properties\": {"]
18652#[doc = "        \"cause\": {},"]
18653#[doc = "        \"name\": {"]
18654#[doc = "          \"type\": \"string\","]
18655#[doc = "          \"enum\": ["]
18656#[doc = "            \"INTERNAL_ERROR\""]
18657#[doc = "          ]"]
18658#[doc = "        }"]
18659#[doc = "      }"]
18660#[doc = "    }"]
18661#[doc = "  ],"]
18662#[doc = "  \"required\": ["]
18663#[doc = "    \"code\","]
18664#[doc = "    \"message\""]
18665#[doc = "  ],"]
18666#[doc = "  \"properties\": {"]
18667#[doc = "    \"cause\": {},"]
18668#[doc = "    \"code\": {"]
18669#[doc = "      \"description\": \"Deprecated please use the `error_struct` instead\","]
18670#[doc = "      \"type\": \"integer\","]
18671#[doc = "      \"format\": \"int64\""]
18672#[doc = "    },"]
18673#[doc = "    \"data\": {"]
18674#[doc = "      \"description\": \"Deprecated please use the `error_struct` instead\""]
18675#[doc = "    },"]
18676#[doc = "    \"message\": {"]
18677#[doc = "      \"description\": \"Deprecated please use the `error_struct` instead\","]
18678#[doc = "      \"type\": \"string\""]
18679#[doc = "    },"]
18680#[doc = "    \"name\": {}"]
18681#[doc = "  },"]
18682#[doc = "  \"additionalProperties\": false"]
18683#[doc = "}"]
18684#[doc = r" ```"]
18685#[doc = r" </details>"]
18686#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
18687#[serde(untagged, deny_unknown_fields)]
18688pub enum RpcError {
18689    Variant0 {
18690        cause: RpcRequestValidationErrorKind,
18691        #[doc = "Deprecated please use the `error_struct` instead"]
18692        code: i64,
18693        #[doc = "Deprecated please use the `error_struct` instead"]
18694        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
18695        data: ::std::option::Option<::serde_json::Value>,
18696        #[doc = "Deprecated please use the `error_struct` instead"]
18697        message: ::std::string::String,
18698        name: RpcErrorVariant0Name,
18699    },
18700    Variant1 {
18701        cause: ::serde_json::Value,
18702        #[doc = "Deprecated please use the `error_struct` instead"]
18703        code: i64,
18704        #[doc = "Deprecated please use the `error_struct` instead"]
18705        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
18706        data: ::std::option::Option<::serde_json::Value>,
18707        #[doc = "Deprecated please use the `error_struct` instead"]
18708        message: ::std::string::String,
18709        name: RpcErrorVariant1Name,
18710    },
18711    Variant2 {
18712        cause: ::serde_json::Value,
18713        #[doc = "Deprecated please use the `error_struct` instead"]
18714        code: i64,
18715        #[doc = "Deprecated please use the `error_struct` instead"]
18716        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
18717        data: ::std::option::Option<::serde_json::Value>,
18718        #[doc = "Deprecated please use the `error_struct` instead"]
18719        message: ::std::string::String,
18720        name: RpcErrorVariant2Name,
18721    },
18722}
18723impl ::std::convert::From<&Self> for RpcError {
18724    fn from(value: &RpcError) -> Self {
18725        value.clone()
18726    }
18727}
18728#[doc = "`RpcErrorVariant0Name`"]
18729#[doc = r""]
18730#[doc = r" <details><summary>JSON schema</summary>"]
18731#[doc = r""]
18732#[doc = r" ```json"]
18733#[doc = "{"]
18734#[doc = "  \"type\": \"string\","]
18735#[doc = "  \"enum\": ["]
18736#[doc = "    \"REQUEST_VALIDATION_ERROR\""]
18737#[doc = "  ]"]
18738#[doc = "}"]
18739#[doc = r" ```"]
18740#[doc = r" </details>"]
18741#[derive(
18742    :: serde :: Deserialize,
18743    :: serde :: Serialize,
18744    Clone,
18745    Copy,
18746    Debug,
18747    Eq,
18748    Hash,
18749    Ord,
18750    PartialEq,
18751    PartialOrd,
18752)]
18753pub enum RpcErrorVariant0Name {
18754    #[serde(rename = "REQUEST_VALIDATION_ERROR")]
18755    RequestValidationError,
18756}
18757impl ::std::convert::From<&Self> for RpcErrorVariant0Name {
18758    fn from(value: &RpcErrorVariant0Name) -> Self {
18759        value.clone()
18760    }
18761}
18762impl ::std::fmt::Display for RpcErrorVariant0Name {
18763    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
18764        match *self {
18765            Self::RequestValidationError => f.write_str("REQUEST_VALIDATION_ERROR"),
18766        }
18767    }
18768}
18769impl ::std::str::FromStr for RpcErrorVariant0Name {
18770    type Err = self::error::ConversionError;
18771    fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
18772        match value {
18773            "REQUEST_VALIDATION_ERROR" => Ok(Self::RequestValidationError),
18774            _ => Err("invalid value".into()),
18775        }
18776    }
18777}
18778impl ::std::convert::TryFrom<&str> for RpcErrorVariant0Name {
18779    type Error = self::error::ConversionError;
18780    fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
18781        value.parse()
18782    }
18783}
18784impl ::std::convert::TryFrom<&::std::string::String> for RpcErrorVariant0Name {
18785    type Error = self::error::ConversionError;
18786    fn try_from(
18787        value: &::std::string::String,
18788    ) -> ::std::result::Result<Self, self::error::ConversionError> {
18789        value.parse()
18790    }
18791}
18792impl ::std::convert::TryFrom<::std::string::String> for RpcErrorVariant0Name {
18793    type Error = self::error::ConversionError;
18794    fn try_from(
18795        value: ::std::string::String,
18796    ) -> ::std::result::Result<Self, self::error::ConversionError> {
18797        value.parse()
18798    }
18799}
18800#[doc = "`RpcErrorVariant1Name`"]
18801#[doc = r""]
18802#[doc = r" <details><summary>JSON schema</summary>"]
18803#[doc = r""]
18804#[doc = r" ```json"]
18805#[doc = "{"]
18806#[doc = "  \"type\": \"string\","]
18807#[doc = "  \"enum\": ["]
18808#[doc = "    \"HANDLER_ERROR\""]
18809#[doc = "  ]"]
18810#[doc = "}"]
18811#[doc = r" ```"]
18812#[doc = r" </details>"]
18813#[derive(
18814    :: serde :: Deserialize,
18815    :: serde :: Serialize,
18816    Clone,
18817    Copy,
18818    Debug,
18819    Eq,
18820    Hash,
18821    Ord,
18822    PartialEq,
18823    PartialOrd,
18824)]
18825pub enum RpcErrorVariant1Name {
18826    #[serde(rename = "HANDLER_ERROR")]
18827    HandlerError,
18828}
18829impl ::std::convert::From<&Self> for RpcErrorVariant1Name {
18830    fn from(value: &RpcErrorVariant1Name) -> Self {
18831        value.clone()
18832    }
18833}
18834impl ::std::fmt::Display for RpcErrorVariant1Name {
18835    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
18836        match *self {
18837            Self::HandlerError => f.write_str("HANDLER_ERROR"),
18838        }
18839    }
18840}
18841impl ::std::str::FromStr for RpcErrorVariant1Name {
18842    type Err = self::error::ConversionError;
18843    fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
18844        match value {
18845            "HANDLER_ERROR" => Ok(Self::HandlerError),
18846            _ => Err("invalid value".into()),
18847        }
18848    }
18849}
18850impl ::std::convert::TryFrom<&str> for RpcErrorVariant1Name {
18851    type Error = self::error::ConversionError;
18852    fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
18853        value.parse()
18854    }
18855}
18856impl ::std::convert::TryFrom<&::std::string::String> for RpcErrorVariant1Name {
18857    type Error = self::error::ConversionError;
18858    fn try_from(
18859        value: &::std::string::String,
18860    ) -> ::std::result::Result<Self, self::error::ConversionError> {
18861        value.parse()
18862    }
18863}
18864impl ::std::convert::TryFrom<::std::string::String> for RpcErrorVariant1Name {
18865    type Error = self::error::ConversionError;
18866    fn try_from(
18867        value: ::std::string::String,
18868    ) -> ::std::result::Result<Self, self::error::ConversionError> {
18869        value.parse()
18870    }
18871}
18872#[doc = "`RpcErrorVariant2Name`"]
18873#[doc = r""]
18874#[doc = r" <details><summary>JSON schema</summary>"]
18875#[doc = r""]
18876#[doc = r" ```json"]
18877#[doc = "{"]
18878#[doc = "  \"type\": \"string\","]
18879#[doc = "  \"enum\": ["]
18880#[doc = "    \"INTERNAL_ERROR\""]
18881#[doc = "  ]"]
18882#[doc = "}"]
18883#[doc = r" ```"]
18884#[doc = r" </details>"]
18885#[derive(
18886    :: serde :: Deserialize,
18887    :: serde :: Serialize,
18888    Clone,
18889    Copy,
18890    Debug,
18891    Eq,
18892    Hash,
18893    Ord,
18894    PartialEq,
18895    PartialOrd,
18896)]
18897pub enum RpcErrorVariant2Name {
18898    #[serde(rename = "INTERNAL_ERROR")]
18899    InternalError,
18900}
18901impl ::std::convert::From<&Self> for RpcErrorVariant2Name {
18902    fn from(value: &RpcErrorVariant2Name) -> Self {
18903        value.clone()
18904    }
18905}
18906impl ::std::fmt::Display for RpcErrorVariant2Name {
18907    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
18908        match *self {
18909            Self::InternalError => f.write_str("INTERNAL_ERROR"),
18910        }
18911    }
18912}
18913impl ::std::str::FromStr for RpcErrorVariant2Name {
18914    type Err = self::error::ConversionError;
18915    fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
18916        match value {
18917            "INTERNAL_ERROR" => Ok(Self::InternalError),
18918            _ => Err("invalid value".into()),
18919        }
18920    }
18921}
18922impl ::std::convert::TryFrom<&str> for RpcErrorVariant2Name {
18923    type Error = self::error::ConversionError;
18924    fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
18925        value.parse()
18926    }
18927}
18928impl ::std::convert::TryFrom<&::std::string::String> for RpcErrorVariant2Name {
18929    type Error = self::error::ConversionError;
18930    fn try_from(
18931        value: &::std::string::String,
18932    ) -> ::std::result::Result<Self, self::error::ConversionError> {
18933        value.parse()
18934    }
18935}
18936impl ::std::convert::TryFrom<::std::string::String> for RpcErrorVariant2Name {
18937    type Error = self::error::ConversionError;
18938    fn try_from(
18939        value: ::std::string::String,
18940    ) -> ::std::result::Result<Self, self::error::ConversionError> {
18941        value.parse()
18942    }
18943}
18944#[doc = "`RpcGasPriceRequest`"]
18945#[doc = r""]
18946#[doc = r" <details><summary>JSON schema</summary>"]
18947#[doc = r""]
18948#[doc = r" ```json"]
18949#[doc = "{"]
18950#[doc = "  \"title\": \"RpcGasPriceRequest\","]
18951#[doc = "  \"type\": \"object\","]
18952#[doc = "  \"properties\": {"]
18953#[doc = "    \"block_id\": {"]
18954#[doc = "      \"anyOf\": ["]
18955#[doc = "        {"]
18956#[doc = "          \"$ref\": \"#/components/schemas/BlockId\""]
18957#[doc = "        },"]
18958#[doc = "        {"]
18959#[doc = "          \"type\": \"null\""]
18960#[doc = "        }"]
18961#[doc = "      ]"]
18962#[doc = "    }"]
18963#[doc = "  }"]
18964#[doc = "}"]
18965#[doc = r" ```"]
18966#[doc = r" </details>"]
18967#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
18968pub struct RpcGasPriceRequest {
18969    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
18970    pub block_id: ::std::option::Option<BlockId>,
18971}
18972impl ::std::convert::From<&RpcGasPriceRequest> for RpcGasPriceRequest {
18973    fn from(value: &RpcGasPriceRequest) -> Self {
18974        value.clone()
18975    }
18976}
18977impl ::std::default::Default for RpcGasPriceRequest {
18978    fn default() -> Self {
18979        Self {
18980            block_id: Default::default(),
18981        }
18982    }
18983}
18984#[doc = "`RpcGasPriceResponse`"]
18985#[doc = r""]
18986#[doc = r" <details><summary>JSON schema</summary>"]
18987#[doc = r""]
18988#[doc = r" ```json"]
18989#[doc = "{"]
18990#[doc = "  \"type\": \"object\","]
18991#[doc = "  \"required\": ["]
18992#[doc = "    \"gas_price\""]
18993#[doc = "  ],"]
18994#[doc = "  \"properties\": {"]
18995#[doc = "    \"gas_price\": {"]
18996#[doc = "      \"$ref\": \"#/components/schemas/NearToken\""]
18997#[doc = "    }"]
18998#[doc = "  }"]
18999#[doc = "}"]
19000#[doc = r" ```"]
19001#[doc = r" </details>"]
19002#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
19003pub struct RpcGasPriceResponse {
19004    pub gas_price: NearToken,
19005}
19006impl ::std::convert::From<&RpcGasPriceResponse> for RpcGasPriceResponse {
19007    fn from(value: &RpcGasPriceResponse) -> Self {
19008        value.clone()
19009    }
19010}
19011#[doc = "`RpcHealthRequest`"]
19012#[doc = r""]
19013#[doc = r" <details><summary>JSON schema</summary>"]
19014#[doc = r""]
19015#[doc = r" ```json"]
19016#[doc = "{"]
19017#[doc = "  \"title\": \"RpcHealthRequest\","]
19018#[doc = "  \"type\": \"null\""]
19019#[doc = "}"]
19020#[doc = r" ```"]
19021#[doc = r" </details>"]
19022#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
19023#[serde(transparent)]
19024pub struct RpcHealthRequest(pub ());
19025impl ::std::ops::Deref for RpcHealthRequest {
19026    type Target = ();
19027    fn deref(&self) -> &() {
19028        &self.0
19029    }
19030}
19031impl ::std::convert::From<RpcHealthRequest> for () {
19032    fn from(value: RpcHealthRequest) -> Self {
19033        value.0
19034    }
19035}
19036impl ::std::convert::From<&RpcHealthRequest> for RpcHealthRequest {
19037    fn from(value: &RpcHealthRequest) -> Self {
19038        value.clone()
19039    }
19040}
19041impl ::std::convert::From<()> for RpcHealthRequest {
19042    fn from(value: ()) -> Self {
19043        Self(value)
19044    }
19045}
19046#[doc = "`RpcHealthResponse`"]
19047#[doc = r""]
19048#[doc = r" <details><summary>JSON schema</summary>"]
19049#[doc = r""]
19050#[doc = r" ```json"]
19051#[doc = "{"]
19052#[doc = "  \"type\": \"null\""]
19053#[doc = "}"]
19054#[doc = r" ```"]
19055#[doc = r" </details>"]
19056#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
19057#[serde(transparent)]
19058pub struct RpcHealthResponse(pub ());
19059impl ::std::ops::Deref for RpcHealthResponse {
19060    type Target = ();
19061    fn deref(&self) -> &() {
19062        &self.0
19063    }
19064}
19065impl ::std::convert::From<RpcHealthResponse> for () {
19066    fn from(value: RpcHealthResponse) -> Self {
19067        value.0
19068    }
19069}
19070impl ::std::convert::From<&RpcHealthResponse> for RpcHealthResponse {
19071    fn from(value: &RpcHealthResponse) -> Self {
19072        value.clone()
19073    }
19074}
19075impl ::std::convert::From<()> for RpcHealthResponse {
19076    fn from(value: ()) -> Self {
19077        Self(value)
19078    }
19079}
19080#[doc = "`RpcKnownProducer`"]
19081#[doc = r""]
19082#[doc = r" <details><summary>JSON schema</summary>"]
19083#[doc = r""]
19084#[doc = r" ```json"]
19085#[doc = "{"]
19086#[doc = "  \"type\": \"object\","]
19087#[doc = "  \"required\": ["]
19088#[doc = "    \"account_id\","]
19089#[doc = "    \"peer_id\""]
19090#[doc = "  ],"]
19091#[doc = "  \"properties\": {"]
19092#[doc = "    \"account_id\": {"]
19093#[doc = "      \"$ref\": \"#/components/schemas/AccountId\""]
19094#[doc = "    },"]
19095#[doc = "    \"addr\": {"]
19096#[doc = "      \"type\": ["]
19097#[doc = "        \"string\","]
19098#[doc = "        \"null\""]
19099#[doc = "      ]"]
19100#[doc = "    },"]
19101#[doc = "    \"peer_id\": {"]
19102#[doc = "      \"$ref\": \"#/components/schemas/PeerId\""]
19103#[doc = "    }"]
19104#[doc = "  }"]
19105#[doc = "}"]
19106#[doc = r" ```"]
19107#[doc = r" </details>"]
19108#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
19109pub struct RpcKnownProducer {
19110    pub account_id: AccountId,
19111    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
19112    pub addr: ::std::option::Option<::std::string::String>,
19113    pub peer_id: PeerId,
19114}
19115impl ::std::convert::From<&RpcKnownProducer> for RpcKnownProducer {
19116    fn from(value: &RpcKnownProducer) -> Self {
19117        value.clone()
19118    }
19119}
19120#[doc = "`RpcLightClientBlockProofRequest`"]
19121#[doc = r""]
19122#[doc = r" <details><summary>JSON schema</summary>"]
19123#[doc = r""]
19124#[doc = r" ```json"]
19125#[doc = "{"]
19126#[doc = "  \"title\": \"RpcLightClientBlockProofRequest\","]
19127#[doc = "  \"type\": \"object\","]
19128#[doc = "  \"required\": ["]
19129#[doc = "    \"block_hash\","]
19130#[doc = "    \"light_client_head\""]
19131#[doc = "  ],"]
19132#[doc = "  \"properties\": {"]
19133#[doc = "    \"block_hash\": {"]
19134#[doc = "      \"$ref\": \"#/components/schemas/CryptoHash\""]
19135#[doc = "    },"]
19136#[doc = "    \"light_client_head\": {"]
19137#[doc = "      \"$ref\": \"#/components/schemas/CryptoHash\""]
19138#[doc = "    }"]
19139#[doc = "  }"]
19140#[doc = "}"]
19141#[doc = r" ```"]
19142#[doc = r" </details>"]
19143#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
19144pub struct RpcLightClientBlockProofRequest {
19145    pub block_hash: CryptoHash,
19146    pub light_client_head: CryptoHash,
19147}
19148impl ::std::convert::From<&RpcLightClientBlockProofRequest> for RpcLightClientBlockProofRequest {
19149    fn from(value: &RpcLightClientBlockProofRequest) -> Self {
19150        value.clone()
19151    }
19152}
19153#[doc = "`RpcLightClientBlockProofResponse`"]
19154#[doc = r""]
19155#[doc = r" <details><summary>JSON schema</summary>"]
19156#[doc = r""]
19157#[doc = r" ```json"]
19158#[doc = "{"]
19159#[doc = "  \"type\": \"object\","]
19160#[doc = "  \"required\": ["]
19161#[doc = "    \"block_header_lite\","]
19162#[doc = "    \"block_proof\""]
19163#[doc = "  ],"]
19164#[doc = "  \"properties\": {"]
19165#[doc = "    \"block_header_lite\": {"]
19166#[doc = "      \"$ref\": \"#/components/schemas/LightClientBlockLiteView\""]
19167#[doc = "    },"]
19168#[doc = "    \"block_proof\": {"]
19169#[doc = "      \"type\": \"array\","]
19170#[doc = "      \"items\": {"]
19171#[doc = "        \"$ref\": \"#/components/schemas/MerklePathItem\""]
19172#[doc = "      }"]
19173#[doc = "    }"]
19174#[doc = "  }"]
19175#[doc = "}"]
19176#[doc = r" ```"]
19177#[doc = r" </details>"]
19178#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
19179pub struct RpcLightClientBlockProofResponse {
19180    pub block_header_lite: LightClientBlockLiteView,
19181    pub block_proof: ::std::vec::Vec<MerklePathItem>,
19182}
19183impl ::std::convert::From<&RpcLightClientBlockProofResponse> for RpcLightClientBlockProofResponse {
19184    fn from(value: &RpcLightClientBlockProofResponse) -> Self {
19185        value.clone()
19186    }
19187}
19188#[doc = "`RpcLightClientExecutionProofRequest`"]
19189#[doc = r""]
19190#[doc = r" <details><summary>JSON schema</summary>"]
19191#[doc = r""]
19192#[doc = r" ```json"]
19193#[doc = "{"]
19194#[doc = "  \"title\": \"RpcLightClientExecutionProofRequest\","]
19195#[doc = "  \"type\": \"object\","]
19196#[doc = "  \"oneOf\": ["]
19197#[doc = "    {"]
19198#[doc = "      \"type\": \"object\","]
19199#[doc = "      \"required\": ["]
19200#[doc = "        \"sender_id\","]
19201#[doc = "        \"transaction_hash\","]
19202#[doc = "        \"type\""]
19203#[doc = "      ],"]
19204#[doc = "      \"properties\": {"]
19205#[doc = "        \"sender_id\": {"]
19206#[doc = "          \"$ref\": \"#/components/schemas/AccountId\""]
19207#[doc = "        },"]
19208#[doc = "        \"transaction_hash\": {"]
19209#[doc = "          \"$ref\": \"#/components/schemas/CryptoHash\""]
19210#[doc = "        },"]
19211#[doc = "        \"type\": {"]
19212#[doc = "          \"type\": \"string\","]
19213#[doc = "          \"enum\": ["]
19214#[doc = "            \"transaction\""]
19215#[doc = "          ]"]
19216#[doc = "        }"]
19217#[doc = "      }"]
19218#[doc = "    },"]
19219#[doc = "    {"]
19220#[doc = "      \"type\": \"object\","]
19221#[doc = "      \"required\": ["]
19222#[doc = "        \"receipt_id\","]
19223#[doc = "        \"receiver_id\","]
19224#[doc = "        \"type\""]
19225#[doc = "      ],"]
19226#[doc = "      \"properties\": {"]
19227#[doc = "        \"receipt_id\": {"]
19228#[doc = "          \"$ref\": \"#/components/schemas/CryptoHash\""]
19229#[doc = "        },"]
19230#[doc = "        \"receiver_id\": {"]
19231#[doc = "          \"$ref\": \"#/components/schemas/AccountId\""]
19232#[doc = "        },"]
19233#[doc = "        \"type\": {"]
19234#[doc = "          \"type\": \"string\","]
19235#[doc = "          \"enum\": ["]
19236#[doc = "            \"receipt\""]
19237#[doc = "          ]"]
19238#[doc = "        }"]
19239#[doc = "      }"]
19240#[doc = "    }"]
19241#[doc = "  ],"]
19242#[doc = "  \"required\": ["]
19243#[doc = "    \"light_client_head\""]
19244#[doc = "  ],"]
19245#[doc = "  \"properties\": {"]
19246#[doc = "    \"light_client_head\": {"]
19247#[doc = "      \"$ref\": \"#/components/schemas/CryptoHash\""]
19248#[doc = "    }"]
19249#[doc = "  }"]
19250#[doc = "}"]
19251#[doc = r" ```"]
19252#[doc = r" </details>"]
19253#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
19254#[serde(untagged)]
19255pub enum RpcLightClientExecutionProofRequest {
19256    Variant0 {
19257        light_client_head: CryptoHash,
19258        sender_id: AccountId,
19259        transaction_hash: CryptoHash,
19260        #[serde(rename = "type")]
19261        type_: RpcLightClientExecutionProofRequestVariant0Type,
19262    },
19263    Variant1 {
19264        light_client_head: CryptoHash,
19265        receipt_id: CryptoHash,
19266        receiver_id: AccountId,
19267        #[serde(rename = "type")]
19268        type_: RpcLightClientExecutionProofRequestVariant1Type,
19269    },
19270}
19271impl ::std::convert::From<&Self> for RpcLightClientExecutionProofRequest {
19272    fn from(value: &RpcLightClientExecutionProofRequest) -> Self {
19273        value.clone()
19274    }
19275}
19276#[doc = "`RpcLightClientExecutionProofRequestVariant0Type`"]
19277#[doc = r""]
19278#[doc = r" <details><summary>JSON schema</summary>"]
19279#[doc = r""]
19280#[doc = r" ```json"]
19281#[doc = "{"]
19282#[doc = "  \"type\": \"string\","]
19283#[doc = "  \"enum\": ["]
19284#[doc = "    \"transaction\""]
19285#[doc = "  ]"]
19286#[doc = "}"]
19287#[doc = r" ```"]
19288#[doc = r" </details>"]
19289#[derive(
19290    :: serde :: Deserialize,
19291    :: serde :: Serialize,
19292    Clone,
19293    Copy,
19294    Debug,
19295    Eq,
19296    Hash,
19297    Ord,
19298    PartialEq,
19299    PartialOrd,
19300)]
19301pub enum RpcLightClientExecutionProofRequestVariant0Type {
19302    #[serde(rename = "transaction")]
19303    Transaction,
19304}
19305impl ::std::convert::From<&Self> for RpcLightClientExecutionProofRequestVariant0Type {
19306    fn from(value: &RpcLightClientExecutionProofRequestVariant0Type) -> Self {
19307        value.clone()
19308    }
19309}
19310impl ::std::fmt::Display for RpcLightClientExecutionProofRequestVariant0Type {
19311    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
19312        match *self {
19313            Self::Transaction => f.write_str("transaction"),
19314        }
19315    }
19316}
19317impl ::std::str::FromStr for RpcLightClientExecutionProofRequestVariant0Type {
19318    type Err = self::error::ConversionError;
19319    fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
19320        match value {
19321            "transaction" => Ok(Self::Transaction),
19322            _ => Err("invalid value".into()),
19323        }
19324    }
19325}
19326impl ::std::convert::TryFrom<&str> for RpcLightClientExecutionProofRequestVariant0Type {
19327    type Error = self::error::ConversionError;
19328    fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
19329        value.parse()
19330    }
19331}
19332impl ::std::convert::TryFrom<&::std::string::String>
19333    for RpcLightClientExecutionProofRequestVariant0Type
19334{
19335    type Error = self::error::ConversionError;
19336    fn try_from(
19337        value: &::std::string::String,
19338    ) -> ::std::result::Result<Self, self::error::ConversionError> {
19339        value.parse()
19340    }
19341}
19342impl ::std::convert::TryFrom<::std::string::String>
19343    for RpcLightClientExecutionProofRequestVariant0Type
19344{
19345    type Error = self::error::ConversionError;
19346    fn try_from(
19347        value: ::std::string::String,
19348    ) -> ::std::result::Result<Self, self::error::ConversionError> {
19349        value.parse()
19350    }
19351}
19352#[doc = "`RpcLightClientExecutionProofRequestVariant1Type`"]
19353#[doc = r""]
19354#[doc = r" <details><summary>JSON schema</summary>"]
19355#[doc = r""]
19356#[doc = r" ```json"]
19357#[doc = "{"]
19358#[doc = "  \"type\": \"string\","]
19359#[doc = "  \"enum\": ["]
19360#[doc = "    \"receipt\""]
19361#[doc = "  ]"]
19362#[doc = "}"]
19363#[doc = r" ```"]
19364#[doc = r" </details>"]
19365#[derive(
19366    :: serde :: Deserialize,
19367    :: serde :: Serialize,
19368    Clone,
19369    Copy,
19370    Debug,
19371    Eq,
19372    Hash,
19373    Ord,
19374    PartialEq,
19375    PartialOrd,
19376)]
19377pub enum RpcLightClientExecutionProofRequestVariant1Type {
19378    #[serde(rename = "receipt")]
19379    Receipt,
19380}
19381impl ::std::convert::From<&Self> for RpcLightClientExecutionProofRequestVariant1Type {
19382    fn from(value: &RpcLightClientExecutionProofRequestVariant1Type) -> Self {
19383        value.clone()
19384    }
19385}
19386impl ::std::fmt::Display for RpcLightClientExecutionProofRequestVariant1Type {
19387    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
19388        match *self {
19389            Self::Receipt => f.write_str("receipt"),
19390        }
19391    }
19392}
19393impl ::std::str::FromStr for RpcLightClientExecutionProofRequestVariant1Type {
19394    type Err = self::error::ConversionError;
19395    fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
19396        match value {
19397            "receipt" => Ok(Self::Receipt),
19398            _ => Err("invalid value".into()),
19399        }
19400    }
19401}
19402impl ::std::convert::TryFrom<&str> for RpcLightClientExecutionProofRequestVariant1Type {
19403    type Error = self::error::ConversionError;
19404    fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
19405        value.parse()
19406    }
19407}
19408impl ::std::convert::TryFrom<&::std::string::String>
19409    for RpcLightClientExecutionProofRequestVariant1Type
19410{
19411    type Error = self::error::ConversionError;
19412    fn try_from(
19413        value: &::std::string::String,
19414    ) -> ::std::result::Result<Self, self::error::ConversionError> {
19415        value.parse()
19416    }
19417}
19418impl ::std::convert::TryFrom<::std::string::String>
19419    for RpcLightClientExecutionProofRequestVariant1Type
19420{
19421    type Error = self::error::ConversionError;
19422    fn try_from(
19423        value: ::std::string::String,
19424    ) -> ::std::result::Result<Self, self::error::ConversionError> {
19425        value.parse()
19426    }
19427}
19428#[doc = "`RpcLightClientExecutionProofResponse`"]
19429#[doc = r""]
19430#[doc = r" <details><summary>JSON schema</summary>"]
19431#[doc = r""]
19432#[doc = r" ```json"]
19433#[doc = "{"]
19434#[doc = "  \"type\": \"object\","]
19435#[doc = "  \"required\": ["]
19436#[doc = "    \"block_header_lite\","]
19437#[doc = "    \"block_proof\","]
19438#[doc = "    \"outcome_proof\","]
19439#[doc = "    \"outcome_root_proof\""]
19440#[doc = "  ],"]
19441#[doc = "  \"properties\": {"]
19442#[doc = "    \"block_header_lite\": {"]
19443#[doc = "      \"$ref\": \"#/components/schemas/LightClientBlockLiteView\""]
19444#[doc = "    },"]
19445#[doc = "    \"block_proof\": {"]
19446#[doc = "      \"type\": \"array\","]
19447#[doc = "      \"items\": {"]
19448#[doc = "        \"$ref\": \"#/components/schemas/MerklePathItem\""]
19449#[doc = "      }"]
19450#[doc = "    },"]
19451#[doc = "    \"outcome_proof\": {"]
19452#[doc = "      \"$ref\": \"#/components/schemas/ExecutionOutcomeWithIdView\""]
19453#[doc = "    },"]
19454#[doc = "    \"outcome_root_proof\": {"]
19455#[doc = "      \"type\": \"array\","]
19456#[doc = "      \"items\": {"]
19457#[doc = "        \"$ref\": \"#/components/schemas/MerklePathItem\""]
19458#[doc = "      }"]
19459#[doc = "    }"]
19460#[doc = "  }"]
19461#[doc = "}"]
19462#[doc = r" ```"]
19463#[doc = r" </details>"]
19464#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
19465pub struct RpcLightClientExecutionProofResponse {
19466    pub block_header_lite: LightClientBlockLiteView,
19467    pub block_proof: ::std::vec::Vec<MerklePathItem>,
19468    pub outcome_proof: ExecutionOutcomeWithIdView,
19469    pub outcome_root_proof: ::std::vec::Vec<MerklePathItem>,
19470}
19471impl ::std::convert::From<&RpcLightClientExecutionProofResponse>
19472    for RpcLightClientExecutionProofResponse
19473{
19474    fn from(value: &RpcLightClientExecutionProofResponse) -> Self {
19475        value.clone()
19476    }
19477}
19478#[doc = "`RpcLightClientNextBlockRequest`"]
19479#[doc = r""]
19480#[doc = r" <details><summary>JSON schema</summary>"]
19481#[doc = r""]
19482#[doc = r" ```json"]
19483#[doc = "{"]
19484#[doc = "  \"title\": \"RpcLightClientNextBlockRequest\","]
19485#[doc = "  \"type\": \"object\","]
19486#[doc = "  \"required\": ["]
19487#[doc = "    \"last_block_hash\""]
19488#[doc = "  ],"]
19489#[doc = "  \"properties\": {"]
19490#[doc = "    \"last_block_hash\": {"]
19491#[doc = "      \"$ref\": \"#/components/schemas/CryptoHash\""]
19492#[doc = "    }"]
19493#[doc = "  }"]
19494#[doc = "}"]
19495#[doc = r" ```"]
19496#[doc = r" </details>"]
19497#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
19498pub struct RpcLightClientNextBlockRequest {
19499    pub last_block_hash: CryptoHash,
19500}
19501impl ::std::convert::From<&RpcLightClientNextBlockRequest> for RpcLightClientNextBlockRequest {
19502    fn from(value: &RpcLightClientNextBlockRequest) -> Self {
19503        value.clone()
19504    }
19505}
19506#[doc = "A state for the current head of a light client. More info [here](https://nomicon.io/ChainSpec/LightClient)."]
19507#[doc = r""]
19508#[doc = r" <details><summary>JSON schema</summary>"]
19509#[doc = r""]
19510#[doc = r" ```json"]
19511#[doc = "{"]
19512#[doc = "  \"description\": \"A state for the current head of a light client. More info [here](https://nomicon.io/ChainSpec/LightClient).\","]
19513#[doc = "  \"type\": \"object\","]
19514#[doc = "  \"properties\": {"]
19515#[doc = "    \"approvals_after_next\": {"]
19516#[doc = "      \"type\": \"array\","]
19517#[doc = "      \"items\": {"]
19518#[doc = "        \"anyOf\": ["]
19519#[doc = "          {"]
19520#[doc = "            \"$ref\": \"#/components/schemas/Signature\""]
19521#[doc = "          },"]
19522#[doc = "          {"]
19523#[doc = "            \"type\": \"null\""]
19524#[doc = "          }"]
19525#[doc = "        ]"]
19526#[doc = "      }"]
19527#[doc = "    },"]
19528#[doc = "    \"inner_lite\": {"]
19529#[doc = "      \"description\": \"Inner part of the block header that gets hashed, split into two parts, one that is sent\\n   to light clients, and the rest\","]
19530#[doc = "      \"allOf\": ["]
19531#[doc = "        {"]
19532#[doc = "          \"$ref\": \"#/components/schemas/BlockHeaderInnerLiteView\""]
19533#[doc = "        }"]
19534#[doc = "      ]"]
19535#[doc = "    },"]
19536#[doc = "    \"inner_rest_hash\": {"]
19537#[doc = "      \"$ref\": \"#/components/schemas/CryptoHash\""]
19538#[doc = "    },"]
19539#[doc = "    \"next_block_inner_hash\": {"]
19540#[doc = "      \"$ref\": \"#/components/schemas/CryptoHash\""]
19541#[doc = "    },"]
19542#[doc = "    \"next_bps\": {"]
19543#[doc = "      \"type\": ["]
19544#[doc = "        \"array\","]
19545#[doc = "        \"null\""]
19546#[doc = "      ],"]
19547#[doc = "      \"items\": {"]
19548#[doc = "        \"$ref\": \"#/components/schemas/ValidatorStakeView\""]
19549#[doc = "      }"]
19550#[doc = "    },"]
19551#[doc = "    \"prev_block_hash\": {"]
19552#[doc = "      \"$ref\": \"#/components/schemas/CryptoHash\""]
19553#[doc = "    }"]
19554#[doc = "  }"]
19555#[doc = "}"]
19556#[doc = r" ```"]
19557#[doc = r" </details>"]
19558#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
19559pub struct RpcLightClientNextBlockResponse {
19560    #[serde(default, skip_serializing_if = "::std::vec::Vec::is_empty")]
19561    pub approvals_after_next: ::std::vec::Vec<::std::option::Option<Signature>>,
19562    #[doc = "Inner part of the block header that gets hashed, split into two parts, one that is sent\n   to light clients, and the rest"]
19563    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
19564    pub inner_lite: ::std::option::Option<BlockHeaderInnerLiteView>,
19565    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
19566    pub inner_rest_hash: ::std::option::Option<CryptoHash>,
19567    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
19568    pub next_block_inner_hash: ::std::option::Option<CryptoHash>,
19569    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
19570    pub next_bps: ::std::option::Option<::std::vec::Vec<ValidatorStakeView>>,
19571    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
19572    pub prev_block_hash: ::std::option::Option<CryptoHash>,
19573}
19574impl ::std::convert::From<&RpcLightClientNextBlockResponse> for RpcLightClientNextBlockResponse {
19575    fn from(value: &RpcLightClientNextBlockResponse) -> Self {
19576        value.clone()
19577    }
19578}
19579impl ::std::default::Default for RpcLightClientNextBlockResponse {
19580    fn default() -> Self {
19581        Self {
19582            approvals_after_next: Default::default(),
19583            inner_lite: Default::default(),
19584            inner_rest_hash: Default::default(),
19585            next_block_inner_hash: Default::default(),
19586            next_bps: Default::default(),
19587            prev_block_hash: Default::default(),
19588        }
19589    }
19590}
19591#[doc = "`RpcMaintenanceWindowsRequest`"]
19592#[doc = r""]
19593#[doc = r" <details><summary>JSON schema</summary>"]
19594#[doc = r""]
19595#[doc = r" ```json"]
19596#[doc = "{"]
19597#[doc = "  \"title\": \"RpcMaintenanceWindowsRequest\","]
19598#[doc = "  \"type\": \"object\","]
19599#[doc = "  \"required\": ["]
19600#[doc = "    \"account_id\""]
19601#[doc = "  ],"]
19602#[doc = "  \"properties\": {"]
19603#[doc = "    \"account_id\": {"]
19604#[doc = "      \"$ref\": \"#/components/schemas/AccountId\""]
19605#[doc = "    }"]
19606#[doc = "  }"]
19607#[doc = "}"]
19608#[doc = r" ```"]
19609#[doc = r" </details>"]
19610#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
19611pub struct RpcMaintenanceWindowsRequest {
19612    pub account_id: AccountId,
19613}
19614impl ::std::convert::From<&RpcMaintenanceWindowsRequest> for RpcMaintenanceWindowsRequest {
19615    fn from(value: &RpcMaintenanceWindowsRequest) -> Self {
19616        value.clone()
19617    }
19618}
19619#[doc = "`RpcNetworkInfoRequest`"]
19620#[doc = r""]
19621#[doc = r" <details><summary>JSON schema</summary>"]
19622#[doc = r""]
19623#[doc = r" ```json"]
19624#[doc = "{"]
19625#[doc = "  \"title\": \"RpcNetworkInfoRequest\","]
19626#[doc = "  \"type\": \"null\""]
19627#[doc = "}"]
19628#[doc = r" ```"]
19629#[doc = r" </details>"]
19630#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
19631#[serde(transparent)]
19632pub struct RpcNetworkInfoRequest(pub ());
19633impl ::std::ops::Deref for RpcNetworkInfoRequest {
19634    type Target = ();
19635    fn deref(&self) -> &() {
19636        &self.0
19637    }
19638}
19639impl ::std::convert::From<RpcNetworkInfoRequest> for () {
19640    fn from(value: RpcNetworkInfoRequest) -> Self {
19641        value.0
19642    }
19643}
19644impl ::std::convert::From<&RpcNetworkInfoRequest> for RpcNetworkInfoRequest {
19645    fn from(value: &RpcNetworkInfoRequest) -> Self {
19646        value.clone()
19647    }
19648}
19649impl ::std::convert::From<()> for RpcNetworkInfoRequest {
19650    fn from(value: ()) -> Self {
19651        Self(value)
19652    }
19653}
19654#[doc = "`RpcNetworkInfoResponse`"]
19655#[doc = r""]
19656#[doc = r" <details><summary>JSON schema</summary>"]
19657#[doc = r""]
19658#[doc = r" ```json"]
19659#[doc = "{"]
19660#[doc = "  \"type\": \"object\","]
19661#[doc = "  \"required\": ["]
19662#[doc = "    \"active_peers\","]
19663#[doc = "    \"known_producers\","]
19664#[doc = "    \"num_active_peers\","]
19665#[doc = "    \"peer_max_count\","]
19666#[doc = "    \"received_bytes_per_sec\","]
19667#[doc = "    \"sent_bytes_per_sec\""]
19668#[doc = "  ],"]
19669#[doc = "  \"properties\": {"]
19670#[doc = "    \"active_peers\": {"]
19671#[doc = "      \"type\": \"array\","]
19672#[doc = "      \"items\": {"]
19673#[doc = "        \"$ref\": \"#/components/schemas/RpcPeerInfo\""]
19674#[doc = "      }"]
19675#[doc = "    },"]
19676#[doc = "    \"known_producers\": {"]
19677#[doc = "      \"description\": \"Accounts of known block and chunk producers from routing table.\","]
19678#[doc = "      \"type\": \"array\","]
19679#[doc = "      \"items\": {"]
19680#[doc = "        \"$ref\": \"#/components/schemas/RpcKnownProducer\""]
19681#[doc = "      }"]
19682#[doc = "    },"]
19683#[doc = "    \"num_active_peers\": {"]
19684#[doc = "      \"type\": \"integer\","]
19685#[doc = "      \"format\": \"uint\","]
19686#[doc = "      \"minimum\": 0.0"]
19687#[doc = "    },"]
19688#[doc = "    \"peer_max_count\": {"]
19689#[doc = "      \"type\": \"integer\","]
19690#[doc = "      \"format\": \"uint32\","]
19691#[doc = "      \"minimum\": 0.0"]
19692#[doc = "    },"]
19693#[doc = "    \"received_bytes_per_sec\": {"]
19694#[doc = "      \"type\": \"integer\","]
19695#[doc = "      \"format\": \"uint64\","]
19696#[doc = "      \"minimum\": 0.0"]
19697#[doc = "    },"]
19698#[doc = "    \"sent_bytes_per_sec\": {"]
19699#[doc = "      \"type\": \"integer\","]
19700#[doc = "      \"format\": \"uint64\","]
19701#[doc = "      \"minimum\": 0.0"]
19702#[doc = "    }"]
19703#[doc = "  }"]
19704#[doc = "}"]
19705#[doc = r" ```"]
19706#[doc = r" </details>"]
19707#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
19708pub struct RpcNetworkInfoResponse {
19709    pub active_peers: ::std::vec::Vec<RpcPeerInfo>,
19710    #[doc = "Accounts of known block and chunk producers from routing table."]
19711    pub known_producers: ::std::vec::Vec<RpcKnownProducer>,
19712    pub num_active_peers: u32,
19713    pub peer_max_count: u32,
19714    pub received_bytes_per_sec: u64,
19715    pub sent_bytes_per_sec: u64,
19716}
19717impl ::std::convert::From<&RpcNetworkInfoResponse> for RpcNetworkInfoResponse {
19718    fn from(value: &RpcNetworkInfoResponse) -> Self {
19719        value.clone()
19720    }
19721}
19722#[doc = "`RpcPeerInfo`"]
19723#[doc = r""]
19724#[doc = r" <details><summary>JSON schema</summary>"]
19725#[doc = r""]
19726#[doc = r" ```json"]
19727#[doc = "{"]
19728#[doc = "  \"type\": \"object\","]
19729#[doc = "  \"required\": ["]
19730#[doc = "    \"id\""]
19731#[doc = "  ],"]
19732#[doc = "  \"properties\": {"]
19733#[doc = "    \"account_id\": {"]
19734#[doc = "      \"anyOf\": ["]
19735#[doc = "        {"]
19736#[doc = "          \"$ref\": \"#/components/schemas/AccountId\""]
19737#[doc = "        },"]
19738#[doc = "        {"]
19739#[doc = "          \"type\": \"null\""]
19740#[doc = "        }"]
19741#[doc = "      ]"]
19742#[doc = "    },"]
19743#[doc = "    \"addr\": {"]
19744#[doc = "      \"type\": ["]
19745#[doc = "        \"string\","]
19746#[doc = "        \"null\""]
19747#[doc = "      ]"]
19748#[doc = "    },"]
19749#[doc = "    \"id\": {"]
19750#[doc = "      \"$ref\": \"#/components/schemas/PeerId\""]
19751#[doc = "    }"]
19752#[doc = "  }"]
19753#[doc = "}"]
19754#[doc = r" ```"]
19755#[doc = r" </details>"]
19756#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
19757pub struct RpcPeerInfo {
19758    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
19759    pub account_id: ::std::option::Option<AccountId>,
19760    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
19761    pub addr: ::std::option::Option<::std::string::String>,
19762    pub id: PeerId,
19763}
19764impl ::std::convert::From<&RpcPeerInfo> for RpcPeerInfo {
19765    fn from(value: &RpcPeerInfo) -> Self {
19766        value.clone()
19767    }
19768}
19769#[doc = "`RpcProtocolConfigRequest`"]
19770#[doc = r""]
19771#[doc = r" <details><summary>JSON schema</summary>"]
19772#[doc = r""]
19773#[doc = r" ```json"]
19774#[doc = "{"]
19775#[doc = "  \"title\": \"RpcProtocolConfigRequest\","]
19776#[doc = "  \"type\": \"object\","]
19777#[doc = "  \"oneOf\": ["]
19778#[doc = "    {"]
19779#[doc = "      \"type\": \"object\","]
19780#[doc = "      \"required\": ["]
19781#[doc = "        \"block_id\""]
19782#[doc = "      ],"]
19783#[doc = "      \"properties\": {"]
19784#[doc = "        \"block_id\": {"]
19785#[doc = "          \"$ref\": \"#/components/schemas/BlockId\""]
19786#[doc = "        }"]
19787#[doc = "      }"]
19788#[doc = "    },"]
19789#[doc = "    {"]
19790#[doc = "      \"type\": \"object\","]
19791#[doc = "      \"required\": ["]
19792#[doc = "        \"finality\""]
19793#[doc = "      ],"]
19794#[doc = "      \"properties\": {"]
19795#[doc = "        \"finality\": {"]
19796#[doc = "          \"$ref\": \"#/components/schemas/Finality\""]
19797#[doc = "        }"]
19798#[doc = "      }"]
19799#[doc = "    },"]
19800#[doc = "    {"]
19801#[doc = "      \"type\": \"object\","]
19802#[doc = "      \"required\": ["]
19803#[doc = "        \"sync_checkpoint\""]
19804#[doc = "      ],"]
19805#[doc = "      \"properties\": {"]
19806#[doc = "        \"sync_checkpoint\": {"]
19807#[doc = "          \"$ref\": \"#/components/schemas/SyncCheckpoint\""]
19808#[doc = "        }"]
19809#[doc = "      }"]
19810#[doc = "    }"]
19811#[doc = "  ]"]
19812#[doc = "}"]
19813#[doc = r" ```"]
19814#[doc = r" </details>"]
19815#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
19816pub enum RpcProtocolConfigRequest {
19817    #[serde(rename = "block_id")]
19818    BlockId(BlockId),
19819    #[serde(rename = "finality")]
19820    Finality(Finality),
19821    #[serde(rename = "sync_checkpoint")]
19822    SyncCheckpoint(SyncCheckpoint),
19823}
19824impl ::std::convert::From<&Self> for RpcProtocolConfigRequest {
19825    fn from(value: &RpcProtocolConfigRequest) -> Self {
19826        value.clone()
19827    }
19828}
19829impl ::std::convert::From<BlockId> for RpcProtocolConfigRequest {
19830    fn from(value: BlockId) -> Self {
19831        Self::BlockId(value)
19832    }
19833}
19834impl ::std::convert::From<Finality> for RpcProtocolConfigRequest {
19835    fn from(value: Finality) -> Self {
19836        Self::Finality(value)
19837    }
19838}
19839impl ::std::convert::From<SyncCheckpoint> for RpcProtocolConfigRequest {
19840    fn from(value: SyncCheckpoint) -> Self {
19841        Self::SyncCheckpoint(value)
19842    }
19843}
19844#[doc = "`RpcProtocolConfigResponse`"]
19845#[doc = r""]
19846#[doc = r" <details><summary>JSON schema</summary>"]
19847#[doc = r""]
19848#[doc = r" ```json"]
19849#[doc = "{"]
19850#[doc = "  \"type\": \"object\","]
19851#[doc = "  \"required\": ["]
19852#[doc = "    \"avg_hidden_validator_seats_per_shard\","]
19853#[doc = "    \"block_producer_kickout_threshold\","]
19854#[doc = "    \"chain_id\","]
19855#[doc = "    \"chunk_producer_kickout_threshold\","]
19856#[doc = "    \"chunk_validator_only_kickout_threshold\","]
19857#[doc = "    \"dynamic_resharding\","]
19858#[doc = "    \"epoch_length\","]
19859#[doc = "    \"fishermen_threshold\","]
19860#[doc = "    \"gas_limit\","]
19861#[doc = "    \"gas_price_adjustment_rate\","]
19862#[doc = "    \"genesis_height\","]
19863#[doc = "    \"genesis_time\","]
19864#[doc = "    \"max_gas_price\","]
19865#[doc = "    \"max_inflation_rate\","]
19866#[doc = "    \"max_kickout_stake_perc\","]
19867#[doc = "    \"min_gas_price\","]
19868#[doc = "    \"minimum_stake_divisor\","]
19869#[doc = "    \"minimum_stake_ratio\","]
19870#[doc = "    \"minimum_validators_per_shard\","]
19871#[doc = "    \"num_block_producer_seats\","]
19872#[doc = "    \"num_block_producer_seats_per_shard\","]
19873#[doc = "    \"num_blocks_per_year\","]
19874#[doc = "    \"online_max_threshold\","]
19875#[doc = "    \"online_min_threshold\","]
19876#[doc = "    \"protocol_reward_rate\","]
19877#[doc = "    \"protocol_treasury_account\","]
19878#[doc = "    \"protocol_upgrade_stake_threshold\","]
19879#[doc = "    \"protocol_version\","]
19880#[doc = "    \"runtime_config\","]
19881#[doc = "    \"shard_layout\","]
19882#[doc = "    \"shuffle_shard_assignment_for_chunk_producers\","]
19883#[doc = "    \"target_validator_mandates_per_shard\","]
19884#[doc = "    \"transaction_validity_period\""]
19885#[doc = "  ],"]
19886#[doc = "  \"properties\": {"]
19887#[doc = "    \"avg_hidden_validator_seats_per_shard\": {"]
19888#[doc = "      \"description\": \"Expected number of hidden validators per shard.\","]
19889#[doc = "      \"type\": \"array\","]
19890#[doc = "      \"items\": {"]
19891#[doc = "        \"type\": \"integer\","]
19892#[doc = "        \"format\": \"uint64\","]
19893#[doc = "        \"minimum\": 0.0"]
19894#[doc = "      }"]
19895#[doc = "    },"]
19896#[doc = "    \"block_producer_kickout_threshold\": {"]
19897#[doc = "      \"description\": \"Threshold for kicking out block producers, between 0 and 100.\","]
19898#[doc = "      \"type\": \"integer\","]
19899#[doc = "      \"format\": \"uint8\","]
19900#[doc = "      \"maximum\": 255.0,"]
19901#[doc = "      \"minimum\": 0.0"]
19902#[doc = "    },"]
19903#[doc = "    \"chain_id\": {"]
19904#[doc = "      \"description\": \"ID of the blockchain. This must be unique for every blockchain.\\nIf your testnet blockchains do not have unique chain IDs, you will have a bad time.\","]
19905#[doc = "      \"type\": \"string\""]
19906#[doc = "    },"]
19907#[doc = "    \"chunk_producer_kickout_threshold\": {"]
19908#[doc = "      \"description\": \"Threshold for kicking out chunk producers, between 0 and 100.\","]
19909#[doc = "      \"type\": \"integer\","]
19910#[doc = "      \"format\": \"uint8\","]
19911#[doc = "      \"maximum\": 255.0,"]
19912#[doc = "      \"minimum\": 0.0"]
19913#[doc = "    },"]
19914#[doc = "    \"chunk_validator_only_kickout_threshold\": {"]
19915#[doc = "      \"description\": \"Threshold for kicking out nodes which are only chunk validators, between 0 and 100.\","]
19916#[doc = "      \"type\": \"integer\","]
19917#[doc = "      \"format\": \"uint8\","]
19918#[doc = "      \"maximum\": 255.0,"]
19919#[doc = "      \"minimum\": 0.0"]
19920#[doc = "    },"]
19921#[doc = "    \"dynamic_resharding\": {"]
19922#[doc = "      \"description\": \"Enable dynamic re-sharding.\","]
19923#[doc = "      \"type\": \"boolean\""]
19924#[doc = "    },"]
19925#[doc = "    \"epoch_length\": {"]
19926#[doc = "      \"description\": \"Epoch length counted in block heights.\","]
19927#[doc = "      \"type\": \"integer\","]
19928#[doc = "      \"format\": \"uint64\","]
19929#[doc = "      \"minimum\": 0.0"]
19930#[doc = "    },"]
19931#[doc = "    \"fishermen_threshold\": {"]
19932#[doc = "      \"description\": \"Fishermen stake threshold.\","]
19933#[doc = "      \"allOf\": ["]
19934#[doc = "        {"]
19935#[doc = "          \"$ref\": \"#/components/schemas/NearToken\""]
19936#[doc = "        }"]
19937#[doc = "      ]"]
19938#[doc = "    },"]
19939#[doc = "    \"gas_limit\": {"]
19940#[doc = "      \"description\": \"Initial gas limit.\","]
19941#[doc = "      \"allOf\": ["]
19942#[doc = "        {"]
19943#[doc = "          \"$ref\": \"#/components/schemas/NearGas\""]
19944#[doc = "        }"]
19945#[doc = "      ]"]
19946#[doc = "    },"]
19947#[doc = "    \"gas_price_adjustment_rate\": {"]
19948#[doc = "      \"description\": \"Gas price adjustment rate\","]
19949#[doc = "      \"type\": \"array\","]
19950#[doc = "      \"items\": {"]
19951#[doc = "        \"type\": \"integer\","]
19952#[doc = "        \"format\": \"int32\""]
19953#[doc = "      },"]
19954#[doc = "      \"maxItems\": 2,"]
19955#[doc = "      \"minItems\": 2"]
19956#[doc = "    },"]
19957#[doc = "    \"genesis_height\": {"]
19958#[doc = "      \"description\": \"Height of genesis block.\","]
19959#[doc = "      \"type\": \"integer\","]
19960#[doc = "      \"format\": \"uint64\","]
19961#[doc = "      \"minimum\": 0.0"]
19962#[doc = "    },"]
19963#[doc = "    \"genesis_time\": {"]
19964#[doc = "      \"description\": \"Official time of blockchain start.\","]
19965#[doc = "      \"type\": \"string\","]
19966#[doc = "      \"format\": \"date-time\""]
19967#[doc = "    },"]
19968#[doc = "    \"max_gas_price\": {"]
19969#[doc = "      \"description\": \"Maximum gas price.\","]
19970#[doc = "      \"allOf\": ["]
19971#[doc = "        {"]
19972#[doc = "          \"$ref\": \"#/components/schemas/NearToken\""]
19973#[doc = "        }"]
19974#[doc = "      ]"]
19975#[doc = "    },"]
19976#[doc = "    \"max_inflation_rate\": {"]
19977#[doc = "      \"description\": \"Maximum inflation on the total supply every epoch.\","]
19978#[doc = "      \"type\": \"array\","]
19979#[doc = "      \"items\": {"]
19980#[doc = "        \"type\": \"integer\","]
19981#[doc = "        \"format\": \"int32\""]
19982#[doc = "      },"]
19983#[doc = "      \"maxItems\": 2,"]
19984#[doc = "      \"minItems\": 2"]
19985#[doc = "    },"]
19986#[doc = "    \"max_kickout_stake_perc\": {"]
19987#[doc = "      \"description\": \"Max stake percentage of the validators we will kick out.\","]
19988#[doc = "      \"type\": \"integer\","]
19989#[doc = "      \"format\": \"uint8\","]
19990#[doc = "      \"maximum\": 255.0,"]
19991#[doc = "      \"minimum\": 0.0"]
19992#[doc = "    },"]
19993#[doc = "    \"min_gas_price\": {"]
19994#[doc = "      \"description\": \"Minimum gas price. It is also the initial gas price.\","]
19995#[doc = "      \"allOf\": ["]
19996#[doc = "        {"]
19997#[doc = "          \"$ref\": \"#/components/schemas/NearToken\""]
19998#[doc = "        }"]
19999#[doc = "      ]"]
20000#[doc = "    },"]
20001#[doc = "    \"minimum_stake_divisor\": {"]
20002#[doc = "      \"description\": \"The minimum stake required for staking is last seat price divided by this number.\","]
20003#[doc = "      \"type\": \"integer\","]
20004#[doc = "      \"format\": \"uint64\","]
20005#[doc = "      \"minimum\": 0.0"]
20006#[doc = "    },"]
20007#[doc = "    \"minimum_stake_ratio\": {"]
20008#[doc = "      \"description\": \"The lowest ratio s/s_total any block producer can have.\\nSee <https://github.com/near/NEPs/pull/167> for details\","]
20009#[doc = "      \"type\": \"array\","]
20010#[doc = "      \"items\": {"]
20011#[doc = "        \"type\": \"integer\","]
20012#[doc = "        \"format\": \"int32\""]
20013#[doc = "      },"]
20014#[doc = "      \"maxItems\": 2,"]
20015#[doc = "      \"minItems\": 2"]
20016#[doc = "    },"]
20017#[doc = "    \"minimum_validators_per_shard\": {"]
20018#[doc = "      \"description\": \"The minimum number of validators each shard must have\","]
20019#[doc = "      \"type\": \"integer\","]
20020#[doc = "      \"format\": \"uint64\","]
20021#[doc = "      \"minimum\": 0.0"]
20022#[doc = "    },"]
20023#[doc = "    \"num_block_producer_seats\": {"]
20024#[doc = "      \"description\": \"Number of block producer seats at genesis.\","]
20025#[doc = "      \"type\": \"integer\","]
20026#[doc = "      \"format\": \"uint64\","]
20027#[doc = "      \"minimum\": 0.0"]
20028#[doc = "    },"]
20029#[doc = "    \"num_block_producer_seats_per_shard\": {"]
20030#[doc = "      \"description\": \"Defines number of shards and number of block producer seats per each shard at genesis.\","]
20031#[doc = "      \"type\": \"array\","]
20032#[doc = "      \"items\": {"]
20033#[doc = "        \"type\": \"integer\","]
20034#[doc = "        \"format\": \"uint64\","]
20035#[doc = "        \"minimum\": 0.0"]
20036#[doc = "      }"]
20037#[doc = "    },"]
20038#[doc = "    \"num_blocks_per_year\": {"]
20039#[doc = "      \"description\": \"Expected number of blocks per year\","]
20040#[doc = "      \"type\": \"integer\","]
20041#[doc = "      \"format\": \"uint64\","]
20042#[doc = "      \"minimum\": 0.0"]
20043#[doc = "    },"]
20044#[doc = "    \"online_max_threshold\": {"]
20045#[doc = "      \"description\": \"Online maximum threshold above which validator gets full reward.\","]
20046#[doc = "      \"type\": \"array\","]
20047#[doc = "      \"items\": {"]
20048#[doc = "        \"type\": \"integer\","]
20049#[doc = "        \"format\": \"int32\""]
20050#[doc = "      },"]
20051#[doc = "      \"maxItems\": 2,"]
20052#[doc = "      \"minItems\": 2"]
20053#[doc = "    },"]
20054#[doc = "    \"online_min_threshold\": {"]
20055#[doc = "      \"description\": \"Online minimum threshold below which validator doesn't receive reward.\","]
20056#[doc = "      \"type\": \"array\","]
20057#[doc = "      \"items\": {"]
20058#[doc = "        \"type\": \"integer\","]
20059#[doc = "        \"format\": \"int32\""]
20060#[doc = "      },"]
20061#[doc = "      \"maxItems\": 2,"]
20062#[doc = "      \"minItems\": 2"]
20063#[doc = "    },"]
20064#[doc = "    \"protocol_reward_rate\": {"]
20065#[doc = "      \"description\": \"Protocol treasury rate\","]
20066#[doc = "      \"type\": \"array\","]
20067#[doc = "      \"items\": {"]
20068#[doc = "        \"type\": \"integer\","]
20069#[doc = "        \"format\": \"int32\""]
20070#[doc = "      },"]
20071#[doc = "      \"maxItems\": 2,"]
20072#[doc = "      \"minItems\": 2"]
20073#[doc = "    },"]
20074#[doc = "    \"protocol_treasury_account\": {"]
20075#[doc = "      \"description\": \"Protocol treasury account\","]
20076#[doc = "      \"allOf\": ["]
20077#[doc = "        {"]
20078#[doc = "          \"$ref\": \"#/components/schemas/AccountId\""]
20079#[doc = "        }"]
20080#[doc = "      ]"]
20081#[doc = "    },"]
20082#[doc = "    \"protocol_upgrade_stake_threshold\": {"]
20083#[doc = "      \"description\": \"Threshold of stake that needs to indicate that they ready for upgrade.\","]
20084#[doc = "      \"type\": \"array\","]
20085#[doc = "      \"items\": {"]
20086#[doc = "        \"type\": \"integer\","]
20087#[doc = "        \"format\": \"int32\""]
20088#[doc = "      },"]
20089#[doc = "      \"maxItems\": 2,"]
20090#[doc = "      \"minItems\": 2"]
20091#[doc = "    },"]
20092#[doc = "    \"protocol_version\": {"]
20093#[doc = "      \"description\": \"Current Protocol Version\","]
20094#[doc = "      \"type\": \"integer\","]
20095#[doc = "      \"format\": \"uint32\","]
20096#[doc = "      \"minimum\": 0.0"]
20097#[doc = "    },"]
20098#[doc = "    \"runtime_config\": {"]
20099#[doc = "      \"description\": \"Runtime configuration (mostly economics constants).\","]
20100#[doc = "      \"allOf\": ["]
20101#[doc = "        {"]
20102#[doc = "          \"$ref\": \"#/components/schemas/RuntimeConfigView\""]
20103#[doc = "        }"]
20104#[doc = "      ]"]
20105#[doc = "    },"]
20106#[doc = "    \"shard_layout\": {"]
20107#[doc = "      \"description\": \"Layout information regarding how to split accounts to shards\","]
20108#[doc = "      \"allOf\": ["]
20109#[doc = "        {"]
20110#[doc = "          \"$ref\": \"#/components/schemas/ShardLayout\""]
20111#[doc = "        }"]
20112#[doc = "      ]"]
20113#[doc = "    },"]
20114#[doc = "    \"shuffle_shard_assignment_for_chunk_producers\": {"]
20115#[doc = "      \"description\": \"If true, shuffle the chunk producers across shards. In other words, if\\nthe shard assignments were `[S_0, S_1, S_2, S_3]` where `S_i` represents\\nthe set of chunk producers for shard `i`, if this flag were true, the\\nshard assignments might become, for example, `[S_2, S_0, S_3, S_1]`.\","]
20116#[doc = "      \"type\": \"boolean\""]
20117#[doc = "    },"]
20118#[doc = "    \"target_validator_mandates_per_shard\": {"]
20119#[doc = "      \"description\": \"Number of target chunk validator mandates for each shard.\","]
20120#[doc = "      \"type\": \"integer\","]
20121#[doc = "      \"format\": \"uint64\","]
20122#[doc = "      \"minimum\": 0.0"]
20123#[doc = "    },"]
20124#[doc = "    \"transaction_validity_period\": {"]
20125#[doc = "      \"description\": \"Number of blocks for which a given transaction is valid\","]
20126#[doc = "      \"type\": \"integer\","]
20127#[doc = "      \"format\": \"uint64\","]
20128#[doc = "      \"minimum\": 0.0"]
20129#[doc = "    }"]
20130#[doc = "  }"]
20131#[doc = "}"]
20132#[doc = r" ```"]
20133#[doc = r" </details>"]
20134#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
20135pub struct RpcProtocolConfigResponse {
20136    #[doc = "Expected number of hidden validators per shard."]
20137    pub avg_hidden_validator_seats_per_shard: ::std::vec::Vec<u64>,
20138    #[doc = "Threshold for kicking out block producers, between 0 and 100."]
20139    pub block_producer_kickout_threshold: u8,
20140    #[doc = "ID of the blockchain. This must be unique for every blockchain.\nIf your testnet blockchains do not have unique chain IDs, you will have a bad time."]
20141    pub chain_id: ::std::string::String,
20142    #[doc = "Threshold for kicking out chunk producers, between 0 and 100."]
20143    pub chunk_producer_kickout_threshold: u8,
20144    #[doc = "Threshold for kicking out nodes which are only chunk validators, between 0 and 100."]
20145    pub chunk_validator_only_kickout_threshold: u8,
20146    #[doc = "Enable dynamic re-sharding."]
20147    pub dynamic_resharding: bool,
20148    #[doc = "Epoch length counted in block heights."]
20149    pub epoch_length: u64,
20150    #[doc = "Fishermen stake threshold."]
20151    pub fishermen_threshold: NearToken,
20152    #[doc = "Initial gas limit."]
20153    pub gas_limit: NearGas,
20154    #[doc = "Gas price adjustment rate"]
20155    pub gas_price_adjustment_rate: [i32; 2usize],
20156    #[doc = "Height of genesis block."]
20157    pub genesis_height: u64,
20158    #[doc = "Official time of blockchain start."]
20159    pub genesis_time: ::chrono::DateTime<::chrono::offset::Utc>,
20160    #[doc = "Maximum gas price."]
20161    pub max_gas_price: NearToken,
20162    #[doc = "Maximum inflation on the total supply every epoch."]
20163    pub max_inflation_rate: [i32; 2usize],
20164    #[doc = "Max stake percentage of the validators we will kick out."]
20165    pub max_kickout_stake_perc: u8,
20166    #[doc = "Minimum gas price. It is also the initial gas price."]
20167    pub min_gas_price: NearToken,
20168    #[doc = "The minimum stake required for staking is last seat price divided by this number."]
20169    pub minimum_stake_divisor: u64,
20170    #[doc = "The lowest ratio s/s_total any block producer can have.\nSee <https://github.com/near/NEPs/pull/167> for details"]
20171    pub minimum_stake_ratio: [i32; 2usize],
20172    #[doc = "The minimum number of validators each shard must have"]
20173    pub minimum_validators_per_shard: u64,
20174    #[doc = "Number of block producer seats at genesis."]
20175    pub num_block_producer_seats: u64,
20176    #[doc = "Defines number of shards and number of block producer seats per each shard at genesis."]
20177    pub num_block_producer_seats_per_shard: ::std::vec::Vec<u64>,
20178    #[doc = "Expected number of blocks per year"]
20179    pub num_blocks_per_year: u64,
20180    #[doc = "Online maximum threshold above which validator gets full reward."]
20181    pub online_max_threshold: [i32; 2usize],
20182    #[doc = "Online minimum threshold below which validator doesn't receive reward."]
20183    pub online_min_threshold: [i32; 2usize],
20184    #[doc = "Protocol treasury rate"]
20185    pub protocol_reward_rate: [i32; 2usize],
20186    #[doc = "Protocol treasury account"]
20187    pub protocol_treasury_account: AccountId,
20188    #[doc = "Threshold of stake that needs to indicate that they ready for upgrade."]
20189    pub protocol_upgrade_stake_threshold: [i32; 2usize],
20190    #[doc = "Current Protocol Version"]
20191    pub protocol_version: u32,
20192    #[doc = "Runtime configuration (mostly economics constants)."]
20193    pub runtime_config: RuntimeConfigView,
20194    #[doc = "Layout information regarding how to split accounts to shards"]
20195    pub shard_layout: ShardLayout,
20196    #[doc = "If true, shuffle the chunk producers across shards. In other words, if\nthe shard assignments were `[S_0, S_1, S_2, S_3]` where `S_i` represents\nthe set of chunk producers for shard `i`, if this flag were true, the\nshard assignments might become, for example, `[S_2, S_0, S_3, S_1]`."]
20197    pub shuffle_shard_assignment_for_chunk_producers: bool,
20198    #[doc = "Number of target chunk validator mandates for each shard."]
20199    pub target_validator_mandates_per_shard: u64,
20200    #[doc = "Number of blocks for which a given transaction is valid"]
20201    pub transaction_validity_period: u64,
20202}
20203impl ::std::convert::From<&RpcProtocolConfigResponse> for RpcProtocolConfigResponse {
20204    fn from(value: &RpcProtocolConfigResponse) -> Self {
20205        value.clone()
20206    }
20207}
20208#[doc = "`RpcQueryRequest`"]
20209#[doc = r""]
20210#[doc = r" <details><summary>JSON schema</summary>"]
20211#[doc = r""]
20212#[doc = r" ```json"]
20213#[doc = "{"]
20214#[doc = "  \"title\": \"RpcQueryRequest\","]
20215#[doc = "  \"type\": \"object\","]
20216#[doc = "  \"oneOf\": ["]
20217#[doc = "    {"]
20218#[doc = "      \"title\": \"view_account_by_block_id\","]
20219#[doc = "      \"allOf\": ["]
20220#[doc = "        {"]
20221#[doc = "          \"type\": \"object\","]
20222#[doc = "          \"required\": ["]
20223#[doc = "            \"block_id\""]
20224#[doc = "          ],"]
20225#[doc = "          \"properties\": {"]
20226#[doc = "            \"block_id\": {"]
20227#[doc = "              \"$ref\": \"#/components/schemas/BlockId\""]
20228#[doc = "            }"]
20229#[doc = "          }"]
20230#[doc = "        },"]
20231#[doc = "        {"]
20232#[doc = "          \"type\": \"object\","]
20233#[doc = "          \"required\": ["]
20234#[doc = "            \"account_id\","]
20235#[doc = "            \"request_type\""]
20236#[doc = "          ],"]
20237#[doc = "          \"properties\": {"]
20238#[doc = "            \"account_id\": {"]
20239#[doc = "              \"$ref\": \"#/components/schemas/AccountId\""]
20240#[doc = "            },"]
20241#[doc = "            \"request_type\": {"]
20242#[doc = "              \"type\": \"string\","]
20243#[doc = "              \"enum\": ["]
20244#[doc = "                \"view_account\""]
20245#[doc = "              ]"]
20246#[doc = "            }"]
20247#[doc = "          }"]
20248#[doc = "        }"]
20249#[doc = "      ]"]
20250#[doc = "    },"]
20251#[doc = "    {"]
20252#[doc = "      \"title\": \"view_code_by_block_id\","]
20253#[doc = "      \"allOf\": ["]
20254#[doc = "        {"]
20255#[doc = "          \"type\": \"object\","]
20256#[doc = "          \"required\": ["]
20257#[doc = "            \"block_id\""]
20258#[doc = "          ],"]
20259#[doc = "          \"properties\": {"]
20260#[doc = "            \"block_id\": {"]
20261#[doc = "              \"$ref\": \"#/components/schemas/BlockId\""]
20262#[doc = "            }"]
20263#[doc = "          }"]
20264#[doc = "        },"]
20265#[doc = "        {"]
20266#[doc = "          \"type\": \"object\","]
20267#[doc = "          \"required\": ["]
20268#[doc = "            \"account_id\","]
20269#[doc = "            \"request_type\""]
20270#[doc = "          ],"]
20271#[doc = "          \"properties\": {"]
20272#[doc = "            \"account_id\": {"]
20273#[doc = "              \"$ref\": \"#/components/schemas/AccountId\""]
20274#[doc = "            },"]
20275#[doc = "            \"request_type\": {"]
20276#[doc = "              \"type\": \"string\","]
20277#[doc = "              \"enum\": ["]
20278#[doc = "                \"view_code\""]
20279#[doc = "              ]"]
20280#[doc = "            }"]
20281#[doc = "          }"]
20282#[doc = "        }"]
20283#[doc = "      ]"]
20284#[doc = "    },"]
20285#[doc = "    {"]
20286#[doc = "      \"title\": \"view_state_by_block_id\","]
20287#[doc = "      \"allOf\": ["]
20288#[doc = "        {"]
20289#[doc = "          \"type\": \"object\","]
20290#[doc = "          \"required\": ["]
20291#[doc = "            \"block_id\""]
20292#[doc = "          ],"]
20293#[doc = "          \"properties\": {"]
20294#[doc = "            \"block_id\": {"]
20295#[doc = "              \"$ref\": \"#/components/schemas/BlockId\""]
20296#[doc = "            }"]
20297#[doc = "          }"]
20298#[doc = "        },"]
20299#[doc = "        {"]
20300#[doc = "          \"type\": \"object\","]
20301#[doc = "          \"required\": ["]
20302#[doc = "            \"account_id\","]
20303#[doc = "            \"prefix_base64\","]
20304#[doc = "            \"request_type\""]
20305#[doc = "          ],"]
20306#[doc = "          \"properties\": {"]
20307#[doc = "            \"account_id\": {"]
20308#[doc = "              \"$ref\": \"#/components/schemas/AccountId\""]
20309#[doc = "            },"]
20310#[doc = "            \"include_proof\": {"]
20311#[doc = "              \"type\": \"boolean\""]
20312#[doc = "            },"]
20313#[doc = "            \"prefix_base64\": {"]
20314#[doc = "              \"$ref\": \"#/components/schemas/StoreKey\""]
20315#[doc = "            },"]
20316#[doc = "            \"request_type\": {"]
20317#[doc = "              \"type\": \"string\","]
20318#[doc = "              \"enum\": ["]
20319#[doc = "                \"view_state\""]
20320#[doc = "              ]"]
20321#[doc = "            }"]
20322#[doc = "          }"]
20323#[doc = "        }"]
20324#[doc = "      ]"]
20325#[doc = "    },"]
20326#[doc = "    {"]
20327#[doc = "      \"title\": \"view_access_key_by_block_id\","]
20328#[doc = "      \"allOf\": ["]
20329#[doc = "        {"]
20330#[doc = "          \"type\": \"object\","]
20331#[doc = "          \"required\": ["]
20332#[doc = "            \"block_id\""]
20333#[doc = "          ],"]
20334#[doc = "          \"properties\": {"]
20335#[doc = "            \"block_id\": {"]
20336#[doc = "              \"$ref\": \"#/components/schemas/BlockId\""]
20337#[doc = "            }"]
20338#[doc = "          }"]
20339#[doc = "        },"]
20340#[doc = "        {"]
20341#[doc = "          \"type\": \"object\","]
20342#[doc = "          \"required\": ["]
20343#[doc = "            \"account_id\","]
20344#[doc = "            \"public_key\","]
20345#[doc = "            \"request_type\""]
20346#[doc = "          ],"]
20347#[doc = "          \"properties\": {"]
20348#[doc = "            \"account_id\": {"]
20349#[doc = "              \"$ref\": \"#/components/schemas/AccountId\""]
20350#[doc = "            },"]
20351#[doc = "            \"public_key\": {"]
20352#[doc = "              \"$ref\": \"#/components/schemas/PublicKey\""]
20353#[doc = "            },"]
20354#[doc = "            \"request_type\": {"]
20355#[doc = "              \"type\": \"string\","]
20356#[doc = "              \"enum\": ["]
20357#[doc = "                \"view_access_key\""]
20358#[doc = "              ]"]
20359#[doc = "            }"]
20360#[doc = "          }"]
20361#[doc = "        }"]
20362#[doc = "      ]"]
20363#[doc = "    },"]
20364#[doc = "    {"]
20365#[doc = "      \"title\": \"view_access_key_list_by_block_id\","]
20366#[doc = "      \"allOf\": ["]
20367#[doc = "        {"]
20368#[doc = "          \"type\": \"object\","]
20369#[doc = "          \"required\": ["]
20370#[doc = "            \"block_id\""]
20371#[doc = "          ],"]
20372#[doc = "          \"properties\": {"]
20373#[doc = "            \"block_id\": {"]
20374#[doc = "              \"$ref\": \"#/components/schemas/BlockId\""]
20375#[doc = "            }"]
20376#[doc = "          }"]
20377#[doc = "        },"]
20378#[doc = "        {"]
20379#[doc = "          \"type\": \"object\","]
20380#[doc = "          \"required\": ["]
20381#[doc = "            \"account_id\","]
20382#[doc = "            \"request_type\""]
20383#[doc = "          ],"]
20384#[doc = "          \"properties\": {"]
20385#[doc = "            \"account_id\": {"]
20386#[doc = "              \"$ref\": \"#/components/schemas/AccountId\""]
20387#[doc = "            },"]
20388#[doc = "            \"request_type\": {"]
20389#[doc = "              \"type\": \"string\","]
20390#[doc = "              \"enum\": ["]
20391#[doc = "                \"view_access_key_list\""]
20392#[doc = "              ]"]
20393#[doc = "            }"]
20394#[doc = "          }"]
20395#[doc = "        }"]
20396#[doc = "      ]"]
20397#[doc = "    },"]
20398#[doc = "    {"]
20399#[doc = "      \"title\": \"call_function_by_block_id\","]
20400#[doc = "      \"allOf\": ["]
20401#[doc = "        {"]
20402#[doc = "          \"type\": \"object\","]
20403#[doc = "          \"required\": ["]
20404#[doc = "            \"block_id\""]
20405#[doc = "          ],"]
20406#[doc = "          \"properties\": {"]
20407#[doc = "            \"block_id\": {"]
20408#[doc = "              \"$ref\": \"#/components/schemas/BlockId\""]
20409#[doc = "            }"]
20410#[doc = "          }"]
20411#[doc = "        },"]
20412#[doc = "        {"]
20413#[doc = "          \"type\": \"object\","]
20414#[doc = "          \"required\": ["]
20415#[doc = "            \"account_id\","]
20416#[doc = "            \"args_base64\","]
20417#[doc = "            \"method_name\","]
20418#[doc = "            \"request_type\""]
20419#[doc = "          ],"]
20420#[doc = "          \"properties\": {"]
20421#[doc = "            \"account_id\": {"]
20422#[doc = "              \"$ref\": \"#/components/schemas/AccountId\""]
20423#[doc = "            },"]
20424#[doc = "            \"args_base64\": {"]
20425#[doc = "              \"$ref\": \"#/components/schemas/FunctionArgs\""]
20426#[doc = "            },"]
20427#[doc = "            \"method_name\": {"]
20428#[doc = "              \"type\": \"string\""]
20429#[doc = "            },"]
20430#[doc = "            \"request_type\": {"]
20431#[doc = "              \"type\": \"string\","]
20432#[doc = "              \"enum\": ["]
20433#[doc = "                \"call_function\""]
20434#[doc = "              ]"]
20435#[doc = "            }"]
20436#[doc = "          }"]
20437#[doc = "        }"]
20438#[doc = "      ]"]
20439#[doc = "    },"]
20440#[doc = "    {"]
20441#[doc = "      \"title\": \"view_global_contract_code_by_block_id\","]
20442#[doc = "      \"allOf\": ["]
20443#[doc = "        {"]
20444#[doc = "          \"type\": \"object\","]
20445#[doc = "          \"required\": ["]
20446#[doc = "            \"block_id\""]
20447#[doc = "          ],"]
20448#[doc = "          \"properties\": {"]
20449#[doc = "            \"block_id\": {"]
20450#[doc = "              \"$ref\": \"#/components/schemas/BlockId\""]
20451#[doc = "            }"]
20452#[doc = "          }"]
20453#[doc = "        },"]
20454#[doc = "        {"]
20455#[doc = "          \"type\": \"object\","]
20456#[doc = "          \"required\": ["]
20457#[doc = "            \"code_hash\","]
20458#[doc = "            \"request_type\""]
20459#[doc = "          ],"]
20460#[doc = "          \"properties\": {"]
20461#[doc = "            \"code_hash\": {"]
20462#[doc = "              \"$ref\": \"#/components/schemas/CryptoHash\""]
20463#[doc = "            },"]
20464#[doc = "            \"request_type\": {"]
20465#[doc = "              \"type\": \"string\","]
20466#[doc = "              \"enum\": ["]
20467#[doc = "                \"view_global_contract_code\""]
20468#[doc = "              ]"]
20469#[doc = "            }"]
20470#[doc = "          }"]
20471#[doc = "        }"]
20472#[doc = "      ]"]
20473#[doc = "    },"]
20474#[doc = "    {"]
20475#[doc = "      \"title\": \"view_global_contract_code_by_account_id_by_block_id\","]
20476#[doc = "      \"allOf\": ["]
20477#[doc = "        {"]
20478#[doc = "          \"type\": \"object\","]
20479#[doc = "          \"required\": ["]
20480#[doc = "            \"block_id\""]
20481#[doc = "          ],"]
20482#[doc = "          \"properties\": {"]
20483#[doc = "            \"block_id\": {"]
20484#[doc = "              \"$ref\": \"#/components/schemas/BlockId\""]
20485#[doc = "            }"]
20486#[doc = "          }"]
20487#[doc = "        },"]
20488#[doc = "        {"]
20489#[doc = "          \"type\": \"object\","]
20490#[doc = "          \"required\": ["]
20491#[doc = "            \"account_id\","]
20492#[doc = "            \"request_type\""]
20493#[doc = "          ],"]
20494#[doc = "          \"properties\": {"]
20495#[doc = "            \"account_id\": {"]
20496#[doc = "              \"$ref\": \"#/components/schemas/AccountId\""]
20497#[doc = "            },"]
20498#[doc = "            \"request_type\": {"]
20499#[doc = "              \"type\": \"string\","]
20500#[doc = "              \"enum\": ["]
20501#[doc = "                \"view_global_contract_code_by_account_id\""]
20502#[doc = "              ]"]
20503#[doc = "            }"]
20504#[doc = "          }"]
20505#[doc = "        }"]
20506#[doc = "      ]"]
20507#[doc = "    },"]
20508#[doc = "    {"]
20509#[doc = "      \"title\": \"view_account_by_finality\","]
20510#[doc = "      \"allOf\": ["]
20511#[doc = "        {"]
20512#[doc = "          \"type\": \"object\","]
20513#[doc = "          \"required\": ["]
20514#[doc = "            \"finality\""]
20515#[doc = "          ],"]
20516#[doc = "          \"properties\": {"]
20517#[doc = "            \"finality\": {"]
20518#[doc = "              \"$ref\": \"#/components/schemas/Finality\""]
20519#[doc = "            }"]
20520#[doc = "          }"]
20521#[doc = "        },"]
20522#[doc = "        {"]
20523#[doc = "          \"type\": \"object\","]
20524#[doc = "          \"required\": ["]
20525#[doc = "            \"account_id\","]
20526#[doc = "            \"request_type\""]
20527#[doc = "          ],"]
20528#[doc = "          \"properties\": {"]
20529#[doc = "            \"account_id\": {"]
20530#[doc = "              \"$ref\": \"#/components/schemas/AccountId\""]
20531#[doc = "            },"]
20532#[doc = "            \"request_type\": {"]
20533#[doc = "              \"type\": \"string\","]
20534#[doc = "              \"enum\": ["]
20535#[doc = "                \"view_account\""]
20536#[doc = "              ]"]
20537#[doc = "            }"]
20538#[doc = "          }"]
20539#[doc = "        }"]
20540#[doc = "      ]"]
20541#[doc = "    },"]
20542#[doc = "    {"]
20543#[doc = "      \"title\": \"view_code_by_finality\","]
20544#[doc = "      \"allOf\": ["]
20545#[doc = "        {"]
20546#[doc = "          \"type\": \"object\","]
20547#[doc = "          \"required\": ["]
20548#[doc = "            \"finality\""]
20549#[doc = "          ],"]
20550#[doc = "          \"properties\": {"]
20551#[doc = "            \"finality\": {"]
20552#[doc = "              \"$ref\": \"#/components/schemas/Finality\""]
20553#[doc = "            }"]
20554#[doc = "          }"]
20555#[doc = "        },"]
20556#[doc = "        {"]
20557#[doc = "          \"type\": \"object\","]
20558#[doc = "          \"required\": ["]
20559#[doc = "            \"account_id\","]
20560#[doc = "            \"request_type\""]
20561#[doc = "          ],"]
20562#[doc = "          \"properties\": {"]
20563#[doc = "            \"account_id\": {"]
20564#[doc = "              \"$ref\": \"#/components/schemas/AccountId\""]
20565#[doc = "            },"]
20566#[doc = "            \"request_type\": {"]
20567#[doc = "              \"type\": \"string\","]
20568#[doc = "              \"enum\": ["]
20569#[doc = "                \"view_code\""]
20570#[doc = "              ]"]
20571#[doc = "            }"]
20572#[doc = "          }"]
20573#[doc = "        }"]
20574#[doc = "      ]"]
20575#[doc = "    },"]
20576#[doc = "    {"]
20577#[doc = "      \"title\": \"view_state_by_finality\","]
20578#[doc = "      \"allOf\": ["]
20579#[doc = "        {"]
20580#[doc = "          \"type\": \"object\","]
20581#[doc = "          \"required\": ["]
20582#[doc = "            \"finality\""]
20583#[doc = "          ],"]
20584#[doc = "          \"properties\": {"]
20585#[doc = "            \"finality\": {"]
20586#[doc = "              \"$ref\": \"#/components/schemas/Finality\""]
20587#[doc = "            }"]
20588#[doc = "          }"]
20589#[doc = "        },"]
20590#[doc = "        {"]
20591#[doc = "          \"type\": \"object\","]
20592#[doc = "          \"required\": ["]
20593#[doc = "            \"account_id\","]
20594#[doc = "            \"prefix_base64\","]
20595#[doc = "            \"request_type\""]
20596#[doc = "          ],"]
20597#[doc = "          \"properties\": {"]
20598#[doc = "            \"account_id\": {"]
20599#[doc = "              \"$ref\": \"#/components/schemas/AccountId\""]
20600#[doc = "            },"]
20601#[doc = "            \"include_proof\": {"]
20602#[doc = "              \"type\": \"boolean\""]
20603#[doc = "            },"]
20604#[doc = "            \"prefix_base64\": {"]
20605#[doc = "              \"$ref\": \"#/components/schemas/StoreKey\""]
20606#[doc = "            },"]
20607#[doc = "            \"request_type\": {"]
20608#[doc = "              \"type\": \"string\","]
20609#[doc = "              \"enum\": ["]
20610#[doc = "                \"view_state\""]
20611#[doc = "              ]"]
20612#[doc = "            }"]
20613#[doc = "          }"]
20614#[doc = "        }"]
20615#[doc = "      ]"]
20616#[doc = "    },"]
20617#[doc = "    {"]
20618#[doc = "      \"title\": \"view_access_key_by_finality\","]
20619#[doc = "      \"allOf\": ["]
20620#[doc = "        {"]
20621#[doc = "          \"type\": \"object\","]
20622#[doc = "          \"required\": ["]
20623#[doc = "            \"finality\""]
20624#[doc = "          ],"]
20625#[doc = "          \"properties\": {"]
20626#[doc = "            \"finality\": {"]
20627#[doc = "              \"$ref\": \"#/components/schemas/Finality\""]
20628#[doc = "            }"]
20629#[doc = "          }"]
20630#[doc = "        },"]
20631#[doc = "        {"]
20632#[doc = "          \"type\": \"object\","]
20633#[doc = "          \"required\": ["]
20634#[doc = "            \"account_id\","]
20635#[doc = "            \"public_key\","]
20636#[doc = "            \"request_type\""]
20637#[doc = "          ],"]
20638#[doc = "          \"properties\": {"]
20639#[doc = "            \"account_id\": {"]
20640#[doc = "              \"$ref\": \"#/components/schemas/AccountId\""]
20641#[doc = "            },"]
20642#[doc = "            \"public_key\": {"]
20643#[doc = "              \"$ref\": \"#/components/schemas/PublicKey\""]
20644#[doc = "            },"]
20645#[doc = "            \"request_type\": {"]
20646#[doc = "              \"type\": \"string\","]
20647#[doc = "              \"enum\": ["]
20648#[doc = "                \"view_access_key\""]
20649#[doc = "              ]"]
20650#[doc = "            }"]
20651#[doc = "          }"]
20652#[doc = "        }"]
20653#[doc = "      ]"]
20654#[doc = "    },"]
20655#[doc = "    {"]
20656#[doc = "      \"title\": \"view_access_key_list_by_finality\","]
20657#[doc = "      \"allOf\": ["]
20658#[doc = "        {"]
20659#[doc = "          \"type\": \"object\","]
20660#[doc = "          \"required\": ["]
20661#[doc = "            \"finality\""]
20662#[doc = "          ],"]
20663#[doc = "          \"properties\": {"]
20664#[doc = "            \"finality\": {"]
20665#[doc = "              \"$ref\": \"#/components/schemas/Finality\""]
20666#[doc = "            }"]
20667#[doc = "          }"]
20668#[doc = "        },"]
20669#[doc = "        {"]
20670#[doc = "          \"type\": \"object\","]
20671#[doc = "          \"required\": ["]
20672#[doc = "            \"account_id\","]
20673#[doc = "            \"request_type\""]
20674#[doc = "          ],"]
20675#[doc = "          \"properties\": {"]
20676#[doc = "            \"account_id\": {"]
20677#[doc = "              \"$ref\": \"#/components/schemas/AccountId\""]
20678#[doc = "            },"]
20679#[doc = "            \"request_type\": {"]
20680#[doc = "              \"type\": \"string\","]
20681#[doc = "              \"enum\": ["]
20682#[doc = "                \"view_access_key_list\""]
20683#[doc = "              ]"]
20684#[doc = "            }"]
20685#[doc = "          }"]
20686#[doc = "        }"]
20687#[doc = "      ]"]
20688#[doc = "    },"]
20689#[doc = "    {"]
20690#[doc = "      \"title\": \"call_function_by_finality\","]
20691#[doc = "      \"allOf\": ["]
20692#[doc = "        {"]
20693#[doc = "          \"type\": \"object\","]
20694#[doc = "          \"required\": ["]
20695#[doc = "            \"finality\""]
20696#[doc = "          ],"]
20697#[doc = "          \"properties\": {"]
20698#[doc = "            \"finality\": {"]
20699#[doc = "              \"$ref\": \"#/components/schemas/Finality\""]
20700#[doc = "            }"]
20701#[doc = "          }"]
20702#[doc = "        },"]
20703#[doc = "        {"]
20704#[doc = "          \"type\": \"object\","]
20705#[doc = "          \"required\": ["]
20706#[doc = "            \"account_id\","]
20707#[doc = "            \"args_base64\","]
20708#[doc = "            \"method_name\","]
20709#[doc = "            \"request_type\""]
20710#[doc = "          ],"]
20711#[doc = "          \"properties\": {"]
20712#[doc = "            \"account_id\": {"]
20713#[doc = "              \"$ref\": \"#/components/schemas/AccountId\""]
20714#[doc = "            },"]
20715#[doc = "            \"args_base64\": {"]
20716#[doc = "              \"$ref\": \"#/components/schemas/FunctionArgs\""]
20717#[doc = "            },"]
20718#[doc = "            \"method_name\": {"]
20719#[doc = "              \"type\": \"string\""]
20720#[doc = "            },"]
20721#[doc = "            \"request_type\": {"]
20722#[doc = "              \"type\": \"string\","]
20723#[doc = "              \"enum\": ["]
20724#[doc = "                \"call_function\""]
20725#[doc = "              ]"]
20726#[doc = "            }"]
20727#[doc = "          }"]
20728#[doc = "        }"]
20729#[doc = "      ]"]
20730#[doc = "    },"]
20731#[doc = "    {"]
20732#[doc = "      \"title\": \"view_global_contract_code_by_finality\","]
20733#[doc = "      \"allOf\": ["]
20734#[doc = "        {"]
20735#[doc = "          \"type\": \"object\","]
20736#[doc = "          \"required\": ["]
20737#[doc = "            \"finality\""]
20738#[doc = "          ],"]
20739#[doc = "          \"properties\": {"]
20740#[doc = "            \"finality\": {"]
20741#[doc = "              \"$ref\": \"#/components/schemas/Finality\""]
20742#[doc = "            }"]
20743#[doc = "          }"]
20744#[doc = "        },"]
20745#[doc = "        {"]
20746#[doc = "          \"type\": \"object\","]
20747#[doc = "          \"required\": ["]
20748#[doc = "            \"code_hash\","]
20749#[doc = "            \"request_type\""]
20750#[doc = "          ],"]
20751#[doc = "          \"properties\": {"]
20752#[doc = "            \"code_hash\": {"]
20753#[doc = "              \"$ref\": \"#/components/schemas/CryptoHash\""]
20754#[doc = "            },"]
20755#[doc = "            \"request_type\": {"]
20756#[doc = "              \"type\": \"string\","]
20757#[doc = "              \"enum\": ["]
20758#[doc = "                \"view_global_contract_code\""]
20759#[doc = "              ]"]
20760#[doc = "            }"]
20761#[doc = "          }"]
20762#[doc = "        }"]
20763#[doc = "      ]"]
20764#[doc = "    },"]
20765#[doc = "    {"]
20766#[doc = "      \"title\": \"view_global_contract_code_by_account_id_by_finality\","]
20767#[doc = "      \"allOf\": ["]
20768#[doc = "        {"]
20769#[doc = "          \"type\": \"object\","]
20770#[doc = "          \"required\": ["]
20771#[doc = "            \"finality\""]
20772#[doc = "          ],"]
20773#[doc = "          \"properties\": {"]
20774#[doc = "            \"finality\": {"]
20775#[doc = "              \"$ref\": \"#/components/schemas/Finality\""]
20776#[doc = "            }"]
20777#[doc = "          }"]
20778#[doc = "        },"]
20779#[doc = "        {"]
20780#[doc = "          \"type\": \"object\","]
20781#[doc = "          \"required\": ["]
20782#[doc = "            \"account_id\","]
20783#[doc = "            \"request_type\""]
20784#[doc = "          ],"]
20785#[doc = "          \"properties\": {"]
20786#[doc = "            \"account_id\": {"]
20787#[doc = "              \"$ref\": \"#/components/schemas/AccountId\""]
20788#[doc = "            },"]
20789#[doc = "            \"request_type\": {"]
20790#[doc = "              \"type\": \"string\","]
20791#[doc = "              \"enum\": ["]
20792#[doc = "                \"view_global_contract_code_by_account_id\""]
20793#[doc = "              ]"]
20794#[doc = "            }"]
20795#[doc = "          }"]
20796#[doc = "        }"]
20797#[doc = "      ]"]
20798#[doc = "    },"]
20799#[doc = "    {"]
20800#[doc = "      \"title\": \"view_account_by_sync_checkpoint\","]
20801#[doc = "      \"allOf\": ["]
20802#[doc = "        {"]
20803#[doc = "          \"type\": \"object\","]
20804#[doc = "          \"required\": ["]
20805#[doc = "            \"sync_checkpoint\""]
20806#[doc = "          ],"]
20807#[doc = "          \"properties\": {"]
20808#[doc = "            \"sync_checkpoint\": {"]
20809#[doc = "              \"$ref\": \"#/components/schemas/SyncCheckpoint\""]
20810#[doc = "            }"]
20811#[doc = "          }"]
20812#[doc = "        },"]
20813#[doc = "        {"]
20814#[doc = "          \"type\": \"object\","]
20815#[doc = "          \"required\": ["]
20816#[doc = "            \"account_id\","]
20817#[doc = "            \"request_type\""]
20818#[doc = "          ],"]
20819#[doc = "          \"properties\": {"]
20820#[doc = "            \"account_id\": {"]
20821#[doc = "              \"$ref\": \"#/components/schemas/AccountId\""]
20822#[doc = "            },"]
20823#[doc = "            \"request_type\": {"]
20824#[doc = "              \"type\": \"string\","]
20825#[doc = "              \"enum\": ["]
20826#[doc = "                \"view_account\""]
20827#[doc = "              ]"]
20828#[doc = "            }"]
20829#[doc = "          }"]
20830#[doc = "        }"]
20831#[doc = "      ]"]
20832#[doc = "    },"]
20833#[doc = "    {"]
20834#[doc = "      \"title\": \"view_code_by_sync_checkpoint\","]
20835#[doc = "      \"allOf\": ["]
20836#[doc = "        {"]
20837#[doc = "          \"type\": \"object\","]
20838#[doc = "          \"required\": ["]
20839#[doc = "            \"sync_checkpoint\""]
20840#[doc = "          ],"]
20841#[doc = "          \"properties\": {"]
20842#[doc = "            \"sync_checkpoint\": {"]
20843#[doc = "              \"$ref\": \"#/components/schemas/SyncCheckpoint\""]
20844#[doc = "            }"]
20845#[doc = "          }"]
20846#[doc = "        },"]
20847#[doc = "        {"]
20848#[doc = "          \"type\": \"object\","]
20849#[doc = "          \"required\": ["]
20850#[doc = "            \"account_id\","]
20851#[doc = "            \"request_type\""]
20852#[doc = "          ],"]
20853#[doc = "          \"properties\": {"]
20854#[doc = "            \"account_id\": {"]
20855#[doc = "              \"$ref\": \"#/components/schemas/AccountId\""]
20856#[doc = "            },"]
20857#[doc = "            \"request_type\": {"]
20858#[doc = "              \"type\": \"string\","]
20859#[doc = "              \"enum\": ["]
20860#[doc = "                \"view_code\""]
20861#[doc = "              ]"]
20862#[doc = "            }"]
20863#[doc = "          }"]
20864#[doc = "        }"]
20865#[doc = "      ]"]
20866#[doc = "    },"]
20867#[doc = "    {"]
20868#[doc = "      \"title\": \"view_state_by_sync_checkpoint\","]
20869#[doc = "      \"allOf\": ["]
20870#[doc = "        {"]
20871#[doc = "          \"type\": \"object\","]
20872#[doc = "          \"required\": ["]
20873#[doc = "            \"sync_checkpoint\""]
20874#[doc = "          ],"]
20875#[doc = "          \"properties\": {"]
20876#[doc = "            \"sync_checkpoint\": {"]
20877#[doc = "              \"$ref\": \"#/components/schemas/SyncCheckpoint\""]
20878#[doc = "            }"]
20879#[doc = "          }"]
20880#[doc = "        },"]
20881#[doc = "        {"]
20882#[doc = "          \"type\": \"object\","]
20883#[doc = "          \"required\": ["]
20884#[doc = "            \"account_id\","]
20885#[doc = "            \"prefix_base64\","]
20886#[doc = "            \"request_type\""]
20887#[doc = "          ],"]
20888#[doc = "          \"properties\": {"]
20889#[doc = "            \"account_id\": {"]
20890#[doc = "              \"$ref\": \"#/components/schemas/AccountId\""]
20891#[doc = "            },"]
20892#[doc = "            \"include_proof\": {"]
20893#[doc = "              \"type\": \"boolean\""]
20894#[doc = "            },"]
20895#[doc = "            \"prefix_base64\": {"]
20896#[doc = "              \"$ref\": \"#/components/schemas/StoreKey\""]
20897#[doc = "            },"]
20898#[doc = "            \"request_type\": {"]
20899#[doc = "              \"type\": \"string\","]
20900#[doc = "              \"enum\": ["]
20901#[doc = "                \"view_state\""]
20902#[doc = "              ]"]
20903#[doc = "            }"]
20904#[doc = "          }"]
20905#[doc = "        }"]
20906#[doc = "      ]"]
20907#[doc = "    },"]
20908#[doc = "    {"]
20909#[doc = "      \"title\": \"view_access_key_by_sync_checkpoint\","]
20910#[doc = "      \"allOf\": ["]
20911#[doc = "        {"]
20912#[doc = "          \"type\": \"object\","]
20913#[doc = "          \"required\": ["]
20914#[doc = "            \"sync_checkpoint\""]
20915#[doc = "          ],"]
20916#[doc = "          \"properties\": {"]
20917#[doc = "            \"sync_checkpoint\": {"]
20918#[doc = "              \"$ref\": \"#/components/schemas/SyncCheckpoint\""]
20919#[doc = "            }"]
20920#[doc = "          }"]
20921#[doc = "        },"]
20922#[doc = "        {"]
20923#[doc = "          \"type\": \"object\","]
20924#[doc = "          \"required\": ["]
20925#[doc = "            \"account_id\","]
20926#[doc = "            \"public_key\","]
20927#[doc = "            \"request_type\""]
20928#[doc = "          ],"]
20929#[doc = "          \"properties\": {"]
20930#[doc = "            \"account_id\": {"]
20931#[doc = "              \"$ref\": \"#/components/schemas/AccountId\""]
20932#[doc = "            },"]
20933#[doc = "            \"public_key\": {"]
20934#[doc = "              \"$ref\": \"#/components/schemas/PublicKey\""]
20935#[doc = "            },"]
20936#[doc = "            \"request_type\": {"]
20937#[doc = "              \"type\": \"string\","]
20938#[doc = "              \"enum\": ["]
20939#[doc = "                \"view_access_key\""]
20940#[doc = "              ]"]
20941#[doc = "            }"]
20942#[doc = "          }"]
20943#[doc = "        }"]
20944#[doc = "      ]"]
20945#[doc = "    },"]
20946#[doc = "    {"]
20947#[doc = "      \"title\": \"view_access_key_list_by_sync_checkpoint\","]
20948#[doc = "      \"allOf\": ["]
20949#[doc = "        {"]
20950#[doc = "          \"type\": \"object\","]
20951#[doc = "          \"required\": ["]
20952#[doc = "            \"sync_checkpoint\""]
20953#[doc = "          ],"]
20954#[doc = "          \"properties\": {"]
20955#[doc = "            \"sync_checkpoint\": {"]
20956#[doc = "              \"$ref\": \"#/components/schemas/SyncCheckpoint\""]
20957#[doc = "            }"]
20958#[doc = "          }"]
20959#[doc = "        },"]
20960#[doc = "        {"]
20961#[doc = "          \"type\": \"object\","]
20962#[doc = "          \"required\": ["]
20963#[doc = "            \"account_id\","]
20964#[doc = "            \"request_type\""]
20965#[doc = "          ],"]
20966#[doc = "          \"properties\": {"]
20967#[doc = "            \"account_id\": {"]
20968#[doc = "              \"$ref\": \"#/components/schemas/AccountId\""]
20969#[doc = "            },"]
20970#[doc = "            \"request_type\": {"]
20971#[doc = "              \"type\": \"string\","]
20972#[doc = "              \"enum\": ["]
20973#[doc = "                \"view_access_key_list\""]
20974#[doc = "              ]"]
20975#[doc = "            }"]
20976#[doc = "          }"]
20977#[doc = "        }"]
20978#[doc = "      ]"]
20979#[doc = "    },"]
20980#[doc = "    {"]
20981#[doc = "      \"title\": \"call_function_by_sync_checkpoint\","]
20982#[doc = "      \"allOf\": ["]
20983#[doc = "        {"]
20984#[doc = "          \"type\": \"object\","]
20985#[doc = "          \"required\": ["]
20986#[doc = "            \"sync_checkpoint\""]
20987#[doc = "          ],"]
20988#[doc = "          \"properties\": {"]
20989#[doc = "            \"sync_checkpoint\": {"]
20990#[doc = "              \"$ref\": \"#/components/schemas/SyncCheckpoint\""]
20991#[doc = "            }"]
20992#[doc = "          }"]
20993#[doc = "        },"]
20994#[doc = "        {"]
20995#[doc = "          \"type\": \"object\","]
20996#[doc = "          \"required\": ["]
20997#[doc = "            \"account_id\","]
20998#[doc = "            \"args_base64\","]
20999#[doc = "            \"method_name\","]
21000#[doc = "            \"request_type\""]
21001#[doc = "          ],"]
21002#[doc = "          \"properties\": {"]
21003#[doc = "            \"account_id\": {"]
21004#[doc = "              \"$ref\": \"#/components/schemas/AccountId\""]
21005#[doc = "            },"]
21006#[doc = "            \"args_base64\": {"]
21007#[doc = "              \"$ref\": \"#/components/schemas/FunctionArgs\""]
21008#[doc = "            },"]
21009#[doc = "            \"method_name\": {"]
21010#[doc = "              \"type\": \"string\""]
21011#[doc = "            },"]
21012#[doc = "            \"request_type\": {"]
21013#[doc = "              \"type\": \"string\","]
21014#[doc = "              \"enum\": ["]
21015#[doc = "                \"call_function\""]
21016#[doc = "              ]"]
21017#[doc = "            }"]
21018#[doc = "          }"]
21019#[doc = "        }"]
21020#[doc = "      ]"]
21021#[doc = "    },"]
21022#[doc = "    {"]
21023#[doc = "      \"title\": \"view_global_contract_code_by_sync_checkpoint\","]
21024#[doc = "      \"allOf\": ["]
21025#[doc = "        {"]
21026#[doc = "          \"type\": \"object\","]
21027#[doc = "          \"required\": ["]
21028#[doc = "            \"sync_checkpoint\""]
21029#[doc = "          ],"]
21030#[doc = "          \"properties\": {"]
21031#[doc = "            \"sync_checkpoint\": {"]
21032#[doc = "              \"$ref\": \"#/components/schemas/SyncCheckpoint\""]
21033#[doc = "            }"]
21034#[doc = "          }"]
21035#[doc = "        },"]
21036#[doc = "        {"]
21037#[doc = "          \"type\": \"object\","]
21038#[doc = "          \"required\": ["]
21039#[doc = "            \"code_hash\","]
21040#[doc = "            \"request_type\""]
21041#[doc = "          ],"]
21042#[doc = "          \"properties\": {"]
21043#[doc = "            \"code_hash\": {"]
21044#[doc = "              \"$ref\": \"#/components/schemas/CryptoHash\""]
21045#[doc = "            },"]
21046#[doc = "            \"request_type\": {"]
21047#[doc = "              \"type\": \"string\","]
21048#[doc = "              \"enum\": ["]
21049#[doc = "                \"view_global_contract_code\""]
21050#[doc = "              ]"]
21051#[doc = "            }"]
21052#[doc = "          }"]
21053#[doc = "        }"]
21054#[doc = "      ]"]
21055#[doc = "    },"]
21056#[doc = "    {"]
21057#[doc = "      \"title\": \"view_global_contract_code_by_account_id_by_sync_checkpoint\","]
21058#[doc = "      \"allOf\": ["]
21059#[doc = "        {"]
21060#[doc = "          \"type\": \"object\","]
21061#[doc = "          \"required\": ["]
21062#[doc = "            \"sync_checkpoint\""]
21063#[doc = "          ],"]
21064#[doc = "          \"properties\": {"]
21065#[doc = "            \"sync_checkpoint\": {"]
21066#[doc = "              \"$ref\": \"#/components/schemas/SyncCheckpoint\""]
21067#[doc = "            }"]
21068#[doc = "          }"]
21069#[doc = "        },"]
21070#[doc = "        {"]
21071#[doc = "          \"type\": \"object\","]
21072#[doc = "          \"required\": ["]
21073#[doc = "            \"account_id\","]
21074#[doc = "            \"request_type\""]
21075#[doc = "          ],"]
21076#[doc = "          \"properties\": {"]
21077#[doc = "            \"account_id\": {"]
21078#[doc = "              \"$ref\": \"#/components/schemas/AccountId\""]
21079#[doc = "            },"]
21080#[doc = "            \"request_type\": {"]
21081#[doc = "              \"type\": \"string\","]
21082#[doc = "              \"enum\": ["]
21083#[doc = "                \"view_global_contract_code_by_account_id\""]
21084#[doc = "              ]"]
21085#[doc = "            }"]
21086#[doc = "          }"]
21087#[doc = "        }"]
21088#[doc = "      ]"]
21089#[doc = "    }"]
21090#[doc = "  ]"]
21091#[doc = "}"]
21092#[doc = r" ```"]
21093#[doc = r" </details>"]
21094#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
21095#[serde(untagged)]
21096pub enum RpcQueryRequest {
21097    ViewAccountByBlockId {
21098        account_id: AccountId,
21099        block_id: BlockId,
21100        request_type: ViewAccountByBlockIdRequestType,
21101    },
21102    ViewCodeByBlockId {
21103        account_id: AccountId,
21104        block_id: BlockId,
21105        request_type: ViewCodeByBlockIdRequestType,
21106    },
21107    ViewStateByBlockId {
21108        account_id: AccountId,
21109        block_id: BlockId,
21110        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
21111        include_proof: ::std::option::Option<bool>,
21112        prefix_base64: StoreKey,
21113        request_type: ViewStateByBlockIdRequestType,
21114    },
21115    ViewAccessKeyByBlockId {
21116        account_id: AccountId,
21117        block_id: BlockId,
21118        public_key: PublicKey,
21119        request_type: ViewAccessKeyByBlockIdRequestType,
21120    },
21121    ViewAccessKeyListByBlockId {
21122        account_id: AccountId,
21123        block_id: BlockId,
21124        request_type: ViewAccessKeyListByBlockIdRequestType,
21125    },
21126    CallFunctionByBlockId {
21127        account_id: AccountId,
21128        args_base64: FunctionArgs,
21129        block_id: BlockId,
21130        method_name: ::std::string::String,
21131        request_type: CallFunctionByBlockIdRequestType,
21132    },
21133    ViewGlobalContractCodeByBlockId {
21134        block_id: BlockId,
21135        code_hash: CryptoHash,
21136        request_type: ViewGlobalContractCodeByBlockIdRequestType,
21137    },
21138    ViewGlobalContractCodeByAccountIdByBlockId {
21139        account_id: AccountId,
21140        block_id: BlockId,
21141        request_type: ViewGlobalContractCodeByAccountIdByBlockIdRequestType,
21142    },
21143    ViewAccountByFinality {
21144        account_id: AccountId,
21145        finality: Finality,
21146        request_type: ViewAccountByFinalityRequestType,
21147    },
21148    ViewCodeByFinality {
21149        account_id: AccountId,
21150        finality: Finality,
21151        request_type: ViewCodeByFinalityRequestType,
21152    },
21153    ViewStateByFinality {
21154        account_id: AccountId,
21155        finality: Finality,
21156        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
21157        include_proof: ::std::option::Option<bool>,
21158        prefix_base64: StoreKey,
21159        request_type: ViewStateByFinalityRequestType,
21160    },
21161    ViewAccessKeyByFinality {
21162        account_id: AccountId,
21163        finality: Finality,
21164        public_key: PublicKey,
21165        request_type: ViewAccessKeyByFinalityRequestType,
21166    },
21167    ViewAccessKeyListByFinality {
21168        account_id: AccountId,
21169        finality: Finality,
21170        request_type: ViewAccessKeyListByFinalityRequestType,
21171    },
21172    CallFunctionByFinality {
21173        account_id: AccountId,
21174        args_base64: FunctionArgs,
21175        finality: Finality,
21176        method_name: ::std::string::String,
21177        request_type: CallFunctionByFinalityRequestType,
21178    },
21179    ViewGlobalContractCodeByFinality {
21180        code_hash: CryptoHash,
21181        finality: Finality,
21182        request_type: ViewGlobalContractCodeByFinalityRequestType,
21183    },
21184    ViewGlobalContractCodeByAccountIdByFinality {
21185        account_id: AccountId,
21186        finality: Finality,
21187        request_type: ViewGlobalContractCodeByAccountIdByFinalityRequestType,
21188    },
21189    ViewAccountBySyncCheckpoint {
21190        account_id: AccountId,
21191        request_type: ViewAccountBySyncCheckpointRequestType,
21192        sync_checkpoint: SyncCheckpoint,
21193    },
21194    ViewCodeBySyncCheckpoint {
21195        account_id: AccountId,
21196        request_type: ViewCodeBySyncCheckpointRequestType,
21197        sync_checkpoint: SyncCheckpoint,
21198    },
21199    ViewStateBySyncCheckpoint {
21200        account_id: AccountId,
21201        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
21202        include_proof: ::std::option::Option<bool>,
21203        prefix_base64: StoreKey,
21204        request_type: ViewStateBySyncCheckpointRequestType,
21205        sync_checkpoint: SyncCheckpoint,
21206    },
21207    ViewAccessKeyBySyncCheckpoint {
21208        account_id: AccountId,
21209        public_key: PublicKey,
21210        request_type: ViewAccessKeyBySyncCheckpointRequestType,
21211        sync_checkpoint: SyncCheckpoint,
21212    },
21213    ViewAccessKeyListBySyncCheckpoint {
21214        account_id: AccountId,
21215        request_type: ViewAccessKeyListBySyncCheckpointRequestType,
21216        sync_checkpoint: SyncCheckpoint,
21217    },
21218    CallFunctionBySyncCheckpoint {
21219        account_id: AccountId,
21220        args_base64: FunctionArgs,
21221        method_name: ::std::string::String,
21222        request_type: CallFunctionBySyncCheckpointRequestType,
21223        sync_checkpoint: SyncCheckpoint,
21224    },
21225    ViewGlobalContractCodeBySyncCheckpoint {
21226        code_hash: CryptoHash,
21227        request_type: ViewGlobalContractCodeBySyncCheckpointRequestType,
21228        sync_checkpoint: SyncCheckpoint,
21229    },
21230    ViewGlobalContractCodeByAccountIdBySyncCheckpoint {
21231        account_id: AccountId,
21232        request_type: ViewGlobalContractCodeByAccountIdBySyncCheckpointRequestType,
21233        sync_checkpoint: SyncCheckpoint,
21234    },
21235}
21236impl ::std::convert::From<&Self> for RpcQueryRequest {
21237    fn from(value: &RpcQueryRequest) -> Self {
21238        value.clone()
21239    }
21240}
21241#[doc = "`RpcQueryResponse`"]
21242#[doc = r""]
21243#[doc = r" <details><summary>JSON schema</summary>"]
21244#[doc = r""]
21245#[doc = r" ```json"]
21246#[doc = "{"]
21247#[doc = "  \"type\": \"object\","]
21248#[doc = "  \"anyOf\": ["]
21249#[doc = "    {"]
21250#[doc = "      \"$ref\": \"#/components/schemas/AccountView\""]
21251#[doc = "    },"]
21252#[doc = "    {"]
21253#[doc = "      \"$ref\": \"#/components/schemas/ContractCodeView\""]
21254#[doc = "    },"]
21255#[doc = "    {"]
21256#[doc = "      \"$ref\": \"#/components/schemas/ViewStateResult\""]
21257#[doc = "    },"]
21258#[doc = "    {"]
21259#[doc = "      \"$ref\": \"#/components/schemas/CallResult\""]
21260#[doc = "    },"]
21261#[doc = "    {"]
21262#[doc = "      \"$ref\": \"#/components/schemas/AccessKeyView\""]
21263#[doc = "    },"]
21264#[doc = "    {"]
21265#[doc = "      \"$ref\": \"#/components/schemas/AccessKeyList\""]
21266#[doc = "    }"]
21267#[doc = "  ],"]
21268#[doc = "  \"required\": ["]
21269#[doc = "    \"block_hash\","]
21270#[doc = "    \"block_height\""]
21271#[doc = "  ],"]
21272#[doc = "  \"properties\": {"]
21273#[doc = "    \"block_hash\": {"]
21274#[doc = "      \"$ref\": \"#/components/schemas/CryptoHash\""]
21275#[doc = "    },"]
21276#[doc = "    \"block_height\": {"]
21277#[doc = "      \"type\": \"integer\","]
21278#[doc = "      \"format\": \"uint64\","]
21279#[doc = "      \"minimum\": 0.0"]
21280#[doc = "    }"]
21281#[doc = "  }"]
21282#[doc = "}"]
21283#[doc = r" ```"]
21284#[doc = r" </details>"]
21285#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
21286#[serde(untagged)]
21287pub enum RpcQueryResponse {
21288    Variant0 {
21289        amount: NearToken,
21290        block_hash: CryptoHash,
21291        block_height: u64,
21292        code_hash: CryptoHash,
21293        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
21294        global_contract_account_id: ::std::option::Option<AccountId>,
21295        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
21296        global_contract_hash: ::std::option::Option<CryptoHash>,
21297        locked: NearToken,
21298        #[doc = "TODO(2271): deprecated."]
21299        #[serde(default)]
21300        storage_paid_at: u64,
21301        storage_usage: u64,
21302    },
21303    Variant1 {
21304        block_hash: CryptoHash,
21305        block_height: u64,
21306        code_base64: ::std::string::String,
21307        hash: CryptoHash,
21308    },
21309    Variant2 {
21310        block_hash: CryptoHash,
21311        block_height: u64,
21312        #[serde(default, skip_serializing_if = "::std::vec::Vec::is_empty")]
21313        proof: ::std::vec::Vec<::std::string::String>,
21314        values: ::std::vec::Vec<StateItem>,
21315    },
21316    Variant3 {
21317        block_hash: CryptoHash,
21318        block_height: u64,
21319        logs: ::std::vec::Vec<::std::string::String>,
21320        result: ::std::vec::Vec<u8>,
21321    },
21322    Variant4 {
21323        block_hash: CryptoHash,
21324        block_height: u64,
21325        nonce: u64,
21326        permission: AccessKeyPermissionView,
21327    },
21328    Variant5 {
21329        block_hash: CryptoHash,
21330        block_height: u64,
21331        keys: ::std::vec::Vec<AccessKeyInfoView>,
21332    },
21333}
21334impl ::std::convert::From<&Self> for RpcQueryResponse {
21335    fn from(value: &RpcQueryResponse) -> Self {
21336        value.clone()
21337    }
21338}
21339#[doc = "`RpcReceiptRequest`"]
21340#[doc = r""]
21341#[doc = r" <details><summary>JSON schema</summary>"]
21342#[doc = r""]
21343#[doc = r" ```json"]
21344#[doc = "{"]
21345#[doc = "  \"title\": \"RpcReceiptRequest\","]
21346#[doc = "  \"type\": \"object\","]
21347#[doc = "  \"required\": ["]
21348#[doc = "    \"receipt_id\""]
21349#[doc = "  ],"]
21350#[doc = "  \"properties\": {"]
21351#[doc = "    \"receipt_id\": {"]
21352#[doc = "      \"$ref\": \"#/components/schemas/CryptoHash\""]
21353#[doc = "    }"]
21354#[doc = "  }"]
21355#[doc = "}"]
21356#[doc = r" ```"]
21357#[doc = r" </details>"]
21358#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
21359pub struct RpcReceiptRequest {
21360    pub receipt_id: CryptoHash,
21361}
21362impl ::std::convert::From<&RpcReceiptRequest> for RpcReceiptRequest {
21363    fn from(value: &RpcReceiptRequest) -> Self {
21364        value.clone()
21365    }
21366}
21367#[doc = "`RpcReceiptResponse`"]
21368#[doc = r""]
21369#[doc = r" <details><summary>JSON schema</summary>"]
21370#[doc = r""]
21371#[doc = r" ```json"]
21372#[doc = "{"]
21373#[doc = "  \"type\": \"object\","]
21374#[doc = "  \"required\": ["]
21375#[doc = "    \"predecessor_id\","]
21376#[doc = "    \"receipt\","]
21377#[doc = "    \"receipt_id\","]
21378#[doc = "    \"receiver_id\""]
21379#[doc = "  ],"]
21380#[doc = "  \"properties\": {"]
21381#[doc = "    \"predecessor_id\": {"]
21382#[doc = "      \"$ref\": \"#/components/schemas/AccountId\""]
21383#[doc = "    },"]
21384#[doc = "    \"priority\": {"]
21385#[doc = "      \"default\": 0,"]
21386#[doc = "      \"type\": \"integer\","]
21387#[doc = "      \"format\": \"uint64\","]
21388#[doc = "      \"minimum\": 0.0"]
21389#[doc = "    },"]
21390#[doc = "    \"receipt\": {"]
21391#[doc = "      \"$ref\": \"#/components/schemas/ReceiptEnumView\""]
21392#[doc = "    },"]
21393#[doc = "    \"receipt_id\": {"]
21394#[doc = "      \"$ref\": \"#/components/schemas/CryptoHash\""]
21395#[doc = "    },"]
21396#[doc = "    \"receiver_id\": {"]
21397#[doc = "      \"$ref\": \"#/components/schemas/AccountId\""]
21398#[doc = "    }"]
21399#[doc = "  }"]
21400#[doc = "}"]
21401#[doc = r" ```"]
21402#[doc = r" </details>"]
21403#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
21404pub struct RpcReceiptResponse {
21405    pub predecessor_id: AccountId,
21406    #[serde(default)]
21407    pub priority: u64,
21408    pub receipt: ReceiptEnumView,
21409    pub receipt_id: CryptoHash,
21410    pub receiver_id: AccountId,
21411}
21412impl ::std::convert::From<&RpcReceiptResponse> for RpcReceiptResponse {
21413    fn from(value: &RpcReceiptResponse) -> Self {
21414        value.clone()
21415    }
21416}
21417#[doc = "`RpcRequestValidationErrorKind`"]
21418#[doc = r""]
21419#[doc = r" <details><summary>JSON schema</summary>"]
21420#[doc = r""]
21421#[doc = r" ```json"]
21422#[doc = "{"]
21423#[doc = "  \"oneOf\": ["]
21424#[doc = "    {"]
21425#[doc = "      \"type\": \"object\","]
21426#[doc = "      \"required\": ["]
21427#[doc = "        \"info\","]
21428#[doc = "        \"name\""]
21429#[doc = "      ],"]
21430#[doc = "      \"properties\": {"]
21431#[doc = "        \"info\": {"]
21432#[doc = "          \"type\": \"object\","]
21433#[doc = "          \"required\": ["]
21434#[doc = "            \"method_name\""]
21435#[doc = "          ],"]
21436#[doc = "          \"properties\": {"]
21437#[doc = "            \"method_name\": {"]
21438#[doc = "              \"type\": \"string\""]
21439#[doc = "            }"]
21440#[doc = "          }"]
21441#[doc = "        },"]
21442#[doc = "        \"name\": {"]
21443#[doc = "          \"type\": \"string\","]
21444#[doc = "          \"enum\": ["]
21445#[doc = "            \"METHOD_NOT_FOUND\""]
21446#[doc = "          ]"]
21447#[doc = "        }"]
21448#[doc = "      }"]
21449#[doc = "    },"]
21450#[doc = "    {"]
21451#[doc = "      \"type\": \"object\","]
21452#[doc = "      \"required\": ["]
21453#[doc = "        \"info\","]
21454#[doc = "        \"name\""]
21455#[doc = "      ],"]
21456#[doc = "      \"properties\": {"]
21457#[doc = "        \"info\": {"]
21458#[doc = "          \"type\": \"object\","]
21459#[doc = "          \"required\": ["]
21460#[doc = "            \"error_message\""]
21461#[doc = "          ],"]
21462#[doc = "          \"properties\": {"]
21463#[doc = "            \"error_message\": {"]
21464#[doc = "              \"type\": \"string\""]
21465#[doc = "            }"]
21466#[doc = "          }"]
21467#[doc = "        },"]
21468#[doc = "        \"name\": {"]
21469#[doc = "          \"type\": \"string\","]
21470#[doc = "          \"enum\": ["]
21471#[doc = "            \"PARSE_ERROR\""]
21472#[doc = "          ]"]
21473#[doc = "        }"]
21474#[doc = "      }"]
21475#[doc = "    }"]
21476#[doc = "  ]"]
21477#[doc = "}"]
21478#[doc = r" ```"]
21479#[doc = r" </details>"]
21480#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
21481#[serde(tag = "name", content = "info")]
21482pub enum RpcRequestValidationErrorKind {
21483    #[serde(rename = "METHOD_NOT_FOUND")]
21484    MethodNotFound { method_name: ::std::string::String },
21485    #[serde(rename = "PARSE_ERROR")]
21486    ParseError {
21487        error_message: ::std::string::String,
21488    },
21489}
21490impl ::std::convert::From<&Self> for RpcRequestValidationErrorKind {
21491    fn from(value: &RpcRequestValidationErrorKind) -> Self {
21492        value.clone()
21493    }
21494}
21495#[doc = "`RpcSendTransactionRequest`"]
21496#[doc = r""]
21497#[doc = r" <details><summary>JSON schema</summary>"]
21498#[doc = r""]
21499#[doc = r" ```json"]
21500#[doc = "{"]
21501#[doc = "  \"title\": \"RpcSendTransactionRequest\","]
21502#[doc = "  \"type\": \"object\","]
21503#[doc = "  \"required\": ["]
21504#[doc = "    \"signed_tx_base64\""]
21505#[doc = "  ],"]
21506#[doc = "  \"properties\": {"]
21507#[doc = "    \"signed_tx_base64\": {"]
21508#[doc = "      \"$ref\": \"#/components/schemas/SignedTransaction\""]
21509#[doc = "    },"]
21510#[doc = "    \"wait_until\": {"]
21511#[doc = "      \"default\": \"EXECUTED_OPTIMISTIC\","]
21512#[doc = "      \"allOf\": ["]
21513#[doc = "        {"]
21514#[doc = "          \"$ref\": \"#/components/schemas/TxExecutionStatus\""]
21515#[doc = "        }"]
21516#[doc = "      ]"]
21517#[doc = "    }"]
21518#[doc = "  }"]
21519#[doc = "}"]
21520#[doc = r" ```"]
21521#[doc = r" </details>"]
21522#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
21523pub struct RpcSendTransactionRequest {
21524    pub signed_tx_base64: SignedTransaction,
21525    #[serde(default = "defaults::rpc_send_transaction_request_wait_until")]
21526    pub wait_until: TxExecutionStatus,
21527}
21528impl ::std::convert::From<&RpcSendTransactionRequest> for RpcSendTransactionRequest {
21529    fn from(value: &RpcSendTransactionRequest) -> Self {
21530        value.clone()
21531    }
21532}
21533#[doc = "`RpcSplitStorageInfoRequest`"]
21534#[doc = r""]
21535#[doc = r" <details><summary>JSON schema</summary>"]
21536#[doc = r""]
21537#[doc = r" ```json"]
21538#[doc = "{"]
21539#[doc = "  \"title\": \"RpcSplitStorageInfoRequest\","]
21540#[doc = "  \"type\": \"object\""]
21541#[doc = "}"]
21542#[doc = r" ```"]
21543#[doc = r" </details>"]
21544#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
21545#[serde(transparent)]
21546pub struct RpcSplitStorageInfoRequest(
21547    pub ::serde_json::Map<::std::string::String, ::serde_json::Value>,
21548);
21549impl ::std::ops::Deref for RpcSplitStorageInfoRequest {
21550    type Target = ::serde_json::Map<::std::string::String, ::serde_json::Value>;
21551    fn deref(&self) -> &::serde_json::Map<::std::string::String, ::serde_json::Value> {
21552        &self.0
21553    }
21554}
21555impl ::std::convert::From<RpcSplitStorageInfoRequest>
21556    for ::serde_json::Map<::std::string::String, ::serde_json::Value>
21557{
21558    fn from(value: RpcSplitStorageInfoRequest) -> Self {
21559        value.0
21560    }
21561}
21562impl ::std::convert::From<&RpcSplitStorageInfoRequest> for RpcSplitStorageInfoRequest {
21563    fn from(value: &RpcSplitStorageInfoRequest) -> Self {
21564        value.clone()
21565    }
21566}
21567impl ::std::convert::From<::serde_json::Map<::std::string::String, ::serde_json::Value>>
21568    for RpcSplitStorageInfoRequest
21569{
21570    fn from(value: ::serde_json::Map<::std::string::String, ::serde_json::Value>) -> Self {
21571        Self(value)
21572    }
21573}
21574#[doc = "Contains the split storage information."]
21575#[doc = r""]
21576#[doc = r" <details><summary>JSON schema</summary>"]
21577#[doc = r""]
21578#[doc = r" ```json"]
21579#[doc = "{"]
21580#[doc = "  \"description\": \"Contains the split storage information.\","]
21581#[doc = "  \"type\": \"object\","]
21582#[doc = "  \"properties\": {"]
21583#[doc = "    \"cold_head_height\": {"]
21584#[doc = "      \"type\": ["]
21585#[doc = "        \"integer\","]
21586#[doc = "        \"null\""]
21587#[doc = "      ],"]
21588#[doc = "      \"format\": \"uint64\","]
21589#[doc = "      \"minimum\": 0.0"]
21590#[doc = "    },"]
21591#[doc = "    \"final_head_height\": {"]
21592#[doc = "      \"type\": ["]
21593#[doc = "        \"integer\","]
21594#[doc = "        \"null\""]
21595#[doc = "      ],"]
21596#[doc = "      \"format\": \"uint64\","]
21597#[doc = "      \"minimum\": 0.0"]
21598#[doc = "    },"]
21599#[doc = "    \"head_height\": {"]
21600#[doc = "      \"type\": ["]
21601#[doc = "        \"integer\","]
21602#[doc = "        \"null\""]
21603#[doc = "      ],"]
21604#[doc = "      \"format\": \"uint64\","]
21605#[doc = "      \"minimum\": 0.0"]
21606#[doc = "    },"]
21607#[doc = "    \"hot_db_kind\": {"]
21608#[doc = "      \"type\": ["]
21609#[doc = "        \"string\","]
21610#[doc = "        \"null\""]
21611#[doc = "      ]"]
21612#[doc = "    }"]
21613#[doc = "  }"]
21614#[doc = "}"]
21615#[doc = r" ```"]
21616#[doc = r" </details>"]
21617#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
21618pub struct RpcSplitStorageInfoResponse {
21619    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
21620    pub cold_head_height: ::std::option::Option<u64>,
21621    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
21622    pub final_head_height: ::std::option::Option<u64>,
21623    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
21624    pub head_height: ::std::option::Option<u64>,
21625    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
21626    pub hot_db_kind: ::std::option::Option<::std::string::String>,
21627}
21628impl ::std::convert::From<&RpcSplitStorageInfoResponse> for RpcSplitStorageInfoResponse {
21629    fn from(value: &RpcSplitStorageInfoResponse) -> Self {
21630        value.clone()
21631    }
21632}
21633impl ::std::default::Default for RpcSplitStorageInfoResponse {
21634    fn default() -> Self {
21635        Self {
21636            cold_head_height: Default::default(),
21637            final_head_height: Default::default(),
21638            head_height: Default::default(),
21639            hot_db_kind: Default::default(),
21640        }
21641    }
21642}
21643#[doc = "It is a [serializable view] of [`StateChangesRequest`].\n\n[serializable view]: ./index.html\n[`StateChangesRequest`]: ../types/struct.StateChangesRequest.html"]
21644#[doc = r""]
21645#[doc = r" <details><summary>JSON schema</summary>"]
21646#[doc = r""]
21647#[doc = r" ```json"]
21648#[doc = "{"]
21649#[doc = "  \"title\": \"RpcStateChangesInBlockByTypeRequest\","]
21650#[doc = "  \"description\": \"It is a [serializable view] of [`StateChangesRequest`].\\n\\n[serializable view]: ./index.html\\n[`StateChangesRequest`]: ../types/struct.StateChangesRequest.html\","]
21651#[doc = "  \"type\": \"object\","]
21652#[doc = "  \"oneOf\": ["]
21653#[doc = "    {"]
21654#[doc = "      \"title\": \"account_changes_by_block_id\","]
21655#[doc = "      \"allOf\": ["]
21656#[doc = "        {"]
21657#[doc = "          \"type\": \"object\","]
21658#[doc = "          \"required\": ["]
21659#[doc = "            \"block_id\""]
21660#[doc = "          ],"]
21661#[doc = "          \"properties\": {"]
21662#[doc = "            \"block_id\": {"]
21663#[doc = "              \"$ref\": \"#/components/schemas/BlockId\""]
21664#[doc = "            }"]
21665#[doc = "          }"]
21666#[doc = "        },"]
21667#[doc = "        {"]
21668#[doc = "          \"type\": \"object\","]
21669#[doc = "          \"required\": ["]
21670#[doc = "            \"account_ids\","]
21671#[doc = "            \"changes_type\""]
21672#[doc = "          ],"]
21673#[doc = "          \"properties\": {"]
21674#[doc = "            \"account_ids\": {"]
21675#[doc = "              \"type\": \"array\","]
21676#[doc = "              \"items\": {"]
21677#[doc = "                \"$ref\": \"#/components/schemas/AccountId\""]
21678#[doc = "              }"]
21679#[doc = "            },"]
21680#[doc = "            \"changes_type\": {"]
21681#[doc = "              \"type\": \"string\","]
21682#[doc = "              \"enum\": ["]
21683#[doc = "                \"account_changes\""]
21684#[doc = "              ]"]
21685#[doc = "            }"]
21686#[doc = "          }"]
21687#[doc = "        }"]
21688#[doc = "      ]"]
21689#[doc = "    },"]
21690#[doc = "    {"]
21691#[doc = "      \"title\": \"single_access_key_changes_by_block_id\","]
21692#[doc = "      \"allOf\": ["]
21693#[doc = "        {"]
21694#[doc = "          \"type\": \"object\","]
21695#[doc = "          \"required\": ["]
21696#[doc = "            \"block_id\""]
21697#[doc = "          ],"]
21698#[doc = "          \"properties\": {"]
21699#[doc = "            \"block_id\": {"]
21700#[doc = "              \"$ref\": \"#/components/schemas/BlockId\""]
21701#[doc = "            }"]
21702#[doc = "          }"]
21703#[doc = "        },"]
21704#[doc = "        {"]
21705#[doc = "          \"type\": \"object\","]
21706#[doc = "          \"required\": ["]
21707#[doc = "            \"changes_type\","]
21708#[doc = "            \"keys\""]
21709#[doc = "          ],"]
21710#[doc = "          \"properties\": {"]
21711#[doc = "            \"changes_type\": {"]
21712#[doc = "              \"type\": \"string\","]
21713#[doc = "              \"enum\": ["]
21714#[doc = "                \"single_access_key_changes\""]
21715#[doc = "              ]"]
21716#[doc = "            },"]
21717#[doc = "            \"keys\": {"]
21718#[doc = "              \"type\": \"array\","]
21719#[doc = "              \"items\": {"]
21720#[doc = "                \"$ref\": \"#/components/schemas/AccountWithPublicKey\""]
21721#[doc = "              }"]
21722#[doc = "            }"]
21723#[doc = "          }"]
21724#[doc = "        }"]
21725#[doc = "      ]"]
21726#[doc = "    },"]
21727#[doc = "    {"]
21728#[doc = "      \"title\": \"single_gas_key_changes_by_block_id\","]
21729#[doc = "      \"allOf\": ["]
21730#[doc = "        {"]
21731#[doc = "          \"type\": \"object\","]
21732#[doc = "          \"required\": ["]
21733#[doc = "            \"block_id\""]
21734#[doc = "          ],"]
21735#[doc = "          \"properties\": {"]
21736#[doc = "            \"block_id\": {"]
21737#[doc = "              \"$ref\": \"#/components/schemas/BlockId\""]
21738#[doc = "            }"]
21739#[doc = "          }"]
21740#[doc = "        },"]
21741#[doc = "        {"]
21742#[doc = "          \"type\": \"object\","]
21743#[doc = "          \"required\": ["]
21744#[doc = "            \"changes_type\","]
21745#[doc = "            \"keys\""]
21746#[doc = "          ],"]
21747#[doc = "          \"properties\": {"]
21748#[doc = "            \"changes_type\": {"]
21749#[doc = "              \"type\": \"string\","]
21750#[doc = "              \"enum\": ["]
21751#[doc = "                \"single_gas_key_changes\""]
21752#[doc = "              ]"]
21753#[doc = "            },"]
21754#[doc = "            \"keys\": {"]
21755#[doc = "              \"type\": \"array\","]
21756#[doc = "              \"items\": {"]
21757#[doc = "                \"$ref\": \"#/components/schemas/AccountWithPublicKey\""]
21758#[doc = "              }"]
21759#[doc = "            }"]
21760#[doc = "          }"]
21761#[doc = "        }"]
21762#[doc = "      ]"]
21763#[doc = "    },"]
21764#[doc = "    {"]
21765#[doc = "      \"title\": \"all_access_key_changes_by_block_id\","]
21766#[doc = "      \"allOf\": ["]
21767#[doc = "        {"]
21768#[doc = "          \"type\": \"object\","]
21769#[doc = "          \"required\": ["]
21770#[doc = "            \"block_id\""]
21771#[doc = "          ],"]
21772#[doc = "          \"properties\": {"]
21773#[doc = "            \"block_id\": {"]
21774#[doc = "              \"$ref\": \"#/components/schemas/BlockId\""]
21775#[doc = "            }"]
21776#[doc = "          }"]
21777#[doc = "        },"]
21778#[doc = "        {"]
21779#[doc = "          \"type\": \"object\","]
21780#[doc = "          \"required\": ["]
21781#[doc = "            \"account_ids\","]
21782#[doc = "            \"changes_type\""]
21783#[doc = "          ],"]
21784#[doc = "          \"properties\": {"]
21785#[doc = "            \"account_ids\": {"]
21786#[doc = "              \"type\": \"array\","]
21787#[doc = "              \"items\": {"]
21788#[doc = "                \"$ref\": \"#/components/schemas/AccountId\""]
21789#[doc = "              }"]
21790#[doc = "            },"]
21791#[doc = "            \"changes_type\": {"]
21792#[doc = "              \"type\": \"string\","]
21793#[doc = "              \"enum\": ["]
21794#[doc = "                \"all_access_key_changes\""]
21795#[doc = "              ]"]
21796#[doc = "            }"]
21797#[doc = "          }"]
21798#[doc = "        }"]
21799#[doc = "      ]"]
21800#[doc = "    },"]
21801#[doc = "    {"]
21802#[doc = "      \"title\": \"all_gas_key_changes_by_block_id\","]
21803#[doc = "      \"allOf\": ["]
21804#[doc = "        {"]
21805#[doc = "          \"type\": \"object\","]
21806#[doc = "          \"required\": ["]
21807#[doc = "            \"block_id\""]
21808#[doc = "          ],"]
21809#[doc = "          \"properties\": {"]
21810#[doc = "            \"block_id\": {"]
21811#[doc = "              \"$ref\": \"#/components/schemas/BlockId\""]
21812#[doc = "            }"]
21813#[doc = "          }"]
21814#[doc = "        },"]
21815#[doc = "        {"]
21816#[doc = "          \"type\": \"object\","]
21817#[doc = "          \"required\": ["]
21818#[doc = "            \"account_ids\","]
21819#[doc = "            \"changes_type\""]
21820#[doc = "          ],"]
21821#[doc = "          \"properties\": {"]
21822#[doc = "            \"account_ids\": {"]
21823#[doc = "              \"type\": \"array\","]
21824#[doc = "              \"items\": {"]
21825#[doc = "                \"$ref\": \"#/components/schemas/AccountId\""]
21826#[doc = "              }"]
21827#[doc = "            },"]
21828#[doc = "            \"changes_type\": {"]
21829#[doc = "              \"type\": \"string\","]
21830#[doc = "              \"enum\": ["]
21831#[doc = "                \"all_gas_key_changes\""]
21832#[doc = "              ]"]
21833#[doc = "            }"]
21834#[doc = "          }"]
21835#[doc = "        }"]
21836#[doc = "      ]"]
21837#[doc = "    },"]
21838#[doc = "    {"]
21839#[doc = "      \"title\": \"contract_code_changes_by_block_id\","]
21840#[doc = "      \"allOf\": ["]
21841#[doc = "        {"]
21842#[doc = "          \"type\": \"object\","]
21843#[doc = "          \"required\": ["]
21844#[doc = "            \"block_id\""]
21845#[doc = "          ],"]
21846#[doc = "          \"properties\": {"]
21847#[doc = "            \"block_id\": {"]
21848#[doc = "              \"$ref\": \"#/components/schemas/BlockId\""]
21849#[doc = "            }"]
21850#[doc = "          }"]
21851#[doc = "        },"]
21852#[doc = "        {"]
21853#[doc = "          \"type\": \"object\","]
21854#[doc = "          \"required\": ["]
21855#[doc = "            \"account_ids\","]
21856#[doc = "            \"changes_type\""]
21857#[doc = "          ],"]
21858#[doc = "          \"properties\": {"]
21859#[doc = "            \"account_ids\": {"]
21860#[doc = "              \"type\": \"array\","]
21861#[doc = "              \"items\": {"]
21862#[doc = "                \"$ref\": \"#/components/schemas/AccountId\""]
21863#[doc = "              }"]
21864#[doc = "            },"]
21865#[doc = "            \"changes_type\": {"]
21866#[doc = "              \"type\": \"string\","]
21867#[doc = "              \"enum\": ["]
21868#[doc = "                \"contract_code_changes\""]
21869#[doc = "              ]"]
21870#[doc = "            }"]
21871#[doc = "          }"]
21872#[doc = "        }"]
21873#[doc = "      ]"]
21874#[doc = "    },"]
21875#[doc = "    {"]
21876#[doc = "      \"title\": \"data_changes_by_block_id\","]
21877#[doc = "      \"allOf\": ["]
21878#[doc = "        {"]
21879#[doc = "          \"type\": \"object\","]
21880#[doc = "          \"required\": ["]
21881#[doc = "            \"block_id\""]
21882#[doc = "          ],"]
21883#[doc = "          \"properties\": {"]
21884#[doc = "            \"block_id\": {"]
21885#[doc = "              \"$ref\": \"#/components/schemas/BlockId\""]
21886#[doc = "            }"]
21887#[doc = "          }"]
21888#[doc = "        },"]
21889#[doc = "        {"]
21890#[doc = "          \"type\": \"object\","]
21891#[doc = "          \"required\": ["]
21892#[doc = "            \"account_ids\","]
21893#[doc = "            \"changes_type\","]
21894#[doc = "            \"key_prefix_base64\""]
21895#[doc = "          ],"]
21896#[doc = "          \"properties\": {"]
21897#[doc = "            \"account_ids\": {"]
21898#[doc = "              \"type\": \"array\","]
21899#[doc = "              \"items\": {"]
21900#[doc = "                \"$ref\": \"#/components/schemas/AccountId\""]
21901#[doc = "              }"]
21902#[doc = "            },"]
21903#[doc = "            \"changes_type\": {"]
21904#[doc = "              \"type\": \"string\","]
21905#[doc = "              \"enum\": ["]
21906#[doc = "                \"data_changes\""]
21907#[doc = "              ]"]
21908#[doc = "            },"]
21909#[doc = "            \"key_prefix_base64\": {"]
21910#[doc = "              \"$ref\": \"#/components/schemas/StoreKey\""]
21911#[doc = "            }"]
21912#[doc = "          }"]
21913#[doc = "        }"]
21914#[doc = "      ]"]
21915#[doc = "    },"]
21916#[doc = "    {"]
21917#[doc = "      \"title\": \"account_changes_by_finality\","]
21918#[doc = "      \"allOf\": ["]
21919#[doc = "        {"]
21920#[doc = "          \"type\": \"object\","]
21921#[doc = "          \"required\": ["]
21922#[doc = "            \"finality\""]
21923#[doc = "          ],"]
21924#[doc = "          \"properties\": {"]
21925#[doc = "            \"finality\": {"]
21926#[doc = "              \"$ref\": \"#/components/schemas/Finality\""]
21927#[doc = "            }"]
21928#[doc = "          }"]
21929#[doc = "        },"]
21930#[doc = "        {"]
21931#[doc = "          \"type\": \"object\","]
21932#[doc = "          \"required\": ["]
21933#[doc = "            \"account_ids\","]
21934#[doc = "            \"changes_type\""]
21935#[doc = "          ],"]
21936#[doc = "          \"properties\": {"]
21937#[doc = "            \"account_ids\": {"]
21938#[doc = "              \"type\": \"array\","]
21939#[doc = "              \"items\": {"]
21940#[doc = "                \"$ref\": \"#/components/schemas/AccountId\""]
21941#[doc = "              }"]
21942#[doc = "            },"]
21943#[doc = "            \"changes_type\": {"]
21944#[doc = "              \"type\": \"string\","]
21945#[doc = "              \"enum\": ["]
21946#[doc = "                \"account_changes\""]
21947#[doc = "              ]"]
21948#[doc = "            }"]
21949#[doc = "          }"]
21950#[doc = "        }"]
21951#[doc = "      ]"]
21952#[doc = "    },"]
21953#[doc = "    {"]
21954#[doc = "      \"title\": \"single_access_key_changes_by_finality\","]
21955#[doc = "      \"allOf\": ["]
21956#[doc = "        {"]
21957#[doc = "          \"type\": \"object\","]
21958#[doc = "          \"required\": ["]
21959#[doc = "            \"finality\""]
21960#[doc = "          ],"]
21961#[doc = "          \"properties\": {"]
21962#[doc = "            \"finality\": {"]
21963#[doc = "              \"$ref\": \"#/components/schemas/Finality\""]
21964#[doc = "            }"]
21965#[doc = "          }"]
21966#[doc = "        },"]
21967#[doc = "        {"]
21968#[doc = "          \"type\": \"object\","]
21969#[doc = "          \"required\": ["]
21970#[doc = "            \"changes_type\","]
21971#[doc = "            \"keys\""]
21972#[doc = "          ],"]
21973#[doc = "          \"properties\": {"]
21974#[doc = "            \"changes_type\": {"]
21975#[doc = "              \"type\": \"string\","]
21976#[doc = "              \"enum\": ["]
21977#[doc = "                \"single_access_key_changes\""]
21978#[doc = "              ]"]
21979#[doc = "            },"]
21980#[doc = "            \"keys\": {"]
21981#[doc = "              \"type\": \"array\","]
21982#[doc = "              \"items\": {"]
21983#[doc = "                \"$ref\": \"#/components/schemas/AccountWithPublicKey\""]
21984#[doc = "              }"]
21985#[doc = "            }"]
21986#[doc = "          }"]
21987#[doc = "        }"]
21988#[doc = "      ]"]
21989#[doc = "    },"]
21990#[doc = "    {"]
21991#[doc = "      \"title\": \"single_gas_key_changes_by_finality\","]
21992#[doc = "      \"allOf\": ["]
21993#[doc = "        {"]
21994#[doc = "          \"type\": \"object\","]
21995#[doc = "          \"required\": ["]
21996#[doc = "            \"finality\""]
21997#[doc = "          ],"]
21998#[doc = "          \"properties\": {"]
21999#[doc = "            \"finality\": {"]
22000#[doc = "              \"$ref\": \"#/components/schemas/Finality\""]
22001#[doc = "            }"]
22002#[doc = "          }"]
22003#[doc = "        },"]
22004#[doc = "        {"]
22005#[doc = "          \"type\": \"object\","]
22006#[doc = "          \"required\": ["]
22007#[doc = "            \"changes_type\","]
22008#[doc = "            \"keys\""]
22009#[doc = "          ],"]
22010#[doc = "          \"properties\": {"]
22011#[doc = "            \"changes_type\": {"]
22012#[doc = "              \"type\": \"string\","]
22013#[doc = "              \"enum\": ["]
22014#[doc = "                \"single_gas_key_changes\""]
22015#[doc = "              ]"]
22016#[doc = "            },"]
22017#[doc = "            \"keys\": {"]
22018#[doc = "              \"type\": \"array\","]
22019#[doc = "              \"items\": {"]
22020#[doc = "                \"$ref\": \"#/components/schemas/AccountWithPublicKey\""]
22021#[doc = "              }"]
22022#[doc = "            }"]
22023#[doc = "          }"]
22024#[doc = "        }"]
22025#[doc = "      ]"]
22026#[doc = "    },"]
22027#[doc = "    {"]
22028#[doc = "      \"title\": \"all_access_key_changes_by_finality\","]
22029#[doc = "      \"allOf\": ["]
22030#[doc = "        {"]
22031#[doc = "          \"type\": \"object\","]
22032#[doc = "          \"required\": ["]
22033#[doc = "            \"finality\""]
22034#[doc = "          ],"]
22035#[doc = "          \"properties\": {"]
22036#[doc = "            \"finality\": {"]
22037#[doc = "              \"$ref\": \"#/components/schemas/Finality\""]
22038#[doc = "            }"]
22039#[doc = "          }"]
22040#[doc = "        },"]
22041#[doc = "        {"]
22042#[doc = "          \"type\": \"object\","]
22043#[doc = "          \"required\": ["]
22044#[doc = "            \"account_ids\","]
22045#[doc = "            \"changes_type\""]
22046#[doc = "          ],"]
22047#[doc = "          \"properties\": {"]
22048#[doc = "            \"account_ids\": {"]
22049#[doc = "              \"type\": \"array\","]
22050#[doc = "              \"items\": {"]
22051#[doc = "                \"$ref\": \"#/components/schemas/AccountId\""]
22052#[doc = "              }"]
22053#[doc = "            },"]
22054#[doc = "            \"changes_type\": {"]
22055#[doc = "              \"type\": \"string\","]
22056#[doc = "              \"enum\": ["]
22057#[doc = "                \"all_access_key_changes\""]
22058#[doc = "              ]"]
22059#[doc = "            }"]
22060#[doc = "          }"]
22061#[doc = "        }"]
22062#[doc = "      ]"]
22063#[doc = "    },"]
22064#[doc = "    {"]
22065#[doc = "      \"title\": \"all_gas_key_changes_by_finality\","]
22066#[doc = "      \"allOf\": ["]
22067#[doc = "        {"]
22068#[doc = "          \"type\": \"object\","]
22069#[doc = "          \"required\": ["]
22070#[doc = "            \"finality\""]
22071#[doc = "          ],"]
22072#[doc = "          \"properties\": {"]
22073#[doc = "            \"finality\": {"]
22074#[doc = "              \"$ref\": \"#/components/schemas/Finality\""]
22075#[doc = "            }"]
22076#[doc = "          }"]
22077#[doc = "        },"]
22078#[doc = "        {"]
22079#[doc = "          \"type\": \"object\","]
22080#[doc = "          \"required\": ["]
22081#[doc = "            \"account_ids\","]
22082#[doc = "            \"changes_type\""]
22083#[doc = "          ],"]
22084#[doc = "          \"properties\": {"]
22085#[doc = "            \"account_ids\": {"]
22086#[doc = "              \"type\": \"array\","]
22087#[doc = "              \"items\": {"]
22088#[doc = "                \"$ref\": \"#/components/schemas/AccountId\""]
22089#[doc = "              }"]
22090#[doc = "            },"]
22091#[doc = "            \"changes_type\": {"]
22092#[doc = "              \"type\": \"string\","]
22093#[doc = "              \"enum\": ["]
22094#[doc = "                \"all_gas_key_changes\""]
22095#[doc = "              ]"]
22096#[doc = "            }"]
22097#[doc = "          }"]
22098#[doc = "        }"]
22099#[doc = "      ]"]
22100#[doc = "    },"]
22101#[doc = "    {"]
22102#[doc = "      \"title\": \"contract_code_changes_by_finality\","]
22103#[doc = "      \"allOf\": ["]
22104#[doc = "        {"]
22105#[doc = "          \"type\": \"object\","]
22106#[doc = "          \"required\": ["]
22107#[doc = "            \"finality\""]
22108#[doc = "          ],"]
22109#[doc = "          \"properties\": {"]
22110#[doc = "            \"finality\": {"]
22111#[doc = "              \"$ref\": \"#/components/schemas/Finality\""]
22112#[doc = "            }"]
22113#[doc = "          }"]
22114#[doc = "        },"]
22115#[doc = "        {"]
22116#[doc = "          \"type\": \"object\","]
22117#[doc = "          \"required\": ["]
22118#[doc = "            \"account_ids\","]
22119#[doc = "            \"changes_type\""]
22120#[doc = "          ],"]
22121#[doc = "          \"properties\": {"]
22122#[doc = "            \"account_ids\": {"]
22123#[doc = "              \"type\": \"array\","]
22124#[doc = "              \"items\": {"]
22125#[doc = "                \"$ref\": \"#/components/schemas/AccountId\""]
22126#[doc = "              }"]
22127#[doc = "            },"]
22128#[doc = "            \"changes_type\": {"]
22129#[doc = "              \"type\": \"string\","]
22130#[doc = "              \"enum\": ["]
22131#[doc = "                \"contract_code_changes\""]
22132#[doc = "              ]"]
22133#[doc = "            }"]
22134#[doc = "          }"]
22135#[doc = "        }"]
22136#[doc = "      ]"]
22137#[doc = "    },"]
22138#[doc = "    {"]
22139#[doc = "      \"title\": \"data_changes_by_finality\","]
22140#[doc = "      \"allOf\": ["]
22141#[doc = "        {"]
22142#[doc = "          \"type\": \"object\","]
22143#[doc = "          \"required\": ["]
22144#[doc = "            \"finality\""]
22145#[doc = "          ],"]
22146#[doc = "          \"properties\": {"]
22147#[doc = "            \"finality\": {"]
22148#[doc = "              \"$ref\": \"#/components/schemas/Finality\""]
22149#[doc = "            }"]
22150#[doc = "          }"]
22151#[doc = "        },"]
22152#[doc = "        {"]
22153#[doc = "          \"type\": \"object\","]
22154#[doc = "          \"required\": ["]
22155#[doc = "            \"account_ids\","]
22156#[doc = "            \"changes_type\","]
22157#[doc = "            \"key_prefix_base64\""]
22158#[doc = "          ],"]
22159#[doc = "          \"properties\": {"]
22160#[doc = "            \"account_ids\": {"]
22161#[doc = "              \"type\": \"array\","]
22162#[doc = "              \"items\": {"]
22163#[doc = "                \"$ref\": \"#/components/schemas/AccountId\""]
22164#[doc = "              }"]
22165#[doc = "            },"]
22166#[doc = "            \"changes_type\": {"]
22167#[doc = "              \"type\": \"string\","]
22168#[doc = "              \"enum\": ["]
22169#[doc = "                \"data_changes\""]
22170#[doc = "              ]"]
22171#[doc = "            },"]
22172#[doc = "            \"key_prefix_base64\": {"]
22173#[doc = "              \"$ref\": \"#/components/schemas/StoreKey\""]
22174#[doc = "            }"]
22175#[doc = "          }"]
22176#[doc = "        }"]
22177#[doc = "      ]"]
22178#[doc = "    },"]
22179#[doc = "    {"]
22180#[doc = "      \"title\": \"account_changes_by_sync_checkpoint\","]
22181#[doc = "      \"allOf\": ["]
22182#[doc = "        {"]
22183#[doc = "          \"type\": \"object\","]
22184#[doc = "          \"required\": ["]
22185#[doc = "            \"sync_checkpoint\""]
22186#[doc = "          ],"]
22187#[doc = "          \"properties\": {"]
22188#[doc = "            \"sync_checkpoint\": {"]
22189#[doc = "              \"$ref\": \"#/components/schemas/SyncCheckpoint\""]
22190#[doc = "            }"]
22191#[doc = "          }"]
22192#[doc = "        },"]
22193#[doc = "        {"]
22194#[doc = "          \"type\": \"object\","]
22195#[doc = "          \"required\": ["]
22196#[doc = "            \"account_ids\","]
22197#[doc = "            \"changes_type\""]
22198#[doc = "          ],"]
22199#[doc = "          \"properties\": {"]
22200#[doc = "            \"account_ids\": {"]
22201#[doc = "              \"type\": \"array\","]
22202#[doc = "              \"items\": {"]
22203#[doc = "                \"$ref\": \"#/components/schemas/AccountId\""]
22204#[doc = "              }"]
22205#[doc = "            },"]
22206#[doc = "            \"changes_type\": {"]
22207#[doc = "              \"type\": \"string\","]
22208#[doc = "              \"enum\": ["]
22209#[doc = "                \"account_changes\""]
22210#[doc = "              ]"]
22211#[doc = "            }"]
22212#[doc = "          }"]
22213#[doc = "        }"]
22214#[doc = "      ]"]
22215#[doc = "    },"]
22216#[doc = "    {"]
22217#[doc = "      \"title\": \"single_access_key_changes_by_sync_checkpoint\","]
22218#[doc = "      \"allOf\": ["]
22219#[doc = "        {"]
22220#[doc = "          \"type\": \"object\","]
22221#[doc = "          \"required\": ["]
22222#[doc = "            \"sync_checkpoint\""]
22223#[doc = "          ],"]
22224#[doc = "          \"properties\": {"]
22225#[doc = "            \"sync_checkpoint\": {"]
22226#[doc = "              \"$ref\": \"#/components/schemas/SyncCheckpoint\""]
22227#[doc = "            }"]
22228#[doc = "          }"]
22229#[doc = "        },"]
22230#[doc = "        {"]
22231#[doc = "          \"type\": \"object\","]
22232#[doc = "          \"required\": ["]
22233#[doc = "            \"changes_type\","]
22234#[doc = "            \"keys\""]
22235#[doc = "          ],"]
22236#[doc = "          \"properties\": {"]
22237#[doc = "            \"changes_type\": {"]
22238#[doc = "              \"type\": \"string\","]
22239#[doc = "              \"enum\": ["]
22240#[doc = "                \"single_access_key_changes\""]
22241#[doc = "              ]"]
22242#[doc = "            },"]
22243#[doc = "            \"keys\": {"]
22244#[doc = "              \"type\": \"array\","]
22245#[doc = "              \"items\": {"]
22246#[doc = "                \"$ref\": \"#/components/schemas/AccountWithPublicKey\""]
22247#[doc = "              }"]
22248#[doc = "            }"]
22249#[doc = "          }"]
22250#[doc = "        }"]
22251#[doc = "      ]"]
22252#[doc = "    },"]
22253#[doc = "    {"]
22254#[doc = "      \"title\": \"single_gas_key_changes_by_sync_checkpoint\","]
22255#[doc = "      \"allOf\": ["]
22256#[doc = "        {"]
22257#[doc = "          \"type\": \"object\","]
22258#[doc = "          \"required\": ["]
22259#[doc = "            \"sync_checkpoint\""]
22260#[doc = "          ],"]
22261#[doc = "          \"properties\": {"]
22262#[doc = "            \"sync_checkpoint\": {"]
22263#[doc = "              \"$ref\": \"#/components/schemas/SyncCheckpoint\""]
22264#[doc = "            }"]
22265#[doc = "          }"]
22266#[doc = "        },"]
22267#[doc = "        {"]
22268#[doc = "          \"type\": \"object\","]
22269#[doc = "          \"required\": ["]
22270#[doc = "            \"changes_type\","]
22271#[doc = "            \"keys\""]
22272#[doc = "          ],"]
22273#[doc = "          \"properties\": {"]
22274#[doc = "            \"changes_type\": {"]
22275#[doc = "              \"type\": \"string\","]
22276#[doc = "              \"enum\": ["]
22277#[doc = "                \"single_gas_key_changes\""]
22278#[doc = "              ]"]
22279#[doc = "            },"]
22280#[doc = "            \"keys\": {"]
22281#[doc = "              \"type\": \"array\","]
22282#[doc = "              \"items\": {"]
22283#[doc = "                \"$ref\": \"#/components/schemas/AccountWithPublicKey\""]
22284#[doc = "              }"]
22285#[doc = "            }"]
22286#[doc = "          }"]
22287#[doc = "        }"]
22288#[doc = "      ]"]
22289#[doc = "    },"]
22290#[doc = "    {"]
22291#[doc = "      \"title\": \"all_access_key_changes_by_sync_checkpoint\","]
22292#[doc = "      \"allOf\": ["]
22293#[doc = "        {"]
22294#[doc = "          \"type\": \"object\","]
22295#[doc = "          \"required\": ["]
22296#[doc = "            \"sync_checkpoint\""]
22297#[doc = "          ],"]
22298#[doc = "          \"properties\": {"]
22299#[doc = "            \"sync_checkpoint\": {"]
22300#[doc = "              \"$ref\": \"#/components/schemas/SyncCheckpoint\""]
22301#[doc = "            }"]
22302#[doc = "          }"]
22303#[doc = "        },"]
22304#[doc = "        {"]
22305#[doc = "          \"type\": \"object\","]
22306#[doc = "          \"required\": ["]
22307#[doc = "            \"account_ids\","]
22308#[doc = "            \"changes_type\""]
22309#[doc = "          ],"]
22310#[doc = "          \"properties\": {"]
22311#[doc = "            \"account_ids\": {"]
22312#[doc = "              \"type\": \"array\","]
22313#[doc = "              \"items\": {"]
22314#[doc = "                \"$ref\": \"#/components/schemas/AccountId\""]
22315#[doc = "              }"]
22316#[doc = "            },"]
22317#[doc = "            \"changes_type\": {"]
22318#[doc = "              \"type\": \"string\","]
22319#[doc = "              \"enum\": ["]
22320#[doc = "                \"all_access_key_changes\""]
22321#[doc = "              ]"]
22322#[doc = "            }"]
22323#[doc = "          }"]
22324#[doc = "        }"]
22325#[doc = "      ]"]
22326#[doc = "    },"]
22327#[doc = "    {"]
22328#[doc = "      \"title\": \"all_gas_key_changes_by_sync_checkpoint\","]
22329#[doc = "      \"allOf\": ["]
22330#[doc = "        {"]
22331#[doc = "          \"type\": \"object\","]
22332#[doc = "          \"required\": ["]
22333#[doc = "            \"sync_checkpoint\""]
22334#[doc = "          ],"]
22335#[doc = "          \"properties\": {"]
22336#[doc = "            \"sync_checkpoint\": {"]
22337#[doc = "              \"$ref\": \"#/components/schemas/SyncCheckpoint\""]
22338#[doc = "            }"]
22339#[doc = "          }"]
22340#[doc = "        },"]
22341#[doc = "        {"]
22342#[doc = "          \"type\": \"object\","]
22343#[doc = "          \"required\": ["]
22344#[doc = "            \"account_ids\","]
22345#[doc = "            \"changes_type\""]
22346#[doc = "          ],"]
22347#[doc = "          \"properties\": {"]
22348#[doc = "            \"account_ids\": {"]
22349#[doc = "              \"type\": \"array\","]
22350#[doc = "              \"items\": {"]
22351#[doc = "                \"$ref\": \"#/components/schemas/AccountId\""]
22352#[doc = "              }"]
22353#[doc = "            },"]
22354#[doc = "            \"changes_type\": {"]
22355#[doc = "              \"type\": \"string\","]
22356#[doc = "              \"enum\": ["]
22357#[doc = "                \"all_gas_key_changes\""]
22358#[doc = "              ]"]
22359#[doc = "            }"]
22360#[doc = "          }"]
22361#[doc = "        }"]
22362#[doc = "      ]"]
22363#[doc = "    },"]
22364#[doc = "    {"]
22365#[doc = "      \"title\": \"contract_code_changes_by_sync_checkpoint\","]
22366#[doc = "      \"allOf\": ["]
22367#[doc = "        {"]
22368#[doc = "          \"type\": \"object\","]
22369#[doc = "          \"required\": ["]
22370#[doc = "            \"sync_checkpoint\""]
22371#[doc = "          ],"]
22372#[doc = "          \"properties\": {"]
22373#[doc = "            \"sync_checkpoint\": {"]
22374#[doc = "              \"$ref\": \"#/components/schemas/SyncCheckpoint\""]
22375#[doc = "            }"]
22376#[doc = "          }"]
22377#[doc = "        },"]
22378#[doc = "        {"]
22379#[doc = "          \"type\": \"object\","]
22380#[doc = "          \"required\": ["]
22381#[doc = "            \"account_ids\","]
22382#[doc = "            \"changes_type\""]
22383#[doc = "          ],"]
22384#[doc = "          \"properties\": {"]
22385#[doc = "            \"account_ids\": {"]
22386#[doc = "              \"type\": \"array\","]
22387#[doc = "              \"items\": {"]
22388#[doc = "                \"$ref\": \"#/components/schemas/AccountId\""]
22389#[doc = "              }"]
22390#[doc = "            },"]
22391#[doc = "            \"changes_type\": {"]
22392#[doc = "              \"type\": \"string\","]
22393#[doc = "              \"enum\": ["]
22394#[doc = "                \"contract_code_changes\""]
22395#[doc = "              ]"]
22396#[doc = "            }"]
22397#[doc = "          }"]
22398#[doc = "        }"]
22399#[doc = "      ]"]
22400#[doc = "    },"]
22401#[doc = "    {"]
22402#[doc = "      \"title\": \"data_changes_by_sync_checkpoint\","]
22403#[doc = "      \"allOf\": ["]
22404#[doc = "        {"]
22405#[doc = "          \"type\": \"object\","]
22406#[doc = "          \"required\": ["]
22407#[doc = "            \"sync_checkpoint\""]
22408#[doc = "          ],"]
22409#[doc = "          \"properties\": {"]
22410#[doc = "            \"sync_checkpoint\": {"]
22411#[doc = "              \"$ref\": \"#/components/schemas/SyncCheckpoint\""]
22412#[doc = "            }"]
22413#[doc = "          }"]
22414#[doc = "        },"]
22415#[doc = "        {"]
22416#[doc = "          \"type\": \"object\","]
22417#[doc = "          \"required\": ["]
22418#[doc = "            \"account_ids\","]
22419#[doc = "            \"changes_type\","]
22420#[doc = "            \"key_prefix_base64\""]
22421#[doc = "          ],"]
22422#[doc = "          \"properties\": {"]
22423#[doc = "            \"account_ids\": {"]
22424#[doc = "              \"type\": \"array\","]
22425#[doc = "              \"items\": {"]
22426#[doc = "                \"$ref\": \"#/components/schemas/AccountId\""]
22427#[doc = "              }"]
22428#[doc = "            },"]
22429#[doc = "            \"changes_type\": {"]
22430#[doc = "              \"type\": \"string\","]
22431#[doc = "              \"enum\": ["]
22432#[doc = "                \"data_changes\""]
22433#[doc = "              ]"]
22434#[doc = "            },"]
22435#[doc = "            \"key_prefix_base64\": {"]
22436#[doc = "              \"$ref\": \"#/components/schemas/StoreKey\""]
22437#[doc = "            }"]
22438#[doc = "          }"]
22439#[doc = "        }"]
22440#[doc = "      ]"]
22441#[doc = "    }"]
22442#[doc = "  ]"]
22443#[doc = "}"]
22444#[doc = r" ```"]
22445#[doc = r" </details>"]
22446#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
22447#[serde(untagged)]
22448pub enum RpcStateChangesInBlockByTypeRequest {
22449    AccountChangesByBlockId {
22450        account_ids: ::std::vec::Vec<AccountId>,
22451        block_id: BlockId,
22452        changes_type: AccountChangesByBlockIdChangesType,
22453    },
22454    SingleAccessKeyChangesByBlockId {
22455        block_id: BlockId,
22456        changes_type: SingleAccessKeyChangesByBlockIdChangesType,
22457        keys: ::std::vec::Vec<AccountWithPublicKey>,
22458    },
22459    SingleGasKeyChangesByBlockId {
22460        block_id: BlockId,
22461        changes_type: SingleGasKeyChangesByBlockIdChangesType,
22462        keys: ::std::vec::Vec<AccountWithPublicKey>,
22463    },
22464    AllAccessKeyChangesByBlockId {
22465        account_ids: ::std::vec::Vec<AccountId>,
22466        block_id: BlockId,
22467        changes_type: AllAccessKeyChangesByBlockIdChangesType,
22468    },
22469    AllGasKeyChangesByBlockId {
22470        account_ids: ::std::vec::Vec<AccountId>,
22471        block_id: BlockId,
22472        changes_type: AllGasKeyChangesByBlockIdChangesType,
22473    },
22474    ContractCodeChangesByBlockId {
22475        account_ids: ::std::vec::Vec<AccountId>,
22476        block_id: BlockId,
22477        changes_type: ContractCodeChangesByBlockIdChangesType,
22478    },
22479    DataChangesByBlockId {
22480        account_ids: ::std::vec::Vec<AccountId>,
22481        block_id: BlockId,
22482        changes_type: DataChangesByBlockIdChangesType,
22483        key_prefix_base64: StoreKey,
22484    },
22485    AccountChangesByFinality {
22486        account_ids: ::std::vec::Vec<AccountId>,
22487        changes_type: AccountChangesByFinalityChangesType,
22488        finality: Finality,
22489    },
22490    SingleAccessKeyChangesByFinality {
22491        changes_type: SingleAccessKeyChangesByFinalityChangesType,
22492        finality: Finality,
22493        keys: ::std::vec::Vec<AccountWithPublicKey>,
22494    },
22495    SingleGasKeyChangesByFinality {
22496        changes_type: SingleGasKeyChangesByFinalityChangesType,
22497        finality: Finality,
22498        keys: ::std::vec::Vec<AccountWithPublicKey>,
22499    },
22500    AllAccessKeyChangesByFinality {
22501        account_ids: ::std::vec::Vec<AccountId>,
22502        changes_type: AllAccessKeyChangesByFinalityChangesType,
22503        finality: Finality,
22504    },
22505    AllGasKeyChangesByFinality {
22506        account_ids: ::std::vec::Vec<AccountId>,
22507        changes_type: AllGasKeyChangesByFinalityChangesType,
22508        finality: Finality,
22509    },
22510    ContractCodeChangesByFinality {
22511        account_ids: ::std::vec::Vec<AccountId>,
22512        changes_type: ContractCodeChangesByFinalityChangesType,
22513        finality: Finality,
22514    },
22515    DataChangesByFinality {
22516        account_ids: ::std::vec::Vec<AccountId>,
22517        changes_type: DataChangesByFinalityChangesType,
22518        finality: Finality,
22519        key_prefix_base64: StoreKey,
22520    },
22521    AccountChangesBySyncCheckpoint {
22522        account_ids: ::std::vec::Vec<AccountId>,
22523        changes_type: AccountChangesBySyncCheckpointChangesType,
22524        sync_checkpoint: SyncCheckpoint,
22525    },
22526    SingleAccessKeyChangesBySyncCheckpoint {
22527        changes_type: SingleAccessKeyChangesBySyncCheckpointChangesType,
22528        keys: ::std::vec::Vec<AccountWithPublicKey>,
22529        sync_checkpoint: SyncCheckpoint,
22530    },
22531    SingleGasKeyChangesBySyncCheckpoint {
22532        changes_type: SingleGasKeyChangesBySyncCheckpointChangesType,
22533        keys: ::std::vec::Vec<AccountWithPublicKey>,
22534        sync_checkpoint: SyncCheckpoint,
22535    },
22536    AllAccessKeyChangesBySyncCheckpoint {
22537        account_ids: ::std::vec::Vec<AccountId>,
22538        changes_type: AllAccessKeyChangesBySyncCheckpointChangesType,
22539        sync_checkpoint: SyncCheckpoint,
22540    },
22541    AllGasKeyChangesBySyncCheckpoint {
22542        account_ids: ::std::vec::Vec<AccountId>,
22543        changes_type: AllGasKeyChangesBySyncCheckpointChangesType,
22544        sync_checkpoint: SyncCheckpoint,
22545    },
22546    ContractCodeChangesBySyncCheckpoint {
22547        account_ids: ::std::vec::Vec<AccountId>,
22548        changes_type: ContractCodeChangesBySyncCheckpointChangesType,
22549        sync_checkpoint: SyncCheckpoint,
22550    },
22551    DataChangesBySyncCheckpoint {
22552        account_ids: ::std::vec::Vec<AccountId>,
22553        changes_type: DataChangesBySyncCheckpointChangesType,
22554        key_prefix_base64: StoreKey,
22555        sync_checkpoint: SyncCheckpoint,
22556    },
22557}
22558impl ::std::convert::From<&Self> for RpcStateChangesInBlockByTypeRequest {
22559    fn from(value: &RpcStateChangesInBlockByTypeRequest) -> Self {
22560        value.clone()
22561    }
22562}
22563#[doc = "`RpcStateChangesInBlockByTypeResponse`"]
22564#[doc = r""]
22565#[doc = r" <details><summary>JSON schema</summary>"]
22566#[doc = r""]
22567#[doc = r" ```json"]
22568#[doc = "{"]
22569#[doc = "  \"type\": \"object\","]
22570#[doc = "  \"required\": ["]
22571#[doc = "    \"block_hash\","]
22572#[doc = "    \"changes\""]
22573#[doc = "  ],"]
22574#[doc = "  \"properties\": {"]
22575#[doc = "    \"block_hash\": {"]
22576#[doc = "      \"$ref\": \"#/components/schemas/CryptoHash\""]
22577#[doc = "    },"]
22578#[doc = "    \"changes\": {"]
22579#[doc = "      \"type\": \"array\","]
22580#[doc = "      \"items\": {"]
22581#[doc = "        \"$ref\": \"#/components/schemas/StateChangeKindView\""]
22582#[doc = "      }"]
22583#[doc = "    }"]
22584#[doc = "  }"]
22585#[doc = "}"]
22586#[doc = r" ```"]
22587#[doc = r" </details>"]
22588#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
22589pub struct RpcStateChangesInBlockByTypeResponse {
22590    pub block_hash: CryptoHash,
22591    pub changes: ::std::vec::Vec<StateChangeKindView>,
22592}
22593impl ::std::convert::From<&RpcStateChangesInBlockByTypeResponse>
22594    for RpcStateChangesInBlockByTypeResponse
22595{
22596    fn from(value: &RpcStateChangesInBlockByTypeResponse) -> Self {
22597        value.clone()
22598    }
22599}
22600#[doc = "`RpcStateChangesInBlockRequest`"]
22601#[doc = r""]
22602#[doc = r" <details><summary>JSON schema</summary>"]
22603#[doc = r""]
22604#[doc = r" ```json"]
22605#[doc = "{"]
22606#[doc = "  \"title\": \"RpcStateChangesInBlockRequest\","]
22607#[doc = "  \"type\": \"object\","]
22608#[doc = "  \"oneOf\": ["]
22609#[doc = "    {"]
22610#[doc = "      \"type\": \"object\","]
22611#[doc = "      \"required\": ["]
22612#[doc = "        \"block_id\""]
22613#[doc = "      ],"]
22614#[doc = "      \"properties\": {"]
22615#[doc = "        \"block_id\": {"]
22616#[doc = "          \"$ref\": \"#/components/schemas/BlockId\""]
22617#[doc = "        }"]
22618#[doc = "      }"]
22619#[doc = "    },"]
22620#[doc = "    {"]
22621#[doc = "      \"type\": \"object\","]
22622#[doc = "      \"required\": ["]
22623#[doc = "        \"finality\""]
22624#[doc = "      ],"]
22625#[doc = "      \"properties\": {"]
22626#[doc = "        \"finality\": {"]
22627#[doc = "          \"$ref\": \"#/components/schemas/Finality\""]
22628#[doc = "        }"]
22629#[doc = "      }"]
22630#[doc = "    },"]
22631#[doc = "    {"]
22632#[doc = "      \"type\": \"object\","]
22633#[doc = "      \"required\": ["]
22634#[doc = "        \"sync_checkpoint\""]
22635#[doc = "      ],"]
22636#[doc = "      \"properties\": {"]
22637#[doc = "        \"sync_checkpoint\": {"]
22638#[doc = "          \"$ref\": \"#/components/schemas/SyncCheckpoint\""]
22639#[doc = "        }"]
22640#[doc = "      }"]
22641#[doc = "    }"]
22642#[doc = "  ]"]
22643#[doc = "}"]
22644#[doc = r" ```"]
22645#[doc = r" </details>"]
22646#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
22647pub enum RpcStateChangesInBlockRequest {
22648    #[serde(rename = "block_id")]
22649    BlockId(BlockId),
22650    #[serde(rename = "finality")]
22651    Finality(Finality),
22652    #[serde(rename = "sync_checkpoint")]
22653    SyncCheckpoint(SyncCheckpoint),
22654}
22655impl ::std::convert::From<&Self> for RpcStateChangesInBlockRequest {
22656    fn from(value: &RpcStateChangesInBlockRequest) -> Self {
22657        value.clone()
22658    }
22659}
22660impl ::std::convert::From<BlockId> for RpcStateChangesInBlockRequest {
22661    fn from(value: BlockId) -> Self {
22662        Self::BlockId(value)
22663    }
22664}
22665impl ::std::convert::From<Finality> for RpcStateChangesInBlockRequest {
22666    fn from(value: Finality) -> Self {
22667        Self::Finality(value)
22668    }
22669}
22670impl ::std::convert::From<SyncCheckpoint> for RpcStateChangesInBlockRequest {
22671    fn from(value: SyncCheckpoint) -> Self {
22672        Self::SyncCheckpoint(value)
22673    }
22674}
22675#[doc = "`RpcStateChangesInBlockResponse`"]
22676#[doc = r""]
22677#[doc = r" <details><summary>JSON schema</summary>"]
22678#[doc = r""]
22679#[doc = r" ```json"]
22680#[doc = "{"]
22681#[doc = "  \"type\": \"object\","]
22682#[doc = "  \"required\": ["]
22683#[doc = "    \"block_hash\","]
22684#[doc = "    \"changes\""]
22685#[doc = "  ],"]
22686#[doc = "  \"properties\": {"]
22687#[doc = "    \"block_hash\": {"]
22688#[doc = "      \"$ref\": \"#/components/schemas/CryptoHash\""]
22689#[doc = "    },"]
22690#[doc = "    \"changes\": {"]
22691#[doc = "      \"type\": \"array\","]
22692#[doc = "      \"items\": {"]
22693#[doc = "        \"$ref\": \"#/components/schemas/StateChangeWithCauseView\""]
22694#[doc = "      }"]
22695#[doc = "    }"]
22696#[doc = "  }"]
22697#[doc = "}"]
22698#[doc = r" ```"]
22699#[doc = r" </details>"]
22700#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
22701pub struct RpcStateChangesInBlockResponse {
22702    pub block_hash: CryptoHash,
22703    pub changes: ::std::vec::Vec<StateChangeWithCauseView>,
22704}
22705impl ::std::convert::From<&RpcStateChangesInBlockResponse> for RpcStateChangesInBlockResponse {
22706    fn from(value: &RpcStateChangesInBlockResponse) -> Self {
22707        value.clone()
22708    }
22709}
22710#[doc = "`RpcStatusRequest`"]
22711#[doc = r""]
22712#[doc = r" <details><summary>JSON schema</summary>"]
22713#[doc = r""]
22714#[doc = r" ```json"]
22715#[doc = "{"]
22716#[doc = "  \"title\": \"RpcStatusRequest\","]
22717#[doc = "  \"type\": \"null\""]
22718#[doc = "}"]
22719#[doc = r" ```"]
22720#[doc = r" </details>"]
22721#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
22722#[serde(transparent)]
22723pub struct RpcStatusRequest(pub ());
22724impl ::std::ops::Deref for RpcStatusRequest {
22725    type Target = ();
22726    fn deref(&self) -> &() {
22727        &self.0
22728    }
22729}
22730impl ::std::convert::From<RpcStatusRequest> for () {
22731    fn from(value: RpcStatusRequest) -> Self {
22732        value.0
22733    }
22734}
22735impl ::std::convert::From<&RpcStatusRequest> for RpcStatusRequest {
22736    fn from(value: &RpcStatusRequest) -> Self {
22737        value.clone()
22738    }
22739}
22740impl ::std::convert::From<()> for RpcStatusRequest {
22741    fn from(value: ()) -> Self {
22742        Self(value)
22743    }
22744}
22745#[doc = "`RpcStatusResponse`"]
22746#[doc = r""]
22747#[doc = r" <details><summary>JSON schema</summary>"]
22748#[doc = r""]
22749#[doc = r" ```json"]
22750#[doc = "{"]
22751#[doc = "  \"type\": \"object\","]
22752#[doc = "  \"required\": ["]
22753#[doc = "    \"chain_id\","]
22754#[doc = "    \"genesis_hash\","]
22755#[doc = "    \"latest_protocol_version\","]
22756#[doc = "    \"node_public_key\","]
22757#[doc = "    \"protocol_version\","]
22758#[doc = "    \"sync_info\","]
22759#[doc = "    \"uptime_sec\","]
22760#[doc = "    \"validators\","]
22761#[doc = "    \"version\""]
22762#[doc = "  ],"]
22763#[doc = "  \"properties\": {"]
22764#[doc = "    \"chain_id\": {"]
22765#[doc = "      \"description\": \"Unique chain id.\","]
22766#[doc = "      \"type\": \"string\""]
22767#[doc = "    },"]
22768#[doc = "    \"detailed_debug_status\": {"]
22769#[doc = "      \"description\": \"Information about last blocks, network, epoch and chain & chunk info.\","]
22770#[doc = "      \"anyOf\": ["]
22771#[doc = "        {"]
22772#[doc = "          \"$ref\": \"#/components/schemas/DetailedDebugStatus\""]
22773#[doc = "        },"]
22774#[doc = "        {"]
22775#[doc = "          \"type\": \"null\""]
22776#[doc = "        }"]
22777#[doc = "      ]"]
22778#[doc = "    },"]
22779#[doc = "    \"genesis_hash\": {"]
22780#[doc = "      \"description\": \"Genesis hash of the chain.\","]
22781#[doc = "      \"allOf\": ["]
22782#[doc = "        {"]
22783#[doc = "          \"$ref\": \"#/components/schemas/CryptoHash\""]
22784#[doc = "        }"]
22785#[doc = "      ]"]
22786#[doc = "    },"]
22787#[doc = "    \"latest_protocol_version\": {"]
22788#[doc = "      \"description\": \"Latest protocol version that this client supports.\","]
22789#[doc = "      \"type\": \"integer\","]
22790#[doc = "      \"format\": \"uint32\","]
22791#[doc = "      \"minimum\": 0.0"]
22792#[doc = "    },"]
22793#[doc = "    \"node_key\": {"]
22794#[doc = "      \"description\": \"Deprecated; same as `validator_public_key` which you should use instead.\","]
22795#[doc = "      \"anyOf\": ["]
22796#[doc = "        {"]
22797#[doc = "          \"$ref\": \"#/components/schemas/PublicKey\""]
22798#[doc = "        },"]
22799#[doc = "        {"]
22800#[doc = "          \"type\": \"null\""]
22801#[doc = "        }"]
22802#[doc = "      ]"]
22803#[doc = "    },"]
22804#[doc = "    \"node_public_key\": {"]
22805#[doc = "      \"description\": \"Public key of the node.\","]
22806#[doc = "      \"allOf\": ["]
22807#[doc = "        {"]
22808#[doc = "          \"$ref\": \"#/components/schemas/PublicKey\""]
22809#[doc = "        }"]
22810#[doc = "      ]"]
22811#[doc = "    },"]
22812#[doc = "    \"protocol_version\": {"]
22813#[doc = "      \"description\": \"Currently active protocol version.\","]
22814#[doc = "      \"type\": \"integer\","]
22815#[doc = "      \"format\": \"uint32\","]
22816#[doc = "      \"minimum\": 0.0"]
22817#[doc = "    },"]
22818#[doc = "    \"rpc_addr\": {"]
22819#[doc = "      \"description\": \"Address for RPC server.  None if node doesn't have RPC endpoint enabled.\","]
22820#[doc = "      \"type\": ["]
22821#[doc = "        \"string\","]
22822#[doc = "        \"null\""]
22823#[doc = "      ]"]
22824#[doc = "    },"]
22825#[doc = "    \"sync_info\": {"]
22826#[doc = "      \"description\": \"Sync status of the node.\","]
22827#[doc = "      \"allOf\": ["]
22828#[doc = "        {"]
22829#[doc = "          \"$ref\": \"#/components/schemas/StatusSyncInfo\""]
22830#[doc = "        }"]
22831#[doc = "      ]"]
22832#[doc = "    },"]
22833#[doc = "    \"uptime_sec\": {"]
22834#[doc = "      \"description\": \"Uptime of the node.\","]
22835#[doc = "      \"type\": \"integer\","]
22836#[doc = "      \"format\": \"int64\""]
22837#[doc = "    },"]
22838#[doc = "    \"validator_account_id\": {"]
22839#[doc = "      \"description\": \"Validator id of the node\","]
22840#[doc = "      \"anyOf\": ["]
22841#[doc = "        {"]
22842#[doc = "          \"$ref\": \"#/components/schemas/AccountId\""]
22843#[doc = "        },"]
22844#[doc = "        {"]
22845#[doc = "          \"type\": \"null\""]
22846#[doc = "        }"]
22847#[doc = "      ]"]
22848#[doc = "    },"]
22849#[doc = "    \"validator_public_key\": {"]
22850#[doc = "      \"description\": \"Public key of the validator.\","]
22851#[doc = "      \"anyOf\": ["]
22852#[doc = "        {"]
22853#[doc = "          \"$ref\": \"#/components/schemas/PublicKey\""]
22854#[doc = "        },"]
22855#[doc = "        {"]
22856#[doc = "          \"type\": \"null\""]
22857#[doc = "        }"]
22858#[doc = "      ]"]
22859#[doc = "    },"]
22860#[doc = "    \"validators\": {"]
22861#[doc = "      \"description\": \"Current epoch validators.\","]
22862#[doc = "      \"type\": \"array\","]
22863#[doc = "      \"items\": {"]
22864#[doc = "        \"$ref\": \"#/components/schemas/ValidatorInfo\""]
22865#[doc = "      }"]
22866#[doc = "    },"]
22867#[doc = "    \"version\": {"]
22868#[doc = "      \"description\": \"Binary version.\","]
22869#[doc = "      \"allOf\": ["]
22870#[doc = "        {"]
22871#[doc = "          \"$ref\": \"#/components/schemas/Version\""]
22872#[doc = "        }"]
22873#[doc = "      ]"]
22874#[doc = "    }"]
22875#[doc = "  }"]
22876#[doc = "}"]
22877#[doc = r" ```"]
22878#[doc = r" </details>"]
22879#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
22880pub struct RpcStatusResponse {
22881    #[doc = "Unique chain id."]
22882    pub chain_id: ::std::string::String,
22883    #[doc = "Information about last blocks, network, epoch and chain & chunk info."]
22884    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
22885    pub detailed_debug_status: ::std::option::Option<DetailedDebugStatus>,
22886    #[doc = "Genesis hash of the chain."]
22887    pub genesis_hash: CryptoHash,
22888    #[doc = "Latest protocol version that this client supports."]
22889    pub latest_protocol_version: u32,
22890    #[doc = "Deprecated; same as `validator_public_key` which you should use instead."]
22891    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
22892    pub node_key: ::std::option::Option<PublicKey>,
22893    #[doc = "Public key of the node."]
22894    pub node_public_key: PublicKey,
22895    #[doc = "Currently active protocol version."]
22896    pub protocol_version: u32,
22897    #[doc = "Address for RPC server.  None if node doesn't have RPC endpoint enabled."]
22898    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
22899    pub rpc_addr: ::std::option::Option<::std::string::String>,
22900    #[doc = "Sync status of the node."]
22901    pub sync_info: StatusSyncInfo,
22902    #[doc = "Uptime of the node."]
22903    pub uptime_sec: i64,
22904    #[doc = "Validator id of the node"]
22905    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
22906    pub validator_account_id: ::std::option::Option<AccountId>,
22907    #[doc = "Public key of the validator."]
22908    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
22909    pub validator_public_key: ::std::option::Option<PublicKey>,
22910    #[doc = "Current epoch validators."]
22911    pub validators: ::std::vec::Vec<ValidatorInfo>,
22912    #[doc = "Binary version."]
22913    pub version: Version,
22914}
22915impl ::std::convert::From<&RpcStatusResponse> for RpcStatusResponse {
22916    fn from(value: &RpcStatusResponse) -> Self {
22917        value.clone()
22918    }
22919}
22920#[doc = "`RpcTransactionResponse`"]
22921#[doc = r""]
22922#[doc = r" <details><summary>JSON schema</summary>"]
22923#[doc = r""]
22924#[doc = r" ```json"]
22925#[doc = "{"]
22926#[doc = "  \"type\": \"object\","]
22927#[doc = "  \"anyOf\": ["]
22928#[doc = "    {"]
22929#[doc = "      \"$ref\": \"#/components/schemas/FinalExecutionOutcomeWithReceiptView\""]
22930#[doc = "    },"]
22931#[doc = "    {"]
22932#[doc = "      \"$ref\": \"#/components/schemas/FinalExecutionOutcomeView\""]
22933#[doc = "    }"]
22934#[doc = "  ],"]
22935#[doc = "  \"required\": ["]
22936#[doc = "    \"final_execution_status\""]
22937#[doc = "  ],"]
22938#[doc = "  \"properties\": {"]
22939#[doc = "    \"final_execution_status\": {"]
22940#[doc = "      \"$ref\": \"#/components/schemas/TxExecutionStatus\""]
22941#[doc = "    }"]
22942#[doc = "  }"]
22943#[doc = "}"]
22944#[doc = r" ```"]
22945#[doc = r" </details>"]
22946#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
22947#[serde(untagged)]
22948pub enum RpcTransactionResponse {
22949    Variant0 {
22950        final_execution_status: TxExecutionStatus,
22951        #[doc = "Receipts generated from the transaction"]
22952        receipts: ::std::vec::Vec<ReceiptView>,
22953        #[doc = "The execution outcome of receipts."]
22954        receipts_outcome: ::std::vec::Vec<ExecutionOutcomeWithIdView>,
22955        #[doc = "Execution status defined by chain.rs:get_final_transaction_result\nFinalExecutionStatus::NotStarted - the tx is not converted to the receipt yet\nFinalExecutionStatus::Started - we have at least 1 receipt, but the first leaf receipt_id (using dfs) hasn't finished the execution\nFinalExecutionStatus::Failure - the result of the first leaf receipt_id\nFinalExecutionStatus::SuccessValue - the result of the first leaf receipt_id"]
22956        status: FinalExecutionStatus,
22957        #[doc = "Signed Transaction"]
22958        transaction: SignedTransactionView,
22959        #[doc = "The execution outcome of the signed transaction."]
22960        transaction_outcome: ExecutionOutcomeWithIdView,
22961    },
22962    Variant1 {
22963        final_execution_status: TxExecutionStatus,
22964        #[doc = "The execution outcome of receipts."]
22965        receipts_outcome: ::std::vec::Vec<ExecutionOutcomeWithIdView>,
22966        #[doc = "Execution status defined by chain.rs:get_final_transaction_result\nFinalExecutionStatus::NotStarted - the tx is not converted to the receipt yet\nFinalExecutionStatus::Started - we have at least 1 receipt, but the first leaf receipt_id (using dfs) hasn't finished the execution\nFinalExecutionStatus::Failure - the result of the first leaf receipt_id\nFinalExecutionStatus::SuccessValue - the result of the first leaf receipt_id"]
22967        status: FinalExecutionStatus,
22968        #[doc = "Signed Transaction"]
22969        transaction: SignedTransactionView,
22970        #[doc = "The execution outcome of the signed transaction."]
22971        transaction_outcome: ExecutionOutcomeWithIdView,
22972    },
22973}
22974impl ::std::convert::From<&Self> for RpcTransactionResponse {
22975    fn from(value: &RpcTransactionResponse) -> Self {
22976        value.clone()
22977    }
22978}
22979#[doc = "`RpcTransactionStatusRequest`"]
22980#[doc = r""]
22981#[doc = r" <details><summary>JSON schema</summary>"]
22982#[doc = r""]
22983#[doc = r" ```json"]
22984#[doc = "{"]
22985#[doc = "  \"title\": \"RpcTransactionStatusRequest\","]
22986#[doc = "  \"type\": \"object\","]
22987#[doc = "  \"anyOf\": ["]
22988#[doc = "    {"]
22989#[doc = "      \"type\": \"object\","]
22990#[doc = "      \"required\": ["]
22991#[doc = "        \"signed_tx_base64\""]
22992#[doc = "      ],"]
22993#[doc = "      \"properties\": {"]
22994#[doc = "        \"signed_tx_base64\": {"]
22995#[doc = "          \"$ref\": \"#/components/schemas/SignedTransaction\""]
22996#[doc = "        }"]
22997#[doc = "      }"]
22998#[doc = "    },"]
22999#[doc = "    {"]
23000#[doc = "      \"type\": \"object\","]
23001#[doc = "      \"required\": ["]
23002#[doc = "        \"sender_account_id\","]
23003#[doc = "        \"tx_hash\""]
23004#[doc = "      ],"]
23005#[doc = "      \"properties\": {"]
23006#[doc = "        \"sender_account_id\": {"]
23007#[doc = "          \"$ref\": \"#/components/schemas/AccountId\""]
23008#[doc = "        },"]
23009#[doc = "        \"tx_hash\": {"]
23010#[doc = "          \"$ref\": \"#/components/schemas/CryptoHash\""]
23011#[doc = "        }"]
23012#[doc = "      }"]
23013#[doc = "    }"]
23014#[doc = "  ],"]
23015#[doc = "  \"properties\": {"]
23016#[doc = "    \"wait_until\": {"]
23017#[doc = "      \"default\": \"EXECUTED_OPTIMISTIC\","]
23018#[doc = "      \"allOf\": ["]
23019#[doc = "        {"]
23020#[doc = "          \"$ref\": \"#/components/schemas/TxExecutionStatus\""]
23021#[doc = "        }"]
23022#[doc = "      ]"]
23023#[doc = "    }"]
23024#[doc = "  }"]
23025#[doc = "}"]
23026#[doc = r" ```"]
23027#[doc = r" </details>"]
23028#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
23029#[serde(untagged)]
23030pub enum RpcTransactionStatusRequest {
23031    Variant0 {
23032        signed_tx_base64: SignedTransaction,
23033        #[serde(default = "defaults::rpc_transaction_status_request_variant0_wait_until")]
23034        wait_until: TxExecutionStatus,
23035    },
23036    Variant1 {
23037        sender_account_id: AccountId,
23038        tx_hash: CryptoHash,
23039        #[serde(default = "defaults::rpc_transaction_status_request_variant1_wait_until")]
23040        wait_until: TxExecutionStatus,
23041    },
23042}
23043impl ::std::convert::From<&Self> for RpcTransactionStatusRequest {
23044    fn from(value: &RpcTransactionStatusRequest) -> Self {
23045        value.clone()
23046    }
23047}
23048#[doc = "`RpcValidatorRequest`"]
23049#[doc = r""]
23050#[doc = r" <details><summary>JSON schema</summary>"]
23051#[doc = r""]
23052#[doc = r" ```json"]
23053#[doc = "{"]
23054#[doc = "  \"title\": \"RpcValidatorRequest\","]
23055#[doc = "  \"type\": \"object\","]
23056#[doc = "  \"oneOf\": ["]
23057#[doc = "    {"]
23058#[doc = "      \"type\": \"string\","]
23059#[doc = "      \"enum\": ["]
23060#[doc = "        \"latest\""]
23061#[doc = "      ]"]
23062#[doc = "    },"]
23063#[doc = "    {"]
23064#[doc = "      \"type\": \"object\","]
23065#[doc = "      \"required\": ["]
23066#[doc = "        \"epoch_id\""]
23067#[doc = "      ],"]
23068#[doc = "      \"properties\": {"]
23069#[doc = "        \"epoch_id\": {"]
23070#[doc = "          \"$ref\": \"#/components/schemas/EpochId\""]
23071#[doc = "        }"]
23072#[doc = "      }"]
23073#[doc = "    },"]
23074#[doc = "    {"]
23075#[doc = "      \"type\": \"object\","]
23076#[doc = "      \"required\": ["]
23077#[doc = "        \"block_id\""]
23078#[doc = "      ],"]
23079#[doc = "      \"properties\": {"]
23080#[doc = "        \"block_id\": {"]
23081#[doc = "          \"$ref\": \"#/components/schemas/BlockId\""]
23082#[doc = "        }"]
23083#[doc = "      }"]
23084#[doc = "    }"]
23085#[doc = "  ]"]
23086#[doc = "}"]
23087#[doc = r" ```"]
23088#[doc = r" </details>"]
23089#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
23090pub enum RpcValidatorRequest {
23091    #[serde(rename = "latest")]
23092    Latest,
23093    #[serde(rename = "epoch_id")]
23094    EpochId(EpochId),
23095    #[serde(rename = "block_id")]
23096    BlockId(BlockId),
23097}
23098impl ::std::convert::From<&Self> for RpcValidatorRequest {
23099    fn from(value: &RpcValidatorRequest) -> Self {
23100        value.clone()
23101    }
23102}
23103impl ::std::convert::From<EpochId> for RpcValidatorRequest {
23104    fn from(value: EpochId) -> Self {
23105        Self::EpochId(value)
23106    }
23107}
23108impl ::std::convert::From<BlockId> for RpcValidatorRequest {
23109    fn from(value: BlockId) -> Self {
23110        Self::BlockId(value)
23111    }
23112}
23113#[doc = "Information about this epoch validators and next epoch validators"]
23114#[doc = r""]
23115#[doc = r" <details><summary>JSON schema</summary>"]
23116#[doc = r""]
23117#[doc = r" ```json"]
23118#[doc = "{"]
23119#[doc = "  \"description\": \"Information about this epoch validators and next epoch validators\","]
23120#[doc = "  \"type\": \"object\","]
23121#[doc = "  \"required\": ["]
23122#[doc = "    \"current_fishermen\","]
23123#[doc = "    \"current_proposals\","]
23124#[doc = "    \"current_validators\","]
23125#[doc = "    \"epoch_height\","]
23126#[doc = "    \"epoch_start_height\","]
23127#[doc = "    \"next_fishermen\","]
23128#[doc = "    \"next_validators\","]
23129#[doc = "    \"prev_epoch_kickout\""]
23130#[doc = "  ],"]
23131#[doc = "  \"properties\": {"]
23132#[doc = "    \"current_fishermen\": {"]
23133#[doc = "      \"description\": \"Fishermen for the current epoch\","]
23134#[doc = "      \"type\": \"array\","]
23135#[doc = "      \"items\": {"]
23136#[doc = "        \"$ref\": \"#/components/schemas/ValidatorStakeView\""]
23137#[doc = "      }"]
23138#[doc = "    },"]
23139#[doc = "    \"current_proposals\": {"]
23140#[doc = "      \"description\": \"Proposals in the current epoch\","]
23141#[doc = "      \"type\": \"array\","]
23142#[doc = "      \"items\": {"]
23143#[doc = "        \"$ref\": \"#/components/schemas/ValidatorStakeView\""]
23144#[doc = "      }"]
23145#[doc = "    },"]
23146#[doc = "    \"current_validators\": {"]
23147#[doc = "      \"description\": \"Validators for the current epoch\","]
23148#[doc = "      \"type\": \"array\","]
23149#[doc = "      \"items\": {"]
23150#[doc = "        \"$ref\": \"#/components/schemas/CurrentEpochValidatorInfo\""]
23151#[doc = "      }"]
23152#[doc = "    },"]
23153#[doc = "    \"epoch_height\": {"]
23154#[doc = "      \"description\": \"Epoch height\","]
23155#[doc = "      \"type\": \"integer\","]
23156#[doc = "      \"format\": \"uint64\","]
23157#[doc = "      \"minimum\": 0.0"]
23158#[doc = "    },"]
23159#[doc = "    \"epoch_start_height\": {"]
23160#[doc = "      \"description\": \"Epoch start block height\","]
23161#[doc = "      \"type\": \"integer\","]
23162#[doc = "      \"format\": \"uint64\","]
23163#[doc = "      \"minimum\": 0.0"]
23164#[doc = "    },"]
23165#[doc = "    \"next_fishermen\": {"]
23166#[doc = "      \"description\": \"Fishermen for the next epoch\","]
23167#[doc = "      \"type\": \"array\","]
23168#[doc = "      \"items\": {"]
23169#[doc = "        \"$ref\": \"#/components/schemas/ValidatorStakeView\""]
23170#[doc = "      }"]
23171#[doc = "    },"]
23172#[doc = "    \"next_validators\": {"]
23173#[doc = "      \"description\": \"Validators for the next epoch\","]
23174#[doc = "      \"type\": \"array\","]
23175#[doc = "      \"items\": {"]
23176#[doc = "        \"$ref\": \"#/components/schemas/NextEpochValidatorInfo\""]
23177#[doc = "      }"]
23178#[doc = "    },"]
23179#[doc = "    \"prev_epoch_kickout\": {"]
23180#[doc = "      \"description\": \"Kickout in the previous epoch\","]
23181#[doc = "      \"type\": \"array\","]
23182#[doc = "      \"items\": {"]
23183#[doc = "        \"$ref\": \"#/components/schemas/ValidatorKickoutView\""]
23184#[doc = "      }"]
23185#[doc = "    }"]
23186#[doc = "  }"]
23187#[doc = "}"]
23188#[doc = r" ```"]
23189#[doc = r" </details>"]
23190#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
23191pub struct RpcValidatorResponse {
23192    #[doc = "Fishermen for the current epoch"]
23193    pub current_fishermen: ::std::vec::Vec<ValidatorStakeView>,
23194    #[doc = "Proposals in the current epoch"]
23195    pub current_proposals: ::std::vec::Vec<ValidatorStakeView>,
23196    #[doc = "Validators for the current epoch"]
23197    pub current_validators: ::std::vec::Vec<CurrentEpochValidatorInfo>,
23198    #[doc = "Epoch height"]
23199    pub epoch_height: u64,
23200    #[doc = "Epoch start block height"]
23201    pub epoch_start_height: u64,
23202    #[doc = "Fishermen for the next epoch"]
23203    pub next_fishermen: ::std::vec::Vec<ValidatorStakeView>,
23204    #[doc = "Validators for the next epoch"]
23205    pub next_validators: ::std::vec::Vec<NextEpochValidatorInfo>,
23206    #[doc = "Kickout in the previous epoch"]
23207    pub prev_epoch_kickout: ::std::vec::Vec<ValidatorKickoutView>,
23208}
23209impl ::std::convert::From<&RpcValidatorResponse> for RpcValidatorResponse {
23210    fn from(value: &RpcValidatorResponse) -> Self {
23211        value.clone()
23212    }
23213}
23214#[doc = "`RpcValidatorsOrderedRequest`"]
23215#[doc = r""]
23216#[doc = r" <details><summary>JSON schema</summary>"]
23217#[doc = r""]
23218#[doc = r" ```json"]
23219#[doc = "{"]
23220#[doc = "  \"title\": \"RpcValidatorsOrderedRequest\","]
23221#[doc = "  \"type\": \"object\","]
23222#[doc = "  \"properties\": {"]
23223#[doc = "    \"block_id\": {"]
23224#[doc = "      \"anyOf\": ["]
23225#[doc = "        {"]
23226#[doc = "          \"$ref\": \"#/components/schemas/BlockId\""]
23227#[doc = "        },"]
23228#[doc = "        {"]
23229#[doc = "          \"type\": \"null\""]
23230#[doc = "        }"]
23231#[doc = "      ]"]
23232#[doc = "    }"]
23233#[doc = "  }"]
23234#[doc = "}"]
23235#[doc = r" ```"]
23236#[doc = r" </details>"]
23237#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
23238pub struct RpcValidatorsOrderedRequest {
23239    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
23240    pub block_id: ::std::option::Option<BlockId>,
23241}
23242impl ::std::convert::From<&RpcValidatorsOrderedRequest> for RpcValidatorsOrderedRequest {
23243    fn from(value: &RpcValidatorsOrderedRequest) -> Self {
23244        value.clone()
23245    }
23246}
23247impl ::std::default::Default for RpcValidatorsOrderedRequest {
23248    fn default() -> Self {
23249        Self {
23250            block_id: Default::default(),
23251        }
23252    }
23253}
23254#[doc = "View that preserves JSON format of the runtime config."]
23255#[doc = r""]
23256#[doc = r" <details><summary>JSON schema</summary>"]
23257#[doc = r""]
23258#[doc = r" ```json"]
23259#[doc = "{"]
23260#[doc = "  \"description\": \"View that preserves JSON format of the runtime config.\","]
23261#[doc = "  \"type\": \"object\","]
23262#[doc = "  \"required\": ["]
23263#[doc = "    \"account_creation_config\","]
23264#[doc = "    \"congestion_control_config\","]
23265#[doc = "    \"storage_amount_per_byte\","]
23266#[doc = "    \"transaction_costs\","]
23267#[doc = "    \"wasm_config\","]
23268#[doc = "    \"witness_config\""]
23269#[doc = "  ],"]
23270#[doc = "  \"properties\": {"]
23271#[doc = "    \"account_creation_config\": {"]
23272#[doc = "      \"description\": \"Config that defines rules for account creation.\","]
23273#[doc = "      \"allOf\": ["]
23274#[doc = "        {"]
23275#[doc = "          \"$ref\": \"#/components/schemas/AccountCreationConfigView\""]
23276#[doc = "        }"]
23277#[doc = "      ]"]
23278#[doc = "    },"]
23279#[doc = "    \"congestion_control_config\": {"]
23280#[doc = "      \"description\": \"The configuration for congestion control.\","]
23281#[doc = "      \"allOf\": ["]
23282#[doc = "        {"]
23283#[doc = "          \"$ref\": \"#/components/schemas/CongestionControlConfigView\""]
23284#[doc = "        }"]
23285#[doc = "      ]"]
23286#[doc = "    },"]
23287#[doc = "    \"storage_amount_per_byte\": {"]
23288#[doc = "      \"description\": \"Amount of yN per byte required to have on the account.  See\\n<https://nomicon.io/Economics/Economic#state-stake> for details.\","]
23289#[doc = "      \"allOf\": ["]
23290#[doc = "        {"]
23291#[doc = "          \"$ref\": \"#/components/schemas/NearToken\""]
23292#[doc = "        }"]
23293#[doc = "      ]"]
23294#[doc = "    },"]
23295#[doc = "    \"transaction_costs\": {"]
23296#[doc = "      \"description\": \"Costs of different actions that need to be performed when sending and\\nprocessing transaction and receipts.\","]
23297#[doc = "      \"allOf\": ["]
23298#[doc = "        {"]
23299#[doc = "          \"$ref\": \"#/components/schemas/RuntimeFeesConfigView\""]
23300#[doc = "        }"]
23301#[doc = "      ]"]
23302#[doc = "    },"]
23303#[doc = "    \"wasm_config\": {"]
23304#[doc = "      \"description\": \"Config of wasm operations.\","]
23305#[doc = "      \"allOf\": ["]
23306#[doc = "        {"]
23307#[doc = "          \"$ref\": \"#/components/schemas/VMConfigView\""]
23308#[doc = "        }"]
23309#[doc = "      ]"]
23310#[doc = "    },"]
23311#[doc = "    \"witness_config\": {"]
23312#[doc = "      \"description\": \"Configuration specific to ChunkStateWitness.\","]
23313#[doc = "      \"allOf\": ["]
23314#[doc = "        {"]
23315#[doc = "          \"$ref\": \"#/components/schemas/WitnessConfigView\""]
23316#[doc = "        }"]
23317#[doc = "      ]"]
23318#[doc = "    }"]
23319#[doc = "  }"]
23320#[doc = "}"]
23321#[doc = r" ```"]
23322#[doc = r" </details>"]
23323#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
23324pub struct RuntimeConfigView {
23325    #[doc = "Config that defines rules for account creation."]
23326    pub account_creation_config: AccountCreationConfigView,
23327    #[doc = "The configuration for congestion control."]
23328    pub congestion_control_config: CongestionControlConfigView,
23329    #[doc = "Amount of yN per byte required to have on the account.  See\n<https://nomicon.io/Economics/Economic#state-stake> for details."]
23330    pub storage_amount_per_byte: NearToken,
23331    #[doc = "Costs of different actions that need to be performed when sending and\nprocessing transaction and receipts."]
23332    pub transaction_costs: RuntimeFeesConfigView,
23333    #[doc = "Config of wasm operations."]
23334    pub wasm_config: VmConfigView,
23335    #[doc = "Configuration specific to ChunkStateWitness."]
23336    pub witness_config: WitnessConfigView,
23337}
23338impl ::std::convert::From<&RuntimeConfigView> for RuntimeConfigView {
23339    fn from(value: &RuntimeConfigView) -> Self {
23340        value.clone()
23341    }
23342}
23343#[doc = "Describes different fees for the runtime"]
23344#[doc = r""]
23345#[doc = r" <details><summary>JSON schema</summary>"]
23346#[doc = r""]
23347#[doc = r" ```json"]
23348#[doc = "{"]
23349#[doc = "  \"description\": \"Describes different fees for the runtime\","]
23350#[doc = "  \"type\": \"object\","]
23351#[doc = "  \"required\": ["]
23352#[doc = "    \"action_creation_config\","]
23353#[doc = "    \"action_receipt_creation_config\","]
23354#[doc = "    \"burnt_gas_reward\","]
23355#[doc = "    \"data_receipt_creation_config\","]
23356#[doc = "    \"pessimistic_gas_price_inflation_ratio\","]
23357#[doc = "    \"storage_usage_config\""]
23358#[doc = "  ],"]
23359#[doc = "  \"properties\": {"]
23360#[doc = "    \"action_creation_config\": {"]
23361#[doc = "      \"description\": \"Describes the cost of creating a certain action, `Action`. Includes all variants.\","]
23362#[doc = "      \"allOf\": ["]
23363#[doc = "        {"]
23364#[doc = "          \"$ref\": \"#/components/schemas/ActionCreationConfigView\""]
23365#[doc = "        }"]
23366#[doc = "      ]"]
23367#[doc = "    },"]
23368#[doc = "    \"action_receipt_creation_config\": {"]
23369#[doc = "      \"description\": \"Describes the cost of creating an action receipt, `ActionReceipt`, excluding the actual cost\\nof actions.\\n- `send` cost is burned when a receipt is created using `promise_create` or\\n    `promise_batch_create`\\n- `exec` cost is burned when the receipt is being executed.\","]
23370#[doc = "      \"allOf\": ["]
23371#[doc = "        {"]
23372#[doc = "          \"$ref\": \"#/components/schemas/Fee\""]
23373#[doc = "        }"]
23374#[doc = "      ]"]
23375#[doc = "    },"]
23376#[doc = "    \"burnt_gas_reward\": {"]
23377#[doc = "      \"description\": \"Fraction of the burnt gas to reward to the contract account for execution.\","]
23378#[doc = "      \"type\": \"array\","]
23379#[doc = "      \"items\": {"]
23380#[doc = "        \"type\": \"integer\","]
23381#[doc = "        \"format\": \"int32\""]
23382#[doc = "      },"]
23383#[doc = "      \"maxItems\": 2,"]
23384#[doc = "      \"minItems\": 2"]
23385#[doc = "    },"]
23386#[doc = "    \"data_receipt_creation_config\": {"]
23387#[doc = "      \"description\": \"Describes the cost of creating a data receipt, `DataReceipt`.\","]
23388#[doc = "      \"allOf\": ["]
23389#[doc = "        {"]
23390#[doc = "          \"$ref\": \"#/components/schemas/DataReceiptCreationConfigView\""]
23391#[doc = "        }"]
23392#[doc = "      ]"]
23393#[doc = "    },"]
23394#[doc = "    \"pessimistic_gas_price_inflation_ratio\": {"]
23395#[doc = "      \"description\": \"Pessimistic gas price inflation ratio.\","]
23396#[doc = "      \"type\": \"array\","]
23397#[doc = "      \"items\": {"]
23398#[doc = "        \"type\": \"integer\","]
23399#[doc = "        \"format\": \"int32\""]
23400#[doc = "      },"]
23401#[doc = "      \"maxItems\": 2,"]
23402#[doc = "      \"minItems\": 2"]
23403#[doc = "    },"]
23404#[doc = "    \"storage_usage_config\": {"]
23405#[doc = "      \"description\": \"Describes fees for storage.\","]
23406#[doc = "      \"allOf\": ["]
23407#[doc = "        {"]
23408#[doc = "          \"$ref\": \"#/components/schemas/StorageUsageConfigView\""]
23409#[doc = "        }"]
23410#[doc = "      ]"]
23411#[doc = "    }"]
23412#[doc = "  }"]
23413#[doc = "}"]
23414#[doc = r" ```"]
23415#[doc = r" </details>"]
23416#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
23417pub struct RuntimeFeesConfigView {
23418    #[doc = "Describes the cost of creating a certain action, `Action`. Includes all variants."]
23419    pub action_creation_config: ActionCreationConfigView,
23420    #[doc = "Describes the cost of creating an action receipt, `ActionReceipt`, excluding the actual cost\nof actions.\n- `send` cost is burned when a receipt is created using `promise_create` or\n    `promise_batch_create`\n- `exec` cost is burned when the receipt is being executed."]
23421    pub action_receipt_creation_config: Fee,
23422    #[doc = "Fraction of the burnt gas to reward to the contract account for execution."]
23423    pub burnt_gas_reward: [i32; 2usize],
23424    #[doc = "Describes the cost of creating a data receipt, `DataReceipt`."]
23425    pub data_receipt_creation_config: DataReceiptCreationConfigView,
23426    #[doc = "Pessimistic gas price inflation ratio."]
23427    pub pessimistic_gas_price_inflation_ratio: [i32; 2usize],
23428    #[doc = "Describes fees for storage."]
23429    pub storage_usage_config: StorageUsageConfigView,
23430}
23431impl ::std::convert::From<&RuntimeFeesConfigView> for RuntimeFeesConfigView {
23432    fn from(value: &RuntimeFeesConfigView) -> Self {
23433        value.clone()
23434    }
23435}
23436#[doc = "The shard identifier. It may be an arbitrary number - it does not need to be\na number in the range 0..NUM_SHARDS. The shard ids do not need to be\nsequential or contiguous.\n\nThe shard id is wrapped in a new type to prevent the old pattern of using\nindices in range 0..NUM_SHARDS and casting to ShardId. Once the transition\nif fully complete it potentially may be simplified to a regular type alias."]
23437#[doc = r""]
23438#[doc = r" <details><summary>JSON schema</summary>"]
23439#[doc = r""]
23440#[doc = r" ```json"]
23441#[doc = "{"]
23442#[doc = "  \"description\": \"The shard identifier. It may be an arbitrary number - it does not need to be\\na number in the range 0..NUM_SHARDS. The shard ids do not need to be\\nsequential or contiguous.\\n\\nThe shard id is wrapped in a new type to prevent the old pattern of using\\nindices in range 0..NUM_SHARDS and casting to ShardId. Once the transition\\nif fully complete it potentially may be simplified to a regular type alias.\","]
23443#[doc = "  \"type\": \"integer\","]
23444#[doc = "  \"format\": \"uint64\","]
23445#[doc = "  \"minimum\": 0.0"]
23446#[doc = "}"]
23447#[doc = r" ```"]
23448#[doc = r" </details>"]
23449#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
23450#[serde(transparent)]
23451pub struct ShardId(pub u64);
23452impl ::std::ops::Deref for ShardId {
23453    type Target = u64;
23454    fn deref(&self) -> &u64 {
23455        &self.0
23456    }
23457}
23458impl ::std::convert::From<ShardId> for u64 {
23459    fn from(value: ShardId) -> Self {
23460        value.0
23461    }
23462}
23463impl ::std::convert::From<&ShardId> for ShardId {
23464    fn from(value: &ShardId) -> Self {
23465        value.clone()
23466    }
23467}
23468impl ::std::convert::From<u64> for ShardId {
23469    fn from(value: u64) -> Self {
23470        Self(value)
23471    }
23472}
23473impl ::std::str::FromStr for ShardId {
23474    type Err = <u64 as ::std::str::FromStr>::Err;
23475    fn from_str(value: &str) -> ::std::result::Result<Self, Self::Err> {
23476        Ok(Self(value.parse()?))
23477    }
23478}
23479impl ::std::convert::TryFrom<&str> for ShardId {
23480    type Error = <u64 as ::std::str::FromStr>::Err;
23481    fn try_from(value: &str) -> ::std::result::Result<Self, Self::Error> {
23482        value.parse()
23483    }
23484}
23485impl ::std::convert::TryFrom<&String> for ShardId {
23486    type Error = <u64 as ::std::str::FromStr>::Err;
23487    fn try_from(value: &String) -> ::std::result::Result<Self, Self::Error> {
23488        value.parse()
23489    }
23490}
23491impl ::std::convert::TryFrom<String> for ShardId {
23492    type Error = <u64 as ::std::str::FromStr>::Err;
23493    fn try_from(value: String) -> ::std::result::Result<Self, Self::Error> {
23494        value.parse()
23495    }
23496}
23497impl ::std::fmt::Display for ShardId {
23498    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
23499        self.0.fmt(f)
23500    }
23501}
23502#[doc = "A versioned struct that contains all information needed to assign accounts to shards.\n\nBecause of re-sharding, the chain may use different shard layout to split shards at different\ntimes. Currently, `ShardLayout` is stored as part of `EpochConfig`, which is generated each\nepoch given the epoch protocol version. In mainnet/testnet, we use two shard layouts since\nre-sharding has only happened once. It is stored as part of genesis config, see\ndefault_simple_nightshade_shard_layout() Below is an overview for some important\nfunctionalities of ShardLayout interface."]
23503#[doc = r""]
23504#[doc = r" <details><summary>JSON schema</summary>"]
23505#[doc = r""]
23506#[doc = r" ```json"]
23507#[doc = "{"]
23508#[doc = "  \"description\": \"A versioned struct that contains all information needed to assign accounts to shards.\\n\\nBecause of re-sharding, the chain may use different shard layout to split shards at different\\ntimes. Currently, `ShardLayout` is stored as part of `EpochConfig`, which is generated each\\nepoch given the epoch protocol version. In mainnet/testnet, we use two shard layouts since\\nre-sharding has only happened once. It is stored as part of genesis config, see\\ndefault_simple_nightshade_shard_layout() Below is an overview for some important\\nfunctionalities of ShardLayout interface.\","]
23509#[doc = "  \"oneOf\": ["]
23510#[doc = "    {"]
23511#[doc = "      \"type\": \"object\","]
23512#[doc = "      \"required\": ["]
23513#[doc = "        \"V0\""]
23514#[doc = "      ],"]
23515#[doc = "      \"properties\": {"]
23516#[doc = "        \"V0\": {"]
23517#[doc = "          \"$ref\": \"#/components/schemas/ShardLayoutV0\""]
23518#[doc = "        }"]
23519#[doc = "      },"]
23520#[doc = "      \"additionalProperties\": false"]
23521#[doc = "    },"]
23522#[doc = "    {"]
23523#[doc = "      \"type\": \"object\","]
23524#[doc = "      \"required\": ["]
23525#[doc = "        \"V1\""]
23526#[doc = "      ],"]
23527#[doc = "      \"properties\": {"]
23528#[doc = "        \"V1\": {"]
23529#[doc = "          \"$ref\": \"#/components/schemas/ShardLayoutV1\""]
23530#[doc = "        }"]
23531#[doc = "      },"]
23532#[doc = "      \"additionalProperties\": false"]
23533#[doc = "    },"]
23534#[doc = "    {"]
23535#[doc = "      \"type\": \"object\","]
23536#[doc = "      \"required\": ["]
23537#[doc = "        \"V2\""]
23538#[doc = "      ],"]
23539#[doc = "      \"properties\": {"]
23540#[doc = "        \"V2\": {"]
23541#[doc = "          \"$ref\": \"#/components/schemas/ShardLayoutV2\""]
23542#[doc = "        }"]
23543#[doc = "      },"]
23544#[doc = "      \"additionalProperties\": false"]
23545#[doc = "    }"]
23546#[doc = "  ]"]
23547#[doc = "}"]
23548#[doc = r" ```"]
23549#[doc = r" </details>"]
23550#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
23551pub enum ShardLayout {
23552    V0(ShardLayoutV0),
23553    V1(ShardLayoutV1),
23554    V2(ShardLayoutV2),
23555}
23556impl ::std::convert::From<&Self> for ShardLayout {
23557    fn from(value: &ShardLayout) -> Self {
23558        value.clone()
23559    }
23560}
23561impl ::std::convert::From<ShardLayoutV0> for ShardLayout {
23562    fn from(value: ShardLayoutV0) -> Self {
23563        Self::V0(value)
23564    }
23565}
23566impl ::std::convert::From<ShardLayoutV1> for ShardLayout {
23567    fn from(value: ShardLayoutV1) -> Self {
23568        Self::V1(value)
23569    }
23570}
23571impl ::std::convert::From<ShardLayoutV2> for ShardLayout {
23572    fn from(value: ShardLayoutV2) -> Self {
23573        Self::V2(value)
23574    }
23575}
23576#[doc = "A shard layout that maps accounts evenly across all shards -- by calculate the hash of account\nid and mod number of shards. This is added to capture the old `account_id_to_shard_id` algorithm,\nto keep backward compatibility for some existing tests.\n`parent_shards` for `ShardLayoutV1` is always `None`, meaning it can only be the first shard layout\na chain uses."]
23577#[doc = r""]
23578#[doc = r" <details><summary>JSON schema</summary>"]
23579#[doc = r""]
23580#[doc = r" ```json"]
23581#[doc = "{"]
23582#[doc = "  \"description\": \"A shard layout that maps accounts evenly across all shards -- by calculate the hash of account\\nid and mod number of shards. This is added to capture the old `account_id_to_shard_id` algorithm,\\nto keep backward compatibility for some existing tests.\\n`parent_shards` for `ShardLayoutV1` is always `None`, meaning it can only be the first shard layout\\na chain uses.\","]
23583#[doc = "  \"type\": \"object\","]
23584#[doc = "  \"required\": ["]
23585#[doc = "    \"num_shards\","]
23586#[doc = "    \"version\""]
23587#[doc = "  ],"]
23588#[doc = "  \"properties\": {"]
23589#[doc = "    \"num_shards\": {"]
23590#[doc = "      \"description\": \"Map accounts evenly across all shards\","]
23591#[doc = "      \"type\": \"integer\","]
23592#[doc = "      \"format\": \"uint64\","]
23593#[doc = "      \"minimum\": 0.0"]
23594#[doc = "    },"]
23595#[doc = "    \"version\": {"]
23596#[doc = "      \"description\": \"Version of the shard layout, this is useful for uniquely identify the shard layout\","]
23597#[doc = "      \"type\": \"integer\","]
23598#[doc = "      \"format\": \"uint32\","]
23599#[doc = "      \"minimum\": 0.0"]
23600#[doc = "    }"]
23601#[doc = "  }"]
23602#[doc = "}"]
23603#[doc = r" ```"]
23604#[doc = r" </details>"]
23605#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
23606pub struct ShardLayoutV0 {
23607    #[doc = "Map accounts evenly across all shards"]
23608    pub num_shards: u64,
23609    #[doc = "Version of the shard layout, this is useful for uniquely identify the shard layout"]
23610    pub version: u32,
23611}
23612impl ::std::convert::From<&ShardLayoutV0> for ShardLayoutV0 {
23613    fn from(value: &ShardLayoutV0) -> Self {
23614        value.clone()
23615    }
23616}
23617#[doc = "`ShardLayoutV1`"]
23618#[doc = r""]
23619#[doc = r" <details><summary>JSON schema</summary>"]
23620#[doc = r""]
23621#[doc = r" ```json"]
23622#[doc = "{"]
23623#[doc = "  \"type\": \"object\","]
23624#[doc = "  \"required\": ["]
23625#[doc = "    \"boundary_accounts\","]
23626#[doc = "    \"version\""]
23627#[doc = "  ],"]
23628#[doc = "  \"properties\": {"]
23629#[doc = "    \"boundary_accounts\": {"]
23630#[doc = "      \"description\": \"The boundary accounts are the accounts on boundaries between shards.\\nEach shard contains a range of accounts from one boundary account to\\nanother - or the smallest or largest account possible. The total\\nnumber of shards is equal to the number of boundary accounts plus 1.\","]
23631#[doc = "      \"type\": \"array\","]
23632#[doc = "      \"items\": {"]
23633#[doc = "        \"$ref\": \"#/components/schemas/AccountId\""]
23634#[doc = "      }"]
23635#[doc = "    },"]
23636#[doc = "    \"shards_split_map\": {"]
23637#[doc = "      \"description\": \"Maps shards from the last shard layout to shards that it splits to in this shard layout,\\nUseful for constructing states for the shards.\\nNone for the genesis shard layout\","]
23638#[doc = "      \"type\": ["]
23639#[doc = "        \"array\","]
23640#[doc = "        \"null\""]
23641#[doc = "      ],"]
23642#[doc = "      \"items\": {"]
23643#[doc = "        \"type\": \"array\","]
23644#[doc = "        \"items\": {"]
23645#[doc = "          \"$ref\": \"#/components/schemas/ShardId\""]
23646#[doc = "        }"]
23647#[doc = "      }"]
23648#[doc = "    },"]
23649#[doc = "    \"to_parent_shard_map\": {"]
23650#[doc = "      \"description\": \"Maps shard in this shard layout to their parent shard\\nSince shard_ids always range from 0 to num_shards - 1, we use vec instead of a hashmap\","]
23651#[doc = "      \"type\": ["]
23652#[doc = "        \"array\","]
23653#[doc = "        \"null\""]
23654#[doc = "      ],"]
23655#[doc = "      \"items\": {"]
23656#[doc = "        \"$ref\": \"#/components/schemas/ShardId\""]
23657#[doc = "      }"]
23658#[doc = "    },"]
23659#[doc = "    \"version\": {"]
23660#[doc = "      \"description\": \"Version of the shard layout, this is useful for uniquely identify the shard layout\","]
23661#[doc = "      \"type\": \"integer\","]
23662#[doc = "      \"format\": \"uint32\","]
23663#[doc = "      \"minimum\": 0.0"]
23664#[doc = "    }"]
23665#[doc = "  }"]
23666#[doc = "}"]
23667#[doc = r" ```"]
23668#[doc = r" </details>"]
23669#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
23670pub struct ShardLayoutV1 {
23671    #[doc = "The boundary accounts are the accounts on boundaries between shards.\nEach shard contains a range of accounts from one boundary account to\nanother - or the smallest or largest account possible. The total\nnumber of shards is equal to the number of boundary accounts plus 1."]
23672    pub boundary_accounts: ::std::vec::Vec<AccountId>,
23673    #[doc = "Maps shards from the last shard layout to shards that it splits to in this shard layout,\nUseful for constructing states for the shards.\nNone for the genesis shard layout"]
23674    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
23675    pub shards_split_map: ::std::option::Option<::std::vec::Vec<::std::vec::Vec<ShardId>>>,
23676    #[doc = "Maps shard in this shard layout to their parent shard\nSince shard_ids always range from 0 to num_shards - 1, we use vec instead of a hashmap"]
23677    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
23678    pub to_parent_shard_map: ::std::option::Option<::std::vec::Vec<ShardId>>,
23679    #[doc = "Version of the shard layout, this is useful for uniquely identify the shard layout"]
23680    pub version: u32,
23681}
23682impl ::std::convert::From<&ShardLayoutV1> for ShardLayoutV1 {
23683    fn from(value: &ShardLayoutV1) -> Self {
23684        value.clone()
23685    }
23686}
23687#[doc = "Counterpart to `ShardLayoutV2` composed of maps with string keys to aid\nserde serialization."]
23688#[doc = r""]
23689#[doc = r" <details><summary>JSON schema</summary>"]
23690#[doc = r""]
23691#[doc = r" ```json"]
23692#[doc = "{"]
23693#[doc = "  \"description\": \"Counterpart to `ShardLayoutV2` composed of maps with string keys to aid\\nserde serialization.\","]
23694#[doc = "  \"type\": \"object\","]
23695#[doc = "  \"required\": ["]
23696#[doc = "    \"boundary_accounts\","]
23697#[doc = "    \"id_to_index_map\","]
23698#[doc = "    \"index_to_id_map\","]
23699#[doc = "    \"shard_ids\","]
23700#[doc = "    \"version\""]
23701#[doc = "  ],"]
23702#[doc = "  \"properties\": {"]
23703#[doc = "    \"boundary_accounts\": {"]
23704#[doc = "      \"type\": \"array\","]
23705#[doc = "      \"items\": {"]
23706#[doc = "        \"$ref\": \"#/components/schemas/AccountId\""]
23707#[doc = "      }"]
23708#[doc = "    },"]
23709#[doc = "    \"id_to_index_map\": {"]
23710#[doc = "      \"type\": \"object\","]
23711#[doc = "      \"additionalProperties\": {"]
23712#[doc = "        \"type\": \"integer\","]
23713#[doc = "        \"format\": \"uint\","]
23714#[doc = "        \"minimum\": 0.0"]
23715#[doc = "      }"]
23716#[doc = "    },"]
23717#[doc = "    \"index_to_id_map\": {"]
23718#[doc = "      \"type\": \"object\","]
23719#[doc = "      \"additionalProperties\": {"]
23720#[doc = "        \"$ref\": \"#/components/schemas/ShardId\""]
23721#[doc = "      }"]
23722#[doc = "    },"]
23723#[doc = "    \"shard_ids\": {"]
23724#[doc = "      \"type\": \"array\","]
23725#[doc = "      \"items\": {"]
23726#[doc = "        \"$ref\": \"#/components/schemas/ShardId\""]
23727#[doc = "      }"]
23728#[doc = "    },"]
23729#[doc = "    \"shards_parent_map\": {"]
23730#[doc = "      \"type\": ["]
23731#[doc = "        \"object\","]
23732#[doc = "        \"null\""]
23733#[doc = "      ],"]
23734#[doc = "      \"additionalProperties\": {"]
23735#[doc = "        \"$ref\": \"#/components/schemas/ShardId\""]
23736#[doc = "      }"]
23737#[doc = "    },"]
23738#[doc = "    \"shards_split_map\": {"]
23739#[doc = "      \"type\": ["]
23740#[doc = "        \"object\","]
23741#[doc = "        \"null\""]
23742#[doc = "      ],"]
23743#[doc = "      \"additionalProperties\": {"]
23744#[doc = "        \"type\": \"array\","]
23745#[doc = "        \"items\": {"]
23746#[doc = "          \"$ref\": \"#/components/schemas/ShardId\""]
23747#[doc = "        }"]
23748#[doc = "      }"]
23749#[doc = "    },"]
23750#[doc = "    \"version\": {"]
23751#[doc = "      \"type\": \"integer\","]
23752#[doc = "      \"format\": \"uint32\","]
23753#[doc = "      \"minimum\": 0.0"]
23754#[doc = "    }"]
23755#[doc = "  }"]
23756#[doc = "}"]
23757#[doc = r" ```"]
23758#[doc = r" </details>"]
23759#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
23760pub struct ShardLayoutV2 {
23761    pub boundary_accounts: ::std::vec::Vec<AccountId>,
23762    pub id_to_index_map: ::std::collections::HashMap<::std::string::String, u32>,
23763    pub index_to_id_map: ::std::collections::HashMap<::std::string::String, ShardId>,
23764    pub shard_ids: ::std::vec::Vec<ShardId>,
23765    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
23766    pub shards_parent_map:
23767        ::std::option::Option<::std::collections::HashMap<::std::string::String, ShardId>>,
23768    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
23769    pub shards_split_map: ::std::option::Option<
23770        ::std::collections::HashMap<::std::string::String, ::std::vec::Vec<ShardId>>,
23771    >,
23772    pub version: u32,
23773}
23774impl ::std::convert::From<&ShardLayoutV2> for ShardLayoutV2 {
23775    fn from(value: &ShardLayoutV2) -> Self {
23776        value.clone()
23777    }
23778}
23779#[doc = "`ShardUId` is a unique representation for shards from different shard layouts.\n\nComparing to `ShardId`, which is just an ordinal number ranging from 0 to NUM_SHARDS-1,\n`ShardUId` provides a way to unique identify shards when shard layouts may change across epochs.\nThis is important because we store states indexed by shards in our database, so we need a\nway to unique identify shard even when shards change across epochs.\nAnother difference between `ShardUId` and `ShardId` is that `ShardUId` should only exist in\na node's internal state while `ShardId` can be exposed to outside APIs and used in protocol\nlevel information (for example, `ShardChunkHeader` contains `ShardId` instead of `ShardUId`)"]
23780#[doc = r""]
23781#[doc = r" <details><summary>JSON schema</summary>"]
23782#[doc = r""]
23783#[doc = r" ```json"]
23784#[doc = "{"]
23785#[doc = "  \"description\": \"`ShardUId` is a unique representation for shards from different shard layouts.\\n\\nComparing to `ShardId`, which is just an ordinal number ranging from 0 to NUM_SHARDS-1,\\n`ShardUId` provides a way to unique identify shards when shard layouts may change across epochs.\\nThis is important because we store states indexed by shards in our database, so we need a\\nway to unique identify shard even when shards change across epochs.\\nAnother difference between `ShardUId` and `ShardId` is that `ShardUId` should only exist in\\na node's internal state while `ShardId` can be exposed to outside APIs and used in protocol\\nlevel information (for example, `ShardChunkHeader` contains `ShardId` instead of `ShardUId`)\","]
23786#[doc = "  \"type\": \"object\","]
23787#[doc = "  \"required\": ["]
23788#[doc = "    \"shard_id\","]
23789#[doc = "    \"version\""]
23790#[doc = "  ],"]
23791#[doc = "  \"properties\": {"]
23792#[doc = "    \"shard_id\": {"]
23793#[doc = "      \"type\": \"integer\","]
23794#[doc = "      \"format\": \"uint32\","]
23795#[doc = "      \"minimum\": 0.0"]
23796#[doc = "    },"]
23797#[doc = "    \"version\": {"]
23798#[doc = "      \"type\": \"integer\","]
23799#[doc = "      \"format\": \"uint32\","]
23800#[doc = "      \"minimum\": 0.0"]
23801#[doc = "    }"]
23802#[doc = "  }"]
23803#[doc = "}"]
23804#[doc = r" ```"]
23805#[doc = r" </details>"]
23806#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
23807pub struct ShardUId {
23808    pub shard_id: u32,
23809    pub version: u32,
23810}
23811impl ::std::convert::From<&ShardUId> for ShardUId {
23812    fn from(value: &ShardUId) -> Self {
23813        value.clone()
23814    }
23815}
23816#[doc = "`Signature`"]
23817#[doc = r""]
23818#[doc = r" <details><summary>JSON schema</summary>"]
23819#[doc = r""]
23820#[doc = r" ```json"]
23821#[doc = "{"]
23822#[doc = "  \"type\": \"string\""]
23823#[doc = "}"]
23824#[doc = r" ```"]
23825#[doc = r" </details>"]
23826#[derive(
23827    :: serde :: Deserialize,
23828    :: serde :: Serialize,
23829    Clone,
23830    Debug,
23831    Eq,
23832    Hash,
23833    Ord,
23834    PartialEq,
23835    PartialOrd,
23836)]
23837#[serde(transparent)]
23838pub struct Signature(pub ::std::string::String);
23839impl ::std::ops::Deref for Signature {
23840    type Target = ::std::string::String;
23841    fn deref(&self) -> &::std::string::String {
23842        &self.0
23843    }
23844}
23845impl ::std::convert::From<Signature> for ::std::string::String {
23846    fn from(value: Signature) -> Self {
23847        value.0
23848    }
23849}
23850impl ::std::convert::From<&Signature> for Signature {
23851    fn from(value: &Signature) -> Self {
23852        value.clone()
23853    }
23854}
23855impl ::std::convert::From<::std::string::String> for Signature {
23856    fn from(value: ::std::string::String) -> Self {
23857        Self(value)
23858    }
23859}
23860impl ::std::str::FromStr for Signature {
23861    type Err = ::std::convert::Infallible;
23862    fn from_str(value: &str) -> ::std::result::Result<Self, Self::Err> {
23863        Ok(Self(value.to_string()))
23864    }
23865}
23866impl ::std::fmt::Display for Signature {
23867    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
23868        self.0.fmt(f)
23869    }
23870}
23871#[doc = "`SignedDelegateAction`"]
23872#[doc = r""]
23873#[doc = r" <details><summary>JSON schema</summary>"]
23874#[doc = r""]
23875#[doc = r" ```json"]
23876#[doc = "{"]
23877#[doc = "  \"type\": \"object\","]
23878#[doc = "  \"required\": ["]
23879#[doc = "    \"delegate_action\","]
23880#[doc = "    \"signature\""]
23881#[doc = "  ],"]
23882#[doc = "  \"properties\": {"]
23883#[doc = "    \"delegate_action\": {"]
23884#[doc = "      \"$ref\": \"#/components/schemas/DelegateAction\""]
23885#[doc = "    },"]
23886#[doc = "    \"signature\": {"]
23887#[doc = "      \"$ref\": \"#/components/schemas/Signature\""]
23888#[doc = "    }"]
23889#[doc = "  }"]
23890#[doc = "}"]
23891#[doc = r" ```"]
23892#[doc = r" </details>"]
23893#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
23894pub struct SignedDelegateAction {
23895    pub delegate_action: DelegateAction,
23896    pub signature: Signature,
23897}
23898impl ::std::convert::From<&SignedDelegateAction> for SignedDelegateAction {
23899    fn from(value: &SignedDelegateAction) -> Self {
23900        value.clone()
23901    }
23902}
23903#[doc = "`SignedTransaction`"]
23904#[doc = r""]
23905#[doc = r" <details><summary>JSON schema</summary>"]
23906#[doc = r""]
23907#[doc = r" ```json"]
23908#[doc = "{"]
23909#[doc = "  \"type\": \"string\","]
23910#[doc = "  \"format\": \"byte\""]
23911#[doc = "}"]
23912#[doc = r" ```"]
23913#[doc = r" </details>"]
23914#[derive(
23915    :: serde :: Deserialize,
23916    :: serde :: Serialize,
23917    Clone,
23918    Debug,
23919    Eq,
23920    Hash,
23921    Ord,
23922    PartialEq,
23923    PartialOrd,
23924)]
23925#[serde(transparent)]
23926pub struct SignedTransaction(pub ::std::string::String);
23927impl ::std::ops::Deref for SignedTransaction {
23928    type Target = ::std::string::String;
23929    fn deref(&self) -> &::std::string::String {
23930        &self.0
23931    }
23932}
23933impl ::std::convert::From<SignedTransaction> for ::std::string::String {
23934    fn from(value: SignedTransaction) -> Self {
23935        value.0
23936    }
23937}
23938impl ::std::convert::From<&SignedTransaction> for SignedTransaction {
23939    fn from(value: &SignedTransaction) -> Self {
23940        value.clone()
23941    }
23942}
23943impl ::std::convert::From<::std::string::String> for SignedTransaction {
23944    fn from(value: ::std::string::String) -> Self {
23945        Self(value)
23946    }
23947}
23948impl ::std::str::FromStr for SignedTransaction {
23949    type Err = ::std::convert::Infallible;
23950    fn from_str(value: &str) -> ::std::result::Result<Self, Self::Err> {
23951        Ok(Self(value.to_string()))
23952    }
23953}
23954impl ::std::fmt::Display for SignedTransaction {
23955    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
23956        self.0.fmt(f)
23957    }
23958}
23959#[doc = "`SignedTransactionView`"]
23960#[doc = r""]
23961#[doc = r" <details><summary>JSON schema</summary>"]
23962#[doc = r""]
23963#[doc = r" ```json"]
23964#[doc = "{"]
23965#[doc = "  \"type\": \"object\","]
23966#[doc = "  \"required\": ["]
23967#[doc = "    \"actions\","]
23968#[doc = "    \"hash\","]
23969#[doc = "    \"nonce\","]
23970#[doc = "    \"public_key\","]
23971#[doc = "    \"receiver_id\","]
23972#[doc = "    \"signature\","]
23973#[doc = "    \"signer_id\""]
23974#[doc = "  ],"]
23975#[doc = "  \"properties\": {"]
23976#[doc = "    \"actions\": {"]
23977#[doc = "      \"type\": \"array\","]
23978#[doc = "      \"items\": {"]
23979#[doc = "        \"$ref\": \"#/components/schemas/ActionView\""]
23980#[doc = "      }"]
23981#[doc = "    },"]
23982#[doc = "    \"hash\": {"]
23983#[doc = "      \"$ref\": \"#/components/schemas/CryptoHash\""]
23984#[doc = "    },"]
23985#[doc = "    \"nonce\": {"]
23986#[doc = "      \"type\": \"integer\","]
23987#[doc = "      \"format\": \"uint64\","]
23988#[doc = "      \"minimum\": 0.0"]
23989#[doc = "    },"]
23990#[doc = "    \"priority_fee\": {"]
23991#[doc = "      \"default\": 0,"]
23992#[doc = "      \"type\": \"integer\","]
23993#[doc = "      \"format\": \"uint64\","]
23994#[doc = "      \"minimum\": 0.0"]
23995#[doc = "    },"]
23996#[doc = "    \"public_key\": {"]
23997#[doc = "      \"$ref\": \"#/components/schemas/PublicKey\""]
23998#[doc = "    },"]
23999#[doc = "    \"receiver_id\": {"]
24000#[doc = "      \"$ref\": \"#/components/schemas/AccountId\""]
24001#[doc = "    },"]
24002#[doc = "    \"signature\": {"]
24003#[doc = "      \"$ref\": \"#/components/schemas/Signature\""]
24004#[doc = "    },"]
24005#[doc = "    \"signer_id\": {"]
24006#[doc = "      \"$ref\": \"#/components/schemas/AccountId\""]
24007#[doc = "    }"]
24008#[doc = "  }"]
24009#[doc = "}"]
24010#[doc = r" ```"]
24011#[doc = r" </details>"]
24012#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
24013pub struct SignedTransactionView {
24014    pub actions: ::std::vec::Vec<ActionView>,
24015    pub hash: CryptoHash,
24016    pub nonce: u64,
24017    #[serde(default)]
24018    pub priority_fee: u64,
24019    pub public_key: PublicKey,
24020    pub receiver_id: AccountId,
24021    pub signature: Signature,
24022    pub signer_id: AccountId,
24023}
24024impl ::std::convert::From<&SignedTransactionView> for SignedTransactionView {
24025    fn from(value: &SignedTransactionView) -> Self {
24026        value.clone()
24027    }
24028}
24029#[doc = "`SingleAccessKeyChangesByBlockIdChangesType`"]
24030#[doc = r""]
24031#[doc = r" <details><summary>JSON schema</summary>"]
24032#[doc = r""]
24033#[doc = r" ```json"]
24034#[doc = "{"]
24035#[doc = "  \"type\": \"string\","]
24036#[doc = "  \"enum\": ["]
24037#[doc = "    \"single_access_key_changes\""]
24038#[doc = "  ]"]
24039#[doc = "}"]
24040#[doc = r" ```"]
24041#[doc = r" </details>"]
24042#[derive(
24043    :: serde :: Deserialize,
24044    :: serde :: Serialize,
24045    Clone,
24046    Copy,
24047    Debug,
24048    Eq,
24049    Hash,
24050    Ord,
24051    PartialEq,
24052    PartialOrd,
24053)]
24054pub enum SingleAccessKeyChangesByBlockIdChangesType {
24055    #[serde(rename = "single_access_key_changes")]
24056    SingleAccessKeyChanges,
24057}
24058impl ::std::convert::From<&Self> for SingleAccessKeyChangesByBlockIdChangesType {
24059    fn from(value: &SingleAccessKeyChangesByBlockIdChangesType) -> Self {
24060        value.clone()
24061    }
24062}
24063impl ::std::fmt::Display for SingleAccessKeyChangesByBlockIdChangesType {
24064    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
24065        match *self {
24066            Self::SingleAccessKeyChanges => f.write_str("single_access_key_changes"),
24067        }
24068    }
24069}
24070impl ::std::str::FromStr for SingleAccessKeyChangesByBlockIdChangesType {
24071    type Err = self::error::ConversionError;
24072    fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
24073        match value {
24074            "single_access_key_changes" => Ok(Self::SingleAccessKeyChanges),
24075            _ => Err("invalid value".into()),
24076        }
24077    }
24078}
24079impl ::std::convert::TryFrom<&str> for SingleAccessKeyChangesByBlockIdChangesType {
24080    type Error = self::error::ConversionError;
24081    fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
24082        value.parse()
24083    }
24084}
24085impl ::std::convert::TryFrom<&::std::string::String>
24086    for SingleAccessKeyChangesByBlockIdChangesType
24087{
24088    type Error = self::error::ConversionError;
24089    fn try_from(
24090        value: &::std::string::String,
24091    ) -> ::std::result::Result<Self, self::error::ConversionError> {
24092        value.parse()
24093    }
24094}
24095impl ::std::convert::TryFrom<::std::string::String> for SingleAccessKeyChangesByBlockIdChangesType {
24096    type Error = self::error::ConversionError;
24097    fn try_from(
24098        value: ::std::string::String,
24099    ) -> ::std::result::Result<Self, self::error::ConversionError> {
24100        value.parse()
24101    }
24102}
24103#[doc = "`SingleAccessKeyChangesByFinalityChangesType`"]
24104#[doc = r""]
24105#[doc = r" <details><summary>JSON schema</summary>"]
24106#[doc = r""]
24107#[doc = r" ```json"]
24108#[doc = "{"]
24109#[doc = "  \"type\": \"string\","]
24110#[doc = "  \"enum\": ["]
24111#[doc = "    \"single_access_key_changes\""]
24112#[doc = "  ]"]
24113#[doc = "}"]
24114#[doc = r" ```"]
24115#[doc = r" </details>"]
24116#[derive(
24117    :: serde :: Deserialize,
24118    :: serde :: Serialize,
24119    Clone,
24120    Copy,
24121    Debug,
24122    Eq,
24123    Hash,
24124    Ord,
24125    PartialEq,
24126    PartialOrd,
24127)]
24128pub enum SingleAccessKeyChangesByFinalityChangesType {
24129    #[serde(rename = "single_access_key_changes")]
24130    SingleAccessKeyChanges,
24131}
24132impl ::std::convert::From<&Self> for SingleAccessKeyChangesByFinalityChangesType {
24133    fn from(value: &SingleAccessKeyChangesByFinalityChangesType) -> Self {
24134        value.clone()
24135    }
24136}
24137impl ::std::fmt::Display for SingleAccessKeyChangesByFinalityChangesType {
24138    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
24139        match *self {
24140            Self::SingleAccessKeyChanges => f.write_str("single_access_key_changes"),
24141        }
24142    }
24143}
24144impl ::std::str::FromStr for SingleAccessKeyChangesByFinalityChangesType {
24145    type Err = self::error::ConversionError;
24146    fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
24147        match value {
24148            "single_access_key_changes" => Ok(Self::SingleAccessKeyChanges),
24149            _ => Err("invalid value".into()),
24150        }
24151    }
24152}
24153impl ::std::convert::TryFrom<&str> for SingleAccessKeyChangesByFinalityChangesType {
24154    type Error = self::error::ConversionError;
24155    fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
24156        value.parse()
24157    }
24158}
24159impl ::std::convert::TryFrom<&::std::string::String>
24160    for SingleAccessKeyChangesByFinalityChangesType
24161{
24162    type Error = self::error::ConversionError;
24163    fn try_from(
24164        value: &::std::string::String,
24165    ) -> ::std::result::Result<Self, self::error::ConversionError> {
24166        value.parse()
24167    }
24168}
24169impl ::std::convert::TryFrom<::std::string::String>
24170    for SingleAccessKeyChangesByFinalityChangesType
24171{
24172    type Error = self::error::ConversionError;
24173    fn try_from(
24174        value: ::std::string::String,
24175    ) -> ::std::result::Result<Self, self::error::ConversionError> {
24176        value.parse()
24177    }
24178}
24179#[doc = "`SingleAccessKeyChangesBySyncCheckpointChangesType`"]
24180#[doc = r""]
24181#[doc = r" <details><summary>JSON schema</summary>"]
24182#[doc = r""]
24183#[doc = r" ```json"]
24184#[doc = "{"]
24185#[doc = "  \"type\": \"string\","]
24186#[doc = "  \"enum\": ["]
24187#[doc = "    \"single_access_key_changes\""]
24188#[doc = "  ]"]
24189#[doc = "}"]
24190#[doc = r" ```"]
24191#[doc = r" </details>"]
24192#[derive(
24193    :: serde :: Deserialize,
24194    :: serde :: Serialize,
24195    Clone,
24196    Copy,
24197    Debug,
24198    Eq,
24199    Hash,
24200    Ord,
24201    PartialEq,
24202    PartialOrd,
24203)]
24204pub enum SingleAccessKeyChangesBySyncCheckpointChangesType {
24205    #[serde(rename = "single_access_key_changes")]
24206    SingleAccessKeyChanges,
24207}
24208impl ::std::convert::From<&Self> for SingleAccessKeyChangesBySyncCheckpointChangesType {
24209    fn from(value: &SingleAccessKeyChangesBySyncCheckpointChangesType) -> Self {
24210        value.clone()
24211    }
24212}
24213impl ::std::fmt::Display for SingleAccessKeyChangesBySyncCheckpointChangesType {
24214    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
24215        match *self {
24216            Self::SingleAccessKeyChanges => f.write_str("single_access_key_changes"),
24217        }
24218    }
24219}
24220impl ::std::str::FromStr for SingleAccessKeyChangesBySyncCheckpointChangesType {
24221    type Err = self::error::ConversionError;
24222    fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
24223        match value {
24224            "single_access_key_changes" => Ok(Self::SingleAccessKeyChanges),
24225            _ => Err("invalid value".into()),
24226        }
24227    }
24228}
24229impl ::std::convert::TryFrom<&str> for SingleAccessKeyChangesBySyncCheckpointChangesType {
24230    type Error = self::error::ConversionError;
24231    fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
24232        value.parse()
24233    }
24234}
24235impl ::std::convert::TryFrom<&::std::string::String>
24236    for SingleAccessKeyChangesBySyncCheckpointChangesType
24237{
24238    type Error = self::error::ConversionError;
24239    fn try_from(
24240        value: &::std::string::String,
24241    ) -> ::std::result::Result<Self, self::error::ConversionError> {
24242        value.parse()
24243    }
24244}
24245impl ::std::convert::TryFrom<::std::string::String>
24246    for SingleAccessKeyChangesBySyncCheckpointChangesType
24247{
24248    type Error = self::error::ConversionError;
24249    fn try_from(
24250        value: ::std::string::String,
24251    ) -> ::std::result::Result<Self, self::error::ConversionError> {
24252        value.parse()
24253    }
24254}
24255#[doc = "`SingleGasKeyChangesByBlockIdChangesType`"]
24256#[doc = r""]
24257#[doc = r" <details><summary>JSON schema</summary>"]
24258#[doc = r""]
24259#[doc = r" ```json"]
24260#[doc = "{"]
24261#[doc = "  \"type\": \"string\","]
24262#[doc = "  \"enum\": ["]
24263#[doc = "    \"single_gas_key_changes\""]
24264#[doc = "  ]"]
24265#[doc = "}"]
24266#[doc = r" ```"]
24267#[doc = r" </details>"]
24268#[derive(
24269    :: serde :: Deserialize,
24270    :: serde :: Serialize,
24271    Clone,
24272    Copy,
24273    Debug,
24274    Eq,
24275    Hash,
24276    Ord,
24277    PartialEq,
24278    PartialOrd,
24279)]
24280pub enum SingleGasKeyChangesByBlockIdChangesType {
24281    #[serde(rename = "single_gas_key_changes")]
24282    SingleGasKeyChanges,
24283}
24284impl ::std::convert::From<&Self> for SingleGasKeyChangesByBlockIdChangesType {
24285    fn from(value: &SingleGasKeyChangesByBlockIdChangesType) -> Self {
24286        value.clone()
24287    }
24288}
24289impl ::std::fmt::Display for SingleGasKeyChangesByBlockIdChangesType {
24290    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
24291        match *self {
24292            Self::SingleGasKeyChanges => f.write_str("single_gas_key_changes"),
24293        }
24294    }
24295}
24296impl ::std::str::FromStr for SingleGasKeyChangesByBlockIdChangesType {
24297    type Err = self::error::ConversionError;
24298    fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
24299        match value {
24300            "single_gas_key_changes" => Ok(Self::SingleGasKeyChanges),
24301            _ => Err("invalid value".into()),
24302        }
24303    }
24304}
24305impl ::std::convert::TryFrom<&str> for SingleGasKeyChangesByBlockIdChangesType {
24306    type Error = self::error::ConversionError;
24307    fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
24308        value.parse()
24309    }
24310}
24311impl ::std::convert::TryFrom<&::std::string::String> for SingleGasKeyChangesByBlockIdChangesType {
24312    type Error = self::error::ConversionError;
24313    fn try_from(
24314        value: &::std::string::String,
24315    ) -> ::std::result::Result<Self, self::error::ConversionError> {
24316        value.parse()
24317    }
24318}
24319impl ::std::convert::TryFrom<::std::string::String> for SingleGasKeyChangesByBlockIdChangesType {
24320    type Error = self::error::ConversionError;
24321    fn try_from(
24322        value: ::std::string::String,
24323    ) -> ::std::result::Result<Self, self::error::ConversionError> {
24324        value.parse()
24325    }
24326}
24327#[doc = "`SingleGasKeyChangesByFinalityChangesType`"]
24328#[doc = r""]
24329#[doc = r" <details><summary>JSON schema</summary>"]
24330#[doc = r""]
24331#[doc = r" ```json"]
24332#[doc = "{"]
24333#[doc = "  \"type\": \"string\","]
24334#[doc = "  \"enum\": ["]
24335#[doc = "    \"single_gas_key_changes\""]
24336#[doc = "  ]"]
24337#[doc = "}"]
24338#[doc = r" ```"]
24339#[doc = r" </details>"]
24340#[derive(
24341    :: serde :: Deserialize,
24342    :: serde :: Serialize,
24343    Clone,
24344    Copy,
24345    Debug,
24346    Eq,
24347    Hash,
24348    Ord,
24349    PartialEq,
24350    PartialOrd,
24351)]
24352pub enum SingleGasKeyChangesByFinalityChangesType {
24353    #[serde(rename = "single_gas_key_changes")]
24354    SingleGasKeyChanges,
24355}
24356impl ::std::convert::From<&Self> for SingleGasKeyChangesByFinalityChangesType {
24357    fn from(value: &SingleGasKeyChangesByFinalityChangesType) -> Self {
24358        value.clone()
24359    }
24360}
24361impl ::std::fmt::Display for SingleGasKeyChangesByFinalityChangesType {
24362    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
24363        match *self {
24364            Self::SingleGasKeyChanges => f.write_str("single_gas_key_changes"),
24365        }
24366    }
24367}
24368impl ::std::str::FromStr for SingleGasKeyChangesByFinalityChangesType {
24369    type Err = self::error::ConversionError;
24370    fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
24371        match value {
24372            "single_gas_key_changes" => Ok(Self::SingleGasKeyChanges),
24373            _ => Err("invalid value".into()),
24374        }
24375    }
24376}
24377impl ::std::convert::TryFrom<&str> for SingleGasKeyChangesByFinalityChangesType {
24378    type Error = self::error::ConversionError;
24379    fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
24380        value.parse()
24381    }
24382}
24383impl ::std::convert::TryFrom<&::std::string::String> for SingleGasKeyChangesByFinalityChangesType {
24384    type Error = self::error::ConversionError;
24385    fn try_from(
24386        value: &::std::string::String,
24387    ) -> ::std::result::Result<Self, self::error::ConversionError> {
24388        value.parse()
24389    }
24390}
24391impl ::std::convert::TryFrom<::std::string::String> for SingleGasKeyChangesByFinalityChangesType {
24392    type Error = self::error::ConversionError;
24393    fn try_from(
24394        value: ::std::string::String,
24395    ) -> ::std::result::Result<Self, self::error::ConversionError> {
24396        value.parse()
24397    }
24398}
24399#[doc = "`SingleGasKeyChangesBySyncCheckpointChangesType`"]
24400#[doc = r""]
24401#[doc = r" <details><summary>JSON schema</summary>"]
24402#[doc = r""]
24403#[doc = r" ```json"]
24404#[doc = "{"]
24405#[doc = "  \"type\": \"string\","]
24406#[doc = "  \"enum\": ["]
24407#[doc = "    \"single_gas_key_changes\""]
24408#[doc = "  ]"]
24409#[doc = "}"]
24410#[doc = r" ```"]
24411#[doc = r" </details>"]
24412#[derive(
24413    :: serde :: Deserialize,
24414    :: serde :: Serialize,
24415    Clone,
24416    Copy,
24417    Debug,
24418    Eq,
24419    Hash,
24420    Ord,
24421    PartialEq,
24422    PartialOrd,
24423)]
24424pub enum SingleGasKeyChangesBySyncCheckpointChangesType {
24425    #[serde(rename = "single_gas_key_changes")]
24426    SingleGasKeyChanges,
24427}
24428impl ::std::convert::From<&Self> for SingleGasKeyChangesBySyncCheckpointChangesType {
24429    fn from(value: &SingleGasKeyChangesBySyncCheckpointChangesType) -> Self {
24430        value.clone()
24431    }
24432}
24433impl ::std::fmt::Display for SingleGasKeyChangesBySyncCheckpointChangesType {
24434    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
24435        match *self {
24436            Self::SingleGasKeyChanges => f.write_str("single_gas_key_changes"),
24437        }
24438    }
24439}
24440impl ::std::str::FromStr for SingleGasKeyChangesBySyncCheckpointChangesType {
24441    type Err = self::error::ConversionError;
24442    fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
24443        match value {
24444            "single_gas_key_changes" => Ok(Self::SingleGasKeyChanges),
24445            _ => Err("invalid value".into()),
24446        }
24447    }
24448}
24449impl ::std::convert::TryFrom<&str> for SingleGasKeyChangesBySyncCheckpointChangesType {
24450    type Error = self::error::ConversionError;
24451    fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
24452        value.parse()
24453    }
24454}
24455impl ::std::convert::TryFrom<&::std::string::String>
24456    for SingleGasKeyChangesBySyncCheckpointChangesType
24457{
24458    type Error = self::error::ConversionError;
24459    fn try_from(
24460        value: &::std::string::String,
24461    ) -> ::std::result::Result<Self, self::error::ConversionError> {
24462        value.parse()
24463    }
24464}
24465impl ::std::convert::TryFrom<::std::string::String>
24466    for SingleGasKeyChangesBySyncCheckpointChangesType
24467{
24468    type Error = self::error::ConversionError;
24469    fn try_from(
24470        value: ::std::string::String,
24471    ) -> ::std::result::Result<Self, self::error::ConversionError> {
24472        value.parse()
24473    }
24474}
24475#[doc = "`SlashedValidator`"]
24476#[doc = r""]
24477#[doc = r" <details><summary>JSON schema</summary>"]
24478#[doc = r""]
24479#[doc = r" ```json"]
24480#[doc = "{"]
24481#[doc = "  \"type\": \"object\","]
24482#[doc = "  \"required\": ["]
24483#[doc = "    \"account_id\","]
24484#[doc = "    \"is_double_sign\""]
24485#[doc = "  ],"]
24486#[doc = "  \"properties\": {"]
24487#[doc = "    \"account_id\": {"]
24488#[doc = "      \"$ref\": \"#/components/schemas/AccountId\""]
24489#[doc = "    },"]
24490#[doc = "    \"is_double_sign\": {"]
24491#[doc = "      \"type\": \"boolean\""]
24492#[doc = "    }"]
24493#[doc = "  }"]
24494#[doc = "}"]
24495#[doc = r" ```"]
24496#[doc = r" </details>"]
24497#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
24498pub struct SlashedValidator {
24499    pub account_id: AccountId,
24500    pub is_double_sign: bool,
24501}
24502impl ::std::convert::From<&SlashedValidator> for SlashedValidator {
24503    fn from(value: &SlashedValidator) -> Self {
24504        value.clone()
24505    }
24506}
24507#[doc = "An action which stakes signer_id tokens and setup's validator public key"]
24508#[doc = r""]
24509#[doc = r" <details><summary>JSON schema</summary>"]
24510#[doc = r""]
24511#[doc = r" ```json"]
24512#[doc = "{"]
24513#[doc = "  \"description\": \"An action which stakes signer_id tokens and setup's validator public key\","]
24514#[doc = "  \"type\": \"object\","]
24515#[doc = "  \"required\": ["]
24516#[doc = "    \"public_key\","]
24517#[doc = "    \"stake\""]
24518#[doc = "  ],"]
24519#[doc = "  \"properties\": {"]
24520#[doc = "    \"public_key\": {"]
24521#[doc = "      \"description\": \"Validator key which will be used to sign transactions on behalf of signer_id\","]
24522#[doc = "      \"allOf\": ["]
24523#[doc = "        {"]
24524#[doc = "          \"$ref\": \"#/components/schemas/PublicKey\""]
24525#[doc = "        }"]
24526#[doc = "      ]"]
24527#[doc = "    },"]
24528#[doc = "    \"stake\": {"]
24529#[doc = "      \"description\": \"Amount of tokens to stake.\","]
24530#[doc = "      \"allOf\": ["]
24531#[doc = "        {"]
24532#[doc = "          \"$ref\": \"#/components/schemas/NearToken\""]
24533#[doc = "        }"]
24534#[doc = "      ]"]
24535#[doc = "    }"]
24536#[doc = "  }"]
24537#[doc = "}"]
24538#[doc = r" ```"]
24539#[doc = r" </details>"]
24540#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
24541pub struct StakeAction {
24542    #[doc = "Validator key which will be used to sign transactions on behalf of signer_id"]
24543    pub public_key: PublicKey,
24544    #[doc = "Amount of tokens to stake."]
24545    pub stake: NearToken,
24546}
24547impl ::std::convert::From<&StakeAction> for StakeAction {
24548    fn from(value: &StakeAction) -> Self {
24549        value.clone()
24550    }
24551}
24552#[doc = "See crate::types::StateChangeCause for details."]
24553#[doc = r""]
24554#[doc = r" <details><summary>JSON schema</summary>"]
24555#[doc = r""]
24556#[doc = r" ```json"]
24557#[doc = "{"]
24558#[doc = "  \"description\": \"See crate::types::StateChangeCause for details.\","]
24559#[doc = "  \"oneOf\": ["]
24560#[doc = "    {"]
24561#[doc = "      \"type\": \"object\","]
24562#[doc = "      \"required\": ["]
24563#[doc = "        \"type\""]
24564#[doc = "      ],"]
24565#[doc = "      \"properties\": {"]
24566#[doc = "        \"type\": {"]
24567#[doc = "          \"type\": \"string\","]
24568#[doc = "          \"enum\": ["]
24569#[doc = "            \"not_writable_to_disk\""]
24570#[doc = "          ]"]
24571#[doc = "        }"]
24572#[doc = "      }"]
24573#[doc = "    },"]
24574#[doc = "    {"]
24575#[doc = "      \"type\": \"object\","]
24576#[doc = "      \"required\": ["]
24577#[doc = "        \"type\""]
24578#[doc = "      ],"]
24579#[doc = "      \"properties\": {"]
24580#[doc = "        \"type\": {"]
24581#[doc = "          \"type\": \"string\","]
24582#[doc = "          \"enum\": ["]
24583#[doc = "            \"initial_state\""]
24584#[doc = "          ]"]
24585#[doc = "        }"]
24586#[doc = "      }"]
24587#[doc = "    },"]
24588#[doc = "    {"]
24589#[doc = "      \"type\": \"object\","]
24590#[doc = "      \"required\": ["]
24591#[doc = "        \"tx_hash\","]
24592#[doc = "        \"type\""]
24593#[doc = "      ],"]
24594#[doc = "      \"properties\": {"]
24595#[doc = "        \"tx_hash\": {"]
24596#[doc = "          \"$ref\": \"#/components/schemas/CryptoHash\""]
24597#[doc = "        },"]
24598#[doc = "        \"type\": {"]
24599#[doc = "          \"type\": \"string\","]
24600#[doc = "          \"enum\": ["]
24601#[doc = "            \"transaction_processing\""]
24602#[doc = "          ]"]
24603#[doc = "        }"]
24604#[doc = "      }"]
24605#[doc = "    },"]
24606#[doc = "    {"]
24607#[doc = "      \"type\": \"object\","]
24608#[doc = "      \"required\": ["]
24609#[doc = "        \"receipt_hash\","]
24610#[doc = "        \"type\""]
24611#[doc = "      ],"]
24612#[doc = "      \"properties\": {"]
24613#[doc = "        \"receipt_hash\": {"]
24614#[doc = "          \"$ref\": \"#/components/schemas/CryptoHash\""]
24615#[doc = "        },"]
24616#[doc = "        \"type\": {"]
24617#[doc = "          \"type\": \"string\","]
24618#[doc = "          \"enum\": ["]
24619#[doc = "            \"action_receipt_processing_started\""]
24620#[doc = "          ]"]
24621#[doc = "        }"]
24622#[doc = "      }"]
24623#[doc = "    },"]
24624#[doc = "    {"]
24625#[doc = "      \"type\": \"object\","]
24626#[doc = "      \"required\": ["]
24627#[doc = "        \"receipt_hash\","]
24628#[doc = "        \"type\""]
24629#[doc = "      ],"]
24630#[doc = "      \"properties\": {"]
24631#[doc = "        \"receipt_hash\": {"]
24632#[doc = "          \"$ref\": \"#/components/schemas/CryptoHash\""]
24633#[doc = "        },"]
24634#[doc = "        \"type\": {"]
24635#[doc = "          \"type\": \"string\","]
24636#[doc = "          \"enum\": ["]
24637#[doc = "            \"action_receipt_gas_reward\""]
24638#[doc = "          ]"]
24639#[doc = "        }"]
24640#[doc = "      }"]
24641#[doc = "    },"]
24642#[doc = "    {"]
24643#[doc = "      \"type\": \"object\","]
24644#[doc = "      \"required\": ["]
24645#[doc = "        \"receipt_hash\","]
24646#[doc = "        \"type\""]
24647#[doc = "      ],"]
24648#[doc = "      \"properties\": {"]
24649#[doc = "        \"receipt_hash\": {"]
24650#[doc = "          \"$ref\": \"#/components/schemas/CryptoHash\""]
24651#[doc = "        },"]
24652#[doc = "        \"type\": {"]
24653#[doc = "          \"type\": \"string\","]
24654#[doc = "          \"enum\": ["]
24655#[doc = "            \"receipt_processing\""]
24656#[doc = "          ]"]
24657#[doc = "        }"]
24658#[doc = "      }"]
24659#[doc = "    },"]
24660#[doc = "    {"]
24661#[doc = "      \"type\": \"object\","]
24662#[doc = "      \"required\": ["]
24663#[doc = "        \"receipt_hash\","]
24664#[doc = "        \"type\""]
24665#[doc = "      ],"]
24666#[doc = "      \"properties\": {"]
24667#[doc = "        \"receipt_hash\": {"]
24668#[doc = "          \"$ref\": \"#/components/schemas/CryptoHash\""]
24669#[doc = "        },"]
24670#[doc = "        \"type\": {"]
24671#[doc = "          \"type\": \"string\","]
24672#[doc = "          \"enum\": ["]
24673#[doc = "            \"postponed_receipt\""]
24674#[doc = "          ]"]
24675#[doc = "        }"]
24676#[doc = "      }"]
24677#[doc = "    },"]
24678#[doc = "    {"]
24679#[doc = "      \"type\": \"object\","]
24680#[doc = "      \"required\": ["]
24681#[doc = "        \"type\""]
24682#[doc = "      ],"]
24683#[doc = "      \"properties\": {"]
24684#[doc = "        \"type\": {"]
24685#[doc = "          \"type\": \"string\","]
24686#[doc = "          \"enum\": ["]
24687#[doc = "            \"updated_delayed_receipts\""]
24688#[doc = "          ]"]
24689#[doc = "        }"]
24690#[doc = "      }"]
24691#[doc = "    },"]
24692#[doc = "    {"]
24693#[doc = "      \"type\": \"object\","]
24694#[doc = "      \"required\": ["]
24695#[doc = "        \"type\""]
24696#[doc = "      ],"]
24697#[doc = "      \"properties\": {"]
24698#[doc = "        \"type\": {"]
24699#[doc = "          \"type\": \"string\","]
24700#[doc = "          \"enum\": ["]
24701#[doc = "            \"validator_accounts_update\""]
24702#[doc = "          ]"]
24703#[doc = "        }"]
24704#[doc = "      }"]
24705#[doc = "    },"]
24706#[doc = "    {"]
24707#[doc = "      \"type\": \"object\","]
24708#[doc = "      \"required\": ["]
24709#[doc = "        \"type\""]
24710#[doc = "      ],"]
24711#[doc = "      \"properties\": {"]
24712#[doc = "        \"type\": {"]
24713#[doc = "          \"type\": \"string\","]
24714#[doc = "          \"enum\": ["]
24715#[doc = "            \"migration\""]
24716#[doc = "          ]"]
24717#[doc = "        }"]
24718#[doc = "      }"]
24719#[doc = "    },"]
24720#[doc = "    {"]
24721#[doc = "      \"type\": \"object\","]
24722#[doc = "      \"required\": ["]
24723#[doc = "        \"type\""]
24724#[doc = "      ],"]
24725#[doc = "      \"properties\": {"]
24726#[doc = "        \"type\": {"]
24727#[doc = "          \"type\": \"string\","]
24728#[doc = "          \"enum\": ["]
24729#[doc = "            \"bandwidth_scheduler_state_update\""]
24730#[doc = "          ]"]
24731#[doc = "        }"]
24732#[doc = "      }"]
24733#[doc = "    }"]
24734#[doc = "  ]"]
24735#[doc = "}"]
24736#[doc = r" ```"]
24737#[doc = r" </details>"]
24738#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
24739#[serde(tag = "type")]
24740pub enum StateChangeCauseView {
24741    #[serde(rename = "not_writable_to_disk")]
24742    NotWritableToDisk,
24743    #[serde(rename = "initial_state")]
24744    InitialState,
24745    #[serde(rename = "transaction_processing")]
24746    TransactionProcessing { tx_hash: CryptoHash },
24747    #[serde(rename = "action_receipt_processing_started")]
24748    ActionReceiptProcessingStarted { receipt_hash: CryptoHash },
24749    #[serde(rename = "action_receipt_gas_reward")]
24750    ActionReceiptGasReward { receipt_hash: CryptoHash },
24751    #[serde(rename = "receipt_processing")]
24752    ReceiptProcessing { receipt_hash: CryptoHash },
24753    #[serde(rename = "postponed_receipt")]
24754    PostponedReceipt { receipt_hash: CryptoHash },
24755    #[serde(rename = "updated_delayed_receipts")]
24756    UpdatedDelayedReceipts,
24757    #[serde(rename = "validator_accounts_update")]
24758    ValidatorAccountsUpdate,
24759    #[serde(rename = "migration")]
24760    Migration,
24761    #[serde(rename = "bandwidth_scheduler_state_update")]
24762    BandwidthSchedulerStateUpdate,
24763}
24764impl ::std::convert::From<&Self> for StateChangeCauseView {
24765    fn from(value: &StateChangeCauseView) -> Self {
24766        value.clone()
24767    }
24768}
24769#[doc = "It is a [serializable view] of [`StateChangeKind`].\n\n[serializable view]: ./index.html\n[`StateChangeKind`]: ../types/struct.StateChangeKind.html"]
24770#[doc = r""]
24771#[doc = r" <details><summary>JSON schema</summary>"]
24772#[doc = r""]
24773#[doc = r" ```json"]
24774#[doc = "{"]
24775#[doc = "  \"description\": \"It is a [serializable view] of [`StateChangeKind`].\\n\\n[serializable view]: ./index.html\\n[`StateChangeKind`]: ../types/struct.StateChangeKind.html\","]
24776#[doc = "  \"oneOf\": ["]
24777#[doc = "    {"]
24778#[doc = "      \"type\": \"object\","]
24779#[doc = "      \"required\": ["]
24780#[doc = "        \"account_id\","]
24781#[doc = "        \"type\""]
24782#[doc = "      ],"]
24783#[doc = "      \"properties\": {"]
24784#[doc = "        \"account_id\": {"]
24785#[doc = "          \"$ref\": \"#/components/schemas/AccountId\""]
24786#[doc = "        },"]
24787#[doc = "        \"type\": {"]
24788#[doc = "          \"type\": \"string\","]
24789#[doc = "          \"enum\": ["]
24790#[doc = "            \"account_touched\""]
24791#[doc = "          ]"]
24792#[doc = "        }"]
24793#[doc = "      }"]
24794#[doc = "    },"]
24795#[doc = "    {"]
24796#[doc = "      \"type\": \"object\","]
24797#[doc = "      \"required\": ["]
24798#[doc = "        \"account_id\","]
24799#[doc = "        \"type\""]
24800#[doc = "      ],"]
24801#[doc = "      \"properties\": {"]
24802#[doc = "        \"account_id\": {"]
24803#[doc = "          \"$ref\": \"#/components/schemas/AccountId\""]
24804#[doc = "        },"]
24805#[doc = "        \"type\": {"]
24806#[doc = "          \"type\": \"string\","]
24807#[doc = "          \"enum\": ["]
24808#[doc = "            \"access_key_touched\""]
24809#[doc = "          ]"]
24810#[doc = "        }"]
24811#[doc = "      }"]
24812#[doc = "    },"]
24813#[doc = "    {"]
24814#[doc = "      \"type\": \"object\","]
24815#[doc = "      \"required\": ["]
24816#[doc = "        \"account_id\","]
24817#[doc = "        \"type\""]
24818#[doc = "      ],"]
24819#[doc = "      \"properties\": {"]
24820#[doc = "        \"account_id\": {"]
24821#[doc = "          \"$ref\": \"#/components/schemas/AccountId\""]
24822#[doc = "        },"]
24823#[doc = "        \"type\": {"]
24824#[doc = "          \"type\": \"string\","]
24825#[doc = "          \"enum\": ["]
24826#[doc = "            \"data_touched\""]
24827#[doc = "          ]"]
24828#[doc = "        }"]
24829#[doc = "      }"]
24830#[doc = "    },"]
24831#[doc = "    {"]
24832#[doc = "      \"type\": \"object\","]
24833#[doc = "      \"required\": ["]
24834#[doc = "        \"account_id\","]
24835#[doc = "        \"type\""]
24836#[doc = "      ],"]
24837#[doc = "      \"properties\": {"]
24838#[doc = "        \"account_id\": {"]
24839#[doc = "          \"$ref\": \"#/components/schemas/AccountId\""]
24840#[doc = "        },"]
24841#[doc = "        \"type\": {"]
24842#[doc = "          \"type\": \"string\","]
24843#[doc = "          \"enum\": ["]
24844#[doc = "            \"contract_code_touched\""]
24845#[doc = "          ]"]
24846#[doc = "        }"]
24847#[doc = "      }"]
24848#[doc = "    }"]
24849#[doc = "  ]"]
24850#[doc = "}"]
24851#[doc = r" ```"]
24852#[doc = r" </details>"]
24853#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
24854#[serde(tag = "type", content = "account_id")]
24855pub enum StateChangeKindView {
24856    #[serde(rename = "account_touched")]
24857    AccountTouched(AccountId),
24858    #[serde(rename = "access_key_touched")]
24859    AccessKeyTouched(AccountId),
24860    #[serde(rename = "data_touched")]
24861    DataTouched(AccountId),
24862    #[serde(rename = "contract_code_touched")]
24863    ContractCodeTouched(AccountId),
24864}
24865impl ::std::convert::From<&Self> for StateChangeKindView {
24866    fn from(value: &StateChangeKindView) -> Self {
24867        value.clone()
24868    }
24869}
24870#[doc = "`StateChangeWithCauseView`"]
24871#[doc = r""]
24872#[doc = r" <details><summary>JSON schema</summary>"]
24873#[doc = r""]
24874#[doc = r" ```json"]
24875#[doc = "{"]
24876#[doc = "  \"type\": \"object\","]
24877#[doc = "  \"oneOf\": ["]
24878#[doc = "    {"]
24879#[doc = "      \"type\": \"object\","]
24880#[doc = "      \"required\": ["]
24881#[doc = "        \"change\","]
24882#[doc = "        \"type\""]
24883#[doc = "      ],"]
24884#[doc = "      \"properties\": {"]
24885#[doc = "        \"change\": {"]
24886#[doc = "          \"description\": \"A view of the account\","]
24887#[doc = "          \"type\": \"object\","]
24888#[doc = "          \"required\": ["]
24889#[doc = "            \"account_id\","]
24890#[doc = "            \"amount\","]
24891#[doc = "            \"code_hash\","]
24892#[doc = "            \"locked\","]
24893#[doc = "            \"storage_usage\""]
24894#[doc = "          ],"]
24895#[doc = "          \"properties\": {"]
24896#[doc = "            \"account_id\": {"]
24897#[doc = "              \"$ref\": \"#/components/schemas/AccountId\""]
24898#[doc = "            },"]
24899#[doc = "            \"amount\": {"]
24900#[doc = "              \"$ref\": \"#/components/schemas/NearToken\""]
24901#[doc = "            },"]
24902#[doc = "            \"code_hash\": {"]
24903#[doc = "              \"$ref\": \"#/components/schemas/CryptoHash\""]
24904#[doc = "            },"]
24905#[doc = "            \"global_contract_account_id\": {"]
24906#[doc = "              \"anyOf\": ["]
24907#[doc = "                {"]
24908#[doc = "                  \"$ref\": \"#/components/schemas/AccountId\""]
24909#[doc = "                },"]
24910#[doc = "                {"]
24911#[doc = "                  \"type\": \"null\""]
24912#[doc = "                }"]
24913#[doc = "              ]"]
24914#[doc = "            },"]
24915#[doc = "            \"global_contract_hash\": {"]
24916#[doc = "              \"anyOf\": ["]
24917#[doc = "                {"]
24918#[doc = "                  \"$ref\": \"#/components/schemas/CryptoHash\""]
24919#[doc = "                },"]
24920#[doc = "                {"]
24921#[doc = "                  \"type\": \"null\""]
24922#[doc = "                }"]
24923#[doc = "              ]"]
24924#[doc = "            },"]
24925#[doc = "            \"locked\": {"]
24926#[doc = "              \"$ref\": \"#/components/schemas/NearToken\""]
24927#[doc = "            },"]
24928#[doc = "            \"storage_paid_at\": {"]
24929#[doc = "              \"description\": \"TODO(2271): deprecated.\","]
24930#[doc = "              \"default\": 0,"]
24931#[doc = "              \"type\": \"integer\","]
24932#[doc = "              \"format\": \"uint64\","]
24933#[doc = "              \"minimum\": 0.0"]
24934#[doc = "            },"]
24935#[doc = "            \"storage_usage\": {"]
24936#[doc = "              \"type\": \"integer\","]
24937#[doc = "              \"format\": \"uint64\","]
24938#[doc = "              \"minimum\": 0.0"]
24939#[doc = "            }"]
24940#[doc = "          }"]
24941#[doc = "        },"]
24942#[doc = "        \"type\": {"]
24943#[doc = "          \"type\": \"string\","]
24944#[doc = "          \"enum\": ["]
24945#[doc = "            \"account_update\""]
24946#[doc = "          ]"]
24947#[doc = "        }"]
24948#[doc = "      }"]
24949#[doc = "    },"]
24950#[doc = "    {"]
24951#[doc = "      \"type\": \"object\","]
24952#[doc = "      \"required\": ["]
24953#[doc = "        \"change\","]
24954#[doc = "        \"type\""]
24955#[doc = "      ],"]
24956#[doc = "      \"properties\": {"]
24957#[doc = "        \"change\": {"]
24958#[doc = "          \"type\": \"object\","]
24959#[doc = "          \"required\": ["]
24960#[doc = "            \"account_id\""]
24961#[doc = "          ],"]
24962#[doc = "          \"properties\": {"]
24963#[doc = "            \"account_id\": {"]
24964#[doc = "              \"$ref\": \"#/components/schemas/AccountId\""]
24965#[doc = "            }"]
24966#[doc = "          }"]
24967#[doc = "        },"]
24968#[doc = "        \"type\": {"]
24969#[doc = "          \"type\": \"string\","]
24970#[doc = "          \"enum\": ["]
24971#[doc = "            \"account_deletion\""]
24972#[doc = "          ]"]
24973#[doc = "        }"]
24974#[doc = "      }"]
24975#[doc = "    },"]
24976#[doc = "    {"]
24977#[doc = "      \"type\": \"object\","]
24978#[doc = "      \"required\": ["]
24979#[doc = "        \"change\","]
24980#[doc = "        \"type\""]
24981#[doc = "      ],"]
24982#[doc = "      \"properties\": {"]
24983#[doc = "        \"change\": {"]
24984#[doc = "          \"type\": \"object\","]
24985#[doc = "          \"required\": ["]
24986#[doc = "            \"access_key\","]
24987#[doc = "            \"account_id\","]
24988#[doc = "            \"public_key\""]
24989#[doc = "          ],"]
24990#[doc = "          \"properties\": {"]
24991#[doc = "            \"access_key\": {"]
24992#[doc = "              \"$ref\": \"#/components/schemas/AccessKeyView\""]
24993#[doc = "            },"]
24994#[doc = "            \"account_id\": {"]
24995#[doc = "              \"$ref\": \"#/components/schemas/AccountId\""]
24996#[doc = "            },"]
24997#[doc = "            \"public_key\": {"]
24998#[doc = "              \"$ref\": \"#/components/schemas/PublicKey\""]
24999#[doc = "            }"]
25000#[doc = "          }"]
25001#[doc = "        },"]
25002#[doc = "        \"type\": {"]
25003#[doc = "          \"type\": \"string\","]
25004#[doc = "          \"enum\": ["]
25005#[doc = "            \"access_key_update\""]
25006#[doc = "          ]"]
25007#[doc = "        }"]
25008#[doc = "      }"]
25009#[doc = "    },"]
25010#[doc = "    {"]
25011#[doc = "      \"type\": \"object\","]
25012#[doc = "      \"required\": ["]
25013#[doc = "        \"change\","]
25014#[doc = "        \"type\""]
25015#[doc = "      ],"]
25016#[doc = "      \"properties\": {"]
25017#[doc = "        \"change\": {"]
25018#[doc = "          \"type\": \"object\","]
25019#[doc = "          \"required\": ["]
25020#[doc = "            \"account_id\","]
25021#[doc = "            \"public_key\""]
25022#[doc = "          ],"]
25023#[doc = "          \"properties\": {"]
25024#[doc = "            \"account_id\": {"]
25025#[doc = "              \"$ref\": \"#/components/schemas/AccountId\""]
25026#[doc = "            },"]
25027#[doc = "            \"public_key\": {"]
25028#[doc = "              \"$ref\": \"#/components/schemas/PublicKey\""]
25029#[doc = "            }"]
25030#[doc = "          }"]
25031#[doc = "        },"]
25032#[doc = "        \"type\": {"]
25033#[doc = "          \"type\": \"string\","]
25034#[doc = "          \"enum\": ["]
25035#[doc = "            \"access_key_deletion\""]
25036#[doc = "          ]"]
25037#[doc = "        }"]
25038#[doc = "      }"]
25039#[doc = "    },"]
25040#[doc = "    {"]
25041#[doc = "      \"type\": \"object\","]
25042#[doc = "      \"required\": ["]
25043#[doc = "        \"change\","]
25044#[doc = "        \"type\""]
25045#[doc = "      ],"]
25046#[doc = "      \"properties\": {"]
25047#[doc = "        \"change\": {"]
25048#[doc = "          \"type\": \"object\","]
25049#[doc = "          \"required\": ["]
25050#[doc = "            \"account_id\","]
25051#[doc = "            \"gas_key\","]
25052#[doc = "            \"public_key\""]
25053#[doc = "          ],"]
25054#[doc = "          \"properties\": {"]
25055#[doc = "            \"account_id\": {"]
25056#[doc = "              \"$ref\": \"#/components/schemas/AccountId\""]
25057#[doc = "            },"]
25058#[doc = "            \"gas_key\": {"]
25059#[doc = "              \"$ref\": \"#/components/schemas/GasKeyView\""]
25060#[doc = "            },"]
25061#[doc = "            \"public_key\": {"]
25062#[doc = "              \"$ref\": \"#/components/schemas/PublicKey\""]
25063#[doc = "            }"]
25064#[doc = "          }"]
25065#[doc = "        },"]
25066#[doc = "        \"type\": {"]
25067#[doc = "          \"type\": \"string\","]
25068#[doc = "          \"enum\": ["]
25069#[doc = "            \"gas_key_update\""]
25070#[doc = "          ]"]
25071#[doc = "        }"]
25072#[doc = "      }"]
25073#[doc = "    },"]
25074#[doc = "    {"]
25075#[doc = "      \"type\": \"object\","]
25076#[doc = "      \"required\": ["]
25077#[doc = "        \"change\","]
25078#[doc = "        \"type\""]
25079#[doc = "      ],"]
25080#[doc = "      \"properties\": {"]
25081#[doc = "        \"change\": {"]
25082#[doc = "          \"type\": \"object\","]
25083#[doc = "          \"required\": ["]
25084#[doc = "            \"account_id\","]
25085#[doc = "            \"index\","]
25086#[doc = "            \"nonce\","]
25087#[doc = "            \"public_key\""]
25088#[doc = "          ],"]
25089#[doc = "          \"properties\": {"]
25090#[doc = "            \"account_id\": {"]
25091#[doc = "              \"$ref\": \"#/components/schemas/AccountId\""]
25092#[doc = "            },"]
25093#[doc = "            \"index\": {"]
25094#[doc = "              \"type\": \"integer\","]
25095#[doc = "              \"format\": \"uint32\","]
25096#[doc = "              \"minimum\": 0.0"]
25097#[doc = "            },"]
25098#[doc = "            \"nonce\": {"]
25099#[doc = "              \"type\": \"integer\","]
25100#[doc = "              \"format\": \"uint64\","]
25101#[doc = "              \"minimum\": 0.0"]
25102#[doc = "            },"]
25103#[doc = "            \"public_key\": {"]
25104#[doc = "              \"$ref\": \"#/components/schemas/PublicKey\""]
25105#[doc = "            }"]
25106#[doc = "          }"]
25107#[doc = "        },"]
25108#[doc = "        \"type\": {"]
25109#[doc = "          \"type\": \"string\","]
25110#[doc = "          \"enum\": ["]
25111#[doc = "            \"gas_key_nonce_update\""]
25112#[doc = "          ]"]
25113#[doc = "        }"]
25114#[doc = "      }"]
25115#[doc = "    },"]
25116#[doc = "    {"]
25117#[doc = "      \"type\": \"object\","]
25118#[doc = "      \"required\": ["]
25119#[doc = "        \"change\","]
25120#[doc = "        \"type\""]
25121#[doc = "      ],"]
25122#[doc = "      \"properties\": {"]
25123#[doc = "        \"change\": {"]
25124#[doc = "          \"type\": \"object\","]
25125#[doc = "          \"required\": ["]
25126#[doc = "            \"account_id\","]
25127#[doc = "            \"public_key\""]
25128#[doc = "          ],"]
25129#[doc = "          \"properties\": {"]
25130#[doc = "            \"account_id\": {"]
25131#[doc = "              \"$ref\": \"#/components/schemas/AccountId\""]
25132#[doc = "            },"]
25133#[doc = "            \"public_key\": {"]
25134#[doc = "              \"$ref\": \"#/components/schemas/PublicKey\""]
25135#[doc = "            }"]
25136#[doc = "          }"]
25137#[doc = "        },"]
25138#[doc = "        \"type\": {"]
25139#[doc = "          \"type\": \"string\","]
25140#[doc = "          \"enum\": ["]
25141#[doc = "            \"gas_key_deletion\""]
25142#[doc = "          ]"]
25143#[doc = "        }"]
25144#[doc = "      }"]
25145#[doc = "    },"]
25146#[doc = "    {"]
25147#[doc = "      \"type\": \"object\","]
25148#[doc = "      \"required\": ["]
25149#[doc = "        \"change\","]
25150#[doc = "        \"type\""]
25151#[doc = "      ],"]
25152#[doc = "      \"properties\": {"]
25153#[doc = "        \"change\": {"]
25154#[doc = "          \"type\": \"object\","]
25155#[doc = "          \"required\": ["]
25156#[doc = "            \"account_id\","]
25157#[doc = "            \"key_base64\","]
25158#[doc = "            \"value_base64\""]
25159#[doc = "          ],"]
25160#[doc = "          \"properties\": {"]
25161#[doc = "            \"account_id\": {"]
25162#[doc = "              \"$ref\": \"#/components/schemas/AccountId\""]
25163#[doc = "            },"]
25164#[doc = "            \"key_base64\": {"]
25165#[doc = "              \"$ref\": \"#/components/schemas/StoreKey\""]
25166#[doc = "            },"]
25167#[doc = "            \"value_base64\": {"]
25168#[doc = "              \"$ref\": \"#/components/schemas/StoreValue\""]
25169#[doc = "            }"]
25170#[doc = "          }"]
25171#[doc = "        },"]
25172#[doc = "        \"type\": {"]
25173#[doc = "          \"type\": \"string\","]
25174#[doc = "          \"enum\": ["]
25175#[doc = "            \"data_update\""]
25176#[doc = "          ]"]
25177#[doc = "        }"]
25178#[doc = "      }"]
25179#[doc = "    },"]
25180#[doc = "    {"]
25181#[doc = "      \"type\": \"object\","]
25182#[doc = "      \"required\": ["]
25183#[doc = "        \"change\","]
25184#[doc = "        \"type\""]
25185#[doc = "      ],"]
25186#[doc = "      \"properties\": {"]
25187#[doc = "        \"change\": {"]
25188#[doc = "          \"type\": \"object\","]
25189#[doc = "          \"required\": ["]
25190#[doc = "            \"account_id\","]
25191#[doc = "            \"key_base64\""]
25192#[doc = "          ],"]
25193#[doc = "          \"properties\": {"]
25194#[doc = "            \"account_id\": {"]
25195#[doc = "              \"$ref\": \"#/components/schemas/AccountId\""]
25196#[doc = "            },"]
25197#[doc = "            \"key_base64\": {"]
25198#[doc = "              \"$ref\": \"#/components/schemas/StoreKey\""]
25199#[doc = "            }"]
25200#[doc = "          }"]
25201#[doc = "        },"]
25202#[doc = "        \"type\": {"]
25203#[doc = "          \"type\": \"string\","]
25204#[doc = "          \"enum\": ["]
25205#[doc = "            \"data_deletion\""]
25206#[doc = "          ]"]
25207#[doc = "        }"]
25208#[doc = "      }"]
25209#[doc = "    },"]
25210#[doc = "    {"]
25211#[doc = "      \"type\": \"object\","]
25212#[doc = "      \"required\": ["]
25213#[doc = "        \"change\","]
25214#[doc = "        \"type\""]
25215#[doc = "      ],"]
25216#[doc = "      \"properties\": {"]
25217#[doc = "        \"change\": {"]
25218#[doc = "          \"type\": \"object\","]
25219#[doc = "          \"required\": ["]
25220#[doc = "            \"account_id\","]
25221#[doc = "            \"code_base64\""]
25222#[doc = "          ],"]
25223#[doc = "          \"properties\": {"]
25224#[doc = "            \"account_id\": {"]
25225#[doc = "              \"$ref\": \"#/components/schemas/AccountId\""]
25226#[doc = "            },"]
25227#[doc = "            \"code_base64\": {"]
25228#[doc = "              \"type\": \"string\""]
25229#[doc = "            }"]
25230#[doc = "          }"]
25231#[doc = "        },"]
25232#[doc = "        \"type\": {"]
25233#[doc = "          \"type\": \"string\","]
25234#[doc = "          \"enum\": ["]
25235#[doc = "            \"contract_code_update\""]
25236#[doc = "          ]"]
25237#[doc = "        }"]
25238#[doc = "      }"]
25239#[doc = "    },"]
25240#[doc = "    {"]
25241#[doc = "      \"type\": \"object\","]
25242#[doc = "      \"required\": ["]
25243#[doc = "        \"change\","]
25244#[doc = "        \"type\""]
25245#[doc = "      ],"]
25246#[doc = "      \"properties\": {"]
25247#[doc = "        \"change\": {"]
25248#[doc = "          \"type\": \"object\","]
25249#[doc = "          \"required\": ["]
25250#[doc = "            \"account_id\""]
25251#[doc = "          ],"]
25252#[doc = "          \"properties\": {"]
25253#[doc = "            \"account_id\": {"]
25254#[doc = "              \"$ref\": \"#/components/schemas/AccountId\""]
25255#[doc = "            }"]
25256#[doc = "          }"]
25257#[doc = "        },"]
25258#[doc = "        \"type\": {"]
25259#[doc = "          \"type\": \"string\","]
25260#[doc = "          \"enum\": ["]
25261#[doc = "            \"contract_code_deletion\""]
25262#[doc = "          ]"]
25263#[doc = "        }"]
25264#[doc = "      }"]
25265#[doc = "    }"]
25266#[doc = "  ],"]
25267#[doc = "  \"required\": ["]
25268#[doc = "    \"cause\""]
25269#[doc = "  ],"]
25270#[doc = "  \"properties\": {"]
25271#[doc = "    \"cause\": {"]
25272#[doc = "      \"$ref\": \"#/components/schemas/StateChangeCauseView\""]
25273#[doc = "    }"]
25274#[doc = "  }"]
25275#[doc = "}"]
25276#[doc = r" ```"]
25277#[doc = r" </details>"]
25278#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
25279#[serde(untagged)]
25280pub enum StateChangeWithCauseView {
25281    Variant0 {
25282        cause: StateChangeCauseView,
25283        change: StateChangeWithCauseViewVariant0Change,
25284        #[serde(rename = "type")]
25285        type_: StateChangeWithCauseViewVariant0Type,
25286    },
25287    Variant1 {
25288        cause: StateChangeCauseView,
25289        change: StateChangeWithCauseViewVariant1Change,
25290        #[serde(rename = "type")]
25291        type_: StateChangeWithCauseViewVariant1Type,
25292    },
25293    Variant2 {
25294        cause: StateChangeCauseView,
25295        change: StateChangeWithCauseViewVariant2Change,
25296        #[serde(rename = "type")]
25297        type_: StateChangeWithCauseViewVariant2Type,
25298    },
25299    Variant3 {
25300        cause: StateChangeCauseView,
25301        change: StateChangeWithCauseViewVariant3Change,
25302        #[serde(rename = "type")]
25303        type_: StateChangeWithCauseViewVariant3Type,
25304    },
25305    Variant4 {
25306        cause: StateChangeCauseView,
25307        change: StateChangeWithCauseViewVariant4Change,
25308        #[serde(rename = "type")]
25309        type_: StateChangeWithCauseViewVariant4Type,
25310    },
25311    Variant5 {
25312        cause: StateChangeCauseView,
25313        change: StateChangeWithCauseViewVariant5Change,
25314        #[serde(rename = "type")]
25315        type_: StateChangeWithCauseViewVariant5Type,
25316    },
25317    Variant6 {
25318        cause: StateChangeCauseView,
25319        change: StateChangeWithCauseViewVariant6Change,
25320        #[serde(rename = "type")]
25321        type_: StateChangeWithCauseViewVariant6Type,
25322    },
25323    Variant7 {
25324        cause: StateChangeCauseView,
25325        change: StateChangeWithCauseViewVariant7Change,
25326        #[serde(rename = "type")]
25327        type_: StateChangeWithCauseViewVariant7Type,
25328    },
25329    Variant8 {
25330        cause: StateChangeCauseView,
25331        change: StateChangeWithCauseViewVariant8Change,
25332        #[serde(rename = "type")]
25333        type_: StateChangeWithCauseViewVariant8Type,
25334    },
25335    Variant9 {
25336        cause: StateChangeCauseView,
25337        change: StateChangeWithCauseViewVariant9Change,
25338        #[serde(rename = "type")]
25339        type_: StateChangeWithCauseViewVariant9Type,
25340    },
25341    Variant10 {
25342        cause: StateChangeCauseView,
25343        change: StateChangeWithCauseViewVariant10Change,
25344        #[serde(rename = "type")]
25345        type_: StateChangeWithCauseViewVariant10Type,
25346    },
25347}
25348impl ::std::convert::From<&Self> for StateChangeWithCauseView {
25349    fn from(value: &StateChangeWithCauseView) -> Self {
25350        value.clone()
25351    }
25352}
25353#[doc = "A view of the account"]
25354#[doc = r""]
25355#[doc = r" <details><summary>JSON schema</summary>"]
25356#[doc = r""]
25357#[doc = r" ```json"]
25358#[doc = "{"]
25359#[doc = "  \"description\": \"A view of the account\","]
25360#[doc = "  \"type\": \"object\","]
25361#[doc = "  \"required\": ["]
25362#[doc = "    \"account_id\","]
25363#[doc = "    \"amount\","]
25364#[doc = "    \"code_hash\","]
25365#[doc = "    \"locked\","]
25366#[doc = "    \"storage_usage\""]
25367#[doc = "  ],"]
25368#[doc = "  \"properties\": {"]
25369#[doc = "    \"access_key\": false,"]
25370#[doc = "    \"account_id\": {"]
25371#[doc = "      \"$ref\": \"#/components/schemas/AccountId\""]
25372#[doc = "    },"]
25373#[doc = "    \"amount\": {"]
25374#[doc = "      \"$ref\": \"#/components/schemas/NearToken\""]
25375#[doc = "    },"]
25376#[doc = "    \"code_base64\": false,"]
25377#[doc = "    \"code_hash\": {"]
25378#[doc = "      \"$ref\": \"#/components/schemas/CryptoHash\""]
25379#[doc = "    },"]
25380#[doc = "    \"gas_key\": false,"]
25381#[doc = "    \"global_contract_account_id\": {"]
25382#[doc = "      \"anyOf\": ["]
25383#[doc = "        {"]
25384#[doc = "          \"$ref\": \"#/components/schemas/AccountId\""]
25385#[doc = "        },"]
25386#[doc = "        {"]
25387#[doc = "          \"type\": \"null\""]
25388#[doc = "        }"]
25389#[doc = "      ]"]
25390#[doc = "    },"]
25391#[doc = "    \"global_contract_hash\": {"]
25392#[doc = "      \"anyOf\": ["]
25393#[doc = "        {"]
25394#[doc = "          \"$ref\": \"#/components/schemas/CryptoHash\""]
25395#[doc = "        },"]
25396#[doc = "        {"]
25397#[doc = "          \"type\": \"null\""]
25398#[doc = "        }"]
25399#[doc = "      ]"]
25400#[doc = "    },"]
25401#[doc = "    \"index\": false,"]
25402#[doc = "    \"key_base64\": false,"]
25403#[doc = "    \"locked\": {"]
25404#[doc = "      \"$ref\": \"#/components/schemas/NearToken\""]
25405#[doc = "    },"]
25406#[doc = "    \"nonce\": false,"]
25407#[doc = "    \"public_key\": false,"]
25408#[doc = "    \"storage_paid_at\": {"]
25409#[doc = "      \"description\": \"TODO(2271): deprecated.\","]
25410#[doc = "      \"default\": 0,"]
25411#[doc = "      \"type\": \"integer\","]
25412#[doc = "      \"format\": \"uint64\","]
25413#[doc = "      \"minimum\": 0.0"]
25414#[doc = "    },"]
25415#[doc = "    \"storage_usage\": {"]
25416#[doc = "      \"type\": \"integer\","]
25417#[doc = "      \"format\": \"uint64\","]
25418#[doc = "      \"minimum\": 0.0"]
25419#[doc = "    },"]
25420#[doc = "    \"value_base64\": false"]
25421#[doc = "  }"]
25422#[doc = "}"]
25423#[doc = r" ```"]
25424#[doc = r" </details>"]
25425#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
25426pub struct StateChangeWithCauseViewVariant0Change {
25427    pub account_id: AccountId,
25428    pub amount: NearToken,
25429    pub code_hash: CryptoHash,
25430    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
25431    pub global_contract_account_id: ::std::option::Option<AccountId>,
25432    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
25433    pub global_contract_hash: ::std::option::Option<CryptoHash>,
25434    pub locked: NearToken,
25435    #[doc = "TODO(2271): deprecated."]
25436    #[serde(default)]
25437    pub storage_paid_at: u64,
25438    pub storage_usage: u64,
25439}
25440impl ::std::convert::From<&StateChangeWithCauseViewVariant0Change>
25441    for StateChangeWithCauseViewVariant0Change
25442{
25443    fn from(value: &StateChangeWithCauseViewVariant0Change) -> Self {
25444        value.clone()
25445    }
25446}
25447#[doc = "`StateChangeWithCauseViewVariant0Type`"]
25448#[doc = r""]
25449#[doc = r" <details><summary>JSON schema</summary>"]
25450#[doc = r""]
25451#[doc = r" ```json"]
25452#[doc = "{"]
25453#[doc = "  \"type\": \"string\","]
25454#[doc = "  \"enum\": ["]
25455#[doc = "    \"account_update\""]
25456#[doc = "  ]"]
25457#[doc = "}"]
25458#[doc = r" ```"]
25459#[doc = r" </details>"]
25460#[derive(
25461    :: serde :: Deserialize,
25462    :: serde :: Serialize,
25463    Clone,
25464    Copy,
25465    Debug,
25466    Eq,
25467    Hash,
25468    Ord,
25469    PartialEq,
25470    PartialOrd,
25471)]
25472pub enum StateChangeWithCauseViewVariant0Type {
25473    #[serde(rename = "account_update")]
25474    AccountUpdate,
25475}
25476impl ::std::convert::From<&Self> for StateChangeWithCauseViewVariant0Type {
25477    fn from(value: &StateChangeWithCauseViewVariant0Type) -> Self {
25478        value.clone()
25479    }
25480}
25481impl ::std::fmt::Display for StateChangeWithCauseViewVariant0Type {
25482    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
25483        match *self {
25484            Self::AccountUpdate => f.write_str("account_update"),
25485        }
25486    }
25487}
25488impl ::std::str::FromStr for StateChangeWithCauseViewVariant0Type {
25489    type Err = self::error::ConversionError;
25490    fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
25491        match value {
25492            "account_update" => Ok(Self::AccountUpdate),
25493            _ => Err("invalid value".into()),
25494        }
25495    }
25496}
25497impl ::std::convert::TryFrom<&str> for StateChangeWithCauseViewVariant0Type {
25498    type Error = self::error::ConversionError;
25499    fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
25500        value.parse()
25501    }
25502}
25503impl ::std::convert::TryFrom<&::std::string::String> for StateChangeWithCauseViewVariant0Type {
25504    type Error = self::error::ConversionError;
25505    fn try_from(
25506        value: &::std::string::String,
25507    ) -> ::std::result::Result<Self, self::error::ConversionError> {
25508        value.parse()
25509    }
25510}
25511impl ::std::convert::TryFrom<::std::string::String> for StateChangeWithCauseViewVariant0Type {
25512    type Error = self::error::ConversionError;
25513    fn try_from(
25514        value: ::std::string::String,
25515    ) -> ::std::result::Result<Self, self::error::ConversionError> {
25516        value.parse()
25517    }
25518}
25519#[doc = "`StateChangeWithCauseViewVariant10Change`"]
25520#[doc = r""]
25521#[doc = r" <details><summary>JSON schema</summary>"]
25522#[doc = r""]
25523#[doc = r" ```json"]
25524#[doc = "{"]
25525#[doc = "  \"type\": \"object\","]
25526#[doc = "  \"required\": ["]
25527#[doc = "    \"account_id\""]
25528#[doc = "  ],"]
25529#[doc = "  \"properties\": {"]
25530#[doc = "    \"access_key\": false,"]
25531#[doc = "    \"account_id\": {"]
25532#[doc = "      \"$ref\": \"#/components/schemas/AccountId\""]
25533#[doc = "    },"]
25534#[doc = "    \"amount\": false,"]
25535#[doc = "    \"code_base64\": false,"]
25536#[doc = "    \"code_hash\": false,"]
25537#[doc = "    \"gas_key\": false,"]
25538#[doc = "    \"global_contract_account_id\": false,"]
25539#[doc = "    \"global_contract_hash\": false,"]
25540#[doc = "    \"index\": false,"]
25541#[doc = "    \"key_base64\": false,"]
25542#[doc = "    \"locked\": false,"]
25543#[doc = "    \"nonce\": false,"]
25544#[doc = "    \"public_key\": false,"]
25545#[doc = "    \"storage_paid_at\": false,"]
25546#[doc = "    \"storage_usage\": false,"]
25547#[doc = "    \"value_base64\": false"]
25548#[doc = "  }"]
25549#[doc = "}"]
25550#[doc = r" ```"]
25551#[doc = r" </details>"]
25552#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
25553pub struct StateChangeWithCauseViewVariant10Change {
25554    pub account_id: AccountId,
25555}
25556impl ::std::convert::From<&StateChangeWithCauseViewVariant10Change>
25557    for StateChangeWithCauseViewVariant10Change
25558{
25559    fn from(value: &StateChangeWithCauseViewVariant10Change) -> Self {
25560        value.clone()
25561    }
25562}
25563#[doc = "`StateChangeWithCauseViewVariant10Type`"]
25564#[doc = r""]
25565#[doc = r" <details><summary>JSON schema</summary>"]
25566#[doc = r""]
25567#[doc = r" ```json"]
25568#[doc = "{"]
25569#[doc = "  \"type\": \"string\","]
25570#[doc = "  \"enum\": ["]
25571#[doc = "    \"contract_code_deletion\""]
25572#[doc = "  ]"]
25573#[doc = "}"]
25574#[doc = r" ```"]
25575#[doc = r" </details>"]
25576#[derive(
25577    :: serde :: Deserialize,
25578    :: serde :: Serialize,
25579    Clone,
25580    Copy,
25581    Debug,
25582    Eq,
25583    Hash,
25584    Ord,
25585    PartialEq,
25586    PartialOrd,
25587)]
25588pub enum StateChangeWithCauseViewVariant10Type {
25589    #[serde(rename = "contract_code_deletion")]
25590    ContractCodeDeletion,
25591}
25592impl ::std::convert::From<&Self> for StateChangeWithCauseViewVariant10Type {
25593    fn from(value: &StateChangeWithCauseViewVariant10Type) -> Self {
25594        value.clone()
25595    }
25596}
25597impl ::std::fmt::Display for StateChangeWithCauseViewVariant10Type {
25598    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
25599        match *self {
25600            Self::ContractCodeDeletion => f.write_str("contract_code_deletion"),
25601        }
25602    }
25603}
25604impl ::std::str::FromStr for StateChangeWithCauseViewVariant10Type {
25605    type Err = self::error::ConversionError;
25606    fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
25607        match value {
25608            "contract_code_deletion" => Ok(Self::ContractCodeDeletion),
25609            _ => Err("invalid value".into()),
25610        }
25611    }
25612}
25613impl ::std::convert::TryFrom<&str> for StateChangeWithCauseViewVariant10Type {
25614    type Error = self::error::ConversionError;
25615    fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
25616        value.parse()
25617    }
25618}
25619impl ::std::convert::TryFrom<&::std::string::String> for StateChangeWithCauseViewVariant10Type {
25620    type Error = self::error::ConversionError;
25621    fn try_from(
25622        value: &::std::string::String,
25623    ) -> ::std::result::Result<Self, self::error::ConversionError> {
25624        value.parse()
25625    }
25626}
25627impl ::std::convert::TryFrom<::std::string::String> for StateChangeWithCauseViewVariant10Type {
25628    type Error = self::error::ConversionError;
25629    fn try_from(
25630        value: ::std::string::String,
25631    ) -> ::std::result::Result<Self, self::error::ConversionError> {
25632        value.parse()
25633    }
25634}
25635#[doc = "`StateChangeWithCauseViewVariant1Change`"]
25636#[doc = r""]
25637#[doc = r" <details><summary>JSON schema</summary>"]
25638#[doc = r""]
25639#[doc = r" ```json"]
25640#[doc = "{"]
25641#[doc = "  \"type\": \"object\","]
25642#[doc = "  \"required\": ["]
25643#[doc = "    \"account_id\""]
25644#[doc = "  ],"]
25645#[doc = "  \"properties\": {"]
25646#[doc = "    \"access_key\": false,"]
25647#[doc = "    \"account_id\": {"]
25648#[doc = "      \"$ref\": \"#/components/schemas/AccountId\""]
25649#[doc = "    },"]
25650#[doc = "    \"amount\": false,"]
25651#[doc = "    \"code_base64\": false,"]
25652#[doc = "    \"code_hash\": false,"]
25653#[doc = "    \"gas_key\": false,"]
25654#[doc = "    \"global_contract_account_id\": false,"]
25655#[doc = "    \"global_contract_hash\": false,"]
25656#[doc = "    \"index\": false,"]
25657#[doc = "    \"key_base64\": false,"]
25658#[doc = "    \"locked\": false,"]
25659#[doc = "    \"nonce\": false,"]
25660#[doc = "    \"public_key\": false,"]
25661#[doc = "    \"storage_paid_at\": false,"]
25662#[doc = "    \"storage_usage\": false,"]
25663#[doc = "    \"value_base64\": false"]
25664#[doc = "  }"]
25665#[doc = "}"]
25666#[doc = r" ```"]
25667#[doc = r" </details>"]
25668#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
25669pub struct StateChangeWithCauseViewVariant1Change {
25670    pub account_id: AccountId,
25671}
25672impl ::std::convert::From<&StateChangeWithCauseViewVariant1Change>
25673    for StateChangeWithCauseViewVariant1Change
25674{
25675    fn from(value: &StateChangeWithCauseViewVariant1Change) -> Self {
25676        value.clone()
25677    }
25678}
25679#[doc = "`StateChangeWithCauseViewVariant1Type`"]
25680#[doc = r""]
25681#[doc = r" <details><summary>JSON schema</summary>"]
25682#[doc = r""]
25683#[doc = r" ```json"]
25684#[doc = "{"]
25685#[doc = "  \"type\": \"string\","]
25686#[doc = "  \"enum\": ["]
25687#[doc = "    \"account_deletion\""]
25688#[doc = "  ]"]
25689#[doc = "}"]
25690#[doc = r" ```"]
25691#[doc = r" </details>"]
25692#[derive(
25693    :: serde :: Deserialize,
25694    :: serde :: Serialize,
25695    Clone,
25696    Copy,
25697    Debug,
25698    Eq,
25699    Hash,
25700    Ord,
25701    PartialEq,
25702    PartialOrd,
25703)]
25704pub enum StateChangeWithCauseViewVariant1Type {
25705    #[serde(rename = "account_deletion")]
25706    AccountDeletion,
25707}
25708impl ::std::convert::From<&Self> for StateChangeWithCauseViewVariant1Type {
25709    fn from(value: &StateChangeWithCauseViewVariant1Type) -> Self {
25710        value.clone()
25711    }
25712}
25713impl ::std::fmt::Display for StateChangeWithCauseViewVariant1Type {
25714    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
25715        match *self {
25716            Self::AccountDeletion => f.write_str("account_deletion"),
25717        }
25718    }
25719}
25720impl ::std::str::FromStr for StateChangeWithCauseViewVariant1Type {
25721    type Err = self::error::ConversionError;
25722    fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
25723        match value {
25724            "account_deletion" => Ok(Self::AccountDeletion),
25725            _ => Err("invalid value".into()),
25726        }
25727    }
25728}
25729impl ::std::convert::TryFrom<&str> for StateChangeWithCauseViewVariant1Type {
25730    type Error = self::error::ConversionError;
25731    fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
25732        value.parse()
25733    }
25734}
25735impl ::std::convert::TryFrom<&::std::string::String> for StateChangeWithCauseViewVariant1Type {
25736    type Error = self::error::ConversionError;
25737    fn try_from(
25738        value: &::std::string::String,
25739    ) -> ::std::result::Result<Self, self::error::ConversionError> {
25740        value.parse()
25741    }
25742}
25743impl ::std::convert::TryFrom<::std::string::String> for StateChangeWithCauseViewVariant1Type {
25744    type Error = self::error::ConversionError;
25745    fn try_from(
25746        value: ::std::string::String,
25747    ) -> ::std::result::Result<Self, self::error::ConversionError> {
25748        value.parse()
25749    }
25750}
25751#[doc = "`StateChangeWithCauseViewVariant2Change`"]
25752#[doc = r""]
25753#[doc = r" <details><summary>JSON schema</summary>"]
25754#[doc = r""]
25755#[doc = r" ```json"]
25756#[doc = "{"]
25757#[doc = "  \"type\": \"object\","]
25758#[doc = "  \"required\": ["]
25759#[doc = "    \"access_key\","]
25760#[doc = "    \"account_id\","]
25761#[doc = "    \"public_key\""]
25762#[doc = "  ],"]
25763#[doc = "  \"properties\": {"]
25764#[doc = "    \"access_key\": {"]
25765#[doc = "      \"$ref\": \"#/components/schemas/AccessKeyView\""]
25766#[doc = "    },"]
25767#[doc = "    \"account_id\": {"]
25768#[doc = "      \"$ref\": \"#/components/schemas/AccountId\""]
25769#[doc = "    },"]
25770#[doc = "    \"amount\": false,"]
25771#[doc = "    \"code_base64\": false,"]
25772#[doc = "    \"code_hash\": false,"]
25773#[doc = "    \"gas_key\": false,"]
25774#[doc = "    \"global_contract_account_id\": false,"]
25775#[doc = "    \"global_contract_hash\": false,"]
25776#[doc = "    \"index\": false,"]
25777#[doc = "    \"key_base64\": false,"]
25778#[doc = "    \"locked\": false,"]
25779#[doc = "    \"nonce\": false,"]
25780#[doc = "    \"public_key\": {"]
25781#[doc = "      \"$ref\": \"#/components/schemas/PublicKey\""]
25782#[doc = "    },"]
25783#[doc = "    \"storage_paid_at\": false,"]
25784#[doc = "    \"storage_usage\": false,"]
25785#[doc = "    \"value_base64\": false"]
25786#[doc = "  }"]
25787#[doc = "}"]
25788#[doc = r" ```"]
25789#[doc = r" </details>"]
25790#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
25791pub struct StateChangeWithCauseViewVariant2Change {
25792    pub access_key: AccessKeyView,
25793    pub account_id: AccountId,
25794    pub public_key: PublicKey,
25795}
25796impl ::std::convert::From<&StateChangeWithCauseViewVariant2Change>
25797    for StateChangeWithCauseViewVariant2Change
25798{
25799    fn from(value: &StateChangeWithCauseViewVariant2Change) -> Self {
25800        value.clone()
25801    }
25802}
25803#[doc = "`StateChangeWithCauseViewVariant2Type`"]
25804#[doc = r""]
25805#[doc = r" <details><summary>JSON schema</summary>"]
25806#[doc = r""]
25807#[doc = r" ```json"]
25808#[doc = "{"]
25809#[doc = "  \"type\": \"string\","]
25810#[doc = "  \"enum\": ["]
25811#[doc = "    \"access_key_update\""]
25812#[doc = "  ]"]
25813#[doc = "}"]
25814#[doc = r" ```"]
25815#[doc = r" </details>"]
25816#[derive(
25817    :: serde :: Deserialize,
25818    :: serde :: Serialize,
25819    Clone,
25820    Copy,
25821    Debug,
25822    Eq,
25823    Hash,
25824    Ord,
25825    PartialEq,
25826    PartialOrd,
25827)]
25828pub enum StateChangeWithCauseViewVariant2Type {
25829    #[serde(rename = "access_key_update")]
25830    AccessKeyUpdate,
25831}
25832impl ::std::convert::From<&Self> for StateChangeWithCauseViewVariant2Type {
25833    fn from(value: &StateChangeWithCauseViewVariant2Type) -> Self {
25834        value.clone()
25835    }
25836}
25837impl ::std::fmt::Display for StateChangeWithCauseViewVariant2Type {
25838    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
25839        match *self {
25840            Self::AccessKeyUpdate => f.write_str("access_key_update"),
25841        }
25842    }
25843}
25844impl ::std::str::FromStr for StateChangeWithCauseViewVariant2Type {
25845    type Err = self::error::ConversionError;
25846    fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
25847        match value {
25848            "access_key_update" => Ok(Self::AccessKeyUpdate),
25849            _ => Err("invalid value".into()),
25850        }
25851    }
25852}
25853impl ::std::convert::TryFrom<&str> for StateChangeWithCauseViewVariant2Type {
25854    type Error = self::error::ConversionError;
25855    fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
25856        value.parse()
25857    }
25858}
25859impl ::std::convert::TryFrom<&::std::string::String> for StateChangeWithCauseViewVariant2Type {
25860    type Error = self::error::ConversionError;
25861    fn try_from(
25862        value: &::std::string::String,
25863    ) -> ::std::result::Result<Self, self::error::ConversionError> {
25864        value.parse()
25865    }
25866}
25867impl ::std::convert::TryFrom<::std::string::String> for StateChangeWithCauseViewVariant2Type {
25868    type Error = self::error::ConversionError;
25869    fn try_from(
25870        value: ::std::string::String,
25871    ) -> ::std::result::Result<Self, self::error::ConversionError> {
25872        value.parse()
25873    }
25874}
25875#[doc = "`StateChangeWithCauseViewVariant3Change`"]
25876#[doc = r""]
25877#[doc = r" <details><summary>JSON schema</summary>"]
25878#[doc = r""]
25879#[doc = r" ```json"]
25880#[doc = "{"]
25881#[doc = "  \"type\": \"object\","]
25882#[doc = "  \"required\": ["]
25883#[doc = "    \"account_id\","]
25884#[doc = "    \"public_key\""]
25885#[doc = "  ],"]
25886#[doc = "  \"properties\": {"]
25887#[doc = "    \"access_key\": false,"]
25888#[doc = "    \"account_id\": {"]
25889#[doc = "      \"$ref\": \"#/components/schemas/AccountId\""]
25890#[doc = "    },"]
25891#[doc = "    \"amount\": false,"]
25892#[doc = "    \"code_base64\": false,"]
25893#[doc = "    \"code_hash\": false,"]
25894#[doc = "    \"gas_key\": false,"]
25895#[doc = "    \"global_contract_account_id\": false,"]
25896#[doc = "    \"global_contract_hash\": false,"]
25897#[doc = "    \"index\": false,"]
25898#[doc = "    \"key_base64\": false,"]
25899#[doc = "    \"locked\": false,"]
25900#[doc = "    \"nonce\": false,"]
25901#[doc = "    \"public_key\": {"]
25902#[doc = "      \"$ref\": \"#/components/schemas/PublicKey\""]
25903#[doc = "    },"]
25904#[doc = "    \"storage_paid_at\": false,"]
25905#[doc = "    \"storage_usage\": false,"]
25906#[doc = "    \"value_base64\": false"]
25907#[doc = "  }"]
25908#[doc = "}"]
25909#[doc = r" ```"]
25910#[doc = r" </details>"]
25911#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
25912pub struct StateChangeWithCauseViewVariant3Change {
25913    pub account_id: AccountId,
25914    pub public_key: PublicKey,
25915}
25916impl ::std::convert::From<&StateChangeWithCauseViewVariant3Change>
25917    for StateChangeWithCauseViewVariant3Change
25918{
25919    fn from(value: &StateChangeWithCauseViewVariant3Change) -> Self {
25920        value.clone()
25921    }
25922}
25923#[doc = "`StateChangeWithCauseViewVariant3Type`"]
25924#[doc = r""]
25925#[doc = r" <details><summary>JSON schema</summary>"]
25926#[doc = r""]
25927#[doc = r" ```json"]
25928#[doc = "{"]
25929#[doc = "  \"type\": \"string\","]
25930#[doc = "  \"enum\": ["]
25931#[doc = "    \"access_key_deletion\""]
25932#[doc = "  ]"]
25933#[doc = "}"]
25934#[doc = r" ```"]
25935#[doc = r" </details>"]
25936#[derive(
25937    :: serde :: Deserialize,
25938    :: serde :: Serialize,
25939    Clone,
25940    Copy,
25941    Debug,
25942    Eq,
25943    Hash,
25944    Ord,
25945    PartialEq,
25946    PartialOrd,
25947)]
25948pub enum StateChangeWithCauseViewVariant3Type {
25949    #[serde(rename = "access_key_deletion")]
25950    AccessKeyDeletion,
25951}
25952impl ::std::convert::From<&Self> for StateChangeWithCauseViewVariant3Type {
25953    fn from(value: &StateChangeWithCauseViewVariant3Type) -> Self {
25954        value.clone()
25955    }
25956}
25957impl ::std::fmt::Display for StateChangeWithCauseViewVariant3Type {
25958    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
25959        match *self {
25960            Self::AccessKeyDeletion => f.write_str("access_key_deletion"),
25961        }
25962    }
25963}
25964impl ::std::str::FromStr for StateChangeWithCauseViewVariant3Type {
25965    type Err = self::error::ConversionError;
25966    fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
25967        match value {
25968            "access_key_deletion" => Ok(Self::AccessKeyDeletion),
25969            _ => Err("invalid value".into()),
25970        }
25971    }
25972}
25973impl ::std::convert::TryFrom<&str> for StateChangeWithCauseViewVariant3Type {
25974    type Error = self::error::ConversionError;
25975    fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
25976        value.parse()
25977    }
25978}
25979impl ::std::convert::TryFrom<&::std::string::String> for StateChangeWithCauseViewVariant3Type {
25980    type Error = self::error::ConversionError;
25981    fn try_from(
25982        value: &::std::string::String,
25983    ) -> ::std::result::Result<Self, self::error::ConversionError> {
25984        value.parse()
25985    }
25986}
25987impl ::std::convert::TryFrom<::std::string::String> for StateChangeWithCauseViewVariant3Type {
25988    type Error = self::error::ConversionError;
25989    fn try_from(
25990        value: ::std::string::String,
25991    ) -> ::std::result::Result<Self, self::error::ConversionError> {
25992        value.parse()
25993    }
25994}
25995#[doc = "`StateChangeWithCauseViewVariant4Change`"]
25996#[doc = r""]
25997#[doc = r" <details><summary>JSON schema</summary>"]
25998#[doc = r""]
25999#[doc = r" ```json"]
26000#[doc = "{"]
26001#[doc = "  \"type\": \"object\","]
26002#[doc = "  \"required\": ["]
26003#[doc = "    \"account_id\","]
26004#[doc = "    \"gas_key\","]
26005#[doc = "    \"public_key\""]
26006#[doc = "  ],"]
26007#[doc = "  \"properties\": {"]
26008#[doc = "    \"access_key\": false,"]
26009#[doc = "    \"account_id\": {"]
26010#[doc = "      \"$ref\": \"#/components/schemas/AccountId\""]
26011#[doc = "    },"]
26012#[doc = "    \"amount\": false,"]
26013#[doc = "    \"code_base64\": false,"]
26014#[doc = "    \"code_hash\": false,"]
26015#[doc = "    \"gas_key\": {"]
26016#[doc = "      \"$ref\": \"#/components/schemas/GasKeyView\""]
26017#[doc = "    },"]
26018#[doc = "    \"global_contract_account_id\": false,"]
26019#[doc = "    \"global_contract_hash\": false,"]
26020#[doc = "    \"index\": false,"]
26021#[doc = "    \"key_base64\": false,"]
26022#[doc = "    \"locked\": false,"]
26023#[doc = "    \"nonce\": false,"]
26024#[doc = "    \"public_key\": {"]
26025#[doc = "      \"$ref\": \"#/components/schemas/PublicKey\""]
26026#[doc = "    },"]
26027#[doc = "    \"storage_paid_at\": false,"]
26028#[doc = "    \"storage_usage\": false,"]
26029#[doc = "    \"value_base64\": false"]
26030#[doc = "  }"]
26031#[doc = "}"]
26032#[doc = r" ```"]
26033#[doc = r" </details>"]
26034#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
26035pub struct StateChangeWithCauseViewVariant4Change {
26036    pub account_id: AccountId,
26037    pub gas_key: GasKeyView,
26038    pub public_key: PublicKey,
26039}
26040impl ::std::convert::From<&StateChangeWithCauseViewVariant4Change>
26041    for StateChangeWithCauseViewVariant4Change
26042{
26043    fn from(value: &StateChangeWithCauseViewVariant4Change) -> Self {
26044        value.clone()
26045    }
26046}
26047#[doc = "`StateChangeWithCauseViewVariant4Type`"]
26048#[doc = r""]
26049#[doc = r" <details><summary>JSON schema</summary>"]
26050#[doc = r""]
26051#[doc = r" ```json"]
26052#[doc = "{"]
26053#[doc = "  \"type\": \"string\","]
26054#[doc = "  \"enum\": ["]
26055#[doc = "    \"gas_key_update\""]
26056#[doc = "  ]"]
26057#[doc = "}"]
26058#[doc = r" ```"]
26059#[doc = r" </details>"]
26060#[derive(
26061    :: serde :: Deserialize,
26062    :: serde :: Serialize,
26063    Clone,
26064    Copy,
26065    Debug,
26066    Eq,
26067    Hash,
26068    Ord,
26069    PartialEq,
26070    PartialOrd,
26071)]
26072pub enum StateChangeWithCauseViewVariant4Type {
26073    #[serde(rename = "gas_key_update")]
26074    GasKeyUpdate,
26075}
26076impl ::std::convert::From<&Self> for StateChangeWithCauseViewVariant4Type {
26077    fn from(value: &StateChangeWithCauseViewVariant4Type) -> Self {
26078        value.clone()
26079    }
26080}
26081impl ::std::fmt::Display for StateChangeWithCauseViewVariant4Type {
26082    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
26083        match *self {
26084            Self::GasKeyUpdate => f.write_str("gas_key_update"),
26085        }
26086    }
26087}
26088impl ::std::str::FromStr for StateChangeWithCauseViewVariant4Type {
26089    type Err = self::error::ConversionError;
26090    fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
26091        match value {
26092            "gas_key_update" => Ok(Self::GasKeyUpdate),
26093            _ => Err("invalid value".into()),
26094        }
26095    }
26096}
26097impl ::std::convert::TryFrom<&str> for StateChangeWithCauseViewVariant4Type {
26098    type Error = self::error::ConversionError;
26099    fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
26100        value.parse()
26101    }
26102}
26103impl ::std::convert::TryFrom<&::std::string::String> for StateChangeWithCauseViewVariant4Type {
26104    type Error = self::error::ConversionError;
26105    fn try_from(
26106        value: &::std::string::String,
26107    ) -> ::std::result::Result<Self, self::error::ConversionError> {
26108        value.parse()
26109    }
26110}
26111impl ::std::convert::TryFrom<::std::string::String> for StateChangeWithCauseViewVariant4Type {
26112    type Error = self::error::ConversionError;
26113    fn try_from(
26114        value: ::std::string::String,
26115    ) -> ::std::result::Result<Self, self::error::ConversionError> {
26116        value.parse()
26117    }
26118}
26119#[doc = "`StateChangeWithCauseViewVariant5Change`"]
26120#[doc = r""]
26121#[doc = r" <details><summary>JSON schema</summary>"]
26122#[doc = r""]
26123#[doc = r" ```json"]
26124#[doc = "{"]
26125#[doc = "  \"type\": \"object\","]
26126#[doc = "  \"required\": ["]
26127#[doc = "    \"account_id\","]
26128#[doc = "    \"index\","]
26129#[doc = "    \"nonce\","]
26130#[doc = "    \"public_key\""]
26131#[doc = "  ],"]
26132#[doc = "  \"properties\": {"]
26133#[doc = "    \"access_key\": false,"]
26134#[doc = "    \"account_id\": {"]
26135#[doc = "      \"$ref\": \"#/components/schemas/AccountId\""]
26136#[doc = "    },"]
26137#[doc = "    \"amount\": false,"]
26138#[doc = "    \"code_base64\": false,"]
26139#[doc = "    \"code_hash\": false,"]
26140#[doc = "    \"gas_key\": false,"]
26141#[doc = "    \"global_contract_account_id\": false,"]
26142#[doc = "    \"global_contract_hash\": false,"]
26143#[doc = "    \"index\": {"]
26144#[doc = "      \"type\": \"integer\","]
26145#[doc = "      \"format\": \"uint32\","]
26146#[doc = "      \"minimum\": 0.0"]
26147#[doc = "    },"]
26148#[doc = "    \"key_base64\": false,"]
26149#[doc = "    \"locked\": false,"]
26150#[doc = "    \"nonce\": {"]
26151#[doc = "      \"type\": \"integer\","]
26152#[doc = "      \"format\": \"uint64\","]
26153#[doc = "      \"minimum\": 0.0"]
26154#[doc = "    },"]
26155#[doc = "    \"public_key\": {"]
26156#[doc = "      \"$ref\": \"#/components/schemas/PublicKey\""]
26157#[doc = "    },"]
26158#[doc = "    \"storage_paid_at\": false,"]
26159#[doc = "    \"storage_usage\": false,"]
26160#[doc = "    \"value_base64\": false"]
26161#[doc = "  }"]
26162#[doc = "}"]
26163#[doc = r" ```"]
26164#[doc = r" </details>"]
26165#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
26166pub struct StateChangeWithCauseViewVariant5Change {
26167    pub account_id: AccountId,
26168    pub index: u32,
26169    pub nonce: u64,
26170    pub public_key: PublicKey,
26171}
26172impl ::std::convert::From<&StateChangeWithCauseViewVariant5Change>
26173    for StateChangeWithCauseViewVariant5Change
26174{
26175    fn from(value: &StateChangeWithCauseViewVariant5Change) -> Self {
26176        value.clone()
26177    }
26178}
26179#[doc = "`StateChangeWithCauseViewVariant5Type`"]
26180#[doc = r""]
26181#[doc = r" <details><summary>JSON schema</summary>"]
26182#[doc = r""]
26183#[doc = r" ```json"]
26184#[doc = "{"]
26185#[doc = "  \"type\": \"string\","]
26186#[doc = "  \"enum\": ["]
26187#[doc = "    \"gas_key_nonce_update\""]
26188#[doc = "  ]"]
26189#[doc = "}"]
26190#[doc = r" ```"]
26191#[doc = r" </details>"]
26192#[derive(
26193    :: serde :: Deserialize,
26194    :: serde :: Serialize,
26195    Clone,
26196    Copy,
26197    Debug,
26198    Eq,
26199    Hash,
26200    Ord,
26201    PartialEq,
26202    PartialOrd,
26203)]
26204pub enum StateChangeWithCauseViewVariant5Type {
26205    #[serde(rename = "gas_key_nonce_update")]
26206    GasKeyNonceUpdate,
26207}
26208impl ::std::convert::From<&Self> for StateChangeWithCauseViewVariant5Type {
26209    fn from(value: &StateChangeWithCauseViewVariant5Type) -> Self {
26210        value.clone()
26211    }
26212}
26213impl ::std::fmt::Display for StateChangeWithCauseViewVariant5Type {
26214    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
26215        match *self {
26216            Self::GasKeyNonceUpdate => f.write_str("gas_key_nonce_update"),
26217        }
26218    }
26219}
26220impl ::std::str::FromStr for StateChangeWithCauseViewVariant5Type {
26221    type Err = self::error::ConversionError;
26222    fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
26223        match value {
26224            "gas_key_nonce_update" => Ok(Self::GasKeyNonceUpdate),
26225            _ => Err("invalid value".into()),
26226        }
26227    }
26228}
26229impl ::std::convert::TryFrom<&str> for StateChangeWithCauseViewVariant5Type {
26230    type Error = self::error::ConversionError;
26231    fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
26232        value.parse()
26233    }
26234}
26235impl ::std::convert::TryFrom<&::std::string::String> for StateChangeWithCauseViewVariant5Type {
26236    type Error = self::error::ConversionError;
26237    fn try_from(
26238        value: &::std::string::String,
26239    ) -> ::std::result::Result<Self, self::error::ConversionError> {
26240        value.parse()
26241    }
26242}
26243impl ::std::convert::TryFrom<::std::string::String> for StateChangeWithCauseViewVariant5Type {
26244    type Error = self::error::ConversionError;
26245    fn try_from(
26246        value: ::std::string::String,
26247    ) -> ::std::result::Result<Self, self::error::ConversionError> {
26248        value.parse()
26249    }
26250}
26251#[doc = "`StateChangeWithCauseViewVariant6Change`"]
26252#[doc = r""]
26253#[doc = r" <details><summary>JSON schema</summary>"]
26254#[doc = r""]
26255#[doc = r" ```json"]
26256#[doc = "{"]
26257#[doc = "  \"type\": \"object\","]
26258#[doc = "  \"required\": ["]
26259#[doc = "    \"account_id\","]
26260#[doc = "    \"public_key\""]
26261#[doc = "  ],"]
26262#[doc = "  \"properties\": {"]
26263#[doc = "    \"access_key\": false,"]
26264#[doc = "    \"account_id\": {"]
26265#[doc = "      \"$ref\": \"#/components/schemas/AccountId\""]
26266#[doc = "    },"]
26267#[doc = "    \"amount\": false,"]
26268#[doc = "    \"code_base64\": false,"]
26269#[doc = "    \"code_hash\": false,"]
26270#[doc = "    \"gas_key\": false,"]
26271#[doc = "    \"global_contract_account_id\": false,"]
26272#[doc = "    \"global_contract_hash\": false,"]
26273#[doc = "    \"index\": false,"]
26274#[doc = "    \"key_base64\": false,"]
26275#[doc = "    \"locked\": false,"]
26276#[doc = "    \"nonce\": false,"]
26277#[doc = "    \"public_key\": {"]
26278#[doc = "      \"$ref\": \"#/components/schemas/PublicKey\""]
26279#[doc = "    },"]
26280#[doc = "    \"storage_paid_at\": false,"]
26281#[doc = "    \"storage_usage\": false,"]
26282#[doc = "    \"value_base64\": false"]
26283#[doc = "  }"]
26284#[doc = "}"]
26285#[doc = r" ```"]
26286#[doc = r" </details>"]
26287#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
26288pub struct StateChangeWithCauseViewVariant6Change {
26289    pub account_id: AccountId,
26290    pub public_key: PublicKey,
26291}
26292impl ::std::convert::From<&StateChangeWithCauseViewVariant6Change>
26293    for StateChangeWithCauseViewVariant6Change
26294{
26295    fn from(value: &StateChangeWithCauseViewVariant6Change) -> Self {
26296        value.clone()
26297    }
26298}
26299#[doc = "`StateChangeWithCauseViewVariant6Type`"]
26300#[doc = r""]
26301#[doc = r" <details><summary>JSON schema</summary>"]
26302#[doc = r""]
26303#[doc = r" ```json"]
26304#[doc = "{"]
26305#[doc = "  \"type\": \"string\","]
26306#[doc = "  \"enum\": ["]
26307#[doc = "    \"gas_key_deletion\""]
26308#[doc = "  ]"]
26309#[doc = "}"]
26310#[doc = r" ```"]
26311#[doc = r" </details>"]
26312#[derive(
26313    :: serde :: Deserialize,
26314    :: serde :: Serialize,
26315    Clone,
26316    Copy,
26317    Debug,
26318    Eq,
26319    Hash,
26320    Ord,
26321    PartialEq,
26322    PartialOrd,
26323)]
26324pub enum StateChangeWithCauseViewVariant6Type {
26325    #[serde(rename = "gas_key_deletion")]
26326    GasKeyDeletion,
26327}
26328impl ::std::convert::From<&Self> for StateChangeWithCauseViewVariant6Type {
26329    fn from(value: &StateChangeWithCauseViewVariant6Type) -> Self {
26330        value.clone()
26331    }
26332}
26333impl ::std::fmt::Display for StateChangeWithCauseViewVariant6Type {
26334    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
26335        match *self {
26336            Self::GasKeyDeletion => f.write_str("gas_key_deletion"),
26337        }
26338    }
26339}
26340impl ::std::str::FromStr for StateChangeWithCauseViewVariant6Type {
26341    type Err = self::error::ConversionError;
26342    fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
26343        match value {
26344            "gas_key_deletion" => Ok(Self::GasKeyDeletion),
26345            _ => Err("invalid value".into()),
26346        }
26347    }
26348}
26349impl ::std::convert::TryFrom<&str> for StateChangeWithCauseViewVariant6Type {
26350    type Error = self::error::ConversionError;
26351    fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
26352        value.parse()
26353    }
26354}
26355impl ::std::convert::TryFrom<&::std::string::String> for StateChangeWithCauseViewVariant6Type {
26356    type Error = self::error::ConversionError;
26357    fn try_from(
26358        value: &::std::string::String,
26359    ) -> ::std::result::Result<Self, self::error::ConversionError> {
26360        value.parse()
26361    }
26362}
26363impl ::std::convert::TryFrom<::std::string::String> for StateChangeWithCauseViewVariant6Type {
26364    type Error = self::error::ConversionError;
26365    fn try_from(
26366        value: ::std::string::String,
26367    ) -> ::std::result::Result<Self, self::error::ConversionError> {
26368        value.parse()
26369    }
26370}
26371#[doc = "`StateChangeWithCauseViewVariant7Change`"]
26372#[doc = r""]
26373#[doc = r" <details><summary>JSON schema</summary>"]
26374#[doc = r""]
26375#[doc = r" ```json"]
26376#[doc = "{"]
26377#[doc = "  \"type\": \"object\","]
26378#[doc = "  \"required\": ["]
26379#[doc = "    \"account_id\","]
26380#[doc = "    \"key_base64\","]
26381#[doc = "    \"value_base64\""]
26382#[doc = "  ],"]
26383#[doc = "  \"properties\": {"]
26384#[doc = "    \"access_key\": false,"]
26385#[doc = "    \"account_id\": {"]
26386#[doc = "      \"$ref\": \"#/components/schemas/AccountId\""]
26387#[doc = "    },"]
26388#[doc = "    \"amount\": false,"]
26389#[doc = "    \"code_base64\": false,"]
26390#[doc = "    \"code_hash\": false,"]
26391#[doc = "    \"gas_key\": false,"]
26392#[doc = "    \"global_contract_account_id\": false,"]
26393#[doc = "    \"global_contract_hash\": false,"]
26394#[doc = "    \"index\": false,"]
26395#[doc = "    \"key_base64\": {"]
26396#[doc = "      \"$ref\": \"#/components/schemas/StoreKey\""]
26397#[doc = "    },"]
26398#[doc = "    \"locked\": false,"]
26399#[doc = "    \"nonce\": false,"]
26400#[doc = "    \"public_key\": false,"]
26401#[doc = "    \"storage_paid_at\": false,"]
26402#[doc = "    \"storage_usage\": false,"]
26403#[doc = "    \"value_base64\": {"]
26404#[doc = "      \"$ref\": \"#/components/schemas/StoreValue\""]
26405#[doc = "    }"]
26406#[doc = "  }"]
26407#[doc = "}"]
26408#[doc = r" ```"]
26409#[doc = r" </details>"]
26410#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
26411pub struct StateChangeWithCauseViewVariant7Change {
26412    pub account_id: AccountId,
26413    pub key_base64: StoreKey,
26414    pub value_base64: StoreValue,
26415}
26416impl ::std::convert::From<&StateChangeWithCauseViewVariant7Change>
26417    for StateChangeWithCauseViewVariant7Change
26418{
26419    fn from(value: &StateChangeWithCauseViewVariant7Change) -> Self {
26420        value.clone()
26421    }
26422}
26423#[doc = "`StateChangeWithCauseViewVariant7Type`"]
26424#[doc = r""]
26425#[doc = r" <details><summary>JSON schema</summary>"]
26426#[doc = r""]
26427#[doc = r" ```json"]
26428#[doc = "{"]
26429#[doc = "  \"type\": \"string\","]
26430#[doc = "  \"enum\": ["]
26431#[doc = "    \"data_update\""]
26432#[doc = "  ]"]
26433#[doc = "}"]
26434#[doc = r" ```"]
26435#[doc = r" </details>"]
26436#[derive(
26437    :: serde :: Deserialize,
26438    :: serde :: Serialize,
26439    Clone,
26440    Copy,
26441    Debug,
26442    Eq,
26443    Hash,
26444    Ord,
26445    PartialEq,
26446    PartialOrd,
26447)]
26448pub enum StateChangeWithCauseViewVariant7Type {
26449    #[serde(rename = "data_update")]
26450    DataUpdate,
26451}
26452impl ::std::convert::From<&Self> for StateChangeWithCauseViewVariant7Type {
26453    fn from(value: &StateChangeWithCauseViewVariant7Type) -> Self {
26454        value.clone()
26455    }
26456}
26457impl ::std::fmt::Display for StateChangeWithCauseViewVariant7Type {
26458    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
26459        match *self {
26460            Self::DataUpdate => f.write_str("data_update"),
26461        }
26462    }
26463}
26464impl ::std::str::FromStr for StateChangeWithCauseViewVariant7Type {
26465    type Err = self::error::ConversionError;
26466    fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
26467        match value {
26468            "data_update" => Ok(Self::DataUpdate),
26469            _ => Err("invalid value".into()),
26470        }
26471    }
26472}
26473impl ::std::convert::TryFrom<&str> for StateChangeWithCauseViewVariant7Type {
26474    type Error = self::error::ConversionError;
26475    fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
26476        value.parse()
26477    }
26478}
26479impl ::std::convert::TryFrom<&::std::string::String> for StateChangeWithCauseViewVariant7Type {
26480    type Error = self::error::ConversionError;
26481    fn try_from(
26482        value: &::std::string::String,
26483    ) -> ::std::result::Result<Self, self::error::ConversionError> {
26484        value.parse()
26485    }
26486}
26487impl ::std::convert::TryFrom<::std::string::String> for StateChangeWithCauseViewVariant7Type {
26488    type Error = self::error::ConversionError;
26489    fn try_from(
26490        value: ::std::string::String,
26491    ) -> ::std::result::Result<Self, self::error::ConversionError> {
26492        value.parse()
26493    }
26494}
26495#[doc = "`StateChangeWithCauseViewVariant8Change`"]
26496#[doc = r""]
26497#[doc = r" <details><summary>JSON schema</summary>"]
26498#[doc = r""]
26499#[doc = r" ```json"]
26500#[doc = "{"]
26501#[doc = "  \"type\": \"object\","]
26502#[doc = "  \"required\": ["]
26503#[doc = "    \"account_id\","]
26504#[doc = "    \"key_base64\""]
26505#[doc = "  ],"]
26506#[doc = "  \"properties\": {"]
26507#[doc = "    \"access_key\": false,"]
26508#[doc = "    \"account_id\": {"]
26509#[doc = "      \"$ref\": \"#/components/schemas/AccountId\""]
26510#[doc = "    },"]
26511#[doc = "    \"amount\": false,"]
26512#[doc = "    \"code_base64\": false,"]
26513#[doc = "    \"code_hash\": false,"]
26514#[doc = "    \"gas_key\": false,"]
26515#[doc = "    \"global_contract_account_id\": false,"]
26516#[doc = "    \"global_contract_hash\": false,"]
26517#[doc = "    \"index\": false,"]
26518#[doc = "    \"key_base64\": {"]
26519#[doc = "      \"$ref\": \"#/components/schemas/StoreKey\""]
26520#[doc = "    },"]
26521#[doc = "    \"locked\": false,"]
26522#[doc = "    \"nonce\": false,"]
26523#[doc = "    \"public_key\": false,"]
26524#[doc = "    \"storage_paid_at\": false,"]
26525#[doc = "    \"storage_usage\": false,"]
26526#[doc = "    \"value_base64\": false"]
26527#[doc = "  }"]
26528#[doc = "}"]
26529#[doc = r" ```"]
26530#[doc = r" </details>"]
26531#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
26532pub struct StateChangeWithCauseViewVariant8Change {
26533    pub account_id: AccountId,
26534    pub key_base64: StoreKey,
26535}
26536impl ::std::convert::From<&StateChangeWithCauseViewVariant8Change>
26537    for StateChangeWithCauseViewVariant8Change
26538{
26539    fn from(value: &StateChangeWithCauseViewVariant8Change) -> Self {
26540        value.clone()
26541    }
26542}
26543#[doc = "`StateChangeWithCauseViewVariant8Type`"]
26544#[doc = r""]
26545#[doc = r" <details><summary>JSON schema</summary>"]
26546#[doc = r""]
26547#[doc = r" ```json"]
26548#[doc = "{"]
26549#[doc = "  \"type\": \"string\","]
26550#[doc = "  \"enum\": ["]
26551#[doc = "    \"data_deletion\""]
26552#[doc = "  ]"]
26553#[doc = "}"]
26554#[doc = r" ```"]
26555#[doc = r" </details>"]
26556#[derive(
26557    :: serde :: Deserialize,
26558    :: serde :: Serialize,
26559    Clone,
26560    Copy,
26561    Debug,
26562    Eq,
26563    Hash,
26564    Ord,
26565    PartialEq,
26566    PartialOrd,
26567)]
26568pub enum StateChangeWithCauseViewVariant8Type {
26569    #[serde(rename = "data_deletion")]
26570    DataDeletion,
26571}
26572impl ::std::convert::From<&Self> for StateChangeWithCauseViewVariant8Type {
26573    fn from(value: &StateChangeWithCauseViewVariant8Type) -> Self {
26574        value.clone()
26575    }
26576}
26577impl ::std::fmt::Display for StateChangeWithCauseViewVariant8Type {
26578    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
26579        match *self {
26580            Self::DataDeletion => f.write_str("data_deletion"),
26581        }
26582    }
26583}
26584impl ::std::str::FromStr for StateChangeWithCauseViewVariant8Type {
26585    type Err = self::error::ConversionError;
26586    fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
26587        match value {
26588            "data_deletion" => Ok(Self::DataDeletion),
26589            _ => Err("invalid value".into()),
26590        }
26591    }
26592}
26593impl ::std::convert::TryFrom<&str> for StateChangeWithCauseViewVariant8Type {
26594    type Error = self::error::ConversionError;
26595    fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
26596        value.parse()
26597    }
26598}
26599impl ::std::convert::TryFrom<&::std::string::String> for StateChangeWithCauseViewVariant8Type {
26600    type Error = self::error::ConversionError;
26601    fn try_from(
26602        value: &::std::string::String,
26603    ) -> ::std::result::Result<Self, self::error::ConversionError> {
26604        value.parse()
26605    }
26606}
26607impl ::std::convert::TryFrom<::std::string::String> for StateChangeWithCauseViewVariant8Type {
26608    type Error = self::error::ConversionError;
26609    fn try_from(
26610        value: ::std::string::String,
26611    ) -> ::std::result::Result<Self, self::error::ConversionError> {
26612        value.parse()
26613    }
26614}
26615#[doc = "`StateChangeWithCauseViewVariant9Change`"]
26616#[doc = r""]
26617#[doc = r" <details><summary>JSON schema</summary>"]
26618#[doc = r""]
26619#[doc = r" ```json"]
26620#[doc = "{"]
26621#[doc = "  \"type\": \"object\","]
26622#[doc = "  \"required\": ["]
26623#[doc = "    \"account_id\","]
26624#[doc = "    \"code_base64\""]
26625#[doc = "  ],"]
26626#[doc = "  \"properties\": {"]
26627#[doc = "    \"access_key\": false,"]
26628#[doc = "    \"account_id\": {"]
26629#[doc = "      \"$ref\": \"#/components/schemas/AccountId\""]
26630#[doc = "    },"]
26631#[doc = "    \"amount\": false,"]
26632#[doc = "    \"code_base64\": {"]
26633#[doc = "      \"type\": \"string\""]
26634#[doc = "    },"]
26635#[doc = "    \"code_hash\": false,"]
26636#[doc = "    \"gas_key\": false,"]
26637#[doc = "    \"global_contract_account_id\": false,"]
26638#[doc = "    \"global_contract_hash\": false,"]
26639#[doc = "    \"index\": false,"]
26640#[doc = "    \"key_base64\": false,"]
26641#[doc = "    \"locked\": false,"]
26642#[doc = "    \"nonce\": false,"]
26643#[doc = "    \"public_key\": false,"]
26644#[doc = "    \"storage_paid_at\": false,"]
26645#[doc = "    \"storage_usage\": false,"]
26646#[doc = "    \"value_base64\": false"]
26647#[doc = "  }"]
26648#[doc = "}"]
26649#[doc = r" ```"]
26650#[doc = r" </details>"]
26651#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
26652pub struct StateChangeWithCauseViewVariant9Change {
26653    pub account_id: AccountId,
26654    pub code_base64: ::std::string::String,
26655}
26656impl ::std::convert::From<&StateChangeWithCauseViewVariant9Change>
26657    for StateChangeWithCauseViewVariant9Change
26658{
26659    fn from(value: &StateChangeWithCauseViewVariant9Change) -> Self {
26660        value.clone()
26661    }
26662}
26663#[doc = "`StateChangeWithCauseViewVariant9Type`"]
26664#[doc = r""]
26665#[doc = r" <details><summary>JSON schema</summary>"]
26666#[doc = r""]
26667#[doc = r" ```json"]
26668#[doc = "{"]
26669#[doc = "  \"type\": \"string\","]
26670#[doc = "  \"enum\": ["]
26671#[doc = "    \"contract_code_update\""]
26672#[doc = "  ]"]
26673#[doc = "}"]
26674#[doc = r" ```"]
26675#[doc = r" </details>"]
26676#[derive(
26677    :: serde :: Deserialize,
26678    :: serde :: Serialize,
26679    Clone,
26680    Copy,
26681    Debug,
26682    Eq,
26683    Hash,
26684    Ord,
26685    PartialEq,
26686    PartialOrd,
26687)]
26688pub enum StateChangeWithCauseViewVariant9Type {
26689    #[serde(rename = "contract_code_update")]
26690    ContractCodeUpdate,
26691}
26692impl ::std::convert::From<&Self> for StateChangeWithCauseViewVariant9Type {
26693    fn from(value: &StateChangeWithCauseViewVariant9Type) -> Self {
26694        value.clone()
26695    }
26696}
26697impl ::std::fmt::Display for StateChangeWithCauseViewVariant9Type {
26698    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
26699        match *self {
26700            Self::ContractCodeUpdate => f.write_str("contract_code_update"),
26701        }
26702    }
26703}
26704impl ::std::str::FromStr for StateChangeWithCauseViewVariant9Type {
26705    type Err = self::error::ConversionError;
26706    fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
26707        match value {
26708            "contract_code_update" => Ok(Self::ContractCodeUpdate),
26709            _ => Err("invalid value".into()),
26710        }
26711    }
26712}
26713impl ::std::convert::TryFrom<&str> for StateChangeWithCauseViewVariant9Type {
26714    type Error = self::error::ConversionError;
26715    fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
26716        value.parse()
26717    }
26718}
26719impl ::std::convert::TryFrom<&::std::string::String> for StateChangeWithCauseViewVariant9Type {
26720    type Error = self::error::ConversionError;
26721    fn try_from(
26722        value: &::std::string::String,
26723    ) -> ::std::result::Result<Self, self::error::ConversionError> {
26724        value.parse()
26725    }
26726}
26727impl ::std::convert::TryFrom<::std::string::String> for StateChangeWithCauseViewVariant9Type {
26728    type Error = self::error::ConversionError;
26729    fn try_from(
26730        value: ::std::string::String,
26731    ) -> ::std::result::Result<Self, self::error::ConversionError> {
26732        value.parse()
26733    }
26734}
26735#[doc = "Item of the state, key and value are serialized in base64 and proof for inclusion of given state item."]
26736#[doc = r""]
26737#[doc = r" <details><summary>JSON schema</summary>"]
26738#[doc = r""]
26739#[doc = r" ```json"]
26740#[doc = "{"]
26741#[doc = "  \"description\": \"Item of the state, key and value are serialized in base64 and proof for inclusion of given state item.\","]
26742#[doc = "  \"type\": \"object\","]
26743#[doc = "  \"required\": ["]
26744#[doc = "    \"key\","]
26745#[doc = "    \"value\""]
26746#[doc = "  ],"]
26747#[doc = "  \"properties\": {"]
26748#[doc = "    \"key\": {"]
26749#[doc = "      \"$ref\": \"#/components/schemas/StoreKey\""]
26750#[doc = "    },"]
26751#[doc = "    \"value\": {"]
26752#[doc = "      \"$ref\": \"#/components/schemas/StoreValue\""]
26753#[doc = "    }"]
26754#[doc = "  }"]
26755#[doc = "}"]
26756#[doc = r" ```"]
26757#[doc = r" </details>"]
26758#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
26759pub struct StateItem {
26760    pub key: StoreKey,
26761    pub value: StoreValue,
26762}
26763impl ::std::convert::From<&StateItem> for StateItem {
26764    fn from(value: &StateItem) -> Self {
26765        value.clone()
26766    }
26767}
26768#[doc = "`StateSyncConfig`"]
26769#[doc = r""]
26770#[doc = r" <details><summary>JSON schema</summary>"]
26771#[doc = r""]
26772#[doc = r" ```json"]
26773#[doc = "{"]
26774#[doc = "  \"type\": \"object\","]
26775#[doc = "  \"properties\": {"]
26776#[doc = "    \"concurrency\": {"]
26777#[doc = "      \"$ref\": \"#/components/schemas/SyncConcurrency\""]
26778#[doc = "    },"]
26779#[doc = "    \"dump\": {"]
26780#[doc = "      \"description\": \"`none` value disables state dump to external storage.\","]
26781#[doc = "      \"anyOf\": ["]
26782#[doc = "        {"]
26783#[doc = "          \"$ref\": \"#/components/schemas/DumpConfig\""]
26784#[doc = "        },"]
26785#[doc = "        {"]
26786#[doc = "          \"type\": \"null\""]
26787#[doc = "        }"]
26788#[doc = "      ]"]
26789#[doc = "    },"]
26790#[doc = "    \"parts_compression_lvl\": {"]
26791#[doc = "      \"description\": \"Zstd compression level for state parts.\","]
26792#[doc = "      \"default\": 1,"]
26793#[doc = "      \"type\": \"integer\","]
26794#[doc = "      \"format\": \"int32\""]
26795#[doc = "    },"]
26796#[doc = "    \"sync\": {"]
26797#[doc = "      \"$ref\": \"#/components/schemas/SyncConfig\""]
26798#[doc = "    }"]
26799#[doc = "  }"]
26800#[doc = "}"]
26801#[doc = r" ```"]
26802#[doc = r" </details>"]
26803#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
26804pub struct StateSyncConfig {
26805    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
26806    pub concurrency: ::std::option::Option<SyncConcurrency>,
26807    #[doc = "`none` value disables state dump to external storage."]
26808    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
26809    pub dump: ::std::option::Option<DumpConfig>,
26810    #[doc = "Zstd compression level for state parts."]
26811    #[serde(default = "defaults::default_u64::<i32, 1>")]
26812    pub parts_compression_lvl: i32,
26813    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
26814    pub sync: ::std::option::Option<SyncConfig>,
26815}
26816impl ::std::convert::From<&StateSyncConfig> for StateSyncConfig {
26817    fn from(value: &StateSyncConfig) -> Self {
26818        value.clone()
26819    }
26820}
26821impl ::std::default::Default for StateSyncConfig {
26822    fn default() -> Self {
26823        Self {
26824            concurrency: Default::default(),
26825            dump: Default::default(),
26826            parts_compression_lvl: defaults::default_u64::<i32, 1>(),
26827            sync: Default::default(),
26828        }
26829    }
26830}
26831#[doc = "`StatusSyncInfo`"]
26832#[doc = r""]
26833#[doc = r" <details><summary>JSON schema</summary>"]
26834#[doc = r""]
26835#[doc = r" ```json"]
26836#[doc = "{"]
26837#[doc = "  \"type\": \"object\","]
26838#[doc = "  \"required\": ["]
26839#[doc = "    \"latest_block_hash\","]
26840#[doc = "    \"latest_block_height\","]
26841#[doc = "    \"latest_block_time\","]
26842#[doc = "    \"latest_state_root\","]
26843#[doc = "    \"syncing\""]
26844#[doc = "  ],"]
26845#[doc = "  \"properties\": {"]
26846#[doc = "    \"earliest_block_hash\": {"]
26847#[doc = "      \"anyOf\": ["]
26848#[doc = "        {"]
26849#[doc = "          \"$ref\": \"#/components/schemas/CryptoHash\""]
26850#[doc = "        },"]
26851#[doc = "        {"]
26852#[doc = "          \"type\": \"null\""]
26853#[doc = "        }"]
26854#[doc = "      ]"]
26855#[doc = "    },"]
26856#[doc = "    \"earliest_block_height\": {"]
26857#[doc = "      \"type\": ["]
26858#[doc = "        \"integer\","]
26859#[doc = "        \"null\""]
26860#[doc = "      ],"]
26861#[doc = "      \"format\": \"uint64\","]
26862#[doc = "      \"minimum\": 0.0"]
26863#[doc = "    },"]
26864#[doc = "    \"earliest_block_time\": {"]
26865#[doc = "      \"type\": ["]
26866#[doc = "        \"string\","]
26867#[doc = "        \"null\""]
26868#[doc = "      ]"]
26869#[doc = "    },"]
26870#[doc = "    \"epoch_id\": {"]
26871#[doc = "      \"anyOf\": ["]
26872#[doc = "        {"]
26873#[doc = "          \"$ref\": \"#/components/schemas/EpochId\""]
26874#[doc = "        },"]
26875#[doc = "        {"]
26876#[doc = "          \"type\": \"null\""]
26877#[doc = "        }"]
26878#[doc = "      ]"]
26879#[doc = "    },"]
26880#[doc = "    \"epoch_start_height\": {"]
26881#[doc = "      \"type\": ["]
26882#[doc = "        \"integer\","]
26883#[doc = "        \"null\""]
26884#[doc = "      ],"]
26885#[doc = "      \"format\": \"uint64\","]
26886#[doc = "      \"minimum\": 0.0"]
26887#[doc = "    },"]
26888#[doc = "    \"latest_block_hash\": {"]
26889#[doc = "      \"$ref\": \"#/components/schemas/CryptoHash\""]
26890#[doc = "    },"]
26891#[doc = "    \"latest_block_height\": {"]
26892#[doc = "      \"type\": \"integer\","]
26893#[doc = "      \"format\": \"uint64\","]
26894#[doc = "      \"minimum\": 0.0"]
26895#[doc = "    },"]
26896#[doc = "    \"latest_block_time\": {"]
26897#[doc = "      \"type\": \"string\""]
26898#[doc = "    },"]
26899#[doc = "    \"latest_state_root\": {"]
26900#[doc = "      \"$ref\": \"#/components/schemas/CryptoHash\""]
26901#[doc = "    },"]
26902#[doc = "    \"syncing\": {"]
26903#[doc = "      \"type\": \"boolean\""]
26904#[doc = "    }"]
26905#[doc = "  }"]
26906#[doc = "}"]
26907#[doc = r" ```"]
26908#[doc = r" </details>"]
26909#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
26910pub struct StatusSyncInfo {
26911    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
26912    pub earliest_block_hash: ::std::option::Option<CryptoHash>,
26913    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
26914    pub earliest_block_height: ::std::option::Option<u64>,
26915    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
26916    pub earliest_block_time: ::std::option::Option<::std::string::String>,
26917    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
26918    pub epoch_id: ::std::option::Option<EpochId>,
26919    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
26920    pub epoch_start_height: ::std::option::Option<u64>,
26921    pub latest_block_hash: CryptoHash,
26922    pub latest_block_height: u64,
26923    pub latest_block_time: ::std::string::String,
26924    pub latest_state_root: CryptoHash,
26925    pub syncing: bool,
26926}
26927impl ::std::convert::From<&StatusSyncInfo> for StatusSyncInfo {
26928    fn from(value: &StatusSyncInfo) -> Self {
26929        value.clone()
26930    }
26931}
26932#[doc = "Errors which may occur during working with trie storages, storing\ntrie values (trie nodes and state values) by their hashes."]
26933#[doc = r""]
26934#[doc = r" <details><summary>JSON schema</summary>"]
26935#[doc = r""]
26936#[doc = r" ```json"]
26937#[doc = "{"]
26938#[doc = "  \"description\": \"Errors which may occur during working with trie storages, storing\\ntrie values (trie nodes and state values) by their hashes.\","]
26939#[doc = "  \"oneOf\": ["]
26940#[doc = "    {"]
26941#[doc = "      \"description\": \"Key-value db internal failure\","]
26942#[doc = "      \"type\": \"string\","]
26943#[doc = "      \"enum\": ["]
26944#[doc = "        \"StorageInternalError\""]
26945#[doc = "      ]"]
26946#[doc = "    },"]
26947#[doc = "    {"]
26948#[doc = "      \"description\": \"Requested trie value by its hash which is missing in storage.\","]
26949#[doc = "      \"type\": \"object\","]
26950#[doc = "      \"required\": ["]
26951#[doc = "        \"MissingTrieValue\""]
26952#[doc = "      ],"]
26953#[doc = "      \"properties\": {"]
26954#[doc = "        \"MissingTrieValue\": {"]
26955#[doc = "          \"$ref\": \"#/components/schemas/MissingTrieValue\""]
26956#[doc = "        }"]
26957#[doc = "      },"]
26958#[doc = "      \"additionalProperties\": false"]
26959#[doc = "    },"]
26960#[doc = "    {"]
26961#[doc = "      \"description\": \"Found trie node which shouldn't be part of state. Raised during\\nvalidation of state sync parts where incorrect node was passed.\\nTODO (#8997): consider including hash of trie node.\","]
26962#[doc = "      \"type\": \"string\","]
26963#[doc = "      \"enum\": ["]
26964#[doc = "        \"UnexpectedTrieValue\""]
26965#[doc = "      ]"]
26966#[doc = "    },"]
26967#[doc = "    {"]
26968#[doc = "      \"description\": \"Either invalid state or key-value db is corrupted.\\nFor PartialStorage it cannot be corrupted.\\nError message is unreliable and for debugging purposes only. It's also probably ok to\\npanic in every place that produces this error.\\nWe can check if db is corrupted by verifying everything in the state trie.\","]
26969#[doc = "      \"type\": \"object\","]
26970#[doc = "      \"required\": ["]
26971#[doc = "        \"StorageInconsistentState\""]
26972#[doc = "      ],"]
26973#[doc = "      \"properties\": {"]
26974#[doc = "        \"StorageInconsistentState\": {"]
26975#[doc = "          \"type\": \"string\""]
26976#[doc = "        }"]
26977#[doc = "      },"]
26978#[doc = "      \"additionalProperties\": false"]
26979#[doc = "    },"]
26980#[doc = "    {"]
26981#[doc = "      \"description\": \"Flat storage error, meaning that it doesn't support some block anymore.\\nWe guarantee that such block cannot become final, thus block processing\\nmust resume normally.\","]
26982#[doc = "      \"type\": \"object\","]
26983#[doc = "      \"required\": ["]
26984#[doc = "        \"FlatStorageBlockNotSupported\""]
26985#[doc = "      ],"]
26986#[doc = "      \"properties\": {"]
26987#[doc = "        \"FlatStorageBlockNotSupported\": {"]
26988#[doc = "          \"type\": \"string\""]
26989#[doc = "        }"]
26990#[doc = "      },"]
26991#[doc = "      \"additionalProperties\": false"]
26992#[doc = "    },"]
26993#[doc = "    {"]
26994#[doc = "      \"description\": \"In-memory trie could not be loaded for some reason.\","]
26995#[doc = "      \"type\": \"object\","]
26996#[doc = "      \"required\": ["]
26997#[doc = "        \"MemTrieLoadingError\""]
26998#[doc = "      ],"]
26999#[doc = "      \"properties\": {"]
27000#[doc = "        \"MemTrieLoadingError\": {"]
27001#[doc = "          \"type\": \"string\""]
27002#[doc = "        }"]
27003#[doc = "      },"]
27004#[doc = "      \"additionalProperties\": false"]
27005#[doc = "    }"]
27006#[doc = "  ]"]
27007#[doc = "}"]
27008#[doc = r" ```"]
27009#[doc = r" </details>"]
27010#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
27011pub enum StorageError {
27012    #[doc = "Key-value db internal failure"]
27013    StorageInternalError,
27014    #[doc = "Requested trie value by its hash which is missing in storage."]
27015    MissingTrieValue(MissingTrieValue),
27016    #[doc = "Found trie node which shouldn't be part of state. Raised during\nvalidation of state sync parts where incorrect node was passed.\nTODO (#8997): consider including hash of trie node."]
27017    UnexpectedTrieValue,
27018    #[doc = "Either invalid state or key-value db is corrupted.\nFor PartialStorage it cannot be corrupted.\nError message is unreliable and for debugging purposes only. It's also probably ok to\npanic in every place that produces this error.\nWe can check if db is corrupted by verifying everything in the state trie."]
27019    StorageInconsistentState(::std::string::String),
27020    #[doc = "Flat storage error, meaning that it doesn't support some block anymore.\nWe guarantee that such block cannot become final, thus block processing\nmust resume normally."]
27021    FlatStorageBlockNotSupported(::std::string::String),
27022    #[doc = "In-memory trie could not be loaded for some reason."]
27023    MemTrieLoadingError(::std::string::String),
27024}
27025impl ::std::convert::From<&Self> for StorageError {
27026    fn from(value: &StorageError) -> Self {
27027        value.clone()
27028    }
27029}
27030impl ::std::convert::From<MissingTrieValue> for StorageError {
27031    fn from(value: MissingTrieValue) -> Self {
27032        Self::MissingTrieValue(value)
27033    }
27034}
27035#[doc = "This enum represents if a storage_get call will be performed through flat storage or trie"]
27036#[doc = r""]
27037#[doc = r" <details><summary>JSON schema</summary>"]
27038#[doc = r""]
27039#[doc = r" ```json"]
27040#[doc = "{"]
27041#[doc = "  \"description\": \"This enum represents if a storage_get call will be performed through flat storage or trie\","]
27042#[doc = "  \"type\": \"string\","]
27043#[doc = "  \"enum\": ["]
27044#[doc = "    \"FlatStorage\","]
27045#[doc = "    \"Trie\""]
27046#[doc = "  ]"]
27047#[doc = "}"]
27048#[doc = r" ```"]
27049#[doc = r" </details>"]
27050#[derive(
27051    :: serde :: Deserialize,
27052    :: serde :: Serialize,
27053    Clone,
27054    Copy,
27055    Debug,
27056    Eq,
27057    Hash,
27058    Ord,
27059    PartialEq,
27060    PartialOrd,
27061)]
27062pub enum StorageGetMode {
27063    FlatStorage,
27064    Trie,
27065}
27066impl ::std::convert::From<&Self> for StorageGetMode {
27067    fn from(value: &StorageGetMode) -> Self {
27068        value.clone()
27069    }
27070}
27071impl ::std::fmt::Display for StorageGetMode {
27072    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
27073        match *self {
27074            Self::FlatStorage => f.write_str("FlatStorage"),
27075            Self::Trie => f.write_str("Trie"),
27076        }
27077    }
27078}
27079impl ::std::str::FromStr for StorageGetMode {
27080    type Err = self::error::ConversionError;
27081    fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
27082        match value {
27083            "FlatStorage" => Ok(Self::FlatStorage),
27084            "Trie" => Ok(Self::Trie),
27085            _ => Err("invalid value".into()),
27086        }
27087    }
27088}
27089impl ::std::convert::TryFrom<&str> for StorageGetMode {
27090    type Error = self::error::ConversionError;
27091    fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
27092        value.parse()
27093    }
27094}
27095impl ::std::convert::TryFrom<&::std::string::String> for StorageGetMode {
27096    type Error = self::error::ConversionError;
27097    fn try_from(
27098        value: &::std::string::String,
27099    ) -> ::std::result::Result<Self, self::error::ConversionError> {
27100        value.parse()
27101    }
27102}
27103impl ::std::convert::TryFrom<::std::string::String> for StorageGetMode {
27104    type Error = self::error::ConversionError;
27105    fn try_from(
27106        value: ::std::string::String,
27107    ) -> ::std::result::Result<Self, self::error::ConversionError> {
27108        value.parse()
27109    }
27110}
27111#[doc = "Describes cost of storage per block"]
27112#[doc = r""]
27113#[doc = r" <details><summary>JSON schema</summary>"]
27114#[doc = r""]
27115#[doc = r" ```json"]
27116#[doc = "{"]
27117#[doc = "  \"description\": \"Describes cost of storage per block\","]
27118#[doc = "  \"type\": \"object\","]
27119#[doc = "  \"required\": ["]
27120#[doc = "    \"num_bytes_account\","]
27121#[doc = "    \"num_extra_bytes_record\""]
27122#[doc = "  ],"]
27123#[doc = "  \"properties\": {"]
27124#[doc = "    \"num_bytes_account\": {"]
27125#[doc = "      \"description\": \"Number of bytes for an account record, including rounding up for account id.\","]
27126#[doc = "      \"type\": \"integer\","]
27127#[doc = "      \"format\": \"uint64\","]
27128#[doc = "      \"minimum\": 0.0"]
27129#[doc = "    },"]
27130#[doc = "    \"num_extra_bytes_record\": {"]
27131#[doc = "      \"description\": \"Additional number of bytes for a k/v record\","]
27132#[doc = "      \"type\": \"integer\","]
27133#[doc = "      \"format\": \"uint64\","]
27134#[doc = "      \"minimum\": 0.0"]
27135#[doc = "    }"]
27136#[doc = "  }"]
27137#[doc = "}"]
27138#[doc = r" ```"]
27139#[doc = r" </details>"]
27140#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
27141pub struct StorageUsageConfigView {
27142    #[doc = "Number of bytes for an account record, including rounding up for account id."]
27143    pub num_bytes_account: u64,
27144    #[doc = "Additional number of bytes for a k/v record"]
27145    pub num_extra_bytes_record: u64,
27146}
27147impl ::std::convert::From<&StorageUsageConfigView> for StorageUsageConfigView {
27148    fn from(value: &StorageUsageConfigView) -> Self {
27149        value.clone()
27150    }
27151}
27152#[doc = "This type is used to mark keys (arrays of bytes) that are queried from store.\n\nNOTE: Currently, this type is only used in the view_client and RPC to be able to transparently\npretty-serialize the bytes arrays as base64-encoded strings (see `serialize.rs`)."]
27153#[doc = r""]
27154#[doc = r" <details><summary>JSON schema</summary>"]
27155#[doc = r""]
27156#[doc = r" ```json"]
27157#[doc = "{"]
27158#[doc = "  \"description\": \"This type is used to mark keys (arrays of bytes) that are queried from store.\\n\\nNOTE: Currently, this type is only used in the view_client and RPC to be able to transparently\\npretty-serialize the bytes arrays as base64-encoded strings (see `serialize.rs`).\","]
27159#[doc = "  \"type\": \"string\","]
27160#[doc = "  \"format\": \"bytes\""]
27161#[doc = "}"]
27162#[doc = r" ```"]
27163#[doc = r" </details>"]
27164#[derive(
27165    :: serde :: Deserialize,
27166    :: serde :: Serialize,
27167    Clone,
27168    Debug,
27169    Eq,
27170    Hash,
27171    Ord,
27172    PartialEq,
27173    PartialOrd,
27174)]
27175#[serde(transparent)]
27176pub struct StoreKey(pub ::std::string::String);
27177impl ::std::ops::Deref for StoreKey {
27178    type Target = ::std::string::String;
27179    fn deref(&self) -> &::std::string::String {
27180        &self.0
27181    }
27182}
27183impl ::std::convert::From<StoreKey> for ::std::string::String {
27184    fn from(value: StoreKey) -> Self {
27185        value.0
27186    }
27187}
27188impl ::std::convert::From<&StoreKey> for StoreKey {
27189    fn from(value: &StoreKey) -> Self {
27190        value.clone()
27191    }
27192}
27193impl ::std::convert::From<::std::string::String> for StoreKey {
27194    fn from(value: ::std::string::String) -> Self {
27195        Self(value)
27196    }
27197}
27198impl ::std::str::FromStr for StoreKey {
27199    type Err = ::std::convert::Infallible;
27200    fn from_str(value: &str) -> ::std::result::Result<Self, Self::Err> {
27201        Ok(Self(value.to_string()))
27202    }
27203}
27204impl ::std::fmt::Display for StoreKey {
27205    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
27206        self.0.fmt(f)
27207    }
27208}
27209#[doc = "This type is used to mark values returned from store (arrays of bytes).\n\nNOTE: Currently, this type is only used in the view_client and RPC to be able to transparently\npretty-serialize the bytes arrays as base64-encoded strings (see `serialize.rs`)."]
27210#[doc = r""]
27211#[doc = r" <details><summary>JSON schema</summary>"]
27212#[doc = r""]
27213#[doc = r" ```json"]
27214#[doc = "{"]
27215#[doc = "  \"description\": \"This type is used to mark values returned from store (arrays of bytes).\\n\\nNOTE: Currently, this type is only used in the view_client and RPC to be able to transparently\\npretty-serialize the bytes arrays as base64-encoded strings (see `serialize.rs`).\","]
27216#[doc = "  \"type\": \"string\","]
27217#[doc = "  \"format\": \"bytes\""]
27218#[doc = "}"]
27219#[doc = r" ```"]
27220#[doc = r" </details>"]
27221#[derive(
27222    :: serde :: Deserialize,
27223    :: serde :: Serialize,
27224    Clone,
27225    Debug,
27226    Eq,
27227    Hash,
27228    Ord,
27229    PartialEq,
27230    PartialOrd,
27231)]
27232#[serde(transparent)]
27233pub struct StoreValue(pub ::std::string::String);
27234impl ::std::ops::Deref for StoreValue {
27235    type Target = ::std::string::String;
27236    fn deref(&self) -> &::std::string::String {
27237        &self.0
27238    }
27239}
27240impl ::std::convert::From<StoreValue> for ::std::string::String {
27241    fn from(value: StoreValue) -> Self {
27242        value.0
27243    }
27244}
27245impl ::std::convert::From<&StoreValue> for StoreValue {
27246    fn from(value: &StoreValue) -> Self {
27247        value.clone()
27248    }
27249}
27250impl ::std::convert::From<::std::string::String> for StoreValue {
27251    fn from(value: ::std::string::String) -> Self {
27252        Self(value)
27253    }
27254}
27255impl ::std::str::FromStr for StoreValue {
27256    type Err = ::std::convert::Infallible;
27257    fn from_str(value: &str) -> ::std::result::Result<Self, Self::Err> {
27258        Ok(Self(value.to_string()))
27259    }
27260}
27261impl ::std::fmt::Display for StoreValue {
27262    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
27263        self.0.fmt(f)
27264    }
27265}
27266#[doc = "`SyncCheckpoint`"]
27267#[doc = r""]
27268#[doc = r" <details><summary>JSON schema</summary>"]
27269#[doc = r""]
27270#[doc = r" ```json"]
27271#[doc = "{"]
27272#[doc = "  \"type\": \"string\","]
27273#[doc = "  \"enum\": ["]
27274#[doc = "    \"genesis\","]
27275#[doc = "    \"earliest_available\""]
27276#[doc = "  ]"]
27277#[doc = "}"]
27278#[doc = r" ```"]
27279#[doc = r" </details>"]
27280#[derive(
27281    :: serde :: Deserialize,
27282    :: serde :: Serialize,
27283    Clone,
27284    Copy,
27285    Debug,
27286    Eq,
27287    Hash,
27288    Ord,
27289    PartialEq,
27290    PartialOrd,
27291)]
27292pub enum SyncCheckpoint {
27293    #[serde(rename = "genesis")]
27294    Genesis,
27295    #[serde(rename = "earliest_available")]
27296    EarliestAvailable,
27297}
27298impl ::std::convert::From<&Self> for SyncCheckpoint {
27299    fn from(value: &SyncCheckpoint) -> Self {
27300        value.clone()
27301    }
27302}
27303impl ::std::fmt::Display for SyncCheckpoint {
27304    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
27305        match *self {
27306            Self::Genesis => f.write_str("genesis"),
27307            Self::EarliestAvailable => f.write_str("earliest_available"),
27308        }
27309    }
27310}
27311impl ::std::str::FromStr for SyncCheckpoint {
27312    type Err = self::error::ConversionError;
27313    fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
27314        match value {
27315            "genesis" => Ok(Self::Genesis),
27316            "earliest_available" => Ok(Self::EarliestAvailable),
27317            _ => Err("invalid value".into()),
27318        }
27319    }
27320}
27321impl ::std::convert::TryFrom<&str> for SyncCheckpoint {
27322    type Error = self::error::ConversionError;
27323    fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
27324        value.parse()
27325    }
27326}
27327impl ::std::convert::TryFrom<&::std::string::String> for SyncCheckpoint {
27328    type Error = self::error::ConversionError;
27329    fn try_from(
27330        value: &::std::string::String,
27331    ) -> ::std::result::Result<Self, self::error::ConversionError> {
27332        value.parse()
27333    }
27334}
27335impl ::std::convert::TryFrom<::std::string::String> for SyncCheckpoint {
27336    type Error = self::error::ConversionError;
27337    fn try_from(
27338        value: ::std::string::String,
27339    ) -> ::std::result::Result<Self, self::error::ConversionError> {
27340        value.parse()
27341    }
27342}
27343#[doc = "`SyncConcurrency`"]
27344#[doc = r""]
27345#[doc = r" <details><summary>JSON schema</summary>"]
27346#[doc = r""]
27347#[doc = r" ```json"]
27348#[doc = "{"]
27349#[doc = "  \"type\": \"object\","]
27350#[doc = "  \"required\": ["]
27351#[doc = "    \"apply\","]
27352#[doc = "    \"apply_during_catchup\","]
27353#[doc = "    \"peer_downloads\","]
27354#[doc = "    \"per_shard\""]
27355#[doc = "  ],"]
27356#[doc = "  \"properties\": {"]
27357#[doc = "    \"apply\": {"]
27358#[doc = "      \"description\": \"Maximum number of \\\"apply parts\\\" tasks that can be performed in parallel.\\nThis is a very disk-heavy task and therefore we set this to a low limit,\\nor else the rocksdb contention makes the whole server freeze up.\","]
27359#[doc = "      \"type\": \"integer\","]
27360#[doc = "      \"format\": \"uint8\","]
27361#[doc = "      \"maximum\": 255.0,"]
27362#[doc = "      \"minimum\": 0.0"]
27363#[doc = "    },"]
27364#[doc = "    \"apply_during_catchup\": {"]
27365#[doc = "      \"description\": \"Maximum number of \\\"apply parts\\\" tasks that can be performed in parallel\\nduring catchup. We set this to a very low value to avoid overloading the\\nnode while it is still performing normal tasks.\","]
27366#[doc = "      \"type\": \"integer\","]
27367#[doc = "      \"format\": \"uint8\","]
27368#[doc = "      \"maximum\": 255.0,"]
27369#[doc = "      \"minimum\": 0.0"]
27370#[doc = "    },"]
27371#[doc = "    \"peer_downloads\": {"]
27372#[doc = "      \"description\": \"Maximum number of outstanding requests for decentralized state sync.\","]
27373#[doc = "      \"type\": \"integer\","]
27374#[doc = "      \"format\": \"uint8\","]
27375#[doc = "      \"maximum\": 255.0,"]
27376#[doc = "      \"minimum\": 0.0"]
27377#[doc = "    },"]
27378#[doc = "    \"per_shard\": {"]
27379#[doc = "      \"description\": \"The maximum parallelism to use per shard. This is mostly for fairness, because\\nthe actual rate limiting is done by the TaskTrackers, but this is useful for\\nbalancing the shards a little.\","]
27380#[doc = "      \"type\": \"integer\","]
27381#[doc = "      \"format\": \"uint8\","]
27382#[doc = "      \"maximum\": 255.0,"]
27383#[doc = "      \"minimum\": 0.0"]
27384#[doc = "    }"]
27385#[doc = "  }"]
27386#[doc = "}"]
27387#[doc = r" ```"]
27388#[doc = r" </details>"]
27389#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
27390pub struct SyncConcurrency {
27391    #[doc = "Maximum number of \"apply parts\" tasks that can be performed in parallel.\nThis is a very disk-heavy task and therefore we set this to a low limit,\nor else the rocksdb contention makes the whole server freeze up."]
27392    pub apply: u8,
27393    #[doc = "Maximum number of \"apply parts\" tasks that can be performed in parallel\nduring catchup. We set this to a very low value to avoid overloading the\nnode while it is still performing normal tasks."]
27394    pub apply_during_catchup: u8,
27395    #[doc = "Maximum number of outstanding requests for decentralized state sync."]
27396    pub peer_downloads: u8,
27397    #[doc = "The maximum parallelism to use per shard. This is mostly for fairness, because\nthe actual rate limiting is done by the TaskTrackers, but this is useful for\nbalancing the shards a little."]
27398    pub per_shard: u8,
27399}
27400impl ::std::convert::From<&SyncConcurrency> for SyncConcurrency {
27401    fn from(value: &SyncConcurrency) -> Self {
27402        value.clone()
27403    }
27404}
27405#[doc = "Configures how to fetch state parts during state sync."]
27406#[doc = r""]
27407#[doc = r" <details><summary>JSON schema</summary>"]
27408#[doc = r""]
27409#[doc = r" ```json"]
27410#[doc = "{"]
27411#[doc = "  \"description\": \"Configures how to fetch state parts during state sync.\","]
27412#[doc = "  \"oneOf\": ["]
27413#[doc = "    {"]
27414#[doc = "      \"description\": \"Syncs state from the peers without reading anything from external storage.\","]
27415#[doc = "      \"type\": \"string\","]
27416#[doc = "      \"enum\": ["]
27417#[doc = "        \"Peers\""]
27418#[doc = "      ]"]
27419#[doc = "    },"]
27420#[doc = "    {"]
27421#[doc = "      \"description\": \"Expects parts to be available in external storage.\\n\\nUsually as a fallback after some number of attempts to use peers.\","]
27422#[doc = "      \"type\": \"object\","]
27423#[doc = "      \"required\": ["]
27424#[doc = "        \"ExternalStorage\""]
27425#[doc = "      ],"]
27426#[doc = "      \"properties\": {"]
27427#[doc = "        \"ExternalStorage\": {"]
27428#[doc = "          \"$ref\": \"#/components/schemas/ExternalStorageConfig\""]
27429#[doc = "        }"]
27430#[doc = "      },"]
27431#[doc = "      \"additionalProperties\": false"]
27432#[doc = "    }"]
27433#[doc = "  ]"]
27434#[doc = "}"]
27435#[doc = r" ```"]
27436#[doc = r" </details>"]
27437#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
27438pub enum SyncConfig {
27439    #[doc = "Syncs state from the peers without reading anything from external storage."]
27440    Peers,
27441    #[doc = "Expects parts to be available in external storage.\n\nUsually as a fallback after some number of attempts to use peers."]
27442    ExternalStorage(ExternalStorageConfig),
27443}
27444impl ::std::convert::From<&Self> for SyncConfig {
27445    fn from(value: &SyncConfig) -> Self {
27446        value.clone()
27447    }
27448}
27449impl ::std::convert::From<ExternalStorageConfig> for SyncConfig {
27450    fn from(value: ExternalStorageConfig) -> Self {
27451        Self::ExternalStorage(value)
27452    }
27453}
27454#[doc = "`Tier1ProxyView`"]
27455#[doc = r""]
27456#[doc = r" <details><summary>JSON schema</summary>"]
27457#[doc = r""]
27458#[doc = r" ```json"]
27459#[doc = "{"]
27460#[doc = "  \"type\": \"object\","]
27461#[doc = "  \"required\": ["]
27462#[doc = "    \"addr\","]
27463#[doc = "    \"peer_id\""]
27464#[doc = "  ],"]
27465#[doc = "  \"properties\": {"]
27466#[doc = "    \"addr\": {"]
27467#[doc = "      \"type\": \"string\""]
27468#[doc = "    },"]
27469#[doc = "    \"peer_id\": {"]
27470#[doc = "      \"$ref\": \"#/components/schemas/PublicKey\""]
27471#[doc = "    }"]
27472#[doc = "  }"]
27473#[doc = "}"]
27474#[doc = r" ```"]
27475#[doc = r" </details>"]
27476#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
27477pub struct Tier1ProxyView {
27478    pub addr: ::std::string::String,
27479    pub peer_id: PublicKey,
27480}
27481impl ::std::convert::From<&Tier1ProxyView> for Tier1ProxyView {
27482    fn from(value: &Tier1ProxyView) -> Self {
27483        value.clone()
27484    }
27485}
27486#[doc = "Describes the expected behavior of the node regarding shard tracking.\nIf the node is an active validator, it will also track the shards it is responsible for as a validator."]
27487#[doc = r""]
27488#[doc = r" <details><summary>JSON schema</summary>"]
27489#[doc = r""]
27490#[doc = r" ```json"]
27491#[doc = "{"]
27492#[doc = "  \"description\": \"Describes the expected behavior of the node regarding shard tracking.\\nIf the node is an active validator, it will also track the shards it is responsible for as a validator.\","]
27493#[doc = "  \"oneOf\": ["]
27494#[doc = "    {"]
27495#[doc = "      \"description\": \"Tracks no shards (light client).\","]
27496#[doc = "      \"type\": \"string\","]
27497#[doc = "      \"enum\": ["]
27498#[doc = "        \"NoShards\""]
27499#[doc = "      ]"]
27500#[doc = "    },"]
27501#[doc = "    {"]
27502#[doc = "      \"description\": \"Tracks arbitrary shards.\","]
27503#[doc = "      \"type\": \"object\","]
27504#[doc = "      \"required\": ["]
27505#[doc = "        \"Shards\""]
27506#[doc = "      ],"]
27507#[doc = "      \"properties\": {"]
27508#[doc = "        \"Shards\": {"]
27509#[doc = "          \"type\": \"array\","]
27510#[doc = "          \"items\": {"]
27511#[doc = "            \"$ref\": \"#/components/schemas/ShardUId\""]
27512#[doc = "          }"]
27513#[doc = "        }"]
27514#[doc = "      },"]
27515#[doc = "      \"additionalProperties\": false"]
27516#[doc = "    },"]
27517#[doc = "    {"]
27518#[doc = "      \"description\": \"Tracks all shards.\","]
27519#[doc = "      \"type\": \"string\","]
27520#[doc = "      \"enum\": ["]
27521#[doc = "        \"AllShards\""]
27522#[doc = "      ]"]
27523#[doc = "    },"]
27524#[doc = "    {"]
27525#[doc = "      \"description\": \"Tracks shards that are assigned to given validator account.\","]
27526#[doc = "      \"type\": \"object\","]
27527#[doc = "      \"required\": ["]
27528#[doc = "        \"ShadowValidator\""]
27529#[doc = "      ],"]
27530#[doc = "      \"properties\": {"]
27531#[doc = "        \"ShadowValidator\": {"]
27532#[doc = "          \"$ref\": \"#/components/schemas/AccountId\""]
27533#[doc = "        }"]
27534#[doc = "      },"]
27535#[doc = "      \"additionalProperties\": false"]
27536#[doc = "    },"]
27537#[doc = "    {"]
27538#[doc = "      \"description\": \"Rotate between these sets of tracked shards.\\nUsed to simulate the behavior of chunk only producers without staking tokens.\","]
27539#[doc = "      \"type\": \"object\","]
27540#[doc = "      \"required\": ["]
27541#[doc = "        \"Schedule\""]
27542#[doc = "      ],"]
27543#[doc = "      \"properties\": {"]
27544#[doc = "        \"Schedule\": {"]
27545#[doc = "          \"type\": \"array\","]
27546#[doc = "          \"items\": {"]
27547#[doc = "            \"type\": \"array\","]
27548#[doc = "            \"items\": {"]
27549#[doc = "              \"$ref\": \"#/components/schemas/ShardId\""]
27550#[doc = "            }"]
27551#[doc = "          }"]
27552#[doc = "        }"]
27553#[doc = "      },"]
27554#[doc = "      \"additionalProperties\": false"]
27555#[doc = "    },"]
27556#[doc = "    {"]
27557#[doc = "      \"description\": \"Tracks shards that contain one of the given account.\","]
27558#[doc = "      \"type\": \"object\","]
27559#[doc = "      \"required\": ["]
27560#[doc = "        \"Accounts\""]
27561#[doc = "      ],"]
27562#[doc = "      \"properties\": {"]
27563#[doc = "        \"Accounts\": {"]
27564#[doc = "          \"type\": \"array\","]
27565#[doc = "          \"items\": {"]
27566#[doc = "            \"$ref\": \"#/components/schemas/AccountId\""]
27567#[doc = "          }"]
27568#[doc = "        }"]
27569#[doc = "      },"]
27570#[doc = "      \"additionalProperties\": false"]
27571#[doc = "    }"]
27572#[doc = "  ]"]
27573#[doc = "}"]
27574#[doc = r" ```"]
27575#[doc = r" </details>"]
27576#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
27577pub enum TrackedShardsConfig {
27578    #[doc = "Tracks no shards (light client)."]
27579    NoShards,
27580    #[doc = "Tracks arbitrary shards."]
27581    Shards(::std::vec::Vec<ShardUId>),
27582    #[doc = "Tracks all shards."]
27583    AllShards,
27584    #[doc = "Tracks shards that are assigned to given validator account."]
27585    ShadowValidator(AccountId),
27586    #[doc = "Rotate between these sets of tracked shards.\nUsed to simulate the behavior of chunk only producers without staking tokens."]
27587    Schedule(::std::vec::Vec<::std::vec::Vec<ShardId>>),
27588    #[doc = "Tracks shards that contain one of the given account."]
27589    Accounts(::std::vec::Vec<AccountId>),
27590}
27591impl ::std::convert::From<&Self> for TrackedShardsConfig {
27592    fn from(value: &TrackedShardsConfig) -> Self {
27593        value.clone()
27594    }
27595}
27596impl ::std::convert::From<::std::vec::Vec<ShardUId>> for TrackedShardsConfig {
27597    fn from(value: ::std::vec::Vec<ShardUId>) -> Self {
27598        Self::Shards(value)
27599    }
27600}
27601impl ::std::convert::From<AccountId> for TrackedShardsConfig {
27602    fn from(value: AccountId) -> Self {
27603        Self::ShadowValidator(value)
27604    }
27605}
27606impl ::std::convert::From<::std::vec::Vec<::std::vec::Vec<ShardId>>> for TrackedShardsConfig {
27607    fn from(value: ::std::vec::Vec<::std::vec::Vec<ShardId>>) -> Self {
27608        Self::Schedule(value)
27609    }
27610}
27611impl ::std::convert::From<::std::vec::Vec<AccountId>> for TrackedShardsConfig {
27612    fn from(value: ::std::vec::Vec<AccountId>) -> Self {
27613        Self::Accounts(value)
27614    }
27615}
27616#[doc = "`TransferAction`"]
27617#[doc = r""]
27618#[doc = r" <details><summary>JSON schema</summary>"]
27619#[doc = r""]
27620#[doc = r" ```json"]
27621#[doc = "{"]
27622#[doc = "  \"type\": \"object\","]
27623#[doc = "  \"required\": ["]
27624#[doc = "    \"deposit\""]
27625#[doc = "  ],"]
27626#[doc = "  \"properties\": {"]
27627#[doc = "    \"deposit\": {"]
27628#[doc = "      \"$ref\": \"#/components/schemas/NearToken\""]
27629#[doc = "    }"]
27630#[doc = "  }"]
27631#[doc = "}"]
27632#[doc = r" ```"]
27633#[doc = r" </details>"]
27634#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
27635pub struct TransferAction {
27636    pub deposit: NearToken,
27637}
27638impl ::std::convert::From<&TransferAction> for TransferAction {
27639    fn from(value: &TransferAction) -> Self {
27640        value.clone()
27641    }
27642}
27643#[doc = "Error returned in the ExecutionOutcome in case of failure"]
27644#[doc = r""]
27645#[doc = r" <details><summary>JSON schema</summary>"]
27646#[doc = r""]
27647#[doc = r" ```json"]
27648#[doc = "{"]
27649#[doc = "  \"description\": \"Error returned in the ExecutionOutcome in case of failure\","]
27650#[doc = "  \"oneOf\": ["]
27651#[doc = "    {"]
27652#[doc = "      \"description\": \"An error happened during Action execution\","]
27653#[doc = "      \"type\": \"object\","]
27654#[doc = "      \"required\": ["]
27655#[doc = "        \"ActionError\""]
27656#[doc = "      ],"]
27657#[doc = "      \"properties\": {"]
27658#[doc = "        \"ActionError\": {"]
27659#[doc = "          \"$ref\": \"#/components/schemas/ActionError\""]
27660#[doc = "        }"]
27661#[doc = "      },"]
27662#[doc = "      \"additionalProperties\": false"]
27663#[doc = "    },"]
27664#[doc = "    {"]
27665#[doc = "      \"description\": \"An error happened during Transaction execution\","]
27666#[doc = "      \"type\": \"object\","]
27667#[doc = "      \"required\": ["]
27668#[doc = "        \"InvalidTxError\""]
27669#[doc = "      ],"]
27670#[doc = "      \"properties\": {"]
27671#[doc = "        \"InvalidTxError\": {"]
27672#[doc = "          \"$ref\": \"#/components/schemas/InvalidTxError\""]
27673#[doc = "        }"]
27674#[doc = "      },"]
27675#[doc = "      \"additionalProperties\": false"]
27676#[doc = "    }"]
27677#[doc = "  ]"]
27678#[doc = "}"]
27679#[doc = r" ```"]
27680#[doc = r" </details>"]
27681#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
27682pub enum TxExecutionError {
27683    #[doc = "An error happened during Action execution"]
27684    ActionError(ActionError),
27685    #[doc = "An error happened during Transaction execution"]
27686    InvalidTxError(InvalidTxError),
27687}
27688impl ::std::convert::From<&Self> for TxExecutionError {
27689    fn from(value: &TxExecutionError) -> Self {
27690        value.clone()
27691    }
27692}
27693impl ::std::convert::From<ActionError> for TxExecutionError {
27694    fn from(value: ActionError) -> Self {
27695        Self::ActionError(value)
27696    }
27697}
27698impl ::std::convert::From<InvalidTxError> for TxExecutionError {
27699    fn from(value: InvalidTxError) -> Self {
27700        Self::InvalidTxError(value)
27701    }
27702}
27703#[doc = "`TxExecutionStatus`"]
27704#[doc = r""]
27705#[doc = r" <details><summary>JSON schema</summary>"]
27706#[doc = r""]
27707#[doc = r" ```json"]
27708#[doc = "{"]
27709#[doc = "  \"oneOf\": ["]
27710#[doc = "    {"]
27711#[doc = "      \"description\": \"Transaction is waiting to be included into the block\","]
27712#[doc = "      \"type\": \"string\","]
27713#[doc = "      \"enum\": ["]
27714#[doc = "        \"NONE\""]
27715#[doc = "      ]"]
27716#[doc = "    },"]
27717#[doc = "    {"]
27718#[doc = "      \"description\": \"Transaction is included into the block. The block may be not finalized yet\","]
27719#[doc = "      \"type\": \"string\","]
27720#[doc = "      \"enum\": ["]
27721#[doc = "        \"INCLUDED\""]
27722#[doc = "      ]"]
27723#[doc = "    },"]
27724#[doc = "    {"]
27725#[doc = "      \"description\": \"Transaction is included into the block +\\nAll non-refund transaction receipts finished their execution.\\nThe corresponding blocks for tx and each receipt may be not finalized yet\","]
27726#[doc = "      \"type\": \"string\","]
27727#[doc = "      \"enum\": ["]
27728#[doc = "        \"EXECUTED_OPTIMISTIC\""]
27729#[doc = "      ]"]
27730#[doc = "    },"]
27731#[doc = "    {"]
27732#[doc = "      \"description\": \"Transaction is included into finalized block\","]
27733#[doc = "      \"type\": \"string\","]
27734#[doc = "      \"enum\": ["]
27735#[doc = "        \"INCLUDED_FINAL\""]
27736#[doc = "      ]"]
27737#[doc = "    },"]
27738#[doc = "    {"]
27739#[doc = "      \"description\": \"Transaction is included into finalized block +\\nAll non-refund transaction receipts finished their execution.\\nThe corresponding blocks for each receipt may be not finalized yet\","]
27740#[doc = "      \"type\": \"string\","]
27741#[doc = "      \"enum\": ["]
27742#[doc = "        \"EXECUTED\""]
27743#[doc = "      ]"]
27744#[doc = "    },"]
27745#[doc = "    {"]
27746#[doc = "      \"description\": \"Transaction is included into finalized block +\\nExecution of all transaction receipts is finalized, including refund receipts\","]
27747#[doc = "      \"type\": \"string\","]
27748#[doc = "      \"enum\": ["]
27749#[doc = "        \"FINAL\""]
27750#[doc = "      ]"]
27751#[doc = "    }"]
27752#[doc = "  ]"]
27753#[doc = "}"]
27754#[doc = r" ```"]
27755#[doc = r" </details>"]
27756#[derive(
27757    :: serde :: Deserialize,
27758    :: serde :: Serialize,
27759    Clone,
27760    Copy,
27761    Debug,
27762    Eq,
27763    Hash,
27764    Ord,
27765    PartialEq,
27766    PartialOrd,
27767)]
27768pub enum TxExecutionStatus {
27769    #[doc = "Transaction is waiting to be included into the block"]
27770    #[serde(rename = "NONE")]
27771    None,
27772    #[doc = "Transaction is included into the block. The block may be not finalized yet"]
27773    #[serde(rename = "INCLUDED")]
27774    Included,
27775    #[doc = "Transaction is included into the block +\nAll non-refund transaction receipts finished their execution.\nThe corresponding blocks for tx and each receipt may be not finalized yet"]
27776    #[serde(rename = "EXECUTED_OPTIMISTIC")]
27777    ExecutedOptimistic,
27778    #[doc = "Transaction is included into finalized block"]
27779    #[serde(rename = "INCLUDED_FINAL")]
27780    IncludedFinal,
27781    #[doc = "Transaction is included into finalized block +\nAll non-refund transaction receipts finished their execution.\nThe corresponding blocks for each receipt may be not finalized yet"]
27782    #[serde(rename = "EXECUTED")]
27783    Executed,
27784    #[doc = "Transaction is included into finalized block +\nExecution of all transaction receipts is finalized, including refund receipts"]
27785    #[serde(rename = "FINAL")]
27786    Final,
27787}
27788impl ::std::convert::From<&Self> for TxExecutionStatus {
27789    fn from(value: &TxExecutionStatus) -> Self {
27790        value.clone()
27791    }
27792}
27793impl ::std::fmt::Display for TxExecutionStatus {
27794    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
27795        match *self {
27796            Self::None => f.write_str("NONE"),
27797            Self::Included => f.write_str("INCLUDED"),
27798            Self::ExecutedOptimistic => f.write_str("EXECUTED_OPTIMISTIC"),
27799            Self::IncludedFinal => f.write_str("INCLUDED_FINAL"),
27800            Self::Executed => f.write_str("EXECUTED"),
27801            Self::Final => f.write_str("FINAL"),
27802        }
27803    }
27804}
27805impl ::std::str::FromStr for TxExecutionStatus {
27806    type Err = self::error::ConversionError;
27807    fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
27808        match value {
27809            "NONE" => Ok(Self::None),
27810            "INCLUDED" => Ok(Self::Included),
27811            "EXECUTED_OPTIMISTIC" => Ok(Self::ExecutedOptimistic),
27812            "INCLUDED_FINAL" => Ok(Self::IncludedFinal),
27813            "EXECUTED" => Ok(Self::Executed),
27814            "FINAL" => Ok(Self::Final),
27815            _ => Err("invalid value".into()),
27816        }
27817    }
27818}
27819impl ::std::convert::TryFrom<&str> for TxExecutionStatus {
27820    type Error = self::error::ConversionError;
27821    fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
27822        value.parse()
27823    }
27824}
27825impl ::std::convert::TryFrom<&::std::string::String> for TxExecutionStatus {
27826    type Error = self::error::ConversionError;
27827    fn try_from(
27828        value: &::std::string::String,
27829    ) -> ::std::result::Result<Self, self::error::ConversionError> {
27830        value.parse()
27831    }
27832}
27833impl ::std::convert::TryFrom<::std::string::String> for TxExecutionStatus {
27834    type Error = self::error::ConversionError;
27835    fn try_from(
27836        value: ::std::string::String,
27837    ) -> ::std::result::Result<Self, self::error::ConversionError> {
27838        value.parse()
27839    }
27840}
27841#[doc = "Use global contract action"]
27842#[doc = r""]
27843#[doc = r" <details><summary>JSON schema</summary>"]
27844#[doc = r""]
27845#[doc = r" ```json"]
27846#[doc = "{"]
27847#[doc = "  \"description\": \"Use global contract action\","]
27848#[doc = "  \"type\": \"object\","]
27849#[doc = "  \"required\": ["]
27850#[doc = "    \"contract_identifier\""]
27851#[doc = "  ],"]
27852#[doc = "  \"properties\": {"]
27853#[doc = "    \"contract_identifier\": {"]
27854#[doc = "      \"$ref\": \"#/components/schemas/GlobalContractIdentifier\""]
27855#[doc = "    }"]
27856#[doc = "  }"]
27857#[doc = "}"]
27858#[doc = r" ```"]
27859#[doc = r" </details>"]
27860#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
27861pub struct UseGlobalContractAction {
27862    pub contract_identifier: GlobalContractIdentifier,
27863}
27864impl ::std::convert::From<&UseGlobalContractAction> for UseGlobalContractAction {
27865    fn from(value: &UseGlobalContractAction) -> Self {
27866        value.clone()
27867    }
27868}
27869#[doc = "`ValidatorInfo`"]
27870#[doc = r""]
27871#[doc = r" <details><summary>JSON schema</summary>"]
27872#[doc = r""]
27873#[doc = r" ```json"]
27874#[doc = "{"]
27875#[doc = "  \"type\": \"object\","]
27876#[doc = "  \"required\": ["]
27877#[doc = "    \"account_id\""]
27878#[doc = "  ],"]
27879#[doc = "  \"properties\": {"]
27880#[doc = "    \"account_id\": {"]
27881#[doc = "      \"$ref\": \"#/components/schemas/AccountId\""]
27882#[doc = "    }"]
27883#[doc = "  }"]
27884#[doc = "}"]
27885#[doc = r" ```"]
27886#[doc = r" </details>"]
27887#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
27888pub struct ValidatorInfo {
27889    pub account_id: AccountId,
27890}
27891impl ::std::convert::From<&ValidatorInfo> for ValidatorInfo {
27892    fn from(value: &ValidatorInfo) -> Self {
27893        value.clone()
27894    }
27895}
27896#[doc = "Reasons for removing a validator from the validator set."]
27897#[doc = r""]
27898#[doc = r" <details><summary>JSON schema</summary>"]
27899#[doc = r""]
27900#[doc = r" ```json"]
27901#[doc = "{"]
27902#[doc = "  \"description\": \"Reasons for removing a validator from the validator set.\","]
27903#[doc = "  \"oneOf\": ["]
27904#[doc = "    {"]
27905#[doc = "      \"description\": \"Deprecated\","]
27906#[doc = "      \"type\": \"string\","]
27907#[doc = "      \"enum\": ["]
27908#[doc = "        \"_UnusedSlashed\""]
27909#[doc = "      ]"]
27910#[doc = "    },"]
27911#[doc = "    {"]
27912#[doc = "      \"description\": \"Validator didn't produce enough blocks.\","]
27913#[doc = "      \"type\": \"object\","]
27914#[doc = "      \"required\": ["]
27915#[doc = "        \"NotEnoughBlocks\""]
27916#[doc = "      ],"]
27917#[doc = "      \"properties\": {"]
27918#[doc = "        \"NotEnoughBlocks\": {"]
27919#[doc = "          \"type\": \"object\","]
27920#[doc = "          \"required\": ["]
27921#[doc = "            \"expected\","]
27922#[doc = "            \"produced\""]
27923#[doc = "          ],"]
27924#[doc = "          \"properties\": {"]
27925#[doc = "            \"expected\": {"]
27926#[doc = "              \"type\": \"integer\","]
27927#[doc = "              \"format\": \"uint64\","]
27928#[doc = "              \"minimum\": 0.0"]
27929#[doc = "            },"]
27930#[doc = "            \"produced\": {"]
27931#[doc = "              \"type\": \"integer\","]
27932#[doc = "              \"format\": \"uint64\","]
27933#[doc = "              \"minimum\": 0.0"]
27934#[doc = "            }"]
27935#[doc = "          }"]
27936#[doc = "        }"]
27937#[doc = "      },"]
27938#[doc = "      \"additionalProperties\": false"]
27939#[doc = "    },"]
27940#[doc = "    {"]
27941#[doc = "      \"description\": \"Validator didn't produce enough chunks.\","]
27942#[doc = "      \"type\": \"object\","]
27943#[doc = "      \"required\": ["]
27944#[doc = "        \"NotEnoughChunks\""]
27945#[doc = "      ],"]
27946#[doc = "      \"properties\": {"]
27947#[doc = "        \"NotEnoughChunks\": {"]
27948#[doc = "          \"type\": \"object\","]
27949#[doc = "          \"required\": ["]
27950#[doc = "            \"expected\","]
27951#[doc = "            \"produced\""]
27952#[doc = "          ],"]
27953#[doc = "          \"properties\": {"]
27954#[doc = "            \"expected\": {"]
27955#[doc = "              \"type\": \"integer\","]
27956#[doc = "              \"format\": \"uint64\","]
27957#[doc = "              \"minimum\": 0.0"]
27958#[doc = "            },"]
27959#[doc = "            \"produced\": {"]
27960#[doc = "              \"type\": \"integer\","]
27961#[doc = "              \"format\": \"uint64\","]
27962#[doc = "              \"minimum\": 0.0"]
27963#[doc = "            }"]
27964#[doc = "          }"]
27965#[doc = "        }"]
27966#[doc = "      },"]
27967#[doc = "      \"additionalProperties\": false"]
27968#[doc = "    },"]
27969#[doc = "    {"]
27970#[doc = "      \"description\": \"Validator unstaked themselves.\","]
27971#[doc = "      \"type\": \"string\","]
27972#[doc = "      \"enum\": ["]
27973#[doc = "        \"Unstaked\""]
27974#[doc = "      ]"]
27975#[doc = "    },"]
27976#[doc = "    {"]
27977#[doc = "      \"description\": \"Validator stake is now below threshold\","]
27978#[doc = "      \"type\": \"object\","]
27979#[doc = "      \"required\": ["]
27980#[doc = "        \"NotEnoughStake\""]
27981#[doc = "      ],"]
27982#[doc = "      \"properties\": {"]
27983#[doc = "        \"NotEnoughStake\": {"]
27984#[doc = "          \"type\": \"object\","]
27985#[doc = "          \"required\": ["]
27986#[doc = "            \"stake_u128\","]
27987#[doc = "            \"threshold_u128\""]
27988#[doc = "          ],"]
27989#[doc = "          \"properties\": {"]
27990#[doc = "            \"stake_u128\": {"]
27991#[doc = "              \"$ref\": \"#/components/schemas/NearToken\""]
27992#[doc = "            },"]
27993#[doc = "            \"threshold_u128\": {"]
27994#[doc = "              \"$ref\": \"#/components/schemas/NearToken\""]
27995#[doc = "            }"]
27996#[doc = "          }"]
27997#[doc = "        }"]
27998#[doc = "      },"]
27999#[doc = "      \"additionalProperties\": false"]
28000#[doc = "    },"]
28001#[doc = "    {"]
28002#[doc = "      \"description\": \"Enough stake but is not chosen because of seat limits.\","]
28003#[doc = "      \"type\": \"string\","]
28004#[doc = "      \"enum\": ["]
28005#[doc = "        \"DidNotGetASeat\""]
28006#[doc = "      ]"]
28007#[doc = "    },"]
28008#[doc = "    {"]
28009#[doc = "      \"description\": \"Validator didn't produce enough chunk endorsements.\","]
28010#[doc = "      \"type\": \"object\","]
28011#[doc = "      \"required\": ["]
28012#[doc = "        \"NotEnoughChunkEndorsements\""]
28013#[doc = "      ],"]
28014#[doc = "      \"properties\": {"]
28015#[doc = "        \"NotEnoughChunkEndorsements\": {"]
28016#[doc = "          \"type\": \"object\","]
28017#[doc = "          \"required\": ["]
28018#[doc = "            \"expected\","]
28019#[doc = "            \"produced\""]
28020#[doc = "          ],"]
28021#[doc = "          \"properties\": {"]
28022#[doc = "            \"expected\": {"]
28023#[doc = "              \"type\": \"integer\","]
28024#[doc = "              \"format\": \"uint64\","]
28025#[doc = "              \"minimum\": 0.0"]
28026#[doc = "            },"]
28027#[doc = "            \"produced\": {"]
28028#[doc = "              \"type\": \"integer\","]
28029#[doc = "              \"format\": \"uint64\","]
28030#[doc = "              \"minimum\": 0.0"]
28031#[doc = "            }"]
28032#[doc = "          }"]
28033#[doc = "        }"]
28034#[doc = "      },"]
28035#[doc = "      \"additionalProperties\": false"]
28036#[doc = "    },"]
28037#[doc = "    {"]
28038#[doc = "      \"description\": \"Validator's last block proposal was for a protocol version older than\\nthe network's voted protocol version.\","]
28039#[doc = "      \"type\": \"object\","]
28040#[doc = "      \"required\": ["]
28041#[doc = "        \"ProtocolVersionTooOld\""]
28042#[doc = "      ],"]
28043#[doc = "      \"properties\": {"]
28044#[doc = "        \"ProtocolVersionTooOld\": {"]
28045#[doc = "          \"type\": \"object\","]
28046#[doc = "          \"required\": ["]
28047#[doc = "            \"network_version\","]
28048#[doc = "            \"version\""]
28049#[doc = "          ],"]
28050#[doc = "          \"properties\": {"]
28051#[doc = "            \"network_version\": {"]
28052#[doc = "              \"type\": \"integer\","]
28053#[doc = "              \"format\": \"uint32\","]
28054#[doc = "              \"minimum\": 0.0"]
28055#[doc = "            },"]
28056#[doc = "            \"version\": {"]
28057#[doc = "              \"type\": \"integer\","]
28058#[doc = "              \"format\": \"uint32\","]
28059#[doc = "              \"minimum\": 0.0"]
28060#[doc = "            }"]
28061#[doc = "          }"]
28062#[doc = "        }"]
28063#[doc = "      },"]
28064#[doc = "      \"additionalProperties\": false"]
28065#[doc = "    }"]
28066#[doc = "  ]"]
28067#[doc = "}"]
28068#[doc = r" ```"]
28069#[doc = r" </details>"]
28070#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
28071pub enum ValidatorKickoutReason {
28072    #[doc = "Deprecated"]
28073    #[serde(rename = "_UnusedSlashed")]
28074    UnusedSlashed,
28075    #[doc = "Validator didn't produce enough blocks."]
28076    NotEnoughBlocks { expected: u64, produced: u64 },
28077    #[doc = "Validator didn't produce enough chunks."]
28078    NotEnoughChunks { expected: u64, produced: u64 },
28079    #[doc = "Validator unstaked themselves."]
28080    Unstaked,
28081    #[doc = "Validator stake is now below threshold"]
28082    NotEnoughStake {
28083        stake_u128: NearToken,
28084        threshold_u128: NearToken,
28085    },
28086    #[doc = "Enough stake but is not chosen because of seat limits."]
28087    DidNotGetASeat,
28088    #[doc = "Validator didn't produce enough chunk endorsements."]
28089    NotEnoughChunkEndorsements { expected: u64, produced: u64 },
28090    #[doc = "Validator's last block proposal was for a protocol version older than\nthe network's voted protocol version."]
28091    ProtocolVersionTooOld { network_version: u32, version: u32 },
28092}
28093impl ::std::convert::From<&Self> for ValidatorKickoutReason {
28094    fn from(value: &ValidatorKickoutReason) -> Self {
28095        value.clone()
28096    }
28097}
28098#[doc = "`ValidatorKickoutView`"]
28099#[doc = r""]
28100#[doc = r" <details><summary>JSON schema</summary>"]
28101#[doc = r""]
28102#[doc = r" ```json"]
28103#[doc = "{"]
28104#[doc = "  \"type\": \"object\","]
28105#[doc = "  \"required\": ["]
28106#[doc = "    \"account_id\","]
28107#[doc = "    \"reason\""]
28108#[doc = "  ],"]
28109#[doc = "  \"properties\": {"]
28110#[doc = "    \"account_id\": {"]
28111#[doc = "      \"$ref\": \"#/components/schemas/AccountId\""]
28112#[doc = "    },"]
28113#[doc = "    \"reason\": {"]
28114#[doc = "      \"$ref\": \"#/components/schemas/ValidatorKickoutReason\""]
28115#[doc = "    }"]
28116#[doc = "  }"]
28117#[doc = "}"]
28118#[doc = r" ```"]
28119#[doc = r" </details>"]
28120#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
28121pub struct ValidatorKickoutView {
28122    pub account_id: AccountId,
28123    pub reason: ValidatorKickoutReason,
28124}
28125impl ::std::convert::From<&ValidatorKickoutView> for ValidatorKickoutView {
28126    fn from(value: &ValidatorKickoutView) -> Self {
28127        value.clone()
28128    }
28129}
28130#[doc = "`ValidatorStakeView`"]
28131#[doc = r""]
28132#[doc = r" <details><summary>JSON schema</summary>"]
28133#[doc = r""]
28134#[doc = r" ```json"]
28135#[doc = "{"]
28136#[doc = "  \"type\": \"object\","]
28137#[doc = "  \"allOf\": ["]
28138#[doc = "    {"]
28139#[doc = "      \"$ref\": \"#/components/schemas/ValidatorStakeViewV1\""]
28140#[doc = "    }"]
28141#[doc = "  ],"]
28142#[doc = "  \"required\": ["]
28143#[doc = "    \"validator_stake_struct_version\""]
28144#[doc = "  ],"]
28145#[doc = "  \"properties\": {"]
28146#[doc = "    \"validator_stake_struct_version\": {"]
28147#[doc = "      \"type\": \"string\","]
28148#[doc = "      \"enum\": ["]
28149#[doc = "        \"V1\""]
28150#[doc = "      ]"]
28151#[doc = "    }"]
28152#[doc = "  }"]
28153#[doc = "}"]
28154#[doc = r" ```"]
28155#[doc = r" </details>"]
28156#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
28157pub struct ValidatorStakeView {
28158    pub account_id: AccountId,
28159    pub public_key: PublicKey,
28160    pub stake: NearToken,
28161    pub validator_stake_struct_version: ValidatorStakeViewValidatorStakeStructVersion,
28162}
28163impl ::std::convert::From<&ValidatorStakeView> for ValidatorStakeView {
28164    fn from(value: &ValidatorStakeView) -> Self {
28165        value.clone()
28166    }
28167}
28168#[doc = "`ValidatorStakeViewV1`"]
28169#[doc = r""]
28170#[doc = r" <details><summary>JSON schema</summary>"]
28171#[doc = r""]
28172#[doc = r" ```json"]
28173#[doc = "{"]
28174#[doc = "  \"type\": \"object\","]
28175#[doc = "  \"required\": ["]
28176#[doc = "    \"account_id\","]
28177#[doc = "    \"public_key\","]
28178#[doc = "    \"stake\""]
28179#[doc = "  ],"]
28180#[doc = "  \"properties\": {"]
28181#[doc = "    \"account_id\": {"]
28182#[doc = "      \"$ref\": \"#/components/schemas/AccountId\""]
28183#[doc = "    },"]
28184#[doc = "    \"public_key\": {"]
28185#[doc = "      \"$ref\": \"#/components/schemas/PublicKey\""]
28186#[doc = "    },"]
28187#[doc = "    \"stake\": {"]
28188#[doc = "      \"$ref\": \"#/components/schemas/NearToken\""]
28189#[doc = "    }"]
28190#[doc = "  }"]
28191#[doc = "}"]
28192#[doc = r" ```"]
28193#[doc = r" </details>"]
28194#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
28195pub struct ValidatorStakeViewV1 {
28196    pub account_id: AccountId,
28197    pub public_key: PublicKey,
28198    pub stake: NearToken,
28199}
28200impl ::std::convert::From<&ValidatorStakeViewV1> for ValidatorStakeViewV1 {
28201    fn from(value: &ValidatorStakeViewV1) -> Self {
28202        value.clone()
28203    }
28204}
28205#[doc = "`ValidatorStakeViewValidatorStakeStructVersion`"]
28206#[doc = r""]
28207#[doc = r" <details><summary>JSON schema</summary>"]
28208#[doc = r""]
28209#[doc = r" ```json"]
28210#[doc = "{"]
28211#[doc = "  \"type\": \"string\","]
28212#[doc = "  \"enum\": ["]
28213#[doc = "    \"V1\""]
28214#[doc = "  ]"]
28215#[doc = "}"]
28216#[doc = r" ```"]
28217#[doc = r" </details>"]
28218#[derive(
28219    :: serde :: Deserialize,
28220    :: serde :: Serialize,
28221    Clone,
28222    Copy,
28223    Debug,
28224    Eq,
28225    Hash,
28226    Ord,
28227    PartialEq,
28228    PartialOrd,
28229)]
28230pub enum ValidatorStakeViewValidatorStakeStructVersion {
28231    V1,
28232}
28233impl ::std::convert::From<&Self> for ValidatorStakeViewValidatorStakeStructVersion {
28234    fn from(value: &ValidatorStakeViewValidatorStakeStructVersion) -> Self {
28235        value.clone()
28236    }
28237}
28238impl ::std::fmt::Display for ValidatorStakeViewValidatorStakeStructVersion {
28239    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
28240        match *self {
28241            Self::V1 => f.write_str("V1"),
28242        }
28243    }
28244}
28245impl ::std::str::FromStr for ValidatorStakeViewValidatorStakeStructVersion {
28246    type Err = self::error::ConversionError;
28247    fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
28248        match value {
28249            "V1" => Ok(Self::V1),
28250            _ => Err("invalid value".into()),
28251        }
28252    }
28253}
28254impl ::std::convert::TryFrom<&str> for ValidatorStakeViewValidatorStakeStructVersion {
28255    type Error = self::error::ConversionError;
28256    fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
28257        value.parse()
28258    }
28259}
28260impl ::std::convert::TryFrom<&::std::string::String>
28261    for ValidatorStakeViewValidatorStakeStructVersion
28262{
28263    type Error = self::error::ConversionError;
28264    fn try_from(
28265        value: &::std::string::String,
28266    ) -> ::std::result::Result<Self, self::error::ConversionError> {
28267        value.parse()
28268    }
28269}
28270impl ::std::convert::TryFrom<::std::string::String>
28271    for ValidatorStakeViewValidatorStakeStructVersion
28272{
28273    type Error = self::error::ConversionError;
28274    fn try_from(
28275        value: ::std::string::String,
28276    ) -> ::std::result::Result<Self, self::error::ConversionError> {
28277        value.parse()
28278    }
28279}
28280#[doc = "Data structure for semver version and github tag or commit."]
28281#[doc = r""]
28282#[doc = r" <details><summary>JSON schema</summary>"]
28283#[doc = r""]
28284#[doc = r" ```json"]
28285#[doc = "{"]
28286#[doc = "  \"description\": \"Data structure for semver version and github tag or commit.\","]
28287#[doc = "  \"type\": \"object\","]
28288#[doc = "  \"required\": ["]
28289#[doc = "    \"build\","]
28290#[doc = "    \"commit\","]
28291#[doc = "    \"version\""]
28292#[doc = "  ],"]
28293#[doc = "  \"properties\": {"]
28294#[doc = "    \"build\": {"]
28295#[doc = "      \"type\": \"string\""]
28296#[doc = "    },"]
28297#[doc = "    \"commit\": {"]
28298#[doc = "      \"type\": \"string\""]
28299#[doc = "    },"]
28300#[doc = "    \"rustc_version\": {"]
28301#[doc = "      \"default\": \"\","]
28302#[doc = "      \"type\": \"string\""]
28303#[doc = "    },"]
28304#[doc = "    \"version\": {"]
28305#[doc = "      \"type\": \"string\""]
28306#[doc = "    }"]
28307#[doc = "  }"]
28308#[doc = "}"]
28309#[doc = r" ```"]
28310#[doc = r" </details>"]
28311#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
28312pub struct Version {
28313    pub build: ::std::string::String,
28314    pub commit: ::std::string::String,
28315    #[serde(default)]
28316    pub rustc_version: ::std::string::String,
28317    pub version: ::std::string::String,
28318}
28319impl ::std::convert::From<&Version> for Version {
28320    fn from(value: &Version) -> Self {
28321        value.clone()
28322    }
28323}
28324#[doc = "`ViewAccessKeyByBlockIdRequestType`"]
28325#[doc = r""]
28326#[doc = r" <details><summary>JSON schema</summary>"]
28327#[doc = r""]
28328#[doc = r" ```json"]
28329#[doc = "{"]
28330#[doc = "  \"type\": \"string\","]
28331#[doc = "  \"enum\": ["]
28332#[doc = "    \"view_access_key\""]
28333#[doc = "  ]"]
28334#[doc = "}"]
28335#[doc = r" ```"]
28336#[doc = r" </details>"]
28337#[derive(
28338    :: serde :: Deserialize,
28339    :: serde :: Serialize,
28340    Clone,
28341    Copy,
28342    Debug,
28343    Eq,
28344    Hash,
28345    Ord,
28346    PartialEq,
28347    PartialOrd,
28348)]
28349pub enum ViewAccessKeyByBlockIdRequestType {
28350    #[serde(rename = "view_access_key")]
28351    ViewAccessKey,
28352}
28353impl ::std::convert::From<&Self> for ViewAccessKeyByBlockIdRequestType {
28354    fn from(value: &ViewAccessKeyByBlockIdRequestType) -> Self {
28355        value.clone()
28356    }
28357}
28358impl ::std::fmt::Display for ViewAccessKeyByBlockIdRequestType {
28359    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
28360        match *self {
28361            Self::ViewAccessKey => f.write_str("view_access_key"),
28362        }
28363    }
28364}
28365impl ::std::str::FromStr for ViewAccessKeyByBlockIdRequestType {
28366    type Err = self::error::ConversionError;
28367    fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
28368        match value {
28369            "view_access_key" => Ok(Self::ViewAccessKey),
28370            _ => Err("invalid value".into()),
28371        }
28372    }
28373}
28374impl ::std::convert::TryFrom<&str> for ViewAccessKeyByBlockIdRequestType {
28375    type Error = self::error::ConversionError;
28376    fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
28377        value.parse()
28378    }
28379}
28380impl ::std::convert::TryFrom<&::std::string::String> for ViewAccessKeyByBlockIdRequestType {
28381    type Error = self::error::ConversionError;
28382    fn try_from(
28383        value: &::std::string::String,
28384    ) -> ::std::result::Result<Self, self::error::ConversionError> {
28385        value.parse()
28386    }
28387}
28388impl ::std::convert::TryFrom<::std::string::String> for ViewAccessKeyByBlockIdRequestType {
28389    type Error = self::error::ConversionError;
28390    fn try_from(
28391        value: ::std::string::String,
28392    ) -> ::std::result::Result<Self, self::error::ConversionError> {
28393        value.parse()
28394    }
28395}
28396#[doc = "`ViewAccessKeyByFinalityRequestType`"]
28397#[doc = r""]
28398#[doc = r" <details><summary>JSON schema</summary>"]
28399#[doc = r""]
28400#[doc = r" ```json"]
28401#[doc = "{"]
28402#[doc = "  \"type\": \"string\","]
28403#[doc = "  \"enum\": ["]
28404#[doc = "    \"view_access_key\""]
28405#[doc = "  ]"]
28406#[doc = "}"]
28407#[doc = r" ```"]
28408#[doc = r" </details>"]
28409#[derive(
28410    :: serde :: Deserialize,
28411    :: serde :: Serialize,
28412    Clone,
28413    Copy,
28414    Debug,
28415    Eq,
28416    Hash,
28417    Ord,
28418    PartialEq,
28419    PartialOrd,
28420)]
28421pub enum ViewAccessKeyByFinalityRequestType {
28422    #[serde(rename = "view_access_key")]
28423    ViewAccessKey,
28424}
28425impl ::std::convert::From<&Self> for ViewAccessKeyByFinalityRequestType {
28426    fn from(value: &ViewAccessKeyByFinalityRequestType) -> Self {
28427        value.clone()
28428    }
28429}
28430impl ::std::fmt::Display for ViewAccessKeyByFinalityRequestType {
28431    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
28432        match *self {
28433            Self::ViewAccessKey => f.write_str("view_access_key"),
28434        }
28435    }
28436}
28437impl ::std::str::FromStr for ViewAccessKeyByFinalityRequestType {
28438    type Err = self::error::ConversionError;
28439    fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
28440        match value {
28441            "view_access_key" => Ok(Self::ViewAccessKey),
28442            _ => Err("invalid value".into()),
28443        }
28444    }
28445}
28446impl ::std::convert::TryFrom<&str> for ViewAccessKeyByFinalityRequestType {
28447    type Error = self::error::ConversionError;
28448    fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
28449        value.parse()
28450    }
28451}
28452impl ::std::convert::TryFrom<&::std::string::String> for ViewAccessKeyByFinalityRequestType {
28453    type Error = self::error::ConversionError;
28454    fn try_from(
28455        value: &::std::string::String,
28456    ) -> ::std::result::Result<Self, self::error::ConversionError> {
28457        value.parse()
28458    }
28459}
28460impl ::std::convert::TryFrom<::std::string::String> for ViewAccessKeyByFinalityRequestType {
28461    type Error = self::error::ConversionError;
28462    fn try_from(
28463        value: ::std::string::String,
28464    ) -> ::std::result::Result<Self, self::error::ConversionError> {
28465        value.parse()
28466    }
28467}
28468#[doc = "`ViewAccessKeyBySyncCheckpointRequestType`"]
28469#[doc = r""]
28470#[doc = r" <details><summary>JSON schema</summary>"]
28471#[doc = r""]
28472#[doc = r" ```json"]
28473#[doc = "{"]
28474#[doc = "  \"type\": \"string\","]
28475#[doc = "  \"enum\": ["]
28476#[doc = "    \"view_access_key\""]
28477#[doc = "  ]"]
28478#[doc = "}"]
28479#[doc = r" ```"]
28480#[doc = r" </details>"]
28481#[derive(
28482    :: serde :: Deserialize,
28483    :: serde :: Serialize,
28484    Clone,
28485    Copy,
28486    Debug,
28487    Eq,
28488    Hash,
28489    Ord,
28490    PartialEq,
28491    PartialOrd,
28492)]
28493pub enum ViewAccessKeyBySyncCheckpointRequestType {
28494    #[serde(rename = "view_access_key")]
28495    ViewAccessKey,
28496}
28497impl ::std::convert::From<&Self> for ViewAccessKeyBySyncCheckpointRequestType {
28498    fn from(value: &ViewAccessKeyBySyncCheckpointRequestType) -> Self {
28499        value.clone()
28500    }
28501}
28502impl ::std::fmt::Display for ViewAccessKeyBySyncCheckpointRequestType {
28503    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
28504        match *self {
28505            Self::ViewAccessKey => f.write_str("view_access_key"),
28506        }
28507    }
28508}
28509impl ::std::str::FromStr for ViewAccessKeyBySyncCheckpointRequestType {
28510    type Err = self::error::ConversionError;
28511    fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
28512        match value {
28513            "view_access_key" => Ok(Self::ViewAccessKey),
28514            _ => Err("invalid value".into()),
28515        }
28516    }
28517}
28518impl ::std::convert::TryFrom<&str> for ViewAccessKeyBySyncCheckpointRequestType {
28519    type Error = self::error::ConversionError;
28520    fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
28521        value.parse()
28522    }
28523}
28524impl ::std::convert::TryFrom<&::std::string::String> for ViewAccessKeyBySyncCheckpointRequestType {
28525    type Error = self::error::ConversionError;
28526    fn try_from(
28527        value: &::std::string::String,
28528    ) -> ::std::result::Result<Self, self::error::ConversionError> {
28529        value.parse()
28530    }
28531}
28532impl ::std::convert::TryFrom<::std::string::String> for ViewAccessKeyBySyncCheckpointRequestType {
28533    type Error = self::error::ConversionError;
28534    fn try_from(
28535        value: ::std::string::String,
28536    ) -> ::std::result::Result<Self, self::error::ConversionError> {
28537        value.parse()
28538    }
28539}
28540#[doc = "`ViewAccessKeyListByBlockIdRequestType`"]
28541#[doc = r""]
28542#[doc = r" <details><summary>JSON schema</summary>"]
28543#[doc = r""]
28544#[doc = r" ```json"]
28545#[doc = "{"]
28546#[doc = "  \"type\": \"string\","]
28547#[doc = "  \"enum\": ["]
28548#[doc = "    \"view_access_key_list\""]
28549#[doc = "  ]"]
28550#[doc = "}"]
28551#[doc = r" ```"]
28552#[doc = r" </details>"]
28553#[derive(
28554    :: serde :: Deserialize,
28555    :: serde :: Serialize,
28556    Clone,
28557    Copy,
28558    Debug,
28559    Eq,
28560    Hash,
28561    Ord,
28562    PartialEq,
28563    PartialOrd,
28564)]
28565pub enum ViewAccessKeyListByBlockIdRequestType {
28566    #[serde(rename = "view_access_key_list")]
28567    ViewAccessKeyList,
28568}
28569impl ::std::convert::From<&Self> for ViewAccessKeyListByBlockIdRequestType {
28570    fn from(value: &ViewAccessKeyListByBlockIdRequestType) -> Self {
28571        value.clone()
28572    }
28573}
28574impl ::std::fmt::Display for ViewAccessKeyListByBlockIdRequestType {
28575    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
28576        match *self {
28577            Self::ViewAccessKeyList => f.write_str("view_access_key_list"),
28578        }
28579    }
28580}
28581impl ::std::str::FromStr for ViewAccessKeyListByBlockIdRequestType {
28582    type Err = self::error::ConversionError;
28583    fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
28584        match value {
28585            "view_access_key_list" => Ok(Self::ViewAccessKeyList),
28586            _ => Err("invalid value".into()),
28587        }
28588    }
28589}
28590impl ::std::convert::TryFrom<&str> for ViewAccessKeyListByBlockIdRequestType {
28591    type Error = self::error::ConversionError;
28592    fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
28593        value.parse()
28594    }
28595}
28596impl ::std::convert::TryFrom<&::std::string::String> for ViewAccessKeyListByBlockIdRequestType {
28597    type Error = self::error::ConversionError;
28598    fn try_from(
28599        value: &::std::string::String,
28600    ) -> ::std::result::Result<Self, self::error::ConversionError> {
28601        value.parse()
28602    }
28603}
28604impl ::std::convert::TryFrom<::std::string::String> for ViewAccessKeyListByBlockIdRequestType {
28605    type Error = self::error::ConversionError;
28606    fn try_from(
28607        value: ::std::string::String,
28608    ) -> ::std::result::Result<Self, self::error::ConversionError> {
28609        value.parse()
28610    }
28611}
28612#[doc = "`ViewAccessKeyListByFinalityRequestType`"]
28613#[doc = r""]
28614#[doc = r" <details><summary>JSON schema</summary>"]
28615#[doc = r""]
28616#[doc = r" ```json"]
28617#[doc = "{"]
28618#[doc = "  \"type\": \"string\","]
28619#[doc = "  \"enum\": ["]
28620#[doc = "    \"view_access_key_list\""]
28621#[doc = "  ]"]
28622#[doc = "}"]
28623#[doc = r" ```"]
28624#[doc = r" </details>"]
28625#[derive(
28626    :: serde :: Deserialize,
28627    :: serde :: Serialize,
28628    Clone,
28629    Copy,
28630    Debug,
28631    Eq,
28632    Hash,
28633    Ord,
28634    PartialEq,
28635    PartialOrd,
28636)]
28637pub enum ViewAccessKeyListByFinalityRequestType {
28638    #[serde(rename = "view_access_key_list")]
28639    ViewAccessKeyList,
28640}
28641impl ::std::convert::From<&Self> for ViewAccessKeyListByFinalityRequestType {
28642    fn from(value: &ViewAccessKeyListByFinalityRequestType) -> Self {
28643        value.clone()
28644    }
28645}
28646impl ::std::fmt::Display for ViewAccessKeyListByFinalityRequestType {
28647    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
28648        match *self {
28649            Self::ViewAccessKeyList => f.write_str("view_access_key_list"),
28650        }
28651    }
28652}
28653impl ::std::str::FromStr for ViewAccessKeyListByFinalityRequestType {
28654    type Err = self::error::ConversionError;
28655    fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
28656        match value {
28657            "view_access_key_list" => Ok(Self::ViewAccessKeyList),
28658            _ => Err("invalid value".into()),
28659        }
28660    }
28661}
28662impl ::std::convert::TryFrom<&str> for ViewAccessKeyListByFinalityRequestType {
28663    type Error = self::error::ConversionError;
28664    fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
28665        value.parse()
28666    }
28667}
28668impl ::std::convert::TryFrom<&::std::string::String> for ViewAccessKeyListByFinalityRequestType {
28669    type Error = self::error::ConversionError;
28670    fn try_from(
28671        value: &::std::string::String,
28672    ) -> ::std::result::Result<Self, self::error::ConversionError> {
28673        value.parse()
28674    }
28675}
28676impl ::std::convert::TryFrom<::std::string::String> for ViewAccessKeyListByFinalityRequestType {
28677    type Error = self::error::ConversionError;
28678    fn try_from(
28679        value: ::std::string::String,
28680    ) -> ::std::result::Result<Self, self::error::ConversionError> {
28681        value.parse()
28682    }
28683}
28684#[doc = "`ViewAccessKeyListBySyncCheckpointRequestType`"]
28685#[doc = r""]
28686#[doc = r" <details><summary>JSON schema</summary>"]
28687#[doc = r""]
28688#[doc = r" ```json"]
28689#[doc = "{"]
28690#[doc = "  \"type\": \"string\","]
28691#[doc = "  \"enum\": ["]
28692#[doc = "    \"view_access_key_list\""]
28693#[doc = "  ]"]
28694#[doc = "}"]
28695#[doc = r" ```"]
28696#[doc = r" </details>"]
28697#[derive(
28698    :: serde :: Deserialize,
28699    :: serde :: Serialize,
28700    Clone,
28701    Copy,
28702    Debug,
28703    Eq,
28704    Hash,
28705    Ord,
28706    PartialEq,
28707    PartialOrd,
28708)]
28709pub enum ViewAccessKeyListBySyncCheckpointRequestType {
28710    #[serde(rename = "view_access_key_list")]
28711    ViewAccessKeyList,
28712}
28713impl ::std::convert::From<&Self> for ViewAccessKeyListBySyncCheckpointRequestType {
28714    fn from(value: &ViewAccessKeyListBySyncCheckpointRequestType) -> Self {
28715        value.clone()
28716    }
28717}
28718impl ::std::fmt::Display for ViewAccessKeyListBySyncCheckpointRequestType {
28719    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
28720        match *self {
28721            Self::ViewAccessKeyList => f.write_str("view_access_key_list"),
28722        }
28723    }
28724}
28725impl ::std::str::FromStr for ViewAccessKeyListBySyncCheckpointRequestType {
28726    type Err = self::error::ConversionError;
28727    fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
28728        match value {
28729            "view_access_key_list" => Ok(Self::ViewAccessKeyList),
28730            _ => Err("invalid value".into()),
28731        }
28732    }
28733}
28734impl ::std::convert::TryFrom<&str> for ViewAccessKeyListBySyncCheckpointRequestType {
28735    type Error = self::error::ConversionError;
28736    fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
28737        value.parse()
28738    }
28739}
28740impl ::std::convert::TryFrom<&::std::string::String>
28741    for ViewAccessKeyListBySyncCheckpointRequestType
28742{
28743    type Error = self::error::ConversionError;
28744    fn try_from(
28745        value: &::std::string::String,
28746    ) -> ::std::result::Result<Self, self::error::ConversionError> {
28747        value.parse()
28748    }
28749}
28750impl ::std::convert::TryFrom<::std::string::String>
28751    for ViewAccessKeyListBySyncCheckpointRequestType
28752{
28753    type Error = self::error::ConversionError;
28754    fn try_from(
28755        value: ::std::string::String,
28756    ) -> ::std::result::Result<Self, self::error::ConversionError> {
28757        value.parse()
28758    }
28759}
28760#[doc = "`ViewAccountByBlockIdRequestType`"]
28761#[doc = r""]
28762#[doc = r" <details><summary>JSON schema</summary>"]
28763#[doc = r""]
28764#[doc = r" ```json"]
28765#[doc = "{"]
28766#[doc = "  \"type\": \"string\","]
28767#[doc = "  \"enum\": ["]
28768#[doc = "    \"view_account\""]
28769#[doc = "  ]"]
28770#[doc = "}"]
28771#[doc = r" ```"]
28772#[doc = r" </details>"]
28773#[derive(
28774    :: serde :: Deserialize,
28775    :: serde :: Serialize,
28776    Clone,
28777    Copy,
28778    Debug,
28779    Eq,
28780    Hash,
28781    Ord,
28782    PartialEq,
28783    PartialOrd,
28784)]
28785pub enum ViewAccountByBlockIdRequestType {
28786    #[serde(rename = "view_account")]
28787    ViewAccount,
28788}
28789impl ::std::convert::From<&Self> for ViewAccountByBlockIdRequestType {
28790    fn from(value: &ViewAccountByBlockIdRequestType) -> Self {
28791        value.clone()
28792    }
28793}
28794impl ::std::fmt::Display for ViewAccountByBlockIdRequestType {
28795    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
28796        match *self {
28797            Self::ViewAccount => f.write_str("view_account"),
28798        }
28799    }
28800}
28801impl ::std::str::FromStr for ViewAccountByBlockIdRequestType {
28802    type Err = self::error::ConversionError;
28803    fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
28804        match value {
28805            "view_account" => Ok(Self::ViewAccount),
28806            _ => Err("invalid value".into()),
28807        }
28808    }
28809}
28810impl ::std::convert::TryFrom<&str> for ViewAccountByBlockIdRequestType {
28811    type Error = self::error::ConversionError;
28812    fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
28813        value.parse()
28814    }
28815}
28816impl ::std::convert::TryFrom<&::std::string::String> for ViewAccountByBlockIdRequestType {
28817    type Error = self::error::ConversionError;
28818    fn try_from(
28819        value: &::std::string::String,
28820    ) -> ::std::result::Result<Self, self::error::ConversionError> {
28821        value.parse()
28822    }
28823}
28824impl ::std::convert::TryFrom<::std::string::String> for ViewAccountByBlockIdRequestType {
28825    type Error = self::error::ConversionError;
28826    fn try_from(
28827        value: ::std::string::String,
28828    ) -> ::std::result::Result<Self, self::error::ConversionError> {
28829        value.parse()
28830    }
28831}
28832#[doc = "`ViewAccountByFinalityRequestType`"]
28833#[doc = r""]
28834#[doc = r" <details><summary>JSON schema</summary>"]
28835#[doc = r""]
28836#[doc = r" ```json"]
28837#[doc = "{"]
28838#[doc = "  \"type\": \"string\","]
28839#[doc = "  \"enum\": ["]
28840#[doc = "    \"view_account\""]
28841#[doc = "  ]"]
28842#[doc = "}"]
28843#[doc = r" ```"]
28844#[doc = r" </details>"]
28845#[derive(
28846    :: serde :: Deserialize,
28847    :: serde :: Serialize,
28848    Clone,
28849    Copy,
28850    Debug,
28851    Eq,
28852    Hash,
28853    Ord,
28854    PartialEq,
28855    PartialOrd,
28856)]
28857pub enum ViewAccountByFinalityRequestType {
28858    #[serde(rename = "view_account")]
28859    ViewAccount,
28860}
28861impl ::std::convert::From<&Self> for ViewAccountByFinalityRequestType {
28862    fn from(value: &ViewAccountByFinalityRequestType) -> Self {
28863        value.clone()
28864    }
28865}
28866impl ::std::fmt::Display for ViewAccountByFinalityRequestType {
28867    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
28868        match *self {
28869            Self::ViewAccount => f.write_str("view_account"),
28870        }
28871    }
28872}
28873impl ::std::str::FromStr for ViewAccountByFinalityRequestType {
28874    type Err = self::error::ConversionError;
28875    fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
28876        match value {
28877            "view_account" => Ok(Self::ViewAccount),
28878            _ => Err("invalid value".into()),
28879        }
28880    }
28881}
28882impl ::std::convert::TryFrom<&str> for ViewAccountByFinalityRequestType {
28883    type Error = self::error::ConversionError;
28884    fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
28885        value.parse()
28886    }
28887}
28888impl ::std::convert::TryFrom<&::std::string::String> for ViewAccountByFinalityRequestType {
28889    type Error = self::error::ConversionError;
28890    fn try_from(
28891        value: &::std::string::String,
28892    ) -> ::std::result::Result<Self, self::error::ConversionError> {
28893        value.parse()
28894    }
28895}
28896impl ::std::convert::TryFrom<::std::string::String> for ViewAccountByFinalityRequestType {
28897    type Error = self::error::ConversionError;
28898    fn try_from(
28899        value: ::std::string::String,
28900    ) -> ::std::result::Result<Self, self::error::ConversionError> {
28901        value.parse()
28902    }
28903}
28904#[doc = "`ViewAccountBySyncCheckpointRequestType`"]
28905#[doc = r""]
28906#[doc = r" <details><summary>JSON schema</summary>"]
28907#[doc = r""]
28908#[doc = r" ```json"]
28909#[doc = "{"]
28910#[doc = "  \"type\": \"string\","]
28911#[doc = "  \"enum\": ["]
28912#[doc = "    \"view_account\""]
28913#[doc = "  ]"]
28914#[doc = "}"]
28915#[doc = r" ```"]
28916#[doc = r" </details>"]
28917#[derive(
28918    :: serde :: Deserialize,
28919    :: serde :: Serialize,
28920    Clone,
28921    Copy,
28922    Debug,
28923    Eq,
28924    Hash,
28925    Ord,
28926    PartialEq,
28927    PartialOrd,
28928)]
28929pub enum ViewAccountBySyncCheckpointRequestType {
28930    #[serde(rename = "view_account")]
28931    ViewAccount,
28932}
28933impl ::std::convert::From<&Self> for ViewAccountBySyncCheckpointRequestType {
28934    fn from(value: &ViewAccountBySyncCheckpointRequestType) -> Self {
28935        value.clone()
28936    }
28937}
28938impl ::std::fmt::Display for ViewAccountBySyncCheckpointRequestType {
28939    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
28940        match *self {
28941            Self::ViewAccount => f.write_str("view_account"),
28942        }
28943    }
28944}
28945impl ::std::str::FromStr for ViewAccountBySyncCheckpointRequestType {
28946    type Err = self::error::ConversionError;
28947    fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
28948        match value {
28949            "view_account" => Ok(Self::ViewAccount),
28950            _ => Err("invalid value".into()),
28951        }
28952    }
28953}
28954impl ::std::convert::TryFrom<&str> for ViewAccountBySyncCheckpointRequestType {
28955    type Error = self::error::ConversionError;
28956    fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
28957        value.parse()
28958    }
28959}
28960impl ::std::convert::TryFrom<&::std::string::String> for ViewAccountBySyncCheckpointRequestType {
28961    type Error = self::error::ConversionError;
28962    fn try_from(
28963        value: &::std::string::String,
28964    ) -> ::std::result::Result<Self, self::error::ConversionError> {
28965        value.parse()
28966    }
28967}
28968impl ::std::convert::TryFrom<::std::string::String> for ViewAccountBySyncCheckpointRequestType {
28969    type Error = self::error::ConversionError;
28970    fn try_from(
28971        value: ::std::string::String,
28972    ) -> ::std::result::Result<Self, self::error::ConversionError> {
28973        value.parse()
28974    }
28975}
28976#[doc = "`ViewCodeByBlockIdRequestType`"]
28977#[doc = r""]
28978#[doc = r" <details><summary>JSON schema</summary>"]
28979#[doc = r""]
28980#[doc = r" ```json"]
28981#[doc = "{"]
28982#[doc = "  \"type\": \"string\","]
28983#[doc = "  \"enum\": ["]
28984#[doc = "    \"view_code\""]
28985#[doc = "  ]"]
28986#[doc = "}"]
28987#[doc = r" ```"]
28988#[doc = r" </details>"]
28989#[derive(
28990    :: serde :: Deserialize,
28991    :: serde :: Serialize,
28992    Clone,
28993    Copy,
28994    Debug,
28995    Eq,
28996    Hash,
28997    Ord,
28998    PartialEq,
28999    PartialOrd,
29000)]
29001pub enum ViewCodeByBlockIdRequestType {
29002    #[serde(rename = "view_code")]
29003    ViewCode,
29004}
29005impl ::std::convert::From<&Self> for ViewCodeByBlockIdRequestType {
29006    fn from(value: &ViewCodeByBlockIdRequestType) -> Self {
29007        value.clone()
29008    }
29009}
29010impl ::std::fmt::Display for ViewCodeByBlockIdRequestType {
29011    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
29012        match *self {
29013            Self::ViewCode => f.write_str("view_code"),
29014        }
29015    }
29016}
29017impl ::std::str::FromStr for ViewCodeByBlockIdRequestType {
29018    type Err = self::error::ConversionError;
29019    fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
29020        match value {
29021            "view_code" => Ok(Self::ViewCode),
29022            _ => Err("invalid value".into()),
29023        }
29024    }
29025}
29026impl ::std::convert::TryFrom<&str> for ViewCodeByBlockIdRequestType {
29027    type Error = self::error::ConversionError;
29028    fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
29029        value.parse()
29030    }
29031}
29032impl ::std::convert::TryFrom<&::std::string::String> for ViewCodeByBlockIdRequestType {
29033    type Error = self::error::ConversionError;
29034    fn try_from(
29035        value: &::std::string::String,
29036    ) -> ::std::result::Result<Self, self::error::ConversionError> {
29037        value.parse()
29038    }
29039}
29040impl ::std::convert::TryFrom<::std::string::String> for ViewCodeByBlockIdRequestType {
29041    type Error = self::error::ConversionError;
29042    fn try_from(
29043        value: ::std::string::String,
29044    ) -> ::std::result::Result<Self, self::error::ConversionError> {
29045        value.parse()
29046    }
29047}
29048#[doc = "`ViewCodeByFinalityRequestType`"]
29049#[doc = r""]
29050#[doc = r" <details><summary>JSON schema</summary>"]
29051#[doc = r""]
29052#[doc = r" ```json"]
29053#[doc = "{"]
29054#[doc = "  \"type\": \"string\","]
29055#[doc = "  \"enum\": ["]
29056#[doc = "    \"view_code\""]
29057#[doc = "  ]"]
29058#[doc = "}"]
29059#[doc = r" ```"]
29060#[doc = r" </details>"]
29061#[derive(
29062    :: serde :: Deserialize,
29063    :: serde :: Serialize,
29064    Clone,
29065    Copy,
29066    Debug,
29067    Eq,
29068    Hash,
29069    Ord,
29070    PartialEq,
29071    PartialOrd,
29072)]
29073pub enum ViewCodeByFinalityRequestType {
29074    #[serde(rename = "view_code")]
29075    ViewCode,
29076}
29077impl ::std::convert::From<&Self> for ViewCodeByFinalityRequestType {
29078    fn from(value: &ViewCodeByFinalityRequestType) -> Self {
29079        value.clone()
29080    }
29081}
29082impl ::std::fmt::Display for ViewCodeByFinalityRequestType {
29083    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
29084        match *self {
29085            Self::ViewCode => f.write_str("view_code"),
29086        }
29087    }
29088}
29089impl ::std::str::FromStr for ViewCodeByFinalityRequestType {
29090    type Err = self::error::ConversionError;
29091    fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
29092        match value {
29093            "view_code" => Ok(Self::ViewCode),
29094            _ => Err("invalid value".into()),
29095        }
29096    }
29097}
29098impl ::std::convert::TryFrom<&str> for ViewCodeByFinalityRequestType {
29099    type Error = self::error::ConversionError;
29100    fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
29101        value.parse()
29102    }
29103}
29104impl ::std::convert::TryFrom<&::std::string::String> for ViewCodeByFinalityRequestType {
29105    type Error = self::error::ConversionError;
29106    fn try_from(
29107        value: &::std::string::String,
29108    ) -> ::std::result::Result<Self, self::error::ConversionError> {
29109        value.parse()
29110    }
29111}
29112impl ::std::convert::TryFrom<::std::string::String> for ViewCodeByFinalityRequestType {
29113    type Error = self::error::ConversionError;
29114    fn try_from(
29115        value: ::std::string::String,
29116    ) -> ::std::result::Result<Self, self::error::ConversionError> {
29117        value.parse()
29118    }
29119}
29120#[doc = "`ViewCodeBySyncCheckpointRequestType`"]
29121#[doc = r""]
29122#[doc = r" <details><summary>JSON schema</summary>"]
29123#[doc = r""]
29124#[doc = r" ```json"]
29125#[doc = "{"]
29126#[doc = "  \"type\": \"string\","]
29127#[doc = "  \"enum\": ["]
29128#[doc = "    \"view_code\""]
29129#[doc = "  ]"]
29130#[doc = "}"]
29131#[doc = r" ```"]
29132#[doc = r" </details>"]
29133#[derive(
29134    :: serde :: Deserialize,
29135    :: serde :: Serialize,
29136    Clone,
29137    Copy,
29138    Debug,
29139    Eq,
29140    Hash,
29141    Ord,
29142    PartialEq,
29143    PartialOrd,
29144)]
29145pub enum ViewCodeBySyncCheckpointRequestType {
29146    #[serde(rename = "view_code")]
29147    ViewCode,
29148}
29149impl ::std::convert::From<&Self> for ViewCodeBySyncCheckpointRequestType {
29150    fn from(value: &ViewCodeBySyncCheckpointRequestType) -> Self {
29151        value.clone()
29152    }
29153}
29154impl ::std::fmt::Display for ViewCodeBySyncCheckpointRequestType {
29155    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
29156        match *self {
29157            Self::ViewCode => f.write_str("view_code"),
29158        }
29159    }
29160}
29161impl ::std::str::FromStr for ViewCodeBySyncCheckpointRequestType {
29162    type Err = self::error::ConversionError;
29163    fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
29164        match value {
29165            "view_code" => Ok(Self::ViewCode),
29166            _ => Err("invalid value".into()),
29167        }
29168    }
29169}
29170impl ::std::convert::TryFrom<&str> for ViewCodeBySyncCheckpointRequestType {
29171    type Error = self::error::ConversionError;
29172    fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
29173        value.parse()
29174    }
29175}
29176impl ::std::convert::TryFrom<&::std::string::String> for ViewCodeBySyncCheckpointRequestType {
29177    type Error = self::error::ConversionError;
29178    fn try_from(
29179        value: &::std::string::String,
29180    ) -> ::std::result::Result<Self, self::error::ConversionError> {
29181        value.parse()
29182    }
29183}
29184impl ::std::convert::TryFrom<::std::string::String> for ViewCodeBySyncCheckpointRequestType {
29185    type Error = self::error::ConversionError;
29186    fn try_from(
29187        value: ::std::string::String,
29188    ) -> ::std::result::Result<Self, self::error::ConversionError> {
29189        value.parse()
29190    }
29191}
29192#[doc = "`ViewGlobalContractCodeByAccountIdByBlockIdRequestType`"]
29193#[doc = r""]
29194#[doc = r" <details><summary>JSON schema</summary>"]
29195#[doc = r""]
29196#[doc = r" ```json"]
29197#[doc = "{"]
29198#[doc = "  \"type\": \"string\","]
29199#[doc = "  \"enum\": ["]
29200#[doc = "    \"view_global_contract_code_by_account_id\""]
29201#[doc = "  ]"]
29202#[doc = "}"]
29203#[doc = r" ```"]
29204#[doc = r" </details>"]
29205#[derive(
29206    :: serde :: Deserialize,
29207    :: serde :: Serialize,
29208    Clone,
29209    Copy,
29210    Debug,
29211    Eq,
29212    Hash,
29213    Ord,
29214    PartialEq,
29215    PartialOrd,
29216)]
29217pub enum ViewGlobalContractCodeByAccountIdByBlockIdRequestType {
29218    #[serde(rename = "view_global_contract_code_by_account_id")]
29219    ViewGlobalContractCodeByAccountId,
29220}
29221impl ::std::convert::From<&Self> for ViewGlobalContractCodeByAccountIdByBlockIdRequestType {
29222    fn from(value: &ViewGlobalContractCodeByAccountIdByBlockIdRequestType) -> Self {
29223        value.clone()
29224    }
29225}
29226impl ::std::fmt::Display for ViewGlobalContractCodeByAccountIdByBlockIdRequestType {
29227    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
29228        match *self {
29229            Self::ViewGlobalContractCodeByAccountId => {
29230                f.write_str("view_global_contract_code_by_account_id")
29231            }
29232        }
29233    }
29234}
29235impl ::std::str::FromStr for ViewGlobalContractCodeByAccountIdByBlockIdRequestType {
29236    type Err = self::error::ConversionError;
29237    fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
29238        match value {
29239            "view_global_contract_code_by_account_id" => {
29240                Ok(Self::ViewGlobalContractCodeByAccountId)
29241            }
29242            _ => Err("invalid value".into()),
29243        }
29244    }
29245}
29246impl ::std::convert::TryFrom<&str> for ViewGlobalContractCodeByAccountIdByBlockIdRequestType {
29247    type Error = self::error::ConversionError;
29248    fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
29249        value.parse()
29250    }
29251}
29252impl ::std::convert::TryFrom<&::std::string::String>
29253    for ViewGlobalContractCodeByAccountIdByBlockIdRequestType
29254{
29255    type Error = self::error::ConversionError;
29256    fn try_from(
29257        value: &::std::string::String,
29258    ) -> ::std::result::Result<Self, self::error::ConversionError> {
29259        value.parse()
29260    }
29261}
29262impl ::std::convert::TryFrom<::std::string::String>
29263    for ViewGlobalContractCodeByAccountIdByBlockIdRequestType
29264{
29265    type Error = self::error::ConversionError;
29266    fn try_from(
29267        value: ::std::string::String,
29268    ) -> ::std::result::Result<Self, self::error::ConversionError> {
29269        value.parse()
29270    }
29271}
29272#[doc = "`ViewGlobalContractCodeByAccountIdByFinalityRequestType`"]
29273#[doc = r""]
29274#[doc = r" <details><summary>JSON schema</summary>"]
29275#[doc = r""]
29276#[doc = r" ```json"]
29277#[doc = "{"]
29278#[doc = "  \"type\": \"string\","]
29279#[doc = "  \"enum\": ["]
29280#[doc = "    \"view_global_contract_code_by_account_id\""]
29281#[doc = "  ]"]
29282#[doc = "}"]
29283#[doc = r" ```"]
29284#[doc = r" </details>"]
29285#[derive(
29286    :: serde :: Deserialize,
29287    :: serde :: Serialize,
29288    Clone,
29289    Copy,
29290    Debug,
29291    Eq,
29292    Hash,
29293    Ord,
29294    PartialEq,
29295    PartialOrd,
29296)]
29297pub enum ViewGlobalContractCodeByAccountIdByFinalityRequestType {
29298    #[serde(rename = "view_global_contract_code_by_account_id")]
29299    ViewGlobalContractCodeByAccountId,
29300}
29301impl ::std::convert::From<&Self> for ViewGlobalContractCodeByAccountIdByFinalityRequestType {
29302    fn from(value: &ViewGlobalContractCodeByAccountIdByFinalityRequestType) -> Self {
29303        value.clone()
29304    }
29305}
29306impl ::std::fmt::Display for ViewGlobalContractCodeByAccountIdByFinalityRequestType {
29307    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
29308        match *self {
29309            Self::ViewGlobalContractCodeByAccountId => {
29310                f.write_str("view_global_contract_code_by_account_id")
29311            }
29312        }
29313    }
29314}
29315impl ::std::str::FromStr for ViewGlobalContractCodeByAccountIdByFinalityRequestType {
29316    type Err = self::error::ConversionError;
29317    fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
29318        match value {
29319            "view_global_contract_code_by_account_id" => {
29320                Ok(Self::ViewGlobalContractCodeByAccountId)
29321            }
29322            _ => Err("invalid value".into()),
29323        }
29324    }
29325}
29326impl ::std::convert::TryFrom<&str> for ViewGlobalContractCodeByAccountIdByFinalityRequestType {
29327    type Error = self::error::ConversionError;
29328    fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
29329        value.parse()
29330    }
29331}
29332impl ::std::convert::TryFrom<&::std::string::String>
29333    for ViewGlobalContractCodeByAccountIdByFinalityRequestType
29334{
29335    type Error = self::error::ConversionError;
29336    fn try_from(
29337        value: &::std::string::String,
29338    ) -> ::std::result::Result<Self, self::error::ConversionError> {
29339        value.parse()
29340    }
29341}
29342impl ::std::convert::TryFrom<::std::string::String>
29343    for ViewGlobalContractCodeByAccountIdByFinalityRequestType
29344{
29345    type Error = self::error::ConversionError;
29346    fn try_from(
29347        value: ::std::string::String,
29348    ) -> ::std::result::Result<Self, self::error::ConversionError> {
29349        value.parse()
29350    }
29351}
29352#[doc = "`ViewGlobalContractCodeByAccountIdBySyncCheckpointRequestType`"]
29353#[doc = r""]
29354#[doc = r" <details><summary>JSON schema</summary>"]
29355#[doc = r""]
29356#[doc = r" ```json"]
29357#[doc = "{"]
29358#[doc = "  \"type\": \"string\","]
29359#[doc = "  \"enum\": ["]
29360#[doc = "    \"view_global_contract_code_by_account_id\""]
29361#[doc = "  ]"]
29362#[doc = "}"]
29363#[doc = r" ```"]
29364#[doc = r" </details>"]
29365#[derive(
29366    :: serde :: Deserialize,
29367    :: serde :: Serialize,
29368    Clone,
29369    Copy,
29370    Debug,
29371    Eq,
29372    Hash,
29373    Ord,
29374    PartialEq,
29375    PartialOrd,
29376)]
29377pub enum ViewGlobalContractCodeByAccountIdBySyncCheckpointRequestType {
29378    #[serde(rename = "view_global_contract_code_by_account_id")]
29379    ViewGlobalContractCodeByAccountId,
29380}
29381impl ::std::convert::From<&Self> for ViewGlobalContractCodeByAccountIdBySyncCheckpointRequestType {
29382    fn from(value: &ViewGlobalContractCodeByAccountIdBySyncCheckpointRequestType) -> Self {
29383        value.clone()
29384    }
29385}
29386impl ::std::fmt::Display for ViewGlobalContractCodeByAccountIdBySyncCheckpointRequestType {
29387    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
29388        match *self {
29389            Self::ViewGlobalContractCodeByAccountId => {
29390                f.write_str("view_global_contract_code_by_account_id")
29391            }
29392        }
29393    }
29394}
29395impl ::std::str::FromStr for ViewGlobalContractCodeByAccountIdBySyncCheckpointRequestType {
29396    type Err = self::error::ConversionError;
29397    fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
29398        match value {
29399            "view_global_contract_code_by_account_id" => {
29400                Ok(Self::ViewGlobalContractCodeByAccountId)
29401            }
29402            _ => Err("invalid value".into()),
29403        }
29404    }
29405}
29406impl ::std::convert::TryFrom<&str>
29407    for ViewGlobalContractCodeByAccountIdBySyncCheckpointRequestType
29408{
29409    type Error = self::error::ConversionError;
29410    fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
29411        value.parse()
29412    }
29413}
29414impl ::std::convert::TryFrom<&::std::string::String>
29415    for ViewGlobalContractCodeByAccountIdBySyncCheckpointRequestType
29416{
29417    type Error = self::error::ConversionError;
29418    fn try_from(
29419        value: &::std::string::String,
29420    ) -> ::std::result::Result<Self, self::error::ConversionError> {
29421        value.parse()
29422    }
29423}
29424impl ::std::convert::TryFrom<::std::string::String>
29425    for ViewGlobalContractCodeByAccountIdBySyncCheckpointRequestType
29426{
29427    type Error = self::error::ConversionError;
29428    fn try_from(
29429        value: ::std::string::String,
29430    ) -> ::std::result::Result<Self, self::error::ConversionError> {
29431        value.parse()
29432    }
29433}
29434#[doc = "`ViewGlobalContractCodeByBlockIdRequestType`"]
29435#[doc = r""]
29436#[doc = r" <details><summary>JSON schema</summary>"]
29437#[doc = r""]
29438#[doc = r" ```json"]
29439#[doc = "{"]
29440#[doc = "  \"type\": \"string\","]
29441#[doc = "  \"enum\": ["]
29442#[doc = "    \"view_global_contract_code\""]
29443#[doc = "  ]"]
29444#[doc = "}"]
29445#[doc = r" ```"]
29446#[doc = r" </details>"]
29447#[derive(
29448    :: serde :: Deserialize,
29449    :: serde :: Serialize,
29450    Clone,
29451    Copy,
29452    Debug,
29453    Eq,
29454    Hash,
29455    Ord,
29456    PartialEq,
29457    PartialOrd,
29458)]
29459pub enum ViewGlobalContractCodeByBlockIdRequestType {
29460    #[serde(rename = "view_global_contract_code")]
29461    ViewGlobalContractCode,
29462}
29463impl ::std::convert::From<&Self> for ViewGlobalContractCodeByBlockIdRequestType {
29464    fn from(value: &ViewGlobalContractCodeByBlockIdRequestType) -> Self {
29465        value.clone()
29466    }
29467}
29468impl ::std::fmt::Display for ViewGlobalContractCodeByBlockIdRequestType {
29469    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
29470        match *self {
29471            Self::ViewGlobalContractCode => f.write_str("view_global_contract_code"),
29472        }
29473    }
29474}
29475impl ::std::str::FromStr for ViewGlobalContractCodeByBlockIdRequestType {
29476    type Err = self::error::ConversionError;
29477    fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
29478        match value {
29479            "view_global_contract_code" => Ok(Self::ViewGlobalContractCode),
29480            _ => Err("invalid value".into()),
29481        }
29482    }
29483}
29484impl ::std::convert::TryFrom<&str> for ViewGlobalContractCodeByBlockIdRequestType {
29485    type Error = self::error::ConversionError;
29486    fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
29487        value.parse()
29488    }
29489}
29490impl ::std::convert::TryFrom<&::std::string::String>
29491    for ViewGlobalContractCodeByBlockIdRequestType
29492{
29493    type Error = self::error::ConversionError;
29494    fn try_from(
29495        value: &::std::string::String,
29496    ) -> ::std::result::Result<Self, self::error::ConversionError> {
29497        value.parse()
29498    }
29499}
29500impl ::std::convert::TryFrom<::std::string::String> for ViewGlobalContractCodeByBlockIdRequestType {
29501    type Error = self::error::ConversionError;
29502    fn try_from(
29503        value: ::std::string::String,
29504    ) -> ::std::result::Result<Self, self::error::ConversionError> {
29505        value.parse()
29506    }
29507}
29508#[doc = "`ViewGlobalContractCodeByFinalityRequestType`"]
29509#[doc = r""]
29510#[doc = r" <details><summary>JSON schema</summary>"]
29511#[doc = r""]
29512#[doc = r" ```json"]
29513#[doc = "{"]
29514#[doc = "  \"type\": \"string\","]
29515#[doc = "  \"enum\": ["]
29516#[doc = "    \"view_global_contract_code\""]
29517#[doc = "  ]"]
29518#[doc = "}"]
29519#[doc = r" ```"]
29520#[doc = r" </details>"]
29521#[derive(
29522    :: serde :: Deserialize,
29523    :: serde :: Serialize,
29524    Clone,
29525    Copy,
29526    Debug,
29527    Eq,
29528    Hash,
29529    Ord,
29530    PartialEq,
29531    PartialOrd,
29532)]
29533pub enum ViewGlobalContractCodeByFinalityRequestType {
29534    #[serde(rename = "view_global_contract_code")]
29535    ViewGlobalContractCode,
29536}
29537impl ::std::convert::From<&Self> for ViewGlobalContractCodeByFinalityRequestType {
29538    fn from(value: &ViewGlobalContractCodeByFinalityRequestType) -> Self {
29539        value.clone()
29540    }
29541}
29542impl ::std::fmt::Display for ViewGlobalContractCodeByFinalityRequestType {
29543    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
29544        match *self {
29545            Self::ViewGlobalContractCode => f.write_str("view_global_contract_code"),
29546        }
29547    }
29548}
29549impl ::std::str::FromStr for ViewGlobalContractCodeByFinalityRequestType {
29550    type Err = self::error::ConversionError;
29551    fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
29552        match value {
29553            "view_global_contract_code" => Ok(Self::ViewGlobalContractCode),
29554            _ => Err("invalid value".into()),
29555        }
29556    }
29557}
29558impl ::std::convert::TryFrom<&str> for ViewGlobalContractCodeByFinalityRequestType {
29559    type Error = self::error::ConversionError;
29560    fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
29561        value.parse()
29562    }
29563}
29564impl ::std::convert::TryFrom<&::std::string::String>
29565    for ViewGlobalContractCodeByFinalityRequestType
29566{
29567    type Error = self::error::ConversionError;
29568    fn try_from(
29569        value: &::std::string::String,
29570    ) -> ::std::result::Result<Self, self::error::ConversionError> {
29571        value.parse()
29572    }
29573}
29574impl ::std::convert::TryFrom<::std::string::String>
29575    for ViewGlobalContractCodeByFinalityRequestType
29576{
29577    type Error = self::error::ConversionError;
29578    fn try_from(
29579        value: ::std::string::String,
29580    ) -> ::std::result::Result<Self, self::error::ConversionError> {
29581        value.parse()
29582    }
29583}
29584#[doc = "`ViewGlobalContractCodeBySyncCheckpointRequestType`"]
29585#[doc = r""]
29586#[doc = r" <details><summary>JSON schema</summary>"]
29587#[doc = r""]
29588#[doc = r" ```json"]
29589#[doc = "{"]
29590#[doc = "  \"type\": \"string\","]
29591#[doc = "  \"enum\": ["]
29592#[doc = "    \"view_global_contract_code\""]
29593#[doc = "  ]"]
29594#[doc = "}"]
29595#[doc = r" ```"]
29596#[doc = r" </details>"]
29597#[derive(
29598    :: serde :: Deserialize,
29599    :: serde :: Serialize,
29600    Clone,
29601    Copy,
29602    Debug,
29603    Eq,
29604    Hash,
29605    Ord,
29606    PartialEq,
29607    PartialOrd,
29608)]
29609pub enum ViewGlobalContractCodeBySyncCheckpointRequestType {
29610    #[serde(rename = "view_global_contract_code")]
29611    ViewGlobalContractCode,
29612}
29613impl ::std::convert::From<&Self> for ViewGlobalContractCodeBySyncCheckpointRequestType {
29614    fn from(value: &ViewGlobalContractCodeBySyncCheckpointRequestType) -> Self {
29615        value.clone()
29616    }
29617}
29618impl ::std::fmt::Display for ViewGlobalContractCodeBySyncCheckpointRequestType {
29619    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
29620        match *self {
29621            Self::ViewGlobalContractCode => f.write_str("view_global_contract_code"),
29622        }
29623    }
29624}
29625impl ::std::str::FromStr for ViewGlobalContractCodeBySyncCheckpointRequestType {
29626    type Err = self::error::ConversionError;
29627    fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
29628        match value {
29629            "view_global_contract_code" => Ok(Self::ViewGlobalContractCode),
29630            _ => Err("invalid value".into()),
29631        }
29632    }
29633}
29634impl ::std::convert::TryFrom<&str> for ViewGlobalContractCodeBySyncCheckpointRequestType {
29635    type Error = self::error::ConversionError;
29636    fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
29637        value.parse()
29638    }
29639}
29640impl ::std::convert::TryFrom<&::std::string::String>
29641    for ViewGlobalContractCodeBySyncCheckpointRequestType
29642{
29643    type Error = self::error::ConversionError;
29644    fn try_from(
29645        value: &::std::string::String,
29646    ) -> ::std::result::Result<Self, self::error::ConversionError> {
29647        value.parse()
29648    }
29649}
29650impl ::std::convert::TryFrom<::std::string::String>
29651    for ViewGlobalContractCodeBySyncCheckpointRequestType
29652{
29653    type Error = self::error::ConversionError;
29654    fn try_from(
29655        value: ::std::string::String,
29656    ) -> ::std::result::Result<Self, self::error::ConversionError> {
29657        value.parse()
29658    }
29659}
29660#[doc = "`ViewStateByBlockIdRequestType`"]
29661#[doc = r""]
29662#[doc = r" <details><summary>JSON schema</summary>"]
29663#[doc = r""]
29664#[doc = r" ```json"]
29665#[doc = "{"]
29666#[doc = "  \"type\": \"string\","]
29667#[doc = "  \"enum\": ["]
29668#[doc = "    \"view_state\""]
29669#[doc = "  ]"]
29670#[doc = "}"]
29671#[doc = r" ```"]
29672#[doc = r" </details>"]
29673#[derive(
29674    :: serde :: Deserialize,
29675    :: serde :: Serialize,
29676    Clone,
29677    Copy,
29678    Debug,
29679    Eq,
29680    Hash,
29681    Ord,
29682    PartialEq,
29683    PartialOrd,
29684)]
29685pub enum ViewStateByBlockIdRequestType {
29686    #[serde(rename = "view_state")]
29687    ViewState,
29688}
29689impl ::std::convert::From<&Self> for ViewStateByBlockIdRequestType {
29690    fn from(value: &ViewStateByBlockIdRequestType) -> Self {
29691        value.clone()
29692    }
29693}
29694impl ::std::fmt::Display for ViewStateByBlockIdRequestType {
29695    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
29696        match *self {
29697            Self::ViewState => f.write_str("view_state"),
29698        }
29699    }
29700}
29701impl ::std::str::FromStr for ViewStateByBlockIdRequestType {
29702    type Err = self::error::ConversionError;
29703    fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
29704        match value {
29705            "view_state" => Ok(Self::ViewState),
29706            _ => Err("invalid value".into()),
29707        }
29708    }
29709}
29710impl ::std::convert::TryFrom<&str> for ViewStateByBlockIdRequestType {
29711    type Error = self::error::ConversionError;
29712    fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
29713        value.parse()
29714    }
29715}
29716impl ::std::convert::TryFrom<&::std::string::String> for ViewStateByBlockIdRequestType {
29717    type Error = self::error::ConversionError;
29718    fn try_from(
29719        value: &::std::string::String,
29720    ) -> ::std::result::Result<Self, self::error::ConversionError> {
29721        value.parse()
29722    }
29723}
29724impl ::std::convert::TryFrom<::std::string::String> for ViewStateByBlockIdRequestType {
29725    type Error = self::error::ConversionError;
29726    fn try_from(
29727        value: ::std::string::String,
29728    ) -> ::std::result::Result<Self, self::error::ConversionError> {
29729        value.parse()
29730    }
29731}
29732#[doc = "`ViewStateByFinalityRequestType`"]
29733#[doc = r""]
29734#[doc = r" <details><summary>JSON schema</summary>"]
29735#[doc = r""]
29736#[doc = r" ```json"]
29737#[doc = "{"]
29738#[doc = "  \"type\": \"string\","]
29739#[doc = "  \"enum\": ["]
29740#[doc = "    \"view_state\""]
29741#[doc = "  ]"]
29742#[doc = "}"]
29743#[doc = r" ```"]
29744#[doc = r" </details>"]
29745#[derive(
29746    :: serde :: Deserialize,
29747    :: serde :: Serialize,
29748    Clone,
29749    Copy,
29750    Debug,
29751    Eq,
29752    Hash,
29753    Ord,
29754    PartialEq,
29755    PartialOrd,
29756)]
29757pub enum ViewStateByFinalityRequestType {
29758    #[serde(rename = "view_state")]
29759    ViewState,
29760}
29761impl ::std::convert::From<&Self> for ViewStateByFinalityRequestType {
29762    fn from(value: &ViewStateByFinalityRequestType) -> Self {
29763        value.clone()
29764    }
29765}
29766impl ::std::fmt::Display for ViewStateByFinalityRequestType {
29767    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
29768        match *self {
29769            Self::ViewState => f.write_str("view_state"),
29770        }
29771    }
29772}
29773impl ::std::str::FromStr for ViewStateByFinalityRequestType {
29774    type Err = self::error::ConversionError;
29775    fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
29776        match value {
29777            "view_state" => Ok(Self::ViewState),
29778            _ => Err("invalid value".into()),
29779        }
29780    }
29781}
29782impl ::std::convert::TryFrom<&str> for ViewStateByFinalityRequestType {
29783    type Error = self::error::ConversionError;
29784    fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
29785        value.parse()
29786    }
29787}
29788impl ::std::convert::TryFrom<&::std::string::String> for ViewStateByFinalityRequestType {
29789    type Error = self::error::ConversionError;
29790    fn try_from(
29791        value: &::std::string::String,
29792    ) -> ::std::result::Result<Self, self::error::ConversionError> {
29793        value.parse()
29794    }
29795}
29796impl ::std::convert::TryFrom<::std::string::String> for ViewStateByFinalityRequestType {
29797    type Error = self::error::ConversionError;
29798    fn try_from(
29799        value: ::std::string::String,
29800    ) -> ::std::result::Result<Self, self::error::ConversionError> {
29801        value.parse()
29802    }
29803}
29804#[doc = "`ViewStateBySyncCheckpointRequestType`"]
29805#[doc = r""]
29806#[doc = r" <details><summary>JSON schema</summary>"]
29807#[doc = r""]
29808#[doc = r" ```json"]
29809#[doc = "{"]
29810#[doc = "  \"type\": \"string\","]
29811#[doc = "  \"enum\": ["]
29812#[doc = "    \"view_state\""]
29813#[doc = "  ]"]
29814#[doc = "}"]
29815#[doc = r" ```"]
29816#[doc = r" </details>"]
29817#[derive(
29818    :: serde :: Deserialize,
29819    :: serde :: Serialize,
29820    Clone,
29821    Copy,
29822    Debug,
29823    Eq,
29824    Hash,
29825    Ord,
29826    PartialEq,
29827    PartialOrd,
29828)]
29829pub enum ViewStateBySyncCheckpointRequestType {
29830    #[serde(rename = "view_state")]
29831    ViewState,
29832}
29833impl ::std::convert::From<&Self> for ViewStateBySyncCheckpointRequestType {
29834    fn from(value: &ViewStateBySyncCheckpointRequestType) -> Self {
29835        value.clone()
29836    }
29837}
29838impl ::std::fmt::Display for ViewStateBySyncCheckpointRequestType {
29839    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
29840        match *self {
29841            Self::ViewState => f.write_str("view_state"),
29842        }
29843    }
29844}
29845impl ::std::str::FromStr for ViewStateBySyncCheckpointRequestType {
29846    type Err = self::error::ConversionError;
29847    fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
29848        match value {
29849            "view_state" => Ok(Self::ViewState),
29850            _ => Err("invalid value".into()),
29851        }
29852    }
29853}
29854impl ::std::convert::TryFrom<&str> for ViewStateBySyncCheckpointRequestType {
29855    type Error = self::error::ConversionError;
29856    fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
29857        value.parse()
29858    }
29859}
29860impl ::std::convert::TryFrom<&::std::string::String> for ViewStateBySyncCheckpointRequestType {
29861    type Error = self::error::ConversionError;
29862    fn try_from(
29863        value: &::std::string::String,
29864    ) -> ::std::result::Result<Self, self::error::ConversionError> {
29865        value.parse()
29866    }
29867}
29868impl ::std::convert::TryFrom<::std::string::String> for ViewStateBySyncCheckpointRequestType {
29869    type Error = self::error::ConversionError;
29870    fn try_from(
29871        value: ::std::string::String,
29872    ) -> ::std::result::Result<Self, self::error::ConversionError> {
29873        value.parse()
29874    }
29875}
29876#[doc = "Resulting state values for a view state query request"]
29877#[doc = r""]
29878#[doc = r" <details><summary>JSON schema</summary>"]
29879#[doc = r""]
29880#[doc = r" ```json"]
29881#[doc = "{"]
29882#[doc = "  \"description\": \"Resulting state values for a view state query request\","]
29883#[doc = "  \"type\": \"object\","]
29884#[doc = "  \"required\": ["]
29885#[doc = "    \"values\""]
29886#[doc = "  ],"]
29887#[doc = "  \"properties\": {"]
29888#[doc = "    \"proof\": {"]
29889#[doc = "      \"type\": \"array\","]
29890#[doc = "      \"items\": {"]
29891#[doc = "        \"type\": \"string\""]
29892#[doc = "      }"]
29893#[doc = "    },"]
29894#[doc = "    \"values\": {"]
29895#[doc = "      \"type\": \"array\","]
29896#[doc = "      \"items\": {"]
29897#[doc = "        \"$ref\": \"#/components/schemas/StateItem\""]
29898#[doc = "      }"]
29899#[doc = "    }"]
29900#[doc = "  }"]
29901#[doc = "}"]
29902#[doc = r" ```"]
29903#[doc = r" </details>"]
29904#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
29905pub struct ViewStateResult {
29906    #[serde(default, skip_serializing_if = "::std::vec::Vec::is_empty")]
29907    pub proof: ::std::vec::Vec<::std::string::String>,
29908    pub values: ::std::vec::Vec<StateItem>,
29909}
29910impl ::std::convert::From<&ViewStateResult> for ViewStateResult {
29911    fn from(value: &ViewStateResult) -> Self {
29912        value.clone()
29913    }
29914}
29915#[doc = "`VmConfigView`"]
29916#[doc = r""]
29917#[doc = r" <details><summary>JSON schema</summary>"]
29918#[doc = r""]
29919#[doc = r" ```json"]
29920#[doc = "{"]
29921#[doc = "  \"type\": \"object\","]
29922#[doc = "  \"required\": ["]
29923#[doc = "    \"deterministic_account_ids\","]
29924#[doc = "    \"discard_custom_sections\","]
29925#[doc = "    \"eth_implicit_accounts\","]
29926#[doc = "    \"ext_costs\","]
29927#[doc = "    \"fix_contract_loading_cost\","]
29928#[doc = "    \"global_contract_host_fns\","]
29929#[doc = "    \"grow_mem_cost\","]
29930#[doc = "    \"implicit_account_creation\","]
29931#[doc = "    \"limit_config\","]
29932#[doc = "    \"reftypes_bulk_memory\","]
29933#[doc = "    \"regular_op_cost\","]
29934#[doc = "    \"saturating_float_to_int\","]
29935#[doc = "    \"storage_get_mode\","]
29936#[doc = "    \"vm_kind\""]
29937#[doc = "  ],"]
29938#[doc = "  \"properties\": {"]
29939#[doc = "    \"deterministic_account_ids\": {"]
29940#[doc = "      \"description\": \"See [VMConfig::deterministic_account_ids](crate::vm::Config::deterministic_account_ids).\","]
29941#[doc = "      \"type\": \"boolean\""]
29942#[doc = "    },"]
29943#[doc = "    \"discard_custom_sections\": {"]
29944#[doc = "      \"description\": \"See [VMConfig::discard_custom_sections](crate::vm::Config::discard_custom_sections).\","]
29945#[doc = "      \"type\": \"boolean\""]
29946#[doc = "    },"]
29947#[doc = "    \"eth_implicit_accounts\": {"]
29948#[doc = "      \"description\": \"See [VMConfig::eth_implicit_accounts](crate::vm::Config::eth_implicit_accounts).\","]
29949#[doc = "      \"type\": \"boolean\""]
29950#[doc = "    },"]
29951#[doc = "    \"ext_costs\": {"]
29952#[doc = "      \"description\": \"Costs for runtime externals\","]
29953#[doc = "      \"allOf\": ["]
29954#[doc = "        {"]
29955#[doc = "          \"$ref\": \"#/components/schemas/ExtCostsConfigView\""]
29956#[doc = "        }"]
29957#[doc = "      ]"]
29958#[doc = "    },"]
29959#[doc = "    \"fix_contract_loading_cost\": {"]
29960#[doc = "      \"description\": \"See [VMConfig::fix_contract_loading_cost](crate::vm::Config::fix_contract_loading_cost).\","]
29961#[doc = "      \"type\": \"boolean\""]
29962#[doc = "    },"]
29963#[doc = "    \"global_contract_host_fns\": {"]
29964#[doc = "      \"description\": \"See [VMConfig::global_contract_host_fns](crate::vm::Config::global_contract_host_fns).\","]
29965#[doc = "      \"type\": \"boolean\""]
29966#[doc = "    },"]
29967#[doc = "    \"grow_mem_cost\": {"]
29968#[doc = "      \"description\": \"Gas cost of a growing memory by single page.\","]
29969#[doc = "      \"type\": \"integer\","]
29970#[doc = "      \"format\": \"uint32\","]
29971#[doc = "      \"minimum\": 0.0"]
29972#[doc = "    },"]
29973#[doc = "    \"implicit_account_creation\": {"]
29974#[doc = "      \"description\": \"See [VMConfig::implicit_account_creation](crate::vm::Config::implicit_account_creation).\","]
29975#[doc = "      \"type\": \"boolean\""]
29976#[doc = "    },"]
29977#[doc = "    \"limit_config\": {"]
29978#[doc = "      \"description\": \"Describes limits for VM and Runtime.\\n\\nTODO: Consider changing this to `VMLimitConfigView` to avoid dependency\\non runtime.\","]
29979#[doc = "      \"allOf\": ["]
29980#[doc = "        {"]
29981#[doc = "          \"$ref\": \"#/components/schemas/LimitConfig\""]
29982#[doc = "        }"]
29983#[doc = "      ]"]
29984#[doc = "    },"]
29985#[doc = "    \"reftypes_bulk_memory\": {"]
29986#[doc = "      \"description\": \"See [VMConfig::reftypes_bulk_memory](crate::vm::Config::reftypes_bulk_memory).\","]
29987#[doc = "      \"type\": \"boolean\""]
29988#[doc = "    },"]
29989#[doc = "    \"regular_op_cost\": {"]
29990#[doc = "      \"description\": \"Gas cost of a regular operation.\","]
29991#[doc = "      \"type\": \"integer\","]
29992#[doc = "      \"format\": \"uint32\","]
29993#[doc = "      \"minimum\": 0.0"]
29994#[doc = "    },"]
29995#[doc = "    \"saturating_float_to_int\": {"]
29996#[doc = "      \"description\": \"See [VMConfig::saturating_float_to_int](crate::vm::Config::saturating_float_to_int).\","]
29997#[doc = "      \"type\": \"boolean\""]
29998#[doc = "    },"]
29999#[doc = "    \"storage_get_mode\": {"]
30000#[doc = "      \"description\": \"See [VMConfig::storage_get_mode](crate::vm::Config::storage_get_mode).\","]
30001#[doc = "      \"allOf\": ["]
30002#[doc = "        {"]
30003#[doc = "          \"$ref\": \"#/components/schemas/StorageGetMode\""]
30004#[doc = "        }"]
30005#[doc = "      ]"]
30006#[doc = "    },"]
30007#[doc = "    \"vm_kind\": {"]
30008#[doc = "      \"description\": \"See [VMConfig::vm_kind](crate::vm::Config::vm_kind).\","]
30009#[doc = "      \"allOf\": ["]
30010#[doc = "        {"]
30011#[doc = "          \"$ref\": \"#/components/schemas/VMKind\""]
30012#[doc = "        }"]
30013#[doc = "      ]"]
30014#[doc = "    }"]
30015#[doc = "  }"]
30016#[doc = "}"]
30017#[doc = r" ```"]
30018#[doc = r" </details>"]
30019#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
30020pub struct VmConfigView {
30021    #[doc = "See [VMConfig::deterministic_account_ids](crate::vm::Config::deterministic_account_ids)."]
30022    pub deterministic_account_ids: bool,
30023    #[doc = "See [VMConfig::discard_custom_sections](crate::vm::Config::discard_custom_sections)."]
30024    pub discard_custom_sections: bool,
30025    #[doc = "See [VMConfig::eth_implicit_accounts](crate::vm::Config::eth_implicit_accounts)."]
30026    pub eth_implicit_accounts: bool,
30027    #[doc = "Costs for runtime externals"]
30028    pub ext_costs: ExtCostsConfigView,
30029    #[doc = "See [VMConfig::fix_contract_loading_cost](crate::vm::Config::fix_contract_loading_cost)."]
30030    pub fix_contract_loading_cost: bool,
30031    #[doc = "See [VMConfig::global_contract_host_fns](crate::vm::Config::global_contract_host_fns)."]
30032    pub global_contract_host_fns: bool,
30033    #[doc = "Gas cost of a growing memory by single page."]
30034    pub grow_mem_cost: u32,
30035    #[doc = "See [VMConfig::implicit_account_creation](crate::vm::Config::implicit_account_creation)."]
30036    pub implicit_account_creation: bool,
30037    #[doc = "Describes limits for VM and Runtime.\n\nTODO: Consider changing this to `VMLimitConfigView` to avoid dependency\non runtime."]
30038    pub limit_config: LimitConfig,
30039    #[doc = "See [VMConfig::reftypes_bulk_memory](crate::vm::Config::reftypes_bulk_memory)."]
30040    pub reftypes_bulk_memory: bool,
30041    #[doc = "Gas cost of a regular operation."]
30042    pub regular_op_cost: u32,
30043    #[doc = "See [VMConfig::saturating_float_to_int](crate::vm::Config::saturating_float_to_int)."]
30044    pub saturating_float_to_int: bool,
30045    #[doc = "See [VMConfig::storage_get_mode](crate::vm::Config::storage_get_mode)."]
30046    pub storage_get_mode: StorageGetMode,
30047    #[doc = "See [VMConfig::vm_kind](crate::vm::Config::vm_kind)."]
30048    pub vm_kind: VmKind,
30049}
30050impl ::std::convert::From<&VmConfigView> for VmConfigView {
30051    fn from(value: &VmConfigView) -> Self {
30052        value.clone()
30053    }
30054}
30055#[doc = "`VmKind`"]
30056#[doc = r""]
30057#[doc = r" <details><summary>JSON schema</summary>"]
30058#[doc = r""]
30059#[doc = r" ```json"]
30060#[doc = "{"]
30061#[doc = "  \"oneOf\": ["]
30062#[doc = "    {"]
30063#[doc = "      \"description\": \"Wasmer 0.17.x VM. Gone now.\","]
30064#[doc = "      \"type\": \"string\","]
30065#[doc = "      \"enum\": ["]
30066#[doc = "        \"Wasmer0\""]
30067#[doc = "      ]"]
30068#[doc = "    },"]
30069#[doc = "    {"]
30070#[doc = "      \"description\": \"Wasmtime VM.\","]
30071#[doc = "      \"type\": \"string\","]
30072#[doc = "      \"enum\": ["]
30073#[doc = "        \"Wasmtime\""]
30074#[doc = "      ]"]
30075#[doc = "    },"]
30076#[doc = "    {"]
30077#[doc = "      \"description\": \"Wasmer 2.x VM.\","]
30078#[doc = "      \"type\": \"string\","]
30079#[doc = "      \"enum\": ["]
30080#[doc = "        \"Wasmer2\""]
30081#[doc = "      ]"]
30082#[doc = "    },"]
30083#[doc = "    {"]
30084#[doc = "      \"description\": \"NearVM.\","]
30085#[doc = "      \"type\": \"string\","]
30086#[doc = "      \"enum\": ["]
30087#[doc = "        \"NearVm\""]
30088#[doc = "      ]"]
30089#[doc = "    }"]
30090#[doc = "  ]"]
30091#[doc = "}"]
30092#[doc = r" ```"]
30093#[doc = r" </details>"]
30094#[derive(
30095    :: serde :: Deserialize,
30096    :: serde :: Serialize,
30097    Clone,
30098    Copy,
30099    Debug,
30100    Eq,
30101    Hash,
30102    Ord,
30103    PartialEq,
30104    PartialOrd,
30105)]
30106pub enum VmKind {
30107    #[doc = "Wasmer 0.17.x VM. Gone now."]
30108    Wasmer0,
30109    #[doc = "Wasmtime VM."]
30110    Wasmtime,
30111    #[doc = "Wasmer 2.x VM."]
30112    Wasmer2,
30113    #[doc = "NearVM."]
30114    NearVm,
30115}
30116impl ::std::convert::From<&Self> for VmKind {
30117    fn from(value: &VmKind) -> Self {
30118        value.clone()
30119    }
30120}
30121impl ::std::fmt::Display for VmKind {
30122    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
30123        match *self {
30124            Self::Wasmer0 => f.write_str("Wasmer0"),
30125            Self::Wasmtime => f.write_str("Wasmtime"),
30126            Self::Wasmer2 => f.write_str("Wasmer2"),
30127            Self::NearVm => f.write_str("NearVm"),
30128        }
30129    }
30130}
30131impl ::std::str::FromStr for VmKind {
30132    type Err = self::error::ConversionError;
30133    fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
30134        match value {
30135            "Wasmer0" => Ok(Self::Wasmer0),
30136            "Wasmtime" => Ok(Self::Wasmtime),
30137            "Wasmer2" => Ok(Self::Wasmer2),
30138            "NearVm" => Ok(Self::NearVm),
30139            _ => Err("invalid value".into()),
30140        }
30141    }
30142}
30143impl ::std::convert::TryFrom<&str> for VmKind {
30144    type Error = self::error::ConversionError;
30145    fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
30146        value.parse()
30147    }
30148}
30149impl ::std::convert::TryFrom<&::std::string::String> for VmKind {
30150    type Error = self::error::ConversionError;
30151    fn try_from(
30152        value: &::std::string::String,
30153    ) -> ::std::result::Result<Self, self::error::ConversionError> {
30154        value.parse()
30155    }
30156}
30157impl ::std::convert::TryFrom<::std::string::String> for VmKind {
30158    type Error = self::error::ConversionError;
30159    fn try_from(
30160        value: ::std::string::String,
30161    ) -> ::std::result::Result<Self, self::error::ConversionError> {
30162        value.parse()
30163    }
30164}
30165#[doc = "A kind of a trap happened during execution of a binary"]
30166#[doc = r""]
30167#[doc = r" <details><summary>JSON schema</summary>"]
30168#[doc = r""]
30169#[doc = r" ```json"]
30170#[doc = "{"]
30171#[doc = "  \"description\": \"A kind of a trap happened during execution of a binary\","]
30172#[doc = "  \"oneOf\": ["]
30173#[doc = "    {"]
30174#[doc = "      \"description\": \"An `unreachable` opcode was executed.\","]
30175#[doc = "      \"type\": \"string\","]
30176#[doc = "      \"enum\": ["]
30177#[doc = "        \"Unreachable\""]
30178#[doc = "      ]"]
30179#[doc = "    },"]
30180#[doc = "    {"]
30181#[doc = "      \"description\": \"Call indirect incorrect signature trap.\","]
30182#[doc = "      \"type\": \"string\","]
30183#[doc = "      \"enum\": ["]
30184#[doc = "        \"IncorrectCallIndirectSignature\""]
30185#[doc = "      ]"]
30186#[doc = "    },"]
30187#[doc = "    {"]
30188#[doc = "      \"description\": \"Memory out of bounds trap.\","]
30189#[doc = "      \"type\": \"string\","]
30190#[doc = "      \"enum\": ["]
30191#[doc = "        \"MemoryOutOfBounds\""]
30192#[doc = "      ]"]
30193#[doc = "    },"]
30194#[doc = "    {"]
30195#[doc = "      \"description\": \"Call indirect out of bounds trap.\","]
30196#[doc = "      \"type\": \"string\","]
30197#[doc = "      \"enum\": ["]
30198#[doc = "        \"CallIndirectOOB\""]
30199#[doc = "      ]"]
30200#[doc = "    },"]
30201#[doc = "    {"]
30202#[doc = "      \"description\": \"An arithmetic exception, e.g. divided by zero.\","]
30203#[doc = "      \"type\": \"string\","]
30204#[doc = "      \"enum\": ["]
30205#[doc = "        \"IllegalArithmetic\""]
30206#[doc = "      ]"]
30207#[doc = "    },"]
30208#[doc = "    {"]
30209#[doc = "      \"description\": \"Misaligned atomic access trap.\","]
30210#[doc = "      \"type\": \"string\","]
30211#[doc = "      \"enum\": ["]
30212#[doc = "        \"MisalignedAtomicAccess\""]
30213#[doc = "      ]"]
30214#[doc = "    },"]
30215#[doc = "    {"]
30216#[doc = "      \"description\": \"Indirect call to null.\","]
30217#[doc = "      \"type\": \"string\","]
30218#[doc = "      \"enum\": ["]
30219#[doc = "        \"IndirectCallToNull\""]
30220#[doc = "      ]"]
30221#[doc = "    },"]
30222#[doc = "    {"]
30223#[doc = "      \"description\": \"Stack overflow.\","]
30224#[doc = "      \"type\": \"string\","]
30225#[doc = "      \"enum\": ["]
30226#[doc = "        \"StackOverflow\""]
30227#[doc = "      ]"]
30228#[doc = "    },"]
30229#[doc = "    {"]
30230#[doc = "      \"description\": \"Generic trap.\","]
30231#[doc = "      \"type\": \"string\","]
30232#[doc = "      \"enum\": ["]
30233#[doc = "        \"GenericTrap\""]
30234#[doc = "      ]"]
30235#[doc = "    }"]
30236#[doc = "  ]"]
30237#[doc = "}"]
30238#[doc = r" ```"]
30239#[doc = r" </details>"]
30240#[derive(
30241    :: serde :: Deserialize,
30242    :: serde :: Serialize,
30243    Clone,
30244    Copy,
30245    Debug,
30246    Eq,
30247    Hash,
30248    Ord,
30249    PartialEq,
30250    PartialOrd,
30251)]
30252pub enum WasmTrap {
30253    #[doc = "An `unreachable` opcode was executed."]
30254    Unreachable,
30255    #[doc = "Call indirect incorrect signature trap."]
30256    IncorrectCallIndirectSignature,
30257    #[doc = "Memory out of bounds trap."]
30258    MemoryOutOfBounds,
30259    #[doc = "Call indirect out of bounds trap."]
30260    #[serde(rename = "CallIndirectOOB")]
30261    CallIndirectOob,
30262    #[doc = "An arithmetic exception, e.g. divided by zero."]
30263    IllegalArithmetic,
30264    #[doc = "Misaligned atomic access trap."]
30265    MisalignedAtomicAccess,
30266    #[doc = "Indirect call to null."]
30267    IndirectCallToNull,
30268    #[doc = "Stack overflow."]
30269    StackOverflow,
30270    #[doc = "Generic trap."]
30271    GenericTrap,
30272}
30273impl ::std::convert::From<&Self> for WasmTrap {
30274    fn from(value: &WasmTrap) -> Self {
30275        value.clone()
30276    }
30277}
30278impl ::std::fmt::Display for WasmTrap {
30279    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
30280        match *self {
30281            Self::Unreachable => f.write_str("Unreachable"),
30282            Self::IncorrectCallIndirectSignature => f.write_str("IncorrectCallIndirectSignature"),
30283            Self::MemoryOutOfBounds => f.write_str("MemoryOutOfBounds"),
30284            Self::CallIndirectOob => f.write_str("CallIndirectOOB"),
30285            Self::IllegalArithmetic => f.write_str("IllegalArithmetic"),
30286            Self::MisalignedAtomicAccess => f.write_str("MisalignedAtomicAccess"),
30287            Self::IndirectCallToNull => f.write_str("IndirectCallToNull"),
30288            Self::StackOverflow => f.write_str("StackOverflow"),
30289            Self::GenericTrap => f.write_str("GenericTrap"),
30290        }
30291    }
30292}
30293impl ::std::str::FromStr for WasmTrap {
30294    type Err = self::error::ConversionError;
30295    fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
30296        match value {
30297            "Unreachable" => Ok(Self::Unreachable),
30298            "IncorrectCallIndirectSignature" => Ok(Self::IncorrectCallIndirectSignature),
30299            "MemoryOutOfBounds" => Ok(Self::MemoryOutOfBounds),
30300            "CallIndirectOOB" => Ok(Self::CallIndirectOob),
30301            "IllegalArithmetic" => Ok(Self::IllegalArithmetic),
30302            "MisalignedAtomicAccess" => Ok(Self::MisalignedAtomicAccess),
30303            "IndirectCallToNull" => Ok(Self::IndirectCallToNull),
30304            "StackOverflow" => Ok(Self::StackOverflow),
30305            "GenericTrap" => Ok(Self::GenericTrap),
30306            _ => Err("invalid value".into()),
30307        }
30308    }
30309}
30310impl ::std::convert::TryFrom<&str> for WasmTrap {
30311    type Error = self::error::ConversionError;
30312    fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
30313        value.parse()
30314    }
30315}
30316impl ::std::convert::TryFrom<&::std::string::String> for WasmTrap {
30317    type Error = self::error::ConversionError;
30318    fn try_from(
30319        value: &::std::string::String,
30320    ) -> ::std::result::Result<Self, self::error::ConversionError> {
30321        value.parse()
30322    }
30323}
30324impl ::std::convert::TryFrom<::std::string::String> for WasmTrap {
30325    type Error = self::error::ConversionError;
30326    fn try_from(
30327        value: ::std::string::String,
30328    ) -> ::std::result::Result<Self, self::error::ConversionError> {
30329        value.parse()
30330    }
30331}
30332#[doc = "Configuration specific to ChunkStateWitness."]
30333#[doc = r""]
30334#[doc = r" <details><summary>JSON schema</summary>"]
30335#[doc = r""]
30336#[doc = r" ```json"]
30337#[doc = "{"]
30338#[doc = "  \"description\": \"Configuration specific to ChunkStateWitness.\","]
30339#[doc = "  \"type\": \"object\","]
30340#[doc = "  \"required\": ["]
30341#[doc = "    \"combined_transactions_size_limit\","]
30342#[doc = "    \"main_storage_proof_size_soft_limit\","]
30343#[doc = "    \"new_transactions_validation_state_size_soft_limit\""]
30344#[doc = "  ],"]
30345#[doc = "  \"properties\": {"]
30346#[doc = "    \"combined_transactions_size_limit\": {"]
30347#[doc = "      \"description\": \"Maximum size of transactions contained inside ChunkStateWitness.\\n\\nA witness contains transactions from both the previous chunk and the current one.\\nThis parameter limits the sum of sizes of transactions from both of those chunks.\","]
30348#[doc = "      \"type\": \"integer\","]
30349#[doc = "      \"format\": \"uint\","]
30350#[doc = "      \"minimum\": 0.0"]
30351#[doc = "    },"]
30352#[doc = "    \"main_storage_proof_size_soft_limit\": {"]
30353#[doc = "      \"description\": \"Size limit for storage proof generated while executing receipts in a chunk.\\nAfter this limit is reached we defer execution of any new receipts.\","]
30354#[doc = "      \"type\": \"integer\","]
30355#[doc = "      \"format\": \"uint64\","]
30356#[doc = "      \"minimum\": 0.0"]
30357#[doc = "    },"]
30358#[doc = "    \"new_transactions_validation_state_size_soft_limit\": {"]
30359#[doc = "      \"description\": \"Soft size limit of storage proof used to validate new transactions in ChunkStateWitness.\","]
30360#[doc = "      \"type\": \"integer\","]
30361#[doc = "      \"format\": \"uint64\","]
30362#[doc = "      \"minimum\": 0.0"]
30363#[doc = "    }"]
30364#[doc = "  }"]
30365#[doc = "}"]
30366#[doc = r" ```"]
30367#[doc = r" </details>"]
30368#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
30369pub struct WitnessConfigView {
30370    #[doc = "Maximum size of transactions contained inside ChunkStateWitness.\n\nA witness contains transactions from both the previous chunk and the current one.\nThis parameter limits the sum of sizes of transactions from both of those chunks."]
30371    pub combined_transactions_size_limit: u32,
30372    #[doc = "Size limit for storage proof generated while executing receipts in a chunk.\nAfter this limit is reached we defer execution of any new receipts."]
30373    pub main_storage_proof_size_soft_limit: u64,
30374    #[doc = "Soft size limit of storage proof used to validate new transactions in ChunkStateWitness."]
30375    pub new_transactions_validation_state_size_soft_limit: u64,
30376}
30377impl ::std::convert::From<&WitnessConfigView> for WitnessConfigView {
30378    fn from(value: &WitnessConfigView) -> Self {
30379        value.clone()
30380    }
30381}
30382#[doc = r" Generation of default values for serde."]
30383pub mod defaults {
30384    pub(super) fn default_u64<T, const V: u64>() -> T
30385    where
30386        T: ::std::convert::TryFrom<u64>,
30387        <T as ::std::convert::TryFrom<u64>>::Error: ::std::fmt::Debug,
30388    {
30389        T::try_from(V).unwrap()
30390    }
30391    pub(super) fn block_header_view_rent_paid() -> super::NearToken {
30392        super::NearToken::from_yoctonear(0)
30393    }
30394    pub(super) fn block_header_view_validator_reward() -> super::NearToken {
30395        super::NearToken::from_yoctonear(0)
30396    }
30397    pub(super) fn chunk_header_view_rent_paid() -> super::NearToken {
30398        super::NearToken::from_yoctonear(0)
30399    }
30400    pub(super) fn chunk_header_view_validator_reward() -> super::NearToken {
30401        super::NearToken::from_yoctonear(0)
30402    }
30403    pub(super) fn cloud_archival_writer_config_polling_interval(
30404    ) -> super::DurationAsStdSchemaProvider {
30405        super::DurationAsStdSchemaProvider {
30406            nanos: 0_i32,
30407            secs: 1_i64,
30408        }
30409    }
30410    pub(super) fn execution_outcome_view_metadata() -> super::ExecutionMetadataView {
30411        super::ExecutionMetadataView {
30412            gas_profile: Default::default(),
30413            version: 1_u32,
30414        }
30415    }
30416    pub(super) fn gc_config_gc_step_period() -> super::DurationAsStdSchemaProvider {
30417        super::DurationAsStdSchemaProvider {
30418            nanos: 500000000_i32,
30419            secs: 0_i64,
30420        }
30421    }
30422    pub(super) fn genesis_config_minimum_stake_ratio() -> [i32; 2usize] {
30423        [1_i32, 6250_i32]
30424    }
30425    pub(super) fn genesis_config_online_max_threshold() -> [i32; 2usize] {
30426        [99_i32, 100_i32]
30427    }
30428    pub(super) fn genesis_config_online_min_threshold() -> [i32; 2usize] {
30429        [9_i32, 10_i32]
30430    }
30431    pub(super) fn genesis_config_protocol_upgrade_stake_threshold() -> [i32; 2usize] {
30432        [4_i32, 5_i32]
30433    }
30434    pub(super) fn genesis_config_shard_layout() -> super::ShardLayout {
30435        super::ShardLayout::V2(super::ShardLayoutV2 {
30436            boundary_accounts: vec![],
30437            id_to_index_map: [("0".to_string(), 0_u32)].into_iter().collect(),
30438            index_to_id_map: [("0".to_string(), super::ShardId(0_u64))]
30439                .into_iter()
30440                .collect(),
30441            shard_ids: vec![super::ShardId(0_u64)],
30442            shards_parent_map: Default::default(),
30443            shards_split_map: Default::default(),
30444            version: 0_u32,
30445        })
30446    }
30447    pub(super) fn limit_config_account_id_validity_rules_version(
30448    ) -> super::AccountIdValidityRulesVersion {
30449        super::AccountIdValidityRulesVersion(0_u8)
30450    }
30451    pub(super) fn rpc_send_transaction_request_wait_until() -> super::TxExecutionStatus {
30452        super::TxExecutionStatus::ExecutedOptimistic
30453    }
30454    pub(super) fn rpc_transaction_status_request_variant0_wait_until() -> super::TxExecutionStatus {
30455        super::TxExecutionStatus::ExecutedOptimistic
30456    }
30457    pub(super) fn rpc_transaction_status_request_variant1_wait_until() -> super::TxExecutionStatus {
30458        super::TxExecutionStatus::ExecutedOptimistic
30459    }
30460}