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 = "`BlockReference`"]
3605#[doc = r""]
3606#[doc = r" <details><summary>JSON schema</summary>"]
3607#[doc = r""]
3608#[doc = r" ```json"]
3609#[doc = "{"]
3610#[doc = "  \"oneOf\": ["]
3611#[doc = "    {"]
3612#[doc = "      \"type\": \"object\","]
3613#[doc = "      \"required\": ["]
3614#[doc = "        \"block_id\""]
3615#[doc = "      ],"]
3616#[doc = "      \"properties\": {"]
3617#[doc = "        \"block_id\": {"]
3618#[doc = "          \"$ref\": \"#/components/schemas/BlockId\""]
3619#[doc = "        }"]
3620#[doc = "      },"]
3621#[doc = "      \"additionalProperties\": false"]
3622#[doc = "    },"]
3623#[doc = "    {"]
3624#[doc = "      \"type\": \"object\","]
3625#[doc = "      \"required\": ["]
3626#[doc = "        \"finality\""]
3627#[doc = "      ],"]
3628#[doc = "      \"properties\": {"]
3629#[doc = "        \"finality\": {"]
3630#[doc = "          \"$ref\": \"#/components/schemas/Finality\""]
3631#[doc = "        }"]
3632#[doc = "      },"]
3633#[doc = "      \"additionalProperties\": false"]
3634#[doc = "    },"]
3635#[doc = "    {"]
3636#[doc = "      \"type\": \"object\","]
3637#[doc = "      \"required\": ["]
3638#[doc = "        \"sync_checkpoint\""]
3639#[doc = "      ],"]
3640#[doc = "      \"properties\": {"]
3641#[doc = "        \"sync_checkpoint\": {"]
3642#[doc = "          \"$ref\": \"#/components/schemas/SyncCheckpoint\""]
3643#[doc = "        }"]
3644#[doc = "      },"]
3645#[doc = "      \"additionalProperties\": false"]
3646#[doc = "    }"]
3647#[doc = "  ]"]
3648#[doc = "}"]
3649#[doc = r" ```"]
3650#[doc = r" </details>"]
3651#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
3652pub enum BlockReference {
3653    #[serde(rename = "block_id")]
3654    BlockId(BlockId),
3655    #[serde(rename = "finality")]
3656    Finality(Finality),
3657    #[serde(rename = "sync_checkpoint")]
3658    SyncCheckpoint(SyncCheckpoint),
3659}
3660impl ::std::convert::From<&Self> for BlockReference {
3661    fn from(value: &BlockReference) -> Self {
3662        value.clone()
3663    }
3664}
3665impl ::std::convert::From<BlockId> for BlockReference {
3666    fn from(value: BlockId) -> Self {
3667        Self::BlockId(value)
3668    }
3669}
3670impl ::std::convert::From<Finality> for BlockReference {
3671    fn from(value: Finality) -> Self {
3672        Self::Finality(value)
3673    }
3674}
3675impl ::std::convert::From<SyncCheckpoint> for BlockReference {
3676    fn from(value: SyncCheckpoint) -> Self {
3677        Self::SyncCheckpoint(value)
3678    }
3679}
3680#[doc = "Height and hash of a block"]
3681#[doc = r""]
3682#[doc = r" <details><summary>JSON schema</summary>"]
3683#[doc = r""]
3684#[doc = r" ```json"]
3685#[doc = "{"]
3686#[doc = "  \"description\": \"Height and hash of a block\","]
3687#[doc = "  \"type\": \"object\","]
3688#[doc = "  \"required\": ["]
3689#[doc = "    \"hash\","]
3690#[doc = "    \"height\""]
3691#[doc = "  ],"]
3692#[doc = "  \"properties\": {"]
3693#[doc = "    \"hash\": {"]
3694#[doc = "      \"$ref\": \"#/components/schemas/CryptoHash\""]
3695#[doc = "    },"]
3696#[doc = "    \"height\": {"]
3697#[doc = "      \"type\": \"integer\","]
3698#[doc = "      \"format\": \"uint64\","]
3699#[doc = "      \"minimum\": 0.0"]
3700#[doc = "    }"]
3701#[doc = "  }"]
3702#[doc = "}"]
3703#[doc = r" ```"]
3704#[doc = r" </details>"]
3705#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
3706pub struct BlockStatusView {
3707    pub hash: CryptoHash,
3708    pub height: u64,
3709}
3710impl ::std::convert::From<&BlockStatusView> for BlockStatusView {
3711    fn from(value: &BlockStatusView) -> Self {
3712        value.clone()
3713    }
3714}
3715#[doc = "`CallFunctionByBlockIdRequestType`"]
3716#[doc = r""]
3717#[doc = r" <details><summary>JSON schema</summary>"]
3718#[doc = r""]
3719#[doc = r" ```json"]
3720#[doc = "{"]
3721#[doc = "  \"type\": \"string\","]
3722#[doc = "  \"enum\": ["]
3723#[doc = "    \"call_function\""]
3724#[doc = "  ]"]
3725#[doc = "}"]
3726#[doc = r" ```"]
3727#[doc = r" </details>"]
3728#[derive(
3729    :: serde :: Deserialize,
3730    :: serde :: Serialize,
3731    Clone,
3732    Copy,
3733    Debug,
3734    Eq,
3735    Hash,
3736    Ord,
3737    PartialEq,
3738    PartialOrd,
3739)]
3740pub enum CallFunctionByBlockIdRequestType {
3741    #[serde(rename = "call_function")]
3742    CallFunction,
3743}
3744impl ::std::convert::From<&Self> for CallFunctionByBlockIdRequestType {
3745    fn from(value: &CallFunctionByBlockIdRequestType) -> Self {
3746        value.clone()
3747    }
3748}
3749impl ::std::fmt::Display for CallFunctionByBlockIdRequestType {
3750    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
3751        match *self {
3752            Self::CallFunction => f.write_str("call_function"),
3753        }
3754    }
3755}
3756impl ::std::str::FromStr for CallFunctionByBlockIdRequestType {
3757    type Err = self::error::ConversionError;
3758    fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
3759        match value {
3760            "call_function" => Ok(Self::CallFunction),
3761            _ => Err("invalid value".into()),
3762        }
3763    }
3764}
3765impl ::std::convert::TryFrom<&str> for CallFunctionByBlockIdRequestType {
3766    type Error = self::error::ConversionError;
3767    fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
3768        value.parse()
3769    }
3770}
3771impl ::std::convert::TryFrom<&::std::string::String> for CallFunctionByBlockIdRequestType {
3772    type Error = self::error::ConversionError;
3773    fn try_from(
3774        value: &::std::string::String,
3775    ) -> ::std::result::Result<Self, self::error::ConversionError> {
3776        value.parse()
3777    }
3778}
3779impl ::std::convert::TryFrom<::std::string::String> for CallFunctionByBlockIdRequestType {
3780    type Error = self::error::ConversionError;
3781    fn try_from(
3782        value: ::std::string::String,
3783    ) -> ::std::result::Result<Self, self::error::ConversionError> {
3784        value.parse()
3785    }
3786}
3787#[doc = "`CallFunctionByFinalityRequestType`"]
3788#[doc = r""]
3789#[doc = r" <details><summary>JSON schema</summary>"]
3790#[doc = r""]
3791#[doc = r" ```json"]
3792#[doc = "{"]
3793#[doc = "  \"type\": \"string\","]
3794#[doc = "  \"enum\": ["]
3795#[doc = "    \"call_function\""]
3796#[doc = "  ]"]
3797#[doc = "}"]
3798#[doc = r" ```"]
3799#[doc = r" </details>"]
3800#[derive(
3801    :: serde :: Deserialize,
3802    :: serde :: Serialize,
3803    Clone,
3804    Copy,
3805    Debug,
3806    Eq,
3807    Hash,
3808    Ord,
3809    PartialEq,
3810    PartialOrd,
3811)]
3812pub enum CallFunctionByFinalityRequestType {
3813    #[serde(rename = "call_function")]
3814    CallFunction,
3815}
3816impl ::std::convert::From<&Self> for CallFunctionByFinalityRequestType {
3817    fn from(value: &CallFunctionByFinalityRequestType) -> Self {
3818        value.clone()
3819    }
3820}
3821impl ::std::fmt::Display for CallFunctionByFinalityRequestType {
3822    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
3823        match *self {
3824            Self::CallFunction => f.write_str("call_function"),
3825        }
3826    }
3827}
3828impl ::std::str::FromStr for CallFunctionByFinalityRequestType {
3829    type Err = self::error::ConversionError;
3830    fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
3831        match value {
3832            "call_function" => Ok(Self::CallFunction),
3833            _ => Err("invalid value".into()),
3834        }
3835    }
3836}
3837impl ::std::convert::TryFrom<&str> for CallFunctionByFinalityRequestType {
3838    type Error = self::error::ConversionError;
3839    fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
3840        value.parse()
3841    }
3842}
3843impl ::std::convert::TryFrom<&::std::string::String> for CallFunctionByFinalityRequestType {
3844    type Error = self::error::ConversionError;
3845    fn try_from(
3846        value: &::std::string::String,
3847    ) -> ::std::result::Result<Self, self::error::ConversionError> {
3848        value.parse()
3849    }
3850}
3851impl ::std::convert::TryFrom<::std::string::String> for CallFunctionByFinalityRequestType {
3852    type Error = self::error::ConversionError;
3853    fn try_from(
3854        value: ::std::string::String,
3855    ) -> ::std::result::Result<Self, self::error::ConversionError> {
3856        value.parse()
3857    }
3858}
3859#[doc = "`CallFunctionBySyncCheckpointRequestType`"]
3860#[doc = r""]
3861#[doc = r" <details><summary>JSON schema</summary>"]
3862#[doc = r""]
3863#[doc = r" ```json"]
3864#[doc = "{"]
3865#[doc = "  \"type\": \"string\","]
3866#[doc = "  \"enum\": ["]
3867#[doc = "    \"call_function\""]
3868#[doc = "  ]"]
3869#[doc = "}"]
3870#[doc = r" ```"]
3871#[doc = r" </details>"]
3872#[derive(
3873    :: serde :: Deserialize,
3874    :: serde :: Serialize,
3875    Clone,
3876    Copy,
3877    Debug,
3878    Eq,
3879    Hash,
3880    Ord,
3881    PartialEq,
3882    PartialOrd,
3883)]
3884pub enum CallFunctionBySyncCheckpointRequestType {
3885    #[serde(rename = "call_function")]
3886    CallFunction,
3887}
3888impl ::std::convert::From<&Self> for CallFunctionBySyncCheckpointRequestType {
3889    fn from(value: &CallFunctionBySyncCheckpointRequestType) -> Self {
3890        value.clone()
3891    }
3892}
3893impl ::std::fmt::Display for CallFunctionBySyncCheckpointRequestType {
3894    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
3895        match *self {
3896            Self::CallFunction => f.write_str("call_function"),
3897        }
3898    }
3899}
3900impl ::std::str::FromStr for CallFunctionBySyncCheckpointRequestType {
3901    type Err = self::error::ConversionError;
3902    fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
3903        match value {
3904            "call_function" => Ok(Self::CallFunction),
3905            _ => Err("invalid value".into()),
3906        }
3907    }
3908}
3909impl ::std::convert::TryFrom<&str> for CallFunctionBySyncCheckpointRequestType {
3910    type Error = self::error::ConversionError;
3911    fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
3912        value.parse()
3913    }
3914}
3915impl ::std::convert::TryFrom<&::std::string::String> for CallFunctionBySyncCheckpointRequestType {
3916    type Error = self::error::ConversionError;
3917    fn try_from(
3918        value: &::std::string::String,
3919    ) -> ::std::result::Result<Self, self::error::ConversionError> {
3920        value.parse()
3921    }
3922}
3923impl ::std::convert::TryFrom<::std::string::String> for CallFunctionBySyncCheckpointRequestType {
3924    type Error = self::error::ConversionError;
3925    fn try_from(
3926        value: ::std::string::String,
3927    ) -> ::std::result::Result<Self, self::error::ConversionError> {
3928        value.parse()
3929    }
3930}
3931#[doc = "A result returned by contract method"]
3932#[doc = r""]
3933#[doc = r" <details><summary>JSON schema</summary>"]
3934#[doc = r""]
3935#[doc = r" ```json"]
3936#[doc = "{"]
3937#[doc = "  \"description\": \"A result returned by contract method\","]
3938#[doc = "  \"type\": \"object\","]
3939#[doc = "  \"required\": ["]
3940#[doc = "    \"logs\","]
3941#[doc = "    \"result\""]
3942#[doc = "  ],"]
3943#[doc = "  \"properties\": {"]
3944#[doc = "    \"logs\": {"]
3945#[doc = "      \"type\": \"array\","]
3946#[doc = "      \"items\": {"]
3947#[doc = "        \"type\": \"string\""]
3948#[doc = "      }"]
3949#[doc = "    },"]
3950#[doc = "    \"result\": {"]
3951#[doc = "      \"type\": \"array\","]
3952#[doc = "      \"items\": {"]
3953#[doc = "        \"type\": \"integer\","]
3954#[doc = "        \"format\": \"uint8\","]
3955#[doc = "        \"maximum\": 255.0,"]
3956#[doc = "        \"minimum\": 0.0"]
3957#[doc = "      }"]
3958#[doc = "    }"]
3959#[doc = "  }"]
3960#[doc = "}"]
3961#[doc = r" ```"]
3962#[doc = r" </details>"]
3963#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
3964pub struct CallResult {
3965    pub logs: ::std::vec::Vec<::std::string::String>,
3966    pub result: ::std::vec::Vec<u8>,
3967}
3968impl ::std::convert::From<&CallResult> for CallResult {
3969    fn from(value: &CallResult) -> Self {
3970        value.clone()
3971    }
3972}
3973#[doc = "Status of the [catchup](https://near.github.io/nearcore/architecture/how/sync.html#catchup) process"]
3974#[doc = r""]
3975#[doc = r" <details><summary>JSON schema</summary>"]
3976#[doc = r""]
3977#[doc = r" ```json"]
3978#[doc = "{"]
3979#[doc = "  \"description\": \"Status of the [catchup](https://near.github.io/nearcore/architecture/how/sync.html#catchup) process\","]
3980#[doc = "  \"type\": \"object\","]
3981#[doc = "  \"required\": ["]
3982#[doc = "    \"blocks_to_catchup\","]
3983#[doc = "    \"shard_sync_status\","]
3984#[doc = "    \"sync_block_hash\","]
3985#[doc = "    \"sync_block_height\""]
3986#[doc = "  ],"]
3987#[doc = "  \"properties\": {"]
3988#[doc = "    \"blocks_to_catchup\": {"]
3989#[doc = "      \"type\": \"array\","]
3990#[doc = "      \"items\": {"]
3991#[doc = "        \"$ref\": \"#/components/schemas/BlockStatusView\""]
3992#[doc = "      }"]
3993#[doc = "    },"]
3994#[doc = "    \"shard_sync_status\": {"]
3995#[doc = "      \"type\": \"object\","]
3996#[doc = "      \"additionalProperties\": false"]
3997#[doc = "    },"]
3998#[doc = "    \"sync_block_hash\": {"]
3999#[doc = "      \"$ref\": \"#/components/schemas/CryptoHash\""]
4000#[doc = "    },"]
4001#[doc = "    \"sync_block_height\": {"]
4002#[doc = "      \"type\": \"integer\","]
4003#[doc = "      \"format\": \"uint64\","]
4004#[doc = "      \"minimum\": 0.0"]
4005#[doc = "    }"]
4006#[doc = "  }"]
4007#[doc = "}"]
4008#[doc = r" ```"]
4009#[doc = r" </details>"]
4010#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
4011pub struct CatchupStatusView {
4012    pub blocks_to_catchup: ::std::vec::Vec<BlockStatusView>,
4013    pub shard_sync_status: CatchupStatusViewShardSyncStatus,
4014    pub sync_block_hash: CryptoHash,
4015    pub sync_block_height: u64,
4016}
4017impl ::std::convert::From<&CatchupStatusView> for CatchupStatusView {
4018    fn from(value: &CatchupStatusView) -> Self {
4019        value.clone()
4020    }
4021}
4022#[doc = "`CatchupStatusViewShardSyncStatus`"]
4023#[doc = r""]
4024#[doc = r" <details><summary>JSON schema</summary>"]
4025#[doc = r""]
4026#[doc = r" ```json"]
4027#[doc = "{"]
4028#[doc = "  \"type\": \"object\","]
4029#[doc = "  \"additionalProperties\": false"]
4030#[doc = "}"]
4031#[doc = r" ```"]
4032#[doc = r" </details>"]
4033#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
4034#[serde(deny_unknown_fields)]
4035pub struct CatchupStatusViewShardSyncStatus {}
4036impl ::std::convert::From<&CatchupStatusViewShardSyncStatus> for CatchupStatusViewShardSyncStatus {
4037    fn from(value: &CatchupStatusViewShardSyncStatus) -> Self {
4038        value.clone()
4039    }
4040}
4041impl ::std::default::Default for CatchupStatusViewShardSyncStatus {
4042    fn default() -> Self {
4043        Self {}
4044    }
4045}
4046#[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."]
4047#[doc = r""]
4048#[doc = r" <details><summary>JSON schema</summary>"]
4049#[doc = r""]
4050#[doc = r" ```json"]
4051#[doc = "{"]
4052#[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.\","]
4053#[doc = "  \"type\": \"object\","]
4054#[doc = "  \"required\": ["]
4055#[doc = "    \"enabled\","]
4056#[doc = "    \"uris\""]
4057#[doc = "  ],"]
4058#[doc = "  \"properties\": {"]
4059#[doc = "    \"enabled\": {"]
4060#[doc = "      \"type\": \"boolean\""]
4061#[doc = "    },"]
4062#[doc = "    \"uris\": {"]
4063#[doc = "      \"$ref\": \"#/components/schemas/ChunkDistributionUris\""]
4064#[doc = "    }"]
4065#[doc = "  }"]
4066#[doc = "}"]
4067#[doc = r" ```"]
4068#[doc = r" </details>"]
4069#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
4070pub struct ChunkDistributionNetworkConfig {
4071    pub enabled: bool,
4072    pub uris: ChunkDistributionUris,
4073}
4074impl ::std::convert::From<&ChunkDistributionNetworkConfig> for ChunkDistributionNetworkConfig {
4075    fn from(value: &ChunkDistributionNetworkConfig) -> Self {
4076        value.clone()
4077    }
4078}
4079#[doc = "URIs for the Chunk Distribution Network feature."]
4080#[doc = r""]
4081#[doc = r" <details><summary>JSON schema</summary>"]
4082#[doc = r""]
4083#[doc = r" ```json"]
4084#[doc = "{"]
4085#[doc = "  \"description\": \"URIs for the Chunk Distribution Network feature.\","]
4086#[doc = "  \"type\": \"object\","]
4087#[doc = "  \"required\": ["]
4088#[doc = "    \"get\","]
4089#[doc = "    \"set\""]
4090#[doc = "  ],"]
4091#[doc = "  \"properties\": {"]
4092#[doc = "    \"get\": {"]
4093#[doc = "      \"description\": \"URI for pulling chunks from the stream.\","]
4094#[doc = "      \"type\": \"string\""]
4095#[doc = "    },"]
4096#[doc = "    \"set\": {"]
4097#[doc = "      \"description\": \"URI for publishing chunks to the stream.\","]
4098#[doc = "      \"type\": \"string\""]
4099#[doc = "    }"]
4100#[doc = "  }"]
4101#[doc = "}"]
4102#[doc = r" ```"]
4103#[doc = r" </details>"]
4104#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
4105pub struct ChunkDistributionUris {
4106    #[doc = "URI for pulling chunks from the stream."]
4107    pub get: ::std::string::String,
4108    #[doc = "URI for publishing chunks to the stream."]
4109    pub set: ::std::string::String,
4110}
4111impl ::std::convert::From<&ChunkDistributionUris> for ChunkDistributionUris {
4112    fn from(value: &ChunkDistributionUris) -> Self {
4113        value.clone()
4114    }
4115}
4116#[doc = "`ChunkHash`"]
4117#[doc = r""]
4118#[doc = r" <details><summary>JSON schema</summary>"]
4119#[doc = r""]
4120#[doc = r" ```json"]
4121#[doc = "{"]
4122#[doc = "  \"$ref\": \"#/components/schemas/CryptoHash\""]
4123#[doc = "}"]
4124#[doc = r" ```"]
4125#[doc = r" </details>"]
4126#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
4127#[serde(transparent)]
4128pub struct ChunkHash(pub CryptoHash);
4129impl ::std::ops::Deref for ChunkHash {
4130    type Target = CryptoHash;
4131    fn deref(&self) -> &CryptoHash {
4132        &self.0
4133    }
4134}
4135impl ::std::convert::From<ChunkHash> for CryptoHash {
4136    fn from(value: ChunkHash) -> Self {
4137        value.0
4138    }
4139}
4140impl ::std::convert::From<&ChunkHash> for ChunkHash {
4141    fn from(value: &ChunkHash) -> Self {
4142        value.clone()
4143    }
4144}
4145impl ::std::convert::From<CryptoHash> for ChunkHash {
4146    fn from(value: CryptoHash) -> Self {
4147        Self(value)
4148    }
4149}
4150impl ::std::str::FromStr for ChunkHash {
4151    type Err = <CryptoHash as ::std::str::FromStr>::Err;
4152    fn from_str(value: &str) -> ::std::result::Result<Self, Self::Err> {
4153        Ok(Self(value.parse()?))
4154    }
4155}
4156impl ::std::convert::TryFrom<&str> for ChunkHash {
4157    type Error = <CryptoHash as ::std::str::FromStr>::Err;
4158    fn try_from(value: &str) -> ::std::result::Result<Self, Self::Error> {
4159        value.parse()
4160    }
4161}
4162impl ::std::convert::TryFrom<&String> for ChunkHash {
4163    type Error = <CryptoHash as ::std::str::FromStr>::Err;
4164    fn try_from(value: &String) -> ::std::result::Result<Self, Self::Error> {
4165        value.parse()
4166    }
4167}
4168impl ::std::convert::TryFrom<String> for ChunkHash {
4169    type Error = <CryptoHash as ::std::str::FromStr>::Err;
4170    fn try_from(value: String) -> ::std::result::Result<Self, Self::Error> {
4171        value.parse()
4172    }
4173}
4174impl ::std::fmt::Display for ChunkHash {
4175    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
4176        self.0.fmt(f)
4177    }
4178}
4179#[doc = "Contains main info about the chunk."]
4180#[doc = r""]
4181#[doc = r" <details><summary>JSON schema</summary>"]
4182#[doc = r""]
4183#[doc = r" ```json"]
4184#[doc = "{"]
4185#[doc = "  \"description\": \"Contains main info about the chunk.\","]
4186#[doc = "  \"type\": \"object\","]
4187#[doc = "  \"required\": ["]
4188#[doc = "    \"balance_burnt\","]
4189#[doc = "    \"chunk_hash\","]
4190#[doc = "    \"encoded_length\","]
4191#[doc = "    \"encoded_merkle_root\","]
4192#[doc = "    \"gas_limit\","]
4193#[doc = "    \"gas_used\","]
4194#[doc = "    \"height_created\","]
4195#[doc = "    \"height_included\","]
4196#[doc = "    \"outcome_root\","]
4197#[doc = "    \"outgoing_receipts_root\","]
4198#[doc = "    \"prev_block_hash\","]
4199#[doc = "    \"prev_state_root\","]
4200#[doc = "    \"shard_id\","]
4201#[doc = "    \"signature\","]
4202#[doc = "    \"tx_root\","]
4203#[doc = "    \"validator_proposals\""]
4204#[doc = "  ],"]
4205#[doc = "  \"properties\": {"]
4206#[doc = "    \"balance_burnt\": {"]
4207#[doc = "      \"$ref\": \"#/components/schemas/NearToken\""]
4208#[doc = "    },"]
4209#[doc = "    \"bandwidth_requests\": {"]
4210#[doc = "      \"anyOf\": ["]
4211#[doc = "        {"]
4212#[doc = "          \"$ref\": \"#/components/schemas/BandwidthRequests\""]
4213#[doc = "        },"]
4214#[doc = "        {"]
4215#[doc = "          \"type\": \"null\""]
4216#[doc = "        }"]
4217#[doc = "      ]"]
4218#[doc = "    },"]
4219#[doc = "    \"chunk_hash\": {"]
4220#[doc = "      \"$ref\": \"#/components/schemas/CryptoHash\""]
4221#[doc = "    },"]
4222#[doc = "    \"congestion_info\": {"]
4223#[doc = "      \"anyOf\": ["]
4224#[doc = "        {"]
4225#[doc = "          \"$ref\": \"#/components/schemas/CongestionInfoView\""]
4226#[doc = "        },"]
4227#[doc = "        {"]
4228#[doc = "          \"type\": \"null\""]
4229#[doc = "        }"]
4230#[doc = "      ]"]
4231#[doc = "    },"]
4232#[doc = "    \"encoded_length\": {"]
4233#[doc = "      \"type\": \"integer\","]
4234#[doc = "      \"format\": \"uint64\","]
4235#[doc = "      \"minimum\": 0.0"]
4236#[doc = "    },"]
4237#[doc = "    \"encoded_merkle_root\": {"]
4238#[doc = "      \"$ref\": \"#/components/schemas/CryptoHash\""]
4239#[doc = "    },"]
4240#[doc = "    \"gas_limit\": {"]
4241#[doc = "      \"$ref\": \"#/components/schemas/NearGas\""]
4242#[doc = "    },"]
4243#[doc = "    \"gas_used\": {"]
4244#[doc = "      \"$ref\": \"#/components/schemas/NearGas\""]
4245#[doc = "    },"]
4246#[doc = "    \"height_created\": {"]
4247#[doc = "      \"type\": \"integer\","]
4248#[doc = "      \"format\": \"uint64\","]
4249#[doc = "      \"minimum\": 0.0"]
4250#[doc = "    },"]
4251#[doc = "    \"height_included\": {"]
4252#[doc = "      \"type\": \"integer\","]
4253#[doc = "      \"format\": \"uint64\","]
4254#[doc = "      \"minimum\": 0.0"]
4255#[doc = "    },"]
4256#[doc = "    \"outcome_root\": {"]
4257#[doc = "      \"$ref\": \"#/components/schemas/CryptoHash\""]
4258#[doc = "    },"]
4259#[doc = "    \"outgoing_receipts_root\": {"]
4260#[doc = "      \"$ref\": \"#/components/schemas/CryptoHash\""]
4261#[doc = "    },"]
4262#[doc = "    \"prev_block_hash\": {"]
4263#[doc = "      \"$ref\": \"#/components/schemas/CryptoHash\""]
4264#[doc = "    },"]
4265#[doc = "    \"prev_state_root\": {"]
4266#[doc = "      \"$ref\": \"#/components/schemas/CryptoHash\""]
4267#[doc = "    },"]
4268#[doc = "    \"rent_paid\": {"]
4269#[doc = "      \"description\": \"TODO(2271): deprecated.\","]
4270#[doc = "      \"default\": \"0\","]
4271#[doc = "      \"allOf\": ["]
4272#[doc = "        {"]
4273#[doc = "          \"$ref\": \"#/components/schemas/NearToken\""]
4274#[doc = "        }"]
4275#[doc = "      ]"]
4276#[doc = "    },"]
4277#[doc = "    \"shard_id\": {"]
4278#[doc = "      \"$ref\": \"#/components/schemas/ShardId\""]
4279#[doc = "    },"]
4280#[doc = "    \"signature\": {"]
4281#[doc = "      \"$ref\": \"#/components/schemas/Signature\""]
4282#[doc = "    },"]
4283#[doc = "    \"tx_root\": {"]
4284#[doc = "      \"$ref\": \"#/components/schemas/CryptoHash\""]
4285#[doc = "    },"]
4286#[doc = "    \"validator_proposals\": {"]
4287#[doc = "      \"type\": \"array\","]
4288#[doc = "      \"items\": {"]
4289#[doc = "        \"$ref\": \"#/components/schemas/ValidatorStakeView\""]
4290#[doc = "      }"]
4291#[doc = "    },"]
4292#[doc = "    \"validator_reward\": {"]
4293#[doc = "      \"description\": \"TODO(2271): deprecated.\","]
4294#[doc = "      \"default\": \"0\","]
4295#[doc = "      \"allOf\": ["]
4296#[doc = "        {"]
4297#[doc = "          \"$ref\": \"#/components/schemas/NearToken\""]
4298#[doc = "        }"]
4299#[doc = "      ]"]
4300#[doc = "    }"]
4301#[doc = "  }"]
4302#[doc = "}"]
4303#[doc = r" ```"]
4304#[doc = r" </details>"]
4305#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
4306pub struct ChunkHeaderView {
4307    pub balance_burnt: NearToken,
4308    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
4309    pub bandwidth_requests: ::std::option::Option<BandwidthRequests>,
4310    pub chunk_hash: CryptoHash,
4311    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
4312    pub congestion_info: ::std::option::Option<CongestionInfoView>,
4313    pub encoded_length: u64,
4314    pub encoded_merkle_root: CryptoHash,
4315    pub gas_limit: NearGas,
4316    pub gas_used: NearGas,
4317    pub height_created: u64,
4318    pub height_included: u64,
4319    pub outcome_root: CryptoHash,
4320    pub outgoing_receipts_root: CryptoHash,
4321    pub prev_block_hash: CryptoHash,
4322    pub prev_state_root: CryptoHash,
4323    #[doc = "TODO(2271): deprecated."]
4324    #[serde(default = "defaults::chunk_header_view_rent_paid")]
4325    pub rent_paid: NearToken,
4326    pub shard_id: ShardId,
4327    pub signature: Signature,
4328    pub tx_root: CryptoHash,
4329    pub validator_proposals: ::std::vec::Vec<ValidatorStakeView>,
4330    #[doc = "TODO(2271): deprecated."]
4331    #[serde(default = "defaults::chunk_header_view_validator_reward")]
4332    pub validator_reward: NearToken,
4333}
4334impl ::std::convert::From<&ChunkHeaderView> for ChunkHeaderView {
4335    fn from(value: &ChunkHeaderView) -> Self {
4336        value.clone()
4337    }
4338}
4339#[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."]
4340#[doc = r""]
4341#[doc = r" <details><summary>JSON schema</summary>"]
4342#[doc = r""]
4343#[doc = r" ```json"]
4344#[doc = "{"]
4345#[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.\","]
4346#[doc = "  \"type\": \"object\","]
4347#[doc = "  \"properties\": {"]
4348#[doc = "    \"archive_block_data\": {"]
4349#[doc = "      \"description\": \"Determines whether block-related data should be written to cloud storage.\","]
4350#[doc = "      \"default\": false,"]
4351#[doc = "      \"type\": \"boolean\""]
4352#[doc = "    },"]
4353#[doc = "    \"polling_interval\": {"]
4354#[doc = "      \"description\": \"Interval at which the system checks for new blocks or chunks to archive.\","]
4355#[doc = "      \"default\": {"]
4356#[doc = "        \"nanos\": 0,"]
4357#[doc = "        \"secs\": 1"]
4358#[doc = "      },"]
4359#[doc = "      \"allOf\": ["]
4360#[doc = "        {"]
4361#[doc = "          \"$ref\": \"#/components/schemas/DurationAsStdSchemaProvider\""]
4362#[doc = "        }"]
4363#[doc = "      ]"]
4364#[doc = "    }"]
4365#[doc = "  }"]
4366#[doc = "}"]
4367#[doc = r" ```"]
4368#[doc = r" </details>"]
4369#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
4370pub struct CloudArchivalWriterConfig {
4371    #[doc = "Determines whether block-related data should be written to cloud storage."]
4372    #[serde(default)]
4373    pub archive_block_data: bool,
4374    #[doc = "Interval at which the system checks for new blocks or chunks to archive."]
4375    #[serde(default = "defaults::cloud_archival_writer_config_polling_interval")]
4376    pub polling_interval: DurationAsStdSchemaProvider,
4377}
4378impl ::std::convert::From<&CloudArchivalWriterConfig> for CloudArchivalWriterConfig {
4379    fn from(value: &CloudArchivalWriterConfig) -> Self {
4380        value.clone()
4381    }
4382}
4383impl ::std::default::Default for CloudArchivalWriterConfig {
4384    fn default() -> Self {
4385        Self {
4386            archive_block_data: Default::default(),
4387            polling_interval: defaults::cloud_archival_writer_config_polling_interval(),
4388        }
4389    }
4390}
4391#[doc = "`CompilationError`"]
4392#[doc = r""]
4393#[doc = r" <details><summary>JSON schema</summary>"]
4394#[doc = r""]
4395#[doc = r" ```json"]
4396#[doc = "{"]
4397#[doc = "  \"oneOf\": ["]
4398#[doc = "    {"]
4399#[doc = "      \"type\": \"object\","]
4400#[doc = "      \"required\": ["]
4401#[doc = "        \"CodeDoesNotExist\""]
4402#[doc = "      ],"]
4403#[doc = "      \"properties\": {"]
4404#[doc = "        \"CodeDoesNotExist\": {"]
4405#[doc = "          \"type\": \"object\","]
4406#[doc = "          \"required\": ["]
4407#[doc = "            \"account_id\""]
4408#[doc = "          ],"]
4409#[doc = "          \"properties\": {"]
4410#[doc = "            \"account_id\": {"]
4411#[doc = "              \"$ref\": \"#/components/schemas/AccountId\""]
4412#[doc = "            }"]
4413#[doc = "          }"]
4414#[doc = "        }"]
4415#[doc = "      },"]
4416#[doc = "      \"additionalProperties\": false"]
4417#[doc = "    },"]
4418#[doc = "    {"]
4419#[doc = "      \"type\": \"object\","]
4420#[doc = "      \"required\": ["]
4421#[doc = "        \"PrepareError\""]
4422#[doc = "      ],"]
4423#[doc = "      \"properties\": {"]
4424#[doc = "        \"PrepareError\": {"]
4425#[doc = "          \"$ref\": \"#/components/schemas/PrepareError\""]
4426#[doc = "        }"]
4427#[doc = "      },"]
4428#[doc = "      \"additionalProperties\": false"]
4429#[doc = "    },"]
4430#[doc = "    {"]
4431#[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\","]
4432#[doc = "      \"type\": \"object\","]
4433#[doc = "      \"required\": ["]
4434#[doc = "        \"WasmerCompileError\""]
4435#[doc = "      ],"]
4436#[doc = "      \"properties\": {"]
4437#[doc = "        \"WasmerCompileError\": {"]
4438#[doc = "          \"type\": \"object\","]
4439#[doc = "          \"required\": ["]
4440#[doc = "            \"msg\""]
4441#[doc = "          ],"]
4442#[doc = "          \"properties\": {"]
4443#[doc = "            \"msg\": {"]
4444#[doc = "              \"type\": \"string\""]
4445#[doc = "            }"]
4446#[doc = "          }"]
4447#[doc = "        }"]
4448#[doc = "      },"]
4449#[doc = "      \"additionalProperties\": false"]
4450#[doc = "    }"]
4451#[doc = "  ]"]
4452#[doc = "}"]
4453#[doc = r" ```"]
4454#[doc = r" </details>"]
4455#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
4456pub enum CompilationError {
4457    CodeDoesNotExist {
4458        account_id: AccountId,
4459    },
4460    PrepareError(PrepareError),
4461    #[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"]
4462    WasmerCompileError {
4463        msg: ::std::string::String,
4464    },
4465}
4466impl ::std::convert::From<&Self> for CompilationError {
4467    fn from(value: &CompilationError) -> Self {
4468        value.clone()
4469    }
4470}
4471impl ::std::convert::From<PrepareError> for CompilationError {
4472    fn from(value: PrepareError) -> Self {
4473        Self::PrepareError(value)
4474    }
4475}
4476#[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)"]
4477#[doc = r""]
4478#[doc = r" <details><summary>JSON schema</summary>"]
4479#[doc = r""]
4480#[doc = r" ```json"]
4481#[doc = "{"]
4482#[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)\","]
4483#[doc = "  \"type\": \"object\","]
4484#[doc = "  \"required\": ["]
4485#[doc = "    \"allowed_shard_outgoing_gas\","]
4486#[doc = "    \"max_congestion_incoming_gas\","]
4487#[doc = "    \"max_congestion_memory_consumption\","]
4488#[doc = "    \"max_congestion_missed_chunks\","]
4489#[doc = "    \"max_congestion_outgoing_gas\","]
4490#[doc = "    \"max_outgoing_gas\","]
4491#[doc = "    \"max_tx_gas\","]
4492#[doc = "    \"min_outgoing_gas\","]
4493#[doc = "    \"min_tx_gas\","]
4494#[doc = "    \"outgoing_receipts_big_size_limit\","]
4495#[doc = "    \"outgoing_receipts_usual_size_limit\","]
4496#[doc = "    \"reject_tx_congestion_threshold\""]
4497#[doc = "  ],"]
4498#[doc = "  \"properties\": {"]
4499#[doc = "    \"allowed_shard_outgoing_gas\": {"]
4500#[doc = "      \"description\": \"How much gas the chosen allowed shard can send to a 100% congested shard.\\n\\nSee [`CongestionControlConfig`] for more details.\","]
4501#[doc = "      \"allOf\": ["]
4502#[doc = "        {"]
4503#[doc = "          \"$ref\": \"#/components/schemas/NearGas\""]
4504#[doc = "        }"]
4505#[doc = "      ]"]
4506#[doc = "    },"]
4507#[doc = "    \"max_congestion_incoming_gas\": {"]
4508#[doc = "      \"description\": \"How much gas in delayed receipts of a shard is 100% incoming congestion.\\n\\nSee [`CongestionControlConfig`] for more details.\","]
4509#[doc = "      \"allOf\": ["]
4510#[doc = "        {"]
4511#[doc = "          \"$ref\": \"#/components/schemas/NearGas\""]
4512#[doc = "        }"]
4513#[doc = "      ]"]
4514#[doc = "    },"]
4515#[doc = "    \"max_congestion_memory_consumption\": {"]
4516#[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.\","]
4517#[doc = "      \"type\": \"integer\","]
4518#[doc = "      \"format\": \"uint64\","]
4519#[doc = "      \"minimum\": 0.0"]
4520#[doc = "    },"]
4521#[doc = "    \"max_congestion_missed_chunks\": {"]
4522#[doc = "      \"description\": \"How many missed chunks in a row in a shard is considered 100% congested.\","]
4523#[doc = "      \"type\": \"integer\","]
4524#[doc = "      \"format\": \"uint64\","]
4525#[doc = "      \"minimum\": 0.0"]
4526#[doc = "    },"]
4527#[doc = "    \"max_congestion_outgoing_gas\": {"]
4528#[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.\","]
4529#[doc = "      \"allOf\": ["]
4530#[doc = "        {"]
4531#[doc = "          \"$ref\": \"#/components/schemas/NearGas\""]
4532#[doc = "        }"]
4533#[doc = "      ]"]
4534#[doc = "    },"]
4535#[doc = "    \"max_outgoing_gas\": {"]
4536#[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.\","]
4537#[doc = "      \"allOf\": ["]
4538#[doc = "        {"]
4539#[doc = "          \"$ref\": \"#/components/schemas/NearGas\""]
4540#[doc = "        }"]
4541#[doc = "      ]"]
4542#[doc = "    },"]
4543#[doc = "    \"max_tx_gas\": {"]
4544#[doc = "      \"description\": \"The maximum amount of gas in a chunk spent on converting new transactions to\\nreceipts.\\n\\nSee [`CongestionControlConfig`] for more details.\","]
4545#[doc = "      \"allOf\": ["]
4546#[doc = "        {"]
4547#[doc = "          \"$ref\": \"#/components/schemas/NearGas\""]
4548#[doc = "        }"]
4549#[doc = "      ]"]
4550#[doc = "    },"]
4551#[doc = "    \"min_outgoing_gas\": {"]
4552#[doc = "      \"description\": \"The minimum gas each shard can send to a shard that is not fully congested.\\n\\nSee [`CongestionControlConfig`] for more details.\","]
4553#[doc = "      \"allOf\": ["]
4554#[doc = "        {"]
4555#[doc = "          \"$ref\": \"#/components/schemas/NearGas\""]
4556#[doc = "        }"]
4557#[doc = "      ]"]
4558#[doc = "    },"]
4559#[doc = "    \"min_tx_gas\": {"]
4560#[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.\","]
4561#[doc = "      \"allOf\": ["]
4562#[doc = "        {"]
4563#[doc = "          \"$ref\": \"#/components/schemas/NearGas\""]
4564#[doc = "        }"]
4565#[doc = "      ]"]
4566#[doc = "    },"]
4567#[doc = "    \"outgoing_receipts_big_size_limit\": {"]
4568#[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.\","]
4569#[doc = "      \"type\": \"integer\","]
4570#[doc = "      \"format\": \"uint64\","]
4571#[doc = "      \"minimum\": 0.0"]
4572#[doc = "    },"]
4573#[doc = "    \"outgoing_receipts_usual_size_limit\": {"]
4574#[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.\","]
4575#[doc = "      \"type\": \"integer\","]
4576#[doc = "      \"format\": \"uint64\","]
4577#[doc = "      \"minimum\": 0.0"]
4578#[doc = "    },"]
4579#[doc = "    \"reject_tx_congestion_threshold\": {"]
4580#[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.\","]
4581#[doc = "      \"type\": \"number\","]
4582#[doc = "      \"format\": \"double\""]
4583#[doc = "    }"]
4584#[doc = "  }"]
4585#[doc = "}"]
4586#[doc = r" ```"]
4587#[doc = r" </details>"]
4588#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
4589pub struct CongestionControlConfigView {
4590    #[doc = "How much gas the chosen allowed shard can send to a 100% congested shard.\n\nSee [`CongestionControlConfig`] for more details."]
4591    pub allowed_shard_outgoing_gas: NearGas,
4592    #[doc = "How much gas in delayed receipts of a shard is 100% incoming congestion.\n\nSee [`CongestionControlConfig`] for more details."]
4593    pub max_congestion_incoming_gas: NearGas,
4594    #[doc = "How much memory space of all delayed and buffered receipts in a shard is\nconsidered 100% congested.\n\nSee [`CongestionControlConfig`] for more details."]
4595    pub max_congestion_memory_consumption: u64,
4596    #[doc = "How many missed chunks in a row in a shard is considered 100% congested."]
4597    pub max_congestion_missed_chunks: u64,
4598    #[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."]
4599    pub max_congestion_outgoing_gas: NearGas,
4600    #[doc = "The maximum amount of gas attached to receipts a shard can forward to\nanother shard per chunk.\n\nSee [`CongestionControlConfig`] for more details."]
4601    pub max_outgoing_gas: NearGas,
4602    #[doc = "The maximum amount of gas in a chunk spent on converting new transactions to\nreceipts.\n\nSee [`CongestionControlConfig`] for more details."]
4603    pub max_tx_gas: NearGas,
4604    #[doc = "The minimum gas each shard can send to a shard that is not fully congested.\n\nSee [`CongestionControlConfig`] for more details."]
4605    pub min_outgoing_gas: NearGas,
4606    #[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."]
4607    pub min_tx_gas: NearGas,
4608    #[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."]
4609    pub outgoing_receipts_big_size_limit: u64,
4610    #[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."]
4611    pub outgoing_receipts_usual_size_limit: u64,
4612    pub reject_tx_congestion_threshold: f64,
4613}
4614impl ::std::convert::From<&CongestionControlConfigView> for CongestionControlConfigView {
4615    fn from(value: &CongestionControlConfigView) -> Self {
4616        value.clone()
4617    }
4618}
4619#[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)"]
4620#[doc = r""]
4621#[doc = r" <details><summary>JSON schema</summary>"]
4622#[doc = r""]
4623#[doc = r" ```json"]
4624#[doc = "{"]
4625#[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)\","]
4626#[doc = "  \"type\": \"object\","]
4627#[doc = "  \"required\": ["]
4628#[doc = "    \"allowed_shard\","]
4629#[doc = "    \"buffered_receipts_gas\","]
4630#[doc = "    \"delayed_receipts_gas\","]
4631#[doc = "    \"receipt_bytes\""]
4632#[doc = "  ],"]
4633#[doc = "  \"properties\": {"]
4634#[doc = "    \"allowed_shard\": {"]
4635#[doc = "      \"type\": \"integer\","]
4636#[doc = "      \"format\": \"uint16\","]
4637#[doc = "      \"maximum\": 65535.0,"]
4638#[doc = "      \"minimum\": 0.0"]
4639#[doc = "    },"]
4640#[doc = "    \"buffered_receipts_gas\": {"]
4641#[doc = "      \"type\": \"string\""]
4642#[doc = "    },"]
4643#[doc = "    \"delayed_receipts_gas\": {"]
4644#[doc = "      \"type\": \"string\""]
4645#[doc = "    },"]
4646#[doc = "    \"receipt_bytes\": {"]
4647#[doc = "      \"type\": \"integer\","]
4648#[doc = "      \"format\": \"uint64\","]
4649#[doc = "      \"minimum\": 0.0"]
4650#[doc = "    }"]
4651#[doc = "  }"]
4652#[doc = "}"]
4653#[doc = r" ```"]
4654#[doc = r" </details>"]
4655#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
4656pub struct CongestionInfoView {
4657    pub allowed_shard: u16,
4658    pub buffered_receipts_gas: ::std::string::String,
4659    pub delayed_receipts_gas: ::std::string::String,
4660    pub receipt_bytes: u64,
4661}
4662impl ::std::convert::From<&CongestionInfoView> for CongestionInfoView {
4663    fn from(value: &CongestionInfoView) -> Self {
4664        value.clone()
4665    }
4666}
4667#[doc = "`ContractCodeChangesByBlockIdChangesType`"]
4668#[doc = r""]
4669#[doc = r" <details><summary>JSON schema</summary>"]
4670#[doc = r""]
4671#[doc = r" ```json"]
4672#[doc = "{"]
4673#[doc = "  \"type\": \"string\","]
4674#[doc = "  \"enum\": ["]
4675#[doc = "    \"contract_code_changes\""]
4676#[doc = "  ]"]
4677#[doc = "}"]
4678#[doc = r" ```"]
4679#[doc = r" </details>"]
4680#[derive(
4681    :: serde :: Deserialize,
4682    :: serde :: Serialize,
4683    Clone,
4684    Copy,
4685    Debug,
4686    Eq,
4687    Hash,
4688    Ord,
4689    PartialEq,
4690    PartialOrd,
4691)]
4692pub enum ContractCodeChangesByBlockIdChangesType {
4693    #[serde(rename = "contract_code_changes")]
4694    ContractCodeChanges,
4695}
4696impl ::std::convert::From<&Self> for ContractCodeChangesByBlockIdChangesType {
4697    fn from(value: &ContractCodeChangesByBlockIdChangesType) -> Self {
4698        value.clone()
4699    }
4700}
4701impl ::std::fmt::Display for ContractCodeChangesByBlockIdChangesType {
4702    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
4703        match *self {
4704            Self::ContractCodeChanges => f.write_str("contract_code_changes"),
4705        }
4706    }
4707}
4708impl ::std::str::FromStr for ContractCodeChangesByBlockIdChangesType {
4709    type Err = self::error::ConversionError;
4710    fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
4711        match value {
4712            "contract_code_changes" => Ok(Self::ContractCodeChanges),
4713            _ => Err("invalid value".into()),
4714        }
4715    }
4716}
4717impl ::std::convert::TryFrom<&str> for ContractCodeChangesByBlockIdChangesType {
4718    type Error = self::error::ConversionError;
4719    fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
4720        value.parse()
4721    }
4722}
4723impl ::std::convert::TryFrom<&::std::string::String> for ContractCodeChangesByBlockIdChangesType {
4724    type Error = self::error::ConversionError;
4725    fn try_from(
4726        value: &::std::string::String,
4727    ) -> ::std::result::Result<Self, self::error::ConversionError> {
4728        value.parse()
4729    }
4730}
4731impl ::std::convert::TryFrom<::std::string::String> for ContractCodeChangesByBlockIdChangesType {
4732    type Error = self::error::ConversionError;
4733    fn try_from(
4734        value: ::std::string::String,
4735    ) -> ::std::result::Result<Self, self::error::ConversionError> {
4736        value.parse()
4737    }
4738}
4739#[doc = "`ContractCodeChangesByFinalityChangesType`"]
4740#[doc = r""]
4741#[doc = r" <details><summary>JSON schema</summary>"]
4742#[doc = r""]
4743#[doc = r" ```json"]
4744#[doc = "{"]
4745#[doc = "  \"type\": \"string\","]
4746#[doc = "  \"enum\": ["]
4747#[doc = "    \"contract_code_changes\""]
4748#[doc = "  ]"]
4749#[doc = "}"]
4750#[doc = r" ```"]
4751#[doc = r" </details>"]
4752#[derive(
4753    :: serde :: Deserialize,
4754    :: serde :: Serialize,
4755    Clone,
4756    Copy,
4757    Debug,
4758    Eq,
4759    Hash,
4760    Ord,
4761    PartialEq,
4762    PartialOrd,
4763)]
4764pub enum ContractCodeChangesByFinalityChangesType {
4765    #[serde(rename = "contract_code_changes")]
4766    ContractCodeChanges,
4767}
4768impl ::std::convert::From<&Self> for ContractCodeChangesByFinalityChangesType {
4769    fn from(value: &ContractCodeChangesByFinalityChangesType) -> Self {
4770        value.clone()
4771    }
4772}
4773impl ::std::fmt::Display for ContractCodeChangesByFinalityChangesType {
4774    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
4775        match *self {
4776            Self::ContractCodeChanges => f.write_str("contract_code_changes"),
4777        }
4778    }
4779}
4780impl ::std::str::FromStr for ContractCodeChangesByFinalityChangesType {
4781    type Err = self::error::ConversionError;
4782    fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
4783        match value {
4784            "contract_code_changes" => Ok(Self::ContractCodeChanges),
4785            _ => Err("invalid value".into()),
4786        }
4787    }
4788}
4789impl ::std::convert::TryFrom<&str> for ContractCodeChangesByFinalityChangesType {
4790    type Error = self::error::ConversionError;
4791    fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
4792        value.parse()
4793    }
4794}
4795impl ::std::convert::TryFrom<&::std::string::String> for ContractCodeChangesByFinalityChangesType {
4796    type Error = self::error::ConversionError;
4797    fn try_from(
4798        value: &::std::string::String,
4799    ) -> ::std::result::Result<Self, self::error::ConversionError> {
4800        value.parse()
4801    }
4802}
4803impl ::std::convert::TryFrom<::std::string::String> for ContractCodeChangesByFinalityChangesType {
4804    type Error = self::error::ConversionError;
4805    fn try_from(
4806        value: ::std::string::String,
4807    ) -> ::std::result::Result<Self, self::error::ConversionError> {
4808        value.parse()
4809    }
4810}
4811#[doc = "`ContractCodeChangesBySyncCheckpointChangesType`"]
4812#[doc = r""]
4813#[doc = r" <details><summary>JSON schema</summary>"]
4814#[doc = r""]
4815#[doc = r" ```json"]
4816#[doc = "{"]
4817#[doc = "  \"type\": \"string\","]
4818#[doc = "  \"enum\": ["]
4819#[doc = "    \"contract_code_changes\""]
4820#[doc = "  ]"]
4821#[doc = "}"]
4822#[doc = r" ```"]
4823#[doc = r" </details>"]
4824#[derive(
4825    :: serde :: Deserialize,
4826    :: serde :: Serialize,
4827    Clone,
4828    Copy,
4829    Debug,
4830    Eq,
4831    Hash,
4832    Ord,
4833    PartialEq,
4834    PartialOrd,
4835)]
4836pub enum ContractCodeChangesBySyncCheckpointChangesType {
4837    #[serde(rename = "contract_code_changes")]
4838    ContractCodeChanges,
4839}
4840impl ::std::convert::From<&Self> for ContractCodeChangesBySyncCheckpointChangesType {
4841    fn from(value: &ContractCodeChangesBySyncCheckpointChangesType) -> Self {
4842        value.clone()
4843    }
4844}
4845impl ::std::fmt::Display for ContractCodeChangesBySyncCheckpointChangesType {
4846    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
4847        match *self {
4848            Self::ContractCodeChanges => f.write_str("contract_code_changes"),
4849        }
4850    }
4851}
4852impl ::std::str::FromStr for ContractCodeChangesBySyncCheckpointChangesType {
4853    type Err = self::error::ConversionError;
4854    fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
4855        match value {
4856            "contract_code_changes" => Ok(Self::ContractCodeChanges),
4857            _ => Err("invalid value".into()),
4858        }
4859    }
4860}
4861impl ::std::convert::TryFrom<&str> for ContractCodeChangesBySyncCheckpointChangesType {
4862    type Error = self::error::ConversionError;
4863    fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
4864        value.parse()
4865    }
4866}
4867impl ::std::convert::TryFrom<&::std::string::String>
4868    for ContractCodeChangesBySyncCheckpointChangesType
4869{
4870    type Error = self::error::ConversionError;
4871    fn try_from(
4872        value: &::std::string::String,
4873    ) -> ::std::result::Result<Self, self::error::ConversionError> {
4874        value.parse()
4875    }
4876}
4877impl ::std::convert::TryFrom<::std::string::String>
4878    for ContractCodeChangesBySyncCheckpointChangesType
4879{
4880    type Error = self::error::ConversionError;
4881    fn try_from(
4882        value: ::std::string::String,
4883    ) -> ::std::result::Result<Self, self::error::ConversionError> {
4884        value.parse()
4885    }
4886}
4887#[doc = "A view of the contract code."]
4888#[doc = r""]
4889#[doc = r" <details><summary>JSON schema</summary>"]
4890#[doc = r""]
4891#[doc = r" ```json"]
4892#[doc = "{"]
4893#[doc = "  \"description\": \"A view of the contract code.\","]
4894#[doc = "  \"type\": \"object\","]
4895#[doc = "  \"required\": ["]
4896#[doc = "    \"code_base64\","]
4897#[doc = "    \"hash\""]
4898#[doc = "  ],"]
4899#[doc = "  \"properties\": {"]
4900#[doc = "    \"code_base64\": {"]
4901#[doc = "      \"type\": \"string\""]
4902#[doc = "    },"]
4903#[doc = "    \"hash\": {"]
4904#[doc = "      \"$ref\": \"#/components/schemas/CryptoHash\""]
4905#[doc = "    }"]
4906#[doc = "  }"]
4907#[doc = "}"]
4908#[doc = r" ```"]
4909#[doc = r" </details>"]
4910#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
4911pub struct ContractCodeView {
4912    pub code_base64: ::std::string::String,
4913    pub hash: CryptoHash,
4914}
4915impl ::std::convert::From<&ContractCodeView> for ContractCodeView {
4916    fn from(value: &ContractCodeView) -> Self {
4917        value.clone()
4918    }
4919}
4920#[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)."]
4921#[doc = r""]
4922#[doc = r" <details><summary>JSON schema</summary>"]
4923#[doc = r""]
4924#[doc = r" ```json"]
4925#[doc = "{"]
4926#[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).\","]
4927#[doc = "  \"type\": \"object\","]
4928#[doc = "  \"required\": ["]
4929#[doc = "    \"cost\","]
4930#[doc = "    \"cost_category\","]
4931#[doc = "    \"gas_used\""]
4932#[doc = "  ],"]
4933#[doc = "  \"properties\": {"]
4934#[doc = "    \"cost\": {"]
4935#[doc = "      \"type\": \"string\""]
4936#[doc = "    },"]
4937#[doc = "    \"cost_category\": {"]
4938#[doc = "      \"description\": \"Either ACTION_COST or WASM_HOST_COST.\","]
4939#[doc = "      \"type\": \"string\""]
4940#[doc = "    },"]
4941#[doc = "    \"gas_used\": {"]
4942#[doc = "      \"type\": \"string\""]
4943#[doc = "    }"]
4944#[doc = "  }"]
4945#[doc = "}"]
4946#[doc = r" ```"]
4947#[doc = r" </details>"]
4948#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
4949pub struct CostGasUsed {
4950    pub cost: ::std::string::String,
4951    #[doc = "Either ACTION_COST or WASM_HOST_COST."]
4952    pub cost_category: ::std::string::String,
4953    pub gas_used: ::std::string::String,
4954}
4955impl ::std::convert::From<&CostGasUsed> for CostGasUsed {
4956    fn from(value: &CostGasUsed) -> Self {
4957        value.clone()
4958    }
4959}
4960#[doc = "Create account action"]
4961#[doc = r""]
4962#[doc = r" <details><summary>JSON schema</summary>"]
4963#[doc = r""]
4964#[doc = r" ```json"]
4965#[doc = "{"]
4966#[doc = "  \"description\": \"Create account action\","]
4967#[doc = "  \"type\": \"object\""]
4968#[doc = "}"]
4969#[doc = r" ```"]
4970#[doc = r" </details>"]
4971#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
4972#[serde(transparent)]
4973pub struct CreateAccountAction(pub ::serde_json::Map<::std::string::String, ::serde_json::Value>);
4974impl ::std::ops::Deref for CreateAccountAction {
4975    type Target = ::serde_json::Map<::std::string::String, ::serde_json::Value>;
4976    fn deref(&self) -> &::serde_json::Map<::std::string::String, ::serde_json::Value> {
4977        &self.0
4978    }
4979}
4980impl ::std::convert::From<CreateAccountAction>
4981    for ::serde_json::Map<::std::string::String, ::serde_json::Value>
4982{
4983    fn from(value: CreateAccountAction) -> Self {
4984        value.0
4985    }
4986}
4987impl ::std::convert::From<&CreateAccountAction> for CreateAccountAction {
4988    fn from(value: &CreateAccountAction) -> Self {
4989        value.clone()
4990    }
4991}
4992impl ::std::convert::From<::serde_json::Map<::std::string::String, ::serde_json::Value>>
4993    for CreateAccountAction
4994{
4995    fn from(value: ::serde_json::Map<::std::string::String, ::serde_json::Value>) -> Self {
4996        Self(value)
4997    }
4998}
4999#[doc = "`CryptoHash`"]
5000#[doc = r""]
5001#[doc = r" <details><summary>JSON schema</summary>"]
5002#[doc = r""]
5003#[doc = r" ```json"]
5004#[doc = "{"]
5005#[doc = "  \"type\": \"string\""]
5006#[doc = "}"]
5007#[doc = r" ```"]
5008#[doc = r" </details>"]
5009#[derive(
5010    :: serde :: Deserialize,
5011    :: serde :: Serialize,
5012    Clone,
5013    Debug,
5014    Eq,
5015    Hash,
5016    Ord,
5017    PartialEq,
5018    PartialOrd,
5019)]
5020#[serde(transparent)]
5021pub struct CryptoHash(pub ::std::string::String);
5022impl ::std::ops::Deref for CryptoHash {
5023    type Target = ::std::string::String;
5024    fn deref(&self) -> &::std::string::String {
5025        &self.0
5026    }
5027}
5028impl ::std::convert::From<CryptoHash> for ::std::string::String {
5029    fn from(value: CryptoHash) -> Self {
5030        value.0
5031    }
5032}
5033impl ::std::convert::From<&CryptoHash> for CryptoHash {
5034    fn from(value: &CryptoHash) -> Self {
5035        value.clone()
5036    }
5037}
5038impl ::std::convert::From<::std::string::String> for CryptoHash {
5039    fn from(value: ::std::string::String) -> Self {
5040        Self(value)
5041    }
5042}
5043impl ::std::str::FromStr for CryptoHash {
5044    type Err = ::std::convert::Infallible;
5045    fn from_str(value: &str) -> ::std::result::Result<Self, Self::Err> {
5046        Ok(Self(value.to_string()))
5047    }
5048}
5049impl ::std::fmt::Display for CryptoHash {
5050    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
5051        self.0.fmt(f)
5052    }
5053}
5054#[doc = "Describes information about the current epoch validator"]
5055#[doc = r""]
5056#[doc = r" <details><summary>JSON schema</summary>"]
5057#[doc = r""]
5058#[doc = r" ```json"]
5059#[doc = "{"]
5060#[doc = "  \"description\": \"Describes information about the current epoch validator\","]
5061#[doc = "  \"type\": \"object\","]
5062#[doc = "  \"required\": ["]
5063#[doc = "    \"account_id\","]
5064#[doc = "    \"is_slashed\","]
5065#[doc = "    \"num_expected_blocks\","]
5066#[doc = "    \"num_produced_blocks\","]
5067#[doc = "    \"public_key\","]
5068#[doc = "    \"shards\","]
5069#[doc = "    \"stake\""]
5070#[doc = "  ],"]
5071#[doc = "  \"properties\": {"]
5072#[doc = "    \"account_id\": {"]
5073#[doc = "      \"$ref\": \"#/components/schemas/AccountId\""]
5074#[doc = "    },"]
5075#[doc = "    \"is_slashed\": {"]
5076#[doc = "      \"type\": \"boolean\""]
5077#[doc = "    },"]
5078#[doc = "    \"num_expected_blocks\": {"]
5079#[doc = "      \"type\": \"integer\","]
5080#[doc = "      \"format\": \"uint64\","]
5081#[doc = "      \"minimum\": 0.0"]
5082#[doc = "    },"]
5083#[doc = "    \"num_expected_chunks\": {"]
5084#[doc = "      \"default\": 0,"]
5085#[doc = "      \"type\": \"integer\","]
5086#[doc = "      \"format\": \"uint64\","]
5087#[doc = "      \"minimum\": 0.0"]
5088#[doc = "    },"]
5089#[doc = "    \"num_expected_chunks_per_shard\": {"]
5090#[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.\","]
5091#[doc = "      \"default\": [],"]
5092#[doc = "      \"type\": \"array\","]
5093#[doc = "      \"items\": {"]
5094#[doc = "        \"type\": \"integer\","]
5095#[doc = "        \"format\": \"uint64\","]
5096#[doc = "        \"minimum\": 0.0"]
5097#[doc = "      }"]
5098#[doc = "    },"]
5099#[doc = "    \"num_expected_endorsements\": {"]
5100#[doc = "      \"default\": 0,"]
5101#[doc = "      \"type\": \"integer\","]
5102#[doc = "      \"format\": \"uint64\","]
5103#[doc = "      \"minimum\": 0.0"]
5104#[doc = "    },"]
5105#[doc = "    \"num_expected_endorsements_per_shard\": {"]
5106#[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.\","]
5107#[doc = "      \"default\": [],"]
5108#[doc = "      \"type\": \"array\","]
5109#[doc = "      \"items\": {"]
5110#[doc = "        \"type\": \"integer\","]
5111#[doc = "        \"format\": \"uint64\","]
5112#[doc = "        \"minimum\": 0.0"]
5113#[doc = "      }"]
5114#[doc = "    },"]
5115#[doc = "    \"num_produced_blocks\": {"]
5116#[doc = "      \"type\": \"integer\","]
5117#[doc = "      \"format\": \"uint64\","]
5118#[doc = "      \"minimum\": 0.0"]
5119#[doc = "    },"]
5120#[doc = "    \"num_produced_chunks\": {"]
5121#[doc = "      \"default\": 0,"]
5122#[doc = "      \"type\": \"integer\","]
5123#[doc = "      \"format\": \"uint64\","]
5124#[doc = "      \"minimum\": 0.0"]
5125#[doc = "    },"]
5126#[doc = "    \"num_produced_chunks_per_shard\": {"]
5127#[doc = "      \"default\": [],"]
5128#[doc = "      \"type\": \"array\","]
5129#[doc = "      \"items\": {"]
5130#[doc = "        \"type\": \"integer\","]
5131#[doc = "        \"format\": \"uint64\","]
5132#[doc = "        \"minimum\": 0.0"]
5133#[doc = "      }"]
5134#[doc = "    },"]
5135#[doc = "    \"num_produced_endorsements\": {"]
5136#[doc = "      \"default\": 0,"]
5137#[doc = "      \"type\": \"integer\","]
5138#[doc = "      \"format\": \"uint64\","]
5139#[doc = "      \"minimum\": 0.0"]
5140#[doc = "    },"]
5141#[doc = "    \"num_produced_endorsements_per_shard\": {"]
5142#[doc = "      \"default\": [],"]
5143#[doc = "      \"type\": \"array\","]
5144#[doc = "      \"items\": {"]
5145#[doc = "        \"type\": \"integer\","]
5146#[doc = "        \"format\": \"uint64\","]
5147#[doc = "        \"minimum\": 0.0"]
5148#[doc = "      }"]
5149#[doc = "    },"]
5150#[doc = "    \"public_key\": {"]
5151#[doc = "      \"$ref\": \"#/components/schemas/PublicKey\""]
5152#[doc = "    },"]
5153#[doc = "    \"shards\": {"]
5154#[doc = "      \"description\": \"Shards this validator is assigned to as chunk producer in the current epoch.\","]
5155#[doc = "      \"type\": \"array\","]
5156#[doc = "      \"items\": {"]
5157#[doc = "        \"$ref\": \"#/components/schemas/ShardId\""]
5158#[doc = "      }"]
5159#[doc = "    },"]
5160#[doc = "    \"shards_endorsed\": {"]
5161#[doc = "      \"description\": \"Shards this validator is assigned to as chunk validator in the current epoch.\","]
5162#[doc = "      \"default\": [],"]
5163#[doc = "      \"type\": \"array\","]
5164#[doc = "      \"items\": {"]
5165#[doc = "        \"$ref\": \"#/components/schemas/ShardId\""]
5166#[doc = "      }"]
5167#[doc = "    },"]
5168#[doc = "    \"stake\": {"]
5169#[doc = "      \"$ref\": \"#/components/schemas/NearToken\""]
5170#[doc = "    }"]
5171#[doc = "  }"]
5172#[doc = "}"]
5173#[doc = r" ```"]
5174#[doc = r" </details>"]
5175#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
5176pub struct CurrentEpochValidatorInfo {
5177    pub account_id: AccountId,
5178    pub is_slashed: bool,
5179    pub num_expected_blocks: u64,
5180    #[serde(default)]
5181    pub num_expected_chunks: u64,
5182    #[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."]
5183    #[serde(default, skip_serializing_if = "::std::vec::Vec::is_empty")]
5184    pub num_expected_chunks_per_shard: ::std::vec::Vec<u64>,
5185    #[serde(default)]
5186    pub num_expected_endorsements: u64,
5187    #[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."]
5188    #[serde(default, skip_serializing_if = "::std::vec::Vec::is_empty")]
5189    pub num_expected_endorsements_per_shard: ::std::vec::Vec<u64>,
5190    pub num_produced_blocks: u64,
5191    #[serde(default)]
5192    pub num_produced_chunks: u64,
5193    #[serde(default, skip_serializing_if = "::std::vec::Vec::is_empty")]
5194    pub num_produced_chunks_per_shard: ::std::vec::Vec<u64>,
5195    #[serde(default)]
5196    pub num_produced_endorsements: u64,
5197    #[serde(default, skip_serializing_if = "::std::vec::Vec::is_empty")]
5198    pub num_produced_endorsements_per_shard: ::std::vec::Vec<u64>,
5199    pub public_key: PublicKey,
5200    #[doc = "Shards this validator is assigned to as chunk producer in the current epoch."]
5201    pub shards: ::std::vec::Vec<ShardId>,
5202    #[doc = "Shards this validator is assigned to as chunk validator in the current epoch."]
5203    #[serde(default, skip_serializing_if = "::std::vec::Vec::is_empty")]
5204    pub shards_endorsed: ::std::vec::Vec<ShardId>,
5205    pub stake: NearToken,
5206}
5207impl ::std::convert::From<&CurrentEpochValidatorInfo> for CurrentEpochValidatorInfo {
5208    fn from(value: &CurrentEpochValidatorInfo) -> Self {
5209        value.clone()
5210    }
5211}
5212#[doc = "`DataChangesByBlockIdChangesType`"]
5213#[doc = r""]
5214#[doc = r" <details><summary>JSON schema</summary>"]
5215#[doc = r""]
5216#[doc = r" ```json"]
5217#[doc = "{"]
5218#[doc = "  \"type\": \"string\","]
5219#[doc = "  \"enum\": ["]
5220#[doc = "    \"data_changes\""]
5221#[doc = "  ]"]
5222#[doc = "}"]
5223#[doc = r" ```"]
5224#[doc = r" </details>"]
5225#[derive(
5226    :: serde :: Deserialize,
5227    :: serde :: Serialize,
5228    Clone,
5229    Copy,
5230    Debug,
5231    Eq,
5232    Hash,
5233    Ord,
5234    PartialEq,
5235    PartialOrd,
5236)]
5237pub enum DataChangesByBlockIdChangesType {
5238    #[serde(rename = "data_changes")]
5239    DataChanges,
5240}
5241impl ::std::convert::From<&Self> for DataChangesByBlockIdChangesType {
5242    fn from(value: &DataChangesByBlockIdChangesType) -> Self {
5243        value.clone()
5244    }
5245}
5246impl ::std::fmt::Display for DataChangesByBlockIdChangesType {
5247    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
5248        match *self {
5249            Self::DataChanges => f.write_str("data_changes"),
5250        }
5251    }
5252}
5253impl ::std::str::FromStr for DataChangesByBlockIdChangesType {
5254    type Err = self::error::ConversionError;
5255    fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
5256        match value {
5257            "data_changes" => Ok(Self::DataChanges),
5258            _ => Err("invalid value".into()),
5259        }
5260    }
5261}
5262impl ::std::convert::TryFrom<&str> for DataChangesByBlockIdChangesType {
5263    type Error = self::error::ConversionError;
5264    fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
5265        value.parse()
5266    }
5267}
5268impl ::std::convert::TryFrom<&::std::string::String> for DataChangesByBlockIdChangesType {
5269    type Error = self::error::ConversionError;
5270    fn try_from(
5271        value: &::std::string::String,
5272    ) -> ::std::result::Result<Self, self::error::ConversionError> {
5273        value.parse()
5274    }
5275}
5276impl ::std::convert::TryFrom<::std::string::String> for DataChangesByBlockIdChangesType {
5277    type Error = self::error::ConversionError;
5278    fn try_from(
5279        value: ::std::string::String,
5280    ) -> ::std::result::Result<Self, self::error::ConversionError> {
5281        value.parse()
5282    }
5283}
5284#[doc = "`DataChangesByFinalityChangesType`"]
5285#[doc = r""]
5286#[doc = r" <details><summary>JSON schema</summary>"]
5287#[doc = r""]
5288#[doc = r" ```json"]
5289#[doc = "{"]
5290#[doc = "  \"type\": \"string\","]
5291#[doc = "  \"enum\": ["]
5292#[doc = "    \"data_changes\""]
5293#[doc = "  ]"]
5294#[doc = "}"]
5295#[doc = r" ```"]
5296#[doc = r" </details>"]
5297#[derive(
5298    :: serde :: Deserialize,
5299    :: serde :: Serialize,
5300    Clone,
5301    Copy,
5302    Debug,
5303    Eq,
5304    Hash,
5305    Ord,
5306    PartialEq,
5307    PartialOrd,
5308)]
5309pub enum DataChangesByFinalityChangesType {
5310    #[serde(rename = "data_changes")]
5311    DataChanges,
5312}
5313impl ::std::convert::From<&Self> for DataChangesByFinalityChangesType {
5314    fn from(value: &DataChangesByFinalityChangesType) -> Self {
5315        value.clone()
5316    }
5317}
5318impl ::std::fmt::Display for DataChangesByFinalityChangesType {
5319    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
5320        match *self {
5321            Self::DataChanges => f.write_str("data_changes"),
5322        }
5323    }
5324}
5325impl ::std::str::FromStr for DataChangesByFinalityChangesType {
5326    type Err = self::error::ConversionError;
5327    fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
5328        match value {
5329            "data_changes" => Ok(Self::DataChanges),
5330            _ => Err("invalid value".into()),
5331        }
5332    }
5333}
5334impl ::std::convert::TryFrom<&str> for DataChangesByFinalityChangesType {
5335    type Error = self::error::ConversionError;
5336    fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
5337        value.parse()
5338    }
5339}
5340impl ::std::convert::TryFrom<&::std::string::String> for DataChangesByFinalityChangesType {
5341    type Error = self::error::ConversionError;
5342    fn try_from(
5343        value: &::std::string::String,
5344    ) -> ::std::result::Result<Self, self::error::ConversionError> {
5345        value.parse()
5346    }
5347}
5348impl ::std::convert::TryFrom<::std::string::String> for DataChangesByFinalityChangesType {
5349    type Error = self::error::ConversionError;
5350    fn try_from(
5351        value: ::std::string::String,
5352    ) -> ::std::result::Result<Self, self::error::ConversionError> {
5353        value.parse()
5354    }
5355}
5356#[doc = "`DataChangesBySyncCheckpointChangesType`"]
5357#[doc = r""]
5358#[doc = r" <details><summary>JSON schema</summary>"]
5359#[doc = r""]
5360#[doc = r" ```json"]
5361#[doc = "{"]
5362#[doc = "  \"type\": \"string\","]
5363#[doc = "  \"enum\": ["]
5364#[doc = "    \"data_changes\""]
5365#[doc = "  ]"]
5366#[doc = "}"]
5367#[doc = r" ```"]
5368#[doc = r" </details>"]
5369#[derive(
5370    :: serde :: Deserialize,
5371    :: serde :: Serialize,
5372    Clone,
5373    Copy,
5374    Debug,
5375    Eq,
5376    Hash,
5377    Ord,
5378    PartialEq,
5379    PartialOrd,
5380)]
5381pub enum DataChangesBySyncCheckpointChangesType {
5382    #[serde(rename = "data_changes")]
5383    DataChanges,
5384}
5385impl ::std::convert::From<&Self> for DataChangesBySyncCheckpointChangesType {
5386    fn from(value: &DataChangesBySyncCheckpointChangesType) -> Self {
5387        value.clone()
5388    }
5389}
5390impl ::std::fmt::Display for DataChangesBySyncCheckpointChangesType {
5391    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
5392        match *self {
5393            Self::DataChanges => f.write_str("data_changes"),
5394        }
5395    }
5396}
5397impl ::std::str::FromStr for DataChangesBySyncCheckpointChangesType {
5398    type Err = self::error::ConversionError;
5399    fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
5400        match value {
5401            "data_changes" => Ok(Self::DataChanges),
5402            _ => Err("invalid value".into()),
5403        }
5404    }
5405}
5406impl ::std::convert::TryFrom<&str> for DataChangesBySyncCheckpointChangesType {
5407    type Error = self::error::ConversionError;
5408    fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
5409        value.parse()
5410    }
5411}
5412impl ::std::convert::TryFrom<&::std::string::String> for DataChangesBySyncCheckpointChangesType {
5413    type Error = self::error::ConversionError;
5414    fn try_from(
5415        value: &::std::string::String,
5416    ) -> ::std::result::Result<Self, self::error::ConversionError> {
5417        value.parse()
5418    }
5419}
5420impl ::std::convert::TryFrom<::std::string::String> for DataChangesBySyncCheckpointChangesType {
5421    type Error = self::error::ConversionError;
5422    fn try_from(
5423        value: ::std::string::String,
5424    ) -> ::std::result::Result<Self, self::error::ConversionError> {
5425        value.parse()
5426    }
5427}
5428#[doc = "The fees settings for a data receipt creation"]
5429#[doc = r""]
5430#[doc = r" <details><summary>JSON schema</summary>"]
5431#[doc = r""]
5432#[doc = r" ```json"]
5433#[doc = "{"]
5434#[doc = "  \"description\": \"The fees settings for a data receipt creation\","]
5435#[doc = "  \"type\": \"object\","]
5436#[doc = "  \"required\": ["]
5437#[doc = "    \"base_cost\","]
5438#[doc = "    \"cost_per_byte\""]
5439#[doc = "  ],"]
5440#[doc = "  \"properties\": {"]
5441#[doc = "    \"base_cost\": {"]
5442#[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).\","]
5443#[doc = "      \"allOf\": ["]
5444#[doc = "        {"]
5445#[doc = "          \"$ref\": \"#/components/schemas/Fee\""]
5446#[doc = "        }"]
5447#[doc = "      ]"]
5448#[doc = "    },"]
5449#[doc = "    \"cost_per_byte\": {"]
5450#[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`.\","]
5451#[doc = "      \"allOf\": ["]
5452#[doc = "        {"]
5453#[doc = "          \"$ref\": \"#/components/schemas/Fee\""]
5454#[doc = "        }"]
5455#[doc = "      ]"]
5456#[doc = "    }"]
5457#[doc = "  }"]
5458#[doc = "}"]
5459#[doc = r" ```"]
5460#[doc = r" </details>"]
5461#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
5462pub struct DataReceiptCreationConfigView {
5463    #[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)."]
5464    pub base_cost: Fee,
5465    #[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`."]
5466    pub cost_per_byte: Fee,
5467}
5468impl ::std::convert::From<&DataReceiptCreationConfigView> for DataReceiptCreationConfigView {
5469    fn from(value: &DataReceiptCreationConfigView) -> Self {
5470        value.clone()
5471    }
5472}
5473#[doc = "`DataReceiverView`"]
5474#[doc = r""]
5475#[doc = r" <details><summary>JSON schema</summary>"]
5476#[doc = r""]
5477#[doc = r" ```json"]
5478#[doc = "{"]
5479#[doc = "  \"type\": \"object\","]
5480#[doc = "  \"required\": ["]
5481#[doc = "    \"data_id\","]
5482#[doc = "    \"receiver_id\""]
5483#[doc = "  ],"]
5484#[doc = "  \"properties\": {"]
5485#[doc = "    \"data_id\": {"]
5486#[doc = "      \"$ref\": \"#/components/schemas/CryptoHash\""]
5487#[doc = "    },"]
5488#[doc = "    \"receiver_id\": {"]
5489#[doc = "      \"$ref\": \"#/components/schemas/AccountId\""]
5490#[doc = "    }"]
5491#[doc = "  }"]
5492#[doc = "}"]
5493#[doc = r" ```"]
5494#[doc = r" </details>"]
5495#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
5496pub struct DataReceiverView {
5497    pub data_id: CryptoHash,
5498    pub receiver_id: AccountId,
5499}
5500impl ::std::convert::From<&DataReceiverView> for DataReceiverView {
5501    fn from(value: &DataReceiverView) -> Self {
5502        value.clone()
5503    }
5504}
5505#[doc = "This action allows to execute the inner actions behalf of the defined sender."]
5506#[doc = r""]
5507#[doc = r" <details><summary>JSON schema</summary>"]
5508#[doc = r""]
5509#[doc = r" ```json"]
5510#[doc = "{"]
5511#[doc = "  \"description\": \"This action allows to execute the inner actions behalf of the defined sender.\","]
5512#[doc = "  \"type\": \"object\","]
5513#[doc = "  \"required\": ["]
5514#[doc = "    \"actions\","]
5515#[doc = "    \"max_block_height\","]
5516#[doc = "    \"nonce\","]
5517#[doc = "    \"public_key\","]
5518#[doc = "    \"receiver_id\","]
5519#[doc = "    \"sender_id\""]
5520#[doc = "  ],"]
5521#[doc = "  \"properties\": {"]
5522#[doc = "    \"actions\": {"]
5523#[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.\","]
5524#[doc = "      \"type\": \"array\","]
5525#[doc = "      \"items\": {"]
5526#[doc = "        \"$ref\": \"#/components/schemas/NonDelegateAction\""]
5527#[doc = "      }"]
5528#[doc = "    },"]
5529#[doc = "    \"max_block_height\": {"]
5530#[doc = "      \"description\": \"The maximal height of the block in the blockchain below which the given DelegateAction is valid.\","]
5531#[doc = "      \"type\": \"integer\","]
5532#[doc = "      \"format\": \"uint64\","]
5533#[doc = "      \"minimum\": 0.0"]
5534#[doc = "    },"]
5535#[doc = "    \"nonce\": {"]
5536#[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.\","]
5537#[doc = "      \"type\": \"integer\","]
5538#[doc = "      \"format\": \"uint64\","]
5539#[doc = "      \"minimum\": 0.0"]
5540#[doc = "    },"]
5541#[doc = "    \"public_key\": {"]
5542#[doc = "      \"description\": \"Public key used to sign this delegated action.\","]
5543#[doc = "      \"allOf\": ["]
5544#[doc = "        {"]
5545#[doc = "          \"$ref\": \"#/components/schemas/PublicKey\""]
5546#[doc = "        }"]
5547#[doc = "      ]"]
5548#[doc = "    },"]
5549#[doc = "    \"receiver_id\": {"]
5550#[doc = "      \"description\": \"Receiver of the delegated actions.\","]
5551#[doc = "      \"allOf\": ["]
5552#[doc = "        {"]
5553#[doc = "          \"$ref\": \"#/components/schemas/AccountId\""]
5554#[doc = "        }"]
5555#[doc = "      ]"]
5556#[doc = "    },"]
5557#[doc = "    \"sender_id\": {"]
5558#[doc = "      \"description\": \"Signer of the delegated actions\","]
5559#[doc = "      \"allOf\": ["]
5560#[doc = "        {"]
5561#[doc = "          \"$ref\": \"#/components/schemas/AccountId\""]
5562#[doc = "        }"]
5563#[doc = "      ]"]
5564#[doc = "    }"]
5565#[doc = "  }"]
5566#[doc = "}"]
5567#[doc = r" ```"]
5568#[doc = r" </details>"]
5569#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
5570pub struct DelegateAction {
5571    #[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."]
5572    pub actions: ::std::vec::Vec<NonDelegateAction>,
5573    #[doc = "The maximal height of the block in the blockchain below which the given DelegateAction is valid."]
5574    pub max_block_height: u64,
5575    #[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."]
5576    pub nonce: u64,
5577    #[doc = "Public key used to sign this delegated action."]
5578    pub public_key: PublicKey,
5579    #[doc = "Receiver of the delegated actions."]
5580    pub receiver_id: AccountId,
5581    #[doc = "Signer of the delegated actions"]
5582    pub sender_id: AccountId,
5583}
5584impl ::std::convert::From<&DelegateAction> for DelegateAction {
5585    fn from(value: &DelegateAction) -> Self {
5586        value.clone()
5587    }
5588}
5589#[doc = "`DeleteAccountAction`"]
5590#[doc = r""]
5591#[doc = r" <details><summary>JSON schema</summary>"]
5592#[doc = r""]
5593#[doc = r" ```json"]
5594#[doc = "{"]
5595#[doc = "  \"type\": \"object\","]
5596#[doc = "  \"required\": ["]
5597#[doc = "    \"beneficiary_id\""]
5598#[doc = "  ],"]
5599#[doc = "  \"properties\": {"]
5600#[doc = "    \"beneficiary_id\": {"]
5601#[doc = "      \"$ref\": \"#/components/schemas/AccountId\""]
5602#[doc = "    }"]
5603#[doc = "  }"]
5604#[doc = "}"]
5605#[doc = r" ```"]
5606#[doc = r" </details>"]
5607#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
5608pub struct DeleteAccountAction {
5609    pub beneficiary_id: AccountId,
5610}
5611impl ::std::convert::From<&DeleteAccountAction> for DeleteAccountAction {
5612    fn from(value: &DeleteAccountAction) -> Self {
5613        value.clone()
5614    }
5615}
5616#[doc = "`DeleteKeyAction`"]
5617#[doc = r""]
5618#[doc = r" <details><summary>JSON schema</summary>"]
5619#[doc = r""]
5620#[doc = r" ```json"]
5621#[doc = "{"]
5622#[doc = "  \"type\": \"object\","]
5623#[doc = "  \"required\": ["]
5624#[doc = "    \"public_key\""]
5625#[doc = "  ],"]
5626#[doc = "  \"properties\": {"]
5627#[doc = "    \"public_key\": {"]
5628#[doc = "      \"description\": \"A public key associated with the access_key to be deleted.\","]
5629#[doc = "      \"allOf\": ["]
5630#[doc = "        {"]
5631#[doc = "          \"$ref\": \"#/components/schemas/PublicKey\""]
5632#[doc = "        }"]
5633#[doc = "      ]"]
5634#[doc = "    }"]
5635#[doc = "  }"]
5636#[doc = "}"]
5637#[doc = r" ```"]
5638#[doc = r" </details>"]
5639#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
5640pub struct DeleteKeyAction {
5641    #[doc = "A public key associated with the access_key to be deleted."]
5642    pub public_key: PublicKey,
5643}
5644impl ::std::convert::From<&DeleteKeyAction> for DeleteKeyAction {
5645    fn from(value: &DeleteKeyAction) -> Self {
5646        value.clone()
5647    }
5648}
5649#[doc = "Deploy contract action"]
5650#[doc = r""]
5651#[doc = r" <details><summary>JSON schema</summary>"]
5652#[doc = r""]
5653#[doc = r" ```json"]
5654#[doc = "{"]
5655#[doc = "  \"description\": \"Deploy contract action\","]
5656#[doc = "  \"type\": \"object\","]
5657#[doc = "  \"required\": ["]
5658#[doc = "    \"code\""]
5659#[doc = "  ],"]
5660#[doc = "  \"properties\": {"]
5661#[doc = "    \"code\": {"]
5662#[doc = "      \"description\": \"WebAssembly binary\","]
5663#[doc = "      \"type\": \"string\""]
5664#[doc = "    }"]
5665#[doc = "  }"]
5666#[doc = "}"]
5667#[doc = r" ```"]
5668#[doc = r" </details>"]
5669#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
5670pub struct DeployContractAction {
5671    #[doc = "WebAssembly binary"]
5672    pub code: ::std::string::String,
5673}
5674impl ::std::convert::From<&DeployContractAction> for DeployContractAction {
5675    fn from(value: &DeployContractAction) -> Self {
5676        value.clone()
5677    }
5678}
5679#[doc = "Deploy global contract action"]
5680#[doc = r""]
5681#[doc = r" <details><summary>JSON schema</summary>"]
5682#[doc = r""]
5683#[doc = r" ```json"]
5684#[doc = "{"]
5685#[doc = "  \"description\": \"Deploy global contract action\","]
5686#[doc = "  \"type\": \"object\","]
5687#[doc = "  \"required\": ["]
5688#[doc = "    \"code\","]
5689#[doc = "    \"deploy_mode\""]
5690#[doc = "  ],"]
5691#[doc = "  \"properties\": {"]
5692#[doc = "    \"code\": {"]
5693#[doc = "      \"description\": \"WebAssembly binary\","]
5694#[doc = "      \"type\": \"string\""]
5695#[doc = "    },"]
5696#[doc = "    \"deploy_mode\": {"]
5697#[doc = "      \"$ref\": \"#/components/schemas/GlobalContractDeployMode\""]
5698#[doc = "    }"]
5699#[doc = "  }"]
5700#[doc = "}"]
5701#[doc = r" ```"]
5702#[doc = r" </details>"]
5703#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
5704pub struct DeployGlobalContractAction {
5705    #[doc = "WebAssembly binary"]
5706    pub code: ::std::string::String,
5707    pub deploy_mode: GlobalContractDeployMode,
5708}
5709impl ::std::convert::From<&DeployGlobalContractAction> for DeployGlobalContractAction {
5710    fn from(value: &DeployGlobalContractAction) -> Self {
5711        value.clone()
5712    }
5713}
5714#[doc = "`DetailedDebugStatus`"]
5715#[doc = r""]
5716#[doc = r" <details><summary>JSON schema</summary>"]
5717#[doc = r""]
5718#[doc = r" ```json"]
5719#[doc = "{"]
5720#[doc = "  \"type\": \"object\","]
5721#[doc = "  \"required\": ["]
5722#[doc = "    \"block_production_delay_millis\","]
5723#[doc = "    \"catchup_status\","]
5724#[doc = "    \"current_head_status\","]
5725#[doc = "    \"current_header_head_status\","]
5726#[doc = "    \"network_info\","]
5727#[doc = "    \"sync_status\""]
5728#[doc = "  ],"]
5729#[doc = "  \"properties\": {"]
5730#[doc = "    \"block_production_delay_millis\": {"]
5731#[doc = "      \"type\": \"integer\","]
5732#[doc = "      \"format\": \"uint64\","]
5733#[doc = "      \"minimum\": 0.0"]
5734#[doc = "    },"]
5735#[doc = "    \"catchup_status\": {"]
5736#[doc = "      \"type\": \"array\","]
5737#[doc = "      \"items\": {"]
5738#[doc = "        \"$ref\": \"#/components/schemas/CatchupStatusView\""]
5739#[doc = "      }"]
5740#[doc = "    },"]
5741#[doc = "    \"current_head_status\": {"]
5742#[doc = "      \"$ref\": \"#/components/schemas/BlockStatusView\""]
5743#[doc = "    },"]
5744#[doc = "    \"current_header_head_status\": {"]
5745#[doc = "      \"$ref\": \"#/components/schemas/BlockStatusView\""]
5746#[doc = "    },"]
5747#[doc = "    \"network_info\": {"]
5748#[doc = "      \"$ref\": \"#/components/schemas/NetworkInfoView\""]
5749#[doc = "    },"]
5750#[doc = "    \"sync_status\": {"]
5751#[doc = "      \"type\": \"string\""]
5752#[doc = "    }"]
5753#[doc = "  }"]
5754#[doc = "}"]
5755#[doc = r" ```"]
5756#[doc = r" </details>"]
5757#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
5758pub struct DetailedDebugStatus {
5759    pub block_production_delay_millis: u64,
5760    pub catchup_status: ::std::vec::Vec<CatchupStatusView>,
5761    pub current_head_status: BlockStatusView,
5762    pub current_header_head_status: BlockStatusView,
5763    pub network_info: NetworkInfoView,
5764    pub sync_status: ::std::string::String,
5765}
5766impl ::std::convert::From<&DetailedDebugStatus> for DetailedDebugStatus {
5767    fn from(value: &DetailedDebugStatus) -> Self {
5768        value.clone()
5769    }
5770}
5771#[doc = "`DeterministicAccountStateInit`"]
5772#[doc = r""]
5773#[doc = r" <details><summary>JSON schema</summary>"]
5774#[doc = r""]
5775#[doc = r" ```json"]
5776#[doc = "{"]
5777#[doc = "  \"oneOf\": ["]
5778#[doc = "    {"]
5779#[doc = "      \"type\": \"object\","]
5780#[doc = "      \"required\": ["]
5781#[doc = "        \"V1\""]
5782#[doc = "      ],"]
5783#[doc = "      \"properties\": {"]
5784#[doc = "        \"V1\": {"]
5785#[doc = "          \"$ref\": \"#/components/schemas/DeterministicAccountStateInitV1\""]
5786#[doc = "        }"]
5787#[doc = "      },"]
5788#[doc = "      \"additionalProperties\": false"]
5789#[doc = "    }"]
5790#[doc = "  ]"]
5791#[doc = "}"]
5792#[doc = r" ```"]
5793#[doc = r" </details>"]
5794#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
5795pub enum DeterministicAccountStateInit {
5796    V1(DeterministicAccountStateInitV1),
5797}
5798impl ::std::convert::From<&Self> for DeterministicAccountStateInit {
5799    fn from(value: &DeterministicAccountStateInit) -> Self {
5800        value.clone()
5801    }
5802}
5803impl ::std::convert::From<DeterministicAccountStateInitV1> for DeterministicAccountStateInit {
5804    fn from(value: DeterministicAccountStateInitV1) -> Self {
5805        Self::V1(value)
5806    }
5807}
5808#[doc = "`DeterministicAccountStateInitV1`"]
5809#[doc = r""]
5810#[doc = r" <details><summary>JSON schema</summary>"]
5811#[doc = r""]
5812#[doc = r" ```json"]
5813#[doc = "{"]
5814#[doc = "  \"type\": \"object\","]
5815#[doc = "  \"required\": ["]
5816#[doc = "    \"code\","]
5817#[doc = "    \"data\""]
5818#[doc = "  ],"]
5819#[doc = "  \"properties\": {"]
5820#[doc = "    \"code\": {"]
5821#[doc = "      \"$ref\": \"#/components/schemas/GlobalContractIdentifier\""]
5822#[doc = "    },"]
5823#[doc = "    \"data\": {"]
5824#[doc = "      \"type\": \"object\","]
5825#[doc = "      \"additionalProperties\": {"]
5826#[doc = "        \"type\": \"string\""]
5827#[doc = "      }"]
5828#[doc = "    }"]
5829#[doc = "  }"]
5830#[doc = "}"]
5831#[doc = r" ```"]
5832#[doc = r" </details>"]
5833#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
5834pub struct DeterministicAccountStateInitV1 {
5835    pub code: GlobalContractIdentifier,
5836    pub data: ::std::collections::HashMap<::std::string::String, ::std::string::String>,
5837}
5838impl ::std::convert::From<&DeterministicAccountStateInitV1> for DeterministicAccountStateInitV1 {
5839    fn from(value: &DeterministicAccountStateInitV1) -> Self {
5840        value.clone()
5841    }
5842}
5843#[doc = "`DeterministicStateInitAction`"]
5844#[doc = r""]
5845#[doc = r" <details><summary>JSON schema</summary>"]
5846#[doc = r""]
5847#[doc = r" ```json"]
5848#[doc = "{"]
5849#[doc = "  \"type\": \"object\","]
5850#[doc = "  \"required\": ["]
5851#[doc = "    \"deposit\","]
5852#[doc = "    \"state_init\""]
5853#[doc = "  ],"]
5854#[doc = "  \"properties\": {"]
5855#[doc = "    \"deposit\": {"]
5856#[doc = "      \"$ref\": \"#/components/schemas/NearToken\""]
5857#[doc = "    },"]
5858#[doc = "    \"state_init\": {"]
5859#[doc = "      \"$ref\": \"#/components/schemas/DeterministicAccountStateInit\""]
5860#[doc = "    }"]
5861#[doc = "  }"]
5862#[doc = "}"]
5863#[doc = r" ```"]
5864#[doc = r" </details>"]
5865#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
5866pub struct DeterministicStateInitAction {
5867    pub deposit: NearToken,
5868    pub state_init: DeterministicAccountStateInit,
5869}
5870impl ::std::convert::From<&DeterministicStateInitAction> for DeterministicStateInitAction {
5871    fn from(value: &DeterministicStateInitAction) -> Self {
5872        value.clone()
5873    }
5874}
5875#[doc = "`Direction`"]
5876#[doc = r""]
5877#[doc = r" <details><summary>JSON schema</summary>"]
5878#[doc = r""]
5879#[doc = r" ```json"]
5880#[doc = "{"]
5881#[doc = "  \"type\": \"string\","]
5882#[doc = "  \"enum\": ["]
5883#[doc = "    \"Left\","]
5884#[doc = "    \"Right\""]
5885#[doc = "  ]"]
5886#[doc = "}"]
5887#[doc = r" ```"]
5888#[doc = r" </details>"]
5889#[derive(
5890    :: serde :: Deserialize,
5891    :: serde :: Serialize,
5892    Clone,
5893    Copy,
5894    Debug,
5895    Eq,
5896    Hash,
5897    Ord,
5898    PartialEq,
5899    PartialOrd,
5900)]
5901pub enum Direction {
5902    Left,
5903    Right,
5904}
5905impl ::std::convert::From<&Self> for Direction {
5906    fn from(value: &Direction) -> Self {
5907        value.clone()
5908    }
5909}
5910impl ::std::fmt::Display for Direction {
5911    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
5912        match *self {
5913            Self::Left => f.write_str("Left"),
5914            Self::Right => f.write_str("Right"),
5915        }
5916    }
5917}
5918impl ::std::str::FromStr for Direction {
5919    type Err = self::error::ConversionError;
5920    fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
5921        match value {
5922            "Left" => Ok(Self::Left),
5923            "Right" => Ok(Self::Right),
5924            _ => Err("invalid value".into()),
5925        }
5926    }
5927}
5928impl ::std::convert::TryFrom<&str> for Direction {
5929    type Error = self::error::ConversionError;
5930    fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
5931        value.parse()
5932    }
5933}
5934impl ::std::convert::TryFrom<&::std::string::String> for Direction {
5935    type Error = self::error::ConversionError;
5936    fn try_from(
5937        value: &::std::string::String,
5938    ) -> ::std::result::Result<Self, self::error::ConversionError> {
5939        value.parse()
5940    }
5941}
5942impl ::std::convert::TryFrom<::std::string::String> for Direction {
5943    type Error = self::error::ConversionError;
5944    fn try_from(
5945        value: ::std::string::String,
5946    ) -> ::std::result::Result<Self, self::error::ConversionError> {
5947        value.parse()
5948    }
5949}
5950#[doc = "Configures how to dump state to external storage."]
5951#[doc = r""]
5952#[doc = r" <details><summary>JSON schema</summary>"]
5953#[doc = r""]
5954#[doc = r" ```json"]
5955#[doc = "{"]
5956#[doc = "  \"description\": \"Configures how to dump state to external storage.\","]
5957#[doc = "  \"type\": \"object\","]
5958#[doc = "  \"required\": ["]
5959#[doc = "    \"location\""]
5960#[doc = "  ],"]
5961#[doc = "  \"properties\": {"]
5962#[doc = "    \"credentials_file\": {"]
5963#[doc = "      \"description\": \"Location of a json file with credentials allowing access to the bucket.\","]
5964#[doc = "      \"type\": ["]
5965#[doc = "        \"string\","]
5966#[doc = "        \"null\""]
5967#[doc = "      ]"]
5968#[doc = "    },"]
5969#[doc = "    \"iteration_delay\": {"]
5970#[doc = "      \"description\": \"How often to check if a new epoch has started.\\nFeel free to set to `None`, defaults are sensible.\","]
5971#[doc = "      \"anyOf\": ["]
5972#[doc = "        {"]
5973#[doc = "          \"$ref\": \"#/components/schemas/DurationAsStdSchemaProvider\""]
5974#[doc = "        },"]
5975#[doc = "        {"]
5976#[doc = "          \"type\": \"null\""]
5977#[doc = "        }"]
5978#[doc = "      ]"]
5979#[doc = "    },"]
5980#[doc = "    \"location\": {"]
5981#[doc = "      \"description\": \"Specifies where to write the obtained state parts.\","]
5982#[doc = "      \"allOf\": ["]
5983#[doc = "        {"]
5984#[doc = "          \"$ref\": \"#/components/schemas/ExternalStorageLocation\""]
5985#[doc = "        }"]
5986#[doc = "      ]"]
5987#[doc = "    },"]
5988#[doc = "    \"restart_dump_for_shards\": {"]
5989#[doc = "      \"description\": \"Use in case a node that dumps state to the external storage\\ngets in trouble.\","]
5990#[doc = "      \"type\": ["]
5991#[doc = "        \"array\","]
5992#[doc = "        \"null\""]
5993#[doc = "      ],"]
5994#[doc = "      \"items\": {"]
5995#[doc = "        \"$ref\": \"#/components/schemas/ShardId\""]
5996#[doc = "      }"]
5997#[doc = "    }"]
5998#[doc = "  }"]
5999#[doc = "}"]
6000#[doc = r" ```"]
6001#[doc = r" </details>"]
6002#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
6003pub struct DumpConfig {
6004    #[doc = "Location of a json file with credentials allowing access to the bucket."]
6005    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
6006    pub credentials_file: ::std::option::Option<::std::string::String>,
6007    #[doc = "How often to check if a new epoch has started.\nFeel free to set to `None`, defaults are sensible."]
6008    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
6009    pub iteration_delay: ::std::option::Option<DurationAsStdSchemaProvider>,
6010    #[doc = "Specifies where to write the obtained state parts."]
6011    pub location: ExternalStorageLocation,
6012    #[doc = "Use in case a node that dumps state to the external storage\ngets in trouble."]
6013    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
6014    pub restart_dump_for_shards: ::std::option::Option<::std::vec::Vec<ShardId>>,
6015}
6016impl ::std::convert::From<&DumpConfig> for DumpConfig {
6017    fn from(value: &DumpConfig) -> Self {
6018        value.clone()
6019    }
6020}
6021#[doc = "`DurationAsStdSchemaProvider`"]
6022#[doc = r""]
6023#[doc = r" <details><summary>JSON schema</summary>"]
6024#[doc = r""]
6025#[doc = r" ```json"]
6026#[doc = "{"]
6027#[doc = "  \"type\": \"object\","]
6028#[doc = "  \"required\": ["]
6029#[doc = "    \"nanos\","]
6030#[doc = "    \"secs\""]
6031#[doc = "  ],"]
6032#[doc = "  \"properties\": {"]
6033#[doc = "    \"nanos\": {"]
6034#[doc = "      \"type\": \"integer\","]
6035#[doc = "      \"format\": \"int32\""]
6036#[doc = "    },"]
6037#[doc = "    \"secs\": {"]
6038#[doc = "      \"type\": \"integer\","]
6039#[doc = "      \"format\": \"int64\""]
6040#[doc = "    }"]
6041#[doc = "  }"]
6042#[doc = "}"]
6043#[doc = r" ```"]
6044#[doc = r" </details>"]
6045#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
6046pub struct DurationAsStdSchemaProvider {
6047    pub nanos: i32,
6048    pub secs: i64,
6049}
6050impl ::std::convert::From<&DurationAsStdSchemaProvider> for DurationAsStdSchemaProvider {
6051    fn from(value: &DurationAsStdSchemaProvider) -> Self {
6052        value.clone()
6053    }
6054}
6055#[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"]
6056#[doc = r""]
6057#[doc = r" <details><summary>JSON schema</summary>"]
6058#[doc = r""]
6059#[doc = r" ```json"]
6060#[doc = "{"]
6061#[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\","]
6062#[doc = "  \"allOf\": ["]
6063#[doc = "    {"]
6064#[doc = "      \"$ref\": \"#/components/schemas/CryptoHash\""]
6065#[doc = "    }"]
6066#[doc = "  ]"]
6067#[doc = "}"]
6068#[doc = r" ```"]
6069#[doc = r" </details>"]
6070#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
6071#[serde(transparent)]
6072pub struct EpochId(pub CryptoHash);
6073impl ::std::ops::Deref for EpochId {
6074    type Target = CryptoHash;
6075    fn deref(&self) -> &CryptoHash {
6076        &self.0
6077    }
6078}
6079impl ::std::convert::From<EpochId> for CryptoHash {
6080    fn from(value: EpochId) -> Self {
6081        value.0
6082    }
6083}
6084impl ::std::convert::From<&EpochId> for EpochId {
6085    fn from(value: &EpochId) -> Self {
6086        value.clone()
6087    }
6088}
6089impl ::std::convert::From<CryptoHash> for EpochId {
6090    fn from(value: CryptoHash) -> Self {
6091        Self(value)
6092    }
6093}
6094impl ::std::str::FromStr for EpochId {
6095    type Err = <CryptoHash as ::std::str::FromStr>::Err;
6096    fn from_str(value: &str) -> ::std::result::Result<Self, Self::Err> {
6097        Ok(Self(value.parse()?))
6098    }
6099}
6100impl ::std::convert::TryFrom<&str> for EpochId {
6101    type Error = <CryptoHash as ::std::str::FromStr>::Err;
6102    fn try_from(value: &str) -> ::std::result::Result<Self, Self::Error> {
6103        value.parse()
6104    }
6105}
6106impl ::std::convert::TryFrom<&String> for EpochId {
6107    type Error = <CryptoHash as ::std::str::FromStr>::Err;
6108    fn try_from(value: &String) -> ::std::result::Result<Self, Self::Error> {
6109        value.parse()
6110    }
6111}
6112impl ::std::convert::TryFrom<String> for EpochId {
6113    type Error = <CryptoHash as ::std::str::FromStr>::Err;
6114    fn try_from(value: String) -> ::std::result::Result<Self, Self::Error> {
6115        value.parse()
6116    }
6117}
6118impl ::std::fmt::Display for EpochId {
6119    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
6120        self.0.fmt(f)
6121    }
6122}
6123#[doc = "`EpochSyncConfig`"]
6124#[doc = r""]
6125#[doc = r" <details><summary>JSON schema</summary>"]
6126#[doc = r""]
6127#[doc = r" ```json"]
6128#[doc = "{"]
6129#[doc = "  \"type\": \"object\","]
6130#[doc = "  \"required\": ["]
6131#[doc = "    \"epoch_sync_horizon\","]
6132#[doc = "    \"timeout_for_epoch_sync\""]
6133#[doc = "  ],"]
6134#[doc = "  \"properties\": {"]
6135#[doc = "    \"disable_epoch_sync_for_bootstrapping\": {"]
6136#[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.\","]
6137#[doc = "      \"default\": false,"]
6138#[doc = "      \"type\": \"boolean\""]
6139#[doc = "    },"]
6140#[doc = "    \"epoch_sync_horizon\": {"]
6141#[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.\","]
6142#[doc = "      \"type\": \"integer\","]
6143#[doc = "      \"format\": \"uint64\","]
6144#[doc = "      \"minimum\": 0.0"]
6145#[doc = "    },"]
6146#[doc = "    \"ignore_epoch_sync_network_requests\": {"]
6147#[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.\","]
6148#[doc = "      \"default\": false,"]
6149#[doc = "      \"type\": \"boolean\""]
6150#[doc = "    },"]
6151#[doc = "    \"timeout_for_epoch_sync\": {"]
6152#[doc = "      \"description\": \"Timeout for epoch sync requests. The node will continue retrying indefinitely even\\nif this timeout is exceeded.\","]
6153#[doc = "      \"allOf\": ["]
6154#[doc = "        {"]
6155#[doc = "          \"$ref\": \"#/components/schemas/DurationAsStdSchemaProvider\""]
6156#[doc = "        }"]
6157#[doc = "      ]"]
6158#[doc = "    }"]
6159#[doc = "  }"]
6160#[doc = "}"]
6161#[doc = r" ```"]
6162#[doc = r" </details>"]
6163#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
6164pub struct EpochSyncConfig {
6165    #[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."]
6166    #[serde(default)]
6167    pub disable_epoch_sync_for_bootstrapping: bool,
6168    #[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."]
6169    pub epoch_sync_horizon: u64,
6170    #[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."]
6171    #[serde(default)]
6172    pub ignore_epoch_sync_network_requests: bool,
6173    #[doc = "Timeout for epoch sync requests. The node will continue retrying indefinitely even\nif this timeout is exceeded."]
6174    pub timeout_for_epoch_sync: DurationAsStdSchemaProvider,
6175}
6176impl ::std::convert::From<&EpochSyncConfig> for EpochSyncConfig {
6177    fn from(value: &EpochSyncConfig) -> Self {
6178        value.clone()
6179    }
6180}
6181#[doc = "`ErrorWrapperForGenesisConfigError`"]
6182#[doc = r""]
6183#[doc = r" <details><summary>JSON schema</summary>"]
6184#[doc = r""]
6185#[doc = r" ```json"]
6186#[doc = "{"]
6187#[doc = "  \"oneOf\": ["]
6188#[doc = "    {"]
6189#[doc = "      \"type\": \"object\","]
6190#[doc = "      \"required\": ["]
6191#[doc = "        \"cause\","]
6192#[doc = "        \"name\""]
6193#[doc = "      ],"]
6194#[doc = "      \"properties\": {"]
6195#[doc = "        \"cause\": {"]
6196#[doc = "          \"$ref\": \"#/components/schemas/RpcRequestValidationErrorKind\""]
6197#[doc = "        },"]
6198#[doc = "        \"name\": {"]
6199#[doc = "          \"type\": \"string\","]
6200#[doc = "          \"enum\": ["]
6201#[doc = "            \"REQUEST_VALIDATION_ERROR\""]
6202#[doc = "          ]"]
6203#[doc = "        }"]
6204#[doc = "      }"]
6205#[doc = "    },"]
6206#[doc = "    {"]
6207#[doc = "      \"type\": \"object\","]
6208#[doc = "      \"required\": ["]
6209#[doc = "        \"cause\","]
6210#[doc = "        \"name\""]
6211#[doc = "      ],"]
6212#[doc = "      \"properties\": {"]
6213#[doc = "        \"cause\": {"]
6214#[doc = "          \"$ref\": \"#/components/schemas/GenesisConfigError\""]
6215#[doc = "        },"]
6216#[doc = "        \"name\": {"]
6217#[doc = "          \"type\": \"string\","]
6218#[doc = "          \"enum\": ["]
6219#[doc = "            \"HANDLER_ERROR\""]
6220#[doc = "          ]"]
6221#[doc = "        }"]
6222#[doc = "      }"]
6223#[doc = "    },"]
6224#[doc = "    {"]
6225#[doc = "      \"type\": \"object\","]
6226#[doc = "      \"required\": ["]
6227#[doc = "        \"cause\","]
6228#[doc = "        \"name\""]
6229#[doc = "      ],"]
6230#[doc = "      \"properties\": {"]
6231#[doc = "        \"cause\": {"]
6232#[doc = "          \"$ref\": \"#/components/schemas/InternalError\""]
6233#[doc = "        },"]
6234#[doc = "        \"name\": {"]
6235#[doc = "          \"type\": \"string\","]
6236#[doc = "          \"enum\": ["]
6237#[doc = "            \"INTERNAL_ERROR\""]
6238#[doc = "          ]"]
6239#[doc = "        }"]
6240#[doc = "      }"]
6241#[doc = "    }"]
6242#[doc = "  ]"]
6243#[doc = "}"]
6244#[doc = r" ```"]
6245#[doc = r" </details>"]
6246#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
6247#[serde(tag = "name", content = "cause")]
6248pub enum ErrorWrapperForGenesisConfigError {
6249    #[serde(rename = "REQUEST_VALIDATION_ERROR")]
6250    RequestValidationError(RpcRequestValidationErrorKind),
6251    #[serde(rename = "HANDLER_ERROR")]
6252    HandlerError(GenesisConfigError),
6253    #[serde(rename = "INTERNAL_ERROR")]
6254    InternalError(InternalError),
6255}
6256impl ::std::convert::From<&Self> for ErrorWrapperForGenesisConfigError {
6257    fn from(value: &ErrorWrapperForGenesisConfigError) -> Self {
6258        value.clone()
6259    }
6260}
6261impl ::std::convert::From<RpcRequestValidationErrorKind> for ErrorWrapperForGenesisConfigError {
6262    fn from(value: RpcRequestValidationErrorKind) -> Self {
6263        Self::RequestValidationError(value)
6264    }
6265}
6266impl ::std::convert::From<GenesisConfigError> for ErrorWrapperForGenesisConfigError {
6267    fn from(value: GenesisConfigError) -> Self {
6268        Self::HandlerError(value)
6269    }
6270}
6271impl ::std::convert::From<InternalError> for ErrorWrapperForGenesisConfigError {
6272    fn from(value: InternalError) -> Self {
6273        Self::InternalError(value)
6274    }
6275}
6276#[doc = "`ErrorWrapperForRpcBlockError`"]
6277#[doc = r""]
6278#[doc = r" <details><summary>JSON schema</summary>"]
6279#[doc = r""]
6280#[doc = r" ```json"]
6281#[doc = "{"]
6282#[doc = "  \"oneOf\": ["]
6283#[doc = "    {"]
6284#[doc = "      \"type\": \"object\","]
6285#[doc = "      \"required\": ["]
6286#[doc = "        \"cause\","]
6287#[doc = "        \"name\""]
6288#[doc = "      ],"]
6289#[doc = "      \"properties\": {"]
6290#[doc = "        \"cause\": {"]
6291#[doc = "          \"$ref\": \"#/components/schemas/RpcRequestValidationErrorKind\""]
6292#[doc = "        },"]
6293#[doc = "        \"name\": {"]
6294#[doc = "          \"type\": \"string\","]
6295#[doc = "          \"enum\": ["]
6296#[doc = "            \"REQUEST_VALIDATION_ERROR\""]
6297#[doc = "          ]"]
6298#[doc = "        }"]
6299#[doc = "      }"]
6300#[doc = "    },"]
6301#[doc = "    {"]
6302#[doc = "      \"type\": \"object\","]
6303#[doc = "      \"required\": ["]
6304#[doc = "        \"cause\","]
6305#[doc = "        \"name\""]
6306#[doc = "      ],"]
6307#[doc = "      \"properties\": {"]
6308#[doc = "        \"cause\": {"]
6309#[doc = "          \"$ref\": \"#/components/schemas/RpcBlockError\""]
6310#[doc = "        },"]
6311#[doc = "        \"name\": {"]
6312#[doc = "          \"type\": \"string\","]
6313#[doc = "          \"enum\": ["]
6314#[doc = "            \"HANDLER_ERROR\""]
6315#[doc = "          ]"]
6316#[doc = "        }"]
6317#[doc = "      }"]
6318#[doc = "    },"]
6319#[doc = "    {"]
6320#[doc = "      \"type\": \"object\","]
6321#[doc = "      \"required\": ["]
6322#[doc = "        \"cause\","]
6323#[doc = "        \"name\""]
6324#[doc = "      ],"]
6325#[doc = "      \"properties\": {"]
6326#[doc = "        \"cause\": {"]
6327#[doc = "          \"$ref\": \"#/components/schemas/InternalError\""]
6328#[doc = "        },"]
6329#[doc = "        \"name\": {"]
6330#[doc = "          \"type\": \"string\","]
6331#[doc = "          \"enum\": ["]
6332#[doc = "            \"INTERNAL_ERROR\""]
6333#[doc = "          ]"]
6334#[doc = "        }"]
6335#[doc = "      }"]
6336#[doc = "    }"]
6337#[doc = "  ]"]
6338#[doc = "}"]
6339#[doc = r" ```"]
6340#[doc = r" </details>"]
6341#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
6342#[serde(tag = "name", content = "cause")]
6343pub enum ErrorWrapperForRpcBlockError {
6344    #[serde(rename = "REQUEST_VALIDATION_ERROR")]
6345    RequestValidationError(RpcRequestValidationErrorKind),
6346    #[serde(rename = "HANDLER_ERROR")]
6347    HandlerError(RpcBlockError),
6348    #[serde(rename = "INTERNAL_ERROR")]
6349    InternalError(InternalError),
6350}
6351impl ::std::convert::From<&Self> for ErrorWrapperForRpcBlockError {
6352    fn from(value: &ErrorWrapperForRpcBlockError) -> Self {
6353        value.clone()
6354    }
6355}
6356impl ::std::convert::From<RpcRequestValidationErrorKind> for ErrorWrapperForRpcBlockError {
6357    fn from(value: RpcRequestValidationErrorKind) -> Self {
6358        Self::RequestValidationError(value)
6359    }
6360}
6361impl ::std::convert::From<RpcBlockError> for ErrorWrapperForRpcBlockError {
6362    fn from(value: RpcBlockError) -> Self {
6363        Self::HandlerError(value)
6364    }
6365}
6366impl ::std::convert::From<InternalError> for ErrorWrapperForRpcBlockError {
6367    fn from(value: InternalError) -> Self {
6368        Self::InternalError(value)
6369    }
6370}
6371#[doc = "`ErrorWrapperForRpcChunkError`"]
6372#[doc = r""]
6373#[doc = r" <details><summary>JSON schema</summary>"]
6374#[doc = r""]
6375#[doc = r" ```json"]
6376#[doc = "{"]
6377#[doc = "  \"oneOf\": ["]
6378#[doc = "    {"]
6379#[doc = "      \"type\": \"object\","]
6380#[doc = "      \"required\": ["]
6381#[doc = "        \"cause\","]
6382#[doc = "        \"name\""]
6383#[doc = "      ],"]
6384#[doc = "      \"properties\": {"]
6385#[doc = "        \"cause\": {"]
6386#[doc = "          \"$ref\": \"#/components/schemas/RpcRequestValidationErrorKind\""]
6387#[doc = "        },"]
6388#[doc = "        \"name\": {"]
6389#[doc = "          \"type\": \"string\","]
6390#[doc = "          \"enum\": ["]
6391#[doc = "            \"REQUEST_VALIDATION_ERROR\""]
6392#[doc = "          ]"]
6393#[doc = "        }"]
6394#[doc = "      }"]
6395#[doc = "    },"]
6396#[doc = "    {"]
6397#[doc = "      \"type\": \"object\","]
6398#[doc = "      \"required\": ["]
6399#[doc = "        \"cause\","]
6400#[doc = "        \"name\""]
6401#[doc = "      ],"]
6402#[doc = "      \"properties\": {"]
6403#[doc = "        \"cause\": {"]
6404#[doc = "          \"$ref\": \"#/components/schemas/RpcChunkError\""]
6405#[doc = "        },"]
6406#[doc = "        \"name\": {"]
6407#[doc = "          \"type\": \"string\","]
6408#[doc = "          \"enum\": ["]
6409#[doc = "            \"HANDLER_ERROR\""]
6410#[doc = "          ]"]
6411#[doc = "        }"]
6412#[doc = "      }"]
6413#[doc = "    },"]
6414#[doc = "    {"]
6415#[doc = "      \"type\": \"object\","]
6416#[doc = "      \"required\": ["]
6417#[doc = "        \"cause\","]
6418#[doc = "        \"name\""]
6419#[doc = "      ],"]
6420#[doc = "      \"properties\": {"]
6421#[doc = "        \"cause\": {"]
6422#[doc = "          \"$ref\": \"#/components/schemas/InternalError\""]
6423#[doc = "        },"]
6424#[doc = "        \"name\": {"]
6425#[doc = "          \"type\": \"string\","]
6426#[doc = "          \"enum\": ["]
6427#[doc = "            \"INTERNAL_ERROR\""]
6428#[doc = "          ]"]
6429#[doc = "        }"]
6430#[doc = "      }"]
6431#[doc = "    }"]
6432#[doc = "  ]"]
6433#[doc = "}"]
6434#[doc = r" ```"]
6435#[doc = r" </details>"]
6436#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
6437#[serde(tag = "name", content = "cause")]
6438pub enum ErrorWrapperForRpcChunkError {
6439    #[serde(rename = "REQUEST_VALIDATION_ERROR")]
6440    RequestValidationError(RpcRequestValidationErrorKind),
6441    #[serde(rename = "HANDLER_ERROR")]
6442    HandlerError(RpcChunkError),
6443    #[serde(rename = "INTERNAL_ERROR")]
6444    InternalError(InternalError),
6445}
6446impl ::std::convert::From<&Self> for ErrorWrapperForRpcChunkError {
6447    fn from(value: &ErrorWrapperForRpcChunkError) -> Self {
6448        value.clone()
6449    }
6450}
6451impl ::std::convert::From<RpcRequestValidationErrorKind> for ErrorWrapperForRpcChunkError {
6452    fn from(value: RpcRequestValidationErrorKind) -> Self {
6453        Self::RequestValidationError(value)
6454    }
6455}
6456impl ::std::convert::From<RpcChunkError> for ErrorWrapperForRpcChunkError {
6457    fn from(value: RpcChunkError) -> Self {
6458        Self::HandlerError(value)
6459    }
6460}
6461impl ::std::convert::From<InternalError> for ErrorWrapperForRpcChunkError {
6462    fn from(value: InternalError) -> Self {
6463        Self::InternalError(value)
6464    }
6465}
6466#[doc = "`ErrorWrapperForRpcClientConfigError`"]
6467#[doc = r""]
6468#[doc = r" <details><summary>JSON schema</summary>"]
6469#[doc = r""]
6470#[doc = r" ```json"]
6471#[doc = "{"]
6472#[doc = "  \"oneOf\": ["]
6473#[doc = "    {"]
6474#[doc = "      \"type\": \"object\","]
6475#[doc = "      \"required\": ["]
6476#[doc = "        \"cause\","]
6477#[doc = "        \"name\""]
6478#[doc = "      ],"]
6479#[doc = "      \"properties\": {"]
6480#[doc = "        \"cause\": {"]
6481#[doc = "          \"$ref\": \"#/components/schemas/RpcRequestValidationErrorKind\""]
6482#[doc = "        },"]
6483#[doc = "        \"name\": {"]
6484#[doc = "          \"type\": \"string\","]
6485#[doc = "          \"enum\": ["]
6486#[doc = "            \"REQUEST_VALIDATION_ERROR\""]
6487#[doc = "          ]"]
6488#[doc = "        }"]
6489#[doc = "      }"]
6490#[doc = "    },"]
6491#[doc = "    {"]
6492#[doc = "      \"type\": \"object\","]
6493#[doc = "      \"required\": ["]
6494#[doc = "        \"cause\","]
6495#[doc = "        \"name\""]
6496#[doc = "      ],"]
6497#[doc = "      \"properties\": {"]
6498#[doc = "        \"cause\": {"]
6499#[doc = "          \"$ref\": \"#/components/schemas/RpcClientConfigError\""]
6500#[doc = "        },"]
6501#[doc = "        \"name\": {"]
6502#[doc = "          \"type\": \"string\","]
6503#[doc = "          \"enum\": ["]
6504#[doc = "            \"HANDLER_ERROR\""]
6505#[doc = "          ]"]
6506#[doc = "        }"]
6507#[doc = "      }"]
6508#[doc = "    },"]
6509#[doc = "    {"]
6510#[doc = "      \"type\": \"object\","]
6511#[doc = "      \"required\": ["]
6512#[doc = "        \"cause\","]
6513#[doc = "        \"name\""]
6514#[doc = "      ],"]
6515#[doc = "      \"properties\": {"]
6516#[doc = "        \"cause\": {"]
6517#[doc = "          \"$ref\": \"#/components/schemas/InternalError\""]
6518#[doc = "        },"]
6519#[doc = "        \"name\": {"]
6520#[doc = "          \"type\": \"string\","]
6521#[doc = "          \"enum\": ["]
6522#[doc = "            \"INTERNAL_ERROR\""]
6523#[doc = "          ]"]
6524#[doc = "        }"]
6525#[doc = "      }"]
6526#[doc = "    }"]
6527#[doc = "  ]"]
6528#[doc = "}"]
6529#[doc = r" ```"]
6530#[doc = r" </details>"]
6531#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
6532#[serde(tag = "name", content = "cause")]
6533pub enum ErrorWrapperForRpcClientConfigError {
6534    #[serde(rename = "REQUEST_VALIDATION_ERROR")]
6535    RequestValidationError(RpcRequestValidationErrorKind),
6536    #[serde(rename = "HANDLER_ERROR")]
6537    HandlerError(RpcClientConfigError),
6538    #[serde(rename = "INTERNAL_ERROR")]
6539    InternalError(InternalError),
6540}
6541impl ::std::convert::From<&Self> for ErrorWrapperForRpcClientConfigError {
6542    fn from(value: &ErrorWrapperForRpcClientConfigError) -> Self {
6543        value.clone()
6544    }
6545}
6546impl ::std::convert::From<RpcRequestValidationErrorKind> for ErrorWrapperForRpcClientConfigError {
6547    fn from(value: RpcRequestValidationErrorKind) -> Self {
6548        Self::RequestValidationError(value)
6549    }
6550}
6551impl ::std::convert::From<RpcClientConfigError> for ErrorWrapperForRpcClientConfigError {
6552    fn from(value: RpcClientConfigError) -> Self {
6553        Self::HandlerError(value)
6554    }
6555}
6556impl ::std::convert::From<InternalError> for ErrorWrapperForRpcClientConfigError {
6557    fn from(value: InternalError) -> Self {
6558        Self::InternalError(value)
6559    }
6560}
6561#[doc = "`ErrorWrapperForRpcGasPriceError`"]
6562#[doc = r""]
6563#[doc = r" <details><summary>JSON schema</summary>"]
6564#[doc = r""]
6565#[doc = r" ```json"]
6566#[doc = "{"]
6567#[doc = "  \"oneOf\": ["]
6568#[doc = "    {"]
6569#[doc = "      \"type\": \"object\","]
6570#[doc = "      \"required\": ["]
6571#[doc = "        \"cause\","]
6572#[doc = "        \"name\""]
6573#[doc = "      ],"]
6574#[doc = "      \"properties\": {"]
6575#[doc = "        \"cause\": {"]
6576#[doc = "          \"$ref\": \"#/components/schemas/RpcRequestValidationErrorKind\""]
6577#[doc = "        },"]
6578#[doc = "        \"name\": {"]
6579#[doc = "          \"type\": \"string\","]
6580#[doc = "          \"enum\": ["]
6581#[doc = "            \"REQUEST_VALIDATION_ERROR\""]
6582#[doc = "          ]"]
6583#[doc = "        }"]
6584#[doc = "      }"]
6585#[doc = "    },"]
6586#[doc = "    {"]
6587#[doc = "      \"type\": \"object\","]
6588#[doc = "      \"required\": ["]
6589#[doc = "        \"cause\","]
6590#[doc = "        \"name\""]
6591#[doc = "      ],"]
6592#[doc = "      \"properties\": {"]
6593#[doc = "        \"cause\": {"]
6594#[doc = "          \"$ref\": \"#/components/schemas/RpcGasPriceError\""]
6595#[doc = "        },"]
6596#[doc = "        \"name\": {"]
6597#[doc = "          \"type\": \"string\","]
6598#[doc = "          \"enum\": ["]
6599#[doc = "            \"HANDLER_ERROR\""]
6600#[doc = "          ]"]
6601#[doc = "        }"]
6602#[doc = "      }"]
6603#[doc = "    },"]
6604#[doc = "    {"]
6605#[doc = "      \"type\": \"object\","]
6606#[doc = "      \"required\": ["]
6607#[doc = "        \"cause\","]
6608#[doc = "        \"name\""]
6609#[doc = "      ],"]
6610#[doc = "      \"properties\": {"]
6611#[doc = "        \"cause\": {"]
6612#[doc = "          \"$ref\": \"#/components/schemas/InternalError\""]
6613#[doc = "        },"]
6614#[doc = "        \"name\": {"]
6615#[doc = "          \"type\": \"string\","]
6616#[doc = "          \"enum\": ["]
6617#[doc = "            \"INTERNAL_ERROR\""]
6618#[doc = "          ]"]
6619#[doc = "        }"]
6620#[doc = "      }"]
6621#[doc = "    }"]
6622#[doc = "  ]"]
6623#[doc = "}"]
6624#[doc = r" ```"]
6625#[doc = r" </details>"]
6626#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
6627#[serde(tag = "name", content = "cause")]
6628pub enum ErrorWrapperForRpcGasPriceError {
6629    #[serde(rename = "REQUEST_VALIDATION_ERROR")]
6630    RequestValidationError(RpcRequestValidationErrorKind),
6631    #[serde(rename = "HANDLER_ERROR")]
6632    HandlerError(RpcGasPriceError),
6633    #[serde(rename = "INTERNAL_ERROR")]
6634    InternalError(InternalError),
6635}
6636impl ::std::convert::From<&Self> for ErrorWrapperForRpcGasPriceError {
6637    fn from(value: &ErrorWrapperForRpcGasPriceError) -> Self {
6638        value.clone()
6639    }
6640}
6641impl ::std::convert::From<RpcRequestValidationErrorKind> for ErrorWrapperForRpcGasPriceError {
6642    fn from(value: RpcRequestValidationErrorKind) -> Self {
6643        Self::RequestValidationError(value)
6644    }
6645}
6646impl ::std::convert::From<RpcGasPriceError> for ErrorWrapperForRpcGasPriceError {
6647    fn from(value: RpcGasPriceError) -> Self {
6648        Self::HandlerError(value)
6649    }
6650}
6651impl ::std::convert::From<InternalError> for ErrorWrapperForRpcGasPriceError {
6652    fn from(value: InternalError) -> Self {
6653        Self::InternalError(value)
6654    }
6655}
6656#[doc = "`ErrorWrapperForRpcLightClientNextBlockError`"]
6657#[doc = r""]
6658#[doc = r" <details><summary>JSON schema</summary>"]
6659#[doc = r""]
6660#[doc = r" ```json"]
6661#[doc = "{"]
6662#[doc = "  \"oneOf\": ["]
6663#[doc = "    {"]
6664#[doc = "      \"type\": \"object\","]
6665#[doc = "      \"required\": ["]
6666#[doc = "        \"cause\","]
6667#[doc = "        \"name\""]
6668#[doc = "      ],"]
6669#[doc = "      \"properties\": {"]
6670#[doc = "        \"cause\": {"]
6671#[doc = "          \"$ref\": \"#/components/schemas/RpcRequestValidationErrorKind\""]
6672#[doc = "        },"]
6673#[doc = "        \"name\": {"]
6674#[doc = "          \"type\": \"string\","]
6675#[doc = "          \"enum\": ["]
6676#[doc = "            \"REQUEST_VALIDATION_ERROR\""]
6677#[doc = "          ]"]
6678#[doc = "        }"]
6679#[doc = "      }"]
6680#[doc = "    },"]
6681#[doc = "    {"]
6682#[doc = "      \"type\": \"object\","]
6683#[doc = "      \"required\": ["]
6684#[doc = "        \"cause\","]
6685#[doc = "        \"name\""]
6686#[doc = "      ],"]
6687#[doc = "      \"properties\": {"]
6688#[doc = "        \"cause\": {"]
6689#[doc = "          \"$ref\": \"#/components/schemas/RpcLightClientNextBlockError\""]
6690#[doc = "        },"]
6691#[doc = "        \"name\": {"]
6692#[doc = "          \"type\": \"string\","]
6693#[doc = "          \"enum\": ["]
6694#[doc = "            \"HANDLER_ERROR\""]
6695#[doc = "          ]"]
6696#[doc = "        }"]
6697#[doc = "      }"]
6698#[doc = "    },"]
6699#[doc = "    {"]
6700#[doc = "      \"type\": \"object\","]
6701#[doc = "      \"required\": ["]
6702#[doc = "        \"cause\","]
6703#[doc = "        \"name\""]
6704#[doc = "      ],"]
6705#[doc = "      \"properties\": {"]
6706#[doc = "        \"cause\": {"]
6707#[doc = "          \"$ref\": \"#/components/schemas/InternalError\""]
6708#[doc = "        },"]
6709#[doc = "        \"name\": {"]
6710#[doc = "          \"type\": \"string\","]
6711#[doc = "          \"enum\": ["]
6712#[doc = "            \"INTERNAL_ERROR\""]
6713#[doc = "          ]"]
6714#[doc = "        }"]
6715#[doc = "      }"]
6716#[doc = "    }"]
6717#[doc = "  ]"]
6718#[doc = "}"]
6719#[doc = r" ```"]
6720#[doc = r" </details>"]
6721#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
6722#[serde(tag = "name", content = "cause")]
6723pub enum ErrorWrapperForRpcLightClientNextBlockError {
6724    #[serde(rename = "REQUEST_VALIDATION_ERROR")]
6725    RequestValidationError(RpcRequestValidationErrorKind),
6726    #[serde(rename = "HANDLER_ERROR")]
6727    HandlerError(RpcLightClientNextBlockError),
6728    #[serde(rename = "INTERNAL_ERROR")]
6729    InternalError(InternalError),
6730}
6731impl ::std::convert::From<&Self> for ErrorWrapperForRpcLightClientNextBlockError {
6732    fn from(value: &ErrorWrapperForRpcLightClientNextBlockError) -> Self {
6733        value.clone()
6734    }
6735}
6736impl ::std::convert::From<RpcRequestValidationErrorKind>
6737    for ErrorWrapperForRpcLightClientNextBlockError
6738{
6739    fn from(value: RpcRequestValidationErrorKind) -> Self {
6740        Self::RequestValidationError(value)
6741    }
6742}
6743impl ::std::convert::From<RpcLightClientNextBlockError>
6744    for ErrorWrapperForRpcLightClientNextBlockError
6745{
6746    fn from(value: RpcLightClientNextBlockError) -> Self {
6747        Self::HandlerError(value)
6748    }
6749}
6750impl ::std::convert::From<InternalError> for ErrorWrapperForRpcLightClientNextBlockError {
6751    fn from(value: InternalError) -> Self {
6752        Self::InternalError(value)
6753    }
6754}
6755#[doc = "`ErrorWrapperForRpcLightClientProofError`"]
6756#[doc = r""]
6757#[doc = r" <details><summary>JSON schema</summary>"]
6758#[doc = r""]
6759#[doc = r" ```json"]
6760#[doc = "{"]
6761#[doc = "  \"oneOf\": ["]
6762#[doc = "    {"]
6763#[doc = "      \"type\": \"object\","]
6764#[doc = "      \"required\": ["]
6765#[doc = "        \"cause\","]
6766#[doc = "        \"name\""]
6767#[doc = "      ],"]
6768#[doc = "      \"properties\": {"]
6769#[doc = "        \"cause\": {"]
6770#[doc = "          \"$ref\": \"#/components/schemas/RpcRequestValidationErrorKind\""]
6771#[doc = "        },"]
6772#[doc = "        \"name\": {"]
6773#[doc = "          \"type\": \"string\","]
6774#[doc = "          \"enum\": ["]
6775#[doc = "            \"REQUEST_VALIDATION_ERROR\""]
6776#[doc = "          ]"]
6777#[doc = "        }"]
6778#[doc = "      }"]
6779#[doc = "    },"]
6780#[doc = "    {"]
6781#[doc = "      \"type\": \"object\","]
6782#[doc = "      \"required\": ["]
6783#[doc = "        \"cause\","]
6784#[doc = "        \"name\""]
6785#[doc = "      ],"]
6786#[doc = "      \"properties\": {"]
6787#[doc = "        \"cause\": {"]
6788#[doc = "          \"$ref\": \"#/components/schemas/RpcLightClientProofError\""]
6789#[doc = "        },"]
6790#[doc = "        \"name\": {"]
6791#[doc = "          \"type\": \"string\","]
6792#[doc = "          \"enum\": ["]
6793#[doc = "            \"HANDLER_ERROR\""]
6794#[doc = "          ]"]
6795#[doc = "        }"]
6796#[doc = "      }"]
6797#[doc = "    },"]
6798#[doc = "    {"]
6799#[doc = "      \"type\": \"object\","]
6800#[doc = "      \"required\": ["]
6801#[doc = "        \"cause\","]
6802#[doc = "        \"name\""]
6803#[doc = "      ],"]
6804#[doc = "      \"properties\": {"]
6805#[doc = "        \"cause\": {"]
6806#[doc = "          \"$ref\": \"#/components/schemas/InternalError\""]
6807#[doc = "        },"]
6808#[doc = "        \"name\": {"]
6809#[doc = "          \"type\": \"string\","]
6810#[doc = "          \"enum\": ["]
6811#[doc = "            \"INTERNAL_ERROR\""]
6812#[doc = "          ]"]
6813#[doc = "        }"]
6814#[doc = "      }"]
6815#[doc = "    }"]
6816#[doc = "  ]"]
6817#[doc = "}"]
6818#[doc = r" ```"]
6819#[doc = r" </details>"]
6820#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
6821#[serde(tag = "name", content = "cause")]
6822pub enum ErrorWrapperForRpcLightClientProofError {
6823    #[serde(rename = "REQUEST_VALIDATION_ERROR")]
6824    RequestValidationError(RpcRequestValidationErrorKind),
6825    #[serde(rename = "HANDLER_ERROR")]
6826    HandlerError(RpcLightClientProofError),
6827    #[serde(rename = "INTERNAL_ERROR")]
6828    InternalError(InternalError),
6829}
6830impl ::std::convert::From<&Self> for ErrorWrapperForRpcLightClientProofError {
6831    fn from(value: &ErrorWrapperForRpcLightClientProofError) -> Self {
6832        value.clone()
6833    }
6834}
6835impl ::std::convert::From<RpcRequestValidationErrorKind>
6836    for ErrorWrapperForRpcLightClientProofError
6837{
6838    fn from(value: RpcRequestValidationErrorKind) -> Self {
6839        Self::RequestValidationError(value)
6840    }
6841}
6842impl ::std::convert::From<RpcLightClientProofError> for ErrorWrapperForRpcLightClientProofError {
6843    fn from(value: RpcLightClientProofError) -> Self {
6844        Self::HandlerError(value)
6845    }
6846}
6847impl ::std::convert::From<InternalError> for ErrorWrapperForRpcLightClientProofError {
6848    fn from(value: InternalError) -> Self {
6849        Self::InternalError(value)
6850    }
6851}
6852#[doc = "`ErrorWrapperForRpcMaintenanceWindowsError`"]
6853#[doc = r""]
6854#[doc = r" <details><summary>JSON schema</summary>"]
6855#[doc = r""]
6856#[doc = r" ```json"]
6857#[doc = "{"]
6858#[doc = "  \"oneOf\": ["]
6859#[doc = "    {"]
6860#[doc = "      \"type\": \"object\","]
6861#[doc = "      \"required\": ["]
6862#[doc = "        \"cause\","]
6863#[doc = "        \"name\""]
6864#[doc = "      ],"]
6865#[doc = "      \"properties\": {"]
6866#[doc = "        \"cause\": {"]
6867#[doc = "          \"$ref\": \"#/components/schemas/RpcRequestValidationErrorKind\""]
6868#[doc = "        },"]
6869#[doc = "        \"name\": {"]
6870#[doc = "          \"type\": \"string\","]
6871#[doc = "          \"enum\": ["]
6872#[doc = "            \"REQUEST_VALIDATION_ERROR\""]
6873#[doc = "          ]"]
6874#[doc = "        }"]
6875#[doc = "      }"]
6876#[doc = "    },"]
6877#[doc = "    {"]
6878#[doc = "      \"type\": \"object\","]
6879#[doc = "      \"required\": ["]
6880#[doc = "        \"cause\","]
6881#[doc = "        \"name\""]
6882#[doc = "      ],"]
6883#[doc = "      \"properties\": {"]
6884#[doc = "        \"cause\": {"]
6885#[doc = "          \"$ref\": \"#/components/schemas/RpcMaintenanceWindowsError\""]
6886#[doc = "        },"]
6887#[doc = "        \"name\": {"]
6888#[doc = "          \"type\": \"string\","]
6889#[doc = "          \"enum\": ["]
6890#[doc = "            \"HANDLER_ERROR\""]
6891#[doc = "          ]"]
6892#[doc = "        }"]
6893#[doc = "      }"]
6894#[doc = "    },"]
6895#[doc = "    {"]
6896#[doc = "      \"type\": \"object\","]
6897#[doc = "      \"required\": ["]
6898#[doc = "        \"cause\","]
6899#[doc = "        \"name\""]
6900#[doc = "      ],"]
6901#[doc = "      \"properties\": {"]
6902#[doc = "        \"cause\": {"]
6903#[doc = "          \"$ref\": \"#/components/schemas/InternalError\""]
6904#[doc = "        },"]
6905#[doc = "        \"name\": {"]
6906#[doc = "          \"type\": \"string\","]
6907#[doc = "          \"enum\": ["]
6908#[doc = "            \"INTERNAL_ERROR\""]
6909#[doc = "          ]"]
6910#[doc = "        }"]
6911#[doc = "      }"]
6912#[doc = "    }"]
6913#[doc = "  ]"]
6914#[doc = "}"]
6915#[doc = r" ```"]
6916#[doc = r" </details>"]
6917#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
6918#[serde(tag = "name", content = "cause")]
6919pub enum ErrorWrapperForRpcMaintenanceWindowsError {
6920    #[serde(rename = "REQUEST_VALIDATION_ERROR")]
6921    RequestValidationError(RpcRequestValidationErrorKind),
6922    #[serde(rename = "HANDLER_ERROR")]
6923    HandlerError(RpcMaintenanceWindowsError),
6924    #[serde(rename = "INTERNAL_ERROR")]
6925    InternalError(InternalError),
6926}
6927impl ::std::convert::From<&Self> for ErrorWrapperForRpcMaintenanceWindowsError {
6928    fn from(value: &ErrorWrapperForRpcMaintenanceWindowsError) -> Self {
6929        value.clone()
6930    }
6931}
6932impl ::std::convert::From<RpcRequestValidationErrorKind>
6933    for ErrorWrapperForRpcMaintenanceWindowsError
6934{
6935    fn from(value: RpcRequestValidationErrorKind) -> Self {
6936        Self::RequestValidationError(value)
6937    }
6938}
6939impl ::std::convert::From<RpcMaintenanceWindowsError>
6940    for ErrorWrapperForRpcMaintenanceWindowsError
6941{
6942    fn from(value: RpcMaintenanceWindowsError) -> Self {
6943        Self::HandlerError(value)
6944    }
6945}
6946impl ::std::convert::From<InternalError> for ErrorWrapperForRpcMaintenanceWindowsError {
6947    fn from(value: InternalError) -> Self {
6948        Self::InternalError(value)
6949    }
6950}
6951#[doc = "`ErrorWrapperForRpcNetworkInfoError`"]
6952#[doc = r""]
6953#[doc = r" <details><summary>JSON schema</summary>"]
6954#[doc = r""]
6955#[doc = r" ```json"]
6956#[doc = "{"]
6957#[doc = "  \"oneOf\": ["]
6958#[doc = "    {"]
6959#[doc = "      \"type\": \"object\","]
6960#[doc = "      \"required\": ["]
6961#[doc = "        \"cause\","]
6962#[doc = "        \"name\""]
6963#[doc = "      ],"]
6964#[doc = "      \"properties\": {"]
6965#[doc = "        \"cause\": {"]
6966#[doc = "          \"$ref\": \"#/components/schemas/RpcRequestValidationErrorKind\""]
6967#[doc = "        },"]
6968#[doc = "        \"name\": {"]
6969#[doc = "          \"type\": \"string\","]
6970#[doc = "          \"enum\": ["]
6971#[doc = "            \"REQUEST_VALIDATION_ERROR\""]
6972#[doc = "          ]"]
6973#[doc = "        }"]
6974#[doc = "      }"]
6975#[doc = "    },"]
6976#[doc = "    {"]
6977#[doc = "      \"type\": \"object\","]
6978#[doc = "      \"required\": ["]
6979#[doc = "        \"cause\","]
6980#[doc = "        \"name\""]
6981#[doc = "      ],"]
6982#[doc = "      \"properties\": {"]
6983#[doc = "        \"cause\": {"]
6984#[doc = "          \"$ref\": \"#/components/schemas/RpcNetworkInfoError\""]
6985#[doc = "        },"]
6986#[doc = "        \"name\": {"]
6987#[doc = "          \"type\": \"string\","]
6988#[doc = "          \"enum\": ["]
6989#[doc = "            \"HANDLER_ERROR\""]
6990#[doc = "          ]"]
6991#[doc = "        }"]
6992#[doc = "      }"]
6993#[doc = "    },"]
6994#[doc = "    {"]
6995#[doc = "      \"type\": \"object\","]
6996#[doc = "      \"required\": ["]
6997#[doc = "        \"cause\","]
6998#[doc = "        \"name\""]
6999#[doc = "      ],"]
7000#[doc = "      \"properties\": {"]
7001#[doc = "        \"cause\": {"]
7002#[doc = "          \"$ref\": \"#/components/schemas/InternalError\""]
7003#[doc = "        },"]
7004#[doc = "        \"name\": {"]
7005#[doc = "          \"type\": \"string\","]
7006#[doc = "          \"enum\": ["]
7007#[doc = "            \"INTERNAL_ERROR\""]
7008#[doc = "          ]"]
7009#[doc = "        }"]
7010#[doc = "      }"]
7011#[doc = "    }"]
7012#[doc = "  ]"]
7013#[doc = "}"]
7014#[doc = r" ```"]
7015#[doc = r" </details>"]
7016#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
7017#[serde(tag = "name", content = "cause")]
7018pub enum ErrorWrapperForRpcNetworkInfoError {
7019    #[serde(rename = "REQUEST_VALIDATION_ERROR")]
7020    RequestValidationError(RpcRequestValidationErrorKind),
7021    #[serde(rename = "HANDLER_ERROR")]
7022    HandlerError(RpcNetworkInfoError),
7023    #[serde(rename = "INTERNAL_ERROR")]
7024    InternalError(InternalError),
7025}
7026impl ::std::convert::From<&Self> for ErrorWrapperForRpcNetworkInfoError {
7027    fn from(value: &ErrorWrapperForRpcNetworkInfoError) -> Self {
7028        value.clone()
7029    }
7030}
7031impl ::std::convert::From<RpcRequestValidationErrorKind> for ErrorWrapperForRpcNetworkInfoError {
7032    fn from(value: RpcRequestValidationErrorKind) -> Self {
7033        Self::RequestValidationError(value)
7034    }
7035}
7036impl ::std::convert::From<RpcNetworkInfoError> for ErrorWrapperForRpcNetworkInfoError {
7037    fn from(value: RpcNetworkInfoError) -> Self {
7038        Self::HandlerError(value)
7039    }
7040}
7041impl ::std::convert::From<InternalError> for ErrorWrapperForRpcNetworkInfoError {
7042    fn from(value: InternalError) -> Self {
7043        Self::InternalError(value)
7044    }
7045}
7046#[doc = "`ErrorWrapperForRpcProtocolConfigError`"]
7047#[doc = r""]
7048#[doc = r" <details><summary>JSON schema</summary>"]
7049#[doc = r""]
7050#[doc = r" ```json"]
7051#[doc = "{"]
7052#[doc = "  \"oneOf\": ["]
7053#[doc = "    {"]
7054#[doc = "      \"type\": \"object\","]
7055#[doc = "      \"required\": ["]
7056#[doc = "        \"cause\","]
7057#[doc = "        \"name\""]
7058#[doc = "      ],"]
7059#[doc = "      \"properties\": {"]
7060#[doc = "        \"cause\": {"]
7061#[doc = "          \"$ref\": \"#/components/schemas/RpcRequestValidationErrorKind\""]
7062#[doc = "        },"]
7063#[doc = "        \"name\": {"]
7064#[doc = "          \"type\": \"string\","]
7065#[doc = "          \"enum\": ["]
7066#[doc = "            \"REQUEST_VALIDATION_ERROR\""]
7067#[doc = "          ]"]
7068#[doc = "        }"]
7069#[doc = "      }"]
7070#[doc = "    },"]
7071#[doc = "    {"]
7072#[doc = "      \"type\": \"object\","]
7073#[doc = "      \"required\": ["]
7074#[doc = "        \"cause\","]
7075#[doc = "        \"name\""]
7076#[doc = "      ],"]
7077#[doc = "      \"properties\": {"]
7078#[doc = "        \"cause\": {"]
7079#[doc = "          \"$ref\": \"#/components/schemas/RpcProtocolConfigError\""]
7080#[doc = "        },"]
7081#[doc = "        \"name\": {"]
7082#[doc = "          \"type\": \"string\","]
7083#[doc = "          \"enum\": ["]
7084#[doc = "            \"HANDLER_ERROR\""]
7085#[doc = "          ]"]
7086#[doc = "        }"]
7087#[doc = "      }"]
7088#[doc = "    },"]
7089#[doc = "    {"]
7090#[doc = "      \"type\": \"object\","]
7091#[doc = "      \"required\": ["]
7092#[doc = "        \"cause\","]
7093#[doc = "        \"name\""]
7094#[doc = "      ],"]
7095#[doc = "      \"properties\": {"]
7096#[doc = "        \"cause\": {"]
7097#[doc = "          \"$ref\": \"#/components/schemas/InternalError\""]
7098#[doc = "        },"]
7099#[doc = "        \"name\": {"]
7100#[doc = "          \"type\": \"string\","]
7101#[doc = "          \"enum\": ["]
7102#[doc = "            \"INTERNAL_ERROR\""]
7103#[doc = "          ]"]
7104#[doc = "        }"]
7105#[doc = "      }"]
7106#[doc = "    }"]
7107#[doc = "  ]"]
7108#[doc = "}"]
7109#[doc = r" ```"]
7110#[doc = r" </details>"]
7111#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
7112#[serde(tag = "name", content = "cause")]
7113pub enum ErrorWrapperForRpcProtocolConfigError {
7114    #[serde(rename = "REQUEST_VALIDATION_ERROR")]
7115    RequestValidationError(RpcRequestValidationErrorKind),
7116    #[serde(rename = "HANDLER_ERROR")]
7117    HandlerError(RpcProtocolConfigError),
7118    #[serde(rename = "INTERNAL_ERROR")]
7119    InternalError(InternalError),
7120}
7121impl ::std::convert::From<&Self> for ErrorWrapperForRpcProtocolConfigError {
7122    fn from(value: &ErrorWrapperForRpcProtocolConfigError) -> Self {
7123        value.clone()
7124    }
7125}
7126impl ::std::convert::From<RpcRequestValidationErrorKind> for ErrorWrapperForRpcProtocolConfigError {
7127    fn from(value: RpcRequestValidationErrorKind) -> Self {
7128        Self::RequestValidationError(value)
7129    }
7130}
7131impl ::std::convert::From<RpcProtocolConfigError> for ErrorWrapperForRpcProtocolConfigError {
7132    fn from(value: RpcProtocolConfigError) -> Self {
7133        Self::HandlerError(value)
7134    }
7135}
7136impl ::std::convert::From<InternalError> for ErrorWrapperForRpcProtocolConfigError {
7137    fn from(value: InternalError) -> Self {
7138        Self::InternalError(value)
7139    }
7140}
7141#[doc = "`ErrorWrapperForRpcQueryError`"]
7142#[doc = r""]
7143#[doc = r" <details><summary>JSON schema</summary>"]
7144#[doc = r""]
7145#[doc = r" ```json"]
7146#[doc = "{"]
7147#[doc = "  \"oneOf\": ["]
7148#[doc = "    {"]
7149#[doc = "      \"type\": \"object\","]
7150#[doc = "      \"required\": ["]
7151#[doc = "        \"cause\","]
7152#[doc = "        \"name\""]
7153#[doc = "      ],"]
7154#[doc = "      \"properties\": {"]
7155#[doc = "        \"cause\": {"]
7156#[doc = "          \"$ref\": \"#/components/schemas/RpcRequestValidationErrorKind\""]
7157#[doc = "        },"]
7158#[doc = "        \"name\": {"]
7159#[doc = "          \"type\": \"string\","]
7160#[doc = "          \"enum\": ["]
7161#[doc = "            \"REQUEST_VALIDATION_ERROR\""]
7162#[doc = "          ]"]
7163#[doc = "        }"]
7164#[doc = "      }"]
7165#[doc = "    },"]
7166#[doc = "    {"]
7167#[doc = "      \"type\": \"object\","]
7168#[doc = "      \"required\": ["]
7169#[doc = "        \"cause\","]
7170#[doc = "        \"name\""]
7171#[doc = "      ],"]
7172#[doc = "      \"properties\": {"]
7173#[doc = "        \"cause\": {"]
7174#[doc = "          \"$ref\": \"#/components/schemas/RpcQueryError\""]
7175#[doc = "        },"]
7176#[doc = "        \"name\": {"]
7177#[doc = "          \"type\": \"string\","]
7178#[doc = "          \"enum\": ["]
7179#[doc = "            \"HANDLER_ERROR\""]
7180#[doc = "          ]"]
7181#[doc = "        }"]
7182#[doc = "      }"]
7183#[doc = "    },"]
7184#[doc = "    {"]
7185#[doc = "      \"type\": \"object\","]
7186#[doc = "      \"required\": ["]
7187#[doc = "        \"cause\","]
7188#[doc = "        \"name\""]
7189#[doc = "      ],"]
7190#[doc = "      \"properties\": {"]
7191#[doc = "        \"cause\": {"]
7192#[doc = "          \"$ref\": \"#/components/schemas/InternalError\""]
7193#[doc = "        },"]
7194#[doc = "        \"name\": {"]
7195#[doc = "          \"type\": \"string\","]
7196#[doc = "          \"enum\": ["]
7197#[doc = "            \"INTERNAL_ERROR\""]
7198#[doc = "          ]"]
7199#[doc = "        }"]
7200#[doc = "      }"]
7201#[doc = "    }"]
7202#[doc = "  ]"]
7203#[doc = "}"]
7204#[doc = r" ```"]
7205#[doc = r" </details>"]
7206#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
7207#[serde(tag = "name", content = "cause")]
7208pub enum ErrorWrapperForRpcQueryError {
7209    #[serde(rename = "REQUEST_VALIDATION_ERROR")]
7210    RequestValidationError(RpcRequestValidationErrorKind),
7211    #[serde(rename = "HANDLER_ERROR")]
7212    HandlerError(RpcQueryError),
7213    #[serde(rename = "INTERNAL_ERROR")]
7214    InternalError(InternalError),
7215}
7216impl ::std::convert::From<&Self> for ErrorWrapperForRpcQueryError {
7217    fn from(value: &ErrorWrapperForRpcQueryError) -> Self {
7218        value.clone()
7219    }
7220}
7221impl ::std::convert::From<RpcRequestValidationErrorKind> for ErrorWrapperForRpcQueryError {
7222    fn from(value: RpcRequestValidationErrorKind) -> Self {
7223        Self::RequestValidationError(value)
7224    }
7225}
7226impl ::std::convert::From<RpcQueryError> for ErrorWrapperForRpcQueryError {
7227    fn from(value: RpcQueryError) -> Self {
7228        Self::HandlerError(value)
7229    }
7230}
7231impl ::std::convert::From<InternalError> for ErrorWrapperForRpcQueryError {
7232    fn from(value: InternalError) -> Self {
7233        Self::InternalError(value)
7234    }
7235}
7236#[doc = "`ErrorWrapperForRpcReceiptError`"]
7237#[doc = r""]
7238#[doc = r" <details><summary>JSON schema</summary>"]
7239#[doc = r""]
7240#[doc = r" ```json"]
7241#[doc = "{"]
7242#[doc = "  \"oneOf\": ["]
7243#[doc = "    {"]
7244#[doc = "      \"type\": \"object\","]
7245#[doc = "      \"required\": ["]
7246#[doc = "        \"cause\","]
7247#[doc = "        \"name\""]
7248#[doc = "      ],"]
7249#[doc = "      \"properties\": {"]
7250#[doc = "        \"cause\": {"]
7251#[doc = "          \"$ref\": \"#/components/schemas/RpcRequestValidationErrorKind\""]
7252#[doc = "        },"]
7253#[doc = "        \"name\": {"]
7254#[doc = "          \"type\": \"string\","]
7255#[doc = "          \"enum\": ["]
7256#[doc = "            \"REQUEST_VALIDATION_ERROR\""]
7257#[doc = "          ]"]
7258#[doc = "        }"]
7259#[doc = "      }"]
7260#[doc = "    },"]
7261#[doc = "    {"]
7262#[doc = "      \"type\": \"object\","]
7263#[doc = "      \"required\": ["]
7264#[doc = "        \"cause\","]
7265#[doc = "        \"name\""]
7266#[doc = "      ],"]
7267#[doc = "      \"properties\": {"]
7268#[doc = "        \"cause\": {"]
7269#[doc = "          \"$ref\": \"#/components/schemas/RpcReceiptError\""]
7270#[doc = "        },"]
7271#[doc = "        \"name\": {"]
7272#[doc = "          \"type\": \"string\","]
7273#[doc = "          \"enum\": ["]
7274#[doc = "            \"HANDLER_ERROR\""]
7275#[doc = "          ]"]
7276#[doc = "        }"]
7277#[doc = "      }"]
7278#[doc = "    },"]
7279#[doc = "    {"]
7280#[doc = "      \"type\": \"object\","]
7281#[doc = "      \"required\": ["]
7282#[doc = "        \"cause\","]
7283#[doc = "        \"name\""]
7284#[doc = "      ],"]
7285#[doc = "      \"properties\": {"]
7286#[doc = "        \"cause\": {"]
7287#[doc = "          \"$ref\": \"#/components/schemas/InternalError\""]
7288#[doc = "        },"]
7289#[doc = "        \"name\": {"]
7290#[doc = "          \"type\": \"string\","]
7291#[doc = "          \"enum\": ["]
7292#[doc = "            \"INTERNAL_ERROR\""]
7293#[doc = "          ]"]
7294#[doc = "        }"]
7295#[doc = "      }"]
7296#[doc = "    }"]
7297#[doc = "  ]"]
7298#[doc = "}"]
7299#[doc = r" ```"]
7300#[doc = r" </details>"]
7301#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
7302#[serde(tag = "name", content = "cause")]
7303pub enum ErrorWrapperForRpcReceiptError {
7304    #[serde(rename = "REQUEST_VALIDATION_ERROR")]
7305    RequestValidationError(RpcRequestValidationErrorKind),
7306    #[serde(rename = "HANDLER_ERROR")]
7307    HandlerError(RpcReceiptError),
7308    #[serde(rename = "INTERNAL_ERROR")]
7309    InternalError(InternalError),
7310}
7311impl ::std::convert::From<&Self> for ErrorWrapperForRpcReceiptError {
7312    fn from(value: &ErrorWrapperForRpcReceiptError) -> Self {
7313        value.clone()
7314    }
7315}
7316impl ::std::convert::From<RpcRequestValidationErrorKind> for ErrorWrapperForRpcReceiptError {
7317    fn from(value: RpcRequestValidationErrorKind) -> Self {
7318        Self::RequestValidationError(value)
7319    }
7320}
7321impl ::std::convert::From<RpcReceiptError> for ErrorWrapperForRpcReceiptError {
7322    fn from(value: RpcReceiptError) -> Self {
7323        Self::HandlerError(value)
7324    }
7325}
7326impl ::std::convert::From<InternalError> for ErrorWrapperForRpcReceiptError {
7327    fn from(value: InternalError) -> Self {
7328        Self::InternalError(value)
7329    }
7330}
7331#[doc = "`ErrorWrapperForRpcSplitStorageInfoError`"]
7332#[doc = r""]
7333#[doc = r" <details><summary>JSON schema</summary>"]
7334#[doc = r""]
7335#[doc = r" ```json"]
7336#[doc = "{"]
7337#[doc = "  \"oneOf\": ["]
7338#[doc = "    {"]
7339#[doc = "      \"type\": \"object\","]
7340#[doc = "      \"required\": ["]
7341#[doc = "        \"cause\","]
7342#[doc = "        \"name\""]
7343#[doc = "      ],"]
7344#[doc = "      \"properties\": {"]
7345#[doc = "        \"cause\": {"]
7346#[doc = "          \"$ref\": \"#/components/schemas/RpcRequestValidationErrorKind\""]
7347#[doc = "        },"]
7348#[doc = "        \"name\": {"]
7349#[doc = "          \"type\": \"string\","]
7350#[doc = "          \"enum\": ["]
7351#[doc = "            \"REQUEST_VALIDATION_ERROR\""]
7352#[doc = "          ]"]
7353#[doc = "        }"]
7354#[doc = "      }"]
7355#[doc = "    },"]
7356#[doc = "    {"]
7357#[doc = "      \"type\": \"object\","]
7358#[doc = "      \"required\": ["]
7359#[doc = "        \"cause\","]
7360#[doc = "        \"name\""]
7361#[doc = "      ],"]
7362#[doc = "      \"properties\": {"]
7363#[doc = "        \"cause\": {"]
7364#[doc = "          \"$ref\": \"#/components/schemas/RpcSplitStorageInfoError\""]
7365#[doc = "        },"]
7366#[doc = "        \"name\": {"]
7367#[doc = "          \"type\": \"string\","]
7368#[doc = "          \"enum\": ["]
7369#[doc = "            \"HANDLER_ERROR\""]
7370#[doc = "          ]"]
7371#[doc = "        }"]
7372#[doc = "      }"]
7373#[doc = "    },"]
7374#[doc = "    {"]
7375#[doc = "      \"type\": \"object\","]
7376#[doc = "      \"required\": ["]
7377#[doc = "        \"cause\","]
7378#[doc = "        \"name\""]
7379#[doc = "      ],"]
7380#[doc = "      \"properties\": {"]
7381#[doc = "        \"cause\": {"]
7382#[doc = "          \"$ref\": \"#/components/schemas/InternalError\""]
7383#[doc = "        },"]
7384#[doc = "        \"name\": {"]
7385#[doc = "          \"type\": \"string\","]
7386#[doc = "          \"enum\": ["]
7387#[doc = "            \"INTERNAL_ERROR\""]
7388#[doc = "          ]"]
7389#[doc = "        }"]
7390#[doc = "      }"]
7391#[doc = "    }"]
7392#[doc = "  ]"]
7393#[doc = "}"]
7394#[doc = r" ```"]
7395#[doc = r" </details>"]
7396#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
7397#[serde(tag = "name", content = "cause")]
7398pub enum ErrorWrapperForRpcSplitStorageInfoError {
7399    #[serde(rename = "REQUEST_VALIDATION_ERROR")]
7400    RequestValidationError(RpcRequestValidationErrorKind),
7401    #[serde(rename = "HANDLER_ERROR")]
7402    HandlerError(RpcSplitStorageInfoError),
7403    #[serde(rename = "INTERNAL_ERROR")]
7404    InternalError(InternalError),
7405}
7406impl ::std::convert::From<&Self> for ErrorWrapperForRpcSplitStorageInfoError {
7407    fn from(value: &ErrorWrapperForRpcSplitStorageInfoError) -> Self {
7408        value.clone()
7409    }
7410}
7411impl ::std::convert::From<RpcRequestValidationErrorKind>
7412    for ErrorWrapperForRpcSplitStorageInfoError
7413{
7414    fn from(value: RpcRequestValidationErrorKind) -> Self {
7415        Self::RequestValidationError(value)
7416    }
7417}
7418impl ::std::convert::From<RpcSplitStorageInfoError> for ErrorWrapperForRpcSplitStorageInfoError {
7419    fn from(value: RpcSplitStorageInfoError) -> Self {
7420        Self::HandlerError(value)
7421    }
7422}
7423impl ::std::convert::From<InternalError> for ErrorWrapperForRpcSplitStorageInfoError {
7424    fn from(value: InternalError) -> Self {
7425        Self::InternalError(value)
7426    }
7427}
7428#[doc = "`ErrorWrapperForRpcStateChangesError`"]
7429#[doc = r""]
7430#[doc = r" <details><summary>JSON schema</summary>"]
7431#[doc = r""]
7432#[doc = r" ```json"]
7433#[doc = "{"]
7434#[doc = "  \"oneOf\": ["]
7435#[doc = "    {"]
7436#[doc = "      \"type\": \"object\","]
7437#[doc = "      \"required\": ["]
7438#[doc = "        \"cause\","]
7439#[doc = "        \"name\""]
7440#[doc = "      ],"]
7441#[doc = "      \"properties\": {"]
7442#[doc = "        \"cause\": {"]
7443#[doc = "          \"$ref\": \"#/components/schemas/RpcRequestValidationErrorKind\""]
7444#[doc = "        },"]
7445#[doc = "        \"name\": {"]
7446#[doc = "          \"type\": \"string\","]
7447#[doc = "          \"enum\": ["]
7448#[doc = "            \"REQUEST_VALIDATION_ERROR\""]
7449#[doc = "          ]"]
7450#[doc = "        }"]
7451#[doc = "      }"]
7452#[doc = "    },"]
7453#[doc = "    {"]
7454#[doc = "      \"type\": \"object\","]
7455#[doc = "      \"required\": ["]
7456#[doc = "        \"cause\","]
7457#[doc = "        \"name\""]
7458#[doc = "      ],"]
7459#[doc = "      \"properties\": {"]
7460#[doc = "        \"cause\": {"]
7461#[doc = "          \"$ref\": \"#/components/schemas/RpcStateChangesError\""]
7462#[doc = "        },"]
7463#[doc = "        \"name\": {"]
7464#[doc = "          \"type\": \"string\","]
7465#[doc = "          \"enum\": ["]
7466#[doc = "            \"HANDLER_ERROR\""]
7467#[doc = "          ]"]
7468#[doc = "        }"]
7469#[doc = "      }"]
7470#[doc = "    },"]
7471#[doc = "    {"]
7472#[doc = "      \"type\": \"object\","]
7473#[doc = "      \"required\": ["]
7474#[doc = "        \"cause\","]
7475#[doc = "        \"name\""]
7476#[doc = "      ],"]
7477#[doc = "      \"properties\": {"]
7478#[doc = "        \"cause\": {"]
7479#[doc = "          \"$ref\": \"#/components/schemas/InternalError\""]
7480#[doc = "        },"]
7481#[doc = "        \"name\": {"]
7482#[doc = "          \"type\": \"string\","]
7483#[doc = "          \"enum\": ["]
7484#[doc = "            \"INTERNAL_ERROR\""]
7485#[doc = "          ]"]
7486#[doc = "        }"]
7487#[doc = "      }"]
7488#[doc = "    }"]
7489#[doc = "  ]"]
7490#[doc = "}"]
7491#[doc = r" ```"]
7492#[doc = r" </details>"]
7493#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
7494#[serde(tag = "name", content = "cause")]
7495pub enum ErrorWrapperForRpcStateChangesError {
7496    #[serde(rename = "REQUEST_VALIDATION_ERROR")]
7497    RequestValidationError(RpcRequestValidationErrorKind),
7498    #[serde(rename = "HANDLER_ERROR")]
7499    HandlerError(RpcStateChangesError),
7500    #[serde(rename = "INTERNAL_ERROR")]
7501    InternalError(InternalError),
7502}
7503impl ::std::convert::From<&Self> for ErrorWrapperForRpcStateChangesError {
7504    fn from(value: &ErrorWrapperForRpcStateChangesError) -> Self {
7505        value.clone()
7506    }
7507}
7508impl ::std::convert::From<RpcRequestValidationErrorKind> for ErrorWrapperForRpcStateChangesError {
7509    fn from(value: RpcRequestValidationErrorKind) -> Self {
7510        Self::RequestValidationError(value)
7511    }
7512}
7513impl ::std::convert::From<RpcStateChangesError> for ErrorWrapperForRpcStateChangesError {
7514    fn from(value: RpcStateChangesError) -> Self {
7515        Self::HandlerError(value)
7516    }
7517}
7518impl ::std::convert::From<InternalError> for ErrorWrapperForRpcStateChangesError {
7519    fn from(value: InternalError) -> Self {
7520        Self::InternalError(value)
7521    }
7522}
7523#[doc = "`ErrorWrapperForRpcStatusError`"]
7524#[doc = r""]
7525#[doc = r" <details><summary>JSON schema</summary>"]
7526#[doc = r""]
7527#[doc = r" ```json"]
7528#[doc = "{"]
7529#[doc = "  \"oneOf\": ["]
7530#[doc = "    {"]
7531#[doc = "      \"type\": \"object\","]
7532#[doc = "      \"required\": ["]
7533#[doc = "        \"cause\","]
7534#[doc = "        \"name\""]
7535#[doc = "      ],"]
7536#[doc = "      \"properties\": {"]
7537#[doc = "        \"cause\": {"]
7538#[doc = "          \"$ref\": \"#/components/schemas/RpcRequestValidationErrorKind\""]
7539#[doc = "        },"]
7540#[doc = "        \"name\": {"]
7541#[doc = "          \"type\": \"string\","]
7542#[doc = "          \"enum\": ["]
7543#[doc = "            \"REQUEST_VALIDATION_ERROR\""]
7544#[doc = "          ]"]
7545#[doc = "        }"]
7546#[doc = "      }"]
7547#[doc = "    },"]
7548#[doc = "    {"]
7549#[doc = "      \"type\": \"object\","]
7550#[doc = "      \"required\": ["]
7551#[doc = "        \"cause\","]
7552#[doc = "        \"name\""]
7553#[doc = "      ],"]
7554#[doc = "      \"properties\": {"]
7555#[doc = "        \"cause\": {"]
7556#[doc = "          \"$ref\": \"#/components/schemas/RpcStatusError\""]
7557#[doc = "        },"]
7558#[doc = "        \"name\": {"]
7559#[doc = "          \"type\": \"string\","]
7560#[doc = "          \"enum\": ["]
7561#[doc = "            \"HANDLER_ERROR\""]
7562#[doc = "          ]"]
7563#[doc = "        }"]
7564#[doc = "      }"]
7565#[doc = "    },"]
7566#[doc = "    {"]
7567#[doc = "      \"type\": \"object\","]
7568#[doc = "      \"required\": ["]
7569#[doc = "        \"cause\","]
7570#[doc = "        \"name\""]
7571#[doc = "      ],"]
7572#[doc = "      \"properties\": {"]
7573#[doc = "        \"cause\": {"]
7574#[doc = "          \"$ref\": \"#/components/schemas/InternalError\""]
7575#[doc = "        },"]
7576#[doc = "        \"name\": {"]
7577#[doc = "          \"type\": \"string\","]
7578#[doc = "          \"enum\": ["]
7579#[doc = "            \"INTERNAL_ERROR\""]
7580#[doc = "          ]"]
7581#[doc = "        }"]
7582#[doc = "      }"]
7583#[doc = "    }"]
7584#[doc = "  ]"]
7585#[doc = "}"]
7586#[doc = r" ```"]
7587#[doc = r" </details>"]
7588#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
7589#[serde(tag = "name", content = "cause")]
7590pub enum ErrorWrapperForRpcStatusError {
7591    #[serde(rename = "REQUEST_VALIDATION_ERROR")]
7592    RequestValidationError(RpcRequestValidationErrorKind),
7593    #[serde(rename = "HANDLER_ERROR")]
7594    HandlerError(RpcStatusError),
7595    #[serde(rename = "INTERNAL_ERROR")]
7596    InternalError(InternalError),
7597}
7598impl ::std::convert::From<&Self> for ErrorWrapperForRpcStatusError {
7599    fn from(value: &ErrorWrapperForRpcStatusError) -> Self {
7600        value.clone()
7601    }
7602}
7603impl ::std::convert::From<RpcRequestValidationErrorKind> for ErrorWrapperForRpcStatusError {
7604    fn from(value: RpcRequestValidationErrorKind) -> Self {
7605        Self::RequestValidationError(value)
7606    }
7607}
7608impl ::std::convert::From<RpcStatusError> for ErrorWrapperForRpcStatusError {
7609    fn from(value: RpcStatusError) -> Self {
7610        Self::HandlerError(value)
7611    }
7612}
7613impl ::std::convert::From<InternalError> for ErrorWrapperForRpcStatusError {
7614    fn from(value: InternalError) -> Self {
7615        Self::InternalError(value)
7616    }
7617}
7618#[doc = "`ErrorWrapperForRpcTransactionError`"]
7619#[doc = r""]
7620#[doc = r" <details><summary>JSON schema</summary>"]
7621#[doc = r""]
7622#[doc = r" ```json"]
7623#[doc = "{"]
7624#[doc = "  \"oneOf\": ["]
7625#[doc = "    {"]
7626#[doc = "      \"type\": \"object\","]
7627#[doc = "      \"required\": ["]
7628#[doc = "        \"cause\","]
7629#[doc = "        \"name\""]
7630#[doc = "      ],"]
7631#[doc = "      \"properties\": {"]
7632#[doc = "        \"cause\": {"]
7633#[doc = "          \"$ref\": \"#/components/schemas/RpcRequestValidationErrorKind\""]
7634#[doc = "        },"]
7635#[doc = "        \"name\": {"]
7636#[doc = "          \"type\": \"string\","]
7637#[doc = "          \"enum\": ["]
7638#[doc = "            \"REQUEST_VALIDATION_ERROR\""]
7639#[doc = "          ]"]
7640#[doc = "        }"]
7641#[doc = "      }"]
7642#[doc = "    },"]
7643#[doc = "    {"]
7644#[doc = "      \"type\": \"object\","]
7645#[doc = "      \"required\": ["]
7646#[doc = "        \"cause\","]
7647#[doc = "        \"name\""]
7648#[doc = "      ],"]
7649#[doc = "      \"properties\": {"]
7650#[doc = "        \"cause\": {"]
7651#[doc = "          \"$ref\": \"#/components/schemas/RpcTransactionError\""]
7652#[doc = "        },"]
7653#[doc = "        \"name\": {"]
7654#[doc = "          \"type\": \"string\","]
7655#[doc = "          \"enum\": ["]
7656#[doc = "            \"HANDLER_ERROR\""]
7657#[doc = "          ]"]
7658#[doc = "        }"]
7659#[doc = "      }"]
7660#[doc = "    },"]
7661#[doc = "    {"]
7662#[doc = "      \"type\": \"object\","]
7663#[doc = "      \"required\": ["]
7664#[doc = "        \"cause\","]
7665#[doc = "        \"name\""]
7666#[doc = "      ],"]
7667#[doc = "      \"properties\": {"]
7668#[doc = "        \"cause\": {"]
7669#[doc = "          \"$ref\": \"#/components/schemas/InternalError\""]
7670#[doc = "        },"]
7671#[doc = "        \"name\": {"]
7672#[doc = "          \"type\": \"string\","]
7673#[doc = "          \"enum\": ["]
7674#[doc = "            \"INTERNAL_ERROR\""]
7675#[doc = "          ]"]
7676#[doc = "        }"]
7677#[doc = "      }"]
7678#[doc = "    }"]
7679#[doc = "  ]"]
7680#[doc = "}"]
7681#[doc = r" ```"]
7682#[doc = r" </details>"]
7683#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
7684#[serde(tag = "name", content = "cause")]
7685pub enum ErrorWrapperForRpcTransactionError {
7686    #[serde(rename = "REQUEST_VALIDATION_ERROR")]
7687    RequestValidationError(RpcRequestValidationErrorKind),
7688    #[serde(rename = "HANDLER_ERROR")]
7689    HandlerError(RpcTransactionError),
7690    #[serde(rename = "INTERNAL_ERROR")]
7691    InternalError(InternalError),
7692}
7693impl ::std::convert::From<&Self> for ErrorWrapperForRpcTransactionError {
7694    fn from(value: &ErrorWrapperForRpcTransactionError) -> Self {
7695        value.clone()
7696    }
7697}
7698impl ::std::convert::From<RpcRequestValidationErrorKind> for ErrorWrapperForRpcTransactionError {
7699    fn from(value: RpcRequestValidationErrorKind) -> Self {
7700        Self::RequestValidationError(value)
7701    }
7702}
7703impl ::std::convert::From<RpcTransactionError> for ErrorWrapperForRpcTransactionError {
7704    fn from(value: RpcTransactionError) -> Self {
7705        Self::HandlerError(value)
7706    }
7707}
7708impl ::std::convert::From<InternalError> for ErrorWrapperForRpcTransactionError {
7709    fn from(value: InternalError) -> Self {
7710        Self::InternalError(value)
7711    }
7712}
7713#[doc = "`ErrorWrapperForRpcValidatorError`"]
7714#[doc = r""]
7715#[doc = r" <details><summary>JSON schema</summary>"]
7716#[doc = r""]
7717#[doc = r" ```json"]
7718#[doc = "{"]
7719#[doc = "  \"oneOf\": ["]
7720#[doc = "    {"]
7721#[doc = "      \"type\": \"object\","]
7722#[doc = "      \"required\": ["]
7723#[doc = "        \"cause\","]
7724#[doc = "        \"name\""]
7725#[doc = "      ],"]
7726#[doc = "      \"properties\": {"]
7727#[doc = "        \"cause\": {"]
7728#[doc = "          \"$ref\": \"#/components/schemas/RpcRequestValidationErrorKind\""]
7729#[doc = "        },"]
7730#[doc = "        \"name\": {"]
7731#[doc = "          \"type\": \"string\","]
7732#[doc = "          \"enum\": ["]
7733#[doc = "            \"REQUEST_VALIDATION_ERROR\""]
7734#[doc = "          ]"]
7735#[doc = "        }"]
7736#[doc = "      }"]
7737#[doc = "    },"]
7738#[doc = "    {"]
7739#[doc = "      \"type\": \"object\","]
7740#[doc = "      \"required\": ["]
7741#[doc = "        \"cause\","]
7742#[doc = "        \"name\""]
7743#[doc = "      ],"]
7744#[doc = "      \"properties\": {"]
7745#[doc = "        \"cause\": {"]
7746#[doc = "          \"$ref\": \"#/components/schemas/RpcValidatorError\""]
7747#[doc = "        },"]
7748#[doc = "        \"name\": {"]
7749#[doc = "          \"type\": \"string\","]
7750#[doc = "          \"enum\": ["]
7751#[doc = "            \"HANDLER_ERROR\""]
7752#[doc = "          ]"]
7753#[doc = "        }"]
7754#[doc = "      }"]
7755#[doc = "    },"]
7756#[doc = "    {"]
7757#[doc = "      \"type\": \"object\","]
7758#[doc = "      \"required\": ["]
7759#[doc = "        \"cause\","]
7760#[doc = "        \"name\""]
7761#[doc = "      ],"]
7762#[doc = "      \"properties\": {"]
7763#[doc = "        \"cause\": {"]
7764#[doc = "          \"$ref\": \"#/components/schemas/InternalError\""]
7765#[doc = "        },"]
7766#[doc = "        \"name\": {"]
7767#[doc = "          \"type\": \"string\","]
7768#[doc = "          \"enum\": ["]
7769#[doc = "            \"INTERNAL_ERROR\""]
7770#[doc = "          ]"]
7771#[doc = "        }"]
7772#[doc = "      }"]
7773#[doc = "    }"]
7774#[doc = "  ]"]
7775#[doc = "}"]
7776#[doc = r" ```"]
7777#[doc = r" </details>"]
7778#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
7779#[serde(tag = "name", content = "cause")]
7780pub enum ErrorWrapperForRpcValidatorError {
7781    #[serde(rename = "REQUEST_VALIDATION_ERROR")]
7782    RequestValidationError(RpcRequestValidationErrorKind),
7783    #[serde(rename = "HANDLER_ERROR")]
7784    HandlerError(RpcValidatorError),
7785    #[serde(rename = "INTERNAL_ERROR")]
7786    InternalError(InternalError),
7787}
7788impl ::std::convert::From<&Self> for ErrorWrapperForRpcValidatorError {
7789    fn from(value: &ErrorWrapperForRpcValidatorError) -> Self {
7790        value.clone()
7791    }
7792}
7793impl ::std::convert::From<RpcRequestValidationErrorKind> for ErrorWrapperForRpcValidatorError {
7794    fn from(value: RpcRequestValidationErrorKind) -> Self {
7795        Self::RequestValidationError(value)
7796    }
7797}
7798impl ::std::convert::From<RpcValidatorError> for ErrorWrapperForRpcValidatorError {
7799    fn from(value: RpcValidatorError) -> Self {
7800        Self::HandlerError(value)
7801    }
7802}
7803impl ::std::convert::From<InternalError> for ErrorWrapperForRpcValidatorError {
7804    fn from(value: InternalError) -> Self {
7805        Self::InternalError(value)
7806    }
7807}
7808#[doc = "`ExecutionMetadataView`"]
7809#[doc = r""]
7810#[doc = r" <details><summary>JSON schema</summary>"]
7811#[doc = r""]
7812#[doc = r" ```json"]
7813#[doc = "{"]
7814#[doc = "  \"type\": \"object\","]
7815#[doc = "  \"required\": ["]
7816#[doc = "    \"version\""]
7817#[doc = "  ],"]
7818#[doc = "  \"properties\": {"]
7819#[doc = "    \"gas_profile\": {"]
7820#[doc = "      \"type\": ["]
7821#[doc = "        \"array\","]
7822#[doc = "        \"null\""]
7823#[doc = "      ],"]
7824#[doc = "      \"items\": {"]
7825#[doc = "        \"$ref\": \"#/components/schemas/CostGasUsed\""]
7826#[doc = "      }"]
7827#[doc = "    },"]
7828#[doc = "    \"version\": {"]
7829#[doc = "      \"type\": \"integer\","]
7830#[doc = "      \"format\": \"uint32\","]
7831#[doc = "      \"minimum\": 0.0"]
7832#[doc = "    }"]
7833#[doc = "  }"]
7834#[doc = "}"]
7835#[doc = r" ```"]
7836#[doc = r" </details>"]
7837#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
7838pub struct ExecutionMetadataView {
7839    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
7840    pub gas_profile: ::std::option::Option<::std::vec::Vec<CostGasUsed>>,
7841    pub version: u32,
7842}
7843impl ::std::convert::From<&ExecutionMetadataView> for ExecutionMetadataView {
7844    fn from(value: &ExecutionMetadataView) -> Self {
7845        value.clone()
7846    }
7847}
7848#[doc = "`ExecutionOutcomeView`"]
7849#[doc = r""]
7850#[doc = r" <details><summary>JSON schema</summary>"]
7851#[doc = r""]
7852#[doc = r" ```json"]
7853#[doc = "{"]
7854#[doc = "  \"type\": \"object\","]
7855#[doc = "  \"required\": ["]
7856#[doc = "    \"executor_id\","]
7857#[doc = "    \"gas_burnt\","]
7858#[doc = "    \"logs\","]
7859#[doc = "    \"receipt_ids\","]
7860#[doc = "    \"status\","]
7861#[doc = "    \"tokens_burnt\""]
7862#[doc = "  ],"]
7863#[doc = "  \"properties\": {"]
7864#[doc = "    \"executor_id\": {"]
7865#[doc = "      \"description\": \"The id of the account on which the execution happens. For transaction this is signer_id,\\nfor receipt this is receiver_id.\","]
7866#[doc = "      \"allOf\": ["]
7867#[doc = "        {"]
7868#[doc = "          \"$ref\": \"#/components/schemas/AccountId\""]
7869#[doc = "        }"]
7870#[doc = "      ]"]
7871#[doc = "    },"]
7872#[doc = "    \"gas_burnt\": {"]
7873#[doc = "      \"description\": \"The amount of the gas burnt by the given transaction or receipt.\","]
7874#[doc = "      \"allOf\": ["]
7875#[doc = "        {"]
7876#[doc = "          \"$ref\": \"#/components/schemas/NearGas\""]
7877#[doc = "        }"]
7878#[doc = "      ]"]
7879#[doc = "    },"]
7880#[doc = "    \"logs\": {"]
7881#[doc = "      \"description\": \"Logs from this transaction or receipt.\","]
7882#[doc = "      \"type\": \"array\","]
7883#[doc = "      \"items\": {"]
7884#[doc = "        \"type\": \"string\""]
7885#[doc = "      }"]
7886#[doc = "    },"]
7887#[doc = "    \"metadata\": {"]
7888#[doc = "      \"description\": \"Execution metadata, versioned\","]
7889#[doc = "      \"default\": {"]
7890#[doc = "        \"version\": 1"]
7891#[doc = "      },"]
7892#[doc = "      \"allOf\": ["]
7893#[doc = "        {"]
7894#[doc = "          \"$ref\": \"#/components/schemas/ExecutionMetadataView\""]
7895#[doc = "        }"]
7896#[doc = "      ]"]
7897#[doc = "    },"]
7898#[doc = "    \"receipt_ids\": {"]
7899#[doc = "      \"description\": \"Receipt IDs generated by this transaction or receipt.\","]
7900#[doc = "      \"type\": \"array\","]
7901#[doc = "      \"items\": {"]
7902#[doc = "        \"$ref\": \"#/components/schemas/CryptoHash\""]
7903#[doc = "      }"]
7904#[doc = "    },"]
7905#[doc = "    \"status\": {"]
7906#[doc = "      \"description\": \"Execution status. Contains the result in case of successful execution.\","]
7907#[doc = "      \"allOf\": ["]
7908#[doc = "        {"]
7909#[doc = "          \"$ref\": \"#/components/schemas/ExecutionStatusView\""]
7910#[doc = "        }"]
7911#[doc = "      ]"]
7912#[doc = "    },"]
7913#[doc = "    \"tokens_burnt\": {"]
7914#[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.\","]
7915#[doc = "      \"allOf\": ["]
7916#[doc = "        {"]
7917#[doc = "          \"$ref\": \"#/components/schemas/NearToken\""]
7918#[doc = "        }"]
7919#[doc = "      ]"]
7920#[doc = "    }"]
7921#[doc = "  }"]
7922#[doc = "}"]
7923#[doc = r" ```"]
7924#[doc = r" </details>"]
7925#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
7926pub struct ExecutionOutcomeView {
7927    #[doc = "The id of the account on which the execution happens. For transaction this is signer_id,\nfor receipt this is receiver_id."]
7928    pub executor_id: AccountId,
7929    #[doc = "The amount of the gas burnt by the given transaction or receipt."]
7930    pub gas_burnt: NearGas,
7931    #[doc = "Logs from this transaction or receipt."]
7932    pub logs: ::std::vec::Vec<::std::string::String>,
7933    #[doc = "Execution metadata, versioned"]
7934    #[serde(default = "defaults::execution_outcome_view_metadata")]
7935    pub metadata: ExecutionMetadataView,
7936    #[doc = "Receipt IDs generated by this transaction or receipt."]
7937    pub receipt_ids: ::std::vec::Vec<CryptoHash>,
7938    #[doc = "Execution status. Contains the result in case of successful execution."]
7939    pub status: ExecutionStatusView,
7940    #[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."]
7941    pub tokens_burnt: NearToken,
7942}
7943impl ::std::convert::From<&ExecutionOutcomeView> for ExecutionOutcomeView {
7944    fn from(value: &ExecutionOutcomeView) -> Self {
7945        value.clone()
7946    }
7947}
7948#[doc = "`ExecutionOutcomeWithIdView`"]
7949#[doc = r""]
7950#[doc = r" <details><summary>JSON schema</summary>"]
7951#[doc = r""]
7952#[doc = r" ```json"]
7953#[doc = "{"]
7954#[doc = "  \"type\": \"object\","]
7955#[doc = "  \"required\": ["]
7956#[doc = "    \"block_hash\","]
7957#[doc = "    \"id\","]
7958#[doc = "    \"outcome\","]
7959#[doc = "    \"proof\""]
7960#[doc = "  ],"]
7961#[doc = "  \"properties\": {"]
7962#[doc = "    \"block_hash\": {"]
7963#[doc = "      \"$ref\": \"#/components/schemas/CryptoHash\""]
7964#[doc = "    },"]
7965#[doc = "    \"id\": {"]
7966#[doc = "      \"$ref\": \"#/components/schemas/CryptoHash\""]
7967#[doc = "    },"]
7968#[doc = "    \"outcome\": {"]
7969#[doc = "      \"$ref\": \"#/components/schemas/ExecutionOutcomeView\""]
7970#[doc = "    },"]
7971#[doc = "    \"proof\": {"]
7972#[doc = "      \"type\": \"array\","]
7973#[doc = "      \"items\": {"]
7974#[doc = "        \"$ref\": \"#/components/schemas/MerklePathItem\""]
7975#[doc = "      }"]
7976#[doc = "    }"]
7977#[doc = "  }"]
7978#[doc = "}"]
7979#[doc = r" ```"]
7980#[doc = r" </details>"]
7981#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
7982pub struct ExecutionOutcomeWithIdView {
7983    pub block_hash: CryptoHash,
7984    pub id: CryptoHash,
7985    pub outcome: ExecutionOutcomeView,
7986    pub proof: ::std::vec::Vec<MerklePathItem>,
7987}
7988impl ::std::convert::From<&ExecutionOutcomeWithIdView> for ExecutionOutcomeWithIdView {
7989    fn from(value: &ExecutionOutcomeWithIdView) -> Self {
7990        value.clone()
7991    }
7992}
7993#[doc = "`ExecutionStatusView`"]
7994#[doc = r""]
7995#[doc = r" <details><summary>JSON schema</summary>"]
7996#[doc = r""]
7997#[doc = r" ```json"]
7998#[doc = "{"]
7999#[doc = "  \"oneOf\": ["]
8000#[doc = "    {"]
8001#[doc = "      \"description\": \"The execution is pending or unknown.\","]
8002#[doc = "      \"type\": \"string\","]
8003#[doc = "      \"enum\": ["]
8004#[doc = "        \"Unknown\""]
8005#[doc = "      ]"]
8006#[doc = "    },"]
8007#[doc = "    {"]
8008#[doc = "      \"description\": \"The execution has failed.\","]
8009#[doc = "      \"type\": \"object\","]
8010#[doc = "      \"required\": ["]
8011#[doc = "        \"Failure\""]
8012#[doc = "      ],"]
8013#[doc = "      \"properties\": {"]
8014#[doc = "        \"Failure\": {"]
8015#[doc = "          \"$ref\": \"#/components/schemas/TxExecutionError\""]
8016#[doc = "        }"]
8017#[doc = "      },"]
8018#[doc = "      \"additionalProperties\": false"]
8019#[doc = "    },"]
8020#[doc = "    {"]
8021#[doc = "      \"description\": \"The final action succeeded and returned some value or an empty vec encoded in base64.\","]
8022#[doc = "      \"type\": \"object\","]
8023#[doc = "      \"required\": ["]
8024#[doc = "        \"SuccessValue\""]
8025#[doc = "      ],"]
8026#[doc = "      \"properties\": {"]
8027#[doc = "        \"SuccessValue\": {"]
8028#[doc = "          \"type\": \"string\""]
8029#[doc = "        }"]
8030#[doc = "      },"]
8031#[doc = "      \"additionalProperties\": false"]
8032#[doc = "    },"]
8033#[doc = "    {"]
8034#[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.\","]
8035#[doc = "      \"type\": \"object\","]
8036#[doc = "      \"required\": ["]
8037#[doc = "        \"SuccessReceiptId\""]
8038#[doc = "      ],"]
8039#[doc = "      \"properties\": {"]
8040#[doc = "        \"SuccessReceiptId\": {"]
8041#[doc = "          \"$ref\": \"#/components/schemas/CryptoHash\""]
8042#[doc = "        }"]
8043#[doc = "      },"]
8044#[doc = "      \"additionalProperties\": false"]
8045#[doc = "    }"]
8046#[doc = "  ]"]
8047#[doc = "}"]
8048#[doc = r" ```"]
8049#[doc = r" </details>"]
8050#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
8051pub enum ExecutionStatusView {
8052    #[doc = "The execution is pending or unknown."]
8053    Unknown,
8054    #[doc = "The execution has failed."]
8055    Failure(TxExecutionError),
8056    #[doc = "The final action succeeded and returned some value or an empty vec encoded in base64."]
8057    SuccessValue(::std::string::String),
8058    #[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."]
8059    SuccessReceiptId(CryptoHash),
8060}
8061impl ::std::convert::From<&Self> for ExecutionStatusView {
8062    fn from(value: &ExecutionStatusView) -> Self {
8063        value.clone()
8064    }
8065}
8066impl ::std::convert::From<TxExecutionError> for ExecutionStatusView {
8067    fn from(value: TxExecutionError) -> Self {
8068        Self::Failure(value)
8069    }
8070}
8071impl ::std::convert::From<CryptoHash> for ExecutionStatusView {
8072    fn from(value: CryptoHash) -> Self {
8073        Self::SuccessReceiptId(value)
8074    }
8075}
8076#[doc = "Typed view of ExtCostsConfig to preserve JSON output field names in protocol\nconfig RPC output."]
8077#[doc = r""]
8078#[doc = r" <details><summary>JSON schema</summary>"]
8079#[doc = r""]
8080#[doc = r" ```json"]
8081#[doc = "{"]
8082#[doc = "  \"description\": \"Typed view of ExtCostsConfig to preserve JSON output field names in protocol\\nconfig RPC output.\","]
8083#[doc = "  \"type\": \"object\","]
8084#[doc = "  \"required\": ["]
8085#[doc = "    \"alt_bn128_g1_multiexp_base\","]
8086#[doc = "    \"alt_bn128_g1_multiexp_element\","]
8087#[doc = "    \"alt_bn128_g1_sum_base\","]
8088#[doc = "    \"alt_bn128_g1_sum_element\","]
8089#[doc = "    \"alt_bn128_pairing_check_base\","]
8090#[doc = "    \"alt_bn128_pairing_check_element\","]
8091#[doc = "    \"base\","]
8092#[doc = "    \"bls12381_g1_multiexp_base\","]
8093#[doc = "    \"bls12381_g1_multiexp_element\","]
8094#[doc = "    \"bls12381_g2_multiexp_base\","]
8095#[doc = "    \"bls12381_g2_multiexp_element\","]
8096#[doc = "    \"bls12381_map_fp2_to_g2_base\","]
8097#[doc = "    \"bls12381_map_fp2_to_g2_element\","]
8098#[doc = "    \"bls12381_map_fp_to_g1_base\","]
8099#[doc = "    \"bls12381_map_fp_to_g1_element\","]
8100#[doc = "    \"bls12381_p1_decompress_base\","]
8101#[doc = "    \"bls12381_p1_decompress_element\","]
8102#[doc = "    \"bls12381_p1_sum_base\","]
8103#[doc = "    \"bls12381_p1_sum_element\","]
8104#[doc = "    \"bls12381_p2_decompress_base\","]
8105#[doc = "    \"bls12381_p2_decompress_element\","]
8106#[doc = "    \"bls12381_p2_sum_base\","]
8107#[doc = "    \"bls12381_p2_sum_element\","]
8108#[doc = "    \"bls12381_pairing_base\","]
8109#[doc = "    \"bls12381_pairing_element\","]
8110#[doc = "    \"contract_compile_base\","]
8111#[doc = "    \"contract_compile_bytes\","]
8112#[doc = "    \"contract_loading_base\","]
8113#[doc = "    \"contract_loading_bytes\","]
8114#[doc = "    \"ecrecover_base\","]
8115#[doc = "    \"ed25519_verify_base\","]
8116#[doc = "    \"ed25519_verify_byte\","]
8117#[doc = "    \"keccak256_base\","]
8118#[doc = "    \"keccak256_byte\","]
8119#[doc = "    \"keccak512_base\","]
8120#[doc = "    \"keccak512_byte\","]
8121#[doc = "    \"log_base\","]
8122#[doc = "    \"log_byte\","]
8123#[doc = "    \"promise_and_base\","]
8124#[doc = "    \"promise_and_per_promise\","]
8125#[doc = "    \"promise_return\","]
8126#[doc = "    \"read_cached_trie_node\","]
8127#[doc = "    \"read_memory_base\","]
8128#[doc = "    \"read_memory_byte\","]
8129#[doc = "    \"read_register_base\","]
8130#[doc = "    \"read_register_byte\","]
8131#[doc = "    \"ripemd160_base\","]
8132#[doc = "    \"ripemd160_block\","]
8133#[doc = "    \"sha256_base\","]
8134#[doc = "    \"sha256_byte\","]
8135#[doc = "    \"storage_has_key_base\","]
8136#[doc = "    \"storage_has_key_byte\","]
8137#[doc = "    \"storage_iter_create_from_byte\","]
8138#[doc = "    \"storage_iter_create_prefix_base\","]
8139#[doc = "    \"storage_iter_create_prefix_byte\","]
8140#[doc = "    \"storage_iter_create_range_base\","]
8141#[doc = "    \"storage_iter_create_to_byte\","]
8142#[doc = "    \"storage_iter_next_base\","]
8143#[doc = "    \"storage_iter_next_key_byte\","]
8144#[doc = "    \"storage_iter_next_value_byte\","]
8145#[doc = "    \"storage_large_read_overhead_base\","]
8146#[doc = "    \"storage_large_read_overhead_byte\","]
8147#[doc = "    \"storage_read_base\","]
8148#[doc = "    \"storage_read_key_byte\","]
8149#[doc = "    \"storage_read_value_byte\","]
8150#[doc = "    \"storage_remove_base\","]
8151#[doc = "    \"storage_remove_key_byte\","]
8152#[doc = "    \"storage_remove_ret_value_byte\","]
8153#[doc = "    \"storage_write_base\","]
8154#[doc = "    \"storage_write_evicted_byte\","]
8155#[doc = "    \"storage_write_key_byte\","]
8156#[doc = "    \"storage_write_value_byte\","]
8157#[doc = "    \"touching_trie_node\","]
8158#[doc = "    \"utf16_decoding_base\","]
8159#[doc = "    \"utf16_decoding_byte\","]
8160#[doc = "    \"utf8_decoding_base\","]
8161#[doc = "    \"utf8_decoding_byte\","]
8162#[doc = "    \"validator_stake_base\","]
8163#[doc = "    \"validator_total_stake_base\","]
8164#[doc = "    \"write_memory_base\","]
8165#[doc = "    \"write_memory_byte\","]
8166#[doc = "    \"write_register_base\","]
8167#[doc = "    \"write_register_byte\","]
8168#[doc = "    \"yield_create_base\","]
8169#[doc = "    \"yield_create_byte\","]
8170#[doc = "    \"yield_resume_base\","]
8171#[doc = "    \"yield_resume_byte\""]
8172#[doc = "  ],"]
8173#[doc = "  \"properties\": {"]
8174#[doc = "    \"alt_bn128_g1_multiexp_base\": {"]
8175#[doc = "      \"description\": \"Base cost for multiexp\","]
8176#[doc = "      \"allOf\": ["]
8177#[doc = "        {"]
8178#[doc = "          \"$ref\": \"#/components/schemas/NearGas\""]
8179#[doc = "        }"]
8180#[doc = "      ]"]
8181#[doc = "    },"]
8182#[doc = "    \"alt_bn128_g1_multiexp_element\": {"]
8183#[doc = "      \"description\": \"Per element cost for multiexp\","]
8184#[doc = "      \"allOf\": ["]
8185#[doc = "        {"]
8186#[doc = "          \"$ref\": \"#/components/schemas/NearGas\""]
8187#[doc = "        }"]
8188#[doc = "      ]"]
8189#[doc = "    },"]
8190#[doc = "    \"alt_bn128_g1_sum_base\": {"]
8191#[doc = "      \"description\": \"Base cost for sum\","]
8192#[doc = "      \"allOf\": ["]
8193#[doc = "        {"]
8194#[doc = "          \"$ref\": \"#/components/schemas/NearGas\""]
8195#[doc = "        }"]
8196#[doc = "      ]"]
8197#[doc = "    },"]
8198#[doc = "    \"alt_bn128_g1_sum_element\": {"]
8199#[doc = "      \"description\": \"Per element cost for sum\","]
8200#[doc = "      \"allOf\": ["]
8201#[doc = "        {"]
8202#[doc = "          \"$ref\": \"#/components/schemas/NearGas\""]
8203#[doc = "        }"]
8204#[doc = "      ]"]
8205#[doc = "    },"]
8206#[doc = "    \"alt_bn128_pairing_check_base\": {"]
8207#[doc = "      \"description\": \"Base cost for pairing check\","]
8208#[doc = "      \"allOf\": ["]
8209#[doc = "        {"]
8210#[doc = "          \"$ref\": \"#/components/schemas/NearGas\""]
8211#[doc = "        }"]
8212#[doc = "      ]"]
8213#[doc = "    },"]
8214#[doc = "    \"alt_bn128_pairing_check_element\": {"]
8215#[doc = "      \"description\": \"Per element cost for pairing check\","]
8216#[doc = "      \"allOf\": ["]
8217#[doc = "        {"]
8218#[doc = "          \"$ref\": \"#/components/schemas/NearGas\""]
8219#[doc = "        }"]
8220#[doc = "      ]"]
8221#[doc = "    },"]
8222#[doc = "    \"base\": {"]
8223#[doc = "      \"description\": \"Base cost for calling a host function.\","]
8224#[doc = "      \"allOf\": ["]
8225#[doc = "        {"]
8226#[doc = "          \"$ref\": \"#/components/schemas/NearGas\""]
8227#[doc = "        }"]
8228#[doc = "      ]"]
8229#[doc = "    },"]
8230#[doc = "    \"bls12381_g1_multiexp_base\": {"]
8231#[doc = "      \"$ref\": \"#/components/schemas/NearGas\""]
8232#[doc = "    },"]
8233#[doc = "    \"bls12381_g1_multiexp_element\": {"]
8234#[doc = "      \"$ref\": \"#/components/schemas/NearGas\""]
8235#[doc = "    },"]
8236#[doc = "    \"bls12381_g2_multiexp_base\": {"]
8237#[doc = "      \"$ref\": \"#/components/schemas/NearGas\""]
8238#[doc = "    },"]
8239#[doc = "    \"bls12381_g2_multiexp_element\": {"]
8240#[doc = "      \"$ref\": \"#/components/schemas/NearGas\""]
8241#[doc = "    },"]
8242#[doc = "    \"bls12381_map_fp2_to_g2_base\": {"]
8243#[doc = "      \"$ref\": \"#/components/schemas/NearGas\""]
8244#[doc = "    },"]
8245#[doc = "    \"bls12381_map_fp2_to_g2_element\": {"]
8246#[doc = "      \"$ref\": \"#/components/schemas/NearGas\""]
8247#[doc = "    },"]
8248#[doc = "    \"bls12381_map_fp_to_g1_base\": {"]
8249#[doc = "      \"$ref\": \"#/components/schemas/NearGas\""]
8250#[doc = "    },"]
8251#[doc = "    \"bls12381_map_fp_to_g1_element\": {"]
8252#[doc = "      \"$ref\": \"#/components/schemas/NearGas\""]
8253#[doc = "    },"]
8254#[doc = "    \"bls12381_p1_decompress_base\": {"]
8255#[doc = "      \"$ref\": \"#/components/schemas/NearGas\""]
8256#[doc = "    },"]
8257#[doc = "    \"bls12381_p1_decompress_element\": {"]
8258#[doc = "      \"$ref\": \"#/components/schemas/NearGas\""]
8259#[doc = "    },"]
8260#[doc = "    \"bls12381_p1_sum_base\": {"]
8261#[doc = "      \"$ref\": \"#/components/schemas/NearGas\""]
8262#[doc = "    },"]
8263#[doc = "    \"bls12381_p1_sum_element\": {"]
8264#[doc = "      \"$ref\": \"#/components/schemas/NearGas\""]
8265#[doc = "    },"]
8266#[doc = "    \"bls12381_p2_decompress_base\": {"]
8267#[doc = "      \"$ref\": \"#/components/schemas/NearGas\""]
8268#[doc = "    },"]
8269#[doc = "    \"bls12381_p2_decompress_element\": {"]
8270#[doc = "      \"$ref\": \"#/components/schemas/NearGas\""]
8271#[doc = "    },"]
8272#[doc = "    \"bls12381_p2_sum_base\": {"]
8273#[doc = "      \"$ref\": \"#/components/schemas/NearGas\""]
8274#[doc = "    },"]
8275#[doc = "    \"bls12381_p2_sum_element\": {"]
8276#[doc = "      \"$ref\": \"#/components/schemas/NearGas\""]
8277#[doc = "    },"]
8278#[doc = "    \"bls12381_pairing_base\": {"]
8279#[doc = "      \"$ref\": \"#/components/schemas/NearGas\""]
8280#[doc = "    },"]
8281#[doc = "    \"bls12381_pairing_element\": {"]
8282#[doc = "      \"$ref\": \"#/components/schemas/NearGas\""]
8283#[doc = "    },"]
8284#[doc = "    \"contract_compile_base\": {"]
8285#[doc = "      \"$ref\": \"#/components/schemas/NearGas\""]
8286#[doc = "    },"]
8287#[doc = "    \"contract_compile_bytes\": {"]
8288#[doc = "      \"$ref\": \"#/components/schemas/NearGas\""]
8289#[doc = "    },"]
8290#[doc = "    \"contract_loading_base\": {"]
8291#[doc = "      \"description\": \"Base cost of loading a pre-compiled contract\","]
8292#[doc = "      \"allOf\": ["]
8293#[doc = "        {"]
8294#[doc = "          \"$ref\": \"#/components/schemas/NearGas\""]
8295#[doc = "        }"]
8296#[doc = "      ]"]
8297#[doc = "    },"]
8298#[doc = "    \"contract_loading_bytes\": {"]
8299#[doc = "      \"description\": \"Cost per byte of loading a pre-compiled contract\","]
8300#[doc = "      \"allOf\": ["]
8301#[doc = "        {"]
8302#[doc = "          \"$ref\": \"#/components/schemas/NearGas\""]
8303#[doc = "        }"]
8304#[doc = "      ]"]
8305#[doc = "    },"]
8306#[doc = "    \"ecrecover_base\": {"]
8307#[doc = "      \"description\": \"Cost of calling ecrecover\","]
8308#[doc = "      \"allOf\": ["]
8309#[doc = "        {"]
8310#[doc = "          \"$ref\": \"#/components/schemas/NearGas\""]
8311#[doc = "        }"]
8312#[doc = "      ]"]
8313#[doc = "    },"]
8314#[doc = "    \"ed25519_verify_base\": {"]
8315#[doc = "      \"description\": \"Cost of getting ed25519 base\","]
8316#[doc = "      \"allOf\": ["]
8317#[doc = "        {"]
8318#[doc = "          \"$ref\": \"#/components/schemas/NearGas\""]
8319#[doc = "        }"]
8320#[doc = "      ]"]
8321#[doc = "    },"]
8322#[doc = "    \"ed25519_verify_byte\": {"]
8323#[doc = "      \"description\": \"Cost of getting ed25519 per byte\","]
8324#[doc = "      \"allOf\": ["]
8325#[doc = "        {"]
8326#[doc = "          \"$ref\": \"#/components/schemas/NearGas\""]
8327#[doc = "        }"]
8328#[doc = "      ]"]
8329#[doc = "    },"]
8330#[doc = "    \"keccak256_base\": {"]
8331#[doc = "      \"description\": \"Cost of getting sha256 base\","]
8332#[doc = "      \"allOf\": ["]
8333#[doc = "        {"]
8334#[doc = "          \"$ref\": \"#/components/schemas/NearGas\""]
8335#[doc = "        }"]
8336#[doc = "      ]"]
8337#[doc = "    },"]
8338#[doc = "    \"keccak256_byte\": {"]
8339#[doc = "      \"description\": \"Cost of getting sha256 per byte\","]
8340#[doc = "      \"allOf\": ["]
8341#[doc = "        {"]
8342#[doc = "          \"$ref\": \"#/components/schemas/NearGas\""]
8343#[doc = "        }"]
8344#[doc = "      ]"]
8345#[doc = "    },"]
8346#[doc = "    \"keccak512_base\": {"]
8347#[doc = "      \"description\": \"Cost of getting sha256 base\","]
8348#[doc = "      \"allOf\": ["]
8349#[doc = "        {"]
8350#[doc = "          \"$ref\": \"#/components/schemas/NearGas\""]
8351#[doc = "        }"]
8352#[doc = "      ]"]
8353#[doc = "    },"]
8354#[doc = "    \"keccak512_byte\": {"]
8355#[doc = "      \"description\": \"Cost of getting sha256 per byte\","]
8356#[doc = "      \"allOf\": ["]
8357#[doc = "        {"]
8358#[doc = "          \"$ref\": \"#/components/schemas/NearGas\""]
8359#[doc = "        }"]
8360#[doc = "      ]"]
8361#[doc = "    },"]
8362#[doc = "    \"log_base\": {"]
8363#[doc = "      \"description\": \"Cost for calling logging.\","]
8364#[doc = "      \"allOf\": ["]
8365#[doc = "        {"]
8366#[doc = "          \"$ref\": \"#/components/schemas/NearGas\""]
8367#[doc = "        }"]
8368#[doc = "      ]"]
8369#[doc = "    },"]
8370#[doc = "    \"log_byte\": {"]
8371#[doc = "      \"description\": \"Cost for logging per byte\","]
8372#[doc = "      \"allOf\": ["]
8373#[doc = "        {"]
8374#[doc = "          \"$ref\": \"#/components/schemas/NearGas\""]
8375#[doc = "        }"]
8376#[doc = "      ]"]
8377#[doc = "    },"]
8378#[doc = "    \"promise_and_base\": {"]
8379#[doc = "      \"description\": \"Cost for calling `promise_and`\","]
8380#[doc = "      \"allOf\": ["]
8381#[doc = "        {"]
8382#[doc = "          \"$ref\": \"#/components/schemas/NearGas\""]
8383#[doc = "        }"]
8384#[doc = "      ]"]
8385#[doc = "    },"]
8386#[doc = "    \"promise_and_per_promise\": {"]
8387#[doc = "      \"description\": \"Cost for calling `promise_and` for each promise\","]
8388#[doc = "      \"allOf\": ["]
8389#[doc = "        {"]
8390#[doc = "          \"$ref\": \"#/components/schemas/NearGas\""]
8391#[doc = "        }"]
8392#[doc = "      ]"]
8393#[doc = "    },"]
8394#[doc = "    \"promise_return\": {"]
8395#[doc = "      \"description\": \"Cost for calling `promise_return`\","]
8396#[doc = "      \"allOf\": ["]
8397#[doc = "        {"]
8398#[doc = "          \"$ref\": \"#/components/schemas/NearGas\""]
8399#[doc = "        }"]
8400#[doc = "      ]"]
8401#[doc = "    },"]
8402#[doc = "    \"read_cached_trie_node\": {"]
8403#[doc = "      \"description\": \"Cost for reading trie node from memory\","]
8404#[doc = "      \"allOf\": ["]
8405#[doc = "        {"]
8406#[doc = "          \"$ref\": \"#/components/schemas/NearGas\""]
8407#[doc = "        }"]
8408#[doc = "      ]"]
8409#[doc = "    },"]
8410#[doc = "    \"read_memory_base\": {"]
8411#[doc = "      \"description\": \"Base cost for guest memory read\","]
8412#[doc = "      \"allOf\": ["]
8413#[doc = "        {"]
8414#[doc = "          \"$ref\": \"#/components/schemas/NearGas\""]
8415#[doc = "        }"]
8416#[doc = "      ]"]
8417#[doc = "    },"]
8418#[doc = "    \"read_memory_byte\": {"]
8419#[doc = "      \"description\": \"Cost for guest memory read\","]
8420#[doc = "      \"allOf\": ["]
8421#[doc = "        {"]
8422#[doc = "          \"$ref\": \"#/components/schemas/NearGas\""]
8423#[doc = "        }"]
8424#[doc = "      ]"]
8425#[doc = "    },"]
8426#[doc = "    \"read_register_base\": {"]
8427#[doc = "      \"description\": \"Base cost for reading from register\","]
8428#[doc = "      \"allOf\": ["]
8429#[doc = "        {"]
8430#[doc = "          \"$ref\": \"#/components/schemas/NearGas\""]
8431#[doc = "        }"]
8432#[doc = "      ]"]
8433#[doc = "    },"]
8434#[doc = "    \"read_register_byte\": {"]
8435#[doc = "      \"description\": \"Cost for reading byte from register\","]
8436#[doc = "      \"allOf\": ["]
8437#[doc = "        {"]
8438#[doc = "          \"$ref\": \"#/components/schemas/NearGas\""]
8439#[doc = "        }"]
8440#[doc = "      ]"]
8441#[doc = "    },"]
8442#[doc = "    \"ripemd160_base\": {"]
8443#[doc = "      \"description\": \"Cost of getting ripemd160 base\","]
8444#[doc = "      \"allOf\": ["]
8445#[doc = "        {"]
8446#[doc = "          \"$ref\": \"#/components/schemas/NearGas\""]
8447#[doc = "        }"]
8448#[doc = "      ]"]
8449#[doc = "    },"]
8450#[doc = "    \"ripemd160_block\": {"]
8451#[doc = "      \"description\": \"Cost of getting ripemd160 per message block\","]
8452#[doc = "      \"allOf\": ["]
8453#[doc = "        {"]
8454#[doc = "          \"$ref\": \"#/components/schemas/NearGas\""]
8455#[doc = "        }"]
8456#[doc = "      ]"]
8457#[doc = "    },"]
8458#[doc = "    \"sha256_base\": {"]
8459#[doc = "      \"description\": \"Cost of getting sha256 base\","]
8460#[doc = "      \"allOf\": ["]
8461#[doc = "        {"]
8462#[doc = "          \"$ref\": \"#/components/schemas/NearGas\""]
8463#[doc = "        }"]
8464#[doc = "      ]"]
8465#[doc = "    },"]
8466#[doc = "    \"sha256_byte\": {"]
8467#[doc = "      \"description\": \"Cost of getting sha256 per byte\","]
8468#[doc = "      \"allOf\": ["]
8469#[doc = "        {"]
8470#[doc = "          \"$ref\": \"#/components/schemas/NearGas\""]
8471#[doc = "        }"]
8472#[doc = "      ]"]
8473#[doc = "    },"]
8474#[doc = "    \"storage_has_key_base\": {"]
8475#[doc = "      \"description\": \"Storage trie check for key existence cost base\","]
8476#[doc = "      \"allOf\": ["]
8477#[doc = "        {"]
8478#[doc = "          \"$ref\": \"#/components/schemas/NearGas\""]
8479#[doc = "        }"]
8480#[doc = "      ]"]
8481#[doc = "    },"]
8482#[doc = "    \"storage_has_key_byte\": {"]
8483#[doc = "      \"description\": \"Storage trie check for key existence per key byte\","]
8484#[doc = "      \"allOf\": ["]
8485#[doc = "        {"]
8486#[doc = "          \"$ref\": \"#/components/schemas/NearGas\""]
8487#[doc = "        }"]
8488#[doc = "      ]"]
8489#[doc = "    },"]
8490#[doc = "    \"storage_iter_create_from_byte\": {"]
8491#[doc = "      \"description\": \"Create trie range iterator cost per byte of from key.\","]
8492#[doc = "      \"allOf\": ["]
8493#[doc = "        {"]
8494#[doc = "          \"$ref\": \"#/components/schemas/NearGas\""]
8495#[doc = "        }"]
8496#[doc = "      ]"]
8497#[doc = "    },"]
8498#[doc = "    \"storage_iter_create_prefix_base\": {"]
8499#[doc = "      \"description\": \"Create trie prefix iterator cost base\","]
8500#[doc = "      \"allOf\": ["]
8501#[doc = "        {"]
8502#[doc = "          \"$ref\": \"#/components/schemas/NearGas\""]
8503#[doc = "        }"]
8504#[doc = "      ]"]
8505#[doc = "    },"]
8506#[doc = "    \"storage_iter_create_prefix_byte\": {"]
8507#[doc = "      \"description\": \"Create trie prefix iterator cost per byte.\","]
8508#[doc = "      \"allOf\": ["]
8509#[doc = "        {"]
8510#[doc = "          \"$ref\": \"#/components/schemas/NearGas\""]
8511#[doc = "        }"]
8512#[doc = "      ]"]
8513#[doc = "    },"]
8514#[doc = "    \"storage_iter_create_range_base\": {"]
8515#[doc = "      \"description\": \"Create trie range iterator cost base\","]
8516#[doc = "      \"allOf\": ["]
8517#[doc = "        {"]
8518#[doc = "          \"$ref\": \"#/components/schemas/NearGas\""]
8519#[doc = "        }"]
8520#[doc = "      ]"]
8521#[doc = "    },"]
8522#[doc = "    \"storage_iter_create_to_byte\": {"]
8523#[doc = "      \"description\": \"Create trie range iterator cost per byte of to key.\","]
8524#[doc = "      \"allOf\": ["]
8525#[doc = "        {"]
8526#[doc = "          \"$ref\": \"#/components/schemas/NearGas\""]
8527#[doc = "        }"]
8528#[doc = "      ]"]
8529#[doc = "    },"]
8530#[doc = "    \"storage_iter_next_base\": {"]
8531#[doc = "      \"description\": \"Trie iterator per key base cost\","]
8532#[doc = "      \"allOf\": ["]
8533#[doc = "        {"]
8534#[doc = "          \"$ref\": \"#/components/schemas/NearGas\""]
8535#[doc = "        }"]
8536#[doc = "      ]"]
8537#[doc = "    },"]
8538#[doc = "    \"storage_iter_next_key_byte\": {"]
8539#[doc = "      \"description\": \"Trie iterator next key byte cost\","]
8540#[doc = "      \"allOf\": ["]
8541#[doc = "        {"]
8542#[doc = "          \"$ref\": \"#/components/schemas/NearGas\""]
8543#[doc = "        }"]
8544#[doc = "      ]"]
8545#[doc = "    },"]
8546#[doc = "    \"storage_iter_next_value_byte\": {"]
8547#[doc = "      \"description\": \"Trie iterator next key byte cost\","]
8548#[doc = "      \"allOf\": ["]
8549#[doc = "        {"]
8550#[doc = "          \"$ref\": \"#/components/schemas/NearGas\""]
8551#[doc = "        }"]
8552#[doc = "      ]"]
8553#[doc = "    },"]
8554#[doc = "    \"storage_large_read_overhead_base\": {"]
8555#[doc = "      \"description\": \"Storage trie read key overhead base cost, when doing large reads\","]
8556#[doc = "      \"allOf\": ["]
8557#[doc = "        {"]
8558#[doc = "          \"$ref\": \"#/components/schemas/NearGas\""]
8559#[doc = "        }"]
8560#[doc = "      ]"]
8561#[doc = "    },"]
8562#[doc = "    \"storage_large_read_overhead_byte\": {"]
8563#[doc = "      \"description\": \"Storage trie read key overhead  per-byte cost, when doing large reads\","]
8564#[doc = "      \"allOf\": ["]
8565#[doc = "        {"]
8566#[doc = "          \"$ref\": \"#/components/schemas/NearGas\""]
8567#[doc = "        }"]
8568#[doc = "      ]"]
8569#[doc = "    },"]
8570#[doc = "    \"storage_read_base\": {"]
8571#[doc = "      \"description\": \"Storage trie read key base cost\","]
8572#[doc = "      \"allOf\": ["]
8573#[doc = "        {"]
8574#[doc = "          \"$ref\": \"#/components/schemas/NearGas\""]
8575#[doc = "        }"]
8576#[doc = "      ]"]
8577#[doc = "    },"]
8578#[doc = "    \"storage_read_key_byte\": {"]
8579#[doc = "      \"description\": \"Storage trie read key per byte cost\","]
8580#[doc = "      \"allOf\": ["]
8581#[doc = "        {"]
8582#[doc = "          \"$ref\": \"#/components/schemas/NearGas\""]
8583#[doc = "        }"]
8584#[doc = "      ]"]
8585#[doc = "    },"]
8586#[doc = "    \"storage_read_value_byte\": {"]
8587#[doc = "      \"description\": \"Storage trie read value cost per byte cost\","]
8588#[doc = "      \"allOf\": ["]
8589#[doc = "        {"]
8590#[doc = "          \"$ref\": \"#/components/schemas/NearGas\""]
8591#[doc = "        }"]
8592#[doc = "      ]"]
8593#[doc = "    },"]
8594#[doc = "    \"storage_remove_base\": {"]
8595#[doc = "      \"description\": \"Remove key from trie base cost\","]
8596#[doc = "      \"allOf\": ["]
8597#[doc = "        {"]
8598#[doc = "          \"$ref\": \"#/components/schemas/NearGas\""]
8599#[doc = "        }"]
8600#[doc = "      ]"]
8601#[doc = "    },"]
8602#[doc = "    \"storage_remove_key_byte\": {"]
8603#[doc = "      \"description\": \"Remove key from trie per byte cost\","]
8604#[doc = "      \"allOf\": ["]
8605#[doc = "        {"]
8606#[doc = "          \"$ref\": \"#/components/schemas/NearGas\""]
8607#[doc = "        }"]
8608#[doc = "      ]"]
8609#[doc = "    },"]
8610#[doc = "    \"storage_remove_ret_value_byte\": {"]
8611#[doc = "      \"description\": \"Remove key from trie ret value byte cost\","]
8612#[doc = "      \"allOf\": ["]
8613#[doc = "        {"]
8614#[doc = "          \"$ref\": \"#/components/schemas/NearGas\""]
8615#[doc = "        }"]
8616#[doc = "      ]"]
8617#[doc = "    },"]
8618#[doc = "    \"storage_write_base\": {"]
8619#[doc = "      \"description\": \"Storage trie write key base cost\","]
8620#[doc = "      \"allOf\": ["]
8621#[doc = "        {"]
8622#[doc = "          \"$ref\": \"#/components/schemas/NearGas\""]
8623#[doc = "        }"]
8624#[doc = "      ]"]
8625#[doc = "    },"]
8626#[doc = "    \"storage_write_evicted_byte\": {"]
8627#[doc = "      \"description\": \"Storage trie write cost per byte of evicted value.\","]
8628#[doc = "      \"allOf\": ["]
8629#[doc = "        {"]
8630#[doc = "          \"$ref\": \"#/components/schemas/NearGas\""]
8631#[doc = "        }"]
8632#[doc = "      ]"]
8633#[doc = "    },"]
8634#[doc = "    \"storage_write_key_byte\": {"]
8635#[doc = "      \"description\": \"Storage trie write key per byte cost\","]
8636#[doc = "      \"allOf\": ["]
8637#[doc = "        {"]
8638#[doc = "          \"$ref\": \"#/components/schemas/NearGas\""]
8639#[doc = "        }"]
8640#[doc = "      ]"]
8641#[doc = "    },"]
8642#[doc = "    \"storage_write_value_byte\": {"]
8643#[doc = "      \"description\": \"Storage trie write value per byte cost\","]
8644#[doc = "      \"allOf\": ["]
8645#[doc = "        {"]
8646#[doc = "          \"$ref\": \"#/components/schemas/NearGas\""]
8647#[doc = "        }"]
8648#[doc = "      ]"]
8649#[doc = "    },"]
8650#[doc = "    \"touching_trie_node\": {"]
8651#[doc = "      \"description\": \"Cost per reading trie node from DB\","]
8652#[doc = "      \"allOf\": ["]
8653#[doc = "        {"]
8654#[doc = "          \"$ref\": \"#/components/schemas/NearGas\""]
8655#[doc = "        }"]
8656#[doc = "      ]"]
8657#[doc = "    },"]
8658#[doc = "    \"utf16_decoding_base\": {"]
8659#[doc = "      \"description\": \"Base cost of decoding utf16. It's used for `log_utf16`.\","]
8660#[doc = "      \"allOf\": ["]
8661#[doc = "        {"]
8662#[doc = "          \"$ref\": \"#/components/schemas/NearGas\""]
8663#[doc = "        }"]
8664#[doc = "      ]"]
8665#[doc = "    },"]
8666#[doc = "    \"utf16_decoding_byte\": {"]
8667#[doc = "      \"description\": \"Cost per byte of decoding utf16. It's used for `log_utf16`.\","]
8668#[doc = "      \"allOf\": ["]
8669#[doc = "        {"]
8670#[doc = "          \"$ref\": \"#/components/schemas/NearGas\""]
8671#[doc = "        }"]
8672#[doc = "      ]"]
8673#[doc = "    },"]
8674#[doc = "    \"utf8_decoding_base\": {"]
8675#[doc = "      \"description\": \"Base cost of decoding utf8. It's used for `log_utf8` and `panic_utf8`.\","]
8676#[doc = "      \"allOf\": ["]
8677#[doc = "        {"]
8678#[doc = "          \"$ref\": \"#/components/schemas/NearGas\""]
8679#[doc = "        }"]
8680#[doc = "      ]"]
8681#[doc = "    },"]
8682#[doc = "    \"utf8_decoding_byte\": {"]
8683#[doc = "      \"description\": \"Cost per byte of decoding utf8. It's used for `log_utf8` and `panic_utf8`.\","]
8684#[doc = "      \"allOf\": ["]
8685#[doc = "        {"]
8686#[doc = "          \"$ref\": \"#/components/schemas/NearGas\""]
8687#[doc = "        }"]
8688#[doc = "      ]"]
8689#[doc = "    },"]
8690#[doc = "    \"validator_stake_base\": {"]
8691#[doc = "      \"description\": \"Cost of calling `validator_stake`.\","]
8692#[doc = "      \"allOf\": ["]
8693#[doc = "        {"]
8694#[doc = "          \"$ref\": \"#/components/schemas/NearGas\""]
8695#[doc = "        }"]
8696#[doc = "      ]"]
8697#[doc = "    },"]
8698#[doc = "    \"validator_total_stake_base\": {"]
8699#[doc = "      \"description\": \"Cost of calling `validator_total_stake`.\","]
8700#[doc = "      \"allOf\": ["]
8701#[doc = "        {"]
8702#[doc = "          \"$ref\": \"#/components/schemas/NearGas\""]
8703#[doc = "        }"]
8704#[doc = "      ]"]
8705#[doc = "    },"]
8706#[doc = "    \"write_memory_base\": {"]
8707#[doc = "      \"description\": \"Base cost for guest memory write\","]
8708#[doc = "      \"allOf\": ["]
8709#[doc = "        {"]
8710#[doc = "          \"$ref\": \"#/components/schemas/NearGas\""]
8711#[doc = "        }"]
8712#[doc = "      ]"]
8713#[doc = "    },"]
8714#[doc = "    \"write_memory_byte\": {"]
8715#[doc = "      \"description\": \"Cost for guest memory write per byte\","]
8716#[doc = "      \"allOf\": ["]
8717#[doc = "        {"]
8718#[doc = "          \"$ref\": \"#/components/schemas/NearGas\""]
8719#[doc = "        }"]
8720#[doc = "      ]"]
8721#[doc = "    },"]
8722#[doc = "    \"write_register_base\": {"]
8723#[doc = "      \"description\": \"Base cost for writing into register\","]
8724#[doc = "      \"allOf\": ["]
8725#[doc = "        {"]
8726#[doc = "          \"$ref\": \"#/components/schemas/NearGas\""]
8727#[doc = "        }"]
8728#[doc = "      ]"]
8729#[doc = "    },"]
8730#[doc = "    \"write_register_byte\": {"]
8731#[doc = "      \"description\": \"Cost for writing byte into register\","]
8732#[doc = "      \"allOf\": ["]
8733#[doc = "        {"]
8734#[doc = "          \"$ref\": \"#/components/schemas/NearGas\""]
8735#[doc = "        }"]
8736#[doc = "      ]"]
8737#[doc = "    },"]
8738#[doc = "    \"yield_create_base\": {"]
8739#[doc = "      \"description\": \"Base cost for creating a yield promise.\","]
8740#[doc = "      \"allOf\": ["]
8741#[doc = "        {"]
8742#[doc = "          \"$ref\": \"#/components/schemas/NearGas\""]
8743#[doc = "        }"]
8744#[doc = "      ]"]
8745#[doc = "    },"]
8746#[doc = "    \"yield_create_byte\": {"]
8747#[doc = "      \"description\": \"Per byte cost of arguments and method name.\","]
8748#[doc = "      \"allOf\": ["]
8749#[doc = "        {"]
8750#[doc = "          \"$ref\": \"#/components/schemas/NearGas\""]
8751#[doc = "        }"]
8752#[doc = "      ]"]
8753#[doc = "    },"]
8754#[doc = "    \"yield_resume_base\": {"]
8755#[doc = "      \"description\": \"Base cost for resuming a yield receipt.\","]
8756#[doc = "      \"allOf\": ["]
8757#[doc = "        {"]
8758#[doc = "          \"$ref\": \"#/components/schemas/NearGas\""]
8759#[doc = "        }"]
8760#[doc = "      ]"]
8761#[doc = "    },"]
8762#[doc = "    \"yield_resume_byte\": {"]
8763#[doc = "      \"description\": \"Per byte cost of resume payload.\","]
8764#[doc = "      \"allOf\": ["]
8765#[doc = "        {"]
8766#[doc = "          \"$ref\": \"#/components/schemas/NearGas\""]
8767#[doc = "        }"]
8768#[doc = "      ]"]
8769#[doc = "    }"]
8770#[doc = "  }"]
8771#[doc = "}"]
8772#[doc = r" ```"]
8773#[doc = r" </details>"]
8774#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
8775pub struct ExtCostsConfigView {
8776    #[doc = "Base cost for multiexp"]
8777    pub alt_bn128_g1_multiexp_base: NearGas,
8778    #[doc = "Per element cost for multiexp"]
8779    pub alt_bn128_g1_multiexp_element: NearGas,
8780    #[doc = "Base cost for sum"]
8781    pub alt_bn128_g1_sum_base: NearGas,
8782    #[doc = "Per element cost for sum"]
8783    pub alt_bn128_g1_sum_element: NearGas,
8784    #[doc = "Base cost for pairing check"]
8785    pub alt_bn128_pairing_check_base: NearGas,
8786    #[doc = "Per element cost for pairing check"]
8787    pub alt_bn128_pairing_check_element: NearGas,
8788    #[doc = "Base cost for calling a host function."]
8789    pub base: NearGas,
8790    pub bls12381_g1_multiexp_base: NearGas,
8791    pub bls12381_g1_multiexp_element: NearGas,
8792    pub bls12381_g2_multiexp_base: NearGas,
8793    pub bls12381_g2_multiexp_element: NearGas,
8794    pub bls12381_map_fp2_to_g2_base: NearGas,
8795    pub bls12381_map_fp2_to_g2_element: NearGas,
8796    pub bls12381_map_fp_to_g1_base: NearGas,
8797    pub bls12381_map_fp_to_g1_element: NearGas,
8798    pub bls12381_p1_decompress_base: NearGas,
8799    pub bls12381_p1_decompress_element: NearGas,
8800    pub bls12381_p1_sum_base: NearGas,
8801    pub bls12381_p1_sum_element: NearGas,
8802    pub bls12381_p2_decompress_base: NearGas,
8803    pub bls12381_p2_decompress_element: NearGas,
8804    pub bls12381_p2_sum_base: NearGas,
8805    pub bls12381_p2_sum_element: NearGas,
8806    pub bls12381_pairing_base: NearGas,
8807    pub bls12381_pairing_element: NearGas,
8808    pub contract_compile_base: NearGas,
8809    pub contract_compile_bytes: NearGas,
8810    #[doc = "Base cost of loading a pre-compiled contract"]
8811    pub contract_loading_base: NearGas,
8812    #[doc = "Cost per byte of loading a pre-compiled contract"]
8813    pub contract_loading_bytes: NearGas,
8814    #[doc = "Cost of calling ecrecover"]
8815    pub ecrecover_base: NearGas,
8816    #[doc = "Cost of getting ed25519 base"]
8817    pub ed25519_verify_base: NearGas,
8818    #[doc = "Cost of getting ed25519 per byte"]
8819    pub ed25519_verify_byte: NearGas,
8820    #[doc = "Cost of getting sha256 base"]
8821    pub keccak256_base: NearGas,
8822    #[doc = "Cost of getting sha256 per byte"]
8823    pub keccak256_byte: NearGas,
8824    #[doc = "Cost of getting sha256 base"]
8825    pub keccak512_base: NearGas,
8826    #[doc = "Cost of getting sha256 per byte"]
8827    pub keccak512_byte: NearGas,
8828    #[doc = "Cost for calling logging."]
8829    pub log_base: NearGas,
8830    #[doc = "Cost for logging per byte"]
8831    pub log_byte: NearGas,
8832    #[doc = "Cost for calling `promise_and`"]
8833    pub promise_and_base: NearGas,
8834    #[doc = "Cost for calling `promise_and` for each promise"]
8835    pub promise_and_per_promise: NearGas,
8836    #[doc = "Cost for calling `promise_return`"]
8837    pub promise_return: NearGas,
8838    #[doc = "Cost for reading trie node from memory"]
8839    pub read_cached_trie_node: NearGas,
8840    #[doc = "Base cost for guest memory read"]
8841    pub read_memory_base: NearGas,
8842    #[doc = "Cost for guest memory read"]
8843    pub read_memory_byte: NearGas,
8844    #[doc = "Base cost for reading from register"]
8845    pub read_register_base: NearGas,
8846    #[doc = "Cost for reading byte from register"]
8847    pub read_register_byte: NearGas,
8848    #[doc = "Cost of getting ripemd160 base"]
8849    pub ripemd160_base: NearGas,
8850    #[doc = "Cost of getting ripemd160 per message block"]
8851    pub ripemd160_block: NearGas,
8852    #[doc = "Cost of getting sha256 base"]
8853    pub sha256_base: NearGas,
8854    #[doc = "Cost of getting sha256 per byte"]
8855    pub sha256_byte: NearGas,
8856    #[doc = "Storage trie check for key existence cost base"]
8857    pub storage_has_key_base: NearGas,
8858    #[doc = "Storage trie check for key existence per key byte"]
8859    pub storage_has_key_byte: NearGas,
8860    #[doc = "Create trie range iterator cost per byte of from key."]
8861    pub storage_iter_create_from_byte: NearGas,
8862    #[doc = "Create trie prefix iterator cost base"]
8863    pub storage_iter_create_prefix_base: NearGas,
8864    #[doc = "Create trie prefix iterator cost per byte."]
8865    pub storage_iter_create_prefix_byte: NearGas,
8866    #[doc = "Create trie range iterator cost base"]
8867    pub storage_iter_create_range_base: NearGas,
8868    #[doc = "Create trie range iterator cost per byte of to key."]
8869    pub storage_iter_create_to_byte: NearGas,
8870    #[doc = "Trie iterator per key base cost"]
8871    pub storage_iter_next_base: NearGas,
8872    #[doc = "Trie iterator next key byte cost"]
8873    pub storage_iter_next_key_byte: NearGas,
8874    #[doc = "Trie iterator next key byte cost"]
8875    pub storage_iter_next_value_byte: NearGas,
8876    #[doc = "Storage trie read key overhead base cost, when doing large reads"]
8877    pub storage_large_read_overhead_base: NearGas,
8878    #[doc = "Storage trie read key overhead  per-byte cost, when doing large reads"]
8879    pub storage_large_read_overhead_byte: NearGas,
8880    #[doc = "Storage trie read key base cost"]
8881    pub storage_read_base: NearGas,
8882    #[doc = "Storage trie read key per byte cost"]
8883    pub storage_read_key_byte: NearGas,
8884    #[doc = "Storage trie read value cost per byte cost"]
8885    pub storage_read_value_byte: NearGas,
8886    #[doc = "Remove key from trie base cost"]
8887    pub storage_remove_base: NearGas,
8888    #[doc = "Remove key from trie per byte cost"]
8889    pub storage_remove_key_byte: NearGas,
8890    #[doc = "Remove key from trie ret value byte cost"]
8891    pub storage_remove_ret_value_byte: NearGas,
8892    #[doc = "Storage trie write key base cost"]
8893    pub storage_write_base: NearGas,
8894    #[doc = "Storage trie write cost per byte of evicted value."]
8895    pub storage_write_evicted_byte: NearGas,
8896    #[doc = "Storage trie write key per byte cost"]
8897    pub storage_write_key_byte: NearGas,
8898    #[doc = "Storage trie write value per byte cost"]
8899    pub storage_write_value_byte: NearGas,
8900    #[doc = "Cost per reading trie node from DB"]
8901    pub touching_trie_node: NearGas,
8902    #[doc = "Base cost of decoding utf16. It's used for `log_utf16`."]
8903    pub utf16_decoding_base: NearGas,
8904    #[doc = "Cost per byte of decoding utf16. It's used for `log_utf16`."]
8905    pub utf16_decoding_byte: NearGas,
8906    #[doc = "Base cost of decoding utf8. It's used for `log_utf8` and `panic_utf8`."]
8907    pub utf8_decoding_base: NearGas,
8908    #[doc = "Cost per byte of decoding utf8. It's used for `log_utf8` and `panic_utf8`."]
8909    pub utf8_decoding_byte: NearGas,
8910    #[doc = "Cost of calling `validator_stake`."]
8911    pub validator_stake_base: NearGas,
8912    #[doc = "Cost of calling `validator_total_stake`."]
8913    pub validator_total_stake_base: NearGas,
8914    #[doc = "Base cost for guest memory write"]
8915    pub write_memory_base: NearGas,
8916    #[doc = "Cost for guest memory write per byte"]
8917    pub write_memory_byte: NearGas,
8918    #[doc = "Base cost for writing into register"]
8919    pub write_register_base: NearGas,
8920    #[doc = "Cost for writing byte into register"]
8921    pub write_register_byte: NearGas,
8922    #[doc = "Base cost for creating a yield promise."]
8923    pub yield_create_base: NearGas,
8924    #[doc = "Per byte cost of arguments and method name."]
8925    pub yield_create_byte: NearGas,
8926    #[doc = "Base cost for resuming a yield receipt."]
8927    pub yield_resume_base: NearGas,
8928    #[doc = "Per byte cost of resume payload."]
8929    pub yield_resume_byte: NearGas,
8930}
8931impl ::std::convert::From<&ExtCostsConfigView> for ExtCostsConfigView {
8932    fn from(value: &ExtCostsConfigView) -> Self {
8933        value.clone()
8934    }
8935}
8936#[doc = "`ExternalStorageConfig`"]
8937#[doc = r""]
8938#[doc = r" <details><summary>JSON schema</summary>"]
8939#[doc = r""]
8940#[doc = r" ```json"]
8941#[doc = "{"]
8942#[doc = "  \"type\": \"object\","]
8943#[doc = "  \"required\": ["]
8944#[doc = "    \"location\""]
8945#[doc = "  ],"]
8946#[doc = "  \"properties\": {"]
8947#[doc = "    \"external_storage_fallback_threshold\": {"]
8948#[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.\","]
8949#[doc = "      \"default\": 3,"]
8950#[doc = "      \"type\": \"integer\","]
8951#[doc = "      \"format\": \"uint64\","]
8952#[doc = "      \"minimum\": 0.0"]
8953#[doc = "    },"]
8954#[doc = "    \"location\": {"]
8955#[doc = "      \"description\": \"Location of state parts.\","]
8956#[doc = "      \"allOf\": ["]
8957#[doc = "        {"]
8958#[doc = "          \"$ref\": \"#/components/schemas/ExternalStorageLocation\""]
8959#[doc = "        }"]
8960#[doc = "      ]"]
8961#[doc = "    },"]
8962#[doc = "    \"num_concurrent_requests\": {"]
8963#[doc = "      \"description\": \"When fetching state parts from external storage, throttle fetch requests\\nto this many concurrent requests.\","]
8964#[doc = "      \"default\": 25,"]
8965#[doc = "      \"type\": \"integer\","]
8966#[doc = "      \"format\": \"uint8\","]
8967#[doc = "      \"maximum\": 255.0,"]
8968#[doc = "      \"minimum\": 0.0"]
8969#[doc = "    },"]
8970#[doc = "    \"num_concurrent_requests_during_catchup\": {"]
8971#[doc = "      \"description\": \"During catchup, the node will use a different number of concurrent requests\\nto reduce the performance impact of state sync.\","]
8972#[doc = "      \"default\": 5,"]
8973#[doc = "      \"type\": \"integer\","]
8974#[doc = "      \"format\": \"uint8\","]
8975#[doc = "      \"maximum\": 255.0,"]
8976#[doc = "      \"minimum\": 0.0"]
8977#[doc = "    }"]
8978#[doc = "  }"]
8979#[doc = "}"]
8980#[doc = r" ```"]
8981#[doc = r" </details>"]
8982#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
8983pub struct ExternalStorageConfig {
8984    #[doc = "The number of attempts the node will make to obtain a part from peers in\nthe network before it fetches from external storage."]
8985    #[serde(default = "defaults::default_u64::<u64, 3>")]
8986    pub external_storage_fallback_threshold: u64,
8987    #[doc = "Location of state parts."]
8988    pub location: ExternalStorageLocation,
8989    #[doc = "When fetching state parts from external storage, throttle fetch requests\nto this many concurrent requests."]
8990    #[serde(default = "defaults::default_u64::<u8, 25>")]
8991    pub num_concurrent_requests: u8,
8992    #[doc = "During catchup, the node will use a different number of concurrent requests\nto reduce the performance impact of state sync."]
8993    #[serde(default = "defaults::default_u64::<u8, 5>")]
8994    pub num_concurrent_requests_during_catchup: u8,
8995}
8996impl ::std::convert::From<&ExternalStorageConfig> for ExternalStorageConfig {
8997    fn from(value: &ExternalStorageConfig) -> Self {
8998        value.clone()
8999    }
9000}
9001#[doc = "Supported external storage backends and their minimal config."]
9002#[doc = r""]
9003#[doc = r" <details><summary>JSON schema</summary>"]
9004#[doc = r""]
9005#[doc = r" ```json"]
9006#[doc = "{"]
9007#[doc = "  \"description\": \"Supported external storage backends and their minimal config.\","]
9008#[doc = "  \"oneOf\": ["]
9009#[doc = "    {"]
9010#[doc = "      \"type\": \"object\","]
9011#[doc = "      \"required\": ["]
9012#[doc = "        \"S3\""]
9013#[doc = "      ],"]
9014#[doc = "      \"properties\": {"]
9015#[doc = "        \"S3\": {"]
9016#[doc = "          \"type\": \"object\","]
9017#[doc = "          \"required\": ["]
9018#[doc = "            \"bucket\","]
9019#[doc = "            \"region\""]
9020#[doc = "          ],"]
9021#[doc = "          \"properties\": {"]
9022#[doc = "            \"bucket\": {"]
9023#[doc = "              \"description\": \"Location on S3.\","]
9024#[doc = "              \"type\": \"string\""]
9025#[doc = "            },"]
9026#[doc = "            \"region\": {"]
9027#[doc = "              \"description\": \"Data may only be available in certain locations.\","]
9028#[doc = "              \"type\": \"string\""]
9029#[doc = "            }"]
9030#[doc = "          }"]
9031#[doc = "        }"]
9032#[doc = "      },"]
9033#[doc = "      \"additionalProperties\": false"]
9034#[doc = "    },"]
9035#[doc = "    {"]
9036#[doc = "      \"description\": \"Local filesystem root for storing data.\","]
9037#[doc = "      \"type\": \"object\","]
9038#[doc = "      \"required\": ["]
9039#[doc = "        \"Filesystem\""]
9040#[doc = "      ],"]
9041#[doc = "      \"properties\": {"]
9042#[doc = "        \"Filesystem\": {"]
9043#[doc = "          \"type\": \"object\","]
9044#[doc = "          \"required\": ["]
9045#[doc = "            \"root_dir\""]
9046#[doc = "          ],"]
9047#[doc = "          \"properties\": {"]
9048#[doc = "            \"root_dir\": {"]
9049#[doc = "              \"type\": \"string\""]
9050#[doc = "            }"]
9051#[doc = "          }"]
9052#[doc = "        }"]
9053#[doc = "      },"]
9054#[doc = "      \"additionalProperties\": false"]
9055#[doc = "    },"]
9056#[doc = "    {"]
9057#[doc = "      \"description\": \"Google Cloud Storage bucket name.\","]
9058#[doc = "      \"type\": \"object\","]
9059#[doc = "      \"required\": ["]
9060#[doc = "        \"GCS\""]
9061#[doc = "      ],"]
9062#[doc = "      \"properties\": {"]
9063#[doc = "        \"GCS\": {"]
9064#[doc = "          \"type\": \"object\","]
9065#[doc = "          \"required\": ["]
9066#[doc = "            \"bucket\""]
9067#[doc = "          ],"]
9068#[doc = "          \"properties\": {"]
9069#[doc = "            \"bucket\": {"]
9070#[doc = "              \"type\": \"string\""]
9071#[doc = "            }"]
9072#[doc = "          }"]
9073#[doc = "        }"]
9074#[doc = "      },"]
9075#[doc = "      \"additionalProperties\": false"]
9076#[doc = "    }"]
9077#[doc = "  ]"]
9078#[doc = "}"]
9079#[doc = r" ```"]
9080#[doc = r" </details>"]
9081#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
9082pub enum ExternalStorageLocation {
9083    S3 {
9084        #[doc = "Location on S3."]
9085        bucket: ::std::string::String,
9086        #[doc = "Data may only be available in certain locations."]
9087        region: ::std::string::String,
9088    },
9089    #[doc = "Local filesystem root for storing data."]
9090    Filesystem { root_dir: ::std::string::String },
9091    #[doc = "Google Cloud Storage bucket name."]
9092    #[serde(rename = "GCS")]
9093    Gcs { bucket: ::std::string::String },
9094}
9095impl ::std::convert::From<&Self> for ExternalStorageLocation {
9096    fn from(value: &ExternalStorageLocation) -> Self {
9097        value.clone()
9098    }
9099}
9100#[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."]
9101#[doc = r""]
9102#[doc = r" <details><summary>JSON schema</summary>"]
9103#[doc = r""]
9104#[doc = r" ```json"]
9105#[doc = "{"]
9106#[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.\","]
9107#[doc = "  \"type\": \"object\","]
9108#[doc = "  \"required\": ["]
9109#[doc = "    \"execution\","]
9110#[doc = "    \"send_not_sir\","]
9111#[doc = "    \"send_sir\""]
9112#[doc = "  ],"]
9113#[doc = "  \"properties\": {"]
9114#[doc = "    \"execution\": {"]
9115#[doc = "      \"description\": \"Fee for executing the object.\","]
9116#[doc = "      \"allOf\": ["]
9117#[doc = "        {"]
9118#[doc = "          \"$ref\": \"#/components/schemas/NearGas\""]
9119#[doc = "        }"]
9120#[doc = "      ]"]
9121#[doc = "    },"]
9122#[doc = "    \"send_not_sir\": {"]
9123#[doc = "      \"description\": \"Fee for sending an object potentially across the shards.\","]
9124#[doc = "      \"allOf\": ["]
9125#[doc = "        {"]
9126#[doc = "          \"$ref\": \"#/components/schemas/NearGas\""]
9127#[doc = "        }"]
9128#[doc = "      ]"]
9129#[doc = "    },"]
9130#[doc = "    \"send_sir\": {"]
9131#[doc = "      \"description\": \"Fee for sending an object from the sender to itself, guaranteeing that it does not leave\\nthe shard.\","]
9132#[doc = "      \"allOf\": ["]
9133#[doc = "        {"]
9134#[doc = "          \"$ref\": \"#/components/schemas/NearGas\""]
9135#[doc = "        }"]
9136#[doc = "      ]"]
9137#[doc = "    }"]
9138#[doc = "  }"]
9139#[doc = "}"]
9140#[doc = r" ```"]
9141#[doc = r" </details>"]
9142#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
9143pub struct Fee {
9144    #[doc = "Fee for executing the object."]
9145    pub execution: NearGas,
9146    #[doc = "Fee for sending an object potentially across the shards."]
9147    pub send_not_sir: NearGas,
9148    #[doc = "Fee for sending an object from the sender to itself, guaranteeing that it does not leave\nthe shard."]
9149    pub send_sir: NearGas,
9150}
9151impl ::std::convert::From<&Fee> for Fee {
9152    fn from(value: &Fee) -> Self {
9153        value.clone()
9154    }
9155}
9156#[doc = "Execution outcome of the transaction and all the subsequent receipts.\nCould be not finalized yet"]
9157#[doc = r""]
9158#[doc = r" <details><summary>JSON schema</summary>"]
9159#[doc = r""]
9160#[doc = r" ```json"]
9161#[doc = "{"]
9162#[doc = "  \"description\": \"Execution outcome of the transaction and all the subsequent receipts.\\nCould be not finalized yet\","]
9163#[doc = "  \"type\": \"object\","]
9164#[doc = "  \"required\": ["]
9165#[doc = "    \"receipts_outcome\","]
9166#[doc = "    \"status\","]
9167#[doc = "    \"transaction\","]
9168#[doc = "    \"transaction_outcome\""]
9169#[doc = "  ],"]
9170#[doc = "  \"properties\": {"]
9171#[doc = "    \"receipts_outcome\": {"]
9172#[doc = "      \"description\": \"The execution outcome of receipts.\","]
9173#[doc = "      \"type\": \"array\","]
9174#[doc = "      \"items\": {"]
9175#[doc = "        \"$ref\": \"#/components/schemas/ExecutionOutcomeWithIdView\""]
9176#[doc = "      }"]
9177#[doc = "    },"]
9178#[doc = "    \"status\": {"]
9179#[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\","]
9180#[doc = "      \"allOf\": ["]
9181#[doc = "        {"]
9182#[doc = "          \"$ref\": \"#/components/schemas/FinalExecutionStatus\""]
9183#[doc = "        }"]
9184#[doc = "      ]"]
9185#[doc = "    },"]
9186#[doc = "    \"transaction\": {"]
9187#[doc = "      \"description\": \"Signed Transaction\","]
9188#[doc = "      \"allOf\": ["]
9189#[doc = "        {"]
9190#[doc = "          \"$ref\": \"#/components/schemas/SignedTransactionView\""]
9191#[doc = "        }"]
9192#[doc = "      ]"]
9193#[doc = "    },"]
9194#[doc = "    \"transaction_outcome\": {"]
9195#[doc = "      \"description\": \"The execution outcome of the signed transaction.\","]
9196#[doc = "      \"allOf\": ["]
9197#[doc = "        {"]
9198#[doc = "          \"$ref\": \"#/components/schemas/ExecutionOutcomeWithIdView\""]
9199#[doc = "        }"]
9200#[doc = "      ]"]
9201#[doc = "    }"]
9202#[doc = "  }"]
9203#[doc = "}"]
9204#[doc = r" ```"]
9205#[doc = r" </details>"]
9206#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
9207pub struct FinalExecutionOutcomeView {
9208    #[doc = "The execution outcome of receipts."]
9209    pub receipts_outcome: ::std::vec::Vec<ExecutionOutcomeWithIdView>,
9210    #[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"]
9211    pub status: FinalExecutionStatus,
9212    #[doc = "Signed Transaction"]
9213    pub transaction: SignedTransactionView,
9214    #[doc = "The execution outcome of the signed transaction."]
9215    pub transaction_outcome: ExecutionOutcomeWithIdView,
9216}
9217impl ::std::convert::From<&FinalExecutionOutcomeView> for FinalExecutionOutcomeView {
9218    fn from(value: &FinalExecutionOutcomeView) -> Self {
9219        value.clone()
9220    }
9221}
9222#[doc = "Final execution outcome of the transaction and all of subsequent the receipts. Also includes\nthe generated receipt."]
9223#[doc = r""]
9224#[doc = r" <details><summary>JSON schema</summary>"]
9225#[doc = r""]
9226#[doc = r" ```json"]
9227#[doc = "{"]
9228#[doc = "  \"description\": \"Final execution outcome of the transaction and all of subsequent the receipts. Also includes\\nthe generated receipt.\","]
9229#[doc = "  \"type\": \"object\","]
9230#[doc = "  \"required\": ["]
9231#[doc = "    \"receipts\","]
9232#[doc = "    \"receipts_outcome\","]
9233#[doc = "    \"status\","]
9234#[doc = "    \"transaction\","]
9235#[doc = "    \"transaction_outcome\""]
9236#[doc = "  ],"]
9237#[doc = "  \"properties\": {"]
9238#[doc = "    \"receipts\": {"]
9239#[doc = "      \"description\": \"Receipts generated from the transaction\","]
9240#[doc = "      \"type\": \"array\","]
9241#[doc = "      \"items\": {"]
9242#[doc = "        \"$ref\": \"#/components/schemas/ReceiptView\""]
9243#[doc = "      }"]
9244#[doc = "    },"]
9245#[doc = "    \"receipts_outcome\": {"]
9246#[doc = "      \"description\": \"The execution outcome of receipts.\","]
9247#[doc = "      \"type\": \"array\","]
9248#[doc = "      \"items\": {"]
9249#[doc = "        \"$ref\": \"#/components/schemas/ExecutionOutcomeWithIdView\""]
9250#[doc = "      }"]
9251#[doc = "    },"]
9252#[doc = "    \"status\": {"]
9253#[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\","]
9254#[doc = "      \"allOf\": ["]
9255#[doc = "        {"]
9256#[doc = "          \"$ref\": \"#/components/schemas/FinalExecutionStatus\""]
9257#[doc = "        }"]
9258#[doc = "      ]"]
9259#[doc = "    },"]
9260#[doc = "    \"transaction\": {"]
9261#[doc = "      \"description\": \"Signed Transaction\","]
9262#[doc = "      \"allOf\": ["]
9263#[doc = "        {"]
9264#[doc = "          \"$ref\": \"#/components/schemas/SignedTransactionView\""]
9265#[doc = "        }"]
9266#[doc = "      ]"]
9267#[doc = "    },"]
9268#[doc = "    \"transaction_outcome\": {"]
9269#[doc = "      \"description\": \"The execution outcome of the signed transaction.\","]
9270#[doc = "      \"allOf\": ["]
9271#[doc = "        {"]
9272#[doc = "          \"$ref\": \"#/components/schemas/ExecutionOutcomeWithIdView\""]
9273#[doc = "        }"]
9274#[doc = "      ]"]
9275#[doc = "    }"]
9276#[doc = "  }"]
9277#[doc = "}"]
9278#[doc = r" ```"]
9279#[doc = r" </details>"]
9280#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
9281pub struct FinalExecutionOutcomeWithReceiptView {
9282    #[doc = "Receipts generated from the transaction"]
9283    pub receipts: ::std::vec::Vec<ReceiptView>,
9284    #[doc = "The execution outcome of receipts."]
9285    pub receipts_outcome: ::std::vec::Vec<ExecutionOutcomeWithIdView>,
9286    #[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"]
9287    pub status: FinalExecutionStatus,
9288    #[doc = "Signed Transaction"]
9289    pub transaction: SignedTransactionView,
9290    #[doc = "The execution outcome of the signed transaction."]
9291    pub transaction_outcome: ExecutionOutcomeWithIdView,
9292}
9293impl ::std::convert::From<&FinalExecutionOutcomeWithReceiptView>
9294    for FinalExecutionOutcomeWithReceiptView
9295{
9296    fn from(value: &FinalExecutionOutcomeWithReceiptView) -> Self {
9297        value.clone()
9298    }
9299}
9300#[doc = "`FinalExecutionStatus`"]
9301#[doc = r""]
9302#[doc = r" <details><summary>JSON schema</summary>"]
9303#[doc = r""]
9304#[doc = r" ```json"]
9305#[doc = "{"]
9306#[doc = "  \"oneOf\": ["]
9307#[doc = "    {"]
9308#[doc = "      \"description\": \"The execution has not yet started.\","]
9309#[doc = "      \"type\": \"string\","]
9310#[doc = "      \"enum\": ["]
9311#[doc = "        \"NotStarted\""]
9312#[doc = "      ]"]
9313#[doc = "    },"]
9314#[doc = "    {"]
9315#[doc = "      \"description\": \"The execution has started and still going.\","]
9316#[doc = "      \"type\": \"string\","]
9317#[doc = "      \"enum\": ["]
9318#[doc = "        \"Started\""]
9319#[doc = "      ]"]
9320#[doc = "    },"]
9321#[doc = "    {"]
9322#[doc = "      \"description\": \"The execution has failed with the given error.\","]
9323#[doc = "      \"type\": \"object\","]
9324#[doc = "      \"required\": ["]
9325#[doc = "        \"Failure\""]
9326#[doc = "      ],"]
9327#[doc = "      \"properties\": {"]
9328#[doc = "        \"Failure\": {"]
9329#[doc = "          \"$ref\": \"#/components/schemas/TxExecutionError\""]
9330#[doc = "        }"]
9331#[doc = "      },"]
9332#[doc = "      \"additionalProperties\": false"]
9333#[doc = "    },"]
9334#[doc = "    {"]
9335#[doc = "      \"description\": \"The execution has succeeded and returned some value or an empty vec encoded in base64.\","]
9336#[doc = "      \"type\": \"object\","]
9337#[doc = "      \"required\": ["]
9338#[doc = "        \"SuccessValue\""]
9339#[doc = "      ],"]
9340#[doc = "      \"properties\": {"]
9341#[doc = "        \"SuccessValue\": {"]
9342#[doc = "          \"type\": \"string\""]
9343#[doc = "        }"]
9344#[doc = "      },"]
9345#[doc = "      \"additionalProperties\": false"]
9346#[doc = "    }"]
9347#[doc = "  ]"]
9348#[doc = "}"]
9349#[doc = r" ```"]
9350#[doc = r" </details>"]
9351#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
9352pub enum FinalExecutionStatus {
9353    #[doc = "The execution has not yet started."]
9354    NotStarted,
9355    #[doc = "The execution has started and still going."]
9356    Started,
9357    #[doc = "The execution has failed with the given error."]
9358    Failure(TxExecutionError),
9359    #[doc = "The execution has succeeded and returned some value or an empty vec encoded in base64."]
9360    SuccessValue(::std::string::String),
9361}
9362impl ::std::convert::From<&Self> for FinalExecutionStatus {
9363    fn from(value: &FinalExecutionStatus) -> Self {
9364        value.clone()
9365    }
9366}
9367impl ::std::convert::From<TxExecutionError> for FinalExecutionStatus {
9368    fn from(value: TxExecutionError) -> Self {
9369        Self::Failure(value)
9370    }
9371}
9372#[doc = "Different types of finality."]
9373#[doc = r""]
9374#[doc = r" <details><summary>JSON schema</summary>"]
9375#[doc = r""]
9376#[doc = r" ```json"]
9377#[doc = "{"]
9378#[doc = "  \"description\": \"Different types of finality.\","]
9379#[doc = "  \"type\": \"string\","]
9380#[doc = "  \"enum\": ["]
9381#[doc = "    \"optimistic\","]
9382#[doc = "    \"near-final\","]
9383#[doc = "    \"final\""]
9384#[doc = "  ]"]
9385#[doc = "}"]
9386#[doc = r" ```"]
9387#[doc = r" </details>"]
9388#[derive(
9389    :: serde :: Deserialize,
9390    :: serde :: Serialize,
9391    Clone,
9392    Copy,
9393    Debug,
9394    Eq,
9395    Hash,
9396    Ord,
9397    PartialEq,
9398    PartialOrd,
9399)]
9400pub enum Finality {
9401    #[serde(rename = "optimistic")]
9402    Optimistic,
9403    #[serde(rename = "near-final")]
9404    NearFinal,
9405    #[serde(rename = "final")]
9406    Final,
9407}
9408impl ::std::convert::From<&Self> for Finality {
9409    fn from(value: &Finality) -> Self {
9410        value.clone()
9411    }
9412}
9413impl ::std::fmt::Display for Finality {
9414    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
9415        match *self {
9416            Self::Optimistic => f.write_str("optimistic"),
9417            Self::NearFinal => f.write_str("near-final"),
9418            Self::Final => f.write_str("final"),
9419        }
9420    }
9421}
9422impl ::std::str::FromStr for Finality {
9423    type Err = self::error::ConversionError;
9424    fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
9425        match value {
9426            "optimistic" => Ok(Self::Optimistic),
9427            "near-final" => Ok(Self::NearFinal),
9428            "final" => Ok(Self::Final),
9429            _ => Err("invalid value".into()),
9430        }
9431    }
9432}
9433impl ::std::convert::TryFrom<&str> for Finality {
9434    type Error = self::error::ConversionError;
9435    fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
9436        value.parse()
9437    }
9438}
9439impl ::std::convert::TryFrom<&::std::string::String> for Finality {
9440    type Error = self::error::ConversionError;
9441    fn try_from(
9442        value: &::std::string::String,
9443    ) -> ::std::result::Result<Self, self::error::ConversionError> {
9444        value.parse()
9445    }
9446}
9447impl ::std::convert::TryFrom<::std::string::String> for Finality {
9448    type Error = self::error::ConversionError;
9449    fn try_from(
9450        value: ::std::string::String,
9451    ) -> ::std::result::Result<Self, self::error::ConversionError> {
9452        value.parse()
9453    }
9454}
9455#[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)."]
9456#[doc = r""]
9457#[doc = r" <details><summary>JSON schema</summary>"]
9458#[doc = r""]
9459#[doc = r" ```json"]
9460#[doc = "{"]
9461#[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).\","]
9462#[doc = "  \"type\": \"string\","]
9463#[doc = "  \"format\": \"bytes\""]
9464#[doc = "}"]
9465#[doc = r" ```"]
9466#[doc = r" </details>"]
9467#[derive(
9468    :: serde :: Deserialize,
9469    :: serde :: Serialize,
9470    Clone,
9471    Debug,
9472    Eq,
9473    Hash,
9474    Ord,
9475    PartialEq,
9476    PartialOrd,
9477)]
9478#[serde(transparent)]
9479pub struct FunctionArgs(pub ::std::string::String);
9480impl ::std::ops::Deref for FunctionArgs {
9481    type Target = ::std::string::String;
9482    fn deref(&self) -> &::std::string::String {
9483        &self.0
9484    }
9485}
9486impl ::std::convert::From<FunctionArgs> for ::std::string::String {
9487    fn from(value: FunctionArgs) -> Self {
9488        value.0
9489    }
9490}
9491impl ::std::convert::From<&FunctionArgs> for FunctionArgs {
9492    fn from(value: &FunctionArgs) -> Self {
9493        value.clone()
9494    }
9495}
9496impl ::std::convert::From<::std::string::String> for FunctionArgs {
9497    fn from(value: ::std::string::String) -> Self {
9498        Self(value)
9499    }
9500}
9501impl ::std::str::FromStr for FunctionArgs {
9502    type Err = ::std::convert::Infallible;
9503    fn from_str(value: &str) -> ::std::result::Result<Self, Self::Err> {
9504        Ok(Self(value.to_string()))
9505    }
9506}
9507impl ::std::fmt::Display for FunctionArgs {
9508    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
9509        self.0.fmt(f)
9510    }
9511}
9512#[doc = "`FunctionCallAction`"]
9513#[doc = r""]
9514#[doc = r" <details><summary>JSON schema</summary>"]
9515#[doc = r""]
9516#[doc = r" ```json"]
9517#[doc = "{"]
9518#[doc = "  \"type\": \"object\","]
9519#[doc = "  \"required\": ["]
9520#[doc = "    \"args\","]
9521#[doc = "    \"deposit\","]
9522#[doc = "    \"gas\","]
9523#[doc = "    \"method_name\""]
9524#[doc = "  ],"]
9525#[doc = "  \"properties\": {"]
9526#[doc = "    \"args\": {"]
9527#[doc = "      \"type\": \"string\""]
9528#[doc = "    },"]
9529#[doc = "    \"deposit\": {"]
9530#[doc = "      \"$ref\": \"#/components/schemas/NearToken\""]
9531#[doc = "    },"]
9532#[doc = "    \"gas\": {"]
9533#[doc = "      \"$ref\": \"#/components/schemas/NearGas\""]
9534#[doc = "    },"]
9535#[doc = "    \"method_name\": {"]
9536#[doc = "      \"type\": \"string\""]
9537#[doc = "    }"]
9538#[doc = "  }"]
9539#[doc = "}"]
9540#[doc = r" ```"]
9541#[doc = r" </details>"]
9542#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
9543pub struct FunctionCallAction {
9544    pub args: ::std::string::String,
9545    pub deposit: NearToken,
9546    pub gas: NearGas,
9547    pub method_name: ::std::string::String,
9548}
9549impl ::std::convert::From<&FunctionCallAction> for FunctionCallAction {
9550    fn from(value: &FunctionCallAction) -> Self {
9551        value.clone()
9552    }
9553}
9554#[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."]
9555#[doc = r""]
9556#[doc = r" <details><summary>JSON schema</summary>"]
9557#[doc = r""]
9558#[doc = r" ```json"]
9559#[doc = "{"]
9560#[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.\","]
9561#[doc = "  \"oneOf\": ["]
9562#[doc = "    {"]
9563#[doc = "      \"type\": \"string\","]
9564#[doc = "      \"enum\": ["]
9565#[doc = "        \"WasmUnknownError\","]
9566#[doc = "        \"_EVMError\""]
9567#[doc = "      ]"]
9568#[doc = "    },"]
9569#[doc = "    {"]
9570#[doc = "      \"description\": \"Wasm compilation error\","]
9571#[doc = "      \"type\": \"object\","]
9572#[doc = "      \"required\": ["]
9573#[doc = "        \"CompilationError\""]
9574#[doc = "      ],"]
9575#[doc = "      \"properties\": {"]
9576#[doc = "        \"CompilationError\": {"]
9577#[doc = "          \"$ref\": \"#/components/schemas/CompilationError\""]
9578#[doc = "        }"]
9579#[doc = "      },"]
9580#[doc = "      \"additionalProperties\": false"]
9581#[doc = "    },"]
9582#[doc = "    {"]
9583#[doc = "      \"description\": \"Wasm binary env link error\\n\\nNote: this is only to deserialize old data, use execution error for new data\","]
9584#[doc = "      \"type\": \"object\","]
9585#[doc = "      \"required\": ["]
9586#[doc = "        \"LinkError\""]
9587#[doc = "      ],"]
9588#[doc = "      \"properties\": {"]
9589#[doc = "        \"LinkError\": {"]
9590#[doc = "          \"type\": \"object\","]
9591#[doc = "          \"required\": ["]
9592#[doc = "            \"msg\""]
9593#[doc = "          ],"]
9594#[doc = "          \"properties\": {"]
9595#[doc = "            \"msg\": {"]
9596#[doc = "              \"type\": \"string\""]
9597#[doc = "            }"]
9598#[doc = "          }"]
9599#[doc = "        }"]
9600#[doc = "      },"]
9601#[doc = "      \"additionalProperties\": false"]
9602#[doc = "    },"]
9603#[doc = "    {"]
9604#[doc = "      \"description\": \"Import/export resolve error\","]
9605#[doc = "      \"type\": \"object\","]
9606#[doc = "      \"required\": ["]
9607#[doc = "        \"MethodResolveError\""]
9608#[doc = "      ],"]
9609#[doc = "      \"properties\": {"]
9610#[doc = "        \"MethodResolveError\": {"]
9611#[doc = "          \"$ref\": \"#/components/schemas/MethodResolveError\""]
9612#[doc = "        }"]
9613#[doc = "      },"]
9614#[doc = "      \"additionalProperties\": false"]
9615#[doc = "    },"]
9616#[doc = "    {"]
9617#[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\","]
9618#[doc = "      \"type\": \"object\","]
9619#[doc = "      \"required\": ["]
9620#[doc = "        \"WasmTrap\""]
9621#[doc = "      ],"]
9622#[doc = "      \"properties\": {"]
9623#[doc = "        \"WasmTrap\": {"]
9624#[doc = "          \"$ref\": \"#/components/schemas/WasmTrap\""]
9625#[doc = "        }"]
9626#[doc = "      },"]
9627#[doc = "      \"additionalProperties\": false"]
9628#[doc = "    },"]
9629#[doc = "    {"]
9630#[doc = "      \"description\": \"Note: this is only to deserialize old data, use execution error for new data\","]
9631#[doc = "      \"type\": \"object\","]
9632#[doc = "      \"required\": ["]
9633#[doc = "        \"HostError\""]
9634#[doc = "      ],"]
9635#[doc = "      \"properties\": {"]
9636#[doc = "        \"HostError\": {"]
9637#[doc = "          \"$ref\": \"#/components/schemas/HostError\""]
9638#[doc = "        }"]
9639#[doc = "      },"]
9640#[doc = "      \"additionalProperties\": false"]
9641#[doc = "    },"]
9642#[doc = "    {"]
9643#[doc = "      \"type\": \"object\","]
9644#[doc = "      \"required\": ["]
9645#[doc = "        \"ExecutionError\""]
9646#[doc = "      ],"]
9647#[doc = "      \"properties\": {"]
9648#[doc = "        \"ExecutionError\": {"]
9649#[doc = "          \"type\": \"string\""]
9650#[doc = "        }"]
9651#[doc = "      },"]
9652#[doc = "      \"additionalProperties\": false"]
9653#[doc = "    }"]
9654#[doc = "  ]"]
9655#[doc = "}"]
9656#[doc = r" ```"]
9657#[doc = r" </details>"]
9658#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
9659pub enum FunctionCallError {
9660    WasmUnknownError,
9661    #[serde(rename = "_EVMError")]
9662    EvmError,
9663    #[doc = "Wasm compilation error"]
9664    CompilationError(CompilationError),
9665    #[doc = "Wasm binary env link error\n\nNote: this is only to deserialize old data, use execution error for new data"]
9666    LinkError {
9667        msg: ::std::string::String,
9668    },
9669    #[doc = "Import/export resolve error"]
9670    MethodResolveError(MethodResolveError),
9671    #[doc = "A trap happened during execution of a binary\n\nNote: this is only to deserialize old data, use execution error for new data"]
9672    WasmTrap(WasmTrap),
9673    #[doc = "Note: this is only to deserialize old data, use execution error for new data"]
9674    HostError(HostError),
9675    ExecutionError(::std::string::String),
9676}
9677impl ::std::convert::From<&Self> for FunctionCallError {
9678    fn from(value: &FunctionCallError) -> Self {
9679        value.clone()
9680    }
9681}
9682impl ::std::convert::From<CompilationError> for FunctionCallError {
9683    fn from(value: CompilationError) -> Self {
9684        Self::CompilationError(value)
9685    }
9686}
9687impl ::std::convert::From<MethodResolveError> for FunctionCallError {
9688    fn from(value: MethodResolveError) -> Self {
9689        Self::MethodResolveError(value)
9690    }
9691}
9692impl ::std::convert::From<WasmTrap> for FunctionCallError {
9693    fn from(value: WasmTrap) -> Self {
9694        Self::WasmTrap(value)
9695    }
9696}
9697impl ::std::convert::From<HostError> for FunctionCallError {
9698    fn from(value: HostError) -> Self {
9699        Self::HostError(value)
9700    }
9701}
9702#[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."]
9703#[doc = r""]
9704#[doc = r" <details><summary>JSON schema</summary>"]
9705#[doc = r""]
9706#[doc = r" ```json"]
9707#[doc = "{"]
9708#[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.\","]
9709#[doc = "  \"type\": \"object\","]
9710#[doc = "  \"required\": ["]
9711#[doc = "    \"method_names\","]
9712#[doc = "    \"receiver_id\""]
9713#[doc = "  ],"]
9714#[doc = "  \"properties\": {"]
9715#[doc = "    \"allowance\": {"]
9716#[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.\","]
9717#[doc = "      \"anyOf\": ["]
9718#[doc = "        {"]
9719#[doc = "          \"$ref\": \"#/components/schemas/NearToken\""]
9720#[doc = "        },"]
9721#[doc = "        {"]
9722#[doc = "          \"type\": \"null\""]
9723#[doc = "        }"]
9724#[doc = "      ]"]
9725#[doc = "    },"]
9726#[doc = "    \"method_names\": {"]
9727#[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.\","]
9728#[doc = "      \"type\": \"array\","]
9729#[doc = "      \"items\": {"]
9730#[doc = "        \"type\": \"string\""]
9731#[doc = "      }"]
9732#[doc = "    },"]
9733#[doc = "    \"receiver_id\": {"]
9734#[doc = "      \"description\": \"The access key only allows transactions with the given receiver's account id.\","]
9735#[doc = "      \"type\": \"string\""]
9736#[doc = "    }"]
9737#[doc = "  }"]
9738#[doc = "}"]
9739#[doc = r" ```"]
9740#[doc = r" </details>"]
9741#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
9742pub struct FunctionCallPermission {
9743    #[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."]
9744    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
9745    pub allowance: ::std::option::Option<NearToken>,
9746    #[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."]
9747    pub method_names: ::std::vec::Vec<::std::string::String>,
9748    #[doc = "The access key only allows transactions with the given receiver's account id."]
9749    pub receiver_id: ::std::string::String,
9750}
9751impl ::std::convert::From<&FunctionCallPermission> for FunctionCallPermission {
9752    fn from(value: &FunctionCallPermission) -> Self {
9753        value.clone()
9754    }
9755}
9756#[doc = "`GasKeyView`"]
9757#[doc = r""]
9758#[doc = r" <details><summary>JSON schema</summary>"]
9759#[doc = r""]
9760#[doc = r" ```json"]
9761#[doc = "{"]
9762#[doc = "  \"type\": \"object\","]
9763#[doc = "  \"required\": ["]
9764#[doc = "    \"balance\","]
9765#[doc = "    \"num_nonces\","]
9766#[doc = "    \"permission\""]
9767#[doc = "  ],"]
9768#[doc = "  \"properties\": {"]
9769#[doc = "    \"balance\": {"]
9770#[doc = "      \"$ref\": \"#/components/schemas/NearToken\""]
9771#[doc = "    },"]
9772#[doc = "    \"num_nonces\": {"]
9773#[doc = "      \"type\": \"integer\","]
9774#[doc = "      \"format\": \"uint32\","]
9775#[doc = "      \"minimum\": 0.0"]
9776#[doc = "    },"]
9777#[doc = "    \"permission\": {"]
9778#[doc = "      \"$ref\": \"#/components/schemas/AccessKeyPermissionView\""]
9779#[doc = "    }"]
9780#[doc = "  }"]
9781#[doc = "}"]
9782#[doc = r" ```"]
9783#[doc = r" </details>"]
9784#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
9785pub struct GasKeyView {
9786    pub balance: NearToken,
9787    pub num_nonces: u32,
9788    pub permission: AccessKeyPermissionView,
9789}
9790impl ::std::convert::From<&GasKeyView> for GasKeyView {
9791    fn from(value: &GasKeyView) -> Self {
9792        value.clone()
9793    }
9794}
9795#[doc = "Configuration for garbage collection."]
9796#[doc = r""]
9797#[doc = r" <details><summary>JSON schema</summary>"]
9798#[doc = r""]
9799#[doc = r" ```json"]
9800#[doc = "{"]
9801#[doc = "  \"description\": \"Configuration for garbage collection.\","]
9802#[doc = "  \"type\": \"object\","]
9803#[doc = "  \"properties\": {"]
9804#[doc = "    \"gc_blocks_limit\": {"]
9805#[doc = "      \"description\": \"Maximum number of blocks to garbage collect at every garbage collection\\ncall.\","]
9806#[doc = "      \"default\": 2,"]
9807#[doc = "      \"type\": \"integer\","]
9808#[doc = "      \"format\": \"uint64\","]
9809#[doc = "      \"minimum\": 0.0"]
9810#[doc = "    },"]
9811#[doc = "    \"gc_fork_clean_step\": {"]
9812#[doc = "      \"description\": \"Maximum number of height to go through at each garbage collection step\\nwhen cleaning forks during garbage collection.\","]
9813#[doc = "      \"default\": 100,"]
9814#[doc = "      \"type\": \"integer\","]
9815#[doc = "      \"format\": \"uint64\","]
9816#[doc = "      \"minimum\": 0.0"]
9817#[doc = "    },"]
9818#[doc = "    \"gc_num_epochs_to_keep\": {"]
9819#[doc = "      \"description\": \"Number of epochs for which we keep store data.\","]
9820#[doc = "      \"default\": 5,"]
9821#[doc = "      \"type\": \"integer\","]
9822#[doc = "      \"format\": \"uint64\","]
9823#[doc = "      \"minimum\": 0.0"]
9824#[doc = "    },"]
9825#[doc = "    \"gc_step_period\": {"]
9826#[doc = "      \"description\": \"How often gc should be run\","]
9827#[doc = "      \"default\": {"]
9828#[doc = "        \"nanos\": 500000000,"]
9829#[doc = "        \"secs\": 0"]
9830#[doc = "      },"]
9831#[doc = "      \"allOf\": ["]
9832#[doc = "        {"]
9833#[doc = "          \"$ref\": \"#/components/schemas/DurationAsStdSchemaProvider\""]
9834#[doc = "        }"]
9835#[doc = "      ]"]
9836#[doc = "    }"]
9837#[doc = "  }"]
9838#[doc = "}"]
9839#[doc = r" ```"]
9840#[doc = r" </details>"]
9841#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
9842pub struct GcConfig {
9843    #[doc = "Maximum number of blocks to garbage collect at every garbage collection\ncall."]
9844    #[serde(default = "defaults::default_u64::<u64, 2>")]
9845    pub gc_blocks_limit: u64,
9846    #[doc = "Maximum number of height to go through at each garbage collection step\nwhen cleaning forks during garbage collection."]
9847    #[serde(default = "defaults::default_u64::<u64, 100>")]
9848    pub gc_fork_clean_step: u64,
9849    #[doc = "Number of epochs for which we keep store data."]
9850    #[serde(default = "defaults::default_u64::<u64, 5>")]
9851    pub gc_num_epochs_to_keep: u64,
9852    #[doc = "How often gc should be run"]
9853    #[serde(default = "defaults::gc_config_gc_step_period")]
9854    pub gc_step_period: DurationAsStdSchemaProvider,
9855}
9856impl ::std::convert::From<&GcConfig> for GcConfig {
9857    fn from(value: &GcConfig) -> Self {
9858        value.clone()
9859    }
9860}
9861impl ::std::default::Default for GcConfig {
9862    fn default() -> Self {
9863        Self {
9864            gc_blocks_limit: defaults::default_u64::<u64, 2>(),
9865            gc_fork_clean_step: defaults::default_u64::<u64, 100>(),
9866            gc_num_epochs_to_keep: defaults::default_u64::<u64, 5>(),
9867            gc_step_period: defaults::gc_config_gc_step_period(),
9868        }
9869    }
9870}
9871#[doc = "`GenesisConfig`"]
9872#[doc = r""]
9873#[doc = r" <details><summary>JSON schema</summary>"]
9874#[doc = r""]
9875#[doc = r" ```json"]
9876#[doc = "{"]
9877#[doc = "  \"type\": \"object\","]
9878#[doc = "  \"required\": ["]
9879#[doc = "    \"avg_hidden_validator_seats_per_shard\","]
9880#[doc = "    \"block_producer_kickout_threshold\","]
9881#[doc = "    \"chain_id\","]
9882#[doc = "    \"chunk_producer_kickout_threshold\","]
9883#[doc = "    \"dynamic_resharding\","]
9884#[doc = "    \"epoch_length\","]
9885#[doc = "    \"fishermen_threshold\","]
9886#[doc = "    \"gas_limit\","]
9887#[doc = "    \"gas_price_adjustment_rate\","]
9888#[doc = "    \"genesis_height\","]
9889#[doc = "    \"genesis_time\","]
9890#[doc = "    \"max_gas_price\","]
9891#[doc = "    \"max_inflation_rate\","]
9892#[doc = "    \"min_gas_price\","]
9893#[doc = "    \"num_block_producer_seats\","]
9894#[doc = "    \"num_block_producer_seats_per_shard\","]
9895#[doc = "    \"num_blocks_per_year\","]
9896#[doc = "    \"protocol_reward_rate\","]
9897#[doc = "    \"protocol_treasury_account\","]
9898#[doc = "    \"protocol_version\","]
9899#[doc = "    \"total_supply\","]
9900#[doc = "    \"transaction_validity_period\","]
9901#[doc = "    \"validators\""]
9902#[doc = "  ],"]
9903#[doc = "  \"properties\": {"]
9904#[doc = "    \"avg_hidden_validator_seats_per_shard\": {"]
9905#[doc = "      \"description\": \"Expected number of hidden validators per shard.\","]
9906#[doc = "      \"type\": \"array\","]
9907#[doc = "      \"items\": {"]
9908#[doc = "        \"type\": \"integer\","]
9909#[doc = "        \"format\": \"uint64\","]
9910#[doc = "        \"minimum\": 0.0"]
9911#[doc = "      }"]
9912#[doc = "    },"]
9913#[doc = "    \"block_producer_kickout_threshold\": {"]
9914#[doc = "      \"description\": \"Threshold for kicking out block producers, between 0 and 100.\","]
9915#[doc = "      \"type\": \"integer\","]
9916#[doc = "      \"format\": \"uint8\","]
9917#[doc = "      \"maximum\": 255.0,"]
9918#[doc = "      \"minimum\": 0.0"]
9919#[doc = "    },"]
9920#[doc = "    \"chain_id\": {"]
9921#[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.\","]
9922#[doc = "      \"type\": \"string\""]
9923#[doc = "    },"]
9924#[doc = "    \"chunk_producer_assignment_changes_limit\": {"]
9925#[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.\","]
9926#[doc = "      \"default\": 5,"]
9927#[doc = "      \"type\": \"integer\","]
9928#[doc = "      \"format\": \"uint64\","]
9929#[doc = "      \"minimum\": 0.0"]
9930#[doc = "    },"]
9931#[doc = "    \"chunk_producer_kickout_threshold\": {"]
9932#[doc = "      \"description\": \"Threshold for kicking out chunk producers, between 0 and 100.\","]
9933#[doc = "      \"type\": \"integer\","]
9934#[doc = "      \"format\": \"uint8\","]
9935#[doc = "      \"maximum\": 255.0,"]
9936#[doc = "      \"minimum\": 0.0"]
9937#[doc = "    },"]
9938#[doc = "    \"chunk_validator_only_kickout_threshold\": {"]
9939#[doc = "      \"description\": \"Threshold for kicking out nodes which are only chunk validators, between 0 and 100.\","]
9940#[doc = "      \"default\": 80,"]
9941#[doc = "      \"type\": \"integer\","]
9942#[doc = "      \"format\": \"uint8\","]
9943#[doc = "      \"maximum\": 255.0,"]
9944#[doc = "      \"minimum\": 0.0"]
9945#[doc = "    },"]
9946#[doc = "    \"dynamic_resharding\": {"]
9947#[doc = "      \"description\": \"Enable dynamic re-sharding.\","]
9948#[doc = "      \"type\": \"boolean\""]
9949#[doc = "    },"]
9950#[doc = "    \"epoch_length\": {"]
9951#[doc = "      \"description\": \"Epoch length counted in block heights.\","]
9952#[doc = "      \"type\": \"integer\","]
9953#[doc = "      \"format\": \"uint64\","]
9954#[doc = "      \"minimum\": 0.0"]
9955#[doc = "    },"]
9956#[doc = "    \"fishermen_threshold\": {"]
9957#[doc = "      \"description\": \"Fishermen stake threshold.\","]
9958#[doc = "      \"allOf\": ["]
9959#[doc = "        {"]
9960#[doc = "          \"$ref\": \"#/components/schemas/NearToken\""]
9961#[doc = "        }"]
9962#[doc = "      ]"]
9963#[doc = "    },"]
9964#[doc = "    \"gas_limit\": {"]
9965#[doc = "      \"description\": \"Initial gas limit.\","]
9966#[doc = "      \"allOf\": ["]
9967#[doc = "        {"]
9968#[doc = "          \"$ref\": \"#/components/schemas/NearGas\""]
9969#[doc = "        }"]
9970#[doc = "      ]"]
9971#[doc = "    },"]
9972#[doc = "    \"gas_price_adjustment_rate\": {"]
9973#[doc = "      \"description\": \"Gas price adjustment rate\","]
9974#[doc = "      \"type\": \"array\","]
9975#[doc = "      \"items\": {"]
9976#[doc = "        \"type\": \"integer\","]
9977#[doc = "        \"format\": \"int32\""]
9978#[doc = "      },"]
9979#[doc = "      \"maxItems\": 2,"]
9980#[doc = "      \"minItems\": 2"]
9981#[doc = "    },"]
9982#[doc = "    \"genesis_height\": {"]
9983#[doc = "      \"description\": \"Height of genesis block.\","]
9984#[doc = "      \"type\": \"integer\","]
9985#[doc = "      \"format\": \"uint64\","]
9986#[doc = "      \"minimum\": 0.0"]
9987#[doc = "    },"]
9988#[doc = "    \"genesis_time\": {"]
9989#[doc = "      \"description\": \"Official time of blockchain start.\","]
9990#[doc = "      \"type\": \"string\","]
9991#[doc = "      \"format\": \"date-time\""]
9992#[doc = "    },"]
9993#[doc = "    \"max_gas_price\": {"]
9994#[doc = "      \"$ref\": \"#/components/schemas/NearToken\""]
9995#[doc = "    },"]
9996#[doc = "    \"max_inflation_rate\": {"]
9997#[doc = "      \"description\": \"Maximum inflation on the total supply every epoch.\","]
9998#[doc = "      \"type\": \"array\","]
9999#[doc = "      \"items\": {"]
10000#[doc = "        \"type\": \"integer\","]
10001#[doc = "        \"format\": \"int32\""]
10002#[doc = "      },"]
10003#[doc = "      \"maxItems\": 2,"]
10004#[doc = "      \"minItems\": 2"]
10005#[doc = "    },"]
10006#[doc = "    \"max_kickout_stake_perc\": {"]
10007#[doc = "      \"description\": \"Max stake percentage of the validators we will kick out.\","]
10008#[doc = "      \"default\": 100,"]
10009#[doc = "      \"type\": \"integer\","]
10010#[doc = "      \"format\": \"uint8\","]
10011#[doc = "      \"maximum\": 255.0,"]
10012#[doc = "      \"minimum\": 0.0"]
10013#[doc = "    },"]
10014#[doc = "    \"min_gas_price\": {"]
10015#[doc = "      \"description\": \"Minimum gas price. It is also the initial gas price.\","]
10016#[doc = "      \"allOf\": ["]
10017#[doc = "        {"]
10018#[doc = "          \"$ref\": \"#/components/schemas/NearToken\""]
10019#[doc = "        }"]
10020#[doc = "      ]"]
10021#[doc = "    },"]
10022#[doc = "    \"minimum_stake_divisor\": {"]
10023#[doc = "      \"description\": \"The minimum stake required for staking is last seat price divided by this number.\","]
10024#[doc = "      \"default\": 10,"]
10025#[doc = "      \"type\": \"integer\","]
10026#[doc = "      \"format\": \"uint64\","]
10027#[doc = "      \"minimum\": 0.0"]
10028#[doc = "    },"]
10029#[doc = "    \"minimum_stake_ratio\": {"]
10030#[doc = "      \"description\": \"The lowest ratio s/s_total any block producer can have.\\nSee <https://github.com/near/NEPs/pull/167> for details\","]
10031#[doc = "      \"default\": ["]
10032#[doc = "        1,"]
10033#[doc = "        6250"]
10034#[doc = "      ],"]
10035#[doc = "      \"type\": \"array\","]
10036#[doc = "      \"items\": {"]
10037#[doc = "        \"type\": \"integer\","]
10038#[doc = "        \"format\": \"int32\""]
10039#[doc = "      },"]
10040#[doc = "      \"maxItems\": 2,"]
10041#[doc = "      \"minItems\": 2"]
10042#[doc = "    },"]
10043#[doc = "    \"minimum_validators_per_shard\": {"]
10044#[doc = "      \"description\": \"The minimum number of validators each shard must have\","]
10045#[doc = "      \"default\": 1,"]
10046#[doc = "      \"type\": \"integer\","]
10047#[doc = "      \"format\": \"uint64\","]
10048#[doc = "      \"minimum\": 0.0"]
10049#[doc = "    },"]
10050#[doc = "    \"num_block_producer_seats\": {"]
10051#[doc = "      \"description\": \"Number of block producer seats at genesis.\","]
10052#[doc = "      \"type\": \"integer\","]
10053#[doc = "      \"format\": \"uint64\","]
10054#[doc = "      \"minimum\": 0.0"]
10055#[doc = "    },"]
10056#[doc = "    \"num_block_producer_seats_per_shard\": {"]
10057#[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\","]
10058#[doc = "      \"type\": \"array\","]
10059#[doc = "      \"items\": {"]
10060#[doc = "        \"type\": \"integer\","]
10061#[doc = "        \"format\": \"uint64\","]
10062#[doc = "        \"minimum\": 0.0"]
10063#[doc = "      }"]
10064#[doc = "    },"]
10065#[doc = "    \"num_blocks_per_year\": {"]
10066#[doc = "      \"description\": \"Expected number of blocks per year\","]
10067#[doc = "      \"type\": \"integer\","]
10068#[doc = "      \"format\": \"uint64\","]
10069#[doc = "      \"minimum\": 0.0"]
10070#[doc = "    },"]
10071#[doc = "    \"num_chunk_only_producer_seats\": {"]
10072#[doc = "      \"description\": \"Deprecated.\","]
10073#[doc = "      \"default\": 300,"]
10074#[doc = "      \"type\": \"integer\","]
10075#[doc = "      \"format\": \"uint64\","]
10076#[doc = "      \"minimum\": 0.0"]
10077#[doc = "    },"]
10078#[doc = "    \"num_chunk_producer_seats\": {"]
10079#[doc = "      \"description\": \"Number of chunk producers.\\nDon't mess it up with chunk-only producers feature which is deprecated.\","]
10080#[doc = "      \"default\": 100,"]
10081#[doc = "      \"type\": \"integer\","]
10082#[doc = "      \"format\": \"uint64\","]
10083#[doc = "      \"minimum\": 0.0"]
10084#[doc = "    },"]
10085#[doc = "    \"num_chunk_validator_seats\": {"]
10086#[doc = "      \"default\": 300,"]
10087#[doc = "      \"type\": \"integer\","]
10088#[doc = "      \"format\": \"uint64\","]
10089#[doc = "      \"minimum\": 0.0"]
10090#[doc = "    },"]
10091#[doc = "    \"online_max_threshold\": {"]
10092#[doc = "      \"description\": \"Online maximum threshold above which validator gets full reward.\","]
10093#[doc = "      \"default\": ["]
10094#[doc = "        99,"]
10095#[doc = "        100"]
10096#[doc = "      ],"]
10097#[doc = "      \"type\": \"array\","]
10098#[doc = "      \"items\": {"]
10099#[doc = "        \"type\": \"integer\","]
10100#[doc = "        \"format\": \"int32\""]
10101#[doc = "      },"]
10102#[doc = "      \"maxItems\": 2,"]
10103#[doc = "      \"minItems\": 2"]
10104#[doc = "    },"]
10105#[doc = "    \"online_min_threshold\": {"]
10106#[doc = "      \"description\": \"Online minimum threshold below which validator doesn't receive reward.\","]
10107#[doc = "      \"default\": ["]
10108#[doc = "        9,"]
10109#[doc = "        10"]
10110#[doc = "      ],"]
10111#[doc = "      \"type\": \"array\","]
10112#[doc = "      \"items\": {"]
10113#[doc = "        \"type\": \"integer\","]
10114#[doc = "        \"format\": \"int32\""]
10115#[doc = "      },"]
10116#[doc = "      \"maxItems\": 2,"]
10117#[doc = "      \"minItems\": 2"]
10118#[doc = "    },"]
10119#[doc = "    \"protocol_reward_rate\": {"]
10120#[doc = "      \"description\": \"Protocol treasury rate\","]
10121#[doc = "      \"type\": \"array\","]
10122#[doc = "      \"items\": {"]
10123#[doc = "        \"type\": \"integer\","]
10124#[doc = "        \"format\": \"int32\""]
10125#[doc = "      },"]
10126#[doc = "      \"maxItems\": 2,"]
10127#[doc = "      \"minItems\": 2"]
10128#[doc = "    },"]
10129#[doc = "    \"protocol_treasury_account\": {"]
10130#[doc = "      \"description\": \"Protocol treasury account\","]
10131#[doc = "      \"allOf\": ["]
10132#[doc = "        {"]
10133#[doc = "          \"$ref\": \"#/components/schemas/AccountId\""]
10134#[doc = "        }"]
10135#[doc = "      ]"]
10136#[doc = "    },"]
10137#[doc = "    \"protocol_upgrade_stake_threshold\": {"]
10138#[doc = "      \"description\": \"Threshold of stake that needs to indicate that they ready for upgrade.\","]
10139#[doc = "      \"default\": ["]
10140#[doc = "        4,"]
10141#[doc = "        5"]
10142#[doc = "      ],"]
10143#[doc = "      \"type\": \"array\","]
10144#[doc = "      \"items\": {"]
10145#[doc = "        \"type\": \"integer\","]
10146#[doc = "        \"format\": \"int32\""]
10147#[doc = "      },"]
10148#[doc = "      \"maxItems\": 2,"]
10149#[doc = "      \"minItems\": 2"]
10150#[doc = "    },"]
10151#[doc = "    \"protocol_version\": {"]
10152#[doc = "      \"description\": \"Protocol version that this genesis works with.\","]
10153#[doc = "      \"type\": \"integer\","]
10154#[doc = "      \"format\": \"uint32\","]
10155#[doc = "      \"minimum\": 0.0"]
10156#[doc = "    },"]
10157#[doc = "    \"shard_layout\": {"]
10158#[doc = "      \"description\": \"Layout information regarding how to split accounts to shards\","]
10159#[doc = "      \"default\": {"]
10160#[doc = "        \"V2\": {"]
10161#[doc = "          \"boundary_accounts\": [],"]
10162#[doc = "          \"id_to_index_map\": {"]
10163#[doc = "            \"0\": 0"]
10164#[doc = "          },"]
10165#[doc = "          \"index_to_id_map\": {"]
10166#[doc = "            \"0\": 0"]
10167#[doc = "          },"]
10168#[doc = "          \"shard_ids\": ["]
10169#[doc = "            0"]
10170#[doc = "          ],"]
10171#[doc = "          \"version\": 0"]
10172#[doc = "        }"]
10173#[doc = "      },"]
10174#[doc = "      \"allOf\": ["]
10175#[doc = "        {"]
10176#[doc = "          \"$ref\": \"#/components/schemas/ShardLayout\""]
10177#[doc = "        }"]
10178#[doc = "      ]"]
10179#[doc = "    },"]
10180#[doc = "    \"shuffle_shard_assignment_for_chunk_producers\": {"]
10181#[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]`.\","]
10182#[doc = "      \"default\": false,"]
10183#[doc = "      \"type\": \"boolean\""]
10184#[doc = "    },"]
10185#[doc = "    \"target_validator_mandates_per_shard\": {"]
10186#[doc = "      \"description\": \"Number of target chunk validator mandates for each shard.\","]
10187#[doc = "      \"default\": 68,"]
10188#[doc = "      \"type\": \"integer\","]
10189#[doc = "      \"format\": \"uint64\","]
10190#[doc = "      \"minimum\": 0.0"]
10191#[doc = "    },"]
10192#[doc = "    \"total_supply\": {"]
10193#[doc = "      \"description\": \"Total supply of tokens at genesis.\","]
10194#[doc = "      \"allOf\": ["]
10195#[doc = "        {"]
10196#[doc = "          \"$ref\": \"#/components/schemas/NearToken\""]
10197#[doc = "        }"]
10198#[doc = "      ]"]
10199#[doc = "    },"]
10200#[doc = "    \"transaction_validity_period\": {"]
10201#[doc = "      \"description\": \"Number of blocks for which a given transaction is valid\","]
10202#[doc = "      \"type\": \"integer\","]
10203#[doc = "      \"format\": \"uint64\","]
10204#[doc = "      \"minimum\": 0.0"]
10205#[doc = "    },"]
10206#[doc = "    \"use_production_config\": {"]
10207#[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.\","]
10208#[doc = "      \"default\": false,"]
10209#[doc = "      \"type\": \"boolean\""]
10210#[doc = "    },"]
10211#[doc = "    \"validators\": {"]
10212#[doc = "      \"description\": \"List of initial validators.\","]
10213#[doc = "      \"type\": \"array\","]
10214#[doc = "      \"items\": {"]
10215#[doc = "        \"$ref\": \"#/components/schemas/AccountInfo\""]
10216#[doc = "      }"]
10217#[doc = "    }"]
10218#[doc = "  }"]
10219#[doc = "}"]
10220#[doc = r" ```"]
10221#[doc = r" </details>"]
10222#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
10223pub struct GenesisConfig {
10224    #[doc = "Expected number of hidden validators per shard."]
10225    pub avg_hidden_validator_seats_per_shard: ::std::vec::Vec<u64>,
10226    #[doc = "Threshold for kicking out block producers, between 0 and 100."]
10227    pub block_producer_kickout_threshold: u8,
10228    #[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."]
10229    pub chain_id: ::std::string::String,
10230    #[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."]
10231    #[serde(default = "defaults::default_u64::<u64, 5>")]
10232    pub chunk_producer_assignment_changes_limit: u64,
10233    #[doc = "Threshold for kicking out chunk producers, between 0 and 100."]
10234    pub chunk_producer_kickout_threshold: u8,
10235    #[doc = "Threshold for kicking out nodes which are only chunk validators, between 0 and 100."]
10236    #[serde(default = "defaults::default_u64::<u8, 80>")]
10237    pub chunk_validator_only_kickout_threshold: u8,
10238    #[doc = "Enable dynamic re-sharding."]
10239    pub dynamic_resharding: bool,
10240    #[doc = "Epoch length counted in block heights."]
10241    pub epoch_length: u64,
10242    #[doc = "Fishermen stake threshold."]
10243    pub fishermen_threshold: NearToken,
10244    #[doc = "Initial gas limit."]
10245    pub gas_limit: NearGas,
10246    #[doc = "Gas price adjustment rate"]
10247    pub gas_price_adjustment_rate: [i32; 2usize],
10248    #[doc = "Height of genesis block."]
10249    pub genesis_height: u64,
10250    #[doc = "Official time of blockchain start."]
10251    pub genesis_time: ::chrono::DateTime<::chrono::offset::Utc>,
10252    pub max_gas_price: NearToken,
10253    #[doc = "Maximum inflation on the total supply every epoch."]
10254    pub max_inflation_rate: [i32; 2usize],
10255    #[doc = "Max stake percentage of the validators we will kick out."]
10256    #[serde(default = "defaults::default_u64::<u8, 100>")]
10257    pub max_kickout_stake_perc: u8,
10258    #[doc = "Minimum gas price. It is also the initial gas price."]
10259    pub min_gas_price: NearToken,
10260    #[doc = "The minimum stake required for staking is last seat price divided by this number."]
10261    #[serde(default = "defaults::default_u64::<u64, 10>")]
10262    pub minimum_stake_divisor: u64,
10263    #[doc = "The lowest ratio s/s_total any block producer can have.\nSee <https://github.com/near/NEPs/pull/167> for details"]
10264    #[serde(default = "defaults::genesis_config_minimum_stake_ratio")]
10265    pub minimum_stake_ratio: [i32; 2usize],
10266    #[doc = "The minimum number of validators each shard must have"]
10267    #[serde(default = "defaults::default_u64::<u64, 1>")]
10268    pub minimum_validators_per_shard: u64,
10269    #[doc = "Number of block producer seats at genesis."]
10270    pub num_block_producer_seats: u64,
10271    #[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"]
10272    pub num_block_producer_seats_per_shard: ::std::vec::Vec<u64>,
10273    #[doc = "Expected number of blocks per year"]
10274    pub num_blocks_per_year: u64,
10275    #[doc = "Deprecated."]
10276    #[serde(default = "defaults::default_u64::<u64, 300>")]
10277    pub num_chunk_only_producer_seats: u64,
10278    #[doc = "Number of chunk producers.\nDon't mess it up with chunk-only producers feature which is deprecated."]
10279    #[serde(default = "defaults::default_u64::<u64, 100>")]
10280    pub num_chunk_producer_seats: u64,
10281    #[serde(default = "defaults::default_u64::<u64, 300>")]
10282    pub num_chunk_validator_seats: u64,
10283    #[doc = "Online maximum threshold above which validator gets full reward."]
10284    #[serde(default = "defaults::genesis_config_online_max_threshold")]
10285    pub online_max_threshold: [i32; 2usize],
10286    #[doc = "Online minimum threshold below which validator doesn't receive reward."]
10287    #[serde(default = "defaults::genesis_config_online_min_threshold")]
10288    pub online_min_threshold: [i32; 2usize],
10289    #[doc = "Protocol treasury rate"]
10290    pub protocol_reward_rate: [i32; 2usize],
10291    #[doc = "Protocol treasury account"]
10292    pub protocol_treasury_account: AccountId,
10293    #[doc = "Threshold of stake that needs to indicate that they ready for upgrade."]
10294    #[serde(default = "defaults::genesis_config_protocol_upgrade_stake_threshold")]
10295    pub protocol_upgrade_stake_threshold: [i32; 2usize],
10296    #[doc = "Protocol version that this genesis works with."]
10297    pub protocol_version: u32,
10298    #[doc = "Layout information regarding how to split accounts to shards"]
10299    #[serde(default = "defaults::genesis_config_shard_layout")]
10300    pub shard_layout: ShardLayout,
10301    #[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]`."]
10302    #[serde(default)]
10303    pub shuffle_shard_assignment_for_chunk_producers: bool,
10304    #[doc = "Number of target chunk validator mandates for each shard."]
10305    #[serde(default = "defaults::default_u64::<u64, 68>")]
10306    pub target_validator_mandates_per_shard: u64,
10307    #[doc = "Total supply of tokens at genesis."]
10308    pub total_supply: NearToken,
10309    #[doc = "Number of blocks for which a given transaction is valid"]
10310    pub transaction_validity_period: u64,
10311    #[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."]
10312    #[serde(default)]
10313    pub use_production_config: bool,
10314    #[doc = "List of initial validators."]
10315    pub validators: ::std::vec::Vec<AccountInfo>,
10316}
10317impl ::std::convert::From<&GenesisConfig> for GenesisConfig {
10318    fn from(value: &GenesisConfig) -> Self {
10319        value.clone()
10320    }
10321}
10322#[doc = "`GenesisConfigError`"]
10323#[doc = r""]
10324#[doc = r" <details><summary>JSON schema</summary>"]
10325#[doc = r""]
10326#[doc = r" ```json"]
10327#[doc = "{"]
10328#[doc = "  \"type\": \"null\""]
10329#[doc = "}"]
10330#[doc = r" ```"]
10331#[doc = r" </details>"]
10332#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
10333#[serde(transparent)]
10334pub struct GenesisConfigError(pub ());
10335impl ::std::ops::Deref for GenesisConfigError {
10336    type Target = ();
10337    fn deref(&self) -> &() {
10338        &self.0
10339    }
10340}
10341impl ::std::convert::From<GenesisConfigError> for () {
10342    fn from(value: GenesisConfigError) -> Self {
10343        value.0
10344    }
10345}
10346impl ::std::convert::From<&GenesisConfigError> for GenesisConfigError {
10347    fn from(value: &GenesisConfigError) -> Self {
10348        value.clone()
10349    }
10350}
10351impl ::std::convert::From<()> for GenesisConfigError {
10352    fn from(value: ()) -> Self {
10353        Self(value)
10354    }
10355}
10356#[doc = "`GenesisConfigRequest`"]
10357#[doc = r""]
10358#[doc = r" <details><summary>JSON schema</summary>"]
10359#[doc = r""]
10360#[doc = r" ```json"]
10361#[doc = "{"]
10362#[doc = "  \"title\": \"GenesisConfigRequest\","]
10363#[doc = "  \"type\": \"null\""]
10364#[doc = "}"]
10365#[doc = r" ```"]
10366#[doc = r" </details>"]
10367#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
10368#[serde(transparent)]
10369pub struct GenesisConfigRequest(pub ());
10370impl ::std::ops::Deref for GenesisConfigRequest {
10371    type Target = ();
10372    fn deref(&self) -> &() {
10373        &self.0
10374    }
10375}
10376impl ::std::convert::From<GenesisConfigRequest> for () {
10377    fn from(value: GenesisConfigRequest) -> Self {
10378        value.0
10379    }
10380}
10381impl ::std::convert::From<&GenesisConfigRequest> for GenesisConfigRequest {
10382    fn from(value: &GenesisConfigRequest) -> Self {
10383        value.clone()
10384    }
10385}
10386impl ::std::convert::From<()> for GenesisConfigRequest {
10387    fn from(value: ()) -> Self {
10388        Self(value)
10389    }
10390}
10391#[doc = "`GlobalContractDeployMode`"]
10392#[doc = r""]
10393#[doc = r" <details><summary>JSON schema</summary>"]
10394#[doc = r""]
10395#[doc = r" ```json"]
10396#[doc = "{"]
10397#[doc = "  \"oneOf\": ["]
10398#[doc = "    {"]
10399#[doc = "      \"description\": \"Contract is deployed under its code hash.\\nUsers will be able reference it by that hash.\\nThis effectively makes the contract immutable.\","]
10400#[doc = "      \"type\": \"string\","]
10401#[doc = "      \"enum\": ["]
10402#[doc = "        \"CodeHash\""]
10403#[doc = "      ]"]
10404#[doc = "    },"]
10405#[doc = "    {"]
10406#[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.\","]
10407#[doc = "      \"type\": \"string\","]
10408#[doc = "      \"enum\": ["]
10409#[doc = "        \"AccountId\""]
10410#[doc = "      ]"]
10411#[doc = "    }"]
10412#[doc = "  ]"]
10413#[doc = "}"]
10414#[doc = r" ```"]
10415#[doc = r" </details>"]
10416#[derive(
10417    :: serde :: Deserialize,
10418    :: serde :: Serialize,
10419    Clone,
10420    Copy,
10421    Debug,
10422    Eq,
10423    Hash,
10424    Ord,
10425    PartialEq,
10426    PartialOrd,
10427)]
10428pub enum GlobalContractDeployMode {
10429    #[doc = "Contract is deployed under its code hash.\nUsers will be able reference it by that hash.\nThis effectively makes the contract immutable."]
10430    CodeHash,
10431    #[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."]
10432    AccountId,
10433}
10434impl ::std::convert::From<&Self> for GlobalContractDeployMode {
10435    fn from(value: &GlobalContractDeployMode) -> Self {
10436        value.clone()
10437    }
10438}
10439impl ::std::fmt::Display for GlobalContractDeployMode {
10440    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
10441        match *self {
10442            Self::CodeHash => f.write_str("CodeHash"),
10443            Self::AccountId => f.write_str("AccountId"),
10444        }
10445    }
10446}
10447impl ::std::str::FromStr for GlobalContractDeployMode {
10448    type Err = self::error::ConversionError;
10449    fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
10450        match value {
10451            "CodeHash" => Ok(Self::CodeHash),
10452            "AccountId" => Ok(Self::AccountId),
10453            _ => Err("invalid value".into()),
10454        }
10455    }
10456}
10457impl ::std::convert::TryFrom<&str> for GlobalContractDeployMode {
10458    type Error = self::error::ConversionError;
10459    fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
10460        value.parse()
10461    }
10462}
10463impl ::std::convert::TryFrom<&::std::string::String> for GlobalContractDeployMode {
10464    type Error = self::error::ConversionError;
10465    fn try_from(
10466        value: &::std::string::String,
10467    ) -> ::std::result::Result<Self, self::error::ConversionError> {
10468        value.parse()
10469    }
10470}
10471impl ::std::convert::TryFrom<::std::string::String> for GlobalContractDeployMode {
10472    type Error = self::error::ConversionError;
10473    fn try_from(
10474        value: ::std::string::String,
10475    ) -> ::std::result::Result<Self, self::error::ConversionError> {
10476        value.parse()
10477    }
10478}
10479#[doc = "`GlobalContractIdentifier`"]
10480#[doc = r""]
10481#[doc = r" <details><summary>JSON schema</summary>"]
10482#[doc = r""]
10483#[doc = r" ```json"]
10484#[doc = "{"]
10485#[doc = "  \"oneOf\": ["]
10486#[doc = "    {"]
10487#[doc = "      \"type\": \"object\","]
10488#[doc = "      \"required\": ["]
10489#[doc = "        \"CodeHash\""]
10490#[doc = "      ],"]
10491#[doc = "      \"properties\": {"]
10492#[doc = "        \"CodeHash\": {"]
10493#[doc = "          \"$ref\": \"#/components/schemas/CryptoHash\""]
10494#[doc = "        }"]
10495#[doc = "      },"]
10496#[doc = "      \"additionalProperties\": false"]
10497#[doc = "    },"]
10498#[doc = "    {"]
10499#[doc = "      \"type\": \"object\","]
10500#[doc = "      \"required\": ["]
10501#[doc = "        \"AccountId\""]
10502#[doc = "      ],"]
10503#[doc = "      \"properties\": {"]
10504#[doc = "        \"AccountId\": {"]
10505#[doc = "          \"$ref\": \"#/components/schemas/AccountId\""]
10506#[doc = "        }"]
10507#[doc = "      },"]
10508#[doc = "      \"additionalProperties\": false"]
10509#[doc = "    }"]
10510#[doc = "  ]"]
10511#[doc = "}"]
10512#[doc = r" ```"]
10513#[doc = r" </details>"]
10514#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
10515pub enum GlobalContractIdentifier {
10516    CodeHash(CryptoHash),
10517    AccountId(AccountId),
10518}
10519impl ::std::convert::From<&Self> for GlobalContractIdentifier {
10520    fn from(value: &GlobalContractIdentifier) -> Self {
10521        value.clone()
10522    }
10523}
10524impl ::std::convert::From<CryptoHash> for GlobalContractIdentifier {
10525    fn from(value: CryptoHash) -> Self {
10526        Self::CodeHash(value)
10527    }
10528}
10529impl ::std::convert::From<AccountId> for GlobalContractIdentifier {
10530    fn from(value: AccountId) -> Self {
10531        Self::AccountId(value)
10532    }
10533}
10534#[doc = "`GlobalContractIdentifierView`"]
10535#[doc = r""]
10536#[doc = r" <details><summary>JSON schema</summary>"]
10537#[doc = r""]
10538#[doc = r" ```json"]
10539#[doc = "{"]
10540#[doc = "  \"anyOf\": ["]
10541#[doc = "    {"]
10542#[doc = "      \"$ref\": \"#/components/schemas/CryptoHash\""]
10543#[doc = "    },"]
10544#[doc = "    {"]
10545#[doc = "      \"$ref\": \"#/components/schemas/AccountId\""]
10546#[doc = "    }"]
10547#[doc = "  ]"]
10548#[doc = "}"]
10549#[doc = r" ```"]
10550#[doc = r" </details>"]
10551#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
10552pub struct GlobalContractIdentifierView {
10553    #[serde(
10554        flatten,
10555        default,
10556        skip_serializing_if = "::std::option::Option::is_none"
10557    )]
10558    pub subtype_0: ::std::option::Option<CryptoHash>,
10559    #[serde(
10560        flatten,
10561        default,
10562        skip_serializing_if = "::std::option::Option::is_none"
10563    )]
10564    pub subtype_1: ::std::option::Option<AccountId>,
10565}
10566impl ::std::convert::From<&GlobalContractIdentifierView> for GlobalContractIdentifierView {
10567    fn from(value: &GlobalContractIdentifierView) -> Self {
10568        value.clone()
10569    }
10570}
10571impl ::std::default::Default for GlobalContractIdentifierView {
10572    fn default() -> Self {
10573        Self {
10574            subtype_0: Default::default(),
10575            subtype_1: Default::default(),
10576        }
10577    }
10578}
10579#[doc = "`HostError`"]
10580#[doc = r""]
10581#[doc = r" <details><summary>JSON schema</summary>"]
10582#[doc = r""]
10583#[doc = r" ```json"]
10584#[doc = "{"]
10585#[doc = "  \"oneOf\": ["]
10586#[doc = "    {"]
10587#[doc = "      \"description\": \"String encoding is bad UTF-16 sequence\","]
10588#[doc = "      \"type\": \"string\","]
10589#[doc = "      \"enum\": ["]
10590#[doc = "        \"BadUTF16\""]
10591#[doc = "      ]"]
10592#[doc = "    },"]
10593#[doc = "    {"]
10594#[doc = "      \"description\": \"String encoding is bad UTF-8 sequence\","]
10595#[doc = "      \"type\": \"string\","]
10596#[doc = "      \"enum\": ["]
10597#[doc = "        \"BadUTF8\""]
10598#[doc = "      ]"]
10599#[doc = "    },"]
10600#[doc = "    {"]
10601#[doc = "      \"description\": \"Exceeded the prepaid gas\","]
10602#[doc = "      \"type\": \"string\","]
10603#[doc = "      \"enum\": ["]
10604#[doc = "        \"GasExceeded\""]
10605#[doc = "      ]"]
10606#[doc = "    },"]
10607#[doc = "    {"]
10608#[doc = "      \"description\": \"Exceeded the maximum amount of gas allowed to burn per contract\","]
10609#[doc = "      \"type\": \"string\","]
10610#[doc = "      \"enum\": ["]
10611#[doc = "        \"GasLimitExceeded\""]
10612#[doc = "      ]"]
10613#[doc = "    },"]
10614#[doc = "    {"]
10615#[doc = "      \"description\": \"Exceeded the account balance\","]
10616#[doc = "      \"type\": \"string\","]
10617#[doc = "      \"enum\": ["]
10618#[doc = "        \"BalanceExceeded\""]
10619#[doc = "      ]"]
10620#[doc = "    },"]
10621#[doc = "    {"]
10622#[doc = "      \"description\": \"Tried to call an empty method name\","]
10623#[doc = "      \"type\": \"string\","]
10624#[doc = "      \"enum\": ["]
10625#[doc = "        \"EmptyMethodName\""]
10626#[doc = "      ]"]
10627#[doc = "    },"]
10628#[doc = "    {"]
10629#[doc = "      \"description\": \"Smart contract panicked\","]
10630#[doc = "      \"type\": \"object\","]
10631#[doc = "      \"required\": ["]
10632#[doc = "        \"GuestPanic\""]
10633#[doc = "      ],"]
10634#[doc = "      \"properties\": {"]
10635#[doc = "        \"GuestPanic\": {"]
10636#[doc = "          \"type\": \"object\","]
10637#[doc = "          \"required\": ["]
10638#[doc = "            \"panic_msg\""]
10639#[doc = "          ],"]
10640#[doc = "          \"properties\": {"]
10641#[doc = "            \"panic_msg\": {"]
10642#[doc = "              \"type\": \"string\""]
10643#[doc = "            }"]
10644#[doc = "          }"]
10645#[doc = "        }"]
10646#[doc = "      },"]
10647#[doc = "      \"additionalProperties\": false"]
10648#[doc = "    },"]
10649#[doc = "    {"]
10650#[doc = "      \"description\": \"IntegerOverflow happened during a contract execution\","]
10651#[doc = "      \"type\": \"string\","]
10652#[doc = "      \"enum\": ["]
10653#[doc = "        \"IntegerOverflow\""]
10654#[doc = "      ]"]
10655#[doc = "    },"]
10656#[doc = "    {"]
10657#[doc = "      \"description\": \"`promise_idx` does not correspond to existing promises\","]
10658#[doc = "      \"type\": \"object\","]
10659#[doc = "      \"required\": ["]
10660#[doc = "        \"InvalidPromiseIndex\""]
10661#[doc = "      ],"]
10662#[doc = "      \"properties\": {"]
10663#[doc = "        \"InvalidPromiseIndex\": {"]
10664#[doc = "          \"type\": \"object\","]
10665#[doc = "          \"required\": ["]
10666#[doc = "            \"promise_idx\""]
10667#[doc = "          ],"]
10668#[doc = "          \"properties\": {"]
10669#[doc = "            \"promise_idx\": {"]
10670#[doc = "              \"type\": \"integer\","]
10671#[doc = "              \"format\": \"uint64\","]
10672#[doc = "              \"minimum\": 0.0"]
10673#[doc = "            }"]
10674#[doc = "          }"]
10675#[doc = "        }"]
10676#[doc = "      },"]
10677#[doc = "      \"additionalProperties\": false"]
10678#[doc = "    },"]
10679#[doc = "    {"]
10680#[doc = "      \"description\": \"Actions can only be appended to non-joint promise.\","]
10681#[doc = "      \"type\": \"string\","]
10682#[doc = "      \"enum\": ["]
10683#[doc = "        \"CannotAppendActionToJointPromise\""]
10684#[doc = "      ]"]
10685#[doc = "    },"]
10686#[doc = "    {"]
10687#[doc = "      \"description\": \"Returning joint promise is currently prohibited\","]
10688#[doc = "      \"type\": \"string\","]
10689#[doc = "      \"enum\": ["]
10690#[doc = "        \"CannotReturnJointPromise\""]
10691#[doc = "      ]"]
10692#[doc = "    },"]
10693#[doc = "    {"]
10694#[doc = "      \"description\": \"Accessed invalid promise result index\","]
10695#[doc = "      \"type\": \"object\","]
10696#[doc = "      \"required\": ["]
10697#[doc = "        \"InvalidPromiseResultIndex\""]
10698#[doc = "      ],"]
10699#[doc = "      \"properties\": {"]
10700#[doc = "        \"InvalidPromiseResultIndex\": {"]
10701#[doc = "          \"type\": \"object\","]
10702#[doc = "          \"required\": ["]
10703#[doc = "            \"result_idx\""]
10704#[doc = "          ],"]
10705#[doc = "          \"properties\": {"]
10706#[doc = "            \"result_idx\": {"]
10707#[doc = "              \"type\": \"integer\","]
10708#[doc = "              \"format\": \"uint64\","]
10709#[doc = "              \"minimum\": 0.0"]
10710#[doc = "            }"]
10711#[doc = "          }"]
10712#[doc = "        }"]
10713#[doc = "      },"]
10714#[doc = "      \"additionalProperties\": false"]
10715#[doc = "    },"]
10716#[doc = "    {"]
10717#[doc = "      \"description\": \"Accessed invalid register id\","]
10718#[doc = "      \"type\": \"object\","]
10719#[doc = "      \"required\": ["]
10720#[doc = "        \"InvalidRegisterId\""]
10721#[doc = "      ],"]
10722#[doc = "      \"properties\": {"]
10723#[doc = "        \"InvalidRegisterId\": {"]
10724#[doc = "          \"type\": \"object\","]
10725#[doc = "          \"required\": ["]
10726#[doc = "            \"register_id\""]
10727#[doc = "          ],"]
10728#[doc = "          \"properties\": {"]
10729#[doc = "            \"register_id\": {"]
10730#[doc = "              \"type\": \"integer\","]
10731#[doc = "              \"format\": \"uint64\","]
10732#[doc = "              \"minimum\": 0.0"]
10733#[doc = "            }"]
10734#[doc = "          }"]
10735#[doc = "        }"]
10736#[doc = "      },"]
10737#[doc = "      \"additionalProperties\": false"]
10738#[doc = "    },"]
10739#[doc = "    {"]
10740#[doc = "      \"description\": \"Iterator `iterator_index` was invalidated after its creation by performing a mutable operation on trie\","]
10741#[doc = "      \"type\": \"object\","]
10742#[doc = "      \"required\": ["]
10743#[doc = "        \"IteratorWasInvalidated\""]
10744#[doc = "      ],"]
10745#[doc = "      \"properties\": {"]
10746#[doc = "        \"IteratorWasInvalidated\": {"]
10747#[doc = "          \"type\": \"object\","]
10748#[doc = "          \"required\": ["]
10749#[doc = "            \"iterator_index\""]
10750#[doc = "          ],"]
10751#[doc = "          \"properties\": {"]
10752#[doc = "            \"iterator_index\": {"]
10753#[doc = "              \"type\": \"integer\","]
10754#[doc = "              \"format\": \"uint64\","]
10755#[doc = "              \"minimum\": 0.0"]
10756#[doc = "            }"]
10757#[doc = "          }"]
10758#[doc = "        }"]
10759#[doc = "      },"]
10760#[doc = "      \"additionalProperties\": false"]
10761#[doc = "    },"]
10762#[doc = "    {"]
10763#[doc = "      \"description\": \"Accessed memory outside the bounds\","]
10764#[doc = "      \"type\": \"string\","]
10765#[doc = "      \"enum\": ["]
10766#[doc = "        \"MemoryAccessViolation\""]
10767#[doc = "      ]"]
10768#[doc = "    },"]
10769#[doc = "    {"]
10770#[doc = "      \"description\": \"VM Logic returned an invalid receipt index\","]
10771#[doc = "      \"type\": \"object\","]
10772#[doc = "      \"required\": ["]
10773#[doc = "        \"InvalidReceiptIndex\""]
10774#[doc = "      ],"]
10775#[doc = "      \"properties\": {"]
10776#[doc = "        \"InvalidReceiptIndex\": {"]
10777#[doc = "          \"type\": \"object\","]
10778#[doc = "          \"required\": ["]
10779#[doc = "            \"receipt_index\""]
10780#[doc = "          ],"]
10781#[doc = "          \"properties\": {"]
10782#[doc = "            \"receipt_index\": {"]
10783#[doc = "              \"type\": \"integer\","]
10784#[doc = "              \"format\": \"uint64\","]
10785#[doc = "              \"minimum\": 0.0"]
10786#[doc = "            }"]
10787#[doc = "          }"]
10788#[doc = "        }"]
10789#[doc = "      },"]
10790#[doc = "      \"additionalProperties\": false"]
10791#[doc = "    },"]
10792#[doc = "    {"]
10793#[doc = "      \"description\": \"Iterator index `iterator_index` does not exist\","]
10794#[doc = "      \"type\": \"object\","]
10795#[doc = "      \"required\": ["]
10796#[doc = "        \"InvalidIteratorIndex\""]
10797#[doc = "      ],"]
10798#[doc = "      \"properties\": {"]
10799#[doc = "        \"InvalidIteratorIndex\": {"]
10800#[doc = "          \"type\": \"object\","]
10801#[doc = "          \"required\": ["]
10802#[doc = "            \"iterator_index\""]
10803#[doc = "          ],"]
10804#[doc = "          \"properties\": {"]
10805#[doc = "            \"iterator_index\": {"]
10806#[doc = "              \"type\": \"integer\","]
10807#[doc = "              \"format\": \"uint64\","]
10808#[doc = "              \"minimum\": 0.0"]
10809#[doc = "            }"]
10810#[doc = "          }"]
10811#[doc = "        }"]
10812#[doc = "      },"]
10813#[doc = "      \"additionalProperties\": false"]
10814#[doc = "    },"]
10815#[doc = "    {"]
10816#[doc = "      \"description\": \"VM Logic returned an invalid account id\","]
10817#[doc = "      \"type\": \"string\","]
10818#[doc = "      \"enum\": ["]
10819#[doc = "        \"InvalidAccountId\""]
10820#[doc = "      ]"]
10821#[doc = "    },"]
10822#[doc = "    {"]
10823#[doc = "      \"description\": \"VM Logic returned an invalid method name\","]
10824#[doc = "      \"type\": \"string\","]
10825#[doc = "      \"enum\": ["]
10826#[doc = "        \"InvalidMethodName\""]
10827#[doc = "      ]"]
10828#[doc = "    },"]
10829#[doc = "    {"]
10830#[doc = "      \"description\": \"VM Logic provided an invalid public key\","]
10831#[doc = "      \"type\": \"string\","]
10832#[doc = "      \"enum\": ["]
10833#[doc = "        \"InvalidPublicKey\""]
10834#[doc = "      ]"]
10835#[doc = "    },"]
10836#[doc = "    {"]
10837#[doc = "      \"description\": \"`method_name` is not allowed in view calls\","]
10838#[doc = "      \"type\": \"object\","]
10839#[doc = "      \"required\": ["]
10840#[doc = "        \"ProhibitedInView\""]
10841#[doc = "      ],"]
10842#[doc = "      \"properties\": {"]
10843#[doc = "        \"ProhibitedInView\": {"]
10844#[doc = "          \"type\": \"object\","]
10845#[doc = "          \"required\": ["]
10846#[doc = "            \"method_name\""]
10847#[doc = "          ],"]
10848#[doc = "          \"properties\": {"]
10849#[doc = "            \"method_name\": {"]
10850#[doc = "              \"type\": \"string\""]
10851#[doc = "            }"]
10852#[doc = "          }"]
10853#[doc = "        }"]
10854#[doc = "      },"]
10855#[doc = "      \"additionalProperties\": false"]
10856#[doc = "    },"]
10857#[doc = "    {"]
10858#[doc = "      \"description\": \"The total number of logs will exceed the limit.\","]
10859#[doc = "      \"type\": \"object\","]
10860#[doc = "      \"required\": ["]
10861#[doc = "        \"NumberOfLogsExceeded\""]
10862#[doc = "      ],"]
10863#[doc = "      \"properties\": {"]
10864#[doc = "        \"NumberOfLogsExceeded\": {"]
10865#[doc = "          \"type\": \"object\","]
10866#[doc = "          \"required\": ["]
10867#[doc = "            \"limit\""]
10868#[doc = "          ],"]
10869#[doc = "          \"properties\": {"]
10870#[doc = "            \"limit\": {"]
10871#[doc = "              \"type\": \"integer\","]
10872#[doc = "              \"format\": \"uint64\","]
10873#[doc = "              \"minimum\": 0.0"]
10874#[doc = "            }"]
10875#[doc = "          }"]
10876#[doc = "        }"]
10877#[doc = "      },"]
10878#[doc = "      \"additionalProperties\": false"]
10879#[doc = "    },"]
10880#[doc = "    {"]
10881#[doc = "      \"description\": \"The storage key length exceeded the limit.\","]
10882#[doc = "      \"type\": \"object\","]
10883#[doc = "      \"required\": ["]
10884#[doc = "        \"KeyLengthExceeded\""]
10885#[doc = "      ],"]
10886#[doc = "      \"properties\": {"]
10887#[doc = "        \"KeyLengthExceeded\": {"]
10888#[doc = "          \"type\": \"object\","]
10889#[doc = "          \"required\": ["]
10890#[doc = "            \"length\","]
10891#[doc = "            \"limit\""]
10892#[doc = "          ],"]
10893#[doc = "          \"properties\": {"]
10894#[doc = "            \"length\": {"]
10895#[doc = "              \"type\": \"integer\","]
10896#[doc = "              \"format\": \"uint64\","]
10897#[doc = "              \"minimum\": 0.0"]
10898#[doc = "            },"]
10899#[doc = "            \"limit\": {"]
10900#[doc = "              \"type\": \"integer\","]
10901#[doc = "              \"format\": \"uint64\","]
10902#[doc = "              \"minimum\": 0.0"]
10903#[doc = "            }"]
10904#[doc = "          }"]
10905#[doc = "        }"]
10906#[doc = "      },"]
10907#[doc = "      \"additionalProperties\": false"]
10908#[doc = "    },"]
10909#[doc = "    {"]
10910#[doc = "      \"description\": \"The storage value length exceeded the limit.\","]
10911#[doc = "      \"type\": \"object\","]
10912#[doc = "      \"required\": ["]
10913#[doc = "        \"ValueLengthExceeded\""]
10914#[doc = "      ],"]
10915#[doc = "      \"properties\": {"]
10916#[doc = "        \"ValueLengthExceeded\": {"]
10917#[doc = "          \"type\": \"object\","]
10918#[doc = "          \"required\": ["]
10919#[doc = "            \"length\","]
10920#[doc = "            \"limit\""]
10921#[doc = "          ],"]
10922#[doc = "          \"properties\": {"]
10923#[doc = "            \"length\": {"]
10924#[doc = "              \"type\": \"integer\","]
10925#[doc = "              \"format\": \"uint64\","]
10926#[doc = "              \"minimum\": 0.0"]
10927#[doc = "            },"]
10928#[doc = "            \"limit\": {"]
10929#[doc = "              \"type\": \"integer\","]
10930#[doc = "              \"format\": \"uint64\","]
10931#[doc = "              \"minimum\": 0.0"]
10932#[doc = "            }"]
10933#[doc = "          }"]
10934#[doc = "        }"]
10935#[doc = "      },"]
10936#[doc = "      \"additionalProperties\": false"]
10937#[doc = "    },"]
10938#[doc = "    {"]
10939#[doc = "      \"description\": \"The total log length exceeded the limit.\","]
10940#[doc = "      \"type\": \"object\","]
10941#[doc = "      \"required\": ["]
10942#[doc = "        \"TotalLogLengthExceeded\""]
10943#[doc = "      ],"]
10944#[doc = "      \"properties\": {"]
10945#[doc = "        \"TotalLogLengthExceeded\": {"]
10946#[doc = "          \"type\": \"object\","]
10947#[doc = "          \"required\": ["]
10948#[doc = "            \"length\","]
10949#[doc = "            \"limit\""]
10950#[doc = "          ],"]
10951#[doc = "          \"properties\": {"]
10952#[doc = "            \"length\": {"]
10953#[doc = "              \"type\": \"integer\","]
10954#[doc = "              \"format\": \"uint64\","]
10955#[doc = "              \"minimum\": 0.0"]
10956#[doc = "            },"]
10957#[doc = "            \"limit\": {"]
10958#[doc = "              \"type\": \"integer\","]
10959#[doc = "              \"format\": \"uint64\","]
10960#[doc = "              \"minimum\": 0.0"]
10961#[doc = "            }"]
10962#[doc = "          }"]
10963#[doc = "        }"]
10964#[doc = "      },"]
10965#[doc = "      \"additionalProperties\": false"]
10966#[doc = "    },"]
10967#[doc = "    {"]
10968#[doc = "      \"description\": \"The maximum number of promises within a FunctionCall exceeded the limit.\","]
10969#[doc = "      \"type\": \"object\","]
10970#[doc = "      \"required\": ["]
10971#[doc = "        \"NumberPromisesExceeded\""]
10972#[doc = "      ],"]
10973#[doc = "      \"properties\": {"]
10974#[doc = "        \"NumberPromisesExceeded\": {"]
10975#[doc = "          \"type\": \"object\","]
10976#[doc = "          \"required\": ["]
10977#[doc = "            \"limit\","]
10978#[doc = "            \"number_of_promises\""]
10979#[doc = "          ],"]
10980#[doc = "          \"properties\": {"]
10981#[doc = "            \"limit\": {"]
10982#[doc = "              \"type\": \"integer\","]
10983#[doc = "              \"format\": \"uint64\","]
10984#[doc = "              \"minimum\": 0.0"]
10985#[doc = "            },"]
10986#[doc = "            \"number_of_promises\": {"]
10987#[doc = "              \"type\": \"integer\","]
10988#[doc = "              \"format\": \"uint64\","]
10989#[doc = "              \"minimum\": 0.0"]
10990#[doc = "            }"]
10991#[doc = "          }"]
10992#[doc = "        }"]
10993#[doc = "      },"]
10994#[doc = "      \"additionalProperties\": false"]
10995#[doc = "    },"]
10996#[doc = "    {"]
10997#[doc = "      \"description\": \"The maximum number of input data dependencies exceeded the limit.\","]
10998#[doc = "      \"type\": \"object\","]
10999#[doc = "      \"required\": ["]
11000#[doc = "        \"NumberInputDataDependenciesExceeded\""]
11001#[doc = "      ],"]
11002#[doc = "      \"properties\": {"]
11003#[doc = "        \"NumberInputDataDependenciesExceeded\": {"]
11004#[doc = "          \"type\": \"object\","]
11005#[doc = "          \"required\": ["]
11006#[doc = "            \"limit\","]
11007#[doc = "            \"number_of_input_data_dependencies\""]
11008#[doc = "          ],"]
11009#[doc = "          \"properties\": {"]
11010#[doc = "            \"limit\": {"]
11011#[doc = "              \"type\": \"integer\","]
11012#[doc = "              \"format\": \"uint64\","]
11013#[doc = "              \"minimum\": 0.0"]
11014#[doc = "            },"]
11015#[doc = "            \"number_of_input_data_dependencies\": {"]
11016#[doc = "              \"type\": \"integer\","]
11017#[doc = "              \"format\": \"uint64\","]
11018#[doc = "              \"minimum\": 0.0"]
11019#[doc = "            }"]
11020#[doc = "          }"]
11021#[doc = "        }"]
11022#[doc = "      },"]
11023#[doc = "      \"additionalProperties\": false"]
11024#[doc = "    },"]
11025#[doc = "    {"]
11026#[doc = "      \"description\": \"The returned value length exceeded the limit.\","]
11027#[doc = "      \"type\": \"object\","]
11028#[doc = "      \"required\": ["]
11029#[doc = "        \"ReturnedValueLengthExceeded\""]
11030#[doc = "      ],"]
11031#[doc = "      \"properties\": {"]
11032#[doc = "        \"ReturnedValueLengthExceeded\": {"]
11033#[doc = "          \"type\": \"object\","]
11034#[doc = "          \"required\": ["]
11035#[doc = "            \"length\","]
11036#[doc = "            \"limit\""]
11037#[doc = "          ],"]
11038#[doc = "          \"properties\": {"]
11039#[doc = "            \"length\": {"]
11040#[doc = "              \"type\": \"integer\","]
11041#[doc = "              \"format\": \"uint64\","]
11042#[doc = "              \"minimum\": 0.0"]
11043#[doc = "            },"]
11044#[doc = "            \"limit\": {"]
11045#[doc = "              \"type\": \"integer\","]
11046#[doc = "              \"format\": \"uint64\","]
11047#[doc = "              \"minimum\": 0.0"]
11048#[doc = "            }"]
11049#[doc = "          }"]
11050#[doc = "        }"]
11051#[doc = "      },"]
11052#[doc = "      \"additionalProperties\": false"]
11053#[doc = "    },"]
11054#[doc = "    {"]
11055#[doc = "      \"description\": \"The contract size for DeployContract action exceeded the limit.\","]
11056#[doc = "      \"type\": \"object\","]
11057#[doc = "      \"required\": ["]
11058#[doc = "        \"ContractSizeExceeded\""]
11059#[doc = "      ],"]
11060#[doc = "      \"properties\": {"]
11061#[doc = "        \"ContractSizeExceeded\": {"]
11062#[doc = "          \"type\": \"object\","]
11063#[doc = "          \"required\": ["]
11064#[doc = "            \"limit\","]
11065#[doc = "            \"size\""]
11066#[doc = "          ],"]
11067#[doc = "          \"properties\": {"]
11068#[doc = "            \"limit\": {"]
11069#[doc = "              \"type\": \"integer\","]
11070#[doc = "              \"format\": \"uint64\","]
11071#[doc = "              \"minimum\": 0.0"]
11072#[doc = "            },"]
11073#[doc = "            \"size\": {"]
11074#[doc = "              \"type\": \"integer\","]
11075#[doc = "              \"format\": \"uint64\","]
11076#[doc = "              \"minimum\": 0.0"]
11077#[doc = "            }"]
11078#[doc = "          }"]
11079#[doc = "        }"]
11080#[doc = "      },"]
11081#[doc = "      \"additionalProperties\": false"]
11082#[doc = "    },"]
11083#[doc = "    {"]
11084#[doc = "      \"description\": \"The host function was deprecated.\","]
11085#[doc = "      \"type\": \"object\","]
11086#[doc = "      \"required\": ["]
11087#[doc = "        \"Deprecated\""]
11088#[doc = "      ],"]
11089#[doc = "      \"properties\": {"]
11090#[doc = "        \"Deprecated\": {"]
11091#[doc = "          \"type\": \"object\","]
11092#[doc = "          \"required\": ["]
11093#[doc = "            \"method_name\""]
11094#[doc = "          ],"]
11095#[doc = "          \"properties\": {"]
11096#[doc = "            \"method_name\": {"]
11097#[doc = "              \"type\": \"string\""]
11098#[doc = "            }"]
11099#[doc = "          }"]
11100#[doc = "        }"]
11101#[doc = "      },"]
11102#[doc = "      \"additionalProperties\": false"]
11103#[doc = "    },"]
11104#[doc = "    {"]
11105#[doc = "      \"description\": \"General errors for ECDSA recover.\","]
11106#[doc = "      \"type\": \"object\","]
11107#[doc = "      \"required\": ["]
11108#[doc = "        \"ECRecoverError\""]
11109#[doc = "      ],"]
11110#[doc = "      \"properties\": {"]
11111#[doc = "        \"ECRecoverError\": {"]
11112#[doc = "          \"type\": \"object\","]
11113#[doc = "          \"required\": ["]
11114#[doc = "            \"msg\""]
11115#[doc = "          ],"]
11116#[doc = "          \"properties\": {"]
11117#[doc = "            \"msg\": {"]
11118#[doc = "              \"type\": \"string\""]
11119#[doc = "            }"]
11120#[doc = "          }"]
11121#[doc = "        }"]
11122#[doc = "      },"]
11123#[doc = "      \"additionalProperties\": false"]
11124#[doc = "    },"]
11125#[doc = "    {"]
11126#[doc = "      \"description\": \"Invalid input to alt_bn128 family of functions (e.g., point which isn't\\non the curve).\","]
11127#[doc = "      \"type\": \"object\","]
11128#[doc = "      \"required\": ["]
11129#[doc = "        \"AltBn128InvalidInput\""]
11130#[doc = "      ],"]
11131#[doc = "      \"properties\": {"]
11132#[doc = "        \"AltBn128InvalidInput\": {"]
11133#[doc = "          \"type\": \"object\","]
11134#[doc = "          \"required\": ["]
11135#[doc = "            \"msg\""]
11136#[doc = "          ],"]
11137#[doc = "          \"properties\": {"]
11138#[doc = "            \"msg\": {"]
11139#[doc = "              \"type\": \"string\""]
11140#[doc = "            }"]
11141#[doc = "          }"]
11142#[doc = "        }"]
11143#[doc = "      },"]
11144#[doc = "      \"additionalProperties\": false"]
11145#[doc = "    },"]
11146#[doc = "    {"]
11147#[doc = "      \"description\": \"Invalid input to ed25519 signature verification function (e.g. signature cannot be\\nderived from bytes).\","]
11148#[doc = "      \"type\": \"object\","]
11149#[doc = "      \"required\": ["]
11150#[doc = "        \"Ed25519VerifyInvalidInput\""]
11151#[doc = "      ],"]
11152#[doc = "      \"properties\": {"]
11153#[doc = "        \"Ed25519VerifyInvalidInput\": {"]
11154#[doc = "          \"type\": \"object\","]
11155#[doc = "          \"required\": ["]
11156#[doc = "            \"msg\""]
11157#[doc = "          ],"]
11158#[doc = "          \"properties\": {"]
11159#[doc = "            \"msg\": {"]
11160#[doc = "              \"type\": \"string\""]
11161#[doc = "            }"]
11162#[doc = "          }"]
11163#[doc = "        }"]
11164#[doc = "      },"]
11165#[doc = "      \"additionalProperties\": false"]
11166#[doc = "    }"]
11167#[doc = "  ]"]
11168#[doc = "}"]
11169#[doc = r" ```"]
11170#[doc = r" </details>"]
11171#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
11172pub enum HostError {
11173    #[doc = "String encoding is bad UTF-16 sequence"]
11174    #[serde(rename = "BadUTF16")]
11175    BadUtf16,
11176    #[doc = "String encoding is bad UTF-8 sequence"]
11177    #[serde(rename = "BadUTF8")]
11178    BadUtf8,
11179    #[doc = "Exceeded the prepaid gas"]
11180    GasExceeded,
11181    #[doc = "Exceeded the maximum amount of gas allowed to burn per contract"]
11182    GasLimitExceeded,
11183    #[doc = "Exceeded the account balance"]
11184    BalanceExceeded,
11185    #[doc = "Tried to call an empty method name"]
11186    EmptyMethodName,
11187    #[doc = "Smart contract panicked"]
11188    GuestPanic { panic_msg: ::std::string::String },
11189    #[doc = "IntegerOverflow happened during a contract execution"]
11190    IntegerOverflow,
11191    #[doc = "`promise_idx` does not correspond to existing promises"]
11192    InvalidPromiseIndex { promise_idx: u64 },
11193    #[doc = "Actions can only be appended to non-joint promise."]
11194    CannotAppendActionToJointPromise,
11195    #[doc = "Returning joint promise is currently prohibited"]
11196    CannotReturnJointPromise,
11197    #[doc = "Accessed invalid promise result index"]
11198    InvalidPromiseResultIndex { result_idx: u64 },
11199    #[doc = "Accessed invalid register id"]
11200    InvalidRegisterId { register_id: u64 },
11201    #[doc = "Iterator `iterator_index` was invalidated after its creation by performing a mutable operation on trie"]
11202    IteratorWasInvalidated { iterator_index: u64 },
11203    #[doc = "Accessed memory outside the bounds"]
11204    MemoryAccessViolation,
11205    #[doc = "VM Logic returned an invalid receipt index"]
11206    InvalidReceiptIndex { receipt_index: u64 },
11207    #[doc = "Iterator index `iterator_index` does not exist"]
11208    InvalidIteratorIndex { iterator_index: u64 },
11209    #[doc = "VM Logic returned an invalid account id"]
11210    InvalidAccountId,
11211    #[doc = "VM Logic returned an invalid method name"]
11212    InvalidMethodName,
11213    #[doc = "VM Logic provided an invalid public key"]
11214    InvalidPublicKey,
11215    #[doc = "`method_name` is not allowed in view calls"]
11216    ProhibitedInView { method_name: ::std::string::String },
11217    #[doc = "The total number of logs will exceed the limit."]
11218    NumberOfLogsExceeded { limit: u64 },
11219    #[doc = "The storage key length exceeded the limit."]
11220    KeyLengthExceeded { length: u64, limit: u64 },
11221    #[doc = "The storage value length exceeded the limit."]
11222    ValueLengthExceeded { length: u64, limit: u64 },
11223    #[doc = "The total log length exceeded the limit."]
11224    TotalLogLengthExceeded { length: u64, limit: u64 },
11225    #[doc = "The maximum number of promises within a FunctionCall exceeded the limit."]
11226    NumberPromisesExceeded { limit: u64, number_of_promises: u64 },
11227    #[doc = "The maximum number of input data dependencies exceeded the limit."]
11228    NumberInputDataDependenciesExceeded {
11229        limit: u64,
11230        number_of_input_data_dependencies: u64,
11231    },
11232    #[doc = "The returned value length exceeded the limit."]
11233    ReturnedValueLengthExceeded { length: u64, limit: u64 },
11234    #[doc = "The contract size for DeployContract action exceeded the limit."]
11235    ContractSizeExceeded { limit: u64, size: u64 },
11236    #[doc = "The host function was deprecated."]
11237    Deprecated { method_name: ::std::string::String },
11238    #[doc = "General errors for ECDSA recover."]
11239    #[serde(rename = "ECRecoverError")]
11240    EcRecoverError { msg: ::std::string::String },
11241    #[doc = "Invalid input to alt_bn128 family of functions (e.g., point which isn't\non the curve)."]
11242    AltBn128InvalidInput { msg: ::std::string::String },
11243    #[doc = "Invalid input to ed25519 signature verification function (e.g. signature cannot be\nderived from bytes)."]
11244    Ed25519VerifyInvalidInput { msg: ::std::string::String },
11245}
11246impl ::std::convert::From<&Self> for HostError {
11247    fn from(value: &HostError) -> Self {
11248        value.clone()
11249    }
11250}
11251#[doc = "`InternalError`"]
11252#[doc = r""]
11253#[doc = r" <details><summary>JSON schema</summary>"]
11254#[doc = r""]
11255#[doc = r" ```json"]
11256#[doc = "{"]
11257#[doc = "  \"oneOf\": ["]
11258#[doc = "    {"]
11259#[doc = "      \"type\": \"object\","]
11260#[doc = "      \"required\": ["]
11261#[doc = "        \"info\","]
11262#[doc = "        \"name\""]
11263#[doc = "      ],"]
11264#[doc = "      \"properties\": {"]
11265#[doc = "        \"info\": {"]
11266#[doc = "          \"type\": \"object\","]
11267#[doc = "          \"required\": ["]
11268#[doc = "            \"error_message\""]
11269#[doc = "          ],"]
11270#[doc = "          \"properties\": {"]
11271#[doc = "            \"error_message\": {"]
11272#[doc = "              \"type\": \"string\""]
11273#[doc = "            }"]
11274#[doc = "          }"]
11275#[doc = "        },"]
11276#[doc = "        \"name\": {"]
11277#[doc = "          \"type\": \"string\","]
11278#[doc = "          \"enum\": ["]
11279#[doc = "            \"INTERNAL_ERROR\""]
11280#[doc = "          ]"]
11281#[doc = "        }"]
11282#[doc = "      }"]
11283#[doc = "    }"]
11284#[doc = "  ]"]
11285#[doc = "}"]
11286#[doc = r" ```"]
11287#[doc = r" </details>"]
11288#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
11289#[serde(tag = "name", content = "info")]
11290pub enum InternalError {
11291    #[serde(rename = "INTERNAL_ERROR")]
11292    InternalError {
11293        error_message: ::std::string::String,
11294    },
11295}
11296impl ::std::convert::From<&Self> for InternalError {
11297    fn from(value: &InternalError) -> Self {
11298        value.clone()
11299    }
11300}
11301#[doc = "`InvalidAccessKeyError`"]
11302#[doc = r""]
11303#[doc = r" <details><summary>JSON schema</summary>"]
11304#[doc = r""]
11305#[doc = r" ```json"]
11306#[doc = "{"]
11307#[doc = "  \"oneOf\": ["]
11308#[doc = "    {"]
11309#[doc = "      \"description\": \"The access key identified by the `public_key` doesn't exist for the account\","]
11310#[doc = "      \"type\": \"object\","]
11311#[doc = "      \"required\": ["]
11312#[doc = "        \"AccessKeyNotFound\""]
11313#[doc = "      ],"]
11314#[doc = "      \"properties\": {"]
11315#[doc = "        \"AccessKeyNotFound\": {"]
11316#[doc = "          \"type\": \"object\","]
11317#[doc = "          \"required\": ["]
11318#[doc = "            \"account_id\","]
11319#[doc = "            \"public_key\""]
11320#[doc = "          ],"]
11321#[doc = "          \"properties\": {"]
11322#[doc = "            \"account_id\": {"]
11323#[doc = "              \"$ref\": \"#/components/schemas/AccountId\""]
11324#[doc = "            },"]
11325#[doc = "            \"public_key\": {"]
11326#[doc = "              \"$ref\": \"#/components/schemas/PublicKey\""]
11327#[doc = "            }"]
11328#[doc = "          }"]
11329#[doc = "        }"]
11330#[doc = "      },"]
11331#[doc = "      \"additionalProperties\": false"]
11332#[doc = "    },"]
11333#[doc = "    {"]
11334#[doc = "      \"description\": \"Transaction `receiver_id` doesn't match the access key receiver_id\","]
11335#[doc = "      \"type\": \"object\","]
11336#[doc = "      \"required\": ["]
11337#[doc = "        \"ReceiverMismatch\""]
11338#[doc = "      ],"]
11339#[doc = "      \"properties\": {"]
11340#[doc = "        \"ReceiverMismatch\": {"]
11341#[doc = "          \"type\": \"object\","]
11342#[doc = "          \"required\": ["]
11343#[doc = "            \"ak_receiver\","]
11344#[doc = "            \"tx_receiver\""]
11345#[doc = "          ],"]
11346#[doc = "          \"properties\": {"]
11347#[doc = "            \"ak_receiver\": {"]
11348#[doc = "              \"type\": \"string\""]
11349#[doc = "            },"]
11350#[doc = "            \"tx_receiver\": {"]
11351#[doc = "              \"$ref\": \"#/components/schemas/AccountId\""]
11352#[doc = "            }"]
11353#[doc = "          }"]
11354#[doc = "        }"]
11355#[doc = "      },"]
11356#[doc = "      \"additionalProperties\": false"]
11357#[doc = "    },"]
11358#[doc = "    {"]
11359#[doc = "      \"description\": \"Transaction method name isn't allowed by the access key\","]
11360#[doc = "      \"type\": \"object\","]
11361#[doc = "      \"required\": ["]
11362#[doc = "        \"MethodNameMismatch\""]
11363#[doc = "      ],"]
11364#[doc = "      \"properties\": {"]
11365#[doc = "        \"MethodNameMismatch\": {"]
11366#[doc = "          \"type\": \"object\","]
11367#[doc = "          \"required\": ["]
11368#[doc = "            \"method_name\""]
11369#[doc = "          ],"]
11370#[doc = "          \"properties\": {"]
11371#[doc = "            \"method_name\": {"]
11372#[doc = "              \"type\": \"string\""]
11373#[doc = "            }"]
11374#[doc = "          }"]
11375#[doc = "        }"]
11376#[doc = "      },"]
11377#[doc = "      \"additionalProperties\": false"]
11378#[doc = "    },"]
11379#[doc = "    {"]
11380#[doc = "      \"description\": \"Transaction requires a full permission access key.\","]
11381#[doc = "      \"type\": \"string\","]
11382#[doc = "      \"enum\": ["]
11383#[doc = "        \"RequiresFullAccess\""]
11384#[doc = "      ]"]
11385#[doc = "    },"]
11386#[doc = "    {"]
11387#[doc = "      \"description\": \"Access Key does not have enough allowance to cover transaction cost\","]
11388#[doc = "      \"type\": \"object\","]
11389#[doc = "      \"required\": ["]
11390#[doc = "        \"NotEnoughAllowance\""]
11391#[doc = "      ],"]
11392#[doc = "      \"properties\": {"]
11393#[doc = "        \"NotEnoughAllowance\": {"]
11394#[doc = "          \"type\": \"object\","]
11395#[doc = "          \"required\": ["]
11396#[doc = "            \"account_id\","]
11397#[doc = "            \"allowance\","]
11398#[doc = "            \"cost\","]
11399#[doc = "            \"public_key\""]
11400#[doc = "          ],"]
11401#[doc = "          \"properties\": {"]
11402#[doc = "            \"account_id\": {"]
11403#[doc = "              \"$ref\": \"#/components/schemas/AccountId\""]
11404#[doc = "            },"]
11405#[doc = "            \"allowance\": {"]
11406#[doc = "              \"$ref\": \"#/components/schemas/NearToken\""]
11407#[doc = "            },"]
11408#[doc = "            \"cost\": {"]
11409#[doc = "              \"$ref\": \"#/components/schemas/NearToken\""]
11410#[doc = "            },"]
11411#[doc = "            \"public_key\": {"]
11412#[doc = "              \"$ref\": \"#/components/schemas/PublicKey\""]
11413#[doc = "            }"]
11414#[doc = "          }"]
11415#[doc = "        }"]
11416#[doc = "      },"]
11417#[doc = "      \"additionalProperties\": false"]
11418#[doc = "    },"]
11419#[doc = "    {"]
11420#[doc = "      \"description\": \"Having a deposit with a function call action is not allowed with a function call access key.\","]
11421#[doc = "      \"type\": \"string\","]
11422#[doc = "      \"enum\": ["]
11423#[doc = "        \"DepositWithFunctionCall\""]
11424#[doc = "      ]"]
11425#[doc = "    }"]
11426#[doc = "  ]"]
11427#[doc = "}"]
11428#[doc = r" ```"]
11429#[doc = r" </details>"]
11430#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
11431pub enum InvalidAccessKeyError {
11432    #[doc = "The access key identified by the `public_key` doesn't exist for the account"]
11433    AccessKeyNotFound {
11434        account_id: AccountId,
11435        public_key: PublicKey,
11436    },
11437    #[doc = "Transaction `receiver_id` doesn't match the access key receiver_id"]
11438    ReceiverMismatch {
11439        ak_receiver: ::std::string::String,
11440        tx_receiver: AccountId,
11441    },
11442    #[doc = "Transaction method name isn't allowed by the access key"]
11443    MethodNameMismatch { method_name: ::std::string::String },
11444    #[doc = "Transaction requires a full permission access key."]
11445    RequiresFullAccess,
11446    #[doc = "Access Key does not have enough allowance to cover transaction cost"]
11447    NotEnoughAllowance {
11448        account_id: AccountId,
11449        allowance: NearToken,
11450        cost: NearToken,
11451        public_key: PublicKey,
11452    },
11453    #[doc = "Having a deposit with a function call action is not allowed with a function call access key."]
11454    DepositWithFunctionCall,
11455}
11456impl ::std::convert::From<&Self> for InvalidAccessKeyError {
11457    fn from(value: &InvalidAccessKeyError) -> Self {
11458        value.clone()
11459    }
11460}
11461#[doc = "An error happened during TX execution"]
11462#[doc = r""]
11463#[doc = r" <details><summary>JSON schema</summary>"]
11464#[doc = r""]
11465#[doc = r" ```json"]
11466#[doc = "{"]
11467#[doc = "  \"description\": \"An error happened during TX execution\","]
11468#[doc = "  \"oneOf\": ["]
11469#[doc = "    {"]
11470#[doc = "      \"description\": \"Happens if a wrong AccessKey used or AccessKey has not enough permissions\","]
11471#[doc = "      \"type\": \"object\","]
11472#[doc = "      \"required\": ["]
11473#[doc = "        \"InvalidAccessKeyError\""]
11474#[doc = "      ],"]
11475#[doc = "      \"properties\": {"]
11476#[doc = "        \"InvalidAccessKeyError\": {"]
11477#[doc = "          \"$ref\": \"#/components/schemas/InvalidAccessKeyError\""]
11478#[doc = "        }"]
11479#[doc = "      },"]
11480#[doc = "      \"additionalProperties\": false"]
11481#[doc = "    },"]
11482#[doc = "    {"]
11483#[doc = "      \"description\": \"TX signer_id is not a valid [`AccountId`]\","]
11484#[doc = "      \"type\": \"object\","]
11485#[doc = "      \"required\": ["]
11486#[doc = "        \"InvalidSignerId\""]
11487#[doc = "      ],"]
11488#[doc = "      \"properties\": {"]
11489#[doc = "        \"InvalidSignerId\": {"]
11490#[doc = "          \"type\": \"object\","]
11491#[doc = "          \"required\": ["]
11492#[doc = "            \"signer_id\""]
11493#[doc = "          ],"]
11494#[doc = "          \"properties\": {"]
11495#[doc = "            \"signer_id\": {"]
11496#[doc = "              \"type\": \"string\""]
11497#[doc = "            }"]
11498#[doc = "          }"]
11499#[doc = "        }"]
11500#[doc = "      },"]
11501#[doc = "      \"additionalProperties\": false"]
11502#[doc = "    },"]
11503#[doc = "    {"]
11504#[doc = "      \"description\": \"TX signer_id is not found in a storage\","]
11505#[doc = "      \"type\": \"object\","]
11506#[doc = "      \"required\": ["]
11507#[doc = "        \"SignerDoesNotExist\""]
11508#[doc = "      ],"]
11509#[doc = "      \"properties\": {"]
11510#[doc = "        \"SignerDoesNotExist\": {"]
11511#[doc = "          \"type\": \"object\","]
11512#[doc = "          \"required\": ["]
11513#[doc = "            \"signer_id\""]
11514#[doc = "          ],"]
11515#[doc = "          \"properties\": {"]
11516#[doc = "            \"signer_id\": {"]
11517#[doc = "              \"$ref\": \"#/components/schemas/AccountId\""]
11518#[doc = "            }"]
11519#[doc = "          }"]
11520#[doc = "        }"]
11521#[doc = "      },"]
11522#[doc = "      \"additionalProperties\": false"]
11523#[doc = "    },"]
11524#[doc = "    {"]
11525#[doc = "      \"description\": \"Transaction nonce must be strictly greater than `account[access_key].nonce`.\","]
11526#[doc = "      \"type\": \"object\","]
11527#[doc = "      \"required\": ["]
11528#[doc = "        \"InvalidNonce\""]
11529#[doc = "      ],"]
11530#[doc = "      \"properties\": {"]
11531#[doc = "        \"InvalidNonce\": {"]
11532#[doc = "          \"type\": \"object\","]
11533#[doc = "          \"required\": ["]
11534#[doc = "            \"ak_nonce\","]
11535#[doc = "            \"tx_nonce\""]
11536#[doc = "          ],"]
11537#[doc = "          \"properties\": {"]
11538#[doc = "            \"ak_nonce\": {"]
11539#[doc = "              \"type\": \"integer\","]
11540#[doc = "              \"format\": \"uint64\","]
11541#[doc = "              \"minimum\": 0.0"]
11542#[doc = "            },"]
11543#[doc = "            \"tx_nonce\": {"]
11544#[doc = "              \"type\": \"integer\","]
11545#[doc = "              \"format\": \"uint64\","]
11546#[doc = "              \"minimum\": 0.0"]
11547#[doc = "            }"]
11548#[doc = "          }"]
11549#[doc = "        }"]
11550#[doc = "      },"]
11551#[doc = "      \"additionalProperties\": false"]
11552#[doc = "    },"]
11553#[doc = "    {"]
11554#[doc = "      \"description\": \"Transaction nonce is larger than the upper bound given by the block height\","]
11555#[doc = "      \"type\": \"object\","]
11556#[doc = "      \"required\": ["]
11557#[doc = "        \"NonceTooLarge\""]
11558#[doc = "      ],"]
11559#[doc = "      \"properties\": {"]
11560#[doc = "        \"NonceTooLarge\": {"]
11561#[doc = "          \"type\": \"object\","]
11562#[doc = "          \"required\": ["]
11563#[doc = "            \"tx_nonce\","]
11564#[doc = "            \"upper_bound\""]
11565#[doc = "          ],"]
11566#[doc = "          \"properties\": {"]
11567#[doc = "            \"tx_nonce\": {"]
11568#[doc = "              \"type\": \"integer\","]
11569#[doc = "              \"format\": \"uint64\","]
11570#[doc = "              \"minimum\": 0.0"]
11571#[doc = "            },"]
11572#[doc = "            \"upper_bound\": {"]
11573#[doc = "              \"type\": \"integer\","]
11574#[doc = "              \"format\": \"uint64\","]
11575#[doc = "              \"minimum\": 0.0"]
11576#[doc = "            }"]
11577#[doc = "          }"]
11578#[doc = "        }"]
11579#[doc = "      },"]
11580#[doc = "      \"additionalProperties\": false"]
11581#[doc = "    },"]
11582#[doc = "    {"]
11583#[doc = "      \"description\": \"TX receiver_id is not a valid AccountId\","]
11584#[doc = "      \"type\": \"object\","]
11585#[doc = "      \"required\": ["]
11586#[doc = "        \"InvalidReceiverId\""]
11587#[doc = "      ],"]
11588#[doc = "      \"properties\": {"]
11589#[doc = "        \"InvalidReceiverId\": {"]
11590#[doc = "          \"type\": \"object\","]
11591#[doc = "          \"required\": ["]
11592#[doc = "            \"receiver_id\""]
11593#[doc = "          ],"]
11594#[doc = "          \"properties\": {"]
11595#[doc = "            \"receiver_id\": {"]
11596#[doc = "              \"type\": \"string\""]
11597#[doc = "            }"]
11598#[doc = "          }"]
11599#[doc = "        }"]
11600#[doc = "      },"]
11601#[doc = "      \"additionalProperties\": false"]
11602#[doc = "    },"]
11603#[doc = "    {"]
11604#[doc = "      \"description\": \"TX signature is not valid\","]
11605#[doc = "      \"type\": \"string\","]
11606#[doc = "      \"enum\": ["]
11607#[doc = "        \"InvalidSignature\""]
11608#[doc = "      ]"]
11609#[doc = "    },"]
11610#[doc = "    {"]
11611#[doc = "      \"description\": \"Account does not have enough balance to cover TX cost\","]
11612#[doc = "      \"type\": \"object\","]
11613#[doc = "      \"required\": ["]
11614#[doc = "        \"NotEnoughBalance\""]
11615#[doc = "      ],"]
11616#[doc = "      \"properties\": {"]
11617#[doc = "        \"NotEnoughBalance\": {"]
11618#[doc = "          \"type\": \"object\","]
11619#[doc = "          \"required\": ["]
11620#[doc = "            \"balance\","]
11621#[doc = "            \"cost\","]
11622#[doc = "            \"signer_id\""]
11623#[doc = "          ],"]
11624#[doc = "          \"properties\": {"]
11625#[doc = "            \"balance\": {"]
11626#[doc = "              \"$ref\": \"#/components/schemas/NearToken\""]
11627#[doc = "            },"]
11628#[doc = "            \"cost\": {"]
11629#[doc = "              \"$ref\": \"#/components/schemas/NearToken\""]
11630#[doc = "            },"]
11631#[doc = "            \"signer_id\": {"]
11632#[doc = "              \"$ref\": \"#/components/schemas/AccountId\""]
11633#[doc = "            }"]
11634#[doc = "          }"]
11635#[doc = "        }"]
11636#[doc = "      },"]
11637#[doc = "      \"additionalProperties\": false"]
11638#[doc = "    },"]
11639#[doc = "    {"]
11640#[doc = "      \"description\": \"Signer account doesn't have enough balance after transaction.\","]
11641#[doc = "      \"type\": \"object\","]
11642#[doc = "      \"required\": ["]
11643#[doc = "        \"LackBalanceForState\""]
11644#[doc = "      ],"]
11645#[doc = "      \"properties\": {"]
11646#[doc = "        \"LackBalanceForState\": {"]
11647#[doc = "          \"type\": \"object\","]
11648#[doc = "          \"required\": ["]
11649#[doc = "            \"amount\","]
11650#[doc = "            \"signer_id\""]
11651#[doc = "          ],"]
11652#[doc = "          \"properties\": {"]
11653#[doc = "            \"amount\": {"]
11654#[doc = "              \"description\": \"Required balance to cover the state.\","]
11655#[doc = "              \"allOf\": ["]
11656#[doc = "                {"]
11657#[doc = "                  \"$ref\": \"#/components/schemas/NearToken\""]
11658#[doc = "                }"]
11659#[doc = "              ]"]
11660#[doc = "            },"]
11661#[doc = "            \"signer_id\": {"]
11662#[doc = "              \"description\": \"An account which doesn't have enough balance to cover storage.\","]
11663#[doc = "              \"allOf\": ["]
11664#[doc = "                {"]
11665#[doc = "                  \"$ref\": \"#/components/schemas/AccountId\""]
11666#[doc = "                }"]
11667#[doc = "              ]"]
11668#[doc = "            }"]
11669#[doc = "          }"]
11670#[doc = "        }"]
11671#[doc = "      },"]
11672#[doc = "      \"additionalProperties\": false"]
11673#[doc = "    },"]
11674#[doc = "    {"]
11675#[doc = "      \"description\": \"An integer overflow occurred during transaction cost estimation.\","]
11676#[doc = "      \"type\": \"string\","]
11677#[doc = "      \"enum\": ["]
11678#[doc = "        \"CostOverflow\""]
11679#[doc = "      ]"]
11680#[doc = "    },"]
11681#[doc = "    {"]
11682#[doc = "      \"description\": \"Transaction parent block hash doesn't belong to the current chain\","]
11683#[doc = "      \"type\": \"string\","]
11684#[doc = "      \"enum\": ["]
11685#[doc = "        \"InvalidChain\""]
11686#[doc = "      ]"]
11687#[doc = "    },"]
11688#[doc = "    {"]
11689#[doc = "      \"description\": \"Transaction has expired\","]
11690#[doc = "      \"type\": \"string\","]
11691#[doc = "      \"enum\": ["]
11692#[doc = "        \"Expired\""]
11693#[doc = "      ]"]
11694#[doc = "    },"]
11695#[doc = "    {"]
11696#[doc = "      \"description\": \"An error occurred while validating actions of a Transaction.\","]
11697#[doc = "      \"type\": \"object\","]
11698#[doc = "      \"required\": ["]
11699#[doc = "        \"ActionsValidation\""]
11700#[doc = "      ],"]
11701#[doc = "      \"properties\": {"]
11702#[doc = "        \"ActionsValidation\": {"]
11703#[doc = "          \"$ref\": \"#/components/schemas/ActionsValidationError\""]
11704#[doc = "        }"]
11705#[doc = "      },"]
11706#[doc = "      \"additionalProperties\": false"]
11707#[doc = "    },"]
11708#[doc = "    {"]
11709#[doc = "      \"description\": \"The size of serialized transaction exceeded the limit.\","]
11710#[doc = "      \"type\": \"object\","]
11711#[doc = "      \"required\": ["]
11712#[doc = "        \"TransactionSizeExceeded\""]
11713#[doc = "      ],"]
11714#[doc = "      \"properties\": {"]
11715#[doc = "        \"TransactionSizeExceeded\": {"]
11716#[doc = "          \"type\": \"object\","]
11717#[doc = "          \"required\": ["]
11718#[doc = "            \"limit\","]
11719#[doc = "            \"size\""]
11720#[doc = "          ],"]
11721#[doc = "          \"properties\": {"]
11722#[doc = "            \"limit\": {"]
11723#[doc = "              \"type\": \"integer\","]
11724#[doc = "              \"format\": \"uint64\","]
11725#[doc = "              \"minimum\": 0.0"]
11726#[doc = "            },"]
11727#[doc = "            \"size\": {"]
11728#[doc = "              \"type\": \"integer\","]
11729#[doc = "              \"format\": \"uint64\","]
11730#[doc = "              \"minimum\": 0.0"]
11731#[doc = "            }"]
11732#[doc = "          }"]
11733#[doc = "        }"]
11734#[doc = "      },"]
11735#[doc = "      \"additionalProperties\": false"]
11736#[doc = "    },"]
11737#[doc = "    {"]
11738#[doc = "      \"description\": \"Transaction version is invalid.\","]
11739#[doc = "      \"type\": \"string\","]
11740#[doc = "      \"enum\": ["]
11741#[doc = "        \"InvalidTransactionVersion\""]
11742#[doc = "      ]"]
11743#[doc = "    },"]
11744#[doc = "    {"]
11745#[doc = "      \"type\": \"object\","]
11746#[doc = "      \"required\": ["]
11747#[doc = "        \"StorageError\""]
11748#[doc = "      ],"]
11749#[doc = "      \"properties\": {"]
11750#[doc = "        \"StorageError\": {"]
11751#[doc = "          \"$ref\": \"#/components/schemas/StorageError\""]
11752#[doc = "        }"]
11753#[doc = "      },"]
11754#[doc = "      \"additionalProperties\": false"]
11755#[doc = "    },"]
11756#[doc = "    {"]
11757#[doc = "      \"description\": \"The receiver shard of the transaction is too congested to accept new\\ntransactions at the moment.\","]
11758#[doc = "      \"type\": \"object\","]
11759#[doc = "      \"required\": ["]
11760#[doc = "        \"ShardCongested\""]
11761#[doc = "      ],"]
11762#[doc = "      \"properties\": {"]
11763#[doc = "        \"ShardCongested\": {"]
11764#[doc = "          \"type\": \"object\","]
11765#[doc = "          \"required\": ["]
11766#[doc = "            \"congestion_level\","]
11767#[doc = "            \"shard_id\""]
11768#[doc = "          ],"]
11769#[doc = "          \"properties\": {"]
11770#[doc = "            \"congestion_level\": {"]
11771#[doc = "              \"description\": \"A value between 0 (no congestion) and 1 (max congestion).\","]
11772#[doc = "              \"type\": \"number\","]
11773#[doc = "              \"format\": \"double\""]
11774#[doc = "            },"]
11775#[doc = "            \"shard_id\": {"]
11776#[doc = "              \"description\": \"The congested shard.\","]
11777#[doc = "              \"type\": \"integer\","]
11778#[doc = "              \"format\": \"uint32\","]
11779#[doc = "              \"minimum\": 0.0"]
11780#[doc = "            }"]
11781#[doc = "          }"]
11782#[doc = "        }"]
11783#[doc = "      },"]
11784#[doc = "      \"additionalProperties\": false"]
11785#[doc = "    },"]
11786#[doc = "    {"]
11787#[doc = "      \"description\": \"The receiver shard of the transaction missed several chunks and rejects\\nnew transaction until it can make progress again.\","]
11788#[doc = "      \"type\": \"object\","]
11789#[doc = "      \"required\": ["]
11790#[doc = "        \"ShardStuck\""]
11791#[doc = "      ],"]
11792#[doc = "      \"properties\": {"]
11793#[doc = "        \"ShardStuck\": {"]
11794#[doc = "          \"type\": \"object\","]
11795#[doc = "          \"required\": ["]
11796#[doc = "            \"missed_chunks\","]
11797#[doc = "            \"shard_id\""]
11798#[doc = "          ],"]
11799#[doc = "          \"properties\": {"]
11800#[doc = "            \"missed_chunks\": {"]
11801#[doc = "              \"description\": \"The number of blocks since the last included chunk of the shard.\","]
11802#[doc = "              \"type\": \"integer\","]
11803#[doc = "              \"format\": \"uint64\","]
11804#[doc = "              \"minimum\": 0.0"]
11805#[doc = "            },"]
11806#[doc = "            \"shard_id\": {"]
11807#[doc = "              \"description\": \"The shard that fails making progress.\","]
11808#[doc = "              \"type\": \"integer\","]
11809#[doc = "              \"format\": \"uint32\","]
11810#[doc = "              \"minimum\": 0.0"]
11811#[doc = "            }"]
11812#[doc = "          }"]
11813#[doc = "        }"]
11814#[doc = "      },"]
11815#[doc = "      \"additionalProperties\": false"]
11816#[doc = "    }"]
11817#[doc = "  ]"]
11818#[doc = "}"]
11819#[doc = r" ```"]
11820#[doc = r" </details>"]
11821#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
11822pub enum InvalidTxError {
11823    #[doc = "Happens if a wrong AccessKey used or AccessKey has not enough permissions"]
11824    InvalidAccessKeyError(InvalidAccessKeyError),
11825    #[doc = "TX signer_id is not a valid [`AccountId`]"]
11826    InvalidSignerId {
11827        signer_id: ::std::string::String,
11828    },
11829    #[doc = "TX signer_id is not found in a storage"]
11830    SignerDoesNotExist {
11831        signer_id: AccountId,
11832    },
11833    #[doc = "Transaction nonce must be strictly greater than `account[access_key].nonce`."]
11834    InvalidNonce {
11835        ak_nonce: u64,
11836        tx_nonce: u64,
11837    },
11838    #[doc = "Transaction nonce is larger than the upper bound given by the block height"]
11839    NonceTooLarge {
11840        tx_nonce: u64,
11841        upper_bound: u64,
11842    },
11843    #[doc = "TX receiver_id is not a valid AccountId"]
11844    InvalidReceiverId {
11845        receiver_id: ::std::string::String,
11846    },
11847    #[doc = "TX signature is not valid"]
11848    InvalidSignature,
11849    #[doc = "Account does not have enough balance to cover TX cost"]
11850    NotEnoughBalance {
11851        balance: NearToken,
11852        cost: NearToken,
11853        signer_id: AccountId,
11854    },
11855    #[doc = "Signer account doesn't have enough balance after transaction."]
11856    LackBalanceForState {
11857        #[doc = "Required balance to cover the state."]
11858        amount: NearToken,
11859        #[doc = "An account which doesn't have enough balance to cover storage."]
11860        signer_id: AccountId,
11861    },
11862    #[doc = "An integer overflow occurred during transaction cost estimation."]
11863    CostOverflow,
11864    #[doc = "Transaction parent block hash doesn't belong to the current chain"]
11865    InvalidChain,
11866    #[doc = "Transaction has expired"]
11867    Expired,
11868    #[doc = "An error occurred while validating actions of a Transaction."]
11869    ActionsValidation(ActionsValidationError),
11870    #[doc = "The size of serialized transaction exceeded the limit."]
11871    TransactionSizeExceeded {
11872        limit: u64,
11873        size: u64,
11874    },
11875    #[doc = "Transaction version is invalid."]
11876    InvalidTransactionVersion,
11877    StorageError(StorageError),
11878    #[doc = "The receiver shard of the transaction is too congested to accept new\ntransactions at the moment."]
11879    ShardCongested {
11880        congestion_level: f64,
11881        #[doc = "The congested shard."]
11882        shard_id: u32,
11883    },
11884    #[doc = "The receiver shard of the transaction missed several chunks and rejects\nnew transaction until it can make progress again."]
11885    ShardStuck {
11886        #[doc = "The number of blocks since the last included chunk of the shard."]
11887        missed_chunks: u64,
11888        #[doc = "The shard that fails making progress."]
11889        shard_id: u32,
11890    },
11891}
11892impl ::std::convert::From<&Self> for InvalidTxError {
11893    fn from(value: &InvalidTxError) -> Self {
11894        value.clone()
11895    }
11896}
11897impl ::std::convert::From<InvalidAccessKeyError> for InvalidTxError {
11898    fn from(value: InvalidAccessKeyError) -> Self {
11899        Self::InvalidAccessKeyError(value)
11900    }
11901}
11902impl ::std::convert::From<ActionsValidationError> for InvalidTxError {
11903    fn from(value: ActionsValidationError) -> Self {
11904        Self::ActionsValidation(value)
11905    }
11906}
11907impl ::std::convert::From<StorageError> for InvalidTxError {
11908    fn from(value: StorageError) -> Self {
11909        Self::StorageError(value)
11910    }
11911}
11912#[doc = "`JsonRpcRequestForBlock`"]
11913#[doc = r""]
11914#[doc = r" <details><summary>JSON schema</summary>"]
11915#[doc = r""]
11916#[doc = r" ```json"]
11917#[doc = "{"]
11918#[doc = "  \"title\": \"JsonRpcRequest_for_block\","]
11919#[doc = "  \"type\": \"object\","]
11920#[doc = "  \"required\": ["]
11921#[doc = "    \"id\","]
11922#[doc = "    \"jsonrpc\","]
11923#[doc = "    \"method\","]
11924#[doc = "    \"params\""]
11925#[doc = "  ],"]
11926#[doc = "  \"properties\": {"]
11927#[doc = "    \"id\": {"]
11928#[doc = "      \"type\": \"string\""]
11929#[doc = "    },"]
11930#[doc = "    \"jsonrpc\": {"]
11931#[doc = "      \"type\": \"string\""]
11932#[doc = "    },"]
11933#[doc = "    \"method\": {"]
11934#[doc = "      \"type\": \"string\","]
11935#[doc = "      \"enum\": ["]
11936#[doc = "        \"block\""]
11937#[doc = "      ]"]
11938#[doc = "    },"]
11939#[doc = "    \"params\": {"]
11940#[doc = "      \"$ref\": \"#/components/schemas/RpcBlockRequest\""]
11941#[doc = "    }"]
11942#[doc = "  }"]
11943#[doc = "}"]
11944#[doc = r" ```"]
11945#[doc = r" </details>"]
11946#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
11947pub struct JsonRpcRequestForBlock {
11948    pub id: ::std::string::String,
11949    pub jsonrpc: ::std::string::String,
11950    pub method: JsonRpcRequestForBlockMethod,
11951    pub params: RpcBlockRequest,
11952}
11953impl ::std::convert::From<&JsonRpcRequestForBlock> for JsonRpcRequestForBlock {
11954    fn from(value: &JsonRpcRequestForBlock) -> Self {
11955        value.clone()
11956    }
11957}
11958#[doc = "`JsonRpcRequestForBlockEffects`"]
11959#[doc = r""]
11960#[doc = r" <details><summary>JSON schema</summary>"]
11961#[doc = r""]
11962#[doc = r" ```json"]
11963#[doc = "{"]
11964#[doc = "  \"title\": \"JsonRpcRequest_for_block_effects\","]
11965#[doc = "  \"type\": \"object\","]
11966#[doc = "  \"required\": ["]
11967#[doc = "    \"id\","]
11968#[doc = "    \"jsonrpc\","]
11969#[doc = "    \"method\","]
11970#[doc = "    \"params\""]
11971#[doc = "  ],"]
11972#[doc = "  \"properties\": {"]
11973#[doc = "    \"id\": {"]
11974#[doc = "      \"type\": \"string\""]
11975#[doc = "    },"]
11976#[doc = "    \"jsonrpc\": {"]
11977#[doc = "      \"type\": \"string\""]
11978#[doc = "    },"]
11979#[doc = "    \"method\": {"]
11980#[doc = "      \"type\": \"string\","]
11981#[doc = "      \"enum\": ["]
11982#[doc = "        \"block_effects\""]
11983#[doc = "      ]"]
11984#[doc = "    },"]
11985#[doc = "    \"params\": {"]
11986#[doc = "      \"$ref\": \"#/components/schemas/RpcStateChangesInBlockRequest\""]
11987#[doc = "    }"]
11988#[doc = "  }"]
11989#[doc = "}"]
11990#[doc = r" ```"]
11991#[doc = r" </details>"]
11992#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
11993pub struct JsonRpcRequestForBlockEffects {
11994    pub id: ::std::string::String,
11995    pub jsonrpc: ::std::string::String,
11996    pub method: JsonRpcRequestForBlockEffectsMethod,
11997    pub params: RpcStateChangesInBlockRequest,
11998}
11999impl ::std::convert::From<&JsonRpcRequestForBlockEffects> for JsonRpcRequestForBlockEffects {
12000    fn from(value: &JsonRpcRequestForBlockEffects) -> Self {
12001        value.clone()
12002    }
12003}
12004#[doc = "`JsonRpcRequestForBlockEffectsMethod`"]
12005#[doc = r""]
12006#[doc = r" <details><summary>JSON schema</summary>"]
12007#[doc = r""]
12008#[doc = r" ```json"]
12009#[doc = "{"]
12010#[doc = "  \"type\": \"string\","]
12011#[doc = "  \"enum\": ["]
12012#[doc = "    \"block_effects\""]
12013#[doc = "  ]"]
12014#[doc = "}"]
12015#[doc = r" ```"]
12016#[doc = r" </details>"]
12017#[derive(
12018    :: serde :: Deserialize,
12019    :: serde :: Serialize,
12020    Clone,
12021    Copy,
12022    Debug,
12023    Eq,
12024    Hash,
12025    Ord,
12026    PartialEq,
12027    PartialOrd,
12028)]
12029pub enum JsonRpcRequestForBlockEffectsMethod {
12030    #[serde(rename = "block_effects")]
12031    BlockEffects,
12032}
12033impl ::std::convert::From<&Self> for JsonRpcRequestForBlockEffectsMethod {
12034    fn from(value: &JsonRpcRequestForBlockEffectsMethod) -> Self {
12035        value.clone()
12036    }
12037}
12038impl ::std::fmt::Display for JsonRpcRequestForBlockEffectsMethod {
12039    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
12040        match *self {
12041            Self::BlockEffects => f.write_str("block_effects"),
12042        }
12043    }
12044}
12045impl ::std::str::FromStr for JsonRpcRequestForBlockEffectsMethod {
12046    type Err = self::error::ConversionError;
12047    fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
12048        match value {
12049            "block_effects" => Ok(Self::BlockEffects),
12050            _ => Err("invalid value".into()),
12051        }
12052    }
12053}
12054impl ::std::convert::TryFrom<&str> for JsonRpcRequestForBlockEffectsMethod {
12055    type Error = self::error::ConversionError;
12056    fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
12057        value.parse()
12058    }
12059}
12060impl ::std::convert::TryFrom<&::std::string::String> for JsonRpcRequestForBlockEffectsMethod {
12061    type Error = self::error::ConversionError;
12062    fn try_from(
12063        value: &::std::string::String,
12064    ) -> ::std::result::Result<Self, self::error::ConversionError> {
12065        value.parse()
12066    }
12067}
12068impl ::std::convert::TryFrom<::std::string::String> for JsonRpcRequestForBlockEffectsMethod {
12069    type Error = self::error::ConversionError;
12070    fn try_from(
12071        value: ::std::string::String,
12072    ) -> ::std::result::Result<Self, self::error::ConversionError> {
12073        value.parse()
12074    }
12075}
12076#[doc = "`JsonRpcRequestForBlockMethod`"]
12077#[doc = r""]
12078#[doc = r" <details><summary>JSON schema</summary>"]
12079#[doc = r""]
12080#[doc = r" ```json"]
12081#[doc = "{"]
12082#[doc = "  \"type\": \"string\","]
12083#[doc = "  \"enum\": ["]
12084#[doc = "    \"block\""]
12085#[doc = "  ]"]
12086#[doc = "}"]
12087#[doc = r" ```"]
12088#[doc = r" </details>"]
12089#[derive(
12090    :: serde :: Deserialize,
12091    :: serde :: Serialize,
12092    Clone,
12093    Copy,
12094    Debug,
12095    Eq,
12096    Hash,
12097    Ord,
12098    PartialEq,
12099    PartialOrd,
12100)]
12101pub enum JsonRpcRequestForBlockMethod {
12102    #[serde(rename = "block")]
12103    Block,
12104}
12105impl ::std::convert::From<&Self> for JsonRpcRequestForBlockMethod {
12106    fn from(value: &JsonRpcRequestForBlockMethod) -> Self {
12107        value.clone()
12108    }
12109}
12110impl ::std::fmt::Display for JsonRpcRequestForBlockMethod {
12111    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
12112        match *self {
12113            Self::Block => f.write_str("block"),
12114        }
12115    }
12116}
12117impl ::std::str::FromStr for JsonRpcRequestForBlockMethod {
12118    type Err = self::error::ConversionError;
12119    fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
12120        match value {
12121            "block" => Ok(Self::Block),
12122            _ => Err("invalid value".into()),
12123        }
12124    }
12125}
12126impl ::std::convert::TryFrom<&str> for JsonRpcRequestForBlockMethod {
12127    type Error = self::error::ConversionError;
12128    fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
12129        value.parse()
12130    }
12131}
12132impl ::std::convert::TryFrom<&::std::string::String> for JsonRpcRequestForBlockMethod {
12133    type Error = self::error::ConversionError;
12134    fn try_from(
12135        value: &::std::string::String,
12136    ) -> ::std::result::Result<Self, self::error::ConversionError> {
12137        value.parse()
12138    }
12139}
12140impl ::std::convert::TryFrom<::std::string::String> for JsonRpcRequestForBlockMethod {
12141    type Error = self::error::ConversionError;
12142    fn try_from(
12143        value: ::std::string::String,
12144    ) -> ::std::result::Result<Self, self::error::ConversionError> {
12145        value.parse()
12146    }
12147}
12148#[doc = "`JsonRpcRequestForBroadcastTxAsync`"]
12149#[doc = r""]
12150#[doc = r" <details><summary>JSON schema</summary>"]
12151#[doc = r""]
12152#[doc = r" ```json"]
12153#[doc = "{"]
12154#[doc = "  \"title\": \"JsonRpcRequest_for_broadcast_tx_async\","]
12155#[doc = "  \"type\": \"object\","]
12156#[doc = "  \"required\": ["]
12157#[doc = "    \"id\","]
12158#[doc = "    \"jsonrpc\","]
12159#[doc = "    \"method\","]
12160#[doc = "    \"params\""]
12161#[doc = "  ],"]
12162#[doc = "  \"properties\": {"]
12163#[doc = "    \"id\": {"]
12164#[doc = "      \"type\": \"string\""]
12165#[doc = "    },"]
12166#[doc = "    \"jsonrpc\": {"]
12167#[doc = "      \"type\": \"string\""]
12168#[doc = "    },"]
12169#[doc = "    \"method\": {"]
12170#[doc = "      \"type\": \"string\","]
12171#[doc = "      \"enum\": ["]
12172#[doc = "        \"broadcast_tx_async\""]
12173#[doc = "      ]"]
12174#[doc = "    },"]
12175#[doc = "    \"params\": {"]
12176#[doc = "      \"$ref\": \"#/components/schemas/RpcSendTransactionRequest\""]
12177#[doc = "    }"]
12178#[doc = "  }"]
12179#[doc = "}"]
12180#[doc = r" ```"]
12181#[doc = r" </details>"]
12182#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
12183pub struct JsonRpcRequestForBroadcastTxAsync {
12184    pub id: ::std::string::String,
12185    pub jsonrpc: ::std::string::String,
12186    pub method: JsonRpcRequestForBroadcastTxAsyncMethod,
12187    pub params: RpcSendTransactionRequest,
12188}
12189impl ::std::convert::From<&JsonRpcRequestForBroadcastTxAsync>
12190    for JsonRpcRequestForBroadcastTxAsync
12191{
12192    fn from(value: &JsonRpcRequestForBroadcastTxAsync) -> Self {
12193        value.clone()
12194    }
12195}
12196#[doc = "`JsonRpcRequestForBroadcastTxAsyncMethod`"]
12197#[doc = r""]
12198#[doc = r" <details><summary>JSON schema</summary>"]
12199#[doc = r""]
12200#[doc = r" ```json"]
12201#[doc = "{"]
12202#[doc = "  \"type\": \"string\","]
12203#[doc = "  \"enum\": ["]
12204#[doc = "    \"broadcast_tx_async\""]
12205#[doc = "  ]"]
12206#[doc = "}"]
12207#[doc = r" ```"]
12208#[doc = r" </details>"]
12209#[derive(
12210    :: serde :: Deserialize,
12211    :: serde :: Serialize,
12212    Clone,
12213    Copy,
12214    Debug,
12215    Eq,
12216    Hash,
12217    Ord,
12218    PartialEq,
12219    PartialOrd,
12220)]
12221pub enum JsonRpcRequestForBroadcastTxAsyncMethod {
12222    #[serde(rename = "broadcast_tx_async")]
12223    BroadcastTxAsync,
12224}
12225impl ::std::convert::From<&Self> for JsonRpcRequestForBroadcastTxAsyncMethod {
12226    fn from(value: &JsonRpcRequestForBroadcastTxAsyncMethod) -> Self {
12227        value.clone()
12228    }
12229}
12230impl ::std::fmt::Display for JsonRpcRequestForBroadcastTxAsyncMethod {
12231    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
12232        match *self {
12233            Self::BroadcastTxAsync => f.write_str("broadcast_tx_async"),
12234        }
12235    }
12236}
12237impl ::std::str::FromStr for JsonRpcRequestForBroadcastTxAsyncMethod {
12238    type Err = self::error::ConversionError;
12239    fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
12240        match value {
12241            "broadcast_tx_async" => Ok(Self::BroadcastTxAsync),
12242            _ => Err("invalid value".into()),
12243        }
12244    }
12245}
12246impl ::std::convert::TryFrom<&str> for JsonRpcRequestForBroadcastTxAsyncMethod {
12247    type Error = self::error::ConversionError;
12248    fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
12249        value.parse()
12250    }
12251}
12252impl ::std::convert::TryFrom<&::std::string::String> for JsonRpcRequestForBroadcastTxAsyncMethod {
12253    type Error = self::error::ConversionError;
12254    fn try_from(
12255        value: &::std::string::String,
12256    ) -> ::std::result::Result<Self, self::error::ConversionError> {
12257        value.parse()
12258    }
12259}
12260impl ::std::convert::TryFrom<::std::string::String> for JsonRpcRequestForBroadcastTxAsyncMethod {
12261    type Error = self::error::ConversionError;
12262    fn try_from(
12263        value: ::std::string::String,
12264    ) -> ::std::result::Result<Self, self::error::ConversionError> {
12265        value.parse()
12266    }
12267}
12268#[doc = "`JsonRpcRequestForBroadcastTxCommit`"]
12269#[doc = r""]
12270#[doc = r" <details><summary>JSON schema</summary>"]
12271#[doc = r""]
12272#[doc = r" ```json"]
12273#[doc = "{"]
12274#[doc = "  \"title\": \"JsonRpcRequest_for_broadcast_tx_commit\","]
12275#[doc = "  \"type\": \"object\","]
12276#[doc = "  \"required\": ["]
12277#[doc = "    \"id\","]
12278#[doc = "    \"jsonrpc\","]
12279#[doc = "    \"method\","]
12280#[doc = "    \"params\""]
12281#[doc = "  ],"]
12282#[doc = "  \"properties\": {"]
12283#[doc = "    \"id\": {"]
12284#[doc = "      \"type\": \"string\""]
12285#[doc = "    },"]
12286#[doc = "    \"jsonrpc\": {"]
12287#[doc = "      \"type\": \"string\""]
12288#[doc = "    },"]
12289#[doc = "    \"method\": {"]
12290#[doc = "      \"type\": \"string\","]
12291#[doc = "      \"enum\": ["]
12292#[doc = "        \"broadcast_tx_commit\""]
12293#[doc = "      ]"]
12294#[doc = "    },"]
12295#[doc = "    \"params\": {"]
12296#[doc = "      \"$ref\": \"#/components/schemas/RpcSendTransactionRequest\""]
12297#[doc = "    }"]
12298#[doc = "  }"]
12299#[doc = "}"]
12300#[doc = r" ```"]
12301#[doc = r" </details>"]
12302#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
12303pub struct JsonRpcRequestForBroadcastTxCommit {
12304    pub id: ::std::string::String,
12305    pub jsonrpc: ::std::string::String,
12306    pub method: JsonRpcRequestForBroadcastTxCommitMethod,
12307    pub params: RpcSendTransactionRequest,
12308}
12309impl ::std::convert::From<&JsonRpcRequestForBroadcastTxCommit>
12310    for JsonRpcRequestForBroadcastTxCommit
12311{
12312    fn from(value: &JsonRpcRequestForBroadcastTxCommit) -> Self {
12313        value.clone()
12314    }
12315}
12316#[doc = "`JsonRpcRequestForBroadcastTxCommitMethod`"]
12317#[doc = r""]
12318#[doc = r" <details><summary>JSON schema</summary>"]
12319#[doc = r""]
12320#[doc = r" ```json"]
12321#[doc = "{"]
12322#[doc = "  \"type\": \"string\","]
12323#[doc = "  \"enum\": ["]
12324#[doc = "    \"broadcast_tx_commit\""]
12325#[doc = "  ]"]
12326#[doc = "}"]
12327#[doc = r" ```"]
12328#[doc = r" </details>"]
12329#[derive(
12330    :: serde :: Deserialize,
12331    :: serde :: Serialize,
12332    Clone,
12333    Copy,
12334    Debug,
12335    Eq,
12336    Hash,
12337    Ord,
12338    PartialEq,
12339    PartialOrd,
12340)]
12341pub enum JsonRpcRequestForBroadcastTxCommitMethod {
12342    #[serde(rename = "broadcast_tx_commit")]
12343    BroadcastTxCommit,
12344}
12345impl ::std::convert::From<&Self> for JsonRpcRequestForBroadcastTxCommitMethod {
12346    fn from(value: &JsonRpcRequestForBroadcastTxCommitMethod) -> Self {
12347        value.clone()
12348    }
12349}
12350impl ::std::fmt::Display for JsonRpcRequestForBroadcastTxCommitMethod {
12351    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
12352        match *self {
12353            Self::BroadcastTxCommit => f.write_str("broadcast_tx_commit"),
12354        }
12355    }
12356}
12357impl ::std::str::FromStr for JsonRpcRequestForBroadcastTxCommitMethod {
12358    type Err = self::error::ConversionError;
12359    fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
12360        match value {
12361            "broadcast_tx_commit" => Ok(Self::BroadcastTxCommit),
12362            _ => Err("invalid value".into()),
12363        }
12364    }
12365}
12366impl ::std::convert::TryFrom<&str> for JsonRpcRequestForBroadcastTxCommitMethod {
12367    type Error = self::error::ConversionError;
12368    fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
12369        value.parse()
12370    }
12371}
12372impl ::std::convert::TryFrom<&::std::string::String> for JsonRpcRequestForBroadcastTxCommitMethod {
12373    type Error = self::error::ConversionError;
12374    fn try_from(
12375        value: &::std::string::String,
12376    ) -> ::std::result::Result<Self, self::error::ConversionError> {
12377        value.parse()
12378    }
12379}
12380impl ::std::convert::TryFrom<::std::string::String> for JsonRpcRequestForBroadcastTxCommitMethod {
12381    type Error = self::error::ConversionError;
12382    fn try_from(
12383        value: ::std::string::String,
12384    ) -> ::std::result::Result<Self, self::error::ConversionError> {
12385        value.parse()
12386    }
12387}
12388#[doc = "`JsonRpcRequestForChanges`"]
12389#[doc = r""]
12390#[doc = r" <details><summary>JSON schema</summary>"]
12391#[doc = r""]
12392#[doc = r" ```json"]
12393#[doc = "{"]
12394#[doc = "  \"title\": \"JsonRpcRequest_for_changes\","]
12395#[doc = "  \"type\": \"object\","]
12396#[doc = "  \"required\": ["]
12397#[doc = "    \"id\","]
12398#[doc = "    \"jsonrpc\","]
12399#[doc = "    \"method\","]
12400#[doc = "    \"params\""]
12401#[doc = "  ],"]
12402#[doc = "  \"properties\": {"]
12403#[doc = "    \"id\": {"]
12404#[doc = "      \"type\": \"string\""]
12405#[doc = "    },"]
12406#[doc = "    \"jsonrpc\": {"]
12407#[doc = "      \"type\": \"string\""]
12408#[doc = "    },"]
12409#[doc = "    \"method\": {"]
12410#[doc = "      \"type\": \"string\","]
12411#[doc = "      \"enum\": ["]
12412#[doc = "        \"changes\""]
12413#[doc = "      ]"]
12414#[doc = "    },"]
12415#[doc = "    \"params\": {"]
12416#[doc = "      \"$ref\": \"#/components/schemas/RpcStateChangesInBlockByTypeRequest\""]
12417#[doc = "    }"]
12418#[doc = "  }"]
12419#[doc = "}"]
12420#[doc = r" ```"]
12421#[doc = r" </details>"]
12422#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
12423pub struct JsonRpcRequestForChanges {
12424    pub id: ::std::string::String,
12425    pub jsonrpc: ::std::string::String,
12426    pub method: JsonRpcRequestForChangesMethod,
12427    pub params: RpcStateChangesInBlockByTypeRequest,
12428}
12429impl ::std::convert::From<&JsonRpcRequestForChanges> for JsonRpcRequestForChanges {
12430    fn from(value: &JsonRpcRequestForChanges) -> Self {
12431        value.clone()
12432    }
12433}
12434#[doc = "`JsonRpcRequestForChangesMethod`"]
12435#[doc = r""]
12436#[doc = r" <details><summary>JSON schema</summary>"]
12437#[doc = r""]
12438#[doc = r" ```json"]
12439#[doc = "{"]
12440#[doc = "  \"type\": \"string\","]
12441#[doc = "  \"enum\": ["]
12442#[doc = "    \"changes\""]
12443#[doc = "  ]"]
12444#[doc = "}"]
12445#[doc = r" ```"]
12446#[doc = r" </details>"]
12447#[derive(
12448    :: serde :: Deserialize,
12449    :: serde :: Serialize,
12450    Clone,
12451    Copy,
12452    Debug,
12453    Eq,
12454    Hash,
12455    Ord,
12456    PartialEq,
12457    PartialOrd,
12458)]
12459pub enum JsonRpcRequestForChangesMethod {
12460    #[serde(rename = "changes")]
12461    Changes,
12462}
12463impl ::std::convert::From<&Self> for JsonRpcRequestForChangesMethod {
12464    fn from(value: &JsonRpcRequestForChangesMethod) -> Self {
12465        value.clone()
12466    }
12467}
12468impl ::std::fmt::Display for JsonRpcRequestForChangesMethod {
12469    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
12470        match *self {
12471            Self::Changes => f.write_str("changes"),
12472        }
12473    }
12474}
12475impl ::std::str::FromStr for JsonRpcRequestForChangesMethod {
12476    type Err = self::error::ConversionError;
12477    fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
12478        match value {
12479            "changes" => Ok(Self::Changes),
12480            _ => Err("invalid value".into()),
12481        }
12482    }
12483}
12484impl ::std::convert::TryFrom<&str> for JsonRpcRequestForChangesMethod {
12485    type Error = self::error::ConversionError;
12486    fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
12487        value.parse()
12488    }
12489}
12490impl ::std::convert::TryFrom<&::std::string::String> for JsonRpcRequestForChangesMethod {
12491    type Error = self::error::ConversionError;
12492    fn try_from(
12493        value: &::std::string::String,
12494    ) -> ::std::result::Result<Self, self::error::ConversionError> {
12495        value.parse()
12496    }
12497}
12498impl ::std::convert::TryFrom<::std::string::String> for JsonRpcRequestForChangesMethod {
12499    type Error = self::error::ConversionError;
12500    fn try_from(
12501        value: ::std::string::String,
12502    ) -> ::std::result::Result<Self, self::error::ConversionError> {
12503        value.parse()
12504    }
12505}
12506#[doc = "`JsonRpcRequestForChunk`"]
12507#[doc = r""]
12508#[doc = r" <details><summary>JSON schema</summary>"]
12509#[doc = r""]
12510#[doc = r" ```json"]
12511#[doc = "{"]
12512#[doc = "  \"title\": \"JsonRpcRequest_for_chunk\","]
12513#[doc = "  \"type\": \"object\","]
12514#[doc = "  \"required\": ["]
12515#[doc = "    \"id\","]
12516#[doc = "    \"jsonrpc\","]
12517#[doc = "    \"method\","]
12518#[doc = "    \"params\""]
12519#[doc = "  ],"]
12520#[doc = "  \"properties\": {"]
12521#[doc = "    \"id\": {"]
12522#[doc = "      \"type\": \"string\""]
12523#[doc = "    },"]
12524#[doc = "    \"jsonrpc\": {"]
12525#[doc = "      \"type\": \"string\""]
12526#[doc = "    },"]
12527#[doc = "    \"method\": {"]
12528#[doc = "      \"type\": \"string\","]
12529#[doc = "      \"enum\": ["]
12530#[doc = "        \"chunk\""]
12531#[doc = "      ]"]
12532#[doc = "    },"]
12533#[doc = "    \"params\": {"]
12534#[doc = "      \"$ref\": \"#/components/schemas/RpcChunkRequest\""]
12535#[doc = "    }"]
12536#[doc = "  }"]
12537#[doc = "}"]
12538#[doc = r" ```"]
12539#[doc = r" </details>"]
12540#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
12541pub struct JsonRpcRequestForChunk {
12542    pub id: ::std::string::String,
12543    pub jsonrpc: ::std::string::String,
12544    pub method: JsonRpcRequestForChunkMethod,
12545    pub params: RpcChunkRequest,
12546}
12547impl ::std::convert::From<&JsonRpcRequestForChunk> for JsonRpcRequestForChunk {
12548    fn from(value: &JsonRpcRequestForChunk) -> Self {
12549        value.clone()
12550    }
12551}
12552#[doc = "`JsonRpcRequestForChunkMethod`"]
12553#[doc = r""]
12554#[doc = r" <details><summary>JSON schema</summary>"]
12555#[doc = r""]
12556#[doc = r" ```json"]
12557#[doc = "{"]
12558#[doc = "  \"type\": \"string\","]
12559#[doc = "  \"enum\": ["]
12560#[doc = "    \"chunk\""]
12561#[doc = "  ]"]
12562#[doc = "}"]
12563#[doc = r" ```"]
12564#[doc = r" </details>"]
12565#[derive(
12566    :: serde :: Deserialize,
12567    :: serde :: Serialize,
12568    Clone,
12569    Copy,
12570    Debug,
12571    Eq,
12572    Hash,
12573    Ord,
12574    PartialEq,
12575    PartialOrd,
12576)]
12577pub enum JsonRpcRequestForChunkMethod {
12578    #[serde(rename = "chunk")]
12579    Chunk,
12580}
12581impl ::std::convert::From<&Self> for JsonRpcRequestForChunkMethod {
12582    fn from(value: &JsonRpcRequestForChunkMethod) -> Self {
12583        value.clone()
12584    }
12585}
12586impl ::std::fmt::Display for JsonRpcRequestForChunkMethod {
12587    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
12588        match *self {
12589            Self::Chunk => f.write_str("chunk"),
12590        }
12591    }
12592}
12593impl ::std::str::FromStr for JsonRpcRequestForChunkMethod {
12594    type Err = self::error::ConversionError;
12595    fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
12596        match value {
12597            "chunk" => Ok(Self::Chunk),
12598            _ => Err("invalid value".into()),
12599        }
12600    }
12601}
12602impl ::std::convert::TryFrom<&str> for JsonRpcRequestForChunkMethod {
12603    type Error = self::error::ConversionError;
12604    fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
12605        value.parse()
12606    }
12607}
12608impl ::std::convert::TryFrom<&::std::string::String> for JsonRpcRequestForChunkMethod {
12609    type Error = self::error::ConversionError;
12610    fn try_from(
12611        value: &::std::string::String,
12612    ) -> ::std::result::Result<Self, self::error::ConversionError> {
12613        value.parse()
12614    }
12615}
12616impl ::std::convert::TryFrom<::std::string::String> for JsonRpcRequestForChunkMethod {
12617    type Error = self::error::ConversionError;
12618    fn try_from(
12619        value: ::std::string::String,
12620    ) -> ::std::result::Result<Self, self::error::ConversionError> {
12621        value.parse()
12622    }
12623}
12624#[doc = "`JsonRpcRequestForClientConfig`"]
12625#[doc = r""]
12626#[doc = r" <details><summary>JSON schema</summary>"]
12627#[doc = r""]
12628#[doc = r" ```json"]
12629#[doc = "{"]
12630#[doc = "  \"title\": \"JsonRpcRequest_for_client_config\","]
12631#[doc = "  \"type\": \"object\","]
12632#[doc = "  \"required\": ["]
12633#[doc = "    \"id\","]
12634#[doc = "    \"jsonrpc\","]
12635#[doc = "    \"method\","]
12636#[doc = "    \"params\""]
12637#[doc = "  ],"]
12638#[doc = "  \"properties\": {"]
12639#[doc = "    \"id\": {"]
12640#[doc = "      \"type\": \"string\""]
12641#[doc = "    },"]
12642#[doc = "    \"jsonrpc\": {"]
12643#[doc = "      \"type\": \"string\""]
12644#[doc = "    },"]
12645#[doc = "    \"method\": {"]
12646#[doc = "      \"type\": \"string\","]
12647#[doc = "      \"enum\": ["]
12648#[doc = "        \"client_config\""]
12649#[doc = "      ]"]
12650#[doc = "    },"]
12651#[doc = "    \"params\": {"]
12652#[doc = "      \"$ref\": \"#/components/schemas/RpcClientConfigRequest\""]
12653#[doc = "    }"]
12654#[doc = "  }"]
12655#[doc = "}"]
12656#[doc = r" ```"]
12657#[doc = r" </details>"]
12658#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
12659pub struct JsonRpcRequestForClientConfig {
12660    pub id: ::std::string::String,
12661    pub jsonrpc: ::std::string::String,
12662    pub method: JsonRpcRequestForClientConfigMethod,
12663    pub params: RpcClientConfigRequest,
12664}
12665impl ::std::convert::From<&JsonRpcRequestForClientConfig> for JsonRpcRequestForClientConfig {
12666    fn from(value: &JsonRpcRequestForClientConfig) -> Self {
12667        value.clone()
12668    }
12669}
12670#[doc = "`JsonRpcRequestForClientConfigMethod`"]
12671#[doc = r""]
12672#[doc = r" <details><summary>JSON schema</summary>"]
12673#[doc = r""]
12674#[doc = r" ```json"]
12675#[doc = "{"]
12676#[doc = "  \"type\": \"string\","]
12677#[doc = "  \"enum\": ["]
12678#[doc = "    \"client_config\""]
12679#[doc = "  ]"]
12680#[doc = "}"]
12681#[doc = r" ```"]
12682#[doc = r" </details>"]
12683#[derive(
12684    :: serde :: Deserialize,
12685    :: serde :: Serialize,
12686    Clone,
12687    Copy,
12688    Debug,
12689    Eq,
12690    Hash,
12691    Ord,
12692    PartialEq,
12693    PartialOrd,
12694)]
12695pub enum JsonRpcRequestForClientConfigMethod {
12696    #[serde(rename = "client_config")]
12697    ClientConfig,
12698}
12699impl ::std::convert::From<&Self> for JsonRpcRequestForClientConfigMethod {
12700    fn from(value: &JsonRpcRequestForClientConfigMethod) -> Self {
12701        value.clone()
12702    }
12703}
12704impl ::std::fmt::Display for JsonRpcRequestForClientConfigMethod {
12705    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
12706        match *self {
12707            Self::ClientConfig => f.write_str("client_config"),
12708        }
12709    }
12710}
12711impl ::std::str::FromStr for JsonRpcRequestForClientConfigMethod {
12712    type Err = self::error::ConversionError;
12713    fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
12714        match value {
12715            "client_config" => Ok(Self::ClientConfig),
12716            _ => Err("invalid value".into()),
12717        }
12718    }
12719}
12720impl ::std::convert::TryFrom<&str> for JsonRpcRequestForClientConfigMethod {
12721    type Error = self::error::ConversionError;
12722    fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
12723        value.parse()
12724    }
12725}
12726impl ::std::convert::TryFrom<&::std::string::String> for JsonRpcRequestForClientConfigMethod {
12727    type Error = self::error::ConversionError;
12728    fn try_from(
12729        value: &::std::string::String,
12730    ) -> ::std::result::Result<Self, self::error::ConversionError> {
12731        value.parse()
12732    }
12733}
12734impl ::std::convert::TryFrom<::std::string::String> for JsonRpcRequestForClientConfigMethod {
12735    type Error = self::error::ConversionError;
12736    fn try_from(
12737        value: ::std::string::String,
12738    ) -> ::std::result::Result<Self, self::error::ConversionError> {
12739        value.parse()
12740    }
12741}
12742#[doc = "`JsonRpcRequestForExperimentalChanges`"]
12743#[doc = r""]
12744#[doc = r" <details><summary>JSON schema</summary>"]
12745#[doc = r""]
12746#[doc = r" ```json"]
12747#[doc = "{"]
12748#[doc = "  \"title\": \"JsonRpcRequest_for_EXPERIMENTAL_changes\","]
12749#[doc = "  \"type\": \"object\","]
12750#[doc = "  \"required\": ["]
12751#[doc = "    \"id\","]
12752#[doc = "    \"jsonrpc\","]
12753#[doc = "    \"method\","]
12754#[doc = "    \"params\""]
12755#[doc = "  ],"]
12756#[doc = "  \"properties\": {"]
12757#[doc = "    \"id\": {"]
12758#[doc = "      \"type\": \"string\""]
12759#[doc = "    },"]
12760#[doc = "    \"jsonrpc\": {"]
12761#[doc = "      \"type\": \"string\""]
12762#[doc = "    },"]
12763#[doc = "    \"method\": {"]
12764#[doc = "      \"type\": \"string\","]
12765#[doc = "      \"enum\": ["]
12766#[doc = "        \"EXPERIMENTAL_changes\""]
12767#[doc = "      ]"]
12768#[doc = "    },"]
12769#[doc = "    \"params\": {"]
12770#[doc = "      \"$ref\": \"#/components/schemas/RpcStateChangesInBlockByTypeRequest\""]
12771#[doc = "    }"]
12772#[doc = "  }"]
12773#[doc = "}"]
12774#[doc = r" ```"]
12775#[doc = r" </details>"]
12776#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
12777pub struct JsonRpcRequestForExperimentalChanges {
12778    pub id: ::std::string::String,
12779    pub jsonrpc: ::std::string::String,
12780    pub method: JsonRpcRequestForExperimentalChangesMethod,
12781    pub params: RpcStateChangesInBlockByTypeRequest,
12782}
12783impl ::std::convert::From<&JsonRpcRequestForExperimentalChanges>
12784    for JsonRpcRequestForExperimentalChanges
12785{
12786    fn from(value: &JsonRpcRequestForExperimentalChanges) -> Self {
12787        value.clone()
12788    }
12789}
12790#[doc = "`JsonRpcRequestForExperimentalChangesInBlock`"]
12791#[doc = r""]
12792#[doc = r" <details><summary>JSON schema</summary>"]
12793#[doc = r""]
12794#[doc = r" ```json"]
12795#[doc = "{"]
12796#[doc = "  \"title\": \"JsonRpcRequest_for_EXPERIMENTAL_changes_in_block\","]
12797#[doc = "  \"type\": \"object\","]
12798#[doc = "  \"required\": ["]
12799#[doc = "    \"id\","]
12800#[doc = "    \"jsonrpc\","]
12801#[doc = "    \"method\","]
12802#[doc = "    \"params\""]
12803#[doc = "  ],"]
12804#[doc = "  \"properties\": {"]
12805#[doc = "    \"id\": {"]
12806#[doc = "      \"type\": \"string\""]
12807#[doc = "    },"]
12808#[doc = "    \"jsonrpc\": {"]
12809#[doc = "      \"type\": \"string\""]
12810#[doc = "    },"]
12811#[doc = "    \"method\": {"]
12812#[doc = "      \"type\": \"string\","]
12813#[doc = "      \"enum\": ["]
12814#[doc = "        \"EXPERIMENTAL_changes_in_block\""]
12815#[doc = "      ]"]
12816#[doc = "    },"]
12817#[doc = "    \"params\": {"]
12818#[doc = "      \"$ref\": \"#/components/schemas/RpcStateChangesInBlockRequest\""]
12819#[doc = "    }"]
12820#[doc = "  }"]
12821#[doc = "}"]
12822#[doc = r" ```"]
12823#[doc = r" </details>"]
12824#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
12825pub struct JsonRpcRequestForExperimentalChangesInBlock {
12826    pub id: ::std::string::String,
12827    pub jsonrpc: ::std::string::String,
12828    pub method: JsonRpcRequestForExperimentalChangesInBlockMethod,
12829    pub params: RpcStateChangesInBlockRequest,
12830}
12831impl ::std::convert::From<&JsonRpcRequestForExperimentalChangesInBlock>
12832    for JsonRpcRequestForExperimentalChangesInBlock
12833{
12834    fn from(value: &JsonRpcRequestForExperimentalChangesInBlock) -> Self {
12835        value.clone()
12836    }
12837}
12838#[doc = "`JsonRpcRequestForExperimentalChangesInBlockMethod`"]
12839#[doc = r""]
12840#[doc = r" <details><summary>JSON schema</summary>"]
12841#[doc = r""]
12842#[doc = r" ```json"]
12843#[doc = "{"]
12844#[doc = "  \"type\": \"string\","]
12845#[doc = "  \"enum\": ["]
12846#[doc = "    \"EXPERIMENTAL_changes_in_block\""]
12847#[doc = "  ]"]
12848#[doc = "}"]
12849#[doc = r" ```"]
12850#[doc = r" </details>"]
12851#[derive(
12852    :: serde :: Deserialize,
12853    :: serde :: Serialize,
12854    Clone,
12855    Copy,
12856    Debug,
12857    Eq,
12858    Hash,
12859    Ord,
12860    PartialEq,
12861    PartialOrd,
12862)]
12863pub enum JsonRpcRequestForExperimentalChangesInBlockMethod {
12864    #[serde(rename = "EXPERIMENTAL_changes_in_block")]
12865    ExperimentalChangesInBlock,
12866}
12867impl ::std::convert::From<&Self> for JsonRpcRequestForExperimentalChangesInBlockMethod {
12868    fn from(value: &JsonRpcRequestForExperimentalChangesInBlockMethod) -> Self {
12869        value.clone()
12870    }
12871}
12872impl ::std::fmt::Display for JsonRpcRequestForExperimentalChangesInBlockMethod {
12873    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
12874        match *self {
12875            Self::ExperimentalChangesInBlock => f.write_str("EXPERIMENTAL_changes_in_block"),
12876        }
12877    }
12878}
12879impl ::std::str::FromStr for JsonRpcRequestForExperimentalChangesInBlockMethod {
12880    type Err = self::error::ConversionError;
12881    fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
12882        match value {
12883            "EXPERIMENTAL_changes_in_block" => Ok(Self::ExperimentalChangesInBlock),
12884            _ => Err("invalid value".into()),
12885        }
12886    }
12887}
12888impl ::std::convert::TryFrom<&str> for JsonRpcRequestForExperimentalChangesInBlockMethod {
12889    type Error = self::error::ConversionError;
12890    fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
12891        value.parse()
12892    }
12893}
12894impl ::std::convert::TryFrom<&::std::string::String>
12895    for JsonRpcRequestForExperimentalChangesInBlockMethod
12896{
12897    type Error = self::error::ConversionError;
12898    fn try_from(
12899        value: &::std::string::String,
12900    ) -> ::std::result::Result<Self, self::error::ConversionError> {
12901        value.parse()
12902    }
12903}
12904impl ::std::convert::TryFrom<::std::string::String>
12905    for JsonRpcRequestForExperimentalChangesInBlockMethod
12906{
12907    type Error = self::error::ConversionError;
12908    fn try_from(
12909        value: ::std::string::String,
12910    ) -> ::std::result::Result<Self, self::error::ConversionError> {
12911        value.parse()
12912    }
12913}
12914#[doc = "`JsonRpcRequestForExperimentalChangesMethod`"]
12915#[doc = r""]
12916#[doc = r" <details><summary>JSON schema</summary>"]
12917#[doc = r""]
12918#[doc = r" ```json"]
12919#[doc = "{"]
12920#[doc = "  \"type\": \"string\","]
12921#[doc = "  \"enum\": ["]
12922#[doc = "    \"EXPERIMENTAL_changes\""]
12923#[doc = "  ]"]
12924#[doc = "}"]
12925#[doc = r" ```"]
12926#[doc = r" </details>"]
12927#[derive(
12928    :: serde :: Deserialize,
12929    :: serde :: Serialize,
12930    Clone,
12931    Copy,
12932    Debug,
12933    Eq,
12934    Hash,
12935    Ord,
12936    PartialEq,
12937    PartialOrd,
12938)]
12939pub enum JsonRpcRequestForExperimentalChangesMethod {
12940    #[serde(rename = "EXPERIMENTAL_changes")]
12941    ExperimentalChanges,
12942}
12943impl ::std::convert::From<&Self> for JsonRpcRequestForExperimentalChangesMethod {
12944    fn from(value: &JsonRpcRequestForExperimentalChangesMethod) -> Self {
12945        value.clone()
12946    }
12947}
12948impl ::std::fmt::Display for JsonRpcRequestForExperimentalChangesMethod {
12949    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
12950        match *self {
12951            Self::ExperimentalChanges => f.write_str("EXPERIMENTAL_changes"),
12952        }
12953    }
12954}
12955impl ::std::str::FromStr for JsonRpcRequestForExperimentalChangesMethod {
12956    type Err = self::error::ConversionError;
12957    fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
12958        match value {
12959            "EXPERIMENTAL_changes" => Ok(Self::ExperimentalChanges),
12960            _ => Err("invalid value".into()),
12961        }
12962    }
12963}
12964impl ::std::convert::TryFrom<&str> for JsonRpcRequestForExperimentalChangesMethod {
12965    type Error = self::error::ConversionError;
12966    fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
12967        value.parse()
12968    }
12969}
12970impl ::std::convert::TryFrom<&::std::string::String>
12971    for JsonRpcRequestForExperimentalChangesMethod
12972{
12973    type Error = self::error::ConversionError;
12974    fn try_from(
12975        value: &::std::string::String,
12976    ) -> ::std::result::Result<Self, self::error::ConversionError> {
12977        value.parse()
12978    }
12979}
12980impl ::std::convert::TryFrom<::std::string::String> for JsonRpcRequestForExperimentalChangesMethod {
12981    type Error = self::error::ConversionError;
12982    fn try_from(
12983        value: ::std::string::String,
12984    ) -> ::std::result::Result<Self, self::error::ConversionError> {
12985        value.parse()
12986    }
12987}
12988#[doc = "`JsonRpcRequestForExperimentalCongestionLevel`"]
12989#[doc = r""]
12990#[doc = r" <details><summary>JSON schema</summary>"]
12991#[doc = r""]
12992#[doc = r" ```json"]
12993#[doc = "{"]
12994#[doc = "  \"title\": \"JsonRpcRequest_for_EXPERIMENTAL_congestion_level\","]
12995#[doc = "  \"type\": \"object\","]
12996#[doc = "  \"required\": ["]
12997#[doc = "    \"id\","]
12998#[doc = "    \"jsonrpc\","]
12999#[doc = "    \"method\","]
13000#[doc = "    \"params\""]
13001#[doc = "  ],"]
13002#[doc = "  \"properties\": {"]
13003#[doc = "    \"id\": {"]
13004#[doc = "      \"type\": \"string\""]
13005#[doc = "    },"]
13006#[doc = "    \"jsonrpc\": {"]
13007#[doc = "      \"type\": \"string\""]
13008#[doc = "    },"]
13009#[doc = "    \"method\": {"]
13010#[doc = "      \"type\": \"string\","]
13011#[doc = "      \"enum\": ["]
13012#[doc = "        \"EXPERIMENTAL_congestion_level\""]
13013#[doc = "      ]"]
13014#[doc = "    },"]
13015#[doc = "    \"params\": {"]
13016#[doc = "      \"$ref\": \"#/components/schemas/RpcCongestionLevelRequest\""]
13017#[doc = "    }"]
13018#[doc = "  }"]
13019#[doc = "}"]
13020#[doc = r" ```"]
13021#[doc = r" </details>"]
13022#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
13023pub struct JsonRpcRequestForExperimentalCongestionLevel {
13024    pub id: ::std::string::String,
13025    pub jsonrpc: ::std::string::String,
13026    pub method: JsonRpcRequestForExperimentalCongestionLevelMethod,
13027    pub params: RpcCongestionLevelRequest,
13028}
13029impl ::std::convert::From<&JsonRpcRequestForExperimentalCongestionLevel>
13030    for JsonRpcRequestForExperimentalCongestionLevel
13031{
13032    fn from(value: &JsonRpcRequestForExperimentalCongestionLevel) -> Self {
13033        value.clone()
13034    }
13035}
13036#[doc = "`JsonRpcRequestForExperimentalCongestionLevelMethod`"]
13037#[doc = r""]
13038#[doc = r" <details><summary>JSON schema</summary>"]
13039#[doc = r""]
13040#[doc = r" ```json"]
13041#[doc = "{"]
13042#[doc = "  \"type\": \"string\","]
13043#[doc = "  \"enum\": ["]
13044#[doc = "    \"EXPERIMENTAL_congestion_level\""]
13045#[doc = "  ]"]
13046#[doc = "}"]
13047#[doc = r" ```"]
13048#[doc = r" </details>"]
13049#[derive(
13050    :: serde :: Deserialize,
13051    :: serde :: Serialize,
13052    Clone,
13053    Copy,
13054    Debug,
13055    Eq,
13056    Hash,
13057    Ord,
13058    PartialEq,
13059    PartialOrd,
13060)]
13061pub enum JsonRpcRequestForExperimentalCongestionLevelMethod {
13062    #[serde(rename = "EXPERIMENTAL_congestion_level")]
13063    ExperimentalCongestionLevel,
13064}
13065impl ::std::convert::From<&Self> for JsonRpcRequestForExperimentalCongestionLevelMethod {
13066    fn from(value: &JsonRpcRequestForExperimentalCongestionLevelMethod) -> Self {
13067        value.clone()
13068    }
13069}
13070impl ::std::fmt::Display for JsonRpcRequestForExperimentalCongestionLevelMethod {
13071    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
13072        match *self {
13073            Self::ExperimentalCongestionLevel => f.write_str("EXPERIMENTAL_congestion_level"),
13074        }
13075    }
13076}
13077impl ::std::str::FromStr for JsonRpcRequestForExperimentalCongestionLevelMethod {
13078    type Err = self::error::ConversionError;
13079    fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
13080        match value {
13081            "EXPERIMENTAL_congestion_level" => Ok(Self::ExperimentalCongestionLevel),
13082            _ => Err("invalid value".into()),
13083        }
13084    }
13085}
13086impl ::std::convert::TryFrom<&str> for JsonRpcRequestForExperimentalCongestionLevelMethod {
13087    type Error = self::error::ConversionError;
13088    fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
13089        value.parse()
13090    }
13091}
13092impl ::std::convert::TryFrom<&::std::string::String>
13093    for JsonRpcRequestForExperimentalCongestionLevelMethod
13094{
13095    type Error = self::error::ConversionError;
13096    fn try_from(
13097        value: &::std::string::String,
13098    ) -> ::std::result::Result<Self, self::error::ConversionError> {
13099        value.parse()
13100    }
13101}
13102impl ::std::convert::TryFrom<::std::string::String>
13103    for JsonRpcRequestForExperimentalCongestionLevelMethod
13104{
13105    type Error = self::error::ConversionError;
13106    fn try_from(
13107        value: ::std::string::String,
13108    ) -> ::std::result::Result<Self, self::error::ConversionError> {
13109        value.parse()
13110    }
13111}
13112#[doc = "`JsonRpcRequestForExperimentalGenesisConfig`"]
13113#[doc = r""]
13114#[doc = r" <details><summary>JSON schema</summary>"]
13115#[doc = r""]
13116#[doc = r" ```json"]
13117#[doc = "{"]
13118#[doc = "  \"title\": \"JsonRpcRequest_for_EXPERIMENTAL_genesis_config\","]
13119#[doc = "  \"type\": \"object\","]
13120#[doc = "  \"required\": ["]
13121#[doc = "    \"id\","]
13122#[doc = "    \"jsonrpc\","]
13123#[doc = "    \"method\","]
13124#[doc = "    \"params\""]
13125#[doc = "  ],"]
13126#[doc = "  \"properties\": {"]
13127#[doc = "    \"id\": {"]
13128#[doc = "      \"type\": \"string\""]
13129#[doc = "    },"]
13130#[doc = "    \"jsonrpc\": {"]
13131#[doc = "      \"type\": \"string\""]
13132#[doc = "    },"]
13133#[doc = "    \"method\": {"]
13134#[doc = "      \"type\": \"string\","]
13135#[doc = "      \"enum\": ["]
13136#[doc = "        \"EXPERIMENTAL_genesis_config\""]
13137#[doc = "      ]"]
13138#[doc = "    },"]
13139#[doc = "    \"params\": {"]
13140#[doc = "      \"$ref\": \"#/components/schemas/GenesisConfigRequest\""]
13141#[doc = "    }"]
13142#[doc = "  }"]
13143#[doc = "}"]
13144#[doc = r" ```"]
13145#[doc = r" </details>"]
13146#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
13147pub struct JsonRpcRequestForExperimentalGenesisConfig {
13148    pub id: ::std::string::String,
13149    pub jsonrpc: ::std::string::String,
13150    pub method: JsonRpcRequestForExperimentalGenesisConfigMethod,
13151    pub params: GenesisConfigRequest,
13152}
13153impl ::std::convert::From<&JsonRpcRequestForExperimentalGenesisConfig>
13154    for JsonRpcRequestForExperimentalGenesisConfig
13155{
13156    fn from(value: &JsonRpcRequestForExperimentalGenesisConfig) -> Self {
13157        value.clone()
13158    }
13159}
13160#[doc = "`JsonRpcRequestForExperimentalGenesisConfigMethod`"]
13161#[doc = r""]
13162#[doc = r" <details><summary>JSON schema</summary>"]
13163#[doc = r""]
13164#[doc = r" ```json"]
13165#[doc = "{"]
13166#[doc = "  \"type\": \"string\","]
13167#[doc = "  \"enum\": ["]
13168#[doc = "    \"EXPERIMENTAL_genesis_config\""]
13169#[doc = "  ]"]
13170#[doc = "}"]
13171#[doc = r" ```"]
13172#[doc = r" </details>"]
13173#[derive(
13174    :: serde :: Deserialize,
13175    :: serde :: Serialize,
13176    Clone,
13177    Copy,
13178    Debug,
13179    Eq,
13180    Hash,
13181    Ord,
13182    PartialEq,
13183    PartialOrd,
13184)]
13185pub enum JsonRpcRequestForExperimentalGenesisConfigMethod {
13186    #[serde(rename = "EXPERIMENTAL_genesis_config")]
13187    ExperimentalGenesisConfig,
13188}
13189impl ::std::convert::From<&Self> for JsonRpcRequestForExperimentalGenesisConfigMethod {
13190    fn from(value: &JsonRpcRequestForExperimentalGenesisConfigMethod) -> Self {
13191        value.clone()
13192    }
13193}
13194impl ::std::fmt::Display for JsonRpcRequestForExperimentalGenesisConfigMethod {
13195    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
13196        match *self {
13197            Self::ExperimentalGenesisConfig => f.write_str("EXPERIMENTAL_genesis_config"),
13198        }
13199    }
13200}
13201impl ::std::str::FromStr for JsonRpcRequestForExperimentalGenesisConfigMethod {
13202    type Err = self::error::ConversionError;
13203    fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
13204        match value {
13205            "EXPERIMENTAL_genesis_config" => Ok(Self::ExperimentalGenesisConfig),
13206            _ => Err("invalid value".into()),
13207        }
13208    }
13209}
13210impl ::std::convert::TryFrom<&str> for JsonRpcRequestForExperimentalGenesisConfigMethod {
13211    type Error = self::error::ConversionError;
13212    fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
13213        value.parse()
13214    }
13215}
13216impl ::std::convert::TryFrom<&::std::string::String>
13217    for JsonRpcRequestForExperimentalGenesisConfigMethod
13218{
13219    type Error = self::error::ConversionError;
13220    fn try_from(
13221        value: &::std::string::String,
13222    ) -> ::std::result::Result<Self, self::error::ConversionError> {
13223        value.parse()
13224    }
13225}
13226impl ::std::convert::TryFrom<::std::string::String>
13227    for JsonRpcRequestForExperimentalGenesisConfigMethod
13228{
13229    type Error = self::error::ConversionError;
13230    fn try_from(
13231        value: ::std::string::String,
13232    ) -> ::std::result::Result<Self, self::error::ConversionError> {
13233        value.parse()
13234    }
13235}
13236#[doc = "`JsonRpcRequestForExperimentalLightClientBlockProof`"]
13237#[doc = r""]
13238#[doc = r" <details><summary>JSON schema</summary>"]
13239#[doc = r""]
13240#[doc = r" ```json"]
13241#[doc = "{"]
13242#[doc = "  \"title\": \"JsonRpcRequest_for_EXPERIMENTAL_light_client_block_proof\","]
13243#[doc = "  \"type\": \"object\","]
13244#[doc = "  \"required\": ["]
13245#[doc = "    \"id\","]
13246#[doc = "    \"jsonrpc\","]
13247#[doc = "    \"method\","]
13248#[doc = "    \"params\""]
13249#[doc = "  ],"]
13250#[doc = "  \"properties\": {"]
13251#[doc = "    \"id\": {"]
13252#[doc = "      \"type\": \"string\""]
13253#[doc = "    },"]
13254#[doc = "    \"jsonrpc\": {"]
13255#[doc = "      \"type\": \"string\""]
13256#[doc = "    },"]
13257#[doc = "    \"method\": {"]
13258#[doc = "      \"type\": \"string\","]
13259#[doc = "      \"enum\": ["]
13260#[doc = "        \"EXPERIMENTAL_light_client_block_proof\""]
13261#[doc = "      ]"]
13262#[doc = "    },"]
13263#[doc = "    \"params\": {"]
13264#[doc = "      \"$ref\": \"#/components/schemas/RpcLightClientBlockProofRequest\""]
13265#[doc = "    }"]
13266#[doc = "  }"]
13267#[doc = "}"]
13268#[doc = r" ```"]
13269#[doc = r" </details>"]
13270#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
13271pub struct JsonRpcRequestForExperimentalLightClientBlockProof {
13272    pub id: ::std::string::String,
13273    pub jsonrpc: ::std::string::String,
13274    pub method: JsonRpcRequestForExperimentalLightClientBlockProofMethod,
13275    pub params: RpcLightClientBlockProofRequest,
13276}
13277impl ::std::convert::From<&JsonRpcRequestForExperimentalLightClientBlockProof>
13278    for JsonRpcRequestForExperimentalLightClientBlockProof
13279{
13280    fn from(value: &JsonRpcRequestForExperimentalLightClientBlockProof) -> Self {
13281        value.clone()
13282    }
13283}
13284#[doc = "`JsonRpcRequestForExperimentalLightClientBlockProofMethod`"]
13285#[doc = r""]
13286#[doc = r" <details><summary>JSON schema</summary>"]
13287#[doc = r""]
13288#[doc = r" ```json"]
13289#[doc = "{"]
13290#[doc = "  \"type\": \"string\","]
13291#[doc = "  \"enum\": ["]
13292#[doc = "    \"EXPERIMENTAL_light_client_block_proof\""]
13293#[doc = "  ]"]
13294#[doc = "}"]
13295#[doc = r" ```"]
13296#[doc = r" </details>"]
13297#[derive(
13298    :: serde :: Deserialize,
13299    :: serde :: Serialize,
13300    Clone,
13301    Copy,
13302    Debug,
13303    Eq,
13304    Hash,
13305    Ord,
13306    PartialEq,
13307    PartialOrd,
13308)]
13309pub enum JsonRpcRequestForExperimentalLightClientBlockProofMethod {
13310    #[serde(rename = "EXPERIMENTAL_light_client_block_proof")]
13311    ExperimentalLightClientBlockProof,
13312}
13313impl ::std::convert::From<&Self> for JsonRpcRequestForExperimentalLightClientBlockProofMethod {
13314    fn from(value: &JsonRpcRequestForExperimentalLightClientBlockProofMethod) -> Self {
13315        value.clone()
13316    }
13317}
13318impl ::std::fmt::Display for JsonRpcRequestForExperimentalLightClientBlockProofMethod {
13319    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
13320        match *self {
13321            Self::ExperimentalLightClientBlockProof => {
13322                f.write_str("EXPERIMENTAL_light_client_block_proof")
13323            }
13324        }
13325    }
13326}
13327impl ::std::str::FromStr for JsonRpcRequestForExperimentalLightClientBlockProofMethod {
13328    type Err = self::error::ConversionError;
13329    fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
13330        match value {
13331            "EXPERIMENTAL_light_client_block_proof" => Ok(Self::ExperimentalLightClientBlockProof),
13332            _ => Err("invalid value".into()),
13333        }
13334    }
13335}
13336impl ::std::convert::TryFrom<&str> for JsonRpcRequestForExperimentalLightClientBlockProofMethod {
13337    type Error = self::error::ConversionError;
13338    fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
13339        value.parse()
13340    }
13341}
13342impl ::std::convert::TryFrom<&::std::string::String>
13343    for JsonRpcRequestForExperimentalLightClientBlockProofMethod
13344{
13345    type Error = self::error::ConversionError;
13346    fn try_from(
13347        value: &::std::string::String,
13348    ) -> ::std::result::Result<Self, self::error::ConversionError> {
13349        value.parse()
13350    }
13351}
13352impl ::std::convert::TryFrom<::std::string::String>
13353    for JsonRpcRequestForExperimentalLightClientBlockProofMethod
13354{
13355    type Error = self::error::ConversionError;
13356    fn try_from(
13357        value: ::std::string::String,
13358    ) -> ::std::result::Result<Self, self::error::ConversionError> {
13359        value.parse()
13360    }
13361}
13362#[doc = "`JsonRpcRequestForExperimentalLightClientProof`"]
13363#[doc = r""]
13364#[doc = r" <details><summary>JSON schema</summary>"]
13365#[doc = r""]
13366#[doc = r" ```json"]
13367#[doc = "{"]
13368#[doc = "  \"title\": \"JsonRpcRequest_for_EXPERIMENTAL_light_client_proof\","]
13369#[doc = "  \"type\": \"object\","]
13370#[doc = "  \"required\": ["]
13371#[doc = "    \"id\","]
13372#[doc = "    \"jsonrpc\","]
13373#[doc = "    \"method\","]
13374#[doc = "    \"params\""]
13375#[doc = "  ],"]
13376#[doc = "  \"properties\": {"]
13377#[doc = "    \"id\": {"]
13378#[doc = "      \"type\": \"string\""]
13379#[doc = "    },"]
13380#[doc = "    \"jsonrpc\": {"]
13381#[doc = "      \"type\": \"string\""]
13382#[doc = "    },"]
13383#[doc = "    \"method\": {"]
13384#[doc = "      \"type\": \"string\","]
13385#[doc = "      \"enum\": ["]
13386#[doc = "        \"EXPERIMENTAL_light_client_proof\""]
13387#[doc = "      ]"]
13388#[doc = "    },"]
13389#[doc = "    \"params\": {"]
13390#[doc = "      \"$ref\": \"#/components/schemas/RpcLightClientExecutionProofRequest\""]
13391#[doc = "    }"]
13392#[doc = "  }"]
13393#[doc = "}"]
13394#[doc = r" ```"]
13395#[doc = r" </details>"]
13396#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
13397pub struct JsonRpcRequestForExperimentalLightClientProof {
13398    pub id: ::std::string::String,
13399    pub jsonrpc: ::std::string::String,
13400    pub method: JsonRpcRequestForExperimentalLightClientProofMethod,
13401    pub params: RpcLightClientExecutionProofRequest,
13402}
13403impl ::std::convert::From<&JsonRpcRequestForExperimentalLightClientProof>
13404    for JsonRpcRequestForExperimentalLightClientProof
13405{
13406    fn from(value: &JsonRpcRequestForExperimentalLightClientProof) -> Self {
13407        value.clone()
13408    }
13409}
13410#[doc = "`JsonRpcRequestForExperimentalLightClientProofMethod`"]
13411#[doc = r""]
13412#[doc = r" <details><summary>JSON schema</summary>"]
13413#[doc = r""]
13414#[doc = r" ```json"]
13415#[doc = "{"]
13416#[doc = "  \"type\": \"string\","]
13417#[doc = "  \"enum\": ["]
13418#[doc = "    \"EXPERIMENTAL_light_client_proof\""]
13419#[doc = "  ]"]
13420#[doc = "}"]
13421#[doc = r" ```"]
13422#[doc = r" </details>"]
13423#[derive(
13424    :: serde :: Deserialize,
13425    :: serde :: Serialize,
13426    Clone,
13427    Copy,
13428    Debug,
13429    Eq,
13430    Hash,
13431    Ord,
13432    PartialEq,
13433    PartialOrd,
13434)]
13435pub enum JsonRpcRequestForExperimentalLightClientProofMethod {
13436    #[serde(rename = "EXPERIMENTAL_light_client_proof")]
13437    ExperimentalLightClientProof,
13438}
13439impl ::std::convert::From<&Self> for JsonRpcRequestForExperimentalLightClientProofMethod {
13440    fn from(value: &JsonRpcRequestForExperimentalLightClientProofMethod) -> Self {
13441        value.clone()
13442    }
13443}
13444impl ::std::fmt::Display for JsonRpcRequestForExperimentalLightClientProofMethod {
13445    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
13446        match *self {
13447            Self::ExperimentalLightClientProof => f.write_str("EXPERIMENTAL_light_client_proof"),
13448        }
13449    }
13450}
13451impl ::std::str::FromStr for JsonRpcRequestForExperimentalLightClientProofMethod {
13452    type Err = self::error::ConversionError;
13453    fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
13454        match value {
13455            "EXPERIMENTAL_light_client_proof" => Ok(Self::ExperimentalLightClientProof),
13456            _ => Err("invalid value".into()),
13457        }
13458    }
13459}
13460impl ::std::convert::TryFrom<&str> for JsonRpcRequestForExperimentalLightClientProofMethod {
13461    type Error = self::error::ConversionError;
13462    fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
13463        value.parse()
13464    }
13465}
13466impl ::std::convert::TryFrom<&::std::string::String>
13467    for JsonRpcRequestForExperimentalLightClientProofMethod
13468{
13469    type Error = self::error::ConversionError;
13470    fn try_from(
13471        value: &::std::string::String,
13472    ) -> ::std::result::Result<Self, self::error::ConversionError> {
13473        value.parse()
13474    }
13475}
13476impl ::std::convert::TryFrom<::std::string::String>
13477    for JsonRpcRequestForExperimentalLightClientProofMethod
13478{
13479    type Error = self::error::ConversionError;
13480    fn try_from(
13481        value: ::std::string::String,
13482    ) -> ::std::result::Result<Self, self::error::ConversionError> {
13483        value.parse()
13484    }
13485}
13486#[doc = "`JsonRpcRequestForExperimentalMaintenanceWindows`"]
13487#[doc = r""]
13488#[doc = r" <details><summary>JSON schema</summary>"]
13489#[doc = r""]
13490#[doc = r" ```json"]
13491#[doc = "{"]
13492#[doc = "  \"title\": \"JsonRpcRequest_for_EXPERIMENTAL_maintenance_windows\","]
13493#[doc = "  \"type\": \"object\","]
13494#[doc = "  \"required\": ["]
13495#[doc = "    \"id\","]
13496#[doc = "    \"jsonrpc\","]
13497#[doc = "    \"method\","]
13498#[doc = "    \"params\""]
13499#[doc = "  ],"]
13500#[doc = "  \"properties\": {"]
13501#[doc = "    \"id\": {"]
13502#[doc = "      \"type\": \"string\""]
13503#[doc = "    },"]
13504#[doc = "    \"jsonrpc\": {"]
13505#[doc = "      \"type\": \"string\""]
13506#[doc = "    },"]
13507#[doc = "    \"method\": {"]
13508#[doc = "      \"type\": \"string\","]
13509#[doc = "      \"enum\": ["]
13510#[doc = "        \"EXPERIMENTAL_maintenance_windows\""]
13511#[doc = "      ]"]
13512#[doc = "    },"]
13513#[doc = "    \"params\": {"]
13514#[doc = "      \"$ref\": \"#/components/schemas/RpcMaintenanceWindowsRequest\""]
13515#[doc = "    }"]
13516#[doc = "  }"]
13517#[doc = "}"]
13518#[doc = r" ```"]
13519#[doc = r" </details>"]
13520#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
13521pub struct JsonRpcRequestForExperimentalMaintenanceWindows {
13522    pub id: ::std::string::String,
13523    pub jsonrpc: ::std::string::String,
13524    pub method: JsonRpcRequestForExperimentalMaintenanceWindowsMethod,
13525    pub params: RpcMaintenanceWindowsRequest,
13526}
13527impl ::std::convert::From<&JsonRpcRequestForExperimentalMaintenanceWindows>
13528    for JsonRpcRequestForExperimentalMaintenanceWindows
13529{
13530    fn from(value: &JsonRpcRequestForExperimentalMaintenanceWindows) -> Self {
13531        value.clone()
13532    }
13533}
13534#[doc = "`JsonRpcRequestForExperimentalMaintenanceWindowsMethod`"]
13535#[doc = r""]
13536#[doc = r" <details><summary>JSON schema</summary>"]
13537#[doc = r""]
13538#[doc = r" ```json"]
13539#[doc = "{"]
13540#[doc = "  \"type\": \"string\","]
13541#[doc = "  \"enum\": ["]
13542#[doc = "    \"EXPERIMENTAL_maintenance_windows\""]
13543#[doc = "  ]"]
13544#[doc = "}"]
13545#[doc = r" ```"]
13546#[doc = r" </details>"]
13547#[derive(
13548    :: serde :: Deserialize,
13549    :: serde :: Serialize,
13550    Clone,
13551    Copy,
13552    Debug,
13553    Eq,
13554    Hash,
13555    Ord,
13556    PartialEq,
13557    PartialOrd,
13558)]
13559pub enum JsonRpcRequestForExperimentalMaintenanceWindowsMethod {
13560    #[serde(rename = "EXPERIMENTAL_maintenance_windows")]
13561    ExperimentalMaintenanceWindows,
13562}
13563impl ::std::convert::From<&Self> for JsonRpcRequestForExperimentalMaintenanceWindowsMethod {
13564    fn from(value: &JsonRpcRequestForExperimentalMaintenanceWindowsMethod) -> Self {
13565        value.clone()
13566    }
13567}
13568impl ::std::fmt::Display for JsonRpcRequestForExperimentalMaintenanceWindowsMethod {
13569    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
13570        match *self {
13571            Self::ExperimentalMaintenanceWindows => f.write_str("EXPERIMENTAL_maintenance_windows"),
13572        }
13573    }
13574}
13575impl ::std::str::FromStr for JsonRpcRequestForExperimentalMaintenanceWindowsMethod {
13576    type Err = self::error::ConversionError;
13577    fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
13578        match value {
13579            "EXPERIMENTAL_maintenance_windows" => Ok(Self::ExperimentalMaintenanceWindows),
13580            _ => Err("invalid value".into()),
13581        }
13582    }
13583}
13584impl ::std::convert::TryFrom<&str> for JsonRpcRequestForExperimentalMaintenanceWindowsMethod {
13585    type Error = self::error::ConversionError;
13586    fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
13587        value.parse()
13588    }
13589}
13590impl ::std::convert::TryFrom<&::std::string::String>
13591    for JsonRpcRequestForExperimentalMaintenanceWindowsMethod
13592{
13593    type Error = self::error::ConversionError;
13594    fn try_from(
13595        value: &::std::string::String,
13596    ) -> ::std::result::Result<Self, self::error::ConversionError> {
13597        value.parse()
13598    }
13599}
13600impl ::std::convert::TryFrom<::std::string::String>
13601    for JsonRpcRequestForExperimentalMaintenanceWindowsMethod
13602{
13603    type Error = self::error::ConversionError;
13604    fn try_from(
13605        value: ::std::string::String,
13606    ) -> ::std::result::Result<Self, self::error::ConversionError> {
13607        value.parse()
13608    }
13609}
13610#[doc = "`JsonRpcRequestForExperimentalProtocolConfig`"]
13611#[doc = r""]
13612#[doc = r" <details><summary>JSON schema</summary>"]
13613#[doc = r""]
13614#[doc = r" ```json"]
13615#[doc = "{"]
13616#[doc = "  \"title\": \"JsonRpcRequest_for_EXPERIMENTAL_protocol_config\","]
13617#[doc = "  \"type\": \"object\","]
13618#[doc = "  \"required\": ["]
13619#[doc = "    \"id\","]
13620#[doc = "    \"jsonrpc\","]
13621#[doc = "    \"method\","]
13622#[doc = "    \"params\""]
13623#[doc = "  ],"]
13624#[doc = "  \"properties\": {"]
13625#[doc = "    \"id\": {"]
13626#[doc = "      \"type\": \"string\""]
13627#[doc = "    },"]
13628#[doc = "    \"jsonrpc\": {"]
13629#[doc = "      \"type\": \"string\""]
13630#[doc = "    },"]
13631#[doc = "    \"method\": {"]
13632#[doc = "      \"type\": \"string\","]
13633#[doc = "      \"enum\": ["]
13634#[doc = "        \"EXPERIMENTAL_protocol_config\""]
13635#[doc = "      ]"]
13636#[doc = "    },"]
13637#[doc = "    \"params\": {"]
13638#[doc = "      \"$ref\": \"#/components/schemas/RpcProtocolConfigRequest\""]
13639#[doc = "    }"]
13640#[doc = "  }"]
13641#[doc = "}"]
13642#[doc = r" ```"]
13643#[doc = r" </details>"]
13644#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
13645pub struct JsonRpcRequestForExperimentalProtocolConfig {
13646    pub id: ::std::string::String,
13647    pub jsonrpc: ::std::string::String,
13648    pub method: JsonRpcRequestForExperimentalProtocolConfigMethod,
13649    pub params: RpcProtocolConfigRequest,
13650}
13651impl ::std::convert::From<&JsonRpcRequestForExperimentalProtocolConfig>
13652    for JsonRpcRequestForExperimentalProtocolConfig
13653{
13654    fn from(value: &JsonRpcRequestForExperimentalProtocolConfig) -> Self {
13655        value.clone()
13656    }
13657}
13658#[doc = "`JsonRpcRequestForExperimentalProtocolConfigMethod`"]
13659#[doc = r""]
13660#[doc = r" <details><summary>JSON schema</summary>"]
13661#[doc = r""]
13662#[doc = r" ```json"]
13663#[doc = "{"]
13664#[doc = "  \"type\": \"string\","]
13665#[doc = "  \"enum\": ["]
13666#[doc = "    \"EXPERIMENTAL_protocol_config\""]
13667#[doc = "  ]"]
13668#[doc = "}"]
13669#[doc = r" ```"]
13670#[doc = r" </details>"]
13671#[derive(
13672    :: serde :: Deserialize,
13673    :: serde :: Serialize,
13674    Clone,
13675    Copy,
13676    Debug,
13677    Eq,
13678    Hash,
13679    Ord,
13680    PartialEq,
13681    PartialOrd,
13682)]
13683pub enum JsonRpcRequestForExperimentalProtocolConfigMethod {
13684    #[serde(rename = "EXPERIMENTAL_protocol_config")]
13685    ExperimentalProtocolConfig,
13686}
13687impl ::std::convert::From<&Self> for JsonRpcRequestForExperimentalProtocolConfigMethod {
13688    fn from(value: &JsonRpcRequestForExperimentalProtocolConfigMethod) -> Self {
13689        value.clone()
13690    }
13691}
13692impl ::std::fmt::Display for JsonRpcRequestForExperimentalProtocolConfigMethod {
13693    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
13694        match *self {
13695            Self::ExperimentalProtocolConfig => f.write_str("EXPERIMENTAL_protocol_config"),
13696        }
13697    }
13698}
13699impl ::std::str::FromStr for JsonRpcRequestForExperimentalProtocolConfigMethod {
13700    type Err = self::error::ConversionError;
13701    fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
13702        match value {
13703            "EXPERIMENTAL_protocol_config" => Ok(Self::ExperimentalProtocolConfig),
13704            _ => Err("invalid value".into()),
13705        }
13706    }
13707}
13708impl ::std::convert::TryFrom<&str> for JsonRpcRequestForExperimentalProtocolConfigMethod {
13709    type Error = self::error::ConversionError;
13710    fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
13711        value.parse()
13712    }
13713}
13714impl ::std::convert::TryFrom<&::std::string::String>
13715    for JsonRpcRequestForExperimentalProtocolConfigMethod
13716{
13717    type Error = self::error::ConversionError;
13718    fn try_from(
13719        value: &::std::string::String,
13720    ) -> ::std::result::Result<Self, self::error::ConversionError> {
13721        value.parse()
13722    }
13723}
13724impl ::std::convert::TryFrom<::std::string::String>
13725    for JsonRpcRequestForExperimentalProtocolConfigMethod
13726{
13727    type Error = self::error::ConversionError;
13728    fn try_from(
13729        value: ::std::string::String,
13730    ) -> ::std::result::Result<Self, self::error::ConversionError> {
13731        value.parse()
13732    }
13733}
13734#[doc = "`JsonRpcRequestForExperimentalReceipt`"]
13735#[doc = r""]
13736#[doc = r" <details><summary>JSON schema</summary>"]
13737#[doc = r""]
13738#[doc = r" ```json"]
13739#[doc = "{"]
13740#[doc = "  \"title\": \"JsonRpcRequest_for_EXPERIMENTAL_receipt\","]
13741#[doc = "  \"type\": \"object\","]
13742#[doc = "  \"required\": ["]
13743#[doc = "    \"id\","]
13744#[doc = "    \"jsonrpc\","]
13745#[doc = "    \"method\","]
13746#[doc = "    \"params\""]
13747#[doc = "  ],"]
13748#[doc = "  \"properties\": {"]
13749#[doc = "    \"id\": {"]
13750#[doc = "      \"type\": \"string\""]
13751#[doc = "    },"]
13752#[doc = "    \"jsonrpc\": {"]
13753#[doc = "      \"type\": \"string\""]
13754#[doc = "    },"]
13755#[doc = "    \"method\": {"]
13756#[doc = "      \"type\": \"string\","]
13757#[doc = "      \"enum\": ["]
13758#[doc = "        \"EXPERIMENTAL_receipt\""]
13759#[doc = "      ]"]
13760#[doc = "    },"]
13761#[doc = "    \"params\": {"]
13762#[doc = "      \"$ref\": \"#/components/schemas/RpcReceiptRequest\""]
13763#[doc = "    }"]
13764#[doc = "  }"]
13765#[doc = "}"]
13766#[doc = r" ```"]
13767#[doc = r" </details>"]
13768#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
13769pub struct JsonRpcRequestForExperimentalReceipt {
13770    pub id: ::std::string::String,
13771    pub jsonrpc: ::std::string::String,
13772    pub method: JsonRpcRequestForExperimentalReceiptMethod,
13773    pub params: RpcReceiptRequest,
13774}
13775impl ::std::convert::From<&JsonRpcRequestForExperimentalReceipt>
13776    for JsonRpcRequestForExperimentalReceipt
13777{
13778    fn from(value: &JsonRpcRequestForExperimentalReceipt) -> Self {
13779        value.clone()
13780    }
13781}
13782#[doc = "`JsonRpcRequestForExperimentalReceiptMethod`"]
13783#[doc = r""]
13784#[doc = r" <details><summary>JSON schema</summary>"]
13785#[doc = r""]
13786#[doc = r" ```json"]
13787#[doc = "{"]
13788#[doc = "  \"type\": \"string\","]
13789#[doc = "  \"enum\": ["]
13790#[doc = "    \"EXPERIMENTAL_receipt\""]
13791#[doc = "  ]"]
13792#[doc = "}"]
13793#[doc = r" ```"]
13794#[doc = r" </details>"]
13795#[derive(
13796    :: serde :: Deserialize,
13797    :: serde :: Serialize,
13798    Clone,
13799    Copy,
13800    Debug,
13801    Eq,
13802    Hash,
13803    Ord,
13804    PartialEq,
13805    PartialOrd,
13806)]
13807pub enum JsonRpcRequestForExperimentalReceiptMethod {
13808    #[serde(rename = "EXPERIMENTAL_receipt")]
13809    ExperimentalReceipt,
13810}
13811impl ::std::convert::From<&Self> for JsonRpcRequestForExperimentalReceiptMethod {
13812    fn from(value: &JsonRpcRequestForExperimentalReceiptMethod) -> Self {
13813        value.clone()
13814    }
13815}
13816impl ::std::fmt::Display for JsonRpcRequestForExperimentalReceiptMethod {
13817    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
13818        match *self {
13819            Self::ExperimentalReceipt => f.write_str("EXPERIMENTAL_receipt"),
13820        }
13821    }
13822}
13823impl ::std::str::FromStr for JsonRpcRequestForExperimentalReceiptMethod {
13824    type Err = self::error::ConversionError;
13825    fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
13826        match value {
13827            "EXPERIMENTAL_receipt" => Ok(Self::ExperimentalReceipt),
13828            _ => Err("invalid value".into()),
13829        }
13830    }
13831}
13832impl ::std::convert::TryFrom<&str> for JsonRpcRequestForExperimentalReceiptMethod {
13833    type Error = self::error::ConversionError;
13834    fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
13835        value.parse()
13836    }
13837}
13838impl ::std::convert::TryFrom<&::std::string::String>
13839    for JsonRpcRequestForExperimentalReceiptMethod
13840{
13841    type Error = self::error::ConversionError;
13842    fn try_from(
13843        value: &::std::string::String,
13844    ) -> ::std::result::Result<Self, self::error::ConversionError> {
13845        value.parse()
13846    }
13847}
13848impl ::std::convert::TryFrom<::std::string::String> for JsonRpcRequestForExperimentalReceiptMethod {
13849    type Error = self::error::ConversionError;
13850    fn try_from(
13851        value: ::std::string::String,
13852    ) -> ::std::result::Result<Self, self::error::ConversionError> {
13853        value.parse()
13854    }
13855}
13856#[doc = "`JsonRpcRequestForExperimentalSplitStorageInfo`"]
13857#[doc = r""]
13858#[doc = r" <details><summary>JSON schema</summary>"]
13859#[doc = r""]
13860#[doc = r" ```json"]
13861#[doc = "{"]
13862#[doc = "  \"title\": \"JsonRpcRequest_for_EXPERIMENTAL_split_storage_info\","]
13863#[doc = "  \"type\": \"object\","]
13864#[doc = "  \"required\": ["]
13865#[doc = "    \"id\","]
13866#[doc = "    \"jsonrpc\","]
13867#[doc = "    \"method\","]
13868#[doc = "    \"params\""]
13869#[doc = "  ],"]
13870#[doc = "  \"properties\": {"]
13871#[doc = "    \"id\": {"]
13872#[doc = "      \"type\": \"string\""]
13873#[doc = "    },"]
13874#[doc = "    \"jsonrpc\": {"]
13875#[doc = "      \"type\": \"string\""]
13876#[doc = "    },"]
13877#[doc = "    \"method\": {"]
13878#[doc = "      \"type\": \"string\","]
13879#[doc = "      \"enum\": ["]
13880#[doc = "        \"EXPERIMENTAL_split_storage_info\""]
13881#[doc = "      ]"]
13882#[doc = "    },"]
13883#[doc = "    \"params\": {"]
13884#[doc = "      \"$ref\": \"#/components/schemas/RpcSplitStorageInfoRequest\""]
13885#[doc = "    }"]
13886#[doc = "  }"]
13887#[doc = "}"]
13888#[doc = r" ```"]
13889#[doc = r" </details>"]
13890#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
13891pub struct JsonRpcRequestForExperimentalSplitStorageInfo {
13892    pub id: ::std::string::String,
13893    pub jsonrpc: ::std::string::String,
13894    pub method: JsonRpcRequestForExperimentalSplitStorageInfoMethod,
13895    pub params: RpcSplitStorageInfoRequest,
13896}
13897impl ::std::convert::From<&JsonRpcRequestForExperimentalSplitStorageInfo>
13898    for JsonRpcRequestForExperimentalSplitStorageInfo
13899{
13900    fn from(value: &JsonRpcRequestForExperimentalSplitStorageInfo) -> Self {
13901        value.clone()
13902    }
13903}
13904#[doc = "`JsonRpcRequestForExperimentalSplitStorageInfoMethod`"]
13905#[doc = r""]
13906#[doc = r" <details><summary>JSON schema</summary>"]
13907#[doc = r""]
13908#[doc = r" ```json"]
13909#[doc = "{"]
13910#[doc = "  \"type\": \"string\","]
13911#[doc = "  \"enum\": ["]
13912#[doc = "    \"EXPERIMENTAL_split_storage_info\""]
13913#[doc = "  ]"]
13914#[doc = "}"]
13915#[doc = r" ```"]
13916#[doc = r" </details>"]
13917#[derive(
13918    :: serde :: Deserialize,
13919    :: serde :: Serialize,
13920    Clone,
13921    Copy,
13922    Debug,
13923    Eq,
13924    Hash,
13925    Ord,
13926    PartialEq,
13927    PartialOrd,
13928)]
13929pub enum JsonRpcRequestForExperimentalSplitStorageInfoMethod {
13930    #[serde(rename = "EXPERIMENTAL_split_storage_info")]
13931    ExperimentalSplitStorageInfo,
13932}
13933impl ::std::convert::From<&Self> for JsonRpcRequestForExperimentalSplitStorageInfoMethod {
13934    fn from(value: &JsonRpcRequestForExperimentalSplitStorageInfoMethod) -> Self {
13935        value.clone()
13936    }
13937}
13938impl ::std::fmt::Display for JsonRpcRequestForExperimentalSplitStorageInfoMethod {
13939    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
13940        match *self {
13941            Self::ExperimentalSplitStorageInfo => f.write_str("EXPERIMENTAL_split_storage_info"),
13942        }
13943    }
13944}
13945impl ::std::str::FromStr for JsonRpcRequestForExperimentalSplitStorageInfoMethod {
13946    type Err = self::error::ConversionError;
13947    fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
13948        match value {
13949            "EXPERIMENTAL_split_storage_info" => Ok(Self::ExperimentalSplitStorageInfo),
13950            _ => Err("invalid value".into()),
13951        }
13952    }
13953}
13954impl ::std::convert::TryFrom<&str> for JsonRpcRequestForExperimentalSplitStorageInfoMethod {
13955    type Error = self::error::ConversionError;
13956    fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
13957        value.parse()
13958    }
13959}
13960impl ::std::convert::TryFrom<&::std::string::String>
13961    for JsonRpcRequestForExperimentalSplitStorageInfoMethod
13962{
13963    type Error = self::error::ConversionError;
13964    fn try_from(
13965        value: &::std::string::String,
13966    ) -> ::std::result::Result<Self, self::error::ConversionError> {
13967        value.parse()
13968    }
13969}
13970impl ::std::convert::TryFrom<::std::string::String>
13971    for JsonRpcRequestForExperimentalSplitStorageInfoMethod
13972{
13973    type Error = self::error::ConversionError;
13974    fn try_from(
13975        value: ::std::string::String,
13976    ) -> ::std::result::Result<Self, self::error::ConversionError> {
13977        value.parse()
13978    }
13979}
13980#[doc = "`JsonRpcRequestForExperimentalTxStatus`"]
13981#[doc = r""]
13982#[doc = r" <details><summary>JSON schema</summary>"]
13983#[doc = r""]
13984#[doc = r" ```json"]
13985#[doc = "{"]
13986#[doc = "  \"title\": \"JsonRpcRequest_for_EXPERIMENTAL_tx_status\","]
13987#[doc = "  \"type\": \"object\","]
13988#[doc = "  \"required\": ["]
13989#[doc = "    \"id\","]
13990#[doc = "    \"jsonrpc\","]
13991#[doc = "    \"method\","]
13992#[doc = "    \"params\""]
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 = "    \"method\": {"]
14002#[doc = "      \"type\": \"string\","]
14003#[doc = "      \"enum\": ["]
14004#[doc = "        \"EXPERIMENTAL_tx_status\""]
14005#[doc = "      ]"]
14006#[doc = "    },"]
14007#[doc = "    \"params\": {"]
14008#[doc = "      \"$ref\": \"#/components/schemas/RpcTransactionStatusRequest\""]
14009#[doc = "    }"]
14010#[doc = "  }"]
14011#[doc = "}"]
14012#[doc = r" ```"]
14013#[doc = r" </details>"]
14014#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
14015pub struct JsonRpcRequestForExperimentalTxStatus {
14016    pub id: ::std::string::String,
14017    pub jsonrpc: ::std::string::String,
14018    pub method: JsonRpcRequestForExperimentalTxStatusMethod,
14019    pub params: RpcTransactionStatusRequest,
14020}
14021impl ::std::convert::From<&JsonRpcRequestForExperimentalTxStatus>
14022    for JsonRpcRequestForExperimentalTxStatus
14023{
14024    fn from(value: &JsonRpcRequestForExperimentalTxStatus) -> Self {
14025        value.clone()
14026    }
14027}
14028#[doc = "`JsonRpcRequestForExperimentalTxStatusMethod`"]
14029#[doc = r""]
14030#[doc = r" <details><summary>JSON schema</summary>"]
14031#[doc = r""]
14032#[doc = r" ```json"]
14033#[doc = "{"]
14034#[doc = "  \"type\": \"string\","]
14035#[doc = "  \"enum\": ["]
14036#[doc = "    \"EXPERIMENTAL_tx_status\""]
14037#[doc = "  ]"]
14038#[doc = "}"]
14039#[doc = r" ```"]
14040#[doc = r" </details>"]
14041#[derive(
14042    :: serde :: Deserialize,
14043    :: serde :: Serialize,
14044    Clone,
14045    Copy,
14046    Debug,
14047    Eq,
14048    Hash,
14049    Ord,
14050    PartialEq,
14051    PartialOrd,
14052)]
14053pub enum JsonRpcRequestForExperimentalTxStatusMethod {
14054    #[serde(rename = "EXPERIMENTAL_tx_status")]
14055    ExperimentalTxStatus,
14056}
14057impl ::std::convert::From<&Self> for JsonRpcRequestForExperimentalTxStatusMethod {
14058    fn from(value: &JsonRpcRequestForExperimentalTxStatusMethod) -> Self {
14059        value.clone()
14060    }
14061}
14062impl ::std::fmt::Display for JsonRpcRequestForExperimentalTxStatusMethod {
14063    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
14064        match *self {
14065            Self::ExperimentalTxStatus => f.write_str("EXPERIMENTAL_tx_status"),
14066        }
14067    }
14068}
14069impl ::std::str::FromStr for JsonRpcRequestForExperimentalTxStatusMethod {
14070    type Err = self::error::ConversionError;
14071    fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
14072        match value {
14073            "EXPERIMENTAL_tx_status" => Ok(Self::ExperimentalTxStatus),
14074            _ => Err("invalid value".into()),
14075        }
14076    }
14077}
14078impl ::std::convert::TryFrom<&str> for JsonRpcRequestForExperimentalTxStatusMethod {
14079    type Error = self::error::ConversionError;
14080    fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
14081        value.parse()
14082    }
14083}
14084impl ::std::convert::TryFrom<&::std::string::String>
14085    for JsonRpcRequestForExperimentalTxStatusMethod
14086{
14087    type Error = self::error::ConversionError;
14088    fn try_from(
14089        value: &::std::string::String,
14090    ) -> ::std::result::Result<Self, self::error::ConversionError> {
14091        value.parse()
14092    }
14093}
14094impl ::std::convert::TryFrom<::std::string::String>
14095    for JsonRpcRequestForExperimentalTxStatusMethod
14096{
14097    type Error = self::error::ConversionError;
14098    fn try_from(
14099        value: ::std::string::String,
14100    ) -> ::std::result::Result<Self, self::error::ConversionError> {
14101        value.parse()
14102    }
14103}
14104#[doc = "`JsonRpcRequestForExperimentalValidatorsOrdered`"]
14105#[doc = r""]
14106#[doc = r" <details><summary>JSON schema</summary>"]
14107#[doc = r""]
14108#[doc = r" ```json"]
14109#[doc = "{"]
14110#[doc = "  \"title\": \"JsonRpcRequest_for_EXPERIMENTAL_validators_ordered\","]
14111#[doc = "  \"type\": \"object\","]
14112#[doc = "  \"required\": ["]
14113#[doc = "    \"id\","]
14114#[doc = "    \"jsonrpc\","]
14115#[doc = "    \"method\","]
14116#[doc = "    \"params\""]
14117#[doc = "  ],"]
14118#[doc = "  \"properties\": {"]
14119#[doc = "    \"id\": {"]
14120#[doc = "      \"type\": \"string\""]
14121#[doc = "    },"]
14122#[doc = "    \"jsonrpc\": {"]
14123#[doc = "      \"type\": \"string\""]
14124#[doc = "    },"]
14125#[doc = "    \"method\": {"]
14126#[doc = "      \"type\": \"string\","]
14127#[doc = "      \"enum\": ["]
14128#[doc = "        \"EXPERIMENTAL_validators_ordered\""]
14129#[doc = "      ]"]
14130#[doc = "    },"]
14131#[doc = "    \"params\": {"]
14132#[doc = "      \"$ref\": \"#/components/schemas/RpcValidatorsOrderedRequest\""]
14133#[doc = "    }"]
14134#[doc = "  }"]
14135#[doc = "}"]
14136#[doc = r" ```"]
14137#[doc = r" </details>"]
14138#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
14139pub struct JsonRpcRequestForExperimentalValidatorsOrdered {
14140    pub id: ::std::string::String,
14141    pub jsonrpc: ::std::string::String,
14142    pub method: JsonRpcRequestForExperimentalValidatorsOrderedMethod,
14143    pub params: RpcValidatorsOrderedRequest,
14144}
14145impl ::std::convert::From<&JsonRpcRequestForExperimentalValidatorsOrdered>
14146    for JsonRpcRequestForExperimentalValidatorsOrdered
14147{
14148    fn from(value: &JsonRpcRequestForExperimentalValidatorsOrdered) -> Self {
14149        value.clone()
14150    }
14151}
14152#[doc = "`JsonRpcRequestForExperimentalValidatorsOrderedMethod`"]
14153#[doc = r""]
14154#[doc = r" <details><summary>JSON schema</summary>"]
14155#[doc = r""]
14156#[doc = r" ```json"]
14157#[doc = "{"]
14158#[doc = "  \"type\": \"string\","]
14159#[doc = "  \"enum\": ["]
14160#[doc = "    \"EXPERIMENTAL_validators_ordered\""]
14161#[doc = "  ]"]
14162#[doc = "}"]
14163#[doc = r" ```"]
14164#[doc = r" </details>"]
14165#[derive(
14166    :: serde :: Deserialize,
14167    :: serde :: Serialize,
14168    Clone,
14169    Copy,
14170    Debug,
14171    Eq,
14172    Hash,
14173    Ord,
14174    PartialEq,
14175    PartialOrd,
14176)]
14177pub enum JsonRpcRequestForExperimentalValidatorsOrderedMethod {
14178    #[serde(rename = "EXPERIMENTAL_validators_ordered")]
14179    ExperimentalValidatorsOrdered,
14180}
14181impl ::std::convert::From<&Self> for JsonRpcRequestForExperimentalValidatorsOrderedMethod {
14182    fn from(value: &JsonRpcRequestForExperimentalValidatorsOrderedMethod) -> Self {
14183        value.clone()
14184    }
14185}
14186impl ::std::fmt::Display for JsonRpcRequestForExperimentalValidatorsOrderedMethod {
14187    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
14188        match *self {
14189            Self::ExperimentalValidatorsOrdered => f.write_str("EXPERIMENTAL_validators_ordered"),
14190        }
14191    }
14192}
14193impl ::std::str::FromStr for JsonRpcRequestForExperimentalValidatorsOrderedMethod {
14194    type Err = self::error::ConversionError;
14195    fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
14196        match value {
14197            "EXPERIMENTAL_validators_ordered" => Ok(Self::ExperimentalValidatorsOrdered),
14198            _ => Err("invalid value".into()),
14199        }
14200    }
14201}
14202impl ::std::convert::TryFrom<&str> for JsonRpcRequestForExperimentalValidatorsOrderedMethod {
14203    type Error = self::error::ConversionError;
14204    fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
14205        value.parse()
14206    }
14207}
14208impl ::std::convert::TryFrom<&::std::string::String>
14209    for JsonRpcRequestForExperimentalValidatorsOrderedMethod
14210{
14211    type Error = self::error::ConversionError;
14212    fn try_from(
14213        value: &::std::string::String,
14214    ) -> ::std::result::Result<Self, self::error::ConversionError> {
14215        value.parse()
14216    }
14217}
14218impl ::std::convert::TryFrom<::std::string::String>
14219    for JsonRpcRequestForExperimentalValidatorsOrderedMethod
14220{
14221    type Error = self::error::ConversionError;
14222    fn try_from(
14223        value: ::std::string::String,
14224    ) -> ::std::result::Result<Self, self::error::ConversionError> {
14225        value.parse()
14226    }
14227}
14228#[doc = "`JsonRpcRequestForGasPrice`"]
14229#[doc = r""]
14230#[doc = r" <details><summary>JSON schema</summary>"]
14231#[doc = r""]
14232#[doc = r" ```json"]
14233#[doc = "{"]
14234#[doc = "  \"title\": \"JsonRpcRequest_for_gas_price\","]
14235#[doc = "  \"type\": \"object\","]
14236#[doc = "  \"required\": ["]
14237#[doc = "    \"id\","]
14238#[doc = "    \"jsonrpc\","]
14239#[doc = "    \"method\","]
14240#[doc = "    \"params\""]
14241#[doc = "  ],"]
14242#[doc = "  \"properties\": {"]
14243#[doc = "    \"id\": {"]
14244#[doc = "      \"type\": \"string\""]
14245#[doc = "    },"]
14246#[doc = "    \"jsonrpc\": {"]
14247#[doc = "      \"type\": \"string\""]
14248#[doc = "    },"]
14249#[doc = "    \"method\": {"]
14250#[doc = "      \"type\": \"string\","]
14251#[doc = "      \"enum\": ["]
14252#[doc = "        \"gas_price\""]
14253#[doc = "      ]"]
14254#[doc = "    },"]
14255#[doc = "    \"params\": {"]
14256#[doc = "      \"$ref\": \"#/components/schemas/RpcGasPriceRequest\""]
14257#[doc = "    }"]
14258#[doc = "  }"]
14259#[doc = "}"]
14260#[doc = r" ```"]
14261#[doc = r" </details>"]
14262#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
14263pub struct JsonRpcRequestForGasPrice {
14264    pub id: ::std::string::String,
14265    pub jsonrpc: ::std::string::String,
14266    pub method: JsonRpcRequestForGasPriceMethod,
14267    pub params: RpcGasPriceRequest,
14268}
14269impl ::std::convert::From<&JsonRpcRequestForGasPrice> for JsonRpcRequestForGasPrice {
14270    fn from(value: &JsonRpcRequestForGasPrice) -> Self {
14271        value.clone()
14272    }
14273}
14274#[doc = "`JsonRpcRequestForGasPriceMethod`"]
14275#[doc = r""]
14276#[doc = r" <details><summary>JSON schema</summary>"]
14277#[doc = r""]
14278#[doc = r" ```json"]
14279#[doc = "{"]
14280#[doc = "  \"type\": \"string\","]
14281#[doc = "  \"enum\": ["]
14282#[doc = "    \"gas_price\""]
14283#[doc = "  ]"]
14284#[doc = "}"]
14285#[doc = r" ```"]
14286#[doc = r" </details>"]
14287#[derive(
14288    :: serde :: Deserialize,
14289    :: serde :: Serialize,
14290    Clone,
14291    Copy,
14292    Debug,
14293    Eq,
14294    Hash,
14295    Ord,
14296    PartialEq,
14297    PartialOrd,
14298)]
14299pub enum JsonRpcRequestForGasPriceMethod {
14300    #[serde(rename = "gas_price")]
14301    GasPrice,
14302}
14303impl ::std::convert::From<&Self> for JsonRpcRequestForGasPriceMethod {
14304    fn from(value: &JsonRpcRequestForGasPriceMethod) -> Self {
14305        value.clone()
14306    }
14307}
14308impl ::std::fmt::Display for JsonRpcRequestForGasPriceMethod {
14309    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
14310        match *self {
14311            Self::GasPrice => f.write_str("gas_price"),
14312        }
14313    }
14314}
14315impl ::std::str::FromStr for JsonRpcRequestForGasPriceMethod {
14316    type Err = self::error::ConversionError;
14317    fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
14318        match value {
14319            "gas_price" => Ok(Self::GasPrice),
14320            _ => Err("invalid value".into()),
14321        }
14322    }
14323}
14324impl ::std::convert::TryFrom<&str> for JsonRpcRequestForGasPriceMethod {
14325    type Error = self::error::ConversionError;
14326    fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
14327        value.parse()
14328    }
14329}
14330impl ::std::convert::TryFrom<&::std::string::String> for JsonRpcRequestForGasPriceMethod {
14331    type Error = self::error::ConversionError;
14332    fn try_from(
14333        value: &::std::string::String,
14334    ) -> ::std::result::Result<Self, self::error::ConversionError> {
14335        value.parse()
14336    }
14337}
14338impl ::std::convert::TryFrom<::std::string::String> for JsonRpcRequestForGasPriceMethod {
14339    type Error = self::error::ConversionError;
14340    fn try_from(
14341        value: ::std::string::String,
14342    ) -> ::std::result::Result<Self, self::error::ConversionError> {
14343        value.parse()
14344    }
14345}
14346#[doc = "`JsonRpcRequestForGenesisConfig`"]
14347#[doc = r""]
14348#[doc = r" <details><summary>JSON schema</summary>"]
14349#[doc = r""]
14350#[doc = r" ```json"]
14351#[doc = "{"]
14352#[doc = "  \"title\": \"JsonRpcRequest_for_genesis_config\","]
14353#[doc = "  \"type\": \"object\","]
14354#[doc = "  \"required\": ["]
14355#[doc = "    \"id\","]
14356#[doc = "    \"jsonrpc\","]
14357#[doc = "    \"method\","]
14358#[doc = "    \"params\""]
14359#[doc = "  ],"]
14360#[doc = "  \"properties\": {"]
14361#[doc = "    \"id\": {"]
14362#[doc = "      \"type\": \"string\""]
14363#[doc = "    },"]
14364#[doc = "    \"jsonrpc\": {"]
14365#[doc = "      \"type\": \"string\""]
14366#[doc = "    },"]
14367#[doc = "    \"method\": {"]
14368#[doc = "      \"type\": \"string\","]
14369#[doc = "      \"enum\": ["]
14370#[doc = "        \"genesis_config\""]
14371#[doc = "      ]"]
14372#[doc = "    },"]
14373#[doc = "    \"params\": {"]
14374#[doc = "      \"$ref\": \"#/components/schemas/GenesisConfigRequest\""]
14375#[doc = "    }"]
14376#[doc = "  }"]
14377#[doc = "}"]
14378#[doc = r" ```"]
14379#[doc = r" </details>"]
14380#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
14381pub struct JsonRpcRequestForGenesisConfig {
14382    pub id: ::std::string::String,
14383    pub jsonrpc: ::std::string::String,
14384    pub method: JsonRpcRequestForGenesisConfigMethod,
14385    pub params: GenesisConfigRequest,
14386}
14387impl ::std::convert::From<&JsonRpcRequestForGenesisConfig> for JsonRpcRequestForGenesisConfig {
14388    fn from(value: &JsonRpcRequestForGenesisConfig) -> Self {
14389        value.clone()
14390    }
14391}
14392#[doc = "`JsonRpcRequestForGenesisConfigMethod`"]
14393#[doc = r""]
14394#[doc = r" <details><summary>JSON schema</summary>"]
14395#[doc = r""]
14396#[doc = r" ```json"]
14397#[doc = "{"]
14398#[doc = "  \"type\": \"string\","]
14399#[doc = "  \"enum\": ["]
14400#[doc = "    \"genesis_config\""]
14401#[doc = "  ]"]
14402#[doc = "}"]
14403#[doc = r" ```"]
14404#[doc = r" </details>"]
14405#[derive(
14406    :: serde :: Deserialize,
14407    :: serde :: Serialize,
14408    Clone,
14409    Copy,
14410    Debug,
14411    Eq,
14412    Hash,
14413    Ord,
14414    PartialEq,
14415    PartialOrd,
14416)]
14417pub enum JsonRpcRequestForGenesisConfigMethod {
14418    #[serde(rename = "genesis_config")]
14419    GenesisConfig,
14420}
14421impl ::std::convert::From<&Self> for JsonRpcRequestForGenesisConfigMethod {
14422    fn from(value: &JsonRpcRequestForGenesisConfigMethod) -> Self {
14423        value.clone()
14424    }
14425}
14426impl ::std::fmt::Display for JsonRpcRequestForGenesisConfigMethod {
14427    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
14428        match *self {
14429            Self::GenesisConfig => f.write_str("genesis_config"),
14430        }
14431    }
14432}
14433impl ::std::str::FromStr for JsonRpcRequestForGenesisConfigMethod {
14434    type Err = self::error::ConversionError;
14435    fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
14436        match value {
14437            "genesis_config" => Ok(Self::GenesisConfig),
14438            _ => Err("invalid value".into()),
14439        }
14440    }
14441}
14442impl ::std::convert::TryFrom<&str> for JsonRpcRequestForGenesisConfigMethod {
14443    type Error = self::error::ConversionError;
14444    fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
14445        value.parse()
14446    }
14447}
14448impl ::std::convert::TryFrom<&::std::string::String> for JsonRpcRequestForGenesisConfigMethod {
14449    type Error = self::error::ConversionError;
14450    fn try_from(
14451        value: &::std::string::String,
14452    ) -> ::std::result::Result<Self, self::error::ConversionError> {
14453        value.parse()
14454    }
14455}
14456impl ::std::convert::TryFrom<::std::string::String> for JsonRpcRequestForGenesisConfigMethod {
14457    type Error = self::error::ConversionError;
14458    fn try_from(
14459        value: ::std::string::String,
14460    ) -> ::std::result::Result<Self, self::error::ConversionError> {
14461        value.parse()
14462    }
14463}
14464#[doc = "`JsonRpcRequestForHealth`"]
14465#[doc = r""]
14466#[doc = r" <details><summary>JSON schema</summary>"]
14467#[doc = r""]
14468#[doc = r" ```json"]
14469#[doc = "{"]
14470#[doc = "  \"title\": \"JsonRpcRequest_for_health\","]
14471#[doc = "  \"type\": \"object\","]
14472#[doc = "  \"required\": ["]
14473#[doc = "    \"id\","]
14474#[doc = "    \"jsonrpc\","]
14475#[doc = "    \"method\","]
14476#[doc = "    \"params\""]
14477#[doc = "  ],"]
14478#[doc = "  \"properties\": {"]
14479#[doc = "    \"id\": {"]
14480#[doc = "      \"type\": \"string\""]
14481#[doc = "    },"]
14482#[doc = "    \"jsonrpc\": {"]
14483#[doc = "      \"type\": \"string\""]
14484#[doc = "    },"]
14485#[doc = "    \"method\": {"]
14486#[doc = "      \"type\": \"string\","]
14487#[doc = "      \"enum\": ["]
14488#[doc = "        \"health\""]
14489#[doc = "      ]"]
14490#[doc = "    },"]
14491#[doc = "    \"params\": {"]
14492#[doc = "      \"$ref\": \"#/components/schemas/RpcHealthRequest\""]
14493#[doc = "    }"]
14494#[doc = "  }"]
14495#[doc = "}"]
14496#[doc = r" ```"]
14497#[doc = r" </details>"]
14498#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
14499pub struct JsonRpcRequestForHealth {
14500    pub id: ::std::string::String,
14501    pub jsonrpc: ::std::string::String,
14502    pub method: JsonRpcRequestForHealthMethod,
14503    pub params: RpcHealthRequest,
14504}
14505impl ::std::convert::From<&JsonRpcRequestForHealth> for JsonRpcRequestForHealth {
14506    fn from(value: &JsonRpcRequestForHealth) -> Self {
14507        value.clone()
14508    }
14509}
14510#[doc = "`JsonRpcRequestForHealthMethod`"]
14511#[doc = r""]
14512#[doc = r" <details><summary>JSON schema</summary>"]
14513#[doc = r""]
14514#[doc = r" ```json"]
14515#[doc = "{"]
14516#[doc = "  \"type\": \"string\","]
14517#[doc = "  \"enum\": ["]
14518#[doc = "    \"health\""]
14519#[doc = "  ]"]
14520#[doc = "}"]
14521#[doc = r" ```"]
14522#[doc = r" </details>"]
14523#[derive(
14524    :: serde :: Deserialize,
14525    :: serde :: Serialize,
14526    Clone,
14527    Copy,
14528    Debug,
14529    Eq,
14530    Hash,
14531    Ord,
14532    PartialEq,
14533    PartialOrd,
14534)]
14535pub enum JsonRpcRequestForHealthMethod {
14536    #[serde(rename = "health")]
14537    Health,
14538}
14539impl ::std::convert::From<&Self> for JsonRpcRequestForHealthMethod {
14540    fn from(value: &JsonRpcRequestForHealthMethod) -> Self {
14541        value.clone()
14542    }
14543}
14544impl ::std::fmt::Display for JsonRpcRequestForHealthMethod {
14545    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
14546        match *self {
14547            Self::Health => f.write_str("health"),
14548        }
14549    }
14550}
14551impl ::std::str::FromStr for JsonRpcRequestForHealthMethod {
14552    type Err = self::error::ConversionError;
14553    fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
14554        match value {
14555            "health" => Ok(Self::Health),
14556            _ => Err("invalid value".into()),
14557        }
14558    }
14559}
14560impl ::std::convert::TryFrom<&str> for JsonRpcRequestForHealthMethod {
14561    type Error = self::error::ConversionError;
14562    fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
14563        value.parse()
14564    }
14565}
14566impl ::std::convert::TryFrom<&::std::string::String> for JsonRpcRequestForHealthMethod {
14567    type Error = self::error::ConversionError;
14568    fn try_from(
14569        value: &::std::string::String,
14570    ) -> ::std::result::Result<Self, self::error::ConversionError> {
14571        value.parse()
14572    }
14573}
14574impl ::std::convert::TryFrom<::std::string::String> for JsonRpcRequestForHealthMethod {
14575    type Error = self::error::ConversionError;
14576    fn try_from(
14577        value: ::std::string::String,
14578    ) -> ::std::result::Result<Self, self::error::ConversionError> {
14579        value.parse()
14580    }
14581}
14582#[doc = "`JsonRpcRequestForLightClientProof`"]
14583#[doc = r""]
14584#[doc = r" <details><summary>JSON schema</summary>"]
14585#[doc = r""]
14586#[doc = r" ```json"]
14587#[doc = "{"]
14588#[doc = "  \"title\": \"JsonRpcRequest_for_light_client_proof\","]
14589#[doc = "  \"type\": \"object\","]
14590#[doc = "  \"required\": ["]
14591#[doc = "    \"id\","]
14592#[doc = "    \"jsonrpc\","]
14593#[doc = "    \"method\","]
14594#[doc = "    \"params\""]
14595#[doc = "  ],"]
14596#[doc = "  \"properties\": {"]
14597#[doc = "    \"id\": {"]
14598#[doc = "      \"type\": \"string\""]
14599#[doc = "    },"]
14600#[doc = "    \"jsonrpc\": {"]
14601#[doc = "      \"type\": \"string\""]
14602#[doc = "    },"]
14603#[doc = "    \"method\": {"]
14604#[doc = "      \"type\": \"string\","]
14605#[doc = "      \"enum\": ["]
14606#[doc = "        \"light_client_proof\""]
14607#[doc = "      ]"]
14608#[doc = "    },"]
14609#[doc = "    \"params\": {"]
14610#[doc = "      \"$ref\": \"#/components/schemas/RpcLightClientExecutionProofRequest\""]
14611#[doc = "    }"]
14612#[doc = "  }"]
14613#[doc = "}"]
14614#[doc = r" ```"]
14615#[doc = r" </details>"]
14616#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
14617pub struct JsonRpcRequestForLightClientProof {
14618    pub id: ::std::string::String,
14619    pub jsonrpc: ::std::string::String,
14620    pub method: JsonRpcRequestForLightClientProofMethod,
14621    pub params: RpcLightClientExecutionProofRequest,
14622}
14623impl ::std::convert::From<&JsonRpcRequestForLightClientProof>
14624    for JsonRpcRequestForLightClientProof
14625{
14626    fn from(value: &JsonRpcRequestForLightClientProof) -> Self {
14627        value.clone()
14628    }
14629}
14630#[doc = "`JsonRpcRequestForLightClientProofMethod`"]
14631#[doc = r""]
14632#[doc = r" <details><summary>JSON schema</summary>"]
14633#[doc = r""]
14634#[doc = r" ```json"]
14635#[doc = "{"]
14636#[doc = "  \"type\": \"string\","]
14637#[doc = "  \"enum\": ["]
14638#[doc = "    \"light_client_proof\""]
14639#[doc = "  ]"]
14640#[doc = "}"]
14641#[doc = r" ```"]
14642#[doc = r" </details>"]
14643#[derive(
14644    :: serde :: Deserialize,
14645    :: serde :: Serialize,
14646    Clone,
14647    Copy,
14648    Debug,
14649    Eq,
14650    Hash,
14651    Ord,
14652    PartialEq,
14653    PartialOrd,
14654)]
14655pub enum JsonRpcRequestForLightClientProofMethod {
14656    #[serde(rename = "light_client_proof")]
14657    LightClientProof,
14658}
14659impl ::std::convert::From<&Self> for JsonRpcRequestForLightClientProofMethod {
14660    fn from(value: &JsonRpcRequestForLightClientProofMethod) -> Self {
14661        value.clone()
14662    }
14663}
14664impl ::std::fmt::Display for JsonRpcRequestForLightClientProofMethod {
14665    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
14666        match *self {
14667            Self::LightClientProof => f.write_str("light_client_proof"),
14668        }
14669    }
14670}
14671impl ::std::str::FromStr for JsonRpcRequestForLightClientProofMethod {
14672    type Err = self::error::ConversionError;
14673    fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
14674        match value {
14675            "light_client_proof" => Ok(Self::LightClientProof),
14676            _ => Err("invalid value".into()),
14677        }
14678    }
14679}
14680impl ::std::convert::TryFrom<&str> for JsonRpcRequestForLightClientProofMethod {
14681    type Error = self::error::ConversionError;
14682    fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
14683        value.parse()
14684    }
14685}
14686impl ::std::convert::TryFrom<&::std::string::String> for JsonRpcRequestForLightClientProofMethod {
14687    type Error = self::error::ConversionError;
14688    fn try_from(
14689        value: &::std::string::String,
14690    ) -> ::std::result::Result<Self, self::error::ConversionError> {
14691        value.parse()
14692    }
14693}
14694impl ::std::convert::TryFrom<::std::string::String> for JsonRpcRequestForLightClientProofMethod {
14695    type Error = self::error::ConversionError;
14696    fn try_from(
14697        value: ::std::string::String,
14698    ) -> ::std::result::Result<Self, self::error::ConversionError> {
14699        value.parse()
14700    }
14701}
14702#[doc = "`JsonRpcRequestForMaintenanceWindows`"]
14703#[doc = r""]
14704#[doc = r" <details><summary>JSON schema</summary>"]
14705#[doc = r""]
14706#[doc = r" ```json"]
14707#[doc = "{"]
14708#[doc = "  \"title\": \"JsonRpcRequest_for_maintenance_windows\","]
14709#[doc = "  \"type\": \"object\","]
14710#[doc = "  \"required\": ["]
14711#[doc = "    \"id\","]
14712#[doc = "    \"jsonrpc\","]
14713#[doc = "    \"method\","]
14714#[doc = "    \"params\""]
14715#[doc = "  ],"]
14716#[doc = "  \"properties\": {"]
14717#[doc = "    \"id\": {"]
14718#[doc = "      \"type\": \"string\""]
14719#[doc = "    },"]
14720#[doc = "    \"jsonrpc\": {"]
14721#[doc = "      \"type\": \"string\""]
14722#[doc = "    },"]
14723#[doc = "    \"method\": {"]
14724#[doc = "      \"type\": \"string\","]
14725#[doc = "      \"enum\": ["]
14726#[doc = "        \"maintenance_windows\""]
14727#[doc = "      ]"]
14728#[doc = "    },"]
14729#[doc = "    \"params\": {"]
14730#[doc = "      \"$ref\": \"#/components/schemas/RpcMaintenanceWindowsRequest\""]
14731#[doc = "    }"]
14732#[doc = "  }"]
14733#[doc = "}"]
14734#[doc = r" ```"]
14735#[doc = r" </details>"]
14736#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
14737pub struct JsonRpcRequestForMaintenanceWindows {
14738    pub id: ::std::string::String,
14739    pub jsonrpc: ::std::string::String,
14740    pub method: JsonRpcRequestForMaintenanceWindowsMethod,
14741    pub params: RpcMaintenanceWindowsRequest,
14742}
14743impl ::std::convert::From<&JsonRpcRequestForMaintenanceWindows>
14744    for JsonRpcRequestForMaintenanceWindows
14745{
14746    fn from(value: &JsonRpcRequestForMaintenanceWindows) -> Self {
14747        value.clone()
14748    }
14749}
14750#[doc = "`JsonRpcRequestForMaintenanceWindowsMethod`"]
14751#[doc = r""]
14752#[doc = r" <details><summary>JSON schema</summary>"]
14753#[doc = r""]
14754#[doc = r" ```json"]
14755#[doc = "{"]
14756#[doc = "  \"type\": \"string\","]
14757#[doc = "  \"enum\": ["]
14758#[doc = "    \"maintenance_windows\""]
14759#[doc = "  ]"]
14760#[doc = "}"]
14761#[doc = r" ```"]
14762#[doc = r" </details>"]
14763#[derive(
14764    :: serde :: Deserialize,
14765    :: serde :: Serialize,
14766    Clone,
14767    Copy,
14768    Debug,
14769    Eq,
14770    Hash,
14771    Ord,
14772    PartialEq,
14773    PartialOrd,
14774)]
14775pub enum JsonRpcRequestForMaintenanceWindowsMethod {
14776    #[serde(rename = "maintenance_windows")]
14777    MaintenanceWindows,
14778}
14779impl ::std::convert::From<&Self> for JsonRpcRequestForMaintenanceWindowsMethod {
14780    fn from(value: &JsonRpcRequestForMaintenanceWindowsMethod) -> Self {
14781        value.clone()
14782    }
14783}
14784impl ::std::fmt::Display for JsonRpcRequestForMaintenanceWindowsMethod {
14785    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
14786        match *self {
14787            Self::MaintenanceWindows => f.write_str("maintenance_windows"),
14788        }
14789    }
14790}
14791impl ::std::str::FromStr for JsonRpcRequestForMaintenanceWindowsMethod {
14792    type Err = self::error::ConversionError;
14793    fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
14794        match value {
14795            "maintenance_windows" => Ok(Self::MaintenanceWindows),
14796            _ => Err("invalid value".into()),
14797        }
14798    }
14799}
14800impl ::std::convert::TryFrom<&str> for JsonRpcRequestForMaintenanceWindowsMethod {
14801    type Error = self::error::ConversionError;
14802    fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
14803        value.parse()
14804    }
14805}
14806impl ::std::convert::TryFrom<&::std::string::String> for JsonRpcRequestForMaintenanceWindowsMethod {
14807    type Error = self::error::ConversionError;
14808    fn try_from(
14809        value: &::std::string::String,
14810    ) -> ::std::result::Result<Self, self::error::ConversionError> {
14811        value.parse()
14812    }
14813}
14814impl ::std::convert::TryFrom<::std::string::String> for JsonRpcRequestForMaintenanceWindowsMethod {
14815    type Error = self::error::ConversionError;
14816    fn try_from(
14817        value: ::std::string::String,
14818    ) -> ::std::result::Result<Self, self::error::ConversionError> {
14819        value.parse()
14820    }
14821}
14822#[doc = "`JsonRpcRequestForNetworkInfo`"]
14823#[doc = r""]
14824#[doc = r" <details><summary>JSON schema</summary>"]
14825#[doc = r""]
14826#[doc = r" ```json"]
14827#[doc = "{"]
14828#[doc = "  \"title\": \"JsonRpcRequest_for_network_info\","]
14829#[doc = "  \"type\": \"object\","]
14830#[doc = "  \"required\": ["]
14831#[doc = "    \"id\","]
14832#[doc = "    \"jsonrpc\","]
14833#[doc = "    \"method\","]
14834#[doc = "    \"params\""]
14835#[doc = "  ],"]
14836#[doc = "  \"properties\": {"]
14837#[doc = "    \"id\": {"]
14838#[doc = "      \"type\": \"string\""]
14839#[doc = "    },"]
14840#[doc = "    \"jsonrpc\": {"]
14841#[doc = "      \"type\": \"string\""]
14842#[doc = "    },"]
14843#[doc = "    \"method\": {"]
14844#[doc = "      \"type\": \"string\","]
14845#[doc = "      \"enum\": ["]
14846#[doc = "        \"network_info\""]
14847#[doc = "      ]"]
14848#[doc = "    },"]
14849#[doc = "    \"params\": {"]
14850#[doc = "      \"$ref\": \"#/components/schemas/RpcNetworkInfoRequest\""]
14851#[doc = "    }"]
14852#[doc = "  }"]
14853#[doc = "}"]
14854#[doc = r" ```"]
14855#[doc = r" </details>"]
14856#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
14857pub struct JsonRpcRequestForNetworkInfo {
14858    pub id: ::std::string::String,
14859    pub jsonrpc: ::std::string::String,
14860    pub method: JsonRpcRequestForNetworkInfoMethod,
14861    pub params: RpcNetworkInfoRequest,
14862}
14863impl ::std::convert::From<&JsonRpcRequestForNetworkInfo> for JsonRpcRequestForNetworkInfo {
14864    fn from(value: &JsonRpcRequestForNetworkInfo) -> Self {
14865        value.clone()
14866    }
14867}
14868#[doc = "`JsonRpcRequestForNetworkInfoMethod`"]
14869#[doc = r""]
14870#[doc = r" <details><summary>JSON schema</summary>"]
14871#[doc = r""]
14872#[doc = r" ```json"]
14873#[doc = "{"]
14874#[doc = "  \"type\": \"string\","]
14875#[doc = "  \"enum\": ["]
14876#[doc = "    \"network_info\""]
14877#[doc = "  ]"]
14878#[doc = "}"]
14879#[doc = r" ```"]
14880#[doc = r" </details>"]
14881#[derive(
14882    :: serde :: Deserialize,
14883    :: serde :: Serialize,
14884    Clone,
14885    Copy,
14886    Debug,
14887    Eq,
14888    Hash,
14889    Ord,
14890    PartialEq,
14891    PartialOrd,
14892)]
14893pub enum JsonRpcRequestForNetworkInfoMethod {
14894    #[serde(rename = "network_info")]
14895    NetworkInfo,
14896}
14897impl ::std::convert::From<&Self> for JsonRpcRequestForNetworkInfoMethod {
14898    fn from(value: &JsonRpcRequestForNetworkInfoMethod) -> Self {
14899        value.clone()
14900    }
14901}
14902impl ::std::fmt::Display for JsonRpcRequestForNetworkInfoMethod {
14903    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
14904        match *self {
14905            Self::NetworkInfo => f.write_str("network_info"),
14906        }
14907    }
14908}
14909impl ::std::str::FromStr for JsonRpcRequestForNetworkInfoMethod {
14910    type Err = self::error::ConversionError;
14911    fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
14912        match value {
14913            "network_info" => Ok(Self::NetworkInfo),
14914            _ => Err("invalid value".into()),
14915        }
14916    }
14917}
14918impl ::std::convert::TryFrom<&str> for JsonRpcRequestForNetworkInfoMethod {
14919    type Error = self::error::ConversionError;
14920    fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
14921        value.parse()
14922    }
14923}
14924impl ::std::convert::TryFrom<&::std::string::String> for JsonRpcRequestForNetworkInfoMethod {
14925    type Error = self::error::ConversionError;
14926    fn try_from(
14927        value: &::std::string::String,
14928    ) -> ::std::result::Result<Self, self::error::ConversionError> {
14929        value.parse()
14930    }
14931}
14932impl ::std::convert::TryFrom<::std::string::String> for JsonRpcRequestForNetworkInfoMethod {
14933    type Error = self::error::ConversionError;
14934    fn try_from(
14935        value: ::std::string::String,
14936    ) -> ::std::result::Result<Self, self::error::ConversionError> {
14937        value.parse()
14938    }
14939}
14940#[doc = "`JsonRpcRequestForNextLightClientBlock`"]
14941#[doc = r""]
14942#[doc = r" <details><summary>JSON schema</summary>"]
14943#[doc = r""]
14944#[doc = r" ```json"]
14945#[doc = "{"]
14946#[doc = "  \"title\": \"JsonRpcRequest_for_next_light_client_block\","]
14947#[doc = "  \"type\": \"object\","]
14948#[doc = "  \"required\": ["]
14949#[doc = "    \"id\","]
14950#[doc = "    \"jsonrpc\","]
14951#[doc = "    \"method\","]
14952#[doc = "    \"params\""]
14953#[doc = "  ],"]
14954#[doc = "  \"properties\": {"]
14955#[doc = "    \"id\": {"]
14956#[doc = "      \"type\": \"string\""]
14957#[doc = "    },"]
14958#[doc = "    \"jsonrpc\": {"]
14959#[doc = "      \"type\": \"string\""]
14960#[doc = "    },"]
14961#[doc = "    \"method\": {"]
14962#[doc = "      \"type\": \"string\","]
14963#[doc = "      \"enum\": ["]
14964#[doc = "        \"next_light_client_block\""]
14965#[doc = "      ]"]
14966#[doc = "    },"]
14967#[doc = "    \"params\": {"]
14968#[doc = "      \"$ref\": \"#/components/schemas/RpcLightClientNextBlockRequest\""]
14969#[doc = "    }"]
14970#[doc = "  }"]
14971#[doc = "}"]
14972#[doc = r" ```"]
14973#[doc = r" </details>"]
14974#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
14975pub struct JsonRpcRequestForNextLightClientBlock {
14976    pub id: ::std::string::String,
14977    pub jsonrpc: ::std::string::String,
14978    pub method: JsonRpcRequestForNextLightClientBlockMethod,
14979    pub params: RpcLightClientNextBlockRequest,
14980}
14981impl ::std::convert::From<&JsonRpcRequestForNextLightClientBlock>
14982    for JsonRpcRequestForNextLightClientBlock
14983{
14984    fn from(value: &JsonRpcRequestForNextLightClientBlock) -> Self {
14985        value.clone()
14986    }
14987}
14988#[doc = "`JsonRpcRequestForNextLightClientBlockMethod`"]
14989#[doc = r""]
14990#[doc = r" <details><summary>JSON schema</summary>"]
14991#[doc = r""]
14992#[doc = r" ```json"]
14993#[doc = "{"]
14994#[doc = "  \"type\": \"string\","]
14995#[doc = "  \"enum\": ["]
14996#[doc = "    \"next_light_client_block\""]
14997#[doc = "  ]"]
14998#[doc = "}"]
14999#[doc = r" ```"]
15000#[doc = r" </details>"]
15001#[derive(
15002    :: serde :: Deserialize,
15003    :: serde :: Serialize,
15004    Clone,
15005    Copy,
15006    Debug,
15007    Eq,
15008    Hash,
15009    Ord,
15010    PartialEq,
15011    PartialOrd,
15012)]
15013pub enum JsonRpcRequestForNextLightClientBlockMethod {
15014    #[serde(rename = "next_light_client_block")]
15015    NextLightClientBlock,
15016}
15017impl ::std::convert::From<&Self> for JsonRpcRequestForNextLightClientBlockMethod {
15018    fn from(value: &JsonRpcRequestForNextLightClientBlockMethod) -> Self {
15019        value.clone()
15020    }
15021}
15022impl ::std::fmt::Display for JsonRpcRequestForNextLightClientBlockMethod {
15023    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
15024        match *self {
15025            Self::NextLightClientBlock => f.write_str("next_light_client_block"),
15026        }
15027    }
15028}
15029impl ::std::str::FromStr for JsonRpcRequestForNextLightClientBlockMethod {
15030    type Err = self::error::ConversionError;
15031    fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
15032        match value {
15033            "next_light_client_block" => Ok(Self::NextLightClientBlock),
15034            _ => Err("invalid value".into()),
15035        }
15036    }
15037}
15038impl ::std::convert::TryFrom<&str> for JsonRpcRequestForNextLightClientBlockMethod {
15039    type Error = self::error::ConversionError;
15040    fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
15041        value.parse()
15042    }
15043}
15044impl ::std::convert::TryFrom<&::std::string::String>
15045    for JsonRpcRequestForNextLightClientBlockMethod
15046{
15047    type Error = self::error::ConversionError;
15048    fn try_from(
15049        value: &::std::string::String,
15050    ) -> ::std::result::Result<Self, self::error::ConversionError> {
15051        value.parse()
15052    }
15053}
15054impl ::std::convert::TryFrom<::std::string::String>
15055    for JsonRpcRequestForNextLightClientBlockMethod
15056{
15057    type Error = self::error::ConversionError;
15058    fn try_from(
15059        value: ::std::string::String,
15060    ) -> ::std::result::Result<Self, self::error::ConversionError> {
15061        value.parse()
15062    }
15063}
15064#[doc = "`JsonRpcRequestForQuery`"]
15065#[doc = r""]
15066#[doc = r" <details><summary>JSON schema</summary>"]
15067#[doc = r""]
15068#[doc = r" ```json"]
15069#[doc = "{"]
15070#[doc = "  \"title\": \"JsonRpcRequest_for_query\","]
15071#[doc = "  \"type\": \"object\","]
15072#[doc = "  \"required\": ["]
15073#[doc = "    \"id\","]
15074#[doc = "    \"jsonrpc\","]
15075#[doc = "    \"method\","]
15076#[doc = "    \"params\""]
15077#[doc = "  ],"]
15078#[doc = "  \"properties\": {"]
15079#[doc = "    \"id\": {"]
15080#[doc = "      \"type\": \"string\""]
15081#[doc = "    },"]
15082#[doc = "    \"jsonrpc\": {"]
15083#[doc = "      \"type\": \"string\""]
15084#[doc = "    },"]
15085#[doc = "    \"method\": {"]
15086#[doc = "      \"type\": \"string\","]
15087#[doc = "      \"enum\": ["]
15088#[doc = "        \"query\""]
15089#[doc = "      ]"]
15090#[doc = "    },"]
15091#[doc = "    \"params\": {"]
15092#[doc = "      \"$ref\": \"#/components/schemas/RpcQueryRequest\""]
15093#[doc = "    }"]
15094#[doc = "  }"]
15095#[doc = "}"]
15096#[doc = r" ```"]
15097#[doc = r" </details>"]
15098#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
15099pub struct JsonRpcRequestForQuery {
15100    pub id: ::std::string::String,
15101    pub jsonrpc: ::std::string::String,
15102    pub method: JsonRpcRequestForQueryMethod,
15103    pub params: RpcQueryRequest,
15104}
15105impl ::std::convert::From<&JsonRpcRequestForQuery> for JsonRpcRequestForQuery {
15106    fn from(value: &JsonRpcRequestForQuery) -> Self {
15107        value.clone()
15108    }
15109}
15110#[doc = "`JsonRpcRequestForQueryMethod`"]
15111#[doc = r""]
15112#[doc = r" <details><summary>JSON schema</summary>"]
15113#[doc = r""]
15114#[doc = r" ```json"]
15115#[doc = "{"]
15116#[doc = "  \"type\": \"string\","]
15117#[doc = "  \"enum\": ["]
15118#[doc = "    \"query\""]
15119#[doc = "  ]"]
15120#[doc = "}"]
15121#[doc = r" ```"]
15122#[doc = r" </details>"]
15123#[derive(
15124    :: serde :: Deserialize,
15125    :: serde :: Serialize,
15126    Clone,
15127    Copy,
15128    Debug,
15129    Eq,
15130    Hash,
15131    Ord,
15132    PartialEq,
15133    PartialOrd,
15134)]
15135pub enum JsonRpcRequestForQueryMethod {
15136    #[serde(rename = "query")]
15137    Query,
15138}
15139impl ::std::convert::From<&Self> for JsonRpcRequestForQueryMethod {
15140    fn from(value: &JsonRpcRequestForQueryMethod) -> Self {
15141        value.clone()
15142    }
15143}
15144impl ::std::fmt::Display for JsonRpcRequestForQueryMethod {
15145    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
15146        match *self {
15147            Self::Query => f.write_str("query"),
15148        }
15149    }
15150}
15151impl ::std::str::FromStr for JsonRpcRequestForQueryMethod {
15152    type Err = self::error::ConversionError;
15153    fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
15154        match value {
15155            "query" => Ok(Self::Query),
15156            _ => Err("invalid value".into()),
15157        }
15158    }
15159}
15160impl ::std::convert::TryFrom<&str> for JsonRpcRequestForQueryMethod {
15161    type Error = self::error::ConversionError;
15162    fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
15163        value.parse()
15164    }
15165}
15166impl ::std::convert::TryFrom<&::std::string::String> for JsonRpcRequestForQueryMethod {
15167    type Error = self::error::ConversionError;
15168    fn try_from(
15169        value: &::std::string::String,
15170    ) -> ::std::result::Result<Self, self::error::ConversionError> {
15171        value.parse()
15172    }
15173}
15174impl ::std::convert::TryFrom<::std::string::String> for JsonRpcRequestForQueryMethod {
15175    type Error = self::error::ConversionError;
15176    fn try_from(
15177        value: ::std::string::String,
15178    ) -> ::std::result::Result<Self, self::error::ConversionError> {
15179        value.parse()
15180    }
15181}
15182#[doc = "`JsonRpcRequestForSendTx`"]
15183#[doc = r""]
15184#[doc = r" <details><summary>JSON schema</summary>"]
15185#[doc = r""]
15186#[doc = r" ```json"]
15187#[doc = "{"]
15188#[doc = "  \"title\": \"JsonRpcRequest_for_send_tx\","]
15189#[doc = "  \"type\": \"object\","]
15190#[doc = "  \"required\": ["]
15191#[doc = "    \"id\","]
15192#[doc = "    \"jsonrpc\","]
15193#[doc = "    \"method\","]
15194#[doc = "    \"params\""]
15195#[doc = "  ],"]
15196#[doc = "  \"properties\": {"]
15197#[doc = "    \"id\": {"]
15198#[doc = "      \"type\": \"string\""]
15199#[doc = "    },"]
15200#[doc = "    \"jsonrpc\": {"]
15201#[doc = "      \"type\": \"string\""]
15202#[doc = "    },"]
15203#[doc = "    \"method\": {"]
15204#[doc = "      \"type\": \"string\","]
15205#[doc = "      \"enum\": ["]
15206#[doc = "        \"send_tx\""]
15207#[doc = "      ]"]
15208#[doc = "    },"]
15209#[doc = "    \"params\": {"]
15210#[doc = "      \"$ref\": \"#/components/schemas/RpcSendTransactionRequest\""]
15211#[doc = "    }"]
15212#[doc = "  }"]
15213#[doc = "}"]
15214#[doc = r" ```"]
15215#[doc = r" </details>"]
15216#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
15217pub struct JsonRpcRequestForSendTx {
15218    pub id: ::std::string::String,
15219    pub jsonrpc: ::std::string::String,
15220    pub method: JsonRpcRequestForSendTxMethod,
15221    pub params: RpcSendTransactionRequest,
15222}
15223impl ::std::convert::From<&JsonRpcRequestForSendTx> for JsonRpcRequestForSendTx {
15224    fn from(value: &JsonRpcRequestForSendTx) -> Self {
15225        value.clone()
15226    }
15227}
15228#[doc = "`JsonRpcRequestForSendTxMethod`"]
15229#[doc = r""]
15230#[doc = r" <details><summary>JSON schema</summary>"]
15231#[doc = r""]
15232#[doc = r" ```json"]
15233#[doc = "{"]
15234#[doc = "  \"type\": \"string\","]
15235#[doc = "  \"enum\": ["]
15236#[doc = "    \"send_tx\""]
15237#[doc = "  ]"]
15238#[doc = "}"]
15239#[doc = r" ```"]
15240#[doc = r" </details>"]
15241#[derive(
15242    :: serde :: Deserialize,
15243    :: serde :: Serialize,
15244    Clone,
15245    Copy,
15246    Debug,
15247    Eq,
15248    Hash,
15249    Ord,
15250    PartialEq,
15251    PartialOrd,
15252)]
15253pub enum JsonRpcRequestForSendTxMethod {
15254    #[serde(rename = "send_tx")]
15255    SendTx,
15256}
15257impl ::std::convert::From<&Self> for JsonRpcRequestForSendTxMethod {
15258    fn from(value: &JsonRpcRequestForSendTxMethod) -> Self {
15259        value.clone()
15260    }
15261}
15262impl ::std::fmt::Display for JsonRpcRequestForSendTxMethod {
15263    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
15264        match *self {
15265            Self::SendTx => f.write_str("send_tx"),
15266        }
15267    }
15268}
15269impl ::std::str::FromStr for JsonRpcRequestForSendTxMethod {
15270    type Err = self::error::ConversionError;
15271    fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
15272        match value {
15273            "send_tx" => Ok(Self::SendTx),
15274            _ => Err("invalid value".into()),
15275        }
15276    }
15277}
15278impl ::std::convert::TryFrom<&str> for JsonRpcRequestForSendTxMethod {
15279    type Error = self::error::ConversionError;
15280    fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
15281        value.parse()
15282    }
15283}
15284impl ::std::convert::TryFrom<&::std::string::String> for JsonRpcRequestForSendTxMethod {
15285    type Error = self::error::ConversionError;
15286    fn try_from(
15287        value: &::std::string::String,
15288    ) -> ::std::result::Result<Self, self::error::ConversionError> {
15289        value.parse()
15290    }
15291}
15292impl ::std::convert::TryFrom<::std::string::String> for JsonRpcRequestForSendTxMethod {
15293    type Error = self::error::ConversionError;
15294    fn try_from(
15295        value: ::std::string::String,
15296    ) -> ::std::result::Result<Self, self::error::ConversionError> {
15297        value.parse()
15298    }
15299}
15300#[doc = "`JsonRpcRequestForStatus`"]
15301#[doc = r""]
15302#[doc = r" <details><summary>JSON schema</summary>"]
15303#[doc = r""]
15304#[doc = r" ```json"]
15305#[doc = "{"]
15306#[doc = "  \"title\": \"JsonRpcRequest_for_status\","]
15307#[doc = "  \"type\": \"object\","]
15308#[doc = "  \"required\": ["]
15309#[doc = "    \"id\","]
15310#[doc = "    \"jsonrpc\","]
15311#[doc = "    \"method\","]
15312#[doc = "    \"params\""]
15313#[doc = "  ],"]
15314#[doc = "  \"properties\": {"]
15315#[doc = "    \"id\": {"]
15316#[doc = "      \"type\": \"string\""]
15317#[doc = "    },"]
15318#[doc = "    \"jsonrpc\": {"]
15319#[doc = "      \"type\": \"string\""]
15320#[doc = "    },"]
15321#[doc = "    \"method\": {"]
15322#[doc = "      \"type\": \"string\","]
15323#[doc = "      \"enum\": ["]
15324#[doc = "        \"status\""]
15325#[doc = "      ]"]
15326#[doc = "    },"]
15327#[doc = "    \"params\": {"]
15328#[doc = "      \"$ref\": \"#/components/schemas/RpcStatusRequest\""]
15329#[doc = "    }"]
15330#[doc = "  }"]
15331#[doc = "}"]
15332#[doc = r" ```"]
15333#[doc = r" </details>"]
15334#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
15335pub struct JsonRpcRequestForStatus {
15336    pub id: ::std::string::String,
15337    pub jsonrpc: ::std::string::String,
15338    pub method: JsonRpcRequestForStatusMethod,
15339    pub params: RpcStatusRequest,
15340}
15341impl ::std::convert::From<&JsonRpcRequestForStatus> for JsonRpcRequestForStatus {
15342    fn from(value: &JsonRpcRequestForStatus) -> Self {
15343        value.clone()
15344    }
15345}
15346#[doc = "`JsonRpcRequestForStatusMethod`"]
15347#[doc = r""]
15348#[doc = r" <details><summary>JSON schema</summary>"]
15349#[doc = r""]
15350#[doc = r" ```json"]
15351#[doc = "{"]
15352#[doc = "  \"type\": \"string\","]
15353#[doc = "  \"enum\": ["]
15354#[doc = "    \"status\""]
15355#[doc = "  ]"]
15356#[doc = "}"]
15357#[doc = r" ```"]
15358#[doc = r" </details>"]
15359#[derive(
15360    :: serde :: Deserialize,
15361    :: serde :: Serialize,
15362    Clone,
15363    Copy,
15364    Debug,
15365    Eq,
15366    Hash,
15367    Ord,
15368    PartialEq,
15369    PartialOrd,
15370)]
15371pub enum JsonRpcRequestForStatusMethod {
15372    #[serde(rename = "status")]
15373    Status,
15374}
15375impl ::std::convert::From<&Self> for JsonRpcRequestForStatusMethod {
15376    fn from(value: &JsonRpcRequestForStatusMethod) -> Self {
15377        value.clone()
15378    }
15379}
15380impl ::std::fmt::Display for JsonRpcRequestForStatusMethod {
15381    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
15382        match *self {
15383            Self::Status => f.write_str("status"),
15384        }
15385    }
15386}
15387impl ::std::str::FromStr for JsonRpcRequestForStatusMethod {
15388    type Err = self::error::ConversionError;
15389    fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
15390        match value {
15391            "status" => Ok(Self::Status),
15392            _ => Err("invalid value".into()),
15393        }
15394    }
15395}
15396impl ::std::convert::TryFrom<&str> for JsonRpcRequestForStatusMethod {
15397    type Error = self::error::ConversionError;
15398    fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
15399        value.parse()
15400    }
15401}
15402impl ::std::convert::TryFrom<&::std::string::String> for JsonRpcRequestForStatusMethod {
15403    type Error = self::error::ConversionError;
15404    fn try_from(
15405        value: &::std::string::String,
15406    ) -> ::std::result::Result<Self, self::error::ConversionError> {
15407        value.parse()
15408    }
15409}
15410impl ::std::convert::TryFrom<::std::string::String> for JsonRpcRequestForStatusMethod {
15411    type Error = self::error::ConversionError;
15412    fn try_from(
15413        value: ::std::string::String,
15414    ) -> ::std::result::Result<Self, self::error::ConversionError> {
15415        value.parse()
15416    }
15417}
15418#[doc = "`JsonRpcRequestForTx`"]
15419#[doc = r""]
15420#[doc = r" <details><summary>JSON schema</summary>"]
15421#[doc = r""]
15422#[doc = r" ```json"]
15423#[doc = "{"]
15424#[doc = "  \"title\": \"JsonRpcRequest_for_tx\","]
15425#[doc = "  \"type\": \"object\","]
15426#[doc = "  \"required\": ["]
15427#[doc = "    \"id\","]
15428#[doc = "    \"jsonrpc\","]
15429#[doc = "    \"method\","]
15430#[doc = "    \"params\""]
15431#[doc = "  ],"]
15432#[doc = "  \"properties\": {"]
15433#[doc = "    \"id\": {"]
15434#[doc = "      \"type\": \"string\""]
15435#[doc = "    },"]
15436#[doc = "    \"jsonrpc\": {"]
15437#[doc = "      \"type\": \"string\""]
15438#[doc = "    },"]
15439#[doc = "    \"method\": {"]
15440#[doc = "      \"type\": \"string\","]
15441#[doc = "      \"enum\": ["]
15442#[doc = "        \"tx\""]
15443#[doc = "      ]"]
15444#[doc = "    },"]
15445#[doc = "    \"params\": {"]
15446#[doc = "      \"$ref\": \"#/components/schemas/RpcTransactionStatusRequest\""]
15447#[doc = "    }"]
15448#[doc = "  }"]
15449#[doc = "}"]
15450#[doc = r" ```"]
15451#[doc = r" </details>"]
15452#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
15453pub struct JsonRpcRequestForTx {
15454    pub id: ::std::string::String,
15455    pub jsonrpc: ::std::string::String,
15456    pub method: JsonRpcRequestForTxMethod,
15457    pub params: RpcTransactionStatusRequest,
15458}
15459impl ::std::convert::From<&JsonRpcRequestForTx> for JsonRpcRequestForTx {
15460    fn from(value: &JsonRpcRequestForTx) -> Self {
15461        value.clone()
15462    }
15463}
15464#[doc = "`JsonRpcRequestForTxMethod`"]
15465#[doc = r""]
15466#[doc = r" <details><summary>JSON schema</summary>"]
15467#[doc = r""]
15468#[doc = r" ```json"]
15469#[doc = "{"]
15470#[doc = "  \"type\": \"string\","]
15471#[doc = "  \"enum\": ["]
15472#[doc = "    \"tx\""]
15473#[doc = "  ]"]
15474#[doc = "}"]
15475#[doc = r" ```"]
15476#[doc = r" </details>"]
15477#[derive(
15478    :: serde :: Deserialize,
15479    :: serde :: Serialize,
15480    Clone,
15481    Copy,
15482    Debug,
15483    Eq,
15484    Hash,
15485    Ord,
15486    PartialEq,
15487    PartialOrd,
15488)]
15489pub enum JsonRpcRequestForTxMethod {
15490    #[serde(rename = "tx")]
15491    Tx,
15492}
15493impl ::std::convert::From<&Self> for JsonRpcRequestForTxMethod {
15494    fn from(value: &JsonRpcRequestForTxMethod) -> Self {
15495        value.clone()
15496    }
15497}
15498impl ::std::fmt::Display for JsonRpcRequestForTxMethod {
15499    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
15500        match *self {
15501            Self::Tx => f.write_str("tx"),
15502        }
15503    }
15504}
15505impl ::std::str::FromStr for JsonRpcRequestForTxMethod {
15506    type Err = self::error::ConversionError;
15507    fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
15508        match value {
15509            "tx" => Ok(Self::Tx),
15510            _ => Err("invalid value".into()),
15511        }
15512    }
15513}
15514impl ::std::convert::TryFrom<&str> for JsonRpcRequestForTxMethod {
15515    type Error = self::error::ConversionError;
15516    fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
15517        value.parse()
15518    }
15519}
15520impl ::std::convert::TryFrom<&::std::string::String> for JsonRpcRequestForTxMethod {
15521    type Error = self::error::ConversionError;
15522    fn try_from(
15523        value: &::std::string::String,
15524    ) -> ::std::result::Result<Self, self::error::ConversionError> {
15525        value.parse()
15526    }
15527}
15528impl ::std::convert::TryFrom<::std::string::String> for JsonRpcRequestForTxMethod {
15529    type Error = self::error::ConversionError;
15530    fn try_from(
15531        value: ::std::string::String,
15532    ) -> ::std::result::Result<Self, self::error::ConversionError> {
15533        value.parse()
15534    }
15535}
15536#[doc = "`JsonRpcRequestForValidators`"]
15537#[doc = r""]
15538#[doc = r" <details><summary>JSON schema</summary>"]
15539#[doc = r""]
15540#[doc = r" ```json"]
15541#[doc = "{"]
15542#[doc = "  \"title\": \"JsonRpcRequest_for_validators\","]
15543#[doc = "  \"type\": \"object\","]
15544#[doc = "  \"required\": ["]
15545#[doc = "    \"id\","]
15546#[doc = "    \"jsonrpc\","]
15547#[doc = "    \"method\","]
15548#[doc = "    \"params\""]
15549#[doc = "  ],"]
15550#[doc = "  \"properties\": {"]
15551#[doc = "    \"id\": {"]
15552#[doc = "      \"type\": \"string\""]
15553#[doc = "    },"]
15554#[doc = "    \"jsonrpc\": {"]
15555#[doc = "      \"type\": \"string\""]
15556#[doc = "    },"]
15557#[doc = "    \"method\": {"]
15558#[doc = "      \"type\": \"string\","]
15559#[doc = "      \"enum\": ["]
15560#[doc = "        \"validators\""]
15561#[doc = "      ]"]
15562#[doc = "    },"]
15563#[doc = "    \"params\": {"]
15564#[doc = "      \"$ref\": \"#/components/schemas/RpcValidatorRequest\""]
15565#[doc = "    }"]
15566#[doc = "  }"]
15567#[doc = "}"]
15568#[doc = r" ```"]
15569#[doc = r" </details>"]
15570#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
15571pub struct JsonRpcRequestForValidators {
15572    pub id: ::std::string::String,
15573    pub jsonrpc: ::std::string::String,
15574    pub method: JsonRpcRequestForValidatorsMethod,
15575    pub params: RpcValidatorRequest,
15576}
15577impl ::std::convert::From<&JsonRpcRequestForValidators> for JsonRpcRequestForValidators {
15578    fn from(value: &JsonRpcRequestForValidators) -> Self {
15579        value.clone()
15580    }
15581}
15582#[doc = "`JsonRpcRequestForValidatorsMethod`"]
15583#[doc = r""]
15584#[doc = r" <details><summary>JSON schema</summary>"]
15585#[doc = r""]
15586#[doc = r" ```json"]
15587#[doc = "{"]
15588#[doc = "  \"type\": \"string\","]
15589#[doc = "  \"enum\": ["]
15590#[doc = "    \"validators\""]
15591#[doc = "  ]"]
15592#[doc = "}"]
15593#[doc = r" ```"]
15594#[doc = r" </details>"]
15595#[derive(
15596    :: serde :: Deserialize,
15597    :: serde :: Serialize,
15598    Clone,
15599    Copy,
15600    Debug,
15601    Eq,
15602    Hash,
15603    Ord,
15604    PartialEq,
15605    PartialOrd,
15606)]
15607pub enum JsonRpcRequestForValidatorsMethod {
15608    #[serde(rename = "validators")]
15609    Validators,
15610}
15611impl ::std::convert::From<&Self> for JsonRpcRequestForValidatorsMethod {
15612    fn from(value: &JsonRpcRequestForValidatorsMethod) -> Self {
15613        value.clone()
15614    }
15615}
15616impl ::std::fmt::Display for JsonRpcRequestForValidatorsMethod {
15617    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
15618        match *self {
15619            Self::Validators => f.write_str("validators"),
15620        }
15621    }
15622}
15623impl ::std::str::FromStr for JsonRpcRequestForValidatorsMethod {
15624    type Err = self::error::ConversionError;
15625    fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
15626        match value {
15627            "validators" => Ok(Self::Validators),
15628            _ => Err("invalid value".into()),
15629        }
15630    }
15631}
15632impl ::std::convert::TryFrom<&str> for JsonRpcRequestForValidatorsMethod {
15633    type Error = self::error::ConversionError;
15634    fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
15635        value.parse()
15636    }
15637}
15638impl ::std::convert::TryFrom<&::std::string::String> for JsonRpcRequestForValidatorsMethod {
15639    type Error = self::error::ConversionError;
15640    fn try_from(
15641        value: &::std::string::String,
15642    ) -> ::std::result::Result<Self, self::error::ConversionError> {
15643        value.parse()
15644    }
15645}
15646impl ::std::convert::TryFrom<::std::string::String> for JsonRpcRequestForValidatorsMethod {
15647    type Error = self::error::ConversionError;
15648    fn try_from(
15649        value: ::std::string::String,
15650    ) -> ::std::result::Result<Self, self::error::ConversionError> {
15651        value.parse()
15652    }
15653}
15654#[doc = "`JsonRpcResponseForArrayOfRangeOfUint64AndRpcMaintenanceWindowsError`"]
15655#[doc = r""]
15656#[doc = r" <details><summary>JSON schema</summary>"]
15657#[doc = r""]
15658#[doc = r" ```json"]
15659#[doc = "{"]
15660#[doc = "  \"title\": \"JsonRpcResponse_for_Array_of_Range_of_uint64_and_RpcMaintenanceWindowsError\","]
15661#[doc = "  \"type\": \"object\","]
15662#[doc = "  \"oneOf\": ["]
15663#[doc = "    {"]
15664#[doc = "      \"type\": \"object\","]
15665#[doc = "      \"required\": ["]
15666#[doc = "        \"result\""]
15667#[doc = "      ],"]
15668#[doc = "      \"properties\": {"]
15669#[doc = "        \"result\": {"]
15670#[doc = "          \"type\": \"array\","]
15671#[doc = "          \"items\": {"]
15672#[doc = "            \"$ref\": \"#/components/schemas/Range_of_uint64\""]
15673#[doc = "          }"]
15674#[doc = "        }"]
15675#[doc = "      }"]
15676#[doc = "    },"]
15677#[doc = "    {"]
15678#[doc = "      \"type\": \"object\","]
15679#[doc = "      \"required\": ["]
15680#[doc = "        \"error\""]
15681#[doc = "      ],"]
15682#[doc = "      \"properties\": {"]
15683#[doc = "        \"error\": {"]
15684#[doc = "          \"$ref\": \"#/components/schemas/ErrorWrapper_for_RpcMaintenanceWindowsError\""]
15685#[doc = "        }"]
15686#[doc = "      }"]
15687#[doc = "    }"]
15688#[doc = "  ],"]
15689#[doc = "  \"required\": ["]
15690#[doc = "    \"id\","]
15691#[doc = "    \"jsonrpc\""]
15692#[doc = "  ],"]
15693#[doc = "  \"properties\": {"]
15694#[doc = "    \"id\": {"]
15695#[doc = "      \"type\": \"string\""]
15696#[doc = "    },"]
15697#[doc = "    \"jsonrpc\": {"]
15698#[doc = "      \"type\": \"string\""]
15699#[doc = "    }"]
15700#[doc = "  }"]
15701#[doc = "}"]
15702#[doc = r" ```"]
15703#[doc = r" </details>"]
15704#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
15705#[serde(untagged)]
15706pub enum JsonRpcResponseForArrayOfRangeOfUint64AndRpcMaintenanceWindowsError {
15707    Variant0 {
15708        id: ::std::string::String,
15709        jsonrpc: ::std::string::String,
15710        result: ::std::vec::Vec<RangeOfUint64>,
15711    },
15712    Variant1 {
15713        error: ErrorWrapperForRpcMaintenanceWindowsError,
15714        id: ::std::string::String,
15715        jsonrpc: ::std::string::String,
15716    },
15717}
15718impl ::std::convert::From<&Self>
15719    for JsonRpcResponseForArrayOfRangeOfUint64AndRpcMaintenanceWindowsError
15720{
15721    fn from(value: &JsonRpcResponseForArrayOfRangeOfUint64AndRpcMaintenanceWindowsError) -> Self {
15722        value.clone()
15723    }
15724}
15725#[doc = "`JsonRpcResponseForArrayOfValidatorStakeViewAndRpcValidatorError`"]
15726#[doc = r""]
15727#[doc = r" <details><summary>JSON schema</summary>"]
15728#[doc = r""]
15729#[doc = r" ```json"]
15730#[doc = "{"]
15731#[doc = "  \"title\": \"JsonRpcResponse_for_Array_of_ValidatorStakeView_and_RpcValidatorError\","]
15732#[doc = "  \"type\": \"object\","]
15733#[doc = "  \"oneOf\": ["]
15734#[doc = "    {"]
15735#[doc = "      \"type\": \"object\","]
15736#[doc = "      \"required\": ["]
15737#[doc = "        \"result\""]
15738#[doc = "      ],"]
15739#[doc = "      \"properties\": {"]
15740#[doc = "        \"result\": {"]
15741#[doc = "          \"type\": \"array\","]
15742#[doc = "          \"items\": {"]
15743#[doc = "            \"$ref\": \"#/components/schemas/ValidatorStakeView\""]
15744#[doc = "          }"]
15745#[doc = "        }"]
15746#[doc = "      }"]
15747#[doc = "    },"]
15748#[doc = "    {"]
15749#[doc = "      \"type\": \"object\","]
15750#[doc = "      \"required\": ["]
15751#[doc = "        \"error\""]
15752#[doc = "      ],"]
15753#[doc = "      \"properties\": {"]
15754#[doc = "        \"error\": {"]
15755#[doc = "          \"$ref\": \"#/components/schemas/ErrorWrapper_for_RpcValidatorError\""]
15756#[doc = "        }"]
15757#[doc = "      }"]
15758#[doc = "    }"]
15759#[doc = "  ],"]
15760#[doc = "  \"required\": ["]
15761#[doc = "    \"id\","]
15762#[doc = "    \"jsonrpc\""]
15763#[doc = "  ],"]
15764#[doc = "  \"properties\": {"]
15765#[doc = "    \"id\": {"]
15766#[doc = "      \"type\": \"string\""]
15767#[doc = "    },"]
15768#[doc = "    \"jsonrpc\": {"]
15769#[doc = "      \"type\": \"string\""]
15770#[doc = "    }"]
15771#[doc = "  }"]
15772#[doc = "}"]
15773#[doc = r" ```"]
15774#[doc = r" </details>"]
15775#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
15776#[serde(untagged)]
15777pub enum JsonRpcResponseForArrayOfValidatorStakeViewAndRpcValidatorError {
15778    Variant0 {
15779        id: ::std::string::String,
15780        jsonrpc: ::std::string::String,
15781        result: ::std::vec::Vec<ValidatorStakeView>,
15782    },
15783    Variant1 {
15784        error: ErrorWrapperForRpcValidatorError,
15785        id: ::std::string::String,
15786        jsonrpc: ::std::string::String,
15787    },
15788}
15789impl ::std::convert::From<&Self>
15790    for JsonRpcResponseForArrayOfValidatorStakeViewAndRpcValidatorError
15791{
15792    fn from(value: &JsonRpcResponseForArrayOfValidatorStakeViewAndRpcValidatorError) -> Self {
15793        value.clone()
15794    }
15795}
15796#[doc = "`JsonRpcResponseForCryptoHashAndRpcTransactionError`"]
15797#[doc = r""]
15798#[doc = r" <details><summary>JSON schema</summary>"]
15799#[doc = r""]
15800#[doc = r" ```json"]
15801#[doc = "{"]
15802#[doc = "  \"title\": \"JsonRpcResponse_for_CryptoHash_and_RpcTransactionError\","]
15803#[doc = "  \"type\": \"object\","]
15804#[doc = "  \"oneOf\": ["]
15805#[doc = "    {"]
15806#[doc = "      \"type\": \"object\","]
15807#[doc = "      \"required\": ["]
15808#[doc = "        \"result\""]
15809#[doc = "      ],"]
15810#[doc = "      \"properties\": {"]
15811#[doc = "        \"result\": {"]
15812#[doc = "          \"$ref\": \"#/components/schemas/CryptoHash\""]
15813#[doc = "        }"]
15814#[doc = "      }"]
15815#[doc = "    },"]
15816#[doc = "    {"]
15817#[doc = "      \"type\": \"object\","]
15818#[doc = "      \"required\": ["]
15819#[doc = "        \"error\""]
15820#[doc = "      ],"]
15821#[doc = "      \"properties\": {"]
15822#[doc = "        \"error\": {"]
15823#[doc = "          \"$ref\": \"#/components/schemas/ErrorWrapper_for_RpcTransactionError\""]
15824#[doc = "        }"]
15825#[doc = "      }"]
15826#[doc = "    }"]
15827#[doc = "  ],"]
15828#[doc = "  \"required\": ["]
15829#[doc = "    \"id\","]
15830#[doc = "    \"jsonrpc\""]
15831#[doc = "  ],"]
15832#[doc = "  \"properties\": {"]
15833#[doc = "    \"id\": {"]
15834#[doc = "      \"type\": \"string\""]
15835#[doc = "    },"]
15836#[doc = "    \"jsonrpc\": {"]
15837#[doc = "      \"type\": \"string\""]
15838#[doc = "    }"]
15839#[doc = "  }"]
15840#[doc = "}"]
15841#[doc = r" ```"]
15842#[doc = r" </details>"]
15843#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
15844#[serde(untagged)]
15845pub enum JsonRpcResponseForCryptoHashAndRpcTransactionError {
15846    Variant0 {
15847        id: ::std::string::String,
15848        jsonrpc: ::std::string::String,
15849        result: CryptoHash,
15850    },
15851    Variant1 {
15852        error: ErrorWrapperForRpcTransactionError,
15853        id: ::std::string::String,
15854        jsonrpc: ::std::string::String,
15855    },
15856}
15857impl ::std::convert::From<&Self> for JsonRpcResponseForCryptoHashAndRpcTransactionError {
15858    fn from(value: &JsonRpcResponseForCryptoHashAndRpcTransactionError) -> Self {
15859        value.clone()
15860    }
15861}
15862#[doc = "`JsonRpcResponseForGenesisConfigAndGenesisConfigError`"]
15863#[doc = r""]
15864#[doc = r" <details><summary>JSON schema</summary>"]
15865#[doc = r""]
15866#[doc = r" ```json"]
15867#[doc = "{"]
15868#[doc = "  \"title\": \"JsonRpcResponse_for_GenesisConfig_and_GenesisConfigError\","]
15869#[doc = "  \"type\": \"object\","]
15870#[doc = "  \"oneOf\": ["]
15871#[doc = "    {"]
15872#[doc = "      \"type\": \"object\","]
15873#[doc = "      \"required\": ["]
15874#[doc = "        \"result\""]
15875#[doc = "      ],"]
15876#[doc = "      \"properties\": {"]
15877#[doc = "        \"result\": {"]
15878#[doc = "          \"$ref\": \"#/components/schemas/GenesisConfig\""]
15879#[doc = "        }"]
15880#[doc = "      }"]
15881#[doc = "    },"]
15882#[doc = "    {"]
15883#[doc = "      \"type\": \"object\","]
15884#[doc = "      \"required\": ["]
15885#[doc = "        \"error\""]
15886#[doc = "      ],"]
15887#[doc = "      \"properties\": {"]
15888#[doc = "        \"error\": {"]
15889#[doc = "          \"$ref\": \"#/components/schemas/ErrorWrapper_for_GenesisConfigError\""]
15890#[doc = "        }"]
15891#[doc = "      }"]
15892#[doc = "    }"]
15893#[doc = "  ],"]
15894#[doc = "  \"required\": ["]
15895#[doc = "    \"id\","]
15896#[doc = "    \"jsonrpc\""]
15897#[doc = "  ],"]
15898#[doc = "  \"properties\": {"]
15899#[doc = "    \"id\": {"]
15900#[doc = "      \"type\": \"string\""]
15901#[doc = "    },"]
15902#[doc = "    \"jsonrpc\": {"]
15903#[doc = "      \"type\": \"string\""]
15904#[doc = "    }"]
15905#[doc = "  }"]
15906#[doc = "}"]
15907#[doc = r" ```"]
15908#[doc = r" </details>"]
15909#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
15910#[serde(untagged)]
15911pub enum JsonRpcResponseForGenesisConfigAndGenesisConfigError {
15912    Variant0 {
15913        id: ::std::string::String,
15914        jsonrpc: ::std::string::String,
15915        result: GenesisConfig,
15916    },
15917    Variant1 {
15918        error: ErrorWrapperForGenesisConfigError,
15919        id: ::std::string::String,
15920        jsonrpc: ::std::string::String,
15921    },
15922}
15923impl ::std::convert::From<&Self> for JsonRpcResponseForGenesisConfigAndGenesisConfigError {
15924    fn from(value: &JsonRpcResponseForGenesisConfigAndGenesisConfigError) -> Self {
15925        value.clone()
15926    }
15927}
15928#[doc = "`JsonRpcResponseForNullableRpcHealthResponseAndRpcStatusError`"]
15929#[doc = r""]
15930#[doc = r" <details><summary>JSON schema</summary>"]
15931#[doc = r""]
15932#[doc = r" ```json"]
15933#[doc = "{"]
15934#[doc = "  \"title\": \"JsonRpcResponse_for_Nullable_RpcHealthResponse_and_RpcStatusError\","]
15935#[doc = "  \"type\": \"object\","]
15936#[doc = "  \"oneOf\": ["]
15937#[doc = "    {"]
15938#[doc = "      \"type\": \"object\","]
15939#[doc = "      \"required\": ["]
15940#[doc = "        \"result\""]
15941#[doc = "      ],"]
15942#[doc = "      \"properties\": {"]
15943#[doc = "        \"result\": {"]
15944#[doc = "          \"anyOf\": ["]
15945#[doc = "            {"]
15946#[doc = "              \"$ref\": \"#/components/schemas/RpcHealthResponse\""]
15947#[doc = "            },"]
15948#[doc = "            {"]
15949#[doc = "              \"type\": \"null\""]
15950#[doc = "            }"]
15951#[doc = "          ]"]
15952#[doc = "        }"]
15953#[doc = "      }"]
15954#[doc = "    },"]
15955#[doc = "    {"]
15956#[doc = "      \"type\": \"object\","]
15957#[doc = "      \"required\": ["]
15958#[doc = "        \"error\""]
15959#[doc = "      ],"]
15960#[doc = "      \"properties\": {"]
15961#[doc = "        \"error\": {"]
15962#[doc = "          \"$ref\": \"#/components/schemas/ErrorWrapper_for_RpcStatusError\""]
15963#[doc = "        }"]
15964#[doc = "      }"]
15965#[doc = "    }"]
15966#[doc = "  ],"]
15967#[doc = "  \"required\": ["]
15968#[doc = "    \"id\","]
15969#[doc = "    \"jsonrpc\""]
15970#[doc = "  ],"]
15971#[doc = "  \"properties\": {"]
15972#[doc = "    \"id\": {"]
15973#[doc = "      \"type\": \"string\""]
15974#[doc = "    },"]
15975#[doc = "    \"jsonrpc\": {"]
15976#[doc = "      \"type\": \"string\""]
15977#[doc = "    }"]
15978#[doc = "  }"]
15979#[doc = "}"]
15980#[doc = r" ```"]
15981#[doc = r" </details>"]
15982#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
15983#[serde(untagged)]
15984pub enum JsonRpcResponseForNullableRpcHealthResponseAndRpcStatusError {
15985    Variant0 {
15986        id: ::std::string::String,
15987        jsonrpc: ::std::string::String,
15988        result: ::std::option::Option<RpcHealthResponse>,
15989    },
15990    Variant1 {
15991        error: ErrorWrapperForRpcStatusError,
15992        id: ::std::string::String,
15993        jsonrpc: ::std::string::String,
15994    },
15995}
15996impl ::std::convert::From<&Self> for JsonRpcResponseForNullableRpcHealthResponseAndRpcStatusError {
15997    fn from(value: &JsonRpcResponseForNullableRpcHealthResponseAndRpcStatusError) -> Self {
15998        value.clone()
15999    }
16000}
16001#[doc = "`JsonRpcResponseForRpcBlockResponseAndRpcBlockError`"]
16002#[doc = r""]
16003#[doc = r" <details><summary>JSON schema</summary>"]
16004#[doc = r""]
16005#[doc = r" ```json"]
16006#[doc = "{"]
16007#[doc = "  \"title\": \"JsonRpcResponse_for_RpcBlockResponse_and_RpcBlockError\","]
16008#[doc = "  \"type\": \"object\","]
16009#[doc = "  \"oneOf\": ["]
16010#[doc = "    {"]
16011#[doc = "      \"type\": \"object\","]
16012#[doc = "      \"required\": ["]
16013#[doc = "        \"result\""]
16014#[doc = "      ],"]
16015#[doc = "      \"properties\": {"]
16016#[doc = "        \"result\": {"]
16017#[doc = "          \"$ref\": \"#/components/schemas/RpcBlockResponse\""]
16018#[doc = "        }"]
16019#[doc = "      }"]
16020#[doc = "    },"]
16021#[doc = "    {"]
16022#[doc = "      \"type\": \"object\","]
16023#[doc = "      \"required\": ["]
16024#[doc = "        \"error\""]
16025#[doc = "      ],"]
16026#[doc = "      \"properties\": {"]
16027#[doc = "        \"error\": {"]
16028#[doc = "          \"$ref\": \"#/components/schemas/ErrorWrapper_for_RpcBlockError\""]
16029#[doc = "        }"]
16030#[doc = "      }"]
16031#[doc = "    }"]
16032#[doc = "  ],"]
16033#[doc = "  \"required\": ["]
16034#[doc = "    \"id\","]
16035#[doc = "    \"jsonrpc\""]
16036#[doc = "  ],"]
16037#[doc = "  \"properties\": {"]
16038#[doc = "    \"id\": {"]
16039#[doc = "      \"type\": \"string\""]
16040#[doc = "    },"]
16041#[doc = "    \"jsonrpc\": {"]
16042#[doc = "      \"type\": \"string\""]
16043#[doc = "    }"]
16044#[doc = "  }"]
16045#[doc = "}"]
16046#[doc = r" ```"]
16047#[doc = r" </details>"]
16048#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
16049#[serde(untagged)]
16050pub enum JsonRpcResponseForRpcBlockResponseAndRpcBlockError {
16051    Variant0 {
16052        id: ::std::string::String,
16053        jsonrpc: ::std::string::String,
16054        result: RpcBlockResponse,
16055    },
16056    Variant1 {
16057        error: ErrorWrapperForRpcBlockError,
16058        id: ::std::string::String,
16059        jsonrpc: ::std::string::String,
16060    },
16061}
16062impl ::std::convert::From<&Self> for JsonRpcResponseForRpcBlockResponseAndRpcBlockError {
16063    fn from(value: &JsonRpcResponseForRpcBlockResponseAndRpcBlockError) -> Self {
16064        value.clone()
16065    }
16066}
16067#[doc = "`JsonRpcResponseForRpcChunkResponseAndRpcChunkError`"]
16068#[doc = r""]
16069#[doc = r" <details><summary>JSON schema</summary>"]
16070#[doc = r""]
16071#[doc = r" ```json"]
16072#[doc = "{"]
16073#[doc = "  \"title\": \"JsonRpcResponse_for_RpcChunkResponse_and_RpcChunkError\","]
16074#[doc = "  \"type\": \"object\","]
16075#[doc = "  \"oneOf\": ["]
16076#[doc = "    {"]
16077#[doc = "      \"type\": \"object\","]
16078#[doc = "      \"required\": ["]
16079#[doc = "        \"result\""]
16080#[doc = "      ],"]
16081#[doc = "      \"properties\": {"]
16082#[doc = "        \"result\": {"]
16083#[doc = "          \"$ref\": \"#/components/schemas/RpcChunkResponse\""]
16084#[doc = "        }"]
16085#[doc = "      }"]
16086#[doc = "    },"]
16087#[doc = "    {"]
16088#[doc = "      \"type\": \"object\","]
16089#[doc = "      \"required\": ["]
16090#[doc = "        \"error\""]
16091#[doc = "      ],"]
16092#[doc = "      \"properties\": {"]
16093#[doc = "        \"error\": {"]
16094#[doc = "          \"$ref\": \"#/components/schemas/ErrorWrapper_for_RpcChunkError\""]
16095#[doc = "        }"]
16096#[doc = "      }"]
16097#[doc = "    }"]
16098#[doc = "  ],"]
16099#[doc = "  \"required\": ["]
16100#[doc = "    \"id\","]
16101#[doc = "    \"jsonrpc\""]
16102#[doc = "  ],"]
16103#[doc = "  \"properties\": {"]
16104#[doc = "    \"id\": {"]
16105#[doc = "      \"type\": \"string\""]
16106#[doc = "    },"]
16107#[doc = "    \"jsonrpc\": {"]
16108#[doc = "      \"type\": \"string\""]
16109#[doc = "    }"]
16110#[doc = "  }"]
16111#[doc = "}"]
16112#[doc = r" ```"]
16113#[doc = r" </details>"]
16114#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
16115#[serde(untagged)]
16116pub enum JsonRpcResponseForRpcChunkResponseAndRpcChunkError {
16117    Variant0 {
16118        id: ::std::string::String,
16119        jsonrpc: ::std::string::String,
16120        result: RpcChunkResponse,
16121    },
16122    Variant1 {
16123        error: ErrorWrapperForRpcChunkError,
16124        id: ::std::string::String,
16125        jsonrpc: ::std::string::String,
16126    },
16127}
16128impl ::std::convert::From<&Self> for JsonRpcResponseForRpcChunkResponseAndRpcChunkError {
16129    fn from(value: &JsonRpcResponseForRpcChunkResponseAndRpcChunkError) -> Self {
16130        value.clone()
16131    }
16132}
16133#[doc = "`JsonRpcResponseForRpcClientConfigResponseAndRpcClientConfigError`"]
16134#[doc = r""]
16135#[doc = r" <details><summary>JSON schema</summary>"]
16136#[doc = r""]
16137#[doc = r" ```json"]
16138#[doc = "{"]
16139#[doc = "  \"title\": \"JsonRpcResponse_for_RpcClientConfigResponse_and_RpcClientConfigError\","]
16140#[doc = "  \"type\": \"object\","]
16141#[doc = "  \"oneOf\": ["]
16142#[doc = "    {"]
16143#[doc = "      \"type\": \"object\","]
16144#[doc = "      \"required\": ["]
16145#[doc = "        \"result\""]
16146#[doc = "      ],"]
16147#[doc = "      \"properties\": {"]
16148#[doc = "        \"result\": {"]
16149#[doc = "          \"$ref\": \"#/components/schemas/RpcClientConfigResponse\""]
16150#[doc = "        }"]
16151#[doc = "      }"]
16152#[doc = "    },"]
16153#[doc = "    {"]
16154#[doc = "      \"type\": \"object\","]
16155#[doc = "      \"required\": ["]
16156#[doc = "        \"error\""]
16157#[doc = "      ],"]
16158#[doc = "      \"properties\": {"]
16159#[doc = "        \"error\": {"]
16160#[doc = "          \"$ref\": \"#/components/schemas/ErrorWrapper_for_RpcClientConfigError\""]
16161#[doc = "        }"]
16162#[doc = "      }"]
16163#[doc = "    }"]
16164#[doc = "  ],"]
16165#[doc = "  \"required\": ["]
16166#[doc = "    \"id\","]
16167#[doc = "    \"jsonrpc\""]
16168#[doc = "  ],"]
16169#[doc = "  \"properties\": {"]
16170#[doc = "    \"id\": {"]
16171#[doc = "      \"type\": \"string\""]
16172#[doc = "    },"]
16173#[doc = "    \"jsonrpc\": {"]
16174#[doc = "      \"type\": \"string\""]
16175#[doc = "    }"]
16176#[doc = "  }"]
16177#[doc = "}"]
16178#[doc = r" ```"]
16179#[doc = r" </details>"]
16180#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
16181#[serde(untagged)]
16182pub enum JsonRpcResponseForRpcClientConfigResponseAndRpcClientConfigError {
16183    Variant0 {
16184        id: ::std::string::String,
16185        jsonrpc: ::std::string::String,
16186        result: RpcClientConfigResponse,
16187    },
16188    Variant1 {
16189        error: ErrorWrapperForRpcClientConfigError,
16190        id: ::std::string::String,
16191        jsonrpc: ::std::string::String,
16192    },
16193}
16194impl ::std::convert::From<&Self>
16195    for JsonRpcResponseForRpcClientConfigResponseAndRpcClientConfigError
16196{
16197    fn from(value: &JsonRpcResponseForRpcClientConfigResponseAndRpcClientConfigError) -> Self {
16198        value.clone()
16199    }
16200}
16201#[doc = "`JsonRpcResponseForRpcCongestionLevelResponseAndRpcChunkError`"]
16202#[doc = r""]
16203#[doc = r" <details><summary>JSON schema</summary>"]
16204#[doc = r""]
16205#[doc = r" ```json"]
16206#[doc = "{"]
16207#[doc = "  \"title\": \"JsonRpcResponse_for_RpcCongestionLevelResponse_and_RpcChunkError\","]
16208#[doc = "  \"type\": \"object\","]
16209#[doc = "  \"oneOf\": ["]
16210#[doc = "    {"]
16211#[doc = "      \"type\": \"object\","]
16212#[doc = "      \"required\": ["]
16213#[doc = "        \"result\""]
16214#[doc = "      ],"]
16215#[doc = "      \"properties\": {"]
16216#[doc = "        \"result\": {"]
16217#[doc = "          \"$ref\": \"#/components/schemas/RpcCongestionLevelResponse\""]
16218#[doc = "        }"]
16219#[doc = "      }"]
16220#[doc = "    },"]
16221#[doc = "    {"]
16222#[doc = "      \"type\": \"object\","]
16223#[doc = "      \"required\": ["]
16224#[doc = "        \"error\""]
16225#[doc = "      ],"]
16226#[doc = "      \"properties\": {"]
16227#[doc = "        \"error\": {"]
16228#[doc = "          \"$ref\": \"#/components/schemas/ErrorWrapper_for_RpcChunkError\""]
16229#[doc = "        }"]
16230#[doc = "      }"]
16231#[doc = "    }"]
16232#[doc = "  ],"]
16233#[doc = "  \"required\": ["]
16234#[doc = "    \"id\","]
16235#[doc = "    \"jsonrpc\""]
16236#[doc = "  ],"]
16237#[doc = "  \"properties\": {"]
16238#[doc = "    \"id\": {"]
16239#[doc = "      \"type\": \"string\""]
16240#[doc = "    },"]
16241#[doc = "    \"jsonrpc\": {"]
16242#[doc = "      \"type\": \"string\""]
16243#[doc = "    }"]
16244#[doc = "  }"]
16245#[doc = "}"]
16246#[doc = r" ```"]
16247#[doc = r" </details>"]
16248#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
16249#[serde(untagged)]
16250pub enum JsonRpcResponseForRpcCongestionLevelResponseAndRpcChunkError {
16251    Variant0 {
16252        id: ::std::string::String,
16253        jsonrpc: ::std::string::String,
16254        result: RpcCongestionLevelResponse,
16255    },
16256    Variant1 {
16257        error: ErrorWrapperForRpcChunkError,
16258        id: ::std::string::String,
16259        jsonrpc: ::std::string::String,
16260    },
16261}
16262impl ::std::convert::From<&Self> for JsonRpcResponseForRpcCongestionLevelResponseAndRpcChunkError {
16263    fn from(value: &JsonRpcResponseForRpcCongestionLevelResponseAndRpcChunkError) -> Self {
16264        value.clone()
16265    }
16266}
16267#[doc = "`JsonRpcResponseForRpcGasPriceResponseAndRpcGasPriceError`"]
16268#[doc = r""]
16269#[doc = r" <details><summary>JSON schema</summary>"]
16270#[doc = r""]
16271#[doc = r" ```json"]
16272#[doc = "{"]
16273#[doc = "  \"title\": \"JsonRpcResponse_for_RpcGasPriceResponse_and_RpcGasPriceError\","]
16274#[doc = "  \"type\": \"object\","]
16275#[doc = "  \"oneOf\": ["]
16276#[doc = "    {"]
16277#[doc = "      \"type\": \"object\","]
16278#[doc = "      \"required\": ["]
16279#[doc = "        \"result\""]
16280#[doc = "      ],"]
16281#[doc = "      \"properties\": {"]
16282#[doc = "        \"result\": {"]
16283#[doc = "          \"$ref\": \"#/components/schemas/RpcGasPriceResponse\""]
16284#[doc = "        }"]
16285#[doc = "      }"]
16286#[doc = "    },"]
16287#[doc = "    {"]
16288#[doc = "      \"type\": \"object\","]
16289#[doc = "      \"required\": ["]
16290#[doc = "        \"error\""]
16291#[doc = "      ],"]
16292#[doc = "      \"properties\": {"]
16293#[doc = "        \"error\": {"]
16294#[doc = "          \"$ref\": \"#/components/schemas/ErrorWrapper_for_RpcGasPriceError\""]
16295#[doc = "        }"]
16296#[doc = "      }"]
16297#[doc = "    }"]
16298#[doc = "  ],"]
16299#[doc = "  \"required\": ["]
16300#[doc = "    \"id\","]
16301#[doc = "    \"jsonrpc\""]
16302#[doc = "  ],"]
16303#[doc = "  \"properties\": {"]
16304#[doc = "    \"id\": {"]
16305#[doc = "      \"type\": \"string\""]
16306#[doc = "    },"]
16307#[doc = "    \"jsonrpc\": {"]
16308#[doc = "      \"type\": \"string\""]
16309#[doc = "    }"]
16310#[doc = "  }"]
16311#[doc = "}"]
16312#[doc = r" ```"]
16313#[doc = r" </details>"]
16314#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
16315#[serde(untagged)]
16316pub enum JsonRpcResponseForRpcGasPriceResponseAndRpcGasPriceError {
16317    Variant0 {
16318        id: ::std::string::String,
16319        jsonrpc: ::std::string::String,
16320        result: RpcGasPriceResponse,
16321    },
16322    Variant1 {
16323        error: ErrorWrapperForRpcGasPriceError,
16324        id: ::std::string::String,
16325        jsonrpc: ::std::string::String,
16326    },
16327}
16328impl ::std::convert::From<&Self> for JsonRpcResponseForRpcGasPriceResponseAndRpcGasPriceError {
16329    fn from(value: &JsonRpcResponseForRpcGasPriceResponseAndRpcGasPriceError) -> Self {
16330        value.clone()
16331    }
16332}
16333#[doc = "`JsonRpcResponseForRpcLightClientBlockProofResponseAndRpcLightClientProofError`"]
16334#[doc = r""]
16335#[doc = r" <details><summary>JSON schema</summary>"]
16336#[doc = r""]
16337#[doc = r" ```json"]
16338#[doc = "{"]
16339#[doc = "  \"title\": \"JsonRpcResponse_for_RpcLightClientBlockProofResponse_and_RpcLightClientProofError\","]
16340#[doc = "  \"type\": \"object\","]
16341#[doc = "  \"oneOf\": ["]
16342#[doc = "    {"]
16343#[doc = "      \"type\": \"object\","]
16344#[doc = "      \"required\": ["]
16345#[doc = "        \"result\""]
16346#[doc = "      ],"]
16347#[doc = "      \"properties\": {"]
16348#[doc = "        \"result\": {"]
16349#[doc = "          \"$ref\": \"#/components/schemas/RpcLightClientBlockProofResponse\""]
16350#[doc = "        }"]
16351#[doc = "      }"]
16352#[doc = "    },"]
16353#[doc = "    {"]
16354#[doc = "      \"type\": \"object\","]
16355#[doc = "      \"required\": ["]
16356#[doc = "        \"error\""]
16357#[doc = "      ],"]
16358#[doc = "      \"properties\": {"]
16359#[doc = "        \"error\": {"]
16360#[doc = "          \"$ref\": \"#/components/schemas/ErrorWrapper_for_RpcLightClientProofError\""]
16361#[doc = "        }"]
16362#[doc = "      }"]
16363#[doc = "    }"]
16364#[doc = "  ],"]
16365#[doc = "  \"required\": ["]
16366#[doc = "    \"id\","]
16367#[doc = "    \"jsonrpc\""]
16368#[doc = "  ],"]
16369#[doc = "  \"properties\": {"]
16370#[doc = "    \"id\": {"]
16371#[doc = "      \"type\": \"string\""]
16372#[doc = "    },"]
16373#[doc = "    \"jsonrpc\": {"]
16374#[doc = "      \"type\": \"string\""]
16375#[doc = "    }"]
16376#[doc = "  }"]
16377#[doc = "}"]
16378#[doc = r" ```"]
16379#[doc = r" </details>"]
16380#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
16381#[serde(untagged)]
16382pub enum JsonRpcResponseForRpcLightClientBlockProofResponseAndRpcLightClientProofError {
16383    Variant0 {
16384        id: ::std::string::String,
16385        jsonrpc: ::std::string::String,
16386        result: RpcLightClientBlockProofResponse,
16387    },
16388    Variant1 {
16389        error: ErrorWrapperForRpcLightClientProofError,
16390        id: ::std::string::String,
16391        jsonrpc: ::std::string::String,
16392    },
16393}
16394impl ::std::convert::From<&Self>
16395    for JsonRpcResponseForRpcLightClientBlockProofResponseAndRpcLightClientProofError
16396{
16397    fn from(
16398        value: &JsonRpcResponseForRpcLightClientBlockProofResponseAndRpcLightClientProofError,
16399    ) -> Self {
16400        value.clone()
16401    }
16402}
16403#[doc = "`JsonRpcResponseForRpcLightClientExecutionProofResponseAndRpcLightClientProofError`"]
16404#[doc = r""]
16405#[doc = r" <details><summary>JSON schema</summary>"]
16406#[doc = r""]
16407#[doc = r" ```json"]
16408#[doc = "{"]
16409#[doc = "  \"title\": \"JsonRpcResponse_for_RpcLightClientExecutionProofResponse_and_RpcLightClientProofError\","]
16410#[doc = "  \"type\": \"object\","]
16411#[doc = "  \"oneOf\": ["]
16412#[doc = "    {"]
16413#[doc = "      \"type\": \"object\","]
16414#[doc = "      \"required\": ["]
16415#[doc = "        \"result\""]
16416#[doc = "      ],"]
16417#[doc = "      \"properties\": {"]
16418#[doc = "        \"result\": {"]
16419#[doc = "          \"$ref\": \"#/components/schemas/RpcLightClientExecutionProofResponse\""]
16420#[doc = "        }"]
16421#[doc = "      }"]
16422#[doc = "    },"]
16423#[doc = "    {"]
16424#[doc = "      \"type\": \"object\","]
16425#[doc = "      \"required\": ["]
16426#[doc = "        \"error\""]
16427#[doc = "      ],"]
16428#[doc = "      \"properties\": {"]
16429#[doc = "        \"error\": {"]
16430#[doc = "          \"$ref\": \"#/components/schemas/ErrorWrapper_for_RpcLightClientProofError\""]
16431#[doc = "        }"]
16432#[doc = "      }"]
16433#[doc = "    }"]
16434#[doc = "  ],"]
16435#[doc = "  \"required\": ["]
16436#[doc = "    \"id\","]
16437#[doc = "    \"jsonrpc\""]
16438#[doc = "  ],"]
16439#[doc = "  \"properties\": {"]
16440#[doc = "    \"id\": {"]
16441#[doc = "      \"type\": \"string\""]
16442#[doc = "    },"]
16443#[doc = "    \"jsonrpc\": {"]
16444#[doc = "      \"type\": \"string\""]
16445#[doc = "    }"]
16446#[doc = "  }"]
16447#[doc = "}"]
16448#[doc = r" ```"]
16449#[doc = r" </details>"]
16450#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
16451#[serde(untagged)]
16452pub enum JsonRpcResponseForRpcLightClientExecutionProofResponseAndRpcLightClientProofError {
16453    Variant0 {
16454        id: ::std::string::String,
16455        jsonrpc: ::std::string::String,
16456        result: RpcLightClientExecutionProofResponse,
16457    },
16458    Variant1 {
16459        error: ErrorWrapperForRpcLightClientProofError,
16460        id: ::std::string::String,
16461        jsonrpc: ::std::string::String,
16462    },
16463}
16464impl ::std::convert::From<&Self>
16465    for JsonRpcResponseForRpcLightClientExecutionProofResponseAndRpcLightClientProofError
16466{
16467    fn from(
16468        value: &JsonRpcResponseForRpcLightClientExecutionProofResponseAndRpcLightClientProofError,
16469    ) -> Self {
16470        value.clone()
16471    }
16472}
16473#[doc = "`JsonRpcResponseForRpcLightClientNextBlockResponseAndRpcLightClientNextBlockError`"]
16474#[doc = r""]
16475#[doc = r" <details><summary>JSON schema</summary>"]
16476#[doc = r""]
16477#[doc = r" ```json"]
16478#[doc = "{"]
16479#[doc = "  \"title\": \"JsonRpcResponse_for_RpcLightClientNextBlockResponse_and_RpcLightClientNextBlockError\","]
16480#[doc = "  \"type\": \"object\","]
16481#[doc = "  \"oneOf\": ["]
16482#[doc = "    {"]
16483#[doc = "      \"type\": \"object\","]
16484#[doc = "      \"required\": ["]
16485#[doc = "        \"result\""]
16486#[doc = "      ],"]
16487#[doc = "      \"properties\": {"]
16488#[doc = "        \"result\": {"]
16489#[doc = "          \"$ref\": \"#/components/schemas/RpcLightClientNextBlockResponse\""]
16490#[doc = "        }"]
16491#[doc = "      }"]
16492#[doc = "    },"]
16493#[doc = "    {"]
16494#[doc = "      \"type\": \"object\","]
16495#[doc = "      \"required\": ["]
16496#[doc = "        \"error\""]
16497#[doc = "      ],"]
16498#[doc = "      \"properties\": {"]
16499#[doc = "        \"error\": {"]
16500#[doc = "          \"$ref\": \"#/components/schemas/ErrorWrapper_for_RpcLightClientNextBlockError\""]
16501#[doc = "        }"]
16502#[doc = "      }"]
16503#[doc = "    }"]
16504#[doc = "  ],"]
16505#[doc = "  \"required\": ["]
16506#[doc = "    \"id\","]
16507#[doc = "    \"jsonrpc\""]
16508#[doc = "  ],"]
16509#[doc = "  \"properties\": {"]
16510#[doc = "    \"id\": {"]
16511#[doc = "      \"type\": \"string\""]
16512#[doc = "    },"]
16513#[doc = "    \"jsonrpc\": {"]
16514#[doc = "      \"type\": \"string\""]
16515#[doc = "    }"]
16516#[doc = "  }"]
16517#[doc = "}"]
16518#[doc = r" ```"]
16519#[doc = r" </details>"]
16520#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
16521#[serde(untagged)]
16522pub enum JsonRpcResponseForRpcLightClientNextBlockResponseAndRpcLightClientNextBlockError {
16523    Variant0 {
16524        id: ::std::string::String,
16525        jsonrpc: ::std::string::String,
16526        result: RpcLightClientNextBlockResponse,
16527    },
16528    Variant1 {
16529        error: ErrorWrapperForRpcLightClientNextBlockError,
16530        id: ::std::string::String,
16531        jsonrpc: ::std::string::String,
16532    },
16533}
16534impl ::std::convert::From<&Self>
16535    for JsonRpcResponseForRpcLightClientNextBlockResponseAndRpcLightClientNextBlockError
16536{
16537    fn from(
16538        value: &JsonRpcResponseForRpcLightClientNextBlockResponseAndRpcLightClientNextBlockError,
16539    ) -> Self {
16540        value.clone()
16541    }
16542}
16543#[doc = "`JsonRpcResponseForRpcNetworkInfoResponseAndRpcNetworkInfoError`"]
16544#[doc = r""]
16545#[doc = r" <details><summary>JSON schema</summary>"]
16546#[doc = r""]
16547#[doc = r" ```json"]
16548#[doc = "{"]
16549#[doc = "  \"title\": \"JsonRpcResponse_for_RpcNetworkInfoResponse_and_RpcNetworkInfoError\","]
16550#[doc = "  \"type\": \"object\","]
16551#[doc = "  \"oneOf\": ["]
16552#[doc = "    {"]
16553#[doc = "      \"type\": \"object\","]
16554#[doc = "      \"required\": ["]
16555#[doc = "        \"result\""]
16556#[doc = "      ],"]
16557#[doc = "      \"properties\": {"]
16558#[doc = "        \"result\": {"]
16559#[doc = "          \"$ref\": \"#/components/schemas/RpcNetworkInfoResponse\""]
16560#[doc = "        }"]
16561#[doc = "      }"]
16562#[doc = "    },"]
16563#[doc = "    {"]
16564#[doc = "      \"type\": \"object\","]
16565#[doc = "      \"required\": ["]
16566#[doc = "        \"error\""]
16567#[doc = "      ],"]
16568#[doc = "      \"properties\": {"]
16569#[doc = "        \"error\": {"]
16570#[doc = "          \"$ref\": \"#/components/schemas/ErrorWrapper_for_RpcNetworkInfoError\""]
16571#[doc = "        }"]
16572#[doc = "      }"]
16573#[doc = "    }"]
16574#[doc = "  ],"]
16575#[doc = "  \"required\": ["]
16576#[doc = "    \"id\","]
16577#[doc = "    \"jsonrpc\""]
16578#[doc = "  ],"]
16579#[doc = "  \"properties\": {"]
16580#[doc = "    \"id\": {"]
16581#[doc = "      \"type\": \"string\""]
16582#[doc = "    },"]
16583#[doc = "    \"jsonrpc\": {"]
16584#[doc = "      \"type\": \"string\""]
16585#[doc = "    }"]
16586#[doc = "  }"]
16587#[doc = "}"]
16588#[doc = r" ```"]
16589#[doc = r" </details>"]
16590#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
16591#[serde(untagged)]
16592pub enum JsonRpcResponseForRpcNetworkInfoResponseAndRpcNetworkInfoError {
16593    Variant0 {
16594        id: ::std::string::String,
16595        jsonrpc: ::std::string::String,
16596        result: RpcNetworkInfoResponse,
16597    },
16598    Variant1 {
16599        error: ErrorWrapperForRpcNetworkInfoError,
16600        id: ::std::string::String,
16601        jsonrpc: ::std::string::String,
16602    },
16603}
16604impl ::std::convert::From<&Self>
16605    for JsonRpcResponseForRpcNetworkInfoResponseAndRpcNetworkInfoError
16606{
16607    fn from(value: &JsonRpcResponseForRpcNetworkInfoResponseAndRpcNetworkInfoError) -> Self {
16608        value.clone()
16609    }
16610}
16611#[doc = "`JsonRpcResponseForRpcProtocolConfigResponseAndRpcProtocolConfigError`"]
16612#[doc = r""]
16613#[doc = r" <details><summary>JSON schema</summary>"]
16614#[doc = r""]
16615#[doc = r" ```json"]
16616#[doc = "{"]
16617#[doc = "  \"title\": \"JsonRpcResponse_for_RpcProtocolConfigResponse_and_RpcProtocolConfigError\","]
16618#[doc = "  \"type\": \"object\","]
16619#[doc = "  \"oneOf\": ["]
16620#[doc = "    {"]
16621#[doc = "      \"type\": \"object\","]
16622#[doc = "      \"required\": ["]
16623#[doc = "        \"result\""]
16624#[doc = "      ],"]
16625#[doc = "      \"properties\": {"]
16626#[doc = "        \"result\": {"]
16627#[doc = "          \"$ref\": \"#/components/schemas/RpcProtocolConfigResponse\""]
16628#[doc = "        }"]
16629#[doc = "      }"]
16630#[doc = "    },"]
16631#[doc = "    {"]
16632#[doc = "      \"type\": \"object\","]
16633#[doc = "      \"required\": ["]
16634#[doc = "        \"error\""]
16635#[doc = "      ],"]
16636#[doc = "      \"properties\": {"]
16637#[doc = "        \"error\": {"]
16638#[doc = "          \"$ref\": \"#/components/schemas/ErrorWrapper_for_RpcProtocolConfigError\""]
16639#[doc = "        }"]
16640#[doc = "      }"]
16641#[doc = "    }"]
16642#[doc = "  ],"]
16643#[doc = "  \"required\": ["]
16644#[doc = "    \"id\","]
16645#[doc = "    \"jsonrpc\""]
16646#[doc = "  ],"]
16647#[doc = "  \"properties\": {"]
16648#[doc = "    \"id\": {"]
16649#[doc = "      \"type\": \"string\""]
16650#[doc = "    },"]
16651#[doc = "    \"jsonrpc\": {"]
16652#[doc = "      \"type\": \"string\""]
16653#[doc = "    }"]
16654#[doc = "  }"]
16655#[doc = "}"]
16656#[doc = r" ```"]
16657#[doc = r" </details>"]
16658#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
16659#[serde(untagged)]
16660pub enum JsonRpcResponseForRpcProtocolConfigResponseAndRpcProtocolConfigError {
16661    Variant0 {
16662        id: ::std::string::String,
16663        jsonrpc: ::std::string::String,
16664        result: RpcProtocolConfigResponse,
16665    },
16666    Variant1 {
16667        error: ErrorWrapperForRpcProtocolConfigError,
16668        id: ::std::string::String,
16669        jsonrpc: ::std::string::String,
16670    },
16671}
16672impl ::std::convert::From<&Self>
16673    for JsonRpcResponseForRpcProtocolConfigResponseAndRpcProtocolConfigError
16674{
16675    fn from(value: &JsonRpcResponseForRpcProtocolConfigResponseAndRpcProtocolConfigError) -> Self {
16676        value.clone()
16677    }
16678}
16679#[doc = "`JsonRpcResponseForRpcQueryResponseAndRpcQueryError`"]
16680#[doc = r""]
16681#[doc = r" <details><summary>JSON schema</summary>"]
16682#[doc = r""]
16683#[doc = r" ```json"]
16684#[doc = "{"]
16685#[doc = "  \"title\": \"JsonRpcResponse_for_RpcQueryResponse_and_RpcQueryError\","]
16686#[doc = "  \"type\": \"object\","]
16687#[doc = "  \"oneOf\": ["]
16688#[doc = "    {"]
16689#[doc = "      \"type\": \"object\","]
16690#[doc = "      \"required\": ["]
16691#[doc = "        \"result\""]
16692#[doc = "      ],"]
16693#[doc = "      \"properties\": {"]
16694#[doc = "        \"result\": {"]
16695#[doc = "          \"$ref\": \"#/components/schemas/RpcQueryResponse\""]
16696#[doc = "        }"]
16697#[doc = "      }"]
16698#[doc = "    },"]
16699#[doc = "    {"]
16700#[doc = "      \"type\": \"object\","]
16701#[doc = "      \"required\": ["]
16702#[doc = "        \"error\""]
16703#[doc = "      ],"]
16704#[doc = "      \"properties\": {"]
16705#[doc = "        \"error\": {"]
16706#[doc = "          \"$ref\": \"#/components/schemas/ErrorWrapper_for_RpcQueryError\""]
16707#[doc = "        }"]
16708#[doc = "      }"]
16709#[doc = "    }"]
16710#[doc = "  ],"]
16711#[doc = "  \"required\": ["]
16712#[doc = "    \"id\","]
16713#[doc = "    \"jsonrpc\""]
16714#[doc = "  ],"]
16715#[doc = "  \"properties\": {"]
16716#[doc = "    \"id\": {"]
16717#[doc = "      \"type\": \"string\""]
16718#[doc = "    },"]
16719#[doc = "    \"jsonrpc\": {"]
16720#[doc = "      \"type\": \"string\""]
16721#[doc = "    }"]
16722#[doc = "  }"]
16723#[doc = "}"]
16724#[doc = r" ```"]
16725#[doc = r" </details>"]
16726#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
16727#[serde(untagged)]
16728pub enum JsonRpcResponseForRpcQueryResponseAndRpcQueryError {
16729    Variant0 {
16730        id: ::std::string::String,
16731        jsonrpc: ::std::string::String,
16732        result: RpcQueryResponse,
16733    },
16734    Variant1 {
16735        error: ErrorWrapperForRpcQueryError,
16736        id: ::std::string::String,
16737        jsonrpc: ::std::string::String,
16738    },
16739}
16740impl ::std::convert::From<&Self> for JsonRpcResponseForRpcQueryResponseAndRpcQueryError {
16741    fn from(value: &JsonRpcResponseForRpcQueryResponseAndRpcQueryError) -> Self {
16742        value.clone()
16743    }
16744}
16745#[doc = "`JsonRpcResponseForRpcReceiptResponseAndRpcReceiptError`"]
16746#[doc = r""]
16747#[doc = r" <details><summary>JSON schema</summary>"]
16748#[doc = r""]
16749#[doc = r" ```json"]
16750#[doc = "{"]
16751#[doc = "  \"title\": \"JsonRpcResponse_for_RpcReceiptResponse_and_RpcReceiptError\","]
16752#[doc = "  \"type\": \"object\","]
16753#[doc = "  \"oneOf\": ["]
16754#[doc = "    {"]
16755#[doc = "      \"type\": \"object\","]
16756#[doc = "      \"required\": ["]
16757#[doc = "        \"result\""]
16758#[doc = "      ],"]
16759#[doc = "      \"properties\": {"]
16760#[doc = "        \"result\": {"]
16761#[doc = "          \"$ref\": \"#/components/schemas/RpcReceiptResponse\""]
16762#[doc = "        }"]
16763#[doc = "      }"]
16764#[doc = "    },"]
16765#[doc = "    {"]
16766#[doc = "      \"type\": \"object\","]
16767#[doc = "      \"required\": ["]
16768#[doc = "        \"error\""]
16769#[doc = "      ],"]
16770#[doc = "      \"properties\": {"]
16771#[doc = "        \"error\": {"]
16772#[doc = "          \"$ref\": \"#/components/schemas/ErrorWrapper_for_RpcReceiptError\""]
16773#[doc = "        }"]
16774#[doc = "      }"]
16775#[doc = "    }"]
16776#[doc = "  ],"]
16777#[doc = "  \"required\": ["]
16778#[doc = "    \"id\","]
16779#[doc = "    \"jsonrpc\""]
16780#[doc = "  ],"]
16781#[doc = "  \"properties\": {"]
16782#[doc = "    \"id\": {"]
16783#[doc = "      \"type\": \"string\""]
16784#[doc = "    },"]
16785#[doc = "    \"jsonrpc\": {"]
16786#[doc = "      \"type\": \"string\""]
16787#[doc = "    }"]
16788#[doc = "  }"]
16789#[doc = "}"]
16790#[doc = r" ```"]
16791#[doc = r" </details>"]
16792#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
16793#[serde(untagged)]
16794pub enum JsonRpcResponseForRpcReceiptResponseAndRpcReceiptError {
16795    Variant0 {
16796        id: ::std::string::String,
16797        jsonrpc: ::std::string::String,
16798        result: RpcReceiptResponse,
16799    },
16800    Variant1 {
16801        error: ErrorWrapperForRpcReceiptError,
16802        id: ::std::string::String,
16803        jsonrpc: ::std::string::String,
16804    },
16805}
16806impl ::std::convert::From<&Self> for JsonRpcResponseForRpcReceiptResponseAndRpcReceiptError {
16807    fn from(value: &JsonRpcResponseForRpcReceiptResponseAndRpcReceiptError) -> Self {
16808        value.clone()
16809    }
16810}
16811#[doc = "`JsonRpcResponseForRpcSplitStorageInfoResponseAndRpcSplitStorageInfoError`"]
16812#[doc = r""]
16813#[doc = r" <details><summary>JSON schema</summary>"]
16814#[doc = r""]
16815#[doc = r" ```json"]
16816#[doc = "{"]
16817#[doc = "  \"title\": \"JsonRpcResponse_for_RpcSplitStorageInfoResponse_and_RpcSplitStorageInfoError\","]
16818#[doc = "  \"type\": \"object\","]
16819#[doc = "  \"oneOf\": ["]
16820#[doc = "    {"]
16821#[doc = "      \"type\": \"object\","]
16822#[doc = "      \"required\": ["]
16823#[doc = "        \"result\""]
16824#[doc = "      ],"]
16825#[doc = "      \"properties\": {"]
16826#[doc = "        \"result\": {"]
16827#[doc = "          \"$ref\": \"#/components/schemas/RpcSplitStorageInfoResponse\""]
16828#[doc = "        }"]
16829#[doc = "      }"]
16830#[doc = "    },"]
16831#[doc = "    {"]
16832#[doc = "      \"type\": \"object\","]
16833#[doc = "      \"required\": ["]
16834#[doc = "        \"error\""]
16835#[doc = "      ],"]
16836#[doc = "      \"properties\": {"]
16837#[doc = "        \"error\": {"]
16838#[doc = "          \"$ref\": \"#/components/schemas/ErrorWrapper_for_RpcSplitStorageInfoError\""]
16839#[doc = "        }"]
16840#[doc = "      }"]
16841#[doc = "    }"]
16842#[doc = "  ],"]
16843#[doc = "  \"required\": ["]
16844#[doc = "    \"id\","]
16845#[doc = "    \"jsonrpc\""]
16846#[doc = "  ],"]
16847#[doc = "  \"properties\": {"]
16848#[doc = "    \"id\": {"]
16849#[doc = "      \"type\": \"string\""]
16850#[doc = "    },"]
16851#[doc = "    \"jsonrpc\": {"]
16852#[doc = "      \"type\": \"string\""]
16853#[doc = "    }"]
16854#[doc = "  }"]
16855#[doc = "}"]
16856#[doc = r" ```"]
16857#[doc = r" </details>"]
16858#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
16859#[serde(untagged)]
16860pub enum JsonRpcResponseForRpcSplitStorageInfoResponseAndRpcSplitStorageInfoError {
16861    Variant0 {
16862        id: ::std::string::String,
16863        jsonrpc: ::std::string::String,
16864        result: RpcSplitStorageInfoResponse,
16865    },
16866    Variant1 {
16867        error: ErrorWrapperForRpcSplitStorageInfoError,
16868        id: ::std::string::String,
16869        jsonrpc: ::std::string::String,
16870    },
16871}
16872impl ::std::convert::From<&Self>
16873    for JsonRpcResponseForRpcSplitStorageInfoResponseAndRpcSplitStorageInfoError
16874{
16875    fn from(
16876        value: &JsonRpcResponseForRpcSplitStorageInfoResponseAndRpcSplitStorageInfoError,
16877    ) -> Self {
16878        value.clone()
16879    }
16880}
16881#[doc = "`JsonRpcResponseForRpcStateChangesInBlockByTypeResponseAndRpcStateChangesError`"]
16882#[doc = r""]
16883#[doc = r" <details><summary>JSON schema</summary>"]
16884#[doc = r""]
16885#[doc = r" ```json"]
16886#[doc = "{"]
16887#[doc = "  \"title\": \"JsonRpcResponse_for_RpcStateChangesInBlockByTypeResponse_and_RpcStateChangesError\","]
16888#[doc = "  \"type\": \"object\","]
16889#[doc = "  \"oneOf\": ["]
16890#[doc = "    {"]
16891#[doc = "      \"type\": \"object\","]
16892#[doc = "      \"required\": ["]
16893#[doc = "        \"result\""]
16894#[doc = "      ],"]
16895#[doc = "      \"properties\": {"]
16896#[doc = "        \"result\": {"]
16897#[doc = "          \"$ref\": \"#/components/schemas/RpcStateChangesInBlockByTypeResponse\""]
16898#[doc = "        }"]
16899#[doc = "      }"]
16900#[doc = "    },"]
16901#[doc = "    {"]
16902#[doc = "      \"type\": \"object\","]
16903#[doc = "      \"required\": ["]
16904#[doc = "        \"error\""]
16905#[doc = "      ],"]
16906#[doc = "      \"properties\": {"]
16907#[doc = "        \"error\": {"]
16908#[doc = "          \"$ref\": \"#/components/schemas/ErrorWrapper_for_RpcStateChangesError\""]
16909#[doc = "        }"]
16910#[doc = "      }"]
16911#[doc = "    }"]
16912#[doc = "  ],"]
16913#[doc = "  \"required\": ["]
16914#[doc = "    \"id\","]
16915#[doc = "    \"jsonrpc\""]
16916#[doc = "  ],"]
16917#[doc = "  \"properties\": {"]
16918#[doc = "    \"id\": {"]
16919#[doc = "      \"type\": \"string\""]
16920#[doc = "    },"]
16921#[doc = "    \"jsonrpc\": {"]
16922#[doc = "      \"type\": \"string\""]
16923#[doc = "    }"]
16924#[doc = "  }"]
16925#[doc = "}"]
16926#[doc = r" ```"]
16927#[doc = r" </details>"]
16928#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
16929#[serde(untagged)]
16930pub enum JsonRpcResponseForRpcStateChangesInBlockByTypeResponseAndRpcStateChangesError {
16931    Variant0 {
16932        id: ::std::string::String,
16933        jsonrpc: ::std::string::String,
16934        result: RpcStateChangesInBlockByTypeResponse,
16935    },
16936    Variant1 {
16937        error: ErrorWrapperForRpcStateChangesError,
16938        id: ::std::string::String,
16939        jsonrpc: ::std::string::String,
16940    },
16941}
16942impl ::std::convert::From<&Self>
16943    for JsonRpcResponseForRpcStateChangesInBlockByTypeResponseAndRpcStateChangesError
16944{
16945    fn from(
16946        value: &JsonRpcResponseForRpcStateChangesInBlockByTypeResponseAndRpcStateChangesError,
16947    ) -> Self {
16948        value.clone()
16949    }
16950}
16951#[doc = "`JsonRpcResponseForRpcStateChangesInBlockResponseAndRpcStateChangesError`"]
16952#[doc = r""]
16953#[doc = r" <details><summary>JSON schema</summary>"]
16954#[doc = r""]
16955#[doc = r" ```json"]
16956#[doc = "{"]
16957#[doc = "  \"title\": \"JsonRpcResponse_for_RpcStateChangesInBlockResponse_and_RpcStateChangesError\","]
16958#[doc = "  \"type\": \"object\","]
16959#[doc = "  \"oneOf\": ["]
16960#[doc = "    {"]
16961#[doc = "      \"type\": \"object\","]
16962#[doc = "      \"required\": ["]
16963#[doc = "        \"result\""]
16964#[doc = "      ],"]
16965#[doc = "      \"properties\": {"]
16966#[doc = "        \"result\": {"]
16967#[doc = "          \"$ref\": \"#/components/schemas/RpcStateChangesInBlockResponse\""]
16968#[doc = "        }"]
16969#[doc = "      }"]
16970#[doc = "    },"]
16971#[doc = "    {"]
16972#[doc = "      \"type\": \"object\","]
16973#[doc = "      \"required\": ["]
16974#[doc = "        \"error\""]
16975#[doc = "      ],"]
16976#[doc = "      \"properties\": {"]
16977#[doc = "        \"error\": {"]
16978#[doc = "          \"$ref\": \"#/components/schemas/ErrorWrapper_for_RpcStateChangesError\""]
16979#[doc = "        }"]
16980#[doc = "      }"]
16981#[doc = "    }"]
16982#[doc = "  ],"]
16983#[doc = "  \"required\": ["]
16984#[doc = "    \"id\","]
16985#[doc = "    \"jsonrpc\""]
16986#[doc = "  ],"]
16987#[doc = "  \"properties\": {"]
16988#[doc = "    \"id\": {"]
16989#[doc = "      \"type\": \"string\""]
16990#[doc = "    },"]
16991#[doc = "    \"jsonrpc\": {"]
16992#[doc = "      \"type\": \"string\""]
16993#[doc = "    }"]
16994#[doc = "  }"]
16995#[doc = "}"]
16996#[doc = r" ```"]
16997#[doc = r" </details>"]
16998#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
16999#[serde(untagged)]
17000pub enum JsonRpcResponseForRpcStateChangesInBlockResponseAndRpcStateChangesError {
17001    Variant0 {
17002        id: ::std::string::String,
17003        jsonrpc: ::std::string::String,
17004        result: RpcStateChangesInBlockResponse,
17005    },
17006    Variant1 {
17007        error: ErrorWrapperForRpcStateChangesError,
17008        id: ::std::string::String,
17009        jsonrpc: ::std::string::String,
17010    },
17011}
17012impl ::std::convert::From<&Self>
17013    for JsonRpcResponseForRpcStateChangesInBlockResponseAndRpcStateChangesError
17014{
17015    fn from(
17016        value: &JsonRpcResponseForRpcStateChangesInBlockResponseAndRpcStateChangesError,
17017    ) -> Self {
17018        value.clone()
17019    }
17020}
17021#[doc = "`JsonRpcResponseForRpcStatusResponseAndRpcStatusError`"]
17022#[doc = r""]
17023#[doc = r" <details><summary>JSON schema</summary>"]
17024#[doc = r""]
17025#[doc = r" ```json"]
17026#[doc = "{"]
17027#[doc = "  \"title\": \"JsonRpcResponse_for_RpcStatusResponse_and_RpcStatusError\","]
17028#[doc = "  \"type\": \"object\","]
17029#[doc = "  \"oneOf\": ["]
17030#[doc = "    {"]
17031#[doc = "      \"type\": \"object\","]
17032#[doc = "      \"required\": ["]
17033#[doc = "        \"result\""]
17034#[doc = "      ],"]
17035#[doc = "      \"properties\": {"]
17036#[doc = "        \"result\": {"]
17037#[doc = "          \"$ref\": \"#/components/schemas/RpcStatusResponse\""]
17038#[doc = "        }"]
17039#[doc = "      }"]
17040#[doc = "    },"]
17041#[doc = "    {"]
17042#[doc = "      \"type\": \"object\","]
17043#[doc = "      \"required\": ["]
17044#[doc = "        \"error\""]
17045#[doc = "      ],"]
17046#[doc = "      \"properties\": {"]
17047#[doc = "        \"error\": {"]
17048#[doc = "          \"$ref\": \"#/components/schemas/ErrorWrapper_for_RpcStatusError\""]
17049#[doc = "        }"]
17050#[doc = "      }"]
17051#[doc = "    }"]
17052#[doc = "  ],"]
17053#[doc = "  \"required\": ["]
17054#[doc = "    \"id\","]
17055#[doc = "    \"jsonrpc\""]
17056#[doc = "  ],"]
17057#[doc = "  \"properties\": {"]
17058#[doc = "    \"id\": {"]
17059#[doc = "      \"type\": \"string\""]
17060#[doc = "    },"]
17061#[doc = "    \"jsonrpc\": {"]
17062#[doc = "      \"type\": \"string\""]
17063#[doc = "    }"]
17064#[doc = "  }"]
17065#[doc = "}"]
17066#[doc = r" ```"]
17067#[doc = r" </details>"]
17068#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
17069#[serde(untagged)]
17070pub enum JsonRpcResponseForRpcStatusResponseAndRpcStatusError {
17071    Variant0 {
17072        id: ::std::string::String,
17073        jsonrpc: ::std::string::String,
17074        result: RpcStatusResponse,
17075    },
17076    Variant1 {
17077        error: ErrorWrapperForRpcStatusError,
17078        id: ::std::string::String,
17079        jsonrpc: ::std::string::String,
17080    },
17081}
17082impl ::std::convert::From<&Self> for JsonRpcResponseForRpcStatusResponseAndRpcStatusError {
17083    fn from(value: &JsonRpcResponseForRpcStatusResponseAndRpcStatusError) -> Self {
17084        value.clone()
17085    }
17086}
17087#[doc = "`JsonRpcResponseForRpcTransactionResponseAndRpcTransactionError`"]
17088#[doc = r""]
17089#[doc = r" <details><summary>JSON schema</summary>"]
17090#[doc = r""]
17091#[doc = r" ```json"]
17092#[doc = "{"]
17093#[doc = "  \"title\": \"JsonRpcResponse_for_RpcTransactionResponse_and_RpcTransactionError\","]
17094#[doc = "  \"type\": \"object\","]
17095#[doc = "  \"oneOf\": ["]
17096#[doc = "    {"]
17097#[doc = "      \"type\": \"object\","]
17098#[doc = "      \"required\": ["]
17099#[doc = "        \"result\""]
17100#[doc = "      ],"]
17101#[doc = "      \"properties\": {"]
17102#[doc = "        \"result\": {"]
17103#[doc = "          \"$ref\": \"#/components/schemas/RpcTransactionResponse\""]
17104#[doc = "        }"]
17105#[doc = "      }"]
17106#[doc = "    },"]
17107#[doc = "    {"]
17108#[doc = "      \"type\": \"object\","]
17109#[doc = "      \"required\": ["]
17110#[doc = "        \"error\""]
17111#[doc = "      ],"]
17112#[doc = "      \"properties\": {"]
17113#[doc = "        \"error\": {"]
17114#[doc = "          \"$ref\": \"#/components/schemas/ErrorWrapper_for_RpcTransactionError\""]
17115#[doc = "        }"]
17116#[doc = "      }"]
17117#[doc = "    }"]
17118#[doc = "  ],"]
17119#[doc = "  \"required\": ["]
17120#[doc = "    \"id\","]
17121#[doc = "    \"jsonrpc\""]
17122#[doc = "  ],"]
17123#[doc = "  \"properties\": {"]
17124#[doc = "    \"id\": {"]
17125#[doc = "      \"type\": \"string\""]
17126#[doc = "    },"]
17127#[doc = "    \"jsonrpc\": {"]
17128#[doc = "      \"type\": \"string\""]
17129#[doc = "    }"]
17130#[doc = "  }"]
17131#[doc = "}"]
17132#[doc = r" ```"]
17133#[doc = r" </details>"]
17134#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
17135#[serde(untagged)]
17136pub enum JsonRpcResponseForRpcTransactionResponseAndRpcTransactionError {
17137    Variant0 {
17138        id: ::std::string::String,
17139        jsonrpc: ::std::string::String,
17140        result: RpcTransactionResponse,
17141    },
17142    Variant1 {
17143        error: ErrorWrapperForRpcTransactionError,
17144        id: ::std::string::String,
17145        jsonrpc: ::std::string::String,
17146    },
17147}
17148impl ::std::convert::From<&Self>
17149    for JsonRpcResponseForRpcTransactionResponseAndRpcTransactionError
17150{
17151    fn from(value: &JsonRpcResponseForRpcTransactionResponseAndRpcTransactionError) -> Self {
17152        value.clone()
17153    }
17154}
17155#[doc = "`JsonRpcResponseForRpcValidatorResponseAndRpcValidatorError`"]
17156#[doc = r""]
17157#[doc = r" <details><summary>JSON schema</summary>"]
17158#[doc = r""]
17159#[doc = r" ```json"]
17160#[doc = "{"]
17161#[doc = "  \"title\": \"JsonRpcResponse_for_RpcValidatorResponse_and_RpcValidatorError\","]
17162#[doc = "  \"type\": \"object\","]
17163#[doc = "  \"oneOf\": ["]
17164#[doc = "    {"]
17165#[doc = "      \"type\": \"object\","]
17166#[doc = "      \"required\": ["]
17167#[doc = "        \"result\""]
17168#[doc = "      ],"]
17169#[doc = "      \"properties\": {"]
17170#[doc = "        \"result\": {"]
17171#[doc = "          \"$ref\": \"#/components/schemas/RpcValidatorResponse\""]
17172#[doc = "        }"]
17173#[doc = "      }"]
17174#[doc = "    },"]
17175#[doc = "    {"]
17176#[doc = "      \"type\": \"object\","]
17177#[doc = "      \"required\": ["]
17178#[doc = "        \"error\""]
17179#[doc = "      ],"]
17180#[doc = "      \"properties\": {"]
17181#[doc = "        \"error\": {"]
17182#[doc = "          \"$ref\": \"#/components/schemas/ErrorWrapper_for_RpcValidatorError\""]
17183#[doc = "        }"]
17184#[doc = "      }"]
17185#[doc = "    }"]
17186#[doc = "  ],"]
17187#[doc = "  \"required\": ["]
17188#[doc = "    \"id\","]
17189#[doc = "    \"jsonrpc\""]
17190#[doc = "  ],"]
17191#[doc = "  \"properties\": {"]
17192#[doc = "    \"id\": {"]
17193#[doc = "      \"type\": \"string\""]
17194#[doc = "    },"]
17195#[doc = "    \"jsonrpc\": {"]
17196#[doc = "      \"type\": \"string\""]
17197#[doc = "    }"]
17198#[doc = "  }"]
17199#[doc = "}"]
17200#[doc = r" ```"]
17201#[doc = r" </details>"]
17202#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
17203#[serde(untagged)]
17204pub enum JsonRpcResponseForRpcValidatorResponseAndRpcValidatorError {
17205    Variant0 {
17206        id: ::std::string::String,
17207        jsonrpc: ::std::string::String,
17208        result: RpcValidatorResponse,
17209    },
17210    Variant1 {
17211        error: ErrorWrapperForRpcValidatorError,
17212        id: ::std::string::String,
17213        jsonrpc: ::std::string::String,
17214    },
17215}
17216impl ::std::convert::From<&Self> for JsonRpcResponseForRpcValidatorResponseAndRpcValidatorError {
17217    fn from(value: &JsonRpcResponseForRpcValidatorResponseAndRpcValidatorError) -> Self {
17218        value.clone()
17219    }
17220}
17221#[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."]
17222#[doc = r""]
17223#[doc = r" <details><summary>JSON schema</summary>"]
17224#[doc = r""]
17225#[doc = r" ```json"]
17226#[doc = "{"]
17227#[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.\","]
17228#[doc = "  \"type\": \"object\","]
17229#[doc = "  \"required\": ["]
17230#[doc = "    \"account_id\","]
17231#[doc = "    \"peer_id\""]
17232#[doc = "  ],"]
17233#[doc = "  \"properties\": {"]
17234#[doc = "    \"account_id\": {"]
17235#[doc = "      \"$ref\": \"#/components/schemas/AccountId\""]
17236#[doc = "    },"]
17237#[doc = "    \"next_hops\": {"]
17238#[doc = "      \"type\": ["]
17239#[doc = "        \"array\","]
17240#[doc = "        \"null\""]
17241#[doc = "      ],"]
17242#[doc = "      \"items\": {"]
17243#[doc = "        \"$ref\": \"#/components/schemas/PublicKey\""]
17244#[doc = "      }"]
17245#[doc = "    },"]
17246#[doc = "    \"peer_id\": {"]
17247#[doc = "      \"$ref\": \"#/components/schemas/PublicKey\""]
17248#[doc = "    }"]
17249#[doc = "  }"]
17250#[doc = "}"]
17251#[doc = r" ```"]
17252#[doc = r" </details>"]
17253#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
17254pub struct KnownProducerView {
17255    pub account_id: AccountId,
17256    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
17257    pub next_hops: ::std::option::Option<::std::vec::Vec<PublicKey>>,
17258    pub peer_id: PublicKey,
17259}
17260impl ::std::convert::From<&KnownProducerView> for KnownProducerView {
17261    fn from(value: &KnownProducerView) -> Self {
17262        value.clone()
17263    }
17264}
17265#[doc = "`LightClientBlockLiteView`"]
17266#[doc = r""]
17267#[doc = r" <details><summary>JSON schema</summary>"]
17268#[doc = r""]
17269#[doc = r" ```json"]
17270#[doc = "{"]
17271#[doc = "  \"type\": \"object\","]
17272#[doc = "  \"required\": ["]
17273#[doc = "    \"inner_lite\","]
17274#[doc = "    \"inner_rest_hash\","]
17275#[doc = "    \"prev_block_hash\""]
17276#[doc = "  ],"]
17277#[doc = "  \"properties\": {"]
17278#[doc = "    \"inner_lite\": {"]
17279#[doc = "      \"$ref\": \"#/components/schemas/BlockHeaderInnerLiteView\""]
17280#[doc = "    },"]
17281#[doc = "    \"inner_rest_hash\": {"]
17282#[doc = "      \"$ref\": \"#/components/schemas/CryptoHash\""]
17283#[doc = "    },"]
17284#[doc = "    \"prev_block_hash\": {"]
17285#[doc = "      \"$ref\": \"#/components/schemas/CryptoHash\""]
17286#[doc = "    }"]
17287#[doc = "  }"]
17288#[doc = "}"]
17289#[doc = r" ```"]
17290#[doc = r" </details>"]
17291#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
17292pub struct LightClientBlockLiteView {
17293    pub inner_lite: BlockHeaderInnerLiteView,
17294    pub inner_rest_hash: CryptoHash,
17295    pub prev_block_hash: CryptoHash,
17296}
17297impl ::std::convert::From<&LightClientBlockLiteView> for LightClientBlockLiteView {
17298    fn from(value: &LightClientBlockLiteView) -> Self {
17299        value.clone()
17300    }
17301}
17302#[doc = "Describes limits for VM and Runtime.\nTODO #4139: consider switching to strongly-typed wrappers instead of raw quantities"]
17303#[doc = r""]
17304#[doc = r" <details><summary>JSON schema</summary>"]
17305#[doc = r""]
17306#[doc = r" ```json"]
17307#[doc = "{"]
17308#[doc = "  \"description\": \"Describes limits for VM and Runtime.\\nTODO #4139: consider switching to strongly-typed wrappers instead of raw quantities\","]
17309#[doc = "  \"type\": \"object\","]
17310#[doc = "  \"required\": ["]
17311#[doc = "    \"initial_memory_pages\","]
17312#[doc = "    \"max_actions_per_receipt\","]
17313#[doc = "    \"max_arguments_length\","]
17314#[doc = "    \"max_contract_size\","]
17315#[doc = "    \"max_gas_burnt\","]
17316#[doc = "    \"max_length_method_name\","]
17317#[doc = "    \"max_length_returned_data\","]
17318#[doc = "    \"max_length_storage_key\","]
17319#[doc = "    \"max_length_storage_value\","]
17320#[doc = "    \"max_memory_pages\","]
17321#[doc = "    \"max_number_bytes_method_names\","]
17322#[doc = "    \"max_number_input_data_dependencies\","]
17323#[doc = "    \"max_number_logs\","]
17324#[doc = "    \"max_number_registers\","]
17325#[doc = "    \"max_promises_per_function_call_action\","]
17326#[doc = "    \"max_receipt_size\","]
17327#[doc = "    \"max_register_size\","]
17328#[doc = "    \"max_stack_height\","]
17329#[doc = "    \"max_total_log_length\","]
17330#[doc = "    \"max_total_prepaid_gas\","]
17331#[doc = "    \"max_transaction_size\","]
17332#[doc = "    \"max_yield_payload_size\","]
17333#[doc = "    \"per_receipt_storage_proof_size_limit\","]
17334#[doc = "    \"registers_memory_limit\","]
17335#[doc = "    \"yield_timeout_length_in_blocks\""]
17336#[doc = "  ],"]
17337#[doc = "  \"properties\": {"]
17338#[doc = "    \"account_id_validity_rules_version\": {"]
17339#[doc = "      \"description\": \"Whether to enforce account_id well-formed-ness where it wasn't enforced\\nhistorically.\","]
17340#[doc = "      \"default\": 0,"]
17341#[doc = "      \"allOf\": ["]
17342#[doc = "        {"]
17343#[doc = "          \"$ref\": \"#/components/schemas/AccountIdValidityRulesVersion\""]
17344#[doc = "        }"]
17345#[doc = "      ]"]
17346#[doc = "    },"]
17347#[doc = "    \"initial_memory_pages\": {"]
17348#[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.\","]
17349#[doc = "      \"type\": \"integer\","]
17350#[doc = "      \"format\": \"uint32\","]
17351#[doc = "      \"minimum\": 0.0"]
17352#[doc = "    },"]
17353#[doc = "    \"max_actions_per_receipt\": {"]
17354#[doc = "      \"description\": \"Max number of actions per receipt.\","]
17355#[doc = "      \"type\": \"integer\","]
17356#[doc = "      \"format\": \"uint64\","]
17357#[doc = "      \"minimum\": 0.0"]
17358#[doc = "    },"]
17359#[doc = "    \"max_arguments_length\": {"]
17360#[doc = "      \"description\": \"Max length of arguments in a function call action.\","]
17361#[doc = "      \"type\": \"integer\","]
17362#[doc = "      \"format\": \"uint64\","]
17363#[doc = "      \"minimum\": 0.0"]
17364#[doc = "    },"]
17365#[doc = "    \"max_contract_size\": {"]
17366#[doc = "      \"description\": \"Max contract size\","]
17367#[doc = "      \"type\": \"integer\","]
17368#[doc = "      \"format\": \"uint64\","]
17369#[doc = "      \"minimum\": 0.0"]
17370#[doc = "    },"]
17371#[doc = "    \"max_elements_per_contract_table\": {"]
17372#[doc = "      \"description\": \"If present, stores max number of elements in a single contract's table\","]
17373#[doc = "      \"type\": ["]
17374#[doc = "        \"integer\","]
17375#[doc = "        \"null\""]
17376#[doc = "      ],"]
17377#[doc = "      \"format\": \"uint\","]
17378#[doc = "      \"minimum\": 0.0"]
17379#[doc = "    },"]
17380#[doc = "    \"max_functions_number_per_contract\": {"]
17381#[doc = "      \"description\": \"If present, stores max number of functions in one contract\","]
17382#[doc = "      \"type\": ["]
17383#[doc = "        \"integer\","]
17384#[doc = "        \"null\""]
17385#[doc = "      ],"]
17386#[doc = "      \"format\": \"uint64\","]
17387#[doc = "      \"minimum\": 0.0"]
17388#[doc = "    },"]
17389#[doc = "    \"max_gas_burnt\": {"]
17390#[doc = "      \"description\": \"Max amount of gas that can be used, excluding gas attached to promises.\","]
17391#[doc = "      \"allOf\": ["]
17392#[doc = "        {"]
17393#[doc = "          \"$ref\": \"#/components/schemas/NearGas\""]
17394#[doc = "        }"]
17395#[doc = "      ]"]
17396#[doc = "    },"]
17397#[doc = "    \"max_length_method_name\": {"]
17398#[doc = "      \"description\": \"Max length of any method name (without terminating character).\","]
17399#[doc = "      \"type\": \"integer\","]
17400#[doc = "      \"format\": \"uint64\","]
17401#[doc = "      \"minimum\": 0.0"]
17402#[doc = "    },"]
17403#[doc = "    \"max_length_returned_data\": {"]
17404#[doc = "      \"description\": \"Max length of returned data\","]
17405#[doc = "      \"type\": \"integer\","]
17406#[doc = "      \"format\": \"uint64\","]
17407#[doc = "      \"minimum\": 0.0"]
17408#[doc = "    },"]
17409#[doc = "    \"max_length_storage_key\": {"]
17410#[doc = "      \"description\": \"Max storage key size\","]
17411#[doc = "      \"type\": \"integer\","]
17412#[doc = "      \"format\": \"uint64\","]
17413#[doc = "      \"minimum\": 0.0"]
17414#[doc = "    },"]
17415#[doc = "    \"max_length_storage_value\": {"]
17416#[doc = "      \"description\": \"Max storage value size\","]
17417#[doc = "      \"type\": \"integer\","]
17418#[doc = "      \"format\": \"uint64\","]
17419#[doc = "      \"minimum\": 0.0"]
17420#[doc = "    },"]
17421#[doc = "    \"max_locals_per_contract\": {"]
17422#[doc = "      \"description\": \"If present, stores max number of locals declared globally in one contract\","]
17423#[doc = "      \"type\": ["]
17424#[doc = "        \"integer\","]
17425#[doc = "        \"null\""]
17426#[doc = "      ],"]
17427#[doc = "      \"format\": \"uint64\","]
17428#[doc = "      \"minimum\": 0.0"]
17429#[doc = "    },"]
17430#[doc = "    \"max_memory_pages\": {"]
17431#[doc = "      \"description\": \"What is the maximal memory pages amount is allowed to have for a contract.\","]
17432#[doc = "      \"type\": \"integer\","]
17433#[doc = "      \"format\": \"uint32\","]
17434#[doc = "      \"minimum\": 0.0"]
17435#[doc = "    },"]
17436#[doc = "    \"max_number_bytes_method_names\": {"]
17437#[doc = "      \"description\": \"Max total length of all method names (including terminating character) for a function call\\npermission access key.\","]
17438#[doc = "      \"type\": \"integer\","]
17439#[doc = "      \"format\": \"uint64\","]
17440#[doc = "      \"minimum\": 0.0"]
17441#[doc = "    },"]
17442#[doc = "    \"max_number_input_data_dependencies\": {"]
17443#[doc = "      \"description\": \"Max number of input data dependencies\","]
17444#[doc = "      \"type\": \"integer\","]
17445#[doc = "      \"format\": \"uint64\","]
17446#[doc = "      \"minimum\": 0.0"]
17447#[doc = "    },"]
17448#[doc = "    \"max_number_logs\": {"]
17449#[doc = "      \"description\": \"Maximum number of log entries.\","]
17450#[doc = "      \"type\": \"integer\","]
17451#[doc = "      \"format\": \"uint64\","]
17452#[doc = "      \"minimum\": 0.0"]
17453#[doc = "    },"]
17454#[doc = "    \"max_number_registers\": {"]
17455#[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.\","]
17456#[doc = "      \"type\": \"integer\","]
17457#[doc = "      \"format\": \"uint64\","]
17458#[doc = "      \"minimum\": 0.0"]
17459#[doc = "    },"]
17460#[doc = "    \"max_promises_per_function_call_action\": {"]
17461#[doc = "      \"description\": \"Max number of promises that a function call can create\","]
17462#[doc = "      \"type\": \"integer\","]
17463#[doc = "      \"format\": \"uint64\","]
17464#[doc = "      \"minimum\": 0.0"]
17465#[doc = "    },"]
17466#[doc = "    \"max_receipt_size\": {"]
17467#[doc = "      \"description\": \"Max receipt size\","]
17468#[doc = "      \"type\": \"integer\","]
17469#[doc = "      \"format\": \"uint64\","]
17470#[doc = "      \"minimum\": 0.0"]
17471#[doc = "    },"]
17472#[doc = "    \"max_register_size\": {"]
17473#[doc = "      \"description\": \"Maximum number of bytes that can be stored in a single register.\","]
17474#[doc = "      \"type\": \"integer\","]
17475#[doc = "      \"format\": \"uint64\","]
17476#[doc = "      \"minimum\": 0.0"]
17477#[doc = "    },"]
17478#[doc = "    \"max_stack_height\": {"]
17479#[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.\","]
17480#[doc = "      \"type\": \"integer\","]
17481#[doc = "      \"format\": \"uint32\","]
17482#[doc = "      \"minimum\": 0.0"]
17483#[doc = "    },"]
17484#[doc = "    \"max_tables_per_contract\": {"]
17485#[doc = "      \"description\": \"If present, stores max number of tables declared globally in one contract\","]
17486#[doc = "      \"type\": ["]
17487#[doc = "        \"integer\","]
17488#[doc = "        \"null\""]
17489#[doc = "      ],"]
17490#[doc = "      \"format\": \"uint32\","]
17491#[doc = "      \"minimum\": 0.0"]
17492#[doc = "    },"]
17493#[doc = "    \"max_total_log_length\": {"]
17494#[doc = "      \"description\": \"Maximum total length in bytes of all log messages.\","]
17495#[doc = "      \"type\": \"integer\","]
17496#[doc = "      \"format\": \"uint64\","]
17497#[doc = "      \"minimum\": 0.0"]
17498#[doc = "    },"]
17499#[doc = "    \"max_total_prepaid_gas\": {"]
17500#[doc = "      \"description\": \"Max total prepaid gas for all function call actions per receipt.\","]
17501#[doc = "      \"allOf\": ["]
17502#[doc = "        {"]
17503#[doc = "          \"$ref\": \"#/components/schemas/NearGas\""]
17504#[doc = "        }"]
17505#[doc = "      ]"]
17506#[doc = "    },"]
17507#[doc = "    \"max_transaction_size\": {"]
17508#[doc = "      \"description\": \"Max transaction size\","]
17509#[doc = "      \"type\": \"integer\","]
17510#[doc = "      \"format\": \"uint64\","]
17511#[doc = "      \"minimum\": 0.0"]
17512#[doc = "    },"]
17513#[doc = "    \"max_yield_payload_size\": {"]
17514#[doc = "      \"description\": \"Maximum number of bytes for payload passed over a yield resume.\","]
17515#[doc = "      \"type\": \"integer\","]
17516#[doc = "      \"format\": \"uint64\","]
17517#[doc = "      \"minimum\": 0.0"]
17518#[doc = "    },"]
17519#[doc = "    \"per_receipt_storage_proof_size_limit\": {"]
17520#[doc = "      \"description\": \"Hard limit on the size of storage proof generated while executing a single receipt.\","]
17521#[doc = "      \"type\": \"integer\","]
17522#[doc = "      \"format\": \"uint\","]
17523#[doc = "      \"minimum\": 0.0"]
17524#[doc = "    },"]
17525#[doc = "    \"registers_memory_limit\": {"]
17526#[doc = "      \"description\": \"Limit of memory used by registers.\","]
17527#[doc = "      \"type\": \"integer\","]
17528#[doc = "      \"format\": \"uint64\","]
17529#[doc = "      \"minimum\": 0.0"]
17530#[doc = "    },"]
17531#[doc = "    \"yield_timeout_length_in_blocks\": {"]
17532#[doc = "      \"description\": \"Number of blocks after which a yielded promise times out.\","]
17533#[doc = "      \"type\": \"integer\","]
17534#[doc = "      \"format\": \"uint64\","]
17535#[doc = "      \"minimum\": 0.0"]
17536#[doc = "    }"]
17537#[doc = "  }"]
17538#[doc = "}"]
17539#[doc = r" ```"]
17540#[doc = r" </details>"]
17541#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
17542pub struct LimitConfig {
17543    #[doc = "Whether to enforce account_id well-formed-ness where it wasn't enforced\nhistorically."]
17544    #[serde(default = "defaults::limit_config_account_id_validity_rules_version")]
17545    pub account_id_validity_rules_version: AccountIdValidityRulesVersion,
17546    #[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."]
17547    pub initial_memory_pages: u32,
17548    #[doc = "Max number of actions per receipt."]
17549    pub max_actions_per_receipt: u64,
17550    #[doc = "Max length of arguments in a function call action."]
17551    pub max_arguments_length: u64,
17552    #[doc = "Max contract size"]
17553    pub max_contract_size: u64,
17554    #[doc = "If present, stores max number of elements in a single contract's table"]
17555    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
17556    pub max_elements_per_contract_table: ::std::option::Option<u32>,
17557    #[doc = "If present, stores max number of functions in one contract"]
17558    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
17559    pub max_functions_number_per_contract: ::std::option::Option<u64>,
17560    #[doc = "Max amount of gas that can be used, excluding gas attached to promises."]
17561    pub max_gas_burnt: NearGas,
17562    #[doc = "Max length of any method name (without terminating character)."]
17563    pub max_length_method_name: u64,
17564    #[doc = "Max length of returned data"]
17565    pub max_length_returned_data: u64,
17566    #[doc = "Max storage key size"]
17567    pub max_length_storage_key: u64,
17568    #[doc = "Max storage value size"]
17569    pub max_length_storage_value: u64,
17570    #[doc = "If present, stores max number of locals declared globally in one contract"]
17571    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
17572    pub max_locals_per_contract: ::std::option::Option<u64>,
17573    #[doc = "What is the maximal memory pages amount is allowed to have for a contract."]
17574    pub max_memory_pages: u32,
17575    #[doc = "Max total length of all method names (including terminating character) for a function call\npermission access key."]
17576    pub max_number_bytes_method_names: u64,
17577    #[doc = "Max number of input data dependencies"]
17578    pub max_number_input_data_dependencies: u64,
17579    #[doc = "Maximum number of log entries."]
17580    pub max_number_logs: u64,
17581    #[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."]
17582    pub max_number_registers: u64,
17583    #[doc = "Max number of promises that a function call can create"]
17584    pub max_promises_per_function_call_action: u64,
17585    #[doc = "Max receipt size"]
17586    pub max_receipt_size: u64,
17587    #[doc = "Maximum number of bytes that can be stored in a single register."]
17588    pub max_register_size: u64,
17589    #[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."]
17590    pub max_stack_height: u32,
17591    #[doc = "If present, stores max number of tables declared globally in one contract"]
17592    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
17593    pub max_tables_per_contract: ::std::option::Option<u32>,
17594    #[doc = "Maximum total length in bytes of all log messages."]
17595    pub max_total_log_length: u64,
17596    #[doc = "Max total prepaid gas for all function call actions per receipt."]
17597    pub max_total_prepaid_gas: NearGas,
17598    #[doc = "Max transaction size"]
17599    pub max_transaction_size: u64,
17600    #[doc = "Maximum number of bytes for payload passed over a yield resume."]
17601    pub max_yield_payload_size: u64,
17602    #[doc = "Hard limit on the size of storage proof generated while executing a single receipt."]
17603    pub per_receipt_storage_proof_size_limit: u32,
17604    #[doc = "Limit of memory used by registers."]
17605    pub registers_memory_limit: u64,
17606    #[doc = "Number of blocks after which a yielded promise times out."]
17607    pub yield_timeout_length_in_blocks: u64,
17608}
17609impl ::std::convert::From<&LimitConfig> for LimitConfig {
17610    fn from(value: &LimitConfig) -> Self {
17611        value.clone()
17612    }
17613}
17614#[doc = "`LogSummaryStyle`"]
17615#[doc = r""]
17616#[doc = r" <details><summary>JSON schema</summary>"]
17617#[doc = r""]
17618#[doc = r" ```json"]
17619#[doc = "{"]
17620#[doc = "  \"type\": \"string\","]
17621#[doc = "  \"enum\": ["]
17622#[doc = "    \"plain\","]
17623#[doc = "    \"colored\""]
17624#[doc = "  ]"]
17625#[doc = "}"]
17626#[doc = r" ```"]
17627#[doc = r" </details>"]
17628#[derive(
17629    :: serde :: Deserialize,
17630    :: serde :: Serialize,
17631    Clone,
17632    Copy,
17633    Debug,
17634    Eq,
17635    Hash,
17636    Ord,
17637    PartialEq,
17638    PartialOrd,
17639)]
17640pub enum LogSummaryStyle {
17641    #[serde(rename = "plain")]
17642    Plain,
17643    #[serde(rename = "colored")]
17644    Colored,
17645}
17646impl ::std::convert::From<&Self> for LogSummaryStyle {
17647    fn from(value: &LogSummaryStyle) -> Self {
17648        value.clone()
17649    }
17650}
17651impl ::std::fmt::Display for LogSummaryStyle {
17652    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
17653        match *self {
17654            Self::Plain => f.write_str("plain"),
17655            Self::Colored => f.write_str("colored"),
17656        }
17657    }
17658}
17659impl ::std::str::FromStr for LogSummaryStyle {
17660    type Err = self::error::ConversionError;
17661    fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
17662        match value {
17663            "plain" => Ok(Self::Plain),
17664            "colored" => Ok(Self::Colored),
17665            _ => Err("invalid value".into()),
17666        }
17667    }
17668}
17669impl ::std::convert::TryFrom<&str> for LogSummaryStyle {
17670    type Error = self::error::ConversionError;
17671    fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
17672        value.parse()
17673    }
17674}
17675impl ::std::convert::TryFrom<&::std::string::String> for LogSummaryStyle {
17676    type Error = self::error::ConversionError;
17677    fn try_from(
17678        value: &::std::string::String,
17679    ) -> ::std::result::Result<Self, self::error::ConversionError> {
17680        value.parse()
17681    }
17682}
17683impl ::std::convert::TryFrom<::std::string::String> for LogSummaryStyle {
17684    type Error = self::error::ConversionError;
17685    fn try_from(
17686        value: ::std::string::String,
17687    ) -> ::std::result::Result<Self, self::error::ConversionError> {
17688        value.parse()
17689    }
17690}
17691#[doc = "`MerklePathItem`"]
17692#[doc = r""]
17693#[doc = r" <details><summary>JSON schema</summary>"]
17694#[doc = r""]
17695#[doc = r" ```json"]
17696#[doc = "{"]
17697#[doc = "  \"type\": \"object\","]
17698#[doc = "  \"required\": ["]
17699#[doc = "    \"direction\","]
17700#[doc = "    \"hash\""]
17701#[doc = "  ],"]
17702#[doc = "  \"properties\": {"]
17703#[doc = "    \"direction\": {"]
17704#[doc = "      \"$ref\": \"#/components/schemas/Direction\""]
17705#[doc = "    },"]
17706#[doc = "    \"hash\": {"]
17707#[doc = "      \"$ref\": \"#/components/schemas/CryptoHash\""]
17708#[doc = "    }"]
17709#[doc = "  }"]
17710#[doc = "}"]
17711#[doc = r" ```"]
17712#[doc = r" </details>"]
17713#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
17714pub struct MerklePathItem {
17715    pub direction: Direction,
17716    pub hash: CryptoHash,
17717}
17718impl ::std::convert::From<&MerklePathItem> for MerklePathItem {
17719    fn from(value: &MerklePathItem) -> Self {
17720        value.clone()
17721    }
17722}
17723#[doc = "`MethodResolveError`"]
17724#[doc = r""]
17725#[doc = r" <details><summary>JSON schema</summary>"]
17726#[doc = r""]
17727#[doc = r" ```json"]
17728#[doc = "{"]
17729#[doc = "  \"type\": \"string\","]
17730#[doc = "  \"enum\": ["]
17731#[doc = "    \"MethodEmptyName\","]
17732#[doc = "    \"MethodNotFound\","]
17733#[doc = "    \"MethodInvalidSignature\""]
17734#[doc = "  ]"]
17735#[doc = "}"]
17736#[doc = r" ```"]
17737#[doc = r" </details>"]
17738#[derive(
17739    :: serde :: Deserialize,
17740    :: serde :: Serialize,
17741    Clone,
17742    Copy,
17743    Debug,
17744    Eq,
17745    Hash,
17746    Ord,
17747    PartialEq,
17748    PartialOrd,
17749)]
17750pub enum MethodResolveError {
17751    MethodEmptyName,
17752    MethodNotFound,
17753    MethodInvalidSignature,
17754}
17755impl ::std::convert::From<&Self> for MethodResolveError {
17756    fn from(value: &MethodResolveError) -> Self {
17757        value.clone()
17758    }
17759}
17760impl ::std::fmt::Display for MethodResolveError {
17761    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
17762        match *self {
17763            Self::MethodEmptyName => f.write_str("MethodEmptyName"),
17764            Self::MethodNotFound => f.write_str("MethodNotFound"),
17765            Self::MethodInvalidSignature => f.write_str("MethodInvalidSignature"),
17766        }
17767    }
17768}
17769impl ::std::str::FromStr for MethodResolveError {
17770    type Err = self::error::ConversionError;
17771    fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
17772        match value {
17773            "MethodEmptyName" => Ok(Self::MethodEmptyName),
17774            "MethodNotFound" => Ok(Self::MethodNotFound),
17775            "MethodInvalidSignature" => Ok(Self::MethodInvalidSignature),
17776            _ => Err("invalid value".into()),
17777        }
17778    }
17779}
17780impl ::std::convert::TryFrom<&str> for MethodResolveError {
17781    type Error = self::error::ConversionError;
17782    fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
17783        value.parse()
17784    }
17785}
17786impl ::std::convert::TryFrom<&::std::string::String> for MethodResolveError {
17787    type Error = self::error::ConversionError;
17788    fn try_from(
17789        value: &::std::string::String,
17790    ) -> ::std::result::Result<Self, self::error::ConversionError> {
17791        value.parse()
17792    }
17793}
17794impl ::std::convert::TryFrom<::std::string::String> for MethodResolveError {
17795    type Error = self::error::ConversionError;
17796    fn try_from(
17797        value: ::std::string::String,
17798    ) -> ::std::result::Result<Self, self::error::ConversionError> {
17799        value.parse()
17800    }
17801}
17802#[doc = "`MissingTrieValue`"]
17803#[doc = r""]
17804#[doc = r" <details><summary>JSON schema</summary>"]
17805#[doc = r""]
17806#[doc = r" ```json"]
17807#[doc = "{"]
17808#[doc = "  \"type\": \"object\","]
17809#[doc = "  \"required\": ["]
17810#[doc = "    \"context\","]
17811#[doc = "    \"hash\""]
17812#[doc = "  ],"]
17813#[doc = "  \"properties\": {"]
17814#[doc = "    \"context\": {"]
17815#[doc = "      \"$ref\": \"#/components/schemas/MissingTrieValueContext\""]
17816#[doc = "    },"]
17817#[doc = "    \"hash\": {"]
17818#[doc = "      \"$ref\": \"#/components/schemas/CryptoHash\""]
17819#[doc = "    }"]
17820#[doc = "  }"]
17821#[doc = "}"]
17822#[doc = r" ```"]
17823#[doc = r" </details>"]
17824#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
17825pub struct MissingTrieValue {
17826    pub context: MissingTrieValueContext,
17827    pub hash: CryptoHash,
17828}
17829impl ::std::convert::From<&MissingTrieValue> for MissingTrieValue {
17830    fn from(value: &MissingTrieValue) -> Self {
17831        value.clone()
17832    }
17833}
17834#[doc = "Contexts in which `StorageError::MissingTrieValue` error might occur."]
17835#[doc = r""]
17836#[doc = r" <details><summary>JSON schema</summary>"]
17837#[doc = r""]
17838#[doc = r" ```json"]
17839#[doc = "{"]
17840#[doc = "  \"description\": \"Contexts in which `StorageError::MissingTrieValue` error might occur.\","]
17841#[doc = "  \"oneOf\": ["]
17842#[doc = "    {"]
17843#[doc = "      \"description\": \"Missing trie value when reading from TrieIterator.\","]
17844#[doc = "      \"type\": \"string\","]
17845#[doc = "      \"enum\": ["]
17846#[doc = "        \"TrieIterator\""]
17847#[doc = "      ]"]
17848#[doc = "    },"]
17849#[doc = "    {"]
17850#[doc = "      \"description\": \"Missing trie value when reading from TriePrefetchingStorage.\","]
17851#[doc = "      \"type\": \"string\","]
17852#[doc = "      \"enum\": ["]
17853#[doc = "        \"TriePrefetchingStorage\""]
17854#[doc = "      ]"]
17855#[doc = "    },"]
17856#[doc = "    {"]
17857#[doc = "      \"description\": \"Missing trie value when reading from TrieMemoryPartialStorage.\","]
17858#[doc = "      \"type\": \"string\","]
17859#[doc = "      \"enum\": ["]
17860#[doc = "        \"TrieMemoryPartialStorage\""]
17861#[doc = "      ]"]
17862#[doc = "    },"]
17863#[doc = "    {"]
17864#[doc = "      \"description\": \"Missing trie value when reading from TrieStorage.\","]
17865#[doc = "      \"type\": \"string\","]
17866#[doc = "      \"enum\": ["]
17867#[doc = "        \"TrieStorage\""]
17868#[doc = "      ]"]
17869#[doc = "    }"]
17870#[doc = "  ]"]
17871#[doc = "}"]
17872#[doc = r" ```"]
17873#[doc = r" </details>"]
17874#[derive(
17875    :: serde :: Deserialize,
17876    :: serde :: Serialize,
17877    Clone,
17878    Copy,
17879    Debug,
17880    Eq,
17881    Hash,
17882    Ord,
17883    PartialEq,
17884    PartialOrd,
17885)]
17886pub enum MissingTrieValueContext {
17887    #[doc = "Missing trie value when reading from TrieIterator."]
17888    TrieIterator,
17889    #[doc = "Missing trie value when reading from TriePrefetchingStorage."]
17890    TriePrefetchingStorage,
17891    #[doc = "Missing trie value when reading from TrieMemoryPartialStorage."]
17892    TrieMemoryPartialStorage,
17893    #[doc = "Missing trie value when reading from TrieStorage."]
17894    TrieStorage,
17895}
17896impl ::std::convert::From<&Self> for MissingTrieValueContext {
17897    fn from(value: &MissingTrieValueContext) -> Self {
17898        value.clone()
17899    }
17900}
17901impl ::std::fmt::Display for MissingTrieValueContext {
17902    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
17903        match *self {
17904            Self::TrieIterator => f.write_str("TrieIterator"),
17905            Self::TriePrefetchingStorage => f.write_str("TriePrefetchingStorage"),
17906            Self::TrieMemoryPartialStorage => f.write_str("TrieMemoryPartialStorage"),
17907            Self::TrieStorage => f.write_str("TrieStorage"),
17908        }
17909    }
17910}
17911impl ::std::str::FromStr for MissingTrieValueContext {
17912    type Err = self::error::ConversionError;
17913    fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
17914        match value {
17915            "TrieIterator" => Ok(Self::TrieIterator),
17916            "TriePrefetchingStorage" => Ok(Self::TriePrefetchingStorage),
17917            "TrieMemoryPartialStorage" => Ok(Self::TrieMemoryPartialStorage),
17918            "TrieStorage" => Ok(Self::TrieStorage),
17919            _ => Err("invalid value".into()),
17920        }
17921    }
17922}
17923impl ::std::convert::TryFrom<&str> for MissingTrieValueContext {
17924    type Error = self::error::ConversionError;
17925    fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
17926        value.parse()
17927    }
17928}
17929impl ::std::convert::TryFrom<&::std::string::String> for MissingTrieValueContext {
17930    type Error = self::error::ConversionError;
17931    fn try_from(
17932        value: &::std::string::String,
17933    ) -> ::std::result::Result<Self, self::error::ConversionError> {
17934        value.parse()
17935    }
17936}
17937impl ::std::convert::TryFrom<::std::string::String> for MissingTrieValueContext {
17938    type Error = self::error::ConversionError;
17939    fn try_from(
17940        value: ::std::string::String,
17941    ) -> ::std::result::Result<Self, self::error::ConversionError> {
17942        value.parse()
17943    }
17944}
17945#[doc = "`MutableConfigValue`"]
17946#[doc = r""]
17947#[doc = r" <details><summary>JSON schema</summary>"]
17948#[doc = r""]
17949#[doc = r" ```json"]
17950#[doc = "{"]
17951#[doc = "  \"type\": \"string\""]
17952#[doc = "}"]
17953#[doc = r" ```"]
17954#[doc = r" </details>"]
17955#[derive(
17956    :: serde :: Deserialize,
17957    :: serde :: Serialize,
17958    Clone,
17959    Debug,
17960    Eq,
17961    Hash,
17962    Ord,
17963    PartialEq,
17964    PartialOrd,
17965)]
17966#[serde(transparent)]
17967pub struct MutableConfigValue(pub ::std::string::String);
17968impl ::std::ops::Deref for MutableConfigValue {
17969    type Target = ::std::string::String;
17970    fn deref(&self) -> &::std::string::String {
17971        &self.0
17972    }
17973}
17974impl ::std::convert::From<MutableConfigValue> for ::std::string::String {
17975    fn from(value: MutableConfigValue) -> Self {
17976        value.0
17977    }
17978}
17979impl ::std::convert::From<&MutableConfigValue> for MutableConfigValue {
17980    fn from(value: &MutableConfigValue) -> Self {
17981        value.clone()
17982    }
17983}
17984impl ::std::convert::From<::std::string::String> for MutableConfigValue {
17985    fn from(value: ::std::string::String) -> Self {
17986        Self(value)
17987    }
17988}
17989impl ::std::str::FromStr for MutableConfigValue {
17990    type Err = ::std::convert::Infallible;
17991    fn from_str(value: &str) -> ::std::result::Result<Self, Self::Err> {
17992        Ok(Self(value.to_string()))
17993    }
17994}
17995impl ::std::fmt::Display for MutableConfigValue {
17996    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
17997        self.0.fmt(f)
17998    }
17999}
18000#[doc = "`NetworkInfoView`"]
18001#[doc = r""]
18002#[doc = r" <details><summary>JSON schema</summary>"]
18003#[doc = r""]
18004#[doc = r" ```json"]
18005#[doc = "{"]
18006#[doc = "  \"type\": \"object\","]
18007#[doc = "  \"required\": ["]
18008#[doc = "    \"connected_peers\","]
18009#[doc = "    \"known_producers\","]
18010#[doc = "    \"num_connected_peers\","]
18011#[doc = "    \"peer_max_count\","]
18012#[doc = "    \"tier1_accounts_data\","]
18013#[doc = "    \"tier1_accounts_keys\","]
18014#[doc = "    \"tier1_connections\""]
18015#[doc = "  ],"]
18016#[doc = "  \"properties\": {"]
18017#[doc = "    \"connected_peers\": {"]
18018#[doc = "      \"type\": \"array\","]
18019#[doc = "      \"items\": {"]
18020#[doc = "        \"$ref\": \"#/components/schemas/PeerInfoView\""]
18021#[doc = "      }"]
18022#[doc = "    },"]
18023#[doc = "    \"known_producers\": {"]
18024#[doc = "      \"type\": \"array\","]
18025#[doc = "      \"items\": {"]
18026#[doc = "        \"$ref\": \"#/components/schemas/KnownProducerView\""]
18027#[doc = "      }"]
18028#[doc = "    },"]
18029#[doc = "    \"num_connected_peers\": {"]
18030#[doc = "      \"type\": \"integer\","]
18031#[doc = "      \"format\": \"uint\","]
18032#[doc = "      \"minimum\": 0.0"]
18033#[doc = "    },"]
18034#[doc = "    \"peer_max_count\": {"]
18035#[doc = "      \"type\": \"integer\","]
18036#[doc = "      \"format\": \"uint32\","]
18037#[doc = "      \"minimum\": 0.0"]
18038#[doc = "    },"]
18039#[doc = "    \"tier1_accounts_data\": {"]
18040#[doc = "      \"type\": \"array\","]
18041#[doc = "      \"items\": {"]
18042#[doc = "        \"$ref\": \"#/components/schemas/AccountDataView\""]
18043#[doc = "      }"]
18044#[doc = "    },"]
18045#[doc = "    \"tier1_accounts_keys\": {"]
18046#[doc = "      \"type\": \"array\","]
18047#[doc = "      \"items\": {"]
18048#[doc = "        \"$ref\": \"#/components/schemas/PublicKey\""]
18049#[doc = "      }"]
18050#[doc = "    },"]
18051#[doc = "    \"tier1_connections\": {"]
18052#[doc = "      \"type\": \"array\","]
18053#[doc = "      \"items\": {"]
18054#[doc = "        \"$ref\": \"#/components/schemas/PeerInfoView\""]
18055#[doc = "      }"]
18056#[doc = "    }"]
18057#[doc = "  }"]
18058#[doc = "}"]
18059#[doc = r" ```"]
18060#[doc = r" </details>"]
18061#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
18062pub struct NetworkInfoView {
18063    pub connected_peers: ::std::vec::Vec<PeerInfoView>,
18064    pub known_producers: ::std::vec::Vec<KnownProducerView>,
18065    pub num_connected_peers: u32,
18066    pub peer_max_count: u32,
18067    pub tier1_accounts_data: ::std::vec::Vec<AccountDataView>,
18068    pub tier1_accounts_keys: ::std::vec::Vec<PublicKey>,
18069    pub tier1_connections: ::std::vec::Vec<PeerInfoView>,
18070}
18071impl ::std::convert::From<&NetworkInfoView> for NetworkInfoView {
18072    fn from(value: &NetworkInfoView) -> Self {
18073        value.clone()
18074    }
18075}
18076#[doc = "`NextEpochValidatorInfo`"]
18077#[doc = r""]
18078#[doc = r" <details><summary>JSON schema</summary>"]
18079#[doc = r""]
18080#[doc = r" ```json"]
18081#[doc = "{"]
18082#[doc = "  \"type\": \"object\","]
18083#[doc = "  \"required\": ["]
18084#[doc = "    \"account_id\","]
18085#[doc = "    \"public_key\","]
18086#[doc = "    \"shards\","]
18087#[doc = "    \"stake\""]
18088#[doc = "  ],"]
18089#[doc = "  \"properties\": {"]
18090#[doc = "    \"account_id\": {"]
18091#[doc = "      \"$ref\": \"#/components/schemas/AccountId\""]
18092#[doc = "    },"]
18093#[doc = "    \"public_key\": {"]
18094#[doc = "      \"$ref\": \"#/components/schemas/PublicKey\""]
18095#[doc = "    },"]
18096#[doc = "    \"shards\": {"]
18097#[doc = "      \"type\": \"array\","]
18098#[doc = "      \"items\": {"]
18099#[doc = "        \"$ref\": \"#/components/schemas/ShardId\""]
18100#[doc = "      }"]
18101#[doc = "    },"]
18102#[doc = "    \"stake\": {"]
18103#[doc = "      \"$ref\": \"#/components/schemas/NearToken\""]
18104#[doc = "    }"]
18105#[doc = "  }"]
18106#[doc = "}"]
18107#[doc = r" ```"]
18108#[doc = r" </details>"]
18109#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
18110pub struct NextEpochValidatorInfo {
18111    pub account_id: AccountId,
18112    pub public_key: PublicKey,
18113    pub shards: ::std::vec::Vec<ShardId>,
18114    pub stake: NearToken,
18115}
18116impl ::std::convert::From<&NextEpochValidatorInfo> for NextEpochValidatorInfo {
18117    fn from(value: &NextEpochValidatorInfo) -> Self {
18118        value.clone()
18119    }
18120}
18121#[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."]
18122#[doc = r""]
18123#[doc = r" <details><summary>JSON schema</summary>"]
18124#[doc = r""]
18125#[doc = r" ```json"]
18126#[doc = "{"]
18127#[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.\","]
18128#[doc = "  \"oneOf\": ["]
18129#[doc = "    {"]
18130#[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<https://nomicon.io/DataStructures/Account>.\","]
18131#[doc = "      \"type\": \"object\","]
18132#[doc = "      \"required\": ["]
18133#[doc = "        \"CreateAccount\""]
18134#[doc = "      ],"]
18135#[doc = "      \"properties\": {"]
18136#[doc = "        \"CreateAccount\": {"]
18137#[doc = "          \"$ref\": \"#/components/schemas/CreateAccountAction\""]
18138#[doc = "        }"]
18139#[doc = "      },"]
18140#[doc = "      \"additionalProperties\": false"]
18141#[doc = "    },"]
18142#[doc = "    {"]
18143#[doc = "      \"description\": \"Sets a Wasm code to a receiver_id\","]
18144#[doc = "      \"type\": \"object\","]
18145#[doc = "      \"required\": ["]
18146#[doc = "        \"DeployContract\""]
18147#[doc = "      ],"]
18148#[doc = "      \"properties\": {"]
18149#[doc = "        \"DeployContract\": {"]
18150#[doc = "          \"$ref\": \"#/components/schemas/DeployContractAction\""]
18151#[doc = "        }"]
18152#[doc = "      },"]
18153#[doc = "      \"additionalProperties\": false"]
18154#[doc = "    },"]
18155#[doc = "    {"]
18156#[doc = "      \"type\": \"object\","]
18157#[doc = "      \"required\": ["]
18158#[doc = "        \"FunctionCall\""]
18159#[doc = "      ],"]
18160#[doc = "      \"properties\": {"]
18161#[doc = "        \"FunctionCall\": {"]
18162#[doc = "          \"$ref\": \"#/components/schemas/FunctionCallAction\""]
18163#[doc = "        }"]
18164#[doc = "      },"]
18165#[doc = "      \"additionalProperties\": false"]
18166#[doc = "    },"]
18167#[doc = "    {"]
18168#[doc = "      \"type\": \"object\","]
18169#[doc = "      \"required\": ["]
18170#[doc = "        \"Transfer\""]
18171#[doc = "      ],"]
18172#[doc = "      \"properties\": {"]
18173#[doc = "        \"Transfer\": {"]
18174#[doc = "          \"$ref\": \"#/components/schemas/TransferAction\""]
18175#[doc = "        }"]
18176#[doc = "      },"]
18177#[doc = "      \"additionalProperties\": false"]
18178#[doc = "    },"]
18179#[doc = "    {"]
18180#[doc = "      \"type\": \"object\","]
18181#[doc = "      \"required\": ["]
18182#[doc = "        \"Stake\""]
18183#[doc = "      ],"]
18184#[doc = "      \"properties\": {"]
18185#[doc = "        \"Stake\": {"]
18186#[doc = "          \"$ref\": \"#/components/schemas/StakeAction\""]
18187#[doc = "        }"]
18188#[doc = "      },"]
18189#[doc = "      \"additionalProperties\": false"]
18190#[doc = "    },"]
18191#[doc = "    {"]
18192#[doc = "      \"type\": \"object\","]
18193#[doc = "      \"required\": ["]
18194#[doc = "        \"AddKey\""]
18195#[doc = "      ],"]
18196#[doc = "      \"properties\": {"]
18197#[doc = "        \"AddKey\": {"]
18198#[doc = "          \"$ref\": \"#/components/schemas/AddKeyAction\""]
18199#[doc = "        }"]
18200#[doc = "      },"]
18201#[doc = "      \"additionalProperties\": false"]
18202#[doc = "    },"]
18203#[doc = "    {"]
18204#[doc = "      \"type\": \"object\","]
18205#[doc = "      \"required\": ["]
18206#[doc = "        \"DeleteKey\""]
18207#[doc = "      ],"]
18208#[doc = "      \"properties\": {"]
18209#[doc = "        \"DeleteKey\": {"]
18210#[doc = "          \"$ref\": \"#/components/schemas/DeleteKeyAction\""]
18211#[doc = "        }"]
18212#[doc = "      },"]
18213#[doc = "      \"additionalProperties\": false"]
18214#[doc = "    },"]
18215#[doc = "    {"]
18216#[doc = "      \"type\": \"object\","]
18217#[doc = "      \"required\": ["]
18218#[doc = "        \"DeleteAccount\""]
18219#[doc = "      ],"]
18220#[doc = "      \"properties\": {"]
18221#[doc = "        \"DeleteAccount\": {"]
18222#[doc = "          \"$ref\": \"#/components/schemas/DeleteAccountAction\""]
18223#[doc = "        }"]
18224#[doc = "      },"]
18225#[doc = "      \"additionalProperties\": false"]
18226#[doc = "    },"]
18227#[doc = "    {"]
18228#[doc = "      \"type\": \"object\","]
18229#[doc = "      \"required\": ["]
18230#[doc = "        \"DeployGlobalContract\""]
18231#[doc = "      ],"]
18232#[doc = "      \"properties\": {"]
18233#[doc = "        \"DeployGlobalContract\": {"]
18234#[doc = "          \"$ref\": \"#/components/schemas/DeployGlobalContractAction\""]
18235#[doc = "        }"]
18236#[doc = "      },"]
18237#[doc = "      \"additionalProperties\": false"]
18238#[doc = "    },"]
18239#[doc = "    {"]
18240#[doc = "      \"type\": \"object\","]
18241#[doc = "      \"required\": ["]
18242#[doc = "        \"UseGlobalContract\""]
18243#[doc = "      ],"]
18244#[doc = "      \"properties\": {"]
18245#[doc = "        \"UseGlobalContract\": {"]
18246#[doc = "          \"$ref\": \"#/components/schemas/UseGlobalContractAction\""]
18247#[doc = "        }"]
18248#[doc = "      },"]
18249#[doc = "      \"additionalProperties\": false"]
18250#[doc = "    },"]
18251#[doc = "    {"]
18252#[doc = "      \"type\": \"object\","]
18253#[doc = "      \"required\": ["]
18254#[doc = "        \"DeterministicStateInit\""]
18255#[doc = "      ],"]
18256#[doc = "      \"properties\": {"]
18257#[doc = "        \"DeterministicStateInit\": {"]
18258#[doc = "          \"$ref\": \"#/components/schemas/DeterministicStateInitAction\""]
18259#[doc = "        }"]
18260#[doc = "      },"]
18261#[doc = "      \"additionalProperties\": false"]
18262#[doc = "    }"]
18263#[doc = "  ]"]
18264#[doc = "}"]
18265#[doc = r" ```"]
18266#[doc = r" </details>"]
18267#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
18268pub enum NonDelegateAction {
18269    #[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<https://nomicon.io/DataStructures/Account>."]
18270    CreateAccount(CreateAccountAction),
18271    #[doc = "Sets a Wasm code to a receiver_id"]
18272    DeployContract(DeployContractAction),
18273    FunctionCall(FunctionCallAction),
18274    Transfer(TransferAction),
18275    Stake(StakeAction),
18276    AddKey(AddKeyAction),
18277    DeleteKey(DeleteKeyAction),
18278    DeleteAccount(DeleteAccountAction),
18279    DeployGlobalContract(DeployGlobalContractAction),
18280    UseGlobalContract(UseGlobalContractAction),
18281    DeterministicStateInit(DeterministicStateInitAction),
18282}
18283impl ::std::convert::From<&Self> for NonDelegateAction {
18284    fn from(value: &NonDelegateAction) -> Self {
18285        value.clone()
18286    }
18287}
18288impl ::std::convert::From<CreateAccountAction> for NonDelegateAction {
18289    fn from(value: CreateAccountAction) -> Self {
18290        Self::CreateAccount(value)
18291    }
18292}
18293impl ::std::convert::From<DeployContractAction> for NonDelegateAction {
18294    fn from(value: DeployContractAction) -> Self {
18295        Self::DeployContract(value)
18296    }
18297}
18298impl ::std::convert::From<FunctionCallAction> for NonDelegateAction {
18299    fn from(value: FunctionCallAction) -> Self {
18300        Self::FunctionCall(value)
18301    }
18302}
18303impl ::std::convert::From<TransferAction> for NonDelegateAction {
18304    fn from(value: TransferAction) -> Self {
18305        Self::Transfer(value)
18306    }
18307}
18308impl ::std::convert::From<StakeAction> for NonDelegateAction {
18309    fn from(value: StakeAction) -> Self {
18310        Self::Stake(value)
18311    }
18312}
18313impl ::std::convert::From<AddKeyAction> for NonDelegateAction {
18314    fn from(value: AddKeyAction) -> Self {
18315        Self::AddKey(value)
18316    }
18317}
18318impl ::std::convert::From<DeleteKeyAction> for NonDelegateAction {
18319    fn from(value: DeleteKeyAction) -> Self {
18320        Self::DeleteKey(value)
18321    }
18322}
18323impl ::std::convert::From<DeleteAccountAction> for NonDelegateAction {
18324    fn from(value: DeleteAccountAction) -> Self {
18325        Self::DeleteAccount(value)
18326    }
18327}
18328impl ::std::convert::From<DeployGlobalContractAction> for NonDelegateAction {
18329    fn from(value: DeployGlobalContractAction) -> Self {
18330        Self::DeployGlobalContract(value)
18331    }
18332}
18333impl ::std::convert::From<UseGlobalContractAction> for NonDelegateAction {
18334    fn from(value: UseGlobalContractAction) -> Self {
18335        Self::UseGlobalContract(value)
18336    }
18337}
18338impl ::std::convert::From<DeterministicStateInitAction> for NonDelegateAction {
18339    fn from(value: DeterministicStateInitAction) -> Self {
18340        Self::DeterministicStateInit(value)
18341    }
18342}
18343#[doc = "Peer id is the public key."]
18344#[doc = r""]
18345#[doc = r" <details><summary>JSON schema</summary>"]
18346#[doc = r""]
18347#[doc = r" ```json"]
18348#[doc = "{"]
18349#[doc = "  \"description\": \"Peer id is the public key.\","]
18350#[doc = "  \"allOf\": ["]
18351#[doc = "    {"]
18352#[doc = "      \"$ref\": \"#/components/schemas/PublicKey\""]
18353#[doc = "    }"]
18354#[doc = "  ]"]
18355#[doc = "}"]
18356#[doc = r" ```"]
18357#[doc = r" </details>"]
18358#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
18359#[serde(transparent)]
18360pub struct PeerId(pub PublicKey);
18361impl ::std::ops::Deref for PeerId {
18362    type Target = PublicKey;
18363    fn deref(&self) -> &PublicKey {
18364        &self.0
18365    }
18366}
18367impl ::std::convert::From<PeerId> for PublicKey {
18368    fn from(value: PeerId) -> Self {
18369        value.0
18370    }
18371}
18372impl ::std::convert::From<&PeerId> for PeerId {
18373    fn from(value: &PeerId) -> Self {
18374        value.clone()
18375    }
18376}
18377impl ::std::convert::From<PublicKey> for PeerId {
18378    fn from(value: PublicKey) -> Self {
18379        Self(value)
18380    }
18381}
18382impl ::std::str::FromStr for PeerId {
18383    type Err = <PublicKey as ::std::str::FromStr>::Err;
18384    fn from_str(value: &str) -> ::std::result::Result<Self, Self::Err> {
18385        Ok(Self(value.parse()?))
18386    }
18387}
18388impl ::std::convert::TryFrom<&str> for PeerId {
18389    type Error = <PublicKey as ::std::str::FromStr>::Err;
18390    fn try_from(value: &str) -> ::std::result::Result<Self, Self::Error> {
18391        value.parse()
18392    }
18393}
18394impl ::std::convert::TryFrom<&String> for PeerId {
18395    type Error = <PublicKey as ::std::str::FromStr>::Err;
18396    fn try_from(value: &String) -> ::std::result::Result<Self, Self::Error> {
18397        value.parse()
18398    }
18399}
18400impl ::std::convert::TryFrom<String> for PeerId {
18401    type Error = <PublicKey as ::std::str::FromStr>::Err;
18402    fn try_from(value: String) -> ::std::result::Result<Self, Self::Error> {
18403        value.parse()
18404    }
18405}
18406impl ::std::fmt::Display for PeerId {
18407    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
18408        self.0.fmt(f)
18409    }
18410}
18411#[doc = "`PeerInfoView`"]
18412#[doc = r""]
18413#[doc = r" <details><summary>JSON schema</summary>"]
18414#[doc = r""]
18415#[doc = r" ```json"]
18416#[doc = "{"]
18417#[doc = "  \"type\": \"object\","]
18418#[doc = "  \"required\": ["]
18419#[doc = "    \"addr\","]
18420#[doc = "    \"archival\","]
18421#[doc = "    \"connection_established_time_millis\","]
18422#[doc = "    \"is_highest_block_invalid\","]
18423#[doc = "    \"is_outbound_peer\","]
18424#[doc = "    \"last_time_peer_requested_millis\","]
18425#[doc = "    \"last_time_received_message_millis\","]
18426#[doc = "    \"nonce\","]
18427#[doc = "    \"peer_id\","]
18428#[doc = "    \"received_bytes_per_sec\","]
18429#[doc = "    \"sent_bytes_per_sec\","]
18430#[doc = "    \"tracked_shards\""]
18431#[doc = "  ],"]
18432#[doc = "  \"properties\": {"]
18433#[doc = "    \"account_id\": {"]
18434#[doc = "      \"anyOf\": ["]
18435#[doc = "        {"]
18436#[doc = "          \"$ref\": \"#/components/schemas/AccountId\""]
18437#[doc = "        },"]
18438#[doc = "        {"]
18439#[doc = "          \"type\": \"null\""]
18440#[doc = "        }"]
18441#[doc = "      ]"]
18442#[doc = "    },"]
18443#[doc = "    \"addr\": {"]
18444#[doc = "      \"type\": \"string\""]
18445#[doc = "    },"]
18446#[doc = "    \"archival\": {"]
18447#[doc = "      \"type\": \"boolean\""]
18448#[doc = "    },"]
18449#[doc = "    \"block_hash\": {"]
18450#[doc = "      \"anyOf\": ["]
18451#[doc = "        {"]
18452#[doc = "          \"$ref\": \"#/components/schemas/CryptoHash\""]
18453#[doc = "        },"]
18454#[doc = "        {"]
18455#[doc = "          \"type\": \"null\""]
18456#[doc = "        }"]
18457#[doc = "      ]"]
18458#[doc = "    },"]
18459#[doc = "    \"connection_established_time_millis\": {"]
18460#[doc = "      \"type\": \"integer\","]
18461#[doc = "      \"format\": \"uint64\","]
18462#[doc = "      \"minimum\": 0.0"]
18463#[doc = "    },"]
18464#[doc = "    \"height\": {"]
18465#[doc = "      \"type\": ["]
18466#[doc = "        \"integer\","]
18467#[doc = "        \"null\""]
18468#[doc = "      ],"]
18469#[doc = "      \"format\": \"uint64\","]
18470#[doc = "      \"minimum\": 0.0"]
18471#[doc = "    },"]
18472#[doc = "    \"is_highest_block_invalid\": {"]
18473#[doc = "      \"type\": \"boolean\""]
18474#[doc = "    },"]
18475#[doc = "    \"is_outbound_peer\": {"]
18476#[doc = "      \"type\": \"boolean\""]
18477#[doc = "    },"]
18478#[doc = "    \"last_time_peer_requested_millis\": {"]
18479#[doc = "      \"type\": \"integer\","]
18480#[doc = "      \"format\": \"uint64\","]
18481#[doc = "      \"minimum\": 0.0"]
18482#[doc = "    },"]
18483#[doc = "    \"last_time_received_message_millis\": {"]
18484#[doc = "      \"type\": \"integer\","]
18485#[doc = "      \"format\": \"uint64\","]
18486#[doc = "      \"minimum\": 0.0"]
18487#[doc = "    },"]
18488#[doc = "    \"nonce\": {"]
18489#[doc = "      \"description\": \"Connection nonce.\","]
18490#[doc = "      \"type\": \"integer\","]
18491#[doc = "      \"format\": \"uint64\","]
18492#[doc = "      \"minimum\": 0.0"]
18493#[doc = "    },"]
18494#[doc = "    \"peer_id\": {"]
18495#[doc = "      \"$ref\": \"#/components/schemas/PublicKey\""]
18496#[doc = "    },"]
18497#[doc = "    \"received_bytes_per_sec\": {"]
18498#[doc = "      \"type\": \"integer\","]
18499#[doc = "      \"format\": \"uint64\","]
18500#[doc = "      \"minimum\": 0.0"]
18501#[doc = "    },"]
18502#[doc = "    \"sent_bytes_per_sec\": {"]
18503#[doc = "      \"type\": \"integer\","]
18504#[doc = "      \"format\": \"uint64\","]
18505#[doc = "      \"minimum\": 0.0"]
18506#[doc = "    },"]
18507#[doc = "    \"tracked_shards\": {"]
18508#[doc = "      \"type\": \"array\","]
18509#[doc = "      \"items\": {"]
18510#[doc = "        \"$ref\": \"#/components/schemas/ShardId\""]
18511#[doc = "      }"]
18512#[doc = "    }"]
18513#[doc = "  }"]
18514#[doc = "}"]
18515#[doc = r" ```"]
18516#[doc = r" </details>"]
18517#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
18518pub struct PeerInfoView {
18519    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
18520    pub account_id: ::std::option::Option<AccountId>,
18521    pub addr: ::std::string::String,
18522    pub archival: bool,
18523    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
18524    pub block_hash: ::std::option::Option<CryptoHash>,
18525    pub connection_established_time_millis: u64,
18526    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
18527    pub height: ::std::option::Option<u64>,
18528    pub is_highest_block_invalid: bool,
18529    pub is_outbound_peer: bool,
18530    pub last_time_peer_requested_millis: u64,
18531    pub last_time_received_message_millis: u64,
18532    #[doc = "Connection nonce."]
18533    pub nonce: u64,
18534    pub peer_id: PublicKey,
18535    pub received_bytes_per_sec: u64,
18536    pub sent_bytes_per_sec: u64,
18537    pub tracked_shards: ::std::vec::Vec<ShardId>,
18538}
18539impl ::std::convert::From<&PeerInfoView> for PeerInfoView {
18540    fn from(value: &PeerInfoView) -> Self {
18541        value.clone()
18542    }
18543}
18544#[doc = "Error that can occur while preparing or executing Wasm smart-contract."]
18545#[doc = r""]
18546#[doc = r" <details><summary>JSON schema</summary>"]
18547#[doc = r""]
18548#[doc = r" ```json"]
18549#[doc = "{"]
18550#[doc = "  \"description\": \"Error that can occur while preparing or executing Wasm smart-contract.\","]
18551#[doc = "  \"oneOf\": ["]
18552#[doc = "    {"]
18553#[doc = "      \"description\": \"Error happened while serializing the module.\","]
18554#[doc = "      \"type\": \"string\","]
18555#[doc = "      \"enum\": ["]
18556#[doc = "        \"Serialization\""]
18557#[doc = "      ]"]
18558#[doc = "    },"]
18559#[doc = "    {"]
18560#[doc = "      \"description\": \"Error happened while deserializing the module.\","]
18561#[doc = "      \"type\": \"string\","]
18562#[doc = "      \"enum\": ["]
18563#[doc = "        \"Deserialization\""]
18564#[doc = "      ]"]
18565#[doc = "    },"]
18566#[doc = "    {"]
18567#[doc = "      \"description\": \"Internal memory declaration has been found in the module.\","]
18568#[doc = "      \"type\": \"string\","]
18569#[doc = "      \"enum\": ["]
18570#[doc = "        \"InternalMemoryDeclared\""]
18571#[doc = "      ]"]
18572#[doc = "    },"]
18573#[doc = "    {"]
18574#[doc = "      \"description\": \"Gas instrumentation failed.\\n\\nThis most likely indicates the module isn't valid.\","]
18575#[doc = "      \"type\": \"string\","]
18576#[doc = "      \"enum\": ["]
18577#[doc = "        \"GasInstrumentation\""]
18578#[doc = "      ]"]
18579#[doc = "    },"]
18580#[doc = "    {"]
18581#[doc = "      \"description\": \"Stack instrumentation failed.\\n\\nThis  most likely indicates the module isn't valid.\","]
18582#[doc = "      \"type\": \"string\","]
18583#[doc = "      \"enum\": ["]
18584#[doc = "        \"StackHeightInstrumentation\""]
18585#[doc = "      ]"]
18586#[doc = "    },"]
18587#[doc = "    {"]
18588#[doc = "      \"description\": \"Error happened during instantiation.\\n\\nThis might indicate that `start` function trapped, or module isn't\\ninstantiable and/or un-linkable.\","]
18589#[doc = "      \"type\": \"string\","]
18590#[doc = "      \"enum\": ["]
18591#[doc = "        \"Instantiate\""]
18592#[doc = "      ]"]
18593#[doc = "    },"]
18594#[doc = "    {"]
18595#[doc = "      \"description\": \"Error creating memory.\","]
18596#[doc = "      \"type\": \"string\","]
18597#[doc = "      \"enum\": ["]
18598#[doc = "        \"Memory\""]
18599#[doc = "      ]"]
18600#[doc = "    },"]
18601#[doc = "    {"]
18602#[doc = "      \"description\": \"Contract contains too many functions.\","]
18603#[doc = "      \"type\": \"string\","]
18604#[doc = "      \"enum\": ["]
18605#[doc = "        \"TooManyFunctions\""]
18606#[doc = "      ]"]
18607#[doc = "    },"]
18608#[doc = "    {"]
18609#[doc = "      \"description\": \"Contract contains too many locals.\","]
18610#[doc = "      \"type\": \"string\","]
18611#[doc = "      \"enum\": ["]
18612#[doc = "        \"TooManyLocals\""]
18613#[doc = "      ]"]
18614#[doc = "    },"]
18615#[doc = "    {"]
18616#[doc = "      \"description\": \"Contract contains too many tables.\","]
18617#[doc = "      \"type\": \"string\","]
18618#[doc = "      \"enum\": ["]
18619#[doc = "        \"TooManyTables\""]
18620#[doc = "      ]"]
18621#[doc = "    },"]
18622#[doc = "    {"]
18623#[doc = "      \"description\": \"Contract contains too many table elements.\","]
18624#[doc = "      \"type\": \"string\","]
18625#[doc = "      \"enum\": ["]
18626#[doc = "        \"TooManyTableElements\""]
18627#[doc = "      ]"]
18628#[doc = "    }"]
18629#[doc = "  ]"]
18630#[doc = "}"]
18631#[doc = r" ```"]
18632#[doc = r" </details>"]
18633#[derive(
18634    :: serde :: Deserialize,
18635    :: serde :: Serialize,
18636    Clone,
18637    Copy,
18638    Debug,
18639    Eq,
18640    Hash,
18641    Ord,
18642    PartialEq,
18643    PartialOrd,
18644)]
18645pub enum PrepareError {
18646    #[doc = "Error happened while serializing the module."]
18647    Serialization,
18648    #[doc = "Error happened while deserializing the module."]
18649    Deserialization,
18650    #[doc = "Internal memory declaration has been found in the module."]
18651    InternalMemoryDeclared,
18652    #[doc = "Gas instrumentation failed.\n\nThis most likely indicates the module isn't valid."]
18653    GasInstrumentation,
18654    #[doc = "Stack instrumentation failed.\n\nThis  most likely indicates the module isn't valid."]
18655    StackHeightInstrumentation,
18656    #[doc = "Error happened during instantiation.\n\nThis might indicate that `start` function trapped, or module isn't\ninstantiable and/or un-linkable."]
18657    Instantiate,
18658    #[doc = "Error creating memory."]
18659    Memory,
18660    #[doc = "Contract contains too many functions."]
18661    TooManyFunctions,
18662    #[doc = "Contract contains too many locals."]
18663    TooManyLocals,
18664    #[doc = "Contract contains too many tables."]
18665    TooManyTables,
18666    #[doc = "Contract contains too many table elements."]
18667    TooManyTableElements,
18668}
18669impl ::std::convert::From<&Self> for PrepareError {
18670    fn from(value: &PrepareError) -> Self {
18671        value.clone()
18672    }
18673}
18674impl ::std::fmt::Display for PrepareError {
18675    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
18676        match *self {
18677            Self::Serialization => f.write_str("Serialization"),
18678            Self::Deserialization => f.write_str("Deserialization"),
18679            Self::InternalMemoryDeclared => f.write_str("InternalMemoryDeclared"),
18680            Self::GasInstrumentation => f.write_str("GasInstrumentation"),
18681            Self::StackHeightInstrumentation => f.write_str("StackHeightInstrumentation"),
18682            Self::Instantiate => f.write_str("Instantiate"),
18683            Self::Memory => f.write_str("Memory"),
18684            Self::TooManyFunctions => f.write_str("TooManyFunctions"),
18685            Self::TooManyLocals => f.write_str("TooManyLocals"),
18686            Self::TooManyTables => f.write_str("TooManyTables"),
18687            Self::TooManyTableElements => f.write_str("TooManyTableElements"),
18688        }
18689    }
18690}
18691impl ::std::str::FromStr for PrepareError {
18692    type Err = self::error::ConversionError;
18693    fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
18694        match value {
18695            "Serialization" => Ok(Self::Serialization),
18696            "Deserialization" => Ok(Self::Deserialization),
18697            "InternalMemoryDeclared" => Ok(Self::InternalMemoryDeclared),
18698            "GasInstrumentation" => Ok(Self::GasInstrumentation),
18699            "StackHeightInstrumentation" => Ok(Self::StackHeightInstrumentation),
18700            "Instantiate" => Ok(Self::Instantiate),
18701            "Memory" => Ok(Self::Memory),
18702            "TooManyFunctions" => Ok(Self::TooManyFunctions),
18703            "TooManyLocals" => Ok(Self::TooManyLocals),
18704            "TooManyTables" => Ok(Self::TooManyTables),
18705            "TooManyTableElements" => Ok(Self::TooManyTableElements),
18706            _ => Err("invalid value".into()),
18707        }
18708    }
18709}
18710impl ::std::convert::TryFrom<&str> for PrepareError {
18711    type Error = self::error::ConversionError;
18712    fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
18713        value.parse()
18714    }
18715}
18716impl ::std::convert::TryFrom<&::std::string::String> for PrepareError {
18717    type Error = self::error::ConversionError;
18718    fn try_from(
18719        value: &::std::string::String,
18720    ) -> ::std::result::Result<Self, self::error::ConversionError> {
18721        value.parse()
18722    }
18723}
18724impl ::std::convert::TryFrom<::std::string::String> for PrepareError {
18725    type Error = self::error::ConversionError;
18726    fn try_from(
18727        value: ::std::string::String,
18728    ) -> ::std::result::Result<Self, self::error::ConversionError> {
18729        value.parse()
18730    }
18731}
18732#[doc = "Configures whether the node checks the next or the next next epoch for network version compatibility."]
18733#[doc = r""]
18734#[doc = r" <details><summary>JSON schema</summary>"]
18735#[doc = r""]
18736#[doc = r" ```json"]
18737#[doc = "{"]
18738#[doc = "  \"description\": \"Configures whether the node checks the next or the next next epoch for network version compatibility.\","]
18739#[doc = "  \"type\": \"string\","]
18740#[doc = "  \"enum\": ["]
18741#[doc = "    \"Next\","]
18742#[doc = "    \"NextNext\""]
18743#[doc = "  ]"]
18744#[doc = "}"]
18745#[doc = r" ```"]
18746#[doc = r" </details>"]
18747#[derive(
18748    :: serde :: Deserialize,
18749    :: serde :: Serialize,
18750    Clone,
18751    Copy,
18752    Debug,
18753    Eq,
18754    Hash,
18755    Ord,
18756    PartialEq,
18757    PartialOrd,
18758)]
18759pub enum ProtocolVersionCheckConfig {
18760    Next,
18761    NextNext,
18762}
18763impl ::std::convert::From<&Self> for ProtocolVersionCheckConfig {
18764    fn from(value: &ProtocolVersionCheckConfig) -> Self {
18765        value.clone()
18766    }
18767}
18768impl ::std::fmt::Display for ProtocolVersionCheckConfig {
18769    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
18770        match *self {
18771            Self::Next => f.write_str("Next"),
18772            Self::NextNext => f.write_str("NextNext"),
18773        }
18774    }
18775}
18776impl ::std::str::FromStr for ProtocolVersionCheckConfig {
18777    type Err = self::error::ConversionError;
18778    fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
18779        match value {
18780            "Next" => Ok(Self::Next),
18781            "NextNext" => Ok(Self::NextNext),
18782            _ => Err("invalid value".into()),
18783        }
18784    }
18785}
18786impl ::std::convert::TryFrom<&str> for ProtocolVersionCheckConfig {
18787    type Error = self::error::ConversionError;
18788    fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
18789        value.parse()
18790    }
18791}
18792impl ::std::convert::TryFrom<&::std::string::String> for ProtocolVersionCheckConfig {
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}
18800impl ::std::convert::TryFrom<::std::string::String> for ProtocolVersionCheckConfig {
18801    type Error = self::error::ConversionError;
18802    fn try_from(
18803        value: ::std::string::String,
18804    ) -> ::std::result::Result<Self, self::error::ConversionError> {
18805        value.parse()
18806    }
18807}
18808#[doc = "`PublicKey`"]
18809#[doc = r""]
18810#[doc = r" <details><summary>JSON schema</summary>"]
18811#[doc = r""]
18812#[doc = r" ```json"]
18813#[doc = "{"]
18814#[doc = "  \"type\": \"string\""]
18815#[doc = "}"]
18816#[doc = r" ```"]
18817#[doc = r" </details>"]
18818#[derive(
18819    :: serde :: Deserialize,
18820    :: serde :: Serialize,
18821    Clone,
18822    Debug,
18823    Eq,
18824    Hash,
18825    Ord,
18826    PartialEq,
18827    PartialOrd,
18828)]
18829#[serde(transparent)]
18830pub struct PublicKey(pub ::std::string::String);
18831impl ::std::ops::Deref for PublicKey {
18832    type Target = ::std::string::String;
18833    fn deref(&self) -> &::std::string::String {
18834        &self.0
18835    }
18836}
18837impl ::std::convert::From<PublicKey> for ::std::string::String {
18838    fn from(value: PublicKey) -> Self {
18839        value.0
18840    }
18841}
18842impl ::std::convert::From<&PublicKey> for PublicKey {
18843    fn from(value: &PublicKey) -> Self {
18844        value.clone()
18845    }
18846}
18847impl ::std::convert::From<::std::string::String> for PublicKey {
18848    fn from(value: ::std::string::String) -> Self {
18849        Self(value)
18850    }
18851}
18852impl ::std::str::FromStr for PublicKey {
18853    type Err = ::std::convert::Infallible;
18854    fn from_str(value: &str) -> ::std::result::Result<Self, Self::Err> {
18855        Ok(Self(value.to_string()))
18856    }
18857}
18858impl ::std::fmt::Display for PublicKey {
18859    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
18860        self.0.fmt(f)
18861    }
18862}
18863#[doc = "`RangeOfUint64`"]
18864#[doc = r""]
18865#[doc = r" <details><summary>JSON schema</summary>"]
18866#[doc = r""]
18867#[doc = r" ```json"]
18868#[doc = "{"]
18869#[doc = "  \"type\": \"object\","]
18870#[doc = "  \"required\": ["]
18871#[doc = "    \"end\","]
18872#[doc = "    \"start\""]
18873#[doc = "  ],"]
18874#[doc = "  \"properties\": {"]
18875#[doc = "    \"end\": {"]
18876#[doc = "      \"type\": \"integer\","]
18877#[doc = "      \"format\": \"uint64\","]
18878#[doc = "      \"minimum\": 0.0"]
18879#[doc = "    },"]
18880#[doc = "    \"start\": {"]
18881#[doc = "      \"type\": \"integer\","]
18882#[doc = "      \"format\": \"uint64\","]
18883#[doc = "      \"minimum\": 0.0"]
18884#[doc = "    }"]
18885#[doc = "  }"]
18886#[doc = "}"]
18887#[doc = r" ```"]
18888#[doc = r" </details>"]
18889#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
18890pub struct RangeOfUint64 {
18891    pub end: u64,
18892    pub start: u64,
18893}
18894impl ::std::convert::From<&RangeOfUint64> for RangeOfUint64 {
18895    fn from(value: &RangeOfUint64) -> Self {
18896        value.clone()
18897    }
18898}
18899#[doc = "`ReceiptEnumView`"]
18900#[doc = r""]
18901#[doc = r" <details><summary>JSON schema</summary>"]
18902#[doc = r""]
18903#[doc = r" ```json"]
18904#[doc = "{"]
18905#[doc = "  \"oneOf\": ["]
18906#[doc = "    {"]
18907#[doc = "      \"type\": \"object\","]
18908#[doc = "      \"required\": ["]
18909#[doc = "        \"Action\""]
18910#[doc = "      ],"]
18911#[doc = "      \"properties\": {"]
18912#[doc = "        \"Action\": {"]
18913#[doc = "          \"type\": \"object\","]
18914#[doc = "          \"required\": ["]
18915#[doc = "            \"actions\","]
18916#[doc = "            \"gas_price\","]
18917#[doc = "            \"input_data_ids\","]
18918#[doc = "            \"output_data_receivers\","]
18919#[doc = "            \"signer_id\","]
18920#[doc = "            \"signer_public_key\""]
18921#[doc = "          ],"]
18922#[doc = "          \"properties\": {"]
18923#[doc = "            \"actions\": {"]
18924#[doc = "              \"type\": \"array\","]
18925#[doc = "              \"items\": {"]
18926#[doc = "                \"$ref\": \"#/components/schemas/ActionView\""]
18927#[doc = "              }"]
18928#[doc = "            },"]
18929#[doc = "            \"gas_price\": {"]
18930#[doc = "              \"$ref\": \"#/components/schemas/NearToken\""]
18931#[doc = "            },"]
18932#[doc = "            \"input_data_ids\": {"]
18933#[doc = "              \"type\": \"array\","]
18934#[doc = "              \"items\": {"]
18935#[doc = "                \"$ref\": \"#/components/schemas/CryptoHash\""]
18936#[doc = "              }"]
18937#[doc = "            },"]
18938#[doc = "            \"is_promise_yield\": {"]
18939#[doc = "              \"default\": false,"]
18940#[doc = "              \"type\": \"boolean\""]
18941#[doc = "            },"]
18942#[doc = "            \"output_data_receivers\": {"]
18943#[doc = "              \"type\": \"array\","]
18944#[doc = "              \"items\": {"]
18945#[doc = "                \"$ref\": \"#/components/schemas/DataReceiverView\""]
18946#[doc = "              }"]
18947#[doc = "            },"]
18948#[doc = "            \"signer_id\": {"]
18949#[doc = "              \"$ref\": \"#/components/schemas/AccountId\""]
18950#[doc = "            },"]
18951#[doc = "            \"signer_public_key\": {"]
18952#[doc = "              \"$ref\": \"#/components/schemas/PublicKey\""]
18953#[doc = "            }"]
18954#[doc = "          }"]
18955#[doc = "        }"]
18956#[doc = "      },"]
18957#[doc = "      \"additionalProperties\": false"]
18958#[doc = "    },"]
18959#[doc = "    {"]
18960#[doc = "      \"type\": \"object\","]
18961#[doc = "      \"required\": ["]
18962#[doc = "        \"Data\""]
18963#[doc = "      ],"]
18964#[doc = "      \"properties\": {"]
18965#[doc = "        \"Data\": {"]
18966#[doc = "          \"type\": \"object\","]
18967#[doc = "          \"required\": ["]
18968#[doc = "            \"data_id\""]
18969#[doc = "          ],"]
18970#[doc = "          \"properties\": {"]
18971#[doc = "            \"data\": {"]
18972#[doc = "              \"type\": ["]
18973#[doc = "                \"string\","]
18974#[doc = "                \"null\""]
18975#[doc = "              ]"]
18976#[doc = "            },"]
18977#[doc = "            \"data_id\": {"]
18978#[doc = "              \"$ref\": \"#/components/schemas/CryptoHash\""]
18979#[doc = "            },"]
18980#[doc = "            \"is_promise_resume\": {"]
18981#[doc = "              \"default\": false,"]
18982#[doc = "              \"type\": \"boolean\""]
18983#[doc = "            }"]
18984#[doc = "          }"]
18985#[doc = "        }"]
18986#[doc = "      },"]
18987#[doc = "      \"additionalProperties\": false"]
18988#[doc = "    },"]
18989#[doc = "    {"]
18990#[doc = "      \"type\": \"object\","]
18991#[doc = "      \"required\": ["]
18992#[doc = "        \"GlobalContractDistribution\""]
18993#[doc = "      ],"]
18994#[doc = "      \"properties\": {"]
18995#[doc = "        \"GlobalContractDistribution\": {"]
18996#[doc = "          \"type\": \"object\","]
18997#[doc = "          \"required\": ["]
18998#[doc = "            \"already_delivered_shards\","]
18999#[doc = "            \"code\","]
19000#[doc = "            \"id\","]
19001#[doc = "            \"target_shard\""]
19002#[doc = "          ],"]
19003#[doc = "          \"properties\": {"]
19004#[doc = "            \"already_delivered_shards\": {"]
19005#[doc = "              \"type\": \"array\","]
19006#[doc = "              \"items\": {"]
19007#[doc = "                \"$ref\": \"#/components/schemas/ShardId\""]
19008#[doc = "              }"]
19009#[doc = "            },"]
19010#[doc = "            \"code\": {"]
19011#[doc = "              \"type\": \"string\""]
19012#[doc = "            },"]
19013#[doc = "            \"id\": {"]
19014#[doc = "              \"$ref\": \"#/components/schemas/GlobalContractIdentifier\""]
19015#[doc = "            },"]
19016#[doc = "            \"target_shard\": {"]
19017#[doc = "              \"$ref\": \"#/components/schemas/ShardId\""]
19018#[doc = "            }"]
19019#[doc = "          }"]
19020#[doc = "        }"]
19021#[doc = "      },"]
19022#[doc = "      \"additionalProperties\": false"]
19023#[doc = "    }"]
19024#[doc = "  ]"]
19025#[doc = "}"]
19026#[doc = r" ```"]
19027#[doc = r" </details>"]
19028#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
19029pub enum ReceiptEnumView {
19030    Action {
19031        actions: ::std::vec::Vec<ActionView>,
19032        gas_price: NearToken,
19033        input_data_ids: ::std::vec::Vec<CryptoHash>,
19034        #[serde(default)]
19035        is_promise_yield: bool,
19036        output_data_receivers: ::std::vec::Vec<DataReceiverView>,
19037        signer_id: AccountId,
19038        signer_public_key: PublicKey,
19039    },
19040    Data {
19041        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
19042        data: ::std::option::Option<::std::string::String>,
19043        data_id: CryptoHash,
19044        #[serde(default)]
19045        is_promise_resume: bool,
19046    },
19047    GlobalContractDistribution {
19048        already_delivered_shards: ::std::vec::Vec<ShardId>,
19049        code: ::std::string::String,
19050        id: GlobalContractIdentifier,
19051        target_shard: ShardId,
19052    },
19053}
19054impl ::std::convert::From<&Self> for ReceiptEnumView {
19055    fn from(value: &ReceiptEnumView) -> Self {
19056        value.clone()
19057    }
19058}
19059#[doc = "Describes the error for validating a receipt."]
19060#[doc = r""]
19061#[doc = r" <details><summary>JSON schema</summary>"]
19062#[doc = r""]
19063#[doc = r" ```json"]
19064#[doc = "{"]
19065#[doc = "  \"description\": \"Describes the error for validating a receipt.\","]
19066#[doc = "  \"oneOf\": ["]
19067#[doc = "    {"]
19068#[doc = "      \"description\": \"The `predecessor_id` of a Receipt is not valid.\","]
19069#[doc = "      \"type\": \"object\","]
19070#[doc = "      \"required\": ["]
19071#[doc = "        \"InvalidPredecessorId\""]
19072#[doc = "      ],"]
19073#[doc = "      \"properties\": {"]
19074#[doc = "        \"InvalidPredecessorId\": {"]
19075#[doc = "          \"type\": \"object\","]
19076#[doc = "          \"required\": ["]
19077#[doc = "            \"account_id\""]
19078#[doc = "          ],"]
19079#[doc = "          \"properties\": {"]
19080#[doc = "            \"account_id\": {"]
19081#[doc = "              \"type\": \"string\""]
19082#[doc = "            }"]
19083#[doc = "          }"]
19084#[doc = "        }"]
19085#[doc = "      },"]
19086#[doc = "      \"additionalProperties\": false"]
19087#[doc = "    },"]
19088#[doc = "    {"]
19089#[doc = "      \"description\": \"The `receiver_id` of a Receipt is not valid.\","]
19090#[doc = "      \"type\": \"object\","]
19091#[doc = "      \"required\": ["]
19092#[doc = "        \"InvalidReceiverId\""]
19093#[doc = "      ],"]
19094#[doc = "      \"properties\": {"]
19095#[doc = "        \"InvalidReceiverId\": {"]
19096#[doc = "          \"type\": \"object\","]
19097#[doc = "          \"required\": ["]
19098#[doc = "            \"account_id\""]
19099#[doc = "          ],"]
19100#[doc = "          \"properties\": {"]
19101#[doc = "            \"account_id\": {"]
19102#[doc = "              \"type\": \"string\""]
19103#[doc = "            }"]
19104#[doc = "          }"]
19105#[doc = "        }"]
19106#[doc = "      },"]
19107#[doc = "      \"additionalProperties\": false"]
19108#[doc = "    },"]
19109#[doc = "    {"]
19110#[doc = "      \"description\": \"The `signer_id` of an ActionReceipt is not valid.\","]
19111#[doc = "      \"type\": \"object\","]
19112#[doc = "      \"required\": ["]
19113#[doc = "        \"InvalidSignerId\""]
19114#[doc = "      ],"]
19115#[doc = "      \"properties\": {"]
19116#[doc = "        \"InvalidSignerId\": {"]
19117#[doc = "          \"type\": \"object\","]
19118#[doc = "          \"required\": ["]
19119#[doc = "            \"account_id\""]
19120#[doc = "          ],"]
19121#[doc = "          \"properties\": {"]
19122#[doc = "            \"account_id\": {"]
19123#[doc = "              \"type\": \"string\""]
19124#[doc = "            }"]
19125#[doc = "          }"]
19126#[doc = "        }"]
19127#[doc = "      },"]
19128#[doc = "      \"additionalProperties\": false"]
19129#[doc = "    },"]
19130#[doc = "    {"]
19131#[doc = "      \"description\": \"The `receiver_id` of a DataReceiver within an ActionReceipt is not valid.\","]
19132#[doc = "      \"type\": \"object\","]
19133#[doc = "      \"required\": ["]
19134#[doc = "        \"InvalidDataReceiverId\""]
19135#[doc = "      ],"]
19136#[doc = "      \"properties\": {"]
19137#[doc = "        \"InvalidDataReceiverId\": {"]
19138#[doc = "          \"type\": \"object\","]
19139#[doc = "          \"required\": ["]
19140#[doc = "            \"account_id\""]
19141#[doc = "          ],"]
19142#[doc = "          \"properties\": {"]
19143#[doc = "            \"account_id\": {"]
19144#[doc = "              \"type\": \"string\""]
19145#[doc = "            }"]
19146#[doc = "          }"]
19147#[doc = "        }"]
19148#[doc = "      },"]
19149#[doc = "      \"additionalProperties\": false"]
19150#[doc = "    },"]
19151#[doc = "    {"]
19152#[doc = "      \"description\": \"The length of the returned data exceeded the limit in a DataReceipt.\","]
19153#[doc = "      \"type\": \"object\","]
19154#[doc = "      \"required\": ["]
19155#[doc = "        \"ReturnedValueLengthExceeded\""]
19156#[doc = "      ],"]
19157#[doc = "      \"properties\": {"]
19158#[doc = "        \"ReturnedValueLengthExceeded\": {"]
19159#[doc = "          \"type\": \"object\","]
19160#[doc = "          \"required\": ["]
19161#[doc = "            \"length\","]
19162#[doc = "            \"limit\""]
19163#[doc = "          ],"]
19164#[doc = "          \"properties\": {"]
19165#[doc = "            \"length\": {"]
19166#[doc = "              \"type\": \"integer\","]
19167#[doc = "              \"format\": \"uint64\","]
19168#[doc = "              \"minimum\": 0.0"]
19169#[doc = "            },"]
19170#[doc = "            \"limit\": {"]
19171#[doc = "              \"type\": \"integer\","]
19172#[doc = "              \"format\": \"uint64\","]
19173#[doc = "              \"minimum\": 0.0"]
19174#[doc = "            }"]
19175#[doc = "          }"]
19176#[doc = "        }"]
19177#[doc = "      },"]
19178#[doc = "      \"additionalProperties\": false"]
19179#[doc = "    },"]
19180#[doc = "    {"]
19181#[doc = "      \"description\": \"The number of input data dependencies exceeds the limit in an ActionReceipt.\","]
19182#[doc = "      \"type\": \"object\","]
19183#[doc = "      \"required\": ["]
19184#[doc = "        \"NumberInputDataDependenciesExceeded\""]
19185#[doc = "      ],"]
19186#[doc = "      \"properties\": {"]
19187#[doc = "        \"NumberInputDataDependenciesExceeded\": {"]
19188#[doc = "          \"type\": \"object\","]
19189#[doc = "          \"required\": ["]
19190#[doc = "            \"limit\","]
19191#[doc = "            \"number_of_input_data_dependencies\""]
19192#[doc = "          ],"]
19193#[doc = "          \"properties\": {"]
19194#[doc = "            \"limit\": {"]
19195#[doc = "              \"type\": \"integer\","]
19196#[doc = "              \"format\": \"uint64\","]
19197#[doc = "              \"minimum\": 0.0"]
19198#[doc = "            },"]
19199#[doc = "            \"number_of_input_data_dependencies\": {"]
19200#[doc = "              \"type\": \"integer\","]
19201#[doc = "              \"format\": \"uint64\","]
19202#[doc = "              \"minimum\": 0.0"]
19203#[doc = "            }"]
19204#[doc = "          }"]
19205#[doc = "        }"]
19206#[doc = "      },"]
19207#[doc = "      \"additionalProperties\": false"]
19208#[doc = "    },"]
19209#[doc = "    {"]
19210#[doc = "      \"description\": \"An error occurred while validating actions of an ActionReceipt.\","]
19211#[doc = "      \"type\": \"object\","]
19212#[doc = "      \"required\": ["]
19213#[doc = "        \"ActionsValidation\""]
19214#[doc = "      ],"]
19215#[doc = "      \"properties\": {"]
19216#[doc = "        \"ActionsValidation\": {"]
19217#[doc = "          \"$ref\": \"#/components/schemas/ActionsValidationError\""]
19218#[doc = "        }"]
19219#[doc = "      },"]
19220#[doc = "      \"additionalProperties\": false"]
19221#[doc = "    },"]
19222#[doc = "    {"]
19223#[doc = "      \"description\": \"Receipt is bigger than the limit.\","]
19224#[doc = "      \"type\": \"object\","]
19225#[doc = "      \"required\": ["]
19226#[doc = "        \"ReceiptSizeExceeded\""]
19227#[doc = "      ],"]
19228#[doc = "      \"properties\": {"]
19229#[doc = "        \"ReceiptSizeExceeded\": {"]
19230#[doc = "          \"type\": \"object\","]
19231#[doc = "          \"required\": ["]
19232#[doc = "            \"limit\","]
19233#[doc = "            \"size\""]
19234#[doc = "          ],"]
19235#[doc = "          \"properties\": {"]
19236#[doc = "            \"limit\": {"]
19237#[doc = "              \"type\": \"integer\","]
19238#[doc = "              \"format\": \"uint64\","]
19239#[doc = "              \"minimum\": 0.0"]
19240#[doc = "            },"]
19241#[doc = "            \"size\": {"]
19242#[doc = "              \"type\": \"integer\","]
19243#[doc = "              \"format\": \"uint64\","]
19244#[doc = "              \"minimum\": 0.0"]
19245#[doc = "            }"]
19246#[doc = "          }"]
19247#[doc = "        }"]
19248#[doc = "      },"]
19249#[doc = "      \"additionalProperties\": false"]
19250#[doc = "    }"]
19251#[doc = "  ]"]
19252#[doc = "}"]
19253#[doc = r" ```"]
19254#[doc = r" </details>"]
19255#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
19256pub enum ReceiptValidationError {
19257    #[doc = "The `predecessor_id` of a Receipt is not valid."]
19258    InvalidPredecessorId { account_id: ::std::string::String },
19259    #[doc = "The `receiver_id` of a Receipt is not valid."]
19260    InvalidReceiverId { account_id: ::std::string::String },
19261    #[doc = "The `signer_id` of an ActionReceipt is not valid."]
19262    InvalidSignerId { account_id: ::std::string::String },
19263    #[doc = "The `receiver_id` of a DataReceiver within an ActionReceipt is not valid."]
19264    InvalidDataReceiverId { account_id: ::std::string::String },
19265    #[doc = "The length of the returned data exceeded the limit in a DataReceipt."]
19266    ReturnedValueLengthExceeded { length: u64, limit: u64 },
19267    #[doc = "The number of input data dependencies exceeds the limit in an ActionReceipt."]
19268    NumberInputDataDependenciesExceeded {
19269        limit: u64,
19270        number_of_input_data_dependencies: u64,
19271    },
19272    #[doc = "An error occurred while validating actions of an ActionReceipt."]
19273    ActionsValidation(ActionsValidationError),
19274    #[doc = "Receipt is bigger than the limit."]
19275    ReceiptSizeExceeded { limit: u64, size: u64 },
19276}
19277impl ::std::convert::From<&Self> for ReceiptValidationError {
19278    fn from(value: &ReceiptValidationError) -> Self {
19279        value.clone()
19280    }
19281}
19282impl ::std::convert::From<ActionsValidationError> for ReceiptValidationError {
19283    fn from(value: ActionsValidationError) -> Self {
19284        Self::ActionsValidation(value)
19285    }
19286}
19287#[doc = "`ReceiptView`"]
19288#[doc = r""]
19289#[doc = r" <details><summary>JSON schema</summary>"]
19290#[doc = r""]
19291#[doc = r" ```json"]
19292#[doc = "{"]
19293#[doc = "  \"type\": \"object\","]
19294#[doc = "  \"required\": ["]
19295#[doc = "    \"predecessor_id\","]
19296#[doc = "    \"receipt\","]
19297#[doc = "    \"receipt_id\","]
19298#[doc = "    \"receiver_id\""]
19299#[doc = "  ],"]
19300#[doc = "  \"properties\": {"]
19301#[doc = "    \"predecessor_id\": {"]
19302#[doc = "      \"$ref\": \"#/components/schemas/AccountId\""]
19303#[doc = "    },"]
19304#[doc = "    \"priority\": {"]
19305#[doc = "      \"default\": 0,"]
19306#[doc = "      \"type\": \"integer\","]
19307#[doc = "      \"format\": \"uint64\","]
19308#[doc = "      \"minimum\": 0.0"]
19309#[doc = "    },"]
19310#[doc = "    \"receipt\": {"]
19311#[doc = "      \"$ref\": \"#/components/schemas/ReceiptEnumView\""]
19312#[doc = "    },"]
19313#[doc = "    \"receipt_id\": {"]
19314#[doc = "      \"$ref\": \"#/components/schemas/CryptoHash\""]
19315#[doc = "    },"]
19316#[doc = "    \"receiver_id\": {"]
19317#[doc = "      \"$ref\": \"#/components/schemas/AccountId\""]
19318#[doc = "    }"]
19319#[doc = "  }"]
19320#[doc = "}"]
19321#[doc = r" ```"]
19322#[doc = r" </details>"]
19323#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
19324pub struct ReceiptView {
19325    pub predecessor_id: AccountId,
19326    #[serde(default)]
19327    pub priority: u64,
19328    pub receipt: ReceiptEnumView,
19329    pub receipt_id: CryptoHash,
19330    pub receiver_id: AccountId,
19331}
19332impl ::std::convert::From<&ReceiptView> for ReceiptView {
19333    fn from(value: &ReceiptView) -> Self {
19334        value.clone()
19335    }
19336}
19337#[doc = "`RpcBlockError`"]
19338#[doc = r""]
19339#[doc = r" <details><summary>JSON schema</summary>"]
19340#[doc = r""]
19341#[doc = r" ```json"]
19342#[doc = "{"]
19343#[doc = "  \"oneOf\": ["]
19344#[doc = "    {"]
19345#[doc = "      \"type\": \"object\","]
19346#[doc = "      \"required\": ["]
19347#[doc = "        \"info\","]
19348#[doc = "        \"name\""]
19349#[doc = "      ],"]
19350#[doc = "      \"properties\": {"]
19351#[doc = "        \"info\": {"]
19352#[doc = "          \"type\": \"object\""]
19353#[doc = "        },"]
19354#[doc = "        \"name\": {"]
19355#[doc = "          \"type\": \"string\","]
19356#[doc = "          \"enum\": ["]
19357#[doc = "            \"UNKNOWN_BLOCK\""]
19358#[doc = "          ]"]
19359#[doc = "        }"]
19360#[doc = "      }"]
19361#[doc = "    },"]
19362#[doc = "    {"]
19363#[doc = "      \"type\": \"object\","]
19364#[doc = "      \"required\": ["]
19365#[doc = "        \"name\""]
19366#[doc = "      ],"]
19367#[doc = "      \"properties\": {"]
19368#[doc = "        \"name\": {"]
19369#[doc = "          \"type\": \"string\","]
19370#[doc = "          \"enum\": ["]
19371#[doc = "            \"NOT_SYNCED_YET\""]
19372#[doc = "          ]"]
19373#[doc = "        }"]
19374#[doc = "      }"]
19375#[doc = "    },"]
19376#[doc = "    {"]
19377#[doc = "      \"type\": \"object\","]
19378#[doc = "      \"required\": ["]
19379#[doc = "        \"info\","]
19380#[doc = "        \"name\""]
19381#[doc = "      ],"]
19382#[doc = "      \"properties\": {"]
19383#[doc = "        \"info\": {"]
19384#[doc = "          \"type\": \"object\","]
19385#[doc = "          \"required\": ["]
19386#[doc = "            \"error_message\""]
19387#[doc = "          ],"]
19388#[doc = "          \"properties\": {"]
19389#[doc = "            \"error_message\": {"]
19390#[doc = "              \"type\": \"string\""]
19391#[doc = "            }"]
19392#[doc = "          }"]
19393#[doc = "        },"]
19394#[doc = "        \"name\": {"]
19395#[doc = "          \"type\": \"string\","]
19396#[doc = "          \"enum\": ["]
19397#[doc = "            \"INTERNAL_ERROR\""]
19398#[doc = "          ]"]
19399#[doc = "        }"]
19400#[doc = "      }"]
19401#[doc = "    }"]
19402#[doc = "  ]"]
19403#[doc = "}"]
19404#[doc = r" ```"]
19405#[doc = r" </details>"]
19406#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
19407#[serde(tag = "name", content = "info")]
19408pub enum RpcBlockError {
19409    #[serde(rename = "UNKNOWN_BLOCK")]
19410    UnknownBlock(::serde_json::Map<::std::string::String, ::serde_json::Value>),
19411    #[serde(rename = "NOT_SYNCED_YET")]
19412    NotSyncedYet,
19413    #[serde(rename = "INTERNAL_ERROR")]
19414    InternalError {
19415        error_message: ::std::string::String,
19416    },
19417}
19418impl ::std::convert::From<&Self> for RpcBlockError {
19419    fn from(value: &RpcBlockError) -> Self {
19420        value.clone()
19421    }
19422}
19423impl ::std::convert::From<::serde_json::Map<::std::string::String, ::serde_json::Value>>
19424    for RpcBlockError
19425{
19426    fn from(value: ::serde_json::Map<::std::string::String, ::serde_json::Value>) -> Self {
19427        Self::UnknownBlock(value)
19428    }
19429}
19430#[doc = "`RpcBlockRequest`"]
19431#[doc = r""]
19432#[doc = r" <details><summary>JSON schema</summary>"]
19433#[doc = r""]
19434#[doc = r" ```json"]
19435#[doc = "{"]
19436#[doc = "  \"title\": \"RpcBlockRequest\","]
19437#[doc = "  \"type\": \"object\","]
19438#[doc = "  \"oneOf\": ["]
19439#[doc = "    {"]
19440#[doc = "      \"type\": \"object\","]
19441#[doc = "      \"required\": ["]
19442#[doc = "        \"block_id\""]
19443#[doc = "      ],"]
19444#[doc = "      \"properties\": {"]
19445#[doc = "        \"block_id\": {"]
19446#[doc = "          \"$ref\": \"#/components/schemas/BlockId\""]
19447#[doc = "        }"]
19448#[doc = "      }"]
19449#[doc = "    },"]
19450#[doc = "    {"]
19451#[doc = "      \"type\": \"object\","]
19452#[doc = "      \"required\": ["]
19453#[doc = "        \"finality\""]
19454#[doc = "      ],"]
19455#[doc = "      \"properties\": {"]
19456#[doc = "        \"finality\": {"]
19457#[doc = "          \"$ref\": \"#/components/schemas/Finality\""]
19458#[doc = "        }"]
19459#[doc = "      }"]
19460#[doc = "    },"]
19461#[doc = "    {"]
19462#[doc = "      \"type\": \"object\","]
19463#[doc = "      \"required\": ["]
19464#[doc = "        \"sync_checkpoint\""]
19465#[doc = "      ],"]
19466#[doc = "      \"properties\": {"]
19467#[doc = "        \"sync_checkpoint\": {"]
19468#[doc = "          \"$ref\": \"#/components/schemas/SyncCheckpoint\""]
19469#[doc = "        }"]
19470#[doc = "      }"]
19471#[doc = "    }"]
19472#[doc = "  ]"]
19473#[doc = "}"]
19474#[doc = r" ```"]
19475#[doc = r" </details>"]
19476#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
19477pub enum RpcBlockRequest {
19478    #[serde(rename = "block_id")]
19479    BlockId(BlockId),
19480    #[serde(rename = "finality")]
19481    Finality(Finality),
19482    #[serde(rename = "sync_checkpoint")]
19483    SyncCheckpoint(SyncCheckpoint),
19484}
19485impl ::std::convert::From<&Self> for RpcBlockRequest {
19486    fn from(value: &RpcBlockRequest) -> Self {
19487        value.clone()
19488    }
19489}
19490impl ::std::convert::From<BlockId> for RpcBlockRequest {
19491    fn from(value: BlockId) -> Self {
19492        Self::BlockId(value)
19493    }
19494}
19495impl ::std::convert::From<Finality> for RpcBlockRequest {
19496    fn from(value: Finality) -> Self {
19497        Self::Finality(value)
19498    }
19499}
19500impl ::std::convert::From<SyncCheckpoint> for RpcBlockRequest {
19501    fn from(value: SyncCheckpoint) -> Self {
19502        Self::SyncCheckpoint(value)
19503    }
19504}
19505#[doc = "`RpcBlockResponse`"]
19506#[doc = r""]
19507#[doc = r" <details><summary>JSON schema</summary>"]
19508#[doc = r""]
19509#[doc = r" ```json"]
19510#[doc = "{"]
19511#[doc = "  \"type\": \"object\","]
19512#[doc = "  \"required\": ["]
19513#[doc = "    \"author\","]
19514#[doc = "    \"chunks\","]
19515#[doc = "    \"header\""]
19516#[doc = "  ],"]
19517#[doc = "  \"properties\": {"]
19518#[doc = "    \"author\": {"]
19519#[doc = "      \"description\": \"The AccountId of the author of the Block\","]
19520#[doc = "      \"allOf\": ["]
19521#[doc = "        {"]
19522#[doc = "          \"$ref\": \"#/components/schemas/AccountId\""]
19523#[doc = "        }"]
19524#[doc = "      ]"]
19525#[doc = "    },"]
19526#[doc = "    \"chunks\": {"]
19527#[doc = "      \"type\": \"array\","]
19528#[doc = "      \"items\": {"]
19529#[doc = "        \"$ref\": \"#/components/schemas/ChunkHeaderView\""]
19530#[doc = "      }"]
19531#[doc = "    },"]
19532#[doc = "    \"header\": {"]
19533#[doc = "      \"$ref\": \"#/components/schemas/BlockHeaderView\""]
19534#[doc = "    }"]
19535#[doc = "  }"]
19536#[doc = "}"]
19537#[doc = r" ```"]
19538#[doc = r" </details>"]
19539#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
19540pub struct RpcBlockResponse {
19541    #[doc = "The AccountId of the author of the Block"]
19542    pub author: AccountId,
19543    pub chunks: ::std::vec::Vec<ChunkHeaderView>,
19544    pub header: BlockHeaderView,
19545}
19546impl ::std::convert::From<&RpcBlockResponse> for RpcBlockResponse {
19547    fn from(value: &RpcBlockResponse) -> Self {
19548        value.clone()
19549    }
19550}
19551#[doc = "`RpcChunkError`"]
19552#[doc = r""]
19553#[doc = r" <details><summary>JSON schema</summary>"]
19554#[doc = r""]
19555#[doc = r" ```json"]
19556#[doc = "{"]
19557#[doc = "  \"oneOf\": ["]
19558#[doc = "    {"]
19559#[doc = "      \"type\": \"object\","]
19560#[doc = "      \"required\": ["]
19561#[doc = "        \"info\","]
19562#[doc = "        \"name\""]
19563#[doc = "      ],"]
19564#[doc = "      \"properties\": {"]
19565#[doc = "        \"info\": {"]
19566#[doc = "          \"type\": \"object\","]
19567#[doc = "          \"required\": ["]
19568#[doc = "            \"error_message\""]
19569#[doc = "          ],"]
19570#[doc = "          \"properties\": {"]
19571#[doc = "            \"error_message\": {"]
19572#[doc = "              \"type\": \"string\""]
19573#[doc = "            }"]
19574#[doc = "          }"]
19575#[doc = "        },"]
19576#[doc = "        \"name\": {"]
19577#[doc = "          \"type\": \"string\","]
19578#[doc = "          \"enum\": ["]
19579#[doc = "            \"INTERNAL_ERROR\""]
19580#[doc = "          ]"]
19581#[doc = "        }"]
19582#[doc = "      }"]
19583#[doc = "    },"]
19584#[doc = "    {"]
19585#[doc = "      \"type\": \"object\","]
19586#[doc = "      \"required\": ["]
19587#[doc = "        \"info\","]
19588#[doc = "        \"name\""]
19589#[doc = "      ],"]
19590#[doc = "      \"properties\": {"]
19591#[doc = "        \"info\": {"]
19592#[doc = "          \"type\": \"object\""]
19593#[doc = "        },"]
19594#[doc = "        \"name\": {"]
19595#[doc = "          \"type\": \"string\","]
19596#[doc = "          \"enum\": ["]
19597#[doc = "            \"UNKNOWN_BLOCK\""]
19598#[doc = "          ]"]
19599#[doc = "        }"]
19600#[doc = "      }"]
19601#[doc = "    },"]
19602#[doc = "    {"]
19603#[doc = "      \"type\": \"object\","]
19604#[doc = "      \"required\": ["]
19605#[doc = "        \"info\","]
19606#[doc = "        \"name\""]
19607#[doc = "      ],"]
19608#[doc = "      \"properties\": {"]
19609#[doc = "        \"info\": {"]
19610#[doc = "          \"type\": \"object\","]
19611#[doc = "          \"required\": ["]
19612#[doc = "            \"shard_id\""]
19613#[doc = "          ],"]
19614#[doc = "          \"properties\": {"]
19615#[doc = "            \"shard_id\": {"]
19616#[doc = "              \"$ref\": \"#/components/schemas/ShardId\""]
19617#[doc = "            }"]
19618#[doc = "          }"]
19619#[doc = "        },"]
19620#[doc = "        \"name\": {"]
19621#[doc = "          \"type\": \"string\","]
19622#[doc = "          \"enum\": ["]
19623#[doc = "            \"INVALID_SHARD_ID\""]
19624#[doc = "          ]"]
19625#[doc = "        }"]
19626#[doc = "      }"]
19627#[doc = "    },"]
19628#[doc = "    {"]
19629#[doc = "      \"type\": \"object\","]
19630#[doc = "      \"required\": ["]
19631#[doc = "        \"info\","]
19632#[doc = "        \"name\""]
19633#[doc = "      ],"]
19634#[doc = "      \"properties\": {"]
19635#[doc = "        \"info\": {"]
19636#[doc = "          \"type\": \"object\","]
19637#[doc = "          \"required\": ["]
19638#[doc = "            \"chunk_hash\""]
19639#[doc = "          ],"]
19640#[doc = "          \"properties\": {"]
19641#[doc = "            \"chunk_hash\": {"]
19642#[doc = "              \"$ref\": \"#/components/schemas/ChunkHash\""]
19643#[doc = "            }"]
19644#[doc = "          }"]
19645#[doc = "        },"]
19646#[doc = "        \"name\": {"]
19647#[doc = "          \"type\": \"string\","]
19648#[doc = "          \"enum\": ["]
19649#[doc = "            \"UNKNOWN_CHUNK\""]
19650#[doc = "          ]"]
19651#[doc = "        }"]
19652#[doc = "      }"]
19653#[doc = "    }"]
19654#[doc = "  ]"]
19655#[doc = "}"]
19656#[doc = r" ```"]
19657#[doc = r" </details>"]
19658#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
19659#[serde(tag = "name", content = "info")]
19660pub enum RpcChunkError {
19661    #[serde(rename = "INTERNAL_ERROR")]
19662    InternalError {
19663        error_message: ::std::string::String,
19664    },
19665    #[serde(rename = "UNKNOWN_BLOCK")]
19666    UnknownBlock(::serde_json::Map<::std::string::String, ::serde_json::Value>),
19667    #[serde(rename = "INVALID_SHARD_ID")]
19668    InvalidShardId { shard_id: ShardId },
19669    #[serde(rename = "UNKNOWN_CHUNK")]
19670    UnknownChunk { chunk_hash: ChunkHash },
19671}
19672impl ::std::convert::From<&Self> for RpcChunkError {
19673    fn from(value: &RpcChunkError) -> Self {
19674        value.clone()
19675    }
19676}
19677impl ::std::convert::From<::serde_json::Map<::std::string::String, ::serde_json::Value>>
19678    for RpcChunkError
19679{
19680    fn from(value: ::serde_json::Map<::std::string::String, ::serde_json::Value>) -> Self {
19681        Self::UnknownBlock(value)
19682    }
19683}
19684#[doc = "`RpcChunkRequest`"]
19685#[doc = r""]
19686#[doc = r" <details><summary>JSON schema</summary>"]
19687#[doc = r""]
19688#[doc = r" ```json"]
19689#[doc = "{"]
19690#[doc = "  \"title\": \"RpcChunkRequest\","]
19691#[doc = "  \"type\": \"object\","]
19692#[doc = "  \"anyOf\": ["]
19693#[doc = "    {"]
19694#[doc = "      \"title\": \"block_shard_id\","]
19695#[doc = "      \"type\": \"object\","]
19696#[doc = "      \"required\": ["]
19697#[doc = "        \"block_id\","]
19698#[doc = "        \"shard_id\""]
19699#[doc = "      ],"]
19700#[doc = "      \"properties\": {"]
19701#[doc = "        \"block_id\": {"]
19702#[doc = "          \"$ref\": \"#/components/schemas/BlockId\""]
19703#[doc = "        },"]
19704#[doc = "        \"shard_id\": {"]
19705#[doc = "          \"$ref\": \"#/components/schemas/ShardId\""]
19706#[doc = "        }"]
19707#[doc = "      }"]
19708#[doc = "    },"]
19709#[doc = "    {"]
19710#[doc = "      \"title\": \"chunk_hash\","]
19711#[doc = "      \"type\": \"object\","]
19712#[doc = "      \"required\": ["]
19713#[doc = "        \"chunk_id\""]
19714#[doc = "      ],"]
19715#[doc = "      \"properties\": {"]
19716#[doc = "        \"chunk_id\": {"]
19717#[doc = "          \"$ref\": \"#/components/schemas/CryptoHash\""]
19718#[doc = "        }"]
19719#[doc = "      }"]
19720#[doc = "    }"]
19721#[doc = "  ]"]
19722#[doc = "}"]
19723#[doc = r" ```"]
19724#[doc = r" </details>"]
19725#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
19726#[serde(untagged)]
19727pub enum RpcChunkRequest {
19728    BlockShardId {
19729        block_id: BlockId,
19730        shard_id: ShardId,
19731    },
19732    ChunkHash {
19733        chunk_id: CryptoHash,
19734    },
19735}
19736impl ::std::convert::From<&Self> for RpcChunkRequest {
19737    fn from(value: &RpcChunkRequest) -> Self {
19738        value.clone()
19739    }
19740}
19741#[doc = "`RpcChunkResponse`"]
19742#[doc = r""]
19743#[doc = r" <details><summary>JSON schema</summary>"]
19744#[doc = r""]
19745#[doc = r" ```json"]
19746#[doc = "{"]
19747#[doc = "  \"type\": \"object\","]
19748#[doc = "  \"required\": ["]
19749#[doc = "    \"author\","]
19750#[doc = "    \"header\","]
19751#[doc = "    \"receipts\","]
19752#[doc = "    \"transactions\""]
19753#[doc = "  ],"]
19754#[doc = "  \"properties\": {"]
19755#[doc = "    \"author\": {"]
19756#[doc = "      \"$ref\": \"#/components/schemas/AccountId\""]
19757#[doc = "    },"]
19758#[doc = "    \"header\": {"]
19759#[doc = "      \"$ref\": \"#/components/schemas/ChunkHeaderView\""]
19760#[doc = "    },"]
19761#[doc = "    \"receipts\": {"]
19762#[doc = "      \"type\": \"array\","]
19763#[doc = "      \"items\": {"]
19764#[doc = "        \"$ref\": \"#/components/schemas/ReceiptView\""]
19765#[doc = "      }"]
19766#[doc = "    },"]
19767#[doc = "    \"transactions\": {"]
19768#[doc = "      \"type\": \"array\","]
19769#[doc = "      \"items\": {"]
19770#[doc = "        \"$ref\": \"#/components/schemas/SignedTransactionView\""]
19771#[doc = "      }"]
19772#[doc = "    }"]
19773#[doc = "  }"]
19774#[doc = "}"]
19775#[doc = r" ```"]
19776#[doc = r" </details>"]
19777#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
19778pub struct RpcChunkResponse {
19779    pub author: AccountId,
19780    pub header: ChunkHeaderView,
19781    pub receipts: ::std::vec::Vec<ReceiptView>,
19782    pub transactions: ::std::vec::Vec<SignedTransactionView>,
19783}
19784impl ::std::convert::From<&RpcChunkResponse> for RpcChunkResponse {
19785    fn from(value: &RpcChunkResponse) -> Self {
19786        value.clone()
19787    }
19788}
19789#[doc = "`RpcClientConfigError`"]
19790#[doc = r""]
19791#[doc = r" <details><summary>JSON schema</summary>"]
19792#[doc = r""]
19793#[doc = r" ```json"]
19794#[doc = "{"]
19795#[doc = "  \"oneOf\": ["]
19796#[doc = "    {"]
19797#[doc = "      \"type\": \"object\","]
19798#[doc = "      \"required\": ["]
19799#[doc = "        \"info\","]
19800#[doc = "        \"name\""]
19801#[doc = "      ],"]
19802#[doc = "      \"properties\": {"]
19803#[doc = "        \"info\": {"]
19804#[doc = "          \"type\": \"object\","]
19805#[doc = "          \"required\": ["]
19806#[doc = "            \"error_message\""]
19807#[doc = "          ],"]
19808#[doc = "          \"properties\": {"]
19809#[doc = "            \"error_message\": {"]
19810#[doc = "              \"type\": \"string\""]
19811#[doc = "            }"]
19812#[doc = "          }"]
19813#[doc = "        },"]
19814#[doc = "        \"name\": {"]
19815#[doc = "          \"type\": \"string\","]
19816#[doc = "          \"enum\": ["]
19817#[doc = "            \"INTERNAL_ERROR\""]
19818#[doc = "          ]"]
19819#[doc = "        }"]
19820#[doc = "      }"]
19821#[doc = "    }"]
19822#[doc = "  ]"]
19823#[doc = "}"]
19824#[doc = r" ```"]
19825#[doc = r" </details>"]
19826#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
19827#[serde(tag = "name", content = "info")]
19828pub enum RpcClientConfigError {
19829    #[serde(rename = "INTERNAL_ERROR")]
19830    InternalError {
19831        error_message: ::std::string::String,
19832    },
19833}
19834impl ::std::convert::From<&Self> for RpcClientConfigError {
19835    fn from(value: &RpcClientConfigError) -> Self {
19836        value.clone()
19837    }
19838}
19839#[doc = "`RpcClientConfigRequest`"]
19840#[doc = r""]
19841#[doc = r" <details><summary>JSON schema</summary>"]
19842#[doc = r""]
19843#[doc = r" ```json"]
19844#[doc = "{"]
19845#[doc = "  \"title\": \"RpcClientConfigRequest\","]
19846#[doc = "  \"type\": \"null\""]
19847#[doc = "}"]
19848#[doc = r" ```"]
19849#[doc = r" </details>"]
19850#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
19851#[serde(transparent)]
19852pub struct RpcClientConfigRequest(pub ());
19853impl ::std::ops::Deref for RpcClientConfigRequest {
19854    type Target = ();
19855    fn deref(&self) -> &() {
19856        &self.0
19857    }
19858}
19859impl ::std::convert::From<RpcClientConfigRequest> for () {
19860    fn from(value: RpcClientConfigRequest) -> Self {
19861        value.0
19862    }
19863}
19864impl ::std::convert::From<&RpcClientConfigRequest> for RpcClientConfigRequest {
19865    fn from(value: &RpcClientConfigRequest) -> Self {
19866        value.clone()
19867    }
19868}
19869impl ::std::convert::From<()> for RpcClientConfigRequest {
19870    fn from(value: ()) -> Self {
19871        Self(value)
19872    }
19873}
19874#[doc = "ClientConfig where some fields can be updated at runtime."]
19875#[doc = r""]
19876#[doc = r" <details><summary>JSON schema</summary>"]
19877#[doc = r""]
19878#[doc = r" ```json"]
19879#[doc = "{"]
19880#[doc = "  \"description\": \"ClientConfig where some fields can be updated at runtime.\","]
19881#[doc = "  \"type\": \"object\","]
19882#[doc = "  \"required\": ["]
19883#[doc = "    \"archive\","]
19884#[doc = "    \"block_fetch_horizon\","]
19885#[doc = "    \"block_header_fetch_horizon\","]
19886#[doc = "    \"block_production_tracking_delay\","]
19887#[doc = "    \"catchup_step_period\","]
19888#[doc = "    \"chain_id\","]
19889#[doc = "    \"chunk_request_retry_period\","]
19890#[doc = "    \"chunk_validation_threads\","]
19891#[doc = "    \"chunk_wait_mult\","]
19892#[doc = "    \"client_background_migration_threads\","]
19893#[doc = "    \"doomslug_step_period\","]
19894#[doc = "    \"dynamic_resharding_dry_run\","]
19895#[doc = "    \"enable_early_prepare_transactions\","]
19896#[doc = "    \"enable_multiline_logging\","]
19897#[doc = "    \"enable_statistics_export\","]
19898#[doc = "    \"epoch_length\","]
19899#[doc = "    \"epoch_sync\","]
19900#[doc = "    \"expected_shutdown\","]
19901#[doc = "    \"gc\","]
19902#[doc = "    \"header_sync_expected_height_per_second\","]
19903#[doc = "    \"header_sync_initial_timeout\","]
19904#[doc = "    \"header_sync_progress_timeout\","]
19905#[doc = "    \"header_sync_stall_ban_timeout\","]
19906#[doc = "    \"log_summary_period\","]
19907#[doc = "    \"log_summary_style\","]
19908#[doc = "    \"max_block_production_delay\","]
19909#[doc = "    \"max_block_wait_delay\","]
19910#[doc = "    \"min_block_production_delay\","]
19911#[doc = "    \"min_num_peers\","]
19912#[doc = "    \"num_block_producer_seats\","]
19913#[doc = "    \"orphan_state_witness_max_size\","]
19914#[doc = "    \"orphan_state_witness_pool_size\","]
19915#[doc = "    \"produce_chunk_add_transactions_time_limit\","]
19916#[doc = "    \"produce_empty_blocks\","]
19917#[doc = "    \"protocol_version_check\","]
19918#[doc = "    \"resharding_config\","]
19919#[doc = "    \"save_invalid_witnesses\","]
19920#[doc = "    \"save_latest_witnesses\","]
19921#[doc = "    \"save_trie_changes\","]
19922#[doc = "    \"save_tx_outcomes\","]
19923#[doc = "    \"save_untracked_partial_chunks_parts\","]
19924#[doc = "    \"skip_sync_wait\","]
19925#[doc = "    \"state_request_server_threads\","]
19926#[doc = "    \"state_request_throttle_period\","]
19927#[doc = "    \"state_requests_per_throttle_period\","]
19928#[doc = "    \"state_sync\","]
19929#[doc = "    \"state_sync_enabled\","]
19930#[doc = "    \"state_sync_external_backoff\","]
19931#[doc = "    \"state_sync_external_timeout\","]
19932#[doc = "    \"state_sync_p2p_timeout\","]
19933#[doc = "    \"state_sync_retry_backoff\","]
19934#[doc = "    \"sync_check_period\","]
19935#[doc = "    \"sync_height_threshold\","]
19936#[doc = "    \"sync_max_block_requests\","]
19937#[doc = "    \"sync_step_period\","]
19938#[doc = "    \"tracked_shards_config\","]
19939#[doc = "    \"transaction_request_handler_threads\","]
19940#[doc = "    \"ttl_account_id_router\","]
19941#[doc = "    \"tx_routing_height_horizon\","]
19942#[doc = "    \"version\","]
19943#[doc = "    \"view_client_threads\""]
19944#[doc = "  ],"]
19945#[doc = "  \"properties\": {"]
19946#[doc = "    \"archive\": {"]
19947#[doc = "      \"description\": \"Not clear old data, set `true` for archive nodes.\","]
19948#[doc = "      \"type\": \"boolean\""]
19949#[doc = "    },"]
19950#[doc = "    \"block_fetch_horizon\": {"]
19951#[doc = "      \"description\": \"Horizon at which instead of fetching block, fetch full state.\","]
19952#[doc = "      \"type\": \"integer\","]
19953#[doc = "      \"format\": \"uint64\","]
19954#[doc = "      \"minimum\": 0.0"]
19955#[doc = "    },"]
19956#[doc = "    \"block_header_fetch_horizon\": {"]
19957#[doc = "      \"description\": \"Behind this horizon header fetch kicks in.\","]
19958#[doc = "      \"type\": \"integer\","]
19959#[doc = "      \"format\": \"uint64\","]
19960#[doc = "      \"minimum\": 0.0"]
19961#[doc = "    },"]
19962#[doc = "    \"block_production_tracking_delay\": {"]
19963#[doc = "      \"description\": \"Duration to check for producing / skipping block.\","]
19964#[doc = "      \"type\": \"array\","]
19965#[doc = "      \"items\": {"]
19966#[doc = "        \"type\": \"integer\","]
19967#[doc = "        \"format\": \"uint64\","]
19968#[doc = "        \"minimum\": 0.0"]
19969#[doc = "      },"]
19970#[doc = "      \"maxItems\": 2,"]
19971#[doc = "      \"minItems\": 2"]
19972#[doc = "    },"]
19973#[doc = "    \"catchup_step_period\": {"]
19974#[doc = "      \"description\": \"Time between check to perform catchup.\","]
19975#[doc = "      \"type\": \"array\","]
19976#[doc = "      \"items\": {"]
19977#[doc = "        \"type\": \"integer\","]
19978#[doc = "        \"format\": \"uint64\","]
19979#[doc = "        \"minimum\": 0.0"]
19980#[doc = "      },"]
19981#[doc = "      \"maxItems\": 2,"]
19982#[doc = "      \"minItems\": 2"]
19983#[doc = "    },"]
19984#[doc = "    \"chain_id\": {"]
19985#[doc = "      \"description\": \"Chain id for status.\","]
19986#[doc = "      \"type\": \"string\""]
19987#[doc = "    },"]
19988#[doc = "    \"chunk_distribution_network\": {"]
19989#[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.\","]
19990#[doc = "      \"anyOf\": ["]
19991#[doc = "        {"]
19992#[doc = "          \"$ref\": \"#/components/schemas/ChunkDistributionNetworkConfig\""]
19993#[doc = "        },"]
19994#[doc = "        {"]
19995#[doc = "          \"type\": \"null\""]
19996#[doc = "        }"]
19997#[doc = "      ]"]
19998#[doc = "    },"]
19999#[doc = "    \"chunk_request_retry_period\": {"]
20000#[doc = "      \"description\": \"Time between checking to re-request chunks.\","]
20001#[doc = "      \"type\": \"array\","]
20002#[doc = "      \"items\": {"]
20003#[doc = "        \"type\": \"integer\","]
20004#[doc = "        \"format\": \"uint64\","]
20005#[doc = "        \"minimum\": 0.0"]
20006#[doc = "      },"]
20007#[doc = "      \"maxItems\": 2,"]
20008#[doc = "      \"minItems\": 2"]
20009#[doc = "    },"]
20010#[doc = "    \"chunk_validation_threads\": {"]
20011#[doc = "      \"description\": \"Number of threads for ChunkValidationActor pool.\","]
20012#[doc = "      \"type\": \"integer\","]
20013#[doc = "      \"format\": \"uint\","]
20014#[doc = "      \"minimum\": 0.0"]
20015#[doc = "    },"]
20016#[doc = "    \"chunk_wait_mult\": {"]
20017#[doc = "      \"description\": \"Multiplier for the wait time for all chunks to be received.\","]
20018#[doc = "      \"type\": \"array\","]
20019#[doc = "      \"items\": {"]
20020#[doc = "        \"type\": \"integer\","]
20021#[doc = "        \"format\": \"int32\""]
20022#[doc = "      },"]
20023#[doc = "      \"maxItems\": 2,"]
20024#[doc = "      \"minItems\": 2"]
20025#[doc = "    },"]
20026#[doc = "    \"client_background_migration_threads\": {"]
20027#[doc = "      \"description\": \"Number of threads to execute background migration work in client.\","]
20028#[doc = "      \"type\": \"integer\","]
20029#[doc = "      \"format\": \"uint\","]
20030#[doc = "      \"minimum\": 0.0"]
20031#[doc = "    },"]
20032#[doc = "    \"cloud_archival_writer\": {"]
20033#[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.\","]
20034#[doc = "      \"anyOf\": ["]
20035#[doc = "        {"]
20036#[doc = "          \"$ref\": \"#/components/schemas/CloudArchivalWriterConfig\""]
20037#[doc = "        },"]
20038#[doc = "        {"]
20039#[doc = "          \"type\": \"null\""]
20040#[doc = "        }"]
20041#[doc = "      ]"]
20042#[doc = "    },"]
20043#[doc = "    \"doomslug_step_period\": {"]
20044#[doc = "      \"description\": \"Time between running doomslug timer.\","]
20045#[doc = "      \"type\": \"array\","]
20046#[doc = "      \"items\": {"]
20047#[doc = "        \"type\": \"integer\","]
20048#[doc = "        \"format\": \"uint64\","]
20049#[doc = "        \"minimum\": 0.0"]
20050#[doc = "      },"]
20051#[doc = "      \"maxItems\": 2,"]
20052#[doc = "      \"minItems\": 2"]
20053#[doc = "    },"]
20054#[doc = "    \"dynamic_resharding_dry_run\": {"]
20055#[doc = "      \"description\": \"If true, the runtime will do a dynamic resharding 'dry run' at the last block of each epoch.\\nThis means calculating tentative boundary accounts for splitting the tracked shards.\","]
20056#[doc = "      \"type\": \"boolean\""]
20057#[doc = "    },"]
20058#[doc = "    \"enable_early_prepare_transactions\": {"]
20059#[doc = "      \"description\": \"If true, transactions for the next chunk will be prepared early, right after the previous chunk's\\npost-state is ready. This can help produce chunks faster, for high-throughput chains.\\nThe current implementation increases latency on low-load chains, which will be fixed in the future.\\nThe default is disabled.\","]
20060#[doc = "      \"type\": \"boolean\""]
20061#[doc = "    },"]
20062#[doc = "    \"enable_multiline_logging\": {"]
20063#[doc = "      \"type\": \"boolean\""]
20064#[doc = "    },"]
20065#[doc = "    \"enable_statistics_export\": {"]
20066#[doc = "      \"description\": \"Re-export storage layer statistics as prometheus metrics.\","]
20067#[doc = "      \"type\": \"boolean\""]
20068#[doc = "    },"]
20069#[doc = "    \"epoch_length\": {"]
20070#[doc = "      \"description\": \"Epoch length.\","]
20071#[doc = "      \"type\": \"integer\","]
20072#[doc = "      \"format\": \"uint64\","]
20073#[doc = "      \"minimum\": 0.0"]
20074#[doc = "    },"]
20075#[doc = "    \"epoch_sync\": {"]
20076#[doc = "      \"description\": \"Options for epoch sync.\","]
20077#[doc = "      \"allOf\": ["]
20078#[doc = "        {"]
20079#[doc = "          \"$ref\": \"#/components/schemas/EpochSyncConfig\""]
20080#[doc = "        }"]
20081#[doc = "      ]"]
20082#[doc = "    },"]
20083#[doc = "    \"expected_shutdown\": {"]
20084#[doc = "      \"description\": \"Graceful shutdown at expected block height.\","]
20085#[doc = "      \"allOf\": ["]
20086#[doc = "        {"]
20087#[doc = "          \"$ref\": \"#/components/schemas/MutableConfigValue\""]
20088#[doc = "        }"]
20089#[doc = "      ]"]
20090#[doc = "    },"]
20091#[doc = "    \"gc\": {"]
20092#[doc = "      \"description\": \"Garbage collection configuration.\","]
20093#[doc = "      \"allOf\": ["]
20094#[doc = "        {"]
20095#[doc = "          \"$ref\": \"#/components/schemas/GCConfig\""]
20096#[doc = "        }"]
20097#[doc = "      ]"]
20098#[doc = "    },"]
20099#[doc = "    \"header_sync_expected_height_per_second\": {"]
20100#[doc = "      \"description\": \"Expected increase of header head height per second during header sync\","]
20101#[doc = "      \"type\": \"integer\","]
20102#[doc = "      \"format\": \"uint64\","]
20103#[doc = "      \"minimum\": 0.0"]
20104#[doc = "    },"]
20105#[doc = "    \"header_sync_initial_timeout\": {"]
20106#[doc = "      \"description\": \"How much time to wait after initial header sync\","]
20107#[doc = "      \"type\": \"array\","]
20108#[doc = "      \"items\": {"]
20109#[doc = "        \"type\": \"integer\","]
20110#[doc = "        \"format\": \"uint64\","]
20111#[doc = "        \"minimum\": 0.0"]
20112#[doc = "      },"]
20113#[doc = "      \"maxItems\": 2,"]
20114#[doc = "      \"minItems\": 2"]
20115#[doc = "    },"]
20116#[doc = "    \"header_sync_progress_timeout\": {"]
20117#[doc = "      \"description\": \"How much time to wait after some progress is made in header sync\","]
20118#[doc = "      \"type\": \"array\","]
20119#[doc = "      \"items\": {"]
20120#[doc = "        \"type\": \"integer\","]
20121#[doc = "        \"format\": \"uint64\","]
20122#[doc = "        \"minimum\": 0.0"]
20123#[doc = "      },"]
20124#[doc = "      \"maxItems\": 2,"]
20125#[doc = "      \"minItems\": 2"]
20126#[doc = "    },"]
20127#[doc = "    \"header_sync_stall_ban_timeout\": {"]
20128#[doc = "      \"description\": \"How much time to wait before banning a peer in header sync if sync is too slow\","]
20129#[doc = "      \"type\": \"array\","]
20130#[doc = "      \"items\": {"]
20131#[doc = "        \"type\": \"integer\","]
20132#[doc = "        \"format\": \"uint64\","]
20133#[doc = "        \"minimum\": 0.0"]
20134#[doc = "      },"]
20135#[doc = "      \"maxItems\": 2,"]
20136#[doc = "      \"minItems\": 2"]
20137#[doc = "    },"]
20138#[doc = "    \"log_summary_period\": {"]
20139#[doc = "      \"description\": \"Period between logging summary information.\","]
20140#[doc = "      \"type\": \"array\","]
20141#[doc = "      \"items\": {"]
20142#[doc = "        \"type\": \"integer\","]
20143#[doc = "        \"format\": \"uint64\","]
20144#[doc = "        \"minimum\": 0.0"]
20145#[doc = "      },"]
20146#[doc = "      \"maxItems\": 2,"]
20147#[doc = "      \"minItems\": 2"]
20148#[doc = "    },"]
20149#[doc = "    \"log_summary_style\": {"]
20150#[doc = "      \"description\": \"Enable coloring of the logs\","]
20151#[doc = "      \"allOf\": ["]
20152#[doc = "        {"]
20153#[doc = "          \"$ref\": \"#/components/schemas/LogSummaryStyle\""]
20154#[doc = "        }"]
20155#[doc = "      ]"]
20156#[doc = "    },"]
20157#[doc = "    \"max_block_production_delay\": {"]
20158#[doc = "      \"description\": \"Maximum wait for approvals before producing block.\","]
20159#[doc = "      \"type\": \"array\","]
20160#[doc = "      \"items\": {"]
20161#[doc = "        \"type\": \"integer\","]
20162#[doc = "        \"format\": \"uint64\","]
20163#[doc = "        \"minimum\": 0.0"]
20164#[doc = "      },"]
20165#[doc = "      \"maxItems\": 2,"]
20166#[doc = "      \"minItems\": 2"]
20167#[doc = "    },"]
20168#[doc = "    \"max_block_wait_delay\": {"]
20169#[doc = "      \"description\": \"Maximum duration before skipping given height.\","]
20170#[doc = "      \"type\": \"array\","]
20171#[doc = "      \"items\": {"]
20172#[doc = "        \"type\": \"integer\","]
20173#[doc = "        \"format\": \"uint64\","]
20174#[doc = "        \"minimum\": 0.0"]
20175#[doc = "      },"]
20176#[doc = "      \"maxItems\": 2,"]
20177#[doc = "      \"minItems\": 2"]
20178#[doc = "    },"]
20179#[doc = "    \"max_gas_burnt_view\": {"]
20180#[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.\","]
20181#[doc = "      \"anyOf\": ["]
20182#[doc = "        {"]
20183#[doc = "          \"$ref\": \"#/components/schemas/NearGas\""]
20184#[doc = "        },"]
20185#[doc = "        {"]
20186#[doc = "          \"type\": \"null\""]
20187#[doc = "        }"]
20188#[doc = "      ]"]
20189#[doc = "    },"]
20190#[doc = "    \"min_block_production_delay\": {"]
20191#[doc = "      \"description\": \"Minimum duration before producing block.\","]
20192#[doc = "      \"type\": \"array\","]
20193#[doc = "      \"items\": {"]
20194#[doc = "        \"type\": \"integer\","]
20195#[doc = "        \"format\": \"uint64\","]
20196#[doc = "        \"minimum\": 0.0"]
20197#[doc = "      },"]
20198#[doc = "      \"maxItems\": 2,"]
20199#[doc = "      \"minItems\": 2"]
20200#[doc = "    },"]
20201#[doc = "    \"min_num_peers\": {"]
20202#[doc = "      \"description\": \"Minimum number of peers to start syncing.\","]
20203#[doc = "      \"type\": \"integer\","]
20204#[doc = "      \"format\": \"uint\","]
20205#[doc = "      \"minimum\": 0.0"]
20206#[doc = "    },"]
20207#[doc = "    \"num_block_producer_seats\": {"]
20208#[doc = "      \"description\": \"Number of block producer seats\","]
20209#[doc = "      \"type\": \"integer\","]
20210#[doc = "      \"format\": \"uint64\","]
20211#[doc = "      \"minimum\": 0.0"]
20212#[doc = "    },"]
20213#[doc = "    \"orphan_state_witness_max_size\": {"]
20214#[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.\","]
20215#[doc = "      \"type\": \"integer\","]
20216#[doc = "      \"format\": \"uint64\","]
20217#[doc = "      \"minimum\": 0.0"]
20218#[doc = "    },"]
20219#[doc = "    \"orphan_state_witness_pool_size\": {"]
20220#[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.\","]
20221#[doc = "      \"type\": \"integer\","]
20222#[doc = "      \"format\": \"uint\","]
20223#[doc = "      \"minimum\": 0.0"]
20224#[doc = "    },"]
20225#[doc = "    \"produce_chunk_add_transactions_time_limit\": {"]
20226#[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.\","]
20227#[doc = "      \"type\": \"string\""]
20228#[doc = "    },"]
20229#[doc = "    \"produce_empty_blocks\": {"]
20230#[doc = "      \"description\": \"Produce empty blocks, use `false` for testing.\","]
20231#[doc = "      \"type\": \"boolean\""]
20232#[doc = "    },"]
20233#[doc = "    \"protocol_version_check\": {"]
20234#[doc = "      \"description\": \"Determines whether client should exit if the protocol version is not supported\\nfor the next or next next epoch.\","]
20235#[doc = "      \"allOf\": ["]
20236#[doc = "        {"]
20237#[doc = "          \"$ref\": \"#/components/schemas/ProtocolVersionCheckConfig\""]
20238#[doc = "        }"]
20239#[doc = "      ]"]
20240#[doc = "    },"]
20241#[doc = "    \"resharding_config\": {"]
20242#[doc = "      \"$ref\": \"#/components/schemas/MutableConfigValue\""]
20243#[doc = "    },"]
20244#[doc = "    \"rpc_addr\": {"]
20245#[doc = "      \"description\": \"Listening rpc port for status.\","]
20246#[doc = "      \"type\": ["]
20247#[doc = "        \"string\","]
20248#[doc = "        \"null\""]
20249#[doc = "      ]"]
20250#[doc = "    },"]
20251#[doc = "    \"save_invalid_witnesses\": {"]
20252#[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.\","]
20253#[doc = "      \"type\": \"boolean\""]
20254#[doc = "    },"]
20255#[doc = "    \"save_latest_witnesses\": {"]
20256#[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.\","]
20257#[doc = "      \"type\": \"boolean\""]
20258#[doc = "    },"]
20259#[doc = "    \"save_trie_changes\": {"]
20260#[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.\","]
20261#[doc = "      \"type\": \"boolean\""]
20262#[doc = "    },"]
20263#[doc = "    \"save_tx_outcomes\": {"]
20264#[doc = "      \"description\": \"Whether to persist transaction outcomes to disk or not.\","]
20265#[doc = "      \"type\": \"boolean\""]
20266#[doc = "    },"]
20267#[doc = "    \"save_untracked_partial_chunks_parts\": {"]
20268#[doc = "      \"description\": \"Whether to persist partial chunk parts for untracked shards or not.\","]
20269#[doc = "      \"type\": \"boolean\""]
20270#[doc = "    },"]
20271#[doc = "    \"skip_sync_wait\": {"]
20272#[doc = "      \"description\": \"Skip waiting for sync (for testing or single node testnet).\","]
20273#[doc = "      \"type\": \"boolean\""]
20274#[doc = "    },"]
20275#[doc = "    \"state_request_server_threads\": {"]
20276#[doc = "      \"description\": \"Number of threads for StateRequestActor pool.\","]
20277#[doc = "      \"type\": \"integer\","]
20278#[doc = "      \"format\": \"uint\","]
20279#[doc = "      \"minimum\": 0.0"]
20280#[doc = "    },"]
20281#[doc = "    \"state_request_throttle_period\": {"]
20282#[doc = "      \"description\": \"Number of seconds between state requests for view client.\\nThrottling window for state requests (headers and parts).\","]
20283#[doc = "      \"type\": \"array\","]
20284#[doc = "      \"items\": {"]
20285#[doc = "        \"type\": \"integer\","]
20286#[doc = "        \"format\": \"uint64\","]
20287#[doc = "        \"minimum\": 0.0"]
20288#[doc = "      },"]
20289#[doc = "      \"maxItems\": 2,"]
20290#[doc = "      \"minItems\": 2"]
20291#[doc = "    },"]
20292#[doc = "    \"state_requests_per_throttle_period\": {"]
20293#[doc = "      \"description\": \"Maximum number of state requests served per throttle period\","]
20294#[doc = "      \"type\": \"integer\","]
20295#[doc = "      \"format\": \"uint\","]
20296#[doc = "      \"minimum\": 0.0"]
20297#[doc = "    },"]
20298#[doc = "    \"state_sync\": {"]
20299#[doc = "      \"description\": \"Options for syncing state.\","]
20300#[doc = "      \"allOf\": ["]
20301#[doc = "        {"]
20302#[doc = "          \"$ref\": \"#/components/schemas/StateSyncConfig\""]
20303#[doc = "        }"]
20304#[doc = "      ]"]
20305#[doc = "    },"]
20306#[doc = "    \"state_sync_enabled\": {"]
20307#[doc = "      \"description\": \"Whether to use the State Sync mechanism.\\nIf disabled, the node will do Block Sync instead of State Sync.\","]
20308#[doc = "      \"type\": \"boolean\""]
20309#[doc = "    },"]
20310#[doc = "    \"state_sync_external_backoff\": {"]
20311#[doc = "      \"description\": \"Additional waiting period after a failed request to external storage\","]
20312#[doc = "      \"type\": \"array\","]
20313#[doc = "      \"items\": {"]
20314#[doc = "        \"type\": \"integer\","]
20315#[doc = "        \"format\": \"uint64\","]
20316#[doc = "        \"minimum\": 0.0"]
20317#[doc = "      },"]
20318#[doc = "      \"maxItems\": 2,"]
20319#[doc = "      \"minItems\": 2"]
20320#[doc = "    },"]
20321#[doc = "    \"state_sync_external_timeout\": {"]
20322#[doc = "      \"description\": \"How long to wait for a response from centralized state sync\","]
20323#[doc = "      \"type\": \"array\","]
20324#[doc = "      \"items\": {"]
20325#[doc = "        \"type\": \"integer\","]
20326#[doc = "        \"format\": \"uint64\","]
20327#[doc = "        \"minimum\": 0.0"]
20328#[doc = "      },"]
20329#[doc = "      \"maxItems\": 2,"]
20330#[doc = "      \"minItems\": 2"]
20331#[doc = "    },"]
20332#[doc = "    \"state_sync_p2p_timeout\": {"]
20333#[doc = "      \"description\": \"How long to wait for a response from p2p state sync\","]
20334#[doc = "      \"type\": \"array\","]
20335#[doc = "      \"items\": {"]
20336#[doc = "        \"type\": \"integer\","]
20337#[doc = "        \"format\": \"uint64\","]
20338#[doc = "        \"minimum\": 0.0"]
20339#[doc = "      },"]
20340#[doc = "      \"maxItems\": 2,"]
20341#[doc = "      \"minItems\": 2"]
20342#[doc = "    },"]
20343#[doc = "    \"state_sync_retry_backoff\": {"]
20344#[doc = "      \"description\": \"How long to wait after a failed state sync request\","]
20345#[doc = "      \"type\": \"array\","]
20346#[doc = "      \"items\": {"]
20347#[doc = "        \"type\": \"integer\","]
20348#[doc = "        \"format\": \"uint64\","]
20349#[doc = "        \"minimum\": 0.0"]
20350#[doc = "      },"]
20351#[doc = "      \"maxItems\": 2,"]
20352#[doc = "      \"minItems\": 2"]
20353#[doc = "    },"]
20354#[doc = "    \"sync_check_period\": {"]
20355#[doc = "      \"description\": \"How often to check that we are not out of sync.\","]
20356#[doc = "      \"type\": \"array\","]
20357#[doc = "      \"items\": {"]
20358#[doc = "        \"type\": \"integer\","]
20359#[doc = "        \"format\": \"uint64\","]
20360#[doc = "        \"minimum\": 0.0"]
20361#[doc = "      },"]
20362#[doc = "      \"maxItems\": 2,"]
20363#[doc = "      \"minItems\": 2"]
20364#[doc = "    },"]
20365#[doc = "    \"sync_height_threshold\": {"]
20366#[doc = "      \"description\": \"Sync height threshold: below this difference in height don't start syncing.\","]
20367#[doc = "      \"type\": \"integer\","]
20368#[doc = "      \"format\": \"uint64\","]
20369#[doc = "      \"minimum\": 0.0"]
20370#[doc = "    },"]
20371#[doc = "    \"sync_max_block_requests\": {"]
20372#[doc = "      \"description\": \"Maximum number of block requests to send to peers to sync\","]
20373#[doc = "      \"type\": \"integer\","]
20374#[doc = "      \"format\": \"uint\","]
20375#[doc = "      \"minimum\": 0.0"]
20376#[doc = "    },"]
20377#[doc = "    \"sync_step_period\": {"]
20378#[doc = "      \"description\": \"While syncing, how long to check for each step.\","]
20379#[doc = "      \"type\": \"array\","]
20380#[doc = "      \"items\": {"]
20381#[doc = "        \"type\": \"integer\","]
20382#[doc = "        \"format\": \"uint64\","]
20383#[doc = "        \"minimum\": 0.0"]
20384#[doc = "      },"]
20385#[doc = "      \"maxItems\": 2,"]
20386#[doc = "      \"minItems\": 2"]
20387#[doc = "    },"]
20388#[doc = "    \"tracked_shards_config\": {"]
20389#[doc = "      \"$ref\": \"#/components/schemas/TrackedShardsConfig\""]
20390#[doc = "    },"]
20391#[doc = "    \"transaction_pool_size_limit\": {"]
20392#[doc = "      \"description\": \"Limit of the size of per-shard transaction pool measured in bytes. If not set, the size\\nwill be unbounded.\","]
20393#[doc = "      \"type\": ["]
20394#[doc = "        \"integer\","]
20395#[doc = "        \"null\""]
20396#[doc = "      ],"]
20397#[doc = "      \"format\": \"uint64\","]
20398#[doc = "      \"minimum\": 0.0"]
20399#[doc = "    },"]
20400#[doc = "    \"transaction_request_handler_threads\": {"]
20401#[doc = "      \"type\": \"integer\","]
20402#[doc = "      \"format\": \"uint\","]
20403#[doc = "      \"minimum\": 0.0"]
20404#[doc = "    },"]
20405#[doc = "    \"trie_viewer_state_size_limit\": {"]
20406#[doc = "      \"description\": \"Upper bound of the byte size of contract state that is still viewable. None is no limit\","]
20407#[doc = "      \"type\": ["]
20408#[doc = "        \"integer\","]
20409#[doc = "        \"null\""]
20410#[doc = "      ],"]
20411#[doc = "      \"format\": \"uint64\","]
20412#[doc = "      \"minimum\": 0.0"]
20413#[doc = "    },"]
20414#[doc = "    \"ttl_account_id_router\": {"]
20415#[doc = "      \"description\": \"Time to persist Accounts Id in the router without removing them.\","]
20416#[doc = "      \"type\": \"array\","]
20417#[doc = "      \"items\": {"]
20418#[doc = "        \"type\": \"integer\","]
20419#[doc = "        \"format\": \"uint64\","]
20420#[doc = "        \"minimum\": 0.0"]
20421#[doc = "      },"]
20422#[doc = "      \"maxItems\": 2,"]
20423#[doc = "      \"minItems\": 2"]
20424#[doc = "    },"]
20425#[doc = "    \"tx_routing_height_horizon\": {"]
20426#[doc = "      \"description\": \"If the node is not a chunk producer within that many blocks, then route\\nto upcoming chunk producers.\","]
20427#[doc = "      \"type\": \"integer\","]
20428#[doc = "      \"format\": \"uint64\","]
20429#[doc = "      \"minimum\": 0.0"]
20430#[doc = "    },"]
20431#[doc = "    \"version\": {"]
20432#[doc = "      \"description\": \"Version of the binary.\","]
20433#[doc = "      \"allOf\": ["]
20434#[doc = "        {"]
20435#[doc = "          \"$ref\": \"#/components/schemas/Version\""]
20436#[doc = "        }"]
20437#[doc = "      ]"]
20438#[doc = "    },"]
20439#[doc = "    \"view_client_threads\": {"]
20440#[doc = "      \"description\": \"Number of threads for ViewClientActor pool.\","]
20441#[doc = "      \"type\": \"integer\","]
20442#[doc = "      \"format\": \"uint\","]
20443#[doc = "      \"minimum\": 0.0"]
20444#[doc = "    }"]
20445#[doc = "  }"]
20446#[doc = "}"]
20447#[doc = r" ```"]
20448#[doc = r" </details>"]
20449#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
20450pub struct RpcClientConfigResponse {
20451    #[doc = "Not clear old data, set `true` for archive nodes."]
20452    pub archive: bool,
20453    #[doc = "Horizon at which instead of fetching block, fetch full state."]
20454    pub block_fetch_horizon: u64,
20455    #[doc = "Behind this horizon header fetch kicks in."]
20456    pub block_header_fetch_horizon: u64,
20457    #[doc = "Duration to check for producing / skipping block."]
20458    pub block_production_tracking_delay: [u64; 2usize],
20459    #[doc = "Time between check to perform catchup."]
20460    pub catchup_step_period: [u64; 2usize],
20461    #[doc = "Chain id for status."]
20462    pub chain_id: ::std::string::String,
20463    #[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."]
20464    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
20465    pub chunk_distribution_network: ::std::option::Option<ChunkDistributionNetworkConfig>,
20466    #[doc = "Time between checking to re-request chunks."]
20467    pub chunk_request_retry_period: [u64; 2usize],
20468    #[doc = "Number of threads for ChunkValidationActor pool."]
20469    pub chunk_validation_threads: u32,
20470    #[doc = "Multiplier for the wait time for all chunks to be received."]
20471    pub chunk_wait_mult: [i32; 2usize],
20472    #[doc = "Number of threads to execute background migration work in client."]
20473    pub client_background_migration_threads: u32,
20474    #[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."]
20475    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
20476    pub cloud_archival_writer: ::std::option::Option<CloudArchivalWriterConfig>,
20477    #[doc = "Time between running doomslug timer."]
20478    pub doomslug_step_period: [u64; 2usize],
20479    #[doc = "If true, the runtime will do a dynamic resharding 'dry run' at the last block of each epoch.\nThis means calculating tentative boundary accounts for splitting the tracked shards."]
20480    pub dynamic_resharding_dry_run: bool,
20481    #[doc = "If true, transactions for the next chunk will be prepared early, right after the previous chunk's\npost-state is ready. This can help produce chunks faster, for high-throughput chains.\nThe current implementation increases latency on low-load chains, which will be fixed in the future.\nThe default is disabled."]
20482    pub enable_early_prepare_transactions: bool,
20483    pub enable_multiline_logging: bool,
20484    #[doc = "Re-export storage layer statistics as prometheus metrics."]
20485    pub enable_statistics_export: bool,
20486    #[doc = "Epoch length."]
20487    pub epoch_length: u64,
20488    #[doc = "Options for epoch sync."]
20489    pub epoch_sync: EpochSyncConfig,
20490    #[doc = "Graceful shutdown at expected block height."]
20491    pub expected_shutdown: MutableConfigValue,
20492    #[doc = "Garbage collection configuration."]
20493    pub gc: GcConfig,
20494    #[doc = "Expected increase of header head height per second during header sync"]
20495    pub header_sync_expected_height_per_second: u64,
20496    #[doc = "How much time to wait after initial header sync"]
20497    pub header_sync_initial_timeout: [u64; 2usize],
20498    #[doc = "How much time to wait after some progress is made in header sync"]
20499    pub header_sync_progress_timeout: [u64; 2usize],
20500    #[doc = "How much time to wait before banning a peer in header sync if sync is too slow"]
20501    pub header_sync_stall_ban_timeout: [u64; 2usize],
20502    #[doc = "Period between logging summary information."]
20503    pub log_summary_period: [u64; 2usize],
20504    #[doc = "Enable coloring of the logs"]
20505    pub log_summary_style: LogSummaryStyle,
20506    #[doc = "Maximum wait for approvals before producing block."]
20507    pub max_block_production_delay: [u64; 2usize],
20508    #[doc = "Maximum duration before skipping given height."]
20509    pub max_block_wait_delay: [u64; 2usize],
20510    #[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."]
20511    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
20512    pub max_gas_burnt_view: ::std::option::Option<NearGas>,
20513    #[doc = "Minimum duration before producing block."]
20514    pub min_block_production_delay: [u64; 2usize],
20515    #[doc = "Minimum number of peers to start syncing."]
20516    pub min_num_peers: u32,
20517    #[doc = "Number of block producer seats"]
20518    pub num_block_producer_seats: u64,
20519    #[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."]
20520    pub orphan_state_witness_max_size: u64,
20521    #[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."]
20522    pub orphan_state_witness_pool_size: u32,
20523    #[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."]
20524    pub produce_chunk_add_transactions_time_limit: ::std::string::String,
20525    #[doc = "Produce empty blocks, use `false` for testing."]
20526    pub produce_empty_blocks: bool,
20527    #[doc = "Determines whether client should exit if the protocol version is not supported\nfor the next or next next epoch."]
20528    pub protocol_version_check: ProtocolVersionCheckConfig,
20529    pub resharding_config: MutableConfigValue,
20530    #[doc = "Listening rpc port for status."]
20531    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
20532    pub rpc_addr: ::std::option::Option<::std::string::String>,
20533    #[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."]
20534    pub save_invalid_witnesses: bool,
20535    #[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."]
20536    pub save_latest_witnesses: bool,
20537    #[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."]
20538    pub save_trie_changes: bool,
20539    #[doc = "Whether to persist transaction outcomes to disk or not."]
20540    pub save_tx_outcomes: bool,
20541    #[doc = "Whether to persist partial chunk parts for untracked shards or not."]
20542    pub save_untracked_partial_chunks_parts: bool,
20543    #[doc = "Skip waiting for sync (for testing or single node testnet)."]
20544    pub skip_sync_wait: bool,
20545    #[doc = "Number of threads for StateRequestActor pool."]
20546    pub state_request_server_threads: u32,
20547    #[doc = "Number of seconds between state requests for view client.\nThrottling window for state requests (headers and parts)."]
20548    pub state_request_throttle_period: [u64; 2usize],
20549    #[doc = "Maximum number of state requests served per throttle period"]
20550    pub state_requests_per_throttle_period: u32,
20551    #[doc = "Options for syncing state."]
20552    pub state_sync: StateSyncConfig,
20553    #[doc = "Whether to use the State Sync mechanism.\nIf disabled, the node will do Block Sync instead of State Sync."]
20554    pub state_sync_enabled: bool,
20555    #[doc = "Additional waiting period after a failed request to external storage"]
20556    pub state_sync_external_backoff: [u64; 2usize],
20557    #[doc = "How long to wait for a response from centralized state sync"]
20558    pub state_sync_external_timeout: [u64; 2usize],
20559    #[doc = "How long to wait for a response from p2p state sync"]
20560    pub state_sync_p2p_timeout: [u64; 2usize],
20561    #[doc = "How long to wait after a failed state sync request"]
20562    pub state_sync_retry_backoff: [u64; 2usize],
20563    #[doc = "How often to check that we are not out of sync."]
20564    pub sync_check_period: [u64; 2usize],
20565    #[doc = "Sync height threshold: below this difference in height don't start syncing."]
20566    pub sync_height_threshold: u64,
20567    #[doc = "Maximum number of block requests to send to peers to sync"]
20568    pub sync_max_block_requests: u32,
20569    #[doc = "While syncing, how long to check for each step."]
20570    pub sync_step_period: [u64; 2usize],
20571    pub tracked_shards_config: TrackedShardsConfig,
20572    #[doc = "Limit of the size of per-shard transaction pool measured in bytes. If not set, the size\nwill be unbounded."]
20573    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
20574    pub transaction_pool_size_limit: ::std::option::Option<u64>,
20575    pub transaction_request_handler_threads: u32,
20576    #[doc = "Upper bound of the byte size of contract state that is still viewable. None is no limit"]
20577    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
20578    pub trie_viewer_state_size_limit: ::std::option::Option<u64>,
20579    #[doc = "Time to persist Accounts Id in the router without removing them."]
20580    pub ttl_account_id_router: [u64; 2usize],
20581    #[doc = "If the node is not a chunk producer within that many blocks, then route\nto upcoming chunk producers."]
20582    pub tx_routing_height_horizon: u64,
20583    #[doc = "Version of the binary."]
20584    pub version: Version,
20585    #[doc = "Number of threads for ViewClientActor pool."]
20586    pub view_client_threads: u32,
20587}
20588impl ::std::convert::From<&RpcClientConfigResponse> for RpcClientConfigResponse {
20589    fn from(value: &RpcClientConfigResponse) -> Self {
20590        value.clone()
20591    }
20592}
20593#[doc = "`RpcCongestionLevelRequest`"]
20594#[doc = r""]
20595#[doc = r" <details><summary>JSON schema</summary>"]
20596#[doc = r""]
20597#[doc = r" ```json"]
20598#[doc = "{"]
20599#[doc = "  \"title\": \"RpcCongestionLevelRequest\","]
20600#[doc = "  \"type\": \"object\","]
20601#[doc = "  \"anyOf\": ["]
20602#[doc = "    {"]
20603#[doc = "      \"title\": \"block_shard_id\","]
20604#[doc = "      \"type\": \"object\","]
20605#[doc = "      \"required\": ["]
20606#[doc = "        \"block_id\","]
20607#[doc = "        \"shard_id\""]
20608#[doc = "      ],"]
20609#[doc = "      \"properties\": {"]
20610#[doc = "        \"block_id\": {"]
20611#[doc = "          \"$ref\": \"#/components/schemas/BlockId\""]
20612#[doc = "        },"]
20613#[doc = "        \"shard_id\": {"]
20614#[doc = "          \"$ref\": \"#/components/schemas/ShardId\""]
20615#[doc = "        }"]
20616#[doc = "      }"]
20617#[doc = "    },"]
20618#[doc = "    {"]
20619#[doc = "      \"title\": \"chunk_hash\","]
20620#[doc = "      \"type\": \"object\","]
20621#[doc = "      \"required\": ["]
20622#[doc = "        \"chunk_id\""]
20623#[doc = "      ],"]
20624#[doc = "      \"properties\": {"]
20625#[doc = "        \"chunk_id\": {"]
20626#[doc = "          \"$ref\": \"#/components/schemas/CryptoHash\""]
20627#[doc = "        }"]
20628#[doc = "      }"]
20629#[doc = "    }"]
20630#[doc = "  ]"]
20631#[doc = "}"]
20632#[doc = r" ```"]
20633#[doc = r" </details>"]
20634#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
20635#[serde(untagged)]
20636pub enum RpcCongestionLevelRequest {
20637    BlockShardId {
20638        block_id: BlockId,
20639        shard_id: ShardId,
20640    },
20641    ChunkHash {
20642        chunk_id: CryptoHash,
20643    },
20644}
20645impl ::std::convert::From<&Self> for RpcCongestionLevelRequest {
20646    fn from(value: &RpcCongestionLevelRequest) -> Self {
20647        value.clone()
20648    }
20649}
20650#[doc = "`RpcCongestionLevelResponse`"]
20651#[doc = r""]
20652#[doc = r" <details><summary>JSON schema</summary>"]
20653#[doc = r""]
20654#[doc = r" ```json"]
20655#[doc = "{"]
20656#[doc = "  \"type\": \"object\","]
20657#[doc = "  \"required\": ["]
20658#[doc = "    \"congestion_level\""]
20659#[doc = "  ],"]
20660#[doc = "  \"properties\": {"]
20661#[doc = "    \"congestion_level\": {"]
20662#[doc = "      \"type\": \"number\","]
20663#[doc = "      \"format\": \"double\""]
20664#[doc = "    }"]
20665#[doc = "  }"]
20666#[doc = "}"]
20667#[doc = r" ```"]
20668#[doc = r" </details>"]
20669#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
20670pub struct RpcCongestionLevelResponse {
20671    pub congestion_level: f64,
20672}
20673impl ::std::convert::From<&RpcCongestionLevelResponse> for RpcCongestionLevelResponse {
20674    fn from(value: &RpcCongestionLevelResponse) -> Self {
20675        value.clone()
20676    }
20677}
20678#[doc = "`RpcGasPriceError`"]
20679#[doc = r""]
20680#[doc = r" <details><summary>JSON schema</summary>"]
20681#[doc = r""]
20682#[doc = r" ```json"]
20683#[doc = "{"]
20684#[doc = "  \"oneOf\": ["]
20685#[doc = "    {"]
20686#[doc = "      \"type\": \"object\","]
20687#[doc = "      \"required\": ["]
20688#[doc = "        \"info\","]
20689#[doc = "        \"name\""]
20690#[doc = "      ],"]
20691#[doc = "      \"properties\": {"]
20692#[doc = "        \"info\": {"]
20693#[doc = "          \"type\": \"object\","]
20694#[doc = "          \"required\": ["]
20695#[doc = "            \"error_message\""]
20696#[doc = "          ],"]
20697#[doc = "          \"properties\": {"]
20698#[doc = "            \"error_message\": {"]
20699#[doc = "              \"type\": \"string\""]
20700#[doc = "            }"]
20701#[doc = "          }"]
20702#[doc = "        },"]
20703#[doc = "        \"name\": {"]
20704#[doc = "          \"type\": \"string\","]
20705#[doc = "          \"enum\": ["]
20706#[doc = "            \"INTERNAL_ERROR\""]
20707#[doc = "          ]"]
20708#[doc = "        }"]
20709#[doc = "      }"]
20710#[doc = "    },"]
20711#[doc = "    {"]
20712#[doc = "      \"type\": \"object\","]
20713#[doc = "      \"required\": ["]
20714#[doc = "        \"info\","]
20715#[doc = "        \"name\""]
20716#[doc = "      ],"]
20717#[doc = "      \"properties\": {"]
20718#[doc = "        \"info\": {"]
20719#[doc = "          \"type\": \"object\""]
20720#[doc = "        },"]
20721#[doc = "        \"name\": {"]
20722#[doc = "          \"type\": \"string\","]
20723#[doc = "          \"enum\": ["]
20724#[doc = "            \"UNKNOWN_BLOCK\""]
20725#[doc = "          ]"]
20726#[doc = "        }"]
20727#[doc = "      }"]
20728#[doc = "    }"]
20729#[doc = "  ]"]
20730#[doc = "}"]
20731#[doc = r" ```"]
20732#[doc = r" </details>"]
20733#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
20734#[serde(tag = "name", content = "info")]
20735pub enum RpcGasPriceError {
20736    #[serde(rename = "INTERNAL_ERROR")]
20737    InternalError {
20738        error_message: ::std::string::String,
20739    },
20740    #[serde(rename = "UNKNOWN_BLOCK")]
20741    UnknownBlock(::serde_json::Map<::std::string::String, ::serde_json::Value>),
20742}
20743impl ::std::convert::From<&Self> for RpcGasPriceError {
20744    fn from(value: &RpcGasPriceError) -> Self {
20745        value.clone()
20746    }
20747}
20748impl ::std::convert::From<::serde_json::Map<::std::string::String, ::serde_json::Value>>
20749    for RpcGasPriceError
20750{
20751    fn from(value: ::serde_json::Map<::std::string::String, ::serde_json::Value>) -> Self {
20752        Self::UnknownBlock(value)
20753    }
20754}
20755#[doc = "`RpcGasPriceRequest`"]
20756#[doc = r""]
20757#[doc = r" <details><summary>JSON schema</summary>"]
20758#[doc = r""]
20759#[doc = r" ```json"]
20760#[doc = "{"]
20761#[doc = "  \"title\": \"RpcGasPriceRequest\","]
20762#[doc = "  \"type\": \"object\","]
20763#[doc = "  \"properties\": {"]
20764#[doc = "    \"block_id\": {"]
20765#[doc = "      \"anyOf\": ["]
20766#[doc = "        {"]
20767#[doc = "          \"$ref\": \"#/components/schemas/BlockId\""]
20768#[doc = "        },"]
20769#[doc = "        {"]
20770#[doc = "          \"type\": \"null\""]
20771#[doc = "        }"]
20772#[doc = "      ]"]
20773#[doc = "    }"]
20774#[doc = "  }"]
20775#[doc = "}"]
20776#[doc = r" ```"]
20777#[doc = r" </details>"]
20778#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
20779pub struct RpcGasPriceRequest {
20780    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
20781    pub block_id: ::std::option::Option<BlockId>,
20782}
20783impl ::std::convert::From<&RpcGasPriceRequest> for RpcGasPriceRequest {
20784    fn from(value: &RpcGasPriceRequest) -> Self {
20785        value.clone()
20786    }
20787}
20788impl ::std::default::Default for RpcGasPriceRequest {
20789    fn default() -> Self {
20790        Self {
20791            block_id: Default::default(),
20792        }
20793    }
20794}
20795#[doc = "`RpcGasPriceResponse`"]
20796#[doc = r""]
20797#[doc = r" <details><summary>JSON schema</summary>"]
20798#[doc = r""]
20799#[doc = r" ```json"]
20800#[doc = "{"]
20801#[doc = "  \"type\": \"object\","]
20802#[doc = "  \"required\": ["]
20803#[doc = "    \"gas_price\""]
20804#[doc = "  ],"]
20805#[doc = "  \"properties\": {"]
20806#[doc = "    \"gas_price\": {"]
20807#[doc = "      \"$ref\": \"#/components/schemas/NearToken\""]
20808#[doc = "    }"]
20809#[doc = "  }"]
20810#[doc = "}"]
20811#[doc = r" ```"]
20812#[doc = r" </details>"]
20813#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
20814pub struct RpcGasPriceResponse {
20815    pub gas_price: NearToken,
20816}
20817impl ::std::convert::From<&RpcGasPriceResponse> for RpcGasPriceResponse {
20818    fn from(value: &RpcGasPriceResponse) -> Self {
20819        value.clone()
20820    }
20821}
20822#[doc = "`RpcHealthRequest`"]
20823#[doc = r""]
20824#[doc = r" <details><summary>JSON schema</summary>"]
20825#[doc = r""]
20826#[doc = r" ```json"]
20827#[doc = "{"]
20828#[doc = "  \"title\": \"RpcHealthRequest\","]
20829#[doc = "  \"type\": \"null\""]
20830#[doc = "}"]
20831#[doc = r" ```"]
20832#[doc = r" </details>"]
20833#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
20834#[serde(transparent)]
20835pub struct RpcHealthRequest(pub ());
20836impl ::std::ops::Deref for RpcHealthRequest {
20837    type Target = ();
20838    fn deref(&self) -> &() {
20839        &self.0
20840    }
20841}
20842impl ::std::convert::From<RpcHealthRequest> for () {
20843    fn from(value: RpcHealthRequest) -> Self {
20844        value.0
20845    }
20846}
20847impl ::std::convert::From<&RpcHealthRequest> for RpcHealthRequest {
20848    fn from(value: &RpcHealthRequest) -> Self {
20849        value.clone()
20850    }
20851}
20852impl ::std::convert::From<()> for RpcHealthRequest {
20853    fn from(value: ()) -> Self {
20854        Self(value)
20855    }
20856}
20857#[doc = "`RpcHealthResponse`"]
20858#[doc = r""]
20859#[doc = r" <details><summary>JSON schema</summary>"]
20860#[doc = r""]
20861#[doc = r" ```json"]
20862#[doc = "{"]
20863#[doc = "  \"type\": \"null\""]
20864#[doc = "}"]
20865#[doc = r" ```"]
20866#[doc = r" </details>"]
20867#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
20868#[serde(transparent)]
20869pub struct RpcHealthResponse(pub ());
20870impl ::std::ops::Deref for RpcHealthResponse {
20871    type Target = ();
20872    fn deref(&self) -> &() {
20873        &self.0
20874    }
20875}
20876impl ::std::convert::From<RpcHealthResponse> for () {
20877    fn from(value: RpcHealthResponse) -> Self {
20878        value.0
20879    }
20880}
20881impl ::std::convert::From<&RpcHealthResponse> for RpcHealthResponse {
20882    fn from(value: &RpcHealthResponse) -> Self {
20883        value.clone()
20884    }
20885}
20886impl ::std::convert::From<()> for RpcHealthResponse {
20887    fn from(value: ()) -> Self {
20888        Self(value)
20889    }
20890}
20891#[doc = "`RpcKnownProducer`"]
20892#[doc = r""]
20893#[doc = r" <details><summary>JSON schema</summary>"]
20894#[doc = r""]
20895#[doc = r" ```json"]
20896#[doc = "{"]
20897#[doc = "  \"type\": \"object\","]
20898#[doc = "  \"required\": ["]
20899#[doc = "    \"account_id\","]
20900#[doc = "    \"peer_id\""]
20901#[doc = "  ],"]
20902#[doc = "  \"properties\": {"]
20903#[doc = "    \"account_id\": {"]
20904#[doc = "      \"$ref\": \"#/components/schemas/AccountId\""]
20905#[doc = "    },"]
20906#[doc = "    \"addr\": {"]
20907#[doc = "      \"type\": ["]
20908#[doc = "        \"string\","]
20909#[doc = "        \"null\""]
20910#[doc = "      ]"]
20911#[doc = "    },"]
20912#[doc = "    \"peer_id\": {"]
20913#[doc = "      \"$ref\": \"#/components/schemas/PeerId\""]
20914#[doc = "    }"]
20915#[doc = "  }"]
20916#[doc = "}"]
20917#[doc = r" ```"]
20918#[doc = r" </details>"]
20919#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
20920pub struct RpcKnownProducer {
20921    pub account_id: AccountId,
20922    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
20923    pub addr: ::std::option::Option<::std::string::String>,
20924    pub peer_id: PeerId,
20925}
20926impl ::std::convert::From<&RpcKnownProducer> for RpcKnownProducer {
20927    fn from(value: &RpcKnownProducer) -> Self {
20928        value.clone()
20929    }
20930}
20931#[doc = "`RpcLightClientBlockProofRequest`"]
20932#[doc = r""]
20933#[doc = r" <details><summary>JSON schema</summary>"]
20934#[doc = r""]
20935#[doc = r" ```json"]
20936#[doc = "{"]
20937#[doc = "  \"title\": \"RpcLightClientBlockProofRequest\","]
20938#[doc = "  \"type\": \"object\","]
20939#[doc = "  \"required\": ["]
20940#[doc = "    \"block_hash\","]
20941#[doc = "    \"light_client_head\""]
20942#[doc = "  ],"]
20943#[doc = "  \"properties\": {"]
20944#[doc = "    \"block_hash\": {"]
20945#[doc = "      \"$ref\": \"#/components/schemas/CryptoHash\""]
20946#[doc = "    },"]
20947#[doc = "    \"light_client_head\": {"]
20948#[doc = "      \"$ref\": \"#/components/schemas/CryptoHash\""]
20949#[doc = "    }"]
20950#[doc = "  }"]
20951#[doc = "}"]
20952#[doc = r" ```"]
20953#[doc = r" </details>"]
20954#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
20955pub struct RpcLightClientBlockProofRequest {
20956    pub block_hash: CryptoHash,
20957    pub light_client_head: CryptoHash,
20958}
20959impl ::std::convert::From<&RpcLightClientBlockProofRequest> for RpcLightClientBlockProofRequest {
20960    fn from(value: &RpcLightClientBlockProofRequest) -> Self {
20961        value.clone()
20962    }
20963}
20964#[doc = "`RpcLightClientBlockProofResponse`"]
20965#[doc = r""]
20966#[doc = r" <details><summary>JSON schema</summary>"]
20967#[doc = r""]
20968#[doc = r" ```json"]
20969#[doc = "{"]
20970#[doc = "  \"type\": \"object\","]
20971#[doc = "  \"required\": ["]
20972#[doc = "    \"block_header_lite\","]
20973#[doc = "    \"block_proof\""]
20974#[doc = "  ],"]
20975#[doc = "  \"properties\": {"]
20976#[doc = "    \"block_header_lite\": {"]
20977#[doc = "      \"$ref\": \"#/components/schemas/LightClientBlockLiteView\""]
20978#[doc = "    },"]
20979#[doc = "    \"block_proof\": {"]
20980#[doc = "      \"type\": \"array\","]
20981#[doc = "      \"items\": {"]
20982#[doc = "        \"$ref\": \"#/components/schemas/MerklePathItem\""]
20983#[doc = "      }"]
20984#[doc = "    }"]
20985#[doc = "  }"]
20986#[doc = "}"]
20987#[doc = r" ```"]
20988#[doc = r" </details>"]
20989#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
20990pub struct RpcLightClientBlockProofResponse {
20991    pub block_header_lite: LightClientBlockLiteView,
20992    pub block_proof: ::std::vec::Vec<MerklePathItem>,
20993}
20994impl ::std::convert::From<&RpcLightClientBlockProofResponse> for RpcLightClientBlockProofResponse {
20995    fn from(value: &RpcLightClientBlockProofResponse) -> Self {
20996        value.clone()
20997    }
20998}
20999#[doc = "`RpcLightClientExecutionProofRequest`"]
21000#[doc = r""]
21001#[doc = r" <details><summary>JSON schema</summary>"]
21002#[doc = r""]
21003#[doc = r" ```json"]
21004#[doc = "{"]
21005#[doc = "  \"title\": \"RpcLightClientExecutionProofRequest\","]
21006#[doc = "  \"type\": \"object\","]
21007#[doc = "  \"oneOf\": ["]
21008#[doc = "    {"]
21009#[doc = "      \"type\": \"object\","]
21010#[doc = "      \"required\": ["]
21011#[doc = "        \"sender_id\","]
21012#[doc = "        \"transaction_hash\","]
21013#[doc = "        \"type\""]
21014#[doc = "      ],"]
21015#[doc = "      \"properties\": {"]
21016#[doc = "        \"sender_id\": {"]
21017#[doc = "          \"$ref\": \"#/components/schemas/AccountId\""]
21018#[doc = "        },"]
21019#[doc = "        \"transaction_hash\": {"]
21020#[doc = "          \"$ref\": \"#/components/schemas/CryptoHash\""]
21021#[doc = "        },"]
21022#[doc = "        \"type\": {"]
21023#[doc = "          \"type\": \"string\","]
21024#[doc = "          \"enum\": ["]
21025#[doc = "            \"transaction\""]
21026#[doc = "          ]"]
21027#[doc = "        }"]
21028#[doc = "      }"]
21029#[doc = "    },"]
21030#[doc = "    {"]
21031#[doc = "      \"type\": \"object\","]
21032#[doc = "      \"required\": ["]
21033#[doc = "        \"receipt_id\","]
21034#[doc = "        \"receiver_id\","]
21035#[doc = "        \"type\""]
21036#[doc = "      ],"]
21037#[doc = "      \"properties\": {"]
21038#[doc = "        \"receipt_id\": {"]
21039#[doc = "          \"$ref\": \"#/components/schemas/CryptoHash\""]
21040#[doc = "        },"]
21041#[doc = "        \"receiver_id\": {"]
21042#[doc = "          \"$ref\": \"#/components/schemas/AccountId\""]
21043#[doc = "        },"]
21044#[doc = "        \"type\": {"]
21045#[doc = "          \"type\": \"string\","]
21046#[doc = "          \"enum\": ["]
21047#[doc = "            \"receipt\""]
21048#[doc = "          ]"]
21049#[doc = "        }"]
21050#[doc = "      }"]
21051#[doc = "    }"]
21052#[doc = "  ],"]
21053#[doc = "  \"required\": ["]
21054#[doc = "    \"light_client_head\""]
21055#[doc = "  ],"]
21056#[doc = "  \"properties\": {"]
21057#[doc = "    \"light_client_head\": {"]
21058#[doc = "      \"$ref\": \"#/components/schemas/CryptoHash\""]
21059#[doc = "    }"]
21060#[doc = "  }"]
21061#[doc = "}"]
21062#[doc = r" ```"]
21063#[doc = r" </details>"]
21064#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
21065#[serde(untagged)]
21066pub enum RpcLightClientExecutionProofRequest {
21067    Variant0 {
21068        light_client_head: CryptoHash,
21069        sender_id: AccountId,
21070        transaction_hash: CryptoHash,
21071        #[serde(rename = "type")]
21072        type_: RpcLightClientExecutionProofRequestVariant0Type,
21073    },
21074    Variant1 {
21075        light_client_head: CryptoHash,
21076        receipt_id: CryptoHash,
21077        receiver_id: AccountId,
21078        #[serde(rename = "type")]
21079        type_: RpcLightClientExecutionProofRequestVariant1Type,
21080    },
21081}
21082impl ::std::convert::From<&Self> for RpcLightClientExecutionProofRequest {
21083    fn from(value: &RpcLightClientExecutionProofRequest) -> Self {
21084        value.clone()
21085    }
21086}
21087#[doc = "`RpcLightClientExecutionProofRequestVariant0Type`"]
21088#[doc = r""]
21089#[doc = r" <details><summary>JSON schema</summary>"]
21090#[doc = r""]
21091#[doc = r" ```json"]
21092#[doc = "{"]
21093#[doc = "  \"type\": \"string\","]
21094#[doc = "  \"enum\": ["]
21095#[doc = "    \"transaction\""]
21096#[doc = "  ]"]
21097#[doc = "}"]
21098#[doc = r" ```"]
21099#[doc = r" </details>"]
21100#[derive(
21101    :: serde :: Deserialize,
21102    :: serde :: Serialize,
21103    Clone,
21104    Copy,
21105    Debug,
21106    Eq,
21107    Hash,
21108    Ord,
21109    PartialEq,
21110    PartialOrd,
21111)]
21112pub enum RpcLightClientExecutionProofRequestVariant0Type {
21113    #[serde(rename = "transaction")]
21114    Transaction,
21115}
21116impl ::std::convert::From<&Self> for RpcLightClientExecutionProofRequestVariant0Type {
21117    fn from(value: &RpcLightClientExecutionProofRequestVariant0Type) -> Self {
21118        value.clone()
21119    }
21120}
21121impl ::std::fmt::Display for RpcLightClientExecutionProofRequestVariant0Type {
21122    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
21123        match *self {
21124            Self::Transaction => f.write_str("transaction"),
21125        }
21126    }
21127}
21128impl ::std::str::FromStr for RpcLightClientExecutionProofRequestVariant0Type {
21129    type Err = self::error::ConversionError;
21130    fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
21131        match value {
21132            "transaction" => Ok(Self::Transaction),
21133            _ => Err("invalid value".into()),
21134        }
21135    }
21136}
21137impl ::std::convert::TryFrom<&str> for RpcLightClientExecutionProofRequestVariant0Type {
21138    type Error = self::error::ConversionError;
21139    fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
21140        value.parse()
21141    }
21142}
21143impl ::std::convert::TryFrom<&::std::string::String>
21144    for RpcLightClientExecutionProofRequestVariant0Type
21145{
21146    type Error = self::error::ConversionError;
21147    fn try_from(
21148        value: &::std::string::String,
21149    ) -> ::std::result::Result<Self, self::error::ConversionError> {
21150        value.parse()
21151    }
21152}
21153impl ::std::convert::TryFrom<::std::string::String>
21154    for RpcLightClientExecutionProofRequestVariant0Type
21155{
21156    type Error = self::error::ConversionError;
21157    fn try_from(
21158        value: ::std::string::String,
21159    ) -> ::std::result::Result<Self, self::error::ConversionError> {
21160        value.parse()
21161    }
21162}
21163#[doc = "`RpcLightClientExecutionProofRequestVariant1Type`"]
21164#[doc = r""]
21165#[doc = r" <details><summary>JSON schema</summary>"]
21166#[doc = r""]
21167#[doc = r" ```json"]
21168#[doc = "{"]
21169#[doc = "  \"type\": \"string\","]
21170#[doc = "  \"enum\": ["]
21171#[doc = "    \"receipt\""]
21172#[doc = "  ]"]
21173#[doc = "}"]
21174#[doc = r" ```"]
21175#[doc = r" </details>"]
21176#[derive(
21177    :: serde :: Deserialize,
21178    :: serde :: Serialize,
21179    Clone,
21180    Copy,
21181    Debug,
21182    Eq,
21183    Hash,
21184    Ord,
21185    PartialEq,
21186    PartialOrd,
21187)]
21188pub enum RpcLightClientExecutionProofRequestVariant1Type {
21189    #[serde(rename = "receipt")]
21190    Receipt,
21191}
21192impl ::std::convert::From<&Self> for RpcLightClientExecutionProofRequestVariant1Type {
21193    fn from(value: &RpcLightClientExecutionProofRequestVariant1Type) -> Self {
21194        value.clone()
21195    }
21196}
21197impl ::std::fmt::Display for RpcLightClientExecutionProofRequestVariant1Type {
21198    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
21199        match *self {
21200            Self::Receipt => f.write_str("receipt"),
21201        }
21202    }
21203}
21204impl ::std::str::FromStr for RpcLightClientExecutionProofRequestVariant1Type {
21205    type Err = self::error::ConversionError;
21206    fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
21207        match value {
21208            "receipt" => Ok(Self::Receipt),
21209            _ => Err("invalid value".into()),
21210        }
21211    }
21212}
21213impl ::std::convert::TryFrom<&str> for RpcLightClientExecutionProofRequestVariant1Type {
21214    type Error = self::error::ConversionError;
21215    fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
21216        value.parse()
21217    }
21218}
21219impl ::std::convert::TryFrom<&::std::string::String>
21220    for RpcLightClientExecutionProofRequestVariant1Type
21221{
21222    type Error = self::error::ConversionError;
21223    fn try_from(
21224        value: &::std::string::String,
21225    ) -> ::std::result::Result<Self, self::error::ConversionError> {
21226        value.parse()
21227    }
21228}
21229impl ::std::convert::TryFrom<::std::string::String>
21230    for RpcLightClientExecutionProofRequestVariant1Type
21231{
21232    type Error = self::error::ConversionError;
21233    fn try_from(
21234        value: ::std::string::String,
21235    ) -> ::std::result::Result<Self, self::error::ConversionError> {
21236        value.parse()
21237    }
21238}
21239#[doc = "`RpcLightClientExecutionProofResponse`"]
21240#[doc = r""]
21241#[doc = r" <details><summary>JSON schema</summary>"]
21242#[doc = r""]
21243#[doc = r" ```json"]
21244#[doc = "{"]
21245#[doc = "  \"type\": \"object\","]
21246#[doc = "  \"required\": ["]
21247#[doc = "    \"block_header_lite\","]
21248#[doc = "    \"block_proof\","]
21249#[doc = "    \"outcome_proof\","]
21250#[doc = "    \"outcome_root_proof\""]
21251#[doc = "  ],"]
21252#[doc = "  \"properties\": {"]
21253#[doc = "    \"block_header_lite\": {"]
21254#[doc = "      \"$ref\": \"#/components/schemas/LightClientBlockLiteView\""]
21255#[doc = "    },"]
21256#[doc = "    \"block_proof\": {"]
21257#[doc = "      \"type\": \"array\","]
21258#[doc = "      \"items\": {"]
21259#[doc = "        \"$ref\": \"#/components/schemas/MerklePathItem\""]
21260#[doc = "      }"]
21261#[doc = "    },"]
21262#[doc = "    \"outcome_proof\": {"]
21263#[doc = "      \"$ref\": \"#/components/schemas/ExecutionOutcomeWithIdView\""]
21264#[doc = "    },"]
21265#[doc = "    \"outcome_root_proof\": {"]
21266#[doc = "      \"type\": \"array\","]
21267#[doc = "      \"items\": {"]
21268#[doc = "        \"$ref\": \"#/components/schemas/MerklePathItem\""]
21269#[doc = "      }"]
21270#[doc = "    }"]
21271#[doc = "  }"]
21272#[doc = "}"]
21273#[doc = r" ```"]
21274#[doc = r" </details>"]
21275#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
21276pub struct RpcLightClientExecutionProofResponse {
21277    pub block_header_lite: LightClientBlockLiteView,
21278    pub block_proof: ::std::vec::Vec<MerklePathItem>,
21279    pub outcome_proof: ExecutionOutcomeWithIdView,
21280    pub outcome_root_proof: ::std::vec::Vec<MerklePathItem>,
21281}
21282impl ::std::convert::From<&RpcLightClientExecutionProofResponse>
21283    for RpcLightClientExecutionProofResponse
21284{
21285    fn from(value: &RpcLightClientExecutionProofResponse) -> Self {
21286        value.clone()
21287    }
21288}
21289#[doc = "`RpcLightClientNextBlockError`"]
21290#[doc = r""]
21291#[doc = r" <details><summary>JSON schema</summary>"]
21292#[doc = r""]
21293#[doc = r" ```json"]
21294#[doc = "{"]
21295#[doc = "  \"oneOf\": ["]
21296#[doc = "    {"]
21297#[doc = "      \"type\": \"object\","]
21298#[doc = "      \"required\": ["]
21299#[doc = "        \"info\","]
21300#[doc = "        \"name\""]
21301#[doc = "      ],"]
21302#[doc = "      \"properties\": {"]
21303#[doc = "        \"info\": {"]
21304#[doc = "          \"type\": \"object\","]
21305#[doc = "          \"required\": ["]
21306#[doc = "            \"error_message\""]
21307#[doc = "          ],"]
21308#[doc = "          \"properties\": {"]
21309#[doc = "            \"error_message\": {"]
21310#[doc = "              \"type\": \"string\""]
21311#[doc = "            }"]
21312#[doc = "          }"]
21313#[doc = "        },"]
21314#[doc = "        \"name\": {"]
21315#[doc = "          \"type\": \"string\","]
21316#[doc = "          \"enum\": ["]
21317#[doc = "            \"INTERNAL_ERROR\""]
21318#[doc = "          ]"]
21319#[doc = "        }"]
21320#[doc = "      }"]
21321#[doc = "    },"]
21322#[doc = "    {"]
21323#[doc = "      \"type\": \"object\","]
21324#[doc = "      \"required\": ["]
21325#[doc = "        \"info\","]
21326#[doc = "        \"name\""]
21327#[doc = "      ],"]
21328#[doc = "      \"properties\": {"]
21329#[doc = "        \"info\": {"]
21330#[doc = "          \"type\": \"object\""]
21331#[doc = "        },"]
21332#[doc = "        \"name\": {"]
21333#[doc = "          \"type\": \"string\","]
21334#[doc = "          \"enum\": ["]
21335#[doc = "            \"UNKNOWN_BLOCK\""]
21336#[doc = "          ]"]
21337#[doc = "        }"]
21338#[doc = "      }"]
21339#[doc = "    },"]
21340#[doc = "    {"]
21341#[doc = "      \"type\": \"object\","]
21342#[doc = "      \"required\": ["]
21343#[doc = "        \"info\","]
21344#[doc = "        \"name\""]
21345#[doc = "      ],"]
21346#[doc = "      \"properties\": {"]
21347#[doc = "        \"info\": {"]
21348#[doc = "          \"type\": \"object\","]
21349#[doc = "          \"required\": ["]
21350#[doc = "            \"epoch_id\""]
21351#[doc = "          ],"]
21352#[doc = "          \"properties\": {"]
21353#[doc = "            \"epoch_id\": {"]
21354#[doc = "              \"$ref\": \"#/components/schemas/EpochId\""]
21355#[doc = "            }"]
21356#[doc = "          }"]
21357#[doc = "        },"]
21358#[doc = "        \"name\": {"]
21359#[doc = "          \"type\": \"string\","]
21360#[doc = "          \"enum\": ["]
21361#[doc = "            \"EPOCH_OUT_OF_BOUNDS\""]
21362#[doc = "          ]"]
21363#[doc = "        }"]
21364#[doc = "      }"]
21365#[doc = "    }"]
21366#[doc = "  ]"]
21367#[doc = "}"]
21368#[doc = r" ```"]
21369#[doc = r" </details>"]
21370#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
21371#[serde(tag = "name", content = "info")]
21372pub enum RpcLightClientNextBlockError {
21373    #[serde(rename = "INTERNAL_ERROR")]
21374    InternalError {
21375        error_message: ::std::string::String,
21376    },
21377    #[serde(rename = "UNKNOWN_BLOCK")]
21378    UnknownBlock(::serde_json::Map<::std::string::String, ::serde_json::Value>),
21379    #[serde(rename = "EPOCH_OUT_OF_BOUNDS")]
21380    EpochOutOfBounds { epoch_id: EpochId },
21381}
21382impl ::std::convert::From<&Self> for RpcLightClientNextBlockError {
21383    fn from(value: &RpcLightClientNextBlockError) -> Self {
21384        value.clone()
21385    }
21386}
21387impl ::std::convert::From<::serde_json::Map<::std::string::String, ::serde_json::Value>>
21388    for RpcLightClientNextBlockError
21389{
21390    fn from(value: ::serde_json::Map<::std::string::String, ::serde_json::Value>) -> Self {
21391        Self::UnknownBlock(value)
21392    }
21393}
21394#[doc = "`RpcLightClientNextBlockRequest`"]
21395#[doc = r""]
21396#[doc = r" <details><summary>JSON schema</summary>"]
21397#[doc = r""]
21398#[doc = r" ```json"]
21399#[doc = "{"]
21400#[doc = "  \"title\": \"RpcLightClientNextBlockRequest\","]
21401#[doc = "  \"type\": \"object\","]
21402#[doc = "  \"required\": ["]
21403#[doc = "    \"last_block_hash\""]
21404#[doc = "  ],"]
21405#[doc = "  \"properties\": {"]
21406#[doc = "    \"last_block_hash\": {"]
21407#[doc = "      \"$ref\": \"#/components/schemas/CryptoHash\""]
21408#[doc = "    }"]
21409#[doc = "  }"]
21410#[doc = "}"]
21411#[doc = r" ```"]
21412#[doc = r" </details>"]
21413#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
21414pub struct RpcLightClientNextBlockRequest {
21415    pub last_block_hash: CryptoHash,
21416}
21417impl ::std::convert::From<&RpcLightClientNextBlockRequest> for RpcLightClientNextBlockRequest {
21418    fn from(value: &RpcLightClientNextBlockRequest) -> Self {
21419        value.clone()
21420    }
21421}
21422#[doc = "A state for the current head of a light client. More info [here](https://nomicon.io/ChainSpec/LightClient)."]
21423#[doc = r""]
21424#[doc = r" <details><summary>JSON schema</summary>"]
21425#[doc = r""]
21426#[doc = r" ```json"]
21427#[doc = "{"]
21428#[doc = "  \"description\": \"A state for the current head of a light client. More info [here](https://nomicon.io/ChainSpec/LightClient).\","]
21429#[doc = "  \"type\": \"object\","]
21430#[doc = "  \"properties\": {"]
21431#[doc = "    \"approvals_after_next\": {"]
21432#[doc = "      \"type\": \"array\","]
21433#[doc = "      \"items\": {"]
21434#[doc = "        \"anyOf\": ["]
21435#[doc = "          {"]
21436#[doc = "            \"$ref\": \"#/components/schemas/Signature\""]
21437#[doc = "          },"]
21438#[doc = "          {"]
21439#[doc = "            \"type\": \"null\""]
21440#[doc = "          }"]
21441#[doc = "        ]"]
21442#[doc = "      }"]
21443#[doc = "    },"]
21444#[doc = "    \"inner_lite\": {"]
21445#[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\","]
21446#[doc = "      \"allOf\": ["]
21447#[doc = "        {"]
21448#[doc = "          \"$ref\": \"#/components/schemas/BlockHeaderInnerLiteView\""]
21449#[doc = "        }"]
21450#[doc = "      ]"]
21451#[doc = "    },"]
21452#[doc = "    \"inner_rest_hash\": {"]
21453#[doc = "      \"$ref\": \"#/components/schemas/CryptoHash\""]
21454#[doc = "    },"]
21455#[doc = "    \"next_block_inner_hash\": {"]
21456#[doc = "      \"$ref\": \"#/components/schemas/CryptoHash\""]
21457#[doc = "    },"]
21458#[doc = "    \"next_bps\": {"]
21459#[doc = "      \"type\": ["]
21460#[doc = "        \"array\","]
21461#[doc = "        \"null\""]
21462#[doc = "      ],"]
21463#[doc = "      \"items\": {"]
21464#[doc = "        \"$ref\": \"#/components/schemas/ValidatorStakeView\""]
21465#[doc = "      }"]
21466#[doc = "    },"]
21467#[doc = "    \"prev_block_hash\": {"]
21468#[doc = "      \"$ref\": \"#/components/schemas/CryptoHash\""]
21469#[doc = "    }"]
21470#[doc = "  }"]
21471#[doc = "}"]
21472#[doc = r" ```"]
21473#[doc = r" </details>"]
21474#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
21475pub struct RpcLightClientNextBlockResponse {
21476    #[serde(default, skip_serializing_if = "::std::vec::Vec::is_empty")]
21477    pub approvals_after_next: ::std::vec::Vec<::std::option::Option<Signature>>,
21478    #[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"]
21479    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
21480    pub inner_lite: ::std::option::Option<BlockHeaderInnerLiteView>,
21481    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
21482    pub inner_rest_hash: ::std::option::Option<CryptoHash>,
21483    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
21484    pub next_block_inner_hash: ::std::option::Option<CryptoHash>,
21485    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
21486    pub next_bps: ::std::option::Option<::std::vec::Vec<ValidatorStakeView>>,
21487    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
21488    pub prev_block_hash: ::std::option::Option<CryptoHash>,
21489}
21490impl ::std::convert::From<&RpcLightClientNextBlockResponse> for RpcLightClientNextBlockResponse {
21491    fn from(value: &RpcLightClientNextBlockResponse) -> Self {
21492        value.clone()
21493    }
21494}
21495impl ::std::default::Default for RpcLightClientNextBlockResponse {
21496    fn default() -> Self {
21497        Self {
21498            approvals_after_next: Default::default(),
21499            inner_lite: Default::default(),
21500            inner_rest_hash: Default::default(),
21501            next_block_inner_hash: Default::default(),
21502            next_bps: Default::default(),
21503            prev_block_hash: Default::default(),
21504        }
21505    }
21506}
21507#[doc = "`RpcLightClientProofError`"]
21508#[doc = r""]
21509#[doc = r" <details><summary>JSON schema</summary>"]
21510#[doc = r""]
21511#[doc = r" ```json"]
21512#[doc = "{"]
21513#[doc = "  \"oneOf\": ["]
21514#[doc = "    {"]
21515#[doc = "      \"type\": \"object\","]
21516#[doc = "      \"required\": ["]
21517#[doc = "        \"info\","]
21518#[doc = "        \"name\""]
21519#[doc = "      ],"]
21520#[doc = "      \"properties\": {"]
21521#[doc = "        \"info\": {"]
21522#[doc = "          \"type\": \"object\""]
21523#[doc = "        },"]
21524#[doc = "        \"name\": {"]
21525#[doc = "          \"type\": \"string\","]
21526#[doc = "          \"enum\": ["]
21527#[doc = "            \"UNKNOWN_BLOCK\""]
21528#[doc = "          ]"]
21529#[doc = "        }"]
21530#[doc = "      }"]
21531#[doc = "    },"]
21532#[doc = "    {"]
21533#[doc = "      \"type\": \"object\","]
21534#[doc = "      \"required\": ["]
21535#[doc = "        \"info\","]
21536#[doc = "        \"name\""]
21537#[doc = "      ],"]
21538#[doc = "      \"properties\": {"]
21539#[doc = "        \"info\": {"]
21540#[doc = "          \"type\": \"object\","]
21541#[doc = "          \"required\": ["]
21542#[doc = "            \"execution_outcome_shard_id\","]
21543#[doc = "            \"number_or_shards\""]
21544#[doc = "          ],"]
21545#[doc = "          \"properties\": {"]
21546#[doc = "            \"execution_outcome_shard_id\": {"]
21547#[doc = "              \"$ref\": \"#/components/schemas/ShardId\""]
21548#[doc = "            },"]
21549#[doc = "            \"number_or_shards\": {"]
21550#[doc = "              \"type\": \"integer\","]
21551#[doc = "              \"format\": \"uint\","]
21552#[doc = "              \"minimum\": 0.0"]
21553#[doc = "            }"]
21554#[doc = "          }"]
21555#[doc = "        },"]
21556#[doc = "        \"name\": {"]
21557#[doc = "          \"type\": \"string\","]
21558#[doc = "          \"enum\": ["]
21559#[doc = "            \"INCONSISTENT_STATE\""]
21560#[doc = "          ]"]
21561#[doc = "        }"]
21562#[doc = "      }"]
21563#[doc = "    },"]
21564#[doc = "    {"]
21565#[doc = "      \"type\": \"object\","]
21566#[doc = "      \"required\": ["]
21567#[doc = "        \"info\","]
21568#[doc = "        \"name\""]
21569#[doc = "      ],"]
21570#[doc = "      \"properties\": {"]
21571#[doc = "        \"info\": {"]
21572#[doc = "          \"type\": \"object\","]
21573#[doc = "          \"required\": ["]
21574#[doc = "            \"transaction_or_receipt_id\""]
21575#[doc = "          ],"]
21576#[doc = "          \"properties\": {"]
21577#[doc = "            \"transaction_or_receipt_id\": {"]
21578#[doc = "              \"$ref\": \"#/components/schemas/CryptoHash\""]
21579#[doc = "            }"]
21580#[doc = "          }"]
21581#[doc = "        },"]
21582#[doc = "        \"name\": {"]
21583#[doc = "          \"type\": \"string\","]
21584#[doc = "          \"enum\": ["]
21585#[doc = "            \"NOT_CONFIRMED\""]
21586#[doc = "          ]"]
21587#[doc = "        }"]
21588#[doc = "      }"]
21589#[doc = "    },"]
21590#[doc = "    {"]
21591#[doc = "      \"type\": \"object\","]
21592#[doc = "      \"required\": ["]
21593#[doc = "        \"info\","]
21594#[doc = "        \"name\""]
21595#[doc = "      ],"]
21596#[doc = "      \"properties\": {"]
21597#[doc = "        \"info\": {"]
21598#[doc = "          \"type\": \"object\","]
21599#[doc = "          \"required\": ["]
21600#[doc = "            \"transaction_or_receipt_id\""]
21601#[doc = "          ],"]
21602#[doc = "          \"properties\": {"]
21603#[doc = "            \"transaction_or_receipt_id\": {"]
21604#[doc = "              \"$ref\": \"#/components/schemas/CryptoHash\""]
21605#[doc = "            }"]
21606#[doc = "          }"]
21607#[doc = "        },"]
21608#[doc = "        \"name\": {"]
21609#[doc = "          \"type\": \"string\","]
21610#[doc = "          \"enum\": ["]
21611#[doc = "            \"UNKNOWN_TRANSACTION_OR_RECEIPT\""]
21612#[doc = "          ]"]
21613#[doc = "        }"]
21614#[doc = "      }"]
21615#[doc = "    },"]
21616#[doc = "    {"]
21617#[doc = "      \"type\": \"object\","]
21618#[doc = "      \"required\": ["]
21619#[doc = "        \"info\","]
21620#[doc = "        \"name\""]
21621#[doc = "      ],"]
21622#[doc = "      \"properties\": {"]
21623#[doc = "        \"info\": {"]
21624#[doc = "          \"type\": \"object\","]
21625#[doc = "          \"required\": ["]
21626#[doc = "            \"shard_id\","]
21627#[doc = "            \"transaction_or_receipt_id\""]
21628#[doc = "          ],"]
21629#[doc = "          \"properties\": {"]
21630#[doc = "            \"shard_id\": {"]
21631#[doc = "              \"$ref\": \"#/components/schemas/ShardId\""]
21632#[doc = "            },"]
21633#[doc = "            \"transaction_or_receipt_id\": {"]
21634#[doc = "              \"$ref\": \"#/components/schemas/CryptoHash\""]
21635#[doc = "            }"]
21636#[doc = "          }"]
21637#[doc = "        },"]
21638#[doc = "        \"name\": {"]
21639#[doc = "          \"type\": \"string\","]
21640#[doc = "          \"enum\": ["]
21641#[doc = "            \"UNAVAILABLE_SHARD\""]
21642#[doc = "          ]"]
21643#[doc = "        }"]
21644#[doc = "      }"]
21645#[doc = "    },"]
21646#[doc = "    {"]
21647#[doc = "      \"type\": \"object\","]
21648#[doc = "      \"required\": ["]
21649#[doc = "        \"info\","]
21650#[doc = "        \"name\""]
21651#[doc = "      ],"]
21652#[doc = "      \"properties\": {"]
21653#[doc = "        \"info\": {"]
21654#[doc = "          \"type\": \"object\","]
21655#[doc = "          \"required\": ["]
21656#[doc = "            \"error_message\""]
21657#[doc = "          ],"]
21658#[doc = "          \"properties\": {"]
21659#[doc = "            \"error_message\": {"]
21660#[doc = "              \"type\": \"string\""]
21661#[doc = "            }"]
21662#[doc = "          }"]
21663#[doc = "        },"]
21664#[doc = "        \"name\": {"]
21665#[doc = "          \"type\": \"string\","]
21666#[doc = "          \"enum\": ["]
21667#[doc = "            \"INTERNAL_ERROR\""]
21668#[doc = "          ]"]
21669#[doc = "        }"]
21670#[doc = "      }"]
21671#[doc = "    }"]
21672#[doc = "  ]"]
21673#[doc = "}"]
21674#[doc = r" ```"]
21675#[doc = r" </details>"]
21676#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
21677#[serde(tag = "name", content = "info")]
21678pub enum RpcLightClientProofError {
21679    #[serde(rename = "UNKNOWN_BLOCK")]
21680    UnknownBlock(::serde_json::Map<::std::string::String, ::serde_json::Value>),
21681    #[serde(rename = "INCONSISTENT_STATE")]
21682    InconsistentState {
21683        execution_outcome_shard_id: ShardId,
21684        number_or_shards: u32,
21685    },
21686    #[serde(rename = "NOT_CONFIRMED")]
21687    NotConfirmed {
21688        transaction_or_receipt_id: CryptoHash,
21689    },
21690    #[serde(rename = "UNKNOWN_TRANSACTION_OR_RECEIPT")]
21691    UnknownTransactionOrReceipt {
21692        transaction_or_receipt_id: CryptoHash,
21693    },
21694    #[serde(rename = "UNAVAILABLE_SHARD")]
21695    UnavailableShard {
21696        shard_id: ShardId,
21697        transaction_or_receipt_id: CryptoHash,
21698    },
21699    #[serde(rename = "INTERNAL_ERROR")]
21700    InternalError {
21701        error_message: ::std::string::String,
21702    },
21703}
21704impl ::std::convert::From<&Self> for RpcLightClientProofError {
21705    fn from(value: &RpcLightClientProofError) -> Self {
21706        value.clone()
21707    }
21708}
21709impl ::std::convert::From<::serde_json::Map<::std::string::String, ::serde_json::Value>>
21710    for RpcLightClientProofError
21711{
21712    fn from(value: ::serde_json::Map<::std::string::String, ::serde_json::Value>) -> Self {
21713        Self::UnknownBlock(value)
21714    }
21715}
21716#[doc = "`RpcMaintenanceWindowsError`"]
21717#[doc = r""]
21718#[doc = r" <details><summary>JSON schema</summary>"]
21719#[doc = r""]
21720#[doc = r" ```json"]
21721#[doc = "{"]
21722#[doc = "  \"oneOf\": ["]
21723#[doc = "    {"]
21724#[doc = "      \"type\": \"object\","]
21725#[doc = "      \"required\": ["]
21726#[doc = "        \"info\","]
21727#[doc = "        \"name\""]
21728#[doc = "      ],"]
21729#[doc = "      \"properties\": {"]
21730#[doc = "        \"info\": {"]
21731#[doc = "          \"type\": \"object\","]
21732#[doc = "          \"required\": ["]
21733#[doc = "            \"error_message\""]
21734#[doc = "          ],"]
21735#[doc = "          \"properties\": {"]
21736#[doc = "            \"error_message\": {"]
21737#[doc = "              \"type\": \"string\""]
21738#[doc = "            }"]
21739#[doc = "          }"]
21740#[doc = "        },"]
21741#[doc = "        \"name\": {"]
21742#[doc = "          \"type\": \"string\","]
21743#[doc = "          \"enum\": ["]
21744#[doc = "            \"INTERNAL_ERROR\""]
21745#[doc = "          ]"]
21746#[doc = "        }"]
21747#[doc = "      }"]
21748#[doc = "    }"]
21749#[doc = "  ]"]
21750#[doc = "}"]
21751#[doc = r" ```"]
21752#[doc = r" </details>"]
21753#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
21754#[serde(tag = "name", content = "info")]
21755pub enum RpcMaintenanceWindowsError {
21756    #[serde(rename = "INTERNAL_ERROR")]
21757    InternalError {
21758        error_message: ::std::string::String,
21759    },
21760}
21761impl ::std::convert::From<&Self> for RpcMaintenanceWindowsError {
21762    fn from(value: &RpcMaintenanceWindowsError) -> Self {
21763        value.clone()
21764    }
21765}
21766#[doc = "`RpcMaintenanceWindowsRequest`"]
21767#[doc = r""]
21768#[doc = r" <details><summary>JSON schema</summary>"]
21769#[doc = r""]
21770#[doc = r" ```json"]
21771#[doc = "{"]
21772#[doc = "  \"title\": \"RpcMaintenanceWindowsRequest\","]
21773#[doc = "  \"type\": \"object\","]
21774#[doc = "  \"required\": ["]
21775#[doc = "    \"account_id\""]
21776#[doc = "  ],"]
21777#[doc = "  \"properties\": {"]
21778#[doc = "    \"account_id\": {"]
21779#[doc = "      \"$ref\": \"#/components/schemas/AccountId\""]
21780#[doc = "    }"]
21781#[doc = "  }"]
21782#[doc = "}"]
21783#[doc = r" ```"]
21784#[doc = r" </details>"]
21785#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
21786pub struct RpcMaintenanceWindowsRequest {
21787    pub account_id: AccountId,
21788}
21789impl ::std::convert::From<&RpcMaintenanceWindowsRequest> for RpcMaintenanceWindowsRequest {
21790    fn from(value: &RpcMaintenanceWindowsRequest) -> Self {
21791        value.clone()
21792    }
21793}
21794#[doc = "`RpcNetworkInfoError`"]
21795#[doc = r""]
21796#[doc = r" <details><summary>JSON schema</summary>"]
21797#[doc = r""]
21798#[doc = r" ```json"]
21799#[doc = "{"]
21800#[doc = "  \"oneOf\": ["]
21801#[doc = "    {"]
21802#[doc = "      \"type\": \"object\","]
21803#[doc = "      \"required\": ["]
21804#[doc = "        \"info\","]
21805#[doc = "        \"name\""]
21806#[doc = "      ],"]
21807#[doc = "      \"properties\": {"]
21808#[doc = "        \"info\": {"]
21809#[doc = "          \"type\": \"object\","]
21810#[doc = "          \"required\": ["]
21811#[doc = "            \"error_message\""]
21812#[doc = "          ],"]
21813#[doc = "          \"properties\": {"]
21814#[doc = "            \"error_message\": {"]
21815#[doc = "              \"type\": \"string\""]
21816#[doc = "            }"]
21817#[doc = "          }"]
21818#[doc = "        },"]
21819#[doc = "        \"name\": {"]
21820#[doc = "          \"type\": \"string\","]
21821#[doc = "          \"enum\": ["]
21822#[doc = "            \"INTERNAL_ERROR\""]
21823#[doc = "          ]"]
21824#[doc = "        }"]
21825#[doc = "      }"]
21826#[doc = "    }"]
21827#[doc = "  ]"]
21828#[doc = "}"]
21829#[doc = r" ```"]
21830#[doc = r" </details>"]
21831#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
21832#[serde(tag = "name", content = "info")]
21833pub enum RpcNetworkInfoError {
21834    #[serde(rename = "INTERNAL_ERROR")]
21835    InternalError {
21836        error_message: ::std::string::String,
21837    },
21838}
21839impl ::std::convert::From<&Self> for RpcNetworkInfoError {
21840    fn from(value: &RpcNetworkInfoError) -> Self {
21841        value.clone()
21842    }
21843}
21844#[doc = "`RpcNetworkInfoRequest`"]
21845#[doc = r""]
21846#[doc = r" <details><summary>JSON schema</summary>"]
21847#[doc = r""]
21848#[doc = r" ```json"]
21849#[doc = "{"]
21850#[doc = "  \"title\": \"RpcNetworkInfoRequest\","]
21851#[doc = "  \"type\": \"null\""]
21852#[doc = "}"]
21853#[doc = r" ```"]
21854#[doc = r" </details>"]
21855#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
21856#[serde(transparent)]
21857pub struct RpcNetworkInfoRequest(pub ());
21858impl ::std::ops::Deref for RpcNetworkInfoRequest {
21859    type Target = ();
21860    fn deref(&self) -> &() {
21861        &self.0
21862    }
21863}
21864impl ::std::convert::From<RpcNetworkInfoRequest> for () {
21865    fn from(value: RpcNetworkInfoRequest) -> Self {
21866        value.0
21867    }
21868}
21869impl ::std::convert::From<&RpcNetworkInfoRequest> for RpcNetworkInfoRequest {
21870    fn from(value: &RpcNetworkInfoRequest) -> Self {
21871        value.clone()
21872    }
21873}
21874impl ::std::convert::From<()> for RpcNetworkInfoRequest {
21875    fn from(value: ()) -> Self {
21876        Self(value)
21877    }
21878}
21879#[doc = "`RpcNetworkInfoResponse`"]
21880#[doc = r""]
21881#[doc = r" <details><summary>JSON schema</summary>"]
21882#[doc = r""]
21883#[doc = r" ```json"]
21884#[doc = "{"]
21885#[doc = "  \"type\": \"object\","]
21886#[doc = "  \"required\": ["]
21887#[doc = "    \"active_peers\","]
21888#[doc = "    \"known_producers\","]
21889#[doc = "    \"num_active_peers\","]
21890#[doc = "    \"peer_max_count\","]
21891#[doc = "    \"received_bytes_per_sec\","]
21892#[doc = "    \"sent_bytes_per_sec\""]
21893#[doc = "  ],"]
21894#[doc = "  \"properties\": {"]
21895#[doc = "    \"active_peers\": {"]
21896#[doc = "      \"type\": \"array\","]
21897#[doc = "      \"items\": {"]
21898#[doc = "        \"$ref\": \"#/components/schemas/RpcPeerInfo\""]
21899#[doc = "      }"]
21900#[doc = "    },"]
21901#[doc = "    \"known_producers\": {"]
21902#[doc = "      \"description\": \"Accounts of known block and chunk producers from routing table.\","]
21903#[doc = "      \"type\": \"array\","]
21904#[doc = "      \"items\": {"]
21905#[doc = "        \"$ref\": \"#/components/schemas/RpcKnownProducer\""]
21906#[doc = "      }"]
21907#[doc = "    },"]
21908#[doc = "    \"num_active_peers\": {"]
21909#[doc = "      \"type\": \"integer\","]
21910#[doc = "      \"format\": \"uint\","]
21911#[doc = "      \"minimum\": 0.0"]
21912#[doc = "    },"]
21913#[doc = "    \"peer_max_count\": {"]
21914#[doc = "      \"type\": \"integer\","]
21915#[doc = "      \"format\": \"uint32\","]
21916#[doc = "      \"minimum\": 0.0"]
21917#[doc = "    },"]
21918#[doc = "    \"received_bytes_per_sec\": {"]
21919#[doc = "      \"type\": \"integer\","]
21920#[doc = "      \"format\": \"uint64\","]
21921#[doc = "      \"minimum\": 0.0"]
21922#[doc = "    },"]
21923#[doc = "    \"sent_bytes_per_sec\": {"]
21924#[doc = "      \"type\": \"integer\","]
21925#[doc = "      \"format\": \"uint64\","]
21926#[doc = "      \"minimum\": 0.0"]
21927#[doc = "    }"]
21928#[doc = "  }"]
21929#[doc = "}"]
21930#[doc = r" ```"]
21931#[doc = r" </details>"]
21932#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
21933pub struct RpcNetworkInfoResponse {
21934    pub active_peers: ::std::vec::Vec<RpcPeerInfo>,
21935    #[doc = "Accounts of known block and chunk producers from routing table."]
21936    pub known_producers: ::std::vec::Vec<RpcKnownProducer>,
21937    pub num_active_peers: u32,
21938    pub peer_max_count: u32,
21939    pub received_bytes_per_sec: u64,
21940    pub sent_bytes_per_sec: u64,
21941}
21942impl ::std::convert::From<&RpcNetworkInfoResponse> for RpcNetworkInfoResponse {
21943    fn from(value: &RpcNetworkInfoResponse) -> Self {
21944        value.clone()
21945    }
21946}
21947#[doc = "`RpcPeerInfo`"]
21948#[doc = r""]
21949#[doc = r" <details><summary>JSON schema</summary>"]
21950#[doc = r""]
21951#[doc = r" ```json"]
21952#[doc = "{"]
21953#[doc = "  \"type\": \"object\","]
21954#[doc = "  \"required\": ["]
21955#[doc = "    \"id\""]
21956#[doc = "  ],"]
21957#[doc = "  \"properties\": {"]
21958#[doc = "    \"account_id\": {"]
21959#[doc = "      \"anyOf\": ["]
21960#[doc = "        {"]
21961#[doc = "          \"$ref\": \"#/components/schemas/AccountId\""]
21962#[doc = "        },"]
21963#[doc = "        {"]
21964#[doc = "          \"type\": \"null\""]
21965#[doc = "        }"]
21966#[doc = "      ]"]
21967#[doc = "    },"]
21968#[doc = "    \"addr\": {"]
21969#[doc = "      \"type\": ["]
21970#[doc = "        \"string\","]
21971#[doc = "        \"null\""]
21972#[doc = "      ]"]
21973#[doc = "    },"]
21974#[doc = "    \"id\": {"]
21975#[doc = "      \"$ref\": \"#/components/schemas/PeerId\""]
21976#[doc = "    }"]
21977#[doc = "  }"]
21978#[doc = "}"]
21979#[doc = r" ```"]
21980#[doc = r" </details>"]
21981#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
21982pub struct RpcPeerInfo {
21983    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
21984    pub account_id: ::std::option::Option<AccountId>,
21985    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
21986    pub addr: ::std::option::Option<::std::string::String>,
21987    pub id: PeerId,
21988}
21989impl ::std::convert::From<&RpcPeerInfo> for RpcPeerInfo {
21990    fn from(value: &RpcPeerInfo) -> Self {
21991        value.clone()
21992    }
21993}
21994#[doc = "`RpcProtocolConfigError`"]
21995#[doc = r""]
21996#[doc = r" <details><summary>JSON schema</summary>"]
21997#[doc = r""]
21998#[doc = r" ```json"]
21999#[doc = "{"]
22000#[doc = "  \"oneOf\": ["]
22001#[doc = "    {"]
22002#[doc = "      \"type\": \"object\","]
22003#[doc = "      \"required\": ["]
22004#[doc = "        \"info\","]
22005#[doc = "        \"name\""]
22006#[doc = "      ],"]
22007#[doc = "      \"properties\": {"]
22008#[doc = "        \"info\": {"]
22009#[doc = "          \"type\": \"object\""]
22010#[doc = "        },"]
22011#[doc = "        \"name\": {"]
22012#[doc = "          \"type\": \"string\","]
22013#[doc = "          \"enum\": ["]
22014#[doc = "            \"UNKNOWN_BLOCK\""]
22015#[doc = "          ]"]
22016#[doc = "        }"]
22017#[doc = "      }"]
22018#[doc = "    },"]
22019#[doc = "    {"]
22020#[doc = "      \"type\": \"object\","]
22021#[doc = "      \"required\": ["]
22022#[doc = "        \"info\","]
22023#[doc = "        \"name\""]
22024#[doc = "      ],"]
22025#[doc = "      \"properties\": {"]
22026#[doc = "        \"info\": {"]
22027#[doc = "          \"type\": \"object\","]
22028#[doc = "          \"required\": ["]
22029#[doc = "            \"error_message\""]
22030#[doc = "          ],"]
22031#[doc = "          \"properties\": {"]
22032#[doc = "            \"error_message\": {"]
22033#[doc = "              \"type\": \"string\""]
22034#[doc = "            }"]
22035#[doc = "          }"]
22036#[doc = "        },"]
22037#[doc = "        \"name\": {"]
22038#[doc = "          \"type\": \"string\","]
22039#[doc = "          \"enum\": ["]
22040#[doc = "            \"INTERNAL_ERROR\""]
22041#[doc = "          ]"]
22042#[doc = "        }"]
22043#[doc = "      }"]
22044#[doc = "    }"]
22045#[doc = "  ]"]
22046#[doc = "}"]
22047#[doc = r" ```"]
22048#[doc = r" </details>"]
22049#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
22050#[serde(tag = "name", content = "info")]
22051pub enum RpcProtocolConfigError {
22052    #[serde(rename = "UNKNOWN_BLOCK")]
22053    UnknownBlock(::serde_json::Map<::std::string::String, ::serde_json::Value>),
22054    #[serde(rename = "INTERNAL_ERROR")]
22055    InternalError {
22056        error_message: ::std::string::String,
22057    },
22058}
22059impl ::std::convert::From<&Self> for RpcProtocolConfigError {
22060    fn from(value: &RpcProtocolConfigError) -> Self {
22061        value.clone()
22062    }
22063}
22064impl ::std::convert::From<::serde_json::Map<::std::string::String, ::serde_json::Value>>
22065    for RpcProtocolConfigError
22066{
22067    fn from(value: ::serde_json::Map<::std::string::String, ::serde_json::Value>) -> Self {
22068        Self::UnknownBlock(value)
22069    }
22070}
22071#[doc = "`RpcProtocolConfigRequest`"]
22072#[doc = r""]
22073#[doc = r" <details><summary>JSON schema</summary>"]
22074#[doc = r""]
22075#[doc = r" ```json"]
22076#[doc = "{"]
22077#[doc = "  \"title\": \"RpcProtocolConfigRequest\","]
22078#[doc = "  \"type\": \"object\","]
22079#[doc = "  \"oneOf\": ["]
22080#[doc = "    {"]
22081#[doc = "      \"type\": \"object\","]
22082#[doc = "      \"required\": ["]
22083#[doc = "        \"block_id\""]
22084#[doc = "      ],"]
22085#[doc = "      \"properties\": {"]
22086#[doc = "        \"block_id\": {"]
22087#[doc = "          \"$ref\": \"#/components/schemas/BlockId\""]
22088#[doc = "        }"]
22089#[doc = "      }"]
22090#[doc = "    },"]
22091#[doc = "    {"]
22092#[doc = "      \"type\": \"object\","]
22093#[doc = "      \"required\": ["]
22094#[doc = "        \"finality\""]
22095#[doc = "      ],"]
22096#[doc = "      \"properties\": {"]
22097#[doc = "        \"finality\": {"]
22098#[doc = "          \"$ref\": \"#/components/schemas/Finality\""]
22099#[doc = "        }"]
22100#[doc = "      }"]
22101#[doc = "    },"]
22102#[doc = "    {"]
22103#[doc = "      \"type\": \"object\","]
22104#[doc = "      \"required\": ["]
22105#[doc = "        \"sync_checkpoint\""]
22106#[doc = "      ],"]
22107#[doc = "      \"properties\": {"]
22108#[doc = "        \"sync_checkpoint\": {"]
22109#[doc = "          \"$ref\": \"#/components/schemas/SyncCheckpoint\""]
22110#[doc = "        }"]
22111#[doc = "      }"]
22112#[doc = "    }"]
22113#[doc = "  ]"]
22114#[doc = "}"]
22115#[doc = r" ```"]
22116#[doc = r" </details>"]
22117#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
22118pub enum RpcProtocolConfigRequest {
22119    #[serde(rename = "block_id")]
22120    BlockId(BlockId),
22121    #[serde(rename = "finality")]
22122    Finality(Finality),
22123    #[serde(rename = "sync_checkpoint")]
22124    SyncCheckpoint(SyncCheckpoint),
22125}
22126impl ::std::convert::From<&Self> for RpcProtocolConfigRequest {
22127    fn from(value: &RpcProtocolConfigRequest) -> Self {
22128        value.clone()
22129    }
22130}
22131impl ::std::convert::From<BlockId> for RpcProtocolConfigRequest {
22132    fn from(value: BlockId) -> Self {
22133        Self::BlockId(value)
22134    }
22135}
22136impl ::std::convert::From<Finality> for RpcProtocolConfigRequest {
22137    fn from(value: Finality) -> Self {
22138        Self::Finality(value)
22139    }
22140}
22141impl ::std::convert::From<SyncCheckpoint> for RpcProtocolConfigRequest {
22142    fn from(value: SyncCheckpoint) -> Self {
22143        Self::SyncCheckpoint(value)
22144    }
22145}
22146#[doc = "`RpcProtocolConfigResponse`"]
22147#[doc = r""]
22148#[doc = r" <details><summary>JSON schema</summary>"]
22149#[doc = r""]
22150#[doc = r" ```json"]
22151#[doc = "{"]
22152#[doc = "  \"type\": \"object\","]
22153#[doc = "  \"required\": ["]
22154#[doc = "    \"avg_hidden_validator_seats_per_shard\","]
22155#[doc = "    \"block_producer_kickout_threshold\","]
22156#[doc = "    \"chain_id\","]
22157#[doc = "    \"chunk_producer_kickout_threshold\","]
22158#[doc = "    \"chunk_validator_only_kickout_threshold\","]
22159#[doc = "    \"dynamic_resharding\","]
22160#[doc = "    \"epoch_length\","]
22161#[doc = "    \"fishermen_threshold\","]
22162#[doc = "    \"gas_limit\","]
22163#[doc = "    \"gas_price_adjustment_rate\","]
22164#[doc = "    \"genesis_height\","]
22165#[doc = "    \"genesis_time\","]
22166#[doc = "    \"max_gas_price\","]
22167#[doc = "    \"max_inflation_rate\","]
22168#[doc = "    \"max_kickout_stake_perc\","]
22169#[doc = "    \"min_gas_price\","]
22170#[doc = "    \"minimum_stake_divisor\","]
22171#[doc = "    \"minimum_stake_ratio\","]
22172#[doc = "    \"minimum_validators_per_shard\","]
22173#[doc = "    \"num_block_producer_seats\","]
22174#[doc = "    \"num_block_producer_seats_per_shard\","]
22175#[doc = "    \"num_blocks_per_year\","]
22176#[doc = "    \"online_max_threshold\","]
22177#[doc = "    \"online_min_threshold\","]
22178#[doc = "    \"protocol_reward_rate\","]
22179#[doc = "    \"protocol_treasury_account\","]
22180#[doc = "    \"protocol_upgrade_stake_threshold\","]
22181#[doc = "    \"protocol_version\","]
22182#[doc = "    \"runtime_config\","]
22183#[doc = "    \"shard_layout\","]
22184#[doc = "    \"shuffle_shard_assignment_for_chunk_producers\","]
22185#[doc = "    \"target_validator_mandates_per_shard\","]
22186#[doc = "    \"transaction_validity_period\""]
22187#[doc = "  ],"]
22188#[doc = "  \"properties\": {"]
22189#[doc = "    \"avg_hidden_validator_seats_per_shard\": {"]
22190#[doc = "      \"description\": \"Expected number of hidden validators per shard.\","]
22191#[doc = "      \"type\": \"array\","]
22192#[doc = "      \"items\": {"]
22193#[doc = "        \"type\": \"integer\","]
22194#[doc = "        \"format\": \"uint64\","]
22195#[doc = "        \"minimum\": 0.0"]
22196#[doc = "      }"]
22197#[doc = "    },"]
22198#[doc = "    \"block_producer_kickout_threshold\": {"]
22199#[doc = "      \"description\": \"Threshold for kicking out block producers, between 0 and 100.\","]
22200#[doc = "      \"type\": \"integer\","]
22201#[doc = "      \"format\": \"uint8\","]
22202#[doc = "      \"maximum\": 255.0,"]
22203#[doc = "      \"minimum\": 0.0"]
22204#[doc = "    },"]
22205#[doc = "    \"chain_id\": {"]
22206#[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.\","]
22207#[doc = "      \"type\": \"string\""]
22208#[doc = "    },"]
22209#[doc = "    \"chunk_producer_kickout_threshold\": {"]
22210#[doc = "      \"description\": \"Threshold for kicking out chunk producers, between 0 and 100.\","]
22211#[doc = "      \"type\": \"integer\","]
22212#[doc = "      \"format\": \"uint8\","]
22213#[doc = "      \"maximum\": 255.0,"]
22214#[doc = "      \"minimum\": 0.0"]
22215#[doc = "    },"]
22216#[doc = "    \"chunk_validator_only_kickout_threshold\": {"]
22217#[doc = "      \"description\": \"Threshold for kicking out nodes which are only chunk validators, between 0 and 100.\","]
22218#[doc = "      \"type\": \"integer\","]
22219#[doc = "      \"format\": \"uint8\","]
22220#[doc = "      \"maximum\": 255.0,"]
22221#[doc = "      \"minimum\": 0.0"]
22222#[doc = "    },"]
22223#[doc = "    \"dynamic_resharding\": {"]
22224#[doc = "      \"description\": \"Enable dynamic re-sharding.\","]
22225#[doc = "      \"type\": \"boolean\""]
22226#[doc = "    },"]
22227#[doc = "    \"epoch_length\": {"]
22228#[doc = "      \"description\": \"Epoch length counted in block heights.\","]
22229#[doc = "      \"type\": \"integer\","]
22230#[doc = "      \"format\": \"uint64\","]
22231#[doc = "      \"minimum\": 0.0"]
22232#[doc = "    },"]
22233#[doc = "    \"fishermen_threshold\": {"]
22234#[doc = "      \"description\": \"Fishermen stake threshold.\","]
22235#[doc = "      \"allOf\": ["]
22236#[doc = "        {"]
22237#[doc = "          \"$ref\": \"#/components/schemas/NearToken\""]
22238#[doc = "        }"]
22239#[doc = "      ]"]
22240#[doc = "    },"]
22241#[doc = "    \"gas_limit\": {"]
22242#[doc = "      \"description\": \"Initial gas limit.\","]
22243#[doc = "      \"allOf\": ["]
22244#[doc = "        {"]
22245#[doc = "          \"$ref\": \"#/components/schemas/NearGas\""]
22246#[doc = "        }"]
22247#[doc = "      ]"]
22248#[doc = "    },"]
22249#[doc = "    \"gas_price_adjustment_rate\": {"]
22250#[doc = "      \"description\": \"Gas price adjustment rate\","]
22251#[doc = "      \"type\": \"array\","]
22252#[doc = "      \"items\": {"]
22253#[doc = "        \"type\": \"integer\","]
22254#[doc = "        \"format\": \"int32\""]
22255#[doc = "      },"]
22256#[doc = "      \"maxItems\": 2,"]
22257#[doc = "      \"minItems\": 2"]
22258#[doc = "    },"]
22259#[doc = "    \"genesis_height\": {"]
22260#[doc = "      \"description\": \"Height of genesis block.\","]
22261#[doc = "      \"type\": \"integer\","]
22262#[doc = "      \"format\": \"uint64\","]
22263#[doc = "      \"minimum\": 0.0"]
22264#[doc = "    },"]
22265#[doc = "    \"genesis_time\": {"]
22266#[doc = "      \"description\": \"Official time of blockchain start.\","]
22267#[doc = "      \"type\": \"string\","]
22268#[doc = "      \"format\": \"date-time\""]
22269#[doc = "    },"]
22270#[doc = "    \"max_gas_price\": {"]
22271#[doc = "      \"description\": \"Maximum gas price.\","]
22272#[doc = "      \"allOf\": ["]
22273#[doc = "        {"]
22274#[doc = "          \"$ref\": \"#/components/schemas/NearToken\""]
22275#[doc = "        }"]
22276#[doc = "      ]"]
22277#[doc = "    },"]
22278#[doc = "    \"max_inflation_rate\": {"]
22279#[doc = "      \"description\": \"Maximum inflation on the total supply every epoch.\","]
22280#[doc = "      \"type\": \"array\","]
22281#[doc = "      \"items\": {"]
22282#[doc = "        \"type\": \"integer\","]
22283#[doc = "        \"format\": \"int32\""]
22284#[doc = "      },"]
22285#[doc = "      \"maxItems\": 2,"]
22286#[doc = "      \"minItems\": 2"]
22287#[doc = "    },"]
22288#[doc = "    \"max_kickout_stake_perc\": {"]
22289#[doc = "      \"description\": \"Max stake percentage of the validators we will kick out.\","]
22290#[doc = "      \"type\": \"integer\","]
22291#[doc = "      \"format\": \"uint8\","]
22292#[doc = "      \"maximum\": 255.0,"]
22293#[doc = "      \"minimum\": 0.0"]
22294#[doc = "    },"]
22295#[doc = "    \"min_gas_price\": {"]
22296#[doc = "      \"description\": \"Minimum gas price. It is also the initial gas price.\","]
22297#[doc = "      \"allOf\": ["]
22298#[doc = "        {"]
22299#[doc = "          \"$ref\": \"#/components/schemas/NearToken\""]
22300#[doc = "        }"]
22301#[doc = "      ]"]
22302#[doc = "    },"]
22303#[doc = "    \"minimum_stake_divisor\": {"]
22304#[doc = "      \"description\": \"The minimum stake required for staking is last seat price divided by this number.\","]
22305#[doc = "      \"type\": \"integer\","]
22306#[doc = "      \"format\": \"uint64\","]
22307#[doc = "      \"minimum\": 0.0"]
22308#[doc = "    },"]
22309#[doc = "    \"minimum_stake_ratio\": {"]
22310#[doc = "      \"description\": \"The lowest ratio s/s_total any block producer can have.\\nSee <https://github.com/near/NEPs/pull/167> for details\","]
22311#[doc = "      \"type\": \"array\","]
22312#[doc = "      \"items\": {"]
22313#[doc = "        \"type\": \"integer\","]
22314#[doc = "        \"format\": \"int32\""]
22315#[doc = "      },"]
22316#[doc = "      \"maxItems\": 2,"]
22317#[doc = "      \"minItems\": 2"]
22318#[doc = "    },"]
22319#[doc = "    \"minimum_validators_per_shard\": {"]
22320#[doc = "      \"description\": \"The minimum number of validators each shard must have\","]
22321#[doc = "      \"type\": \"integer\","]
22322#[doc = "      \"format\": \"uint64\","]
22323#[doc = "      \"minimum\": 0.0"]
22324#[doc = "    },"]
22325#[doc = "    \"num_block_producer_seats\": {"]
22326#[doc = "      \"description\": \"Number of block producer seats at genesis.\","]
22327#[doc = "      \"type\": \"integer\","]
22328#[doc = "      \"format\": \"uint64\","]
22329#[doc = "      \"minimum\": 0.0"]
22330#[doc = "    },"]
22331#[doc = "    \"num_block_producer_seats_per_shard\": {"]
22332#[doc = "      \"description\": \"Defines number of shards and number of block producer seats per each shard at genesis.\","]
22333#[doc = "      \"type\": \"array\","]
22334#[doc = "      \"items\": {"]
22335#[doc = "        \"type\": \"integer\","]
22336#[doc = "        \"format\": \"uint64\","]
22337#[doc = "        \"minimum\": 0.0"]
22338#[doc = "      }"]
22339#[doc = "    },"]
22340#[doc = "    \"num_blocks_per_year\": {"]
22341#[doc = "      \"description\": \"Expected number of blocks per year\","]
22342#[doc = "      \"type\": \"integer\","]
22343#[doc = "      \"format\": \"uint64\","]
22344#[doc = "      \"minimum\": 0.0"]
22345#[doc = "    },"]
22346#[doc = "    \"online_max_threshold\": {"]
22347#[doc = "      \"description\": \"Online maximum threshold above which validator gets full reward.\","]
22348#[doc = "      \"type\": \"array\","]
22349#[doc = "      \"items\": {"]
22350#[doc = "        \"type\": \"integer\","]
22351#[doc = "        \"format\": \"int32\""]
22352#[doc = "      },"]
22353#[doc = "      \"maxItems\": 2,"]
22354#[doc = "      \"minItems\": 2"]
22355#[doc = "    },"]
22356#[doc = "    \"online_min_threshold\": {"]
22357#[doc = "      \"description\": \"Online minimum threshold below which validator doesn't receive reward.\","]
22358#[doc = "      \"type\": \"array\","]
22359#[doc = "      \"items\": {"]
22360#[doc = "        \"type\": \"integer\","]
22361#[doc = "        \"format\": \"int32\""]
22362#[doc = "      },"]
22363#[doc = "      \"maxItems\": 2,"]
22364#[doc = "      \"minItems\": 2"]
22365#[doc = "    },"]
22366#[doc = "    \"protocol_reward_rate\": {"]
22367#[doc = "      \"description\": \"Protocol treasury rate\","]
22368#[doc = "      \"type\": \"array\","]
22369#[doc = "      \"items\": {"]
22370#[doc = "        \"type\": \"integer\","]
22371#[doc = "        \"format\": \"int32\""]
22372#[doc = "      },"]
22373#[doc = "      \"maxItems\": 2,"]
22374#[doc = "      \"minItems\": 2"]
22375#[doc = "    },"]
22376#[doc = "    \"protocol_treasury_account\": {"]
22377#[doc = "      \"description\": \"Protocol treasury account\","]
22378#[doc = "      \"allOf\": ["]
22379#[doc = "        {"]
22380#[doc = "          \"$ref\": \"#/components/schemas/AccountId\""]
22381#[doc = "        }"]
22382#[doc = "      ]"]
22383#[doc = "    },"]
22384#[doc = "    \"protocol_upgrade_stake_threshold\": {"]
22385#[doc = "      \"description\": \"Threshold of stake that needs to indicate that they ready for upgrade.\","]
22386#[doc = "      \"type\": \"array\","]
22387#[doc = "      \"items\": {"]
22388#[doc = "        \"type\": \"integer\","]
22389#[doc = "        \"format\": \"int32\""]
22390#[doc = "      },"]
22391#[doc = "      \"maxItems\": 2,"]
22392#[doc = "      \"minItems\": 2"]
22393#[doc = "    },"]
22394#[doc = "    \"protocol_version\": {"]
22395#[doc = "      \"description\": \"Current Protocol Version\","]
22396#[doc = "      \"type\": \"integer\","]
22397#[doc = "      \"format\": \"uint32\","]
22398#[doc = "      \"minimum\": 0.0"]
22399#[doc = "    },"]
22400#[doc = "    \"runtime_config\": {"]
22401#[doc = "      \"description\": \"Runtime configuration (mostly economics constants).\","]
22402#[doc = "      \"allOf\": ["]
22403#[doc = "        {"]
22404#[doc = "          \"$ref\": \"#/components/schemas/RuntimeConfigView\""]
22405#[doc = "        }"]
22406#[doc = "      ]"]
22407#[doc = "    },"]
22408#[doc = "    \"shard_layout\": {"]
22409#[doc = "      \"description\": \"Layout information regarding how to split accounts to shards\","]
22410#[doc = "      \"allOf\": ["]
22411#[doc = "        {"]
22412#[doc = "          \"$ref\": \"#/components/schemas/ShardLayout\""]
22413#[doc = "        }"]
22414#[doc = "      ]"]
22415#[doc = "    },"]
22416#[doc = "    \"shuffle_shard_assignment_for_chunk_producers\": {"]
22417#[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]`.\","]
22418#[doc = "      \"type\": \"boolean\""]
22419#[doc = "    },"]
22420#[doc = "    \"target_validator_mandates_per_shard\": {"]
22421#[doc = "      \"description\": \"Number of target chunk validator mandates for each shard.\","]
22422#[doc = "      \"type\": \"integer\","]
22423#[doc = "      \"format\": \"uint64\","]
22424#[doc = "      \"minimum\": 0.0"]
22425#[doc = "    },"]
22426#[doc = "    \"transaction_validity_period\": {"]
22427#[doc = "      \"description\": \"Number of blocks for which a given transaction is valid\","]
22428#[doc = "      \"type\": \"integer\","]
22429#[doc = "      \"format\": \"uint64\","]
22430#[doc = "      \"minimum\": 0.0"]
22431#[doc = "    }"]
22432#[doc = "  }"]
22433#[doc = "}"]
22434#[doc = r" ```"]
22435#[doc = r" </details>"]
22436#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
22437pub struct RpcProtocolConfigResponse {
22438    #[doc = "Expected number of hidden validators per shard."]
22439    pub avg_hidden_validator_seats_per_shard: ::std::vec::Vec<u64>,
22440    #[doc = "Threshold for kicking out block producers, between 0 and 100."]
22441    pub block_producer_kickout_threshold: u8,
22442    #[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."]
22443    pub chain_id: ::std::string::String,
22444    #[doc = "Threshold for kicking out chunk producers, between 0 and 100."]
22445    pub chunk_producer_kickout_threshold: u8,
22446    #[doc = "Threshold for kicking out nodes which are only chunk validators, between 0 and 100."]
22447    pub chunk_validator_only_kickout_threshold: u8,
22448    #[doc = "Enable dynamic re-sharding."]
22449    pub dynamic_resharding: bool,
22450    #[doc = "Epoch length counted in block heights."]
22451    pub epoch_length: u64,
22452    #[doc = "Fishermen stake threshold."]
22453    pub fishermen_threshold: NearToken,
22454    #[doc = "Initial gas limit."]
22455    pub gas_limit: NearGas,
22456    #[doc = "Gas price adjustment rate"]
22457    pub gas_price_adjustment_rate: [i32; 2usize],
22458    #[doc = "Height of genesis block."]
22459    pub genesis_height: u64,
22460    #[doc = "Official time of blockchain start."]
22461    pub genesis_time: ::chrono::DateTime<::chrono::offset::Utc>,
22462    #[doc = "Maximum gas price."]
22463    pub max_gas_price: NearToken,
22464    #[doc = "Maximum inflation on the total supply every epoch."]
22465    pub max_inflation_rate: [i32; 2usize],
22466    #[doc = "Max stake percentage of the validators we will kick out."]
22467    pub max_kickout_stake_perc: u8,
22468    #[doc = "Minimum gas price. It is also the initial gas price."]
22469    pub min_gas_price: NearToken,
22470    #[doc = "The minimum stake required for staking is last seat price divided by this number."]
22471    pub minimum_stake_divisor: u64,
22472    #[doc = "The lowest ratio s/s_total any block producer can have.\nSee <https://github.com/near/NEPs/pull/167> for details"]
22473    pub minimum_stake_ratio: [i32; 2usize],
22474    #[doc = "The minimum number of validators each shard must have"]
22475    pub minimum_validators_per_shard: u64,
22476    #[doc = "Number of block producer seats at genesis."]
22477    pub num_block_producer_seats: u64,
22478    #[doc = "Defines number of shards and number of block producer seats per each shard at genesis."]
22479    pub num_block_producer_seats_per_shard: ::std::vec::Vec<u64>,
22480    #[doc = "Expected number of blocks per year"]
22481    pub num_blocks_per_year: u64,
22482    #[doc = "Online maximum threshold above which validator gets full reward."]
22483    pub online_max_threshold: [i32; 2usize],
22484    #[doc = "Online minimum threshold below which validator doesn't receive reward."]
22485    pub online_min_threshold: [i32; 2usize],
22486    #[doc = "Protocol treasury rate"]
22487    pub protocol_reward_rate: [i32; 2usize],
22488    #[doc = "Protocol treasury account"]
22489    pub protocol_treasury_account: AccountId,
22490    #[doc = "Threshold of stake that needs to indicate that they ready for upgrade."]
22491    pub protocol_upgrade_stake_threshold: [i32; 2usize],
22492    #[doc = "Current Protocol Version"]
22493    pub protocol_version: u32,
22494    #[doc = "Runtime configuration (mostly economics constants)."]
22495    pub runtime_config: RuntimeConfigView,
22496    #[doc = "Layout information regarding how to split accounts to shards"]
22497    pub shard_layout: ShardLayout,
22498    #[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]`."]
22499    pub shuffle_shard_assignment_for_chunk_producers: bool,
22500    #[doc = "Number of target chunk validator mandates for each shard."]
22501    pub target_validator_mandates_per_shard: u64,
22502    #[doc = "Number of blocks for which a given transaction is valid"]
22503    pub transaction_validity_period: u64,
22504}
22505impl ::std::convert::From<&RpcProtocolConfigResponse> for RpcProtocolConfigResponse {
22506    fn from(value: &RpcProtocolConfigResponse) -> Self {
22507        value.clone()
22508    }
22509}
22510#[doc = "`RpcQueryError`"]
22511#[doc = r""]
22512#[doc = r" <details><summary>JSON schema</summary>"]
22513#[doc = r""]
22514#[doc = r" ```json"]
22515#[doc = "{"]
22516#[doc = "  \"oneOf\": ["]
22517#[doc = "    {"]
22518#[doc = "      \"type\": \"object\","]
22519#[doc = "      \"required\": ["]
22520#[doc = "        \"name\""]
22521#[doc = "      ],"]
22522#[doc = "      \"properties\": {"]
22523#[doc = "        \"name\": {"]
22524#[doc = "          \"type\": \"string\","]
22525#[doc = "          \"enum\": ["]
22526#[doc = "            \"NO_SYNCED_BLOCKS\""]
22527#[doc = "          ]"]
22528#[doc = "        }"]
22529#[doc = "      }"]
22530#[doc = "    },"]
22531#[doc = "    {"]
22532#[doc = "      \"type\": \"object\","]
22533#[doc = "      \"required\": ["]
22534#[doc = "        \"info\","]
22535#[doc = "        \"name\""]
22536#[doc = "      ],"]
22537#[doc = "      \"properties\": {"]
22538#[doc = "        \"info\": {"]
22539#[doc = "          \"type\": \"object\","]
22540#[doc = "          \"required\": ["]
22541#[doc = "            \"requested_shard_id\""]
22542#[doc = "          ],"]
22543#[doc = "          \"properties\": {"]
22544#[doc = "            \"requested_shard_id\": {"]
22545#[doc = "              \"$ref\": \"#/components/schemas/ShardId\""]
22546#[doc = "            }"]
22547#[doc = "          }"]
22548#[doc = "        },"]
22549#[doc = "        \"name\": {"]
22550#[doc = "          \"type\": \"string\","]
22551#[doc = "          \"enum\": ["]
22552#[doc = "            \"UNAVAILABLE_SHARD\""]
22553#[doc = "          ]"]
22554#[doc = "        }"]
22555#[doc = "      }"]
22556#[doc = "    },"]
22557#[doc = "    {"]
22558#[doc = "      \"type\": \"object\","]
22559#[doc = "      \"required\": ["]
22560#[doc = "        \"info\","]
22561#[doc = "        \"name\""]
22562#[doc = "      ],"]
22563#[doc = "      \"properties\": {"]
22564#[doc = "        \"info\": {"]
22565#[doc = "          \"type\": \"object\","]
22566#[doc = "          \"required\": ["]
22567#[doc = "            \"block_hash\","]
22568#[doc = "            \"block_height\""]
22569#[doc = "          ],"]
22570#[doc = "          \"properties\": {"]
22571#[doc = "            \"block_hash\": {"]
22572#[doc = "              \"$ref\": \"#/components/schemas/CryptoHash\""]
22573#[doc = "            },"]
22574#[doc = "            \"block_height\": {"]
22575#[doc = "              \"type\": \"integer\","]
22576#[doc = "              \"format\": \"uint64\","]
22577#[doc = "              \"minimum\": 0.0"]
22578#[doc = "            }"]
22579#[doc = "          }"]
22580#[doc = "        },"]
22581#[doc = "        \"name\": {"]
22582#[doc = "          \"type\": \"string\","]
22583#[doc = "          \"enum\": ["]
22584#[doc = "            \"GARBAGE_COLLECTED_BLOCK\""]
22585#[doc = "          ]"]
22586#[doc = "        }"]
22587#[doc = "      }"]
22588#[doc = "    },"]
22589#[doc = "    {"]
22590#[doc = "      \"type\": \"object\","]
22591#[doc = "      \"required\": ["]
22592#[doc = "        \"info\","]
22593#[doc = "        \"name\""]
22594#[doc = "      ],"]
22595#[doc = "      \"properties\": {"]
22596#[doc = "        \"info\": {"]
22597#[doc = "          \"type\": \"object\","]
22598#[doc = "          \"required\": ["]
22599#[doc = "            \"block_reference\""]
22600#[doc = "          ],"]
22601#[doc = "          \"properties\": {"]
22602#[doc = "            \"block_reference\": {"]
22603#[doc = "              \"$ref\": \"#/components/schemas/BlockReference\""]
22604#[doc = "            }"]
22605#[doc = "          }"]
22606#[doc = "        },"]
22607#[doc = "        \"name\": {"]
22608#[doc = "          \"type\": \"string\","]
22609#[doc = "          \"enum\": ["]
22610#[doc = "            \"UNKNOWN_BLOCK\""]
22611#[doc = "          ]"]
22612#[doc = "        }"]
22613#[doc = "      }"]
22614#[doc = "    },"]
22615#[doc = "    {"]
22616#[doc = "      \"type\": \"object\","]
22617#[doc = "      \"required\": ["]
22618#[doc = "        \"info\","]
22619#[doc = "        \"name\""]
22620#[doc = "      ],"]
22621#[doc = "      \"properties\": {"]
22622#[doc = "        \"info\": {"]
22623#[doc = "          \"type\": \"object\","]
22624#[doc = "          \"required\": ["]
22625#[doc = "            \"block_hash\","]
22626#[doc = "            \"block_height\","]
22627#[doc = "            \"requested_account_id\""]
22628#[doc = "          ],"]
22629#[doc = "          \"properties\": {"]
22630#[doc = "            \"block_hash\": {"]
22631#[doc = "              \"$ref\": \"#/components/schemas/CryptoHash\""]
22632#[doc = "            },"]
22633#[doc = "            \"block_height\": {"]
22634#[doc = "              \"type\": \"integer\","]
22635#[doc = "              \"format\": \"uint64\","]
22636#[doc = "              \"minimum\": 0.0"]
22637#[doc = "            },"]
22638#[doc = "            \"requested_account_id\": {"]
22639#[doc = "              \"$ref\": \"#/components/schemas/AccountId\""]
22640#[doc = "            }"]
22641#[doc = "          }"]
22642#[doc = "        },"]
22643#[doc = "        \"name\": {"]
22644#[doc = "          \"type\": \"string\","]
22645#[doc = "          \"enum\": ["]
22646#[doc = "            \"INVALID_ACCOUNT\""]
22647#[doc = "          ]"]
22648#[doc = "        }"]
22649#[doc = "      }"]
22650#[doc = "    },"]
22651#[doc = "    {"]
22652#[doc = "      \"type\": \"object\","]
22653#[doc = "      \"required\": ["]
22654#[doc = "        \"info\","]
22655#[doc = "        \"name\""]
22656#[doc = "      ],"]
22657#[doc = "      \"properties\": {"]
22658#[doc = "        \"info\": {"]
22659#[doc = "          \"type\": \"object\","]
22660#[doc = "          \"required\": ["]
22661#[doc = "            \"block_hash\","]
22662#[doc = "            \"block_height\","]
22663#[doc = "            \"requested_account_id\""]
22664#[doc = "          ],"]
22665#[doc = "          \"properties\": {"]
22666#[doc = "            \"block_hash\": {"]
22667#[doc = "              \"$ref\": \"#/components/schemas/CryptoHash\""]
22668#[doc = "            },"]
22669#[doc = "            \"block_height\": {"]
22670#[doc = "              \"type\": \"integer\","]
22671#[doc = "              \"format\": \"uint64\","]
22672#[doc = "              \"minimum\": 0.0"]
22673#[doc = "            },"]
22674#[doc = "            \"requested_account_id\": {"]
22675#[doc = "              \"$ref\": \"#/components/schemas/AccountId\""]
22676#[doc = "            }"]
22677#[doc = "          }"]
22678#[doc = "        },"]
22679#[doc = "        \"name\": {"]
22680#[doc = "          \"type\": \"string\","]
22681#[doc = "          \"enum\": ["]
22682#[doc = "            \"UNKNOWN_ACCOUNT\""]
22683#[doc = "          ]"]
22684#[doc = "        }"]
22685#[doc = "      }"]
22686#[doc = "    },"]
22687#[doc = "    {"]
22688#[doc = "      \"type\": \"object\","]
22689#[doc = "      \"required\": ["]
22690#[doc = "        \"info\","]
22691#[doc = "        \"name\""]
22692#[doc = "      ],"]
22693#[doc = "      \"properties\": {"]
22694#[doc = "        \"info\": {"]
22695#[doc = "          \"type\": \"object\","]
22696#[doc = "          \"required\": ["]
22697#[doc = "            \"block_hash\","]
22698#[doc = "            \"block_height\","]
22699#[doc = "            \"contract_account_id\""]
22700#[doc = "          ],"]
22701#[doc = "          \"properties\": {"]
22702#[doc = "            \"block_hash\": {"]
22703#[doc = "              \"$ref\": \"#/components/schemas/CryptoHash\""]
22704#[doc = "            },"]
22705#[doc = "            \"block_height\": {"]
22706#[doc = "              \"type\": \"integer\","]
22707#[doc = "              \"format\": \"uint64\","]
22708#[doc = "              \"minimum\": 0.0"]
22709#[doc = "            },"]
22710#[doc = "            \"contract_account_id\": {"]
22711#[doc = "              \"$ref\": \"#/components/schemas/AccountId\""]
22712#[doc = "            }"]
22713#[doc = "          }"]
22714#[doc = "        },"]
22715#[doc = "        \"name\": {"]
22716#[doc = "          \"type\": \"string\","]
22717#[doc = "          \"enum\": ["]
22718#[doc = "            \"NO_CONTRACT_CODE\""]
22719#[doc = "          ]"]
22720#[doc = "        }"]
22721#[doc = "      }"]
22722#[doc = "    },"]
22723#[doc = "    {"]
22724#[doc = "      \"type\": \"object\","]
22725#[doc = "      \"required\": ["]
22726#[doc = "        \"info\","]
22727#[doc = "        \"name\""]
22728#[doc = "      ],"]
22729#[doc = "      \"properties\": {"]
22730#[doc = "        \"info\": {"]
22731#[doc = "          \"type\": \"object\","]
22732#[doc = "          \"required\": ["]
22733#[doc = "            \"block_hash\","]
22734#[doc = "            \"block_height\","]
22735#[doc = "            \"contract_account_id\""]
22736#[doc = "          ],"]
22737#[doc = "          \"properties\": {"]
22738#[doc = "            \"block_hash\": {"]
22739#[doc = "              \"$ref\": \"#/components/schemas/CryptoHash\""]
22740#[doc = "            },"]
22741#[doc = "            \"block_height\": {"]
22742#[doc = "              \"type\": \"integer\","]
22743#[doc = "              \"format\": \"uint64\","]
22744#[doc = "              \"minimum\": 0.0"]
22745#[doc = "            },"]
22746#[doc = "            \"contract_account_id\": {"]
22747#[doc = "              \"$ref\": \"#/components/schemas/AccountId\""]
22748#[doc = "            }"]
22749#[doc = "          }"]
22750#[doc = "        },"]
22751#[doc = "        \"name\": {"]
22752#[doc = "          \"type\": \"string\","]
22753#[doc = "          \"enum\": ["]
22754#[doc = "            \"TOO_LARGE_CONTRACT_STATE\""]
22755#[doc = "          ]"]
22756#[doc = "        }"]
22757#[doc = "      }"]
22758#[doc = "    },"]
22759#[doc = "    {"]
22760#[doc = "      \"type\": \"object\","]
22761#[doc = "      \"required\": ["]
22762#[doc = "        \"info\","]
22763#[doc = "        \"name\""]
22764#[doc = "      ],"]
22765#[doc = "      \"properties\": {"]
22766#[doc = "        \"info\": {"]
22767#[doc = "          \"type\": \"object\","]
22768#[doc = "          \"required\": ["]
22769#[doc = "            \"block_hash\","]
22770#[doc = "            \"block_height\","]
22771#[doc = "            \"public_key\""]
22772#[doc = "          ],"]
22773#[doc = "          \"properties\": {"]
22774#[doc = "            \"block_hash\": {"]
22775#[doc = "              \"$ref\": \"#/components/schemas/CryptoHash\""]
22776#[doc = "            },"]
22777#[doc = "            \"block_height\": {"]
22778#[doc = "              \"type\": \"integer\","]
22779#[doc = "              \"format\": \"uint64\","]
22780#[doc = "              \"minimum\": 0.0"]
22781#[doc = "            },"]
22782#[doc = "            \"public_key\": {"]
22783#[doc = "              \"$ref\": \"#/components/schemas/PublicKey\""]
22784#[doc = "            }"]
22785#[doc = "          }"]
22786#[doc = "        },"]
22787#[doc = "        \"name\": {"]
22788#[doc = "          \"type\": \"string\","]
22789#[doc = "          \"enum\": ["]
22790#[doc = "            \"UNKNOWN_ACCESS_KEY\""]
22791#[doc = "          ]"]
22792#[doc = "        }"]
22793#[doc = "      }"]
22794#[doc = "    },"]
22795#[doc = "    {"]
22796#[doc = "      \"type\": \"object\","]
22797#[doc = "      \"required\": ["]
22798#[doc = "        \"info\","]
22799#[doc = "        \"name\""]
22800#[doc = "      ],"]
22801#[doc = "      \"properties\": {"]
22802#[doc = "        \"info\": {"]
22803#[doc = "          \"type\": \"object\","]
22804#[doc = "          \"required\": ["]
22805#[doc = "            \"block_hash\","]
22806#[doc = "            \"block_height\","]
22807#[doc = "            \"vm_error\""]
22808#[doc = "          ],"]
22809#[doc = "          \"properties\": {"]
22810#[doc = "            \"block_hash\": {"]
22811#[doc = "              \"$ref\": \"#/components/schemas/CryptoHash\""]
22812#[doc = "            },"]
22813#[doc = "            \"block_height\": {"]
22814#[doc = "              \"type\": \"integer\","]
22815#[doc = "              \"format\": \"uint64\","]
22816#[doc = "              \"minimum\": 0.0"]
22817#[doc = "            },"]
22818#[doc = "            \"vm_error\": {"]
22819#[doc = "              \"type\": \"string\""]
22820#[doc = "            }"]
22821#[doc = "          }"]
22822#[doc = "        },"]
22823#[doc = "        \"name\": {"]
22824#[doc = "          \"type\": \"string\","]
22825#[doc = "          \"enum\": ["]
22826#[doc = "            \"CONTRACT_EXECUTION_ERROR\""]
22827#[doc = "          ]"]
22828#[doc = "        }"]
22829#[doc = "      }"]
22830#[doc = "    },"]
22831#[doc = "    {"]
22832#[doc = "      \"type\": \"object\","]
22833#[doc = "      \"required\": ["]
22834#[doc = "        \"info\","]
22835#[doc = "        \"name\""]
22836#[doc = "      ],"]
22837#[doc = "      \"properties\": {"]
22838#[doc = "        \"info\": {"]
22839#[doc = "          \"type\": \"object\","]
22840#[doc = "          \"required\": ["]
22841#[doc = "            \"block_hash\","]
22842#[doc = "            \"block_height\","]
22843#[doc = "            \"identifier\""]
22844#[doc = "          ],"]
22845#[doc = "          \"properties\": {"]
22846#[doc = "            \"block_hash\": {"]
22847#[doc = "              \"$ref\": \"#/components/schemas/CryptoHash\""]
22848#[doc = "            },"]
22849#[doc = "            \"block_height\": {"]
22850#[doc = "              \"type\": \"integer\","]
22851#[doc = "              \"format\": \"uint64\","]
22852#[doc = "              \"minimum\": 0.0"]
22853#[doc = "            },"]
22854#[doc = "            \"identifier\": {"]
22855#[doc = "              \"$ref\": \"#/components/schemas/GlobalContractIdentifier\""]
22856#[doc = "            }"]
22857#[doc = "          }"]
22858#[doc = "        },"]
22859#[doc = "        \"name\": {"]
22860#[doc = "          \"type\": \"string\","]
22861#[doc = "          \"enum\": ["]
22862#[doc = "            \"NO_GLOBAL_CONTRACT_CODE\""]
22863#[doc = "          ]"]
22864#[doc = "        }"]
22865#[doc = "      }"]
22866#[doc = "    },"]
22867#[doc = "    {"]
22868#[doc = "      \"type\": \"object\","]
22869#[doc = "      \"required\": ["]
22870#[doc = "        \"info\","]
22871#[doc = "        \"name\""]
22872#[doc = "      ],"]
22873#[doc = "      \"properties\": {"]
22874#[doc = "        \"info\": {"]
22875#[doc = "          \"type\": \"object\","]
22876#[doc = "          \"required\": ["]
22877#[doc = "            \"error_message\""]
22878#[doc = "          ],"]
22879#[doc = "          \"properties\": {"]
22880#[doc = "            \"error_message\": {"]
22881#[doc = "              \"type\": \"string\""]
22882#[doc = "            }"]
22883#[doc = "          }"]
22884#[doc = "        },"]
22885#[doc = "        \"name\": {"]
22886#[doc = "          \"type\": \"string\","]
22887#[doc = "          \"enum\": ["]
22888#[doc = "            \"INTERNAL_ERROR\""]
22889#[doc = "          ]"]
22890#[doc = "        }"]
22891#[doc = "      }"]
22892#[doc = "    }"]
22893#[doc = "  ]"]
22894#[doc = "}"]
22895#[doc = r" ```"]
22896#[doc = r" </details>"]
22897#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
22898#[serde(tag = "name", content = "info")]
22899pub enum RpcQueryError {
22900    #[serde(rename = "NO_SYNCED_BLOCKS")]
22901    NoSyncedBlocks,
22902    #[serde(rename = "UNAVAILABLE_SHARD")]
22903    UnavailableShard { requested_shard_id: ShardId },
22904    #[serde(rename = "GARBAGE_COLLECTED_BLOCK")]
22905    GarbageCollectedBlock {
22906        block_hash: CryptoHash,
22907        block_height: u64,
22908    },
22909    #[serde(rename = "UNKNOWN_BLOCK")]
22910    UnknownBlock { block_reference: BlockReference },
22911    #[serde(rename = "INVALID_ACCOUNT")]
22912    InvalidAccount {
22913        block_hash: CryptoHash,
22914        block_height: u64,
22915        requested_account_id: AccountId,
22916    },
22917    #[serde(rename = "UNKNOWN_ACCOUNT")]
22918    UnknownAccount {
22919        block_hash: CryptoHash,
22920        block_height: u64,
22921        requested_account_id: AccountId,
22922    },
22923    #[serde(rename = "NO_CONTRACT_CODE")]
22924    NoContractCode {
22925        block_hash: CryptoHash,
22926        block_height: u64,
22927        contract_account_id: AccountId,
22928    },
22929    #[serde(rename = "TOO_LARGE_CONTRACT_STATE")]
22930    TooLargeContractState {
22931        block_hash: CryptoHash,
22932        block_height: u64,
22933        contract_account_id: AccountId,
22934    },
22935    #[serde(rename = "UNKNOWN_ACCESS_KEY")]
22936    UnknownAccessKey {
22937        block_hash: CryptoHash,
22938        block_height: u64,
22939        public_key: PublicKey,
22940    },
22941    #[serde(rename = "CONTRACT_EXECUTION_ERROR")]
22942    ContractExecutionError {
22943        block_hash: CryptoHash,
22944        block_height: u64,
22945        vm_error: ::std::string::String,
22946    },
22947    #[serde(rename = "NO_GLOBAL_CONTRACT_CODE")]
22948    NoGlobalContractCode {
22949        block_hash: CryptoHash,
22950        block_height: u64,
22951        identifier: GlobalContractIdentifier,
22952    },
22953    #[serde(rename = "INTERNAL_ERROR")]
22954    InternalError {
22955        error_message: ::std::string::String,
22956    },
22957}
22958impl ::std::convert::From<&Self> for RpcQueryError {
22959    fn from(value: &RpcQueryError) -> Self {
22960        value.clone()
22961    }
22962}
22963#[doc = "`RpcQueryRequest`"]
22964#[doc = r""]
22965#[doc = r" <details><summary>JSON schema</summary>"]
22966#[doc = r""]
22967#[doc = r" ```json"]
22968#[doc = "{"]
22969#[doc = "  \"title\": \"RpcQueryRequest\","]
22970#[doc = "  \"type\": \"object\","]
22971#[doc = "  \"oneOf\": ["]
22972#[doc = "    {"]
22973#[doc = "      \"title\": \"view_account_by_block_id\","]
22974#[doc = "      \"allOf\": ["]
22975#[doc = "        {"]
22976#[doc = "          \"type\": \"object\","]
22977#[doc = "          \"required\": ["]
22978#[doc = "            \"block_id\""]
22979#[doc = "          ],"]
22980#[doc = "          \"properties\": {"]
22981#[doc = "            \"block_id\": {"]
22982#[doc = "              \"$ref\": \"#/components/schemas/BlockId\""]
22983#[doc = "            }"]
22984#[doc = "          }"]
22985#[doc = "        },"]
22986#[doc = "        {"]
22987#[doc = "          \"type\": \"object\","]
22988#[doc = "          \"required\": ["]
22989#[doc = "            \"account_id\","]
22990#[doc = "            \"request_type\""]
22991#[doc = "          ],"]
22992#[doc = "          \"properties\": {"]
22993#[doc = "            \"account_id\": {"]
22994#[doc = "              \"$ref\": \"#/components/schemas/AccountId\""]
22995#[doc = "            },"]
22996#[doc = "            \"request_type\": {"]
22997#[doc = "              \"type\": \"string\","]
22998#[doc = "              \"enum\": ["]
22999#[doc = "                \"view_account\""]
23000#[doc = "              ]"]
23001#[doc = "            }"]
23002#[doc = "          }"]
23003#[doc = "        }"]
23004#[doc = "      ]"]
23005#[doc = "    },"]
23006#[doc = "    {"]
23007#[doc = "      \"title\": \"view_code_by_block_id\","]
23008#[doc = "      \"allOf\": ["]
23009#[doc = "        {"]
23010#[doc = "          \"type\": \"object\","]
23011#[doc = "          \"required\": ["]
23012#[doc = "            \"block_id\""]
23013#[doc = "          ],"]
23014#[doc = "          \"properties\": {"]
23015#[doc = "            \"block_id\": {"]
23016#[doc = "              \"$ref\": \"#/components/schemas/BlockId\""]
23017#[doc = "            }"]
23018#[doc = "          }"]
23019#[doc = "        },"]
23020#[doc = "        {"]
23021#[doc = "          \"type\": \"object\","]
23022#[doc = "          \"required\": ["]
23023#[doc = "            \"account_id\","]
23024#[doc = "            \"request_type\""]
23025#[doc = "          ],"]
23026#[doc = "          \"properties\": {"]
23027#[doc = "            \"account_id\": {"]
23028#[doc = "              \"$ref\": \"#/components/schemas/AccountId\""]
23029#[doc = "            },"]
23030#[doc = "            \"request_type\": {"]
23031#[doc = "              \"type\": \"string\","]
23032#[doc = "              \"enum\": ["]
23033#[doc = "                \"view_code\""]
23034#[doc = "              ]"]
23035#[doc = "            }"]
23036#[doc = "          }"]
23037#[doc = "        }"]
23038#[doc = "      ]"]
23039#[doc = "    },"]
23040#[doc = "    {"]
23041#[doc = "      \"title\": \"view_state_by_block_id\","]
23042#[doc = "      \"allOf\": ["]
23043#[doc = "        {"]
23044#[doc = "          \"type\": \"object\","]
23045#[doc = "          \"required\": ["]
23046#[doc = "            \"block_id\""]
23047#[doc = "          ],"]
23048#[doc = "          \"properties\": {"]
23049#[doc = "            \"block_id\": {"]
23050#[doc = "              \"$ref\": \"#/components/schemas/BlockId\""]
23051#[doc = "            }"]
23052#[doc = "          }"]
23053#[doc = "        },"]
23054#[doc = "        {"]
23055#[doc = "          \"type\": \"object\","]
23056#[doc = "          \"required\": ["]
23057#[doc = "            \"account_id\","]
23058#[doc = "            \"prefix_base64\","]
23059#[doc = "            \"request_type\""]
23060#[doc = "          ],"]
23061#[doc = "          \"properties\": {"]
23062#[doc = "            \"account_id\": {"]
23063#[doc = "              \"$ref\": \"#/components/schemas/AccountId\""]
23064#[doc = "            },"]
23065#[doc = "            \"include_proof\": {"]
23066#[doc = "              \"type\": \"boolean\""]
23067#[doc = "            },"]
23068#[doc = "            \"prefix_base64\": {"]
23069#[doc = "              \"$ref\": \"#/components/schemas/StoreKey\""]
23070#[doc = "            },"]
23071#[doc = "            \"request_type\": {"]
23072#[doc = "              \"type\": \"string\","]
23073#[doc = "              \"enum\": ["]
23074#[doc = "                \"view_state\""]
23075#[doc = "              ]"]
23076#[doc = "            }"]
23077#[doc = "          }"]
23078#[doc = "        }"]
23079#[doc = "      ]"]
23080#[doc = "    },"]
23081#[doc = "    {"]
23082#[doc = "      \"title\": \"view_access_key_by_block_id\","]
23083#[doc = "      \"allOf\": ["]
23084#[doc = "        {"]
23085#[doc = "          \"type\": \"object\","]
23086#[doc = "          \"required\": ["]
23087#[doc = "            \"block_id\""]
23088#[doc = "          ],"]
23089#[doc = "          \"properties\": {"]
23090#[doc = "            \"block_id\": {"]
23091#[doc = "              \"$ref\": \"#/components/schemas/BlockId\""]
23092#[doc = "            }"]
23093#[doc = "          }"]
23094#[doc = "        },"]
23095#[doc = "        {"]
23096#[doc = "          \"type\": \"object\","]
23097#[doc = "          \"required\": ["]
23098#[doc = "            \"account_id\","]
23099#[doc = "            \"public_key\","]
23100#[doc = "            \"request_type\""]
23101#[doc = "          ],"]
23102#[doc = "          \"properties\": {"]
23103#[doc = "            \"account_id\": {"]
23104#[doc = "              \"$ref\": \"#/components/schemas/AccountId\""]
23105#[doc = "            },"]
23106#[doc = "            \"public_key\": {"]
23107#[doc = "              \"$ref\": \"#/components/schemas/PublicKey\""]
23108#[doc = "            },"]
23109#[doc = "            \"request_type\": {"]
23110#[doc = "              \"type\": \"string\","]
23111#[doc = "              \"enum\": ["]
23112#[doc = "                \"view_access_key\""]
23113#[doc = "              ]"]
23114#[doc = "            }"]
23115#[doc = "          }"]
23116#[doc = "        }"]
23117#[doc = "      ]"]
23118#[doc = "    },"]
23119#[doc = "    {"]
23120#[doc = "      \"title\": \"view_access_key_list_by_block_id\","]
23121#[doc = "      \"allOf\": ["]
23122#[doc = "        {"]
23123#[doc = "          \"type\": \"object\","]
23124#[doc = "          \"required\": ["]
23125#[doc = "            \"block_id\""]
23126#[doc = "          ],"]
23127#[doc = "          \"properties\": {"]
23128#[doc = "            \"block_id\": {"]
23129#[doc = "              \"$ref\": \"#/components/schemas/BlockId\""]
23130#[doc = "            }"]
23131#[doc = "          }"]
23132#[doc = "        },"]
23133#[doc = "        {"]
23134#[doc = "          \"type\": \"object\","]
23135#[doc = "          \"required\": ["]
23136#[doc = "            \"account_id\","]
23137#[doc = "            \"request_type\""]
23138#[doc = "          ],"]
23139#[doc = "          \"properties\": {"]
23140#[doc = "            \"account_id\": {"]
23141#[doc = "              \"$ref\": \"#/components/schemas/AccountId\""]
23142#[doc = "            },"]
23143#[doc = "            \"request_type\": {"]
23144#[doc = "              \"type\": \"string\","]
23145#[doc = "              \"enum\": ["]
23146#[doc = "                \"view_access_key_list\""]
23147#[doc = "              ]"]
23148#[doc = "            }"]
23149#[doc = "          }"]
23150#[doc = "        }"]
23151#[doc = "      ]"]
23152#[doc = "    },"]
23153#[doc = "    {"]
23154#[doc = "      \"title\": \"call_function_by_block_id\","]
23155#[doc = "      \"allOf\": ["]
23156#[doc = "        {"]
23157#[doc = "          \"type\": \"object\","]
23158#[doc = "          \"required\": ["]
23159#[doc = "            \"block_id\""]
23160#[doc = "          ],"]
23161#[doc = "          \"properties\": {"]
23162#[doc = "            \"block_id\": {"]
23163#[doc = "              \"$ref\": \"#/components/schemas/BlockId\""]
23164#[doc = "            }"]
23165#[doc = "          }"]
23166#[doc = "        },"]
23167#[doc = "        {"]
23168#[doc = "          \"type\": \"object\","]
23169#[doc = "          \"required\": ["]
23170#[doc = "            \"account_id\","]
23171#[doc = "            \"args_base64\","]
23172#[doc = "            \"method_name\","]
23173#[doc = "            \"request_type\""]
23174#[doc = "          ],"]
23175#[doc = "          \"properties\": {"]
23176#[doc = "            \"account_id\": {"]
23177#[doc = "              \"$ref\": \"#/components/schemas/AccountId\""]
23178#[doc = "            },"]
23179#[doc = "            \"args_base64\": {"]
23180#[doc = "              \"$ref\": \"#/components/schemas/FunctionArgs\""]
23181#[doc = "            },"]
23182#[doc = "            \"method_name\": {"]
23183#[doc = "              \"type\": \"string\""]
23184#[doc = "            },"]
23185#[doc = "            \"request_type\": {"]
23186#[doc = "              \"type\": \"string\","]
23187#[doc = "              \"enum\": ["]
23188#[doc = "                \"call_function\""]
23189#[doc = "              ]"]
23190#[doc = "            }"]
23191#[doc = "          }"]
23192#[doc = "        }"]
23193#[doc = "      ]"]
23194#[doc = "    },"]
23195#[doc = "    {"]
23196#[doc = "      \"title\": \"view_global_contract_code_by_block_id\","]
23197#[doc = "      \"allOf\": ["]
23198#[doc = "        {"]
23199#[doc = "          \"type\": \"object\","]
23200#[doc = "          \"required\": ["]
23201#[doc = "            \"block_id\""]
23202#[doc = "          ],"]
23203#[doc = "          \"properties\": {"]
23204#[doc = "            \"block_id\": {"]
23205#[doc = "              \"$ref\": \"#/components/schemas/BlockId\""]
23206#[doc = "            }"]
23207#[doc = "          }"]
23208#[doc = "        },"]
23209#[doc = "        {"]
23210#[doc = "          \"type\": \"object\","]
23211#[doc = "          \"required\": ["]
23212#[doc = "            \"code_hash\","]
23213#[doc = "            \"request_type\""]
23214#[doc = "          ],"]
23215#[doc = "          \"properties\": {"]
23216#[doc = "            \"code_hash\": {"]
23217#[doc = "              \"$ref\": \"#/components/schemas/CryptoHash\""]
23218#[doc = "            },"]
23219#[doc = "            \"request_type\": {"]
23220#[doc = "              \"type\": \"string\","]
23221#[doc = "              \"enum\": ["]
23222#[doc = "                \"view_global_contract_code\""]
23223#[doc = "              ]"]
23224#[doc = "            }"]
23225#[doc = "          }"]
23226#[doc = "        }"]
23227#[doc = "      ]"]
23228#[doc = "    },"]
23229#[doc = "    {"]
23230#[doc = "      \"title\": \"view_global_contract_code_by_account_id_by_block_id\","]
23231#[doc = "      \"allOf\": ["]
23232#[doc = "        {"]
23233#[doc = "          \"type\": \"object\","]
23234#[doc = "          \"required\": ["]
23235#[doc = "            \"block_id\""]
23236#[doc = "          ],"]
23237#[doc = "          \"properties\": {"]
23238#[doc = "            \"block_id\": {"]
23239#[doc = "              \"$ref\": \"#/components/schemas/BlockId\""]
23240#[doc = "            }"]
23241#[doc = "          }"]
23242#[doc = "        },"]
23243#[doc = "        {"]
23244#[doc = "          \"type\": \"object\","]
23245#[doc = "          \"required\": ["]
23246#[doc = "            \"account_id\","]
23247#[doc = "            \"request_type\""]
23248#[doc = "          ],"]
23249#[doc = "          \"properties\": {"]
23250#[doc = "            \"account_id\": {"]
23251#[doc = "              \"$ref\": \"#/components/schemas/AccountId\""]
23252#[doc = "            },"]
23253#[doc = "            \"request_type\": {"]
23254#[doc = "              \"type\": \"string\","]
23255#[doc = "              \"enum\": ["]
23256#[doc = "                \"view_global_contract_code_by_account_id\""]
23257#[doc = "              ]"]
23258#[doc = "            }"]
23259#[doc = "          }"]
23260#[doc = "        }"]
23261#[doc = "      ]"]
23262#[doc = "    },"]
23263#[doc = "    {"]
23264#[doc = "      \"title\": \"view_account_by_finality\","]
23265#[doc = "      \"allOf\": ["]
23266#[doc = "        {"]
23267#[doc = "          \"type\": \"object\","]
23268#[doc = "          \"required\": ["]
23269#[doc = "            \"finality\""]
23270#[doc = "          ],"]
23271#[doc = "          \"properties\": {"]
23272#[doc = "            \"finality\": {"]
23273#[doc = "              \"$ref\": \"#/components/schemas/Finality\""]
23274#[doc = "            }"]
23275#[doc = "          }"]
23276#[doc = "        },"]
23277#[doc = "        {"]
23278#[doc = "          \"type\": \"object\","]
23279#[doc = "          \"required\": ["]
23280#[doc = "            \"account_id\","]
23281#[doc = "            \"request_type\""]
23282#[doc = "          ],"]
23283#[doc = "          \"properties\": {"]
23284#[doc = "            \"account_id\": {"]
23285#[doc = "              \"$ref\": \"#/components/schemas/AccountId\""]
23286#[doc = "            },"]
23287#[doc = "            \"request_type\": {"]
23288#[doc = "              \"type\": \"string\","]
23289#[doc = "              \"enum\": ["]
23290#[doc = "                \"view_account\""]
23291#[doc = "              ]"]
23292#[doc = "            }"]
23293#[doc = "          }"]
23294#[doc = "        }"]
23295#[doc = "      ]"]
23296#[doc = "    },"]
23297#[doc = "    {"]
23298#[doc = "      \"title\": \"view_code_by_finality\","]
23299#[doc = "      \"allOf\": ["]
23300#[doc = "        {"]
23301#[doc = "          \"type\": \"object\","]
23302#[doc = "          \"required\": ["]
23303#[doc = "            \"finality\""]
23304#[doc = "          ],"]
23305#[doc = "          \"properties\": {"]
23306#[doc = "            \"finality\": {"]
23307#[doc = "              \"$ref\": \"#/components/schemas/Finality\""]
23308#[doc = "            }"]
23309#[doc = "          }"]
23310#[doc = "        },"]
23311#[doc = "        {"]
23312#[doc = "          \"type\": \"object\","]
23313#[doc = "          \"required\": ["]
23314#[doc = "            \"account_id\","]
23315#[doc = "            \"request_type\""]
23316#[doc = "          ],"]
23317#[doc = "          \"properties\": {"]
23318#[doc = "            \"account_id\": {"]
23319#[doc = "              \"$ref\": \"#/components/schemas/AccountId\""]
23320#[doc = "            },"]
23321#[doc = "            \"request_type\": {"]
23322#[doc = "              \"type\": \"string\","]
23323#[doc = "              \"enum\": ["]
23324#[doc = "                \"view_code\""]
23325#[doc = "              ]"]
23326#[doc = "            }"]
23327#[doc = "          }"]
23328#[doc = "        }"]
23329#[doc = "      ]"]
23330#[doc = "    },"]
23331#[doc = "    {"]
23332#[doc = "      \"title\": \"view_state_by_finality\","]
23333#[doc = "      \"allOf\": ["]
23334#[doc = "        {"]
23335#[doc = "          \"type\": \"object\","]
23336#[doc = "          \"required\": ["]
23337#[doc = "            \"finality\""]
23338#[doc = "          ],"]
23339#[doc = "          \"properties\": {"]
23340#[doc = "            \"finality\": {"]
23341#[doc = "              \"$ref\": \"#/components/schemas/Finality\""]
23342#[doc = "            }"]
23343#[doc = "          }"]
23344#[doc = "        },"]
23345#[doc = "        {"]
23346#[doc = "          \"type\": \"object\","]
23347#[doc = "          \"required\": ["]
23348#[doc = "            \"account_id\","]
23349#[doc = "            \"prefix_base64\","]
23350#[doc = "            \"request_type\""]
23351#[doc = "          ],"]
23352#[doc = "          \"properties\": {"]
23353#[doc = "            \"account_id\": {"]
23354#[doc = "              \"$ref\": \"#/components/schemas/AccountId\""]
23355#[doc = "            },"]
23356#[doc = "            \"include_proof\": {"]
23357#[doc = "              \"type\": \"boolean\""]
23358#[doc = "            },"]
23359#[doc = "            \"prefix_base64\": {"]
23360#[doc = "              \"$ref\": \"#/components/schemas/StoreKey\""]
23361#[doc = "            },"]
23362#[doc = "            \"request_type\": {"]
23363#[doc = "              \"type\": \"string\","]
23364#[doc = "              \"enum\": ["]
23365#[doc = "                \"view_state\""]
23366#[doc = "              ]"]
23367#[doc = "            }"]
23368#[doc = "          }"]
23369#[doc = "        }"]
23370#[doc = "      ]"]
23371#[doc = "    },"]
23372#[doc = "    {"]
23373#[doc = "      \"title\": \"view_access_key_by_finality\","]
23374#[doc = "      \"allOf\": ["]
23375#[doc = "        {"]
23376#[doc = "          \"type\": \"object\","]
23377#[doc = "          \"required\": ["]
23378#[doc = "            \"finality\""]
23379#[doc = "          ],"]
23380#[doc = "          \"properties\": {"]
23381#[doc = "            \"finality\": {"]
23382#[doc = "              \"$ref\": \"#/components/schemas/Finality\""]
23383#[doc = "            }"]
23384#[doc = "          }"]
23385#[doc = "        },"]
23386#[doc = "        {"]
23387#[doc = "          \"type\": \"object\","]
23388#[doc = "          \"required\": ["]
23389#[doc = "            \"account_id\","]
23390#[doc = "            \"public_key\","]
23391#[doc = "            \"request_type\""]
23392#[doc = "          ],"]
23393#[doc = "          \"properties\": {"]
23394#[doc = "            \"account_id\": {"]
23395#[doc = "              \"$ref\": \"#/components/schemas/AccountId\""]
23396#[doc = "            },"]
23397#[doc = "            \"public_key\": {"]
23398#[doc = "              \"$ref\": \"#/components/schemas/PublicKey\""]
23399#[doc = "            },"]
23400#[doc = "            \"request_type\": {"]
23401#[doc = "              \"type\": \"string\","]
23402#[doc = "              \"enum\": ["]
23403#[doc = "                \"view_access_key\""]
23404#[doc = "              ]"]
23405#[doc = "            }"]
23406#[doc = "          }"]
23407#[doc = "        }"]
23408#[doc = "      ]"]
23409#[doc = "    },"]
23410#[doc = "    {"]
23411#[doc = "      \"title\": \"view_access_key_list_by_finality\","]
23412#[doc = "      \"allOf\": ["]
23413#[doc = "        {"]
23414#[doc = "          \"type\": \"object\","]
23415#[doc = "          \"required\": ["]
23416#[doc = "            \"finality\""]
23417#[doc = "          ],"]
23418#[doc = "          \"properties\": {"]
23419#[doc = "            \"finality\": {"]
23420#[doc = "              \"$ref\": \"#/components/schemas/Finality\""]
23421#[doc = "            }"]
23422#[doc = "          }"]
23423#[doc = "        },"]
23424#[doc = "        {"]
23425#[doc = "          \"type\": \"object\","]
23426#[doc = "          \"required\": ["]
23427#[doc = "            \"account_id\","]
23428#[doc = "            \"request_type\""]
23429#[doc = "          ],"]
23430#[doc = "          \"properties\": {"]
23431#[doc = "            \"account_id\": {"]
23432#[doc = "              \"$ref\": \"#/components/schemas/AccountId\""]
23433#[doc = "            },"]
23434#[doc = "            \"request_type\": {"]
23435#[doc = "              \"type\": \"string\","]
23436#[doc = "              \"enum\": ["]
23437#[doc = "                \"view_access_key_list\""]
23438#[doc = "              ]"]
23439#[doc = "            }"]
23440#[doc = "          }"]
23441#[doc = "        }"]
23442#[doc = "      ]"]
23443#[doc = "    },"]
23444#[doc = "    {"]
23445#[doc = "      \"title\": \"call_function_by_finality\","]
23446#[doc = "      \"allOf\": ["]
23447#[doc = "        {"]
23448#[doc = "          \"type\": \"object\","]
23449#[doc = "          \"required\": ["]
23450#[doc = "            \"finality\""]
23451#[doc = "          ],"]
23452#[doc = "          \"properties\": {"]
23453#[doc = "            \"finality\": {"]
23454#[doc = "              \"$ref\": \"#/components/schemas/Finality\""]
23455#[doc = "            }"]
23456#[doc = "          }"]
23457#[doc = "        },"]
23458#[doc = "        {"]
23459#[doc = "          \"type\": \"object\","]
23460#[doc = "          \"required\": ["]
23461#[doc = "            \"account_id\","]
23462#[doc = "            \"args_base64\","]
23463#[doc = "            \"method_name\","]
23464#[doc = "            \"request_type\""]
23465#[doc = "          ],"]
23466#[doc = "          \"properties\": {"]
23467#[doc = "            \"account_id\": {"]
23468#[doc = "              \"$ref\": \"#/components/schemas/AccountId\""]
23469#[doc = "            },"]
23470#[doc = "            \"args_base64\": {"]
23471#[doc = "              \"$ref\": \"#/components/schemas/FunctionArgs\""]
23472#[doc = "            },"]
23473#[doc = "            \"method_name\": {"]
23474#[doc = "              \"type\": \"string\""]
23475#[doc = "            },"]
23476#[doc = "            \"request_type\": {"]
23477#[doc = "              \"type\": \"string\","]
23478#[doc = "              \"enum\": ["]
23479#[doc = "                \"call_function\""]
23480#[doc = "              ]"]
23481#[doc = "            }"]
23482#[doc = "          }"]
23483#[doc = "        }"]
23484#[doc = "      ]"]
23485#[doc = "    },"]
23486#[doc = "    {"]
23487#[doc = "      \"title\": \"view_global_contract_code_by_finality\","]
23488#[doc = "      \"allOf\": ["]
23489#[doc = "        {"]
23490#[doc = "          \"type\": \"object\","]
23491#[doc = "          \"required\": ["]
23492#[doc = "            \"finality\""]
23493#[doc = "          ],"]
23494#[doc = "          \"properties\": {"]
23495#[doc = "            \"finality\": {"]
23496#[doc = "              \"$ref\": \"#/components/schemas/Finality\""]
23497#[doc = "            }"]
23498#[doc = "          }"]
23499#[doc = "        },"]
23500#[doc = "        {"]
23501#[doc = "          \"type\": \"object\","]
23502#[doc = "          \"required\": ["]
23503#[doc = "            \"code_hash\","]
23504#[doc = "            \"request_type\""]
23505#[doc = "          ],"]
23506#[doc = "          \"properties\": {"]
23507#[doc = "            \"code_hash\": {"]
23508#[doc = "              \"$ref\": \"#/components/schemas/CryptoHash\""]
23509#[doc = "            },"]
23510#[doc = "            \"request_type\": {"]
23511#[doc = "              \"type\": \"string\","]
23512#[doc = "              \"enum\": ["]
23513#[doc = "                \"view_global_contract_code\""]
23514#[doc = "              ]"]
23515#[doc = "            }"]
23516#[doc = "          }"]
23517#[doc = "        }"]
23518#[doc = "      ]"]
23519#[doc = "    },"]
23520#[doc = "    {"]
23521#[doc = "      \"title\": \"view_global_contract_code_by_account_id_by_finality\","]
23522#[doc = "      \"allOf\": ["]
23523#[doc = "        {"]
23524#[doc = "          \"type\": \"object\","]
23525#[doc = "          \"required\": ["]
23526#[doc = "            \"finality\""]
23527#[doc = "          ],"]
23528#[doc = "          \"properties\": {"]
23529#[doc = "            \"finality\": {"]
23530#[doc = "              \"$ref\": \"#/components/schemas/Finality\""]
23531#[doc = "            }"]
23532#[doc = "          }"]
23533#[doc = "        },"]
23534#[doc = "        {"]
23535#[doc = "          \"type\": \"object\","]
23536#[doc = "          \"required\": ["]
23537#[doc = "            \"account_id\","]
23538#[doc = "            \"request_type\""]
23539#[doc = "          ],"]
23540#[doc = "          \"properties\": {"]
23541#[doc = "            \"account_id\": {"]
23542#[doc = "              \"$ref\": \"#/components/schemas/AccountId\""]
23543#[doc = "            },"]
23544#[doc = "            \"request_type\": {"]
23545#[doc = "              \"type\": \"string\","]
23546#[doc = "              \"enum\": ["]
23547#[doc = "                \"view_global_contract_code_by_account_id\""]
23548#[doc = "              ]"]
23549#[doc = "            }"]
23550#[doc = "          }"]
23551#[doc = "        }"]
23552#[doc = "      ]"]
23553#[doc = "    },"]
23554#[doc = "    {"]
23555#[doc = "      \"title\": \"view_account_by_sync_checkpoint\","]
23556#[doc = "      \"allOf\": ["]
23557#[doc = "        {"]
23558#[doc = "          \"type\": \"object\","]
23559#[doc = "          \"required\": ["]
23560#[doc = "            \"sync_checkpoint\""]
23561#[doc = "          ],"]
23562#[doc = "          \"properties\": {"]
23563#[doc = "            \"sync_checkpoint\": {"]
23564#[doc = "              \"$ref\": \"#/components/schemas/SyncCheckpoint\""]
23565#[doc = "            }"]
23566#[doc = "          }"]
23567#[doc = "        },"]
23568#[doc = "        {"]
23569#[doc = "          \"type\": \"object\","]
23570#[doc = "          \"required\": ["]
23571#[doc = "            \"account_id\","]
23572#[doc = "            \"request_type\""]
23573#[doc = "          ],"]
23574#[doc = "          \"properties\": {"]
23575#[doc = "            \"account_id\": {"]
23576#[doc = "              \"$ref\": \"#/components/schemas/AccountId\""]
23577#[doc = "            },"]
23578#[doc = "            \"request_type\": {"]
23579#[doc = "              \"type\": \"string\","]
23580#[doc = "              \"enum\": ["]
23581#[doc = "                \"view_account\""]
23582#[doc = "              ]"]
23583#[doc = "            }"]
23584#[doc = "          }"]
23585#[doc = "        }"]
23586#[doc = "      ]"]
23587#[doc = "    },"]
23588#[doc = "    {"]
23589#[doc = "      \"title\": \"view_code_by_sync_checkpoint\","]
23590#[doc = "      \"allOf\": ["]
23591#[doc = "        {"]
23592#[doc = "          \"type\": \"object\","]
23593#[doc = "          \"required\": ["]
23594#[doc = "            \"sync_checkpoint\""]
23595#[doc = "          ],"]
23596#[doc = "          \"properties\": {"]
23597#[doc = "            \"sync_checkpoint\": {"]
23598#[doc = "              \"$ref\": \"#/components/schemas/SyncCheckpoint\""]
23599#[doc = "            }"]
23600#[doc = "          }"]
23601#[doc = "        },"]
23602#[doc = "        {"]
23603#[doc = "          \"type\": \"object\","]
23604#[doc = "          \"required\": ["]
23605#[doc = "            \"account_id\","]
23606#[doc = "            \"request_type\""]
23607#[doc = "          ],"]
23608#[doc = "          \"properties\": {"]
23609#[doc = "            \"account_id\": {"]
23610#[doc = "              \"$ref\": \"#/components/schemas/AccountId\""]
23611#[doc = "            },"]
23612#[doc = "            \"request_type\": {"]
23613#[doc = "              \"type\": \"string\","]
23614#[doc = "              \"enum\": ["]
23615#[doc = "                \"view_code\""]
23616#[doc = "              ]"]
23617#[doc = "            }"]
23618#[doc = "          }"]
23619#[doc = "        }"]
23620#[doc = "      ]"]
23621#[doc = "    },"]
23622#[doc = "    {"]
23623#[doc = "      \"title\": \"view_state_by_sync_checkpoint\","]
23624#[doc = "      \"allOf\": ["]
23625#[doc = "        {"]
23626#[doc = "          \"type\": \"object\","]
23627#[doc = "          \"required\": ["]
23628#[doc = "            \"sync_checkpoint\""]
23629#[doc = "          ],"]
23630#[doc = "          \"properties\": {"]
23631#[doc = "            \"sync_checkpoint\": {"]
23632#[doc = "              \"$ref\": \"#/components/schemas/SyncCheckpoint\""]
23633#[doc = "            }"]
23634#[doc = "          }"]
23635#[doc = "        },"]
23636#[doc = "        {"]
23637#[doc = "          \"type\": \"object\","]
23638#[doc = "          \"required\": ["]
23639#[doc = "            \"account_id\","]
23640#[doc = "            \"prefix_base64\","]
23641#[doc = "            \"request_type\""]
23642#[doc = "          ],"]
23643#[doc = "          \"properties\": {"]
23644#[doc = "            \"account_id\": {"]
23645#[doc = "              \"$ref\": \"#/components/schemas/AccountId\""]
23646#[doc = "            },"]
23647#[doc = "            \"include_proof\": {"]
23648#[doc = "              \"type\": \"boolean\""]
23649#[doc = "            },"]
23650#[doc = "            \"prefix_base64\": {"]
23651#[doc = "              \"$ref\": \"#/components/schemas/StoreKey\""]
23652#[doc = "            },"]
23653#[doc = "            \"request_type\": {"]
23654#[doc = "              \"type\": \"string\","]
23655#[doc = "              \"enum\": ["]
23656#[doc = "                \"view_state\""]
23657#[doc = "              ]"]
23658#[doc = "            }"]
23659#[doc = "          }"]
23660#[doc = "        }"]
23661#[doc = "      ]"]
23662#[doc = "    },"]
23663#[doc = "    {"]
23664#[doc = "      \"title\": \"view_access_key_by_sync_checkpoint\","]
23665#[doc = "      \"allOf\": ["]
23666#[doc = "        {"]
23667#[doc = "          \"type\": \"object\","]
23668#[doc = "          \"required\": ["]
23669#[doc = "            \"sync_checkpoint\""]
23670#[doc = "          ],"]
23671#[doc = "          \"properties\": {"]
23672#[doc = "            \"sync_checkpoint\": {"]
23673#[doc = "              \"$ref\": \"#/components/schemas/SyncCheckpoint\""]
23674#[doc = "            }"]
23675#[doc = "          }"]
23676#[doc = "        },"]
23677#[doc = "        {"]
23678#[doc = "          \"type\": \"object\","]
23679#[doc = "          \"required\": ["]
23680#[doc = "            \"account_id\","]
23681#[doc = "            \"public_key\","]
23682#[doc = "            \"request_type\""]
23683#[doc = "          ],"]
23684#[doc = "          \"properties\": {"]
23685#[doc = "            \"account_id\": {"]
23686#[doc = "              \"$ref\": \"#/components/schemas/AccountId\""]
23687#[doc = "            },"]
23688#[doc = "            \"public_key\": {"]
23689#[doc = "              \"$ref\": \"#/components/schemas/PublicKey\""]
23690#[doc = "            },"]
23691#[doc = "            \"request_type\": {"]
23692#[doc = "              \"type\": \"string\","]
23693#[doc = "              \"enum\": ["]
23694#[doc = "                \"view_access_key\""]
23695#[doc = "              ]"]
23696#[doc = "            }"]
23697#[doc = "          }"]
23698#[doc = "        }"]
23699#[doc = "      ]"]
23700#[doc = "    },"]
23701#[doc = "    {"]
23702#[doc = "      \"title\": \"view_access_key_list_by_sync_checkpoint\","]
23703#[doc = "      \"allOf\": ["]
23704#[doc = "        {"]
23705#[doc = "          \"type\": \"object\","]
23706#[doc = "          \"required\": ["]
23707#[doc = "            \"sync_checkpoint\""]
23708#[doc = "          ],"]
23709#[doc = "          \"properties\": {"]
23710#[doc = "            \"sync_checkpoint\": {"]
23711#[doc = "              \"$ref\": \"#/components/schemas/SyncCheckpoint\""]
23712#[doc = "            }"]
23713#[doc = "          }"]
23714#[doc = "        },"]
23715#[doc = "        {"]
23716#[doc = "          \"type\": \"object\","]
23717#[doc = "          \"required\": ["]
23718#[doc = "            \"account_id\","]
23719#[doc = "            \"request_type\""]
23720#[doc = "          ],"]
23721#[doc = "          \"properties\": {"]
23722#[doc = "            \"account_id\": {"]
23723#[doc = "              \"$ref\": \"#/components/schemas/AccountId\""]
23724#[doc = "            },"]
23725#[doc = "            \"request_type\": {"]
23726#[doc = "              \"type\": \"string\","]
23727#[doc = "              \"enum\": ["]
23728#[doc = "                \"view_access_key_list\""]
23729#[doc = "              ]"]
23730#[doc = "            }"]
23731#[doc = "          }"]
23732#[doc = "        }"]
23733#[doc = "      ]"]
23734#[doc = "    },"]
23735#[doc = "    {"]
23736#[doc = "      \"title\": \"call_function_by_sync_checkpoint\","]
23737#[doc = "      \"allOf\": ["]
23738#[doc = "        {"]
23739#[doc = "          \"type\": \"object\","]
23740#[doc = "          \"required\": ["]
23741#[doc = "            \"sync_checkpoint\""]
23742#[doc = "          ],"]
23743#[doc = "          \"properties\": {"]
23744#[doc = "            \"sync_checkpoint\": {"]
23745#[doc = "              \"$ref\": \"#/components/schemas/SyncCheckpoint\""]
23746#[doc = "            }"]
23747#[doc = "          }"]
23748#[doc = "        },"]
23749#[doc = "        {"]
23750#[doc = "          \"type\": \"object\","]
23751#[doc = "          \"required\": ["]
23752#[doc = "            \"account_id\","]
23753#[doc = "            \"args_base64\","]
23754#[doc = "            \"method_name\","]
23755#[doc = "            \"request_type\""]
23756#[doc = "          ],"]
23757#[doc = "          \"properties\": {"]
23758#[doc = "            \"account_id\": {"]
23759#[doc = "              \"$ref\": \"#/components/schemas/AccountId\""]
23760#[doc = "            },"]
23761#[doc = "            \"args_base64\": {"]
23762#[doc = "              \"$ref\": \"#/components/schemas/FunctionArgs\""]
23763#[doc = "            },"]
23764#[doc = "            \"method_name\": {"]
23765#[doc = "              \"type\": \"string\""]
23766#[doc = "            },"]
23767#[doc = "            \"request_type\": {"]
23768#[doc = "              \"type\": \"string\","]
23769#[doc = "              \"enum\": ["]
23770#[doc = "                \"call_function\""]
23771#[doc = "              ]"]
23772#[doc = "            }"]
23773#[doc = "          }"]
23774#[doc = "        }"]
23775#[doc = "      ]"]
23776#[doc = "    },"]
23777#[doc = "    {"]
23778#[doc = "      \"title\": \"view_global_contract_code_by_sync_checkpoint\","]
23779#[doc = "      \"allOf\": ["]
23780#[doc = "        {"]
23781#[doc = "          \"type\": \"object\","]
23782#[doc = "          \"required\": ["]
23783#[doc = "            \"sync_checkpoint\""]
23784#[doc = "          ],"]
23785#[doc = "          \"properties\": {"]
23786#[doc = "            \"sync_checkpoint\": {"]
23787#[doc = "              \"$ref\": \"#/components/schemas/SyncCheckpoint\""]
23788#[doc = "            }"]
23789#[doc = "          }"]
23790#[doc = "        },"]
23791#[doc = "        {"]
23792#[doc = "          \"type\": \"object\","]
23793#[doc = "          \"required\": ["]
23794#[doc = "            \"code_hash\","]
23795#[doc = "            \"request_type\""]
23796#[doc = "          ],"]
23797#[doc = "          \"properties\": {"]
23798#[doc = "            \"code_hash\": {"]
23799#[doc = "              \"$ref\": \"#/components/schemas/CryptoHash\""]
23800#[doc = "            },"]
23801#[doc = "            \"request_type\": {"]
23802#[doc = "              \"type\": \"string\","]
23803#[doc = "              \"enum\": ["]
23804#[doc = "                \"view_global_contract_code\""]
23805#[doc = "              ]"]
23806#[doc = "            }"]
23807#[doc = "          }"]
23808#[doc = "        }"]
23809#[doc = "      ]"]
23810#[doc = "    },"]
23811#[doc = "    {"]
23812#[doc = "      \"title\": \"view_global_contract_code_by_account_id_by_sync_checkpoint\","]
23813#[doc = "      \"allOf\": ["]
23814#[doc = "        {"]
23815#[doc = "          \"type\": \"object\","]
23816#[doc = "          \"required\": ["]
23817#[doc = "            \"sync_checkpoint\""]
23818#[doc = "          ],"]
23819#[doc = "          \"properties\": {"]
23820#[doc = "            \"sync_checkpoint\": {"]
23821#[doc = "              \"$ref\": \"#/components/schemas/SyncCheckpoint\""]
23822#[doc = "            }"]
23823#[doc = "          }"]
23824#[doc = "        },"]
23825#[doc = "        {"]
23826#[doc = "          \"type\": \"object\","]
23827#[doc = "          \"required\": ["]
23828#[doc = "            \"account_id\","]
23829#[doc = "            \"request_type\""]
23830#[doc = "          ],"]
23831#[doc = "          \"properties\": {"]
23832#[doc = "            \"account_id\": {"]
23833#[doc = "              \"$ref\": \"#/components/schemas/AccountId\""]
23834#[doc = "            },"]
23835#[doc = "            \"request_type\": {"]
23836#[doc = "              \"type\": \"string\","]
23837#[doc = "              \"enum\": ["]
23838#[doc = "                \"view_global_contract_code_by_account_id\""]
23839#[doc = "              ]"]
23840#[doc = "            }"]
23841#[doc = "          }"]
23842#[doc = "        }"]
23843#[doc = "      ]"]
23844#[doc = "    }"]
23845#[doc = "  ]"]
23846#[doc = "}"]
23847#[doc = r" ```"]
23848#[doc = r" </details>"]
23849#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
23850#[serde(untagged)]
23851pub enum RpcQueryRequest {
23852    ViewAccountByBlockId {
23853        account_id: AccountId,
23854        block_id: BlockId,
23855        request_type: ViewAccountByBlockIdRequestType,
23856    },
23857    ViewCodeByBlockId {
23858        account_id: AccountId,
23859        block_id: BlockId,
23860        request_type: ViewCodeByBlockIdRequestType,
23861    },
23862    ViewStateByBlockId {
23863        account_id: AccountId,
23864        block_id: BlockId,
23865        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
23866        include_proof: ::std::option::Option<bool>,
23867        prefix_base64: StoreKey,
23868        request_type: ViewStateByBlockIdRequestType,
23869    },
23870    ViewAccessKeyByBlockId {
23871        account_id: AccountId,
23872        block_id: BlockId,
23873        public_key: PublicKey,
23874        request_type: ViewAccessKeyByBlockIdRequestType,
23875    },
23876    ViewAccessKeyListByBlockId {
23877        account_id: AccountId,
23878        block_id: BlockId,
23879        request_type: ViewAccessKeyListByBlockIdRequestType,
23880    },
23881    CallFunctionByBlockId {
23882        account_id: AccountId,
23883        args_base64: FunctionArgs,
23884        block_id: BlockId,
23885        method_name: ::std::string::String,
23886        request_type: CallFunctionByBlockIdRequestType,
23887    },
23888    ViewGlobalContractCodeByBlockId {
23889        block_id: BlockId,
23890        code_hash: CryptoHash,
23891        request_type: ViewGlobalContractCodeByBlockIdRequestType,
23892    },
23893    ViewGlobalContractCodeByAccountIdByBlockId {
23894        account_id: AccountId,
23895        block_id: BlockId,
23896        request_type: ViewGlobalContractCodeByAccountIdByBlockIdRequestType,
23897    },
23898    ViewAccountByFinality {
23899        account_id: AccountId,
23900        finality: Finality,
23901        request_type: ViewAccountByFinalityRequestType,
23902    },
23903    ViewCodeByFinality {
23904        account_id: AccountId,
23905        finality: Finality,
23906        request_type: ViewCodeByFinalityRequestType,
23907    },
23908    ViewStateByFinality {
23909        account_id: AccountId,
23910        finality: Finality,
23911        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
23912        include_proof: ::std::option::Option<bool>,
23913        prefix_base64: StoreKey,
23914        request_type: ViewStateByFinalityRequestType,
23915    },
23916    ViewAccessKeyByFinality {
23917        account_id: AccountId,
23918        finality: Finality,
23919        public_key: PublicKey,
23920        request_type: ViewAccessKeyByFinalityRequestType,
23921    },
23922    ViewAccessKeyListByFinality {
23923        account_id: AccountId,
23924        finality: Finality,
23925        request_type: ViewAccessKeyListByFinalityRequestType,
23926    },
23927    CallFunctionByFinality {
23928        account_id: AccountId,
23929        args_base64: FunctionArgs,
23930        finality: Finality,
23931        method_name: ::std::string::String,
23932        request_type: CallFunctionByFinalityRequestType,
23933    },
23934    ViewGlobalContractCodeByFinality {
23935        code_hash: CryptoHash,
23936        finality: Finality,
23937        request_type: ViewGlobalContractCodeByFinalityRequestType,
23938    },
23939    ViewGlobalContractCodeByAccountIdByFinality {
23940        account_id: AccountId,
23941        finality: Finality,
23942        request_type: ViewGlobalContractCodeByAccountIdByFinalityRequestType,
23943    },
23944    ViewAccountBySyncCheckpoint {
23945        account_id: AccountId,
23946        request_type: ViewAccountBySyncCheckpointRequestType,
23947        sync_checkpoint: SyncCheckpoint,
23948    },
23949    ViewCodeBySyncCheckpoint {
23950        account_id: AccountId,
23951        request_type: ViewCodeBySyncCheckpointRequestType,
23952        sync_checkpoint: SyncCheckpoint,
23953    },
23954    ViewStateBySyncCheckpoint {
23955        account_id: AccountId,
23956        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
23957        include_proof: ::std::option::Option<bool>,
23958        prefix_base64: StoreKey,
23959        request_type: ViewStateBySyncCheckpointRequestType,
23960        sync_checkpoint: SyncCheckpoint,
23961    },
23962    ViewAccessKeyBySyncCheckpoint {
23963        account_id: AccountId,
23964        public_key: PublicKey,
23965        request_type: ViewAccessKeyBySyncCheckpointRequestType,
23966        sync_checkpoint: SyncCheckpoint,
23967    },
23968    ViewAccessKeyListBySyncCheckpoint {
23969        account_id: AccountId,
23970        request_type: ViewAccessKeyListBySyncCheckpointRequestType,
23971        sync_checkpoint: SyncCheckpoint,
23972    },
23973    CallFunctionBySyncCheckpoint {
23974        account_id: AccountId,
23975        args_base64: FunctionArgs,
23976        method_name: ::std::string::String,
23977        request_type: CallFunctionBySyncCheckpointRequestType,
23978        sync_checkpoint: SyncCheckpoint,
23979    },
23980    ViewGlobalContractCodeBySyncCheckpoint {
23981        code_hash: CryptoHash,
23982        request_type: ViewGlobalContractCodeBySyncCheckpointRequestType,
23983        sync_checkpoint: SyncCheckpoint,
23984    },
23985    ViewGlobalContractCodeByAccountIdBySyncCheckpoint {
23986        account_id: AccountId,
23987        request_type: ViewGlobalContractCodeByAccountIdBySyncCheckpointRequestType,
23988        sync_checkpoint: SyncCheckpoint,
23989    },
23990}
23991impl ::std::convert::From<&Self> for RpcQueryRequest {
23992    fn from(value: &RpcQueryRequest) -> Self {
23993        value.clone()
23994    }
23995}
23996#[doc = "`RpcQueryResponse`"]
23997#[doc = r""]
23998#[doc = r" <details><summary>JSON schema</summary>"]
23999#[doc = r""]
24000#[doc = r" ```json"]
24001#[doc = "{"]
24002#[doc = "  \"type\": \"object\","]
24003#[doc = "  \"anyOf\": ["]
24004#[doc = "    {"]
24005#[doc = "      \"$ref\": \"#/components/schemas/AccountView\""]
24006#[doc = "    },"]
24007#[doc = "    {"]
24008#[doc = "      \"$ref\": \"#/components/schemas/ContractCodeView\""]
24009#[doc = "    },"]
24010#[doc = "    {"]
24011#[doc = "      \"$ref\": \"#/components/schemas/ViewStateResult\""]
24012#[doc = "    },"]
24013#[doc = "    {"]
24014#[doc = "      \"$ref\": \"#/components/schemas/CallResult\""]
24015#[doc = "    },"]
24016#[doc = "    {"]
24017#[doc = "      \"$ref\": \"#/components/schemas/AccessKeyView\""]
24018#[doc = "    },"]
24019#[doc = "    {"]
24020#[doc = "      \"$ref\": \"#/components/schemas/AccessKeyList\""]
24021#[doc = "    }"]
24022#[doc = "  ],"]
24023#[doc = "  \"required\": ["]
24024#[doc = "    \"block_hash\","]
24025#[doc = "    \"block_height\""]
24026#[doc = "  ],"]
24027#[doc = "  \"properties\": {"]
24028#[doc = "    \"block_hash\": {"]
24029#[doc = "      \"$ref\": \"#/components/schemas/CryptoHash\""]
24030#[doc = "    },"]
24031#[doc = "    \"block_height\": {"]
24032#[doc = "      \"type\": \"integer\","]
24033#[doc = "      \"format\": \"uint64\","]
24034#[doc = "      \"minimum\": 0.0"]
24035#[doc = "    }"]
24036#[doc = "  }"]
24037#[doc = "}"]
24038#[doc = r" ```"]
24039#[doc = r" </details>"]
24040#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
24041#[serde(untagged)]
24042pub enum RpcQueryResponse {
24043    Variant0 {
24044        amount: NearToken,
24045        block_hash: CryptoHash,
24046        block_height: u64,
24047        code_hash: CryptoHash,
24048        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
24049        global_contract_account_id: ::std::option::Option<AccountId>,
24050        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
24051        global_contract_hash: ::std::option::Option<CryptoHash>,
24052        locked: NearToken,
24053        #[doc = "TODO(2271): deprecated."]
24054        #[serde(default)]
24055        storage_paid_at: u64,
24056        storage_usage: u64,
24057    },
24058    Variant1 {
24059        block_hash: CryptoHash,
24060        block_height: u64,
24061        code_base64: ::std::string::String,
24062        hash: CryptoHash,
24063    },
24064    Variant2 {
24065        block_hash: CryptoHash,
24066        block_height: u64,
24067        #[serde(default, skip_serializing_if = "::std::vec::Vec::is_empty")]
24068        proof: ::std::vec::Vec<::std::string::String>,
24069        values: ::std::vec::Vec<StateItem>,
24070    },
24071    Variant3 {
24072        block_hash: CryptoHash,
24073        block_height: u64,
24074        logs: ::std::vec::Vec<::std::string::String>,
24075        result: ::std::vec::Vec<u8>,
24076    },
24077    Variant4 {
24078        block_hash: CryptoHash,
24079        block_height: u64,
24080        nonce: u64,
24081        permission: AccessKeyPermissionView,
24082    },
24083    Variant5 {
24084        block_hash: CryptoHash,
24085        block_height: u64,
24086        keys: ::std::vec::Vec<AccessKeyInfoView>,
24087    },
24088}
24089impl ::std::convert::From<&Self> for RpcQueryResponse {
24090    fn from(value: &RpcQueryResponse) -> Self {
24091        value.clone()
24092    }
24093}
24094#[doc = "`RpcReceiptError`"]
24095#[doc = r""]
24096#[doc = r" <details><summary>JSON schema</summary>"]
24097#[doc = r""]
24098#[doc = r" ```json"]
24099#[doc = "{"]
24100#[doc = "  \"oneOf\": ["]
24101#[doc = "    {"]
24102#[doc = "      \"type\": \"object\","]
24103#[doc = "      \"required\": ["]
24104#[doc = "        \"info\","]
24105#[doc = "        \"name\""]
24106#[doc = "      ],"]
24107#[doc = "      \"properties\": {"]
24108#[doc = "        \"info\": {"]
24109#[doc = "          \"type\": \"object\","]
24110#[doc = "          \"required\": ["]
24111#[doc = "            \"error_message\""]
24112#[doc = "          ],"]
24113#[doc = "          \"properties\": {"]
24114#[doc = "            \"error_message\": {"]
24115#[doc = "              \"type\": \"string\""]
24116#[doc = "            }"]
24117#[doc = "          }"]
24118#[doc = "        },"]
24119#[doc = "        \"name\": {"]
24120#[doc = "          \"type\": \"string\","]
24121#[doc = "          \"enum\": ["]
24122#[doc = "            \"INTERNAL_ERROR\""]
24123#[doc = "          ]"]
24124#[doc = "        }"]
24125#[doc = "      }"]
24126#[doc = "    },"]
24127#[doc = "    {"]
24128#[doc = "      \"type\": \"object\","]
24129#[doc = "      \"required\": ["]
24130#[doc = "        \"info\","]
24131#[doc = "        \"name\""]
24132#[doc = "      ],"]
24133#[doc = "      \"properties\": {"]
24134#[doc = "        \"info\": {"]
24135#[doc = "          \"type\": \"object\","]
24136#[doc = "          \"required\": ["]
24137#[doc = "            \"receipt_id\""]
24138#[doc = "          ],"]
24139#[doc = "          \"properties\": {"]
24140#[doc = "            \"receipt_id\": {"]
24141#[doc = "              \"$ref\": \"#/components/schemas/CryptoHash\""]
24142#[doc = "            }"]
24143#[doc = "          }"]
24144#[doc = "        },"]
24145#[doc = "        \"name\": {"]
24146#[doc = "          \"type\": \"string\","]
24147#[doc = "          \"enum\": ["]
24148#[doc = "            \"UNKNOWN_RECEIPT\""]
24149#[doc = "          ]"]
24150#[doc = "        }"]
24151#[doc = "      }"]
24152#[doc = "    }"]
24153#[doc = "  ]"]
24154#[doc = "}"]
24155#[doc = r" ```"]
24156#[doc = r" </details>"]
24157#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
24158#[serde(tag = "name", content = "info")]
24159pub enum RpcReceiptError {
24160    #[serde(rename = "INTERNAL_ERROR")]
24161    InternalError {
24162        error_message: ::std::string::String,
24163    },
24164    #[serde(rename = "UNKNOWN_RECEIPT")]
24165    UnknownReceipt { receipt_id: CryptoHash },
24166}
24167impl ::std::convert::From<&Self> for RpcReceiptError {
24168    fn from(value: &RpcReceiptError) -> Self {
24169        value.clone()
24170    }
24171}
24172#[doc = "`RpcReceiptRequest`"]
24173#[doc = r""]
24174#[doc = r" <details><summary>JSON schema</summary>"]
24175#[doc = r""]
24176#[doc = r" ```json"]
24177#[doc = "{"]
24178#[doc = "  \"title\": \"RpcReceiptRequest\","]
24179#[doc = "  \"type\": \"object\","]
24180#[doc = "  \"required\": ["]
24181#[doc = "    \"receipt_id\""]
24182#[doc = "  ],"]
24183#[doc = "  \"properties\": {"]
24184#[doc = "    \"receipt_id\": {"]
24185#[doc = "      \"$ref\": \"#/components/schemas/CryptoHash\""]
24186#[doc = "    }"]
24187#[doc = "  }"]
24188#[doc = "}"]
24189#[doc = r" ```"]
24190#[doc = r" </details>"]
24191#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
24192pub struct RpcReceiptRequest {
24193    pub receipt_id: CryptoHash,
24194}
24195impl ::std::convert::From<&RpcReceiptRequest> for RpcReceiptRequest {
24196    fn from(value: &RpcReceiptRequest) -> Self {
24197        value.clone()
24198    }
24199}
24200#[doc = "`RpcReceiptResponse`"]
24201#[doc = r""]
24202#[doc = r" <details><summary>JSON schema</summary>"]
24203#[doc = r""]
24204#[doc = r" ```json"]
24205#[doc = "{"]
24206#[doc = "  \"type\": \"object\","]
24207#[doc = "  \"required\": ["]
24208#[doc = "    \"predecessor_id\","]
24209#[doc = "    \"receipt\","]
24210#[doc = "    \"receipt_id\","]
24211#[doc = "    \"receiver_id\""]
24212#[doc = "  ],"]
24213#[doc = "  \"properties\": {"]
24214#[doc = "    \"predecessor_id\": {"]
24215#[doc = "      \"$ref\": \"#/components/schemas/AccountId\""]
24216#[doc = "    },"]
24217#[doc = "    \"priority\": {"]
24218#[doc = "      \"default\": 0,"]
24219#[doc = "      \"type\": \"integer\","]
24220#[doc = "      \"format\": \"uint64\","]
24221#[doc = "      \"minimum\": 0.0"]
24222#[doc = "    },"]
24223#[doc = "    \"receipt\": {"]
24224#[doc = "      \"$ref\": \"#/components/schemas/ReceiptEnumView\""]
24225#[doc = "    },"]
24226#[doc = "    \"receipt_id\": {"]
24227#[doc = "      \"$ref\": \"#/components/schemas/CryptoHash\""]
24228#[doc = "    },"]
24229#[doc = "    \"receiver_id\": {"]
24230#[doc = "      \"$ref\": \"#/components/schemas/AccountId\""]
24231#[doc = "    }"]
24232#[doc = "  }"]
24233#[doc = "}"]
24234#[doc = r" ```"]
24235#[doc = r" </details>"]
24236#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
24237pub struct RpcReceiptResponse {
24238    pub predecessor_id: AccountId,
24239    #[serde(default)]
24240    pub priority: u64,
24241    pub receipt: ReceiptEnumView,
24242    pub receipt_id: CryptoHash,
24243    pub receiver_id: AccountId,
24244}
24245impl ::std::convert::From<&RpcReceiptResponse> for RpcReceiptResponse {
24246    fn from(value: &RpcReceiptResponse) -> Self {
24247        value.clone()
24248    }
24249}
24250#[doc = "`RpcRequestValidationErrorKind`"]
24251#[doc = r""]
24252#[doc = r" <details><summary>JSON schema</summary>"]
24253#[doc = r""]
24254#[doc = r" ```json"]
24255#[doc = "{"]
24256#[doc = "  \"oneOf\": ["]
24257#[doc = "    {"]
24258#[doc = "      \"type\": \"object\","]
24259#[doc = "      \"required\": ["]
24260#[doc = "        \"info\","]
24261#[doc = "        \"name\""]
24262#[doc = "      ],"]
24263#[doc = "      \"properties\": {"]
24264#[doc = "        \"info\": {"]
24265#[doc = "          \"type\": \"object\","]
24266#[doc = "          \"required\": ["]
24267#[doc = "            \"method_name\""]
24268#[doc = "          ],"]
24269#[doc = "          \"properties\": {"]
24270#[doc = "            \"method_name\": {"]
24271#[doc = "              \"type\": \"string\""]
24272#[doc = "            }"]
24273#[doc = "          }"]
24274#[doc = "        },"]
24275#[doc = "        \"name\": {"]
24276#[doc = "          \"type\": \"string\","]
24277#[doc = "          \"enum\": ["]
24278#[doc = "            \"METHOD_NOT_FOUND\""]
24279#[doc = "          ]"]
24280#[doc = "        }"]
24281#[doc = "      }"]
24282#[doc = "    },"]
24283#[doc = "    {"]
24284#[doc = "      \"type\": \"object\","]
24285#[doc = "      \"required\": ["]
24286#[doc = "        \"info\","]
24287#[doc = "        \"name\""]
24288#[doc = "      ],"]
24289#[doc = "      \"properties\": {"]
24290#[doc = "        \"info\": {"]
24291#[doc = "          \"type\": \"object\","]
24292#[doc = "          \"required\": ["]
24293#[doc = "            \"error_message\""]
24294#[doc = "          ],"]
24295#[doc = "          \"properties\": {"]
24296#[doc = "            \"error_message\": {"]
24297#[doc = "              \"type\": \"string\""]
24298#[doc = "            }"]
24299#[doc = "          }"]
24300#[doc = "        },"]
24301#[doc = "        \"name\": {"]
24302#[doc = "          \"type\": \"string\","]
24303#[doc = "          \"enum\": ["]
24304#[doc = "            \"PARSE_ERROR\""]
24305#[doc = "          ]"]
24306#[doc = "        }"]
24307#[doc = "      }"]
24308#[doc = "    }"]
24309#[doc = "  ]"]
24310#[doc = "}"]
24311#[doc = r" ```"]
24312#[doc = r" </details>"]
24313#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
24314#[serde(tag = "name", content = "info")]
24315pub enum RpcRequestValidationErrorKind {
24316    #[serde(rename = "METHOD_NOT_FOUND")]
24317    MethodNotFound { method_name: ::std::string::String },
24318    #[serde(rename = "PARSE_ERROR")]
24319    ParseError {
24320        error_message: ::std::string::String,
24321    },
24322}
24323impl ::std::convert::From<&Self> for RpcRequestValidationErrorKind {
24324    fn from(value: &RpcRequestValidationErrorKind) -> Self {
24325        value.clone()
24326    }
24327}
24328#[doc = "`RpcSendTransactionRequest`"]
24329#[doc = r""]
24330#[doc = r" <details><summary>JSON schema</summary>"]
24331#[doc = r""]
24332#[doc = r" ```json"]
24333#[doc = "{"]
24334#[doc = "  \"title\": \"RpcSendTransactionRequest\","]
24335#[doc = "  \"type\": \"object\","]
24336#[doc = "  \"required\": ["]
24337#[doc = "    \"signed_tx_base64\""]
24338#[doc = "  ],"]
24339#[doc = "  \"properties\": {"]
24340#[doc = "    \"signed_tx_base64\": {"]
24341#[doc = "      \"$ref\": \"#/components/schemas/SignedTransaction\""]
24342#[doc = "    },"]
24343#[doc = "    \"wait_until\": {"]
24344#[doc = "      \"default\": \"EXECUTED_OPTIMISTIC\","]
24345#[doc = "      \"allOf\": ["]
24346#[doc = "        {"]
24347#[doc = "          \"$ref\": \"#/components/schemas/TxExecutionStatus\""]
24348#[doc = "        }"]
24349#[doc = "      ]"]
24350#[doc = "    }"]
24351#[doc = "  }"]
24352#[doc = "}"]
24353#[doc = r" ```"]
24354#[doc = r" </details>"]
24355#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
24356pub struct RpcSendTransactionRequest {
24357    pub signed_tx_base64: SignedTransaction,
24358    #[serde(default = "defaults::rpc_send_transaction_request_wait_until")]
24359    pub wait_until: TxExecutionStatus,
24360}
24361impl ::std::convert::From<&RpcSendTransactionRequest> for RpcSendTransactionRequest {
24362    fn from(value: &RpcSendTransactionRequest) -> Self {
24363        value.clone()
24364    }
24365}
24366#[doc = "`RpcSplitStorageInfoError`"]
24367#[doc = r""]
24368#[doc = r" <details><summary>JSON schema</summary>"]
24369#[doc = r""]
24370#[doc = r" ```json"]
24371#[doc = "{"]
24372#[doc = "  \"oneOf\": ["]
24373#[doc = "    {"]
24374#[doc = "      \"type\": \"object\","]
24375#[doc = "      \"required\": ["]
24376#[doc = "        \"info\","]
24377#[doc = "        \"name\""]
24378#[doc = "      ],"]
24379#[doc = "      \"properties\": {"]
24380#[doc = "        \"info\": {"]
24381#[doc = "          \"type\": \"object\","]
24382#[doc = "          \"required\": ["]
24383#[doc = "            \"error_message\""]
24384#[doc = "          ],"]
24385#[doc = "          \"properties\": {"]
24386#[doc = "            \"error_message\": {"]
24387#[doc = "              \"type\": \"string\""]
24388#[doc = "            }"]
24389#[doc = "          }"]
24390#[doc = "        },"]
24391#[doc = "        \"name\": {"]
24392#[doc = "          \"type\": \"string\","]
24393#[doc = "          \"enum\": ["]
24394#[doc = "            \"INTERNAL_ERROR\""]
24395#[doc = "          ]"]
24396#[doc = "        }"]
24397#[doc = "      }"]
24398#[doc = "    }"]
24399#[doc = "  ]"]
24400#[doc = "}"]
24401#[doc = r" ```"]
24402#[doc = r" </details>"]
24403#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
24404#[serde(tag = "name", content = "info")]
24405pub enum RpcSplitStorageInfoError {
24406    #[serde(rename = "INTERNAL_ERROR")]
24407    InternalError {
24408        error_message: ::std::string::String,
24409    },
24410}
24411impl ::std::convert::From<&Self> for RpcSplitStorageInfoError {
24412    fn from(value: &RpcSplitStorageInfoError) -> Self {
24413        value.clone()
24414    }
24415}
24416#[doc = "`RpcSplitStorageInfoRequest`"]
24417#[doc = r""]
24418#[doc = r" <details><summary>JSON schema</summary>"]
24419#[doc = r""]
24420#[doc = r" ```json"]
24421#[doc = "{"]
24422#[doc = "  \"title\": \"RpcSplitStorageInfoRequest\","]
24423#[doc = "  \"type\": \"object\""]
24424#[doc = "}"]
24425#[doc = r" ```"]
24426#[doc = r" </details>"]
24427#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
24428#[serde(transparent)]
24429pub struct RpcSplitStorageInfoRequest(
24430    pub ::serde_json::Map<::std::string::String, ::serde_json::Value>,
24431);
24432impl ::std::ops::Deref for RpcSplitStorageInfoRequest {
24433    type Target = ::serde_json::Map<::std::string::String, ::serde_json::Value>;
24434    fn deref(&self) -> &::serde_json::Map<::std::string::String, ::serde_json::Value> {
24435        &self.0
24436    }
24437}
24438impl ::std::convert::From<RpcSplitStorageInfoRequest>
24439    for ::serde_json::Map<::std::string::String, ::serde_json::Value>
24440{
24441    fn from(value: RpcSplitStorageInfoRequest) -> Self {
24442        value.0
24443    }
24444}
24445impl ::std::convert::From<&RpcSplitStorageInfoRequest> for RpcSplitStorageInfoRequest {
24446    fn from(value: &RpcSplitStorageInfoRequest) -> Self {
24447        value.clone()
24448    }
24449}
24450impl ::std::convert::From<::serde_json::Map<::std::string::String, ::serde_json::Value>>
24451    for RpcSplitStorageInfoRequest
24452{
24453    fn from(value: ::serde_json::Map<::std::string::String, ::serde_json::Value>) -> Self {
24454        Self(value)
24455    }
24456}
24457#[doc = "Contains the split storage information."]
24458#[doc = r""]
24459#[doc = r" <details><summary>JSON schema</summary>"]
24460#[doc = r""]
24461#[doc = r" ```json"]
24462#[doc = "{"]
24463#[doc = "  \"description\": \"Contains the split storage information.\","]
24464#[doc = "  \"type\": \"object\","]
24465#[doc = "  \"properties\": {"]
24466#[doc = "    \"cold_head_height\": {"]
24467#[doc = "      \"type\": ["]
24468#[doc = "        \"integer\","]
24469#[doc = "        \"null\""]
24470#[doc = "      ],"]
24471#[doc = "      \"format\": \"uint64\","]
24472#[doc = "      \"minimum\": 0.0"]
24473#[doc = "    },"]
24474#[doc = "    \"final_head_height\": {"]
24475#[doc = "      \"type\": ["]
24476#[doc = "        \"integer\","]
24477#[doc = "        \"null\""]
24478#[doc = "      ],"]
24479#[doc = "      \"format\": \"uint64\","]
24480#[doc = "      \"minimum\": 0.0"]
24481#[doc = "    },"]
24482#[doc = "    \"head_height\": {"]
24483#[doc = "      \"type\": ["]
24484#[doc = "        \"integer\","]
24485#[doc = "        \"null\""]
24486#[doc = "      ],"]
24487#[doc = "      \"format\": \"uint64\","]
24488#[doc = "      \"minimum\": 0.0"]
24489#[doc = "    },"]
24490#[doc = "    \"hot_db_kind\": {"]
24491#[doc = "      \"type\": ["]
24492#[doc = "        \"string\","]
24493#[doc = "        \"null\""]
24494#[doc = "      ]"]
24495#[doc = "    }"]
24496#[doc = "  }"]
24497#[doc = "}"]
24498#[doc = r" ```"]
24499#[doc = r" </details>"]
24500#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
24501pub struct RpcSplitStorageInfoResponse {
24502    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
24503    pub cold_head_height: ::std::option::Option<u64>,
24504    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
24505    pub final_head_height: ::std::option::Option<u64>,
24506    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
24507    pub head_height: ::std::option::Option<u64>,
24508    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
24509    pub hot_db_kind: ::std::option::Option<::std::string::String>,
24510}
24511impl ::std::convert::From<&RpcSplitStorageInfoResponse> for RpcSplitStorageInfoResponse {
24512    fn from(value: &RpcSplitStorageInfoResponse) -> Self {
24513        value.clone()
24514    }
24515}
24516impl ::std::default::Default for RpcSplitStorageInfoResponse {
24517    fn default() -> Self {
24518        Self {
24519            cold_head_height: Default::default(),
24520            final_head_height: Default::default(),
24521            head_height: Default::default(),
24522            hot_db_kind: Default::default(),
24523        }
24524    }
24525}
24526#[doc = "`RpcStateChangesError`"]
24527#[doc = r""]
24528#[doc = r" <details><summary>JSON schema</summary>"]
24529#[doc = r""]
24530#[doc = r" ```json"]
24531#[doc = "{"]
24532#[doc = "  \"oneOf\": ["]
24533#[doc = "    {"]
24534#[doc = "      \"type\": \"object\","]
24535#[doc = "      \"required\": ["]
24536#[doc = "        \"info\","]
24537#[doc = "        \"name\""]
24538#[doc = "      ],"]
24539#[doc = "      \"properties\": {"]
24540#[doc = "        \"info\": {"]
24541#[doc = "          \"type\": \"object\""]
24542#[doc = "        },"]
24543#[doc = "        \"name\": {"]
24544#[doc = "          \"type\": \"string\","]
24545#[doc = "          \"enum\": ["]
24546#[doc = "            \"UNKNOWN_BLOCK\""]
24547#[doc = "          ]"]
24548#[doc = "        }"]
24549#[doc = "      }"]
24550#[doc = "    },"]
24551#[doc = "    {"]
24552#[doc = "      \"type\": \"object\","]
24553#[doc = "      \"required\": ["]
24554#[doc = "        \"name\""]
24555#[doc = "      ],"]
24556#[doc = "      \"properties\": {"]
24557#[doc = "        \"name\": {"]
24558#[doc = "          \"type\": \"string\","]
24559#[doc = "          \"enum\": ["]
24560#[doc = "            \"NOT_SYNCED_YET\""]
24561#[doc = "          ]"]
24562#[doc = "        }"]
24563#[doc = "      }"]
24564#[doc = "    },"]
24565#[doc = "    {"]
24566#[doc = "      \"type\": \"object\","]
24567#[doc = "      \"required\": ["]
24568#[doc = "        \"info\","]
24569#[doc = "        \"name\""]
24570#[doc = "      ],"]
24571#[doc = "      \"properties\": {"]
24572#[doc = "        \"info\": {"]
24573#[doc = "          \"type\": \"object\","]
24574#[doc = "          \"required\": ["]
24575#[doc = "            \"error_message\""]
24576#[doc = "          ],"]
24577#[doc = "          \"properties\": {"]
24578#[doc = "            \"error_message\": {"]
24579#[doc = "              \"type\": \"string\""]
24580#[doc = "            }"]
24581#[doc = "          }"]
24582#[doc = "        },"]
24583#[doc = "        \"name\": {"]
24584#[doc = "          \"type\": \"string\","]
24585#[doc = "          \"enum\": ["]
24586#[doc = "            \"INTERNAL_ERROR\""]
24587#[doc = "          ]"]
24588#[doc = "        }"]
24589#[doc = "      }"]
24590#[doc = "    }"]
24591#[doc = "  ]"]
24592#[doc = "}"]
24593#[doc = r" ```"]
24594#[doc = r" </details>"]
24595#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
24596#[serde(tag = "name", content = "info")]
24597pub enum RpcStateChangesError {
24598    #[serde(rename = "UNKNOWN_BLOCK")]
24599    UnknownBlock(::serde_json::Map<::std::string::String, ::serde_json::Value>),
24600    #[serde(rename = "NOT_SYNCED_YET")]
24601    NotSyncedYet,
24602    #[serde(rename = "INTERNAL_ERROR")]
24603    InternalError {
24604        error_message: ::std::string::String,
24605    },
24606}
24607impl ::std::convert::From<&Self> for RpcStateChangesError {
24608    fn from(value: &RpcStateChangesError) -> Self {
24609        value.clone()
24610    }
24611}
24612impl ::std::convert::From<::serde_json::Map<::std::string::String, ::serde_json::Value>>
24613    for RpcStateChangesError
24614{
24615    fn from(value: ::serde_json::Map<::std::string::String, ::serde_json::Value>) -> Self {
24616        Self::UnknownBlock(value)
24617    }
24618}
24619#[doc = "It is a [serializable view] of [`StateChangesRequest`].\n\n[serializable view]: ./index.html\n[`StateChangesRequest`]: ../types/struct.StateChangesRequest.html"]
24620#[doc = r""]
24621#[doc = r" <details><summary>JSON schema</summary>"]
24622#[doc = r""]
24623#[doc = r" ```json"]
24624#[doc = "{"]
24625#[doc = "  \"title\": \"RpcStateChangesInBlockByTypeRequest\","]
24626#[doc = "  \"description\": \"It is a [serializable view] of [`StateChangesRequest`].\\n\\n[serializable view]: ./index.html\\n[`StateChangesRequest`]: ../types/struct.StateChangesRequest.html\","]
24627#[doc = "  \"type\": \"object\","]
24628#[doc = "  \"oneOf\": ["]
24629#[doc = "    {"]
24630#[doc = "      \"title\": \"account_changes_by_block_id\","]
24631#[doc = "      \"allOf\": ["]
24632#[doc = "        {"]
24633#[doc = "          \"type\": \"object\","]
24634#[doc = "          \"required\": ["]
24635#[doc = "            \"block_id\""]
24636#[doc = "          ],"]
24637#[doc = "          \"properties\": {"]
24638#[doc = "            \"block_id\": {"]
24639#[doc = "              \"$ref\": \"#/components/schemas/BlockId\""]
24640#[doc = "            }"]
24641#[doc = "          }"]
24642#[doc = "        },"]
24643#[doc = "        {"]
24644#[doc = "          \"type\": \"object\","]
24645#[doc = "          \"required\": ["]
24646#[doc = "            \"account_ids\","]
24647#[doc = "            \"changes_type\""]
24648#[doc = "          ],"]
24649#[doc = "          \"properties\": {"]
24650#[doc = "            \"account_ids\": {"]
24651#[doc = "              \"type\": \"array\","]
24652#[doc = "              \"items\": {"]
24653#[doc = "                \"$ref\": \"#/components/schemas/AccountId\""]
24654#[doc = "              }"]
24655#[doc = "            },"]
24656#[doc = "            \"changes_type\": {"]
24657#[doc = "              \"type\": \"string\","]
24658#[doc = "              \"enum\": ["]
24659#[doc = "                \"account_changes\""]
24660#[doc = "              ]"]
24661#[doc = "            }"]
24662#[doc = "          }"]
24663#[doc = "        }"]
24664#[doc = "      ]"]
24665#[doc = "    },"]
24666#[doc = "    {"]
24667#[doc = "      \"title\": \"single_access_key_changes_by_block_id\","]
24668#[doc = "      \"allOf\": ["]
24669#[doc = "        {"]
24670#[doc = "          \"type\": \"object\","]
24671#[doc = "          \"required\": ["]
24672#[doc = "            \"block_id\""]
24673#[doc = "          ],"]
24674#[doc = "          \"properties\": {"]
24675#[doc = "            \"block_id\": {"]
24676#[doc = "              \"$ref\": \"#/components/schemas/BlockId\""]
24677#[doc = "            }"]
24678#[doc = "          }"]
24679#[doc = "        },"]
24680#[doc = "        {"]
24681#[doc = "          \"type\": \"object\","]
24682#[doc = "          \"required\": ["]
24683#[doc = "            \"changes_type\","]
24684#[doc = "            \"keys\""]
24685#[doc = "          ],"]
24686#[doc = "          \"properties\": {"]
24687#[doc = "            \"changes_type\": {"]
24688#[doc = "              \"type\": \"string\","]
24689#[doc = "              \"enum\": ["]
24690#[doc = "                \"single_access_key_changes\""]
24691#[doc = "              ]"]
24692#[doc = "            },"]
24693#[doc = "            \"keys\": {"]
24694#[doc = "              \"type\": \"array\","]
24695#[doc = "              \"items\": {"]
24696#[doc = "                \"$ref\": \"#/components/schemas/AccountWithPublicKey\""]
24697#[doc = "              }"]
24698#[doc = "            }"]
24699#[doc = "          }"]
24700#[doc = "        }"]
24701#[doc = "      ]"]
24702#[doc = "    },"]
24703#[doc = "    {"]
24704#[doc = "      \"title\": \"single_gas_key_changes_by_block_id\","]
24705#[doc = "      \"allOf\": ["]
24706#[doc = "        {"]
24707#[doc = "          \"type\": \"object\","]
24708#[doc = "          \"required\": ["]
24709#[doc = "            \"block_id\""]
24710#[doc = "          ],"]
24711#[doc = "          \"properties\": {"]
24712#[doc = "            \"block_id\": {"]
24713#[doc = "              \"$ref\": \"#/components/schemas/BlockId\""]
24714#[doc = "            }"]
24715#[doc = "          }"]
24716#[doc = "        },"]
24717#[doc = "        {"]
24718#[doc = "          \"type\": \"object\","]
24719#[doc = "          \"required\": ["]
24720#[doc = "            \"changes_type\","]
24721#[doc = "            \"keys\""]
24722#[doc = "          ],"]
24723#[doc = "          \"properties\": {"]
24724#[doc = "            \"changes_type\": {"]
24725#[doc = "              \"type\": \"string\","]
24726#[doc = "              \"enum\": ["]
24727#[doc = "                \"single_gas_key_changes\""]
24728#[doc = "              ]"]
24729#[doc = "            },"]
24730#[doc = "            \"keys\": {"]
24731#[doc = "              \"type\": \"array\","]
24732#[doc = "              \"items\": {"]
24733#[doc = "                \"$ref\": \"#/components/schemas/AccountWithPublicKey\""]
24734#[doc = "              }"]
24735#[doc = "            }"]
24736#[doc = "          }"]
24737#[doc = "        }"]
24738#[doc = "      ]"]
24739#[doc = "    },"]
24740#[doc = "    {"]
24741#[doc = "      \"title\": \"all_access_key_changes_by_block_id\","]
24742#[doc = "      \"allOf\": ["]
24743#[doc = "        {"]
24744#[doc = "          \"type\": \"object\","]
24745#[doc = "          \"required\": ["]
24746#[doc = "            \"block_id\""]
24747#[doc = "          ],"]
24748#[doc = "          \"properties\": {"]
24749#[doc = "            \"block_id\": {"]
24750#[doc = "              \"$ref\": \"#/components/schemas/BlockId\""]
24751#[doc = "            }"]
24752#[doc = "          }"]
24753#[doc = "        },"]
24754#[doc = "        {"]
24755#[doc = "          \"type\": \"object\","]
24756#[doc = "          \"required\": ["]
24757#[doc = "            \"account_ids\","]
24758#[doc = "            \"changes_type\""]
24759#[doc = "          ],"]
24760#[doc = "          \"properties\": {"]
24761#[doc = "            \"account_ids\": {"]
24762#[doc = "              \"type\": \"array\","]
24763#[doc = "              \"items\": {"]
24764#[doc = "                \"$ref\": \"#/components/schemas/AccountId\""]
24765#[doc = "              }"]
24766#[doc = "            },"]
24767#[doc = "            \"changes_type\": {"]
24768#[doc = "              \"type\": \"string\","]
24769#[doc = "              \"enum\": ["]
24770#[doc = "                \"all_access_key_changes\""]
24771#[doc = "              ]"]
24772#[doc = "            }"]
24773#[doc = "          }"]
24774#[doc = "        }"]
24775#[doc = "      ]"]
24776#[doc = "    },"]
24777#[doc = "    {"]
24778#[doc = "      \"title\": \"all_gas_key_changes_by_block_id\","]
24779#[doc = "      \"allOf\": ["]
24780#[doc = "        {"]
24781#[doc = "          \"type\": \"object\","]
24782#[doc = "          \"required\": ["]
24783#[doc = "            \"block_id\""]
24784#[doc = "          ],"]
24785#[doc = "          \"properties\": {"]
24786#[doc = "            \"block_id\": {"]
24787#[doc = "              \"$ref\": \"#/components/schemas/BlockId\""]
24788#[doc = "            }"]
24789#[doc = "          }"]
24790#[doc = "        },"]
24791#[doc = "        {"]
24792#[doc = "          \"type\": \"object\","]
24793#[doc = "          \"required\": ["]
24794#[doc = "            \"account_ids\","]
24795#[doc = "            \"changes_type\""]
24796#[doc = "          ],"]
24797#[doc = "          \"properties\": {"]
24798#[doc = "            \"account_ids\": {"]
24799#[doc = "              \"type\": \"array\","]
24800#[doc = "              \"items\": {"]
24801#[doc = "                \"$ref\": \"#/components/schemas/AccountId\""]
24802#[doc = "              }"]
24803#[doc = "            },"]
24804#[doc = "            \"changes_type\": {"]
24805#[doc = "              \"type\": \"string\","]
24806#[doc = "              \"enum\": ["]
24807#[doc = "                \"all_gas_key_changes\""]
24808#[doc = "              ]"]
24809#[doc = "            }"]
24810#[doc = "          }"]
24811#[doc = "        }"]
24812#[doc = "      ]"]
24813#[doc = "    },"]
24814#[doc = "    {"]
24815#[doc = "      \"title\": \"contract_code_changes_by_block_id\","]
24816#[doc = "      \"allOf\": ["]
24817#[doc = "        {"]
24818#[doc = "          \"type\": \"object\","]
24819#[doc = "          \"required\": ["]
24820#[doc = "            \"block_id\""]
24821#[doc = "          ],"]
24822#[doc = "          \"properties\": {"]
24823#[doc = "            \"block_id\": {"]
24824#[doc = "              \"$ref\": \"#/components/schemas/BlockId\""]
24825#[doc = "            }"]
24826#[doc = "          }"]
24827#[doc = "        },"]
24828#[doc = "        {"]
24829#[doc = "          \"type\": \"object\","]
24830#[doc = "          \"required\": ["]
24831#[doc = "            \"account_ids\","]
24832#[doc = "            \"changes_type\""]
24833#[doc = "          ],"]
24834#[doc = "          \"properties\": {"]
24835#[doc = "            \"account_ids\": {"]
24836#[doc = "              \"type\": \"array\","]
24837#[doc = "              \"items\": {"]
24838#[doc = "                \"$ref\": \"#/components/schemas/AccountId\""]
24839#[doc = "              }"]
24840#[doc = "            },"]
24841#[doc = "            \"changes_type\": {"]
24842#[doc = "              \"type\": \"string\","]
24843#[doc = "              \"enum\": ["]
24844#[doc = "                \"contract_code_changes\""]
24845#[doc = "              ]"]
24846#[doc = "            }"]
24847#[doc = "          }"]
24848#[doc = "        }"]
24849#[doc = "      ]"]
24850#[doc = "    },"]
24851#[doc = "    {"]
24852#[doc = "      \"title\": \"data_changes_by_block_id\","]
24853#[doc = "      \"allOf\": ["]
24854#[doc = "        {"]
24855#[doc = "          \"type\": \"object\","]
24856#[doc = "          \"required\": ["]
24857#[doc = "            \"block_id\""]
24858#[doc = "          ],"]
24859#[doc = "          \"properties\": {"]
24860#[doc = "            \"block_id\": {"]
24861#[doc = "              \"$ref\": \"#/components/schemas/BlockId\""]
24862#[doc = "            }"]
24863#[doc = "          }"]
24864#[doc = "        },"]
24865#[doc = "        {"]
24866#[doc = "          \"type\": \"object\","]
24867#[doc = "          \"required\": ["]
24868#[doc = "            \"account_ids\","]
24869#[doc = "            \"changes_type\","]
24870#[doc = "            \"key_prefix_base64\""]
24871#[doc = "          ],"]
24872#[doc = "          \"properties\": {"]
24873#[doc = "            \"account_ids\": {"]
24874#[doc = "              \"type\": \"array\","]
24875#[doc = "              \"items\": {"]
24876#[doc = "                \"$ref\": \"#/components/schemas/AccountId\""]
24877#[doc = "              }"]
24878#[doc = "            },"]
24879#[doc = "            \"changes_type\": {"]
24880#[doc = "              \"type\": \"string\","]
24881#[doc = "              \"enum\": ["]
24882#[doc = "                \"data_changes\""]
24883#[doc = "              ]"]
24884#[doc = "            },"]
24885#[doc = "            \"key_prefix_base64\": {"]
24886#[doc = "              \"$ref\": \"#/components/schemas/StoreKey\""]
24887#[doc = "            }"]
24888#[doc = "          }"]
24889#[doc = "        }"]
24890#[doc = "      ]"]
24891#[doc = "    },"]
24892#[doc = "    {"]
24893#[doc = "      \"title\": \"account_changes_by_finality\","]
24894#[doc = "      \"allOf\": ["]
24895#[doc = "        {"]
24896#[doc = "          \"type\": \"object\","]
24897#[doc = "          \"required\": ["]
24898#[doc = "            \"finality\""]
24899#[doc = "          ],"]
24900#[doc = "          \"properties\": {"]
24901#[doc = "            \"finality\": {"]
24902#[doc = "              \"$ref\": \"#/components/schemas/Finality\""]
24903#[doc = "            }"]
24904#[doc = "          }"]
24905#[doc = "        },"]
24906#[doc = "        {"]
24907#[doc = "          \"type\": \"object\","]
24908#[doc = "          \"required\": ["]
24909#[doc = "            \"account_ids\","]
24910#[doc = "            \"changes_type\""]
24911#[doc = "          ],"]
24912#[doc = "          \"properties\": {"]
24913#[doc = "            \"account_ids\": {"]
24914#[doc = "              \"type\": \"array\","]
24915#[doc = "              \"items\": {"]
24916#[doc = "                \"$ref\": \"#/components/schemas/AccountId\""]
24917#[doc = "              }"]
24918#[doc = "            },"]
24919#[doc = "            \"changes_type\": {"]
24920#[doc = "              \"type\": \"string\","]
24921#[doc = "              \"enum\": ["]
24922#[doc = "                \"account_changes\""]
24923#[doc = "              ]"]
24924#[doc = "            }"]
24925#[doc = "          }"]
24926#[doc = "        }"]
24927#[doc = "      ]"]
24928#[doc = "    },"]
24929#[doc = "    {"]
24930#[doc = "      \"title\": \"single_access_key_changes_by_finality\","]
24931#[doc = "      \"allOf\": ["]
24932#[doc = "        {"]
24933#[doc = "          \"type\": \"object\","]
24934#[doc = "          \"required\": ["]
24935#[doc = "            \"finality\""]
24936#[doc = "          ],"]
24937#[doc = "          \"properties\": {"]
24938#[doc = "            \"finality\": {"]
24939#[doc = "              \"$ref\": \"#/components/schemas/Finality\""]
24940#[doc = "            }"]
24941#[doc = "          }"]
24942#[doc = "        },"]
24943#[doc = "        {"]
24944#[doc = "          \"type\": \"object\","]
24945#[doc = "          \"required\": ["]
24946#[doc = "            \"changes_type\","]
24947#[doc = "            \"keys\""]
24948#[doc = "          ],"]
24949#[doc = "          \"properties\": {"]
24950#[doc = "            \"changes_type\": {"]
24951#[doc = "              \"type\": \"string\","]
24952#[doc = "              \"enum\": ["]
24953#[doc = "                \"single_access_key_changes\""]
24954#[doc = "              ]"]
24955#[doc = "            },"]
24956#[doc = "            \"keys\": {"]
24957#[doc = "              \"type\": \"array\","]
24958#[doc = "              \"items\": {"]
24959#[doc = "                \"$ref\": \"#/components/schemas/AccountWithPublicKey\""]
24960#[doc = "              }"]
24961#[doc = "            }"]
24962#[doc = "          }"]
24963#[doc = "        }"]
24964#[doc = "      ]"]
24965#[doc = "    },"]
24966#[doc = "    {"]
24967#[doc = "      \"title\": \"single_gas_key_changes_by_finality\","]
24968#[doc = "      \"allOf\": ["]
24969#[doc = "        {"]
24970#[doc = "          \"type\": \"object\","]
24971#[doc = "          \"required\": ["]
24972#[doc = "            \"finality\""]
24973#[doc = "          ],"]
24974#[doc = "          \"properties\": {"]
24975#[doc = "            \"finality\": {"]
24976#[doc = "              \"$ref\": \"#/components/schemas/Finality\""]
24977#[doc = "            }"]
24978#[doc = "          }"]
24979#[doc = "        },"]
24980#[doc = "        {"]
24981#[doc = "          \"type\": \"object\","]
24982#[doc = "          \"required\": ["]
24983#[doc = "            \"changes_type\","]
24984#[doc = "            \"keys\""]
24985#[doc = "          ],"]
24986#[doc = "          \"properties\": {"]
24987#[doc = "            \"changes_type\": {"]
24988#[doc = "              \"type\": \"string\","]
24989#[doc = "              \"enum\": ["]
24990#[doc = "                \"single_gas_key_changes\""]
24991#[doc = "              ]"]
24992#[doc = "            },"]
24993#[doc = "            \"keys\": {"]
24994#[doc = "              \"type\": \"array\","]
24995#[doc = "              \"items\": {"]
24996#[doc = "                \"$ref\": \"#/components/schemas/AccountWithPublicKey\""]
24997#[doc = "              }"]
24998#[doc = "            }"]
24999#[doc = "          }"]
25000#[doc = "        }"]
25001#[doc = "      ]"]
25002#[doc = "    },"]
25003#[doc = "    {"]
25004#[doc = "      \"title\": \"all_access_key_changes_by_finality\","]
25005#[doc = "      \"allOf\": ["]
25006#[doc = "        {"]
25007#[doc = "          \"type\": \"object\","]
25008#[doc = "          \"required\": ["]
25009#[doc = "            \"finality\""]
25010#[doc = "          ],"]
25011#[doc = "          \"properties\": {"]
25012#[doc = "            \"finality\": {"]
25013#[doc = "              \"$ref\": \"#/components/schemas/Finality\""]
25014#[doc = "            }"]
25015#[doc = "          }"]
25016#[doc = "        },"]
25017#[doc = "        {"]
25018#[doc = "          \"type\": \"object\","]
25019#[doc = "          \"required\": ["]
25020#[doc = "            \"account_ids\","]
25021#[doc = "            \"changes_type\""]
25022#[doc = "          ],"]
25023#[doc = "          \"properties\": {"]
25024#[doc = "            \"account_ids\": {"]
25025#[doc = "              \"type\": \"array\","]
25026#[doc = "              \"items\": {"]
25027#[doc = "                \"$ref\": \"#/components/schemas/AccountId\""]
25028#[doc = "              }"]
25029#[doc = "            },"]
25030#[doc = "            \"changes_type\": {"]
25031#[doc = "              \"type\": \"string\","]
25032#[doc = "              \"enum\": ["]
25033#[doc = "                \"all_access_key_changes\""]
25034#[doc = "              ]"]
25035#[doc = "            }"]
25036#[doc = "          }"]
25037#[doc = "        }"]
25038#[doc = "      ]"]
25039#[doc = "    },"]
25040#[doc = "    {"]
25041#[doc = "      \"title\": \"all_gas_key_changes_by_finality\","]
25042#[doc = "      \"allOf\": ["]
25043#[doc = "        {"]
25044#[doc = "          \"type\": \"object\","]
25045#[doc = "          \"required\": ["]
25046#[doc = "            \"finality\""]
25047#[doc = "          ],"]
25048#[doc = "          \"properties\": {"]
25049#[doc = "            \"finality\": {"]
25050#[doc = "              \"$ref\": \"#/components/schemas/Finality\""]
25051#[doc = "            }"]
25052#[doc = "          }"]
25053#[doc = "        },"]
25054#[doc = "        {"]
25055#[doc = "          \"type\": \"object\","]
25056#[doc = "          \"required\": ["]
25057#[doc = "            \"account_ids\","]
25058#[doc = "            \"changes_type\""]
25059#[doc = "          ],"]
25060#[doc = "          \"properties\": {"]
25061#[doc = "            \"account_ids\": {"]
25062#[doc = "              \"type\": \"array\","]
25063#[doc = "              \"items\": {"]
25064#[doc = "                \"$ref\": \"#/components/schemas/AccountId\""]
25065#[doc = "              }"]
25066#[doc = "            },"]
25067#[doc = "            \"changes_type\": {"]
25068#[doc = "              \"type\": \"string\","]
25069#[doc = "              \"enum\": ["]
25070#[doc = "                \"all_gas_key_changes\""]
25071#[doc = "              ]"]
25072#[doc = "            }"]
25073#[doc = "          }"]
25074#[doc = "        }"]
25075#[doc = "      ]"]
25076#[doc = "    },"]
25077#[doc = "    {"]
25078#[doc = "      \"title\": \"contract_code_changes_by_finality\","]
25079#[doc = "      \"allOf\": ["]
25080#[doc = "        {"]
25081#[doc = "          \"type\": \"object\","]
25082#[doc = "          \"required\": ["]
25083#[doc = "            \"finality\""]
25084#[doc = "          ],"]
25085#[doc = "          \"properties\": {"]
25086#[doc = "            \"finality\": {"]
25087#[doc = "              \"$ref\": \"#/components/schemas/Finality\""]
25088#[doc = "            }"]
25089#[doc = "          }"]
25090#[doc = "        },"]
25091#[doc = "        {"]
25092#[doc = "          \"type\": \"object\","]
25093#[doc = "          \"required\": ["]
25094#[doc = "            \"account_ids\","]
25095#[doc = "            \"changes_type\""]
25096#[doc = "          ],"]
25097#[doc = "          \"properties\": {"]
25098#[doc = "            \"account_ids\": {"]
25099#[doc = "              \"type\": \"array\","]
25100#[doc = "              \"items\": {"]
25101#[doc = "                \"$ref\": \"#/components/schemas/AccountId\""]
25102#[doc = "              }"]
25103#[doc = "            },"]
25104#[doc = "            \"changes_type\": {"]
25105#[doc = "              \"type\": \"string\","]
25106#[doc = "              \"enum\": ["]
25107#[doc = "                \"contract_code_changes\""]
25108#[doc = "              ]"]
25109#[doc = "            }"]
25110#[doc = "          }"]
25111#[doc = "        }"]
25112#[doc = "      ]"]
25113#[doc = "    },"]
25114#[doc = "    {"]
25115#[doc = "      \"title\": \"data_changes_by_finality\","]
25116#[doc = "      \"allOf\": ["]
25117#[doc = "        {"]
25118#[doc = "          \"type\": \"object\","]
25119#[doc = "          \"required\": ["]
25120#[doc = "            \"finality\""]
25121#[doc = "          ],"]
25122#[doc = "          \"properties\": {"]
25123#[doc = "            \"finality\": {"]
25124#[doc = "              \"$ref\": \"#/components/schemas/Finality\""]
25125#[doc = "            }"]
25126#[doc = "          }"]
25127#[doc = "        },"]
25128#[doc = "        {"]
25129#[doc = "          \"type\": \"object\","]
25130#[doc = "          \"required\": ["]
25131#[doc = "            \"account_ids\","]
25132#[doc = "            \"changes_type\","]
25133#[doc = "            \"key_prefix_base64\""]
25134#[doc = "          ],"]
25135#[doc = "          \"properties\": {"]
25136#[doc = "            \"account_ids\": {"]
25137#[doc = "              \"type\": \"array\","]
25138#[doc = "              \"items\": {"]
25139#[doc = "                \"$ref\": \"#/components/schemas/AccountId\""]
25140#[doc = "              }"]
25141#[doc = "            },"]
25142#[doc = "            \"changes_type\": {"]
25143#[doc = "              \"type\": \"string\","]
25144#[doc = "              \"enum\": ["]
25145#[doc = "                \"data_changes\""]
25146#[doc = "              ]"]
25147#[doc = "            },"]
25148#[doc = "            \"key_prefix_base64\": {"]
25149#[doc = "              \"$ref\": \"#/components/schemas/StoreKey\""]
25150#[doc = "            }"]
25151#[doc = "          }"]
25152#[doc = "        }"]
25153#[doc = "      ]"]
25154#[doc = "    },"]
25155#[doc = "    {"]
25156#[doc = "      \"title\": \"account_changes_by_sync_checkpoint\","]
25157#[doc = "      \"allOf\": ["]
25158#[doc = "        {"]
25159#[doc = "          \"type\": \"object\","]
25160#[doc = "          \"required\": ["]
25161#[doc = "            \"sync_checkpoint\""]
25162#[doc = "          ],"]
25163#[doc = "          \"properties\": {"]
25164#[doc = "            \"sync_checkpoint\": {"]
25165#[doc = "              \"$ref\": \"#/components/schemas/SyncCheckpoint\""]
25166#[doc = "            }"]
25167#[doc = "          }"]
25168#[doc = "        },"]
25169#[doc = "        {"]
25170#[doc = "          \"type\": \"object\","]
25171#[doc = "          \"required\": ["]
25172#[doc = "            \"account_ids\","]
25173#[doc = "            \"changes_type\""]
25174#[doc = "          ],"]
25175#[doc = "          \"properties\": {"]
25176#[doc = "            \"account_ids\": {"]
25177#[doc = "              \"type\": \"array\","]
25178#[doc = "              \"items\": {"]
25179#[doc = "                \"$ref\": \"#/components/schemas/AccountId\""]
25180#[doc = "              }"]
25181#[doc = "            },"]
25182#[doc = "            \"changes_type\": {"]
25183#[doc = "              \"type\": \"string\","]
25184#[doc = "              \"enum\": ["]
25185#[doc = "                \"account_changes\""]
25186#[doc = "              ]"]
25187#[doc = "            }"]
25188#[doc = "          }"]
25189#[doc = "        }"]
25190#[doc = "      ]"]
25191#[doc = "    },"]
25192#[doc = "    {"]
25193#[doc = "      \"title\": \"single_access_key_changes_by_sync_checkpoint\","]
25194#[doc = "      \"allOf\": ["]
25195#[doc = "        {"]
25196#[doc = "          \"type\": \"object\","]
25197#[doc = "          \"required\": ["]
25198#[doc = "            \"sync_checkpoint\""]
25199#[doc = "          ],"]
25200#[doc = "          \"properties\": {"]
25201#[doc = "            \"sync_checkpoint\": {"]
25202#[doc = "              \"$ref\": \"#/components/schemas/SyncCheckpoint\""]
25203#[doc = "            }"]
25204#[doc = "          }"]
25205#[doc = "        },"]
25206#[doc = "        {"]
25207#[doc = "          \"type\": \"object\","]
25208#[doc = "          \"required\": ["]
25209#[doc = "            \"changes_type\","]
25210#[doc = "            \"keys\""]
25211#[doc = "          ],"]
25212#[doc = "          \"properties\": {"]
25213#[doc = "            \"changes_type\": {"]
25214#[doc = "              \"type\": \"string\","]
25215#[doc = "              \"enum\": ["]
25216#[doc = "                \"single_access_key_changes\""]
25217#[doc = "              ]"]
25218#[doc = "            },"]
25219#[doc = "            \"keys\": {"]
25220#[doc = "              \"type\": \"array\","]
25221#[doc = "              \"items\": {"]
25222#[doc = "                \"$ref\": \"#/components/schemas/AccountWithPublicKey\""]
25223#[doc = "              }"]
25224#[doc = "            }"]
25225#[doc = "          }"]
25226#[doc = "        }"]
25227#[doc = "      ]"]
25228#[doc = "    },"]
25229#[doc = "    {"]
25230#[doc = "      \"title\": \"single_gas_key_changes_by_sync_checkpoint\","]
25231#[doc = "      \"allOf\": ["]
25232#[doc = "        {"]
25233#[doc = "          \"type\": \"object\","]
25234#[doc = "          \"required\": ["]
25235#[doc = "            \"sync_checkpoint\""]
25236#[doc = "          ],"]
25237#[doc = "          \"properties\": {"]
25238#[doc = "            \"sync_checkpoint\": {"]
25239#[doc = "              \"$ref\": \"#/components/schemas/SyncCheckpoint\""]
25240#[doc = "            }"]
25241#[doc = "          }"]
25242#[doc = "        },"]
25243#[doc = "        {"]
25244#[doc = "          \"type\": \"object\","]
25245#[doc = "          \"required\": ["]
25246#[doc = "            \"changes_type\","]
25247#[doc = "            \"keys\""]
25248#[doc = "          ],"]
25249#[doc = "          \"properties\": {"]
25250#[doc = "            \"changes_type\": {"]
25251#[doc = "              \"type\": \"string\","]
25252#[doc = "              \"enum\": ["]
25253#[doc = "                \"single_gas_key_changes\""]
25254#[doc = "              ]"]
25255#[doc = "            },"]
25256#[doc = "            \"keys\": {"]
25257#[doc = "              \"type\": \"array\","]
25258#[doc = "              \"items\": {"]
25259#[doc = "                \"$ref\": \"#/components/schemas/AccountWithPublicKey\""]
25260#[doc = "              }"]
25261#[doc = "            }"]
25262#[doc = "          }"]
25263#[doc = "        }"]
25264#[doc = "      ]"]
25265#[doc = "    },"]
25266#[doc = "    {"]
25267#[doc = "      \"title\": \"all_access_key_changes_by_sync_checkpoint\","]
25268#[doc = "      \"allOf\": ["]
25269#[doc = "        {"]
25270#[doc = "          \"type\": \"object\","]
25271#[doc = "          \"required\": ["]
25272#[doc = "            \"sync_checkpoint\""]
25273#[doc = "          ],"]
25274#[doc = "          \"properties\": {"]
25275#[doc = "            \"sync_checkpoint\": {"]
25276#[doc = "              \"$ref\": \"#/components/schemas/SyncCheckpoint\""]
25277#[doc = "            }"]
25278#[doc = "          }"]
25279#[doc = "        },"]
25280#[doc = "        {"]
25281#[doc = "          \"type\": \"object\","]
25282#[doc = "          \"required\": ["]
25283#[doc = "            \"account_ids\","]
25284#[doc = "            \"changes_type\""]
25285#[doc = "          ],"]
25286#[doc = "          \"properties\": {"]
25287#[doc = "            \"account_ids\": {"]
25288#[doc = "              \"type\": \"array\","]
25289#[doc = "              \"items\": {"]
25290#[doc = "                \"$ref\": \"#/components/schemas/AccountId\""]
25291#[doc = "              }"]
25292#[doc = "            },"]
25293#[doc = "            \"changes_type\": {"]
25294#[doc = "              \"type\": \"string\","]
25295#[doc = "              \"enum\": ["]
25296#[doc = "                \"all_access_key_changes\""]
25297#[doc = "              ]"]
25298#[doc = "            }"]
25299#[doc = "          }"]
25300#[doc = "        }"]
25301#[doc = "      ]"]
25302#[doc = "    },"]
25303#[doc = "    {"]
25304#[doc = "      \"title\": \"all_gas_key_changes_by_sync_checkpoint\","]
25305#[doc = "      \"allOf\": ["]
25306#[doc = "        {"]
25307#[doc = "          \"type\": \"object\","]
25308#[doc = "          \"required\": ["]
25309#[doc = "            \"sync_checkpoint\""]
25310#[doc = "          ],"]
25311#[doc = "          \"properties\": {"]
25312#[doc = "            \"sync_checkpoint\": {"]
25313#[doc = "              \"$ref\": \"#/components/schemas/SyncCheckpoint\""]
25314#[doc = "            }"]
25315#[doc = "          }"]
25316#[doc = "        },"]
25317#[doc = "        {"]
25318#[doc = "          \"type\": \"object\","]
25319#[doc = "          \"required\": ["]
25320#[doc = "            \"account_ids\","]
25321#[doc = "            \"changes_type\""]
25322#[doc = "          ],"]
25323#[doc = "          \"properties\": {"]
25324#[doc = "            \"account_ids\": {"]
25325#[doc = "              \"type\": \"array\","]
25326#[doc = "              \"items\": {"]
25327#[doc = "                \"$ref\": \"#/components/schemas/AccountId\""]
25328#[doc = "              }"]
25329#[doc = "            },"]
25330#[doc = "            \"changes_type\": {"]
25331#[doc = "              \"type\": \"string\","]
25332#[doc = "              \"enum\": ["]
25333#[doc = "                \"all_gas_key_changes\""]
25334#[doc = "              ]"]
25335#[doc = "            }"]
25336#[doc = "          }"]
25337#[doc = "        }"]
25338#[doc = "      ]"]
25339#[doc = "    },"]
25340#[doc = "    {"]
25341#[doc = "      \"title\": \"contract_code_changes_by_sync_checkpoint\","]
25342#[doc = "      \"allOf\": ["]
25343#[doc = "        {"]
25344#[doc = "          \"type\": \"object\","]
25345#[doc = "          \"required\": ["]
25346#[doc = "            \"sync_checkpoint\""]
25347#[doc = "          ],"]
25348#[doc = "          \"properties\": {"]
25349#[doc = "            \"sync_checkpoint\": {"]
25350#[doc = "              \"$ref\": \"#/components/schemas/SyncCheckpoint\""]
25351#[doc = "            }"]
25352#[doc = "          }"]
25353#[doc = "        },"]
25354#[doc = "        {"]
25355#[doc = "          \"type\": \"object\","]
25356#[doc = "          \"required\": ["]
25357#[doc = "            \"account_ids\","]
25358#[doc = "            \"changes_type\""]
25359#[doc = "          ],"]
25360#[doc = "          \"properties\": {"]
25361#[doc = "            \"account_ids\": {"]
25362#[doc = "              \"type\": \"array\","]
25363#[doc = "              \"items\": {"]
25364#[doc = "                \"$ref\": \"#/components/schemas/AccountId\""]
25365#[doc = "              }"]
25366#[doc = "            },"]
25367#[doc = "            \"changes_type\": {"]
25368#[doc = "              \"type\": \"string\","]
25369#[doc = "              \"enum\": ["]
25370#[doc = "                \"contract_code_changes\""]
25371#[doc = "              ]"]
25372#[doc = "            }"]
25373#[doc = "          }"]
25374#[doc = "        }"]
25375#[doc = "      ]"]
25376#[doc = "    },"]
25377#[doc = "    {"]
25378#[doc = "      \"title\": \"data_changes_by_sync_checkpoint\","]
25379#[doc = "      \"allOf\": ["]
25380#[doc = "        {"]
25381#[doc = "          \"type\": \"object\","]
25382#[doc = "          \"required\": ["]
25383#[doc = "            \"sync_checkpoint\""]
25384#[doc = "          ],"]
25385#[doc = "          \"properties\": {"]
25386#[doc = "            \"sync_checkpoint\": {"]
25387#[doc = "              \"$ref\": \"#/components/schemas/SyncCheckpoint\""]
25388#[doc = "            }"]
25389#[doc = "          }"]
25390#[doc = "        },"]
25391#[doc = "        {"]
25392#[doc = "          \"type\": \"object\","]
25393#[doc = "          \"required\": ["]
25394#[doc = "            \"account_ids\","]
25395#[doc = "            \"changes_type\","]
25396#[doc = "            \"key_prefix_base64\""]
25397#[doc = "          ],"]
25398#[doc = "          \"properties\": {"]
25399#[doc = "            \"account_ids\": {"]
25400#[doc = "              \"type\": \"array\","]
25401#[doc = "              \"items\": {"]
25402#[doc = "                \"$ref\": \"#/components/schemas/AccountId\""]
25403#[doc = "              }"]
25404#[doc = "            },"]
25405#[doc = "            \"changes_type\": {"]
25406#[doc = "              \"type\": \"string\","]
25407#[doc = "              \"enum\": ["]
25408#[doc = "                \"data_changes\""]
25409#[doc = "              ]"]
25410#[doc = "            },"]
25411#[doc = "            \"key_prefix_base64\": {"]
25412#[doc = "              \"$ref\": \"#/components/schemas/StoreKey\""]
25413#[doc = "            }"]
25414#[doc = "          }"]
25415#[doc = "        }"]
25416#[doc = "      ]"]
25417#[doc = "    }"]
25418#[doc = "  ]"]
25419#[doc = "}"]
25420#[doc = r" ```"]
25421#[doc = r" </details>"]
25422#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
25423#[serde(untagged)]
25424pub enum RpcStateChangesInBlockByTypeRequest {
25425    AccountChangesByBlockId {
25426        account_ids: ::std::vec::Vec<AccountId>,
25427        block_id: BlockId,
25428        changes_type: AccountChangesByBlockIdChangesType,
25429    },
25430    SingleAccessKeyChangesByBlockId {
25431        block_id: BlockId,
25432        changes_type: SingleAccessKeyChangesByBlockIdChangesType,
25433        keys: ::std::vec::Vec<AccountWithPublicKey>,
25434    },
25435    SingleGasKeyChangesByBlockId {
25436        block_id: BlockId,
25437        changes_type: SingleGasKeyChangesByBlockIdChangesType,
25438        keys: ::std::vec::Vec<AccountWithPublicKey>,
25439    },
25440    AllAccessKeyChangesByBlockId {
25441        account_ids: ::std::vec::Vec<AccountId>,
25442        block_id: BlockId,
25443        changes_type: AllAccessKeyChangesByBlockIdChangesType,
25444    },
25445    AllGasKeyChangesByBlockId {
25446        account_ids: ::std::vec::Vec<AccountId>,
25447        block_id: BlockId,
25448        changes_type: AllGasKeyChangesByBlockIdChangesType,
25449    },
25450    ContractCodeChangesByBlockId {
25451        account_ids: ::std::vec::Vec<AccountId>,
25452        block_id: BlockId,
25453        changes_type: ContractCodeChangesByBlockIdChangesType,
25454    },
25455    DataChangesByBlockId {
25456        account_ids: ::std::vec::Vec<AccountId>,
25457        block_id: BlockId,
25458        changes_type: DataChangesByBlockIdChangesType,
25459        key_prefix_base64: StoreKey,
25460    },
25461    AccountChangesByFinality {
25462        account_ids: ::std::vec::Vec<AccountId>,
25463        changes_type: AccountChangesByFinalityChangesType,
25464        finality: Finality,
25465    },
25466    SingleAccessKeyChangesByFinality {
25467        changes_type: SingleAccessKeyChangesByFinalityChangesType,
25468        finality: Finality,
25469        keys: ::std::vec::Vec<AccountWithPublicKey>,
25470    },
25471    SingleGasKeyChangesByFinality {
25472        changes_type: SingleGasKeyChangesByFinalityChangesType,
25473        finality: Finality,
25474        keys: ::std::vec::Vec<AccountWithPublicKey>,
25475    },
25476    AllAccessKeyChangesByFinality {
25477        account_ids: ::std::vec::Vec<AccountId>,
25478        changes_type: AllAccessKeyChangesByFinalityChangesType,
25479        finality: Finality,
25480    },
25481    AllGasKeyChangesByFinality {
25482        account_ids: ::std::vec::Vec<AccountId>,
25483        changes_type: AllGasKeyChangesByFinalityChangesType,
25484        finality: Finality,
25485    },
25486    ContractCodeChangesByFinality {
25487        account_ids: ::std::vec::Vec<AccountId>,
25488        changes_type: ContractCodeChangesByFinalityChangesType,
25489        finality: Finality,
25490    },
25491    DataChangesByFinality {
25492        account_ids: ::std::vec::Vec<AccountId>,
25493        changes_type: DataChangesByFinalityChangesType,
25494        finality: Finality,
25495        key_prefix_base64: StoreKey,
25496    },
25497    AccountChangesBySyncCheckpoint {
25498        account_ids: ::std::vec::Vec<AccountId>,
25499        changes_type: AccountChangesBySyncCheckpointChangesType,
25500        sync_checkpoint: SyncCheckpoint,
25501    },
25502    SingleAccessKeyChangesBySyncCheckpoint {
25503        changes_type: SingleAccessKeyChangesBySyncCheckpointChangesType,
25504        keys: ::std::vec::Vec<AccountWithPublicKey>,
25505        sync_checkpoint: SyncCheckpoint,
25506    },
25507    SingleGasKeyChangesBySyncCheckpoint {
25508        changes_type: SingleGasKeyChangesBySyncCheckpointChangesType,
25509        keys: ::std::vec::Vec<AccountWithPublicKey>,
25510        sync_checkpoint: SyncCheckpoint,
25511    },
25512    AllAccessKeyChangesBySyncCheckpoint {
25513        account_ids: ::std::vec::Vec<AccountId>,
25514        changes_type: AllAccessKeyChangesBySyncCheckpointChangesType,
25515        sync_checkpoint: SyncCheckpoint,
25516    },
25517    AllGasKeyChangesBySyncCheckpoint {
25518        account_ids: ::std::vec::Vec<AccountId>,
25519        changes_type: AllGasKeyChangesBySyncCheckpointChangesType,
25520        sync_checkpoint: SyncCheckpoint,
25521    },
25522    ContractCodeChangesBySyncCheckpoint {
25523        account_ids: ::std::vec::Vec<AccountId>,
25524        changes_type: ContractCodeChangesBySyncCheckpointChangesType,
25525        sync_checkpoint: SyncCheckpoint,
25526    },
25527    DataChangesBySyncCheckpoint {
25528        account_ids: ::std::vec::Vec<AccountId>,
25529        changes_type: DataChangesBySyncCheckpointChangesType,
25530        key_prefix_base64: StoreKey,
25531        sync_checkpoint: SyncCheckpoint,
25532    },
25533}
25534impl ::std::convert::From<&Self> for RpcStateChangesInBlockByTypeRequest {
25535    fn from(value: &RpcStateChangesInBlockByTypeRequest) -> Self {
25536        value.clone()
25537    }
25538}
25539#[doc = "`RpcStateChangesInBlockByTypeResponse`"]
25540#[doc = r""]
25541#[doc = r" <details><summary>JSON schema</summary>"]
25542#[doc = r""]
25543#[doc = r" ```json"]
25544#[doc = "{"]
25545#[doc = "  \"type\": \"object\","]
25546#[doc = "  \"required\": ["]
25547#[doc = "    \"block_hash\","]
25548#[doc = "    \"changes\""]
25549#[doc = "  ],"]
25550#[doc = "  \"properties\": {"]
25551#[doc = "    \"block_hash\": {"]
25552#[doc = "      \"$ref\": \"#/components/schemas/CryptoHash\""]
25553#[doc = "    },"]
25554#[doc = "    \"changes\": {"]
25555#[doc = "      \"type\": \"array\","]
25556#[doc = "      \"items\": {"]
25557#[doc = "        \"$ref\": \"#/components/schemas/StateChangeKindView\""]
25558#[doc = "      }"]
25559#[doc = "    }"]
25560#[doc = "  }"]
25561#[doc = "}"]
25562#[doc = r" ```"]
25563#[doc = r" </details>"]
25564#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
25565pub struct RpcStateChangesInBlockByTypeResponse {
25566    pub block_hash: CryptoHash,
25567    pub changes: ::std::vec::Vec<StateChangeKindView>,
25568}
25569impl ::std::convert::From<&RpcStateChangesInBlockByTypeResponse>
25570    for RpcStateChangesInBlockByTypeResponse
25571{
25572    fn from(value: &RpcStateChangesInBlockByTypeResponse) -> Self {
25573        value.clone()
25574    }
25575}
25576#[doc = "`RpcStateChangesInBlockRequest`"]
25577#[doc = r""]
25578#[doc = r" <details><summary>JSON schema</summary>"]
25579#[doc = r""]
25580#[doc = r" ```json"]
25581#[doc = "{"]
25582#[doc = "  \"title\": \"RpcStateChangesInBlockRequest\","]
25583#[doc = "  \"type\": \"object\","]
25584#[doc = "  \"oneOf\": ["]
25585#[doc = "    {"]
25586#[doc = "      \"type\": \"object\","]
25587#[doc = "      \"required\": ["]
25588#[doc = "        \"block_id\""]
25589#[doc = "      ],"]
25590#[doc = "      \"properties\": {"]
25591#[doc = "        \"block_id\": {"]
25592#[doc = "          \"$ref\": \"#/components/schemas/BlockId\""]
25593#[doc = "        }"]
25594#[doc = "      }"]
25595#[doc = "    },"]
25596#[doc = "    {"]
25597#[doc = "      \"type\": \"object\","]
25598#[doc = "      \"required\": ["]
25599#[doc = "        \"finality\""]
25600#[doc = "      ],"]
25601#[doc = "      \"properties\": {"]
25602#[doc = "        \"finality\": {"]
25603#[doc = "          \"$ref\": \"#/components/schemas/Finality\""]
25604#[doc = "        }"]
25605#[doc = "      }"]
25606#[doc = "    },"]
25607#[doc = "    {"]
25608#[doc = "      \"type\": \"object\","]
25609#[doc = "      \"required\": ["]
25610#[doc = "        \"sync_checkpoint\""]
25611#[doc = "      ],"]
25612#[doc = "      \"properties\": {"]
25613#[doc = "        \"sync_checkpoint\": {"]
25614#[doc = "          \"$ref\": \"#/components/schemas/SyncCheckpoint\""]
25615#[doc = "        }"]
25616#[doc = "      }"]
25617#[doc = "    }"]
25618#[doc = "  ]"]
25619#[doc = "}"]
25620#[doc = r" ```"]
25621#[doc = r" </details>"]
25622#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
25623pub enum RpcStateChangesInBlockRequest {
25624    #[serde(rename = "block_id")]
25625    BlockId(BlockId),
25626    #[serde(rename = "finality")]
25627    Finality(Finality),
25628    #[serde(rename = "sync_checkpoint")]
25629    SyncCheckpoint(SyncCheckpoint),
25630}
25631impl ::std::convert::From<&Self> for RpcStateChangesInBlockRequest {
25632    fn from(value: &RpcStateChangesInBlockRequest) -> Self {
25633        value.clone()
25634    }
25635}
25636impl ::std::convert::From<BlockId> for RpcStateChangesInBlockRequest {
25637    fn from(value: BlockId) -> Self {
25638        Self::BlockId(value)
25639    }
25640}
25641impl ::std::convert::From<Finality> for RpcStateChangesInBlockRequest {
25642    fn from(value: Finality) -> Self {
25643        Self::Finality(value)
25644    }
25645}
25646impl ::std::convert::From<SyncCheckpoint> for RpcStateChangesInBlockRequest {
25647    fn from(value: SyncCheckpoint) -> Self {
25648        Self::SyncCheckpoint(value)
25649    }
25650}
25651#[doc = "`RpcStateChangesInBlockResponse`"]
25652#[doc = r""]
25653#[doc = r" <details><summary>JSON schema</summary>"]
25654#[doc = r""]
25655#[doc = r" ```json"]
25656#[doc = "{"]
25657#[doc = "  \"type\": \"object\","]
25658#[doc = "  \"required\": ["]
25659#[doc = "    \"block_hash\","]
25660#[doc = "    \"changes\""]
25661#[doc = "  ],"]
25662#[doc = "  \"properties\": {"]
25663#[doc = "    \"block_hash\": {"]
25664#[doc = "      \"$ref\": \"#/components/schemas/CryptoHash\""]
25665#[doc = "    },"]
25666#[doc = "    \"changes\": {"]
25667#[doc = "      \"type\": \"array\","]
25668#[doc = "      \"items\": {"]
25669#[doc = "        \"$ref\": \"#/components/schemas/StateChangeWithCauseView\""]
25670#[doc = "      }"]
25671#[doc = "    }"]
25672#[doc = "  }"]
25673#[doc = "}"]
25674#[doc = r" ```"]
25675#[doc = r" </details>"]
25676#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
25677pub struct RpcStateChangesInBlockResponse {
25678    pub block_hash: CryptoHash,
25679    pub changes: ::std::vec::Vec<StateChangeWithCauseView>,
25680}
25681impl ::std::convert::From<&RpcStateChangesInBlockResponse> for RpcStateChangesInBlockResponse {
25682    fn from(value: &RpcStateChangesInBlockResponse) -> Self {
25683        value.clone()
25684    }
25685}
25686#[doc = "`RpcStatusError`"]
25687#[doc = r""]
25688#[doc = r" <details><summary>JSON schema</summary>"]
25689#[doc = r""]
25690#[doc = r" ```json"]
25691#[doc = "{"]
25692#[doc = "  \"oneOf\": ["]
25693#[doc = "    {"]
25694#[doc = "      \"type\": \"object\","]
25695#[doc = "      \"required\": ["]
25696#[doc = "        \"name\""]
25697#[doc = "      ],"]
25698#[doc = "      \"properties\": {"]
25699#[doc = "        \"name\": {"]
25700#[doc = "          \"type\": \"string\","]
25701#[doc = "          \"enum\": ["]
25702#[doc = "            \"NODE_IS_SYNCING\""]
25703#[doc = "          ]"]
25704#[doc = "        }"]
25705#[doc = "      }"]
25706#[doc = "    },"]
25707#[doc = "    {"]
25708#[doc = "      \"type\": \"object\","]
25709#[doc = "      \"required\": ["]
25710#[doc = "        \"info\","]
25711#[doc = "        \"name\""]
25712#[doc = "      ],"]
25713#[doc = "      \"properties\": {"]
25714#[doc = "        \"info\": {"]
25715#[doc = "          \"type\": \"object\","]
25716#[doc = "          \"required\": ["]
25717#[doc = "            \"elapsed\""]
25718#[doc = "          ],"]
25719#[doc = "          \"properties\": {"]
25720#[doc = "            \"elapsed\": {"]
25721#[doc = "              \"type\": \"array\","]
25722#[doc = "              \"items\": {"]
25723#[doc = "                \"type\": \"integer\","]
25724#[doc = "                \"format\": \"uint64\","]
25725#[doc = "                \"minimum\": 0.0"]
25726#[doc = "              },"]
25727#[doc = "              \"maxItems\": 2,"]
25728#[doc = "              \"minItems\": 2"]
25729#[doc = "            }"]
25730#[doc = "          }"]
25731#[doc = "        },"]
25732#[doc = "        \"name\": {"]
25733#[doc = "          \"type\": \"string\","]
25734#[doc = "          \"enum\": ["]
25735#[doc = "            \"NO_NEW_BLOCKS\""]
25736#[doc = "          ]"]
25737#[doc = "        }"]
25738#[doc = "      }"]
25739#[doc = "    },"]
25740#[doc = "    {"]
25741#[doc = "      \"type\": \"object\","]
25742#[doc = "      \"required\": ["]
25743#[doc = "        \"info\","]
25744#[doc = "        \"name\""]
25745#[doc = "      ],"]
25746#[doc = "      \"properties\": {"]
25747#[doc = "        \"info\": {"]
25748#[doc = "          \"type\": \"object\","]
25749#[doc = "          \"required\": ["]
25750#[doc = "            \"epoch_id\""]
25751#[doc = "          ],"]
25752#[doc = "          \"properties\": {"]
25753#[doc = "            \"epoch_id\": {"]
25754#[doc = "              \"$ref\": \"#/components/schemas/EpochId\""]
25755#[doc = "            }"]
25756#[doc = "          }"]
25757#[doc = "        },"]
25758#[doc = "        \"name\": {"]
25759#[doc = "          \"type\": \"string\","]
25760#[doc = "          \"enum\": ["]
25761#[doc = "            \"EPOCH_OUT_OF_BOUNDS\""]
25762#[doc = "          ]"]
25763#[doc = "        }"]
25764#[doc = "      }"]
25765#[doc = "    },"]
25766#[doc = "    {"]
25767#[doc = "      \"type\": \"object\","]
25768#[doc = "      \"required\": ["]
25769#[doc = "        \"info\","]
25770#[doc = "        \"name\""]
25771#[doc = "      ],"]
25772#[doc = "      \"properties\": {"]
25773#[doc = "        \"info\": {"]
25774#[doc = "          \"type\": \"object\","]
25775#[doc = "          \"required\": ["]
25776#[doc = "            \"error_message\""]
25777#[doc = "          ],"]
25778#[doc = "          \"properties\": {"]
25779#[doc = "            \"error_message\": {"]
25780#[doc = "              \"type\": \"string\""]
25781#[doc = "            }"]
25782#[doc = "          }"]
25783#[doc = "        },"]
25784#[doc = "        \"name\": {"]
25785#[doc = "          \"type\": \"string\","]
25786#[doc = "          \"enum\": ["]
25787#[doc = "            \"INTERNAL_ERROR\""]
25788#[doc = "          ]"]
25789#[doc = "        }"]
25790#[doc = "      }"]
25791#[doc = "    }"]
25792#[doc = "  ]"]
25793#[doc = "}"]
25794#[doc = r" ```"]
25795#[doc = r" </details>"]
25796#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
25797#[serde(tag = "name", content = "info")]
25798pub enum RpcStatusError {
25799    #[serde(rename = "NODE_IS_SYNCING")]
25800    NodeIsSyncing,
25801    #[serde(rename = "NO_NEW_BLOCKS")]
25802    NoNewBlocks { elapsed: [u64; 2usize] },
25803    #[serde(rename = "EPOCH_OUT_OF_BOUNDS")]
25804    EpochOutOfBounds { epoch_id: EpochId },
25805    #[serde(rename = "INTERNAL_ERROR")]
25806    InternalError {
25807        error_message: ::std::string::String,
25808    },
25809}
25810impl ::std::convert::From<&Self> for RpcStatusError {
25811    fn from(value: &RpcStatusError) -> Self {
25812        value.clone()
25813    }
25814}
25815#[doc = "`RpcStatusRequest`"]
25816#[doc = r""]
25817#[doc = r" <details><summary>JSON schema</summary>"]
25818#[doc = r""]
25819#[doc = r" ```json"]
25820#[doc = "{"]
25821#[doc = "  \"title\": \"RpcStatusRequest\","]
25822#[doc = "  \"type\": \"null\""]
25823#[doc = "}"]
25824#[doc = r" ```"]
25825#[doc = r" </details>"]
25826#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
25827#[serde(transparent)]
25828pub struct RpcStatusRequest(pub ());
25829impl ::std::ops::Deref for RpcStatusRequest {
25830    type Target = ();
25831    fn deref(&self) -> &() {
25832        &self.0
25833    }
25834}
25835impl ::std::convert::From<RpcStatusRequest> for () {
25836    fn from(value: RpcStatusRequest) -> Self {
25837        value.0
25838    }
25839}
25840impl ::std::convert::From<&RpcStatusRequest> for RpcStatusRequest {
25841    fn from(value: &RpcStatusRequest) -> Self {
25842        value.clone()
25843    }
25844}
25845impl ::std::convert::From<()> for RpcStatusRequest {
25846    fn from(value: ()) -> Self {
25847        Self(value)
25848    }
25849}
25850#[doc = "`RpcStatusResponse`"]
25851#[doc = r""]
25852#[doc = r" <details><summary>JSON schema</summary>"]
25853#[doc = r""]
25854#[doc = r" ```json"]
25855#[doc = "{"]
25856#[doc = "  \"type\": \"object\","]
25857#[doc = "  \"required\": ["]
25858#[doc = "    \"chain_id\","]
25859#[doc = "    \"genesis_hash\","]
25860#[doc = "    \"latest_protocol_version\","]
25861#[doc = "    \"node_public_key\","]
25862#[doc = "    \"protocol_version\","]
25863#[doc = "    \"sync_info\","]
25864#[doc = "    \"uptime_sec\","]
25865#[doc = "    \"validators\","]
25866#[doc = "    \"version\""]
25867#[doc = "  ],"]
25868#[doc = "  \"properties\": {"]
25869#[doc = "    \"chain_id\": {"]
25870#[doc = "      \"description\": \"Unique chain id.\","]
25871#[doc = "      \"type\": \"string\""]
25872#[doc = "    },"]
25873#[doc = "    \"detailed_debug_status\": {"]
25874#[doc = "      \"description\": \"Information about last blocks, network, epoch and chain & chunk info.\","]
25875#[doc = "      \"anyOf\": ["]
25876#[doc = "        {"]
25877#[doc = "          \"$ref\": \"#/components/schemas/DetailedDebugStatus\""]
25878#[doc = "        },"]
25879#[doc = "        {"]
25880#[doc = "          \"type\": \"null\""]
25881#[doc = "        }"]
25882#[doc = "      ]"]
25883#[doc = "    },"]
25884#[doc = "    \"genesis_hash\": {"]
25885#[doc = "      \"description\": \"Genesis hash of the chain.\","]
25886#[doc = "      \"allOf\": ["]
25887#[doc = "        {"]
25888#[doc = "          \"$ref\": \"#/components/schemas/CryptoHash\""]
25889#[doc = "        }"]
25890#[doc = "      ]"]
25891#[doc = "    },"]
25892#[doc = "    \"latest_protocol_version\": {"]
25893#[doc = "      \"description\": \"Latest protocol version that this client supports.\","]
25894#[doc = "      \"type\": \"integer\","]
25895#[doc = "      \"format\": \"uint32\","]
25896#[doc = "      \"minimum\": 0.0"]
25897#[doc = "    },"]
25898#[doc = "    \"node_key\": {"]
25899#[doc = "      \"description\": \"Deprecated; same as `validator_public_key` which you should use instead.\","]
25900#[doc = "      \"anyOf\": ["]
25901#[doc = "        {"]
25902#[doc = "          \"$ref\": \"#/components/schemas/PublicKey\""]
25903#[doc = "        },"]
25904#[doc = "        {"]
25905#[doc = "          \"type\": \"null\""]
25906#[doc = "        }"]
25907#[doc = "      ]"]
25908#[doc = "    },"]
25909#[doc = "    \"node_public_key\": {"]
25910#[doc = "      \"description\": \"Public key of the node.\","]
25911#[doc = "      \"allOf\": ["]
25912#[doc = "        {"]
25913#[doc = "          \"$ref\": \"#/components/schemas/PublicKey\""]
25914#[doc = "        }"]
25915#[doc = "      ]"]
25916#[doc = "    },"]
25917#[doc = "    \"protocol_version\": {"]
25918#[doc = "      \"description\": \"Currently active protocol version.\","]
25919#[doc = "      \"type\": \"integer\","]
25920#[doc = "      \"format\": \"uint32\","]
25921#[doc = "      \"minimum\": 0.0"]
25922#[doc = "    },"]
25923#[doc = "    \"rpc_addr\": {"]
25924#[doc = "      \"description\": \"Address for RPC server.  None if node doesn't have RPC endpoint enabled.\","]
25925#[doc = "      \"type\": ["]
25926#[doc = "        \"string\","]
25927#[doc = "        \"null\""]
25928#[doc = "      ]"]
25929#[doc = "    },"]
25930#[doc = "    \"sync_info\": {"]
25931#[doc = "      \"description\": \"Sync status of the node.\","]
25932#[doc = "      \"allOf\": ["]
25933#[doc = "        {"]
25934#[doc = "          \"$ref\": \"#/components/schemas/StatusSyncInfo\""]
25935#[doc = "        }"]
25936#[doc = "      ]"]
25937#[doc = "    },"]
25938#[doc = "    \"uptime_sec\": {"]
25939#[doc = "      \"description\": \"Uptime of the node.\","]
25940#[doc = "      \"type\": \"integer\","]
25941#[doc = "      \"format\": \"int64\""]
25942#[doc = "    },"]
25943#[doc = "    \"validator_account_id\": {"]
25944#[doc = "      \"description\": \"Validator id of the node\","]
25945#[doc = "      \"anyOf\": ["]
25946#[doc = "        {"]
25947#[doc = "          \"$ref\": \"#/components/schemas/AccountId\""]
25948#[doc = "        },"]
25949#[doc = "        {"]
25950#[doc = "          \"type\": \"null\""]
25951#[doc = "        }"]
25952#[doc = "      ]"]
25953#[doc = "    },"]
25954#[doc = "    \"validator_public_key\": {"]
25955#[doc = "      \"description\": \"Public key of the validator.\","]
25956#[doc = "      \"anyOf\": ["]
25957#[doc = "        {"]
25958#[doc = "          \"$ref\": \"#/components/schemas/PublicKey\""]
25959#[doc = "        },"]
25960#[doc = "        {"]
25961#[doc = "          \"type\": \"null\""]
25962#[doc = "        }"]
25963#[doc = "      ]"]
25964#[doc = "    },"]
25965#[doc = "    \"validators\": {"]
25966#[doc = "      \"description\": \"Current epoch validators.\","]
25967#[doc = "      \"type\": \"array\","]
25968#[doc = "      \"items\": {"]
25969#[doc = "        \"$ref\": \"#/components/schemas/ValidatorInfo\""]
25970#[doc = "      }"]
25971#[doc = "    },"]
25972#[doc = "    \"version\": {"]
25973#[doc = "      \"description\": \"Binary version.\","]
25974#[doc = "      \"allOf\": ["]
25975#[doc = "        {"]
25976#[doc = "          \"$ref\": \"#/components/schemas/Version\""]
25977#[doc = "        }"]
25978#[doc = "      ]"]
25979#[doc = "    }"]
25980#[doc = "  }"]
25981#[doc = "}"]
25982#[doc = r" ```"]
25983#[doc = r" </details>"]
25984#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
25985pub struct RpcStatusResponse {
25986    #[doc = "Unique chain id."]
25987    pub chain_id: ::std::string::String,
25988    #[doc = "Information about last blocks, network, epoch and chain & chunk info."]
25989    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
25990    pub detailed_debug_status: ::std::option::Option<DetailedDebugStatus>,
25991    #[doc = "Genesis hash of the chain."]
25992    pub genesis_hash: CryptoHash,
25993    #[doc = "Latest protocol version that this client supports."]
25994    pub latest_protocol_version: u32,
25995    #[doc = "Deprecated; same as `validator_public_key` which you should use instead."]
25996    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
25997    pub node_key: ::std::option::Option<PublicKey>,
25998    #[doc = "Public key of the node."]
25999    pub node_public_key: PublicKey,
26000    #[doc = "Currently active protocol version."]
26001    pub protocol_version: u32,
26002    #[doc = "Address for RPC server.  None if node doesn't have RPC endpoint enabled."]
26003    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
26004    pub rpc_addr: ::std::option::Option<::std::string::String>,
26005    #[doc = "Sync status of the node."]
26006    pub sync_info: StatusSyncInfo,
26007    #[doc = "Uptime of the node."]
26008    pub uptime_sec: i64,
26009    #[doc = "Validator id of the node"]
26010    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
26011    pub validator_account_id: ::std::option::Option<AccountId>,
26012    #[doc = "Public key of the validator."]
26013    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
26014    pub validator_public_key: ::std::option::Option<PublicKey>,
26015    #[doc = "Current epoch validators."]
26016    pub validators: ::std::vec::Vec<ValidatorInfo>,
26017    #[doc = "Binary version."]
26018    pub version: Version,
26019}
26020impl ::std::convert::From<&RpcStatusResponse> for RpcStatusResponse {
26021    fn from(value: &RpcStatusResponse) -> Self {
26022        value.clone()
26023    }
26024}
26025#[doc = "`RpcTransactionError`"]
26026#[doc = r""]
26027#[doc = r" <details><summary>JSON schema</summary>"]
26028#[doc = r""]
26029#[doc = r" ```json"]
26030#[doc = "{"]
26031#[doc = "  \"oneOf\": ["]
26032#[doc = "    {"]
26033#[doc = "      \"type\": \"object\","]
26034#[doc = "      \"required\": ["]
26035#[doc = "        \"info\","]
26036#[doc = "        \"name\""]
26037#[doc = "      ],"]
26038#[doc = "      \"properties\": {"]
26039#[doc = "        \"info\": {"]
26040#[doc = "          \"type\": \"object\""]
26041#[doc = "        },"]
26042#[doc = "        \"name\": {"]
26043#[doc = "          \"type\": \"string\","]
26044#[doc = "          \"enum\": ["]
26045#[doc = "            \"INVALID_TRANSACTION\""]
26046#[doc = "          ]"]
26047#[doc = "        }"]
26048#[doc = "      }"]
26049#[doc = "    },"]
26050#[doc = "    {"]
26051#[doc = "      \"type\": \"object\","]
26052#[doc = "      \"required\": ["]
26053#[doc = "        \"name\""]
26054#[doc = "      ],"]
26055#[doc = "      \"properties\": {"]
26056#[doc = "        \"name\": {"]
26057#[doc = "          \"type\": \"string\","]
26058#[doc = "          \"enum\": ["]
26059#[doc = "            \"DOES_NOT_TRACK_SHARD\""]
26060#[doc = "          ]"]
26061#[doc = "        }"]
26062#[doc = "      }"]
26063#[doc = "    },"]
26064#[doc = "    {"]
26065#[doc = "      \"type\": \"object\","]
26066#[doc = "      \"required\": ["]
26067#[doc = "        \"info\","]
26068#[doc = "        \"name\""]
26069#[doc = "      ],"]
26070#[doc = "      \"properties\": {"]
26071#[doc = "        \"info\": {"]
26072#[doc = "          \"type\": \"object\","]
26073#[doc = "          \"required\": ["]
26074#[doc = "            \"transaction_hash\""]
26075#[doc = "          ],"]
26076#[doc = "          \"properties\": {"]
26077#[doc = "            \"transaction_hash\": {"]
26078#[doc = "              \"$ref\": \"#/components/schemas/CryptoHash\""]
26079#[doc = "            }"]
26080#[doc = "          }"]
26081#[doc = "        },"]
26082#[doc = "        \"name\": {"]
26083#[doc = "          \"type\": \"string\","]
26084#[doc = "          \"enum\": ["]
26085#[doc = "            \"REQUEST_ROUTED\""]
26086#[doc = "          ]"]
26087#[doc = "        }"]
26088#[doc = "      }"]
26089#[doc = "    },"]
26090#[doc = "    {"]
26091#[doc = "      \"type\": \"object\","]
26092#[doc = "      \"required\": ["]
26093#[doc = "        \"info\","]
26094#[doc = "        \"name\""]
26095#[doc = "      ],"]
26096#[doc = "      \"properties\": {"]
26097#[doc = "        \"info\": {"]
26098#[doc = "          \"type\": \"object\","]
26099#[doc = "          \"required\": ["]
26100#[doc = "            \"requested_transaction_hash\""]
26101#[doc = "          ],"]
26102#[doc = "          \"properties\": {"]
26103#[doc = "            \"requested_transaction_hash\": {"]
26104#[doc = "              \"$ref\": \"#/components/schemas/CryptoHash\""]
26105#[doc = "            }"]
26106#[doc = "          }"]
26107#[doc = "        },"]
26108#[doc = "        \"name\": {"]
26109#[doc = "          \"type\": \"string\","]
26110#[doc = "          \"enum\": ["]
26111#[doc = "            \"UNKNOWN_TRANSACTION\""]
26112#[doc = "          ]"]
26113#[doc = "        }"]
26114#[doc = "      }"]
26115#[doc = "    },"]
26116#[doc = "    {"]
26117#[doc = "      \"type\": \"object\","]
26118#[doc = "      \"required\": ["]
26119#[doc = "        \"info\","]
26120#[doc = "        \"name\""]
26121#[doc = "      ],"]
26122#[doc = "      \"properties\": {"]
26123#[doc = "        \"info\": {"]
26124#[doc = "          \"type\": \"object\","]
26125#[doc = "          \"required\": ["]
26126#[doc = "            \"debug_info\""]
26127#[doc = "          ],"]
26128#[doc = "          \"properties\": {"]
26129#[doc = "            \"debug_info\": {"]
26130#[doc = "              \"type\": \"string\""]
26131#[doc = "            }"]
26132#[doc = "          }"]
26133#[doc = "        },"]
26134#[doc = "        \"name\": {"]
26135#[doc = "          \"type\": \"string\","]
26136#[doc = "          \"enum\": ["]
26137#[doc = "            \"INTERNAL_ERROR\""]
26138#[doc = "          ]"]
26139#[doc = "        }"]
26140#[doc = "      }"]
26141#[doc = "    },"]
26142#[doc = "    {"]
26143#[doc = "      \"type\": \"object\","]
26144#[doc = "      \"required\": ["]
26145#[doc = "        \"name\""]
26146#[doc = "      ],"]
26147#[doc = "      \"properties\": {"]
26148#[doc = "        \"name\": {"]
26149#[doc = "          \"type\": \"string\","]
26150#[doc = "          \"enum\": ["]
26151#[doc = "            \"TIMEOUT_ERROR\""]
26152#[doc = "          ]"]
26153#[doc = "        }"]
26154#[doc = "      }"]
26155#[doc = "    }"]
26156#[doc = "  ]"]
26157#[doc = "}"]
26158#[doc = r" ```"]
26159#[doc = r" </details>"]
26160#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
26161#[serde(tag = "name", content = "info")]
26162pub enum RpcTransactionError {
26163    #[serde(rename = "INVALID_TRANSACTION")]
26164    InvalidTransaction(::serde_json::Map<::std::string::String, ::serde_json::Value>),
26165    #[serde(rename = "DOES_NOT_TRACK_SHARD")]
26166    DoesNotTrackShard,
26167    #[serde(rename = "REQUEST_ROUTED")]
26168    RequestRouted { transaction_hash: CryptoHash },
26169    #[serde(rename = "UNKNOWN_TRANSACTION")]
26170    UnknownTransaction {
26171        requested_transaction_hash: CryptoHash,
26172    },
26173    #[serde(rename = "INTERNAL_ERROR")]
26174    InternalError { debug_info: ::std::string::String },
26175    #[serde(rename = "TIMEOUT_ERROR")]
26176    TimeoutError,
26177}
26178impl ::std::convert::From<&Self> for RpcTransactionError {
26179    fn from(value: &RpcTransactionError) -> Self {
26180        value.clone()
26181    }
26182}
26183impl ::std::convert::From<::serde_json::Map<::std::string::String, ::serde_json::Value>>
26184    for RpcTransactionError
26185{
26186    fn from(value: ::serde_json::Map<::std::string::String, ::serde_json::Value>) -> Self {
26187        Self::InvalidTransaction(value)
26188    }
26189}
26190#[doc = "`RpcTransactionResponse`"]
26191#[doc = r""]
26192#[doc = r" <details><summary>JSON schema</summary>"]
26193#[doc = r""]
26194#[doc = r" ```json"]
26195#[doc = "{"]
26196#[doc = "  \"type\": \"object\","]
26197#[doc = "  \"anyOf\": ["]
26198#[doc = "    {"]
26199#[doc = "      \"$ref\": \"#/components/schemas/FinalExecutionOutcomeWithReceiptView\""]
26200#[doc = "    },"]
26201#[doc = "    {"]
26202#[doc = "      \"$ref\": \"#/components/schemas/FinalExecutionOutcomeView\""]
26203#[doc = "    }"]
26204#[doc = "  ],"]
26205#[doc = "  \"required\": ["]
26206#[doc = "    \"final_execution_status\""]
26207#[doc = "  ],"]
26208#[doc = "  \"properties\": {"]
26209#[doc = "    \"final_execution_status\": {"]
26210#[doc = "      \"$ref\": \"#/components/schemas/TxExecutionStatus\""]
26211#[doc = "    }"]
26212#[doc = "  }"]
26213#[doc = "}"]
26214#[doc = r" ```"]
26215#[doc = r" </details>"]
26216#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
26217#[serde(untagged)]
26218pub enum RpcTransactionResponse {
26219    Variant0 {
26220        final_execution_status: TxExecutionStatus,
26221        #[doc = "Receipts generated from the transaction"]
26222        receipts: ::std::vec::Vec<ReceiptView>,
26223        #[doc = "The execution outcome of receipts."]
26224        receipts_outcome: ::std::vec::Vec<ExecutionOutcomeWithIdView>,
26225        #[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"]
26226        status: FinalExecutionStatus,
26227        #[doc = "Signed Transaction"]
26228        transaction: SignedTransactionView,
26229        #[doc = "The execution outcome of the signed transaction."]
26230        transaction_outcome: ExecutionOutcomeWithIdView,
26231    },
26232    Variant1 {
26233        final_execution_status: TxExecutionStatus,
26234        #[doc = "The execution outcome of receipts."]
26235        receipts_outcome: ::std::vec::Vec<ExecutionOutcomeWithIdView>,
26236        #[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"]
26237        status: FinalExecutionStatus,
26238        #[doc = "Signed Transaction"]
26239        transaction: SignedTransactionView,
26240        #[doc = "The execution outcome of the signed transaction."]
26241        transaction_outcome: ExecutionOutcomeWithIdView,
26242    },
26243}
26244impl ::std::convert::From<&Self> for RpcTransactionResponse {
26245    fn from(value: &RpcTransactionResponse) -> Self {
26246        value.clone()
26247    }
26248}
26249#[doc = "`RpcTransactionStatusRequest`"]
26250#[doc = r""]
26251#[doc = r" <details><summary>JSON schema</summary>"]
26252#[doc = r""]
26253#[doc = r" ```json"]
26254#[doc = "{"]
26255#[doc = "  \"title\": \"RpcTransactionStatusRequest\","]
26256#[doc = "  \"type\": \"object\","]
26257#[doc = "  \"anyOf\": ["]
26258#[doc = "    {"]
26259#[doc = "      \"type\": \"object\","]
26260#[doc = "      \"required\": ["]
26261#[doc = "        \"signed_tx_base64\""]
26262#[doc = "      ],"]
26263#[doc = "      \"properties\": {"]
26264#[doc = "        \"signed_tx_base64\": {"]
26265#[doc = "          \"$ref\": \"#/components/schemas/SignedTransaction\""]
26266#[doc = "        }"]
26267#[doc = "      }"]
26268#[doc = "    },"]
26269#[doc = "    {"]
26270#[doc = "      \"type\": \"object\","]
26271#[doc = "      \"required\": ["]
26272#[doc = "        \"sender_account_id\","]
26273#[doc = "        \"tx_hash\""]
26274#[doc = "      ],"]
26275#[doc = "      \"properties\": {"]
26276#[doc = "        \"sender_account_id\": {"]
26277#[doc = "          \"$ref\": \"#/components/schemas/AccountId\""]
26278#[doc = "        },"]
26279#[doc = "        \"tx_hash\": {"]
26280#[doc = "          \"$ref\": \"#/components/schemas/CryptoHash\""]
26281#[doc = "        }"]
26282#[doc = "      }"]
26283#[doc = "    }"]
26284#[doc = "  ],"]
26285#[doc = "  \"properties\": {"]
26286#[doc = "    \"wait_until\": {"]
26287#[doc = "      \"default\": \"EXECUTED_OPTIMISTIC\","]
26288#[doc = "      \"allOf\": ["]
26289#[doc = "        {"]
26290#[doc = "          \"$ref\": \"#/components/schemas/TxExecutionStatus\""]
26291#[doc = "        }"]
26292#[doc = "      ]"]
26293#[doc = "    }"]
26294#[doc = "  }"]
26295#[doc = "}"]
26296#[doc = r" ```"]
26297#[doc = r" </details>"]
26298#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
26299#[serde(untagged)]
26300pub enum RpcTransactionStatusRequest {
26301    Variant0 {
26302        signed_tx_base64: SignedTransaction,
26303        #[serde(default = "defaults::rpc_transaction_status_request_variant0_wait_until")]
26304        wait_until: TxExecutionStatus,
26305    },
26306    Variant1 {
26307        sender_account_id: AccountId,
26308        tx_hash: CryptoHash,
26309        #[serde(default = "defaults::rpc_transaction_status_request_variant1_wait_until")]
26310        wait_until: TxExecutionStatus,
26311    },
26312}
26313impl ::std::convert::From<&Self> for RpcTransactionStatusRequest {
26314    fn from(value: &RpcTransactionStatusRequest) -> Self {
26315        value.clone()
26316    }
26317}
26318#[doc = "`RpcValidatorError`"]
26319#[doc = r""]
26320#[doc = r" <details><summary>JSON schema</summary>"]
26321#[doc = r""]
26322#[doc = r" ```json"]
26323#[doc = "{"]
26324#[doc = "  \"oneOf\": ["]
26325#[doc = "    {"]
26326#[doc = "      \"type\": \"object\","]
26327#[doc = "      \"required\": ["]
26328#[doc = "        \"name\""]
26329#[doc = "      ],"]
26330#[doc = "      \"properties\": {"]
26331#[doc = "        \"name\": {"]
26332#[doc = "          \"type\": \"string\","]
26333#[doc = "          \"enum\": ["]
26334#[doc = "            \"UNKNOWN_EPOCH\""]
26335#[doc = "          ]"]
26336#[doc = "        }"]
26337#[doc = "      }"]
26338#[doc = "    },"]
26339#[doc = "    {"]
26340#[doc = "      \"type\": \"object\","]
26341#[doc = "      \"required\": ["]
26342#[doc = "        \"name\""]
26343#[doc = "      ],"]
26344#[doc = "      \"properties\": {"]
26345#[doc = "        \"name\": {"]
26346#[doc = "          \"type\": \"string\","]
26347#[doc = "          \"enum\": ["]
26348#[doc = "            \"VALIDATOR_INFO_UNAVAILABLE\""]
26349#[doc = "          ]"]
26350#[doc = "        }"]
26351#[doc = "      }"]
26352#[doc = "    },"]
26353#[doc = "    {"]
26354#[doc = "      \"type\": \"object\","]
26355#[doc = "      \"required\": ["]
26356#[doc = "        \"info\","]
26357#[doc = "        \"name\""]
26358#[doc = "      ],"]
26359#[doc = "      \"properties\": {"]
26360#[doc = "        \"info\": {"]
26361#[doc = "          \"type\": \"object\","]
26362#[doc = "          \"required\": ["]
26363#[doc = "            \"error_message\""]
26364#[doc = "          ],"]
26365#[doc = "          \"properties\": {"]
26366#[doc = "            \"error_message\": {"]
26367#[doc = "              \"type\": \"string\""]
26368#[doc = "            }"]
26369#[doc = "          }"]
26370#[doc = "        },"]
26371#[doc = "        \"name\": {"]
26372#[doc = "          \"type\": \"string\","]
26373#[doc = "          \"enum\": ["]
26374#[doc = "            \"INTERNAL_ERROR\""]
26375#[doc = "          ]"]
26376#[doc = "        }"]
26377#[doc = "      }"]
26378#[doc = "    }"]
26379#[doc = "  ]"]
26380#[doc = "}"]
26381#[doc = r" ```"]
26382#[doc = r" </details>"]
26383#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
26384#[serde(tag = "name", content = "info")]
26385pub enum RpcValidatorError {
26386    #[serde(rename = "UNKNOWN_EPOCH")]
26387    UnknownEpoch,
26388    #[serde(rename = "VALIDATOR_INFO_UNAVAILABLE")]
26389    ValidatorInfoUnavailable,
26390    #[serde(rename = "INTERNAL_ERROR")]
26391    InternalError {
26392        error_message: ::std::string::String,
26393    },
26394}
26395impl ::std::convert::From<&Self> for RpcValidatorError {
26396    fn from(value: &RpcValidatorError) -> Self {
26397        value.clone()
26398    }
26399}
26400#[doc = "`RpcValidatorRequest`"]
26401#[doc = r""]
26402#[doc = r" <details><summary>JSON schema</summary>"]
26403#[doc = r""]
26404#[doc = r" ```json"]
26405#[doc = "{"]
26406#[doc = "  \"title\": \"RpcValidatorRequest\","]
26407#[doc = "  \"type\": \"object\","]
26408#[doc = "  \"oneOf\": ["]
26409#[doc = "    {"]
26410#[doc = "      \"type\": \"string\","]
26411#[doc = "      \"enum\": ["]
26412#[doc = "        \"latest\""]
26413#[doc = "      ]"]
26414#[doc = "    },"]
26415#[doc = "    {"]
26416#[doc = "      \"type\": \"object\","]
26417#[doc = "      \"required\": ["]
26418#[doc = "        \"epoch_id\""]
26419#[doc = "      ],"]
26420#[doc = "      \"properties\": {"]
26421#[doc = "        \"epoch_id\": {"]
26422#[doc = "          \"$ref\": \"#/components/schemas/EpochId\""]
26423#[doc = "        }"]
26424#[doc = "      }"]
26425#[doc = "    },"]
26426#[doc = "    {"]
26427#[doc = "      \"type\": \"object\","]
26428#[doc = "      \"required\": ["]
26429#[doc = "        \"block_id\""]
26430#[doc = "      ],"]
26431#[doc = "      \"properties\": {"]
26432#[doc = "        \"block_id\": {"]
26433#[doc = "          \"$ref\": \"#/components/schemas/BlockId\""]
26434#[doc = "        }"]
26435#[doc = "      }"]
26436#[doc = "    }"]
26437#[doc = "  ]"]
26438#[doc = "}"]
26439#[doc = r" ```"]
26440#[doc = r" </details>"]
26441#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
26442pub enum RpcValidatorRequest {
26443    #[serde(rename = "latest")]
26444    Latest,
26445    #[serde(rename = "epoch_id")]
26446    EpochId(EpochId),
26447    #[serde(rename = "block_id")]
26448    BlockId(BlockId),
26449}
26450impl ::std::convert::From<&Self> for RpcValidatorRequest {
26451    fn from(value: &RpcValidatorRequest) -> Self {
26452        value.clone()
26453    }
26454}
26455impl ::std::convert::From<EpochId> for RpcValidatorRequest {
26456    fn from(value: EpochId) -> Self {
26457        Self::EpochId(value)
26458    }
26459}
26460impl ::std::convert::From<BlockId> for RpcValidatorRequest {
26461    fn from(value: BlockId) -> Self {
26462        Self::BlockId(value)
26463    }
26464}
26465#[doc = "Information about this epoch validators and next epoch validators"]
26466#[doc = r""]
26467#[doc = r" <details><summary>JSON schema</summary>"]
26468#[doc = r""]
26469#[doc = r" ```json"]
26470#[doc = "{"]
26471#[doc = "  \"description\": \"Information about this epoch validators and next epoch validators\","]
26472#[doc = "  \"type\": \"object\","]
26473#[doc = "  \"required\": ["]
26474#[doc = "    \"current_fishermen\","]
26475#[doc = "    \"current_proposals\","]
26476#[doc = "    \"current_validators\","]
26477#[doc = "    \"epoch_height\","]
26478#[doc = "    \"epoch_start_height\","]
26479#[doc = "    \"next_fishermen\","]
26480#[doc = "    \"next_validators\","]
26481#[doc = "    \"prev_epoch_kickout\""]
26482#[doc = "  ],"]
26483#[doc = "  \"properties\": {"]
26484#[doc = "    \"current_fishermen\": {"]
26485#[doc = "      \"description\": \"Fishermen for the current epoch\","]
26486#[doc = "      \"type\": \"array\","]
26487#[doc = "      \"items\": {"]
26488#[doc = "        \"$ref\": \"#/components/schemas/ValidatorStakeView\""]
26489#[doc = "      }"]
26490#[doc = "    },"]
26491#[doc = "    \"current_proposals\": {"]
26492#[doc = "      \"description\": \"Proposals in the current epoch\","]
26493#[doc = "      \"type\": \"array\","]
26494#[doc = "      \"items\": {"]
26495#[doc = "        \"$ref\": \"#/components/schemas/ValidatorStakeView\""]
26496#[doc = "      }"]
26497#[doc = "    },"]
26498#[doc = "    \"current_validators\": {"]
26499#[doc = "      \"description\": \"Validators for the current epoch\","]
26500#[doc = "      \"type\": \"array\","]
26501#[doc = "      \"items\": {"]
26502#[doc = "        \"$ref\": \"#/components/schemas/CurrentEpochValidatorInfo\""]
26503#[doc = "      }"]
26504#[doc = "    },"]
26505#[doc = "    \"epoch_height\": {"]
26506#[doc = "      \"description\": \"Epoch height\","]
26507#[doc = "      \"type\": \"integer\","]
26508#[doc = "      \"format\": \"uint64\","]
26509#[doc = "      \"minimum\": 0.0"]
26510#[doc = "    },"]
26511#[doc = "    \"epoch_start_height\": {"]
26512#[doc = "      \"description\": \"Epoch start block height\","]
26513#[doc = "      \"type\": \"integer\","]
26514#[doc = "      \"format\": \"uint64\","]
26515#[doc = "      \"minimum\": 0.0"]
26516#[doc = "    },"]
26517#[doc = "    \"next_fishermen\": {"]
26518#[doc = "      \"description\": \"Fishermen for the next epoch\","]
26519#[doc = "      \"type\": \"array\","]
26520#[doc = "      \"items\": {"]
26521#[doc = "        \"$ref\": \"#/components/schemas/ValidatorStakeView\""]
26522#[doc = "      }"]
26523#[doc = "    },"]
26524#[doc = "    \"next_validators\": {"]
26525#[doc = "      \"description\": \"Validators for the next epoch\","]
26526#[doc = "      \"type\": \"array\","]
26527#[doc = "      \"items\": {"]
26528#[doc = "        \"$ref\": \"#/components/schemas/NextEpochValidatorInfo\""]
26529#[doc = "      }"]
26530#[doc = "    },"]
26531#[doc = "    \"prev_epoch_kickout\": {"]
26532#[doc = "      \"description\": \"Kickout in the previous epoch\","]
26533#[doc = "      \"type\": \"array\","]
26534#[doc = "      \"items\": {"]
26535#[doc = "        \"$ref\": \"#/components/schemas/ValidatorKickoutView\""]
26536#[doc = "      }"]
26537#[doc = "    }"]
26538#[doc = "  }"]
26539#[doc = "}"]
26540#[doc = r" ```"]
26541#[doc = r" </details>"]
26542#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
26543pub struct RpcValidatorResponse {
26544    #[doc = "Fishermen for the current epoch"]
26545    pub current_fishermen: ::std::vec::Vec<ValidatorStakeView>,
26546    #[doc = "Proposals in the current epoch"]
26547    pub current_proposals: ::std::vec::Vec<ValidatorStakeView>,
26548    #[doc = "Validators for the current epoch"]
26549    pub current_validators: ::std::vec::Vec<CurrentEpochValidatorInfo>,
26550    #[doc = "Epoch height"]
26551    pub epoch_height: u64,
26552    #[doc = "Epoch start block height"]
26553    pub epoch_start_height: u64,
26554    #[doc = "Fishermen for the next epoch"]
26555    pub next_fishermen: ::std::vec::Vec<ValidatorStakeView>,
26556    #[doc = "Validators for the next epoch"]
26557    pub next_validators: ::std::vec::Vec<NextEpochValidatorInfo>,
26558    #[doc = "Kickout in the previous epoch"]
26559    pub prev_epoch_kickout: ::std::vec::Vec<ValidatorKickoutView>,
26560}
26561impl ::std::convert::From<&RpcValidatorResponse> for RpcValidatorResponse {
26562    fn from(value: &RpcValidatorResponse) -> Self {
26563        value.clone()
26564    }
26565}
26566#[doc = "`RpcValidatorsOrderedRequest`"]
26567#[doc = r""]
26568#[doc = r" <details><summary>JSON schema</summary>"]
26569#[doc = r""]
26570#[doc = r" ```json"]
26571#[doc = "{"]
26572#[doc = "  \"title\": \"RpcValidatorsOrderedRequest\","]
26573#[doc = "  \"type\": \"object\","]
26574#[doc = "  \"properties\": {"]
26575#[doc = "    \"block_id\": {"]
26576#[doc = "      \"anyOf\": ["]
26577#[doc = "        {"]
26578#[doc = "          \"$ref\": \"#/components/schemas/BlockId\""]
26579#[doc = "        },"]
26580#[doc = "        {"]
26581#[doc = "          \"type\": \"null\""]
26582#[doc = "        }"]
26583#[doc = "      ]"]
26584#[doc = "    }"]
26585#[doc = "  }"]
26586#[doc = "}"]
26587#[doc = r" ```"]
26588#[doc = r" </details>"]
26589#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
26590pub struct RpcValidatorsOrderedRequest {
26591    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
26592    pub block_id: ::std::option::Option<BlockId>,
26593}
26594impl ::std::convert::From<&RpcValidatorsOrderedRequest> for RpcValidatorsOrderedRequest {
26595    fn from(value: &RpcValidatorsOrderedRequest) -> Self {
26596        value.clone()
26597    }
26598}
26599impl ::std::default::Default for RpcValidatorsOrderedRequest {
26600    fn default() -> Self {
26601        Self {
26602            block_id: Default::default(),
26603        }
26604    }
26605}
26606#[doc = "View that preserves JSON format of the runtime config."]
26607#[doc = r""]
26608#[doc = r" <details><summary>JSON schema</summary>"]
26609#[doc = r""]
26610#[doc = r" ```json"]
26611#[doc = "{"]
26612#[doc = "  \"description\": \"View that preserves JSON format of the runtime config.\","]
26613#[doc = "  \"type\": \"object\","]
26614#[doc = "  \"required\": ["]
26615#[doc = "    \"account_creation_config\","]
26616#[doc = "    \"congestion_control_config\","]
26617#[doc = "    \"storage_amount_per_byte\","]
26618#[doc = "    \"transaction_costs\","]
26619#[doc = "    \"wasm_config\","]
26620#[doc = "    \"witness_config\""]
26621#[doc = "  ],"]
26622#[doc = "  \"properties\": {"]
26623#[doc = "    \"account_creation_config\": {"]
26624#[doc = "      \"description\": \"Config that defines rules for account creation.\","]
26625#[doc = "      \"allOf\": ["]
26626#[doc = "        {"]
26627#[doc = "          \"$ref\": \"#/components/schemas/AccountCreationConfigView\""]
26628#[doc = "        }"]
26629#[doc = "      ]"]
26630#[doc = "    },"]
26631#[doc = "    \"congestion_control_config\": {"]
26632#[doc = "      \"description\": \"The configuration for congestion control.\","]
26633#[doc = "      \"allOf\": ["]
26634#[doc = "        {"]
26635#[doc = "          \"$ref\": \"#/components/schemas/CongestionControlConfigView\""]
26636#[doc = "        }"]
26637#[doc = "      ]"]
26638#[doc = "    },"]
26639#[doc = "    \"storage_amount_per_byte\": {"]
26640#[doc = "      \"description\": \"Amount of yN per byte required to have on the account.  See\\n<https://nomicon.io/Economics/Economic#state-stake> for details.\","]
26641#[doc = "      \"allOf\": ["]
26642#[doc = "        {"]
26643#[doc = "          \"$ref\": \"#/components/schemas/NearToken\""]
26644#[doc = "        }"]
26645#[doc = "      ]"]
26646#[doc = "    },"]
26647#[doc = "    \"transaction_costs\": {"]
26648#[doc = "      \"description\": \"Costs of different actions that need to be performed when sending and\\nprocessing transaction and receipts.\","]
26649#[doc = "      \"allOf\": ["]
26650#[doc = "        {"]
26651#[doc = "          \"$ref\": \"#/components/schemas/RuntimeFeesConfigView\""]
26652#[doc = "        }"]
26653#[doc = "      ]"]
26654#[doc = "    },"]
26655#[doc = "    \"wasm_config\": {"]
26656#[doc = "      \"description\": \"Config of wasm operations.\","]
26657#[doc = "      \"allOf\": ["]
26658#[doc = "        {"]
26659#[doc = "          \"$ref\": \"#/components/schemas/VMConfigView\""]
26660#[doc = "        }"]
26661#[doc = "      ]"]
26662#[doc = "    },"]
26663#[doc = "    \"witness_config\": {"]
26664#[doc = "      \"description\": \"Configuration specific to ChunkStateWitness.\","]
26665#[doc = "      \"allOf\": ["]
26666#[doc = "        {"]
26667#[doc = "          \"$ref\": \"#/components/schemas/WitnessConfigView\""]
26668#[doc = "        }"]
26669#[doc = "      ]"]
26670#[doc = "    }"]
26671#[doc = "  }"]
26672#[doc = "}"]
26673#[doc = r" ```"]
26674#[doc = r" </details>"]
26675#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
26676pub struct RuntimeConfigView {
26677    #[doc = "Config that defines rules for account creation."]
26678    pub account_creation_config: AccountCreationConfigView,
26679    #[doc = "The configuration for congestion control."]
26680    pub congestion_control_config: CongestionControlConfigView,
26681    #[doc = "Amount of yN per byte required to have on the account.  See\n<https://nomicon.io/Economics/Economic#state-stake> for details."]
26682    pub storage_amount_per_byte: NearToken,
26683    #[doc = "Costs of different actions that need to be performed when sending and\nprocessing transaction and receipts."]
26684    pub transaction_costs: RuntimeFeesConfigView,
26685    #[doc = "Config of wasm operations."]
26686    pub wasm_config: VmConfigView,
26687    #[doc = "Configuration specific to ChunkStateWitness."]
26688    pub witness_config: WitnessConfigView,
26689}
26690impl ::std::convert::From<&RuntimeConfigView> for RuntimeConfigView {
26691    fn from(value: &RuntimeConfigView) -> Self {
26692        value.clone()
26693    }
26694}
26695#[doc = "Describes different fees for the runtime"]
26696#[doc = r""]
26697#[doc = r" <details><summary>JSON schema</summary>"]
26698#[doc = r""]
26699#[doc = r" ```json"]
26700#[doc = "{"]
26701#[doc = "  \"description\": \"Describes different fees for the runtime\","]
26702#[doc = "  \"type\": \"object\","]
26703#[doc = "  \"required\": ["]
26704#[doc = "    \"action_creation_config\","]
26705#[doc = "    \"action_receipt_creation_config\","]
26706#[doc = "    \"burnt_gas_reward\","]
26707#[doc = "    \"data_receipt_creation_config\","]
26708#[doc = "    \"pessimistic_gas_price_inflation_ratio\","]
26709#[doc = "    \"storage_usage_config\""]
26710#[doc = "  ],"]
26711#[doc = "  \"properties\": {"]
26712#[doc = "    \"action_creation_config\": {"]
26713#[doc = "      \"description\": \"Describes the cost of creating a certain action, `Action`. Includes all variants.\","]
26714#[doc = "      \"allOf\": ["]
26715#[doc = "        {"]
26716#[doc = "          \"$ref\": \"#/components/schemas/ActionCreationConfigView\""]
26717#[doc = "        }"]
26718#[doc = "      ]"]
26719#[doc = "    },"]
26720#[doc = "    \"action_receipt_creation_config\": {"]
26721#[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.\","]
26722#[doc = "      \"allOf\": ["]
26723#[doc = "        {"]
26724#[doc = "          \"$ref\": \"#/components/schemas/Fee\""]
26725#[doc = "        }"]
26726#[doc = "      ]"]
26727#[doc = "    },"]
26728#[doc = "    \"burnt_gas_reward\": {"]
26729#[doc = "      \"description\": \"Fraction of the burnt gas to reward to the contract account for execution.\","]
26730#[doc = "      \"type\": \"array\","]
26731#[doc = "      \"items\": {"]
26732#[doc = "        \"type\": \"integer\","]
26733#[doc = "        \"format\": \"int32\""]
26734#[doc = "      },"]
26735#[doc = "      \"maxItems\": 2,"]
26736#[doc = "      \"minItems\": 2"]
26737#[doc = "    },"]
26738#[doc = "    \"data_receipt_creation_config\": {"]
26739#[doc = "      \"description\": \"Describes the cost of creating a data receipt, `DataReceipt`.\","]
26740#[doc = "      \"allOf\": ["]
26741#[doc = "        {"]
26742#[doc = "          \"$ref\": \"#/components/schemas/DataReceiptCreationConfigView\""]
26743#[doc = "        }"]
26744#[doc = "      ]"]
26745#[doc = "    },"]
26746#[doc = "    \"pessimistic_gas_price_inflation_ratio\": {"]
26747#[doc = "      \"description\": \"Pessimistic gas price inflation ratio.\","]
26748#[doc = "      \"type\": \"array\","]
26749#[doc = "      \"items\": {"]
26750#[doc = "        \"type\": \"integer\","]
26751#[doc = "        \"format\": \"int32\""]
26752#[doc = "      },"]
26753#[doc = "      \"maxItems\": 2,"]
26754#[doc = "      \"minItems\": 2"]
26755#[doc = "    },"]
26756#[doc = "    \"storage_usage_config\": {"]
26757#[doc = "      \"description\": \"Describes fees for storage.\","]
26758#[doc = "      \"allOf\": ["]
26759#[doc = "        {"]
26760#[doc = "          \"$ref\": \"#/components/schemas/StorageUsageConfigView\""]
26761#[doc = "        }"]
26762#[doc = "      ]"]
26763#[doc = "    }"]
26764#[doc = "  }"]
26765#[doc = "}"]
26766#[doc = r" ```"]
26767#[doc = r" </details>"]
26768#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
26769pub struct RuntimeFeesConfigView {
26770    #[doc = "Describes the cost of creating a certain action, `Action`. Includes all variants."]
26771    pub action_creation_config: ActionCreationConfigView,
26772    #[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."]
26773    pub action_receipt_creation_config: Fee,
26774    #[doc = "Fraction of the burnt gas to reward to the contract account for execution."]
26775    pub burnt_gas_reward: [i32; 2usize],
26776    #[doc = "Describes the cost of creating a data receipt, `DataReceipt`."]
26777    pub data_receipt_creation_config: DataReceiptCreationConfigView,
26778    #[doc = "Pessimistic gas price inflation ratio."]
26779    pub pessimistic_gas_price_inflation_ratio: [i32; 2usize],
26780    #[doc = "Describes fees for storage."]
26781    pub storage_usage_config: StorageUsageConfigView,
26782}
26783impl ::std::convert::From<&RuntimeFeesConfigView> for RuntimeFeesConfigView {
26784    fn from(value: &RuntimeFeesConfigView) -> Self {
26785        value.clone()
26786    }
26787}
26788#[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."]
26789#[doc = r""]
26790#[doc = r" <details><summary>JSON schema</summary>"]
26791#[doc = r""]
26792#[doc = r" ```json"]
26793#[doc = "{"]
26794#[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.\","]
26795#[doc = "  \"type\": \"integer\","]
26796#[doc = "  \"format\": \"uint64\","]
26797#[doc = "  \"minimum\": 0.0"]
26798#[doc = "}"]
26799#[doc = r" ```"]
26800#[doc = r" </details>"]
26801#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
26802#[serde(transparent)]
26803pub struct ShardId(pub u64);
26804impl ::std::ops::Deref for ShardId {
26805    type Target = u64;
26806    fn deref(&self) -> &u64 {
26807        &self.0
26808    }
26809}
26810impl ::std::convert::From<ShardId> for u64 {
26811    fn from(value: ShardId) -> Self {
26812        value.0
26813    }
26814}
26815impl ::std::convert::From<&ShardId> for ShardId {
26816    fn from(value: &ShardId) -> Self {
26817        value.clone()
26818    }
26819}
26820impl ::std::convert::From<u64> for ShardId {
26821    fn from(value: u64) -> Self {
26822        Self(value)
26823    }
26824}
26825impl ::std::str::FromStr for ShardId {
26826    type Err = <u64 as ::std::str::FromStr>::Err;
26827    fn from_str(value: &str) -> ::std::result::Result<Self, Self::Err> {
26828        Ok(Self(value.parse()?))
26829    }
26830}
26831impl ::std::convert::TryFrom<&str> for ShardId {
26832    type Error = <u64 as ::std::str::FromStr>::Err;
26833    fn try_from(value: &str) -> ::std::result::Result<Self, Self::Error> {
26834        value.parse()
26835    }
26836}
26837impl ::std::convert::TryFrom<&String> for ShardId {
26838    type Error = <u64 as ::std::str::FromStr>::Err;
26839    fn try_from(value: &String) -> ::std::result::Result<Self, Self::Error> {
26840        value.parse()
26841    }
26842}
26843impl ::std::convert::TryFrom<String> for ShardId {
26844    type Error = <u64 as ::std::str::FromStr>::Err;
26845    fn try_from(value: String) -> ::std::result::Result<Self, Self::Error> {
26846        value.parse()
26847    }
26848}
26849impl ::std::fmt::Display for ShardId {
26850    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
26851        self.0.fmt(f)
26852    }
26853}
26854#[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."]
26855#[doc = r""]
26856#[doc = r" <details><summary>JSON schema</summary>"]
26857#[doc = r""]
26858#[doc = r" ```json"]
26859#[doc = "{"]
26860#[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.\","]
26861#[doc = "  \"oneOf\": ["]
26862#[doc = "    {"]
26863#[doc = "      \"type\": \"object\","]
26864#[doc = "      \"required\": ["]
26865#[doc = "        \"V0\""]
26866#[doc = "      ],"]
26867#[doc = "      \"properties\": {"]
26868#[doc = "        \"V0\": {"]
26869#[doc = "          \"$ref\": \"#/components/schemas/ShardLayoutV0\""]
26870#[doc = "        }"]
26871#[doc = "      },"]
26872#[doc = "      \"additionalProperties\": false"]
26873#[doc = "    },"]
26874#[doc = "    {"]
26875#[doc = "      \"type\": \"object\","]
26876#[doc = "      \"required\": ["]
26877#[doc = "        \"V1\""]
26878#[doc = "      ],"]
26879#[doc = "      \"properties\": {"]
26880#[doc = "        \"V1\": {"]
26881#[doc = "          \"$ref\": \"#/components/schemas/ShardLayoutV1\""]
26882#[doc = "        }"]
26883#[doc = "      },"]
26884#[doc = "      \"additionalProperties\": false"]
26885#[doc = "    },"]
26886#[doc = "    {"]
26887#[doc = "      \"type\": \"object\","]
26888#[doc = "      \"required\": ["]
26889#[doc = "        \"V2\""]
26890#[doc = "      ],"]
26891#[doc = "      \"properties\": {"]
26892#[doc = "        \"V2\": {"]
26893#[doc = "          \"$ref\": \"#/components/schemas/ShardLayoutV2\""]
26894#[doc = "        }"]
26895#[doc = "      },"]
26896#[doc = "      \"additionalProperties\": false"]
26897#[doc = "    }"]
26898#[doc = "  ]"]
26899#[doc = "}"]
26900#[doc = r" ```"]
26901#[doc = r" </details>"]
26902#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
26903pub enum ShardLayout {
26904    V0(ShardLayoutV0),
26905    V1(ShardLayoutV1),
26906    V2(ShardLayoutV2),
26907}
26908impl ::std::convert::From<&Self> for ShardLayout {
26909    fn from(value: &ShardLayout) -> Self {
26910        value.clone()
26911    }
26912}
26913impl ::std::convert::From<ShardLayoutV0> for ShardLayout {
26914    fn from(value: ShardLayoutV0) -> Self {
26915        Self::V0(value)
26916    }
26917}
26918impl ::std::convert::From<ShardLayoutV1> for ShardLayout {
26919    fn from(value: ShardLayoutV1) -> Self {
26920        Self::V1(value)
26921    }
26922}
26923impl ::std::convert::From<ShardLayoutV2> for ShardLayout {
26924    fn from(value: ShardLayoutV2) -> Self {
26925        Self::V2(value)
26926    }
26927}
26928#[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."]
26929#[doc = r""]
26930#[doc = r" <details><summary>JSON schema</summary>"]
26931#[doc = r""]
26932#[doc = r" ```json"]
26933#[doc = "{"]
26934#[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.\","]
26935#[doc = "  \"type\": \"object\","]
26936#[doc = "  \"required\": ["]
26937#[doc = "    \"num_shards\","]
26938#[doc = "    \"version\""]
26939#[doc = "  ],"]
26940#[doc = "  \"properties\": {"]
26941#[doc = "    \"num_shards\": {"]
26942#[doc = "      \"description\": \"Map accounts evenly across all shards\","]
26943#[doc = "      \"type\": \"integer\","]
26944#[doc = "      \"format\": \"uint64\","]
26945#[doc = "      \"minimum\": 0.0"]
26946#[doc = "    },"]
26947#[doc = "    \"version\": {"]
26948#[doc = "      \"description\": \"Version of the shard layout, this is useful for uniquely identify the shard layout\","]
26949#[doc = "      \"type\": \"integer\","]
26950#[doc = "      \"format\": \"uint32\","]
26951#[doc = "      \"minimum\": 0.0"]
26952#[doc = "    }"]
26953#[doc = "  }"]
26954#[doc = "}"]
26955#[doc = r" ```"]
26956#[doc = r" </details>"]
26957#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
26958pub struct ShardLayoutV0 {
26959    #[doc = "Map accounts evenly across all shards"]
26960    pub num_shards: u64,
26961    #[doc = "Version of the shard layout, this is useful for uniquely identify the shard layout"]
26962    pub version: u32,
26963}
26964impl ::std::convert::From<&ShardLayoutV0> for ShardLayoutV0 {
26965    fn from(value: &ShardLayoutV0) -> Self {
26966        value.clone()
26967    }
26968}
26969#[doc = "`ShardLayoutV1`"]
26970#[doc = r""]
26971#[doc = r" <details><summary>JSON schema</summary>"]
26972#[doc = r""]
26973#[doc = r" ```json"]
26974#[doc = "{"]
26975#[doc = "  \"type\": \"object\","]
26976#[doc = "  \"required\": ["]
26977#[doc = "    \"boundary_accounts\","]
26978#[doc = "    \"version\""]
26979#[doc = "  ],"]
26980#[doc = "  \"properties\": {"]
26981#[doc = "    \"boundary_accounts\": {"]
26982#[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.\","]
26983#[doc = "      \"type\": \"array\","]
26984#[doc = "      \"items\": {"]
26985#[doc = "        \"$ref\": \"#/components/schemas/AccountId\""]
26986#[doc = "      }"]
26987#[doc = "    },"]
26988#[doc = "    \"shards_split_map\": {"]
26989#[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\","]
26990#[doc = "      \"type\": ["]
26991#[doc = "        \"array\","]
26992#[doc = "        \"null\""]
26993#[doc = "      ],"]
26994#[doc = "      \"items\": {"]
26995#[doc = "        \"type\": \"array\","]
26996#[doc = "        \"items\": {"]
26997#[doc = "          \"$ref\": \"#/components/schemas/ShardId\""]
26998#[doc = "        }"]
26999#[doc = "      }"]
27000#[doc = "    },"]
27001#[doc = "    \"to_parent_shard_map\": {"]
27002#[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\","]
27003#[doc = "      \"type\": ["]
27004#[doc = "        \"array\","]
27005#[doc = "        \"null\""]
27006#[doc = "      ],"]
27007#[doc = "      \"items\": {"]
27008#[doc = "        \"$ref\": \"#/components/schemas/ShardId\""]
27009#[doc = "      }"]
27010#[doc = "    },"]
27011#[doc = "    \"version\": {"]
27012#[doc = "      \"description\": \"Version of the shard layout, this is useful for uniquely identify the shard layout\","]
27013#[doc = "      \"type\": \"integer\","]
27014#[doc = "      \"format\": \"uint32\","]
27015#[doc = "      \"minimum\": 0.0"]
27016#[doc = "    }"]
27017#[doc = "  }"]
27018#[doc = "}"]
27019#[doc = r" ```"]
27020#[doc = r" </details>"]
27021#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
27022pub struct ShardLayoutV1 {
27023    #[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."]
27024    pub boundary_accounts: ::std::vec::Vec<AccountId>,
27025    #[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"]
27026    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
27027    pub shards_split_map: ::std::option::Option<::std::vec::Vec<::std::vec::Vec<ShardId>>>,
27028    #[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"]
27029    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
27030    pub to_parent_shard_map: ::std::option::Option<::std::vec::Vec<ShardId>>,
27031    #[doc = "Version of the shard layout, this is useful for uniquely identify the shard layout"]
27032    pub version: u32,
27033}
27034impl ::std::convert::From<&ShardLayoutV1> for ShardLayoutV1 {
27035    fn from(value: &ShardLayoutV1) -> Self {
27036        value.clone()
27037    }
27038}
27039#[doc = "Counterpart to `ShardLayoutV2` composed of maps with string keys to aid\nserde serialization."]
27040#[doc = r""]
27041#[doc = r" <details><summary>JSON schema</summary>"]
27042#[doc = r""]
27043#[doc = r" ```json"]
27044#[doc = "{"]
27045#[doc = "  \"description\": \"Counterpart to `ShardLayoutV2` composed of maps with string keys to aid\\nserde serialization.\","]
27046#[doc = "  \"type\": \"object\","]
27047#[doc = "  \"required\": ["]
27048#[doc = "    \"boundary_accounts\","]
27049#[doc = "    \"id_to_index_map\","]
27050#[doc = "    \"index_to_id_map\","]
27051#[doc = "    \"shard_ids\","]
27052#[doc = "    \"version\""]
27053#[doc = "  ],"]
27054#[doc = "  \"properties\": {"]
27055#[doc = "    \"boundary_accounts\": {"]
27056#[doc = "      \"type\": \"array\","]
27057#[doc = "      \"items\": {"]
27058#[doc = "        \"$ref\": \"#/components/schemas/AccountId\""]
27059#[doc = "      }"]
27060#[doc = "    },"]
27061#[doc = "    \"id_to_index_map\": {"]
27062#[doc = "      \"type\": \"object\","]
27063#[doc = "      \"additionalProperties\": {"]
27064#[doc = "        \"type\": \"integer\","]
27065#[doc = "        \"format\": \"uint\","]
27066#[doc = "        \"minimum\": 0.0"]
27067#[doc = "      }"]
27068#[doc = "    },"]
27069#[doc = "    \"index_to_id_map\": {"]
27070#[doc = "      \"type\": \"object\","]
27071#[doc = "      \"additionalProperties\": {"]
27072#[doc = "        \"$ref\": \"#/components/schemas/ShardId\""]
27073#[doc = "      }"]
27074#[doc = "    },"]
27075#[doc = "    \"shard_ids\": {"]
27076#[doc = "      \"type\": \"array\","]
27077#[doc = "      \"items\": {"]
27078#[doc = "        \"$ref\": \"#/components/schemas/ShardId\""]
27079#[doc = "      }"]
27080#[doc = "    },"]
27081#[doc = "    \"shards_parent_map\": {"]
27082#[doc = "      \"type\": ["]
27083#[doc = "        \"object\","]
27084#[doc = "        \"null\""]
27085#[doc = "      ],"]
27086#[doc = "      \"additionalProperties\": {"]
27087#[doc = "        \"$ref\": \"#/components/schemas/ShardId\""]
27088#[doc = "      }"]
27089#[doc = "    },"]
27090#[doc = "    \"shards_split_map\": {"]
27091#[doc = "      \"type\": ["]
27092#[doc = "        \"object\","]
27093#[doc = "        \"null\""]
27094#[doc = "      ],"]
27095#[doc = "      \"additionalProperties\": {"]
27096#[doc = "        \"type\": \"array\","]
27097#[doc = "        \"items\": {"]
27098#[doc = "          \"$ref\": \"#/components/schemas/ShardId\""]
27099#[doc = "        }"]
27100#[doc = "      }"]
27101#[doc = "    },"]
27102#[doc = "    \"version\": {"]
27103#[doc = "      \"type\": \"integer\","]
27104#[doc = "      \"format\": \"uint32\","]
27105#[doc = "      \"minimum\": 0.0"]
27106#[doc = "    }"]
27107#[doc = "  }"]
27108#[doc = "}"]
27109#[doc = r" ```"]
27110#[doc = r" </details>"]
27111#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
27112pub struct ShardLayoutV2 {
27113    pub boundary_accounts: ::std::vec::Vec<AccountId>,
27114    pub id_to_index_map: ::std::collections::HashMap<::std::string::String, u32>,
27115    pub index_to_id_map: ::std::collections::HashMap<::std::string::String, ShardId>,
27116    pub shard_ids: ::std::vec::Vec<ShardId>,
27117    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
27118    pub shards_parent_map:
27119        ::std::option::Option<::std::collections::HashMap<::std::string::String, ShardId>>,
27120    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
27121    pub shards_split_map: ::std::option::Option<
27122        ::std::collections::HashMap<::std::string::String, ::std::vec::Vec<ShardId>>,
27123    >,
27124    pub version: u32,
27125}
27126impl ::std::convert::From<&ShardLayoutV2> for ShardLayoutV2 {
27127    fn from(value: &ShardLayoutV2) -> Self {
27128        value.clone()
27129    }
27130}
27131#[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`)"]
27132#[doc = r""]
27133#[doc = r" <details><summary>JSON schema</summary>"]
27134#[doc = r""]
27135#[doc = r" ```json"]
27136#[doc = "{"]
27137#[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`)\","]
27138#[doc = "  \"type\": \"object\","]
27139#[doc = "  \"required\": ["]
27140#[doc = "    \"shard_id\","]
27141#[doc = "    \"version\""]
27142#[doc = "  ],"]
27143#[doc = "  \"properties\": {"]
27144#[doc = "    \"shard_id\": {"]
27145#[doc = "      \"type\": \"integer\","]
27146#[doc = "      \"format\": \"uint32\","]
27147#[doc = "      \"minimum\": 0.0"]
27148#[doc = "    },"]
27149#[doc = "    \"version\": {"]
27150#[doc = "      \"type\": \"integer\","]
27151#[doc = "      \"format\": \"uint32\","]
27152#[doc = "      \"minimum\": 0.0"]
27153#[doc = "    }"]
27154#[doc = "  }"]
27155#[doc = "}"]
27156#[doc = r" ```"]
27157#[doc = r" </details>"]
27158#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
27159pub struct ShardUId {
27160    pub shard_id: u32,
27161    pub version: u32,
27162}
27163impl ::std::convert::From<&ShardUId> for ShardUId {
27164    fn from(value: &ShardUId) -> Self {
27165        value.clone()
27166    }
27167}
27168#[doc = "`Signature`"]
27169#[doc = r""]
27170#[doc = r" <details><summary>JSON schema</summary>"]
27171#[doc = r""]
27172#[doc = r" ```json"]
27173#[doc = "{"]
27174#[doc = "  \"type\": \"string\""]
27175#[doc = "}"]
27176#[doc = r" ```"]
27177#[doc = r" </details>"]
27178#[derive(
27179    :: serde :: Deserialize,
27180    :: serde :: Serialize,
27181    Clone,
27182    Debug,
27183    Eq,
27184    Hash,
27185    Ord,
27186    PartialEq,
27187    PartialOrd,
27188)]
27189#[serde(transparent)]
27190pub struct Signature(pub ::std::string::String);
27191impl ::std::ops::Deref for Signature {
27192    type Target = ::std::string::String;
27193    fn deref(&self) -> &::std::string::String {
27194        &self.0
27195    }
27196}
27197impl ::std::convert::From<Signature> for ::std::string::String {
27198    fn from(value: Signature) -> Self {
27199        value.0
27200    }
27201}
27202impl ::std::convert::From<&Signature> for Signature {
27203    fn from(value: &Signature) -> Self {
27204        value.clone()
27205    }
27206}
27207impl ::std::convert::From<::std::string::String> for Signature {
27208    fn from(value: ::std::string::String) -> Self {
27209        Self(value)
27210    }
27211}
27212impl ::std::str::FromStr for Signature {
27213    type Err = ::std::convert::Infallible;
27214    fn from_str(value: &str) -> ::std::result::Result<Self, Self::Err> {
27215        Ok(Self(value.to_string()))
27216    }
27217}
27218impl ::std::fmt::Display for Signature {
27219    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
27220        self.0.fmt(f)
27221    }
27222}
27223#[doc = "`SignedDelegateAction`"]
27224#[doc = r""]
27225#[doc = r" <details><summary>JSON schema</summary>"]
27226#[doc = r""]
27227#[doc = r" ```json"]
27228#[doc = "{"]
27229#[doc = "  \"type\": \"object\","]
27230#[doc = "  \"required\": ["]
27231#[doc = "    \"delegate_action\","]
27232#[doc = "    \"signature\""]
27233#[doc = "  ],"]
27234#[doc = "  \"properties\": {"]
27235#[doc = "    \"delegate_action\": {"]
27236#[doc = "      \"$ref\": \"#/components/schemas/DelegateAction\""]
27237#[doc = "    },"]
27238#[doc = "    \"signature\": {"]
27239#[doc = "      \"$ref\": \"#/components/schemas/Signature\""]
27240#[doc = "    }"]
27241#[doc = "  }"]
27242#[doc = "}"]
27243#[doc = r" ```"]
27244#[doc = r" </details>"]
27245#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
27246pub struct SignedDelegateAction {
27247    pub delegate_action: DelegateAction,
27248    pub signature: Signature,
27249}
27250impl ::std::convert::From<&SignedDelegateAction> for SignedDelegateAction {
27251    fn from(value: &SignedDelegateAction) -> Self {
27252        value.clone()
27253    }
27254}
27255#[doc = "`SignedTransaction`"]
27256#[doc = r""]
27257#[doc = r" <details><summary>JSON schema</summary>"]
27258#[doc = r""]
27259#[doc = r" ```json"]
27260#[doc = "{"]
27261#[doc = "  \"type\": \"string\","]
27262#[doc = "  \"format\": \"byte\""]
27263#[doc = "}"]
27264#[doc = r" ```"]
27265#[doc = r" </details>"]
27266#[derive(
27267    :: serde :: Deserialize,
27268    :: serde :: Serialize,
27269    Clone,
27270    Debug,
27271    Eq,
27272    Hash,
27273    Ord,
27274    PartialEq,
27275    PartialOrd,
27276)]
27277#[serde(transparent)]
27278pub struct SignedTransaction(pub ::std::string::String);
27279impl ::std::ops::Deref for SignedTransaction {
27280    type Target = ::std::string::String;
27281    fn deref(&self) -> &::std::string::String {
27282        &self.0
27283    }
27284}
27285impl ::std::convert::From<SignedTransaction> for ::std::string::String {
27286    fn from(value: SignedTransaction) -> Self {
27287        value.0
27288    }
27289}
27290impl ::std::convert::From<&SignedTransaction> for SignedTransaction {
27291    fn from(value: &SignedTransaction) -> Self {
27292        value.clone()
27293    }
27294}
27295impl ::std::convert::From<::std::string::String> for SignedTransaction {
27296    fn from(value: ::std::string::String) -> Self {
27297        Self(value)
27298    }
27299}
27300impl ::std::str::FromStr for SignedTransaction {
27301    type Err = ::std::convert::Infallible;
27302    fn from_str(value: &str) -> ::std::result::Result<Self, Self::Err> {
27303        Ok(Self(value.to_string()))
27304    }
27305}
27306impl ::std::fmt::Display for SignedTransaction {
27307    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
27308        self.0.fmt(f)
27309    }
27310}
27311#[doc = "`SignedTransactionView`"]
27312#[doc = r""]
27313#[doc = r" <details><summary>JSON schema</summary>"]
27314#[doc = r""]
27315#[doc = r" ```json"]
27316#[doc = "{"]
27317#[doc = "  \"type\": \"object\","]
27318#[doc = "  \"required\": ["]
27319#[doc = "    \"actions\","]
27320#[doc = "    \"hash\","]
27321#[doc = "    \"nonce\","]
27322#[doc = "    \"public_key\","]
27323#[doc = "    \"receiver_id\","]
27324#[doc = "    \"signature\","]
27325#[doc = "    \"signer_id\""]
27326#[doc = "  ],"]
27327#[doc = "  \"properties\": {"]
27328#[doc = "    \"actions\": {"]
27329#[doc = "      \"type\": \"array\","]
27330#[doc = "      \"items\": {"]
27331#[doc = "        \"$ref\": \"#/components/schemas/ActionView\""]
27332#[doc = "      }"]
27333#[doc = "    },"]
27334#[doc = "    \"hash\": {"]
27335#[doc = "      \"$ref\": \"#/components/schemas/CryptoHash\""]
27336#[doc = "    },"]
27337#[doc = "    \"nonce\": {"]
27338#[doc = "      \"type\": \"integer\","]
27339#[doc = "      \"format\": \"uint64\","]
27340#[doc = "      \"minimum\": 0.0"]
27341#[doc = "    },"]
27342#[doc = "    \"priority_fee\": {"]
27343#[doc = "      \"default\": 0,"]
27344#[doc = "      \"type\": \"integer\","]
27345#[doc = "      \"format\": \"uint64\","]
27346#[doc = "      \"minimum\": 0.0"]
27347#[doc = "    },"]
27348#[doc = "    \"public_key\": {"]
27349#[doc = "      \"$ref\": \"#/components/schemas/PublicKey\""]
27350#[doc = "    },"]
27351#[doc = "    \"receiver_id\": {"]
27352#[doc = "      \"$ref\": \"#/components/schemas/AccountId\""]
27353#[doc = "    },"]
27354#[doc = "    \"signature\": {"]
27355#[doc = "      \"$ref\": \"#/components/schemas/Signature\""]
27356#[doc = "    },"]
27357#[doc = "    \"signer_id\": {"]
27358#[doc = "      \"$ref\": \"#/components/schemas/AccountId\""]
27359#[doc = "    }"]
27360#[doc = "  }"]
27361#[doc = "}"]
27362#[doc = r" ```"]
27363#[doc = r" </details>"]
27364#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
27365pub struct SignedTransactionView {
27366    pub actions: ::std::vec::Vec<ActionView>,
27367    pub hash: CryptoHash,
27368    pub nonce: u64,
27369    #[serde(default)]
27370    pub priority_fee: u64,
27371    pub public_key: PublicKey,
27372    pub receiver_id: AccountId,
27373    pub signature: Signature,
27374    pub signer_id: AccountId,
27375}
27376impl ::std::convert::From<&SignedTransactionView> for SignedTransactionView {
27377    fn from(value: &SignedTransactionView) -> Self {
27378        value.clone()
27379    }
27380}
27381#[doc = "`SingleAccessKeyChangesByBlockIdChangesType`"]
27382#[doc = r""]
27383#[doc = r" <details><summary>JSON schema</summary>"]
27384#[doc = r""]
27385#[doc = r" ```json"]
27386#[doc = "{"]
27387#[doc = "  \"type\": \"string\","]
27388#[doc = "  \"enum\": ["]
27389#[doc = "    \"single_access_key_changes\""]
27390#[doc = "  ]"]
27391#[doc = "}"]
27392#[doc = r" ```"]
27393#[doc = r" </details>"]
27394#[derive(
27395    :: serde :: Deserialize,
27396    :: serde :: Serialize,
27397    Clone,
27398    Copy,
27399    Debug,
27400    Eq,
27401    Hash,
27402    Ord,
27403    PartialEq,
27404    PartialOrd,
27405)]
27406pub enum SingleAccessKeyChangesByBlockIdChangesType {
27407    #[serde(rename = "single_access_key_changes")]
27408    SingleAccessKeyChanges,
27409}
27410impl ::std::convert::From<&Self> for SingleAccessKeyChangesByBlockIdChangesType {
27411    fn from(value: &SingleAccessKeyChangesByBlockIdChangesType) -> Self {
27412        value.clone()
27413    }
27414}
27415impl ::std::fmt::Display for SingleAccessKeyChangesByBlockIdChangesType {
27416    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
27417        match *self {
27418            Self::SingleAccessKeyChanges => f.write_str("single_access_key_changes"),
27419        }
27420    }
27421}
27422impl ::std::str::FromStr for SingleAccessKeyChangesByBlockIdChangesType {
27423    type Err = self::error::ConversionError;
27424    fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
27425        match value {
27426            "single_access_key_changes" => Ok(Self::SingleAccessKeyChanges),
27427            _ => Err("invalid value".into()),
27428        }
27429    }
27430}
27431impl ::std::convert::TryFrom<&str> for SingleAccessKeyChangesByBlockIdChangesType {
27432    type Error = self::error::ConversionError;
27433    fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
27434        value.parse()
27435    }
27436}
27437impl ::std::convert::TryFrom<&::std::string::String>
27438    for SingleAccessKeyChangesByBlockIdChangesType
27439{
27440    type Error = self::error::ConversionError;
27441    fn try_from(
27442        value: &::std::string::String,
27443    ) -> ::std::result::Result<Self, self::error::ConversionError> {
27444        value.parse()
27445    }
27446}
27447impl ::std::convert::TryFrom<::std::string::String> for SingleAccessKeyChangesByBlockIdChangesType {
27448    type Error = self::error::ConversionError;
27449    fn try_from(
27450        value: ::std::string::String,
27451    ) -> ::std::result::Result<Self, self::error::ConversionError> {
27452        value.parse()
27453    }
27454}
27455#[doc = "`SingleAccessKeyChangesByFinalityChangesType`"]
27456#[doc = r""]
27457#[doc = r" <details><summary>JSON schema</summary>"]
27458#[doc = r""]
27459#[doc = r" ```json"]
27460#[doc = "{"]
27461#[doc = "  \"type\": \"string\","]
27462#[doc = "  \"enum\": ["]
27463#[doc = "    \"single_access_key_changes\""]
27464#[doc = "  ]"]
27465#[doc = "}"]
27466#[doc = r" ```"]
27467#[doc = r" </details>"]
27468#[derive(
27469    :: serde :: Deserialize,
27470    :: serde :: Serialize,
27471    Clone,
27472    Copy,
27473    Debug,
27474    Eq,
27475    Hash,
27476    Ord,
27477    PartialEq,
27478    PartialOrd,
27479)]
27480pub enum SingleAccessKeyChangesByFinalityChangesType {
27481    #[serde(rename = "single_access_key_changes")]
27482    SingleAccessKeyChanges,
27483}
27484impl ::std::convert::From<&Self> for SingleAccessKeyChangesByFinalityChangesType {
27485    fn from(value: &SingleAccessKeyChangesByFinalityChangesType) -> Self {
27486        value.clone()
27487    }
27488}
27489impl ::std::fmt::Display for SingleAccessKeyChangesByFinalityChangesType {
27490    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
27491        match *self {
27492            Self::SingleAccessKeyChanges => f.write_str("single_access_key_changes"),
27493        }
27494    }
27495}
27496impl ::std::str::FromStr for SingleAccessKeyChangesByFinalityChangesType {
27497    type Err = self::error::ConversionError;
27498    fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
27499        match value {
27500            "single_access_key_changes" => Ok(Self::SingleAccessKeyChanges),
27501            _ => Err("invalid value".into()),
27502        }
27503    }
27504}
27505impl ::std::convert::TryFrom<&str> for SingleAccessKeyChangesByFinalityChangesType {
27506    type Error = self::error::ConversionError;
27507    fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
27508        value.parse()
27509    }
27510}
27511impl ::std::convert::TryFrom<&::std::string::String>
27512    for SingleAccessKeyChangesByFinalityChangesType
27513{
27514    type Error = self::error::ConversionError;
27515    fn try_from(
27516        value: &::std::string::String,
27517    ) -> ::std::result::Result<Self, self::error::ConversionError> {
27518        value.parse()
27519    }
27520}
27521impl ::std::convert::TryFrom<::std::string::String>
27522    for SingleAccessKeyChangesByFinalityChangesType
27523{
27524    type Error = self::error::ConversionError;
27525    fn try_from(
27526        value: ::std::string::String,
27527    ) -> ::std::result::Result<Self, self::error::ConversionError> {
27528        value.parse()
27529    }
27530}
27531#[doc = "`SingleAccessKeyChangesBySyncCheckpointChangesType`"]
27532#[doc = r""]
27533#[doc = r" <details><summary>JSON schema</summary>"]
27534#[doc = r""]
27535#[doc = r" ```json"]
27536#[doc = "{"]
27537#[doc = "  \"type\": \"string\","]
27538#[doc = "  \"enum\": ["]
27539#[doc = "    \"single_access_key_changes\""]
27540#[doc = "  ]"]
27541#[doc = "}"]
27542#[doc = r" ```"]
27543#[doc = r" </details>"]
27544#[derive(
27545    :: serde :: Deserialize,
27546    :: serde :: Serialize,
27547    Clone,
27548    Copy,
27549    Debug,
27550    Eq,
27551    Hash,
27552    Ord,
27553    PartialEq,
27554    PartialOrd,
27555)]
27556pub enum SingleAccessKeyChangesBySyncCheckpointChangesType {
27557    #[serde(rename = "single_access_key_changes")]
27558    SingleAccessKeyChanges,
27559}
27560impl ::std::convert::From<&Self> for SingleAccessKeyChangesBySyncCheckpointChangesType {
27561    fn from(value: &SingleAccessKeyChangesBySyncCheckpointChangesType) -> Self {
27562        value.clone()
27563    }
27564}
27565impl ::std::fmt::Display for SingleAccessKeyChangesBySyncCheckpointChangesType {
27566    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
27567        match *self {
27568            Self::SingleAccessKeyChanges => f.write_str("single_access_key_changes"),
27569        }
27570    }
27571}
27572impl ::std::str::FromStr for SingleAccessKeyChangesBySyncCheckpointChangesType {
27573    type Err = self::error::ConversionError;
27574    fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
27575        match value {
27576            "single_access_key_changes" => Ok(Self::SingleAccessKeyChanges),
27577            _ => Err("invalid value".into()),
27578        }
27579    }
27580}
27581impl ::std::convert::TryFrom<&str> for SingleAccessKeyChangesBySyncCheckpointChangesType {
27582    type Error = self::error::ConversionError;
27583    fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
27584        value.parse()
27585    }
27586}
27587impl ::std::convert::TryFrom<&::std::string::String>
27588    for SingleAccessKeyChangesBySyncCheckpointChangesType
27589{
27590    type Error = self::error::ConversionError;
27591    fn try_from(
27592        value: &::std::string::String,
27593    ) -> ::std::result::Result<Self, self::error::ConversionError> {
27594        value.parse()
27595    }
27596}
27597impl ::std::convert::TryFrom<::std::string::String>
27598    for SingleAccessKeyChangesBySyncCheckpointChangesType
27599{
27600    type Error = self::error::ConversionError;
27601    fn try_from(
27602        value: ::std::string::String,
27603    ) -> ::std::result::Result<Self, self::error::ConversionError> {
27604        value.parse()
27605    }
27606}
27607#[doc = "`SingleGasKeyChangesByBlockIdChangesType`"]
27608#[doc = r""]
27609#[doc = r" <details><summary>JSON schema</summary>"]
27610#[doc = r""]
27611#[doc = r" ```json"]
27612#[doc = "{"]
27613#[doc = "  \"type\": \"string\","]
27614#[doc = "  \"enum\": ["]
27615#[doc = "    \"single_gas_key_changes\""]
27616#[doc = "  ]"]
27617#[doc = "}"]
27618#[doc = r" ```"]
27619#[doc = r" </details>"]
27620#[derive(
27621    :: serde :: Deserialize,
27622    :: serde :: Serialize,
27623    Clone,
27624    Copy,
27625    Debug,
27626    Eq,
27627    Hash,
27628    Ord,
27629    PartialEq,
27630    PartialOrd,
27631)]
27632pub enum SingleGasKeyChangesByBlockIdChangesType {
27633    #[serde(rename = "single_gas_key_changes")]
27634    SingleGasKeyChanges,
27635}
27636impl ::std::convert::From<&Self> for SingleGasKeyChangesByBlockIdChangesType {
27637    fn from(value: &SingleGasKeyChangesByBlockIdChangesType) -> Self {
27638        value.clone()
27639    }
27640}
27641impl ::std::fmt::Display for SingleGasKeyChangesByBlockIdChangesType {
27642    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
27643        match *self {
27644            Self::SingleGasKeyChanges => f.write_str("single_gas_key_changes"),
27645        }
27646    }
27647}
27648impl ::std::str::FromStr for SingleGasKeyChangesByBlockIdChangesType {
27649    type Err = self::error::ConversionError;
27650    fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
27651        match value {
27652            "single_gas_key_changes" => Ok(Self::SingleGasKeyChanges),
27653            _ => Err("invalid value".into()),
27654        }
27655    }
27656}
27657impl ::std::convert::TryFrom<&str> for SingleGasKeyChangesByBlockIdChangesType {
27658    type Error = self::error::ConversionError;
27659    fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
27660        value.parse()
27661    }
27662}
27663impl ::std::convert::TryFrom<&::std::string::String> for SingleGasKeyChangesByBlockIdChangesType {
27664    type Error = self::error::ConversionError;
27665    fn try_from(
27666        value: &::std::string::String,
27667    ) -> ::std::result::Result<Self, self::error::ConversionError> {
27668        value.parse()
27669    }
27670}
27671impl ::std::convert::TryFrom<::std::string::String> for SingleGasKeyChangesByBlockIdChangesType {
27672    type Error = self::error::ConversionError;
27673    fn try_from(
27674        value: ::std::string::String,
27675    ) -> ::std::result::Result<Self, self::error::ConversionError> {
27676        value.parse()
27677    }
27678}
27679#[doc = "`SingleGasKeyChangesByFinalityChangesType`"]
27680#[doc = r""]
27681#[doc = r" <details><summary>JSON schema</summary>"]
27682#[doc = r""]
27683#[doc = r" ```json"]
27684#[doc = "{"]
27685#[doc = "  \"type\": \"string\","]
27686#[doc = "  \"enum\": ["]
27687#[doc = "    \"single_gas_key_changes\""]
27688#[doc = "  ]"]
27689#[doc = "}"]
27690#[doc = r" ```"]
27691#[doc = r" </details>"]
27692#[derive(
27693    :: serde :: Deserialize,
27694    :: serde :: Serialize,
27695    Clone,
27696    Copy,
27697    Debug,
27698    Eq,
27699    Hash,
27700    Ord,
27701    PartialEq,
27702    PartialOrd,
27703)]
27704pub enum SingleGasKeyChangesByFinalityChangesType {
27705    #[serde(rename = "single_gas_key_changes")]
27706    SingleGasKeyChanges,
27707}
27708impl ::std::convert::From<&Self> for SingleGasKeyChangesByFinalityChangesType {
27709    fn from(value: &SingleGasKeyChangesByFinalityChangesType) -> Self {
27710        value.clone()
27711    }
27712}
27713impl ::std::fmt::Display for SingleGasKeyChangesByFinalityChangesType {
27714    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
27715        match *self {
27716            Self::SingleGasKeyChanges => f.write_str("single_gas_key_changes"),
27717        }
27718    }
27719}
27720impl ::std::str::FromStr for SingleGasKeyChangesByFinalityChangesType {
27721    type Err = self::error::ConversionError;
27722    fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
27723        match value {
27724            "single_gas_key_changes" => Ok(Self::SingleGasKeyChanges),
27725            _ => Err("invalid value".into()),
27726        }
27727    }
27728}
27729impl ::std::convert::TryFrom<&str> for SingleGasKeyChangesByFinalityChangesType {
27730    type Error = self::error::ConversionError;
27731    fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
27732        value.parse()
27733    }
27734}
27735impl ::std::convert::TryFrom<&::std::string::String> for SingleGasKeyChangesByFinalityChangesType {
27736    type Error = self::error::ConversionError;
27737    fn try_from(
27738        value: &::std::string::String,
27739    ) -> ::std::result::Result<Self, self::error::ConversionError> {
27740        value.parse()
27741    }
27742}
27743impl ::std::convert::TryFrom<::std::string::String> for SingleGasKeyChangesByFinalityChangesType {
27744    type Error = self::error::ConversionError;
27745    fn try_from(
27746        value: ::std::string::String,
27747    ) -> ::std::result::Result<Self, self::error::ConversionError> {
27748        value.parse()
27749    }
27750}
27751#[doc = "`SingleGasKeyChangesBySyncCheckpointChangesType`"]
27752#[doc = r""]
27753#[doc = r" <details><summary>JSON schema</summary>"]
27754#[doc = r""]
27755#[doc = r" ```json"]
27756#[doc = "{"]
27757#[doc = "  \"type\": \"string\","]
27758#[doc = "  \"enum\": ["]
27759#[doc = "    \"single_gas_key_changes\""]
27760#[doc = "  ]"]
27761#[doc = "}"]
27762#[doc = r" ```"]
27763#[doc = r" </details>"]
27764#[derive(
27765    :: serde :: Deserialize,
27766    :: serde :: Serialize,
27767    Clone,
27768    Copy,
27769    Debug,
27770    Eq,
27771    Hash,
27772    Ord,
27773    PartialEq,
27774    PartialOrd,
27775)]
27776pub enum SingleGasKeyChangesBySyncCheckpointChangesType {
27777    #[serde(rename = "single_gas_key_changes")]
27778    SingleGasKeyChanges,
27779}
27780impl ::std::convert::From<&Self> for SingleGasKeyChangesBySyncCheckpointChangesType {
27781    fn from(value: &SingleGasKeyChangesBySyncCheckpointChangesType) -> Self {
27782        value.clone()
27783    }
27784}
27785impl ::std::fmt::Display for SingleGasKeyChangesBySyncCheckpointChangesType {
27786    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
27787        match *self {
27788            Self::SingleGasKeyChanges => f.write_str("single_gas_key_changes"),
27789        }
27790    }
27791}
27792impl ::std::str::FromStr for SingleGasKeyChangesBySyncCheckpointChangesType {
27793    type Err = self::error::ConversionError;
27794    fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
27795        match value {
27796            "single_gas_key_changes" => Ok(Self::SingleGasKeyChanges),
27797            _ => Err("invalid value".into()),
27798        }
27799    }
27800}
27801impl ::std::convert::TryFrom<&str> for SingleGasKeyChangesBySyncCheckpointChangesType {
27802    type Error = self::error::ConversionError;
27803    fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
27804        value.parse()
27805    }
27806}
27807impl ::std::convert::TryFrom<&::std::string::String>
27808    for SingleGasKeyChangesBySyncCheckpointChangesType
27809{
27810    type Error = self::error::ConversionError;
27811    fn try_from(
27812        value: &::std::string::String,
27813    ) -> ::std::result::Result<Self, self::error::ConversionError> {
27814        value.parse()
27815    }
27816}
27817impl ::std::convert::TryFrom<::std::string::String>
27818    for SingleGasKeyChangesBySyncCheckpointChangesType
27819{
27820    type Error = self::error::ConversionError;
27821    fn try_from(
27822        value: ::std::string::String,
27823    ) -> ::std::result::Result<Self, self::error::ConversionError> {
27824        value.parse()
27825    }
27826}
27827#[doc = "`SlashedValidator`"]
27828#[doc = r""]
27829#[doc = r" <details><summary>JSON schema</summary>"]
27830#[doc = r""]
27831#[doc = r" ```json"]
27832#[doc = "{"]
27833#[doc = "  \"type\": \"object\","]
27834#[doc = "  \"required\": ["]
27835#[doc = "    \"account_id\","]
27836#[doc = "    \"is_double_sign\""]
27837#[doc = "  ],"]
27838#[doc = "  \"properties\": {"]
27839#[doc = "    \"account_id\": {"]
27840#[doc = "      \"$ref\": \"#/components/schemas/AccountId\""]
27841#[doc = "    },"]
27842#[doc = "    \"is_double_sign\": {"]
27843#[doc = "      \"type\": \"boolean\""]
27844#[doc = "    }"]
27845#[doc = "  }"]
27846#[doc = "}"]
27847#[doc = r" ```"]
27848#[doc = r" </details>"]
27849#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
27850pub struct SlashedValidator {
27851    pub account_id: AccountId,
27852    pub is_double_sign: bool,
27853}
27854impl ::std::convert::From<&SlashedValidator> for SlashedValidator {
27855    fn from(value: &SlashedValidator) -> Self {
27856        value.clone()
27857    }
27858}
27859#[doc = "An action which stakes signer_id tokens and setup's validator public key"]
27860#[doc = r""]
27861#[doc = r" <details><summary>JSON schema</summary>"]
27862#[doc = r""]
27863#[doc = r" ```json"]
27864#[doc = "{"]
27865#[doc = "  \"description\": \"An action which stakes signer_id tokens and setup's validator public key\","]
27866#[doc = "  \"type\": \"object\","]
27867#[doc = "  \"required\": ["]
27868#[doc = "    \"public_key\","]
27869#[doc = "    \"stake\""]
27870#[doc = "  ],"]
27871#[doc = "  \"properties\": {"]
27872#[doc = "    \"public_key\": {"]
27873#[doc = "      \"description\": \"Validator key which will be used to sign transactions on behalf of signer_id\","]
27874#[doc = "      \"allOf\": ["]
27875#[doc = "        {"]
27876#[doc = "          \"$ref\": \"#/components/schemas/PublicKey\""]
27877#[doc = "        }"]
27878#[doc = "      ]"]
27879#[doc = "    },"]
27880#[doc = "    \"stake\": {"]
27881#[doc = "      \"description\": \"Amount of tokens to stake.\","]
27882#[doc = "      \"allOf\": ["]
27883#[doc = "        {"]
27884#[doc = "          \"$ref\": \"#/components/schemas/NearToken\""]
27885#[doc = "        }"]
27886#[doc = "      ]"]
27887#[doc = "    }"]
27888#[doc = "  }"]
27889#[doc = "}"]
27890#[doc = r" ```"]
27891#[doc = r" </details>"]
27892#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
27893pub struct StakeAction {
27894    #[doc = "Validator key which will be used to sign transactions on behalf of signer_id"]
27895    pub public_key: PublicKey,
27896    #[doc = "Amount of tokens to stake."]
27897    pub stake: NearToken,
27898}
27899impl ::std::convert::From<&StakeAction> for StakeAction {
27900    fn from(value: &StakeAction) -> Self {
27901        value.clone()
27902    }
27903}
27904#[doc = "See crate::types::StateChangeCause for details."]
27905#[doc = r""]
27906#[doc = r" <details><summary>JSON schema</summary>"]
27907#[doc = r""]
27908#[doc = r" ```json"]
27909#[doc = "{"]
27910#[doc = "  \"description\": \"See crate::types::StateChangeCause for details.\","]
27911#[doc = "  \"oneOf\": ["]
27912#[doc = "    {"]
27913#[doc = "      \"type\": \"object\","]
27914#[doc = "      \"required\": ["]
27915#[doc = "        \"type\""]
27916#[doc = "      ],"]
27917#[doc = "      \"properties\": {"]
27918#[doc = "        \"type\": {"]
27919#[doc = "          \"type\": \"string\","]
27920#[doc = "          \"enum\": ["]
27921#[doc = "            \"not_writable_to_disk\""]
27922#[doc = "          ]"]
27923#[doc = "        }"]
27924#[doc = "      }"]
27925#[doc = "    },"]
27926#[doc = "    {"]
27927#[doc = "      \"type\": \"object\","]
27928#[doc = "      \"required\": ["]
27929#[doc = "        \"type\""]
27930#[doc = "      ],"]
27931#[doc = "      \"properties\": {"]
27932#[doc = "        \"type\": {"]
27933#[doc = "          \"type\": \"string\","]
27934#[doc = "          \"enum\": ["]
27935#[doc = "            \"initial_state\""]
27936#[doc = "          ]"]
27937#[doc = "        }"]
27938#[doc = "      }"]
27939#[doc = "    },"]
27940#[doc = "    {"]
27941#[doc = "      \"type\": \"object\","]
27942#[doc = "      \"required\": ["]
27943#[doc = "        \"tx_hash\","]
27944#[doc = "        \"type\""]
27945#[doc = "      ],"]
27946#[doc = "      \"properties\": {"]
27947#[doc = "        \"tx_hash\": {"]
27948#[doc = "          \"$ref\": \"#/components/schemas/CryptoHash\""]
27949#[doc = "        },"]
27950#[doc = "        \"type\": {"]
27951#[doc = "          \"type\": \"string\","]
27952#[doc = "          \"enum\": ["]
27953#[doc = "            \"transaction_processing\""]
27954#[doc = "          ]"]
27955#[doc = "        }"]
27956#[doc = "      }"]
27957#[doc = "    },"]
27958#[doc = "    {"]
27959#[doc = "      \"type\": \"object\","]
27960#[doc = "      \"required\": ["]
27961#[doc = "        \"receipt_hash\","]
27962#[doc = "        \"type\""]
27963#[doc = "      ],"]
27964#[doc = "      \"properties\": {"]
27965#[doc = "        \"receipt_hash\": {"]
27966#[doc = "          \"$ref\": \"#/components/schemas/CryptoHash\""]
27967#[doc = "        },"]
27968#[doc = "        \"type\": {"]
27969#[doc = "          \"type\": \"string\","]
27970#[doc = "          \"enum\": ["]
27971#[doc = "            \"action_receipt_processing_started\""]
27972#[doc = "          ]"]
27973#[doc = "        }"]
27974#[doc = "      }"]
27975#[doc = "    },"]
27976#[doc = "    {"]
27977#[doc = "      \"type\": \"object\","]
27978#[doc = "      \"required\": ["]
27979#[doc = "        \"receipt_hash\","]
27980#[doc = "        \"type\""]
27981#[doc = "      ],"]
27982#[doc = "      \"properties\": {"]
27983#[doc = "        \"receipt_hash\": {"]
27984#[doc = "          \"$ref\": \"#/components/schemas/CryptoHash\""]
27985#[doc = "        },"]
27986#[doc = "        \"type\": {"]
27987#[doc = "          \"type\": \"string\","]
27988#[doc = "          \"enum\": ["]
27989#[doc = "            \"action_receipt_gas_reward\""]
27990#[doc = "          ]"]
27991#[doc = "        }"]
27992#[doc = "      }"]
27993#[doc = "    },"]
27994#[doc = "    {"]
27995#[doc = "      \"type\": \"object\","]
27996#[doc = "      \"required\": ["]
27997#[doc = "        \"receipt_hash\","]
27998#[doc = "        \"type\""]
27999#[doc = "      ],"]
28000#[doc = "      \"properties\": {"]
28001#[doc = "        \"receipt_hash\": {"]
28002#[doc = "          \"$ref\": \"#/components/schemas/CryptoHash\""]
28003#[doc = "        },"]
28004#[doc = "        \"type\": {"]
28005#[doc = "          \"type\": \"string\","]
28006#[doc = "          \"enum\": ["]
28007#[doc = "            \"receipt_processing\""]
28008#[doc = "          ]"]
28009#[doc = "        }"]
28010#[doc = "      }"]
28011#[doc = "    },"]
28012#[doc = "    {"]
28013#[doc = "      \"type\": \"object\","]
28014#[doc = "      \"required\": ["]
28015#[doc = "        \"receipt_hash\","]
28016#[doc = "        \"type\""]
28017#[doc = "      ],"]
28018#[doc = "      \"properties\": {"]
28019#[doc = "        \"receipt_hash\": {"]
28020#[doc = "          \"$ref\": \"#/components/schemas/CryptoHash\""]
28021#[doc = "        },"]
28022#[doc = "        \"type\": {"]
28023#[doc = "          \"type\": \"string\","]
28024#[doc = "          \"enum\": ["]
28025#[doc = "            \"postponed_receipt\""]
28026#[doc = "          ]"]
28027#[doc = "        }"]
28028#[doc = "      }"]
28029#[doc = "    },"]
28030#[doc = "    {"]
28031#[doc = "      \"type\": \"object\","]
28032#[doc = "      \"required\": ["]
28033#[doc = "        \"type\""]
28034#[doc = "      ],"]
28035#[doc = "      \"properties\": {"]
28036#[doc = "        \"type\": {"]
28037#[doc = "          \"type\": \"string\","]
28038#[doc = "          \"enum\": ["]
28039#[doc = "            \"updated_delayed_receipts\""]
28040#[doc = "          ]"]
28041#[doc = "        }"]
28042#[doc = "      }"]
28043#[doc = "    },"]
28044#[doc = "    {"]
28045#[doc = "      \"type\": \"object\","]
28046#[doc = "      \"required\": ["]
28047#[doc = "        \"type\""]
28048#[doc = "      ],"]
28049#[doc = "      \"properties\": {"]
28050#[doc = "        \"type\": {"]
28051#[doc = "          \"type\": \"string\","]
28052#[doc = "          \"enum\": ["]
28053#[doc = "            \"validator_accounts_update\""]
28054#[doc = "          ]"]
28055#[doc = "        }"]
28056#[doc = "      }"]
28057#[doc = "    },"]
28058#[doc = "    {"]
28059#[doc = "      \"type\": \"object\","]
28060#[doc = "      \"required\": ["]
28061#[doc = "        \"type\""]
28062#[doc = "      ],"]
28063#[doc = "      \"properties\": {"]
28064#[doc = "        \"type\": {"]
28065#[doc = "          \"type\": \"string\","]
28066#[doc = "          \"enum\": ["]
28067#[doc = "            \"migration\""]
28068#[doc = "          ]"]
28069#[doc = "        }"]
28070#[doc = "      }"]
28071#[doc = "    },"]
28072#[doc = "    {"]
28073#[doc = "      \"type\": \"object\","]
28074#[doc = "      \"required\": ["]
28075#[doc = "        \"type\""]
28076#[doc = "      ],"]
28077#[doc = "      \"properties\": {"]
28078#[doc = "        \"type\": {"]
28079#[doc = "          \"type\": \"string\","]
28080#[doc = "          \"enum\": ["]
28081#[doc = "            \"bandwidth_scheduler_state_update\""]
28082#[doc = "          ]"]
28083#[doc = "        }"]
28084#[doc = "      }"]
28085#[doc = "    }"]
28086#[doc = "  ]"]
28087#[doc = "}"]
28088#[doc = r" ```"]
28089#[doc = r" </details>"]
28090#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
28091#[serde(tag = "type")]
28092pub enum StateChangeCauseView {
28093    #[serde(rename = "not_writable_to_disk")]
28094    NotWritableToDisk,
28095    #[serde(rename = "initial_state")]
28096    InitialState,
28097    #[serde(rename = "transaction_processing")]
28098    TransactionProcessing { tx_hash: CryptoHash },
28099    #[serde(rename = "action_receipt_processing_started")]
28100    ActionReceiptProcessingStarted { receipt_hash: CryptoHash },
28101    #[serde(rename = "action_receipt_gas_reward")]
28102    ActionReceiptGasReward { receipt_hash: CryptoHash },
28103    #[serde(rename = "receipt_processing")]
28104    ReceiptProcessing { receipt_hash: CryptoHash },
28105    #[serde(rename = "postponed_receipt")]
28106    PostponedReceipt { receipt_hash: CryptoHash },
28107    #[serde(rename = "updated_delayed_receipts")]
28108    UpdatedDelayedReceipts,
28109    #[serde(rename = "validator_accounts_update")]
28110    ValidatorAccountsUpdate,
28111    #[serde(rename = "migration")]
28112    Migration,
28113    #[serde(rename = "bandwidth_scheduler_state_update")]
28114    BandwidthSchedulerStateUpdate,
28115}
28116impl ::std::convert::From<&Self> for StateChangeCauseView {
28117    fn from(value: &StateChangeCauseView) -> Self {
28118        value.clone()
28119    }
28120}
28121#[doc = "It is a [serializable view] of [`StateChangeKind`].\n\n[serializable view]: ./index.html\n[`StateChangeKind`]: ../types/struct.StateChangeKind.html"]
28122#[doc = r""]
28123#[doc = r" <details><summary>JSON schema</summary>"]
28124#[doc = r""]
28125#[doc = r" ```json"]
28126#[doc = "{"]
28127#[doc = "  \"description\": \"It is a [serializable view] of [`StateChangeKind`].\\n\\n[serializable view]: ./index.html\\n[`StateChangeKind`]: ../types/struct.StateChangeKind.html\","]
28128#[doc = "  \"oneOf\": ["]
28129#[doc = "    {"]
28130#[doc = "      \"type\": \"object\","]
28131#[doc = "      \"required\": ["]
28132#[doc = "        \"account_id\","]
28133#[doc = "        \"type\""]
28134#[doc = "      ],"]
28135#[doc = "      \"properties\": {"]
28136#[doc = "        \"account_id\": {"]
28137#[doc = "          \"$ref\": \"#/components/schemas/AccountId\""]
28138#[doc = "        },"]
28139#[doc = "        \"type\": {"]
28140#[doc = "          \"type\": \"string\","]
28141#[doc = "          \"enum\": ["]
28142#[doc = "            \"account_touched\""]
28143#[doc = "          ]"]
28144#[doc = "        }"]
28145#[doc = "      }"]
28146#[doc = "    },"]
28147#[doc = "    {"]
28148#[doc = "      \"type\": \"object\","]
28149#[doc = "      \"required\": ["]
28150#[doc = "        \"account_id\","]
28151#[doc = "        \"type\""]
28152#[doc = "      ],"]
28153#[doc = "      \"properties\": {"]
28154#[doc = "        \"account_id\": {"]
28155#[doc = "          \"$ref\": \"#/components/schemas/AccountId\""]
28156#[doc = "        },"]
28157#[doc = "        \"type\": {"]
28158#[doc = "          \"type\": \"string\","]
28159#[doc = "          \"enum\": ["]
28160#[doc = "            \"access_key_touched\""]
28161#[doc = "          ]"]
28162#[doc = "        }"]
28163#[doc = "      }"]
28164#[doc = "    },"]
28165#[doc = "    {"]
28166#[doc = "      \"type\": \"object\","]
28167#[doc = "      \"required\": ["]
28168#[doc = "        \"account_id\","]
28169#[doc = "        \"type\""]
28170#[doc = "      ],"]
28171#[doc = "      \"properties\": {"]
28172#[doc = "        \"account_id\": {"]
28173#[doc = "          \"$ref\": \"#/components/schemas/AccountId\""]
28174#[doc = "        },"]
28175#[doc = "        \"type\": {"]
28176#[doc = "          \"type\": \"string\","]
28177#[doc = "          \"enum\": ["]
28178#[doc = "            \"data_touched\""]
28179#[doc = "          ]"]
28180#[doc = "        }"]
28181#[doc = "      }"]
28182#[doc = "    },"]
28183#[doc = "    {"]
28184#[doc = "      \"type\": \"object\","]
28185#[doc = "      \"required\": ["]
28186#[doc = "        \"account_id\","]
28187#[doc = "        \"type\""]
28188#[doc = "      ],"]
28189#[doc = "      \"properties\": {"]
28190#[doc = "        \"account_id\": {"]
28191#[doc = "          \"$ref\": \"#/components/schemas/AccountId\""]
28192#[doc = "        },"]
28193#[doc = "        \"type\": {"]
28194#[doc = "          \"type\": \"string\","]
28195#[doc = "          \"enum\": ["]
28196#[doc = "            \"contract_code_touched\""]
28197#[doc = "          ]"]
28198#[doc = "        }"]
28199#[doc = "      }"]
28200#[doc = "    }"]
28201#[doc = "  ]"]
28202#[doc = "}"]
28203#[doc = r" ```"]
28204#[doc = r" </details>"]
28205#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
28206#[serde(tag = "type", content = "account_id")]
28207pub enum StateChangeKindView {
28208    #[serde(rename = "account_touched")]
28209    AccountTouched(AccountId),
28210    #[serde(rename = "access_key_touched")]
28211    AccessKeyTouched(AccountId),
28212    #[serde(rename = "data_touched")]
28213    DataTouched(AccountId),
28214    #[serde(rename = "contract_code_touched")]
28215    ContractCodeTouched(AccountId),
28216}
28217impl ::std::convert::From<&Self> for StateChangeKindView {
28218    fn from(value: &StateChangeKindView) -> Self {
28219        value.clone()
28220    }
28221}
28222#[doc = "`StateChangeWithCauseView`"]
28223#[doc = r""]
28224#[doc = r" <details><summary>JSON schema</summary>"]
28225#[doc = r""]
28226#[doc = r" ```json"]
28227#[doc = "{"]
28228#[doc = "  \"type\": \"object\","]
28229#[doc = "  \"oneOf\": ["]
28230#[doc = "    {"]
28231#[doc = "      \"type\": \"object\","]
28232#[doc = "      \"required\": ["]
28233#[doc = "        \"change\","]
28234#[doc = "        \"type\""]
28235#[doc = "      ],"]
28236#[doc = "      \"properties\": {"]
28237#[doc = "        \"change\": {"]
28238#[doc = "          \"description\": \"A view of the account\","]
28239#[doc = "          \"type\": \"object\","]
28240#[doc = "          \"required\": ["]
28241#[doc = "            \"account_id\","]
28242#[doc = "            \"amount\","]
28243#[doc = "            \"code_hash\","]
28244#[doc = "            \"locked\","]
28245#[doc = "            \"storage_usage\""]
28246#[doc = "          ],"]
28247#[doc = "          \"properties\": {"]
28248#[doc = "            \"account_id\": {"]
28249#[doc = "              \"$ref\": \"#/components/schemas/AccountId\""]
28250#[doc = "            },"]
28251#[doc = "            \"amount\": {"]
28252#[doc = "              \"$ref\": \"#/components/schemas/NearToken\""]
28253#[doc = "            },"]
28254#[doc = "            \"code_hash\": {"]
28255#[doc = "              \"$ref\": \"#/components/schemas/CryptoHash\""]
28256#[doc = "            },"]
28257#[doc = "            \"global_contract_account_id\": {"]
28258#[doc = "              \"anyOf\": ["]
28259#[doc = "                {"]
28260#[doc = "                  \"$ref\": \"#/components/schemas/AccountId\""]
28261#[doc = "                },"]
28262#[doc = "                {"]
28263#[doc = "                  \"type\": \"null\""]
28264#[doc = "                }"]
28265#[doc = "              ]"]
28266#[doc = "            },"]
28267#[doc = "            \"global_contract_hash\": {"]
28268#[doc = "              \"anyOf\": ["]
28269#[doc = "                {"]
28270#[doc = "                  \"$ref\": \"#/components/schemas/CryptoHash\""]
28271#[doc = "                },"]
28272#[doc = "                {"]
28273#[doc = "                  \"type\": \"null\""]
28274#[doc = "                }"]
28275#[doc = "              ]"]
28276#[doc = "            },"]
28277#[doc = "            \"locked\": {"]
28278#[doc = "              \"$ref\": \"#/components/schemas/NearToken\""]
28279#[doc = "            },"]
28280#[doc = "            \"storage_paid_at\": {"]
28281#[doc = "              \"description\": \"TODO(2271): deprecated.\","]
28282#[doc = "              \"default\": 0,"]
28283#[doc = "              \"type\": \"integer\","]
28284#[doc = "              \"format\": \"uint64\","]
28285#[doc = "              \"minimum\": 0.0"]
28286#[doc = "            },"]
28287#[doc = "            \"storage_usage\": {"]
28288#[doc = "              \"type\": \"integer\","]
28289#[doc = "              \"format\": \"uint64\","]
28290#[doc = "              \"minimum\": 0.0"]
28291#[doc = "            }"]
28292#[doc = "          }"]
28293#[doc = "        },"]
28294#[doc = "        \"type\": {"]
28295#[doc = "          \"type\": \"string\","]
28296#[doc = "          \"enum\": ["]
28297#[doc = "            \"account_update\""]
28298#[doc = "          ]"]
28299#[doc = "        }"]
28300#[doc = "      }"]
28301#[doc = "    },"]
28302#[doc = "    {"]
28303#[doc = "      \"type\": \"object\","]
28304#[doc = "      \"required\": ["]
28305#[doc = "        \"change\","]
28306#[doc = "        \"type\""]
28307#[doc = "      ],"]
28308#[doc = "      \"properties\": {"]
28309#[doc = "        \"change\": {"]
28310#[doc = "          \"type\": \"object\","]
28311#[doc = "          \"required\": ["]
28312#[doc = "            \"account_id\""]
28313#[doc = "          ],"]
28314#[doc = "          \"properties\": {"]
28315#[doc = "            \"account_id\": {"]
28316#[doc = "              \"$ref\": \"#/components/schemas/AccountId\""]
28317#[doc = "            }"]
28318#[doc = "          }"]
28319#[doc = "        },"]
28320#[doc = "        \"type\": {"]
28321#[doc = "          \"type\": \"string\","]
28322#[doc = "          \"enum\": ["]
28323#[doc = "            \"account_deletion\""]
28324#[doc = "          ]"]
28325#[doc = "        }"]
28326#[doc = "      }"]
28327#[doc = "    },"]
28328#[doc = "    {"]
28329#[doc = "      \"type\": \"object\","]
28330#[doc = "      \"required\": ["]
28331#[doc = "        \"change\","]
28332#[doc = "        \"type\""]
28333#[doc = "      ],"]
28334#[doc = "      \"properties\": {"]
28335#[doc = "        \"change\": {"]
28336#[doc = "          \"type\": \"object\","]
28337#[doc = "          \"required\": ["]
28338#[doc = "            \"access_key\","]
28339#[doc = "            \"account_id\","]
28340#[doc = "            \"public_key\""]
28341#[doc = "          ],"]
28342#[doc = "          \"properties\": {"]
28343#[doc = "            \"access_key\": {"]
28344#[doc = "              \"$ref\": \"#/components/schemas/AccessKeyView\""]
28345#[doc = "            },"]
28346#[doc = "            \"account_id\": {"]
28347#[doc = "              \"$ref\": \"#/components/schemas/AccountId\""]
28348#[doc = "            },"]
28349#[doc = "            \"public_key\": {"]
28350#[doc = "              \"$ref\": \"#/components/schemas/PublicKey\""]
28351#[doc = "            }"]
28352#[doc = "          }"]
28353#[doc = "        },"]
28354#[doc = "        \"type\": {"]
28355#[doc = "          \"type\": \"string\","]
28356#[doc = "          \"enum\": ["]
28357#[doc = "            \"access_key_update\""]
28358#[doc = "          ]"]
28359#[doc = "        }"]
28360#[doc = "      }"]
28361#[doc = "    },"]
28362#[doc = "    {"]
28363#[doc = "      \"type\": \"object\","]
28364#[doc = "      \"required\": ["]
28365#[doc = "        \"change\","]
28366#[doc = "        \"type\""]
28367#[doc = "      ],"]
28368#[doc = "      \"properties\": {"]
28369#[doc = "        \"change\": {"]
28370#[doc = "          \"type\": \"object\","]
28371#[doc = "          \"required\": ["]
28372#[doc = "            \"account_id\","]
28373#[doc = "            \"public_key\""]
28374#[doc = "          ],"]
28375#[doc = "          \"properties\": {"]
28376#[doc = "            \"account_id\": {"]
28377#[doc = "              \"$ref\": \"#/components/schemas/AccountId\""]
28378#[doc = "            },"]
28379#[doc = "            \"public_key\": {"]
28380#[doc = "              \"$ref\": \"#/components/schemas/PublicKey\""]
28381#[doc = "            }"]
28382#[doc = "          }"]
28383#[doc = "        },"]
28384#[doc = "        \"type\": {"]
28385#[doc = "          \"type\": \"string\","]
28386#[doc = "          \"enum\": ["]
28387#[doc = "            \"access_key_deletion\""]
28388#[doc = "          ]"]
28389#[doc = "        }"]
28390#[doc = "      }"]
28391#[doc = "    },"]
28392#[doc = "    {"]
28393#[doc = "      \"type\": \"object\","]
28394#[doc = "      \"required\": ["]
28395#[doc = "        \"change\","]
28396#[doc = "        \"type\""]
28397#[doc = "      ],"]
28398#[doc = "      \"properties\": {"]
28399#[doc = "        \"change\": {"]
28400#[doc = "          \"type\": \"object\","]
28401#[doc = "          \"required\": ["]
28402#[doc = "            \"account_id\","]
28403#[doc = "            \"gas_key\","]
28404#[doc = "            \"public_key\""]
28405#[doc = "          ],"]
28406#[doc = "          \"properties\": {"]
28407#[doc = "            \"account_id\": {"]
28408#[doc = "              \"$ref\": \"#/components/schemas/AccountId\""]
28409#[doc = "            },"]
28410#[doc = "            \"gas_key\": {"]
28411#[doc = "              \"$ref\": \"#/components/schemas/GasKeyView\""]
28412#[doc = "            },"]
28413#[doc = "            \"public_key\": {"]
28414#[doc = "              \"$ref\": \"#/components/schemas/PublicKey\""]
28415#[doc = "            }"]
28416#[doc = "          }"]
28417#[doc = "        },"]
28418#[doc = "        \"type\": {"]
28419#[doc = "          \"type\": \"string\","]
28420#[doc = "          \"enum\": ["]
28421#[doc = "            \"gas_key_update\""]
28422#[doc = "          ]"]
28423#[doc = "        }"]
28424#[doc = "      }"]
28425#[doc = "    },"]
28426#[doc = "    {"]
28427#[doc = "      \"type\": \"object\","]
28428#[doc = "      \"required\": ["]
28429#[doc = "        \"change\","]
28430#[doc = "        \"type\""]
28431#[doc = "      ],"]
28432#[doc = "      \"properties\": {"]
28433#[doc = "        \"change\": {"]
28434#[doc = "          \"type\": \"object\","]
28435#[doc = "          \"required\": ["]
28436#[doc = "            \"account_id\","]
28437#[doc = "            \"index\","]
28438#[doc = "            \"nonce\","]
28439#[doc = "            \"public_key\""]
28440#[doc = "          ],"]
28441#[doc = "          \"properties\": {"]
28442#[doc = "            \"account_id\": {"]
28443#[doc = "              \"$ref\": \"#/components/schemas/AccountId\""]
28444#[doc = "            },"]
28445#[doc = "            \"index\": {"]
28446#[doc = "              \"type\": \"integer\","]
28447#[doc = "              \"format\": \"uint32\","]
28448#[doc = "              \"minimum\": 0.0"]
28449#[doc = "            },"]
28450#[doc = "            \"nonce\": {"]
28451#[doc = "              \"type\": \"integer\","]
28452#[doc = "              \"format\": \"uint64\","]
28453#[doc = "              \"minimum\": 0.0"]
28454#[doc = "            },"]
28455#[doc = "            \"public_key\": {"]
28456#[doc = "              \"$ref\": \"#/components/schemas/PublicKey\""]
28457#[doc = "            }"]
28458#[doc = "          }"]
28459#[doc = "        },"]
28460#[doc = "        \"type\": {"]
28461#[doc = "          \"type\": \"string\","]
28462#[doc = "          \"enum\": ["]
28463#[doc = "            \"gas_key_nonce_update\""]
28464#[doc = "          ]"]
28465#[doc = "        }"]
28466#[doc = "      }"]
28467#[doc = "    },"]
28468#[doc = "    {"]
28469#[doc = "      \"type\": \"object\","]
28470#[doc = "      \"required\": ["]
28471#[doc = "        \"change\","]
28472#[doc = "        \"type\""]
28473#[doc = "      ],"]
28474#[doc = "      \"properties\": {"]
28475#[doc = "        \"change\": {"]
28476#[doc = "          \"type\": \"object\","]
28477#[doc = "          \"required\": ["]
28478#[doc = "            \"account_id\","]
28479#[doc = "            \"public_key\""]
28480#[doc = "          ],"]
28481#[doc = "          \"properties\": {"]
28482#[doc = "            \"account_id\": {"]
28483#[doc = "              \"$ref\": \"#/components/schemas/AccountId\""]
28484#[doc = "            },"]
28485#[doc = "            \"public_key\": {"]
28486#[doc = "              \"$ref\": \"#/components/schemas/PublicKey\""]
28487#[doc = "            }"]
28488#[doc = "          }"]
28489#[doc = "        },"]
28490#[doc = "        \"type\": {"]
28491#[doc = "          \"type\": \"string\","]
28492#[doc = "          \"enum\": ["]
28493#[doc = "            \"gas_key_deletion\""]
28494#[doc = "          ]"]
28495#[doc = "        }"]
28496#[doc = "      }"]
28497#[doc = "    },"]
28498#[doc = "    {"]
28499#[doc = "      \"type\": \"object\","]
28500#[doc = "      \"required\": ["]
28501#[doc = "        \"change\","]
28502#[doc = "        \"type\""]
28503#[doc = "      ],"]
28504#[doc = "      \"properties\": {"]
28505#[doc = "        \"change\": {"]
28506#[doc = "          \"type\": \"object\","]
28507#[doc = "          \"required\": ["]
28508#[doc = "            \"account_id\","]
28509#[doc = "            \"key_base64\","]
28510#[doc = "            \"value_base64\""]
28511#[doc = "          ],"]
28512#[doc = "          \"properties\": {"]
28513#[doc = "            \"account_id\": {"]
28514#[doc = "              \"$ref\": \"#/components/schemas/AccountId\""]
28515#[doc = "            },"]
28516#[doc = "            \"key_base64\": {"]
28517#[doc = "              \"$ref\": \"#/components/schemas/StoreKey\""]
28518#[doc = "            },"]
28519#[doc = "            \"value_base64\": {"]
28520#[doc = "              \"$ref\": \"#/components/schemas/StoreValue\""]
28521#[doc = "            }"]
28522#[doc = "          }"]
28523#[doc = "        },"]
28524#[doc = "        \"type\": {"]
28525#[doc = "          \"type\": \"string\","]
28526#[doc = "          \"enum\": ["]
28527#[doc = "            \"data_update\""]
28528#[doc = "          ]"]
28529#[doc = "        }"]
28530#[doc = "      }"]
28531#[doc = "    },"]
28532#[doc = "    {"]
28533#[doc = "      \"type\": \"object\","]
28534#[doc = "      \"required\": ["]
28535#[doc = "        \"change\","]
28536#[doc = "        \"type\""]
28537#[doc = "      ],"]
28538#[doc = "      \"properties\": {"]
28539#[doc = "        \"change\": {"]
28540#[doc = "          \"type\": \"object\","]
28541#[doc = "          \"required\": ["]
28542#[doc = "            \"account_id\","]
28543#[doc = "            \"key_base64\""]
28544#[doc = "          ],"]
28545#[doc = "          \"properties\": {"]
28546#[doc = "            \"account_id\": {"]
28547#[doc = "              \"$ref\": \"#/components/schemas/AccountId\""]
28548#[doc = "            },"]
28549#[doc = "            \"key_base64\": {"]
28550#[doc = "              \"$ref\": \"#/components/schemas/StoreKey\""]
28551#[doc = "            }"]
28552#[doc = "          }"]
28553#[doc = "        },"]
28554#[doc = "        \"type\": {"]
28555#[doc = "          \"type\": \"string\","]
28556#[doc = "          \"enum\": ["]
28557#[doc = "            \"data_deletion\""]
28558#[doc = "          ]"]
28559#[doc = "        }"]
28560#[doc = "      }"]
28561#[doc = "    },"]
28562#[doc = "    {"]
28563#[doc = "      \"type\": \"object\","]
28564#[doc = "      \"required\": ["]
28565#[doc = "        \"change\","]
28566#[doc = "        \"type\""]
28567#[doc = "      ],"]
28568#[doc = "      \"properties\": {"]
28569#[doc = "        \"change\": {"]
28570#[doc = "          \"type\": \"object\","]
28571#[doc = "          \"required\": ["]
28572#[doc = "            \"account_id\","]
28573#[doc = "            \"code_base64\""]
28574#[doc = "          ],"]
28575#[doc = "          \"properties\": {"]
28576#[doc = "            \"account_id\": {"]
28577#[doc = "              \"$ref\": \"#/components/schemas/AccountId\""]
28578#[doc = "            },"]
28579#[doc = "            \"code_base64\": {"]
28580#[doc = "              \"type\": \"string\""]
28581#[doc = "            }"]
28582#[doc = "          }"]
28583#[doc = "        },"]
28584#[doc = "        \"type\": {"]
28585#[doc = "          \"type\": \"string\","]
28586#[doc = "          \"enum\": ["]
28587#[doc = "            \"contract_code_update\""]
28588#[doc = "          ]"]
28589#[doc = "        }"]
28590#[doc = "      }"]
28591#[doc = "    },"]
28592#[doc = "    {"]
28593#[doc = "      \"type\": \"object\","]
28594#[doc = "      \"required\": ["]
28595#[doc = "        \"change\","]
28596#[doc = "        \"type\""]
28597#[doc = "      ],"]
28598#[doc = "      \"properties\": {"]
28599#[doc = "        \"change\": {"]
28600#[doc = "          \"type\": \"object\","]
28601#[doc = "          \"required\": ["]
28602#[doc = "            \"account_id\""]
28603#[doc = "          ],"]
28604#[doc = "          \"properties\": {"]
28605#[doc = "            \"account_id\": {"]
28606#[doc = "              \"$ref\": \"#/components/schemas/AccountId\""]
28607#[doc = "            }"]
28608#[doc = "          }"]
28609#[doc = "        },"]
28610#[doc = "        \"type\": {"]
28611#[doc = "          \"type\": \"string\","]
28612#[doc = "          \"enum\": ["]
28613#[doc = "            \"contract_code_deletion\""]
28614#[doc = "          ]"]
28615#[doc = "        }"]
28616#[doc = "      }"]
28617#[doc = "    }"]
28618#[doc = "  ],"]
28619#[doc = "  \"required\": ["]
28620#[doc = "    \"cause\""]
28621#[doc = "  ],"]
28622#[doc = "  \"properties\": {"]
28623#[doc = "    \"cause\": {"]
28624#[doc = "      \"$ref\": \"#/components/schemas/StateChangeCauseView\""]
28625#[doc = "    }"]
28626#[doc = "  }"]
28627#[doc = "}"]
28628#[doc = r" ```"]
28629#[doc = r" </details>"]
28630#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
28631#[serde(untagged)]
28632pub enum StateChangeWithCauseView {
28633    Variant0 {
28634        cause: StateChangeCauseView,
28635        change: StateChangeWithCauseViewVariant0Change,
28636        #[serde(rename = "type")]
28637        type_: StateChangeWithCauseViewVariant0Type,
28638    },
28639    Variant1 {
28640        cause: StateChangeCauseView,
28641        change: StateChangeWithCauseViewVariant1Change,
28642        #[serde(rename = "type")]
28643        type_: StateChangeWithCauseViewVariant1Type,
28644    },
28645    Variant2 {
28646        cause: StateChangeCauseView,
28647        change: StateChangeWithCauseViewVariant2Change,
28648        #[serde(rename = "type")]
28649        type_: StateChangeWithCauseViewVariant2Type,
28650    },
28651    Variant3 {
28652        cause: StateChangeCauseView,
28653        change: StateChangeWithCauseViewVariant3Change,
28654        #[serde(rename = "type")]
28655        type_: StateChangeWithCauseViewVariant3Type,
28656    },
28657    Variant4 {
28658        cause: StateChangeCauseView,
28659        change: StateChangeWithCauseViewVariant4Change,
28660        #[serde(rename = "type")]
28661        type_: StateChangeWithCauseViewVariant4Type,
28662    },
28663    Variant5 {
28664        cause: StateChangeCauseView,
28665        change: StateChangeWithCauseViewVariant5Change,
28666        #[serde(rename = "type")]
28667        type_: StateChangeWithCauseViewVariant5Type,
28668    },
28669    Variant6 {
28670        cause: StateChangeCauseView,
28671        change: StateChangeWithCauseViewVariant6Change,
28672        #[serde(rename = "type")]
28673        type_: StateChangeWithCauseViewVariant6Type,
28674    },
28675    Variant7 {
28676        cause: StateChangeCauseView,
28677        change: StateChangeWithCauseViewVariant7Change,
28678        #[serde(rename = "type")]
28679        type_: StateChangeWithCauseViewVariant7Type,
28680    },
28681    Variant8 {
28682        cause: StateChangeCauseView,
28683        change: StateChangeWithCauseViewVariant8Change,
28684        #[serde(rename = "type")]
28685        type_: StateChangeWithCauseViewVariant8Type,
28686    },
28687    Variant9 {
28688        cause: StateChangeCauseView,
28689        change: StateChangeWithCauseViewVariant9Change,
28690        #[serde(rename = "type")]
28691        type_: StateChangeWithCauseViewVariant9Type,
28692    },
28693    Variant10 {
28694        cause: StateChangeCauseView,
28695        change: StateChangeWithCauseViewVariant10Change,
28696        #[serde(rename = "type")]
28697        type_: StateChangeWithCauseViewVariant10Type,
28698    },
28699}
28700impl ::std::convert::From<&Self> for StateChangeWithCauseView {
28701    fn from(value: &StateChangeWithCauseView) -> Self {
28702        value.clone()
28703    }
28704}
28705#[doc = "A view of the account"]
28706#[doc = r""]
28707#[doc = r" <details><summary>JSON schema</summary>"]
28708#[doc = r""]
28709#[doc = r" ```json"]
28710#[doc = "{"]
28711#[doc = "  \"description\": \"A view of the account\","]
28712#[doc = "  \"type\": \"object\","]
28713#[doc = "  \"required\": ["]
28714#[doc = "    \"account_id\","]
28715#[doc = "    \"amount\","]
28716#[doc = "    \"code_hash\","]
28717#[doc = "    \"locked\","]
28718#[doc = "    \"storage_usage\""]
28719#[doc = "  ],"]
28720#[doc = "  \"properties\": {"]
28721#[doc = "    \"access_key\": false,"]
28722#[doc = "    \"account_id\": {"]
28723#[doc = "      \"$ref\": \"#/components/schemas/AccountId\""]
28724#[doc = "    },"]
28725#[doc = "    \"amount\": {"]
28726#[doc = "      \"$ref\": \"#/components/schemas/NearToken\""]
28727#[doc = "    },"]
28728#[doc = "    \"code_base64\": false,"]
28729#[doc = "    \"code_hash\": {"]
28730#[doc = "      \"$ref\": \"#/components/schemas/CryptoHash\""]
28731#[doc = "    },"]
28732#[doc = "    \"gas_key\": false,"]
28733#[doc = "    \"global_contract_account_id\": {"]
28734#[doc = "      \"anyOf\": ["]
28735#[doc = "        {"]
28736#[doc = "          \"$ref\": \"#/components/schemas/AccountId\""]
28737#[doc = "        },"]
28738#[doc = "        {"]
28739#[doc = "          \"type\": \"null\""]
28740#[doc = "        }"]
28741#[doc = "      ]"]
28742#[doc = "    },"]
28743#[doc = "    \"global_contract_hash\": {"]
28744#[doc = "      \"anyOf\": ["]
28745#[doc = "        {"]
28746#[doc = "          \"$ref\": \"#/components/schemas/CryptoHash\""]
28747#[doc = "        },"]
28748#[doc = "        {"]
28749#[doc = "          \"type\": \"null\""]
28750#[doc = "        }"]
28751#[doc = "      ]"]
28752#[doc = "    },"]
28753#[doc = "    \"index\": false,"]
28754#[doc = "    \"key_base64\": false,"]
28755#[doc = "    \"locked\": {"]
28756#[doc = "      \"$ref\": \"#/components/schemas/NearToken\""]
28757#[doc = "    },"]
28758#[doc = "    \"nonce\": false,"]
28759#[doc = "    \"public_key\": false,"]
28760#[doc = "    \"storage_paid_at\": {"]
28761#[doc = "      \"description\": \"TODO(2271): deprecated.\","]
28762#[doc = "      \"default\": 0,"]
28763#[doc = "      \"type\": \"integer\","]
28764#[doc = "      \"format\": \"uint64\","]
28765#[doc = "      \"minimum\": 0.0"]
28766#[doc = "    },"]
28767#[doc = "    \"storage_usage\": {"]
28768#[doc = "      \"type\": \"integer\","]
28769#[doc = "      \"format\": \"uint64\","]
28770#[doc = "      \"minimum\": 0.0"]
28771#[doc = "    },"]
28772#[doc = "    \"value_base64\": false"]
28773#[doc = "  }"]
28774#[doc = "}"]
28775#[doc = r" ```"]
28776#[doc = r" </details>"]
28777#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
28778pub struct StateChangeWithCauseViewVariant0Change {
28779    pub account_id: AccountId,
28780    pub amount: NearToken,
28781    pub code_hash: CryptoHash,
28782    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
28783    pub global_contract_account_id: ::std::option::Option<AccountId>,
28784    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
28785    pub global_contract_hash: ::std::option::Option<CryptoHash>,
28786    pub locked: NearToken,
28787    #[doc = "TODO(2271): deprecated."]
28788    #[serde(default)]
28789    pub storage_paid_at: u64,
28790    pub storage_usage: u64,
28791}
28792impl ::std::convert::From<&StateChangeWithCauseViewVariant0Change>
28793    for StateChangeWithCauseViewVariant0Change
28794{
28795    fn from(value: &StateChangeWithCauseViewVariant0Change) -> Self {
28796        value.clone()
28797    }
28798}
28799#[doc = "`StateChangeWithCauseViewVariant0Type`"]
28800#[doc = r""]
28801#[doc = r" <details><summary>JSON schema</summary>"]
28802#[doc = r""]
28803#[doc = r" ```json"]
28804#[doc = "{"]
28805#[doc = "  \"type\": \"string\","]
28806#[doc = "  \"enum\": ["]
28807#[doc = "    \"account_update\""]
28808#[doc = "  ]"]
28809#[doc = "}"]
28810#[doc = r" ```"]
28811#[doc = r" </details>"]
28812#[derive(
28813    :: serde :: Deserialize,
28814    :: serde :: Serialize,
28815    Clone,
28816    Copy,
28817    Debug,
28818    Eq,
28819    Hash,
28820    Ord,
28821    PartialEq,
28822    PartialOrd,
28823)]
28824pub enum StateChangeWithCauseViewVariant0Type {
28825    #[serde(rename = "account_update")]
28826    AccountUpdate,
28827}
28828impl ::std::convert::From<&Self> for StateChangeWithCauseViewVariant0Type {
28829    fn from(value: &StateChangeWithCauseViewVariant0Type) -> Self {
28830        value.clone()
28831    }
28832}
28833impl ::std::fmt::Display for StateChangeWithCauseViewVariant0Type {
28834    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
28835        match *self {
28836            Self::AccountUpdate => f.write_str("account_update"),
28837        }
28838    }
28839}
28840impl ::std::str::FromStr for StateChangeWithCauseViewVariant0Type {
28841    type Err = self::error::ConversionError;
28842    fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
28843        match value {
28844            "account_update" => Ok(Self::AccountUpdate),
28845            _ => Err("invalid value".into()),
28846        }
28847    }
28848}
28849impl ::std::convert::TryFrom<&str> for StateChangeWithCauseViewVariant0Type {
28850    type Error = self::error::ConversionError;
28851    fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
28852        value.parse()
28853    }
28854}
28855impl ::std::convert::TryFrom<&::std::string::String> for StateChangeWithCauseViewVariant0Type {
28856    type Error = self::error::ConversionError;
28857    fn try_from(
28858        value: &::std::string::String,
28859    ) -> ::std::result::Result<Self, self::error::ConversionError> {
28860        value.parse()
28861    }
28862}
28863impl ::std::convert::TryFrom<::std::string::String> for StateChangeWithCauseViewVariant0Type {
28864    type Error = self::error::ConversionError;
28865    fn try_from(
28866        value: ::std::string::String,
28867    ) -> ::std::result::Result<Self, self::error::ConversionError> {
28868        value.parse()
28869    }
28870}
28871#[doc = "`StateChangeWithCauseViewVariant10Change`"]
28872#[doc = r""]
28873#[doc = r" <details><summary>JSON schema</summary>"]
28874#[doc = r""]
28875#[doc = r" ```json"]
28876#[doc = "{"]
28877#[doc = "  \"type\": \"object\","]
28878#[doc = "  \"required\": ["]
28879#[doc = "    \"account_id\""]
28880#[doc = "  ],"]
28881#[doc = "  \"properties\": {"]
28882#[doc = "    \"access_key\": false,"]
28883#[doc = "    \"account_id\": {"]
28884#[doc = "      \"$ref\": \"#/components/schemas/AccountId\""]
28885#[doc = "    },"]
28886#[doc = "    \"amount\": false,"]
28887#[doc = "    \"code_base64\": false,"]
28888#[doc = "    \"code_hash\": false,"]
28889#[doc = "    \"gas_key\": false,"]
28890#[doc = "    \"global_contract_account_id\": false,"]
28891#[doc = "    \"global_contract_hash\": false,"]
28892#[doc = "    \"index\": false,"]
28893#[doc = "    \"key_base64\": false,"]
28894#[doc = "    \"locked\": false,"]
28895#[doc = "    \"nonce\": false,"]
28896#[doc = "    \"public_key\": false,"]
28897#[doc = "    \"storage_paid_at\": false,"]
28898#[doc = "    \"storage_usage\": false,"]
28899#[doc = "    \"value_base64\": false"]
28900#[doc = "  }"]
28901#[doc = "}"]
28902#[doc = r" ```"]
28903#[doc = r" </details>"]
28904#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
28905pub struct StateChangeWithCauseViewVariant10Change {
28906    pub account_id: AccountId,
28907}
28908impl ::std::convert::From<&StateChangeWithCauseViewVariant10Change>
28909    for StateChangeWithCauseViewVariant10Change
28910{
28911    fn from(value: &StateChangeWithCauseViewVariant10Change) -> Self {
28912        value.clone()
28913    }
28914}
28915#[doc = "`StateChangeWithCauseViewVariant10Type`"]
28916#[doc = r""]
28917#[doc = r" <details><summary>JSON schema</summary>"]
28918#[doc = r""]
28919#[doc = r" ```json"]
28920#[doc = "{"]
28921#[doc = "  \"type\": \"string\","]
28922#[doc = "  \"enum\": ["]
28923#[doc = "    \"contract_code_deletion\""]
28924#[doc = "  ]"]
28925#[doc = "}"]
28926#[doc = r" ```"]
28927#[doc = r" </details>"]
28928#[derive(
28929    :: serde :: Deserialize,
28930    :: serde :: Serialize,
28931    Clone,
28932    Copy,
28933    Debug,
28934    Eq,
28935    Hash,
28936    Ord,
28937    PartialEq,
28938    PartialOrd,
28939)]
28940pub enum StateChangeWithCauseViewVariant10Type {
28941    #[serde(rename = "contract_code_deletion")]
28942    ContractCodeDeletion,
28943}
28944impl ::std::convert::From<&Self> for StateChangeWithCauseViewVariant10Type {
28945    fn from(value: &StateChangeWithCauseViewVariant10Type) -> Self {
28946        value.clone()
28947    }
28948}
28949impl ::std::fmt::Display for StateChangeWithCauseViewVariant10Type {
28950    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
28951        match *self {
28952            Self::ContractCodeDeletion => f.write_str("contract_code_deletion"),
28953        }
28954    }
28955}
28956impl ::std::str::FromStr for StateChangeWithCauseViewVariant10Type {
28957    type Err = self::error::ConversionError;
28958    fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
28959        match value {
28960            "contract_code_deletion" => Ok(Self::ContractCodeDeletion),
28961            _ => Err("invalid value".into()),
28962        }
28963    }
28964}
28965impl ::std::convert::TryFrom<&str> for StateChangeWithCauseViewVariant10Type {
28966    type Error = self::error::ConversionError;
28967    fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
28968        value.parse()
28969    }
28970}
28971impl ::std::convert::TryFrom<&::std::string::String> for StateChangeWithCauseViewVariant10Type {
28972    type Error = self::error::ConversionError;
28973    fn try_from(
28974        value: &::std::string::String,
28975    ) -> ::std::result::Result<Self, self::error::ConversionError> {
28976        value.parse()
28977    }
28978}
28979impl ::std::convert::TryFrom<::std::string::String> for StateChangeWithCauseViewVariant10Type {
28980    type Error = self::error::ConversionError;
28981    fn try_from(
28982        value: ::std::string::String,
28983    ) -> ::std::result::Result<Self, self::error::ConversionError> {
28984        value.parse()
28985    }
28986}
28987#[doc = "`StateChangeWithCauseViewVariant1Change`"]
28988#[doc = r""]
28989#[doc = r" <details><summary>JSON schema</summary>"]
28990#[doc = r""]
28991#[doc = r" ```json"]
28992#[doc = "{"]
28993#[doc = "  \"type\": \"object\","]
28994#[doc = "  \"required\": ["]
28995#[doc = "    \"account_id\""]
28996#[doc = "  ],"]
28997#[doc = "  \"properties\": {"]
28998#[doc = "    \"access_key\": false,"]
28999#[doc = "    \"account_id\": {"]
29000#[doc = "      \"$ref\": \"#/components/schemas/AccountId\""]
29001#[doc = "    },"]
29002#[doc = "    \"amount\": false,"]
29003#[doc = "    \"code_base64\": false,"]
29004#[doc = "    \"code_hash\": false,"]
29005#[doc = "    \"gas_key\": false,"]
29006#[doc = "    \"global_contract_account_id\": false,"]
29007#[doc = "    \"global_contract_hash\": false,"]
29008#[doc = "    \"index\": false,"]
29009#[doc = "    \"key_base64\": false,"]
29010#[doc = "    \"locked\": false,"]
29011#[doc = "    \"nonce\": false,"]
29012#[doc = "    \"public_key\": false,"]
29013#[doc = "    \"storage_paid_at\": false,"]
29014#[doc = "    \"storage_usage\": false,"]
29015#[doc = "    \"value_base64\": false"]
29016#[doc = "  }"]
29017#[doc = "}"]
29018#[doc = r" ```"]
29019#[doc = r" </details>"]
29020#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
29021pub struct StateChangeWithCauseViewVariant1Change {
29022    pub account_id: AccountId,
29023}
29024impl ::std::convert::From<&StateChangeWithCauseViewVariant1Change>
29025    for StateChangeWithCauseViewVariant1Change
29026{
29027    fn from(value: &StateChangeWithCauseViewVariant1Change) -> Self {
29028        value.clone()
29029    }
29030}
29031#[doc = "`StateChangeWithCauseViewVariant1Type`"]
29032#[doc = r""]
29033#[doc = r" <details><summary>JSON schema</summary>"]
29034#[doc = r""]
29035#[doc = r" ```json"]
29036#[doc = "{"]
29037#[doc = "  \"type\": \"string\","]
29038#[doc = "  \"enum\": ["]
29039#[doc = "    \"account_deletion\""]
29040#[doc = "  ]"]
29041#[doc = "}"]
29042#[doc = r" ```"]
29043#[doc = r" </details>"]
29044#[derive(
29045    :: serde :: Deserialize,
29046    :: serde :: Serialize,
29047    Clone,
29048    Copy,
29049    Debug,
29050    Eq,
29051    Hash,
29052    Ord,
29053    PartialEq,
29054    PartialOrd,
29055)]
29056pub enum StateChangeWithCauseViewVariant1Type {
29057    #[serde(rename = "account_deletion")]
29058    AccountDeletion,
29059}
29060impl ::std::convert::From<&Self> for StateChangeWithCauseViewVariant1Type {
29061    fn from(value: &StateChangeWithCauseViewVariant1Type) -> Self {
29062        value.clone()
29063    }
29064}
29065impl ::std::fmt::Display for StateChangeWithCauseViewVariant1Type {
29066    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
29067        match *self {
29068            Self::AccountDeletion => f.write_str("account_deletion"),
29069        }
29070    }
29071}
29072impl ::std::str::FromStr for StateChangeWithCauseViewVariant1Type {
29073    type Err = self::error::ConversionError;
29074    fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
29075        match value {
29076            "account_deletion" => Ok(Self::AccountDeletion),
29077            _ => Err("invalid value".into()),
29078        }
29079    }
29080}
29081impl ::std::convert::TryFrom<&str> for StateChangeWithCauseViewVariant1Type {
29082    type Error = self::error::ConversionError;
29083    fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
29084        value.parse()
29085    }
29086}
29087impl ::std::convert::TryFrom<&::std::string::String> for StateChangeWithCauseViewVariant1Type {
29088    type Error = self::error::ConversionError;
29089    fn try_from(
29090        value: &::std::string::String,
29091    ) -> ::std::result::Result<Self, self::error::ConversionError> {
29092        value.parse()
29093    }
29094}
29095impl ::std::convert::TryFrom<::std::string::String> for StateChangeWithCauseViewVariant1Type {
29096    type Error = self::error::ConversionError;
29097    fn try_from(
29098        value: ::std::string::String,
29099    ) -> ::std::result::Result<Self, self::error::ConversionError> {
29100        value.parse()
29101    }
29102}
29103#[doc = "`StateChangeWithCauseViewVariant2Change`"]
29104#[doc = r""]
29105#[doc = r" <details><summary>JSON schema</summary>"]
29106#[doc = r""]
29107#[doc = r" ```json"]
29108#[doc = "{"]
29109#[doc = "  \"type\": \"object\","]
29110#[doc = "  \"required\": ["]
29111#[doc = "    \"access_key\","]
29112#[doc = "    \"account_id\","]
29113#[doc = "    \"public_key\""]
29114#[doc = "  ],"]
29115#[doc = "  \"properties\": {"]
29116#[doc = "    \"access_key\": {"]
29117#[doc = "      \"$ref\": \"#/components/schemas/AccessKeyView\""]
29118#[doc = "    },"]
29119#[doc = "    \"account_id\": {"]
29120#[doc = "      \"$ref\": \"#/components/schemas/AccountId\""]
29121#[doc = "    },"]
29122#[doc = "    \"amount\": false,"]
29123#[doc = "    \"code_base64\": false,"]
29124#[doc = "    \"code_hash\": false,"]
29125#[doc = "    \"gas_key\": false,"]
29126#[doc = "    \"global_contract_account_id\": false,"]
29127#[doc = "    \"global_contract_hash\": false,"]
29128#[doc = "    \"index\": false,"]
29129#[doc = "    \"key_base64\": false,"]
29130#[doc = "    \"locked\": false,"]
29131#[doc = "    \"nonce\": false,"]
29132#[doc = "    \"public_key\": {"]
29133#[doc = "      \"$ref\": \"#/components/schemas/PublicKey\""]
29134#[doc = "    },"]
29135#[doc = "    \"storage_paid_at\": false,"]
29136#[doc = "    \"storage_usage\": false,"]
29137#[doc = "    \"value_base64\": false"]
29138#[doc = "  }"]
29139#[doc = "}"]
29140#[doc = r" ```"]
29141#[doc = r" </details>"]
29142#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
29143pub struct StateChangeWithCauseViewVariant2Change {
29144    pub access_key: AccessKeyView,
29145    pub account_id: AccountId,
29146    pub public_key: PublicKey,
29147}
29148impl ::std::convert::From<&StateChangeWithCauseViewVariant2Change>
29149    for StateChangeWithCauseViewVariant2Change
29150{
29151    fn from(value: &StateChangeWithCauseViewVariant2Change) -> Self {
29152        value.clone()
29153    }
29154}
29155#[doc = "`StateChangeWithCauseViewVariant2Type`"]
29156#[doc = r""]
29157#[doc = r" <details><summary>JSON schema</summary>"]
29158#[doc = r""]
29159#[doc = r" ```json"]
29160#[doc = "{"]
29161#[doc = "  \"type\": \"string\","]
29162#[doc = "  \"enum\": ["]
29163#[doc = "    \"access_key_update\""]
29164#[doc = "  ]"]
29165#[doc = "}"]
29166#[doc = r" ```"]
29167#[doc = r" </details>"]
29168#[derive(
29169    :: serde :: Deserialize,
29170    :: serde :: Serialize,
29171    Clone,
29172    Copy,
29173    Debug,
29174    Eq,
29175    Hash,
29176    Ord,
29177    PartialEq,
29178    PartialOrd,
29179)]
29180pub enum StateChangeWithCauseViewVariant2Type {
29181    #[serde(rename = "access_key_update")]
29182    AccessKeyUpdate,
29183}
29184impl ::std::convert::From<&Self> for StateChangeWithCauseViewVariant2Type {
29185    fn from(value: &StateChangeWithCauseViewVariant2Type) -> Self {
29186        value.clone()
29187    }
29188}
29189impl ::std::fmt::Display for StateChangeWithCauseViewVariant2Type {
29190    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
29191        match *self {
29192            Self::AccessKeyUpdate => f.write_str("access_key_update"),
29193        }
29194    }
29195}
29196impl ::std::str::FromStr for StateChangeWithCauseViewVariant2Type {
29197    type Err = self::error::ConversionError;
29198    fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
29199        match value {
29200            "access_key_update" => Ok(Self::AccessKeyUpdate),
29201            _ => Err("invalid value".into()),
29202        }
29203    }
29204}
29205impl ::std::convert::TryFrom<&str> for StateChangeWithCauseViewVariant2Type {
29206    type Error = self::error::ConversionError;
29207    fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
29208        value.parse()
29209    }
29210}
29211impl ::std::convert::TryFrom<&::std::string::String> for StateChangeWithCauseViewVariant2Type {
29212    type Error = self::error::ConversionError;
29213    fn try_from(
29214        value: &::std::string::String,
29215    ) -> ::std::result::Result<Self, self::error::ConversionError> {
29216        value.parse()
29217    }
29218}
29219impl ::std::convert::TryFrom<::std::string::String> for StateChangeWithCauseViewVariant2Type {
29220    type Error = self::error::ConversionError;
29221    fn try_from(
29222        value: ::std::string::String,
29223    ) -> ::std::result::Result<Self, self::error::ConversionError> {
29224        value.parse()
29225    }
29226}
29227#[doc = "`StateChangeWithCauseViewVariant3Change`"]
29228#[doc = r""]
29229#[doc = r" <details><summary>JSON schema</summary>"]
29230#[doc = r""]
29231#[doc = r" ```json"]
29232#[doc = "{"]
29233#[doc = "  \"type\": \"object\","]
29234#[doc = "  \"required\": ["]
29235#[doc = "    \"account_id\","]
29236#[doc = "    \"public_key\""]
29237#[doc = "  ],"]
29238#[doc = "  \"properties\": {"]
29239#[doc = "    \"access_key\": false,"]
29240#[doc = "    \"account_id\": {"]
29241#[doc = "      \"$ref\": \"#/components/schemas/AccountId\""]
29242#[doc = "    },"]
29243#[doc = "    \"amount\": false,"]
29244#[doc = "    \"code_base64\": false,"]
29245#[doc = "    \"code_hash\": false,"]
29246#[doc = "    \"gas_key\": false,"]
29247#[doc = "    \"global_contract_account_id\": false,"]
29248#[doc = "    \"global_contract_hash\": false,"]
29249#[doc = "    \"index\": false,"]
29250#[doc = "    \"key_base64\": false,"]
29251#[doc = "    \"locked\": false,"]
29252#[doc = "    \"nonce\": false,"]
29253#[doc = "    \"public_key\": {"]
29254#[doc = "      \"$ref\": \"#/components/schemas/PublicKey\""]
29255#[doc = "    },"]
29256#[doc = "    \"storage_paid_at\": false,"]
29257#[doc = "    \"storage_usage\": false,"]
29258#[doc = "    \"value_base64\": false"]
29259#[doc = "  }"]
29260#[doc = "}"]
29261#[doc = r" ```"]
29262#[doc = r" </details>"]
29263#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
29264pub struct StateChangeWithCauseViewVariant3Change {
29265    pub account_id: AccountId,
29266    pub public_key: PublicKey,
29267}
29268impl ::std::convert::From<&StateChangeWithCauseViewVariant3Change>
29269    for StateChangeWithCauseViewVariant3Change
29270{
29271    fn from(value: &StateChangeWithCauseViewVariant3Change) -> Self {
29272        value.clone()
29273    }
29274}
29275#[doc = "`StateChangeWithCauseViewVariant3Type`"]
29276#[doc = r""]
29277#[doc = r" <details><summary>JSON schema</summary>"]
29278#[doc = r""]
29279#[doc = r" ```json"]
29280#[doc = "{"]
29281#[doc = "  \"type\": \"string\","]
29282#[doc = "  \"enum\": ["]
29283#[doc = "    \"access_key_deletion\""]
29284#[doc = "  ]"]
29285#[doc = "}"]
29286#[doc = r" ```"]
29287#[doc = r" </details>"]
29288#[derive(
29289    :: serde :: Deserialize,
29290    :: serde :: Serialize,
29291    Clone,
29292    Copy,
29293    Debug,
29294    Eq,
29295    Hash,
29296    Ord,
29297    PartialEq,
29298    PartialOrd,
29299)]
29300pub enum StateChangeWithCauseViewVariant3Type {
29301    #[serde(rename = "access_key_deletion")]
29302    AccessKeyDeletion,
29303}
29304impl ::std::convert::From<&Self> for StateChangeWithCauseViewVariant3Type {
29305    fn from(value: &StateChangeWithCauseViewVariant3Type) -> Self {
29306        value.clone()
29307    }
29308}
29309impl ::std::fmt::Display for StateChangeWithCauseViewVariant3Type {
29310    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
29311        match *self {
29312            Self::AccessKeyDeletion => f.write_str("access_key_deletion"),
29313        }
29314    }
29315}
29316impl ::std::str::FromStr for StateChangeWithCauseViewVariant3Type {
29317    type Err = self::error::ConversionError;
29318    fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
29319        match value {
29320            "access_key_deletion" => Ok(Self::AccessKeyDeletion),
29321            _ => Err("invalid value".into()),
29322        }
29323    }
29324}
29325impl ::std::convert::TryFrom<&str> for StateChangeWithCauseViewVariant3Type {
29326    type Error = self::error::ConversionError;
29327    fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
29328        value.parse()
29329    }
29330}
29331impl ::std::convert::TryFrom<&::std::string::String> for StateChangeWithCauseViewVariant3Type {
29332    type Error = self::error::ConversionError;
29333    fn try_from(
29334        value: &::std::string::String,
29335    ) -> ::std::result::Result<Self, self::error::ConversionError> {
29336        value.parse()
29337    }
29338}
29339impl ::std::convert::TryFrom<::std::string::String> for StateChangeWithCauseViewVariant3Type {
29340    type Error = self::error::ConversionError;
29341    fn try_from(
29342        value: ::std::string::String,
29343    ) -> ::std::result::Result<Self, self::error::ConversionError> {
29344        value.parse()
29345    }
29346}
29347#[doc = "`StateChangeWithCauseViewVariant4Change`"]
29348#[doc = r""]
29349#[doc = r" <details><summary>JSON schema</summary>"]
29350#[doc = r""]
29351#[doc = r" ```json"]
29352#[doc = "{"]
29353#[doc = "  \"type\": \"object\","]
29354#[doc = "  \"required\": ["]
29355#[doc = "    \"account_id\","]
29356#[doc = "    \"gas_key\","]
29357#[doc = "    \"public_key\""]
29358#[doc = "  ],"]
29359#[doc = "  \"properties\": {"]
29360#[doc = "    \"access_key\": false,"]
29361#[doc = "    \"account_id\": {"]
29362#[doc = "      \"$ref\": \"#/components/schemas/AccountId\""]
29363#[doc = "    },"]
29364#[doc = "    \"amount\": false,"]
29365#[doc = "    \"code_base64\": false,"]
29366#[doc = "    \"code_hash\": false,"]
29367#[doc = "    \"gas_key\": {"]
29368#[doc = "      \"$ref\": \"#/components/schemas/GasKeyView\""]
29369#[doc = "    },"]
29370#[doc = "    \"global_contract_account_id\": false,"]
29371#[doc = "    \"global_contract_hash\": false,"]
29372#[doc = "    \"index\": false,"]
29373#[doc = "    \"key_base64\": false,"]
29374#[doc = "    \"locked\": false,"]
29375#[doc = "    \"nonce\": false,"]
29376#[doc = "    \"public_key\": {"]
29377#[doc = "      \"$ref\": \"#/components/schemas/PublicKey\""]
29378#[doc = "    },"]
29379#[doc = "    \"storage_paid_at\": false,"]
29380#[doc = "    \"storage_usage\": false,"]
29381#[doc = "    \"value_base64\": false"]
29382#[doc = "  }"]
29383#[doc = "}"]
29384#[doc = r" ```"]
29385#[doc = r" </details>"]
29386#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
29387pub struct StateChangeWithCauseViewVariant4Change {
29388    pub account_id: AccountId,
29389    pub gas_key: GasKeyView,
29390    pub public_key: PublicKey,
29391}
29392impl ::std::convert::From<&StateChangeWithCauseViewVariant4Change>
29393    for StateChangeWithCauseViewVariant4Change
29394{
29395    fn from(value: &StateChangeWithCauseViewVariant4Change) -> Self {
29396        value.clone()
29397    }
29398}
29399#[doc = "`StateChangeWithCauseViewVariant4Type`"]
29400#[doc = r""]
29401#[doc = r" <details><summary>JSON schema</summary>"]
29402#[doc = r""]
29403#[doc = r" ```json"]
29404#[doc = "{"]
29405#[doc = "  \"type\": \"string\","]
29406#[doc = "  \"enum\": ["]
29407#[doc = "    \"gas_key_update\""]
29408#[doc = "  ]"]
29409#[doc = "}"]
29410#[doc = r" ```"]
29411#[doc = r" </details>"]
29412#[derive(
29413    :: serde :: Deserialize,
29414    :: serde :: Serialize,
29415    Clone,
29416    Copy,
29417    Debug,
29418    Eq,
29419    Hash,
29420    Ord,
29421    PartialEq,
29422    PartialOrd,
29423)]
29424pub enum StateChangeWithCauseViewVariant4Type {
29425    #[serde(rename = "gas_key_update")]
29426    GasKeyUpdate,
29427}
29428impl ::std::convert::From<&Self> for StateChangeWithCauseViewVariant4Type {
29429    fn from(value: &StateChangeWithCauseViewVariant4Type) -> Self {
29430        value.clone()
29431    }
29432}
29433impl ::std::fmt::Display for StateChangeWithCauseViewVariant4Type {
29434    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
29435        match *self {
29436            Self::GasKeyUpdate => f.write_str("gas_key_update"),
29437        }
29438    }
29439}
29440impl ::std::str::FromStr for StateChangeWithCauseViewVariant4Type {
29441    type Err = self::error::ConversionError;
29442    fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
29443        match value {
29444            "gas_key_update" => Ok(Self::GasKeyUpdate),
29445            _ => Err("invalid value".into()),
29446        }
29447    }
29448}
29449impl ::std::convert::TryFrom<&str> for StateChangeWithCauseViewVariant4Type {
29450    type Error = self::error::ConversionError;
29451    fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
29452        value.parse()
29453    }
29454}
29455impl ::std::convert::TryFrom<&::std::string::String> for StateChangeWithCauseViewVariant4Type {
29456    type Error = self::error::ConversionError;
29457    fn try_from(
29458        value: &::std::string::String,
29459    ) -> ::std::result::Result<Self, self::error::ConversionError> {
29460        value.parse()
29461    }
29462}
29463impl ::std::convert::TryFrom<::std::string::String> for StateChangeWithCauseViewVariant4Type {
29464    type Error = self::error::ConversionError;
29465    fn try_from(
29466        value: ::std::string::String,
29467    ) -> ::std::result::Result<Self, self::error::ConversionError> {
29468        value.parse()
29469    }
29470}
29471#[doc = "`StateChangeWithCauseViewVariant5Change`"]
29472#[doc = r""]
29473#[doc = r" <details><summary>JSON schema</summary>"]
29474#[doc = r""]
29475#[doc = r" ```json"]
29476#[doc = "{"]
29477#[doc = "  \"type\": \"object\","]
29478#[doc = "  \"required\": ["]
29479#[doc = "    \"account_id\","]
29480#[doc = "    \"index\","]
29481#[doc = "    \"nonce\","]
29482#[doc = "    \"public_key\""]
29483#[doc = "  ],"]
29484#[doc = "  \"properties\": {"]
29485#[doc = "    \"access_key\": false,"]
29486#[doc = "    \"account_id\": {"]
29487#[doc = "      \"$ref\": \"#/components/schemas/AccountId\""]
29488#[doc = "    },"]
29489#[doc = "    \"amount\": false,"]
29490#[doc = "    \"code_base64\": false,"]
29491#[doc = "    \"code_hash\": false,"]
29492#[doc = "    \"gas_key\": false,"]
29493#[doc = "    \"global_contract_account_id\": false,"]
29494#[doc = "    \"global_contract_hash\": false,"]
29495#[doc = "    \"index\": {"]
29496#[doc = "      \"type\": \"integer\","]
29497#[doc = "      \"format\": \"uint32\","]
29498#[doc = "      \"minimum\": 0.0"]
29499#[doc = "    },"]
29500#[doc = "    \"key_base64\": false,"]
29501#[doc = "    \"locked\": false,"]
29502#[doc = "    \"nonce\": {"]
29503#[doc = "      \"type\": \"integer\","]
29504#[doc = "      \"format\": \"uint64\","]
29505#[doc = "      \"minimum\": 0.0"]
29506#[doc = "    },"]
29507#[doc = "    \"public_key\": {"]
29508#[doc = "      \"$ref\": \"#/components/schemas/PublicKey\""]
29509#[doc = "    },"]
29510#[doc = "    \"storage_paid_at\": false,"]
29511#[doc = "    \"storage_usage\": false,"]
29512#[doc = "    \"value_base64\": false"]
29513#[doc = "  }"]
29514#[doc = "}"]
29515#[doc = r" ```"]
29516#[doc = r" </details>"]
29517#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
29518pub struct StateChangeWithCauseViewVariant5Change {
29519    pub account_id: AccountId,
29520    pub index: u32,
29521    pub nonce: u64,
29522    pub public_key: PublicKey,
29523}
29524impl ::std::convert::From<&StateChangeWithCauseViewVariant5Change>
29525    for StateChangeWithCauseViewVariant5Change
29526{
29527    fn from(value: &StateChangeWithCauseViewVariant5Change) -> Self {
29528        value.clone()
29529    }
29530}
29531#[doc = "`StateChangeWithCauseViewVariant5Type`"]
29532#[doc = r""]
29533#[doc = r" <details><summary>JSON schema</summary>"]
29534#[doc = r""]
29535#[doc = r" ```json"]
29536#[doc = "{"]
29537#[doc = "  \"type\": \"string\","]
29538#[doc = "  \"enum\": ["]
29539#[doc = "    \"gas_key_nonce_update\""]
29540#[doc = "  ]"]
29541#[doc = "}"]
29542#[doc = r" ```"]
29543#[doc = r" </details>"]
29544#[derive(
29545    :: serde :: Deserialize,
29546    :: serde :: Serialize,
29547    Clone,
29548    Copy,
29549    Debug,
29550    Eq,
29551    Hash,
29552    Ord,
29553    PartialEq,
29554    PartialOrd,
29555)]
29556pub enum StateChangeWithCauseViewVariant5Type {
29557    #[serde(rename = "gas_key_nonce_update")]
29558    GasKeyNonceUpdate,
29559}
29560impl ::std::convert::From<&Self> for StateChangeWithCauseViewVariant5Type {
29561    fn from(value: &StateChangeWithCauseViewVariant5Type) -> Self {
29562        value.clone()
29563    }
29564}
29565impl ::std::fmt::Display for StateChangeWithCauseViewVariant5Type {
29566    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
29567        match *self {
29568            Self::GasKeyNonceUpdate => f.write_str("gas_key_nonce_update"),
29569        }
29570    }
29571}
29572impl ::std::str::FromStr for StateChangeWithCauseViewVariant5Type {
29573    type Err = self::error::ConversionError;
29574    fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
29575        match value {
29576            "gas_key_nonce_update" => Ok(Self::GasKeyNonceUpdate),
29577            _ => Err("invalid value".into()),
29578        }
29579    }
29580}
29581impl ::std::convert::TryFrom<&str> for StateChangeWithCauseViewVariant5Type {
29582    type Error = self::error::ConversionError;
29583    fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
29584        value.parse()
29585    }
29586}
29587impl ::std::convert::TryFrom<&::std::string::String> for StateChangeWithCauseViewVariant5Type {
29588    type Error = self::error::ConversionError;
29589    fn try_from(
29590        value: &::std::string::String,
29591    ) -> ::std::result::Result<Self, self::error::ConversionError> {
29592        value.parse()
29593    }
29594}
29595impl ::std::convert::TryFrom<::std::string::String> for StateChangeWithCauseViewVariant5Type {
29596    type Error = self::error::ConversionError;
29597    fn try_from(
29598        value: ::std::string::String,
29599    ) -> ::std::result::Result<Self, self::error::ConversionError> {
29600        value.parse()
29601    }
29602}
29603#[doc = "`StateChangeWithCauseViewVariant6Change`"]
29604#[doc = r""]
29605#[doc = r" <details><summary>JSON schema</summary>"]
29606#[doc = r""]
29607#[doc = r" ```json"]
29608#[doc = "{"]
29609#[doc = "  \"type\": \"object\","]
29610#[doc = "  \"required\": ["]
29611#[doc = "    \"account_id\","]
29612#[doc = "    \"public_key\""]
29613#[doc = "  ],"]
29614#[doc = "  \"properties\": {"]
29615#[doc = "    \"access_key\": false,"]
29616#[doc = "    \"account_id\": {"]
29617#[doc = "      \"$ref\": \"#/components/schemas/AccountId\""]
29618#[doc = "    },"]
29619#[doc = "    \"amount\": false,"]
29620#[doc = "    \"code_base64\": false,"]
29621#[doc = "    \"code_hash\": false,"]
29622#[doc = "    \"gas_key\": false,"]
29623#[doc = "    \"global_contract_account_id\": false,"]
29624#[doc = "    \"global_contract_hash\": false,"]
29625#[doc = "    \"index\": false,"]
29626#[doc = "    \"key_base64\": false,"]
29627#[doc = "    \"locked\": false,"]
29628#[doc = "    \"nonce\": false,"]
29629#[doc = "    \"public_key\": {"]
29630#[doc = "      \"$ref\": \"#/components/schemas/PublicKey\""]
29631#[doc = "    },"]
29632#[doc = "    \"storage_paid_at\": false,"]
29633#[doc = "    \"storage_usage\": false,"]
29634#[doc = "    \"value_base64\": false"]
29635#[doc = "  }"]
29636#[doc = "}"]
29637#[doc = r" ```"]
29638#[doc = r" </details>"]
29639#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
29640pub struct StateChangeWithCauseViewVariant6Change {
29641    pub account_id: AccountId,
29642    pub public_key: PublicKey,
29643}
29644impl ::std::convert::From<&StateChangeWithCauseViewVariant6Change>
29645    for StateChangeWithCauseViewVariant6Change
29646{
29647    fn from(value: &StateChangeWithCauseViewVariant6Change) -> Self {
29648        value.clone()
29649    }
29650}
29651#[doc = "`StateChangeWithCauseViewVariant6Type`"]
29652#[doc = r""]
29653#[doc = r" <details><summary>JSON schema</summary>"]
29654#[doc = r""]
29655#[doc = r" ```json"]
29656#[doc = "{"]
29657#[doc = "  \"type\": \"string\","]
29658#[doc = "  \"enum\": ["]
29659#[doc = "    \"gas_key_deletion\""]
29660#[doc = "  ]"]
29661#[doc = "}"]
29662#[doc = r" ```"]
29663#[doc = r" </details>"]
29664#[derive(
29665    :: serde :: Deserialize,
29666    :: serde :: Serialize,
29667    Clone,
29668    Copy,
29669    Debug,
29670    Eq,
29671    Hash,
29672    Ord,
29673    PartialEq,
29674    PartialOrd,
29675)]
29676pub enum StateChangeWithCauseViewVariant6Type {
29677    #[serde(rename = "gas_key_deletion")]
29678    GasKeyDeletion,
29679}
29680impl ::std::convert::From<&Self> for StateChangeWithCauseViewVariant6Type {
29681    fn from(value: &StateChangeWithCauseViewVariant6Type) -> Self {
29682        value.clone()
29683    }
29684}
29685impl ::std::fmt::Display for StateChangeWithCauseViewVariant6Type {
29686    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
29687        match *self {
29688            Self::GasKeyDeletion => f.write_str("gas_key_deletion"),
29689        }
29690    }
29691}
29692impl ::std::str::FromStr for StateChangeWithCauseViewVariant6Type {
29693    type Err = self::error::ConversionError;
29694    fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
29695        match value {
29696            "gas_key_deletion" => Ok(Self::GasKeyDeletion),
29697            _ => Err("invalid value".into()),
29698        }
29699    }
29700}
29701impl ::std::convert::TryFrom<&str> for StateChangeWithCauseViewVariant6Type {
29702    type Error = self::error::ConversionError;
29703    fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
29704        value.parse()
29705    }
29706}
29707impl ::std::convert::TryFrom<&::std::string::String> for StateChangeWithCauseViewVariant6Type {
29708    type Error = self::error::ConversionError;
29709    fn try_from(
29710        value: &::std::string::String,
29711    ) -> ::std::result::Result<Self, self::error::ConversionError> {
29712        value.parse()
29713    }
29714}
29715impl ::std::convert::TryFrom<::std::string::String> for StateChangeWithCauseViewVariant6Type {
29716    type Error = self::error::ConversionError;
29717    fn try_from(
29718        value: ::std::string::String,
29719    ) -> ::std::result::Result<Self, self::error::ConversionError> {
29720        value.parse()
29721    }
29722}
29723#[doc = "`StateChangeWithCauseViewVariant7Change`"]
29724#[doc = r""]
29725#[doc = r" <details><summary>JSON schema</summary>"]
29726#[doc = r""]
29727#[doc = r" ```json"]
29728#[doc = "{"]
29729#[doc = "  \"type\": \"object\","]
29730#[doc = "  \"required\": ["]
29731#[doc = "    \"account_id\","]
29732#[doc = "    \"key_base64\","]
29733#[doc = "    \"value_base64\""]
29734#[doc = "  ],"]
29735#[doc = "  \"properties\": {"]
29736#[doc = "    \"access_key\": false,"]
29737#[doc = "    \"account_id\": {"]
29738#[doc = "      \"$ref\": \"#/components/schemas/AccountId\""]
29739#[doc = "    },"]
29740#[doc = "    \"amount\": false,"]
29741#[doc = "    \"code_base64\": false,"]
29742#[doc = "    \"code_hash\": false,"]
29743#[doc = "    \"gas_key\": false,"]
29744#[doc = "    \"global_contract_account_id\": false,"]
29745#[doc = "    \"global_contract_hash\": false,"]
29746#[doc = "    \"index\": false,"]
29747#[doc = "    \"key_base64\": {"]
29748#[doc = "      \"$ref\": \"#/components/schemas/StoreKey\""]
29749#[doc = "    },"]
29750#[doc = "    \"locked\": false,"]
29751#[doc = "    \"nonce\": false,"]
29752#[doc = "    \"public_key\": false,"]
29753#[doc = "    \"storage_paid_at\": false,"]
29754#[doc = "    \"storage_usage\": false,"]
29755#[doc = "    \"value_base64\": {"]
29756#[doc = "      \"$ref\": \"#/components/schemas/StoreValue\""]
29757#[doc = "    }"]
29758#[doc = "  }"]
29759#[doc = "}"]
29760#[doc = r" ```"]
29761#[doc = r" </details>"]
29762#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
29763pub struct StateChangeWithCauseViewVariant7Change {
29764    pub account_id: AccountId,
29765    pub key_base64: StoreKey,
29766    pub value_base64: StoreValue,
29767}
29768impl ::std::convert::From<&StateChangeWithCauseViewVariant7Change>
29769    for StateChangeWithCauseViewVariant7Change
29770{
29771    fn from(value: &StateChangeWithCauseViewVariant7Change) -> Self {
29772        value.clone()
29773    }
29774}
29775#[doc = "`StateChangeWithCauseViewVariant7Type`"]
29776#[doc = r""]
29777#[doc = r" <details><summary>JSON schema</summary>"]
29778#[doc = r""]
29779#[doc = r" ```json"]
29780#[doc = "{"]
29781#[doc = "  \"type\": \"string\","]
29782#[doc = "  \"enum\": ["]
29783#[doc = "    \"data_update\""]
29784#[doc = "  ]"]
29785#[doc = "}"]
29786#[doc = r" ```"]
29787#[doc = r" </details>"]
29788#[derive(
29789    :: serde :: Deserialize,
29790    :: serde :: Serialize,
29791    Clone,
29792    Copy,
29793    Debug,
29794    Eq,
29795    Hash,
29796    Ord,
29797    PartialEq,
29798    PartialOrd,
29799)]
29800pub enum StateChangeWithCauseViewVariant7Type {
29801    #[serde(rename = "data_update")]
29802    DataUpdate,
29803}
29804impl ::std::convert::From<&Self> for StateChangeWithCauseViewVariant7Type {
29805    fn from(value: &StateChangeWithCauseViewVariant7Type) -> Self {
29806        value.clone()
29807    }
29808}
29809impl ::std::fmt::Display for StateChangeWithCauseViewVariant7Type {
29810    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
29811        match *self {
29812            Self::DataUpdate => f.write_str("data_update"),
29813        }
29814    }
29815}
29816impl ::std::str::FromStr for StateChangeWithCauseViewVariant7Type {
29817    type Err = self::error::ConversionError;
29818    fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
29819        match value {
29820            "data_update" => Ok(Self::DataUpdate),
29821            _ => Err("invalid value".into()),
29822        }
29823    }
29824}
29825impl ::std::convert::TryFrom<&str> for StateChangeWithCauseViewVariant7Type {
29826    type Error = self::error::ConversionError;
29827    fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
29828        value.parse()
29829    }
29830}
29831impl ::std::convert::TryFrom<&::std::string::String> for StateChangeWithCauseViewVariant7Type {
29832    type Error = self::error::ConversionError;
29833    fn try_from(
29834        value: &::std::string::String,
29835    ) -> ::std::result::Result<Self, self::error::ConversionError> {
29836        value.parse()
29837    }
29838}
29839impl ::std::convert::TryFrom<::std::string::String> for StateChangeWithCauseViewVariant7Type {
29840    type Error = self::error::ConversionError;
29841    fn try_from(
29842        value: ::std::string::String,
29843    ) -> ::std::result::Result<Self, self::error::ConversionError> {
29844        value.parse()
29845    }
29846}
29847#[doc = "`StateChangeWithCauseViewVariant8Change`"]
29848#[doc = r""]
29849#[doc = r" <details><summary>JSON schema</summary>"]
29850#[doc = r""]
29851#[doc = r" ```json"]
29852#[doc = "{"]
29853#[doc = "  \"type\": \"object\","]
29854#[doc = "  \"required\": ["]
29855#[doc = "    \"account_id\","]
29856#[doc = "    \"key_base64\""]
29857#[doc = "  ],"]
29858#[doc = "  \"properties\": {"]
29859#[doc = "    \"access_key\": false,"]
29860#[doc = "    \"account_id\": {"]
29861#[doc = "      \"$ref\": \"#/components/schemas/AccountId\""]
29862#[doc = "    },"]
29863#[doc = "    \"amount\": false,"]
29864#[doc = "    \"code_base64\": false,"]
29865#[doc = "    \"code_hash\": false,"]
29866#[doc = "    \"gas_key\": false,"]
29867#[doc = "    \"global_contract_account_id\": false,"]
29868#[doc = "    \"global_contract_hash\": false,"]
29869#[doc = "    \"index\": false,"]
29870#[doc = "    \"key_base64\": {"]
29871#[doc = "      \"$ref\": \"#/components/schemas/StoreKey\""]
29872#[doc = "    },"]
29873#[doc = "    \"locked\": false,"]
29874#[doc = "    \"nonce\": false,"]
29875#[doc = "    \"public_key\": false,"]
29876#[doc = "    \"storage_paid_at\": false,"]
29877#[doc = "    \"storage_usage\": false,"]
29878#[doc = "    \"value_base64\": false"]
29879#[doc = "  }"]
29880#[doc = "}"]
29881#[doc = r" ```"]
29882#[doc = r" </details>"]
29883#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
29884pub struct StateChangeWithCauseViewVariant8Change {
29885    pub account_id: AccountId,
29886    pub key_base64: StoreKey,
29887}
29888impl ::std::convert::From<&StateChangeWithCauseViewVariant8Change>
29889    for StateChangeWithCauseViewVariant8Change
29890{
29891    fn from(value: &StateChangeWithCauseViewVariant8Change) -> Self {
29892        value.clone()
29893    }
29894}
29895#[doc = "`StateChangeWithCauseViewVariant8Type`"]
29896#[doc = r""]
29897#[doc = r" <details><summary>JSON schema</summary>"]
29898#[doc = r""]
29899#[doc = r" ```json"]
29900#[doc = "{"]
29901#[doc = "  \"type\": \"string\","]
29902#[doc = "  \"enum\": ["]
29903#[doc = "    \"data_deletion\""]
29904#[doc = "  ]"]
29905#[doc = "}"]
29906#[doc = r" ```"]
29907#[doc = r" </details>"]
29908#[derive(
29909    :: serde :: Deserialize,
29910    :: serde :: Serialize,
29911    Clone,
29912    Copy,
29913    Debug,
29914    Eq,
29915    Hash,
29916    Ord,
29917    PartialEq,
29918    PartialOrd,
29919)]
29920pub enum StateChangeWithCauseViewVariant8Type {
29921    #[serde(rename = "data_deletion")]
29922    DataDeletion,
29923}
29924impl ::std::convert::From<&Self> for StateChangeWithCauseViewVariant8Type {
29925    fn from(value: &StateChangeWithCauseViewVariant8Type) -> Self {
29926        value.clone()
29927    }
29928}
29929impl ::std::fmt::Display for StateChangeWithCauseViewVariant8Type {
29930    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
29931        match *self {
29932            Self::DataDeletion => f.write_str("data_deletion"),
29933        }
29934    }
29935}
29936impl ::std::str::FromStr for StateChangeWithCauseViewVariant8Type {
29937    type Err = self::error::ConversionError;
29938    fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
29939        match value {
29940            "data_deletion" => Ok(Self::DataDeletion),
29941            _ => Err("invalid value".into()),
29942        }
29943    }
29944}
29945impl ::std::convert::TryFrom<&str> for StateChangeWithCauseViewVariant8Type {
29946    type Error = self::error::ConversionError;
29947    fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
29948        value.parse()
29949    }
29950}
29951impl ::std::convert::TryFrom<&::std::string::String> for StateChangeWithCauseViewVariant8Type {
29952    type Error = self::error::ConversionError;
29953    fn try_from(
29954        value: &::std::string::String,
29955    ) -> ::std::result::Result<Self, self::error::ConversionError> {
29956        value.parse()
29957    }
29958}
29959impl ::std::convert::TryFrom<::std::string::String> for StateChangeWithCauseViewVariant8Type {
29960    type Error = self::error::ConversionError;
29961    fn try_from(
29962        value: ::std::string::String,
29963    ) -> ::std::result::Result<Self, self::error::ConversionError> {
29964        value.parse()
29965    }
29966}
29967#[doc = "`StateChangeWithCauseViewVariant9Change`"]
29968#[doc = r""]
29969#[doc = r" <details><summary>JSON schema</summary>"]
29970#[doc = r""]
29971#[doc = r" ```json"]
29972#[doc = "{"]
29973#[doc = "  \"type\": \"object\","]
29974#[doc = "  \"required\": ["]
29975#[doc = "    \"account_id\","]
29976#[doc = "    \"code_base64\""]
29977#[doc = "  ],"]
29978#[doc = "  \"properties\": {"]
29979#[doc = "    \"access_key\": false,"]
29980#[doc = "    \"account_id\": {"]
29981#[doc = "      \"$ref\": \"#/components/schemas/AccountId\""]
29982#[doc = "    },"]
29983#[doc = "    \"amount\": false,"]
29984#[doc = "    \"code_base64\": {"]
29985#[doc = "      \"type\": \"string\""]
29986#[doc = "    },"]
29987#[doc = "    \"code_hash\": false,"]
29988#[doc = "    \"gas_key\": false,"]
29989#[doc = "    \"global_contract_account_id\": false,"]
29990#[doc = "    \"global_contract_hash\": false,"]
29991#[doc = "    \"index\": false,"]
29992#[doc = "    \"key_base64\": false,"]
29993#[doc = "    \"locked\": false,"]
29994#[doc = "    \"nonce\": false,"]
29995#[doc = "    \"public_key\": false,"]
29996#[doc = "    \"storage_paid_at\": false,"]
29997#[doc = "    \"storage_usage\": false,"]
29998#[doc = "    \"value_base64\": false"]
29999#[doc = "  }"]
30000#[doc = "}"]
30001#[doc = r" ```"]
30002#[doc = r" </details>"]
30003#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
30004pub struct StateChangeWithCauseViewVariant9Change {
30005    pub account_id: AccountId,
30006    pub code_base64: ::std::string::String,
30007}
30008impl ::std::convert::From<&StateChangeWithCauseViewVariant9Change>
30009    for StateChangeWithCauseViewVariant9Change
30010{
30011    fn from(value: &StateChangeWithCauseViewVariant9Change) -> Self {
30012        value.clone()
30013    }
30014}
30015#[doc = "`StateChangeWithCauseViewVariant9Type`"]
30016#[doc = r""]
30017#[doc = r" <details><summary>JSON schema</summary>"]
30018#[doc = r""]
30019#[doc = r" ```json"]
30020#[doc = "{"]
30021#[doc = "  \"type\": \"string\","]
30022#[doc = "  \"enum\": ["]
30023#[doc = "    \"contract_code_update\""]
30024#[doc = "  ]"]
30025#[doc = "}"]
30026#[doc = r" ```"]
30027#[doc = r" </details>"]
30028#[derive(
30029    :: serde :: Deserialize,
30030    :: serde :: Serialize,
30031    Clone,
30032    Copy,
30033    Debug,
30034    Eq,
30035    Hash,
30036    Ord,
30037    PartialEq,
30038    PartialOrd,
30039)]
30040pub enum StateChangeWithCauseViewVariant9Type {
30041    #[serde(rename = "contract_code_update")]
30042    ContractCodeUpdate,
30043}
30044impl ::std::convert::From<&Self> for StateChangeWithCauseViewVariant9Type {
30045    fn from(value: &StateChangeWithCauseViewVariant9Type) -> Self {
30046        value.clone()
30047    }
30048}
30049impl ::std::fmt::Display for StateChangeWithCauseViewVariant9Type {
30050    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
30051        match *self {
30052            Self::ContractCodeUpdate => f.write_str("contract_code_update"),
30053        }
30054    }
30055}
30056impl ::std::str::FromStr for StateChangeWithCauseViewVariant9Type {
30057    type Err = self::error::ConversionError;
30058    fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
30059        match value {
30060            "contract_code_update" => Ok(Self::ContractCodeUpdate),
30061            _ => Err("invalid value".into()),
30062        }
30063    }
30064}
30065impl ::std::convert::TryFrom<&str> for StateChangeWithCauseViewVariant9Type {
30066    type Error = self::error::ConversionError;
30067    fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
30068        value.parse()
30069    }
30070}
30071impl ::std::convert::TryFrom<&::std::string::String> for StateChangeWithCauseViewVariant9Type {
30072    type Error = self::error::ConversionError;
30073    fn try_from(
30074        value: &::std::string::String,
30075    ) -> ::std::result::Result<Self, self::error::ConversionError> {
30076        value.parse()
30077    }
30078}
30079impl ::std::convert::TryFrom<::std::string::String> for StateChangeWithCauseViewVariant9Type {
30080    type Error = self::error::ConversionError;
30081    fn try_from(
30082        value: ::std::string::String,
30083    ) -> ::std::result::Result<Self, self::error::ConversionError> {
30084        value.parse()
30085    }
30086}
30087#[doc = "Item of the state, key and value are serialized in base64 and proof for inclusion of given state item."]
30088#[doc = r""]
30089#[doc = r" <details><summary>JSON schema</summary>"]
30090#[doc = r""]
30091#[doc = r" ```json"]
30092#[doc = "{"]
30093#[doc = "  \"description\": \"Item of the state, key and value are serialized in base64 and proof for inclusion of given state item.\","]
30094#[doc = "  \"type\": \"object\","]
30095#[doc = "  \"required\": ["]
30096#[doc = "    \"key\","]
30097#[doc = "    \"value\""]
30098#[doc = "  ],"]
30099#[doc = "  \"properties\": {"]
30100#[doc = "    \"key\": {"]
30101#[doc = "      \"$ref\": \"#/components/schemas/StoreKey\""]
30102#[doc = "    },"]
30103#[doc = "    \"value\": {"]
30104#[doc = "      \"$ref\": \"#/components/schemas/StoreValue\""]
30105#[doc = "    }"]
30106#[doc = "  }"]
30107#[doc = "}"]
30108#[doc = r" ```"]
30109#[doc = r" </details>"]
30110#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
30111pub struct StateItem {
30112    pub key: StoreKey,
30113    pub value: StoreValue,
30114}
30115impl ::std::convert::From<&StateItem> for StateItem {
30116    fn from(value: &StateItem) -> Self {
30117        value.clone()
30118    }
30119}
30120#[doc = "`StateSyncConfig`"]
30121#[doc = r""]
30122#[doc = r" <details><summary>JSON schema</summary>"]
30123#[doc = r""]
30124#[doc = r" ```json"]
30125#[doc = "{"]
30126#[doc = "  \"type\": \"object\","]
30127#[doc = "  \"properties\": {"]
30128#[doc = "    \"concurrency\": {"]
30129#[doc = "      \"$ref\": \"#/components/schemas/SyncConcurrency\""]
30130#[doc = "    },"]
30131#[doc = "    \"dump\": {"]
30132#[doc = "      \"description\": \"`none` value disables state dump to external storage.\","]
30133#[doc = "      \"anyOf\": ["]
30134#[doc = "        {"]
30135#[doc = "          \"$ref\": \"#/components/schemas/DumpConfig\""]
30136#[doc = "        },"]
30137#[doc = "        {"]
30138#[doc = "          \"type\": \"null\""]
30139#[doc = "        }"]
30140#[doc = "      ]"]
30141#[doc = "    },"]
30142#[doc = "    \"parts_compression_lvl\": {"]
30143#[doc = "      \"description\": \"Zstd compression level for state parts.\","]
30144#[doc = "      \"default\": 1,"]
30145#[doc = "      \"type\": \"integer\","]
30146#[doc = "      \"format\": \"int32\""]
30147#[doc = "    },"]
30148#[doc = "    \"sync\": {"]
30149#[doc = "      \"$ref\": \"#/components/schemas/SyncConfig\""]
30150#[doc = "    }"]
30151#[doc = "  }"]
30152#[doc = "}"]
30153#[doc = r" ```"]
30154#[doc = r" </details>"]
30155#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
30156pub struct StateSyncConfig {
30157    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
30158    pub concurrency: ::std::option::Option<SyncConcurrency>,
30159    #[doc = "`none` value disables state dump to external storage."]
30160    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
30161    pub dump: ::std::option::Option<DumpConfig>,
30162    #[doc = "Zstd compression level for state parts."]
30163    #[serde(default = "defaults::default_u64::<i32, 1>")]
30164    pub parts_compression_lvl: i32,
30165    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
30166    pub sync: ::std::option::Option<SyncConfig>,
30167}
30168impl ::std::convert::From<&StateSyncConfig> for StateSyncConfig {
30169    fn from(value: &StateSyncConfig) -> Self {
30170        value.clone()
30171    }
30172}
30173impl ::std::default::Default for StateSyncConfig {
30174    fn default() -> Self {
30175        Self {
30176            concurrency: Default::default(),
30177            dump: Default::default(),
30178            parts_compression_lvl: defaults::default_u64::<i32, 1>(),
30179            sync: Default::default(),
30180        }
30181    }
30182}
30183#[doc = "`StatusSyncInfo`"]
30184#[doc = r""]
30185#[doc = r" <details><summary>JSON schema</summary>"]
30186#[doc = r""]
30187#[doc = r" ```json"]
30188#[doc = "{"]
30189#[doc = "  \"type\": \"object\","]
30190#[doc = "  \"required\": ["]
30191#[doc = "    \"latest_block_hash\","]
30192#[doc = "    \"latest_block_height\","]
30193#[doc = "    \"latest_block_time\","]
30194#[doc = "    \"latest_state_root\","]
30195#[doc = "    \"syncing\""]
30196#[doc = "  ],"]
30197#[doc = "  \"properties\": {"]
30198#[doc = "    \"earliest_block_hash\": {"]
30199#[doc = "      \"anyOf\": ["]
30200#[doc = "        {"]
30201#[doc = "          \"$ref\": \"#/components/schemas/CryptoHash\""]
30202#[doc = "        },"]
30203#[doc = "        {"]
30204#[doc = "          \"type\": \"null\""]
30205#[doc = "        }"]
30206#[doc = "      ]"]
30207#[doc = "    },"]
30208#[doc = "    \"earliest_block_height\": {"]
30209#[doc = "      \"type\": ["]
30210#[doc = "        \"integer\","]
30211#[doc = "        \"null\""]
30212#[doc = "      ],"]
30213#[doc = "      \"format\": \"uint64\","]
30214#[doc = "      \"minimum\": 0.0"]
30215#[doc = "    },"]
30216#[doc = "    \"earliest_block_time\": {"]
30217#[doc = "      \"type\": ["]
30218#[doc = "        \"string\","]
30219#[doc = "        \"null\""]
30220#[doc = "      ]"]
30221#[doc = "    },"]
30222#[doc = "    \"epoch_id\": {"]
30223#[doc = "      \"anyOf\": ["]
30224#[doc = "        {"]
30225#[doc = "          \"$ref\": \"#/components/schemas/EpochId\""]
30226#[doc = "        },"]
30227#[doc = "        {"]
30228#[doc = "          \"type\": \"null\""]
30229#[doc = "        }"]
30230#[doc = "      ]"]
30231#[doc = "    },"]
30232#[doc = "    \"epoch_start_height\": {"]
30233#[doc = "      \"type\": ["]
30234#[doc = "        \"integer\","]
30235#[doc = "        \"null\""]
30236#[doc = "      ],"]
30237#[doc = "      \"format\": \"uint64\","]
30238#[doc = "      \"minimum\": 0.0"]
30239#[doc = "    },"]
30240#[doc = "    \"latest_block_hash\": {"]
30241#[doc = "      \"$ref\": \"#/components/schemas/CryptoHash\""]
30242#[doc = "    },"]
30243#[doc = "    \"latest_block_height\": {"]
30244#[doc = "      \"type\": \"integer\","]
30245#[doc = "      \"format\": \"uint64\","]
30246#[doc = "      \"minimum\": 0.0"]
30247#[doc = "    },"]
30248#[doc = "    \"latest_block_time\": {"]
30249#[doc = "      \"type\": \"string\""]
30250#[doc = "    },"]
30251#[doc = "    \"latest_state_root\": {"]
30252#[doc = "      \"$ref\": \"#/components/schemas/CryptoHash\""]
30253#[doc = "    },"]
30254#[doc = "    \"syncing\": {"]
30255#[doc = "      \"type\": \"boolean\""]
30256#[doc = "    }"]
30257#[doc = "  }"]
30258#[doc = "}"]
30259#[doc = r" ```"]
30260#[doc = r" </details>"]
30261#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
30262pub struct StatusSyncInfo {
30263    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
30264    pub earliest_block_hash: ::std::option::Option<CryptoHash>,
30265    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
30266    pub earliest_block_height: ::std::option::Option<u64>,
30267    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
30268    pub earliest_block_time: ::std::option::Option<::std::string::String>,
30269    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
30270    pub epoch_id: ::std::option::Option<EpochId>,
30271    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
30272    pub epoch_start_height: ::std::option::Option<u64>,
30273    pub latest_block_hash: CryptoHash,
30274    pub latest_block_height: u64,
30275    pub latest_block_time: ::std::string::String,
30276    pub latest_state_root: CryptoHash,
30277    pub syncing: bool,
30278}
30279impl ::std::convert::From<&StatusSyncInfo> for StatusSyncInfo {
30280    fn from(value: &StatusSyncInfo) -> Self {
30281        value.clone()
30282    }
30283}
30284#[doc = "Errors which may occur during working with trie storages, storing\ntrie values (trie nodes and state values) by their hashes."]
30285#[doc = r""]
30286#[doc = r" <details><summary>JSON schema</summary>"]
30287#[doc = r""]
30288#[doc = r" ```json"]
30289#[doc = "{"]
30290#[doc = "  \"description\": \"Errors which may occur during working with trie storages, storing\\ntrie values (trie nodes and state values) by their hashes.\","]
30291#[doc = "  \"oneOf\": ["]
30292#[doc = "    {"]
30293#[doc = "      \"description\": \"Key-value db internal failure\","]
30294#[doc = "      \"type\": \"string\","]
30295#[doc = "      \"enum\": ["]
30296#[doc = "        \"StorageInternalError\""]
30297#[doc = "      ]"]
30298#[doc = "    },"]
30299#[doc = "    {"]
30300#[doc = "      \"description\": \"Requested trie value by its hash which is missing in storage.\","]
30301#[doc = "      \"type\": \"object\","]
30302#[doc = "      \"required\": ["]
30303#[doc = "        \"MissingTrieValue\""]
30304#[doc = "      ],"]
30305#[doc = "      \"properties\": {"]
30306#[doc = "        \"MissingTrieValue\": {"]
30307#[doc = "          \"$ref\": \"#/components/schemas/MissingTrieValue\""]
30308#[doc = "        }"]
30309#[doc = "      },"]
30310#[doc = "      \"additionalProperties\": false"]
30311#[doc = "    },"]
30312#[doc = "    {"]
30313#[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.\","]
30314#[doc = "      \"type\": \"string\","]
30315#[doc = "      \"enum\": ["]
30316#[doc = "        \"UnexpectedTrieValue\""]
30317#[doc = "      ]"]
30318#[doc = "    },"]
30319#[doc = "    {"]
30320#[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.\","]
30321#[doc = "      \"type\": \"object\","]
30322#[doc = "      \"required\": ["]
30323#[doc = "        \"StorageInconsistentState\""]
30324#[doc = "      ],"]
30325#[doc = "      \"properties\": {"]
30326#[doc = "        \"StorageInconsistentState\": {"]
30327#[doc = "          \"type\": \"string\""]
30328#[doc = "        }"]
30329#[doc = "      },"]
30330#[doc = "      \"additionalProperties\": false"]
30331#[doc = "    },"]
30332#[doc = "    {"]
30333#[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.\","]
30334#[doc = "      \"type\": \"object\","]
30335#[doc = "      \"required\": ["]
30336#[doc = "        \"FlatStorageBlockNotSupported\""]
30337#[doc = "      ],"]
30338#[doc = "      \"properties\": {"]
30339#[doc = "        \"FlatStorageBlockNotSupported\": {"]
30340#[doc = "          \"type\": \"string\""]
30341#[doc = "        }"]
30342#[doc = "      },"]
30343#[doc = "      \"additionalProperties\": false"]
30344#[doc = "    },"]
30345#[doc = "    {"]
30346#[doc = "      \"description\": \"In-memory trie could not be loaded for some reason.\","]
30347#[doc = "      \"type\": \"object\","]
30348#[doc = "      \"required\": ["]
30349#[doc = "        \"MemTrieLoadingError\""]
30350#[doc = "      ],"]
30351#[doc = "      \"properties\": {"]
30352#[doc = "        \"MemTrieLoadingError\": {"]
30353#[doc = "          \"type\": \"string\""]
30354#[doc = "        }"]
30355#[doc = "      },"]
30356#[doc = "      \"additionalProperties\": false"]
30357#[doc = "    }"]
30358#[doc = "  ]"]
30359#[doc = "}"]
30360#[doc = r" ```"]
30361#[doc = r" </details>"]
30362#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
30363pub enum StorageError {
30364    #[doc = "Key-value db internal failure"]
30365    StorageInternalError,
30366    #[doc = "Requested trie value by its hash which is missing in storage."]
30367    MissingTrieValue(MissingTrieValue),
30368    #[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."]
30369    UnexpectedTrieValue,
30370    #[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."]
30371    StorageInconsistentState(::std::string::String),
30372    #[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."]
30373    FlatStorageBlockNotSupported(::std::string::String),
30374    #[doc = "In-memory trie could not be loaded for some reason."]
30375    MemTrieLoadingError(::std::string::String),
30376}
30377impl ::std::convert::From<&Self> for StorageError {
30378    fn from(value: &StorageError) -> Self {
30379        value.clone()
30380    }
30381}
30382impl ::std::convert::From<MissingTrieValue> for StorageError {
30383    fn from(value: MissingTrieValue) -> Self {
30384        Self::MissingTrieValue(value)
30385    }
30386}
30387#[doc = "This enum represents if a storage_get call will be performed through flat storage or trie"]
30388#[doc = r""]
30389#[doc = r" <details><summary>JSON schema</summary>"]
30390#[doc = r""]
30391#[doc = r" ```json"]
30392#[doc = "{"]
30393#[doc = "  \"description\": \"This enum represents if a storage_get call will be performed through flat storage or trie\","]
30394#[doc = "  \"type\": \"string\","]
30395#[doc = "  \"enum\": ["]
30396#[doc = "    \"FlatStorage\","]
30397#[doc = "    \"Trie\""]
30398#[doc = "  ]"]
30399#[doc = "}"]
30400#[doc = r" ```"]
30401#[doc = r" </details>"]
30402#[derive(
30403    :: serde :: Deserialize,
30404    :: serde :: Serialize,
30405    Clone,
30406    Copy,
30407    Debug,
30408    Eq,
30409    Hash,
30410    Ord,
30411    PartialEq,
30412    PartialOrd,
30413)]
30414pub enum StorageGetMode {
30415    FlatStorage,
30416    Trie,
30417}
30418impl ::std::convert::From<&Self> for StorageGetMode {
30419    fn from(value: &StorageGetMode) -> Self {
30420        value.clone()
30421    }
30422}
30423impl ::std::fmt::Display for StorageGetMode {
30424    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
30425        match *self {
30426            Self::FlatStorage => f.write_str("FlatStorage"),
30427            Self::Trie => f.write_str("Trie"),
30428        }
30429    }
30430}
30431impl ::std::str::FromStr for StorageGetMode {
30432    type Err = self::error::ConversionError;
30433    fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
30434        match value {
30435            "FlatStorage" => Ok(Self::FlatStorage),
30436            "Trie" => Ok(Self::Trie),
30437            _ => Err("invalid value".into()),
30438        }
30439    }
30440}
30441impl ::std::convert::TryFrom<&str> for StorageGetMode {
30442    type Error = self::error::ConversionError;
30443    fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
30444        value.parse()
30445    }
30446}
30447impl ::std::convert::TryFrom<&::std::string::String> for StorageGetMode {
30448    type Error = self::error::ConversionError;
30449    fn try_from(
30450        value: &::std::string::String,
30451    ) -> ::std::result::Result<Self, self::error::ConversionError> {
30452        value.parse()
30453    }
30454}
30455impl ::std::convert::TryFrom<::std::string::String> for StorageGetMode {
30456    type Error = self::error::ConversionError;
30457    fn try_from(
30458        value: ::std::string::String,
30459    ) -> ::std::result::Result<Self, self::error::ConversionError> {
30460        value.parse()
30461    }
30462}
30463#[doc = "Describes cost of storage per block"]
30464#[doc = r""]
30465#[doc = r" <details><summary>JSON schema</summary>"]
30466#[doc = r""]
30467#[doc = r" ```json"]
30468#[doc = "{"]
30469#[doc = "  \"description\": \"Describes cost of storage per block\","]
30470#[doc = "  \"type\": \"object\","]
30471#[doc = "  \"required\": ["]
30472#[doc = "    \"num_bytes_account\","]
30473#[doc = "    \"num_extra_bytes_record\""]
30474#[doc = "  ],"]
30475#[doc = "  \"properties\": {"]
30476#[doc = "    \"num_bytes_account\": {"]
30477#[doc = "      \"description\": \"Number of bytes for an account record, including rounding up for account id.\","]
30478#[doc = "      \"type\": \"integer\","]
30479#[doc = "      \"format\": \"uint64\","]
30480#[doc = "      \"minimum\": 0.0"]
30481#[doc = "    },"]
30482#[doc = "    \"num_extra_bytes_record\": {"]
30483#[doc = "      \"description\": \"Additional number of bytes for a k/v record\","]
30484#[doc = "      \"type\": \"integer\","]
30485#[doc = "      \"format\": \"uint64\","]
30486#[doc = "      \"minimum\": 0.0"]
30487#[doc = "    }"]
30488#[doc = "  }"]
30489#[doc = "}"]
30490#[doc = r" ```"]
30491#[doc = r" </details>"]
30492#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
30493pub struct StorageUsageConfigView {
30494    #[doc = "Number of bytes for an account record, including rounding up for account id."]
30495    pub num_bytes_account: u64,
30496    #[doc = "Additional number of bytes for a k/v record"]
30497    pub num_extra_bytes_record: u64,
30498}
30499impl ::std::convert::From<&StorageUsageConfigView> for StorageUsageConfigView {
30500    fn from(value: &StorageUsageConfigView) -> Self {
30501        value.clone()
30502    }
30503}
30504#[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`)."]
30505#[doc = r""]
30506#[doc = r" <details><summary>JSON schema</summary>"]
30507#[doc = r""]
30508#[doc = r" ```json"]
30509#[doc = "{"]
30510#[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`).\","]
30511#[doc = "  \"type\": \"string\","]
30512#[doc = "  \"format\": \"bytes\""]
30513#[doc = "}"]
30514#[doc = r" ```"]
30515#[doc = r" </details>"]
30516#[derive(
30517    :: serde :: Deserialize,
30518    :: serde :: Serialize,
30519    Clone,
30520    Debug,
30521    Eq,
30522    Hash,
30523    Ord,
30524    PartialEq,
30525    PartialOrd,
30526)]
30527#[serde(transparent)]
30528pub struct StoreKey(pub ::std::string::String);
30529impl ::std::ops::Deref for StoreKey {
30530    type Target = ::std::string::String;
30531    fn deref(&self) -> &::std::string::String {
30532        &self.0
30533    }
30534}
30535impl ::std::convert::From<StoreKey> for ::std::string::String {
30536    fn from(value: StoreKey) -> Self {
30537        value.0
30538    }
30539}
30540impl ::std::convert::From<&StoreKey> for StoreKey {
30541    fn from(value: &StoreKey) -> Self {
30542        value.clone()
30543    }
30544}
30545impl ::std::convert::From<::std::string::String> for StoreKey {
30546    fn from(value: ::std::string::String) -> Self {
30547        Self(value)
30548    }
30549}
30550impl ::std::str::FromStr for StoreKey {
30551    type Err = ::std::convert::Infallible;
30552    fn from_str(value: &str) -> ::std::result::Result<Self, Self::Err> {
30553        Ok(Self(value.to_string()))
30554    }
30555}
30556impl ::std::fmt::Display for StoreKey {
30557    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
30558        self.0.fmt(f)
30559    }
30560}
30561#[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`)."]
30562#[doc = r""]
30563#[doc = r" <details><summary>JSON schema</summary>"]
30564#[doc = r""]
30565#[doc = r" ```json"]
30566#[doc = "{"]
30567#[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`).\","]
30568#[doc = "  \"type\": \"string\","]
30569#[doc = "  \"format\": \"bytes\""]
30570#[doc = "}"]
30571#[doc = r" ```"]
30572#[doc = r" </details>"]
30573#[derive(
30574    :: serde :: Deserialize,
30575    :: serde :: Serialize,
30576    Clone,
30577    Debug,
30578    Eq,
30579    Hash,
30580    Ord,
30581    PartialEq,
30582    PartialOrd,
30583)]
30584#[serde(transparent)]
30585pub struct StoreValue(pub ::std::string::String);
30586impl ::std::ops::Deref for StoreValue {
30587    type Target = ::std::string::String;
30588    fn deref(&self) -> &::std::string::String {
30589        &self.0
30590    }
30591}
30592impl ::std::convert::From<StoreValue> for ::std::string::String {
30593    fn from(value: StoreValue) -> Self {
30594        value.0
30595    }
30596}
30597impl ::std::convert::From<&StoreValue> for StoreValue {
30598    fn from(value: &StoreValue) -> Self {
30599        value.clone()
30600    }
30601}
30602impl ::std::convert::From<::std::string::String> for StoreValue {
30603    fn from(value: ::std::string::String) -> Self {
30604        Self(value)
30605    }
30606}
30607impl ::std::str::FromStr for StoreValue {
30608    type Err = ::std::convert::Infallible;
30609    fn from_str(value: &str) -> ::std::result::Result<Self, Self::Err> {
30610        Ok(Self(value.to_string()))
30611    }
30612}
30613impl ::std::fmt::Display for StoreValue {
30614    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
30615        self.0.fmt(f)
30616    }
30617}
30618#[doc = "`SyncCheckpoint`"]
30619#[doc = r""]
30620#[doc = r" <details><summary>JSON schema</summary>"]
30621#[doc = r""]
30622#[doc = r" ```json"]
30623#[doc = "{"]
30624#[doc = "  \"type\": \"string\","]
30625#[doc = "  \"enum\": ["]
30626#[doc = "    \"genesis\","]
30627#[doc = "    \"earliest_available\""]
30628#[doc = "  ]"]
30629#[doc = "}"]
30630#[doc = r" ```"]
30631#[doc = r" </details>"]
30632#[derive(
30633    :: serde :: Deserialize,
30634    :: serde :: Serialize,
30635    Clone,
30636    Copy,
30637    Debug,
30638    Eq,
30639    Hash,
30640    Ord,
30641    PartialEq,
30642    PartialOrd,
30643)]
30644pub enum SyncCheckpoint {
30645    #[serde(rename = "genesis")]
30646    Genesis,
30647    #[serde(rename = "earliest_available")]
30648    EarliestAvailable,
30649}
30650impl ::std::convert::From<&Self> for SyncCheckpoint {
30651    fn from(value: &SyncCheckpoint) -> Self {
30652        value.clone()
30653    }
30654}
30655impl ::std::fmt::Display for SyncCheckpoint {
30656    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
30657        match *self {
30658            Self::Genesis => f.write_str("genesis"),
30659            Self::EarliestAvailable => f.write_str("earliest_available"),
30660        }
30661    }
30662}
30663impl ::std::str::FromStr for SyncCheckpoint {
30664    type Err = self::error::ConversionError;
30665    fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
30666        match value {
30667            "genesis" => Ok(Self::Genesis),
30668            "earliest_available" => Ok(Self::EarliestAvailable),
30669            _ => Err("invalid value".into()),
30670        }
30671    }
30672}
30673impl ::std::convert::TryFrom<&str> for SyncCheckpoint {
30674    type Error = self::error::ConversionError;
30675    fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
30676        value.parse()
30677    }
30678}
30679impl ::std::convert::TryFrom<&::std::string::String> for SyncCheckpoint {
30680    type Error = self::error::ConversionError;
30681    fn try_from(
30682        value: &::std::string::String,
30683    ) -> ::std::result::Result<Self, self::error::ConversionError> {
30684        value.parse()
30685    }
30686}
30687impl ::std::convert::TryFrom<::std::string::String> for SyncCheckpoint {
30688    type Error = self::error::ConversionError;
30689    fn try_from(
30690        value: ::std::string::String,
30691    ) -> ::std::result::Result<Self, self::error::ConversionError> {
30692        value.parse()
30693    }
30694}
30695#[doc = "`SyncConcurrency`"]
30696#[doc = r""]
30697#[doc = r" <details><summary>JSON schema</summary>"]
30698#[doc = r""]
30699#[doc = r" ```json"]
30700#[doc = "{"]
30701#[doc = "  \"type\": \"object\","]
30702#[doc = "  \"required\": ["]
30703#[doc = "    \"apply\","]
30704#[doc = "    \"apply_during_catchup\","]
30705#[doc = "    \"peer_downloads\","]
30706#[doc = "    \"per_shard\""]
30707#[doc = "  ],"]
30708#[doc = "  \"properties\": {"]
30709#[doc = "    \"apply\": {"]
30710#[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.\","]
30711#[doc = "      \"type\": \"integer\","]
30712#[doc = "      \"format\": \"uint8\","]
30713#[doc = "      \"maximum\": 255.0,"]
30714#[doc = "      \"minimum\": 0.0"]
30715#[doc = "    },"]
30716#[doc = "    \"apply_during_catchup\": {"]
30717#[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.\","]
30718#[doc = "      \"type\": \"integer\","]
30719#[doc = "      \"format\": \"uint8\","]
30720#[doc = "      \"maximum\": 255.0,"]
30721#[doc = "      \"minimum\": 0.0"]
30722#[doc = "    },"]
30723#[doc = "    \"peer_downloads\": {"]
30724#[doc = "      \"description\": \"Maximum number of outstanding requests for decentralized state sync.\","]
30725#[doc = "      \"type\": \"integer\","]
30726#[doc = "      \"format\": \"uint8\","]
30727#[doc = "      \"maximum\": 255.0,"]
30728#[doc = "      \"minimum\": 0.0"]
30729#[doc = "    },"]
30730#[doc = "    \"per_shard\": {"]
30731#[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.\","]
30732#[doc = "      \"type\": \"integer\","]
30733#[doc = "      \"format\": \"uint8\","]
30734#[doc = "      \"maximum\": 255.0,"]
30735#[doc = "      \"minimum\": 0.0"]
30736#[doc = "    }"]
30737#[doc = "  }"]
30738#[doc = "}"]
30739#[doc = r" ```"]
30740#[doc = r" </details>"]
30741#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
30742pub struct SyncConcurrency {
30743    #[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."]
30744    pub apply: u8,
30745    #[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."]
30746    pub apply_during_catchup: u8,
30747    #[doc = "Maximum number of outstanding requests for decentralized state sync."]
30748    pub peer_downloads: u8,
30749    #[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."]
30750    pub per_shard: u8,
30751}
30752impl ::std::convert::From<&SyncConcurrency> for SyncConcurrency {
30753    fn from(value: &SyncConcurrency) -> Self {
30754        value.clone()
30755    }
30756}
30757#[doc = "Configures how to fetch state parts during state sync."]
30758#[doc = r""]
30759#[doc = r" <details><summary>JSON schema</summary>"]
30760#[doc = r""]
30761#[doc = r" ```json"]
30762#[doc = "{"]
30763#[doc = "  \"description\": \"Configures how to fetch state parts during state sync.\","]
30764#[doc = "  \"oneOf\": ["]
30765#[doc = "    {"]
30766#[doc = "      \"description\": \"Syncs state from the peers without reading anything from external storage.\","]
30767#[doc = "      \"type\": \"string\","]
30768#[doc = "      \"enum\": ["]
30769#[doc = "        \"Peers\""]
30770#[doc = "      ]"]
30771#[doc = "    },"]
30772#[doc = "    {"]
30773#[doc = "      \"description\": \"Expects parts to be available in external storage.\\n\\nUsually as a fallback after some number of attempts to use peers.\","]
30774#[doc = "      \"type\": \"object\","]
30775#[doc = "      \"required\": ["]
30776#[doc = "        \"ExternalStorage\""]
30777#[doc = "      ],"]
30778#[doc = "      \"properties\": {"]
30779#[doc = "        \"ExternalStorage\": {"]
30780#[doc = "          \"$ref\": \"#/components/schemas/ExternalStorageConfig\""]
30781#[doc = "        }"]
30782#[doc = "      },"]
30783#[doc = "      \"additionalProperties\": false"]
30784#[doc = "    }"]
30785#[doc = "  ]"]
30786#[doc = "}"]
30787#[doc = r" ```"]
30788#[doc = r" </details>"]
30789#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
30790pub enum SyncConfig {
30791    #[doc = "Syncs state from the peers without reading anything from external storage."]
30792    Peers,
30793    #[doc = "Expects parts to be available in external storage.\n\nUsually as a fallback after some number of attempts to use peers."]
30794    ExternalStorage(ExternalStorageConfig),
30795}
30796impl ::std::convert::From<&Self> for SyncConfig {
30797    fn from(value: &SyncConfig) -> Self {
30798        value.clone()
30799    }
30800}
30801impl ::std::convert::From<ExternalStorageConfig> for SyncConfig {
30802    fn from(value: ExternalStorageConfig) -> Self {
30803        Self::ExternalStorage(value)
30804    }
30805}
30806#[doc = "`Tier1ProxyView`"]
30807#[doc = r""]
30808#[doc = r" <details><summary>JSON schema</summary>"]
30809#[doc = r""]
30810#[doc = r" ```json"]
30811#[doc = "{"]
30812#[doc = "  \"type\": \"object\","]
30813#[doc = "  \"required\": ["]
30814#[doc = "    \"addr\","]
30815#[doc = "    \"peer_id\""]
30816#[doc = "  ],"]
30817#[doc = "  \"properties\": {"]
30818#[doc = "    \"addr\": {"]
30819#[doc = "      \"type\": \"string\""]
30820#[doc = "    },"]
30821#[doc = "    \"peer_id\": {"]
30822#[doc = "      \"$ref\": \"#/components/schemas/PublicKey\""]
30823#[doc = "    }"]
30824#[doc = "  }"]
30825#[doc = "}"]
30826#[doc = r" ```"]
30827#[doc = r" </details>"]
30828#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
30829pub struct Tier1ProxyView {
30830    pub addr: ::std::string::String,
30831    pub peer_id: PublicKey,
30832}
30833impl ::std::convert::From<&Tier1ProxyView> for Tier1ProxyView {
30834    fn from(value: &Tier1ProxyView) -> Self {
30835        value.clone()
30836    }
30837}
30838#[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."]
30839#[doc = r""]
30840#[doc = r" <details><summary>JSON schema</summary>"]
30841#[doc = r""]
30842#[doc = r" ```json"]
30843#[doc = "{"]
30844#[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.\","]
30845#[doc = "  \"oneOf\": ["]
30846#[doc = "    {"]
30847#[doc = "      \"description\": \"Tracks no shards (light client).\","]
30848#[doc = "      \"type\": \"string\","]
30849#[doc = "      \"enum\": ["]
30850#[doc = "        \"NoShards\""]
30851#[doc = "      ]"]
30852#[doc = "    },"]
30853#[doc = "    {"]
30854#[doc = "      \"description\": \"Tracks arbitrary shards.\","]
30855#[doc = "      \"type\": \"object\","]
30856#[doc = "      \"required\": ["]
30857#[doc = "        \"Shards\""]
30858#[doc = "      ],"]
30859#[doc = "      \"properties\": {"]
30860#[doc = "        \"Shards\": {"]
30861#[doc = "          \"type\": \"array\","]
30862#[doc = "          \"items\": {"]
30863#[doc = "            \"$ref\": \"#/components/schemas/ShardUId\""]
30864#[doc = "          }"]
30865#[doc = "        }"]
30866#[doc = "      },"]
30867#[doc = "      \"additionalProperties\": false"]
30868#[doc = "    },"]
30869#[doc = "    {"]
30870#[doc = "      \"description\": \"Tracks all shards.\","]
30871#[doc = "      \"type\": \"string\","]
30872#[doc = "      \"enum\": ["]
30873#[doc = "        \"AllShards\""]
30874#[doc = "      ]"]
30875#[doc = "    },"]
30876#[doc = "    {"]
30877#[doc = "      \"description\": \"Tracks shards that are assigned to given validator account.\","]
30878#[doc = "      \"type\": \"object\","]
30879#[doc = "      \"required\": ["]
30880#[doc = "        \"ShadowValidator\""]
30881#[doc = "      ],"]
30882#[doc = "      \"properties\": {"]
30883#[doc = "        \"ShadowValidator\": {"]
30884#[doc = "          \"$ref\": \"#/components/schemas/AccountId\""]
30885#[doc = "        }"]
30886#[doc = "      },"]
30887#[doc = "      \"additionalProperties\": false"]
30888#[doc = "    },"]
30889#[doc = "    {"]
30890#[doc = "      \"description\": \"Rotate between these sets of tracked shards.\\nUsed to simulate the behavior of chunk only producers without staking tokens.\","]
30891#[doc = "      \"type\": \"object\","]
30892#[doc = "      \"required\": ["]
30893#[doc = "        \"Schedule\""]
30894#[doc = "      ],"]
30895#[doc = "      \"properties\": {"]
30896#[doc = "        \"Schedule\": {"]
30897#[doc = "          \"type\": \"array\","]
30898#[doc = "          \"items\": {"]
30899#[doc = "            \"type\": \"array\","]
30900#[doc = "            \"items\": {"]
30901#[doc = "              \"$ref\": \"#/components/schemas/ShardId\""]
30902#[doc = "            }"]
30903#[doc = "          }"]
30904#[doc = "        }"]
30905#[doc = "      },"]
30906#[doc = "      \"additionalProperties\": false"]
30907#[doc = "    },"]
30908#[doc = "    {"]
30909#[doc = "      \"description\": \"Tracks shards that contain one of the given account.\","]
30910#[doc = "      \"type\": \"object\","]
30911#[doc = "      \"required\": ["]
30912#[doc = "        \"Accounts\""]
30913#[doc = "      ],"]
30914#[doc = "      \"properties\": {"]
30915#[doc = "        \"Accounts\": {"]
30916#[doc = "          \"type\": \"array\","]
30917#[doc = "          \"items\": {"]
30918#[doc = "            \"$ref\": \"#/components/schemas/AccountId\""]
30919#[doc = "          }"]
30920#[doc = "        }"]
30921#[doc = "      },"]
30922#[doc = "      \"additionalProperties\": false"]
30923#[doc = "    }"]
30924#[doc = "  ]"]
30925#[doc = "}"]
30926#[doc = r" ```"]
30927#[doc = r" </details>"]
30928#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
30929pub enum TrackedShardsConfig {
30930    #[doc = "Tracks no shards (light client)."]
30931    NoShards,
30932    #[doc = "Tracks arbitrary shards."]
30933    Shards(::std::vec::Vec<ShardUId>),
30934    #[doc = "Tracks all shards."]
30935    AllShards,
30936    #[doc = "Tracks shards that are assigned to given validator account."]
30937    ShadowValidator(AccountId),
30938    #[doc = "Rotate between these sets of tracked shards.\nUsed to simulate the behavior of chunk only producers without staking tokens."]
30939    Schedule(::std::vec::Vec<::std::vec::Vec<ShardId>>),
30940    #[doc = "Tracks shards that contain one of the given account."]
30941    Accounts(::std::vec::Vec<AccountId>),
30942}
30943impl ::std::convert::From<&Self> for TrackedShardsConfig {
30944    fn from(value: &TrackedShardsConfig) -> Self {
30945        value.clone()
30946    }
30947}
30948impl ::std::convert::From<::std::vec::Vec<ShardUId>> for TrackedShardsConfig {
30949    fn from(value: ::std::vec::Vec<ShardUId>) -> Self {
30950        Self::Shards(value)
30951    }
30952}
30953impl ::std::convert::From<AccountId> for TrackedShardsConfig {
30954    fn from(value: AccountId) -> Self {
30955        Self::ShadowValidator(value)
30956    }
30957}
30958impl ::std::convert::From<::std::vec::Vec<::std::vec::Vec<ShardId>>> for TrackedShardsConfig {
30959    fn from(value: ::std::vec::Vec<::std::vec::Vec<ShardId>>) -> Self {
30960        Self::Schedule(value)
30961    }
30962}
30963impl ::std::convert::From<::std::vec::Vec<AccountId>> for TrackedShardsConfig {
30964    fn from(value: ::std::vec::Vec<AccountId>) -> Self {
30965        Self::Accounts(value)
30966    }
30967}
30968#[doc = "`TransferAction`"]
30969#[doc = r""]
30970#[doc = r" <details><summary>JSON schema</summary>"]
30971#[doc = r""]
30972#[doc = r" ```json"]
30973#[doc = "{"]
30974#[doc = "  \"type\": \"object\","]
30975#[doc = "  \"required\": ["]
30976#[doc = "    \"deposit\""]
30977#[doc = "  ],"]
30978#[doc = "  \"properties\": {"]
30979#[doc = "    \"deposit\": {"]
30980#[doc = "      \"$ref\": \"#/components/schemas/NearToken\""]
30981#[doc = "    }"]
30982#[doc = "  }"]
30983#[doc = "}"]
30984#[doc = r" ```"]
30985#[doc = r" </details>"]
30986#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
30987pub struct TransferAction {
30988    pub deposit: NearToken,
30989}
30990impl ::std::convert::From<&TransferAction> for TransferAction {
30991    fn from(value: &TransferAction) -> Self {
30992        value.clone()
30993    }
30994}
30995#[doc = "Error returned in the ExecutionOutcome in case of failure"]
30996#[doc = r""]
30997#[doc = r" <details><summary>JSON schema</summary>"]
30998#[doc = r""]
30999#[doc = r" ```json"]
31000#[doc = "{"]
31001#[doc = "  \"description\": \"Error returned in the ExecutionOutcome in case of failure\","]
31002#[doc = "  \"oneOf\": ["]
31003#[doc = "    {"]
31004#[doc = "      \"description\": \"An error happened during Action execution\","]
31005#[doc = "      \"type\": \"object\","]
31006#[doc = "      \"required\": ["]
31007#[doc = "        \"ActionError\""]
31008#[doc = "      ],"]
31009#[doc = "      \"properties\": {"]
31010#[doc = "        \"ActionError\": {"]
31011#[doc = "          \"$ref\": \"#/components/schemas/ActionError\""]
31012#[doc = "        }"]
31013#[doc = "      },"]
31014#[doc = "      \"additionalProperties\": false"]
31015#[doc = "    },"]
31016#[doc = "    {"]
31017#[doc = "      \"description\": \"An error happened during Transaction execution\","]
31018#[doc = "      \"type\": \"object\","]
31019#[doc = "      \"required\": ["]
31020#[doc = "        \"InvalidTxError\""]
31021#[doc = "      ],"]
31022#[doc = "      \"properties\": {"]
31023#[doc = "        \"InvalidTxError\": {"]
31024#[doc = "          \"$ref\": \"#/components/schemas/InvalidTxError\""]
31025#[doc = "        }"]
31026#[doc = "      },"]
31027#[doc = "      \"additionalProperties\": false"]
31028#[doc = "    }"]
31029#[doc = "  ]"]
31030#[doc = "}"]
31031#[doc = r" ```"]
31032#[doc = r" </details>"]
31033#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
31034pub enum TxExecutionError {
31035    #[doc = "An error happened during Action execution"]
31036    ActionError(ActionError),
31037    #[doc = "An error happened during Transaction execution"]
31038    InvalidTxError(InvalidTxError),
31039}
31040impl ::std::convert::From<&Self> for TxExecutionError {
31041    fn from(value: &TxExecutionError) -> Self {
31042        value.clone()
31043    }
31044}
31045impl ::std::convert::From<ActionError> for TxExecutionError {
31046    fn from(value: ActionError) -> Self {
31047        Self::ActionError(value)
31048    }
31049}
31050impl ::std::convert::From<InvalidTxError> for TxExecutionError {
31051    fn from(value: InvalidTxError) -> Self {
31052        Self::InvalidTxError(value)
31053    }
31054}
31055#[doc = "`TxExecutionStatus`"]
31056#[doc = r""]
31057#[doc = r" <details><summary>JSON schema</summary>"]
31058#[doc = r""]
31059#[doc = r" ```json"]
31060#[doc = "{"]
31061#[doc = "  \"oneOf\": ["]
31062#[doc = "    {"]
31063#[doc = "      \"description\": \"Transaction is waiting to be included into the block\","]
31064#[doc = "      \"type\": \"string\","]
31065#[doc = "      \"enum\": ["]
31066#[doc = "        \"NONE\""]
31067#[doc = "      ]"]
31068#[doc = "    },"]
31069#[doc = "    {"]
31070#[doc = "      \"description\": \"Transaction is included into the block. The block may be not finalized yet\","]
31071#[doc = "      \"type\": \"string\","]
31072#[doc = "      \"enum\": ["]
31073#[doc = "        \"INCLUDED\""]
31074#[doc = "      ]"]
31075#[doc = "    },"]
31076#[doc = "    {"]
31077#[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\","]
31078#[doc = "      \"type\": \"string\","]
31079#[doc = "      \"enum\": ["]
31080#[doc = "        \"EXECUTED_OPTIMISTIC\""]
31081#[doc = "      ]"]
31082#[doc = "    },"]
31083#[doc = "    {"]
31084#[doc = "      \"description\": \"Transaction is included into finalized block\","]
31085#[doc = "      \"type\": \"string\","]
31086#[doc = "      \"enum\": ["]
31087#[doc = "        \"INCLUDED_FINAL\""]
31088#[doc = "      ]"]
31089#[doc = "    },"]
31090#[doc = "    {"]
31091#[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\","]
31092#[doc = "      \"type\": \"string\","]
31093#[doc = "      \"enum\": ["]
31094#[doc = "        \"EXECUTED\""]
31095#[doc = "      ]"]
31096#[doc = "    },"]
31097#[doc = "    {"]
31098#[doc = "      \"description\": \"Transaction is included into finalized block +\\nExecution of all transaction receipts is finalized, including refund receipts\","]
31099#[doc = "      \"type\": \"string\","]
31100#[doc = "      \"enum\": ["]
31101#[doc = "        \"FINAL\""]
31102#[doc = "      ]"]
31103#[doc = "    }"]
31104#[doc = "  ]"]
31105#[doc = "}"]
31106#[doc = r" ```"]
31107#[doc = r" </details>"]
31108#[derive(
31109    :: serde :: Deserialize,
31110    :: serde :: Serialize,
31111    Clone,
31112    Copy,
31113    Debug,
31114    Eq,
31115    Hash,
31116    Ord,
31117    PartialEq,
31118    PartialOrd,
31119)]
31120pub enum TxExecutionStatus {
31121    #[doc = "Transaction is waiting to be included into the block"]
31122    #[serde(rename = "NONE")]
31123    None,
31124    #[doc = "Transaction is included into the block. The block may be not finalized yet"]
31125    #[serde(rename = "INCLUDED")]
31126    Included,
31127    #[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"]
31128    #[serde(rename = "EXECUTED_OPTIMISTIC")]
31129    ExecutedOptimistic,
31130    #[doc = "Transaction is included into finalized block"]
31131    #[serde(rename = "INCLUDED_FINAL")]
31132    IncludedFinal,
31133    #[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"]
31134    #[serde(rename = "EXECUTED")]
31135    Executed,
31136    #[doc = "Transaction is included into finalized block +\nExecution of all transaction receipts is finalized, including refund receipts"]
31137    #[serde(rename = "FINAL")]
31138    Final,
31139}
31140impl ::std::convert::From<&Self> for TxExecutionStatus {
31141    fn from(value: &TxExecutionStatus) -> Self {
31142        value.clone()
31143    }
31144}
31145impl ::std::fmt::Display for TxExecutionStatus {
31146    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
31147        match *self {
31148            Self::None => f.write_str("NONE"),
31149            Self::Included => f.write_str("INCLUDED"),
31150            Self::ExecutedOptimistic => f.write_str("EXECUTED_OPTIMISTIC"),
31151            Self::IncludedFinal => f.write_str("INCLUDED_FINAL"),
31152            Self::Executed => f.write_str("EXECUTED"),
31153            Self::Final => f.write_str("FINAL"),
31154        }
31155    }
31156}
31157impl ::std::str::FromStr for TxExecutionStatus {
31158    type Err = self::error::ConversionError;
31159    fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
31160        match value {
31161            "NONE" => Ok(Self::None),
31162            "INCLUDED" => Ok(Self::Included),
31163            "EXECUTED_OPTIMISTIC" => Ok(Self::ExecutedOptimistic),
31164            "INCLUDED_FINAL" => Ok(Self::IncludedFinal),
31165            "EXECUTED" => Ok(Self::Executed),
31166            "FINAL" => Ok(Self::Final),
31167            _ => Err("invalid value".into()),
31168        }
31169    }
31170}
31171impl ::std::convert::TryFrom<&str> for TxExecutionStatus {
31172    type Error = self::error::ConversionError;
31173    fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
31174        value.parse()
31175    }
31176}
31177impl ::std::convert::TryFrom<&::std::string::String> for TxExecutionStatus {
31178    type Error = self::error::ConversionError;
31179    fn try_from(
31180        value: &::std::string::String,
31181    ) -> ::std::result::Result<Self, self::error::ConversionError> {
31182        value.parse()
31183    }
31184}
31185impl ::std::convert::TryFrom<::std::string::String> for TxExecutionStatus {
31186    type Error = self::error::ConversionError;
31187    fn try_from(
31188        value: ::std::string::String,
31189    ) -> ::std::result::Result<Self, self::error::ConversionError> {
31190        value.parse()
31191    }
31192}
31193#[doc = "Use global contract action"]
31194#[doc = r""]
31195#[doc = r" <details><summary>JSON schema</summary>"]
31196#[doc = r""]
31197#[doc = r" ```json"]
31198#[doc = "{"]
31199#[doc = "  \"description\": \"Use global contract action\","]
31200#[doc = "  \"type\": \"object\","]
31201#[doc = "  \"required\": ["]
31202#[doc = "    \"contract_identifier\""]
31203#[doc = "  ],"]
31204#[doc = "  \"properties\": {"]
31205#[doc = "    \"contract_identifier\": {"]
31206#[doc = "      \"$ref\": \"#/components/schemas/GlobalContractIdentifier\""]
31207#[doc = "    }"]
31208#[doc = "  }"]
31209#[doc = "}"]
31210#[doc = r" ```"]
31211#[doc = r" </details>"]
31212#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
31213pub struct UseGlobalContractAction {
31214    pub contract_identifier: GlobalContractIdentifier,
31215}
31216impl ::std::convert::From<&UseGlobalContractAction> for UseGlobalContractAction {
31217    fn from(value: &UseGlobalContractAction) -> Self {
31218        value.clone()
31219    }
31220}
31221#[doc = "`ValidatorInfo`"]
31222#[doc = r""]
31223#[doc = r" <details><summary>JSON schema</summary>"]
31224#[doc = r""]
31225#[doc = r" ```json"]
31226#[doc = "{"]
31227#[doc = "  \"type\": \"object\","]
31228#[doc = "  \"required\": ["]
31229#[doc = "    \"account_id\""]
31230#[doc = "  ],"]
31231#[doc = "  \"properties\": {"]
31232#[doc = "    \"account_id\": {"]
31233#[doc = "      \"$ref\": \"#/components/schemas/AccountId\""]
31234#[doc = "    }"]
31235#[doc = "  }"]
31236#[doc = "}"]
31237#[doc = r" ```"]
31238#[doc = r" </details>"]
31239#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
31240pub struct ValidatorInfo {
31241    pub account_id: AccountId,
31242}
31243impl ::std::convert::From<&ValidatorInfo> for ValidatorInfo {
31244    fn from(value: &ValidatorInfo) -> Self {
31245        value.clone()
31246    }
31247}
31248#[doc = "Reasons for removing a validator from the validator set."]
31249#[doc = r""]
31250#[doc = r" <details><summary>JSON schema</summary>"]
31251#[doc = r""]
31252#[doc = r" ```json"]
31253#[doc = "{"]
31254#[doc = "  \"description\": \"Reasons for removing a validator from the validator set.\","]
31255#[doc = "  \"oneOf\": ["]
31256#[doc = "    {"]
31257#[doc = "      \"description\": \"Deprecated\","]
31258#[doc = "      \"type\": \"string\","]
31259#[doc = "      \"enum\": ["]
31260#[doc = "        \"_UnusedSlashed\""]
31261#[doc = "      ]"]
31262#[doc = "    },"]
31263#[doc = "    {"]
31264#[doc = "      \"description\": \"Validator didn't produce enough blocks.\","]
31265#[doc = "      \"type\": \"object\","]
31266#[doc = "      \"required\": ["]
31267#[doc = "        \"NotEnoughBlocks\""]
31268#[doc = "      ],"]
31269#[doc = "      \"properties\": {"]
31270#[doc = "        \"NotEnoughBlocks\": {"]
31271#[doc = "          \"type\": \"object\","]
31272#[doc = "          \"required\": ["]
31273#[doc = "            \"expected\","]
31274#[doc = "            \"produced\""]
31275#[doc = "          ],"]
31276#[doc = "          \"properties\": {"]
31277#[doc = "            \"expected\": {"]
31278#[doc = "              \"type\": \"integer\","]
31279#[doc = "              \"format\": \"uint64\","]
31280#[doc = "              \"minimum\": 0.0"]
31281#[doc = "            },"]
31282#[doc = "            \"produced\": {"]
31283#[doc = "              \"type\": \"integer\","]
31284#[doc = "              \"format\": \"uint64\","]
31285#[doc = "              \"minimum\": 0.0"]
31286#[doc = "            }"]
31287#[doc = "          }"]
31288#[doc = "        }"]
31289#[doc = "      },"]
31290#[doc = "      \"additionalProperties\": false"]
31291#[doc = "    },"]
31292#[doc = "    {"]
31293#[doc = "      \"description\": \"Validator didn't produce enough chunks.\","]
31294#[doc = "      \"type\": \"object\","]
31295#[doc = "      \"required\": ["]
31296#[doc = "        \"NotEnoughChunks\""]
31297#[doc = "      ],"]
31298#[doc = "      \"properties\": {"]
31299#[doc = "        \"NotEnoughChunks\": {"]
31300#[doc = "          \"type\": \"object\","]
31301#[doc = "          \"required\": ["]
31302#[doc = "            \"expected\","]
31303#[doc = "            \"produced\""]
31304#[doc = "          ],"]
31305#[doc = "          \"properties\": {"]
31306#[doc = "            \"expected\": {"]
31307#[doc = "              \"type\": \"integer\","]
31308#[doc = "              \"format\": \"uint64\","]
31309#[doc = "              \"minimum\": 0.0"]
31310#[doc = "            },"]
31311#[doc = "            \"produced\": {"]
31312#[doc = "              \"type\": \"integer\","]
31313#[doc = "              \"format\": \"uint64\","]
31314#[doc = "              \"minimum\": 0.0"]
31315#[doc = "            }"]
31316#[doc = "          }"]
31317#[doc = "        }"]
31318#[doc = "      },"]
31319#[doc = "      \"additionalProperties\": false"]
31320#[doc = "    },"]
31321#[doc = "    {"]
31322#[doc = "      \"description\": \"Validator unstaked themselves.\","]
31323#[doc = "      \"type\": \"string\","]
31324#[doc = "      \"enum\": ["]
31325#[doc = "        \"Unstaked\""]
31326#[doc = "      ]"]
31327#[doc = "    },"]
31328#[doc = "    {"]
31329#[doc = "      \"description\": \"Validator stake is now below threshold\","]
31330#[doc = "      \"type\": \"object\","]
31331#[doc = "      \"required\": ["]
31332#[doc = "        \"NotEnoughStake\""]
31333#[doc = "      ],"]
31334#[doc = "      \"properties\": {"]
31335#[doc = "        \"NotEnoughStake\": {"]
31336#[doc = "          \"type\": \"object\","]
31337#[doc = "          \"required\": ["]
31338#[doc = "            \"stake_u128\","]
31339#[doc = "            \"threshold_u128\""]
31340#[doc = "          ],"]
31341#[doc = "          \"properties\": {"]
31342#[doc = "            \"stake_u128\": {"]
31343#[doc = "              \"$ref\": \"#/components/schemas/NearToken\""]
31344#[doc = "            },"]
31345#[doc = "            \"threshold_u128\": {"]
31346#[doc = "              \"$ref\": \"#/components/schemas/NearToken\""]
31347#[doc = "            }"]
31348#[doc = "          }"]
31349#[doc = "        }"]
31350#[doc = "      },"]
31351#[doc = "      \"additionalProperties\": false"]
31352#[doc = "    },"]
31353#[doc = "    {"]
31354#[doc = "      \"description\": \"Enough stake but is not chosen because of seat limits.\","]
31355#[doc = "      \"type\": \"string\","]
31356#[doc = "      \"enum\": ["]
31357#[doc = "        \"DidNotGetASeat\""]
31358#[doc = "      ]"]
31359#[doc = "    },"]
31360#[doc = "    {"]
31361#[doc = "      \"description\": \"Validator didn't produce enough chunk endorsements.\","]
31362#[doc = "      \"type\": \"object\","]
31363#[doc = "      \"required\": ["]
31364#[doc = "        \"NotEnoughChunkEndorsements\""]
31365#[doc = "      ],"]
31366#[doc = "      \"properties\": {"]
31367#[doc = "        \"NotEnoughChunkEndorsements\": {"]
31368#[doc = "          \"type\": \"object\","]
31369#[doc = "          \"required\": ["]
31370#[doc = "            \"expected\","]
31371#[doc = "            \"produced\""]
31372#[doc = "          ],"]
31373#[doc = "          \"properties\": {"]
31374#[doc = "            \"expected\": {"]
31375#[doc = "              \"type\": \"integer\","]
31376#[doc = "              \"format\": \"uint64\","]
31377#[doc = "              \"minimum\": 0.0"]
31378#[doc = "            },"]
31379#[doc = "            \"produced\": {"]
31380#[doc = "              \"type\": \"integer\","]
31381#[doc = "              \"format\": \"uint64\","]
31382#[doc = "              \"minimum\": 0.0"]
31383#[doc = "            }"]
31384#[doc = "          }"]
31385#[doc = "        }"]
31386#[doc = "      },"]
31387#[doc = "      \"additionalProperties\": false"]
31388#[doc = "    },"]
31389#[doc = "    {"]
31390#[doc = "      \"description\": \"Validator's last block proposal was for a protocol version older than\\nthe network's voted protocol version.\","]
31391#[doc = "      \"type\": \"object\","]
31392#[doc = "      \"required\": ["]
31393#[doc = "        \"ProtocolVersionTooOld\""]
31394#[doc = "      ],"]
31395#[doc = "      \"properties\": {"]
31396#[doc = "        \"ProtocolVersionTooOld\": {"]
31397#[doc = "          \"type\": \"object\","]
31398#[doc = "          \"required\": ["]
31399#[doc = "            \"network_version\","]
31400#[doc = "            \"version\""]
31401#[doc = "          ],"]
31402#[doc = "          \"properties\": {"]
31403#[doc = "            \"network_version\": {"]
31404#[doc = "              \"type\": \"integer\","]
31405#[doc = "              \"format\": \"uint32\","]
31406#[doc = "              \"minimum\": 0.0"]
31407#[doc = "            },"]
31408#[doc = "            \"version\": {"]
31409#[doc = "              \"type\": \"integer\","]
31410#[doc = "              \"format\": \"uint32\","]
31411#[doc = "              \"minimum\": 0.0"]
31412#[doc = "            }"]
31413#[doc = "          }"]
31414#[doc = "        }"]
31415#[doc = "      },"]
31416#[doc = "      \"additionalProperties\": false"]
31417#[doc = "    }"]
31418#[doc = "  ]"]
31419#[doc = "}"]
31420#[doc = r" ```"]
31421#[doc = r" </details>"]
31422#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
31423pub enum ValidatorKickoutReason {
31424    #[doc = "Deprecated"]
31425    #[serde(rename = "_UnusedSlashed")]
31426    UnusedSlashed,
31427    #[doc = "Validator didn't produce enough blocks."]
31428    NotEnoughBlocks { expected: u64, produced: u64 },
31429    #[doc = "Validator didn't produce enough chunks."]
31430    NotEnoughChunks { expected: u64, produced: u64 },
31431    #[doc = "Validator unstaked themselves."]
31432    Unstaked,
31433    #[doc = "Validator stake is now below threshold"]
31434    NotEnoughStake {
31435        stake_u128: NearToken,
31436        threshold_u128: NearToken,
31437    },
31438    #[doc = "Enough stake but is not chosen because of seat limits."]
31439    DidNotGetASeat,
31440    #[doc = "Validator didn't produce enough chunk endorsements."]
31441    NotEnoughChunkEndorsements { expected: u64, produced: u64 },
31442    #[doc = "Validator's last block proposal was for a protocol version older than\nthe network's voted protocol version."]
31443    ProtocolVersionTooOld { network_version: u32, version: u32 },
31444}
31445impl ::std::convert::From<&Self> for ValidatorKickoutReason {
31446    fn from(value: &ValidatorKickoutReason) -> Self {
31447        value.clone()
31448    }
31449}
31450#[doc = "`ValidatorKickoutView`"]
31451#[doc = r""]
31452#[doc = r" <details><summary>JSON schema</summary>"]
31453#[doc = r""]
31454#[doc = r" ```json"]
31455#[doc = "{"]
31456#[doc = "  \"type\": \"object\","]
31457#[doc = "  \"required\": ["]
31458#[doc = "    \"account_id\","]
31459#[doc = "    \"reason\""]
31460#[doc = "  ],"]
31461#[doc = "  \"properties\": {"]
31462#[doc = "    \"account_id\": {"]
31463#[doc = "      \"$ref\": \"#/components/schemas/AccountId\""]
31464#[doc = "    },"]
31465#[doc = "    \"reason\": {"]
31466#[doc = "      \"$ref\": \"#/components/schemas/ValidatorKickoutReason\""]
31467#[doc = "    }"]
31468#[doc = "  }"]
31469#[doc = "}"]
31470#[doc = r" ```"]
31471#[doc = r" </details>"]
31472#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
31473pub struct ValidatorKickoutView {
31474    pub account_id: AccountId,
31475    pub reason: ValidatorKickoutReason,
31476}
31477impl ::std::convert::From<&ValidatorKickoutView> for ValidatorKickoutView {
31478    fn from(value: &ValidatorKickoutView) -> Self {
31479        value.clone()
31480    }
31481}
31482#[doc = "`ValidatorStakeView`"]
31483#[doc = r""]
31484#[doc = r" <details><summary>JSON schema</summary>"]
31485#[doc = r""]
31486#[doc = r" ```json"]
31487#[doc = "{"]
31488#[doc = "  \"type\": \"object\","]
31489#[doc = "  \"allOf\": ["]
31490#[doc = "    {"]
31491#[doc = "      \"$ref\": \"#/components/schemas/ValidatorStakeViewV1\""]
31492#[doc = "    }"]
31493#[doc = "  ],"]
31494#[doc = "  \"required\": ["]
31495#[doc = "    \"validator_stake_struct_version\""]
31496#[doc = "  ],"]
31497#[doc = "  \"properties\": {"]
31498#[doc = "    \"validator_stake_struct_version\": {"]
31499#[doc = "      \"type\": \"string\","]
31500#[doc = "      \"enum\": ["]
31501#[doc = "        \"V1\""]
31502#[doc = "      ]"]
31503#[doc = "    }"]
31504#[doc = "  }"]
31505#[doc = "}"]
31506#[doc = r" ```"]
31507#[doc = r" </details>"]
31508#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
31509pub struct ValidatorStakeView {
31510    pub account_id: AccountId,
31511    pub public_key: PublicKey,
31512    pub stake: NearToken,
31513    pub validator_stake_struct_version: ValidatorStakeViewValidatorStakeStructVersion,
31514}
31515impl ::std::convert::From<&ValidatorStakeView> for ValidatorStakeView {
31516    fn from(value: &ValidatorStakeView) -> Self {
31517        value.clone()
31518    }
31519}
31520#[doc = "`ValidatorStakeViewV1`"]
31521#[doc = r""]
31522#[doc = r" <details><summary>JSON schema</summary>"]
31523#[doc = r""]
31524#[doc = r" ```json"]
31525#[doc = "{"]
31526#[doc = "  \"type\": \"object\","]
31527#[doc = "  \"required\": ["]
31528#[doc = "    \"account_id\","]
31529#[doc = "    \"public_key\","]
31530#[doc = "    \"stake\""]
31531#[doc = "  ],"]
31532#[doc = "  \"properties\": {"]
31533#[doc = "    \"account_id\": {"]
31534#[doc = "      \"$ref\": \"#/components/schemas/AccountId\""]
31535#[doc = "    },"]
31536#[doc = "    \"public_key\": {"]
31537#[doc = "      \"$ref\": \"#/components/schemas/PublicKey\""]
31538#[doc = "    },"]
31539#[doc = "    \"stake\": {"]
31540#[doc = "      \"$ref\": \"#/components/schemas/NearToken\""]
31541#[doc = "    }"]
31542#[doc = "  }"]
31543#[doc = "}"]
31544#[doc = r" ```"]
31545#[doc = r" </details>"]
31546#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
31547pub struct ValidatorStakeViewV1 {
31548    pub account_id: AccountId,
31549    pub public_key: PublicKey,
31550    pub stake: NearToken,
31551}
31552impl ::std::convert::From<&ValidatorStakeViewV1> for ValidatorStakeViewV1 {
31553    fn from(value: &ValidatorStakeViewV1) -> Self {
31554        value.clone()
31555    }
31556}
31557#[doc = "`ValidatorStakeViewValidatorStakeStructVersion`"]
31558#[doc = r""]
31559#[doc = r" <details><summary>JSON schema</summary>"]
31560#[doc = r""]
31561#[doc = r" ```json"]
31562#[doc = "{"]
31563#[doc = "  \"type\": \"string\","]
31564#[doc = "  \"enum\": ["]
31565#[doc = "    \"V1\""]
31566#[doc = "  ]"]
31567#[doc = "}"]
31568#[doc = r" ```"]
31569#[doc = r" </details>"]
31570#[derive(
31571    :: serde :: Deserialize,
31572    :: serde :: Serialize,
31573    Clone,
31574    Copy,
31575    Debug,
31576    Eq,
31577    Hash,
31578    Ord,
31579    PartialEq,
31580    PartialOrd,
31581)]
31582pub enum ValidatorStakeViewValidatorStakeStructVersion {
31583    V1,
31584}
31585impl ::std::convert::From<&Self> for ValidatorStakeViewValidatorStakeStructVersion {
31586    fn from(value: &ValidatorStakeViewValidatorStakeStructVersion) -> Self {
31587        value.clone()
31588    }
31589}
31590impl ::std::fmt::Display for ValidatorStakeViewValidatorStakeStructVersion {
31591    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
31592        match *self {
31593            Self::V1 => f.write_str("V1"),
31594        }
31595    }
31596}
31597impl ::std::str::FromStr for ValidatorStakeViewValidatorStakeStructVersion {
31598    type Err = self::error::ConversionError;
31599    fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
31600        match value {
31601            "V1" => Ok(Self::V1),
31602            _ => Err("invalid value".into()),
31603        }
31604    }
31605}
31606impl ::std::convert::TryFrom<&str> for ValidatorStakeViewValidatorStakeStructVersion {
31607    type Error = self::error::ConversionError;
31608    fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
31609        value.parse()
31610    }
31611}
31612impl ::std::convert::TryFrom<&::std::string::String>
31613    for ValidatorStakeViewValidatorStakeStructVersion
31614{
31615    type Error = self::error::ConversionError;
31616    fn try_from(
31617        value: &::std::string::String,
31618    ) -> ::std::result::Result<Self, self::error::ConversionError> {
31619        value.parse()
31620    }
31621}
31622impl ::std::convert::TryFrom<::std::string::String>
31623    for ValidatorStakeViewValidatorStakeStructVersion
31624{
31625    type Error = self::error::ConversionError;
31626    fn try_from(
31627        value: ::std::string::String,
31628    ) -> ::std::result::Result<Self, self::error::ConversionError> {
31629        value.parse()
31630    }
31631}
31632#[doc = "Data structure for semver version and github tag or commit."]
31633#[doc = r""]
31634#[doc = r" <details><summary>JSON schema</summary>"]
31635#[doc = r""]
31636#[doc = r" ```json"]
31637#[doc = "{"]
31638#[doc = "  \"description\": \"Data structure for semver version and github tag or commit.\","]
31639#[doc = "  \"type\": \"object\","]
31640#[doc = "  \"required\": ["]
31641#[doc = "    \"build\","]
31642#[doc = "    \"commit\","]
31643#[doc = "    \"version\""]
31644#[doc = "  ],"]
31645#[doc = "  \"properties\": {"]
31646#[doc = "    \"build\": {"]
31647#[doc = "      \"type\": \"string\""]
31648#[doc = "    },"]
31649#[doc = "    \"commit\": {"]
31650#[doc = "      \"type\": \"string\""]
31651#[doc = "    },"]
31652#[doc = "    \"rustc_version\": {"]
31653#[doc = "      \"default\": \"\","]
31654#[doc = "      \"type\": \"string\""]
31655#[doc = "    },"]
31656#[doc = "    \"version\": {"]
31657#[doc = "      \"type\": \"string\""]
31658#[doc = "    }"]
31659#[doc = "  }"]
31660#[doc = "}"]
31661#[doc = r" ```"]
31662#[doc = r" </details>"]
31663#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
31664pub struct Version {
31665    pub build: ::std::string::String,
31666    pub commit: ::std::string::String,
31667    #[serde(default)]
31668    pub rustc_version: ::std::string::String,
31669    pub version: ::std::string::String,
31670}
31671impl ::std::convert::From<&Version> for Version {
31672    fn from(value: &Version) -> Self {
31673        value.clone()
31674    }
31675}
31676#[doc = "`ViewAccessKeyByBlockIdRequestType`"]
31677#[doc = r""]
31678#[doc = r" <details><summary>JSON schema</summary>"]
31679#[doc = r""]
31680#[doc = r" ```json"]
31681#[doc = "{"]
31682#[doc = "  \"type\": \"string\","]
31683#[doc = "  \"enum\": ["]
31684#[doc = "    \"view_access_key\""]
31685#[doc = "  ]"]
31686#[doc = "}"]
31687#[doc = r" ```"]
31688#[doc = r" </details>"]
31689#[derive(
31690    :: serde :: Deserialize,
31691    :: serde :: Serialize,
31692    Clone,
31693    Copy,
31694    Debug,
31695    Eq,
31696    Hash,
31697    Ord,
31698    PartialEq,
31699    PartialOrd,
31700)]
31701pub enum ViewAccessKeyByBlockIdRequestType {
31702    #[serde(rename = "view_access_key")]
31703    ViewAccessKey,
31704}
31705impl ::std::convert::From<&Self> for ViewAccessKeyByBlockIdRequestType {
31706    fn from(value: &ViewAccessKeyByBlockIdRequestType) -> Self {
31707        value.clone()
31708    }
31709}
31710impl ::std::fmt::Display for ViewAccessKeyByBlockIdRequestType {
31711    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
31712        match *self {
31713            Self::ViewAccessKey => f.write_str("view_access_key"),
31714        }
31715    }
31716}
31717impl ::std::str::FromStr for ViewAccessKeyByBlockIdRequestType {
31718    type Err = self::error::ConversionError;
31719    fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
31720        match value {
31721            "view_access_key" => Ok(Self::ViewAccessKey),
31722            _ => Err("invalid value".into()),
31723        }
31724    }
31725}
31726impl ::std::convert::TryFrom<&str> for ViewAccessKeyByBlockIdRequestType {
31727    type Error = self::error::ConversionError;
31728    fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
31729        value.parse()
31730    }
31731}
31732impl ::std::convert::TryFrom<&::std::string::String> for ViewAccessKeyByBlockIdRequestType {
31733    type Error = self::error::ConversionError;
31734    fn try_from(
31735        value: &::std::string::String,
31736    ) -> ::std::result::Result<Self, self::error::ConversionError> {
31737        value.parse()
31738    }
31739}
31740impl ::std::convert::TryFrom<::std::string::String> for ViewAccessKeyByBlockIdRequestType {
31741    type Error = self::error::ConversionError;
31742    fn try_from(
31743        value: ::std::string::String,
31744    ) -> ::std::result::Result<Self, self::error::ConversionError> {
31745        value.parse()
31746    }
31747}
31748#[doc = "`ViewAccessKeyByFinalityRequestType`"]
31749#[doc = r""]
31750#[doc = r" <details><summary>JSON schema</summary>"]
31751#[doc = r""]
31752#[doc = r" ```json"]
31753#[doc = "{"]
31754#[doc = "  \"type\": \"string\","]
31755#[doc = "  \"enum\": ["]
31756#[doc = "    \"view_access_key\""]
31757#[doc = "  ]"]
31758#[doc = "}"]
31759#[doc = r" ```"]
31760#[doc = r" </details>"]
31761#[derive(
31762    :: serde :: Deserialize,
31763    :: serde :: Serialize,
31764    Clone,
31765    Copy,
31766    Debug,
31767    Eq,
31768    Hash,
31769    Ord,
31770    PartialEq,
31771    PartialOrd,
31772)]
31773pub enum ViewAccessKeyByFinalityRequestType {
31774    #[serde(rename = "view_access_key")]
31775    ViewAccessKey,
31776}
31777impl ::std::convert::From<&Self> for ViewAccessKeyByFinalityRequestType {
31778    fn from(value: &ViewAccessKeyByFinalityRequestType) -> Self {
31779        value.clone()
31780    }
31781}
31782impl ::std::fmt::Display for ViewAccessKeyByFinalityRequestType {
31783    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
31784        match *self {
31785            Self::ViewAccessKey => f.write_str("view_access_key"),
31786        }
31787    }
31788}
31789impl ::std::str::FromStr for ViewAccessKeyByFinalityRequestType {
31790    type Err = self::error::ConversionError;
31791    fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
31792        match value {
31793            "view_access_key" => Ok(Self::ViewAccessKey),
31794            _ => Err("invalid value".into()),
31795        }
31796    }
31797}
31798impl ::std::convert::TryFrom<&str> for ViewAccessKeyByFinalityRequestType {
31799    type Error = self::error::ConversionError;
31800    fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
31801        value.parse()
31802    }
31803}
31804impl ::std::convert::TryFrom<&::std::string::String> for ViewAccessKeyByFinalityRequestType {
31805    type Error = self::error::ConversionError;
31806    fn try_from(
31807        value: &::std::string::String,
31808    ) -> ::std::result::Result<Self, self::error::ConversionError> {
31809        value.parse()
31810    }
31811}
31812impl ::std::convert::TryFrom<::std::string::String> for ViewAccessKeyByFinalityRequestType {
31813    type Error = self::error::ConversionError;
31814    fn try_from(
31815        value: ::std::string::String,
31816    ) -> ::std::result::Result<Self, self::error::ConversionError> {
31817        value.parse()
31818    }
31819}
31820#[doc = "`ViewAccessKeyBySyncCheckpointRequestType`"]
31821#[doc = r""]
31822#[doc = r" <details><summary>JSON schema</summary>"]
31823#[doc = r""]
31824#[doc = r" ```json"]
31825#[doc = "{"]
31826#[doc = "  \"type\": \"string\","]
31827#[doc = "  \"enum\": ["]
31828#[doc = "    \"view_access_key\""]
31829#[doc = "  ]"]
31830#[doc = "}"]
31831#[doc = r" ```"]
31832#[doc = r" </details>"]
31833#[derive(
31834    :: serde :: Deserialize,
31835    :: serde :: Serialize,
31836    Clone,
31837    Copy,
31838    Debug,
31839    Eq,
31840    Hash,
31841    Ord,
31842    PartialEq,
31843    PartialOrd,
31844)]
31845pub enum ViewAccessKeyBySyncCheckpointRequestType {
31846    #[serde(rename = "view_access_key")]
31847    ViewAccessKey,
31848}
31849impl ::std::convert::From<&Self> for ViewAccessKeyBySyncCheckpointRequestType {
31850    fn from(value: &ViewAccessKeyBySyncCheckpointRequestType) -> Self {
31851        value.clone()
31852    }
31853}
31854impl ::std::fmt::Display for ViewAccessKeyBySyncCheckpointRequestType {
31855    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
31856        match *self {
31857            Self::ViewAccessKey => f.write_str("view_access_key"),
31858        }
31859    }
31860}
31861impl ::std::str::FromStr for ViewAccessKeyBySyncCheckpointRequestType {
31862    type Err = self::error::ConversionError;
31863    fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
31864        match value {
31865            "view_access_key" => Ok(Self::ViewAccessKey),
31866            _ => Err("invalid value".into()),
31867        }
31868    }
31869}
31870impl ::std::convert::TryFrom<&str> for ViewAccessKeyBySyncCheckpointRequestType {
31871    type Error = self::error::ConversionError;
31872    fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
31873        value.parse()
31874    }
31875}
31876impl ::std::convert::TryFrom<&::std::string::String> for ViewAccessKeyBySyncCheckpointRequestType {
31877    type Error = self::error::ConversionError;
31878    fn try_from(
31879        value: &::std::string::String,
31880    ) -> ::std::result::Result<Self, self::error::ConversionError> {
31881        value.parse()
31882    }
31883}
31884impl ::std::convert::TryFrom<::std::string::String> for ViewAccessKeyBySyncCheckpointRequestType {
31885    type Error = self::error::ConversionError;
31886    fn try_from(
31887        value: ::std::string::String,
31888    ) -> ::std::result::Result<Self, self::error::ConversionError> {
31889        value.parse()
31890    }
31891}
31892#[doc = "`ViewAccessKeyListByBlockIdRequestType`"]
31893#[doc = r""]
31894#[doc = r" <details><summary>JSON schema</summary>"]
31895#[doc = r""]
31896#[doc = r" ```json"]
31897#[doc = "{"]
31898#[doc = "  \"type\": \"string\","]
31899#[doc = "  \"enum\": ["]
31900#[doc = "    \"view_access_key_list\""]
31901#[doc = "  ]"]
31902#[doc = "}"]
31903#[doc = r" ```"]
31904#[doc = r" </details>"]
31905#[derive(
31906    :: serde :: Deserialize,
31907    :: serde :: Serialize,
31908    Clone,
31909    Copy,
31910    Debug,
31911    Eq,
31912    Hash,
31913    Ord,
31914    PartialEq,
31915    PartialOrd,
31916)]
31917pub enum ViewAccessKeyListByBlockIdRequestType {
31918    #[serde(rename = "view_access_key_list")]
31919    ViewAccessKeyList,
31920}
31921impl ::std::convert::From<&Self> for ViewAccessKeyListByBlockIdRequestType {
31922    fn from(value: &ViewAccessKeyListByBlockIdRequestType) -> Self {
31923        value.clone()
31924    }
31925}
31926impl ::std::fmt::Display for ViewAccessKeyListByBlockIdRequestType {
31927    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
31928        match *self {
31929            Self::ViewAccessKeyList => f.write_str("view_access_key_list"),
31930        }
31931    }
31932}
31933impl ::std::str::FromStr for ViewAccessKeyListByBlockIdRequestType {
31934    type Err = self::error::ConversionError;
31935    fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
31936        match value {
31937            "view_access_key_list" => Ok(Self::ViewAccessKeyList),
31938            _ => Err("invalid value".into()),
31939        }
31940    }
31941}
31942impl ::std::convert::TryFrom<&str> for ViewAccessKeyListByBlockIdRequestType {
31943    type Error = self::error::ConversionError;
31944    fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
31945        value.parse()
31946    }
31947}
31948impl ::std::convert::TryFrom<&::std::string::String> for ViewAccessKeyListByBlockIdRequestType {
31949    type Error = self::error::ConversionError;
31950    fn try_from(
31951        value: &::std::string::String,
31952    ) -> ::std::result::Result<Self, self::error::ConversionError> {
31953        value.parse()
31954    }
31955}
31956impl ::std::convert::TryFrom<::std::string::String> for ViewAccessKeyListByBlockIdRequestType {
31957    type Error = self::error::ConversionError;
31958    fn try_from(
31959        value: ::std::string::String,
31960    ) -> ::std::result::Result<Self, self::error::ConversionError> {
31961        value.parse()
31962    }
31963}
31964#[doc = "`ViewAccessKeyListByFinalityRequestType`"]
31965#[doc = r""]
31966#[doc = r" <details><summary>JSON schema</summary>"]
31967#[doc = r""]
31968#[doc = r" ```json"]
31969#[doc = "{"]
31970#[doc = "  \"type\": \"string\","]
31971#[doc = "  \"enum\": ["]
31972#[doc = "    \"view_access_key_list\""]
31973#[doc = "  ]"]
31974#[doc = "}"]
31975#[doc = r" ```"]
31976#[doc = r" </details>"]
31977#[derive(
31978    :: serde :: Deserialize,
31979    :: serde :: Serialize,
31980    Clone,
31981    Copy,
31982    Debug,
31983    Eq,
31984    Hash,
31985    Ord,
31986    PartialEq,
31987    PartialOrd,
31988)]
31989pub enum ViewAccessKeyListByFinalityRequestType {
31990    #[serde(rename = "view_access_key_list")]
31991    ViewAccessKeyList,
31992}
31993impl ::std::convert::From<&Self> for ViewAccessKeyListByFinalityRequestType {
31994    fn from(value: &ViewAccessKeyListByFinalityRequestType) -> Self {
31995        value.clone()
31996    }
31997}
31998impl ::std::fmt::Display for ViewAccessKeyListByFinalityRequestType {
31999    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
32000        match *self {
32001            Self::ViewAccessKeyList => f.write_str("view_access_key_list"),
32002        }
32003    }
32004}
32005impl ::std::str::FromStr for ViewAccessKeyListByFinalityRequestType {
32006    type Err = self::error::ConversionError;
32007    fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
32008        match value {
32009            "view_access_key_list" => Ok(Self::ViewAccessKeyList),
32010            _ => Err("invalid value".into()),
32011        }
32012    }
32013}
32014impl ::std::convert::TryFrom<&str> for ViewAccessKeyListByFinalityRequestType {
32015    type Error = self::error::ConversionError;
32016    fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
32017        value.parse()
32018    }
32019}
32020impl ::std::convert::TryFrom<&::std::string::String> for ViewAccessKeyListByFinalityRequestType {
32021    type Error = self::error::ConversionError;
32022    fn try_from(
32023        value: &::std::string::String,
32024    ) -> ::std::result::Result<Self, self::error::ConversionError> {
32025        value.parse()
32026    }
32027}
32028impl ::std::convert::TryFrom<::std::string::String> for ViewAccessKeyListByFinalityRequestType {
32029    type Error = self::error::ConversionError;
32030    fn try_from(
32031        value: ::std::string::String,
32032    ) -> ::std::result::Result<Self, self::error::ConversionError> {
32033        value.parse()
32034    }
32035}
32036#[doc = "`ViewAccessKeyListBySyncCheckpointRequestType`"]
32037#[doc = r""]
32038#[doc = r" <details><summary>JSON schema</summary>"]
32039#[doc = r""]
32040#[doc = r" ```json"]
32041#[doc = "{"]
32042#[doc = "  \"type\": \"string\","]
32043#[doc = "  \"enum\": ["]
32044#[doc = "    \"view_access_key_list\""]
32045#[doc = "  ]"]
32046#[doc = "}"]
32047#[doc = r" ```"]
32048#[doc = r" </details>"]
32049#[derive(
32050    :: serde :: Deserialize,
32051    :: serde :: Serialize,
32052    Clone,
32053    Copy,
32054    Debug,
32055    Eq,
32056    Hash,
32057    Ord,
32058    PartialEq,
32059    PartialOrd,
32060)]
32061pub enum ViewAccessKeyListBySyncCheckpointRequestType {
32062    #[serde(rename = "view_access_key_list")]
32063    ViewAccessKeyList,
32064}
32065impl ::std::convert::From<&Self> for ViewAccessKeyListBySyncCheckpointRequestType {
32066    fn from(value: &ViewAccessKeyListBySyncCheckpointRequestType) -> Self {
32067        value.clone()
32068    }
32069}
32070impl ::std::fmt::Display for ViewAccessKeyListBySyncCheckpointRequestType {
32071    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
32072        match *self {
32073            Self::ViewAccessKeyList => f.write_str("view_access_key_list"),
32074        }
32075    }
32076}
32077impl ::std::str::FromStr for ViewAccessKeyListBySyncCheckpointRequestType {
32078    type Err = self::error::ConversionError;
32079    fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
32080        match value {
32081            "view_access_key_list" => Ok(Self::ViewAccessKeyList),
32082            _ => Err("invalid value".into()),
32083        }
32084    }
32085}
32086impl ::std::convert::TryFrom<&str> for ViewAccessKeyListBySyncCheckpointRequestType {
32087    type Error = self::error::ConversionError;
32088    fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
32089        value.parse()
32090    }
32091}
32092impl ::std::convert::TryFrom<&::std::string::String>
32093    for ViewAccessKeyListBySyncCheckpointRequestType
32094{
32095    type Error = self::error::ConversionError;
32096    fn try_from(
32097        value: &::std::string::String,
32098    ) -> ::std::result::Result<Self, self::error::ConversionError> {
32099        value.parse()
32100    }
32101}
32102impl ::std::convert::TryFrom<::std::string::String>
32103    for ViewAccessKeyListBySyncCheckpointRequestType
32104{
32105    type Error = self::error::ConversionError;
32106    fn try_from(
32107        value: ::std::string::String,
32108    ) -> ::std::result::Result<Self, self::error::ConversionError> {
32109        value.parse()
32110    }
32111}
32112#[doc = "`ViewAccountByBlockIdRequestType`"]
32113#[doc = r""]
32114#[doc = r" <details><summary>JSON schema</summary>"]
32115#[doc = r""]
32116#[doc = r" ```json"]
32117#[doc = "{"]
32118#[doc = "  \"type\": \"string\","]
32119#[doc = "  \"enum\": ["]
32120#[doc = "    \"view_account\""]
32121#[doc = "  ]"]
32122#[doc = "}"]
32123#[doc = r" ```"]
32124#[doc = r" </details>"]
32125#[derive(
32126    :: serde :: Deserialize,
32127    :: serde :: Serialize,
32128    Clone,
32129    Copy,
32130    Debug,
32131    Eq,
32132    Hash,
32133    Ord,
32134    PartialEq,
32135    PartialOrd,
32136)]
32137pub enum ViewAccountByBlockIdRequestType {
32138    #[serde(rename = "view_account")]
32139    ViewAccount,
32140}
32141impl ::std::convert::From<&Self> for ViewAccountByBlockIdRequestType {
32142    fn from(value: &ViewAccountByBlockIdRequestType) -> Self {
32143        value.clone()
32144    }
32145}
32146impl ::std::fmt::Display for ViewAccountByBlockIdRequestType {
32147    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
32148        match *self {
32149            Self::ViewAccount => f.write_str("view_account"),
32150        }
32151    }
32152}
32153impl ::std::str::FromStr for ViewAccountByBlockIdRequestType {
32154    type Err = self::error::ConversionError;
32155    fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
32156        match value {
32157            "view_account" => Ok(Self::ViewAccount),
32158            _ => Err("invalid value".into()),
32159        }
32160    }
32161}
32162impl ::std::convert::TryFrom<&str> for ViewAccountByBlockIdRequestType {
32163    type Error = self::error::ConversionError;
32164    fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
32165        value.parse()
32166    }
32167}
32168impl ::std::convert::TryFrom<&::std::string::String> for ViewAccountByBlockIdRequestType {
32169    type Error = self::error::ConversionError;
32170    fn try_from(
32171        value: &::std::string::String,
32172    ) -> ::std::result::Result<Self, self::error::ConversionError> {
32173        value.parse()
32174    }
32175}
32176impl ::std::convert::TryFrom<::std::string::String> for ViewAccountByBlockIdRequestType {
32177    type Error = self::error::ConversionError;
32178    fn try_from(
32179        value: ::std::string::String,
32180    ) -> ::std::result::Result<Self, self::error::ConversionError> {
32181        value.parse()
32182    }
32183}
32184#[doc = "`ViewAccountByFinalityRequestType`"]
32185#[doc = r""]
32186#[doc = r" <details><summary>JSON schema</summary>"]
32187#[doc = r""]
32188#[doc = r" ```json"]
32189#[doc = "{"]
32190#[doc = "  \"type\": \"string\","]
32191#[doc = "  \"enum\": ["]
32192#[doc = "    \"view_account\""]
32193#[doc = "  ]"]
32194#[doc = "}"]
32195#[doc = r" ```"]
32196#[doc = r" </details>"]
32197#[derive(
32198    :: serde :: Deserialize,
32199    :: serde :: Serialize,
32200    Clone,
32201    Copy,
32202    Debug,
32203    Eq,
32204    Hash,
32205    Ord,
32206    PartialEq,
32207    PartialOrd,
32208)]
32209pub enum ViewAccountByFinalityRequestType {
32210    #[serde(rename = "view_account")]
32211    ViewAccount,
32212}
32213impl ::std::convert::From<&Self> for ViewAccountByFinalityRequestType {
32214    fn from(value: &ViewAccountByFinalityRequestType) -> Self {
32215        value.clone()
32216    }
32217}
32218impl ::std::fmt::Display for ViewAccountByFinalityRequestType {
32219    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
32220        match *self {
32221            Self::ViewAccount => f.write_str("view_account"),
32222        }
32223    }
32224}
32225impl ::std::str::FromStr for ViewAccountByFinalityRequestType {
32226    type Err = self::error::ConversionError;
32227    fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
32228        match value {
32229            "view_account" => Ok(Self::ViewAccount),
32230            _ => Err("invalid value".into()),
32231        }
32232    }
32233}
32234impl ::std::convert::TryFrom<&str> for ViewAccountByFinalityRequestType {
32235    type Error = self::error::ConversionError;
32236    fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
32237        value.parse()
32238    }
32239}
32240impl ::std::convert::TryFrom<&::std::string::String> for ViewAccountByFinalityRequestType {
32241    type Error = self::error::ConversionError;
32242    fn try_from(
32243        value: &::std::string::String,
32244    ) -> ::std::result::Result<Self, self::error::ConversionError> {
32245        value.parse()
32246    }
32247}
32248impl ::std::convert::TryFrom<::std::string::String> for ViewAccountByFinalityRequestType {
32249    type Error = self::error::ConversionError;
32250    fn try_from(
32251        value: ::std::string::String,
32252    ) -> ::std::result::Result<Self, self::error::ConversionError> {
32253        value.parse()
32254    }
32255}
32256#[doc = "`ViewAccountBySyncCheckpointRequestType`"]
32257#[doc = r""]
32258#[doc = r" <details><summary>JSON schema</summary>"]
32259#[doc = r""]
32260#[doc = r" ```json"]
32261#[doc = "{"]
32262#[doc = "  \"type\": \"string\","]
32263#[doc = "  \"enum\": ["]
32264#[doc = "    \"view_account\""]
32265#[doc = "  ]"]
32266#[doc = "}"]
32267#[doc = r" ```"]
32268#[doc = r" </details>"]
32269#[derive(
32270    :: serde :: Deserialize,
32271    :: serde :: Serialize,
32272    Clone,
32273    Copy,
32274    Debug,
32275    Eq,
32276    Hash,
32277    Ord,
32278    PartialEq,
32279    PartialOrd,
32280)]
32281pub enum ViewAccountBySyncCheckpointRequestType {
32282    #[serde(rename = "view_account")]
32283    ViewAccount,
32284}
32285impl ::std::convert::From<&Self> for ViewAccountBySyncCheckpointRequestType {
32286    fn from(value: &ViewAccountBySyncCheckpointRequestType) -> Self {
32287        value.clone()
32288    }
32289}
32290impl ::std::fmt::Display for ViewAccountBySyncCheckpointRequestType {
32291    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
32292        match *self {
32293            Self::ViewAccount => f.write_str("view_account"),
32294        }
32295    }
32296}
32297impl ::std::str::FromStr for ViewAccountBySyncCheckpointRequestType {
32298    type Err = self::error::ConversionError;
32299    fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
32300        match value {
32301            "view_account" => Ok(Self::ViewAccount),
32302            _ => Err("invalid value".into()),
32303        }
32304    }
32305}
32306impl ::std::convert::TryFrom<&str> for ViewAccountBySyncCheckpointRequestType {
32307    type Error = self::error::ConversionError;
32308    fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
32309        value.parse()
32310    }
32311}
32312impl ::std::convert::TryFrom<&::std::string::String> for ViewAccountBySyncCheckpointRequestType {
32313    type Error = self::error::ConversionError;
32314    fn try_from(
32315        value: &::std::string::String,
32316    ) -> ::std::result::Result<Self, self::error::ConversionError> {
32317        value.parse()
32318    }
32319}
32320impl ::std::convert::TryFrom<::std::string::String> for ViewAccountBySyncCheckpointRequestType {
32321    type Error = self::error::ConversionError;
32322    fn try_from(
32323        value: ::std::string::String,
32324    ) -> ::std::result::Result<Self, self::error::ConversionError> {
32325        value.parse()
32326    }
32327}
32328#[doc = "`ViewCodeByBlockIdRequestType`"]
32329#[doc = r""]
32330#[doc = r" <details><summary>JSON schema</summary>"]
32331#[doc = r""]
32332#[doc = r" ```json"]
32333#[doc = "{"]
32334#[doc = "  \"type\": \"string\","]
32335#[doc = "  \"enum\": ["]
32336#[doc = "    \"view_code\""]
32337#[doc = "  ]"]
32338#[doc = "}"]
32339#[doc = r" ```"]
32340#[doc = r" </details>"]
32341#[derive(
32342    :: serde :: Deserialize,
32343    :: serde :: Serialize,
32344    Clone,
32345    Copy,
32346    Debug,
32347    Eq,
32348    Hash,
32349    Ord,
32350    PartialEq,
32351    PartialOrd,
32352)]
32353pub enum ViewCodeByBlockIdRequestType {
32354    #[serde(rename = "view_code")]
32355    ViewCode,
32356}
32357impl ::std::convert::From<&Self> for ViewCodeByBlockIdRequestType {
32358    fn from(value: &ViewCodeByBlockIdRequestType) -> Self {
32359        value.clone()
32360    }
32361}
32362impl ::std::fmt::Display for ViewCodeByBlockIdRequestType {
32363    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
32364        match *self {
32365            Self::ViewCode => f.write_str("view_code"),
32366        }
32367    }
32368}
32369impl ::std::str::FromStr for ViewCodeByBlockIdRequestType {
32370    type Err = self::error::ConversionError;
32371    fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
32372        match value {
32373            "view_code" => Ok(Self::ViewCode),
32374            _ => Err("invalid value".into()),
32375        }
32376    }
32377}
32378impl ::std::convert::TryFrom<&str> for ViewCodeByBlockIdRequestType {
32379    type Error = self::error::ConversionError;
32380    fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
32381        value.parse()
32382    }
32383}
32384impl ::std::convert::TryFrom<&::std::string::String> for ViewCodeByBlockIdRequestType {
32385    type Error = self::error::ConversionError;
32386    fn try_from(
32387        value: &::std::string::String,
32388    ) -> ::std::result::Result<Self, self::error::ConversionError> {
32389        value.parse()
32390    }
32391}
32392impl ::std::convert::TryFrom<::std::string::String> for ViewCodeByBlockIdRequestType {
32393    type Error = self::error::ConversionError;
32394    fn try_from(
32395        value: ::std::string::String,
32396    ) -> ::std::result::Result<Self, self::error::ConversionError> {
32397        value.parse()
32398    }
32399}
32400#[doc = "`ViewCodeByFinalityRequestType`"]
32401#[doc = r""]
32402#[doc = r" <details><summary>JSON schema</summary>"]
32403#[doc = r""]
32404#[doc = r" ```json"]
32405#[doc = "{"]
32406#[doc = "  \"type\": \"string\","]
32407#[doc = "  \"enum\": ["]
32408#[doc = "    \"view_code\""]
32409#[doc = "  ]"]
32410#[doc = "}"]
32411#[doc = r" ```"]
32412#[doc = r" </details>"]
32413#[derive(
32414    :: serde :: Deserialize,
32415    :: serde :: Serialize,
32416    Clone,
32417    Copy,
32418    Debug,
32419    Eq,
32420    Hash,
32421    Ord,
32422    PartialEq,
32423    PartialOrd,
32424)]
32425pub enum ViewCodeByFinalityRequestType {
32426    #[serde(rename = "view_code")]
32427    ViewCode,
32428}
32429impl ::std::convert::From<&Self> for ViewCodeByFinalityRequestType {
32430    fn from(value: &ViewCodeByFinalityRequestType) -> Self {
32431        value.clone()
32432    }
32433}
32434impl ::std::fmt::Display for ViewCodeByFinalityRequestType {
32435    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
32436        match *self {
32437            Self::ViewCode => f.write_str("view_code"),
32438        }
32439    }
32440}
32441impl ::std::str::FromStr for ViewCodeByFinalityRequestType {
32442    type Err = self::error::ConversionError;
32443    fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
32444        match value {
32445            "view_code" => Ok(Self::ViewCode),
32446            _ => Err("invalid value".into()),
32447        }
32448    }
32449}
32450impl ::std::convert::TryFrom<&str> for ViewCodeByFinalityRequestType {
32451    type Error = self::error::ConversionError;
32452    fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
32453        value.parse()
32454    }
32455}
32456impl ::std::convert::TryFrom<&::std::string::String> for ViewCodeByFinalityRequestType {
32457    type Error = self::error::ConversionError;
32458    fn try_from(
32459        value: &::std::string::String,
32460    ) -> ::std::result::Result<Self, self::error::ConversionError> {
32461        value.parse()
32462    }
32463}
32464impl ::std::convert::TryFrom<::std::string::String> for ViewCodeByFinalityRequestType {
32465    type Error = self::error::ConversionError;
32466    fn try_from(
32467        value: ::std::string::String,
32468    ) -> ::std::result::Result<Self, self::error::ConversionError> {
32469        value.parse()
32470    }
32471}
32472#[doc = "`ViewCodeBySyncCheckpointRequestType`"]
32473#[doc = r""]
32474#[doc = r" <details><summary>JSON schema</summary>"]
32475#[doc = r""]
32476#[doc = r" ```json"]
32477#[doc = "{"]
32478#[doc = "  \"type\": \"string\","]
32479#[doc = "  \"enum\": ["]
32480#[doc = "    \"view_code\""]
32481#[doc = "  ]"]
32482#[doc = "}"]
32483#[doc = r" ```"]
32484#[doc = r" </details>"]
32485#[derive(
32486    :: serde :: Deserialize,
32487    :: serde :: Serialize,
32488    Clone,
32489    Copy,
32490    Debug,
32491    Eq,
32492    Hash,
32493    Ord,
32494    PartialEq,
32495    PartialOrd,
32496)]
32497pub enum ViewCodeBySyncCheckpointRequestType {
32498    #[serde(rename = "view_code")]
32499    ViewCode,
32500}
32501impl ::std::convert::From<&Self> for ViewCodeBySyncCheckpointRequestType {
32502    fn from(value: &ViewCodeBySyncCheckpointRequestType) -> Self {
32503        value.clone()
32504    }
32505}
32506impl ::std::fmt::Display for ViewCodeBySyncCheckpointRequestType {
32507    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
32508        match *self {
32509            Self::ViewCode => f.write_str("view_code"),
32510        }
32511    }
32512}
32513impl ::std::str::FromStr for ViewCodeBySyncCheckpointRequestType {
32514    type Err = self::error::ConversionError;
32515    fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
32516        match value {
32517            "view_code" => Ok(Self::ViewCode),
32518            _ => Err("invalid value".into()),
32519        }
32520    }
32521}
32522impl ::std::convert::TryFrom<&str> for ViewCodeBySyncCheckpointRequestType {
32523    type Error = self::error::ConversionError;
32524    fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
32525        value.parse()
32526    }
32527}
32528impl ::std::convert::TryFrom<&::std::string::String> for ViewCodeBySyncCheckpointRequestType {
32529    type Error = self::error::ConversionError;
32530    fn try_from(
32531        value: &::std::string::String,
32532    ) -> ::std::result::Result<Self, self::error::ConversionError> {
32533        value.parse()
32534    }
32535}
32536impl ::std::convert::TryFrom<::std::string::String> for ViewCodeBySyncCheckpointRequestType {
32537    type Error = self::error::ConversionError;
32538    fn try_from(
32539        value: ::std::string::String,
32540    ) -> ::std::result::Result<Self, self::error::ConversionError> {
32541        value.parse()
32542    }
32543}
32544#[doc = "`ViewGlobalContractCodeByAccountIdByBlockIdRequestType`"]
32545#[doc = r""]
32546#[doc = r" <details><summary>JSON schema</summary>"]
32547#[doc = r""]
32548#[doc = r" ```json"]
32549#[doc = "{"]
32550#[doc = "  \"type\": \"string\","]
32551#[doc = "  \"enum\": ["]
32552#[doc = "    \"view_global_contract_code_by_account_id\""]
32553#[doc = "  ]"]
32554#[doc = "}"]
32555#[doc = r" ```"]
32556#[doc = r" </details>"]
32557#[derive(
32558    :: serde :: Deserialize,
32559    :: serde :: Serialize,
32560    Clone,
32561    Copy,
32562    Debug,
32563    Eq,
32564    Hash,
32565    Ord,
32566    PartialEq,
32567    PartialOrd,
32568)]
32569pub enum ViewGlobalContractCodeByAccountIdByBlockIdRequestType {
32570    #[serde(rename = "view_global_contract_code_by_account_id")]
32571    ViewGlobalContractCodeByAccountId,
32572}
32573impl ::std::convert::From<&Self> for ViewGlobalContractCodeByAccountIdByBlockIdRequestType {
32574    fn from(value: &ViewGlobalContractCodeByAccountIdByBlockIdRequestType) -> Self {
32575        value.clone()
32576    }
32577}
32578impl ::std::fmt::Display for ViewGlobalContractCodeByAccountIdByBlockIdRequestType {
32579    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
32580        match *self {
32581            Self::ViewGlobalContractCodeByAccountId => {
32582                f.write_str("view_global_contract_code_by_account_id")
32583            }
32584        }
32585    }
32586}
32587impl ::std::str::FromStr for ViewGlobalContractCodeByAccountIdByBlockIdRequestType {
32588    type Err = self::error::ConversionError;
32589    fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
32590        match value {
32591            "view_global_contract_code_by_account_id" => {
32592                Ok(Self::ViewGlobalContractCodeByAccountId)
32593            }
32594            _ => Err("invalid value".into()),
32595        }
32596    }
32597}
32598impl ::std::convert::TryFrom<&str> for ViewGlobalContractCodeByAccountIdByBlockIdRequestType {
32599    type Error = self::error::ConversionError;
32600    fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
32601        value.parse()
32602    }
32603}
32604impl ::std::convert::TryFrom<&::std::string::String>
32605    for ViewGlobalContractCodeByAccountIdByBlockIdRequestType
32606{
32607    type Error = self::error::ConversionError;
32608    fn try_from(
32609        value: &::std::string::String,
32610    ) -> ::std::result::Result<Self, self::error::ConversionError> {
32611        value.parse()
32612    }
32613}
32614impl ::std::convert::TryFrom<::std::string::String>
32615    for ViewGlobalContractCodeByAccountIdByBlockIdRequestType
32616{
32617    type Error = self::error::ConversionError;
32618    fn try_from(
32619        value: ::std::string::String,
32620    ) -> ::std::result::Result<Self, self::error::ConversionError> {
32621        value.parse()
32622    }
32623}
32624#[doc = "`ViewGlobalContractCodeByAccountIdByFinalityRequestType`"]
32625#[doc = r""]
32626#[doc = r" <details><summary>JSON schema</summary>"]
32627#[doc = r""]
32628#[doc = r" ```json"]
32629#[doc = "{"]
32630#[doc = "  \"type\": \"string\","]
32631#[doc = "  \"enum\": ["]
32632#[doc = "    \"view_global_contract_code_by_account_id\""]
32633#[doc = "  ]"]
32634#[doc = "}"]
32635#[doc = r" ```"]
32636#[doc = r" </details>"]
32637#[derive(
32638    :: serde :: Deserialize,
32639    :: serde :: Serialize,
32640    Clone,
32641    Copy,
32642    Debug,
32643    Eq,
32644    Hash,
32645    Ord,
32646    PartialEq,
32647    PartialOrd,
32648)]
32649pub enum ViewGlobalContractCodeByAccountIdByFinalityRequestType {
32650    #[serde(rename = "view_global_contract_code_by_account_id")]
32651    ViewGlobalContractCodeByAccountId,
32652}
32653impl ::std::convert::From<&Self> for ViewGlobalContractCodeByAccountIdByFinalityRequestType {
32654    fn from(value: &ViewGlobalContractCodeByAccountIdByFinalityRequestType) -> Self {
32655        value.clone()
32656    }
32657}
32658impl ::std::fmt::Display for ViewGlobalContractCodeByAccountIdByFinalityRequestType {
32659    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
32660        match *self {
32661            Self::ViewGlobalContractCodeByAccountId => {
32662                f.write_str("view_global_contract_code_by_account_id")
32663            }
32664        }
32665    }
32666}
32667impl ::std::str::FromStr for ViewGlobalContractCodeByAccountIdByFinalityRequestType {
32668    type Err = self::error::ConversionError;
32669    fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
32670        match value {
32671            "view_global_contract_code_by_account_id" => {
32672                Ok(Self::ViewGlobalContractCodeByAccountId)
32673            }
32674            _ => Err("invalid value".into()),
32675        }
32676    }
32677}
32678impl ::std::convert::TryFrom<&str> for ViewGlobalContractCodeByAccountIdByFinalityRequestType {
32679    type Error = self::error::ConversionError;
32680    fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
32681        value.parse()
32682    }
32683}
32684impl ::std::convert::TryFrom<&::std::string::String>
32685    for ViewGlobalContractCodeByAccountIdByFinalityRequestType
32686{
32687    type Error = self::error::ConversionError;
32688    fn try_from(
32689        value: &::std::string::String,
32690    ) -> ::std::result::Result<Self, self::error::ConversionError> {
32691        value.parse()
32692    }
32693}
32694impl ::std::convert::TryFrom<::std::string::String>
32695    for ViewGlobalContractCodeByAccountIdByFinalityRequestType
32696{
32697    type Error = self::error::ConversionError;
32698    fn try_from(
32699        value: ::std::string::String,
32700    ) -> ::std::result::Result<Self, self::error::ConversionError> {
32701        value.parse()
32702    }
32703}
32704#[doc = "`ViewGlobalContractCodeByAccountIdBySyncCheckpointRequestType`"]
32705#[doc = r""]
32706#[doc = r" <details><summary>JSON schema</summary>"]
32707#[doc = r""]
32708#[doc = r" ```json"]
32709#[doc = "{"]
32710#[doc = "  \"type\": \"string\","]
32711#[doc = "  \"enum\": ["]
32712#[doc = "    \"view_global_contract_code_by_account_id\""]
32713#[doc = "  ]"]
32714#[doc = "}"]
32715#[doc = r" ```"]
32716#[doc = r" </details>"]
32717#[derive(
32718    :: serde :: Deserialize,
32719    :: serde :: Serialize,
32720    Clone,
32721    Copy,
32722    Debug,
32723    Eq,
32724    Hash,
32725    Ord,
32726    PartialEq,
32727    PartialOrd,
32728)]
32729pub enum ViewGlobalContractCodeByAccountIdBySyncCheckpointRequestType {
32730    #[serde(rename = "view_global_contract_code_by_account_id")]
32731    ViewGlobalContractCodeByAccountId,
32732}
32733impl ::std::convert::From<&Self> for ViewGlobalContractCodeByAccountIdBySyncCheckpointRequestType {
32734    fn from(value: &ViewGlobalContractCodeByAccountIdBySyncCheckpointRequestType) -> Self {
32735        value.clone()
32736    }
32737}
32738impl ::std::fmt::Display for ViewGlobalContractCodeByAccountIdBySyncCheckpointRequestType {
32739    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
32740        match *self {
32741            Self::ViewGlobalContractCodeByAccountId => {
32742                f.write_str("view_global_contract_code_by_account_id")
32743            }
32744        }
32745    }
32746}
32747impl ::std::str::FromStr for ViewGlobalContractCodeByAccountIdBySyncCheckpointRequestType {
32748    type Err = self::error::ConversionError;
32749    fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
32750        match value {
32751            "view_global_contract_code_by_account_id" => {
32752                Ok(Self::ViewGlobalContractCodeByAccountId)
32753            }
32754            _ => Err("invalid value".into()),
32755        }
32756    }
32757}
32758impl ::std::convert::TryFrom<&str>
32759    for ViewGlobalContractCodeByAccountIdBySyncCheckpointRequestType
32760{
32761    type Error = self::error::ConversionError;
32762    fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
32763        value.parse()
32764    }
32765}
32766impl ::std::convert::TryFrom<&::std::string::String>
32767    for ViewGlobalContractCodeByAccountIdBySyncCheckpointRequestType
32768{
32769    type Error = self::error::ConversionError;
32770    fn try_from(
32771        value: &::std::string::String,
32772    ) -> ::std::result::Result<Self, self::error::ConversionError> {
32773        value.parse()
32774    }
32775}
32776impl ::std::convert::TryFrom<::std::string::String>
32777    for ViewGlobalContractCodeByAccountIdBySyncCheckpointRequestType
32778{
32779    type Error = self::error::ConversionError;
32780    fn try_from(
32781        value: ::std::string::String,
32782    ) -> ::std::result::Result<Self, self::error::ConversionError> {
32783        value.parse()
32784    }
32785}
32786#[doc = "`ViewGlobalContractCodeByBlockIdRequestType`"]
32787#[doc = r""]
32788#[doc = r" <details><summary>JSON schema</summary>"]
32789#[doc = r""]
32790#[doc = r" ```json"]
32791#[doc = "{"]
32792#[doc = "  \"type\": \"string\","]
32793#[doc = "  \"enum\": ["]
32794#[doc = "    \"view_global_contract_code\""]
32795#[doc = "  ]"]
32796#[doc = "}"]
32797#[doc = r" ```"]
32798#[doc = r" </details>"]
32799#[derive(
32800    :: serde :: Deserialize,
32801    :: serde :: Serialize,
32802    Clone,
32803    Copy,
32804    Debug,
32805    Eq,
32806    Hash,
32807    Ord,
32808    PartialEq,
32809    PartialOrd,
32810)]
32811pub enum ViewGlobalContractCodeByBlockIdRequestType {
32812    #[serde(rename = "view_global_contract_code")]
32813    ViewGlobalContractCode,
32814}
32815impl ::std::convert::From<&Self> for ViewGlobalContractCodeByBlockIdRequestType {
32816    fn from(value: &ViewGlobalContractCodeByBlockIdRequestType) -> Self {
32817        value.clone()
32818    }
32819}
32820impl ::std::fmt::Display for ViewGlobalContractCodeByBlockIdRequestType {
32821    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
32822        match *self {
32823            Self::ViewGlobalContractCode => f.write_str("view_global_contract_code"),
32824        }
32825    }
32826}
32827impl ::std::str::FromStr for ViewGlobalContractCodeByBlockIdRequestType {
32828    type Err = self::error::ConversionError;
32829    fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
32830        match value {
32831            "view_global_contract_code" => Ok(Self::ViewGlobalContractCode),
32832            _ => Err("invalid value".into()),
32833        }
32834    }
32835}
32836impl ::std::convert::TryFrom<&str> for ViewGlobalContractCodeByBlockIdRequestType {
32837    type Error = self::error::ConversionError;
32838    fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
32839        value.parse()
32840    }
32841}
32842impl ::std::convert::TryFrom<&::std::string::String>
32843    for ViewGlobalContractCodeByBlockIdRequestType
32844{
32845    type Error = self::error::ConversionError;
32846    fn try_from(
32847        value: &::std::string::String,
32848    ) -> ::std::result::Result<Self, self::error::ConversionError> {
32849        value.parse()
32850    }
32851}
32852impl ::std::convert::TryFrom<::std::string::String> for ViewGlobalContractCodeByBlockIdRequestType {
32853    type Error = self::error::ConversionError;
32854    fn try_from(
32855        value: ::std::string::String,
32856    ) -> ::std::result::Result<Self, self::error::ConversionError> {
32857        value.parse()
32858    }
32859}
32860#[doc = "`ViewGlobalContractCodeByFinalityRequestType`"]
32861#[doc = r""]
32862#[doc = r" <details><summary>JSON schema</summary>"]
32863#[doc = r""]
32864#[doc = r" ```json"]
32865#[doc = "{"]
32866#[doc = "  \"type\": \"string\","]
32867#[doc = "  \"enum\": ["]
32868#[doc = "    \"view_global_contract_code\""]
32869#[doc = "  ]"]
32870#[doc = "}"]
32871#[doc = r" ```"]
32872#[doc = r" </details>"]
32873#[derive(
32874    :: serde :: Deserialize,
32875    :: serde :: Serialize,
32876    Clone,
32877    Copy,
32878    Debug,
32879    Eq,
32880    Hash,
32881    Ord,
32882    PartialEq,
32883    PartialOrd,
32884)]
32885pub enum ViewGlobalContractCodeByFinalityRequestType {
32886    #[serde(rename = "view_global_contract_code")]
32887    ViewGlobalContractCode,
32888}
32889impl ::std::convert::From<&Self> for ViewGlobalContractCodeByFinalityRequestType {
32890    fn from(value: &ViewGlobalContractCodeByFinalityRequestType) -> Self {
32891        value.clone()
32892    }
32893}
32894impl ::std::fmt::Display for ViewGlobalContractCodeByFinalityRequestType {
32895    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
32896        match *self {
32897            Self::ViewGlobalContractCode => f.write_str("view_global_contract_code"),
32898        }
32899    }
32900}
32901impl ::std::str::FromStr for ViewGlobalContractCodeByFinalityRequestType {
32902    type Err = self::error::ConversionError;
32903    fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
32904        match value {
32905            "view_global_contract_code" => Ok(Self::ViewGlobalContractCode),
32906            _ => Err("invalid value".into()),
32907        }
32908    }
32909}
32910impl ::std::convert::TryFrom<&str> for ViewGlobalContractCodeByFinalityRequestType {
32911    type Error = self::error::ConversionError;
32912    fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
32913        value.parse()
32914    }
32915}
32916impl ::std::convert::TryFrom<&::std::string::String>
32917    for ViewGlobalContractCodeByFinalityRequestType
32918{
32919    type Error = self::error::ConversionError;
32920    fn try_from(
32921        value: &::std::string::String,
32922    ) -> ::std::result::Result<Self, self::error::ConversionError> {
32923        value.parse()
32924    }
32925}
32926impl ::std::convert::TryFrom<::std::string::String>
32927    for ViewGlobalContractCodeByFinalityRequestType
32928{
32929    type Error = self::error::ConversionError;
32930    fn try_from(
32931        value: ::std::string::String,
32932    ) -> ::std::result::Result<Self, self::error::ConversionError> {
32933        value.parse()
32934    }
32935}
32936#[doc = "`ViewGlobalContractCodeBySyncCheckpointRequestType`"]
32937#[doc = r""]
32938#[doc = r" <details><summary>JSON schema</summary>"]
32939#[doc = r""]
32940#[doc = r" ```json"]
32941#[doc = "{"]
32942#[doc = "  \"type\": \"string\","]
32943#[doc = "  \"enum\": ["]
32944#[doc = "    \"view_global_contract_code\""]
32945#[doc = "  ]"]
32946#[doc = "}"]
32947#[doc = r" ```"]
32948#[doc = r" </details>"]
32949#[derive(
32950    :: serde :: Deserialize,
32951    :: serde :: Serialize,
32952    Clone,
32953    Copy,
32954    Debug,
32955    Eq,
32956    Hash,
32957    Ord,
32958    PartialEq,
32959    PartialOrd,
32960)]
32961pub enum ViewGlobalContractCodeBySyncCheckpointRequestType {
32962    #[serde(rename = "view_global_contract_code")]
32963    ViewGlobalContractCode,
32964}
32965impl ::std::convert::From<&Self> for ViewGlobalContractCodeBySyncCheckpointRequestType {
32966    fn from(value: &ViewGlobalContractCodeBySyncCheckpointRequestType) -> Self {
32967        value.clone()
32968    }
32969}
32970impl ::std::fmt::Display for ViewGlobalContractCodeBySyncCheckpointRequestType {
32971    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
32972        match *self {
32973            Self::ViewGlobalContractCode => f.write_str("view_global_contract_code"),
32974        }
32975    }
32976}
32977impl ::std::str::FromStr for ViewGlobalContractCodeBySyncCheckpointRequestType {
32978    type Err = self::error::ConversionError;
32979    fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
32980        match value {
32981            "view_global_contract_code" => Ok(Self::ViewGlobalContractCode),
32982            _ => Err("invalid value".into()),
32983        }
32984    }
32985}
32986impl ::std::convert::TryFrom<&str> for ViewGlobalContractCodeBySyncCheckpointRequestType {
32987    type Error = self::error::ConversionError;
32988    fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
32989        value.parse()
32990    }
32991}
32992impl ::std::convert::TryFrom<&::std::string::String>
32993    for ViewGlobalContractCodeBySyncCheckpointRequestType
32994{
32995    type Error = self::error::ConversionError;
32996    fn try_from(
32997        value: &::std::string::String,
32998    ) -> ::std::result::Result<Self, self::error::ConversionError> {
32999        value.parse()
33000    }
33001}
33002impl ::std::convert::TryFrom<::std::string::String>
33003    for ViewGlobalContractCodeBySyncCheckpointRequestType
33004{
33005    type Error = self::error::ConversionError;
33006    fn try_from(
33007        value: ::std::string::String,
33008    ) -> ::std::result::Result<Self, self::error::ConversionError> {
33009        value.parse()
33010    }
33011}
33012#[doc = "`ViewStateByBlockIdRequestType`"]
33013#[doc = r""]
33014#[doc = r" <details><summary>JSON schema</summary>"]
33015#[doc = r""]
33016#[doc = r" ```json"]
33017#[doc = "{"]
33018#[doc = "  \"type\": \"string\","]
33019#[doc = "  \"enum\": ["]
33020#[doc = "    \"view_state\""]
33021#[doc = "  ]"]
33022#[doc = "}"]
33023#[doc = r" ```"]
33024#[doc = r" </details>"]
33025#[derive(
33026    :: serde :: Deserialize,
33027    :: serde :: Serialize,
33028    Clone,
33029    Copy,
33030    Debug,
33031    Eq,
33032    Hash,
33033    Ord,
33034    PartialEq,
33035    PartialOrd,
33036)]
33037pub enum ViewStateByBlockIdRequestType {
33038    #[serde(rename = "view_state")]
33039    ViewState,
33040}
33041impl ::std::convert::From<&Self> for ViewStateByBlockIdRequestType {
33042    fn from(value: &ViewStateByBlockIdRequestType) -> Self {
33043        value.clone()
33044    }
33045}
33046impl ::std::fmt::Display for ViewStateByBlockIdRequestType {
33047    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
33048        match *self {
33049            Self::ViewState => f.write_str("view_state"),
33050        }
33051    }
33052}
33053impl ::std::str::FromStr for ViewStateByBlockIdRequestType {
33054    type Err = self::error::ConversionError;
33055    fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
33056        match value {
33057            "view_state" => Ok(Self::ViewState),
33058            _ => Err("invalid value".into()),
33059        }
33060    }
33061}
33062impl ::std::convert::TryFrom<&str> for ViewStateByBlockIdRequestType {
33063    type Error = self::error::ConversionError;
33064    fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
33065        value.parse()
33066    }
33067}
33068impl ::std::convert::TryFrom<&::std::string::String> for ViewStateByBlockIdRequestType {
33069    type Error = self::error::ConversionError;
33070    fn try_from(
33071        value: &::std::string::String,
33072    ) -> ::std::result::Result<Self, self::error::ConversionError> {
33073        value.parse()
33074    }
33075}
33076impl ::std::convert::TryFrom<::std::string::String> for ViewStateByBlockIdRequestType {
33077    type Error = self::error::ConversionError;
33078    fn try_from(
33079        value: ::std::string::String,
33080    ) -> ::std::result::Result<Self, self::error::ConversionError> {
33081        value.parse()
33082    }
33083}
33084#[doc = "`ViewStateByFinalityRequestType`"]
33085#[doc = r""]
33086#[doc = r" <details><summary>JSON schema</summary>"]
33087#[doc = r""]
33088#[doc = r" ```json"]
33089#[doc = "{"]
33090#[doc = "  \"type\": \"string\","]
33091#[doc = "  \"enum\": ["]
33092#[doc = "    \"view_state\""]
33093#[doc = "  ]"]
33094#[doc = "}"]
33095#[doc = r" ```"]
33096#[doc = r" </details>"]
33097#[derive(
33098    :: serde :: Deserialize,
33099    :: serde :: Serialize,
33100    Clone,
33101    Copy,
33102    Debug,
33103    Eq,
33104    Hash,
33105    Ord,
33106    PartialEq,
33107    PartialOrd,
33108)]
33109pub enum ViewStateByFinalityRequestType {
33110    #[serde(rename = "view_state")]
33111    ViewState,
33112}
33113impl ::std::convert::From<&Self> for ViewStateByFinalityRequestType {
33114    fn from(value: &ViewStateByFinalityRequestType) -> Self {
33115        value.clone()
33116    }
33117}
33118impl ::std::fmt::Display for ViewStateByFinalityRequestType {
33119    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
33120        match *self {
33121            Self::ViewState => f.write_str("view_state"),
33122        }
33123    }
33124}
33125impl ::std::str::FromStr for ViewStateByFinalityRequestType {
33126    type Err = self::error::ConversionError;
33127    fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
33128        match value {
33129            "view_state" => Ok(Self::ViewState),
33130            _ => Err("invalid value".into()),
33131        }
33132    }
33133}
33134impl ::std::convert::TryFrom<&str> for ViewStateByFinalityRequestType {
33135    type Error = self::error::ConversionError;
33136    fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
33137        value.parse()
33138    }
33139}
33140impl ::std::convert::TryFrom<&::std::string::String> for ViewStateByFinalityRequestType {
33141    type Error = self::error::ConversionError;
33142    fn try_from(
33143        value: &::std::string::String,
33144    ) -> ::std::result::Result<Self, self::error::ConversionError> {
33145        value.parse()
33146    }
33147}
33148impl ::std::convert::TryFrom<::std::string::String> for ViewStateByFinalityRequestType {
33149    type Error = self::error::ConversionError;
33150    fn try_from(
33151        value: ::std::string::String,
33152    ) -> ::std::result::Result<Self, self::error::ConversionError> {
33153        value.parse()
33154    }
33155}
33156#[doc = "`ViewStateBySyncCheckpointRequestType`"]
33157#[doc = r""]
33158#[doc = r" <details><summary>JSON schema</summary>"]
33159#[doc = r""]
33160#[doc = r" ```json"]
33161#[doc = "{"]
33162#[doc = "  \"type\": \"string\","]
33163#[doc = "  \"enum\": ["]
33164#[doc = "    \"view_state\""]
33165#[doc = "  ]"]
33166#[doc = "}"]
33167#[doc = r" ```"]
33168#[doc = r" </details>"]
33169#[derive(
33170    :: serde :: Deserialize,
33171    :: serde :: Serialize,
33172    Clone,
33173    Copy,
33174    Debug,
33175    Eq,
33176    Hash,
33177    Ord,
33178    PartialEq,
33179    PartialOrd,
33180)]
33181pub enum ViewStateBySyncCheckpointRequestType {
33182    #[serde(rename = "view_state")]
33183    ViewState,
33184}
33185impl ::std::convert::From<&Self> for ViewStateBySyncCheckpointRequestType {
33186    fn from(value: &ViewStateBySyncCheckpointRequestType) -> Self {
33187        value.clone()
33188    }
33189}
33190impl ::std::fmt::Display for ViewStateBySyncCheckpointRequestType {
33191    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
33192        match *self {
33193            Self::ViewState => f.write_str("view_state"),
33194        }
33195    }
33196}
33197impl ::std::str::FromStr for ViewStateBySyncCheckpointRequestType {
33198    type Err = self::error::ConversionError;
33199    fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
33200        match value {
33201            "view_state" => Ok(Self::ViewState),
33202            _ => Err("invalid value".into()),
33203        }
33204    }
33205}
33206impl ::std::convert::TryFrom<&str> for ViewStateBySyncCheckpointRequestType {
33207    type Error = self::error::ConversionError;
33208    fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
33209        value.parse()
33210    }
33211}
33212impl ::std::convert::TryFrom<&::std::string::String> for ViewStateBySyncCheckpointRequestType {
33213    type Error = self::error::ConversionError;
33214    fn try_from(
33215        value: &::std::string::String,
33216    ) -> ::std::result::Result<Self, self::error::ConversionError> {
33217        value.parse()
33218    }
33219}
33220impl ::std::convert::TryFrom<::std::string::String> for ViewStateBySyncCheckpointRequestType {
33221    type Error = self::error::ConversionError;
33222    fn try_from(
33223        value: ::std::string::String,
33224    ) -> ::std::result::Result<Self, self::error::ConversionError> {
33225        value.parse()
33226    }
33227}
33228#[doc = "Resulting state values for a view state query request"]
33229#[doc = r""]
33230#[doc = r" <details><summary>JSON schema</summary>"]
33231#[doc = r""]
33232#[doc = r" ```json"]
33233#[doc = "{"]
33234#[doc = "  \"description\": \"Resulting state values for a view state query request\","]
33235#[doc = "  \"type\": \"object\","]
33236#[doc = "  \"required\": ["]
33237#[doc = "    \"values\""]
33238#[doc = "  ],"]
33239#[doc = "  \"properties\": {"]
33240#[doc = "    \"proof\": {"]
33241#[doc = "      \"type\": \"array\","]
33242#[doc = "      \"items\": {"]
33243#[doc = "        \"type\": \"string\""]
33244#[doc = "      }"]
33245#[doc = "    },"]
33246#[doc = "    \"values\": {"]
33247#[doc = "      \"type\": \"array\","]
33248#[doc = "      \"items\": {"]
33249#[doc = "        \"$ref\": \"#/components/schemas/StateItem\""]
33250#[doc = "      }"]
33251#[doc = "    }"]
33252#[doc = "  }"]
33253#[doc = "}"]
33254#[doc = r" ```"]
33255#[doc = r" </details>"]
33256#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
33257pub struct ViewStateResult {
33258    #[serde(default, skip_serializing_if = "::std::vec::Vec::is_empty")]
33259    pub proof: ::std::vec::Vec<::std::string::String>,
33260    pub values: ::std::vec::Vec<StateItem>,
33261}
33262impl ::std::convert::From<&ViewStateResult> for ViewStateResult {
33263    fn from(value: &ViewStateResult) -> Self {
33264        value.clone()
33265    }
33266}
33267#[doc = "`VmConfigView`"]
33268#[doc = r""]
33269#[doc = r" <details><summary>JSON schema</summary>"]
33270#[doc = r""]
33271#[doc = r" ```json"]
33272#[doc = "{"]
33273#[doc = "  \"type\": \"object\","]
33274#[doc = "  \"required\": ["]
33275#[doc = "    \"deterministic_account_ids\","]
33276#[doc = "    \"discard_custom_sections\","]
33277#[doc = "    \"eth_implicit_accounts\","]
33278#[doc = "    \"ext_costs\","]
33279#[doc = "    \"fix_contract_loading_cost\","]
33280#[doc = "    \"global_contract_host_fns\","]
33281#[doc = "    \"grow_mem_cost\","]
33282#[doc = "    \"implicit_account_creation\","]
33283#[doc = "    \"limit_config\","]
33284#[doc = "    \"linear_op_base_cost\","]
33285#[doc = "    \"linear_op_unit_cost\","]
33286#[doc = "    \"reftypes_bulk_memory\","]
33287#[doc = "    \"regular_op_cost\","]
33288#[doc = "    \"saturating_float_to_int\","]
33289#[doc = "    \"storage_get_mode\","]
33290#[doc = "    \"vm_kind\""]
33291#[doc = "  ],"]
33292#[doc = "  \"properties\": {"]
33293#[doc = "    \"deterministic_account_ids\": {"]
33294#[doc = "      \"description\": \"See [VMConfig::deterministic_account_ids](crate::vm::Config::deterministic_account_ids).\","]
33295#[doc = "      \"type\": \"boolean\""]
33296#[doc = "    },"]
33297#[doc = "    \"discard_custom_sections\": {"]
33298#[doc = "      \"description\": \"See [VMConfig::discard_custom_sections](crate::vm::Config::discard_custom_sections).\","]
33299#[doc = "      \"type\": \"boolean\""]
33300#[doc = "    },"]
33301#[doc = "    \"eth_implicit_accounts\": {"]
33302#[doc = "      \"description\": \"See [VMConfig::eth_implicit_accounts](crate::vm::Config::eth_implicit_accounts).\","]
33303#[doc = "      \"type\": \"boolean\""]
33304#[doc = "    },"]
33305#[doc = "    \"ext_costs\": {"]
33306#[doc = "      \"description\": \"Costs for runtime externals\","]
33307#[doc = "      \"allOf\": ["]
33308#[doc = "        {"]
33309#[doc = "          \"$ref\": \"#/components/schemas/ExtCostsConfigView\""]
33310#[doc = "        }"]
33311#[doc = "      ]"]
33312#[doc = "    },"]
33313#[doc = "    \"fix_contract_loading_cost\": {"]
33314#[doc = "      \"description\": \"See [VMConfig::fix_contract_loading_cost](crate::vm::Config::fix_contract_loading_cost).\","]
33315#[doc = "      \"type\": \"boolean\""]
33316#[doc = "    },"]
33317#[doc = "    \"global_contract_host_fns\": {"]
33318#[doc = "      \"description\": \"See [VMConfig::global_contract_host_fns](crate::vm::Config::global_contract_host_fns).\","]
33319#[doc = "      \"type\": \"boolean\""]
33320#[doc = "    },"]
33321#[doc = "    \"grow_mem_cost\": {"]
33322#[doc = "      \"description\": \"Gas cost of a growing memory by single page.\","]
33323#[doc = "      \"type\": \"integer\","]
33324#[doc = "      \"format\": \"uint32\","]
33325#[doc = "      \"minimum\": 0.0"]
33326#[doc = "    },"]
33327#[doc = "    \"implicit_account_creation\": {"]
33328#[doc = "      \"description\": \"See [VMConfig::implicit_account_creation](crate::vm::Config::implicit_account_creation).\","]
33329#[doc = "      \"type\": \"boolean\""]
33330#[doc = "    },"]
33331#[doc = "    \"limit_config\": {"]
33332#[doc = "      \"description\": \"Describes limits for VM and Runtime.\\n\\nTODO: Consider changing this to `VMLimitConfigView` to avoid dependency\\non runtime.\","]
33333#[doc = "      \"allOf\": ["]
33334#[doc = "        {"]
33335#[doc = "          \"$ref\": \"#/components/schemas/LimitConfig\""]
33336#[doc = "        }"]
33337#[doc = "      ]"]
33338#[doc = "    },"]
33339#[doc = "    \"linear_op_base_cost\": {"]
33340#[doc = "      \"description\": \"Base gas cost of a linear operation\","]
33341#[doc = "      \"type\": \"integer\","]
33342#[doc = "      \"format\": \"uint64\","]
33343#[doc = "      \"minimum\": 0.0"]
33344#[doc = "    },"]
33345#[doc = "    \"linear_op_unit_cost\": {"]
33346#[doc = "      \"description\": \"Unit gas cost of a linear operation\","]
33347#[doc = "      \"type\": \"integer\","]
33348#[doc = "      \"format\": \"uint64\","]
33349#[doc = "      \"minimum\": 0.0"]
33350#[doc = "    },"]
33351#[doc = "    \"reftypes_bulk_memory\": {"]
33352#[doc = "      \"description\": \"See [VMConfig::reftypes_bulk_memory](crate::vm::Config::reftypes_bulk_memory).\","]
33353#[doc = "      \"type\": \"boolean\""]
33354#[doc = "    },"]
33355#[doc = "    \"regular_op_cost\": {"]
33356#[doc = "      \"description\": \"Gas cost of a regular operation.\","]
33357#[doc = "      \"type\": \"integer\","]
33358#[doc = "      \"format\": \"uint32\","]
33359#[doc = "      \"minimum\": 0.0"]
33360#[doc = "    },"]
33361#[doc = "    \"saturating_float_to_int\": {"]
33362#[doc = "      \"description\": \"See [VMConfig::saturating_float_to_int](crate::vm::Config::saturating_float_to_int).\","]
33363#[doc = "      \"type\": \"boolean\""]
33364#[doc = "    },"]
33365#[doc = "    \"storage_get_mode\": {"]
33366#[doc = "      \"description\": \"See [VMConfig::storage_get_mode](crate::vm::Config::storage_get_mode).\","]
33367#[doc = "      \"allOf\": ["]
33368#[doc = "        {"]
33369#[doc = "          \"$ref\": \"#/components/schemas/StorageGetMode\""]
33370#[doc = "        }"]
33371#[doc = "      ]"]
33372#[doc = "    },"]
33373#[doc = "    \"vm_kind\": {"]
33374#[doc = "      \"description\": \"See [VMConfig::vm_kind](crate::vm::Config::vm_kind).\","]
33375#[doc = "      \"allOf\": ["]
33376#[doc = "        {"]
33377#[doc = "          \"$ref\": \"#/components/schemas/VMKind\""]
33378#[doc = "        }"]
33379#[doc = "      ]"]
33380#[doc = "    }"]
33381#[doc = "  }"]
33382#[doc = "}"]
33383#[doc = r" ```"]
33384#[doc = r" </details>"]
33385#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
33386pub struct VmConfigView {
33387    #[doc = "See [VMConfig::deterministic_account_ids](crate::vm::Config::deterministic_account_ids)."]
33388    pub deterministic_account_ids: bool,
33389    #[doc = "See [VMConfig::discard_custom_sections](crate::vm::Config::discard_custom_sections)."]
33390    pub discard_custom_sections: bool,
33391    #[doc = "See [VMConfig::eth_implicit_accounts](crate::vm::Config::eth_implicit_accounts)."]
33392    pub eth_implicit_accounts: bool,
33393    #[doc = "Costs for runtime externals"]
33394    pub ext_costs: ExtCostsConfigView,
33395    #[doc = "See [VMConfig::fix_contract_loading_cost](crate::vm::Config::fix_contract_loading_cost)."]
33396    pub fix_contract_loading_cost: bool,
33397    #[doc = "See [VMConfig::global_contract_host_fns](crate::vm::Config::global_contract_host_fns)."]
33398    pub global_contract_host_fns: bool,
33399    #[doc = "Gas cost of a growing memory by single page."]
33400    pub grow_mem_cost: u32,
33401    #[doc = "See [VMConfig::implicit_account_creation](crate::vm::Config::implicit_account_creation)."]
33402    pub implicit_account_creation: bool,
33403    #[doc = "Describes limits for VM and Runtime.\n\nTODO: Consider changing this to `VMLimitConfigView` to avoid dependency\non runtime."]
33404    pub limit_config: LimitConfig,
33405    #[doc = "Base gas cost of a linear operation"]
33406    pub linear_op_base_cost: u64,
33407    #[doc = "Unit gas cost of a linear operation"]
33408    pub linear_op_unit_cost: u64,
33409    #[doc = "See [VMConfig::reftypes_bulk_memory](crate::vm::Config::reftypes_bulk_memory)."]
33410    pub reftypes_bulk_memory: bool,
33411    #[doc = "Gas cost of a regular operation."]
33412    pub regular_op_cost: u32,
33413    #[doc = "See [VMConfig::saturating_float_to_int](crate::vm::Config::saturating_float_to_int)."]
33414    pub saturating_float_to_int: bool,
33415    #[doc = "See [VMConfig::storage_get_mode](crate::vm::Config::storage_get_mode)."]
33416    pub storage_get_mode: StorageGetMode,
33417    #[doc = "See [VMConfig::vm_kind](crate::vm::Config::vm_kind)."]
33418    pub vm_kind: VmKind,
33419}
33420impl ::std::convert::From<&VmConfigView> for VmConfigView {
33421    fn from(value: &VmConfigView) -> Self {
33422        value.clone()
33423    }
33424}
33425#[doc = "`VmKind`"]
33426#[doc = r""]
33427#[doc = r" <details><summary>JSON schema</summary>"]
33428#[doc = r""]
33429#[doc = r" ```json"]
33430#[doc = "{"]
33431#[doc = "  \"oneOf\": ["]
33432#[doc = "    {"]
33433#[doc = "      \"description\": \"Wasmer 0.17.x VM. Gone now.\","]
33434#[doc = "      \"type\": \"string\","]
33435#[doc = "      \"enum\": ["]
33436#[doc = "        \"Wasmer0\""]
33437#[doc = "      ]"]
33438#[doc = "    },"]
33439#[doc = "    {"]
33440#[doc = "      \"description\": \"Wasmtime VM.\","]
33441#[doc = "      \"type\": \"string\","]
33442#[doc = "      \"enum\": ["]
33443#[doc = "        \"Wasmtime\""]
33444#[doc = "      ]"]
33445#[doc = "    },"]
33446#[doc = "    {"]
33447#[doc = "      \"description\": \"Wasmer 2.x VM.\","]
33448#[doc = "      \"type\": \"string\","]
33449#[doc = "      \"enum\": ["]
33450#[doc = "        \"Wasmer2\""]
33451#[doc = "      ]"]
33452#[doc = "    },"]
33453#[doc = "    {"]
33454#[doc = "      \"description\": \"NearVM.\","]
33455#[doc = "      \"type\": \"string\","]
33456#[doc = "      \"enum\": ["]
33457#[doc = "        \"NearVm\""]
33458#[doc = "      ]"]
33459#[doc = "    }"]
33460#[doc = "  ]"]
33461#[doc = "}"]
33462#[doc = r" ```"]
33463#[doc = r" </details>"]
33464#[derive(
33465    :: serde :: Deserialize,
33466    :: serde :: Serialize,
33467    Clone,
33468    Copy,
33469    Debug,
33470    Eq,
33471    Hash,
33472    Ord,
33473    PartialEq,
33474    PartialOrd,
33475)]
33476pub enum VmKind {
33477    #[doc = "Wasmer 0.17.x VM. Gone now."]
33478    Wasmer0,
33479    #[doc = "Wasmtime VM."]
33480    Wasmtime,
33481    #[doc = "Wasmer 2.x VM."]
33482    Wasmer2,
33483    #[doc = "NearVM."]
33484    NearVm,
33485}
33486impl ::std::convert::From<&Self> for VmKind {
33487    fn from(value: &VmKind) -> Self {
33488        value.clone()
33489    }
33490}
33491impl ::std::fmt::Display for VmKind {
33492    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
33493        match *self {
33494            Self::Wasmer0 => f.write_str("Wasmer0"),
33495            Self::Wasmtime => f.write_str("Wasmtime"),
33496            Self::Wasmer2 => f.write_str("Wasmer2"),
33497            Self::NearVm => f.write_str("NearVm"),
33498        }
33499    }
33500}
33501impl ::std::str::FromStr for VmKind {
33502    type Err = self::error::ConversionError;
33503    fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
33504        match value {
33505            "Wasmer0" => Ok(Self::Wasmer0),
33506            "Wasmtime" => Ok(Self::Wasmtime),
33507            "Wasmer2" => Ok(Self::Wasmer2),
33508            "NearVm" => Ok(Self::NearVm),
33509            _ => Err("invalid value".into()),
33510        }
33511    }
33512}
33513impl ::std::convert::TryFrom<&str> for VmKind {
33514    type Error = self::error::ConversionError;
33515    fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
33516        value.parse()
33517    }
33518}
33519impl ::std::convert::TryFrom<&::std::string::String> for VmKind {
33520    type Error = self::error::ConversionError;
33521    fn try_from(
33522        value: &::std::string::String,
33523    ) -> ::std::result::Result<Self, self::error::ConversionError> {
33524        value.parse()
33525    }
33526}
33527impl ::std::convert::TryFrom<::std::string::String> for VmKind {
33528    type Error = self::error::ConversionError;
33529    fn try_from(
33530        value: ::std::string::String,
33531    ) -> ::std::result::Result<Self, self::error::ConversionError> {
33532        value.parse()
33533    }
33534}
33535#[doc = "A kind of a trap happened during execution of a binary"]
33536#[doc = r""]
33537#[doc = r" <details><summary>JSON schema</summary>"]
33538#[doc = r""]
33539#[doc = r" ```json"]
33540#[doc = "{"]
33541#[doc = "  \"description\": \"A kind of a trap happened during execution of a binary\","]
33542#[doc = "  \"oneOf\": ["]
33543#[doc = "    {"]
33544#[doc = "      \"description\": \"An `unreachable` opcode was executed.\","]
33545#[doc = "      \"type\": \"string\","]
33546#[doc = "      \"enum\": ["]
33547#[doc = "        \"Unreachable\""]
33548#[doc = "      ]"]
33549#[doc = "    },"]
33550#[doc = "    {"]
33551#[doc = "      \"description\": \"Call indirect incorrect signature trap.\","]
33552#[doc = "      \"type\": \"string\","]
33553#[doc = "      \"enum\": ["]
33554#[doc = "        \"IncorrectCallIndirectSignature\""]
33555#[doc = "      ]"]
33556#[doc = "    },"]
33557#[doc = "    {"]
33558#[doc = "      \"description\": \"Memory out of bounds trap.\","]
33559#[doc = "      \"type\": \"string\","]
33560#[doc = "      \"enum\": ["]
33561#[doc = "        \"MemoryOutOfBounds\""]
33562#[doc = "      ]"]
33563#[doc = "    },"]
33564#[doc = "    {"]
33565#[doc = "      \"description\": \"Call indirect out of bounds trap.\","]
33566#[doc = "      \"type\": \"string\","]
33567#[doc = "      \"enum\": ["]
33568#[doc = "        \"CallIndirectOOB\""]
33569#[doc = "      ]"]
33570#[doc = "    },"]
33571#[doc = "    {"]
33572#[doc = "      \"description\": \"An arithmetic exception, e.g. divided by zero.\","]
33573#[doc = "      \"type\": \"string\","]
33574#[doc = "      \"enum\": ["]
33575#[doc = "        \"IllegalArithmetic\""]
33576#[doc = "      ]"]
33577#[doc = "    },"]
33578#[doc = "    {"]
33579#[doc = "      \"description\": \"Misaligned atomic access trap.\","]
33580#[doc = "      \"type\": \"string\","]
33581#[doc = "      \"enum\": ["]
33582#[doc = "        \"MisalignedAtomicAccess\""]
33583#[doc = "      ]"]
33584#[doc = "    },"]
33585#[doc = "    {"]
33586#[doc = "      \"description\": \"Indirect call to null.\","]
33587#[doc = "      \"type\": \"string\","]
33588#[doc = "      \"enum\": ["]
33589#[doc = "        \"IndirectCallToNull\""]
33590#[doc = "      ]"]
33591#[doc = "    },"]
33592#[doc = "    {"]
33593#[doc = "      \"description\": \"Stack overflow.\","]
33594#[doc = "      \"type\": \"string\","]
33595#[doc = "      \"enum\": ["]
33596#[doc = "        \"StackOverflow\""]
33597#[doc = "      ]"]
33598#[doc = "    },"]
33599#[doc = "    {"]
33600#[doc = "      \"description\": \"Generic trap.\","]
33601#[doc = "      \"type\": \"string\","]
33602#[doc = "      \"enum\": ["]
33603#[doc = "        \"GenericTrap\""]
33604#[doc = "      ]"]
33605#[doc = "    }"]
33606#[doc = "  ]"]
33607#[doc = "}"]
33608#[doc = r" ```"]
33609#[doc = r" </details>"]
33610#[derive(
33611    :: serde :: Deserialize,
33612    :: serde :: Serialize,
33613    Clone,
33614    Copy,
33615    Debug,
33616    Eq,
33617    Hash,
33618    Ord,
33619    PartialEq,
33620    PartialOrd,
33621)]
33622pub enum WasmTrap {
33623    #[doc = "An `unreachable` opcode was executed."]
33624    Unreachable,
33625    #[doc = "Call indirect incorrect signature trap."]
33626    IncorrectCallIndirectSignature,
33627    #[doc = "Memory out of bounds trap."]
33628    MemoryOutOfBounds,
33629    #[doc = "Call indirect out of bounds trap."]
33630    #[serde(rename = "CallIndirectOOB")]
33631    CallIndirectOob,
33632    #[doc = "An arithmetic exception, e.g. divided by zero."]
33633    IllegalArithmetic,
33634    #[doc = "Misaligned atomic access trap."]
33635    MisalignedAtomicAccess,
33636    #[doc = "Indirect call to null."]
33637    IndirectCallToNull,
33638    #[doc = "Stack overflow."]
33639    StackOverflow,
33640    #[doc = "Generic trap."]
33641    GenericTrap,
33642}
33643impl ::std::convert::From<&Self> for WasmTrap {
33644    fn from(value: &WasmTrap) -> Self {
33645        value.clone()
33646    }
33647}
33648impl ::std::fmt::Display for WasmTrap {
33649    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
33650        match *self {
33651            Self::Unreachable => f.write_str("Unreachable"),
33652            Self::IncorrectCallIndirectSignature => f.write_str("IncorrectCallIndirectSignature"),
33653            Self::MemoryOutOfBounds => f.write_str("MemoryOutOfBounds"),
33654            Self::CallIndirectOob => f.write_str("CallIndirectOOB"),
33655            Self::IllegalArithmetic => f.write_str("IllegalArithmetic"),
33656            Self::MisalignedAtomicAccess => f.write_str("MisalignedAtomicAccess"),
33657            Self::IndirectCallToNull => f.write_str("IndirectCallToNull"),
33658            Self::StackOverflow => f.write_str("StackOverflow"),
33659            Self::GenericTrap => f.write_str("GenericTrap"),
33660        }
33661    }
33662}
33663impl ::std::str::FromStr for WasmTrap {
33664    type Err = self::error::ConversionError;
33665    fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
33666        match value {
33667            "Unreachable" => Ok(Self::Unreachable),
33668            "IncorrectCallIndirectSignature" => Ok(Self::IncorrectCallIndirectSignature),
33669            "MemoryOutOfBounds" => Ok(Self::MemoryOutOfBounds),
33670            "CallIndirectOOB" => Ok(Self::CallIndirectOob),
33671            "IllegalArithmetic" => Ok(Self::IllegalArithmetic),
33672            "MisalignedAtomicAccess" => Ok(Self::MisalignedAtomicAccess),
33673            "IndirectCallToNull" => Ok(Self::IndirectCallToNull),
33674            "StackOverflow" => Ok(Self::StackOverflow),
33675            "GenericTrap" => Ok(Self::GenericTrap),
33676            _ => Err("invalid value".into()),
33677        }
33678    }
33679}
33680impl ::std::convert::TryFrom<&str> for WasmTrap {
33681    type Error = self::error::ConversionError;
33682    fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
33683        value.parse()
33684    }
33685}
33686impl ::std::convert::TryFrom<&::std::string::String> for WasmTrap {
33687    type Error = self::error::ConversionError;
33688    fn try_from(
33689        value: &::std::string::String,
33690    ) -> ::std::result::Result<Self, self::error::ConversionError> {
33691        value.parse()
33692    }
33693}
33694impl ::std::convert::TryFrom<::std::string::String> for WasmTrap {
33695    type Error = self::error::ConversionError;
33696    fn try_from(
33697        value: ::std::string::String,
33698    ) -> ::std::result::Result<Self, self::error::ConversionError> {
33699        value.parse()
33700    }
33701}
33702#[doc = "Configuration specific to ChunkStateWitness."]
33703#[doc = r""]
33704#[doc = r" <details><summary>JSON schema</summary>"]
33705#[doc = r""]
33706#[doc = r" ```json"]
33707#[doc = "{"]
33708#[doc = "  \"description\": \"Configuration specific to ChunkStateWitness.\","]
33709#[doc = "  \"type\": \"object\","]
33710#[doc = "  \"required\": ["]
33711#[doc = "    \"combined_transactions_size_limit\","]
33712#[doc = "    \"main_storage_proof_size_soft_limit\","]
33713#[doc = "    \"new_transactions_validation_state_size_soft_limit\""]
33714#[doc = "  ],"]
33715#[doc = "  \"properties\": {"]
33716#[doc = "    \"combined_transactions_size_limit\": {"]
33717#[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.\","]
33718#[doc = "      \"type\": \"integer\","]
33719#[doc = "      \"format\": \"uint\","]
33720#[doc = "      \"minimum\": 0.0"]
33721#[doc = "    },"]
33722#[doc = "    \"main_storage_proof_size_soft_limit\": {"]
33723#[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.\","]
33724#[doc = "      \"type\": \"integer\","]
33725#[doc = "      \"format\": \"uint64\","]
33726#[doc = "      \"minimum\": 0.0"]
33727#[doc = "    },"]
33728#[doc = "    \"new_transactions_validation_state_size_soft_limit\": {"]
33729#[doc = "      \"description\": \"Soft size limit of storage proof used to validate new transactions in ChunkStateWitness.\","]
33730#[doc = "      \"type\": \"integer\","]
33731#[doc = "      \"format\": \"uint64\","]
33732#[doc = "      \"minimum\": 0.0"]
33733#[doc = "    }"]
33734#[doc = "  }"]
33735#[doc = "}"]
33736#[doc = r" ```"]
33737#[doc = r" </details>"]
33738#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
33739pub struct WitnessConfigView {
33740    #[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."]
33741    pub combined_transactions_size_limit: u32,
33742    #[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."]
33743    pub main_storage_proof_size_soft_limit: u64,
33744    #[doc = "Soft size limit of storage proof used to validate new transactions in ChunkStateWitness."]
33745    pub new_transactions_validation_state_size_soft_limit: u64,
33746}
33747impl ::std::convert::From<&WitnessConfigView> for WitnessConfigView {
33748    fn from(value: &WitnessConfigView) -> Self {
33749        value.clone()
33750    }
33751}
33752#[doc = r" Generation of default values for serde."]
33753pub mod defaults {
33754    pub(super) fn default_u64<T, const V: u64>() -> T
33755    where
33756        T: ::std::convert::TryFrom<u64>,
33757        <T as ::std::convert::TryFrom<u64>>::Error: ::std::fmt::Debug,
33758    {
33759        T::try_from(V).unwrap()
33760    }
33761    pub(super) fn block_header_view_rent_paid() -> super::NearToken {
33762        super::NearToken::from_yoctonear(0)
33763    }
33764    pub(super) fn block_header_view_validator_reward() -> super::NearToken {
33765        super::NearToken::from_yoctonear(0)
33766    }
33767    pub(super) fn chunk_header_view_rent_paid() -> super::NearToken {
33768        super::NearToken::from_yoctonear(0)
33769    }
33770    pub(super) fn chunk_header_view_validator_reward() -> super::NearToken {
33771        super::NearToken::from_yoctonear(0)
33772    }
33773    pub(super) fn cloud_archival_writer_config_polling_interval(
33774    ) -> super::DurationAsStdSchemaProvider {
33775        super::DurationAsStdSchemaProvider {
33776            nanos: 0_i32,
33777            secs: 1_i64,
33778        }
33779    }
33780    pub(super) fn execution_outcome_view_metadata() -> super::ExecutionMetadataView {
33781        super::ExecutionMetadataView {
33782            gas_profile: Default::default(),
33783            version: 1_u32,
33784        }
33785    }
33786    pub(super) fn gc_config_gc_step_period() -> super::DurationAsStdSchemaProvider {
33787        super::DurationAsStdSchemaProvider {
33788            nanos: 500000000_i32,
33789            secs: 0_i64,
33790        }
33791    }
33792    pub(super) fn genesis_config_minimum_stake_ratio() -> [i32; 2usize] {
33793        [1_i32, 6250_i32]
33794    }
33795    pub(super) fn genesis_config_online_max_threshold() -> [i32; 2usize] {
33796        [99_i32, 100_i32]
33797    }
33798    pub(super) fn genesis_config_online_min_threshold() -> [i32; 2usize] {
33799        [9_i32, 10_i32]
33800    }
33801    pub(super) fn genesis_config_protocol_upgrade_stake_threshold() -> [i32; 2usize] {
33802        [4_i32, 5_i32]
33803    }
33804    pub(super) fn genesis_config_shard_layout() -> super::ShardLayout {
33805        super::ShardLayout::V2(super::ShardLayoutV2 {
33806            boundary_accounts: vec![],
33807            id_to_index_map: [("0".to_string(), 0_u32)].into_iter().collect(),
33808            index_to_id_map: [("0".to_string(), super::ShardId(0_u64))]
33809                .into_iter()
33810                .collect(),
33811            shard_ids: vec![super::ShardId(0_u64)],
33812            shards_parent_map: Default::default(),
33813            shards_split_map: Default::default(),
33814            version: 0_u32,
33815        })
33816    }
33817    pub(super) fn limit_config_account_id_validity_rules_version(
33818    ) -> super::AccountIdValidityRulesVersion {
33819        super::AccountIdValidityRulesVersion(0_u8)
33820    }
33821    pub(super) fn rpc_send_transaction_request_wait_until() -> super::TxExecutionStatus {
33822        super::TxExecutionStatus::ExecutedOptimistic
33823    }
33824    pub(super) fn rpc_transaction_status_request_variant0_wait_until() -> super::TxExecutionStatus {
33825        super::TxExecutionStatus::ExecutedOptimistic
33826    }
33827    pub(super) fn rpc_transaction_status_request_variant1_wait_until() -> super::TxExecutionStatus {
33828        super::TxExecutionStatus::ExecutedOptimistic
33829    }
33830}